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L,EAAatpD,GAAc,GAAKspD,GAAe,0BAEjTC,EAAWA,0CAAgEL,EAAIzmF,KAAK,QAASw9B,EAAkB,gBAAiB,iBAAiB,GAAM,GAA5IspD,uDAAwO,EAAEjpF,KAAKpB,KAAK,eAAgBuqF,EAAgBA,EAAgBzpD,WAA+B,qBAAbA,WAAyBA,gBAAW33C,EAAU,oBAAqBohG,EAAgBA,EAAgBxpD,gBAAyC,qBAAlBA,gBAA8BA,qBAAgB53C,EAAU,YAAaohG,EAAgBA,EAAgB9oC,QAAyB,qBAAVA,QAAsBA,aAAQt4D,EAAU,qBAAsBohG,EAAgBA,EAAgB7oC,iBAA2C,qBAAnBA,iBAA+BA,sBAAiBv4D,GAAoBkhG,CAAS,C","sources":["../../../../overview/packages/fluent-page-consts/src/card-ids.js","../../../../overview/packages/fluent-page-data/src/preference/preference-helper.js","../../../../overview/packages/fluent-page-data/src/preference/card-preference/performance-table.js","../../../../overview/packages/fluent-page-data/src/preference/use-selected-cards-with-preference.js","../../../../overview/packages/fluent-page-data/src/preference/card-preference/performance-chart.js","../../../../overview/packages/fluent-page-data/src/preference/card-preference/top-changes.js","../../../../overview/packages/fluent-page-data/src/preference/card-preference/devices.js","../../../../overview/packages/fluent-page-data/src/cards-configs/fluent-card-configs.js","../../../../overview/packages/fluent-page-data/src/helper/get-navigation-level.js","../../../../overview/packages/fluent-page-data/src/helper/get-cc-jsdata.js","../../../../overview/packages/fluent-page-data/src/helper/get-responsive-size.js","../../../../overview/packages/fluent-page-data/src/data-fetch/recommendation-card.js","../../../../overview/packages/fluent-page-data/src/data-fetch/grid-data.js","../../../../overview/packages/fluent-page-data/src/data-fetch-manager/fluent-page-data-fetch-manager.js","../../../../overview/packages/fluent-page-data/src/data-fetch/conversion-tracking.js","../../../../overview/packages/fluent-page-data/src/preference/card-preference/top-locations.js","../../../../overview/packages/fluent-page-data/src/preference/card-preference/conversion-tracking.js","../../../../overview/packages/fluent-page-data/src/preference/card-preference/recommendations.js","../../../../overview/packages/fluent-page-data/src/pmax-campaign-page-preference/pmax-single-campaign-overview-preference.js","../../../../overview/packages/fluent-page-data/src/pmax-campaign-page-preference/use-is-preference-initialized.js","../../../../overview/packages/overview-base-card/src/base-card.js","../../../../overview/packages/overview-cards-common/src/constants.js","../../../../overview/packages/overview-cards-common/src/util.js","../../../../overview/packages/overview-cards-common/src/metrics.js","../../../../overview/packages/overview-cards-common/src/filter-util.js","../../../../overview/packages/overview-cards-common/src/fetch.js","../../../../overview/packages/overview-cards-common/src/fetch-coupons.js","../../../../overview/packages/overview-cards-common/src/top-locations-fetch.js","../../../../overview/packages/overview-conversion-tracking-card/src/common/util.js","../../../../overview/packages/overview-conversion-tracking-card/src/common/strings.js","../../../../overview/packages/overview-conversion-tracking-card/src/conversion-tracking-card-react/conversion-setup/coupon-setup.js","../../../../overview/packages/overview-conversion-tracking-card/src/conversion-tracking-card-react/empty-state.js","../../../../overview/packages/overview-conversion-tracking-card/src/common/metrics.js","../../../../overview/packages/overview-conversion-tracking-card/src/conversion-tracking-card-react/react-grid/grid-increase-graph.js","../../../../overview/packages/overview-conversion-tracking-card/src/conversion-tracking-card-react/react-grid/grid-decline-graph.js","../../../../overview/packages/overview-conversion-tracking-card/src/conversion-tracking-card-react/react-grid/grid-name-cell.js","../../../../overview/packages/overview-conversion-tracking-card/src/conversion-tracking-card-react/react-grid/grid-hover-container.js","../../../../overview/packages/overview-conversion-tracking-card/src/conversion-tracking-card-react/react-grid/grid-row.js","../../../../overview/packages/overview-conversion-tracking-card/src/conversion-tracking-card-react/react-grid/react-grid.js","../../../../overview/packages/overview-conversion-tracking-card/src/common/error-type.js","../../../../overview/packages/overview-conversion-tracking-card/src/conversion-tracking-card-react/conversion-error-overview/popup.js","../../../../overview/packages/overview-conversion-tracking-card/src/conversion-tracking-card-react/conversion-error-overview/line.js","../../../../overview/packages/overview-conversion-tracking-card/src/conversion-tracking-card-react/conversion-error-overview/status-overview.js","../../../../overview/packages/overview-conversion-tracking-card/src/conversion-tracking-card-react/conversion-error-overview/footer.js","../../../../overview/packages/overview-conversion-tracking-card/src/conversion-tracking-card-react/react-grid/grid-metric-picker.js","../../../../overview/packages/overview-conversion-tracking-card/src/conversion-tracking-card-react/react-grid/grid-metric-picker-fluent.js","../../../../overview/packages/overview-conversion-tracking-card/src/conversion-tracking-card-react/react-grid/grid-header.js","../../../../overview/packages/overview-conversion-tracking-card/src/conversion-tracking-card-react/conversion-tracking-state.js","../../../../overview/packages/overview-conversion-tracking-card/src/conversion-tracking-card-react/conversion-tracking-card.js","../../../../overview/packages/overview-conversion-tracking-card/src/common/instrumentation.js","../../../../overview/packages/overview-conversion-tracking-card/src/conversion-tracking-card-backbone.js","../../../../overview/packages/overview-conversion-tracking-card/src/conversion-tracking-card-fluent.js","../../../../overview/packages/overview-device-card/src/metric/index.js","../../../../overview/packages/overview-device-card/src/order.js","../../../../overview/packages/overview-device-card/src/index.js","../../../../overview/packages/overview-grid-card/src/content.js","../../../../overview/packages/overview-grid-card/src/index.js","../../../../overview/packages/overview-grid-card/src/search-term-operations/add-keyword.js","../../../../overview/packages/overview-metric-picker/src/info-tooltip.js","../../../../overview/packages/overview-metric-picker/src/index.js","../../../../overview/packages/overview-panel/index.js","../../../../overview/packages/overview-panel/src/config/dashboard-config.js","../../../../overview/packages/overview-panel/src/dashboard/add-card/viewmodel.js","../../../../overview/packages/overview-panel/src/dashboard/add-card/index.js","../../../../overview/packages/overview-panel/src/config/welcome-card-config.js","../../../../overview/packages/overview-panel/src/dashboard/card-state.js","../../../../overview/packages/overview-panel/src/dashboard/datefilter-state.js","../../../../overview/packages/overview-panel/src/dashboard/util.js","../../../../overview/packages/overview-panel/src/dashboard/i18nMappings.js","../../../../overview/packages/overview-panel/src/dashboard/dashboard-view.js","../../../../overview/packages/overview-panel/src/dashboard-page/dashboard-page-view.js","../../../../overview/packages/overview-panel/src/instrumentation/log-helper.js","../../../../overview/packages/overview-recommendations-config/src/tips-config.js","../../../../overview/packages/overview-top-changes-card/src/content.js","../../../../overview/packages/overview-top-changes-card/src/index.js","../../../../performance-charts/packages/inline-chart-preferences/src/chart-preference-subadapter.js","../../../../performance-charts/packages/inline-chart-preferences/src/inline-chart-preferences.js","../../../../performance-charts/packages/inline-chart/src/chart-label.js","../../../../performance-charts/packages/metrics-picker/src/metrics-picker.js","../../../../performance-charts/packages/granularity-picker/src/granularity-picker.js","../../../../performance-charts/packages/inline-chart/src/chart-panel.js","../../../../performance-charts/packages/inline-chart/src/constants.js","../../../../performance-charts/packages/inline-chart/src/chart-formatter.js","../../../../performance-charts/packages/inline-chart/src/chart-granularity-adapter.js","../../../../performance-charts/packages/inline-chart/src/chart-metrics-adapter.js","../../../../performance-charts/packages/inline-chart/src/chart-data-adapter.js","../../../../performance-charts/packages/inline-chart/src/fluctuation-bulb.js","../../../../performance-charts/packages/inline-chart/src/inline-chart-instr-schema.js","../../../../performance-charts/packages/inline-chart/src/fluctuation-panel.js","../../../../performance-charts/packages/inline-chart/style/js/highcharts-style.js","../../../../performance-charts/packages/inline-chart/src/inline-chart.js","../../overview-card-styles/src/competition-card-style.js","../../overview-card-styles/src/conversion-tracking-card-style.js","../../overview-card-styles/src/device-card-style.js","../../overview-card-styles/src/grid-card-style.js","../../overview-card-styles/src/metric-picker-style.js","../../overview-card-styles/src/metric-picker-fluent-v2-style.js","../../overview-card-styles/src/performance-card-style.js","../../overview-card-styles/src/performance-card-fluent-v2-style.js","../../overview-card-styles/src/performance-graph-style.js","../../overview-card-styles/src/tip-card-style-default.js","../../overview-card-styles/src/tip-card-style.js","../../overview-card-styles/src/tip-card-fluent-v2-style.js","../../overview-card-styles/src/top-change-card-style.js","../../overview-card-styles/src/top-location-card-style.js","../../overview-card-styles/src/top-location-card-fluent-v2-style.js","../../page-menu-container/src/campaign-page-menu-loader.js","../../page-menu-container/src/accounts-page-menu-loader.js","../../page-menu-container/src/bulk-operation-menu-loader.js","../../page-menu-container/src/business-data-page-menu-loader.js","../../page-menu-container/src/hotel-center-page-menu-loader.js","../../page-menu-container/src/hotel-center-v2-page-menu-loader.js","../../page-menu-container/src/merchant-center-page-menu-loader.js","../../page-menu-container/src/bid-strategies-menu-loader.js","../../page-menu-container/src/uet-tag-page-menu-loader.js","../../page-menu-container/src/asset-library-page-menu-loader.js","../../page-menu-container/src/page-menu-container.js","../../page-menu/src/common/page-item-helper.js","../../page-menu/src/styles/page-menu-item-styles.js","../../page-menu/src/components/landing-page-selector.js","../../page-menu/src/components/page-menu-item.js","../../page-menu/src/page-menu.js","../../page-menu/src/styles/page-menu-styles.js","../../page-menu/src/page-menu-with-default-landing-page.js","../../page-menu/src/detail-list-page-menu.js","../../page-menu/src/styles/page-menu-detail-list-styles.js","../../positive-keywords-data/src/columns-config.js","../../positive-keywords-data/src/filter-config.js","../../positive-keywords-data/src/data-fetch-config.js","../../positive-keywords-data/src/data-fetch-source.js","../../../../overview/packages/overview-cards-common/src/grid-entity-name-template.pug","../../../../overview/packages/overview-cards-common/src/top-changes-grid-template.pug","../../../../overview/packages/overview-device-card/src/metric/metric-picker-button-template.pug","../../../../overview/packages/overview-device-card/src/metric/template-v2.pug","../../../../overview/packages/overview-device-card/src/template.pug","../../../../overview/packages/overview-grid-card/src/content-template.pug","../../../../overview/packages/overview-grid-card/src/cover-template.pug","../../../../overview/packages/overview-grid-card/src/dropdown-template.pug","../../../../overview/packages/overview-grid-card/src/metric-picker-template.pug","../../../../overview/packages/overview-grid-card/src/performance-metric-header-template.pug","../../../../overview/packages/overview-grid-card/src/performance-metric-template.pug","../../../../overview/packages/overview-grid-card/src/placeholder-template.pug","../../../../overview/packages/overview-grid-card/src/search-term-operations/add-keyword-template.pug","../../../../overview/packages/overview-grid-card/src/template.pug","../../../../overview/packages/overview-metric-picker/src/button-template.pug","../../../../overview/packages/overview-metric-picker/src/dropdown-menu-template.pug","../../../../overview/packages/overview-metric-picker/src/template.pug","../../../../overview/packages/overview-panel/src/dashboard-page/dashboard-page-template.pug","../../../../overview/packages/overview-panel/src/dashboard/add-card/template-vnext.pug","../../../../overview/packages/overview-panel/src/dashboard/dashboard-template.pug","../../../../overview/packages/overview-panel/src/dashboard/footer-template.pug","../../../../overview/packages/overview-panel/src/dashboard/new-feature-template.pug","../../../../overview/packages/overview-panel/src/dashboard/new-tile-banner-template.pug","../../../../overview/packages/overview-panel/src/dashboard/too-many-accounts-warning.pug","../../../../overview/packages/overview-top-changes-card/src/metric-picker-button-template.pug","../../../../overview/packages/overview-top-changes-card/src/template.pug"],"sourcesContent":["const cardWelcomeTipsId = 'CardType-WelcomeTips';\r\nconst cardTopLocationsId = 'CardType-TopLocations';\r\nconst cardAssetPerformanceId = 'CardType-AssetPerformance';\r\nconst cardPerformanceId = 'CardType-Performance';\r\nconst cardDiagnosticId = 'CardType-Diagnostic';\r\nconst cardRecommendationsId = 'CardType-Recommendations';\r\nconst cardTopCampaignsId = 'CardType-TopCampaigns';\r\nconst cardTopAccountsId = 'CardType-TopAccounts';\r\nconst cardTopKeywordsId = 'CardType-TopKeyword';\r\nconst cardDeviceId = 'CardType-Device';\r\nconst cardSearchTermsId = 'CardType-TopSearchTerms';\r\nconst cardTopAdGroupsId = 'CardType-TopAdGroup';\r\nconst cardCompetitionId = 'CardType-Competition';\r\nconst cardConversionTrackingId = 'CardType-Conversion-Tracking';\r\nconst cardTopChangesAccountId = 'CardType-TopChanges-Account';\r\nconst cardTopChangesCampaignId = 'CardType-TopChanges-Campaign';\r\nconst cardTopChangesAdGroupId = 'CardType-TopChanges-AdGroup';\r\nconst cardNavigateToFullProductId = 'CardType-NavigateToFullProduct';\r\n\r\nexport {\r\n cardWelcomeTipsId,\r\n cardTopLocationsId,\r\n cardAssetPerformanceId,\r\n cardPerformanceId,\r\n cardDiagnosticId,\r\n cardRecommendationsId,\r\n cardTopCampaignsId,\r\n cardTopAccountsId,\r\n cardTopKeywordsId,\r\n cardDeviceId,\r\n cardSearchTermsId,\r\n cardTopAdGroupsId,\r\n cardCompetitionId,\r\n cardConversionTrackingId,\r\n cardTopChangesAccountId,\r\n cardTopChangesCampaignId,\r\n cardTopChangesAdGroupId,\r\n cardNavigateToFullProductId,\r\n};\r\n","import _ from 'underscore';\r\nimport { CampaignType as AccountLevelCampaignType } from '@bingads-webui-campaign/campaign-ui-common';\r\n\r\nconst CampaignLevelCampaignType = _.mapObject(AccountLevelCampaignType, (__, key) => key);\r\n\r\n// For card level preference, we should always use getCardPreferenceWithDefault to make sure we can fallback to default value\r\n// we now should only use this to try to get page level preference\r\nexport const getPreference = ({\r\n key,\r\n preference,\r\n}) => {\r\n // In fluent overview page, we always use user level preference, if we need to load legacy preference, we need add scope info\r\n // to figure out the correct preference level.\r\n const preferenceObj = preference.findByNameAtUserLevel(key);\r\n\r\n return _.get(preferenceObj, 'Data');\r\n};\r\n\r\nexport const getPreferencePatcher = ({\r\n key,\r\n preference,\r\n}) => (update) => {\r\n const preferenceData = getPreference({ key, preference });\r\n const newPreferenceData = {\r\n ...preferenceData,\r\n ...update,\r\n };\r\n\r\n preference.setAtUserLevel({\r\n Data: newPreferenceData,\r\n Name: key,\r\n });\r\n};\r\n\r\nfunction getPreferenceKeyPrefix({\r\n navigationLevel,\r\n campaignType,\r\n}) {\r\n let campaignTypeString = 'other';\r\n if (campaignType === CampaignLevelCampaignType.Hotel || campaignType === AccountLevelCampaignType.Hotel) {\r\n campaignTypeString = 'hotel';\r\n } else if (campaignType === CampaignLevelCampaignType.PerformanceMax || campaignType === AccountLevelCampaignType.PerformanceMax) {\r\n campaignTypeString = 'pmax';\r\n } else if (campaignType === CampaignLevelCampaignType.App || campaignType === AccountLevelCampaignType.App) {\r\n campaignTypeString = 'app';\r\n } else if (campaignType === CampaignLevelCampaignType.LinkedIn || campaignType === AccountLevelCampaignType.LinkedIn) {\r\n campaignTypeString = 'linkedin';\r\n }\r\n\r\n return `OverviewPage-${navigationLevel}-${campaignTypeString}`;\r\n}\r\n\r\nexport const getCardPreferenceKey = ({\r\n cardTypeId,\r\n navigationLevel,\r\n campaignType,\r\n}) => {\r\n const prefix = getPreferenceKeyPrefix({ navigationLevel, campaignType });\r\n\r\n return `${prefix}-${cardTypeId}`;\r\n};\r\n\r\nexport const getPagePreferenceKey = ({\r\n navigationLevel,\r\n campaignType,\r\n}) => {\r\n const prefix = getPreferenceKeyPrefix({ navigationLevel, campaignType });\r\n return `${prefix}-PageData`;\r\n};\r\n\r\n// This is not a pure function, we may need to clean up the preference store(set defualt value) if current preference is not valid\r\nexport const getCardPreferenceWithDefault = ({\r\n config,\r\n navigationLevel,\r\n campaignType,\r\n preference,\r\n permissions,\r\n}) => {\r\n const cardPreferenceKey = getCardPreferenceKey({\r\n cardTypeId: config.typeId,\r\n navigationLevel,\r\n campaignType,\r\n });\r\n let originCardPreference = getPreference({\r\n key: cardPreferenceKey,\r\n preference,\r\n });\r\n const defaultPreference = config.getDefaultPreference ? config.getDefaultPreference({\r\n permissions,\r\n }) : undefined;\r\n\r\n if (originCardPreference && _.isFunction(config.isPreferenceValid) && !config.isPreferenceValid({\r\n cardPreference: originCardPreference,\r\n permissions,\r\n campaignType,\r\n })) {\r\n originCardPreference = null;\r\n if (defaultPreference) {\r\n const patchPreference = getPreferencePatcher({\r\n key: cardPreferenceKey,\r\n preference,\r\n });\r\n patchPreference(defaultPreference);\r\n }\r\n }\r\n\r\n const cardPreference = (originCardPreference || defaultPreference)\r\n ? _.defaults(originCardPreference, defaultPreference)\r\n : undefined;\r\n\r\n return cardPreference;\r\n};\r\n\r\nexport const getCardPreferenceOptionsForDfm = ({\r\n config,\r\n navigationLevel,\r\n campaignType,\r\n preference,\r\n permissions,\r\n}) => {\r\n const cardPreference = getCardPreferenceWithDefault({\r\n config,\r\n navigationLevel,\r\n campaignType,\r\n preference,\r\n permissions,\r\n });\r\n\r\n let options = cardPreference;\r\n if (options && config.getDfmPreferenceObject) {\r\n options = config.getDfmPreferenceObject(cardPreference);\r\n }\r\n\r\n return {\r\n id: config.typeId,\r\n options,\r\n };\r\n};\r\n","import {\r\n allMetrics as metrics,\r\n metricToDisplayNameMap,\r\n defaultGridColumns,\r\n AccountsMode,\r\n} from '@bingads-webui-campaign/overview-cards-common';\r\n\r\nconst ComparisonValues = {\r\n PerformanceMetrics: 'PerformanceMetrics',\r\n PerformanceMetricsChange: 'PerformanceMetricsChange',\r\n PerformanceMetricsChangePercentage: 'PerformanceMetricsChangePercentage',\r\n};\r\n\r\nexport const getHeaderPropsFromPreferenceForPerformanceTable = ({\r\n cardPreference,\r\n patchPreference,\r\n i18n,\r\n dateRange,\r\n}) => {\r\n const initialSelectedValue = (cardPreference && cardPreference.selectedComparisonValue) || ComparisonValues.PerformanceMetrics;\r\n if (!dateRange.compared) {\r\n return { options: [], initialSelectedValue };\r\n }\r\n return ({\r\n options: [\r\n {\r\n value: ComparisonValues.PerformanceMetrics,\r\n displayName: i18n.getString(_TL_('Value')),\r\n },\r\n {\r\n value: ComparisonValues.PerformanceMetricsChange,\r\n displayName: i18n.getString(_TL_('Change')),\r\n },\r\n {\r\n value: ComparisonValues.PerformanceMetricsChangePercentage,\r\n displayName: i18n.getString(_TL_('Change %')),\r\n },\r\n ],\r\n initialSelectedValue,\r\n onOptionSelected: (value) => {\r\n patchPreference({\r\n selectedComparisonValue: value,\r\n });\r\n },\r\n });\r\n};\r\n\r\nexport const getTablePropsFromPreferenceForPerformanceTable = ({\r\n cardPreference,\r\n patchPreference,\r\n permissions,\r\n navigationLevel,\r\n i18n,\r\n campaignType,\r\n}) => {\r\n const selectedColumns = (cardPreference && cardPreference.selectedColumns) || defaultGridColumns;\r\n const allMetrics = metrics(permissions, AccountsMode.Expert, campaignType).map(metric => ({\r\n key: metric,\r\n displayName: i18n.getString(metricToDisplayNameMap[metric]),\r\n }));\r\n const initialSelectedMetrics = selectedColumns.map(column => allMetrics.find(metric => metric.key === column));\r\n return {\r\n initialSelectedMetrics,\r\n allMetrics,\r\n initialSortColumn: (cardPreference && cardPreference.sortColumn) || selectedColumns[0],\r\n initialSortDirection: (cardPreference && cardPreference.sortDirection) || 'descending',\r\n patchPreference,\r\n navigationLevel,\r\n campaignType,\r\n };\r\n};\r\n\r\nfunction isNullOrUndefined(value) {\r\n return value == null; // This covers both null and undefined\r\n}\r\n\r\nexport const isTablePreferenceValid = ({\r\n cardPreference,\r\n permissions,\r\n campaignType,\r\n}) => {\r\n const metricsKeys = metrics(permissions, AccountsMode.Expert, campaignType);\r\n if (!cardPreference\r\n || (!isNullOrUndefined(cardPreference.selectedColumns) && cardPreference.selectedColumns.length !== 3)\r\n || (!isNullOrUndefined(cardPreference.selectedColumns) && cardPreference.selectedColumns.some(column => !metricsKeys.includes(column)))\r\n || (!isNullOrUndefined(cardPreference.selectedComparisonValue) && !Object.values(ComparisonValues).includes(cardPreference.selectedComparisonValue))\r\n || (!isNullOrUndefined(cardPreference.sortColumn) && !metricsKeys.includes(cardPreference.sortColumn))\r\n || (!isNullOrUndefined(cardPreference.sortDirection) && (cardPreference.sortDirection !== 'descending' && cardPreference.sortDirection !== 'ascending'))\r\n ) {\r\n return false;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nexport const getDefaultPerformanceTablePreference = () => ({\r\n selectedColumns: defaultGridColumns,\r\n sortColumn: defaultGridColumns[0],\r\n sortDirection: 'descending',\r\n selectedComparisonValue: ComparisonValues.PerformanceMetrics,\r\n});\r\n\r\nexport const getDfmPreferenceObjectForPerformanceTable = cardPreference => ({\r\n columns: cardPreference.selectedColumns,\r\n orderby: cardPreference.sortColumn,\r\n direction: cardPreference.sortDirection === 'descending' ? -1 : 1,\r\n selectedMenuItem: cardPreference.selectedComparisonValue,\r\n});\r\n\r\n","import _ from 'underscore';\r\nimport { useMemo, useCallback, useState } from 'react';\r\n\r\nimport { CampaignType as AccountLevelCampaignType } from '@bingads-webui-campaign/campaign-ui-common';\r\n\r\nimport { getPreference, getPreferencePatcher, getPagePreferenceKey } from './preference-helper';\r\n\r\nconst CampaignLevelCampaignType = _.mapObject(AccountLevelCampaignType, (val, key) => key);\r\n\r\nfunction fetchDashboardId({\r\n preference, campaignType, navigationLevel, serverContext,\r\n}) {\r\n const name = 'default';\r\n const preferenceData = preference.findByNameAtUserLevel('AccountsOverviewAccountMode');\r\n if ((preferenceData && preferenceData.Data === 'smart') || serverContext.CurrentCustomer.HasExpertAccount === false) {\r\n return `${name}-${navigationLevel}-smart`;\r\n } else if (campaignType === CampaignLevelCampaignType.Hotel || campaignType === AccountLevelCampaignType.Hotel) {\r\n return `${name}-${navigationLevel}-hotel`;\r\n } else if (campaignType === CampaignLevelCampaignType.PerformanceMax || campaignType === AccountLevelCampaignType.PerformanceMax) {\r\n return `${name}-${navigationLevel}-performancemax`;\r\n } else if (campaignType === CampaignLevelCampaignType.App || campaignType === AccountLevelCampaignType.App) {\r\n return `${name}-${navigationLevel}-app`;\r\n }\r\n return `${name}-${navigationLevel}`;\r\n}\r\n\r\nfunction getLegacyPreference({\r\n preference, campaignType, navigationLevel, serverContext,\r\n}) {\r\n const prefs = navigationLevel === 'customer' ? preference.findByNameAtUserLevel('accountsDashboard/preferences') : preference.findByNameAtAccountLevel('dashboard/preferences');\r\n const dashboardId = fetchDashboardId({\r\n preference, campaignType, navigationLevel, serverContext,\r\n });\r\n return _.get(prefs, ['Data', dashboardId, 'cards']);\r\n}\r\n\r\nfunction getAvailableCardsConfigs({\r\n cardsConfigs,\r\n navigationLevel,\r\n campaignType,\r\n isSDK,\r\n}) {\r\n return _.filter(cardsConfigs, cardConfig => cardsConfigs.isValidForNavigationLevel(cardConfig, navigationLevel, campaignType, isSDK));\r\n}\r\n\r\nfunction getSelectedCardsConfigs({\r\n availableCardsConfigs,\r\n selectedCards,\r\n}) {\r\n if (_.isArray(selectedCards)) {\r\n return _.filter(availableCardsConfigs, cardConfig => !_.get(_.find(selectedCards, sc => sc.id === cardConfig.typeId), 'hidden'));\r\n }\r\n return availableCardsConfigs;\r\n}\r\n\r\nexport function getInitSelectedCardsConfig({\r\n preference,\r\n cardsConfigs,\r\n navigationLevel,\r\n campaignType,\r\n serverContext,\r\n isSDK,\r\n}) {\r\n const pagePreferenceKey = getPagePreferenceKey({\r\n navigationLevel,\r\n campaignType,\r\n });\r\n const pagePreference = getPreference({\r\n key: pagePreferenceKey,\r\n preference,\r\n }) || {};\r\n\r\n const legacyCardSelectionPreference = getLegacyPreference({\r\n preference, campaignType, navigationLevel, serverContext,\r\n });\r\n\r\n const selectedCards = pagePreference.selectedCards || legacyCardSelectionPreference;\r\n\r\n const availableCardsConfigs = getAvailableCardsConfigs({\r\n cardsConfigs,\r\n navigationLevel,\r\n campaignType,\r\n isSDK,\r\n });\r\n\r\n const selectedCardsConfigs = getSelectedCardsConfigs({\r\n availableCardsConfigs,\r\n selectedCards,\r\n });\r\n\r\n return selectedCardsConfigs;\r\n}\r\n\r\nexport const useSelectedCardsWithPreference = ({\r\n preference,\r\n cardsConfigs,\r\n navigationLevel,\r\n campaignType,\r\n serverContext,\r\n isLoadingWelcomeCardConfig,\r\n isSDK,\r\n}) => {\r\n const pagePreferenceKey = getPagePreferenceKey({\r\n navigationLevel,\r\n campaignType,\r\n });\r\n\r\n const pagePreference = useMemo(() => getPreference({\r\n key: pagePreferenceKey,\r\n preference,\r\n }) || {}, [pagePreferenceKey, preference]);\r\n\r\n const patchPagePreference = useMemo(() => getPreferencePatcher({\r\n key: pagePreferenceKey,\r\n preference,\r\n }), [pagePreferenceKey, preference]);\r\n\r\n const { selectedCards: initSelectedCards } = pagePreference;\r\n const legacyCardSelectionPreference = getLegacyPreference({\r\n preference, campaignType, navigationLevel, serverContext,\r\n });\r\n const [selectedCards, setSelectedCards] = useState(initSelectedCards || legacyCardSelectionPreference);\r\n\r\n const availableCardsConfigs = useMemo(\r\n () => getAvailableCardsConfigs({\r\n cardsConfigs,\r\n navigationLevel,\r\n campaignType,\r\n isSDK,\r\n }),\r\n [campaignType, cardsConfigs, navigationLevel, isSDK]\r\n );\r\n\r\n const selectedCardsConfigs = useMemo(() => getSelectedCardsConfigs({\r\n availableCardsConfigs,\r\n selectedCards,\r\n }), [availableCardsConfigs, selectedCards]);\r\n\r\n const cardSelectionCards = useMemo(() => {\r\n if (!_.isArray(selectedCards)) {\r\n return _.map(availableCardsConfigs, cardConfig => ({ id: cardConfig.typeId, hidden: false }));\r\n }\r\n return _.map(availableCardsConfigs, cardConfig => ({ id: cardConfig.typeId, hidden: _.get(_.find(selectedCards, sc => sc.id === cardConfig.typeId), 'hidden') }));\r\n }, [availableCardsConfigs, selectedCards]);\r\n\r\n const onCardSelectionSaved = useCallback((selectionToSave) => {\r\n patchPagePreference({ selectedCards: selectionToSave });\r\n setSelectedCards(selectionToSave);\r\n }, [patchPagePreference]);\r\n\r\n if (isLoadingWelcomeCardConfig) {\r\n return {\r\n selectedCardsConfigs: [],\r\n cardSelectionCards: [],\r\n onCardSelectionSaved: _.noop,\r\n };\r\n }\r\n\r\n return {\r\n selectedCardsConfigs,\r\n cardSelectionCards,\r\n onCardSelectionSaved,\r\n };\r\n};\r\n","import _ from 'underscore';\r\n\r\nimport { allMetrics, defaultMetrics, AccountsMode } from '@bingads-webui-campaign/overview-cards-common';\r\n\r\nconst validMetricIndexes = [0, 1, 2, 3];\r\nconst defaultSelectedMetricIndexes = [0, 1];\r\n\r\nexport const getDefaultPerformanceChartPreference = ({\r\n permissions,\r\n}) => ({\r\n selectedMetricIndexes: defaultSelectedMetricIndexes,\r\n metrics: defaultMetrics(permissions, 1),\r\n});\r\n\r\nexport const getPropsFromPreferenceForPerformanceChart = ({\r\n cardPreference,\r\n patchPreference,\r\n campaignType,\r\n}) => {\r\n const shellContentElement = document.querySelector('.app-shell-content');\r\n\r\n return {\r\n ...cardPreference,\r\n patchPreference,\r\n shellContentElement,\r\n campaignType,\r\n };\r\n};\r\n\r\nexport const isPerformanceChartPreferenceValid = ({\r\n cardPreference,\r\n permissions,\r\n campaignType,\r\n}) => {\r\n const availableMetricKeys = allMetrics(permissions, AccountsMode.Expert, campaignType);\r\n if (!cardPreference\r\n || !_.isArray(cardPreference.metrics)\r\n || _.some(cardPreference.metrics, metric => !availableMetricKeys.includes(metric))\r\n || cardPreference.metrics.length !== 4\r\n || !_.isArray(cardPreference.selectedMetricIndexes)\r\n || cardPreference.selectedMetricIndexes.length > 4\r\n || _.some(cardPreference.selectedMetricIndexes, index => !validMetricIndexes.includes(index))\r\n ) {\r\n return false;\r\n }\r\n\r\n return true;\r\n};\r\n","import _ from 'underscore';\r\n\r\nimport { TopChangesFilterOption } from '@bingads-webui-campaign/overview-cards-common';\r\n\r\nconst defaultSelectedMetric = 'Clicks';\r\n\r\nexport const getTopChangesAllMetrics = i18n => ([{\r\n key: 'Clicks',\r\n displayName: i18n.getString(_TL_('Clicks')),\r\n}, {\r\n key: 'Impressions',\r\n displayName: i18n.getString(_TL_('Impressions')),\r\n}, {\r\n key: 'CTR',\r\n displayName: i18n.getString(_TL_('CTR')),\r\n}, {\r\n key: 'Spend',\r\n displayName: i18n.getString(_TL_('Spend')),\r\n}, {\r\n key: 'AverageCPC',\r\n displayName: i18n.getString(_TL_('Avg. CPC')),\r\n}, {\r\n key: 'PartialConversionCPA',\r\n displayName: i18n.getString(_TL_('Conv.')),\r\n}, {\r\n key: 'PartialConversionRate',\r\n displayName: i18n.getString(_TL_('Conv. Rate')),\r\n}]);\r\n\r\nexport function getPropsForTopChanges({\r\n navigationLevel,\r\n cardPreference,\r\n patchPreference,\r\n i18n,\r\n campaignType,\r\n}) {\r\n const allMetrics = getTopChangesAllMetrics(i18n);\r\n let preferenceFromServer = _.get(cardPreference, 'metric');\r\n if (!_.isString(preferenceFromServer)\r\n || !allMetrics.some(metric => metric.key === preferenceFromServer)\r\n ) {\r\n preferenceFromServer = defaultSelectedMetric;\r\n }\r\n\r\n return {\r\n preferenceFromServer,\r\n patchPreference,\r\n navigationLevel,\r\n campaignType,\r\n };\r\n}\r\n\r\nexport const getHeaderPropsFromPreferenceForTopChanges = ({\r\n cardPreference,\r\n patchPreference,\r\n i18n,\r\n}) => ({\r\n options: [\r\n {\r\n value: TopChangesFilterOption.AllChanges,\r\n displayName: i18n.getString(_TL_('All changes')),\r\n },\r\n {\r\n value: TopChangesFilterOption.TopGainers,\r\n displayName: i18n.getString(_TL_('Top gainers')),\r\n },\r\n {\r\n value: TopChangesFilterOption.TopDecliners,\r\n displayName: i18n.getString(_TL_('Top decliners')),\r\n },\r\n {\r\n value: TopChangesFilterOption.Insights,\r\n displayName: i18n.getString(_TL_('Insights')),\r\n },\r\n ],\r\n initialSelectedValue: (cardPreference && cardPreference.filter) || TopChangesFilterOption.AllChanges,\r\n onOptionSelected: (value) => {\r\n patchPreference({\r\n filter: value,\r\n });\r\n },\r\n});\r\n\r\nexport const getDfmPreferenceObjectForTopChanges = cardPreference => ({\r\n metric: cardPreference.metric,\r\n selectedMenuItem: cardPreference.filter,\r\n});\r\n\r\nexport const getDefaultTopChangesPreference = () => ({\r\n filter: TopChangesFilterOption.AllChanges,\r\n metric: defaultSelectedMetric,\r\n});\r\n","import {\r\n allMetrics as metrics,\r\n metricToDisplayNameMap,\r\n defaultGridColumns,\r\n} from '@bingads-webui-campaign/overview-cards-common';\r\n\r\nexport const getTablePropsFromPreferenceForDevices = ({\r\n cardPreference,\r\n patchPreference,\r\n permissions,\r\n navigationLevel,\r\n campaignType,\r\n i18n,\r\n}) => {\r\n const selectedColumns = (cardPreference && cardPreference.selectedColumns) || defaultGridColumns;\r\n const allMetrics = metrics(permissions, 1, campaignType).map(metric => ({\r\n key: metric,\r\n displayName: i18n.getString(metricToDisplayNameMap[metric]),\r\n }));\r\n const initialSelectedMetrics = selectedColumns.map(column => allMetrics.find(metric => metric.key === column));\r\n\r\n return {\r\n initialSelectedMetrics,\r\n allMetrics,\r\n patchPreference,\r\n navigationLevel,\r\n campaignType,\r\n };\r\n};\r\n\r\nexport const isDevicePreferenceValid = ({\r\n cardPreference,\r\n permissions,\r\n campaignType,\r\n}) => {\r\n const metricsKeys = metrics(permissions, 1, campaignType);\r\n if (!cardPreference\r\n || cardPreference.selectedColumns.length !== 3\r\n || cardPreference.selectedColumns.some(column => !metricsKeys.includes(column))\r\n ) {\r\n return false;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nexport const getDefaultDevicePreference = () => ({\r\n selectedColumns: defaultGridColumns,\r\n});\r\n","import _ from 'underscore';\r\nimport { CampaignType as AccountLevelCampaignType } from '@bingads-webui-campaign/campaign-ui-common';\r\nimport { CardSize } from '@bingads-webui-campaign-react/overview-card-const';\r\nimport edm from '@bingads-webui-component-legacy/edm-campaign/index';\r\n\r\nimport {\r\n cardWelcomeTipsId,\r\n cardPerformanceId,\r\n cardDiagnosticId,\r\n cardAssetPerformanceId,\r\n cardRecommendationsId,\r\n cardTopCampaignsId,\r\n cardTopAccountsId,\r\n cardTopKeywordsId,\r\n cardDeviceId,\r\n cardSearchTermsId,\r\n cardCompetitionId,\r\n cardTopAdGroupsId,\r\n cardConversionTrackingId,\r\n cardTopLocationsId,\r\n cardTopChangesAccountId,\r\n cardTopChangesCampaignId,\r\n cardTopChangesAdGroupId,\r\n cardNavigateToFullProductId,\r\n} from '@bingads-webui-campaign/fluent-page-consts';\r\n\r\nimport {\r\n getDfmPreferenceObjectForPerformanceTable,\r\n getDefaultPerformanceTablePreference,\r\n isTablePreferenceValid,\r\n} from '../preference/card-preference/performance-table';\r\n\r\nimport {\r\n getDefaultPerformanceChartPreference,\r\n isPerformanceChartPreferenceValid,\r\n} from '../preference/card-preference/performance-chart';\r\n\r\nimport {\r\n getDfmPreferenceObjectForTopChanges,\r\n getDefaultTopChangesPreference,\r\n} from '../preference/card-preference/top-changes';\r\n\r\nimport {\r\n getDefaultDevicePreference,\r\n isDevicePreferenceValid,\r\n} from '../preference/card-preference/devices';\r\n\r\nconst CampaignLevelCampaignType = _.mapObject(AccountLevelCampaignType, (val, key) => key);\r\n\r\nfunction getCardOptions({\r\n navigationLevel,\r\n campaignType,\r\n isKeyword = false,\r\n isSearchTerm = false,\r\n}) {\r\n let edmLevel;\r\n let entitySet;\r\n let targetNagivationLevel = navigationLevel;\r\n let extraFilter;\r\n\r\n switch (navigationLevel) {\r\n case 'account':\r\n edmLevel = edm.currentAccount;\r\n entitySet = edmLevel.Campaigns;\r\n break;\r\n case 'campaign':\r\n // For PMax and App campaign, call campaigns on account level with filter by Campaign Id to include BI data for both AssetGroups and AdGroups before migration.\r\n if (campaignType === CampaignLevelCampaignType.PerformanceMax || campaignType === CampaignLevelCampaignType.App) {\r\n targetNagivationLevel = 'account';\r\n edmLevel = edm.currentAccount;\r\n entitySet = edmLevel.Campaigns;\r\n extraFilter = [{\r\n filter: {\r\n key: 'CampaignId',\r\n value: {\r\n query: {\r\n Id: _.result(edm.currentCampaign, ['navigation', 'key']),\r\n },\r\n },\r\n },\r\n }];\r\n } else {\r\n edmLevel = edm.currentCampaign;\r\n entitySet = edmLevel.AdGroups;\r\n }\r\n break;\r\n case 'customer':\r\n edmLevel = edm.currentCustomer;\r\n entitySet = edmLevel.Accounts;\r\n break;\r\n default:\r\n edmLevel = undefined;\r\n }\r\n\r\n if (isKeyword) {\r\n return {\r\n entitySet: edmLevel.Keywords,\r\n navigationLevel,\r\n };\r\n }\r\n\r\n if (isSearchTerm) {\r\n return {\r\n entitySet: edmLevel.SearchTerms,\r\n navigationLevel,\r\n };\r\n }\r\n\r\n return {\r\n entitySet,\r\n navigationLevel: targetNagivationLevel,\r\n extraFilter,\r\n };\r\n}\r\n\r\nfunction getCustomerLevelDataEntitySetOptions() {\r\n return getCardOptions({\r\n navigationLevel: 'customer',\r\n });\r\n}\r\n\r\nfunction getAccountLevelDataEntitySetOptions() {\r\n return getCardOptions({\r\n navigationLevel: 'account',\r\n });\r\n}\r\n\r\nfunction getTopKeywordCardOptions(navigationLevel) {\r\n return getCardOptions({\r\n navigationLevel,\r\n isKeyword: true,\r\n });\r\n}\r\n\r\nfunction getSearchTermCardOptions(navigationLevel) {\r\n return getCardOptions({\r\n navigationLevel,\r\n isSearchTerm: true,\r\n });\r\n}\r\n\r\nfunction getCampaignLevelDataEntitySetOptions() {\r\n return getCardOptions({\r\n navigationLevel: 'campaign',\r\n });\r\n}\r\n\r\nexport function getFluentCardsConfigs({ permissions, showWelcomeTips = false, isMobileAppCampaign = false }) {\r\n const audienceUnderspendShowTile = _.get(permissions, 'dynamic.AudienceUnderspendShowTile', false);\r\n\r\n const defaultHiddenCampaignTypes = [\r\n CampaignLevelCampaignType.None,\r\n CampaignLevelCampaignType.Default,\r\n CampaignLevelCampaignType.Shopping,\r\n CampaignLevelCampaignType.DynamicSearchAds,\r\n CampaignLevelCampaignType.Audience,\r\n CampaignLevelCampaignType.Smart,\r\n CampaignLevelCampaignType.Hotel,\r\n CampaignLevelCampaignType.App,\r\n CampaignLevelCampaignType.LinkedIn,\r\n ];\r\n\r\n const diagnosticCardDefaultHiddenCampaignTypesFiltered = audienceUnderspendShowTile ? _.without(defaultHiddenCampaignTypes, CampaignLevelCampaignType.Audience) : defaultHiddenCampaignTypes;\r\n const diagnosticCardForMobileAppCampaignsFiltered = diagnosticCardDefaultHiddenCampaignTypesFiltered.filter(type => type !== CampaignLevelCampaignType.App);\r\n\r\n const cardsConfig = showWelcomeTips ? [\r\n {\r\n validFor: ['account'],\r\n typeId: cardWelcomeTipsId,\r\n name: _TL_('Tips'),\r\n size: CardSize.Small,\r\n getEntitySetOptions: getCardOptions,\r\n enabled: true,\r\n },\r\n ] :\r\n // Order matters in this array, as this will be the default order of the cards in the dashboard\r\n // When we need to add a new config here, please refer to old overview page to get the correct position in this array\r\n // If we need to add a new card, please check with PM/Designer to get the correct position\r\n [\r\n {\r\n typeId: cardPerformanceId,\r\n name: _TL_('Performance'),\r\n size: CardSize.Large,\r\n dynamicHeightForNarrow: true,\r\n getEntitySetOptions: getCardOptions,\r\n getDefaultPreference: getDefaultPerformanceChartPreference,\r\n isPreferenceValid: isPerformanceChartPreferenceValid,\r\n enabled: true,\r\n },\r\n {\r\n typeId: cardRecommendationsId,\r\n hideForCampaignType: [\r\n AccountLevelCampaignType.Hotel,\r\n AccountLevelCampaignType.App,\r\n AccountLevelCampaignType.LinkedIn,\r\n AccountLevelCampaignType.PerformanceMax,\r\n CampaignLevelCampaignType.Hotel,\r\n CampaignLevelCampaignType.App,\r\n CampaignLevelCampaignType.LinkedIn,\r\n CampaignLevelCampaignType.PerformanceMax,\r\n ],\r\n name: _TL_('Recommendations'),\r\n size: CardSize.Small,\r\n getEntitySetOptions: getCardOptions,\r\n enabled: true,\r\n },\r\n {\r\n validFor: ['campaign'],\r\n typeId: cardDiagnosticId,\r\n hideForCampaignType: isMobileAppCampaign ? diagnosticCardForMobileAppCampaignsFiltered : diagnosticCardDefaultHiddenCampaignTypesFiltered,\r\n name: _TL_('Diagnostic'),\r\n size: CardSize.Large,\r\n dynamicHeightForNarrow: true,\r\n enabled: true,\r\n },\r\n {\r\n validFor: ['account'],\r\n typeId: cardTopCampaignsId,\r\n name: _TL_('Campaigns'),\r\n size: CardSize.Small,\r\n getEntitySetOptions: getAccountLevelDataEntitySetOptions,\r\n getDfmPreferenceObject: getDfmPreferenceObjectForPerformanceTable,\r\n getDefaultPreference: getDefaultPerformanceTablePreference,\r\n isPreferenceValid: isTablePreferenceValid,\r\n enabled: true,\r\n },\r\n {\r\n validFor: ['campaign'],\r\n typeId: cardTopAdGroupsId,\r\n hideForCampaignType: [\r\n CampaignLevelCampaignType.PerformanceMax,\r\n CampaignLevelCampaignType.App,\r\n CampaignLevelCampaignType.LinkedIn,\r\n CampaignLevelCampaignType.PerformanceMax,\r\n ],\r\n name: _TL_('Ad groups'),\r\n size: CardSize.Small,\r\n getEntitySetOptions: getCampaignLevelDataEntitySetOptions,\r\n // Ad group table will not have DFM, but we need it's preference to send out performance chart\r\n // aggregated data request, so we need to use getDfmPreferenceObject to convert new preference\r\n // so that data interface (processGridTileOptions, getColumnAndOrder) in\r\n // overview-cards-common/src/fetch.js can recognize it.\r\n getDfmPreferenceObject: getDfmPreferenceObjectForPerformanceTable,\r\n getDefaultPreference: getDefaultPerformanceTablePreference,\r\n isPreferenceValid: isTablePreferenceValid,\r\n enabled: true,\r\n },\r\n {\r\n validFor: ['customer'],\r\n typeId: cardTopChangesAccountId,\r\n name: _TL_('Top changes: Accounts'),\r\n getEntitySetOptions: getCustomerLevelDataEntitySetOptions,\r\n enabled: true,\r\n size: CardSize.Small,\r\n },\r\n {\r\n validFor: ['account'],\r\n typeId: cardTopChangesCampaignId,\r\n hideForCampaignType: [AccountLevelCampaignType.App],\r\n name: _TL_('Top changes: Campaigns'),\r\n getEntitySetOptions: getAccountLevelDataEntitySetOptions,\r\n getDfmPreferenceObject: getDfmPreferenceObjectForTopChanges,\r\n getDefaultPreference: getDefaultTopChangesPreference,\r\n enabled: true,\r\n size: CardSize.Small,\r\n },\r\n {\r\n validFor: ['campaign'],\r\n typeId: cardTopChangesAdGroupId,\r\n hideForCampaignType: [\r\n CampaignLevelCampaignType.PerformanceMax,\r\n CampaignLevelCampaignType.App,\r\n CampaignLevelCampaignType.LinkedIn,\r\n CampaignLevelCampaignType.PerformanceMax,\r\n ],\r\n name: _TL_('Top changes: Ad groups'),\r\n getEntitySetOptions: getCampaignLevelDataEntitySetOptions,\r\n enabled: true,\r\n size: CardSize.Small,\r\n },\r\n {\r\n validFor: ['customer'],\r\n typeId: cardTopAccountsId,\r\n name: _TL_('Accounts'),\r\n getEntitySetOptions: getCustomerLevelDataEntitySetOptions,\r\n getDfmPreferenceObject: getDfmPreferenceObjectForPerformanceTable,\r\n getDefaultPreference: getDefaultPerformanceTablePreference,\r\n isPreferenceValid: isTablePreferenceValid,\r\n enabled: true,\r\n size: CardSize.Small,\r\n },\r\n {\r\n validFor: ['account', 'campaign'],\r\n typeId: cardConversionTrackingId,\r\n hideForCampaignType: [\r\n AccountLevelCampaignType.App,\r\n CampaignLevelCampaignType.None,\r\n CampaignLevelCampaignType.Default,\r\n CampaignLevelCampaignType.Shopping,\r\n CampaignLevelCampaignType.DynamicSearchAds,\r\n CampaignLevelCampaignType.Audience,\r\n CampaignLevelCampaignType.Smart,\r\n CampaignLevelCampaignType.Hotel,\r\n CampaignLevelCampaignType.App,\r\n CampaignLevelCampaignType.LinkedIn,\r\n CampaignLevelCampaignType.PerformanceMax,\r\n ],\r\n hideForCampaignTypeSDK: [\r\n AccountLevelCampaignType.App,\r\n CampaignLevelCampaignType.None,\r\n CampaignLevelCampaignType.Default,\r\n CampaignLevelCampaignType.Shopping,\r\n CampaignLevelCampaignType.DynamicSearchAds,\r\n CampaignLevelCampaignType.Audience,\r\n CampaignLevelCampaignType.Smart,\r\n CampaignLevelCampaignType.Hotel,\r\n CampaignLevelCampaignType.App,\r\n CampaignLevelCampaignType.LinkedIn,\r\n ],\r\n name: _TL_('Conversion Tracking'),\r\n size: CardSize.Small,\r\n getEntitySetOptions: getAccountLevelDataEntitySetOptions,\r\n enabled: true,\r\n },\r\n {\r\n validFor: ['account', 'campaign'],\r\n typeId: cardTopKeywordsId,\r\n hideForCampaignType: [\r\n AccountLevelCampaignType.Hotel,\r\n AccountLevelCampaignType.PerformanceMax,\r\n AccountLevelCampaignType.App,\r\n AccountLevelCampaignType.LinkedIn,\r\n AccountLevelCampaignType.PerformanceMax,\r\n AccountLevelCampaignType.Audience,\r\n AccountLevelCampaignType.Shopping,\r\n CampaignLevelCampaignType.Hotel,\r\n CampaignLevelCampaignType.PerformanceMax,\r\n CampaignLevelCampaignType.App,\r\n CampaignLevelCampaignType.LinkedIn,\r\n CampaignLevelCampaignType.PerformanceMax,\r\n CampaignLevelCampaignType.Audience,\r\n CampaignLevelCampaignType.Shopping,\r\n ],\r\n name: _TL_('Keywords'),\r\n size: CardSize.Small,\r\n getEntitySetOptions: getTopKeywordCardOptions,\r\n getDfmPreferenceObject: getDfmPreferenceObjectForPerformanceTable,\r\n getDefaultPreference: getDefaultPerformanceTablePreference,\r\n isPreferenceValid: isTablePreferenceValid,\r\n enabled: true,\r\n },\r\n {\r\n validFor: ['account', 'campaign'],\r\n typeId: cardSearchTermsId,\r\n hideForCampaignType: [\r\n AccountLevelCampaignType.Hotel,\r\n AccountLevelCampaignType.PerformanceMax,\r\n AccountLevelCampaignType.App,\r\n AccountLevelCampaignType.LinkedIn,\r\n AccountLevelCampaignType.Audience,\r\n CampaignLevelCampaignType.Hotel,\r\n CampaignLevelCampaignType.PerformanceMax,\r\n CampaignLevelCampaignType.App,\r\n CampaignLevelCampaignType.LinkedIn,\r\n CampaignLevelCampaignType.Audience,\r\n ],\r\n name: _TL_('What people searched'),\r\n size: CardSize.Small,\r\n getEntitySetOptions: getSearchTermCardOptions,\r\n getDfmPreferenceObject: getDfmPreferenceObjectForPerformanceTable,\r\n getDefaultPreference: getDefaultPerformanceTablePreference,\r\n isPreferenceValid: isTablePreferenceValid,\r\n enabled: true,\r\n },\r\n {\r\n typeId: cardDeviceId,\r\n hideForCampaignType: [\r\n AccountLevelCampaignType.PerformanceMax,\r\n AccountLevelCampaignType.App,\r\n AccountLevelCampaignType.LinkedIn,\r\n CampaignLevelCampaignType.PerformanceMax,\r\n CampaignLevelCampaignType.App,\r\n CampaignLevelCampaignType.LinkedIn,\r\n ],\r\n name: _TL_('Devices'),\r\n size: CardSize.Small,\r\n getEntitySetOptions: getCardOptions,\r\n getDefaultPreference: getDefaultDevicePreference,\r\n isPreferenceValid: isDevicePreferenceValid,\r\n enabled: true,\r\n },\r\n {\r\n validFor: ['campaign'],\r\n typeId: cardTopLocationsId,\r\n hideForCampaignType: [\r\n CampaignLevelCampaignType.App,\r\n CampaignLevelCampaignType.LinkedIn,\r\n ],\r\n name: _TL_('Top Locations'),\r\n size: CardSize.Small,\r\n getEntitySetOptions: getCardOptions,\r\n enabled: true,\r\n },\r\n {\r\n validFor: ['campaign'],\r\n typeId: cardAssetPerformanceId,\r\n hideForCampaignType: isMobileAppCampaign ? defaultHiddenCampaignTypes.filter(type => type !== CampaignLevelCampaignType.App) : defaultHiddenCampaignTypes,\r\n name: _TL_('Asset Performance'),\r\n size: CardSize.Small,\r\n enabled: true,\r\n },\r\n {\r\n validFor: ['account', 'campaign'],\r\n typeId: cardCompetitionId,\r\n name: _TL_('Competition'),\r\n size: CardSize.Small,\r\n hideForCampaignType: [\r\n AccountLevelCampaignType.Hotel,\r\n AccountLevelCampaignType.PerformanceMax,\r\n AccountLevelCampaignType.App,\r\n AccountLevelCampaignType.LinkedIn,\r\n CampaignLevelCampaignType.Hotel,\r\n CampaignLevelCampaignType.PerformanceMax,\r\n CampaignLevelCampaignType.App,\r\n CampaignLevelCampaignType.LinkedIn,\r\n ],\r\n getEntitySetOptions: getCardOptions,\r\n enabled: true,\r\n },\r\n {\r\n validFor: ['campaign'],\r\n typeId: cardNavigateToFullProductId,\r\n name: _TL_(''),\r\n size: CardSize.Small,\r\n enabled: true,\r\n hideForCampaignType: [\r\n CampaignLevelCampaignType.None,\r\n CampaignLevelCampaignType.Default,\r\n CampaignLevelCampaignType.Shopping,\r\n CampaignLevelCampaignType.DynamicSearchAds,\r\n CampaignLevelCampaignType.Audience,\r\n CampaignLevelCampaignType.Smart,\r\n CampaignLevelCampaignType.Hotel,\r\n CampaignLevelCampaignType.App,\r\n CampaignLevelCampaignType.LinkedIn,\r\n CampaignLevelCampaignType.PerformanceMax,\r\n ],\r\n hideForCampaignTypeSDK: [\r\n CampaignLevelCampaignType.None,\r\n CampaignLevelCampaignType.Default,\r\n CampaignLevelCampaignType.Shopping,\r\n CampaignLevelCampaignType.DynamicSearchAds,\r\n CampaignLevelCampaignType.Audience,\r\n CampaignLevelCampaignType.Smart,\r\n CampaignLevelCampaignType.Hotel,\r\n CampaignLevelCampaignType.App,\r\n CampaignLevelCampaignType.LinkedIn,\r\n ],\r\n },\r\n ];\r\n\r\n cardsConfig.isValidForNavigationLevel = (cardConfig, navigationLevel, campaignType, isSDK = false) =>\r\n ((_.isFunction(cardConfig.enabled) && cardConfig.enabled()) ||\r\n (_.isBoolean(cardConfig.enabled) && cardConfig.enabled)) &&\r\n (!cardConfig.validFor || _.contains(cardConfig.validFor, navigationLevel)) &&\r\n (((!isSDK || !cardConfig.hideForCampaignTypeSDK) &&\r\n (!cardConfig.hideForCampaignType || !_.contains(cardConfig.hideForCampaignType, campaignType)))\r\n || (isSDK && cardConfig.hideForCampaignTypeSDK && !_.contains(cardConfig.hideForCampaignTypeSDK, campaignType)));\r\n\r\n return cardsConfig;\r\n}\r\n","import edm from '@bingads-webui-component-legacy/edm-campaign/index';\r\n\r\nexport const NavigationLevel = {\r\n Customer: 'customer',\r\n Account: 'account',\r\n Campaign: 'campaign',\r\n};\r\n\r\nexport function getNavigationLevel(scopeValues) {\r\n const {\r\n aid,\r\n campaignId,\r\n } = scopeValues;\r\n let result = NavigationLevel.Customer;\r\n if (campaignId) {\r\n result = NavigationLevel.Campaign;\r\n } else if (aid || edm.currentAccount) {\r\n result = NavigationLevel.Account;\r\n }\r\n\r\n return result;\r\n}\r\n","import { GetJsDataInfo } from '@bingads-webui-clientcenter/js-data-cc-rest-base';\r\n\r\nexport function getCcJsData({\r\n serverContext,\r\n}) {\r\n return GetJsDataInfo({\r\n cidFetcher: () => serverContext.CurrentCustomer.Id,\r\n uidFetcher: () => serverContext.CurrentUser.Id,\r\n willSupportCors: true,\r\n }, serverContext.Urls.ClientCenterBaseUrl, ['FeatureAdoptionCoupon']).jsDataCcRest;\r\n}\r\n","import _, { get } from 'underscore';\r\n\r\nimport { Constants } from '@bingads-webui-theme-2018/theme-fluent';\r\n\r\n// Global header + Shell status + Shell tab + Add/Remove tile button\r\nconst headerHeight = 60 + 56 + 58 + 50;\r\n// Shell nav + Shell scope panel\r\nconst sidebarWidth = 64 + 224;\r\nconst cardHeight = 389;\r\n\r\nexport const getResponsiveSize = containerWidth => _.chain(Constants.ResponsiveSizeBreakpoints)\r\n .filter(({ minWidth }) => containerWidth >= minWidth)\r\n .last()\r\n .get('name', 's')\r\n .value();\r\n\r\nexport const getResponsiveSizeBasedOnWindowSize = () => getResponsiveSize(window.innerWidth - sidebarWidth);\r\n\r\nconst getRowSize = () => Math.round((window.innerHeight - headerHeight) / cardHeight);\r\nconst getColumnSize = () => {\r\n const responsiveSize = getResponsiveSizeBasedOnWindowSize();\r\n if (responsiveSize === 'xxl') {\r\n return 3;\r\n } else if (responsiveSize === 'xl') {\r\n return 2;\r\n }\r\n return 1;\r\n};\r\n\r\nexport const getViewPortCardsCount = (selectedCardsConfig) => {\r\n const columnSize = getColumnSize();\r\n const responsiveSize = getResponsiveSizeBasedOnWindowSize();\r\n const selectedCardSize = selectedCardsConfig.length;\r\n\r\n let remainingRowSize = getRowSize();\r\n let remainingColumnSize = getColumnSize();\r\n for (let i = 0; i < selectedCardSize; i += 1) {\r\n const card = selectedCardsConfig[i];\r\n let cardSize = 1;\r\n if (card.size === 'large' && (responsiveSize === 'xxl' || responsiveSize === 'xl')) {\r\n cardSize = 2;\r\n }\r\n if (remainingColumnSize >= cardSize) {\r\n remainingColumnSize -= cardSize;\r\n } else {\r\n remainingRowSize -= 1;\r\n if (remainingRowSize <= 0) {\r\n return i;\r\n }\r\n remainingColumnSize = columnSize - cardSize;\r\n }\r\n }\r\n\r\n return selectedCardSize;\r\n};\r\n\r\nexport const isInViewPort = (cardIds, id, viewPortSize) => {\r\n const index = cardIds.indexOf(id);\r\n return index < viewPortSize && index >= 0;\r\n};\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport { levelAtConstant } from '@bingads-webui-campaign/scope-constants';\r\nimport {\r\n RecommendationService,\r\n CHANNEL_TYPES,\r\n getRecommendationIds,\r\n} from '@bingads-webui-campaign/recommendation-core';\r\nimport { edmCampaign } from '@bingads-webui/edm-campaign';\r\n\r\nconst RECOMMENDATION_SUMMARY_TOP_NUMBER = 5;\r\nlet p$Opportunities = null;\r\n\r\nexport function fetchTips({\r\n cid,\r\n aid,\r\n}) {\r\n if (!aid || !cid) {\r\n return Promise.resolve([]);\r\n }\r\n\r\n return edmCampaign\r\n .Customers\r\n .$withKey(cid)\r\n .Accounts\r\n .$withKey(aid)\r\n .Tips\r\n .get({\r\n top: 20,\r\n count: true,\r\n })\r\n .toPromise()\r\n .then(({ value }) => value);\r\n}\r\n\r\nconst schema = {\r\n scenario: [\r\n {\r\n name: 'loadRecommendationTile',\r\n value: 'LoadRecommendationTab',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'loadRecommendationTile',\r\n value: 'LoadRecommendationTile',\r\n },\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 },\r\n ],\r\n};\r\n\r\nexport function getScope({\r\n navigationLevel,\r\n legacyConfig,\r\n cid,\r\n aid,\r\n campaignId,\r\n}) {\r\n let levelAt;\r\n let entityIds;\r\n\r\n switch (navigationLevel) {\r\n case 'account':\r\n levelAt = levelAtConstant.ACCOUNT;\r\n entityIds = [aid];\r\n break;\r\n case 'campaign':\r\n levelAt = levelAtConstant.CAMPAIGN;\r\n entityIds = [campaignId];\r\n break;\r\n case 'customer':\r\n levelAt = levelAtConstant.CUSTOMER;\r\n entityIds = [cid];\r\n break;\r\n default:\r\n }\r\n\r\n const scope = {\r\n customerId: cid,\r\n accountId: aid,\r\n campaignId,\r\n campaignName: _.result(legacyConfig.get('CurrentCampaign'), 'Name'),\r\n token: legacyConfig.get('Token'),\r\n levelAt,\r\n entityIds,\r\n };\r\n\r\n return scope;\r\n}\r\n\r\nexport function fetchMCCOverviewRecommendations({\r\n entitySet,\r\n jsdata,\r\n permissions,\r\n}) {\r\n const isMCC = true;\r\n const multiAccountRecommendationParameters = {\r\n RecommendationTypes: getRecommendationIds(undefined, CHANNEL_TYPES.MCCOVERVIEW, permissions, isMCC),\r\n };\r\n\r\n const query = {\r\n entitySet: entitySet['Default.MultiAccountRecommendation'].$call({ multiAccountRecommendationParameters }).toJSON(),\r\n };\r\n\r\n return jsdata[entitySet.type.elementType.shortName].findAll({\r\n query,\r\n });\r\n}\r\n\r\nexport function fetchRecommendations({\r\n navigationLevel,\r\n featureInstrumentation,\r\n legacyConfig,\r\n permissions,\r\n serverContext,\r\n campaignType,\r\n ccJsData,\r\n cid,\r\n aid,\r\n campaignId,\r\n}) {\r\n if (p$Opportunities && navigationLevel === 'account') {\r\n return p$Opportunities;\r\n }\r\n\r\n const scope = getScope({\r\n navigationLevel,\r\n legacyConfig,\r\n cid,\r\n aid,\r\n campaignId,\r\n });\r\n\r\n if (!scope.accountId) {\r\n return Promise.resolve([]);\r\n }\r\n\r\n featureInstrumentation.addScenario(schema);\r\n const currentScenario = featureInstrumentation.loadRecommendationTile.create();\r\n const currentActivity = currentScenario.loadRecommendationTile.create();\r\n\r\n const dataService = new RecommendationService({\r\n scope,\r\n currentScenario,\r\n currentActivity,\r\n odataPath: legacyConfig.get('adinsight.odata.url'),\r\n permissions,\r\n lcid: serverContext.CurrentUser.LocaleID,\r\n ccJsData,\r\n channel: CHANNEL_TYPES.OVERVIEW,\r\n });\r\n\r\n const opportunities = dataService.getSummary({\r\n channel: CHANNEL_TYPES.OVERVIEW,\r\n campaignType,\r\n top: RECOMMENDATION_SUMMARY_TOP_NUMBER,\r\n ignoreCoupons: true,\r\n });\r\n\r\n if (navigationLevel === 'account') {\r\n p$Opportunities = opportunities;\r\n }\r\n\r\n return opportunities;\r\n}\r\n\r\nexport function clearRecommendationsCache() {\r\n p$Opportunities = null;\r\n}\r\n","import { fetchGridData } from '@bingads-webui-campaign/overview-cards-common';\r\n\r\nexport function fetchGridTileData({\r\n entitySet,\r\n filter,\r\n options,\r\n getCardsConfig,\r\n p$DateRange,\r\n jsdata,\r\n dateUtil,\r\n permissions,\r\n campaignType,\r\n}) {\r\n return p$DateRange.then(dateRange => fetchGridData({\r\n entitySet,\r\n dateRange,\r\n filter,\r\n options,\r\n jsdata,\r\n dateUtil,\r\n getCardsConfig,\r\n permissions,\r\n campaignType,\r\n }));\r\n}\r\n","import _ from 'underscore';\r\n\r\n// TODO: [yaoyao] Do we need to lazy load the data-fetch module based on preference data?\r\nimport { getAuctionInsightDataSource } from '@bingads-webui-campaign-legacy/dashboard-cards/competition-card/data-fetch';\r\nimport { fetchPerformanceTimeSeries } from '@bingads-webui-campaign-legacy/performance-graph/data-fetch';\r\nimport {\r\n fetchCoupons,\r\n fetchTopChanges,\r\n fetchAggregatedData,\r\n} from '@bingads-webui-campaign/overview-cards-common';\r\nimport edm from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport state from '@bingads-webui-component-legacy/state/index';\r\nimport dateUtil from '@bingads-webui-component-legacy/humanize/date';\r\n\r\nimport { setDFMCache, withDFMCache } from '@bingads-webui/dfm-cache';\r\nimport {\r\n // We only need to enable DFM for cards in account level page\r\n // Customer level and campaign level won't hit the code in this file\r\n cardPerformanceId, // need preference logic to enable DFM\r\n cardRecommendationsId,\r\n cardTopCampaignsId, // need preference logic to enable DFM\r\n cardTopKeywordsId, // need preference logic to enable DFM\r\n cardSearchTermsId, // need preference logic to enable DFM\r\n cardCompetitionId,\r\n cardDeviceId,\r\n cardConversionTrackingId, // preference is disabled for this card somehow\r\n cardTopChangesCampaignId, // need preference logic to enable DFM\r\n} from '@bingads-webui-campaign/fluent-page-consts';\r\n\r\nimport {\r\n getCardPreferenceWithDefault,\r\n getCardPreferenceOptionsForDfm,\r\n} from '../preference/preference-helper';\r\nimport { getDfmPreferenceObjectForPerformanceTable } from '../preference/card-preference/performance-table';\r\nimport { getInitSelectedCardsConfig } from '../preference/use-selected-cards-with-preference';\r\n\r\nimport { getFluentCardsConfigs } from '../cards-configs/fluent-card-configs';\r\n\r\nimport { getNavigationLevel } from '../helper/get-navigation-level';\r\nimport { getCcJsData } from '../helper/get-cc-jsdata';\r\nimport { isInViewPort, getViewPortCardsCount } from '../helper/get-responsive-size';\r\n\r\nimport {\r\n fetchRecommendations,\r\n fetchTips,\r\n} from '../data-fetch/recommendation-card';\r\nimport {\r\n fetchGridTileData,\r\n} from '../data-fetch/grid-data';\r\nimport {\r\n fetchConversionTrackingData,\r\n} from '../data-fetch/conversion-tracking';\r\n\r\nfunction getOptionsForCard({\r\n config,\r\n navigationLevel,\r\n campaignType,\r\n preference,\r\n getDfmPreferenceObject,\r\n permissions,\r\n}) {\r\n const cardPreference = getCardPreferenceWithDefault({\r\n config,\r\n navigationLevel,\r\n campaignType,\r\n preference,\r\n permissions,\r\n });\r\n\r\n let options = cardPreference;\r\n if (options && getDfmPreferenceObject) {\r\n options = getDfmPreferenceObject(cardPreference);\r\n }\r\n return options;\r\n}\r\n\r\nexport function fetchFluentOverviewTilesData({\r\n filter,\r\n campaignType,\r\n resolve,\r\n DateFilterState,\r\n preference,\r\n queryParam,\r\n serverContext,\r\n jsdata,\r\n permissions,\r\n legacyConfig,\r\n featureInstrumentation,\r\n}) {\r\n const {\r\n uid, cid, aid, campaignId, adGroupId,\r\n } = queryParam.values;\r\n const scope = {\r\n values: {\r\n uid, cid, aid, campaignId, adGroupId,\r\n },\r\n };\r\n const navigationLevel = getNavigationLevel(scope.values);\r\n const p$DateRange = new DateFilterState({ state }).p$State;\r\n const cardsConfigs = getFluentCardsConfigs({\r\n permissions,\r\n });\r\n\r\n const selectedCardsConfig = getInitSelectedCardsConfig({\r\n preference,\r\n cardsConfigs,\r\n navigationLevel,\r\n campaignType,\r\n serverContext,\r\n isSDK: false,\r\n });\r\n\r\n const cardIds = _.map(selectedCardsConfig, 'typeId');\r\n let viewPortCardSize = getViewPortCardsCount(selectedCardsConfig);\r\n const isPerformanceInViewPort = isInViewPort(cardIds, cardPerformanceId, viewPortCardSize);\r\n const isDeviceInViewPort = isInViewPort(cardIds, cardDeviceId, viewPortCardSize);\r\n const isRecommendationInViewPort = isInViewPort(cardIds, cardRecommendationsId, viewPortCardSize);\r\n const isTopCampaignsInViewPort = isInViewPort(cardIds, cardTopCampaignsId, viewPortCardSize);\r\n const isKeywordInViewPort = isInViewPort(cardIds, cardTopKeywordsId, viewPortCardSize);\r\n const isSearchTermInViewPort = isInViewPort(cardIds, cardSearchTermsId, viewPortCardSize);\r\n const isCompetitionInViewPort = isInViewPort(cardIds, cardCompetitionId, viewPortCardSize);\r\n const isConversionTrackingInViewPort = isInViewPort(cardIds, cardConversionTrackingId, viewPortCardSize);\r\n const isTopChangesCampaignInViewPort = isInViewPort(cardIds, cardTopChangesCampaignId, viewPortCardSize);\r\n\r\n const getCardsConfig = () => _.map(selectedCardsConfig, config => getCardPreferenceOptionsForDfm({\r\n config,\r\n navigationLevel,\r\n campaignType,\r\n preference,\r\n permissions,\r\n }));\r\n window.FluentOverviewPageDataFetchManagerCardsConfigObject = {\r\n config: getCardsConfig(),\r\n campaignType,\r\n viewPortCardSize,\r\n isKeywordInViewPort,\r\n isSearchTermInViewPort,\r\n innerHeight: window.innerHeight,\r\n innerWidth: window.innerWidth,\r\n };\r\n\r\n if (viewPortCardSize <= 0) {\r\n resolve();\r\n return;\r\n }\r\n\r\n const ccJsData = getCcJsData({\r\n serverContext,\r\n });\r\n\r\n const dfmDataFetchCallback = () => {\r\n viewPortCardSize -= 1;\r\n if (viewPortCardSize <= 0) {\r\n resolve();\r\n }\r\n };\r\n\r\n // current dfm logic is checking edm.currentAccount, we follow this logic here\r\n if (isPerformanceInViewPort && edm.currentAccount !== null) {\r\n p$DateRange\r\n .then((dateRange) => {\r\n const p$PerformanceAggregatedData = fetchAggregatedData({\r\n navigationLevel: 'account',\r\n entitySet: edm.currentAccount.Campaigns,\r\n dateRange,\r\n getCardsConfig,\r\n jsdata,\r\n filter,\r\n dateUtil,\r\n permissions,\r\n campaignType,\r\n });\r\n const p$PerformanceTimeSeries = fetchPerformanceTimeSeries({\r\n getCardsConfig,\r\n entitySet: edm.currentAccount.Campaigns,\r\n period: dateRange,\r\n filter,\r\n campaignType,\r\n });\r\n\r\n setDFMCache(`${cardPerformanceId}-aggregated-data`, p$PerformanceAggregatedData);\r\n setDFMCache(`${cardPerformanceId}-time-series`, p$PerformanceTimeSeries);\r\n\r\n dfmDataFetchCallback();\r\n });\r\n }\r\n\r\n if (isDeviceInViewPort && edm.currentAccount !== null) {\r\n p$DateRange\r\n .then((dateRange) => {\r\n const p$DeviceAggregatedData = fetchAggregatedData({\r\n navigationLevel: 'account',\r\n entitySet: edm.currentAccount.Campaigns,\r\n dateRange,\r\n getCardsConfig,\r\n jsdata,\r\n filter,\r\n dateUtil,\r\n permissions,\r\n campaignType,\r\n });\r\n\r\n setDFMCache(cardDeviceId, p$DeviceAggregatedData);\r\n\r\n dfmDataFetchCallback();\r\n });\r\n }\r\n\r\n if (isRecommendationInViewPort) {\r\n fetchCoupons({\r\n ccJsData,\r\n });\r\n fetchTips({\r\n aid,\r\n cid,\r\n });\r\n fetchRecommendations({\r\n navigationLevel,\r\n featureInstrumentation,\r\n legacyConfig,\r\n permissions,\r\n serverContext,\r\n campaignType,\r\n ccJsData,\r\n cid,\r\n aid,\r\n campaignId,\r\n });\r\n dfmDataFetchCallback();\r\n }\r\n\r\n if (isTopCampaignsInViewPort) {\r\n const config = selectedCardsConfig.find(c => c.typeId === cardTopCampaignsId);\r\n const options = getOptionsForCard({\r\n config,\r\n navigationLevel,\r\n campaignType,\r\n preference,\r\n getDfmPreferenceObject: getDfmPreferenceObjectForPerformanceTable,\r\n permissions,\r\n });\r\n\r\n const p$TopCampaigns = fetchGridTileData({\r\n entitySet: edm.currentAccount.Campaigns,\r\n filter,\r\n options,\r\n getCardsConfig,\r\n p$DateRange,\r\n jsdata,\r\n dateUtil,\r\n permissions,\r\n campaignType,\r\n });\r\n\r\n setDFMCache(cardTopCampaignsId, p$TopCampaigns);\r\n\r\n dfmDataFetchCallback();\r\n }\r\n\r\n if (isKeywordInViewPort) {\r\n const config = selectedCardsConfig.find(c => c.typeId === cardTopKeywordsId);\r\n const options = getOptionsForCard({\r\n config,\r\n navigationLevel,\r\n campaignType,\r\n preference,\r\n getDfmPreferenceObject: getDfmPreferenceObjectForPerformanceTable,\r\n permissions,\r\n });\r\n\r\n const p$TopAccountKeyword = fetchGridTileData({\r\n entitySet: edm.currentAccount.Keywords,\r\n filter,\r\n options,\r\n p$DateRange,\r\n jsdata,\r\n dateUtil,\r\n permissions,\r\n campaignType,\r\n });\r\n\r\n setDFMCache(cardTopKeywordsId, p$TopAccountKeyword);\r\n\r\n dfmDataFetchCallback();\r\n }\r\n\r\n if (isSearchTermInViewPort) {\r\n const config = selectedCardsConfig.find(c => c.typeId === cardSearchTermsId);\r\n const options = getOptionsForCard({\r\n config,\r\n navigationLevel,\r\n campaignType,\r\n preference,\r\n getDfmPreferenceObject: getDfmPreferenceObjectForPerformanceTable,\r\n permissions,\r\n });\r\n\r\n const p$TopAccountSearchTerms = fetchGridTileData({\r\n entitySet: edm.currentAccount.SearchTerms,\r\n filter,\r\n options,\r\n p$DateRange,\r\n jsdata,\r\n dateUtil,\r\n permissions,\r\n campaignType,\r\n });\r\n\r\n setDFMCache(cardSearchTermsId, p$TopAccountSearchTerms);\r\n\r\n dfmDataFetchCallback();\r\n }\r\n\r\n if (isCompetitionInViewPort) {\r\n const dataSource = getAuctionInsightDataSource();\r\n\r\n const p$CompetitionTile = dataSource.query();\r\n\r\n dataSource.query = withDFMCache(dataSource.query, cardCompetitionId);\r\n\r\n setDFMCache(cardCompetitionId, p$CompetitionTile);\r\n\r\n dfmDataFetchCallback();\r\n }\r\n\r\n if (isConversionTrackingInViewPort) {\r\n fetchCoupons({\r\n ccJsData,\r\n });\r\n\r\n const p$ConversionTracking = fetchConversionTrackingData({\r\n entitySet: edm.currentAccount.Campaigns,\r\n filter,\r\n getCardsConfig,\r\n p$DateRange,\r\n jsdata,\r\n dateUtil,\r\n permissions,\r\n campaignType,\r\n });\r\n\r\n setDFMCache(cardConversionTrackingId, p$ConversionTracking);\r\n\r\n dfmDataFetchCallback();\r\n }\r\n\r\n if (isTopChangesCampaignInViewPort) {\r\n p$DateRange.then((dateRange) => {\r\n const p$TopChangesCampaign = fetchTopChanges({\r\n entitySet: edm.currentAccount.Campaigns,\r\n dateRange,\r\n filter,\r\n jsdata,\r\n dateUtil,\r\n getCardsConfig,\r\n permissions,\r\n campaignType,\r\n });\r\n\r\n setDFMCache(cardTopChangesCampaignId, p$TopChangesCampaign);\r\n\r\n dfmDataFetchCallback();\r\n });\r\n }\r\n}\r\n","import { fetchConversionTracking } from '@bingads-webui-campaign/overview-cards-common';\r\n\r\nexport function fetchConversionTrackingData({\r\n entitySet,\r\n // we are not using this info in current conversion tracking card, maybe we shoud add it back?\r\n // metric,\r\n // selectedMenuItem,\r\n getCardsConfig,\r\n filter,\r\n p$DateRange,\r\n jsdata,\r\n dateUtil,\r\n permissions,\r\n campaignType,\r\n}) {\r\n return p$DateRange.then(dateRange => fetchConversionTracking({\r\n entitySet,\r\n dateRange,\r\n // we are not using this info in current conversion tracking card, maybe we shoud add it back?\r\n // metric,\r\n // selectedMenuItem,\r\n jsdata,\r\n dateUtil,\r\n getCardsConfig,\r\n filter,\r\n permissions,\r\n campaignType,\r\n }));\r\n}\r\n","import _ from 'underscore';\r\n\r\nimport { METRIC_OPTIONS } from '@bingads-webui-campaign-react/top-locations-card-const';\r\n\r\n\r\nexport const getPropsFromPreferenceForTopLocations = ({\r\n cardPreference,\r\n patchPreference,\r\n campaignType,\r\n}) => {\r\n let preferenceFromServer = _.get(cardPreference, 'metric');\r\n if (!_.isString(preferenceFromServer)\r\n || !METRIC_OPTIONS.includes(preferenceFromServer)\r\n ) {\r\n preferenceFromServer = _.first(METRIC_OPTIONS);\r\n }\r\n\r\n return {\r\n preferenceFromServer,\r\n patchPreference,\r\n campaignType,\r\n };\r\n};\r\n","import _ from 'underscore';\r\n\r\nimport { ConversionFilterOption } from '@bingads-webui-campaign/overview-cards-common';\r\n\r\nexport function getPropsFromPreferenceForConversionTracking({\r\n preferenceService,\r\n responsiveSize,\r\n campaignType,\r\n}) {\r\n return {\r\n preferenceService,\r\n responsiveSize,\r\n campaignType,\r\n };\r\n}\r\n\r\nexport function getHeaderPropsFromPreferenceForConversionTracking({\r\n i18n,\r\n}) {\r\n return ({\r\n options: [\r\n {\r\n value: ConversionFilterOption.AllChanges,\r\n displayName: i18n.getString(_TL_('All changes')),\r\n },\r\n {\r\n value: ConversionFilterOption.TopGainers,\r\n displayName: i18n.getString(_TL_('Top gainers')),\r\n },\r\n {\r\n value: ConversionFilterOption.TopDecliners,\r\n displayName: i18n.getString(_TL_('Top decliners')),\r\n },\r\n ],\r\n initialSelectedValue: ConversionFilterOption.AllChanges,\r\n // we are not using preference in conversion tracking card now.\r\n onOptionSelected: _.noop,\r\n });\r\n}\r\n","export function getPropsForRecommendations({\r\n navigationLevel,\r\n campaignType,\r\n}) {\r\n return {\r\n navigationLevel,\r\n campaignType,\r\n };\r\n}\r\n","import _ from 'underscore';\r\n\r\nfunction getPreferenceDataObj(preference, preferenceName) {\r\n const preferenceObj = preference.findByNameAtAccountLevel(preferenceName);\r\n\r\n return _.get(preferenceObj, 'Data');\r\n}\r\n\r\nexport function getPreferenceForDashboard({ preference, preferenceName, dashboardPreferenceKey }) {\r\n const preferenceDataObj = getPreferenceDataObj(preference, preferenceName);\r\n\r\n if (_.has(preferenceDataObj, dashboardPreferenceKey)) {\r\n return preferenceDataObj[dashboardPreferenceKey];\r\n }\r\n\r\n return null;\r\n}\r\n\r\nfunction getCardPreference(dashboardPreferenceObj, cardId) {\r\n if (dashboardPreferenceObj && _.has(dashboardPreferenceObj, 'cards')) {\r\n const cardPref = _.find(dashboardPreferenceObj.cards, card => card.id === cardId);\r\n return cardPref;\r\n }\r\n\r\n return null;\r\n}\r\n\r\nexport function getCardPreferenceOptions(dashboardPreferenceObj, cardId) {\r\n const cardPreference = getCardPreference(dashboardPreferenceObj, cardId);\r\n\r\n return _.get(cardPreference, 'options');\r\n}\r\n\r\nexport function setPreferenceForCard({\r\n preference,\r\n preferenceName,\r\n dashboardPreferenceKey,\r\n cardId,\r\n cardOptions,\r\n}) {\r\n const preferenceForDashboard = getPreferenceForDashboard({ preference, preferenceName, dashboardPreferenceKey });\r\n const preferenceForCard = getCardPreference(preferenceForDashboard, cardId);\r\n const cards = _.get(preferenceForDashboard, 'cards', []);\r\n let newCards = [];\r\n\r\n if (!preferenceForCard) {\r\n newCards = [...cards, { id: cardId, options: cardOptions }];\r\n } else {\r\n newCards = _.map(cards, (card) => {\r\n if (card.id === cardId) {\r\n return {\r\n ...card,\r\n options: cardOptions,\r\n };\r\n }\r\n\r\n return card;\r\n });\r\n }\r\n\r\n const newPreferenceForDashboard = {\r\n ...preferenceForDashboard,\r\n cards: newCards,\r\n };\r\n\r\n const preferenceDataObj = getPreferenceDataObj(preference, preferenceName);\r\n\r\n const newPreferenceDataObj = {\r\n ...preferenceDataObj,\r\n [dashboardPreferenceKey]: newPreferenceForDashboard,\r\n };\r\n\r\n preference.setAtAccountLevel({\r\n Data: newPreferenceDataObj,\r\n Name: preferenceName,\r\n });\r\n}\r\n","import React from 'react';\r\n\r\nexport function useIsPreferenceInitialized(preference) {\r\n const [isInitialized, setIsInitialized] = React.useState(false);\r\n\r\n React.useEffect(() => {\r\n preference.initialize().then(() => {\r\n setIsInitialized(true);\r\n });\r\n }, [preference]);\r\n\r\n return isInitialized;\r\n}\r\n","import _ from 'underscore';\r\n\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\nimport { DeterministicView, helpers } from '@bingads-webui/deterministic-view';\r\n\r\n/* @this BaseCard */\r\nfunction cardReady() {\r\n if (!this.perfMarkerCompleted) {\r\n this.unblockCard();\r\n this.perfMarker.done({ IsCardInViewPort: this.isInViewPort === true });\r\n this.perfMarkerCompleted = true;\r\n this.trigger('cardReady', this.typeId);\r\n if (this.onCardReady) {\r\n this.onCardReady(this.typeId);\r\n }\r\n }\r\n}\r\n\r\nlet i18n;\r\nlet eventDispatcher;\r\n\r\nexport class BaseCard extends DeterministicView {\r\n constructor(options) {\r\n i18n = options.deps.i18n; // eslint-disable-line\r\n eventDispatcher = options.deps.eventDispatcher; // eslint-disable-line\r\n super(_.extend({}, options, { renderInSync: true }));\r\n this.deps = options.deps;\r\n this.container = options.container;\r\n this.typeId = options.typeId;\r\n this.isInViewPort = options.isInViewPort;\r\n this.onCardReady = options.onCardReady;\r\n this.initPerfMarker(options);\r\n\r\n this.on('attached', () => {\r\n this.attached = true;\r\n if (this.finishedRender) {\r\n cardReady.call(this);\r\n } else {\r\n this.blockCard();\r\n }\r\n });\r\n }\r\n\r\n initPerfMarker({ perfMarker, name }) {\r\n if (!this.perfMarker) {\r\n this.perfMarker = perfMarker.createChild(name);\r\n this.perfMarker.willInit();\r\n this.perfMarkerCompleted = false;\r\n }\r\n }\r\n\r\n willRenderWithData() {\r\n if (!this.perfMarkerCompleted) {\r\n this.perfMarker.willRender();\r\n }\r\n }\r\n\r\n willFetchData() {\r\n if (!this.perfMarkerCompleted) {\r\n this.perfMarker.willFetchData();\r\n }\r\n }\r\n\r\n renderedWithData() {\r\n this.finishedRender = true;\r\n if (this.attached) {\r\n cardReady.call(this);\r\n }\r\n }\r\n\r\n blockCard(el = this.el) {\r\n if (!this.unblock) {\r\n if (document.documentElement.contains(el)) {\r\n this.unblock = withUiBlock(el, i18n.getString('Loading'), true, undefined, 10);\r\n } else if (document.documentElement.contains(_.first(this.container))) {\r\n this.unblock = withUiBlock(this.container, i18n.getString('Loading'), true, undefined, 10);\r\n }\r\n }\r\n }\r\n\r\n isSmartShoppingCampaign() {\r\n const { currentCampaign } = this.options;\r\n return currentCampaign && (currentCampaign.CampaignSubType === 12 || currentCampaign.CampaignSubType === 'ShoppingSmartAds');\r\n }\r\n\r\n unblockCard() {\r\n if (this.unblock) {\r\n this.unblock();\r\n this.unblock = null;\r\n }\r\n }\r\n\r\n updateState(patch) {\r\n if (patch.requestingHelp) {\r\n this.$('.hiddenHelpBridge')[0].click();\r\n }\r\n return helpers.updateView(this, patch);\r\n }\r\n\r\n onResize(callback) {\r\n this.windowResizeHandler = _.throttle(callback, 100);\r\n this.wunderbarCallback = callback;\r\n window.addEventListener('resize', this.windowResizeHandler);\r\n eventDispatcher.on('wunderbar.collapsed', this.wunderbarCallback);\r\n eventDispatcher.on('wunderbar.expanded', this.wunderbarCallback);\r\n }\r\n\r\n remove() {\r\n if (this.windowResizeHandler) {\r\n window.removeEventListener('resize', this.windowResizeHandler);\r\n }\r\n\r\n if (this.wunderbarCallback) {\r\n eventDispatcher.off('wunderbar.collapsed', this.wunderbarCallback);\r\n eventDispatcher.off('wunderbar.expanded', this.wunderbarCallback);\r\n }\r\n\r\n this.unblockCard();\r\n\r\n super.remove();\r\n }\r\n}\r\n","export const TopChangesFilterOption = {\r\n AllChanges: 'AllChanges',\r\n TopDecliners: 'TopDecliners',\r\n TopGainers: 'TopGainers',\r\n Insights: 'Insights',\r\n};\r\n\r\nexport const TopChangesFilterSortOptionMap = {\r\n [TopChangesFilterOption.AllChanges]: 'Absolute',\r\n [TopChangesFilterOption.TopGainers]: 'Gain',\r\n [TopChangesFilterOption.TopDecliners]: 'Decline',\r\n [TopChangesFilterOption.Insights]: 'Insight',\r\n};\r\n\r\nexport const AccountsMode = {\r\n Smart: 0,\r\n Expert: 1,\r\n};\r\n\r\nexport const ConversionFilterOption = {\r\n AllChanges: 'AllChanges',\r\n TopDecliners: 'TopDecliners',\r\n TopGainers: 'TopGainers',\r\n};\r\n\r\nexport const ConversionFilterSortOptionMap = {\r\n AllChanges: 'Absolute',\r\n TopGainers: 'Gain',\r\n TopDecliners: 'Decline',\r\n};\r\n","import _ from 'underscore';\r\nimport $ from 'jquery';\r\nimport { AccountUtils } from '@bingads-webui-clientcenter/entity-utils';\r\n\r\nimport { AccountsMode } from './constants';\r\n\r\nexport const changeEvents = (...attributes) => _.map(attributes, attr => `change:${attr}`).join(' ');\r\n\r\nexport function formatDate(date) {\r\n const year = date.getFullYear();\r\n const month = (date.getMonth() + 1).toString().padStart(2, '0');\r\n const day = date.getDate().toString().padStart(2, '0');\r\n return `${year}-${month}-${day}`;\r\n}\r\n\r\nexport function getFilteredTotalsMetrics({\r\n data,\r\n metric,\r\n}) {\r\n if (data.raw) {\r\n const filteredTotals = data.raw['@ns.filtered.totals'];\r\n\r\n if (filteredTotals && filteredTotals[metric]) {\r\n return filteredTotals[metric];\r\n }\r\n\r\n const unfilteredTotals = data.raw['@ns.unfiltered.totals'];\r\n\r\n if (unfilteredTotals && unfilteredTotals[metric]) {\r\n return unfilteredTotals[metric];\r\n }\r\n } else if (data.OverallTotals) {\r\n if (data.DeviceSegmentedPerformanceData && data.DeviceSegmentedPerformanceData[metric]) {\r\n // eslint-disable-next-line no-param-reassign\r\n data.OverallTotals[metric] = _.extend(\r\n {},\r\n data.OverallTotals[metric],\r\n {\r\n SegmentedData: data.DeviceSegmentedPerformanceData[metric].SegmentedData,\r\n }\r\n );\r\n }\r\n return data.OverallTotals[metric];\r\n }\r\n\r\n return null;\r\n}\r\n\r\nfunction upperLevelNavigation(entitySet) {\r\n return entitySet.navigation.source.navigation;\r\n}\r\n\r\nexport function coerceStatus(status, AccountInactiveReasons) {\r\n if (AccountInactiveReasons) {\r\n const {\r\n activityStatus,\r\n } = AccountUtils;\r\n return activityStatus({ AccountInactiveReasons });\r\n }\r\n\r\n // Here we are coercing status for both Campaigns and Adgroups for status template.\r\n // This must match what we do in Campaign and Ad-group grid.\r\n // So we are showing 'CampaignUserPaused', 'CampaignBudgetPaused' and 'CampaignBudgetUserPaused'\r\n // as active for adgroups.\r\n if (_.contains([\r\n 'UserPaused',\r\n 'BudgetUserPaused',\r\n ], status)) {\r\n return 'Paused';\r\n }\r\n\r\n return status;\r\n}\r\n\r\nexport function entityHash({\r\n id,\r\n typeName,\r\n entitySet,\r\n navigationLevel,\r\n adGroup,\r\n campaign,\r\n isSmartCampaign,\r\n status,\r\n pageContext,\r\n legacyRouter,\r\n}) {\r\n let hash;\r\n const {\r\n CurrentUser: {\r\n Id: uid,\r\n },\r\n CurrentCustomer: {\r\n Id: cid,\r\n },\r\n CurrentAccount: {\r\n Id: aid,\r\n },\r\n } = pageContext;\r\n\r\n switch (typeName) {\r\n case 'Account':\r\n // eslint-disable-next-line camelcase\r\n hash = legacyRouter.getRouteUrl('account_$summary', { account_id: id });\r\n break;\r\n case 'Campaign':\r\n if (isSmartCampaign) {\r\n if (status === 'InProgress') {\r\n hash = `/Campaign/Smart?uid=${uid}&aid=${aid}&cid=${cid}#/CreateCampaign/${id}`;\r\n } else {\r\n hash = `/Campaign/Smart?uid=${uid}&aid=${aid}&cid=${cid}#/campaign/${id}`;\r\n }\r\n } else {\r\n // eslint-disable-next-line camelcase\r\n hash = legacyRouter.getRouteUrl('campaign_$summary', { campaign_id: id });\r\n }\r\n break;\r\n case 'AdGroup':\r\n // eslint-disable-next-line camelcase\r\n hash = legacyRouter.getRouteUrl('adgroup_$summary', {\r\n campaign_id: upperLevelNavigation(entitySet).key,\r\n adgroup_id: id,\r\n });\r\n break;\r\n case 'Keyword':\r\n if (navigationLevel === 'account') {\r\n hash = legacyRouter.getRouteUrl('keyword');\r\n } else {\r\n // eslint-disable-next-line camelcase\r\n hash = legacyRouter.getRouteUrl('adgroup_keyword', { campaign_id: campaign.Id, adgroup_id: adGroup.Id });\r\n }\r\n break;\r\n case 'SearchTerm':\r\n if (navigationLevel === 'account') {\r\n hash = legacyRouter.getRouteUrl('keyword_search_term');\r\n } else {\r\n // eslint-disable-next-line camelcase\r\n hash = legacyRouter.getRouteUrl('campaign_keyword_search_term', { campaign_id: campaign.Id });\r\n }\r\n break;\r\n default:\r\n hash = '';\r\n }\r\n\r\n return hash;\r\n}\r\n\r\nexport function getEntityIds({\r\n typeName,\r\n id,\r\n entitySet,\r\n campaign,\r\n adGroup,\r\n}) {\r\n let campaignId = '';\r\n let adgroupId = '';\r\n let accountId = '';\r\n\r\n switch (typeName) {\r\n case 'Account':\r\n accountId = id;\r\n break;\r\n case 'Campaign':\r\n campaignId = id;\r\n break;\r\n case 'AdGroup':\r\n adgroupId = id;\r\n campaignId = upperLevelNavigation(entitySet).key;\r\n break;\r\n case 'Keyword':\r\n case 'SearchTerm':\r\n campaignId = campaign.Id;\r\n adgroupId = adGroup.Id;\r\n break;\r\n default:\r\n }\r\n\r\n return {\r\n campaignId,\r\n adgroupId,\r\n accountId,\r\n };\r\n}\r\n\r\nfunction saveToFilterStorage({\r\n entityType,\r\n text,\r\n createEditableFilterStorage,\r\n}) {\r\n const filterStorage = createEditableFilterStorage(entityType);\r\n\r\n filterStorage.save({\r\n id: null,\r\n name: null,\r\n query: {\r\n Text: {\r\n $eq: text,\r\n },\r\n },\r\n });\r\n}\r\n\r\nexport function navigateToEntity({\r\n event,\r\n pageContext,\r\n legacyRouter,\r\n createEditableFilterStorage,\r\n instrumentation,\r\n constants,\r\n cardType,\r\n}) {\r\n const typeName = $(event.currentTarget).data('type');\r\n const navigationLevel = $(event.currentTarget).data('navigationlevel');\r\n\r\n instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, cardType, `${navigationLevel} level ${typeName} type entity link clicked.`);\r\n\r\n if (event && (event.button !== 0 ||\r\n event.ctrlKey ||\r\n event.shiftKey ||\r\n event.altKey ||\r\n event.metaKey)) {\r\n return true;\r\n }\r\n const campaignId = $(event.currentTarget).data('campaignid');\r\n const adgroupId = $(event.currentTarget).data('adgroupid');\r\n const text = $(event.currentTarget).data('text');\r\n const campaignType = $(event.currentTarget).data('campaigntype');\r\n const rawStatus = $(event.currentTarget).data('rawstatus');\r\n const {\r\n CurrentCustomer: {\r\n Id: cid,\r\n },\r\n CurrentUser: {\r\n Id: uid,\r\n },\r\n } = pageContext;\r\n let returnValue = false;\r\n\r\n switch (typeName) {\r\n case 'Account': {\r\n const accountId = $(event.currentTarget).data('accountid');\r\n // eslint-disable-next-line camelcase\r\n window.location.href = legacyRouter.getRouteUrl('account_$summary', { account_id: accountId });\r\n break;\r\n }\r\n case 'Campaign': {\r\n const {\r\n CurrentAccount: {\r\n Id: aid,\r\n },\r\n } = pageContext;\r\n if (campaignType === 'Smart') {\r\n if (rawStatus === 'InProgress') {\r\n window.location.href = `/Campaign/Smart?uid=${uid}&cid=${cid}&aid=${aid}#/CreateCampaign/${campaignId}`;\r\n } else {\r\n window.location.href = `/Campaign/Smart?uid=${uid}&cid=${cid}&aid=${aid}#/campaign/${campaignId}`;\r\n }\r\n } else {\r\n // eslint-disable-next-line camelcase\r\n legacyRouter.navigateToRoute('campaign_$summary', { campaign_id: campaignId });\r\n }\r\n break;\r\n }\r\n case 'AdGroup':\r\n // eslint-disable-next-line camelcase\r\n legacyRouter.navigateToRoute('adgroup_$summary', { campaign_id: campaignId, adgroup_id: adgroupId });\r\n break;\r\n case 'Keyword':\r\n saveToFilterStorage({\r\n entityType: 'keyword',\r\n text,\r\n createEditableFilterStorage,\r\n });\r\n if (navigationLevel === 'account') {\r\n legacyRouter.navigateToRoute('keyword');\r\n } else {\r\n // eslint-disable-next-line camelcase\r\n legacyRouter.navigateToRoute('campaign_keyword', { campaign_id: campaignId });\r\n }\r\n break;\r\n case 'SearchTerm':\r\n saveToFilterStorage({\r\n entityType: 'searchTerm',\r\n text,\r\n createEditableFilterStorage,\r\n });\r\n if (navigationLevel === 'account') {\r\n legacyRouter.navigateToRoute('keyword_search_term');\r\n } else {\r\n // eslint-disable-next-line camelcase\r\n legacyRouter.navigateToRoute('campaign_keyword_search_term', { campaign_id: campaignId });\r\n }\r\n break;\r\n default:\r\n returnValue = true;\r\n }\r\n\r\n return returnValue;\r\n}\r\n\r\nexport function getLocalizedSupportLink(pageContext) {\r\n const culture = pageContext.Culture.toLowerCase();\r\n\r\n // Default to en-us.\r\n let consultationLink = 'https://help.ads.microsoft.com/apex/index/3/en-us/60029';\r\n let coachingLink = 'https://advertise.bingads.microsoft.com/en-us/resources/support/coaching';\r\n\r\n // Get culture specific pages if we have one.\r\n switch (culture) {\r\n case 'en-gb':\r\n consultationLink = 'https://help.ads.microsoft.com/apex/index/3/en-gb/60029';\r\n coachingLink = 'https://advertise.bingads.microsoft.com/en-gb/resources/support/coaching';\r\n break;\r\n case 'fr-fr':\r\n consultationLink = 'https://help.ads.microsoft.com/apex/index/3/fr-fr/60029';\r\n coachingLink = 'https://advertise.bingads.microsoft.com/fr-fr/ressources/support/un-coach-pour-demarrer';\r\n break;\r\n case 'de-de':\r\n consultationLink = 'https://help.ads.microsoft.com/apex/index/3/de-de/60029';\r\n coachingLink = 'https://advertise.bingads.microsoft.com/de-de/Ressourcen/support/coaching';\r\n break;\r\n case 'en-au':\r\n consultationLink = 'https://help.ads.microsoft.com/apex/index/3/en-au/60029';\r\n coachingLink = 'https://advertise.bingads.microsoft.com/en-au/resources/support/coaching';\r\n break;\r\n case 'en-nz':\r\n consultationLink = 'https://help.ads.microsoft.com/apex/index/3/en-nz/60029';\r\n coachingLink = 'https://advertise.bingads.microsoft.com/en-nz/resources/support/coaching';\r\n break;\r\n case 'pt-br':\r\n consultationLink = 'https://help.ads.microsoft.com/apex/index/3/pt-br/60029';\r\n coachingLink = 'https://advertise.bingads.microsoft.com/pt-br/recursos/suporte/coaching';\r\n break;\r\n case 'it-it':\r\n consultationLink = 'https://help.ads.microsoft.com/apex/index/3/it-it/60029';\r\n coachingLink = 'https://advertise.bingads.microsoft.com/it-it/risorse/supporto-di/coaching';\r\n break;\r\n case 'nl-nl':\r\n consultationLink = 'https://help.ads.microsoft.com/apex/index/3/nl-nl/60029';\r\n coachingLink = 'https://advertise.bingads.microsoft.com/nl-nl/hulpmiddelen/ondersteuning/coaching';\r\n break;\r\n case 'en-in':\r\n consultationLink = 'https://help.ads.microsoft.com/apex/index/3/en-in/60029';\r\n coachingLink = 'https://advertise.bingads.microsoft.com/en-in/resources/support/coaching';\r\n break;\r\n case 'es-es':\r\n consultationLink = 'https://help.ads.microsoft.com/apex/index/3/es-es/60029';\r\n coachingLink = 'https://advertise.bingads.microsoft.com/es-es/recursos/soporte/coaching';\r\n break;\r\n default:\r\n if (culture.indexOf('es') !== -1) {\r\n consultationLink = 'https://help.ads.microsoft.com/apex/index/3/es-mx/60029';\r\n coachingLink = 'https://advertise.bingads.microsoft.com/es-mx/recursos/soporte/coaching';\r\n }\r\n }\r\n\r\n return {\r\n consultationLink: `${consultationLink}?id=optimization-consultation-tip`,\r\n coachingLink: `${coachingLink}?id=onboarding-consultation-tip`,\r\n };\r\n}\r\n\r\nfunction periodDurationIn(dateUtil, { start, end } = {}, max, min = 0) {\r\n if (!_.isDate(start) || !_.isDate(end)) {\r\n return true;\r\n }\r\n\r\n const duration = dateUtil.diff(start, end, 'day');\r\n\r\n return duration >= min && duration <= max;\r\n}\r\n\r\nfunction periodFit(dateUtil, period, max, min = 0) {\r\n return periodDurationIn(dateUtil, period, max, min) &&\r\n periodDurationIn(dateUtil, period.compared || {}, max);\r\n}\r\n\r\nexport function availableGranularities(period = {}, dateUtil, accountsMode = AccountsMode.Expert) {\r\n const {\r\n comparativePeriod = {},\r\n } = period;\r\n\r\n const result = [];\r\n\r\n const hourlyStartDate = new Date();\r\n\r\n hourlyStartDate.setMonth(hourlyStartDate.getMonth() - 6);\r\n\r\n if (periodFit(dateUtil, period, 0)) {\r\n if (periodFit(dateUtil, {\r\n start: hourlyStartDate,\r\n end: period.start,\r\n compared: {\r\n start: hourlyStartDate,\r\n end: comparativePeriod.end,\r\n },\r\n }, Infinity) && accountsMode === AccountsMode.Expert) {\r\n result.push('Hour');\r\n } else {\r\n // we only support hourly data for a sliding 6 months window\r\n result.push('Day');\r\n }\r\n }\r\n\r\n if (periodFit(dateUtil, period, 30, 1)) {\r\n result.push('Day');\r\n }\r\n\r\n if (periodFit(dateUtil, period, 210, 7)) {\r\n result.push('Week');\r\n }\r\n\r\n if (periodFit(dateUtil, period, 900, 31)) {\r\n result.push('Month');\r\n }\r\n\r\n if (periodDurationIn(dateUtil, period, Infinity, 90)) {\r\n result.push('Quarter');\r\n }\r\n\r\n return result;\r\n}\r\nexport const getPopDescription = (i18n, comparisonDateRange) => {\r\n let comparisonDateRangeDateRangeText;\r\n let comparisonText;\r\n\r\n if (comparisonDateRange.rangeInDays <= 7) {\r\n comparisonText = i18n.getString('Dashboard_TopChanges_Period_LastWeek');\r\n } else {\r\n comparisonText = i18n.getString('Dashboard_TopChanges_Period_Previous_Period');\r\n }\r\n\r\n // eslint-disable-next-line no-param-reassign\r\n comparisonDateRange.formattedStart = i18n.formatDate(comparisonDateRange.start);\r\n // eslint-disable-next-line no-param-reassign\r\n comparisonDateRange.formattedEnd = i18n.formatDate(comparisonDateRange.end);\r\n\r\n if (comparisonDateRange.formattedStart === comparisonDateRange.formattedEnd) {\r\n comparisonDateRangeDateRangeText = `(${comparisonDateRange.formattedStart})`;\r\n } else {\r\n comparisonDateRangeDateRangeText = `(${comparisonDateRange.formattedStart} - ${comparisonDateRange.formattedEnd})`;\r\n }\r\n\r\n let comparisonDateRangeDescription = comparisonText.toLowerCase();\r\n\r\n if (comparisonDateRange.key === 'customPeriod') {\r\n comparisonDateRangeDescription = '';\r\n }\r\n\r\n return `${i18n.getString('Dashboard_TopChanges_Period_Comparison')}${comparisonDateRangeDescription} ${comparisonDateRangeDateRangeText}`;\r\n};\r\n","import _ from 'underscore';\r\nimport { applyPartialConversionColumnName } from '@bingads-webui-campaign/column-conversions';\r\nimport { AccountsMode } from './constants';\r\nimport { cardPerformanceId, cardTopCampaignsId } from '../../fluent-page-consts';\r\n\r\nconst allMetrics = (permissions = {}, accountsMode = AccountsMode.Expert, campaignType = null) => {\r\n const { AppCampaignNewCampaignGridColumns } = permissions.dynamic || {};\r\n const isAppCampaign = AppCampaignNewCampaignGridColumns && (campaignType === 128 || campaignType === 'App');\r\n const isAllCampaigns = AppCampaignNewCampaignGridColumns && campaignType === 65535;\r\n if (accountsMode === AccountsMode.Expert) {\r\n return applyPartialConversionColumnName(\r\n permissions,\r\n _.compact([\r\n 'Clicks',\r\n 'Impressions',\r\n 'CTR',\r\n 'AverageCPC',\r\n 'Spend',\r\n !permissions.IsAvgPositionDeprecationPhase2Enabled && 'AveragePosition',\r\n 'TopImpressionRate',\r\n 'AbsoluteTopImpressionRate',\r\n 'Conversions',\r\n 'ConversionRate',\r\n 'CPA',\r\n 'AdvertiserReportedRevenue',\r\n 'RevenueOnAdSpend',\r\n (isAppCampaign || isAllCampaigns) && 'Downloads',\r\n isAppCampaign && 'PostClickDownloadRate',\r\n isAppCampaign && 'CostPerDownload',\r\n (isAppCampaign || isAllCampaigns) && 'FirstLaunches',\r\n isAppCampaign && 'PostClickFirstLaunchRate',\r\n (isAppCampaign || isAllCampaigns) && 'CostPerFirstLaunch',\r\n isAppCampaign && 'Purchases',\r\n isAppCampaign && 'PostInstallPurchaseRate',\r\n isAppCampaign && 'CostPerPurchase',\r\n isAppCampaign && 'Subscriptions',\r\n isAppCampaign && 'PostInstallSubscriptionRate',\r\n isAppCampaign && 'CostPerSubscription',\r\n ])\r\n );\r\n }\r\n\r\n return [\r\n 'Clicks',\r\n 'Impressions',\r\n 'CTR',\r\n 'AverageCPC',\r\n 'Spend',\r\n 'Conversions',\r\n 'ConversionRate',\r\n 'CPA',\r\n ];\r\n};\r\n\r\n// Do we need a full list like this?\r\n// https://msasg.visualstudio.com/Bing_Ads/_git/AdsAppsCampaignUI?path=/private/component-new-grid/packages/campaignui-common-columns/src/strings.js&_a=contents&version=GBmaster\r\nconst metricToDisplayNameMap = {\r\n Clicks: _TL_('Clicks'),\r\n Impressions: _TL_('Impr.'),\r\n CTR: _TL_('CTR'),\r\n AverageCPC: _TL_('Avg. CPC'),\r\n Spend: _TL_('Spend'),\r\n AveragePosition: _TL_('Avg. pos.'),\r\n TopImpressionRate: _TL_('Top impr. rate'),\r\n AbsoluteTopImpressionRate: _TL_('Abs. top impr. rate'),\r\n Conversions: _TL_('Conv.'),\r\n ConversionRate: _TL_('Conv. rate'),\r\n CPA: _TL_('CPA'),\r\n AdvertiserReportedRevenue: _TL_('Revenue'),\r\n RevenueOnAdSpend: _TL_('Return on ad spend'),\r\n Downloads: _TL_('Downloads'),\r\n PostClickDownloadRate: _TL_('Post-click download rate'),\r\n CostPerDownload: _TL_('Cost per download'),\r\n FirstLaunches: _TL_('Installs'),\r\n PostClickFirstLaunchRate: _TL_('Post-click install rate'),\r\n CostPerFirstLaunch: _TL_('Cost per install'),\r\n Purchases: _TL_('Purchases'),\r\n PostInstallPurchaseRate: _TL_('Post-install purchase rate'),\r\n CostPerPurchase: _TL_('Cost per purchase'),\r\n Subscriptions: _TL_('Subscriptions'),\r\n PostInstallSubscriptionRate: _TL_('Post-install subscription rate'),\r\n CostPerSubscription: _TL_('Cost per subscription'),\r\n\r\n // when dynamic PartialConversions & ColumnConversion are true\r\n ConversionsCredit: _TL_('Conv.'),\r\n PartialConversionRate: _TL_('Conv. rate'),\r\n PartialConversionCPA: _TL_('CPA'),\r\n};\r\n\r\nconst UIToMTMetricNameMap = {\r\n Impressions: 'Impression',\r\n Clicks: 'Click',\r\n Spend: 'Spend',\r\n};\r\n\r\nconst metricSelect = (permissions, accountsMode = AccountsMode.Expert, campaignType) => _.map(\r\n allMetrics(permissions, accountsMode, campaignType),\r\n metric => `PerformanceMetrics/${metric}`\r\n).join(',');\r\n\r\nconst isInsightsMetric = UIMetric => _.contains(_.keys(UIToMTMetricNameMap), UIMetric);\r\n\r\nconst getInsightsMetric = (allowedMetric, UIMetric) =>\r\n _.filter(allowedMetric, MTMetric => MTMetric === UIToMTMetricNameMap[UIMetric]);\r\n\r\nconst getInsightsMetricFilterOption = metric => `Enum.FluctuationType'${UIToMTMetricNameMap[metric]}'`;\r\n\r\nconst defaultMetrics = (permissions = {}, accountsMode = AccountsMode.Expert) => {\r\n const metrics = ['Spend', 'Clicks', 'Conversions', 'Impressions'];\r\n\r\n if (accountsMode === AccountsMode.Expert) {\r\n return applyPartialConversionColumnName(\r\n permissions,\r\n metrics\r\n );\r\n }\r\n\r\n return metrics;\r\n};\r\n\r\n/**\r\n * This function filters unsupported metrics from dropdowns on the overview page, based on card and campaign types.\r\n * This ensures users can only select valid metrics, avoiding multiple API calls per page.\r\n */\r\nconst getUIMetrics = (metrics, campaignType = null, cardTypeId = null) => {\r\n const shouldExcludeAppMetrics = cardTypeId !== cardPerformanceId && cardTypeId !== cardTopCampaignsId;\r\n const isAllCampaignsScope = campaignType === 65535;\r\n const excludedMetrics = ['Downloads', 'FirstLaunches', 'CostPerFirstLaunch'];\r\n if (isAllCampaignsScope && shouldExcludeAppMetrics) {\r\n return metrics.filter(m => !excludedMetrics.includes(m.key));\r\n }\r\n return metrics;\r\n};\r\n\r\nexport {\r\n allMetrics,\r\n defaultMetrics,\r\n metricToDisplayNameMap,\r\n metricSelect,\r\n isInsightsMetric,\r\n getInsightsMetric,\r\n getInsightsMetricFilterOption,\r\n getUIMetrics,\r\n};\r\n","import _ from 'underscore';\r\nimport {\r\n Campaign,\r\n AdGroup,\r\n AssetGroup,\r\n SearchTerm,\r\n Keyword,\r\n} from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport { FilterEntity } from '@bingads-webui/filter-entity';\r\nimport { WaterfallFilterType, FilterStorageFactory } from '@bingads-webui-campaign/filter-storage';\r\nimport { flattenEntitySchema, buildNameToPropertyMapping } from '@bingads-webui/filter-schema';\r\nimport { addCampaignTypePropertyForFilter, baseEntitySchemaForAvailableInsightTypeIds, lambdaConvertForAvailableInsightTypeIds } from '@bingads-webui-campaign/common-grid-config';\r\nimport { getInsightsMetricFilterOption, isInsightsMetric } from './metrics';\r\n\r\nconst entitySchemaCopy = {};\r\n\r\nfunction getflattenEntitySchema(schemaName, permissions) {\r\n let entitySchema = entitySchemaCopy[schemaName];\r\n\r\n if (entitySchema) {\r\n return entitySchema;\r\n }\r\n\r\n switch (schemaName) {\r\n case 'SearchTerm':\r\n entitySchema = flattenEntitySchema(SearchTerm);\r\n addCampaignTypePropertyForFilter({ entitySchema, permissions });\r\n break;\r\n case 'Keyword':\r\n entitySchema = flattenEntitySchema(Keyword);\r\n addCampaignTypePropertyForFilter({ entitySchema, permissions });\r\n break;\r\n case 'Campaign':\r\n entitySchema = flattenEntitySchema(Campaign);\r\n entitySchema.properties.AvailableInsightTypeIds =\r\n baseEntitySchemaForAvailableInsightTypeIds;\r\n break;\r\n case 'AdGroup':\r\n entitySchema = flattenEntitySchema(AdGroup);\r\n addCampaignTypePropertyForFilter({ entitySchema, permissions });\r\n break;\r\n case 'AssetGroup':\r\n entitySchema = flattenEntitySchema(AssetGroup);\r\n addCampaignTypePropertyForFilter({ entitySchema, permissions });\r\n break;\r\n default:\r\n entitySchema = null;\r\n break;\r\n }\r\n\r\n entitySchemaCopy[schemaName] = entitySchema;\r\n\r\n return entitySchema;\r\n}\r\n\r\nexport function getMergedFilter({\r\n filter,\r\n typeName,\r\n metric,\r\n isFilterByInsights,\r\n permissions,\r\n}) {\r\n if (!filter) {\r\n return undefined;\r\n }\r\n\r\n const filters = _.chain(filter)\r\n .compact()\r\n .map(({\r\n filter: {\r\n key,\r\n value: { query } = {},\r\n } = {},\r\n }) => {\r\n if (!query) {\r\n return null;\r\n }\r\n\r\n let updatedQuery = query;\r\n\r\n if (typeName === 'Campaign') {\r\n if (key === WaterfallFilterType.AdGroupStatus) {\r\n return null;\r\n }\r\n\r\n if (key === WaterfallFilterType.CampaignStatus) {\r\n updatedQuery = {\r\n Status: query.CampaignStatus,\r\n };\r\n }\r\n } else if (typeName === 'AdGroup' && (key === WaterfallFilterType.AdGroupStatus)) {\r\n updatedQuery = {\r\n Status: query.AdGroupStatus,\r\n };\r\n } else if (typeName === 'AssetGroup') {\r\n // No filters support for asset groups\r\n return null;\r\n }\r\n\r\n return new FilterEntity(\r\n updatedQuery,\r\n {\r\n entitySchema: getflattenEntitySchema(typeName, permissions),\r\n }\r\n );\r\n })\r\n .compact()\r\n .value();\r\n\r\n if (typeName === 'Campaign'\r\n && isFilterByInsights\r\n && isInsightsMetric(metric)) {\r\n const query = {\r\n AvailableInsightTypeIds: {\r\n $contains: [getInsightsMetricFilterOption(metric)],\r\n },\r\n };\r\n const entitySchema = getflattenEntitySchema(typeName, permissions);\r\n const availableInsightsTypeIdFilter = new FilterEntity(\r\n query,\r\n {\r\n entitySchema,\r\n odata: {\r\n fieldMap: buildNameToPropertyMapping(entitySchema),\r\n ignoreCase: false,\r\n custom: {\r\n AvailableInsightTypeIds: {\r\n contains: lambdaConvertForAvailableInsightTypeIds(),\r\n },\r\n },\r\n },\r\n }\r\n );\r\n filters.push(availableInsightsTypeIdFilter);\r\n }\r\n\r\n if (!filters || filters.length === 0) {\r\n return undefined;\r\n }\r\n\r\n const entitySchema = getflattenEntitySchema(typeName, permissions);\r\n const mergedFilter = new FilterEntity(\r\n FilterEntity.merge(filters),\r\n {\r\n entitySchema,\r\n odata: {\r\n fieldMap: buildNameToPropertyMapping(entitySchema),\r\n ignoreCase: false,\r\n custom: {\r\n AvailableInsightTypeIds: {\r\n contains: lambdaConvertForAvailableInsightTypeIds(),\r\n },\r\n },\r\n },\r\n }\r\n );\r\n mergedFilter.options = mergedFilter.odataOptions;\r\n return mergedFilter;\r\n}\r\n\r\nexport function getConversionGoalsFilterStore({ preferenceService }) {\r\n const conversionGoalsFilter = new FilterStorageFactory({\r\n preferenceService,\r\n featureName: 'ConversionGoalsGrid',\r\n });\r\n\r\n return conversionGoalsFilter.create('editableFilter', {\r\n filterEntityOptions: {\r\n entitySchema: { name: 'Goal' },\r\n },\r\n });\r\n}\r\n","import _ from 'underscore';\r\nimport { lastNDate } from '@bingads-webui-universal/primitive-utilities';\r\nimport { PageReady } from '@bingads-webui/page-ready';\r\nimport { withDFMCache } from '@bingads-webui/dfm-cache';\r\nimport { partialConversionPairs } from '@bingads-webui-campaign/column-conversions';\r\nimport instrumentationLegacy from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport instrumentationConstants from '@bingads-webui-static-legacy/instrumentation/constants';\r\n\r\nimport { formatDate, availableGranularities } from './util';\r\nimport { metricSelect, allMetrics } from './metrics';\r\nimport { getMergedFilter } from './filter-util';\r\nimport { TopChangesFilterOption, TopChangesFilterSortOptionMap, AccountsMode, ConversionFilterSortOptionMap } from './constants';\r\n\r\n\r\nexport const defaultGridColumns = ['Spend', 'Clicks', 'Impressions'];\r\n\r\nfunction fetch({\r\n entitySet,\r\n dateRange,\r\n comparisonDateRange,\r\n top,\r\n expand,\r\n orderBy,\r\n SegmentationTypes,\r\n select,\r\n extraPayload,\r\n jsdata,\r\n dateUtil,\r\n filter,\r\n metric,\r\n selectedMenuItem,\r\n disableCache,\r\n cacheManager,\r\n permissions,\r\n}) {\r\n const gridDataParameters = _.extend({\r\n DateRange: {\r\n StartDate: formatDate(dateRange.start),\r\n EndDate: formatDate(dateRange.end),\r\n },\r\n ComparisonDateRange:\r\n comparisonDateRange &&\r\n _.isDate(comparisonDateRange.start) &&\r\n _.isDate(comparisonDateRange.end) ?\r\n {\r\n StartDate: formatDate(comparisonDateRange.start),\r\n EndDate: formatDate(comparisonDateRange.end),\r\n } : null,\r\n }, SegmentationTypes ? { SegmentationTypes } : {});\r\n const parameters = _.extend({\r\n gridDataParameters,\r\n }, extraPayload);\r\n const query = {\r\n entitySet: entitySet['Default.GridData'].$call(parameters).toJSON(),\r\n };\r\n const typeName = entitySet.type.elementType.shortName;\r\n const isFilterByInsights = selectedMenuItem === TopChangesFilterOption.Insights;\r\n const mergedFilter = getMergedFilter({\r\n filter, typeName, metric, isFilterByInsights, permissions,\r\n });\r\n const filters = mergedFilter ? mergedFilter.odataV4() : undefined;\r\n\r\n if (top) {\r\n _.extend(query, {\r\n $top: top,\r\n });\r\n }\r\n\r\n if (expand) {\r\n _.extend(query, {\r\n $expand: expand,\r\n });\r\n }\r\n\r\n if (select) {\r\n _.extend(query, {\r\n $select: select,\r\n });\r\n }\r\n\r\n if (filters) {\r\n _.extend(query, {\r\n $filter: filters,\r\n });\r\n }\r\n\r\n if (disableCache) {\r\n cacheManager.invalidate(entitySet.type.elementType.shortName);\r\n }\r\n\r\n return jsdata[entitySet.type.elementType.shortName].findAll({\r\n query,\r\n orderBy,\r\n });\r\n}\r\n\r\nconst millisecondsInDay = 86400000;\r\nconst top = 10;\r\n\r\nexport const topChangesDefaultOptions = {\r\n selectedMenuItem: 'AllChanges',\r\n metric: 'Clicks',\r\n};\r\n\r\nexport const conversionDefaultOptions = {\r\n selectedMenuItem: 'AllChanges',\r\n metric: 'ConversionsCredit', // ConversionsCredit, AdvertiserReportedRevenue\r\n};\r\n\r\nexport function getComparisonDateRange(dateRange) {\r\n let comparisonDateRange = dateRange.compared;\r\n\r\n if (!comparisonDateRange ||\r\n !_.isDate(comparisonDateRange.start) ||\r\n !_.isDate(comparisonDateRange.end)) {\r\n // Comparison date rage is not set in date filter.\r\n // Create one.\r\n comparisonDateRange = {};\r\n const timeRange = dateRange.end.getTime() - dateRange.start.getTime();\r\n const rangeInDays = Math.round(timeRange / millisecondsInDay);\r\n\r\n if (rangeInDays <= 7) {\r\n // If date range is within 7 days, compare with last weeks data.\r\n comparisonDateRange.start = lastNDate(dateRange.start, 7);\r\n comparisonDateRange.end = lastNDate(dateRange.end, 7);\r\n comparisonDateRange.key = 'last 7 days';\r\n } else {\r\n // For longer time period, compare with pervious time period.\r\n comparisonDateRange.end = lastNDate(dateRange.start, 1);\r\n comparisonDateRange.start = lastNDate(comparisonDateRange.end, rangeInDays);\r\n comparisonDateRange.key = 'previous period';\r\n }\r\n comparisonDateRange.rangeInDays = rangeInDays;\r\n }\r\n\r\n return comparisonDateRange;\r\n}\r\n\r\nexport const gridCardConfig = {\r\n entityCount: 10,\r\n select: ({\r\n typeName,\r\n isCompared,\r\n permissions,\r\n columns,\r\n campaignType,\r\n accountsMode,\r\n }) => {\r\n let select;\r\n const metricSelectUnserPermission = metricSelect(permissions, accountsMode, campaignType);\r\n\r\n switch (typeName) {\r\n case 'SearchTerm':\r\n select = `Text,DeliveredMatchType,SearchTermStatus,${_.map(columns, metric => `PerformanceMetrics/${metric}`).join(',')}`;\r\n break;\r\n case 'Keyword':\r\n select = isCompared ?\r\n `Text,Status,Id,MatchType,PerformanceMetricsChange,PerformanceMetricsChangePercentage,${metricSelectUnserPermission}` : `Text,Status,Id,MatchType,${metricSelectUnserPermission}`;\r\n break;\r\n case 'Campaign':\r\n select = isCompared ? `Name,Status,Id,PerformanceMetricsChange,PerformanceMetricsChangePercentage,ExperimentId,CampaignType,${metricSelectUnserPermission}` : `Name,Status,Id,ExperimentId,CampaignType,${metricSelectUnserPermission}`;\r\n break;\r\n default:\r\n select = isCompared ? `Name,Status,Id,PerformanceMetricsChange,PerformanceMetricsChangePercentage,${metricSelectUnserPermission}` : `Name,Status,Id,${metricSelectUnserPermission}`;\r\n break;\r\n }\r\n return select;\r\n },\r\n expand: (typeName) => {\r\n let expand;\r\n\r\n switch (typeName) {\r\n case 'SearchTerm':\r\n expand = 'Campaign($select=Id,Name),AdGroup($select=Id,Name),Keyword($select=Text)';\r\n break;\r\n case 'Keyword':\r\n expand = 'Campaign($select=Id,Name,ExperimentId),AdGroup($select=Id,Name)';\r\n break;\r\n case 'AdGroup':\r\n expand = 'Campaign($select=ExperimentId)';\r\n break;\r\n default:\r\n break;\r\n }\r\n return expand;\r\n },\r\n segmentationTypes: (typeName) => {\r\n if (typeName === 'AdGroup' || typeName === 'Campaign' || typeName === 'Account') {\r\n return ['DeviceType'];\r\n }\r\n return undefined;\r\n },\r\n defaultOptions: {\r\n columns: defaultGridColumns,\r\n orderby: 'Spend',\r\n direction: -1,\r\n directionIndex: 0,\r\n selectedMenuItem: 'PerformanceMetrics',\r\n },\r\n extraPayload: (typeName) => {\r\n if (typeName === 'SearchTerm') {\r\n return {\r\n shouldLoadShoppingTerms: true,\r\n isOverviewRequest: true,\r\n };\r\n }\r\n return {};\r\n },\r\n};\r\n\r\nfunction getColumnAndOrder({\r\n options,\r\n dateRange,\r\n}) {\r\n const metric = options.orderby;\r\n const order = options.direction === 1 ? 'ASC' : 'DESC';\r\n let orderByValue;\r\n\r\n if (dateRange.compared) {\r\n switch (options.selectedMenuItem) {\r\n case 'PerformanceMetricsChange':\r\n orderByValue = 'PoPPerformanceMetricsChange';\r\n break;\r\n case 'PerformanceMetricsChangePercentage':\r\n orderByValue = 'PoPPerformanceMetricsChangePercentage';\r\n break;\r\n case 'PerformanceMetrics':\r\n orderByValue = 'PerformanceMetrics';\r\n break;\r\n default:\r\n orderByValue = 'PerformanceMetrics';\r\n break;\r\n }\r\n } else {\r\n orderByValue = 'PerformanceMetrics';\r\n }\r\n\r\n return {\r\n column: `${orderByValue}/${metric}`,\r\n order,\r\n };\r\n}\r\n\r\nexport function processGridTileOptions({\r\n options,\r\n permissions,\r\n accountsMode,\r\n campaignType,\r\n}) {\r\n if (permissions.dynamic && (permissions.dynamic.OverviewPageFluentV2 || permissions.dynamic.OverviewPageFluent2)) {\r\n instrumentationLegacy.logMessage(\r\n [instrumentationConstants.LOGCATEGORY.TRACE],\r\n instrumentationConstants.LOGLEVEL.INFO,\r\n 'NewOverviewPage DFM',\r\n 'Start to process grid tile options for new overview page'\r\n );\r\n }\r\n\r\n // handle cases where columns might be deprecated.\r\n if (!_.isEmpty(options.columns)) {\r\n const availableMetrics = allMetrics(permissions, accountsMode, campaignType);\r\n let selectedColumns = _.intersection(options.columns, availableMetrics);\r\n\r\n if (_.size(selectedColumns) < _.size(defaultGridColumns)) {\r\n selectedColumns = _.chain(selectedColumns)\r\n .union(defaultGridColumns)\r\n .uniq()\r\n .first(_.size(defaultGridColumns))\r\n .value();\r\n\r\n const orderby = _.contains(availableMetrics, options.orderby) ?\r\n options.orderby : selectedColumns[0];\r\n\r\n return _.defaults({\r\n columns: selectedColumns,\r\n orderby,\r\n }, options);\r\n }\r\n }\r\n\r\n if (permissions.dynamic && (permissions.dynamic.OverviewPageFluentV2 || permissions.dynamic.OverviewPageFluent2)) {\r\n instrumentationLegacy.logMessage(\r\n [instrumentationConstants.LOGCATEGORY.TRACE],\r\n instrumentationConstants.LOGLEVEL.INFO,\r\n 'NewOverviewPage DFM',\r\n JSON.stringify(options)\r\n );\r\n }\r\n\r\n return options;\r\n}\r\n\r\nconst originalFetchGridData = ({\r\n entitySet,\r\n dateRange,\r\n options = gridCardConfig.defaultOptions,\r\n segmentationTypes,\r\n jsdata,\r\n dateUtil,\r\n getCardsConfig,\r\n filter,\r\n permissions,\r\n campaignType,\r\n}) => {\r\n const typeName = entitySet.type.elementType.shortName;\r\n const { column, order } = getColumnAndOrder({\r\n options: processGridTileOptions({\r\n options: options.columns && options.orderby ? options : gridCardConfig.defaultOptions,\r\n permissions,\r\n campaignType,\r\n }),\r\n dateRange,\r\n });\r\n const orderBy = [[column, order]];\r\n\r\n // fetchEntityGridCombined is only for all campaigns,\r\n // if there is a filter on CampaignId (e.g. PMax campaign overview), call fetch with the filter\r\n if (typeName === 'Campaign' && !_.any(filter, f => _.result(f, ['filter', 'key']) === 'CampaignId')) {\r\n // eslint-disable-next-line no-use-before-define\r\n return fetchEntityGridCombined({\r\n entitySet,\r\n dateRange,\r\n jsdata,\r\n dateUtil,\r\n getCardsConfig,\r\n orderBy,\r\n filter,\r\n permissions,\r\n accountsMode: AccountsMode.Expert,\r\n campaignType,\r\n });\r\n }\r\n\r\n return fetch({\r\n entitySet,\r\n dateRange,\r\n comparisonDateRange: dateRange.compared,\r\n top: gridCardConfig.entityCount,\r\n orderBy,\r\n SegmentationTypes: segmentationTypes || gridCardConfig.segmentationTypes(typeName),\r\n expand: gridCardConfig.expand(typeName),\r\n select: gridCardConfig.select({\r\n typeName,\r\n isCompared: dateRange.compared,\r\n permissions,\r\n columns: options.columns,\r\n campaignType,\r\n accountsMode: AccountsMode.Expert,\r\n }),\r\n extraPayload: gridCardConfig.extraPayload(typeName),\r\n jsdata,\r\n dateUtil,\r\n filter,\r\n });\r\n};\r\n\r\nexport const fetchGridData = withDFMCache(originalFetchGridData, args => args.dfmCacheKey);\r\n\r\nfunction getEntityGridOptions({\r\n orderBy,\r\n getCardsConfig,\r\n dateRange,\r\n permissions,\r\n typeName = 'Account',\r\n campaignType,\r\n}) {\r\n let column;\r\n let order;\r\n\r\n if (orderBy && orderBy[0]) {\r\n [[column, order]] = orderBy;\r\n } else {\r\n const cardConfig = _.find(getCardsConfig(), card => (typeName === 'Account' && card.id === 'CardType-TopAccounts') || (typeName === 'Campaign' && card.id === 'CardType-TopCampaigns'));\r\n const columnOrder = getColumnAndOrder({\r\n options: processGridTileOptions({\r\n options: cardConfig && cardConfig.options && cardConfig.options.columns && cardConfig.options.orderby ?\r\n cardConfig.options : gridCardConfig.defaultOptions,\r\n permissions,\r\n campaignType,\r\n }),\r\n dateRange,\r\n });\r\n // eslint-disable-next-line prefer-destructuring\r\n column = columnOrder.column;\r\n // eslint-disable-next-line prefer-destructuring\r\n order = columnOrder.order;\r\n }\r\n\r\n return {\r\n sortColumn: column,\r\n sortDirection: order === 'DESC' ? 'DESCENDING' : 'ASCENDING',\r\n };\r\n}\r\n\r\nexport function processTopChangesMetric({\r\n metric,\r\n permissions,\r\n accountsMode,\r\n campaignType,\r\n}) {\r\n const availableMetrics = allMetrics(permissions, accountsMode, campaignType);\r\n return _.contains(availableMetrics, metric) ?\r\n metric : topChangesDefaultOptions.metric;\r\n}\r\n\r\nconst getMetricConverter = (permissions, accountsMode) => {\r\n const {\r\n ColumnConversion: IsColumnConversionEnabled,\r\n PartialConversions: IsPartialConversionsEnabled,\r\n } = permissions.dynamic || {};\r\n if (accountsMode === AccountsMode.Expert && IsColumnConversionEnabled) {\r\n const conversionPropertyMap = IsPartialConversionsEnabled ?\r\n partialConversionPairs :\r\n _.invert(partialConversionPairs);\r\n return metric => _.result(conversionPropertyMap, metric, metric);\r\n }\r\n return _.identity;\r\n};\r\n\r\nexport const patchMetric = ({\r\n permissions = {},\r\n metric,\r\n accountsMode = AccountsMode.Expert,\r\n} = {}) => {\r\n const converter = getMetricConverter(permissions, accountsMode);\r\n return converter(metric);\r\n};\r\n\r\nexport const patchMetrics = ({\r\n permissions = {},\r\n metrics = [],\r\n accountsMode = AccountsMode.Expert,\r\n} = {}) => {\r\n const converter = getMetricConverter(permissions, accountsMode);\r\n return _.map(metrics, converter);\r\n};\r\n\r\nfunction getTopChangesOptions({\r\n getCardsConfig,\r\n typeName,\r\n selectedMenuItem,\r\n metric,\r\n permissions,\r\n accountsMode = AccountsMode.Expert,\r\n campaignType,\r\n}) {\r\n if (selectedMenuItem && metric) {\r\n return {\r\n menuItem: selectedMenuItem,\r\n selectedMetric: processTopChangesMetric({\r\n metric,\r\n permissions,\r\n accountsMode,\r\n campaignType,\r\n }),\r\n };\r\n }\r\n\r\n let cardId = 'CardType-TopChanges-Account';\r\n\r\n if (typeName === 'Campaign') {\r\n cardId = 'CardType-TopChanges-Campaign';\r\n } else if (typeName === 'AdGroup') {\r\n cardId = 'CardType-TopChanges-AdGroup';\r\n }\r\n\r\n const cardConfig = _.find(getCardsConfig(), card => card.id === cardId);\r\n\r\n return {\r\n menuItem: cardConfig && cardConfig.options ?\r\n cardConfig.options.selectedMenuItem : topChangesDefaultOptions.selectedMenuItem,\r\n selectedMetric: processTopChangesMetric({\r\n metric: cardConfig && cardConfig.options ?\r\n cardConfig.options.metric : topChangesDefaultOptions.metric,\r\n permissions,\r\n accountsMode,\r\n campaignType,\r\n }),\r\n };\r\n}\r\n\r\nfunction getConversionOptions({\r\n getCardsConfig,\r\n selectedMenuItem,\r\n metric,\r\n}) {\r\n if (selectedMenuItem && metric) {\r\n return {\r\n menuItem: selectedMenuItem,\r\n selectedMetric: metric,\r\n };\r\n }\r\n\r\n const cardId = 'CardType-Conversion-Tracking';\r\n\r\n const allCardConfig = getCardsConfig();\r\n const cardConfig = _.find(allCardConfig, card => card.id === cardId);\r\n\r\n return {\r\n menuItem: cardConfig && cardConfig.options && cardConfig.options.selectedMenuItem ?\r\n cardConfig.options.selectedMenuItem : conversionDefaultOptions.selectedMenuItem,\r\n selectedMetric: cardConfig && cardConfig.options && cardConfig.options.metric ?\r\n cardConfig.options.metric : conversionDefaultOptions.metric,\r\n };\r\n}\r\n\r\nfunction convertTopChangesOptions({\r\n topChangesOrderBy,\r\n getCardsConfig,\r\n typeName,\r\n permissions,\r\n accountsMode = AccountsMode.Expert,\r\n campaignType,\r\n}) {\r\n const { selectedMetric, menuItem } = topChangesOrderBy || getTopChangesOptions({\r\n getCardsConfig,\r\n typeName,\r\n permissions,\r\n accountsMode,\r\n campaignType,\r\n });\r\n\r\n const sortColumn = `PoPPerformanceMetricsChange/${selectedMetric}`;\r\n const sortOption = TopChangesFilterSortOptionMap[menuItem];\r\n\r\n return {\r\n sortOption,\r\n sortColumn,\r\n };\r\n}\r\n\r\nfunction convertOverviewConversionsOptions({\r\n conversionOrderBy,\r\n getCardsConfig,\r\n}) {\r\n const { selectedMetric, menuItem } = conversionOrderBy || getConversionOptions({\r\n getCardsConfig,\r\n });\r\n const sortColumn = `PerformanceMetrics/${selectedMetric}`;\r\n const sortOption = ConversionFilterSortOptionMap[menuItem];\r\n\r\n return {\r\n sortOption,\r\n sortColumn,\r\n };\r\n}\r\n\r\n\r\nfunction getGranularityForConsolidatedCalls({\r\n dateRange,\r\n dateUtil,\r\n accountsMode = AccountsMode.Expert,\r\n}) {\r\n let [PerformanceChartGranularity] = availableGranularities(dateRange, dateUtil, accountsMode);\r\n\r\n if (!PerformanceChartGranularity) {\r\n // If we have large discrepancy between time periods, we have no granularity.\r\n // In this case, get granularity from larger period.\r\n const rangeDuration = dateUtil.diff(dateRange.start, dateRange.end, 'day');\r\n const comparedDuration = dateUtil.diff(dateRange.compared.start, dateRange.compared.end, 'day');\r\n const largerRange = {};\r\n if (rangeDuration > comparedDuration) {\r\n largerRange.start = dateRange.start;\r\n largerRange.end = dateRange.end;\r\n } else {\r\n largerRange.start = dateRange.compared.start;\r\n largerRange.end = dateRange.compared.end;\r\n }\r\n ([PerformanceChartGranularity] = availableGranularities(largerRange, dateUtil, accountsMode));\r\n }\r\n\r\n return PerformanceChartGranularity;\r\n}\r\n\r\nfunction getTilesFromConfigForConsolidatedCalls({ getCardsConfig }) {\r\n const tiles = getCardsConfig().map((card) => {\r\n switch (card.id) {\r\n case 'CardType-TopAccounts':\r\n return 'AllAccounts';\r\n case 'CardType-TopCampaigns':\r\n return 'AllCampaigns';\r\n case 'CardType-Performance':\r\n return 'Performance';\r\n case 'CardType-TopChanges-Account':\r\n return 'TopChangedAccounts';\r\n case 'CardType-TopChanges-Campaign':\r\n return 'TopChangedCampaigns';\r\n case 'CardType-Conversion-Tracking':\r\n return 'Conversions';\r\n case 'CardType-Device':\r\n return 'Device';\r\n default:\r\n return '';\r\n }\r\n });\r\n return _.compact(tiles);\r\n}\r\n\r\n// TODO: [yaoyao][markel] check if we need to add campaignType here to handle metrics\r\n// getEntityGridOptions, convertTopChangesOptions can take a campaignType to decide metric\r\n// maybe we need a default value of 65535 to make it work in new customer level overview page?\r\nexport function fetchMCCOverview({\r\n entitySet,\r\n dateRange,\r\n jsdata,\r\n dateUtil,\r\n allAccountsOrderBy,\r\n topChangesOrderBy,\r\n getCardsConfig,\r\n tiles,\r\n instrumentation,\r\n constants,\r\n AccountsOverviewPrefetchQuery,\r\n isPreFetch,\r\n permissions,\r\n disableCache,\r\n cacheManager,\r\n accountsMode = AccountsMode.Expert,\r\n}) {\r\n const typeName = entitySet.type.elementType.shortName;\r\n const {\r\n sortColumn: AllAccountsSortColumn,\r\n sortDirection: AllAccountsSortDirection,\r\n } = getEntityGridOptions({\r\n allAccountsOrderBy,\r\n getCardsConfig,\r\n dateRange,\r\n permissions,\r\n typeName,\r\n });\r\n const HasGlobalComparisonPeriod = !!dateRange.compared &&\r\n _.isDate(dateRange.compared.start) &&\r\n _.isDate(dateRange.compared.end);\r\n const comparisonDateRange = getComparisonDateRange(dateRange);\r\n const PerformanceChartGranularity = getGranularityForConsolidatedCalls({\r\n dateRange,\r\n dateUtil,\r\n accountsMode,\r\n });\r\n const {\r\n sortOption: TopChangedAccountsSortOption,\r\n sortColumn: TopChangedAccountsSortColumn,\r\n } = convertTopChangesOptions({\r\n topChangesOrderBy,\r\n getCardsConfig,\r\n typeName,\r\n permissions,\r\n accountsMode,\r\n });\r\n const Tiles = tiles || getTilesFromConfigForConsolidatedCalls({ getCardsConfig });\r\n\r\n if (_.size(Tiles) === 0) {\r\n return null;\r\n }\r\n\r\n const allMetricsJoined = allMetrics(permissions, accountsMode).join(',');\r\n const popMetrics = ',PeriodPerformanceMetrics,PerformanceMetricsChange,PerformanceMetricsChangePercentage';\r\n const expand = [];\r\n const select = [\r\n // eslint-disable-next-line prefer-template\r\n `AccountsHaveDifferentCurrencies,OverallTotals($select=PerformanceMetrics($select=${allMetricsJoined})` + (\r\n HasGlobalComparisonPeriod ? (`,PeriodPerformanceMetrics($select=${allMetricsJoined})` +\r\n `,PerformanceMetricsChange($select=${allMetricsJoined})` +\r\n `,PerformanceMetricsChangePercentage($select=${allMetricsJoined}))`)\r\n : ')'\r\n ),\r\n ];\r\n const segmentSelect = 'SegmentedData($select=Key,Data)';\r\n _.each(Tiles, (tile) => {\r\n switch (tile) {\r\n case 'AllAccounts':\r\n expand.push(`AllAccounts($select=Id,AccountInactiveReasons,Currency,Name,PerformanceMetrics($select=${allMetricsJoined})${HasGlobalComparisonPeriod ? popMetrics : ''})`);\r\n break;\r\n case 'Performance':\r\n expand.push('PerformanceTimeSeries');\r\n break;\r\n case 'TopChangedAccounts':\r\n expand.push('TopChangedAccounts($select=Id,AccountInactiveReasons,Currency,Name,' +\r\n `AvailableInsightTypeIds,PerformanceMetrics($select=${allMetricsJoined})${popMetrics})`);\r\n break;\r\n case 'Device':\r\n // eslint-disable-next-line prefer-template\r\n select.push(`DeviceSegmentedPerformanceData($select=PerformanceMetrics($select=${segmentSelect})` + (\r\n HasGlobalComparisonPeriod ?\r\n (`,PeriodPerformanceMetrics($select=${segmentSelect})` +\r\n `,PerformanceMetricsChange($select=${segmentSelect})` +\r\n `,PerformanceMetricsChangePercentage($select=${segmentSelect}))`)\r\n : ')'));\r\n break;\r\n default:\r\n }\r\n });\r\n\r\n const multiAccountOverviewParameters = {\r\n DateRange: {\r\n StartDate: formatDate(dateRange.start, dateUtil),\r\n EndDate: formatDate(dateRange.end, dateUtil),\r\n },\r\n ComparisonDateRange: comparisonDateRange ? {\r\n StartDate: formatDate(comparisonDateRange.start, dateUtil),\r\n EndDate: formatDate(comparisonDateRange.end, dateUtil),\r\n } : null,\r\n Tiles,\r\n Metrics: allMetricsJoined,\r\n HasGlobalComparisonPeriod,\r\n AllAccountsSortColumn,\r\n AllAccountsSortDirection,\r\n TopChangedAccountsSortOption,\r\n TopChangedAccountsSortColumn,\r\n FetchFluctuationInsights: accountsMode === AccountsMode.Expert,\r\n };\r\n\r\n if (PerformanceChartGranularity) {\r\n _.extend(multiAccountOverviewParameters, { PerformanceChartGranularity });\r\n }\r\n\r\n const callParams = {\r\n multiAccountOverviewParameters,\r\n };\r\n const accountModes = [accountsMode === AccountsMode.Expert ? 'Expert' : 'Smart'];\r\n\r\n if (permissions.dynamic.UnifiedProductPhase2) {\r\n _.extend(callParams, {\r\n accountModes,\r\n });\r\n }\r\n\r\n const query = {\r\n entitySet: entitySet['Default.MultiAccountOverview'].$call(callParams).toJSON(),\r\n };\r\n\r\n if (!_.isEmpty(expand)) {\r\n _.extend(query, {\r\n $expand: expand.join(','),\r\n });\r\n }\r\n\r\n if (!_.isEmpty(select)) {\r\n _.extend(query, {\r\n $select: select.join(','),\r\n });\r\n }\r\n\r\n if (disableCache) {\r\n cacheManager.invalidate(entitySet.type.elementType.shortName);\r\n }\r\n\r\n // Add log for debugging\r\n if (isPreFetch) {\r\n PageReady.afterPageReady().then(() => {\r\n try {\r\n const postBody = JSON.parse(JSON.parse(AccountsOverviewPrefetchQuery).PostBody);\r\n const serverPreloadParams = postBody.multiAccountOverviewParameters;\r\n\r\n if (!_.isEqual(_.omit(serverPreloadParams, 'IsPreload'), multiAccountOverviewParameters)) {\r\n instrumentation.logMessage(\r\n [constants.LOGCATEGORY.TRACE],\r\n constants.LOGLEVEL.INFO,\r\n 'MccOverview PreFetch',\r\n `${AccountsOverviewPrefetchQuery} : ${JSON.stringify(multiAccountOverviewParameters)}`\r\n );\r\n }\r\n\r\n const serverAccountModes = postBody.accountModes;\r\n\r\n if (!_.isEqual(serverAccountModes, accountModes)) {\r\n instrumentation.logMessage(\r\n [constants.LOGCATEGORY.TRACE],\r\n constants.LOGLEVEL.INFO,\r\n 'MccOverview PreFetch',\r\n `${JSON.stringify(serverAccountModes)} : ${JSON.stringify(accountsMode)}`\r\n );\r\n }\r\n // eslint-disable-next-line no-empty\r\n } catch (e) {\r\n instrumentation.logMessage(\r\n [constants.LOGCATEGORY.TRACE],\r\n constants.LOGLEVEL.INFO,\r\n 'MccOverview PreFetch',\r\n `${AccountsOverviewPrefetchQuery} ${e.stack}`\r\n );\r\n }\r\n });\r\n }\r\n\r\n return jsdata[entitySet.type.elementType.shortName].findAll({\r\n query,\r\n });\r\n}\r\n\r\nexport function fetchCampaignOverview({\r\n entitySet,\r\n dateRange,\r\n jsdata,\r\n dateUtil,\r\n allCampaignsOrderBy,\r\n topChangesOrderBy,\r\n conversionOrderBy,\r\n getCardsConfig,\r\n tiles,\r\n permissions,\r\n filter,\r\n disableCache,\r\n cacheManager,\r\n campaignType,\r\n}) {\r\n const typeName = entitySet.type.elementType.shortName;\r\n const {\r\n sortColumn: AllCampaignsSortColumn,\r\n sortDirection: AllCampaignsSortDirection,\r\n } = getEntityGridOptions({\r\n orderBy: allCampaignsOrderBy,\r\n getCardsConfig,\r\n dateRange,\r\n permissions,\r\n typeName,\r\n campaignType,\r\n });\r\n const HasGlobalComparisonPeriod = !!dateRange.compared &&\r\n _.isDate(dateRange.compared.start) &&\r\n _.isDate(dateRange.compared.end);\r\n const comparisonDateRange = getComparisonDateRange(dateRange);\r\n const PerformanceChartGranularity = getGranularityForConsolidatedCalls({\r\n dateRange,\r\n dateUtil,\r\n });\r\n const {\r\n sortOption: TopChangedCampaignsSortOption,\r\n sortColumn: TopChangedCampaignsSortColumn,\r\n } = convertTopChangesOptions({\r\n topChangesOrderBy,\r\n getCardsConfig,\r\n typeName,\r\n permissions,\r\n campaignType,\r\n });\r\n\r\n const {\r\n sortOption: OverviewConversionsSortOption,\r\n sortColumn: OverviewConversionsSortColumn,\r\n } = convertOverviewConversionsOptions({\r\n conversionOrderBy,\r\n getCardsConfig,\r\n });\r\n const Tiles = tiles || getTilesFromConfigForConsolidatedCalls({ getCardsConfig });\r\n\r\n if (_.size(Tiles) === 0) {\r\n return null;\r\n }\r\n\r\n const mergedFilter = getMergedFilter({\r\n filter, typeName,\r\n });\r\n const filters = mergedFilter ? mergedFilter.odataV4() : undefined;\r\n\r\n const allMetricsJoined = allMetrics(permissions, AccountsMode.Expert, campaignType).join(',');\r\n const popMetrics = ',PeriodPerformanceMetrics,PerformanceMetricsChange,PerformanceMetricsChangePercentage';\r\n const expand = [];\r\n const select = [\r\n // eslint-disable-next-line prefer-template\r\n `OverallTotals($select=PerformanceMetrics($select=${allMetricsJoined})` + (\r\n HasGlobalComparisonPeriod ? (`,PeriodPerformanceMetrics($select=${allMetricsJoined})` +\r\n `,PerformanceMetricsChange($select=${allMetricsJoined})` +\r\n `,PerformanceMetricsChangePercentage($select=${allMetricsJoined}))`)\r\n : ')'\r\n ),\r\n ];\r\n const segmentSelect = 'SegmentedData($select=Key,Data)';\r\n _.each(Tiles, (tile) => {\r\n switch (tile) {\r\n case 'AllCampaigns':\r\n expand.push(`AllCampaigns($select=Name,Status,Id,ExperimentId,CampaignType,PerformanceMetrics($select=${allMetricsJoined})${HasGlobalComparisonPeriod ? popMetrics : ''})`);\r\n break;\r\n case 'Performance':\r\n expand.push('PerformanceTimeSeries');\r\n break;\r\n case 'TopChangedCampaigns':\r\n expand.push('TopChangedCampaigns($select=ExperimentId,CampaignType,Name,Status,Id,' +\r\n `AvailableInsightTypeIds,PerformanceMetrics($select=${allMetricsJoined})${popMetrics})`);\r\n break;\r\n case 'Conversions':\r\n select.push('ConversionTileResult($select=NoConversionGoalsExist,NoConversionGoalsWithRevenue,ConversionGoalTrackingStatusSummaries,' +\r\n 'ConversionGoalCategoryResults)');\r\n break;\r\n case 'Device':\r\n // eslint-disable-next-line prefer-template\r\n select.push(`DeviceSegmentedPerformanceData($select=PerformanceMetrics($select=${segmentSelect})` + (\r\n HasGlobalComparisonPeriod ?\r\n (`,PeriodPerformanceMetrics($select=${segmentSelect})` +\r\n `,PerformanceMetricsChange($select=${segmentSelect})` +\r\n `,PerformanceMetricsChangePercentage($select=${segmentSelect}))`)\r\n : ')'));\r\n break;\r\n default:\r\n }\r\n });\r\n\r\n const campaignOverviewParameters = {\r\n DateRange: {\r\n StartDate: formatDate(dateRange.start, dateUtil),\r\n EndDate: formatDate(dateRange.end, dateUtil),\r\n },\r\n ComparisonDateRange: comparisonDateRange ? {\r\n StartDate: formatDate(comparisonDateRange.start, dateUtil),\r\n EndDate: formatDate(comparisonDateRange.end, dateUtil),\r\n } : null,\r\n Tiles,\r\n Metrics: allMetricsJoined,\r\n HasGlobalComparisonPeriod,\r\n AllCampaignsSortColumn,\r\n AllCampaignsSortDirection,\r\n TopChangedCampaignsSortOption,\r\n TopChangedCampaignsSortColumn,\r\n OverviewConversionsSortColumn,\r\n OverviewConversionsSortOption,\r\n FetchFluctuationInsights: true,\r\n };\r\n\r\n if (PerformanceChartGranularity) {\r\n _.extend(campaignOverviewParameters, { PerformanceChartGranularity });\r\n }\r\n\r\n const callParams = {\r\n campaignOverviewParameters,\r\n };\r\n\r\n const query = {\r\n entitySet: entitySet['Default.CampaignOverview'].$call(callParams).toJSON(),\r\n };\r\n\r\n if (!_.isEmpty(expand)) {\r\n _.extend(query, {\r\n $expand: expand.join(','),\r\n });\r\n }\r\n\r\n if (!_.isEmpty(select)) {\r\n _.extend(query, {\r\n $select: select.join(','),\r\n });\r\n }\r\n\r\n if (filters) {\r\n _.extend(query, {\r\n $filter: filters,\r\n });\r\n }\r\n\r\n _.extend(query, {\r\n $top: 10,\r\n });\r\n\r\n if (disableCache) {\r\n cacheManager.invalidate(entitySet.type.elementType.shortName);\r\n }\r\n\r\n return jsdata[entitySet.type.elementType.shortName].findAll({\r\n query,\r\n });\r\n}\r\n\r\nexport function fetchCombinedPerformanceTimeSeries({\r\n entitySet,\r\n dateRange,\r\n jsdata,\r\n dateUtil,\r\n getCardsConfig,\r\n fetchSingleTile,\r\n filter,\r\n permissions,\r\n accountsMode,\r\n campaignType,\r\n}) {\r\n const typeName = entitySet.type.elementType.shortName;\r\n\r\n if (typeName === 'Account') {\r\n return fetchMCCOverview({\r\n entitySet,\r\n dateRange,\r\n jsdata,\r\n dateUtil,\r\n getCardsConfig,\r\n permissions,\r\n accountsMode,\r\n tiles: fetchSingleTile ? ['Performance'] : undefined,\r\n }).then((data) => {\r\n if (!_.isEmpty(data.errors)) {\r\n return data;\r\n }\r\n\r\n return {\r\n performanceTimeSeries: data.PerformanceTimeSeries,\r\n hideCurrency: data.AccountsHaveDifferentCurrencies,\r\n };\r\n });\r\n }\r\n\r\n return fetchCampaignOverview({\r\n entitySet,\r\n dateRange,\r\n jsdata,\r\n dateUtil,\r\n getCardsConfig,\r\n filter,\r\n permissions,\r\n tiles: fetchSingleTile ? ['Performance'] : undefined,\r\n campaignType,\r\n }).then((data) => {\r\n if (!_.isEmpty(data.errors)) {\r\n return data;\r\n }\r\n\r\n return {\r\n performanceTimeSeries: data.PerformanceTimeSeries,\r\n };\r\n });\r\n}\r\n\r\nexport function fetchEntityGridCombined({\r\n entitySet,\r\n dateRange,\r\n jsdata,\r\n dateUtil,\r\n getCardsConfig,\r\n orderBy,\r\n fetchSingleTile,\r\n permissions,\r\n filter,\r\n accountsMode = AccountsMode.Expert,\r\n campaignType,\r\n}) {\r\n const typeName = entitySet.type.elementType.shortName;\r\n\r\n if (typeName === 'Account') {\r\n return fetchMCCOverview({\r\n entitySet,\r\n dateRange,\r\n jsdata,\r\n dateUtil,\r\n allAccountsOrderBy: orderBy,\r\n getCardsConfig,\r\n tiles: fetchSingleTile ? ['AllAccounts'] : undefined,\r\n permissions,\r\n accountsMode,\r\n }).then((data) => {\r\n if (!_.isEmpty(data.errors)) {\r\n return data;\r\n }\r\n return data.AllAccounts;\r\n });\r\n }\r\n\r\n return fetchCampaignOverview({\r\n entitySet,\r\n dateRange,\r\n jsdata,\r\n dateUtil,\r\n allCampaignsOrderBy: orderBy,\r\n getCardsConfig,\r\n tiles: fetchSingleTile ? ['AllCampaigns'] : undefined,\r\n filter,\r\n permissions,\r\n campaignType,\r\n }).then((data) => {\r\n if (!_.isEmpty(data.errors)) {\r\n return data;\r\n }\r\n return data.AllCampaigns;\r\n });\r\n}\r\n\r\nconst originalFetchTopChanges = ({\r\n entitySet,\r\n dateRange,\r\n filter,\r\n comparisonDateRange,\r\n selectedMenuItem,\r\n metric,\r\n jsdata,\r\n dateUtil,\r\n getCardsConfig,\r\n fetchSingleTile,\r\n permissions,\r\n disableCache,\r\n cacheManager,\r\n accountsMode,\r\n campaignType,\r\n}) => {\r\n const typeName = entitySet.type.elementType.shortName;\r\n const { menuItem, selectedMetric } = getTopChangesOptions({\r\n getCardsConfig,\r\n typeName,\r\n selectedMenuItem,\r\n metric,\r\n permissions,\r\n campaignType,\r\n });\r\n\r\n if (typeName === 'Account') {\r\n return fetchMCCOverview({\r\n entitySet,\r\n dateRange,\r\n jsdata,\r\n dateUtil,\r\n getCardsConfig,\r\n tiles: fetchSingleTile ? ['TopChangedAccounts'] : undefined,\r\n topChangesOrderBy: {\r\n menuItem,\r\n selectedMetric,\r\n },\r\n permissions,\r\n disableCache,\r\n cacheManager,\r\n accountsMode,\r\n }).then((data) => {\r\n if (!_.isEmpty(data.errors)) {\r\n return data;\r\n }\r\n return data.TopChangedAccounts;\r\n });\r\n }\r\n\r\n if (typeName === 'Campaign') {\r\n return fetchCampaignOverview({\r\n entitySet,\r\n dateRange,\r\n jsdata,\r\n dateUtil,\r\n getCardsConfig,\r\n tiles: fetchSingleTile ? ['TopChangedCampaigns'] : undefined,\r\n topChangesOrderBy: {\r\n menuItem,\r\n selectedMetric,\r\n },\r\n filter,\r\n permissions,\r\n disableCache,\r\n cacheManager,\r\n campaignType,\r\n }).then((data) => {\r\n if (!_.isEmpty(data.errors)) {\r\n return data;\r\n }\r\n return data.TopChangedCampaigns;\r\n });\r\n }\r\n\r\n const order = menuItem === TopChangesFilterOption.TopDecliners ? 'ASC' : 'DESC';\r\n const popOrderByMetric =\r\n menuItem === TopChangesFilterOption.AllChanges || menuItem === TopChangesFilterOption.Insights\r\n ? 'PoPPerformanceMetricsAbsoluteChange' : 'PoPPerformanceMetricsChange';\r\n const orderBy = [[`${popOrderByMetric}/${selectedMetric}`, order]];\r\n let expand;\r\n let select = `Name,Status,Id,PerformanceMetricsChange,PeriodPerformanceMetrics,PerformanceMetricsChangePercentage,${metricSelect(permissions, accountsMode, campaignType)}`;\r\n\r\n if (typeName === 'Campaign') {\r\n select = `ExperimentId,CampaignType,AvailableInsightTypeIds,${select}`;\r\n } else if (typeName === 'AdGroup') {\r\n expand = 'Campaign($select=ExperimentId)';\r\n }\r\n\r\n return fetch({\r\n entitySet,\r\n dateRange,\r\n filter,\r\n comparisonDateRange: comparisonDateRange || getComparisonDateRange(dateRange),\r\n top,\r\n orderBy,\r\n select,\r\n expand,\r\n jsdata,\r\n dateUtil,\r\n metric,\r\n selectedMenuItem,\r\n disableCache,\r\n cacheManager,\r\n permissions,\r\n });\r\n};\r\n\r\nexport const fetchTopChanges = withDFMCache(originalFetchTopChanges, args => args.dfmCacheKey);\r\n\r\nconst originalFetchAggregatedData = ({\r\n entitySet,\r\n dateRange,\r\n filter,\r\n jsdata,\r\n dateUtil,\r\n navigationLevel,\r\n getCardsConfig,\r\n fetchSingleTile,\r\n isDevice,\r\n permissions,\r\n accountsMode,\r\n segmentationTypes,\r\n campaignType,\r\n}) => {\r\n if (navigationLevel === 'customer') {\r\n let tiles;\r\n\r\n if (fetchSingleTile) {\r\n tiles = isDevice ? ['Device'] : ['Performance'];\r\n }\r\n return fetchMCCOverview({\r\n entitySet,\r\n dateRange,\r\n jsdata,\r\n dateUtil,\r\n getCardsConfig,\r\n tiles,\r\n permissions,\r\n accountsMode,\r\n });\r\n }\r\n\r\n // fetchCampaignOverview is only for all campaigns,\r\n // if there is a filter on CampaignId (e.g. PMax campaign overview), call fetchGridData with the filter\r\n if (navigationLevel === 'account' && !_.any(filter, f => _.result(f, ['filter', 'key']) === 'CampaignId')) {\r\n let tiles;\r\n\r\n if (fetchSingleTile) {\r\n tiles = isDevice ? ['Device'] : ['Performance'];\r\n }\r\n return fetchCampaignOverview({\r\n entitySet,\r\n dateRange,\r\n jsdata,\r\n dateUtil,\r\n getCardsConfig,\r\n tiles,\r\n filter,\r\n permissions,\r\n campaignType,\r\n });\r\n }\r\n\r\n const cardConfig = _.find(getCardsConfig(), (card) => {\r\n if (navigationLevel === 'account') {\r\n return card.id === 'CardType-TopCampaigns';\r\n }\r\n return card.id === 'CardType-TopAdGroup';\r\n });\r\n\r\n const typeName = entitySet.type.elementType.shortName;\r\n\r\n return fetchGridData({\r\n entitySet,\r\n dateRange,\r\n filter,\r\n options: cardConfig ? cardConfig.options : undefined,\r\n segmentationTypes: segmentationTypes || gridCardConfig.segmentationTypes(typeName),\r\n jsdata,\r\n dateUtil,\r\n permissions,\r\n getCardsConfig,\r\n campaignType,\r\n });\r\n};\r\n\r\nexport const fetchAggregatedData =\r\n withDFMCache(originalFetchAggregatedData, args => args.dfmCacheKey);\r\n\r\nconst originalFetchConversions = ({\r\n entitySet,\r\n dateRange,\r\n filter,\r\n selectedMenuItem,\r\n metric,\r\n jsdata,\r\n dateUtil,\r\n getCardsConfig,\r\n permissions,\r\n disableCache,\r\n cacheManager,\r\n fetchSingleTile,\r\n campaignType,\r\n}) => {\r\n const typeName = entitySet.type.elementType.shortName;\r\n const { menuItem, selectedMetric } = getConversionOptions({\r\n getCardsConfig,\r\n typeName,\r\n selectedMenuItem,\r\n metric,\r\n permissions,\r\n });\r\n\r\n return fetchCampaignOverview({\r\n entitySet,\r\n dateRange,\r\n jsdata,\r\n dateUtil,\r\n getCardsConfig,\r\n tiles: fetchSingleTile ? ['Conversions'] : undefined,\r\n conversionOrderBy: {\r\n menuItem,\r\n selectedMetric,\r\n },\r\n filter,\r\n permissions,\r\n disableCache,\r\n cacheManager,\r\n campaignType,\r\n }).then((data) => {\r\n if (!_.isEmpty(data.errors)) {\r\n return data;\r\n }\r\n return data.ConversionTileResult;\r\n });\r\n};\r\n\r\nexport const fetchConversionTracking =\r\n withDFMCache(originalFetchConversions, args => args.dfmCacheKey);\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport state from '@bingads-webui-component-legacy/state/index';\r\nimport { Constants as CCUIConstants } from '@bingads-webui-clientcenter/entity-utils';\r\n\r\n// TODO: there is an issue with import { FAC_FEATURE_ID } from '@bingads-webui-campaign/recommendation-core';\r\n// hard code FAC_FEATURE_ID.CONVERSION_TRACKING for now\r\nconst FAC_FEATUREID = 208;\r\nconst FAC_STATUS_NOT_IN_PROGRESS = CCUIConstants.RecommendationAdoptionStatus.NotInProgess;\r\nconst FAC_STATUS_ACTIVE = CCUIConstants.RecommendationAdoptionStatus.Active;\r\nlet p$Coupons = null;\r\n\r\nexport function fetchCoupons({\r\n ccJsData,\r\n}) {\r\n if (p$Coupons) {\r\n return p$Coupons;\r\n }\r\n const accountId = state.get('account_id');\r\n\r\n p$Coupons = new Promise((resolve) => {\r\n if (accountId) {\r\n // if call fails, eat the error to avoid blocking workflow\r\n resolve(ccJsData.FeatureAdoptionCoupon\r\n .findAll({ aid: accountId })\r\n .then(coupons => _.filter(\r\n coupons,\r\n ({ Status, FeatureId }) => FeatureId === FAC_FEATUREID && (Status === FAC_STATUS_NOT_IN_PROGRESS || Status === FAC_STATUS_ACTIVE)\r\n ))\r\n .catch(() => []));\r\n }\r\n resolve([]);\r\n });\r\n\r\n return p$Coupons;\r\n}\r\n\r\nexport function clearCouponsCache() {\r\n p$Coupons = null;\r\n}\r\n","/* eslint-disable indent */\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport { withDFMCache } from '@bingads-webui/dfm-cache';\r\nimport { edmCampaign } from '@bingads-webui/edm-campaign';\r\n\r\nimport { formatDate } from './util';\r\n\r\nexport const locationGranularity = {\r\n country: {\r\n name: 'CountryName',\r\n longitude: 'CountryLongitude',\r\n latitude: 'CountryLatitude',\r\n },\r\n county: {\r\n name: 'CountyName',\r\n longitude: 'CountyLongitude',\r\n latitude: 'CountyLatitude',\r\n },\r\n stateOrProvince: {\r\n name: 'StateOrProvince',\r\n longitude: 'SubGeographyLongitude',\r\n latitude: 'SubGeographyLatitude',\r\n },\r\n city: {\r\n name: 'City',\r\n longitude: 'CityLongitude',\r\n latitude: 'CityLatitude',\r\n },\r\n postalCode: {\r\n name: 'PostalCode',\r\n longitude: 'PostalCodeLongitude',\r\n latitude: 'PostalCodeLatitude',\r\n },\r\n};\r\n\r\nfunction mapMetric(metric) {\r\n let mappedMetric = metric;\r\n\r\n switch (metric) {\r\n case 'TopImpressionRate':\r\n mappedMetric = 'TopImpressionRatePercent';\r\n break;\r\n case 'AbsoluteTopImpressionRate':\r\n mappedMetric = 'AbsoluteTopImpressionRatePercent';\r\n break;\r\n default:\r\n break;\r\n }\r\n return mappedMetric;\r\n}\r\n\r\nfunction fetch({\r\n cid, aid, campaignId, dateRange, metric, level,\r\n}) {\r\n return edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .Campaigns.$withKey(campaignId)['Default.DimensionReport']\r\n .$makeCall({\r\n functionParams: {\r\n Locale: config.get('CultureLcid'),\r\n ReportType: 'Enum.DimensionReportType\\'Geographic\\'',\r\n },\r\n query: {\r\n count: true,\r\n skip: 0,\r\n top: 15,\r\n orderby: {\r\n [mapMetric(metric)]: '-1',\r\n },\r\n select: [level.name, level.longitude, level.latitude, metric],\r\n startDate: formatDate(dateRange.start),\r\n endDate: formatDate(dateRange.end),\r\n },\r\n })\r\n .toPromise();\r\n}\r\n\r\nexport const fetchCountryData = withDFMCache(({\r\n cid, aid, campaignId, dateRange, metric,\r\n}) => fetch({\r\n cid,\r\n aid,\r\n campaignId,\r\n dateRange,\r\n metric,\r\n level: locationGranularity.country,\r\n}), 'CardType-TopLocations-country-data');\r\n\r\nexport const fetchStateOrProvinceData = withDFMCache(({\r\n cid, aid, campaignId, dateRange, metric,\r\n}) => fetch({\r\n cid,\r\n aid,\r\n campaignId,\r\n dateRange,\r\n metric,\r\n level: locationGranularity.stateOrProvince,\r\n}), 'CardType-TopLocations-state-or-province-data');\r\n\r\nexport const fetchCountyData = withDFMCache(({\r\n cid, aid, campaignId, dateRange, metric,\r\n}) => fetch({\r\n cid,\r\n aid,\r\n campaignId,\r\n dateRange,\r\n metric,\r\n level: locationGranularity.county,\r\n}), 'CardType-TopLocations-county-data');\r\n\r\nexport const fetchCityData = withDFMCache(({\r\n cid, aid, campaignId, dateRange, metric,\r\n}) => fetch({\r\n cid,\r\n aid,\r\n campaignId,\r\n dateRange,\r\n metric,\r\n level: locationGranularity.city,\r\n}), 'CardType-TopLocations-city-data');\r\n\r\nexport const fetchPostalCodeData = withDFMCache(({\r\n cid, aid, campaignId, dateRange, metric,\r\n}) => fetch({\r\n cid,\r\n aid,\r\n campaignId,\r\n dateRange,\r\n metric,\r\n level: locationGranularity.postalCode,\r\n}), 'CardType-TopLocations-postal-code-data');\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { ReactTemplate } from '@bingads-webui-react/react-template';\r\n\r\nexport const BoldSyntax = props =>\r\n ( ({text}),\r\n }}\r\n template={props.template}\r\n />);\r\n\r\nBoldSyntax.propTypes = {\r\n template: PropTypes.string.isRequired,\r\n};\r\n\r\n","export const StringsMapping = {\r\n All_Change: _TL_('All changes'),\r\n Top_Decliners: _TL_('Top decliners'),\r\n Top_Gainers: _TL_('Top gainers'),\r\n EmptyState_Title: _TL_('Track your conversions'),\r\n EmptyState_Subtitle: _TL_('Visit the conversion tracking and UET dashboard pages to start creating conversion goals that will track your conversions and revenue.'),\r\n EmptyState_Action: _TL_('Set up conversion tracking'),\r\n\r\n Footer_ManageConversions: _TL_('Manage Conversion Goals'),\r\n Footer_PageCount: _TL_('Page {{pageNumber}} of 2', 'text in {{}} must NOT be translated'),\r\n\r\n Status_Title: _TL_('You have conversion tracking status errors that need to be fixed'),\r\n Status_Subtitle: _TL_('Visit the Conversion goals page to identify issues with your goals to get them back on track.'),\r\n Status_Alert: _TL_('Alert'),\r\n Status_RecentConversions: _TL_(' with no recent conversions', 'preserve one space at the beginning'),\r\n Status_RecordingConversions: _TL_(' with revenue attribute set', 'preserve one space at the beginning'),\r\n Status_Inactive: _TL_(' with inactive tags', 'preserve one space at the beginning'),\r\n Status_Unverified: _TL_(' with unverified tags', 'preserve one space at the beginning'),\r\n Status_Unavailable: _TL_(' with inactive due to unavailable tags', 'preserve one space at the beginning'),\r\n\r\n Coupon_Title: _TL_('Get {{value}} when you set up a conversion goal.'),\r\n\r\n Coupon_Step1: _TL_('{{b}}Step 1{{/b}}: Set up a conversion goal', 'text in between {{b}} {{/b}} is bolded'),\r\n Coupon_Step2: _TL_('{{b}}Step 2{{/b}}: ', 'text in between {{b}} {{/b}} is bolded'),\r\n Coupon_Step2_Detail: _TL_('Spend {{cost}} on your campaigns and you’ll automatically receive {{value}} in advertising credit.', 'text in {{}} must NOT be translated'),\r\n\r\n Number_Of_Goals: _TL_('{{number}} goals', 'text in {{}} must NOT be translated'),\r\n\r\n StatusMessage_InactiveDueToTagUnavailable: _TL_('The account no longer has access to the UET tag. Permissions to a UET tag in another manager account may have been removed, or this account was transferred and lost permission to a UET tag in a previous manager account.'),\r\n StatusMessage_NoRecentConversion: _TL_(\"We've seen your UET tag, but haven't recorded any conversions in the last 7 days. This is most likely because you either have created the goal incorrectly, have not tagged your entire website, especially the pages that have the conversion action or you don't have any users converting on your site.\"),\r\n StatusMessage_RecordingConversions: _TL_(\"We've seen your UET tag and have recorded conversions within the last 7 days. If your conversion window is greater than 7 days and you are filtering on the last 7 days, you may see this status even if no conversions are shown in the Conversions column, as conversions are reported at the time of the click.\"),\r\n StatusMessage_TagInactive: _TL_(\"We haven't received any user activity data from your UET tag in the last 24 hours. Make sure that the UET tag tracking code is still on your website.\"),\r\n StatusMessage_Unverified: _TL_(\"We haven't received any user activity data from the UET tag on your website. It can take up to 24 hours for us to verify. If you still see this status, you either have not added the UET tag tracking code to your website or there is an issue with the setup that you need to fix.\"),\r\n\r\n\r\n NoRecentConversion: _TL_('No recent conversions'),\r\n RecordingConversions: _TL_('No revenue attribute sets'),\r\n InactiveTag: _TL_('Inactive tags'),\r\n UnverifiedTag: _TL_('Unverified tags'),\r\n UnavailableTag: _TL_('Unavailable tags'),\r\n\r\n NoReveueText: _TL_(\"None of your conversion goals are tracking revenue. This means that you haven't associated any specific revenue value to your goals. Tracking revenue is a great way of measuring the revenue gained from advertisers converting on your ad campaign.\"),\r\n See_All: _TL_('See all'),\r\n Learn_More: _TL_('Learn more'),\r\n\r\n Hover_Change: _TL_('Change: {{value}} ({{percentageValue}})', 'text in {{}} must NOT be translated'),\r\n Empty_Data: _TL_('{{b}}No data available.{{/b}} To update the tile, select a different date range. If the tile remains blank, your account might have no data.'),\r\n};\r\n\r\nexport const GoalCategory = {\r\n AddToCart: _TL_('Add to cart'),\r\n BeginCheckout: _TL_('Begin checkout'),\r\n BookAppointment: _TL_('Book appointment'),\r\n Contact: _TL_('Contact'),\r\n GetDirections: _TL_('Get directions'),\r\n InStoreVisit: _TL_('Store visit'),\r\n None: _TL_('Unassigned'),\r\n Other: _TL_('Other'),\r\n OutboundClick: _TL_('Outbound click'),\r\n PageView: _TL_('Page view'),\r\n Purchase: _TL_('Purchase'),\r\n RequestQuote: _TL_('Request quote'),\r\n Signup: _TL_('Sign - up'),\r\n Subcribe: _TL_('Subscribe'),\r\n SubmitLeadForm: _TL_('Submit lead form'),\r\n};\r\n\r\nexport const metrici18nKeys = {\r\n ConversionsCredit: _TL_('Conversions: {{value}}', 'text in {{}} must NOT be translated'),\r\n AdvertiserReportedRevenue: _TL_('Revenue: {{value}}', 'text in {{}} must NOT be translated'),\r\n};\r\n","import React, { useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { BoldSyntax } from '../../common/util';\r\nimport { StringsMapping } from '../../common/strings';\r\n\r\nfunction CouponSetup(props) {\r\n const { newI18n, coupon } = props;\r\n\r\n const { cost, value } = coupon;\r\n\r\n const stepOneImgClass = 'coupon-step-one-image';\r\n const stepTwoImgClass = 'coupon-step-two-image';\r\n const couponText = useMemo(\r\n () =>\r\n newI18n.getString(StringsMapping.Coupon_Title, { value }),\r\n [newI18n, value]\r\n );\r\n\r\n const stepOneText = useMemo(\r\n () =>\r\n newI18n.getString(StringsMapping.Coupon_Step1),\r\n [newI18n]\r\n );\r\n const stepTwo = useMemo(\r\n () =>\r\n newI18n.getString(StringsMapping.Coupon_Step2),\r\n [newI18n]\r\n );\r\n\r\n const stepTwoText = useMemo(\r\n () =>\r\n newI18n.getString(StringsMapping.Coupon_Step2_Detail, { cost, value }),\r\n [cost, newI18n, value]\r\n );\r\n\r\n\r\n return (\r\n \r\n
{couponText}
\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 {stepTwoText}\r\n
\r\n
\r\n
\r\n \r\n );\r\n}\r\n\r\nCouponSetup.defaultProps = {\r\n};\r\n\r\nCouponSetup.propTypes = {\r\n newI18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n coupon: PropTypes.shape({\r\n cost: PropTypes.string.isRequired,\r\n value: PropTypes.string.isRequired,\r\n }).isRequired,\r\n};\r\n\r\nexport default CouponSetup;\r\n","import _ from 'underscore';\r\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { GetJsDataInfo } from '@bingads-webui-clientcenter/js-data-cc-rest-base';\r\nimport { formatCoupon } from '@bingads-webui-campaign/recommendation-core';\r\nimport { Button } from '@fluentui/react-components';\r\nimport { DefaultButton } from '@fluentui/react/lib/Button';\r\nimport { fetchCoupons, clearCouponsCache } from '@bingads-webui-campaign/overview-cards-common';\r\nimport CouponSetup from './conversion-setup/coupon-setup';\r\nimport { StringsMapping } from '../common/strings';\r\n\r\nfunction fetchCouponsMethod({\r\n ccJsData,\r\n currencyCode,\r\n i18n,\r\n setDataState,\r\n instrumentationLog,\r\n blockCard,\r\n willFetchData,\r\n renderedWithData,\r\n unblockCard,\r\n}) {\r\n blockCard();\r\n willFetchData();\r\n\r\n fetchCoupons({ ccJsData })\r\n .finally(() => {\r\n renderedWithData();\r\n unblockCard();\r\n }).then((coupons) => {\r\n if (coupons.length > 0) {\r\n const couponLocalized = formatCoupon({ i18n, coupon: coupons[0], currency: currencyCode });\r\n setDataState({ isDataLoaded: true, couponLocalized });\r\n } else {\r\n setDataState({ isDataLoaded: true, couponLocalized: [] });\r\n }\r\n })\r\n .catch((response) => {\r\n instrumentationLog.Error(response.message);\r\n setDataState({ isDataLoaded: true, couponLocalized: [] });\r\n });\r\n}\r\n\r\nfunction useFetchCoupon(props) {\r\n const {\r\n pageContext,\r\n i18n,\r\n instrumentationLog,\r\n blockCard,\r\n willFetchData,\r\n renderedWithData,\r\n unblockCard,\r\n } = props;\r\n\r\n const ccJsData = useMemo(() => GetJsDataInfo({\r\n cidFetcher: () => pageContext.CurrentCustomer.Id,\r\n uidFetcher: () => pageContext.CurrentUser.Id,\r\n willSupportCors: true,\r\n }, pageContext.CCBaseUrl, ['FeatureAdoptionCoupon']).jsDataCcRest, [pageContext.CCBaseUrl, pageContext.CurrentCustomer.Id, pageContext.CurrentUser.Id]);\r\n\r\n const { Id: accountId, CurrencyCode: currencyCode } = pageContext.CurrentAccount;\r\n const [{ isDataLoaded, couponLocalized }, setDataState] = useState({ isDataLoaded: false, couponLocalized: null });\r\n\r\n const fetchDate = useCallback(\r\n () => {\r\n fetchCouponsMethod({\r\n ccJsData,\r\n accountId,\r\n currencyCode,\r\n i18n,\r\n instrumentationLog,\r\n setDataState,\r\n blockCard,\r\n willFetchData,\r\n renderedWithData,\r\n unblockCard,\r\n });\r\n },\r\n [ccJsData, accountId, currencyCode, i18n, instrumentationLog, blockCard, willFetchData, renderedWithData, unblockCard]\r\n );\r\n\r\n useEffect(() => {\r\n fetchDate();\r\n return clearCouponsCache;\r\n }, [fetchDate]);\r\n\r\n return { isDataLoaded, couponLocalized };\r\n}\r\n\r\nfunction EmptyState(props) {\r\n const {\r\n router,\r\n pageContext,\r\n instrumentationLog,\r\n i18n,\r\n newI18n,\r\n permissions,\r\n blockCard,\r\n willFetchData,\r\n renderedWithData,\r\n unblockCard,\r\n } = props;\r\n\r\n const imgClass = 'conversion_tracking_setup_img';\r\n const requiredPermission = permissions.dynamic.OverviewPageFluentV2 || permissions.dynamic.OverviewPageFluent2;\r\n\r\n const titleString = useMemo(() =>\r\n newI18n.getString(StringsMapping.EmptyState_Title), [newI18n]);\r\n const subtitleString = useMemo(() =>\r\n newI18n.getString(StringsMapping.EmptyState_Subtitle), [newI18n]);\r\n const actionString = useMemo(() =>\r\n newI18n.getString(StringsMapping.EmptyState_Action), [newI18n]);\r\n\r\n const { isDataLoaded, couponLocalized } = useFetchCoupon({\r\n pageContext,\r\n i18n,\r\n instrumentationLog,\r\n\r\n blockCard,\r\n willFetchData,\r\n renderedWithData,\r\n unblockCard,\r\n });\r\n\r\n const hasCoupons = useMemo(() => _.size(couponLocalized) > 0, [couponLocalized]);\r\n\r\n const navigateToConversionGoals = useCallback(() => {\r\n if (router) {\r\n instrumentationLog.SetUpConversionClicked(hasCoupons);\r\n router.navigateToRoute('conversiongoals');\r\n }\r\n }, [hasCoupons, instrumentationLog, router]);\r\n\r\n const renderView = useCallback(() => {\r\n if (isDataLoaded) {\r\n if (hasCoupons) {\r\n instrumentationLog.CouponIsShown();\r\n return ();\r\n }\r\n instrumentationLog.NoCoupon();\r\n }\r\n return (\r\n \r\n
\r\n
\r\n
\r\n
{titleString}
\r\n
{subtitleString}
\r\n \r\n );\r\n }, [couponLocalized, hasCoupons, instrumentationLog, isDataLoaded, newI18n, subtitleString, titleString]);\r\n\r\n return (\r\n
\r\n {renderView()}\r\n
\r\n {requiredPermission ? (\r\n \r\n ) : (\r\n \r\n )}\r\n
\r\n
\r\n );\r\n}\r\n\r\nEmptyState.defaultProps = {\r\n router: {\r\n navigateToRoute: _.noop,\r\n },\r\n instrumentationLog: {\r\n SetUpConversionClicked: _.noop,\r\n CouponIsShown: _.noop,\r\n NoCoupon: _.noop,\r\n Error: _.noop,\r\n },\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n OverviewPageFluentV2: false,\r\n }),\r\n }),\r\n blockCard: _.noop,\r\n willFetchData: _.noop,\r\n renderedWithData: _.noop,\r\n unblockCard: _.noop,\r\n};\r\n\r\nEmptyState.propTypes = {\r\n newI18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n router: PropTypes.shape({\r\n navigateToRoute: PropTypes.func,\r\n }),\r\n instrumentationLog: PropTypes.shape({\r\n SetUpConversionClicked: PropTypes.func,\r\n CouponIsShown: PropTypes.func,\r\n NoCoupon: PropTypes.func,\r\n Error: PropTypes.func,\r\n }),\r\n pageContext: PropTypes.shape({\r\n CurrentCustomer: PropTypes.shape({\r\n Id: PropTypes.number.isRequired,\r\n }).isRequired,\r\n CurrentUser: PropTypes.shape({\r\n Id: PropTypes.number.isRequired,\r\n CurrencyCode: PropTypes.string.isRequired,\r\n }).isRequired,\r\n CurrentAccount: PropTypes.shape({\r\n Id: PropTypes.number.isRequired,\r\n CurrencyCode: PropTypes.string.isRequired,\r\n }).isRequired,\r\n CCBaseUrl: PropTypes.string.isRequired,\r\n }).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n OverviewPageFluentV2: PropTypes.bool,\r\n OverviewPageFluent2: PropTypes.bool,\r\n }),\r\n }),\r\n blockCard: PropTypes.func,\r\n willFetchData: PropTypes.func,\r\n renderedWithData: PropTypes.func,\r\n unblockCard: PropTypes.func,\r\n};\r\n\r\nexport default EmptyState;\r\n","export const defaultMetrics = [\r\n { key: 'ConversionsCredit', i18nKey: _TL_('Conversions') },\r\n { key: 'AdvertiserReportedRevenue', i18nKey: _TL_('Revenue') },\r\n];\r\n","import React, { useMemo } from 'react';\r\nimport classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\n\r\nfunction GridIncreaseCell(props) {\r\n const {\r\n item,\r\n rowClass,\r\n } = props;\r\n\r\n const space = useMemo(() => item.increaseSpace, [item.increaseSpace]);\r\n const bar = useMemo(() => item.increaseBar, [item.increaseBar]);\r\n\r\n return (\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n}\r\n\r\nGridIncreaseCell.defaultProps = {\r\n};\r\nGridIncreaseCell.propTypes = {\r\n rowClass: PropTypes.string.isRequired,\r\n item: PropTypes.shape({\r\n increaseSpace: PropTypes.number,\r\n increaseBar: PropTypes.number,\r\n }).isRequired,\r\n};\r\n\r\nexport default GridIncreaseCell;\r\n","import React, { useMemo } from 'react';\r\nimport classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\n\r\nfunction GridDeclineCell(props) {\r\n const {\r\n item,\r\n rowClass,\r\n } = props;\r\n\r\n const space = useMemo(() => item.declineSpace, [item.declineSpace]);\r\n const bar = useMemo(() => item.declineBar, [item.declineBar]);\r\n\r\n return (\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n}\r\n\r\nGridDeclineCell.defaultProps = {\r\n};\r\nGridDeclineCell.propTypes = {\r\n item: PropTypes.shape({\r\n declineSpace: PropTypes.number,\r\n declineBar: PropTypes.number,\r\n }).isRequired,\r\n rowClass: PropTypes.string.isRequired,\r\n};\r\n\r\nexport default GridDeclineCell;\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\n/* eslint-disable jsx-a11y/click-events-have-key-events */\r\n/* eslint-disable jsx-a11y/no-static-element-interactions */\r\nimport React, { useMemo, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { Constants } from '@bingads-webui-clientcenter/entity-utils';\r\nimport _ from 'underscore';\r\n\r\nfunction GridNameCell(props) {\r\n const {\r\n item,\r\n i18n,\r\n rowClass,\r\n GoalCategoryFilterStore,\r\n router,\r\n instrumentationLog,\r\n } = props;\r\n\r\n const nameCellData = useMemo(() => ({\r\n status: item.status,\r\n name: item.name,\r\n typeName: item.typeName,\r\n campaignType: item.campaignType,\r\n rawStatus: item.rawStatus,\r\n category: item.category,\r\n }), [item]);\r\n\r\n const isAccount = useMemo(() => item.typeName === 'Account', [item]);\r\n const { AccountActivityStatus } = Constants;\r\n\r\n const statusIcon = useMemo(() => {\r\n if (isAccount) {\r\n switch (nameCellData.status) {\r\n case AccountActivityStatus.Errors:\r\n return (
);\r\n case AccountActivityStatus.Deleted:\r\n return (
);\r\n case AccountActivityStatus.Enabled:\r\n return (
);\r\n default:\r\n return (
);\r\n }\r\n } else {\r\n return (
);\r\n }\r\n }, [AccountActivityStatus.Deleted, AccountActivityStatus.Enabled, AccountActivityStatus.Errors, isAccount, nameCellData.status]);\r\n\r\n const navigateToConversionGoals = useCallback(() => {\r\n if (router) {\r\n if (instrumentationLog) {\r\n instrumentationLog.GridNameClicked(nameCellData.name);\r\n }\r\n router.navigateToRoute('conversiongoals');\r\n }\r\n }, [instrumentationLog, nameCellData.name, router]);\r\n\r\n const updateFilterAndRoute = useCallback(() => {\r\n if (GoalCategoryFilterStore) {\r\n GoalCategoryFilterStore(nameCellData.category);\r\n }\r\n navigateToConversionGoals();\r\n }, [GoalCategoryFilterStore, nameCellData.category, navigateToConversionGoals]);\r\n return (\r\n
\r\n
\r\n {statusIcon}\r\n
\r\n {nameCellData.name}\r\n \r\n
\r\n );\r\n}\r\n\r\nGridNameCell.propTypes = {\r\n item: PropTypes.shape({\r\n status: PropTypes.string,\r\n name: PropTypes.string,\r\n category: PropTypes.string,\r\n typeName: PropTypes.string,\r\n campaignType: PropTypes.string,\r\n rawStatus: PropTypes.string,\r\n hideToolTip: PropTypes.bool,\r\n }),\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n rowClass: PropTypes.string,\r\n GoalCategoryFilterStore: PropTypes.func,\r\n router: PropTypes.shape({\r\n navigateToRoute: PropTypes.func,\r\n }),\r\n instrumentationLog: PropTypes.shape({\r\n GridNameClicked: PropTypes.func,\r\n }),\r\n};\r\nGridNameCell.defaultProps = {\r\n item: {},\r\n rowClass: '',\r\n GoalCategoryFilterStore: _.noop,\r\n router: {\r\n navigateToRoute: _.noop,\r\n },\r\n instrumentationLog: {\r\n GridNameClicked: _.noop,\r\n },\r\n};\r\n\r\nexport default GridNameCell;\r\n","import React, { useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n getComparisonDateRange,\r\n} from '@bingads-webui-campaign/overview-cards-common';\r\nimport { StringsMapping, metrici18nKeys } from '../../common/strings';\r\n\r\nfunction KpiGrid(props) {\r\n const {\r\n currentDate,\r\n compareDate,\r\n item,\r\n newI18n,\r\n metric,\r\n } = props;\r\n\r\n const changeString = useMemo(() => newI18n.getString(StringsMapping.Hover_Change, {\r\n value: item.formattedValue,\r\n percentageValue: item.formattedPercentageValue,\r\n }), [item.formattedPercentageValue, item.formattedValue, newI18n]);\r\n\r\n const metricCurrent = useMemo(\r\n () => newI18n.getString(metrici18nKeys[metric], { value: item.formattedMetrics }),\r\n [item.formattedMetrics, metric, newI18n]\r\n );\r\n\r\n const metricCompared = useMemo(\r\n () => newI18n.getString(metrici18nKeys[metric], { value: item.formattedPeriodMetrics }),\r\n [item.formattedPeriodMetrics, metric, newI18n]\r\n );\r\n\r\n return (\r\n
\r\n
\r\n
\r\n {currentDate}\r\n
\r\n {metricCurrent}\r\n
\r\n
\r\n
\r\n {compareDate}\r\n
\r\n {metricCompared}\r\n
\r\n
\r\n
\r\n {changeString}\r\n
\r\n\r\n
\r\n );\r\n}\r\n\r\nfunction GridHoverContainer(props) {\r\n const {\r\n isGrid,\r\n isIncrease,\r\n item,\r\n rowClass,\r\n newI18n,\r\n dateRange,\r\n metric,\r\n } = props;\r\n\r\n const startDate = useMemo(\r\n () =>\r\n newI18n.formatDate(dateRange.start),\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n [dateRange.start]\r\n );\r\n\r\n const endDate = useMemo(\r\n () =>\r\n newI18n.formatDate(dateRange.end),\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n [dateRange.end]\r\n );\r\n\r\n const compareDate = useMemo(\r\n () => {\r\n const comparisonDateRange = getComparisonDateRange(dateRange);\r\n const comparisonStartDate = newI18n.formatDate(comparisonDateRange.start);\r\n const comparisonEndDate = newI18n.formatDate(comparisonDateRange.end);\r\n if (startDate === endDate) {\r\n return comparisonStartDate;\r\n }\r\n return `${comparisonStartDate} - ${comparisonEndDate}`;\r\n },\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n [dateRange]\r\n );\r\n\r\n const currentDate = useMemo(\r\n () => {\r\n if (startDate === endDate) {\r\n return startDate;\r\n }\r\n return `${startDate} - ${endDate}`;\r\n },\r\n [startDate, endDate]\r\n );\r\n\r\n const hoverClassName = useMemo(\r\n () => {\r\n if (isGrid) {\r\n return 'graph-hover-target';\r\n }\r\n return 'pop-hover-target';\r\n },\r\n [isGrid]\r\n );\r\n\r\n const KpiColorClassName = useMemo(\r\n () => (isIncrease ? 'kpi-increased' : 'kpi-declined'),\r\n [isIncrease]\r\n );\r\n\r\n return (\r\n
\r\n
\r\n
\r\n
{item.name}
\r\n \r\n
\r\n
\r\n
\r\n );\r\n}\r\n\r\nGridHoverContainer.defaultProps = {\r\n isGrid: false,\r\n isIncrease: false,\r\n};\r\n\r\nGridHoverContainer.propTypes = {\r\n isGrid: PropTypes.bool,\r\n isIncrease: PropTypes.bool,\r\n rowClass: PropTypes.string.isRequired,\r\n item: PropTypes.shape({\r\n increaseSpace: PropTypes.number,\r\n increaseBar: PropTypes.number,\r\n name: PropTypes.string,\r\n }).isRequired,\r\n newI18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n formatDate: PropTypes.func.isRequired,\r\n }).isRequired,\r\n dateRange: PropTypes.shape({\r\n start: PropTypes.shape({}).isRequired,\r\n end: PropTypes.shape({}).isRequired,\r\n }).isRequired,\r\n metric: PropTypes.string.isRequired,\r\n};\r\n\r\nKpiGrid.defaultProps = {\r\n};\r\n\r\nKpiGrid.propTypes = {\r\n currentDate: PropTypes.string.isRequired,\r\n compareDate: PropTypes.string.isRequired,\r\n item: PropTypes.shape({\r\n formattedValue: PropTypes.string,\r\n formattedPercentageValue: PropTypes.string,\r\n formattedMetrics: PropTypes.string,\r\n formattedPeriodMetrics: PropTypes.string,\r\n }).isRequired,\r\n newI18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n formatDate: PropTypes.func.isRequired,\r\n }).isRequired,\r\n metric: PropTypes.string.isRequired,\r\n};\r\n\r\nexport default GridHoverContainer;\r\n","import React, { useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport GridIncreaseCell from './grid-increase-graph';\r\nimport GridDeclineCell from './grid-decline-graph';\r\nimport GridNameCell from './grid-name-cell';\r\nimport HoverContainer from './grid-hover-container';\r\n\r\nfunction GridPopCell(props) {\r\n const {\r\n item,\r\n rowClass,\r\n } = props;\r\n\r\n return (\r\n \r\n
{item.formattedValue}
\r\n
{item.formattedPercentageValue}
\r\n
{item.fromTo}
\r\n
\r\n );\r\n}\r\n\r\nGridPopCell.defaultProps = {\r\n};\r\nGridPopCell.propTypes = {\r\n item: PropTypes.shape({\r\n formattedValue: PropTypes.string.isRequired,\r\n formattedPercentageValue: PropTypes.string.isRequired,\r\n fromTo: PropTypes.string.isRequired,\r\n }).isRequired,\r\n rowClass: PropTypes.string.isRequired,\r\n};\r\n\r\nfunction GridRow(props) {\r\n const {\r\n item,\r\n index,\r\n i18n,\r\n newI18n,\r\n dateRange,\r\n metric,\r\n } = props;\r\n\r\n const rowClass = useMemo(() => `conversion-goals-grid-row-${index + 1}`, [index]);\r\n const isIncrease = useMemo(() => item.increaseSpace < 100, [item.increaseSpace]);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}\r\n\r\nGridRow.defaultProps = {\r\n};\r\n\r\nGridRow.propTypes = {\r\n item: PropTypes.shape({\r\n increaseSpace: PropTypes.number.isRequired,\r\n }).isRequired,\r\n index: PropTypes.number.isRequired,\r\n i18n: PropTypes.shape({}).isRequired,\r\n newI18n: PropTypes.shape({}).isRequired,\r\n dateRange: PropTypes.shape({}).isRequired,\r\n metric: PropTypes.string.isRequired,\r\n};\r\n\r\nexport default GridRow;\r\n","import React, { useMemo } from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport GridRow from './grid-row';\r\nimport { StringsMapping } from '../../common/strings';\r\nimport { BoldSyntax } from '../../common/util';\r\n\r\nfunction ConversionTrackingGrid(props) {\r\n const {\r\n deps,\r\n metric,\r\n processedData,\r\n newI18n,\r\n } = props;\r\n\r\n const metricName = useMemo(\r\n () =>\r\n (metric ? deps.s$i18n.property('PerformanceMetric', metric) : ''),\r\n [deps.s$i18n, metric]\r\n );\r\n const emptyText = useMemo(\r\n () => newI18n.getString(StringsMapping.Empty_Data),\r\n [newI18n]\r\n );\r\n\r\n const renderGridRows = useMemo(() => (\r\n _.size(processedData) === 0 ?\r\n
\r\n \r\n
:\r\n\r\n
\r\n {processedData.map((currentRow, index) => (index < 4 ?\r\n : null))}\r\n
), [emptyText, metricName, processedData, props]);\r\n\r\n return (\r\n
\r\n {renderGridRows}\r\n
\r\n );\r\n}\r\n\r\nConversionTrackingGrid.defaultProps = {\r\n emptyText: '',\r\n};\r\nConversionTrackingGrid.propTypes = {\r\n deps: PropTypes.shape({\r\n s$i18n: PropTypes.shape({\r\n property: PropTypes.func.isRequired,\r\n }).isRequired,\r\n }).isRequired,\r\n metric: PropTypes.string.isRequired,\r\n processedData: PropTypes.arrayOf(PropTypes.shape({\r\n })).isRequired,\r\n newI18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n emptyText: PropTypes.string,\r\n};\r\n\r\nexport default ConversionTrackingGrid;\r\n","// this is the error type of conversion goals\r\nimport { StringsMapping } from './strings';\r\n\r\nexport const ErrorType = {\r\n NoRecentConversion: 'NoRecentConversion',\r\n RecordingConversions: 'RecordingConversions',\r\n TagInactive: 'TagInactive',\r\n Unverified: 'Unverified',\r\n UnavailableTag: 'InactiveDueToTagUnavailable',\r\n};\r\n\r\nexport const Errors = {\r\n [ErrorType.NoRecentConversion]: {\r\n ClassName: 'no-recent-conversion',\r\n Title: StringsMapping.NoRecentConversion,\r\n Message: StringsMapping.StatusMessage_NoRecentConversion,\r\n Status: StringsMapping.Status_RecentConversions,\r\n },\r\n // No revenue attribute\r\n [ErrorType.RecordingConversions]: {\r\n ClassName: 'no-revenue-attribute',\r\n Title: StringsMapping.RecordingConversions,\r\n Message: StringsMapping.StatusMessage_RecordingConversions,\r\n Status: StringsMapping.Status_RecordingConversions,\r\n },\r\n [ErrorType.TagInactive]: {\r\n ClassName: 'tag-inactive',\r\n Title: StringsMapping.InactiveTag,\r\n Message: StringsMapping.StatusMessage_TagInactive,\r\n Status: StringsMapping.Status_Inactive,\r\n },\r\n [ErrorType.Unverified]: {\r\n ClassName: 'unverified-tags',\r\n Title: StringsMapping.UnverifiedTag,\r\n Message: StringsMapping.StatusMessage_Unverified,\r\n Status: StringsMapping.Status_Unverified,\r\n },\r\n [ErrorType.UnavailableTag]: {\r\n ClassName: 'unavailable-tags',\r\n Title: StringsMapping.UnavailableTag,\r\n Message: StringsMapping.StatusMessage_InactiveDueToTagUnavailable,\r\n Status: StringsMapping.Status_Unavailable,\r\n },\r\n};\r\n","import React, { useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Callout } from '@bingads-webui-react/callout';\r\nimport { withLock, keyVault } from '@bingads-webui-react/popup-manager';\r\n\r\nexport function PopupCallout(props) {\r\n const {\r\n title,\r\n content,\r\n target,\r\n close,\r\n popoverId,\r\n } = props;\r\n\r\n const { right } = target.getBoundingClientRect();\r\n const calloutMaxWidth = 325; // this value is defined in global style\r\n const placement = useMemo(() => (right + calloutMaxWidth > window.innerWidth ? 'left' : 'right'), [right]);\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n}\r\n\r\nPopupCallout.propTypes = {\r\n title: PropTypes.oneOfType([\r\n PropTypes.element.isRequired,\r\n PropTypes.string.isRequired,\r\n ]).isRequired,\r\n /**\r\n * the content element or text of the callout\r\n */\r\n content: PropTypes.oneOfType([\r\n PropTypes.element.isRequired,\r\n PropTypes.string.isRequired,\r\n ]).isRequired,\r\n /**\r\n * target of the callout, DOM element\r\n */\r\n target: PropTypes.instanceOf(Element).isRequired,\r\n /**\r\n * function called to remove callout\r\n */\r\n close: PropTypes.func.isRequired,\r\n /**\r\n * callout id\r\n */\r\n popoverId: PropTypes.string.isRequired,\r\n /**\r\n * view that has event triggered to close the popup\r\n */\r\n view: PropTypes.shape({\r\n on: PropTypes.func.isRequired,\r\n off: PropTypes.func.isRequired,\r\n }),\r\n};\r\n\r\nPopupCallout.defaultProps = {\r\n view: null,\r\n};\r\n\r\nexport const CalloutWithLock = withLock(PopupCallout, {\r\n lockKey: keyVault.hoveringPopup,\r\n force: true,\r\n});\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React, { useCallback, useMemo, useRef, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport className from 'classnames';\r\nimport { Link } from '@fluentui/react';\r\nimport { ErrorType, Errors } from '../../common/error-type';\r\nimport { StringsMapping } from '../../common/strings';\r\nimport { CalloutWithLock } from './popup';\r\n\r\nfunction PopupContent({\r\n bodyText, goalNames = [], newI18n, updateFilterAndRoute,\r\n}) {\r\n const goalList = useMemo(\r\n () => {\r\n if (goalNames.length === 0) {\r\n return null;\r\n }\r\n return (\r\n {goalNames.map(goalName =>\r\n (\r\n
  • \r\n {goalName}\r\n
  • \r\n \r\n ))\r\n }\r\n \r\n );\r\n }\r\n , [goalNames]\r\n );\r\n\r\n const seeAllText = useMemo(\r\n () => newI18n.getString(StringsMapping.See_All)\r\n , [newI18n]\r\n );\r\n return (\r\n \r\n
    \r\n {bodyText}\r\n {goalList}\r\n \r\n {seeAllText}\r\n \r\n
    \r\n
    \r\n );\r\n}\r\n\r\nfunction PopupContentNoRevenue({\r\n newI18n,\r\n}) {\r\n const noRevenueText = useMemo(\r\n () => newI18n.getString(StringsMapping.NoReveueText)\r\n , [newI18n]\r\n );\r\n\r\n return (\r\n \r\n
    \r\n {noRevenueText}\r\n \r\n {newI18n.getString(StringsMapping.Learn_More)}\r\n \r\n
    \r\n
    \r\n );\r\n}\r\n\r\n\r\nfunction Line(props) {\r\n const {\r\n number, type, newI18n, goalNames,\r\n TrackingTypeFilterStore,\r\n router,\r\n instrumentationLog,\r\n } = props;\r\n\r\n const [hoverCardStatus, setHoverCardStatus] = useState(false);\r\n\r\n const navigateToConversionGoals = useCallback(() => {\r\n if (router) {\r\n instrumentationLog.SeeAllClicked(type);\r\n router.navigateToRoute('conversiongoals');\r\n }\r\n }, [instrumentationLog, router, type]);\r\n\r\n const updateFilterAndRoute = useCallback(() => {\r\n if (TrackingTypeFilterStore) {\r\n TrackingTypeFilterStore(type);\r\n }\r\n navigateToConversionGoals();\r\n }, [TrackingTypeFilterStore, navigateToConversionGoals, type]);\r\n\r\n const formattedNumber = useMemo(\r\n () => `${newI18n.getString(StringsMapping.Number_Of_Goals, { number })}`,\r\n [newI18n, number]\r\n );\r\n const titleText = useMemo(\r\n () => newI18n.getString(Errors[type].Title),\r\n [newI18n, type]\r\n );\r\n const statusText = useMemo(\r\n () => newI18n.getString(Errors[type].Status),\r\n [newI18n, type]\r\n );\r\n const MessageText = useMemo(\r\n () => newI18n.getString(Errors[type].Message),\r\n [newI18n, type]\r\n );\r\n const errorClassName = useMemo(() => Errors[type].ClassName, [type]);\r\n\r\n const ref = useRef(null);\r\n\r\n const renderLine = useCallback(() => {\r\n if (type === ErrorType.RecordingConversions) {\r\n return (\r\n setHoverCardStatus(false)}\r\n >\r\n {`${formattedNumber}${statusText}`}\r\n {hoverCardStatus && }\r\n close={() => { setHoverCardStatus(false); }}\r\n popoverId={type}\r\n />}\r\n
    \r\n );\r\n }\r\n return (\r\n setHoverCardStatus(false)}\r\n >\r\n setHoverCardStatus(true)}\r\n ref={ref}\r\n >{formattedNumber}\r\n
    \r\n {statusText}\r\n {hoverCardStatus && }\r\n close={() => { setHoverCardStatus(false); }}\r\n popoverId={type}\r\n />}\r\n
    \r\n );\r\n }, [MessageText, errorClassName, formattedNumber, goalNames, hoverCardStatus, newI18n, statusText, titleText, type, updateFilterAndRoute]);\r\n\r\n return renderLine();\r\n}\r\n\r\nPopupContent.defaultProps = {\r\n bodyText: '',\r\n goalNames: [],\r\n updateFilterAndRoute: _.noop,\r\n};\r\n\r\nPopupContent.propTypes = {\r\n bodyText: PropTypes.string,\r\n goalNames: PropTypes.arrayOf(PropTypes.string),\r\n newI18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n updateFilterAndRoute: PropTypes.func,\r\n};\r\n\r\n\r\nPopupContentNoRevenue.propTypes = {\r\n newI18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n};\r\nexport default Line;\r\n","import _ from 'underscore';\r\nimport React, { useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport Line from './line';\r\nimport { ErrorType } from '../../common/error-type';\r\nimport { StringsMapping } from '../../common/strings';\r\n\r\nfunction StatusOverview(props) {\r\n const {\r\n newI18n,\r\n data,\r\n noConversionGoalsWithRevenue,\r\n TrackingTypeFilterStore,\r\n router,\r\n instrumentationLog,\r\n } = props;\r\n\r\n const title = useMemo(\r\n () =>\r\n newI18n.getString(StringsMapping.Status_Title),\r\n [newI18n]\r\n );\r\n const subtitle = useMemo(\r\n () =>\r\n newI18n.getString(StringsMapping.Status_Subtitle)\r\n , [newI18n]\r\n );\r\n const alertText = useMemo(\r\n () =>\r\n newI18n.getString(StringsMapping.Status_Alert)\r\n , [newI18n]\r\n );\r\n\r\n const alertNum = useMemo(\r\n () => _.reduce(data, (memo, status) => memo + status.GoalCount, 0),\r\n [data]\r\n );\r\n\r\n return (\r\n
    \r\n
    \r\n
    {alertText}
    \r\n
    {alertNum}
    \r\n
    \r\n
    \r\n
    \r\n
    {title}
    \r\n
    {subtitle}
    \r\n
    \r\n
    \r\n {_.map(data, (status, index) => (\r\n \r\n \r\n \r\n ))\r\n }\r\n {noConversionGoalsWithRevenue && (\r\n \r\n )}\r\n
    \r\n
    \r\n\r\n
    \r\n );\r\n}\r\nStatusOverview.defaultProps = {\r\n data: [],\r\n noConversionGoalsWithRevenue: false,\r\n TrackingTypeFilterStore: _.noop,\r\n router: { navigateToRoute: _.noop },\r\n instrumentationLog: { SeeAllClicked: _.noop },\r\n};\r\n\r\nStatusOverview.propTypes = {\r\n data: PropTypes.arrayOf(PropTypes.shape({\r\n GoalCount: PropTypes.number.isRequired,\r\n GoalNames: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n GoalTrackingStatus: PropTypes.string.isRequired,\r\n })),\r\n newI18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n noConversionGoalsWithRevenue: PropTypes.bool,\r\n TrackingTypeFilterStore: PropTypes.func,\r\n router: PropTypes.shape({\r\n navigateToRoute: PropTypes.func.isRequired,\r\n }),\r\n instrumentationLog: PropTypes.shape({\r\n SeeAllClicked: PropTypes.func.isRequired,\r\n }),\r\n};\r\n\r\nexport default StatusOverview;\r\n","import _ from 'underscore';\r\nimport React, { useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Button, Tooltip } from '@fluentui/react-components';\r\nimport { ChevronLeftRegular, ChevronRightRegular } from '@fluentui/react-icons';\r\nimport { IconButton, DefaultButton } from '@fluentui/react/lib/Button';\r\nimport { StringsMapping } from '../../common/strings';\r\n\r\nfunction ConversionTrackingFooter(props) {\r\n const {\r\n newI18n,\r\n pageNumber,\r\n setPageNumber,\r\n router,\r\n instrumentationLog,\r\n totalPageCount,\r\n permissions,\r\n } = props;\r\n\r\n const manageGoalsText = useMemo(\r\n () =>\r\n newI18n.getString(StringsMapping.Footer_ManageConversions),\r\n [newI18n]\r\n );\r\n\r\n const pageCount = useMemo(\r\n () =>\r\n newI18n.getString(\r\n StringsMapping.Footer_PageCount,\r\n { pageNumber: pageNumber + 1 }\r\n ),\r\n [newI18n, pageNumber]\r\n );\r\n\r\n const navigateToConversionGoals = useCallback(() => {\r\n if (router) {\r\n if (instrumentationLog) {\r\n instrumentationLog.ManageConversionsClicked();\r\n }\r\n router.navigateToRoute('conversiongoals');\r\n }\r\n }, [instrumentationLog, router]);\r\n\r\n const requiredPermission = permissions.dynamic.OverviewPageFluentV2 || permissions.dynamic.OverviewPageFluent2;\r\n\r\n if (totalPageCount === 1) {\r\n return (\r\n
    \r\n
    \r\n {requiredPermission ? (\r\n \r\n ) : (\r\n \r\n )}\r\n
    \r\n
    \r\n );\r\n }\r\n\r\n return (\r\n
    \r\n
    \r\n {requiredPermission ? (\r\n \r\n ) : (\r\n \r\n )}\r\n
    \r\n
    \r\n
    \r\n {pageCount}\r\n
    \r\n {requiredPermission ? (\r\n <>\r\n \r\n
    \r\n
    \r\n );\r\n}\r\n\r\nConversionTrackingFooter.defaultProps = {\r\n setPageNumber: _.noop,\r\n router: {\r\n navigateToRoute: _.noop,\r\n },\r\n instrumentationLog: {\r\n ManageConversionsClicked: _.noop,\r\n },\r\n totalPageCount: 1,\r\n};\r\nConversionTrackingFooter.propTypes = {\r\n newI18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n pageNumber: PropTypes.number.isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n OverviewPageFluentV2: PropTypes.bool,\r\n OverviewPageFluent2: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n setPageNumber: PropTypes.func,\r\n router: PropTypes.shape({\r\n navigateToRoute: PropTypes.func,\r\n }),\r\n instrumentationLog: PropTypes.shape({\r\n ManageConversionsClicked: PropTypes.func,\r\n }),\r\n totalPageCount: PropTypes.number,\r\n};\r\n\r\nexport default ConversionTrackingFooter;\r\n","/* eslint-disable jsx-a11y/no-static-element-interactions */\r\n/* eslint-disable jsx-a11y/click-events-have-key-events */\r\n/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React, { useState, useEffect, useCallback, useRef, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nfunction useOutsideAlerter(ref, setShowDropDown) {\r\n useEffect(() => {\r\n function handleClickOutside(event) {\r\n if (ref.current && !ref.current.contains(event.target)) {\r\n setShowDropDown(false);\r\n }\r\n }\r\n // Bind the event listener\r\n document.addEventListener('click', handleClickOutside);\r\n return () => {\r\n // Unbind the event listener on clean up\r\n document.removeEventListener('click', handleClickOutside);\r\n };\r\n }, [ref, setShowDropDown]);\r\n}\r\n\r\n\r\nfunction GridMetricPicker(props) {\r\n const {\r\n metrics,\r\n newI18n,\r\n updateMetric,\r\n } = props;\r\n\r\n const [showDropDown, setShowDropDown] = useState(false);\r\n const [selectedMetric, setSelectedMetric] = useState(metrics[0]);\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n const selectedMetricText = useMemo(() => newI18n.getString(selectedMetric.i18nKey), [selectedMetric.i18nKey]);\r\n\r\n const selectNewMetric = useCallback((metric) => {\r\n if (updateMetric) {\r\n updateMetric(metric.key);\r\n }\r\n setShowDropDown(false);\r\n setSelectedMetric(metric);\r\n }, [updateMetric]);\r\n\r\n\r\n const listItems = useMemo(() => metrics.map(metric => (\r\n
  • \r\n { selectNewMetric(metric); }}>\r\n {newI18n.getString(metric.i18nKey)}\r\n \r\n
  • \r\n )), [metrics, newI18n, selectNewMetric]);\r\n\r\n\r\n const ref = useRef(null);\r\n useOutsideAlerter(ref, setShowDropDown);\r\n\r\n return (\r\n
    \r\n
    \r\n { setShowDropDown(!showDropDown); }}\r\n >\r\n
    \r\n {selectedMetricText}\r\n
    \r\n \r\n
    \r\n {showDropDown &&
      {listItems}
    }\r\n
    \r\n
    \r\n );\r\n}\r\n\r\nGridMetricPicker.defaultProps = {\r\n updateMetric: undefined,\r\n};\r\nGridMetricPicker.propTypes = {\r\n metrics: PropTypes.arrayOf(PropTypes.shape({\r\n key: PropTypes.string.isRequired,\r\n i18nKey: PropTypes.string.isRequired,\r\n })).isRequired,\r\n updateMetric: PropTypes.func,\r\n newI18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n};\r\n\r\nexport default GridMetricPicker;\r\n","import React, { useState, useCallback, useMemo } from 'react';\r\nimport { Dropdown } from '@fluentui/react/lib/Dropdown';\r\nimport PropTypes from 'prop-types';\r\n\r\nconst dropdownStyles = {\r\n dropdown: {\r\n width: 120,\r\n border: 'none',\r\n boxShadow: 'none',\r\n outline: 'none',\r\n selectors: {\r\n ':focus': {\r\n outline: 'none',\r\n },\r\n ':focus:after': {\r\n border: 'none',\r\n outline: 'none',\r\n },\r\n },\r\n },\r\n title: {\r\n border: 'none',\r\n boxShadow: 'none',\r\n outline: 'none',\r\n selectors: {\r\n ':focus': {\r\n outline: 'none',\r\n border: 'none',\r\n boxShadow: 'none',\r\n },\r\n ':focus-visible': {\r\n outline: 'none',\r\n border: 'none',\r\n boxShadow: 'none',\r\n },\r\n },\r\n },\r\n root: {\r\n border: 'none',\r\n boxShadow: 'none',\r\n outline: 'none',\r\n },\r\n callout: {\r\n border: 'none',\r\n boxShadow: 'none',\r\n outline: 'none',\r\n },\r\n caretDown: {\r\n border: 'none',\r\n boxShadow: 'none',\r\n outline: 'none',\r\n },\r\n};\r\n\r\nfunction MetricPicker(props) {\r\n const { metrics, newI18n, updateMetric } = props;\r\n\r\n const [selectedMetric, setSelectedMetric] = useState(metrics[0]);\r\n\r\n const options = useMemo(() => metrics.map(metric => ({\r\n key: metric.key,\r\n text: newI18n.getString(metric.i18nKey),\r\n })), [metrics, newI18n]);\r\n\r\n const handleChange = useCallback((event, option) => {\r\n const metric = metrics.find(m => m.key === option.key);\r\n if (updateMetric && metric) {\r\n updateMetric(metric.key);\r\n }\r\n setSelectedMetric(metric);\r\n }, [metrics, updateMetric]);\r\n\r\n return (\r\n \r\n );\r\n}\r\n\r\nMetricPicker.defaultProps = {\r\n updateMetric: undefined,\r\n};\r\n\r\nMetricPicker.propTypes = {\r\n metrics: PropTypes.arrayOf(PropTypes.shape({\r\n key: PropTypes.string.isRequired,\r\n i18nKey: PropTypes.string.isRequired,\r\n })).isRequired,\r\n updateMetric: PropTypes.func,\r\n newI18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n};\r\n\r\nexport default MetricPicker;\r\n","\r\nimport React, { useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n getComparisonDateRange,\r\n getPopDescription,\r\n} from '@bingads-webui-campaign/overview-cards-common';\r\nimport { HelpButton } from '@bingads-webui-react/help-popup';\r\nimport GridMetricPicker from './grid-metric-picker';\r\nimport GridPicker from './grid-metric-picker-fluent';\r\n\r\nfunction GridHeader(props) {\r\n const {\r\n dateRange,\r\n i18n,\r\n permissions,\r\n } = props;\r\n\r\n const comparisonDateRange = useMemo(\r\n () =>\r\n getComparisonDateRange(dateRange),\r\n [dateRange]\r\n );\r\n\r\n const popDescription = useMemo(\r\n () =>\r\n getPopDescription(i18n, comparisonDateRange),\r\n [i18n, comparisonDateRange]\r\n );\r\n\r\n const requiredPermission = permissions.dynamic.OverviewPageFluentV2 || permissions.dynamic.OverviewPageFluent2;\r\n\r\n return (\r\n
    \r\n
    \r\n {popDescription}\r\n \r\n
    \r\n\r\n {requiredPermission ? : }\r\n
    \r\n );\r\n}\r\n\r\nGridHeader.defaultProps = {\r\n};\r\nGridHeader.propTypes = {\r\n dateRange: PropTypes.shape({\r\n RangeEndDate: PropTypes.string,\r\n RangeStartDate: PropTypes.string,\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n }).isRequired,\r\n newI18n: PropTypes.shape({\r\n }).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n OverviewPageFluentV2: PropTypes.bool,\r\n OverviewPageFluent2: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n};\r\n\r\nexport default GridHeader;\r\n","import _ from 'underscore';\r\nimport React, { useState, useEffect, useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n coerceStatus,\r\n} from '@bingads-webui-campaign/overview-cards-common';\r\nimport { defaultMetrics } from '../common/metrics';\r\nimport ConversionTrackingGrid from './react-grid/react-grid';\r\nimport StatusOverview from './conversion-error-overview/status-overview';\r\nimport ConversionTrackingFooter from './conversion-error-overview/footer';\r\nimport GridHeader from './react-grid/grid-header';\r\nimport { GoalCategory } from '../common/strings';\r\n\r\nfunction processGridData({\r\n metric,\r\n data,\r\n entitySet,\r\n deps,\r\n newI18n,\r\n}) {\r\n const {\r\n metricFormatter,\r\n i18n,\r\n instrumentation,\r\n constants,\r\n } = deps;\r\n\r\n if (data === undefined || data === null) {\r\n return undefined;\r\n } else if (_.size(data) === 0) {\r\n return [];\r\n }\r\n\r\n _.each(data, (entity) => {\r\n if (!entity.PerformanceMetricsChange) {\r\n instrumentation.logMessage([constants.LOGCATEGORY.ERROR], constants.LOGLEVEL.INFO, 'conversion-tracking-card', JSON.stringify(entity));\r\n }\r\n });\r\n\r\n const maxChange = Math.abs(_.max(data, ({\r\n PerformanceMetricsChange: { [metric]: value },\r\n }) => Math.abs(value)).PerformanceMetricsChange[metric]);\r\n\r\n return _.map(data, (entity) => {\r\n const formattedPeriodMetrics = metricFormatter.formatMetric(\r\n metric,\r\n entity.PeriodPerformanceMetrics[metric],\r\n { currency: entity.Currency }\r\n );\r\n const formattedMetrics = metricFormatter.formatMetric(\r\n metric,\r\n entity.PerformanceMetrics[metric],\r\n { currency: entity.Currency }\r\n );\r\n const value = entity.PerformanceMetricsChange[metric];\r\n let declineBar = 0;\r\n let declineSpace = 100;\r\n let increaseBar = 0;\r\n let increaseSpace = 100;\r\n\r\n if (maxChange !== 0) {\r\n if (value < 0) {\r\n declineBar = Math.ceil(-(value * 100) / maxChange);\r\n declineSpace = 100 - declineBar;\r\n } else {\r\n increaseBar = Math.ceil((value * 100) / maxChange);\r\n increaseSpace = 100 - increaseBar;\r\n }\r\n }\r\n\r\n const typeName = entitySet.type.elementType.shortName;\r\n const i18nString = GoalCategory[entity.Id] || entity.Id;\r\n return {\r\n name: newI18n.getString(i18nString),\r\n category: entity.Id,\r\n status: coerceStatus(entity.Status, entity.AccountInactiveReasons),\r\n value,\r\n formattedValue: metricFormatter.formatMetricWithSign(\r\n metric,\r\n entity.PerformanceMetricsChange[metric],\r\n { currency: entity.Currency }\r\n ),\r\n formattedPercentageValue: metricFormatter\r\n .formatChangePercentageWithSign(entity.PerformanceMetricsChangePercentage[metric]),\r\n fromTo: i18n.getString('Dashboard_Cards_FromTo', { fromValue: formattedPeriodMetrics, toValue: formattedMetrics }),\r\n campaignType: entity.CampaignType,\r\n typeName,\r\n formattedMetrics,\r\n formattedPeriodMetrics,\r\n declineBar,\r\n declineSpace,\r\n increaseBar,\r\n increaseSpace,\r\n rawStatus: entity.Status,\r\n };\r\n });\r\n}\r\n\r\n\r\nfunction ConversionTrackingState(props) {\r\n const {\r\n metric,\r\n categoryResults,\r\n statusSummaries,\r\n noConversionGoalsWithRevenue,\r\n dateRange,\r\n\r\n updateCurrentMenuItems,\r\n updateMetric,\r\n\r\n deps,\r\n entitySet,\r\n i18n,\r\n newI18n,\r\n permissions,\r\n instrumentationLog,\r\n TrackingTypeFilterStore,\r\n GoalCategoryFilterStore,\r\n } = props;\r\n\r\n const processedResults = useMemo(() => processGridData({\r\n deps,\r\n metric,\r\n data: categoryResults,\r\n entitySet,\r\n newI18n,\r\n }), [deps, metric, categoryResults, entitySet, newI18n]);\r\n\r\n const totalPageCount = useMemo(() => {\r\n if (_.size(statusSummaries) === 0) {\r\n return 1;\r\n }\r\n return 2;\r\n }, [statusSummaries]);\r\n\r\n const [pageNumber, setPageNumber] = useState(totalPageCount === 1 ? 1 : 0);\r\n\r\n useEffect(() => {\r\n if (pageNumber === 0) {\r\n updateCurrentMenuItems(false);\r\n } else {\r\n updateCurrentMenuItems(true);\r\n }\r\n }, [pageNumber, updateCurrentMenuItems]);\r\n\r\n const renderContent = useCallback(() => {\r\n if (pageNumber === 0) {\r\n return (\r\n \r\n );\r\n }\r\n return (\r\n \r\n \r\n \r\n \r\n );\r\n }, [GoalCategoryFilterStore, TrackingTypeFilterStore, dateRange, deps, i18n, instrumentationLog, metric, newI18n, noConversionGoalsWithRevenue, pageNumber, permissions, processedResults, statusSummaries, updateMetric]);\r\n\r\n return (\r\n
    \r\n {renderContent()}\r\n \r\n
    \r\n );\r\n}\r\n\r\nConversionTrackingState.defaultProps = {\r\n updateCurrentMenuItems: _.noop,\r\n instrumentationLog: {\r\n SetUpConversionTracking: _.noop,\r\n CouponIsShown: _.noop,\r\n NoCoupon: _.noop,\r\n ManageConversionsClick: _.noop,\r\n SeeAllClicked: _.noop,\r\n Error: _.noop,\r\n },\r\n\r\n updateMetric: _.noop,\r\n categoryResults: [],\r\n statusSummaries: [],\r\n noConversionGoalsWithRevenue: false,\r\n dateRange: {},\r\n TrackingTypeFilterStore: _.noop,\r\n GoalCategoryFilterStore: _.noop,\r\n\r\n};\r\nConversionTrackingState.propTypes = {\r\n metric: PropTypes.string.isRequired,\r\n categoryResults: PropTypes.arrayOf(PropTypes.shape({\r\n })),\r\n statusSummaries: PropTypes.arrayOf(PropTypes.shape({\r\n GoalCount: PropTypes.number,\r\n GoalNames: PropTypes.arrayOf(PropTypes.string),\r\n GoalTrackingStatus: PropTypes.string,\r\n })),\r\n noConversionGoalsWithRevenue: PropTypes.bool,\r\n\r\n dateRange: PropTypes.shape({\r\n RangeStartDate: PropTypes.string.isRequired,\r\n RangeEndDate: PropTypes.string.isRequired,\r\n }),\r\n updateCurrentMenuItems: PropTypes.func,\r\n\r\n deps: PropTypes.shape({\r\n metricFormatter: PropTypes.shape({\r\n formatMetric: PropTypes.func.isRequired,\r\n formatMetricWithSign: PropTypes.func.isRequired,\r\n formatChangePercentageWithSign: PropTypes.func.isRequired,\r\n }).isRequired,\r\n legacyRouter: PropTypes.shape({\r\n navigateToRoute: PropTypes.func.isRequired,\r\n }).isRequired,\r\n pageContext: PropTypes.shape({\r\n accountId: PropTypes.string,\r\n adgroupId: PropTypes.string,\r\n campaignId: PropTypes.string,\r\n }).isRequired,\r\n }).isRequired,\r\n\r\n\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 permissions: PropTypes.shape({}).isRequired,\r\n\r\n instrumentationLog: PropTypes.shape({\r\n SetUpConversionTracking: PropTypes.func,\r\n CouponIsShown: PropTypes.func,\r\n NoCoupon: PropTypes.func,\r\n ManageConversionsClick: PropTypes.func,\r\n SeeAllClicked: PropTypes.func,\r\n Error: PropTypes.func,\r\n }),\r\n\r\n updateMetric: PropTypes.func,\r\n TrackingTypeFilterStore: PropTypes.func,\r\n GoalCategoryFilterStore: PropTypes.func,\r\n entitySet: PropTypes.shape({}).isRequired,\r\n};\r\n\r\nexport default ConversionTrackingState;\r\n","import _ from 'underscore';\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n ConversionFilterOption,\r\n conversionDefaultOptions,\r\n} from '@bingads-webui-campaign/overview-cards-common';\r\nimport { InstrumentationLog } from '../common/instrumentation';\r\nimport EmptyState from './empty-state';\r\nimport ConversionTrackingState from './conversion-tracking-state';\r\nimport { StringsMapping } from '../common/strings';\r\n\r\nclass ConversionTrackingCard extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n const {\r\n metric,\r\n selectedMenuItem,\r\n dateRange,\r\n fetch, // fetch for conversion tracking data\r\n fetchSingleTile,\r\n\r\n i18n,\r\n newI18n,\r\n deps,\r\n entitySet,\r\n permissions,\r\n\r\n triggerChangeMenuItem,\r\n triggerChangeMetric,\r\n TrackingTypeFilterStore,\r\n GoalCategoryFilterStore,\r\n\r\n blockCard,\r\n willFetchData,\r\n renderedWithData,\r\n unblockCard,\r\n } = props;\r\n\r\n this.fetch = fetch;\r\n this.state = {\r\n dataLoaded: false,\r\n dateRange,\r\n metric: metric || conversionDefaultOptions.metric, // grid data type\r\n selectedMenuItem: selectedMenuItem || conversionDefaultOptions.selectedMenuItem, // tile dropdown\r\n data: {},\r\n };\r\n\r\n this.i18n = i18n;\r\n this.newI18n = newI18n;\r\n this.deps = deps;\r\n this.instrumentationLog = InstrumentationLog({\r\n instrumentation: deps.instrumentation,\r\n constants: deps.constants,\r\n });\r\n\r\n this.permissions = permissions;\r\n this.entitySet = entitySet;\r\n this.triggerChangeMenuItem = triggerChangeMenuItem;\r\n this.triggerChangeMetric = triggerChangeMetric;\r\n\r\n this.defaultMenuItems = [{\r\n displayText: this.newI18n.getString(StringsMapping.All_Change),\r\n action: ConversionFilterOption.AllChanges,\r\n }, {\r\n displayText: this.newI18n.getString(StringsMapping.Top_Gainers),\r\n action: ConversionFilterOption.TopGainers,\r\n }, {\r\n displayText: this.newI18n.getString(StringsMapping.Top_Decliners),\r\n action: ConversionFilterOption.TopDecliners,\r\n }];\r\n\r\n this.currentMenuItems = [];\r\n\r\n this.blockCard = blockCard;\r\n this.willFetchData = willFetchData;\r\n this.renderedWithData = renderedWithData;\r\n this.unblockCard = unblockCard;\r\n this.TrackingTypeFilterStore = TrackingTypeFilterStore;\r\n this.GoalCategoryFilterStore = GoalCategoryFilterStore;\r\n this.fetchSingleTile = fetchSingleTile;\r\n }\r\n\r\n componentDidMount() {\r\n this.fetchTileData(this.fetchSingleTile);\r\n }\r\n\r\n\r\n componentDidUpdate(prevProps, prevState) {\r\n if (this.isDataFetchRequired(prevState)) {\r\n const fetchSingleTile = this.isFetchSingleTile(prevState);\r\n this.fetchTileData(fetchSingleTile);\r\n }\r\n }\r\n\r\n getMenuItems = () => this.currentMenuItems;\r\n\r\n isDataFetchRequired = (prevState) => {\r\n const {\r\n dateRange: prevDateRange,\r\n selectedMenuItem: prevMenuItem,\r\n metric: prevMetric,\r\n } = prevState;\r\n\r\n const {\r\n dateRange,\r\n selectedMenuItem,\r\n metric,\r\n } = this.state;\r\n\r\n if (metric === prevMetric && selectedMenuItem === prevMenuItem && _.isEqual(dateRange, prevDateRange)) {\r\n return false;\r\n }\r\n return true;\r\n };\r\n\r\n isFetchSingleTile = (prevState) => {\r\n const {\r\n dateRange: prevDateRange,\r\n } = prevState;\r\n\r\n const {\r\n dateRange,\r\n } = this.state;\r\n\r\n if (!_.isEqual(dateRange, prevDateRange)) {\r\n return false;\r\n }\r\n return true;\r\n };\r\n\r\n updateCurrentMenuItems = (isMenuItemNeeded) => {\r\n if (isMenuItemNeeded) {\r\n const { selectedMenuItem } = this.state;\r\n this.currentMenuItems = this.defaultMenuItems;\r\n _.each(this.currentMenuItems, (item) => {\r\n if (item.action === selectedMenuItem) {\r\n // eslint-disable-next-line no-param-reassign\r\n item.preset = true;\r\n } else {\r\n // eslint-disable-next-line no-param-reassign\r\n item.preset = false;\r\n }\r\n });\r\n this.triggerChangeMenuItem(this.currentMenuItems);\r\n } else {\r\n this.currentMenuItems = [];\r\n this.triggerChangeMenuItem(this.currentMenuItems);\r\n }\r\n };\r\n\r\n fetchTileData = (fetchSingleTile) => {\r\n const {\r\n dateRange,\r\n selectedMenuItem,\r\n metric,\r\n } = this.state;\r\n\r\n if (!dateRange) { return; }\r\n if (!this.fetch) { return; }\r\n\r\n this.blockCard();\r\n this.willFetchData();\r\n\r\n this.fetch({\r\n dateRange,\r\n metric,\r\n selectedMenuItem,\r\n fetchSingleTile,\r\n }).then((data) => {\r\n if (data) {\r\n this.setState({\r\n dataLoaded: true,\r\n data,\r\n });\r\n }\r\n }).finally(() => {\r\n this.renderedWithData();\r\n this.unblockCard();\r\n });\r\n };\r\n\r\n handleUpdate = ({ dateRange, metric, selectedMenuItem }) => {\r\n if (dateRange) {\r\n this.setState({ dateRange });\r\n } else if (metric) {\r\n this.setState({ metric });\r\n } else if (selectedMenuItem) {\r\n this.setState({ selectedMenuItem });\r\n this.updateCurrentMenuItems(true);\r\n }\r\n };\r\n\r\n render() {\r\n const { dataLoaded } = this.state;\r\n if (!dataLoaded) {\r\n return (
    );\r\n }\r\n\r\n const {\r\n data: {\r\n ConversionGoalCategoryResults,\r\n ConversionGoalTrackingStatusSummaries,\r\n NoConversionGoalsExist,\r\n NoConversionGoalsWithRevenue,\r\n },\r\n } = this.state;\r\n\r\n const {\r\n newI18n,\r\n i18n,\r\n permissions,\r\n deps,\r\n instrumentationLog,\r\n } = this;\r\n\r\n if (NoConversionGoalsExist) {\r\n this.updateCurrentMenuItems(false);\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n const {\r\n dateRange,\r\n metric,\r\n selectedMenuItem,\r\n } = this.state;\r\n\r\n const {\r\n entitySet,\r\n updateCurrentMenuItems,\r\n TrackingTypeFilterStore,\r\n GoalCategoryFilterStore,\r\n } = this;\r\n\r\n return (\r\n { this.handleUpdate({ metric: newMetric }); }}\r\n\r\n deps={deps}\r\n entitySet={entitySet}\r\n i18n={i18n}\r\n newI18n={newI18n}\r\n permissions={permissions}\r\n instrumentationLog={instrumentationLog}\r\n TrackingTypeFilterStore={TrackingTypeFilterStore}\r\n GoalCategoryFilterStore={GoalCategoryFilterStore}\r\n />\r\n );\r\n }\r\n}\r\n\r\nConversionTrackingCard.defaultProps = {\r\n metric: conversionDefaultOptions.metric,\r\n selectedMenuItem: conversionDefaultOptions.selectedMenuItem,\r\n dateRange: {},\r\n triggerChangeMenuItem: _.noop,\r\n blockCard: _.noop,\r\n willFetchData: _.noop,\r\n renderedWithData: _.noop,\r\n unblockCard: _.noop,\r\n triggerChangeMetric: _.noop,\r\n fetch: _.noop,\r\n TrackingTypeFilterStore: _.noop,\r\n GoalCategoryFilterStore: _.noop,\r\n fetchSingleTile: false,\r\n};\r\n\r\nConversionTrackingCard.propTypes = {\r\n metric: PropTypes.string,\r\n selectedMenuItem: PropTypes.string,\r\n fetchSingleTile: PropTypes.bool,\r\n dateRange: PropTypes.shape({\r\n RangeStartDate: PropTypes.string,\r\n RangeEndDate: PropTypes.string,\r\n RangeId: PropTypes.number,\r\n Rangelcid: PropTypes.number,\r\n compared: PropTypes.bool,\r\n start: PropTypes.objectOf(Date),\r\n end: PropTypes.objectOf(Date),\r\n grain: PropTypes.number,\r\n }),\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n deps: PropTypes.shape({\r\n constants: PropTypes.shape({}).isRequired,\r\n instrumentation: PropTypes.shape({}).isRequired,\r\n }).isRequired,\r\n entitySet: PropTypes.shape({}).isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n triggerChangeMenuItem: PropTypes.func,\r\n blockCard: PropTypes.func,\r\n willFetchData: PropTypes.func,\r\n renderedWithData: PropTypes.func,\r\n unblockCard: PropTypes.func,\r\n newI18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n triggerChangeMetric: PropTypes.func,\r\n fetch: PropTypes.func,\r\n TrackingTypeFilterStore: PropTypes.func,\r\n GoalCategoryFilterStore: PropTypes.func,\r\n};\r\n\r\nexport default ConversionTrackingCard;\r\n","export const InstrumentationLog = ({ instrumentation, constants }) => ({\r\n SetUpConversionClicked: (hasCoupons) => {\r\n instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'conversion-tracking-card', `Set up conversions is clicked ${hasCoupons ? 'with coupons' : 'without coupons'}`);\r\n },\r\n CouponIsShown: () => {\r\n instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'conversion-tracking-card', 'Coupon is shown - setup page');\r\n },\r\n NoCoupon: () => {\r\n instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'conversion-tracking-card', 'No Coupon - setup page');\r\n },\r\n ManageConversionsClicked: () => {\r\n instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'conversion-tracking-card', 'Manage conversions is clicked');\r\n },\r\n SeeAllClicked: (errorType) => {\r\n instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'conversion-tracking-card', `See all is clicked for type ${errorType}`);\r\n },\r\n GridNameClicked: (category) => {\r\n instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'conversion-tracking-card', `Grid name is clicked for type ${category}`);\r\n },\r\n Error: (response) => {\r\n instrumentation.logMessage([constants.LOGCATEGORY.ERROR], constants.LOGLEVEL.INFO, 'conversion-tracking-card-error', response);\r\n },\r\n});\r\n","/* eslint-disable jsx-a11y/anchor-has-content */\r\n/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport _ from 'underscore';\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport { BaseCard } from '@bingads-webui-campaign/overview-base-card';\r\nimport { fetchConversionTracking, getConversionGoalsFilterStore } from '@bingads-webui-campaign/overview-cards-common';\r\nimport { HelpLink } from '@bingads-webui-react/help-link';\r\nimport ConversionTrackingCardReact from './conversion-tracking-card-react/conversion-tracking-card';\r\n\r\nconst layoutSize = {\r\n small: 0,\r\n large: 1,\r\n};\r\nconst layoutBreakPoint = 800;\r\n\r\nfunction getLayoutSize() {\r\n if (this.$el.closest('.card-holder__wrapper').outerWidth() < layoutBreakPoint) {\r\n return layoutSize.small;\r\n }\r\n return layoutSize.large;\r\n}\r\n\r\nconst conversionTileFetch = ({\r\n entitySet,\r\n filter,\r\n jsdata,\r\n getCardsConfig,\r\n dateUtil,\r\n permissions,\r\n disableCache,\r\n cacheManager,\r\n accountsMode,\r\n typeId,\r\n}) => {\r\n const fetch = ({\r\n dateRange,\r\n metric,\r\n selectedMenuItem,\r\n fetchSingleTile = false,\r\n }) => fetchConversionTracking({\r\n dateRange,\r\n selectedMenuItem,\r\n metric,\r\n\r\n entitySet,\r\n filter,\r\n jsdata,\r\n getCardsConfig,\r\n dateUtil,\r\n fetchSingleTile,\r\n permissions,\r\n disableCache,\r\n cacheManager,\r\n accountsMode,\r\n dfmCacheKey: typeId,\r\n });\r\n\r\n return fetch;\r\n};\r\n\r\nexport class ConversionTrackingCard extends BaseCard {\r\n get className() {\r\n return 'conversion-tracking-card';\r\n }\r\n\r\n get menuItems() {\r\n if (this.viewRef.current) {\r\n const items = this.viewRef.current.getMenuItems();\r\n if (_.isEmpty(items)) {\r\n return null;\r\n }\r\n return items;\r\n }\r\n return null;\r\n }\r\n\r\n onMenuAction(menuItem) {\r\n if (this.viewRef.current) {\r\n const { selectedMenuItem } = this.viewRef.current.state;\r\n if (selectedMenuItem === menuItem) {\r\n return;\r\n }\r\n this.viewRef.current.handleUpdate({\r\n selectedMenuItem: menuItem,\r\n });\r\n }\r\n }\r\n\r\n getCardPreference() {\r\n if (this.viewRef.current) {\r\n const { selectedMenuItem, metric } = this.getState();\r\n\r\n return {\r\n metric,\r\n selectedMenuItem,\r\n };\r\n }\r\n return {};\r\n }\r\n\r\n initialize(props) {\r\n const {\r\n // entitySet,\r\n // metric,\r\n // selectedMenuItem,\r\n // dateRange,\r\n // filter,\r\n perfMarker,\r\n name,\r\n sharedOptions,\r\n deps,\r\n // accountsMode,\r\n // scope,\r\n // dismissLastFluctuation = false,\r\n // typeId,\r\n // newI18n,\r\n preferenceService,\r\n } = props;\r\n\r\n const {\r\n i18n,\r\n jsdata,\r\n dateUtil,\r\n cacheManager,\r\n config,\r\n } = deps;\r\n\r\n const permissions = config && config.get('Permissions');\r\n const { getCardsConfig } = sharedOptions;\r\n this.initPerfMarker({ perfMarker, name });\r\n this.viewRef = React.createRef();\r\n const conversionGoalsFilterStore = getConversionGoalsFilterStore({ preferenceService });\r\n\r\n this.view = (\r\n \r\n \r\n {\r\n this.trigger('change:menuItems', {\r\n value: menuItems,\r\n options: { replace: true },\r\n });\r\n }}\r\n triggerChangeMetric={(newMetric) => {\r\n this.trigger('pick', {\r\n metric: newMetric,\r\n });\r\n }}\r\n triggerPreferenceChange={() => {\r\n this.trigger('storeCardPreference', this.getCardPreference());\r\n }}\r\n blockCard={() => {\r\n this.blockCard();\r\n }}\r\n willFetchData={() => {\r\n this.willFetchData();\r\n }}\r\n renderedWithData={() => {\r\n this.renderedWithData();\r\n }}\r\n unblockCard={() => {\r\n this.unblockCard();\r\n }}\r\n TrackingTypeFilterStore={(errorType) => {\r\n if (errorType) {\r\n const newErrorTypeFilter = {\r\n TrackingStatus: {\r\n $in: [`Enum.GoalTrackingStatus'${errorType}'`],\r\n },\r\n };\r\n\r\n conversionGoalsFilterStore.save({ query: newErrorTypeFilter });\r\n }\r\n }}\r\n GoalCategoryFilterStore={(category) => {\r\n if (category) {\r\n const newCategoryFilter = {\r\n GoalCategory: {\r\n $in: [`Enum.GoalCategory'${category}'`],\r\n },\r\n };\r\n\r\n conversionGoalsFilterStore.save({ query: newCategoryFilter });\r\n }\r\n }}\r\n />\r\n \r\n );\r\n\r\n this.onResize(() => {\r\n this.relayout();\r\n });\r\n }\r\n\r\n relayout() {\r\n const newLayoutSize = getLayoutSize.call(this);\r\n\r\n if (this.currentLayoutSize === newLayoutSize) {\r\n return;\r\n }\r\n\r\n if (newLayoutSize === layoutSize.small) {\r\n this.$el.addClass('small_layout');\r\n } else {\r\n this.$el.removeClass('small_layout');\r\n }\r\n\r\n this.currentLayoutSize = newLayoutSize;\r\n }\r\n\r\n setState(state) {\r\n if (this.viewRef.current) {\r\n this.viewRef.current.handleUpdate(state);\r\n }\r\n return this;\r\n }\r\n\r\n renderTrunk() {\r\n ReactDOM.render(this.view, this.el);\r\n _.defer(() => {\r\n this.relayout();\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 _ from 'underscore';\r\nimport React, { useEffect, useCallback } from 'react';\r\nimport classNames from 'classnames';\r\nimport { makeStyles } from '@fluentui/react-components';\r\nimport PropTypes from 'prop-types';\r\nimport { fetchConversionTracking, getConversionGoalsFilterStore } from '@bingads-webui-campaign/overview-cards-common';\r\nimport { withDelayedStyles } from '@bingads-webui-campaign-react/common-utils';\r\nimport { getConversionTrackingCardStyle, metricPickerFluentV2Style } from '@bingads-webui-campaign-react/overview-card-styles';\r\nimport { useHeaderStateContext } from '@bingads-webui-campaign-react/overview-card';\r\n\r\nimport ConversionTrackingCardReact from './conversion-tracking-card-react/conversion-tracking-card';\r\n\r\n// Most of the content styles are from existing conversion tracking card\r\nconst getDefaultStyles = (_, { palette = {} }) => ({\r\n '@global': Object.assign(\r\n getConversionTrackingCardStyle(palette),\r\n metricPickerFluentV2Style\r\n ),\r\n});\r\n\r\nexport const useStyles = makeStyles({\r\n cardContent: {\r\n // to make sure empty state flex container can take full height from parent\r\n // flex element can take 100% height from parent only if parent has fixed height\r\n height: '307px',\r\n '& .conversion-tracking-state': {\r\n // to make the container height fixed with 377px, this is from Figma.\r\n height: '307px',\r\n\r\n '& .carousel-footer': {\r\n paddingBottom: '0px !important',\r\n },\r\n },\r\n\r\n '& .conversion-empty-state': {\r\n paddingBottom: '0px !important',\r\n },\r\n\r\n // TODO: [yaoyao] add shimmer for loading status\r\n // https://msasg.visualstudio.com/Bing_Ads/_workitems/edit/7173186\r\n '& .conversion-tracking-card-data-loading': {\r\n height: '307px',\r\n },\r\n },\r\n smallSizeCard: {\r\n '& .pop-range': {\r\n display: 'none',\r\n },\r\n },\r\n});\r\n\r\nconst conversionTileFetch = ({\r\n entitySet,\r\n filter,\r\n campaignType,\r\n jsdata,\r\n getCardsConfig,\r\n dateUtil,\r\n permissions,\r\n disableCache,\r\n cacheManager,\r\n // 1 for expert mode, we don't expect to have smart mode account anymore\r\n accountsMode = 1,\r\n typeId,\r\n}) => {\r\n const fetch = ({\r\n dateRange,\r\n metric,\r\n selectedMenuItem,\r\n fetchSingleTile = false,\r\n }) => fetchConversionTracking({\r\n dateRange,\r\n selectedMenuItem,\r\n metric,\r\n entitySet,\r\n filter,\r\n campaignType,\r\n jsdata,\r\n getCardsConfig,\r\n dateUtil,\r\n fetchSingleTile,\r\n permissions,\r\n disableCache,\r\n cacheManager,\r\n accountsMode,\r\n dfmCacheKey: typeId,\r\n });\r\n\r\n return fetch;\r\n};\r\n\r\nfunction ConversionTrackingCardFluentInternal({\r\n getCardsConfig,\r\n i18n,\r\n permissions,\r\n preferenceService,\r\n deps,\r\n jsdata,\r\n dateUtil,\r\n dateRange,\r\n filter,\r\n campaignType,\r\n constructOptions,\r\n cacheManager,\r\n legacyI18n,\r\n cardTypeId,\r\n perfMarkerUtils,\r\n responsiveSize,\r\n}) {\r\n const conversionGoalsFilterStore = getConversionGoalsFilterStore({ preferenceService });\r\n const {\r\n entitySet,\r\n } = constructOptions();\r\n const classes = useStyles();\r\n const headerState = useHeaderStateContext();\r\n const viewRef = React.createRef();\r\n const {\r\n willFetchData,\r\n willRender,\r\n done,\r\n } = perfMarkerUtils;\r\n // For size larger than l, we split into columns, so we don't show range column\r\n // For size smaller than l, we don't have enough space to show range column\r\n const hideRangeColumn = responsiveSize !== 'l';\r\n\r\n useEffect(() => {\r\n if (viewRef.current && headerState && headerState.selectedItemValue) {\r\n viewRef.current.handleUpdate({\r\n selectedMenuItem: headerState.selectedItemValue,\r\n });\r\n }\r\n }, [headerState, viewRef]);\r\n\r\n useEffect(() => {\r\n if (viewRef.current && dateRange) {\r\n viewRef.current.handleUpdate({\r\n dateRange,\r\n });\r\n }\r\n }, [dateRange, viewRef]);\r\n\r\n const triggerChangeMenuItem = useCallback((menuItem) => {\r\n if (headerState && _.isFunction(headerState.setHidden)) {\r\n headerState.setHidden(!(menuItem && menuItem.length));\r\n }\r\n }, [headerState]);\r\n\r\n if (!headerState) {\r\n return null;\r\n }\r\n\r\n return (\r\n
    \r\n {\r\n willFetchData();\r\n }}\r\n renderedWithData={() => {\r\n willRender();\r\n done();\r\n }}\r\n TrackingTypeFilterStore={(errorType) => {\r\n if (errorType) {\r\n const newErrorTypeFilter = {\r\n TrackingStatus: {\r\n $in: [`Enum.GoalTrackingStatus'${errorType}'`],\r\n },\r\n };\r\n\r\n conversionGoalsFilterStore.save({ query: newErrorTypeFilter });\r\n }\r\n }}\r\n GoalCategoryFilterStore={(category) => {\r\n if (category) {\r\n const newCategoryFilter = {\r\n GoalCategory: {\r\n $in: [`Enum.GoalCategory'${category}'`],\r\n },\r\n };\r\n\r\n conversionGoalsFilterStore.save({ query: newCategoryFilter });\r\n }\r\n }}\r\n />\r\n
    \r\n );\r\n}\r\n\r\nConversionTrackingCardFluentInternal.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n perfMarkerUtils: PropTypes.shape({\r\n willFetchData: PropTypes.func.isRequired,\r\n willRender: PropTypes.func.isRequired,\r\n done: PropTypes.func.isRequired,\r\n }).isRequired,\r\n getCardsConfig: PropTypes.func.isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n preferenceService: PropTypes.shape({}).isRequired,\r\n deps: PropTypes.shape({\r\n constants: PropTypes.shape({}).isRequired,\r\n instrumentation: PropTypes.shape({}).isRequired,\r\n }).isRequired,\r\n jsdata: PropTypes.shape({}).isRequired,\r\n dateUtil: PropTypes.shape({}).isRequired,\r\n dateRange: PropTypes.shape({\r\n RangeStartDate: PropTypes.string,\r\n RangeEndDate: PropTypes.string,\r\n RangeId: PropTypes.number,\r\n Rangelcid: PropTypes.number,\r\n compared: PropTypes.shape({}),\r\n start: PropTypes.objectOf(Date),\r\n end: PropTypes.objectOf(Date),\r\n grain: PropTypes.number,\r\n }).isRequired,\r\n filter: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n campaignType: PropTypes.oneOfType([\r\n PropTypes.number,\r\n PropTypes.string,\r\n ]).isRequired,\r\n constructOptions: PropTypes.func.isRequired,\r\n cacheManager: PropTypes.shape({}).isRequired,\r\n legacyI18n: PropTypes.shape({}).isRequired,\r\n cardTypeId: PropTypes.string.isRequired,\r\n responsiveSize: PropTypes.string.isRequired,\r\n};\r\n\r\nexport const ConversionTrackingCardFluent = withDelayedStyles(ConversionTrackingCardFluentInternal, getDefaultStyles);\r\n","import _ from 'underscore';\r\nimport { MetricPicker } from '@bingads-webui-campaign/overview-metric-picker';\r\nimport { DeterministicView, helpers } from '@bingads-webui/deterministic-view';\r\nimport template from './template-v2.pug';\r\nimport metricPickerButtonTemplate from './metric-picker-button-template.pug';\r\n\r\nexport default class DeviceMetricView extends DeterministicView {\r\n constructor(options) {\r\n super(_.extend({}, options, { renderInSync: true }));\r\n }\r\n\r\n initialize({\r\n metricFormatter,\r\n s$i18n,\r\n i18n,\r\n deps,\r\n }) {\r\n this.metricFormatter = metricFormatter;\r\n this.s$i18n = s$i18n;\r\n this.i18n = i18n;\r\n this.deps = deps;\r\n }\r\n\r\n get className() {\r\n return 'device-metric';\r\n }\r\n\r\n get template() {\r\n return template;\r\n }\r\n\r\n setState({\r\n metric,\r\n metrics,\r\n hideCurrency,\r\n } = {}) {\r\n helpers.updateView(helpers.ensureChildView(this, 'metric-picker', MetricPicker, {\r\n metric,\r\n metrics,\r\n buttonTemplate: metricPickerButtonTemplate,\r\n metricFormatter: this.metricFormatter,\r\n s$i18n: this.s$i18n,\r\n i18n: this.i18n,\r\n deps: this.deps,\r\n }, {\r\n pick: ({ metric: picked }) => {\r\n super.setState({ metric: picked });\r\n this.trigger('pick', { metric: picked });\r\n },\r\n }), {\r\n metric,\r\n metrics,\r\n hideCurrency,\r\n });\r\n\r\n return super.setState({\r\n metric,\r\n });\r\n }\r\n\r\n renderTrunk() {\r\n this.$el.html(this.template());\r\n return this;\r\n }\r\n}\r\n","import { isXandrVideoAdsCampaign } from '@bingads-webui-campaign-react/constants';\r\n\r\nexport const getDeviceOrder = ({\r\n permissions,\r\n navigationLevel,\r\n currentCampaign,\r\n}) => {\r\n const order = ['Computer', 'Tablet', 'SmartPhone'];\r\n\r\n if (permissions.dynamic.XandrVideoCampaigns &&\r\n (navigationLevel !== 'campaign' ||\r\n (currentCampaign && isXandrVideoAdsCampaign(currentCampaign.CampaignSubType)))\r\n ) {\r\n order.push('ConnectedTV');\r\n }\r\n return order;\r\n};\r\n","import _ from 'underscore';\r\nimport $ from 'jquery';\r\nimport { BaseCard } from '@bingads-webui-campaign/overview-base-card';\r\nimport { helpers } from '@bingads-webui/deterministic-view';\r\nimport { getFilteredTotalsMetrics, fetchAggregatedData, allMetrics, patchMetrics } from '@bingads-webui-campaign/overview-cards-common';\r\nimport SingleMetric from './metric/index';\r\nimport template from './template.pug';\r\nimport { getDeviceOrder } from './order';\r\n\r\nconst defaultMetrics = ['Clicks', 'Impressions', 'Spend'];\r\nconst layoutSize = {\r\n small: 0,\r\n large: 1,\r\n};\r\nconst graphLayoutBreakPoint = 100;\r\nconst smallLayoutBreakPoint = 585;\r\n\r\n/* @this DeviceCard */\r\nfunction getGraphLayoutSize() {\r\n if (this.$('.device-graph-legend-container').outerWidth() < graphLayoutBreakPoint) {\r\n return layoutSize.small;\r\n }\r\n return layoutSize.large;\r\n}\r\n\r\n/* @this TipsCard */\r\nfunction getLayoutSize() {\r\n if (this.$el.closest('.card-holder__wrapper').outerWidth() < smallLayoutBreakPoint) {\r\n return layoutSize.small;\r\n }\r\n return layoutSize.large;\r\n}\r\n\r\n/* @this DeviceCard */\r\nfunction reLayoutGraph() {\r\n const newLayoutSize = getGraphLayoutSize.call(this);\r\n\r\n if (this.currentGraphLayoutSize === newLayoutSize) {\r\n return;\r\n }\r\n\r\n if (newLayoutSize === layoutSize.small) {\r\n this.$('.device-graph-legend-container').addClass('small_graph');\r\n } else {\r\n this.$('.device-graph-legend-container').removeClass('small_graph');\r\n }\r\n\r\n this.currentGraphLayoutSize = newLayoutSize;\r\n}\r\n\r\nfunction isAggregatedMetric(metric) {\r\n return _.indexOf(['CTR', 'ConversionRate', 'RevenueOnAdSpend', 'AverageCPC', 'AveragePosition'], metric) !== -1;\r\n}\r\n\r\n/* @this DeviceCard */\r\nfunction reLayout() {\r\n reLayoutGraph.call(this);\r\n\r\n const newLayoutSize = getLayoutSize.call(this);\r\n\r\n if (newLayoutSize === this.currentLayoutSize) {\r\n return;\r\n }\r\n\r\n if (newLayoutSize === layoutSize.small) {\r\n this.$el.addClass('small_layout');\r\n } else {\r\n this.$el.removeClass('small_layout');\r\n }\r\n\r\n this.currentLayoutSize = newLayoutSize;\r\n}\r\n\r\n/* @this DeviceCard */\r\nfunction updateView() {\r\n const currentMetrics = this.getState().metrics;\r\n const { i18n } = this.deps;\r\n\r\n this.children = [];\r\n _.each(currentMetrics, (metric, index) => {\r\n const child = helpers.ensureChildView(this, String(index), SingleMetric, {\r\n metricFormatter: this.deps.metricFormatter,\r\n s$i18n: this.deps.s$i18n,\r\n i18n,\r\n }, {\r\n pick: ({ metric: picked }) => {\r\n const metricsWhenPick = _.clone(this.getState().metrics);\r\n\r\n metricsWhenPick[index] = picked;\r\n\r\n const { instrumentation, constants } = this.deps;\r\n\r\n instrumentation.logMessage(\r\n [constants.LOGCATEGORY.TRACE],\r\n constants.LOGLEVEL.INFO,\r\n 'device-card',\r\n `${this.navigationLevel} level new metric picked.`\r\n );\r\n helpers.updateView(this, {\r\n metrics: metricsWhenPick,\r\n });\r\n this.trigger('storeCardPreference', { metrics: metricsWhenPick });\r\n const actionButton = this.$('.view-all-clickLink');\r\n if (actionButton.length > 0) {\r\n actionButton.focus();\r\n }\r\n },\r\n });\r\n\r\n this.children.push(child);\r\n\r\n helpers.updateView(child, {\r\n metric,\r\n segmentedPerformanceMetrics: this.performanceMetrics.SegmentedData,\r\n metrics: _.difference(allMetrics(this.permissions), currentMetrics),\r\n hideCurrency: this.hideCurrency,\r\n });\r\n });\r\n\r\n const { dateRange } = this.getState();\r\n\r\n if (!dateRange) {\r\n return;\r\n }\r\n\r\n const formatOption = {\r\n hideCurrency: this.hideCurrency,\r\n };\r\n\r\n this.data = _.map(getDeviceOrder({\r\n permissions: this.permissions,\r\n navigationLevel: this.navigationLevel,\r\n currentCampaign: this.currentCampaign,\r\n }), (deviceType) => {\r\n const { Data: segmentedData } = _.find(\r\n this.performanceMetrics.SegmentedData,\r\n ({ Key }) => Key[0].StringValue === deviceType\r\n ) || { Data: {} };\r\n\r\n let segmentedPeriodData = {};\r\n let segmentedChangePercentageData = {};\r\n\r\n if (dateRange.compared) {\r\n const { Data: periodData } = _.find(\r\n this.periodPerformanceMetrics.SegmentedData,\r\n ({ Key }) => Key[0].StringValue === deviceType\r\n ) || { Data: {} };\r\n\r\n segmentedPeriodData = periodData;\r\n\r\n const { Data: changePercentageData } = _.find(\r\n this.performanceMetricsChangePercentage.SegmentedData,\r\n ({ Key }) => Key[0].StringValue === deviceType\r\n ) || { Data: {} };\r\n\r\n segmentedChangePercentageData = changePercentageData;\r\n }\r\n\r\n const formattedData = {};\r\n const formattedPeriodData = {};\r\n\r\n _.each(currentMetrics, (metric) => {\r\n const { metricFormatter } = this.deps;\r\n const value = segmentedData[metric] || 0;\r\n let flexValue = 0;\r\n\r\n if (!isAggregatedMetric(metric) && this.performanceMetrics[metric]) {\r\n flexValue = Math.round((value * 10000) / this.performanceMetrics[metric]);\r\n }\r\n\r\n const formattedSegment = metricFormatter.formatMetric(metric, value, formatOption);\r\n const formattedHoverValue = isAggregatedMetric(metric) ? formattedSegment :\r\n `${formattedSegment} (${i18n.getString(\r\n 'Dashboard_DeviceCard_Percentage_Total',\r\n {\r\n percentage: i18n.formatPercent(flexValue / 10000, {\r\n maximumFractionDigits: 2,\r\n minimumFractionDigits: 2,\r\n }),\r\n }\r\n )})`;\r\n\r\n formattedData[metric] = {};\r\n _.extend(formattedData[metric], {\r\n metric,\r\n value,\r\n formattedSegment,\r\n flexValue: !value ? 0 : Math.max(flexValue, 1),\r\n formattedHoverValue,\r\n });\r\n\r\n if (dateRange.compared) {\r\n const periodValue = segmentedPeriodData[metric] || 0;\r\n let periodFlexValue = 0;\r\n\r\n if (!isAggregatedMetric(metric) && this.periodPerformanceMetrics[metric]) {\r\n periodFlexValue = Math.round((periodValue * 10000) / this.periodPerformanceMetrics[metric]);\r\n }\r\n\r\n const formattedPeriodSegment = metricFormatter.formatMetric(\r\n metric,\r\n periodValue,\r\n formatOption\r\n );\r\n\r\n const formattedPeriodHoverValue = isAggregatedMetric(metric) ? formattedPeriodSegment :\r\n `${formattedPeriodSegment} (${i18n.getString(\r\n 'Dashboard_DeviceCard_Percentage_Total',\r\n {\r\n percentage: i18n.formatPercent(periodFlexValue / 10000, {\r\n maximumFractionDigits: 2,\r\n minimumFractionDigits: 2,\r\n }),\r\n }\r\n )})`;\r\n\r\n formattedPeriodData[metric] = {};\r\n _.extend(formattedPeriodData[metric], {\r\n metric,\r\n value: periodValue,\r\n changePercentage: segmentedChangePercentageData[metric],\r\n formattedChangePercentage: `(${metricFormatter.formatChangePercentageWithSign(segmentedChangePercentageData[metric] || 0)})`,\r\n formattedChange: metricFormatter.formatMetricWithSign(metric, value - periodValue),\r\n formattedSegment: formattedPeriodSegment,\r\n flexValue: !periodValue ? 0 : Math.max(periodFlexValue, 1),\r\n formattedHoverValue: formattedPeriodHoverValue,\r\n });\r\n }\r\n });\r\n const returnValue = { formattedData };\r\n\r\n if (dateRange.compared) {\r\n _.extend(returnValue, { formattedPeriodData });\r\n }\r\n return returnValue;\r\n });\r\n\r\n const formattedDateRange = `${i18n.formatDate(dateRange.start)} - ${i18n.formatDate(dateRange.end)}`;\r\n const formattedPeriodDateRange = dateRange.compared ? `${dateRange.compared.formattedStart} - ${dateRange.compared.formattedEnd}` : null;\r\n\r\n _.extend(this.data, {\r\n formattedDateRange,\r\n formattedPeriodDateRange,\r\n });\r\n this.loaded = true;\r\n this.render();\r\n}\r\n\r\n/* @this DeviceCard */\r\nfunction loadData() {\r\n const {\r\n dateRange,\r\n filter,\r\n } = this.getState();\r\n const { instrumentation, constants, config } = this.deps;\r\n\r\n this.blockCard();\r\n this.willFetchData();\r\n fetchAggregatedData({\r\n entitySet: this.entitySet,\r\n dateRange,\r\n filter,\r\n jsdata: this.deps.jsdata,\r\n dateUtil: this.deps.dateUtil,\r\n navigationLevel: this.navigationLevel,\r\n getCardsConfig: this.sharedOptions.getCardsConfig,\r\n fetchSingleTile: this.fetchSingleTile,\r\n isDevice: true,\r\n permissions: config && config.get('Permissions'),\r\n dfmCacheKey: `${this.typeId}-aggregated-data`,\r\n }).finally(() => {\r\n this.unblockCard();\r\n }).then((data) => {\r\n this.hasError = false;\r\n if (this.removed) {\r\n return;\r\n }\r\n\r\n if (data.status !== null && data.status !== undefined) {\r\n // If we have error status. Those are already logged in ajax stub.\r\n // Add a trace log.\r\n this.hasError = true;\r\n updateView.call(this);\r\n instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'device-card', JSON.stringify(data));\r\n return;\r\n }\r\n\r\n if (!data.raw && !data.DeviceSegmentedPerformanceData) {\r\n this.hasError = true;\r\n updateView.call(this);\r\n instrumentation.logMessage([constants.LOGCATEGORY.ERROR], constants.LOGLEVEL.INFO, 'device-card', JSON.stringify(data));\r\n return;\r\n }\r\n\r\n this.hideCurrency = data.AccountsHaveDifferentCurrencies;\r\n this.dataFetched = true;\r\n this.performanceMetrics = getFilteredTotalsMetrics({\r\n data,\r\n metric: 'PerformanceMetrics',\r\n }) || {};\r\n\r\n _.defaults(this.performanceMetrics, { SegmentedData: {} });\r\n\r\n if (dateRange.compared) {\r\n this.performanceMetricsChangePercentage = getFilteredTotalsMetrics({\r\n data,\r\n metric: 'PerformanceMetricsChangePercentage',\r\n }) || {};\r\n\r\n _.defaults(this.performanceMetricsChangePercentage, { SegmentedData: {} });\r\n\r\n this.periodPerformanceMetrics = getFilteredTotalsMetrics({\r\n data,\r\n metric: 'PeriodPerformanceMetrics',\r\n }) || {};\r\n\r\n _.defaults(this.periodPerformanceMetrics, { SegmentedData: {} });\r\n }\r\n\r\n this.hasError = false;\r\n updateView.call(this);\r\n }).catch((response) => {\r\n this.dataFetched = true;\r\n // no need to log ajax error here.\r\n if (response.status === undefined) {\r\n instrumentation.logMessage([constants.LOGCATEGORY.ERROR], constants.LOGLEVEL.INFO, 'device-card', response.stack);\r\n }\r\n this.loaded = true;\r\n this.hasError = true;\r\n this.renderTrunk();\r\n });\r\n}\r\n\r\n/* @this DeviceCard */\r\nfunction navigateToDevicesSetting() {\r\n if (this.navigationLevel === 'account') {\r\n this.deps.legacyRouter.navigateToRoute('campaign_settings', {\r\n setting: 'devices',\r\n });\r\n } else {\r\n const campaignId = this.deps.state.get('campaign_id');\r\n\r\n this.deps.legacyRouter.navigateToRoute('campaign_edit_settings', {\r\n // eslint-disable-next-line camelcase\r\n campaign_id: campaignId,\r\n setting: 'devices',\r\n });\r\n }\r\n}\r\n\r\nexport class DeviceCard extends BaseCard {\r\n className() {\r\n return 'device-card';\r\n }\r\n\r\n initialize({\r\n entitySet,\r\n metrics,\r\n navigationLevel,\r\n dateRange,\r\n perfMarker,\r\n name,\r\n deps,\r\n sharedOptions,\r\n filter,\r\n fetchSingleTile = false,\r\n preexecuteFlag = false,\r\n typeId,\r\n }) {\r\n this.initPerfMarker({ perfMarker, name });\r\n this.performanceMetrics = { SegmentedData: {} };\r\n this.performanceMetricsChangePercentage = { SegmentedData: {} };\r\n this.periodPerformanceMetrics = { SegmentedData: {} };\r\n this.entitySet = entitySet;\r\n this.navigationLevel = navigationLevel;\r\n this.sharedOptions = sharedOptions;\r\n this.fetchSingleTile = fetchSingleTile;\r\n this.deps = deps;\r\n this.typeId = typeId;\r\n\r\n const { config } = this.deps;\r\n this.permissions = config && config.get('Permissions');\r\n this.currentCampaign = config && config.get('CurrentCampaign');\r\n let selectedMetrics;\r\n\r\n if (metrics) {\r\n const patchedMetrics = patchMetrics({ permissions: this.permissions, metrics });\r\n const availableMetrics = allMetrics(this.permissions);\r\n\r\n selectedMetrics = _.intersection(patchedMetrics, availableMetrics);\r\n\r\n if (_.size(selectedMetrics) < _.size(defaultMetrics)) {\r\n selectedMetrics = _.chain(selectedMetrics)\r\n .union(defaultMetrics)\r\n .uniq()\r\n .first(_.size(defaultMetrics))\r\n .value();\r\n\r\n _.defer(() => {\r\n this.trigger('storeCardPreference', { metrics: selectedMetrics });\r\n });\r\n }\r\n } else {\r\n selectedMetrics = defaultMetrics;\r\n }\r\n\r\n this.setState({\r\n metrics: selectedMetrics,\r\n dateRange,\r\n filter,\r\n });\r\n\r\n const loadDataFunc = preexecuteFlag ? () => {\r\n this.dataFetched = true;\r\n } : loadData;\r\n\r\n loadDataFunc.call(this);\r\n\r\n this.listenTo(this.model, 'change:dateRange', () => {\r\n this.fetchSingleTile = false;\r\n loadDataFunc.call(this);\r\n });\r\n\r\n this.listenTo(this.model, 'change:filter', () => {\r\n this.fetchSingleTile = false;\r\n loadDataFunc.call(this);\r\n });\r\n\r\n this.listenTo(this.model, 'change:metrics', () => {\r\n updateView.call(this);\r\n });\r\n\r\n this.onResize(() => {\r\n reLayout.call(this);\r\n });\r\n\r\n this.on('removed', () => {\r\n this.removed = true;\r\n });\r\n }\r\n\r\n get events() {\r\n return {\r\n 'mouseenter .device-grid-bar': this.showPopup,\r\n 'mouseleave .device-grid-bar': this.hidePopup,\r\n 'click .view-all-clickLink': navigateToDevicesSetting.bind(this),\r\n };\r\n }\r\n\r\n showPopup(event) {\r\n const $target = $(event.currentTarget);\r\n const type = $target.data('type');\r\n\r\n $target.closest('.graph-area').addClass(`show-${type}-hover`);\r\n }\r\n\r\n hidePopup(event) {\r\n const $target = $(event.currentTarget);\r\n const type = $target.data('type');\r\n\r\n $target.closest('.graph-area').removeClass(`show-${type}-hover`);\r\n }\r\n\r\n renderTrunk() {\r\n if (this.dataFetched) {\r\n this.willRenderWithData();\r\n }\r\n this.currentLayoutSize = undefined;\r\n this.currentGraphLayoutSize = undefined;\r\n super.renderTrunk();\r\n if (this.dataFetched) {\r\n this.renderedWithData();\r\n _.defer(() => {\r\n reLayout.call(this);\r\n });\r\n }\r\n }\r\n\r\n get template() {\r\n const { metrics } = this.getState();\r\n const { data } = this;\r\n const { i18n, s$i18n } = this.deps;\r\n\r\n return () => template({\r\n isSmartShoppingCampaign: this.isSmartShoppingCampaign(),\r\n s$i18n,\r\n order: getDeviceOrder({\r\n permissions: this.permissions,\r\n navigationLevel: this.navigationLevel,\r\n currentCampaign: this.currentCampaign,\r\n }),\r\n metrics,\r\n data,\r\n loaded: this.loaded,\r\n hasError: this.hasError,\r\n i18n,\r\n isAggregatedMetric,\r\n navigationLevel: this.navigationLevel,\r\n });\r\n }\r\n\r\n setState(newState) {\r\n if (newState.metrics && (_.size(newState.metrics) > _.size(defaultMetrics))) {\r\n // Customer might have erroneous preference due to bug that is fixed.\r\n // Reset to default.\r\n // eslint-disable-next-line no-param-reassign\r\n newState.metrics = defaultMetrics;\r\n this.trigger('storeCardPreference', { metrics: newState.metrics });\r\n }\r\n\r\n super.setState(newState);\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport $ from 'jquery';\r\nimport 'bootstrap';\r\nimport Promise from 'bluebird';\r\nimport { DeterministicView, helpers } from '@bingads-webui/deterministic-view';\r\nimport { a11yPlugin } from '@bingads-webui/projection-grid-a11y';\r\nimport pgrid from 'projection-grid';\r\nimport { performanceLogPlugin } from '@bingads-webui-campaign/pgrid-performance-log';\r\nimport { placeholderPlugin } from '@bingads-webui/projection-grid-placeholder';\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\nimport { Constants } from '@bingads-webui-clientcenter/entity-utils';\r\nimport { keyCode } from '@bingads-webui/keycode';\r\nimport {\r\n changeEvents,\r\n entityHash,\r\n getEntityIds,\r\n navigateToEntity,\r\n coerceStatus,\r\n gridCardConfig,\r\n allMetrics as metrics,\r\n gridNameTemplate as nameTemplate,\r\n fetchEntityGridCombined,\r\n fetchGridData,\r\n processGridTileOptions,\r\n patchMetrics, patchMetric,\r\n} from '@bingads-webui-campaign/overview-cards-common';\r\nimport coverTemplate from './cover-template.pug';\r\nimport placeholderTemplate from './placeholder-template.pug';\r\nimport template from './content-template.pug';\r\nimport performanceMetricHeaderTemplate from './performance-metric-header-template.pug';\r\nimport performanceMetricTemplate from './performance-metric-template.pug';\r\n\r\nlet formatMetric;\r\nlet formatMetricWithSign;\r\nlet formatChangePercentageWithSign;\r\n\r\nfunction order(body) {\r\n return _.defaults({ body }, {\r\n PerformanceMetrics: {\r\n sup: 'PerformanceMetricsChangePercentage',\r\n sub: 'PerformanceMetricsChange',\r\n },\r\n PerformanceMetricsChange: {\r\n sup: 'PerformanceMetrics',\r\n sub: 'PerformanceMetricsChangePercentage',\r\n },\r\n PerformanceMetricsChangePercentage: {\r\n sup: 'PerformanceMetrics',\r\n sub: 'PerformanceMetricsChange',\r\n },\r\n }[body]);\r\n}\r\n\r\nfunction metricColumnProperty({\r\n PerformanceMetrics = {},\r\n PerformanceMetricsChange = {},\r\n PerformanceMetricsChangePercentage = {},\r\n Currency,\r\n} = {}, metric) {\r\n return {\r\n PerformanceMetrics: PerformanceMetrics[metric],\r\n PerformanceMetricsChange: PerformanceMetricsChange[metric],\r\n PerformanceMetricsChangePercentage: PerformanceMetricsChangePercentage[metric],\r\n Currency,\r\n };\r\n}\r\n\r\nfunction formatCell(value, metric) {\r\n return {\r\n PerformanceMetrics: formatMetric(\r\n metric,\r\n value.PerformanceMetrics,\r\n { currency: value.Currency }\r\n ),\r\n PerformanceMetricsChange: formatMetricWithSign(\r\n metric,\r\n value.PerformanceMetricsChange,\r\n { currency: value.Currency }\r\n ),\r\n PerformanceMetricsChangePercentage:\r\n formatChangePercentageWithSign(value.PerformanceMetricsChangePercentage),\r\n };\r\n}\r\n\r\n/* @this GridCard */\r\nfunction metricColumnTemplate({ value }, metric) {\r\n return performanceMetricTemplate({\r\n value: formatCell(value, metric),\r\n order: order(this.getState().body),\r\n showExtra: this.gridView.get('sortableHeader').name === metric && this.getState().dateRange.compared && this.typeName !== 'SearchTerm',\r\n });\r\n}\r\n\r\nconst sortableMapping = {\r\n PerformanceMetrics: 'PerformanceMetrics',\r\n PerformanceMetricsChange: 'PoPPerformanceMetricsChange',\r\n PerformanceMetricsChangePercentage: 'PoPPerformanceMetricsChangePercentage',\r\n};\r\n\r\nconst titleMapping = {\r\n Keyword: 'EntityType_Keyword_Plural',\r\n SearchTerm: 'Search_Terms',\r\n Campaign: 'EntityType_Campaign_Plural',\r\n Account: 'Dashboard_TopAccounts_Card_Title',\r\n AdGroup: 'EntityType_AdGroup_Plural',\r\n};\r\n\r\nconst columnHeaderMapping = {\r\n Keyword: 'EntityType_Keyword_Singular',\r\n SearchTerm: 'ColumnName_SearchTerm',\r\n Campaign: 'EntityType_Campaign_Singular',\r\n Account: 'Entity_Account',\r\n AdGroup: 'EntityType_AdGroup_Singular',\r\n};\r\n\r\n/* @this GridCard */\r\nfunction sortableAttribute(metric) {\r\n return `${sortableMapping[this.getState().body]}/${metric}`;\r\n}\r\n\r\n/* @this GridCard */\r\nfunction metricColumn(metric) {\r\n return this.bingadsGridColumn({\r\n name: metric,\r\n title: this.s$i18n.property('PerformanceMetrics', metric),\r\n property: entity => metricColumnProperty(entity, metric),\r\n sortable: {\r\n key: sortableAttribute.call(this, metric),\r\n direction: -1,\r\n },\r\n colClasses: () =>\r\n (this.gridView.get('sortableHeader').name === metric ? ['performance-metric-col-sorting'] : ['performance-metric-col-non-sorting']),\r\n bodyClasses: () =>\r\n (this.gridView.get('sortableHeader').name === metric ? ['performance-metric-td-sorting'] : []),\r\n headClasses: () =>\r\n (this.gridView.get('sortableHeader').name === metric ? ['performance-metric-th-sorting'] : []),\r\n html: performanceMetricHeaderTemplate({\r\n metric,\r\n s$i18n: this.s$i18n,\r\n i18n: this.i18n,\r\n }),\r\n template: ({ value }) => metricColumnTemplate.call(this, { value }, metric),\r\n });\r\n}\r\n\r\n/* @this GridCard */\r\nfunction nameColumn() {\r\n return this.bingadsGridColumn({\r\n name: 'Name',\r\n title: this.i18n.getString(columnHeaderMapping[this.typeName]),\r\n property: ({\r\n Id,\r\n Name,\r\n Text,\r\n Status,\r\n AdGroup,\r\n Campaign,\r\n MatchType,\r\n DeliveredMatchType,\r\n CampaignType,\r\n Keyword,\r\n Added,\r\n SearchTermStatus,\r\n ExperimentId,\r\n AccountInactiveReasons,\r\n }) => {\r\n let nameText = Text;\r\n\r\n if (this.typeName === 'Keyword') {\r\n nameText = Text;\r\n if (MatchType === 'Phrase') {\r\n nameText = `\"${nameText}\"`;\r\n } else if (MatchType === 'Exact') {\r\n nameText = `[${nameText}]`;\r\n }\r\n } else if (this.typeName === 'SearchTerm') {\r\n nameText = Text;\r\n } else {\r\n nameText = Name;\r\n }\r\n let isExperiment;\r\n\r\n if (this.typeName === 'Campaign') {\r\n isExperiment = !!ExperimentId;\r\n } else if (this.typeName !== 'Account') {\r\n isExperiment = !!Campaign.ExperimentId;\r\n }\r\n\r\n return {\r\n Name: nameText,\r\n keywordText: Text,\r\n Status: coerceStatus(Status, AccountInactiveReasons),\r\n hash: entityHash({\r\n id: Id,\r\n typeName: this.typeName,\r\n entitySet: this.entitySet,\r\n navigationLevel: this.navigationLevel,\r\n adGroup: AdGroup,\r\n campaign: Campaign,\r\n pageContext: this.pageContext,\r\n legacyRouter: this.legacyRouter,\r\n isSmartCampaign: CampaignType === 'Smart',\r\n status: Status,\r\n }),\r\n rawStatus: Status,\r\n typeName: this.typeName,\r\n ids: getEntityIds({\r\n id: Id,\r\n typeName: this.typeName,\r\n entitySet: this.entitySet,\r\n adGroup: AdGroup,\r\n campaign: Campaign,\r\n }),\r\n AdGroup: AdGroup || {},\r\n Campaign: Campaign || {},\r\n MatchType: MatchType || DeliveredMatchType,\r\n navigationLevel: this.navigationLevel,\r\n i18n: this.i18n,\r\n AccountActivityStatus: Constants.AccountActivityStatus,\r\n added: Added,\r\n campaignType: CampaignType,\r\n matchingKeyword: Keyword ? Keyword.Text : null,\r\n searchTermStatus: SearchTermStatus,\r\n isExperiment,\r\n };\r\n },\r\n template: nameTemplate,\r\n });\r\n}\r\n\r\n/* @this GridCard */\r\nfunction metricColumns() {\r\n return _.object(_.map(metrics(this.config && this.config.get('Permissions'), this.accountsMode), metric => [metric, metricColumn.call(this, metric)]));\r\n}\r\n\r\n/* @this GridCard */\r\nfunction removeDropdown() {\r\n if (this.dropdown) {\r\n this.dropdown.$el.closest('.grid-card-header').find('button').attr('aria-expanded', false);\r\n this.dropdown.remove();\r\n this.dropdown = null;\r\n }\r\n\r\n if (this.onClickDocument) {\r\n $(document).off('click', this.onClickDocument);\r\n this.onClickDocument = null;\r\n }\r\n}\r\n\r\n/* @this GridCardContent */\r\nfunction updatePopupPosition(evt) {\r\n const $target = $(evt.currentTarget);\r\n const hoverContent = $target.find('.hover-content');\r\n\r\n if (hoverContent.attr('style')) {\r\n hoverContent.attr('style', '');\r\n }\r\n\r\n const $viewport = $target.closest('.viewport');\r\n const scrollTop = $viewport.scrollTop();\r\n\r\n if (scrollTop <= 0) {\r\n return;\r\n }\r\n\r\n if ($target.offset().top - $viewport.offset().top > 100) {\r\n hoverContent.css('bottom', `${scrollTop + 35}px`);\r\n hoverContent.css('top', 'auto');\r\n } else {\r\n hoverContent.css('top', `${5 - scrollTop}px`);\r\n hoverContent.css('bottom', 'auto');\r\n }\r\n}\r\n\r\n\r\nfunction showPopup(evt) {\r\n updatePopupPosition(evt);\r\n const $target = $(evt.currentTarget);\r\n const $popup = $target.find('.grid-cell--Name__hover-container');\r\n $popup.css({ display: 'block' });\r\n}\r\n\r\nfunction hidePopup(evt) {\r\n const $target = $(evt.currentTarget);\r\n const $popup = $target.find('.grid-cell--Name__hover-container');\r\n $popup.css({ display: 'none' });\r\n}\r\n\r\n\r\n/* @this GridCardContent */\r\nfunction getAllColumns() {\r\n const allMetricColumns = metricColumns.call(this);\r\n\r\n return [nameColumn.call(this), ..._.map(\r\n this.getState().columns,\r\n metric => allMetricColumns[metric]\r\n )];\r\n}\r\n\r\n/* @this GridCardContent */\r\nfunction refetch() {\r\n this.gridView.refresh(true);\r\n}\r\n\r\n/* @this GridCardContent */\r\nfunction updateGridBody() {\r\n const sortableHeader = this.gridView.get('sortableHeader') || {};\r\n const {\r\n orderby,\r\n direction,\r\n directionIndex,\r\n } = this.getState();\r\n const newSortableHeader = sortableHeader.name ? sortableHeader : {\r\n name: orderby,\r\n directionIndex,\r\n };\r\n\r\n this.gridView.patch({\r\n columns: getAllColumns.call(this),\r\n query: {\r\n orderby: [{\r\n key: sortableAttribute.call(this, newSortableHeader.name),\r\n direction,\r\n }],\r\n },\r\n sortableHeader: newSortableHeader,\r\n });\r\n\r\n refetch.call(this);\r\n}\r\n\r\n/* @this GridCardContent */\r\nfunction updateGridColumn() {\r\n const {\r\n columns,\r\n orderby,\r\n direction,\r\n directionIndex,\r\n } = this.getState();\r\n\r\n if (!_.contains(columns, orderby)) {\r\n helpers.updateView(this, {\r\n orderby: _.first(columns),\r\n });\r\n }\r\n\r\n const sortableHeader = this.gridView.get('sortableHeader') || {};\r\n const newSortableHeader = _.contains(columns, sortableHeader.name) ? sortableHeader : {\r\n name: this.getState().orderby,\r\n directionIndex,\r\n };\r\n\r\n this.gridView.patch({\r\n columns: getAllColumns.call(this),\r\n query: {\r\n orderby: [{\r\n key: sortableAttribute.call(this, newSortableHeader.name),\r\n direction,\r\n }],\r\n },\r\n sortableHeader: newSortableHeader,\r\n });\r\n refetch.call(this);\r\n this.trigger('gridOptionChange');\r\n}\r\n\r\n/* @this GridCardContent */\r\nfunction onGridSortableHeaderChange(changes) {\r\n const newOderBy = _.result(changes.query, 'orderby') || _.result(this.gridView.get('query'), 'orderby');\r\n const newDirection = newOderBy[0].direction;\r\n const newOderByColumn = changes.sortableHeader.name;\r\n const newDirectionIndex = changes.sortableHeader.directionIndex;\r\n const { orderby, direction, directionIndex } = this.getState();\r\n\r\n if (orderby !== newOderByColumn ||\r\n direction !== newDirection ||\r\n directionIndex !== newDirectionIndex) {\r\n this.setState({\r\n orderby: newOderByColumn,\r\n direction: newDirection,\r\n directionIndex: newDirectionIndex,\r\n fetchSingleTile: true,\r\n });\r\n this.instrumentation.logMessage(\r\n [this.constants.LOGCATEGORY.TRACE],\r\n this.constants.LOGLEVEL.INFO,\r\n 'grid-card',\r\n `${this.navigationLevel} level ${this.typeName} type new sort order picked.`\r\n );\r\n this.trigger('gridOptionChange');\r\n }\r\n}\r\n\r\nclass CombinedCallEntity {\r\n constructor({\r\n entitySet,\r\n getParentState,\r\n dateUtil,\r\n jsdata,\r\n getCardsConfig,\r\n permissions,\r\n accountsMode,\r\n }) {\r\n this.entitySet = entitySet;\r\n this.getParentState = getParentState;\r\n this.dateUtil = dateUtil;\r\n this.jsdata = jsdata;\r\n this.getCardsConfig = getCardsConfig;\r\n this.permissions = permissions;\r\n this.accountsMode = accountsMode;\r\n }\r\n\r\n findAll({ orderBy }) {\r\n const { dateRange, fetchSingleTile, filter } = this.getParentState();\r\n return fetchEntityGridCombined({\r\n entitySet: this.entitySet,\r\n dateRange,\r\n comparisonDateRange: dateRange.compared,\r\n orderBy,\r\n jsdata: this.jsdata,\r\n dateUtil: this.dateUtil,\r\n getCardsConfig: this.getCardsConfig,\r\n fetchSingleTile,\r\n filter,\r\n permissions: this.permissions,\r\n accountsMode: this.accountsMode,\r\n });\r\n }\r\n}\r\n\r\nclass GridDataEntity {\r\n constructor({\r\n entitySet,\r\n getParentState,\r\n dateUtil,\r\n jsdata,\r\n permissions,\r\n typeId,\r\n }) {\r\n this.entitySet = entitySet;\r\n this.getParentState = getParentState;\r\n this.dateUtil = dateUtil;\r\n this.jsdata = jsdata;\r\n this.permissions = permissions;\r\n this.typeId = typeId;\r\n }\r\n\r\n findAll() {\r\n const {\r\n dateRange,\r\n orderby,\r\n direction,\r\n selectedMenuItem,\r\n filter,\r\n columns,\r\n } = this.getParentState();\r\n return fetchGridData({\r\n entitySet: this.entitySet,\r\n dateRange,\r\n options: {\r\n orderby,\r\n direction,\r\n selectedMenuItem,\r\n columns,\r\n },\r\n filter,\r\n jsdata: this.jsdata,\r\n dateUtil: this.dateUtil,\r\n permissions: this.permissions,\r\n dfmCacheKey: this.typeId,\r\n });\r\n }\r\n}\r\n\r\nclass DummyDataSource {\r\n findAll() {\r\n const data = [];\r\n data.totalCount = 0;\r\n return Promise.resolve(data);\r\n }\r\n}\r\n\r\nexport default class GridCardContent extends DeterministicView {\r\n constructor(options) {\r\n super(_.extend({}, options, { renderInSync: true }));\r\n }\r\n\r\n initialize({\r\n entitySet,\r\n navigationLevel,\r\n parent,\r\n selectedMenuItem,\r\n columns,\r\n orderby,\r\n direction,\r\n directionIndex,\r\n dateRange,\r\n filter,\r\n getCardsConfig,\r\n fetchSingleTile = false,\r\n preexecuteFlag = false,\r\n accountsMode,\r\n deps,\r\n }) {\r\n this.parent = parent;\r\n this.entitySet = entitySet;\r\n this.typeName = entitySet.type.elementType.shortName;\r\n this.navigationLevel = navigationLevel;\r\n this.accountsMode = accountsMode;\r\n this.config = deps.config;\r\n this.i18n = deps.i18n;\r\n this.s$i18n = deps.s$i18n;\r\n this.pageContext = deps.pageContext;\r\n this.legacyRouter = deps.legacyRouter;\r\n this.createEditableFilterStorage = deps.createEditableFilterStorage;\r\n this.instrumentation = deps.instrumentation;\r\n this.constants = deps.constants;\r\n this.bingadsGridColumn = deps.bingadsGridColumn;\r\n this.metricFormatter = deps.metricFormatter;\r\n // eslint-disable-next-line prefer-destructuring\r\n formatMetric = deps.metricFormatter.formatMetric;\r\n // eslint-disable-next-line prefer-destructuring\r\n formatMetricWithSign = deps.metricFormatter.formatMetricWithSign;\r\n // eslint-disable-next-line prefer-destructuring\r\n formatChangePercentageWithSign = deps.metricFormatter.formatChangePercentageWithSign;\r\n\r\n const permissions = this.config && this.config.get('Permissions');\r\n const tileOptions = _.defaults({\r\n body: selectedMenuItem,\r\n columns,\r\n orderby,\r\n direction,\r\n directionIndex,\r\n dateRange,\r\n filter,\r\n fetchSingleTile,\r\n }, gridCardConfig.defaultOptions);\r\n\r\n tileOptions.columns = tileOptions.columns &&\r\n patchMetrics({ permissions, metrics: tileOptions.columns, accountsMode });\r\n tileOptions.orderby = tileOptions.orderby &&\r\n patchMetric({ permissions, metric: tileOptions.orderby, accountsMode });\r\n\r\n const initialState = processGridTileOptions({\r\n options: tileOptions,\r\n permissions,\r\n accountsMode,\r\n });\r\n\r\n this.setState(initialState);\r\n if (!_.isEqual(tileOptions, initialState)) {\r\n _.defer(() => this.trigger('gridOptionChange'));\r\n }\r\n\r\n const gridFactory = pgrid.factory({ vnext: true });\r\n\r\n gridFactory\r\n .use(a11yPlugin)\r\n .use(placeholderPlugin)\r\n .use(performanceLogPlugin);\r\n\r\n const {\r\n gridView,\r\n } = gridFactory\r\n .create({\r\n name: `OverviewTop${this.typeName}`,\r\n tableClasses: ['table'],\r\n tableAttributes: { 'aria-label': this.i18n.getString(titleMapping[this.typeName]) },\r\n dataSource: {\r\n type: 'jsdata',\r\n // eslint-disable-next-line no-nested-ternary\r\n entity: preexecuteFlag ? new DummyDataSource() : ((this.typeName === 'Account' ||\r\n (this.typeName === 'Campaign')) ?\r\n new CombinedCallEntity({\r\n entitySet,\r\n getParentState: this.getState.bind(this),\r\n dateUtil: deps.dateUtil,\r\n jsdata: deps.jsdata,\r\n getCardsConfig,\r\n permissions,\r\n accountsMode: this.accountsMode,\r\n }) : new GridDataEntity({\r\n entitySet,\r\n getParentState: this.getState.bind(this),\r\n dateUtil: deps.dateUtil,\r\n jsdata: deps.jsdata,\r\n permissions,\r\n typeId: this.options.typeId,\r\n })),\r\n },\r\n columns: getAllColumns.call(this),\r\n plugins: {\r\n a11y: { i18n: this.i18n },\r\n performanceLog: {\r\n appConfig: deps.config,\r\n logger: deps.instrumentation,\r\n },\r\n placeholder: {\r\n viewRoot: this.parent.el,\r\n container: '.no-data',\r\n template: placeholderTemplate,\r\n templateOptions: {\r\n i18n: this.i18n,\r\n },\r\n },\r\n },\r\n events: {\r\n 'click .metric-picker__button--caret': (e) => {\r\n e.stopPropagation();\r\n e.preventDefault();\r\n // Event propagation is stopped above.\r\n // Click on header to bubble up event to window without side effect.\r\n this.$('.header').click();\r\n const $metricPicker = this.$(e.currentTarget).closest('.metric-picker');\r\n const currentMetric = $metricPicker[0].dataset.metric;\r\n const isDropdownOpenfortheColumn = this.dropdown && $metricPicker.closest('.grid-card-header')[0].contains(this.dropdown.el);\r\n\r\n removeDropdown.call(this);\r\n\r\n if (!isDropdownOpenfortheColumn) {\r\n const currentColumns = this.gridView.get('columns');\r\n\r\n import(/* webpackMode: 'eager' */ '@bingads-webui-campaign/overview-metric-picker').then(({ MetricPicker }) => {\r\n import(/* webpackMode: 'eager' */ './metric-picker-template.pug').then(({ default: metricPickerTemplate }) => {\r\n import(/* webpackMode: 'eager' */ './dropdown-template.pug').then(({ default: dropdownMenuTemplate }) => {\r\n this.dropdown = new MetricPicker({\r\n buttonTemplate: () => null,\r\n template: metricPickerTemplate,\r\n dropdownMenuTemplate,\r\n metricFormatter: this.metricFormatter,\r\n s$i18n: this.s$i18n,\r\n i18n: this.i18n,\r\n accountsMode: this.accountsMode,\r\n deps,\r\n }).setState({\r\n current: currentMetric,\r\n metrics: _.difference(\r\n metrics(permissions, this.accountsMode),\r\n _.map(currentColumns, col => col.name)\r\n ),\r\n });\r\n\r\n this.dropdown.on('pick', ({ metric }) => {\r\n const stateColumns = _.clone(this.getState().columns);\r\n const index = _.findIndex(stateColumns, col => col === currentMetric);\r\n\r\n this.instrumentation.logMessage(\r\n [this.constants.LOGCATEGORY.TRACE],\r\n this.constants.LOGLEVEL.INFO,\r\n 'grid-card',\r\n `${this.navigationLevel} level ${this.typeName} type new metric picked.`\r\n );\r\n stateColumns[index] = metric;\r\n helpers.updateView(this, {\r\n columns: stateColumns,\r\n });\r\n });\r\n\r\n $metricPicker.closest('.grid-card-header').append(this.dropdown.el);\r\n $metricPicker.find('button').attr('aria-expanded', true);\r\n\r\n this.onClickDocument = (event) => {\r\n if (this.dropdown && !this.dropdown.el.contains(event.target)) {\r\n removeDropdown.call(this);\r\n }\r\n };\r\n $(document).on('click', this.onClickDocument);\r\n });\r\n });\r\n });\r\n }\r\n },\r\n },\r\n scrolling: {\r\n virtualized: false,\r\n header: {\r\n type: 'fixed',\r\n attributes: { 'aria-label': this.i18n.getString('{{tableName}} table header', { tableName: this.i18n.getString(titleMapping[this.typeName]) }) },\r\n },\r\n },\r\n });\r\n\r\n this.gridView = gridView;\r\n updateGridColumn.call(this);\r\n\r\n this.listenTo(this.model, changeEvents('dateRange', 'filter'), () => {\r\n this.setState({ fetchSingleTile: false });\r\n refetch.call(this);\r\n });\r\n\r\n this.listenTo(this.model, changeEvents('body'), () => {\r\n this.setState({ fetchSingleTile: true });\r\n updateGridBody.call(this);\r\n });\r\n\r\n this.listenTo(this.model, changeEvents('columns'), () => {\r\n this.setState({ fetchSingleTile: true });\r\n updateGridColumn.call(this);\r\n });\r\n\r\n this.gridView.on('willUpdate', (changes) => {\r\n if (_.has(changes, 'sortableHeader')) {\r\n onGridSortableHeaderChange.call(this, changes);\r\n }\r\n });\r\n\r\n this.gridView.on('didUpdate', () => {\r\n this.setupScrollBarCover();\r\n });\r\n\r\n this.gridView.on('didRedraw', () => {\r\n this.$('.viewport').scrollTop(0);\r\n this.setupScrollBarCover();\r\n const headerOption = this.$('.column-header.clickable');\r\n const firstRow = this.$('.viewport tr:not(.top-filler):first a');\r\n if (firstRow.length > 0) {\r\n firstRow.focus();\r\n } else if (headerOption.length > 0) {\r\n headerOption.get(0).focus();\r\n }\r\n });\r\n\r\n this.gridView.once('didReload', () => {\r\n this.parent.willRenderWithData();\r\n this.dataFetched = true;\r\n this.gridView.once('didRedraw', () => {\r\n this.parent.renderedWithData();\r\n });\r\n });\r\n\r\n this.gridView.once('willReload', () => {\r\n this.parent.willFetchData();\r\n });\r\n\r\n this.gridView.on('willReload', () => {\r\n if (!this.unblock && !this.parent.unblock) {\r\n this.unblock = withUiBlock(this.$el.parent(), this.i18n.getString('Loading'));\r\n }\r\n });\r\n\r\n this.gridView.on('didReload', () => {\r\n if (this.unblock) {\r\n this.unblock();\r\n this.unblock = null;\r\n }\r\n this.parent.unblockCard();\r\n });\r\n }\r\n\r\n get className() {\r\n return 'grid-content';\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click .grid-cell--Name a': event => navigateToEntity({\r\n event,\r\n pageContext: this.pageContext,\r\n legacyRouter: this.legacyRouter,\r\n createEditableFilterStorage: this.createEditableFilterStorage,\r\n cardType: 'grid-card',\r\n instrumentation: this.instrumentation,\r\n constants: this.constants,\r\n }),\r\n 'mouseenter .grid-cell.grid-cell--Name': showPopup,\r\n 'mouseleave .grid-cell.grid-cell--Name': hidePopup,\r\n 'focus .grid-cell.grid-cell--Name': showPopup,\r\n 'blur .grid-cell.grid-cell--Name': hidePopup,\r\n 'keyup .grid-cell.grid-cell--Name': (event) => {\r\n if (event.keyCode === keyCode.Escape) {\r\n hidePopup.call(this, event);\r\n }\r\n },\r\n };\r\n }\r\n\r\n setupScrollBarCover() {\r\n if (!this.dataFetched) {\r\n return;\r\n }\r\n // If have a scroll bar, cover it per design.\r\n // Scroll bar will only be shown on hover.\r\n const viewport = this.gridView.$('.viewport');\r\n const viewportWidth = viewport.width();\r\n const table = $('table', viewport);\r\n const tableWidth = table.width();\r\n\r\n if (viewportWidth && tableWidth && (viewportWidth > tableWidth)) {\r\n // we have a scroll bar.\r\n const scrollBarWidth = viewportWidth - tableWidth;\r\n const scrollBarHeight = viewport.height();\r\n\r\n if (this.$('.scroll-bar-cover').length === 0) {\r\n // If we don't have a cover, create one.\r\n viewport.append(coverTemplate());\r\n }\r\n\r\n $('.scroll-bar-cover', this.$el.closest('.grid-card')).css({\r\n width: scrollBarWidth,\r\n height: scrollBarHeight,\r\n });\r\n\r\n // expand the viewport area to accommodate the scroll bar.\r\n const expand = Math.min(scrollBarWidth, 16);\r\n\r\n viewport.css({ marginRight: -expand });\r\n } else if (this.$('.scroll-bar-cover').length > 0) {\r\n // remove the scroll bar related change\r\n this.$('.scroll-bar-cover').remove();\r\n viewport.css({ marginRight: 0 });\r\n }\r\n }\r\n\r\n get template() {\r\n return template;\r\n }\r\n\r\n renderTrunk() {\r\n super.renderTrunk();\r\n this.gridView.render();\r\n this.$el.prepend(this.gridView.el);\r\n return this;\r\n }\r\n\r\n remove() {\r\n removeDropdown.call(this);\r\n this.gridView.remove();\r\n\r\n if (this.unblock) {\r\n this.unblock();\r\n }\r\n super.remove();\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport $ from 'jquery';\r\nimport { BaseCard } from '@bingads-webui-campaign/overview-base-card';\r\nimport { helpers } from '@bingads-webui/deterministic-view';\r\nimport { gridCardConfig, changeEvents, AccountsMode } from '@bingads-webui-campaign/overview-cards-common';\r\nimport Content from './content';\r\nimport template from './template.pug';\r\n\r\nlet i18n;\r\n\r\nfunction getMenuItems() {\r\n // Can be shared by multiple tiles on the same page.\r\n // create a new copy every time.\r\n const items = [];\r\n\r\n items.push({\r\n displayText: i18n.getString('Dashboard_GridCard_ToolbarDropdown_Value'),\r\n action: 'PerformanceMetrics',\r\n });\r\n\r\n items.push({\r\n displayText: i18n.getString('Dashboard_GridCard_ToolbarDropdown_Change'),\r\n action: 'PerformanceMetricsChange',\r\n });\r\n\r\n items.push({\r\n displayText: i18n.getString('Dashboard_GridCard_ToolbarDropdown_ChangePercentage'),\r\n action: 'PerformanceMetricsChangePercentage',\r\n });\r\n\r\n return items;\r\n}\r\n\r\n/* @this GridCard */\r\nfunction getCardPreference() {\r\n const {\r\n columns,\r\n orderby,\r\n direction,\r\n directionIndex,\r\n } = this.child.getState();\r\n\r\n const { selectedMenuItem } = this.getState();\r\n\r\n return {\r\n columns,\r\n orderby,\r\n direction,\r\n directionIndex,\r\n selectedMenuItem,\r\n };\r\n}\r\n\r\n/* @this GridCard */\r\nfunction navigate({\r\n accountLevelRout,\r\n campaignLevelRout,\r\n}) {\r\n if (this.navigationLevel === 'account') {\r\n this.deps.legacyRouter.navigateToRoute(accountLevelRout);\r\n } else if (this.navigationLevel === 'customer') {\r\n this.deps.legacyRouter.navigateToRoute('accounts_performance', { accountMode: this.accountsMode });\r\n } else {\r\n const campaignId = this.deps.state.get('campaign_id');\r\n\r\n // eslint-disable-next-line camelcase\r\n this.deps.legacyRouter.navigateToRoute(campaignLevelRout, { campaign_id: campaignId });\r\n }\r\n}\r\n\r\n/* @this GridCard */\r\nfunction navigateToMainGrid() {\r\n let accountLevelRout;\r\n let campaignLevelRout;\r\n\r\n // For now we only support this for search term and keyword.\r\n // Neither of them are enabled in prod.\r\n // We might want to do this for all types.\r\n switch (this.typeName) {\r\n case 'SearchTerm':\r\n accountLevelRout = 'keyword_search_term';\r\n campaignLevelRout = 'campaign_keyword_search_term';\r\n break;\r\n case 'Keyword':\r\n accountLevelRout = 'keyword';\r\n campaignLevelRout = 'campaign_keyword';\r\n break;\r\n case 'Campaign':\r\n accountLevelRout = 'campaign';\r\n break;\r\n case 'AdGroup':\r\n accountLevelRout = 'adgroup';\r\n campaignLevelRout = 'campaign_adgroup';\r\n break;\r\n default:\r\n }\r\n\r\n const {\r\n instrumentation, constants,\r\n } = this.deps;\r\n\r\n instrumentation.logMessage(\r\n [constants.LOGCATEGORY.TRACE],\r\n constants.LOGLEVEL.INFO,\r\n 'grid-card',\r\n `${this.navigationLevel} level ${this.typeName} type view all clicked`\r\n );\r\n navigate.call(this, {\r\n accountLevelRout,\r\n campaignLevelRout,\r\n });\r\n}\r\n\r\nfunction getSearchTermDetail(target) {\r\n const $link = $(target).closest('.grid-cell--Name').find('a[data-type=SearchTerm]');\r\n const campaignId = $link.data('campaignid');\r\n const adGroupId = $link.data('adgroupid');\r\n const text = $link.data('text').toString();\r\n const navigationLevel = $link.data('navigationlevel');\r\n const campaignName = $link.data('campaignname');\r\n const adGroupName = $link.data('adgoupname');\r\n const matchType = $link.data('matchtype');\r\n\r\n return {\r\n campaignId,\r\n adGroupId,\r\n text,\r\n navigationLevel,\r\n campaignName,\r\n adGroupName,\r\n matchType,\r\n };\r\n}\r\n\r\n/* @this GridCard */\r\nfunction setupMenuItems() {\r\n const { dateRange } = this.getState();\r\n\r\n if (dateRange && dateRange.compared && this.typeName !== 'SearchTerm') {\r\n const { selectedMenuItem } = this.getState();\r\n const items = getMenuItems();\r\n\r\n _.each(items, (item) => {\r\n if (item.action === selectedMenuItem) {\r\n item.preset = true; // eslint-disable-line no-param-reassign\r\n } else {\r\n item.preset = false; // eslint-disable-line no-param-reassign\r\n }\r\n });\r\n\r\n this.setState({\r\n menuItems: items,\r\n });\r\n } else {\r\n this.setState({\r\n menuItems: null,\r\n });\r\n this.onMenuAction(gridCardConfig.defaultOptions.selectedMenuItem);\r\n }\r\n}\r\n\r\nexport class GridCard extends BaseCard {\r\n get className() {\r\n return 'grid-card';\r\n }\r\n\r\n get template() {\r\n return () => template({\r\n i18n,\r\n buttonText: this.buttonText,\r\n typeName: this.typeName,\r\n isCustomerLevel: this.navigationLevel === 'customer',\r\n });\r\n }\r\n\r\n get menuItems() {\r\n return this.getState().menuItems;\r\n }\r\n\r\n onMenuAction(body) {\r\n helpers.updateView(this.child, _.defaults({\r\n body,\r\n }, this.getState()));\r\n\r\n if (this.menuItems) {\r\n const { selectedMenuItem } = this.getState();\r\n\r\n if (body === selectedMenuItem) {\r\n return;\r\n }\r\n\r\n this.setState({\r\n selectedMenuItem: body,\r\n });\r\n\r\n this.trigger('storeCardPreference', getCardPreference.call(this));\r\n\r\n const {\r\n instrumentation, constants,\r\n } = this.deps;\r\n\r\n instrumentation.logMessage(\r\n [constants.LOGCATEGORY.TRACE],\r\n constants.LOGLEVEL.INFO,\r\n 'grid-card',\r\n `${this.navigationLevel} level ${this.typeName} type new pop type picked.`\r\n );\r\n _.defer(() => {\r\n // If the menu is open close it.\r\n this.$el.closest('.card-holder').find('.multilevel-dropdown.open').click();\r\n });\r\n }\r\n }\r\n\r\n initialize({\r\n entitySet,\r\n navigationLevel,\r\n columns,\r\n orderby,\r\n direction,\r\n directionIndex,\r\n selectedMenuItem,\r\n dateRange,\r\n filter,\r\n sharedOptions,\r\n fetchSingleTile = false,\r\n preexecuteFlag = false,\r\n deps,\r\n accountsMode = AccountsMode.Expert,\r\n }) {\r\n this.typeName = entitySet.type.elementType.shortName;\r\n this.navigationLevel = navigationLevel;\r\n this.accountsMode = accountsMode;\r\n this.deps = deps;\r\n i18n = this.deps.i18n; // eslint-disable-line\r\n\r\n const isSmartShoppingCampaign = this.isSmartShoppingCampaign();\r\n switch (this.typeName) {\r\n case 'SearchTerm':\r\n this.buttonText = !isSmartShoppingCampaign ? i18n.getString('Dashboard_TopSearchTerms_View_All') : null;\r\n break;\r\n case 'Keyword':\r\n this.buttonText = !isSmartShoppingCampaign ? i18n.getString('Dashboard_TopKeywords_View_All') : null;\r\n break;\r\n case 'Campaign':\r\n this.buttonText = i18n.getString('Dashboard_TopCampaigns_View_All');\r\n break;\r\n case 'AdGroup':\r\n this.buttonText = i18n.getString('Dashboard_TopAdGroups_View_All');\r\n break;\r\n case 'Account':\r\n this.buttonText = i18n.getString('Dashboard_TopAccounts_View_All');\r\n break;\r\n default:\r\n this.buttonText = undefined;\r\n }\r\n\r\n let adjustedMenuItem = selectedMenuItem;\r\n\r\n if (!dateRange.compared || this.typeName === 'SearchTerm') {\r\n adjustedMenuItem = gridCardConfig.defaultOptions.selectedMenuItem;\r\n }\r\n\r\n this.setState(_.defaults({\r\n selectedMenuItem: adjustedMenuItem,\r\n dateRange,\r\n }, {\r\n selectedMenuItem: gridCardConfig.defaultOptions.selectedMenuItem,\r\n }));\r\n\r\n this.child = new Content(_.extend({\r\n entitySet,\r\n navigationLevel,\r\n parent: this,\r\n columns,\r\n orderby,\r\n direction,\r\n directionIndex,\r\n dateRange,\r\n filter,\r\n fetchSingleTile,\r\n preexecuteFlag,\r\n accountsMode,\r\n getCardsConfig: sharedOptions.getCardsConfig,\r\n deps: this.deps,\r\n typeId: this.options.typeId,\r\n }, _.pick(this.getState(), 'selectedMenuItem')));\r\n\r\n this.setChild('content', this.child);\r\n\r\n setupMenuItems.call(this);\r\n helpers.updateView(this.child, this.getState());\r\n\r\n this.listenTo(this.model, changeEvents('dateRange', 'filter'), () => {\r\n helpers.updateView(this.child, this.getState());\r\n });\r\n\r\n this.listenTo(this.model, changeEvents('size'), () => {\r\n if (this.addKeywordView && this.$el.closest('.dashboard').find(`.${this.addKeywordView.className}`).length > 0) {\r\n this.addKeywordView.updatePosition();\r\n }\r\n this.child.setupScrollBarCover();\r\n });\r\n\r\n this.on('rendered', () => {\r\n this.child.setupScrollBarCover();\r\n });\r\n\r\n this.listenTo(this.model, changeEvents('dateRange'), () => {\r\n setupMenuItems.call(this);\r\n });\r\n\r\n this.listenTo(this.model, changeEvents('menuItems'), () => {\r\n this.trigger('change:menuItems', {\r\n value: this.getState().menuItems,\r\n options: { replace: true },\r\n });\r\n });\r\n\r\n this.onResize(() => {\r\n this.child.setupScrollBarCover();\r\n });\r\n\r\n this.child.on('gridOptionChange', () => this.trigger('storeCardPreference', getCardPreference.call(this)));\r\n }\r\n\r\n reloadGrid() {\r\n this.child.gridView.refresh(true);\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click .view-all-clickLink': () => navigateToMainGrid.call(this),\r\n 'click button.add': this.addAsKeyword,\r\n 'click button.exclude': this.addAsNegativeKeyword,\r\n };\r\n }\r\n\r\n addAsKeyword(event) {\r\n /* eslint-disable global-require */\r\n import(/* webpackMode: 'eager' */'./search-term-operations/add-keyword').then(({ AddKeywordView }) => {\r\n this.addKeywordView = new AddKeywordView(_.extend(getSearchTermDetail(event.currentTarget), {\r\n gridCard: this,\r\n addAsNegativeKeyword: false,\r\n reloadGrid: () => this.reloadGrid(),\r\n deps: this.deps,\r\n })).render();\r\n\r\n $(event.currentTarget).closest('.dashboard').append(this.addKeywordView.$el);\r\n });\r\n }\r\n\r\n addAsNegativeKeyword(event) {\r\n /* eslint-disable global-require */\r\n import(/* webpackMode: 'eager' */'./search-term-operations/add-keyword').then(({ AddKeywordView }) => {\r\n this.addKeywordView = new AddKeywordView(_.extend(getSearchTermDetail(event.currentTarget), {\r\n gridCard: this,\r\n addAsNegativeKeyword: true,\r\n reloadGrid: () => this.reloadGrid(),\r\n deps: this.deps,\r\n })).render();\r\n\r\n $(event.currentTarget).closest('.dashboard').append(this.addKeywordView.$el);\r\n });\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport $ from 'jquery';\r\nimport { DeterministicView, helpers } from '@bingads-webui/deterministic-view';\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\nimport {\r\n createCampaignAdGroupSelector,\r\n} from '@bingads-webui-campaign-react/campaign-adgroup-selector-control';\r\nimport { DeterministicWrapperView } from '@bingads-webui/deterministic-wrapper-view';\r\n\r\nimport template from './add-keyword-template.pug';\r\n\r\nconst { ensureChildView } = helpers;\r\n\r\nclass CampaignAdgroupSelectorVnext extends DeterministicWrapperView {\r\n viewFactory({\r\n level,\r\n scope,\r\n campaignId,\r\n selectedCampaign,\r\n selectedAdGroup,\r\n jsData,\r\n i18n,\r\n edmCampaign,\r\n }) {\r\n this.campaignAdgroupSelector = createCampaignAdGroupSelector({\r\n jsData,\r\n edmCampaign,\r\n scope,\r\n level,\r\n campaignId,\r\n i18n,\r\n selectedCampaign,\r\n selectedAdGroup,\r\n parentView: this,\r\n });\r\n return this.campaignAdgroupSelector;\r\n }\r\n}\r\n\r\n/* @this AddKeywordView */\r\nfunction setPosition() {\r\n const position = this.gridCard.$('.viewport').offset();\r\n\r\n if (!position) {\r\n return;\r\n }\r\n\r\n const offset = this.addAsNegativeKeyword ? 150 : 50;\r\n const top = position.top - offset - $(window).scrollTop();\r\n const left = position.left - $(window).scrollLeft();\r\n\r\n this.$el.css({\r\n top,\r\n left,\r\n });\r\n}\r\n\r\n/* @this AddKeywordView */\r\nfunction updateSelectorPosition() {\r\n // Update position of campaign adgroup popup,\r\n // so that it's in view.\r\n const $selector = this.$('.ba-campaign-adgroup-selector .dropdown-menu, .ba-campaign-selector .dropdown-menu, .ba-campaign-selector .dropdown-menu');\r\n const $pageContainer = $('.overview-page');\r\n\r\n $selector.css({ top: 'auto', left: 'auto' });\r\n const { top, left } = $selector.offset();\r\n const { top: parentTop, left: parentLeft } = $selector.offsetParent().offset();\r\n const { top: pageContainerTop, left: pageContainerLeft } = $pageContainer.offset();\r\n const pageContainerHeight = $pageContainer.height();\r\n const pageContainerWidth = $pageContainer.width();\r\n const { selectionLevel } = this.getState();\r\n const selectingCampaignAndAdGroup = selectionLevel === 'adGroupLevel' && this.navigationLevel === 'account';\r\n const selectorSize = selectingCampaignAndAdGroup ?\r\n { height: 450, width: 620 } : { height: 450, width: 320 };\r\n\r\n const offset = { top: 'auto', left: 'auto' };\r\n\r\n if ((top - pageContainerTop) + selectorSize.height > pageContainerHeight) {\r\n offset.top = Math.max(\r\n (pageContainerHeight + pageContainerTop) - selectorSize.height - parentTop,\r\n pageContainerTop - parentTop\r\n );\r\n }\r\n\r\n if ((left - pageContainerLeft) + selectorSize.width > pageContainerWidth) {\r\n offset.left = Math.max(\r\n (pageContainerWidth + pageContainerLeft) - selectorSize.width - parentLeft,\r\n pageContainerLeft - parentLeft\r\n );\r\n }\r\n\r\n if (offset.top !== 'auto' || offset.left !== 'auto') {\r\n $selector.css(offset);\r\n }\r\n}\r\n\r\n/* @this AddKeywordView */\r\nfunction clearError() {\r\n const { errMsg } = this.getState();\r\n\r\n if (errMsg) {\r\n this.setState({ errMsg: null });\r\n }\r\n}\r\n\r\n/* @this AddKeywordView */\r\nfunction setupSelectorView() {\r\n const { selectionLevel, adGroupName, campaignName } = this.getState();\r\n const state = {\r\n scope: this.navigationLevel,\r\n level: selectionLevel,\r\n campaignId: this.campaignId,\r\n i18n: this.deps.i18n,\r\n selectedCampaign: {\r\n name: campaignName,\r\n Id: this.campaignId,\r\n },\r\n selectedAdGroup: {\r\n name: adGroupName,\r\n campaignName,\r\n },\r\n jsData: this.deps.jsdata,\r\n edmCampaign: this.deps.edmCampaign,\r\n };\r\n\r\n if (this.getChild('selector')) {\r\n this.detachChild('selector').remove();\r\n }\r\n\r\n const childView = ensureChildView(\r\n this,\r\n 'selector',\r\n CampaignAdgroupSelectorVnext,\r\n state,\r\n {\r\n campaignSelected(newCampaign) {\r\n const { level = selectionLevel } = this.getState();\r\n\r\n if (level === 'campaignLevel') {\r\n this.campaignId = newCampaign.Id;\r\n\r\n this.setState({\r\n campaignName: newCampaign.Name,\r\n });\r\n clearError.call(this);\r\n }\r\n },\r\n adgroupSelected(newAdGroup) {\r\n this.campaignId = newAdGroup.campaignId;\r\n this.adGroupId = newAdGroup.Id;\r\n this.setState({\r\n adGroupName: newAdGroup.Name,\r\n campaignName: newAdGroup.campaignName,\r\n });\r\n clearError.call(this);\r\n },\r\n }\r\n );\r\n\r\n childView.once('rendered', () => {\r\n window.addEventListener('click', this.windowClickHandler);\r\n window.addEventListener('scroll', this.windowScrollHandler);\r\n window.addEventListener('resize', this.windowResizeHandler);\r\n $('.overview-page').parent().scroll(this.windowScrollHandler);\r\n updateSelectorPosition.call(this);\r\n });\r\n}\r\n\r\n/* @this AddKeywordView */\r\nfunction errorHandler(response) {\r\n if (response && response.errors) {\r\n let errors;\r\n\r\n if (this.addAsNegativeKeyword) {\r\n errors = this.deps.i18nErrors.getODataErrors(response.errors);\r\n } else {\r\n errors = this.deps.i18nErrors.getBulkApiErrors(response.errors);\r\n }\r\n\r\n if (errors && errors[0] && errors[0].message) {\r\n this.setState({\r\n errMsg: errors[0].message,\r\n });\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n}\r\n\r\nexport class AddKeywordView extends DeterministicView {\r\n get className() {\r\n return 'add-keyword-container';\r\n }\r\n\r\n get template() {\r\n const {\r\n adGroupName,\r\n campaignName,\r\n selectionLevel,\r\n errMsg,\r\n isEmpty,\r\n } = this.getState();\r\n\r\n return () => template({\r\n i18n: this.deps.i18n,\r\n text: this.text,\r\n matchType: this.matchType,\r\n navigationLevel: this.navigationLevel,\r\n addAsNegativeKeyword: this.addAsNegativeKeyword,\r\n adGroupName,\r\n campaignName,\r\n selectionLevel,\r\n appendLearnMoreLink: this.deps.appendLearnMoreLink,\r\n errMsg,\r\n isEmpty,\r\n });\r\n }\r\n\r\n initialize({\r\n campaignId,\r\n adGroupId,\r\n text,\r\n navigationLevel,\r\n campaignName,\r\n adGroupName,\r\n gridCard,\r\n addAsNegativeKeyword,\r\n matchType,\r\n reloadGrid,\r\n deps,\r\n }) {\r\n this.campaignId = campaignId;\r\n this.adGroupId = adGroupId;\r\n this.text = text;\r\n this.reloadGrid = reloadGrid;\r\n this.deps = deps;\r\n\r\n if (addAsNegativeKeyword && matchType === 'Broad') {\r\n // Negative keyword do not have 'Broad' match, while delivery match type is 'Broad'.\r\n // Set default negative keyword match type as 'Exact'.\r\n this.matchType = 'Exact';\r\n } else if (!addAsNegativeKeyword && matchType === 'Exact') {\r\n // The delivery match type is 'Broad'. So the keyword already exist with 'Exact' match.\r\n // Set default new keyword match type as 'Broad'.\r\n this.matchType = 'Broad';\r\n } else {\r\n this.matchType = matchType;\r\n }\r\n\r\n this.navigationLevel = navigationLevel;\r\n this.gridCard = gridCard;\r\n this.addAsNegativeKeyword = addAsNegativeKeyword;\r\n gridCard.trigger('clearDragAndDrop');\r\n this.windowClickHandler = event => this.hideOnClickOutSide(event);\r\n this.windowScrollHandler = _.throttle(() => {\r\n this.updatePosition();\r\n }, 10);\r\n\r\n this.windowResizeHandler = _.throttle(() => {\r\n this.updatePosition();\r\n }, 10);\r\n this.scopeContext = this.deps.scopeService.getScope();\r\n\r\n setPosition.call(this);\r\n this.setState({\r\n adGroupName,\r\n campaignName,\r\n selectionLevel: 'adGroupLevel',\r\n isEmpty: false,\r\n });\r\n\r\n setupSelectorView.call(this);\r\n }\r\n\r\n onSuccess() {\r\n this.reloadGrid();\r\n this.remove();\r\n }\r\n\r\n onError(response) {\r\n if (!errorHandler.call(this, response)) {\r\n this.remove();\r\n }\r\n }\r\n\r\n cancel() {\r\n this.remove();\r\n }\r\n\r\n apply() {\r\n if (this.addAsNegativeKeyword) {\r\n const { selectionLevel } = this.getState();\r\n const negativeKeyword = {\r\n NegativeKeywords: [{\r\n Text: this.text,\r\n EntityType: selectionLevel === 'adGroupLevel' ? 'AdGroup' : 'Campaign',\r\n CampaignId: this.campaignId,\r\n AdGroupId: this.adGroupId,\r\n MatchType: this.matchType,\r\n }],\r\n };\r\n const campaignEntity = this.deps.edmCampaign.currentAccount.Campaigns\r\n .$withKey(this.campaignId);\r\n let entitySet;\r\n\r\n if (selectionLevel === 'adGroupLevel') {\r\n entitySet = campaignEntity.AdGroups.$withKey(this.adGroupId);\r\n } else {\r\n entitySet = campaignEntity;\r\n }\r\n\r\n this.deps.jsdata.NegativeKeyword.create(negativeKeyword, {\r\n entitySet: entitySet.NegativeKeywords['Default.PostNegativeKeywords'],\r\n }).finally(document.documentElement.contains(this.el) ?\r\n withUiBlock(this.el) :\r\n _.noop).then(() => this.onSuccess()).catch(response => this.onError(response));\r\n } else {\r\n const { adGroupName } = this.getState();\r\n const keywordData = {\r\n Campaign: { Id: this.campaignId },\r\n Name: adGroupName,\r\n Id: this.adGroupId,\r\n Keywords: [{\r\n Text: this.text,\r\n MatchType: this.matchType,\r\n Bid: {},\r\n AdGroup: { Id: this.adGroupId },\r\n }],\r\n };\r\n\r\n this.deps.jsdata.AdGroup\r\n .update(keywordData.Id, keywordData, { adapter: 'bulk' })\r\n .finally(document.documentElement.contains(this.el) ?\r\n withUiBlock(this.el) :\r\n _.noop).then(() => this.onSuccess()).catch(response => this.onError(response));\r\n }\r\n }\r\n\r\n updatePosition() {\r\n setPosition.call(this);\r\n updateSelectorPosition.call(this);\r\n }\r\n\r\n toggleSelector() {\r\n if (this.$('.popover.row.fade.bottom:visible').length === 0) {\r\n _.defer(() => {\r\n this.$('div.form-control.dropDownSelect.k-button.clickable').click();\r\n });\r\n }\r\n }\r\n\r\n updateEntityLevel(event) {\r\n const selected = this.$('input[type=\"radio\"][name=\"entityLevel\"]:checked');\r\n\r\n if (selected.length > 0) {\r\n const { selectionLevel } = this.getState();\r\n const value = selected.val();\r\n\r\n if (selectionLevel !== value) {\r\n this.setState({\r\n selectionLevel: value,\r\n });\r\n setupSelectorView.call(this);\r\n clearError.call(this);\r\n }\r\n }\r\n event.stopPropagation();\r\n event.preventDefault();\r\n }\r\n\r\n keywordTextChange() {\r\n this.text = this.$('input.keyword-text__value').val();\r\n clearError.call(this);\r\n this.setState({\r\n isEmpty: !this.text,\r\n });\r\n }\r\n\r\n matchTypeChange() {\r\n this.matchType = this.$('select.match-type__value').val();\r\n clearError.call(this);\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click button.cancel': this.cancel,\r\n 'click button.apply': this.apply,\r\n 'click .selected-entity-names': this.toggleSelector,\r\n 'click input[type=\"radio\"][name=\"entityLevel\"]': this.updateEntityLevel,\r\n 'input input.keyword-text__value': this.keywordTextChange,\r\n 'change select.match-type__value': this.matchTypeChange,\r\n 'click .ba-campaign-adgroup-selector, .ba-campaign-selector, .ba-campaign-selector': () => _.defer(updateSelectorPosition.bind(this)),\r\n };\r\n }\r\n\r\n remove() {\r\n this.gridCard.trigger('setupDragAndDrop');\r\n window.removeEventListener('click', this.windowClickHandler);\r\n window.removeEventListener('scroll', this.windowScrollHandler);\r\n window.removeEventListener('resize', this.windowResizeHandler);\r\n super.remove();\r\n }\r\n\r\n hideOnClickOutSide(event) {\r\n if (!this.el.contains(event.target)) {\r\n this.remove();\r\n }\r\n }\r\n}\r\n","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport Backbone from 'backbone';\r\nimport { TooltipHost } from '@bingads-webui-react/fabric-control';\r\nimport { Glyphicon } from '@bingads-webui-react/primitive-unthemed';\r\nimport { DeterministicViewForBackBoneView } from '@bingads-webui/deterministic-wrapper-view';\r\n\r\n// eslint-disable-next-line react/prop-types\r\nexport const MetricToolTip = ({ content }) => (\r\n \r\n \r\n \r\n);\r\n\r\nexport class MetricToolTipBackBoneView extends Backbone.View {\r\n initialize({ content }) {\r\n this.content = content;\r\n }\r\n\r\n render() {\r\n ReactDOM.render(\r\n (),\r\n this.el\r\n );\r\n return this;\r\n }\r\n\r\n remove() {\r\n ReactDOM.unmountComponentAtNode(this.el);\r\n return super.remove();\r\n }\r\n}\r\n\r\nexport function getDeterministicTooltipView(content) {\r\n return new DeterministicViewForBackBoneView({\r\n view: new MetricToolTipBackBoneView({ content }),\r\n });\r\n}\r\n","import _ from 'underscore';\r\nimport 'bootstrap';\r\nimport { DeterministicView } from '@bingads-webui/deterministic-view';\r\nimport { allMetrics as defaultMetrics } from '@bingads-webui-campaign/overview-cards-common';\r\nimport defaultTemplate from './template.pug';\r\nimport defaultButtonTemplate from './button-template.pug';\r\nimport defaultDropdownMenuTemplate from './dropdown-menu-template.pug';\r\nimport { getDeterministicTooltipView } from './info-tooltip';\r\n\r\nexport class MetricPicker extends DeterministicView {\r\n constructor(options) {\r\n super(_.extend({}, options, { renderInSync: true }));\r\n }\r\n\r\n initialize({\r\n template = defaultTemplate,\r\n buttonTemplate = defaultButtonTemplate,\r\n buttonTemplateParams = {},\r\n dropdownMenuTemplate = defaultDropdownMenuTemplate,\r\n metric,\r\n metrics,\r\n leftAlign,\r\n metricFormatter,\r\n s$i18n,\r\n i18n,\r\n accountsMode,\r\n deps,\r\n } = {}) {\r\n this.template = template;\r\n this.buttonTemplate = buttonTemplate;\r\n this.buttonTemplateParams = buttonTemplateParams;\r\n this.dropdownMenuTemplate = dropdownMenuTemplate;\r\n this.leftAlign = leftAlign;\r\n this.metricFormatter = metricFormatter;\r\n this.s$i18n = s$i18n;\r\n this.i18n = i18n;\r\n this.accountsMode = accountsMode;\r\n this.deps = deps || {};\r\n this.setState({\r\n metric,\r\n metrics,\r\n });\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click .metric-picker': (e) => {\r\n // if the event was triggered from dropdown menu, ignore it\r\n if (e.target.classList.contains('dropdown-menu')) {\r\n e.stopPropagation();\r\n e.preventDefault();\r\n return;\r\n }\r\n const toggleEl = this.$('.dropdown-toggle')[0];\r\n\r\n if (toggleEl === e.target || toggleEl.contains(e.target)) {\r\n return;\r\n }\r\n\r\n this.trigger('pick', {\r\n metric: this.getState().metric,\r\n });\r\n },\r\n 'click .dropdown-menu li': (e) => {\r\n e.stopPropagation();\r\n e.preventDefault();\r\n const { metric } = e.currentTarget.dataset;\r\n\r\n this.setState({\r\n metric,\r\n });\r\n\r\n this.trigger('pick', {\r\n metric: this.getState().metric,\r\n });\r\n\r\n this.SetUpContentForGlobalA11yAnnounceArea(metric);\r\n },\r\n };\r\n }\r\n\r\n renderTrunk() {\r\n const {\r\n performanceMetric = '',\r\n metric,\r\n metrics = defaultMetrics(this.deps.config && this.deps.config.get('Permissions'), this.accountsMode),\r\n hideCurrency,\r\n } = this.getState();\r\n\r\n this.$el.html(this.template({\r\n metric,\r\n }));\r\n\r\n const metricValue = metric ? this.metricFormatter.formatMetric(\r\n metric,\r\n performanceMetric || 0,\r\n { hideCurrency }\r\n ) : '';\r\n const addInfo = metricValue === '-';\r\n\r\n if (addInfo) {\r\n const tooltipView = getDeterministicTooltipView(this.i18n.getString('Dashboard_CurrencyMetric_Info_Tooltip'));\r\n\r\n this.setChild('info-tooltip', tooltipView);\r\n }\r\n\r\n this.$('.metric-picker').append(this.buttonTemplate({\r\n s$i18n: this.s$i18n,\r\n metricValue,\r\n metric,\r\n performanceMetric,\r\n i18n: this.i18n,\r\n addInfo,\r\n ...this.buttonTemplateParams,\r\n }));\r\n\r\n this.$('.metric-picker').append(this.dropdownMenuTemplate({\r\n s$i18n: this.s$i18n,\r\n metrics,\r\n leftAlign: this.leftAlign,\r\n }));\r\n\r\n return this;\r\n }\r\n\r\n SetUpContentForGlobalA11yAnnounceArea(metricName) {\r\n const a11yAnnounceArea = document.querySelector('#a11yAnnounceArea');\r\n if (a11yAnnounceArea) {\r\n a11yAnnounceArea.textContent = this.i18n.getString('Dashboard_Graph_MetricsName_Updated_A11y_Info').replace('{{metricsName}}', this.s$i18n.property('PerformanceMetrics', metricName));\r\n setTimeout(() => {\r\n a11yAnnounceArea.textContent = '';\r\n }, 0);\r\n }\r\n }\r\n}\r\n","export { CardState } from './src/dashboard/card-state';\r\n\r\nexport { getViewportCardCount } from './src/dashboard/util';\r\n\r\nexport { DateFilterState } from './src/dashboard/datefilter-state';\r\n\r\nexport const overviewPanel = () => import(/* webpackMode: 'eager' */ './src/index');\r\n","function getDefaultConfig() {\r\n return {\r\n defaultName: 'default',\r\n defaultDragAndDrop: true,\r\n defaultDebug: false,\r\n defaultDragHandlerSelector: '.card-holder__toolbar, .card-holder__title, .card-holder__menu-container',\r\n layoutOptions: {\r\n small: {\r\n breakpoint: 0,\r\n minCardSize: 12,\r\n maxCardSize: 12,\r\n defaultHeight: 368,\r\n },\r\n medium: {\r\n breakpoint: 1046,\r\n minCardSize: 6,\r\n maxCardSize: 12,\r\n defaultHeight: 368,\r\n },\r\n large: {\r\n breakpoint: 1400,\r\n minCardSize: 4,\r\n maxCardSize: 12,\r\n defaultHeight: 368,\r\n },\r\n },\r\n toolbar: {\r\n ids: {\r\n addCardButton: 'btn-add-card',\r\n },\r\n items: [\r\n {\r\n type: 'button',\r\n id: 'btn-add-card',\r\n classes: ['btn', 'btn-default'],\r\n textKey: 'Dashboard_AddCard',\r\n },\r\n ],\r\n },\r\n };\r\n}\r\n\r\nfunction getWelcomeConfig() {\r\n return {\r\n defaultName: 'welcome',\r\n defaultDragAndDrop: false,\r\n defaultDebug: false,\r\n layoutOptions: {\r\n small: {\r\n breakpoint: 0,\r\n minCardSize: 12,\r\n maxCardSize: 12,\r\n defaultHeight: 368,\r\n },\r\n medium: {\r\n breakpoint: 1046,\r\n minCardSize: 6,\r\n maxCardSize: 12,\r\n defaultHeight: 368,\r\n },\r\n },\r\n };\r\n}\r\n\r\nexport const dashboardConfig = {\r\n getDefaultConfig() {\r\n return getDefaultConfig();\r\n },\r\n getWelcomeConfig() {\r\n return getWelcomeConfig();\r\n },\r\n};\r\n","import ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport { keyCode } from '@bingads-webui/keycode';\r\n\r\nexport class AddCardViewModel {\r\n constructor({\r\n allAvailableCards,\r\n selectedCards,\r\n i18n,\r\n updateFocusedIndex,\r\n }) {\r\n this.selectedCards = selectedCards;\r\n this.i18n = i18n;\r\n const getFirstFocusableIndex = (cards) => {\r\n const firstSelectedIndex = _.findIndex(\r\n cards,\r\n card => card.selected()\r\n );\r\n return firstSelectedIndex === -1 ? 0 : firstSelectedIndex;\r\n };\r\n\r\n // construct the observables\r\n _.each(allAvailableCards, (card) => {\r\n _.extend(card, {\r\n selected: ko.observable(_.findIndex(\r\n selectedCards,\r\n selected => selected === card.typeId\r\n ) !== -1),\r\n });\r\n\r\n _.extend(card, {\r\n appliedClass: ko.pureComputed(() => {\r\n if (card.selected()) {\r\n return `add-card__thumbnail-${card.cssKey} add-card__thumbnail-${card.cssKey}--selected`;\r\n }\r\n return `add-card__thumbnail-${card.cssKey}`;\r\n }, card),\r\n });\r\n });\r\n\r\n this.firstFocusedIndex = ko.observable(getFirstFocusableIndex(allAvailableCards));\r\n\r\n this.allCards = ko.observableArray(allAvailableCards);\r\n\r\n this.cardsToAdd = ko.pureComputed(() => _.chain(this.allCards())\r\n .filter(card => card.selected() === true)\r\n .pluck('typeId')\r\n .difference(this.selectedCards)\r\n .value());\r\n\r\n this.cardsToDelete = ko.pureComputed(() => _.chain(this.allCards())\r\n .filter(card => card.selected() !== true)\r\n .pluck('typeId')\r\n .intersection(this.selectedCards)\r\n .value());\r\n\r\n this.selectedTilesNumber = ko.pureComputed(() => {\r\n const selectedGroup = _.countBy(this.allCards(), c => (c.selected() === true ? 'selected' : 'unselected'));\r\n\r\n return selectedGroup.selected || 0;\r\n }, this);\r\n\r\n // Simple click callback, only for toggle state\r\n this.onThumbnailClicked = (card) => {\r\n card.selected(!card.selected());\r\n this.firstFocusedIndex(getFirstFocusableIndex(allAvailableCards));\r\n };\r\n\r\n this.onKeyPress = (card, event) => {\r\n if (event.keyCode === keyCode.Space) {\r\n card.selected(!card.selected());\r\n this.firstFocusedIndex(getFirstFocusableIndex(allAvailableCards));\r\n event.preventDefault();\r\n }\r\n };\r\n\r\n this.onFocus = (card) => {\r\n const index = allAvailableCards.indexOf(card);\r\n updateFocusedIndex(index);\r\n };\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport { keyCode } from '@bingads-webui/keycode';\r\nimport edm from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\n\r\nimport templateVNext from './template-vnext.pug';\r\nimport { AddCardViewModel } from './viewmodel';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/dashboard-page');\r\nconst permissions = config.get('Permissions') || {};\r\n\r\n/* @this AddCardView */\r\nfunction saveAddCard() {\r\n this.trigger('apply', {\r\n idsToAdd: this.viewModel.cardsToAdd(),\r\n idsToDelete: this.viewModel.cardsToDelete(),\r\n });\r\n}\r\n\r\n/* @this AddCardView */\r\nfunction cancelAddCard() {\r\n this.trigger('cancel');\r\n}\r\n\r\n/* @this GetNextFocusedIndex */\r\nfunction getNextFocusedItemIndex(numOfCards, previousIndex, isNext) {\r\n const maxIndex = numOfCards - 1;\r\n\r\n let newIndex;\r\n\r\n if (previousIndex < 0) {\r\n newIndex = 0;\r\n } else if (previousIndex > maxIndex) {\r\n newIndex = maxIndex;\r\n } else if (isNext && previousIndex === maxIndex) {\r\n newIndex = 0;\r\n } else if (!isNext && previousIndex === 0) {\r\n newIndex = maxIndex;\r\n } else {\r\n newIndex = isNext ? previousIndex + 1 : previousIndex - 1;\r\n }\r\n\r\n return newIndex;\r\n}\r\n\r\n/* @this GetAllCardElements */\r\nfunction getAllAvailableCardElements() {\r\n return this.$('.add-card__card-box');\r\n}\r\n\r\n/* @this AddCardKeyDown */\r\nfunction onKeyDown(event) {\r\n const allAvailableCardElements = getAllAvailableCardElements.call(this);\r\n const numOfCards = allAvailableCardElements.length;\r\n if (numOfCards === 0) {\r\n return;\r\n }\r\n if (event.keyCode === keyCode.ArrowDown) {\r\n this.focusedIndex = getNextFocusedItemIndex(numOfCards, this.focusedIndex, true);\r\n event.preventDefault();\r\n } else if (event.keyCode === keyCode.ArrowUp) {\r\n this.focusedIndex = getNextFocusedItemIndex(numOfCards, this.focusedIndex, false);\r\n event.preventDefault();\r\n } else if (event.keyCode === keyCode.Home) {\r\n this.focusedIndex = 0;\r\n } else if (event.keyCode === keyCode.End) {\r\n this.focusedIndex = numOfCards - 1;\r\n }\r\n const cardElement = allAvailableCardElements[this.focusedIndex];\r\n cardElement.focus();\r\n}\r\n\r\nexport class AddCardView extends Backbone.View {\r\n initialize({\r\n selectedCards = [],\r\n navigationLevel,\r\n accountsMode,\r\n newCardsConfig = null,\r\n campaignType,\r\n newI18n,\r\n }) {\r\n this.navigationLevel = navigationLevel;\r\n this.campaignType = campaignType;\r\n const cardsConfig = newCardsConfig({\r\n permissions,\r\n edm,\r\n accountsMode,\r\n });\r\n this.focusedIndex = -1;\r\n const updateFocusedIndex = (index) => {\r\n this.focusedIndex = index;\r\n };\r\n this.newI18n = newI18n;\r\n\r\n this.viewModel = new AddCardViewModel({\r\n allAvailableCards: _.chain(cardsConfig).filter(conf => cardsConfig.isValidForNavigationLevel(\r\n conf,\r\n this.navigationLevel,\r\n this.campaignType\r\n )).map((conf) => {\r\n const useNewI18n = conf.useNewI18n || false;\r\n return ({\r\n typeId: conf.typeId,\r\n name: conf.name,\r\n addCardTitle: useNewI18n ? newI18n.getString(conf.addCardTitleKey) : i18n.getString(conf.addCardTitleKey),\r\n cssKey: conf.cssKey,\r\n desc: useNewI18n ? newI18n.getString(conf.descKey) : i18n.getString(conf.descKey),\r\n });\r\n }).value(),\r\n selectedCards,\r\n i18n,\r\n newI18n,\r\n updateFocusedIndex,\r\n });\r\n }\r\n\r\n events() {\r\n return {\r\n 'click .save': saveAddCard,\r\n 'click .cancel': cancelAddCard,\r\n 'keydown .add-card__card-box': onKeyDown,\r\n };\r\n }\r\n\r\n render() {\r\n this.$el.html(templateVNext({\r\n i18n,\r\n }));\r\n ko.applyBindings(this.viewModel, this.el);\r\n\r\n return this;\r\n }\r\n\r\n show() {\r\n this.$el.show();\r\n }\r\n\r\n hide() {\r\n this.$el.hide();\r\n }\r\n\r\n remove() {\r\n super.remove();\r\n }\r\n}\r\n","/* eslint-disable import/no-unresolved */\r\n/* eslint-disable import/extensions */\r\nimport Promise from 'bluebird';\r\nimport eventDispatcher from '@bingads-webui-component-legacy/event-dispatcher/index';\r\n\r\nexport const welcomeCardConfig = [\r\n {\r\n // Welcome Tips Card\r\n validFor: ['account'],\r\n typeId: 'CardType-WelcomeTips',\r\n name: 'WelcomeTipsCard',\r\n cssKey: 'tips-and-opportunities',\r\n titleKey: 'Dashboard_Tips_Card_Title',\r\n contentType: 'WelcomeTipsCard',\r\n sizeOption: {\r\n small: {\r\n width: 12,\r\n supportedWidth: [12],\r\n },\r\n medium: {\r\n width: 6,\r\n supportedWidth: [6],\r\n },\r\n },\r\n },\r\n];\r\n\r\nwelcomeCardConfig.getContentConstructor = ({\r\n contentType,\r\n constants,\r\n instrumentation,\r\n}) => new Promise((resolve) => {\r\n const i18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/dashboard-cards');\r\n const deps = {\r\n i18n,\r\n eventDispatcher,\r\n };\r\n\r\n switch (contentType) {\r\n case 'WelcomeTipsCard':\r\n import(/* webpackMode: 'eager' */ '@bingads-webui-campaign-legacy/dashboard-cards/welcome-tips-card/index').then((contentConstructor) => {\r\n resolve({\r\n contentConstructor: contentConstructor.default,\r\n deps,\r\n });\r\n });\r\n break;\r\n default:\r\n resolve();\r\n instrumentation.logMessage(\r\n [constants.LOGCATEGORY.ERROR],\r\n constants.LOGLEVEL.INFO,\r\n 'dashboard/dashboard-view',\r\n `Unknown card content: ${contentType}`\r\n );\r\n }\r\n});\r\n","import Backbone from 'backbone';\r\nimport Promise from 'bluebird';\r\nimport $ from 'jquery';\r\nimport _ from 'underscore';\r\nimport { AccountsMode } from '@bingads-webui-campaign/overview-cards-common';\r\nimport { CampaignType as AccountLevelCampaignType } from '@bingads-webui-campaign/campaign-ui-common';\r\n\r\nimport { dashboardConfig } from '../config/dashboard-config';\r\nimport { welcomeCardConfig } from '../config/welcome-card-config';\r\nimport { getQuickInstrumentation } from '../instrumentation/log-helper';\r\n\r\nconst CampaignLevelCampaignType = _.mapObject(AccountLevelCampaignType, (val, key) => key);\r\n\r\nfunction uri() {\r\n const api = 'Customers(:advertisercustomer_id)/Accounts(:account_id)/Default.AlertInformation';\r\n const odataParam = '$select=HasBIData,HasCampaigns,HasOtherAccounts';\r\n\r\n return `${api}?${odataParam}`;\r\n}\r\n\r\nexport class CardState extends Backbone.Model {\r\n initialize({\r\n navigationLevel,\r\n permissions,\r\n edm,\r\n pageContext,\r\n odata,\r\n preferences,\r\n instrumentationSettings,\r\n instrumentation,\r\n constants,\r\n newCardsConfig = null,\r\n welcomeCardsConfig,\r\n accountsMode = AccountsMode.Expert,\r\n campaignType,\r\n isPrefetch = false,\r\n }) {\r\n this.isPrefetch = isPrefetch;\r\n if (navigationLevel === 'customer') {\r\n // eslint-disable-next-line no-param-reassign\r\n edm.customerIdType.useAdvertiserCustomerId = false;\r\n }\r\n this.set({\r\n name: 'default',\r\n navigationLevel,\r\n });\r\n this.campaignType = campaignType;\r\n this.pageContext = pageContext;\r\n this.odata = odata;\r\n this.newCardsConfig = newCardsConfig;\r\n this.welcomeCardsConfig = welcomeCardsConfig;\r\n this.preferences = preferences;\r\n this.accountsMode = accountsMode;\r\n // Get the ID based on the name and navigation level before anything else.\r\n this.p$Initialized = preferences.initialize().then(() => {\r\n this.fetchDashboardId();\r\n });\r\n\r\n this.cardsConfig = newCardsConfig({\r\n permissions,\r\n edm,\r\n accountsMode,\r\n });\r\n\r\n this.quickInstrumentation = this.isPrefetch ? _.noop :\r\n getQuickInstrumentation({\r\n instrumentationSettings,\r\n instrumentation,\r\n constants,\r\n });\r\n }\r\n\r\n fetchDashboardId() {\r\n const name = this.get('name');\r\n\r\n if (this.accountsMode === AccountsMode.Smart) {\r\n this.set('dashboardId', `${name}-${this.navigationLevel}-smart`);\r\n } else if (this.campaignType === CampaignLevelCampaignType.Hotel || this.campaignType === AccountLevelCampaignType.Hotel) {\r\n this.set('dashboardId', `${name}-${this.navigationLevel}-hotel`);\r\n } else if (this.campaignType === CampaignLevelCampaignType.PerformanceMax || this.campaignType === AccountLevelCampaignType.PerformanceMax) {\r\n this.set('dashboardId', `${name}-${this.navigationLevel}-performancemax`);\r\n } else if (this.campaignType === CampaignLevelCampaignType.App || this.campaignType === AccountLevelCampaignType.App) {\r\n this.set('dashboardId', `${name}-${this.navigationLevel}-app`);\r\n } else {\r\n this.set('dashboardId', `${name}-${this.navigationLevel}`);\r\n }\r\n }\r\n\r\n loadDashboardState() {\r\n // get all dashboard preference\r\n this.prefs = this.getDashBoardPreferences();\r\n if (this.prefs && _.has(this.prefs.Data, this.dashboardId) && _.has(this.prefs.Data[this.dashboardId], 'options')) {\r\n this.set('options', _.extend(_.omit(this.prefs.Data[this.dashboardId].options, ['reOrderedForV2', 'showWelcomeTips', 'reOrderedForABCTest']), this.options));\r\n }\r\n\r\n const userWelcomePref = this.preferences.findByNameAtUserLevel(this.get('userWelcomePrefName'));\r\n const doneWithWelcomeTips = userWelcomePref ? userWelcomePref.Data : false;\r\n const doNotShowWelcomeTips = this.dashboardId !== 'default-account' || doneWithWelcomeTips === true;\r\n const welcomeStatus = new Promise((resolve) => {\r\n if (doNotShowWelcomeTips) {\r\n resolve({ showWelcomeTips: false });\r\n } else if (this.pageContext.WelcomeStatus &&\r\n !this.pageContext.WelcomeStatus.doneInitialLoad) {\r\n resolve({\r\n showWelcomeTips: this.pageContext.WelcomeStatus.ShowWelcomeTips,\r\n createdCampaign: this.pageContext.WelcomeStatus.HasCampaigns,\r\n skippedBothAtAccountCreation: this.options.skippedBothAtAccountCreation,\r\n skippedNoneAtAccountCreation: this.options.skippedNoneAtAccountCreation,\r\n });\r\n this.pageContext.WelcomeStatus.doneInitialLoad = true;\r\n } else {\r\n this.odata.get(uri()).then((data) => {\r\n if (data.HasBIData || data.HasOtherAccounts) {\r\n resolve({ showWelcomeTips: false });\r\n } else {\r\n resolve({\r\n showWelcomeTips: true,\r\n createdCampaign: data.HasCampaigns,\r\n skippedBothAtAccountCreation: this.options.skippedBothAtAccountCreation,\r\n skippedNoneAtAccountCreation: this.options.skippedNoneAtAccountCreation,\r\n });\r\n }\r\n }).catch(() => {\r\n resolve({ showWelcomeTips: false });\r\n });\r\n }\r\n });\r\n\r\n return welcomeStatus.then((status) => {\r\n if (status.showWelcomeTips) {\r\n this.showWelcomeTips = true;\r\n this.loadWelcomeTips();\r\n this.welcomeAttr = _.clone(this.welcomeCardsConfig[0]);\r\n this.welcomeAttr.constructOptions = status;\r\n this.config = dashboardConfig.getWelcomeConfig();\r\n this.config.getContentConstructor = this.welcomeCardsConfig.getContentConstructor;\r\n // for the users we show welcome tips, set overview tab as default.\r\n this.preferences.set({\r\n Name: this.get('OverviewAsDefaultPrefName'),\r\n Data: true,\r\n });\r\n } else {\r\n this.showWelcomeTips = false;\r\n if (!doNotShowWelcomeTips) {\r\n // status changed. We will not show welcome tips for this user anymore.\r\n // option clean up\r\n const newOptions = _.omit(this.options, ['skippedBothAtAccountCreation', 'doneWithWelcomeTips', 'skippedNoneAtAccountCreation']);\r\n\r\n this.set('options', newOptions);\r\n _.defer(() => this.save({ newOptions }));\r\n this.quickInstrumentation('LoadOverviewPage', 'No welcomeTips for this user anymore.');\r\n this.preferences.setAtUserLevel({\r\n Name: this.get('userWelcomePrefName'),\r\n Data: true,\r\n });\r\n }\r\n this.config = dashboardConfig.getDefaultConfig();\r\n this.config.getContentConstructor = this.cardsConfig.getContentConstructor;\r\n this.loadDashBoardCards();\r\n }\r\n });\r\n }\r\n\r\n loadWelcomeTips() {\r\n this.set('cards', _.map(welcomeCardConfig, card => ({\r\n id: card.typeId,\r\n sizeOption: card.sizeOption,\r\n })));\r\n }\r\n\r\n loadDashBoardCards() {\r\n if (this.prefs && _.has(this.prefs.Data, this.dashboardId) && _.has(this.prefs.Data[this.dashboardId], 'cards')) {\r\n const cardGroup = _.groupBy(\r\n this.cardsConfig,\r\n cardConfig => this.getCardCategory(cardConfig)\r\n );\r\n\r\n let availableCards = cardGroup.defaultIn;\r\n let cards;\r\n let savePreference = false;\r\n\r\n if (_.size(cardGroup.defaultOut) !== 0) {\r\n availableCards = availableCards.concat(cardGroup.defaultOut);\r\n }\r\n\r\n // See if we have any retired cards:\r\n // cards that in the user's preference but not available anymore.\r\n const retiredCards = _.difference(_.map(this.prefs.Data[this.dashboardId].cards, card =>\r\n card.id), _.map(availableCards, card =>\r\n card.typeId));\r\n\r\n if (_.size(retiredCards) !== 0) {\r\n this.quickInstrumentation('RemoveRetiredTilesFromOverview');\r\n }\r\n // Filter out retired cards from preference.\r\n this.prefs.Data[this.dashboardId].cards = _.filter(\r\n this.prefs.Data[this.dashboardId].cards,\r\n card => !_.contains(retiredCards, card.id)\r\n );\r\n // Filter out hidden cards.\r\n cards = _.filter(this.prefs.Data[this.dashboardId].cards, card => !card.hidden);\r\n\r\n // Check for cards that are not in users preference -- new cards for the user.\r\n const newDefaultInCards = _.difference(_.map(cardGroup.defaultIn, card =>\r\n card.typeId), _.map(this.prefs.Data[this.dashboardId].cards, card =>\r\n card.id));\r\n\r\n const newDefaultOutCards = _.difference(_.map(cardGroup.defaultOut, card =>\r\n card.typeId), _.map(this.prefs.Data[this.dashboardId].cards, card =>\r\n card.id));\r\n\r\n if (_.size(newDefaultOutCards) !== 0) {\r\n this.set('newDefaultOutCardsAvailable', true);\r\n this.quickInstrumentation('AddNewTilesToOverview', `Adding new default out cards: ${newDefaultOutCards.join(', ')}`);\r\n }\r\n // Add new default-in cards to the collection.\r\n if (_.size(newDefaultInCards) !== 0) {\r\n const newCardConfig = _.chain(cardGroup.defaultIn)\r\n .filter(card => _.indexOf(newDefaultInCards, card.typeId) !== -1)\r\n .map(card => ({\r\n id: card.typeId,\r\n sizeOption: card.sizeOption,\r\n })).value();\r\n\r\n cards = cards.concat(newCardConfig);\r\n this.set('newDefaultInCards', newDefaultInCards);\r\n this.quickInstrumentation('AddNewTilesToOverview', `Adding new default in cards: ${newDefaultInCards.join(', ')}`);\r\n }\r\n\r\n _.each(cards, (card) => {\r\n if (card.sizeOption) {\r\n // If user does not have pref for some size due to new size options. use the one in config\r\n if (_.size(this.config.layoutOptions) !== _.size(card.sizeOption)) {\r\n const cardConfig = _.find(this.cardsConfig, item => item.typeId === card.id);\r\n\r\n _.each(_.keys(cardConfig.sizeOption), (key) => {\r\n if (!card.sizeOption[key]) {\r\n // eslint-disable-next-line no-param-reassign\r\n card.sizeOption[key] = { width: cardConfig.sizeOption[key].width };\r\n savePreference = true;\r\n }\r\n });\r\n }\r\n } else {\r\n // Some old preferences might not contain sizeOptions. Add it if it's missing.\r\n const cardConfig = _.find(this.cardsConfig, item => item.typeId === card.id);\r\n\r\n // eslint-disable-next-line no-param-reassign\r\n card.sizeOption = cardConfig.sizeOption;\r\n savePreference = true;\r\n }\r\n });\r\n\r\n // Update preference if its modified due to new cards or retirement.\r\n savePreference = savePreference ||\r\n _.size(retiredCards) !== 0 ||\r\n _.size(newDefaultInCards) !== 0;\r\n\r\n this.set('cards', cards);\r\n if (savePreference) {\r\n _.defer(() => this.save({\r\n newCards: cards,\r\n newOptions: this.options,\r\n }));\r\n }\r\n } else {\r\n this.quickInstrumentation('FirstUse');\r\n // Add all the default-in cards.\r\n const cardGroup = _.groupBy(\r\n this.cardsConfig,\r\n cardConfig => this.getCardCategory(cardConfig)\r\n );\r\n\r\n const defaultCards = _.map(cardGroup.defaultIn, card => ({\r\n id: card.typeId,\r\n sizeOption: card.sizeOption,\r\n }));\r\n\r\n this.set('cards', defaultCards);\r\n\r\n let newOptions;\r\n\r\n _.defer(() => this.save({\r\n newCards: defaultCards,\r\n newOptions,\r\n }));\r\n }\r\n }\r\n\r\n sync() {\r\n return this.p$Initialized.then(() => this.loadDashboardState());\r\n }\r\n\r\n save({\r\n newCards,\r\n newOptions,\r\n }) {\r\n if (this.isPrefetch || (_.isUndefined(newCards) && _.isUndefined(newOptions))) {\r\n return;\r\n }\r\n\r\n let cards;\r\n\r\n // Do not save card specific prefs for welcome tips.\r\n if (!this.showWelcomeTips) {\r\n if (newCards) {\r\n cards = newCards;\r\n } else {\r\n ({ cards } = this);\r\n }\r\n\r\n if (cards && this.prefs && _.has(this.prefs.Data, this.dashboardId) && _.has(this.prefs.Data[this.dashboardId], 'cards')) {\r\n const hiddenCards = _.difference(\r\n _.map(this.prefs.Data[this.dashboardId].cards, card => card.id),\r\n _.map(cards, card => card.id)\r\n );\r\n\r\n this.set('cards', cards);\r\n if (_.size(hiddenCards) !== 0) {\r\n cards = cards.concat(_.map(hiddenCards, card => ({ id: card, hidden: true })));\r\n }\r\n }\r\n }\r\n\r\n const options = _.extend({}, this.options, newOptions);\r\n\r\n if (!_.isUndefined(options)) {\r\n this.set('options', options);\r\n }\r\n\r\n let data = {};\r\n\r\n if (this.prefs) {\r\n data = _.extend(data, this.prefs.Data);\r\n }\r\n\r\n data = _.extend(data, {\r\n [this.dashboardId]: {\r\n cards,\r\n options,\r\n },\r\n });\r\n\r\n const preference = {\r\n Data: data,\r\n };\r\n\r\n this.setDashBoardPreferences(preference);\r\n\r\n if (this.prefs) {\r\n this.prefs.Data = data;\r\n } else {\r\n this.prefs = preference;\r\n }\r\n }\r\n\r\n getCardAttrByTypeId(id) {\r\n let card;\r\n\r\n if (this.showWelcomeTips) {\r\n card = this.welcomeAttr;\r\n } else {\r\n card = _.find(this.cardsConfig, conf => conf.typeId === id &&\r\n this.cardsConfig.isValidForNavigationLevel(conf, this.navigationLevel, this.campaignType));\r\n }\r\n\r\n if (_.isUndefined(card)) {\r\n return null;\r\n }\r\n const attribute = {};\r\n\r\n // create a deep copy before return\r\n $.extend(true, attribute, _.pick(\r\n card,\r\n ['titleKey', 'addCardTitleKey', 'name', 'contentType', 'constructOptions', 'sizeOption', 'preDefinedMenuItems', 'useNewI18n']\r\n ));\r\n\r\n // If we have size options stored in preference, over write with preference.\r\n const cardPref = _.find(this.cards, item => item.id === id);\r\n\r\n if (cardPref && cardPref.sizeOption) {\r\n _.each(cardPref.sizeOption, (value, key) => {\r\n if (attribute.sizeOption[key]) {\r\n attribute.sizeOption[key].width = value.width;\r\n }\r\n });\r\n }\r\n\r\n return attribute;\r\n }\r\n\r\n getCardCategory(cardConfig) {\r\n if (!this.cardsConfig.isValidForNavigationLevel(\r\n cardConfig,\r\n this.navigationLevel,\r\n this.campaignType\r\n )) {\r\n return 'notEnabledOrValidForNavigationLevel';\r\n } else if (cardConfig.defaultIn) {\r\n return 'defaultIn';\r\n }\r\n return 'defaultOut';\r\n }\r\n\r\n getDashBoardPreferences() {\r\n if (this.navigationLevel === 'customer') {\r\n return this.preferences.findByNameAtUserLevel(this.get('accountsDashboardPrefName'));\r\n }\r\n\r\n return this.preferences.findByNameAtAccountLevel(this.get('dashboardPrefName'));\r\n }\r\n\r\n setDashBoardPreferences(preference) {\r\n if (this.navigationLevel === 'customer') {\r\n this.preferences.setAtUserLevel(_.extend({}, preference, { Name: this.get('accountsDashboardPrefName') }));\r\n } else {\r\n this.preferences.setAtAccountLevel(_.extend({}, preference, { Name: this.get('dashboardPrefName') }));\r\n }\r\n }\r\n\r\n // Getters for the caller's convenience\r\n get cards() {\r\n return this.get('cards');\r\n }\r\n\r\n get options() {\r\n return this.get('options');\r\n }\r\n\r\n get dashboardId() {\r\n return this.get('dashboardId');\r\n }\r\n\r\n get navigationLevel() {\r\n return this.get('navigationLevel');\r\n }\r\n\r\n get newDefaultOutCardsAvailable() {\r\n return this.get('newDefaultOutCardsAvailable');\r\n }\r\n\r\n get newDefaultInCards() {\r\n return this.get('newDefaultInCards');\r\n }\r\n\r\n get defaults() {\r\n return {\r\n dashboardPrefName: 'dashboard/preferences',\r\n accountsDashboardPrefName: 'accountsDashboard/preferences',\r\n userWelcomePrefName: 'doneWithWelcomeTips',\r\n OverviewAsDefaultPrefName: 'OverviewAsDefaultTab',\r\n name: '',\r\n navigationLevel: 'account',\r\n dashboardId: 0,\r\n cards: [],\r\n options: {},\r\n newDefaultOutCardsAvailable: false,\r\n };\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport Promise from 'bluebird';\r\nimport _ from 'underscore';\r\nimport { dateRangeEquals } from '@bingads-webui-universal/primitive-utilities';\r\n\r\n// A wrapper to 'component/state/index'\r\nexport class DateFilterState {\r\n constructor({\r\n simpleFormat = false,\r\n state,\r\n // Note: configure which date picker to connect to, for now\r\n // all the campaign ui features use the global one.\r\n } = {}) {\r\n this.state = state;\r\n _.extend(this, Backbone.Events);\r\n this.previousRange = null;\r\n\r\n this.simpleFormat = simpleFormat;\r\n\r\n if (window.App && window.App.views && window.App.views.Summary) {\r\n window.App.views.Summary.bindDateFilterChangeHandler((e, filter) => {\r\n let dateRange;\r\n\r\n if (this.simpleFormat === true) {\r\n dateRange = _.pick(filter, 'start', 'end', 'grain');\r\n } else {\r\n dateRange = filter;\r\n }\r\n\r\n if (!dateRangeEquals(_.omit(this.previousRange, 'key'), _.omit(dateRange, 'key'))) {\r\n // Raise event and send data out.\r\n this.trigger('changed', { dateRange });\r\n this.previousRange = dateRange;\r\n }\r\n });\r\n }\r\n }\r\n\r\n get p$State() {\r\n return this.state.getPromise('$daterange').then((dateRange) => {\r\n if (!this.previousRange) {\r\n this.previousRange = dateRange;\r\n }\r\n if (this.simpleFormat === true) {\r\n const newRange = _.pick(dateRange, 'start', 'end', 'grain');\r\n\r\n return Promise.resolve(newRange);\r\n }\r\n return Promise.resolve(dateRange);\r\n });\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\nconst leftOffsetUINext = 392;\r\nconst leftOffsetMccUINext = 164;\r\nconst dashboardTopUINext = 205;\r\nconst cardMargin = 16;\r\nconst subPageMarginsForUINext = 30;\r\n\r\nexport const newUIWidthPaddingsAndOffSet = 35;\r\n\r\nexport function getViewportCardCount({\r\n config,\r\n cards,\r\n constants,\r\n instrumentation,\r\n isMccLevel,\r\n}) {\r\n // Only one tile available for welcome tips\r\n if (config.defaultName === 'welcome') {\r\n return 1;\r\n }\r\n\r\n const topOffset = dashboardTopUINext;\r\n const leftOffset = isMccLevel ? leftOffsetMccUINext : leftOffsetUINext;\r\n const bottomOffset = 0;\r\n const subPageMargins = subPageMarginsForUINext;\r\n\r\n const availableWidth = window.innerWidth - leftOffset - subPageMargins -\r\n newUIWidthPaddingsAndOffSet;\r\n\r\n // From the error logs we have rare cases where users window.innerWidth returns 0.\r\n // In that case, only preload one tile.\r\n if (availableWidth <= 0) {\r\n return 1;\r\n }\r\n\r\n const layoutOption = _.chain(config.layoutOptions)\r\n .filter(option => option.breakpoint < availableWidth)\r\n .max(option => option.breakpoint)\r\n .value();\r\n const optionKey = _.findKey(config.layoutOptions, option => _.isEqual(option, layoutOption));\r\n const initialRowCount = Math.round((window.innerHeight - topOffset - bottomOffset) /\r\n (layoutOption.defaultHeight + cardMargin));\r\n const rowSize = layoutOption.maxCardSize;\r\n let remainingRowCount = initialRowCount;\r\n let currentRowRemainingSpace = rowSize;\r\n\r\n if (remainingRowCount === 0) {\r\n return 0;\r\n }\r\n\r\n // We have cards with different sizes.\r\n // count how many we can fit in based on space and card size.\r\n try {\r\n for (let index = 0; index < cards.length; index += 1) {\r\n const cardSize = cards[index].sizeOption[optionKey].width;\r\n\r\n if (currentRowRemainingSpace < cardSize) {\r\n remainingRowCount -= 1;\r\n if (remainingRowCount === 0) {\r\n return index;\r\n }\r\n currentRowRemainingSpace = rowSize - cardSize;\r\n } else {\r\n currentRowRemainingSpace -= cardSize;\r\n }\r\n }\r\n } catch (ex) {\r\n const state = {\r\n leftOffset,\r\n innerWidth: window.innerWidth,\r\n initialRowCount,\r\n remainingRowCount,\r\n layoutOptions: config.layoutOptions,\r\n layoutOption,\r\n optionKey,\r\n cards,\r\n };\r\n\r\n instrumentation.logMessage([constants.LOGCATEGORY.ERROR], constants.LOGLEVEL.INFO, 'dashboard/util', `${ex.stack}, ${JSON.stringify(state)}`);\r\n return cards.length;\r\n }\r\n\r\n return cards.length;\r\n}\r\n","export const i18nMappings = [{\r\n CardHolder_Toolbar_Close: _TL_('Hide tile'),\r\n CardHolder_Toolbar_Add: _TL_('Add or remove overview tiles'),\r\n CardHolder_Toolbar_Refresh: _TL_('Refresh'),\r\n CardHolder_Toolbar_Hide: _TL_('Hide tile'),\r\n CardHolder_Toolbar_Help: _TL_('Help'),\r\n CardHolder_Toolbar_Enlarge: _TL_('Enlarge'),\r\n CardHolder_Toolbar_Shrink: _TL_('Shrink'),\r\n CardHolder_Toolbar_SmallSize: _TL_('Tile size: small'),\r\n CardHolder_Toolbar_MediumSize: _TL_('Tile size: medium'),\r\n CardHolder_Toolbar_LargeSize: _TL_('Tile size: large'),\r\n CardHolder_Toolbar_Toggle: _TL_('Toggle'),\r\n Loading: _TL_('Loading...'),\r\n 'More options for {{item}}': _TL_('More options for {{item}}'),\r\n}];\r\n","import Backbone from 'backbone';\r\nimport Promise from 'bluebird';\r\nimport $ from 'jquery';\r\nimport _ from 'underscore';\r\nimport { CardPanel } from '@bingads-webui/card-panel';\r\nimport { PageReady } from '@bingads-webui/page-ready';\r\nimport { ToolbarView } from '@bingads-webui/toolbar';\r\nimport { fetchMCCOverview } from '@bingads-webui-campaign/overview-cards-common';\r\nimport { dismissPopupIfExist } from '@bingads-webui-campaign/fluctuation-common';\r\nimport edm from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport constants from '@bingads-webui-static-legacy/instrumentation/constants';\r\nimport instrumentation from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nimport odata from '@bingads-webui-component-legacy/http/channel/odata';\r\nimport preference from '@bingads-webui-component-legacy/preference/service/index';\r\nimport { appendLearnMoreLink } from '@bingads-webui-component-legacy/help/index';\r\nimport state from '@bingads-webui-component-legacy/state/index';\r\nimport wunderbarState from '@bingads-webui-static-legacy/wunderbar/controls/wunderbar-state';\r\nimport instrumentationSettings from '@bingads-webui-static-legacy/instrumentation/campaignSchemaAndSetting';\r\nimport jsdata from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport dateUtil from '@bingads-webui-component-legacy/humanize/date';\r\nimport legacyRouter from '@bingads-webui-component-legacy/legacy-router/index';\r\nimport logger from '@bingads-webui-campaign-legacy/instrumentation/index';\r\nimport azureUrlRewrite from '@bingads-webui-static-legacy/app/component/azureUrlRewrite';\r\nimport cacheManager from '@bingads-webui-campaign-legacy/cache-manager/index';\r\nimport eventDispatcher from '@bingads-webui-component-legacy/event-dispatcher/index';\r\nimport { buildLegacyI18n } from '@bingads-webui/build-legacy-i18n';\r\n\r\nimport { getQuickInstrumentation } from '../instrumentation/log-helper';\r\nimport { CardState } from './card-state';\r\nimport template from './dashboard-template.pug';\r\nimport { DateFilterState } from './datefilter-state';\r\nimport footerTemplate from './footer-template.pug';\r\nimport newFeatureTemplate from './new-feature-template.pug';\r\nimport newTileBannerTemplate from './new-tile-banner-template.pug';\r\nimport tooManyAccountTemplate from './too-many-accounts-warning.pug';\r\nimport { getViewportCardCount, newUIWidthPaddingsAndOffSet } from './util';\r\nimport { i18nMappings } from './i18nMappings';\r\n\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/dashboard-page');\r\nconst i18nGlobal = window.globalLegacyI18n.get('component/i18n/loader!legacy/global');\r\nconst preferences = preference;\r\nconst localInstrumentation = logger;\r\n\r\nconst permissions = config.get('Permissions') || {};\r\nconst quickInstrumentation = getQuickInstrumentation({\r\n instrumentationSettings,\r\n instrumentation,\r\n constants,\r\n});\r\n\r\n/* @this Dashboard */\r\nfunction saveSelectedCardsState() {\r\n const orders = _.map(this.cardPanel.cardsOrder, (id) => {\r\n const option = { id: this.cardMaps[id].typeId };\r\n\r\n if (this.cardMaps[id].sizeOption) {\r\n _.extend(option, { sizeOption: this.cardMaps[id].sizeOption });\r\n }\r\n\r\n if (this.cardMaps[id].options) {\r\n _.extend(option, { options: this.cardMaps[id].options });\r\n }\r\n return option;\r\n });\r\n\r\n this.cardState.save({\r\n newCards: orders,\r\n });\r\n}\r\n\r\n/* @this Dashboard */\r\nfunction contentReady(id) {\r\n if (!_.isEmpty(this.remainingViewportCards)) {\r\n this.remainingViewportCards = _.reject(this.remainingViewportCards, card => card === id);\r\n\r\n if (_.isEmpty(this.remainingViewportCards)) {\r\n this.perfMarker.done({ ViewportCardCount: this.viewportCardsCount });\r\n PageReady.pageIsReady(this.pageName);\r\n }\r\n }\r\n}\r\n\r\n/* @this Dashboard */\r\nfunction createCardContentInstance(contentConstructor, attributes) {\r\n let content;\r\n const { name, constructOptions } = attributes;\r\n const otherOptions = _.extend(_.omit(attributes, 'constructOptions', 'name'), {\r\n preexecuteFlag: this.preexecuteFlag,\r\n accountsMode: this.accountsMode,\r\n });\r\n\r\n if (_.isFunction(constructOptions)) {\r\n const cardCreationOptions = constructOptions.call(this, {\r\n navigationLevel: this.navigationLevel,\r\n campaignType: this.campaignType,\r\n });\r\n\r\n // eslint-disable-next-line new-cap\r\n content = new contentConstructor(_.extend(\r\n otherOptions,\r\n { name: `${this.navigationLevel}-${name}`, perfMarker: this.perfMarker }, cardCreationOptions.constructOptions\r\n ));\r\n } else {\r\n // eslint-disable-next-line new-cap\r\n content = new contentConstructor(_.extend(otherOptions, { name: `${this.navigationLevel}-${name}`, perfMarker: this.perfMarker }, constructOptions))\r\n .setState();\r\n }\r\n\r\n content.on('storeCardPreference', (cardOptions = {}) => {\r\n const currentCard = _.find(this.cardMaps, card => card.content === content);\r\n\r\n if (currentCard) {\r\n currentCard.options = cardOptions;\r\n _.defer(saveSelectedCardsState.bind(this));\r\n }\r\n });\r\n\r\n content.on('saveDashBoardOptions', (newOptions) => {\r\n _.defer(() => {\r\n this.cardState.save({ newOptions });\r\n });\r\n });\r\n\r\n content.on('clearDragAndDrop', () => this.cardPanel.clearDragAndDrop());\r\n content.on('setupDragAndDrop', () => this.cardPanel.setupDragAndDrop());\r\n content.on('cardReady', id => contentReady.call(this, id));\r\n\r\n return content;\r\n}\r\n\r\n/* @this Dashboard */\r\nfunction scrollToAddCardView() {\r\n _.defer(() => {\r\n if (this.addCardView &&\r\n this.addCardView.$el &&\r\n this.addCardView.$el[0].getBoundingClientRect().y < 0) {\r\n this.$el.closest('html').animate({ scrollTop: 0 });\r\n }\r\n });\r\n}\r\n\r\n/* @this Dashboard */\r\nfunction showAddCardView({ fromTile = false }) {\r\n eventDispatcher.trigger('overview_loaded');\r\n\r\n if (this.addCardView) {\r\n if (fromTile) {\r\n scrollToAddCardView.call(this);\r\n }\r\n } else {\r\n import(/* webpackMode: 'eager' */'@bingads-webui-campaign-react/panel-decorator').then(({ panelDecorator }) => {\r\n import(/* webpackMode: 'eager' */'./add-card/index').then(({ AddCardView }) => {\r\n const AddCardPanel = panelDecorator(AddCardView, {\r\n width: 940,\r\n panelClassName: 'overview-add-card-panel',\r\n i18n,\r\n panelReadyAriaLabel: i18n.getString('Dashboard add card side panel opened'),\r\n });\r\n const closeAddCardPanel = () => {\r\n this.addCardView.remove();\r\n this.addCardView = null;\r\n };\r\n\r\n this.addCardView = new AddCardPanel({\r\n title: i18n.getString('Dashboard_AddCard'),\r\n selectedCards: _.pluck(this.cardMaps, 'typeId'),\r\n accountsMode: this.accountsMode,\r\n newCardsConfig: this.getCardsConfig,\r\n navigationLevel: this.navigationLevel,\r\n campaignType: this.campaignType,\r\n eventsToActions: [{\r\n event: 'cancel',\r\n action: closeAddCardPanel,\r\n }, {\r\n event: 'apply',\r\n action: ({\r\n idsToAdd,\r\n idsToDelete,\r\n }) => {\r\n this.addCardView.remove();\r\n this.addCardView = null;\r\n\r\n this.addCard(idsToAdd);\r\n this.deleteCard(idsToDelete);\r\n\r\n if (!_.isEmpty(idsToAdd)) {\r\n quickInstrumentation('AddTileToOverviewFromPanel');\r\n }\r\n },\r\n }],\r\n onClose: closeAddCardPanel,\r\n newI18n: this.newI18n,\r\n });\r\n\r\n this.addCardView.render();\r\n });\r\n });\r\n }\r\n}\r\n\r\n/* @this Dashboard */\r\nfunction setUpAgents() {\r\n // Setup date filter service\r\n if (this.dateFilterState) {\r\n this.dateFilter = this.dateFilterState;\r\n } else {\r\n this.dateFilter = new DateFilterState({ state });\r\n }\r\n\r\n this.dateFilter.on('changed', this.onDateFilterStateChanged, this);\r\n\r\n if (this.filterAgent) {\r\n this.filterAgent.on('changed', this.onFilterStateChanged, this);\r\n }\r\n}\r\n\r\n/* @this Dashboard */\r\nfunction updateCardContent({\r\n card,\r\n isInViewPort,\r\n fetchSingleTile = false,\r\n currentCampaign,\r\n onMounted = null,\r\n}) {\r\n const {\r\n name,\r\n contentType,\r\n constructOptions,\r\n } = this.cardState.getCardAttrByTypeId(card.id);\r\n\r\n this.config.getContentConstructor({\r\n contentType,\r\n constants,\r\n instrumentation,\r\n state,\r\n config,\r\n pageContext,\r\n onMounted,\r\n edmCampaign: edm,\r\n }).then(({ contentConstructor, deps }) => {\r\n if (!contentConstructor || this.removed) {\r\n return;\r\n }\r\n\r\n const cardId = _.findKey(this.cardMaps, item => item.typeId === card.id);\r\n const content = createCardContentInstance.call(this, contentConstructor, _.extend({\r\n name,\r\n constructOptions,\r\n fetchSingleTile,\r\n typeId: card.id,\r\n isInViewPort,\r\n container: this.cardPanel.cards[cardId].getContentContainer(),\r\n deps: {\r\n ...deps,\r\n azure: azureUrlRewrite,\r\n localInstrumentation,\r\n cacheManager,\r\n },\r\n sharedOptions: {\r\n getCardsConfig: () => this.cardState.cards,\r\n },\r\n currentCampaign,\r\n scope: this.scope,\r\n newI18n: this.newI18n,\r\n preferenceService: this.preferenceService,\r\n }, this.savedStates, card.options));\r\n\r\n this.cardMaps[cardId].content = content;\r\n this.cardPanel.updateContent(cardId, content);\r\n });\r\n}\r\n\r\nexport class Dashboard extends Backbone.View {\r\n initialize({\r\n perfMarker,\r\n dateFilterState,\r\n filterAgent,\r\n currentCampaign,\r\n newCardsConfig,\r\n welcomeCardsConfig,\r\n pageName,\r\n onMounted,\r\n scope,\r\n accountsMode,\r\n newI18n,\r\n preexecuteFlag = false,\r\n preferenceService,\r\n }) {\r\n this.preferenceService = preferenceService;\r\n this.currentCampaign = currentCampaign;\r\n this.perfMarker = perfMarker;\r\n if (state.get('campaign_id')) {\r\n this.navigationLevel = 'campaign';\r\n } else if (state.get('account_id')) {\r\n this.navigationLevel = 'account';\r\n } else {\r\n this.navigationLevel = 'customer';\r\n }\r\n this.dateFilterState = dateFilterState;\r\n this.filterAgent = filterAgent;\r\n this.pageName = pageName;\r\n this.onMounted = onMounted;\r\n this.scope = scope;\r\n this.newI18n = newI18n;\r\n this.legacyI18n = buildLegacyI18n(this.newI18n, i18nMappings);\r\n this.accountsMode = accountsMode;\r\n this.getCardsConfig = newCardsConfig;\r\n\r\n // Setup card state manager\r\n this.cardState = new CardState({\r\n navigationLevel: this.navigationLevel,\r\n pageContext,\r\n odata,\r\n edm,\r\n preferences,\r\n permissions,\r\n instrumentationSettings,\r\n instrumentation,\r\n constants,\r\n newCardsConfig,\r\n welcomeCardsConfig,\r\n accountsMode,\r\n campaignType: this.campaignType,\r\n });\r\n\r\n // Initial load of the card state (from preference)\r\n this.p$CardState = this.cardState.fetch().then(() => {\r\n // Remember the dashboard ID assigned by CardState\r\n this.dashboardId = this.cardState.get('dashboardId');\r\n });\r\n\r\n // Use this array as a state queue\r\n this.state = [];\r\n this.savedStates = {};\r\n this.dispatched = false;\r\n\r\n this.preexecuteFlag = preexecuteFlag;\r\n }\r\n\r\n get campaignType() {\r\n let campaignType = this.filterAgent && this.filterAgent.campaignType;\r\n if (this.currentCampaign) {\r\n campaignType = _.chain(this.currentCampaign).result('CampaignType').value();\r\n }\r\n return campaignType;\r\n }\r\n\r\n get className() {\r\n return 'dashboard';\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click .dashboard__new-tile-banner a.show-new-tile': this.showNewTile,\r\n 'click .dashboard__new-tile-banner .msg-dismiss-button': this.hideNewTileBannerClicked,\r\n 'click .mcc_too_many-accounts a': this.gotoManagementTab,\r\n };\r\n }\r\n\r\n onDateFilterStateChanged({ dateRange }) {\r\n // Dispatch the new dateRange state to children cards.\r\n this.state.push({ dateRange });\r\n this.dispatchStateAsync();\r\n }\r\n\r\n onFilterStateChanged({ filter, campaignType }) {\r\n this.state.push({ filter, campaignType });\r\n this.dispatchStateAsync();\r\n }\r\n\r\n saveInitialState(initialState) {\r\n this.savedStates = initialState;\r\n }\r\n\r\n dispatchStateAsync() {\r\n // Only async dispatch one time until the sync dispatchment finishes\r\n if (!this.dispatched) {\r\n _.defer(() => {\r\n this.dispatchState();\r\n this.dispatched = false;\r\n });\r\n this.dispatched = true;\r\n }\r\n }\r\n\r\n dispatchState() {\r\n if (this.state.length === 0) {\r\n return;\r\n }\r\n\r\n // Merge the state queue\r\n const states = _.reduce(\r\n this.state,\r\n (memo, item) => _.extend(memo, item)\r\n );\r\n\r\n // dispatch all states to cards\r\n _.each(this.cardMaps, (card) => {\r\n if (card.content) {\r\n card.content.updateState(states);\r\n }\r\n });\r\n\r\n // Save all the states for being used as initial states while adding new cards.\r\n this.savedStates = _.extend(this.savedStates, states);\r\n\r\n // Also add a log\r\n quickInstrumentation(\r\n 'OverviewPageLoadData',\r\n `WithFilter: ${!_.isEmpty(this.savedStates.filter) && !_.isEmpty(this.savedStates.filter.query)}; WithPoP: ${!_.isEmpty(this.savedStates.dateRange) && !_.isEmpty(this.savedStates.dateRange.compared)}`\r\n );\r\n\r\n // Clear the queue\r\n this.state.length = 0;\r\n }\r\n\r\n setupToolbar() {\r\n if (this.config.toolbar) {\r\n // Toolbar could be dynamically created and removed based on current context\r\n if (this.toolbar) {\r\n this.toolbar.remove();\r\n }\r\n\r\n const toolbarItems = _.map(this.config.toolbar.items, item => _.extend(item, {\r\n text: i18n.getString(item.textKey),\r\n }));\r\n\r\n this.toolbar = new ToolbarView({\r\n toolbarId: _.uniqueId('dashboard-toolbar-'),\r\n items: toolbarItems,\r\n }).render();\r\n\r\n // Setup the 'add card' button\r\n this.toolbar.update({\r\n id: this.config.toolbar.ids.addCardButton,\r\n onClick: showAddCardView.bind(this),\r\n iconLeft: ['glyphicon', 'toolbar-icon', 'toolbar-icon-left', 'glyphicon-plus'],\r\n });\r\n\r\n this.$('.dashboard__toolbar').append(this.toolbar.el);\r\n }\r\n }\r\n\r\n setupCardPanel() {\r\n // CardState is already ready.\r\n this.cardAttrsArray = _.map(this.cardState.cards, (card) => {\r\n const {\r\n titleKey,\r\n sizeOption,\r\n preDefinedMenuItems,\r\n useNewI18n,\r\n } = this.cardState.getCardAttrByTypeId(card.id);\r\n let title = '';\r\n if (titleKey) {\r\n title = useNewI18n ? this.newI18n.getString(titleKey) : i18n.getString(titleKey);\r\n }\r\n return {\r\n typeId: card.id,\r\n title,\r\n sizeOption,\r\n options: card.options,\r\n preDefinedMenuItems,\r\n };\r\n });\r\n this.cardPanel = new CardPanel({\r\n config: _.defaults({\r\n dragAndDrop: this.config.defaultDragAndDrop,\r\n debug: this.config.defaultDebug,\r\n dragHandlerSelector: this.config.defaultDragHandlerSelector,\r\n }),\r\n i18n: this.legacyI18n,\r\n layoutOptions: this.config.layoutOptions,\r\n initialWidth: $('.overview-page').innerWidth() - newUIWidthPaddingsAndOffSet,\r\n }).render();\r\n\r\n // Add initial cards to the panel\r\n const orders = this.cardPanel.add(_.map(this.cardAttrsArray, attr => _.chain(attr).pick(['title', 'content', 'sizeOption']).extend({ showMenuIcon: _.size(attr.preDefinedMenuItems) > 0 }).value()), { silent: true });\r\n\r\n // Save the initial order information\r\n this.cardMaps = {};\r\n _.map(orders, (id, index) => {\r\n this.cardMaps[id] = this.cardAttrsArray[index];\r\n }, this);\r\n\r\n // Check how many cards fits in the viewport\r\n this.viewportCardsCount = getViewportCardCount({\r\n config: this.config,\r\n cards: this.cardState.cards,\r\n wunderbarState,\r\n instrumentation,\r\n constants,\r\n isMccLevel: false,\r\n });\r\n this.remainingViewportCards = _.chain(this.cardState.cards)\r\n .first(this.viewportCardsCount)\r\n .pluck('id')\r\n .value();\r\n\r\n if (_.isEmpty(this.remainingViewportCards)) {\r\n this.perfMarker.done({ ViewportCardCount: this.viewportCardsCount });\r\n PageReady.pageIsReady(this.pageName);\r\n }\r\n\r\n if (this.config.defaultName !== 'welcome') {\r\n this.setupFooter();\r\n }\r\n\r\n // Hook the card-panel events\r\n this.cardPanel.on('card-orderchanged', () => {\r\n const originalOrder = _.pluck(this.cardState.cards, 'id');\r\n const newOrder = _.map(this.cardPanel.cardsOrder, id => this.cardMaps[id].typeId);\r\n\r\n quickInstrumentation('ReorderTile', `Original order: ${originalOrder.join(', ')}. New order: ${newOrder.join(', ')}.`);\r\n _.defer(saveSelectedCardsState.bind(this));\r\n this.hideNewTileBanner();\r\n });\r\n\r\n this.cardPanel.on('add-requested', () => {\r\n showAddCardView.call(this, { fromTile: true });\r\n }, this);\r\n\r\n this.cardPanel.on('card-added', (e) => {\r\n const typeIds = _.map(\r\n e.ids,\r\n id => (_.has(this.cardMaps, id) ? this.cardMaps[id].typeId : null)\r\n );\r\n\r\n quickInstrumentation('AddTileToOverview', _.compact(typeIds));\r\n\r\n // Note: do nothing here, adding card is only triggered from dashboard, no need to\r\n // update cardMaps. Save the new card order to preference.\r\n _.defer(saveSelectedCardsState.bind(this));\r\n\r\n this.hideNewTileBanner();\r\n }, this);\r\n\r\n this.cardPanel.on('card-resized', (e) => {\r\n quickInstrumentation('ResizeTile');\r\n\r\n // Card size option should be saved as user preference\r\n if (_.has(this.cardMaps, e.id)) {\r\n this.cardMaps[e.id].sizeOption = this.cardMaps[e.id].sizeOption || {};\r\n this.cardMaps[e.id].sizeOption[e.key] = this.cardMaps[e.id].sizeOption[e.key] || {};\r\n this.cardMaps[e.id].sizeOption[e.key].width = e.width;\r\n\r\n _.defer(saveSelectedCardsState.bind(this));\r\n }\r\n }, this);\r\n\r\n this.cardPanel.on('card-deleted', (e) => {\r\n const typeIds = _.map(e.ids, (id) => {\r\n let typeId = _.has(this.cardMaps, id) ? this.cardMaps[id].typeId : null;\r\n\r\n if (typeId === 'CardType-Tips') {\r\n if (this.navigationLevel === 'account') {\r\n typeId = 'CardType-Tips-And-Recommendations';\r\n } else {\r\n typeId = 'CardType-Recommendations';\r\n }\r\n }\r\n\r\n return typeId;\r\n });\r\n\r\n quickInstrumentation('RemoveTileFromOverview', _.compact(typeIds));\r\n // Card deletion could be triggered from card holder toolbar.\r\n // Remove the entry from local cardMaps first\r\n\r\n _.each(e.ids, (id) => {\r\n if (_.has(this.cardMaps, id)) {\r\n delete this.cardMaps[id];\r\n }\r\n }, this);\r\n\r\n // Save the new card order\r\n _.defer(saveSelectedCardsState.bind(this));\r\n this.hideNewTileBanner();\r\n }, this);\r\n\r\n this.$('.dashboard__card-panel').append(this.cardPanel.$el);\r\n _.defer(() => {\r\n this.cardPanel.trigger('attached');\r\n });\r\n\r\n // Load cards in the viewport.\r\n _.each(_.first(this.cardState.cards, this.viewportCardsCount), (card) => {\r\n updateCardContent.call(this, {\r\n card,\r\n onMounted: this.onMounted,\r\n isInViewPort: true,\r\n currentCampaign: this.currentCampaign,\r\n });\r\n });\r\n\r\n // Function to load cards outside the initial viewport\r\n const loadCardsOutSizeViewPort = _.once(() => {\r\n if (this.removed) {\r\n return;\r\n }\r\n\r\n _.each(\r\n _.last(this.cardState.cards, this.cardState.cards.length - this.viewportCardsCount),\r\n (card) => {\r\n updateCardContent.call(this, {\r\n card,\r\n isInViewPort: false,\r\n currentCampaign: this.currentCampaign,\r\n });\r\n }\r\n );\r\n });\r\n\r\n const dismissOverviewFluctuationPopup = () => dismissPopupIfExist(document.getElementsByClassName('mcc-perf-fluctuation-placeholder'));\r\n PageReady.afterPageReady().then(() => {\r\n if (!this.removed) {\r\n loadCardsOutSizeViewPort.call(this);\r\n _.each(_.keys(this.cardMaps), (key) => {\r\n this.cardPanel.updatePreDefinedMenuItems(key, this.cardMaps[key].preDefinedMenuItems);\r\n });\r\n\r\n const windowScrollLayout = document.querySelector('.app-content-body');\r\n const topChangeCardScrollLayout = document.querySelector('.top-change-grid-container');\r\n\r\n if (windowScrollLayout) {\r\n windowScrollLayout.parentNode.addEventListener('scroll', dismissOverviewFluctuationPopup);\r\n }\r\n\r\n if (topChangeCardScrollLayout) {\r\n topChangeCardScrollLayout.addEventListener('scroll', dismissOverviewFluctuationPopup);\r\n }\r\n }\r\n });\r\n\r\n this.windowEventHandler = () => {\r\n loadCardsOutSizeViewPort.bind(this)();\r\n dismissOverviewFluctuationPopup();\r\n };\r\n window.addEventListener('scroll', this.windowEventHandler);\r\n window.addEventListener('resize', this.windowEventHandler);\r\n $('.overview-page').parent().on('scroll', loadCardsOutSizeViewPort.bind(this));\r\n }\r\n\r\n addCard(typeIds) {\r\n if (!_.isArray(typeIds) || typeIds.length === 0) {\r\n return;\r\n }\r\n\r\n const cardAttrs = _.map(typeIds, (typeId) => {\r\n const {\r\n titleKey,\r\n sizeOption,\r\n preDefinedMenuItems,\r\n } = this.cardState.getCardAttrByTypeId(typeId);\r\n\r\n return {\r\n title: titleKey ? i18n.getString(titleKey) : '',\r\n sizeOption,\r\n preDefinedMenuItems,\r\n };\r\n });\r\n\r\n const cardIds = this.cardPanel.add(cardAttrs);\r\n\r\n _.each(cardIds, (cardId, index) => {\r\n // Keep the card attrs in the map.\r\n this.cardMaps[cardId] = _.extend({}, {\r\n typeId: typeIds[index],\r\n title: cardAttrs[index].title,\r\n sizeOption: cardAttrs[index].sizeOption,\r\n preDefinedMenuItems: cardAttrs[index].preDefinedMenuItems,\r\n });\r\n });\r\n\r\n _.each(typeIds, (typeId) => {\r\n updateCardContent.call(this, {\r\n card: { id: typeId },\r\n isInViewPort: false,\r\n fetchSingleTile: true,\r\n currentCampaign: this.currentCampaign,\r\n });\r\n });\r\n }\r\n\r\n deleteCard(typeIds) {\r\n if (!_.isArray(typeIds) || typeIds.length === 0) {\r\n return;\r\n }\r\n\r\n const cardIds = _.map(\r\n typeIds,\r\n typeId => _.findKey(this.cardMaps, item => item.typeId === typeId)\r\n );\r\n\r\n // card panel will remove the card content view and raise 'card-deleted' event back when done\r\n this.cardPanel.delete(cardIds);\r\n PageReady.pageIsReady(this.pageName);\r\n }\r\n\r\n setupNewTileNotice() {\r\n if (this.cardState.newDefaultOutCardsAvailable) {\r\n this.$(`#${this.config.toolbar.ids.addCardButton}`).append(newFeatureTemplate({ i18n }));\r\n quickInstrumentation('AddNewTilesToOverview', 'New! icon shown in Add Tiles button for new default out cards');\r\n }\r\n if (this.cardState.newDefaultInCards) {\r\n let newTileDesc;\r\n\r\n if (this.cardState.newDefaultInCards.length > 2) {\r\n newTileDesc = i18n.getString('Dashboard_NewTiles', this.cardState.newDefaultInCards.length);\r\n } else if (this.cardState.newDefaultInCards.length === 2) {\r\n const { addCardTitleKey: title1Key } =\r\n this.cardState.getCardAttrByTypeId(this.cardState.newDefaultInCards[0]);\r\n const { addCardTitleKey: title2Key } =\r\n this.cardState.getCardAttrByTypeId(this.cardState.newDefaultInCards[1]);\r\n\r\n newTileDesc = i18n.getString('Dashboard_Two_Tiles', i18n.getString(title1Key), i18n.getString(title2Key));\r\n } else if (this.cardState.newDefaultInCards.length === 1) {\r\n const { addCardTitleKey: titleKey } =\r\n this.cardState.getCardAttrByTypeId(this.cardState.newDefaultInCards[0]);\r\n\r\n newTileDesc = i18n.getString('Dashboard_Tile', i18n.getString(titleKey));\r\n }\r\n\r\n const newTileMsg = i18n.getString('Dashboard_NewTileMsg', newTileDesc);\r\n const newTileBannerContainer = this.$('.dashboard__new-tile-banner');\r\n\r\n newTileBannerContainer.html(newTileBannerTemplate({\r\n i18n,\r\n newTileMsg,\r\n }));\r\n\r\n this.newTileId = _.last(this.cardState.newDefaultInCards);\r\n quickInstrumentation('AddNewTilesToOverview', `Show new tile banner for ${this.cardState.newDefaultInCards.join(', ')}`);\r\n }\r\n }\r\n\r\n setupFooter() {\r\n const timeZoneId = config.get('AccountTimeZone');\r\n const footerContainer = this.$('.summarypage-bifreshtime');\r\n const accountTimeZoneText = i18nGlobal.getString(`TimeZoneId_${timeZoneId}`);\r\n\r\n footerContainer.html(footerTemplate({\r\n i18n,\r\n accountTimeZoneText,\r\n appendLearnMoreLink,\r\n }));\r\n }\r\n\r\n setupTooManyAccountsWarning(dateRange) {\r\n if (this.navigationLevel !== 'customer') {\r\n return;\r\n }\r\n\r\n let tiles;\r\n\r\n if (_.isEmpty(this.cardState.cards)) {\r\n // Corner case if the user removed call tiles.\r\n // If theres no tiles. Add one to get MT response.\r\n tiles = ['Device'];\r\n }\r\n\r\n fetchMCCOverview({\r\n entitySet: edm.currentCustomer.Accounts,\r\n dateRange,\r\n jsdata,\r\n dateUtil,\r\n tiles,\r\n getCardsConfig: () => this.cardState.cards,\r\n instrumentation,\r\n constants,\r\n permissions,\r\n accountsMode: this.accountsMode,\r\n }).then((res) => {\r\n let showTooMuchDataError = false;\r\n if (_.some(res.errors, error => error.Code === 'TooMuchDataToDownload')) {\r\n showTooMuchDataError = true;\r\n }\r\n\r\n if (showTooMuchDataError) {\r\n this.$('.dashboard__new-tile-banner').html('');\r\n this.$('.dashboard__toolbar').html('');\r\n this.$('.dashboard__card-panel').html('');\r\n\r\n const warningContainer = this.$('.mcc_too_many-accounts');\r\n const managementLink = legacyRouter.getRouteUrl('accounts_management');\r\n const linkContent = `${i18n.getString('Dashboard_ManagementTab')}`;\r\n const warning = i18n.getString('Dashboard_TooManyAccounts', linkContent);\r\n\r\n warningContainer.append(tooManyAccountTemplate({ warning }));\r\n PageReady.pageIsReady(this.pageName);\r\n }\r\n });\r\n }\r\n\r\n render() {\r\n this.$el.html(template({}));\r\n\r\n _.delay(() => {\r\n if (!this.removed) {\r\n quickInstrumentation('QualifiedVisitOverviewPageFromCampaign', `QualifiedOverviewPageVisit: ${this.navigationLevel}`);\r\n }\r\n }, 5000);\r\n\r\n this.p$CardState.then(() => {\r\n this.config = this.cardState.config;\r\n\r\n // Setup toolbar\r\n this.setupToolbar();\r\n\r\n if (this.config.defaultName === 'welcome') {\r\n this.setupCardPanel();\r\n // no dragNdrop for welcome tips, which only has one tile, without add/remove.\r\n this.cardPanel.$('.card-holder__toolbar').css('cursor', 'default');\r\n } else {\r\n setUpAgents.call(this);\r\n\r\n // Setup card-panel\r\n this.p$ReadyState = Promise.all([\r\n this.dateFilter.p$State,\r\n ]).spread((dateRange) => {\r\n this.saveInitialState({\r\n dateRange,\r\n filter: this.filterAgent ? this.filterAgent.filter : undefined,\r\n campaignType: this.filterAgent ? this.filterAgent.campaignType : undefined,\r\n });\r\n this.setupCardPanel();\r\n this.setupNewTileNotice();\r\n if (!this.preexecuteFlag) {\r\n this.setupTooManyAccountsWarning(dateRange);\r\n }\r\n });\r\n }\r\n });\r\n\r\n return this;\r\n }\r\n\r\n showNewTile() {\r\n _.find(this.cardMaps, card => card.typeId === this.newTileId).content.el.scrollIntoView({ behavior: 'smooth' });\r\n quickInstrumentation('AddNewTilesToOverview', 'The show me button clicked in new tiles banner');\r\n }\r\n\r\n hideNewTileBanner() {\r\n this.$('.dashboard__new-tile-banner').hide();\r\n }\r\n\r\n hideNewTileBannerClicked() {\r\n this.hideNewTileBanner();\r\n quickInstrumentation('AddNewTilesToOverview', 'The hide banner button clicked in new tiles banner');\r\n }\r\n\r\n gotoManagementTab(event) {\r\n if (event && (event.button !== 0 ||\r\n event.ctrlKey ||\r\n event.shiftKey ||\r\n event.altKey ||\r\n event.metaKey)) {\r\n return true;\r\n }\r\n\r\n legacyRouter.navigateToRoute('accounts_management');\r\n return false;\r\n }\r\n\r\n remove() {\r\n if (this.toolbar) {\r\n this.toolbar.remove();\r\n }\r\n\r\n if (this.addCardView) {\r\n this.addCardView.remove();\r\n }\r\n\r\n if (this.cardPanel) {\r\n this.cardPanel.remove();\r\n }\r\n\r\n if (this.windowEventHandler) {\r\n window.removeEventListener('scroll', this.windowEventHandler);\r\n window.removeEventListener('resize', this.windowEventHandler);\r\n }\r\n\r\n this.removed = true;\r\n\r\n super.remove();\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport { dashboardConfig } from '../config/dashboard-config';\r\nimport { Dashboard } from '../dashboard/dashboard-view';\r\nimport template from './dashboard-page-template.pug';\r\n\r\nexport class DashboardPage extends Backbone.View {\r\n initialize({\r\n perfMarker,\r\n dateFilterState,\r\n filterAgent,\r\n currentCampaign,\r\n newCardsConfig = null,\r\n welcomeCardsConfig,\r\n pageName,\r\n onMounted = null,\r\n scope,\r\n accountsMode,\r\n newI18n,\r\n preexecuteFlag = false,\r\n preferenceService,\r\n }) {\r\n this.perfMarker = perfMarker;\r\n this.dateFilterState = dateFilterState;\r\n this.filterAgent = filterAgent;\r\n this.currentCampaign = currentCampaign;\r\n this.pageName = pageName;\r\n this.perfMarker.willInit();\r\n this.newCardsConfig = newCardsConfig;\r\n this.welcomeCardsConfig = welcomeCardsConfig;\r\n this.onMounted = onMounted;\r\n this.scope = scope;\r\n this.preexecuteFlag = preexecuteFlag;\r\n this.accountsMode = accountsMode;\r\n this.newI18n = newI18n;\r\n this.preferenceService = preferenceService;\r\n this.createDashboard();\r\n }\r\n\r\n createDashboard() {\r\n this.dashboard = new Dashboard({\r\n name: dashboardConfig.defaultName,\r\n perfMarker: this.perfMarker,\r\n dateFilterState: this.dateFilterState,\r\n filterAgent: this.filterAgent,\r\n currentCampaign: this.currentCampaign,\r\n newCardsConfig: this.newCardsConfig,\r\n welcomeCardsConfig: this.welcomeCardsConfig,\r\n pageName: this.pageName,\r\n onMounted: this.onMounted,\r\n scope: this.scope,\r\n accountsMode: this.accountsMode,\r\n newI18n: this.newI18n,\r\n preexecuteFlag: this.preexecuteFlag,\r\n preferenceService: this.preferenceService,\r\n });\r\n }\r\n\r\n recreateView() {\r\n if (!this.isRemoved) {\r\n this.dashboard.remove();\r\n this.createDashboard();\r\n this.$el.html(template());\r\n\r\n this.$el.append(this.dashboard.$el);\r\n this.dashboard.render();\r\n }\r\n }\r\n\r\n updateScope() {\r\n this.recreateView();\r\n }\r\n\r\n updateMode({ accountsMode }) {\r\n this.accountsMode = accountsMode;\r\n this.recreateView();\r\n }\r\n\r\n render() {\r\n this.perfMarker.willRender();\r\n\r\n\r\n this.$el.html(template());\r\n\r\n this.$el.append(this.dashboard.$el);\r\n this.dashboard.render();\r\n\r\n return this;\r\n }\r\n\r\n remove() {\r\n this.dashboard.remove();\r\n this.$el.remove();\r\n this.isRemoved = true;\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\nexport function getQuickInstrumentation({\r\n instrumentationSettings,\r\n constants,\r\n instrumentation,\r\n}) {\r\n const localScenarioMap = {\r\n LoadOverviewPage: {\r\n scenario: instrumentationSettings.SCENARIONAME.LoadOverviewPage,\r\n activity: instrumentationSettings.ACTIVITYNAME.LoadOverviewPage,\r\n },\r\n QualifiedVisitOverviewPageFromCampaign: {\r\n scenario: instrumentationSettings.SCENARIONAME.QualifiedVisitOverviewPageFromCampaign,\r\n activity: instrumentationSettings.ACTIVITYNAME.QualifiedVisitOverviewPageFromCampaign,\r\n },\r\n SetOverviewPageAsDefault: {\r\n scenario: instrumentationSettings.SCENARIONAME.SetOverviewPageAsDefault,\r\n activity: instrumentationSettings.ACTIVITYNAME.SetOverviewPageAsDefault,\r\n },\r\n AddTileToOverview: {\r\n scenario: instrumentationSettings.SCENARIONAME.AddTileToOverview,\r\n activity: instrumentationSettings.ACTIVITYNAME.AddTileToOverview,\r\n },\r\n AddTileToOverviewFromPanel: {\r\n scenario: instrumentationSettings.SCENARIONAME.AddTileToOverviewFromPanel,\r\n activity: instrumentationSettings.ACTIVITYNAME.AddTileToOverviewFromPanel,\r\n },\r\n RemoveTileFromOverview: {\r\n scenario: instrumentationSettings.SCENARIONAME.RemoveTileFromOverview,\r\n activity: instrumentationSettings.ACTIVITYNAME.RemoveTileFromOverview,\r\n },\r\n ReorderTile: {\r\n scenario: instrumentationSettings.SCENARIONAME.ReorderTile,\r\n activity: instrumentationSettings.ACTIVITYNAME.ReorderTile,\r\n },\r\n ResizeTile: {\r\n scenario: instrumentationSettings.SCENARIONAME.ResizeTile,\r\n activity: instrumentationSettings.ACTIVITYNAME.ResizeTile,\r\n },\r\n FirstUse: {\r\n scenario: instrumentationSettings.SCENARIONAME.FirstUse,\r\n activity: instrumentationSettings.ACTIVITYNAME.FirstUse,\r\n },\r\n RemoveRetiredTilesFromOverview: {\r\n scenario: instrumentationSettings.SCENARIONAME.RemoveRetiredTilesFromOverview,\r\n activity: instrumentationSettings.ACTIVITYNAME.RemoveRetiredTilesFromOverview,\r\n },\r\n AddNewTilesToOverview: {\r\n scenario: instrumentationSettings.SCENARIONAME.AddNewTilesToOverview,\r\n activity: instrumentationSettings.ACTIVITYNAME.AddNewTilesToOverview,\r\n },\r\n OverviewPageLoadData: {\r\n scenario: instrumentationSettings.SCENARIONAME.OverviewPageLoadData,\r\n activity: instrumentationSettings.ACTIVITYNAME.OverviewPageLoadData,\r\n },\r\n };\r\n\r\n return function quickInstrumentation(name, msgs = []) {\r\n instrumentation.startScenario(localScenarioMap[name].scenario);\r\n instrumentation.startActivity(localScenarioMap[name].activity);\r\n if (_.isArray(msgs)) {\r\n if (_.size(msgs) > 0) {\r\n _.each(msgs, msg => instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'overview', msg));\r\n }\r\n } else if (msgs) {\r\n instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'overview', msgs);\r\n }\r\n };\r\n}\r\n","\r\nconst i18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/dashboard-cards');\r\n\r\nexport const tipNames = {\r\n importHelp: 'importHelp',\r\n importVideo: 'importVideo',\r\n broadMatchVideo: 'broadMatchVideo',\r\n extaVideo: 'extaVideo',\r\n extaHelp1: 'extaHelp1',\r\n extaHelp2: 'extaHelp2',\r\n sitelinksMktg: 'sitelinksMktg',\r\n sitelinksHelp: 'sitelinksHelp',\r\n calloutsMktg: 'calloutsMktg',\r\n calloutsHelp: 'calloutsHelp',\r\n structSnipHelp: 'structSnipHelp',\r\n structSnipMktg: 'structSnipMktg',\r\n dsa: 'dsa',\r\n conversionTrackingVideo: 'conversionTrackingVideo',\r\n remarketingTour: 'remarketingTour',\r\n remarketingHelp1: 'remarketingHelp1',\r\n remarketingVideo: 'remarketingVideo',\r\n remarketingHelp2: 'remarketingHelp2',\r\n autoBidHelp: 'autoBidHelp',\r\n autoBidMktg: 'autoBidMktg',\r\n sharedBudgetsHelp: 'sharedBudgetsHelp',\r\n callMktg: 'callMktg',\r\n callHelp: 'callHelp',\r\n reviewsMktg: 'reviewsMktg',\r\n reviewsHelp: 'reviewsHelp',\r\n kWMatchTypeHelp: 'kWMatchTypeHelp',\r\n kWMatchTypeMktg: 'kWMatchTypeMktg',\r\n negKWHelp1: 'negKWHelp1',\r\n negKWHelp2: 'negKWHelp2',\r\n broadMatchHelp: 'broadMatchHelp',\r\n ScheduledImportHelp: 'ScheduledImportHelp',\r\n ReImportRSACampaigns: 'ReImportRSACampaigns',\r\n IncludeRSACampaigns: 'IncludeRSACampaigns',\r\n IncludeMultiAccountGoogleImport: 'IncludeMultiAccountGoogleImport',\r\n ProvideStoreToImportShoppingCampaign: 'ProvideStoreToImportShoppingCampaign',\r\n SelectAdCusFeedToImportEXTA: 'SelectAdCusFeedToImportEXTA',\r\n FacebookImport: 'FacebookImport',\r\n UETCombineClarity: 'UETCombineClarity',\r\n};\r\n\r\nexport const tipsConfig = {\r\n 101: {\r\n tipName: tipNames.importHelp,\r\n title: i18n.getString('Dashboard_TipCard_Import_Help_Title'),\r\n description: i18n.getString('Dashboard_TipCard_Import_Help_Desc'),\r\n helpLink: 'app54577',\r\n helpType: 'side_pane',\r\n imgClass: 'import_tip_img',\r\n isImportRelatedTip: true,\r\n },\r\n 102: {\r\n tipName: tipNames.importVideo,\r\n title: i18n.getString('Dashboard_TipCard_Import_Video_Title'),\r\n description: i18n.getString('Dashboard_TipCard_Import_Video_Desc'),\r\n helpLink: '1xyCD6fbf70',\r\n helpType: 'video',\r\n imgClass: 'import_tip_img',\r\n isImportRelatedTip: true,\r\n },\r\n 202: {\r\n tipName: tipNames.broadMatchVideo,\r\n title: i18n.getString('Dashboard_TipCard_BroadMatch_Video_Title'),\r\n description: i18n.getString('Dashboard_TipCard_BroadMatch_Video_Desc'),\r\n helpLink: 'rYoAn-lZdJs',\r\n helpType: 'video',\r\n imgClass: 'broadMatch_tip_img',\r\n },\r\n // video no longer available on youtube\r\n /*\r\n 301: {\r\n tipName: tipNames.extaVideo,\r\n title: i18n.getString('Dashboard_TipCard_EXTA_Video_Title'),\r\n description: i18n.getString('Dashboard_TipCard_EXTA_Video_Desc'),\r\n helpLink: 'YJCaOCLfWms',\r\n helpType: 'video',\r\n imgClass: 'exta_tip_img',\r\n },\r\n */\r\n 302: {\r\n tipName: tipNames.extaHelp1,\r\n title: i18n.getString('Dashboard_TipCard_EXTA_Help1_Title'),\r\n description: i18n.getString('Dashboard_TipCard_EXTA_Help1_Desc'),\r\n helpLink: 'app54589',\r\n helpType: 'side_pane',\r\n imgClass: 'exta_tip_img',\r\n },\r\n 303: {\r\n tipName: tipNames.extaHelp2,\r\n title: i18n.getString('Dashboard_TipCard_EXTA_Help2_Title'),\r\n description: i18n.getString('Dashboard_TipCard_EXTA_Help2_Desc'),\r\n helpLink: 'app54589',\r\n helpType: 'side_pane',\r\n imgClass: 'exta_tip_img',\r\n },\r\n 401: {\r\n tipName: tipNames.sitelinksMktg,\r\n title: i18n.getString('Dashboard_TipCard_Sitelinks_Mktg_Title'),\r\n description: i18n.getString('Dashboard_TipCard_Sitelinks_Mktg_Desc'),\r\n helpLink: 'https://advertise.bingads.microsoft.com/en-us/solutions/ad-extensions/sitelink-extensions',\r\n helpType: 'new_page',\r\n imgClass: 'sitelinks_tip_img',\r\n },\r\n 402: {\r\n tipName: tipNames.sitelinksHelp,\r\n title: i18n.getString('Dashboard_TipCard_Sitelinks_Help_Title'),\r\n description: i18n.getString('Dashboard_TipCard_Sitelinks_Help_Desc'),\r\n helpLink: 'app54652',\r\n helpType: 'side_pane',\r\n imgClass: 'sitelinks_tip_img',\r\n },\r\n 501: {\r\n tipName: tipNames.calloutsMktg,\r\n title: i18n.getString('Dashboard_TipCard_Callouts_Mktg_Title'),\r\n description: i18n.getString('Dashboard_TipCard_Callouts_Mktg_Desc'),\r\n helpLink: 'https://advertise.bingads.microsoft.com/en-us/solutions/ad-extensions/callout-extensions',\r\n helpType: 'new_page',\r\n imgClass: 'callouts_tip_img',\r\n },\r\n 502: {\r\n tipName: tipNames.calloutsHelp,\r\n title: i18n.getString('Dashboard_TipCard_Callouts_Help_Title'),\r\n description: i18n.getString('Dashboard_TipCard_Callouts_Help_Desc'),\r\n helpLink: 'app54575',\r\n helpType: 'side_pane',\r\n imgClass: 'callouts_tip_img',\r\n },\r\n 601: {\r\n tipName: tipNames.structSnipHelp,\r\n title: i18n.getString('Dashboard_TipCard_StructSnip_Help_Title'),\r\n description: i18n.getString('Dashboard_TipCard_StructSnip_Help_Desc'),\r\n helpLink: 'app54578',\r\n helpType: 'side_pane',\r\n imgClass: 'structSnip_tip_img',\r\n },\r\n 602: {\r\n tipName: tipNames.structSnipMktg,\r\n title: i18n.getString('Dashboard_TipCard_StructSnip_Mktg_Title'),\r\n description: i18n.getString('Dashboard_TipCard_StructSnip_Mktg_Desc'),\r\n helpLink: 'https://advertise.bingads.microsoft.com/en-us/blog/post/september-2016/new!-easily-highlight-your-products-and-services-with-structured-snippets',\r\n helpType: 'new_page',\r\n imgClass: 'structSnip_tip_img',\r\n },\r\n 701: {\r\n tipName: tipNames.dsa,\r\n title: i18n.getString('Dashboard_TipCard_DSA_Help_Title'),\r\n description: i18n.getString('Dashboard_TipCard_DSA_Help_Desc'),\r\n helpLink: 'app54588',\r\n helpType: 'side_pane',\r\n imgClass: 'dsa_tip_img',\r\n },\r\n 801: {\r\n tipName: tipNames.conversionTrackingVideo,\r\n title: i18n.getString('Dashboard_TipCard_ConversionTracking_Video_Title'),\r\n description: i18n.getString('Dashboard_TipCard_ConversionTracking_Video_Desc'),\r\n helpLink: 'IQbuhowpV3c',\r\n helpType: 'video',\r\n imgClass: 'conversionTracking_tip_img',\r\n },\r\n 901: {\r\n tipName: tipNames.remarketingTour,\r\n title: i18n.getString('Dashboard_TipCard_Remarketing_Tour_Title'),\r\n description: i18n.getString('Dashboard_TipCard_Remarketing_Tour_Desc'),\r\n helpLink: 144778,\r\n helpType: 'tour',\r\n imgClass: 'remarketing_tip_img',\r\n },\r\n 902: {\r\n tipName: tipNames.remarketingHelp1,\r\n title: i18n.getString('Dashboard_TipCard_Remarketing_Help1_Title'),\r\n description: i18n.getString('Dashboard_TipCard_Remarketing_Help1_Desc'),\r\n helpLink: 'app54581',\r\n helpType: 'side_pane',\r\n imgClass: 'remarketing_tip_img',\r\n },\r\n 903: {\r\n tipName: tipNames.remarketingVideo,\r\n title: i18n.getString('Dashboard_TipCard_Remarketing_Video_Title'),\r\n description: i18n.getString('Dashboard_TipCard_Remarketing_Video_Desc'),\r\n helpLink: 'PZZvA-X04-8',\r\n helpType: 'video',\r\n imgClass: 'remarketing_tip_img',\r\n },\r\n 904: {\r\n tipName: tipNames.remarketingHelp2,\r\n title: i18n.getString('Dashboard_TipCard_Remarketing_Help2_Title'),\r\n description: i18n.getString('Dashboard_TipCard_Remarketing_Help2_Desc'),\r\n helpLink: 'app54582',\r\n helpType: 'side_pane',\r\n imgClass: 'remarketing_tip_img',\r\n },\r\n 1001: {\r\n tipName: tipNames.autoBidHelp,\r\n title: i18n.getString('Dashboard_TipCard_AutoBid_Help_Title'),\r\n description: i18n.getString('Dashboard_TipCard_AutoBid_Help_Desc'),\r\n helpLink: 'app54580',\r\n helpType: 'side_pane',\r\n imgClass: 'autoBid_tip_img',\r\n },\r\n 1002: {\r\n tipName: tipNames.autoBidMktg,\r\n title: i18n.getString('Dashboard_TipCard_AutoBid_Mktg_Title'),\r\n description: i18n.getString('Dashboard_TipCard_AutoBid_Mktg_Desc'),\r\n helpLink: 'https://advertise.bingads.microsoft.com/en-us/blog/post/august-2016/get-more-conversions-with-the-new-enhanced-cpc-bid-strategy',\r\n helpType: 'new_page',\r\n imgClass: 'autoBid_tip_img',\r\n },\r\n 1101: {\r\n tipName: tipNames.sharedBudgetsHelp,\r\n title: i18n.getString('Dashboard_TipCard_SharedBudgets_Help_Title'),\r\n description: i18n.getString('Dashboard_TipCard_SharedBudgets_Help_Desc'),\r\n helpLink: 'app54584',\r\n helpType: 'side_pane',\r\n imgClass: 'sharedBudgets_tip_img',\r\n },\r\n 1201: {\r\n tipName: tipNames.callMktg,\r\n title: i18n.getString('Dashboard_TipCard_Call_Mktg_Title'),\r\n description: i18n.getString('Dashboard_TipCard_Call_Mktg_Desc'),\r\n helpLink: 'https://advertise.bingads.microsoft.com/en-us/solutions/ad-extensions/call-extensions',\r\n helpType: 'new_page',\r\n imgClass: 'call_tip_img',\r\n },\r\n 1202: {\r\n tipName: tipNames.callHelp,\r\n title: i18n.getString('Dashboard_TipCard_Call_Help_Title'),\r\n description: i18n.getString('Dashboard_TipCard_Call_Help_Desc'),\r\n helpLink: 'app54576',\r\n helpType: 'side_pane',\r\n imgClass: 'call_tip_img',\r\n },\r\n 1301: {\r\n tipName: tipNames.reviewsMktg,\r\n title: i18n.getString('Dashboard_TipCard_Reviews_Mktg_Title'),\r\n description: i18n.getString('Dashboard_TipCard_Reviews_Mktg_Desc'),\r\n helpLink: 'https://advertise.bingads.microsoft.com/en-us/solutions/ad-extensions/review-extensions',\r\n helpType: 'new_page',\r\n imgClass: 'reviews_tip_img',\r\n },\r\n 1302: {\r\n tipName: tipNames.reviewsHelp,\r\n title: i18n.getString('Dashboard_TipCard_Reviews_Help_Title'),\r\n description: i18n.getString('Dashboard_TipCard_Reviews_Help_Desc'),\r\n helpLink: 'app54579',\r\n helpType: 'side_pane',\r\n imgClass: 'reviews_tip_img',\r\n },\r\n 1401: {\r\n tipName: tipNames.kWMatchTypeHelp,\r\n title: i18n.getString('Dashboard_TipCard_KWMatchType_Help_Title'),\r\n description: i18n.getString('Dashboard_TipCard_KWMatchType_Help_Desc'),\r\n helpLink: 'app54583',\r\n helpType: 'side_pane',\r\n imgClass: 'kWMatchType_tip_img',\r\n },\r\n 1402: {\r\n tipName: tipNames.kWMatchTypeMktg,\r\n title: i18n.getString('Dashboard_TipCard_KWMatchType_Mktg_Title'),\r\n description: i18n.getString('Dashboard_TipCard_KWMatchType_Mktg_Desc'),\r\n helpLink: 'https://advertise.bingads.microsoft.com/en-us/resources/training/keyword-match-options',\r\n helpType: 'new_page',\r\n imgClass: 'kWMatchType_tip_img',\r\n },\r\n 1501: {\r\n tipName: tipNames.negKWHelp1,\r\n title: i18n.getString('Dashboard_TipCard_NegKW_Help1_Title'),\r\n description: i18n.getString('Dashboard_TipCard_NegKW_Help1_Desc'),\r\n helpLink: 'app54586',\r\n helpType: 'side_pane',\r\n imgClass: 'negKW_tip_img',\r\n },\r\n 1502: {\r\n tipName: tipNames.negKWHelp2,\r\n title: i18n.getString('Dashboard_TipCard_NegKW_Help2_Title'),\r\n description: i18n.getString('Dashboard_TipCard_NegKW_Help2_Desc'),\r\n helpLink: 'app54587',\r\n helpType: 'side_pane',\r\n imgClass: 'negKW_tip_img',\r\n },\r\n 1601: {\r\n tipName: tipNames.broadMatchHelp,\r\n title: i18n.getString('Dashboard_TipCard_BroadMatch_Help_Title'),\r\n description: i18n.getString('Dashboard_TipCard_BroadMatch_Help_Desc'),\r\n helpLink: 'app54583',\r\n helpType: 'side_pane',\r\n imgClass: 'broadMatch_tip_img',\r\n },\r\n 1701: {\r\n tipName: tipNames.ScheduledImportHelp,\r\n title: i18n.getString('Dashboard_TipCard_ScheduledImport_Help_Title'),\r\n description: i18n.getString('Dashboard_TipCard_ScheduledImport_Help_Desc'),\r\n helpLink: 'app54497',\r\n helpType: 'side_pane',\r\n imgClass: 'import_tip_img',\r\n isImportRelatedTip: true,\r\n },\r\n 1801: {\r\n tipName: tipNames.ReImportRSACampaigns,\r\n title: i18n.getString('Dashboard_TipCard_RSA_Import_Help1_Title'),\r\n description: i18n.getString('Dashboard_TipCard_RSA_Import_Help1_Desc'),\r\n helpLink: 'app54667',\r\n helpType: 'side_pane',\r\n imgClass: 'import_tip_img',\r\n isImportRelatedTip: true,\r\n },\r\n 1901: {\r\n tipName: tipNames.IncludeRSACampaigns,\r\n title: i18n.getString('Dashboard_TipCard_RSA_Import_Help2_Title'),\r\n description: i18n.getString('Dashboard_TipCard_RSA_Import_Help2_Desc'),\r\n helpLink: 'app54667',\r\n helpType: 'side_pane',\r\n imgClass: 'import_tip_img',\r\n isImportRelatedTip: true,\r\n },\r\n 2001: {\r\n tipName: tipNames.IncludeMultiAccountGoogleImport,\r\n title: i18n.getString('Dashboard_TipCard_Multi_Account_Import_Help1_Title'),\r\n description: i18n.getString('Dashboard_TipCard_Multi_Account_Import_Help1_Desc'),\r\n helpLink: 'app54577',\r\n helpType: 'side_pane',\r\n imgClass: 'import_tip_img',\r\n isImportRelatedTip: true,\r\n },\r\n 2101: {\r\n tipName: tipNames.ProvideStoreToImportShoppingCampaign,\r\n title: i18n.getString('Dashboard_TipCard_Provide_Store_To_Import_Shopping_Campaign_Help_Title'),\r\n description: i18n.getString('Dashboard_TipCard_Provide_Store_To_Import_Shopping_Campaign_Help_Desc'),\r\n helpLink: 'app51001',\r\n helpType: 'side_pane',\r\n imgClass: 'import_tip_img',\r\n isImportRelatedTip: true,\r\n },\r\n 2201: {\r\n tipName: tipNames.SelectAdCusFeedToImportEXTA,\r\n title: i18n.getString('Dashboard_TipCard_Select_AdCusFeed_To_Import_EXTA_Help_Title'),\r\n description: i18n.getString('Dashboard_TipCard_Select_AdCusFeed_To_Import_EXTA_Help_Desc'),\r\n helpLink: 'app54730',\r\n helpType: 'side_pane',\r\n imgClass: 'import_tip_img',\r\n isImportRelatedTip: true,\r\n },\r\n 2301: {\r\n tipName: tipNames.FacebookImport,\r\n title: i18n.getString('Dashboard_TipCard_FB_Import_Help_Title'),\r\n description: i18n.getString('Dashboard_TipCard_FB_Import_Help_Desc'),\r\n helpLink: 'app54769',\r\n helpType: 'side_pane',\r\n imgClass: 'import_tip_img',\r\n isImportRelatedTip: true,\r\n },\r\n 2401: {\r\n tipName: tipNames.UETCombineClarity,\r\n title: i18n.getString('Dashboard_TipCard_UETCombineClarity_Help_Title'),\r\n description: i18n.getString('Dashboard_TipCard_UETCombineClarity_Help_Desc'),\r\n helpLink: 'https://help.ads-int.microsoft.com/#apex/3/en/60110/-1/en/#ext:Default',\r\n helpType: 'new_page',\r\n imgClass: 'conversionTracking_tip_img',\r\n },\r\n};\r\n","import _ from 'underscore';\r\nimport { DeterministicView } from '@bingads-webui/deterministic-view';\r\nimport {\r\n entityHash,\r\n navigateToEntity,\r\n getEntityIds,\r\n coerceStatus,\r\n topChangesGridTemplate,\r\n getInsightsMetric,\r\n} from '@bingads-webui-campaign/overview-cards-common';\r\nimport { Constants } from '@bingads-webui-clientcenter/entity-utils';\r\nimport { createElementBasedFluctuationPopupFactory } from '@bingads-webui-campaign-react/fluctuation-popup';\r\n\r\n/* @this TopChangeGrid */\r\nfunction processGridData({\r\n metric,\r\n data,\r\n entitySet,\r\n}) {\r\n const {\r\n pageContext,\r\n legacyRouter,\r\n metricFormatter,\r\n i18n,\r\n instrumentation,\r\n constants,\r\n } = this.deps;\r\n\r\n\r\n if (data === undefined || data === null) {\r\n return undefined;\r\n } else if (_.size(data) === 0) {\r\n return [];\r\n }\r\n\r\n _.each(data, (entity) => {\r\n if (!entity.PerformanceMetricsChange) {\r\n instrumentation.logMessage([constants.LOGCATEGORY.ERROR], constants.LOGLEVEL.INFO, 'top-changes-card', JSON.stringify(entity));\r\n }\r\n });\r\n\r\n const maxChange = Math.abs(_.max(data, ({\r\n PerformanceMetricsChange: { [metric]: value },\r\n }) => Math.abs(value)).PerformanceMetricsChange[metric]);\r\n\r\n return _.map(data, (entity) => {\r\n const formattedPeriodMetrics = metricFormatter.formatMetric(\r\n metric,\r\n entity.PeriodPerformanceMetrics[metric],\r\n { currency: entity.Currency }\r\n );\r\n const formattedMetrics = metricFormatter.formatMetric(\r\n metric,\r\n entity.PerformanceMetrics[metric],\r\n { currency: entity.Currency }\r\n );\r\n const value = entity.PerformanceMetricsChange[metric];\r\n let declineBar = 0;\r\n let declineSpace = 100;\r\n let increaseBar = 0;\r\n let increaseSpace = 100;\r\n\r\n if (maxChange !== 0) {\r\n if (value < 0) {\r\n declineBar = Math.ceil(-(value * 100) / maxChange);\r\n declineSpace = 100 - declineBar;\r\n } else {\r\n increaseBar = Math.ceil((value * 100) / maxChange);\r\n increaseSpace = 100 - increaseBar;\r\n }\r\n }\r\n\r\n const typeName = entitySet.type.elementType.shortName;\r\n const { campaignId, adgroupId, accountId } = getEntityIds({\r\n typeName,\r\n id: entity.Id,\r\n entitySet,\r\n });\r\n\r\n let isExperiment;\r\n\r\n if (typeName === 'Campaign') {\r\n isExperiment = !!entity.ExperimentId;\r\n } else if (typeName === 'AdGroup') {\r\n isExperiment = !!entity.Campaign.ExperimentId;\r\n }\r\n\r\n const fluctuationTypeIds = getInsightsMetric(entity.AvailableInsightTypeIds, metric);\r\n\r\n return {\r\n name: entity.Name,\r\n status: coerceStatus(entity.Status, entity.AccountInactiveReasons),\r\n value,\r\n formattedValue: metricFormatter.formatMetricWithSign(\r\n metric,\r\n entity.PerformanceMetricsChange[metric],\r\n { currency: entity.Currency }\r\n ),\r\n formattedPercentageValue: metricFormatter\r\n .formatChangePercentageWithSign(entity.PerformanceMetricsChangePercentage[metric]),\r\n fromTo: i18n.getString('Dashboard_Cards_FromTo', { fromValue: formattedPeriodMetrics, toValue: formattedMetrics }),\r\n hash: entityHash({\r\n typeName,\r\n id: entity.Id,\r\n isSmartCampaign: entity.CampaignType && entity.CampaignType === 'Smart',\r\n entitySet,\r\n pageContext,\r\n legacyRouter,\r\n status: entity.Status,\r\n }),\r\n campaignType: entity.CampaignType,\r\n campaignId,\r\n adgroupId,\r\n accountId,\r\n typeName,\r\n formattedMetrics,\r\n formattedPeriodMetrics,\r\n declineBar,\r\n declineSpace,\r\n increaseBar,\r\n increaseSpace,\r\n isExperiment,\r\n rawStatus: entity.Status,\r\n fluctuationTypeIds,\r\n };\r\n });\r\n}\r\n\r\nexport default class TopChangeGrid extends DeterministicView {\r\n constructor(options) {\r\n super(_.extend({}, options, { renderInSync: true }));\r\n }\r\n\r\n initialize({\r\n deps,\r\n perfMarker,\r\n }) {\r\n this.deps = deps;\r\n this.perfMarker = perfMarker;\r\n }\r\n\r\n get className() {\r\n return 'top-change-grid-container';\r\n }\r\n\r\n get events() {\r\n const { pageContext, legacyRouter, createEditableFilterStorage } = this.deps;\r\n\r\n return {\r\n 'click .top-change-entity-name a': event => navigateToEntity({\r\n event,\r\n pageContext,\r\n legacyRouter,\r\n createEditableFilterStorage,\r\n cardType: 'top-changes-card',\r\n instrumentation: this.deps.instrumentation,\r\n constants: this.deps.constants,\r\n }),\r\n 'click .mcc-perf-fluctuation-bulb': event => this.showFluctuationPopup(event),\r\n 'keypress .mcc-perf-fluctuation-bulb': event => this.showFluctuationPopup(event),\r\n };\r\n }\r\n\r\n showFluctuationPopup(e) {\r\n const triggerButton = e.currentTarget;\r\n const placeholder = e.currentTarget.nextSibling;\r\n const dataSet = e.currentTarget.dataset;\r\n const {\r\n fluxtypeids = [], metricname, metrictext, cmid, aid,\r\n } = dataSet || {};\r\n const { dateRange } = this.getState();\r\n const selectedAccount = aid ? { CurrentAccount: { Id: Number(aid) || 0 } } : {};\r\n const selectedCampaign = cmid ? { CurrentCampaign: { Id: Number(cmid) || 0 } } : {};\r\n const pageContextWithMetricRowInfo = {\r\n ...this.deps.pageContext,\r\n ...selectedAccount,\r\n ...selectedCampaign,\r\n ...this.deps.context,\r\n };\r\n\r\n if (placeholder.className === 'mcc-perf-fluctuation-placeholder') {\r\n createElementBasedFluctuationPopupFactory({\r\n triggerButton,\r\n deps: {\r\n ...this.deps,\r\n // campaignui/feature/instrumentation/index\r\n instrumentation: this.deps.localInstrumentation,\r\n // TODO: update imagePath with newest resource URL\r\n imagePath: 'https://RESOURCES.UI.BINGADS.MICROSOFT.COM/AdvertiserUI/V2018.1030.2248.41/Application/Images/fluctuation-bulb.png',\r\n token: this.deps.pageContext.Token,\r\n context: pageContextWithMetricRowInfo,\r\n appConfig: this.deps.config,\r\n },\r\n metrics: [{\r\n name: metricname,\r\n value: metrictext,\r\n }],\r\n canViewAllInsights: true,\r\n asyncLoadFluctuationConfig: {\r\n dateRange: {\r\n startDate: dateRange.start,\r\n endDate: dateRange.end,\r\n },\r\n fluctuationTypeIds: JSON.parse(fluxtypeids) || [],\r\n },\r\n fromScenario: cmid ? 'CampaignsOverview' : 'AccountsOverview',\r\n onFlucDismiss: ({ isLastFluc }) => {\r\n if (isLastFluc) {\r\n DeterministicView.getParent(this).setState({ dismissLastFluctuation: true });\r\n }\r\n },\r\n onDismiss: () => {\r\n if (triggerButton) {\r\n triggerButton.focus();\r\n }\r\n },\r\n perfMarker: this.perfMarker,\r\n }, placeholder);\r\n }\r\n }\r\n\r\n template() {\r\n const {\r\n metric,\r\n data,\r\n entitySet,\r\n currentDateRangeText,\r\n comparisonDateRangeText,\r\n hasError,\r\n loaded,\r\n } = this.getState();\r\n\r\n let gridData;\r\n\r\n if (!hasError) {\r\n gridData = processGridData.call(this, {\r\n metric,\r\n data: _.compact(data),\r\n entitySet,\r\n });\r\n }\r\n\r\n return () => topChangesGridTemplate({\r\n hasError,\r\n loaded,\r\n gridData,\r\n i18n: this.deps.i18n,\r\n metricName: metric ? this.deps.s$i18n.property('PerformanceMetrics', metric) : '',\r\n currentDateRangeText,\r\n comparisonDateRangeText,\r\n AccountActivityStatus: Constants.AccountActivityStatus,\r\n });\r\n }\r\n\r\n renderTrunk() {\r\n const { loaded } = this.getState();\r\n const parent = DeterministicView.getParent(this);\r\n\r\n if (loaded) {\r\n parent.willRenderWithData();\r\n }\r\n super.renderTrunk();\r\n if (loaded) {\r\n parent.renderedWithData();\r\n }\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\nimport { BaseCard } from '@bingads-webui-campaign/overview-base-card';\r\nimport { helpers } from '@bingads-webui/deterministic-view';\r\nimport {\r\n TopChangesFilterOption,\r\n getComparisonDateRange,\r\n fetchTopChanges,\r\n topChangesDefaultOptions,\r\n changeEvents,\r\n allMetrics,\r\n isInsightsMetric,\r\n processTopChangesMetric,\r\n AccountsMode,\r\n patchMetric,\r\n getPopDescription,\r\n} from '@bingads-webui-campaign/overview-cards-common';\r\nimport { MetricPicker } from '@bingads-webui-campaign/overview-metric-picker';\r\nimport TopChangeGrid from './content';\r\nimport metricPickerButtonTemplate from './metric-picker-button-template.pug';\r\nimport template from './template.pug';\r\n\r\nlet i18n;\r\nlet items;\r\nconst layoutBreakPoint = 800;\r\n\r\nfunction getItems() {\r\n if (!items) {\r\n items = [{\r\n displayText: i18n.getString('Dashboard_TopChanges_ToolbarDropdown_All_Changes'),\r\n action: TopChangesFilterOption.AllChanges,\r\n }, {\r\n displayText: i18n.getString('Dashboard_TopChanges_ToolbarDropdown_Top_Gainers'),\r\n action: TopChangesFilterOption.TopGainers,\r\n }, {\r\n displayText: i18n.getString('Dashboard_TopChanges_ToolbarDropdown_Top_Decliners'),\r\n action: TopChangesFilterOption.TopDecliners,\r\n }];\r\n\r\n if (this.accountsMode !== AccountsMode.Smart) {\r\n items.push({\r\n displayText: i18n.getString('Dashboard_TopChanges_ToolbarDropdown_Insights'),\r\n action: TopChangesFilterOption.Insights,\r\n });\r\n }\r\n }\r\n\r\n return items;\r\n}\r\n\r\nconst layoutSize = {\r\n small: 0,\r\n large: 1,\r\n};\r\n\r\n/* @this TopChanges */\r\nfunction getLayoutSize() {\r\n if (this.$el.closest('.card-holder__wrapper').outerWidth() < layoutBreakPoint) {\r\n return layoutSize.small;\r\n }\r\n return layoutSize.large;\r\n}\r\n\r\n/* @this TopChanges */\r\nfunction reLayout() {\r\n const newLayoutSize = getLayoutSize.call(this);\r\n\r\n if (this.currentLayoutSize === newLayoutSize) {\r\n return;\r\n }\r\n\r\n if (newLayoutSize === layoutSize.small) {\r\n this.$el.addClass('small_layout');\r\n } else {\r\n this.$el.removeClass('small_layout');\r\n }\r\n\r\n this.currentLayoutSize = newLayoutSize;\r\n}\r\n\r\n/* @this TopChanges */\r\nfunction getCardPreference() {\r\n const { selectedMenuItem, metric } = this.getState();\r\n\r\n return {\r\n metric,\r\n selectedMenuItem,\r\n };\r\n}\r\n\r\n/* @this TopChange */\r\nfunction loadErrorMsg() {\r\n helpers.updateView(this.getChild('grid-content'), {\r\n hasError: true,\r\n loaded: true,\r\n });\r\n}\r\n\r\n/* @this TopChange */\r\nfunction updateData() {\r\n const {\r\n dateRange,\r\n selectedMenuItem,\r\n metric,\r\n filter,\r\n permissions,\r\n dismissLastFluctuation,\r\n } = this.getState();\r\n\r\n if (!dateRange) {\r\n return;\r\n }\r\n\r\n const comparisonDateRange = getComparisonDateRange(dateRange);\r\n const startDate = i18n.formatDate(dateRange.start);\r\n const endDate = i18n.formatDate(dateRange.end);\r\n const comparisonStartDate = i18n.formatDate(comparisonDateRange.start);\r\n const comparisonEndDate = i18n.formatDate(comparisonDateRange.end);\r\n let currentDateRangeText;\r\n let comparisonDateRangeText;\r\n\r\n this.popText = getPopDescription(i18n, comparisonDateRange);\r\n this.popTextAriaLabel = (i18n.getString('Click to learn more about {{item}}') || '').replace('{{item}}', this.popText);\r\n if (startDate === endDate) {\r\n currentDateRangeText = startDate;\r\n comparisonDateRangeText = comparisonStartDate;\r\n } else {\r\n currentDateRangeText = `${startDate} - ${endDate}`;\r\n comparisonDateRangeText = `${comparisonStartDate} - ${comparisonEndDate}`;\r\n }\r\n\r\n const {\r\n instrumentation, constants, jsdata, dateUtil, cacheManager,\r\n } = this.deps;\r\n\r\n this.blockCard();\r\n this.willFetchData();\r\n\r\n fetchTopChanges({\r\n entitySet: this.entitySet,\r\n dateRange,\r\n filter,\r\n comparisonDateRange,\r\n selectedMenuItem,\r\n metric,\r\n jsdata,\r\n getCardsConfig: this.getCardsConfig,\r\n dateUtil,\r\n fetchSingleTile: this.fetchSingleTile,\r\n isDevice: true,\r\n permissions,\r\n disableCache: dismissLastFluctuation,\r\n cacheManager,\r\n accountsMode: this.accountsMode,\r\n dfmCacheKey: this.typeId,\r\n }).finally(() => {\r\n this.unblockCard();\r\n this.setState({ dismissLastFluctuation: false });\r\n const firstRow = this.$('.top-change-grid .top-change-entity-name.top-change-grid-row-1 a');\r\n if (firstRow.length > 0) {\r\n firstRow.focus();\r\n } else {\r\n this.$('.view-all-clickLink').focus();\r\n }\r\n }).then((data) => {\r\n if (this.removed) {\r\n return;\r\n }\r\n\r\n if (!data || (data.status !== null && data.status !== undefined)) {\r\n loadErrorMsg.call(this);\r\n // If we have error status. Those are already logged in ajax stub.\r\n // Add a trace log.\r\n instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'top-changes-card', JSON.stringify(data));\r\n return;\r\n }\r\n\r\n let dataError = false;\r\n\r\n _.each(data, (entity) => {\r\n if (!entity || !entity.PerformanceMetricsChange) {\r\n dataError = true;\r\n }\r\n if (entity.AvailableInsightTypeIds && entity.AvailableInsightTypeIds.length) {\r\n const fromScenario = entity.CampaignType ? 'CampaignsOverview' : 'AccountsOverView';\r\n instrumentation.logMessage(\r\n [constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'top-changes-card',\r\n `Fluctuations Rendered. FromScenario: ${fromScenario}, FilterOption: ${selectedMenuItem}, Metric: ${metric}, TypeIds: ${entity.AvailableInsightTypeIds.toString()}, id: ${entity.Id}}.`\r\n );\r\n }\r\n });\r\n\r\n if (dataError) {\r\n loadErrorMsg.call(this);\r\n instrumentation.logMessage([constants.LOGCATEGORY.ERROR], constants.LOGLEVEL.INFO, 'top-changes-card', JSON.stringify(data));\r\n return;\r\n }\r\n\r\n let gridData = data;\r\n\r\n if (selectedMenuItem === TopChangesFilterOption.TopDecliners) {\r\n gridData = _.filter(gridData, entity => entity.PerformanceMetricsChange[metric] < 0);\r\n } else if (selectedMenuItem === TopChangesFilterOption.TopGainers) {\r\n gridData = _.filter(gridData, entity => entity.PerformanceMetricsChange[metric] > 0);\r\n } else if (selectedMenuItem === TopChangesFilterOption.Insights) {\r\n gridData = isInsightsMetric(metric) ? _.filter(\r\n gridData,\r\n entity => !_.isEmpty(entity.AvailableInsightTypeIds)\r\n ) : [];\r\n }\r\n\r\n helpers.updateView(this.getChild('grid-content'), {\r\n loaded: true,\r\n hasError: false,\r\n data: gridData,\r\n metric,\r\n entitySet: this.entitySet,\r\n currentDateRangeText,\r\n comparisonDateRangeText,\r\n dateRange,\r\n });\r\n }).catch((response) => {\r\n // no need to log ajax error here.\r\n if (response.status === undefined) {\r\n instrumentation.logMessage([constants.LOGCATEGORY.ERROR], constants.LOGLEVEL.INFO, 'top-changes-card', response.stack);\r\n }\r\n loadErrorMsg.call(this);\r\n });\r\n}\r\n\r\n/* @this TopChange */\r\nfunction updateMetricPicker() {\r\n const { metric, permissions } = this.getState();\r\n\r\n helpers.updateView(this.metricPickerChild, {\r\n metric,\r\n metrics: _.difference(allMetrics(permissions, this.accountsMode), [metric]),\r\n });\r\n}\r\n\r\n/* @this TopChange */\r\nfunction navigateToEntityGrid() {\r\n const {\r\n legacyRouter,\r\n state,\r\n instrumentation,\r\n constants,\r\n } = this.deps;\r\n\r\n instrumentation.logMessage(\r\n [constants.LOGCATEGORY.TRACE],\r\n constants.LOGLEVEL.INFO,\r\n 'top-changes-card',\r\n `${this.navigationLevel} level view all clicked`\r\n );\r\n\r\n if (this.navigationLevel === 'account') {\r\n legacyRouter.navigateToRoute('campaign');\r\n } else if (this.navigationLevel === 'customer') {\r\n legacyRouter.navigateToRoute('accounts_performance', { accountMode: this.accountsMode });\r\n } else {\r\n legacyRouter.navigateToRoute('campaign_adgroup', {\r\n // eslint-disable-next-line camelcase\r\n campaign_id: state.get('campaign_id'),\r\n });\r\n }\r\n}\r\n\r\n/* @this TopChange */\r\nfunction updatePopupPosition(evt) {\r\n const $target = this.$(evt.currentTarget);\r\n const hoverContent = $target.find('.hover-content');\r\n\r\n if (hoverContent.attr('style')) {\r\n hoverContent.attr('style', '');\r\n }\r\n\r\n const $viewport = $target.closest('.top-change-grid-container');\r\n const scrollTop = $viewport.scrollTop();\r\n\r\n if (scrollTop <= 0) {\r\n return;\r\n }\r\n\r\n if ($target.offset().top - $viewport.offset().top > 50) {\r\n hoverContent.css({\r\n top: 'auto',\r\n bottom: `${scrollTop}px`,\r\n });\r\n } else {\r\n hoverContent.css({\r\n top: `${50 - scrollTop}px`,\r\n bottom: 'auto',\r\n });\r\n }\r\n}\r\n\r\n/* @this TopChange */\r\nfunction setupScrollBarCover() {\r\n const viewport = this.$('.top-change-grid-container');\r\n const viewportWidth = viewport.width();\r\n const grid = this.$('.top-change-grid');\r\n const gridWidth = grid.width();\r\n\r\n if (viewportWidth && gridWidth && (viewportWidth > gridWidth)) {\r\n const scrollBarWidth = viewportWidth - gridWidth;\r\n const scrollBarHeight = viewport.height();\r\n\r\n this.$('.scroll-bar-cover', this.$el.closest('.grid-card')).css({\r\n width: scrollBarWidth,\r\n height: scrollBarHeight,\r\n });\r\n\r\n const expand = Math.min(scrollBarWidth, 16);\r\n\r\n viewport.css({ marginRight: -expand });\r\n }\r\n}\r\n\r\nexport class TopChangesCard extends BaseCard {\r\n get className() {\r\n return 'top-changes-card';\r\n }\r\n\r\n get template() {\r\n return () => template({\r\n popText: this.popText,\r\n buttonText: this.buttonText,\r\n isCustomerLevel: this.navigationLevel === 'customer',\r\n popTextAriaLabel: this.popTextAriaLabel,\r\n });\r\n }\r\n\r\n get menuItems() {\r\n const { selectedMenuItem } = this.getState();\r\n\r\n _.each(getItems.call(this), (item) => {\r\n if (item.action === selectedMenuItem) {\r\n // eslint-disable-next-line no-param-reassign\r\n item.preset = true;\r\n } else {\r\n // eslint-disable-next-line no-param-reassign\r\n item.preset = false;\r\n }\r\n });\r\n\r\n return items;\r\n }\r\n\r\n onMenuAction(menuItem) {\r\n const { selectedMenuItem } = this.getState();\r\n\r\n if (selectedMenuItem === menuItem) {\r\n return;\r\n }\r\n\r\n const {\r\n instrumentation, constants,\r\n } = this.deps;\r\n\r\n instrumentation.logMessage(\r\n [constants.LOGCATEGORY.TRACE],\r\n constants.LOGLEVEL.INFO,\r\n 'top-changes-card',\r\n `${this.navigationLevel} level new pop type picked.`\r\n );\r\n\r\n this.setState({\r\n selectedMenuItem: menuItem,\r\n });\r\n }\r\n\r\n initialize({\r\n entitySet,\r\n metric,\r\n selectedMenuItem,\r\n dateRange,\r\n filter,\r\n navigationLevel,\r\n perfMarker,\r\n name,\r\n sharedOptions,\r\n deps,\r\n fetchSingleTile = false,\r\n preexecuteFlag = false,\r\n accountsMode,\r\n scope,\r\n dismissLastFluctuation = false,\r\n typeId,\r\n }) {\r\n this.getCardsConfig = sharedOptions.getCardsConfig;\r\n this.fetchSingleTile = fetchSingleTile;\r\n this.accountsMode = accountsMode;\r\n this.deps = deps;\r\n this.typeId = typeId;\r\n this.initPerfMarker({ perfMarker, name });\r\n // eslint-disable-next-line prefer-destructuring\r\n i18n = deps.i18n;\r\n this.setChild('grid-content', new TopChangeGrid({\r\n deps: {\r\n ...deps,\r\n context: {\r\n ...deps.context,\r\n scope,\r\n },\r\n },\r\n perfMarker: this.perfMarker,\r\n }));\r\n\r\n const permissions = deps.config && deps.config.get('Permissions');\r\n const initialState = _.defaults({\r\n metric,\r\n selectedMenuItem,\r\n dateRange,\r\n filter,\r\n permissions,\r\n dismissLastFluctuation,\r\n }, topChangesDefaultOptions);\r\n\r\n const patchedMetric = patchMetric({\r\n permissions,\r\n metric: initialState.metric,\r\n accountsMode,\r\n });\r\n const metricProcessed = processTopChangesMetric({\r\n metric: patchedMetric,\r\n permissions,\r\n accountsMode,\r\n });\r\n\r\n if (metricProcessed !== initialState.metric) {\r\n _.extend(initialState, { metric: metricProcessed });\r\n\r\n this.setState(initialState);\r\n _.defer(() => {\r\n this.trigger('storeCardPreference', getCardPreference.call(this));\r\n });\r\n } else {\r\n this.setState(initialState);\r\n }\r\n\r\n this.entitySet = entitySet;\r\n const { metric: initialMetric } = this.getState();\r\n\r\n this.metricPickerChild = helpers.ensureChildView(this, 'metric-picker', MetricPicker, {\r\n buttonTemplate: metricPickerButtonTemplate,\r\n metric: initialMetric,\r\n metrics: _.difference(allMetrics(permissions, this.accountsMode), [initialMetric]),\r\n metricFormatter: this.deps.metricFormatter,\r\n s$i18n: this.deps.s$i18n,\r\n i18n,\r\n accountsMode,\r\n deps,\r\n }, {\r\n pick: ({ metric: newMetric }) => {\r\n const {\r\n instrumentation, constants,\r\n } = this.deps;\r\n\r\n instrumentation.logMessage(\r\n [constants.LOGCATEGORY.TRACE],\r\n constants.LOGLEVEL.INFO,\r\n 'top-changes-card',\r\n `${this.navigationLevel} level new metric picked.`\r\n );\r\n this.setState({ metric: newMetric });\r\n updateMetricPicker.call(this);\r\n },\r\n });\r\n this.navigationLevel = navigationLevel;\r\n\r\n switch (navigationLevel) {\r\n case 'account':\r\n this.buttonText = i18n.getString('Dashboard_TopCampaigns_View_All');\r\n break;\r\n case 'customer':\r\n this.buttonText = i18n.getString('Dashboard_TopAccounts_View_All');\r\n break;\r\n case 'campaign':\r\n this.buttonText = i18n.getString('Dashboard_TopAdGroups_View_All');\r\n break;\r\n default:\r\n }\r\n\r\n const updateDataFunc = preexecuteFlag ? () => {\r\n helpers.updateView(this.getChild('grid-content'), {\r\n loaded: true,\r\n });\r\n } : updateData;\r\n const comparisonDateRange = getComparisonDateRange(dateRange);\r\n\r\n this.popText = getPopDescription(i18n, comparisonDateRange);\r\n this.popTextAriaLabel = (i18n.getString('Click to learn more about {{item}}') || '').replace('{{item}}', this.popText);\r\n updateMetricPicker.call(this);\r\n updateDataFunc.call(this);\r\n\r\n this.listenTo(this.model, changeEvents('dateRange', 'filter'), () => {\r\n this.fetchSingleTile = false;\r\n updateDataFunc.call(this);\r\n });\r\n\r\n this.listenTo(this.model, changeEvents('selectedMenuItem', 'metric'), () => {\r\n this.fetchSingleTile = true;\r\n updateDataFunc.call(this);\r\n });\r\n\r\n this.listenTo(this.model, changeEvents('dismissLastFluctuation'), () => {\r\n this.fetchSingleTile = true;\r\n updateData.call(this);\r\n });\r\n\r\n this.listenTo(this.model, changeEvents('metric'), () => {\r\n updateMetricPicker.call(this);\r\n });\r\n\r\n this.listenTo(this.model, changeEvents('selectedMenuItem'), () => {\r\n this.trigger('change:menuItems', {\r\n value: this.menuItems,\r\n options: { replace: true },\r\n });\r\n });\r\n\r\n this.listenTo(this.model, changeEvents('selectedMenuItem', 'metric'), () => {\r\n this.trigger('storeCardPreference', getCardPreference.call(this));\r\n });\r\n\r\n this.onResize(() => {\r\n reLayout.call(this);\r\n setupScrollBarCover.call(this);\r\n });\r\n\r\n this.on('removed', () => {\r\n this.removed = true;\r\n });\r\n\r\n this.listenTo(this.model, changeEvents('size'), () => {\r\n setupScrollBarCover.call(this);\r\n });\r\n\r\n this.getChild('grid-content').on('rendered', () => {\r\n if (this.deps.onMounted) {\r\n this.deps.onMounted.schedule(() => setupScrollBarCover.call(this));\r\n } else {\r\n setupScrollBarCover.call(this);\r\n }\r\n });\r\n }\r\n\r\n get events() {\r\n return {\r\n 'mouseover .graph-hover-target,.pop-hover-target': updatePopupPosition.bind(this),\r\n 'click .view-all-clickLink': navigateToEntityGrid.bind(this),\r\n };\r\n }\r\n\r\n renderTrunk() {\r\n this.currentLayoutSize = undefined;\r\n super.renderTrunk();\r\n _.defer(() => {\r\n reLayout.call(this);\r\n });\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\n/**\r\n * Serialize the inlinechart preference object.\r\n * @param {object} attrs - { id, project, inlineChartData }\r\n * @returns {object} searialized data.\r\n*/\r\nexport function serialize(attrs) {\r\n const { id, project, inlineChartData } = attrs;\r\n\r\n if (_.some(project, _.negate(_.isString))) {\r\n throw new Error('Invalid attributes');\r\n }\r\n\r\n return {\r\n Id: id,\r\n Name: `WebApp.${project}.InlineChart`,\r\n Data: inlineChartData,\r\n Type: 'object',\r\n Version: 1,\r\n };\r\n}\r\n\r\n/** de-serialize the inlinechart preference object.\r\n * @param {string} data - data from preference store\r\n * @return {object} de-seraialized inlinechart data.\r\n*/\r\nexport function deserialize(data) {\r\n const match = data.Name.match(/^WebApp\\.(\\w+)\\.InlineChart/);\r\n\r\n if (!match) {\r\n throw new Error('Invalid preference name');\r\n }\r\n\r\n const project = match.slice(1);\r\n const inlineChartData = data.Data;\r\n const id = data.Id;\r\n\r\n return { id, project, inlineChartData };\r\n}\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport { PreferencesSubadapter } from '@bingads-webui-campaign/preferences-subadapter';\r\nimport { serialize, deserialize } from './chart-preference-subadapter';\r\n\r\nexport class InlineChartPreferences {\r\n constructor(\r\n store,\r\n pathConfig,\r\n adapter,\r\n preferenceServicePromise\r\n ) {\r\n if (_.isUndefined(store.definitions.InlineChart)) {\r\n store.defineResource('InlineChart');\r\n\r\n // Attach a preferenceSubadapter to serialize and deserialize data\r\n adapter.registerSubadapter(\r\n 'InlineChart',\r\n new PreferencesSubadapter({\r\n preferenceService: preferenceServicePromise,\r\n Resource: store.definitions.InlineChart,\r\n prefix: 'WebApp.CampaignUI.InlineChart',\r\n serialize,\r\n deserialize,\r\n })\r\n );\r\n }\r\n\r\n this.pathConfig = pathConfig;\r\n this.inlineChart = store.definitions.InlineChart;\r\n }\r\n\r\n /**\r\n * This function gets inline chart specific preference data, and returns\r\n * promise with resolved data. If key is injected as parameter, it will\r\n * return the speicific key value inside the inline chart preference\r\n * Otherwise, it returns all key/value pairs saved for inline charts.\r\n * @param {string} key to find in the inlinechart preference data\r\n * @param {string} project name under which preference will be stored\r\n * @returns {object} promise with set of key/values stored in preference\r\n */\r\n getInlineChartInfo(key = null, project = 'CampaignUI') {\r\n return this.inlineChart.findAll({\r\n where: { project },\r\n }).then((record) => {\r\n if (record.length === 0) {\r\n return Promise.resolve();\r\n }\r\n\r\n // Return the found record.\r\n const keyRecord = key ? record[0].inlineChartData[key] : record[0].inlineChartData;\r\n return Promise.resolve(keyRecord);\r\n });\r\n }\r\n\r\n /**\r\n * This function sets inline chart specific preference data, and returns\r\n * promise with resolved data. If provided key in passed parameter exists in preference\r\n * already, then it will update the value. Otherwise it will create a new key/value pair.\r\n * eg) setInlineChartInfo('{\r\n * 'Campaign-showChart': true,\r\n * }', 'CampaignUI')\r\n * @param {object} item that needs to be saved to perference store\r\n * @param {string} project name under which preference will be stored\r\n * @returns {object} key that is created/updated on preference service\r\n */\r\n setInlineChartInfo(item, project = 'CampaignUI') {\r\n return this.inlineChart.findAll({\r\n where: { project },\r\n }).then((record) => {\r\n if (record.length === 0) {\r\n // Create the new item.\r\n return this.inlineChart.create({ inlineChartData: item, project }, {\r\n path: this.pathConfig.get('odata.path'),\r\n });\r\n }\r\n\r\n const inlineChartInfo = _.result(record[0], 'inlineChartData');\r\n const newinlineChartInfo = _.extend({}, inlineChartInfo, item);\r\n\r\n return this.inlineChart.update(record[0].id, { inlineChartData: newinlineChartInfo });\r\n });\r\n }\r\n}\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\n/**\r\n * React component that renders chart label component. Chart label appears\r\n * below the highchart component and has the start and end dateranges.\r\n * @param {Bool} val - Properties used to render the component.\r\n * @returns {Element} React element.\r\n */\r\nexport class ChartLabel extends React.PureComponent {\r\n generateStyle = val => ({\r\n visibility: val ? 'visible' : 'hidden',\r\n });\r\n\r\n render() {\r\n this.startLabelRef = React.createRef();\r\n this.endLabelRef = React.createRef();\r\n return (\r\n
    \r\n
    \r\n \r\n {this.props.chartLabelData.primaryStartDate}\r\n
    \r\n \r\n {this.props.chartLabelData.primaryEndDate}\r\n
    \r\n
    \r\n { (this.props.isPopEnabled) &&\r\n
    \r\n \r\n {this.props.chartLabelData.comparisonStartDate}\r\n
    \r\n \r\n {this.props.chartLabelData.comparisonEndDate}\r\n
    \r\n
    \r\n }\r\n
    \r\n );\r\n }\r\n}\r\n\r\nChartLabel.propTypes = {\r\n /** Pop daterange is enabled/disabled */\r\n isPopEnabled: PropTypes.bool.isRequired,\r\n\r\n /**\r\n * Chart label parameters showing the start and end date for\r\n * primary metric series and comparison series.\r\n */\r\n chartLabelData: PropTypes.shape({\r\n primaryStartDate: PropTypes.string,\r\n primaryEndDate: PropTypes.string,\r\n comparisonStartDate: PropTypes.string,\r\n comparisonEndDate: PropTypes.string,\r\n }).isRequired,\r\n isShowStartDateLabel: PropTypes.bool.isRequired,\r\n isShowEndDateLabel: PropTypes.bool.isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { DropdownSelector } from '@bingads-webui-react/dropdown-selector';\r\n\r\nexport class MetricsPicker extends React.PureComponent {\r\n renderSelectedItem = (item) => {\r\n // Format the selected item content based on whether comparison data is being shown.\r\n const selectedItemDataDisplayClass = this.props.isPopOrMovingAvg ? 'show-selectedItem-percentage' : 'hide-selectedItem-percentage';\r\n\r\n return (\r\n
    \r\n
    {item.value}
    \r\n
    {this.props.selectedItemPercentage}
    \r\n
    \r\n );\r\n }\r\n\r\n render() {\r\n const comparisonMetricDisplayClass = this.props.isPopOrMovingAvg ? 'show-comparison-line' : 'hide-comparison-line';\r\n const selectedItem = _.findWhere(this.props.allMetrics, { id: this.props.selectedItem.id });\r\n\r\n const metricPickerAriaLabel = this.props.class === 'secondary-metric'\r\n ? this.props.i18n.getString('BI_Chart_SecondaryMetricPicker')\r\n : this.props.i18n.getString('BI_Chart_MetricPicker');\r\n\r\n return (\r\n
    \r\n
    \r\n \r\n \r\n
    \r\n (\r\n
  • \r\n {item.isFluctuation ?\r\n (\r\n
    \r\n \r\n {item.value}\r\n
    \r\n ) :\r\n ({item.value})}\r\n
  • \r\n )}\r\n i18n={this.props.i18n}\r\n dropdownMenuAriaLabel={metricPickerAriaLabel}\r\n enableArrowKeysSupport\r\n shouldFocusFirstFocusableItemOnMount\r\n />\r\n
    \r\n );\r\n }\r\n}\r\n\r\nMetricsPicker.propTypes = {\r\n allMetrics: PropTypes.arrayOf(PropTypes.shape({\r\n id: PropTypes.number.isRequired,\r\n value: PropTypes.string.isRequired,\r\n })).isRequired,\r\n onChangeHandler: PropTypes.func.isRequired,\r\n selectedItem: PropTypes.shape({\r\n id: PropTypes.number.isRequired,\r\n value: PropTypes.string.isRequired,\r\n }).isRequired,\r\n isPopOrMovingAvg: PropTypes.bool,\r\n selectedItemPercentage: PropTypes.string,\r\n class: PropTypes.string,\r\n /**\r\n * i18n for localization\r\n */\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n parseDecimal: PropTypes.func.isRequired,\r\n }).isRequired,\r\n};\r\n\r\nMetricsPicker.defaultProps = {\r\n isPopOrMovingAvg: false,\r\n selectedItemPercentage: '',\r\n class: 'metrics-picker',\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { DropdownSelector } from '@bingads-webui-react/dropdown-selector';\r\n\r\nexport class GranularityPicker extends React.PureComponent {\r\n render() {\r\n const selectedItem = (!_.isUndefined(this.props.selectedItem)) ?\r\n _.findWhere(this.props.allGranularities, { id: this.props.selectedItem.id }) :\r\n undefined;\r\n\r\n return (!_.isUndefined(this.props.selectedItem)) ? (\r\n
    \r\n \r\n
    \r\n ) : null;\r\n }\r\n}\r\n\r\nGranularityPicker.propTypes = {\r\n allGranularities: PropTypes.arrayOf(PropTypes.shape({\r\n id: PropTypes.number.isRequired,\r\n value: PropTypes.string.isRequired,\r\n })).isRequired,\r\n onChangeHandler: PropTypes.func.isRequired,\r\n selectedItem: PropTypes.shape({\r\n id: PropTypes.number.isRequired,\r\n value: PropTypes.string.isRequired,\r\n }),\r\n class: PropTypes.string,\r\n /**\r\n * i18n for localization\r\n */\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n parseDecimal: PropTypes.func.isRequired,\r\n }).isRequired,\r\n};\r\n\r\nGranularityPicker.defaultProps = {\r\n class: 'granularity-picker',\r\n selectedItem: undefined,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { MetricsPicker } from '@bingads-webui-campaign-react/metrics-picker';\r\nimport { GranularityPicker } from '@bingads-webui-campaign-react/granularity-picker';\r\nimport { HelpPopup } from '@bingads-webui-react/help-popup';\r\n\r\n/**\r\n * React component that renders a Chart Panel.\r\n * @param {Object} props - Properties used to render the component.\r\n * @returns {Element} React element.\r\n */\r\nexport class ChartPanel extends React.PureComponent {\r\n render() {\r\n // Moving average can be enabled but not active/used due to granularity not being daily.\r\n const isPopOrMovingAvg = (this.props.isMovingAverage && this.props.isMovingAverageVisible)\r\n || this.props.isPopEnabled;\r\n const vsString = this.props.i18n.getString('InlineChart_Metric_Vs');\r\n const showMovingAvgString = this.props.i18n.getString('BI_Chart_Show_MovingAverage');\r\n\r\n return (\r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n {vsString}\r\n
    \r\n \r\n
    \r\n\r\n \r\n {this.props.isMovingAverageVisible &&\r\n
    \r\n \r\n \r\n {showMovingAvgString}\r\n \r\n \r\n
    }\r\n
    \r\n
    \r\n );\r\n }\r\n}\r\n\r\nChartPanel.propTypes = {\r\n /** i18n */\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n\r\n /** If Pop and Moving average comparison are enabled */\r\n isPopEnabled: PropTypes.bool.isRequired,\r\n isMovingAverage: PropTypes.bool.isRequired,\r\n isMovingAverageVisible: PropTypes.bool.isRequired,\r\n /** Primary metric props used to drive the primary metric picker component */\r\n primaryMetric: PropTypes.shape({\r\n metricsList: PropTypes.arrayOf(PropTypes.shape({\r\n id: PropTypes.number.isRequired,\r\n value: PropTypes.string.isRequired,\r\n })).isRequired,\r\n selectedItem: PropTypes.shape({\r\n id: PropTypes.number.isRequired,\r\n value: PropTypes.string.isRequired,\r\n }).isRequired,\r\n percentage: PropTypes.string.isRequired,\r\n selectionChangeCallback: PropTypes.func.isRequired,\r\n }).isRequired,\r\n\r\n /** Secondary metric props used to drive the secondary metric picker component */\r\n secondaryMetric: PropTypes.shape({\r\n metricsList: PropTypes.arrayOf(PropTypes.shape({\r\n id: PropTypes.number.isRequired,\r\n value: PropTypes.string.isRequired,\r\n })).isRequired,\r\n selectedItem: PropTypes.shape({\r\n id: PropTypes.number.isRequired,\r\n value: PropTypes.string.isRequired,\r\n }).isRequired,\r\n percentage: PropTypes.string.isRequired,\r\n selectionChangeCallback: PropTypes.func.isRequired,\r\n }).isRequired,\r\n\r\n /** Granularity props used to drive the granularity picker component */\r\n granularity: PropTypes.shape({\r\n granularityList: PropTypes.arrayOf(PropTypes.shape({\r\n id: PropTypes.number.isRequired,\r\n value: PropTypes.string.isRequired,\r\n })).isRequired,\r\n selectedItem: PropTypes.shape({\r\n id: PropTypes.number.isRequired,\r\n value: PropTypes.string.isRequired,\r\n }).isRequired,\r\n selectionChangeCallback: PropTypes.func.isRequired,\r\n }).isRequired,\r\n\r\n /** moving average prop */\r\n movingAverageChangeCallback: PropTypes.func.isRequired,\r\n};\r\n","export const Defaults = {\r\n primaryMetricId: 1,\r\n secondaryMetricId: -1,\r\n granularity: 'Day',\r\n graunlarityId: 1,\r\n showMovingAverage: false,\r\n showChart: true,\r\n};\r\n\r\nconst originalPrimary = '#01188F';\r\nconst comparativePrimary = '#808CC7'; // 50% mix of originalPrimary and white\r\nconst originalSecondary = '#B40091';\r\nconst comparativeSecondary = '#D980C8'; // 50% mix of originalSecondary and white\r\n\r\nexport const seriesColor = {\r\n primary: {\r\n original: originalPrimary,\r\n comparative: comparativePrimary,\r\n },\r\n secondary: {\r\n original: originalSecondary,\r\n comparative: comparativeSecondary,\r\n },\r\n};\r\n","import _ from 'underscore';\r\nimport { seriesColor as defaultSeriesColor } from './constants';\r\n\r\nfunction uiNextTooltipPositioner(labelWidth, labelHeight, point) {\r\n const margin = 20;\r\n // reposition label so it does not go beyond chart bottom\r\n // a side effect is by doing this highchart gives up auto-positions x axis as well\r\n // so a similar calculation is done for x axis as well\r\n return {\r\n x: (point.plotX + labelWidth) > (this.chart.plotWidth + margin) ?\r\n (this.chart.plotWidth + margin) - labelWidth :\r\n point.plotX,\r\n y: (point.plotY + labelHeight) > (this.chart.plotHeight + margin) ?\r\n (this.chart.plotHeight + margin) - labelHeight :\r\n point.plotY,\r\n };\r\n}\r\n\r\nexport class ChartFormatter {\r\n /* eslint-disable no-param-reassign */\r\n setSeriesMarker(series, isMovingAverageOn) {\r\n _.each(series, (sery, index) => {\r\n let selectedSymbol;\r\n let selectedDashStyle;\r\n switch (index) {\r\n case 0:\r\n selectedSymbol = 'circle';\r\n selectedDashStyle = 'solid';\r\n break;\r\n // eslint-disable-next-line no-case-declarations\r\n case 1:\r\n // when there are 4 series, index 1 is always primary (circle dashed line)\r\n // either primary comparison or primary moving average\r\n // when there are only 2 series, index 1 could be either primary or secondary\r\n // 1. if it's primary comparison or primary moving average, style is circle dashed line\r\n // 2. if it's secondary, style is diamond solid line\r\n const isPrimary = isMovingAverageOn || (sery.id === 'primaryComparison');\r\n selectedSymbol = isPrimary ? 'circle' : 'diamond';\r\n selectedDashStyle = isPrimary ? 'ShortDash' : 'solid';\r\n break;\r\n case 2:\r\n selectedSymbol = 'diamond';\r\n selectedDashStyle = 'solid';\r\n break;\r\n case 3:\r\n selectedSymbol = 'diamond';\r\n selectedDashStyle = 'ShortDash';\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n sery.marker = {\r\n symbol: selectedSymbol,\r\n enabled: true,\r\n radius: 6,\r\n fillColor: sery.color,\r\n lineColor: '#FFFFFF',\r\n lineWidth: 2,\r\n };\r\n sery.dashStyle = selectedDashStyle;\r\n sery.lineWidth = 2;\r\n });\r\n }\r\n\r\n getRawDate = (date, i18n) => i18n.formatDate(date, { raw: 'MM/dd/yyyy' })\r\n\r\n getFormattedToolTip = (chartAdapter, options, seriesColor) => ({\r\n formatter() {\r\n const primaryPoints = [];\r\n const comparisonPoints = [];\r\n let tempHtml = '';\r\n _.each(this.points, (point) => {\r\n if (!_.isUndefined(point.series.userOptions)) {\r\n switch (point.series.userOptions.id) {\r\n case 'primary':\r\n point.id = options.primaryMetric.id;\r\n primaryPoints.push(point);\r\n break;\r\n case 'secondary':\r\n point.id = options.secondaryMetric.id;\r\n primaryPoints.push(point);\r\n break;\r\n case 'primaryComparison':\r\n point.id = options.primaryMetric.id;\r\n comparisonPoints.push(point);\r\n break;\r\n case 'secondaryComparison':\r\n point.id = options.secondaryMetric.id;\r\n comparisonPoints.push(point);\r\n break;\r\n default:\r\n break;\r\n }\r\n } else {\r\n // FIXME: using the color of a point is not a reliable way to find out its type.\r\n switch (point.color) {\r\n case seriesColor.primary.original:\r\n point.id = options.primaryMetric.id;\r\n primaryPoints.push(point);\r\n break;\r\n case seriesColor.secondary.original:\r\n point.id = options.secondaryMetric.id;\r\n primaryPoints.push(point);\r\n break;\r\n case seriesColor.primary.comparative:\r\n point.id = options.primaryMetric.id;\r\n comparisonPoints.push(point);\r\n break;\r\n case seriesColor.secondary.comparative:\r\n point.id = options.secondaryMetric.id;\r\n comparisonPoints.push(point);\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n });\r\n\r\n const getToolTipValueHtml = point => `
    ${chartAdapter.formatMetric(point.id, point.y)}
    `;\r\n\r\n if (primaryPoints.length > 0) {\r\n tempHtml = `
    ${primaryPoints[0].key}`;\r\n tempHtml = `${tempHtml}
    `;\r\n _.each(primaryPoints, (point, i) => {\r\n const divClass = (i === 0) ? 'primary' : 'primary-comparison';\r\n tempHtml = `${tempHtml}
    ${point.series.name} ${getToolTipValueHtml(point)}`;\r\n });\r\n tempHtml += '
    ';\r\n }\r\n\r\n if (comparisonPoints.length > 0) {\r\n tempHtml = options.isMovingAverageOn ?\r\n `${tempHtml}
    Moving average` :\r\n `${tempHtml}
    ${comparisonPoints[0].key}`;\r\n\r\n tempHtml = `${tempHtml}
    `;\r\n\r\n _.each(comparisonPoints, (point, i) => {\r\n const divClass = (i === 0) ? 'movingaverage' : 'movingaverage-comparison';\r\n tempHtml = `${tempHtml}
    ${point.series.name} ${getToolTipValueHtml(point)}`;\r\n });\r\n }\r\n tempHtml = `${tempHtml}
    `;\r\n\r\n return `
    ${tempHtml}
    `;\r\n },\r\n })\r\n\r\n getFormattedSeries = (id, name, color, chartAdapter, series, granularityId) => {\r\n const data = _.map(series, entry =>\r\n [chartAdapter.formatDate(entry[2], granularityId),\r\n entry[1]]);\r\n\r\n return {\r\n id,\r\n name,\r\n color,\r\n data,\r\n };\r\n }\r\n\r\n getFormattedHighChart = (chartAdapter, options, allData) => {\r\n const seriesColor = _.isEmpty(options.seriesColors) ? defaultSeriesColor : options.seriesColors;\r\n const chart = { height: 143, width: options.chartWidth };\r\n const series = [];\r\n const title = { text: '' };\r\n let tooltip = {};\r\n\r\n const primaryMetricName = _.isUndefined(options.primaryMetric) ?\r\n ''\r\n : options.primaryMetric.value;\r\n const secondaryMetricName = _.isUndefined(options.secondaryMetric) ?\r\n ''\r\n : options.secondaryMetric.value;\r\n\r\n let seriesIndex = 0;\r\n const primarySeries = _.isUndefined(options.primaryMetric) ?\r\n null\r\n : allData[options.primaryMetric.id];\r\n\r\n if (!(_.isNull(primarySeries) || _.isUndefined(primarySeries))) {\r\n series[seriesIndex] = this.getFormattedSeries(\r\n 'primary',\r\n primaryMetricName,\r\n seriesColor.primary.original,\r\n chartAdapter,\r\n primarySeries.PrimaryData,\r\n options.granularityId\r\n );\r\n\r\n if (!_.isUndefined(primarySeries.ComparisonData)) {\r\n seriesIndex += 1;\r\n series[seriesIndex] = this.getFormattedSeries(\r\n 'primaryComparison',\r\n primaryMetricName,\r\n seriesColor.primary.comparative,\r\n chartAdapter,\r\n primarySeries.ComparisonData,\r\n options.granularityId\r\n );\r\n }\r\n }\r\n\r\n const secondarySeries = (_.isUndefined(options.primaryMetric) ||\r\n (options.secondaryMetric.id === -1)) ?\r\n null\r\n : allData[options.secondaryMetric.id];\r\n\r\n if (!(_.isNull(secondarySeries) || _.isUndefined(secondarySeries))) {\r\n seriesIndex += 1;\r\n series[seriesIndex] = this.getFormattedSeries(\r\n 'secondary',\r\n secondaryMetricName,\r\n seriesColor.secondary.original,\r\n chartAdapter,\r\n secondarySeries.PrimaryData,\r\n options.granularityId\r\n );\r\n series[seriesIndex].yAxis = 1;\r\n\r\n if (!_.isUndefined(secondarySeries.ComparisonData)) {\r\n seriesIndex += 1;\r\n series[seriesIndex] = this.getFormattedSeries(\r\n 'secondaryComparison',\r\n secondaryMetricName,\r\n seriesColor.secondary.comparative,\r\n chartAdapter,\r\n secondarySeries.ComparisonData,\r\n options.granularityId\r\n );\r\n series[seriesIndex].yAxis = 1;\r\n }\r\n }\r\n\r\n this.setSeriesMarker(series, options.isMovingAverageOn);\r\n\r\n tooltip = this.getFormattedToolTip(chartAdapter, options, seriesColor);\r\n\r\n _.extend(tooltip, {\r\n positioner: uiNextTooltipPositioner,\r\n });\r\n\r\n return {\r\n chart,\r\n series,\r\n title,\r\n tooltip,\r\n };\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\nexport class ChartGranularityAdapter {\r\n constructor({ i18n, gridName, lowestSupportedGranularity } = {}) {\r\n this.i18n = i18n;\r\n this.gridName = gridName;\r\n this.granularityMap = [{\r\n id: 0,\r\n value: 'InlineChart_Granularity_Hourly',\r\n enumValue: 'Hour',\r\n disabled: false,\r\n dateFormat: { datetime: 'short' },\r\n }, {\r\n id: 1,\r\n value: 'InlineChart_Granularity_Daily',\r\n enumValue: 'Day',\r\n disabled: false,\r\n dateFormat: { skeleton: 'yMEd' },\r\n }, {\r\n id: 2,\r\n value: 'InlineChart_Granularity_Weekly',\r\n enumValue: 'Week',\r\n disabled: false,\r\n dateFormat: { skeleton: 'yMMMd' },\r\n }, {\r\n id: 3,\r\n value: 'InlineChart_Granularity_Monthly',\r\n enumValue: 'Month',\r\n disabled: false,\r\n dateFormat: { skeleton: 'yMMM' },\r\n }, {\r\n id: 4,\r\n value: 'InlineChart_Granularity_Quarterly',\r\n enumValue: 'Quarter',\r\n disabled: false,\r\n dateFormat: { skeleton: 'yQQQ' },\r\n }];\r\n this.lowestSupportedGranularity = lowestSupportedGranularity;\r\n }\r\n\r\n /**\r\n * Gets localized list of granularities for the current daterange.\r\n * @returns {object} localized list of granularity items as {id, value}\r\n */\r\n getGranularitiesList = () => _.reduce(this.granularityMap, (results, item) => {\r\n if (!item.disabled) {\r\n results.push({\r\n id: item.id,\r\n value: this.i18n.getString(item.value),\r\n });\r\n }\r\n return results;\r\n }, []);\r\n\r\n /**\r\n * Gets localized granularity item corresponding to the id.\r\n * @param {number} itemId - Id corresponding to the granularity item\r\n * @returns {object} localized list of granularity items as {id, value}\r\n */\r\n getGranularityItem = (itemId) => {\r\n if (itemId === undefined) {\r\n return itemId;\r\n }\r\n\r\n const item = _.findWhere(this.granularityMap, { id: itemId });\r\n return {\r\n id: item.id,\r\n value: this.i18n.getString(item.value),\r\n };\r\n };\r\n\r\n /**\r\n * Reconcile preferred granularity with available granularities.\r\n * @param {number} preferredId - granularity Id preference of the user\r\n * @returns {number} granularity id of the selected granularity\r\n */\r\n reconcileSelectedGranularity = (preferredId) => {\r\n const item = _.findWhere(this.granularityMap, { id: preferredId });\r\n\r\n // If the preferred granularity is not available for the current daterange, we fallback\r\n // to the lowest granularity level that is supported.\r\n if (!item || item.disabled) {\r\n return this.getLowestAvailableGranularityId();\r\n }\r\n\r\n // User preference is available in current granularity menu.\r\n return preferredId;\r\n };\r\n\r\n /**\r\n * Gets localized granularity item corresponding to the id.\r\n * @param {number} itemId - Id corresponding to the granularity item\r\n * @returns {object} localized list of granularity items as {id, value}\r\n */\r\n getLowestAvailableGranularityId = () => {\r\n const item = _.findWhere(this.granularityMap, { disabled: false });\r\n\r\n if (!item) {\r\n // All the granularities may be disabled (Eg. if current selected range is Today and\r\n // POP is same day last year, then only available granularity for Today which is 'hourly'\r\n // is not supported for period older than 6months rolling window. So in this case all\r\n // granularities will be in disabled state.)\r\n return undefined;\r\n }\r\n\r\n return item.id;\r\n };\r\n\r\n /**\r\n * Get the granularity item corresponding to the enum value.\r\n * (Enum value is being stored in the preference store.)\r\n * @param {string} enumVal - granularity enum\r\n * @returns {object} granularity item\r\n */\r\n getGranularityIdFromEnum = (enumVal) => {\r\n const item = _.findWhere(this.granularityMap, { enumValue: enumVal });\r\n return item.id;\r\n };\r\n\r\n /**\r\n * Get the granularity enum corresponding to the id value.\r\n * @param {number} itemId - granularity item id\r\n * @returns {object} granularity item\r\n */\r\n getGranularityEnumFromId = (itemId) => {\r\n const item = _.findWhere(this.granularityMap, { id: itemId });\r\n return item && item.enumValue;\r\n };\r\n\r\n /**\r\n * Set the granularity disabled status.\r\n * @param {number} itemId - granularity item id\r\n * @param {boolean} isDisabled flag\r\n * @returns {undefined}\r\n */\r\n setIsGranularityDisabled = (itemId, isDisabled) => {\r\n _.extend(_.findWhere(this.granularityMap, { id: itemId }), { disabled: isDisabled });\r\n };\r\n\r\n /**\r\n * Gets LDML date format corresponding to the granularity.\r\n * @param {number} itemId - granularity item id\r\n * @returns {object} LDML format option of granularity\r\n */\r\n getGranularityDateFormat = (itemId) => {\r\n const item = _.findWhere(this.granularityMap, { id: itemId });\r\n return item.dateFormat;\r\n };\r\n\r\n calculateDiff = (dateRange) => {\r\n if (dateRange) {\r\n const startDate = new Date(dateRange.start);\r\n const endDate = new Date(dateRange.end);\r\n const timeDiff = Math.abs(endDate.getTime() - startDate.getTime());\r\n\r\n return Math.round(timeDiff / (1000 * 3600 * 24));\r\n }\r\n return null;\r\n };\r\n\r\n calculateDisabled = (dateDiff, min, max) => dateDiff < min || dateDiff > max;\r\n\r\n updateAvailableGranularities = (dateRange) => {\r\n const mainDateDiff = this.calculateDiff(dateRange);\r\n const comparedDateDiff = this.calculateDiff(dateRange.compared);\r\n const now = new Date();\r\n // we only support hourly data for a sliding 6 months window\r\n const hourlyStartDate = new Date(now.setMonth(now.getMonth() - 6));\r\n // UP Smart Performance Grid doesn't support hourly per backend team\r\n let hourlyOptionDisabled = this.gridName === 'SmartPerformanceGrid' ||\r\n mainDateDiff > 0 ||\r\n (comparedDateDiff ? comparedDateDiff > 0 : false) ||\r\n !(dateRange.start > hourlyStartDate) ||\r\n !(dateRange.compared ? dateRange.compared.start > hourlyStartDate : true);\r\n\r\n if (this.lowestSupportedGranularity === 'Day') {\r\n hourlyOptionDisabled = true;\r\n }\r\n\r\n let dailyOptionDisabled = this.calculateDisabled(mainDateDiff, 1, 30) ||\r\n (comparedDateDiff ? this.calculateDisabled(comparedDateDiff, 1, 30) : false);\r\n\r\n if (this.lowestSupportedGranularity === 'Day') {\r\n dailyOptionDisabled = this.calculateDisabled(mainDateDiff, 0, 30) ||\r\n (comparedDateDiff ? this.calculateDisabled(comparedDateDiff, 0, 30) : false);\r\n }\r\n\r\n const weeklyOptionDisabled = this.calculateDisabled(mainDateDiff, 7, 210) ||\r\n (comparedDateDiff ? this.calculateDisabled(comparedDateDiff, 7, 210) : false);\r\n\r\n const monthlyOptionDisabled = this.calculateDisabled(mainDateDiff, 31, 900) ||\r\n (comparedDateDiff ? this.calculateDisabled(comparedDateDiff, 31, 900) : false);\r\n\r\n const quarterlyOptionDisabled = this.calculateDisabled(mainDateDiff, 90, Infinity) ||\r\n (comparedDateDiff ? this.calculateDisabled(comparedDateDiff, 90, Infinity) : false);\r\n\r\n this.setIsGranularityDisabled(0, hourlyOptionDisabled);\r\n this.setIsGranularityDisabled(1, dailyOptionDisabled);\r\n this.setIsGranularityDisabled(2, weeklyOptionDisabled);\r\n this.setIsGranularityDisabled(3, monthlyOptionDisabled);\r\n this.setIsGranularityDisabled(4, quarterlyOptionDisabled);\r\n };\r\n}\r\n","import _ from 'underscore';\r\nimport { partialConversionPairs } from '@bingads-webui-campaign/column-conversions';\r\n\r\nconst MetricNone = { id: -1, value: 'InlineChart_Metric_None', name: 'none' };\r\nconst stringNaN = '-';\r\n\r\nexport const ImpressionsID = 5;\r\nexport const ClicksID = 1;\r\nexport const SpentID = 6;\r\nexport const ConvID = 3;\r\nexport const PartialConvID = 34;\r\nexport const EventsID = 44;\r\nexport const VideoMetricColumns = [\r\n 'VideoViews',\r\n 'ViewThroughRate',\r\n 'AverageCPV',\r\n 'TotalWatchTimeInMS',\r\n 'AverageWatchTimePerImpression',\r\n 'AverageWatchTimePerVideoView',\r\n 'VideoViewsAt25Percent',\r\n 'VideoViewsAt50Percent',\r\n 'VideoViewsAt75Percent',\r\n 'CompletedVideoViews',\r\n 'VideoCompletionRate',\r\n];\r\n\r\nexport class ChartMetricsAdapter {\r\n constructor(i18n, campaignType) {\r\n this.i18n = i18n;\r\n this.campaignType = campaignType;\r\n this.metricsMap = [{\r\n id: ClicksID,\r\n value: 'ColumnName_Clicks',\r\n name: 'Clicks',\r\n formatter: this.formatToInteger,\r\n }, {\r\n id: 0,\r\n value: 'ColumnName_CostPerConversion',\r\n name: 'AverageCPC',\r\n formatter: this.formatCurrency,\r\n }, {\r\n id: 2,\r\n value: 'ColumnName_CPA',\r\n name: 'CPA',\r\n formatter: this.formatCurrency,\r\n }, {\r\n id: ConvID,\r\n value: 'ColumnName_Conversions',\r\n name: 'Conversions',\r\n formatter: this.formatToInteger,\r\n }, {\r\n id: 4,\r\n value: 'ColumnName_CTR',\r\n name: 'ClickThruRate',\r\n metricName: 'CTR',\r\n formatter: this.formatTo2DigitsPercent,\r\n }, {\r\n id: ImpressionsID,\r\n value: 'TrendAreaChart_AxisY',\r\n name: 'Impressions',\r\n formatter: this.formatToInteger,\r\n }, {\r\n id: SpentID,\r\n value: 'ColumnName_Spend',\r\n name: 'Spent',\r\n metricName: 'Spend',\r\n formatter: this.formatCurrency,\r\n }, {\r\n id: 7,\r\n value: 'Chart_AvgPosition',\r\n name: 'AveragePosition',\r\n formatter: this.formatTo2Digits,\r\n }, {\r\n id: 8,\r\n value: 'ColumnName_TopImpressionRate',\r\n name: 'TopImpressionRate',\r\n formatter: this.formatTo2DigitsPercent,\r\n }, {\r\n id: 9,\r\n value: 'ColumnName_AbsoluteTopImpressionRate',\r\n name: 'AbsoluteTopImpressionRate',\r\n formatter: this.formatTo2DigitsPercent,\r\n }, {\r\n id: 10,\r\n value: 'ColumnName_ConversionRate',\r\n name: 'ConversionRate',\r\n formatter: this.formatTo2DigitsPercent,\r\n }, {\r\n id: 11,\r\n value: 'ColumnName_Revenue',\r\n name: 'AdvertiserReportedRevenue',\r\n formatter: this.formatCurrency,\r\n }, {\r\n id: 12,\r\n value: 'ColumnName_ROAS',\r\n name: 'RevenueOnAdSpend',\r\n formatter: this.formatTo2DigitsPercent,\r\n }, {\r\n id: 13,\r\n value: 'ColumnName_AllConversionCPA',\r\n name: 'AllConversionCPA',\r\n formatter: this.formatCurrency,\r\n }, {\r\n id: 14,\r\n value: 'ColumnName_AllConversions',\r\n name: 'AllConversions',\r\n formatter: this.formatToInteger,\r\n }, {\r\n id: 15,\r\n value: 'ColumnName_AllConversionRate',\r\n name: 'AllConversionRate',\r\n formatter: this.formatTo2DigitsPercent,\r\n }, {\r\n id: 16,\r\n value: 'ColumnName_AllConversionAdvertiserReportedRevenue',\r\n name: 'AllConversionAdvertiserReportedRevenue',\r\n formatter: this.formatCurrency,\r\n }, {\r\n id: 17,\r\n value: 'ColumnName_AllConversionRevenueOnAdSpend',\r\n name: 'AllConversionRevenueOnAdSpend',\r\n formatter: this.formatTo2DigitsPercent,\r\n }, {\r\n id: 18,\r\n value: 'ColumnName_ViewThroughConversions',\r\n name: 'ViewThroughConversions',\r\n formatter: this.formatToInteger,\r\n }, {\r\n id: 19,\r\n value: 'ColumnName_VideoViews',\r\n name: 'VideoViews',\r\n formatter: this.formatToInteger,\r\n }, {\r\n id: 20,\r\n value: 'ColumnName_ViewThroughRate',\r\n name: 'ViewThroughRate',\r\n formatter: this.formatTo2DigitsPercent,\r\n }, {\r\n id: 21,\r\n value: 'ColumnName_AverageCPV',\r\n name: 'AverageCPV',\r\n formatter: this.formatCurrency,\r\n }, {\r\n id: 22,\r\n value: 'ColumnName_TotalWatchTimeInMS',\r\n name: 'TotalWatchTimeInMS',\r\n formatter: this.formatThousandthTo2Digits,\r\n }, {\r\n id: 23,\r\n value: 'ColumnName_AverageWatchTimePerImpression',\r\n name: 'AverageWatchTimePerImpression',\r\n formatter: this.formatTo2Digits,\r\n }, {\r\n id: 24,\r\n value: 'ColumnName_AverageWatchTimePerVideoView',\r\n name: 'AverageWatchTimePerVideoView',\r\n formatter: this.formatTo2Digits,\r\n }, {\r\n id: 25,\r\n value: 'ColumnName_VideoViewsAt25Percent',\r\n name: 'VideoViewsAt25Percent',\r\n formatter: this.formatToInteger,\r\n }, {\r\n id: 26,\r\n value: 'ColumnName_VideoViewsAt50Percent',\r\n name: 'VideoViewsAt50Percent',\r\n formatter: this.formatToInteger,\r\n }, {\r\n id: 27,\r\n value: 'ColumnName_VideoViewsAt75Percent',\r\n name: 'VideoViewsAt75Percent',\r\n formatter: this.formatToInteger,\r\n }, {\r\n id: 28,\r\n value: 'ColumnName_CompletedVideoViews',\r\n name: 'CompletedVideoViews',\r\n formatter: this.formatToInteger,\r\n }, {\r\n id: 29,\r\n value: 'ColumnName_VideoCompletionRate',\r\n name: 'VideoCompletionRate',\r\n formatter: this.formatTo2DigitsPercent,\r\n }, {\r\n id: 30,\r\n value: 'ColumnName_ViewThroughConversionsRevenue',\r\n name: 'ViewThroughConversionsRevenue',\r\n formatter: this.formatTo2Digits,\r\n }, {\r\n id: 31,\r\n value: 'ColumnName_ViewThroughConversionsCPA',\r\n name: 'ViewThroughConversionsCPA',\r\n formatter: this.formatTo2Digits,\r\n }, {\r\n id: 32,\r\n value: 'ColumnName_ViewThroughConversionsReturnOnAdSpend',\r\n name: 'ViewThroughConversionsReturnOnAdSpend',\r\n formatter: this.formatTo2DigitsPercent,\r\n }, {\r\n id: 33,\r\n value: 'ColumnName_ViewThroughConversionsRate',\r\n name: 'ViewThroughConversionsRate',\r\n formatter: this.formatTo2DigitsPercent,\r\n }, {\r\n id: PartialConvID,\r\n value: 'ColumnName_ConversionsCredit',\r\n name: 'ConversionsCredit',\r\n formatter: this.formatTo2Digits,\r\n }, {\r\n id: 35,\r\n value: 'ColumnName_AllConversionsCredit',\r\n name: 'AllConversionsCredit',\r\n formatter: this.formatTo2Digits,\r\n }, {\r\n id: 36,\r\n value: 'ColumnName_ViewThroughConversionsCredit',\r\n name: 'ViewThroughConversionsCredit',\r\n formatter: this.formatTo2Digits,\r\n }, {\r\n id: 37,\r\n value: 'ColumnName_PartialConversionCPA',\r\n name: 'PartialConversionCPA',\r\n formatter: this.formatCurrency,\r\n }, {\r\n id: 38,\r\n value: 'ColumnName_PartialConversionRate',\r\n name: 'PartialConversionRate',\r\n formatter: this.formatTo2DigitsPercent,\r\n }, {\r\n id: 39,\r\n value: 'ColumnName_AllPartialConversionCPA',\r\n name: 'AllPartialConversionCPA',\r\n formatter: this.formatCurrency,\r\n }, {\r\n id: 40,\r\n value: 'ColumnName_AllPartialConversionRate',\r\n name: 'AllPartialConversionRate',\r\n formatter: this.formatTo2DigitsPercent,\r\n }, {\r\n id: 41,\r\n value: 'ColumnName_ViewThroughPartialConversionsCPA',\r\n name: 'ViewThroughPartialConversionsCPA',\r\n formatter: this.formatTo2Digits,\r\n }, {\r\n id: 42,\r\n value: 'ColumnName_ViewThroughPartialConversionsRate',\r\n name: 'ViewThroughPartialConversionsRate',\r\n formatter: this.formatTo2DigitsPercent,\r\n }, {\r\n id: 43,\r\n value: 'ColumnName_AverageCPM',\r\n name: 'AverageCPM',\r\n formatter: this.formatCurrency,\r\n }, {\r\n id: 44,\r\n value: 'UETTags_Event_Grid_ColumnEvents',\r\n name: 'Events',\r\n formatter: this.formatToInteger,\r\n }, {\r\n id: 45,\r\n value: 'ColumnName_AverageCPS',\r\n name: 'AverageCPS',\r\n formatter: this.formatCurrency,\r\n }, {\r\n id: 46,\r\n value: 'ColumnName_SalesCount',\r\n name: 'SalesCount',\r\n formatter: this.formatToInteger,\r\n }, {\r\n id: 47,\r\n value: 'ColumnName_Installs',\r\n name: 'Installs',\r\n formatter: this.formatToInteger,\r\n }, {\r\n id: 48,\r\n value: 'ColumnName_CostPerInstall',\r\n name: 'CostPerInstall',\r\n formatter: this.formatCurrency,\r\n }, {\r\n id: 49,\r\n value: 'ColumnName_RevenuePerInstall',\r\n name: 'RevenuePerInstall',\r\n formatter: this.formatCurrency,\r\n },\r\n {\r\n id: 50,\r\n value: 'ColumnName_AdvertiserReportedRevenueAdjustment',\r\n name: 'AdvertiserReportedRevenueAdjustment',\r\n formatter: this.formatTo2Digits,\r\n },\r\n {\r\n id: 51,\r\n value: 'ColumnName_ViewThroughConversionsRevenueAdjustment',\r\n name: 'ViewThroughConversionsRevenueAdjustment',\r\n formatter: this.formatTo2Digits,\r\n },\r\n {\r\n id: 52,\r\n value: 'ColumnName_AllConversionAdvertiserReportedRevenueAdjustment',\r\n name: 'AllConversionAdvertiserReportedRevenueAdjustment',\r\n formatter: this.formatTo2Digits,\r\n },\r\n {\r\n id: 53,\r\n value: 'ColumnName_Downloads',\r\n name: 'Downloads',\r\n formatter: this.formatToInteger,\r\n },\r\n {\r\n id: 54,\r\n value: 'ColumnName_PostClickDownloadRate',\r\n name: 'PostClickDownloadRate',\r\n formatter: this.formatTo2DigitsPercent,\r\n },\r\n {\r\n id: 55,\r\n value: 'ColumnName_CostPerDownload',\r\n name: 'CostPerDownload',\r\n formatter: this.formatCurrency,\r\n },\r\n {\r\n id: 56,\r\n value: 'ColumnName_FirstLaunches',\r\n name: 'FirstLaunches',\r\n formatter: this.formatToInteger,\r\n },\r\n {\r\n id: 57,\r\n value: 'ColumnName_PostClickFirstLaunchRate',\r\n name: 'PostClickFirstLaunchRate',\r\n formatter: this.formatTo2DigitsPercent,\r\n },\r\n {\r\n id: 58,\r\n value: 'ColumnName_CostPerFirstLaunch',\r\n name: 'CostPerFirstLaunch',\r\n formatter: this.formatCurrency,\r\n },\r\n {\r\n id: 59,\r\n value: 'ColumnName_Purchases',\r\n name: 'Purchases',\r\n formatter: this.formatToInteger,\r\n },\r\n {\r\n id: 60,\r\n value: 'ColumnName_PostInstallPurchaseRate',\r\n name: 'PostInstallPurchaseRate',\r\n formatter: this.formatTo2DigitsPercent,\r\n },\r\n {\r\n id: 61,\r\n value: 'ColumnName_CostPerPurchase',\r\n name: 'CostPerPurchase',\r\n formatter: this.formatCurrency,\r\n },\r\n {\r\n id: 62,\r\n value: 'ColumnName_Subscriptions',\r\n name: 'Subscriptions',\r\n formatter: this.formatToInteger,\r\n },\r\n {\r\n id: 63,\r\n value: 'ColumnName_PostInstallSubscriptionRate',\r\n name: 'PostInstallSubscriptionRate',\r\n formatter: this.formatTo2DigitsPercent,\r\n },\r\n {\r\n id: 64,\r\n value: 'ColumnName_CostPerSubscription',\r\n name: 'CostPerSubscription',\r\n formatter: this.formatCurrency,\r\n },\r\n\r\n ];\r\n }\r\n\r\n /**\r\n * Gets localized list of metrics.\r\n * @param {boolean} hasNone - flag whether to include none in metriclist\r\n * @param {boolean} IsAllConvEnabled - flag whether all conv metrics enabled\r\n * @param {boolean} IsViewThroughConversionsEnabled - flag whether ViewThroughConversions enabled\r\n * @param {string} currentEntity - the current entity of the page\r\n * @returns {object} localized list of metric items as {id, value}\r\n */\r\n getMetricsList = ({\r\n hasNone = false,\r\n IsViewThroughConversionEnabled = false,\r\n IsAvgPositionDeprecationPhase1Enabled = false,\r\n IsAvgPositionDeprecationPhase2Enabled = false,\r\n IsVideoAdsForCampaignEnabled = false,\r\n IsVideoMetricsInPerformanceChartEnabled = false,\r\n IsViewThroughConversionsRevenueEnabled = false,\r\n dynamic: {\r\n ColumnConversion: IsColumnConversionEnabled,\r\n PartialConversions: IsPartialConversionsEnabled,\r\n CPSReporting: isCPSReportingEnabled,\r\n InstallPerformanceColumns,\r\n ConvValueRules: IsConvValueRulesEnabled,\r\n AppCampaignNewCampaignGridColumns,\r\n } = {},\r\n metricsFilter = null,\r\n customMetricNameList = [],\r\n currentEntity,\r\n } = {}) => {\r\n const isAppCampaign = AppCampaignNewCampaignGridColumns && (this.campaignType === 128 || this.campaignType === 'App');\r\n const isAllCampaigns = AppCampaignNewCampaignGridColumns && this.campaignType === 65535;\r\n let metricsList;\r\n if (customMetricNameList.length > 0) {\r\n const customMetrics = _.filter(this.metricsMap, metric => _.contains(customMetricNameList, metric.name));\r\n if (hasNone) {\r\n metricsList = [MetricNone, ...customMetrics];\r\n } else {\r\n metricsList = customMetrics;\r\n }\r\n return _.chain(metricsList)\r\n .map(item => ({\r\n id: item.id,\r\n value: this.i18n.getString(item.value),\r\n name: item.name,\r\n }))\r\n .value();\r\n }\r\n if (hasNone) {\r\n metricsList = [MetricNone, ...this.metricsMap];\r\n } else {\r\n metricsList = this.metricsMap;\r\n }\r\n\r\n const rejectionPredicates = [];\r\n const rejectedNames = [];\r\n\r\n if (!IsViewThroughConversionEnabled) {\r\n rejectedNames.push('ViewThroughConversions');\r\n rejectedNames.push('ViewThroughConversionsCredit');\r\n }\r\n\r\n if (!IsViewThroughConversionsRevenueEnabled) {\r\n rejectedNames.push(...[\r\n 'ViewThroughConversionsRevenue',\r\n 'ViewThroughConversionsCPA',\r\n 'ViewThroughPartialConversionsCPA',\r\n 'ViewThroughConversionsReturnOnAdSpend',\r\n 'ViewThroughConversionsRate',\r\n 'ViewThroughPartialConversionsRate',\r\n ]);\r\n }\r\n\r\n if (!IsAvgPositionDeprecationPhase1Enabled) {\r\n rejectedNames.push(...[\r\n 'TopImpressionRate',\r\n 'AbsoluteTopImpressionRate',\r\n ]);\r\n }\r\n\r\n if (IsAvgPositionDeprecationPhase2Enabled) {\r\n rejectedNames.push('AveragePosition');\r\n }\r\n\r\n if (!(IsVideoAdsForCampaignEnabled && IsVideoMetricsInPerformanceChartEnabled)) {\r\n rejectedNames.push(...VideoMetricColumns);\r\n }\r\n\r\n if (!IsVideoAdsForCampaignEnabled) {\r\n rejectedNames.push('AverageCPM');\r\n }\r\n\r\n if (!isCPSReportingEnabled) {\r\n rejectedNames.push(...[\r\n 'AverageCPS',\r\n 'SalesCount',\r\n ]);\r\n }\r\n\r\n if (!InstallPerformanceColumns) {\r\n rejectedNames.push(...[\r\n 'Installs',\r\n 'CostPerInstall',\r\n 'RevenuePerInstall',\r\n ]);\r\n }\r\n\r\n if (!IsConvValueRulesEnabled) {\r\n rejectedNames.push(...[\r\n 'AdvertiserReportedRevenueAdjustment',\r\n 'ViewThroughConversionsRevenueAdjustment',\r\n 'AllConversionAdvertiserReportedRevenueAdjustment',\r\n ]);\r\n }\r\n\r\n if (!isAppCampaign) {\r\n rejectedNames.push(...[\r\n 'PostClickDownloadRate',\r\n 'CostPerDownload',\r\n 'PostClickFirstLaunchRate',\r\n 'Purchases',\r\n 'PostInstallPurchaseRate',\r\n 'CostPerPurchase',\r\n 'Subscriptions',\r\n 'PostInstallSubscriptionRate',\r\n 'CostPerSubscription',\r\n ]);\r\n }\r\n\r\n if ((!isAllCampaigns && !isAppCampaign) || currentEntity !== 'Campaign') {\r\n rejectedNames.push(...[\r\n 'Downloads',\r\n 'FirstLaunches',\r\n 'CostPerFirstLaunch',\r\n ]);\r\n }\r\n\r\n\r\n rejectedNames.push('Events');\r\n\r\n rejectedNames.push(...IsColumnConversionEnabled && IsPartialConversionsEnabled ?\r\n _.keys(partialConversionPairs) :\r\n _.values(partialConversionPairs));\r\n\r\n if (!_.isEmpty(rejectedNames)) {\r\n rejectionPredicates.push(metric => _.contains(rejectedNames, metric.name));\r\n }\r\n\r\n if (_.isFunction(metricsFilter)) {\r\n rejectionPredicates.push(_.negate(metricsFilter));\r\n }\r\n\r\n const rejectionPredicate = value => _.any(rejectionPredicates, predicate => predicate(value));\r\n return _.chain(metricsList)\r\n .reject(rejectionPredicate)\r\n .map(item => ({\r\n id: item.id,\r\n value: this.i18n.getString(item.value),\r\n name: item.name,\r\n }))\r\n .value();\r\n };\r\n\r\n /**\r\n * Gets localized metric item corresponding to the id.\r\n * @param {number} itemId - Id corresponding to the metric item\r\n * @returns {object} localized list of metric items as {id, value}\r\n */\r\n getMetricItem = (itemId) => {\r\n const metricsList = [MetricNone, ...this.metricsMap];\r\n const item = _.findWhere(metricsList, { id: itemId });\r\n return {\r\n id: item.id,\r\n value: this.i18n.getString(item.value),\r\n name: item.name,\r\n };\r\n };\r\n\r\n /**\r\n * Gets localized metric name corresponding to the id.\r\n * @param {number} itemId - Id corresponding to the metric item\r\n * @returns {string} name of the metric\r\n */\r\n getMetricNameFromId = (itemId) => {\r\n const metricsList = [MetricNone, ...this.metricsMap];\r\n const item = _.findWhere(metricsList, { id: itemId });\r\n return item.metricName ? item.metricName : item.name;\r\n };\r\n\r\n /**\r\n * Gets localized metric item corresponding to the id.\r\n * @param {string} metricName - string representing internal name of the metric\r\n * @returns {number} id of the metric\r\n */\r\n getMetricIdFromName = (metricName) => {\r\n const metricsList = [MetricNone, ...this.metricsMap];\r\n const item = _.findWhere(metricsList, { name: metricName });\r\n return item ? item.id : -1;\r\n };\r\n\r\n /**\r\n * Gets formatter corresponding to the id.\r\n * @param {number} itemId - Id corresponding to the metric item\r\n * @returns {number} id of the metric\r\n */\r\n getMetricFormatter = (itemId) => {\r\n const item = _.findWhere(this.metricsMap, { id: itemId });\r\n return item.formatter;\r\n };\r\n\r\n /**\r\n * Format to integer value.\r\n *\r\n * @private\r\n * @param {number} number - value to be formatted\r\n * @param {options} options - format options\r\n * @returns {number} number with 2 digit fraction\r\n */\r\n formatToInteger = (number, options) => (_.isNumber(number) ?\r\n this.i18n.formatDecimal(number, _.extend({\r\n maximumFractionDigits: 0,\r\n minimumFractionDigits: 0,\r\n }, options)) :\r\n stringNaN);\r\n\r\n /**\r\n * Format to 2 fraction Digit value.\r\n *\r\n * @private\r\n * @param {number} number - value to be formatted\r\n * @param {options} options - format options (Eg. {compact: short, maximumFractionDigits: 0})\r\n * @returns {number} number with 2 digit fraction\r\n */\r\n formatTo2Digits = (number, options) => (_.isNumber(number) ?\r\n this.i18n.formatDecimal(number, _.extend({\r\n maximumFractionDigits: 2,\r\n minimumFractionDigits: 2,\r\n }, options)) :\r\n stringNaN);\r\n\r\n\r\n /**\r\n * Format to 2 fraction Digit value after dividing by 1000\r\n *\r\n * @private\r\n * @param {number} number - value to be formatted\r\n * @param {options} options - format options (Eg. {compact: short, maximumFractionDigits: 0})\r\n * @returns {number} number with 2 digit fraction\r\n */\r\n formatThousandthTo2Digits = (number, options) => (_.isNumber(number) ?\r\n this.i18n.formatDecimal(number / 1000, _.extend({\r\n maximumFractionDigits: 2,\r\n minimumFractionDigits: 2,\r\n }, options)) :\r\n stringNaN);\r\n\r\n /**\r\n * Format to 2 fraction Digit percentage value.\r\n *\r\n * @private\r\n * @param {number} number - value to be formatted\r\n * @param {options} options - format options (Eg. {compact: short, maximumFractionDigits: 0})\r\n * @returns {number} number with 2 digit fraction percentage\r\n */\r\n formatTo2DigitsPercent = (number, options) => (_.isNumber(number) ?\r\n this.i18n.formatPercent(number / 100, _.extend({\r\n maximumFractionDigits: 2,\r\n minimumFractionDigits: 2,\r\n }, options)) :\r\n stringNaN);\r\n\r\n /**\r\n * Format to global account's currency code.\r\n *\r\n * @private\r\n * @param {number} number - value to be formatted\r\n * @param {options} options - format options (Eg. {compact: short, maximumFractionDigits: 0})\r\n * @returns {number} number in currency format.\r\n */\r\n formatCurrency = (number, options) => (_.isNumber(number) ?\r\n // use global (account's) currency code\r\n this.i18n.formatCurrency(number, undefined, options) :\r\n stringNaN);\r\n}\r\n","import _ from 'underscore';\r\nimport { partialConversionPairs } from '@bingads-webui-campaign/column-conversions';\r\nimport { Defaults } from './constants';\r\nimport { ChartGranularityAdapter } from './chart-granularity-adapter';\r\nimport { ChartMetricsAdapter } from './chart-metrics-adapter';\r\n\r\nconst patchPreference = (metricsMap, permissions = {}) => {\r\n const {\r\n ColumnConversion: IsColumnConversionEnabled,\r\n PartialConversions: IsPartialConversionsEnabled,\r\n } = permissions.dynamic || {};\r\n\r\n const metricsMapIdIndex = _.indexBy(metricsMap, 'id');\r\n const metricsMapNameIndex = _.indexBy(metricsMap, 'name');\r\n const conversionPropertyMap = IsPartialConversionsEnabled ?\r\n partialConversionPairs :\r\n _.invert(partialConversionPairs);\r\n\r\n return IsColumnConversionEnabled ?\r\n (srcMetricId) => {\r\n if (_.has(metricsMapIdIndex, srcMetricId)) {\r\n const srcMetricName = metricsMapIdIndex[srcMetricId].name;\r\n if (_.has(conversionPropertyMap, srcMetricName)) {\r\n const targetMetricName = conversionPropertyMap[srcMetricName];\r\n const targetMetricId = metricsMapNameIndex[targetMetricName].id;\r\n return targetMetricId;\r\n }\r\n }\r\n return srcMetricId;\r\n } :\r\n _.identity;\r\n};\r\n\r\nexport class ChartDataAdapter {\r\n constructor({\r\n i18n, permissions = {}, gridName, lowestSupportedGranularity, campaignType,\r\n } = {}) {\r\n this.i18n = i18n;\r\n this.campaignType = campaignType;\r\n this.granularityAdapter = new ChartGranularityAdapter({ i18n, gridName, lowestSupportedGranularity });\r\n this.metricsAdapter = new ChartMetricsAdapter(i18n, campaignType);\r\n ({\r\n ColumnConversion: this.IsColumnConversionEnabled,\r\n PartialConversions: this.IsPartialConversionsEnabled,\r\n InlineChartColumnMerticsEnabled: this.inlineChartColumnMerticsEnabled,\r\n } = permissions.dynamic || {});\r\n this.patchPreference = patchPreference(this.metricsAdapter.metricsMap, permissions);\r\n }\r\n\r\n /**\r\n * Gets chart title.\r\n * @param {object} state - sate instance to get the current level.\r\n * @returns {string} localized chart title.\r\n */\r\n getChartTitle = (state) => {\r\n let currentLevel = 'BI_Chart_AccountLevel';\r\n if (state.get('adgroup_id')) {\r\n currentLevel = 'BI_Chart_AdGroupLevel';\r\n } else if (state.get('campaign_id')) {\r\n currentLevel = 'BI_Chart_CampaignLevel';\r\n }\r\n return this.i18n.getString(currentLevel);\r\n };\r\n\r\n /**\r\n * Gets localized text for no data text.\r\n * @param {boolean} isError - flag to return error string\r\n * @returns {string} localized no data text\r\n */\r\n getNoDataText = (isError = false) => (isError ?\r\n this.i18n.getString('BI_Chart_Error') :\r\n this.i18n.getString('BI_Chart_NoData'));\r\n\r\n /**\r\n * @param {object} data - series data from which start and end data\r\n * @returns {object} first data item\r\n */\r\n getFirstDataItem = data => _.values(data)[0];\r\n\r\n /**\r\n * @param {object} dataItem data item\r\n * @returns {boolean} is dataItem.PrimaryData available\r\n */\r\n isPrimaryDataAvailable = dataItem =>\r\n _.isObject(dataItem)\r\n && _.isArray(dataItem.PrimaryData)\r\n && !_.isEmpty(dataItem.PrimaryData)\r\n && _.every(dataItem.PrimaryData, primaryDataItem => _.isArray(primaryDataItem));\r\n\r\n /**\r\n * @param {object} dataItem data item\r\n * @returns {boolean} is dataItem.ComparisonData available\r\n */\r\n isComparisonDataAvailable = dataItem =>\r\n _.isObject(dataItem)\r\n && _.isArray(dataItem.ComparisonData)\r\n && !_.isEmpty(dataItem.ComparisonData)\r\n && _.every(dataItem.ComparisonData, comparisonDataItem => _.isArray(comparisonDataItem));\r\n\r\n /**\r\n * Gets localized chart start and end date labels. By default the\r\n * show lables will be true and further after aligning fluctuation, if\r\n * fluctuation data overlaps with start/end date, date will be hidden.\r\n * @param {object} data - series data from which start and end data\r\n * to be shown in label is extracted.\r\n * @param {number} granularityId - Id of the current grain selection.\r\n * @returns {object} localized chart label\r\n */\r\n getChartLabel = (data, granularityId) => {\r\n const firstDataItem = this.getFirstDataItem(data);\r\n const isComparisonDataAvailable = this.isComparisonDataAvailable(firstDataItem);\r\n const xAxisStartDate = firstDataItem.PrimaryData[0][2];\r\n const xAxisEndDate = this.getLastAvailableDate(firstDataItem.PrimaryData);\r\n const xAxisCompareStartDate = isComparisonDataAvailable ?\r\n firstDataItem.ComparisonData[0][2] :\r\n '';\r\n const xAxisCompareEndDate = isComparisonDataAvailable ?\r\n this.getLastAvailableDate(firstDataItem.ComparisonData) :\r\n '';\r\n\r\n return {\r\n primaryStartDate: this.formatDate(xAxisStartDate, granularityId),\r\n primaryEndDate: this.formatDate(xAxisEndDate, granularityId),\r\n comparisonStartDate: this.formatDate(xAxisCompareStartDate, granularityId),\r\n comparisonEndDate: this.formatDate(xAxisCompareEndDate, granularityId),\r\n };\r\n };\r\n\r\n /**\r\n * Gets last available date.\r\n * @param {object} data - series data from which start and end data\r\n * to be shown in label is extracted.\r\n * @returns {string} - latest available date within given data\r\n */\r\n getLastAvailableDate(data) {\r\n if (!data[data.length - 1][2]) {\r\n for (let i = data.length - 1; i > -1; i -= 1) {\r\n if (data[i][2]) {\r\n return data[i][2];\r\n }\r\n }\r\n }\r\n return data[data.length - 1][2];\r\n }\r\n\r\n /**\r\n * Gets localized list of metrics.\r\n * @param {object} permission the Persission obj\r\n * @param {function} metricsFilter the filter function of metricsList\r\n * @param {object} customMetricNameList the custom metrics list\r\n * @param {string} currentEntity the current entity of the page\r\n * @returns {object} localized list of metric items as {id, value}\r\n */\r\n getPrimaryMetricsList = (permission = {}, metricsFilter = null, customMetricNameList = [], currentEntity) =>\r\n this.metricsAdapter.getMetricsList(_.extend(permission, {\r\n hasNone: false,\r\n metricsFilter,\r\n customMetricNameList,\r\n currentEntity,\r\n }));\r\n\r\n /**\r\n * Gets localized list of metrics with none.\r\n * @param {object} permission the Persission obj\r\n * @param {function} metricsFilter the filter function of metricsList\r\n * @param {object} customMetricNameList the custom metrics list\r\n * @param {string} currentEntity the current entity of the page\r\n * @returns {object} localized list of metric items as {id, value}\r\n */\r\n getSecondaryMetricsList = (permission = {}, metricsFilter = null, customMetricNameList = [], currentEntity) =>\r\n this.metricsAdapter.getMetricsList(_.extend(permission, {\r\n hasNone: true,\r\n metricsFilter,\r\n customMetricNameList,\r\n currentEntity,\r\n }));\r\n\r\n /**\r\n * Gets localized metric item corresponding to the id.\r\n * @param {number} id - Id corresponding to the metric item\r\n * @returns {object} localized list of metric items as {id, value}\r\n */\r\n getMetricItem = id => this.metricsAdapter.getMetricItem(id);\r\n\r\n /**\r\n * Gets localized metric name corresponding to the id.\r\n * @param {number} id - Id corresponding to the metric item\r\n * @returns {object} localized list of metric items as {id, value}\r\n */\r\n getMetricName = id => this.metricsAdapter.getMetricNameFromId(id);\r\n\r\n /**\r\n * Gets localized metric value formatted using i18n based formatters.\r\n * @param {number} id - Id corresponding to the metric item\r\n * @param {number} value - value of the metric\r\n * @param {object} options - i18n formatting options\r\n * @returns {object} localized list of metric items as {id, value}\r\n */\r\n formatMetric = (id, value, options = {}) => {\r\n const formatter = this.metricsAdapter.getMetricFormatter(id);\r\n return formatter(value, options);\r\n };\r\n\r\n /**\r\n * Gets localized granularity item corresponding to the id.\r\n * @param {number} id - Id corresponding to the granularity item\r\n * @returns {object} localized list of granularity items as {id, value}\r\n */\r\n getGranularitySelection = id => this.granularityAdapter.getGranularityItem(id);\r\n\r\n /**\r\n * Gets localized list of granularities for the current daterange.\r\n * @returns {object} localized list of granularity items as {id, value}\r\n */\r\n getGranularitiesList = () => this.granularityAdapter.getGranularitiesList();\r\n\r\n /**\r\n * Gets selected granularity item enum\r\n * @param {number} id - Id corresponding to the granularity item\r\n * @returns {object} localized list of granularity items as {id, value}\r\n */\r\n getGranularityEnum = id => this.granularityAdapter.getGranularityEnumFromId(id);\r\n\r\n /**\r\n * Gets UI preferences like selected metrics, show chart etc. from preference store.\r\n * If not found in the preference store, a default value will be returned.\r\n * @param {object} preference - preference store to be used to fetch data\r\n * @param {object} pageContext - pagecontext to be used to get the current tab name\r\n * @returns {object} object containing preferences and defaults\r\n */\r\n getPreferencesAndDefaults = (preference, pageContext) =>\r\n preference.getInlineChartInfo().then((preferenceObject) => {\r\n const showChartPref = _.result(\r\n preferenceObject,\r\n `${pageContext.CurrentTabId}-showChart`,\r\n Defaults.showChart\r\n );\r\n\r\n const showMovingAverageInPref = _.result(\r\n preferenceObject,\r\n `${pageContext.CurrentTabId}-showMovingAverage`,\r\n Defaults.showMovingAverage\r\n );\r\n\r\n const granularityEnumInPref = _.result(\r\n preferenceObject,\r\n `${pageContext.CurrentTabId}-granularity`,\r\n Defaults.granularity\r\n );\r\n const granularityIdInPref =\r\n this.granularityAdapter.getGranularityIdFromEnum(granularityEnumInPref);\r\n\r\n let primaryIdInPref = Defaults.primaryMetricId;\r\n if (this.IsColumnConversionEnabled) {\r\n const primaryMetricPrefKey = `${pageContext.CurrentTabId}-primaryMetric`;\r\n if (_.has(preferenceObject, primaryMetricPrefKey)) {\r\n primaryIdInPref =\r\n this.patchPreference(preferenceObject[primaryMetricPrefKey]);\r\n }\r\n } else {\r\n primaryIdInPref = _.result(\r\n preferenceObject,\r\n `${pageContext.CurrentTabId}-primaryMetric`,\r\n Defaults.primaryMetricId\r\n );\r\n }\r\n\r\n let secondaryIdInPref = Defaults.secondaryMetricId;\r\n if (this.IsColumnConversionEnabled) {\r\n const secondaryMetricPrefKey = `${pageContext.CurrentTabId}-secondaryMetric`;\r\n if (_.has(preferenceObject, secondaryMetricPrefKey)) {\r\n secondaryIdInPref =\r\n this.patchPreference(preferenceObject[secondaryMetricPrefKey]);\r\n }\r\n } else {\r\n secondaryIdInPref = _.result(\r\n preferenceObject,\r\n `${pageContext.CurrentTabId}-secondaryMetric`,\r\n Defaults.secondaryMetricId\r\n );\r\n }\r\n\r\n return {\r\n showChart: showChartPref,\r\n showMovingAverage: showMovingAverageInPref,\r\n granularityId: granularityIdInPref,\r\n primaryMetricId: primaryIdInPref,\r\n secondaryMetricId: secondaryIdInPref,\r\n };\r\n });\r\n\r\n /**\r\n * Re-evaluate granularity list and selection based on preference and current daterange.\r\n * @param {object} dateRange - daterange provided by date picker\r\n * @param {number} preferredGranularityId - Granularity Id from preference store\r\n * @returns {number} granularity Id to be used in current selection\r\n */\r\n reevaluateGranularity = (dateRange, preferredGranularityId) => {\r\n this.granularityAdapter.updateAvailableGranularities(dateRange);\r\n return this.granularityAdapter.reconcileSelectedGranularity(preferredGranularityId);\r\n };\r\n\r\n /**\r\n * Extracts and normalizes chart data based on individual metric information.\r\n * @param {object} rawData flag to return error string\r\n * @returns {string} localized no data text\r\n */\r\n prepareData = (rawData) => {\r\n const transformChartPoints = (series) => {\r\n const ret = {};\r\n\r\n const convertData = (point, isPrimaryData) => {\r\n if (isPrimaryData) {\r\n ret.PrimaryData = ret.PrimaryData || [];\r\n } else {\r\n ret.ComparisonData = ret.ComparisonData || [];\r\n }\r\n\r\n const utcPoint = point;\r\n // Because the data-time is based on campaign time zone by default,\r\n // ideally, the format of data-time string in OData response should not\r\n // contain time zone part. In case it does, we should remove it.\r\n // e.g. \"2016-11-11T00:00:00-08:00\" -> \"2016-11-11T00:00:00\"\r\n utcPoint.DateTime = point.DateTime.substring(0, 19);\r\n\r\n const dateTime = new Date(utcPoint.DateTime);\r\n\r\n if (isPrimaryData) {\r\n ret.PrimaryData.push([dateTime.getTime(), utcPoint.Value, point.DateTime]);\r\n } else {\r\n ret.ComparisonData.push([dateTime.getTime(), utcPoint.Value, utcPoint.DateTime]);\r\n }\r\n };\r\n\r\n _.each(series.PrimaryDataPoints, (point) => {\r\n convertData(point, true);\r\n });\r\n\r\n _.each(series.ComparisonDataPoints, (point) => {\r\n convertData(point, false);\r\n });\r\n\r\n return ret;\r\n };\r\n\r\n const ret = {};\r\n\r\n _.each(rawData, (series) => {\r\n if (!series) {\r\n return;\r\n }\r\n const metricId = this.metricsAdapter.getMetricIdFromName(series.MetricName);\r\n\r\n ret[metricId] = {};\r\n ret[metricId] = transformChartPoints(series);\r\n });\r\n\r\n return ret;\r\n };\r\n\r\n /**\r\n * Compares two series and fills all the smaller series with null.\r\n * This is used mostly in POP scenarios with custom date range where the data\r\n * points are either fewer or more than the primary series.\r\n * Comparison start date is aligned to primary series start date.\r\n * @param {object} dataSet - inline chart data\r\n * @param {string} granularity - current granularity selection\r\n * @returns {object} aligned data\r\n */\r\n alignDataForComparison = (dataSet, granularity) => {\r\n const keys = Object.keys(dataSet);\r\n\r\n _.each(keys, (key) => {\r\n const metricData = dataSet[key];\r\n\r\n if (metricData.PrimaryData &&\r\n metricData.ComparisonData &&\r\n metricData.PrimaryData.length !== metricData.ComparisonData.length) {\r\n const shortermetricData =\r\n metricData.PrimaryData.length > metricData.ComparisonData.length ?\r\n metricData.ComparisonData :\r\n metricData.PrimaryData;\r\n\r\n const longermetricData =\r\n metricData.PrimaryData.length < metricData.ComparisonData.length ?\r\n metricData.ComparisonData :\r\n metricData.PrimaryData;\r\n\r\n const diff = Math.abs(metricData.PrimaryData.length - metricData.ComparisonData.length);\r\n\r\n for (let i = 0; i < diff; i++) { // eslint-disable-line no-plusplus\r\n const diff1 = longermetricData[shortermetricData.length][0]\r\n - longermetricData[shortermetricData.length - 1][0];\r\n const dayAfter = shortermetricData[shortermetricData.length - 1][0] + diff1;\r\n\r\n shortermetricData.push([dayAfter, null]);\r\n }\r\n }\r\n\r\n // Current Mt returns last day of month, instead of first day of month.\r\n // Because last day of month\r\n if (granularity === 'Month' || granularity === 'Quarter') {\r\n const dayInMillisec = 60 * 60 * 24 * 1000;\r\n\r\n // eslint-disable-next-line no-plusplus\r\n for (let i = 0; i < metricData.PrimaryData.length - 1; i++) {\r\n const primaryDataDateDiff =\r\n (metricData.PrimaryData[i + 1][0] - metricData.PrimaryData[i][0]) / dayInMillisec;\r\n const comparisonDataDateDiff =\r\n (metricData.ComparisonData[i + 1][0] - metricData.ComparisonData[i][0]) / dayInMillisec;\r\n\r\n if (comparisonDataDateDiff > primaryDataDateDiff) {\r\n metricData.PrimaryData[i + 1][0] += dayInMillisec;\r\n } else if (comparisonDataDateDiff < primaryDataDateDiff) {\r\n metricData.ComparisonData[i + 1][0] += dayInMillisec;\r\n }\r\n }\r\n }\r\n });\r\n };\r\n\r\n formatDate = (timestamp, granularityId) => {\r\n // fix prod err: granularityId can be undefined due to Merged PR 789653\r\n if (_.isUndefined(granularityId)) {\r\n return '';\r\n }\r\n\r\n const options = this.granularityAdapter.getGranularityDateFormat(granularityId);\r\n\r\n if (timestamp && options) {\r\n if (_.isUndefined(this.dateParser)) {\r\n this.dateParser = this.i18n.dateParser({ raw: 'yyyy-MM-ddTHH:mm:ss' });\r\n }\r\n\r\n if (_.isUndefined(this.dateFormatters)) {\r\n this.dateFormatters = {};\r\n }\r\n\r\n let dateFormatter = this.dateFormatters[granularityId];\r\n if (_.isUndefined(dateFormatter)) {\r\n const formatter = this.i18n.dateFormatter(options);\r\n dateFormatter = _.compose(formatter, this.dateParser);\r\n this.dateFormatters[granularityId] = dateFormatter;\r\n }\r\n\r\n return dateFormatter(timestamp);\r\n }\r\n\r\n return '';\r\n };\r\n\r\n /**\r\n * Deep compares two dates based on start -end and comparison dates.\r\n * Expects the inputs to be the object returned by date picker.\r\n * @param {object} date1 - daterange object one to be compared\r\n * @param {object} date2 - dateRange object two to be compared\r\n * @returns {boolean} if date ranges are different.\r\n */\r\n isDateRangeChanged = (date1, date2) => {\r\n if ((date1 === date2) ||\r\n (_.isEmpty(date1) && _.isEmpty(date2))) {\r\n return false;\r\n }\r\n\r\n // Check if any one of the dateRange is undefined or empty\r\n if (!date1 || !date2 || _.isEmpty(date1) || _.isEmpty(date2)) {\r\n return true;\r\n }\r\n\r\n // Check if start and end dates are different\r\n if ((date1.start.getTime() !== date2.start.getTime()) ||\r\n (date1.end.getTime() !== date2.end.getTime())) {\r\n return true;\r\n }\r\n\r\n // Check if comparison dates are different\r\n if (date1.compared && date2.compared) {\r\n if ((date1.compared.start.getTime() !== date2.compared.start.getTime()) ||\r\n (date1.compared.end.getTime() !== date2.compared.end.getTime())) {\r\n return true;\r\n }\r\n }\r\n\r\n // Check if any one has comparison date\r\n if ((date1.compared && !date2.compared) ||\r\n (date2.compared && !date1.compared)) {\r\n return true;\r\n }\r\n\r\n return false;\r\n };\r\n\r\n getMetricsQuery = (primaryMetricSelectionId, secondaryMetricSelectionId) => {\r\n if (!this.inlineChartColumnMerticsEnabled) {\r\n return 'All';\r\n }\r\n const primaryMetricName = this.getMetricName(primaryMetricSelectionId);\r\n const secondaryMetricName = this.getMetricName(secondaryMetricSelectionId);\r\n const metricNames = _.chain([primaryMetricName, secondaryMetricName])\r\n .filter(name => name !== 'none')\r\n .uniq()\r\n .value();\r\n return metricNames.join(',');\r\n };\r\n\r\n formatPreferenceValue = (dateRange, preferenceValue) => {\r\n const granularityId = this.reevaluateGranularity(dateRange, preferenceValue.granularityId);\r\n if (_.isUndefined(granularityId)) {\r\n return;\r\n }\r\n const granularity = this.getGranularityEnum(granularityId);\r\n const metrics = this.getMetricsQuery(\r\n preferenceValue.primaryMetricId,\r\n preferenceValue.secondaryMetricId\r\n );\r\n const movingAverage = preferenceValue.showMovingAverage;\r\n // eslint-disable-next-line consistent-return\r\n return {\r\n Granularity: granularity,\r\n Metrics: metrics,\r\n MovingAverage: (!dateRange.compared) &&\r\n (granularityId === Defaults.graunlarityId) && movingAverage,\r\n };\r\n };\r\n}\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\n/**\r\n * React component that renders flucutation bulb component. Fluctuation bulb appears\r\n * below the highchart component.\r\n * @param {Bool} val - Properties used to render the component.\r\n * @returns {Element} React element.\r\n */\r\nexport class FluctuationBulb extends React.PureComponent {\r\n render() {\r\n this.bulbElem = React.createRef();\r\n const divStyle = {\r\n left: `${this.props.left}px`,\r\n };\r\n const { isRed, isYellow } = this.props;\r\n const normalClass = isYellow ? 'balloonYellow' : 'balloon';\r\n const balloonClass = isRed ? 'balloonUnknown' : normalClass;\r\n const balloonPic =
    ;\r\n\r\n return (\r\n
    \r\n {balloonPic}\r\n
    \r\n );\r\n }\r\n}\r\n\r\nFluctuationBulb.propTypes = {\r\n id: PropTypes.string.isRequired,\r\n isRed: PropTypes.bool.isRequired,\r\n isYellow: PropTypes.bool.isRequired,\r\n left: PropTypes.number.isRequired,\r\n};\r\n","export const instrumentationSchema = {\r\n scenario: [{\r\n name: 'inlineChart',\r\n value: 'inlineChart',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'inlineChartFilter',\r\n value: 'inlineChartFilter',\r\n },\r\n {\r\n name: 'inlineChartAction',\r\n value: 'inlineChartAction',\r\n },\r\n {\r\n name: 'inlineChartError',\r\n value: 'inlineChartError',\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 { FluctuationPopup, FluctuationTypeKey, FluctuationType } from '@bingads-webui-campaign-react/fluctuation-popup';\r\nimport { ChartDataAdapter } from './chart-data-adapter';\r\nimport { FluctuationBulb } from './fluctuation-bulb';\r\nimport { instrumentationSchema } from './inline-chart-instr-schema';\r\nimport { ImpressionsID, ClicksID, SpentID, ConvID, PartialConvID } from './chart-metrics-adapter';\r\n\r\nfunction getFluctuationType(metricId) {\r\n switch (metricId) {\r\n case ImpressionsID:\r\n return FluctuationType[FluctuationTypeKey.Impression];\r\n case ClicksID:\r\n return FluctuationType[FluctuationTypeKey.Click];\r\n case SpentID:\r\n return FluctuationType[FluctuationTypeKey.Spend];\r\n case ConvID:\r\n case PartialConvID:\r\n return FluctuationType[FluctuationTypeKey.Conv];\r\n default:\r\n return null;\r\n }\r\n}\r\n\r\nexport class FluctuationPanel extends React.PureComponent {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.initializeInstrumentation();\r\n this.chartDataAdapter = new ChartDataAdapter({\r\n i18n: this.props.deps.i18n,\r\n permissions: this.props.deps.context.Permissions,\r\n });\r\n this.bulbRefArr = [];\r\n\r\n this.state = {\r\n chart: null,\r\n openedFlucId: null,\r\n };\r\n }\r\n\r\n componentDidUpdate() {\r\n let finalStartAvail = true;\r\n let finalEndAvail = true;\r\n this.bulbRefArr.forEach((item) => {\r\n if (item.bulbElem.current) {\r\n const { isStartAvail, isEndAvail } =\r\n this.hideChartLabelIfApplicable(item.bulbElem.current);\r\n finalStartAvail = finalStartAvail && isStartAvail;\r\n finalEndAvail = finalEndAvail && isEndAvail;\r\n }\r\n });\r\n if (this.props.chartLabelStatus.isShowStartDateLabel !== finalStartAvail ||\r\n this.props.chartLabelStatus.isShowEndDateLabel !== finalEndAvail) {\r\n this.props.onChartLabelToggle({\r\n isShowStartDateLabel: finalStartAvail,\r\n isShowEndDateLabel: finalEndAvail,\r\n });\r\n }\r\n }\r\n\r\n onChartUpdated = (chart) => {\r\n this.setState({\r\n chart,\r\n });\r\n };\r\n\r\n initializeInstrumentation = () => {\r\n this.props.deps.instrumentation.addScenario(instrumentationSchema);\r\n\r\n const inlineChartScenario = this.props.deps.instrumentation.inlineChart.create();\r\n this.activities = {\r\n chartActionActivity: inlineChartScenario.inlineChartAction.create(),\r\n chartErrorActivity: inlineChartScenario.inlineChartError.create(),\r\n };\r\n };\r\n\r\n isTwoRectOverlapping = (elem1, elem2) =>\r\n // Check Leftoverlap, element 1 in element 2, element 2 inside element 1, right overlap\r\n ((elem1.left >= elem2.left && elem2.right >= elem1.left) ||\r\n (elem1.left >= elem2.left && elem1.right <= elem2.right) ||\r\n (elem2.left >= elem1.left && elem2.right <= elem1.right) ||\r\n (elem1.right >= elem2.left && elem2.right >= elem1.right));\r\n\r\n hideChartLabelIfApplicable = (bulbElem) => {\r\n const startLabelRef = this.props.chartLabelRef.current.startLabelRef.current;\r\n const endLabelRef = this.props.chartLabelRef.current.endLabelRef.current;\r\n const bulbClientRect = bulbElem.getBoundingClientRect();\r\n let isBulbOverlappingWithStart = false;\r\n let isBulbOverlappingWithEnd = false;\r\n\r\n if (startLabelRef) {\r\n const startDateRect = startLabelRef.getBoundingClientRect();\r\n isBulbOverlappingWithStart = this.isTwoRectOverlapping(startDateRect, bulbClientRect);\r\n }\r\n if (endLabelRef) {\r\n const lastDateRect = endLabelRef.getBoundingClientRect();\r\n isBulbOverlappingWithEnd = this.isTwoRectOverlapping(lastDateRect, bulbClientRect);\r\n }\r\n\r\n return {\r\n isStartAvail: !isBulbOverlappingWithStart,\r\n isEndAvail: !isBulbOverlappingWithEnd,\r\n };\r\n };\r\n\r\n logContext = (date, fluctuations) => {\r\n fluctuations.forEach((fluc) => {\r\n const logObject = {\r\n fluxId: fluc.UniqueId,\r\n PrimaryMetricId: this.props.primaryMetricId,\r\n SecondaryMetricId: this.props.secondaryMetricId,\r\n eventType: 'FluxShown',\r\n fluxContent: {\r\n actions: _.chain(fluc.Actions)\r\n .pluck('Message')\r\n .flatten().pluck('MessageId')\r\n .value(),\r\n rootCauses: _.chain(fluc.RootCauses)\r\n .pluck('Message')\r\n .flatten().pluck('MessageId')\r\n .value(),\r\n description: _.pluck(fluc.Description, 'MessageId'),\r\n },\r\n fluxDate: date,\r\n fluxKpi: fluc.FluctuationType,\r\n userId: this.props.deps.context.CurrentUser.Id,\r\n isInternal: this.props.deps.context.CurrentUser.IsInternal,\r\n customerId: fluc.CustomerId,\r\n accountId: fluc.AccountId,\r\n campaignId: fluc.CampaignId,\r\n };\r\n this.activities.chartActionActivity.trace(`Bulb Rendered for ${JSON.stringify(logObject)}`, 'FluctuationAction');\r\n });\r\n };\r\n\r\n render() {\r\n if (!this.state.chart || !this.props.fluctuations || this.props.fluctuations.length === 0\r\n || !this.state.chart.series) {\r\n return null;\r\n }\r\n this.bulbRefArr = [];\r\n const flucPlaceholders = [];\r\n this.props.fluctuations.forEach((fluc) => {\r\n if (fluc.FluctuationsPerDate.length === 0) {\r\n return;\r\n }\r\n this.state.chart.series[0].data.forEach((point, idx) => {\r\n if (point.name === fluc.formattedDate) {\r\n if (this.activities) {\r\n this.logContext(fluc.Date, fluc.FluctuationsPerDate);\r\n }\r\n\r\n // substract half bulb width from x to align the bulb center with chart points\r\n const bulbWidth = 28;\r\n const clientX = this.state.chart.series[0].points[idx].clientX +\r\n (this.state.chart.plotLeft - (bulbWidth / 2));\r\n const isRCUnknown = !_.isUndefined(_.find(\r\n fluc.FluctuationsPerDate,\r\n item =>\r\n item.RootCauses &&\r\n item.RootCauses[0] &&\r\n item.RootCauses[0].Message &&\r\n item.RootCauses[0].Message.MessageId === 'RCUnknown'\r\n ));\r\n\r\n const bulbElem = (\r\n {\r\n if (ref) {\r\n this.bulbRefArr.push(ref);\r\n }\r\n }}\r\n isRed={isRCUnknown}\r\n isYellow\r\n left={clientX}\r\n imageSrc={`${this.props.deps.imagePath}fluctuation-bulb.png`}\r\n />\r\n );\r\n\r\n // there could be four series when moving range is checked\r\n // or two series if moving range is not checked\r\n // primary, (primaryComparison), secondary, (secondaryComparison)\r\n // send all available ones over for vNext\r\n // do not send comparison (moving average) to current UI\r\n const metrics = [];\r\n this.state.chart.series.forEach((series) => {\r\n const metricId = (series.userOptions.id.indexOf('primary') !== -1) ?\r\n this.props.primaryMetricId :\r\n this.props.secondaryMetricId;\r\n\r\n if (metricId !== -1 &&\r\n series.data.length > 0) {\r\n metrics.push({\r\n name: series.name,\r\n value: this.chartDataAdapter.formatMetric(\r\n metricId,\r\n series.data[idx].y\r\n ).toString(),\r\n line: series.userOptions.id,\r\n color: series.userOptions.color,\r\n });\r\n }\r\n });\r\n\r\n const fluctuationTypeIds = _.compact([\r\n getFluctuationType(this.props.primaryMetricId),\r\n getFluctuationType(this.props.secondaryMetricId),\r\n ]);\r\n\r\n // this.activities.chartActionActivity.trace('Fluctuation data populated on chart',\r\n // 'InlineChartAction');\r\n const isOpen = !_.isUndefined(_.find(fluc.FluctuationsPerDate, item =>\r\n item.UniqueId === this.state.openedFlucId));\r\n\r\n flucPlaceholders.push((\r\n
    \r\n {\r\n this.setState({\r\n openedFlucId: flucId,\r\n });\r\n this.flucPage = _.findIndex(fluc.FluctuationsPerDate, {\r\n UniqueId: flucId,\r\n });\r\n if (metricId !== this.props.primaryMetricId &&\r\n metricId !== this.props.secondaryMetricId) {\r\n this.props.onPrimaryMetricChange({\r\n id: metricId,\r\n });\r\n }\r\n }}\r\n deps={{\r\n i18n: this.props.deps.i18n,\r\n context: this.props.deps.context,\r\n instrumentation: this.props.deps.instrumentation,\r\n token: this.props.deps.token,\r\n imagePath: this.props.deps.imagePath,\r\n }}\r\n metrics={metrics}\r\n triggerButton={bulbElem}\r\n isOpen={isOpen}\r\n onFlucDismiss={this.props.onFlucDismiss}\r\n page={isOpen ? this.flucPage : 0}\r\n />\r\n
    \r\n ));\r\n }\r\n });\r\n });\r\n return (\r\n
    \r\n {flucPlaceholders}\r\n
    \r\n );\r\n }\r\n}\r\n\r\nFluctuationPanel.propTypes = {\r\n fluctuations: PropTypes.arrayOf(PropTypes.shape({\r\n Date: PropTypes.string.isRequired,\r\n formattedDate: PropTypes.string.isRequired,\r\n FluctuationsPerDate: PropTypes.arrayOf(PropTypes.shape({\r\n UniqueId: PropTypes.string.isRequired,\r\n })),\r\n })).isRequired,\r\n onFlucDismiss: PropTypes.func.isRequired,\r\n primaryMetricId: PropTypes.number.isRequired,\r\n secondaryMetricId: PropTypes.number.isRequired,\r\n chartLabelStatus: PropTypes.shape({\r\n isShowStartDateLabel: PropTypes.bool,\r\n isShowEndDateLabel: PropTypes.bool,\r\n }).isRequired,\r\n onChartLabelToggle: PropTypes.func.isRequired,\r\n onPrimaryMetricChange: PropTypes.func.isRequired,\r\n chartLabelRef: PropTypes.shape({\r\n current: PropTypes.shape({\r\n startLabelRef: PropTypes.shape({\r\n current: PropTypes.node,\r\n }),\r\n endLabelRef: PropTypes.shape({\r\n current: PropTypes.node,\r\n }),\r\n }),\r\n }).isRequired,\r\n deps: PropTypes.shape({\r\n token: PropTypes.string,\r\n imagePath: PropTypes.string,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n formatDate: PropTypes.func,\r\n }).isRequired,\r\n instrumentation: PropTypes.shape({\r\n addScenario: PropTypes.func,\r\n inlineChart: PropTypes.shape({\r\n create: PropTypes.func,\r\n }),\r\n fluctuation: PropTypes.shape({\r\n create: PropTypes.func,\r\n }),\r\n }),\r\n context: PropTypes.shape({\r\n CurrentCustomer: PropTypes.shape({\r\n Id: PropTypes.number,\r\n }),\r\n CurrentAccount: PropTypes.shape({\r\n Id: PropTypes.number,\r\n }),\r\n CurrentCampaign: PropTypes.shape({\r\n Id: PropTypes.number,\r\n }),\r\n CurrentUser: PropTypes.shape({\r\n Id: PropTypes.number,\r\n IsInternal: PropTypes.bool,\r\n }),\r\n Permissions: PropTypes.shape({\r\n IsABFluctuationBlubYellow: PropTypes.bool,\r\n }).isRequired,\r\n }).isRequired,\r\n }).isRequired,\r\n dateRange: PropTypes.shape({}).isRequired,\r\n updateFlucData: PropTypes.func.isRequired,\r\n updateLoadingStatus: PropTypes.func.isRequired,\r\n};\r\n","/**\r\n * Highchart Style definitions. This will be merged with chart data\r\n * and set on the highchart component.\r\n * For available attributes for highcharts please refer https://api.highcharts.com/highcharts/\r\n */\r\nexport const highchartsStyle = {\r\n plotOptions: {\r\n line: {\r\n dataLabels: {\r\n enabled: false,\r\n },\r\n enableMouseTracking: true,\r\n },\r\n },\r\n xAxis: {\r\n title: {\r\n text: '',\r\n },\r\n crosshair: {\r\n enabled: true,\r\n color: '#E66400',\r\n dashStyle: 'longdash',\r\n },\r\n showFirstLabel: false,\r\n showLastLabel: false,\r\n visible: true,\r\n lineWidth: 1,\r\n labels: {\r\n enabled: false,\r\n },\r\n tickLength: 0,\r\n },\r\n yAxis: [{\r\n title: {\r\n text: '',\r\n },\r\n tickPixelInterval: 30,\r\n gridLineDashStyle: 'dash',\r\n visible: true,\r\n showFirstLabel: false,\r\n showLastLabel: false,\r\n }, {\r\n title: {\r\n text: '',\r\n },\r\n tickPixelInterval: 30,\r\n gridLineDashStyle: 'dash',\r\n visible: true,\r\n showFirstLabel: false,\r\n showLastLabel: false,\r\n opposite: true,\r\n }],\r\n tooltip: {\r\n backgroundColor: '#ffffff',\r\n borderRadius: 0,\r\n borderColor: '#AAAAAA',\r\n borderWidth: 2,\r\n useHTML: true,\r\n shared: true,\r\n shadow: false,\r\n valueDecimals: 2,\r\n },\r\n chart: {\r\n spacingTop: 0,\r\n spacingLeft: 0,\r\n spacingRight: 0,\r\n spacingBottom: 20,\r\n },\r\n legend: {\r\n enabled: false,\r\n },\r\n credits: {\r\n enabled: false,\r\n },\r\n};\r\n\r\nexport const highchartsStyleVNextOverride = {\r\n chart: {\r\n height: 123,\r\n },\r\n xAxis: {\r\n crosshair: {\r\n color: 'rgba(0,0,0,0.1)',\r\n },\r\n },\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport Promise from 'bluebird';\r\nimport _ from 'underscore';\r\nimport $ from 'jquery';\r\n\r\nimport { merge } from '@bingads-webui-universal/primitive-utilities';\r\nimport { HighchartReactWrapper } from '@bingads-webui-react/highchart-react-wrapper';\r\nimport { FluctuationTypeKey } from '@bingads-webui-campaign-react/fluctuation-popup';\r\nimport { UiBlocker } from '@bingads-webui-react/ui-blocker';\r\nimport { perfMarkerPropTypes } from '@bingads-webui/performance-marker';\r\nimport { getFilteredCampaignTypeFromRawFilter } from '@bingads-webui-campaign/campaign-ui-common';\r\nimport { withGlobalFilter } from '@bingads-webui-react/global-filter-context';\r\n\r\nimport { ChartLabel } from './chart-label';\r\nimport { ChartPanel } from './chart-panel';\r\nimport { ChartFormatter } from './chart-formatter';\r\nimport { FluctuationPanel } from './fluctuation-panel';\r\nimport { highchartsStyle, highchartsStyleVNextOverride } from '../style/js/highcharts-style';\r\nimport { Defaults } from './constants';\r\nimport { ChartDataAdapter } from './chart-data-adapter';\r\nimport { instrumentationSchema } from './inline-chart-instr-schema';\r\nimport { ImpressionsID, ClicksID, SpentID, ConvID, PartialConvID, VideoMetricColumns } from './chart-metrics-adapter';\r\n\r\nconst WaterfallFilterTypeCampaignType = 0;\r\n\r\nexport class InlineChartInternal extends React.PureComponent {\r\n constructor(props) {\r\n super(props);\r\n\r\n\r\n if (this.props.perfMarker) {\r\n this.perfMarker = this.props.perfMarker.createChild('Inline_Chart_Init_Load', { isActiveChild: false });\r\n this.perfMarker.willInit();\r\n }\r\n\r\n this.initializeInstrumentation();\r\n this.i18n = this.props.i18n;\r\n // Register date change handler.\r\n this.props.options.addDateChangeListener(this.onDateChangeHandler.bind(this));\r\n this.props.options.resizeChartListener(this.onResizeWindow.bind(this));\r\n\r\n this.campaignType = getFilteredCampaignTypeFromRawFilter(this.props[WaterfallFilterTypeCampaignType]);\r\n\r\n this.chartFormatter = new ChartFormatter();\r\n this.chartDataAdapter =\r\n new ChartDataAdapter({\r\n i18n: this.i18n,\r\n permissions: this.props.options.pageContext.Permissions,\r\n gridName: this.props.options.pageContext.CurrentGridName,\r\n lowestSupportedGranularity: this.props.options.lowestSupportedGranularity,\r\n campaignType: this.campaignType,\r\n });\r\n this.isInitialized = false;\r\n this.isOuterContainerInitialized = false;\r\n this.isPendingFetch = false;\r\n this.inlineChartColumnMerticsEnabled = false;\r\n\r\n if (this.props.serverContext && this.props.serverContext.DynamicPermissions) {\r\n this.inlineChartColumnMerticsEnabled =\r\n this.props.serverContext.DynamicPermissions.InlineChartColumnMerticsEnabled;\r\n }\r\n\r\n this.chartData = {};\r\n\r\n const permissions = this.props.options.pageContext.Permissions || {};\r\n ({\r\n dynamic: {\r\n ColumnConversion: this.IsColumnConversionEnabled,\r\n PartialConversions: this.IsPartialConversionsEnabled,\r\n } = {},\r\n } = permissions);\r\n\r\n this.withoutOpporCheck = permissions.dynamic && permissions.dynamic.FluctuationsWithoutRecCheck;\r\n\r\n this.state = {\r\n isLoading: true,\r\n isPopEnabled: false,\r\n isDataAvailable: false,\r\n isShowChart: true,\r\n isShowStartDateLabel: true,\r\n isShowEndDateLabel: true,\r\n flucData: [],\r\n chartMarginRight: 0,\r\n primaryMetricSelectionId: Defaults.primaryMetricId,\r\n secondaryMetricSelectionId: Defaults.secondaryMetricId,\r\n granularitySelectionId: Defaults.graunlarityId,\r\n // Used to only track moving average status. It may be enabled, but hidden if PoP is ON.\r\n isMovingAverageEnabled: Defaults.showMovingAverage,\r\n primaryMetricPercentage: '',\r\n secondaryMetricPercentage: '',\r\n chartLabelData: {},\r\n // Combine highchart data and style as highchart options\r\n noChartText: this.chartDataAdapter.getNoDataText(),\r\n dateRange: {},\r\n formattedHighChartOptions: {},\r\n fluctuationLoading: false,\r\n };\r\n\r\n const currentTab = this.props.options.gridCriterionType;\r\n const currentEntity = this.props.options.entityType;\r\n const { adGroupId } = (this.props.scope && this.props.scope.values) || {};\r\n\r\n const getMetricFilters = () => {\r\n const CPSAndInstallMetrics = ['AverageCPS', 'SalesCount', 'Installs', 'CostPerInstall', 'RevenuePerInstall'];\r\n const ConvValueRulesMetrics = ['AdvertiserReportedRevenueAdjustment', 'ViewThroughConversionsRevenueAdjustment', 'AllConversionAdvertiserReportedRevenueAdjustment'];\r\n const ConvValueRulesAllowedEntities = ['Account', 'Campaign', 'AdGroup', 'Ad', 'Keyword'];\r\n\r\n const fitlerMetrics = [];\r\n // only account/Perf, campaign, adgroup, ads and positive keyword can show Conversion Value Rule Metrics\r\n if (!ConvValueRulesAllowedEntities.includes(currentEntity)) {\r\n fitlerMetrics.push(...ConvValueRulesMetrics);\r\n }\r\n\r\n // for Demographics tab , CPA is no longer avaliable in Age and Gender grid\r\n if (currentTab === 'Age' || currentTab === 'Gender') {\r\n fitlerMetrics.push(...CPSAndInstallMetrics, 'CPA');\r\n }\r\n // for Keyword tab, hide video metrics\r\n if (currentEntity === 'Keyword') {\r\n fitlerMetrics.push(...CPSAndInstallMetrics, ...VideoMetricColumns);\r\n }\r\n\r\n const isCPSEntitiesCondition = ['Campaign', 'AdGroup', 'Account'].includes(currentEntity);\r\n const CPSProductgroupCondition = currentTab === 'ProductGroup' && !adGroupId;\r\n if (!(isCPSEntitiesCondition || CPSProductgroupCondition)) {\r\n fitlerMetrics.push(...CPSAndInstallMetrics);\r\n }\r\n\r\n const uniqueFilterMetrics = _.uniq(fitlerMetrics);\r\n if (!_.isEmpty(uniqueFilterMetrics)) {\r\n return metric => !uniqueFilterMetrics.includes(metric.name);\r\n }\r\n return null;\r\n };\r\n\r\n this.primaryMetricsList =\r\n this.chartDataAdapter.getPrimaryMetricsList(\r\n permissions,\r\n getMetricFilters(),\r\n this.props.options.customMetricNameList,\r\n currentEntity\r\n );\r\n\r\n this.secondaryMetricsList =\r\n this.chartDataAdapter.getSecondaryMetricsList(\r\n permissions,\r\n getMetricFilters(),\r\n this.props.options.customMetricNameList,\r\n currentEntity\r\n );\r\n }\r\n\r\n componentDidMount() {\r\n this.canceled = false;\r\n // get promise for current daterange, preferences\r\n Promise.all([\r\n this.props.options.pageState.getPromise('$daterange'),\r\n this.chartDataAdapter.getPreferencesAndDefaults(\r\n this.props.options.preference,\r\n this.props.options.pageContext\r\n )])\r\n .spread((dateRange, preferences) => {\r\n if (!this.canceled) {\r\n // Check if preference option loaded still available (might change due to pilot)\r\n const normalizedPreferences = this.normalizeWithAvailable(preferences);\r\n const selectedGranularityId = this.chartDataAdapter.reevaluateGranularity(\r\n dateRange,\r\n normalizedPreferences.granularityId\r\n );\r\n\r\n this.activities.chartActionActivity.trace(`Inline Chart reevaluated granularity\r\n preference granularity id ${normalizedPreferences.granularityId},\r\n new granularity id ${selectedGranularityId}`, 'InlineChartAction');\r\n\r\n this.isInitialized = true;\r\n // Update all the state that will be used by next render cycle to update UI.\r\n // Make sure both daterange and granularity are updated together.\r\n this.setState((prevState, newProps) =>\r\n this.updateState(dateRange, newProps, normalizedPreferences, selectedGranularityId));\r\n }\r\n });\r\n }\r\n\r\n componentDidUpdate(prevProps, prevState) {\r\n if (!this.isInitialized || !this.isOuterContainerInitialized) {\r\n // We need to wait till we read the preference store and daterange\r\n // before acting on any updates. Keep the initial fetch as pending.\r\n this.isPendingFetch = true;\r\n return;\r\n }\r\n\r\n if (this.perfMarker && !this.perfMarker.isDone && !this.state.isLoading && this.isInitialized) {\r\n this.perfMarker.done();\r\n }\r\n\r\n if (prevProps.isShowChart !== this.props.isShowChart) {\r\n this.toggleChartState(!this.state.isShowChart);\r\n }\r\n\r\n if (this.chartDataAdapter.isDateRangeChanged(prevProps.dateRange, this.props.dateRange)) {\r\n // new date range is passed in as props\r\n // do not directly trigger refresh\r\n // instead call below handler to let it handle state update and refresh\r\n // chartDataAdapter.isDateRangeChanged takes care of null or undefined checks\r\n this.onDateChangeHandler(null, this.props.dateRange);\r\n return;\r\n }\r\n\r\n if (_.isUndefined(this.state.granularitySelectionId)) {\r\n // Skip fetch if granularity is not defined.\r\n return;\r\n }\r\n\r\n if (!this.state.isShowChart) {\r\n // Don't fetch in background if chart is hidden. Only fetch on show chart.\r\n this.isPendingFetch = true;\r\n return;\r\n }\r\n // As componentDidUpdate is invoked on update to any of the props or state, check\r\n // for changes that require fetch and conditionally trigger it.\r\n if (\r\n this.isPendingFetch ||\r\n (this.isFilterChanged(prevProps.filter, this.props.filter)) ||\r\n (this.isCustomFilterChanged(prevProps.customFilter, this.props.customFilter)) ||\r\n (this.chartDataAdapter.isDateRangeChanged(prevState.dateRange, this.state.dateRange)) ||\r\n (prevState.isPopEnabled !== this.state.isPopEnabled) ||\r\n // If this.props.gridDataSource is not undefined\r\n // Don't fetch data when granularity or movingAverage changes\r\n (!this.props.gridDataSource &&\r\n prevState.granularitySelectionId !== this.state.granularitySelectionId) ||\r\n (!this.props.gridDataSource &&\r\n prevState.isMovingAverageEnabled !== this.state.isMovingAverageEnabled)) {\r\n // Reset pending fetch.\r\n this.isPendingFetch = false;\r\n\r\n if (this.perfMarker) {\r\n this.perfMarker.willFetchData();\r\n }\r\n\r\n // Fetch performance time series\r\n this.fetchPerformanceAndFluctuation(\r\n this.state.dateRange,\r\n this.state.granularitySelectionId,\r\n // If this.props.gridDataSource is not undefined\r\n // Use grid data when we didn't show / hide inline chart\r\n this.props.gridDataSource && prevState.isShowChart === this.state.isShowChart\r\n );\r\n this.activities.chartActionActivity.trace('State Updated. Render starts', 'InlineChartAction');\r\n }\r\n }\r\n\r\n componentWillUnmount() {\r\n this.canceled = true;\r\n }\r\n\r\n onDateChangeHandler = (e, newDateRange) => {\r\n if (!this.isInitialized) {\r\n // No data to compare yet. Wait till initialization finishes.\r\n return;\r\n }\r\n\r\n if (this.props.perfMarker) {\r\n this.actionPerfMarker = this.props.perfMarker.createChild('Inline_Chart_Action', { isActiveChild: false });\r\n this.actionPerfMarker.willInit();\r\n }\r\n\r\n this.activities.chartActionActivity.trace(`Inline Chart Date Change received\r\n ${JSON.stringify(newDateRange)}`, 'InlineChartAction');\r\n\r\n // Daterange object received through notification is different\r\n // Eg. title field string can differ. So we only compare, start,end,\r\n // compared start, end fields to determine time range change and proccess further.\r\n if (!this.chartDataAdapter.isDateRangeChanged(newDateRange, this.state.dateRange)) {\r\n this.activities.chartActionActivity.trace(`Inline Chart Date Change no change\r\n ${JSON.stringify(this.state.dateRange)}`, 'InlineChartAction');\r\n return;\r\n }\r\n\r\n // Update granularity selection and available granularity list\r\n const selectedGranularityId =\r\n this.chartDataAdapter.reevaluateGranularity(newDateRange, this.state.granularitySelectionId);\r\n\r\n this.activities.chartActionActivity.trace(`Inline Chart reevaluated granularity\r\n old granularity id ${this.state.granularitySelectionId},\r\n new granularity id ${selectedGranularityId}`, 'InlineChartAction');\r\n\r\n const newState = {\r\n granularitySelectionId: selectedGranularityId,\r\n dateRange: newDateRange,\r\n isPopEnabled: !!newDateRange.compared,\r\n chartLabelData: {},\r\n };\r\n\r\n if (_.isUndefined(selectedGranularityId)) {\r\n newState.isDataAvailable = false;\r\n }\r\n\r\n // Update all the state that will be used by next render cycle to update UI.\r\n this.setState(newState);\r\n };\r\n\r\n onResizeWindow = (newWidth) => {\r\n if (!newWidth || (this.chart && newWidth === this.chart.chartWidth)) {\r\n return;\r\n }\r\n\r\n this.isOuterContainerInitialized = true;\r\n\r\n let width = newWidth;\r\n const inlineChartContainer = $('.inline-chart-container');\r\n\r\n if (inlineChartContainer) {\r\n width -= (parseFloat(inlineChartContainer.css('paddingLeft')) +\r\n parseFloat(inlineChartContainer.css('paddingRight')));\r\n }\r\n\r\n this.props.options.resizeEventHandler();\r\n\r\n this.resizeChart(width);\r\n };\r\n\r\n onPrimaryMetricChange = (selection) => {\r\n if (selection.id === this.state.primaryMetricSelectionId) {\r\n // No op if selection is same metric as currently set.\r\n return;\r\n }\r\n\r\n if (this.props.perfMarker) {\r\n this.actionPerfMarker = this.props.perfMarker.createChild('Inline_Chart_Action', { isActiveChild: false });\r\n this.actionPerfMarker.willInit();\r\n }\r\n\r\n // Save to preference store\r\n this.saveToPrefrenceStore('primaryMetric', selection.id);\r\n\r\n if (this.inlineChartColumnMerticsEnabled) {\r\n this.setState({\r\n primaryMetricSelectionId: selection.id,\r\n }, () => {\r\n this.fetchPerformanceData(\r\n this.state.dateRange,\r\n this.state.granularitySelectionId\r\n );\r\n });\r\n } else {\r\n // Compute the new chart options\r\n const formattedOptions = this.getFormattedChartOptions(\r\n selection.id,\r\n this.state.secondaryMetricSelectionId\r\n );\r\n\r\n this.setState({\r\n primaryMetricSelectionId: selection.id,\r\n formattedHighChartOptions: formattedOptions,\r\n });\r\n }\r\n\r\n this.activities.chartActionActivity.trace(\r\n `Inline Chart primary metric changed: ${selection.id}`,\r\n 'InlineChartAction'\r\n );\r\n };\r\n\r\n onSecondaryMetricChange = (selection) => {\r\n if (selection.id === this.state.secondaryMetricSelectionId) {\r\n // No op if selection is same metric as currently set.\r\n return;\r\n }\r\n\r\n if (this.props.perfMarker) {\r\n this.actionPerfMarker = this.props.perfMarker.createChild('Inline_Chart_Action', { isActiveChild: false });\r\n this.actionPerfMarker.willInit();\r\n }\r\n\r\n // Save to preference store\r\n this.saveToPrefrenceStore('secondaryMetric', selection.id);\r\n\r\n if (this.inlineChartColumnMerticsEnabled) {\r\n this.setState({\r\n secondaryMetricSelectionId: selection.id,\r\n }, () => {\r\n this.fetchPerformanceData(\r\n this.state.dateRange,\r\n this.state.granularitySelectionId\r\n );\r\n });\r\n } else {\r\n // Compute the new chart options\r\n const formattedHighChartOptions = this.getFormattedChartOptions(\r\n this.state.primaryMetricSelectionId,\r\n selection.id\r\n );\r\n\r\n this.setState({\r\n secondaryMetricSelectionId: selection.id,\r\n formattedHighChartOptions,\r\n });\r\n }\r\n\r\n this.activities.chartActionActivity.trace(\r\n `Inline Chart secondary metric changed: ${selection.id}`,\r\n 'InlineChartAction'\r\n );\r\n };\r\n\r\n onGranularityChange = (selection) => {\r\n if (selection.id === this.state.granularitySelectionId) {\r\n // No op if selection is same granularity as currently set.\r\n return;\r\n }\r\n\r\n if (this.props.perfMarker) {\r\n this.actionPerfMarker = this.props.perfMarker.createChild('Inline_Chart_Action', { isActiveChild: false });\r\n this.actionPerfMarker.willInit();\r\n }\r\n\r\n // Save to preference store\r\n const granularityEnum = this.chartDataAdapter.getGranularityEnum(selection.id);\r\n this.saveToPrefrenceStore('granularity', granularityEnum);\r\n\r\n if (this.props.gridDataSource) {\r\n this.setState({\r\n granularitySelectionId: selection.id,\r\n chartLabelData: {},\r\n }, () => {\r\n this.fetchPerformanceAndFluctuation(\r\n this.state.dateRange,\r\n this.state.granularitySelectionId\r\n );\r\n });\r\n } else {\r\n this.setState({\r\n granularitySelectionId: selection.id,\r\n chartLabelData: {},\r\n });\r\n }\r\n\r\n this.activities.chartActionActivity.trace(\r\n `Inline Chart granularity changed: ${selection.id}`,\r\n 'InlineChartAction'\r\n );\r\n };\r\n\r\n onMovingAverageChange = (event) => {\r\n if (this.props.perfMarker) {\r\n this.actionPerfMarker = this.props.perfMarker.createChild('Inline_Chart_Action', { isActiveChild: false });\r\n this.actionPerfMarker.willInit();\r\n }\r\n\r\n // Save to preference store\r\n this.saveToPrefrenceStore('showMovingAverage', event.target.checked);\r\n\r\n // Compute the new chart options\r\n const formattedHighChartOptions = this.getFormattedChartOptions(\r\n this.state.primaryMetricSelectionId,\r\n this.state.secondaryMetricSelectionId\r\n );\r\n\r\n if (this.props.gridDataSource) {\r\n this.setState({\r\n isMovingAverageEnabled: event.target.checked,\r\n formattedHighChartOptions,\r\n }, () => {\r\n this.fetchPerformanceAndFluctuation(\r\n this.state.dateRange,\r\n this.state.granularitySelectionId\r\n );\r\n });\r\n } else {\r\n this.setState({\r\n isMovingAverageEnabled: event.target.checked,\r\n formattedHighChartOptions,\r\n });\r\n }\r\n\r\n this.activities.chartActionActivity.trace(\r\n `Inline Chart moving average changed: ${event.target.checked}`,\r\n 'InlineChartAction'\r\n );\r\n };\r\n\r\n onToggleLabel = ({ isShowStartDateLabel, isShowEndDateLabel }) => {\r\n this.setState({\r\n isShowStartDateLabel,\r\n isShowEndDateLabel,\r\n });\r\n };\r\n\r\n onChartRendered = (chart) => {\r\n this.activities.chartActionActivity.trace('Inline Chart chart render finished', 'InlineChartAction');\r\n this.chart = chart;\r\n this.resizeChart();\r\n\r\n if (this.props.options.isFluctuationsEnabled &&\r\n !(this.isFilterActive()) &&\r\n this.state.granularitySelectionId === 1 &&\r\n this.state.isDataAvailable &&\r\n this.fluctuationProm) {\r\n this.fluctuationProm.then((result) => {\r\n if (this.chart &&\r\n this.chart.series) {\r\n this.setState({\r\n chartMarginRight: chart.marginRight,\r\n });\r\n if (this.panelRef) {\r\n this.panelRef.onChartUpdated(chart);\r\n }\r\n this.activities.chartActionActivity.trace(`Chart shifted: ${this.state.chartMarginRight}`, 'InlineChartAction');\r\n }\r\n\r\n this.activities.chartActionActivity.trace(`Fluctuation data received ${result.length}`, 'InlineChartAction');\r\n this.activities.chartActionActivity.trace(`Inline Chart Shown with Fluctuations Date: ${JSON.stringify(_.extend(this.state.chartLabelData, {\r\n entity: this.props.options.entityType,\r\n startDate: this.chartFormatter.getRawDate(this.state.dateRange.start, this.i18n),\r\n endDate: this.chartFormatter.getRawDate(this.state.dateRange.end, this.i18n),\r\n }))}`, 'FluctuationAction');\r\n });\r\n } else {\r\n this.isFlucRenderNotRequired = true;\r\n if (!(this.state.isShowStartDateLabel) ||\r\n !(this.state.isShowEndDateLabel)) {\r\n this.setState({\r\n flucData: [],\r\n isShowStartDateLabel: true,\r\n isShowEndDateLabel: true,\r\n });\r\n }\r\n }\r\n\r\n if (this.actionPerfMarker && !this.actionPerfMarker.isDone) {\r\n this.actionPerfMarker.done();\r\n }\r\n };\r\n\r\n getFormattedChartOptions = (primaryMetricId, secondaryMetricId) => {\r\n const { seriesColors } = this.props.options;\r\n const primaryMetric =\r\n this.chartDataAdapter.getMetricItem(primaryMetricId);\r\n const secondaryMetric =\r\n this.chartDataAdapter.getMetricItem(secondaryMetricId);\r\n\r\n const highChartData = this.chartFormatter.getFormattedHighChart(\r\n this.chartDataAdapter,\r\n {\r\n primaryMetric,\r\n secondaryMetric,\r\n granularityId: this.state.granularitySelectionId,\r\n isMovingAverageOn: this.state.isMovingAverageEnabled && this.isMovingAverageVisible(),\r\n chartWidth: this.state.chartWidth,\r\n seriesColors,\r\n },\r\n this.chartData\r\n );\r\n\r\n merge(highchartsStyle, highchartsStyleVNextOverride);\r\n\r\n return merge(highChartData, highchartsStyle);\r\n };\r\n\r\n getChartElement() {\r\n let noDataOrLoading = this.state.isLoading ? (\r\n
    \r\n
    \r\n
    \r\n ) : null;\r\n\r\n /* eslint-disable react/no-danger */\r\n if (_.isUndefined(this.state.granularitySelectionId) ||\r\n (!this.state.isDataAvailable && !this.state.isLoading)) {\r\n noDataOrLoading = (\r\n
    \r\n \r\n
    );\r\n }\r\n\r\n this.chartLabelRef = React.createRef();\r\n const chartLabelComponent = ();\r\n\r\n const chart = this.state.isDataAvailable && !this.state.isLoading ? (\r\n
    \r\n \r\n {chartLabelComponent}\r\n
    )\r\n : (\r\n
    \r\n {noDataOrLoading}\r\n
    );\r\n\r\n return chart;\r\n }\r\n\r\n getFluctuationMetric = (flucType) => {\r\n switch (flucType) {\r\n case FluctuationTypeKey.Impression:\r\n return ImpressionsID;\r\n case FluctuationTypeKey.Click:\r\n return ClicksID;\r\n case FluctuationTypeKey.Spend:\r\n return SpentID;\r\n case FluctuationTypeKey.Conversion:\r\n return this.IsColumnConversionEnabled && this.IsPartialConversionsEnabled ?\r\n PartialConvID : ConvID;\r\n default:\r\n this.activities.chartActionActivity\r\n .error(\r\n `Invalid Fluctuation Type: ${flucType}`,\r\n 'FluctuationError'\r\n );\r\n return null;\r\n }\r\n };\r\n\r\n setFluctuationFlag(fluxMetrics) {\r\n _.each(this.primaryMetricsList, (metric) => {\r\n /* eslint-disable no-param-reassign */\r\n // fix the bug drop down did not show the bulb icon\r\n metric.isFluctuation = metric.isFluctuation || _.contains(fluxMetrics, metric.id);\r\n });\r\n _.each(this.secondaryMetricsList, (metric) => {\r\n /* eslint-disable no-param-reassign */\r\n metric.isFluctuation = metric.isFluctuation || _.contains(fluxMetrics, metric.id);\r\n });\r\n }\r\n\r\n getMetricsName() {\r\n const { primaryMetricSelectionId, secondaryMetricSelectionId } = this.state;\r\n const metrics = this.chartDataAdapter.getMetricsQuery(\r\n primaryMetricSelectionId,\r\n secondaryMetricSelectionId\r\n );\r\n return metrics;\r\n }\r\n\r\n resizeChart(width) {\r\n if (width && this.chart && this.chart.options) {\r\n this.chart.setSize(width, null, false);\r\n }\r\n\r\n // always update state after chart is resized\r\n // so fluctuation panel can update itself based on new chart size\r\n if ((width > 0) &&\r\n width !== this.state.chartWidth) {\r\n this.setState({\r\n chartWidth: width,\r\n });\r\n }\r\n }\r\n\r\n initializeInstrumentation = () => {\r\n this.props.options.instrumentation.addScenario(instrumentationSchema);\r\n\r\n const inlineChartScenario = this.props.options.instrumentation.inlineChart.create();\r\n this.activities = {\r\n filterActivity: inlineChartScenario.inlineChartFilter.create(),\r\n chartActionActivity: inlineChartScenario.inlineChartAction.create(),\r\n chartErrorActivity: inlineChartScenario.inlineChartError.create(),\r\n };\r\n };\r\n\r\n toggleChartState(showChartState) {\r\n // Save to preference store\r\n this.saveToPrefrenceStore('showChart', showChartState);\r\n\r\n this.setState({\r\n isShowChart: showChartState,\r\n });\r\n this.activities.chartActionActivity.trace(`Inline Chart toggle show chart: ${showChartState}`, 'InlineChartAction');\r\n\r\n this.canceled = !showChartState;\r\n }\r\n\r\n updateState(period, props, preferences, granularityId) {\r\n let primaryMetricSelectionId;\r\n if (_.isNumber(props.options.defaultPrimaryMetric)) {\r\n primaryMetricSelectionId = props.options.defaultPrimaryMetric;\r\n } else if (_.isNumber(preferences.primaryMetricId)) {\r\n primaryMetricSelectionId = preferences.primaryMetricId;\r\n }\r\n return {\r\n isShowChart: props.isShowChart && preferences.showChart,\r\n isMovingAverageEnabled: preferences.showMovingAverage,\r\n primaryMetricSelectionId,\r\n secondaryMetricSelectionId: preferences.secondaryMetricId,\r\n granularitySelectionId: granularityId,\r\n dateRange: period,\r\n isPopEnabled: !!period.compared,\r\n };\r\n }\r\n\r\n // Normalize preference and default back if certain preference config is no longer available\r\n normalizeWithAvailable(preferences) {\r\n const normalizedPreferences = preferences;\r\n\r\n // Check and update primary metric selection\r\n if (!_.find(this.primaryMetricsList, { id: preferences.primaryMetricId })) {\r\n normalizedPreferences.primaryMetricId = Defaults.primaryMetricId;\r\n this.saveToPrefrenceStore('primaryMetric', normalizedPreferences.primaryMetricId);\r\n }\r\n\r\n // Check and update secondary metric selection\r\n if (!_.find(this.secondaryMetricsList, { id: preferences.secondaryMetricId })) {\r\n normalizedPreferences.secondaryMetricId = Defaults.secondaryMetricId;\r\n this.saveToPrefrenceStore('secondaryMetric', normalizedPreferences.secondaryMetricId);\r\n }\r\n\r\n if (this.props.options.disableMovingAverage) {\r\n preferences.showMovingAverage = false;\r\n }\r\n\r\n return normalizedPreferences;\r\n }\r\n\r\n saveToPrefrenceStore(suffix, value) {\r\n const prefObj = {};\r\n prefObj[`${this.props.options.pageContext.CurrentTabId}-${suffix}`] =\r\n value;\r\n this.props.options.preference.setInlineChartInfo(prefObj);\r\n }\r\n\r\n isMovingAverageVisible(\r\n granularityId = this.state.granularitySelectionId,\r\n popEnabled = this.state.isPopEnabled\r\n ) {\r\n if (this.props.options.disableMovingAverage) {\r\n return false;\r\n }\r\n return (!popEnabled) &&\r\n (granularityId === Defaults.graunlarityId);\r\n }\r\n\r\n isFilterActive() {\r\n const filterString = this.props.filter && this.props.filter.odataV4 ?\r\n this.props.filter.odataV4({ ignoreCase: false }) : '';\r\n return (!!filterString);\r\n }\r\n\r\n isFilterChanged(oldFilter, newFilter) {\r\n const oldFilterString = oldFilter && oldFilter.odataV4 ?\r\n oldFilter.odataV4({ ignoreCase: false }) : '';\r\n const newFilterString = newFilter && newFilter.odataV4 ?\r\n newFilter.odataV4({ ignoreCase: false }) : '';\r\n\r\n const result = oldFilterString !== newFilterString;\r\n return result;\r\n }\r\n\r\n isCustomFilterChanged(oldFilter, newFilter) {\r\n if (!oldFilter && !newFilter) {\r\n return false;\r\n }\r\n\r\n return !_.isEqual(oldFilter, newFilter);\r\n }\r\n\r\n proceedFluctuation() {\r\n // Allow fluctuations only for Account and Campaign levels.\r\n // At campaign level, restrict to pilot users only.\r\n return (this.props.options.pageContext.CurrentCampaign &&\r\n !this.props.options.pageContext.CurrentAdGroup) ||\r\n (!this.props.options.pageContext.CurrentCampaign &&\r\n !this.props.options.pageContext.CurrentAdGroup);\r\n }\r\n\r\n updateFlucData(data) {\r\n this.setState({\r\n flucData: data,\r\n });\r\n }\r\n\r\n updateLoadingStatus(loading) {\r\n this.setState({\r\n fluctuationLoading: loading,\r\n });\r\n }\r\n\r\n fetchFluctuation(dateRange, granularityId) {\r\n if (this.props.options.isFluctuationsEnabled) {\r\n this.activities.chartActionActivity.trace(\r\n `Fluctuation pilot enabled:\r\n user type ${this.props.options.pageContext.CurrentUser.IsInternal ? 'internal' : 'external'}`,\r\n 'InlineChartAction'\r\n );\r\n }\r\n\r\n if (!this.proceedFluctuation()) {\r\n return;\r\n }\r\n\r\n const isFilterActive = this.isFilterActive();\r\n this.activities.chartActionActivity.trace(\r\n `InlineChart filter: ${isFilterActive}`,\r\n 'InlineChartAction'\r\n );\r\n\r\n // Fetch fluctuations only if supported and granularity is 'Day'.\r\n // surfacingChannelId 0:default, 1:campaign, 2:adgroup, 3:keyword, 4:ad, 5:campaign_grid_overall\r\n if (granularityId === Defaults.graunlarityId && !isFilterActive) {\r\n if (this.props.options.isFluctuationsEnabled) {\r\n const FlucService = this.props.options.fluctuationService;\r\n const flucServiceIns = new FlucService({\r\n token: this.props.options.token,\r\n options: {\r\n userId: this.props.options.pageContext.CurrentUser.Id,\r\n customerId: this.props.options.pageContext.CurrentCustomer.Id,\r\n accountId: this.props.options.pageContext.CurrentAccount.Id,\r\n campaignId: this.props.options.pageContext.CurrentCampaign &&\r\n this.props.options.pageContext.CurrentCampaign.Id,\r\n granularity: Defaults.granularity,\r\n startDate: this.formatDateString(dateRange.start),\r\n endDate: this.formatDateString(dateRange.end),\r\n surfacingChannelId: this.props.options.entityType === 'Campaign' ? 1 : 0,\r\n isFluctuationsExperiementEnabled: this.props.options.isFluctuationsExperiementEnabled,\r\n },\r\n });\r\n\r\n this.logSummary();\r\n this.fluctuationProm = flucServiceIns.findAll({\r\n withoutOpporCheck: this.withoutOpporCheck,\r\n });\r\n this.fluctuationProm.then((result) => {\r\n this.setState({\r\n flucData: result,\r\n });\r\n this.activities.chartActionActivity.trace('Fluctuation Request Finished', 'InlineChartFetch');\r\n }, (errorResult) => {\r\n this.activities.chartErrorActivity.trace(\r\n `Fluctuation Request Failed ${JSON.stringify(errorResult)}`,\r\n 'InlineChartFetch'\r\n );\r\n this.setState({\r\n flucData: [],\r\n });\r\n });\r\n }\r\n }\r\n }\r\n\r\n fetchPerformanceAndFluctuation(dateRange, granularityId, useGridData) {\r\n this.fetchPerformanceData(dateRange, granularityId, useGridData).then(() => {\r\n if (this.perfMarker) {\r\n this.perfMarker.willRender();\r\n }\r\n\r\n if (this.props.onFetchPerfData) {\r\n this.props.onFetchPerfData();\r\n }\r\n });\r\n this.fetchFluctuation(dateRange, granularityId);\r\n }\r\n\r\n fetchPerformanceData = (dateRange, granularityId, useGridData) => {\r\n const loading = () => {\r\n this.setState({\r\n isLoading: true,\r\n isDataAvailable: false,\r\n });\r\n };\r\n\r\n this.activities.chartActionActivity.trace('Inline Chart Request Started', 'InlineChartFetch');\r\n\r\n const context = {\r\n filter: this.props.filter,\r\n period: dateRange,\r\n granularity: this.chartDataAdapter.getGranularityEnum(granularityId),\r\n // Moving average needs to be got only if Pop is not shown and granularity is 'day'\r\n isMovingAverageOn:\r\n this.isMovingAverageVisible(\r\n granularityId,\r\n this.state.popEnabled\r\n ) && this.state.isMovingAverageEnabled,\r\n refreshGridData: false,\r\n currentEntity: this.props.options.entityType,\r\n metric: this.getMetricsName(),\r\n };\r\n\r\n // Filter service, filter object includes circular reference causing JSON stringify to break.\r\n // Hence storing only filter query string in the log.\r\n const logContext = {\r\n filterQuery: context.filter ? context.filter.query : '',\r\n period: context.period,\r\n granularity: context.granularity,\r\n movingAverage: context.isMovingAverageOn,\r\n entity: context.currentEntity,\r\n campaignId: this.props.options.pageContext.CurrentCampaign &&\r\n this.props.options.pageContext.CurrentCampaign.Id,\r\n metric1: this.state.primaryMetricSelectionId,\r\n metric2: this.state.secondaryMetricSelectionId,\r\n isInternal: this.props.options.pageContext.CurrentUser.IsInternal,\r\n };\r\n this.activities.chartActionActivity.trace(`Fetch Performance Data: ${JSON.stringify(logContext)}`, 'InlineChartAction');\r\n\r\n if (this.actionPerfMarker) {\r\n this.actionPerfMarker.willFetchData();\r\n }\r\n\r\n return new Promise((resolve) => {\r\n const successCallback = (result) => {\r\n if (this.actionPerfMarker) {\r\n this.actionPerfMarker.willRender();\r\n }\r\n\r\n if (!this.canceled) {\r\n this.activities.chartActionActivity.trace('Inline Chart Request Finished', 'InlineChartFetch');\r\n const data = this.chartDataAdapter.prepareData(result);\r\n\r\n if (!_.every(data, this.chartDataAdapter.isPrimaryDataAvailable)) {\r\n // No preformance time series data\r\n this.setState({\r\n isLoading: false,\r\n isDataAvailable: false,\r\n });\r\n resolve();\r\n return;\r\n }\r\n\r\n // Cache the chart raw data.\r\n this.chartData = data;\r\n\r\n // Align chart series.\r\n if (_.every(data, this.chartDataAdapter.isComparisonDataAvailable)) {\r\n this.chartDataAdapter.alignDataForComparison(\r\n data,\r\n this.chartDataAdapter.getGranularityEnum(granularityId)\r\n );\r\n }\r\n\r\n // Update chart label based on chart data and current granularity\r\n const chartLabel =\r\n this.chartDataAdapter.getChartLabel(\r\n data,\r\n granularityId\r\n );\r\n\r\n const formattedHighChartOptions = this.getFormattedChartOptions(\r\n this.state.primaryMetricSelectionId,\r\n this.state.secondaryMetricSelectionId\r\n );\r\n\r\n this.setState({\r\n formattedHighChartOptions,\r\n isLoading: false,\r\n isDataAvailable: true,\r\n chartLabelData: chartLabel,\r\n });\r\n resolve();\r\n }\r\n };\r\n const errorCallback = (errorResult) => {\r\n this.activities.chartErrorActivity.trace(\r\n `PerformanceTimeSeries Request Failed ${JSON.stringify(errorResult)}`,\r\n 'InlineChartFetch'\r\n );\r\n this.setState({\r\n isLoading: false,\r\n isDataAvailable: false,\r\n });\r\n };\r\n if (useGridData &&\r\n typeof this.props.gridDataSource.onLoading === 'function' &&\r\n typeof this.props.gridDataSource.getChartData === 'function'\r\n ) {\r\n this.props.gridDataSource.onLoading(loading);\r\n this.props.gridDataSource.getChartData(successCallback, errorCallback);\r\n } else {\r\n loading();\r\n this.props.dataSource.findAll(context)\r\n .then((result) => {\r\n if (this.props.gridDataSource) {\r\n this.props.gridDataSource.updateChartData(result);\r\n }\r\n return result;\r\n })\r\n .then(successCallback, errorCallback);\r\n }\r\n });\r\n };\r\n\r\n formatDateString(dateStr) {\r\n const leftPadding = s => ((s.length === 1) ? `0${s}` : s);\r\n const dt = new Date(Date.parse(dateStr));\r\n const year = `${dt.getFullYear()}`;\r\n const month = `${dt.getMonth() + 1}`;\r\n const day = `${dt.getDate()}`;\r\n\r\n return `${year}-${leftPadding(month)}-${leftPadding(day)}`;\r\n }\r\n\r\n dismissFluc = ({ date, fluctuation }) => {\r\n const flucData = this.state.flucData.map((item) => {\r\n const flucItem = item;\r\n if (flucItem.Date === date) {\r\n flucItem.FluctuationsPerDate = _.without(\r\n flucItem.FluctuationsPerDate,\r\n _.findWhere(flucItem.FluctuationsPerDate, {\r\n UniqueId: fluctuation.UniqueId,\r\n })\r\n );\r\n }\r\n return flucItem;\r\n });\r\n\r\n this.setState({\r\n flucData,\r\n });\r\n };\r\n\r\n logSummary = () => {\r\n const logContext = {\r\n entity: this.props.options.entityType,\r\n campaignId: this.props.options.pageContext.CurrentCampaign &&\r\n this.props.options.pageContext.CurrentCampaign.Id,\r\n metric1: this.state.primaryMetricSelectionId,\r\n metric2: this.state.secondaryMetricSelectionId,\r\n metricRecommend: this.state.recommendMetricSelectionId,\r\n isInternal: this.props.options.pageContext.CurrentUser.IsInternal,\r\n };\r\n\r\n this.activities.chartActionActivity.trace('Fluctuation Request Started', 'InlineChartFetch');\r\n this.activities.chartActionActivity.trace(`Chart Summary: ${JSON.stringify(logContext)}`, 'InlineChartAction');\r\n };\r\n\r\n generateFlucData = () => (this.state.flucData ? this.state.flucData.map((item) => {\r\n const timeWithoutTimezone = item.Date.substring(0, 19);\r\n const availableFlucMetrics = [];\r\n let FluctuationsPerDate = [];\r\n let withoutOpporCheck = false;\r\n if (item.FluctuationsPerDate) {\r\n _.each(item.FluctuationsPerDate, (flucItem) => {\r\n availableFlucMetrics.push(this.getFluctuationMetric(flucItem.FluctuationType));\r\n });\r\n ({ FluctuationsPerDate } = item);\r\n } else if (item.FluctuationList) {\r\n FluctuationsPerDate = _.map(item.FluctuationList, (flucItem) => {\r\n availableFlucMetrics.push(this.getFluctuationMetric(flucItem.FluctuationType));\r\n return {\r\n FluctuationType: flucItem.FluctuationType,\r\n UniqueId: flucItem.FluctuationId,\r\n RootCauses: _.map(flucItem.RootCauses, cause => ({ Message: { MessageId: cause } })),\r\n };\r\n });\r\n withoutOpporCheck = true;\r\n }\r\n\r\n FluctuationsPerDate = FluctuationsPerDate.filter((fluc) => {\r\n const flucMetricId = this.getFluctuationMetric(fluc.FluctuationType);\r\n return flucMetricId === this.state.primaryMetricSelectionId ||\r\n flucMetricId === this.state.secondaryMetricSelectionId ||\r\n flucMetricId === this.state.recommendMetricSelectionId;\r\n });\r\n\r\n this.setFluctuationFlag(availableFlucMetrics);\r\n return {\r\n Date: item.Date,\r\n formattedDate: this.chartDataAdapter.formatDate(\r\n timeWithoutTimezone,\r\n this.state.granularitySelectionId\r\n ),\r\n FluctuationsPerDate,\r\n withoutOpporCheck,\r\n };\r\n }) : null);\r\n\r\n render() {\r\n const { options } = this.props;\r\n const granularityList = this.chartDataAdapter.getGranularitiesList();\r\n const primarySelection =\r\n this.chartDataAdapter.getMetricItem(this.state.primaryMetricSelectionId);\r\n const secondarySelection =\r\n this.chartDataAdapter.getMetricItem(this.state.secondaryMetricSelectionId);\r\n const granularitySelection =\r\n this.chartDataAdapter.getGranularitySelection(this.state.granularitySelectionId);\r\n\r\n const chart = this.getChartElement();\r\n\r\n const granularityOptions = {\r\n granularityList,\r\n selectedItem: granularitySelection,\r\n selectionChangeCallback: this.onGranularityChange,\r\n };\r\n\r\n const flucPanelEnabled = this.props.options.isFluctuationsEnabled &&\r\n !(this.isFilterActive()) &&\r\n this.state.granularitySelectionId === 1 &&\r\n this.state.isDataAvailable;\r\n\r\n this.activities.chartActionActivity.trace('Chart Render finishes', 'InlineChartAction');\r\n this.activities.chartActionActivity.trace(`Chart Width: ${this.state.chartWidth}`, 'InlineChartAction');\r\n\r\n this.panelRef = React.createRef();\r\n\r\n const primaryMetricOptions = {\r\n metricsList: this.primaryMetricsList,\r\n selectedItem: primarySelection,\r\n percentage: this.state.primaryMetricPercentage,\r\n selectionChangeCallback: this.onPrimaryMetricChange,\r\n };\r\n\r\n const secondaryMetricOptions = {\r\n metricsList: this.secondaryMetricsList,\r\n selectedItem: secondarySelection,\r\n percentage: this.state.secondaryMetricPercentage,\r\n selectionChangeCallback: this.onSecondaryMetricChange,\r\n };\r\n\r\n return this.state.isShowChart ? (\r\n \r\n
    \r\n {!this.props.options.hideChartPanel && }\r\n
    \r\n {chart}\r\n {flucPanelEnabled ?\r\n { this.panelRef = r; }}\r\n fluctuations={this.generateFlucData()}\r\n updateFlucData={(data) => { this.updateFlucData(data); }}\r\n updateLoadingStatus={loading => this.updateLoadingStatus(loading)}\r\n chart={this.chart}\r\n primaryMetricId={this.state.primaryMetricSelectionId}\r\n secondaryMetricId={this.state.secondaryMetricSelectionId}\r\n onPrimaryMetricChange={this.onPrimaryMetricChange}\r\n chartLabelRef={this.chartLabelRef}\r\n chartLabelStatus={{\r\n isShowStartDateLabel: this.state.isShowStartDateLabel,\r\n isShowEndDateLabel: this.state.isShowEndDateLabel,\r\n }}\r\n onFlucDismiss={this.dismissFluc}\r\n onChartLabelToggle={this.onToggleLabel}\r\n dateRange={{\r\n startDate: this.state.dateRange.start,\r\n endDate: this.state.dateRange.end,\r\n }}\r\n deps={{\r\n i18n: this.props.i18n,\r\n context: this.props.options.pageContext,\r\n instrumentation: this.props.options.instrumentation,\r\n token: this.props.options.token,\r\n imagePath: this.props.options.imagePath,\r\n }}\r\n /> : null}\r\n
    \r\n
    \r\n \r\n ) : null;\r\n }\r\n}\r\n\r\nInlineChartInternal.propTypes = {\r\n /** Is show chart toggle button set */\r\n isShowChart: PropTypes.bool.isRequired,\r\n /** i18n */\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n formatDate: PropTypes.func,\r\n }).isRequired,\r\n\r\n /** Callback to fire when inline chart call is fetched */\r\n onFetchPerfData: PropTypes.func,\r\n /** Filter Object */\r\n filter: PropTypes.shape({\r\n odataV4: PropTypes.func,\r\n }),\r\n /** Data source manager */\r\n dataSource: PropTypes.shape({\r\n findAll: PropTypes.func,\r\n }).isRequired,\r\n /** Inline chart options */\r\n options: PropTypes.shape({\r\n entityType: PropTypes.string,\r\n isFluctuationsEnabled: PropTypes.bool,\r\n isFluctuationsExperiementEnabled: PropTypes.bool,\r\n hideChartPanel: PropTypes.bool,\r\n defaultPrimaryMetric: PropTypes.number,\r\n token: PropTypes.string,\r\n path: PropTypes.string,\r\n imagePath: PropTypes.string,\r\n instrumentation: PropTypes.shape({\r\n addScenario: PropTypes.func,\r\n inlineChart: PropTypes.shape({\r\n create: PropTypes.func,\r\n }),\r\n fluctuation: PropTypes.shape({\r\n create: PropTypes.func,\r\n }),\r\n }),\r\n pageContext: PropTypes.shape({\r\n CurrentCustomer: PropTypes.shape({\r\n Id: PropTypes.number,\r\n }),\r\n CurrentCampaign: PropTypes.shape({\r\n Id: PropTypes.number,\r\n }),\r\n CurrentAdGroup: PropTypes.shape({\r\n Id: PropTypes.number,\r\n }),\r\n CurrentAccount: PropTypes.shape({\r\n Id: PropTypes.number,\r\n }),\r\n CurrentUser: PropTypes.shape({\r\n Id: PropTypes.number,\r\n IsInternal: PropTypes.bool,\r\n }),\r\n CurrentTabId: PropTypes.string,\r\n CurrentGridName: PropTypes.string,\r\n Permissions: PropTypes.shape({\r\n IsViewThroughConversionEnabled: PropTypes.bool,\r\n dynamic: PropTypes.shape({\r\n FluctuationsWithoutRecCheck: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n }),\r\n /** Preference store options */\r\n preference: PropTypes.shape({\r\n setInlineChartInfo: PropTypes.func,\r\n getInlineChartInfo: PropTypes.func,\r\n }),\r\n /** Page State */\r\n pageState: PropTypes.shape({\r\n getPromise: PropTypes.func,\r\n get: PropTypes.func,\r\n }),\r\n /** Fluctuation fetch service */\r\n fluctuationService: PropTypes.func,\r\n /** Date picker change handler */\r\n addDateChangeListener: PropTypes.func,\r\n /** Resize window change listener to set highchart container width */\r\n resizeChartListener: PropTypes.func,\r\n resizeEventHandler: PropTypes.func,\r\n /**\r\n * Theme colors, can be null\r\n */\r\n seriesColors: PropTypes.shape({\r\n primary: PropTypes.shape({\r\n original: PropTypes.string,\r\n comparative: PropTypes.string,\r\n }),\r\n secondary: PropTypes.shape({\r\n original: PropTypes.string,\r\n comparative: PropTypes.string,\r\n }),\r\n }),\r\n disableMovingAverage: PropTypes.bool,\r\n lowestSupportedGranularity: PropTypes.string,\r\n gridCriterionType: PropTypes.string,\r\n customMetricNameList: PropTypes.arrayOf(PropTypes.string),\r\n }).isRequired,\r\n dateRange: PropTypes.shape({}),\r\n perfMarker: perfMarkerPropTypes,\r\n serverContext: PropTypes.shape({\r\n DynamicPermissions: PropTypes.shape({\r\n InlineChartColumnMerticsEnabled: PropTypes.bool,\r\n CampaignsCombineGridAndChartOdataCallEnabled: PropTypes.bool,\r\n }),\r\n }),\r\n gridDataSource: PropTypes.shape({\r\n onLoading: PropTypes.func.isRequired,\r\n getChartData: PropTypes.func.isRequired,\r\n updateChartData: PropTypes.func.isRequired,\r\n }),\r\n customFilter: PropTypes.shape({}),\r\n scope: PropTypes.shape({\r\n values: PropTypes.shape({\r\n adGroupId: PropTypes.number,\r\n }),\r\n }),\r\n};\r\n\r\nInlineChartInternal.defaultProps = {\r\n filter: null,\r\n onFetchPerfData: () => {\r\n _.noop();\r\n },\r\n dateRange: null,\r\n perfMarker: null,\r\n serverContext: null,\r\n gridDataSource: null,\r\n customFilter: null,\r\n scope: {\r\n values: {\r\n adGroupId: 0,\r\n },\r\n },\r\n};\r\n\r\nexport const InlineChart = withGlobalFilter(InlineChartInternal);\r\n","import CircleSolidSmall from '../media/CircleSolidSmall.svg';\r\nimport DiamondSolidSmall from '../media/DiamondSolidSmall.svg';\r\nimport TriangleDownSolidSmall from '../media/TriangleDownSolidSmall.svg';\r\nimport TriangleUpSolidSmall from '../media/TriangleUpSolidSmall.svg';\r\nimport SquareSolidSmall from '../media/SquareSolidSmall.svg';\r\n\r\nexport const competitionCardStyle = {\r\n '.competition-card': {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n paddingBottom: 16,\r\n '& .vnext-legend-labels-container': {\r\n paddingLeft: 10,\r\n paddingTop: 10,\r\n\r\n '& ul': {\r\n display: 'flex',\r\n listStyle: 'none',\r\n paddingLeft: 0,\r\n\r\n '& li': {\r\n minWidth: 60,\r\n\r\n '& .legend-label': {\r\n height: 20,\r\n paddingLeft: '15PX !important',\r\n backgroundRepeat: 'no-repeat',\r\n backgroundPosition: 'left',\r\n backgroundSize: '12px 20px',\r\n marginRight: 5,\r\n marginLeft: 5,\r\n marginTop: 1,\r\n cursor: 'pointer',\r\n textOverflow: 'ellipsis',\r\n overflow: 'hidden',\r\n whiteSpace: 'nowrap',\r\n },\r\n\r\n '& .legend-label.disabled': {\r\n opacity: '50%',\r\n },\r\n },\r\n '& li:nth-child(1) .legend-label': {\r\n backgroundImage: `url(\"${CircleSolidSmall}\")`,\r\n },\r\n '& li:nth-child(2) .legend-label': {\r\n backgroundImage: `url(\"${DiamondSolidSmall}\")`,\r\n },\r\n '& li:nth-child(3) .legend-label': {\r\n backgroundImage: `url(\"${TriangleDownSolidSmall}\")`,\r\n },\r\n '& li:nth-child(4) .legend-label': {\r\n backgroundImage: `url(\"${TriangleUpSolidSmall}\")`,\r\n },\r\n '& li:nth-child(5) .legend-label': {\r\n backgroundImage: `url(\"${SquareSolidSmall}\")`,\r\n },\r\n },\r\n },\r\n '& .react-highchart-wrapper > div[role=\"region\"]': {\r\n overflow: 'visible !important',\r\n },\r\n '& .highcharts-container': {\r\n overflow: 'visible !important',\r\n\r\n '& .chart-tooltip': {\r\n fontFamily: '\"Segoe UI\", Tahoma, Geneva, Verdana, sans-serif',\r\n fontSize: 14,\r\n position: 'absolute',\r\n whiteSpace: 'nowrap',\r\n color: 'rgb(51, 51, 51)',\r\n padding: 15,\r\n display: 'block',\r\n boxShadow: '0 3.2px 7.2px 0 rgba(0,0,0,.132), 0 0.6px 1.8px 0 rgba(0,0,0,.108)',\r\n backgroundColor: 'rgba(255, 255, 255, 0.95)',\r\n '@supports (backdrop-filter: blur(60px))': {\r\n backdropFilter: 'blur(60px)',\r\n backgroundColor: 'rgba(255, 255, 255, 0.25)',\r\n },\r\n\r\n '& .segment-wrapper': {\r\n marginBottom: 10,\r\n },\r\n\r\n '& .tooltip-name-container': {\r\n display: 'flex',\r\n marginBottom: 10,\r\n '& .tooltip-legend': {\r\n height: 20,\r\n width: 12,\r\n backgroundRepeat: 'no-repeat',\r\n },\r\n '& .tooltip-legend#legend0': {\r\n backgroundImage: `url(\"${CircleSolidSmall}\")`,\r\n },\r\n '& .tooltip-legend#legend1': {\r\n backgroundImage: `url(\"${DiamondSolidSmall}\")`,\r\n },\r\n '& .tooltip-legend#legend2': {\r\n backgroundImage: `url(\"${TriangleDownSolidSmall}\")`,\r\n },\r\n '& .tooltip-legend#legend3': {\r\n backgroundImage: `url(\"${TriangleUpSolidSmall}\")`,\r\n },\r\n '& .tooltip-legend#legend4': {\r\n backgroundImage: `url(\"${SquareSolidSmall}\")`,\r\n },\r\n '& .tooltip-name': {\r\n marginLeft: 6,\r\n },\r\n },\r\n },\r\n },\r\n },\r\n '.competition-card .selector-container': {\r\n float: 'left',\r\n marginBottom: 12,\r\n },\r\n '.competition-card .competition_action .competition_clickLink': {\r\n flex: '0 0 auto',\r\n },\r\n '.competition-card .competition-graph': {\r\n flex: '1',\r\n },\r\n '.competition-card .tile-content .error-msg': {\r\n paddingTop: 100,\r\n display: 'flex',\r\n width: '100%',\r\n justifyContent: 'center',\r\n },\r\n '.competition-card .competition-empty': {\r\n height: 234,\r\n textAlign: 'center',\r\n display: 'inline-block',\r\n width: '100%',\r\n },\r\n '.competition-card .competition-empty .competition-empty-text': {\r\n position: 'relative',\r\n top: '50%',\r\n W: 'translateY(-50%)',\r\n M: 'translateY(-50%)',\r\n transform: 'translateY(-50%)',\r\n },\r\n '.competition-card-in-toolbar': {\r\n order: '2',\r\n margin: '0 5px 0 10px',\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '.competition-card .selector-container, .competition-card-in-toolbar .selector-container': {\r\n lineHeight: 'normal !important',\r\n fontWeight: '400',\r\n fontSize: '14px !important',\r\n },\r\n '.competition-card .selector-container .btn, .competition-card-in-toolbar .selector-container .btn': {\r\n border: '0',\r\n padding: 1,\r\n fontWeight: 'normal',\r\n },\r\n '.competition-card .selector-container .truncated, .competition-card-in-toolbar .selector-container .truncated': {\r\n marginRight: 5,\r\n },\r\n '.competition-card .domain-selector-header, .competition-card-in-toolbar .domain-selector-header': {\r\n paddingLeft: 10,\r\n paddingRight: 10,\r\n paddingTop: 10,\r\n },\r\n '.selector-v2': {\r\n width: 300,\r\n padding: '0',\r\n },\r\n '.selector-v2 .selector__filter': {\r\n padding: 10,\r\n },\r\n '.selector-v2 .selector__filter .search-box__input[type=\"text\"]': {\r\n width: '100%',\r\n },\r\n '.selector-v2 .selector__data-host': {\r\n position: 'relative',\r\n minHeight: 40,\r\n },\r\n '.selector-v2 .selector__data-progress-backdrop': {\r\n backgroundColor: 'white',\r\n bottom: '0',\r\n left: '0',\r\n opacity: '0.8',\r\n position: 'absolute',\r\n right: '0',\r\n top: '0',\r\n },\r\n '.selector-v2 .selector__data-progress-overlay': {\r\n backgroundColor: 'white',\r\n height: 40,\r\n left: '50%',\r\n lineHeight: 40,\r\n marginLeft: -60,\r\n marginTop: -20,\r\n overflowX: 'hidden',\r\n overflowY: 'hidden',\r\n position: 'absolute',\r\n textAlign: 'center',\r\n textOverflow: 'ellipsis',\r\n top: '50%',\r\n width: 120,\r\n whiteSpace: 'pre',\r\n },\r\n '.selector-v2 .selector__data-progress-overlay span': {\r\n verticalAlign: 'middle',\r\n },\r\n '.selector-v2 .selector__data': {\r\n maxHeight: 360,\r\n overflowY: 'auto',\r\n position: 'relative',\r\n },\r\n '.selector-v2 .selector__data-progress-overlay .progress__icon': {\r\n display: 'inline-block',\r\n backgroundRepeat: 'no-repeat',\r\n width: 40,\r\n height: 30,\r\n },\r\n '.selector-v2 .selector__grid-host .table.grid': {\r\n marginBottom: 0,\r\n cursor: 'pointer',\r\n },\r\n '.selector-v2 .selector__grid-host .table.grid > tbody > tr > td.table__cell--icon': {\r\n width: 30,\r\n paddingLeft: 7,\r\n },\r\n '.selector-v2 .selector__grid-host .table.grid > tbody > tr:hover': {\r\n backgroundColor: '#f3f2f1',\r\n },\r\n '.selector-v2 .selector__grid-host .table.grid > thead > tr:hover': {\r\n backgroundColor: '#f3f2f1',\r\n },\r\n '.selector-v2 .selector__grid-host td': {\r\n whiteSpace: 'pre',\r\n },\r\n '.selector-v2 .selector__list-checkbox, .selector-v2 .column-tri-state-checkbox': {\r\n height: '20px',\r\n width: '20px',\r\n '& > span:after': {\r\n display: 'inline-block',\r\n backgroundColor: '#fff',\r\n border: '1px solid rgba(155, 155, 155, 0.57)',\r\n borderRadius: '2px',\r\n color: 'transparent',\r\n content: '\"\\\\E73E\"',\r\n height: '20px',\r\n width: '20px',\r\n fontFamily: 'MsAds MDL2 Assets',\r\n fontSize: '16px',\r\n fontWeight: '400',\r\n paddingTop: '1px',\r\n textAlign: 'center',\r\n },\r\n '& > span.glyphicon-ok:before': {\r\n content: '\"\" !important',\r\n },\r\n '& > span.glyphicon-ok:after': {\r\n content: '\"\\\\E73E\"',\r\n backgroundColor: '#0078d4',\r\n borderColor: '#0078d4',\r\n color: '#fff',\r\n },\r\n },\r\n '.selector-v2 .selector__no-data-message, .selector-v2 .selector__progress': {\r\n lineHeight: 38,\r\n minHeight: 40,\r\n paddingLeft: 10,\r\n },\r\n '.selector-v2 .selector__no-data-message span, .selector-v2 .selector__progress span': {\r\n verticalAlign: 'middle',\r\n },\r\n '.selector-v2 .selector__no-data-message .progress__icon, .selector-v2 .selector__progress .progress__icon': {\r\n display: 'inline-block',\r\n backgroundRepeat: 'no-repeat',\r\n width: 40,\r\n height: 30,\r\n marginRight: 10,\r\n },\r\n '.selector-v2 .selector__filter-pill': {\r\n paddingLeft: 10,\r\n marginTop: 10,\r\n },\r\n '.selector-v2 .selector__filter-pill .pill-control': {\r\n display: 'inline-block',\r\n marginBottom: '0',\r\n verticalAlign: 'middle',\r\n },\r\n '.selector-v2 .selector__filter-pill .pill-control__list--links': {\r\n listStyle: 'none',\r\n marginBottom: '0',\r\n paddingLeft: '0',\r\n },\r\n '.selector-v2 .selector__filter-pill .pill-control__list-item--links': {\r\n float: 'left',\r\n marginLeft: 7,\r\n },\r\n '.selector-v2 .selector__filter-pill .pill-control__list-item--links a': {\r\n textDecoration: 'none',\r\n },\r\n '.selector-v2 .selector__filter-pill-label': {\r\n verticalAlign: 'middle',\r\n },\r\n '.selector-v2 .search-box-v2 .search-box__input-group': {\r\n position: 'relative',\r\n overflow: 'hidden',\r\n },\r\n '.selector-v2 .search-box-v2 .search-box__input': {\r\n padding: '3px 8px',\r\n paddingLeft: 33,\r\n border: '1px solid #bbbbbb',\r\n display: 'block',\r\n width: '100%',\r\n fontSize: '1em',\r\n '&:focus, &:hover': {\r\n border: '1px #0078d4 solid',\r\n },\r\n },\r\n '.selector-v2 .search-box-v2 .search-box__icon': {\r\n position: 'absolute',\r\n left: 6,\r\n fontSize: 12,\r\n color: '#605e5c',\r\n fontFamily: '\"MsAds MDL2 Assets\"',\r\n '&:hover': {\r\n cursor: 'pointer',\r\n },\r\n '&:before': {\r\n display: 'inline-block',\r\n fontWeight: 'normal',\r\n fontStyle: 'normal',\r\n textDecoration: 'inherit',\r\n speak: 'none',\r\n fontVariant: 'normal',\r\n textTransform: 'none',\r\n verticalAlign: 'top',\r\n lineHeight: 1,\r\n WebkitFontSmoothing: 'antialiased',\r\n MozOsxFontSmoothing: 'grayscale',\r\n content: '\"\\\\E721\"',\r\n fontSize: 14,\r\n paddingTop: 4,\r\n },\r\n overflow: 'visible !important',\r\n textDecoration: 'none !important',\r\n background: 'none !important',\r\n top: 0,\r\n marginTop: 5,\r\n },\r\n '.selector-v2 .search-box-v2 .filter_search_icon_small': {\r\n '&:before': {\r\n fontSize: '14px',\r\n },\r\n height: '15px !important',\r\n display: 'inline-block !important',\r\n verticalAlign: 'text-top',\r\n marginTop: '5px',\r\n },\r\n};\r\n","import { helpbuttonStyle, convertToLocalStyle, getFluctuationPopupStyle, getFluctuationLoadingStyle } from '@bingads-webui-campaign-react/common-styles';\r\n\r\nimport conversionTrackingSetupImg from '../media/conversionTracking/ConversionTrackingSetup.svg';\r\nimport couponStepOneImg from '../media/conversionTracking/CouponStepOne.svg';\r\nimport couponStepTwoImg from '../media/conversionTracking/CouponStepTwo.svg';\r\n\r\nexport const getConversionTrackingCardStyle = palette => ({\r\n '@global': {\r\n ...getFluctuationPopupStyle({ palette }),\r\n ...getFluctuationLoadingStyle(),\r\n '.bingads-fluctuation-wrapper .card-holder__wrapper': {\r\n minWidth: '20px !important',\r\n border: 'none !important',\r\n flexDirection: 'row !important',\r\n boxShadow: 'none !important',\r\n marginBottom: -4,\r\n\r\n '& .left.carousel-control': {\r\n left: '5px !important',\r\n },\r\n\r\n '& .right.carousel-control': {\r\n right: '0px !important',\r\n width: '35px !important',\r\n },\r\n },\r\n },\r\n\r\n\r\n '.conversion-tracking-card': {\r\n ...convertToLocalStyle(helpbuttonStyle({ palette })),\r\n\r\n '& .coupon-step-one-image': {\r\n backgroundImage: `url(${couponStepOneImg})`,\r\n },\r\n\r\n '& .coupon-step-two-image': {\r\n backgroundImage: `url(${couponStepTwoImg})`,\r\n },\r\n '& .conversion-empty-state': {\r\n height: '100%',\r\n width: '100%',\r\n paddingBottom: 15,\r\n display: 'flex',\r\n flexDirection: 'column',\r\n minHeight: 1,\r\n justifyContent: 'space-around',\r\n\r\n '& .coupon-text': {\r\n fontSize: 20,\r\n fontWeight: 600,\r\n color: '#323130',\r\n textAlign: 'center',\r\n marginBottom: 10,\r\n marginTop: 10,\r\n fontFamily: 'Segoe UI',\r\n fontStyle: 'normal',\r\n },\r\n\r\n '& .coupon-steps-container': {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n '& .step-image-container': {\r\n height: 150,\r\n width: 150,\r\n display: 'flex',\r\n },\r\n '& .step': {\r\n width: '50%',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent: 'flex-start',\r\n alignItems: 'center',\r\n '& .step-image': {\r\n flex: 1,\r\n backgroundRepeat: 'no-repeat',\r\n backgroundPosition: 'center center',\r\n },\r\n },\r\n },\r\n '& .title-text': {\r\n fontSize: 16,\r\n fontWeight: 600,\r\n fontFamily: 'Segoe UI',\r\n order: 1,\r\n height: 30,\r\n },\r\n '& .subtitle-text': {\r\n fontSize: 12,\r\n fontFamily: 'Segoe UI',\r\n height: 40,\r\n order: 2,\r\n },\r\n '& .conversion-image-container': {\r\n minWidth: '0.1px',\r\n display: 'flex',\r\n justifyContent: 'flex-end',\r\n order: 0,\r\n flexDirection: 'column',\r\n flex: 1,\r\n marginBottom: 20,\r\n },\r\n '& .conversion-image': {\r\n flex: 1,\r\n backgroundRepeat: 'no-repeat',\r\n backgroundSize: 'cover',\r\n backgroundPosition: 'center center',\r\n },\r\n '& .conversion_tracking_setup_img': {\r\n backgroundImage: `url(\"${conversionTrackingSetupImg}\")`,\r\n },\r\n\r\n '& .entity-links': {\r\n order: 3,\r\n marginTop: 10,\r\n },\r\n },\r\n\r\n '& .conversion-tracking-state': {\r\n height: '100%',\r\n paddingBottom: 0,\r\n display: 'flex',\r\n flexDirection: 'column',\r\n fontSize: 12,\r\n minHeight: 1,\r\n\r\n '& .conversion-trackig-tile-error-status': {\r\n display: 'flex',\r\n flex: '1',\r\n justifyContent: 'space-between',\r\n position: 'relative',\r\n\r\n '& .alert-group': {\r\n minWidth: 35,\r\n height: 85,\r\n display: 'flex',\r\n flexDirection: 'column',\r\n flexWrap: 'nowrap',\r\n justifyContent: 'center',\r\n justifyItems: 'center',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n\r\n '& .alert-text': {\r\n fontSize: 12,\r\n fontWeight: 600,\r\n fontStyle: 'normal',\r\n fontFamily: 'Segoe UI',\r\n color: '#D13438',\r\n },\r\n '& .alert-number': {\r\n fontSize: 30,\r\n fontWeight: 700,\r\n fontStyle: 'normal',\r\n color: '#D13438',\r\n fontFamily: 'Segoe UI',\r\n },\r\n },\r\n\r\n '& .details-group': {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n flexWrap: 'nowrap',\r\n alignItems: 'flex-start',\r\n width: '85%',\r\n '& .title-group': {\r\n display: 'grid',\r\n alignContent: 'space-evenly',\r\n justifyContent: 'start',\r\n marginTop: '8px',\r\n\r\n '& .status-overview-title': {\r\n fontSize: 18,\r\n fontWeight: 600,\r\n fontStyle: 'normal',\r\n fontFamily: 'Segoe UI',\r\n color: '#323130',\r\n },\r\n '& .status-overview-subtitle': {\r\n marginTop: '16px',\r\n fontSize: 12,\r\n fontWeight: 400,\r\n fontStyle: 'normal',\r\n fontFamily: 'Segoe UI',\r\n color: '#605E5C',\r\n },\r\n },\r\n '& .errors-group': {\r\n marginTop: '24px',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n flexWrap: 'nowrap',\r\n justifyContent: 'flex-start',\r\n alignItems: 'flex-start',\r\n '& .error-status': {\r\n fontSize: 12,\r\n fontWeight: 600,\r\n fontStyle: 'normal',\r\n color: '#323130',\r\n fontFamily: 'Segoe UI',\r\n '& .error-status-number': {\r\n display: 'inline',\r\n color: '#D13438',\r\n borderBottom: '1px dashed #0078D4',\r\n },\r\n },\r\n },\r\n },\r\n },\r\n '& .conversion-tracking-grid-header': {\r\n display: 'flex',\r\n margin: '15px 0 0px',\r\n alignItems: 'flex-start',\r\n '& .popComparisonRange': {\r\n flex: '1',\r\n marginRight: 15,\r\n color: palette.neutralSecondary,\r\n display: 'inline-flex',\r\n },\r\n '& .popComparisonRange .helpbutton': {\r\n marginLeft: 5,\r\n },\r\n '& .conversion-goals-card_metric': {\r\n flex: '0',\r\n },\r\n '& .metric-container': {\r\n marginRight: 20,\r\n '& .dropdown-toggle': {\r\n height: 'inherit',\r\n },\r\n },\r\n },\r\n '& .conversion-tracking-grid-container': {\r\n display: 'flex',\r\n flex: '1 1',\r\n justifyContent: 'center',\r\n overflowY: 'auto',\r\n overflowX: 'hidden',\r\n\r\n '& .conversion-tracking-grid-empty': {\r\n alignSelf: 'center',\r\n fontSize: '14px',\r\n },\r\n '& .conversion-goals-grid': {\r\n display: 'grid',\r\n gridTemplateColumns: 'minmax(0, 25%) minmax(0, 20%) minmax(0, 20%) minmax(max-content, max-content) minmax(max-content, 1fr)',\r\n alignItems: 'stretch',\r\n flex: '1',\r\n alignSelf: 'flex-start',\r\n\r\n '& .conversion-goals-grid-row-10': {\r\n gridRow: '10',\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '& .conversion-goals-grid-row-9': {\r\n gridRow: '9',\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '& .conversion-goals-grid-row-8': {\r\n gridRow: '8',\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '& .conversion-goals-grid-row-7': {\r\n gridRow: '7',\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '& .conversion-goals-grid-row-6': {\r\n gridRow: '6',\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '& .conversion-goals-grid-row-5': {\r\n gridRow: '5',\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '& .conversion-goals-grid-row-4': {\r\n gridRow: '4',\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '& .conversion-goals-grid-row-3': {\r\n gridRow: '3',\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '& .conversion-goals-grid-row-2': {\r\n gridRow: '2',\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '& .conversion-goals-grid-row-1': {\r\n gridRow: '1',\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n },\r\n\r\n '& .conversion-goals-entity-name': {\r\n gridColumn: '1',\r\n borderRight: '1px solid #EFEFEF',\r\n display: 'flex',\r\n alignItems: 'center',\r\n minHeight: 48,\r\n paddingLeft: 10,\r\n paddingRight: 10,\r\n },\r\n '& .conversion-goals-entity-name .status': {\r\n marginRight: 5,\r\n },\r\n '& .conversion-goals-entity-name a': {\r\n overflow: 'hidden',\r\n textOverflow: 'ellipsis',\r\n minWidth: 1,\r\n whiteSpace: 'nowrap',\r\n },\r\n '& .conversion-goals-graph-decline': {\r\n gridColumn: '2',\r\n borderRight: '1px solid #CBCBCB',\r\n padding: '5px 0 5px 5px',\r\n display: 'flex',\r\n alignItems: 'center',\r\n backgroundColor: palette.neutralLighter,\r\n },\r\n '& .conversion-goals-graph-decline .decline-box': {\r\n display: 'flex',\r\n height: 30,\r\n width: '100%',\r\n },\r\n '& .conversion-goals-graph-decline .decline-box .graph-bar': {\r\n backgroundColor: palette.themePrimary,\r\n },\r\n '& .conversion-goals-graph-increase': {\r\n gridColumn: '3',\r\n borderRight: '1px solid #EFEFEF',\r\n padding: '5px 5px 5px 0',\r\n display: 'flex',\r\n alignItems: 'center',\r\n backgroundColor: palette.neutralLighter,\r\n },\r\n '& .conversion-goals-graph-increase .increase-box': {\r\n display: 'flex',\r\n height: 30,\r\n width: '100%',\r\n },\r\n '& .conversion-goals-graph-increase .increase-box .graph-bar': {\r\n backgroundColor: '#01188F',\r\n },\r\n '& .pop-change': {\r\n gridColumn: '5',\r\n fontSize: 15,\r\n color: palette.neutralPrimary,\r\n paddingLeft: 10,\r\n paddingTop: 12,\r\n textAlign: 'right',\r\n },\r\n '& .pop-change-percentage': {\r\n gridColumn: '6',\r\n fontSize: 12,\r\n color: palette.neutralSecondary,\r\n paddingLeft: 15,\r\n paddingTop: 15,\r\n textAlign: 'right',\r\n },\r\n '& .pop-range': {\r\n gridColumn: '7',\r\n fontSize: 12,\r\n color: palette.neutralSecondary,\r\n paddingLeft: 15,\r\n paddingRight: 26,\r\n paddingTop: 15,\r\n textAlign: 'right',\r\n },\r\n '& .graph-hover-target': {\r\n gridColumn: '2 / span 2',\r\n background: 'none',\r\n zIndex: '1',\r\n border: 'none !important',\r\n },\r\n '& .pop-hover-target': {\r\n gridColumn: '5 / span 2',\r\n background: 'none',\r\n zIndex: '1',\r\n border: 'none !important',\r\n },\r\n '& .graph-hover-target:hover .hover-container': {\r\n display: 'block',\r\n },\r\n '& .pop-hover-target:hover .hover-container': {\r\n display: 'block',\r\n },\r\n '& .kpi-increased .bar-icon': {\r\n display: 'inline-block',\r\n backgroundColor: '#01188F',\r\n },\r\n '& .kpi-declined .bar-icon': {\r\n display: 'inline-block',\r\n backgroundColor: '#0078D7',\r\n },\r\n '& .bar-icon': {\r\n display: 'none',\r\n width: 12,\r\n height: 12,\r\n marginRight: 3,\r\n },\r\n '& .pop-hover-target .hover-container .hover-content': {\r\n right: '-150px',\r\n },\r\n '& .graph-hover-target .hover-container .hover-content': {\r\n left: '-150px',\r\n },\r\n '& .hover-container': {\r\n position: 'absolute',\r\n display: 'none',\r\n fontSize: 12,\r\n color: '#333333',\r\n width: '0',\r\n height: '0',\r\n marginLeft: 5,\r\n\r\n '& .hover-content': {\r\n position: 'absolute',\r\n zIndex: '10',\r\n padding: 15,\r\n bottom: '0',\r\n borderRadius: 2,\r\n boxShadow: '0 3.2px 7.2px 0 rgba(0,0,0,.132), 0 0.6px 1.8px 0 rgba(0,0,0,.108)',\r\n backgroundColor: 'rgba(255, 255, 255, 0.95)',\r\n '@supports (backdrop-filter: blur(60px))': {\r\n backdropFilter: 'blur(60px)',\r\n backgroundColor: 'rgba(255, 255, 255, 0.25)',\r\n },\r\n },\r\n '& .hover-content:hover': {\r\n display: 'none',\r\n },\r\n '& .hover-content .entity-name': {\r\n wordBreak: 'break-all',\r\n paddingBottom: 10,\r\n },\r\n '& .hover-content .kpi-grid': {\r\n display: 'grid',\r\n gridTemplateColumns: 'minmax(max-content, max-content) minmax(max-content, max-content)',\r\n },\r\n '& .hover-content .kpi-grid .kpi-date-range': {\r\n paddingBottom: 10,\r\n },\r\n '& .hover-content .kpi-grid .kpi-data': {\r\n fontWeight: 'bold',\r\n },\r\n '& .hover-content .kpi-grid .kpi-current': {\r\n maxWidth: '240px',\r\n gridRow: '1',\r\n gridColumn: '1',\r\n borderRight: '1px solid #DDDDDD',\r\n paddingRight: 15,\r\n },\r\n '& .hover-content .kpi-grid .kpi-comparison': {\r\n maxWidth: '240px',\r\n gridColumn: '2',\r\n paddingLeft: 15,\r\n },\r\n '& .hover-content .kpi-grid .kpi-change': {\r\n gridRow: '2',\r\n gridColumn: '1 / span 2',\r\n paddingTop: 10,\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n },\r\n '& .conversion-goals-grid-row-1 .hover-container .hover-content, .conversion-goals-grid-row-2 .hover-container .hover-content': {\r\n top: 48,\r\n bottom: 'auto',\r\n },\r\n },\r\n '& .scroll-bar-cover': {\r\n position: 'absolute',\r\n background: 'white',\r\n },\r\n '&:hover .scroll-bar-cover': {\r\n display: 'none',\r\n },\r\n },\r\n\r\n '& .carousel-footer': {\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n paddingBottom: 15,\r\n\r\n '& .btn-primary': {\r\n fontWeight: 'bold',\r\n fontSize: 14,\r\n height: '32px',\r\n backgroundColor: palette.white,\r\n color: palette.black,\r\n padding: '0px 0px',\r\n borderRadius: '2px',\r\n border: '1px solid',\r\n borderColor: '#8a8886',\r\n\r\n minWidth: '200px',\r\n '&:hover': {\r\n backgroundColor: '#f3f2f1',\r\n },\r\n },\r\n '& .carousel-pagination': {\r\n minWidth: 150,\r\n display: 'flex',\r\n fontSize: 14,\r\n justifyContent: 'space-between',\r\n alignItems: 'center',\r\n\r\n '& .carousel-item-count': {\r\n },\r\n '& .carousel-arrows': {\r\n minWidth: 50,\r\n justifyContent: 'center',\r\n textShadow: 'none',\r\n color: palette.themePrimary,\r\n\r\n '&:hover': {\r\n color: palette.themeDarker,\r\n },\r\n },\r\n },\r\n },\r\n },\r\n ' .conversion-tracking-empty-state': {\r\n },\r\n\r\n '& .entity-links': {\r\n marginTop: 10,\r\n },\r\n '& .entity-links .view-all-clickLink': {\r\n flex: '0 0 auto',\r\n },\r\n '& .metric-picker': {\r\n padding: '0',\r\n border: '0',\r\n fontWeight: '600',\r\n margin: '0',\r\n fontSize: 12,\r\n lineHeight: 'normal',\r\n fallbacks: [\r\n {\r\n fontWeight: 'normal',\r\n },\r\n ],\r\n },\r\n },\r\n});\r\n","import computerIcon from '../media/devices/desktop.svg';\r\nimport tabletIcon from '../media/devices/tablet.svg';\r\nimport smartphoneIcon from '../media/devices/mobile.svg';\r\nimport connectedTVIcon from '../media/devices/ctv.svg';\r\n\r\nconst backgroundPatten = 'repeating-linear-gradient(90deg, transparent, transparent 5px, white 5px, white 8px)';\r\nconst gridColumnTemplate = 'minmax(0px, 1fr) minmax(max-content, 18%) minmax(max-content, 18%) minmax(max-content, 18%)';\r\nconst gridColumnTemplateFourDevices = 'minmax(0px, 1fr) minmax(max-content, 15%) minmax(max-content, 15%) minmax(max-content, 15%) minmax(max-content, 15%)';\r\nconst gridRowTemplate = 'auto auto auto auto';\r\n\r\n// colors not in palette\r\nconst computerColor = '#0078D4';\r\nconst tabletColor = '#00188F';\r\nconst smartPhoneColor = '#E3008C';\r\nconst connectedTVColor = '#4B003F';\r\n\r\nexport const getDeviceCardStyle = palette => ({\r\n '.device-card': {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n '& .device-content-grid': {\r\n display: 'grid',\r\n width: '100%',\r\n marginTop: 15,\r\n flex: '1',\r\n gridTemplateColumns: gridColumnTemplate,\r\n gridTemplateRows: gridRowTemplate,\r\n\r\n '&.device-count-4': {\r\n gridTemplateColumns: gridColumnTemplateFourDevices,\r\n },\r\n\r\n '& .graph-area': {\r\n '& .device-metric': {\r\n width: '100%',\r\n },\r\n },\r\n '& .device-grid-row-4': {\r\n '-ms-grid-row': '4',\r\n gridRow: '4',\r\n height: 75,\r\n paddingBottom: 7,\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n borderBottom: `1px solid ${palette.neutralLighter}`,\r\n\r\n '& .device-metric__metric-picker .metric-picker': {\r\n '& .dropdown-menu': {\r\n top: 'auto',\r\n bottom: '26px',\r\n },\r\n },\r\n },\r\n '& .device-grid-row-3': {\r\n '-ms-grid-row': '3',\r\n gridRow: '3',\r\n height: 75,\r\n paddingBottom: 7,\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '& .device-grid-row-2': {\r\n '-ms-grid-row': '2',\r\n gridRow: '2',\r\n height: 75,\r\n paddingBottom: 7,\r\n marginTop: 7,\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '& .device-grid-row-1': {\r\n '-ms-grid-row': '1',\r\n gridRow: '1',\r\n },\r\n '& .device-grid-row-2 .hover-content': {\r\n top: '55px !important',\r\n bottom: 'auto !important',\r\n },\r\n '& .device-grid-column-5': {\r\n '-ms-grid-column': '5',\r\n gridColumnStart: '5',\r\n },\r\n '& .device-grid-column-4': {\r\n '-ms-grid-column': '4',\r\n gridColumnStart: '4',\r\n },\r\n '& .device-grid-column-3': {\r\n '-ms-grid-column': '3',\r\n gridColumnStart: '3',\r\n },\r\n '& .device-grid-column-2': {\r\n '-ms-grid-column': '2',\r\n gridColumnStart: '2',\r\n },\r\n '& .device-grid-column-1': {\r\n '-ms-grid-column': '1',\r\n gridColumnStart: '1',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'flex-start',\r\n },\r\n '& .device-metric__metric-picker .metric-picker': {\r\n border: 'none',\r\n paddingLeft: 0,\r\n paddingRight: 0,\r\n height: '26px',\r\n\r\n '& .metric-picker__name': {\r\n lineHeight: '19px',\r\n },\r\n\r\n '& .dropdown-menu': {\r\n left: '0px',\r\n right: 'auto',\r\n },\r\n '& .metric-picker__button--single': {\r\n flex: '1',\r\n justifyContent: 'flex-start',\r\n },\r\n },\r\n '& .caret': {\r\n margin: '0px 9px',\r\n },\r\n '& .legend-container': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'flex-end',\r\n paddingRight: 10,\r\n fontWeight: '600',\r\n '& .legend-icon': {\r\n backgroundRepeat: 'no-repeat',\r\n backgroundSize: 'contain',\r\n backgroundPosition: 'center center',\r\n marginRight: 5,\r\n fontSize: '14px',\r\n lineHeight: 1,\r\n fontWeight: 'normal',\r\n display: 'flex',\r\n alignItems: 'center',\r\n height: '15px',\r\n width: '15px',\r\n },\r\n '& .legend-txt': {\r\n fontSize: '12px',\r\n lineHeight: '20px',\r\n },\r\n },\r\n '& .device-grid-column-2 .legend-container .legend-txt': {\r\n color: computerColor,\r\n },\r\n '& .device-grid-column-3 .legend-container .legend-txt': {\r\n color: tabletColor,\r\n },\r\n '& .device-grid-column-4 .legend-container .legend-txt': {\r\n color: smartPhoneColor,\r\n },\r\n '& .device-grid-column-5 .legend-container .legend-txt': {\r\n color: connectedTVColor,\r\n },\r\n '& .graph-container': {\r\n display: 'flex',\r\n background: palette.neutralLighter,\r\n position: 'relative',\r\n width: '100%',\r\n\r\n '& .device-grid-bar': {\r\n flex: '1 1 0',\r\n },\r\n '& .device-grid-bar-computer': {\r\n backgroundColor: palette.themePrimary,\r\n },\r\n '& .device-grid-bar-smartphone': {\r\n backgroundColor: smartPhoneColor,\r\n },\r\n '& .device-grid-bar-tablet': {\r\n backgroundColor: tabletColor,\r\n },\r\n '& .device-grid-bar-connectedtv': {\r\n backgroundColor: connectedTVColor,\r\n },\r\n '& .hover-container': {\r\n display: 'none',\r\n position: 'absolute',\r\n width: '0',\r\n height: '0',\r\n left: '0',\r\n fontSize: 12,\r\n color: '#333333',\r\n zIndex: '10',\r\n '& .hover-content': {\r\n position: 'absolute',\r\n padding: '15px 0',\r\n bottom: 5,\r\n left: '0',\r\n boxShadow: '0 3.2px 7.2px 0 rgba(0,0,0,.132), 0 0.6px 1.8px 0 rgba(0,0,0,.108)',\r\n backgroundColor: 'rgba(255, 255, 255, 0.95)',\r\n '@supports (backdrop-filter: blur(60px))': {\r\n backdropFilter: 'blur(60px)',\r\n backgroundColor: 'rgba(255, 255, 255, 0.25)',\r\n },\r\n },\r\n '& .hover-content .device-name': {\r\n padding: '0 15px',\r\n },\r\n '& .hover-content .metric-name': {\r\n padding: '10px 15px',\r\n },\r\n '& .hover-content .hover-kpi-container': {\r\n display: 'flex',\r\n whiteSpace: 'nowrap',\r\n },\r\n '& .hover-content .hover-kpi-container__date-range': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '& .hover-content .hover-kpi-container__date-range__color-block': {\r\n width: 12,\r\n height: 12,\r\n marginRight: 3,\r\n },\r\n '& .hover-content .hover-kpi-container__date-range .color-block-current-computer': {\r\n background: computerColor,\r\n },\r\n '& .hover-content .hover-kpi-container__date-range .color-block-current-smartphone': {\r\n background: smartPhoneColor,\r\n },\r\n '& .hover-content .hover-kpi-container__date-range .color-block-current-tablet': {\r\n background: tabletColor,\r\n },\r\n '& .hover-content .hover-kpi-container__date-range .color-block-current-connectedtv': {\r\n background: connectedTVColor,\r\n },\r\n '& .hover-content .hover-kpi-container__date-range .color-block-period-computer': {\r\n background: computerColor,\r\n backgroundImage: backgroundPatten,\r\n },\r\n '& .hover-content .hover-kpi-container__date-range .color-block-period-smartphone': {\r\n background: smartPhoneColor,\r\n backgroundImage: backgroundPatten,\r\n },\r\n '& .hover-content .hover-kpi-container__date-range .color-block-period-tablet': {\r\n background: tabletColor,\r\n backgroundImage: backgroundPatten,\r\n },\r\n '& .hover-content .hover-kpi-container__date-range .color-block-period-connectedtv': {\r\n background: connectedTVColor,\r\n backgroundImage: backgroundPatten,\r\n },\r\n '& .hover-content .hover-kpi-container__hover-kpi': {\r\n padding: '0 15px',\r\n },\r\n '& .hover-content .hover-kpi-container .hover-kpi-container__hover-kpi+.hover-kpi-container__hover-kpi': {\r\n borderLeft: '1px solid #DDDDDD',\r\n },\r\n '& .hover-content .hover-kpi-container__value': {\r\n paddingTop: 10,\r\n fontWeight: 'bold',\r\n },\r\n '& .hover-content__kpi-change': {\r\n display: 'flex',\r\n padding: '10px 15px 0',\r\n },\r\n '& .hover-content__kpi-change__value': {\r\n fontWeight: 'bold',\r\n },\r\n '& .hover-content:hover': {\r\n display: 'none',\r\n },\r\n },\r\n '& .computer-detail': {\r\n left: 5,\r\n },\r\n '& .tablet-detail': {\r\n left: 15,\r\n },\r\n '& .smartphone-detail': {\r\n left: 25,\r\n },\r\n '& .connectedtv-detail': {\r\n left: 35,\r\n },\r\n },\r\n '& .show-computer-hover .computer-detail': {\r\n display: 'block !important',\r\n },\r\n '& .show-smartphone-hover .smartphone-detail': {\r\n display: 'block !important',\r\n },\r\n '& .show-tablet-hover .tablet-detail': {\r\n display: 'block !important',\r\n },\r\n '& .show-connectedtv-hover .connectedtv-detail': {\r\n display: 'block !important',\r\n },\r\n '& .period': {\r\n position: 'relative',\r\n marginTop: 6,\r\n height: 17,\r\n },\r\n '& .period .overlay': {\r\n position: 'absolute',\r\n display: 'flex',\r\n top: '0',\r\n bottom: '0',\r\n right: '0',\r\n left: '0',\r\n background: backgroundPatten,\r\n },\r\n '& .current': {\r\n flex: '1',\r\n },\r\n '& .small_graph .minor': {\r\n display: 'none',\r\n },\r\n '& .kpi-container': {\r\n marginTop: 15,\r\n height: 50,\r\n paddingLeft: 10,\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent: 'center',\r\n },\r\n '& .kpi-container .kpi': {\r\n display: 'flex',\r\n justifyContent: 'flex-end',\r\n paddingRight: 10,\r\n alignItems: 'baseline',\r\n },\r\n '& .kpi-container .kpi .current-value': {\r\n fontSize: '12px',\r\n marginBottom: 5,\r\n color: '#333333',\r\n },\r\n '& .kpi-container .kpi .increase': {\r\n color: '#006D21',\r\n },\r\n '& .kpi-container .kpi .decrease': {\r\n color: '#D90026',\r\n },\r\n '& .kpi-container .kpi .change-percentage': {\r\n fontSize: '12px',\r\n marginLeft: 5,\r\n },\r\n '& .kpi-container .kpi .period-value': {\r\n fontSize: '12px',\r\n color: palette.neutralSecondary,\r\n },\r\n '& .computer-icon-img': {\r\n backgroundImage: `url(\"${computerIcon}\")`,\r\n },\r\n '& .smartphone-icon-img': {\r\n backgroundImage: `url(\"${smartphoneIcon}\")`,\r\n },\r\n '& .tablet-icon-img': {\r\n backgroundImage: `url(\"${tabletIcon}\")`,\r\n },\r\n '& .connectedtv-icon-img': {\r\n backgroundImage: `url(\"${connectedTVIcon}\")`,\r\n },\r\n },\r\n '& .device-links': {\r\n margin: '10px 0 16px',\r\n },\r\n '& .device-links .view-all-clickLink': {\r\n flex: '0 0 auto',\r\n },\r\n '& .device-error': {\r\n alignSelf: 'center',\r\n marginTop: '150px',\r\n },\r\n },\r\n '.card-holder .small_layout .device-content-grid .change-percentage': {\r\n display: 'none',\r\n },\r\n});\r\n","export const getGridCardStyle = palette => ({\r\n '.grid-card': {\r\n minHeight: 1,\r\n display: 'flex',\r\n flexDirection: 'column',\r\n '& .account-card-content .grid-cell--Name': {\r\n display: 'flex',\r\n },\r\n '& .grid-card__grid-content': {\r\n minHeight: 1,\r\n flex: '1 1 auto',\r\n position: 'relative',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n '& .grid-content': {\r\n display: 'flex',\r\n minHeight: 1,\r\n flexDirection: 'column',\r\n flex: '1',\r\n\r\n '& .no-data': {\r\n flex: '1 1 0px',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n backgroundImage: `linear-gradient(${palette.neutralQuaternaryAlt} 1px, transparent 1px)`,\r\n backgroundSize: '100px 46px',\r\n },\r\n '&>div': {\r\n display: 'flex',\r\n width: '100% !important',\r\n minHeight: 1,\r\n flexShrink: '1',\r\n },\r\n '&>div .table-container': {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n width: '100% !important',\r\n alignItems: 'stretch',\r\n },\r\n '&>div .table-container .fixed-header': {\r\n width: '100% !important',\r\n },\r\n '&>div .table-container .viewport': {\r\n display: 'flex',\r\n },\r\n },\r\n '& .scroll-bar-cover': {\r\n position: 'absolute',\r\n background: 'white',\r\n },\r\n '& .empty-content': {\r\n },\r\n '&:hover .scroll-bar-cover': {\r\n display: 'none',\r\n },\r\n },\r\n '& .grid-links': {\r\n margin: '10px 0 16px',\r\n },\r\n '& .grid-links .view-all-clickLink': {\r\n flex: '0 0 auto',\r\n },\r\n '& table': {\r\n tableLayout: 'fixed',\r\n },\r\n '& table>thead>tr>th': {\r\n backgroundColor: 'white',\r\n borderBottom: 'none',\r\n fontWeight: '600',\r\n },\r\n '& table>thead>tr>th:focus': {\r\n outline: 'none',\r\n },\r\n '& table>tbody>tr': {\r\n height: 43,\r\n },\r\n '& table>tbody>tr>td': {\r\n borderBottom: 'none',\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n verticalAlign: 'middle',\r\n padding: '6px',\r\n },\r\n '& .grid-cell--Name': {\r\n whiteSpace: 'nowrap',\r\n overflow: 'hidden',\r\n textOverflow: 'ellipsis',\r\n padding: '0 5px',\r\n fontSize: '12px',\r\n lineHeight: '20px',\r\n\r\n '& a': {\r\n overflow: 'hidden',\r\n whiteSpace: 'nowrap',\r\n textOverflow: 'ellipsis',\r\n flex: '0 1 auto',\r\n minWidth: '1px',\r\n },\r\n '& .inactive': {\r\n color: '#797775',\r\n },\r\n },\r\n '& .grid-cell--Name .search-term-detail': {\r\n fontSize: 11,\r\n color: '#666666',\r\n },\r\n '& .grid-cell--Name .search-term-detail .glyphicon': {\r\n fontFamily: '\"MsAds MDL2 Assets\"',\r\n marginRight: 5,\r\n position: 'static',\r\n },\r\n '& .grid-cell--Name .search-term-detail .actions': {\r\n display: 'flex',\r\n },\r\n '& .grid-cell--Name .search-term-detail .actions button': {\r\n border: '0',\r\n boxShadow: 'none',\r\n borderRadius: '0',\r\n backgroundColor: 'white',\r\n color: '#666666',\r\n padding: '0',\r\n },\r\n '& .grid-cell--Name .search-term-detail .actions .add': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n marginRight: 15,\r\n },\r\n '& .grid-cell--Name .search-term-detail .actions .add .glyphicon:before': {\r\n fontFamily: '\"MsAds MDL2 Assets\"',\r\n color: '#1570a6',\r\n content: '\"\\\\E710\"',\r\n },\r\n '& .grid-cell--Name .search-term-detail .actions .exclude': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '& .grid-cell--Name .search-term-detail .actions .exclude .glyphicon:before': {\r\n fontFamily: '\"MsAds MDL2 Assets\"',\r\n color: '#d90026',\r\n content: '\"\\\\E738\"',\r\n },\r\n '& .grid-cell--Name__hover-container': {\r\n position: 'absolute',\r\n display: 'none',\r\n fontSize: 12,\r\n color: '#333333',\r\n width: '0',\r\n height: '0',\r\n zIndex: '10',\r\n },\r\n '& .grid-cell--Name__hover-container .hover-content': {\r\n position: 'absolute',\r\n maxWidth: 300,\r\n padding: 15,\r\n borderRadius: 2,\r\n left: 15,\r\n bottom: 35,\r\n boxShadow: '0 3.2px 7.2px 0 rgba(0,0,0,.132), 0 0.6px 1.8px 0 rgba(0,0,0,.108)',\r\n backgroundColor: 'rgba(255, 255, 255, 0.95)',\r\n '@supports (backdrop-filter: blur(60px))': {\r\n backdropFilter: 'blur(60px)',\r\n backgroundColor: 'rgba(255, 255, 255, 0.25)',\r\n },\r\n },\r\n '& .grid-cell--Name__hover-container .hover-content:hover': {\r\n display: 'none',\r\n },\r\n '& .grid-cell--Name__hover-container .hover-content__text': {\r\n whiteSpace: 'nowrap',\r\n overflow: 'hidden',\r\n textOverflow: 'ellipsis',\r\n },\r\n '& .grid-cell--Name__hover-container .hover-content__name': {\r\n whiteSpace: 'pre',\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n paddingTop: 15,\r\n },\r\n '& .grid-cell--Name__hover-container .hover-content__name .name-value': {\r\n overflow: 'hidden',\r\n textOverflow: 'ellipsis',\r\n },\r\n '& .grid-cell--Name__hover-container .hover-content__title': {\r\n fontWeight: 'bold',\r\n whiteSpace: 'nowrap',\r\n wordBreak: 'normal',\r\n paddingTop: 15,\r\n },\r\n '& .grid-cell--Name__hover-container .hover-content__content': {\r\n overflow: 'hidden',\r\n height: '0',\r\n visibility: 'hidden',\r\n whiteSpace: 'pre',\r\n margin: '0 5px',\r\n },\r\n '& tr:nth-child(2) .grid-cell--Name__hover-container .hover-content, tr:nth-child(3) .grid-cell--Name__hover-container .hover-content': {\r\n bottom: 'auto',\r\n top: 5,\r\n },\r\n '& .status': {\r\n display: 'inline-block',\r\n marginRight: 5,\r\n },\r\n '& .grid-card-header': {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'flex-end',\r\n minWidth: 1,\r\n flex: '0 1 auto',\r\n },\r\n '& .metric-picker__name': {\r\n textAlign: 'right',\r\n },\r\n '& .metric-picker .dropdown': {\r\n position: 'absolute',\r\n zIndex: '1000',\r\n },\r\n '& .col-Name': {\r\n width: '36%',\r\n },\r\n '& .performance-metric-col-sorting': {\r\n width: '30%',\r\n },\r\n '& .performance-metric-col-non-sorting': {\r\n width: '17%',\r\n },\r\n '& .performance-metric-td-sorting': {\r\n backgroundColor: palette.neutralLighter,\r\n },\r\n '& .performance-metric-th-sorting-pop': {\r\n display: 'flex',\r\n justifyContent: 'center',\r\n },\r\n '& .performance-metric-th-sorting': {\r\n display: 'flex',\r\n justifyContent: 'flex-end',\r\n },\r\n '& .grid-card-cell--performance-metric': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '& .grid-card-cell--performance-metric .grid-card-cell__body': {\r\n flex: '1',\r\n marginRight: 10,\r\n textAlign: 'right',\r\n fontSize: '12px',\r\n lineHeight: '20px',\r\n },\r\n '& .grid-card-cell--performance-metric .grid-card-cell__extra': {\r\n flex: '1',\r\n fontSize: '80%',\r\n },\r\n '& .sort-indicator': {\r\n top: 4,\r\n marginRight: 5,\r\n },\r\n '& .table > thead > tr > th.column-header-sortable': {\r\n cursor: 'pointer',\r\n '&:hover': {\r\n backgroundColor: palette.neutralLighter,\r\n },\r\n '&:focus': {\r\n backgroundColor: palette.neutralQuaternaryAlt,\r\n outline: `1px solid ${palette.neutralSecondary}`,\r\n outlineOffset: '-1px',\r\n },\r\n '& .sort-indicator.glyphicon.glyphicon-arrow-down:before': {\r\n content: '\"\\\\EE69\"',\r\n fontFamily: 'MsAds MDL2 Assets',\r\n },\r\n '& .sort-indicator.glyphicon.glyphicon-arrow-up:before': {\r\n content: '\"\\\\EE68\"',\r\n fontFamily: 'MsAds MDL2 Assets',\r\n },\r\n '& button.dropdown-toggle': {\r\n background: 'transparent',\r\n '&:hover': {\r\n backgroundColor: palette.neutralTertiaryAlt,\r\n },\r\n '&:focus': {\r\n backgroundColor: palette.neutralSecondaryAlt,\r\n },\r\n },\r\n },\r\n },\r\n});\r\n","export const metricPickerStyle = {\r\n '.card-holder__wrapper .metric-picker': {\r\n display: 'flex',\r\n width: '100%',\r\n alignItems: 'center',\r\n justifyContent: 'flex-end',\r\n },\r\n '.card-holder__wrapper .metric-picker__button--caret': {\r\n flex: '0 0 auto',\r\n minWidth: '0',\r\n },\r\n '.card-holder__wrapper .metric-picker .dropdown-toggle': {\r\n border: 'none',\r\n height: 'auto',\r\n padding: '0 5px',\r\n },\r\n '.card-holder__wrapper .metric-picker__name': {\r\n flex: '0 1 auto',\r\n whiteSpace: 'nowrap',\r\n minWidth: 1,\r\n textOverflow: 'ellipsis',\r\n overflow: 'hidden',\r\n fontSize: '12px',\r\n },\r\n '.card-holder__wrapper .metric-picker__value': {\r\n overflow: 'hidden',\r\n textOverflow: 'ellipsis',\r\n display: 'flex',\r\n\r\n '& .metric-value': {\r\n textOverflow: 'ellipsis',\r\n whiteSpace: 'nowrap',\r\n flex: '0 1 auto',\r\n overflow: 'hidden',\r\n minWidth: 1,\r\n },\r\n\r\n '& .metric-value-info': {\r\n marginLeft: '5px',\r\n },\r\n },\r\n '.card-holder__wrapper .metric-picker__button': {\r\n border: 'none',\r\n },\r\n '.card-holder__wrapper .metric-picker__button--single': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n flexDirection: 'row',\r\n minWidth: 1,\r\n justifyContent: 'center',\r\n },\r\n};\r\n","export const metricPickerFluentV2Style = {\r\n '.overview-card .metric-picker': {\r\n display: 'flex',\r\n width: '100%',\r\n alignItems: 'center',\r\n justifyContent: 'flex-end',\r\n },\r\n '.overview-card .metric-picker__button--caret': {\r\n flex: '0 0 auto',\r\n minWidth: '0',\r\n },\r\n '.overview-card .metric-picker .dropdown-toggle': {\r\n border: 'none',\r\n height: 'auto',\r\n padding: '0 5px',\r\n },\r\n '.overview-card .metric-picker__name': {\r\n flex: '0 1 auto',\r\n whiteSpace: 'nowrap',\r\n minWidth: 1,\r\n maxWidth: 86,\r\n textOverflow: 'ellipsis',\r\n overflow: 'hidden',\r\n fontSize: '14px',\r\n },\r\n '.overview-card .metric-picker__value': {\r\n overflow: 'hidden',\r\n textOverflow: 'ellipsis',\r\n display: 'flex',\r\n maxWidth: 86,\r\n\r\n '& .metric-value': {\r\n textOverflow: 'ellipsis',\r\n whiteSpace: 'nowrap',\r\n flex: '0 1 auto',\r\n overflow: 'hidden',\r\n minWidth: 1,\r\n fontSize: '22px',\r\n fontWeight: '600',\r\n color: '#797775',\r\n },\r\n\r\n '& .metric-value-info': {\r\n marginLeft: '5px',\r\n },\r\n },\r\n '.overview-card .metric-picker__button': {\r\n border: 'none',\r\n },\r\n '.overview-card .metric-picker__button--single': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n flexDirection: 'row',\r\n minWidth: 1,\r\n justifyContent: 'center',\r\n },\r\n};\r\n","import circleSolid from '../media/chart/CircleSolid.svg';\r\nimport circleDotted from '../media/chart/CircleDotted.svg';\r\nimport diamondSolid from '../media/chart/DiamondSolid.svg';\r\nimport diamondDotted from '../media/chart/DiamondDotted.svg';\r\nimport triangleDownSolid from '../media/chart/TriangleDownSolid.svg';\r\nimport triangleDownDotted from '../media/chart/TriangleDownDotted.svg';\r\nimport triangleUpSolid from '../media/chart/TriangleUpSolid.svg';\r\nimport triangleUpDotted from '../media/chart/TriangleUpDotted.svg';\r\n\r\nexport const getPerformanceCardStyle = palette => ({\r\n '.performance-card': {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n '& .performance-card-metrics-picker': {\r\n display: 'flex',\r\n\r\n '& .metric-picker__text': {\r\n flex: '0 1 auto',\r\n minWidth: 1,\r\n\r\n '&:hover': {\r\n background: palette.neutralLighter,\r\n },\r\n },\r\n '& .performance-card-metrics-picker__metric': {\r\n display: 'flex',\r\n flex: '0 1 auto',\r\n minWidth: 1,\r\n padding: '16px 25px 27px 0px',\r\n alignItems: 'center',\r\n\r\n '& > div': {\r\n flex: '1 1 auto',\r\n minWidth: 1,\r\n display: 'flex',\r\n\r\n '& .metric-picker': {\r\n borderStyle: 'solid',\r\n borderColor: 'transparent',\r\n justifyContent: 'center',\r\n padding: '0px',\r\n height: '40px',\r\n minWidth: '60px',\r\n alignItems: 'flex-start',\r\n\r\n '&:hover': {\r\n background: 'transparent',\r\n },\r\n },\r\n },\r\n\r\n '& .marker': {\r\n backgroundRepeat: 'no-repeat',\r\n width: 14,\r\n height: 40,\r\n backgroundPosition: 'center',\r\n backgroundSize: 'contain',\r\n flex: 'none',\r\n },\r\n },\r\n\r\n '& .performance-card-metrics-picker__metric--column0': {\r\n '& .original-marker': {\r\n backgroundImage: `url(\"${circleSolid}\")`,\r\n },\r\n '& .comparison-marker': {\r\n backgroundImage: `url(\"${circleDotted}\")`,\r\n },\r\n },\r\n '& .performance-card-metrics-picker__metric--column1': {\r\n '& .original-marker': {\r\n backgroundImage: `url(\"${diamondSolid}\")`,\r\n },\r\n '& .comparison-marker': {\r\n backgroundImage: `url(\"${diamondDotted}\")`,\r\n },\r\n },\r\n '& .performance-card-metrics-picker__metric--column2': {\r\n '& .original-marker': {\r\n backgroundImage: `url(\"${triangleDownSolid}\")`,\r\n },\r\n '& .comparison-marker': {\r\n backgroundImage: `url(\"${triangleDownDotted}\")`,\r\n },\r\n },\r\n '& .performance-card-metrics-picker__metric--column3': {\r\n paddingRight: 0,\r\n '& .original-marker': {\r\n backgroundImage: `url(\"${triangleUpSolid}\")`,\r\n },\r\n '& .comparison-marker': {\r\n backgroundImage: `url(\"${triangleUpDotted}\")`,\r\n },\r\n },\r\n '& .metric-picker .metric-picker__button.metric-picker__button--caret.dropdown-toggle.btn.btn-default': {\r\n height: 'auto',\r\n },\r\n },\r\n },\r\n});\r\n","import circleSolid from '../media/chart/CircleSolid.svg';\r\nimport circleDotted from '../media/chart/CircleDotted.svg';\r\nimport diamondSolid from '../media/chart/DiamondSolid.svg';\r\nimport diamondDotted from '../media/chart/DiamondDotted.svg';\r\nimport triangleDownSolid from '../media/chart/TriangleDownSolid.svg';\r\nimport triangleDownDotted from '../media/chart/TriangleDownDotted.svg';\r\nimport triangleUpSolid from '../media/chart/TriangleUpSolid.svg';\r\nimport triangleUpDotted from '../media/chart/TriangleUpDotted.svg';\r\n\r\nconst metricPickerBorderColor = [\r\n '#2e76bc',\r\n '#022F22',\r\n '#e2068c',\r\n '#4a0b3f',\r\n];\r\n\r\nconst getMetricPickerBorderStyle = column => ({\r\n border: `1px solid ${metricPickerBorderColor[column]}`,\r\n borderRadius: '4px',\r\n});\r\n\r\nexport const getPerformanceCardFluentV2Style = palette => ({\r\n '.overview-card-container.CardType-Performance': {\r\n height: '430px',\r\n '& .overview-card': {\r\n height: '410px',\r\n },\r\n },\r\n '.overview-card .performance-graph': {\r\n flexBasis: 'auto',\r\n },\r\n '.performance-card': {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n '& .performance-card-metrics-picker': {\r\n display: 'flex',\r\n marginBottom: '20px',\r\n gap: '12px',\r\n\r\n '& .metric-picker__text': {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'flex-start',\r\n maxWidth: '86px',\r\n\r\n '&:hover': {\r\n background: palette.neutralLighter,\r\n },\r\n },\r\n '& .performance-card-metrics-picker__metric': {\r\n display: 'flex',\r\n flex: '0 1 auto',\r\n padding: '14px 4px',\r\n alignItems: 'center',\r\n justifyContent: 'flex-start',\r\n gap: '6px',\r\n\r\n border: '1px solid #d1d1d1',\r\n borderRadius: '4px',\r\n width: '160px',\r\n height: '80px',\r\n\r\n '& .marker-container': {\r\n display: 'flex',\r\n minWidth: '14px',\r\n },\r\n\r\n '& .metric-picker': {\r\n borderStyle: 'solid',\r\n borderColor: 'transparent',\r\n justifyContent: 'center',\r\n padding: '0px',\r\n height: '55px',\r\n minWidth: '60px',\r\n alignItems: 'flex-start',\r\n\r\n '&:hover': {\r\n background: 'transparent',\r\n },\r\n },\r\n\r\n '& .marker': {\r\n backgroundRepeat: 'no-repeat',\r\n width: 14,\r\n height: 48,\r\n backgroundPosition: 'center',\r\n backgroundSize: 'contain',\r\n flex: 'none',\r\n },\r\n\r\n '& .open>.dropdown-menu': {\r\n zIndex: 6,\r\n top: '20px',\r\n },\r\n },\r\n\r\n '& .performance-card-metrics-picker__metric--column0': {\r\n '& .original-marker': {\r\n backgroundImage: `url(\"${circleSolid}\")`,\r\n },\r\n '& .comparison-marker': {\r\n backgroundImage: `url(\"${circleDotted}\")`,\r\n },\r\n ...getMetricPickerBorderStyle(0),\r\n },\r\n '& .performance-card-metrics-picker__metric--column1': {\r\n '& .original-marker': {\r\n backgroundImage: `url(\"${diamondSolid}\")`,\r\n },\r\n '& .comparison-marker': {\r\n backgroundImage: `url(\"${diamondDotted}\")`,\r\n },\r\n ...getMetricPickerBorderStyle(1),\r\n },\r\n '& .performance-card-metrics-picker__metric--column2': {\r\n '& .original-marker': {\r\n backgroundImage: `url(\"${triangleDownSolid}\")`,\r\n },\r\n '& .comparison-marker': {\r\n backgroundImage: `url(\"${triangleDownDotted}\")`,\r\n },\r\n ...getMetricPickerBorderStyle(2),\r\n },\r\n '& .performance-card-metrics-picker__metric--column3': {\r\n '& .original-marker': {\r\n backgroundImage: `url(\"${triangleUpSolid}\")`,\r\n },\r\n '& .comparison-marker': {\r\n backgroundImage: `url(\"${triangleUpDotted}\")`,\r\n },\r\n ...getMetricPickerBorderStyle(3),\r\n },\r\n '& .metric-picker .metric-picker__button.metric-picker__button--caret.dropdown-toggle.btn.btn-default': {\r\n height: 'auto',\r\n },\r\n },\r\n },\r\n});\r\n","import circleSolid from '../media/chart/CircleSolid.svg';\r\nimport circleDotted from '../media/chart/CircleDotted.svg';\r\nimport diamondSolid from '../media/chart/DiamondSolid.svg';\r\nimport diamondDotted from '../media/chart/DiamondDotted.svg';\r\nimport triangleDownSolid from '../media/chart/TriangleDownSolid.svg';\r\nimport triangleDownDotted from '../media/chart/TriangleDownDotted.svg';\r\nimport triangleUpSolid from '../media/chart/TriangleUpSolid.svg';\r\nimport triangleUpDotted from '../media/chart/TriangleUpDotted.svg';\r\n\r\nexport const getPerformanceGraphStyle = palette => ({\r\n '.performance-graph': {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n flex: 'auto 1 1',\r\n flexBasis: '0',\r\n minHeight: 1,\r\n '& .performance-graph__graph': {\r\n flex: 'auto 1 1',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n\r\n '& .highcharts-el': {\r\n fontSize: '12px',\r\n height: 235,\r\n overflow: 'visible !important',\r\n '& > div.highcharts-container': {\r\n overflow: 'visible !important',\r\n zIndex: '5 !important',\r\n },\r\n\r\n '& .highcharts-root': {\r\n overflow: 'visible',\r\n },\r\n\r\n '& .highcharts-tooltip': {\r\n '& .highcharts-label-box.highcharts-tooltip-box': {\r\n opacity: 0,\r\n },\r\n '& > span': {\r\n zIndex: 1,\r\n },\r\n '& .perf-graph-tool-tip': {\r\n display: 'flex',\r\n boxShadow: '0 3.2px 7.2px 0 rgba(0,0,0,.132), 0 0.6px 1.8px 0 rgba(0,0,0,.108)',\r\n backgroundColor: 'rgba(255, 255, 255, 0.95)',\r\n '@supports (backdrop-filter: blur(60px))': {\r\n backdropFilter: 'blur(60px)',\r\n backgroundColor: 'rgba(255, 255, 255, 0.25)',\r\n },\r\n '& .charts-tooltip': {\r\n margin: '15px',\r\n\r\n '& .tool-tip-title': {\r\n marginBottom: '10px',\r\n },\r\n '& .tool-tip-properties': {\r\n display: 'grid',\r\n fallbacks: {\r\n display: '-ms-grid',\r\n },\r\n '& .tool-tip-property:nth-child(1)': {\r\n '-ms-grid-row': '1',\r\n gridRow: '1',\r\n '-ms-grid-column': '1',\r\n gridColumn: '1',\r\n marginRight: '30px',\r\n },\r\n '& .tool-tip-property:nth-child(2)': {\r\n '-ms-grid-row': '1',\r\n gridRow: '1',\r\n '-ms-grid-column': '2',\r\n gridColumn: '2',\r\n },\r\n '& .tool-tip-property:nth-child(3)': {\r\n '-ms-grid-row': '2',\r\n gridRow: '2',\r\n '-ms-grid-column': '1',\r\n gridColumn: '1',\r\n marginRight: '30px',\r\n marginTop: '10px',\r\n },\r\n '& .tool-tip-property:nth-child(4)': {\r\n '-ms-grid-row': '2',\r\n gridRow: '2',\r\n '-ms-grid-column': '2',\r\n gridColumn: '2',\r\n marginTop: '10px',\r\n },\r\n '& .tool-tip-property': {\r\n display: 'flex',\r\n\r\n '& .tool-tip-icon': {\r\n backgroundRepeat: 'no-repeat',\r\n width: 14,\r\n height: 40,\r\n backgroundPosition: 'center',\r\n backgroundSize: 'contain',\r\n marginRight: '15px',\r\n },\r\n '& .circle-solid': {\r\n backgroundImage: `url(\"${circleSolid}\")`,\r\n },\r\n '& .circle-shortdash': {\r\n backgroundImage: `url(\"${circleDotted}\")`,\r\n },\r\n '& .diamond-solid': {\r\n backgroundImage: `url(\"${diamondSolid}\")`,\r\n },\r\n '& .diamond-shortdash': {\r\n backgroundImage: `url(\"${diamondDotted}\")`,\r\n },\r\n '& .triangle-down-solid': {\r\n backgroundImage: `url(\"${triangleDownSolid}\")`,\r\n },\r\n '& .triangle-down-shortdash': {\r\n backgroundImage: `url(\"${triangleDownDotted}\")`,\r\n },\r\n '& .triangle-solid': {\r\n backgroundImage: `url(\"${triangleUpSolid}\")`,\r\n },\r\n '& .triangle-shortdash': {\r\n backgroundImage: `url(\"${triangleUpDotted}\")`,\r\n },\r\n\r\n '& .tool-tip-details': {\r\n\r\n '& .tool-tip-value': {\r\n fontSize: '16px',\r\n },\r\n },\r\n },\r\n },\r\n },\r\n },\r\n\r\n '& .perf-graph-tool-tip.pop': {\r\n '& .charts-tooltip': {\r\n margin: '15px',\r\n\r\n '& .tool-tip-properties': {\r\n display: 'block',\r\n\r\n '& .tool-tip-property + .tool-tip-property': {\r\n marginTop: '20px',\r\n },\r\n\r\n '& .tool-tip-property': {\r\n display: 'flex',\r\n marginRight: '0px !important',\r\n },\r\n },\r\n },\r\n },\r\n },\r\n\r\n '& .highcharts-root+.highcharts-axis-labels.highcharts-xaxis-labels': {\r\n top: '16px !important',\r\n },\r\n\r\n '& .highcharts-xaxis-labels+.highcharts-xaxis-labels': {\r\n marginTop: -10,\r\n },\r\n '& .highcharts-el__label--first': {\r\n },\r\n '& .highcharts-el__label--last': {\r\n },\r\n },\r\n },\r\n '& .switcher': {\r\n flex: 'auto 1 1',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n },\r\n '& .graph.graph--no-data': {\r\n margin: '0px 23px 47px 23px',\r\n borderBottom: `solid 1px ${palette.neutralQuaternaryAlt}`,\r\n flex: 'auto 1 1',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n backgroundImage: `linear-gradient(${palette.neutralQuaternaryAlt} 1px, transparent 1px)`,\r\n backgroundSize: '100px 100px',\r\n\r\n '& .graph--no-data__label': {\r\n marginTop: '80px',\r\n },\r\n },\r\n },\r\n});\r\n","import { underlineLinkStyle } from '@bingads-webui-campaign-react/common-styles';\r\n\r\nconst couponColor = '#138486';\r\n\r\nconst tagHeight = 24;\r\n\r\nconst couponFlag = {\r\n '& .coupon-right-aligned': {\r\n position: 'absolute',\r\n top: 0,\r\n right: 0,\r\n },\r\n '& .coupon-tag': {\r\n color: 'white',\r\n display: 'flex',\r\n height: tagHeight,\r\n width: 'fit-content',\r\n position: 'relative',\r\n '& ~ .oppt_detail, & ~ .tip_image_container': {\r\n marginTop: tagHeight,\r\n },\r\n '& .coupon-tag-main-triangle': {\r\n width: 0,\r\n height: 0,\r\n borderStyle: 'solid',\r\n borderWidth: [tagHeight / 2, 10],\r\n borderColor: [couponColor, couponColor, couponColor, 'transparent'],\r\n marginRight: -1,\r\n },\r\n '& .coupon-tag-message': {\r\n backgroundColor: couponColor,\r\n height: tagHeight,\r\n padding: [5, 10, 5, 0],\r\n fontSize: 10,\r\n boxSizing: 'border-box',\r\n },\r\n },\r\n};\r\n\r\nexport const getDefaultTipCardStyle = ({ palette = {} }) => ({\r\n '.tips-card': {\r\n ...couponFlag,\r\n display: 'flex',\r\n minHeight: 0.1,\r\n width: '100%',\r\n '& .deterministic-wrapper-view': {\r\n width: '100%',\r\n },\r\n '& .visuallyhidden': {\r\n border: '0',\r\n clip: 'rect(0 0 0 0)',\r\n height: '1px',\r\n margin: '-1px',\r\n overflow: 'hidden',\r\n padding: '0',\r\n position: 'absolute',\r\n width: '1px',\r\n },\r\n '& .tipsCarousel': {\r\n height: 'auto',\r\n display: 'flex',\r\n width: '100%',\r\n '& .carousel-inner': {\r\n display: 'flex',\r\n padding: '0',\r\n },\r\n '& .carousel-inner .item': {\r\n flex: '1',\r\n height: 'auto',\r\n minWidth: 1,\r\n },\r\n '& .carousel-footer': {\r\n display: 'flex',\r\n padding: '0',\r\n position: 'absolute',\r\n bottom: 0,\r\n },\r\n '& .carousel-footer .inactiveButton': {\r\n display: 'none',\r\n },\r\n '& .carousel-inner .carousel__tip_content': {\r\n display: 'flex',\r\n flex: '1',\r\n flexDirection: 'column',\r\n },\r\n '& .carousel-inner .carousel__tip_content .tip_text_content': {\r\n display: 'flex',\r\n flex: '3 3',\r\n flexDirection: 'column',\r\n order: 2,\r\n },\r\n '& .carousel-inner .carousel__tip_content .tip_text_content .tip_title': {\r\n textDecoration: 'none',\r\n margin: '12px 0px',\r\n overflow: 'hidden',\r\n flex: '0 1 auto',\r\n minHeight: 1,\r\n lineHeight: 'normal',\r\n fontSize: '18px',\r\n fontWeight: '600',\r\n },\r\n '& .carousel-inner .carousel__tip_content .tip_text_content .tip_description__wrapper': {\r\n display: 'block',\r\n flex: '1 100',\r\n overflow: 'hidden',\r\n },\r\n '& .carousel-inner .carousel__tip_content .tip_text_content .tip_description__wrapper .tip_description': {\r\n lineHeight: '20px',\r\n height: 'auto',\r\n overflow: 'hidden',\r\n fontSize: '14px',\r\n fontWeight: 'normal',\r\n margin: '0',\r\n },\r\n '& .carousel-inner .carousel__tip_content .tip_text_content .tip_links': {\r\n marginTop: 16,\r\n display: 'flex',\r\n flexShrink: '0',\r\n marginBottom: 16,\r\n },\r\n '& .carousel-inner .carousel__tip_content .tip_text_content .tip_links .linkButton': {\r\n lineHeight: '30px',\r\n },\r\n '& .carousel-inner .item .carousel__tip_content .tip_text_content .tip_links': {\r\n marginBottom: 44,\r\n },\r\n '& .carousel-inner .carousel__tip_content .tip_text_content .tip_links .tip_clickLink': {\r\n flex: '0 0 auto',\r\n '&.secondary_ClickLink': {\r\n marginLeft: 8,\r\n },\r\n },\r\n '& .carousel-inner .carousel__tip_content .tip_text_content .tip_links .tip_dismissLink': {\r\n marginLeft: 30,\r\n paddingTop: 5,\r\n },\r\n '& .carousel-inner .carousel__tip_content .tip_text_content .tip_links .tip_dismissLink a': {\r\n position: 'relative',\r\n color: '#1570A5',\r\n },\r\n '& .carousel-inner .carousel__tip_content .tip_image_container': {\r\n flex: '2 2',\r\n minWidth: '0.1px',\r\n display: 'flex',\r\n justifyContent: 'flex-end',\r\n order: 1,\r\n marginTop: '1px',\r\n flexDirection: 'column',\r\n },\r\n '& .carousel-inner .carousel__tip_content .tip_image_container .tip_image': {\r\n flex: '1',\r\n backgroundRepeat: 'no-repeat',\r\n backgroundSize: 'contain',\r\n backgroundPosition: 'center center',\r\n },\r\n '& .carousel-inner .carousel__welcome_content': {\r\n display: 'flex',\r\n flex: '1',\r\n flexDirection: 'column',\r\n },\r\n '& .carousel-inner .carousel__welcome_content .welcome_text_content': {\r\n display: 'flex',\r\n flex: '3 3',\r\n flexDirection: 'column',\r\n order: 2,\r\n },\r\n '& .carousel-inner .carousel__welcome_content .welcome_text_content .welcome_title': {\r\n textDecoration: 'none',\r\n margin: '12px 0px',\r\n overflow: 'hidden',\r\n flex: '0 1 auto',\r\n minHeight: 1,\r\n lineHeight: 'normal',\r\n fontSize: '18px',\r\n fontWeight: '600',\r\n },\r\n '& .carousel-inner .carousel__welcome_content .welcome_text_content .welcome_description__wrapper': {\r\n display: 'block',\r\n flex: '1 100',\r\n overflow: 'hidden',\r\n },\r\n '& .carousel-inner .carousel__welcome_content .welcome_text_content .welcome_description__wrapper .welcome_description': {\r\n lineHeight: '20px',\r\n height: 'auto',\r\n overflow: 'hidden',\r\n fontSize: '14px',\r\n fontWeight: 'normal',\r\n margin: '0',\r\n },\r\n '& .carousel-inner .carousel__welcome_content .welcome_text_content .welcome_links': {\r\n marginTop: 10,\r\n display: 'flex',\r\n flexShrink: '0',\r\n marginBottom: 55,\r\n },\r\n '& .carousel-inner .carousel__welcome_content .welcome_text_content .welcome_links .welcome_clickLink': {\r\n flex: '0 0 auto',\r\n },\r\n '& .carousel-inner .carousel__welcome_content .welcome_text_content .welcome_links .welcome_clickLink .linkButton': {\r\n lineHeight: '30px',\r\n },\r\n '& .carousel-inner .carousel__welcome_content .welcome_text_content .welcome_links .disabled-button': {\r\n flex: '0 0 auto',\r\n },\r\n '& .carousel-inner .carousel__welcome_content .welcome_text_content .welcome_links .disabled-button .btn-default.btn': {\r\n fontWeight: 'bold',\r\n fontSize: '13px',\r\n paddingTop: 5,\r\n paddingBottom: 5,\r\n paddingLeft: 10,\r\n paddingRight: 10,\r\n boxShadow: 'none',\r\n borderRadius: '0',\r\n color: '#666666',\r\n backgroundColor: '#F4F4F4',\r\n fallbacks: [\r\n {\r\n border: '0',\r\n },\r\n ],\r\n cursor: 'default',\r\n },\r\n '& .carousel-inner .carousel__welcome_content .welcome_text_content .welcome_links .disabled-button .btn-default.btn:focus': {\r\n outline: '0',\r\n },\r\n '& .carousel-inner .carousel__welcome_content .welcome_image_container': {\r\n flex: '2 2',\r\n minWidth: '0.1px',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n order: 1,\r\n marginTop: '1px',\r\n },\r\n '& .carousel-inner .carousel__welcome_content .welcome_image_container .welcome_image': {\r\n flex: '1',\r\n backgroundRepeat: 'no-repeat',\r\n backgroundSize: 'contain',\r\n backgroundPosition: 'center center',\r\n },\r\n '& .carousel-inner .carousel__oppt_content': {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n flex: '1',\r\n minWidth: 1,\r\n margin: '16px 0 0',\r\n },\r\n '& .carousel-inner .carousel__oppt_content .oppt_detail': {\r\n display: 'flex',\r\n flex: '1',\r\n minHeight: 1,\r\n },\r\n '& .carousel-inner .carousel__oppt_content .oppt_detail .oppt_text_content': {\r\n flex: '3 3',\r\n minWidth: 1,\r\n display: 'flex',\r\n flexDirection: 'column',\r\n },\r\n '& .carousel-inner .carousel__oppt_content .oppt_detail .oppt_text_content .oppt_title': {\r\n fontSize: '18px',\r\n lineHeight: '22px',\r\n marginBottom: '8px',\r\n fontWeight: '600',\r\n },\r\n '& .carousel-inner .carousel__oppt_content .oppt_detail .oppt_text_content .oppt_description': {\r\n fontSize: '13px',\r\n lineHeight: '18px',\r\n overflowY: 'auto',\r\n color: palette.neutralSecondary,\r\n ...underlineLinkStyle({ palette, elementLocator: '> a' }),\r\n },\r\n '& .carousel-inner .carousel__oppt_content .oppt_detail .oppt_content .oppt_description_detail': {\r\n maxWidth: '200px',\r\n color: palette.neutralSecondary,\r\n },\r\n '& .carousel-inner .carousel__oppt_content .oppt_detail .oppt_content': {\r\n marginRight: '25px',\r\n fontWeight: '600',\r\n\r\n '& .kpis': {\r\n '& .oppt_kpi.kpi-primary': {\r\n display: 'block',\r\n '& .kpi_name': {\r\n fontSize: '12px',\r\n color: '#107C10',\r\n },\r\n '& .kpi_delta': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n fontSize: '30px',\r\n lineHeight: '40px',\r\n color: '#107C10',\r\n marginRight: '0px',\r\n\r\n '& .increase-arrow:before': {\r\n content: '\"\\\\EE68\"',\r\n fontFamily: 'MsAds MDL2 Assets',\r\n },\r\n '& .decrease-arrow:before': {\r\n content: '\"\\\\EE69\"',\r\n fontFamily: 'MsAds MDL2 Assets',\r\n },\r\n },\r\n '& .kpi_change': {\r\n fontSize: '12px',\r\n lineHeight: '16px',\r\n marginBottom: '10px',\r\n },\r\n },\r\n '& .oppt_kpi': {\r\n display: 'flex',\r\n '& .positive-estimate': {\r\n color: '#107C10',\r\n },\r\n },\r\n '& .oppt_kpi.kpi-secondary': {\r\n },\r\n '& .kpi_delta': {\r\n display: 'flex',\r\n marginRight: '5px',\r\n },\r\n },\r\n '& .kpi_description': {\r\n marginTop: '10px',\r\n color: palette.neutralSecondary,\r\n },\r\n },\r\n '& .carousel-inner .carousel__oppt_content .oppt_detail .oppt_image_container': {\r\n flex: '1 1',\r\n minWidth: 1,\r\n display: 'flex',\r\n justifyContent: 'center',\r\n marginTop: '12px',\r\n marginBottom: '16px',\r\n },\r\n '& .carousel-inner .carousel__oppt_content .oppt_detail .oppt_image_container .oppt_image': {\r\n flex: '1',\r\n backgroundRepeat: 'no-repeat',\r\n backgroundSize: 'contain',\r\n backgroundPosition: 'center center',\r\n },\r\n '& .carousel-inner .carousel__oppt_content .oppt_action': {\r\n flex: '0 0 75px',\r\n minHeight: 75,\r\n },\r\n '& .carousel-inner .carousel__oppt_content .oppt_action .oppt_clickLink': {\r\n flex: '0 0 auto',\r\n },\r\n '& .carousel-inner .empty_content': {\r\n margin: '20px 10px 0',\r\n },\r\n '& .carousel-inner .active, .carousel-inner .next, .carousel-footer .activeButton, .carousel-inner .prev, .carousel-inner .left, .carousel-inner .right': {\r\n display: 'flex',\r\n },\r\n '& .carousel-inner .next, .carousel-inner .prev': {\r\n height: '100%',\r\n },\r\n },\r\n },\r\n});\r\n","import { underlineLinkStyle, crudAdStyle, helpbuttonStyle } from '@bingads-webui-campaign-react/common-styles';\r\n\r\nimport broadMatchModifierImg from '../media/tipsOpportunities/tips/broad_match_modifier.svg';\r\nimport callImg from '../media/tipsOpportunities/tips/call.svg';\r\nimport calloutExtensionsImg from '../media/tipsOpportunities/tips/callout_extensions.svg';\r\nimport convTrackingImg from '../media/tipsOpportunities/tips/conv_tracking.svg';\r\nimport createCampaignImg from '../media/tipsOpportunities/tips/create_campaign.svg';\r\nimport dynamicSearchAdsImg from '../media/tipsOpportunities/tips/dynamic_search_ads.svg';\r\nimport enhancedCpcAutobidImg from '../media/tipsOpportunities/tips/enhanced_cpc_autobid.svg';\r\nimport expandedTextAdsImg from '../media/tipsOpportunities/tips/expanded_text_ads.svg';\r\nimport googleImportImg from '../media/tipsOpportunities/tips/google_import.svg';\r\nimport kwMatchTypesImg from '../media/tipsOpportunities/tips/KW_match_types.svg';\r\nimport microsoftLogoImg from '../media/tipsOpportunities/tips/microsoft_logo.svg';\r\nimport negKeywordsImg from '../media/tipsOpportunities/tips/neg_keywords.svg';\r\nimport remarketingImg from '../media/tipsOpportunities/tips/remarketing.svg';\r\nimport reviewExtentionsImg from '../media/tipsOpportunities/tips/review_extentions.svg';\r\nimport sharedBudgetsImg from '../media/tipsOpportunities/tips/shared_budgets.svg';\r\nimport sitelinkExtensionsImg from '../media/tipsOpportunities/tips/sitelink_extensions.svg';\r\nimport structuredSnippetsImg from '../media/tipsOpportunities/tips/structured_snippets.svg';\r\nimport welcomeAddPaymentImg from '../media/tipsOpportunities/tips/welcome_add_payment.svg';\r\nimport welcomeCoachingImg from '../media/tipsOpportunities/tips/welcome_coaching.svg';\r\nimport welcomeCouponImg from '../media/tipsOpportunities/tips/welcome_coupon.svg';\r\nimport welcomeHelpImg from '../media/tipsOpportunities/tips/welcome_help.svg';\r\nimport addNewAdsImg from '../media/tipsOpportunities/opportunities/AddNewAds.svg';\r\nimport addNewKeywordImg from '../media/tipsOpportunities/opportunities/AddNewKeyword.svg';\r\nimport adSchedulingImg from '../media/tipsOpportunities/opportunities/AdScheduling.svg';\r\nimport budgetOppoImg from '../media/tipsOpportunities/opportunities/BudgetOppo.svg';\r\nimport calloutExtensionImg from '../media/tipsOpportunities/opportunities/CalloutExtension.svg';\r\nimport competitiveBidImg from '../media/tipsOpportunities/opportunities/CompetitiveBid.svg';\r\nimport firstpageOppoImg from '../media/tipsOpportunities/opportunities/FirstpageOppo.svg';\r\nimport firstPositionImg from '../media/tipsOpportunities/opportunities/FirstPosition.svg';\r\nimport googleAdImportImg from '../media/tipsOpportunities/opportunities/GAImport.svg';\r\nimport keywordBidImg from '../media/tipsOpportunities/opportunities/KeywordBid.svg';\r\nimport kwBroadMatchImg from '../media/tipsOpportunities/opportunities/KWBroadMatch.svg';\r\nimport kwBroadMatchModifierImg from '../media/tipsOpportunities/opportunities/KWBroadMatchModifier.svg';\r\nimport locationBidImg from '../media/tipsOpportunities/opportunities/LocationBid.svg';\r\nimport mainlineOppoImg from '../media/tipsOpportunities/opportunities/MainlineOppo.svg';\r\nimport remarketingBidImg from '../media/tipsOpportunities/opportunities/RemarketingBid.svg';\r\nimport sitelinkExtensionImg from '../media/tipsOpportunities/opportunities/SitelinkExtension.svg';\r\n\r\nconst tagHeight = 24;\r\nconst flyoutOffset = 16;\r\n\r\nconst couponFlyout = {\r\n '.flyout-popup-class-position': {\r\n zIndex: 5,\r\n '& .popover-view__dismiss': {\r\n display: 'none',\r\n },\r\n '&.right': {\r\n transform: 'translateX(15px)',\r\n '& .coupon-tag-flyout-content': {\r\n '&:after, &:before': {\r\n right: '100%',\r\n },\r\n '&:after': {\r\n borderColor: ['transparent', 'white', 'transparent', 'transparent'],\r\n marginRight: -2,\r\n },\r\n '&:before': {\r\n borderColor: ['transparent', 'lightgrey', 'transparent', 'transparent'],\r\n },\r\n },\r\n },\r\n '&.left': {\r\n transform: 'translateX(-15px)',\r\n '& .coupon-tag-flyout-content': {\r\n '&:after, &:before': {\r\n left: '100%',\r\n },\r\n '&:after': {\r\n borderColor: ['transparent', 'transparent', 'transparent', 'white'],\r\n marginLeft: -2,\r\n },\r\n '&:before': {\r\n borderColor: ['transparent', 'transparent', 'transparent', 'lightgrey'],\r\n },\r\n },\r\n },\r\n '& .flyout-popup-class': {\r\n marginTop: -flyoutOffset - tagHeight,\r\n '& .coupon-tag-flyout': {\r\n '& .coupon-tag-flyout-content': {\r\n backgroundColor: 'white',\r\n border: '1px solid lightgrey',\r\n padding: 10,\r\n color: 'black',\r\n width: 280,\r\n boxShadow: '3px 3px 4px #dddddd',\r\n '&:after, &:before': {\r\n top: -(tagHeight / 2),\r\n borderStyle: 'solid',\r\n content: '\" \"',\r\n height: 0,\r\n width: 0,\r\n position: 'absolute',\r\n pointerEvents: 'none',\r\n },\r\n '&:after': {\r\n borderWidth: 10.5,\r\n marginTop: -10.5,\r\n },\r\n '&:before': {\r\n borderWidth: 11,\r\n marginTop: -10,\r\n },\r\n '& .coupon-tag-flyout-line1': {\r\n fontWeight: 'bold',\r\n },\r\n '& .coupon-tag-flyout-line2': {\r\n color: 'red',\r\n marginBottom: 0,\r\n },\r\n },\r\n },\r\n },\r\n },\r\n};\r\n\r\nexport const getTipCardStyle = palette => ({\r\n ...couponFlyout,\r\n '.tips-card-plus-fac': {\r\n position: 'relative',\r\n display: 'flex',\r\n },\r\n // estimates tile\r\n '.recommendation-estimation-tile': {\r\n fontSize: '12px',\r\n lineHeight: '15px',\r\n fontFamily: \"'Segoe UI', Arial, sans-serif\",\r\n display: '-ms-grid',\r\n '&.neutral-estimate': {\r\n color: 'gray',\r\n fontSize: 28,\r\n },\r\n '& .positive-estimate': {\r\n color: '#107C10',\r\n fontSize: 28,\r\n },\r\n '& .estimate-second-primary': {\r\n marginTop: '10px',\r\n '& .estimate-second-primary-titile': {\r\n width: '124px',\r\n lineHeight: '15px',\r\n fontWeight: 'bold',\r\n MsGridRow: 1,\r\n gridRow: 1,\r\n },\r\n '& .estimate-second-primary-increase': {\r\n width: '124px',\r\n lineHeight: '36px',\r\n fontWeight: 'bold',\r\n MsGridRow: 2,\r\n gridRow: 2,\r\n },\r\n },\r\n '& .estimate-primary-titile': {\r\n width: '124px',\r\n lineHeight: '15px',\r\n fontWeight: 'bold',\r\n MsGridRow: 1,\r\n gridRow: 1,\r\n fontSize: '12px !important',\r\n },\r\n '& .estimate-primary-increase': {\r\n width: '124px',\r\n lineHeight: '36px',\r\n fontWeight: 'bold',\r\n MsGridRow: 2,\r\n gridRow: 2,\r\n '& .recommendation-arrow-icon': {\r\n top: '10px',\r\n position: 'relative',\r\n '&:before': {\r\n fontSize: '20px!important',\r\n },\r\n },\r\n },\r\n '& .estimate-primary-from-to': {\r\n fontSize: '12px',\r\n lineHeight: '15px',\r\n width: '126px',\r\n whiteSpace: 'pre-wrap',\r\n MsGridRow: 3,\r\n gridRow: 3,\r\n color: 'gray',\r\n },\r\n '& .estimate-secondary': {\r\n margin: '8px 0 0 0',\r\n fontSize: '12px',\r\n lineHeight: '15px',\r\n MsGridRow: 4,\r\n gridRow: 4,\r\n '.estimate-secondary-value': {\r\n fontWeight: 'bold',\r\n },\r\n '.estimate-secondary-title': {\r\n fontWeight: 'normal',\r\n },\r\n },\r\n '& .estimate-tertiary': {\r\n fontSize: '12px',\r\n lineHeight: '15px',\r\n MsGridRow: 5,\r\n gridRow: 5,\r\n '& .estimate-tertiary-value': {\r\n fontWeight: 'normal',\r\n },\r\n '& .estimate-tertiary-title': {\r\n fontWeight: 'normal',\r\n },\r\n },\r\n '& .estimate-cost': {\r\n fontSize: '12px',\r\n lineHeight: '15px',\r\n color: 'black',\r\n MsGridRow: 6,\r\n gridRow: 6,\r\n '& .estimate-cost-value': {\r\n fontWeight: 'normal',\r\n },\r\n '& .estimate-cost-title': {\r\n fontWeight: 'normal',\r\n },\r\n },\r\n '& .estimate-note': {\r\n margin: '8px 0 0 0',\r\n fontSize: '12px',\r\n lineHeight: '15px',\r\n MsGridRow: 7,\r\n gridRow: 7,\r\n color: 'gray',\r\n },\r\n },\r\n '& .summary-header-menu .bingads-popover': {\r\n right: 5,\r\n },\r\n '& >.toolbar': {\r\n marginLeft: 10,\r\n '& .upper-toolbar': {\r\n display: 'inline-block',\r\n },\r\n },\r\n '& .empty-buttons': {\r\n marginTop: 36,\r\n },\r\n\r\n // empty view\r\n '& .empty-filter-view': {\r\n margin: '160px',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n\r\n '& .empty-icon': {\r\n display: 'inline-block',\r\n marginRight: 62,\r\n\r\n img: {\r\n width: 200,\r\n height: 200,\r\n },\r\n },\r\n\r\n '& .empty-details': {\r\n display: 'inline-block',\r\n color: '#605E5C',\r\n gridRow: '1',\r\n gridColumn: '2',\r\n '& .empty-title': {\r\n fontSize: 26,\r\n margin: '0 0 8.5px',\r\n },\r\n '& .empty-sub-title': {\r\n fontSize: 14,\r\n fontWeight: 'normal',\r\n ...underlineLinkStyle({ palette }),\r\n },\r\n },\r\n },\r\n\r\n '.recommendation-summary-card': {\r\n height: '278px',\r\n width: '100%',\r\n fontFamily: '\\'Segoe UI\\', Arial, sans-serif',\r\n fontSize: 12,\r\n display: 'grid',\r\n color: '#333333',\r\n gridTemplateColumns: '100%',\r\n gridTemplateRows: 'repeat(4,auto)',\r\n '& .summary-summary': {\r\n gridRow: '1',\r\n gridTemplateRows: 'repeat(2,auto)',\r\n '& .summary-notification': {\r\n '& .recommendation-notification-container': {\r\n background: '#EFF6FC !important',\r\n display: 'flex',\r\n '& .recommendation-notification-text': {\r\n maxWidth: '90%',\r\n padding: '5px 0 5px 24px',\r\n whiteSpace: 'nowrap',\r\n overflow: 'hidden',\r\n textOverflow: 'ellipsis',\r\n },\r\n '& .recommendation-notification-help': {\r\n maxWidth: '10%',\r\n padding: '5px 10px 5px 0',\r\n },\r\n },\r\n '& .helpbutton': helpbuttonStyle({ palette })['.helpbutton'],\r\n '& .helpbutton::before': { ...helpbuttonStyle({ palette })['.helpbutton::before'], top: 0 },\r\n },\r\n '& .summary-banner': {\r\n background: '#DDDDDD',\r\n gridRow: '1',\r\n '& .summary-banner-title': {\r\n display: 'table-cell',\r\n verticalAlign: 'middle',\r\n fontWeight: 'bold',\r\n color: '#333333',\r\n height: 30,\r\n padding: '0px 24px',\r\n },\r\n },\r\n '& .summary-summary-content': {\r\n borderBottom: 'solid 1px #dddddd',\r\n paddingTop: 16,\r\n paddingBottom: 12,\r\n display: 'grid',\r\n gridRow: '3',\r\n '& .summary-card-os-tag-container': {\r\n display: 'inline-block',\r\n marginLeft: 3,\r\n '& .not-available-line': {\r\n paddingLeft: 10,\r\n paddingRight: 10,\r\n },\r\n '& .iconba.iconba-Trending12': {\r\n paddingLeft: 8,\r\n paddingRight: 8,\r\n paddingBottom: 3,\r\n },\r\n },\r\n '& .summary-info': {\r\n gridColumn: '3',\r\n maxHeight: '164px',\r\n overflowY: 'auto',\r\n\r\n '& .summary-description': {\r\n fontSize: 16,\r\n fontWeight: 'bold',\r\n color: '#323130',\r\n },\r\n '& .summary-description-os': {\r\n display: 'inline',\r\n },\r\n '& .summary-pitching': {\r\n fontSize: 12,\r\n fontWeight: 'normal',\r\n color: '#484644',\r\n marginTop: 10,\r\n '& > span': {\r\n ...underlineLinkStyle({ palette }),\r\n },\r\n },\r\n },\r\n },\r\n '& .summary-estimates': {\r\n gridColumn: '1',\r\n },\r\n '& .summary-overall-optimization-score': {\r\n gridColumn: '1',\r\n width: 124,\r\n '& .overall-optimization-score-number': {\r\n fontSize: 32,\r\n color: palette.blue,\r\n width: 124,\r\n gridRow: 2,\r\n fontWeight: 'bold',\r\n },\r\n },\r\n },\r\n '& .summary-sample': {\r\n gridRow: '2',\r\n overflowY: 'hidden',\r\n '&:hover ': {\r\n overflowY: 'auto',\r\n },\r\n '& .recommendation-sample': {\r\n '& .sample-insight-title': {\r\n marginTop: 8,\r\n fontSize: 13,\r\n fontWeight: 'normal',\r\n color: '#333333',\r\n },\r\n '& .sample-insight': {\r\n margin: '10px 0 0 0',\r\n fontSize: 13,\r\n fontWeight: 'normal',\r\n color: '#666666',\r\n },\r\n '& .sample-visual, & .sample-action-table': {\r\n margin: '8px 0 0 0',\r\n },\r\n '& .sample-horizontal-separator': {\r\n margin: '8px 0',\r\n borderTop: '1px solid #ececec',\r\n },\r\n '& .sample-action-title': {\r\n fontSize: 13,\r\n fontWeight: 'normal',\r\n color: '#333333',\r\n },\r\n '& .sample-more-recommendations': {\r\n margin: '8px 0 0 0',\r\n },\r\n },\r\n ...crudAdStyle({ palette }),\r\n '& .ad-preview-header': {\r\n padding: '0px 0 8px 0',\r\n },\r\n '& .recommendation-suggested-ads-column': {\r\n '& .recommendation-summary-ad-preview': {\r\n width: '100%',\r\n padding: '15px 15px 15px 15px',\r\n background: palette.white,\r\n border: 'solid 1px #dddddd',\r\n },\r\n },\r\n },\r\n '& .summary-footer': {\r\n bottom: '0px',\r\n position: 'absolute',\r\n gridRow: '4',\r\n '& .primary-button': {\r\n '& button': {\r\n fontFamily: 'Arial, Helvetica, sans-serif',\r\n fontWeight: 'bold',\r\n fontSize: 13,\r\n backgroundColor: palette.themePrimary,\r\n color: palette.white,\r\n padding: '5px 10px',\r\n border: '1px black solid',\r\n margin: '0 8px 0 0',\r\n '&:hover': {\r\n backgroundColor: '#006464',\r\n },\r\n },\r\n },\r\n '& .secondary-button': {\r\n '& button': {\r\n fontFamily: 'Arial, Helvetica, sans-serif',\r\n fontWeight: 'bold',\r\n fontSize: 13,\r\n backgroundColor: palette.white,\r\n color: '#000000',\r\n padding: '5px 10px',\r\n border: '1px black solid',\r\n margin: '0 8px 0 0',\r\n '&:hover': {\r\n backgroundColor: '#a8a8a8',\r\n },\r\n },\r\n },\r\n },\r\n },\r\n '.carousel-footer': {\r\n '& .btn-default': {\r\n display: 'none',\r\n },\r\n '& .btn-primary': {\r\n fontWeight: 'bold',\r\n fontSize: 14,\r\n height: '32px',\r\n backgroundColor: palette.white,\r\n color: palette.black,\r\n padding: '6px 19px',\r\n borderRadius: '2px',\r\n border: '1px solid black',\r\n minWidth: '212px',\r\n '&:hover': {\r\n backgroundColor: '#f3f2f1',\r\n },\r\n },\r\n },\r\n // recommendation visual\r\n '.action-table': {\r\n marginTop: 8,\r\n fontFamily: '\\'Segoe UI\\', Arial, sans-serif',\r\n '& thead': {\r\n '& th': {\r\n fontSize: 12,\r\n color: '#323130',\r\n fontWeight: 'bold',\r\n paddingRight: '10px',\r\n paddingBottom: '8px',\r\n '&:last-child': {\r\n paddingRight: '0px',\r\n },\r\n },\r\n },\r\n '& tbody': {\r\n '& th': {\r\n fontSize: 12,\r\n color: '#323130',\r\n },\r\n },\r\n '& td': {\r\n fontSize: 12,\r\n fontWeight: 'normal',\r\n color: '#333333',\r\n paddingBottom: 3,\r\n verticalAlign: 'top',\r\n paddingRight: '10px',\r\n 'word-break': 'break-word',\r\n '&:last-child': {\r\n paddingRight: '0px',\r\n },\r\n '& .progress-bar-with-right-label': {\r\n marginLeft: 10,\r\n gridTemplateColumns: '80% 20%',\r\n alignItems: 'center',\r\n '& .progress': {\r\n marginRight: 5,\r\n gridRow: '1',\r\n gridColumn: '1',\r\n },\r\n '& .right-label': {\r\n gridRow: '1',\r\n gridColumn: '2',\r\n },\r\n },\r\n },\r\n },\r\n '& .navbar-nav': {\r\n '& .recommendation-download': {\r\n paddingLeft: 20,\r\n paddingTop: 6,\r\n marginBottom: '-15px',\r\n '& #button-download': {\r\n background: '#FFFFFF',\r\n border: '1px solid #8A8886',\r\n boxSizing: 'border-box',\r\n borderRadius: '2px',\r\n fontSize: '14px',\r\n marginLeft: '770px',\r\n zIndex: '1',\r\n },\r\n },\r\n },\r\n '& .nav-pills': {\r\n '& li': {\r\n border: '1px solid #505050',\r\n '&.active, &.active a': {\r\n backgroundColor: '#e7f0f6',\r\n color: '#666',\r\n fontWeight: 'bold',\r\n },\r\n '&:nth-child(1)': {\r\n borderRight: '0',\r\n },\r\n '& a': {\r\n padding: '5px 20px 4px 20px',\r\n border: 'none',\r\n fontWeight: 'normal',\r\n },\r\n },\r\n },\r\n '& .filter-editor': {\r\n '& .selector-container': {\r\n '& button': {\r\n border: '1px solid #BBB',\r\n padding: '3px 5px 5px 5px',\r\n textAlign: 'right',\r\n },\r\n },\r\n '& .selector-v2': {\r\n width: 400,\r\n },\r\n },\r\n '.card-holder__wrapper .tipsCarousel [class*=\"carousel-control\"]': {\r\n backgroundImage: 'none',\r\n filter: 'none !important',\r\n width: 20,\r\n opacity: '1',\r\n margin: 0,\r\n cursor: 'default',\r\n top: 'auto',\r\n bottom: '16px',\r\n fontSize: '16px',\r\n height: '16px',\r\n },\r\n '.card-holder__wrapper .carousel-control': {\r\n backgroundColor: 'white',\r\n textShadow: 'none',\r\n color: palette.themePrimary,\r\n\r\n '&:hover': {\r\n color: palette.themeDarker,\r\n },\r\n },\r\n '.card-holder__wrapper .carousel-control.left': {\r\n left: 'auto',\r\n right: '30px',\r\n },\r\n '.card-holder__wrapper .carousel-control .carousel-control__arrow-right': {\r\n width: 16,\r\n height: 16,\r\n cursor: 'pointer',\r\n bottom: 'auto',\r\n '&:before': {\r\n fontFamily: '\"MsAds MDL2 Assets\"',\r\n content: '\"\\\\E76C\"',\r\n },\r\n },\r\n '.card-holder__wrapper .carousel-control .carousel-control__arrow-left': {\r\n width: 16,\r\n height: 16,\r\n cursor: 'pointer',\r\n bottom: 'auto',\r\n '&:before': {\r\n fontFamily: '\"MsAds MDL2 Assets\"',\r\n content: '\"\\\\E76B\"',\r\n },\r\n },\r\n '.card-holder__wrapper .carousel-control.clickable:focus:after': {\r\n border: 'none',\r\n outline: `1px solid ${palette.neutralSecondary}`,\r\n outlineOffset: 2,\r\n },\r\n '.card-holder__wrapper .carousel-indicators': {\r\n marginBottom: '0',\r\n height: 8,\r\n bottom: '16px',\r\n left: '0px',\r\n width: 'auto',\r\n margin: '0px',\r\n lineHeight: '8px',\r\n fontSize: '8px',\r\n },\r\n '.card-holder__wrapper .carousel-indicators li': {\r\n height: 8,\r\n width: 8,\r\n margin: '0',\r\n marginRight: 10,\r\n background: 'none',\r\n border: `1px solid ${palette.neutralSecondary}`,\r\n\r\n '@media screen and (forced-colors: active)': {\r\n forcedColorAdjust: 'none',\r\n },\r\n\r\n '@media screen and (-ms-high-contrast: active)': {\r\n background: 'window',\r\n borderColor: 'windowtext',\r\n },\r\n },\r\n '.card-holder__wrapper .carousel-indicators .active': {\r\n margin: '0',\r\n marginRight: 10,\r\n border: 'none',\r\n background: palette.themePrimary,\r\n\r\n '@media screen and (forced-colors: active)': {\r\n forcedColorAdjust: 'none',\r\n },\r\n\r\n '@media screen and (-ms-high-contrast: active)': {\r\n background: 'highlight',\r\n },\r\n },\r\n '.card-holder__wrapper .import_tip_img': {\r\n backgroundImage: `url(\"${googleImportImg}\")`,\r\n },\r\n '.card-holder__wrapper .broadMatch_tip_img': {\r\n backgroundImage: `url(\"${broadMatchModifierImg}\")`,\r\n },\r\n '.card-holder__wrapper .exta_tip_img': {\r\n backgroundImage: `url(\"${expandedTextAdsImg}\")`,\r\n },\r\n '.card-holder__wrapper .sitelinks_tip_img': {\r\n backgroundImage: `url(\"${sitelinkExtensionsImg}\")`,\r\n },\r\n '.card-holder__wrapper .callouts_tip_img': {\r\n backgroundImage: `url(\"${calloutExtensionsImg}\")`,\r\n },\r\n '.card-holder__wrapper .structSnip_tip_img': {\r\n backgroundImage: `url(\"${structuredSnippetsImg}\")`,\r\n },\r\n '.card-holder__wrapper .dsa_tip_img': {\r\n backgroundImage: `url(\"${dynamicSearchAdsImg}\")`,\r\n },\r\n '.card-holder__wrapper .conversionTracking_tip_img': {\r\n backgroundImage: `url(\"${convTrackingImg}\")`,\r\n },\r\n '.card-holder__wrapper .remarketing_tip_img': {\r\n backgroundImage: `url(\"${remarketingImg}\")`,\r\n },\r\n '.card-holder__wrapper .autoBid_tip_img': {\r\n backgroundImage: `url(\"${enhancedCpcAutobidImg}\")`,\r\n },\r\n '.card-holder__wrapper .sharedBudgets_tip_img': {\r\n backgroundImage: `url(\"${sharedBudgetsImg}\")`,\r\n },\r\n '.card-holder__wrapper .call_tip_img': {\r\n backgroundImage: `url(\"${callImg}\")`,\r\n },\r\n '.card-holder__wrapper .reviews_tip_img': {\r\n backgroundImage: `url(\"${reviewExtentionsImg}\")`,\r\n },\r\n '.card-holder__wrapper .kWMatchType_tip_img': {\r\n backgroundImage: `url(\"${kwMatchTypesImg}\")`,\r\n },\r\n '.card-holder__wrapper .negKW_tip_img': {\r\n backgroundImage: `url(\"${negKeywordsImg}\")`,\r\n },\r\n '.card-holder__wrapper .optiConsult_tip_img': {\r\n backgroundImage: `url(\"${microsoftLogoImg}\")`,\r\n },\r\n '.card-holder__wrapper .welcome_microsoft_logo_tip_img': {\r\n backgroundImage: `url(\"${microsoftLogoImg}\")`,\r\n },\r\n '.card-holder__wrapper .welcome_create_campaign_tip_img': {\r\n backgroundImage: `url(\"${createCampaignImg}\")`,\r\n },\r\n '.card-holder__wrapper .welcome_coaching_tip_img': {\r\n backgroundImage: `url(\"${welcomeCoachingImg}\")`,\r\n },\r\n '.card-holder__wrapper .welcome_coupon_tip_img': {\r\n backgroundImage: `url(\"${welcomeCouponImg}\")`,\r\n },\r\n '.card-holder__wrapper .welcome_add_payment_tip_img': {\r\n backgroundImage: `url(\"${welcomeAddPaymentImg}\")`,\r\n },\r\n '.card-holder__wrapper .welcome_help_tip_img': {\r\n backgroundImage: `url(\"${welcomeHelpImg}\")`,\r\n },\r\n '.card-holder__wrapper .addNewAds_opportunity_img': {\r\n backgroundImage: `url(\"${addNewAdsImg}\")`,\r\n },\r\n '.card-holder__wrapper .remarketingBid_opportunity_img': {\r\n backgroundImage: `url(\"${remarketingBidImg}\")`,\r\n },\r\n '.card-holder__wrapper .locationBid_opportunity_img': {\r\n backgroundImage: `url(\"${locationBidImg}\")`,\r\n },\r\n '.card-holder__wrapper .keyword_opportunity_img': {\r\n backgroundImage: `url(\"${addNewKeywordImg}\")`,\r\n },\r\n '.card-holder__wrapper .keywordBidAdjustment_opportunity_img': {\r\n backgroundImage: `url(\"${keywordBidImg}\")`,\r\n },\r\n '.card-holder__wrapper .googleImport_opportunity_img': {\r\n backgroundImage: `url(\"${googleAdImportImg}\")`,\r\n },\r\n '.card-holder__wrapper .sitelink_opportunity_img': {\r\n backgroundImage: `url(\"${sitelinkExtensionImg}\")`,\r\n },\r\n '.card-holder__wrapper .callout_opportunity_img': {\r\n backgroundImage: `url(\"${calloutExtensionImg}\")`,\r\n },\r\n '.card-holder__wrapper .budget_opportunity_img': {\r\n backgroundImage: `url(\"${budgetOppoImg}\")`,\r\n },\r\n '.card-holder__wrapper .broadMatchKeyword_opportunity_img': {\r\n backgroundImage: `url(\"${kwBroadMatchImg}\")`,\r\n },\r\n '.card-holder__wrapper .broadMatchModifierKeyword_opportunity_img': {\r\n backgroundImage: `url(\"${kwBroadMatchModifierImg}\")`,\r\n },\r\n '.card-holder__wrapper .firstPage_opportunity_img': {\r\n backgroundImage: `url(\"${firstpageOppoImg}\")`,\r\n },\r\n '.card-holder__wrapper .mainLineBid_opportunity_img': {\r\n backgroundImage: `url(\"${mainlineOppoImg}\")`,\r\n },\r\n '.card-holder__wrapper .mainLine1Bid_opportunity_img': {\r\n backgroundImage: `url(\"${firstPositionImg}\")`,\r\n },\r\n '.card-holder__wrapper .competitiveBid_opportunity_img': {\r\n backgroundImage: `url(\"${competitiveBidImg}\")`,\r\n },\r\n '.card-holder__wrapper .adScheduling_opportunity_img': {\r\n backgroundImage: `url(\"${adSchedulingImg}\")`,\r\n },\r\n '.carouselItemCount': {\r\n position: 'absolute',\r\n bottom: '15px',\r\n right: '70px',\r\n },\r\n});\r\n","import { tokens } from '@fluentui/react-components';\r\nimport { underlineLinkStyle, crudAdStyle, helpbuttonStyle } from '@bingads-webui-campaign-react/common-styles';\r\n\r\nimport broadMatchModifierImg from '../media/tipsOpportunities/tips/broad_match_modifier.svg';\r\nimport callImg from '../media/tipsOpportunities/tips/call.svg';\r\nimport calloutExtensionsImg from '../media/tipsOpportunities/tips/callout_extensions.svg';\r\nimport convTrackingImg from '../media/tipsOpportunities/tips/conv_tracking.svg';\r\nimport createCampaignImg from '../media/tipsOpportunities/tips/create_campaign.svg';\r\nimport dynamicSearchAdsImg from '../media/tipsOpportunities/tips/dynamic_search_ads.svg';\r\nimport enhancedCpcAutobidImg from '../media/tipsOpportunities/tips/enhanced_cpc_autobid.svg';\r\nimport expandedTextAdsImg from '../media/tipsOpportunities/tips/expanded_text_ads.svg';\r\nimport googleImportImg from '../media/tipsOpportunities/tips/google_import.svg';\r\nimport kwMatchTypesImg from '../media/tipsOpportunities/tips/KW_match_types.svg';\r\nimport microsoftLogoImg from '../media/tipsOpportunities/tips/microsoft_logo.svg';\r\nimport negKeywordsImg from '../media/tipsOpportunities/tips/neg_keywords.svg';\r\nimport remarketingImg from '../media/tipsOpportunities/tips/remarketing.svg';\r\nimport reviewExtentionsImg from '../media/tipsOpportunities/tips/review_extentions.svg';\r\nimport sharedBudgetsImg from '../media/tipsOpportunities/tips/shared_budgets.svg';\r\nimport sitelinkExtensionsImg from '../media/tipsOpportunities/tips/sitelink_extensions.svg';\r\nimport structuredSnippetsImg from '../media/tipsOpportunities/tips/structured_snippets.svg';\r\nimport welcomeAddPaymentImg from '../media/tipsOpportunities/tips/welcome_add_payment.svg';\r\nimport welcomeCoachingImg from '../media/tipsOpportunities/tips/welcome_coaching.svg';\r\nimport welcomeCouponImg from '../media/tipsOpportunities/tips/welcome_coupon.svg';\r\nimport welcomeHelpImg from '../media/tipsOpportunities/tips/welcome_help.svg';\r\nimport addNewAdsImg from '../media/tipsOpportunities/opportunities/AddNewAds.svg';\r\nimport addNewKeywordImg from '../media/tipsOpportunities/opportunities/AddNewKeyword.svg';\r\nimport adSchedulingImg from '../media/tipsOpportunities/opportunities/AdScheduling.svg';\r\nimport budgetOppoImg from '../media/tipsOpportunities/opportunities/BudgetOppo.svg';\r\nimport calloutExtensionImg from '../media/tipsOpportunities/opportunities/CalloutExtension.svg';\r\nimport competitiveBidImg from '../media/tipsOpportunities/opportunities/CompetitiveBid.svg';\r\nimport firstpageOppoImg from '../media/tipsOpportunities/opportunities/FirstpageOppo.svg';\r\nimport firstPositionImg from '../media/tipsOpportunities/opportunities/FirstPosition.svg';\r\nimport googleAdImportImg from '../media/tipsOpportunities/opportunities/GAImport.svg';\r\nimport keywordBidImg from '../media/tipsOpportunities/opportunities/KeywordBid.svg';\r\nimport kwBroadMatchImg from '../media/tipsOpportunities/opportunities/KWBroadMatch.svg';\r\nimport kwBroadMatchModifierImg from '../media/tipsOpportunities/opportunities/KWBroadMatchModifier.svg';\r\nimport locationBidImg from '../media/tipsOpportunities/opportunities/LocationBid.svg';\r\nimport mainlineOppoImg from '../media/tipsOpportunities/opportunities/MainlineOppo.svg';\r\nimport remarketingBidImg from '../media/tipsOpportunities/opportunities/RemarketingBid.svg';\r\nimport sitelinkExtensionImg from '../media/tipsOpportunities/opportunities/SitelinkExtension.svg';\r\n\r\nconst tagHeight = 24;\r\n\r\nconst couponColor = '#138486';\r\nconst couponFlag = {\r\n '& .coupon-right-aligned': {\r\n position: 'absolute',\r\n top: 0,\r\n right: 0,\r\n },\r\n '& .coupon-tag': {\r\n color: 'white',\r\n display: 'flex',\r\n height: tagHeight,\r\n width: 'fit-content',\r\n position: 'relative',\r\n '& ~ .oppt_detail, & ~ .tip_image_container': {\r\n marginTop: tagHeight,\r\n },\r\n '& .coupon-tag-main-triangle': {\r\n width: 0,\r\n height: 0,\r\n borderStyle: 'solid',\r\n borderWidth: [tagHeight / 2, 10],\r\n borderColor: [couponColor, couponColor, couponColor, 'transparent'],\r\n marginRight: -1,\r\n },\r\n '& .coupon-tag-message': {\r\n backgroundColor: couponColor,\r\n height: tagHeight,\r\n padding: [5, 10, 5, 0],\r\n fontSize: 10,\r\n boxSizing: 'border-box',\r\n },\r\n },\r\n '& .coupon-tag-flyout': {\r\n '& .coupon-tag-flyout-content': {\r\n '& .coupon-tag-flyout-line1': {\r\n fontWeight: 'bold',\r\n },\r\n '& .coupon-tag-flyout-line2': {\r\n color: tokens.colorStatusWarningForeground1,\r\n },\r\n },\r\n },\r\n};\r\n\r\nexport const getTipCardFluentV2Style = palette => ({\r\n '.tips-card-plus-fac': {\r\n position: 'relative',\r\n display: 'flex',\r\n },\r\n // estimates tile\r\n '.recommendation-estimation-tile': {\r\n fontSize: '12px',\r\n lineHeight: '15px',\r\n fontFamily: \"'Segoe UI', Arial, sans-serif\",\r\n display: '-ms-grid',\r\n '&.neutral-estimate': {\r\n color: 'gray',\r\n fontSize: 28,\r\n },\r\n '& .positive-estimate': {\r\n color: '#107C10',\r\n fontSize: 28,\r\n },\r\n '& .estimate-second-primary': {\r\n marginTop: '10px',\r\n '& .estimate-second-primary-titile': {\r\n width: '124px',\r\n lineHeight: '15px',\r\n fontWeight: 'bold',\r\n MsGridRow: 1,\r\n gridRow: 1,\r\n },\r\n '& .estimate-second-primary-increase': {\r\n width: '124px',\r\n lineHeight: '36px',\r\n fontWeight: 'bold',\r\n MsGridRow: 2,\r\n gridRow: 2,\r\n },\r\n },\r\n '& .estimate-primary-titile': {\r\n width: '124px',\r\n lineHeight: '15px',\r\n fontWeight: 'bold',\r\n MsGridRow: 1,\r\n gridRow: 1,\r\n fontSize: '12px !important',\r\n },\r\n '& .estimate-primary-increase': {\r\n width: '124px',\r\n lineHeight: '36px',\r\n fontWeight: 'bold',\r\n MsGridRow: 2,\r\n gridRow: 2,\r\n '& .recommendation-arrow-icon': {\r\n top: '10px',\r\n position: 'relative',\r\n '&:before': {\r\n fontSize: '20px!important',\r\n },\r\n },\r\n },\r\n '& .estimate-primary-from-to': {\r\n fontSize: '12px',\r\n lineHeight: '15px',\r\n width: '126px',\r\n whiteSpace: 'pre-wrap',\r\n MsGridRow: 3,\r\n gridRow: 3,\r\n color: 'gray',\r\n },\r\n '& .estimate-secondary': {\r\n margin: '8px 0 0 0',\r\n fontSize: '12px',\r\n lineHeight: '15px',\r\n MsGridRow: 4,\r\n gridRow: 4,\r\n '.estimate-secondary-value': {\r\n fontWeight: 'bold',\r\n },\r\n '.estimate-secondary-title': {\r\n fontWeight: 'normal',\r\n },\r\n },\r\n '& .estimate-tertiary': {\r\n fontSize: '12px',\r\n lineHeight: '15px',\r\n MsGridRow: 5,\r\n gridRow: 5,\r\n '& .estimate-tertiary-value': {\r\n fontWeight: 'normal',\r\n },\r\n '& .estimate-tertiary-title': {\r\n fontWeight: 'normal',\r\n },\r\n },\r\n '& .estimate-cost': {\r\n fontSize: '12px',\r\n lineHeight: '15px',\r\n color: 'black',\r\n MsGridRow: 6,\r\n gridRow: 6,\r\n '& .estimate-cost-value': {\r\n fontWeight: 'normal',\r\n },\r\n '& .estimate-cost-title': {\r\n fontWeight: 'normal',\r\n },\r\n },\r\n '& .estimate-note': {\r\n margin: '8px 0 0 0',\r\n fontSize: '12px',\r\n lineHeight: '15px',\r\n MsGridRow: 7,\r\n gridRow: 7,\r\n color: 'gray',\r\n },\r\n },\r\n '& .summary-header-menu .bingads-popover': {\r\n right: 5,\r\n },\r\n '& >.toolbar': {\r\n marginLeft: 10,\r\n '& .upper-toolbar': {\r\n display: 'inline-block',\r\n },\r\n },\r\n '& .empty-buttons': {\r\n marginTop: 36,\r\n },\r\n\r\n // empty view\r\n '& .empty-filter-view': {\r\n margin: '160px',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n\r\n '& .empty-icon': {\r\n display: 'inline-block',\r\n marginRight: 62,\r\n\r\n img: {\r\n width: 200,\r\n height: 200,\r\n },\r\n },\r\n\r\n '& .empty-details': {\r\n display: 'inline-block',\r\n color: '#605E5C',\r\n gridRow: '1',\r\n gridColumn: '2',\r\n '& .empty-title': {\r\n fontSize: 26,\r\n margin: '0 0 8.5px',\r\n },\r\n '& .empty-sub-title': {\r\n fontSize: 14,\r\n fontWeight: 'normal',\r\n ...underlineLinkStyle({ palette }),\r\n },\r\n },\r\n },\r\n\r\n '.recommendation-summary-card': {\r\n height: '278px',\r\n width: '100%',\r\n fontFamily: '\\'Segoe UI\\', Arial, sans-serif',\r\n fontSize: 12,\r\n display: 'grid',\r\n color: '#333333',\r\n gridTemplateColumns: '100%',\r\n gridTemplateRows: 'repeat(4,auto)',\r\n '& .summary-summary': {\r\n gridRow: '1',\r\n gridTemplateRows: 'repeat(2,auto)',\r\n '& .summary-notification': {\r\n '& .recommendation-notification-container': {\r\n background: '#EFF6FC !important',\r\n display: 'flex',\r\n '& .recommendation-notification-text': {\r\n maxWidth: '90%',\r\n padding: '5px 0 5px 24px',\r\n whiteSpace: 'nowrap',\r\n overflow: 'hidden',\r\n textOverflow: 'ellipsis',\r\n },\r\n '& .recommendation-notification-help': {\r\n maxWidth: '10%',\r\n padding: '5px 10px 5px 0',\r\n },\r\n },\r\n '& .helpbutton': helpbuttonStyle({ palette })['.helpbutton'],\r\n '& .helpbutton::before': { ...helpbuttonStyle({ palette })['.helpbutton::before'], top: 0 },\r\n },\r\n '& .summary-banner': {\r\n background: '#DDDDDD',\r\n gridRow: '1',\r\n '& .summary-banner-title': {\r\n display: 'table-cell',\r\n verticalAlign: 'middle',\r\n fontWeight: 'bold',\r\n color: '#333333',\r\n height: 30,\r\n padding: '0px 24px',\r\n },\r\n },\r\n '& .summary-summary-content': {\r\n borderBottom: 'solid 1px #dddddd',\r\n paddingTop: 16,\r\n paddingBottom: 12,\r\n display: 'grid',\r\n gridRow: '3',\r\n '& .summary-card-os-tag-container': {\r\n display: 'inline-block',\r\n marginLeft: 3,\r\n '& .not-available-line': {\r\n paddingLeft: 10,\r\n paddingRight: 10,\r\n },\r\n '& .iconba.iconba-Trending12': {\r\n paddingLeft: 8,\r\n paddingRight: 8,\r\n paddingBottom: 3,\r\n },\r\n },\r\n '& .summary-info': {\r\n gridColumn: '3',\r\n maxHeight: '164px',\r\n overflowY: 'auto',\r\n\r\n '& .summary-description': {\r\n fontSize: 16,\r\n fontWeight: 'bold',\r\n color: '#323130',\r\n },\r\n '& .summary-description-os': {\r\n display: 'inline',\r\n },\r\n '& .summary-pitching': {\r\n fontSize: 12,\r\n fontWeight: 'normal',\r\n color: '#484644',\r\n marginTop: 10,\r\n '& > span': {\r\n ...underlineLinkStyle({ palette }),\r\n },\r\n },\r\n },\r\n },\r\n '& .summary-estimates': {\r\n gridColumn: '1',\r\n },\r\n '& .summary-overall-optimization-score': {\r\n gridColumn: '1',\r\n width: 124,\r\n '& .overall-optimization-score-number': {\r\n fontSize: 32,\r\n color: palette.blue,\r\n width: 124,\r\n gridRow: 2,\r\n fontWeight: 'bold',\r\n },\r\n },\r\n },\r\n '& .summary-sample': {\r\n gridRow: '2',\r\n overflowY: 'auto',\r\n '& .recommendation-sample': {\r\n '& .sample-insight-title': {\r\n marginTop: 8,\r\n fontSize: 13,\r\n fontWeight: 'normal',\r\n color: '#333333',\r\n },\r\n '& .sample-insight': {\r\n margin: '10px 0 0 0',\r\n fontSize: 13,\r\n fontWeight: 'normal',\r\n color: '#666666',\r\n },\r\n '& .sample-visual, & .sample-action-table': {\r\n margin: '8px 0 0 0',\r\n },\r\n '& .sample-horizontal-separator': {\r\n margin: '8px 0',\r\n borderTop: '1px solid #ececec',\r\n },\r\n '& .sample-action-title': {\r\n fontSize: 13,\r\n fontWeight: 'normal',\r\n color: '#333333',\r\n },\r\n '& .sample-more-recommendations': {\r\n margin: '8px 0 0 0',\r\n },\r\n },\r\n ...crudAdStyle({ palette }),\r\n '& .ad-preview-header': {\r\n padding: '0px 0 8px 0',\r\n },\r\n '& .recommendation-suggested-ads-column': {\r\n '& .recommendation-summary-ad-preview': {\r\n width: '100%',\r\n padding: '15px 15px 15px 15px',\r\n background: palette.white,\r\n border: 'solid 1px #dddddd',\r\n },\r\n },\r\n },\r\n '& .summary-footer': {\r\n bottom: '0px',\r\n position: 'absolute',\r\n gridRow: '4',\r\n '& .primary-button': {\r\n '& button': {\r\n fontFamily: 'Arial, Helvetica, sans-serif',\r\n fontWeight: 'bold',\r\n fontSize: 13,\r\n backgroundColor: palette.themePrimary,\r\n color: palette.white,\r\n padding: '5px 10px',\r\n border: '1px black solid',\r\n margin: '0 8px 0 0',\r\n '&:hover': {\r\n backgroundColor: '#006464',\r\n },\r\n },\r\n },\r\n '& .secondary-button': {\r\n '& button': {\r\n fontFamily: 'Arial, Helvetica, sans-serif',\r\n fontWeight: 'bold',\r\n fontSize: 13,\r\n backgroundColor: palette.white,\r\n color: '#000000',\r\n padding: '5px 10px',\r\n border: '1px black solid',\r\n margin: '0 8px 0 0',\r\n '&:hover': {\r\n backgroundColor: '#a8a8a8',\r\n },\r\n },\r\n },\r\n },\r\n },\r\n // recommendation visual\r\n '.action-table': {\r\n marginTop: 8,\r\n fontFamily: '\\'Segoe UI\\', Arial, sans-serif',\r\n '& thead': {\r\n '& th': {\r\n fontSize: 12,\r\n color: '#323130',\r\n fontWeight: 'bold',\r\n paddingRight: '10px',\r\n paddingBottom: '8px',\r\n '&:last-child': {\r\n paddingRight: '0px',\r\n },\r\n },\r\n },\r\n '& tbody': {\r\n '& th': {\r\n fontSize: 12,\r\n color: '#323130',\r\n },\r\n },\r\n '& td': {\r\n fontSize: 12,\r\n fontWeight: 'normal',\r\n color: '#333333',\r\n paddingBottom: 3,\r\n verticalAlign: 'top',\r\n paddingRight: '10px',\r\n 'word-break': 'break-word',\r\n '&:last-child': {\r\n paddingRight: '0px',\r\n },\r\n '& .progress-bar-with-right-label': {\r\n marginLeft: 10,\r\n gridTemplateColumns: '80% 20%',\r\n alignItems: 'center',\r\n '& .progress': {\r\n marginRight: 5,\r\n gridRow: '1',\r\n gridColumn: '1',\r\n },\r\n '& .right-label': {\r\n gridRow: '1',\r\n gridColumn: '2',\r\n },\r\n },\r\n },\r\n },\r\n '& .navbar-nav': {\r\n '& .recommendation-download': {\r\n paddingLeft: 20,\r\n paddingTop: 6,\r\n marginBottom: '-15px',\r\n '& #button-download': {\r\n background: '#FFFFFF',\r\n border: '1px solid #8A8886',\r\n boxSizing: 'border-box',\r\n borderRadius: '2px',\r\n fontSize: '14px',\r\n marginLeft: '770px',\r\n zIndex: '1',\r\n },\r\n },\r\n },\r\n '& .nav-pills': {\r\n '& li': {\r\n border: '1px solid #505050',\r\n '&.active, &.active a': {\r\n backgroundColor: '#e7f0f6',\r\n color: '#666',\r\n fontWeight: 'bold',\r\n },\r\n '&:nth-child(1)': {\r\n borderRight: '0',\r\n },\r\n '& a': {\r\n padding: '5px 20px 4px 20px',\r\n border: 'none',\r\n fontWeight: 'normal',\r\n },\r\n },\r\n },\r\n '& .filter-editor': {\r\n '& .selector-container': {\r\n '& button': {\r\n border: '1px solid #BBB',\r\n padding: '3px 5px 5px 5px',\r\n textAlign: 'right',\r\n },\r\n },\r\n '& .selector-v2': {\r\n width: 400,\r\n },\r\n },\r\n '.tips-card': {\r\n ...couponFlag,\r\n display: 'flex',\r\n minHeight: 0.1,\r\n width: '100%',\r\n '& .deterministic-wrapper-view': {\r\n width: '100%',\r\n },\r\n '& .visuallyhidden': {\r\n border: '0',\r\n clip: 'rect(0 0 0 0)',\r\n height: '1px',\r\n margin: '-1px',\r\n overflow: 'hidden',\r\n padding: '0',\r\n position: 'absolute',\r\n width: '1px',\r\n },\r\n '& .tipsCarousel': {\r\n height: 'auto',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n width: '100%',\r\n '& .carousel-inner': {\r\n display: 'flex',\r\n padding: '0',\r\n height: '270px',\r\n overflow: 'unset',\r\n '@media (-webkit-transform-3d), (transform-3d)': {\r\n '&>.item': {\r\n transition: 'transform .6s ease-in-out',\r\n backfaceVisibility: 'hidden',\r\n perspective: '1000px',\r\n },\r\n '&>.item.active': {\r\n transform: 'translateZ(0)',\r\n left: 0,\r\n },\r\n },\r\n '& .item.active': {\r\n // workaround to show recommendation footer button in new overview card\r\n overflow: 'visible',\r\n },\r\n\r\n '& .summary-footer': {\r\n // we will move position of footer button, we don't want to block the carousel button\r\n width: '50%',\r\n '& .btn-default': {\r\n display: 'none',\r\n },\r\n '& .btn-primary': {\r\n width: '100% !important',\r\n 'overflow-x': 'clip',\r\n 'text-overflow': 'ellipsis',\r\n position: 'relative',\r\n top: '7px',\r\n fontWeight: 'bold',\r\n fontSize: 14,\r\n height: '32px',\r\n backgroundColor: palette.white,\r\n color: palette.black,\r\n padding: '6px 19px',\r\n borderRadius: '4px',\r\n border: '1px solid #d1d1d1',\r\n '&:hover': {\r\n backgroundColor: '#f3f2f1',\r\n },\r\n '&:focus': {\r\n border: `1px solid ${palette.black}`,\r\n },\r\n },\r\n },\r\n },\r\n '& .carousel-inner .item': {\r\n flex: '1',\r\n height: 'auto',\r\n minWidth: 1,\r\n overflow: 'hidden',\r\n width: '100%',\r\n },\r\n '& .carousel-inner .carousel__tip_content': {\r\n display: 'flex',\r\n flex: '1',\r\n flexDirection: 'column',\r\n height: '270px',\r\n },\r\n '& .carousel-inner .carousel__tip_content .tip_text_content': {\r\n display: 'flex',\r\n flex: '3 3 150px',\r\n flexDirection: 'column',\r\n },\r\n '& .carousel-inner .carousel__tip_content .tip_text_content .tip_title': {\r\n textDecoration: 'none',\r\n margin: '12px 0px',\r\n overflow: 'hidden',\r\n flex: '0 1 auto',\r\n minHeight: 1,\r\n lineHeight: 'normal',\r\n fontSize: '18px',\r\n fontWeight: '600',\r\n },\r\n '& .carousel-inner .carousel__tip_content .tip_text_content .tip_description__wrapper': {\r\n display: 'block',\r\n flex: '1 100',\r\n overflow: 'hidden',\r\n },\r\n '& .carousel-inner .carousel__tip_content .tip_text_content .tip_description__wrapper .tip_description': {\r\n lineHeight: '20px',\r\n height: 'auto',\r\n overflow: 'hidden',\r\n fontSize: '14px',\r\n fontWeight: 'normal',\r\n margin: '0',\r\n },\r\n '& .carousel-inner .tip_links': {\r\n marginTop: 8,\r\n display: 'flex',\r\n width: 'fit-content',\r\n },\r\n '& .carousel-inner .tip_links .linkButton': {\r\n lineHeight: '30px',\r\n },\r\n '& .carousel-inner .tip_links .tip_clickLink': {\r\n flex: '0 0 auto',\r\n '&.secondary_ClickLink': {\r\n marginLeft: 8,\r\n },\r\n },\r\n '& .carousel-inner .tip_links .tip_dismissLink': {\r\n marginLeft: 30,\r\n paddingTop: 5,\r\n },\r\n '& .carousel-inner .tip_links .tip_dismissLink a': {\r\n position: 'relative',\r\n color: '#1570A5',\r\n },\r\n '& .carousel-inner .carousel__tip_content .tip_image_container': {\r\n flex: '2 2 100px',\r\n minWidth: '0.1px',\r\n display: 'flex',\r\n justifyContent: 'flex-end',\r\n marginTop: '1px',\r\n flexDirection: 'column',\r\n },\r\n '& .carousel-inner .carousel__tip_content .tip_image_container .tip_image': {\r\n flex: '1',\r\n backgroundRepeat: 'no-repeat',\r\n backgroundSize: 'contain',\r\n backgroundPosition: 'center center',\r\n },\r\n '& .carousel-inner .empty_content': {\r\n margin: '20px 10px 0',\r\n },\r\n },\r\n },\r\n '.tips-card .import_tip_img': {\r\n backgroundImage: `url(\"${googleImportImg}\")`,\r\n },\r\n '.tips-card .broadMatch_tip_img': {\r\n backgroundImage: `url(\"${broadMatchModifierImg}\")`,\r\n },\r\n '.tips-card .exta_tip_img': {\r\n backgroundImage: `url(\"${expandedTextAdsImg}\")`,\r\n },\r\n '.tips-card .sitelinks_tip_img': {\r\n backgroundImage: `url(\"${sitelinkExtensionsImg}\")`,\r\n },\r\n '.tips-card .callouts_tip_img': {\r\n backgroundImage: `url(\"${calloutExtensionsImg}\")`,\r\n },\r\n '.tips-card .structSnip_tip_img': {\r\n backgroundImage: `url(\"${structuredSnippetsImg}\")`,\r\n },\r\n '.tips-card .dsa_tip_img': {\r\n backgroundImage: `url(\"${dynamicSearchAdsImg}\")`,\r\n },\r\n '.tips-card .conversionTracking_tip_img': {\r\n backgroundImage: `url(\"${convTrackingImg}\")`,\r\n },\r\n '.tips-card .remarketing_tip_img': {\r\n backgroundImage: `url(\"${remarketingImg}\")`,\r\n },\r\n '.tips-card .autoBid_tip_img': {\r\n backgroundImage: `url(\"${enhancedCpcAutobidImg}\")`,\r\n },\r\n '.tips-card .sharedBudgets_tip_img': {\r\n backgroundImage: `url(\"${sharedBudgetsImg}\")`,\r\n },\r\n '.tips-card .call_tip_img': {\r\n backgroundImage: `url(\"${callImg}\")`,\r\n },\r\n '.tips-card .reviews_tip_img': {\r\n backgroundImage: `url(\"${reviewExtentionsImg}\")`,\r\n },\r\n '.tips-card .kWMatchType_tip_img': {\r\n backgroundImage: `url(\"${kwMatchTypesImg}\")`,\r\n },\r\n '.tips-card .negKW_tip_img': {\r\n backgroundImage: `url(\"${negKeywordsImg}\")`,\r\n },\r\n '.tips-card .optiConsult_tip_img': {\r\n backgroundImage: `url(\"${microsoftLogoImg}\")`,\r\n },\r\n '.tips-card .welcome_microsoft_logo_tip_img': {\r\n backgroundImage: `url(\"${microsoftLogoImg}\")`,\r\n },\r\n '.tips-card .welcome_create_campaign_tip_img': {\r\n backgroundImage: `url(\"${createCampaignImg}\")`,\r\n },\r\n '.tips-card .welcome_coaching_tip_img': {\r\n backgroundImage: `url(\"${welcomeCoachingImg}\")`,\r\n },\r\n '.tips-card .welcome_coupon_tip_img': {\r\n backgroundImage: `url(\"${welcomeCouponImg}\")`,\r\n },\r\n '.tips-card .welcome_add_payment_tip_img': {\r\n backgroundImage: `url(\"${welcomeAddPaymentImg}\")`,\r\n },\r\n '.tips-card .welcome_help_tip_img': {\r\n backgroundImage: `url(\"${welcomeHelpImg}\")`,\r\n },\r\n '.tips-card .addNewAds_opportunity_img': {\r\n backgroundImage: `url(\"${addNewAdsImg}\")`,\r\n },\r\n '.tips-card .remarketingBid_opportunity_img': {\r\n backgroundImage: `url(\"${remarketingBidImg}\")`,\r\n },\r\n '.tips-card .locationBid_opportunity_img': {\r\n backgroundImage: `url(\"${locationBidImg}\")`,\r\n },\r\n '.tips-card .keyword_opportunity_img': {\r\n backgroundImage: `url(\"${addNewKeywordImg}\")`,\r\n },\r\n '.tips-card .keywordBidAdjustment_opportunity_img': {\r\n backgroundImage: `url(\"${keywordBidImg}\")`,\r\n },\r\n '.tips-card .googleImport_opportunity_img': {\r\n backgroundImage: `url(\"${googleAdImportImg}\")`,\r\n },\r\n '.tips-card .sitelink_opportunity_img': {\r\n backgroundImage: `url(\"${sitelinkExtensionImg}\")`,\r\n },\r\n '.tips-card .callout_opportunity_img': {\r\n backgroundImage: `url(\"${calloutExtensionImg}\")`,\r\n },\r\n '.tips-card .budget_opportunity_img': {\r\n backgroundImage: `url(\"${budgetOppoImg}\")`,\r\n },\r\n '.tips-card .broadMatchKeyword_opportunity_img': {\r\n backgroundImage: `url(\"${kwBroadMatchImg}\")`,\r\n },\r\n '.tips-card .broadMatchModifierKeyword_opportunity_img': {\r\n backgroundImage: `url(\"${kwBroadMatchModifierImg}\")`,\r\n },\r\n '.tips-card .firstPage_opportunity_img': {\r\n backgroundImage: `url(\"${firstpageOppoImg}\")`,\r\n },\r\n '.tips-card .mainLineBid_opportunity_img': {\r\n backgroundImage: `url(\"${mainlineOppoImg}\")`,\r\n },\r\n '.tips-card .mainLine1Bid_opportunity_img': {\r\n backgroundImage: `url(\"${firstPositionImg}\")`,\r\n },\r\n '.tips-card .competitiveBid_opportunity_img': {\r\n backgroundImage: `url(\"${competitiveBidImg}\")`,\r\n },\r\n '.tips-card .adScheduling_opportunity_img': {\r\n backgroundImage: `url(\"${adSchedulingImg}\")`,\r\n },\r\n});\r\n","import { helpbuttonStyle, convertToLocalStyle, getFluctuationPopupStyle, getFluctuationLoadingStyle } from '@bingads-webui-campaign-react/common-styles';\r\n\r\nexport const getTopChangeCardStyle = palette => ({\r\n '@global': {\r\n ...getFluctuationPopupStyle({ palette }),\r\n ...getFluctuationLoadingStyle(),\r\n '.bingads-fluctuation-wrapper .card-holder__wrapper': {\r\n minWidth: '20px !important',\r\n border: 'none !important',\r\n flexDirection: 'row !important',\r\n boxShadow: 'none !important',\r\n marginBottom: -4,\r\n\r\n '& .left.carousel-control': {\r\n left: '5px !important',\r\n },\r\n\r\n '& .right.carousel-control': {\r\n right: '0px !important',\r\n width: '35px !important',\r\n },\r\n },\r\n },\r\n '.top-changes-card': {\r\n paddingBottom: 16,\r\n display: 'flex',\r\n flexDirection: 'column',\r\n fontSize: 12,\r\n minHeight: 1,\r\n\r\n ...convertToLocalStyle(helpbuttonStyle({ palette })),\r\n '& .top-changes-card-header': {\r\n display: 'flex',\r\n margin: '15px 0 0px',\r\n alignItems: 'flex-start',\r\n '& .popComparisonRange': {\r\n flex: '1',\r\n marginRight: 15,\r\n color: palette.neutralSecondary,\r\n },\r\n '& .popComparisonRange .helpbutton': {\r\n marginLeft: 5,\r\n },\r\n '& .top-changes-card_metric': {\r\n flex: '0',\r\n },\r\n '& .metric-container': {\r\n marginRight: 20,\r\n },\r\n },\r\n '& .top-change-grid-container': {\r\n display: 'flex',\r\n flex: '1 1',\r\n justifyContent: 'center',\r\n overflowY: 'auto',\r\n overflowX: 'hidden',\r\n '& .top-change-empty': {\r\n alignSelf: 'center',\r\n fontSize: '14px',\r\n },\r\n '& .top-change-grid': {\r\n display: 'grid',\r\n gridTemplateColumns: 'minmax(0, 33.33%) minmax(0, 16.67%) minmax(0, 16.67%) minmax(max-content, 1fr) minmax(max-content, max-content) minmax(max-content, max-content)',\r\n alignItems: 'stretch',\r\n flex: '1',\r\n alignSelf: 'flex-start',\r\n\r\n '& .top-change-grid-row-20': {\r\n gridRow: '20',\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '& .top-change-grid-row-19': {\r\n gridRow: '19',\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '& .top-change-grid-row-18': {\r\n gridRow: '18',\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '& .top-change-grid-row-17': {\r\n gridRow: '17',\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '& .top-change-grid-row-16': {\r\n gridRow: '16',\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '& .top-change-grid-row-15': {\r\n gridRow: '15',\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '& .top-change-grid-row-14': {\r\n gridRow: '14',\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '& .top-change-grid-row-13': {\r\n gridRow: '13',\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '& .top-change-grid-row-12': {\r\n gridRow: '12',\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '& .top-change-grid-row-11': {\r\n gridRow: '11',\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '& .top-change-grid-row-10': {\r\n gridRow: '10',\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '& .top-change-grid-row-9': {\r\n gridRow: '9',\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '& .top-change-grid-row-8': {\r\n gridRow: '8',\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '& .top-change-grid-row-7': {\r\n gridRow: '7',\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '& .top-change-grid-row-6': {\r\n gridRow: '6',\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '& .top-change-grid-row-5': {\r\n gridRow: '5',\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '& .top-change-grid-row-4': {\r\n gridRow: '4',\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '& .top-change-grid-row-3': {\r\n gridRow: '3',\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '& .top-change-grid-row-2': {\r\n gridRow: '2',\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '& .top-change-grid-row-1': {\r\n gridRow: '1',\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '& .top-change-entity-name': {\r\n gridColumn: '1',\r\n borderRight: '1px solid #EFEFEF',\r\n display: 'flex',\r\n alignItems: 'center',\r\n minHeight: 48,\r\n paddingLeft: 10,\r\n paddingRight: 10,\r\n },\r\n '& .top-change-entity-name .status': {\r\n marginRight: 5,\r\n },\r\n '& .top-change-entity-name a': {\r\n overflow: 'hidden',\r\n textOverflow: 'ellipsis',\r\n minWidth: 1,\r\n whiteSpace: 'nowrap',\r\n },\r\n '& .top-change-graph-decline': {\r\n gridColumn: '2',\r\n borderRight: '1px solid #CBCBCB',\r\n padding: '5px 0 5px 5px',\r\n display: 'flex',\r\n alignItems: 'center',\r\n backgroundColor: palette.neutralLighter,\r\n },\r\n '& .top-change-graph-decline .decline-box': {\r\n display: 'flex',\r\n height: 30,\r\n width: '100%',\r\n },\r\n '& .top-change-graph-decline .decline-box .graph-bar': {\r\n backgroundColor: palette.themePrimary,\r\n },\r\n '& .top-change-graph-increase': {\r\n gridColumn: '3',\r\n borderRight: '1px solid #EFEFEF',\r\n padding: '5px 5px 5px 0',\r\n display: 'flex',\r\n alignItems: 'center',\r\n backgroundColor: palette.neutralLighter,\r\n },\r\n '& .top-change-graph-increase .increase-box': {\r\n display: 'flex',\r\n height: 30,\r\n width: '100%',\r\n },\r\n '& .top-change-graph-increase .increase-box .graph-bar': {\r\n backgroundColor: '#01188F',\r\n },\r\n '& .insight-hover-target .hover-content': {\r\n top: '0 !important',\r\n width: 140,\r\n right: 'auto !important',\r\n },\r\n '& .mcc-perf-fluctuation-bulb-container:hover .hover-container': {\r\n display: 'block',\r\n position: 'relative',\r\n left: 'calc(-50% - 30px)',\r\n },\r\n '& .mcc-perf-fluctuation-bulb-container': {\r\n gridColumn: '4',\r\n\r\n '& .mcc-perf-fluctuation-bulb': {\r\n padding: 10,\r\n width: 30,\r\n cursor: 'pointer',\r\n },\r\n\r\n '& .mcc-perf-fluctuation-bulb:before': {\r\n fontFamily: 'MsAds MDL2 Assets',\r\n color: '#0078D4',\r\n fontSize: 16,\r\n },\r\n },\r\n '& .pop-change': {\r\n gridColumn: '5',\r\n fontSize: 15,\r\n color: palette.neutralPrimary,\r\n paddingLeft: 10,\r\n paddingTop: 12,\r\n textAlign: 'right',\r\n },\r\n '& .pop-change-percentage': {\r\n gridColumn: '6',\r\n fontSize: 12,\r\n color: palette.neutralSecondary,\r\n paddingLeft: 15,\r\n paddingTop: 15,\r\n textAlign: 'right',\r\n },\r\n '& .pop-range': {\r\n gridColumn: '7',\r\n fontSize: 12,\r\n color: palette.neutralSecondary,\r\n paddingLeft: 15,\r\n paddingRight: 26,\r\n paddingTop: 15,\r\n textAlign: 'right',\r\n },\r\n '& .graph-hover-target': {\r\n gridColumn: '2 / span 2',\r\n background: 'none',\r\n zIndex: '1',\r\n border: 'none !important',\r\n },\r\n '& .pop-hover-target': {\r\n gridColumn: '5 / span 2',\r\n background: 'none',\r\n zIndex: '1',\r\n border: 'none !important',\r\n },\r\n '& .graph-hover-target:hover .hover-container': {\r\n display: 'block',\r\n },\r\n '& .pop-hover-target:hover .hover-container': {\r\n display: 'block',\r\n },\r\n '& .kpi-increased .bar-icon': {\r\n display: 'inline-block',\r\n backgroundColor: '#01188F',\r\n },\r\n '& .kpi-declined .bar-icon': {\r\n display: 'inline-block',\r\n backgroundColor: '#0078D7',\r\n },\r\n '& .bar-icon': {\r\n display: 'none',\r\n width: 12,\r\n height: 12,\r\n marginRight: 3,\r\n },\r\n '& .pop-hover-target .hover-container .hover-content': {\r\n right: '-150px',\r\n },\r\n '& .graph-hover-target .hover-container .hover-content': {\r\n left: '-150px',\r\n },\r\n '& .hover-container': {\r\n position: 'absolute',\r\n display: 'none',\r\n fontSize: 12,\r\n color: '#333333',\r\n width: '0',\r\n height: '0',\r\n marginLeft: 5,\r\n\r\n '& .hover-content': {\r\n position: 'absolute',\r\n zIndex: '10',\r\n padding: 15,\r\n bottom: '0',\r\n borderRadius: 2,\r\n boxShadow: '0 3.2px 7.2px 0 rgba(0,0,0,.132), 0 0.6px 1.8px 0 rgba(0,0,0,.108)',\r\n backgroundColor: 'rgba(255, 255, 255, 0.95)',\r\n '@supports (backdrop-filter: blur(60px))': {\r\n backdropFilter: 'blur(60px)',\r\n backgroundColor: 'rgba(255, 255, 255, 0.25)',\r\n },\r\n },\r\n '& .hover-content:hover': {\r\n display: 'none',\r\n },\r\n '& .hover-content .entity-name': {\r\n wordBreak: 'break-all',\r\n paddingBottom: 10,\r\n },\r\n '& .hover-content .kpi-grid': {\r\n display: 'grid',\r\n gridTemplateColumns: 'minmax(max-content, max-content) minmax(max-content, max-content)',\r\n },\r\n '& .hover-content .kpi-grid .kpi-date-range': {\r\n paddingBottom: 10,\r\n },\r\n '& .hover-content .kpi-grid .kpi-data': {\r\n fontWeight: 'bold',\r\n },\r\n '& .hover-content .kpi-grid .kpi-current': {\r\n maxWidth: '240px',\r\n gridRow: '1',\r\n gridColumn: '1',\r\n borderRight: '1px solid #DDDDDD',\r\n paddingRight: 15,\r\n },\r\n '& .hover-content .kpi-grid .kpi-comparison': {\r\n maxWidth: '240px',\r\n gridColumn: '2',\r\n paddingLeft: 15,\r\n },\r\n '& .hover-content .kpi-grid .kpi-change': {\r\n gridRow: '2',\r\n gridColumn: '1 / span 2',\r\n paddingTop: 10,\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n },\r\n '& .top-change-grid-row-1 .hover-container .hover-content, .top-change-grid-row-2 .hover-container .hover-content': {\r\n top: 48,\r\n bottom: 'auto',\r\n },\r\n },\r\n '& .scroll-bar-cover': {\r\n position: 'absolute',\r\n background: 'white',\r\n },\r\n '&:hover .scroll-bar-cover': {\r\n display: 'none',\r\n },\r\n },\r\n '& .entity-links': {\r\n marginTop: 10,\r\n },\r\n '& .entity-links .view-all-clickLink': {\r\n flex: '0 0 auto',\r\n },\r\n '& .metric-picker': {\r\n padding: '0',\r\n border: '0',\r\n fontWeight: '600',\r\n margin: '0',\r\n fontSize: 12,\r\n lineHeight: 'normal',\r\n fallbacks: [\r\n {\r\n fontWeight: 'normal',\r\n },\r\n ],\r\n },\r\n },\r\n});\r\n","export const getTopLocationCardStyle = palette => ({\r\n '.top-locations-card': {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent: 'space-between',\r\n marginTop: 35,\r\n marginBottom: 55,\r\n },\r\n '.top-locations-card .metric-picker-container': {\r\n display: 'flex',\r\n justifyContent: 'flex-end',\r\n height: '0',\r\n flex: '0',\r\n position: 'relative',\r\n top: -32,\r\n right: 0,\r\n },\r\n '.top-locations-card .metric-picker-container .metric-picker': {\r\n padding: '0',\r\n border: '0',\r\n fontWeight: '400',\r\n margin: '0',\r\n fontSize: 12,\r\n lineHeight: 'normal',\r\n },\r\n '.top-locations-card .location-data': {\r\n flex: '1',\r\n flexBasis: 1,\r\n minHeight: 1,\r\n display: 'flex',\r\n position: 'relative',\r\n },\r\n '.top-locations-card .location-data .location-map': {\r\n display: 'flex',\r\n flex: '6',\r\n },\r\n '.top-locations-card .location-data .location-map>div': {\r\n flex: '1',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n },\r\n '.top-locations-card .location-data .location-map>div .map-container-wrapper': {\r\n flex: '1',\r\n display: 'flex',\r\n },\r\n '.top-locations-card .location-data .location-map>div .map-container-wrapper .map-container': {\r\n flex: '1',\r\n position: 'relative',\r\n },\r\n '.top-locations-card .location-data .location-map>div .map-container-wrapper .map-container .MicrosoftMap': {\r\n position: 'absolute !important',\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0,\r\n width: 'inherit !important',\r\n height: 'inherit !important',\r\n },\r\n '.top-locations-card .location-data .location-map>div .map-container-wrapper .map-container .tool-tip-container': {\r\n padding: 15,\r\n boxShadow: '0 3.2px 7.2px 0 rgba(0,0,0,.132), 0 0.6px 1.8px 0 rgba(0,0,0,.108)',\r\n backgroundColor: 'rgba(255, 255, 255, 0.95)',\r\n '@supports (backdrop-filter: blur(60px))': {\r\n backdropFilter: 'blur(60px)',\r\n backgroundColor: 'rgba(255, 255, 255, 0.25)',\r\n },\r\n },\r\n '.top-locations-card .location-data .location-map>div .map-container-wrapper .map-container .tool-tip-container .date-range': {\r\n whiteSpace: 'nowrap',\r\n margin: '10px 0',\r\n },\r\n '.top-locations-card .location-data .location-map>div .map-container-wrapper .map-container .tool-tip-container .metric-container': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '.top-locations-card .location-data .location-map>div .map-container-wrapper .map-container .tool-tip-container .metric-container .metric-name': {\r\n marginRight: 5,\r\n },\r\n '.top-locations-card .location-data .location-map>div .map-container-wrapper .map-container .tool-tip-container .metric-container .metric-value': {\r\n fontWeight: 'bold',\r\n },\r\n '.top-locations-card .location-data .location-map>div .zoom-to-all': {\r\n display: 'none',\r\n },\r\n '.top-locations-card .location-data .data-container': {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n flex: '4',\r\n },\r\n '.top-locations-card .location-data .data-container .grid-row-hover': {\r\n backgroundColor: `${palette.neutralLighter} !important`,\r\n },\r\n '.top-locations-card .location-data .data-container .data-grid-row-10': {\r\n '-ms-grid-row': '10',\r\n gridRow: '10',\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '.top-locations-card .location-data .data-container .data-grid-row-9': {\r\n '-ms-grid-row': '9',\r\n gridRow: '9',\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '.top-locations-card .location-data .data-container .data-grid-row-8': {\r\n '-ms-grid-row': '8',\r\n gridRow: '8',\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '.top-locations-card .location-data .data-container .data-grid-row-7': {\r\n '-ms-grid-row': '7',\r\n gridRow: '7',\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '.top-locations-card .location-data .data-container .data-grid-row-6': {\r\n '-ms-grid-row': '6',\r\n gridRow: '6',\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '.top-locations-card .location-data .data-container .data-grid-row-5': {\r\n '-ms-grid-row': '5',\r\n gridRow: '5',\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '.top-locations-card .location-data .data-container .data-grid-row-4': {\r\n '-ms-grid-row': '4',\r\n gridRow: '4',\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '.top-locations-card .location-data .data-container .data-grid-row-3': {\r\n '-ms-grid-row': '3',\r\n gridRow: '3',\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '.top-locations-card .location-data .data-container .data-grid-row-2': {\r\n '-ms-grid-row': '2',\r\n gridRow: '2',\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '.top-locations-card .location-data .data-container .data-grid-row-1': {\r\n '-ms-grid-row': '1',\r\n gridRow: '1',\r\n display: 'flex',\r\n alignItems: 'center',\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '.top-locations-card .location-data .data-container .scroll-container': {\r\n overflowY: 'auto',\r\n flex: '1',\r\n },\r\n '.top-locations-card .location-data .data-container .scroll-container .data-grid': {\r\n display: 'grid',\r\n fallbacks: [\r\n {\r\n display: '-ms-grid',\r\n },\r\n ],\r\n alignSelf: 'flex-start',\r\n overflowY: 'auto',\r\n '-ms-grid-template-columns': '1fr auto',\r\n gridTemplateColumns: '1fr auto',\r\n },\r\n '.top-locations-card .location-data .data-container .scroll-container .data-grid .location-name': {\r\n padding: '0 10px',\r\n height: 42,\r\n whiteSpace: 'nowrap',\r\n overflow: 'hidden',\r\n textOverflow: 'ellipsis',\r\n '-ms-grid-column': '1',\r\n gridColumn: '1',\r\n marginLeft: 10,\r\n borderBottom: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '.top-locations-card .location-data .data-container .scroll-container .data-grid .kpi': {\r\n justifyContent: 'flex-end',\r\n paddingRight: 10,\r\n '-ms-grid-column': '2',\r\n gridColumn: '2',\r\n borderBottom: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '.top-locations-card .location-data .data-container .recommendation-container': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n margin: '10px 0 10px 10px',\r\n },\r\n '.top-locations-card .location-data .data-container .recommendation-container .recommendation-icon-container': {\r\n display: 'flex',\r\n flexShrink: '0',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n marginRight: 5,\r\n border: '1px solid #1570A6',\r\n backgroundColor: '#e5f5fb',\r\n width: 30,\r\n height: 30,\r\n },\r\n '.top-locations-card .location-data .data-container .recommendation-container .recommendation-icon-container .recommendation-light-bulb': {\r\n color: '#1570A6 !important',\r\n },\r\n '.top-locations-card .location-data .data-container .recommendation-container .recommendation-icon-container .recommendation-light-bulb:before': {\r\n fontSize: '16px !important',\r\n },\r\n '.top-locations-card .location-data .data-container .recommendation-container .msg': {\r\n display: 'inline',\r\n color: '#006464',\r\n },\r\n '.top-locations-card .location-data .data-container .recommendation-container .view-recommendations, .top-locations-card .location-data .data-container .recommendation-container .dismiss-recommendations': {\r\n color: '#1570A6',\r\n },\r\n '.top-locations-card .location-data .data-container:hover .scroll-bar-cover': {\r\n display: 'none',\r\n },\r\n '.top-locations-card .location-data .data-container .scroll-bar-cover': {\r\n position: 'absolute',\r\n background: 'white',\r\n right: '0',\r\n top: '0',\r\n overflow: 'hidden',\r\n },\r\n '.top-locations-card .location-data .data-container .scroll-bar-cover .block-container': {\r\n position: 'absolute',\r\n width: '100%',\r\n },\r\n '.top-locations-card .location-data .data-container .scroll-bar-cover .block-container .cover-block': {\r\n height: 42,\r\n },\r\n '.top-locations-card .location-links': {\r\n alignItems: 'baseline',\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n height: '0',\r\n position: 'relative',\r\n top: 10,\r\n flex: '0 0 auto',\r\n },\r\n '.top-locations-card .location-links .view-picker-clickLink': {\r\n display: 'none',\r\n },\r\n '.top-locations-card .bubble-icon': {\r\n width: 12,\r\n height: 12,\r\n border: '1px solid #107C10',\r\n borderRadius: 6,\r\n marginRight: 5,\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n },\r\n '.top-locations-card .bubble-icon .dot': {\r\n width: 2,\r\n height: 2,\r\n border: '2px solid #107C10',\r\n borderRadius: 2,\r\n },\r\n '.card-holder__wrapper .small_layout .location-map': {\r\n display: 'none',\r\n },\r\n '.card-holder__wrapper .small_layout.top-locations-card .location-data .data-container .scroll-container .data-grid .location-name': {\r\n marginLeft: 0,\r\n },\r\n '.card-holder__wrapper .small_layout .data-container': {\r\n display: 'none',\r\n flex: '1',\r\n },\r\n '.card-holder__wrapper .small_layout .location-links .view-picker-clickLink': {\r\n display: 'block',\r\n cursor: 'pointer',\r\n },\r\n});\r\n","export const getTopLocationCardFluentV2Style = palette => ({\r\n '.top-locations-card': {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent: 'space-between',\r\n height: '100%',\r\n },\r\n '.top-locations-card .metric-picker-container': {\r\n display: 'flex',\r\n justifyContent: 'flex-end',\r\n position: 'relative',\r\n },\r\n '.top-locations-card .metric-picker-container .metric-picker': {\r\n padding: '0',\r\n border: '0',\r\n fontWeight: '400',\r\n margin: '0',\r\n fontSize: 12,\r\n lineHeight: 'normal',\r\n },\r\n '.top-locations-card .metric-picker.open .dropdown-menu': {\r\n zIndex: 110,\r\n },\r\n '.top-locations-card .location-data': {\r\n flex: '1',\r\n flexBasis: 1,\r\n minHeight: 1,\r\n display: 'flex',\r\n position: 'relative',\r\n },\r\n '.top-locations-card .location-data .location-map': {\r\n display: 'flex',\r\n flex: '6',\r\n },\r\n '.top-locations-card .location-data .location-map>div': {\r\n flex: '1',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n },\r\n '.top-locations-card .location-data .location-map>div .map-container-wrapper': {\r\n flex: '1',\r\n display: 'flex',\r\n },\r\n '.top-locations-card .location-data .location-map>div .map-container-wrapper .map-container': {\r\n flex: '1',\r\n position: 'relative',\r\n },\r\n '.top-locations-card .location-data .location-map>div .map-container-wrapper .map-container .MicrosoftMap': {\r\n position: 'absolute !important',\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0,\r\n width: 'inherit !important',\r\n height: 'inherit !important',\r\n },\r\n '.top-locations-card .location-data .location-map>div .map-container-wrapper .map-container .tool-tip-container': {\r\n padding: 15,\r\n boxShadow: '0 3.2px 7.2px 0 rgba(0,0,0,.132), 0 0.6px 1.8px 0 rgba(0,0,0,.108)',\r\n backgroundColor: 'rgba(255, 255, 255, 0.95)',\r\n '@supports (backdrop-filter: blur(60px))': {\r\n backdropFilter: 'blur(60px)',\r\n backgroundColor: 'rgba(255, 255, 255, 0.25)',\r\n },\r\n },\r\n '.top-locations-card .location-data .location-map>div .map-container-wrapper .map-container .tool-tip-container .date-range': {\r\n whiteSpace: 'nowrap',\r\n margin: '10px 0',\r\n },\r\n '.top-locations-card .location-data .location-map>div .map-container-wrapper .map-container .tool-tip-container .metric-container': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '.top-locations-card .location-data .location-map>div .map-container-wrapper .map-container .tool-tip-container .metric-container .metric-name': {\r\n marginRight: 5,\r\n },\r\n '.top-locations-card .location-data .location-map>div .map-container-wrapper .map-container .tool-tip-container .metric-container .metric-value': {\r\n fontWeight: 'bold',\r\n },\r\n '.top-locations-card .location-data .location-map>div .zoom-to-all': {\r\n display: 'none',\r\n },\r\n '.top-locations-card .location-data .data-container': {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n flex: '4',\r\n },\r\n '.top-locations-card .location-data .data-container .grid-row-hover': {\r\n backgroundColor: `${palette.neutralLighter} !important`,\r\n },\r\n '.top-locations-card .location-data .data-container .data-grid-row-10': {\r\n '-ms-grid-row': '10',\r\n gridRow: '10',\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '.top-locations-card .location-data .data-container .data-grid-row-9': {\r\n '-ms-grid-row': '9',\r\n gridRow: '9',\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '.top-locations-card .location-data .data-container .data-grid-row-8': {\r\n '-ms-grid-row': '8',\r\n gridRow: '8',\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '.top-locations-card .location-data .data-container .data-grid-row-7': {\r\n '-ms-grid-row': '7',\r\n gridRow: '7',\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '.top-locations-card .location-data .data-container .data-grid-row-6': {\r\n '-ms-grid-row': '6',\r\n gridRow: '6',\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '.top-locations-card .location-data .data-container .data-grid-row-5': {\r\n '-ms-grid-row': '5',\r\n gridRow: '5',\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '.top-locations-card .location-data .data-container .data-grid-row-4': {\r\n '-ms-grid-row': '4',\r\n gridRow: '4',\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '.top-locations-card .location-data .data-container .data-grid-row-3': {\r\n '-ms-grid-row': '3',\r\n gridRow: '3',\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '.top-locations-card .location-data .data-container .data-grid-row-2': {\r\n '-ms-grid-row': '2',\r\n gridRow: '2',\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '.top-locations-card .location-data .data-container .data-grid-row-1': {\r\n '-ms-grid-row': '1',\r\n gridRow: '1',\r\n display: 'flex',\r\n alignItems: 'center',\r\n borderTop: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '.top-locations-card .location-data .data-container .scroll-container': {\r\n overflowY: 'auto',\r\n flex: '1',\r\n },\r\n '.top-locations-card .location-data .data-container .scroll-container .data-grid': {\r\n display: 'grid',\r\n fallbacks: [\r\n {\r\n display: '-ms-grid',\r\n },\r\n ],\r\n alignSelf: 'flex-start',\r\n overflowY: 'auto',\r\n '-ms-grid-template-columns': '1fr auto',\r\n gridTemplateColumns: '1fr auto',\r\n },\r\n '.top-locations-card .location-data .data-container .scroll-container .data-grid .location-name': {\r\n padding: '0 10px',\r\n height: 42,\r\n whiteSpace: 'nowrap',\r\n overflow: 'hidden',\r\n textOverflow: 'ellipsis',\r\n '-ms-grid-column': '1',\r\n gridColumn: '1',\r\n marginLeft: 10,\r\n borderBottom: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '.top-locations-card .location-data .data-container .scroll-container .data-grid .kpi': {\r\n justifyContent: 'flex-end',\r\n paddingRight: 10,\r\n '-ms-grid-column': '2',\r\n gridColumn: '2',\r\n borderBottom: `1px solid ${palette.neutralLighter}`,\r\n },\r\n '.top-locations-card .location-data .data-container .recommendation-container': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n margin: '10px 0 10px 10px',\r\n },\r\n '.top-locations-card .location-data .data-container .recommendation-container .recommendation-icon-container': {\r\n display: 'flex',\r\n flexShrink: '0',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n marginRight: 5,\r\n border: '1px solid #1570A6',\r\n backgroundColor: '#e5f5fb',\r\n width: 30,\r\n height: 30,\r\n },\r\n '.top-locations-card .location-data .data-container .recommendation-container .recommendation-icon-container .recommendation-light-bulb': {\r\n color: '#1570A6 !important',\r\n },\r\n '.top-locations-card .location-data .data-container .recommendation-container .recommendation-icon-container .recommendation-light-bulb:before': {\r\n fontSize: '16px !important',\r\n },\r\n '.top-locations-card .location-data .data-container .recommendation-container .msg': {\r\n display: 'inline',\r\n color: '#006464',\r\n },\r\n '.top-locations-card .location-data .data-container .recommendation-container .view-recommendations, .top-locations-card .location-data .data-container .recommendation-container .dismiss-recommendations': {\r\n color: '#1570A6',\r\n },\r\n '.top-locations-card .location-data .data-container:hover .scroll-bar-cover': {\r\n display: 'none',\r\n },\r\n '.top-locations-card .location-data .data-container .scroll-bar-cover': {\r\n position: 'absolute',\r\n background: 'white',\r\n right: '0',\r\n top: '0',\r\n overflow: 'hidden',\r\n },\r\n '.top-locations-card .location-data .data-container .scroll-bar-cover .block-container': {\r\n position: 'absolute',\r\n width: '100%',\r\n },\r\n '.top-locations-card .location-data .data-container .scroll-bar-cover .block-container .cover-block': {\r\n height: 42,\r\n },\r\n '.top-locations-card .location-links': {\r\n alignItems: 'baseline',\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n position: 'relative',\r\n marginTop: 10,\r\n },\r\n '.top-locations-card .location-links .view-picker-clickLink': {\r\n display: 'none',\r\n },\r\n '.top-locations-card .bubble-icon': {\r\n width: 12,\r\n height: 12,\r\n border: '1px solid #107C10',\r\n borderRadius: 6,\r\n marginRight: 5,\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n },\r\n '.top-locations-card .bubble-icon .dot': {\r\n width: 2,\r\n height: 2,\r\n border: '2px solid #107C10',\r\n borderRadius: 2,\r\n },\r\n '.overview-card .small_layout .location-map': {\r\n display: 'none',\r\n },\r\n '.overview-card .small_layout.top-locations-card .location-data .data-container .scroll-container .data-grid .location-name': {\r\n marginLeft: 0,\r\n },\r\n '.overview-card .small_layout .data-container': {\r\n display: 'none',\r\n flex: '1',\r\n },\r\n '.overview-card .small_layout .location-links .view-picker-clickLink': {\r\n display: 'block',\r\n cursor: 'pointer',\r\n },\r\n});\r\n","import _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useEffect } from 'react';\r\nimport {\r\n withSiteMap,\r\n withCampaignSiteMap,\r\n siteMapPropType,\r\n processor,\r\n processorSet,\r\n Configs,\r\n} from '@bingads-webui-campaign-react/with-site-map';\r\nimport { DetailListPageMenu } from '@bingads-webui-campaign-react/page-menu';\r\nimport { Activity, Scenario } from '@bingads-webui-react/hoc-with-signal';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\n\r\nconst dynamicPermissions = _.result(config.get('permissions'), 'dynamic', {});\r\nconst { IsRenameHotelToLodgingEnabled } = dynamicPermissions;\r\n\r\nexport const campaignPageGroups = [\r\n ['overview', 'recommendations', 'query-insights'],\r\n ['campaigns', 'adgroups'],\r\n ['appads-asset-groups', 'asset-groups', 'listing-groups', 'products', 'ads-and-extensions', 'assets-report', IsRenameHotelToLodgingEnabled ? 'properties' : 'hotels', 'landing-pages', 'feeds-items'],\r\n ['keywords', 'dsa', 'product-groups', IsRenameHotelToLodgingEnabled ? 'property-groups' : 'hotel-groups', 'audiences', 'demographics'],\r\n ['settings', 'locations', 'ad-schedule', 'devices'],\r\n ['change-history'],\r\n ['competition'],\r\n ['experiments'],\r\n];\r\n\r\nexport const noExpandGroups = ['recommendations', 'query-insights'];\r\n\r\nconst DetailListPageMenuWithSiteMap = withCampaignSiteMap(DetailListPageMenu, _.union(processorSet.all, [processor.processPmaxCampaignPageMenu, processor.processPmaxRetailCampaignPageMenu]));\r\n\r\nexport const Loader = (props) => {\r\n const {\r\n siteMap,\r\n updateAvailability,\r\n ...others\r\n } = props;\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n\r\n useEffect(() => {\r\n updateAvailability(!_.isEmpty(selectedParent));\r\n });\r\n\r\n if (!props.isVisible) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nLoader.propTypes = {\r\n siteMap: siteMapPropType,\r\n updateAvailability: PropTypes.func,\r\n isVisible: PropTypes.bool,\r\n};\r\n\r\nLoader.defaultProps = {\r\n updateAvailability: _.noop,\r\n isVisible: false,\r\n siteMap: null,\r\n};\r\n\r\nconst assetsDetailSiteMap = _.findWhere(Configs.standaloneSiteMap, { id: 'pmax-asset-details' });\r\nconst campaignWithAssetsSiteMap = _.union(Configs.campaignSiteMap, [assetsDetailSiteMap]);\r\n\r\nexport const CampaignPageMenuLoader = withSiteMap(\r\n React.memo(Loader),\r\n processorSet.all,\r\n campaignWithAssetsSiteMap\r\n);\r\n","import _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useEffect } from 'react';\r\nimport {\r\n withAccountsSiteMap,\r\n siteMapPropType,\r\n processor,\r\n} from '@bingads-webui-campaign-react/with-site-map';\r\nimport { PageMenu } from '@bingads-webui-campaign-react/page-menu';\r\n\r\nconst accountsPageGroups = [\r\n ['accounts-overview'],\r\n ['recommendations'],\r\n ['accounts-summary'],\r\n ['accounts-auction-insights'],\r\n ['saved-account-reports'],\r\n];\r\n\r\nexport const Loader = (props) => {\r\n const { siteMap, updateAvailability } = props;\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n\r\n useEffect(() => {\r\n updateAvailability(!_.isEmpty(selectedParent));\r\n });\r\n\r\n return props.isVisible ? () : null;\r\n};\r\n\r\nLoader.propTypes = {\r\n siteMap: siteMapPropType.isRequired,\r\n updateAvailability: PropTypes.func,\r\n isVisible: PropTypes.bool,\r\n};\r\n\r\nLoader.defaultProps = {\r\n updateAvailability: _.noop,\r\n isVisible: false,\r\n};\r\n\r\nconst processors = [processor.processPermissions, processor.processPath, processor.processScope];\r\n\r\nexport const AccountsPageMenuLoader = withAccountsSiteMap(\r\n React.memo(Loader),\r\n processors\r\n);\r\n","import _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useEffect } from 'react';\r\nimport {\r\n withToolsSiteMap,\r\n siteMapPropType,\r\n processor,\r\n} from '@bingads-webui-campaign-react/with-site-map';\r\nimport { PageMenu } from '@bingads-webui-campaign-react/page-menu';\r\n\r\nconst bulkOperationPageGroups = [\r\n ['rules'],\r\n ['bulk-edits'],\r\n ['scripts'],\r\n ['bulk-uploads'],\r\n];\r\n\r\nexport const Loader = (props) => {\r\n const { siteMap, updateAvailability } = props;\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n\r\n useEffect(() => {\r\n updateAvailability(!_.isEmpty(selectedParent));\r\n });\r\n\r\n return props.isVisible ? () : null;\r\n};\r\n\r\nLoader.propTypes = {\r\n siteMap: siteMapPropType.isRequired,\r\n updateAvailability: PropTypes.func,\r\n isVisible: PropTypes.bool,\r\n};\r\n\r\nLoader.defaultProps = {\r\n updateAvailability: _.noop,\r\n isVisible: false,\r\n};\r\n\r\nconst processors = [processor.processPermissions, processor.processPath, processor.processScope];\r\n\r\nexport const BulkOperationPageMenuLoader = withToolsSiteMap(\r\n React.memo(Loader),\r\n processors,\r\n _.flatten(bulkOperationPageGroups)\r\n);\r\n","import _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useEffect } from 'react';\r\nimport {\r\n withToolsSiteMap,\r\n siteMapPropType,\r\n processorSet,\r\n} from '@bingads-webui-campaign-react/with-site-map';\r\nimport { PageMenu } from '@bingads-webui-campaign-react/page-menu';\r\n\r\nconst businessDataPageGroups = [\r\n ['ad-customizer-feeds'],\r\n ['dynamic-data-feeds'],\r\n ['page-feeds'],\r\n ['customizer-attributes'],\r\n];\r\nexport const Loader = (props) => {\r\n const { siteMap, updateAvailability } = props;\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n\r\n useEffect(() => {\r\n updateAvailability(!_.isEmpty(selectedParent));\r\n });\r\n return props.isVisible ? () : null;\r\n};\r\n\r\nLoader.propTypes = {\r\n siteMap: siteMapPropType.isRequired,\r\n updateAvailability: PropTypes.func,\r\n isVisible: PropTypes.bool,\r\n};\r\n\r\nLoader.defaultProps = {\r\n updateAvailability: _.noop,\r\n isVisible: false,\r\n};\r\n\r\nexport const BusinessDataPageMenuLoader = withToolsSiteMap(\r\n React.memo(Loader),\r\n processorSet.all,\r\n _.flatten(businessDataPageGroups)\r\n);\r\n","import _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useEffect } from 'react';\r\nimport {\r\n withHotelCenterSiteMap,\r\n siteMapPropType,\r\n processorSet,\r\n} from '@bingads-webui-campaign-react/with-site-map';\r\nimport { TreeMenu } from '@bingads-webui-campaign-react/tree-menu';\r\n\r\nconst idsToHideSelf = ['hotel-center-setup'];\r\nconst idsToHideChildren = ['report', 'hotel-center-overview', 'reconciliationreport'];\r\nconst pruneSitemap = (sitemap, ids, hideSelfIdsArray) => {\r\n const pruneNode = (node, ids2) => {\r\n const { id, children } = node;\r\n\r\n const result = _.clone(node);\r\n\r\n if (_.some(ids2, x => x === id)) {\r\n result.children = [];\r\n }\r\n\r\n if (children && children.length > 0) {\r\n result.children = _.map(result.children, x => pruneNode(x, ids2));\r\n }\r\n\r\n return result;\r\n };\r\n\r\n const result = _.chain(sitemap)\r\n .filter(x => (_.indexOf(hideSelfIdsArray, x.id) === -1))\r\n .map(x => pruneNode(x, ids))\r\n .value();\r\n return result;\r\n};\r\n\r\nexport const Loader = (props) => {\r\n const { siteMap, updateAvailability } = props;\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n\r\n useEffect(() => {\r\n const available = !_.isEmpty(selectedParent);\r\n updateAvailability(available);\r\n props.changeLayout({ menu: { hotelCenterMenu: available } });\r\n });\r\n\r\n const prunedSitemap = pruneSitemap(siteMap, idsToHideChildren, idsToHideSelf);\r\n return props.isVisible ? () : null;\r\n};\r\n\r\nLoader.propTypes = {\r\n changeLayout: PropTypes.func,\r\n siteMap: siteMapPropType.isRequired,\r\n updateAvailability: PropTypes.func,\r\n isVisible: PropTypes.bool,\r\n};\r\n\r\nLoader.defaultProps = {\r\n changeLayout: _.noop,\r\n updateAvailability: _.noop,\r\n isVisible: false,\r\n};\r\n\r\nexport const HotelCenterPageMenuLoader = withHotelCenterSiteMap(\r\n React.memo(Loader),\r\n processorSet.all\r\n);\r\n","import _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useEffect } from 'react';\r\nimport {\r\n withHotelCenterV2SiteMap,\r\n siteMapPropType,\r\n processorSet,\r\n} from '@bingads-webui-campaign-react/with-site-map';\r\nimport { DetailListPageMenu } from '@bingads-webui-campaign-react/page-menu';\r\nimport { Activity, Scenario } from '@bingads-webui-react/hoc-with-signal';\r\n\r\nconst DetailListPageMenuWithSiteMap = withHotelCenterV2SiteMap(DetailListPageMenu, processorSet.all);\r\n\r\nconst hotelCenterV2PageGroups = [[\r\n 'property-center-overview',\r\n 'property-center-feeds',\r\n 'property-center-logos',\r\n 'property-center-reports',\r\n]];\r\n\r\nexport const Loader = (props) => {\r\n const { siteMap, updateAvailability, ...others } = props;\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n\r\n useEffect(() => {\r\n const available = !_.isEmpty(selectedParent);\r\n updateAvailability(available);\r\n });\r\n\r\n if (!props.isVisible) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nLoader.propTypes = {\r\n changeLayout: PropTypes.func,\r\n siteMap: siteMapPropType.isRequired,\r\n updateAvailability: PropTypes.func,\r\n isVisible: PropTypes.bool,\r\n location: PropTypes.shape({\r\n pathname: PropTypes.string.isRequired,\r\n }).isRequired,\r\n};\r\n\r\nLoader.defaultProps = {\r\n changeLayout: _.noop,\r\n updateAvailability: _.noop,\r\n isVisible: false,\r\n};\r\n\r\nexport const HotelCenterV2PageMenuLoader = withHotelCenterV2SiteMap(\r\n React.memo(Loader),\r\n processorSet.all\r\n);\r\n","import React, { useEffect } from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n withToolsSiteMap,\r\n siteMapPropType,\r\n processorSet\r\n} from '@bingads-webui-campaign-react/with-site-map';\r\nimport { PageMenu } from '@bingads-webui-campaign-react/page-menu';\r\n\r\nconst merchantCenterPageGroups = [\r\n ['mmc-store-summary', 'mmc-feeds', 'mmc-promotions', 'mmc-import', 'mmc-settings', 'mmc-products'],\r\n];\r\n\r\nconst merchantCenterPageGroupsWithoutImport = [\r\n ['mmc-store-summary', 'mmc-feeds', 'mmc-promotions', 'mmc-settings', 'mmc-products'],\r\n];\r\n\r\nexport const Loader = (props) => {\r\n const { siteMap, updateAvailability, permissions } = props;\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n\r\n useEffect(() => {\r\n updateAvailability(!_.isEmpty(selectedParent));\r\n });\r\n\r\n return props.isVisible ? () : null;\r\n};\r\n\r\nLoader.propTypes = {\r\n siteMap: siteMapPropType.isRequired,\r\n updateAvailability: PropTypes.func,\r\n isVisible: PropTypes.bool,\r\n};\r\n\r\nLoader.defaultProps = {\r\n updateAvailability: _.noop,\r\n isVisible: false,\r\n};\r\n\r\nexport const MerchantCenterPageMenuLoader = withToolsSiteMap(\r\n React.memo(Loader),\r\n processorSet.all,\r\n _.map(merchantCenterPageGroups[0], id => `${id}/*`)\r\n);\r\n","import _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useEffect } from 'react';\r\nimport {\r\n withBidStrategiesSiteMap,\r\n siteMapPropType,\r\n processor,\r\n} from '@bingads-webui-campaign-react/with-site-map';\r\nimport { PageMenu } from '@bingads-webui-campaign-react/page-menu';\r\n\r\nconst bidStrategiesPageGroups = [\r\n ['portfolio-bid-strategy'],\r\n ['advanced-controls'],\r\n];\r\n\r\nexport const Loader = (props) => {\r\n const { siteMap, updateAvailability } = props;\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n\r\n useEffect(() => {\r\n updateAvailability(!_.isEmpty(selectedParent));\r\n });\r\n\r\n return props.isVisible ? () : null;\r\n};\r\n\r\nLoader.propTypes = {\r\n siteMap: siteMapPropType.isRequired,\r\n updateAvailability: PropTypes.func,\r\n isVisible: PropTypes.bool,\r\n};\r\n\r\nLoader.defaultProps = {\r\n updateAvailability: _.noop,\r\n isVisible: false,\r\n};\r\n\r\nconst processors = [processor.processPermissions, processor.processPath, processor.processScope];\r\n\r\nexport const BidStrategiesPageMenuLoader = withBidStrategiesSiteMap(\r\n React.memo(Loader),\r\n processors\r\n);\r\n","import React, { useEffect } from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n withToolsSiteMap,\r\n siteMapPropType,\r\n processorSet\r\n} from '@bingads-webui-campaign-react/with-site-map';\r\nimport { UetTagsPageMenu } from '@bingads-webui-campaign/conversion-tracking-page-menu';\r\n\r\nexport const Loader = (props) => {\r\n const { siteMap, updateAvailability } = props;\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n\r\n useEffect(() => {\r\n updateAvailability(!_.isEmpty(selectedParent));\r\n });\r\n\r\n return props.isVisible ? : null;\r\n};\r\n\r\nLoader.propTypes = {\r\n siteMap: siteMapPropType.isRequired,\r\n updateAvailability: PropTypes.func,\r\n isVisible: PropTypes.bool,\r\n};\r\n\r\nLoader.defaultProps = {\r\n updateAvailability: _.noop,\r\n isVisible: false,\r\n};\r\n\r\nexport const UetPageMenuLoader = withToolsSiteMap(\r\n React.memo(Loader),\r\n processorSet.all,\r\n 'uet-tag'\r\n);\r\n","import _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useEffect } from 'react';\r\nimport {\r\n withToolsSiteMap,\r\n siteMapPropType,\r\n processor,\r\n} from '@bingads-webui-campaign-react/with-site-map';\r\nimport { PageMenu } from '@bingads-webui-campaign-react/page-menu';\r\nimport { Glyphicon } from '@bingads-webui-react/primitive';\r\nimport { AssetLibraryIcon } from '@bingads-webui-theme-2018/embeded-svgs';\r\n\r\nconst ASSETS_LIBRARY_ROOT_ID = 'creative-studio-asset-library';\r\nconst ASSETS_MENU_ID = 'creative-studio-asset-library';\r\nconst PERFORMANCE_MENU_ID = 'creative-studio-asset-library-performance';\r\n\r\nconst assetLibraryPageGroups = [\r\n [ASSETS_MENU_ID],\r\n [PERFORMANCE_MENU_ID],\r\n];\r\n\r\nexport const Loader = (props) => {\r\n const {\r\n siteMap, updateAvailability, mode, ...rest\r\n } = props;\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n\r\n useEffect(() => {\r\n updateAvailability(!_.isEmpty(selectedParent));\r\n });\r\n\r\n const renderItemIcon = ({ id }) => {\r\n if (id === PERFORMANCE_MENU_ID) {\r\n return ;\r\n }\r\n if (id === ASSETS_MENU_ID) {\r\n return (\r\n
    \r\n \r\n
    \r\n );\r\n }\r\n return null;\r\n };\r\n\r\n const { children: assetLibrarySiteMap = [] } = selectedParent || {};\r\n return props.isVisible\r\n ? \r\n : null;\r\n};\r\n\r\nLoader.propTypes = {\r\n siteMap: siteMapPropType.isRequired,\r\n updateAvailability: PropTypes.func,\r\n isVisible: PropTypes.bool,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n }),\r\n }).isRequired,\r\n mode: PropTypes.string,\r\n};\r\n\r\nLoader.defaultProps = {\r\n updateAvailability: _.noop,\r\n isVisible: false,\r\n mode: undefined,\r\n};\r\n\r\nconst processors = [processor.processPermissions, processor.processPath, processor.processScope];\r\n\r\nexport const AssetLibraryPageMenuLoader = withToolsSiteMap(\r\n React.memo(Loader),\r\n processors,\r\n [ASSETS_LIBRARY_ROOT_ID]\r\n);\r\n","import React from 'react';\r\nimport { ElementSelector } from '@bingads-webui-campaign-react/element-selector';\r\nimport { CampaignPageMenuPlaceholder } from '@bingads-webui-campaign-react/shell-ui-common';\r\n\r\nimport { CampaignPageMenuLoader } from './campaign-page-menu-loader';\r\nimport { AccountsPageMenuLoader } from './accounts-page-menu-loader';\r\nimport { BulkOperationPageMenuLoader } from './bulk-operation-menu-loader';\r\nimport { BusinessDataPageMenuLoader } from './business-data-page-menu-loader';\r\nimport { HotelCenterPageMenuLoader } from './hotel-center-page-menu-loader';\r\nimport { HotelCenterV2PageMenuLoader } from './hotel-center-v2-page-menu-loader';\r\nimport { MerchantCenterPageMenuLoader } from './merchant-center-page-menu-loader';\r\nimport { BidStrategiesPageMenuLoader } from './bid-strategies-menu-loader';\r\nimport { UetPageMenuLoader } from './uet-tag-page-menu-loader';\r\nimport { AssetLibraryPageMenuLoader } from './asset-library-page-menu-loader';\r\n\r\nexport const PageMenuContainer = React.memo(props => (\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 _ from 'underscore';\r\nimport queryString from 'query-string';\r\nimport { curlyTemplate } from '@bingads-webui-universal/primitive-utilities';\r\nimport { ScopeV2 } from '@bingads-webui-campaign-react/with-site-map';\r\n\r\nconst pathNamePrefix = '/campaign/vnext/';\r\n\r\nexport const getPathName = pageItem => `${pathNamePrefix}${pageItem.route}`;\r\n\r\nexport function mapToPageItems(items, i18n, defaultLandingPage, isFallbackSelected) {\r\n return _.map(items, item => (item.type === 'divider' ? item : {\r\n id: item.id,\r\n content: item.content || i18n.getString(item.name),\r\n isSelected: _.isUndefined(item.isSelected) ? item.selected : item.isSelected,\r\n isPageEnabled: _.isUndefined(item.isPageEnabled) ? item.available : item.isPageEnabled,\r\n route: item.route,\r\n isDefaultLandingPage: item.id === defaultLandingPage,\r\n isFallbackSelected: isFallbackSelected(item),\r\n defaultLandingPageTooltipText: item.defaultLandingPageTooltipText ||\r\n curlyTemplate(i18n.getString(_TL_('Set {{pageName}} as your default landing page')))({ pageName: i18n.getString(item.name) }),\r\n showTag: item.showTag,\r\n tagClass: item.tagClass,\r\n i18n,\r\n children: item.children,\r\n scopeV2: item.scopeV2,\r\n }));\r\n}\r\n\r\nexport function getPageItems(pageGroups, siteMap, i18n, defaultLandingPage, isFallbackSelected) {\r\n return _.reduce(pageGroups, (result, group, index) => {\r\n const newItems = mapToPageItems(_.filter(siteMap, item => group.indexOf(item.id) >= 0), i18n, defaultLandingPage, isFallbackSelected);\r\n const divider = (index === 0 || _.isEmpty(newItems)) ? [] :\r\n [{ id: `divider_${index}`, type: 'divider' }];\r\n\r\n return _.union(result, divider, newItems);\r\n }, []);\r\n}\r\n\r\nexport const getTrimmedParams = (item, scope) => {\r\n const searchObj = queryString.parse(scope.history.location.search);\r\n const trimmedParams = ScopeV2.trimToScope(item.scopeV2, searchObj);\r\n return trimmedParams;\r\n};\r\n\r\nexport const getTrimmedQuery = (item, scope) => {\r\n const trimmedParams = getTrimmedParams(item, scope);\r\n return queryString.stringify(trimmedParams, { sort: false });\r\n};\r\n\r\nexport const getPageItemUrl = (pageItem, scope) => {\r\n if (!pageItem.isPageEnabled) {\r\n return '';\r\n }\r\n\r\n const path = getPathName(pageItem);\r\n const query = getTrimmedQuery(pageItem, scope);\r\n\r\n return `${path}?${query}`;\r\n};\r\n\r\n// only flatten {limitLevel} depth\r\nexport const getFlattenedItems = (items, noExpandGroups, limitLevel = 2) =>\r\n items.reduce((flattenedItems, item) => {\r\n if (!item.children || item.children.length === 0 || limitLevel <= 1 || _.contains(noExpandGroups, item.id)) {\r\n return [...flattenedItems, item];\r\n }\r\n\r\n return [\r\n ...flattenedItems,\r\n ...getFlattenedItems(item.children, noExpandGroups, limitLevel - 1),\r\n ];\r\n }, []);\r\n\r\nconst fillGroupCount = groups => _.map(groups, (group) => {\r\n if (group.count) {\r\n return group;\r\n }\r\n\r\n const newgroup = _.extend(group, {\r\n children: fillGroupCount(group.children),\r\n });\r\n return _.extend(newgroup, {\r\n count: _.reduce(newgroup.children, (sum, child) => sum + child.count, 0),\r\n });\r\n});\r\n\r\nconst fillGroupStartIndex = (groups, startIndex = 0) => _.map(groups, (group, index) => {\r\n const si = index === 0 ? startIndex : groups[index - 1].startIndex + groups[index - 1].count;\r\n _.extend(group, {\r\n children: fillGroupStartIndex(group.children, si),\r\n });\r\n return _.extend(group, {\r\n startIndex: si,\r\n });\r\n});\r\n\r\nconst fillSelectedAndCollapse = (groups, falttenedItems, selectedIndex = -1) => {\r\n const si = selectedIndex < 0 ? _.findIndex(falttenedItems, { isSelected: true }) : selectedIndex;\r\n return _.map(groups, (group) => {\r\n if (si >= group.startIndex && si < group.startIndex + group.count) {\r\n return _.extend({}, group, { isSelected: true });\r\n }\r\n\r\n if (group.count === 1) {\r\n return group;\r\n }\r\n\r\n const newChildren = fillSelectedAndCollapse(group.children, falttenedItems, si);\r\n return _.extend({}, group, { isCollapsed: true, children: newChildren });\r\n });\r\n};\r\n\r\nexport const getGroupsForDetailList = (items, falttenedItems, noExpandGroups, level = 0, limitLevel = 1) => {\r\n const groupsResult = _.reduce(items, (groups, item) => {\r\n let group;\r\n const name = item.content || (_.find(falttenedItems, { id: item.id })).content;\r\n // the last condition is for special mistake configs, we should not have this kind of configs. just in case\r\n if (_.contains(noExpandGroups, item.id) || item.type === 'divider' || (_.isEmpty(item.children) && level === 0)) {\r\n group = [{\r\n key: `group-${item.id}`,\r\n keyId: item.id,\r\n count: 1,\r\n children: [],\r\n level,\r\n name,\r\n }];\r\n } else if (_.isEmpty(item.children) || level + 1 > limitLevel) {\r\n group = [];\r\n } else if (item.children.length > 0 && item.children[0].children && item.children[0].children.length > 0 && level + 1 < limitLevel) {\r\n const children = getGroupsForDetailList(item.children, falttenedItems, noExpandGroups, level + 1, limitLevel);\r\n group = [{\r\n key: `group-${item.id}`,\r\n keyId: item.id,\r\n level,\r\n children,\r\n name,\r\n }];\r\n } else {\r\n group = [{\r\n key: `group-${item.id}`,\r\n keyId: item.id,\r\n count: item.children.length,\r\n children: [],\r\n level,\r\n name,\r\n }];\r\n }\r\n\r\n return [\r\n ...groups,\r\n ...group,\r\n ];\r\n }, []);\r\n return level === 0 ? fillSelectedAndCollapse(fillGroupStartIndex(fillGroupCount(groupsResult)), falttenedItems) :\r\n groupsResult;\r\n};\r\n\r\nexport const getSingleItems = (groups, items) => _.reduce(groups, (singleItems, group) => {\r\n if (group.count === 1) {\r\n return [...singleItems, _.extend({}, items[group.startIndex], { parentId: group.keyId })];\r\n }\r\n return singleItems;\r\n}, []);\r\n","export const getPageMenuItemStyles = (pageMenuItem, { palette = {} }) => ({\r\n baseMenuItem: {\r\n color: 'rgba(0, 0, 0, 0)', // Hides the fallback glyph\r\n fontFamily: 'Segoe UI',\r\n fontWeight: 'normal',\r\n lineHeight: 'normal',\r\n display: 'flex',\r\n flexDirection: 'row',\r\n padding: '0 12px 0 0',\r\n textDecoration: 'none',\r\n cursor: 'pointer',\r\n },\r\n pageMenuItem: {\r\n '&:hover': {\r\n backgroundColor: palette.neutralLight,\r\n textDecoration: 'none',\r\n color: 'rgba(0,0,0,0.6)',\r\n },\r\n '&:active': {\r\n backgroundColor: palette.neutralQuaternaryAlt,\r\n textDecoration: 'none',\r\n },\r\n },\r\n notEnabledPageMenuItem: {\r\n '&:hover': {\r\n color: palette.themePrimary,\r\n },\r\n '&:active': {\r\n color: palette.themePrimary,\r\n },\r\n '&:focus': {\r\n color: palette.themePrimary,\r\n },\r\n },\r\n selectedPageMenuItem: {\r\n fontWeight: 600,\r\n backgroundColor: palette.themeLighter,\r\n '&:hover': {\r\n backgroundColor: palette.themeLight,\r\n textDecoration: 'none',\r\n color: palette.themePrimary,\r\n },\r\n '& a:focus': {\r\n textDecoration: 'none',\r\n },\r\n '& .fallback-glyph': {\r\n color: 'rgba(0,0,0,0.6)',\r\n },\r\n },\r\n notEnabledSelectedPageMenuItem: {\r\n color: palette.themePrimary,\r\n },\r\n beforeIcon: {\r\n borderLeft: `4px solid ${palette.themePrimary}`,\r\n padding: 0,\r\n marginRight: -4,\r\n alignSelf: 'stretch',\r\n },\r\n textContainer: {\r\n display: 'inline-block',\r\n marginLeft: 16,\r\n marginTop: 8,\r\n marginBottom: 9,\r\n wordBreak: 'break-word',\r\n flex: '1 1 1px',\r\n color: palette.neutralPrimary,\r\n '& a .page-menu-item-content': {\r\n '@media screen and (forced-colors: active)': {\r\n color: 'canvasText',\r\n },\r\n },\r\n },\r\n iconContainer: {\r\n display: 'inline-block',\r\n marginLeft: 16,\r\n marginTop: 8,\r\n marginBottom: 9,\r\n color: palette.neutralPrimary,\r\n },\r\n text: {\r\n fontSize: 14,\r\n color: palette.neutralPrimary,\r\n },\r\n fallbackGlyph: {\r\n fontSize: 16,\r\n color: 'inherit',\r\n float: 'right',\r\n padding: '7px 5px 10px 4px',\r\n lineHeight: '19px',\r\n },\r\n calloutTargetContainer: {\r\n },\r\n selectedLandingPage: {\r\n color: `${palette.themePrimary} !important`,\r\n },\r\n notSelectedLandingPage: {\r\n color: '#808080', // grey color\r\n },\r\n landingPageButton: {\r\n '&:focus': {\r\n outline: `1px solid ${palette.neutralSecondary}`,\r\n },\r\n },\r\n menuItemTagContainer: {\r\n position: 'absolute',\r\n display: 'inline-block',\r\n marginTop: '-14px',\r\n marginLeft: '-18px',\r\n },\r\n relationLine: {\r\n borderRight: `3px solid ${palette.neutralQuaternaryAlt}`,\r\n marginRight: -3,\r\n marginTop: -10,\r\n },\r\n});\r\n","import PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport React from 'react';\r\nimport _ from 'underscore';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { Glyphicon, OverlayTrigger, Tooltip } from '@bingads-webui-react/primitive';\r\nimport { submitEvent } from '@bingads-webui-universal/accessibility-helper';\r\nimport { withPermissions } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { getPageMenuItemStyles } from '../styles/page-menu-item-styles';\r\n\r\nconst LandingPageSelector = ({\r\n classes,\r\n isPageEnabled,\r\n pageId,\r\n setLandingPage,\r\n isDefaultLandingPage,\r\n defaultLandingPageTooltipText,\r\n}) => {\r\n const classNamesArray = [\r\n [classes.fallbackGlyph, 'fallback-glyph'],\r\n isDefaultLandingPage\r\n ? classes.selectedLandingPage\r\n : classes.notSelectedLandingPage,\r\n ];\r\n\r\n const className = classNames(classNamesArray);\r\n let activeGlyphicon;\r\n if (pageId === 'campaigns' || pageId === 'overview' || pageId === 'accounts-summary' || pageId === 'accounts-overview') {\r\n if (isDefaultLandingPage) {\r\n activeGlyphicon = setLandingPage(pageId, e)} className={className} glyph=\"ba-HomeSolid\" />;\r\n } else {\r\n activeGlyphicon = (\r\n \r\n {defaultLandingPageTooltipText}\r\n \r\n }\r\n >\r\n setLandingPage(pageId, e)}\r\n role=\"button\"\r\n className={classNames([classes.landingPageButton, 'set-landing-page-button'])}\r\n tabIndex={0}\r\n onKeyDown={e => submitEvent(setLandingPage)(e, pageId, e)}\r\n aria-label={defaultLandingPageTooltipText}\r\n data-is-focusable\r\n >\r\n \r\n
    \r\n );\r\n }\r\n } else if (!isPageEnabled) {\r\n activeGlyphicon = ;\r\n }\r\n\r\n return (\r\n \r\n {activeGlyphicon}\r\n \r\n\r\n );\r\n};\r\n\r\nLandingPageSelector.defaultProps = {\r\n setLandingPage: null,\r\n isDefaultLandingPage: null,\r\n defaultLandingPageTooltipText: '',\r\n};\r\n\r\nLandingPageSelector.propTypes = {\r\n classes: PropTypes.shape(_.mapObject(\r\n getPageMenuItemStyles({}, {}),\r\n _.constant(PropTypes.string.isRequired)\r\n )).isRequired,\r\n isPageEnabled: PropTypes.bool.isRequired,\r\n pageId: PropTypes.string.isRequired,\r\n setLandingPage: PropTypes.func,\r\n isDefaultLandingPage: PropTypes.bool,\r\n defaultLandingPageTooltipText: PropTypes.string,\r\n permissions: PropTypes.shape({\r\n }).isRequired,\r\n};\r\n\r\nexport default withPermissions(withDefaultStyles(LandingPageSelector, getPageMenuItemStyles));\r\n","import classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport React from 'react';\r\nimport _ from 'underscore';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { withFallbackCallout } from '@bingads-webui-react/fallback-feature';\r\nimport { StyledMenuItemTag } from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport { getPageMenuItemStyles } from '../styles/page-menu-item-styles';\r\nimport LandingPageSelector from './landing-page-selector';\r\n\r\nfunction getPageMenuItemText(classes, pageItem) {\r\n return (\r\n \r\n {pageItem.content}\r\n \r\n );\r\n}\r\n\r\nfunction onClick() {\r\n // disable clicking on links, only allow to open in new tabs/windows\r\n return false;\r\n}\r\n\r\nconst PageMenuItemText = ({\r\n classes, pageItem, pageItemUrl, showLabel,\r\n}) => (\r\n \r\n {pageItemUrl ? (\r\n \r\n {getPageMenuItemText(classes, pageItem)}\r\n \r\n ) : (\r\n getPageMenuItemText(classes, pageItem)\r\n )}\r\n {pageItem.showTag ? // preserve this check for better performance\r\n
    \r\n \r\n
    : ''}\r\n
    \r\n\r\n);\r\n\r\nconst PageMenuItem = ({\r\n classes,\r\n pageItem,\r\n setLandingPage,\r\n pageItemUrl = '',\r\n withRelationLine = false,\r\n showLabel = false,\r\n renderIcon = null,\r\n collapsed = false,\r\n}) => {\r\n const classNameArray = [\r\n classes.baseMenuItem,\r\n pageItem.isSelected\r\n ? [classes.selectedPageMenuItem, 'page-menu-item-selected']\r\n : classes.pageMenuItem,\r\n `bingads-campaign-react-page-menu-item-${pageItem.id}`,\r\n 'bingads-campaign-react-page-menu-item',\r\n `bingads-campaign-react-page-menu-item-${withRelationLine ? 'sub' : 'top'}`,\r\n ];\r\n\r\n if (!pageItem.isPageEnabled) {\r\n classNameArray.push(classes.notEnabledPageMenuItem);\r\n\r\n if (pageItem.isFallbackSelected) {\r\n classNameArray.push(classes.notEnabledSelectedPageMenuItem);\r\n }\r\n }\r\n\r\n const className = classNames(classNameArray);\r\n\r\n return (\r\n \r\n {withRelationLine &&
    }\r\n {pageItem.isSelected &&
    }\r\n {renderIcon &&
    {renderIcon(pageItem)}
    }\r\n {(!renderIcon || !collapsed) && }\r\n \r\n
    \r\n );\r\n};\r\n\r\nPageMenuItem.defaultProps = {\r\n setLandingPage: null,\r\n pageItemUrl: '',\r\n withRelationLine: false,\r\n showLabel: false,\r\n renderIcon: null,\r\n collapsed: false,\r\n};\r\n\r\nPageMenuItemText.propTypes = {\r\n classes: PropTypes.shape(_.mapObject(\r\n getPageMenuItemStyles({}, {}),\r\n _.constant(PropTypes.string.isRequired)\r\n )).isRequired,\r\n pageItem: PropTypes.shape({\r\n id: PropTypes.string.isRequired,\r\n content: PropTypes.string.isRequired,\r\n isDefaultLandingPage: PropTypes.bool,\r\n }).isRequired,\r\n pageItemUrl: PropTypes.string.isRequired,\r\n showLabel: PropTypes.bool.isRequired,\r\n};\r\n\r\nPageMenuItem.propTypes = {\r\n classes: PropTypes.shape(_.mapObject(\r\n getPageMenuItemStyles({}, {}),\r\n _.constant(PropTypes.string.isRequired)\r\n )).isRequired,\r\n pageItem: PropTypes.shape({\r\n id: PropTypes.string.isRequired,\r\n content: PropTypes.string.isRequired,\r\n isDefaultLandingPage: PropTypes.bool,\r\n isSelected: PropTypes.bool.isRequired,\r\n isPageEnabled: PropTypes.bool.isRequired,\r\n isFallbackSelected: PropTypes.bool.isRequired,\r\n defaultLandingPageTooltipText: PropTypes.string,\r\n showTag: PropTypes.string,\r\n tagClass: PropTypes.string,\r\n }).isRequired,\r\n setLandingPage: PropTypes.func,\r\n pageItemUrl: PropTypes.string,\r\n withRelationLine: PropTypes.bool,\r\n showLabel: PropTypes.bool,\r\n renderIcon: PropTypes.func,\r\n collapsed: PropTypes.bool,\r\n};\r\n\r\nexport default withDefaultStyles(withFallbackCallout(PageMenuItem), getPageMenuItemStyles);\r\n","import classNames from 'classnames';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport React from 'react';\r\nimport { keyCode } from '@bingads-webui/keycode';\r\nimport { siteMapPropType } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { QueryParam } from '@bingads-webui-react/scope-service';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport { ListSelector, AriaRoleType } from '@bingads-webui-react/list-selector';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { withActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { getPathName, getPageItems, getPageItemUrl } from './common/page-item-helper';\r\nimport { getPageMenuStyles } from './styles/page-menu-styles';\r\nimport PageMenuItem from './components/page-menu-item';\r\n\r\nclass PageMenu extends React.PureComponent {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n selectedFallbackPageItem: null,\r\n isSetLandingPageButtonFocused: false,\r\n };\r\n }\r\n\r\n componentDidUpdate() {\r\n if (this.props.perfMarker &&\r\n !this.props.perfMarker.isDone\r\n ) {\r\n this.props.perfMarker.done();\r\n }\r\n }\r\n\r\n onSelect = (selectedPageItem) => {\r\n const { scope, activity } = this.props;\r\n\r\n activity.signal(`list selector - page menu item clicked, name: ${selectedPageItem.content}`);\r\n\r\n if (selectedPageItem.isPageEnabled) {\r\n scope.save(getPathName(selectedPageItem));\r\n\r\n this.setState({\r\n selectedFallbackPageItem: null,\r\n });\r\n } else {\r\n this.setState(state => ({\r\n // Toggle the state so the callout toggles as well\r\n selectedFallbackPageItem: state.selectedFallbackPageItem === selectedPageItem\r\n ? null\r\n : selectedPageItem,\r\n }));\r\n }\r\n }\r\n\r\n onTabNext = (event) => {\r\n if (event.keyCode !== keyCode.Tab) {\r\n return;\r\n }\r\n\r\n const setLandingPageButton = document.querySelector('.set-landing-page-button');\r\n if (!setLandingPageButton) {\r\n return;\r\n }\r\n\r\n if (this.state.isSetLandingPageButtonFocused) {\r\n this.focusFirstButtonOnSubPageMenu();\r\n this.setState({ isSetLandingPageButtonFocused: false });\r\n } else {\r\n setLandingPageButton.focus();\r\n this.setState({ isSetLandingPageButtonFocused: true });\r\n }\r\n }\r\n\r\n onBlur = () => {\r\n this.setState({ isSetLandingPageButtonFocused: false });\r\n }\r\n\r\n focusFirstButtonOnSubPageMenu = () => {\r\n const firstButtonOnSubPageMenu = document.querySelector('.bingads-campaign-react-sub-page-menu button');\r\n if (firstButtonOnSubPageMenu) {\r\n firstButtonOnSubPageMenu.focus();\r\n }\r\n }\r\n\r\n handleFallbackCalloutClose = (id, e) => {\r\n // This prevents the base menu item from triggering it's onClick\r\n e.stopPropagation();\r\n\r\n this.setState((state) => {\r\n // Check to see if we have opened another callout\r\n if (state.selectedFallbackPageItem && id === state.selectedFallbackPageItem.id) {\r\n return {\r\n selectedFallbackPageItem: null,\r\n };\r\n }\r\n\r\n return {};\r\n });\r\n }\r\n\r\n renderDivider = (item) => {\r\n const { classes } = this.props;\r\n return (\r\n );\r\n }\r\n\r\n render() {\r\n const {\r\n classes,\r\n siteMap,\r\n i18n,\r\n defaultLandingPage,\r\n setLandingPage,\r\n pageGroups,\r\n scope,\r\n collapsed,\r\n } = this.props;\r\n const pageMenuClassName = classNames([\r\n classes.pageMenuContainer,\r\n 'bingads-campaign-react-page-menu',\r\n collapsed && classes.collapsedPageMenuContainer,\r\n ]);\r\n\r\n const isFallbackSelected = item =>\r\n !!this.state.selectedFallbackPageItem && this.state.selectedFallbackPageItem.id === item.id;\r\n\r\n const pageItems = getPageItems(pageGroups, siteMap, i18n, defaultLandingPage, isFallbackSelected);\r\n const selectedPageItem = _.findWhere(pageItems, { isSelected: true });\r\n\r\n return (\r\n \r\n );\r\n }\r\n}\r\n\r\nPageMenu.defaultProps = {\r\n defaultLandingPage: null,\r\n setLandingPage: null,\r\n perfMarker: null,\r\n activity: { signal: _.noop },\r\n renderItemIcon: null,\r\n collapsed: false,\r\n};\r\n\r\nPageMenu.propTypes = {\r\n classes: PropTypes.shape(_.mapObject(\r\n getPageMenuStyles({}, {}),\r\n _.constant(PropTypes.string.isRequired)\r\n )).isRequired,\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n siteMap: siteMapPropType.isRequired,\r\n defaultLandingPage: PropTypes.string,\r\n setLandingPage: PropTypes.func,\r\n perfMarker: PropTypes.shape({\r\n done: PropTypes.func.isRequired,\r\n isDone: PropTypes.bool.isRequired,\r\n }),\r\n pageGroups: PropTypes.arrayOf(PropTypes.array).isRequired,\r\n activity: PropTypes.shape({\r\n signal: PropTypes.func.isRequired,\r\n }),\r\n renderItemIcon: PropTypes.func,\r\n collapsed: PropTypes.bool,\r\n};\r\n\r\nexport const StyledPageMenu = withActivityContext(withI18nConsumer(withDefaultStyles(\r\n PageMenu,\r\n getPageMenuStyles\r\n)));\r\n","export const getPageMenuStyles = (pageMenu, { palette = {} }) => ({\r\n pageMenuContainer: {\r\n paddingTop: 7,\r\n width: '100%',\r\n backgroundColor: palette.neutralLighter,\r\n borderRight: `solid 1px ${palette.neutralQuaternaryAlt}`,\r\n position: 'absolute',\r\n top: 0,\r\n bottom: 0,\r\n overflowX: 'hidden',\r\n overflowY: 'hidden',\r\n '&:hover': {\r\n overflowY: 'auto',\r\n },\r\n '& .list-selector-item': {\r\n width: 163,\r\n position: 'relative',\r\n '&:focus': {\r\n outline: `1px solid ${palette.neutralSecondary}`,\r\n outlineOffset: -1,\r\n },\r\n '& > div': {\r\n width: 'unset',\r\n height: 'unset',\r\n },\r\n },\r\n },\r\n divider: {\r\n width: '100%',\r\n borderTop: `solid 1px ${palette.neutralQuaternaryAlt}`,\r\n },\r\n collapsedPageMenuContainer: {\r\n '& .list-selector-item': {\r\n width: 47,\r\n },\r\n },\r\n});\r\n","import PropTypes from 'prop-types';\r\nimport React from 'react';\r\nimport { withDefaultLandingPage } from '@bingads-webui-campaign-react/with-default-landing-page';\r\nimport { StyledPageMenu } from './page-menu';\r\n\r\n\r\nclass DefaultLandingPage extends React.PureComponent {\r\n constructor(props) {\r\n super(props);\r\n if (props.appPerfMarker) {\r\n this.campaignPageMenuPerfMarker = props.appPerfMarker.createChild('Campaigns_Page_Menu');\r\n this.markAction('willInit');\r\n }\r\n }\r\n\r\n markAction = (action) => {\r\n if (this.campaignPageMenuPerfMarker && action) {\r\n this.campaignPageMenuPerfMarker[action]();\r\n }\r\n }\r\n\r\n render() {\r\n this.markAction('willRender');\r\n\r\n return (\r\n \r\n );\r\n }\r\n}\r\n\r\nDefaultLandingPage.propTypes = {\r\n appPerfMarker: PropTypes.shape({\r\n createChild: PropTypes.func.isRequired,\r\n }).isRequired,\r\n defaultLandingPage: PropTypes.string.isRequired,\r\n setLandingPage: PropTypes.func.isRequired,\r\n};\r\n\r\nexport const PageMenuWithDefaultLandingPage = withDefaultLandingPage(DefaultLandingPage);\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport _ from 'underscore';\r\nimport classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useContext, useState } from 'react';\r\nimport { keyCode } from '@bingads-webui/keycode';\r\nimport { siteMapPropType } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { QueryParam } from '@bingads-webui-react/scope-service';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport {\r\n IconButton,\r\n Link,\r\n DetailsList,\r\n DetailsRow,\r\n SelectionMode\r\n} from '@fluentui/react';\r\nimport { DirectionalHint } from '@bingads-webui-react/fabric-control';\r\nimport { TeachingBubble } from '@bingads-webui-campaign-react/popup-components';\r\nimport { WaterfallFilterType } from '@bingads-webui-campaign/filter-storage';\r\nimport { withDefaultLandingPage } from '@bingads-webui-campaign-react/with-default-landing-page';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\n\r\nimport { getPathName, getPageItems, getPageItemUrl, getFlattenedItems, getGroupsForDetailList, mapToPageItems, getSingleItems, getTrimmedParams } from './common/page-item-helper';\r\nimport PageMenuItem from './components/page-menu-item';\r\nimport { getPageMenuStyles } from './styles/page-menu-detail-list-styles';\r\n\r\nconst columns = [\r\n { key: 'name', name: 'name', fieldName: 'name' },\r\n];\r\n\r\nfunction DetailListPageMenuInternal(props) {\r\n const {\r\n classes,\r\n siteMap,\r\n i18n,\r\n defaultLandingPage,\r\n setLandingPage,\r\n pageGroups,\r\n scope,\r\n noExpandGroups,\r\n permissions,\r\n serverContext,\r\n } = props;\r\n const [isTeachingBubbleVisible, setIsTeachingBubbleVisible] = useState(true);\r\n const campaignTypeQuery = props[WaterfallFilterType.CampaignType] && props[WaterfallFilterType.CampaignType].value && props[WaterfallFilterType.CampaignType].value.query;\r\n const campaignType = campaignTypeQuery && campaignTypeQuery.CampaignType && campaignTypeQuery.CampaignType.$in[0];\r\n const {\r\n RSAAutoGeneratedTeachingBubble,\r\n } = permissions && permissions.dynamic;\r\n const activity = useContext(ActivityContext);\r\n const pageItems = getPageItems(pageGroups, siteMap, i18n, defaultLandingPage, () => false);\r\n const items = mapToPageItems(getFlattenedItems(pageItems, noExpandGroups), i18n, defaultLandingPage, () => false);\r\n const groups = getGroupsForDetailList(pageItems, items, noExpandGroups);\r\n const singleItems = getSingleItems(groups, items);\r\n const iconExpandLabel = i18n.getString(_TL_('Expand'));\r\n const iconCollapseLabel = i18n.getString(_TL_('Collapse'));\r\n const onSelect = item => (event, isFromHeader) => {\r\n if (event.type !== 'click' && event.keyCode !== keyCode.Enter) {\r\n // allow only click & enter event to select the item\r\n return;\r\n }\r\n setClarityTag({ DetailListPageMenu: 'true' });\r\n event.preventDefault();\r\n if (!isFromHeader) {\r\n activity.signal(`details list - page menu item clicked, name: ${item.id}`);\r\n }\r\n if (item.isPageEnabled) {\r\n const trimmedParams = getTrimmedParams(item, scope);\r\n scope.set(trimmedParams);\r\n scope.save(getPathName(item));\r\n }\r\n };\r\n\r\n const onRenderItemColumn = (item) => {\r\n if (item.type === 'divider') {\r\n return null;\r\n }\r\n\r\n const singleItem = _.findWhere(singleItems, item);\r\n let renderItem = item;\r\n if (singleItem) {\r\n renderItem = _.findWhere(pageItems, { id: singleItem.parentId });\r\n }\r\n\r\n return (\r\n
    \r\n \r\n
    \r\n );\r\n };\r\n\r\n const onToggleCollapse = listprops => () => {\r\n activity.signal(`toggle icon clicked, ori: ${!!listprops.group.isCollapsed}`);\r\n listprops.onToggleCollapse(listprops.group);\r\n };\r\n\r\n const onGroupHeaderclick = listprops => (e) => {\r\n activity.signal(`group header clicked, name: ${listprops.group.keyId}`);\r\n if (listprops.group.isSelected) {\r\n listprops.onToggleCollapse(listprops.group);\r\n } else {\r\n onSelect(items[listprops.group.startIndex])(e, true);\r\n }\r\n };\r\n\r\n const onRenderGroupHeader = (listprops) => {\r\n if (listprops && listprops.group) {\r\n if (listprops.group.count > 1) {\r\n const { group } = listprops;\r\n const iconLabel = group.isCollapsed ? iconExpandLabel : iconCollapseLabel;\r\n const isSettingBannerExist = document.querySelector('.bingads-campaign-react-page-menu-item-settings') && (document.querySelector('.bingads-campaign-react-page-menu-item-settings').offsetHeight > 0);\r\n const MarketName = (serverContext && serverContext.HelpModel && serverContext.HelpModel.MarketName) || 'en-US';\r\n const language = (MarketName && MarketName.includes('-')) ? MarketName.split('-')[0] : 'en';\r\n\r\n return (\r\n \r\n \r\n \r\n {group.name}\r\n \r\n {RSAAutoGeneratedTeachingBubble && campaignType && campaignType.includes('Default') && isTeachingBubbleVisible && isSettingBannerExist && group.keyId === 'settings' &&\r\n { setIsTeachingBubbleVisible(false); window.open(`https://help.ads.microsoft.com/#apex/ads/${language}/help:60037/0/${MarketName}/#EnableAutoAssets`); }}\r\n onDismiss={() => { setIsTeachingBubbleVisible(false); }}\r\n onClose={() => { setIsTeachingBubbleVisible(false); }}\r\n primaryButtonText={i18n.getString(_TL_('Learn more'))}\r\n targetElement=\".bingads-campaign-react-page-menu-item-settings\"\r\n directionalHint={DirectionalHint.rightBottomEdge}\r\n />\r\n }\r\n
    \r\n );\r\n }\r\n\r\n if (!listprops.group.name) { // divider\r\n return (\r\n \r\n );\r\n }\r\n\r\n return
    ;\r\n }\r\n return null;\r\n };\r\n\r\n const onRenderRow = (rowProps) => {\r\n const singleItem = _.findWhere(singleItems, rowProps.item);\r\n let renderItem = rowProps.item;\r\n if (singleItem) {\r\n renderItem = _.findWhere(pageItems, { id: singleItem.parentId });\r\n }\r\n\r\n return ();\r\n };\r\n\r\n const pageMenuClassName = classNames([\r\n classes.pageMenuContainer,\r\n classes.leftNavigationStyle,\r\n 'bingads-campaign-react-page-menu',\r\n ]);\r\n\r\n return (\r\n \r\n );\r\n}\r\n\r\nDetailListPageMenuInternal.propTypes = {\r\n classes: PropTypes.shape(_.mapObject(\r\n getPageMenuStyles({}, {}),\r\n _.constant(PropTypes.string.isRequired)\r\n )).isRequired,\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n siteMap: siteMapPropType.isRequired,\r\n defaultLandingPage: PropTypes.string,\r\n setLandingPage: PropTypes.func,\r\n perfMarker: PropTypes.shape({\r\n done: PropTypes.func.isRequired,\r\n isDone: PropTypes.bool.isRequired,\r\n }),\r\n pageGroups: PropTypes.arrayOf(PropTypes.array).isRequired,\r\n noExpandGroups: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n};\r\n\r\nDetailListPageMenuInternal.defaultProps = {\r\n defaultLandingPage: null,\r\n setLandingPage: null,\r\n perfMarker: null,\r\n};\r\n\r\nexport const DetailListPageMenu = withDefaultLandingPage(withI18nConsumer(withDefaultStyles(\r\n DetailListPageMenuInternal,\r\n getPageMenuStyles\r\n)));\r\n","export const getPageMenuStyles = (pageMenu, { palette = {} }) => ({\r\n pageMenuContainer: {\r\n paddingTop: 7,\r\n width: '100%',\r\n backgroundColor: palette.neutralLighter,\r\n borderRight: `solid 1px ${palette.neutralQuaternaryAlt}`,\r\n position: 'absolute',\r\n top: 0,\r\n bottom: 0,\r\n overflowX: 'hidden',\r\n overflowY: 'hidden',\r\n '&:hover': {\r\n overflowY: 'auto',\r\n },\r\n '& .ms-DetailsRow-cell': {\r\n padding: 0,\r\n minWidth: 134,\r\n },\r\n '&::-webkit-scrollbar': {\r\n width: '8px',\r\n backgroundColor: 'transparent',\r\n },\r\n '&::-webkit-scrollbar-track': {\r\n backgroundColor: 'transparent',\r\n },\r\n '&::-webkit-scrollbar-thumb': {\r\n borderRadius: '10px',\r\n backgroundColor: '#C0C0C0',\r\n },\r\n '& ::-webkit-scrollbar-thumb:hover': {\r\n background: '#a8a8a8',\r\n },\r\n '& .ms-List .ms-List-page .ms-List-cell': {\r\n minHeight: 1,\r\n },\r\n '& .ms-List .ms-List-page .ms-List-cell:last-child:not(:first-child)': {\r\n marginBottom: 8,\r\n },\r\n },\r\n divider: {\r\n width: '100%',\r\n borderTop: `solid 1px ${palette.neutralQuaternaryAlt}`,\r\n '& + div': {\r\n display: 'none',\r\n },\r\n },\r\n leftNavigationStyle: {\r\n paddingLeft: 5,\r\n },\r\n list: {\r\n backgroundColor: palette.neutralLighter,\r\n },\r\n pageMenuItem: {\r\n '& .page-menu-item-content': {\r\n fontSize: 13,\r\n },\r\n '& .page-menu-item-selected': {\r\n backgroundColor: palette.neutralLight,\r\n },\r\n '& .bingads-campaign-react-page-menu-item': {\r\n paddingRight: 0,\r\n },\r\n '& .page-menu-item-text-container': {\r\n marginLeft: 14,\r\n whiteSpace: 'normal',\r\n },\r\n '& > div': {\r\n width: 'unset',\r\n height: 'unset',\r\n },\r\n },\r\n pageMenuGroupHeader: {\r\n padding: '8.5px 0 8.5px 16px',\r\n fontSize: 13,\r\n fontWeight: 400,\r\n display: 'flex',\r\n alignItems: 'center',\r\n '& button, & .ms-Link': {\r\n color: palette.neutralPrimary,\r\n textDecoration: 'none',\r\n '@media screen and (forced-colors: active)': {\r\n color: 'canvasText',\r\n },\r\n },\r\n '&:hover': {\r\n backgroundColor: palette.neutralLight,\r\n textDecoration: 'none',\r\n },\r\n '&:active, & .ms-Link:active:hover': {\r\n backgroundColor: palette.neutralQuaternaryAlt,\r\n textDecoration: 'none',\r\n },\r\n },\r\n pageMenuSelectedGroupHeader: {\r\n fontWeight: 600,\r\n },\r\n pageMenuSingleItemGroupHeader: {\r\n },\r\n pageMenuGroupHeaderIcon: {\r\n width: 12,\r\n height: 22,\r\n marginRight: 6,\r\n '& i': {\r\n fontSize: 8,\r\n color: palette.neutralPrimary,\r\n },\r\n },\r\n pageMenuGroupHeaderContent: {\r\n flexBasis: '100%',\r\n },\r\n pageMenuGroupHeaderDownIcon: {\r\n '& i': {\r\n marginTop: 6,\r\n },\r\n },\r\n pageMenuRow: {\r\n backgroundColor: palette.neutralLighter,\r\n '& .ms-DetailsRow-cell': {\r\n position: 'static',\r\n },\r\n },\r\n});\r\n","import _ from 'underscore';\r\nimport appConfig from '@bingads-webui-component-legacy/config/index';\r\nimport {\r\n generateBaseBIColumns,\r\n getListOfRawBIColumns,\r\n RSAAdCustomizerAttributesColumn,\r\n} from '@bingads-webui-campaign-legacy/campaigns-tab-campaigns/grid/columns-config-base';\r\n\r\nconst Permissions = appConfig.get('Permissions');\r\nconst isPortfolioBidStrategyEnabled = _.result(Permissions.dynamic, 'PortfolioBidStrategy');\r\nconst isBroadOnlyEnabled = _.result(Permissions.dynamic, 'BroadOnly');\r\nconst isPredictiveMatchingEnabled = _.result(Permissions.dynamic, 'PredictiveMatching');\r\n\r\nconst {\r\n IsAvgPositionDeprecationPhase1Enabled,\r\n IsExperimentsEnabled: showExperiment,\r\n} = Permissions;\r\n\r\nexport const KeywordStatusColumn = {\r\n name: 'Status',\r\n property: _.compact([\r\n 'Status',\r\n showExperiment && 'Campaign/ExperimentId',\r\n ]),\r\n};\r\n\r\nexport const KeywordColumn = {\r\n name: 'Keyword',\r\n property: ['Text', 'Id', 'Labels', 'AdGroup/Id', 'Campaign/Id', 'RSAAdCustomizerAttributes'],\r\n};\r\n\r\nexport const CampaignColumn = {\r\n name: 'Campaign',\r\n property: _.compact([\r\n 'Campaign/Name',\r\n 'Campaign/Id',\r\n showExperiment && 'Campaign/BaseCampaignName',\r\n ]),\r\n};\r\nexport const AdGroupColumn = {\r\n name: 'AdGroup',\r\n property: ['AdGroup/Name', 'AdGroup/Id'],\r\n};\r\n\r\nexport const BidStrategyNameColumn = {\r\n name: 'BidStrategyName',\r\n property: 'Campaign/BidStrategyName',\r\n};\r\n\r\nexport const BidStrategyTypeColumn = {\r\n name: 'BidStrategyType',\r\n property: 'DisplayBiddingStrategyType',\r\n};\r\n\r\nexport const BidColumn = {\r\n name: 'Bid',\r\n property: ['Bid/Amount', // currently require this will return whole bid object\r\n 'IsBidLandscapeAvailable',\r\n 'Campaign/CampaignType',\r\n 'AdGroup/PricingModel',\r\n 'DisplayBiddingStrategyType',\r\n 'Campaign/Id',\r\n 'AdGroup/Id'],\r\n};\r\n\r\nexport const MatchTypeColumn = {\r\n name: 'MatchType',\r\n property: _.compact([\r\n 'MatchType',\r\n (isBroadOnlyEnabled || isPredictiveMatchingEnabled) && 'Campaign/IsBroadMatchOnlyCampaign',\r\n ]),\r\n};\r\nexport const DeliveryColumn = {\r\n name: 'Delivery',\r\n property: ['DeliveryStatus',\r\n 'DeliveryStatusDetails',\r\n 'QualityScore',\r\n 'NegativeKeywordConflictDetails',\r\n 'BidBelowFirstPageDetail',\r\n 'BidEstimate',\r\n 'Id'],\r\n};\r\n\r\nexport const QualityScoreColumn = {\r\n name: 'QualityScore',\r\n property: 'QualityScore',\r\n};\r\n\r\nexport const LandingPageColumn = {\r\n name: 'LandingPage',\r\n property: ['DestinationUrl', 'FinalUrls', 'MobileFinalUrls'],\r\n};\r\n\r\nexport const CustomParametersColumn = {\r\n name: 'CustomParameters',\r\n property: 'UrlCustomParameters',\r\n};\r\n\r\nexport const TrackingTemplateColumn = {\r\n name: 'TrackingTemplate',\r\n property: 'TrackingUrlTemplate',\r\n};\r\n\r\nexport const FinalUrlSuffixColumn = {\r\n name: 'FinalUrlSuffix',\r\n property: 'FinalUrlSuffix',\r\n};\r\n\r\nexport const Param1Column = {\r\n name: 'Param1',\r\n property: 'Param1',\r\n};\r\n\r\nexport const Param2Column = {\r\n name: 'Param2',\r\n property: 'Param2',\r\n};\r\n\r\nexport const Param3Column = {\r\n name: 'Param3',\r\n property: 'Param3',\r\n};\r\n\r\nexport const FirstPageBidEstimationColumn = {\r\n name: 'FirstPageBidEstimation',\r\n property: 'BidEstimate/FirstPageBidEstimation',\r\n};\r\n\r\nexport const MainlineBidEstimationColumn = {\r\n name: 'MainlineBidEstimation',\r\n property: 'BidEstimate/MainlineBidEstimation',\r\n};\r\n\r\nexport const BestPositionBidEstimationColumn = {\r\n name: 'BestPositionBidEstimation',\r\n property: 'BidEstimate/BestPositionBidEstimation',\r\n};\r\n\r\nexport const KeywordIdColumn = {\r\n name: 'KeywordId',\r\n property: 'Id',\r\n};\r\n\r\nexport const LabelsColumn = {\r\n name: 'Labels',\r\n property: 'Labels',\r\n};\r\n\r\nexport const getLockedColumns = ({ scope }) => {\r\n const { campaignId, adGroupId } = scope;\r\n const baseLockedColumns = _.compact([\r\n 'Status',\r\n 'Keyword',\r\n !campaignId && 'Campaign',\r\n !adGroupId && 'AdGroup',\r\n 'MatchType',\r\n ]);\r\n return baseLockedColumns;\r\n};\r\n\r\nexport const getSelectedColumns = ({ scope }) => {\r\n const { campaignId, adGroupId } = scope;\r\n const baseSelectedColumns = _.compact([\r\n KeywordStatusColumn,\r\n KeywordColumn,\r\n !campaignId && CampaignColumn,\r\n !adGroupId && AdGroupColumn,\r\n isPortfolioBidStrategyEnabled && BidStrategyNameColumn,\r\n BidStrategyTypeColumn,\r\n DeliveryColumn,\r\n BidColumn,\r\n MatchTypeColumn,\r\n LabelsColumn,\r\n RSAAdCustomizerAttributesColumn,\r\n 'Clicks',\r\n 'Impressions',\r\n 'CTR',\r\n 'AverageCPC',\r\n 'Spend',\r\n 'AveragePosition',\r\n IsAvgPositionDeprecationPhase1Enabled && 'TopImpressionRate',\r\n IsAvgPositionDeprecationPhase1Enabled && 'AbsoluteTopImpressionRate',\r\n ]);\r\n return baseSelectedColumns;\r\n};\r\n\r\nexport function getColumnsMap({ gridName }) {\r\n const baseColumns = [\r\n KeywordStatusColumn,\r\n KeywordColumn,\r\n CampaignColumn,\r\n AdGroupColumn,\r\n BidStrategyNameColumn,\r\n BidStrategyTypeColumn,\r\n BidColumn,\r\n MatchTypeColumn,\r\n DeliveryColumn,\r\n QualityScoreColumn,\r\n LandingPageColumn,\r\n CustomParametersColumn,\r\n TrackingTemplateColumn,\r\n FinalUrlSuffixColumn,\r\n Param1Column,\r\n Param2Column,\r\n Param3Column,\r\n FirstPageBidEstimationColumn,\r\n MainlineBidEstimationColumn,\r\n BestPositionBidEstimationColumn,\r\n KeywordIdColumn,\r\n LabelsColumn,\r\n RSAAdCustomizerAttributesColumn,\r\n ];\r\n const baseRawBIColumns = generateBaseBIColumns(getListOfRawBIColumns(gridName));\r\n const columns = [...baseColumns, ...baseRawBIColumns];\r\n return _.object(_.map(columns, column => [column.name, column.property]));\r\n}\r\n","import _ from 'underscore';\r\nimport { getCommonFilterConfig } from '@bingads-webui-campaign/common-grid-config';\r\nimport { getLocalizedEditorialRejectionReasons } from '@bingads-webui-campaign/url-filter-metadata';\r\n\r\nconst mockI18n = {\r\n get: _.identity,\r\n getString: _.identity,\r\n type: _.identity,\r\n enum: _.identity,\r\n value: _.identity,\r\n enumMappedString: _.identity,\r\n enumDescription: _.identity,\r\n valueDescription: _.identity,\r\n parseInt: _.identity,\r\n property: _.identity,\r\n};\r\nconst i18nCache = {\r\n i18n: mockI18n,\r\n newI18n: mockI18n,\r\n legacyGlobalI18n: mockI18n,\r\n schemaI18nCampaign: mockI18n,\r\n};\r\n\r\n\r\nexport function getFilterConfig({\r\n jsdata,\r\n appConfig,\r\n entitySchema,\r\n cachedEntitySchema,\r\n ...restParams\r\n}) {\r\n // Cache i18n data, so that the DFM call can also access the correct i18n data\r\n _.mapObject(i18nCache, (val, key) => {\r\n if (restParams[key]) {\r\n i18nCache[key] = restParams[key];\r\n }\r\n });\r\n const filterConfig = getCommonFilterConfig({\r\n ...i18nCache,\r\n ...restParams,\r\n editor: {},\r\n entitySchema,\r\n cachedEntitySchema,\r\n searchbox: {\r\n placeholder: i18nCache.i18n.getString('Schema_Keyword_Property_Text'),\r\n searchProperty: 'Text',\r\n searchOperator: '$contains',\r\n maxLength: entitySchema.properties.Text.maxLength,\r\n },\r\n featureName: 'KeywordGrid',\r\n jsdata,\r\n globalConfig: appConfig,\r\n enableCampaignWaterfall: true,\r\n enableEditorialRejectionFilter: true,\r\n enableAdGroupWaterfall: true,\r\n selector: [{\r\n items: [\r\n {\r\n text: i18nCache.i18n.getString('AllKeyword'),\r\n value: null,\r\n },\r\n {\r\n text: i18nCache.i18n.getString('AllEnabledKeyword'),\r\n value: [\"Enum.OrderItemStatus'Active'\"],\r\n },\r\n ],\r\n property: 'Status',\r\n removable: false,\r\n defaultValue: null,\r\n }],\r\n });\r\n if (i18nCache.newI18n) {\r\n // update schema for rejection reasons\r\n const editorialRejectionFlagId = filterConfig.entitySchema.properties.EditorialRejectionFlagId;\r\n if (editorialRejectionFlagId && !editorialRejectionFlagId.localized) {\r\n editorialRejectionFlagId.localized = getLocalizedEditorialRejectionReasons(i18nCache.newI18n);\r\n editorialRejectionFlagId.type = 'string';\r\n }\r\n }\r\n return filterConfig;\r\n}\r\n","/* eslint-disable import/no-named-as-default-member */\r\nimport _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport edm from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport state from '@bingads-webui-component-legacy/state/index';\r\nimport jsdata from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport dateUtil from '@bingads-webui-component-legacy/humanize/date';\r\nimport appConfig from '@bingads-webui-component-legacy/config/index';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nimport cacheService from '@bingads-webui-static-legacy/cache-service';\r\nimport sessionStore from '@bingads-webui-component-legacy/js-data-storage/session-storage';\r\nimport dataContextManager from '@bingads-webui-static-legacy/summary/SummaryDataContextManager';\r\nimport legacyPreferenceService from '@bingads-webui-component-legacy/preference/service/index';\r\nimport * as preferenceStoreFactory from '@bingads-webui-component-legacy/bingads-grid/service/filter-preferences';\r\nimport * as SegmentationPreference from '@bingads-webui-component-legacy/bingads-grid/service/segmentation-preferences';\r\nimport * as customColumnPreference from '@bingads-webui-component-legacy/bingads-grid/service/custom-column-preferences';\r\nimport * as ColumnChooserPreference from '@bingads-webui-component-legacy/bingads-grid/service/column-chooser-preferences';\r\nimport { Keyword } from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport { fetchSortInfo } from '@bingads-webui-component-legacy/bingads-grid/service/fetch-sortinfo';\r\nimport { FilterService } from '@bingads-webui/filter-service';\r\nimport { getGridDataParams } from '@bingads-webui-campaign/summary-grid-helper';\r\nimport { fetchPaginationConfig } from '@bingads-webui-component-legacy/bingads-grid/service/fetch-pagination';\r\nimport { getColumnsConversionMap } from '@bingads-webui-campaign/column-conversions';\r\nimport { ChartDataAdapter } from '@bingads-webui-campaign-react/inline-chart';\r\nimport { InlineChartPreferences } from '@bingads-webui-campaign/inline-chart-preferences';\r\nimport { store, adapter } from '@bingads-webui-component-legacy/bingads-grid/service/grid-preferences';\r\nimport { DataSourceStore } from '@bingads-webui-campaign/data-source-store';\r\nimport { getFilterConfig } from './filter-config';\r\nimport { getColumnsMap, getSelectedColumns, getLockedColumns } from './columns-config';\r\n\r\nconst mockI18n = {\r\n getString: _.identity,\r\n};\r\nconst gridName = 'summary_tab_keyword';\r\nconst CurrentTabId = 'Keywords';\r\nconst refreshCampaignCache = 'x-ms-refreshcampaigncache';\r\nconst isOdataActionSource = true;\r\nexport function getDataSourceConfig({\r\n gridNameSource,\r\n scope,\r\n logActivity,\r\n preferenceService,\r\n ...restParams\r\n}) {\r\n const Permissions = appConfig.get('Permissions');\r\n const { dynamic = {} } = Permissions;\r\n const {\r\n ColumnConversion: IsColumnConversionEnabled,\r\n KeywordsCombineGridAndChartOdataCallEnabled,\r\n } = dynamic;\r\n\r\n const initialQuery = isOdataActionSource ? {\r\n query: {\r\n nullifynotapplybidamounts: true,\r\n },\r\n gridDataParameters: getGridDataParams(appConfig),\r\n } : {};\r\n\r\n const scopeAdapter = _.extend({\r\n customerId: scope.values.cid,\r\n accountId: scope.values.aid,\r\n campaignId: scope.values.campaignId,\r\n adGroupId: scope.values.adGroupId,\r\n }, scope);\r\n\r\n if (scopeAdapter.adGroupId) {\r\n state.set('campaign_id', scopeAdapter.campaignId);\r\n state.set('adgroup_id', scopeAdapter.adGroupId);\r\n } else if (scopeAdapter.campaignId) {\r\n state.set('campaign_id', scopeAdapter.campaignId);\r\n state.unset('adgroup_id');\r\n } else {\r\n state.unset('campaign_id');\r\n state.unset('adgroup_id');\r\n }\r\n\r\n let edmEntity = edm.currentAccount;\r\n if (scopeAdapter.adGroupId) {\r\n edmEntity = edm.currentAdGroup;\r\n } else if (scopeAdapter.campaignId) {\r\n edmEntity = edm.currentCampaign;\r\n }\r\n\r\n const entitySet = edmEntity.Keywords['Default.GridData'];\r\n\r\n const { KeywordsFilterImprovementEnabled } = Permissions.dynamic;\r\n let existingDataSource;\r\n let filterService;\r\n let dataSource = {\r\n type: 'jsdata',\r\n entity: jsdata.Keyword,\r\n primaryKey: 'Id',\r\n query: {},\r\n options: {\r\n entitySet: edmEntity.Keywords,\r\n cacheResponse: false,\r\n useDfmCache: false,\r\n headers: {\r\n [refreshCampaignCache]: true,\r\n },\r\n },\r\n };\r\n\r\n if (gridNameSource && KeywordsFilterImprovementEnabled) {\r\n existingDataSource = DataSourceStore.get(gridNameSource);\r\n\r\n if (existingDataSource) {\r\n // eslint-disable-next-line prefer-destructuring\r\n dataSource = existingDataSource.dataSource;\r\n // eslint-disable-next-line prefer-destructuring\r\n filterService = existingDataSource.filterService;\r\n }\r\n }\r\n if (!gridNameSource || !KeywordsFilterImprovementEnabled || !existingDataSource) {\r\n const filterConfig = getFilterConfig({\r\n ...restParams,\r\n edm,\r\n scope,\r\n jsdata,\r\n appConfig,\r\n cacheService,\r\n entitySchema: Keyword,\r\n sessionStore,\r\n customColumnPreference,\r\n preferenceService,\r\n preferenceStoreFactory: preferenceStoreFactory.getFilters,\r\n dataContextManager,\r\n });\r\n\r\n filterService = new FilterService(filterConfig);\r\n }\r\n\r\n return {\r\n existingDataSource,\r\n dataSource,\r\n filterService,\r\n queryBuilder: {\r\n decorators: _.compact([\r\n {\r\n name: 'columnChooser',\r\n columnsMap: getColumnsMap({ gridName, scope: scopeAdapter }),\r\n defaultColumns: getSelectedColumns({ gridName, scope: scopeAdapter }),\r\n lockedColumns: getLockedColumns({ gridName, scope: scopeAdapter }),\r\n addPoPColumnsOnComparisonEnabled: true,\r\n customColumnsEnabled: Permissions.IsCustomColumnsInCampaignsSupported,\r\n IsAvgPositionDeprecationPhase2Enabled: Permissions.IsAvgPositionDeprecationPhase2Enabled,\r\n comparisonPoPColumns: [\r\n 'PeriodPerformanceMetrics',\r\n 'PerformanceMetricsChange',\r\n 'PerformanceMetricsChangePercentage',\r\n ],\r\n },\r\n { name: 'dateFilter' },\r\n { name: 'segment' },\r\n { name: 'pagination', defaultPageSize: 50 },\r\n { name: 'sorting' },\r\n { name: 'filter', filterService },\r\n { name: 'gridDataParameters', entitySet },\r\n KeywordsCombineGridAndChartOdataCallEnabled && {\r\n name: 'chartDataParameters',\r\n entitySet,\r\n pageState: state,\r\n pageContext: { ...pageContext, CurrentTabId }, // At this point pageContext.CurrentTabId is still undefined, so we manually set the pageContext.CurrentTabId to 'Keywords'\r\n chartDataAdapter: new ChartDataAdapter({ i18n: mockI18n, permissions: Permissions }),\r\n inlineChartPreference: new InlineChartPreferences(\r\n store,\r\n appConfig,\r\n adapter,\r\n legacyPreferenceService.initialize().then(() => Promise.promisifyAll(legacyPreferenceService))\r\n ),\r\n },\r\n ]),\r\n commonConfig: {\r\n featureName: gridName,\r\n isOdataActionSource,\r\n appConfig,\r\n appState: state,\r\n deps: {\r\n dateUtil,\r\n state,\r\n ColumnChooserPreference,\r\n CustomColumnPreference: customColumnPreference,\r\n SegmentationPreference,\r\n fetchPaginationConfig,\r\n fetchSortInfo,\r\n },\r\n IsColumnConversionEnabled,\r\n ...IsColumnConversionEnabled ? {\r\n columnConversions: getColumnsConversionMap(gridName, Permissions),\r\n } : {},\r\n },\r\n logActivity,\r\n initialQuery,\r\n },\r\n };\r\n}\r\n","import jsdata from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport logger from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport appConfig from '@bingads-webui-component-legacy/config/index';\r\nimport { connect } from '@bingads-webui-campaign/dqb-grid-datasource-connector';\r\nimport { DataSourceStore } from '@bingads-webui-campaign/data-source-store';\r\nimport { QueryBuilderFactory } from '@bingads-webui-campaign/query-builder';\r\nimport { QueryErrorFactory } from '@bingads-webui-campaign/dqb-grid-datasource-error-handler';\r\nimport { getDataSourceConfig } from './data-fetch-config';\r\n\r\nexport function getDataSource({\r\n gridName,\r\n ...restParams\r\n}) {\r\n // DFM call doesn't pass gridName, while grid call passes gridName\r\n // Thus, the DFM call will create a new dataSource, but the grid call will read the cache\r\n const Permissions = appConfig.get('Permissions');\r\n const { dynamic } = Permissions;\r\n const { KeywordsFilterImprovementEnabled } = dynamic;\r\n if (gridName && !KeywordsFilterImprovementEnabled) {\r\n const existingDataSource = DataSourceStore.get(gridName);\r\n if (existingDataSource) {\r\n return existingDataSource;\r\n }\r\n }\r\n\r\n const { KeywordsCombineGridAndChartOdataCallEnabled } = dynamic;\r\n const dataFetchConfig = getDataSourceConfig({\r\n gridNameSource: gridName,\r\n ...restParams,\r\n });\r\n if (dataFetchConfig.existingDataSource) {\r\n return dataFetchConfig.existingDataSource;\r\n }\r\n const { featureName } = dataFetchConfig.queryBuilder.commonConfig;\r\n const queryBuilder = QueryBuilderFactory.make(dataFetchConfig.queryBuilder);\r\n const queryErrors = QueryErrorFactory.make(dataFetchConfig.dataSource);\r\n const dataSource = connect(\r\n dataFetchConfig.dataSource,\r\n queryBuilder,\r\n featureName,\r\n logger,\r\n false,\r\n KeywordsCombineGridAndChartOdataCallEnabled\r\n );\r\n dataSource.queryErrors = queryErrors;\r\n dataSource.entity = jsdata.Keywords;\r\n const { filterService } = dataFetchConfig;\r\n\r\n if (!KeywordsFilterImprovementEnabled) {\r\n DataSourceStore.set(featureName, dataSource);\r\n } else {\r\n const cacheableObjects = {\r\n dataSource,\r\n filterService,\r\n };\r\n\r\n DataSourceStore.set(featureName, cacheableObjects);\r\n }\r\n return { dataSource, filterService };\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 (value) {pug_mixins[\"entityName\"] = pug_interp = function(item){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar isSearchTerm = item.typeName === 'SearchTerm';\nvar isAccount = item.typeName === 'Account';\nvar AccountActivityStatus = item.AccountActivityStatus;\nif (isAccount) {\nif (item.status === AccountActivityStatus.Errors) {\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"account-error-icon icon-error\\\"\"+pug.attr(\"title\", item.i18n.getString('AccountStatus_Error'), true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse\nif (item.status === AccountActivityStatus.Deleted) {\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"account-deleted-icon\\\"\"+pug.attr(\"title\", item.i18n.getString('AccountStatus_Deleted'), true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse\nif (item.status === AccountActivityStatus.Enabled) {\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"account-enabled-icon icon-success\\\"\"+pug.attr(\"title\", item.i18n.getString('AccountStatus_Active'), true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}\nelse\nif (!isSearchTerm) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"status\\\"\\u003E\";\nif (item.status === 'Deleted') {\nif (item.isExperiment) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"experiment-paused-icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"statusDeleted_icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}\nelse\nif (item.status === 'Paused') {\nif (item.isExperiment) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"experiment-paused-icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"statusPaused_icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}\nelse\nif (item.status === 'Suspended') {\nif (item.isExperiment) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"experiment-paused-icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"statusSuspended_icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}\nelse\nif (item.status === 'Draft') {\nif (item.isExperiment) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"experiment-paused-icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"statusDraft_icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}\nelse\nif (item.status === 'Expired') {\npug_html = pug_html + \"\\u003Cdiv class=\\\"statushypendisplay\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\nif (item.isExperiment) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"experiment-active-icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"statusEnabled_icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Ca\" + (pug.attr(\"href\", item.hash, true, true)+pug.attr(\"title\", item.hideToolTip ? '' : item.name, true, true)+pug.attr(\"aria-label\", item.i18n.getString(`${item.rawStatus} {{entity}}`, {entity: item.name}), true, true)+pug.attr(\"data-campaignid\", item.campaignId, true, true)+pug.attr(\"data-adgroupid\", item.adGroupId, true, true)+pug.attr(\"data-accountid\", item.accountId, true, true)+pug.attr(\"data-type\", item.typeName, true, true)+pug.attr(\"data-text\", item.text, true, true)+pug.attr(\"data-navigationLevel\", item.navigationLevel, true, true)+pug.attr(\"data-campaigntype\", item.campaignType, true, true)+pug.attr(\"data-rawstatus\", item.rawStatus, true, true)+pug.attr(\"data-campaignName\", item.campaignName, true, true)+pug.attr(\"data-adGoupName\", item.adGroupName, true, true)+pug.attr(\"data-matchType\", item.matchType, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = item.name) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\nif (isAccount && item.status === 'Deleted') {\npug_html = pug_html + \"\\u003Cspan class=\\\"inactive\\\"\\u003E\" + (null == (pug_interp = ` (${item.i18n.getString('AccountStatus_InActive')})`) ? \"\" : pug_interp) + \"\\u003C\\u002Fspan\\u003E\";\n}\n};\npug_html = pug_html + \"\\u003Cdiv class=\\\"grid-cell grid-cell--Name\\\"\\u003E\";\nvar hideToolTip = (value.typeName === 'Keyword') || (value.typeName === 'SearchTerm' && value.matchingKeyword);\nvar nameCell = {};\nnameCell.status = value.Status;\nnameCell.name = value.Name;\nnameCell.hash = value.hash;\nnameCell.campaignId = value.ids.campaignId;\nnameCell.adGroupId = value.ids.adgroupId;\nnameCell.accountId = value.ids.accountId;\nnameCell.typeName = value.typeName;\nnameCell.text = value.keywordText;\nnameCell.navigationLevel = value.navigationLevel;\nnameCell.campaignName = value.Campaign.Name;\nnameCell.adGroupName = value.AdGroup.Name;\nnameCell.matchType = value.MatchType;\nnameCell.hideToolTip = hideToolTip;\nnameCell.isExperiment = value.isExperiment;\nnameCell.campaignType = value.campaignType;\nnameCell.rawStatus = value.rawStatus;\nnameCell.i18n = value.i18n;\nnameCell.AccountActivityStatus = value.AccountActivityStatus;\npug_mixins[\"entityName\"](nameCell);\nif (value.typeName === 'SearchTerm') {\npug_html = pug_html + \"\\u003Cdiv class=\\\"search-term-detail\\\"\\u003E\\u003Cdiv class=\\\"actions\\\"\\u003E\";\nif (value.matchingKeyword) {\nvar added = value.searchTermStatus.indexOf('Added') > -1;\nif (added) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"add\\\"\\u003E\" + (null == (pug_interp = value.i18n.getString('SearchTermStatus_Added')) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cbutton class=\\\"add\\\"\\u003E\\u003Cdiv class=\\\"glyphicon search-term-add-keyword\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\\u003E\" + (null == (pug_interp = value.i18n.getString('Dashboard_TopSearchTerms_Add')) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fbutton\\u003E\";\n}\n}\nvar excluded = value.searchTermStatus.indexOf('Excluded') > -1;\nif (excluded) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"exclude\\\"\\u003E\" + (null == (pug_interp = value.i18n.getString('SearchTermStatus_Excluded')) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cbutton class=\\\"exclude\\\"\\u003E\\u003Cdiv class=\\\"glyphicon search-term-add-neg-keyword\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\\u003E\" + (null == (pug_interp = value.i18n.getString('Dashboard_TopSearchTerms_Exclude')) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fbutton\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"grid-cell--Name__hover-container\\\"\\u003E\\u003Cdiv class=\\\"hover-content\\\"\\u003E\\u003Cdiv class=\\\"hover-content__text\\\"\\u003E\" + (pug.escape(null == (pug_interp = value.Name) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"hover-content__content\\\"\\u003E\" + (pug.escape(null == (pug_interp = value.Name) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\nif (value.matchingKeyword) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"hover-content__title\\\"\\u003E\" + (null == (pug_interp = value.i18n.getString('Dashboard_TopSearchTerms_Matched_Keyword')) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"hover-content__text\\\" style=\\\"padding-bottom:0px\\\"\\u003E\" + (null == (pug_interp = value.matchingKeyword) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"hover-content__content\\\"\\u003E\" + (null == (pug_interp = value.matchingKeyword) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse\nif (value.typeName === 'Keyword') {\npug_html = pug_html + \"\\u003Cdiv class=\\\"grid-cell--Name__hover-container\\\"\\u003E\\u003Cdiv class=\\\"hover-content\\\"\\u003E\\u003Cdiv class=\\\"hover-content__text\\\"\\u003E\" + (pug.escape(null == (pug_interp = value.Name) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"hover-content__name\\\"\\u003E\\u003Cdiv class=\\\"name-value\\\"\\u003E\" + (pug.escape(null == (pug_interp = value.Campaign.Name) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"name-value\\\"\\u003E\" + (null == (pug_interp = ' ') ? \"\" : pug_interp) + \"\\u003E \" + (pug.escape(null == (pug_interp = value.AdGroup.Name) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\\u003E\" + (null == (pug_interp = value.i18n.getString('ColumnName_Type')) ? \"\" : pug_interp) + \": \" + (null == (pug_interp = value.MatchType) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"hover-content__content\\\"\\u003E\" + (pug.escape(null == (pug_interp = value.Campaign.Name) ? \"\" : pug_interp)) + \" \\u003E \" + (pug.escape(null == (pug_interp = value.AdGroup.Name) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";}.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 (AccountActivityStatus, AccountInactiveCauseValue, comparisonDateRangeText, currentDateRangeText, gridData, hasError, i18n, index, loaded, metricName) {pug_mixins[\"entityName\"] = pug_interp = function(item){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar isSearchTerm = item.typeName === 'SearchTerm';\nvar isAccount = item.typeName === 'Account';\nvar AccountActivityStatus = item.AccountActivityStatus;\nif (isAccount) {\nif (item.status === AccountActivityStatus.Errors) {\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"account-error-icon icon-error\\\"\"+pug.attr(\"title\", item.i18n.getString('AccountStatus_Error'), true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse\nif (item.status === AccountActivityStatus.Deleted) {\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"account-deleted-icon\\\"\"+pug.attr(\"title\", item.i18n.getString('AccountStatus_Deleted'), true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse\nif (item.status === AccountActivityStatus.Enabled) {\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"account-enabled-icon icon-success\\\"\"+pug.attr(\"title\", item.i18n.getString('AccountStatus_Active'), true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}\nelse\nif (!isSearchTerm) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"status\\\"\\u003E\";\nif (item.status === 'Deleted') {\nif (item.isExperiment) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"experiment-paused-icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"statusDeleted_icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}\nelse\nif (item.status === 'Paused') {\nif (item.isExperiment) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"experiment-paused-icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"statusPaused_icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}\nelse\nif (item.status === 'Suspended') {\nif (item.isExperiment) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"experiment-paused-icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"statusSuspended_icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}\nelse\nif (item.status === 'Draft') {\nif (item.isExperiment) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"experiment-paused-icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"statusDraft_icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}\nelse\nif (item.status === 'Expired') {\npug_html = pug_html + \"\\u003Cdiv class=\\\"statushypendisplay\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\nif (item.isExperiment) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"experiment-active-icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"statusEnabled_icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Ca\" + (pug.attr(\"href\", item.hash, true, true)+pug.attr(\"title\", item.hideToolTip ? '' : item.name, true, true)+pug.attr(\"aria-label\", item.i18n.getString(`${item.rawStatus} {{entity}}`, {entity: item.name}), true, true)+pug.attr(\"data-campaignid\", item.campaignId, true, true)+pug.attr(\"data-adgroupid\", item.adGroupId, true, true)+pug.attr(\"data-accountid\", item.accountId, true, true)+pug.attr(\"data-type\", item.typeName, true, true)+pug.attr(\"data-text\", item.text, true, true)+pug.attr(\"data-navigationLevel\", item.navigationLevel, true, true)+pug.attr(\"data-campaigntype\", item.campaignType, true, true)+pug.attr(\"data-rawstatus\", item.rawStatus, true, true)+pug.attr(\"data-campaignName\", item.campaignName, true, true)+pug.attr(\"data-adGoupName\", item.adGroupName, true, true)+pug.attr(\"data-matchType\", item.matchType, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = item.name) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\nif (isAccount && item.status === 'Deleted') {\npug_html = pug_html + \"\\u003Cspan class=\\\"inactive\\\"\\u003E\" + (null == (pug_interp = ` (${item.i18n.getString('AccountStatus_InActive')})`) ? \"\" : pug_interp) + \"\\u003C\\u002Fspan\\u003E\";\n}\n};\npug_mixins[\"insightHover\"] = pug_interp = function(index){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"hover-container\\\"\\u003E\\u003Cdiv class=\\\"hover-content\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = \"Click to view insight\") ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"insightBulb\"] = pug_interp = function(item){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"mcc-perf-fluctuation-bulb-container\",item.rowClass], [false,true]), false, true)) + \"\\u003E\";\nif ((item.fluctuationTypeIds.length > 0)) {\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"mcc-perf-fluctuation-bulb iconba iconba-Insights\\\"\"+\" tabindex=\\\"0\\\"\"+pug.attr(\"data-rowIndex\", item.index, true, true)+pug.attr(\"data-fluxTypeIds\", item.fluctuationTypeIds, true, true)+pug.attr(\"data-metricName\", item.metricName, true, true)+pug.attr(\"data-metricText\", item.formattedValue, true, true)+pug.attr(\"data-cmid\", item.campaignId, true, true)+pug.attr(\"data-aid\", item.accountId, true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"mcc-perf-fluctuation-placeholder\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (item.fluctuationTypeIds.length > 0) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"insight-hover-target\\\"\\u003E\";\npug_mixins[\"insightHover\"]({ index, i18n });\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n}\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"emptyContent\"] = pug_interp = function(i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"top-change-empty\\\"\\u003E\" + (null == (pug_interp = i18n.getString('Dashboard_TopChangeCard_NoData')) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"errorContent\"] = pug_interp = function(i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"top-change-empty\\\"\\u003E\" + (null == (pug_interp = i18n.getString('Dashboard_Cards_Data_Error')) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"kpi\"] = pug_interp = function(kpiData, metricName, dateRangeText){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"kpi-date-range\\\"\\u003E\" + (pug.escape(null == (pug_interp = dateRangeText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = metricName) ? \"\" : pug_interp)) + \":  \\u003Cspan class=\\\"kpi-data\\\"\\u003E\" + (pug.escape(null == (pug_interp = kpiData) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fspan\\u003E\";\n};\npug_mixins[\"hoverContent\"] = pug_interp = function(i18n, item, metricName, currentDateRangeText, comparisonDateRangeText){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"hover-container\\\"\\u003E\\u003Cdiv class=\\\"hover-content\\\"\\u003E\\u003Cdiv class=\\\"entity-name\\\"\\u003E\" + (pug.escape(null == (pug_interp = item.name) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"kpi-grid\\\"\\u003E\\u003Cdiv class=\\\"kpi-current\\\"\\u003E\";\npug_mixins[\"kpi\"](item.formattedMetrics, metricName, currentDateRangeText);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"kpi-comparison\\\"\\u003E\";\npug_mixins[\"kpi\"](item.formattedPeriodMetrics, metricName, comparisonDateRangeText);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"kpi-change\\\"\\u003E\\u003Cdiv class=\\\"bar-icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cspan\\u003E\" + (null == (pug_interp = i18n.getString(\"Dashboard_Change\")) ? \"\" : pug_interp) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"kpi-data\\\"\\u003E\\u003Cspan\\u003E  \" + (pug.escape(null == (pug_interp = item.formattedValue) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E  (\" + (pug.escape(null == (pug_interp = item.formattedPercentageValue) ? \"\" : pug_interp)) + \")\\u003C\\u002Fspan\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"gridRow\"] = pug_interp = function(i18n, item, index, metricName, currentDateRangeText, comparisonDateRangeText, AccountInactiveCauseValue){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar rowClass = \"top-change-grid-row-\" + (index+1)\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"top-change-entity-name\",rowClass], [false,true]), false, true)) + \"\\u003E\";\nvar nameCell = {};\nnameCell.status = item.status;\nnameCell.name = item.name;\nnameCell.hash = item.hash;\nnameCell.campaignId = item.campaignId;\nnameCell.adGroupId = item.adgroupId;\nnameCell.accountId = item.accountId;\nnameCell.typeName = item.typeName;\nnameCell.isExperiment = item.isExperiment;\nnameCell.campaignType = item.campaignType;\nnameCell.rawStatus = item.rawStatus;\nnameCell.i18n = i18n;\nnameCell.AccountActivityStatus = AccountActivityStatus;\npug_mixins[\"entityName\"](nameCell);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"top-change-graph-decline\",rowClass], [false,true]), false, true)) + \"\\u003E\\u003Cdiv class=\\\"decline-box\\\"\\u003E\\u003Cdiv\" + (\" class=\\\"graph-space\\\"\"+pug.attr(\"style\", pug.style(`flex: ${item.declineSpace}`), true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (\" class=\\\"graph-bar\\\"\"+pug.attr(\"style\", pug.style(`flex: ${item.declineBar}`), true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"top-change-graph-increase\",rowClass], [false,true]), false, true)) + \"\\u003E\\u003Cdiv class=\\\"increase-box\\\"\\u003E\\u003Cdiv\" + (\" class=\\\"graph-bar\\\"\"+pug.attr(\"style\", pug.style(`flex: ${item.increaseBar}`), true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (\" class=\\\"graph-space\\\"\"+pug.attr(\"style\", pug.style(`flex: ${item.increaseSpace}`), true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\npug_mixins[\"insightBulb\"]({ index, fluctuationTypeIds: item.fluctuationTypeIds, rowClass, metricName, formattedValue: item.formattedValue, campaignId: item.campaignId, accountId: item.accountId });\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"pop-change\",rowClass], [false,true]), false, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = item.formattedValue) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"pop-change-percentage\",rowClass], [false,true]), false, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = item.formattedPercentageValue) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"pop-range\",rowClass], [false,true]), false, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = item.fromTo) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\nvar classes = [rowClass]\nif (item.declineBar > 0) {\nclasses.push('kpi-declined')\n}\nelse\nif (item.increaseBar > 0) {\nclasses.push('kpi-increased')\n}\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"graph-hover-target\",classes], [false,true]), false, true)) + \"\\u003E\";\npug_mixins[\"hoverContent\"](i18n, item, metricName, currentDateRangeText, comparisonDateRangeText);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"pop-hover-target\",classes], [false,true]), false, true)) + \"\\u003E\";\npug_mixins[\"hoverContent\"](i18n, item, metricName, currentDateRangeText, comparisonDateRangeText);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n};\nif (loaded) {\nif (hasError) {\npug_mixins[\"errorContent\"](i18n);\n}\nelse\nif (gridData != undefined) {\nif (gridData.length < 1) {\npug_mixins[\"emptyContent\"](i18n);\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"top-change-grid\\\"\\u003E\";\n// iterate gridData\n;(function(){\n var $$obj = gridData;\n if ('number' == typeof $$obj.length) {\n for (var index = 0, $$l = $$obj.length; index < $$l; index++) {\n var item = $$obj[index];\npug_mixins[\"gridRow\"](i18n, item, index, metricName, currentDateRangeText, comparisonDateRangeText, AccountInactiveCauseValue);\n }\n } else {\n var $$l = 0;\n for (var index in $$obj) {\n $$l++;\n var item = $$obj[index];\npug_mixins[\"gridRow\"](i18n, item, index, metricName, currentDateRangeText, comparisonDateRangeText, AccountInactiveCauseValue);\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"cover-container\\\"\\u003E\\u003Cdiv class=\\\"scroll-bar-cover\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}\n}}.call(this,\"AccountActivityStatus\" in locals_for_with?locals_for_with.AccountActivityStatus:typeof AccountActivityStatus!==\"undefined\"?AccountActivityStatus:undefined,\"AccountInactiveCauseValue\" in locals_for_with?locals_for_with.AccountInactiveCauseValue:typeof AccountInactiveCauseValue!==\"undefined\"?AccountInactiveCauseValue:undefined,\"comparisonDateRangeText\" in locals_for_with?locals_for_with.comparisonDateRangeText:typeof comparisonDateRangeText!==\"undefined\"?comparisonDateRangeText:undefined,\"currentDateRangeText\" in locals_for_with?locals_for_with.currentDateRangeText:typeof currentDateRangeText!==\"undefined\"?currentDateRangeText:undefined,\"gridData\" in locals_for_with?locals_for_with.gridData:typeof gridData!==\"undefined\"?gridData:undefined,\"hasError\" in locals_for_with?locals_for_with.hasError:typeof hasError!==\"undefined\"?hasError:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"index\" in locals_for_with?locals_for_with.index:typeof index!==\"undefined\"?index:undefined,\"loaded\" in locals_for_with?locals_for_with.loaded:typeof loaded!==\"undefined\"?loaded:undefined,\"metricName\" in locals_for_with?locals_for_with.metricName:typeof metricName!==\"undefined\"?metricName: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 (addInfo, metric, s$i18n) {pug_html = pug_html + \"\\u003Cdiv class=\\\"metric-picker__button metric-picker__button--single dropdown-toggle\\\" role=\\\"button\\\" data-toggle=\\\"dropdown\\\" aria-haspopup=\\\"true\\\" aria-expanded=\\\"false\\\" tabindex=\\\"0\\\"\\u003E\";\nvar metricName = s$i18n.property('PerformanceMetrics', metric);\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"metric-picker__name\\\"\"+pug.attr(\"title\", metricName, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = metricName) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\nif (addInfo) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"metric-value-info\\\"\\u003E\\u003Cdiv data-ref=\\\"info-tooltip\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Cspan class=\\\"caret\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"addInfo\" in locals_for_with?locals_for_with.addInfo:typeof addInfo!==\"undefined\"?addInfo:undefined,\"metric\" in locals_for_with?locals_for_with.metric:typeof metric!==\"undefined\"?metric:undefined,\"s$i18n\" in locals_for_with?locals_for_with.s$i18n:typeof s$i18n!==\"undefined\"?s$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=\\\"device-metric__metric-picker metric-row\\\"\\u003E\\u003Cdiv data-ref=\\\"metric-picker\\\"\\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 (String, data, hasError, i18n, isAggregatedMetric, isSmartShoppingCampaign, loaded, metrics, navigationLevel, order, s$i18n) {pug_mixins[\"HoverContent\"] = pug_interp = function(order, data, metric){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nfor (var index = 0; index < order.length; index++)\n{\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"hover-container\",order[index].toLowerCase() + '-detail'], [false,true]), false, true)) + \"\\u003E\\u003Cdiv class=\\\"hover-content\\\"\\u003E\\u003Cdiv class=\\\"device-name\\\"\\u003E\" + (pug.escape(null == (pug_interp = s$i18n.enum('DeviceType', order[index])) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"metric-name\\\"\\u003E\" + (pug.escape(null == (pug_interp = s$i18n.property('PerformanceMetrics', metric)) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"hover-kpi-container\\\"\\u003E\\u003Cdiv class=\\\"hover-kpi-container__hover-kpi\\\"\\u003E\\u003Cdiv class=\\\"hover-kpi-container__date-range\\\"\\u003E\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"hover-kpi-container__date-range__color-block\",\"color-block-current-\" + order[index].toLowerCase()], [false,true]), false, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\\u003E\" + (pug.escape(null == (pug_interp = data.formattedDateRange) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"hover-kpi-container__value\\\"\\u003E\" + (pug.escape(null == (pug_interp = data[index].formattedData[metric].formattedHoverValue) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (data.formattedPeriodDateRange) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"hover-kpi-container__hover-kpi\\\"\\u003E\\u003Cdiv class=\\\"hover-kpi-container__date-range\\\"\\u003E\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"hover-kpi-container__date-range__color-block\",\"color-block-period-\" + order[index].toLowerCase()], [false,true]), false, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\\u003E\" + (pug.escape(null == (pug_interp = data.formattedPeriodDateRange) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"hover-kpi-container__value\\\"\\u003E\" + (pug.escape(null == (pug_interp = data[index].formattedPeriodData[metric].formattedHoverValue) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\nif (data.formattedPeriodDateRange) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"hover-content__kpi-change\\\"\\u003E\\u003Cdiv\\u003E\" + (null == (pug_interp = i18n.getString(\"Dashboard_Change\")) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"hover-content__kpi-change__value\\\"\\u003E\" + (null == (pug_interp = data[index].formattedPeriodData[metric].formattedChange + \" \" + data[index].formattedPeriodData[metric].formattedChangePercentage) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n};\n\n\n\n\npug_mixins[\"errorContent\"] = pug_interp = function(i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"device-error\\\"\\u003E\" + (null == (pug_interp = i18n.getString('Dashboard_Cards_Data_Error')) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"gridContentVNext\"] = pug_interp = function(s$i18n, order, metrics, data, i18n, isAggregatedMetric){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"device-content-grid\",'device-count-' + order.length], [false,true]), false, true)) + \"\\u003E\";\nfor (var index = 0; index < order.length; index++)\n{\nvar columnClass = \"device-grid-column-\" + (index + 2)\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"device-card-legend-item\",\"device-grid-row-1\",columnClass], [false,false,true]), false, true)) + \"\\u003E\\u003Cdiv class=\\\"legend-container\\\"\\u003E\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"legend-icon\",order[index].toLowerCase() + '-icon-img'], [false,true]), false, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"legend-txt\\\"\\u003E\" + (pug.escape(null == (pug_interp = s$i18n.enum('DeviceType', order[index])) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n// iterate [0, 1, 2]\n;(function(){\n var $$obj = [0, 1, 2];\n if ('number' == typeof $$obj.length) {\n for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) {\n var metricIndex = $$obj[pug_index0];\nvar metric = metrics[metricIndex]\nvar rowClass = \"device-grid-row-\" + (metricIndex + 2);\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"graph-area\",\"device-grid-column-1\",rowClass], [false,false,true]), false, true)) + \"\\u003E\\u003Cdiv\" + (\" class=\\\"device-card__metric\\\"\"+pug.attr(\"data-ref\", String(metricIndex), true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (data) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"graph-container current\\\"\\u003E\";\nfor (var index = 0; index < order.length; index++)\n{\nvar type = order[index].toLowerCase()\nvar barClass = \"device-grid-bar-\" + type\nvar flexValue = data[index].formattedData[metric].flexValue\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"device-grid-bar\",barClass], [false,true]), false, true)+pug.attr(\"style\", pug.style(`flex: ${flexValue}; min-width: ${flexValue > 0? '1px': '0px'}`), true, true)+pug.attr(\"data-type\", type, true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nif (!isAggregatedMetric(metric)) {\npug_mixins[\"HoverContent\"](order, data, metric);\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\nif (data.formattedPeriodDateRange) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"graph-container period\\\"\\u003E\";\nfor (var index = 0; index < order.length; index++)\n{\nvar type = order[index].toLowerCase()\nvar barClass = \"device-grid-bar-\" + order[index].toLowerCase()\nvar flexValue = data[index].formattedPeriodData[metric].flexValue\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"device-grid-bar\",barClass], [false,true]), false, true)+pug.attr(\"style\", pug.style(`flex: ${flexValue}; min-width: ${flexValue > 0? '1px': '0px'}`), true, true)+pug.attr(\"data-type\", type, true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"overlay\\\"\\u003E\";\nfor (var index = 0; index < order.length; index++)\n{\nvar type = order[index].toLowerCase()\nvar flexValue = data[index].formattedPeriodData[metric].flexValue\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"device-grid-bar\\\"\"+pug.attr(\"style\", pug.style(`flex: ${flexValue}; min-width: ${flexValue > 0? '1px': '0px'}`), true, true)+pug.attr(\"data-type\", type, true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\nfor (var index = 0; index < order.length; index++)\n{\nvar kpiClasses = [\"device-grid-column-\" + (index + 2), rowClass];\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([kpiClasses], [true]), false, true)) + \"\\u003E\\u003Cdiv class=\\\"kpi-container\\\"\\u003E\";\nif (data) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"kpi\\\"\\u003E\\u003Cdiv class=\\\"current-value\\\"\\u003E\" + (pug.escape(null == (pug_interp = data[index].formattedData[metric].formattedSegment) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\nif (data.formattedPeriodDateRange) {\nvar increase = data[index].formattedPeriodData[metric].changePercentage >= 0\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"change-percentage\",increase ? 'increase' : 'decrease'], [false,true]), false, true)) + \"\\u003E\" + (null == (pug_interp = data[index].formattedPeriodData[metric].formattedChangePercentage) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\nif (data.formattedPeriodDateRange) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"kpi\\\"\\u003E\\u003Cdiv class=\\\"period-value\\\"\\u003E\" + (pug.escape(null == (pug_interp = data[index].formattedPeriodData[metric].formattedSegment) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n }\n } else {\n var $$l = 0;\n for (var pug_index0 in $$obj) {\n $$l++;\n var metricIndex = $$obj[pug_index0];\nvar metric = metrics[metricIndex]\nvar rowClass = \"device-grid-row-\" + (metricIndex + 2);\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"graph-area\",\"device-grid-column-1\",rowClass], [false,false,true]), false, true)) + \"\\u003E\\u003Cdiv\" + (\" class=\\\"device-card__metric\\\"\"+pug.attr(\"data-ref\", String(metricIndex), true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (data) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"graph-container current\\\"\\u003E\";\nfor (var index = 0; index < order.length; index++)\n{\nvar type = order[index].toLowerCase()\nvar barClass = \"device-grid-bar-\" + type\nvar flexValue = data[index].formattedData[metric].flexValue\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"device-grid-bar\",barClass], [false,true]), false, true)+pug.attr(\"style\", pug.style(`flex: ${flexValue}; min-width: ${flexValue > 0? '1px': '0px'}`), true, true)+pug.attr(\"data-type\", type, true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nif (!isAggregatedMetric(metric)) {\npug_mixins[\"HoverContent\"](order, data, metric);\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\nif (data.formattedPeriodDateRange) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"graph-container period\\\"\\u003E\";\nfor (var index = 0; index < order.length; index++)\n{\nvar type = order[index].toLowerCase()\nvar barClass = \"device-grid-bar-\" + order[index].toLowerCase()\nvar flexValue = data[index].formattedPeriodData[metric].flexValue\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"device-grid-bar\",barClass], [false,true]), false, true)+pug.attr(\"style\", pug.style(`flex: ${flexValue}; min-width: ${flexValue > 0? '1px': '0px'}`), true, true)+pug.attr(\"data-type\", type, true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"overlay\\\"\\u003E\";\nfor (var index = 0; index < order.length; index++)\n{\nvar type = order[index].toLowerCase()\nvar flexValue = data[index].formattedPeriodData[metric].flexValue\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"device-grid-bar\\\"\"+pug.attr(\"style\", pug.style(`flex: ${flexValue}; min-width: ${flexValue > 0? '1px': '0px'}`), true, true)+pug.attr(\"data-type\", type, true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\nfor (var index = 0; index < order.length; index++)\n{\nvar kpiClasses = [\"device-grid-column-\" + (index + 2), rowClass];\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([kpiClasses], [true]), false, true)) + \"\\u003E\\u003Cdiv class=\\\"kpi-container\\\"\\u003E\";\nif (data) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"kpi\\\"\\u003E\\u003Cdiv class=\\\"current-value\\\"\\u003E\" + (pug.escape(null == (pug_interp = data[index].formattedData[metric].formattedSegment) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\nif (data.formattedPeriodDateRange) {\nvar increase = data[index].formattedPeriodData[metric].changePercentage >= 0\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"change-percentage\",increase ? 'increase' : 'decrease'], [false,true]), false, true)) + \"\\u003E\" + (null == (pug_interp = data[index].formattedPeriodData[metric].formattedChangePercentage) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\nif (data.formattedPeriodDateRange) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"kpi\\\"\\u003E\\u003Cdiv class=\\\"period-value\\\"\\u003E\" + (pug.escape(null == (pug_interp = data[index].formattedPeriodData[metric].formattedSegment) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n};\nif (loaded) {\nif (hasError) {\npug_mixins[\"errorContent\"](i18n);\n}\nelse {\npug_mixins[\"gridContentVNext\"](s$i18n, order, metrics, data, i18n, isAggregatedMetric);\n}\nvar isCustomerLevel = navigationLevel === 'customer';\nif (!isCustomerLevel && !isSmartShoppingCampaign) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"device-links\\\"\\u003E\\u003Cspan class=\\\"view-all-clickLink\\\" href=\\\"javascript:void(0);\\\" role=\\\"presentation\\\" tabindex=\\\"-1\\\"\\u003E\\u003Cbutton class=\\\"btn-default btn\\\" type=\\\"button\\\"\\u003E\" + (null == (pug_interp = i18n.getString('Dashboard_DeviceCard_View_All')) ? \"\" : pug_interp) + \"\\u003C\\u002Fbutton\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"HelpTopic hiddenHelpBridge\\\"\"+pug.attr(\"query\", isCustomerLevel ? 'help:ext60045': 'help:app54555', true, true)+\" href=\\\"javascript:void(0);\\\" style=\\\"display:none\\\"\") + \"\\u003E\\u003C\\u002Fa\\u003E\";}.call(this,\"String\" in locals_for_with?locals_for_with.String:typeof String!==\"undefined\"?String:undefined,\"data\" in locals_for_with?locals_for_with.data:typeof data!==\"undefined\"?data:undefined,\"hasError\" in locals_for_with?locals_for_with.hasError:typeof hasError!==\"undefined\"?hasError:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"isAggregatedMetric\" in locals_for_with?locals_for_with.isAggregatedMetric:typeof isAggregatedMetric!==\"undefined\"?isAggregatedMetric:undefined,\"isSmartShoppingCampaign\" in locals_for_with?locals_for_with.isSmartShoppingCampaign:typeof isSmartShoppingCampaign!==\"undefined\"?isSmartShoppingCampaign:undefined,\"loaded\" in locals_for_with?locals_for_with.loaded:typeof loaded!==\"undefined\"?loaded:undefined,\"metrics\" in locals_for_with?locals_for_with.metrics:typeof metrics!==\"undefined\"?metrics:undefined,\"navigationLevel\" in locals_for_with?locals_for_with.navigationLevel:typeof navigationLevel!==\"undefined\"?navigationLevel:undefined,\"order\" in locals_for_with?locals_for_with.order:typeof order!==\"undefined\"?order:undefined,\"s$i18n\" in locals_for_with?locals_for_with.s$i18n:typeof s$i18n!==\"undefined\"?s$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=\\\"no-data\\\"\\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=\\\"cover-container\\\"\\u003E\\u003Cdiv class=\\\"scroll-bar-cover\\\"\\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 (metrics, s$i18n) {pug_html = pug_html + \"\\u003Cdiv class=\\\"dropdown open\\\"\\u003E\\u003Cul class=\\\"dropdown-menu dropdown-menu-right\\\" role=\\\"menu\\\"\\u003E\";\n// iterate metrics\n;(function(){\n var $$obj = metrics;\n if ('number' == typeof $$obj.length) {\n for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) {\n var metric = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cli\" + (pug.attr(\"data-metric\", metric, true, true)) + \"\\u003E\\u003Ca href=\\\"#\\\" role=\\\"menuitem\\\"\\u003E\" + (pug.escape(null == (pug_interp = s$i18n.property('PerformanceMetrics', metric)) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index0 in $$obj) {\n $$l++;\n var metric = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cli\" + (pug.attr(\"data-metric\", metric, true, true)) + \"\\u003E\\u003Ca href=\\\"#\\\" role=\\\"menuitem\\\"\\u003E\" + (pug.escape(null == (pug_interp = s$i18n.property('PerformanceMetrics', metric)) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003C\\u002Ful\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"metrics\" in locals_for_with?locals_for_with.metrics:typeof metrics!==\"undefined\"?metrics:undefined,\"s$i18n\" in locals_for_with?locals_for_with.s$i18n:typeof s$i18n!==\"undefined\"?s$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 (metric) {pug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"btn-group metric-picker\\\"\"+pug.attr(\"data-metric\", metric, true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"metric\" in locals_for_with?locals_for_with.metric:typeof metric!==\"undefined\"?metric: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, metric, s$i18n) {pug_html = pug_html + \"\\u003Cdiv class=\\\"grid-card-header\\\"\\u003E\\u003Cdiv\" + (\" class=\\\"metric-picker\\\"\"+pug.attr(\"data-metric\", metric, true, true)) + \"\\u003E\";\nvar metricName = s$i18n.property('PerformanceMetrics', metric);\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"metric-picker__name\\\"\"+pug.attr(\"title\", metricName, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = metricName) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cbutton\" + (\" class=\\\"metric-picker__button metric-picker__button--caret btn btn-default dropdown-toggle\\\"\"+\" aria-haspopup=\\\"true\\\"\"+pug.attr(\"aria-label\", i18n.getString('Select metric'), true, true)+\" aria-expanded=\\\"false\\\"\") + \"\\u003E\\u003Cspan class=\\\"caret\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fbutton\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"metric\" in locals_for_with?locals_for_with.metric:typeof metric!==\"undefined\"?metric:undefined,\"s$i18n\" in locals_for_with?locals_for_with.s$i18n:typeof s$i18n!==\"undefined\"?s$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 (order, showExtra, value) {pug_html = pug_html + \"\\u003Cdiv class=\\\"grid-card-cell grid-card-cell--performance-metric\\\"\\u003E\\u003Cdiv class=\\\"grid-card-cell__body\\\"\\u003E\" + (pug.escape(null == (pug_interp = value[order.body]) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\nif (showExtra) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"grid-card-cell__extra\\\"\\u003E\\u003Cdiv class=\\\"grid-card-cell__sup\\\"\\u003E\" + (pug.escape(null == (pug_interp = value[order.sup]) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"grid-card-cell__sub\\\"\\u003E\" + (pug.escape(null == (pug_interp = value[order.sub]) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"order\" in locals_for_with?locals_for_with.order:typeof order!==\"undefined\"?order:undefined,\"showExtra\" in locals_for_with?locals_for_with.showExtra:typeof showExtra!==\"undefined\"?showExtra: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 (options) {pug_html = pug_html + \"\\u003Cdiv class=\\\"empty-content\\\"\\u003E\" + (null == (pug_interp = options.templateOptions.i18n.getString('Dashboard_Cards_NoData')) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"options\" in locals_for_with?locals_for_with.options:typeof options!==\"undefined\"?options: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 (adGroupName, addAsNegativeKeyword, appendLearnMoreLink, campaignName, errMsg, i18n, isEmpty, matchType, navigationLevel, selectionLevel, text) {pug_mixins[\"entitySelector\"] = pug_interp = function(navigationLevel, i18n, campaignName, adGroupName, selectionLevel){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nif (navigationLevel === 'account') {\nif (selectionLevel === 'adGroupLevel') {\npug_html = pug_html + \"\\u003Cdiv class=\\\"adgroup-campaign-label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Dashboard_TopSearchTerms_SelectAdGroup')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"campaign-ad-group-selector\\\" data-ref=\\\"selector\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"adgroup-campaign-label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Dashboard_TopSearchTerms_SelectCampaign')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"campaign-ad-group-selector\\\" data-ref=\\\"selector\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"entity-info\\\"\\u003E\\u003Cdiv class=\\\"campaign-info\\\"\\u003E\\u003Cdiv class=\\\"adgroup-campaign-label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Entity_Campaign')) ? \"\" : pug_interp)) + \"\\u003Cdiv\" + (\" class=\\\"selected-entity-names__name\\\"\"+pug.attr(\"title\", campaignName, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = campaignName) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (selectionLevel === 'adGroupLevel') {\npug_html = pug_html + \"\\u003Cdiv class=\\\"adgroup-info\\\"\\u003E\\u003Cdiv class=\\\"adgroup-campaign-label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Entity_Adgroup')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"campaign-ad-group-selector\\\" data-ref=\\\"selector\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n}\n};\npug_html = pug_html + \"\\u003Cdiv class=\\\"add-keyword-content\\\"\\u003E\";\nvar title = addAsNegativeKeyword ? i18n.getString('Dashboard_TopSearchTerms_AddAsNegativeKeyword'): i18n.getString('Dashboard_TopSearchTerms_AddAsKeyword');\nif (addAsNegativeKeyword) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"add-keyword-content__tittle\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Dashboard_TopSearchTerms_AddAsNegativeKeyword')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"adgroup-campaign-label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Dashboard_TopSearchTerms_AddNegativeKeyword_Level')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"level-selector\\\"\\u003E\";\nif (selectionLevel === 'adGroupLevel') {\npug_html = pug_html + \"\\u003Clabel class=\\\"entityLevel\\\"\\u003E\\u003Cinput name=\\\"entityLevel\\\" type=\\\"radio\\\" value=\\\"campaignLevel\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Dashboard_TopSearchTerms_CampaignLevel')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003Clabel class=\\\"entityLevel\\\"\\u003E\\u003Cinput name=\\\"entityLevel\\\" type=\\\"radio\\\" value=\\\"adGroupLevel\\\" checked=\\\"checked\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Dashboard_TopSearchTerms_AdGroupLevel')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Clabel class=\\\"entityLevel\\\"\\u003E\\u003Cinput name=\\\"entityLevel\\\" type=\\\"radio\\\" value=\\\"campaignLevel\\\" checked=\\\"checked\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Dashboard_TopSearchTerms_CampaignLevel')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003Clabel class=\\\"entityLevel\\\"\\u003E\\u003Cinput name=\\\"entityLevel\\\" type=\\\"radio\\\" value=\\\"adGroupLevel\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Dashboard_TopSearchTerms_AdGroupLevel')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\npug_mixins[\"entitySelector\"](navigationLevel, i18n, campaignName, adGroupName, selectionLevel);\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"add-keyword-content__tittle\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Dashboard_TopSearchTerms_AddAsKeyword')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\npug_mixins[\"entitySelector\"](navigationLevel, i18n, campaignName, adGroupName, selectionLevel);\n}\npug_html = pug_html + \"\\u003Chr style=\\\"clear:both\\\"\\u003E\\u003Cdiv class=\\\"keyword-detail\\\"\\u003E\";\nvar keywordType = addAsNegativeKeyword ? i18n.getString('Entity_NegativeKeywords') :i18n.getString('Entity_Keywords');\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv class=\\\"keyword-type\\\" id=\\\"Searchterm-Keywordtype\\\"\\u003E\" + (pug.escape(null == (pug_interp = keywordType) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"keyword-value\\\"\\u003E\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([addAsNegativeKeyword ? 'negative-keyword-input' : 'keyword-input'], [true]), false, true)) + \"\\u003E\\u003Cinput\" + (\" class=\\\"form-control keyword-text__value\\\"\"+pug.attr(\"value\", text, true, true)+\" type=\\\"text\\\" aria-labelledby=\\\"Searchterm-Keywordtype\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv class=\\\"keyword-match-type\\\" id=\\\"Searchterm-MatchType\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('ColumnName_Type')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"keyword-match-type-selector\\\"\\u003E\\u003Cselect\" + (\" class=\\\"form-control match-type__value\\\"\"+pug.attr(\"value\", matchType, true, true)+\" aria-labelledby=\\\"Searchterm-MatchType\\\"\") + \"\\u003E\";\nvar selection\nselection = matchType === 'Exact' ? {selected: 'selected'} : {};\npug_html = pug_html + \"\\u003Coption\" + (pug.attrs(pug.merge([{\"value\": \"Exact\"},selection]), true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('KeywordType_Exact')) ? \"\" : pug_interp)) + \"\\u003C\\u002Foption\\u003E\";\nselection = matchType === 'Phrase' ? {selected: 'selected'} : {};\npug_html = pug_html + \"\\u003Coption\" + (pug.attrs(pug.merge([{\"value\": \"Phrase\"},selection]), true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('KeywordType_Phrase')) ? \"\" : pug_interp)) + \"\\u003C\\u002Foption\\u003E\";\nif (!addAsNegativeKeyword) {\nselection = matchType === 'Broad' ? {selected: 'selected'} : {};\npug_html = pug_html + \"\\u003Coption\" + (pug.attrs(pug.merge([{\"value\": \"Broad\"},selection]), true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('KeywordType_Broad')) ? \"\" : pug_interp)) + \"\\u003C\\u002Foption\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fselect\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (errMsg) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"alert-danger\\\"\\u003E\" + (null == (pug_interp = errMsg) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"type-help\\\"\\u003E\" + (null == (pug_interp = appendLearnMoreLink(i18n.getString('SearchTerm_ManageKeyword_HelpText'), 'app51021')) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\\u003Chr\\u003E\";\nvar attributes = isEmpty ? { disabled: 'disabled' }: {};\npug_html = pug_html + \"\\u003Cbutton\" + (pug.attrs(pug.merge([{\"class\": \"apply btn btn-primary\"},attributes]), true)) + \"\\u003EApply\\u003C\\u002Fbutton\\u003E\\u003Cbutton class=\\\"cancel btn btn-default\\\"\\u003ECancel\\u003C\\u002Fbutton\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"adGroupName\" in locals_for_with?locals_for_with.adGroupName:typeof adGroupName!==\"undefined\"?adGroupName:undefined,\"addAsNegativeKeyword\" in locals_for_with?locals_for_with.addAsNegativeKeyword:typeof addAsNegativeKeyword!==\"undefined\"?addAsNegativeKeyword:undefined,\"appendLearnMoreLink\" in locals_for_with?locals_for_with.appendLearnMoreLink:typeof appendLearnMoreLink!==\"undefined\"?appendLearnMoreLink:undefined,\"campaignName\" in locals_for_with?locals_for_with.campaignName:typeof campaignName!==\"undefined\"?campaignName:undefined,\"errMsg\" in locals_for_with?locals_for_with.errMsg:typeof errMsg!==\"undefined\"?errMsg:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"isEmpty\" in locals_for_with?locals_for_with.isEmpty:typeof isEmpty!==\"undefined\"?isEmpty:undefined,\"matchType\" in locals_for_with?locals_for_with.matchType:typeof matchType!==\"undefined\"?matchType:undefined,\"navigationLevel\" in locals_for_with?locals_for_with.navigationLevel:typeof navigationLevel!==\"undefined\"?navigationLevel:undefined,\"selectionLevel\" in locals_for_with?locals_for_with.selectionLevel:typeof selectionLevel!==\"undefined\"?selectionLevel:undefined,\"text\" in locals_for_with?locals_for_with.text:typeof text!==\"undefined\"?text: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 (buttonText, isCustomerLevel, typeName) {var contentType = typeName.toLowerCase() + \"-card-content\";\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"grid-card__grid-content\",contentType], [false,true]), false, true)) + \"\\u003E\\u003Cdiv data-ref=\\\"content\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\nif ((buttonText)) {\nvar linkType = typeName.toLowerCase() + \"-card-link\"\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"grid-links\",linkType], [false,true]), false, true)) + \"\\u003E\\u003Cspan class=\\\"view-all-clickLink\\\"\\u003E\\u003Cbutton class=\\\"btn-default btn\\\" type=\\\"button\\\"\\u003E\" + (pug.escape(null == (pug_interp = buttonText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"HelpTopic hiddenHelpBridge\\\"\"+pug.attr(\"query\", isCustomerLevel ? 'help:ext60045': 'help:app54555', true, true)+\" href=\\\"javascript:void(0);\\\" style=\\\"display:none\\\"\") + \"\\u003E\\u003C\\u002Fa\\u003E\";}.call(this,\"buttonText\" in locals_for_with?locals_for_with.buttonText:typeof buttonText!==\"undefined\"?buttonText:undefined,\"isCustomerLevel\" in locals_for_with?locals_for_with.isCustomerLevel:typeof isCustomerLevel!==\"undefined\"?isCustomerLevel:undefined,\"typeName\" in locals_for_with?locals_for_with.typeName:typeof typeName!==\"undefined\"?typeName: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 (addInfo, ariaLabel, i18n, metric, metricValue, s$i18n) {pug_html = pug_html + \"\\u003Cdiv class=\\\"metric-picker__text\\\"\\u003E\";\nvar metricName = s$i18n.property('PerformanceMetrics', metric);\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"metric-picker__name\\\"\"+pug.attr(\"title\", metricName, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = metricName) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"metric-picker__value\\\"\\u003E\";\nvar title = addInfo ? null : metricValue;\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"metric-value\\\"\"+pug.attr(\"title\", title, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = metricValue) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\nif (addInfo) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"metric-value-info\\\"\\u003E\\u003Cdiv data-ref=\\\"info-tooltip\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cbutton\" + (\" class=\\\"metric-picker__button metric-picker__button--caret dropdown-toggle btn btn-default\\\"\"+\" data-toggle=\\\"dropdown\\\"\"+pug.attr(\"aria-label\", ariaLabel || i18n.getString('Select metric'), true, true)+\" aria-haspopup=\\\"true\\\" aria-expanded=\\\"false\\\"\") + \"\\u003E\\u003Cspan class=\\\"caret\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fbutton\\u003E\";}.call(this,\"addInfo\" in locals_for_with?locals_for_with.addInfo:typeof addInfo!==\"undefined\"?addInfo:undefined,\"ariaLabel\" in locals_for_with?locals_for_with.ariaLabel:typeof ariaLabel!==\"undefined\"?ariaLabel:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n: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,\"s$i18n\" in locals_for_with?locals_for_with.s$i18n:typeof s$i18n!==\"undefined\"?s$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 (leftAlign, metrics, s$i18n) {var menuClass = leftAlign ? 'dropdown-menu-left' : 'dropdown-menu-right';\npug_html = pug_html + \"\\u003Cul\" + (pug.attr(\"class\", pug.classes([\"dropdown-menu\",menuClass], [false,true]), false, true)+\" role=\\\"menu\\\"\") + \"\\u003E\";\n// iterate metrics\n;(function(){\n var $$obj = metrics;\n if ('number' == typeof $$obj.length) {\n for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) {\n var metric = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cli\" + (pug.attr(\"data-metric\", metric, true, true)+\" role=\\\"presentation\\\"\") + \"\\u003E\\u003Ca href=\\\"#\\\" role=\\\"menuitem\\\"\\u003E\" + (pug.escape(null == (pug_interp = s$i18n.property('PerformanceMetrics', metric)) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index0 in $$obj) {\n $$l++;\n var metric = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cli\" + (pug.attr(\"data-metric\", metric, true, true)+\" role=\\\"presentation\\\"\") + \"\\u003E\\u003Ca href=\\\"#\\\" role=\\\"menuitem\\\"\\u003E\" + (pug.escape(null == (pug_interp = s$i18n.property('PerformanceMetrics', metric)) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003C\\u002Ful\\u003E\";}.call(this,\"leftAlign\" in locals_for_with?locals_for_with.leftAlign:typeof leftAlign!==\"undefined\"?leftAlign:undefined,\"metrics\" in locals_for_with?locals_for_with.metrics:typeof metrics!==\"undefined\"?metrics:undefined,\"s$i18n\" in locals_for_with?locals_for_with.s$i18n:typeof s$i18n!==\"undefined\"?s$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 (metric) {pug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"btn-group btn btn-default metric-picker\\\"\"+pug.attr(\"data-metric\", metric, true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"metric\" in locals_for_with?locals_for_with.metric:typeof metric!==\"undefined\"?metric: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=\\\"dashboard-page\\\" railviewid=\\\"Overview\\\"\\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) {pug_html = pug_html + \"\\u003Cdiv class=\\\"add-card__panel\\\"\\u003E\\u003Cdiv class=\\\"text-info add-card__text-info\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Dashboard_AddCard_DescInfo')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (\" class=\\\"add-card__card-container\\\"\"+\" role=\\\"listbox\\\"\"+pug.attr(\"aria-label\", i18n.getString('Dashboard_AddCard'), true, true)+\" aria-multiselectable=\\\"true\\\" data-bind=\\\"foreach: allCards\\\"\") + \"\\u003E\\u003Cdiv class=\\\"pull-left add-card__card-wrapper\\\"\\u003E\\u003Cdiv class=\\\"add-card__card\\\"\\u003E\\u003Cdiv class=\\\"add-card__card-box\\\" role=\\\"option\\\" data-bind=\\\"css: {'add-card__card-box--selected': $data.selected}, event: { keypress: $parent.onKeyPress, click: $parent.onThumbnailClicked, focus: $parent.onFocus }, attr: { 'aria-selected': $data.selected() ? 'true' : 'false', tabindex: $parent.firstFocusedIndex() == $index() ? 0 : -1 }\\\"\\u003E\\u003Cdiv class=\\\"add-card-indicator\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"add-card__thumbnail\\\" data-bind=\\\"css: $data.appliedClass\\\"\\u003E\\u003Cdiv class=\\\"add-card__card-title\\\" data-bind=\\\"text: $data.addCardTitle\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"add-card__image\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"add-card__description\\\" data-bind=\\\"text: $data.desc\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form\\\"\\u003E\\u003Cdiv class=\\\"add-card__button-container\\\"\\u003E\\u003Cbutton class=\\\"btn btn-primary save\\\" type=\\\"button\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Dashboard_AddCard_Save')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\\u003Cbutton class=\\\"btn btn-default cancel\\\" type=\\\"button\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Dashboard_AddCard_Cancel')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\\u003Cdiv class=\\\"text-info add-card__text-info\\\"\\u003E\\u003Cspan data-bind=\\\"text: i18n.getString("Dashboard_AddCard_TilesSelected", selectedTilesNumber())\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\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=\\\"dashboard__new-tile-banner\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"mcc_too_many-accounts\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"dashboard__toolbar\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"dashboard__card-panel\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"summarypage-bifreshtime\\\"\\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 (_TL_, accountTimeZoneText, appendLearnMoreLink, i18n) {pug_html = pug_html + ((null == (pug_interp = appendLearnMoreLink(i18n.getString('BITimeStampNotes_Label'), 'ext54480')) ? \"\" : pug_interp) + \"\\u003Cbr\\u003E\" + (null == (pug_interp = appendLearnMoreLink(i18n.getString('MRCAccredited_Label'), '', {linkText:i18n.getString(_TL_('Learn more. ')),label:i18n.getString('MRCAccredited_Label'),} , 'https://about.ads.microsoft.com/en-us/resources/policies/microsoft-advertising-click-measurement-description-of-methodology')) ? \"\" : pug_interp) + (null == (pug_interp = appendLearnMoreLink(i18n.getString('DateRange_Timezone',accountTimeZoneText), 'ext54483')) ? \"\" : pug_interp));}.call(this,\"_TL_\" in locals_for_with?locals_for_with._TL_:typeof _TL_!==\"undefined\"?_TL_:undefined,\"accountTimeZoneText\" in locals_for_with?locals_for_with.accountTimeZoneText:typeof accountTimeZoneText!==\"undefined\"?accountTimeZoneText:undefined,\"appendLearnMoreLink\" in locals_for_with?locals_for_with.appendLearnMoreLink:typeof appendLearnMoreLink!==\"undefined\"?appendLearnMoreLink: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 + \"\\u003Csup class=\\\"new-feature-label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('New_Feature_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fsup\\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;;var locals_for_with = (locals || {});(function (i18n, newTileMsg) {pug_html = pug_html + \"\\u003Cdiv class=\\\"new-tile-msg\\\"\\u003E\\u003Cspan class=\\\"new-feature-label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('New_Feature_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = newTileMsg) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Ca class=\\\"show-new-tile\\\" target=\\\"_blank\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Dashboard_ShowMe')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"msg-dismiss-button\\\"\\u003E\\u003Cbutton class=\\\"closeimage close\\\"\\u003E\\u003C\\u002Fbutton\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"newTileMsg\" in locals_for_with?locals_for_with.newTileMsg:typeof newTileMsg!==\"undefined\"?newTileMsg: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 (warning) {pug_html = pug_html + \"\\u003Cdiv\\u003E\" + (null == (pug_interp = warning) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"warning\" in locals_for_with?locals_for_with.warning:typeof warning!==\"undefined\"?warning: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 (metric, s$i18n) {pug_html = pug_html + \"\\u003Cdiv class=\\\"metric-picker__button metric-picker__button--single dropdown-toggle\\\" role=\\\"button\\\" tabindex=\\\"0\\\" data-toggle=\\\"dropdown\\\" aria-haspopup=\\\"true\\\" aria-expanded=\\\"false\\\"\\u003E\\u003Cdiv class=\\\"metric-picker__name\\\"\\u003E\" + (pug.escape(null == (pug_interp = s$i18n.property('PerformanceMetrics', metric)) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cspan class=\\\"glyphicon glyphicon-triangle-bottom toolbar-icon pull-right\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"metric\" in locals_for_with?locals_for_with.metric:typeof metric!==\"undefined\"?metric:undefined,\"s$i18n\" in locals_for_with?locals_for_with.s$i18n:typeof s$i18n!==\"undefined\"?s$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 (buttonText, isCustomerLevel, popText, popTextAriaLabel) {pug_html = pug_html + \"\\u003Cdiv class=\\\"top-changes-card-header\\\"\\u003E\\u003Cdiv class=\\\"popComparisonRange\\\"\\u003E\" + (pug.escape(null == (pug_interp = popText) ? \"\" : pug_interp)) + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\"\"+pug.attr(\"aria-label\", popTextAriaLabel, true, true)+\" topic=\\\"pop_BA_Overview_TopChangesDateRange\\\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\") + \"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"metric-container\\\"\\u003E\\u003Cdiv class=\\\"dev\\\" data-ref=\\\"metric-picker\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"div\\\" data-ref=\\\"grid-content\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\nif ((buttonText)) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"entity-links\\\"\\u003E\\u003Cspan class=\\\"view-all-clickLink\\\" href=\\\"javascript:void(0);\\\" role=\\\"presentation\\\" tabindex=\\\"-1\\\"\\u003E\\u003Cbutton class=\\\"btn-default btn\\\" type=\\\"button\\\"\\u003E\" + (pug.escape(null == (pug_interp = buttonText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"HelpTopic hiddenHelpBridge\\\"\"+pug.attr(\"query\", isCustomerLevel ? 'help:ext60045': 'help:app54555', true, true)+\" href=\\\"javascript:void(0);\\\" style=\\\"display:none\\\"\") + \"\\u003E\\u003C\\u002Fa\\u003E\";}.call(this,\"buttonText\" in locals_for_with?locals_for_with.buttonText:typeof buttonText!==\"undefined\"?buttonText:undefined,\"isCustomerLevel\" in locals_for_with?locals_for_with.isCustomerLevel:typeof isCustomerLevel!==\"undefined\"?isCustomerLevel:undefined,\"popText\" in locals_for_with?locals_for_with.popText:typeof popText!==\"undefined\"?popText:undefined,\"popTextAriaLabel\" in locals_for_with?locals_for_with.popTextAriaLabel:typeof popTextAriaLabel!==\"undefined\"?popTextAriaLabel:undefined));;return pug_html;};\nmodule.exports = template;"],"names":["cardWelcomeTipsId","cardTopLocationsId","cardAssetPerformanceId","cardPerformanceId","cardDiagnosticId","cardRecommendationsId","cardTopCampaignsId","cardTopAccountsId","cardTopKeywordsId","cardDeviceId","cardSearchTermsId","cardTopAdGroupsId","cardCompetitionId","cardConversionTrackingId","cardTopChangesAccountId","cardTopChangesCampaignId","cardTopChangesAdGroupId","cardNavigateToFullProductId","CampaignLevelCampaignType","_","AccountLevelCampaignType","__","key","getPreference","_ref","preferenceObj","preference","findByNameAtUserLevel","getPreferencePatcher","_ref2","update","preferenceData","newPreferenceData","_objectSpread","setAtUserLevel","Data","Name","getPreferenceKeyPrefix","_ref3","navigationLevel","campaignType","campaignTypeString","Hotel","PerformanceMax","App","LinkedIn","concat","getCardPreferenceKey","_ref4","cardTypeId","prefix","getPagePreferenceKey","_ref5","getCardPreferenceWithDefault","_ref6","config","permissions","cardPreferenceKey","typeId","originCardPreference","defaultPreference","getDefaultPreference","undefined","isPreferenceValid","cardPreference","patchPreference","getCardPreferenceOptionsForDfm","_ref7","options","getDfmPreferenceObject","id","ComparisonValues","PerformanceMetrics","PerformanceMetricsChange","PerformanceMetricsChangePercentage","getHeaderPropsFromPreferenceForPerformanceTable","i18n","dateRange","initialSelectedValue","selectedComparisonValue","compared","value","displayName","getString","_TL_","onOptionSelected","getTablePropsFromPreferenceForPerformanceTable","selectedColumns","defaultGridColumns","allMetrics","metrics","AccountsMode","Expert","map","metric","metricToDisplayNameMap","initialSelectedMetrics","column","find","initialSortColumn","sortColumn","initialSortDirection","sortDirection","isNullOrUndefined","isTablePreferenceValid","metricsKeys","length","some","includes","Object","values","getDefaultPerformanceTablePreference","getDfmPreferenceObjectForPerformanceTable","columns","orderby","direction","selectedMenuItem","val","getLegacyPreference","serverContext","prefs","findByNameAtAccountLevel","dashboardId","name","CurrentCustomer","HasExpertAccount","fetchDashboardId","getAvailableCardsConfigs","cardsConfigs","isSDK","cardConfig","isValidForNavigationLevel","getSelectedCardsConfigs","availableCardsConfigs","selectedCards","sc","getInitSelectedCardsConfig","pagePreferenceKey","pagePreference","legacyCardSelectionPreference","useSelectedCardsWithPreference","isLoadingWelcomeCardConfig","useMemo","patchPagePreference","initSelectedCards","_useState","useState","_useState2","_slicedToArray","setSelectedCards","selectedCardsConfigs","cardSelectionCards","hidden","onCardSelectionSaved","useCallback","selectionToSave","validMetricIndexes","defaultSelectedMetricIndexes","getDefaultPerformanceChartPreference","selectedMetricIndexes","defaultMetrics","getPropsFromPreferenceForPerformanceChart","shellContentElement","document","querySelector","isPerformanceChartPreferenceValid","availableMetricKeys","index","defaultSelectedMetric","getTopChangesAllMetrics","getPropsForTopChanges","preferenceFromServer","getHeaderPropsFromPreferenceForTopChanges","TopChangesFilterOption","AllChanges","TopGainers","TopDecliners","Insights","filter","getDfmPreferenceObjectForTopChanges","getDefaultTopChangesPreference","getTablePropsFromPreferenceForDevices","isDevicePreferenceValid","getDefaultDevicePreference","getCardOptions","edmLevel","entitySet","extraFilter","_ref$isKeyword","isKeyword","_ref$isSearchTerm","isSearchTerm","targetNagivationLevel","edm","currentAccount","Campaigns","query","Id","currentCampaign","AdGroups","currentCustomer","Accounts","Keywords","SearchTerms","getCustomerLevelDataEntitySetOptions","getAccountLevelDataEntitySetOptions","getTopKeywordCardOptions","getSearchTermCardOptions","getCampaignLevelDataEntitySetOptions","getFluentCardsConfigs","_ref2$showWelcomeTips","showWelcomeTips","_ref2$isMobileAppCamp","isMobileAppCampaign","audienceUnderspendShowTile","defaultHiddenCampaignTypes","None","Default","Shopping","DynamicSearchAds","Audience","Smart","diagnosticCardDefaultHiddenCampaignTypesFiltered","diagnosticCardForMobileAppCampaignsFiltered","type","cardsConfig","validFor","size","CardSize","Small","getEntitySetOptions","enabled","Large","dynamicHeightForNarrow","hideForCampaignType","hideForCampaignTypeSDK","arguments","NavigationLevel","Customer","Account","Campaign","getNavigationLevel","scopeValues","aid","campaignId","result","getCcJsData","GetJsDataInfo","cidFetcher","uidFetcher","CurrentUser","willSupportCors","Urls","ClientCenterBaseUrl","jsDataCcRest","getResponsiveSize","containerWidth","Constants","ResponsiveSizeBreakpoints","minWidth","last","get","getResponsiveSizeBasedOnWindowSize","window","innerWidth","getColumnSize","responsiveSize","getViewPortCardsCount","selectedCardsConfig","columnSize","selectedCardSize","remainingRowSize","Math","round","innerHeight","remainingColumnSize","i","cardSize","isInViewPort","cardIds","viewPortSize","indexOf","RECOMMENDATION_SUMMARY_TOP_NUMBER","p$Opportunities","fetchTips","cid","edmCampaign","Customers","$withKey","Tips","top","count","toPromise","then","Promise","schema","scenario","setting","activity","getScope","levelAt","entityIds","legacyConfig","levelAtConstant","ACCOUNT","CAMPAIGN","CUSTOMER","customerId","accountId","campaignName","token","fetchMCCOverviewRecommendations","jsdata","multiAccountRecommendationParameters","RecommendationTypes","getRecommendationIds","CHANNEL_TYPES","MCCOVERVIEW","$call","toJSON","elementType","shortName","findAll","fetchRecommendations","featureInstrumentation","ccJsData","scope","addScenario","currentScenario","loadRecommendationTile","create","currentActivity","opportunities","RecommendationService","odataPath","lcid","LocaleID","channel","OVERVIEW","getSummary","ignoreCoupons","clearRecommendationsCache","fetchGridTileData","getCardsConfig","p$DateRange","dateUtil","fetchGridData","getOptionsForCard","fetchFluentOverviewTilesData","resolve","DateFilterState","queryParam","_queryParam$values","uid","adGroupId","state","p$State","viewPortCardSize","isPerformanceInViewPort","isDeviceInViewPort","isRecommendationInViewPort","isTopCampaignsInViewPort","isKeywordInViewPort","isSearchTermInViewPort","isCompetitionInViewPort","isConversionTrackingInViewPort","isTopChangesCampaignInViewPort","FluentOverviewPageDataFetchManagerCardsConfigObject","dfmDataFetchCallback","p$PerformanceAggregatedData","fetchAggregatedData","p$PerformanceTimeSeries","fetchPerformanceTimeSeries","period","setDFMCache","p$DeviceAggregatedData","fetchCoupons","c","p$TopCampaigns","p$TopAccountKeyword","p$TopAccountSearchTerms","dataSource","getAuctionInsightDataSource","p$CompetitionTile","withDFMCache","p$ConversionTracking","fetchConversionTracking","fetchConversionTrackingData","p$TopChangesCampaign","fetchTopChanges","getPropsFromPreferenceForTopLocations","METRIC_OPTIONS","getPropsFromPreferenceForConversionTracking","preferenceService","getHeaderPropsFromPreferenceForConversionTracking","ConversionFilterOption","getPropsForRecommendations","getPreferenceDataObj","preferenceName","getPreferenceForDashboard","dashboardPreferenceKey","preferenceDataObj","getCardPreference","dashboardPreferenceObj","cardId","cards","card","getCardPreferenceOptions","setPreferenceForCard","cardOptions","preferenceForDashboard","preferenceForCard","newCards","_toConsumableArray","newPreferenceForDashboard","newPreferenceDataObj","_defineProperty","setAtAccountLevel","useIsPreferenceInitialized","_React$useState","React","_React$useState2","isInitialized","setIsInitialized","initialize","eventDispatcher","cardReady","this","perfMarkerCompleted","unblockCard","perfMarker","done","IsCardInViewPort","trigger","onCardReady","BaseCard","_DeterministicView","_this","_classCallCheck","deps","_callSuper","renderInSync","container","initPerfMarker","on","attached","finishedRender","call","blockCard","_inherits","_createClass","createChild","willInit","willRender","willFetchData","el","unblock","documentElement","contains","withUiBlock","CampaignSubType","patch","requestingHelp","$","click","helpers","updateView","callback","windowResizeHandler","wunderbarCallback","addEventListener","removeEventListener","off","_superPropGet","DeterministicView","TopChangesFilterSortOptionMap","ConversionFilterSortOptionMap","changeEvents","_len","attributes","Array","_key","attr","join","formatDate","date","year","getFullYear","month","getMonth","toString","padStart","day","getDate","getFilteredTotalsMetrics","data","raw","filteredTotals","unfilteredTotals","OverallTotals","DeviceSegmentedPerformanceData","SegmentedData","upperLevelNavigation","navigation","source","coerceStatus","status","AccountInactiveReasons","activityStatus","AccountUtils","entityHash","hash","typeName","adGroup","campaign","isSmartCampaign","pageContext","legacyRouter","CurrentAccount","getRouteUrl","account_id","campaign_id","adgroup_id","getEntityIds","adgroupId","saveToFilterStorage","entityType","text","createEditableFilterStorage","save","Text","$eq","navigateToEntity","event","instrumentation","constants","cardType","currentTarget","logMessage","LOGCATEGORY","TRACE","LOGLEVEL","INFO","button","ctrlKey","shiftKey","altKey","metaKey","rawStatus","returnValue","location","href","navigateToRoute","getLocalizedSupportLink","culture","Culture","toLowerCase","consultationLink","coachingLink","periodDurationIn","start","end","max","min","duration","diff","periodFit","availableGranularities","accountsMode","_period$comparativePe","comparativePeriod","hourlyStartDate","Date","setMonth","Infinity","push","getPopDescription","comparisonDateRange","comparisonDateRangeDateRangeText","comparisonText","rangeInDays","formattedStart","formattedEnd","comparisonDateRangeDescription","AppCampaignNewCampaignGridColumns","dynamic","isAppCampaign","isAllCampaigns","applyPartialConversionColumnName","IsAvgPositionDeprecationPhase2Enabled","Clicks","Impressions","CTR","AverageCPC","Spend","AveragePosition","TopImpressionRate","AbsoluteTopImpressionRate","Conversions","ConversionRate","CPA","AdvertiserReportedRevenue","RevenueOnAdSpend","Downloads","PostClickDownloadRate","CostPerDownload","FirstLaunches","PostClickFirstLaunchRate","CostPerFirstLaunch","Purchases","PostInstallPurchaseRate","CostPerPurchase","Subscriptions","PostInstallSubscriptionRate","CostPerSubscription","ConversionsCredit","PartialConversionRate","PartialConversionCPA","UIToMTMetricNameMap","metricSelect","isInsightsMetric","UIMetric","getInsightsMetric","allowedMetric","MTMetric","getInsightsMetricFilterOption","getUIMetrics","shouldExcludeAppMetrics","excludedMetrics","m","entitySchemaCopy","getflattenEntitySchema","schemaName","entitySchema","flattenEntitySchema","SearchTerm","addCampaignTypePropertyForFilter","Keyword","properties","AvailableInsightTypeIds","baseEntitySchemaForAvailableInsightTypeIds","AdGroup","AssetGroup","getMergedFilter","isFilterByInsights","filters","compact","_ref2$filter","_ref2$filter2","_ref2$filter2$value","updatedQuery","WaterfallFilterType","AdGroupStatus","CampaignStatus","Status","FilterEntity","$contains","availableInsightsTypeIdFilter","odata","fieldMap","buildNameToPropertyMapping","ignoreCase","custom","lambdaConvertForAvailableInsightTypeIds","mergedFilter","merge","odataOptions","getConversionGoalsFilterStore","FilterStorageFactory","featureName","filterEntityOptions","fetch","expand","orderBy","SegmentationTypes","select","extraPayload","disableCache","cacheManager","gridDataParameters","DateRange","StartDate","EndDate","ComparisonDateRange","parameters","odataV4","$top","$expand","$select","$filter","invalidate","millisecondsInDay","topChangesDefaultOptions","conversionDefaultOptions","getComparisonDateRange","timeRange","getTime","lastNDate","gridCardConfig","entityCount","isCompared","metricSelectUnserPermission","segmentationTypes","defaultOptions","directionIndex","shouldLoadShoppingTerms","isOverviewRequest","getColumnAndOrder","orderByValue","order","processGridTileOptions","OverviewPageFluentV2","OverviewPageFluent2","instrumentationLegacy","instrumentationConstants","availableMetrics","union","uniq","first","JSON","stringify","_ref5$options","_getColumnAndOrder","f","fetchEntityGridCombined","args","dfmCacheKey","getEntityGridOptions","_ref6$typeName","_orderBy","_orderBy$","columnOrder","processTopChangesMetric","getMetricConverter","_ref8","IsColumnConversionEnabled","ColumnConversion","IsPartialConversionsEnabled","PartialConversions","conversionPropertyMap","partialConversionPairs","patchMetric","_ref9","_ref9$permissions","_ref9$accountsMode","converter","patchMetrics","_ref10","_ref10$permissions","_ref10$metrics","_ref10$accountsMode","getTopChangesOptions","_ref11","_ref11$accountsMode","menuItem","selectedMetric","getConversionOptions","_ref12","allCardConfig","convertTopChangesOptions","_ref13","topChangesOrderBy","_ref13$accountsMode","_ref14","sortOption","getGranularityForConsolidatedCalls","_ref17","_ref17$accountsMode","_availableGranulariti","PerformanceChartGranularity","largerRange","_availableGranulariti3","getTilesFromConfigForConsolidatedCalls","_ref18","tiles","fetchMCCOverview","_ref19","allAccountsOrderBy","AccountsOverviewPrefetchQuery","isPreFetch","_ref19$accountsMode","_getEntityGridOptions","AllAccountsSortColumn","AllAccountsSortDirection","HasGlobalComparisonPeriod","_convertTopChangesOpt","TopChangedAccountsSortOption","TopChangedAccountsSortColumn","Tiles","allMetricsJoined","popMetrics","segmentSelect","tile","multiAccountOverviewParameters","Metrics","FetchFluctuationInsights","callParams","accountModes","UnifiedProductPhase2","PageReady","afterPageReady","postBody","parse","PostBody","serverPreloadParams","serverAccountModes","e","stack","fetchCampaignOverview","_ref20","allCampaignsOrderBy","conversionOrderBy","_getEntityGridOptions2","AllCampaignsSortColumn","AllCampaignsSortDirection","_convertTopChangesOpt2","TopChangedCampaignsSortOption","TopChangedCampaignsSortColumn","_convertOverviewConve","_ref15","_ref16","convertOverviewConversionsOptions","OverviewConversionsSortOption","OverviewConversionsSortColumn","campaignOverviewParameters","fetchCombinedPerformanceTimeSeries","_ref21","fetchSingleTile","errors","performanceTimeSeries","PerformanceTimeSeries","hideCurrency","AccountsHaveDifferentCurrencies","_ref22","_ref22$accountsMode","AllAccounts","AllCampaigns","_ref23","_getTopChangesOptions","TopChangedAccounts","TopChangedCampaigns","popOrderByMetric","_ref24","isDevice","_ref25","_getConversionOptions","ConversionTileResult","FAC_FEATUREID","FAC_STATUS_NOT_IN_PROGRESS","CCUIConstants","RecommendationAdoptionStatus","NotInProgess","FAC_STATUS_ACTIVE","Active","p$Coupons","FeatureAdoptionCoupon","coupons","FeatureId","catch","clearCouponsCache","locationGranularity","country","longitude","latitude","county","stateOrProvince","city","postalCode","mapMetric","mappedMetric","level","$makeCall","functionParams","Locale","ReportType","skip","startDate","endDate","fetchCountryData","fetchStateOrProvinceData","fetchCountyData","fetchCityData","fetchPostalCodeData","BoldSyntax","props","_jsx","ReactTemplate","model","b","children","template","StringsMapping","GoalCategory","AddToCart","BeginCheckout","BookAppointment","Contact","GetDirections","InStoreVisit","Other","OutboundClick","PageView","Purchase","RequestQuote","Signup","Subcribe","SubmitLeadForm","metrici18nKeys","CouponSetup","newI18n","coupon","cost","couponText","stepOneText","stepTwo","stepTwoText","_jsxs","className","defaultProps","useFetchCoupon","instrumentationLog","renderedWithData","CCBaseUrl","_pageContext$CurrentA","currencyCode","CurrencyCode","isDataLoaded","couponLocalized","_useState2$","setDataState","fetchDate","finally","formatCoupon","currency","response","Error","message","fetchCouponsMethod","useEffect","EmptyState","router","requiredPermission","titleString","subtitleString","actionString","_useFetchCoupon","hasCoupons","navigateToConversionGoals","SetUpConversionClicked","renderView","CouponIsShown","NoCoupon","Button","onClick","DefaultButton","PropTypes","i18nKey","GridIncreaseCell","item","rowClass","space","increaseSpace","bar","increaseBar","classNames","style","flex","GridDeclineCell","declineSpace","declineBar","GridNameCell","GoalCategoryFilterStore","nameCellData","category","isAccount","AccountActivityStatus","statusIcon","Errors","Deleted","Enabled","GridNameClicked","updateFilterAndRoute","title","hideToolTip","entity","KpiGrid","currentDate","compareDate","changeString","formattedValue","percentageValue","formattedPercentageValue","metricCurrent","formattedMetrics","metricCompared","formattedPeriodMetrics","GridHoverContainer","isGrid","isIncrease","comparisonStartDate","comparisonEndDate","hoverClassName","KpiColorClassName","GridPopCell","fromTo","GridRow","HoverContainer","ConversionTrackingGrid","processedData","metricName","s$i18n","property","emptyText","renderGridRows","currentRow","ErrorType","ClassName","Title","Message","PopupCallout","content","target","close","popoverId","right","getBoundingClientRect","placement","onMouseLeave","Callout","onClose","show","closeButton","view","CalloutWithLock","withLock","lockKey","keyVault","hoveringPopup","force","PopupContent","bodyText","_ref$goalNames","goalNames","goalList","marginTop","paddingInlineStart","marginBottom","goalName","textOverflow","overflow","seeAllText","Link","PopupContentNoRevenue","noRevenueText","to","number","TrackingTypeFilterStore","hoverCardStatus","setHoverCardStatus","SeeAllClicked","formattedNumber","titleText","statusText","MessageText","errorClassName","ref","useRef","current","onMouseEnter","renderLine","StatusOverview","noConversionGoalsWithRevenue","subtitle","alertText","alertNum","memo","GoalCount","Line","GoalTrackingStatus","GoalNames","ConversionTrackingFooter","pageNumber","setPageNumber","totalPageCount","manageGoalsText","pageCount","ManageConversionsClicked","_Fragment","Tooltip","relationship","icon","ChevronLeftRegular","appearance","disabled","ChevronRightRegular","IconButton","iconProps","iconName","ariaLabel","GridMetricPicker","updateMetric","showDropDown","setShowDropDown","_useState3","_useState4","setSelectedMetric","selectedMetricText","selectNewMetric","listItems","handleClickOutside","useOutsideAlerter","dropdownStyles","dropdown","width","border","boxShadow","outline","selectors","root","callout","caretDown","MetricPicker","handleChange","option","Dropdown","selectedKey","onChange","styles","GridHeader","popDescription","HelpButton","topic","GridPicker","ConversionTrackingState","categoryResults","statusSummaries","updateCurrentMenuItems","processedResults","metricFormatter","ERROR","maxChange","abs","formatMetric","PeriodPerformanceMetrics","Currency","ceil","i18nString","formatMetricWithSign","formatChangePercentageWithSign","fromValue","toValue","CampaignType","processGridData","renderContent","SetUpConversionTracking","ManageConversionsClick","ConversionTrackingCard","_React$Component","getMenuItems","currentMenuItems","isDataFetchRequired","prevState","prevDateRange","prevMenuItem","prevMetric","_this$state","isFetchSingleTile","isMenuItemNeeded","defaultMenuItems","action","preset","triggerChangeMenuItem","fetchTileData","_this$state2","setState","dataLoaded","handleUpdate","triggerChangeMetric","errorType","InstrumentationLog","displayText","prevProps","_this2","_this$state$data","ConversionGoalCategoryResults","ConversionGoalTrackingStatusSummaries","NoConversionGoalsExist","NoConversionGoalsWithRevenue","_this$state3","newMetric","layoutSize","getLayoutSize","$el","closest","outerWidth","conversionTileFetch","_ref2$fetchSingleTile","_BaseCard","viewRef","items","_this$getState","getState","sharedOptions","conversionGoalsFilterStore","HelpLink","display","tabIndex","ConversionTrackingCardReact","menuItems","replace","triggerPreferenceChange","newErrorTypeFilter","TrackingStatus","$in","newCategoryFilter","onResize","relayout","newLayoutSize","currentLayoutSize","addClass","removeClass","ReactDOM","useStyles","makeStyles","cardContent","height","paddingBottom","smallSizeCard","_ref2$accountsMode","_ref3$fetchSingleTile","ConversionTrackingCardFluent","withDelayedStyles","constructOptions","legacyI18n","perfMarkerUtils","classes","headerState","useHeaderStateContext","hideRangeColumn","selectedItemValue","setHidden","_ref$palette","palette","assign","getConversionTrackingCardStyle","metricPickerFluentV2Style","DeviceMetricView","ensureChildView","buttonTemplate","metricPickerButtonTemplate","pick","picked","html","getDeviceOrder","XandrVideoCampaigns","isXandrVideoAdsCampaign","getGraphLayoutSize","reLayoutGraph","currentGraphLayoutSize","isAggregatedMetric","reLayout","currentMetrics","child","String","SingleMetric","metricsWhenPick","_this$deps","actionButton","focus","segmentedPerformanceMetrics","performanceMetrics","formatOption","deviceType","segmentedData","Key","StringValue","segmentedPeriodData","segmentedChangePercentageData","periodData","periodPerformanceMetrics","changePercentageData","performanceMetricsChangePercentage","formattedData","formattedPeriodData","flexValue","formattedSegment","formattedHoverValue","percentage","formatPercent","maximumFractionDigits","minimumFractionDigits","periodValue","periodFlexValue","formattedPeriodSegment","formattedPeriodHoverValue","changePercentage","formattedChangePercentage","formattedChange","formattedDateRange","formattedPeriodDateRange","loaded","render","loadData","_this$getState2","_this$deps2","hasError","removed","dataFetched","renderTrunk","navigateToDevicesSetting","DeviceCard","_this3","_ref8$fetchSingleTile","_ref8$preexecuteFlag","preexecuteFlag","selectedMetrics","patchedMetrics","loadDataFunc","listenTo","showPopup","hidePopup","bind","$target","_this4","willRenderWithData","_this5","_this$deps3","isSmartShoppingCampaign","newState","formatCell","metricColumnTemplate","body","performanceMetricTemplate","sup","sub","showExtra","gridView","sortableMapping","titleMapping","columnHeaderMapping","sortableAttribute","metricColumn","bingadsGridColumn","_ref$PerformanceMetri","_ref$PerformanceMetri2","_ref$PerformanceMetri3","metricColumnProperty","sortable","colClasses","bodyClasses","headClasses","performanceMetricHeaderTemplate","nameColumn","isExperiment","MatchType","DeliveredMatchType","Added","SearchTermStatus","ExperimentId","nameText","keywordText","ids","added","matchingKeyword","searchTermStatus","nameTemplate","metricColumns","removeDropdown","remove","onClickDocument","evt","hoverContent","$viewport","scrollTop","offset","css","updatePopupPosition","getAllColumns","allMetricColumns","refetch","refresh","updateGridBody","sortableHeader","newSortableHeader","updateGridColumn","onGridSortableHeaderChange","changes","newDirection","newOderByColumn","newDirectionIndex","_this$getState3","CombinedCallEntity","getParentState","_this$getParentState","GridDataEntity","_this$getParentState2","DummyDataSource","totalCount","GridCardContent","parent","tileOptions","initialState","gridFactory","pgrid","vnext","use","a11yPlugin","placeholderPlugin","performanceLogPlugin","tableClasses","tableAttributes","plugins","a11y","performanceLog","appConfig","logger","placeholder","viewRoot","placeholderTemplate","templateOptions","events","stopPropagation","preventDefault","$metricPicker","currentMetric","dataset","isDropdownOpenfortheColumn","currentColumns","metricPickerTemplate","default","dropdownMenuTemplate","col","stateColumns","append","scrolling","virtualized","header","tableName","setupScrollBarCover","headerOption","firstRow","once","keyCode","Escape","viewport","viewportWidth","tableWidth","scrollBarWidth","scrollBarHeight","coverTemplate","marginRight","prepend","_this$child$getState","navigate","accountLevelRout","campaignLevelRout","accountMode","navigateToMainGrid","getSearchTermDetail","$link","adGroupName","matchType","setupMenuItems","onMenuAction","GridCard","buttonText","isCustomerLevel","_ref2$preexecuteFlag","adjustedMenuItem","Content","setChild","addKeywordView","updatePosition","addAsKeyword","addAsNegativeKeyword","AddKeywordView","gridCard","reloadGrid","_this6","CampaignAdgroupSelectorVnext","_DeterministicWrapper","selectedCampaign","selectedAdGroup","jsData","campaignAdgroupSelector","createCampaignAdGroupSelector","parentView","DeterministicWrapperView","setPosition","position","left","scrollLeft","updateSelectorPosition","$selector","$pageContainer","_$selector$offset","_$selector$offsetPare","offsetParent","parentTop","parentLeft","_$pageContainer$offse","pageContainerTop","pageContainerLeft","pageContainerHeight","pageContainerWidth","selectorSize","selectionLevel","clearError","errMsg","setupSelectorView","getChild","detachChild","campaignSelected","newCampaign","_this$getState4$level","adgroupSelected","newAdGroup","windowClickHandler","windowScrollHandler","scroll","errorHandler","i18nErrors","getODataErrors","getBulkApiErrors","_this$getState5","isEmpty","appendLearnMoreLink","hideOnClickOutSide","scopeContext","scopeService","negativeKeyword","NegativeKeywords","EntityType","CampaignId","AdGroupId","campaignEntity","NegativeKeyword","onSuccess","onError","keywordData","Bid","adapter","selected","cancel","apply","toggleSelector","updateEntityLevel","keywordTextChange","matchTypeChange","MetricToolTip","TooltipHost","Glyphicon","glyph","MetricToolTipBackBoneView","_Backbone$View","Backbone","_ref$template","defaultTemplate","_ref$buttonTemplate","defaultButtonTemplate","_ref$buttonTemplatePa","buttonTemplateParams","_ref$dropdownMenuTemp","defaultDropdownMenuTemplate","leftAlign","classList","toggleEl","SetUpContentForGlobalA11yAnnounceArea","_this$getState$perfor","performanceMetric","_this$getState$metric","metricValue","addInfo","tooltipView","DeterministicViewForBackBoneView","a11yAnnounceArea","textContent","setTimeout","overviewPanel","dashboardConfig","getDefaultConfig","defaultName","defaultDragAndDrop","defaultDebug","defaultDragHandlerSelector","layoutOptions","small","breakpoint","minCardSize","maxCardSize","defaultHeight","medium","large","toolbar","addCardButton","textKey","getWelcomeConfig","AddCardViewModel","allAvailableCards","updateFocusedIndex","getFirstFocusableIndex","firstSelectedIndex","ko","appliedClass","cssKey","firstFocusedIndex","allCards","cardsToAdd","pluck","difference","cardsToDelete","intersection","selectedTilesNumber","onThumbnailClicked","onKeyPress","Space","onFocus","globalLegacyI18n","saveAddCard","idsToAdd","viewModel","idsToDelete","cancelAddCard","getNextFocusedItemIndex","numOfCards","previousIndex","isNext","maxIndex","getAllAvailableCardElements","onKeyDown","allAvailableCardElements","ArrowDown","focusedIndex","ArrowUp","Home","End","AddCardView","_ref$selectedCards","_ref$newCardsConfig","newCardsConfig","conf","useNewI18n","addCardTitle","addCardTitleKey","desc","descKey","templateVNext","hide","welcomeCardConfig","titleKey","contentType","sizeOption","supportedWidth","getContentConstructor","contentConstructor","CardState","_Backbone$Model","preferences","instrumentationSettings","welcomeCardsConfig","_ref$accountsMode","_ref$isPrefetch","isPrefetch","customerIdType","useAdvertiserCustomerId","set","p$Initialized","quickInstrumentation","getQuickInstrumentation","getDashBoardPreferences","userWelcomePref","doneWithWelcomeTips","doNotShowWelcomeTips","WelcomeStatus","doneInitialLoad","ShowWelcomeTips","createdCampaign","HasCampaigns","skippedBothAtAccountCreation","skippedNoneAtAccountCreation","HasBIData","HasOtherAccounts","loadWelcomeTips","welcomeAttr","newOptions","loadDashBoardCards","cardGroup","getCardCategory","availableCards","defaultIn","savePreference","defaultOut","retiredCards","newDefaultInCards","newDefaultOutCards","newCardConfig","defaultCards","loadDashboardState","hiddenCards","setDashBoardPreferences","attribute","cardPref","dashboardPrefName","accountsDashboardPrefName","userWelcomePrefName","OverviewAsDefaultPrefName","newDefaultOutCardsAvailable","_ref$simpleFormat","simpleFormat","previousRange","views","Summary","bindDateFilterChangeHandler","dateRangeEquals","getPromise","newRange","leftOffsetUINext","leftOffsetMccUINext","dashboardTopUINext","cardMargin","subPageMarginsForUINext","newUIWidthPaddingsAndOffSet","getViewportCardCount","isMccLevel","topOffset","leftOffset","subPageMargins","availableWidth","layoutOption","optionKey","initialRowCount","rowSize","remainingRowCount","currentRowRemainingSpace","ex","i18nMappings","CardHolder_Toolbar_Close","CardHolder_Toolbar_Add","CardHolder_Toolbar_Refresh","CardHolder_Toolbar_Hide","CardHolder_Toolbar_Help","CardHolder_Toolbar_Enlarge","CardHolder_Toolbar_Shrink","CardHolder_Toolbar_SmallSize","CardHolder_Toolbar_MediumSize","CardHolder_Toolbar_LargeSize","CardHolder_Toolbar_Toggle","Loading","i18nGlobal","localInstrumentation","saveSelectedCardsState","orders","cardPanel","cardsOrder","cardMaps","cardState","contentReady","remainingViewportCards","ViewportCardCount","viewportCardsCount","pageIsReady","pageName","createCardContentInstance","otherOptions","cardCreationOptions","currentCard","clearDragAndDrop","setupDragAndDrop","scrollToAddCardView","addCardView","y","animate","showAddCardView","_ref$fromTile","fromTile","panelDecorator","AddCardPanel","panelClassName","panelReadyAriaLabel","closeAddCardPanel","eventsToActions","addCard","deleteCard","setUpAgents","dateFilterState","dateFilter","onDateFilterStateChanged","filterAgent","onFilterStateChanged","updateCardContent","_ref5$fetchSingleTile","_ref5$onMounted","onMounted","_this$cardState$getCa","getCardAttrByTypeId","getContentContainer","azure","azureUrlRewrite","savedStates","updateContent","Dashboard","_ref7$preexecuteFlag","buildLegacyI18n","p$CardState","dispatched","showNewTile","hideNewTileBannerClicked","gotoManagementTab","dispatchStateAsync","_this7","dispatchState","states","updateState","toolbarItems","ToolbarView","toolbarId","iconLeft","_this8","cardAttrsArray","_this8$cardState$getC","preDefinedMenuItems","CardPanel","dragAndDrop","debug","dragHandlerSelector","initialWidth","add","extend","showMenuIcon","silent","wunderbarState","setupFooter","originalOrder","newOrder","hideNewTileBanner","typeIds","loadCardsOutSizeViewPort","dismissOverviewFluctuationPopup","dismissPopupIfExist","getElementsByClassName","updatePreDefinedMenuItems","windowScrollLayout","topChangeCardScrollLayout","parentNode","windowEventHandler","_this9","cardAttrs","_this9$cardState$getC","_this10","delete","newFeatureTemplate","newTileDesc","title1Key","title2Key","newTileMsg","newTileBannerTemplate","newTileId","timeZoneId","footerContainer","accountTimeZoneText","footerTemplate","_this11","res","showTooMuchDataError","error","Code","warningContainer","managementLink","linkContent","warning","tooManyAccountTemplate","_this12","setupToolbar","setupCardPanel","p$ReadyState","spread","saveInitialState","setupNewTileNotice","setupTooManyAccountsWarning","_this13","scrollIntoView","behavior","DashboardPage","_ref$onMounted","_ref$preexecuteFlag","createDashboard","dashboard","isRemoved","recreateView","localScenarioMap","LoadOverviewPage","SCENARIONAME","ACTIVITYNAME","QualifiedVisitOverviewPageFromCampaign","SetOverviewPageAsDefault","AddTileToOverview","AddTileToOverviewFromPanel","RemoveTileFromOverview","ReorderTile","ResizeTile","FirstUse","RemoveRetiredTilesFromOverview","AddNewTilesToOverview","OverviewPageLoadData","msgs","startScenario","startActivity","msg","tipNames","importHelp","importVideo","broadMatchVideo","extaVideo","extaHelp1","extaHelp2","sitelinksMktg","sitelinksHelp","calloutsMktg","calloutsHelp","structSnipHelp","structSnipMktg","dsa","conversionTrackingVideo","remarketingTour","remarketingHelp1","remarketingVideo","remarketingHelp2","autoBidHelp","autoBidMktg","sharedBudgetsHelp","callMktg","callHelp","reviewsMktg","reviewsHelp","kWMatchTypeHelp","kWMatchTypeMktg","negKWHelp1","negKWHelp2","broadMatchHelp","ScheduledImportHelp","ReImportRSACampaigns","IncludeRSACampaigns","IncludeMultiAccountGoogleImport","ProvideStoreToImportShoppingCampaign","SelectAdCusFeedToImportEXTA","FacebookImport","UETCombineClarity","tipsConfig","tipName","description","helpLink","helpType","imgClass","isImportRelatedTip","_getEntityIds","fluctuationTypeIds","TopChangeGrid","showFluctuationPopup","triggerButton","nextSibling","_ref4$fluxtypeids","fluxtypeids","metricname","metrictext","cmid","selectedAccount","Number","CurrentCampaign","pageContextWithMetricRowInfo","context","createElementBasedFluctuationPopupFactory","imagePath","Token","canViewAllInsights","asyncLoadFluctuationConfig","fromScenario","onFlucDismiss","isLastFluc","getParent","dismissLastFluctuation","onDismiss","gridData","currentDateRangeText","comparisonDateRangeText","topChangesGridTemplate","getItems","loadErrorMsg","updateData","popText","popTextAriaLabel","dataError","updateMetricPicker","metricPickerChild","navigateToEntityGrid","bottom","gridWidth","TopChangesCard","_ref$fetchSingleTile","_ref$dismissLastFluct","patchedMetric","metricProcessed","initialMetric","_this3$deps","updateDataFunc","schedule","serialize","attrs","project","inlineChartData","Type","Version","deserialize","match","slice","InlineChartPreferences","store","pathConfig","preferenceServicePromise","definitions","InlineChart","defineResource","registerSubadapter","PreferencesSubadapter","Resource","inlineChart","where","record","keyRecord","path","inlineChartInfo","newinlineChartInfo","ChartLabel","_React$PureComponent","generateStyle","visibility","startLabelRef","endLabelRef","isShowStartDateLabel","chartLabelData","primaryStartDate","isShowEndDateLabel","primaryEndDate","isPopEnabled","MetricsPicker","renderSelectedItem","selectedItemDataDisplayClass","isPopOrMovingAvg","selectedItemPercentage","comparisonMetricDisplayClass","selectedItem","metricPickerAriaLabel","class","DropdownSelector","onSelect","onChangeHandler","renderItem","role","isFluctuation","dropdownMenuAriaLabel","enableArrowKeysSupport","shouldFocusFirstFocusableItemOnMount","GranularityPicker","allGranularities","ChartPanel","isMovingAverage","isMovingAverageVisible","vsString","showMovingAvgString","primaryMetric","metricsList","selectionChangeCallback","secondaryMetric","granularity","granularityList","htmlFor","checked","movingAverageChangeCallback","HelpPopup","Defaults","seriesColor","primary","original","comparative","secondary","uiNextTooltipPositioner","labelWidth","labelHeight","point","x","plotX","chart","plotWidth","plotY","plotHeight","ChartFormatter","getRawDate","getFormattedToolTip","chartAdapter","formatter","primaryPoints","comparisonPoints","tempHtml","points","series","userOptions","color","getToolTipValueHtml","divClass","isMovingAverageOn","getFormattedSeries","granularityId","entry","getFormattedHighChart","allData","tooltip","seriesColors","defaultSeriesColor","chartWidth","primaryMetricName","secondaryMetricName","seriesIndex","primarySeries","PrimaryData","ComparisonData","secondarySeries","yAxis","setSeriesMarker","positioner","sery","selectedSymbol","selectedDashStyle","isPrimary","marker","symbol","radius","fillColor","lineColor","lineWidth","dashStyle","ChartGranularityAdapter","gridName","lowestSupportedGranularity","getGranularitiesList","granularityMap","results","getGranularityItem","itemId","reconcileSelectedGranularity","preferredId","getLowestAvailableGranularityId","getGranularityIdFromEnum","enumVal","enumValue","getGranularityEnumFromId","setIsGranularityDisabled","isDisabled","getGranularityDateFormat","dateFormat","calculateDiff","timeDiff","calculateDisabled","dateDiff","updateAvailableGranularities","mainDateDiff","comparedDateDiff","now","hourlyOptionDisabled","dailyOptionDisabled","weeklyOptionDisabled","monthlyOptionDisabled","quarterlyOptionDisabled","datetime","skeleton","MetricNone","stringNaN","EventsID","VideoMetricColumns","ChartMetricsAdapter","getMetricsList","_ref$hasNone","hasNone","_ref$IsViewThroughCon","IsViewThroughConversionEnabled","_ref$IsAvgPositionDep","IsAvgPositionDeprecationPhase1Enabled","_ref$IsAvgPositionDep2","_ref$IsVideoAdsForCam","IsVideoAdsForCampaignEnabled","_ref$IsVideoMetricsIn","IsVideoMetricsInPerformanceChartEnabled","_ref$IsViewThroughCon2","IsViewThroughConversionsRevenueEnabled","_ref$dynamic","_ref$dynamic2","isCPSReportingEnabled","CPSReporting","InstallPerformanceColumns","IsConvValueRulesEnabled","ConvValueRules","_ref$metricsFilter","metricsFilter","_ref$customMetricName","customMetricNameList","currentEntity","customMetrics","metricsMap","rejectionPredicates","rejectedNames","reject","predicate","getMetricItem","getMetricNameFromId","getMetricIdFromName","getMetricFormatter","formatToInteger","formatDecimal","formatTo2Digits","formatThousandthTo2Digits","formatTo2DigitsPercent","formatCurrency","ChartDataAdapter","_ref2$permissions","getChartTitle","currentLevel","getNoDataText","getFirstDataItem","isPrimaryDataAvailable","dataItem","primaryDataItem","isComparisonDataAvailable","comparisonDataItem","getChartLabel","firstDataItem","xAxisStartDate","xAxisEndDate","getLastAvailableDate","xAxisCompareStartDate","xAxisCompareEndDate","getPrimaryMetricsList","permission","metricsAdapter","getSecondaryMetricsList","getMetricName","getGranularitySelection","granularityAdapter","getGranularityEnum","getPreferencesAndDefaults","getInlineChartInfo","preferenceObject","showChartPref","CurrentTabId","showMovingAverageInPref","granularityEnumInPref","granularityIdInPref","primaryIdInPref","primaryMetricPrefKey","secondaryIdInPref","secondaryMetricPrefKey","showChart","showMovingAverage","primaryMetricId","secondaryMetricId","reevaluateGranularity","preferredGranularityId","prepareData","rawData","ret","metricId","MetricName","convertData","isPrimaryData","utcPoint","DateTime","substring","dateTime","Value","PrimaryDataPoints","ComparisonDataPoints","transformChartPoints","alignDataForComparison","dataSet","keys","metricData","shortermetricData","longermetricData","diff1","dayAfter","dayInMillisec","primaryDataDateDiff","comparisonDataDateDiff","timestamp","dateParser","dateFormatters","dateFormatter","isDateRangeChanged","date1","date2","getMetricsQuery","primaryMetricSelectionId","secondaryMetricSelectionId","inlineChartColumnMerticsEnabled","formatPreferenceValue","preferenceValue","movingAverage","Granularity","MovingAverage","InlineChartColumnMerticsEnabled","metricsMapIdIndex","metricsMapNameIndex","srcMetricId","srcMetricName","targetMetricName","FluctuationBulb","bulbElem","divStyle","_this$props","isRed","isYellow","balloonClass","balloonPic","instrumentationSchema","getFluctuationType","FluctuationType","FluctuationTypeKey","Impression","Click","Conv","FluctuationPanel","onChartUpdated","initializeInstrumentation","inlineChartScenario","activities","chartActionActivity","inlineChartAction","chartErrorActivity","inlineChartError","isTwoRectOverlapping","elem1","elem2","hideChartLabelIfApplicable","chartLabelRef","bulbClientRect","isBulbOverlappingWithStart","isBulbOverlappingWithEnd","startDateRect","lastDateRect","isStartAvail","isEndAvail","logContext","fluctuations","forEach","fluc","logObject","fluxId","UniqueId","PrimaryMetricId","SecondaryMetricId","eventType","fluxContent","actions","Actions","flatten","rootCauses","RootCauses","Description","fluxDate","fluxKpi","userId","isInternal","IsInternal","CustomerId","AccountId","trace","chartDataAdapter","Permissions","bulbRefArr","openedFlucId","finalStartAvail","finalEndAvail","_this2$hideChartLabel","chartLabelStatus","onChartLabelToggle","flucPlaceholders","FluctuationsPerDate","idx","formattedDate","clientX","plotLeft","bulbWidth","isRCUnknown","MessageId","imageSrc","line","isOpen","FluctuationPopup","withoutOpporCheck","updateFlucData","updateLoadingStatus","fluctuation","onFlucOpen","flucId","flucPage","onPrimaryMetricChange","page","highchartsStyle","plotOptions","dataLabels","enableMouseTracking","xAxis","crosshair","showFirstLabel","showLastLabel","visible","labels","tickLength","tickPixelInterval","gridLineDashStyle","opposite","backgroundColor","borderRadius","borderColor","borderWidth","useHTML","shared","shadow","valueDecimals","spacingTop","spacingLeft","spacingRight","spacingBottom","legend","credits","highchartsStyleVNextOverride","InlineChartInternal","onDateChangeHandler","newDateRange","actionPerfMarker","isActiveChild","selectedGranularityId","granularitySelectionId","isDataAvailable","onResizeWindow","newWidth","isOuterContainerInitialized","inlineChartContainer","parseFloat","resizeEventHandler","resizeChart","selection","saveToPrefrenceStore","fetchPerformanceData","formattedOptions","getFormattedChartOptions","formattedHighChartOptions","onSecondaryMetricChange","onGranularityChange","granularityEnum","gridDataSource","fetchPerformanceAndFluctuation","onMovingAverageChange","isMovingAverageEnabled","onToggleLabel","onChartRendered","isFluctuationsEnabled","isFilterActive","fluctuationProm","chartMarginRight","panelRef","chartFormatter","isFlucRenderNotRequired","flucData","isDone","highChartData","chartData","getFluctuationMetric","flucType","Conversion","filterActivity","inlineChartFilter","useGridData","loading","isLoading","popEnabled","refreshGridData","getMetricsName","filterQuery","metric1","metric2","successCallback","canceled","chartLabel","errorCallback","errorResult","onLoading","getChartData","updateChartData","dismissFluc","flucItem","logSummary","metricRecommend","recommendMetricSelectionId","generateFlucData","timeWithoutTimezone","availableFlucMetrics","FluctuationList","FluctuationId","cause","flucMetricId","setFluctuationFlag","addDateChangeListener","resizeChartListener","getFilteredCampaignTypeFromRawFilter","CurrentGridName","isPendingFetch","DynamicPermissions","_permissions$dynamic","FluctuationsWithoutRecCheck","isShowChart","primaryMetricPercentage","secondaryMetricPercentage","noChartText","fluctuationLoading","currentTab","gridCriterionType","getMetricFilters","CPSAndInstallMetrics","fitlerMetrics","uniqueFilterMetrics","primaryMetricsList","secondaryMetricsList","pageState","normalizedPreferences","normalizeWithAvailable","newProps","toggleChartState","isFilterChanged","isCustomFilterChanged","customFilter","noDataOrLoading","dangerouslySetInnerHTML","__html","chartLabelComponent","HighchartReactWrapper","onChartRenderedCallback","fluxMetrics","setSize","showChartState","defaultPrimaryMetric","disableMovingAverage","suffix","prefObj","setInlineChartInfo","oldFilter","newFilter","CurrentAdGroup","proceedFluctuation","flucServiceIns","FlucService","fluctuationService","formatDateString","surfacingChannelId","isFluctuationsExperiementEnabled","onFetchPerfData","fetchFluctuation","dateStr","leftPadding","s","dt","primarySelection","secondarySelection","granularitySelection","getChartElement","granularityOptions","flucPanelEnabled","primaryMetricOptions","secondaryMetricOptions","UiBlocker","blocking","loadingText","blockUiContainer","blockerIndicator","hideChartPanel","chartTitle","r","withGlobalFilter","CircleSolidSmall","DiamondSolidSmall","TriangleDownSolidSmall","TriangleUpSolidSmall","SquareSolidSmall","getFluctuationPopupStyle","getFluctuationLoadingStyle","flexDirection","convertToLocalStyle","helpbuttonStyle","backgroundImage","couponStepOneImg","couponStepTwoImg","minHeight","justifyContent","fontSize","fontWeight","textAlign","fontFamily","fontStyle","alignItems","backgroundRepeat","backgroundPosition","backgroundSize","conversionTrackingSetupImg","flexWrap","justifyItems","alignContent","borderBottom","margin","neutralSecondary","marginLeft","overflowY","overflowX","alignSelf","gridTemplateColumns","gridRow","borderTop","neutralLighter","gridColumn","borderRight","paddingLeft","paddingRight","whiteSpace","padding","themePrimary","neutralPrimary","paddingTop","background","zIndex","backdropFilter","wordBreak","maxWidth","white","black","textShadow","themeDarker","lineHeight","fallbacks","backgroundPatten","computerColor","tabletColor","smartPhoneColor","connectedTVColor","getDeviceCardStyle","gridTemplateRows","gridColumnStart","borderLeft","computerIcon","smartphoneIcon","tabletIcon","connectedTVIcon","getGridCardStyle","neutralQuaternaryAlt","flexShrink","tableLayout","verticalAlign","cursor","outlineOffset","neutralTertiaryAlt","neutralSecondaryAlt","metricPickerStyle","getPerformanceCardStyle","borderStyle","circleSolid","circleDotted","diamondSolid","diamondDotted","triangleDownSolid","triangleDownDotted","triangleUpSolid","triangleUpDotted","metricPickerBorderColor","getMetricPickerBorderStyle","getPerformanceCardFluentV2Style","flexBasis","gap","getPerformanceGraphStyle","opacity","couponColor","couponFlag","tagHeight","boxSizing","getDefaultTipCardStyle","clip","textDecoration","underlineLinkStyle","elementLocator","couponFlyout","transform","pointerEvents","getTipCardStyle","MsGridRow","img","maxHeight","blue","crudAdStyle","forcedColorAdjust","googleImportImg","broadMatchModifierImg","expandedTextAdsImg","sitelinkExtensionsImg","calloutExtensionsImg","structuredSnippetsImg","dynamicSearchAdsImg","convTrackingImg","remarketingImg","enhancedCpcAutobidImg","sharedBudgetsImg","callImg","reviewExtentionsImg","kwMatchTypesImg","negKeywordsImg","microsoftLogoImg","createCampaignImg","welcomeCoachingImg","welcomeCouponImg","welcomeAddPaymentImg","welcomeHelpImg","addNewAdsImg","remarketingBidImg","locationBidImg","addNewKeywordImg","keywordBidImg","googleAdImportImg","sitelinkExtensionImg","calloutExtensionImg","budgetOppoImg","kwBroadMatchImg","kwBroadMatchModifierImg","firstpageOppoImg","mainlineOppoImg","firstPositionImg","competitiveBidImg","adSchedulingImg","tokens","colorStatusWarningForeground1","getTipCardFluentV2Style","transition","backfaceVisibility","perspective","getTopChangeCardStyle","getTopLocationCardStyle","getTopLocationCardFluentV2Style","IsRenameHotelToLodgingEnabled","campaignPageGroups","noExpandGroups","DetailListPageMenuWithSiteMap","withCampaignSiteMap","DetailListPageMenu","processorSet","all","processor","processPmaxCampaignPageMenu","processPmaxRetailCampaignPageMenu","Loader","siteMap","updateAvailability","others","_objectWithoutProperties","_excluded","selectedParent","isVisible","Scenario","Activity","pageGroups","assetsDetailSiteMap","Configs","standaloneSiteMap","campaignWithAssetsSiteMap","campaignSiteMap","CampaignPageMenuLoader","withSiteMap","accountsPageGroups","PageMenu","processors","processPermissions","processPath","processScope","AccountsPageMenuLoader","withAccountsSiteMap","bulkOperationPageGroups","BulkOperationPageMenuLoader","withToolsSiteMap","businessDataPageGroups","shouldRenderParentNodeAsLink","BusinessDataPageMenuLoader","idsToHideSelf","idsToHideChildren","available","changeLayout","menu","hotelCenterMenu","prunedSitemap","sitemap","hideSelfIdsArray","pruneNode","node","ids2","pruneSitemap","TreeMenu","HotelCenterPageMenuLoader","withHotelCenterSiteMap","withHotelCenterV2SiteMap","hotelCenterV2PageGroups","HotelCenterV2PageMenuLoader","merchantCenterPageGroups","merchantCenterPageGroupsWithoutImport","IsDomesticSimplifiedChineseEnabled","MerchantCenterPageMenuLoader","bidStrategiesPageGroups","BidStrategiesPageMenuLoader","withBidStrategiesSiteMap","UetTagsPageMenu","UetPageMenuLoader","ASSETS_MENU_ID","PERFORMANCE_MENU_ID","assetLibraryPageGroups","mode","rest","_ref2$children","assetLibrarySiteMap","renderItemIcon","AssetLibraryIcon","collapsed","AssetLibraryPageMenuLoader","PageMenuContainer","ElementSelector","fallback","CampaignPageMenuPlaceholder","getPathName","pageItem","route","mapToPageItems","defaultLandingPage","isFallbackSelected","isSelected","isPageEnabled","isDefaultLandingPage","defaultLandingPageTooltipText","curlyTemplate","showTag","tagClass","scopeV2","getPageItems","group","newItems","divider","getTrimmedParams","searchObj","queryString","history","search","ScopeV2","trimToScope","getPageItemUrl","trimmedParams","sort","getTrimmedQuery","getFlattenedItems","limitLevel","reduce","flattenedItems","fillGroupCount","groups","newgroup","sum","fillGroupStartIndex","startIndex","si","fillSelectedAndCollapse","falttenedItems","selectedIndex","newChildren","isCollapsed","getGroupsForDetailList","groupsResult","keyId","getPageMenuItemStyles","pageMenuItem","baseMenuItem","neutralLight","notEnabledPageMenuItem","selectedPageMenuItem","themeLighter","themeLight","notEnabledSelectedPageMenuItem","beforeIcon","textContainer","iconContainer","fallbackGlyph","float","calloutTargetContainer","selectedLandingPage","notSelectedLandingPage","landingPageButton","menuItemTagContainer","relationLine","LandingPageSelector","activeGlyphicon","pageId","setLandingPage","classNamesArray","OverlayTrigger","overlay","submitEvent","withPermissions","withDefaultStyles","getPageMenuItemText","PageMenuItemText","pageItemUrl","showLabel","StyledMenuItemTag","tagContent","PageMenuItem","_ref2$pageItemUrl","_ref2$withRelationLin","withRelationLine","_ref2$showLabel","_ref2$renderIcon","renderIcon","_ref2$collapsed","classNameArray","withFallbackCallout","selectedPageItem","signal","selectedFallbackPageItem","onTabNext","Tab","setLandingPageButton","isSetLandingPageButtonFocused","focusFirstButtonOnSubPageMenu","onBlur","firstButtonOnSubPageMenu","handleFallbackCalloutClose","renderDivider","_this$props2","pageMenuClassName","pageMenuContainer","collapsedPageMenuContainer","pageItems","ListSelector","fallbackSiteMapId","fallbackTitle","fallbackShow","fallbackHandleClose","extraData","ariaRole","AriaRoleType","List","StyledPageMenu","withActivityContext","withI18nConsumer","pageMenu","DefaultLandingPage","markAction","campaignPageMenuPerfMarker","appPerfMarker","PageMenuWithDefaultLandingPage","withDefaultLandingPage","fieldName","DetailListPageMenuInternal","isTeachingBubbleVisible","setIsTeachingBubbleVisible","campaignTypeQuery","RSAAutoGeneratedTeachingBubble","useContext","ActivityContext","singleItems","parentId","getSingleItems","iconExpandLabel","iconCollapseLabel","isFromHeader","Enter","setClarityTag","onToggleCollapse","listprops","onGroupHeaderclick","leftNavigationStyle","DetailsList","groupProps","onRenderHeader","iconLabel","isSettingBannerExist","offsetHeight","MarketName","HelpModel","language","split","pageMenuGroupHeader","pageMenuSelectedGroupHeader","pageMenuGroupHeaderIcon","pageMenuGroupHeaderDownIcon","pageMenuGroupHeaderContent","TeachingBubble","onDone","open","primaryButtonText","targetElement","directionalHint","DirectionalHint","rightBottomEdge","pageMenuSingleItemGroupHeader","selectionMode","SelectionMode","none","isHeaderVisible","onRenderItemColumn","singleItem","onRenderRow","rowProps","DetailsRow","pageMenuRow","isPlaceholderData","indentWidth","headerWrapper","contentWrapper","listProps","list","isPortfolioBidStrategyEnabled","isBroadOnlyEnabled","isPredictiveMatchingEnabled","showExperiment","IsExperimentsEnabled","KeywordStatusColumn","KeywordColumn","CampaignColumn","AdGroupColumn","BidStrategyNameColumn","BidStrategyTypeColumn","BidColumn","MatchTypeColumn","DeliveryColumn","QualityScoreColumn","LandingPageColumn","CustomParametersColumn","TrackingTemplateColumn","FinalUrlSuffixColumn","Param1Column","Param2Column","Param3Column","FirstPageBidEstimationColumn","MainlineBidEstimationColumn","BestPositionBidEstimationColumn","KeywordIdColumn","LabelsColumn","getLockedColumns","getSelectedColumns","RSAAdCustomizerAttributesColumn","getColumnsMap","baseColumns","baseRawBIColumns","generateBaseBIColumns","getListOfRawBIColumns","mockI18n","enum","enumMappedString","enumDescription","valueDescription","parseInt","i18nCache","legacyGlobalI18n","schemaI18nCampaign","getFilterConfig","cachedEntitySchema","restParams","filterConfig","getCommonFilterConfig","editor","searchbox","searchProperty","searchOperator","maxLength","globalConfig","enableCampaignWaterfall","enableEditorialRejectionFilter","enableAdGroupWaterfall","selector","removable","defaultValue","editorialRejectionFlagId","EditorialRejectionFlagId","localized","getLocalizedEditorialRejectionReasons","refreshCampaignCache","isOdataActionSource","getDataSourceConfig","gridNameSource","logActivity","_Permissions$dynamic","KeywordsCombineGridAndChartOdataCallEnabled","initialQuery","nullifynotapplybidamounts","getGridDataParams","scopeAdapter","unset","edmEntity","currentAdGroup","existingDataSource","filterService","KeywordsFilterImprovementEnabled","primaryKey","cacheResponse","useDfmCache","headers","DataSourceStore","cacheService","sessionStore","customColumnPreference","preferenceStoreFactory","dataContextManager","FilterService","queryBuilder","decorators","columnsMap","defaultColumns","lockedColumns","addPoPColumnsOnComparisonEnabled","customColumnsEnabled","IsCustomColumnsInCampaignsSupported","comparisonPoPColumns","defaultPageSize","inlineChartPreference","legacyPreferenceService","commonConfig","appState","ColumnChooserPreference","CustomColumnPreference","SegmentationPreference","fetchPaginationConfig","fetchSortInfo","columnConversions","getColumnsConversionMap","getDataSource","dataFetchConfig","QueryBuilderFactory","make","queryErrors","QueryErrorFactory","connect","cacheableObjects","pug","module","exports","locals","pug_interp","pug_html","pug_mixins","locals_for_with","block","escape","nameCell","excluded","AccountInactiveCauseValue","kpiData","dateRangeText","$$obj","$$l","columnClass","pug_index0","metricIndex","barClass","kpiClasses","increase","keywordType","linkType","menuClass","linkText","label"],"sourceRoot":""}