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B3B,EAAM,CACR,IAAQrT,EAAqBqT,EAArBrT,OAAQ0V,EAAarC,EAAbqC,SAEhB,GAAe,cAAX1V,EACFyV,IACAX,EAAQY,QACH,GAAe,WAAX1V,GAAkC,gBAAXA,EAA0B,CAC1DyV,IAEA,IAAIE,EAAevE,EAAK4C,UAAU,8BAhER,OAiEtB0B,GAhEwB,+BAiEvBA,IACHC,EAAevE,EAAK4C,UAAU,yCAEhCe,EAAO,IAAIjM,MAAM6M,GACnB,CACF,CACF,IAEAT,EAAcM,GAAG,SAAS,SAAAjV,GAA0C,IAADqV,EAAArV,EAAtCqT,MAAOiC,OAAU,IAAAD,EAAG,IAAI9M,MAAO8M,EAxE9B,IAyE5BZ,GAA0B,KAExBE,EAAcG,OACdN,EAAOc,GAEX,IAEAX,EAAcY,OAChB,GACF,CFhBaC,CAAsB,CAC3BrB,oBAAqBvC,EACrBf,KAAAA,EACAE,YAAAA,EACAD,MAAAA,EACAN,eAAAA,EACA4B,gBAAiBI,EAAKJ,kBACrBqD,SAAQ,kBAAMxE,EAAYyE,QAAQlD,EAAKD,QAAQ,IAC/CwB,MAAK,SAAA4B,GAAS,OAAItE,EAAgBuE,SAASD,EAAWE,IAAIF,GAAWG,UAAS,GAAM,IACpFC,MAAMvD,EAAKR,mBAChB,GACF,GAEA,CAAA1P,IAAA,kBAAA2M,MAKA,SAAe7G,GAAc,IAAX4N,EAAM5N,EAAN4N,OAChB,MAAO,CACL,qBAAsB1D,KAAKf,KAAKb,aAAauF,aAAa,CACxDC,QAAS,QACTC,SAAUH,KACN,MAEV,GAEA,CAAA1T,IAAA,eAAA2M,MAKA,SAAavK,GAQX,MAAO,CAAE0R,WAPUhgB,IAAAA,SAAWsO,EAAS,CACrC,cAAe,4BACf2R,WAAY,KACZC,KAAM,GACNC,kBAAmB,YAIvB,IAAC,CA7G4C,E","sources":["../../../../inline-download/packages/inline-download-grids-metadata/src/defaults/default-columns.js","../../../../inline-download/packages/inline-download-grids-metadata/src/defaults/get-default-name.js","../../../../inline-download/packages/inline-download-grids-metadata/src/util/query-string.js","../../../../inline-download/packages/inline-download-grids-metadata/src/defaults/get-default-filter.js","../../../../inline-download/packages/inline-download-grids-metadata/src/util/get-level.js","../../../../inline-download/packages/inline-download-grids-metadata/src/defaults/get-default-route.js","../../../../inline-download/packages/inline-download-grids-metadata/src/defaults/default-column-conversions.js","../../../../inline-download/packages/inline-download-grids-metadata/src/util/map-to-object.js","../../../../inline-download/packages/inline-download-grids-metadata/src/common-columns/performance-metrics-columns.js","../../../../inline-download/packages/inline-download-grids-metadata/src/common-columns/legacy-sov-columns.js","../../../../inline-download/packages/inline-download-grids-metadata/src/common-columns/sov-lost-columns.js","../../../../inline-download/packages/inline-download-grids-metadata/src/common-columns/audience-sov-columns.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/account.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/ad-extension-association.js","../../../../inline-download/packages/inline-download-grids-metadata/src/common-columns/phone-performance-metrics-columns.js","../../../../inline-download/packages/inline-download-grids-metadata/src/common-columns/sov-columns.js","../../../../inline-download/packages/inline-download-grids-metadata/src/common-columns/quality-score-columns.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/ad-group.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/ad-group-audience-association.js","../../../../inline-download/packages/inline-download-grids-metadata/src/util/setting-mainstream-grids.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/ad-group-criterion.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/ad.js","../../../../inline-download/packages/inline-download-grids-metadata/src/util/dimension-grids.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/age-and-gender.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/asset-link.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/asset-with-bi-data.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/audience-association.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/automated-extension.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/budget.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/call-forwarding-detail.js","../../../../inline-download/packages/inline-download-grids-metadata/src/common-columns/app-performance-metrics-columns.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/campaign.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/campaign-criterion.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/change-history-detail-report.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/destination-url.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/dimension-row.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/domain-category.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/dsa-search-term.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/dsa-target.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/geographic.js","../../../../inline-download/packages/inline-download-grids-metadata/src/common-columns/hotel-metrics-columns.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/hotel.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/hotel-group.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/keyword.js","../../../../inline-download/packages/inline-download-grids-metadata/src/util/setting-negative-grids.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/negative-ad-group-criterion.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/negative-ad-group-dsa-target.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/negative-campaign-criterion.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/negative-campaign-dsa-target.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/portfolio-bid-strategy.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/product-group.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/publisher-website.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/search-term.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/search-terms.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/responsive-search-ad-instance.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/shopping-brand.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/shopping-category.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/shopping-item-id.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/shopping-product-type.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/shopping-store-id.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/sub-account.js","../../../../inline-download/packages/inline-download-grids-metadata/src/common-columns/dimension-sov-columns.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/time-date.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/time-day-of-week.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/time-hour-of-day.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/time-month.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/time-quarter.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/time-week.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/time-year.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids/user-locations.js","../../../../inline-download/packages/inline-download-grids-metadata/src/all-grids-metadata.js","../../../../inline-download/packages/inline-download-grids-metadata/src/grids-metadata.js","../../../../inline-download/packages/inline-download-grids-metadata/src/util/fill-route.js","../../../../inline-download/packages/inline-download-report-data-repository/index.js","../../../../inline-download/packages/inline-download-report-data-repository/src/create-inline-download-report-data-repository.js","../../../../inline-download/packages/inline-download-repository-core/src/get-url-with-scope.js","../../../../inline-download/packages/inline-download-report-data-repository/src/inline-download-report-data-repository.js","../../../../inline-download/packages/inline-download-repository-core/src/convert-server-side-errors.js","../../../../inline-download/packages/inline-download-repository-core/src/poll-task-item-execution.js"],"sourcesContent":["export default {};\r\n","import { underscored } from 'underscore.string';\r\n\r\nexport default function getDefaultName(entity) {\r\n return `summary_tab_${underscored(entity)}`;\r\n}\r\n","import { parse } from 'odata-v4-filter-parser';\r\nimport _ from 'underscore';\r\nimport { startsWith } from 'underscore.string';\r\n\r\nexport function getQueryPart(queryString, partPrefix) {\r\n const part = _.find(queryString.split('&'), frag => startsWith(frag, partPrefix));\r\n\r\n return part ? part.substr(partPrefix.length) : null;\r\n}\r\n\r\nconst selectPrefix = '$select=';\r\n\r\nexport function getPropertiesFromQueryString(queryString) {\r\n return getQueryPart(queryString, selectPrefix)\r\n .split(',');\r\n}\r\n\r\nconst filterPrefix = '$filter=';\r\nexport function getFilterFromQueryString(queryString) {\r\n const filterPart = getQueryPart(queryString, filterPrefix);\r\n\r\n return filterPart ?\r\n parse(decodeURIComponent(filterPart)) :\r\n null;\r\n}\r\n","import { getFilterFromQueryString } from '../util/query-string';\r\n\r\nexport default function getDefaultFilter(entity, { QueryString }) {\r\n return getFilterFromQueryString(QueryString);\r\n}\r\n","export default function getLevel({\r\n CampaignId,\r\n AdGroupId,\r\n}) {\r\n if (AdGroupId) {\r\n return 'AdGroup';\r\n } else if (CampaignId) {\r\n return 'Campaign';\r\n }\r\n\r\n return 'Account'; // TODO: for AccountsSummary\r\n}\r\n","import getLevel from '../util/get-level';\r\n\r\nfunction getDefaultRoutes(entity) {\r\n const lowerCased = entity.toLowerCase();\r\n\r\n return {\r\n Customer: `customer/:customer_id/${lowerCased}`,\r\n Account: `customer/:customer_id/account/:account_id/${lowerCased}`,\r\n Campaign: `customer/:customer_id/account/:account_id/campaign/:campaign_id/${lowerCased}`,\r\n AdGroup: `customer/:customer_id/account/:account_id/campaign/:campaign_id/adgroup/:adgroup_id/${lowerCased}`,\r\n };\r\n}\r\n\r\n\r\nexport default function getDefaultRoute(entity, {\r\n CampaignId,\r\n AdGroupId,\r\n}) {\r\n const level = getLevel({\r\n CampaignId,\r\n AdGroupId,\r\n });\r\n\r\n return getDefaultRoutes(entity)[level];\r\n}\r\n\r\nconst constants = {\r\n Complex: 'Complex',\r\n Deleted: 'Deleted',\r\n};\r\n\r\nfunction entityToPath(entity, serverContext = {}) {\r\n const { DynamicPermissions = {} } = serverContext;\r\n const entityPathMap = {\r\n Account: 'accounts/performance',\r\n Ad: 'ads',\r\n AdExtensionAssociation: constants.Complex,\r\n AdGroup: 'adgroups',\r\n AdGroupAudienceAssociation: 'audiences',\r\n AdGroupCriterion: constants.Complex,\r\n // The blank suffix is by design, see dimension/grid/ageGender/ageGender-grid-config.es\r\n 'AgeAndGender ': 'reports-v4/create/ageandgenderreport',\r\n AssetLink: 'assets',\r\n AssetWithBIData: 'assets-report',\r\n AudienceAssociation: 'audiences',\r\n AutomatedExtension: 'extensions/automated',\r\n Budget: 'sharedbudgets',\r\n CallForwardingDetail: 'reports-v4/create/callforwarddetailreport',\r\n Campaign: 'campaigns',\r\n CampaignCriterion: constants.Complex,\r\n ChangeHistoryDetailReport: 'changehistory',\r\n DestinationUrl: 'landingpages',\r\n DimensionRow: constants.Complex,\r\n DomainCategory: constants.Deleted, // DSA category page is removed in new UI\r\n DsaSearchTerm: 'dynamicadtargets/searchterms',\r\n DsaTarget: 'dynamicadtargets/targets',\r\n Folder: 'assetlibrary/performance',\r\n Geographic: 'geographicreport',\r\n Hotel: 'hotelcenter/overview/hotelidgrid',\r\n HotelGroup: 'hotelcenter/overview/hotelgroupgrid',\r\n Keyword: 'keywords',\r\n NegativeAdGroupCriterion: constants.Complex,\r\n NegativeAdGroupDsaTarget: 'dynamicadtargets/negative/adgroup',\r\n NegativeCampaignCriterion: constants.Complex,\r\n NegativeCampaignDsaTarget: 'dynamicadtargets/negative/campaign',\r\n PortfolioBidStrategy: DynamicPermissions.DataExclusions ? 'bidstrategies/portfoliobidstrategy' : 'portfoliobidstrategy',\r\n ProductGroup: constants.Complex,\r\n PublisherWebsite: 'reports-v4/create/weburlreport',\r\n ResponsiveSearchAdInstance: 'combinations',\r\n SearchTerm: 'searchterms',\r\n SearchTerms: 'reports-v4/create/searchtermreport',\r\n ShoppingBrand: 'reports-v4/create/productdimensionreport',\r\n ShoppingCategory: 'reports-v4/create/productdimensionreport',\r\n ShoppingItemId: 'reports-v4/create/productdimensionreport',\r\n ShoppingProductType: 'reports-v4/create/productdimensionreport',\r\n ShoppingStoreId: 'reports-v4/create/productdimensionreport',\r\n SubAccount: 'hotelcenter/overview/hotelsubaccountgrid',\r\n TimeDate: 'adscheduledate',\r\n TimeDayOfWeek: 'adscheduleday',\r\n TimeHourOfDay: 'adschedulehour',\r\n TimeMonth: 'adschedulemonth',\r\n TimeQuarter: 'adschedulequarter',\r\n TimeWeek: 'adscheduleweek',\r\n TimeYear: 'adscheduleyear',\r\n UserLocations: 'userlocationreport',\r\n };\r\n return entityPathMap[entity];\r\n}\r\n\r\n\r\nexport function getDefaultRouteForNewUI({\r\n getUrlSearch,\r\n entity,\r\n selection: {\r\n CampaignId,\r\n AdGroupId,\r\n AdId,\r\n },\r\n serverContext,\r\n}) {\r\n const path = entityToPath(entity, serverContext);\r\n const search = getUrlSearch({\r\n campaignId: CampaignId,\r\n adGroupId: AdGroupId,\r\n adId: AdId,\r\n entity,\r\n });\r\n\r\n return `${path}${search}`;\r\n}\r\n\r\n","const partialConversionColumnNamePairs = {\r\n // Old column : New column\r\n Conversions: 'ConversionsCredit',\r\n CPA: 'PartialConversionCPA',\r\n ConversionRate: 'PartialConversionRate',\r\n AllConversionCPA: 'AllPartialConversionCPA',\r\n AllConversions: 'AllConversionsCredit',\r\n AllConversionRate: 'AllPartialConversionRate',\r\n ViewThroughConversionsCPA: 'ViewThroughPartialConversionsCPA',\r\n ViewThroughConversionsRate: 'ViewThroughPartialConversionsRate',\r\n ViewThroughConversions: 'ViewThroughConversionsCredit',\r\n};\r\n\r\nexport const defaultColumnConversions = {\r\n ...partialConversionColumnNamePairs,\r\n};\r\n","import _ from 'underscore';\r\n\r\nexport default function mapToObject(list, iteratee) {\r\n return _.object(list, _.map(list, iteratee));\r\n}\r\n","import mapToObject from '../util/map-to-object';\r\n\r\nconst PerformanceMetricsProperties = [\r\n 'Clicks',\r\n 'Impressions',\r\n 'CTR',\r\n 'Conversions',\r\n 'ConversionsCredit',\r\n 'AverageCPC',\r\n 'AverageCPM',\r\n 'VideoViews',\r\n 'ViewThroughRate',\r\n 'AverageCPV',\r\n 'TotalWatchTimeInMS',\r\n 'AverageWatchTimePerImpression',\r\n 'AverageWatchTimePerVideoView',\r\n 'Reach',\r\n 'VideoViewsAt25Percent',\r\n 'VideoViewsAt50Percent',\r\n 'VideoViewsAt75Percent',\r\n 'CompletedVideoViews',\r\n 'VideoCompletionRate',\r\n 'AveragePosition',\r\n 'CPA',\r\n 'PartialConversionCPA',\r\n 'ConversionRate',\r\n 'PartialConversionRate',\r\n 'AdvertiserReportedRevenue',\r\n 'RevenueOnAdSpend',\r\n 'Spend',\r\n 'WebsiteCoverage',\r\n 'ClickSharePercent',\r\n 'TopImpressionRate',\r\n 'AbsoluteTopImpressionRate',\r\n 'ExactMatchImpressionSharePercent',\r\n 'TopImpressionSharePercent',\r\n 'AbsoluteTopImpressionSharePercent',\r\n 'AllConversions',\r\n 'AllConversionsCredit',\r\n 'AllConversionRate',\r\n 'AllPartialConversionRate',\r\n 'AllConversionCPA',\r\n 'AllPartialConversionCPA',\r\n 'AllConversionRevenueOnAdSpend',\r\n 'AllConversionAdvertiserReportedRevenue',\r\n 'ViewThroughConversions',\r\n 'ViewThroughConversionsCredit',\r\n 'ViewThroughConversionsRevenue',\r\n 'ViewThroughConversionsCPA',\r\n 'ViewThroughPartialConversionsCPA',\r\n 'ViewThroughConversionsReturnOnAdSpend',\r\n 'ViewThroughConversionsRate',\r\n 'ViewThroughPartialConversionsRate',\r\n 'AverageCPS',\r\n 'SalesCount',\r\n 'Installs',\r\n 'CostPerInstall',\r\n 'RevenuePerInstall',\r\n // Conversion value rule columns\r\n 'AdvertiserReportedRevenueAdjustment',\r\n 'AllConversionAdvertiserReportedRevenueAdjustment',\r\n 'ViewThroughConversionsRevenueAdjustment',\r\n 'NewCustomerConversions',\r\n 'NewCustomerConversionRate',\r\n 'NewCustomerCPA',\r\n 'NewCustomerRevenue',\r\n 'NewCustomerRevenueOnAdSpend',\r\n];\r\n\r\nexport default mapToObject(PerformanceMetricsProperties, property => `PerformanceMetrics/${property}`);\r\n","import _ from 'underscore';\r\n\r\nconst SOVColumns = {\r\n ImpShare: 'AuctionWonPercent',\r\n ImpShareLostToBudget: 'AuctionLostToBudgetPercent',\r\n ImpShareLostToRank: 'AuctionLostToRankPercent',\r\n ImpShareLostToAdRelevance: 'AuctionLostToLandingPercent',\r\n ImpShareLostToExpectedCTR: 'AuctionLostToAdQualityPercent',\r\n ImpShareLostToBid: 'AuctionLostToBidPercent',\r\n};\r\n\r\nexport default _.mapObject(SOVColumns, property => `PerformanceMetrics/${property}`);\r\n","import _ from 'underscore';\r\n\r\nconst SOVLostColumns = {\r\n TopImpressionShareLostToRank: 'TopISLostToRankPercent',\r\n TopImpressionShareLostToBudget: 'TopISLostToBudgetPercent',\r\n AbsoluteTopImpressionShareLostToRank: 'AbsoluteTopISLostToRankPercent',\r\n AbsoluteTopImpressionShareLostToBudget: 'AbsoluteTopISLostToBudgetPercent',\r\n};\r\n\r\nexport default _.mapObject(SOVLostColumns, property => `PerformanceMetrics/${property}`);\r\n","import mapToObject from '../util/map-to-object';\r\n\r\nconst AudienceSOVPropertiesName = [\r\n 'AudienceImpressionShare',\r\n 'AudienceImpressionShareLostToBudget',\r\n 'AudienceImpressionShareLostToRank',\r\n 'RelativeCTR',\r\n];\r\n\r\nfunction mapNameToProperty(name) {\r\n const map = {\r\n AudienceImpressionShare: 'AudienceAuctionWonPercent',\r\n AudienceImpressionShareLostToBudget: 'AudienceTopISLostToBudgetPercent',\r\n AudienceImpressionShareLostToRank: 'AudienceTopISLostToRankPercent',\r\n };\r\n\r\n return map[name] || name;\r\n}\r\n\r\nexport default mapToObject(AudienceSOVPropertiesName, property =>\r\n `PerformanceMetrics/${mapNameToProperty(property)}`);\r\n","import _ from 'underscore';\r\nimport PerformanceMetricsColumns from '../common-columns/performance-metrics-columns';\r\nimport SOVColumns from '../common-columns/legacy-sov-columns';\r\nimport SOVLostColumns from '../common-columns/sov-lost-columns';\r\nimport AudienceSOVColumns from '../common-columns/audience-sov-columns';\r\n\r\nexport function getName() {\r\n // only PerformanceGrid has inline download, BudgetGrid has not\r\n return 'PerformanceGrid';\r\n}\r\n\r\nexport function getColumnsMetadata() {\r\n return _.defaults({\r\n AccountName: ['Name', 'AccountNumber'],\r\n AccountInactiveReasons: ['AccountInactiveReasons', 'AccountInactiveReasonsCount'],\r\n TotalEffectiveCost: 'PerformanceMetrics/Spend',\r\n IOPurchaseOrder: 'InsertionOrderDetails/CurrentInsertionOrder/PurchaseOrder',\r\n IOBudget: 'InsertionOrderDetails/CurrentInsertionOrder/Budget',\r\n RemainingIOBudget: 'InsertionOrderDetails/CurrentInsertionOrder/RemainingBudget',\r\n StartDate: 'InsertionOrderDetails/CurrentInsertionOrder/StartDate',\r\n EndDate: 'InsertionOrderDetails/CurrentInsertionOrder/EndDate',\r\n DailyBudget: 'Budget/DailyBudget',\r\n TotalRemainingIOBudget: 'InsertionOrderDetails/TotalRemainingBudget',\r\n OverallEndDate: 'InsertionOrderDetails/OverallEndDate',\r\n QualityScore: 'QualityScoreData/OverallQualityScore',\r\n }, _.omit(PerformanceMetricsColumns, 'Spend'), SOVColumns, SOVLostColumns, AudienceSOVColumns);\r\n}\r\n\r\nexport function getPage() {\r\n return 'AccountsSummary';\r\n}\r\n\r\nexport function getRoute() {\r\n return 'customer/:customer_id/accounts-summary/performance';\r\n}\r\n","import _ from 'underscore';\r\nimport PerformanceMetricsColumns from '../common-columns/performance-metrics-columns';\r\nimport getLevel from '../util/get-level';\r\n\r\nexport function getName({\r\n AdExtensionType,\r\n AssociationType,\r\n CampaignId,\r\n AdGroupId,\r\n}) {\r\n return `${AdExtensionType}${getLevel({\r\n CampaignId,\r\n AdGroupId,\r\n })}${AssociationType}`;\r\n}\r\n\r\nexport function getColumnsMetadata() {\r\n return _.defaults({\r\n CampaignName: 'Campaign/Name',\r\n AdGroupName: 'AdGroup/Name',\r\n Delivery: 'AdExtension/Delivery',\r\n Status: 'AdExtension/Status',\r\n AdExtensionId: 'AdExtension/Id',\r\n StartDate: 'AdExtension/Scheduling/StartDate',\r\n EndDate: 'AdExtension/Scheduling/EndDate',\r\n Schedule: 'AdExtension/Scheduling/DayTimeRanges',\r\n TimeZone: 'AdExtension/Scheduling/UseSearcherTimeZone',\r\n }, PerformanceMetricsColumns);\r\n}\r\n\r\nexport function getRoute({\r\n AdExtensionType,\r\n AssociationType,\r\n CampaignId,\r\n AdGroupId,\r\n}) {\r\n const level = getLevel({\r\n CampaignId,\r\n AdGroupId,\r\n });\r\n\r\n const typeFragment = AdExtensionType\r\n .substr(0, AdExtensionType.length - 'AdExtension'.length)\r\n .toLowerCase();\r\n const associationFragment = AssociationType.toLowerCase();\r\n\r\n switch (level) {\r\n case 'AdGroup':\r\n return `customer/:customer_id/account/:account_id/campaign/:campaign_id/adgroup/:adgroup_id/adextension/${typeFragment}/association/${associationFragment}`;\r\n case 'Campaign':\r\n return `customer/:customer_id/account/:account_id/campaign/:campaign_id/adextension/${typeFragment}/association/${associationFragment}`;\r\n case 'Account':\r\n default:\r\n return `customer/:customer_id/account/:account_id/adextension/${typeFragment}/association/${associationFragment}`;\r\n }\r\n}\r\n\r\n\r\nexport function getRouteForNewUI({\r\n getUrlSearch,\r\n selection: {\r\n AdExtensionType,\r\n AssociationType,\r\n CampaignId,\r\n AdGroupId,\r\n },\r\n}) {\r\n const search = getUrlSearch({\r\n campaignId: CampaignId,\r\n adGroupId: AdGroupId,\r\n });\r\n\r\n const typeFragment = AdExtensionType\r\n .substr(0, AdExtensionType.length - 'AdExtension'.length)\r\n .toLowerCase();\r\n const type = _.result({\r\n sitelink2: 'sitelink',\r\n }, typeFragment, typeFragment);\r\n\r\n const associationFragment = AssociationType.toLowerCase();\r\n\r\n return `extensions/${type}/association/${associationFragment}${search}`;\r\n}\r\n","import mapToObject from '../util/map-to-object';\r\n\r\nconst PhonePerformanceMetricsProperties = [\r\n 'ClickAndPhoneSpend',\r\n 'PhoneSpend',\r\n 'ManualCalls',\r\n 'ClickCalls',\r\n 'PhoneImpressions',\r\n 'PTR',\r\n 'AverageCPP',\r\n];\r\n\r\nexport default mapToObject(\r\n PhonePerformanceMetricsProperties,\r\n property => `PhonePerformanceMetrics/${property}`\r\n);\r\n","import mapToObject from '../util/map-to-object';\r\n\r\nconst SOVProperties = [\r\n 'AuctionWonPercent',\r\n 'AuctionLostToBudgetPercent',\r\n 'AuctionLostToRankPercent',\r\n 'AuctionLostToAdQualityPercent',\r\n 'AuctionLostToLandingPercent',\r\n 'AuctionLostToBidPercent',\r\n 'ClickSharePercent',\r\n];\r\n\r\nexport default mapToObject(SOVProperties, property => `PerformanceMetrics/${property}`);\r\n","export default {\r\n QualityScore: 'QualityScore/OverallQualityScore',\r\n};\r\n","import _ from 'underscore';\r\nimport PerformanceMetricsColumns from '../common-columns/performance-metrics-columns';\r\nimport PhonePerformanceMetricsColumns from '../common-columns/phone-performance-metrics-columns';\r\nimport SOVColumns from '../common-columns/sov-columns';\r\nimport SOVLostColumns from '../common-columns/sov-lost-columns';\r\nimport AudienceSOVColumns from '../common-columns/audience-sov-columns';\r\nimport QualityScoreColumns from '../common-columns/quality-score-columns';\r\n\r\nexport function getColumnsMetadata() {\r\n return _.defaults(\r\n {\r\n AdGroup: 'Name',\r\n Campaign: 'Campaign/Name',\r\n Delivery: 'DeliveryStatus',\r\n BidStrategyName: 'Campaign/BidStrategyName',\r\n BidStrategyType: 'DisplayBiddingStrategyType',\r\n AdGroupId: 'Id',\r\n TrackingTemplate: 'TrackingUrlTemplate',\r\n CustomParameters: 'UrlCustomParameters',\r\n CallForwarding: 'CallTrackingStatus',\r\n Language: 'Language',\r\n CashbackScope: 'AdGroupCashback/Scope',\r\n CashbackPercent: 'AdGroupCashback/Percent',\r\n Coupon: 'AdGroupCashback/CouponsEnabled',\r\n },\r\n PerformanceMetricsColumns,\r\n PhonePerformanceMetricsColumns,\r\n SOVColumns,\r\n SOVLostColumns,\r\n QualityScoreColumns,\r\n AudienceSOVColumns\r\n );\r\n}\r\n","import _ from 'underscore';\r\nimport getLevel from '../util/get-level';\r\nimport PerformanceMetricsColumns from '../common-columns/performance-metrics-columns';\r\n\r\nexport function getName() {\r\n return 'audience_associations';\r\n}\r\n\r\nexport function getColumnsMetadata() {\r\n return _.defaults({\r\n AudienceId: 'AudienceCriterion/AudienceId',\r\n AudienceName: 'AudienceCriterion/AudienceName',\r\n AudienceType: 'AudienceCriterion/AudienceType',\r\n BidMultiplier: 'AudienceCriterion/BidMultiplier',\r\n Campaign: 'Campaign/Name',\r\n AdGroup: 'AdGroup/Name',\r\n TotalEffectiveCost: 'PerformanceMetrics/Spend',\r\n }, _.omit(PerformanceMetricsColumns, 'Spend'));\r\n}\r\n\r\nexport function getRoute({\r\n CampaignId,\r\n AdGroupId,\r\n}) {\r\n const level = getLevel({\r\n CampaignId,\r\n AdGroupId,\r\n });\r\n\r\n switch (level) {\r\n case 'AdGroup':\r\n return 'customer/:customer_id/account/:account_id/campaign/:campaign_id/adgroup/:adgroup_id/audiences';\r\n case 'Campaign':\r\n return 'customer/:customer_id/account/:account_id/campaign/:campaign_id/audiences';\r\n case 'Account':\r\n default:\r\n return 'customer/:customer_id/account/:account_id/audiences';\r\n }\r\n}\r\n","import { parse } from 'odata-v4-filter-parser';\r\nimport _ from 'underscore';\r\nimport PerformanceMetricsColumns from '../common-columns/performance-metrics-columns';\r\nimport getLevel from './get-level';\r\nimport { getQueryPart } from './query-string';\r\n\r\nconst gridsMetadata = {\r\n Locations: {\r\n queryStringRegex: /LocationCriterion/,\r\n generateName: typeId => `settings_locations_${typeId}`,\r\n routeFragment: 'locations',\r\n },\r\n AdSchedule: {\r\n queryStringRegex: /DayTimeCriterion/,\r\n generateName: typeId => `settings_ad_schedule_${typeId}`,\r\n routeFragment: 'adschedule',\r\n },\r\n Devices: {\r\n queryStringRegex: {\r\n test: queryString => queryString.indexOf('DeviceCriterion') > -1 && queryString.indexOf('OSTargets') === -1,\r\n },\r\n generateName: typeId => `settings_devices_${typeId}`,\r\n routeFragment: 'devices',\r\n },\r\n DevicesOS: {\r\n queryStringRegex: /DeviceCriterion.*OSTargets/,\r\n generateName: typeId => `settings_devices_OS_${typeId}`,\r\n routeFragment: 'devices',\r\n },\r\n Age: {\r\n queryStringRegex: /AgeCriterion/,\r\n generateName: typeId => `summary_tab_demographics_Age_${typeId}`,\r\n routeFragmentForNewUI: 'demographics/age',\r\n },\r\n Gender: {\r\n queryStringRegex: /GenderCriterion/,\r\n generateName: typeId => `summary_tab_demographics_Gender_${typeId}`,\r\n routeFragmentForNewUI: 'demographics/gender',\r\n },\r\n CompanyName: {\r\n queryStringRegex: /CompanyNameCriterion/,\r\n generateName: typeId => `summary_tab_demographics_CompanyName_${typeId}`,\r\n routeFragmentForNewUI: 'demographics/company',\r\n },\r\n Industry: {\r\n queryStringRegex: /IndustryCriterion/,\r\n generateName: typeId => `summary_tab_demographics_Industry_${typeId}`,\r\n routeFragmentForNewUI: 'demographics/industry',\r\n },\r\n JobFunction: {\r\n queryStringRegex: /JobFunctionCriterion/,\r\n generateName: typeId => `summary_tab_demographics_JobFunction_${typeId}`,\r\n routeFragmentForNewUI: 'demographics/jobfunction',\r\n },\r\n};\r\n\r\nfunction findMetadata(queryString) {\r\n return _.find(gridsMetadata, ({ queryStringRegex }) => queryStringRegex.test(queryString));\r\n}\r\n\r\nfunction findMetadataKey(queryString) {\r\n return _.findKey(gridsMetadata, ({ queryStringRegex }) => queryStringRegex.test(queryString));\r\n}\r\n\r\nfunction isDemographics(queryString) {\r\n const key = findMetadataKey(queryString);\r\n return _.contains(['Age', 'Gender', 'CompanyName', 'Industry', 'JobFunction'], key);\r\n}\r\n\r\nexport function getGridName({\r\n QueryString,\r\n}, typeId) {\r\n const {\r\n generateName,\r\n } = findMetadata(QueryString);\r\n\r\n return generateName(typeId);\r\n}\r\n\r\nexport function getGridColumnsMetadata({\r\n QueryString = '',\r\n} = {}) {\r\n const mapping = _.defaults({\r\n AdGroupId: 'AdGroup/Id',\r\n AdGroupName: 'AdGroup/Name',\r\n BidAdj: 'CriterionBid',\r\n CashbackPercent: 'CriterionCashback', // this is override in campaigns/ad groups/audiences grid\r\n CampaignId: 'Campaign/Id',\r\n CampaignName: 'Campaign/Name',\r\n CampaignType: 'Campaign/CampaignType',\r\n Level: 'LevelOfDetails',\r\n DayTime: 'Criterion/Model.DayTimeCriterion/Day',\r\n DeviceName: 'Criterion/Model.DeviceCriterion/DeviceName',\r\n Age: 'Criterion/Model.AgeCriterion/AgeRange',\r\n Gender: 'Criterion/Model.GenderCriterion/GenderType',\r\n Company: 'Criterion/Model.CompanyNameCriterion/CompanyName',\r\n Industry: 'Criterion/Model.IndustryCriterion/Industry',\r\n JobFunction: 'Criterion/Model.JobFunctionCriterion/JobFunction',\r\n Delivery: 'DeliveryStatus',\r\n OSName: 'Criterion/Model.DeviceCriterion/OSName',\r\n Location: 'Criterion/Name',\r\n }, PerformanceMetricsColumns);\r\n\r\n if (isDemographics(QueryString)) {\r\n // For demographics, UI column name equals to MT property name\r\n // demographics-grid\\src\\columns\\bid-adj.js\r\n // For settings, UI column name does not equal MT property name\r\n // targeting-settings-scaffolds\\src\\columns\\bid-adjustment-column.es\r\n delete mapping.BidAdj;\r\n }\r\n\r\n return mapping;\r\n}\r\n\r\nfunction removeCriterion$typePredicate(originalFilter) {\r\n const filter = _.clone(originalFilter);\r\n if (filter.Criterion && filter.Criterion.$type) {\r\n delete filter.Criterion;\r\n }\r\n\r\n if (filter.$and) {\r\n filter.$and = _.reject(\r\n filter.$and,\r\n predicate => predicate.Criterion && predicate.Criterion.$type\r\n );\r\n\r\n if (filter.$and.length === 1) {\r\n return filter.$and[0];\r\n }\r\n }\r\n\r\n return _.isEmpty(filter) ? null : filter;\r\n}\r\n\r\nexport function getGridFilter({\r\n QueryString,\r\n}) {\r\n const filterPart = getQueryPart(QueryString, '$filter=');\r\n\r\n // settings tab uses $filter like \"isof(Criterion, 'Model.DayTimeCriterion')\"\r\n // but OData specification requires it to be \"isof(Criterion, Model.DayTimeCriterion)\"\r\n const fixed = decodeURIComponent(filterPart)\r\n .replace(/isof\\((\\w+),\\s+'([.\\w]+)'\\)/g, (match, prop, type) => `isof(${prop},${type})`);\r\n\r\n // remove the default filter\r\n return removeCriterion$typePredicate(parse(fixed));\r\n}\r\n\r\nexport function getGridRoute({\r\n CampaignId,\r\n AdGroupId,\r\n QueryString,\r\n}, typeRoute) {\r\n const level = getLevel({\r\n CampaignId,\r\n AdGroupId,\r\n });\r\n\r\n const {\r\n routeFragment,\r\n } = findMetadata(QueryString);\r\n\r\n const routePart = `${routeFragment}/${typeRoute}`;\r\n\r\n switch (level) {\r\n case 'AdGroup':\r\n return `customer/:customer_id/account/:account_id/campaign/:campaign_id/adgroup/:adgroup_id/edit/${routePart}`;\r\n case 'Campaign':\r\n return `customer/:customer_id/account/:account_id/campaign/:campaign_id/edit/${routePart}`;\r\n case 'Account':\r\n default:\r\n return `customer/:customer_id/account/:account_id/campaign/settings/${routePart}`;\r\n }\r\n}\r\n\r\nexport function getGridRouteForNewUI({\r\n getUrlSearch,\r\n entity,\r\n selection: {\r\n QueryString,\r\n CampaignId,\r\n AdGroupId,\r\n },\r\n}) {\r\n const match = _.find(gridsMetadata, ({ queryStringRegex }) => queryStringRegex.test(QueryString));\r\n const path = match.routeFragmentForNewUI || match.routeFragment;\r\n const level = _.result({\r\n CampaignCriterion: 'campaign',\r\n AdGroupCriterion: 'adgroup',\r\n }, entity);\r\n const search = getUrlSearch({\r\n campaignId: CampaignId,\r\n adGroupId: AdGroupId,\r\n });\r\n\r\n return `${path}/${level}${search}`;\r\n}\r\n","import {\r\n getGridName,\r\n getGridColumnsMetadata,\r\n getGridFilter,\r\n getGridRoute,\r\n getGridRouteForNewUI,\r\n} from '../util/setting-mainstream-grids';\r\n\r\nexport function getName(selection) {\r\n return getGridName(selection, 1);\r\n}\r\n\r\nexport const getColumnsMetadata = getGridColumnsMetadata;\r\n\r\nexport const getFilter = getGridFilter;\r\n\r\nexport function getRoute(selection) {\r\n return getGridRoute(selection, 'adgroup');\r\n}\r\n\r\nexport function getRouteForNewUI(options) {\r\n return getGridRouteForNewUI(options);\r\n}\r\n","import _ from 'underscore';\r\nimport PerformanceMetricsColumns from '../common-columns/performance-metrics-columns';\r\nimport SOVColumns from '../common-columns/sov-columns';\r\n\r\nexport function getColumnsMetadata() {\r\n return _.defaults({\r\n AdPreview: 'Title',\r\n AdGroup: 'AdGroup/Name',\r\n Campaign: 'Campaign/Name',\r\n Delivery: 'DeliveryStatus',\r\n AdID: 'Id',\r\n AdType: 'Type',\r\n }, PerformanceMetricsColumns, SOVColumns);\r\n}\r\n","import getLevel from './get-level';\r\n\r\nexport function getGridName(id) {\r\n return `${id}Grid`;\r\n}\r\n\r\nexport function getGridRoute({\r\n CampaignId,\r\n AdGroupId,\r\n}, path) {\r\n const level = getLevel({\r\n CampaignId,\r\n AdGroupId,\r\n });\r\n\r\n switch (level) {\r\n case 'AdGroup':\r\n return `customer/:customer_id/account/:account_id/campaign/:campaign_id/adgroup/:adgroup_id/dimensions/${path}`;\r\n case 'Campaign':\r\n return `customer/:customer_id/account/:account_id/campaign/:campaign_id/dimensions/${path}`;\r\n case 'Account':\r\n default:\r\n return `customer/:customer_id/account/:account_id/dimensions/${path}`;\r\n }\r\n}\r\n\r\nexport function getTimeGridRoute(selection, path) {\r\n return getGridRoute(selection, `time/${path}`);\r\n}\r\n\r\nexport function getShoppingGridRoute(selection, path) {\r\n return getGridRoute(selection, `shopping/${path}`);\r\n}\r\n","import { getGridName, getGridRoute } from '../util/dimension-grids';\r\n\r\nexport function getName() {\r\n return getGridName(50);\r\n}\r\n\r\nexport function getRoute(selection) {\r\n return getGridRoute(selection, 'agegender');\r\n}\r\n","import _ from 'underscore';\r\nimport PerformanceMetricsColumns from '../common-columns/performance-metrics-columns';\r\n\r\nexport function getName() {\r\n return 'RSAAssetsGrid';\r\n}\r\n\r\nexport function getColumnsMetadata() {\r\n return _.defaults({\r\n Asset: 'Asset/Text',\r\n AssetId: 'Asset/Id',\r\n AssetSource: 'Asset/AssetSource',\r\n AssetType: 'AssociationType',\r\n PinnedField: 'PinnedField',\r\n Status: 'UiDisplayStatus',\r\n AssetPerformanceLabel: 'PerformanceLabel',\r\n PolicyStatus: 'EditorialStatus',\r\n }, PerformanceMetricsColumns);\r\n}\r\n\r\nexport function getRoute({\r\n AdId,\r\n}) {\r\n return `customer/:customer_id/account/:account_id/campaign/:campaign_id/adgroup/:adgroup_id/ad/${AdId}/assets`;\r\n}\r\n","import _ from 'underscore';\r\nimport PerformanceMetricsColumns from '../common-columns/performance-metrics-columns';\r\n\r\nexport function getColumnsMetadata() {\r\n return _.defaults({\r\n Asset: 'Asset/Text',\r\n AssetStatus: 'Asset/IsBlocked',\r\n AssetSource: 'Asset/AssetSource',\r\n AssetType: 'AssociationType',\r\n UsedByCount: 'UsedByCount',\r\n UsedByAssetGroupCount: 'UsedByAssetGroupCount',\r\n PinnedCount: 'PinnedCount',\r\n PerformanceRating: [\r\n 'PerformanceLabelBestPercentage',\r\n 'PerformanceLabelGoodPercentage',\r\n 'PerformanceLabelLowPercentage',\r\n 'PerformanceLabelLearningPercentage',\r\n 'PerformanceLabelUnratedPercentage',\r\n ],\r\n AssetId: 'Asset/Id',\r\n PolicyStatus: 'Asset/EditorialStatus',\r\n }, PerformanceMetricsColumns);\r\n}\r\n","import _ from 'underscore';\r\nimport getLevel from '../util/get-level';\r\nimport PerformanceMetricsColumns from '../common-columns/performance-metrics-columns';\r\n\r\nexport function getName() {\r\n return 'audience_associations_level';\r\n}\r\n\r\nexport function getColumnsMetadata() {\r\n return _.defaults({\r\n AudienceId: 'AudienceCriterion/AudienceId',\r\n AudienceName: 'AudienceCriterion/AudienceName',\r\n AudienceType: 'AudienceCriterion/AudienceType',\r\n BidMultiplier: 'AudienceCriterion/BidMultiplier',\r\n Campaign: 'Campaign/Name',\r\n AdGroup: 'AdGroup/Name',\r\n Level: 'Level',\r\n TotalEffectiveCost: 'PerformanceMetrics/Spend',\r\n CashbackPercent: 'AudienceCriterion/CashbackAdjustment',\r\n }, _.omit(PerformanceMetricsColumns, 'Spend'));\r\n}\r\n\r\nexport function getRoute({\r\n CampaignId,\r\n AdGroupId,\r\n}) {\r\n const level = getLevel({\r\n CampaignId,\r\n AdGroupId,\r\n });\r\n\r\n switch (level) {\r\n case 'AdGroup':\r\n return 'customer/:customer_id/account/:account_id/campaign/:campaign_id/adgroup/:adgroup_id/audiences';\r\n case 'Campaign':\r\n return 'customer/:customer_id/account/:account_id/campaign/:campaign_id/audiences';\r\n case 'Account':\r\n default:\r\n return 'customer/:customer_id/account/:account_id/audiences';\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport PerformanceMetricsColumns from '../common-columns/performance-metrics-columns';\r\nimport getLevel from '../util/get-level';\r\n\r\nexport function getName({\r\n CampaignId,\r\n AdGroupId,\r\n}) {\r\n const level = getLevel({\r\n CampaignId,\r\n AdGroupId,\r\n });\r\n\r\n return `AutomatedAdExtension${level}${level}`;\r\n}\r\n\r\nexport function getColumnsMetadata() {\r\n return _.defaults({\r\n AdExtension: 'Name',\r\n CampaignName: 'Campaign/Name',\r\n AdGroupName: 'AdGroup/Name',\r\n }, PerformanceMetricsColumns);\r\n}\r\n\r\nexport function getRoute({\r\n CampaignId,\r\n AdGroupId,\r\n}) {\r\n const level = getLevel({\r\n CampaignId,\r\n AdGroupId,\r\n });\r\n\r\n switch (level) {\r\n case 'AdGroup':\r\n return 'customer/:customer_id/account/:account_id/campaign/:campaign_id/adgroup/:adgroup_id/adextension/automated';\r\n case 'Campaign':\r\n return 'customer/:customer_id/account/:account_id/campaign/:campaign_id/adextension/automated';\r\n case 'Account':\r\n default:\r\n return 'customer/:customer_id/account/:account_id/adextension/automated';\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport PerformanceMetricsColumns from '../common-columns/performance-metrics-columns';\r\n\r\nexport function getName() {\r\n return 'SharedBudgetSummaryGrid';\r\n}\r\n\r\nexport function getColumnsMetadata() {\r\n return _.defaults({\r\n Status: [],\r\n BudgetName: 'Name',\r\n BudgetStatus: 'Status',\r\n CampaignCount: 'AssociationCount',\r\n TotalEffectiveCost: 'PerformanceMetrics/Spend',\r\n }, _.omit(PerformanceMetricsColumns, 'Spend'));\r\n}\r\n\r\nexport function getRoute() {\r\n return 'customer/:customer_id/account/:account_id/library/sharedbudget';\r\n}\r\n","import { getGridName, getGridRoute } from '../util/dimension-grids';\r\n\r\nexport function getName() {\r\n return getGridName(80);\r\n}\r\n\r\nexport function getRoute(selection) {\r\n return getGridRoute(selection, 'calldetails');\r\n}\r\n","import mapToObject from '../util/map-to-object';\r\n\r\nconst PerformanceMetricsProperties = [\r\n 'Downloads',\r\n 'FirstLaunches',\r\n 'Purchases',\r\n 'Subscriptions',\r\n 'PostClickDownloadRate',\r\n 'CostPerDownload',\r\n 'PostClickFirstLaunchRate',\r\n 'CostPerFirstLaunch',\r\n 'PostInstallPurchaseRate',\r\n 'CostPerPurchase',\r\n 'PostInstallSubscriptionRate',\r\n 'CostPerSubscription',\r\n];\r\n\r\nexport default mapToObject(PerformanceMetricsProperties, property => `PerformanceMetrics/${property}`);\r\n","import _ from 'underscore';\r\nimport getDefaultName from '../defaults/get-default-name';\r\nimport PerformanceMetricsColumns from '../common-columns/performance-metrics-columns';\r\nimport AppPerformanceMetricsColumns from '../common-columns/app-performance-metrics-columns';\r\nimport PhonePerformanceMetricsColumns from '../common-columns/phone-performance-metrics-columns';\r\nimport SOVColumns from '../common-columns/sov-columns';\r\nimport SOVLostColumns from '../common-columns/sov-lost-columns';\r\nimport AudienceSOVColumns from '../common-columns/audience-sov-columns';\r\nimport QualityScoreColumns from '../common-columns/quality-score-columns';\r\nimport getDefaultRoute, { getDefaultRouteForNewUI } from '../defaults/get-default-route';\r\n\r\nconst BudgetGridQueryStringRegex = /\\$expand=Budget&BudgetId=(\\d+)/;\r\n\r\nexport function getName({\r\n QueryString = '',\r\n PerformanceTargetInstanceId,\r\n} = {}) {\r\n if (_.isNumber(PerformanceTargetInstanceId)) {\r\n return getDefaultName('PerformanceTargetOverview');\r\n }\r\n if (BudgetGridQueryStringRegex.test(QueryString)) {\r\n return 'SharedBudgetEditGrid';\r\n }\r\n return getDefaultName('Campaign');\r\n}\r\n\r\nfunction getCampaignGridColumnsMetadata() {\r\n return _.defaults(\r\n {\r\n Budget: 'Budget/Amount',\r\n CampaignId: 'Id',\r\n CampaignStatus: 'Status',\r\n DisplayBiddingStrategyType: 'BiddingScheme',\r\n Languages: 'Languages',\r\n CashbackScope: 'CampaignCashback/Scope',\r\n CashbackPercent: 'CampaignCashback/Percent',\r\n CashbackBudget: 'CampaignCashback/MonthlyBudget',\r\n Coupon: 'CampaignCashback/CouponsEnabled',\r\n },\r\n PerformanceMetricsColumns,\r\n AppPerformanceMetricsColumns,\r\n PhonePerformanceMetricsColumns,\r\n SOVColumns,\r\n SOVLostColumns,\r\n QualityScoreColumns,\r\n AudienceSOVColumns\r\n );\r\n}\r\n\r\nfunction getPerformanceTargetsCampaignGridColumnsMetadata() {\r\n return _.defaults(\r\n {\r\n Budget: 'Budget/Amount',\r\n CampaignId: 'Id',\r\n CampaignStatus: 'Status',\r\n Delivery: 'DeliveryStatus',\r\n DisplayBiddingStrategyType: 'BiddingScheme',\r\n },\r\n PerformanceMetricsColumns,\r\n PhonePerformanceMetricsColumns,\r\n SOVColumns,\r\n SOVLostColumns,\r\n QualityScoreColumns,\r\n AudienceSOVColumns\r\n );\r\n}\r\n\r\nfunction getBudgetGridColumnsMetadata() {\r\n return _.defaults({\r\n CampaignName: 'Name',\r\n BudgetStatus: 'BudgetAssociationStatus',\r\n }, PerformanceMetricsColumns);\r\n}\r\n\r\nexport function getColumnsMetadata({\r\n QueryString = '',\r\n PerformanceTargetInstanceId,\r\n} = {}) {\r\n if (_.isNumber(PerformanceTargetInstanceId)) {\r\n return getPerformanceTargetsCampaignGridColumnsMetadata();\r\n }\r\n\r\n return BudgetGridQueryStringRegex.test(QueryString) ?\r\n getBudgetGridColumnsMetadata() :\r\n getCampaignGridColumnsMetadata();\r\n}\r\n\r\nexport function getRoute(selection) {\r\n const {\r\n QueryString = '',\r\n PerformanceTargetId,\r\n PerformanceTargetInstanceId,\r\n } = selection;\r\n\r\n if (_.isNumber(PerformanceTargetInstanceId)) {\r\n return `customer/:customer_id/account/:account_id/performance_target/${PerformanceTargetId}/instance/${PerformanceTargetInstanceId}`;\r\n }\r\n\r\n const match = BudgetGridQueryStringRegex.exec(QueryString);\r\n\r\n if (match) {\r\n return `customer/:customer_id/account/:account_id/library/sharedbudget/${match[1]}/edit`;\r\n }\r\n\r\n return getDefaultRoute('Campaign', selection);\r\n}\r\n\r\nexport function getRouteForNewUI(options) {\r\n const { getUrlSearch, selection } = options;\r\n const {\r\n QueryString = '',\r\n PerformanceTargetId,\r\n PerformanceTargetInstanceId,\r\n } = selection;\r\n\r\n if (_.isNumber(PerformanceTargetInstanceId)) {\r\n return `performancetargets/overview${getUrlSearch({ ptId: PerformanceTargetId, instanceId: PerformanceTargetInstanceId })}`;\r\n }\r\n\r\n const match = BudgetGridQueryStringRegex.exec(QueryString);\r\n\r\n if (match) {\r\n return `sharedbudgets/edit${getUrlSearch({ budgetId: match[1] })}`;\r\n }\r\n\r\n return getDefaultRouteForNewUI(options);\r\n}\r\n","import {\r\n getGridName,\r\n getGridColumnsMetadata,\r\n getGridFilter,\r\n getGridRoute,\r\n getGridRouteForNewUI,\r\n} from '../util/setting-mainstream-grids';\r\n\r\nexport function getName(selection) {\r\n return getGridName(selection, 0);\r\n}\r\n\r\nexport const getColumnsMetadata = getGridColumnsMetadata;\r\n\r\nexport const getFilter = getGridFilter;\r\n\r\nexport function getRoute(selection) {\r\n return getGridRoute(selection, 'campaign');\r\n}\r\n\r\nexport function getRouteForNewUI(options) {\r\n return getGridRouteForNewUI(options);\r\n}\r\n","import getLevel from '../util/get-level';\r\n\r\nexport function getName() {\r\n return 'ChangeHistoryGrid';\r\n}\r\n\r\nexport function getColumnsMetadata() {\r\n return {\r\n DateTimeUser: ['ModificationDate', 'ModifiedByUser'],\r\n Tool: 'Tool',\r\n Campaign: 'CampaignName',\r\n AdGroup: 'AdGroupName',\r\n Changes: ['EntityName', 'EntityValue', 'AttributeName', 'ChangeType', 'OldValue', 'NewValue'],\r\n Undo: [],\r\n };\r\n}\r\n\r\nexport function getRoute({\r\n CampaignId,\r\n AdGroupId,\r\n}) {\r\n const level = getLevel({\r\n CampaignId,\r\n AdGroupId,\r\n });\r\n\r\n switch (level) {\r\n case 'AdGroup':\r\n return 'customer/:customer_id/account/:account_id/campaign/:campaign_id/adgroup/:adgroup_id/changehistory';\r\n case 'Campaign':\r\n return 'customer/:customer_id/account/:account_id/campaign/:campaign_id/changehistory';\r\n case 'Account':\r\n default:\r\n return 'customer/:customer_id/account/:account_id/changehistory';\r\n }\r\n}\r\n","import { getGridName, getGridRoute } from '../util/dimension-grids';\r\n\r\nexport function getName() {\r\n return getGridName(55);\r\n}\r\n\r\nexport function getRoute(selection) {\r\n return getGridRoute(selection, 'landingpage');\r\n}\r\n","import _ from 'underscore';\r\nimport { getPropertiesFromQueryString } from '../util/query-string';\r\n\r\nconst HotelBIGridsMetadata = {\r\n AdvancedBookingGrid: {\r\n specificProperty: 'AdvancedBookingWindow',\r\n routeFragment: 'advanced-booking',\r\n routeFragmentForNewUI: 'advancedbookinggrid',\r\n },\r\n CheckinDayGrid: {\r\n specificProperty: 'CheckinDay',\r\n routeFragment: 'checkin-day',\r\n routeFragmentForNewUI: 'checkindaygrid',\r\n },\r\n DateTypeGrid: {\r\n specificProperty: 'DateType',\r\n routeFragment: 'date-type',\r\n routeFragmentForNewUI: 'datetypegrid',\r\n },\r\n HotelCountryGrid: {\r\n specificProperty: 'HotelCountry',\r\n routeFragment: 'hotel-country',\r\n routeFragmentForNewUI: 'hotelcountrygrid',\r\n },\r\n HotelDeviceTypeGrid: {\r\n specificProperty: 'DeviceType',\r\n routeFragment: 'devicetype',\r\n routeFragmentForNewUI: 'hoteldevicetypegrid',\r\n },\r\n HotelDateGrid: {\r\n specificProperty: 'Date',\r\n routeFragment: 'date',\r\n routeFragmentForNewUI: 'hoteldategrid',\r\n },\r\n HotelLengthOfStayGrid: {\r\n specificProperty: 'LengthOfStay',\r\n routeFragment: 'length-of-stay',\r\n routeFragmentForNewUI: 'hotellengthofstaygrid',\r\n },\r\n HotelUserCountryGrid: {\r\n specificProperty: 'UserCountry',\r\n routeFragment: 'user-country',\r\n routeFragmentForNewUI: 'hotelusercountrygrid',\r\n },\r\n HotelSlotTypeGrid: {\r\n specificProperty: 'SlotType',\r\n routeFragment: 'slot-type',\r\n routeFragmentForNewUI: 'hotelslottypegrid',\r\n },\r\n SiteTypeGrid: {\r\n specificProperty: 'SiteType',\r\n routeFragment: 'site-type',\r\n routeFragmentForNewUI: 'sitetypegrid',\r\n },\r\n};\r\n\r\nexport function getName({\r\n '@odata.type': ODataType,\r\n Type,\r\n QueryString = '',\r\n}) {\r\n if (ODataType === '#Model.DimensionReportSelection') {\r\n switch (Type) {\r\n case 'VerticalPerformance': {\r\n const properties = getPropertiesFromQueryString(QueryString);\r\n\r\n return _.findKey(\r\n HotelBIGridsMetadata,\r\n ({ specificProperty }) => _.contains(properties, specificProperty)\r\n );\r\n }\r\n case 'PerformanceTargetReport': {\r\n if (QueryString.indexOf('PerformanceTargetName') >= 0) {\r\n return 'PerformanceTargetsSummaryGrid';\r\n }\r\n return 'PerformanceTargetHistoryGrid';\r\n }\r\n case 'CampaignLabelReport':\r\n return '1Grid';\r\n case 'AdGroupLabelReport':\r\n return '2Grid';\r\n case 'KeywordLabelReport':\r\n return '3Grid';\r\n case 'AdLabelReport':\r\n return '4Grid';\r\n case 'AccountLabelMccReport':\r\n return '5Grid';\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n return null;\r\n}\r\n\r\nexport function getPage({\r\n '@odata.type': ODataType,\r\n Type,\r\n}) {\r\n if (ODataType === '#Model.DimensionReportSelection' && Type === 'VerticalPerformance') {\r\n return 'HotelCenter';\r\n }\r\n\r\n return 'Campaigns';\r\n}\r\n\r\nexport function getRoute({\r\n '@odata.type': ODataType,\r\n Type,\r\n QueryString = '',\r\n ReportDataId = '',\r\n}) {\r\n if (ODataType === '#Model.DimensionReportSelection') {\r\n switch (Type) {\r\n case 'VerticalPerformance': {\r\n const properties = getPropertiesFromQueryString(QueryString);\r\n\r\n const {\r\n routeFragment,\r\n } = _.find(\r\n HotelBIGridsMetadata,\r\n ({ specificProperty }) => _.contains(properties, specificProperty)\r\n );\r\n\r\n return `overview/grid-chooser-item-${routeFragment}`;\r\n }\r\n case 'PerformanceTargetReport': {\r\n if (QueryString.indexOf('PerformanceTargetName') >= 0) {\r\n return 'customer/:customer_id/account/:account_id/performance_target';\r\n }\r\n return `customer/:customer_id/account/:account_id/performance_target/${ReportDataId}/history`;\r\n }\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n throw new Error('TODO: not implemented yet');\r\n}\r\n\r\nexport function getRouteForNewUI({\r\n getUrlSearch,\r\n selection: {\r\n '@odata.type': ODataType,\r\n Type,\r\n QueryString = '',\r\n ReportDataId = '',\r\n },\r\n}) {\r\n if (ODataType === '#Model.DimensionReportSelection') {\r\n switch (Type) {\r\n case 'VerticalPerformance': {\r\n const properties = getPropertiesFromQueryString(QueryString);\r\n\r\n const {\r\n routeFragmentForNewUI,\r\n } = _.find(\r\n HotelBIGridsMetadata,\r\n ({ specificProperty }) => _.contains(properties, specificProperty)\r\n );\r\n\r\n return `hotelcenter/overview/${routeFragmentForNewUI}${getUrlSearch()}`;\r\n }\r\n case 'PerformanceTargetReport': {\r\n if (QueryString.indexOf('PerformanceTargetName') >= 0) {\r\n return `performancetargets${getUrlSearch()}`;\r\n }\r\n return `performancetargets/history${getUrlSearch({ ptId: ReportDataId })}`;\r\n }\r\n case 'CampaignLabelReport':\r\n return `labelscampaign${getUrlSearch()}`;\r\n case 'AdGroupLabelReport':\r\n return `labelsadgroup${getUrlSearch()}`;\r\n case 'KeywordLabelReport':\r\n return `labelskeyword${getUrlSearch()}`;\r\n case 'AdLabelReport':\r\n return `labelsad${getUrlSearch()}`;\r\n case 'AccountLabelMccReport':\r\n return `labelsaccount${getUrlSearch()}`;\r\n default:\r\n throw new Error(`getRouteForNewUI: unsupported Type ${Type}`);\r\n }\r\n }\r\n\r\n throw new Error(`getRouteForNewUI: unsupported ODataType ${ODataType}`);\r\n}\r\n\r\nexport function getColumnsMetadata() {\r\n return _.defaults({\r\n DateRange: ['StartDate', 'EndDate'],\r\n });\r\n}\r\n","import _ from 'underscore';\r\nimport getLevel from '../util/get-level';\r\nimport PerformanceMetricsColumns from '../common-columns/performance-metrics-columns';\r\n\r\nexport function getName() {\r\n // maybe buggy, there are 3 DomainCategory grids, but uses same name\r\n return 'DomainCategory';\r\n}\r\n\r\nexport function getColumnsMetadata() {\r\n return _.defaults({\r\n CampaignName: 'Campaign/Name',\r\n AdGroupName: 'AdGroup/Name',\r\n }, PerformanceMetricsColumns);\r\n}\r\n\r\nexport function getRoute({\r\n CampaignId,\r\n AdGroupId,\r\n}) {\r\n const level = getLevel({\r\n CampaignId,\r\n AdGroupId,\r\n });\r\n\r\n switch (level) {\r\n case 'AdGroup':\r\n return 'customer/:customer_id/account/:account_id/campaign/:campaign_id/adgroup/:adgroup_id/autotargets/categories';\r\n case 'Campaign':\r\n return 'customer/:customer_id/account/:account_id/campaign/:campaign_id/autotargets/categories';\r\n case 'Account':\r\n default:\r\n return 'customer/:customer_id/account/:account_id/autotargets/categories';\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport PerformanceMetricsColumns from '../common-columns/performance-metrics-columns';\r\nimport getLevel from '../util/get-level';\r\n\r\nexport function getName() {\r\n return 'DsaSearchTerm';\r\n}\r\n\r\nexport function getColumnsMetadata() {\r\n return _.defaults({\r\n CampaignName: 'Campaign/Name',\r\n AdGroupName: 'AdGroup/Name',\r\n }, PerformanceMetricsColumns);\r\n}\r\n\r\nexport function getRoute({\r\n CampaignId,\r\n AdGroupId,\r\n}) {\r\n const level = getLevel({\r\n CampaignId,\r\n AdGroupId,\r\n });\r\n\r\n switch (level) {\r\n case 'AdGroup':\r\n return 'customer/:customer_id/account/:account_id/campaign/:campaign_id/adgroup/:adgroup_id/autotargets/searchterm';\r\n case 'Campaign':\r\n return 'customer/:customer_id/account/:account_id/campaign/:campaign_id/autotargets/searchterm';\r\n case 'Account':\r\n default:\r\n return 'customer/:customer_id/account/:account_id/autotargets/searchterm';\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport PerformanceMetricsColumns from '../common-columns/performance-metrics-columns';\r\nimport getLevel from '../util/get-level';\r\n\r\nexport function getName() {\r\n // maybe buggy, there are 3 DsaTarget grids, but uses same name\r\n return 'DsaTarget';\r\n}\r\n\r\nexport function getColumnsMetadata() {\r\n return _.defaults({\r\n CampaignName: 'Campaign/Name',\r\n AdGroupName: 'AdGroup/Name',\r\n Bid: 'CriterionBid',\r\n CriterionName: ['Operand1', 'Argument1', 'Operand2', 'Argument2', 'Operand3', 'Argument3'],\r\n CampaignType: 'Campaign/CampaignType',\r\n }, PerformanceMetricsColumns);\r\n}\r\n\r\nexport function getRoute({\r\n CampaignId,\r\n AdGroupId,\r\n}) {\r\n const level = getLevel({\r\n CampaignId,\r\n AdGroupId,\r\n });\r\n\r\n switch (level) {\r\n case 'AdGroup':\r\n return 'customer/:customer_id/account/:account_id/campaign/:campaign_id/adgroup/:adgroup_id/autotargets';\r\n case 'Campaign':\r\n return 'customer/:customer_id/account/:account_id/campaign/:campaign_id/autotargets';\r\n case 'Account':\r\n default:\r\n return 'customer/:customer_id/account/:account_id/autotargets';\r\n }\r\n}\r\n","import { getGridName, getGridRoute } from '../util/dimension-grids';\r\n\r\nexport function getName() {\r\n return getGridName(40);\r\n}\r\n\r\nexport function getRoute(selection) {\r\n return getGridRoute(selection, 'geographic');\r\n}\r\n","import mapToObject from '../util/map-to-object';\r\n\r\nconst HotelMetricsProperties = [\r\n 'Clicks',\r\n 'Impressions',\r\n 'CTR',\r\n 'Spend',\r\n 'SpendUSD',\r\n 'AverageCPC',\r\n 'AverageCPCUSD',\r\n 'AveragePosition',\r\n 'ConversionRate',\r\n 'Conversions',\r\n 'CPA',\r\n 'GrossRevenue',\r\n 'GrossRevenuePerClick',\r\n 'GrossRevenuePerConv',\r\n 'GrossROAS',\r\n 'NetRevenue',\r\n 'NetRevenuePerClick',\r\n 'NetRevenueConv',\r\n 'NetROAS',\r\n 'TotalBookedNights',\r\n 'AvgBookedABW',\r\n 'AvgBookedNights',\r\n 'BookedABW',\r\n];\r\n\r\nexport default mapToObject(\r\n HotelMetricsProperties,\r\n property => `Metrics/${property}`\r\n);\r\n","import _ from 'underscore';\r\nimport HotelMetricsColumns from '../common-columns/hotel-metrics-columns';\r\n\r\nexport function getName({\r\n CampaignId, // actually sub account id\r\n // AdGroupId, // actually hotel group id\r\n}) {\r\n if (CampaignId) {\r\n return 'HotelIdGrid';\r\n }\r\n return 'AllSubAccountHotelIdGrid';\r\n}\r\n\r\nexport function getColumnsMetadata() {\r\n return _.defaults({\r\n Bid: ['Bid', 'BidSource'],\r\n BidMultipliers: ['BidMultipliers', 'BidMultiplierSource'],\r\n }, HotelMetricsColumns);\r\n}\r\n\r\nexport function getPage() {\r\n return 'HotelCenter';\r\n}\r\n\r\nexport function getRoute() {\r\n return 'overview/grid-chooser-item-hotel-id';\r\n}\r\n","import { getColumnsMetadata as getHotelColumnsMetadata } from './hotel';\r\n\r\nexport function getName({\r\n CampaignId, // actually sub account id\r\n}) {\r\n if (CampaignId) {\r\n return 'HotelGroupGrid';\r\n }\r\n return 'AllSubAccountHotelGroupGrid';\r\n}\r\n\r\nexport function getColumnsMetadata() {\r\n return getHotelColumnsMetadata();\r\n}\r\n\r\nexport function getPage() {\r\n return 'HotelCenter';\r\n}\r\n\r\nexport function getRoute() {\r\n return 'overview/grid-chooser-item-hotel-group';\r\n}\r\n","import _ from 'underscore';\r\nimport PerformanceMetricsColumns from '../common-columns/performance-metrics-columns';\r\nimport PhonePerformanceMetricsColumns from '../common-columns/phone-performance-metrics-columns';\r\nimport SOVColumns from '../common-columns/sov-columns';\r\nimport SOVLostColumns from '../common-columns/sov-lost-columns';\r\nimport QualityScoreColumns from '../common-columns/quality-score-columns';\r\nimport getLevel from '../util/get-level';\r\n\r\nexport function getColumnsMetadata() {\r\n return _.defaults(\r\n {\r\n Keyword: 'Text',\r\n Campaign: 'Campaign/Name',\r\n AdGroup: 'AdGroup/Name',\r\n BidStrategyName: 'Campaign/BidStrategyName',\r\n BidStrategyType: 'BiddingScheme',\r\n Bid: 'Bid/Amount',\r\n Delivery: 'DeliveryStatus',\r\n LandingPage: ['DestinationUrl', 'FinalUrls', 'MobileFinalUrls'],\r\n CustomParameters: 'UrlCustomParameters',\r\n TrackingTemplate: 'TrackingUrlTemplate',\r\n FirstPageBidEstimation: 'BidEstimate/FirstPageBidEstimation',\r\n MainlineBidEstimation: 'BidEstimate/MainlineBidEstimation',\r\n BestPositionBidEstimation: 'BidEstimate/BestPositionBidEstimation',\r\n KeywordId: 'Id',\r\n },\r\n PerformanceMetricsColumns,\r\n PhonePerformanceMetricsColumns,\r\n SOVColumns,\r\n SOVLostColumns,\r\n QualityScoreColumns\r\n );\r\n}\r\n\r\nexport function getRoute({\r\n CampaignId,\r\n AdGroupId,\r\n}) {\r\n const level = getLevel({\r\n CampaignId,\r\n AdGroupId,\r\n });\r\n\r\n switch (level) {\r\n case 'AdGroup':\r\n return 'customer/:customer_id/account/:account_id/campaign/:campaign_id/adgroup/:adgroup_id/keyword/positive';\r\n case 'Campaign':\r\n return 'customer/:customer_id/account/:account_id/campaign/:campaign_id/keyword/positive';\r\n case 'Account':\r\n default:\r\n return 'customer/:customer_id/account/:account_id/keyword/positive';\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport getLevel from './get-level';\r\n\r\nexport function getGridName(selection, typeId) {\r\n return `settings_locations_excluded_${typeId}`;\r\n}\r\n\r\nexport function getGridColumnsMetadata() {\r\n return {\r\n Location: 'Criterion/Name',\r\n CampaignId: 'Campaign/Id',\r\n CampaignName: 'Campaign/Name',\r\n CampaignType: 'Campaign/CampaignType',\r\n AdGroupId: 'AdGroup/Id',\r\n AdGroupName: 'AdGroup/Name',\r\n Level: 'LevelOfDetails',\r\n };\r\n}\r\n\r\nexport function getGridRoute({\r\n CampaignId,\r\n AdGroupId,\r\n}, typeRoute) {\r\n const level = getLevel({\r\n CampaignId,\r\n AdGroupId,\r\n });\r\n\r\n switch (level) {\r\n case 'AdGroup':\r\n return `customer/:customer_id/account/:account_id/campaign/:campaign_id/adgroup/:adgroup_id/edit/locations/${typeRoute}`;\r\n case 'Campaign':\r\n return `customer/:customer_id/account/:account_id/campaign/:campaign_id/edit/locations/${typeRoute}`;\r\n case 'Account':\r\n default:\r\n return `customer/:customer_id/account/:account_id/campaign/settings/locations/${typeRoute}`;\r\n }\r\n}\r\n\r\nexport function getGridRouteForNewUI({\r\n getUrlSearch,\r\n entity,\r\n selection: {\r\n CampaignId,\r\n AdGroupId,\r\n },\r\n}) {\r\n const path = 'excluded';\r\n const level = _.result({\r\n NegativeCampaignCriterion: 'campaign',\r\n NegativeAdGroupCriterion: 'adgroup',\r\n }, entity);\r\n const search = getUrlSearch({\r\n campaignId: CampaignId,\r\n adGroupId: AdGroupId,\r\n });\r\n\r\n return `${path}/${level}${search}`;\r\n}\r\n","import {\r\n getGridName,\r\n getGridColumnsMetadata,\r\n getGridRoute,\r\n getGridRouteForNewUI,\r\n} from '../util/setting-negative-grids';\r\n\r\nexport function getName(selection) {\r\n return getGridName(selection, 1);\r\n}\r\n\r\nexport const getColumnsMetadata = getGridColumnsMetadata;\r\n\r\nexport function getRoute(selection) {\r\n return getGridRoute(selection, 'adgroup');\r\n}\r\n\r\nexport function getRouteForNewUI(options) {\r\n return getGridRouteForNewUI(options);\r\n}\r\n","import _ from 'underscore';\r\nimport PerformanceMetricsColumns from '../common-columns/performance-metrics-columns';\r\nimport getLevel from '../util/get-level';\r\n\r\nexport function getName() {\r\n return 'NegativeAdGroupDsaTarget';\r\n}\r\n\r\nexport function getColumnsMetadata() {\r\n return _.defaults({\r\n CampaignName: 'Campaign/Name',\r\n AdGroupName: 'AdGroup/Name',\r\n CriterionName: ['Operand1', 'Argument1', 'Operand2', 'Argument2', 'Operand3', 'Argument3'],\r\n }, PerformanceMetricsColumns);\r\n}\r\n\r\nexport function getRoute({\r\n CampaignId,\r\n AdGroupId,\r\n}) {\r\n const level = getLevel({\r\n CampaignId,\r\n AdGroupId,\r\n });\r\n\r\n switch (level) {\r\n case 'AdGroup':\r\n return 'customer/:customer_id/account/:account_id/campaign/:campaign_id/adgroup/:adgroup_id/autotargets/exclusions/adgroup';\r\n case 'Campaign':\r\n return 'customer/:customer_id/account/:account_id/campaign/:campaign_id/autotargets/exclusions/adgroup';\r\n case 'Account':\r\n default:\r\n return 'customer/:customer_id/account/:account_id/autotargets/exclusions/adgroup';\r\n }\r\n}\r\n","import {\r\n getGridName,\r\n getGridColumnsMetadata,\r\n getGridRoute,\r\n getGridRouteForNewUI,\r\n} from '../util/setting-negative-grids';\r\n\r\nexport function getName(selection) {\r\n return getGridName(selection, 0);\r\n}\r\n\r\nexport const getColumnsMetadata = getGridColumnsMetadata;\r\n\r\nexport function getRoute(selection) {\r\n return getGridRoute(selection, 'campaign');\r\n}\r\n\r\nexport function getRouteForNewUI(options) {\r\n return getGridRouteForNewUI(options);\r\n}\r\n","import getLevel from '../util/get-level';\r\n\r\nexport function getName() {\r\n return 'NegativeCampaignDsaTarget';\r\n}\r\n\r\nexport function getColumnsMetadata() {\r\n return {\r\n CampaignName: 'Campaign/Name',\r\n AdGroupName: 'AdGroup/Name',\r\n CriterionName: ['Operand1', 'Argument1', 'Operand2', 'Argument2', 'Operand3', 'Argument3'],\r\n };\r\n}\r\n\r\nexport function getRoute({\r\n CampaignId,\r\n AdGroupId,\r\n}) {\r\n const level = getLevel({\r\n CampaignId,\r\n AdGroupId,\r\n });\r\n\r\n switch (level) {\r\n case 'AdGroup':\r\n return 'customer/:customer_id/account/:account_id/campaign/:campaign_id/adgroup/:adgroup_id/autotargets/exclusions/campaign';\r\n case 'Campaign':\r\n return 'customer/:customer_id/account/:account_id/campaign/:campaign_id/autotargets/exclusions/campaign';\r\n case 'Account':\r\n default:\r\n return 'customer/:customer_id/account/:account_id/autotargets/exclusions/campaign';\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport PerformanceMetricsColumns from '../common-columns/performance-metrics-columns';\r\nimport PhonePerformanceMetricsColumns from '../common-columns/phone-performance-metrics-columns';\r\nimport SOVColumns from '../common-columns/sov-columns';\r\nimport SOVLostColumns from '../common-columns/sov-lost-columns';\r\nimport AudienceSOVColumns from '../common-columns/audience-sov-columns';\r\nimport QualityScoreColumns from '../common-columns/quality-score-columns';\r\n\r\nexport function getName() {\r\n return 'PortfolioBidStrategyGrid';\r\n}\r\n\r\nexport function getColumnsMetadata() {\r\n return _.defaults(\r\n {\r\n // key is UI column name, value is MT OData property name\r\n PortfolioGridBidStrategyName: 'Name',\r\n BidStrategyType: 'Type',\r\n BidStrategyStatus: 'Status',\r\n AssociatedCampaigns: 'AssociationCount',\r\n BidStrategyTargetCpa: 'TargetCpa',\r\n BidStrategyTargetRoas: 'TargetRoas',\r\n BidStrategyTargetImpressionShare: 'TargetImpressionShare',\r\n },\r\n PerformanceMetricsColumns,\r\n PhonePerformanceMetricsColumns,\r\n SOVColumns,\r\n SOVLostColumns,\r\n QualityScoreColumns,\r\n AudienceSOVColumns\r\n );\r\n}\r\n\r\n","import _ from 'underscore';\r\nimport getLevel from '../util/get-level';\r\nimport PerformanceMetricsColumns from '../common-columns/performance-metrics-columns';\r\n\r\nexport function getName() {\r\n return 'newProductGroupsGrid';\r\n}\r\n\r\nexport function getColumnsMetadata() {\r\n return _.defaults({\r\n ProductGroup: 'Condition',\r\n Bid: 'BidAmount/Bid/Amount',\r\n BidBoost: 'BidBoost/Multiplier',\r\n TrackingTemplate: 'TrackingUrlTemplate',\r\n CustomParameters: 'UrlCustomParameters',\r\n ProductsSubmitted: 'SubmittedOfferCount',\r\n ProductsTargeted: 'TargetedOfferCount',\r\n }, PerformanceMetricsColumns);\r\n}\r\n\r\nexport function getRoute({\r\n CampaignId,\r\n AdGroupId,\r\n IsAdGroupTreeView,\r\n}) {\r\n const level = getLevel({\r\n CampaignId,\r\n AdGroupId,\r\n });\r\n\r\n switch (level) {\r\n case 'AdGroup': {\r\n const baseUri = 'customer/:customer_id/account/:account_id/campaign/:campaign_id/adgroup/:adgroup_id/productgroups';\r\n return IsAdGroupTreeView ? baseUri : `${baseUri}/flatten`;\r\n }\r\n case 'Campaign':\r\n return 'customer/:customer_id/account/:account_id/campaign/:campaign_id/productgroups';\r\n case 'Account':\r\n default:\r\n return 'customer/:customer_id/account/:account_id/productgroups';\r\n }\r\n}\r\n\r\nexport function getRouteForNewUI({\r\n getUrlSearch,\r\n selection: {\r\n CampaignId,\r\n AdGroupId,\r\n IsAdGroupTreeView,\r\n },\r\n}) {\r\n const search = getUrlSearch({\r\n campaignId: CampaignId,\r\n adGroupId: AdGroupId,\r\n });\r\n const path = AdGroupId && IsAdGroupTreeView ?\r\n 'productgroups/hierarchy' :\r\n 'productgroups/list';\r\n\r\n return `${path}${search}`;\r\n}\r\n","import { getGridName, getGridRoute } from '../util/dimension-grids';\r\n\r\nexport function getName() {\r\n return getGridName(60);\r\n}\r\n\r\nexport function getRoute(selection) {\r\n return getGridRoute(selection, 'publisher');\r\n}\r\n","import _ from 'underscore';\r\nimport PerformanceMetricsColumns from '../common-columns/performance-metrics-columns';\r\nimport getLevel from '../util/get-level';\r\n\r\nexport function getColumnsMetadata() {\r\n return _.defaults({\r\n SearchTerm: 'Text',\r\n MatchType: 'DeliveredMatchType',\r\n MatchTypeWithCloseVariant: 'DeliveredMatchTypeWithCloseVariant',\r\n Campaign: 'Campaign/Name',\r\n AdGroup: 'AdGroup/Name',\r\n Keyword: 'Keyword/Text',\r\n CampaignType: 'Campaign/CampaignType',\r\n }, PerformanceMetricsColumns);\r\n}\r\n\r\nexport function getRoute({\r\n CampaignId,\r\n AdGroupId,\r\n}) {\r\n const level = getLevel({\r\n CampaignId,\r\n AdGroupId,\r\n });\r\n\r\n switch (level) {\r\n case 'AdGroup':\r\n return 'customer/:customer_id/account/:account_id/campaign/:campaign_id/adgroup/:adgroup_id/keyword/positive/searchterm';\r\n case 'Campaign':\r\n return 'customer/:customer_id/account/:account_id/campaign/:campaign_id/keyword/positive/searchterm';\r\n case 'Account':\r\n default:\r\n return 'customer/:customer_id/account/:account_id/keyword/positive/searchterm';\r\n }\r\n}\r\n","import { getGridName, getGridRoute } from '../util/dimension-grids';\r\n\r\nexport function getName() {\r\n return getGridName(20);\r\n}\r\n\r\nexport function getRoute(selection) {\r\n return getGridRoute(selection, 'searchquery');\r\n}\r\n","import _ from 'underscore';\r\nimport PerformanceMetricsColumns from '../common-columns/performance-metrics-columns';\r\nimport getDefaultName from '../defaults/get-default-name';\r\n\r\nexport function getName() {\r\n return getDefaultName('Combinations');\r\n}\r\n\r\nexport function getColumnsMetadata() {\r\n return _.defaults({\r\n AdPreview: ['Headline1', 'Headline2', 'Headline3', 'Description1', 'Description2'],\r\n Headline1: [],\r\n Headline2: [],\r\n Headline3: [],\r\n Description1: [],\r\n Description2: [],\r\n }, PerformanceMetricsColumns);\r\n}\r\n","import { getGridName, getShoppingGridRoute } from '../util/dimension-grids';\r\n\r\nexport function getName() {\r\n return getGridName(103);\r\n}\r\n\r\nexport function getRoute(selection) {\r\n return getShoppingGridRoute(selection, 'brand');\r\n}\r\n","import { getGridName, getShoppingGridRoute } from '../util/dimension-grids';\r\n\r\nexport function getName() {\r\n return getGridName(101);\r\n}\r\n\r\nexport function getRoute(selection) {\r\n return getShoppingGridRoute(selection, 'category');\r\n}\r\n","import { getGridName, getShoppingGridRoute } from '../util/dimension-grids';\r\n\r\nexport function getName() {\r\n return getGridName(104);\r\n}\r\n\r\nexport function getRoute(selection) {\r\n return getShoppingGridRoute(selection, 'item');\r\n}\r\n","import { getGridName, getShoppingGridRoute } from '../util/dimension-grids';\r\n\r\nexport function getName() {\r\n return getGridName(102);\r\n}\r\n\r\nexport function getRoute(selection) {\r\n return getShoppingGridRoute(selection, 'product');\r\n}\r\n","import { getGridName, getShoppingGridRoute } from '../util/dimension-grids';\r\n\r\nexport function getName() {\r\n return getGridName(105);\r\n}\r\n\r\nexport function getRoute(selection) {\r\n return getShoppingGridRoute(selection, 'store');\r\n}\r\n","import HotelMetricsColumns from '../common-columns/hotel-metrics-columns';\r\n\r\nexport function getName({\r\n CampaignId, // actually sub account id\r\n}) {\r\n if (CampaignId) {\r\n return 'HotelSubAccountGrid';\r\n }\r\n return 'AllSubAccountHotelSubAccountGrid';\r\n}\r\n\r\nexport function getColumnsMetadata() {\r\n return HotelMetricsColumns;\r\n}\r\n\r\nexport function getPage() {\r\n return 'HotelCenter';\r\n}\r\n\r\nexport function getRoute() {\r\n return 'overview/grid-chooser-item-subaccount';\r\n}\r\n","export default {\r\n TopImpressionRatePercent: 'TopImpressionRatePercent',\r\n AbsoluteTopImpressionRatePercent: 'AbsoluteTopImpressionRatePercent',\r\n TopImpressionShareLostToRankPercent: 'TopImpressionShareLostToRankPercent',\r\n TopImpressionShareLostToBudgetPercent: 'TopImpressionShareLostToBudgetPercent',\r\n AbsoluteTopImpressionShareLostToRankPercent: 'AbsoluteTopImpressionShareLostToRankPercent',\r\n AbsoluteTopImpressionShareLostToBudgetPercent: 'AbsoluteTopImpressionShareLostToBudgetPercent',\r\n};\r\n","import _ from 'underscore';\r\nimport DimensionSOVColumns from '../common-columns/dimension-sov-columns';\r\nimport { getGridName, getTimeGridRoute } from '../util/dimension-grids';\r\n\r\nexport function getName() {\r\n return getGridName(8);\r\n}\r\n\r\nexport function getRoute(selection) {\r\n return getTimeGridRoute(selection, 'date');\r\n}\r\n\r\nexport function getColumnsMetadata() {\r\n return _.defaults(DimensionSOVColumns);\r\n}\r\n","import _ from 'underscore';\r\nimport DimensionSOVColumns from '../common-columns/dimension-sov-columns';\r\nimport { getGridName, getTimeGridRoute } from '../util/dimension-grids';\r\n\r\nexport function getName() {\r\n return getGridName(7);\r\n}\r\n\r\nexport function getRoute(selection) {\r\n return getTimeGridRoute(selection, 'dayofweek');\r\n}\r\n\r\nexport function getColumnsMetadata() {\r\n return _.defaults(DimensionSOVColumns);\r\n}\r\n","import _ from 'underscore';\r\nimport DimensionSOVColumns from '../common-columns/dimension-sov-columns';\r\nimport { getGridName, getTimeGridRoute } from '../util/dimension-grids';\r\n\r\nexport function getName() {\r\n return getGridName(6);\r\n}\r\n\r\nexport function getRoute(selection) {\r\n return getTimeGridRoute(selection, 'hour');\r\n}\r\n\r\nexport function getColumnsMetadata() {\r\n return _.defaults(DimensionSOVColumns);\r\n}\r\n","import _ from 'underscore';\r\nimport DimensionSOVColumns from '../common-columns/dimension-sov-columns';\r\nimport { getGridName, getTimeGridRoute } from '../util/dimension-grids';\r\n\r\nexport function getName() {\r\n return getGridName(10);\r\n}\r\n\r\nexport function getRoute(selection) {\r\n return getTimeGridRoute(selection, 'month');\r\n}\r\n\r\nexport function getColumnsMetadata() {\r\n return _.defaults(DimensionSOVColumns);\r\n}\r\n","import _ from 'underscore';\r\nimport DimensionSOVColumns from '../common-columns/dimension-sov-columns';\r\nimport { getGridName, getTimeGridRoute } from '../util/dimension-grids';\r\n\r\nexport function getName() {\r\n return getGridName(11);\r\n}\r\n\r\nexport function getRoute(selection) {\r\n return getTimeGridRoute(selection, 'quarter');\r\n}\r\n\r\nexport function getColumnsMetadata() {\r\n return _.defaults(DimensionSOVColumns);\r\n}\r\n","import _ from 'underscore';\r\nimport DimensionSOVColumns from '../common-columns/dimension-sov-columns';\r\nimport { getGridName, getTimeGridRoute } from '../util/dimension-grids';\r\n\r\nexport function getName() {\r\n return getGridName(9);\r\n}\r\n\r\nexport function getRoute(selection) {\r\n return getTimeGridRoute(selection, 'week');\r\n}\r\n\r\nexport function getColumnsMetadata() {\r\n return _.defaults(DimensionSOVColumns);\r\n}\r\n","import _ from 'underscore';\r\nimport DimensionSOVColumns from '../common-columns/dimension-sov-columns';\r\nimport { getGridName, getTimeGridRoute } from '../util/dimension-grids';\r\n\r\nexport function getName() {\r\n return getGridName(12);\r\n}\r\n\r\nexport function getRoute(selection) {\r\n return getTimeGridRoute(selection, 'year');\r\n}\r\n\r\nexport function getColumnsMetadata() {\r\n return _.defaults(DimensionSOVColumns);\r\n}\r\n","import { getGridName, getGridRoute } from '../util/dimension-grids';\r\n\r\nexport function getName() {\r\n return getGridName(30);\r\n}\r\n\r\nexport function getRoute(selection) {\r\n return getGridRoute(selection, 'userlocation');\r\n}\r\n","import * as AccountMetadata from './grids/account';\r\nimport * as AdExtensionAssociationMetadata from './grids/ad-extension-association';\r\nimport * as AdGroupMetadata from './grids/ad-group';\r\nimport * as AdGroupAudienceAssociationMetadata from './grids/ad-group-audience-association';\r\nimport * as AdGroupCriterionMetadata from './grids/ad-group-criterion';\r\nimport * as AdMetadata from './grids/ad';\r\nimport * as AgeAndGenderMetadata from './grids/age-and-gender';\r\nimport * as AssetLinkMetadata from './grids/asset-link';\r\nimport * as AssetWithBIDataMetadata from './grids/asset-with-bi-data';\r\nimport * as AudienceAssociationMetadata from './grids/audience-association';\r\nimport * as AutomatedExtensionMetadata from './grids/automated-extension';\r\nimport * as BudgetMetadata from './grids/budget';\r\nimport * as CallForwardingDetailMetadata from './grids/call-forwarding-detail';\r\nimport * as CampaignMetadata from './grids/campaign';\r\nimport * as CampaignCriterionMetadata from './grids/campaign-criterion';\r\nimport * as ChangeHistoryDetailReportMetadata from './grids/change-history-detail-report';\r\nimport * as DestinationUrlMetadata from './grids/destination-url';\r\nimport * as DimensionRowMetadata from './grids/dimension-row';\r\nimport * as DomainCategoryMetadata from './grids/domain-category';\r\nimport * as DsaSearchTermMetadata from './grids/dsa-search-term';\r\nimport * as DsaTargetMetadata from './grids/dsa-target';\r\nimport * as GeographicMetadata from './grids/geographic';\r\nimport * as HotelMetadata from './grids/hotel';\r\nimport * as HotelGroupMetadata from './grids/hotel-group';\r\nimport * as KeywordMetadata from './grids/keyword';\r\nimport * as NegativeAdGroupCriterionMetadata from './grids/negative-ad-group-criterion';\r\nimport * as NegativeAdGroupDsaTargetMetadata from './grids/negative-ad-group-dsa-target';\r\nimport * as NegativeCampaignCriterionMetadata from './grids/negative-campaign-criterion';\r\nimport * as NegativeCampaignDsaTargetMetadata from './grids/negative-campaign-dsa-target';\r\nimport * as PortfolioBidStrategyMetadata from './grids/portfolio-bid-strategy';\r\nimport * as ProductGroupMetadata from './grids/product-group';\r\nimport * as PublisherWebsiteMetadata from './grids/publisher-website';\r\nimport * as SearchTermMetadata from './grids/search-term';\r\nimport * as SearchTermsMetadata from './grids/search-terms';\r\nimport * as ResponsiveSearchAdInstanceMetadata from './grids/responsive-search-ad-instance';\r\nimport * as ShoppingBrandMetadata from './grids/shopping-brand';\r\nimport * as ShoppingCategoryMetadata from './grids/shopping-category';\r\nimport * as ShoppingItemIdMetadata from './grids/shopping-item-id';\r\nimport * as ShoppingProductTypeMetadata from './grids/shopping-product-type';\r\nimport * as ShoppingStoreIdMetadata from './grids/shopping-store-id';\r\nimport * as SubAccountMetadata from './grids/sub-account';\r\nimport * as TimeDateMetadata from './grids/time-date';\r\nimport * as TimeDayOfWeekMetadata from './grids/time-day-of-week';\r\nimport * as TimeHourOfDayMetadata from './grids/time-hour-of-day';\r\nimport * as TimeMonthMetadata from './grids/time-month';\r\nimport * as TimeQuarterMetadata from './grids/time-quarter';\r\nimport * as TimeWeekMetadata from './grids/time-week';\r\nimport * as TimeYearMetadata from './grids/time-year';\r\nimport * as UserLocationsMetadata from './grids/user-locations';\r\n\r\nexport default {\r\n Account: AccountMetadata,\r\n Ad: AdMetadata,\r\n AdExtensionAssociation: AdExtensionAssociationMetadata,\r\n AdGroup: AdGroupMetadata,\r\n AdGroupAudienceAssociation: AdGroupAudienceAssociationMetadata,\r\n AdGroupCriterion: AdGroupCriterionMetadata,\r\n 'AgeAndGender ': AgeAndGenderMetadata,\r\n AssetLink: AssetLinkMetadata,\r\n AssetWithBIData: AssetWithBIDataMetadata,\r\n AudienceAssociation: AudienceAssociationMetadata,\r\n AutomatedExtension: AutomatedExtensionMetadata,\r\n Budget: BudgetMetadata,\r\n CallForwardingDetail: CallForwardingDetailMetadata,\r\n Campaign: CampaignMetadata,\r\n CampaignCriterion: CampaignCriterionMetadata,\r\n ChangeHistoryDetailReport: ChangeHistoryDetailReportMetadata,\r\n DestinationUrl: DestinationUrlMetadata,\r\n DimensionRow: DimensionRowMetadata,\r\n DomainCategory: DomainCategoryMetadata,\r\n DsaSearchTerm: DsaSearchTermMetadata,\r\n DsaTarget: DsaTargetMetadata,\r\n Geographic: GeographicMetadata,\r\n Hotel: HotelMetadata,\r\n HotelGroup: HotelGroupMetadata,\r\n Keyword: KeywordMetadata,\r\n NegativeAdGroupCriterion: NegativeAdGroupCriterionMetadata,\r\n NegativeAdGroupDsaTarget: NegativeAdGroupDsaTargetMetadata,\r\n NegativeCampaignCriterion: NegativeCampaignCriterionMetadata,\r\n NegativeCampaignDsaTarget: NegativeCampaignDsaTargetMetadata,\r\n PortfolioBidStrategy: PortfolioBidStrategyMetadata,\r\n ProductGroup: ProductGroupMetadata,\r\n PublisherWebsite: PublisherWebsiteMetadata,\r\n ResponsiveSearchAdInstance: ResponsiveSearchAdInstanceMetadata,\r\n SearchTerm: SearchTermMetadata,\r\n SearchTerms: SearchTermsMetadata,\r\n ShoppingBrand: ShoppingBrandMetadata,\r\n ShoppingCategory: ShoppingCategoryMetadata,\r\n ShoppingItemId: ShoppingItemIdMetadata,\r\n ShoppingProductType: ShoppingProductTypeMetadata,\r\n ShoppingStoreId: ShoppingStoreIdMetadata,\r\n SubAccount: SubAccountMetadata,\r\n TimeDate: TimeDateMetadata,\r\n TimeDayOfWeek: TimeDayOfWeekMetadata,\r\n TimeHourOfDay: TimeHourOfDayMetadata,\r\n TimeMonth: TimeMonthMetadata,\r\n TimeQuarter: TimeQuarterMetadata,\r\n TimeWeek: TimeWeekMetadata,\r\n TimeYear: TimeYearMetadata,\r\n UserLocations: UserLocationsMetadata,\r\n};\r\n","import _ from 'underscore';\r\nimport defaultColumns from './defaults/default-columns';\r\nimport getDefaultName from './defaults/get-default-name';\r\nimport getDefaultFilter from './defaults/get-default-filter';\r\nimport getDefaultRoute, { getDefaultRouteForNewUI } from './defaults/get-default-route';\r\nimport { defaultColumnConversions } from './defaults/default-column-conversions';\r\nimport fillRoute from './util/fill-route';\r\nimport allGridsMetadata from './all-grids-metadata';\r\n\r\nfunction getGridMetadata(entity) {\r\n return allGridsMetadata[entity] || {};\r\n}\r\n\r\nexport function getGridName(entity, selection) {\r\n const {\r\n getName = () => getDefaultName(entity),\r\n } = getGridMetadata(entity);\r\n\r\n return getName(selection);\r\n}\r\n\r\nfunction getGridColumnsMetadata(entity, selection) {\r\n const {\r\n getColumnsMetadata = () => ({}),\r\n } = getGridMetadata(entity);\r\n\r\n return _.defaults({}, getColumnsMetadata(selection), defaultColumns);\r\n}\r\n\r\nexport function getGridColumnConversions(\r\n entity,\r\n selection,\r\n { withPartialConversion = false } = {}\r\n) {\r\n const {\r\n getColumnsConversionMetadata = _.constant({}),\r\n } = getGridMetadata(entity);\r\n\r\n const transform = withPartialConversion ? _.identity : _.invert;\r\n const transformedDefaultColumnConversions = transform(defaultColumnConversions);\r\n\r\n // columnConversionMetadata =\r\n // { [sourceColumnName]: '' }\r\n const columnConversionMetadata = _.defaults(\r\n {},\r\n getColumnsConversionMetadata(selection, withPartialConversion),\r\n transformedDefaultColumnConversions\r\n );\r\n\r\n // returns =>\r\n // { [targetColumnName]: { sourceColumnName } }\r\n return _.chain(columnConversionMetadata)\r\n .pairs()\r\n .map(([sourceColumnName, targetColumnName]) => [targetColumnName, { sourceColumnName }])\r\n .object()\r\n .value();\r\n}\r\n\r\n/**\r\n * A number, or a string containing a number.\r\n * @typedef {(string|string[])} PropertyPath\r\n */\r\n\r\n/**\r\n * return associated properties to the given columns\r\n * @param {string} entity - the entity of the grid\r\n * @param {string[]} columnNames - the column names selected in the grid\r\n * @param {Selection} selection - the selection object used in ReportRule for inline download\r\n * @returns {PropertyPath[]} properties associated to the columns\r\n * deep property are represented as array\r\n * as an example:\r\n * for Campaign Grid with columns ['CampaignId', 'Clicks']\r\n * [\r\n * 'Id',\r\n * ['PerformanceMetrics', 'Clicks'],\r\n * ]\r\n */\r\nexport function getGridColumnsProperties(entity, columnNames, selection) {\r\n const allColumns = getGridColumnsMetadata(entity, selection);\r\n\r\n return _.map(_.flatten(_.map(columnNames, name => allColumns[name] || name)), (property) => {\r\n const frags = property.split('/');\r\n\r\n return frags.length === 1 ? property : frags;\r\n });\r\n}\r\n\r\nfunction stringifyPropertyPath(propertyPath) {\r\n return _.isArray(propertyPath) ? propertyPath.join('/') : propertyPath;\r\n}\r\n\r\n/**\r\n * return column names which correspond to the properties given\r\n * @param {string} entity - the entity of the grid\r\n * @param {PropertyPath[]} properties - the properties downloaded in inline download report\r\n * @param {Selection} selection - the selection object used in ReportRule for inline download\r\n * @returns {string[]} column names correspond to the properties given\r\n * as an example:\r\n * for Campaign Grid with properties ['Id', ['PerformanceMetrics', 'Clicks']]\r\n * [\r\n * 'CampaignId',\r\n * 'Clicks',\r\n * ]\r\n */\r\nexport function getGridColumnNames(entity, properties, selection) {\r\n const allColumns = getGridColumnsMetadata(entity, selection);\r\n\r\n return _.uniq(_.map(properties, (property) => {\r\n const strProperty = stringifyPropertyPath(property);\r\n\r\n const isInColumnProperties =\r\n columnProperties =>\r\n strProperty === columnProperties ||\r\n _.contains(columnProperties, strProperty);\r\n\r\n return _.findKey(allColumns, isInColumnProperties) || strProperty;\r\n }));\r\n}\r\n\r\nexport function getGridFilter(entity, selection) {\r\n const {\r\n getFilter = () => getDefaultFilter(entity, selection),\r\n } = getGridMetadata(entity);\r\n\r\n return getFilter(selection);\r\n}\r\n\r\nexport function getGridPage(entity, selection) {\r\n const {\r\n getPage = () => 'Campaigns',\r\n } = getGridMetadata(entity);\r\n\r\n return getPage(selection);\r\n}\r\n\r\n/**\r\n * return route for given entity & selection\r\n * @param {string} entity - the entity of the grid\r\n * @param {Selection} selection - the selection object used in ReportRule for inline download\r\n * @returns {string} the route for the grid, placeholders are filled\r\n */\r\nexport function getGridRoute(entity, selection) {\r\n const {\r\n getRoute = () => getDefaultRoute(entity, selection),\r\n } = getGridMetadata(entity);\r\n\r\n return fillRoute(getRoute(selection), selection);\r\n}\r\n\r\nexport function getGridRouteForNewUI({\r\n getUrlSearch, entity, selection, serverContext,\r\n}) {\r\n const {\r\n getRouteForNewUI = getDefaultRouteForNewUI,\r\n } = getGridMetadata(entity);\r\n const route = getRouteForNewUI({\r\n getUrlSearch, entity, selection, serverContext,\r\n });\r\n\r\n return `/campaign/vnext/${route}`;\r\n}\r\n","import _ from 'underscore';\r\n\r\nexport default function fillRoute(route, {\r\n CampaignId,\r\n AdGroupId,\r\n}) {\r\n let filled = route;\r\n\r\n if (!_.isNull(CampaignId)) {\r\n filled = filled.replace(':campaign_id', CampaignId);\r\n }\r\n if (!_.isNull(AdGroupId)) {\r\n filled = filled.replace(':adgroup_id', AdGroupId);\r\n }\r\n\r\n return filled;\r\n}\r\n","import { uncheckedInjectionContext as globalContext } from '@bingads-webui-campaign/injection-context';\r\nimport pkgJSON from './package.json';\r\n\r\nconst { legacyDependencies } = pkgJSON;\r\n\r\nexport const InlineDownloadReportDataRepositoryLoader = globalContext.define(\r\n legacyDependencies,\r\n Promise => import(/* webpackMode: 'eager' */ './src/create-inline-download-report-data-repository') // eslint-disable-line no-unused-vars\r\n);\r\n\r\nexport * from './src/index';\r\n","import _ from 'underscore';\r\nimport { uncheckedInjectionContext as globalContext } from '@bingads-webui-campaign/injection-context';\r\nimport * as downloadServiceSharedComponent from '@bingads-webui/download-service';\r\n\r\nimport { InlineDownloadReportDataRepository } from './inline-download-report-data-repository';\r\n\r\nconst asyncScheduler = globalContext.require('module/service/shared/asyncScheduler');\r\nconst cacheManager = globalContext.requireDefault('campaignui/feature/cache-manager/index');\r\nconst { getODataErrors } = globalContext.require('component/api-errors-campaign/index');\r\nconst i18n = globalContext.require('@bingads-webui/i18n-amd-loader!@bingads-webui-campaign/inline-download-report-data-repository');\r\nconst odata = globalContext.require('component/http/channel/odata');\r\nconst pageContext = globalContext.require('PageContext');\r\n\r\n/**\r\n * Creates a new instance of InlineDownloadReportDataRepository based on legacy dependencies\r\n * imported via the injection-context.\r\n * @param {Object} options - Additional options to be passed to constructor.\r\n * @returns {InlineDownloadReportDataRepository} New instance of repository.\r\n */\r\nexport function createInlineDownloadReportDataRepository(options) {\r\n const alertCenter = options.alertCenter || window.App.views.alertCenter;\r\n const downloadService = options.downloadService || downloadServiceSharedComponent;\r\n\r\n const deps = {\r\n alertCenter,\r\n asyncScheduler,\r\n cacheManager,\r\n downloadService,\r\n getODataErrors,\r\n i18n,\r\n odata,\r\n pageContext,\r\n };\r\n\r\n return new InlineDownloadReportDataRepository(_.extend({ deps }, options));\r\n}\r\n","// In Accounts Summary page, odata component won't fill Account ID as Account ID doesn't exist\r\n// But MT buggy implementation still need Account ID\r\nexport function getURLWithScope(pageContext, urlWithoutScope, isCustomerLevel = false) {\r\n return isCustomerLevel ?\r\n `Customers(${pageContext.CurrentCustomer.Id})/${urlWithoutScope}` :\r\n `Customers(${pageContext.CurrentCustomer.Id})/Accounts(${pageContext.CurrentAccount.Id})/${urlWithoutScope}`;\r\n}\r\n","import _ from 'underscore';\r\nimport URI from 'urijs';\r\nimport { convertServerSideErrors, getURLWithScope, pollTaskItemExecution } from '@bingads-webui-campaign/inline-download-repository-core';\r\n\r\n// Avoid fast cleanup before iframe src is fired in chrome\r\nconst DELAY_AFTER_DOWNLOAD_TASK_IN_MS = 4000;\r\n\r\nexport class InlineDownloadReportDataRepository {\r\n constructor({\r\n deps,\r\n delayAfterDownload = DELAY_AFTER_DOWNLOAD_TASK_IN_MS,\r\n isCustomerLevel = true,\r\n currentActivity = null,\r\n }) {\r\n this.deps = deps;\r\n\r\n this.alertId = null;\r\n this.delayAfterDownload = delayAfterDownload;\r\n this.isCustomerLevel = isCustomerLevel;\r\n\r\n if (currentActivity) {\r\n this.currentActivity = currentActivity;\r\n }\r\n }\r\n\r\n generateUrl() {\r\n return getURLWithScope(\r\n this.deps.pageContext,\r\n 'TaskItems/SubmitReportDataTaskItem?$expand=TaskItemExecutions',\r\n this.isCustomerLevel\r\n );\r\n }\r\n\r\n download(options) {\r\n const {\r\n alertCenter,\r\n asyncScheduler,\r\n downloadService,\r\n getODataErrors,\r\n odata,\r\n i18n,\r\n pageContext,\r\n } = this.deps;\r\n\r\n const url = this.generateUrl(options);\r\n const headers = this.generateHeaders(options);\r\n const data = this.generateBody(options);\r\n\r\n const postDownloadRequest = odata.post(url, {\r\n headers,\r\n data,\r\n }).catch(({ errors } = {}) => {\r\n throw convertServerSideErrors({ errors, getODataErrors, i18n });\r\n });\r\n\r\n // post the download request and start polling for it\r\n return postDownloadRequest.then((response) => {\r\n if (response && !_.isEmpty(response.TaskItemExecutions)) {\r\n // add log when get taskItemExecutionId from mt\r\n if (this.currentActivity) {\r\n this.currentActivity.trace({\r\n taskItemExecutionId: response.TaskItemExecutions[0].Id,\r\n }, 'InlineDownloadReportDataRepository/postDownloadRequest');\r\n }\r\n // return the first taskItemExecution so that it can be polled\r\n return response.TaskItemExecutions[0];\r\n }\r\n throw new Error(i18n.getString('GridDownloadFailureMessage'));\r\n }).then(({ Id }) => {\r\n // show an alert saying that download request was successfully submitted\r\n this.alertId = alertCenter.showConfirmation(\r\n i18n.getString('GridDownloadStatusMessage'),\r\n this.alertId\r\n );\r\n\r\n return pollTaskItemExecution({\r\n taskItemExecutionId: Id,\r\n i18n,\r\n pageContext,\r\n odata,\r\n asyncScheduler,\r\n currentActivity: this.currentActivity,\r\n }).finally(() => alertCenter.dismiss(this.alertId))\r\n .then(resultUrl => downloadService.download(resultUrl, URI(resultUrl).filename(true)))\r\n .delay(this.delayAfterDownload);\r\n });\r\n }\r\n\r\n /**\r\n * Generates the headers to be sent to MT.\r\n * @param {Object} options.Entity - Entity to use for getting the cache hint.\r\n * @returns {Object} Object representing list of header keys and values.\r\n */\r\n generateHeaders({ Entity }) {\r\n return {\r\n 'x-ms-lastwritetime': this.deps.cacheManager.getCacheHint({\r\n adapter: 'odata',\r\n resource: Entity, // this may not be always correct\r\n }) || 'Max',\r\n };\r\n }\r\n\r\n /**\r\n * Generates the POST body.\r\n * @param {Object} options - Defines the values set in the body.\r\n * @returns {Object} Body to be sent in the POST request.\r\n */\r\n generateBody(options) {\r\n const ReportData = _.defaults(options, {\r\n '@odata.type': '#Model.ReportDataTaskItem',\r\n SchemaName: 'V1',\r\n Cron: '',\r\n ReportAggregation: 'Summary',\r\n });\r\n\r\n return { ReportData };\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\n\r\n/**\r\n * Converts the list of errors in a TaskItemExecution to localized error messages.\r\n * @param {Object[]} options.errors - List of errors that occurred during execution.\r\n * @param {function} options.getODataErrors - Function to parse odata errors from AJAX response.\r\n * @param {Object} options.i18n - i18n library.\r\n * @returns {Promise.AggregateError} - List of localized error messages.\r\n */\r\nexport function convertServerSideErrors({\r\n errors,\r\n getODataErrors,\r\n i18n,\r\n}) {\r\n const serverErrors = _.uniq(getODataErrors(errors), false, error => error.message);\r\n\r\n const aggregateError = new Promise.AggregateError();\r\n\r\n if (_.isEmpty(serverErrors)) {\r\n aggregateError.push(new Error(i18n.getString('GridDownloadFailureMessage')));\r\n }\r\n\r\n aggregateError.push(...serverErrors);\r\n aggregateError.message = i18n.formatList(serverErrors.map(err => err.message));\r\n return aggregateError;\r\n}\r\n","import Promise from 'bluebird';\r\n\r\nimport { getURLWithScope } from './get-url-with-scope';\r\n\r\nconst MAX_POLL_ATTEMPTS = 60;\r\n\r\nconst pollIntervalTimeout = 5000;\r\nconst excelLimitExceededErrorCode = 18000;\r\nconst excelLimitExceededErrorString = 'TooMuchExcelDataToDownload';\r\nconst maxSuccessiveFailureCount = 5;\r\n\r\n/**\r\n * Polls the status of a TaskItemExecution.\r\n * @param {number} options.taskItemExecutionId - Id of the TaskItemExecution.\r\n * @param {Function} options.getURLWithScope - Function to get the URL with the appropriate scope.\r\n * @param {Object} options.i18n - i18n library.\r\n * @param {Object} options.odata - odata library.\r\n * @param {Object} options.asyncScheduler - asyncScheduler library.\r\n * @param {Object} options.pageContext - PageContext library.\r\n * @param {number} options.maxPollCount - Max number of times to poll.\r\n * @returns {Promise} Resolves to the ResultId.\r\n */\r\nexport function pollTaskItemExecution({\r\n taskItemExecutionId,\r\n i18n,\r\n odata,\r\n asyncScheduler,\r\n pageContext,\r\n maxPollCount = MAX_POLL_ATTEMPTS,\r\n currentActivity = null,\r\n}) {\r\n return new Promise((resolve, reject) => {\r\n let successiveFailureCount = 0;\r\n let pollCount = 0;\r\n\r\n // Define task and event handler\r\n const recurringTask = asyncScheduler.createTask({\r\n task: () => {\r\n pollCount += 1;\r\n if (pollCount > maxPollCount) {\r\n recurringTask.stop();\r\n reject(new Error(i18n.getString('GridDownloadFailureMessage')));\r\n }\r\n\r\n return odata.get(getURLWithScope(pageContext, `TaskItemExecutions(${taskItemExecutionId})`));\r\n },\r\n schedule: pollIntervalTimeout,\r\n });\r\n\r\n recurringTask.on('success', ({\r\n data,\r\n stopTask,\r\n }) => {\r\n // add log when get AzureBlobUrl from mt\r\n if (currentActivity) {\r\n currentActivity.trace({\r\n Id: data.Id,\r\n ResultId: data.ResultId,\r\n Status: data.Status,\r\n }, 'ReportDataTaskItemExecution/getAzureBlobUrl');\r\n }\r\n successiveFailureCount = 0;\r\n if (data) {\r\n const { Status, ResultId } = data;\r\n\r\n if (Status === 'Completed') {\r\n stopTask();\r\n resolve(ResultId);\r\n } else if (Status === 'Failed' || Status === 'RetryNeeded') {\r\n stopTask();\r\n\r\n let errorMessage = i18n.getString('GridDownloadFailureMessage');\r\n if (ResultId === excelLimitExceededErrorCode\r\n || ResultId === excelLimitExceededErrorString) {\r\n errorMessage = i18n.getString('GridDownloadLimit_RowsExceeded_Alert');\r\n }\r\n reject(new Error(errorMessage));\r\n }\r\n }\r\n });\r\n\r\n recurringTask.on('error', ({ error: eventError = new Error() }) => {\r\n successiveFailureCount += 1;\r\n if (maxSuccessiveFailureCount <= successiveFailureCount) {\r\n recurringTask.stop();\r\n reject(eventError);\r\n }\r\n });\r\n\r\n recurringTask.start();\r\n });\r\n}\r\n"],"names":["getDefaultName","entity","concat","underscored","getQueryPart","queryString","partPrefix","part","_","split","frag","startsWith","substr","length","selectPrefix","getPropertiesFromQueryString","filterPrefix","getDefaultFilter","_ref","filterPart","parse","decodeURIComponent","getFilterFromQueryString","QueryString","getLevel","CampaignId","AdGroupId","getDefaultRoute","level","lowerCased","toLowerCase","Customer","Account","Campaign","AdGroup","getDefaultRoutes","constants","Complex","Deleted","getDefaultRouteForNewUI","_ref2","getUrlSearch","_ref2$selection","selection","AdId","path","_serverContext$Dynami","arguments","undefined","DynamicPermissions","Ad","AdExtensionAssociation","AdGroupAudienceAssociation","AdGroupCriterion","AssetLink","AssetWithBIData","AudienceAssociation","AutomatedExtension","Budget","CallForwardingDetail","CampaignCriterion","ChangeHistoryDetailReport","DestinationUrl","DimensionRow","DomainCategory","DsaSearchTerm","DsaTarget","Folder","Geographic","Hotel","HotelGroup","Keyword","NegativeAdGroupCriterion","NegativeAdGroupDsaTarget","NegativeCampaignCriterion","NegativeCampaignDsaTarget","PortfolioBidStrategy","DataExclusions","ProductGroup","PublisherWebsite","ResponsiveSearchAdInstance","SearchTerm","SearchTerms","ShoppingBrand","ShoppingCategory","ShoppingItemId","ShoppingProductType","ShoppingStoreId","SubAccount","TimeDate","TimeDayOfWeek","TimeHourOfDay","TimeMonth","TimeQuarter","TimeWeek","TimeYear","UserLocations","entityToPath","serverContext","search","campaignId","adGroupId","adId","defaultColumnConversions","_objectSpread","Conversions","CPA","ConversionRate","AllConversionCPA","AllConversions","AllConversionRate","ViewThroughConversionsCPA","ViewThroughConversionsRate","ViewThroughConversions","mapToObject","list","iteratee","property","ImpShare","ImpShareLostToBudget","ImpShareLostToRank","ImpShareLostToAdRelevance","ImpShareLostToExpectedCTR","ImpShareLostToBid","TopImpressionShareLostToRank","TopImpressionShareLostToBudget","AbsoluteTopImpressionShareLostToRank","AbsoluteTopImpressionShareLostToBudget","AudienceImpressionShare","AudienceImpressionShareLostToBudget","AudienceImpressionShareLostToRank","name","getName","getColumnsMetadata","AccountName","AccountInactiveReasons","TotalEffectiveCost","IOPurchaseOrder","IOBudget","RemainingIOBudget","StartDate","EndDate","DailyBudget","TotalRemainingIOBudget","OverallEndDate","QualityScore","PerformanceMetricsColumns","SOVColumns","SOVLostColumns","AudienceSOVColumns","getPage","getRoute","AdExtensionType","AssociationType","CampaignName","AdGroupName","Delivery","Status","AdExtensionId","Schedule","TimeZone","typeFragment","associationFragment","getRouteForNewUI","_ref3","_ref3$selection","type","sitelink2","BidStrategyName","BidStrategyType","TrackingTemplate","CustomParameters","CallForwarding","Language","CashbackScope","CashbackPercent","Coupon","PhonePerformanceMetricsColumns","QualityScoreColumns","AudienceId","AudienceName","AudienceType","BidMultiplier","gridsMetadata","Locations","queryStringRegex","generateName","typeId","routeFragment","AdSchedule","Devices","test","indexOf","DevicesOS","Age","routeFragmentForNewUI","Gender","CompanyName","Industry","JobFunction","findMetadata","isDemographics","key","findMetadataKey","getGridName","getGridColumnsMetadata","_ref4$QueryString","mapping","BidAdj","CampaignType","Level","DayTime","DeviceName","Company","OSName","Location","getGridFilter","_ref5","fixed","replace","match","prop","originalFilter","filter","Criterion","$type","$and","predicate","removeCriterion$typePredicate","getGridRoute","_ref6","typeRoute","routePart","getGridRouteForNewUI","_ref7","_ref7$selection","_ref8","getFilter","options","AdPreview","AdID","AdType","id","getTimeGridRoute","getShoppingGridRoute","Asset","AssetId","AssetSource","AssetType","PinnedField","AssetPerformanceLabel","PolicyStatus","AssetStatus","UsedByCount","UsedByAssetGroupCount","PinnedCount","PerformanceRating","AdExtension","BudgetName","BudgetStatus","CampaignCount","BudgetGridQueryStringRegex","_ref$QueryString","PerformanceTargetInstanceId","_ref2$QueryString","CampaignStatus","DisplayBiddingStrategyType","Languages","CashbackBudget","AppPerformanceMetricsColumns","_selection$QueryStrin","PerformanceTargetId","exec","_selection$QueryStrin2","ptId","instanceId","budgetId","DateTimeUser","Tool","Changes","Undo","HotelBIGridsMetadata","AdvancedBookingGrid","specificProperty","CheckinDayGrid","DateTypeGrid","HotelCountryGrid","HotelDeviceTypeGrid","HotelDateGrid","HotelLengthOfStayGrid","HotelUserCountryGrid","HotelSlotTypeGrid","SiteTypeGrid","ODataType","Type","properties","_ref4","_ref4$ReportDataId","ReportDataId","Error","_ref6$selection","_ref6$selection$Query","_ref6$selection$Repor","DateRange","Bid","CriterionName","BidMultipliers","HotelMetricsColumns","getHotelColumnsMetadata","LandingPage","FirstPageBidEstimation","MainlineBidEstimation","BestPositionBidEstimation","KeywordId","PortfolioGridBidStrategyName","BidStrategyStatus","AssociatedCampaigns","BidStrategyTargetCpa","BidStrategyTargetRoas","BidStrategyTargetImpressionShare","BidBoost","ProductsSubmitted","ProductsTargeted","IsAdGroupTreeView","baseUri","MatchType","MatchTypeWithCloseVariant","Headline1","Headline2","Headline3","Description1","Description2","TopImpressionRatePercent","AbsoluteTopImpressionRatePercent","TopImpressionShareLostToRankPercent","TopImpressionShareLostToBudgetPercent","AbsoluteTopImpressionShareLostToRankPercent","AbsoluteTopImpressionShareLostToBudgetPercent","DimensionSOVColumns","AccountMetadata","AdMetadata","AdExtensionAssociationMetadata","AdGroupMetadata","AdGroupAudienceAssociationMetadata","AdGroupCriterionMetadata","AgeAndGenderMetadata","AssetLinkMetadata","AssetWithBIDataMetadata","AudienceAssociationMetadata","AutomatedExtensionMetadata","BudgetMetadata","CallForwardingDetailMetadata","CampaignMetadata","CampaignCriterionMetadata","ChangeHistoryDetailReportMetadata","DestinationUrlMetadata","DimensionRowMetadata","DomainCategoryMetadata","DsaSearchTermMetadata","DsaTargetMetadata","GeographicMetadata","HotelMetadata","HotelGroupMetadata","KeywordMetadata","NegativeAdGroupCriterionMetadata","NegativeAdGroupDsaTargetMetadata","NegativeCampaignCriterionMetadata","NegativeCampaignDsaTargetMetadata","PortfolioBidStrategyMetadata","ProductGroupMetadata","PublisherWebsiteMetadata","ResponsiveSearchAdInstanceMetadata","SearchTermMetadata","SearchTermsMetadata","ShoppingBrandMetadata","ShoppingCategoryMetadata","ShoppingItemIdMetadata","ShoppingProductTypeMetadata","ShoppingStoreIdMetadata","SubAccountMetadata","TimeDateMetadata","TimeDayOfWeekMetadata","TimeHourOfDayMetadata","TimeMonthMetadata","TimeQuarterMetadata","TimeWeekMetadata","TimeYearMetadata","UserLocationsMetadata","getGridMetadata","allGridsMetadata","_getGridMetadata$getN","_getGridMetadata2$get","defaultColumns","getGridColumnConversions","_ref$withPartialConve","withPartialConversion","_getGridMetadata3$get","getColumnsConversionMetadata","transformedDefaultColumnConversions","columnConversionMetadata","pairs","map","_slicedToArray","sourceColumnName","object","value","getGridColumnsProperties","columnNames","allColumns","frags","getGridColumnNames","propertyPath","strProperty","join","columnProperties","_getGridMetadata4$get","getGridPage","_getGridMetadata5$get","_getGridMetadata6$get","route","filled","fillRoute","_getGridMetadata7$get","legacyDependencies","pkgJSON","globalContext","define","Promise","asyncScheduler","require","cacheManager","requireDefault","getODataErrors","i18n","odata","pageContext","createInlineDownloadReportDataRepository","alertCenter","window","App","views","downloadService","downloadServiceSharedComponent","deps","InlineDownloadReportDataRepository","getURLWithScope","urlWithoutScope","CurrentCustomer","Id","CurrentAccount","_createClass","_ref$delayAfterDownlo","delayAfterDownload","_ref$isCustomerLevel","isCustomerLevel","_ref$currentActivity","currentActivity","_classCallCheck","this","alertId","_this","_this$deps","url","generateUrl","headers","generateHeaders","data","generateBody","postDownloadRequest","post","catch","errors","serverErrors","error","message","aggregateError","push","getString","apply","_toConsumableArray","formatList","err","convertServerSideErrors","then","response","TaskItemExecutions","trace","taskItemExecutionId","showConfirmation","_ref$maxPollCount","maxPollCount","resolve","reject","successiveFailureCount","pollCount","recurringTask","createTask","task","stop","get","schedule","on","stopTask","ResultId","errorMessage","_ref3$error","eventError","start","pollTaskItemExecution","finally","dismiss","resultUrl","download","URI","filename","delay","Entity","getCacheHint","adapter","resource","ReportData","SchemaName","Cron","ReportAggregation"],"sourceRoot":""}