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mC,CACjCc,MAAO,UACPjB,SAAU,QAEZ,eAAgB,CACdiB,MAAO,QAET,WAAY,CACVA,MAAO,UACPjB,SAAU,OACVE,WAAY,WAIjB,C,yBC5sBD,IAAIqD,EAAM,EAAQ,QAGlBC,EAAOC,QADP,SAAkBC,GAAS,IAAoCC,EAAhCC,EAAW,GAAqCC,EAAmBH,GAAU,CAAC,EAAmsJ,OAA/rJ,SAAU7xB,GAAO+xB,EAAWA,EAAW,0HAAiKL,EAAIO,OAAO,OAASH,EAAa9xB,EAAKiE,UAAU,2BAA6B,GAAK6tB,GAAe,0HAAwKJ,EAAIO,OAAO,OAASH,EAAa9xB,EAAKiE,UAAU,oCAAsC,GAAK6tB,GAAe,sJAA4OJ,EAAIO,OAAO,OAASH,EAAa9xB,EAAKiE,UAAU,6BAA+B,GAAK6tB,GAAe,4vBAAmiCJ,EAAIO,OAAO,OAASH,EAAa9xB,EAAKiE,UAAU,8BAAgC,GAAK6tB,GAAt+DC,+iDAAivIL,EAAIlrB,KAAK,QAASxG,EAAKiE,UAAU,4BAA4B,GAAM,GAApzI8tB,8FAAu7IL,EAAIlrB,KAAK,QAASxG,EAAKiE,UAAU,kCAAkC,GAAM,GAAS,eAAmD,EAAEiuB,KAAK9vB,KAAK,SAAU4vB,EAAgBA,EAAgBhyB,KAAmB,qBAAPA,KAAmBA,UAAKoF,GAAoB2sB,CAAS,C","sources":["../../../../inline-download/packages/inline-download-base-download-v1/src/js/view/baseDownload.js","../../../../inline-download/packages/inline-download-base-download-v1/src/js/viewmodel/gridDownload.js","../../../../inline-download/packages/inline-download-campaign-odata-repository/src/util.js","../../../../inline-download/packages/inline-download-campaign-odata-repository/src/download-report.js","../../../../inline-download/packages/inline-download-campaign-odata-repository/src/poller.js","../../../../inline-download/packages/inline-download-campaign-odata-repository/src/repository.js","../../../../inline-download/packages/inline-download-campaign-odata-repository/src/update-report.js","../../../../inline-download/packages/email-notification-delivery-option-editor/src/spin.js","../../../../inline-download/packages/email-notification-delivery-option-editor/src/editor.js","../../../../inline-download/packages/inline-download-cron-editor/src/util.js","../../../../inline-download/packages/inline-download-cron-editor/src/frequency.js","../../../../inline-download/packages/inline-download-cron-editor/src/hour.js","../../../../inline-download/packages/inline-download-cron-editor/src/daily-extra.js","../../../../inline-download/packages/inline-download-cron-editor/src/day-of-week.js","../../../../inline-download/packages/inline-download-cron-editor/src/weekly-extra.js","../../../../inline-download/packages/inline-download-cron-editor/src/day-of-month.js","../../../../inline-download/packages/inline-download-cron-editor/src/monthly-extra.js","../../../../inline-download/packages/inline-download-cron-editor/src/extra.js","../../../../inline-download/packages/inline-download-cron-editor/src/cron-editor.js","../../../../inline-download/packages/inline-download-email-frequency-editor/src/email-frequency-editor.js","../../../../inline-download/packages/inline-download-form/src/form-group.js","../../../../inline-download/packages/inline-download-form/src/v1-part.js","../../../../inline-download/packages/inline-download-form/src/email-and-schedule-report.js","../../../../inline-download/packages/inline-download-form/src/save-as-custom-report.js","../../../../inline-download/packages/inline-download-form/src/form.js","../../../../inline-download/packages/inline-download-form/src/v2-part.js","../../../../inline-download/packages/inline-download-form/src/js/view/baseDownload.js","../../../../inline-download/packages/inline-download-form/src/js/view/baseDownloadReact.js","../../../../inline-download/packages/inline-download-select/src/dropdown.js","../../../../inline-download/packages/inline-download-select/src/select.js","../../../../inline-download/packages/inline-download-select/src/multi-level-select.js","../../inline-chart-factory-webpack/src/react-wrapper.js","../../inline-chart-factory-webpack/src/index-webpack.js","../../inline-chart-factory-webpack/src/get-in-context-recommendations-dependencies.js","../../inline-chart-style/src/style.js","../../inline-chart-style/src/fluctuation-style.js","../../inline-opportunity-style/src/style.js","../../../../inline-download/packages/inline-download-base-download-v1/src/template/gridDownload.pug"],"sourcesContent":["import Backbone from 'backbone';\r\nimport $ from 'jquery';\r\nimport ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport { segmentationTypeEnum } from '@bingads-webui-campaign/segmentation-utilities';\r\nimport griddownloadtemplate from '../../template/gridDownload.pug';\r\nimport { getViewModel } from '../viewmodel/gridDownload';\r\n\r\nconst excelDownloadRowLimit = 1000000;\r\nexport const getInlineDownloadBaseDownloadV1Loader = ({\r\n i18n,\r\n pageContext,\r\n actionMap,\r\n userVoice,\r\n s$ReportRule,\r\n s$i18n,\r\n}) => {\r\n const supportedDownloadFormats = _.intersection(s$ReportRule.properties.Format.enum, [\r\n 'Csv',\r\n 'Tsv',\r\n 'Xlsx',\r\n 'Csvzip',\r\n ]);\r\n /**\r\n * @typedef {Object} Repository\r\n * @property {Function} download - download according to given params and return a Promise\r\n */\r\n class InlineDownloadBaseDownloadV1 extends Backbone.View {\r\n /**\r\n * Initialize this Base Download view.\r\n * @param {Object} options - options to this Backbone View\r\n * @param {DownloadFormat[]} downloadFormats - Used download formats in this view\r\n * @see [DownloadFormat]{@link https://msasg.visualstudio.com/Bing_Ads/_git/AdsAppsMT#path=%2Fprivate%2FCampaign%2FMT%2FSource%2FInterface%2FInternal%2FEntity%2FInlineReport%2FDownloadFormat.cs&version=GBmaster&_a=contents}\r\n * @param {SegmentationType[]} segmentationTypes - Used segmentation types in this view\r\n * @see [SegmentationType]{@link https://msasg.visualstudio.com/Bing_Ads/_git/AdsAppsMT#path=%2Fprivate%2FCampaign%2FMT%2FSource%2FInterface%2FEntity%2FAggregator2%2FSegmentationType.cs&version=GBmaster&_a=contents}\r\n * @param {Repository} repository - Inline download repository which does the real work\r\n * @param {Object} data - data shown in the form, under schema of ReportRule\r\n * @return {void}\r\n */\r\n initialize({\r\n gridId,\r\n totalRecordCount,\r\n repository,\r\n downloadFormats = supportedDownloadFormats,\r\n segmentationTypes = segmentationTypeEnum,\r\n validateSegmentType = () => true,\r\n isFeedbackEnabled = pageContext.Permissions.IsFeedbackEnabled,\r\n data,\r\n }) {\r\n this.repository = repository;\r\n\r\n this.gridId = gridId;\r\n this.turnOffSegmentation = _.isEmpty(segmentationTypes);\r\n\r\n const segmentType = data.SegmentationTypes[0];\r\n this.segmentType = _.contains(segmentationTypes, segmentType) ? segmentType : null;\r\n const GridDownloadViewModel = getViewModel({\r\n i18n,\r\n s$i18n,\r\n pageContext,\r\n });\r\n this.ko_model = new GridDownloadViewModel({\r\n downloadFormats,\r\n segmentationTypes,\r\n });\r\n this.totalRecordCount = totalRecordCount;\r\n this.validateSegmentType = validateSegmentType;\r\n this.isFeedbackEnabled = isFeedbackEnabled;\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click .inlinereportdownload-panel .btn-download': 'download',\r\n 'click .inlinereportdownload-panel .btn-cancel': 'cancel',\r\n 'click .inlinereportdownload-panel .dropdown-submenu .dropdown-menu a': 'setSubmenuDefault',\r\n 'click .inlinereportdownload-panel .dropdown-submenu .dropdown-menu a span': 'setSubmenuDefault',\r\n 'mouseenter .inlinereportdownload-panel .dropdown-submenu a': 'showSubmenu',\r\n 'mouseenter .inlinereportdownload-panel .dropdown-aligned li a': 'hideSubmenu',\r\n /** for caller to listen to\r\n 'hideToolbar' : 'onNotifyCaller',\r\n showToolbar' : 'onNotifyCaller' */\r\n };\r\n }\r\n\r\n render() {\r\n this.$el.html(griddownloadtemplate({\r\n i18n,\r\n viewModel: this.ko_model,\r\n }));\r\n ko.applyBindings(this.ko_model, this.el.firstChild);\r\n this.$el.show();\r\n this.trigger('hideToolbar');\r\n if (!this.turnOffSegmentation) {\r\n this.setDefaultSegmentType();\r\n this.$('.segmentOptionGroup').show();\r\n } else {\r\n this.$('.segmentOptionGroup').hide();\r\n }\r\n\r\n if (this.isFeedbackEnabled) {\r\n // this is 3rd party code, need to wait for #feedback-label in the dom, so defer the action;\r\n _.defer(() => {\r\n userVoice.addTrigger('#feedback-label', 'Segmentation', 'Download report');\r\n });\r\n } else {\r\n this.$('#feedback-label').hide();\r\n }\r\n\r\n return this;\r\n }\r\n\r\n download() {\r\n const selectedDownloadType = this.ko_model.downloadType().value;\r\n let selectedSegmentationType;\r\n\r\n if (!this.turnOffSegmentation) {\r\n selectedSegmentationType = (this.ko_model.segmentType() && this.ko_model.segmentType().value !== 'None') ? this.ko_model.segmentType().value : undefined;\r\n if (!this.validateSegmentType(selectedSegmentationType)) {\r\n return;\r\n }\r\n }\r\n\r\n if (selectedDownloadType === 'Xlsx' && this.totalRecordCount > excelDownloadRowLimit) {\r\n this.ko_model.showError('RowLimitExceeded');\r\n return;\r\n }\r\n\r\n // This will enforce cache token to be added to download request\r\n // Only add cache token when segment is the same as in the grid otherwise it is invalid so\r\n // no need to add to the request\r\n if (actionMap) {\r\n actionMap.registerActionMapExtension('taskitems', (metadata) => {\r\n if (!this.turnOffSegmentation\r\n && (metadata && this.segmentType === selectedSegmentationType)) {\r\n metadata.gridIds = [this.gridId]; // eslint-disable-line\r\n } else {\r\n metadata.gridIds = []; // eslint-disable-line\r\n }\r\n return metadata;\r\n });\r\n }\r\n\r\n this.repository.download({\r\n Format: selectedDownloadType,\r\n SegmentationTypes: selectedSegmentationType ? [selectedSegmentationType] : [],\r\n }).then(() => {\r\n this.clear();\r\n }).catch((err) => {\r\n alert(err.message);\r\n });\r\n\r\n this.clear();\r\n }\r\n\r\n cancel() {\r\n this.clear();\r\n }\r\n\r\n remove() {\r\n this.clear();\r\n super.remove();\r\n }\r\n\r\n clear() {\r\n this.undelegateEvents();\r\n ko.cleanNode(this.el);\r\n this.$el.empty();\r\n this.$el.hide();\r\n this.trigger('showToolbar');\r\n }\r\n\r\n setDefaultSegmentType() {\r\n if (this.segmentType) {\r\n const gridSegmentType = this.segmentType;\r\n let matchingSegmentType = null;\r\n _.each(this.ko_model.segmentTypes, (segment) => {\r\n if (segment.children) {\r\n _.each(segment.children, (childSegment) => {\r\n if (childSegment.value === gridSegmentType) {\r\n matchingSegmentType = childSegment;\r\n }\r\n });\r\n } else if (segment.value === gridSegmentType) {\r\n matchingSegmentType = segment;\r\n }\r\n });\r\n this.ko_model.segmentType(matchingSegmentType);\r\n }\r\n }\r\n\r\n setSubmenuDefault(event) {\r\n const target = $(event.target);\r\n target.attr('aria-expanded', 'false');\r\n target.parents('ul').filter(':first').hide();\r\n }\r\n\r\n showSubmenu(event) {\r\n const target = $(event.target);\r\n target.attr('aria-expanded', 'true');\r\n target.siblings('ul').filter(':first').show();\r\n }\r\n\r\n hideSubmenu(event) {\r\n const target = $(event.target);\r\n target.parents('li').siblings('li').children('a[aria-haspopup=true]').attr('aria-expanded', 'false');\r\n target.parents('li').siblings('li').children('ul').hide();\r\n }\r\n }\r\n return InlineDownloadBaseDownloadV1;\r\n};\r\n","import ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport {\r\n localizeSegmentationType,\r\n getSupportedSegmentationTree,\r\n} from '@bingads-webui-campaign/segmentation-utilities';\r\n\r\nexport const getViewModel = ({\r\n i18n,\r\n s$i18n,\r\n pageContext,\r\n}) => {\r\n function menuItem(type) {\r\n return {\r\n text: localizeSegmentationType({ i18n, type }),\r\n value: type,\r\n children: null,\r\n };\r\n }\r\n class ViewModel {\r\n constructor({\r\n downloadFormats,\r\n segmentationTypes,\r\n // gridId\r\n }) {\r\n const supportedSegmentationTree = getSupportedSegmentationTree({\r\n permissions: pageContext.Permissions,\r\n segmentationTypes,\r\n });\r\n\r\n const segmentOptions = _.map(supportedSegmentationTree, ({ children, name }) => {\r\n if (children) {\r\n return {\r\n text: localizeSegmentationType({ i18n, type: name }),\r\n value: name,\r\n children: _.map(children, childItem => menuItem(childItem.name)),\r\n };\r\n }\r\n\r\n return menuItem(name);\r\n });\r\n\r\n // TODO: [yaoyao] [zhish] uncomment when MT is ready for HourOfDay.\r\n // if(gridId === \"CampaignsGrid\" || gridId === \"AdGroupGrid\") {\r\n // tSubMenu.push(menuItemHourOfDay);\r\n // }\r\n\r\n this.downloadTypes = _.map(downloadFormats, enumItem => ({\r\n text: s$i18n.enum('DownloadFormat', enumItem),\r\n value: enumItem,\r\n }));\r\n this.downloadType = ko.observable(this.downloadTypes[0]);\r\n this.segmentTypes = segmentOptions;\r\n this.segmentType = ko.observable(this.segmentTypes[0]);\r\n\r\n // Error Message Handling\r\n this.errorMessage = ko.observable('');\r\n this.showError = (errorId) => {\r\n const errorMapping = {\r\n RowLimitExceeded: i18n.getString('GridDownloadLimit_RowsExceeded_Alert'),\r\n };\r\n\r\n this.errorMessage(errorMapping[errorId]);\r\n };\r\n\r\n // Enable download or not? Depends on if we are showing error message\r\n this.enableDownload = ko.pureComputed(() => (_.isEmpty(this.errorMessage())));\r\n }\r\n }\r\n return ViewModel;\r\n};\r\n","import Promise from 'bluebird';\r\nimport _ from 'underscore';\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 class UtilFunctions {\r\n constructor(options) {\r\n this.i18n = options.i18n;\r\n this.getODataErrors = options.getODataErrors;\r\n this.PageContext = options.pageContext;\r\n }\r\n\r\n getURLWithScope = (urlWithoutScope, isCustomerLevel = false) => (isCustomerLevel ?\r\n `Customers(${this.PageContext.CurrentCustomer.Id})/${urlWithoutScope}` :\r\n `Customers(${this.PageContext.CurrentCustomer.Id})/Accounts(${this.PageContext.CurrentAccount.Id})/${urlWithoutScope}`);\r\n\r\n convertServerSideErrors = (errors) => {\r\n const serverErrors = _.uniq(this.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(this.i18n.getString('GridDownloadFailureMessage')));\r\n }\r\n\r\n aggregateError.push(...serverErrors);\r\n aggregateError.message = this.i18n.formatList(serverErrors.map(err => err.message));\r\n return aggregateError;\r\n }\r\n}\r\n","import Promise from 'bluebird';\r\nimport _ from 'underscore';\r\nimport { lockDownSelectionDateRange } from '@bingads-webui-campaign/date-range-utilities';\r\nimport { download } from '@bingads-webui/download-service';\r\nimport poll from './poller';\r\n\r\nimport { UtilFunctions } from './util';\r\n\r\nexport class DownloadReportFunctions {\r\n constructor(options) {\r\n this.i18n = options.i18n;\r\n this.edm = options.edm;\r\n this.odata = options.odata;\r\n this.jsdata = options.jsdata;\r\n this.state = options.state;\r\n this.cm = options.cm;\r\n this.pageContext = options.pageContext;\r\n this.getODataErrors = options.getODataErrors;\r\n this.scheduler = options.scheduler;\r\n this.utils = new UtilFunctions({\r\n i18n: this.i18n,\r\n pageContext: this.pageContext,\r\n getODataErrors: this.getODataErrors,\r\n });\r\n this.isReportLabelsAccountRequest = this.pageContext.CurrentTabId &&\r\n (this.pageContext.CurrentTabId === 'Reportlabelsaccount' || this.pageContext.CurrentTabId === 'Labelsaccount');\r\n }\r\n createRule = (Rule) => {\r\n const {\r\n Entity,\r\n Type,\r\n } = Rule;\r\n\r\n const headers = {\r\n 'x-ms-lastwritetime': this.cm.getCacheHint({\r\n adapter: 'odata',\r\n resource: Entity, // this may not be always correct\r\n }) || 'Max',\r\n };\r\n\r\n if (Entity === 'Campaign' ||\r\n Entity === 'Ad' ||\r\n Entity === 'AdGroup' ||\r\n Entity === 'Keyword') {\r\n Rule.CurrentCustomerId = this.pageContext.CurrentCustomer.Id; // eslint-disable-line no-param-reassign, max-len\r\n }\r\n\r\n // for downloading Account, we need use URL under specific Account, this is MT bug\r\n return this.odata.post(\r\n this.utils.getURLWithScope('TaskItems?$expand=TaskItemExecutions', Type === 'Email' && Entity === 'Account' && !this.isReportLabelsAccountRequest),\r\n {\r\n data: Rule,\r\n headers,\r\n }\r\n ).catch(({ errors } = {}) => {\r\n throw this.utils.convertServerSideErrors(errors);\r\n });\r\n }\r\n\r\n createReportRule = ReportRule =>\r\n this.createRule(_.extend({\r\n '@odata.type': '#Model.ReportRule',\r\n Type: 'Report',\r\n Name: 'ReportDownload',\r\n Cron: '',\r\n }, ReportRule));\r\n\r\n\r\n createReportRuleFromReportEmailRule = ({\r\n Entity,\r\n Format,\r\n Headers,\r\n SegmentationTypes,\r\n Selection,\r\n // used to activate customer hierarchy workflow\r\n IsCustomerHierachyRequest,\r\n AccountModes,\r\n SaveReport, // used by DimensionRow for HotelCenter BI Grids\r\n FeedId, // used by Feed Item\r\n\r\n // other not used properties\r\n IncludeEditableColumns,\r\n IncludeNonPerformingHotels,\r\n EntityContextType,\r\n SharedEntityType,\r\n NegativeKeywordListId,\r\n }) => {\r\n const reportRule = {\r\n Entity,\r\n Format,\r\n Headers,\r\n SegmentationTypes,\r\n Selection,\r\n IsCustomerHierachyRequest,\r\n AccountModes,\r\n SaveReport,\r\n\r\n IncludeEditableColumns,\r\n IncludeNonPerformingHotels,\r\n EntityContextType,\r\n SharedEntityType,\r\n NegativeKeywordListId,\r\n };\r\n\r\n return this.createReportRule(FeedId ? _.extend({ FeedId }, reportRule) : reportRule);\r\n }\r\n\r\n createReportEmailRule = (ReportEmailRule) => {\r\n const {\r\n Entity,\r\n } = ReportEmailRule;\r\n\r\n return this.createRule(_.extend({\r\n '@odata.type': '#Model.ReportEmailRule',\r\n // MT limitation, we need different type for customer & account level entities\r\n Type: (Entity === 'Account' || this.isReportLabelsAccountRequest) ? 'Email' : 'ReportAccountEmail',\r\n SaveReport: true,\r\n CustomerId: Number(this.state.get('customer_id')),\r\n AccountIds: (Entity === 'Account' || this.isReportLabelsAccountRequest) ? [] : [Number(this.state.get('account_id'))],\r\n }, ReportEmailRule));\r\n }\r\n\r\n downloadTaskItemExecution = (TaskItemExecution) => {\r\n let alertId = '';\r\n alertId = window.App.views.alertCenter.showConfirmation(this.i18n.getString('GridDownloadStatusMessage'), alertId);\r\n\r\n return poll({\r\n executionId: TaskItemExecution.Id,\r\n scheduler: this.scheduler,\r\n odata: this.odata,\r\n i18n: this.i18n,\r\n pageContext: this.pageContext,\r\n getODataErrors: this.getODataErrors,\r\n })\r\n .finally(() => window.App.views.alertCenter.dismiss(alertId))\r\n .then(download)\r\n .delay(4000); // Adding this to avoid fast cleanup before iframe src is fired in chrome\r\n }\r\n\r\n scheduleAndDownload = (ReportEmailRule) => {\r\n const { Name } = ReportEmailRule;\r\n\r\n return Promise.all([\r\n this.createReportRuleFromReportEmailRule(ReportEmailRule),\r\n _.isEmpty(Name) ?\r\n null :\r\n this.createReportEmailRule(ReportEmailRule),\r\n ]).spread(({\r\n TaskItemExecutions = [],\r\n } = {}) => {\r\n if (TaskItemExecutions[0]) {\r\n return TaskItemExecutions[0];\r\n }\r\n\r\n throw new Error(this.i18n.getString('GridDownloadFailureMessage'));\r\n }).then(this.downloadTaskItemExecution);\r\n }\r\n\r\n downloadReportEmailRule = ReportEmailRule =>\r\n this.scheduleAndDownload(_.defaults({\r\n Name: null,\r\n }, ReportEmailRule));\r\n\r\n\r\n downloadReportEmailRuleExecution = ({ // eslint-disable-line\r\n StartedAt,\r\n TaskItem: {\r\n Id: TaskItemId,\r\n },\r\n }) => {\r\n const machineStartedAt = new Date(StartedAt.substr(0, 19));\r\n\r\n const taskItemEntitySet = this.edm.currentAccount ?\r\n this.edm.currentAccount.TaskItems :\r\n this.edm.currentCustomer.TaskItems;\r\n\r\n return this.jsdata.TaskItem.find(TaskItemId, {\r\n entitySet: taskItemEntitySet,\r\n }).then(TaskItem => this.downloadReportEmailRule(_.defaults({\r\n Selection: lockDownSelectionDateRange({\r\n Selection: TaskItem.Selection,\r\n today: machineStartedAt,\r\n i18n: this.i18n,\r\n }),\r\n }, TaskItem)));\r\n }\r\n}\r\n\r\n","import Promise from 'bluebird';\r\nimport { UtilFunctions } from './util';\r\n\r\nconst excelLimitExceededErrorCode = 18000;\r\nconst pollIntervalTimeout = 5000;\r\nconst maxPollCount = 60;\r\nconst maxSuccessiveFailureCount = 5;\r\n\r\nexport default function poll({\r\n executionId,\r\n scheduler,\r\n odata,\r\n i18n,\r\n pageContext,\r\n getODataErrors,\r\n}) {\r\n const utils = new UtilFunctions({\r\n i18n,\r\n pageContext,\r\n getODataErrors,\r\n });\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 = scheduler.createTask({\r\n task: () => {\r\n pollCount += 1;\r\n if (pollCount > maxPollCount) {\r\n recurringTask.stop();\r\n return Promise.reject(new Error(i18n.getString('GridDownloadFailureMessage')));\r\n }\r\n\r\n return odata.get(utils.getURLWithScope(`TaskItemExecutions(${executionId})`));\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 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 if (ResultId === excelLimitExceededErrorCode) {\r\n reject(new Error(i18n.getString('GridDownloadLimit_RowsExceeded_Alert')));\r\n } else {\r\n reject(new Error(i18n.getString('GridDownloadFailureMessage')));\r\n }\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","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport { startsWith } from 'underscore.string';\r\nimport { convertStateDateRangeToSelection } from '@bingads-webui-campaign/date-range-utilities';\r\nimport { ODATA_PREFIX } from '@bingads-webui-universal/custom-column-utils';\r\nimport { DownloadReportFunctions } from './download-report';\r\n\r\nexport const getInlineDownloadCampaignODataRepository = ({\r\n i18n,\r\n state,\r\n edm,\r\n odata,\r\n jsdata,\r\n cm,\r\n pageContext,\r\n getODataErrors,\r\n scheduler,\r\n}) => {\r\n class InlineDownloadCampaignODataRepository {\r\n constructor({\r\n odataColumnNames,\r\n localizedHeaders,\r\n filterUrlParam,\r\n serializedFilter,\r\n entity,\r\n processReportRule = _.identity,\r\n isForVNext,\r\n p$daterange,\r\n }) {\r\n this.processReportRule = processReportRule;\r\n this.entity = entity;\r\n this.customColumnIds = _.filter(odataColumnNames, name => startsWith(name, ODATA_PREFIX));\r\n\r\n // for AdCustomizerAttributes columns, we don't includ them in download file now\r\n // header and queryString are corresbonding one by one. example:\r\n // QueryString: \"$select=Status,Name,PerformanceMetrics/7146825582481\"\r\n // Headers: [\"Status\", \"Campaign\", null]\r\n\r\n if (pageContext.Permissions.IsRSAAdCustomizerEnabled) {\r\n this.localizedHeaders = localizedHeaders;\r\n this.queryString = [\r\n ...filterUrlParam ? [filterUrlParam] : [],\r\n `$select=${odataColumnNames}`,\r\n ].join('&');\r\n } else {\r\n this.localizedHeaders = _.filter(localizedHeaders, (header, index) =>\r\n !_.isString(odataColumnNames[index]) || !odataColumnNames[index].startsWith('AdCustomizerAttributes'));\r\n\r\n this.queryString = [\r\n ...filterUrlParam ? [filterUrlParam] : [],\r\n `$select=${_.filter(odataColumnNames, columnName => !_.isString(columnName) || !columnName.startsWith('AdCustomizerAttributes'))}`,\r\n ].join('&');\r\n }\r\n\r\n this.serializedFilter = serializedFilter;\r\n this.isForVNext = isForVNext;\r\n this.p$daterange = p$daterange;\r\n this.DownloadReportFunctions = new DownloadReportFunctions({\r\n i18n,\r\n edm,\r\n odata,\r\n jsdata,\r\n state,\r\n cm,\r\n pageContext,\r\n getODataErrors,\r\n scheduler,\r\n });\r\n }\r\n\r\n download({\r\n Cron,\r\n EndTime,\r\n Format,\r\n Name,\r\n NotificationDeliveryOption,\r\n SegmentationTypes,\r\n StartTime,\r\n IsCustomerHierachyRequest,\r\n AccountModes,\r\n }) {\r\n const daterangePromise = this.isForVNext ? this.p$daterange() : Promise.resolve(state.get('$daterange'));\r\n const CampaignId = Number(state.get('campaign_id') || _.chain(pageContext)\r\n .result('CurrentCampaign')\r\n .result('Id')\r\n .value());\r\n\r\n return daterangePromise.then(($daterange) => {\r\n const {\r\n DateRange,\r\n ComparisonDateRange,\r\n } = convertStateDateRangeToSelection({\r\n $daterange,\r\n i18n,\r\n isForVNext: this.isForVNext,\r\n });\r\n const rule = this.processReportRule({\r\n // common properties for ReportRule & ReportEmailRule\r\n Entity: this.entity,\r\n Format,\r\n Headers: this.localizedHeaders,\r\n // This is an array and eventually we will have multiple segments that user can select\r\n SegmentationTypes,\r\n Selection: _.pick({\r\n DateRange,\r\n QueryString: this.queryString,\r\n ComparisonDateRange,\r\n CampaignId,\r\n AdGroupId: Number(state.get('adgroup_id')),\r\n }, Boolean),\r\n // properties only for ReportEmailRule\r\n Cron,\r\n EndTime,\r\n Name,\r\n NotificationDeliveryOption: NotificationDeliveryOption ? _.defaults({\r\n '@odata.type': '#Model.EmailNotificationDeliveryOption',\r\n }, NotificationDeliveryOption) : null,\r\n StartTime,\r\n Filter: this.serializedFilter,\r\n IsCustomerHierachyRequest,\r\n AccountModes,\r\n });\r\n\r\n if (rule.AccountModes == null) {\r\n delete rule.AccountModes;\r\n }\r\n\r\n return this.DownloadReportFunctions.scheduleAndDownload(rule);\r\n });\r\n }\r\n }\r\n return InlineDownloadCampaignODataRepository;\r\n};\r\n","import _ from 'underscore';\r\n// import { globalContext } from '@bingads-webui-campaign/injection-context';\r\nimport { UtilFunctions } from './util';\r\n\r\n// const edm = globalContext.requireDefault('component/edm-campaign/index');\r\n// const jsdata = globalContext.require('component/js-data-campaign/index');\r\n// const s$ReportEmailRule = globalContext.require('$/schema!campaign/ReportEmailRule');\r\n\r\nexport class UpdateRulesFunctions {\r\n constructor(options) {\r\n this.edm = options.edm;\r\n this.jsdata = options.jsdata;\r\n this.i18n = options.i18n;\r\n this.pageContext = options.pageContext;\r\n this.getODataErrors = options.getODataErrors;\r\n this.s$ReportEmailRule = options.s$ReportEmailRule;\r\n }\r\n\r\n updateRule = (id, update) => {\r\n const utils = new UtilFunctions({\r\n i18n: this.i18n,\r\n pageContext: this.pageContext,\r\n getODataErrors: this.getODataErrors,\r\n });\r\n return this.jsdata.TaskItem\r\n .update(id, update, {\r\n entitySet: this.edm.currentAccount\r\n ? this.edm.currentAccount.TaskItems\r\n : this.edm.currentCustomer.TaskItems,\r\n })\r\n .catch(({ errors }) => {\r\n throw utils.convertServerSideErrors(errors);\r\n });\r\n }\r\n\r\n updateReportEmailRule = (rule) => {\r\n const update = _.extend({\r\n '@odata.type': '#Model.ReportEmailRule',\r\n }, _.pick(rule, ..._.keys(this.s$ReportEmailRule.properties)));\r\n\r\n if (!update.Cron) {\r\n update.Cron = '';\r\n }\r\n\r\n // when no email needed to be sent, Cron is meaningless, so MT will reject non-empty Cron\r\n if (update.NotificationDeliveryOption) {\r\n update.NotificationDeliveryOption['@odata.type'] = '#Model.EmailNotificationDeliveryOption';\r\n } else {\r\n update.Cron = '';\r\n }\r\n\r\n // deprecated property\r\n delete update.Selection.PeriodComparisonDateRange;\r\n\r\n return this.updateRule(update.Id, update);\r\n };\r\n\r\n updateReportEmailRuleState = ({\r\n Id,\r\n State,\r\n Type,\r\n }) => (\r\n this.updateRule(\r\n Id,\r\n {\r\n '@odata.type': '#Model.ReportEmailRule',\r\n State,\r\n Type,\r\n }\r\n )\r\n )\r\n\r\n deleteReportEmailRules = rules => (\r\n this.jsdata.TaskItem.updateAll({}, {\r\n reqs: _.map(rules, ({ Type, Id }) => ({\r\n '@odata.type': '#Model.ReportEmailRule',\r\n State: 'Deleted',\r\n Type,\r\n Id,\r\n })),\r\n }, {\r\n action: 'PATCH',\r\n id: 'Id',\r\n processParam: param => _.pick(param, '@odata.type', 'State', 'Type'),\r\n entitySet: this.edm.currentAccount\r\n ? this.edm.currentAccount.TaskItems\r\n : this.edm.currentCustomer.TaskItems,\r\n })\r\n )\r\n}\r\n","import PropTypes from 'prop-types';\r\nimport React from 'react';\r\n\r\nexport default function Spin({\r\n i18n,\r\n}) {\r\n return {i18n.getString('Loading')};\r\n}\r\n\r\nSpin.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n};\r\n","import classnames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport React from 'react';\r\nimport _ from 'underscore';\r\nimport { include } from 'underscore.string';\r\nimport { Checkbox, CheckboxGroup } from '@bingads-webui-react/checkbox';\r\nimport { ReactTemplate } from '@bingads-webui-react/react-template';\r\nimport { SearchBox } from '@bingads-webui-react/search-box';\r\nimport { SearchBox as SearchBoxControl } from '@bingads-webui-react/search-box-control';\r\nimport Spin from './spin';\r\n\r\nconst OnlyCurrentUser = 'OnlyCurrentUser';\r\nconst AllAccountUsers = 'AllAccountUsers';\r\nconst Custom = 'Custom';\r\nconst CustomerUsers = 'CustomerUsers';\r\n\r\nconst AllUsersEmailOption = {\r\n Customer: CustomerUsers,\r\n Account: AllAccountUsers,\r\n};\r\n\r\nconst Loading = 'Loading';\r\nconst Succeeded = 'Succeeded';\r\nconst Failed = 'Failed';\r\n\r\nfunction getUserIds(users) {\r\n return _.map(users, user => user.Id);\r\n}\r\n\r\nfunction getCheckedUsers({\r\n EmailOption,\r\n CustomUserIds,\r\n currentUserId,\r\n users,\r\n AllUsers,\r\n}) {\r\n if (EmailOption === AllUsers) {\r\n return users;\r\n } else if (EmailOption === OnlyCurrentUser) {\r\n return _.filter(users, { Id: currentUserId });\r\n }\r\n\r\n return _.filter(users, ({ Id }) => _.contains(CustomUserIds, Id));\r\n}\r\n\r\nexport class EmailNotificationDeliveryOptionEditor extends React.PureComponent {\r\n static propTypes = {\r\n model: PropTypes.shape({ // eslint-disable-line\r\n CustomUserIds: PropTypes.arrayOf(PropTypes.number),\r\n EmailOption: PropTypes.string,\r\n }),\r\n onChange: PropTypes.func.isRequired,\r\n currentUserId: PropTypes.number.isRequired,\r\n allUsersType: PropTypes.oneOf(['Customer', 'Account']),\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n loadUsers: PropTypes.func.isRequired,\r\n isForVNext: PropTypes.bool.isRequired,\r\n ariaLabel: PropTypes.string,\r\n }\r\n\r\n static defaultProps = {\r\n model: undefined,\r\n allUsersType: 'Account',\r\n ariaLabel: '',\r\n }\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n users: null,\r\n query: '',\r\n loadUsersStatus: Loading,\r\n };\r\n\r\n this.loadUsers();\r\n }\r\n\r\n onAllUsersChange = (event) => {\r\n if (event.target.checked) {\r\n this.onChange({\r\n EmailOption: this.getAllUsersEmailOption(),\r\n });\r\n } else {\r\n this.onChange({\r\n EmailOption: Custom,\r\n });\r\n }\r\n }\r\n\r\n onCheckedChange = (users) => {\r\n if (users.length === 1 && users[0].Id === this.props.currentUserId) {\r\n this.onChange({\r\n EmailOption: OnlyCurrentUser,\r\n CustomUserIds: [],\r\n });\r\n } else if (users.length === this.state.users.length) {\r\n this.onChange({\r\n EmailOption: this.getAllUsersEmailOption(),\r\n CustomUserIds: [],\r\n });\r\n } else {\r\n this.onChange({\r\n EmailOption: Custom,\r\n CustomUserIds: getUserIds(users),\r\n });\r\n }\r\n }\r\n\r\n onChange = ({\r\n CustomUserIds,\r\n EmailOption,\r\n }) => {\r\n const model = _.defaults({ CustomUserIds, EmailOption }, this.props.model);\r\n\r\n this.props.onChange(model.EmailOption === Custom && _.isEmpty(model.CustomUserIds) ? null : {\r\n CustomUserIds: model.CustomUserIds,\r\n EmailOption: model.EmailOption,\r\n });\r\n }\r\n\r\n onSearch = (query) => {\r\n this.setState({\r\n query,\r\n });\r\n }\r\n\r\n getAllUsersEmailOption() {\r\n return AllUsersEmailOption[this.props.allUsersType];\r\n }\r\n\r\n geEmailOptionAndCustomerIds() {\r\n const EmailOption = this.props.model ? this.props.model.EmailOption : 'Custom';\r\n const CustomUserIds = this.props.model && this.props.model.EmailOption === 'Custom' ? this.props.model.CustomUserIds : [];\r\n return { EmailOption, CustomUserIds };\r\n }\r\n\r\n loadUsers() {\r\n this.props.loadUsers()\r\n .then((users) => {\r\n this.setState({ users: _.sortBy(users, ({ Email }) => Email), loadUsersStatus: Succeeded });\r\n })\r\n .catch(() => {\r\n this.setState({ loadUsersStatus: Failed });\r\n });\r\n }\r\n\r\n renderUserEmail = ({ Id, Email }) => {\r\n if (Id === this.props.currentUserId) {\r\n return (\r\n {this.props.i18n.getString('InlineDownloadReports_EmailAndScheduling_Email_Me')},\r\n }}\r\n template={this.props.i18n.getString('InlineDownloadReports_EmailAndScheduling_Email_Template_Me')}\r\n />\r\n );\r\n }\r\n\r\n // TODO\r\n // emailaddress@domain.com (readonly)\r\n // https://msasg.visualstudio.com/DefaultCollection/Bing_Ads/_git/AdsAppUI?path=%2Fprivate%2FUI%2FCommon%2FMicrosoft.ClientCenter.Repository%2FProxy%2FClientCenterProxyEnums.cs&version=GBmaster&_a=contents&line=215&lineStyle=plain&lineEnd=240&lineStartColumn=1&lineEndColumn=6\r\n\r\n return Email;\r\n }\r\n\r\n renderUser = ({ Id, Email, Name }) => (\r\n \r\n )\r\n\r\n renderUsers = () => {\r\n const {\r\n loadUsersStatus,\r\n users,\r\n query,\r\n } = this.state;\r\n\r\n const { EmailOption, CustomUserIds } = this.geEmailOptionAndCustomerIds();\r\n\r\n switch (loadUsersStatus) {\r\n case Loading:\r\n return ;\r\n case Succeeded:\r\n return (\r\n include(Email, query))}\r\n renderItem={this.renderUser}\r\n onChange={this.onCheckedChange}\r\n checked={getCheckedUsers({\r\n EmailOption,\r\n CustomUserIds,\r\n currentUserId: this.props.currentUserId,\r\n users,\r\n AllUsers: this.getAllUsersEmailOption(),\r\n })}\r\n getItemId={user => user.Id}\r\n />\r\n );\r\n case Failed:\r\n return (\r\n
\r\n {this.props.i18n.getString('InlineDownloadReports_EmailAndScheduling_FailedToLoadUsers')}\r\n
\r\n );\r\n default:\r\n return null;\r\n }\r\n }\r\n\r\n render() {\r\n const {\r\n i18n,\r\n isForVNext,\r\n } = this.props;\r\n const {\r\n query,\r\n } = this.state;\r\n\r\n const { EmailOption } = this.geEmailOptionAndCustomerIds();\r\n\r\n const searchBoxElement = isForVNext\r\n ? (\r\n )\r\n : (\r\n );\r\n\r\n return (\r\n
\r\n
\r\n {searchBoxElement}\r\n
\r\n
\r\n
\r\n \r\n {i18n.getString('InlineDownloadReports_EmailAndScheduling_AllUsers')}\r\n \r\n
\r\n {\r\n this.renderUsers()\r\n }\r\n
\r\n
\r\n );\r\n }\r\n}\r\n","export const None = -1;\r\nexport const Daily = 0;\r\nexport const Weekly = 1;\r\nexport const Monthly = 2;\r\n\r\nexport function getFrequencyDefaultCron(frequency) {\r\n switch (frequency) {\r\n case None:\r\n return null;\r\n case Daily:\r\n return '0 0 * * * *';\r\n case Weekly:\r\n return '0 0 * * 0 *';\r\n case Monthly:\r\n return '0 0 1 * * *';\r\n default:\r\n return null;\r\n }\r\n}\r\n\r\nexport function getCronModel(cron, cronFormatter) {\r\n return cron ? cronFormatter.parse(cron) : { frequency: None };\r\n}\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { InlineDownloadSelect } from '@bingads-webui-campaign/inline-download-select';\r\nimport { None, Daily, Weekly, Monthly } from './util';\r\n\r\nexport default function Frequency({\r\n cronFormatter,\r\n i18n,\r\n onChange,\r\n selected,\r\n}) {\r\n return (\r\n (\r\n \r\n {frequency === None ?\r\n i18n.getString('InlineDownloadReports_EmailAndScheduling_Frequency_None') :\r\n cronFormatter.formatCronFrequency(frequency)}\r\n \r\n )}\r\n selected={selected}\r\n />\r\n );\r\n}\r\n\r\nFrequency.propTypes = {\r\n cronFormatter: PropTypes.shape({\r\n formatCronFrequency: PropTypes.func,\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n selected: PropTypes.oneOf([None, Daily, Weekly, Monthly]).isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { InlineDownloadSelect } from '@bingads-webui-campaign/inline-download-select';\r\n\r\nexport default function Hour({\r\n cronFormatter,\r\n onChange,\r\n selected,\r\n}) {\r\n const translations = cronFormatter.getHoursOfDay();\r\n\r\n return (\r\n
\r\n translations[hour]}\r\n selected={selected}\r\n />\r\n
\r\n );\r\n}\r\n\r\nHour.propTypes = {\r\n cronFormatter: PropTypes.shape({\r\n getHoursOfDay: PropTypes.func,\r\n }).isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n selected: PropTypes.number.isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { ReactTemplate } from '@bingads-webui-react/react-template';\r\nimport Hour from './hour';\r\nimport { Daily } from './util';\r\n\r\nexport default function DailyExtra({\r\n cronFormatter,\r\n hour,\r\n i18n,\r\n onChange,\r\n}) {\r\n return (\r\n {\r\n onChange(cronFormatter.toCronString({\r\n frequency: Daily,\r\n hour: selectedHour,\r\n }));\r\n }}\r\n selected={hour}\r\n />\r\n ),\r\n }}\r\n template={i18n.getString('InlineDownloadReports_EmailAndScheduling_Frequency_Daily_Template')}\r\n />\r\n );\r\n}\r\n\r\nDailyExtra.propTypes = {\r\n cronFormatter: PropTypes.shape({\r\n toCronString: PropTypes.func,\r\n }).isRequired,\r\n hour: PropTypes.number.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { InlineDownloadSelect } from '@bingads-webui-campaign/inline-download-select';\r\n\r\nexport default function DayOfWeek({\r\n cronFormatter,\r\n onChange,\r\n selected,\r\n}) {\r\n const translations = cronFormatter.getDaysOfWeek();\r\n\r\n return (\r\n
\r\n translations[item]}\r\n selected={selected}\r\n />\r\n
\r\n );\r\n}\r\n\r\nDayOfWeek.propTypes = {\r\n cronFormatter: PropTypes.shape({\r\n getDaysOfWeek: PropTypes.func,\r\n }).isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n selected: PropTypes.number.isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { ReactTemplate } from '@bingads-webui-react/react-template';\r\nimport DayOfWeek from './day-of-week';\r\nimport Hour from './hour';\r\nimport { Weekly } from './util';\r\n\r\nexport default function WeeklyExtra({\r\n cronFormatter,\r\n dayOfWeek,\r\n hour,\r\n i18n,\r\n onChange,\r\n}) {\r\n return (\r\n {\r\n onChange(cronFormatter.toCronString({\r\n dayOfWeek: selectedDayOfWeek,\r\n frequency: Weekly,\r\n hour,\r\n }));\r\n }}\r\n selected={dayOfWeek}\r\n />\r\n ),\r\n hour: (\r\n {\r\n onChange(cronFormatter.toCronString({\r\n dayOfWeek,\r\n frequency: Weekly,\r\n hour: selectedHour,\r\n }));\r\n }}\r\n selected={hour}\r\n />\r\n ),\r\n }}\r\n template={i18n.getString('InlineDownloadReports_EmailAndScheduling_Frequency_Weekly_Template')}\r\n />\r\n );\r\n}\r\n\r\nWeeklyExtra.propTypes = {\r\n cronFormatter: PropTypes.shape({\r\n toCronString: PropTypes.func,\r\n }).isRequired,\r\n dayOfWeek: PropTypes.number.isRequired,\r\n hour: PropTypes.number.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { InlineDownloadSelect } from '@bingads-webui-campaign/inline-download-select';\r\n\r\nexport default function DayOfMonth({\r\n cronFormatter,\r\n onChange,\r\n selected,\r\n}) {\r\n const translations = cronFormatter.getDaysOfMonth();\r\n\r\n return (\r\n
\r\n translations[item]}\r\n selected={selected}\r\n />\r\n
\r\n );\r\n}\r\n\r\nDayOfMonth.propTypes = {\r\n cronFormatter: PropTypes.shape({\r\n getDaysOfMonth: PropTypes.func,\r\n }).isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n selected: PropTypes.number.isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { ReactTemplate } from '@bingads-webui-react/react-template';\r\nimport DayOfMonth from './day-of-month';\r\nimport Hour from './hour';\r\nimport { Monthly } from './util';\r\n\r\nexport default function MonthlyExtra({\r\n cronFormatter,\r\n dayOfMonth,\r\n hour,\r\n i18n,\r\n onChange,\r\n}) {\r\n return (\r\n {\r\n onChange(cronFormatter.toCronString({\r\n dayOfMonth: selectedDayOfMonth,\r\n frequency: Monthly,\r\n hour,\r\n }));\r\n }}\r\n selected={dayOfMonth}\r\n />\r\n ),\r\n hour: (\r\n {\r\n onChange(cronFormatter.toCronString({\r\n dayOfMonth,\r\n frequency: Monthly,\r\n hour: selectedHour,\r\n }));\r\n }}\r\n selected={hour}\r\n />\r\n ),\r\n }}\r\n template={i18n.getString('InlineDownloadReports_EmailAndScheduling_Frequency_Monthly_Template')}\r\n />\r\n );\r\n}\r\n\r\nMonthlyExtra.propTypes = {\r\n cronFormatter: PropTypes.shape({\r\n toCronString: PropTypes.func,\r\n }).isRequired,\r\n dayOfMonth: PropTypes.number.isRequired,\r\n hour: PropTypes.number.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { None, Daily, Weekly, Monthly, getCronModel } from './util';\r\nimport DailyExtra from './daily-extra';\r\nimport WeeklyExtra from './weekly-extra';\r\nimport MonthlyExtra from './monthly-extra';\r\n\r\nexport default function Extra({\r\n cronFormatter,\r\n cron,\r\n i18n,\r\n onChange,\r\n}) {\r\n const {\r\n frequency,\r\n dayOfMonth,\r\n dayOfWeek,\r\n hour,\r\n } = getCronModel(cron, cronFormatter);\r\n\r\n switch (frequency) {\r\n case Daily:\r\n return (\r\n \r\n );\r\n case Weekly:\r\n return (\r\n \r\n );\r\n case Monthly:\r\n return (\r\n \r\n );\r\n case None:\r\n default:\r\n return null;\r\n }\r\n}\r\n\r\nExtra.propTypes = {\r\n cronFormatter: PropTypes.shape({\r\n toCronString: PropTypes.func,\r\n }).isRequired,\r\n cron: PropTypes.string.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { CronFormatter } from '@bingads-webui/cron-formatter';\r\nimport { getFrequencyDefaultCron, getCronModel } from './util';\r\nimport Frequency from './frequency';\r\nimport Extra from './extra';\r\n\r\nexport class InlineDownloadCronEditor extends React.PureComponent {\r\n static propTypes = {\r\n cron: PropTypes.string, // eslint-disable-line\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n }\r\n\r\n static defaultProps = {\r\n cron: undefined,\r\n }\r\n\r\n constructor(props) {\r\n super(props);\r\n this.cronFormatter = new CronFormatter({ i18n: props.i18n });\r\n }\r\n\r\n onChangeFrequency = frequency => this.onChangeCron(getFrequencyDefaultCron(frequency));\r\n\r\n onChangeCron = cron => this.props.onChange(cron);\r\n\r\n render() {\r\n const {\r\n cron,\r\n i18n,\r\n } = this.props;\r\n const {\r\n cronFormatter,\r\n onChangeCron,\r\n onChangeFrequency,\r\n } = this;\r\n\r\n const {\r\n frequency,\r\n } = getCronModel(cron, cronFormatter);\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import PropTypes from 'prop-types';\r\nimport React from 'react';\r\nimport classNames from 'classnames';\r\nimport _ from 'underscore';\r\nimport { EmailNotificationDeliveryOptionEditor } from '@bingads-webui-campaign/email-notification-delivery-option-editor';\r\nimport { InlineDownloadCronEditor } from '@bingads-webui-campaign/inline-download-cron-editor';\r\nimport { KendoStringDatePicker } from '@bingads-webui-react/kendo-date-picker';\r\nimport { HelpPopup } from '@bingads-webui-react/help-popup';\r\n\r\nconst dateMethodOptions = {\r\n raw: 'yyyy-MM-dd',\r\n};\r\nexport default class InlineDownloadEmailFrequencyEditor extends React.PureComponent {\r\n static propTypes = {\r\n allUsersType: PropTypes.oneOf(['Customer', 'Account']).isRequired,\r\n data: PropTypes.shape({ // eslint-disable-line\r\n NotificationDeliveryOption: PropTypes.shape({\r\n CustomUserIds: PropTypes.arrayOf(PropTypes.number),\r\n EmailOption: PropTypes.string,\r\n }),\r\n Cron: PropTypes.string,\r\n StartTime: PropTypes.string,\r\n EndTime: PropTypes.string,\r\n }).isRequired,\r\n currentUserId: PropTypes.number.isRequired,\r\n s$i18n: PropTypes.shape({\r\n property: PropTypes.func,\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n FormGroup: PropTypes.func.isRequired,\r\n loadUsers: PropTypes.func.isRequired,\r\n isForVNext: PropTypes.bool.isRequired,\r\n className: PropTypes.string,\r\n }\r\n\r\n static defaultProps = {\r\n className: '',\r\n }\r\n\r\n constructor(props) {\r\n super(props);\r\n this.startTimeRef = React.createRef();\r\n this.endTimeRef = React.createRef();\r\n }\r\n\r\n\r\n componentDidUpdate() {\r\n // Select all elements with the class \"k-state-disabled\"\r\n if (this.startTimeRef.current) {\r\n this.bindTheA11yEvent(this.startTimeRef.current);\r\n }\r\n if (this.endTimeRef.current) {\r\n this.bindTheA11yEvent(this.endTimeRef.current);\r\n }\r\n }\r\n\r\n\r\n onChange = ({\r\n NotificationDeliveryOption,\r\n Cron,\r\n StartTime,\r\n EndTime,\r\n }) => {\r\n const data = _.defaults({\r\n NotificationDeliveryOption, Cron, StartTime, EndTime,\r\n }, this.props.data);\r\n\r\n if (data.NotificationDeliveryOption) {\r\n if (data.Cron) {\r\n this.props.onChange({\r\n NotificationDeliveryOption: data.NotificationDeliveryOption,\r\n Cron: data.Cron,\r\n StartTime: data.StartTime,\r\n EndTime: data.EndTime,\r\n });\r\n } else {\r\n this.props.onChange({\r\n NotificationDeliveryOption: data.NotificationDeliveryOption,\r\n Cron: data.Cron,\r\n StartTime: null,\r\n EndTime: null,\r\n });\r\n }\r\n } else {\r\n this.props.onChange({\r\n NotificationDeliveryOption: null,\r\n Cron: null,\r\n StartTime: null,\r\n EndTime: null,\r\n });\r\n }\r\n }\r\n\r\n onNotificationDeliveryOptionChange = (NotificationDeliveryOption) => {\r\n this.onChange({ NotificationDeliveryOption });\r\n }\r\n\r\n onCronChange = (Cron) => {\r\n this.onChange({ Cron });\r\n }\r\n\r\n onStartTimeChange = (StartTime) => {\r\n this.onChange({ StartTime });\r\n }\r\n\r\n onEndTimeChange = (EndTime) => {\r\n this.onChange({ EndTime });\r\n }\r\n\r\n setDisabledForA11y = () => {\r\n // Select all elements with the class \"k-state-disabled\"\r\n const elements = document.querySelectorAll('.k-animation-container div[aria-hidden=\"false\"] .k-state-disabled');\r\n elements.forEach((element) => {\r\n element.setAttribute('aria-disabled', 'true');\r\n element.setAttribute('tabindex', '-1');\r\n });\r\n }\r\n\r\n bindTheA11yEvent = (parent) => {\r\n const picker = parent.querySelector('.kendo-date-picker .clickable');\r\n picker.onclick = () => {\r\n _.debounce(() => {\r\n const target = document.querySelector('.k-animation-container div[aria-hidden=\"false\"]');\r\n /* istanbul ignore next */\r\n target.addEventListener('focusin', () => {\r\n _.debounce(() => {\r\n this.setDisabledForA11y();\r\n }, 200)();\r\n });\r\n this.setDisabledForA11y();\r\n }, 200)();\r\n };\r\n }\r\n\r\n render() {\r\n const {\r\n currentUserId,\r\n s$i18n,\r\n i18n,\r\n FormGroup,\r\n allUsersType,\r\n loadUsers,\r\n isForVNext,\r\n className,\r\n } = this.props;\r\n\r\n const {\r\n NotificationDeliveryOption,\r\n Cron,\r\n StartTime,\r\n EndTime,\r\n } = this.props.data;\r\n\r\n const min = i18n.formatDate(new Date(), dateMethodOptions);\r\n const usedStartTime = StartTime ? StartTime.substr(0, 10) : StartTime;\r\n const usedEndTime = EndTime ? EndTime.substr(0, 10) : EndTime;\r\n const frequencyText = s$i18n.property('ReportEmailRule', 'Cron');\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n {\r\n NotificationDeliveryOption ? (\r\n \r\n \r\n {frequencyText}\r\n \r\n \r\n )}\r\n >\r\n \r\n \r\n {\r\n Cron ? (\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n ) : null\r\n }\r\n \r\n ) : null\r\n }\r\n
\r\n );\r\n }\r\n}\r\n","/* eslint-disable jsx-a11y/label-has-for */\r\nimport classnames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport React from 'react';\r\nimport _ from 'underscore';\r\n\r\nexport default function FormGroup(props) {\r\n const {\r\n children,\r\n label,\r\n labelId,\r\n } = props;\r\n\r\n const id = props.id || _.uniqueId('form-group-');\r\n\r\n return (\r\n
\r\n \r\n {label}\r\n \r\n
\r\n
\r\n {children}\r\n
\r\n
\r\n
\r\n );\r\n}\r\n\r\nFormGroup.propTypes = {\r\n children: PropTypes.element.isRequired,\r\n id: PropTypes.string,\r\n label: PropTypes.string.isRequired,\r\n labelId: PropTypes.string,\r\n};\r\n\r\nFormGroup.defaultProps = {\r\n id: null,\r\n labelId: undefined,\r\n};\r\n","\r\nimport PropTypes from 'prop-types';\r\nimport React from 'react';\r\nimport _ from 'underscore';\r\nimport {\r\n InlineDownloadSelect,\r\n InlineDownloadMultiLevelSelect\r\n} from '@bingads-webui-campaign/inline-download-select';\r\nimport {\r\n getSupportedSegmentationTree,\r\n localizeSegmentationType,\r\n} from '@bingads-webui-campaign/segmentation-utilities';\r\nimport { HelpPopup } from '@bingads-webui-react/help-popup';\r\nimport { Button } from '@bingads-webui-react/primitive-unthemed';\r\nimport FormGroup from './form-group';\r\n\r\nexport const getV1Part = ({ i18n, s$i18n, pageContext }) => {\r\n class V1Part extends React.Component {\r\n static propTypes = {\r\n data: PropTypes.shape({ // eslint-disable-line\r\n Format: PropTypes.string,\r\n SegmentationTypes: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n }),\r\n downloadFormats: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n segmentationTypes: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n isForVNext: PropTypes.bool.isRequired,\r\n downloadBoxRole: PropTypes.string,\r\n downloadFormatsRole: PropTypes.string,\r\n }\r\n\r\n static defaultProps = {\r\n downloadBoxRole: 'menu',\r\n downloadFormatsRole: 'menuitem',\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n // init format and segmentation types\r\n this.props.onChange(this.getFormatandSementationTypes());\r\n }\r\n\r\n onChange = ({ Format, SegmentationTypes }) => {\r\n const data = _.defaults({\r\n Format, SegmentationTypes,\r\n }, this.props.data);\r\n this.props.onChange(data);\r\n };\r\n\r\n getFormatandSementationTypes() {\r\n const {\r\n downloadFormats,\r\n segmentationTypes,\r\n data,\r\n } = this.props;\r\n\r\n const validSegmentationTypes = data.SegmentationTypes.filter(e => segmentationTypes.indexOf(e) >= 0 || e === 'None');\r\n\r\n const Format = _.contains(downloadFormats, data.Format) ?\r\n data.Format : downloadFormats[0];\r\n const SegmentationTypes = validSegmentationTypes.length > 0 ?\r\n validSegmentationTypes : (['None']);\r\n\r\n return { Format, SegmentationTypes };\r\n }\r\n\r\n updateSegment(name, idx) {\r\n const { SegmentationTypes } = this.getFormatandSementationTypes();\r\n const currentSegment = SegmentationTypes;\r\n const updatedSegment = [...currentSegment.slice(0, idx), name, ...currentSegment.slice(idx + 1)]; // eslint-disable-line\r\n this.onChange({\r\n SegmentationTypes: updatedSegment,\r\n });\r\n }\r\n\r\n deleteSegment(name) {\r\n const { SegmentationTypes } = this.getFormatandSementationTypes();\r\n const currentSegment = SegmentationTypes;\r\n const deleteIndex = currentSegment.indexOf(name);\r\n const updatedSegment = [...currentSegment.slice(0, deleteIndex), ...currentSegment.slice(deleteIndex + 1)]; // eslint-disable-line\r\n this.onChange({\r\n SegmentationTypes: updatedSegment,\r\n });\r\n\r\n const segmentButtons = document.querySelectorAll('.segment-row button.dropdown-toggle');\r\n if (segmentButtons && segmentButtons.length > 0) {\r\n segmentButtons[0].focus();\r\n }\r\n }\r\n\r\n addSegment(name, idx) {\r\n this.updateSegment(name, idx);\r\n\r\n const segmentButtons = document.querySelectorAll('.segment-row button.dropdown-toggle');\r\n if (segmentButtons && segmentButtons.length > 0) {\r\n segmentButtons[0].focus();\r\n }\r\n }\r\n\r\n render() {\r\n const {\r\n downloadFormats,\r\n segmentationTypes,\r\n isForVNext,\r\n } = this.props;\r\n\r\n const {\r\n SegmentationTypes,\r\n Format,\r\n } = this.getFormatandSementationTypes();\r\n\r\n const showAddSegment = pageContext.Permissions.IsMultiSegmentInlineDownloadEnabled && SegmentationTypes.length === 1 && SegmentationTypes[0] !== 'None'; // eslint-disable-line\r\n const showSecondSegment = pageContext.Permissions.IsMultiSegmentInlineDownloadEnabled && SegmentationTypes.length === 2; // eslint-disable-line\r\n const showDeleteSegment = pageContext.Permissions.IsMultiSegmentInlineDownloadEnabled && SegmentationTypes.length === 2; // eslint-disable-line\r\n\r\n const showAddSegmentContent = showAddSegment ? (\r\n \r\n
\r\n this.addSegment('None', 1)}\r\n className=\"add-target\"\r\n >\r\n \r\n {i18n.getString('InlineDownload_AddSegment')}\r\n \r\n
\r\n
\r\n ) : null;\r\n\r\n const showSecondSegmentContent = showSecondSegment ? (\r\n \r\n {\r\n this.updateSegment(name, 1);\r\n }}\r\n renderItem={item => localizeSegmentationType({ i18n, type: item.name })}\r\n selected={{\r\n name: SegmentationTypes[1],\r\n }}\r\n onClick={({ name }) => this.deleteSegment(name)}\r\n showDeleteSegment={showDeleteSegment}\r\n deleteSegmentAriaLabel={i18n.getString('InlineDownload_Remove_Nth_Segment', { index: 2 })}\r\n />\r\n \r\n ) : null;\r\n const formatText = s$i18n.property('ReportEmailRule', 'Format');\r\n const segmentText = s$i18n.property('ReportEmailRule', 'SegmentationTypes');\r\n\r\n return (\r\n \r\n \r\n {formatText}\r\n \r\n \r\n )}\r\n >\r\n {\r\n this.onChange({\r\n Format: format,\r\n });\r\n }}\r\n renderItem={item => s$i18n.enum('DownloadFormat', item) || item}\r\n selected={Format}\r\n role={this.props.downloadBoxRole}\r\n childRole={this.props.downloadFormatsRole}\r\n />\r\n \r\n {\r\n _.isEmpty(segmentationTypes) ? null : (\r\n \r\n {segmentText}\r\n \r\n \r\n )}\r\n >\r\n {\r\n this.updateSegment(name, 0);\r\n }}\r\n renderItem={item => localizeSegmentationType({ i18n, type: item.name })}\r\n selected={{\r\n name: SegmentationTypes[0],\r\n }}\r\n onClick={({ name }) => this.deleteSegment(name)}\r\n showDeleteSegment={showDeleteSegment}\r\n deleteSegmentAriaLabel={i18n.getString('InlineDownload_Remove_Nth_Segment', { index: 1 })}\r\n />\r\n {showAddSegmentContent}\r\n {showSecondSegmentContent}\r\n \r\n )\r\n }\r\n\r\n \r\n );\r\n }\r\n }\r\n\r\n return V1Part;\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React from 'react';\r\nimport _ from 'underscore';\r\nimport { InlineDownloadEmailFrequencyEditor } from '@bingads-webui-campaign/inline-download-email-frequency-editor';\r\nimport { Checkbox } from '@bingads-webui-react/checkbox';\r\nimport { HelpPopup } from '@bingads-webui-react/help-popup';\r\nimport FormGroup from './form-group';\r\n\r\nexport default class EmailAndScheduleReport extends React.Component {\r\n static propTypes = {\r\n allUsersType: PropTypes.oneOf(['Customer', 'Account']).isRequired,\r\n data: PropTypes.shape({ // eslint-disable-line\r\n NotificationDeliveryOption: PropTypes.shape({\r\n CustomUserIds: PropTypes.arrayOf(PropTypes.number),\r\n EmailOption: PropTypes.object,\r\n }),\r\n Cron: PropTypes.string,\r\n StartTime: PropTypes.string,\r\n EndTime: PropTypes.string,\r\n }).isRequired,\r\n currentUserId: PropTypes.number.isRequired,\r\n s$i18n: PropTypes.shape({\r\n property: PropTypes.func,\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n loadUsers: PropTypes.func.isRequired,\r\n isForVNext: PropTypes.bool.isRequired,\r\n }\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = { checked: Boolean(props.data.NotificationDeliveryOption) };\r\n }\r\n\r\n onChange({\r\n NotificationDeliveryOption,\r\n Cron,\r\n StartTime,\r\n EndTime,\r\n }) {\r\n const { checked } = this.state;\r\n const data = _.defaults({\r\n NotificationDeliveryOption, Cron, StartTime, EndTime,\r\n }, this.props.data);\r\n\r\n if (checked && data.NotificationDeliveryOption) {\r\n this.props.onChange({\r\n NotificationDeliveryOption: data.NotificationDeliveryOption,\r\n Cron: data.Cron,\r\n StartTime: data.StartTime,\r\n EndTime: data.EndTime,\r\n });\r\n } else {\r\n this.props.onChange({\r\n NotificationDeliveryOption: null,\r\n Cron: null,\r\n StartTime: null,\r\n EndTime: null,\r\n });\r\n }\r\n }\r\n\r\n onCheck = (event) => {\r\n const { checked } = event.target;\r\n\r\n this.setState({ checked }, () => { this.onChange({}); });\r\n }\r\n\r\n onEmailFrequencyChange = ({\r\n NotificationDeliveryOption,\r\n Cron,\r\n StartTime,\r\n EndTime,\r\n }) => {\r\n this.onChange({\r\n NotificationDeliveryOption,\r\n Cron,\r\n StartTime,\r\n EndTime,\r\n });\r\n }\r\n\r\n render() {\r\n const {\r\n s$i18n,\r\n i18n,\r\n data,\r\n currentUserId,\r\n allUsersType,\r\n loadUsers,\r\n isForVNext,\r\n } = this.props;\r\n\r\n const {\r\n checked,\r\n } = this.state;\r\n const emailAndSchedulingLabel = i18n.getString('InlineDownloadReports_EmailAndScheduling_Label');\r\n\r\n return (\r\n
\r\n \r\n {emailAndSchedulingLabel}\r\n \r\n \r\n {\r\n checked ? (\r\n \r\n ) : null\r\n }\r\n
\r\n );\r\n }\r\n}\r\n","import PropTypes from 'prop-types';\r\nimport React from 'react';\r\nimport _ from 'underscore';\r\nimport { Checkbox } from '@bingads-webui-react/checkbox';\r\nimport { HelpPopup } from '@bingads-webui-react/help-popup';\r\n\r\nconst MaxLengthOfReportName = 85;\r\n\r\nexport default class SaveAsCustomReport extends React.PureComponent {\r\n static propTypes = {\r\n isForVNext: PropTypes.bool.isRequired,\r\n allUsersType: PropTypes.oneOf(['Customer', 'Account']).isRequired,\r\n data: PropTypes.shape({ // eslint-disable-line\r\n Name: PropTypes.string,\r\n }).isRequired,\r\n disabled: PropTypes.bool.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n }\r\n\r\n static getDerivedStateFromProps({ data, disabled, onChange }, prevState) {\r\n const { checked = false, name = data.Name } = prevState;\r\n\r\n const update = {\r\n checked: (data.Name || disabled) ? true : checked,\r\n name: _.isString(name) ? name : '',\r\n };\r\n\r\n if (_.isEqual(update, prevState)) {\r\n return null;\r\n }\r\n\r\n onChange(update.checked ? update.name : null);\r\n return update;\r\n }\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = {};\r\n }\r\n\r\n onChange = () => {\r\n const { checked, name } = this.state;\r\n this.props.onChange(checked ? name : null);\r\n }\r\n\r\n onCheck = (event) => {\r\n const { checked } = event.target;\r\n\r\n this.setState({\r\n checked,\r\n }, this.onChange);\r\n }\r\n\r\n onInput = (event) => {\r\n this.setState({\r\n name: event.target.value,\r\n }, this.onChange);\r\n }\r\n\r\n render() {\r\n const {\r\n allUsersType,\r\n disabled,\r\n i18n,\r\n isForVNext,\r\n } = this.props;\r\n\r\n const {\r\n checked,\r\n name,\r\n } = this.state;\r\n const saveReportLabel = i18n.getString('InlineDownloadReports_EmailAndScheduling_SaveReport_Label');\r\n\r\n return (\r\n
\r\n \r\n

\r\n {(\r\n \r\n {saveReportLabel}\r\n \r\n \r\n )}\r\n

\r\n {\r\n checked ? (\r\n \r\n this.onInput(event)}\r\n // The next line is required to fix compatibility issue on Safari\r\n // https://msasg.visualstudio.com/Bing_Ads/_workitems/edit/3007412/\r\n onClick={event => event.preventDefault()}\r\n type=\"text\"\r\n value={name}\r\n placeholder={i18n.getString('InlineDownloadReports_ReportName')}\r\n maxLength={MaxLengthOfReportName}\r\n />\r\n

\r\n {i18n.getString(isForVNext\r\n ? 'InlineDownloadReports_EmailAndScheduling_SaveReport_Desc_New'\r\n : 'InlineDownloadReports_EmailAndScheduling_SaveReport_Desc', {\r\n title: allUsersType === 'Account' ?\r\n i18n.getString('InlineDownloadReports_Campaigns_Title') :\r\n i18n.getString('InlineDownloadReports_AccountsSummary_Title'),\r\n })}\r\n

\r\n
\r\n ) : null\r\n }\r\n \r\n
\r\n );\r\n }\r\n}\r\n","/* eslint-disable jsx-a11y/anchor-is-valid, no-script-url */\r\nimport classnames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport React from 'react';\r\nimport _ from 'underscore';\r\nimport { GiveFeedback } from '@bingads-webui-campaign-react/give-feedback';\r\nimport {\r\n segmentationTree,\r\n segmentationType,\r\n} from '@bingads-webui-campaign/segmentation-utilities';\r\nimport { getV1Part } from './v1-part';\r\nimport { getV2Part } from './v2-part';\r\n\r\nconst excelDownloadRowLimit = 1000000;\r\n\r\nexport function validateGoalSegmentationTypes(types) {\r\n if (_.contains(types, segmentationType.GoalCategory) &&\r\n _.contains(types, segmentationType.GoalName)) { return false; }\r\n\r\n return true;\r\n}\r\n\r\nexport function validateTimeSegmentationTypes(types) {\r\n // validation fail if both types are under 'Time'.\r\n const timeArray = _.find(segmentationTree, { name: 'Time' });\r\n\r\n return _.size(types) < 2\r\n || _.isUndefined(_.find(timeArray.children, { name: types[0] }))\r\n || _.isUndefined(_.find(timeArray.children, { name: types[1] }));\r\n}\r\n\r\nexport const getInlineReactForm = ({\r\n i18n,\r\n pageContext,\r\n s$i18n,\r\n loadUsers,\r\n}) => {\r\n class InlineDownloadForm extends React.Component {\r\n static propTypes = {\r\n allUsersType: PropTypes.oneOf(['Customer', 'Account']).isRequired,\r\n data: PropTypes.shape({ // eslint-disable-line\r\n Format: PropTypes.string,\r\n SegmentationTypes: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n NotificationDeliveryOption: PropTypes.shape({\r\n CustomUserIds: PropTypes.arrayOf(PropTypes.number),\r\n EmailOption: PropTypes.object,\r\n }),\r\n Cron: PropTypes.string,\r\n StartTime: PropTypes.string,\r\n EndTime: PropTypes.string,\r\n Name: PropTypes.string,\r\n IsCustomerHierachyRequest: PropTypes.bool,\r\n AccountModes: PropTypes.arrayOf(PropTypes.string),\r\n }).isRequired,\r\n downloadFormats: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n segmentationTypes: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n isFeedbackEnabled: PropTypes.bool.isRequired,\r\n totalRecordCount: PropTypes.number.isRequired,\r\n onDownload: PropTypes.func.isRequired,\r\n onCancel: PropTypes.func.isRequired,\r\n isForVNext: PropTypes.bool.isRequired,\r\n downloadBoxRole: PropTypes.string,\r\n downloadFormatsRole: PropTypes.string,\r\n };\r\n\r\n static defaultProps = {\r\n downloadBoxRole: 'menu',\r\n downloadFormatsRole: 'menuitem',\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = _.defaults(props.data, {\r\n Name: null,\r\n });\r\n this.V1Part = getV1Part({\r\n i18n,\r\n s$i18n,\r\n pageContext,\r\n });\r\n\r\n this.V2Part = getV2Part({\r\n s$i18n,\r\n i18n,\r\n pageContext,\r\n loadUsers,\r\n });\r\n }\r\n\r\n onDownload = () => {\r\n const {\r\n Format,\r\n SegmentationTypes,\r\n NotificationDeliveryOption,\r\n Cron,\r\n StartTime,\r\n EndTime,\r\n Name,\r\n IsCustomerHierachyRequest,\r\n AccountModes,\r\n } = this.state;\r\n\r\n this.props.onDownload({\r\n Format,\r\n SegmentationTypes,\r\n NotificationDeliveryOption,\r\n Cron,\r\n StartTime,\r\n EndTime,\r\n Name,\r\n IsCustomerHierachyRequest,\r\n AccountModes,\r\n });\r\n }\r\n\r\n onCancel = () => this.props.onCancel()\r\n\r\n render() {\r\n const {\r\n allUsersType,\r\n downloadFormats,\r\n segmentationTypes,\r\n totalRecordCount,\r\n isFeedbackEnabled,\r\n isForVNext,\r\n } = this.props;\r\n\r\n const errors = [\r\n ...(this.state.Format === 'Xlsx' && totalRecordCount > excelDownloadRowLimit) ?\r\n [i18n.getString('InlineReportDownload_RowsExceeded_Alert')] :\r\n [],\r\n ...(!_.isNull(this.state.Name) && _.isEmpty(this.state.Name.trim())) ?\r\n [i18n.getString('Error_Campaign_API_TaskNameInvalid')] :\r\n [],\r\n ...(!validateTimeSegmentationTypes(this.state.SegmentationTypes)) ?\r\n [i18n.getString('Multiple_Time_Based_Segmentation_Not_Supported')] :\r\n [],\r\n ...(!validateGoalSegmentationTypes(this.state.SegmentationTypes)) ?\r\n [i18n.getString('Multiple_Goal_Based_Segmentation_Not_Supported')] :\r\n [],\r\n ];\r\n return (\r\n
\r\n
\r\n

\r\n {i18n.getString('InlineDownload_DownloadReportOptions')}\r\n {isFeedbackEnabled ? (\r\n \r\n {i18n.getString('GridDownload_GiveFeedback_Label')}\r\n \r\n ) : null}\r\n

\r\n
\r\n
\r\n
\r\n {\r\n this.setState({\r\n Format,\r\n SegmentationTypes,\r\n });\r\n }}\r\n downloadBoxRole={this.props.downloadBoxRole}\r\n downloadFormatsRole={this.props.downloadFormatsRole}\r\n />\r\n {\r\n this.setState({\r\n NotificationDeliveryOption,\r\n Cron,\r\n StartTime,\r\n EndTime,\r\n Name,\r\n AccountModes,\r\n });\r\n }}\r\n />\r\n {\r\n _.isEmpty(errors) ? null : (\r\n
\r\n
\r\n
\r\n \r\n {\r\n errors.map(error => (\r\n {error}\r\n ))\r\n }\r\n
\r\n
\r\n
\r\n )\r\n }\r\n \r\n {i18n.getString('InlineReportDownload_Download_Button')}\r\n \r\n \r\n {i18n.getString('Cancel')}\r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n }\r\n return InlineDownloadForm;\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React from 'react';\r\nimport _ from 'underscore';\r\nimport EmailAndScheduleReport from './email-and-schedule-report';\r\nimport SaveAsCustomReport from './save-as-custom-report';\r\n\r\nexport const getV2Part = ({\r\n s$i18n,\r\n i18n,\r\n pageContext,\r\n loadUsers,\r\n}) => {\r\n function V2Part({\r\n isForVNext,\r\n allUsersType,\r\n data,\r\n onChange,\r\n }) {\r\n return (\r\n \r\n loadUsers({ allUsersType })}\r\n onChange={({\r\n NotificationDeliveryOption,\r\n Cron,\r\n StartTime,\r\n EndTime,\r\n }) => {\r\n onChange(_.defaults({\r\n NotificationDeliveryOption,\r\n Cron,\r\n StartTime,\r\n EndTime,\r\n }, data));\r\n }}\r\n />\r\n onChange(_.defaults({\r\n Name,\r\n }, data))}\r\n />\r\n \r\n );\r\n }\r\n\r\n V2Part.propTypes = {\r\n isForVNext: PropTypes.bool.isRequired,\r\n allUsersType: PropTypes.oneOf(['Customer', 'Account']).isRequired,\r\n data: PropTypes.shape({ // eslint-disable-line\r\n NotificationDeliveryOption: PropTypes.shape({\r\n CustomUserIds: PropTypes.arrayOf(PropTypes.number),\r\n EmailOption: PropTypes.object,\r\n }),\r\n Cron: PropTypes.string,\r\n StartTime: PropTypes.string,\r\n EndTime: PropTypes.string,\r\n Name: PropTypes.string,\r\n }).isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n };\r\n\r\n return V2Part;\r\n};\r\n\r\n","import Backbone from 'backbone';\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport _ from 'underscore';\r\nimport {\r\n segmentationTypeEnum,\r\n} from '@bingads-webui-campaign/segmentation-utilities';\r\nimport { getInlineReactForm } from '../../form';\r\n\r\nexport const getInlineDownloadForm = ({\r\n pageContext,\r\n actionMap,\r\n s$ReportRule,\r\n i18n,\r\n s$i18n,\r\n loadUsers,\r\n}) => {\r\n const supportedDownloadFormats = _.intersection(s$ReportRule.properties.Format.enum, [\r\n 'Csv',\r\n 'Tsv',\r\n 'Xlsx',\r\n 'Csvzip',\r\n ]);\r\n /**\r\n * @typedef {Object} Repository\r\n * @property {Function} download - download according to given params and return a Promise\r\n */\r\n class InlineDownloadForm extends Backbone.View {\r\n /**\r\n * Initialize this Base Download view.\r\n * @param {Object} options - options to this Backbone View\r\n * @param {DownloadFormat[]} options.downloadFormats - Used download formats in this view\r\n * @see [DownloadFormat]{@link https://msasg.visualstudio.com/Bing_Ads/_git/AdsAppsMT#path=%2Fprivate%2FCampaign%2FMT%2FSource%2FInterface%2FInternal%2FEntity%2FInlineReport%2FDownloadFormat.cs&version=GBmaster&_a=contents}\r\n * @param {SegmentationType[]} segmentationTypes - Used segmentation types in this view\r\n * @see [SegmentationType]{@link https://msasg.visualstudio.com/Bing_Ads/_git/AdsAppsMT#path=%2Fprivate%2FCampaign%2FMT%2FSource%2FInterface%2FEntity%2FAggregator2%2FSegmentationType.cs&version=GBmaster&_a=contents}\r\n * @param {Repository} options.repository - Inline download repository which does the real work\r\n * @param {Object} options.data - data shown in the form, under schema of ReportRule\r\n * @param {Bool} isForVNext - true if used in vnext\r\n * @return {void}\r\n */\r\n initialize({\r\n gridId,\r\n totalRecordCount = 0,\r\n repository,\r\n downloadFormats = supportedDownloadFormats,\r\n segmentationTypes = segmentationTypeEnum,\r\n validateSegmentType = () => true,\r\n isFeedbackEnabled = pageContext.Permissions.IsFeedbackEnabled,\r\n data,\r\n allUsersType,\r\n isForVNext = false,\r\n }) {\r\n this.repository = repository;\r\n\r\n this.gridId = gridId;\r\n this.turnOffSegmentation = _.isEmpty(segmentationTypes);\r\n\r\n this.data = data;\r\n if (gridId === 'SmartPerformanceGrid') {\r\n this.data.AccountModes = ['Smart'];\r\n } else if (gridId === 'PerformanceGrid') {\r\n this.data.AccountModes = ['Expert'];\r\n }\r\n\r\n this.downloadFormats = downloadFormats;\r\n this.segmentationTypes = segmentationTypes;\r\n this.totalRecordCount = totalRecordCount;\r\n this.validateSegmentType = validateSegmentType;\r\n this.isFeedbackEnabled = isFeedbackEnabled;\r\n\r\n this.allUsersType = allUsersType;\r\n this.isForVNext = isForVNext;\r\n this.Form = getInlineReactForm({\r\n i18n,\r\n pageContext,\r\n s$i18n,\r\n loadUsers,\r\n });\r\n }\r\n\r\n render() {\r\n this.$el.show();\r\n this.trigger('hideToolbar');\r\n ReactDOM.render(\r\n (\r\n {\r\n this.download({\r\n Format,\r\n SegmentationTypes,\r\n NotificationDeliveryOption,\r\n Cron,\r\n StartTime,\r\n EndTime,\r\n Name,\r\n IsCustomerHierachyRequest,\r\n AccountModes,\r\n });\r\n }}\r\n onCancel={() => this.clear()}\r\n />\r\n ), this.el\r\n );\r\n\r\n return this;\r\n }\r\n\r\n download({\r\n Format,\r\n SegmentationTypes,\r\n NotificationDeliveryOption,\r\n Cron,\r\n StartTime,\r\n EndTime,\r\n Name,\r\n IsCustomerHierachyRequest,\r\n AccountModes,\r\n }) {\r\n const selectedDownloadType = Format;\r\n const selectedSegmentationType = SegmentationTypes[0];\r\n const validSegmentationTypes = _.uniq(_.intersection(SegmentationTypes, this.segmentationTypes)); // eslint-disable-line\r\n\r\n if (!this.turnOffSegmentation && !this.validateSegmentType(selectedSegmentationType)) {\r\n return;\r\n }\r\n\r\n // This will enforce cache token to be added to download request\r\n // Only add cache token when segment is the same as in the grid otherwise it is invalid so\r\n // no need to add to the request\r\n if (actionMap) {\r\n actionMap.registerActionMapExtension('taskitems', (metadata) => {\r\n if (!this.turnOffSegmentation\r\n && (metadata && selectedSegmentationType === this.data.SegmentationTypes[0])) {\r\n metadata.gridIds = [this.gridId]; // eslint-disable-line\r\n } else {\r\n metadata.gridIds = []; // eslint-disable-line\r\n }\r\n return metadata;\r\n });\r\n }\r\n\r\n this.repository.download({\r\n Format: selectedDownloadType,\r\n SegmentationTypes: validSegmentationTypes,\r\n NotificationDeliveryOption,\r\n Cron: Cron || '',\r\n StartTime,\r\n EndTime,\r\n Name,\r\n IsCustomerHierachyRequest,\r\n AccountModes,\r\n }).then(() => {\r\n this.clear();\r\n }).catch((err) => {\r\n alert(err.message);\r\n });\r\n\r\n this.clear();\r\n }\r\n\r\n remove() {\r\n this.clear();\r\n super.remove();\r\n }\r\n\r\n clear() {\r\n this.$el.empty();\r\n this.$el.hide();\r\n this.trigger('showToolbar');\r\n }\r\n }\r\n\r\n return InlineDownloadForm;\r\n};\r\n","/* istanbul ignore file */\r\nimport React from 'react';\r\nimport _ from 'underscore';\r\nimport {\r\n segmentationTypeEnum,\r\n} from '@bingads-webui-campaign/segmentation-utilities';\r\nimport { getInlineReactForm } from '../../form';\r\n\r\nexport const getInlineDownloadFormReact = ({\r\n pageContext,\r\n actionMap,\r\n s$ReportRule,\r\n i18n,\r\n s$i18n,\r\n loadUsers,\r\n}) => {\r\n const supportedDownloadFormats = _.intersection(s$ReportRule.properties.Format.enum, [\r\n 'Csv',\r\n 'Tsv',\r\n 'Xlsx',\r\n 'Csvzip',\r\n ]);\r\n\r\n function InlineDownloadFormReact(props) {\r\n /**\r\n * @param {Object} options - options to this Backbone View\r\n * @param {DownloadFormat[]} options.downloadFormats - Used download formats in this view\r\n * @see [DownloadFormat]{@link https://msasg.visualstudio.com/Bing_Ads/_git/AdsAppsMT#path=%2Fprivate%2FCampaign%2FMT%2FSource%2FInterface%2FInternal%2FEntity%2FInlineReport%2FDownloadFormat.cs&version=GBmaster&_a=contents}\r\n * @param {SegmentationType[]} segmentationTypes - Used segmentation types in this view\r\n * @see [SegmentationType]{@link https://msasg.visualstudio.com/Bing_Ads/_git/AdsAppsMT#path=%2Fprivate%2FCampaign%2FMT%2FSource%2FInterface%2FEntity%2FAggregator2%2FSegmentationType.cs&version=GBmaster&_a=contents}\r\n * @param {Repository} options.repository - Inline download repository which does the real work\r\n * @param {Object} options.data - data shown in the form, under schema of ReportRule\r\n * @param {Bool} isForVNext - true if used in vnext\r\n * @return {void}\r\n */\r\n const currentProps = props;\r\n\r\n const {\r\n // unlike backbone, we prefer a function callback rather than trigger event.\r\n toggleToolbarVisibility,\r\n gridId,\r\n totalRecordCount = 0,\r\n repository,\r\n downloadFormats = supportedDownloadFormats,\r\n segmentationTypes = segmentationTypeEnum,\r\n validateSegmentType = () => true,\r\n isFeedbackEnabled = pageContext.Permissions.IsFeedbackEnabled,\r\n data,\r\n allUsersType,\r\n isForVNext = false,\r\n clearAfterDownloadCall = true,\r\n downloadBoxRole = 'menu',\r\n downloadFormatsRole = 'menuitem',\r\n } = currentProps;\r\n\r\n const turnOffSegmentation = _.isEmpty(segmentationTypes);\r\n\r\n if (gridId === 'SmartPerformanceGrid') {\r\n data.AccountModes = ['Smart'];\r\n } else if (gridId === 'PerformanceGrid') {\r\n data.AccountModes = ['Expert'];\r\n }\r\n\r\n const Form = getInlineReactForm({\r\n i18n,\r\n pageContext,\r\n s$i18n,\r\n loadUsers,\r\n });\r\n\r\n function clear() {\r\n toggleToolbarVisibility();\r\n }\r\n\r\n function download({\r\n Format,\r\n SegmentationTypes,\r\n NotificationDeliveryOption,\r\n Cron,\r\n StartTime,\r\n EndTime,\r\n Name,\r\n IsCustomerHierachyRequest,\r\n AccountModes,\r\n }) {\r\n const selectedDownloadType = Format;\r\n const selectedSegmentationType = SegmentationTypes[0];\r\n const validSegmentationTypes = _.uniq(_.intersection(SegmentationTypes, segmentationTypes)); // eslint-disable-line\r\n\r\n if (!turnOffSegmentation && !validateSegmentType(selectedSegmentationType)) {\r\n return;\r\n }\r\n\r\n // This will enforce cache token to be added to download request\r\n // Only add cache token when segment is the same as in the grid otherwise it is invalid so\r\n // no need to add to the request\r\n if (actionMap) {\r\n actionMap.registerActionMapExtension('taskitems', (metadata) => {\r\n if (!turnOffSegmentation\r\n && (metadata && selectedSegmentationType === data.SegmentationTypes[0])) {\r\n metadata.gridIds = [gridId]; // eslint-disable-line\r\n } else {\r\n metadata.gridIds = []; // eslint-disable-line\r\n }\r\n return metadata;\r\n });\r\n }\r\n\r\n repository.download({\r\n Format: selectedDownloadType,\r\n SegmentationTypes: validSegmentationTypes,\r\n NotificationDeliveryOption,\r\n Cron: Cron || '',\r\n StartTime,\r\n EndTime,\r\n Name,\r\n IsCustomerHierachyRequest,\r\n AccountModes,\r\n }).then(() => {\r\n if (clearAfterDownloadCall) {\r\n clear();\r\n }\r\n }).catch((err) => {\r\n alert(err.message);\r\n });\r\n\r\n clear();\r\n }\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n return InlineDownloadFormReact;\r\n};\r\n","/* eslint-disable jsx-a11y/no-noninteractive-tabindex */\r\n/* eslint-disable jsx-a11y/no-static-element-interactions */\r\n/* eslint-disable jsx-a11y/anchor-is-valid, jsx-a11y/interactive-supports-focus */\r\nimport classnames from 'classnames';\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { submitEvent } from '@bingads-webui-universal/accessibility-helper';\r\n\r\nexport function Dropdown(props) {\r\n const {\r\n button,\r\n isMultiLevelDropdown,\r\n children,\r\n role,\r\n } = props;\r\n\r\n return (\r\n
\r\n \r\n {button}\r\n \r\n \r\n \r\n {children}\r\n \r\n
\r\n );\r\n}\r\n\r\nDropdown.propTypes = {\r\n button: PropTypes.oneOfType([\r\n PropTypes.element,\r\n PropTypes.string,\r\n ]).isRequired,\r\n children: PropTypes.oneOfType([\r\n PropTypes.element,\r\n PropTypes.string,\r\n PropTypes.arrayOf(PropTypes.element),\r\n ]).isRequired,\r\n isMultiLevelDropdown: PropTypes.bool,\r\n role: PropTypes.string,\r\n};\r\n\r\nDropdown.defaultProps = {\r\n isMultiLevelDropdown: false,\r\n role: 'menu',\r\n};\r\n\r\nexport function DropdownLi(props) {\r\n const {\r\n children,\r\n onClick,\r\n selected,\r\n role,\r\n } = props;\r\n\r\n const onClickHandler = (e) => {\r\n onClick();\r\n e.target.closest('.btn-group').querySelector('.btn').focus();\r\n };\r\n\r\n const onClickWrapper = submitEvent(() => onClick());\r\n const focusWrapper = submitEvent(e => e.target.closest('.btn-group').querySelector('.btn').focus());\r\n const onKeyPressHandler = (e) => {\r\n onClickWrapper(e);\r\n focusWrapper(e);\r\n };\r\n\r\n return (\r\n
  • \r\n \r\n {children}\r\n \r\n
  • \r\n );\r\n}\r\n\r\nDropdownLi.propTypes = {\r\n children: PropTypes.oneOfType([\r\n PropTypes.element,\r\n PropTypes.string,\r\n ]).isRequired,\r\n onClick: PropTypes.func.isRequired,\r\n selected: PropTypes.bool,\r\n role: PropTypes.string,\r\n};\r\n\r\nDropdownLi.defaultProps = {\r\n selected: false,\r\n role: 'menuitem',\r\n};\r\n\r\nexport function DropdownSubMenu(props) {\r\n const {\r\n isForVNext,\r\n button,\r\n children,\r\n } = props;\r\n\r\n return (\r\n
  • \r\n \r\n {button}\r\n \r\n \r\n \r\n {children}\r\n \r\n
  • \r\n );\r\n}\r\n\r\nDropdownSubMenu.propTypes = {\r\n button: PropTypes.oneOfType([\r\n PropTypes.element,\r\n PropTypes.string,\r\n ]).isRequired,\r\n children: PropTypes.oneOfType([\r\n PropTypes.element,\r\n PropTypes.string,\r\n ]).isRequired,\r\n isForVNext: PropTypes.bool.isRequired,\r\n};\r\n\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Dropdown, DropdownLi } from './dropdown';\r\n\r\nexport function InlineDownloadSelect({\r\n items,\r\n getItemId,\r\n onSelect,\r\n renderItem,\r\n selected,\r\n role,\r\n childRole,\r\n}) {\r\n return (\r\n \r\n {items.map((item, index) => (\r\n {\r\n if (item !== selected) {\r\n onSelect(item);\r\n }\r\n }}\r\n selected={item === selected}\r\n role={childRole}\r\n >\r\n {renderItem(item, index)}\r\n \r\n ))}\r\n \r\n );\r\n}\r\n\r\nInlineDownloadSelect.propTypes = {\r\n items: PropTypes.arrayOf(PropTypes.any).isRequired,\r\n getItemId: PropTypes.func,\r\n onSelect: PropTypes.func.isRequired,\r\n renderItem: PropTypes.func,\r\n selected: PropTypes.any, // eslint-disable-line\r\n role: PropTypes.string,\r\n childRole: PropTypes.string,\r\n};\r\n\r\nInlineDownloadSelect.defaultProps = {\r\n getItemId: (item, index) => String(index),\r\n renderItem: () => null,\r\n selected: null,\r\n role: 'menu',\r\n childRole: 'menuitem',\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { Dropdown, DropdownLi, DropdownSubMenu } from './dropdown';\r\n\r\nexport class InlineDownloadMultiLevelSelect extends React.Component {\r\n static propTypes = {\r\n // Same as structure defined in @bingads-webui/json-tree-parser\r\n items: PropTypes.arrayOf(PropTypes.shape({\r\n name: PropTypes.string,\r\n children: PropTypes.arrayOf(PropTypes.any),\r\n })).isRequired,\r\n getItemId: PropTypes.func,\r\n onSelect: PropTypes.func.isRequired,\r\n isForVNext: PropTypes.bool.isRequired,\r\n renderItem: PropTypes.func.isRequired,\r\n selected: PropTypes.any, // eslint-disable-line\r\n onClick: PropTypes.func.isRequired,\r\n showDeleteSegment: PropTypes.bool.isRequired,\r\n deleteSegmentAriaLabel: PropTypes.string,\r\n };\r\n\r\n static defaultProps = {\r\n getItemId: () => _.uniqueId(),\r\n selected: null,\r\n deleteSegmentAriaLabel: '',\r\n };\r\n\r\n static getDerivedStateFromProps(nextProps, prevState) {\r\n return {\r\n selected: nextProps.selected || prevState.selected,\r\n };\r\n }\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = {};\r\n }\r\n\r\n onSelect = (item) => {\r\n this.setState({\r\n selected: item,\r\n }, () => this.props.onSelect(item));\r\n };\r\n\r\n onDeleteSegmentKeyDown = (e, selected) => {\r\n if (e.keyCode === 13 || e.keyCode === 32) { // Enter: 13, Space: 32\r\n this.props.onClick(selected);\r\n e.preventDefault();\r\n }\r\n };\r\n\r\n render() {\r\n const {\r\n items,\r\n getItemId,\r\n renderItem,\r\n isForVNext,\r\n onClick,\r\n showDeleteSegment,\r\n deleteSegmentAriaLabel,\r\n } = this.props;\r\n\r\n const {\r\n selected,\r\n } = this.state;\r\n\r\n const renderLi = item => (\r\n this.onSelect(item)}\r\n >\r\n {renderItem(item)}\r\n \r\n );\r\n\r\n const deleteSegment = showDeleteSegment ? (\r\n onClick(selected)}\r\n onKeyDown={e => this.onDeleteSegmentKeyDown(e, selected)}\r\n tabIndex=\"0\"\r\n role=\"button\"\r\n style={{ cursor: 'pointer' }}\r\n className=\"glyphicon glyphicon-remove\"\r\n aria-label={deleteSegmentAriaLabel}\r\n />\r\n ) : null;\r\n\r\n return (\r\n \r\n
    \r\n \r\n {items.map(item => (\r\n item.children ? (\r\n \r\n {item.children.map(child => (\r\n renderLi(child)\r\n ))}\r\n \r\n ) : (\r\n renderLi(item)\r\n )\r\n ))}\r\n \r\n {deleteSegment}\r\n
    \r\n
    \r\n );\r\n }\r\n}\r\n","import React from 'react';\r\nimport _ from 'underscore';\r\nimport $ from 'jquery';\r\nimport Promise from 'bluebird';\r\nimport PropTypes from 'prop-types';\r\n\r\n/* eslint-disable import/extensions */\r\n/* eslint-disable import/no-unresolved */\r\n\r\nimport campaignCacheManager from '@bingads-webui-campaign-legacy/cache-manager/index';\r\n\r\nimport { WaterfallFilterType, waterfallDateFilterProcessor } from '@bingads-webui-campaign/filter-storage';\r\nimport { InlineChartWrapper } from '@bingads-webui-campaign/inline-chart-wrapper';\r\nimport { PageReady } from '@bingads-webui/page-ready';\r\nimport { getFilteredCampaignTypeFromRawFilter } from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport { notificationApi } from '@bingads-webui-campaign/notification-center';\r\nimport { perfMarkerPropTypes } from '@bingads-webui/performance-marker';\r\n\r\nconst InContextCardWidth = 463;\r\nconst Layout = {\r\n Large: 'large',\r\n Small: 'small',\r\n};\r\nconst ThirtyDays = 30 * 24 * 60 * 1000;\r\nconst getCardPreferenceName = entityType => `${entityType}InContextCardHiddenTime`;\r\n\r\n\r\n// PureComponent does not re-render on context change such as menu layout (expanded, collapsed)\r\n// use Component instead, mainly for fluctuation panel repositioning\r\nexport class InlineChartReactWrapper extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n const {\r\n chartPref,\r\n filterService,\r\n preferenceService,\r\n entityType,\r\n } = props;\r\n\r\n const date = new Date();\r\n date.setFullYear(date.getFullYear() - 3);\r\n const defaultDateRange = {\r\n compared: null,\r\n start: date,\r\n end: new Date(),\r\n grain: 22,\r\n key: 'allTime',\r\n name: 'AllTime',\r\n };\r\n\r\n const cardHiddenTime = preferenceService.findByName(getCardPreferenceName(entityType));\r\n let hideCard = false;\r\n if (cardHiddenTime && _.isNumber(cardHiddenTime.Data) &&\r\n Date.now() - cardHiddenTime.Data < ThirtyDays\r\n ) {\r\n hideCard = true;\r\n }\r\n\r\n this.state = {\r\n showChart: chartPref.showChart,\r\n dateRange: this.getNewDateRange() || defaultDateRange,\r\n filter: props.filter,\r\n hasInContextRecommendation: false,\r\n layout: Layout.Small,\r\n hideCard,\r\n };\r\n\r\n if (filterService) {\r\n filterService.on('filter-state-changed', ({ filter }) => {\r\n this.filterUpdated(filter);\r\n });\r\n }\r\n\r\n this.updateToolbar(this.state.showChart);\r\n }\r\n\r\n componentDidMount() {\r\n // add resize event handler\r\n window.addEventListener('resize', this.onWindowResize, false);\r\n\r\n // trigger a window resize event so inline-chart can switch from spinner to chart\r\n this.onWindowResize();\r\n }\r\n\r\n componentDidUpdate(prevProps) {\r\n if (prevProps[WaterfallFilterType.CampaignType] !== this.props[WaterfallFilterType.CampaignType] ||\r\n prevProps.scope !== this.props.scope) {\r\n this.inlineContextComponent = null;\r\n }\r\n\r\n this.setNewDateRangeState();\r\n\r\n // to do, avoid calling resize on every did update\r\n this.onWindowResize();\r\n }\r\n\r\n componentWillUnmount() {\r\n // remove resize event handler\r\n window.removeEventListener('resize', this.onWindowResize);\r\n }\r\n\r\n onWindowResize = _.debounce(() => {\r\n this.resizeChart(this.resizeWidth());\r\n }, 50);\r\n\r\n setInContextRecommendationContent = (hasRecommendation) => {\r\n if (this.state.hasInContextRecommendation !== hasRecommendation) {\r\n this.setState({\r\n hasInContextRecommendation: hasRecommendation,\r\n });\r\n }\r\n };\r\n\r\n getNewDateRange = () => {\r\n const newDateRange = waterfallDateFilterProcessor(\r\n [\r\n {\r\n filter: this.props[WaterfallFilterType.DateFilter],\r\n },\r\n ],\r\n this.props.serverContext\r\n );\r\n\r\n return newDateRange;\r\n };\r\n\r\n setNewDateRangeState = () => {\r\n const newDateRange = this.getNewDateRange();\r\n if (!_.isEqual(this.state.dateRange, newDateRange)) {\r\n this.setState({\r\n dateRange: newDateRange,\r\n layout: Layout.Large,\r\n });\r\n this.onWindowResize();\r\n }\r\n };\r\n\r\n getCardComponent = () => {\r\n const {\r\n scope,\r\n permissions,\r\n serverContext,\r\n recommendationTypes,\r\n newI18n,\r\n filterService,\r\n entityType,\r\n refreshGrid,\r\n perfMarker,\r\n } = this.props;\r\n const campaignType = getFilteredCampaignTypeFromRawFilter(this.props[WaterfallFilterType.CampaignType]);\r\n\r\n if (this.inlineContextComponent &&\r\n this.inContextCampaignType === campaignType &&\r\n this.inContextScope === scope\r\n ) {\r\n return this.inlineContextComponent;\r\n }\r\n\r\n this.inContextCampaignType = campaignType;\r\n this.inContextScope = this.props.scope;\r\n\r\n if (perfMarker) {\r\n this.inContextCardPerfMarker = perfMarker.createChild('In_Context_Recommendation_Card', { isActiveChild: false });\r\n }\r\n\r\n const getRecommendationsProps = () => new Promise((resolve) => {\r\n PageReady.afterPageReady()\r\n .then(import(/* webpackMode: 'eager' */ './get-in-context-recommendations-dependencies')\r\n .then(({ getInContextCardDependencies }) =>\r\n resolve(getInContextCardDependencies({\r\n scope,\r\n permissions,\r\n serverContext,\r\n type: recommendationTypes,\r\n }))));\r\n });\r\n\r\n this.inlineContextComponent = React.lazy(() => getRecommendationsProps()\r\n .then((resp) => {\r\n if (this.inContextCardPerfMarker) {\r\n this.inContextCardPerfMarker.willInit();\r\n }\r\n return resp;\r\n })\r\n .then(({ InContextCard, recommendationProps }) => ({\r\n default: () => (\r\n {\r\n campaignCacheManager.invalidate(entityType);\r\n refreshGrid();\r\n }}\r\n haveEnoughSpace={this.state.layout === Layout.Large}\r\n perfMarker={this.inContextCardPerfMarker}\r\n {...recommendationProps}\r\n />),\r\n })));\r\n\r\n return this.inlineContextComponent;\r\n };\r\n\r\n resizeWidth = () => {\r\n // make the chart area the same width as the title area which contains the POP control\r\n const pageTitle = $('.campaignContentContainer:visible');\r\n\r\n if (pageTitle.length > 0) {\r\n const pageTitleInclusiveWidth = pageTitle.outerWidth(true);\r\n\r\n const { showInContextCard } = this.props;\r\n const { hasInContextRecommendation, layout, hideCard } = this.state;\r\n\r\n const chartWidth = pageTitleInclusiveWidth - (hasInContextRecommendation && !hideCard && layout === Layout.Large ? InContextCardWidth : 0);\r\n const inlineChartContainer = $('.inline-chart-container');\r\n\r\n if (showInContextCard && inlineChartContainer.length > 0) {\r\n const containerMBP = inlineChartContainer.outerWidth(true) - inlineChartContainer.width();\r\n const inlineChartPanel = $('.flex-chart-panel');\r\n\r\n if (inlineChartPanel.length > 0) {\r\n const chartPanelWidth = inlineChartPanel.outerWidth(true);\r\n\r\n if (layout === Layout.Large && hasInContextRecommendation) {\r\n const newChartContentWidth = chartWidth - containerMBP;\r\n const resizeDelta = 15;\r\n if (newChartContentWidth + resizeDelta < chartPanelWidth) {\r\n // string to go beyond min content of the inline chart\r\n this.setState({ layout: Layout.Small });\r\n return chartPanelWidth;\r\n }\r\n }\r\n\r\n if (layout === Layout.Small && hasInContextRecommendation) {\r\n if (chartPanelWidth + InContextCardWidth + containerMBP < chartWidth) {\r\n this.setState({ layout: Layout.Large });\r\n }\r\n }\r\n }\r\n }\r\n\r\n return chartWidth;\r\n }\r\n return 0;\r\n };\r\n\r\n filterUpdated = (newFilter) => {\r\n this.setState({\r\n filter: newFilter,\r\n });\r\n };\r\n\r\n updateToolbar = (currentlyShow) => {\r\n const {\r\n i18n,\r\n menuId,\r\n onNavItemClick,\r\n toolbarEditor,\r\n } = this.props;\r\n toolbarEditor.update({\r\n type: 'nav-item',\r\n text: currentlyShow ? i18n.getString('BI_Chart_HideGraph') : i18n.getString('BI_Chart_ShowGraph'),\r\n description: currentlyShow ? i18n.getString('BI_Chart_HideGraph_Description') : i18n.getString('BI_Chart_ShowGraph_Description'),\r\n id: menuId,\r\n iconLeftGlyphName: currentlyShow ? 'ba-Hide3' : 'ba-View',\r\n expanded: currentlyShow,\r\n onClick: () => {\r\n this.setState({ showChart: !currentlyShow });\r\n this.updateToolbar(!currentlyShow);\r\n $('.table-page-container').trigger('scroll');\r\n onNavItemClick(!currentlyShow);\r\n },\r\n classes: currentlyShow ? 'button-hide-graph' : 'button-show-graph',\r\n });\r\n };\r\n\r\n resizeChartListener = (handler) => {\r\n this.resizeChart = handler;\r\n };\r\n\r\n hideInContextCard = () => {\r\n const { preferenceService, entityType, newI18n } = this.props;\r\n preferenceService.set({\r\n Name: getCardPreferenceName(entityType),\r\n Data: Date.now(),\r\n });\r\n this.setState({ hideCard: true });\r\n notificationApi.showInfo(newI18n.getString(_TL_('Done! You will not see this tile for 30 days.')));\r\n };\r\n\r\n render() {\r\n const { showInContextCard, perfMarker } = this.props;\r\n const {\r\n showChart, dateRange, hideCard,\r\n } = this.state;\r\n const CardComponent = this.getCardComponent();\r\n\r\n return (\r\n
    \r\n \r\n {showChart &&\r\n showInContextCard &&\r\n !hideCard &&\r\n ()}\r\n
    \r\n );\r\n }\r\n}\r\n\r\nInlineChartReactWrapper.propTypes = {\r\n chartPref: PropTypes.shape({}).isRequired,\r\n filter: PropTypes.shape({}).isRequired,\r\n filterService: PropTypes.shape({}).isRequired,\r\n toolbarEditor: PropTypes.shape({}).isRequired,\r\n refreshGrid: PropTypes.func.isRequired,\r\n onNavItemClick: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n menuId: PropTypes.string.isRequired,\r\n options: PropTypes.shape({}),\r\n serverContext: PropTypes.shape({\r\n CurrentUser: PropTypes.object.isRequired,\r\n }).isRequired,\r\n showInContextCard: PropTypes.bool,\r\n permissions: PropTypes.shape({}),\r\n scope: PropTypes.shape({}),\r\n recommendationTypes: PropTypes.arrayOf(PropTypes.string),\r\n newI18n: PropTypes.shape({}).isRequired,\r\n preferenceService: PropTypes.shape({}).isRequired,\r\n entityType: PropTypes.string.isRequired,\r\n getCustomizedFilter: PropTypes.func,\r\n perfMarker: perfMarkerPropTypes,\r\n defaultPrimaryMetric: PropTypes.number,\r\n hideChartPanel: PropTypes.bool,\r\n};\r\n\r\nInlineChartReactWrapper.defaultProps = {\r\n showInContextCard: false,\r\n options: {},\r\n permissions: {},\r\n scope: {},\r\n recommendationTypes: [],\r\n getCustomizedFilter: _.identity,\r\n perfMarker: null,\r\n defaultPrimaryMetric: null,\r\n hideChartPanel: false,\r\n};\r\n","/* eslint-disable import/no-named-as-default-member */\r\nimport Promise from 'bluebird';\r\nimport { compact } from 'underscore';\r\nimport React from 'react';\r\n\r\n/* eslint-disable import/extensions */\r\n/* eslint-disable import/no-unresolved */\r\n\r\nimport { store, adapter } from '@bingads-webui-component-legacy/bingads-grid/service/grid-preferences';\r\nimport appState from '@bingads-webui-component-legacy/state/index';\r\nimport edm from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport appConfig from '@bingads-webui-component-legacy/config/index';\r\nimport instrumentation from '@bingads-webui-campaign-legacy/instrumentation/index';\r\nimport azure from '@bingads-webui-static-legacy/app/component/azureUrlRewrite';\r\nimport jsdata from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport preferenceService from '@bingads-webui-component-legacy/preference/service/index';\r\nimport { mockEdm } from '@bingads-webui-component-legacy/test/mock/edm';\r\nimport mockJsData from '@bingads-webui-component-legacy/test/mock/jsdata';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nimport Constants from '@bingads-webui-static-legacy/constants';\r\n\r\nimport { ThemeFluent } from '@bingads-webui-theme-2018/theme-fluent';\r\nimport { withGlobalFilter } from '@bingads-webui-campaign-react/global-filter-context';\r\nimport { ChartDataAdapter } from '@bingads-webui-campaign-react/inline-chart';\r\nimport { InlineChartPreferences } from '@bingads-webui-campaign/inline-chart-preferences';\r\nimport { withMenuLayout } from '@bingads-webui-react/app-layout-container';\r\nimport { InlineChartReactWrapper } from './react-wrapper';\r\n\r\nexport function loadInlineChartGeneral({\r\n serverContext,\r\n filterService,\r\n toolbarEditor,\r\n refreshGrid,\r\n onNavItemClick,\r\n chartContainer,\r\n entityType,\r\n campaignId,\r\n gridCriterionType,\r\n preexecuteFlag = false,\r\n showInContextCard,\r\n permissions,\r\n scope,\r\n newI18n,\r\n recommendationTypes,\r\n isFluctuationsEnabled,\r\n gridName,\r\n getCustomizedFilter,\r\n perfMarker,\r\n gridDataSource,\r\n defaultPrimaryMetric,\r\n hideChartPanel,\r\n}) {\r\n const i18nInlineChart =\r\n window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!@bingads-webui-campaign-react/inline-chart');\r\n const {\r\n IsFluctuationExperimentEnabled,\r\n } = appConfig.get('Permissions');\r\n const { palette } = ThemeFluent;\r\n\r\n const preferencePromise = preferenceService.initialize().then(() => Promise.promisifyAll(preferenceService));\r\n\r\n const inlineChartDeps = {\r\n isFluctuationsEnabled,\r\n IsFluctuationExperimentEnabled,\r\n imagePath: Constants.imagePath,\r\n filter: {},\r\n entityType,\r\n addDateChangeListener: () => { },\r\n gridCriterionType,\r\n token: appConfig.get('odata.token'),\r\n state: appState,\r\n isForVNext: true,\r\n seriesColors: {\r\n primary: {\r\n original: palette.themePrimary,\r\n comparative: palette.themePrimary,\r\n },\r\n secondary: {\r\n original: '#022F22',\r\n comparative: '#022F22',\r\n },\r\n },\r\n i18n: i18nInlineChart,\r\n instrumentation,\r\n azure,\r\n store,\r\n pathConfig: appConfig,\r\n adapter,\r\n jsdata: preexecuteFlag ? mockJsData : jsdata,\r\n edm: preexecuteFlag ? mockEdm : edm,\r\n pageContext,\r\n preferenceService: preferencePromise,\r\n chartContainer,\r\n resizeChartListener: () => { },\r\n };\r\n\r\n const preference = new InlineChartPreferences(\r\n store,\r\n appConfig,\r\n adapter,\r\n preferencePromise\r\n );\r\n const chartDataAdapter = new ChartDataAdapter({ i18n: i18nInlineChart, permissions: appConfig.get('Permissions') });\r\n\r\n return Promise.all(compact([\r\n chartDataAdapter.getPreferencesAndDefaults(\r\n preference,\r\n pageContext\r\n ),\r\n appState.getPromise('$daterange'),\r\n filterService && filterService.p$Initialized,\r\n preferencePromise,\r\n ])).spread((chartPref) => {\r\n inlineChartDeps.filter = filterService && filterService.getCombinedFilter();\r\n\r\n let onDateChangeHandler = null;\r\n inlineChartDeps.addDateChangeListener = (handler) => {\r\n if (!onDateChangeHandler) {\r\n onDateChangeHandler = handler;\r\n inlineChartDeps.onDateChangeHandler = onDateChangeHandler;\r\n }\r\n };\r\n\r\n if (campaignId && !inlineChartDeps.pageContext.CurrentCampaign) {\r\n inlineChartDeps.pageContext.CurrentCampaign = {\r\n Id: campaignId,\r\n };\r\n }\r\n\r\n inlineChartDeps.pageContext.CurrentGridName = gridName;\r\n\r\n const InlineChartReact = withMenuLayout(withGlobalFilter(InlineChartReactWrapper));\r\n\r\n return Promise.resolve();\r\n });\r\n}\r\n\r\nexport function loadInlineChartWithWebpack({\r\n serverContext,\r\n filterService,\r\n gridView,\r\n chartContainer,\r\n entityType,\r\n campaignId,\r\n gridCriterionType,\r\n preexecuteFlag = false,\r\n showInContextCard,\r\n permissions,\r\n scope,\r\n newI18n,\r\n recommendationTypes,\r\n isFluctuationsEnabled,\r\n gridName,\r\n getCustomizedFilter,\r\n perfMarker,\r\n gridDataSource,\r\n defaultPrimaryMetric,\r\n hideChartPanel,\r\n}) {\r\n return loadInlineChartGeneral({\r\n serverContext,\r\n filterService,\r\n toolbarEditor: gridView.grid.toolbar.gridToolbarGroup.toolbarWithItem(),\r\n refreshGrid: () => { gridView.grid.gridView.refresh(true); },\r\n onNavItemClick: () => { gridView.grid.gridView.trigger('didUpdate'); },\r\n chartContainer,\r\n entityType,\r\n campaignId,\r\n gridCriterionType,\r\n preexecuteFlag,\r\n showInContextCard,\r\n permissions,\r\n scope,\r\n newI18n,\r\n recommendationTypes,\r\n isFluctuationsEnabled,\r\n gridName,\r\n getCustomizedFilter,\r\n perfMarker,\r\n gridDataSource,\r\n defaultPrimaryMetric,\r\n hideChartPanel,\r\n });\r\n}\r\n","/* eslint-disable import/extensions */\r\n/* eslint-disable import/no-unresolved */\r\n\r\n\r\nimport appConfig from '@bingads-webui-component-legacy/config/index';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nimport * as instrumentation from '@bingads-webui-campaign-legacy/instrumentation/index';\r\nimport odata from '@bingads-webui-component-legacy/http/channel/odata';\r\nimport asyncScheduler from '@bingads-webui-static-legacy/async-scheduler';\r\nimport cacheManager from '@bingads-webui-campaign-legacy/cache-manager/index';\r\nimport * as errI18n from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport * as adDisplayUrlService from '@bingads-webui-campaign-legacy/crud-ad/service/displayUrl';\r\nimport preferencesService from '@bingads-webui-component-legacy/preference/service/index';\r\nimport { combineText } from '@bingads-webui-campaign-legacy/crud-ad/viewmodel/adsPreview/expandedTextAd';\r\nimport { CHANNEL_TYPES, withRecommendationsScope } from '@bingads-webui-campaign/recommendation-core';\r\nimport { InContextCard } from '@bingads-webui-campaign-react/recommendation-in-context-card';\r\nimport { withRecommendationServices } from '@bingads-webui-campaign-react/with-recommendation-services';\r\n\r\n\r\nconst i18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/competition-tab');\r\nconst { getODataErrors } = errI18n;\r\nconst schema = {\r\n scenario: [\r\n {\r\n name: 'loadInContextRecommendationsCard',\r\n value: 'LoadInContextRecommendationsCard',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'loadInContextRecommendationsCard',\r\n value: 'LoadInContextRecommendationsCard',\r\n },\r\n // Below activities are for performance logs.\r\n {\r\n name: 'getSummary',\r\n value: 'getsummary',\r\n },\r\n {\r\n name: 'getCoupons',\r\n value: 'getCoupons',\r\n },\r\n {\r\n name: 'getCount',\r\n value: 'getCount',\r\n },\r\n {\r\n name: 'track',\r\n value: 'track',\r\n },\r\n {\r\n name: 'getCountByCampaignAdGroups',\r\n value: 'getCountByCampaignAdGroups',\r\n },\r\n {\r\n name: 'getAutoApplyOptInStatus',\r\n value: 'getAutoApplyOptInStatus',\r\n },\r\n {\r\n name: 'setAutoApplyOptInStatus',\r\n value: 'setAutoApplyOptInStatus',\r\n }\r\n ],\r\n },\r\n ],\r\n};\r\n\r\nexport function getInContextCardDependencies({\r\n scope,\r\n permissions,\r\n serverContext,\r\n type,\r\n}) {\r\n instrumentation.default.addScenario(schema);\r\n const currentScenario = instrumentation.default.loadInContextRecommendationsCard.create();\r\n const currentActivity = currentScenario.loadInContextRecommendationsCard.create();\r\n\r\n return {\r\n InContextCard: withRecommendationsScope(withRecommendationServices({\r\n currentScenario,\r\n currentActivity,\r\n odataPath: appConfig.get('adinsight.odata.url'),\r\n })(InContextCard)),\r\n recommendationProps: {\r\n deps: {\r\n appConfig,\r\n asyncScheduler,\r\n cacheManager,\r\n getODataErrors,\r\n odata,\r\n permissions,\r\n pageContext,\r\n i18n,\r\n combineText,\r\n preferencesService,\r\n },\r\n type,\r\n channel: CHANNEL_TYPES.INCONTEXTCARD,\r\n el: 'body',\r\n withBlocker: false,\r\n errI18n,\r\n adDisplayUrlService,\r\n isForVNext: true,\r\n scope: {\r\n accountId: scope.values.aid,\r\n adGroupId: scope.values.adGroupId,\r\n advertiserCustomerId: serverContext.CurrentAccount.AdvertiserCustomerID,\r\n userId: serverContext.CurrentUser.Id,\r\n campaignId: scope.values.campaignId,\r\n customerId: scope.values.cid,\r\n token: serverContext.Token,\r\n },\r\n },\r\n };\r\n}\r\n","import { inlineChartContainerStyle as baseInlineChartContainerStyle } from '@bingads-webui-campaign-react/base-inline-chart-style';\r\nimport { fluctuationStyle } from './fluctuation-style';\r\n\r\nexport const inlineChartContainerStyle = (palette) => {\r\n const inline = baseInlineChartContainerStyle(palette);\r\n const fluc = fluctuationStyle({ palette });\r\n return { ...inline, ...fluc };\r\n};\r\n","import { getFluctuationContentStyle } from '@bingads-webui-campaign-react/common-styles';\r\n\r\nexport const fluctuationStyle = ({ palette = {}, iconFontFamily = 'MsAds MDL2 Assets' }) => ({\r\n '& .bingads-fluctuation-wrapper': {\r\n width: 500,\r\n position: 'absolute',\r\n zIndex: 500,\r\n cursor: 'auto',\r\n border: 0,\r\n borderRadius: 2,\r\n boxShadow: '0 3.2px 7.2px 0 rgba(0,0,0,.132), 0 0.6px 1.8px 0 rgba(0,0,0,.108)',\r\n backgroundColor: 'rgba(255, 255, 255, 0.95)',\r\n '@supports (backdrop-filter: blur(60px))': {\r\n backdropFilter: 'blur(60px)',\r\n backgroundColor: 'rgba(255, 255, 255, 0.25)',\r\n },\r\n ...getFluctuationContentStyle({ palette, iconFontFamily }),\r\n },\r\n\r\n '& .bingads-popover-wrapper': {\r\n position: 'relative',\r\n },\r\n});\r\n","import { extensionEditorStyles, datePickerStyle } from '@bingads-webui-campaign-react/common-styles';\r\nimport AppliedAllImage from '../media/img_applied_all.png';\r\nimport MoreOptsImage from '../media/img_more_opts.png';\r\n\r\nexport const getInlineOpportunityStyle = palette => ({\r\n '@global': Object.assign(\r\n datePickerStyle({ palette }),\r\n extensionEditorStyles({ palette })\r\n ),\r\n '.inline-opportunity-dialog button.close': {\r\n display: 'inline-block',\r\n fontFamily: 'MsAds MDL2 Assets',\r\n fontSize: 21,\r\n fontStyle: 'normal',\r\n fontWeight: '400',\r\n lineHeight: '1',\r\n position: 'relative',\r\n top: 2,\r\n '&:hover': {\r\n opacity: 0.5,\r\n },\r\n },\r\n '.inline-opportunity-dialog .modal-dialog': {\r\n width: 1000,\r\n maxWidth: 1000,\r\n },\r\n '.inline-opportunity-dialog .modal-title': {\r\n fontWeight: 'bold',\r\n fontSize: 15,\r\n lineHeight: '20px',\r\n },\r\n '.inline-opportunity-dialog .modal-header': {\r\n padding: '20px 24px 0 24px',\r\n borderBottom: 'none',\r\n '& button.close:before': {\r\n content: '\"\\\\E711\"',\r\n },\r\n },\r\n\r\n '.inline-opportunity-dialog .ba-detail': {\r\n lineHeight: '1.5',\r\n },\r\n '.inline-opportunity-dialog .ba-detail .ba-detail-overview': {\r\n display: 'flex',\r\n maxWidth: 800,\r\n },\r\n '.inline-opportunity-dialog .ba-detail .ba-detail-overview .ba-detail-overview-item': {\r\n flexDirection: 'row',\r\n padding: 16,\r\n border: '1px solid #ccc',\r\n boxSizing: 'border-box',\r\n width: '33.33%',\r\n },\r\n '.inline-opportunity-dialog .ba-detail .ba-detail-overview .ba-detail-overview-item .ba-detail-estvalue': {\r\n fontSize: 26,\r\n fontWeight: 'bold',\r\n display: 'inline',\r\n },\r\n '.inline-opportunity-dialog .ba-detail .ba-detail-overview .ba-detail-overview-item .ba-symbol': {\r\n marginLeft: 5,\r\n display: 'inline',\r\n },\r\n '.inline-opportunity-dialog .ba-detail .ba-detail-overview .ba-detail-overview-item+.ba-detail-overview-item': {\r\n borderLeft: 'transparent',\r\n },\r\n '.inline-opportunity-dialog .ba-detail .ba-detail-actions': {\r\n margin: '20px 0 10px',\r\n },\r\n '.inline-opportunity-dialog .ba-detail .ba-opt': {\r\n maxWidth: 800,\r\n minWidth: 768,\r\n },\r\n '.inline-opportunity-dialog .ba-detail .ba-opt>div': {\r\n paddingLeft: '0',\r\n },\r\n '.inline-opportunity-dialog .ba-detail .ba-opt .ba-opt-header': {\r\n fontWeight: 'bold',\r\n },\r\n '.inline-opportunity-dialog .ba-detail .ba-opt .ba-opt-lower-bid': {\r\n color: '#D90026',\r\n },\r\n '.inline-opportunity-dialog .ba-detail .ba-opt .ba-opt-raise-bid': {\r\n color: '#00882A',\r\n },\r\n '.inline-opportunity-dialog .ba-detail .ba-opt .checkbox': {\r\n fontWeight: 'normal',\r\n },\r\n '.inline-opportunity-dialog .campaignName': {\r\n overflowWrap: 'break-word',\r\n },\r\n\r\n '.inline-opportunity-loading-panel': {\r\n width: 250,\r\n fontFamily: 'Arial',\r\n marginLeft: 'auto',\r\n marginRight: 'auto',\r\n },\r\n '.inline-opportunity-loading-panel .title': {\r\n padding: 20,\r\n },\r\n '.inline-opportunity-loading-panel .title .blocker-image': {\r\n background: 'url(\\'../Images/Loader_Grey_30x30.gif\\') no-repeat',\r\n textAlign: 'left',\r\n position: 'absolute',\r\n height: 30,\r\n width: 30,\r\n zIndex: '10',\r\n },\r\n '.inline-opportunity-loading-panel .title .blocker-text': {\r\n verticalAlign: 'center',\r\n margin: '5px 0 0 40px',\r\n fontWeight: 'bold',\r\n fontSize: 14,\r\n },\r\n\r\n '.inline-opportunity-main-panel.panel': {\r\n marginBottom: '0',\r\n },\r\n '.inline-opportunity-main-panel .inline-opportunity-types-tab': {\r\n marginTop: '0',\r\n marginLeft: '-10px',\r\n },\r\n '.inline-opportunity-main-panel .inline-opportunity-types-tab .more-opportunities': {\r\n active: 'false',\r\n },\r\n '.inline-opportunity-main-panel .inline-opportunity-alert': {\r\n position: 'relative',\r\n minHeight: 30,\r\n maxHeight: 50,\r\n marginTop: 5,\r\n marginBottom: 5,\r\n lineHeight: '21px',\r\n },\r\n '.inline-opportunity-main-panel .inline-opportunity-alert button': {\r\n position: 'absolute',\r\n marginRight: 15,\r\n top: 6,\r\n right: -1,\r\n color: '#323130',\r\n },\r\n '.inline-opportunity-main-panel .action-entries': {\r\n borderSpacing: '0 5px',\r\n borderCollapse: 'separate',\r\n width: '100%',\r\n },\r\n '.inline-opportunity-main-panel .action-entries .action-title': {\r\n fontSize: 12,\r\n fontWeight: 'bold',\r\n },\r\n '.inline-opportunity-main-panel .action-entries .action-entry': {\r\n verticalAlign: 'top',\r\n minHeight: 125,\r\n },\r\n '.inline-opportunity-main-panel .action-entries .action-entry td': {\r\n padding: '20px 20px 15px 20px',\r\n border: '1px solid #cccccc',\r\n wordBreak: 'normal',\r\n },\r\n '.inline-opportunity-main-panel .action-entries .action-entry .action-entry-title': {\r\n width: 255,\r\n backgroundColor: '#E5E5E5',\r\n borderRightWidth: '0',\r\n },\r\n '.inline-opportunity-main-panel .action-entries .action-entry .action-entry-title .action-desc': {\r\n fontFamily: '\\'Segoe UI\\'',\r\n },\r\n '.inline-opportunity-main-panel .action-entries .action-entry .action-entry-title .action-breadcrumb': {\r\n fontSize: 12,\r\n color: '#333',\r\n marginTop: 20,\r\n },\r\n '.inline-opportunity-main-panel .action-entries .action-entry .action-entry-detail': {\r\n verticalAlign: 'top',\r\n width: 650,\r\n position: 'relative',\r\n },\r\n '.inline-opportunity-main-panel .action-entries .action-entry .action-entry-detail .action-buttons': {\r\n marginTop: 10,\r\n position: 'absolute',\r\n right: 20,\r\n bottom: 15,\r\n },\r\n '.inline-opportunity-main-panel .action-entries .action-entry .action-entry-detail .result-desc-detail': {\r\n marginTop: 20,\r\n marginBottom: 30,\r\n color: '#737373',\r\n fontSize: 12,\r\n height: 35,\r\n overflowY: 'auto',\r\n visibility: 'hidden',\r\n },\r\n '.inline-opportunity-main-panel .action-entries .action-entry .action-entry-detail:hover .result-desc-detail': {\r\n visibility: 'visible',\r\n },\r\n '.inline-opportunity-main-panel .inline-opportunity-footer': {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n alignItems: 'center',\r\n marginBottom: 8,\r\n marginTop: 8,\r\n },\r\n '.inline-opportunity-main-panel .inline-opportunity-footnote': {\r\n flex: '1 1 auto',\r\n fontSize: '12px',\r\n lineHeight: '15px',\r\n },\r\n '.inline-opportunity-main-panel .inline-opportunity-footer .pagination-container': {\r\n flex: '0 0 auto',\r\n },\r\n '.inline-opportunity-main-panel .inline-opportunity-footer .pagination-container strong': {\r\n marginRight: 4,\r\n },\r\n '.inline-opportunity-main-panel .inline-opportunity-closing-message': {\r\n marginTop: '0',\r\n textAlign: 'center',\r\n },\r\n '.inline-opportunity-main-panel .inline-opportunity-closing-message span': {\r\n display: 'inline-block',\r\n verticalAlign: 'middle',\r\n fontSize: 14,\r\n fontFamily: 'Arial',\r\n fontWeight: 'bold',\r\n marginBottom: 48,\r\n },\r\n '.inline-opportunity-main-panel .inline-opportunity-closing-message .closing-img': {\r\n marginTop: 50,\r\n marginBottom: 38,\r\n marginLeft: 'auto',\r\n marginRight: 'auto',\r\n width: 341,\r\n height: 186,\r\n },\r\n '.inline-opportunity-closing-panel': {\r\n width: 475,\r\n fontFamily: 'Arial',\r\n margin: 'auto',\r\n },\r\n '.inline-opportunity-closing-panel .title': {\r\n padding: '20px 20px 15px 20px',\r\n fontSize: 14,\r\n },\r\n '.inline-opportunity-closing-panel .desc': {\r\n position: 'relative',\r\n padding: 20,\r\n },\r\n '.inline-opportunity-no-more-popover': {\r\n fontSize: 12,\r\n fontFamily: 'Arial',\r\n marginBottom: 10,\r\n minWidth: 245,\r\n },\r\n '.inline-opportunity-no-more-popover ul': {\r\n listStyleType: 'disc',\r\n paddingLeft: 15,\r\n },\r\n '.inline-opportunity-more-menu': {\r\n padding: 15,\r\n minWidth: '410px !important',\r\n maxWidth: 450,\r\n },\r\n '.inline-opportunity-more-menu .inline-opportunity-more-menu-content': {\r\n padding: '0',\r\n },\r\n '.inline-opportunity-more-menu .inline-opportunity-more-menu-content .content': {\r\n float: 'left !important',\r\n margin: '5px 10px 5px 5px',\r\n maxWidth: 350,\r\n },\r\n '.inline-opportunity-more-menu .inline-opportunity-more-menu-content .content span': {\r\n fontWeight: 'normal',\r\n },\r\n '.inline-opportunity-more-menu .inline-opportunity-more-menu-content .close': {\r\n position: 'inherit',\r\n float: 'right !important',\r\n },\r\n '.inline-opportunity-main-panel .new-feature-label': {\r\n marginLeft: '5px',\r\n marginBottom: '2px',\r\n color: '#A80000',\r\n fontWeight: 'bold',\r\n fontSize: '10px',\r\n verticalAlign: 'middle',\r\n },\r\n\r\n '.inline-opportunity-main-panel .btn-hero, .inline-opportunity-main-panel .btn-default': {\r\n minWidth: 70,\r\n },\r\n\r\n '.inline-opportunity-main-panel .btn-hero:disabled, .inline-opportunity-main-panel .btn-default:disabled': {\r\n borderColor: '#ccc',\r\n color: '#666',\r\n backgroundColor: '#f4f4f4',\r\n },\r\n\r\n '.inline-opportunity-main-panel .btn-hero': {\r\n color: '#fff',\r\n backgroundColor: '#337ab7',\r\n borderColor: '#2e6da4',\r\n marginRight: 7,\r\n '&:focus': {\r\n color: '#fff',\r\n backgroundColor: '#286090',\r\n borderColor: '#122b40',\r\n },\r\n '&:hover, &:active': {\r\n color: '#fff',\r\n backgroundColor: '#286090',\r\n borderColor: '#204d74',\r\n },\r\n },\r\n '.inline-opportunity-main-panel .btn-view': {\r\n marginRight: 7,\r\n },\r\n '.inline-opportunity-main-panel': {\r\n width: 950,\r\n fontFamily: 'Arial',\r\n\r\n '& .grid-hidden': {\r\n display: 'none',\r\n },\r\n\r\n '& .grid-previous, & .grid-next, & .grid-previous-disabled, & .grid-next-disabled': {\r\n fontFamily: 'MsAds MDL2 Assets',\r\n display: 'inline-block',\r\n verticalAlign: 'middle',\r\n marginLeft: 8,\r\n marginRight: 8,\r\n },\r\n '& .grid-previous::before, & .grid-previous-disabled::before': {\r\n content: '\"\\\\E76B\"',\r\n },\r\n '& .grid-next::before, & .grid-next-disabled::before': {\r\n content: '\"\\\\E76C\"',\r\n },\r\n '& .grid-previous::before, & .grid-next::before': {\r\n color: '#605e5c',\r\n },\r\n '& .grid-previous-disabled::before, & .grid-next-disabled::before': {\r\n color: '#BEBBB8',\r\n },\r\n '& .grid-pager > span:nth-child(2)': {\r\n display: 'none',\r\n },\r\n '& input.pagination-number': {\r\n width: 40,\r\n marginLeft: 5,\r\n marginRight: 5,\r\n textAlign: 'center',\r\n borderColor: '#f3f2f1',\r\n backgroundColor: '#f3f2f1',\r\n cursor: 'default',\r\n border: 'none',\r\n },\r\n\r\n\r\n // [start]keyword selection style\r\n '& .keyword-selection-flex-table': {\r\n width: '100%',\r\n },\r\n '& .keyword-selection-flex-table .flex-table-header': {\r\n fontWeight: 'bold',\r\n paddingBottom: 8,\r\n },\r\n '& .keyword-selection-flex-table .flex-table-body': {\r\n maxHeight: '230px !important',\r\n borderTop: '1px solid #CCC',\r\n borderBottom: '1px solid #CCC',\r\n paddingTop: 8,\r\n overflowY: 'auto',\r\n },\r\n '& .keyword-selection-flex-table .flex-table-body .flex-table-row': {\r\n marginBottom: 8,\r\n },\r\n '& .keyword-selection-flex-table .flex-table-header, .keyword-selection-flex-table .flex-table-row': {\r\n display: 'flex',\r\n },\r\n '& .keyword-selection-flex-table .flex-table-header>div, .keyword-selection-flex-table .flex-table-row>div': {\r\n display: 'flex',\r\n flex: '0 0 50%',\r\n },\r\n '& .keyword-selection-flex-table .flex-table-header>span.source, .keyword-selection-flex-table .flex-table-row>span.source': {\r\n flex: '0 0 30%',\r\n whiteSpace: 'nowrap',\r\n overflow: 'hidden',\r\n textOverflow: 'ellipsis',\r\n },\r\n '& .keyword-selection-flex-table .flex-table-header>span.bid, .keyword-selection-flex-table .flex-table-row>span.bid': {\r\n flex: '0 0 20%',\r\n },\r\n '& .keyword-selection-flex-table .flex-table-header input.bid-input, .keyword-selection-flex-table .flex-table-row input.bid-input': {\r\n width: 60,\r\n margin: '-3px 0',\r\n border: '1px solid',\r\n borderColor: 'transparent',\r\n },\r\n '& .keyword-selection-flex-table .flex-table-header input.bid-input:hover, .keyword-selection-flex-table .flex-table-row input.bid-input:hover, .keyword-selection-flex-table .flex-table-header input.bid-input:active, .keyword-selection-flex-table .flex-table-row input.bid-input:active': {\r\n borderColor: '#bbb',\r\n },\r\n '& .keyword-selection-flex-table input': {\r\n marginRight: '.5em !important',\r\n },\r\n '& .keyword-selection-flex-table .bid-input-error.error': {\r\n float: 'right',\r\n },\r\n // [end]keyword selection style\r\n\r\n // [start]some basic style using in the opportunity\r\n '& .padding-zero': {\r\n padding: '0',\r\n },\r\n '& .margin-zero': {\r\n margin: '0',\r\n },\r\n '& .padding-left-five': {\r\n paddingLeft: 5,\r\n },\r\n '& .padding-top-five': {\r\n paddingTop: 5,\r\n },\r\n '& .padding-top-twenty': {\r\n paddingTop: 20,\r\n },\r\n '& .padding-left-twenty': {\r\n paddingLeft: 20,\r\n },\r\n '& .padding-right-twenty': {\r\n paddingRight: 20,\r\n },\r\n '& .margin-right-forty': {\r\n marginRight: 40,\r\n },\r\n '& .display-block': {\r\n display: 'block',\r\n },\r\n '& .background-color-white': {\r\n backgroundColor: 'white !important',\r\n },\r\n '& .margin-zero-important': {\r\n margin: '0 !important',\r\n },\r\n '& .type-bold': {\r\n fontWeight: 'bold',\r\n },\r\n '& .gray-type-bold': {\r\n color: '#666',\r\n fontWeight: 'bold',\r\n },\r\n // [end]some basic style using in the opportunity\r\n\r\n\r\n // [start] static-tiles\r\n '& .static-tiles .tiles': {\r\n display: 'flex',\r\n },\r\n '& .static-tiles .tile-outbox': {\r\n borderLeftWidth: 1,\r\n borderRightWidth: '0',\r\n borderTopWidth: 1,\r\n borderBottomWidth: 1,\r\n borderColor: '#CCCCCC',\r\n borderStyle: 'solid',\r\n display: 'inline-block',\r\n width: 237,\r\n overflow: 'hidden',\r\n },\r\n '& .static-tiles .tile-outbox:last-child': {\r\n borderRightWidth: 1,\r\n },\r\n '& .static-tiles .info-tile-content': {\r\n padding: 15,\r\n textAlign: 'left',\r\n },\r\n '& .static-tiles .info-tile-content .title': {\r\n fontSize: 11,\r\n color: '#444444',\r\n lineHeight: '17.5px',\r\n },\r\n '& .static-tiles .info-tile-content .content': {\r\n color: '#444444',\r\n },\r\n '& .static-tiles .info-tile-content .content .kpi-delta': {\r\n fontSize: 26,\r\n fontWeight: 'bold',\r\n display: 'inline',\r\n },\r\n '& .static-tiles .info-tile-content .content .kpi-symbol': {\r\n marginLeft: 5,\r\n display: 'inline',\r\n },\r\n '& .static-tiles .info-tile-content .footer': {\r\n fontSize: 11,\r\n color: '#333333',\r\n lineHeight: '17.5px',\r\n },\r\n // [end] static-tiles\r\n\r\n // [start]doublie list box\r\n '& .doubleListBox .selectedItemsHeader': {\r\n overflow: 'hidden',\r\n whiteSpace: 'nowrap',\r\n textOverflow: 'ellipsis',\r\n maxWidth: 215,\r\n display: 'inline-block',\r\n verticalAlign: 'middle',\r\n },\r\n '& .doubleListBox .headerDelimiter, & .doubleListBox .selectedItemsCount': {\r\n display: 'inline-block',\r\n overflow: 'hidden',\r\n verticalAlign: 'middle',\r\n },\r\n '& .doubleListBox .dlb-source-container, & .doubleListBox .dlb-selected-container': {\r\n height: 243,\r\n backgroundColor: 'white',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n },\r\n '& .doubleListBox .dlb-source, & .doubleListBox .dlb-selected': {\r\n height: 243,\r\n backgroundColor: 'white',\r\n overflow: 'auto',\r\n },\r\n '& .doubleListBox .dlb-source-list, & .doubleListBox .dlb-selected-list': {\r\n height: 'auto',\r\n backgroundColor: 'white',\r\n overflow: 'auto',\r\n flexGrow: '1',\r\n },\r\n '& .doubleListBox .dlb-source': {\r\n marginRight: 1,\r\n },\r\n '& .doubleListBox .dlb-emptyMessage': {\r\n position: 'absolute',\r\n padding: '5px 10px',\r\n },\r\n '& .doubleListBox .dlbItem': {\r\n clear: 'both',\r\n padding: '7px 10px',\r\n margin: '0',\r\n },\r\n '& .doubleListBox .dlb-selectAll, & .doubleListBox .dlb-deselectAll': {\r\n clear: 'both',\r\n padding: '5px 10px',\r\n margin: '0',\r\n cursor: 'pointer',\r\n },\r\n '& .doubleListBox .dlb-selectAll span, & .doubleListBox .dlb-deselectAll span': {\r\n color: '#1470A5',\r\n display: 'inline-block',\r\n verticalAlign: 'top',\r\n },\r\n '& .doubleListBox .dlb-selectAll a, & .doubleListBox .dlb-deselectAll a': {\r\n display: 'inline-block',\r\n verticalAlign: 'top',\r\n },\r\n '& .doubleListBox .dlb-source .k-loading-mask': {\r\n display: 'none',\r\n },\r\n '& .doubleListBox .dlbItem-content': {\r\n textOverflow: 'ellipsis',\r\n overflow: 'hidden',\r\n lineHeight: '17px',\r\n },\r\n '& .doubleListBox .dlbItem-content .statusIcon': {\r\n float: 'left !important',\r\n margin: '0 5px 0 0',\r\n },\r\n '& .doubleListBox .dlbItem-content .content-parent': {\r\n opacity: '.5',\r\n filter: 'alpha(opacity=50)',\r\n },\r\n '& .doubleListBox .dlbItem-content .content-data': {\r\n marginLeft: '0',\r\n },\r\n '& .doubleListBox .dlbItem:hover, & .doubleListBox .dlbItem.k-state-selected': {\r\n backgroundColor: '#f5f5f5',\r\n cursor: 'move',\r\n },\r\n '& .doubleListBox .dlb-selected .dlbItem': {\r\n backgroundColor: '#ddeeff',\r\n border: '1px solid #4d7ac3',\r\n margin: '1px 10px',\r\n },\r\n '& .doubleListBox .dlbItem.selected .dlbItem-content': {\r\n opacity: '.5',\r\n filter: 'alpha(opacity=50)',\r\n },\r\n '& .doubleListBox .dlbItem.disabled .arrow-button': {\r\n opacity: '.25',\r\n filter: 'alpha(opacity=25)',\r\n },\r\n '& .doubleListBox .dlbItem .dlbItem-customAction': {\r\n verticalAlign: 'top',\r\n display: 'none',\r\n },\r\n '& .doubleListBox .dlbItem:hover .dlbItem-customAction': {\r\n display: 'inline',\r\n },\r\n '& .doubleListBox .dlbItem.k-state-focused': {\r\n outline: '1px dashed #333333',\r\n },\r\n '& .doubleListBox .dlbItem.k-state-focused .dlbItem-customAction, & .doubleListBox .dlbItem.k-state-selected .dlbItem-customAction': {\r\n display: 'inline',\r\n },\r\n '& .doubleListBox .dlbItem .dlbItem-actions': {\r\n float: 'right',\r\n maxWidth: '40%',\r\n position: 'relative',\r\n clear: 'right',\r\n marginTop: 2,\r\n },\r\n '& .doubleListBox .dlb-selected .arrow-button.remove': {\r\n marginLeft: 4,\r\n marginRight: 10,\r\n float: 'left',\r\n },\r\n '& .doubleListBox .dlb-pager-container': {\r\n float: 'right',\r\n },\r\n '& .doubleListBox .emptyContainer': {\r\n height: 35,\r\n },\r\n '& .doubleListBox .arrow-button': {\r\n marginTop: 2,\r\n },\r\n '& .doubleListBox.singleListBox .dlb-source': {\r\n border: 'none',\r\n height: 270,\r\n },\r\n '& .doubleListBox.singleListBox .dlbItem:hover': {\r\n cursor: 'pointer',\r\n },\r\n '& .doubleListBox.singleListBox .dlbItem.selected': {\r\n backgroundColor: '#f5f5f5',\r\n },\r\n // [end]doublie list box\r\n\r\n // [start] ad extension opt\r\n '& .adextension-opportunity-tiles & .inline-opportunity-more-menu': {\r\n width: 300,\r\n minWidth: '300px !important',\r\n },\r\n '& .adextension-opportunity-actions .apply': {\r\n minWidth: 70,\r\n },\r\n '& .adextension-opportunity-actions .dismiss': {\r\n minWidth: 70,\r\n },\r\n '& .adextension-association-editor .association-editor': {\r\n backgroundColor: '#f5f5f5',\r\n },\r\n '& .adextension-association-editor .extension-editor-dblist-container': {\r\n marginBottom: '0',\r\n marginLeft: '0',\r\n marginRight: '0',\r\n },\r\n '& .create-link-Container': {\r\n marginLeft: 5,\r\n },\r\n '& .panel-form': {\r\n boxShadow: 'none',\r\n },\r\n '& .panel-title': {\r\n fontSize: '16px',\r\n paddingLeft: '18px',\r\n backgroundColor: '#E5E5E5',\r\n marginTop: 0,\r\n lineHeight: '30px',\r\n },\r\n // [end] ad extension opt\r\n\r\n // [start] arror icon\r\n '& .arrow-button': {\r\n display: 'inline-block',\r\n fontFamily: '\"MsAds MDL2 Assets\"',\r\n fontSize: 14,\r\n fontStyle: 'normal',\r\n fontWeight: 'normal',\r\n lineHeight: '1',\r\n marginLeft: 10,\r\n },\r\n '& .arrow-button.enabled:before': {\r\n content: '\"\\\\EDBF\"',\r\n },\r\n '& .arrow-button.remove:before': {\r\n content: '\"\\\\EDBE\"',\r\n },\r\n // [end] arror icon\r\n\r\n // [start] after applied\r\n '& .has-more-opt-img': {\r\n background: `transparent url(${MoreOptsImage}) no-repeat`,\r\n },\r\n '& .no-more-opt-img': {\r\n background: `transparent url(${AppliedAllImage}) no-repeat`,\r\n },\r\n // [end] after applied\r\n\r\n // [start] first page..\r\n '& .estimation-with-landscape .type1': {\r\n fontSize: '20px',\r\n lineHeight: '25px',\r\n },\r\n '& .opportunity-description-text': {\r\n color: '#A2A2A2',\r\n fontSize: '13px',\r\n },\r\n '& a.disabled': {\r\n color: '#CCC',\r\n },\r\n '& .error': {\r\n color: '#A80000',\r\n fontSize: '13px',\r\n fontWeight: 'normal',\r\n },\r\n // [end] first page..\r\n },\r\n});\r\n","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n) {pug_html = pug_html + \"\\u003Cdiv class=\\\"panel inlinereportdownload-panel inline-download-form\\\"\\u003E\\u003Cdiv class=\\\"panel-heading\\\"\\u003E\\u003Cdiv class=\\\"panel-title\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('GridDownloadPane_Title')) ? \"\" : pug_interp)) + \"\\u003Ca id=\\\"feedback-label\\\" href=\\\"javascript:void(0);\\\"\\u003E\\u003Cspan class=\\\"glyphicon glyphicon-bullhorn\\\" aria-hidden=\\\"true\\\"\\u003E\\u003C\\u002Fspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('GridDownload_GiveFeedback_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"panel-body form-horizontal\\\"\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Clabel class=\\\"col-sm-2 control-label\\\" id=\\\"gridDownloadFormatTitle\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('GridDownloadFormat_Title')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003Cdiv class=\\\"col-sm-2\\\"\\u003E\\u003Cbutton class=\\\"btn btn-default dropdown-toggle legacy-dropdown-toggle\\\" type=\\\"button\\\" data-toggle=\\\"dropdown\\\" href=\\\"javascript:void(0);\\\" aria-labelledby=\\\"gridDownloadFormatTitle\\\" aria-haspopup=\\\"true\\\" aria-expanded=\\\"false\\\"\\u003E\\u003Cspan class=\\\"type-strong\\\" data-bind=\\\"text: downloadType().text\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"text-rigth spritedimage toolbar-icon icon-arrowdown-normal\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fbutton\\u003E\\u003Cul class=\\\"dropdown-menu dropdown-aligned\\\" data-bind=\\\"foreach: downloadTypes\\\" role=\\\"menu\\\"\\u003E\\u003Cli\\u003E\\u003Ca data-bind=\\\"click: $root.downloadType\\\" href=\\\"javascript:void(0);\\\" role=\\\"menuitem\\\"\\u003E\\u003Cspan data-bind=\\\"text: text\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group segmentOptionGroup\\\"\\u003E\\u003Clabel class=\\\"col-sm-2 control-label\\\" id=\\\"gridDownloadSegmentTitle\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('GridDownloadSegment_Title')) ? \"\" : pug_interp)) + \"\\u003Ca class=\\\"helpbutton\\\" topic=\\\"pop_BA_CampaignDownload_Segement\\\" type=\\\"helppopup\\\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Flabel\\u003E\\u003Cdiv class=\\\"col-sm-2\\\"\\u003E\\u003Cbutton class=\\\"btn btn-default dropdown-toggle legacy-dropdown-toggle\\\" type=\\\"button\\\" data-toggle=\\\"dropdown\\\" aria-labelledby=\\\"gridDownloadSegmentTitle\\\" aria-haspopup=\\\"true\\\" aria-expanded=\\\"false\\\"\\u003E\\u003Cspan class=\\\"type-strong\\\" data-bind=\\\"text: segmentType().text\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"spritedimage toolbar-icon icon-arrowdown-normal\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fbutton\\u003E\\u003Cul class=\\\"dropdown-menu dropdown-aligned\\\" role=\\\"menu\\\" data-bind=\\\"foreach: segmentTypes\\\"\\u003E\\u003Cli class=\\\"dropdown-submenu\\\" data-bind=\\\"if: children\\\"\\u003E\\u003Ca href=\\\"javascript:void(0);\\\" aria-haspopup=\\\"true\\\" role=\\\"menuitem\\\" aria-expanded=\\\"false\\\"\\u003E\\u003Cspan data-bind=\\\"text: text\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"spritedimage toolbar-icon grid-expand-icon pull-right caret\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fa\\u003E\\u003Cul class=\\\"dropdown-menu\\\" data-bind=\\\"foreach: children\\\" role=\\\"menu\\\"\\u003E\\u003Cli role=\\\"presentation\\\"\\u003E\\u003Ca data-bind=\\\"click: $root.segmentType\\\" role=\\\"menuitem\\\"\\u003E\\u003Cspan tabindex=\\\"-1\\\" data-bind=\\\"text: text\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\\u003C\\u002Fli\\u003E\\u003Cli role=\\\"presentation\\\" data-bind=\\\"ifnot: children\\\"\\u003E\\u003Ca data-bind=\\\"click: $root.segmentType\\\" role=\\\"menuitem\\\"\\u003E\\u003Cspan tabindex=\\\"-1\\\" data-bind=\\\"text: text\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\" data-bind=\\\"visible: errorMessage\\\"\\u003E\\u003Cdiv class=\\\"col-sm-12\\\"\\u003E\\u003Cdiv class=\\\"alert alert-warning\\\"\\u003E\\u003Cspan class=\\\"alert-image\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan data-bind=\\\"text: errorMessage\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"panel-footer\\\"\\u003E\\u003Cinput\" + (\" class=\\\"btn btn-primary btn-download\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", i18n.getString('GridDownloadButton_Name'), true, true)+\" data-bind=\\\"enable: enableDownload\\\"\") + \"\\u003E\\u003Cinput\" + (\" class=\\\"btn btn-default btn-cancel\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", i18n.getString('GridDownloadCancelButton_Name'), true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;"],"names":["getInlineDownloadBaseDownloadV1Loader","_ref","i18n","pageContext","actionMap","userVoice","s$ReportRule","s$i18n","supportedDownloadFormats","_","properties","Format","enum","InlineDownloadBaseDownloadV1","_Backbone$View","_classCallCheck","_callSuper","arguments","_inherits","_createClass","key","value","_ref2","gridId","totalRecordCount","repository","_ref2$downloadFormats","downloadFormats","_ref2$segmentationTyp","segmentationTypes","segmentationTypeEnum","_ref2$validateSegment","validateSegmentType","_ref2$isFeedbackEnabl","isFeedbackEnabled","Permissions","IsFeedbackEnabled","data","this","turnOffSegmentation","segmentType","SegmentationTypes","GridDownloadViewModel","menuItem","type","text","localizeSegmentationType","children","ViewModel","_this","supportedSegmentationTree","getSupportedSegmentationTree","permissions","segmentOptions","_ref3","name","childItem","downloadTypes","enumItem","downloadType","ko","segmentTypes","errorMessage","showError","errorId","errorMapping","RowLimitExceeded","getString","enableDownload","getViewModel","ko_model","get","$el","html","griddownloadtemplate","viewModel","el","firstChild","show","trigger","$","hide","setDefaultSegmentType","addTrigger","selectedSegmentationType","selectedDownloadType","undefined","registerActionMapExtension","metadata","gridIds","download","then","clear","catch","err","alert","message","_superPropGet","undelegateEvents","empty","gridSegmentType","matchingSegmentType","segment","childSegment","event","target","attr","parents","filter","siblings","Backbone","UtilFunctions","options","getURLWithScope","urlWithoutScope","length","concat","PageContext","CurrentCustomer","Id","CurrentAccount","convertServerSideErrors","errors","serverErrors","getODataErrors","error","aggregateError","Promise","push","Error","apply","_toConsumableArray","formatList","map","DownloadReportFunctions","createRule","Rule","Entity","Type","headers","cm","getCacheHint","adapter","resource","CurrentCustomerId","odata","post","utils","isReportLabelsAccountRequest","createReportRule","ReportRule","Name","Cron","createReportRuleFromReportEmailRule","Headers","Selection","IsCustomerHierachyRequest","AccountModes","SaveReport","FeedId","reportRule","IncludeEditableColumns","IncludeNonPerformingHotels","EntityContextType","SharedEntityType","NegativeKeywordListId","createReportEmailRule","ReportEmailRule","CustomerId","Number","state","AccountIds","downloadTaskItemExecution","TaskItemExecution","alertId","window","App","views","alertCenter","showConfirmation","executionId","scheduler","resolve","reject","successiveFailureCount","pollCount","recurringTask","createTask","task","stop","schedule","on","stopTask","Status","ResultId","_ref3$error","eventError","start","poll","finally","dismiss","delay","scheduleAndDownload","spread","_ref3$TaskItemExecuti","TaskItemExecutions","downloadReportEmailRule","downloadReportEmailRuleExecution","_ref4","StartedAt","TaskItemId","TaskItem","machineStartedAt","Date","substr","taskItemEntitySet","edm","currentAccount","TaskItems","currentCustomer","jsdata","find","entitySet","lockDownSelectionDateRange","today","CurrentTabId","getInlineDownloadCampaignODataRepository","InlineDownloadCampaignODataRepository","odataColumnNames","localizedHeaders","filterUrlParam","serializedFilter","entity","_ref2$processReportRu","processReportRule","isForVNext","p$daterange","customColumnIds","startsWith","ODATA_PREFIX","IsRSAAdCustomizerEnabled","queryString","join","header","index","columnName","EndTime","NotificationDeliveryOption","StartTime","daterangePromise","CampaignId","result","$daterange","_convertStateDateRang","convertStateDateRangeToSelection","DateRange","ComparisonDateRange","rule","QueryString","AdGroupId","Boolean","Filter","UpdateRulesFunctions","updateRule","id","update","updateReportEmailRule","s$ReportEmailRule","PeriodComparisonDateRange","updateReportEmailRuleState","State","deleteReportEmailRules","rules","updateAll","reqs","action","processParam","param","Spin","_jsx","OnlyCurrentUser","Custom","AllUsersEmailOption","Customer","Account","Loading","Succeeded","Failed","getUserIds","users","user","getCheckedUsers","EmailOption","CustomUserIds","currentUserId","AllUsers","EmailNotificationDeliveryOptionEditor","_React$PureComponent","props","onAllUsersChange","checked","onChange","getAllUsersEmailOption","onCheckedChange","model","onSearch","query","setState","renderUserEmail","Email","ReactTemplate","email","me","template","renderUser","_ref5","firstName","FirstName","lastName","LastName","renderUsers","_this$state","loadUsersStatus","_this$geEmailOptionAn","geEmailOptionAndCustomerIds","CheckboxGroup","items","_ref6","include","renderItem","getItemId","className","classnames","role","loadUsers","allUsersType","_this2","_ref7","_this$props","searchBoxElement","SearchBoxControl","onQueryChange","placeholder","ariaLabel","SearchBox","_jsxs","Checkbox","React","defaultProps","getCronModel","cron","cronFormatter","parse","frequency","Frequency","selected","InlineDownloadSelect","onSelect","formatCronFrequency","Hour","translations","getHoursOfDay","hour","DailyExtra","selectedHour","toCronString","DayOfWeek","getDaysOfWeek","item","WeeklyExtra","dayOfWeek","selectedDayOfWeek","DayOfMonth","getDaysOfMonth","MonthlyExtra","dayOfMonth","selectedDayOfMonth","Extra","_getCronModel","InlineDownloadCronEditor","onChangeFrequency","onChangeCron","getFrequencyDefaultCron","CronFormatter","dateMethodOptions","raw","InlineDownloadEmailFrequencyEditor","onNotificationDeliveryOptionChange","onCronChange","onStartTimeChange","onEndTimeChange","setDisabledForA11y","document","querySelectorAll","forEach","element","setAttribute","bindTheA11yEvent","parent","querySelector","onclick","addEventListener","startTimeRef","endTimeRef","current","FormGroup","_this$props$data","min","formatDate","usedStartTime","usedEndTime","frequencyText","property","classNames","label","HelpPopup","topic","labelId","ref","KendoStringDatePicker","max","ariaLabelledby","htmlFor","EmailAndScheduleReport","_React$Component","onCheck","onEmailFrequencyChange","emailAndSchedulingLabel","SaveAsCustomReport","onInput","disabled","_this$state2","saveReportLabel","onClick","preventDefault","maxLength","title","prevState","_prevState$checked","_prevState$name","getInlineReactForm","InlineDownloadForm","onDownload","onCancel","V1Part","getFormatandSementationTypes","validSegmentationTypes","e","indexOf","idx","currentSegment","updatedSegment","slice","deleteIndex","segmentButtons","focus","updateSegment","_this$props2","_this$getFormatandSem3","showAddSegment","IsMultiSegmentInlineDownloadEnabled","showSecondSegment","showDeleteSegment","showAddSegmentContent","Button","addSegment","showSecondSegmentContent","InlineDownloadMultiLevelSelect","deleteSegment","deleteSegmentAriaLabel","formatText","segmentText","format","downloadBoxRole","childRole","downloadFormatsRole","getV1Part","V2Part","CurrentUser","getV2Part","types","trim","timeArray","segmentationTree","validateTimeSegmentationTypes","segmentationType","GiveFeedback","featureName","areaName","getInlineDownloadForm","_ref2$totalRecordCoun","_ref2$isForVNext","Form","ReactDOM","getInlineDownloadFormReact","currentProps","toggleToolbarVisibility","_currentProps$totalRe","_currentProps$downloa","_currentProps$segment","_currentProps$validat","_currentProps$isFeedb","_currentProps$isForVN","_currentProps$clearAf","clearAfterDownloadCall","_currentProps$downloa2","_currentProps$downloa3","Dropdown","button","isMultiLevelDropdown","DropdownLi","onClickWrapper","submitEvent","focusWrapper","closest","tabIndex","onKeyPress","DropdownSubMenu","String","onDeleteSegmentKeyDown","keyCode","renderLi","onKeyDown","style","cursor","child","nextProps","Layout","getCardPreferenceName","entityType","InlineChartReactWrapper","onWindowResize","resizeChart","resizeWidth","setInContextRecommendationContent","hasRecommendation","hasInContextRecommendation","getNewDateRange","waterfallDateFilterProcessor","WaterfallFilterType","DateFilter","serverContext","setNewDateRangeState","newDateRange","dateRange","layout","getCardComponent","scope","recommendationTypes","newI18n","filterService","refreshGrid","perfMarker","campaignType","getFilteredCampaignTypeFromRawFilter","CampaignType","inlineContextComponent","inContextCampaignType","inContextScope","inContextCardPerfMarker","createChild","isActiveChild","PageReady","afterPageReady","getInContextCardDependencies","resp","willInit","InContextCard","recommendationProps","default","_objectSpread","hideCard","hideInContextCard","applyAllCallback","campaignCacheManager","invalidate","haveEnoughSpace","pageTitle","pageTitleInclusiveWidth","outerWidth","showInContextCard","chartWidth","inlineChartContainer","containerMBP","width","inlineChartPanel","chartPanelWidth","filterUpdated","newFilter","updateToolbar","currentlyShow","menuId","onNavItemClick","toolbarEditor","description","iconLeftGlyphName","expanded","showChart","classes","resizeChartListener","handler","_this$props3","preferenceService","set","Data","now","notificationApi","showInfo","_TL_","chartPref","date","setFullYear","getFullYear","defaultDateRange","compared","end","grain","cardHiddenTime","findByName","prevProps","removeEventListener","_this$props4","CardComponent","InlineChartWrapper","getCustomizedFilter","isShowChart","defaultPrimaryMetric","hideChartPanel","loadInlineChartWithWebpack","gridView","chartContainer","campaignId","gridCriterionType","_ref2$preexecuteFlag","preexecuteFlag","isFluctuationsEnabled","gridName","gridDataSource","_ref$preexecuteFlag","i18nInlineChart","globalLegacyI18n","IsFluctuationExperimentEnabled","appConfig","palette","ThemeFluent","preferencePromise","inlineChartDeps","imagePath","Constants","addDateChangeListener","token","appState","seriesColors","primary","original","themePrimary","comparative","secondary","instrumentation","azure","store","pathConfig","mockJsData","mockEdm","preference","InlineChartPreferences","chartDataAdapter","ChartDataAdapter","compact","getPreferencesAndDefaults","getPromise","p$Initialized","getCombinedFilter","onDateChangeHandler","CurrentCampaign","CurrentGridName","InlineChartReact","withMenuLayout","withGlobalFilter","loadInlineChartGeneral","grid","toolbar","gridToolbarGroup","toolbarWithItem","refresh","errI18n","schema","scenario","setting","activity","addScenario","currentScenario","loadInContextRecommendationsCard","create","currentActivity","withRecommendationsScope","withRecommendationServices","odataPath","deps","asyncScheduler","cacheManager","combineText","preferencesService","channel","CHANNEL_TYPES","INCONTEXTCARD","withBlocker","adDisplayUrlService","accountId","values","aid","adGroupId","advertiserCustomerId","AdvertiserCustomerID","userId","customerId","cid","Token","inlineChartContainerStyle","inline","baseInlineChartContainerStyle","fluc","_ref$palette","_ref$iconFontFamily","iconFontFamily","position","zIndex","border","borderRadius","boxShadow","backgroundColor","backdropFilter","getFluctuationContentStyle","fluctuationStyle","getInlineOpportunityStyle","Object","assign","datePickerStyle","extensionEditorStyles","display","fontFamily","fontSize","fontStyle","fontWeight","lineHeight","top","opacity","maxWidth","padding","borderBottom","content","flexDirection","boxSizing","marginLeft","borderLeft","margin","minWidth","paddingLeft","color","overflowWrap","marginRight","background","textAlign","height","verticalAlign","marginBottom","marginTop","active","minHeight","maxHeight","right","borderSpacing","borderCollapse","wordBreak","borderRightWidth","bottom","overflowY","visibility","alignItems","flex","listStyleType","float","borderColor","paddingBottom","borderTop","paddingTop","whiteSpace","overflow","textOverflow","paddingRight","borderLeftWidth","borderTopWidth","borderBottomWidth","borderStyle","flexGrow","outline","pug","module","exports","locals","pug_interp","pug_html","locals_for_with","escape","call"],"sourceRoot":""}