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GAAM,GAApFY,+BAAyIJ,EAAIM,OAAO,OAASH,EAAaz4H,EAAKgX,UAAU,yBAA2B,GAAKyhH,GAAe,QAEnPC,EAAWA,wFAA8IJ,EAAIl8D,KAAK,QAASp8D,EAAKgX,UAAU,cAAc,GAAM,GAAS,SAA8B,EAAEud,KAAK/zB,KAAK,SAAUm4H,EAAgBA,EAAgB34H,KAAmB,qBAAPA,KAAmBA,UAAKqE,EAAU,gBAAiBs0H,EAAgBA,EAAgBb,YAAiC,qBAAdA,YAA0BA,iBAAYzzH,EAAU,mBAAoBs0H,EAAgBA,EAAgB3D,eAAuC,qBAAjBA,eAA6BA,oBAAe3wH,GAAoBq0H,CAAS,C","sources":["../../../../campaign-legacy/packages/adextension-app/viewmodel/get-icon-class.js","../../../../campaign-legacy/packages/adextension-app/viewmodel/get-media-url.js","../../../../campaign-legacy/packages/adextension-app/template/index.js","../../../../campaign-legacy/packages/adextension-associations-container/viewmodel/index.js","../../../../campaign-legacy/packages/adextension-associations-container/view/index.js","../../../../campaign-legacy/packages/adextension-call/template/index.js","../../../../campaign-legacy/packages/adextension-callout/template/index.js","../../../../campaign-legacy/packages/adextension-image/view/extensionEditor2-vnext.js","../../../../campaign-legacy/packages/adextension-location/template/index.js","../../../../campaign-legacy/packages/adextension-price/template/index.js","../../../../campaign-legacy/packages/adextension-review/template/index.js","../../../../campaign-legacy/packages/adextension-shared/util/feature-control.js","../../../../campaign-legacy/packages/adextension-shared/view/delivery/adextension-delivery-status-popup-factory.js","../../../../campaign-legacy/packages/adextension-shared/viewmodel/adextension-grid-column.js","../../../../campaign-legacy/packages/adextension-sitelink/template/index.js","../../../../campaign-legacy/packages/adextension-structuredsnippet/template/index.js","../../../../campaign-legacy/packages/adgroup-settings/viewmodel/index.js","../../../../campaign-legacy/packages/adgroup-settings/view/index.js","../../../../campaign-legacy/packages/adgroup-settings/options/mutables.js","../../../../campaign-legacy/packages/audiences/grid/base-column.js","../../../../campaign-legacy/packages/auto-targets/viewmodel/shared/CampaignAdgroupSelector.js","../../../../campaign-legacy/packages/bingadsgrid/config-preprocessor/header-template-config.js","../../../../campaign-legacy/packages/bingadsgrid/service/fetch-preference-config.js","../../../../campaign-legacy/packages/bingadsgrid/vnext/plugin/date-filter.js","../../../../campaign-legacy/packages/bingadsgrid/vnext/plugin/refresh-cache-plugin.js","../../../../campaign-legacy/packages/bingadsgrid/vnext/shared/columns.js","../../../../campaign-legacy/packages/bulk-operation/automated-rules/new-ui-deps.js","../../../../campaign-legacy/packages/bulk-operation/automated-rules/rule-mapper.js","../../../../campaign-legacy/packages/bulk-operation/edit-detail/detail-mapper.js","../../../../campaign-legacy/packages/campaign-settings/viewmodel/index.js","../../../../campaign-legacy/packages/campaign-settings/view/index.js","../../../../campaign-legacy/packages/campaign-targeting/view/campaign-targeting.js","../../../../campaign-legacy/packages/common-grid-config/controls/account-list-view.js","../../../../campaign-legacy/packages/common-grid-config/controls/tracking-status-popover.js","../../../../campaign-legacy/packages/common-grid-config/filter/base-filter-config.js","../../../../campaign-legacy/packages/common-grid-config/filter/update-delivery-status-option-for-filter.js","../../../../campaign-legacy/packages/common-grid-config/selection.js","../../../../campaign-legacy/packages/common-grid-config/util/schema-editor.js","../../../../campaign-legacy/packages/conversion-tracking/common/util/index.js","../../../../campaign-legacy/packages/conversion-tracking/conversion-goals/grid/unassigned-detail-popover.js","../../../../campaign-legacy/packages/conversion-tracking/conversion-goals/grid/column-config.js","../../../../campaign-legacy/packages/common-grid-plugins/perf-data-explanation/perf-data-explanation-view.js","../../../../campaign-legacy/packages/common-grid-plugins/perf-data-explanation/index.js","../../../../campaign-legacy/packages/conversion-tracking/conversion-goals/grid/grid-config.js","../../../../campaign-legacy/packages/conversion-tracking/conversion-goals/grid/index.js","../../../../campaign-legacy/packages/conversion-tracking/conversion-goals/grid/plugin-config.js","../../../../campaign-legacy/packages/conversion-tracking/uet-tags-dashboard-test/grid/grid-config.js","../../../../campaign-legacy/packages/conversion-tracking/uet-tags-dashboard-test/grid/index.js","../../../../campaign-legacy/packages/conversion-tracking/uet-tags-dashboard-test/grid/column-config.js","../../../../campaign-legacy/packages/conversion-tracking/uet-tags-dashboard-test/grid/plugin-config.js","../../../../campaign-legacy/packages/conversion-tracking/uet-tags-dashboard/grid/grid-config.js","../../../../campaign-legacy/packages/conversion-tracking/uet-tags-dashboard/grid/query-config.js","../../../../campaign-legacy/packages/conversion-tracking/uet-tags-dashboard/grid/export-data.js","../../../../campaign-legacy/packages/conversion-tracking/uet-tags-dashboard/grid/index.js","../../../../campaign-legacy/packages/conversion-tracking/uet-tags-dashboard/grid/column-config.js","../../../../campaign-legacy/packages/conversion-tracking/uet-tags-dashboard/grid/plugin-config.js","../../../../campaign-legacy/packages/conversion-tracking/uet-tags/create/index.js","../../../../campaign-legacy/packages/conversion-tracking/uet-tags/grid/column-config.js","../../../../campaign-legacy/packages/conversion-tracking/uet-tags/grid/grid-config.js","../../../../campaign-legacy/packages/conversion-tracking/uet-tags/grid/index.js","../../../../campaign-legacy/packages/conversion-tracking/uet-tags/grid/plugin-config.js","../../../../campaign-legacy/packages/conversion-tracking/upload-conversions/changes-view.js","../../../../campaign-legacy/packages/conversion-tracking/upload-conversions/history-grid-columns-config.js","../../../../campaign-legacy/packages/conversion-tracking/upload-conversions/history-grid-data-config.js","../../../../campaign-legacy/packages/conversion-tracking/upload-conversions/history-grid.js","../../../../campaign-legacy/packages/crud-ad/viewmodel/index.js","../../../../campaign-legacy/packages/crud-ad/view/adgroup-selector-repository.js","../../../../campaign-legacy/packages/crud-ad/view/adgroup-selector-proxy.js","../../../../campaign-legacy/packages/crud-ad/view/campaign-adgroup-selector-repository.js","../../../../campaign-legacy/packages/crud-ad/view/campaign-adgroup-selector-proxy.js","../../../../campaign-legacy/packages/crud-ad/view/index.js","../../../../campaign-legacy/packages/crud-keywords/viewmodel/create-inline-recommendation.js","../../../../campaign-legacy/packages/crud-keywords/view/create-inline-recommendation.js","../../../../campaign-legacy/packages/griddownload/view/baseDownload.js","../../../../campaign-legacy/packages/hotel-center-ad-extensions/shared/service/hotel-center-entity-selector-service.js","../../../../campaign-legacy/packages/hotel-center-ad-extensions/shared/viewmodel/new-grid-config.js","../../../../campaign-legacy/packages/hotel-center-ad-extensions/shared/service/subAccountAssociationsRequestFactory.js","../../../../campaign-legacy/packages/hotel-center-ad-extensions/shared/service/hotelGroupAssociationsRequestFactory.js","../../../../campaign-legacy/packages/hotel-center-ad-extensions/shared/service/hotel-center-associations-repository.js","../../../../campaign-legacy/packages/hotel-center-ad-extensions/shared/service/repository.js","../../../../campaign-legacy/packages/hotel-center-ad-extensions/shared/view/Hotel-center-base-ad-extension-helper.js","../../../../campaign-legacy/packages/hotel-center-ad-extensions/shared/view/hotel-center-base-adextension-view.js","../../../../campaign-legacy/packages/hotel-center-assignment/assignment-ui-next.js","../../../../campaign-legacy/packages/hotel-center-ad-extensions/callout/callout-adextension-associations-view.js","../../../../campaign-legacy/packages/hotel-center-intelligence/intelligence-ui-next.js","../../../../campaign-legacy/packages/hotel-center-overview/overview-ui-next.js","../../../../campaign-legacy/packages/hotel-center-setup/setup-ui-next.js","../../../../campaign-legacy/packages/hotel-center-utils/index.js","../../../../campaign-legacy/packages/hotel-center/bootstrap/bootstrap-ui-next.js","../../../../campaign-legacy/packages/import-campaigns/shared/import-error-code-helper.js","../../../../campaign-legacy/packages/import-campaigns/shared/import-helper.js","../../../../campaign-legacy/packages/import-campaigns/azureUploader.js","../../../../campaign-legacy/packages/import-campaigns/spa/file-import-page.js","../../../../campaign-legacy/packages/import-campaigns/spa/google-import-page.js","../../../../campaign-legacy/packages/import-campaigns/spa/facebook-import-page.js","../../../../campaign-legacy/packages/import-campaigns/spa/amazon-import-page.js","../../../../campaign-legacy/packages/import-campaigns/spa/pinterest-import-page.js","../../../../campaign-legacy/packages/import-campaigns/spa/options-blacklist.js","../../../../campaign-legacy/packages/import-campaigns/spa/statuses.js","../../../../campaign-legacy/packages/import-campaigns/spa/shared-dependencies.js","../../../../campaign-legacy/packages/inline-chart/constants.js","../../../../campaign-legacy/packages/inline-chart/model/inlinechartdropdownoption.js","../../../../campaign-legacy/packages/inline-chart/model/granularityDropdownOption.js","../../../../campaign-legacy/packages/inline-chart/chartdelegateadapter.js","../../../../campaign-legacy/packages/inline-chart/chartnameconverter.js","../../../../campaign-legacy/packages/inline-chart/chartdataprovider.js","../../../../campaign-legacy/packages/campaign-state/index.js","../../../../campaign-legacy/packages/inline-chart/inline-chart-preferences.js","../../../../campaign-legacy/packages/inline-chart/viewmodel/inlinechartviewmodel.js","../../../../campaign-legacy/packages/inline-chart/numericsymbolformatter.js","../../../../campaign-legacy/packages/inline-chart/view/inlinechartview.js","../../../../campaign-legacy/packages/bingadsgrid/service/set-preference-by-report-email-rule.js","../../../../campaign-legacy/packages/inline-download-reports/create-similar.js","../../../../campaign-legacy/packages/inline-download-reports/load-emails.js","../../../../campaign-legacy/packages/scheduled-import/view/import-center-options.js","../../../../campaign-legacy/packages/scheduled-import/view/import-i18n.js","../../../../campaign-legacy/packages/scheduled-import/view/batched-import-processor.js","../../../../campaign-legacy/packages/scheduled-import/view/import-log-constants.js","../../../../campaign-legacy/packages/scheduled-import/view/import-log-datasource-handler.js","../../../../campaign-legacy/packages/import-campaigns/shared/download.js","../../../../campaign-legacy/packages/scheduled-import/view/import-log-grid-config.js","../../../../campaign-legacy/packages/scheduled-import/viewmodel/import-log-grid.js","../../../../campaign-legacy/packages/scheduled-import/view/import-settings-tooltip.js","../../../../campaign-legacy/packages/scheduled-import/view/import-log-grid-base.js","../../../../campaign-legacy/packages/import-campaigns/shared/showGoogleLoginPopup.js","../../../../campaign-legacy/packages/scheduled-import/view/import-log-grid.js","../../../../campaign-legacy/packages/scheduled-import/view/import-schedule-constants.js","../../../../campaign-legacy/packages/scheduled-import/view/import-schedule-grid-config.js","../../../../campaign-legacy/packages/scheduled-import/view/import-schedule-grid-data-source.js","../../../../campaign-legacy/packages/bingadsgrid/shared/update-tool.js","../../../../campaign-legacy/packages/bingadsgrid/shared/control-factory.js","../../../../campaign-legacy/packages/bingadsgrid/plugin/toolbar.js","../../../../campaign-legacy/packages/scheduled-import/viewmodel/import-schedule-grid.js","../../../../campaign-legacy/packages/scheduled-import/view/import-schedule-accounts-detail-view.js","../../../../campaign-legacy/packages/scheduled-import/view/import-schedule-grid-base.js","../../../../campaign-legacy/packages/scheduled-import/view/import-schedule-grid.js","../../../../campaign-legacy/packages/scheduled-import/service/preference-upload-api.js","../../../../campaign-legacy/packages/scheduled-import/view/preference-upload-status.js","../../../../campaign-legacy/packages/scheduled-import/view/preference-upload-error-maps.js","../../../../campaign-legacy/packages/scheduled-import/view/preference-upload.js","../../../../campaign-legacy/packages/scheduled-import/view/shared-column-configs/import-freq-col.js","../../../../campaign-legacy/packages/shopping-campaign/service/campaign-creation/service.js","../../../../campaign-legacy/packages/shopping-campaign/view/campaign-creation/smart-shopping-base.js","../../../../campaign-legacy/packages/shopping-campaign/view/campaign-creation/ssc-instrumentation.js","../../../../campaign-legacy/packages/shopping-campaign/view/campaign-creation/smart-shopping-campaign-settings.js","../../../../campaign-legacy/packages/shopping-campaign/viewmodel/campaign-creation/update.js","../../../../campaign-legacy/packages/shopping-campaign/view/campaign-creation/update.js","../../../../campaign-legacy/packages/targeting-settings/change-bid-adjustment/change-bid-adjustment-model.js","../../../../campaign-legacy/packages/targeting-settings/change-bid-adjustment/change-bid-adjustment-viewmodel.js","../../../../campaign-legacy/packages/targeting-settings/helpers.js","../../../../campaign-legacy/packages/targeting-settings/change-bid-adjustment/change-bid-adjustment-view.js","../../../../campaign-legacy/packages/targeting-settings/change-cashback-percent/change-cashback-percent-view.js","../../../../campaign-legacy/packages/targeting-settings/bid-adjustment-plugin.js","../../../../campaign-legacy/packages/targeting-settings/bulk-remove-plugin.js","../../../../campaign-legacy/packages/targeting-settings/common-alert/common-alert.js","../../../../campaign-legacy/packages/targeting-settings/common-alert/index.js","../../../../campaign-legacy/packages/adextension-app/template/universal-item-template.pug","../../../../campaign-legacy/packages/adextension-associations-container/template/layout-new.pug","../../../../campaign-legacy/packages/adextension-image/template/extensionCreator2.pug","../../../../campaign-legacy/packages/adextension-image/template/extensionEditor2.pug","../../../../campaign-legacy/packages/adextension-price/template/gridRowTemplate.pug","../../../../campaign-legacy/packages/adextension-shared/template/totals-template.pug","../../../../campaign-legacy/packages/adgroup-settings/template/index.pug","../../../../campaign-legacy/packages/bingadsgrid/template/header.pug","../../../../campaign-legacy/packages/bingadsgrid/template/status-column.pug","../../../../campaign-legacy/packages/bingadsgrid/vnext/template/deliveryStatusTemplate.pug","../../../../campaign-legacy/packages/campaign-settings/template/index.pug","../../../../campaign-legacy/packages/campaign-targeting/template/campaign-targeting.pug","../../../../campaign-legacy/packages/common-grid-config/controls/account-list-template.pug","../../../../campaign-legacy/packages/common-grid-config/controls/help-link-template.pug","../../../../campaign-legacy/packages/common-grid-config/controls/tracking-status-popover-template.pug","../../../../campaign-legacy/packages/common-grid-plugins/perf-data-explanation/template.pug","../../../../campaign-legacy/packages/conversion-tracking/conversion-goals/grid/category-template.pug","../../../../campaign-legacy/packages/conversion-tracking/conversion-goals/grid/goal-read-only-popover-template.pug","../../../../campaign-legacy/packages/conversion-tracking/conversion-goals/grid/goal-type-popover-template.pug","../../../../campaign-legacy/packages/conversion-tracking/conversion-goals/grid/goal-type-template.pug","../../../../campaign-legacy/packages/conversion-tracking/conversion-goals/grid/name-template.pug","../../../../campaign-legacy/packages/conversion-tracking/conversion-goals/grid/revenue-template.pug","../../../../campaign-legacy/packages/conversion-tracking/conversion-goals/grid/status-template.pug","../../../../campaign-legacy/packages/conversion-tracking/conversion-goals/grid/tag-id-template.pug","../../../../campaign-legacy/packages/conversion-tracking/conversion-goals/grid/tracking-status-template.pug","../../../../campaign-legacy/packages/conversion-tracking/conversion-goals/grid/unassigned-category-popover-template.pug","../../../../campaign-legacy/packages/conversion-tracking/conversion-goals/grid/unassigned-revenue-popover-template.pug","../../../../campaign-legacy/packages/conversion-tracking/template/upload-conversions/changes-view.pug","../../../../campaign-legacy/packages/conversion-tracking/template/upload-conversions/columns/actions.pug","../../../../campaign-legacy/packages/conversion-tracking/template/upload-conversions/columns/datetime-user.pug","../../../../campaign-legacy/packages/conversion-tracking/template/upload-conversions/columns/summary.pug","../../../../campaign-legacy/packages/conversion-tracking/template/upload-conversions/columns/uploaded-file.pug","../../../../campaign-legacy/packages/conversion-tracking/template/upload-conversions/history-grid.pug","../../../../campaign-legacy/packages/conversion-tracking/uet-tags-dashboard-test/grid/parameters-received-template.pug","../../../../campaign-legacy/packages/conversion-tracking/uet-tags-dashboard-test/grid/parameters-template.pug","../../../../campaign-legacy/packages/conversion-tracking/uet-tags-dashboard/grid/data-template.pug","../../../../campaign-legacy/packages/conversion-tracking/uet-tags-dashboard/grid/parameters-received-template.pug","../../../../campaign-legacy/packages/conversion-tracking/uet-tags-dashboard/grid/parameters-template.pug","../../../../campaign-legacy/packages/conversion-tracking/uet-tags/create/sharing-template.pug","../../../../campaign-legacy/packages/conversion-tracking/uet-tags/create/template.pug","../../../../campaign-legacy/packages/conversion-tracking/uet-tags/grid/action-template.pug","../../../../campaign-legacy/packages/conversion-tracking/uet-tags/grid/audience-template.pug","../../../../campaign-legacy/packages/conversion-tracking/uet-tags/grid/column-shared-usedby-template.pug","../../../../campaign-legacy/packages/conversion-tracking/uet-tags/grid/goals-template.pug","../../../../campaign-legacy/packages/conversion-tracking/uet-tags/grid/name-template.pug","../../../../campaign-legacy/packages/conversion-tracking/uet-tags/grid/tag-id-template.pug","../../../../campaign-legacy/packages/conversion-tracking/uet-tags/grid/tag-read-only-popover-template.pug","../../../../campaign-legacy/packages/conversion-tracking/uet-tags/grid/tracking-status-template.pug","../../../../campaign-legacy/packages/crud-ad/template/index.pug","../../../../campaign-legacy/packages/crud-keywords/template/create-inline-recommendation.pug","../../../../campaign-legacy/packages/hotel-center-ad-extensions/shared/template/hotel-extension-page.pug","../../../../campaign-legacy/packages/inline-chart/template/inlinechart.pug","../../../../campaign-legacy/packages/scheduled-import/template/adwords-account-column.pug","../../../../campaign-legacy/packages/scheduled-import/template/import-id.pug","../../../../campaign-legacy/packages/scheduled-import/template/import-log-actions.pug","../../../../campaign-legacy/packages/scheduled-import/template/import-log-grid.pug","../../../../campaign-legacy/packages/scheduled-import/template/import-mode.pug","../../../../campaign-legacy/packages/scheduled-import/template/import-schedule-grid.pug","../../../../campaign-legacy/packages/scheduled-import/template/import-schedule-name.pug","../../../../campaign-legacy/packages/scheduled-import/template/import-schedule-run-now-status.pug","../../../../campaign-legacy/packages/scheduled-import/template/import-settings-col.pug","../../../../campaign-legacy/packages/scheduled-import/template/import-settings-tooltip.pug","../../../../campaign-legacy/packages/scheduled-import/template/import-task-item-list-column.pug","../../../../campaign-legacy/packages/scheduled-import/template/import-type.pug","../../../../campaign-legacy/packages/scheduled-import/template/link.pug","../../../../campaign-legacy/packages/scheduled-import/template/preference-upload.pug","../../../../campaign-legacy/packages/shopping-campaign/template/campaign-creation/smart-shopping-campaign-creation.pug","../../../../campaign-legacy/packages/shopping-campaign/template/campaign-creation/update.pug","../../../../campaign-legacy/packages/targeting-settings/common-alert/common-alert-template.pug"],"sourcesContent":["const defaultIconClasses = {\r\n 'Android': 'google-play-store-icon',\r\n 'iOS': 'apple-app-store-icon',\r\n 'Windows Phone': 'windows-phone-store-icon',\r\n 'Windows': 'windows-store-icon',\r\n};\r\n\r\nexport const getIconClass = (extension) => defaultIconClasses[extension.AppPlatform];\r\n","import config from '@bingads-webui-component-legacy/config/index';\r\nimport $url from '@bingads-webui/url-util';\r\n\r\nexport const getMediaUrl = (extension) => {\r\n let mediaUrl = extension.MediaUrl;\r\n\r\n if (mediaUrl) {\r\n const adExtensionConfig = config.get('Feature').AdExtension;\r\n\r\n if (adExtensionConfig && adExtensionConfig.AppExtensionIconBaseUrl &&\r\n mediaUrl.indexOf(adExtensionConfig.AppExtensionIconBaseUrl) !== 0) {\r\n mediaUrl = $url.join(adExtensionConfig.AppExtensionIconBaseUrl, mediaUrl);\r\n }\r\n }\r\n\r\n return mediaUrl;\r\n};\r\n","import { extend } from 'underscore';\r\nimport { getIconClass } from '../viewmodel/get-icon-class';\r\nimport { getMediaUrl } from '../viewmodel/get-media-url';\r\nimport rawItemTemplate from './universal-item-template.pug';\r\n\r\nexport const universalItemTemplate = (arg0) => rawItemTemplate(extend({ getMediaUrl, getIconClass }, arg0));\r\n","import ko from 'knockout';\r\nimport _ from 'underscore';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/adextensions');\r\n\r\nconst CampaignTypeShopping = 2;\r\nconst CampaignTypeAudience = 8;\r\n\r\nexport default class ViewModel {\r\n constructor(options) {\r\n this.options = options || {};\r\n\r\n this.scope = ko.observable({\r\n campaignId: this.options.campaignId,\r\n adGroupId: this.options.adgroupId,\r\n });\r\n\r\n this.scopes = ko.observableArray();\r\n\r\n this.entitySelectorService = this.options.entitySelectorService;\r\n this.i18nKeys = this.options.i18nKeys;\r\n this.showCampaigns = !this.options.campaignId && (this.options.entityType === 'campaign');\r\n this.showAdGroups = !this.options.adgroupId && (this.options.entityType === 'adgroup');\r\n this.showSelector = this.showCampaigns || this.showAdGroups;\r\n this.maximumSelectedEntities = options.maximumSelectedEntities;\r\n\r\n this.predicates = {\r\n campaign(predicate) {\r\n return predicate && predicate.CampaignType !== CampaignTypeShopping && predicate.CampaignType !== CampaignTypeAudience;\r\n },\r\n adgroup: [[\r\n {operand: 'Campaign/CampaignType', operator: 'eq', value: 'Enum.CampaignType\\'Default\\''},\r\n {operand: 'Campaign/CampaignType', operator: 'eq', value: 'Enum.CampaignType\\'DynamicSearchAds\\''},\r\n ]],\r\n };\r\n\r\n this.toggleEditor = () => this.showEditor(!this.showEditor());\r\n this.scopeContext = this.options.scopeContext;\r\n\r\n this.isMultiSelect = this.options.isMultiSelect;\r\n this.showSelection = this.options.showSelection;\r\n if (this.isMultiSelect && this.showSelector) {\r\n options.i18nKeys.subtitle = options.i18nKeys.multiSelectSubtitle;\r\n }\r\n\r\n this.selectedItemsLimit = this.options.maxDisplayedEntities;\r\n this.remainingItemsText = ko.computed(\r\n () => i18n.get(this.options.i18nKeys.campaignAdgroupLimitText, {\r\n count: this.scopes().length - this.selectedItemsLimit,\r\n }));\r\n\r\n this.showEditor = ko.observable(!this.showSelector);\r\n this.isEditMode = ko.observable(false);\r\n\r\n this.selectedCampaigns = this.isMultiSelect ? ko.observableArray() : ko.observable();\r\n this.selectedAdgroups = this.isMultiSelect ? ko.observableArray() : ko.observable();\r\n\r\n this.selectedCampaigns.subscribe((newCampaign) => {\r\n if (this.options.entityType === 'campaign') {\r\n if (this.isMultiSelect) {\r\n this.scopes(_.map(newCampaign, (campaign) => ({\r\n campaignId: campaign.Id,\r\n adGroupId: 0,\r\n campaignName: campaign.Name || campaign.name,\r\n adGroupName: '',\r\n })));\r\n this.showEditor(true);\r\n return;\r\n }\r\n let current = this.scope(),\r\n newCampaignId = newCampaign ? newCampaign.Id : null;\r\n\r\n if (newCampaignId !== current.campaignId) {\r\n this.scope({\r\n campaignId: newCampaignId,\r\n adGroupId: current.adGroupId,\r\n campaignName: newCampaign.Name || newCampaign.name,\r\n adGroupName: '',\r\n });\r\n this.showEditor(!!newCampaignId);\r\n }\r\n }\r\n });\r\n\r\n this.selectedAdgroups.subscribe((newAdgroup) => {\r\n if (this.options.entityType === 'adgroup') {\r\n if (this.isMultiSelect) {\r\n this.scopes(_.map(newAdgroup, (adgroup) => ({\r\n campaignId: adgroup.Campaign ? adgroup.Campaign.Id : adgroup.campaignId,\r\n adGroupId: adgroup.Id,\r\n campaignName: adgroup.Campaign ? adgroup.Campaign.Name : adgroup.campaignName,\r\n adGroupName: adgroup.Name || adgroup.name,\r\n })));\r\n this.showEditor(true);\r\n return;\r\n }\r\n let current = this.scope(),\r\n newAdgroupId = newAdgroup ? newAdgroup.Id : null;\r\n\r\n if (newAdgroupId !== current.adGroupId) {\r\n this.scope({\r\n campaignId: newAdgroup.Campaign ? newAdgroup.Campaign.Id : newAdgroup.campaignId,\r\n adGroupId: newAdgroupId,\r\n campaignName: newAdgroup.Campaign ? newAdgroup.Campaign.Name : newAdgroup.campaignName,\r\n adGroupName: newAdgroup.Name || newAdgroup.name,\r\n });\r\n this.showEditor(!!newAdgroupId);\r\n }\r\n }\r\n });\r\n }\r\n}\r\n","/* eslint-disable camelcase */\r\nimport _ from 'underscore';\r\nimport Backbone from 'backbone';\r\nimport ko from 'knockout';\r\nimport 'jquery';\r\nimport scopeService from '@bingads-webui-static-legacy/scope-service';\r\nimport ViewModel from '@bingads-webui-campaign-legacy/adextension-associations-container/viewmodel/index';\r\nimport templateNew from '@bingads-webui-campaign-legacy/adextension-associations-container/template/layout-new.pug';\r\nimport { CampaignAdgroupSelectorProxy, AdgroupSelectorProxy, CampaignSelectorProxy } from '@bingads-webui-campaign-react/campaign-adgroup-selector-control';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport jsdata from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport edmCampaign from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport withUiBlock from '@bingads-webui-component-legacy/uiblocker/index';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nimport { extensionCampaignTypeCheck } from '@bingads-webui-campaign/ad-extensions-shared';\r\n\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/adextensions');\r\nconst CampaignAdgroupSelectorI18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/campaign-adgroup-selector');\r\n\r\nconst campaignFilter = 'CampaignType eq Enum.CampaignType\\'Default\\'';\r\nconst adgroupNoHotelFilter = '(Campaign/CampaignType ne Enum.CampaignType\\'Hotel\\')';\r\n\r\nexport default class View extends Backbone.View {\r\n initialize(options, editorOptions = {}) {\r\n const defaultOptions = {\r\n i18nKeys: {\r\n subtitle: [],\r\n editTitle: '',\r\n multiSelectSubtitle: options.entityType === 'adgroup' ? ['AdExtensions_MultiSelect_Adgroups_Container_Subtitle'] : ['AdExtensions_MultiSelect_Container_Subtitle'],\r\n campaignAdgroupLimitText: 'CampaignAdgroupListRemainingCount',\r\n editLabel: 'Edit',\r\n },\r\n maxDisplayedEntities: 3,\r\n maximumSelectedEntities: 100,\r\n isMultiSelect: config.get('Permissions').IsBulkAdExtensionAssociationAllowed,\r\n showSelection: true,\r\n extensionCampaignTypeCheck,\r\n };\r\n\r\n this.options = _.defaults({}, options, defaultOptions);\r\n this.i18nKeys = _.defaults({}, this.options.i18nKeys, defaultOptions.i18nKeys);\r\n this.i18nKeys.subtitle = _.isArray(this.i18nKeys.subtitle) ? this.i18nKeys.subtitle : [this.i18nKeys.subtitle];\r\n let scopeContext = scopeService.getScope();\r\n\r\n //eslint-disable-next-line camelcase\r\n this.ko_model = new ViewModel({\r\n entityType: this.options.entityType,\r\n campaignId: Number(this.options.campaignId) || 0,\r\n adgroupId: Number(this.options.adgroupId) || 0,\r\n scopeContext,\r\n isMultiSelect: this.options.isMultiSelect,\r\n i18nKeys: this.i18nKeys,\r\n maxDisplayedEntities: this.options.maxDisplayedEntities,\r\n maximumSelectedEntities: this.options.maximumSelectedEntities,\r\n entitySelectorService: this.options.entitySelectorService,\r\n showSelection: this.options.showSelection,\r\n });\r\n\r\n this.editor = new this.options.AssociationEditor(_.extend({}, this.options, editorOptions, {\r\n hasSubTitle: this.options.isMultiSelect && this.ko_model.showSelector,\r\n showErrorsInline: false,\r\n campaignName: this.options.campaignName ? this.options.campaignName : _.result(scopeContext.campaign, 'name'),\r\n adGroupName: this.options.adgroupName ? this.options.adgroupName : _.result(scopeContext.adgroup, 'name'),\r\n showEditor: this.ko_model.showEditor(),\r\n entityType: this.options.entityType,\r\n showSelector: this.ko_model.showSelector,\r\n isNewEntitySelector: this.options.isNewEntitySelector,\r\n }));\r\n\r\n this.ko_model.showEditor.subscribe((show) => {\r\n this.editor.ko_model.showEditor(show);\r\n });\r\n\r\n return this;\r\n }\r\n\r\n render() {\r\n this.$el.html(templateNew({\r\n i18n,\r\n i18nKeys: this.i18nKeys,\r\n isMultiSelect: this.options.isMultiSelect,\r\n }));\r\n\r\n let selectorView = null;\r\n\r\n this.showCampaigns = !this.options.campaignId && (this.options.entityType === 'campaign');\r\n this.showAdGroups = !this.options.adgroupId && (this.options.entityType === 'adgroup');\r\n\r\n if (this.showCampaigns && this.options.proxy) {\r\n this.ko_model.showSelection = false;\r\n selectorView = this.options.proxy.createCampaignView({\r\n i18n: this.options.i18nHotelCenter,\r\n ko_model: this.ko_model,\r\n }).render();\r\n } else if (this.showAdGroups && this.options.proxy) {\r\n this.ko_model.showSelection = false;\r\n selectorView = this.options.proxy.createCampaignAdgroupView({\r\n i18n: this.options.i18nHotelCenter,\r\n ko_model: this.ko_model,\r\n }).render();\r\n } else if (this.showCampaigns) {\r\n let currentCampaignFilter = campaignFilter;\r\n let currentAdgroupnFilter = '';\r\n\r\n if (pageContext.Permissions && pageContext.Permissions.dynamic && pageContext.Permissions.dynamic.PerformanceMaxCampaigns &&\r\n _.contains(this.options.extensionCampaignTypeCheck.pmaxSupportedExtentions, this.options.adExtensionType)) {\r\n currentCampaignFilter += ' or CampaignType eq Enum.CampaignType\\'PerformanceMax\\'';\r\n }\r\n\r\n if (pageContext.Permissions && pageContext.Permissions.dynamic && pageContext.Permissions.dynamic.UnifiedAppAds &&\r\n _.contains(this.options.extensionCampaignTypeCheck.appSupportedExtensions, this.options.adExtensionType)\r\n ) {\r\n currentCampaignFilter += ' or CampaignType eq Enum.CampaignType\\'App\\'';\r\n }\r\n\r\n if (pageContext.Permissions && pageContext.Permissions.dynamic && pageContext.Permissions.dynamic.HotelCampaign) {\r\n if (_.contains(this.options.extensionCampaignTypeCheck.hotelSupportedExtentions, this.options.adExtensionType)) {\r\n currentCampaignFilter += ' or CampaignType eq Enum.CampaignType\\'Hotel\\'';\r\n } else {\r\n currentAdgroupnFilter = adgroupNoHotelFilter;\r\n }\r\n }\r\n\r\n currentCampaignFilter = `(${currentCampaignFilter})`;\r\n\r\n const campaignSelectorProxy = new CampaignSelectorProxy({\r\n onSelectDone: (selectedCampaign) => {\r\n this.ko_model.selectedCampaigns(selectedCampaign);\r\n },\r\n jsData: jsdata,\r\n edmCampaign,\r\n withUiBlocker: (uiBlockContainer) => withUiBlock(uiBlockContainer),\r\n i18n: CampaignAdgroupSelectorI18n,\r\n isMultiMode: this.options.isMultiSelect,\r\n optionalCampaignFilter: currentCampaignFilter,\r\n optionalAdgroupFilter: currentAdgroupnFilter,\r\n });\r\n\r\n selectorView = campaignSelectorProxy.getCampaignSelectorView().render();\r\n } else if (this.showAdGroups && this.options.campaignId) {\r\n const adgroupSelectorProxy = new AdgroupSelectorProxy({\r\n onSelectDone: (selectedAdGroup) => {\r\n this.ko_model.selectedAdgroups(selectedAdGroup);\r\n },\r\n jsData: jsdata,\r\n edmCampaign,\r\n withUiBlocker: (uiBlockContainer) => withUiBlock(uiBlockContainer),\r\n i18n: CampaignAdgroupSelectorI18n,\r\n campaignId: this.options.campaignId,\r\n campaign: this.ko_model.scopeContext.campaign,\r\n isMultiMode: this.options.isMultiSelect,\r\n });\r\n\r\n selectorView = adgroupSelectorProxy.getAdgroupSelectorView().render();\r\n } else if (this.showAdGroups && !this.options.campaignId) {\r\n let currentCampaignFilter = campaignFilter;\r\n let currentAdgroupnFilter = '';\r\n\r\n if (pageContext.Permissions && pageContext.Permissions.dynamic && pageContext.Permissions.dynamic.HotelCampaign) {\r\n if (_.contains(this.options.extensionCampaignTypeCheck.hotelSupportedExtentions, this.options.adExtensionType)) {\r\n currentCampaignFilter += ' or CampaignType eq Enum.CampaignType\\'Hotel\\'';\r\n } else {\r\n currentAdgroupnFilter = adgroupNoHotelFilter;\r\n }\r\n }\r\n\r\n currentCampaignFilter = `(${currentCampaignFilter})`;\r\n\r\n const campaignAdgroupSelectorProxy = new CampaignAdgroupSelectorProxy({\r\n onCampaignSelect: (selectedCampaign) => {\r\n this.ko_model.selectedCampaigns(selectedCampaign);\r\n },\r\n onAdGroupSelect: _.noop,\r\n onMultiSelectedDone: (selectedAdGroup) => {\r\n this.ko_model.selectedAdgroups(selectedAdGroup);\r\n },\r\n jsData: jsdata,\r\n edmCampaign,\r\n withUiBlocker: (uiBlockContainer) => withUiBlock(uiBlockContainer),\r\n i18n: CampaignAdgroupSelectorI18n,\r\n isMultiMode: this.options.isMultiSelect,\r\n optionalCampaignFilter: currentCampaignFilter,\r\n optionalAdgroupFilter: currentAdgroupnFilter,\r\n });\r\n\r\n selectorView = campaignAdgroupSelectorProxy.getCampaignAdgroupSelectorView().render();\r\n }\r\n if (selectorView) {\r\n this.$('.panel-body').append(selectorView.el);\r\n }\r\n\r\n ko.applyBindings(this.ko_model, this.$el[0]);\r\n\r\n this.editor.render();\r\n\r\n this.$el.find('.associations').html(this.editor.$el);\r\n\r\n this.ko_model.scope.subscribe((newScope) => {\r\n this.editor.trigger('scope-changed', newScope);\r\n });\r\n\r\n this.ko_model.scopes.subscribe((newScopes) => {\r\n this.editor.trigger('scopes-changed', newScopes);\r\n });\r\n\r\n this.editor.on('save', (param) => {\r\n this.trigger('save', param);\r\n });\r\n\r\n this.editor.on('cancel', (param) => {\r\n this.trigger('cancel', param);\r\n });\r\n\r\n this.editor.on('modeChange', (param) => {\r\n if (param.isEdit) {\r\n this.ko_model.isEditMode(true);\r\n } else {\r\n this.ko_model.isEditMode(false);\r\n }\r\n });\r\n return this;\r\n }\r\n\r\n remove() {\r\n this.undelegateEvents();\r\n this.$el.empty();\r\n ko.cleanNode(this.$el[0]);\r\n if (this.editor) {\r\n this.editor.remove();\r\n }\r\n return this;\r\n }\r\n}\r\n","import { extend } from 'underscore';\r\nimport rawItemTemplate from './gridRowTemplate.pug';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/adextensions');\r\n\r\nexport const universalItemTemplate = (arg0) => rawItemTemplate(extend({ i18n }, arg0));\r\n","import rawItemTemplate from './gridRowTemplate.pug';\r\n\r\nexport const universalItemTemplate = rawItemTemplate;\r\n","/*eslint-disable no-bitwise*/\r\nimport Promise from 'bluebird';\r\nimport ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport backbone from 'backbone';\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport UpgradedUrl from '@bingads-webui-component-legacy/upgraded-url/view/index';\r\nimport ImageAdExtensionsRepository from '@bingads-webui-campaign-legacy/adextension-image/service/imageAdExtensionsRepository2';\r\nimport creatorTemplate from '@bingads-webui-campaign-legacy/adextension-image/template/extensionCreator2.pug';\r\nimport editorTemplate from '@bingads-webui-campaign-legacy/adextension-image/template/extensionEditor2.pug';\r\nimport odata from '@bingads-webui-component-legacy/http/channel/odata';\r\nimport state from '@bingads-webui-component-legacy/state/index';\r\nimport imageAspectRatios from '@bingads-webui-campaign-legacy/adextension-shared/imageAspectRatios';\r\nimport { PerfMarkerFactory } from '@bingads-webui/performance-marker';\r\nimport withUiBlock from '@bingads-webui-component-legacy/uiblocker/index';\r\nimport '@bingads-webui/kendo/kendo.listview';\r\nimport '@bingads-webui/kendo/kendo.data';\r\nimport '@bingads-webui-static-legacy/extension/ko/sectionItemBinding';\r\nimport { ExtensionImagesControl } from '@bingads-webui-campaign-react/extension-images-control';\r\nimport dataModelUtil from '@bingads-webui-campaign-legacy/adextension-image/util/dataModelConvert';\r\nimport SchedulingView from '@bingads-webui-campaign-legacy/adextension-shared/view/scheduling';\r\nimport { EligibleLayout } from '@bingads-webui-campaign-legacy/adextension-image/constants';\r\nimport { getAutoCroppedImages } from '@bingads-webui-campaign-react/image-experience';\r\nimport { getAssetEnhancementSettings } from '@bingads-webui-campaign/image-experience-utils';\r\nimport instrumentation from '@bingads-webui-campaign-legacy/instrumentation/index';\r\nimport preferencesService from '@bingads-webui-component-legacy/preference/service/index';\r\nimport PageContext from '@bingads-webui-static-legacy/page-context';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\n\r\nimport image191to1 from '../media/1.91to1.jpg';\r\n\r\nconst i18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/adextensions');\r\nconst i18nGlobal = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!global');\r\nconst ImageAdExtensionSchema = window.globalLegacySchema.get('ImageAdExtension');\r\n\r\nconst odataToken = config.get('odata.token');\r\nconst odataPath = config.get('odata.url') + config.get('odata.path');\r\nconst odataRootUrl = config.get('CampaignAzureDomain');\r\nconst permissions = config.get('Permissions');\r\nconst IsAADUser = PageContext.IsAADUser;\r\nconst {\r\n dynamic: {\r\n OptionalDisplayTextForSingleImageAdExtensions,\r\n ImageFittingForImageAnnotation,\r\n ImageFittingForImageExtension,\r\n ImageFittingExlcudeMAE,\r\n ImageFittingUnifiedImageROI,\r\n } = {},\r\n IsTransparentImageAnnotationEnabled,\r\n} = permissions;\r\n\r\nconst oDataConfig = {\r\n odataRootUrl,\r\n odataPath,\r\n odataToken,\r\n oDataPath: odataPath,\r\n oDataToken: odataToken,\r\n};\r\n\r\nexport class ExtensionEditor extends backbone.View {\r\n initialize(options) {\r\n this.perfMarker = PerfMarkerFactory.createMarker('ImageAdExtensionEditor V2', { autoEnd: true });\r\n\r\n this.perfMarker.willInit();\r\n\r\n this.options = options || {};\r\n this.options.createNew = !this.options.extension;\r\n this.options.isRecommendation = !_.isEmpty(options.recommendation);\r\n\r\n let extension = this.options.extension || {};\r\n\r\n if (!this.options.extension) {\r\n extension = {\r\n AltText: null,\r\n DisplayText: null,\r\n Description: null,\r\n DestinationUrl: null,\r\n ImageUrl: null,\r\n MobileFinalUrls: [],\r\n FinalUrls: [],\r\n UrlCustomParameters: [],\r\n TrackingUrlTemplate: null,\r\n Images: [],\r\n Scheduling: null,\r\n EligibleLayout: EligibleLayout.SingleAndMulti,\r\n };\r\n\r\n if (this.options.isRecommendation) {\r\n extension = _.defaults({}, options.recommendation, { ...extension });\r\n }\r\n\r\n this.options.extension = extension;\r\n }\r\n\r\n this.options.systemGenerated = IsTransparentImageAnnotationEnabled && extension.SourceType === 'SystemGenerated';\r\n this.options.readOnly = options.readOnly || this.options.systemGenerated;\r\n\r\n if (!OptionalDisplayTextForSingleImageAdExtensions && !extension.DisplayText) {\r\n extension.DisplayText = extension.AltText;\r\n }\r\n\r\n if (!extension.EligibleLayout || extension.EligibleLayout === EligibleLayout.Unset) {\r\n extension.EligibleLayout = EligibleLayout.Single;\r\n }\r\n\r\n this.viewModel = this._createViewModel(this.options);\r\n this.extensionsRepo = new ImageAdExtensionsRepository({\r\n schema: ImageAdExtensionSchema,\r\n });\r\n\r\n // setup upgraded url view\r\n const isFinal = !extension.DestinationUrl ||\r\n extension.DestinationUrl.length === 0 ||\r\n !(_.isEmpty(extension.FinalUrls) && _.isEmpty(extension.MobileFinalUrls));\r\n const url = isFinal ? _.first(extension.FinalUrls) : extension.DestinationUrl;\r\n\r\n this.upgradedUrlView = new UpgradedUrl({\r\n url,\r\n isFinal,\r\n finalMobileUrl: _.first(extension.MobileFinalUrls),\r\n trackingTemplate: extension.TrackingUrlTemplate,\r\n finalUrlSuffix: extension.FinalUrlSuffix,\r\n customParameters: extension.UrlCustomParameters,\r\n urlOptionsEnabled: !this.options.isRecommendation,\r\n isMobilePreferred: false,\r\n entityType: 'ImageAdExtension',\r\n placeholderEnabled: false,\r\n useUrlOptionsV2: true,\r\n landingPageUrlRequired: false,\r\n showUurlTestTool: false,\r\n destinationURLDisabled: true,\r\n readOnly: this.options.readOnly,\r\n });\r\n\r\n this.subscribeToUrlChanged = (callback) => {\r\n this.upgradedUrlView.urlEditor.on('urlChanged', callback);\r\n };\r\n\r\n this.setFullUrl = (fullUrl) => {\r\n this.upgradedUrlView.urlEditor.ko_model.fullUrl(fullUrl);\r\n };\r\n\r\n this.setError = (errorStr) => {\r\n this.upgradedUrlView.urlEditor.setError(errorStr);\r\n };\r\n\r\n const formatting = {\r\n // default css for label and controls\r\n labelClass: 'col-sm-4',\r\n controlClass: 'col-sm-8',\r\n };\r\n\r\n this.schedulingView = new SchedulingView(_.extend({}, formatting, { model: extension.Scheduling, readOnly: this.options.readOnly }));\r\n\r\n this.imageList = [];\r\n\r\n this.isImageFittingEnabled = ((ImageFittingForImageAnnotation && this.options.systemGenerated) ||\r\n (ImageFittingForImageExtension && !this.options.systemGenerated)) &&\r\n ImageFittingUnifiedImageROI && !ImageFittingExlcudeMAE;\r\n\r\n this.aid = this.options.isRecommendation ? this.options.recommendation.targetAccountId : state.get('account_id');\r\n this.cid = config.get('CurrentAccount') ? config.get('CurrentAccount').AdvertiserCustomerID : config.get('advertiserCustomerID');\r\n\r\n let promise = Promise.resolve();\r\n\r\n if (this.isImageFittingEnabled) {\r\n promise = getAssetEnhancementSettings({ aid: this.aid, cid: this.cid, oDataConfig })\r\n .then((result) => {\r\n if (result.AssetAIEnhancementOptout === 'true') {\r\n this.isImageFittingEnabled = false;\r\n }\r\n });\r\n }\r\n\r\n this.assetEnhancementSettingsPromise = promise.then(() => {\r\n if (extension.Images !== null && extension.Images.length > 0) {\r\n this.imageListLoadPromise = dataModelUtil.getImageListFromMTImagesAsync(extension.Images, this.isImageFittingEnabled).then((imageList) => {\r\n this.imageList = imageList;\r\n });\r\n } else if (this.options.isRecommendation && options.recommendation.hasImageUrl) {\r\n this.imageList = getAutoCroppedImages({\r\n originalImageToCrop: {\r\n Width: 1000,\r\n Height: 706,\r\n Text: null,\r\n Id: null,\r\n IdString: '',\r\n Src: options.recommendation.ImageSourceStr === 'StockImage' ?\r\n _.first(options.recommendation.StockImages).ThumbnailURL :\r\n _.first(options.recommendation.WebsiteImages).ImageURL,\r\n },\r\n isRecommendedImage: true,\r\n });\r\n this.imageListLoadPromise = Promise.resolve();\r\n } else {\r\n this.imageListLoadPromise = Promise.resolve();\r\n }\r\n });\r\n\r\n this.onImageListChanged = this.onImageListChanged.bind(this);\r\n }\r\n\r\n onImageListChanged(imageList) {\r\n this.imageList = imageList;\r\n }\r\n\r\n render() {\r\n const template = this.options.createNew ? creatorTemplate : editorTemplate;\r\n\r\n this.$el.html(template({\r\n i18n,\r\n i18nGlobal,\r\n imageAspectRatios,\r\n OptionalDisplayTextForSingleImageAdExtensions,\r\n isRecommendation: this.options.isRecommendation,\r\n readOnly: this.options.readOnly,\r\n systemGenerated: this.options.systemGenerated,\r\n newI18n: this.options.newI18n,\r\n }));\r\n ko.applyBindings(this.viewModel, this.el);\r\n\r\n this.assetEnhancementSettingsPromise.then(() => {\r\n this.imageListLoadPromise.then(() => {\r\n this.renderExtensionImagesControl();\r\n });\r\n });\r\n\r\n if (this.upgradedUrlView) {\r\n this.$('.extension-editor__extra').empty().append(this.upgradedUrlView.render().el);\r\n }\r\n\r\n if (this.schedulingView && !this.options.isRecommendation) {\r\n this.schedulingView.render();\r\n this.$('.scheduling').replaceWith(this.schedulingView.el);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n renderExtensionImagesControl() {\r\n const imagesControlOptions = {\r\n perfMarker: this.perfMarker,\r\n i18n,\r\n odata,\r\n genericImage: image191to1,\r\n imageList: this.imageList,\r\n cid: this.cid,\r\n aid: this.aid,\r\n text: '',\r\n url: '',\r\n onImageListChanged: this.onImageListChanged,\r\n isForVNext: this.options.isForVNext,\r\n isStockPhotoEnabled: true,\r\n isImageFittingEnabled: this.isImageFittingEnabled,\r\n oDataConfig,\r\n permissions,\r\n newI18n: this.options.newI18n,\r\n recommendation: this.options.recommendation,\r\n readOnly: this.options.readOnly,\r\n instrumentation,\r\n preferencesService,\r\n subscribeToUrlChanged: this.subscribeToUrlChanged,\r\n setError: this.setError,\r\n setFullUrl: this.setFullUrl,\r\n setImageControlSetText: (callback) => {\r\n this.imageControlSetText = callback;\r\n },\r\n setImageControlSetEligibleLayout: (callback) => {\r\n this.imageControlSetEligibleLayout = callback;\r\n },\r\n setImageControlsValidate: (callback) => {\r\n this.imageControlsValidate = callback;\r\n },\r\n serverContext: {\r\n IsAADUser,\r\n CurrentCustomer: config.get('CurrentCustomer'),\r\n CurrentAccount: config.get('CurrentAccount'),\r\n Token: odataToken,\r\n },\r\n };\r\n\r\n this.imagesControlNode = React.createElement((props) =>\r\n \r\n \r\n , imagesControlOptions);\r\n\r\n ReactDOM.render(this.imagesControlNode, this.$('.image-extension-image-experience')[0]);\r\n\r\n this.onDisplayTextUpdated(this.viewModel.displayText());\r\n this.onEligibleLayoutUpdated(this.viewModel.eligibleLayout());\r\n }\r\n\r\n remove() {\r\n if (this.upgradedUrlView) {\r\n this.upgradedUrlView.remove();\r\n }\r\n\r\n if (this.schedulingView) {\r\n this.schedulingView.remove();\r\n }\r\n\r\n const imageExperienceView = this.$('.image-extension-image-experience')[0];\r\n\r\n if (imageExperienceView) {\r\n ReactDOM.unmountComponentAtNode(imageExperienceView);\r\n }\r\n\r\n super.remove();\r\n }\r\n\r\n _createViewModel(options) {\r\n const viewModel = {\r\n id: ko.observable(options.extension.Id || null),\r\n errorMessages: ko.observableArray([]),\r\n handleErrors: _.bind(this._handleErrors, this),\r\n existingExtension: options.extension,\r\n createNew: options.createNew,\r\n displayText: ko.observable(options.extension.DisplayText || ''),\r\n displayTextIsValid: ko.observable(true),\r\n altTextInternal: ko.observable(options.extension.AltText || ''),\r\n altTextIsValid: ko.observable(true),\r\n shouldAltTextMatchDisplayText: ko.observable((options.extension.AltText || '').length === 0),\r\n description: ko.observable(options.extension.Description || ''),\r\n destinationUrl: ko.observable(options.extension.DestinationUrl || ''),\r\n error: ko.observable(false),\r\n save: _.bind(options.createNew ? this._add : this._update, this),\r\n apply: () => {\r\n this.options.recommendation.applyRecommendation({\r\n newImageExtensionInfo: {\r\n AlternativeText: viewModel.altText(),\r\n DisplayText: viewModel.displayText(),\r\n FinalURL: this.upgradedUrlView.getValues().finalUrl.url,\r\n MobileURL: this.upgradedUrlView.getValues().mobileUrl,\r\n },\r\n imageList: !_.isEmpty(this.imageList) && this.imageList,\r\n isValid: viewModel.validate(),\r\n });\r\n },\r\n cancel: _.bind(this._cancel, this),\r\n validate: _.bind(this._modelIsValid, this),\r\n isSingleEligible: ko.observable(options.extension.EligibleLayout === EligibleLayout.Single ||\r\n options.extension.EligibleLayout === EligibleLayout.SingleAndMulti),\r\n isMultiEligible: ko.observable(options.extension.EligibleLayout === EligibleLayout.Multi ||\r\n options.extension.EligibleLayout === EligibleLayout.SingleAndMulti),\r\n };\r\n\r\n viewModel.eligibleLayout = ko.computed({\r\n read: () => {\r\n if (viewModel.isSingleEligible() && viewModel.isMultiEligible()) {\r\n return EligibleLayout.SingleAndMulti;\r\n } else if (viewModel.isSingleEligible() && !viewModel.isMultiEligible()) {\r\n return EligibleLayout.Single;\r\n } else if (!viewModel.isSingleEligible() && viewModel.isMultiEligible()) {\r\n return EligibleLayout.Multi;\r\n } else {\r\n return EligibleLayout.Unset;\r\n }\r\n },\r\n });\r\n\r\n viewModel.isEligibilityValid = ko.computed(() => {\r\n return viewModel.eligibleLayout() !== EligibleLayout.Unset;\r\n });\r\n\r\n viewModel.altText = ko.computed({\r\n read: () => {\r\n if (viewModel.shouldAltTextMatchDisplayText()) {\r\n return viewModel.displayText();\r\n }\r\n\r\n return viewModel.altTextInternal();\r\n },\r\n write: (newValue) => {\r\n viewModel.shouldAltTextMatchDisplayText(false);\r\n\r\n viewModel.altTextInternal(newValue);\r\n },\r\n });\r\n\r\n viewModel.displayText.subscribe((newValue) => {\r\n this.onDisplayTextUpdated(newValue);\r\n });\r\n\r\n viewModel.eligibleLayout.subscribe((newValue) => {\r\n this.onEligibleLayoutUpdated(newValue);\r\n });\r\n\r\n return viewModel;\r\n }\r\n\r\n onDisplayTextUpdated(text) {\r\n if (this.imageControlSetText) {\r\n this.imageControlSetText(text);\r\n }\r\n }\r\n\r\n onEligibleLayoutUpdated(eligibleLayout) {\r\n if (this.imageControlSetEligibleLayout) {\r\n this.imageControlSetEligibleLayout(eligibleLayout);\r\n }\r\n }\r\n\r\n _getDataForSave() {\r\n this.viewModel.errorMessages([]);\r\n this.upgradedUrlView.clearAllErrors();\r\n\r\n if (!this._modelIsValid()) {\r\n return null;\r\n }\r\n\r\n let extension = {\r\n Id: this.viewModel.id(),\r\n AltText: this.viewModel.altText(),\r\n DisplayText: this.viewModel.displayText(),\r\n Description: this.viewModel.description(),\r\n DestinationUrl: this.viewModel.destinationUrl(),\r\n EligibleLayout: this.viewModel.eligibleLayout(),\r\n };\r\n\r\n // For creation scenario, no Id should be passed in\r\n if (!extension.Id) {\r\n delete extension.Id;\r\n }\r\n\r\n extension.Images = dataModelUtil.getImagesFromImageList(this.imageList, this.isImageFittingEnabled);\r\n\r\n // WorkAround\r\n extension.ImageIds = [extension.Images.map((assetLink) => assetLink.Asset.Id)[0]];\r\n\r\n if (this.upgradedUrlView) {\r\n _.extend(extension, this.upgradedUrlView.toObject());\r\n if (extension.FinalUrls && extension.FinalUrls.length > 0) {\r\n delete extension.DestinationUrl;\r\n }\r\n }\r\n\r\n if (this.schedulingView) {\r\n extension.Scheduling = this.schedulingView.toObject();\r\n }\r\n\r\n // remove the empty values\r\n extension = _.omit(extension, (value) => {\r\n if (!value) {\r\n return true;\r\n } else if (_.isArray(value) || _.isString(value)) {\r\n if (value.length < 1) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n });\r\n\r\n return extension;\r\n }\r\n\r\n _update() {\r\n const extensionData = this._getDataForSave();\r\n\r\n if (!extensionData) {\r\n return;\r\n }\r\n\r\n this.extensionsRepo.update(extensionData)\r\n .then((savedExtension) => {\r\n return this.extensionsRepo.find(savedExtension.Id).then((fetchedExtension) => {\r\n this.trigger('updated', fetchedExtension);\r\n });\r\n }, (error) => {\r\n this.viewModel.handleErrors(error);\r\n })\r\n .finally(withUiBlock());\r\n }\r\n\r\n _add() {\r\n const extensionData = this._getDataForSave();\r\n\r\n if (!extensionData) {\r\n return;\r\n }\r\n\r\n this.extensionsRepo.create(extensionData).then((newExtension) => {\r\n return this.extensionsRepo.find(newExtension.Id).then((createdExtension) => {\r\n newExtension.Images = _.clone(createdExtension.Images);\r\n this.trigger('created', newExtension);\r\n });\r\n }, (error) => {\r\n this.viewModel.handleErrors(error);\r\n }).finally(withUiBlock());\r\n }\r\n\r\n _modelIsValid() {\r\n const displayTextToValidate = this.viewModel.displayText().trim();\r\n const eligibleLayout = this.viewModel.eligibleLayout();\r\n let displayTextIsValid;\r\n\r\n if (OptionalDisplayTextForSingleImageAdExtensions) {\r\n displayTextIsValid = eligibleLayout === EligibleLayout.Single ||\r\n ((eligibleLayout === EligibleLayout.Multi || eligibleLayout === EligibleLayout.SingleAndMulti) && displayTextToValidate.length > 0);\r\n } else {\r\n displayTextIsValid = displayTextToValidate.length > 0;\r\n }\r\n\r\n this.viewModel.displayTextIsValid(displayTextIsValid);\r\n\r\n const altTextToValidate = this.viewModel.altText().trim();\r\n\r\n const altTextIsValid = !_.isNull(altTextToValidate) && altTextToValidate.length > 0;\r\n\r\n this.viewModel.altTextIsValid(altTextIsValid);\r\n\r\n const schedulingValid = _.every([this.schedulingView.validate()]);\r\n\r\n const finalUrlTestRegEx = new RegExp(/^(?:http(s)?:\\/\\/)?[\\w.-]+(?:\\.[\\w\\.-]+)+[\\w\\-\\._~:%/?#[\\]{}@!\\$&'\\(\\)\\*\\+,;=.]+$/gm); //eslint-disable-line\r\n const mobileUrlTestRegEx = new RegExp(/^(?:http(s)?:\\/\\/)?[\\w.-]+(?:\\.[\\w\\.-]+)+[\\w\\-\\._~:%/?#[\\]{}@!\\$&'\\(\\)\\*\\+,;=.]+$/gm); //eslint-disable-line\r\n\r\n const urlErrors = {\r\n FinalUrls: [],\r\n MobileFinalUrls: [],\r\n };\r\n\r\n // Custom URL validations\r\n const finalUrl = this.upgradedUrlView.getValues().finalUrl;\r\n const finalUrlUrl = finalUrl ? finalUrl.url : '';\r\n\r\n if (finalUrlUrl && finalUrlUrl.length > 0 && !finalUrlTestRegEx.test(finalUrlUrl)) {\r\n urlErrors.FinalUrls.push(i18n.getString('AdExtensions_Image_Editor_InvalidDestinationUrl'));\r\n }\r\n\r\n const mobileUrl = this.upgradedUrlView.getValues().mobileUrl;\r\n\r\n if (mobileUrl && mobileUrl.length > 0 && !mobileUrlTestRegEx.test(mobileUrl)) {\r\n urlErrors.MobileFinalUrls.push(i18n.getString('AdExtensions_Image_Editor_InvalidDestinationUrl'));\r\n }\r\n\r\n this.upgradedUrlView.handleApiErrors(urlErrors);\r\n\r\n const urlViewIsValid = urlErrors.FinalUrls.length === 0 &&\r\n urlErrors.MobileFinalUrls.length === 0 &&\r\n this.upgradedUrlView.isValid();\r\n\r\n // Image experience validation\r\n const imagesValid = this.imageControlsValidate && this.imageControlsValidate();\r\n\r\n return this.viewModel.isEligibilityValid() &&\r\n displayTextIsValid &&\r\n altTextIsValid &&\r\n schedulingValid &&\r\n urlViewIsValid &&\r\n imagesValid;\r\n }\r\n\r\n _cancel() {\r\n this.trigger('cancel');\r\n }\r\n\r\n _handleErrors(errors) {\r\n if (errors && errors.length > 0) {\r\n const errorMsgList = _.map(errors, (error) => {\r\n return error.toString();\r\n });\r\n\r\n this.viewModel.errorMessages(errorMsgList);\r\n } else {\r\n this.viewModel.errorMessages([i18nGlobal.getString('GenericErrorMessage')]);\r\n }\r\n }\r\n}\r\n","import rawItemTemplate from './gridRowTemplate.pug';\r\n\r\nexport const universalItemTemplate = rawItemTemplate;\r\n","import { extend, size } from 'underscore';\r\nimport rawItemTemplate from './gridRowTemplate.pug';\r\nimport { convertCurrencyCode } from '@bingads-webui-campaign-legacy/adextension-price/utility';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/adextensions');\r\n\r\nconst maxItems = 3;\r\n\r\nexport const universalItemTemplate = (arg0) => {\r\n const moreCount = size(arg0.data.TableRows) - maxItems;\r\n\r\n return rawItemTemplate(extend({}, arg0, {\r\n data: {\r\n TableRows: arg0.data.TableRows.slice(0, maxItems),\r\n moreString: moreCount > 0 ? i18n.get('And_Count_More', { count: moreCount }) : undefined,\r\n },\r\n convertCurrencyCode,\r\n }));\r\n};\r\n","import rawItemTemplate from './gridRowTemplate.pug';\r\n\r\nexport const universalItemTemplate = rawItemTemplate;\r\n","export const getUseTotalsPlugin = (permissions) => {\r\n const { dynamic: { AdExtensionsAudienceAdsTotals, PerformanceMaxCampaignsPhaseTwoCrossNetwork } } = permissions || { dynamic: {} };\r\n\r\n return AdExtensionsAudienceAdsTotals || PerformanceMaxCampaignsPhaseTwoCrossNetwork;\r\n};\r\n","import $ from 'jquery';\r\nimport { DeliveryStatusPopupFactory } from '@bingads-webui-campaign-legacy/common-grid-config/column/delivery-status/index';\r\nimport { queryify } from '@bingads-webui/url-util';\r\nimport _ from 'underscore';\r\n\r\nfunction _url(template, type) {\r\n const args = _.extend({\r\n aid: window.App.state.get('account_id'),\r\n cid: window.App.state.get('customer_id'),\r\n cmpid: window.App.state.get('campaign_id'),\r\n adgid: window.App.state.get('adgroup_id'),\r\n type: type.replace('AdExtension', ''),\r\n });\r\n\r\n return queryify(template, args);\r\n}\r\n\r\nlet showAdExtensionRejectionReasons = (type, overrideAssociationType, BidataNotRequired, event, adextension) => {\r\n const {\r\n Id,\r\n extensionId,\r\n version,\r\n campaignId,\r\n adGroupId,\r\n } = adextension || {};\r\n\r\n\r\n let url = _url('/campaign/AdExtensions.m/GetRejectionReason', type);\r\n const cid = window.App.state.get('campaign_id') || campaignId;\r\n const aid = window.App.state.get('adgroup_id') || adGroupId;\r\n\r\n url = $.advertiser.setUrlParameter('adExtensionId', extensionId, url);\r\n url = $.advertiser.setUrlParameter('campaignId', cid, url);\r\n url = $.advertiser.setUrlParameter('adGroupId', aid, url);\r\n url = $.advertiser.setUrlParameter('version', version, url);\r\n url = $.advertiser.setUrlParameter('overrideAssociationType', overrideAssociationType, url);\r\n url = $.advertiser.setUrlParameter('BidataNotRequired', BidataNotRequired, url);\r\n\r\n $.advertiser.ajaxPost({\r\n url,\r\n data: {},\r\n ignoreBeforeAjax: true,\r\n dataType: 'html',\r\n onSuccess: $.gridPopup.Callback,\r\n onsuccessEventData: { event, rowId: Id },\r\n });\r\n};\r\n\r\n/**\r\n * Manages creation of delivery status column popups for the Campaigns grid\r\n */\r\nclass AdExtensionDeliveryStatusPopupFactory extends DeliveryStatusPopupFactory {\r\n constructor({\r\n grid,\r\n type,\r\n overrideEntities = {},\r\n overrideAssociationType = null,\r\n BidataNotRequired = false,\r\n }) {\r\n const showAdExtensionRejectionReasonsHandler = _.partial(showAdExtensionRejectionReasons, type, overrideAssociationType, BidataNotRequired);\r\n\r\n super({\r\n grid,\r\n handler: showAdExtensionRejectionReasonsHandler,\r\n });\r\n this.entityMap = _.extend({ AdGroup: 'AdGroup', Campaign: 'Campaign' }, overrideEntities);\r\n }\r\n /**\r\n * Creates campaign entity object from event target using the grid associated with the factory.\r\n *\r\n * @param {Object} event - The backbone click event from where the quality score cell was clicked.\r\n * @returns {Object} campaign entity - An object with properties containing Campaign Id and Name.\r\n */\r\n getEventTargetEntity(event) {\r\n const model = this.getEventTargetModel(event);\r\n\r\n return {\r\n extensionId: model.AdExtension.Id,\r\n version: model.AdExtension.Version,\r\n campaignId: model[this.entityMap.Campaign].Id,\r\n adGroupId: model[this.entityMap.AdGroup].Id,\r\n Id: model.Id,\r\n };\r\n }\r\n}\r\n\r\nexport { AdExtensionDeliveryStatusPopupFactory };\r\n","import { bingadsGridColumn } from '@bingads-webui-component-legacy/bingads-grid/shared/column';\r\nimport totalsTemplate from '../template/totals-template.pug';\r\n\r\nconst totalsTextProperty = (userProperty) => (item) => {\r\n if (item.$total) {\r\n return item;\r\n }\r\n return userProperty(item);\r\n};\r\n\r\nconst totalsTextTemplate = (userTemplate) => (local) => {\r\n if (local.value.$total) {\r\n return totalsTemplate(local);\r\n }\r\n return userTemplate(local);\r\n};\r\n\r\nexport const adextensionGridColumn = (options) => bingadsGridColumn({\r\n name: 'AdExtension',\r\n type: 'string',\r\n sortable: false,\r\n title: 'ErrorGrid_AdExtension_Column',\r\n helpId: 'Page_CampaignGrids_AdExtensions',\r\n bodyClasses: ['col-AdExtension'],\r\n\r\n ...options,\r\n\r\n property: totalsTextProperty(options.property),\r\n template: totalsTextTemplate(options.template),\r\n});\r\n","import { extend } from 'underscore';\r\nimport rawItemTemplate from './gridRowTemplate.pug';\r\n\r\nexport const universalItemTemplate = (arg0) =>\r\n rawItemTemplate(extend({}, arg0, {\r\n data: {\r\n SiteLinks: arg0,\r\n },\r\n }));\r\n","import rawItemTemplate from './gridRowTemplate.pug';\r\n\r\nexport const universalItemTemplate = rawItemTemplate;\r\n","/*eslint new-cap:0 */\r\nimport _ from 'underscore';\r\nimport ko from 'knockout';\r\nimport koSchema from '@bingads-webui-component-legacy/ko-schema/index';\r\nimport { AdGroup } from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport campaignType from '@bingads-webui-campaign-legacy/adgroup-create-advanced/util/campaignType';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!component/language-selector');\r\nconst adGroupI18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\n\r\nexport default class ViewModel {\r\n constructor({ isNewUI, isDSAMixedModeCampaignEnabled, supportCashbackSettings = false }) {\r\n koSchema.properties(this, AdGroup, ['Id', 'Name', 'Language', 'AdGroupType']);\r\n this.supportCashbackSettings = ko.observable(isNewUI && supportCashbackSettings);\r\n this.dataLoaded = ko.observable(false);\r\n\r\n this.hideLanguage = ko.computed(() => {\r\n return _.contains(['shopping'], campaignType()) || (isDSAMixedModeCampaignEnabled && campaignType() === 'search' && this.AdGroupType() === 'SearchDynamic');\r\n });\r\n\r\n this.isNewUI = ko.observable(isNewUI);\r\n\r\n this.isDSAMixedModeCampaignEnabled = isDSAMixedModeCampaignEnabled;\r\n\r\n this.shouldShowAdGroupType = ko.computed(() => {\r\n return this.isDSAMixedModeCampaignEnabled && _.contains(['search'], campaignType());\r\n });\r\n\r\n this.languageString = ko.computed(() => {\r\n const keyToUse = this.Language() ? `Language_${this.Language()}` : 'Language_Inherit';\r\n\r\n return i18n.getString(keyToUse);\r\n });\r\n\r\n this.adGroupTypeString = ko.computed(() => {\r\n return this.AdGroupType() === 'Unknown' ? '-' : adGroupI18n.getString(`AdGroupType_${this.AdGroupType()}`);\r\n });\r\n\r\n this.enableLanguageSelection = ko.computed(() => {\r\n return !this.hideLanguage() && campaignType() === 'search';\r\n });\r\n\r\n this.showHighLatencyAlert = ko.observable(false);\r\n }\r\n}\r\n","/*eslint new-cap:0 */\r\nimport _ from 'underscore';\r\nimport Backbone from 'backbone';\r\nimport ko from 'knockout';\r\nimport Promise from 'bluebird';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nimport template from '@bingads-webui-campaign-legacy/adgroup-settings/template/index.pug';\r\nimport ViewModel from '@bingads-webui-campaign-legacy/adgroup-settings/viewmodel/index';\r\nimport BidView from '@bingads-webui-campaign-legacy/adgroup-create-advanced/view/steps/bid';\r\nimport LanguageLocationConnector from '@bingads-webui-campaign-legacy/adgroup-create-advanced/connectors/languageLocation';\r\nimport campaignType from '@bingads-webui-campaign-legacy/adgroup-create-advanced/util/campaignType';\r\nimport jsData from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport uiBlocker from '@bingads-webui-component-legacy/uiblocker/index';\r\nimport * as i18nErrors from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport edmCampaign from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport LocationTargetsView from '@bingads-webui-campaign-legacy/location-targets/view/locationTargets';\r\nimport LanguageSettingView from '@bingads-webui-component-legacy/language-selector/view/index';\r\nimport AdvancedSettingsView from '@bingads-webui-campaign-legacy/advanced-settings/view/advancedSettings';\r\nimport summaryDataContextManager from '@bingads-webui-static-legacy/summary/SummaryDataContextManager';\r\nimport MutableModel from '@bingads-webui-component-legacy/mutable-model/index';\r\nimport eventDispatcher from '@bingads-webui-component-legacy/event-dispatcher/index';\r\nimport { mutables } from '@bingads-webui-campaign-legacy/adgroup-settings/options/mutables';\r\nimport BiddingStrategyView from '@bingads-webui-campaign-legacy/bidding-strategy/view/setting';\r\nimport biddingStrategyTypes from '@bingads-webui-campaign-legacy/bidding-strategy/bidding-strategy-type';\r\nimport { syndEnum } from '@bingads-webui-campaign-react/constants';\r\nimport logger from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport constants from '@bingads-webui-static-legacy/instrumentation/constants';\r\nimport { loadMap } from '@bingads-webui-campaign-legacy/dashboard-page/service/load-map';\r\nimport AdGroupBidType from '@bingads-webui-campaign-legacy/shopping-campaign/view/cpg-adgroup/bid-type';\r\nimport CpgBidSection from '@bingads-webui-campaign-legacy/shopping-campaign/view/cpg-adgroup/bid-section';\r\nimport showCpgAdGroupType from '@bingads-webui-campaign-legacy/adgroup-create-advanced/util/showCpgAdGroupType';\r\nimport { CashbackSettings } from '@bingads-webui-campaign/cashback-settings';\r\nimport { shouldSupportCashbackSettings, logAdGroupPersonalizedOffers } from '@bingads-webui-campaign/personalized-offer-shared';\r\nimport physicalIntentOptions from '@bingads-webui-campaign-legacy/location-targets/viewmodel/physicalIntentOptions';\r\nimport instrumentation from '@bingads-webui-campaign-legacy/instrumentation/index';\r\nimport {\r\n AudienceAdvancedTargetSettings,\r\n AudienceTargetInfo,\r\n} from '@bingads-webui-campaign-legacy/audience-campaign/loader';\r\nimport decimal from '@bingads-webui-component-legacy/humanize/decimal';\r\nimport { showIMAReachModal, getLocationsInfo, getLocationsInfoFromCampaignCriterions } from '@bingads-webui-campaign-react/ima-reach-representation';\r\nimport { isMSStoreAdsCampaign } from '@bingads-webui-campaign-react/ms-store-ads-common';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\n\r\nconst backRouteName = 'adgroup_ad';\r\nconst isArabicEnabled = pageContext.Permissions.IsArabicLanguageEnabledInMultipleLanguage;\r\nconst isSimplifiedChineseEnabled = pageContext.Permissions.IsSimplifiedChineseLanguageEnabledInMultipleLanguage;\r\nconst isSponsoredPilotEnabled = pageContext.Permissions.IsSPAv2Enabled;\r\nconst isManualBiddingDeprecationEnabled = pageContext.Permissions.IsManualBiddingDeprecationEnabled;\r\nconst isDSAMixedModeCampaignEnabled = pageContext.Permissions.IsDSAMixedModeCampaignEnabled;\r\nconst SponsoredCampaignSubType = 11;\r\n\r\nexport default class View extends Backbone.View {\r\n initialize(options = {}) {\r\n if (options.perfMarker) {\r\n this.adGroupScopePerfMarker = options.perfMarker.createChild('AdGroupScope_AllSettings_EditAdGroup');\r\n }\r\n\r\n this.mark('willInit');\r\n const router = _.chain(options.deps).result('router', {}).value();\r\n\r\n const campaign = pageContext.CurrentCampaign;\r\n\r\n this.isMSStoreAdsGAWorkflow = isMSStoreAdsCampaign(campaign);\r\n\r\n this.navigateToRoute = router.navigateToRoute || _.noop;\r\n this.deps = options.deps || {};\r\n this.isNewUI = _.result(this.deps, 'isNewUI', false);\r\n\r\n const scenario = instrumentation[`${campaignType()}AdGroupSettings`].create();\r\n\r\n this.activity = scenario.adGroupSettings.create();\r\n\r\n this.viewModel = new ViewModel({ isNewUI: this.isNewUI, isDSAMixedModeCampaignEnabled, supportCashbackSettings: false });\r\n const dynamicPermissions = _.result(pageContext.Permissions, 'dynamic', {});\r\n\r\n this.showDisclaimerBanner = _.result(dynamicPermissions, 'AgeGenderDisclaimer', false);\r\n this.isMranEcpcEnabled = _.result(dynamicPermissions, 'MranEcpc', false);\r\n this.isMranTroasEnabled = _.result(dynamicPermissions, 'MranTroas', false);\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click .btn-save': 'checkIMAReachAndSave',\r\n 'click .btn-cancel': 'cancel',\r\n };\r\n }\r\n\r\n get className() {\r\n return 'adgroup-settings-page-root';\r\n }\r\n\r\n renderLocationTargets() {\r\n this.locationTargetsView = new LocationTargetsView({\r\n scenario: 'adgroup-settings',\r\n level: 'adgroup',\r\n campaignId: pageContext.CurrentCampaign.Id,\r\n adgroupId: pageContext.CurrentAdGroup.Id,\r\n popupIds: { Location: this.isMSStoreAdsGAWorkflow ? 'pop_BA_StoreAds_Location' : 'pop_BA_AdGroup_Settings_LocationTargeting' },\r\n showInitialUiBlocker: false,\r\n deps: this.deps,\r\n supportCashbackSettings: this.supportCashbackSettings,\r\n isForVNext: this.isNewUI,\r\n showPhysicalIntentView: !this.isMSStoreAdsGAWorkflow,\r\n physicalIntent: this.isMSStoreAdsGAWorkflow ? physicalIntentOptions.PeopleIn : undefined,\r\n });\r\n\r\n /*In adgroup settings scenario, location targeting will load both campaign and adgroup criterions, so initialize languageLocationConnector after refresh ends.\r\n contentBid logic may diff between Web UI and API. So if current adgroup has contentBid and its medium is Mixed though it may fail Web UI checking logic, we\r\n enable contentNetwork checkbox and contentBid input box. But if user changes Language or location targeting, then follow Web UI checking logic.\r\n */\r\n this.locationTargetsView.on('end:refresh', () => {\r\n //if meeting above condition, or if the adgroup's medium is SearchAndContent, then initialize languageLocationConnector\r\n /*\r\n No need check KP and traffic estimation since they are not supported in adgroup settings page now.\r\n */\r\n this.languageLocationConnector = new LanguageLocationConnector(\r\n this.viewModel.Language,\r\n this.bidView,\r\n this.advancedSettingsView.adDistributionView,\r\n false,\r\n this.locationTargetsView.viewmodel.useCampaignSettings());\r\n\r\n if (this.viewModel.enableLanguageSelection()) {\r\n this.languageLocationConnector.setLanguageSet(this.languages);\r\n }\r\n\r\n if (this.adDistribution === syndEnum.BingYahooAndSearchPartners) {\r\n //if synd is default value, then check synd status according to UI logic, if it is not default value, then synd is enabled by default.\r\n this.languageLocationConnector.isSyndicationAllowed();\r\n }\r\n });\r\n }\r\n\r\n renderAdvancedSettings(campaign, adgroup) {\r\n this.advancedSettingsView = new AdvancedSettingsView({\r\n scenario: 'adgroup-settings',\r\n level: 'adgroup',\r\n campaignId: pageContext.CurrentCampaign.Id,\r\n adgroupId: pageContext.CurrentAdGroup.Id,\r\n nativeAdsCampaignBid: campaign.NativeBidAdjustment,\r\n nativeAdsAdgroupBid: adgroup.NativeBidAdjustment,\r\n multimediaAdsCampaignBid: campaign.MultiMediaAdBidAdjustment,\r\n multimediaAdsAdgroupBid: adgroup.MultiMediaAdBidAdjustment,\r\n model: adgroup,\r\n languages: campaign.Languages,\r\n TimeZone: campaign.TimeZone,\r\n campaignType: campaignType(),\r\n campaignSubType: this.isSponsoredCampaign() ? 'ShoppingSponsoredProductAd' : null,\r\n campaignBiddingStrategy: campaign.BiddingScheme.Type,\r\n campaignAdScheduleUseSearcherTimeZone: campaign.AdScheduleUseSearcherTimeZone,\r\n isNewUI: this.isNewUI,\r\n supportCashbackSettings: this.supportCashbackSettings,\r\n isSPBCampaign: campaign.CampaignCashback && campaign.CampaignCashback.IsPromotionsForBrands,\r\n isMSStoreAdsGAWorkflow: this.isMSStoreAdsGAWorkflow,\r\n popupIds: this.isMSStoreAdsGAWorkflow ? {\r\n AdDistribution: 'pop_BA_StoreAds_AdDistribution',\r\n } : undefined,\r\n });\r\n\r\n this.$('.advanced-settings-section').html(this.advancedSettingsView.render().el);\r\n }\r\n\r\n isSponsoredCampaign() {\r\n return isSponsoredPilotEnabled &&\r\n pageContext.CurrentCampaign &&\r\n pageContext.CurrentCampaign.CampaignSubType === SponsoredCampaignSubType;\r\n }\r\n\r\n renderBiddingStrategy(adgroup) {\r\n if (!showCpgAdGroupType() || _.first(adgroup.Settings).BidOption !== 'BidBoost') {\r\n if (isManualBiddingDeprecationEnabled) {\r\n this.biddingStrategyView = new BiddingStrategyView({\r\n entityType: 'AdGroup',\r\n biddingStrategyType: adgroup.BiddingScheme.Type,\r\n campaignType: campaignType(),\r\n campaignSubType: pageContext.CurrentCampaign.CampaignSubType,\r\n campaignBiddingStrategyType: _.chain(pageContext.CurrentCampaign).result('BiddingScheme').result('Type').value(),\r\n isMSStoreAdsGAWorkflow: this.isMSStoreAdsGAWorkflow,\r\n });\r\n } else {\r\n this.biddingStrategyView = new BiddingStrategyView({\r\n entityType: 'AdGroup',\r\n biddingStrategyType: adgroup.BiddingScheme.Type,\r\n campaignBiddingStrategyType: _.chain(pageContext.CurrentCampaign).result('BiddingScheme').result('Type').value(),\r\n isMSStoreAdsGAWorkflow: this.isMSStoreAdsGAWorkflow,\r\n });\r\n }\r\n\r\n if (!this.isSponsoredCampaign()) {\r\n this.$('.bidding-strategy__container').empty().html(this.biddingStrategyView.render().el);\r\n }\r\n }\r\n }\r\n\r\n notShowBidView(campaign) {\r\n // remove bid view for campaign of CPS bidding strategy\r\n return _.chain(campaign).result('BiddingScheme').result('Type').value() === biddingStrategyTypes.costPerSale;\r\n }\r\n\r\n renderBidView(campaign, adgroup, newI18n) {\r\n if (this.notShowBidView(campaign)) {\r\n this.$('.bid-block').hide();\r\n return;\r\n }\r\n this.bidView = new BidView({\r\n showTrafficEstimation: false,\r\n adgroup,\r\n languages: campaign.Languages,\r\n campaign,\r\n newI18n,\r\n });\r\n\r\n // for automated bidding, make bid read-only\r\n if (this.biddingStrategyView) {\r\n this.bidView.resetIsAutoBidding(this.biddingStrategyView.getValues().Type);\r\n } else if (adgroup.BiddingScheme) { // DSA ad group doesn't have autobidding UI.\r\n this.bidView.resetIsAutoBidding(adgroup.BiddingScheme.Type);\r\n }\r\n this.$('.bid-section').append(this.bidView.render().el);\r\n }\r\n\r\n renderLanguageSelector(campaign, adgroup) {\r\n const options = {\r\n enableArabic: isArabicEnabled,\r\n enableSimplifiedChinese: isSimplifiedChineseEnabled,\r\n withInheritOption: !_.isEmpty(this.languages),\r\n i18nStrings: { SaveWarning: '' },\r\n el: this.$('.adgroup-language')[0],\r\n language: adgroup.Language,\r\n IsAdsGlobalizationPhase1Enabled: pageContext.Permissions.IsAdsGlobalizationPhase1Enabled,\r\n IsAdsGlobalizationPhase2Enabled: pageContext.Permissions.IsAdsGlobalizationPhase2Enabled,\r\n IsAdsGlobalizationPhase6Enabled: pageContext.Permissions.IsAdsGlobalizationPhase6Enabled,\r\n IsAdsGlobalizationPhase2JapanEnabled: pageContext.Permissions.IsAdsGlobalizationPhase2JapanEnabled,\r\n IsDomesticSimplifiedChineseEnabled: pageContext.Permissions.IsDomesticSimplifiedChineseEnabled,\r\n IsAdsGlobalizationPhase9Enabled: pageContext.Permissions.IsAdsGlobalizationPhase9Enabled,\r\n IsAdsGlobalizationPhase9VIEnabled: pageContext.Permissions.IsAdsGlobalizationPhase9VIEnabled,\r\n };\r\n\r\n this.languageSelector = new LanguageSettingView(options);\r\n eventDispatcher.on('language:changed', (newLanguage) => {\r\n this.viewModel.Language(newLanguage);\r\n });\r\n\r\n // clean bindings for language selector before rendering\r\n ko.cleanNode(this.$('.adgroup-language')[0]);\r\n this.languageSelector.render();\r\n }\r\n\r\n renderCpgAdGroupType(adgroup) {\r\n this.cpgAdGroupType = new AdGroupBidType(_.first(adgroup.Settings));\r\n if (!this.isSponsoredCampaign()) {\r\n // do not show this container in SPAv2\r\n this.$('.cpg-adgroup-type__container').append(this.cpgAdGroupType.render().el);\r\n }\r\n\r\n this.cpgBidSection = new CpgBidSection(adgroup);\r\n this.$('.cpg-bid-section__container').append(this.cpgBidSection.render().el);\r\n }\r\n\r\n renderAdGroupTargets(campaign, adgroup) {\r\n const adGroupTargetInfo = new AudienceTargetInfo({\r\n resourceName: 'AdGroupCriterion',\r\n listenToLocationCriterion: false,\r\n useLocationControl: false,\r\n initAudienceAssociationView: false,\r\n });\r\n const campaignTargetInfo = new AudienceTargetInfo({\r\n resourceName: 'CampaignCriterion',\r\n listenToLocationCriterion: false,\r\n useLocationControl: false,\r\n initAudienceAssociationView: false,\r\n });\r\n\r\n return Promise.all([\r\n adGroupTargetInfo.fetchCriterions(campaign.Id, adgroup.Id),\r\n campaignTargetInfo.fetchCriterions(campaign.Id),\r\n ]).then(() => {\r\n this.adGroupTargetsView = new AudienceAdvancedTargetSettings({\r\n viewContext: {\r\n accountCurrencyCode: pageContext.AccountCurrencyCode,\r\n currentCampaign: campaign,\r\n currentAdGroup: adgroup,\r\n level: 'adgroup',\r\n },\r\n scenario: 'adgroup-settings',\r\n currentLevelTargetInfo: adGroupTargetInfo,\r\n parentLevelTargetInfo: campaignTargetInfo,\r\n supportCashbackSettings: this.supportCashbackSettings,\r\n isMSStoreAdsGAWorkflow: this.isMSStoreAdsGAWorkflow,\r\n });\r\n this.$('.adgroup-targets').append(this.adGroupTargetsView.render().el);\r\n\r\n if (this.locationTargetsView) {\r\n this.adGroupTargetsView.$('.location-setting-controller').append(this.locationTargetsView.render().el);\r\n\r\n return this.locationTargetsView.initialLoadTask;\r\n }\r\n\r\n return null;\r\n });\r\n }\r\n\r\n initCashbackSettingsView(adgroup, campaign) {\r\n if (this.supportCashbackSettings) {\r\n const CashbackPercent = _.chain(adgroup)\r\n .result('AdGroupCashback')\r\n .result('Percent', null)\r\n .value();\r\n const CouponsEnabled = _.chain(adgroup)\r\n .result('AdGroupCashback')\r\n .result('CouponsEnabled', 'None')\r\n .value();\r\n const CashbackScope = _.chain(adgroup)\r\n .result('AdGroupCashback')\r\n .result('Scope')\r\n .value() || 'None';\r\n const ParentLevelCashbackPercent = _.chain(campaign)\r\n .result('CampaignCashback')\r\n .result('Percent', null)\r\n .value();\r\n const ParentLevelCashbackScope = _.chain(campaign)\r\n .result('CampaignCashback')\r\n .result('Scope')\r\n .value() || 'None';\r\n const ParentCouponsEnabled = _.chain(campaign)\r\n .result('CampaignCashback')\r\n .result('CouponsEnabled', 'None')\r\n .value();\r\n\r\n this.cashbackSettingsView = new CashbackSettings({\r\n CashbackPercent,\r\n CashbackScope,\r\n showCashbackBudget: false,\r\n showEnableCashbackSettingsCheckbox: false,\r\n showInheritFromParentOption: true,\r\n isCashbackScopeReadonly: campaignType() !== 'shopping',\r\n showCoupon: campaignType() === 'shopping',\r\n ParentLevelCashbackPercent,\r\n ParentLevelCashbackScope,\r\n CouponsEnabled,\r\n ParentCouponsEnabled,\r\n deps: {\r\n decimal,\r\n i18n,\r\n pageContext,\r\n },\r\n });\r\n }\r\n }\r\n\r\n onCashbackPercentChange(value) {\r\n if (this.cashbackSettingsView.viewModel.validateCashbackPercent(value)) {\r\n const formattedValue = value === '' || value == null ? null : decimal.fromLocalToFloat(value);\r\n\r\n if (this.adGroupTargetsView) {\r\n this.adGroupTargetsView.toggleCashbackPercentColumns(true, {\r\n level: 'AdGroup',\r\n value: formattedValue,\r\n });\r\n }\r\n\r\n if (this.locationTargetsView) {\r\n this.locationTargetsView.toggleCashbackPercentColumns(true, {\r\n level: 'AdGroup',\r\n value: formattedValue,\r\n });\r\n }\r\n\r\n if (this.advancedSettingsView && this.advancedSettingsView.adScheduleView) {\r\n this.advancedSettingsView.adScheduleView.toggleCashbackPercentColumns(true, {\r\n level: 'AdGroup',\r\n value: formattedValue,\r\n });\r\n }\r\n }\r\n }\r\n\r\n render() {\r\n this.$el.html(template({\r\n i18n,\r\n isShowDisclaimerBannerEnabled: this.showDisclaimerBanner,\r\n }));\r\n ko.applyBindings(this.viewModel, this.el);\r\n\r\n if (!(pageContext && pageContext.CurrentCampaign && pageContext.CurrentCampaign.Id && pageContext.CurrentAdGroup && pageContext.CurrentAdGroup.Id)) {\r\n logger.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'loadAdGroupSettingsPage', JSON.stringify(pageContext));\r\n this.viewModel.errors.add();\r\n return null;\r\n }\r\n\r\n this.hideUIBlocker = uiBlocker(this.$('.adgroup-settings-page'));\r\n this.mark('willFetchData');\r\n Promise.join(\r\n jsData.AdGroup.find(Number(pageContext.CurrentAdGroup.Id), { entitySet: edmCampaign.currentCampaign.AdGroups, bypassCache: true }),\r\n jsData.Campaign.find(Number(pageContext.CurrentCampaign.Id), { queryParameters: { entitySet: edmCampaign.currentAccount.Campaigns, expand: ['Budget'] }, bypassCache: true }),\r\n loadMap(),\r\n (adgroup, campaign) => {\r\n this.mark('willRender');\r\n if (_.has(adgroup, 'Id')) {\r\n // mock\r\n // campaign.CashbackSettings = { CashbackMonthlyBudget: 1 };\r\n\r\n this.supportCashbackSettings = shouldSupportCashbackSettings(campaign, pageContext.Permissions) && !this.isSponsoredCampaign();\r\n\r\n this.mutableModel = new MutableModel(mutables(adgroup, this));\r\n\r\n this.viewModel.dataLoaded(true);\r\n\r\n this.viewModel.setModel(adgroup);\r\n this.viewModel.supportCashbackSettings(this.supportCashbackSettings);\r\n\r\n if (this.supportCashbackSettings) {\r\n this.initCashbackSettingsView(adgroup, campaign);\r\n this.$('.cashback-settings-container').empty().append(this.cashbackSettingsView.render().$el);\r\n\r\n this.cashbackSettingsView.viewModel.CashbackPercent.subscribe((value) => {\r\n if (this.cashbackSettingsView.viewModel.validateCashbackPercent(value)) {\r\n const formattedValue = value === '' || value == null ? null : +value;\r\n\r\n if (this.adGroupTargetsView) {\r\n this.adGroupTargetsView.toggleCashbackPercentColumns(true, {\r\n level: 'AdGroup',\r\n value: formattedValue,\r\n });\r\n }\r\n\r\n if (this.locationTargetsView) {\r\n this.locationTargetsView.toggleCashbackPercentColumns(true, {\r\n level: 'AdGroup',\r\n value: formattedValue,\r\n });\r\n }\r\n\r\n if (this.advancedSettingsView && this.advancedSettingsView.adScheduleView) {\r\n this.advancedSettingsView.adScheduleView.toggleCashbackPercentColumns(true, {\r\n level: 'AdGroup',\r\n value: formattedValue,\r\n });\r\n }\r\n }\r\n });\r\n }\r\n\r\n this.languages = _.isEmpty(campaign.Languages) ? [] : campaign.Languages;\r\n // render language selector for user in multi-language campaign\r\n if (this.viewModel.enableLanguageSelection()) {\r\n this.renderLanguageSelector(campaign, adgroup);\r\n }\r\n\r\n if (showCpgAdGroupType()) {\r\n this.renderCpgAdGroupType(adgroup);\r\n } else {\r\n this.renderBidView(campaign, adgroup, this.options.deps.i18nNewDesign);\r\n }\r\n\r\n if (campaignType() === 'shopping' ||\r\n (isDSAMixedModeCampaignEnabled && campaignType() === 'search' &&\r\n (pageContext.CurrentAdGroup.AdGroupType === 1 || pageContext.CurrentAdGroup.AdGroupType === 'SearchStandard')) ||\r\n (!isDSAMixedModeCampaignEnabled && campaignType() === 'search')) {\r\n this.renderBiddingStrategy(adgroup);\r\n }\r\n\r\n if (this.biddingStrategyView) {\r\n this.$('.bidding-strategy__container')[0].addEventListener('change', () => {\r\n if (this.bidView) {\r\n this.bidView.resetIsAutoBidding(this.biddingStrategyView.getValues().Type);\r\n }\r\n }, false);\r\n }\r\n this.renderAdvancedSettings(campaign, adgroup);\r\n\r\n this.medium = adgroup.Medium;\r\n this.adDistribution = adgroup.AdDistribution;\r\n\r\n this.renderLocationTargets();\r\n\r\n return this.renderAdGroupTargets(campaign, adgroup);\r\n } else {\r\n this.viewModel.errors.add();\r\n\r\n return null;\r\n }\r\n })\r\n .catch(() => {\r\n // todo [yucongj] add more specific error messages\r\n this.viewModel.errors.add();\r\n })\r\n .finally(() => {\r\n this.hideUIBlocker();\r\n this.mark('done');\r\n });\r\n\r\n return this;\r\n }\r\n\r\n validate() {\r\n return _.reduce([\r\n this.viewModel.validate(),\r\n this.bidView ? this.bidView.validate() : true,\r\n this.advancedSettingsView.validate(),\r\n this.locationTargetsView ? this.locationTargetsView.validate() : true,\r\n this.biddingStrategyView ? this.biddingStrategyView.validate() : true,\r\n this.cpgBidSection ? this.cpgBidSection.validate() : true,\r\n this.adGroupTargetsView ? this.adGroupTargetsView.validate() : true,\r\n this.cashbackSettingsView ? this.cashbackSettingsView.validate() : true,\r\n ], (memo, val) => {\r\n return memo && val;\r\n }, true);\r\n }\r\n\r\n checkIMAReachAndSave() {\r\n let checkIMAReachPromise = Promise.resolve(false);\r\n\r\n if (!this.validate()) {\r\n return;\r\n }\r\n\r\n const adGroupCriterions = this.getLocationCriterion();\r\n\r\n const changedLocationCriterions = _.filter(adGroupCriterions, (item) =>\r\n item && (item.CriterionType === 'Location' || item.CriterionType === 'Radius'));\r\n\r\n const hasLocationChanged = changedLocationCriterions && changedLocationCriterions.length > 0;\r\n\r\n const locationCriterions = this.getAllAdGroupLocationCriterion() || [];\r\n\r\n if (hasLocationChanged && pageContext.Permissions.IsIMAReachRepresentationPhase1Enabled && this.isNewUI && locationCriterions.length > 0) {\r\n const onYes = () => this.save();\r\n const locationsInfo = getLocationsInfo(locationCriterions);\r\n\r\n checkIMAReachPromise = showIMAReachModal({\r\n locationsInfo,\r\n onYes,\r\n deliveryChannel: campaignType() === 'audience' ? 'AIM' : 'BingAds',\r\n campaignId: pageContext.CurrentCampaign.Id,\r\n adGroupId: pageContext.CurrentAdGroup.Id,\r\n i18n,\r\n aid: pageContext.CurrentAccount.Id,\r\n cid: pageContext.CurrentAccount.AdvertiserCustomerID,\r\n });\r\n }\r\n\r\n checkIMAReachPromise.then((isIMAReachModalShow) => {\r\n if (isIMAReachModalShow) {\r\n return;\r\n }\r\n this.save();\r\n });\r\n }\r\n\r\n getAllAdGroupLocationCriterion() {\r\n let adGroupCriterions = [];\r\n\r\n if (this.locationTargetsView) {\r\n let locationTargets = this.locationTargetsView.getValues({\r\n level: 'adgroup',\r\n }, {\r\n keepAllLocations: true,\r\n });\r\n\r\n locationTargets.locations = _.filter(locationTargets.locations, (c) => c.Status !== 'Deleted');\r\n\r\n // inherit locations\r\n if (locationTargets.locations.length === 0 &&\r\n this.locationTargetsView.campaignCriterions &&\r\n this.locationTargetsView.campaignCriterions.length > 0) {\r\n const inheritInfo = getLocationsInfoFromCampaignCriterions(this.locationTargetsView.campaignCriterions);\r\n\r\n locationTargets = _.extend(locationTargets, inheritInfo);\r\n }\r\n\r\n adGroupCriterions = adGroupCriterions.concat(locationTargets.locations)\r\n .concat(locationTargets.intent);\r\n }\r\n\r\n if (this.adGroupTargetsView) {\r\n // this is the old logic for audience\r\n let adGroupTargetsData = this.adGroupTargetsView.getAllLocations() || [];\r\n\r\n if (!_.isEmpty(adGroupTargetsData)) {\r\n adGroupTargetsData = _.filter(adGroupTargetsData, (c) => c.Status !== 'Deleted');\r\n\r\n const adGroupCriterionsWithoutIntent = _.filter(adGroupTargetsData, (c) => c.CriterionType !== 'LocationIntentCriterion');\r\n const campaignCriterions = this.adGroupTargetsView.getCampaignLocationCriterions();\r\n\r\n // inherit locations\r\n if (adGroupCriterionsWithoutIntent.length === 0 &&\r\n campaignCriterions &&\r\n campaignCriterions.length > 0) {\r\n const overrideInfo = getLocationsInfoFromCampaignCriterions(campaignCriterions);\r\n\r\n return overrideInfo.locations.concat(overrideInfo.intent);\r\n }\r\n }\r\n\r\n adGroupCriterions = adGroupCriterions.concat(adGroupTargetsData);\r\n }\r\n\r\n return adGroupCriterions;\r\n }\r\n\r\n getLocationCriterion() {\r\n let adGroupCriterions = [];\r\n\r\n if (this.locationTargetsView) {\r\n let locationTargets = this.locationTargetsView.getValues({\r\n level: 'adgroup',\r\n });\r\n\r\n adGroupCriterions = adGroupCriterions.concat(locationTargets.locations)\r\n .concat(locationTargets.intent)\r\n .concat(locationTargets.deletedLocations || []);\r\n }\r\n\r\n if (this.adGroupTargetsView) {\r\n const adGroupTargetsData = this.adGroupTargetsView.getData();\r\n const adGroupTargetsCriterions = _.result(adGroupTargetsData, 'AdGroupCriterions', []);\r\n\r\n adGroupCriterions = adGroupCriterions.concat(adGroupTargetsCriterions);\r\n }\r\n\r\n return adGroupCriterions;\r\n }\r\n\r\n save() {\r\n this.clearApiErrors();\r\n\r\n let params = _.defaults(this.viewModel.toObject(), this.bidView ? this.bidView.getValues() : {});\r\n\r\n params.Campaign = {\r\n Id: pageContext.CurrentCampaign.Id,\r\n };\r\n\r\n const isCostPerSaleCampaign = _.chain(pageContext.CurrentCampaign).result('BiddingScheme').result('Type').value() === biddingStrategyTypes.costPerSale;\r\n\r\n if (this.biddingStrategyView && !this.isMSStoreAdsGAWorkflow) {\r\n if (this.isSponsoredCampaign() && !isCostPerSaleCampaign && !this.isMranEcpcEnabled && !this.isMranTroasEnabled) {\r\n // Bid strategy default to manual cpc in SPAv2\r\n params.BiddingScheme = {\r\n Type: 'ManualCpc',\r\n };\r\n } else {\r\n params.BiddingScheme = this.biddingStrategyView.getValues();\r\n }\r\n }\r\n\r\n let adGroupCriterions = this.getLocationCriterion();\r\n let advancedSettings = this.advancedSettingsView.getValues();\r\n let targets = advancedSettings.deviceTargets\r\n .concat(advancedSettings.ageTargets)\r\n .concat(advancedSettings.genderTargets)\r\n .concat(advancedSettings.scheduling);\r\n\r\n targets = _.map(targets, (target) => {\r\n return _.extendOwn(target, {\r\n 'AdGroup': {\r\n 'Id': pageContext.CurrentAdGroup.Id,\r\n },\r\n });\r\n });\r\n\r\n params.AdGroupCriterions = adGroupCriterions.concat(targets);\r\n\r\n _.extend(params, advancedSettings.urlOptions,\r\n advancedSettings.netWorkOptions,\r\n advancedSettings.adRotation,\r\n advancedSettings.dateSettings,\r\n advancedSettings.nativeAds,\r\n advancedSettings.multimediaAds);\r\n\r\n if (_.isBoolean(advancedSettings.adScheduleUseSearcherTimeZone)) {\r\n params.AdScheduleUseSearcherTimeZone = advancedSettings.adScheduleUseSearcherTimeZone;\r\n }\r\n\r\n if (this.cpgBidSection) {\r\n params = this.cpgBidSection.getValues(params);\r\n }\r\n\r\n this.mutableModel.set(params);\r\n params = this.mutableModel.getIncremental(_.keys(params));\r\n\r\n const highLantencyThreshold = 3000;\r\n\r\n if (_.size(params.AdGroupCriterions) > highLantencyThreshold) {\r\n this.viewModel.showHighLatencyAlert(true);\r\n }\r\n\r\n if (this.cashbackSettingsView) {\r\n _.extend(params, this.cashbackSettingsView.getValues());\r\n }\r\n\r\n const batchSize = 1000;\r\n const chunks = _.chain(params.AdGroupCriterions)\r\n .groupBy((value, index) => Math.floor(index / batchSize))\r\n .toArray()\r\n .value();\r\n\r\n\r\n const batchedParams = {\r\n reqs: _.map(chunks, (batch) => ({\r\n Id: params.Id,\r\n data: _.extend({}, params, { AdGroupCriterions: batch }),\r\n })),\r\n };\r\n const mergeAdGroupCriterions = (responses) => {\r\n const mergedAdGroupCriterions = _.reduce(responses, (dest, res) => dest.concat(res.AdGroupCriterions), []);\r\n\r\n return _.extend({}, _.first(responses), { AdGroupCriterions: mergedAdGroupCriterions });\r\n };\r\n\r\n jsData.AdGroup.update(params.Id, batchedParams, { adapter: 'bulk', cacheResponse: false, overrideResponse: true, batch: true, processResponse: mergeAdGroupCriterions })\r\n .then((response) => {\r\n //we backfill advanced settings models here, so we have correct model if the saveExtensions call fails.\r\n this.advancedSettingsView.setData(response);\r\n logAdGroupPersonalizedOffers(this.supportCashbackSettings, this.activity.signal.bind(this.activity), params);\r\n return this.advancedSettingsView.exclusionsUpdated() ? this.advancedSettingsView.saveExtensions() : {};\r\n })\r\n .then(() => {\r\n summaryDataContextManager.getContext('/campaign/newadgroup/edit?');\r\n window.App.trigger('adGroupUpdated', {\r\n data: [{\r\n Id: Number(params.Id),\r\n Name: params.Name,\r\n CampaignId: params.Campaign.Id,\r\n AccountId: pageContext.CurrentAccount.Id,\r\n Bidding: { Type: 0 },\r\n }],\r\n });\r\n // eslint-disable-next-line camelcase\r\n this.navigateToRoute(backRouteName, { campaign_id: params.Campaign.Id, adgroup_id: params.Id });\r\n })\r\n .catch((response) => {\r\n this.handleApiErrors(response);\r\n })\r\n .finally(uiBlocker(this.$('.adgroup-settings-page')));\r\n }\r\n\r\n clearApiErrors() {\r\n this.advancedSettingsView.clearApiErrors();\r\n this.viewModel.errors.clear(i18nErrors.isCampaignApiError);\r\n }\r\n\r\n handleApiErrors(response) {\r\n if (_.isUndefined(response) || _.isNull(response)) {\r\n this.viewModel.errors.add();\r\n return;\r\n }\r\n\r\n if (response.errors && !response.entity) {\r\n //Ajax error [400] - RowCountExceeded\r\n this.viewModel.errors.add(i18nErrors.getODataErrors(response.errors));\r\n return;\r\n }\r\n\r\n if (response === 'exclusion error') {\r\n return;\r\n }\r\n\r\n i18nErrors.getPartial(response);\r\n\r\n let adgroupErrors = _.reject(response.entity.errors, (error) => {\r\n return _.contains(['TrackingUrlTemplate', 'UrlCustomParameters'], error.property);\r\n });\r\n\r\n this.advancedSettingsView.setData(response);\r\n this.advancedSettingsView.handleErrors(response);\r\n this.viewModel.errors.add(adgroupErrors);\r\n\r\n if (this.locationTargetsView) {\r\n this.locationTargetsView.handleApiErrorsForAdGroupLevel(pageContext.CurrentAdGroup.Id);\r\n }\r\n }\r\n\r\n cancel() {\r\n const adgroupId = pageContext.CurrentAdGroup ? pageContext.CurrentAdGroup.Id : undefined;\r\n\r\n // eslint-disable-next-line camelcase\r\n this.navigateToRoute(backRouteName, { campaign_id: pageContext.CurrentCampaign.Id, adgroup_id: adgroupId });\r\n }\r\n\r\n remove() {\r\n if (this.languageLocationConnector) {\r\n this.languageLocationConnector.stopListening();\r\n }\r\n if (this.locationTargetsView) {\r\n this.locationTargetsView.remove();\r\n }\r\n if (this.adGroupTargetsView) {\r\n this.adGroupTargetsView.remove();\r\n }\r\n\r\n super.remove();\r\n }\r\n\r\n mark(perfMarkerEvent) {\r\n if (this.adGroupScopePerfMarker) {\r\n this.adGroupScopePerfMarker[perfMarkerEvent]();\r\n }\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport decimal from '@bingads-webui-component-legacy/humanize/decimal';\r\n\r\nexport const mutables = (adgroup, context) => {\r\n function memo(key) {\r\n return _.property(key)(context.mutableModel.memo);\r\n }\r\n\r\n return {\r\n mutables: {\r\n Language: {},\r\n Medium: {},\r\n NativeBidAdjustment: {},\r\n TrackingUrlTemplate: {},\r\n UrlCustomParameters: {\r\n hasChanges: (value) => {\r\n if (_.isEmpty(value) && _.isEmpty(memo('UrlCustomParameters'))) {\r\n return false;\r\n }\r\n\r\n return !_.isEqual(value, memo('UrlCustomParameters'));\r\n },\r\n },\r\n AdRotation: {\r\n hasChanges: (value) => {\r\n if (memo('AdRotation')) {\r\n return value !== memo('AdRotation').RotationType;\r\n }\r\n return true;\r\n },\r\n },\r\n AdDistribution: {},\r\n SearchBid: {\r\n hasChanges: (value) => {\r\n return decimal.fromLocalToFloat(value) !== decimal.fromLocalToFloat(memo('SearchBid'));\r\n },\r\n },\r\n ContentBid: {\r\n hasChanges: (value) => {\r\n return decimal.fromLocalToFloat(value) !== decimal.fromLocalToFloat(memo('ContentBid'));\r\n },\r\n },\r\n },\r\n model: adgroup,\r\n };\r\n};\r\n","import _ from 'underscore';\r\nimport { ProjectionGridBaseColumn } from '@bingads-webui/projection-grid-base-column';\r\n\r\nconst audiencesi18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/audiences');\r\n\r\n\r\nexport class AudienceBaseColumn extends ProjectionGridBaseColumn {\r\n constructor(Column, options) {\r\n\r\n const helpAriaLabel = options.helpId ?\r\n audiencesi18n.getString('Click to learn more about {{item}}', { item: audiencesi18n.getString(options.title) }) : '';\r\n\r\n super(_.defaults({}, options,\r\n {\r\n name: Column.Name || Column,\r\n property: Column.Property || Column,\r\n sortable: Column.Property || Column,\r\n bodyClasses: [`audiences-column-${Column.Name || Column}`],\r\n i18n: audiencesi18n,\r\n helpAriaLabel,\r\n columnConversion: Column.columnConversion || Column,\r\n }));\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport ko from 'knockout';\r\nimport scopeService from '@bingads-webui-static-legacy/scope-service'; //TODO: it depends on pageContext, will pass it from view\r\nimport DataStore from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport edmCampaign from '@bingads-webui-component-legacy/edm-campaign/index';\r\n\r\nexport default class ViewModel {\r\n constructor(options = {}) {\r\n this.options = options;\r\n this.selectedCampaigns = ko.observable(this.options.campaign);\r\n this.selectedAdgroups = ko.observable();\r\n this.selectedCampaignId = ko.computed(() => {\r\n if (_.isEmpty(this.selectedCampaigns())) {\r\n return this.options.campaignId;\r\n } else {\r\n return this.selectedCampaigns().Id;\r\n }\r\n });\r\n this.selectedAdgroupId = ko.computed(() => {\r\n if (_.isEmpty(this.selectedAdgroups())) {\r\n return this.options.adgroupId;\r\n } else {\r\n return this.selectedAdgroups().Id;\r\n }\r\n });\r\n this.selectedAdgroups.subscribe((adgroup) => {\r\n const campaignSettings = _.chain(adgroup).result('Campaign').result('CampaignSettings').value();\r\n const campaignId = _.chain(adgroup).result('Campaign').result('Id').value();\r\n\r\n if (campaignId === this.selectedCampaignId()) { // selected campaign no need change\r\n return;\r\n }\r\n\r\n this.selectedCampaigns(null);\r\n\r\n if (_.isEmpty(campaignSettings)) {\r\n DataStore.Campaign.find(campaignId, {\r\n entitySet: edmCampaign.currentAccount.Campaigns,\r\n cacheResponse: false,\r\n findStrictCache: true,\r\n }).then((campaign) => this.selectedCampaigns(campaign));\r\n } else {\r\n this.selectedCampaigns(adgroup.Campaign);\r\n }\r\n });\r\n this.scopeContext = scopeService.getScope();\r\n this.showCampaigns = !this.options.campaignId;\r\n this.showAdGroups = !this.options.adgroupId && this.options.entityType === 'adgroup';\r\n\r\n this.isEmptySelector = ko.computed(() => {\r\n if (this.showAdGroups) {\r\n return this.selectedAdgroupId() === undefined || this.selectedAdgroupId() === 0;\r\n } else {\r\n return this.selectedCampaignId() === undefined || this.selectedCampaignId() === 0;\r\n }\r\n });\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport headerTemplate from '@bingads-webui-campaign-legacy/bingadsgrid/template/header.pug';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/bingadsgrid');\r\n\r\nexport default (config) => {\r\n _.each(config.columns, (column) => {\r\n if (column.headerTemplate) {\r\n return;\r\n }\r\n\r\n let containerType = null;\r\n\r\n if (column.type === 'number' || column.type === 'integer') {\r\n containerType = 'numbercontainer';\r\n } else {\r\n containerType = 'textcontainer';\r\n }\r\n\r\n column.headerBuilder = (columnInfo, isSubHeader) => {\r\n\r\n let name = isSubHeader ? columnInfo.config.subColTitle || columnInfo.config.title : columnInfo.config.title;\r\n let label = name;\r\n\r\n if (columnInfo.$orderby) {\r\n label = `${name} ${columnInfo.$orderby.dir > 0 ? i18n.getString('Grid_Column_OrderBy_Ascending') : i18n.getString('Grid_Column_OrderBy_Descending')}`;\r\n }\r\n\r\n return headerTemplate({\r\n name,\r\n label,\r\n containerType,\r\n popupId: column.popupId ? columnInfo.config.popupId : null,\r\n column: columnInfo,\r\n });\r\n };\r\n });\r\n\r\n return config;\r\n};\r\n\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport dateUtil from '@bingads-webui-component-legacy/humanize/date';\r\nimport state from '@bingads-webui-component-legacy/state/index';\r\nimport edm from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport { getSegPreference, getSegType } from '@bingads-webui-component-legacy/bingads-grid/service/segmentation-preferences';\r\nimport { getCustomColumnsPreference } from '@bingads-webui-component-legacy/bingads-grid/service/custom-column-preferences';\r\nimport segmentTimeChecker from '@bingads-webui-component-legacy/bingads-grid/shared/timeRangeChecker';\r\nimport { fetchPaginationConfig } from '@bingads-webui-component-legacy/bingads-grid/service/fetch-pagination';\r\n\r\nconst formatDate = (date) => dateUtil.format(date, 'M/d/yyyy');\r\nconst formatDateForGridDataParameters = (date) => dateUtil.format(date, 'yyyy-MM-dd');\r\n\r\n\r\nexport default (gridConfig) => {\r\n const sortInfoKey = gridConfig.name;\r\n\r\n return Promise.all([\r\n state.getPromise('$daterange'),\r\n fetchPaginationConfig(sortInfoKey, 50),\r\n getCustomColumnsPreference(gridConfig.name),\r\n getSegPreference(gridConfig.name),\r\n ]).spread((dateRange, {pageSize, orderbyInfo, sortableHeader}) => {\r\n gridConfig = _.defaults(gridConfig, {pageable: {}}); //eslint-disable-line\r\n\r\n // for customDataSource, need to put 'orderby', 'query' to config.query\r\n let queryConfig;\r\n\r\n if (gridConfig.isDataFetchManagerSource) {\r\n gridConfig.query = gridConfig.query || {};\r\n queryConfig = gridConfig.query;\r\n } else {\r\n queryConfig = gridConfig.dataSource;\r\n }\r\n queryConfig.query = queryConfig.query || {};\r\n\r\n const customColumnsEnabled = _.chain(gridConfig.plugins)\r\n .result('columnChooser')\r\n .result('customColumn')\r\n .result('enabled', false)\r\n .value();\r\n\r\n if (customColumnsEnabled) {\r\n const gridDataParameters = {\r\n CustomColumns: [],\r\n DateRange: {\r\n StartDate: formatDateForGridDataParameters(dateRange.start),\r\n EndDate: formatDateForGridDataParameters(dateRange.end),\r\n },\r\n };\r\n\r\n if (dateRange.compared) {\r\n gridDataParameters.ComparisonDateRange = {\r\n StartDate: formatDateForGridDataParameters(dateRange.compared.start),\r\n EndDate: formatDateForGridDataParameters(dateRange.compared.end),\r\n };\r\n }\r\n\r\n const gridData = edm.currentAccount.Campaigns['Default.GridData'].$call({ gridDataParameters });\r\n\r\n gridConfig.dataSource.options.entitySet = gridData;\r\n queryConfig.query.entitySet = gridData.toJSON();\r\n }\r\n\r\n gridConfig.pageable.pageSize = pageSize;\r\n if (gridConfig.plugins && gridConfig.plugins.pagination) {\r\n gridConfig.plugins.pagination.pageSize = pageSize;\r\n }\r\n queryConfig.query.endDate = formatDate(dateRange.end);\r\n queryConfig.query.startDate = formatDate(dateRange.start);\r\n\r\n if (dateRange.compared) {\r\n queryConfig.query.endDate2 = formatDate(dateRange.compared.end);\r\n queryConfig.query.startDate2 = formatDate(dateRange.compared.start);\r\n queryConfig.query.comparisonEndDate = formatDate(dateRange.compared.end);\r\n queryConfig.query.comparisonStartDate = formatDate(dateRange.compared.start);\r\n }\r\n\r\n const segType = getSegType(gridConfig.name);\r\n\r\n if (segType && segType.segmentationType !== 'None' && segmentTimeChecker.isTimeRangeValid(segType.segmentationType)) {\r\n queryConfig.query.SegmentationTypes = segType.segmentationType;\r\n }\r\n\r\n if (orderbyInfo && orderbyInfo.length > 0) {\r\n queryConfig.orderby = orderbyInfo;\r\n gridConfig.sortableHeader = _.defaults(_.pick(sortableHeader, 'name', 'directionIndex'), gridConfig.sortableHeader);\r\n }\r\n });\r\n};\r\n","import _ from 'underscore';\r\nimport state from '@bingads-webui-component-legacy/state/index';\r\nimport dateUtil from '@bingads-webui-component-legacy/humanize/date';\r\nimport Backbone from 'backbone';\r\nimport edm from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport '@bingads-webui-component-legacy/extension/underscore';\r\n\r\nconst formatDateInQuery = (date) => dateUtil.format(date, 'M/d/yyyy');\r\nconst formatDateInEntitySet = (date) => dateUtil.format(date, 'yyyy-MM-dd');\r\nconst parseDate = (dateString) => dateUtil.parse(dateString);\r\nconst defaultComparisonColumns = [\r\n 'PeriodPerformanceMetrics',\r\n 'PerformanceMetricsChange',\r\n 'PerformanceMetricsChangePercentage',\r\n 'PhonePeriodPerformanceMetrics',\r\n 'PhonePerformanceMetricsChange',\r\n 'PhonePerformanceMetricsChangePercentage',\r\n];\r\n\r\nfunction changeEntitySet(queryParams = {}, dateRange) {\r\n const options = queryParams.options;\r\n const entitySet = edm.root.identifyEntitySet(options.entitySet.toJSON());\r\n\r\n const action = entitySet.navigation.source;\r\n const gridDataParameters = _.defaults({\r\n DateRange: {\r\n StartDate: formatDateInEntitySet(dateRange.start) || formatDateInEntitySet(parseDate(dateRange.RangeStartDate)),\r\n EndDate: formatDateInEntitySet(dateRange.end) || formatDateInEntitySet(parseDate(dateRange.RangeEndDate)),\r\n },\r\n ComparisonDateRange: dateRange.compared ? {\r\n StartDate: formatDateInEntitySet(dateRange.compared.start),\r\n EndDate: formatDateInEntitySet(dateRange.compared.end),\r\n } : null,\r\n }, entitySet.navigation.parameters.gridDataParameters);\r\n const { parameters } = entitySet.navigation;\r\n\r\n _.extend(parameters, { gridDataParameters });\r\n\r\n return _.defaults({\r\n options: _.defaults({\r\n entitySet: action.$call(parameters),\r\n }, options),\r\n }, queryParams);\r\n}\r\n\r\nfunction dateRangeEquals(firstRange, secondRange) {\r\n function convertForComparison(range) {\r\n const dates = _.pick(range, 'start', 'end');\r\n\r\n if (range.compared) {\r\n _.extend(dates, {comparedStart: range.compared.start, comparedEnd: range.compared.end});\r\n }\r\n return dates;\r\n }\r\n\r\n if (!firstRange || !secondRange) {\r\n return false;\r\n }\r\n\r\n return JSON.stringify(convertForComparison(firstRange)) === JSON.stringify(convertForComparison(secondRange));\r\n}\r\n\r\nfunction addDateRangeToQueryParams(queryParams, dateRange) {\r\n let query = _.defaults({\r\n startDate: formatDateInQuery(dateRange.start) || formatDateInQuery(parseDate(dateRange.RangeStartDate)),\r\n endDate: formatDateInQuery(dateRange.end) || formatDateInQuery(parseDate(dateRange.RangeEndDate)),\r\n }, queryParams.query);\r\n\r\n if (dateRange.compared) {\r\n query = _.defaults({\r\n comparisonStartDate: formatDateInQuery(dateRange.compared.start),\r\n comparisonEndDate: formatDateInQuery(dateRange.compared.end),\r\n }, query);\r\n } else {\r\n query = _.omit(query, 'comparisonStartDate', 'comparisonEndDate');\r\n }\r\n\r\n return _.defaults({\r\n query,\r\n }, queryParams);\r\n}\r\n\r\nexport default (definePlugin) =>\r\n definePlugin('dateFilter', ['config', 'gridView', 'dataSource'], (config, gridView, dataSource) => {\r\n const events = _.extend({}, Backbone.Events);\r\n const pluginConfig = _.result(config.plugins, 'dateFilter', {});\r\n const { comparisonColumns = defaultComparisonColumns } = pluginConfig;\r\n\r\n const originalQuery = dataSource.query;\r\n\r\n let currentDateRange = null;\r\n\r\n state.getPromise('$daterange').then((dateRange) => {\r\n currentDateRange = dateRange;\r\n });\r\n\r\n if (!config.isDataFetchManagerSource) {\r\n dataSource.query = (params) => {\r\n return state.getPromise('$daterange').then((dateRange) => {\r\n let queryParams;\r\n\r\n if (pluginConfig.isOdataActionSource) {\r\n queryParams = _.defaults({\r\n select: dateRange.compared ? _.union(params.select, comparisonColumns) : _.difference(params.select, comparisonColumns),\r\n }, changeEntitySet(params, dateRange));\r\n } else {\r\n queryParams = addDateRangeToQueryParams(params, dateRange);\r\n }\r\n\r\n gridView.set({ queryParams });\r\n\r\n return originalQuery.call(dataSource, queryParams);\r\n });\r\n };\r\n }\r\n\r\n if (window.App && window.App.views && window.App.views.Summary) {\r\n window.App.views.Summary.bindDateFilterChangeHandler((e, newDateRange) => {\r\n if (dateRangeEquals(currentDateRange, newDateRange)) {\r\n return;\r\n }\r\n\r\n currentDateRange = newDateRange;\r\n gridView.refresh(true);\r\n events.trigger('dateChange');\r\n });\r\n }\r\n\r\n return {\r\n events,\r\n getCurrentDateRange() {\r\n return currentDateRange;\r\n },\r\n p$getCurrentDateRange() {\r\n return state.getPromise('$daterange');\r\n },\r\n };\r\n });\r\n","import _ from 'underscore';\r\nimport * as putil from '@bingads-webui/primitive-utilities';\r\nimport { defineGridPlugin } from '@bingads-webui/projection-grid-plugin';\r\nimport summaryDataContextManager from '@bingads-webui-static-legacy/summary/SummaryDataContextManager';\r\n\r\nconst headerRefreshCache = 'x-ms-refreshcampaigncache';\r\n\r\nexport default defineGridPlugin('refreshCache', [\r\n 'config',\r\n 'dataSource',\r\n 'gridView',\r\n], (config, dataSource, gridView, {\r\n method = 'GET',\r\n contexts = [],\r\n} = {}) => {\r\n const originalQuery = dataSource.query;\r\n\r\n dataSource.query = (params) => {\r\n const path = putil.get(dataSource, '_options.entitySet.path');\r\n // Fetch the RefreshCampaignData property for the current grid\r\n const context = summaryDataContextManager.getContext(path, true, method);\r\n const refreshCampaignData = putil.get(context, 'data.RefreshCampaignData');\r\n\r\n // If refreshCampaignData is set, override headerRefreshCache to true.\r\n if (refreshCampaignData) {\r\n putil.merge(params, {\r\n options: {\r\n headers: {\r\n [headerRefreshCache]: true,\r\n },\r\n },\r\n });\r\n }\r\n\r\n return originalQuery.call(dataSource, params);\r\n };\r\n\r\n const contextsToUpdate = _.chain(contexts)\r\n .union([config.legacyGridName])\r\n .compact()\r\n .value();\r\n\r\n if (!_.isEmpty(contextsToUpdate)) {\r\n gridView.on('didEdit', () => summaryDataContextManager.updateContext(contextsToUpdate));\r\n }\r\n});\r\n","import _ from '@bingads-webui-component-legacy/extension/underscore';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport { bingadsGridColumn } from '@bingads-webui-component-legacy/bingads-grid/shared/column';\r\nimport statusIconColumnTemplate from '@bingads-webui-campaign-legacy/bingadsgrid/template/status-column.pug';\r\nimport { filterOptionsFromSchema, mapEnumValueForFilter } from '@bingads-webui-component-legacy/bingads-grid/shared/schema-util';\r\nimport deliveryStatusTemplate from '@bingads-webui-campaign-legacy/bingadsgrid/vnext/template/deliveryStatusTemplate.pug';\r\nimport { applyPartialConversionColumnName } from '@bingads-webui-campaign/column-conversions';\r\n\r\nconst s$i18n = window.globalLegacyI18n.get('$/schema-i18n!campaign');\r\nconst i18nGlobal = window.globalLegacyI18n.get('component/i18n/loader!legacy/global');\r\n\r\n\r\nexport function withoutColumns(columns, names = []) {\r\n return _.reject(columns, (column) => _.contains(names, column.name));\r\n}\r\n\r\nconst getAriaLabelTextTemplate = (i18n) => {\r\n return i18n ? i18n.getString('Click to learn more about {{item}}') : undefined;\r\n};\r\n\r\nconst getPerformanceMetrics = (i18n) => {\r\n const helpAriaLabelTextTemplate = getAriaLabelTextTemplate(i18n);\r\n\r\n const {\r\n IsViewThroughConversionEnabled,\r\n IsViewThroughConversionsRevenueEnabled,\r\n dynamic = {},\r\n } = config.get('Permissions');\r\n\r\n const {\r\n PartialConversions: IsPartialConversionsEnabled,\r\n ColumnConversion: IsColumnConversionEnabled,\r\n } = dynamic;\r\n\r\n const usePartialConversions = IsPartialConversionsEnabled && IsColumnConversionEnabled;\r\n\r\n // columnConversion field was added for column conversion\r\n return [bingadsGridColumn({\r\n name: 'Clicks',\r\n title: s$i18n.property('PerformanceMetrics', 'Clicks'),\r\n sortable: true,\r\n property: 'PerformanceMetrics/Clicks',\r\n type: 'number',\r\n format: 'integer',\r\n helpId: 'Pop_BA_AccountsGrid_Clicks',\r\n helpAriaLabelTextTemplate,\r\n }), bingadsGridColumn({\r\n name: 'Impressions',\r\n title: s$i18n.property('PerformanceMetrics', 'Impressions'),\r\n sortable: true,\r\n property: 'PerformanceMetrics/Impressions',\r\n type: 'number',\r\n format: 'integer',\r\n helpId: 'Pop_BA_AccountsGrid_Impr',\r\n helpAriaLabelTextTemplate,\r\n }), bingadsGridColumn({\r\n name: 'CTR',\r\n title: s$i18n.property('PerformanceMetrics', 'ClickThruRate'),\r\n sortable: true,\r\n property: 'PerformanceMetrics/CTR',\r\n type: 'number',\r\n format: 'percentage-value',\r\n helpId: 'Pop_BA_AccountsGrid_CTR',\r\n helpAriaLabelTextTemplate,\r\n }), bingadsGridColumn({\r\n name: 'AverageCPC',\r\n title: s$i18n.property('PerformanceMetrics', 'AverageCPC'),\r\n property: 'PerformanceMetrics/AverageCPC',\r\n sortable: true,\r\n type: 'number',\r\n helpId: 'Pop_BA_AccountsGrid_CPC',\r\n helpAriaLabelTextTemplate,\r\n }), bingadsGridColumn({\r\n name: 'AveragePosition',\r\n title: s$i18n.property('PerformanceMetrics', 'AveragePosition'),\r\n property: 'PerformanceMetrics/AveragePosition',\r\n sortable: true,\r\n type: 'number',\r\n helpId: 'Page_CampaignGrids_AvgPosition',\r\n helpAriaLabelTextTemplate,\r\n }), bingadsGridColumn({\r\n name: 'TopImpressionRate',\r\n title: s$i18n.property('PerformanceMetrics', 'TopImpressionRate'),\r\n property: 'PerformanceMetrics/TopImpressionRate',\r\n sortable: true,\r\n type: 'number',\r\n format: 'percentage-value',\r\n helpId: 'pop_BA_Reporting_Clarity_TopImpressionRate',\r\n helpAriaLabelTextTemplate,\r\n }), bingadsGridColumn({\r\n name: 'AbsoluteTopImpressionRate',\r\n title: s$i18n.property('PerformanceMetrics', 'AbsoluteTopImpressionRate'),\r\n property: 'PerformanceMetrics/AbsoluteTopImpressionRate',\r\n sortable: true,\r\n type: 'number',\r\n format: 'percentage-value',\r\n helpId: 'pop_BA_Reporting_Clarity_AbsoluteTopImpressionRate',\r\n helpAriaLabelTextTemplate,\r\n }), bingadsGridColumn({\r\n name: 'AverageCPM',\r\n title: s$i18n.property('PerformanceMetrics', 'AverageCPM'),\r\n property: 'PerformanceMetrics/AverageCPM',\r\n sortable: true,\r\n type: 'number',\r\n helpId: 'Page_CampaignGrids_AvgCPM',\r\n helpAriaLabelTextTemplate,\r\n }), bingadsGridColumn({\r\n name: 'Spend',\r\n title: s$i18n.property('PerformanceMetrics', 'Spend'),\r\n property: 'PerformanceMetrics/Spend',\r\n sortable: true,\r\n type: 'number',\r\n helpId: 'Pop_BA_AccountsGrid_Spend',\r\n helpAriaLabelTextTemplate,\r\n }),\r\n usePartialConversions ? bingadsGridColumn({\r\n name: 'PartialConversionCPA',\r\n title: s$i18n.property('PerformanceMetrics', 'CPA'),\r\n property: 'PerformanceMetrics/PartialConversionCPA',\r\n sortable: true,\r\n type: 'number',\r\n format: 'decimal',\r\n helpId: 'Page_CampaignGrids_CPA',\r\n helpAriaLabelTextTemplate,\r\n columnConversion: {\r\n sourceColumnName: 'CPA',\r\n sourceSortableProperty: 'PerformanceMetrics/CPA',\r\n targetSortableProperty: 'PerformanceMetrics/PartialConversionCPA',\r\n },\r\n }) : bingadsGridColumn({\r\n name: 'CPA',\r\n title: s$i18n.property('PerformanceMetrics', 'CPA'),\r\n property: 'PerformanceMetrics/CPA',\r\n sortable: true,\r\n type: 'number',\r\n format: 'decimal',\r\n helpId: 'Page_CampaignGrids_CPA',\r\n helpAriaLabelTextTemplate,\r\n columnConversion: {\r\n sourceColumnName: 'PartialConversionCPA',\r\n sourceSortableProperty: 'PerformanceMetrics/PartialConversionCPA',\r\n targetSortableProperty: 'PerformanceMetrics/CPA',\r\n },\r\n }),\r\n usePartialConversions ? bingadsGridColumn({\r\n name: 'ConversionsCredit',\r\n title: s$i18n.property('PerformanceMetrics', 'Conversions'),\r\n property: 'PerformanceMetrics/ConversionsCredit',\r\n sortable: true,\r\n type: 'number',\r\n format: 'decimal',\r\n helpId: 'Pop_BA_AccountsGrid_Conv',\r\n helpAriaLabelTextTemplate,\r\n columnConversion: {\r\n sourceColumnName: 'Conversions',\r\n sourceSortableProperty: 'PerformanceMetrics/Conversions',\r\n targetSortableProperty: 'PerformanceMetrics/ConversionsCredit',\r\n },\r\n }) : bingadsGridColumn({\r\n name: 'Conversions',\r\n title: s$i18n.property('PerformanceMetrics', 'Conversions'),\r\n property: 'PerformanceMetrics/Conversions',\r\n sortable: true,\r\n type: 'number',\r\n format: 'integer',\r\n helpId: 'Pop_BA_AccountsGrid_Conv',\r\n helpAriaLabelTextTemplate,\r\n columnConversion: {\r\n sourceColumnName: 'ConversionsCredit',\r\n sourceSortableProperty: 'PerformanceMetrics/ConversionsCredit',\r\n targetSortableProperty: 'PerformanceMetrics/Conversions',\r\n },\r\n }),\r\n bingadsGridColumn({\r\n name: 'RevenueOnAdSpend',\r\n title: s$i18n.property('PerformanceMetrics', 'RevenueOnAdSpend'),\r\n property: 'PerformanceMetrics/RevenueOnAdSpend',\r\n sortable: true,\r\n type: 'number',\r\n format: 'percentage-value',\r\n helpId: 'Page_CampaignGrids_ReturnAdSpend',\r\n helpAriaLabelTextTemplate,\r\n }), bingadsGridColumn({\r\n name: 'AdvertiserReportedRevenue',\r\n title: s$i18n.property('PerformanceMetrics', 'AdvertiserReportedRevenue'),\r\n property: 'PerformanceMetrics/AdvertiserReportedRevenue',\r\n sortable: true,\r\n type: 'number',\r\n helpId: 'Page_CampaignGrids_Revenue',\r\n helpAriaLabelTextTemplate,\r\n }),\r\n usePartialConversions ?\r\n bingadsGridColumn({\r\n name: 'PartialConversionRate',\r\n title: s$i18n.property('PerformanceMetrics', 'ConversionRate'),\r\n property: 'PerformanceMetrics/PartialConversionRate',\r\n sortable: true,\r\n type: 'number',\r\n format: 'percentage-value',\r\n helpId: 'Page_CampaignGrids_ConvRate',\r\n helpAriaLabelTextTemplate,\r\n columnConversion: {\r\n sourceColumnName: 'ConversionRate',\r\n sourceSortableProperty: 'PerformanceMetrics/ConversionRate',\r\n targetSortableProperty: 'PerformanceMetrics/PartialConversionRate',\r\n },\r\n }) : bingadsGridColumn({\r\n name: 'ConversionRate',\r\n title: s$i18n.property('PerformanceMetrics', 'ConversionRate'),\r\n property: 'PerformanceMetrics/ConversionRate',\r\n sortable: true,\r\n type: 'number',\r\n format: 'percentage-value',\r\n helpId: 'Page_CampaignGrids_ConvRate',\r\n helpAriaLabelTextTemplate,\r\n columnConversion: {\r\n sourceColumnName: 'PartialConversionRate',\r\n sourceSortableProperty: 'PerformanceMetrics/PartialConversionRate',\r\n targetSortableProperty: 'PerformanceMetrics/ConversionRate',\r\n },\r\n }),\r\n usePartialConversions ?\r\n bingadsGridColumn({\r\n name: 'AllConversionsCredit',\r\n title: s$i18n.property('PerformanceMetrics', 'AllConversions'),\r\n property: 'PerformanceMetrics/AllConversionsCredit',\r\n sortable: true,\r\n type: 'number',\r\n format: 'decimal',\r\n helpId: 'pop_BA_CampaignGrids_AllConv',\r\n helpAriaLabelTextTemplate,\r\n columnConversion: {\r\n sourceColumnName: 'AllConversions',\r\n sourceSortableProperty: 'PerformanceMetrics/AllConversions',\r\n targetSortableProperty: 'PerformanceMetrics/AllConversionsCredit',\r\n },\r\n }) : bingadsGridColumn({\r\n name: 'AllConversions',\r\n title: s$i18n.property('PerformanceMetrics', 'AllConversions'),\r\n property: 'PerformanceMetrics/AllConversions',\r\n sortable: true,\r\n type: 'number',\r\n format: 'integer',\r\n helpId: 'pop_BA_CampaignGrids_AllConv',\r\n helpAriaLabelTextTemplate,\r\n columnConversion: {\r\n sourceColumnName: 'AllConversionsCredit',\r\n sourceSortableProperty: 'PerformanceMetrics/AllConversionsCredit',\r\n targetSortableProperty: 'PerformanceMetrics/AllConversions',\r\n },\r\n }),\r\n usePartialConversions ?\r\n bingadsGridColumn({\r\n name: 'AllPartialConversionCPA',\r\n title: s$i18n.property('PerformanceMetrics', 'AllConversionCPA'),\r\n property: 'PerformanceMetrics/AllPartialConversionCPA',\r\n sortable: true,\r\n type: 'number',\r\n helpId: 'pop_BA_CampaignGrids_AllConvCPA',\r\n helpAriaLabelTextTemplate,\r\n columnConversion: {\r\n sourceColumnName: 'AllConversionCPA',\r\n sourceSortableProperty: 'PerformanceMetrics/AllConversionCPA',\r\n targetSortableProperty: 'PerformanceMetrics/AllPartialConversionCPA',\r\n },\r\n }) : bingadsGridColumn({\r\n name: 'AllConversionCPA',\r\n title: s$i18n.property('PerformanceMetrics', 'AllConversionCPA'),\r\n property: 'PerformanceMetrics/AllConversionCPA',\r\n sortable: true,\r\n type: 'number',\r\n helpId: 'pop_BA_CampaignGrids_AllConvCPA',\r\n helpAriaLabelTextTemplate,\r\n columnConversion: {\r\n sourceColumnName: 'AllPartialConversionCPA',\r\n sourceSortableProperty: 'PerformanceMetrics/AllPartialConversionCPA',\r\n targetSortableProperty: 'PerformanceMetrics/AllConversionCPA',\r\n },\r\n }),\r\n usePartialConversions ?\r\n bingadsGridColumn({\r\n name: 'AllPartialConversionRate',\r\n title: s$i18n.property('PerformanceMetrics', 'AllConversionRate'),\r\n property: 'PerformanceMetrics/AllPartialConversionRate',\r\n sortable: true,\r\n type: 'number',\r\n format: 'percentage-value',\r\n helpId: 'pop_BA_CampaignGrids_AllConvRate',\r\n helpAriaLabelTextTemplate,\r\n columnConversion: {\r\n sourceColumnName: 'AllConversionRate',\r\n sourceSortableProperty: 'PerformanceMetrics/AllConversionRate',\r\n targetSortableProperty: 'PerformanceMetrics/AllPartialConversionRate',\r\n },\r\n }) : bingadsGridColumn({\r\n name: 'AllConversionRate',\r\n title: s$i18n.property('PerformanceMetrics', 'AllConversionRate'),\r\n property: 'PerformanceMetrics/AllConversionRate',\r\n sortable: true,\r\n type: 'number',\r\n format: 'percentage-value',\r\n helpId: 'pop_BA_CampaignGrids_AllConvRate',\r\n helpAriaLabelTextTemplate,\r\n columnConversion: {\r\n sourceColumnName: 'AllPartialConversionRate',\r\n sourceSortableProperty: 'PerformanceMetrics/AllPartialConversionRate',\r\n targetSortableProperty: 'PerformanceMetrics/AllConversionRate',\r\n },\r\n }),\r\n bingadsGridColumn({\r\n name: 'AllConversionAdvertiserReportedRevenue',\r\n title: s$i18n.property('PerformanceMetrics', 'AllConversionAdvertiserReportedRevenue'),\r\n property: 'PerformanceMetrics/AllConversionAdvertiserReportedRevenue',\r\n sortable: true,\r\n type: 'number',\r\n helpId: 'pop_BA_CampaignGrids_AllConvRevenue',\r\n helpAriaLabelTextTemplate,\r\n }), bingadsGridColumn({\r\n name: 'AllConversionRevenueOnAdSpend',\r\n title: s$i18n.property('PerformanceMetrics', 'AllConversionRevenueOnAdSpend'),\r\n property: 'PerformanceMetrics/AllConversionRevenueOnAdSpend',\r\n sortable: true,\r\n type: 'number',\r\n helpId: 'pop_BA_CampaignGrids_AllConvROAS',\r\n helpAriaLabelTextTemplate,\r\n }), ...IsViewThroughConversionEnabled ? [\r\n usePartialConversions ?\r\n bingadsGridColumn({\r\n name: 'ViewThroughConversionsCredit',\r\n title: s$i18n.property('PerformanceMetrics', 'ViewThroughConversions'),\r\n property: 'PerformanceMetrics/ViewThroughConversionsCredit',\r\n sortable: true,\r\n type: 'number',\r\n format: 'decimal',\r\n helpId: 'pop_BA_CampaignGrids_ViewThrough',\r\n helpAriaLabelTextTemplate,\r\n columnConversion: {\r\n sourceColumnName: 'ViewThroughConversions',\r\n sourceSortableProperty: 'PerformanceMetrics/ViewThroughConversions',\r\n targetSortableProperty: 'PerformanceMetrics/ViewThroughConversionsCredit',\r\n },\r\n }) : bingadsGridColumn({\r\n name: 'ViewThroughConversions',\r\n title: s$i18n.property('PerformanceMetrics', 'ViewThroughConversions'),\r\n property: 'PerformanceMetrics/ViewThroughConversions',\r\n sortable: true,\r\n type: 'number',\r\n format: 'integer',\r\n helpId: 'pop_BA_CampaignGrids_ViewThrough',\r\n helpAriaLabelTextTemplate,\r\n columnConversion: {\r\n sourceColumnName: 'ViewThroughConversionsCredit',\r\n sourceSortableProperty: 'PerformanceMetrics/ViewThroughConversionsCredit',\r\n targetSortableProperty: 'PerformanceMetrics/ViewThroughConversions',\r\n },\r\n })] : [],\r\n ...IsViewThroughConversionsRevenueEnabled ? [\r\n bingadsGridColumn({\r\n name: 'ViewThroughConversionsRevenue',\r\n title: s$i18n.property('PerformanceMetrics', 'ViewThroughConversionsRevenue'),\r\n property: 'PerformanceMetrics/ViewThroughConversionsRevenue',\r\n sortable: true,\r\n type: 'number',\r\n format: 'decimal',\r\n helpId: 'pop_BA_Reporting_Clarity_ViewThroughConvRevenue',\r\n helpAriaLabelTextTemplate,\r\n }),\r\n usePartialConversions ?\r\n bingadsGridColumn({\r\n name: 'ViewThroughPartialConversionsCPA',\r\n title: s$i18n.property('PerformanceMetrics', 'ViewThroughConversionsCPA'),\r\n property: 'PerformanceMetrics/ViewThroughPartialConversionsCPA',\r\n sortable: true,\r\n type: 'number',\r\n format: 'decimal',\r\n helpId: 'pop_BA_Reporting_Clarity_ViewThroughConvCPA',\r\n helpAriaLabelTextTemplate,\r\n columnConversion: {\r\n sourceColumnName: 'ViewThroughConversionsCPA',\r\n sourceSortableProperty: 'PerformanceMetrics/ViewThroughConversionsCPA',\r\n targetSortableProperty: 'PerformanceMetrics/ViewThroughPartialConversionsCPA',\r\n },\r\n }) : bingadsGridColumn({\r\n name: 'ViewThroughConversionsCPA',\r\n title: s$i18n.property('PerformanceMetrics', 'ViewThroughConversionsCPA'),\r\n property: 'PerformanceMetrics/ViewThroughConversionsCPA',\r\n sortable: true,\r\n type: 'number',\r\n format: 'decimal',\r\n helpId: 'pop_BA_Reporting_Clarity_ViewThroughConvCPA',\r\n helpAriaLabelTextTemplate,\r\n columnConversion: {\r\n sourceColumnName: 'ViewThroughPartialConversionsCPA',\r\n sourceSortableProperty: 'PerformanceMetrics/ViewThroughPartialConversionsCPA',\r\n targetSortableProperty: 'PerformanceMetrics/ViewThroughConversionsCPA',\r\n },\r\n }),\r\n bingadsGridColumn({\r\n name: 'ViewThroughConversionsReturnOnAdSpend',\r\n title: s$i18n.property('PerformanceMetrics', 'ViewThroughConversionsReturnOnAdSpend'),\r\n property: 'PerformanceMetrics/ViewThroughConversionsReturnOnAdSpend',\r\n sortable: true,\r\n type: 'number',\r\n format: 'percentage-value',\r\n helpId: 'pop_BA_Reporting_Clarity_ViewThroughConvReturnOnAdSpend',\r\n helpAriaLabelTextTemplate,\r\n }),\r\n usePartialConversions ?\r\n bingadsGridColumn({\r\n name: 'ViewThroughPartialConversionsRate',\r\n title: s$i18n.property('PerformanceMetrics', 'ViewThroughConversionsRate'),\r\n property: 'PerformanceMetrics/ViewThroughPartialConversionsRate',\r\n sortable: true,\r\n type: 'number',\r\n format: 'percentage-value',\r\n helpId: 'pop_BA_Reporting_Clarity_ViewThroughConvRate',\r\n helpAriaLabelTextTemplate,\r\n columnConversion: {\r\n sourceColumnName: 'ViewThroughConversionsRate',\r\n sourceSortableProperty: 'PerformanceMetrics/ViewThroughConversionsRate',\r\n targetSortableProperty: 'PerformanceMetrics/ViewThroughPartialConversionsRate',\r\n },\r\n }) : bingadsGridColumn({\r\n name: 'ViewThroughConversionsRate',\r\n title: s$i18n.property('PerformanceMetrics', 'ViewThroughConversionsRate'),\r\n property: 'PerformanceMetrics/ViewThroughConversionsRate',\r\n sortable: true,\r\n type: 'number',\r\n format: 'percentage-value',\r\n helpId: 'pop_BA_Reporting_Clarity_ViewThroughConvRate',\r\n helpAriaLabelTextTemplate,\r\n columnConversion: {\r\n sourceColumnName: 'ViewThroughPartialConversionsRate',\r\n sourceSortableProperty: 'PerformanceMetrics/ViewThroughPartialConversionsRate',\r\n targetSortableProperty: 'PerformanceMetrics/ViewThroughConversionsRate',\r\n },\r\n }),\r\n ] : [],\r\n bingadsGridColumn({\r\n name: 'VideoViews',\r\n title: s$i18n.property('PerformanceMetrics', 'VideoViews'),\r\n property: 'PerformanceMetrics/VideoViews',\r\n sortable: true,\r\n type: 'number',\r\n format: 'decimal',\r\n helpId: 'Page_CampaignGrids_VideoViews',\r\n helpAriaLabelTextTemplate,\r\n }), bingadsGridColumn({\r\n name: 'ViewThroughRate',\r\n title: s$i18n.property('PerformanceMetrics', 'ViewThroughRate'),\r\n property: 'PerformanceMetrics/ViewThroughRate',\r\n sortable: true,\r\n type: 'number',\r\n format: 'decimal',\r\n helpId: 'Page_CampaignGrids_ViewThroughRate',\r\n helpAriaLabelTextTemplate,\r\n }), bingadsGridColumn({\r\n name: 'AverageCPV',\r\n title: s$i18n.property('PerformanceMetrics', 'AverageCPV'),\r\n property: 'PerformanceMetrics/AverageCPV',\r\n sortable: true,\r\n type: 'number',\r\n format: 'decimal',\r\n helpId: 'Page_CampaignGrids_AverageCPV',\r\n helpAriaLabelTextTemplate,\r\n }), bingadsGridColumn({\r\n name: 'TotalWatchTimeInMS',\r\n title: s$i18n.property('PerformanceMetrics', 'TotalWatchTimeInMS'),\r\n property: 'PerformanceMetrics/TotalWatchTimeInMS',\r\n sortable: true,\r\n type: 'number',\r\n format: 'thousandth',\r\n helpId: 'Page_CampaignGrids_TotalWatchTime',\r\n helpAriaLabelTextTemplate,\r\n }), bingadsGridColumn({\r\n name: 'AverageWatchTimePerImpression',\r\n title: s$i18n.property('PerformanceMetrics', 'AverageWatchTimePerImpression'),\r\n property: 'PerformanceMetrics/AverageWatchTimePerImpression',\r\n sortable: true,\r\n type: 'number',\r\n format: 'decimal',\r\n helpId: 'Page_CampaignGrids_AverageWatchTimePerImpression',\r\n helpAriaLabelTextTemplate,\r\n }), bingadsGridColumn({\r\n name: 'AverageWatchTimePerVideoView',\r\n title: s$i18n.property('PerformanceMetrics', 'AverageWatchTimePerVideoView'),\r\n property: 'PerformanceMetrics/AverageWatchTimePerVideoView',\r\n sortable: true,\r\n type: 'number',\r\n format: 'decimal',\r\n helpId: 'Page_CampaignGrids_AverageWatchTimePerVideoView',\r\n helpAriaLabelTextTemplate,\r\n }), bingadsGridColumn({\r\n name: 'VideoViewsAt25Percent',\r\n title: s$i18n.property('PerformanceMetrics', 'VideoViewsAt25Percent'),\r\n property: 'PerformanceMetrics/VideoViewsAt25Percent',\r\n sortable: true,\r\n type: 'number',\r\n format: 'decimal',\r\n helpId: 'Page_CampaignGrids_VideoViewsAt25Percent',\r\n helpAriaLabelTextTemplate,\r\n }), bingadsGridColumn({\r\n name: 'VideoViewsAt50Percent',\r\n title: s$i18n.property('PerformanceMetrics', 'VideoViewsAt50Percent'),\r\n property: 'PerformanceMetrics/VideoViewsAt50Percent',\r\n sortable: true,\r\n type: 'number',\r\n format: 'decimal',\r\n helpId: 'Page_CampaignGrids_VideoViewsAt50Percent',\r\n helpAriaLabelTextTemplate,\r\n }), bingadsGridColumn({\r\n name: 'VideoViewsAt75Percent',\r\n title: s$i18n.property('PerformanceMetrics', 'VideoViewsAt75Percent'),\r\n property: 'PerformanceMetrics/VideoViewsAt75Percent',\r\n sortable: true,\r\n type: 'number',\r\n format: 'decimal',\r\n helpId: 'Page_CampaignGrids_VideoViewsAt75Percent',\r\n helpAriaLabelTextTemplate,\r\n }), bingadsGridColumn({\r\n name: 'CompletedVideoViews',\r\n title: s$i18n.property('PerformanceMetrics', 'CompletedVideoViews'),\r\n property: 'PerformanceMetrics/CompletedVideoViews',\r\n sortable: true,\r\n type: 'number',\r\n format: 'decimal',\r\n helpId: 'Page_CampaignGrids_CompletedVideoViews',\r\n helpAriaLabelTextTemplate,\r\n }), bingadsGridColumn({\r\n name: 'VideoCompletionRate',\r\n title: s$i18n.property('PerformanceMetrics', 'VideoCompletionRate'),\r\n property: 'PerformanceMetrics/VideoCompletionRate',\r\n sortable: true,\r\n type: 'number',\r\n format: 'decimal',\r\n helpId: 'Page_CampaignGrids_VideoCompletionRate',\r\n helpAriaLabelTextTemplate,\r\n })];\r\n};\r\n\r\nfunction getDeliveryStatus({\r\n DeliveryStatus,\r\n GeoCodeStatus,\r\n i18n,\r\n}) {\r\n const DeliveryStatusError = ['EditorialRejected', 'EditorialAppealRejected', 'CAMEditorialRejected', 'CreditCardExpired', 'IOExceeded', 'PaymentInformationMissing', 'Other', 'CampaignBudgetPaused', 'MigrationPaused', 'AdGroupDeleted', 'AdGroupExpired', 'CampaignDeleted'];\r\n const DeliveryStatusNormal = ['Eligible', 'EditorialApprovedLimited', 'EditorialApprovedLimitedAppealRejected', 'Incomplete', 'InlineOpportunity'];\r\n const GeoCodeStatusEnum = ['Pending', 'Complete', 'Invalid', 'Failed'];\r\n const DeliveryStatusNoGlyph = ['Eligible', 'BudgetSuggestions', 'Incomplete', 'CampaignBudgetPaused', 'GeoCodingIncomplete', 'InlineOpportunity'];\r\n const labelDeliveryStatus = `Label_DeliveryStatus_${DeliveryStatus}`;\r\n\r\n let ret = {\r\n i18n,\r\n deliveryStatus: labelDeliveryStatus,\r\n };\r\n\r\n if (!DeliveryStatus || DeliveryStatusNormal.indexOf(DeliveryStatus) > -1) {\r\n ret.status = 'normal';\r\n } else if (DeliveryStatusError.indexOf(DeliveryStatus) > -1) {\r\n ret.status = 'error';\r\n } else {\r\n ret.status = 'warning';\r\n }\r\n\r\n if (DeliveryStatus === 'GeoCodingIncomplete') {\r\n const GeoStatus = GeoCodeStatusEnum.indexOf(GeoCodeStatus);\r\n\r\n ret.deliveryStatus = `${ret.deliveryStatus}_${GeoStatus}`;\r\n }\r\n\r\n if (DeliveryStatusNoGlyph.indexOf(DeliveryStatus) === -1) {\r\n ret.hasGlyph = true;\r\n }\r\n\r\n return ret;\r\n}\r\n\r\nexport function getDeliveryColumn({ isForVNext, i18n }) {\r\n return bingadsGridColumn({\r\n name: 'Delivery',\r\n property: 'AdExtension',\r\n sortable: 'AdExtension/Delivery',\r\n type: 'string',\r\n title: s$i18n.property('AdExtension', 'Delivery'),\r\n template: (local) => {\r\n if (_.isEmpty(local.value) || _.isEmpty(local.value.Delivery)) {\r\n return '-';\r\n }\r\n\r\n return deliveryStatusTemplate({\r\n DeliveryTemplates: getDeliveryStatus({\r\n DeliveryStatus: local.value.Delivery,\r\n GeoCodeStatus: local.value.GeoCodeStatus,\r\n IsAppealable: _.get(local, ['AdExtensionItemIdToEditorialReasonCollection', 'Value', 'IsAppealable']),\r\n i18n: i18nGlobal,\r\n }),\r\n isForVNext,\r\n });\r\n },\r\n bodyClasses: ['col-Delivery'],\r\n helpId: 'Page_CampaignGrids_Delivery',\r\n helpAriaLabelTextTemplate: getAriaLabelTextTemplate(i18n),\r\n });\r\n}\r\n\r\nconst getEntityColumns = (i18n) => {\r\n return [bingadsGridColumn({\r\n name: 'Status',\r\n sortable: true,\r\n title: s$i18n.property('Campaign', 'Status'),\r\n template: (local) => {\r\n if (_.isEmpty(local.value)) {\r\n return ' ';\r\n }\r\n\r\n return statusIconColumnTemplate({\r\n Status: local.value,\r\n });\r\n },\r\n }), bingadsGridColumn({\r\n name: 'CampaignName',\r\n property: (item) => {\r\n return _.extend(_.pick(item.Campaign, 'Id', 'Name', 'BaseCampaignName'), {\r\n IsDeleted: _.result(item.AdExtension, 'Delivery', '') === 'CampaignDeleted',\r\n });\r\n },\r\n type: 'string',\r\n sortable: 'Campaign/Name',\r\n title: s$i18n.type('Campaign'),\r\n bodyClasses: ['col-CampaignName'],\r\n }), bingadsGridColumn({\r\n name: 'AdGroupName',\r\n property: (item) => {\r\n return _.defaults(_.pick(item.AdGroup, 'Id', 'Name'), {\r\n CampaignId: _.result(item.Campaign, 'Id', ''),\r\n IsDeleted: _.result(item.AdExtension, 'Delivery', '') === 'AdGroupDeleted' || _.result(item.AdExtension, 'Delivery', '') === 'CampaignDeleted',\r\n });\r\n },\r\n type: 'string',\r\n sortable: 'AdGroup/Name',\r\n title: s$i18n.type('Adgroup'),\r\n bodyClasses: ['col-AdGroupName'],\r\n }), bingadsGridColumn({\r\n name: 'DisplayBiddingStrategyType',\r\n sortable: true,\r\n title: s$i18n.property('Campaign', 'DisplayBiddingStrategyType'),\r\n helpId: 'pop_BA_CampaignGrids_BidStrategy',\r\n helpAriaLabelTextTemplate: getAriaLabelTextTemplate(i18n),\r\n template: (local) => {\r\n if (_.isEmpty(local.value)) {\r\n return ' ';\r\n }\r\n\r\n return s$i18n.value('Campaign', 'DisplayBiddingStrategyType', local.value);\r\n },\r\n }), bingadsGridColumn({\r\n name: 'CampaignType',\r\n property: 'Campaign/CampaignType',\r\n sortable: 'Campaign/CampaignType',\r\n title: s$i18n.property('Campaign', 'CampaignType'),\r\n template: (local) => {\r\n if (_.isEmpty(local.value)) {\r\n return ' ';\r\n }\r\n\r\n return s$i18n.value('Campaign', 'CampaignType', local.value);\r\n },\r\n }), getDeliveryColumn({ isForVNext: false, i18n })];\r\n};\r\n\r\nconst Performance = {\r\n title: s$i18n.type('Performance'),\r\n columns: ['Clicks', 'Impressions', 'CTR', 'AverageCPC', 'AveragePosition', 'AverageCPM', 'Spend'],\r\n};\r\n\r\nconst Conversions = {\r\n title: s$i18n.type('Conversions'),\r\n columns: applyPartialConversionColumnName(config.get('Permissions'), [\r\n 'CPA',\r\n 'Conversions',\r\n 'ConversionRate',\r\n 'RevenueOnAdSpend',\r\n 'AdvertiserReportedRevenue',\r\n 'AllConversionCPA',\r\n 'AllConversions',\r\n 'AllConversionRate',\r\n 'AllConversionRevenueOnAdSpend',\r\n 'AllConversionAdvertiserReportedRevenue',\r\n 'ViewThroughConversions',\r\n 'ViewThroughConversionsRevenue',\r\n 'ViewThroughConversionsCPA',\r\n 'ViewThroughConversionsReturnOnAdSpend',\r\n 'ViewThroughConversionsRate']),\r\n};\r\n\r\nconst getColumnChooser = (choosers = {}, appendList = [], blackList = []) => {\r\n let ret = _.clone(choosers);\r\n\r\n ret.columns = _.chain(ret.columns)\r\n .union(appendList)\r\n .difference(blackList)\r\n .value();\r\n return ret;\r\n};\r\n\r\nexport function getPerformanceColumnChooser(appendList = [], blackList = []) {\r\n return getColumnChooser(Performance, appendList, blackList);\r\n}\r\n\r\nexport function getConversionsColumnChooser(appendList = [], blackList = []) {\r\n const permissions = config.get('Permissions');\r\n const {\r\n IsViewThroughConversionEnabled,\r\n IsViewThroughConversionsRevenueEnabled,\r\n } = permissions;\r\n\r\n const combinedBlackList = applyPartialConversionColumnName(permissions, [\r\n ...IsViewThroughConversionEnabled ? [] : ['ViewThroughConversions'],\r\n ...IsViewThroughConversionsRevenueEnabled ? [] : ['ViewThroughConversionsRevenue', 'ViewThroughConversionsCPA', 'ViewThroughConversionsReturnOnAdSpend', 'ViewThroughConversionsRate'],\r\n ]);\r\n\r\n return getColumnChooser(Conversions, appendList, [...blackList, ...combinedBlackList]);\r\n}\r\n\r\nexport function getSharedColumns(names = [], i18n = null) {\r\n let ret = _.filter(getEntityColumns(i18n), (item) => {\r\n return _.contains(names, item.name);\r\n });\r\n\r\n const performanceMetrics = getPerformanceMetrics(i18n);\r\n\r\n if (_.contains(names, 'PerformanceMetrics')) { //if contains 'PerformanceMetrics' and 'Clicks' at the same time, only add all PerformanceMetrics columns\r\n ret = ret.concat(performanceMetrics);\r\n } else {\r\n const biColumns = _.filter(performanceMetrics, (item) => {\r\n return _.contains(names, item.name);\r\n });\r\n\r\n ret = ret.concat(biColumns);\r\n }\r\n\r\n return ret;\r\n}\r\n\r\nexport function getSharedCustomizedColumns(items = [], i18n = null) {\r\n const names = _.pluck(items, 'name');\r\n let ret = _.filter(getEntityColumns(i18n), (item) => {\r\n return _.contains(names, item.name);\r\n });\r\n\r\n _.each(items, (item) => {\r\n let column = _.find(ret, {name: item.name});\r\n\r\n if (column) {\r\n column.template = (local) => {\r\n const verification = item.name === 'CampaignName' && local.value.Id ? true : _.isNumber(local.value.CampaignId);\r\n\r\n if (_.isEmpty(local.value) || !verification) {\r\n return '-';\r\n }\r\n\r\n let ariaLabel;\r\n\r\n if (i18n) {\r\n if (item.name === 'CampaignName') {\r\n ariaLabel = i18n.getString('Click to scope to campaign {{campaignName}}').replace('{{campaignName}}', local.value.Name);\r\n } else if (item.name === 'AdGroupName') {\r\n ariaLabel = i18n.getString('Click to scope to ad group {{adGroupName}}').replace('{{adGroupName}}', local.value.Name);\r\n }\r\n }\r\n\r\n return item.customizedTemplate({\r\n name: local.value.Name,\r\n parentName: local.value.BaseCampaignName,\r\n cid: _.result(config.get('CurrentCustomer'), 'Id'),\r\n aid: _.result(config.get('CurrentAccount'), 'Id'),\r\n cmpid: item.name === 'CampaignName' ? local.value.Id : local.value.CampaignId,\r\n adgid: local.value.Id,\r\n type: item.associationType,\r\n isDeleted: local.value.IsDeleted,\r\n ariaLabel,\r\n });\r\n };\r\n }\r\n });\r\n\r\n return ret;\r\n}\r\n\r\nexport function getFilterEntity(schema, filterList, includePerformanceMetrics = true) {\r\n let filterEntity = filterOptionsFromSchema(schema);\r\n\r\n filterEntity.fields = _.filter(filterEntity.fields, (field) => {\r\n return _.contains(filterList, field.property) || (includePerformanceMetrics && field.property.indexOf('PerformanceMetrics/') === 0);\r\n });\r\n\r\n //override name\r\n filterEntity.fields = _.map(filterEntity.fields, (field) => {\r\n if (field.property.indexOf('PerformanceMetrics/') !== 0) {\r\n field.name = field.property.replace(/\\//g, '');\r\n }\r\n return field;\r\n });\r\n\r\n //override field DisplayBiddingStrategyType\r\n let bidStrategyOption = _.findWhere(filterEntity.fields, {property: 'DisplayBiddingStrategyType'});\r\n\r\n if (!_.isEmpty(bidStrategyOption)) {\r\n const bidStrategyType = schema.properties.DisplayBiddingStrategyType.enum;\r\n const enumValues = _.map(bidStrategyType, (type) => {\r\n return mapEnumValueForFilter('BiddingStrategyType', type);\r\n });\r\n\r\n _.extend(bidStrategyOption, {\r\n localized: _.object(enumValues, _.map(bidStrategyType, (type) => {\r\n return s$i18n.value('Campaign', 'DisplayBiddingStrategyType', type);\r\n })),\r\n operators: ['eq'],\r\n enum: enumValues,\r\n });\r\n }\r\n\r\n return filterEntity;\r\n}\r\n","import appConfig from '@bingads-webui-component-legacy/config/index';\r\nimport logger from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport stateManager from '@bingads-webui-component-legacy/statemanager/campaignStateManager';\r\nimport {getCreatedBy, getFrequency, getExpression,\r\n getNotificationType, getEditLink} from './rule-mapper';\r\nimport { bingadsGridColumn } from '@bingads-webui-component-legacy/bingads-grid/shared/column';\r\nimport sessionStore from '@bingads-webui-component-legacy/js-data-storage/session-storage';\r\nimport { getFilters } from '@bingads-webui-component-legacy/bingads-grid/service/filter-preferences';\r\nimport cacheService from '@bingads-webui-static-legacy/cache-service';\r\nimport jsdataCampaign from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport odata from '@bingads-webui-static-legacy/communication/channel/odata';\r\nimport preferenceService from '@bingads-webui-component-legacy/preference/service/index';\r\nimport dataContextManager from '@bingads-webui-static-legacy/summary/SummaryDataContextManager';\r\nimport * as i18nErrors from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport * as customColumnPreference from '@bingads-webui-component-legacy/bingads-grid/service/custom-column-preferences';\r\n\r\nconst i18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/bulk-operation');\r\nconst legacyGlobalI18n = window.globalLegacyI18n.get('component/i18n/loader!legacy/global');\r\nconst schemaI18nCampaign = window.globalLegacyI18n.get('$/schema-i18n!campaign');\r\n\r\nexport const deps = {\r\n i18n,\r\n appConfig,\r\n logger,\r\n stateManager,\r\n getCreatedBy,\r\n getFrequency,\r\n getExpression,\r\n getNotificationType,\r\n getEditLink,\r\n bingadsGridColumn,\r\n jsdataCampaign,\r\n preferenceService,\r\n legacyGlobalI18n,\r\n sessionStore,\r\n getFilters,\r\n schemaI18nCampaign,\r\n cacheService,\r\n dataContextManager,\r\n odata,\r\n i18nErrors,\r\n customColumnPreference,\r\n};\r\n","import _ from 'underscore';\r\nimport kendo from '@bingads-webui/kendo/kendo.core';\r\nimport cronParser from '@bingads-webui-static-legacy/cron';\r\nimport ruleAuthoringOptions from '@bingads-webui-static-legacy/schema/automatedRules/ruleAuthoringOptions';\r\nimport odataParser from '@bingads-webui-static-legacy/bulk-edit/bulkEdit/bulkEditi18n';\r\nimport JobModel from '@bingads-webui-campaign-legacy/bulk-operation/util/bulk-edit-job';\r\n\r\nconst i18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/bulk-operation');\r\nconst i18nGlobal = window.globalLegacyI18n.get('module/extension/requirejs/i18n!global');\r\n\r\n// [Todo: hezhan] check no result string of projection-grid, align the config.\r\nconst noData = '-';\r\n\r\nexport function getDateTime(date) {\r\n const offset = -date.getTimezoneOffset();\r\n const offsetStr = offset === 0 ?\r\n ' (GMT)' :\r\n ` (GMT${\r\n offset >= 0 ? '+' : '-'\r\n }${kendo.toString(Math.abs(offset / 60), '00')\r\n }:${\r\n kendo.toString(Math.abs(offset % 60), '00')\r\n })`;\r\n\r\n return !_.isUndefined(date) && !_.isNull(date) ?\r\n i18n.formatDate(date) + offsetStr :\r\n noData;\r\n}\r\n\r\nexport function getCreatedBy(taskItem) {\r\n return {\r\n modifiedBy: taskItem.ModifiedBy.Name,\r\n modifiedAt: i18n.formatDate(new Date(taskItem.ModifiedAt), { datetime: 'full' }),\r\n };\r\n}\r\n\r\nexport function getFrequency(taskItem) {\r\n if (_.isNull(taskItem) || _.isNull(taskItem.Cron)) {\r\n return noData;\r\n }\r\n\r\n let cronString = '';\r\n let timeZone = '';\r\n let dateRange = '';\r\n const model = cronParser.parse(taskItem.Cron);\r\n\r\n if (model) {\r\n let hourString = i18nGlobal.getString(`DailyOptions_${model.hour}`);\r\n let date = new Date(model.year, model.month - 1, model.dayOfMonth, 0, 0, 0, 0);\r\n\r\n switch (cronParser.getFrequency()) {\r\n case cronParser.frequency.ONCE:\r\n cronString = i18n.getString('AutomatedRules_Frequency_WeeklyTemplate').replace('{0}', i18n.getString('AutomatedRules_FrequencyGrain_Once'));\r\n cronString = cronString.replace('{1}', date.toLocaleDateString());\r\n cronString = cronString.replace('{2}', hourString);\r\n break;\r\n case cronParser.frequency.MONTHLY:\r\n cronString = i18n.getString('AutomatedRules_Frequency_MonthlyTemplate').replace('{0}', i18n.getString('AutomatedRules_FrequencyGrain_Monthly'));\r\n cronString = cronString.replace('{1}', model.dayOfMonth);\r\n cronString = cronString.replace('{2}', hourString);\r\n break;\r\n case cronParser.frequency.WEEKLY:\r\n cronString = i18n.getString('AutomatedRules_Frequency_WeeklyTemplate').replace('{0}', i18n.getString('AutomatedRules_FrequencyGrain_Weekly'));\r\n cronString = cronString.replace('{1}', i18nGlobal.getString(`WeeklyOptions_${model.dayOfWeek}`));\r\n cronString = cronString.replace('{2}', hourString);\r\n break;\r\n case cronParser.frequency.DAILY:\r\n cronString = i18n.getString('AutomatedRules_Frequency_DailyTemplate').replace('{0}', i18n.getString('AutomatedRules_FrequencyGrain_Daily'));\r\n cronString = cronString.replace('{1}', hourString);\r\n break;\r\n case cronParser.frequency.HOURLY:\r\n cronString = i18n.getString('AutomatedRules_FrequencyGrain_Hourly');\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n if (taskItem.TimeZoneId > 0) {\r\n timeZone = i18nGlobal.getString(`TimeZoneId_${taskItem.TimeZoneId}`);\r\n }\r\n if (taskItem.Selection && taskItem.Selection.DateRange && taskItem.Selection.DateRange.DateRangePreset) {\r\n dateRange = i18n.getString('AutomatedRules_DataDateRange_Template').replace('{0}', i18nGlobal.getString(`DataDateRangeOptions_${taskItem.Selection.DateRange.DateRangePreset}`).toLowerCase());\r\n }\r\n\r\n return {\r\n cronString,\r\n timeZone,\r\n dateRange,\r\n };\r\n}\r\n\r\nexport function getNotificationType(taskItem) {\r\n if (_.isNull(taskItem) || _.isNull(taskItem.NotificationType)) {\r\n return noData;\r\n }\r\n const key = 'NotificationType_'.concat(taskItem.NotificationType === ruleAuthoringOptions.emailOptions.OnChangeOrError ? 'OnChangeOrError' : taskItem.NotificationType);\r\n\r\n return i18n.getString(key);\r\n}\r\n\r\nfunction isEmailRule(model) {\r\n\r\n if (!model || model.get('BatchAction').Actions.length !== 1) {\r\n return false;\r\n } else {\r\n return model.get('BatchAction').Actions[0]['@odata.type'] === '#Model.QueryOnlyAction';\r\n }\r\n}\r\n\r\nexport function getExpression(taskItem) {\r\n if (_.isNull(taskItem)) {\r\n return noData;\r\n }\r\n\r\n const tempModel = new JobModel(taskItem);\r\n const desc = odataParser.getRuleSelection(tempModel, 4);\r\n const summary = isEmailRule(tempModel) ? {summary: i18n.getString('AutomatedRules_RulesManagementGrid_EmailActionDisplay')} : odataParser.getJobDescription(tempModel);\r\n\r\n const result = {};\r\n\r\n if (summary) {\r\n _.defaults(result, summary);\r\n }\r\n if (desc) {\r\n _.defaults(result, { desc });\r\n }\r\n\r\n return result;\r\n}\r\n\r\nexport function getEditLink(taskItem) {\r\n const actionName = taskItem.State === 'Deleted' ? i18n.getString('AutomatedRules_RulesManagementGrid_CreateSimilarRule') : i18n.getString('AutomatedRules_RulesManagementGrid_EditRule');\r\n\r\n return {\r\n id: taskItem.Id,\r\n actionName,\r\n };\r\n}\r\n","import _ from 'underscore';\r\nimport odataParser from '@bingads-webui-static-legacy/bulk-edit/bulkEdit/bulkEditi18n';\r\nimport gridFilterSerializer from '@bingads-webui-campaign-legacy/bulk-operation/util/grid-filter-serializer';\r\nimport { getTitlePreviewFromJson, getMoreTitleHintFromJson } from '@bingads-webui-campaign/summary-grid-helper';\r\n\r\nconst i18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/bulk-operation');\r\n\r\nexport function getStartTime(jobModel) {\r\n return i18n.formatDate(jobModel.get('CreationTime'), {\r\n datetime: 'short',\r\n });\r\n}\r\n\r\nexport function getDescription(jobModel) {\r\n const description = odataParser.getJobDescription(jobModel);\r\n\r\n return {\r\n summary: description.summary,\r\n args: description.args,\r\n };\r\n}\r\n\r\nconst entityMap = {\r\n 'Campaign': {\r\n targetTab: 'Campaign',\r\n queryParts: ['campaigns'],\r\n },\r\n 'Keyword': {\r\n targetTab: 'Keywords',\r\n queryParts: ['keywords'],\r\n },\r\n 'AdGroup': {\r\n targetTab: 'AdGroup',\r\n queryParts: ['adgroups'],\r\n },\r\n 'Ad': {\r\n targetTab: 'Ads',\r\n queryParts: ['ads'],\r\n },\r\n 'AdGroupAudienceAssociation': {\r\n targetTab: 'AudiencesAssociation',\r\n queryParts: ['audiences'],\r\n },\r\n 'AudienceAssociation': {\r\n targetTab: 'AudiencesAssociation',\r\n queryParts: ['audiences'],\r\n },\r\n 'DsaTarget': {\r\n targetTab: 'AutoTargets',\r\n queryParts: ['autotargets'],\r\n },\r\n};\r\n\r\nexport function getScopeCallback(jobModel) {\r\n const filter = gridFilterSerializer.fromDescription(jobModel.get('Description'));\r\n const entity = jobModel.get('Entity');\r\n const campaign = jobModel.get('Campaign');\r\n const adgroup = jobModel.get('AdGroup');\r\n const entityObj = _.result(entityMap, entity, {\r\n targetTab: 'Campaign',\r\n queryParts: ['campaigns'],\r\n });\r\n const queryParts = entityObj.queryParts;\r\n let routeArgs;\r\n let routeUrl;\r\n\r\n if (filter && filter.FilterExpressions) {\r\n queryParts.push(`f-${gridFilterSerializer.toQueryString(filter.FilterExpressions)}`);\r\n }\r\n\r\n if (entity !== 'Campaign' && campaign && campaign.Id) {\r\n const campaignId = campaign.Id;\r\n let adgroupId;\r\n\r\n queryParts.push(campaignId);\r\n if (adgroup && adgroup.ID) {\r\n adgroupId = adgroup.ID;\r\n queryParts.push(adgroupId);\r\n }\r\n routeArgs = {\r\n 'campaign_id': campaignId,\r\n 'adgroup_id': adgroupId,\r\n };\r\n\r\n\r\n }\r\n\r\n if (filter && filter.FilterExpressions) {\r\n return _.bind(window.App.router.navigate, window.App.router, queryParts.join('/'));\r\n } else {\r\n routeUrl = window.App.router_new.legacy_tab_to_url(entityObj.targetTab);\r\n return _.bind(window.App.navigate, window.App, routeUrl, { param: routeArgs });\r\n }\r\n}\r\n\r\nexport function getSelection(jobModel, vnextInfo) {\r\n const selection = odataParser.getJobSelection(jobModel);\r\n let scopeCallback = !selection || selection.idBased || vnextInfo ? null : getScopeCallback(jobModel);\r\n\r\n return {\r\n header: selection.header,\r\n scope: selection.scope,\r\n idBased: selection.idBased,\r\n filter: selection.filter,\r\n footer: selection.footer,\r\n scopeCallback,\r\n isForVnext: !!vnextInfo,\r\n };\r\n}\r\n\r\nfunction entityToObject(entityKey) {\r\n const keys = _.pluck(entityKey || [], 'Key');\r\n const values = _.pluck(entityKey || [], 'Value');\r\n\r\n return _.object(keys, values);\r\n}\r\n\r\nfunction getCampaignLink(campaignId) {\r\n return `#/customer/:customer_id/account/:account_id/campaign/${campaignId}/adgroup`;\r\n}\r\n\r\nfunction getUiNextCampaignLink(campaignId, scope) {\r\n const {\r\n values: {\r\n cid,\r\n aid,\r\n },\r\n } = scope;\r\n\r\n return `/campaign/vnext/adgroups?aid=${aid}&cid=${cid}&campaignId=${campaignId}`;\r\n}\r\n\r\nfunction getAdgroupLink({\r\n CampaignId, AdGroupId, AdTitle, AdType,\r\n}) {\r\n let subPath = 'keyword';\r\n\r\n if (_.isString(AdTitle) || AdType === 'Responsive') {\r\n subPath = 'ad';\r\n }\r\n\r\n return `#/customer/:customer_id/account/:account_id/campaign/${CampaignId}/adgroup/${AdGroupId}/${subPath}`;\r\n}\r\n\r\nfunction getUiNextAdgroupLink({\r\n CampaignId, AdGroupId, AdTitle, AdType,\r\n}, scope) {\r\n const {\r\n values: {\r\n cid,\r\n aid,\r\n },\r\n } = scope;\r\n let subPath = 'keywords';\r\n\r\n if (_.isString(AdTitle) || AdType === 'Responsive') {\r\n subPath = 'ads';\r\n }\r\n\r\n return `/campaign/vnext/${subPath}?aid=${aid}&cid=${cid}&campaignId=${CampaignId}&adGroupId=${AdGroupId}`;\r\n}\r\n\r\nconst entityKeyMap = {\r\n 'Campaign': 'CampaignName',\r\n 'AdGroup': 'AdgroupName',\r\n 'Keyword': 'Keyword',\r\n 'Ad': 'AdTitle',\r\n 'AdGroupAudienceAssociation': 'AudienceName',\r\n 'AudienceAssociation': 'AudienceName',\r\n 'DsaTarget': 'AdgroupDsaTargetCriterionName',\r\n 'Hotel': 'HotelName',\r\n 'HotelGroup': 'HotelGroupName',\r\n 'PerformanceTarget': 'PerformanceTargetName',\r\n};\r\n\r\nfunction getEntityKeyField(entityType) {\r\n return entityKeyMap[entityType];\r\n}\r\n\r\nexport function getEntityWrapper(jobModel, vnextInfo) {\r\n const entityKeyField = getEntityKeyField(jobModel.get('Entity'));\r\n const isForVnext = !!vnextInfo;\r\n\r\n return function(bulkEditResult) {\r\n // [todo: hezhan] bug 741286, double check the logic here to origin author\r\n if (!_.isNull(bulkEditResult.EntityKey) && !_.isUndefined(bulkEditResult.EntityKey) && bulkEditResult.EntityKey.length > 1) {\r\n const dictionary = entityToObject(bulkEditResult.EntityKey);\r\n let entityName;\r\n let moreTitleHint;\r\n\r\n if (_.isUndefined(dictionary.AdHeadlines)) {\r\n entityName = entityKeyField && dictionary[entityKeyField];\r\n } else {\r\n entityName = getTitlePreviewFromJson(dictionary.AdHeadlines);\r\n moreTitleHint = getMoreTitleHintFromJson(dictionary.AdHeadlines, i18n);\r\n }\r\n\r\n return {\r\n campaign: {\r\n name: dictionary.CampaignName,\r\n url: isForVnext ?\r\n getUiNextCampaignLink(dictionary.CampaignId, vnextInfo.scope) :\r\n getCampaignLink(dictionary.CampaignId),\r\n id: dictionary.CampaignId,\r\n ariaLabel: i18n.getString('Click to scope to campaign {{campaignName}}', { campaignName: dictionary.CampaignName }),\r\n },\r\n adGroup: {\r\n name: dictionary.AdgroupName,\r\n url: isForVnext ?\r\n getUiNextAdgroupLink(_.pick(dictionary, 'CampaignId', 'AdGroupId', 'AdTitle', 'AdType'), vnextInfo.scope) :\r\n getAdgroupLink(_.pick(dictionary, 'CampaignId', 'AdGroupId', 'AdTitle', 'AdType')),\r\n id: dictionary.AdGroupId,\r\n campaignId: dictionary.CampaignId,\r\n ariaLabel: i18n.getString('Click to scope to ad group {{adGroupName}}', { adGroupName: dictionary.AdgroupName }),\r\n },\r\n entityName,\r\n moreTitleHint,\r\n isForVnext,\r\n };\r\n } else {\r\n return {};\r\n }\r\n };\r\n}\r\n\r\nexport function getEntity(bulkEditResult) {\r\n if (!_.isNull(bulkEditResult.EntityKey) && !_.isUndefined(bulkEditResult.EntityKey) && bulkEditResult.EntityKey.length > 1) {\r\n const dictionary = entityToObject(bulkEditResult.EntityKey);\r\n\r\n return {\r\n campaign: {\r\n name: dictionary.CampaignName,\r\n url: getCampaignLink(dictionary.CampaignId),\r\n },\r\n adGroup: {\r\n name: dictionary.AdgroupName,\r\n url: getAdgroupLink(_.pick(dictionary, 'CampaignId', 'AdGroupId', 'AdTitle', 'AdType')),\r\n },\r\n keyword: {\r\n name: dictionary.Keyword,\r\n },\r\n ad: {\r\n title: dictionary.AdTitle || `{${i18n.getString('Ad_DSA_Title')}}`,\r\n },\r\n };\r\n } else {\r\n return {};\r\n }\r\n}\r\n\r\n// split error msg from MT\r\n// \"LabelIdInvalid\" => \"label id invalid\"\r\nfunction splitErrorMsg(errMsg = '') {\r\n const splitStr = errMsg.replace(/([A-Z])/g, ' $1').toLowerCase().trim();\r\n\r\n return splitStr.charAt(0).toUpperCase() + splitStr.slice(1);\r\n}\r\n\r\n// if an error message comes from MT, then split it.\r\nfunction normalizeErrorMsg(current = [], origin = []) {\r\n return current.map((msg) => {\r\n if (origin.includes(msg)) {\r\n return splitErrorMsg(msg);\r\n }\r\n return msg;\r\n });\r\n}\r\n\r\nexport function getStatusText(jobModel) {\r\n return (bulkEditResult) => {\r\n const errors = odataParser.mapEntityErrors(bulkEditResult);\r\n\r\n return {\r\n i18n,\r\n success: !bulkEditResult.HasError,\r\n errors: normalizeErrorMsg(errors, bulkEditResult.Errors || []),\r\n attemptedValue: i18n.getString('BulkEdit_HistoryJobDetails_Entity_AttemptedValue_V2', {\r\n attempted: odataParser.formatEntityValue(jobModel, bulkEditResult.Changes, true),\r\n }),\r\n };\r\n };\r\n}\r\n\r\nexport function getCopyPasteStatusText() {\r\n return (bulkEditResult) => {\r\n const errors = odataParser.mapEntityErrors(bulkEditResult);\r\n\r\n return {\r\n i18n,\r\n success: !bulkEditResult.HasError,\r\n errors: normalizeErrorMsg(errors, bulkEditResult.Errors || []),\r\n attemptedValue: null,\r\n };\r\n };\r\n}\r\n\r\nfunction getResultValue(bulkEditResult, isNew, jobModel, isCopyPaste, vnextInfo) {\r\n if ((isNew && bulkEditResult.HasError) || _.size(bulkEditResult.Changes) < 1) {\r\n return i18n.getString('BulkEdit_HistoryJobDetails_Entity_NoChange');\r\n } else {\r\n const result = odataParser.formatEntityValue(jobModel, bulkEditResult.Changes, isNew, bulkEditResult.EntityKey);\r\n\r\n if (_.isObject(result)) {\r\n const entityKeyField = getEntityKeyField(jobModel.get('Entity'));\r\n const dictionary = entityToObject(bulkEditResult.EntityKey);\r\n\r\n result.isForVnext = !!vnextInfo;\r\n\r\n if (_.isEmpty(dictionary.AdHeadlines)) {\r\n if (isCopyPaste) {\r\n if (entityKeyField && (entityKeyField !== entityKeyMap.Campaign && entityKeyField !== entityKeyMap.AdGroup)) {\r\n result.entityName = dictionary[entityKeyField];\r\n }\r\n } else {\r\n result.entityName = entityKeyField && dictionary[entityKeyField];\r\n }\r\n } else {\r\n result.entityName = getTitlePreviewFromJson(dictionary.AdHeadlines);\r\n }\r\n\r\n if (result.isForVnext) {\r\n if (result.campaignId) {\r\n result.campaignUrl = getUiNextCampaignLink(result.campaignId, vnextInfo.scope);\r\n result.campaignAriaLabel = i18n.getString('Click to scope to campaign {{campaignName}}', { campaignName: result.campaignName });\r\n }\r\n\r\n if (result.adGroupId) {\r\n result.adGroupUrl = getUiNextAdgroupLink({\r\n CampaignId: result.campaignId,\r\n AdGroupId: result.adGroupId,\r\n }, vnextInfo.scope);\r\n result.adGroupAriaLabel = i18n.getString('Click to scope to ad group {{adGroupName}}', { adGroupName: result.adGroupName });\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n}\r\n\r\nexport function getOldValue(jobModel, isCopyPaste = false, vnextInfo = undefined) {\r\n return _.partial(getResultValue, _, false, jobModel, isCopyPaste, vnextInfo);\r\n}\r\n\r\nexport function getNewValue(jobModel, isCopyPaste = false, vnextInfo = undefined) {\r\n return _.partial(getResultValue, _, true, jobModel, isCopyPaste, vnextInfo);\r\n}\r\n","import ko from 'knockout';\r\nimport koSchema from '@bingads-webui-component-legacy/ko-schema/index';\r\n\r\nexport default class ViewModel {\r\n constructor({isNewUI}) {\r\n koSchema.properties(this);\r\n\r\n this.dataLoaded = ko.observable(false);\r\n this.isNewUI = ko.observable(isNewUI);\r\n this.showHighLatencyAlert = ko.observable(false);\r\n this.hasStore = ko.observable(false);\r\n this.isStoreValid = ko.observable(false);\r\n this.showGoalRemoveAlert = ko.observable(false);\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport Promise from 'bluebird';\r\nimport _ from 'underscore';\r\nimport ko from 'knockout';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nimport * as httpUtils from '@bingads-webui/http-util';\r\nimport { applyRecommendations, dismissRecommendations } from '@bingads-webui-campaign/recommendation-repository';\r\nimport jsData from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport * as i18nErrors from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport state from '@bingads-webui-component-legacy/state/index';\r\nimport { queryify } from '@bingads-webui/url-util';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport CreateView from '@bingads-webui-campaign-legacy/crud-campaign/view/create';\r\nimport ViewModel from '@bingads-webui-campaign-legacy/campaign-settings/viewmodel/index';\r\nimport template from '@bingads-webui-campaign-legacy/campaign-settings/template/index.pug';\r\nimport edmCampaign from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport uiBlocker from '@bingads-webui-component-legacy/uiblocker/index';\r\nimport AdvancedSettingsView from '@bingads-webui-campaign-legacy/advanced-settings/view/advancedSettings';\r\nimport ShoppingSettingsView from '@bingads-webui-campaign-legacy/shopping-campaign/view/campaign-creation/shopping-settings';\r\nimport campaignType from '@bingads-webui-campaign-legacy/adgroup-create-advanced/util/campaignType';\r\nimport summaryDataContextManager from '@bingads-webui-static-legacy/summary/SummaryDataContextManager';\r\nimport * as scrollUtils from '@bingads-webui-component-legacy/extension/scrollTo';\r\nimport { shouldSupportCashbackSettings, logCampaignPersonalizedOffers } from '@bingads-webui-campaign/personalized-offer-shared';\r\nimport {\r\n AudienceAdvancedTargetSettings,\r\n AudienceTargetInfo,\r\n} from '@bingads-webui-campaign-legacy/audience-campaign/loader';\r\nimport { showIMAReachModal, getLocationsInfo } from '@bingads-webui-campaign-react/ima-reach-representation';\r\nimport { GoalSelectorView } from '@bingads-webui-campaign-react/goal-selector/src/view';\r\nimport decimal from '@bingads-webui-component-legacy/humanize/decimal';\r\nimport instrumentation from '@bingads-webui-campaign-legacy/instrumentation/index';\r\nimport { showBudgetBidCampaignNotifications } from '@bingads-webui-campaign/import-shared-utils';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\n\r\nconst backRouteName = 'campaign_adgroup';\r\n\r\nconst isEnabledDynamicFeedCampaign = pageContext && pageContext.Permissions && pageContext.Permissions.IsEnabledForDynamicFeedCampaign;\r\nconst isSponsoredPilotEnabled = pageContext && pageContext.Permissions && pageContext.Permissions.IsSPAv2Enabled;\r\nconst isCPGForBSCEnabled = pageContext && pageContext.Permissions && pageContext.Permissions.IsCPGForBSCEnabled;\r\nconst isBSCSmartImportEnabled = pageContext && pageContext.Permissions && pageContext.Permissions.IsBSCSmartImportEnabled;\r\nconst isPredictiveMatchingEnabled = pageContext && pageContext.Permissions && pageContext.Permissions.dynamic.PredictiveMatching;\r\n\r\nexport default class View extends Backbone.View {\r\n initialize(options = {}) {\r\n this.options = options;\r\n if (options.perfMarker) {\r\n this.campaignScopeAllSettingsPerfMarker = options.perfMarker.createChild('CampaignScope_AllSettings_EditCampaign');\r\n }\r\n\r\n if (campaignType() != null) {\r\n this.scenario = instrumentation[`${campaignType()}CampaignEdit`].create();\r\n this.activity = this.scenario[`${campaignType()}CampaignEdit`].create();\r\n }\r\n\r\n this.mark('willInit');\r\n const router = _.chain(options.deps).result('router', {}).value();\r\n\r\n this.navigateToRoute = router.navigateToRoute || _.noop;\r\n this.isNewUI = _.result(options.deps, 'isNewUI', false);\r\n\r\n this.viewModel = new ViewModel({ isNewUI: this.isNewUI });\r\n this.isMMAForRetailEnabled = pageContext.Permissions.IsMMAForRetailEnabled;\r\n const dynamicPermissions = _.result(pageContext.Permissions, 'dynamic', {});\r\n\r\n this.showDisclaimerBanner = _.result(dynamicPermissions, 'AgeGenderDisclaimer', false);\r\n this.ccJsData = options.ccJsData;\r\n this.serverContext = options.serverContext;\r\n this.scope = options.scope;\r\n }\r\n\r\n\r\n get events() {\r\n return {\r\n 'click .btn-save': 'checkIMAReachAndSave',\r\n 'click .btn-cancel': 'cancel',\r\n };\r\n }\r\n\r\n isNotAudienceCampaign() {\r\n return campaignType() !== 'audience';\r\n }\r\n\r\n renderAdvancedSettings(campaign) {\r\n this.advancedSettingsView = new AdvancedSettingsView({\r\n campaignId: this.options.campaignId,\r\n scenario: 'campaign-settings',\r\n level: 'campaign',\r\n model: campaign,\r\n nativeAdsCampaignBid: campaign.NativeBidAdjustment,\r\n multimediaAdsCampaignBid: campaign.MultiMediaAdBidAdjustment,\r\n TimeZone: campaign.TimeZone,\r\n campaignType: campaign.CampaignType ? campaign.CampaignType : campaignType(),\r\n supportCashbackSettings: shouldSupportCashbackSettings(campaign, pageContext.Permissions),\r\n newI18n: this.options.deps.i18nNewDesign,\r\n activityLogger: this.activity,\r\n });\r\n this.$('.advanced-settings-section').html(this.advancedSettingsView.render().el);\r\n }\r\n\r\n checkIfStoreValid(data) {\r\n const providerId = _.result(this.setting, 'ProviderId');\r\n\r\n return _.some(data.ProductCollectionAccounts, (store) => Number(store.Value) === providerId);\r\n }\r\n\r\n renderShoppingSettings(data) {\r\n this.isAudienceDynamicFeedBasedCampaign = this.campaign.CampaignType === 'Audience' && this.campaign.CampaignSubType === 'AudienceDynamicFeedBased';\r\n this.isSponsoredCampaign = (isSponsoredPilotEnabled && config.get('CampaignObjective') === 'SponsoredShoppingCampaign') || this.campaign.CampaignSubType === 'ShoppingSponsoredProductAd';\r\n this.editMode = _.isFinite(this.options.campaignId);\r\n this.shouldShowPlaceholderStoreIfExists = isBSCSmartImportEnabled && this.editMode;\r\n this.campaignProductScopeId = data.CampaignCriterionsData && data.CampaignCriterionsData.Id;\r\n\r\n const hasAnyStores = (!_.isEmpty(data) && !_.isEmpty(data.ProductCollectionAccounts)) ||\r\n (isEnabledDynamicFeedCampaign && this.isAudienceDynamicFeedBasedCampaign);\r\n\r\n if (hasAnyStores && isSponsoredPilotEnabled) {\r\n if (this.isSponsoredCampaign) {\r\n this.viewModel.hasStore(this.editMode || _.findIndex(data.ProductCollectionAccounts, (item) => item.IsGlobalStore || item.IsCoOpStore) >= 0);\r\n } else {\r\n this.viewModel.hasStore(this.editMode || _.findIndex(data.ProductCollectionAccounts, (item) => !item.IsGlobalStore && !item.IsCoOpStore) >= 0);\r\n }\r\n } else {\r\n this.viewModel.hasStore(hasAnyStores);\r\n }\r\n\r\n let isStoreValid = isCPGForBSCEnabled && this.editMode ? this.checkIfStoreValid(data) : true; // eslint-disable-line newline-after-var\r\n if (isEnabledDynamicFeedCampaign && this.isAudienceDynamicFeedBasedCampaign && this.editMode) {\r\n isStoreValid = true;\r\n }\r\n this.viewModel.isStoreValid(isStoreValid);\r\n\r\n if (this.viewModel.hasStore()) {\r\n data.ProductCollectionAccounts = [{\r\n Text: i18n.get('ShoppingCampaign_ShoppingSetting_DefaultStore'),\r\n Value: -1,\r\n IsCoOpStore: false,\r\n }, ...data.ProductCollectionAccounts];\r\n this.shoppingSettingsView = new ShoppingSettingsView({\r\n data,\r\n model: this.setting,\r\n campaignType: this.campaign.CampaignType,\r\n campaignSubType: this.campaign.CampaignSubType,\r\n campaignId: _.result(this.campaign, 'Id'),\r\n isStoreValid: this.viewModel.isStoreValid(),\r\n activityLogger: this.editMode ? undefined : this.activity,\r\n isSponsoredSettings: { isSponsoredCampaign: this.isSponsoredCampaign, isSponsoredPilotEnabled },\r\n shouldShowPlaceholderStoreIfExists: this.shouldShowPlaceholderStoreIfExists,\r\n deps: this.options.deps,\r\n isSearchCampaign: this.campaign.campaignType === 'Default',\r\n isMMAForRetailWorkflow: true,\r\n ccJsData: this.ccJsData,\r\n }).render();\r\n this.$('.shopping-settings').append(this.shoppingSettingsView.$el);\r\n } else if (!this.editMode) {\r\n this.activity.signal('have no store', this.scenario);\r\n }\r\n }\r\n\r\n getProductData(campaignId) {\r\n let url = queryify('/Campaign/NewCampaign/GetProductScope', {\r\n aid: state.get('account_id'),\r\n cid: state.get('customer_id'),\r\n uid: state.get('user_id'),\r\n });\r\n // We shouldn't cache the response when showing placeholder stores.\r\n // If we do, there will be a bug when the user goes from campaign settings to creation.\r\n // The bug will be that the user sees draft stores in campaign creation since it reads from cache.\r\n let bypassCache = this.shouldShowPlaceholderStoreIfExists;\r\n let cacheResponse = !this.shouldShowPlaceholderStoreIfExists;\r\n\r\n if (campaignId) {\r\n let urlQueryStringObject = {\r\n campaignId,\r\n // salesCountry: \"US\",\r\n };\r\n\r\n url = queryify(url, urlQueryStringObject);\r\n\r\n if (this.shouldShowPlaceholderStoreIfExists) {\r\n url = `${url}&storeTypes=placeholder`;\r\n }\r\n\r\n bypassCache = true;\r\n cacheResponse = false;\r\n }\r\n\r\n const params = {\r\n url,\r\n adapter: 'legacy',\r\n bypassCache,\r\n cacheResponse,\r\n };\r\n\r\n return jsData.Product.find('MetaData', params);\r\n }\r\n\r\n renderCampaignTargets(campaign) {\r\n if (!this.isNotAudienceCampaign()) {\r\n return Promise.resolve();\r\n }\r\n const audienceTargetInfo = new AudienceTargetInfo({\r\n resourceName: 'CampaignCriterion',\r\n listenToLocationCriterion: false,\r\n initAudienceAssociationView: false,\r\n });\r\n\r\n const loadCriterionsTask = audienceTargetInfo.fetchCriterions(campaign.Id).then(() => {\r\n this.campaignTargetsView = new AudienceAdvancedTargetSettings({\r\n viewContext: {\r\n accountCurrencyCode: pageContext.AccountCurrencyCode,\r\n currentCampaign: campaign,\r\n level: 'campaign',\r\n },\r\n scenario: 'campaign-settings',\r\n currentLevelTargetInfo: audienceTargetInfo,\r\n supportCashbackSettings: shouldSupportCashbackSettings(campaign, pageContext.Permissions),\r\n });\r\n this.$('.campaign-targets').append(this.campaignTargetsView.render().el);\r\n\r\n return Promise.resolve(_.result(this.createView, 'locationTargetsPromise'));\r\n }).then(() => {\r\n if (_.has(this.createView, 'locationTargetsView')) {\r\n this.campaignTargetsView.$('.location-setting-controller').append(this.createView.locationTargetsView.render().el);\r\n\r\n return this.createView.locationTargetsView.initialLoadTask;\r\n }\r\n\r\n return null;\r\n });\r\n\r\n const loadBudgetTask = _.result(this.createView.budget, 'initialLoadTask');\r\n\r\n return Promise.all([\r\n loadCriterionsTask,\r\n loadBudgetTask,\r\n ]);\r\n }\r\n\r\n renderConversionGoalSelection(campaign) {\r\n // CPG and SPA Campaign:\r\n const isSPA = campaign.CampaignSubType === 'ShoppingSponsoredProductAd';\r\n // Cashback CPS Campaign:\r\n const isCPS = campaign.CampaignCashback != null &&\r\n (campaign.CampaignCashback.PersonalizedOffersEnabled === true ||\r\n campaign.CampaignCashback.MonthlyBudget > 0);\r\n\r\n const isSelectorEnabled = !isSPA && !isCPS;\r\n\r\n if (isSelectorEnabled) {\r\n this.goalSelectionView = new GoalSelectorView({\r\n i18n: i18n.realI18n,\r\n pageSize: 10,\r\n isMultiMode: true,\r\n isHideSaveBar: true,\r\n campaign,\r\n jsdata: jsData,\r\n state,\r\n turnOnRemoveAlert: (shouldShowWarning) => {\r\n this.viewModel.showGoalRemoveAlert(shouldShowWarning);\r\n },\r\n });\r\n this.$('.conversion-goal-selection').empty().html(this.goalSelectionView.render().el);\r\n } else {\r\n this.$('.conversion-goal-section').empty();\r\n }\r\n }\r\n\r\n onEnablePersonalizedOfferCheckboxChange(checked) {\r\n this.campaignTargetsView.toggleCashbackPercentColumns(checked);\r\n if (this.createView.locationTargetsView) {\r\n this.createView.locationTargetsView.toggleCashbackPercentColumns(checked);\r\n }\r\n if (this.advancedSettingsView.adScheduleView) {\r\n this.advancedSettingsView.adScheduleView.toggleCashbackPercentColumns(checked);\r\n }\r\n }\r\n\r\n onCashbackPercentChange(value) {\r\n if (this.createView.cashbackSettingsView.viewModel.validateCashbackPercent(value)) {\r\n const formattedValue = value === '' || value == null ? null : decimal.fromLocalToFloat(value);\r\n\r\n if (this.campaignTargetsView) {\r\n this.campaignTargetsView.toggleCashbackPercentColumns(true, {\r\n level: 'Campaign',\r\n value: formattedValue,\r\n });\r\n }\r\n\r\n if (this.createView.locationTargetsView) {\r\n this.createView.locationTargetsView.toggleCashbackPercentColumns(true, {\r\n level: 'Campaign',\r\n value: formattedValue,\r\n });\r\n }\r\n\r\n if (this.advancedSettingsView && this.advancedSettingsView.adScheduleView) {\r\n this.advancedSettingsView.adScheduleView.toggleCashbackPercentColumns(true, {\r\n level: 'Campaign',\r\n value: formattedValue,\r\n });\r\n }\r\n }\r\n }\r\n\r\n render() {\r\n this.$el.append(template({\r\n i18n,\r\n title: _.result(pageContext.CurrentCampaign, 'ExperimentId') > 0 ? i18n.get('SectionTitle_ExperimentSettings') : i18n.get('SectionTitle_CampaignSettings'),\r\n isNotAudienceCampaign: this.isNotAudienceCampaign(),\r\n isMMAForRetailEnabled: this.isMMAForRetailEnabled,\r\n isShowDisclaimerBannerEnabled: this.showDisclaimerBanner,\r\n }));\r\n ko.applyBindings(this.viewModel, this.el);\r\n\r\n let params = {\r\n queryParameters: {\r\n entitySet: edmCampaign.currentAccount.Campaigns,\r\n expand: ['Budget', 'CampaignConversionGoal/Goals'],\r\n },\r\n bypassCache: true,\r\n };\r\n\r\n this.mark('willFetchData');\r\n this.hideUIBlocker = uiBlocker(this.$el);\r\n jsData.Campaign.find(Number(this.options.campaignId), params)\r\n .then((data) => {\r\n this.campaign = data;\r\n this.setting = _.first(this.campaign.CampaignSettings) || {};\r\n this.mark('willRender');\r\n\r\n this.createView = new CreateView(_.extend(data, {\r\n scenario: 'campaign-settings',\r\n showLanguage: data.CampaignType === 'Default', // data.CampaignType !== 'shopping'? need to confirm with feature owner\r\n popupIds: { Location: 'pop_BA_Settings_LocationTargeting' },\r\n showInitialUiBlocker: !this.isNotAudienceCampaign(),\r\n deps: this.options.deps,\r\n usePanel: this.isNewUI,\r\n campaignType: data.CampaignType,\r\n campaignSubType: data.CampaignSubType,\r\n isForVNext: this.isNewUI,\r\n activityLogger: this.activity,\r\n serverContext: this.serverContext,\r\n scope: this.scope,\r\n }));\r\n\r\n this.supportCashbackSettings = shouldSupportCashbackSettings(data, pageContext.Permissions);\r\n\r\n this.$('.campaign-update').append(this.createView.render().el);\r\n\r\n this.viewModel.dataLoaded(true);\r\n\r\n this.renderAdvancedSettings(data);\r\n\r\n this.renderConversionGoalSelection(data);\r\n\r\n if (this.createView.cashbackSettingsView) {\r\n this.createView.cashbackSettingsView.viewModel.isEnablePersonalizedOffersChecked.subscribe((checked) => {\r\n this.onEnablePersonalizedOfferCheckboxChange(checked);\r\n });\r\n\r\n this.createView.cashbackSettingsView.viewModel.CashbackPercent.subscribe((value) => {\r\n this.onCashbackPercentChange(value);\r\n });\r\n }\r\n\r\n this.createView.biddingStrategyView.viewModel.selectedBidStrategy.subscribe((value) => {\r\n this.advancedSettingsView.onSelectedBidStrategyChange(value);\r\n });\r\n return this.renderCampaignTargets(data);\r\n })\r\n .then(() => {\r\n if (this.isMMAForRetailEnabled) {\r\n return Promise.resolve(this.getProductData(this.options.campaignId)\r\n .then((data) => {\r\n this.renderShoppingSettings(data);\r\n }));\r\n }\r\n\r\n return Promise.resolve();\r\n })\r\n .catch(({ errors } = {}) => {\r\n this.viewModel.errors.add(_.isEmpty(errors) ? undefined : i18nErrors.getODataErrors(errors));\r\n })\r\n .finally(() => {\r\n this.hideUIBlocker();\r\n this.mark('done');\r\n });\r\n\r\n return this;\r\n }\r\n\r\n clearApiErrors() {\r\n this.advancedSettingsView.clearApiErrors();\r\n }\r\n\r\n validate() {\r\n return _.reduce([\r\n this.createView.validate(),\r\n this.advancedSettingsView.validate(),\r\n this.shoppingSettingsView ? this.shoppingSettingsView.validate() : true,\r\n this.campaignTargetsView ? this.campaignTargetsView.validate() : true,\r\n ], (memo, val) => {\r\n return memo && val;\r\n }, true);\r\n }\r\n\r\n destroyProductScoeIfNeed() {\r\n if (this.campaignProductScopeId && !this.shoppingSettingsView.hasFilteredProducts()) {\r\n jsData.CampaignProductScope.destroy(this.campaignProductScopeId, { adapter: 'bulk', parentId: this.campaign.Id });\r\n }\r\n }\r\n\r\n getParams() {\r\n let params = this.createView.getData();\r\n let advancedSettingsValues = this.advancedSettingsView.getValues();\r\n\r\n if (isPredictiveMatchingEnabled) {\r\n params.AutoTargetingEnabled = advancedSettingsValues.AutoTargetingEnabled || false;\r\n }\r\n\r\n let targets = advancedSettingsValues.deviceTargets\r\n .concat(advancedSettingsValues.ageTargets)\r\n .concat(advancedSettingsValues.genderTargets)\r\n .concat(advancedSettingsValues.scheduling);\r\n\r\n _.each(targets, (criterion) => {\r\n criterion.Status = _.isEmpty(criterion.Status) ? 'Active' : criterion.Status;\r\n criterion.Campaign = {\r\n Id: params.Id,\r\n };\r\n });\r\n\r\n if (this.shoppingSettingsView) {\r\n if (this.shoppingSettingsView.viewModel.hasValidStore()) {\r\n _.extend(params, this.shoppingSettingsView.viewModel.toObject(), {\r\n CampaignType: this.campaign.CampaignType,\r\n });\r\n\r\n // This is for MMA for Retail, only edit mode\r\n if (this.shoppingSettingsView.isFeedProductFilterEnabled) {\r\n if (!this.shoppingSettingsView.viewModel.isFeedFilterChecked()) {\r\n // choose neither feed label nor sales country\r\n params = _.omit(params, 'SalesCountry');\r\n params = _.omit(params, 'FeedLabel');\r\n } else if (params.FeedLabel && params.FeedLabel.length > 0) {\r\n params = _.omit(params, 'SalesCountry');\r\n } else {\r\n params = _.omit(params, 'FeedLabel');\r\n }\r\n if (this.editMode) {\r\n if (!params.SalesCountry) {\r\n params.SalesCountry = 'delete_value';\r\n }\r\n if (!params.FeedLabel) {\r\n params.FeedLabel = 'delete_value';\r\n }\r\n }\r\n }\r\n\r\n if (this.shoppingSettingsView.hasFilteredProducts()) {\r\n params.CampaignProductScope = _.defaults(this.shoppingSettingsView.getProductScope(), {\r\n CampaignName: params.Name,\r\n });\r\n\r\n if (this.campaignProductScopeId) {\r\n params.CampaignProductScope.Id = this.campaignProductScopeId;\r\n }\r\n }\r\n } else {\r\n _.extend(params, this.shoppingSettingsView.viewModel.toObject(), {\r\n ProviderId: 'delete_value',\r\n SalesCountry: 'delete_value',\r\n });\r\n }\r\n }\r\n\r\n const campaignTargetsData = this.campaignTargetsView && this.campaignTargetsView.getData();\r\n const campaignTargetsCriterions = _.result(campaignTargetsData, 'CampaignCriterions', []);\r\n\r\n params.CampaignCriterions = _.union(params.CampaignCriterions, targets, campaignTargetsCriterions);\r\n\r\n _.extend(params,\r\n advancedSettingsValues.urlOptions,\r\n advancedSettingsValues.nativeAds,\r\n advancedSettingsValues.multimediaAds,\r\n advancedSettingsValues.automatedCTA,\r\n advancedSettingsValues.vanityUrlSettings,\r\n );\r\n\r\n if (_.isBoolean(advancedSettingsValues.adScheduleUseSearcherTimeZone)) {\r\n params.AdScheduleUseSearcherTimeZone = advancedSettingsValues.adScheduleUseSearcherTimeZone;\r\n }\r\n\r\n if (this.goalSelectionView) {\r\n params.CampaignConversionGoalAssociations =\r\n this.goalSelectionView.convertToMTFormat(params.Id);\r\n }\r\n return params;\r\n }\r\n\r\n getAllLocationCriterions() {\r\n const allLocations = this.createView.getAllLocations();\r\n const campaignTargetsData = (this.campaignTargetsView && this.campaignTargetsView.getAllLocations()) || [];\r\n\r\n return _.union(allLocations, campaignTargetsData);\r\n }\r\n\r\n\r\n checkIMAReachAndSave() {\r\n let checkIMAReachPromise = Promise.resolve(false);\r\n\r\n if (!this.validate()) {\r\n return;\r\n }\r\n\r\n this.clearApiErrors();\r\n\r\n const params = this.getParams();\r\n\r\n const changedLocationCriterions = params && params.CampaignCriterions && _.filter(params.CampaignCriterions, (item) =>\r\n item && (item.CriterionType === 'Location' || item.CriterionType === 'Radius'));\r\n\r\n const hasLocationChanged = changedLocationCriterions && changedLocationCriterions.length > 0;\r\n\r\n let locationCriterions = this.getAllLocationCriterions();\r\n\r\n locationCriterions = _.filter(locationCriterions, (c) => c.Status !== 'Deleted');\r\n\r\n if (hasLocationChanged && pageContext.Permissions.IsIMAReachRepresentationPhase1Enabled && this.isNewUI && locationCriterions.length > 0) {\r\n const onYes = () => this.save();\r\n const locationsInfo = getLocationsInfo(locationCriterions);\r\n\r\n checkIMAReachPromise = showIMAReachModal({\r\n locationsInfo,\r\n onYes,\r\n deliveryChannel: campaignType() === 'audience' ? 'AIM' : 'BingAds',\r\n campaignId: this.options.campaignId,\r\n i18n,\r\n aid: pageContext.CurrentAccount.Id,\r\n cid: pageContext.CurrentAccount.AdvertiserCustomerID,\r\n });\r\n }\r\n\r\n checkIMAReachPromise.then((isIMAReachModalShow) => {\r\n if (isIMAReachModalShow) {\r\n return;\r\n }\r\n this.save();\r\n });\r\n }\r\n\r\n save() {\r\n if (!this.validate()) {\r\n return;\r\n }\r\n\r\n this.clearApiErrors();\r\n const params = this.getParams();\r\n const highLantencyThreshold = 3000;\r\n\r\n if (_.size(params.CampaignCriterions) > highLantencyThreshold) {\r\n this.viewModel.showHighLatencyAlert(true);\r\n }\r\n\r\n const batchSize = 1000;\r\n const chunks = _.chain(params.CampaignCriterions)\r\n .groupBy((value, index) => Math.floor(index / batchSize))\r\n .toArray()\r\n .value();\r\n let reqs = _.map(chunks, (batch) => ({\r\n Id: params.Id,\r\n data: _.extend({}, params, { CampaignCriterions: batch }),\r\n }));\r\n\r\n if (reqs.length === 0) {\r\n reqs = [{\r\n Id: params.Id,\r\n data: params,\r\n }];\r\n }\r\n const batchedParams = {\r\n reqs,\r\n };\r\n const mergeCampaignCriterions = (responses) => {\r\n const mergedCampaignCriterions = _.reduce(responses, (dest, res) => dest.concat(res.CampaignCriterions), []);\r\n\r\n return _.extend({}, _.first(responses), { CampaignCriterions: mergedCampaignCriterions });\r\n };\r\n\r\n\r\n jsData.Campaign\r\n .update(params.Id, batchedParams, { adapter: 'bulk', cacheResponse: false, overrideResponse: true, batch: true, processResponse: mergeCampaignCriterions })\r\n .then((response) => {\r\n //we backfill advanced settings models here, so we have correct model if the saveExtensions call fails.\r\n const { activity } = instrumentation.createScenarioAndActivity({\r\n scenarioName: 'BudgetBidCampaignImportNotification',\r\n activityName: 'SearchCampaignSettingPage',\r\n });\r\n\r\n showBudgetBidCampaignNotifications({\r\n campaignItemList: [this.campaign],\r\n oldBudget: this.campaign.Budget,\r\n newBudget: params.Budget,\r\n oldBidStrategy: this.campaign.BiddingScheme,\r\n newBidStrategy: params.BiddingScheme,\r\n activity,\r\n });\r\n this.advancedSettingsView.setData(response);\r\n logCampaignPersonalizedOffers(this.createView.cashbackSettingsView, this.activity.signal.bind(this.activity), params);\r\n return this.advancedSettingsView.exclusionsUpdated() ? this.advancedSettingsView.saveExtensions() : {};\r\n })\r\n .then(() => {\r\n return this.createView.saveTargetingSource(params.Id);\r\n }).then(() => {\r\n return this.destroyProductScoeIfNeed();\r\n }).then(() => {\r\n // These are the mappings for campaigns/updatesettings taken from SummaryGridsActionMap\r\n // Campaign name might appear in these grids, and changing a shared budget association\r\n // might affect the budget status in these grids, so the cache needs to be invalidated here.\r\n const contextsToUpdate = [\r\n 'CampaignsGrid',\r\n 'AdGroupGrid',\r\n 'PagedAdGroupGrid',\r\n 'AdGrid',\r\n 'KeywordGrid',\r\n 'AudiencesAssociationGrid',\r\n 'SitePlacementGrid',\r\n 'CampaignsSettingsGrid',\r\n 'AccountAdExtensionsGrid',\r\n 'CampaignAdExtensionsGrid',\r\n 'AdGroupAdExtensionsGrid',\r\n 'ProductGroupsGrid',\r\n 'CampaignSelector',\r\n ];\r\n\r\n summaryDataContextManager.updateContext(contextsToUpdate);\r\n window.App.trigger('campaignUpdated', { data: [{ Id: Number(params.Id), Name: params.Name, Budget: params.Budget }] });\r\n if (params && params.Budget && params.Budget.Amount && this.campaign && this.campaign.Budget && this.campaign.Budget.Amount) {\r\n if (this.campaign.Budget.Amount >= 0.1 && params.Budget.Amount < (this.campaign.Budget.Amount * 0.5).toFixed(2)) {\r\n this.activity.trace(`Bid${params.Budget.Amount} Less than 50% of current budget${this.campaign.Budget.Amount}`);\r\n }\r\n }\r\n const { CurrentCampaign: currentCampaign } = pageContext;\r\n\r\n const permissions = config.get('Permissions');\r\n const isDSAMixedModeCampaignEnabled = _.result(permissions, 'IsDSAMixedModeCampaignEnabled', false);\r\n\r\n // update DSA settings to current campaign\r\n // so that the summary tab can be updated correctly\r\n if (isDSAMixedModeCampaignEnabled && !this.isNewUI && params.DomainName) {\r\n currentCampaign.CampaignSettings = [{\r\n DomainName: params.DomainName,\r\n Source: params.Source,\r\n Language: params.LanguageCode,\r\n DynamicDescriptionEnabled: params.DynamicDescriptionEnabled,\r\n }];\r\n window.App.state.trigger('change:campaign_id');\r\n }\r\n // eslint-disable-next-line camelcase\r\n this.navigateToRoute(backRouteName, { campaign_id: params.Id });\r\n }).then(() => {\r\n const tasks = [];\r\n const {\r\n targetedLocationRecommendations,\r\n dismissedLocationRecommendations,\r\n } = this.createView.getLocationRecommendationsStatus();\r\n const deps = {\r\n httpUtils,\r\n odataOptions: {\r\n host: pageContext.BingAdsAdInsightWebApiUri,\r\n oDataToken: pageContext.Token,\r\n SessionId: _.result(config.get('Omniture'), 'SessionId'),\r\n params: {\r\n 'customer_id': state.get('advertisercustomer_id'),\r\n 'account_id': state.get('account_id'),\r\n },\r\n },\r\n };\r\n const scope = {\r\n customerId: state.get('advertisercustomer_id'),\r\n accountId: state.get('account_id'),\r\n campaignId: params.Id,\r\n };\r\n const recommendationType = 'NewLocationTargetOpportunity';\r\n const channel = 'campaignsetting';\r\n\r\n if (!_.isEmpty(targetedLocationRecommendations)) {\r\n tasks.push(applyRecommendations({\r\n deps,\r\n scope,\r\n recommendations: targetedLocationRecommendations,\r\n recommendationType,\r\n channel,\r\n }));\r\n }\r\n\r\n if (!_.isEmpty(dismissedLocationRecommendations)) {\r\n tasks.push(dismissRecommendations({\r\n deps,\r\n scope,\r\n recommendations: dismissedLocationRecommendations,\r\n recommendationType,\r\n channel,\r\n }));\r\n }\r\n\r\n return Promise.all(tasks);\r\n }).catch((response) => {\r\n this.handleApiErrors(response);\r\n }).finally(uiBlocker(this.$el));\r\n }\r\n\r\n handleApiErrors(response) {\r\n if (_.isUndefined(response) || _.isNull(response)) {\r\n this.viewModel.errors.add();\r\n return;\r\n }\r\n\r\n if (response.errors && !response.entity) {\r\n //Ajax error [400] - RowCountExceeded\r\n this.viewModel.errors.add(i18nErrors.getODataErrors(response.errors));\r\n return;\r\n }\r\n\r\n if (response === 'exclusion error') {\r\n return;\r\n }\r\n\r\n if (response.errors) {\r\n const processItems = ['CampaignCriterions'].concat(response.entity.hasOwnProperty('AdExtensionAssociations') ? ['AdExtensionAssociations'] : []);\r\n\r\n i18nErrors.getPartial(response, processItems);\r\n\r\n let errors = [];\r\n\r\n if (!_.isEmpty(response.entity.errors)) {\r\n errors = errors.concat(response.entity.errors);\r\n }\r\n\r\n // Add all subentity's errors.\r\n _.each(processItems, (item) => {\r\n if (_.isArray(response.entity[item])) {\r\n _.each(response.entity[item], (subEntity) => {\r\n if (!_.isEmpty(subEntity.errors)) {\r\n errors = errors.concat(subEntity.errors);\r\n }\r\n });\r\n } else if (!_.isEmpty(response.entity[item].errors)) {\r\n errors = errors.concat(response.entity[item].errors);\r\n }\r\n });\r\n\r\n let campaignErrors = _.reject(errors, (error) => {\r\n return _.contains(['TrackingUrlTemplate', 'UrlCustomParameters'], error.property);\r\n });\r\n\r\n this.createView.handleApiErrors(campaignErrors || []);\r\n\r\n // should always handle the errors for sub controls since the exsisting campaign id is there\r\n // and campaign level error should not result in sub control's error\r\n this.advancedSettingsView.setData(response);\r\n this.advancedSettingsView.handleErrors(response);\r\n } else {\r\n this.viewModel.errors.add();\r\n }\r\n\r\n this.scrollToErrors();\r\n }\r\n\r\n errorElements() {\r\n return this.$('.campaign-settings__container .error, .campaign-settings__container .alert-danger').filter(':visible');\r\n }\r\n\r\n scrollToErrors() {\r\n scrollUtils.scrollAndCenter(this.errorElements());\r\n }\r\n\r\n cancel() {\r\n // eslint-disable-next-line camelcase\r\n this.navigateToRoute(backRouteName, { campaign_id: this.options.campaignId });\r\n }\r\n\r\n remove() {\r\n if (this.createView) {\r\n this.createView.remove();\r\n }\r\n if (this.advancedSettingsView) {\r\n this.advancedSettingsView.remove();\r\n }\r\n if (this.campaignTargetsView) {\r\n this.campaignTargetsView.remove();\r\n }\r\n if (this.campaignGoalSeletorView) {\r\n this.campaignGoalSeletorView.remove();\r\n }\r\n if (this.goalSelectionView) {\r\n this.goalSelectionView.remove();\r\n }\r\n super.remove();\r\n }\r\n\r\n mark(perfMarkerEvent) {\r\n if (this.campaignScopeAllSettingsPerfMarker) {\r\n this.campaignScopeAllSettingsPerfMarker[perfMarkerEvent]();\r\n }\r\n }\r\n}\r\n\r\n","// import _ from 'underscore';\r\nimport Backbone from 'backbone';\r\nimport _ from 'underscore';\r\nimport template from '@bingads-webui-campaign-legacy/campaign-targeting/template/campaign-targeting.pug';\r\nimport LocationTargetsView from '@bingads-webui-campaign-legacy/location-targets/view/locationTargets';\r\nimport AdScheduleView from '@bingads-webui-campaign-legacy/ad-schedule/view/index';\r\nimport timeZoneMapper from '@bingads-webui-component-legacy/timezonemapper/index';\r\nimport { cloneDeep } from '@bingads-webui-universal/primitive-utilities';\r\nimport * as criterionLoader from '@bingads-webui-campaign-legacy/base-targets/util/criterionLoader';\r\nimport withUiBlock from '@bingads-webui-component-legacy/uiblocker/index';\r\nimport targetOptions from '@bingads-webui-campaign-legacy/location-targets/viewmodel/targetOptions';\r\nimport adSchedulingOptions from '@bingads-webui-campaign-legacy/ad-schedule/viewmodel/options';\r\n\r\nconst i18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/campaign-creation-advanced');\r\n\r\nconst defaultOptions = {\r\n model: {\r\n locationTargets: {},\r\n adScheduleModel: {},\r\n },\r\n showDateSettings: true,\r\n needRestore: false,\r\n};\r\n\r\nexport default class View extends Backbone.View {\r\n initialize(options) {\r\n this.options = _.defaults(options, defaultOptions);\r\n this.eventDelegator = options.deps.eventDelegator;\r\n this.template = template;\r\n }\r\n\r\n render() {\r\n const { $el } = this;\r\n\r\n $el.html(this.template({\r\n i18n,\r\n }));\r\n if (this.options.campaignId) {\r\n criterionLoader.load(this.options.campaignId, '', ['DayTimeCriterion'])\r\n .then((campaignTargets) => {\r\n const formattedDayTimeRanges = this.formatLoadedCriterions(campaignTargets);\r\n\r\n this.renderSubViews(formattedDayTimeRanges, this.options.campaignId);\r\n })\r\n .finally(withUiBlock(this.el));\r\n } else {\r\n const { adScheduleModel = {} } = this.options.model || {};\r\n const { dayTimeRanges = [] } = adScheduleModel;\r\n\r\n this.renderSubViews(dayTimeRanges);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n renderSubViews(dayTimeRanges = [], campaignId) {\r\n const { $el } = this;\r\n\r\n this.locationTargetsView = this.renderLocationTargetsView(campaignId);\r\n\r\n this.adScheduleView = this.renderAdScheduleView(dayTimeRanges);\r\n $el.find('.location-targets-container').empty().append(this.locationTargetsView.$el);\r\n $el.find('.ad-schedule').empty().append(this.adScheduleView.$el);\r\n return this;\r\n }\r\n\r\n formatLoadedCriterions(criterions) {\r\n return criterions.map((criterion) => {\r\n return {\r\n Id: String(criterion.Id),\r\n CriterionType: 'DayTime',\r\n campaignName: this.campaignName,\r\n Status: 'Active',\r\n Criterion: {\r\n Type: 'DayTime',\r\n BidAdjustment: 0,\r\n OriginalBidAdjustment: 0,\r\n DayTimeCriterion: criterion.Criterion,\r\n },\r\n };\r\n });\r\n }\r\n\r\n remove(...args) {\r\n this.locationTargetsView.remove(...args);\r\n this.adScheduleView.remove(...args);\r\n super.remove(...args);\r\n }\r\n\r\n renderLocationTargetsView(campaignId) {\r\n const locationTargetsView = new LocationTargetsView({\r\n scenario: 'smart-shopping-campaign',\r\n level: 'campaign',\r\n hideAudience: true,\r\n showInitialUiBlocker: false,\r\n campaignId,\r\n deps: {\r\n eventDelegator: this.eventDelegator,\r\n },\r\n }).render();\r\n\r\n if (campaignId == null) {\r\n locationTargetsView.setLocationData([], 'campaign', false, false);\r\n const existingLocations = (this.options.model &&\r\n this.options.model.locationTargets &&\r\n this.options.model.locationTargets.locations) || [];\r\n\r\n // restore previous selected criterions\r\n if (this.options.needRestore) {\r\n locationTargetsView.setLocationData(existingLocations, 'campaign', false, true, true);\r\n } else { // always check default market option if there is no criterion selected\r\n locationTargetsView.viewmodel.targetOption(targetOptions.bundleOrDefaultMarket);\r\n }\r\n }\r\n\r\n return locationTargetsView;\r\n }\r\n\r\n parseDate(dateString) {\r\n if (dateString == null) {\r\n return null;\r\n }\r\n const splits = dateString.split('/');\r\n const month = splits[0];\r\n const day = splits[1];\r\n const year = splits[2];\r\n\r\n return `${year}-${month.length === 1 ? `0${month}` : month}-${day.length === 1 ? `0${day}` : day}`;\r\n }\r\n\r\n formatSchedulingRows(adDayTimeRanges = []) {\r\n let schedulingRows = [];\r\n\r\n _.each(adDayTimeRanges, (target) => {\r\n let criterion = target.Criterion.DayTimeCriterion;\r\n\r\n schedulingRows.push({\r\n Id: target.Id,\r\n Day: criterion.Day,\r\n StartHour: criterion.FromHour,\r\n StartMinute: typeof criterion.FromMinute === 'string' ? criterion.FromMinute : adSchedulingOptions.minuteToReadMap[criterion.FromMinute],\r\n EndHour: criterion.ToHour,\r\n EndMinute: typeof criterion.ToMinute === 'string' ? criterion.ToMinute : adSchedulingOptions.minuteToReadMap[criterion.ToMinute],\r\n });\r\n });\r\n\r\n return schedulingRows;\r\n }\r\n\r\n renderAdScheduleView(dayTimeRanges) {\r\n const { model, adgroupId, showDateSettings = true } = this.options;\r\n\r\n let adScheduleModel = model && model.adScheduleModel ? model.adScheduleModel : {};\r\n\r\n if (!showDateSettings) {\r\n adScheduleModel = _.omit(adScheduleModel, ['startDate', 'endDate']);\r\n }\r\n\r\n const formatModel = _.extend({}, adScheduleModel, {\r\n startDate: this.parseDate(adScheduleModel.startDate),\r\n endDate: this.parseDate(adScheduleModel.endDate),\r\n adScheduleUseSearcherTimeZone: adScheduleModel.adScheduleUseSearcherTimeZone,\r\n adGroupStatus: adgroupId == null ? 'Draft' : null,\r\n dayTimeRanges: this.formatSchedulingRows(dayTimeRanges),\r\n });\r\n\r\n const adScheduleView = new AdScheduleView({\r\n showBidAdjustmentColumn: false,\r\n showDateSettings,\r\n model: formatModel,\r\n timeZone: timeZoneMapper.getAccountTimeZone(),\r\n isForVNext: this.options.isForVNext,\r\n }).render();\r\n\r\n return adScheduleView;\r\n }\r\n\r\n deletedDayTimeCb(deletedDayTimeCriterions) {\r\n const currentCampaignId = this.options.campaignId;\r\n\r\n _.each(deletedDayTimeCriterions, (criterion) => {\r\n criterion.Status = 'Deleted';\r\n criterion.Campaign = {\r\n Id: currentCampaignId,\r\n };\r\n });\r\n }\r\n\r\n getPropertyValidationErrors() {\r\n return this.adScheduleView.getPropertyValidationErrors();\r\n }\r\n\r\n getValue() {\r\n const isValid = this.adScheduleView.validate() && this.locationTargetsView.validate();\r\n\r\n if (isValid) {\r\n let locationTargetsData = this.locationTargetsView.getValues({}, {\r\n populateParentField: true,\r\n removeNegativeId: true,\r\n });\r\n const adDayTimeRanges = this.adScheduleView.getValues(this.deletedDayTimeCb.bind(this));\r\n const adDateSetting = this.adScheduleView.getDateSettings();\r\n const hasEndDate = this.adScheduleView.dateSettings ? this.adScheduleView.dateSettings.viewModel.hasEndDate() : false;\r\n const adScheduleUseSearcherTimeZone = this.adScheduleView.getAdScheduleUseSearcherTimeZone();\r\n let adScheduleModel = {\r\n dayTimeRanges: adDayTimeRanges,\r\n startDate: adDateSetting.StartDate,\r\n endDate: hasEndDate ? adDateSetting.EndDate : null,\r\n timeZone: timeZoneMapper.getAccountTimeZone(),\r\n adScheduleUseSearcherTimeZone,\r\n };\r\n\r\n if (!this.options.showDateSettings) {\r\n adScheduleModel = _.omit(adScheduleModel, ['startDate', 'endDate']);\r\n }\r\n return {\r\n locationTargets: cloneDeep(locationTargetsData),\r\n adScheduleModel: cloneDeep(adScheduleModel),\r\n };\r\n }\r\n return false;\r\n }\r\n}\r\n","import { DeterministicView } from '@bingads-webui/deterministic-view';\r\nimport accountListTemplate from './account-list-template.pug';\r\n\r\nexport default class AccountListView extends DeterministicView {\r\n initialize({\r\n i18n,\r\n value,\r\n title,\r\n subtitle,\r\n footerText,\r\n }) {\r\n this.i18n = i18n;\r\n this.setState({ value, title, subtitle, footerText });\r\n }\r\n\r\n get template() {\r\n return accountListTemplate;\r\n }\r\n\r\n get className() {\r\n return 'account-list-view';\r\n }\r\n}\r\n","import $ from 'jquery';\r\nimport _ from 'underscore';\r\n\r\nimport { PopoverView, positions, contents } from '@bingads-webui-campaign-legacy/popover/index';\r\nimport trackingStatusPopoverTemplate from './tracking-status-popover-template.pug';\r\nimport helpLinkTemplate from './help-link-template.pug';\r\n\r\n/**\r\n * Returns whether the given status is an active status in UET tags grid definition.\r\n * Useful in scenarios that categorizes several different possible status values\r\n * into active and inactive, for UET tracking status\r\n *\r\n * @param {string} status The status to be categorized\r\n * @returns {bool} isActive True if it is categorized into active; False otherwise\r\n */\r\nexport function isActiveTrackingStatusForUet(status) {\r\n return status === 'Active';\r\n}\r\n\r\n/**\r\n * Returns whether the given status is an active status in Conversion goals grid definition.\r\n * Useful in scenarios that categorizes several different possible status values\r\n * into active and inactive, for UET tracking status\r\n *\r\n * @param {string} status The status to be categorized\r\n * @returns {bool} isActive True if it is categorized into active; False otherwise\r\n */\r\nexport function isActiveTrackingStatusForGoals(status) {\r\n return status === 'Active' ||\r\n status === 'RecordingConversions' ||\r\n status === 'NoRecentConversion';\r\n}\r\n\r\n/**\r\n * Shows a popover view for UET tracking status explaining the current status in grid cell\r\n * Useful in scenarios like UET tags, Conversion goals, Audiences grids that have\r\n * the UET tracking status column, where a popover needs to be shown next to such cell\r\n * when customer clicks on the ... button.\r\n * Need to pass in the data item from the row where the button is clicked (e.g.\r\n * via wrapperView.gridView.itemOfElement(event.target)), the target jQuery element of\r\n * the button clicked (e.g. via wrapperView.$(event.target)), and finally a function that\r\n * checkes whether a given status value is considered active like the one above.\r\n *\r\n * @param {Object} item Data item from the button clicked in the row\r\n * @param {Array} target Target jQuery element of the button clicked\r\n * @param {String} className Class name of the popover\r\n * @param {Func} isActiveTrackingStatus Function that checkes if status value is active\r\n * @param {Object} i18n I18nModel where the resource keys needed by this feature can be found\r\n * @param {String} trackingStatusMessagePrefix Resource key prefix of tracking status message\r\n * @param {String} customTitle custom title for tracking status popover\r\n * @param {String} customExtensionEntranceText custom extension entrance text\r\n * @returns {Object} trackingStatusPopoverView The popover view\r\n */\r\nexport function showTrackingStatusDetails(\r\n item,\r\n target,\r\n className,\r\n isActiveTrackingStatus,\r\n i18n,\r\n trackingStatusMessagePrefix,\r\n customTitle = '',\r\n customExtensionEntranceText = '',\r\n) {\r\n const a11yIdPrefix = _.uniqueId('a11y-');\r\n const a11yId = (suffix) => `${a11yIdPrefix}__${suffix}`;\r\n\r\n return new PopoverView({\r\n item,\r\n target,\r\n className,\r\n position: positions.relativeToTableRow({\r\n marginBottom: $('footer > .navbar-footer').height(),\r\n }),\r\n }).setContent(\r\n new contents.TitledContent()\r\n .setTitle(customTitle || i18n.getString('UETTags_Grid_ColumnTrackingStatus'))\r\n .setBody({\r\n html: trackingStatusPopoverTemplate({\r\n i18n,\r\n helpLinkTemplate,\r\n troubleshootTopic: 'app51206',\r\n value: item.TrackingStatus,\r\n a11yId,\r\n isActiveTrackingStatus,\r\n trackingStatusMessagePrefix,\r\n testType: item.Type,\r\n customExtensionEntranceText,\r\n }),\r\n })\r\n );\r\n}\r\n","import _ from 'underscore';\r\nimport globalConfig from '@bingads-webui-component-legacy/config/index';\r\nimport { mapEnumValueForFilterBase } from '@bingads-webui-component-legacy/bingads-grid/shared/schema-util-helper';\r\n\r\nconst Permissions = globalConfig.get('Permissions');\r\n\r\n// this map convers all mapping for exsing delivery status enums\r\n// for each entity (adgroup/campaign/keyword/ad/else), it may only have several enum values\r\nexport const DeliveryStatusToCategoryMap = {\r\n // Eligible\r\n Eligible: 0,\r\n AdGroupAudienceAssociationPaused: 0,\r\n AdGroupAudienceAssociationExcluded: 0,\r\n AdGroupCriterionPaused: 0,\r\n AdGroupCriterionExcluded: 0,\r\n New: 0,\r\n\r\n // Eligible - Limited\r\n EditorialApprovedLimited: 1,\r\n EditorialApprovedLimitedAppealRejected: 1,\r\n LowSupply: 1,\r\n LowQuality: 1,\r\n NegativeKeywordConflicts: 1,\r\n BidBelowFirstPageBid: 1,\r\n BudgetSuggestions: 1,\r\n AutoBiddingLimitedByNotEnoughConversions: 1,\r\n AutoBiddingLimitedByNotEnoughRevenue: 1,\r\n AutoBiddingLimitedInventoryLimit: 1,\r\n AutoBiddingLimitedMaxCPCRestriction: 1,\r\n AutoBiddingLimitedBudgetRestriction: 1,\r\n AutoBiddingLimitedUnAttainableTarget: 1,\r\n AutoBiddingPortfolioBidStrategyTrainingStatus: 1,\r\n AutoBiddingLearning: 1,\r\n\r\n // Critical issues\r\n CreditCardExpired: 2,\r\n IOExceeded: 2,\r\n PaymentInformationMissing: 2,\r\n InvalidFinancialStatusOther: 2,\r\n CampaignSuspended: 2,\r\n CampaignBudgetPaused: 2,\r\n DomainLanguageNotSupported: 2,\r\n AdGroupExpired: 2,\r\n EditorialRejected: 2,\r\n EditorialAppealRejected: 2,\r\n CampaignDeleted: 2,\r\n StoreIdNotAssociated: 2,\r\n AdGroupTargetingTooNarrow: 2,\r\n VideoExtensionVideoProcessingFailed: 2,\r\n VideoExtensionVideoTooSmall: 2,\r\n VideoExtensionVideoAspectRatioInvalid: 2,\r\n VideoExtensionVideoDurationInvalid: 2,\r\n VideoExtensionThumbnailProcessingFailed: 2,\r\n VideoExtensionThumbnailTooSmall: 2,\r\n VideoExtensionThumbnailAspectInvalid: 2,\r\n\r\n //Not Eligible\r\n CampaignUserPaused: 3,\r\n AdGroupUserPaused: 3,\r\n AdGroupDraft: 3,\r\n AdGroupPrivacyPending: 3,\r\n AdUserPaused: 3,\r\n EditorialPending: 3,\r\n AssociationDeleted: 3,\r\n KeywordUserPaused: 3,\r\n EditorialUnderAppeal: 3,\r\n UrlInvalid: 3,\r\n ApplicationNotFound: 3,\r\n ApplicationDestinationUrlMismatch: 3,\r\n PendingMetadataSync: 3,\r\n ProductTargetUserPaused: 3,\r\n AdExtensionDeleted: 3,\r\n AdExtensionAssociationDeleted: 3,\r\n AdNotPresent: 3,\r\n AdNotActive: 3,\r\n VideoExtensionProcessing: 3,\r\n};\r\n\r\n/**\r\n * Map delivery status input enum set to related category for the filter values to render\r\n *\r\n * @param {Array} enumSet - the enums that are valid for specific entity (like campaign)\r\n * @returns {Object} the configs(groupedItems, localized) needed by component/filter to render in category type for delivery status.\r\n*/\r\nfunction getDeliveryStatusCategoryForFilterBase(enumSet) {\r\n const groupedItems = [];\r\n const enumSetToUse = _.uniq(enumSet);\r\n\r\n const categoryEnumValuesMap = _.groupBy(enumSetToUse, (enumValue) => {\r\n return DeliveryStatusToCategoryMap[enumValue];\r\n });\r\n\r\n _.each(categoryEnumValuesMap, (enumValues, category) => {\r\n const mappedValues = _.map(enumValues, (value) => {\r\n return {\r\n value: mapEnumValueForFilterBase('DeliveryStatus', value),\r\n };\r\n });\r\n\r\n const categoryName = `FilterLocalization_DeliveryStatusCategories_${category}`;\r\n\r\n groupedItems.push({\r\n items: _.pluck(mappedValues, 'value'),\r\n name: categoryName,\r\n });\r\n });\r\n\r\n return groupedItems;\r\n}\r\n\r\n/**\r\n * Update delivery status setting for render it in category type in filter\r\n *\r\n * @param {Object} deliveryStatusOption - the option to update for filter\r\n * @param {Array} enumSet - the enums that are valid for specific entity (like campaign)\r\n * @returns {void}\r\n*/\r\nexport function updateDeliveryStatusOptionForFilterBase(deliveryStatusOption, enumSet) {\r\n // get configs needed for category type filter for delivery status, using the allowed values for adgroup\r\n const groupedItems = getDeliveryStatusCategoryForFilterBase(enumSet);\r\n\r\n //Delete enum properties to make delivery status not enum type anymore (enum has more priority in component/filter than category)\r\n if (deliveryStatusOption.enum && _.isArray(deliveryStatusOption.enum)) {\r\n delete deliveryStatusOption.enum;\r\n }\r\n _.extendOwn(deliveryStatusOption, {groupedItems, type: 'category', operators: ['in']});\r\n}\r\n\r\nfunction lambdaConvertForLabels(logic, secondLogic, operator) {\r\n return (values) => {\r\n // if logic is or then format should be like 'Labels/any(d:d/Id eq 1 or d/Id eq 2)'\r\n if (logic === 'or') {\r\n const fieldPrefix = 'd:';\r\n const fieldId = 'd/Id';\r\n let ids = '';\r\n\r\n _.each(values, (value, index) => {\r\n if (index > 0) {\r\n ids += ` ${logic} `;\r\n }\r\n ids += `${fieldId} ${operator} ${value}`;\r\n });\r\n const url = `Labels/${secondLogic}(${fieldPrefix}${ids})`;\r\n\r\n return url;\r\n }\r\n // if logic is and then format should be like\r\n // Labels/any(d:d/Id eq 1) and Labels/any(d:d/Id eq 2)\r\n const fieldId = 'd:d/Id';\r\n let url = '';\r\n\r\n _.each(values, (value, index) => {\r\n if (index > 0) {\r\n url += ` ${logic} `;\r\n }\r\n url += `Labels/${secondLogic}(${fieldId} ${operator} ${value})`;\r\n });\r\n return url;\r\n };\r\n}\r\n\r\nexport function updateFilterStateEntityForLabelsBase(options) {\r\n options.fields.push({\r\n name: 'Labels',\r\n operators: ['containsall', 'containsany', 'containsnone'],\r\n type: 'id',\r\n addtionalParams: {\r\n dataSource: undefined,\r\n },\r\n });\r\n return options;\r\n}\r\n\r\nexport function updateFilterStateOptionsForLabelsBase(options) {\r\n if (options) {\r\n options.odata = options.odata || {custom: {}};\r\n\r\n _.extendOwn(options.odata.custom, {\r\n Labels: {\r\n containsall: lambdaConvertForLabels('and', 'any', 'eq'),\r\n containsany: lambdaConvertForLabels('or', 'any', 'eq'),\r\n containsnone: lambdaConvertForLabels('and', 'all', 'ne'),\r\n },\r\n });\r\n }\r\n}\r\n\r\nfunction lambdaConvertForLanguages(logic, secondLogic, operator) {\r\n return (values) => {\r\n // if logic operator is 'or', format should be contained in a Parenthesis.\r\n // Ex. 'Languages/any(d:d eq Enum.Language'TraditionalChinese' or d eq Enum.Language'Danish')'\r\n if (logic === 'or') {\r\n const fieldPrefix = 'd:';\r\n const fieldId = 'd';\r\n let languages = '';\r\n\r\n _.each(values, (value, index) => {\r\n if (index > 0) {\r\n languages += ` ${logic} `;\r\n }\r\n languages += `${fieldId} ${operator} Enum.Language'${value}'`;\r\n });\r\n const url = `Languages/${secondLogic}(${fieldPrefix}${languages})`;\r\n\r\n return url;\r\n }\r\n // if logic operator is 'and', format should be like\r\n // Languages/any(d:d eq Enum.Language'All') and Languages/any(d:d eq Enum.Language'TraditionalChinese')\r\n const fieldId = 'd:d';\r\n let url = '';\r\n\r\n _.each(values, (value, index) => {\r\n if (index > 0) {\r\n url += ` ${logic} `;\r\n }\r\n url += `Languages/${secondLogic}(${fieldId} ${operator} Enum.Language'${value}')`;\r\n });\r\n return url;\r\n };\r\n}\r\n\r\nexport function updateFilterStateEntityForLanguagesBase(options) {\r\n options.fields.push({\r\n name: 'Languages',\r\n operators: ['containsall', 'containsany', 'containsnone'],\r\n type: 'multi-language',\r\n });\r\n\r\n return options;\r\n}\r\n\r\nexport function updateFilterStateOptionsForLanguagesBase(options) {\r\n if (options) {\r\n options.odata = options.odata || {custom: {}};\r\n\r\n _.extendOwn(options.odata.custom, {\r\n Languages: {\r\n containsall: lambdaConvertForLanguages('and', 'any', 'eq'),\r\n containsany: lambdaConvertForLanguages('or', 'any', 'eq'),\r\n containsnone: lambdaConvertForLanguages('and', 'all', 'ne'),\r\n },\r\n });\r\n }\r\n}\r\n\r\nexport function updateFilterStateOptionsForExperiment(options) {\r\n if (options && Permissions.IsExperimentsEnabled) {\r\n options.odata = options.odata || {custom: {}};\r\n\r\n _.extendOwn(options.odata.custom, {\r\n IsExperiment: {\r\n eq: (val) => {\r\n const operator = val ? 'gt' : 'le';\r\n\r\n return `ExperimentId ${operator} 0`;\r\n },\r\n },\r\n });\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { mapEnumValueForFilter } from '@bingads-webui-component-legacy/bingads-grid/shared/schema-util';\r\nimport { DeliveryStatusToCategoryMap } from '@bingads-webui-campaign-legacy/common-grid-config/filter/base-filter-config';\r\n\r\n/**\r\n * Map delivery status input enum set to related category for the filter values to render\r\n *\r\n * @param {Array} enumSet - the enums that are valid for specific entity (like campaign)\r\n * @returns {Object} the configs(groupedItems, localized) needed by component/filter to render in category type for delivery status.\r\n*/\r\n\r\nfunction getDeliveryStatusCategoryForFilter(enumSet, mockI18n) {\r\n const i18n = mockI18n || window.globalLegacyI18n.get('component/i18n/loader!legacy/global');\r\n const groupedItems = [];\r\n const enumSetToUse = _.uniq(enumSet);\r\n const localized = {};\r\n\r\n const categoryEnumValuesMap = _.groupBy(enumSetToUse, (enumValue) => {\r\n return DeliveryStatusToCategoryMap[enumValue];\r\n });\r\n\r\n _.each(categoryEnumValuesMap, (enumValues, category) => {\r\n const mappedValues = _.map(enumValues, (value) => {\r\n return {\r\n value: mapEnumValueForFilter('DeliveryStatus', value),\r\n localized: i18n.getString(`Label_DeliveryStatus_${value}`),\r\n };\r\n });\r\n\r\n const categoryName = `FilterLocalization_DeliveryStatusCategories_${category}`;\r\n const itemLocalized = _.object(_.pluck(mappedValues, 'value'), _.pluck(mappedValues, 'localized'));\r\n\r\n groupedItems.push({\r\n items: _.pluck(mappedValues, 'value'),\r\n localized: itemLocalized,\r\n name: categoryName,\r\n });\r\n\r\n localized[categoryName] = i18n.getString(categoryName);\r\n _.extendOwn(localized, itemLocalized);\r\n });\r\n\r\n return {\r\n groupedItems,\r\n localized,\r\n };\r\n}\r\n\r\n/**\r\n * Update delivery status setting for render it in category type in filter\r\n *\r\n * @param {Object} deliveryStatusOption - the option to update for filter\r\n * @param {Array} enumSet - the enums that are valid for specific entity (like campaign)\r\n * @returns {void}\r\n*/\r\n\r\nexport function updateDeliveryStatusOptionForFilter(deliveryStatusOption, enumSet, mockI18n) {\r\n // get configs needed for category type filter for delivery status, using the allowed values for adgroup\r\n const {groupedItems, localized} = getDeliveryStatusCategoryForFilter(enumSet, mockI18n);\r\n\r\n //Delete enum properties to make delivery status not enum type anymore (enum has more priority in component/filter than category)\r\n if (deliveryStatusOption.enum && _.isArray(deliveryStatusOption.enum)) {\r\n delete deliveryStatusOption.enum;\r\n }\r\n _.extendOwn(deliveryStatusOption, {groupedItems, localized, type: 'category', operators: ['in']});\r\n}\r\n","import _ from 'underscore';\r\n\r\nexport function selectionConfig(config) {\r\n return _.extend({\r\n enabled: true,\r\n headClasses: ['text-center'],\r\n bodyClasses: ['text-center'],\r\n }, config);\r\n}\r\n","import _ from 'underscore';\r\n\r\nexport const goalInPilotingMap = {\r\n OfflineConversionGoal: 'IsOfflineConversionsSupported',\r\n InStoreTransactionGoal: 'IsInStoreTransactionAttributionSupported',\r\n MultiStageGoal: 'IsUETFunnelGoalSupported',\r\n};\r\n\r\n// schema is usually a reference or shallow copy here, please be caution when edit it.\r\nexport function filterEnumValuesFromProperty(schema, propertyName, predicate) {\r\n if (!_.isEmpty(schema.properties[propertyName])) {\r\n schema.properties[propertyName].enum = _.filter(schema.properties[propertyName].enum, predicate);\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport PageContext from '@bingads-webui-static-legacy/page-context';\r\nimport { goalInPilotingMap, filterEnumValuesFromProperty } from '@bingads-webui-campaign-legacy/common-grid-config/util/schema-editor';\r\n\r\nexport function getErrorMessage(errorCode, i18n) {\r\n const defaultMessage = i18n.getString('UnifiedEventTracking_Tag_Creation_FailedToSaveTag');\r\n const messageMap = {\r\n TagWithSameNameAlreadyExistsUnderCustomer: i18n.getString('UnifiedEventTracking_Tags_DuplicateTagNameError'),\r\n InvalidTagName: i18n.getString('UnifiedEventTracking_Tags_PleaseEnterValidTagName'),\r\n TagNameNullOrEmpty: i18n.getString('UnifiedEventTracking_Tags_PleaseEnterValidTagName'),\r\n InvalidTagDescription: i18n.getString('UnifiedEventTracking_Tags_PleaseEnterValidTagDescription'),\r\n MaxUetTagPerCustomerLimitReached: i18n.getString('UnifiedEventTracking_Tags_MaxUetTagPerCustomerLimitReached'),\r\n CustomerUnderMigration: i18n.getString('UnifiedEventTracking_CustomerMigration'),\r\n SharedLibraryUserPermissionDenied: i18n.getString('SharedLibrary_UserPermissionDenied'),\r\n UpdateFailedForIsClarityTagEnabled: i18n.getString('UnifiedEventTracking_Tags_UpdateFailedForIsClarityTagEnabled'),\r\n };\r\n\r\n return messageMap[errorCode] || defaultMessage;\r\n}\r\n\r\nexport function cleanAlerts(alertIds) {\r\n _.each(alertIds, (alertId) => {\r\n window.App.views.alertCenter.dismiss(alertId);\r\n });\r\n}\r\n\r\nexport function processTypeEnumForGoals({ schema }) {\r\n filterEnumValuesFromProperty(schema, 'Type', (type) => {\r\n if (goalInPilotingMap[type]) {\r\n return _.result(PageContext.Permissions, goalInPilotingMap[type], false);\r\n } else {\r\n return true;\r\n }\r\n });\r\n\r\n // remove the 'Goal from tag' from the option; work item: 1114739\r\n schema.properties.Type.enum = _.reject(schema.properties.Type.enum, (item) => item === 'GoalFromTag');\r\n}\r\n\r\nexport function processTypeBooleanForGoals({ schema, chooseType }) {\r\n if (chooseType === 'radio-boolean' && !_.isEmpty(schema.properties.IsAccountLevel)) {\r\n schema.properties.IsAccountLevel.chooseType = 'radio-boolean';\r\n }\r\n}\r\n\r\nfunction parseConversion(text) {\r\n return _.isFinite(text) ? parseInt(text) : 0;\r\n}\r\n\r\nexport function deParseConversion(minutes) {\r\n if (_.isFinite(minutes)) {\r\n let tempPeriod = minutes;\r\n\r\n const Minutes = tempPeriod % 60;\r\n\r\n tempPeriod = parseInt(tempPeriod / 60);\r\n\r\n const Hours = tempPeriod % 24;\r\n\r\n const Days = parseInt(tempPeriod / 24);\r\n\r\n return {\r\n days: Days,\r\n hours: Hours,\r\n minutes: Minutes,\r\n };\r\n } else {\r\n throw new Error('The minutes is not a finite value');\r\n }\r\n}\r\n\r\nexport function getConversionWindowPeriodInMinutes(days, hours, minutes) {\r\n return (((parseConversion(days) * 24) + parseConversion(hours)) * 60) + parseConversion(minutes);\r\n}\r\n\r\nexport function getDefWithAccountInfo(goalItem) {\r\n const cid = PageContext.CurrentCustomer.Id;\r\n const aid = PageContext.CurrentAccount.Id;\r\n const uid = PageContext.CurrentUser.Id;\r\n const isInternalUser = PageContext.Permissions.IsInternalUser;\r\n const CCBaseUrl = PageContext.CCBaseUrl.toLowerCase();\r\n const accountInfo = {cid, aid, uid, isInternalUser, CCBaseUrl};\r\n const goalDef = _.extend({}, goalItem, accountInfo);\r\n\r\n return goalDef;\r\n}\r\n","import $ from 'jquery';\r\n\r\nimport { PopoverView, positions, contents } from '@bingads-webui-campaign-legacy/popover/index';\r\n\r\nexport function showUnAssignedDetails(\r\n item,\r\n target,\r\n className,\r\n title,\r\n htmlContent,\r\n) {\r\n return new PopoverView({\r\n item,\r\n target,\r\n className,\r\n position: positions.relativeToTableRow({\r\n marginBottom: $('footer > .navbar-footer').height(),\r\n }),\r\n }).setContent(\r\n new contents.TitledContent()\r\n .setTitle(title)\r\n .setBody({\r\n html: htmlContent,\r\n })\r\n );\r\n}\r\n","import _ from 'underscore';\r\nimport { startsWith } from 'underscore.string';\r\nimport { bingadsGridColumn as column } from '@bingads-webui-component-legacy/bingads-grid/shared/column';\r\nimport {\r\n Columns as ColumnsResource,\r\n SelectedColumns as SelectedColumnsResource,\r\n} from '@bingads-webui-component-legacy/bingads-grid/service/column-chooser-preferences';\r\nimport { getColumnConversions } from '@bingads-webui-campaign/column-conversions';\r\nimport trackingStatusTemplate from '@bingads-webui-campaign-legacy/conversion-tracking/conversion-goals/grid/tracking-status-template.pug';\r\nimport tagIdTemplate from '@bingads-webui-campaign-legacy/conversion-tracking/conversion-goals/grid/tag-id-template.pug';\r\nimport statusTemplate from '@bingads-webui-campaign-legacy/conversion-tracking/conversion-goals/grid/status-template.pug';\r\nimport nameTemplate from '@bingads-webui-campaign-legacy/conversion-tracking/conversion-goals/grid/name-template.pug';\r\nimport categoryColumnTemplate from '@bingads-webui-campaign-legacy/conversion-tracking/conversion-goals/grid/category-template.pug';\r\nimport revenueTemplate from '@bingads-webui-campaign-legacy/conversion-tracking/conversion-goals/grid/revenue-template.pug';\r\nimport smartGoalTemplate from '@bingads-webui-campaign-legacy/conversion-tracking/conversion-goals/grid/goal-type-template.pug';\r\n\r\nconst noData = '-';\r\n\r\nexport const getColumnChooserConfig = ({\r\n i18n,\r\n isForVNext,\r\n columnConfig,\r\n permissions = {},\r\n}) => {\r\n const { dynamic = {} } = permissions;\r\n const {\r\n PartialConversions: IsPartialConversionsEnabled,\r\n ColumnConversion: IsColumnConversionEnabled,\r\n } = dynamic;\r\n const usePartialConversions = IsPartialConversionsEnabled && IsColumnConversionEnabled;\r\n const columnConversions = usePartialConversions ?\r\n getColumnConversions(columnConfig) : null;\r\n\r\n const columnNames = _.pluck(columnConfig, 'name');\r\n const locked = _.compact(['Status', 'Name', 'TrackingStatus', 'IsMainConversionGoal']);\r\n const columnChooserConfig = {\r\n categories: [{\r\n name: i18n.getString('Attributes'),\r\n options: _.map(_.reject(columnConfig, ({ name }) => startsWith(name, 'GoalPerformanceMetrics/')), ({ name, title }) => ({\r\n key: name,\r\n name: title,\r\n selectOption: _.indexOf(locked, name) >= 0 ? 'locked' : 'optional',\r\n })),\r\n }, {\r\n name: i18n.getString('Conversions'),\r\n options: _.map(_.filter(columnConfig, ({ name }) => startsWith(name, 'GoalPerformanceMetrics/')), ({ name, title }) => ({\r\n key: name,\r\n name: title,\r\n selectOption: _.indexOf(locked, name) >= 0 ? 'locked' : 'optional',\r\n })),\r\n }],\r\n selected: _.without(columnNames, 'Id'),\r\n locked,\r\n customToolbarIcon: isForVNext ? 'ba-TripleColumnSolid' : '',\r\n Columns: ColumnsResource,\r\n SelectedColumns: SelectedColumnsResource,\r\n i18n,\r\n isForVNext,\r\n columnConversions,\r\n };\r\n\r\n return columnChooserConfig;\r\n};\r\n\r\nfunction getConversionWindow(lookbackWindowInMinutes, i18n, property = 'UnifiedEventTracking_Goals_ConversionWindowTemplate') {\r\n if (!_.isFinite(lookbackWindowInMinutes)) {\r\n return noData;\r\n }\r\n\r\n const minsInAnHr = 60;\r\n const minsInADay = 24 * minsInAnHr;\r\n\r\n let windowInMins = lookbackWindowInMinutes;\r\n\r\n const days = Math.floor(windowInMins / minsInADay);\r\n\r\n windowInMins = windowInMins - (days * minsInADay);\r\n const hrs = Math.floor(windowInMins / minsInAnHr);\r\n const mins = windowInMins - (hrs * minsInAnHr);\r\n\r\n return i18n.getString(property, { days, hrs, mins });\r\n}\r\n\r\nfunction getTagIdLink({ IsUETDashboardEnabled, value, i18n }) {\r\n if (!_.isFinite(value)) {\r\n return noData;\r\n }\r\n\r\n return tagIdTemplate({ IsUETDashboardEnabled, value, i18n });\r\n}\r\n\r\nexport const getColumnConfig = ({\r\n newi18n,\r\n i18n,\r\n s$i18n,\r\n permissions,\r\n appConfig,\r\n isForVNext,\r\n}) => {\r\n const {\r\n IsViewThroughConversionEnabled: isViewThroughConversionEnabled,\r\n dynamic = {},\r\n } = permissions;\r\n\r\n const {\r\n PartialConversions: IsPartialConversionsEnabled,\r\n ColumnConversion: IsColumnConversionEnabled,\r\n UETDashboard: IsUETDashboardEnabled,\r\n AllowAutoGoalWizard: IsAllowAutoGoalWizard,\r\n } = dynamic;\r\n const usePartialConversions = IsPartialConversionsEnabled && IsColumnConversionEnabled;\r\n\r\n return _.map(_.compact([{\r\n name: 'Status',\r\n title: s$i18n.property('Goal', 'Status'),\r\n sortable: 'Status',\r\n property: _.identity,\r\n helpId: 'pop_BA_UET_Status',\r\n helpAriaLabelTextTemplate: `${i18n.getString('Click to learn more about')} ${s$i18n.property('Goal', 'Status')}`,\r\n template: ({ value: tag }) => {\r\n return statusTemplate({\r\n value: tag.Status === 'Paused' ? 'Removed' : tag.Status,\r\n s$i18n,\r\n permissions,\r\n isReadOnly: tag.IsReadOnly || tag.Type === 'InStoreVisitGoal',\r\n });\r\n },\r\n html: isForVNext ? '
' : '',\r\n }, {\r\n name: 'Name',\r\n title: s$i18n.property('Goal', 'Name'),\r\n property: _.identity,\r\n sortable: 'Name',\r\n bodyClasses: 'UET-conversion-goals-column-Name',\r\n template: ({ value: goal }) => nameTemplate({\r\n isForVNext,\r\n name: goal.Name,\r\n ariaLabel: i18n.getString('ClickToEditGoal', { goalName: goal.Name }),\r\n showGoalSuggestion: (goal.Type === 'DestinationGoal' || goal.Type === 'EventGoal') && (goal.TrackingStatus === 'NoRecentConversion' || goal.TrackingStatus === 'TagInactive') && !goal.IsReadOnly,\r\n goalSuggestionAriaLabel: i18n.getString('Goal Suggestion'),\r\n isReadOnly: goal.IsReadOnly,\r\n isNonSupportGoal: goal.Type === 'InStoreVisitGoal',\r\n isAutoGoal: goal.IsAutoGoal,\r\n }),\r\n }, {\r\n name: 'Id',\r\n title: s$i18n.property('Goal', 'Id'),\r\n sortable: true,\r\n }, {\r\n name: 'Type',\r\n title: s$i18n.property('Goal', 'Type'),\r\n sortable: true,\r\n helpId: 'pop_BA_UET_Type',\r\n helpAriaLabelTextTemplate: `${i18n.getString('Click to learn more about')} ${s$i18n.property('Goal', 'Type')}`,\r\n template: ({ value }) => {\r\n if (value === 'SmartGoal') {\r\n return smartGoalTemplate({\r\n isForVNext,\r\n value: i18n.getString('UnifiedEventTracking_Goal_Creation_Type_Smart'),\r\n ariaLabel: `${i18n.getString('Click to learn more about')} ${i18n.getString('UnifiedEventTracking_Goal_Creation_Type_Smart')}`,\r\n });\r\n }\r\n return s$i18n.value('Goal', 'Type', value);\r\n },\r\n }, IsAllowAutoGoalWizard && {\r\n name: 'IsAutoGoal',\r\n title: s$i18n.property('Goal', 'IsAutoGoal'),\r\n sortable: true,\r\n template: ({ value }) => {\r\n return value ?\r\n i18n.getString('UnifiedEventTracking_Goal_Creation_CreationSourceType_AutoGoal') :\r\n i18n.getString('UnifiedEventTracking_Goal_Creation_CreationSourceType_ManualGoal');\r\n },\r\n }, {\r\n name: 'IsAccountLevel',\r\n title: s$i18n.property('Goal', 'IsAccountLevel'),\r\n sortable: true,\r\n helpId: 'pop_BA_UET_Scope',\r\n helpAriaLabelTextTemplate: `${i18n.getString('Click to learn more about')} ${s$i18n.property('Goal', 'IsAccountLevel')}`,\r\n template: ({ value }) => {\r\n return value ?\r\n i18n.getString('UnifiedEventTracking_Goal_Creation_TrackingType_CurrentAccount', { acctname: appConfig.get('CurrentAccount').Title }) :\r\n i18n.getString('UnifiedEventTracking_Goal_Creation_TrackingType_AllAccounts');\r\n },\r\n }, {\r\n name: 'IsMainConversionGoal',\r\n title: s$i18n.property('Goal', 'IsMainConversionGoal'),\r\n sortable: true,\r\n helpId: 'pop_BA_ConversionGoal_CountAsConv',\r\n helpAriaLabelTextTemplate: `${i18n.getString('Click to learn more about')} ${s$i18n.property('Goal', 'IsMainConversionGoal')}`,\r\n template: ({ value }) => {\r\n return value ?\r\n i18n.getString('UnifiedEventTracking_Goals_IsMainConversionGoal_True') :\r\n i18n.getString('UnifiedEventTracking_Goals_IsMainConversionGoal_False');\r\n },\r\n }, {\r\n name: 'ConversionCountType',\r\n title: s$i18n.property('Goal', 'ConversionCountType'),\r\n property: _.identity,\r\n sortable: 'ConversionCountType',\r\n helpId: 'pop_BA_UET_Count',\r\n helpAriaLabelTextTemplate: `${i18n.getString('Click to learn more about')} ${s$i18n.property('Goal', 'ConversionCountType')}`,\r\n template: ({ value: goal }) => {\r\n return goal.Type === 'SmartGoal' || _.isEmpty(goal.ConversionCountType) ? noData : i18n.getString(`Schema_GoalPerformanceMetrics_Property_ConversionCountType_Value_${goal.ConversionCountType}`);\r\n },\r\n }, {\r\n name: 'LookbackWindowInMinutes',\r\n title: s$i18n.property('Goal', 'LookbackWindowInMinutes'),\r\n property: _.identity,\r\n sortable: 'LookbackWindowInMinutes',\r\n helpId: 'pop_BA_UET_ConversionWindow',\r\n helpAriaLabelTextTemplate: `${i18n.getString('Click to learn more about')} ${s$i18n.property('Goal', 'LookbackWindowInMinutes')}`,\r\n template: ({ value: goal }) => {\r\n return goal.Type === 'SmartGoal' ? noData : getConversionWindow(goal.LookbackWindowInMinutes, i18n);\r\n },\r\n }, {\r\n name: 'GoalCategory',\r\n title: s$i18n.property('Goal', 'GoalCategory'),\r\n sortable: true,\r\n helpId: 'pop_BA_ConversionGoal_GoalCategory',\r\n helpAriaLabelTextTemplate: `${i18n.getString('Click to learn more about')} ${s$i18n.property('Goal', 'GoalCategory')}`,\r\n template: ({ value }) => {\r\n if (_.isNull(value) || value === 'None') {\r\n const unassigned = i18n.getString('Schema_Goal_Property_GoalCategory_Value_None');\r\n\r\n return categoryColumnTemplate({ unassigned, isForVNext });\r\n }\r\n return i18n.getString(`Schema_Goal_Property_GoalCategory_Value_${value}`);\r\n },\r\n }, {\r\n /* eslint-disable no-undef */\r\n name: 'AttributionModelType',\r\n title: newi18n.getString(_TL_('Attribution model type')),\r\n sortable: true,\r\n helpId: 'pop_BA_CampaignGrids_AttributionModelType',\r\n helpAriaLabelTextTemplate: `${i18n.getString('Click to learn more about')} ${newi18n.getString(_TL_('Attribution model type'))}`,\r\n template: ({ value }) => {\r\n let attributionModelTypeStr = '';\r\n\r\n switch (value) {\r\n case 'Default':\r\n attributionModelTypeStr = newi18n.getString(_TL_('Last Click'));\r\n break;\r\n case 'External':\r\n attributionModelTypeStr = newi18n.getString(_TL_('External'));\r\n break;\r\n case 'LastTouch':\r\n attributionModelTypeStr = newi18n.getString(_TL_('Last Touch'));\r\n break;\r\n default:\r\n attributionModelTypeStr = value;\r\n }\r\n\r\n return attributionModelTypeStr;\r\n },\r\n /* eslint-enable no-undef */\r\n }, isViewThroughConversionEnabled && { // enable the View-Through window column when ViewThroughConversion feature is enabled\r\n name: 'ViewThroughLookbackWindowinMinutes',\r\n title: s$i18n.property('Goal', 'ViewThroughLookbackWindowInMinutes'),\r\n sortable: true,\r\n helpId: 'pop_BA_UET_VTCWindow ',\r\n helpAriaLabelTextTemplate: `${i18n.getString('Click to learn more about')} ${s$i18n.property('Goal', 'ViewThroughLookbackWindowInMinutes')}`,\r\n template: ({ value }) => {\r\n return getConversionWindow(value, i18n, 'UnifiedEventTracking_Goals_ViewThroughConversionWindowTemplate');\r\n },\r\n }, isViewThroughConversionEnabled && { // enable the ViewThoughConversions column when ViewThroughConversion feature is enabled\r\n name: usePartialConversions ? 'GoalPerformanceMetrics/ViewThroughConversionsCredit' : 'GoalPerformanceMetrics/ViewThroughConversions',\r\n title: s$i18n.property('Goal', 'ViewThroughConversions'),\r\n sortable: true,\r\n helpId: 'pop_BA_CampaignGrids_ViewThrough',\r\n helpAriaLabelTextTemplate: `${i18n.getString('Click to learn more about')} ${s$i18n.property('Goal', 'ViewThroughConversions')}`,\r\n template: ({ value }) => {\r\n if (!_.isFinite(value) || _.isNull(value)) {\r\n return noData;\r\n }\r\n\r\n return value;\r\n },\r\n columnConversion: usePartialConversions ? {\r\n sourceColumnName: 'GoalPerformanceMetrics/ViewThroughConversions',\r\n sourceSortableProperty: 'GoalPerformanceMetrics/ViewThroughConversions',\r\n targetSortableProperty: 'GoalPerformanceMetrics/ViewThroughConversionsCredit',\r\n } : {\r\n sourceColumnName: 'GoalPerformanceMetrics/ViewThroughConversionsCredit',\r\n sourceSortableProperty: 'GoalPerformanceMetrics/ViewThroughConversionsCredit',\r\n targetSortableProperty: 'GoalPerformanceMetrics/ViewThroughConversions',\r\n },\r\n }, {\r\n name: 'Tag/Id',\r\n title: s$i18n.property('Tag', 'Id'),\r\n sortable: true,\r\n helpId: 'pop_BA_UET_UETTag',\r\n helpAriaLabelTextTemplate: `${i18n.getString('Click to learn more about')} ${s$i18n.property('Tag', 'Id')}`,\r\n template: ({ value }) => {\r\n return getTagIdLink({\r\n IsUETDashboardEnabled,\r\n value,\r\n i18n,\r\n });\r\n },\r\n }, {\r\n name: 'TrackingStatus',\r\n title: s$i18n.property('Goal', 'TrackingStatus'),\r\n property: _.identity,\r\n sortable: 'TrackingStatus',\r\n bodyClasses: 'UET-conversion-goals-column-TrackingStatus',\r\n helpId: 'pop_BA_UET_TrackingStatusGoal',\r\n helpAriaLabelTextTemplate: `${i18n.getString('Click to learn more about')} ${s$i18n.property('Goal', 'TrackingStatus')}`,\r\n template: ({ value: goal }) => {\r\n return goal.Type === 'OfflineConversionGoal' || goal.Type === 'InStoreTransactionGoal' || goal.Type === 'ApplicationInstallGoal' || goal.Type === 'SmartGoal' || goal.Type === 'InStoreVisitGoal' || goal.IsReadOnly ? noData : trackingStatusTemplate({\r\n s$i18n,\r\n isForVNext,\r\n value: goal.TrackingStatus,\r\n isActiveTrackingStatus: (value) => value === 'RecordingConversions',\r\n });\r\n },\r\n }, isViewThroughConversionEnabled && {\r\n name: usePartialConversions ? 'GoalPerformanceMetrics/AllConversionsCredit' : 'GoalPerformanceMetrics/AllConversions',\r\n title: s$i18n.property('GoalPerformanceMetrics', 'AllConversions'),\r\n sortable: true,\r\n type: 'number',\r\n format: usePartialConversions ? 'decimal' : 'integer',\r\n helpId: 'pop_BA_ConversionGoal_AllConv',\r\n helpAriaLabelTextTemplate: `${i18n.getString('Click to learn more about')} ${s$i18n.property('GoalPerformanceMetrics', 'AllConversions')}`,\r\n columnConversion: usePartialConversions ? {\r\n sourceColumnName: 'GoalPerformanceMetrics/AllConversions',\r\n sourceSortableProperty: 'GoalPerformanceMetrics/AllConversions',\r\n targetSortableProperty: 'GoalPerformanceMetrics/AllConversionsCredit',\r\n } : {\r\n sourceColumnName: 'GoalPerformanceMetrics/AllConversionsCredit',\r\n sourceSortableProperty: 'GoalPerformanceMetrics/AllConversionsCredit',\r\n targetSortableProperty: 'GoalPerformanceMetrics/AllConversions',\r\n },\r\n }, !isViewThroughConversionEnabled && {\r\n name: usePartialConversions ? 'GoalPerformanceMetrics/ConversionsCredit' : 'GoalPerformanceMetrics/Conversions',\r\n title: s$i18n.property('GoalPerformanceMetrics', 'AllConversions'),\r\n sortable: true,\r\n type: 'number',\r\n format: usePartialConversions ? 'decimal' : 'integer',\r\n helpId: 'pop_BA_ConversionGoal_AllConv',\r\n helpAriaLabelTextTemplate: `${i18n.getString('Click to learn more about')} ${s$i18n.property('GoalPerformanceMetrics', 'AllConversions')}`,\r\n columnConversion: usePartialConversions ? {\r\n sourceColumnName: 'GoalPerformanceMetrics/Conversions',\r\n sourceSortableProperty: 'GoalPerformanceMetrics/Conversions',\r\n targetSortableProperty: 'GoalPerformanceMetrics/ConversionsCredit',\r\n } : {\r\n sourceColumnName: 'GoalPerformanceMetrics/ConversionsCredit',\r\n sourceSortableProperty: 'GoalPerformanceMetrics/ConversionsCredit',\r\n targetSortableProperty: 'GoalPerformanceMetrics/Conversions',\r\n },\r\n }, {\r\n // Rename to all conversions revenue when main goal selection is enabled\r\n name: 'GoalPerformanceMetrics/Revenue',\r\n title: s$i18n.property('GoalPerformanceMetrics', 'AllRevenue'),\r\n sortable: 'GoalPerformanceMetrics/Revenue',\r\n property: _.identity,\r\n type: 'number',\r\n helpId: 'pop_BA_ConversionGoal_AllConvRevenue',\r\n helpAriaLabelTextTemplate: `${i18n.getString('Click to learn more about')} ${s$i18n.property('GoalPerformanceMetrics', 'AllRevenue')}`,\r\n template: ({ value: goal }) => {\r\n if (goal.IsReadOnly) {\r\n return noData;\r\n }\r\n if (goal.GoalValueType === 'NoValue' && goal.Type !== 'SmartGoal') {\r\n return revenueTemplate({ value: i18n.getString('ConversionGoals_Grid_Revenue_Unassigned'), isForVNext });\r\n }\r\n return goal.GoalPerformanceMetrics.Revenue || noData;\r\n },\r\n }, {\r\n name: usePartialConversions ? 'GoalPerformanceMetrics/PartialConversionRepeatRate' : 'GoalPerformanceMetrics/RepeatRate',\r\n title: s$i18n.property('GoalPerformanceMetrics', 'RepeatRate'),\r\n sortable: true,\r\n type: 'number',\r\n helpId: 'pop_BA_UET_RepeatRate',\r\n helpAriaLabelTextTemplate: `${i18n.getString('Click to learn more about')} ${s$i18n.property('GoalPerformanceMetrics', 'RepeatRate')}`,\r\n columnConversion: usePartialConversions ? {\r\n sourceColumnName: 'GoalPerformanceMetrics/RepeatRate',\r\n sourceSortableProperty: 'GoalPerformanceMetrics/RepeatRate',\r\n targetSortableProperty: 'GoalPerformanceMetrics/PartialConversionRepeatRate',\r\n } : {\r\n sourceColumnName: 'GoalPerformanceMetrics/PartialConversionRepeatRate',\r\n sourceSortableProperty: 'GoalPerformanceMetrics/PartialConversionRepeatRate',\r\n targetSortableProperty: 'GoalPerformanceMetrics/RepeatRate',\r\n },\r\n }]), column);\r\n};\r\n","import _ from 'underscore';\r\nimport { DeterministicView } from '@bingads-webui/deterministic-view';\r\nimport explanationTemplate from '@bingads-webui-campaign-legacy/common-grid-plugins/perf-data-explanation/template.pug';\r\n// eslint-disable-next-line\r\nimport _bingads_webui_component_legacy_timezonemapper_index from '@bingads-webui-component-legacy/timezonemapper/index';\r\n// eslint-disable-next-line\r\nconst { getTimeZoneForDateRangeText } = _bingads_webui_component_legacy_timezonemapper_index;\r\nimport { appendLearnMoreLink } from '@bingads-webui-component-legacy/help/index';\r\n\r\nexport class PerfDataExplanationView extends DeterministicView {\r\n initialize({ stampNotes, i18n }) {\r\n this.i18n = i18n;\r\n this.stampNotes = stampNotes || appendLearnMoreLink(i18n.get('BITimeStampNotes_Label'), 'ext54480');\r\n this.accountTimeZoneText = getTimeZoneForDateRangeText();\r\n }\r\n\r\n template(locals) {\r\n return explanationTemplate(_.extend({ appendLearnMoreLink }, locals));\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { PerfDataExplanationView } from '@bingads-webui-campaign-legacy/common-grid-plugins/perf-data-explanation/perf-data-explanation-view';\r\nimport { defineGridPlugin } from '@bingads-webui/projection-grid-plugin';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/common-grid-plugins');\r\n\r\nexport const perfDataExplanationPlugin = defineGridPlugin(\r\n 'perfDataExplanation',\r\n ['gridView'],\r\n (gridView, config) => {\r\n const perfDataExplanationView = new PerfDataExplanationView(_.extend({ i18n }, config)).render();\r\n\r\n gridView.appendFootRows([{\r\n view: perfDataExplanationView,\r\n classes: ['noborder'],\r\n }]);\r\n return perfDataExplanationView;\r\n\r\n }\r\n);\r\n","import _ from 'underscore';\r\nimport $ from 'jquery';\r\nimport edm from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport jsdataCampaign from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport { selectionConfig } from '@bingads-webui-campaign-legacy/common-grid-config/selection';\r\nimport { sortableHeaderTemplate, validateOrder} from '@bingads-webui-campaign/summary-grid-helper';\r\nimport { helpers } from '@bingads-webui/projection-grid-toolbar';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport stateManager from '@bingads-webui-component-legacy/statemanager/campaignStateManager';\r\nimport preferenceService from '@bingads-webui-component-legacy/preference/service/index';\r\n\r\nexport class GridConfig {\r\n constructor({\r\n columnConfig,\r\n isForVNext,\r\n schema,\r\n preferenceConfig,\r\n options: {\r\n customHeaderOffset,\r\n viewport,\r\n },\r\n i18n,\r\n permissions,\r\n }) {\r\n const tableName = i18n.getString('UnifiedEventTracking_Goals_Title');\r\n\r\n const gridName = preferenceConfig.name || 'ConversionGoalsGrid';\r\n\r\n _.extend(this, {\r\n name: gridName,\r\n dataSource: {\r\n type: 'jsdata',\r\n entity: jsdataCampaign.Goal,\r\n primaryKey: 'Id',\r\n schema,\r\n },\r\n query: {\r\n options: {\r\n cacheResponse: false,\r\n },\r\n entitySet: edm.currentAccount.Goals.toJSON(),\r\n query: _.defaults(preferenceConfig.dataSource.query, {\r\n $expand: 'Tag($select=Id)',\r\n }),\r\n orderby: preferenceConfig.dataSource.orderby,\r\n },\r\n scrolling: {\r\n header: {\r\n type: 'sticky',\r\n offset: customHeaderOffset || (() => $('nav.navbar-default.navbar-fixed-top').height()),\r\n attributes: { 'aria-label': i18n.getString('{{tableName}} table header', { tableName }) },\r\n },\r\n virtualized: true,\r\n },\r\n tableClasses: ['table', 'table-bordered'],\r\n tableAttributes: { 'aria-label': tableName },\r\n rows: {\r\n headRows: isForVNext ? [\r\n 'column-header-rows',\r\n ] :\r\n helpers.singleToolbarHeadRows(),\r\n },\r\n columns: columnConfig,\r\n config,\r\n stateManager,\r\n preferenceService,\r\n sortableHeader: _.defaults(preferenceConfig.sortableHeader, {\r\n name: 'Name',\r\n directionIndex: 0,\r\n template: sortableHeaderTemplate,\r\n }),\r\n }, isForVNext ? {} : {\r\n selection: selectionConfig({ single: true }),\r\n });\r\n\r\n validateOrder(preferenceConfig, columnConfig, gridName, permissions);\r\n if (viewport) {\r\n this.scrolling.viewport = viewport;\r\n }\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport $ from 'jquery';\r\nimport Promise from 'bluebird';\r\nimport { updateGridQuery } from '@bingads-webui-campaign/summary-grid-helper';\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\nimport { constants } from '@bingads-webui/projection-grid-toolbar';\r\nimport { DeterministicWrapperView } from '@bingads-webui/deterministic-wrapper-view';\r\nimport { notificationApi, NotificationLevel } from '@bingads-webui-react/notification-center';\r\nimport edm from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport jsdataCampaign from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport { triggerQualtricsEvent } from '@bingads-webui-campaign/qualtrics';\r\nimport UpdateStatusView from '@bingads-webui-component-legacy/update-status/view/index';\r\nimport appConfig from '@bingads-webui-component-legacy/config/index';\r\nimport TagViewer from '@bingads-webui-static-legacy/uet/view/tagViewer';\r\nimport instrumentation from '@bingads-webui-campaign-legacy/instrumentation/index';\r\nimport { processTypeEnumForGoals, processTypeBooleanForGoals, getDefWithAccountInfo } from '@bingads-webui-campaign-legacy/conversion-tracking/common/util/index';\r\nimport { handleSortChange } from '@bingads-webui-campaign-legacy/bingadsgrid/service/state-manager-helper';\r\nimport { isActiveTrackingStatusForGoals, showTrackingStatusDetails } from '@bingads-webui-campaign-legacy/common-grid-config/controls/tracking-status-popover';\r\nimport { contents } from '@bingads-webui-campaign-legacy/popover/index';\r\nimport helpLinkTemplate from '@bingads-webui-campaign-legacy/common-grid-config/controls/help-link-template.pug';\r\nimport trackingStatusPopoverTemplate from '@bingads-webui-campaign-legacy/common-grid-config/controls/tracking-status-popover-template.pug';\r\nimport unassignedCategoryPopoverTemplate from './unassigned-category-popover-template.pug';\r\nimport unassignedRevenuePopoverTemplate from './unassigned-revenue-popover-template.pug';\r\nimport smartGoalTypePopoverTemplate from './goal-type-popover-template.pug';\r\nimport goalReadOnlyPopoverTemplate from './goal-read-only-popover-template.pug';\r\nimport { showUnAssignedDetails } from './unassigned-detail-popover';\r\nimport { getColumnConfig, getColumnChooserConfig } from './column-config';\r\nimport { getDefaultPlugins } from './plugin-config';\r\nimport { GridConfig } from './grid-config';\r\nimport { startConversionAdvisor } from '@bingads-webui-campaign-legacy/popover/conversion-advisor-entrypoint';\r\n\r\nconst schema = window.globalLegacySchema.get('Goal');\r\nconst s$i18n = window.globalLegacyI18n.get('$/schema-i18n!campaign');\r\n\r\nprocessTypeEnumForGoals({ schema });\r\nprocessTypeBooleanForGoals({ schema, chooseType: 'radio-boolean' });\r\n\r\nexport class ConversionGoalsGrid extends DeterministicWrapperView {\r\n initialize(options) {\r\n super.initialize(options);\r\n this.initializeInstrumentation();\r\n }\r\n\r\n viewFactory({\r\n newi18n,\r\n i18n,\r\n preferenceConfig,\r\n $blocker,\r\n permissions = {},\r\n pgridFactory,\r\n pluginFactories,\r\n extendPlugins = () => [],\r\n isForVNext,\r\n customHeaderOffset,\r\n viewport,\r\n filterService,\r\n router,\r\n showPopup,\r\n setShowAutoGoalDrawer,\r\n perfMarker,\r\n }) {\r\n this.isForVNext = isForVNext;\r\n this.filterService = filterService;\r\n this.router = router;\r\n this.resource = jsdataCampaign.Goal;\r\n this.newi18n = newi18n;\r\n this.i18n = i18n;\r\n this.$blocker = $blocker;\r\n this.showPopup = showPopup;\r\n this.setShowAutoGoalDrawer = setShowAutoGoalDrawer;\r\n this.permissions = permissions;\r\n this.isInitialGrid = true;\r\n\r\n const columnConfig = getColumnConfig({\r\n newi18n,\r\n i18n,\r\n s$i18n,\r\n permissions,\r\n appConfig,\r\n isForVNext,\r\n });\r\n const gridConfig = new GridConfig({\r\n columnConfig,\r\n isForVNext,\r\n schema,\r\n preferenceConfig,\r\n options: {\r\n customHeaderOffset,\r\n viewport,\r\n },\r\n i18n,\r\n permissions,\r\n });\r\n const defaultPlugins = getDefaultPlugins({\r\n perfMarker,\r\n view: this,\r\n $blocker,\r\n appConfig,\r\n i18n,\r\n isForVNext,\r\n s$i18n,\r\n schema,\r\n columnChooserConfig: getColumnChooserConfig({\r\n i18n,\r\n isForVNext,\r\n columnConfig,\r\n permissions,\r\n }),\r\n pluginFactories,\r\n permissions,\r\n });\r\n const extendedPlugins = extendPlugins({\r\n view: this,\r\n gridConfig,\r\n });\r\n\r\n this.grid = pgridFactory({\r\n gridConfig,\r\n plugins: defaultPlugins.concat(extendedPlugins),\r\n preferenceConfig: preferenceConfig || {},\r\n });\r\n this.gridView = this.grid.gridView;\r\n if (!isForVNext) {\r\n // row selection feature is only available in old UI\r\n this.gridView.on('didSelect', (selected) => {\r\n const toolbarEditor = this.grid.toolbar.gridToolbarGroup.toolbarWithName(constants.DEFAULT_TOOLBAR_NAME);\r\n\r\n toolbarEditor.update({\r\n id: 'dropdown-edit',\r\n disabled: _.isEmpty(selected),\r\n });\r\n });\r\n }\r\n this.gridView.on('didUpdate', (changes) => {\r\n // for the perf issue, should not patch preference when init view\r\n if (this.isInitialGrid) {\r\n this.isInitialGrid = false;\r\n return;\r\n }\r\n handleSortChange(changes, this.gridView, gridConfig.name);\r\n });\r\n\r\n if (this.filterService) {\r\n this.listenTo(this.filterService, 'filter-state-changed', () => {\r\n updateGridQuery(this.gridView, this.filterService.getCombinedFilter(), true);\r\n });\r\n }\r\n\r\n return this.gridView;\r\n }\r\n\r\n get events() {\r\n return _.defaults({\r\n 'click .edit-goal-link': (e) => {\r\n const { Id } = this.gridView.itemOfElement(e.target);\r\n\r\n this.router.navigateToGoalEditingPage({ goalId: Id });\r\n },\r\n 'click .link-tag-id': (e) => {\r\n const item = this.gridView.itemOfElement(e.target);\r\n\r\n if (!_.isEmpty(item)) {\r\n if (item.TrackingStatus === 'InactiveDueToTagUnavailable') {\r\n notificationApi.add({\r\n severity: NotificationLevel.Error,\r\n title: '',\r\n message: this.i18n.getString('ConversionGoals_Grid_TrackingStatusMessage_InactiveDueToTagUnavailable'),\r\n target: 'FloatingBanner',\r\n });\r\n return;\r\n }\r\n this.router.navigateToTagIdPage({ tagId: item.Tag.Id });\r\n }\r\n },\r\n 'click .link-tag': (e) => {\r\n const item = this.gridView.itemOfElement(e.target);\r\n\r\n if (!_.isEmpty(item)) {\r\n if (item.TrackingStatus === 'InactiveDueToTagUnavailable') {\r\n notificationApi.add({\r\n severity: NotificationLevel.Error,\r\n title: '',\r\n message: this.i18n.getString('ConversionGoals_Grid_TrackingStatusMessage_InactiveDueToTagUnavailable'),\r\n target: 'FloatingBanner',\r\n });\r\n return;\r\n }\r\n jsdataCampaign.Tag.find(item.Tag.Id)\r\n .then((Tag) => {\r\n new TagViewer({\r\n tag: {\r\n name: Tag.Name,\r\n id: Tag.Id,\r\n script: Tag.TrackingCode,\r\n },\r\n }).render();\r\n });\r\n }\r\n },\r\n 'click .uet-tags-grid__tracking-status-detail': 'onShowTrackingStatusDetails',\r\n 'click .goals-grid__category-detail': 'onShowUnassignedCategoryPopup',\r\n 'click .goals-grid__revenue-detail': 'onShowUnassignedRevenuePopup',\r\n 'click .goals-grid__smart-goal': 'onShowSmartGoalPopup',\r\n 'click .goals-grid__goal-isAutoGoal': 'onShowGoalEditDrawer',\r\n 'click .goals-grid__goal-readonly': 'onShowGoalReadOnlyPopup',\r\n 'click .goals-grid__goal-nonsupportGoal': 'onShowGoalNotSupportedPopup',\r\n 'click .conversion-goals-light-bulb': 'onShowGoalSuggestion',\r\n 'click .grid-cell .statuschangehover': (e) => {\r\n const resource = this.gridView.get('dataSource').entity;\r\n const item = this.gridView.itemOfElement(e.target);\r\n\r\n if (_.isEmpty(item)) {\r\n return;\r\n }\r\n e.stopPropagation();\r\n if (this.updateStatusView) {\r\n this.updateStatusView.remove();\r\n this.updateStatusView = null;\r\n }\r\n\r\n const stateWhitelist = ['Active', 'Paused'];\r\n\r\n let itemToUpdate = _.omit(item, 'Status');\r\n\r\n if (itemToUpdate.ViewThroughLookbackWindowinMinutes === 0) {\r\n delete itemToUpdate.ViewThroughLookbackWindowinMinutes;\r\n }\r\n\r\n this.updateStatusView = new UpdateStatusView({\r\n Id: item.Id,\r\n Status: item.Status,\r\n schema,\r\n entitySet: edm.currentAccount.Goals,\r\n extendData: itemToUpdate,\r\n afterChange: (err) => {\r\n if (err && err.status === 400) {\r\n const errCode = err.responseJSON && err.responseJSON.value && err.responseJSON.value[0] && err.responseJSON.value[0].Code;\r\n\r\n notificationApi.add({\r\n severity: NotificationLevel.Error,\r\n title: '',\r\n message: errCode ? this.i18n.getString(`ConversionGoals_Grid_ErrorMessage_${errCode}`) : this.i18n.getString('GenericErrorMessage_Short'),\r\n target: 'FloatingBanner',\r\n });\r\n } else {\r\n resource.ejectAll();\r\n this.gridView.refresh(true);\r\n }\r\n },\r\n beforeRemove: () => {\r\n this.updateStatusView = null;\r\n if (item.Type === 'SmartGoal') {\r\n triggerQualtricsEvent('UserPauseSmartGoal');\r\n }\r\n },\r\n stateWhitelist,\r\n }).render();\r\n\r\n $(e.target).closest('td', this.el).append(this.updateStatusView.el);\r\n },\r\n }, this.isForVNext ? {\r\n 'mouseenter .uet-tags-grid__tracking-status-detail': 'onShowTrackingStatusDetails',\r\n 'mouseenter .goals-grid__category-detail': 'onShowUnassignedCategoryPopup',\r\n 'mouseenter .goals-grid__revenue-detail': 'onShowUnassignedRevenuePopup',\r\n 'mouseenter .goals-grid__smart-goal': 'onShowSmartGoalPopup',\r\n 'mouseenter .goals-grid__goal-readonly': 'onShowGoalReadOnlyPopup',\r\n 'mouseleave .goals-grid__category-detail': 'hidePopup',\r\n 'mouseleave .UET-conversion-goals-column-TrackingStatus': 'hidePopup',\r\n 'mouseleave .goals-grid__revenue-detail': 'hidePopup',\r\n 'mouseleave .goals-grid__smart-goal': 'hidePopup',\r\n 'mouseleave .goals-grid__goal-readonly': 'hidePopup',\r\n } : {});\r\n }\r\n\r\n initializeInstrumentation() {\r\n const scenarios = {\r\n testConversionGoals: instrumentation.testConversionGoals.create(),\r\n };\r\n\r\n this.activities = {\r\n clickOnGoalBulbIcon: scenarios.testConversionGoals.clickOnGoalBulbIcon.create(),\r\n clickOnTestThisGoalFromGoalBulbPopup: scenarios.testConversionGoals.clickOnTestThisGoalFromGoalBulbPopup.create(),\r\n clickOnTestThisGoalFromTrackingStatusPopup: scenarios.testConversionGoals.clickOnTestThisGoalFromTrackingStatusPopup.create(),\r\n };\r\n this.activities.clickOnGoalBulbIcon.monitor('onShowGoalSuggestion', this);\r\n }\r\n\r\n hidePopup(e) {\r\n if ($(e.relatedTarget).closest('#popup-callout').length === 0) {\r\n this.trigger('closePopup');\r\n }\r\n }\r\n\r\n onShowGoalSuggestion(e) {\r\n this.onShowTrackingStatusPopover(e,\r\n this.i18n.getString('Test conversion goal'),\r\n 'ConversionGoals_Grid_TestConversionGoalsMessage_',\r\n this.i18n.getString('UnifiedEventTracking_TestConversionGoal_TestInAdvisorExtension'));\r\n }\r\n\r\n onShowTrackingStatusDetails(e) {\r\n this.onShowTrackingStatusPopover(e);\r\n }\r\n\r\n onShowTrackingStatusPopover(e, title = this.i18n.getString('UETTags_Grid_ColumnTrackingStatus'), trackingStatusMessagePrefix = 'ConversionGoals_Grid_TrackingStatusMessage_', customExtensionEntranceText = '') {\r\n const item = this.gridView.itemOfElement(e.target);\r\n const testGoalClickActivity = customExtensionEntranceText ? this.activities.clickOnTestThisGoalFromGoalBulbPopup : this.activities.clickOnTestThisGoalFromTrackingStatusPopup;\r\n const isUnverifiedOrInactive = item.TrackingStatus === 'Unverified' || item.TrackingStatus === 'TagInactive';\r\n const isNoRecentConversions = item.TrackingStatus === 'NoRecentConversion';\r\n const isTrackingStatusColumn = title === this.i18n.getString('UETTags_Grid_ColumnTrackingStatus');\r\n\r\n if (_.isEmpty(item)) {\r\n return;\r\n }\r\n if (this.isForVNext && _.isFunction(this.showPopup)) {\r\n const a11yId = (suffix) => `${_.uniqueId('a11y-')}__${suffix}`;\r\n const contentView = new contents.TitledContent()\r\n .setBody({\r\n html: trackingStatusPopoverTemplate({\r\n i18n: this.i18n,\r\n helpLinkTemplate,\r\n troubleshootTopic: 'app51206',\r\n value: item.TrackingStatus,\r\n a11yId,\r\n isActiveTrackingStatus: isActiveTrackingStatusForGoals,\r\n isUnverifiedOrInactive,\r\n isNoRecentConversions,\r\n isTrackingStatusColumn,\r\n trackingStatusMessagePrefix,\r\n customExtensionEntranceText,\r\n isInPilot: this.permissions.IsConversionAdvisorEntryLinkEnabled,\r\n isUETDashboardEnabled: this.permissions.dynamic.UETDashboard,\r\n testType: item.Type,\r\n isClarityGoal: !!item.ClarityEventDefinitionId,\r\n }),\r\n }).delegateEvents({\r\n 'click .uetdashboard': () => {\r\n if (item.TrackingStatus === 'InactiveDueToTagUnavailable') {\r\n notificationApi.add({\r\n severity: NotificationLevel.Error,\r\n title: '',\r\n message: this.i18n.getString('ConversionGoals_Grid_TrackingStatusMessage_InactiveDueToTagUnavailable'),\r\n target: 'FloatingBanner',\r\n });\r\n return;\r\n }\r\n this.router.navigateToTagIdPage({ tagId: item.Tag.Id });\r\n },\r\n 'click .extension': () => {\r\n let goalDef = getDefWithAccountInfo(item);\r\n\r\n if (testGoalClickActivity && testGoalClickActivity.trace) {\r\n testGoalClickActivity.trace(\r\n 'open extension entrance from conversion goals grid test conversion goals popup',\r\n item.TrackingStatus);\r\n }\r\n\r\n startConversionAdvisor(goalDef);\r\n },\r\n });\r\n\r\n this.showPopup({\r\n containerSelector: '#rejectionContainer',\r\n title,\r\n contentView,\r\n event: e,\r\n parentView: this,\r\n popoverClassName: 'trackingStatusPopover',\r\n });\r\n } else {\r\n const goalItemWithAccountInfo = getDefWithAccountInfo(item);\r\n\r\n showTrackingStatusDetails(\r\n goalItemWithAccountInfo,\r\n this.$(e.target),\r\n 'conversion-goals-grid__tracking-status-popover',\r\n isActiveTrackingStatusForGoals,\r\n this.i18n,\r\n trackingStatusMessagePrefix,\r\n title,\r\n customExtensionEntranceText,\r\n );\r\n }\r\n }\r\n\r\n onShowUnassignedCategoryPopup(e) {\r\n const title = this.i18n.getString('UnifiedEventTracking_Goals_GoalCategory');\r\n const popupMessage = this.i18n.getString('ConversionGoals_Grid_Category_Unassigned_Msg');\r\n const a11yId = (suffix) => `${_.uniqueId('a11y-')}__${suffix}`;\r\n\r\n if (this.isForVNext && _.isFunction(this.showPopup)) {\r\n const contentView = new contents.TitledContent()\r\n .setBody({\r\n html: unassignedCategoryPopoverTemplate({\r\n a11yId,\r\n popupMessage,\r\n }),\r\n });\r\n\r\n this.showPopup({\r\n containerSelector: '#rejectionContainer',\r\n title,\r\n contentView,\r\n event: e,\r\n parentView: this,\r\n });\r\n } else {\r\n showUnAssignedDetails(\r\n this.gridView.itemOfElement(e.target),\r\n this.$(e.target),\r\n 'conversion-goals-grid__unassigned-category-popover',\r\n title,\r\n unassignedCategoryPopoverTemplate({\r\n a11yId,\r\n popupMessage,\r\n }),\r\n );\r\n }\r\n }\r\n\r\n onShowUnassignedRevenuePopup(e) {\r\n const title = this.i18n.getString('ConversionGoals_Grid_Revenue_Unassigned');\r\n const a11yId = (suffix) => `${_.uniqueId('a11y-')}__${suffix}`;\r\n\r\n if (this.isForVNext && _.isFunction(this.showPopup)) {\r\n const contentView = new contents.TitledContent()\r\n .setBody({\r\n html: unassignedRevenuePopoverTemplate({\r\n a11yId,\r\n i18n: this.i18n,\r\n }),\r\n });\r\n\r\n this.showPopup({\r\n containerSelector: '#rejectionContainer',\r\n title,\r\n contentView,\r\n event: e,\r\n parentView: this,\r\n });\r\n } else {\r\n showUnAssignedDetails(\r\n this.gridView.itemOfElement(e.target),\r\n this.$(e.target),\r\n 'conversion-goals-grid__unassigned-revenue-popover',\r\n title,\r\n unassignedRevenuePopoverTemplate({\r\n a11yId,\r\n i18n: this.i18n,\r\n }),\r\n );\r\n }\r\n }\r\n\r\n onShowSmartGoalPopup(e) {\r\n const title = this.i18n.getString('ConversionGoals_Grid_SmartGoal_Popover_Title');\r\n const a11yId = (suffix) => `${_.uniqueId('a11y-')}__${suffix}`;\r\n\r\n if (this.isForVNext && _.isFunction(this.showPopup)) {\r\n const contentView = new contents.TitledContent()\r\n .setBody({\r\n html: smartGoalTypePopoverTemplate({\r\n a11yId,\r\n i18n: this.i18n,\r\n }),\r\n });\r\n\r\n this.showPopup({\r\n containerSelector: '#rejectionContainer',\r\n title,\r\n contentView,\r\n event: e,\r\n parentView: this,\r\n });\r\n } else {\r\n showUnAssignedDetails(\r\n this.gridView.itemOfElement(e.target),\r\n this.$(e.target),\r\n 'conversion-goals-grid__smartgoal-popover',\r\n title,\r\n smartGoalTypePopoverTemplate({\r\n a11yId,\r\n i18n: this.i18n,\r\n }),\r\n );\r\n }\r\n }\r\n\r\n onShowGoalEditDrawer(e) {\r\n if (!_.get(this.permissions, ['dynamic', 'AllowAutoGoalWizard'])) {\r\n return;\r\n }\r\n if (this.isForVNext && _.isFunction(this.setShowAutoGoalDrawer)) {\r\n const goal = this.gridView.itemOfElement(e.target);\r\n\r\n this.setShowAutoGoalDrawer(true /*shouldShow*/, goal);\r\n }\r\n }\r\n\r\n onShowGoalReadOnlyPopup(e) {\r\n const title = this.i18n.getString('ConversionGoals_Grid_Goal_ReadOnly_Popover_Title');\r\n const popupMessage = this.i18n.getString('ConversionGoals_Grid_Goal_ReadOnly_Popover_Message');\r\n const a11yId = (suffix) => `${_.uniqueId('a11y-')}__${suffix}`;\r\n\r\n if (this.isForVNext && _.isFunction(this.showPopup)) {\r\n const contentView = new contents.TitledContent()\r\n .setBody({\r\n html: goalReadOnlyPopoverTemplate({\r\n a11yId,\r\n popupMessage,\r\n }),\r\n });\r\n\r\n this.showPopup({\r\n containerSelector: '#rejectionContainer',\r\n title,\r\n contentView,\r\n event: e,\r\n parentView: this,\r\n });\r\n }\r\n }\r\n\r\n onShowGoalNotSupportedPopup(e) {\r\n const title = this.i18n.getString('ConversionGoals_Grid_Goal_NotSupported_Popover_Title');\r\n const popupMessage = this.i18n.getString('ConversionGoals_Grid_Goal_NotSupported_Popover_Message');\r\n const a11yId = (suffix) => `${_.uniqueId('a11y-')}__${suffix}`;\r\n\r\n if (this.isForVNext && _.isFunction(this.showPopup)) {\r\n const contentView = new contents.TitledContent()\r\n .setBody({\r\n html: goalReadOnlyPopoverTemplate({\r\n a11yId,\r\n popupMessage,\r\n }),\r\n });\r\n\r\n this.showPopup({\r\n containerSelector: '#rejectionContainer',\r\n title,\r\n contentView,\r\n event: e,\r\n parentView: this,\r\n });\r\n }\r\n }\r\n\r\n updateAllStatus(status) {\r\n const resource = this.gridView.get('dataSource').entity;\r\n const selectedItem = _.omit(this.gridView.selectedItems()[0], 'FlexTagScript', 'CampaignAnalyticsGoalName');\r\n const currentStatus = selectedItem.Status;\r\n\r\n if (currentStatus !== status) {\r\n resource.update(selectedItem.Id, _.defaults({\r\n '@odata.type': `#Model.${selectedItem.Type}`,\r\n Status: status,\r\n }, selectedItem), {\r\n afterUpdate: () => {\r\n selectedItem.Status = status;\r\n return Promise.resolve(selectedItem);\r\n },\r\n }).then(() => {\r\n this.gridView.refresh(true);\r\n }).finally(withUiBlock(this.$blocker, this.i18n.getString('loadingtext')));\r\n }\r\n }\r\n\r\n renderTrunk() {\r\n if (this.isForVNext) {\r\n this.filterService.initializeCombinedFilterPromise.then(() => {\r\n updateGridQuery(this.gridView, this.filterService.getCombinedFilter(), true);\r\n });\r\n }\r\n super.renderTrunk();\r\n }\r\n\r\n remove() {\r\n if (this.updateStatusView) {\r\n this.updateStatusView.remove();\r\n this.updateStatusView = null;\r\n }\r\n return super.remove();\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { assistedSelectionPlugin } from '@bingads-webui/projection-grid-assisted-selection';\r\nimport { a11yPlugin } from '@bingads-webui/projection-grid-a11y';\r\nimport dateFilterPlugin from '@bingads-webui-campaign-legacy/bingadsgrid/vnext/plugin/date-filter';\r\nimport { perfDataExplanationPlugin } from '@bingads-webui-campaign-legacy/common-grid-plugins/perf-data-explanation/index';\r\nimport { performanceLogPlugin, perfMarkerPlugin } from '@bingads-webui-campaign/pgrid-performance-log';\r\nimport logger from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport { appendLearnMoreLink } from '@bingads-webui-component-legacy/help/index';\r\nimport { placeholderPlugin } from '@bingads-webui/projection-grid-placeholder';\r\nimport { toolbarPlugin, helpers } from '@bingads-webui/projection-grid-toolbar';\r\n\r\nexport const getDefaultPlugins = ({\r\n view,\r\n $blocker,\r\n appConfig,\r\n i18n,\r\n isForVNext,\r\n columnChooserConfig,\r\n pluginFactories,\r\n permissions,\r\n perfMarker,\r\n}) => _.compact([\r\n { plugin: perfMarkerPlugin, config: { appConfig, marker: perfMarker } },\r\n { plugin: a11yPlugin, config: { i18n } },\r\n !isForVNext && { plugin: assistedSelectionPlugin },\r\n { plugin: dateFilterPlugin },\r\n !isForVNext && {\r\n plugin: perfDataExplanationPlugin,\r\n config: {\r\n stampNotes: appendLearnMoreLink(i18n.getString('BIConversionStampNotes_Label'), 'ext54480'),\r\n },\r\n },\r\n {\r\n plugin: performanceLogPlugin,\r\n config: { appConfig, logger },\r\n },\r\n {\r\n plugin: pluginFactories.columnChooserPlugin,\r\n config: columnChooserConfig,\r\n },\r\n {\r\n plugin: pluginFactories.paginationPlugin,\r\n config: {\r\n pageSize: 20,\r\n availablePageSizes: [20, 50, 100, 200],\r\n enableRandomPage: false,\r\n pageNumberLabelText: i18n.getString('Grid_Page_Number_Label_Text'),\r\n pageSizeText: i18n.getString('Grid_ShowRows'),\r\n totalPageCountText: i18n.getString('Grid_PageOf'),\r\n resetPageNumberOnSort: true,\r\n },\r\n },\r\n {\r\n plugin: pluginFactories.uiBlockerPlugin,\r\n config: {\r\n el: $blocker,\r\n text: i18n.getString('loadingtext'),\r\n },\r\n },\r\n {\r\n plugin: placeholderPlugin,\r\n config: {\r\n container: isForVNext ? '.grid-noresult' : '.goals-grid__placeholder',\r\n text: i18n.getString('Grid_NoRecords'),\r\n filteredContainer: isForVNext ? '.grid-noresult' : '.goals-grid__placeholder',\r\n filteredEmptyText: i18n.getString('Grid_NoFilteredRecords'),\r\n ignoreFilters: [{\r\n 'Status': {\r\n $in: null,\r\n },\r\n }],\r\n },\r\n },\r\n {\r\n plugin: toolbarPlugin,\r\n config: helpers.singleToolbar({\r\n items: _.compact([{\r\n type: 'button',\r\n id: 'button-create-conversion-goal',\r\n text: i18n.getString('UnifiedEventTracking_Goals_CreateConversionGoal'),\r\n classes: ['btn', 'btn-hero'],\r\n onClick: () => window.App.navigate('customer/:customer_id/account/:account_id/uet/goal/create'),\r\n }, {\r\n type: 'dropdown',\r\n id: 'dropdown-edit',\r\n disabled: true,\r\n button: {\r\n text: i18n.getString('UnifiedEventTracking_Edit'),\r\n classes: ['btn btn-secondary'],\r\n },\r\n menu: {\r\n items: [\r\n {\r\n text: i18n.getString('UnifiedEventTracking_Goals_EditGoal'),\r\n id: 'edit-goal',\r\n onClick: () => window.App.navigate(`customer/:customer_id/account/:account_id/uet/goal/${view.gridView.selectedItems()[0].Id}`, { data: { fromGoalEdit: true } }),\r\n }, {\r\n type: 'dropdown-divider',\r\n }, {\r\n iconLeft: ['icon-status-active'],\r\n id: 'enable-target',\r\n text: i18n.getString('UnifiedEventTracking_Enable'),\r\n onClick: () => view.updateAllStatus('Active', $blocker, i18n),\r\n }, {\r\n iconLeft: 'icon-status-pause',\r\n id: 'pause-target',\r\n text: i18n.getString('UnifiedEventTracking_Pause'),\r\n onClick: () => view.updateAllStatus('Paused', $blocker, i18n),\r\n },\r\n ],\r\n },\r\n },\r\n {\r\n type: 'selector',\r\n id: 'quick-filter',\r\n }, {\r\n type: 'dropdown',\r\n id: 'dropdown-column-chooser',\r\n }, {\r\n type: 'dropdown',\r\n id: 'dropdown-filter',\r\n }, {\r\n type: 'search-box',\r\n id: 'search-box-filter',\r\n }]),\r\n }),\r\n },\r\n]);\r\n","import _ from 'underscore';\r\nimport $ from 'jquery';\r\nimport { helpers } from '@bingads-webui/projection-grid-toolbar';\r\nimport { sortableHeaderTemplate } from '@bingads-webui-campaign/summary-grid-helper';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport stateManager from '@bingads-webui-component-legacy/statemanager/campaignStateManager';\r\nimport preferenceService from '@bingads-webui-component-legacy/preference/service/index';\r\n\r\nexport class UETTagsGridDashboardTestConfig {\r\n constructor({\r\n preferenceConfig,\r\n columnConfig,\r\n options: {\r\n customHeaderOffset,\r\n viewport,\r\n },\r\n dataSource,\r\n isForVNext,\r\n i18n,\r\n }) {\r\n const tableName = i18n.getString('UnifiedEventTracking_Goal_Creation_Tag');\r\n\r\n _.extend(this, {\r\n name: preferenceConfig.name || 'UETTagsDashboardGridTest',\r\n tableClasses: ['table', 'table-bordered'],\r\n dataSource,\r\n config,\r\n stateManager,\r\n preferenceService,\r\n sortableHeader: _.defaults(preferenceConfig.sortableHeader, {\r\n name: 'EventAction',\r\n directionIndex: 0,\r\n template: sortableHeaderTemplate,\r\n }),\r\n rows: {\r\n headRows: isForVNext ? [\r\n 'column-header-rows',\r\n ] :\r\n helpers.singleToolbarHeadRows(),\r\n },\r\n scrolling: {\r\n header: {\r\n type: 'sticky',\r\n offset: customHeaderOffset || (() => $('nav.navbar-default.navbar-fixed-top').height()),\r\n attributes: { 'aria-label': i18n.getString('{{tableName}} table header', { tableName }) },\r\n },\r\n virtualized: true,\r\n },\r\n tableAttributes: { 'aria-label': tableName },\r\n columns: columnConfig,\r\n });\r\n\r\n if (viewport) {\r\n this.scrolling.viewport = viewport;\r\n }\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport $ from 'jquery';\r\nimport Promise from 'bluebird';\r\nimport { Storage } from '@bingads-webui/window-name-store';\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\nimport { DeterministicWrapperView } from '@bingads-webui/deterministic-wrapper-view';\r\nimport edm from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport jsdataCampaign from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport preferencesService from '@bingads-webui-component-legacy/preference/service/index';\r\nimport { contents } from '@bingads-webui-campaign-legacy/popover/index';\r\nimport parametersReceivedPopoverTemplate from './parameters-received-template';\r\nimport { isActiveTrackingStatusForUet } from '@bingads-webui-campaign-legacy/common-grid-config/controls/tracking-status-popover';\r\nimport { SharedLibraryUtils } from '@bingads-webui-campaign-react/shared-library-scopes';\r\nimport { ClientCenterCustomerService } from '@bingads-webui/clientcenter-customer-service';\r\nimport { getErrorMessage } from '@bingads-webui-campaign-legacy/conversion-tracking/common/util/index';\r\nimport { getUETTagDashboardTestGridColumnConfig } from '@bingads-webui-campaign-legacy/conversion-tracking/uet-tags-dashboard-test/grid/column-config';\r\nimport { getDefaultPlugins } from '@bingads-webui-campaign-legacy/conversion-tracking/uet-tags-dashboard-test/grid/plugin-config';\r\nimport { UETTagsGridDashboardTestConfig } from '@bingads-webui-campaign-legacy/conversion-tracking/uet-tags-dashboard-test/grid/grid-config';\r\n\r\nconst schema = window.globalLegacySchema.get('Tag');\r\nconst s$i18n = window.globalLegacyI18n.get('$/schema-i18n!campaign');\r\n\r\nexport function fetchCustomerHierarchy() {\r\n const windowNameStorage = new Storage();\r\n const currentUser = config.get('CurrentUser');\r\n // In ui-next serverContext, ParentCustomerId are put in CurrentUser\r\n const parentCustomerId = _.isUndefined(currentUser.ParentCustomerId) ? config.get('ParentCustomerId') : currentUser.ParentCustomerId;\r\n const currentCustomer = config.get('CurrentCustomer');\r\n const loginCID = currentUser.IsInternal ? windowNameStorage.get('rcid') || currentCustomer.Id : parentCustomerId;\r\n const ccCustomerService = new ClientCenterCustomerService({ ccBaseUrl: config.get('CCBaseUrl') });\r\n const fetchCustomerHierarchyPromise = ccCustomerService.getCustomerHierarchy({\r\n cid: loginCID,\r\n uid: currentUser.Id,\r\n returnOnlyDirectlyLinkedEntities: false,\r\n });\r\n const fetchUserPermissionPromise = fetchCustomerHierarchyPromise.then((data) => {\r\n const { customerHierarchyEntities: customerHierarchy } = data;\r\n const { Id: currentCustomerId } = currentCustomer;\r\n\r\n return SharedLibraryUtils.fetchUserPermissions({\r\n uid: currentUser.Id,\r\n cid: currentCustomerId,\r\n customerHierarchy,\r\n });\r\n });\r\n\r\n return Promise.join(fetchCustomerHierarchyPromise, fetchUserPermissionPromise, (data) => {\r\n const { customerHierarchyEntities: customerHierarchy } = data;\r\n\r\n return customerHierarchy;\r\n });\r\n}\r\n\r\nexport class UETTagsDashboardGridTest extends DeterministicWrapperView {\r\n viewFactory({\r\n i18n,\r\n preferenceConfig,\r\n dataSource,\r\n $blocker,\r\n permissions = {},\r\n isManagerDashboardView = false,\r\n pgridFactory,\r\n pluginFactories,\r\n extendPlugins = () => [],\r\n isForVNext,\r\n customHeaderOffset,\r\n sortableHeader,\r\n viewport,\r\n router,\r\n customerHierarchy,\r\n showPopup,\r\n showAccountListPopup,\r\n perfMarker,\r\n }) {\r\n const windowNameStorage = new Storage();\r\n\r\n this.isManagerDashboardView = isManagerDashboardView;\r\n this.permissions = permissions;\r\n this.i18n = i18n;\r\n this.$blocker = $blocker;\r\n this.router = router;\r\n this.customerHierarchy = customerHierarchy;\r\n this.isForVNext = isForVNext;\r\n this.showPopup = showPopup;\r\n this.showAccountListPopup = showAccountListPopup;\r\n this.isInitialGrid = true;\r\n\r\n edm.customerIdType.useAdvertiserCustomerId = !isManagerDashboardView;\r\n const columnConfig = getUETTagDashboardTestGridColumnConfig({\r\n updateHandler: _.bind(this.updateHandler, this),\r\n customerHierarchy: this.customerHierarchy,\r\n isManagerDashboardView,\r\n windowNameStorage,\r\n isActiveTrackingStatusForUet,\r\n isForVNext,\r\n deps: {\r\n i18n,\r\n s$i18n,\r\n permissions,\r\n config,\r\n },\r\n });\r\n\r\n const gridConfig = new UETTagsGridDashboardTestConfig({\r\n preferenceConfig,\r\n columnConfig,\r\n dataSource,\r\n options: {\r\n customHeaderOffset,\r\n sortableHeader,\r\n viewport,\r\n },\r\n isForVNext: this.isForVNext,\r\n i18n,\r\n });\r\n\r\n const defaultPlugins = getDefaultPlugins({\r\n $blocker,\r\n i18n,\r\n s$i18n,\r\n view: this,\r\n appConfig: config,\r\n preferencesService,\r\n permissions,\r\n pluginFactories,\r\n isForVNext,\r\n perfMarker,\r\n });\r\n const extendedPlugins = extendPlugins({\r\n view: this,\r\n gridConfig,\r\n });\r\n\r\n this.grid = pgridFactory({\r\n gridConfig,\r\n plugins: defaultPlugins.concat(extendedPlugins),\r\n preferenceConfig: preferenceConfig || {},\r\n });\r\n this.gridView = this.grid.gridView;\r\n\r\n return this.gridView;\r\n }\r\n\r\n get events() {\r\n return _.defaults({\r\n 'click .uet-tags-test-table__parameters-tag': 'onShowParametersReceivedDetails',\r\n }, this.isForVNext ? {\r\n 'mouseenter .uet-tags-test-table__parameters-tag': 'onShowParametersReceivedDetails',\r\n 'mouseleave .uet-tags-test-table__parameters-tag': 'hidePopup',\r\n } : {});\r\n }\r\n\r\n onShowParametersReceivedDetails(e) {\r\n this.onShowParametersReceivedPopover(e);\r\n }\r\n\r\n onShowParametersReceivedPopover(e) {\r\n const item = this.gridView.itemOfElement(e.target);\r\n\r\n if (_.isEmpty(item)) {\r\n return;\r\n }\r\n if (_.isFunction(this.showPopup)) {\r\n const contentView = new contents.TitledContent()\r\n .setBody({\r\n html: parametersReceivedPopoverTemplate({\r\n value: item.ParameterMap,\r\n i18n: this.i18n,\r\n newi18n: this.newI18n,\r\n }),\r\n });\r\n\r\n this.showPopup({\r\n containerSelector: '#rejectionContainer',\r\n title: this.i18n.getString('UETTags_Event_Grid_Parameters', { item: `${Object.keys(item.ParameterMap).length}` }),\r\n contentView,\r\n event: e,\r\n parentView: this,\r\n popoverClassName: 'trackingStatusPopover',\r\n });\r\n }\r\n }\r\n\r\n hidePopup(e) {\r\n if ($(e.relatedTarget).closest('#popup-callout').length === 0) {\r\n this.trigger('closePopup');\r\n }\r\n }\r\n\r\n updateHandler(originalItem, patch, editorView) {\r\n const windowNameStorage = new Storage();\r\n\r\n jsdataCampaign.Tag.update(originalItem[schema.key], patch, _.extend({\r\n cacheResponse: false,\r\n entitySet: this.isManagerDashboardView ? edm.currentCustomer.Tags : edm.currentAccount.Tags,\r\n }, config.get('CurrentUser').IsInternal && windowNameStorage.get('rcid') > 0 ? {\r\n headers: { 'x-ms-rootcid': windowNameStorage.get('rcid') },\r\n } : {}))\r\n .then(() => {\r\n if (editorView) {\r\n editorView.trigger('save', patch);\r\n }\r\n this.gridView.refresh(true);\r\n })\r\n .catch((res) => {\r\n const errors = [];\r\n\r\n if (!res || !res.errors) {\r\n errors.push(getErrorMessage('default', this.i18n));\r\n } else {\r\n _.each(res.errors, (error) => {\r\n errors.push(getErrorMessage(error.Code, this.i18n));\r\n });\r\n }\r\n if (editorView) {\r\n editorView.setErrors({ $overall: errors });\r\n }\r\n }).finally(withUiBlock(this.$blocker, this.i18n.getString('loadingtext')));\r\n }\r\n\r\n removeCreateView() {\r\n if (this.createView) {\r\n this.createView.off();\r\n this.createView.remove();\r\n this.createView = null;\r\n }\r\n }\r\n\r\n renderTrunk() {\r\n super.renderTrunk();\r\n }\r\n\r\n remove() {\r\n this.removeCreateView();\r\n return super.remove();\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { bingadsGridColumn } from '@bingads-webui-component-legacy/bingads-grid/shared/column';\r\nimport parametersColumnTemplate from './parameters-template';\r\n\r\nexport function getUETTagDashboardTestGridColumnConfig({\r\n deps,\r\n}) {\r\n const {\r\n i18n,\r\n } = deps;\r\n const column = (options) => bingadsGridColumn(_.defaults({ i18n }, options));\r\n\r\n return _.compact([\r\n column({\r\n name: 'EventType',\r\n title: 'UETTags_Event_Grid_ColumnEventType',\r\n sortable: false,\r\n helpId: 'pop_BA_UET_EventType',\r\n }),\r\n column({\r\n name: 'EventAction',\r\n title: 'UETTags_Event_Grid_ColumnEvents',\r\n sortable: false,\r\n template: ({ value }) => {\r\n return value === '' ? '-' : value;\r\n },\r\n }),\r\n column({\r\n name: 'PageURL',\r\n title: 'UETTags_Event_Grid_URL',\r\n sortable: false,\r\n helpId: '',\r\n template: ({ value }) => {\r\n return value === '' ? '-' : value;\r\n },\r\n }),\r\n column({\r\n name: 'ParameterMap',\r\n title: 'UETTags_Event_Grid_ColumnParametersReceived',\r\n sortable: false,\r\n helpId: 'pop_BA_UET_ParametersRec',\r\n template: ({ value }) => {\r\n if (_.isEmpty(value)) {\r\n return '-';\r\n }\r\n let val = '';\r\n\r\n for (const key in value) {\r\n val += `${key}: ${value[key]}, `;\r\n }\r\n val = val.slice(0, -2);\r\n return parametersColumnTemplate({\r\n val,\r\n i18n,\r\n });\r\n },\r\n }),\r\n column({\r\n name: 'LastReceived',\r\n title: 'UETTags_Event_Grid_ColumnLastReceived',\r\n sortable: false,\r\n helpId: 'pop_BA_UET_LastRec',\r\n template: ({ value }) => {\r\n const updateDate = new Date(value);\r\n const now = new Date();\r\n const delta = Math.floor(now.getTime() / 1000) - Math.floor(updateDate.getTime() / 1000);\r\n\r\n if (delta >= 86400) {\r\n return Math.floor(delta / 86400) === 1 ? `${Math.floor(delta / 86400).toString()} day ago` : `${Math.floor(delta / 86400).toString()} days ago`;\r\n } else if (delta >= 3600) {\r\n return Math.floor(delta / 3600) === 1 ? `${Math.floor(delta / 3600).toString()} hour ago` : `${Math.floor(delta / 3600).toString()} hours ago`;\r\n } else {\r\n return Math.floor(delta / 60) === 1 ? `${Math.floor(delta / 60).toString()} minute ago` : `${Math.floor(delta / 60).toString()} minutes ago`;\r\n }\r\n },\r\n }),\r\n ]);\r\n}\r\n","import _ from 'underscore';\r\nimport logger from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport { editablePlugin } from '@bingads-webui-campaign/projection-grid-editable';\r\nimport dateFilterPlugin from '@bingads-webui-campaign-legacy/bingadsgrid/vnext/plugin/date-filter';\r\nimport { performanceLogPlugin, perfMarkerPlugin } from '@bingads-webui-campaign/pgrid-performance-log';\r\nimport { a11yPlugin } from '@bingads-webui/projection-grid-a11y';\r\n\r\nexport const getDefaultPlugins = ({\r\n i18n,\r\n isForVNext,\r\n appConfig,\r\n permissions,\r\n pluginFactories,\r\n perfMarker,\r\n}) => _.compact([\r\n { plugin: perfMarkerPlugin, config: { appConfig, marker: perfMarker } },\r\n { plugin: a11yPlugin, config: { i18n } },\r\n { plugin: dateFilterPlugin },\r\n (!appConfig.get('CurrentAccountInActive') && !permissions.IsReadOnlyUser) && {\r\n plugin: editablePlugin,\r\n config: { i18n },\r\n },\r\n {\r\n plugin: performanceLogPlugin,\r\n config: {\r\n appConfig,\r\n logger,\r\n },\r\n },\r\n {\r\n plugin: pluginFactories.placeholderPlugin,\r\n config: {\r\n container: '.uet-tags-test-table .grid-noresult',\r\n text: i18n.getString('Grid_NoRecords'),\r\n filteredContainer: isForVNext ? '.grid-noresult' : '.uet-tags-test-table .grid-noresult',\r\n filteredEmptyText: i18n.getString('Grid_NoFilteredRecords'),\r\n ignoreFilters: [{\r\n 'Status': {\r\n $in: null,\r\n },\r\n }],\r\n },\r\n },\r\n]);\r\n","import _ from 'underscore';\r\nimport $ from 'jquery';\r\nimport kendo from '@bingads-webui/kendo/kendo.core';\r\nimport edm from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport { helpers } from '@bingads-webui/projection-grid-toolbar';\r\nimport { sortableHeaderTemplate } from '@bingads-webui-campaign/summary-grid-helper';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport stateManager from '@bingads-webui-component-legacy/statemanager/campaignStateManager';\r\nimport preferenceService from '@bingads-webui-component-legacy/preference/service/index';\r\n\r\nexport class UETTagsGridDashboardConfig {\r\n constructor({\r\n preferenceConfig,\r\n columnConfig,\r\n isManagerDashboardView,\r\n appConfig,\r\n afterFindAllCallback,\r\n windowNameStorage,\r\n options: {\r\n customHeaderOffset,\r\n viewport,\r\n },\r\n dataSource,\r\n isForVNext,\r\n i18n,\r\n }) {\r\n const tableName = i18n.getString('UnifiedEventTracking_Goal_Creation_Tag');\r\n\r\n const currentAccount = config.get('CurrentAccount');\r\n const formatDateInEntitySet = (date) => kendo.toString(date, 'yyyy-MM-dd');\r\n const parseDate = (dateString) => kendo.parseDate(dateString);\r\n\r\n const start = preferenceConfig.dataSource.query.startDate;\r\n const end = preferenceConfig.dataSource.query.endDate;\r\n\r\n const startDate = formatDateInEntitySet(parseDate(start));\r\n const endDate = formatDateInEntitySet(parseDate(end));\r\n\r\n const startDateEpoch = new Date(startDate);\r\n const endDateEpoch = new Date(endDate);\r\n\r\n const timeDiff = endDateEpoch.getTime() - startDateEpoch.getTime();\r\n const hoursDiff = Math.floor(timeDiff / (1000 * 60 * 60)); const daysDiff = Math.floor(timeDiff / (1000 * 60 * 60 * 24));\r\n const monthsDiff = (endDateEpoch.getMonth() - startDateEpoch.getMonth()) + (12 * (endDateEpoch.getFullYear() - startDateEpoch.getFullYear()));\r\n\r\n let granularity;\r\n\r\n if (monthsDiff > 12) {\r\n granularity = 'Quarter';\r\n } else if (monthsDiff <= 6 && monthsDiff >= 2) {\r\n granularity = 'Week';\r\n } else if (hoursDiff === 0 || daysDiff === 1) {\r\n granularity = 'Hour';\r\n } else {\r\n granularity = 'Day';\r\n }\r\n\r\n const queryParams = new URLSearchParams(window.location.search);\r\n const tagId = Number(queryParams.get('tagId'));\r\n\r\n edm.customerIdType.useAdvertiserCustomerId = !isManagerDashboardView;\r\n\r\n const entitySet = isManagerDashboardView ? edm.currentCustomer.Tags['Default.GetTagDashboardSummary'] : edm.currentAccount.Tags['Default.GetTagDashboardSummary'];\r\n\r\n _.extend(this, {\r\n name: preferenceConfig.name || 'UETTagsDashboardGrid',\r\n tableClasses: ['table', 'table-bordered'],\r\n dataSource,\r\n query: _.extend(preferenceConfig.dataSource || {}, {\r\n options: _.defaults({\r\n entitySet: entitySet.$call({\r\n tagId,\r\n timezoneId: currentAccount.TimeZone,\r\n performanceTimeSeriesParameters: {\r\n Granularity: granularity,\r\n },\r\n startDate,\r\n endDate,\r\n }),\r\n cacheResponse: false,\r\n afterFindAll: afterFindAllCallback,\r\n }, appConfig.get('CurrentUser').IsInternal && windowNameStorage.get('rcid') > 0 ? {\r\n headers: { 'x-ms-rootcid': windowNameStorage.get('rcid') },\r\n } : {}),\r\n }),\r\n config,\r\n stateManager,\r\n preferenceService,\r\n sortableHeader: _.defaults(preferenceConfig.sortableHeader, {\r\n name: 'EventAction',\r\n directionIndex: 0,\r\n template: sortableHeaderTemplate,\r\n }),\r\n rows: {\r\n headRows: isForVNext ? [\r\n 'column-header-rows',\r\n ] :\r\n helpers.singleToolbarHeadRows(),\r\n },\r\n scrolling: {\r\n header: {\r\n type: 'sticky',\r\n offset: customHeaderOffset || (() => $('nav.navbar-default.navbar-fixed-top').height()),\r\n attributes: { 'aria-label': i18n.getString('{{tableName}} table header', { tableName }) },\r\n },\r\n virtualized: true,\r\n },\r\n tableAttributes: { 'aria-label': tableName },\r\n columns: columnConfig,\r\n });\r\n\r\n if (viewport) {\r\n this.scrolling.viewport = viewport;\r\n }\r\n }\r\n}\r\n","\r\n\r\nexport const getQueryStartAndEndDates = (i18n) => {\r\n const date = new Date();\r\n const fourteenDaysAgoDate = new Date(\r\n date.getFullYear(),\r\n date.getMonth(),\r\n date.getDate() - 13,\r\n date.getHours(),\r\n date.getMinutes(),\r\n );\r\n const dateFormat = 'yyyy-MM-dd';\r\n\r\n const startDate = i18n.formatDate(fourteenDaysAgoDate, { raw: dateFormat });\r\n const endDate = i18n.formatDate(new Date(), { raw: dateFormat });\r\n\r\n return {startDate, endDate};\r\n};\r\n","import { edmCampaign } from '@bingads-webui/edm-campaign';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport kendo from '@bingads-webui/kendo/kendo.core';\r\nimport { WaterfallFilterStorage, WaterfallFilterType, waterfallDateFilterProcessor } from '@bingads-webui-campaign/filter-storage';\r\nimport { getQueryStartAndEndDates } from './query-config';\r\nimport { notificationApi } from '@bingads-webui-react/notification-center';\r\n\r\nexport default class ExportData {\r\n\r\n download = (action, i18n, permissions, serverContext, preferenceService) => {\r\n const queryParams = new URLSearchParams(window.location.search);\r\n const aid = queryParams.get('aid');\r\n const cid = aid ? config.get('CurrentAccount').AdvertiserCustomerID : queryParams.get('cid');\r\n const currentAccount = config.get('CurrentAccount');\r\n const formatDateInEntitySet = (date) => kendo.toString(date, 'yyyy-MM-dd');\r\n const parseDate = (dateString) => kendo.parseDate(dateString);\r\n const UETDashboardPhase2Enabled = permissions.dynamic.UETDashboardPhase2;\r\n const tagId = Number(queryParams.get('tagId'));\r\n const waterfallFilterStorage = new WaterfallFilterStorage({ preferenceService });\r\n const dateFilter = waterfallDateFilterProcessor(\r\n waterfallFilterStorage.getFilters([WaterfallFilterType.DateFilter]),\r\n serverContext,\r\n );\r\n\r\n const start = dateFilter.RangeStartDate;\r\n const end = dateFilter.RangeEndDate;\r\n\r\n const startDate = UETDashboardPhase2Enabled ? formatDateInEntitySet(parseDate(start)) : getQueryStartAndEndDates(i18n).startDate;\r\n const endDate = UETDashboardPhase2Enabled ? formatDateInEntitySet(parseDate(end)) : getQueryStartAndEndDates(i18n).endDate;\r\n\r\n if (cid && aid) {\r\n return edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .Tags['Default.GetExportUrlForTagEventDetail']\r\n .$makeCall({\r\n payload: {\r\n tagId,\r\n 'timezoneId': currentAccount.TimeZone,\r\n startDate,\r\n endDate,\r\n eventAction: action,\r\n },\r\n })\r\n .toPromise().then((tagResponse) => {\r\n if (tagResponse && tagResponse.value) {\r\n // eslint-disable-next-line no-undef\r\n notificationApi.showInfo(i18n.getString(_TL_('We are creating your report and it will be downloaded shortly.')), {\r\n autoDismissTime: 1000,\r\n });\r\n return tagResponse.value;\r\n } else {\r\n return null;\r\n }\r\n },\r\n ).catch(() => {\r\n // eslint-disable-next-line no-undef\r\n notificationApi.showWarning(i18n.getString(_TL_('An unexpected error occurred during download. Please try again.')), {\r\n autoDismissTime: 1000,\r\n });\r\n });\r\n } else if (cid) {\r\n return edmCampaign\r\n .Customers.$withKey(cid)\r\n .Tags['Default.GetExportUrlForTagEventDetail']\r\n .$makeCall({\r\n payload: {\r\n tagId,\r\n 'timezoneId': currentAccount.TimeZone,\r\n startDate,\r\n endDate,\r\n eventAction: action,\r\n },\r\n })\r\n .toPromise().then((tagResponse) => {\r\n if (tagResponse && tagResponse.value) {\r\n // eslint-disable-next-line no-undef\r\n notificationApi.showInfo(i18n.getString(_TL_('We are creating your report and it will be downloaded shortly.')), {\r\n autoDismissTime: 1000,\r\n });\r\n return tagResponse.value;\r\n } else {\r\n return null;\r\n }\r\n },\r\n ).catch(() => {\r\n // eslint-disable-next-line no-undef\r\n notificationApi.showWarning(i18n.getString(_TL_('An unexpected error occurred during download. Please try again.')), {\r\n autoDismissTime: 1000,\r\n });\r\n });\r\n } else {\r\n return null;\r\n }\r\n };\r\n}\r\n","import _ from 'underscore';\r\nimport $ from 'jquery';\r\nimport Promise from 'bluebird';\r\nimport { updateGridQuery } from '@bingads-webui-campaign/summary-grid-helper';\r\nimport { Storage } from '@bingads-webui/window-name-store';\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\nimport { DeterministicWrapperView } from '@bingads-webui/deterministic-wrapper-view';\r\nimport edm from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport jsdataCampaign from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport preferencesService from '@bingads-webui-component-legacy/preference/service/index';\r\nimport { handleSortChange } from '@bingads-webui-campaign-legacy/bingadsgrid/service/state-manager-helper';\r\nimport { contents } from '@bingads-webui-campaign-legacy/popover/index';\r\nimport parametersReceivedPopoverTemplate from './parameters-received-template';\r\nimport { isActiveTrackingStatusForUet } from '@bingads-webui-campaign-legacy/common-grid-config/controls/tracking-status-popover';\r\nimport { SharedLibraryUtils } from '@bingads-webui-campaign-react/shared-library-scopes';\r\nimport { ClientCenterCustomerService } from '@bingads-webui/clientcenter-customer-service';\r\nimport { getErrorMessage } from '@bingads-webui-campaign-legacy/conversion-tracking/common/util/index';\r\nimport { getUETTagDashboardGridColumnConfig } from '@bingads-webui-campaign-legacy/conversion-tracking/uet-tags-dashboard/grid/column-config';\r\nimport { getDefaultPlugins } from '@bingads-webui-campaign-legacy/conversion-tracking/uet-tags-dashboard/grid/plugin-config';\r\nimport { UETTagsGridDashboardConfig } from '@bingads-webui-campaign-legacy/conversion-tracking/uet-tags-dashboard/grid/grid-config';\r\nimport ExportData from './export-data';\r\n\r\nconst schema = window.globalLegacySchema.get('Tag');\r\nconst s$i18n = window.globalLegacyI18n.get('$/schema-i18n!campaign');\r\n\r\nexport function fetchCustomerHierarchy() {\r\n const windowNameStorage = new Storage();\r\n const currentUser = config.get('CurrentUser');\r\n // In ui-next serverContext, ParentCustomerId are put in CurrentUser\r\n const parentCustomerId = _.isUndefined(currentUser.ParentCustomerId) ? config.get('ParentCustomerId') : currentUser.ParentCustomerId;\r\n const currentCustomer = config.get('CurrentCustomer');\r\n const loginCID = currentUser.IsInternal ? windowNameStorage.get('rcid') || currentCustomer.Id : parentCustomerId;\r\n const ccCustomerService = new ClientCenterCustomerService({ ccBaseUrl: config.get('CCBaseUrl') });\r\n const fetchCustomerHierarchyPromise = ccCustomerService.getCustomerHierarchy({\r\n cid: loginCID,\r\n uid: currentUser.Id,\r\n returnOnlyDirectlyLinkedEntities: false,\r\n });\r\n const fetchUserPermissionPromise = fetchCustomerHierarchyPromise.then((data) => {\r\n const { customerHierarchyEntities: customerHierarchy } = data;\r\n const { Id: currentCustomerId } = currentCustomer;\r\n\r\n return SharedLibraryUtils.fetchUserPermissions({\r\n uid: currentUser.Id,\r\n cid: currentCustomerId,\r\n customerHierarchy,\r\n });\r\n });\r\n\r\n return Promise.join(fetchCustomerHierarchyPromise, fetchUserPermissionPromise, (data) => {\r\n const { customerHierarchyEntities: customerHierarchy } = data;\r\n\r\n return customerHierarchy;\r\n });\r\n}\r\n\r\nexport class UETTagsDashboardGrid extends DeterministicWrapperView {\r\n viewFactory({\r\n i18n,\r\n preferenceConfig,\r\n dataSource,\r\n $blocker,\r\n permissions = {},\r\n isManagerDashboardView = false,\r\n pgridFactory,\r\n pluginFactories,\r\n preferenceService,\r\n extendPlugins = () => [],\r\n isForVNext,\r\n customHeaderOffset,\r\n sortableHeader,\r\n viewport,\r\n filterService,\r\n router,\r\n customerHierarchy,\r\n onShowPanel,\r\n showPopup,\r\n showAccountListPopup,\r\n perfMarker,\r\n renderThirdPartyIntegrationView,\r\n serverContext,\r\n }) {\r\n const windowNameStorage = new Storage();\r\n\r\n this.isManagerDashboardView = isManagerDashboardView;\r\n this.permissions = permissions;\r\n this.i18n = i18n;\r\n this.$blocker = $blocker;\r\n this.filterService = filterService;\r\n this.router = router;\r\n this.customerHierarchy = customerHierarchy;\r\n this.isForVNext = isForVNext;\r\n this.onShowPanel = onShowPanel;\r\n this.showPopup = showPopup;\r\n this.showAccountListPopup = showAccountListPopup;\r\n this.isInitialGrid = true;\r\n this.renderThirdPartyIntegrationView = renderThirdPartyIntegrationView;\r\n this.serverContext = serverContext;\r\n this.preferenceService = preferenceService;\r\n\r\n edm.customerIdType.useAdvertiserCustomerId = !isManagerDashboardView;\r\n const columnConfig = getUETTagDashboardGridColumnConfig({\r\n updateHandler: _.bind(this.updateHandler, this),\r\n customerHierarchy: this.customerHierarchy,\r\n isManagerDashboardView,\r\n windowNameStorage,\r\n isActiveTrackingStatusForUet,\r\n isForVNext,\r\n deps: {\r\n i18n,\r\n s$i18n,\r\n permissions,\r\n config,\r\n },\r\n });\r\n const gridConfig = new UETTagsGridDashboardConfig({\r\n preferenceConfig,\r\n columnConfig,\r\n dataSource,\r\n isManagerDashboardView,\r\n appConfig: config,\r\n afterFindAllCallback: _.bind(this.onGridDataLoaded, this),\r\n windowNameStorage,\r\n options: {\r\n customHeaderOffset,\r\n sortableHeader,\r\n viewport,\r\n },\r\n isForVNext: this.isForVNext,\r\n i18n,\r\n });\r\n\r\n const defaultPlugins = getDefaultPlugins({\r\n $blocker,\r\n i18n,\r\n s$i18n,\r\n view: this,\r\n appConfig: config,\r\n preferencesService,\r\n permissions,\r\n pluginFactories,\r\n isForVNext,\r\n perfMarker,\r\n });\r\n const extendedPlugins = extendPlugins({\r\n view: this,\r\n gridConfig,\r\n });\r\n\r\n this.grid = pgridFactory({\r\n gridConfig,\r\n plugins: defaultPlugins.concat(extendedPlugins),\r\n preferenceConfig: preferenceConfig || {},\r\n });\r\n this.gridView = this.grid.gridView;\r\n this.gridView.on('didUpdate', (changes) => {\r\n // for the perf issue, should not patch preference when init view\r\n if (this.isInitialGrid) {\r\n this.isInitialGrid = false;\r\n return;\r\n }\r\n handleSortChange(changes, this.gridView, gridConfig.name);\r\n });\r\n\r\n if (this.filterService) {\r\n this.listenTo(this.filterService, 'filter-state-changed', () => {\r\n updateGridQuery(this.gridView, this.filterService.getCombinedFilter(), true);\r\n });\r\n }\r\n\r\n return this.gridView;\r\n }\r\n\r\n get events() {\r\n const permissions = this.permissions;\r\n const serverContext = this.serverContext;\r\n const preferenceService = this.preferenceService;\r\n\r\n return _.defaults({\r\n 'click .uet-tags-dashboard-grid__data-view-tag': (e) => {\r\n const item = this.gridView.itemOfElement(e.target);\r\n\r\n new ExportData().download(item.EventAction, this.i18n, permissions, serverContext, preferenceService).then((response) => {\r\n window.open(response);\r\n }).catch((err) => {\r\n throw err;\r\n });\r\n },\r\n 'click .uet-tags-dashboard-grid__parameters-tag': 'onShowParametersReceivedDetails',\r\n }, this.isForVNext ? {\r\n 'mouseenter .uet-tags-dashboard-grid__parameters-tag': 'onShowParametersReceivedDetails',\r\n 'mouseleave .uet-tags-dashboard-grid__parameters-tag': 'hidePopup',\r\n } : {});\r\n }\r\n\r\n onShowParametersReceivedDetails(e) {\r\n this.onShowParametersReceivedPopover(e);\r\n }\r\n\r\n onShowParametersReceivedPopover(e) {\r\n const item = this.gridView.itemOfElement(e.target);\r\n\r\n if (_.isEmpty(item)) {\r\n return;\r\n }\r\n\r\n if (_.isFunction(this.showPopup)) {\r\n const contentView = new contents.TitledContent()\r\n .setBody({\r\n html: parametersReceivedPopoverTemplate({\r\n value: item.Parameters,\r\n i18n: this.i18n,\r\n newi18n: this.newI18n,\r\n }),\r\n });\r\n\r\n this.showPopup({\r\n containerSelector: '#rejectionContainer',\r\n title: this.i18n.getString('UETTags_Event_Grid_Parameters', { item: `${item.Parameters.length}` }),\r\n contentView,\r\n event: e,\r\n parentView: this,\r\n popoverClassName: 'trackingStatusPopover',\r\n });\r\n }\r\n }\r\n\r\n hidePopup(e) {\r\n if ($(e.relatedTarget).closest('#popup-callout').length === 0) {\r\n this.trigger('closePopup');\r\n }\r\n }\r\n\r\n onGridDataLoaded(options, data) {\r\n return data;\r\n }\r\n\r\n updateHandler(originalItem, patch, editorView) {\r\n const windowNameStorage = new Storage();\r\n\r\n jsdataCampaign.Tag.update(originalItem[schema.key], patch, _.extend({\r\n cacheResponse: false,\r\n entitySet: this.isManagerDashboardView ? edm.currentCustomer.Tags : edm.currentAccount.Tags,\r\n }, config.get('CurrentUser').IsInternal && windowNameStorage.get('rcid') > 0 ? {\r\n headers: { 'x-ms-rootcid': windowNameStorage.get('rcid') },\r\n } : {}))\r\n .then(() => {\r\n if (editorView) {\r\n editorView.trigger('save', patch);\r\n }\r\n this.gridView.refresh(true);\r\n })\r\n .catch((res) => {\r\n const errors = [];\r\n\r\n if (!res || !res.errors) {\r\n errors.push(getErrorMessage('default', this.i18n));\r\n } else {\r\n _.each(res.errors, (error) => {\r\n errors.push(getErrorMessage(error.Code, this.i18n));\r\n });\r\n }\r\n if (editorView) {\r\n editorView.setErrors({ $overall: errors });\r\n }\r\n }).finally(withUiBlock(this.$blocker, this.i18n.getString('loadingtext')));\r\n }\r\n\r\n removeCreateView() {\r\n if (this.createView) {\r\n this.createView.off();\r\n this.createView.remove();\r\n this.createView = null;\r\n }\r\n }\r\n\r\n renderTrunk() {\r\n if (this.isForVNext) {\r\n this.filterService.initializeCombinedFilterPromise.then(() => {\r\n updateGridQuery(this.gridView, this.filterService.getCombinedFilter(), true);\r\n });\r\n }\r\n super.renderTrunk();\r\n }\r\n\r\n remove() {\r\n this.removeCreateView();\r\n return super.remove();\r\n }\r\n}\r\n\r\nexport { getQueryStartAndEndDates } from './query-config';\r\n","import _ from 'underscore';\r\nimport { bingadsGridColumn } from '@bingads-webui-component-legacy/bingads-grid/shared/column';\r\nimport dataColumnTemplate from '@bingads-webui-campaign-legacy/conversion-tracking/uet-tags-dashboard/grid/data-template';\r\nimport parametersColumnTemplate from '@bingads-webui-campaign-legacy/conversion-tracking/uet-tags-dashboard/grid/parameters-template';\r\n\r\nexport function getUETTagDashboardGridColumnConfig({\r\n deps,\r\n}) {\r\n const {\r\n i18n,\r\n } = deps;\r\n const column = (options) => bingadsGridColumn(_.defaults({ i18n }, options));\r\n\r\n return _.compact([\r\n column({\r\n name: 'EventAction',\r\n title: 'UETTags_Event_Grid_ColumnEvents',\r\n sortable: false,\r\n template: ({ value }) => {\r\n return value === '' ? '-' : value;\r\n },\r\n }),\r\n column({\r\n name: 'EventType',\r\n title: 'UETTags_Event_Grid_ColumnEventType',\r\n sortable: false,\r\n helpId: 'pop_BA_UET_EventType',\r\n }),\r\n column({\r\n name: 'TotalCount',\r\n title: 'UETTags_Event_Grid_ColumnTotalEvents',\r\n sortable: false,\r\n helpId: 'pop_BA_UET_TotalEvent',\r\n type: 'number',\r\n format: 'integer',\r\n }),\r\n column({\r\n name: 'Parameters',\r\n title: 'UETTags_Event_Grid_ColumnParametersReceived',\r\n sortable: false,\r\n helpId: 'pop_BA_UET_ParametersRec',\r\n template: ({ value }) => {\r\n return parametersColumnTemplate({\r\n value,\r\n i18n,\r\n });\r\n },\r\n }),\r\n column({\r\n name: 'LastReceived',\r\n title: 'UETTags_Event_Grid_ColumnLastReceived',\r\n sortable: false,\r\n helpId: 'pop_BA_UET_LastRec',\r\n template: ({ value }) => {\r\n const updateDate = new Date(value);\r\n const now = new Date();\r\n const delta = Math.floor(now.getTime() / 1000) - Math.floor(updateDate.getTime() / 1000);\r\n\r\n if (delta >= 86400) {\r\n return Math.floor(delta / 86400) === 1 ? `${Math.floor(delta / 86400).toString()} day ago` : `${Math.floor(delta / 86400).toString()} days ago`;\r\n } else if (delta >= 3600) {\r\n return Math.floor(delta / 3600) === 1 ? `${Math.floor(delta / 3600).toString()} hour ago` : `${Math.floor(delta / 3600).toString()} hours ago`;\r\n } else {\r\n return Math.floor(delta / 60) === 1 ? `${Math.floor(delta / 60).toString()} minute ago` : `${Math.floor(delta / 60).toString()} minutes ago`;\r\n }\r\n },\r\n }),\r\n column({\r\n name: 'EventAction',\r\n title: 'UETTags_Event_Grid_ColumnAction',\r\n sortable: false,\r\n helpId: 'pop_BA_UET_Action',\r\n template: ({ value }) => {\r\n return dataColumnTemplate({\r\n value,\r\n i18n,\r\n });\r\n },\r\n }),\r\n ]);\r\n}\r\n","import _ from 'underscore';\r\nimport logger from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport { editablePlugin } from '@bingads-webui-campaign/projection-grid-editable';\r\nimport { toolbarPlugin, helpers } from '@bingads-webui/projection-grid-toolbar';\r\nimport uiBlockerPlugin from '@bingads-webui-component-legacy/bingads-grid/plugin/ui-blocker';\r\nimport dateFilterPlugin from '@bingads-webui-campaign-legacy/bingadsgrid/vnext/plugin/date-filter';\r\nimport { performanceLogPlugin, perfMarkerPlugin } from '@bingads-webui-campaign/pgrid-performance-log';\r\nimport { a11yPlugin } from '@bingads-webui/projection-grid-a11y';\r\n\r\nexport const getDefaultPlugins = ({\r\n $blocker,\r\n i18n,\r\n isForVNext,\r\n appConfig,\r\n permissions,\r\n pluginFactories,\r\n perfMarker,\r\n}) => _.compact([\r\n { plugin: perfMarkerPlugin, config: { appConfig, marker: perfMarker } },\r\n { plugin: a11yPlugin, config: { i18n } },\r\n { plugin: dateFilterPlugin },\r\n (!appConfig.get('CurrentAccountInActive') && !permissions.IsReadOnlyUser) && {\r\n plugin: editablePlugin,\r\n config: { i18n },\r\n },\r\n {\r\n plugin: uiBlockerPlugin,\r\n config: { el: $blocker },\r\n },\r\n {\r\n plugin: pluginFactories.paginationPlugin,\r\n config: {\r\n pageSize: 20,\r\n availablePageSizes: [20, 50, 100, 200],\r\n enableRandomPage: false,\r\n pageNumberLabelText: i18n.getString('Grid_Page_Number_Label_Text'),\r\n pageSizeText: i18n.getString('Grid_ShowRows'),\r\n totalPageCountText: i18n.getString('Grid_PageOf'),\r\n resetPageNumberOnSort: true,\r\n },\r\n },\r\n {\r\n plugin: performanceLogPlugin,\r\n config: {\r\n appConfig,\r\n logger,\r\n },\r\n },\r\n {\r\n plugin: pluginFactories.placeholderPlugin,\r\n config: {\r\n container: '.uet-tags-dashboard-page .grid-noresult',\r\n text: i18n.getString('Grid_NoRecords'),\r\n filteredContainer: isForVNext ? '.grid-noresult' : '.uet-tags-dashboard-page .grid-noresult',\r\n filteredEmptyText: i18n.getString('Grid_NoFilteredRecords'),\r\n ignoreFilters: [{\r\n 'Status': {\r\n $in: null,\r\n },\r\n }],\r\n },\r\n },\r\n {\r\n plugin: toolbarPlugin,\r\n config: helpers.singleToolbar({\r\n items: [{\r\n type: 'dropdown',\r\n id: 'dropdown-filter',\r\n }, {\r\n type: 'search-box',\r\n id: 'search-box-filter',\r\n }],\r\n }),\r\n },\r\n]);\r\n","/* eslint-disable new-cap */\r\nimport _ from 'underscore';\r\nimport Backbone from 'backbone';\r\nimport { Storage } from '@bingads-webui/window-name-store';\r\nimport formTemplate from '@bingads-webui-campaign-legacy/conversion-tracking/uet-tags/create/template.pug';\r\nimport { getErrorMessage, cleanAlerts } from '@bingads-webui-campaign-legacy/conversion-tracking/common/util/index';\r\nimport jsdataCampaign from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport TagViewer from '@bingads-webui-static-legacy/uet/view/tagViewer';\r\nimport edm from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\nimport { SimpleForm } from '@bingads-webui/simple-form';\r\nimport {\r\n SharedLibraryUtils,\r\n UETTagManageSopeView,\r\n} from '@bingads-webui-campaign-react/shared-library-scopes';\r\nimport { ClientCenterCustomerService } from '@bingads-webui/clientcenter-customer-service';\r\nimport instrumentation from '@bingads-webui-campaign-legacy/instrumentation/index';\r\nimport sharingTemplate from '@bingads-webui-campaign-legacy/conversion-tracking/uet-tags/create/sharing-template.pug';\r\n\r\nconst s$Tag = window.globalLegacySchema.get('Tag');\r\nconst schemai18n = window.globalLegacyI18n.get('$/schema-i18n!campaign');\r\n\r\nexport class CreateView extends Backbone.View {\r\n get events() {\r\n return {\r\n 'click .btn-tag-create-save': 'saveTag',\r\n 'click .btn-tag-create-cancel': 'cancelTag',\r\n };\r\n }\r\n\r\n initialize({\r\n i18n,\r\n $blocker,\r\n permissions,\r\n appConfig,\r\n isManagerDashboardView,\r\n model = {},\r\n }) {\r\n const groupFields = [{\r\n property: 'Name',\r\n label: i18n.getString('UnifiedEventTracking_Tags_Create_TagName'),\r\n placeholder: i18n.getString('UnifiedEventTracking_Tags_PlaceHolderForTagName'),\r\n validators: {\r\n maxLength: {\r\n message: i18n.getString('UnifiedEventTracking_Tags_ErrorMessageForTagName'),\r\n blockInput: false,\r\n },\r\n },\r\n }, {\r\n property: 'Description',\r\n label: i18n.getString('UnifiedEventTracking_Tags_Create_TagDescription'),\r\n placeholder: i18n.getString('UnifiedEventTracking_Tags_PlaceHolderForTagDescription'),\r\n validators: {\r\n maxLength: {\r\n message: i18n.getString('UnifiedEventTracking_Tags_ErrorMessageForTagDescription'),\r\n blockInput: false,\r\n },\r\n },\r\n }];\r\n\r\n groupFields.push({\r\n property: 'IsClarityTagEnabled',\r\n label: i18n.getString('UnifiedEventTracking_Tags_Create_ClarityOption'),\r\n control: 'checkbox',\r\n message: `${i18n.getString('UnifiedEventTracking_Tags_ClarityDescription')} ${i18n.getString('LearnMore')}
${i18n.getString('UnifiedEventTracking_Tags_ClarityDescription_2')}`,\r\n values: [1, 0],\r\n });\r\n this.i18n = i18n;\r\n this.permissions = permissions;\r\n this.appConfig = appConfig;\r\n this.alertIds = [];\r\n this.$blocker = $blocker;\r\n this.isEditView = !_.isEmpty(model);\r\n this.tagEntity = model;\r\n this.vmDefault = _.pick(model, 'Name', 'Description', 'IsClarityTagEnabled');\r\n if (_.isEmpty(this.vmDefault)) {\r\n this.vmDefault.IsClarityTagEnabled = 1; // by default check the checkbox\r\n }\r\n this.isManagerDashboardView = isManagerDashboardView;\r\n this.windowNameStorage = new Storage();\r\n this.editForm = new SimpleForm({\r\n schema: s$Tag,\r\n s$i18n: schemai18n,\r\n showButtons: false,\r\n i18n,\r\n fields: [{\r\n type: 'group',\r\n description: this.isEditView ? i18n.getString('UnifiedEventTracking_Tags_EditTagPanelTitleDescription') : i18n.getString('UnifiedEventTracking_Tags_CreateTagPanelTitleDescription'),\r\n fields: groupFields,\r\n }],\r\n model: this.vmDefault,\r\n });\r\n this.listenTo(this.editForm, 'clickHelpIcon', (e) => {\r\n window.PopupController.PopupJsClick(e.target);\r\n });\r\n this.initializeInstrumentation();\r\n }\r\n\r\n initializeInstrumentation() {\r\n const scenarios = {\r\n testUetClarity: instrumentation.testUetClarity.create(),\r\n };\r\n\r\n this.activities = {\r\n createTag: scenarios.testUetClarity.createTag.create(),\r\n editTag: scenarios.testUetClarity.editTag.create(),\r\n };\r\n }\r\n\r\n convertSharingScope({ treeSelection }) {\r\n return treeSelection || {Accounts: [], Customers: [], Others: 0, Total: 0 };\r\n }\r\n\r\n saveTag() {\r\n const vm = this.editForm.viewModel;\r\n const payload = _.defaults(\r\n {\r\n Description: vm.Description(),\r\n Name: vm.Name(),\r\n },\r\n { IsClarityTagEnabled: vm.IsClarityTagEnabled() },\r\n this.tagSharingView ? { Owner: this.owner } : null,\r\n this.tagSharingView ? { SharingScope: this.convertSharingScope(this.tagSharingView.getSharingScope()) } : null,\r\n );\r\n\r\n if (this.isEditView) {\r\n this.activities.editTag.trace(\r\n `Edit: clarity ${this.vmDefault.IsClarityTagEnabled} to ${payload.IsClarityTagEnabled}`, // Mes\r\n 'EditTagWithClarity', // Api\r\n );\r\n jsdataCampaign.Tag.update(this.tagEntity[s$Tag.key], payload, _.extend({\r\n cacheResponse: false,\r\n entitySet: this.isManagerDashboardView ? edm.currentCustomer.Tags : edm.currentAccount.Tags,\r\n }, this.appConfig.get('CurrentUser').IsInternal && this.windowNameStorage.get('rcid') > 0 ? {\r\n headers: { 'x-ms-rootcid': this.windowNameStorage.get('rcid') },\r\n } : {}))\r\n .then(() => {\r\n this.trigger('finishTagEdit');\r\n })\r\n .catch((res) => {\r\n cleanAlerts(this.alertIds);\r\n this.alertIds = _.map(res.errors, (error) =>\r\n window.App.views.alertCenter.show({\r\n message: getErrorMessage(error.Code, this.i18n),\r\n level: 'Error',\r\n }));\r\n })\r\n .finally(withUiBlock(this.$blocker, this.i18n.getString('loadingtext')));\r\n } else {\r\n this.activities.createTag.trace(\r\n `Create: clarity ${this.vmDefault.IsClarityTagEnabled} to ${payload.IsClarityTagEnabled}`, // Mes\r\n 'CreateTagWithClarity', // Api\r\n );\r\n jsdataCampaign.Tag.create(payload, _.extend({\r\n cacheResponse: false,\r\n entitySet: this.isManagerDashboardView ? edm.currentCustomer.Tags : edm.currentAccount.Tags,\r\n }, this.appConfig.get('CurrentUser').IsInternal && this.windowNameStorage.get('rcid') > 0 ? {\r\n headers: { 'x-ms-rootcid': this.windowNameStorage.get('rcid') },\r\n } : {}))\r\n .then((item) => {\r\n this.trigger('finishTagCreation');\r\n new TagViewer({\r\n tag: {\r\n name: item.Name,\r\n id: item.Id,\r\n script: item.TrackingCode,\r\n },\r\n }).render();\r\n })\r\n .catch((res) => {\r\n cleanAlerts(this.alertIds);\r\n this.alertIds = _.map(res.errors, (error) =>\r\n window.App.views.alertCenter.show({\r\n message: getErrorMessage(error.Code, this.i18n),\r\n level: 'Error',\r\n }));\r\n })\r\n .finally(withUiBlock(this.$blocker, this.i18n.getString('loadingtext')));\r\n }\r\n }\r\n\r\n cancelTag() {\r\n this.trigger('cancelTagCreation');\r\n }\r\n\r\n render() {\r\n this.$el.html(formTemplate({\r\n i18n: this.i18n,\r\n isEdit: this.isEditView,\r\n }));\r\n this.$('.uet-tags__form-container').append(this.editForm.render().$el);\r\n\r\n const { IsCustomerHierarchyEnabled, IsSharedLibraryPhase1Enabled } = this.permissions;\r\n\r\n if (IsCustomerHierarchyEnabled && IsSharedLibraryPhase1Enabled) {\r\n const currentUser = this.appConfig.get('CurrentUser');\r\n const currentCustomer = _.pick(this.appConfig.get('CurrentCustomer'), ['Id', 'Name', 'Number']);\r\n const { Id: userId } = currentUser;\r\n // In ui-next serverContext, ParentCustomerId are put in CurrentUser\r\n const parentCustomerId = _.isUndefined(currentUser.ParentCustomerId) ? this.appConfig.get('ParentCustomerId') : currentUser.ParentCustomerId;\r\n const loginCID = currentUser.IsInternal ? this.windowNameStorage.get('rcid') || currentCustomer.Id : parentCustomerId;\r\n\r\n if (SharedLibraryUtils.isSuperAdmin({ uid: userId, cid: currentCustomer.Id })) {\r\n const ccCustomerService = new ClientCenterCustomerService({ ccBaseUrl: this.appConfig.get('CCBaseUrl') });\r\n\r\n if (SharedLibraryUtils.isInAccountScope()) {\r\n const currentAccount = this.appConfig.get('CurrentAccount');\r\n const { AdvertiserCustomerID: parentCid } = currentAccount || {};\r\n\r\n // TODO: xuwu - we need also populate the Name and Number of the advertiserCustomer\r\n this.owner = !_.isFinite(parentCid) || parentCid === currentCustomer.Id ? currentCustomer : { Id: parentCid };\r\n } else {\r\n this.owner = currentCustomer;\r\n }\r\n\r\n ccCustomerService.getCustomerHierarchy({\r\n cid: loginCID,\r\n uid: userId,\r\n returnOnlyDirectlyLinkedEntities: false,\r\n }).then((data) => {\r\n const { customerHierarchyEntities: customerHierarchy } = data;\r\n\r\n if (SharedLibraryUtils.hasChildCustomers(customerHierarchy, { cid: loginCID }) && !SharedLibraryUtils.isLinkedAccount(this.appConfig)) {\r\n this.tagSharingView = new UETTagManageSopeView({\r\n customerHierarchy,\r\n scopeOptions: [{\r\n id: SharedLibraryUtils.Scopes.CUSTOMER,\r\n text: this.i18n.getString('SharedLibrary_Tag_SharingScope_Customer', { account: `${this.owner.Name} (${this.owner.Number})` }),\r\n }, {\r\n id: SharedLibraryUtils.Scopes.HIERARCHY,\r\n text: this.i18n.getString('SharedLibrary_Tag_SharingScope_Hierarchy'),\r\n }],\r\n tagEntity: {\r\n Owner: this.owner,\r\n SharingScope: { Customers: [], Accounts: [], Others: 0, Total: 0 },\r\n },\r\n deps: { i18n: this.i18n },\r\n });\r\n }\r\n\r\n if (this.tagSharingView) {\r\n this.$('.uet-tags__form-container form > div[data-type]').append(sharingTemplate({ i18n: this.i18n }));\r\n this.$('#Form-SharedLibrary-Tag-Sharing').append(this.tagSharingView.render().$el);\r\n }\r\n }).finally(withUiBlock(this.$blocker, this.i18n.getString('loadingtext')));\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n\r\n remove() {\r\n this.editForm.remove();\r\n if (this.tagSharingView) {\r\n this.tagSharingView.remove();\r\n this.tagSharingView = null;\r\n }\r\n\r\n super.remove();\r\n cleanAlerts(this.alertIds);\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { bingadsGridColumn } from '@bingads-webui-component-legacy/bingads-grid/shared/column';\r\nimport { SharedLibraryUtils } from '@bingads-webui-campaign-react/shared-library-scopes';\r\nimport actionColumnTemplate from '@bingads-webui-campaign-legacy/conversion-tracking/uet-tags/grid/action-template.pug';\r\nimport trackingStatusColumnTemplate from '@bingads-webui-campaign-legacy/conversion-tracking/uet-tags/grid/tracking-status-template.pug';\r\nimport tagIdTemplate from '@bingads-webui-campaign-legacy/conversion-tracking/uet-tags/grid/tag-id-template.pug';\r\nimport goalsTemplate from '@bingads-webui-campaign-legacy/conversion-tracking/uet-tags/grid/goals-template.pug';\r\nimport audienceTemplate from '@bingads-webui-campaign-legacy/conversion-tracking/uet-tags/grid/audience-template.pug';\r\nimport sharedUsedbyTemplate from '@bingads-webui-campaign-legacy/conversion-tracking/uet-tags/grid/column-shared-usedby-template.pug';\r\nimport nameTemplate from '@bingads-webui-campaign-legacy/conversion-tracking/uet-tags/grid/name-template.pug';\r\n\r\nconst noData = '-';\r\n\r\nfunction getTagIdLink({ IsUETDashboardEnabled, value, i18n }) {\r\n if (!_.isFinite(value)) {\r\n return noData;\r\n }\r\n\r\n return tagIdTemplate({ IsUETDashboardEnabled, value, i18n });\r\n}\r\n\r\nexport function getUETTagGridColumnConfig({\r\n isManagerDashboardView,\r\n windowNameStorage,\r\n // updateHandler,\r\n customerHierarchy,\r\n isActiveTrackingStatusForUet,\r\n deps,\r\n isForVNext,\r\n}) {\r\n const {\r\n i18n,\r\n s$i18n,\r\n permissions,\r\n config,\r\n } = deps;\r\n const { IsCustomerHierarchyEnabled, IsSharedLibraryPhase1Enabled } = permissions;\r\n const IsUETDashboardEnabled = permissions.dynamic.UETDashboard;\r\n const IsUETDashboardPhase2Enabled = permissions.dynamic.UETDashboardPhase2;\r\n const column = (options) => bingadsGridColumn(_.defaults({ i18n }, options));\r\n\r\n return _.compact([\r\n column({\r\n name: 'Name',\r\n title: 'UETTags_Grid_ColumnTagName',\r\n property: _.identity,\r\n sortable: 'Name',\r\n editable: undefined,\r\n template: ({ value: tag }) => {\r\n const enableEdit = IsCustomerHierarchyEnabled && IsSharedLibraryPhase1Enabled && _.result(tag.SharingScope, 'Total') > 0 ? SharedLibraryUtils.isEntityOwner(tag, config) : true;\r\n\r\n return nameTemplate({\r\n IsUETDashboardPhase2Enabled,\r\n isEditable: enableEdit && !tag.IsReadOnly,\r\n isReadOnly: tag.IsReadOnly,\r\n name: tag.Name,\r\n ariaLabel: 'Click to edit UET tag',\r\n });\r\n },\r\n }),\r\n column({\r\n name: 'Description',\r\n title: 'UETTags_Grid_ColumnTagDescription',\r\n sortable: true,\r\n editable: undefined,\r\n }),\r\n column({\r\n name: 'Id',\r\n title: 'UETTags_Grid_ColumnTagId',\r\n sortable: true,\r\n template: ({ value }) => {\r\n return getTagIdLink({\r\n IsUETDashboardEnabled,\r\n value,\r\n i18n,\r\n });\r\n },\r\n }),\r\n column({\r\n name: 'TrackingStatus',\r\n title: 'UETTags_Grid_ColumnTrackingStatus',\r\n sortable: true,\r\n bodyClasses: 'UET-tags-column-TrackingStatus',\r\n property: {\r\n key: 'TrackingStatus',\r\n get: (value) => _.pick(value, ['TrackingStatus', 'IsReadOnly']),\r\n },\r\n helpId: 'pop_BA_UET_TrackingStatus',\r\n template: ({ value: { TrackingStatus: value, IsReadOnly } }) => {\r\n if (!IsReadOnly) {\r\n return trackingStatusColumnTemplate({ value, isForVNext, s$i18n, isActiveTrackingStatus: isActiveTrackingStatusForUet });\r\n }\r\n return noData;\r\n },\r\n }),\r\n IsSharedLibraryPhase1Enabled && IsCustomerHierarchyEnabled ?\r\n column({\r\n name: 'Owner',\r\n title: 'UETTags_Grid_ColumnTagOwner',\r\n sortable: false,\r\n helpId: '',\r\n template: ({ value }) => `${value.Name} (${value.Number})`,\r\n }) : null,\r\n IsSharedLibraryPhase1Enabled && IsCustomerHierarchyEnabled ?\r\n column({\r\n name: 'SharingScope',\r\n title: 'SharedLibrary_GridColumn_Scope',\r\n helpId: '',\r\n bodyClasses: 'UET-tags-column-SharingScope',\r\n property: {\r\n key: 'SharingScope',\r\n get: (value) => _.pick(value, ['SharingScope', 'Owner']),\r\n },\r\n template: ({ value: { SharingScope, Owner } }) => {\r\n if (_.isNull(SharingScope)) { // when switch to linked accounts\r\n return '--';\r\n }\r\n if (_.result(SharingScope, 'Total') <= 1) {\r\n return `${Owner.Name} (${Owner.Number})`;\r\n }\r\n return sharedUsedbyTemplate({\r\n className: 'uet-tags-grid__shared-scope',\r\n text: i18n.getString('UETTags_Grid_Number_Accounts', { number: _.result(SharingScope, 'Total') }),\r\n isForVNext,\r\n });\r\n },\r\n }) : null,\r\n IsSharedLibraryPhase1Enabled && IsCustomerHierarchyEnabled ?\r\n column({\r\n name: 'UsedBy',\r\n title: 'UETTags_Grid_ColumnUsedBy',\r\n helpId: '',\r\n bodyClasses: 'UET-tags-column-UsedBy',\r\n template: ({ value }) => {\r\n if (_.isNull(value)) { // when switch to linked accounts\r\n return '--';\r\n }\r\n if (value.Total === 0) {\r\n return i18n.getString('UnifiedEventTracking_None');\r\n }\r\n if (value.Total === 1) {\r\n if (value.Others === 1) {\r\n return i18n.getString('SharedLibrary_One_Other_Account');\r\n }\r\n\r\n const { Name, Number } = _.first(value.Customers);\r\n\r\n return `${Name} (${Number})`;\r\n }\r\n return sharedUsedbyTemplate({\r\n className: 'uet-tags-grid__used-by',\r\n text: i18n.getString('UETTags_Grid_Number_Accounts', { number: value.Total }),\r\n isForVNext,\r\n });\r\n },\r\n }) : null,\r\n column({\r\n name: 'GoalsCount',\r\n title: 'UETTags_Grid_ColumnGoals',\r\n sortable: true,\r\n helpId: 'pop_BA_UET_Goals',\r\n template: ({ value }) => {\r\n return goalsTemplate({\r\n value: value ? value : i18n.getString('UnifiedEventTracking_None'),\r\n disabled: isManagerDashboardView,\r\n ariaLabel: i18n.getString('ClickToGoals'),\r\n });\r\n },\r\n type: 'number',\r\n }),\r\n column({\r\n name: 'AudiencesCount',\r\n title: 'UETTags_Grid_ColumnAudiences',\r\n sortable: true,\r\n helpId: 'pop_BA_UET_Audience',\r\n template: ({ value }) => {\r\n return audienceTemplate({\r\n value: value ? value : i18n.getString('UnifiedEventTracking_None'),\r\n disabled: isManagerDashboardView,\r\n ariaLabel: i18n.getString('ClickToAudiences'),\r\n });\r\n },\r\n type: 'number',\r\n }),\r\n column({\r\n name: 'Action',\r\n sortable: false,\r\n title: 'UETTags_Grid_ColumnAction',\r\n property: {\r\n key: 'Action',\r\n get: (value) => _.pick(value, ['SharingScope', 'Owner']),\r\n },\r\n template: ({ value }) => {\r\n const currentUser = config.get('CurrentUser');\r\n // In ui-next serverContext, ParentCustomerId are put in CurrentUser\r\n const parentCustomerId = _.isUndefined(currentUser.ParentCustomerId) ? config.get('ParentCustomerId') : currentUser.ParentCustomerId;\r\n const currentCustomer = config.get('CurrentCustomer');\r\n const loginCID = currentUser.IsInternal ? windowNameStorage.get('rcid') || currentCustomer.Id : parentCustomerId;\r\n\r\n return actionColumnTemplate({\r\n value,\r\n i18n,\r\n manageScopePermission: IsCustomerHierarchyEnabled && IsSharedLibraryPhase1Enabled && _.all([\r\n SharedLibraryUtils.isSuperAdmin({ uid: currentUser.Id, cid: value.Owner.Id }),\r\n SharedLibraryUtils.isLinkedAccount(config) === false,\r\n // user on customer that have no child customers in hierarchy is\r\n // not able to manage tag scope, except when the tag is already shared\r\n // to other customers by super admin on parent customers\r\n SharedLibraryUtils.hasChildCustomers(customerHierarchy, { cid: loginCID }) || _.result(value.SharingScope, 'Total') > 0,\r\n ]),\r\n });\r\n },\r\n }),\r\n ]);\r\n}\r\n","import _ from 'underscore';\r\nimport $ from 'jquery';\r\nimport jsdataCampaign from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport edm from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport { helpers } from '@bingads-webui/projection-grid-toolbar';\r\nimport { sortableHeaderTemplate } from '@bingads-webui-campaign/summary-grid-helper';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport stateManager from '@bingads-webui-component-legacy/statemanager/campaignStateManager';\r\nimport preferenceService from '@bingads-webui-component-legacy/preference/service/index';\r\n\r\nconst schema = window.globalLegacySchema.get('Tag');\r\n\r\nexport class UETTagsGridConfig {\r\n constructor({\r\n preferenceConfig,\r\n columnConfig,\r\n isManagerDashboardView,\r\n appConfig,\r\n afterFindAllCallback,\r\n windowNameStorage,\r\n options: {\r\n customHeaderOffset,\r\n viewport,\r\n },\r\n isForVNext,\r\n i18n,\r\n isUETTagDeletionEnabled,\r\n }) {\r\n const tableName = i18n.getString('UnifiedEventTracking_Goal_Creation_Tag');\r\n\r\n _.extend(this, {\r\n name: preferenceConfig.name || 'UETTagsGrid',\r\n tableClasses: ['table', 'table-bordered'],\r\n dataSource: {\r\n type: 'jsdata',\r\n entity: jsdataCampaign.Tag,\r\n schema,\r\n },\r\n query: _.defaults(preferenceConfig.dataSource || {}, {\r\n entitySet: isManagerDashboardView ? edm.currentCustomer.Tags.toJSON() : edm.currentAccount.Tags.toJSON(),\r\n options: _.extend({\r\n cacheResponse: false,\r\n afterFindAll: afterFindAllCallback,\r\n }, appConfig.get('CurrentUser').IsInternal && windowNameStorage.get('rcid') > 0 ? {\r\n headers: { 'x-ms-rootcid': windowNameStorage.get('rcid') },\r\n } : {}),\r\n }),\r\n config,\r\n stateManager,\r\n preferenceService,\r\n sortableHeader: _.defaults(preferenceConfig.sortableHeader, {\r\n name: 'Name',\r\n directionIndex: 0,\r\n template: sortableHeaderTemplate,\r\n }),\r\n rows: {\r\n headRows: isForVNext ? [\r\n 'column-header-rows',\r\n ] :\r\n helpers.singleToolbarHeadRows(),\r\n },\r\n scrolling: {\r\n header: {\r\n type: 'sticky',\r\n offset: customHeaderOffset || (() => $('nav.navbar-default.navbar-fixed-top').height()),\r\n attributes: { 'aria-label': i18n.getString('{{tableName}} table header', { tableName }) },\r\n },\r\n virtualized: true,\r\n },\r\n tableAttributes: { 'aria-label': tableName },\r\n columns: columnConfig,\r\n },\r\n isUETTagDeletionEnabled && {selection: true},\r\n );\r\n\r\n if (viewport) {\r\n this.scrolling.viewport = viewport;\r\n }\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport $ from 'jquery';\r\nimport Promise from 'bluebird';\r\nimport { Storage } from '@bingads-webui/window-name-store';\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\nimport { DeterministicWrapperView } from '@bingads-webui/deterministic-wrapper-view';\r\nimport { notificationApi, NotificationLevel } from '@bingads-webui-react/notification-center';\r\nimport edm from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport jsdataCampaign from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport TagViewer from '@bingads-webui-static-legacy/uet/view/tagViewer';\r\nimport preferencesService from '@bingads-webui-component-legacy/preference/service/index';\r\nimport { updateGridQuery } from '@bingads-webui-campaign/summary-grid-helper';\r\nimport { handleSortChange } from '@bingads-webui-campaign-legacy/bingadsgrid/service/state-manager-helper';\r\nimport { isActiveTrackingStatusForUet, showTrackingStatusDetails } from '@bingads-webui-campaign-legacy/common-grid-config/controls/tracking-status-popover';\r\nimport { contents } from '@bingads-webui-campaign-legacy/popover/index';\r\nimport helpLinkTemplate from '@bingads-webui-campaign-legacy/common-grid-config/controls/help-link-template.pug';\r\nimport trackingStatusPopoverTemplate from '@bingads-webui-campaign-legacy/common-grid-config/controls/tracking-status-popover-template.pug';\r\nimport tagReadOnlyPopoverTemplate from '@bingads-webui-campaign-legacy/conversion-tracking/uet-tags/grid/tag-read-only-popover-template.pug';\r\nimport { PopoverView, positions } from '@bingads-webui/popover';\r\nimport AccountListView from '@bingads-webui-campaign-legacy/common-grid-config/controls/account-list-view';\r\nimport { SharedLibraryUtils, UETTagManageScopeDialog } from '@bingads-webui-campaign-react/shared-library-scopes';\r\nimport { ClientCenterCustomerService } from '@bingads-webui/clientcenter-customer-service';\r\nimport { getErrorMessage } from '@bingads-webui-campaign-legacy/conversion-tracking/common/util/index';\r\nimport { CreateView } from '@bingads-webui-campaign-legacy/conversion-tracking/uet-tags/create/index';\r\nimport { getUETTagGridColumnConfig } from '@bingads-webui-campaign-legacy/conversion-tracking/uet-tags/grid/column-config';\r\nimport { getDefaultPlugins } from '@bingads-webui-campaign-legacy/conversion-tracking/uet-tags/grid/plugin-config';\r\nimport { UETTagsGridConfig } from '@bingads-webui-campaign-legacy/conversion-tracking/uet-tags/grid/grid-config';\r\n\r\nconst schema = window.globalLegacySchema.get('Tag');\r\nconst s$i18n = window.globalLegacyI18n.get('$/schema-i18n!campaign');\r\n\r\nexport function fetchCustomerHierarchy() {\r\n const windowNameStorage = new Storage();\r\n const currentUser = config.get('CurrentUser');\r\n // In ui-next serverContext, ParentCustomerId are put in CurrentUser\r\n const parentCustomerId = _.isUndefined(currentUser.ParentCustomerId) ? config.get('ParentCustomerId') : currentUser.ParentCustomerId;\r\n const currentCustomer = config.get('CurrentCustomer');\r\n const loginCID = currentUser.IsInternal ? windowNameStorage.get('rcid') || currentCustomer.Id : parentCustomerId;\r\n const ccCustomerService = new ClientCenterCustomerService({ ccBaseUrl: config.get('CCBaseUrl') });\r\n const fetchCustomerHierarchyPromise = ccCustomerService.getCustomerHierarchy({\r\n cid: loginCID,\r\n uid: currentUser.Id,\r\n returnOnlyDirectlyLinkedEntities: false,\r\n });\r\n const fetchUserPermissionPromise = fetchCustomerHierarchyPromise.then((data) => {\r\n const { customerHierarchyEntities: customerHierarchy } = data;\r\n const { Id: currentCustomerId } = currentCustomer;\r\n\r\n return SharedLibraryUtils.fetchUserPermissions({\r\n uid: currentUser.Id,\r\n cid: currentCustomerId,\r\n customerHierarchy,\r\n });\r\n });\r\n\r\n return Promise.join(fetchCustomerHierarchyPromise, fetchUserPermissionPromise, (data) => {\r\n const { customerHierarchyEntities: customerHierarchy } = data;\r\n\r\n return customerHierarchy;\r\n });\r\n}\r\n\r\nexport class UETTagsGrid extends DeterministicWrapperView {\r\n viewFactory({\r\n i18n,\r\n preferenceConfig,\r\n $blocker,\r\n permissions = {},\r\n isManagerDashboardView = false,\r\n pgridFactory,\r\n pluginFactories,\r\n extendPlugins = () => [],\r\n isForVNext,\r\n customHeaderOffset,\r\n sortableHeader,\r\n viewport,\r\n filterService,\r\n router,\r\n customerHierarchy,\r\n onShowPanel,\r\n showPopup,\r\n showAccountListPopup,\r\n perfMarker,\r\n renderThirdPartyIntegrationView,\r\n }) {\r\n const windowNameStorage = new Storage();\r\n\r\n this.isManagerDashboardView = isManagerDashboardView;\r\n this.permissions = permissions;\r\n this.i18n = i18n;\r\n this.$blocker = $blocker;\r\n this.filterService = filterService;\r\n this.router = router;\r\n this.customerHierarchy = customerHierarchy;\r\n this.isForVNext = isForVNext;\r\n this.onShowPanel = onShowPanel;\r\n this.showPopup = showPopup;\r\n this.showAccountListPopup = showAccountListPopup;\r\n this.isInitialGrid = true;\r\n this.renderThirdPartyIntegrationView = renderThirdPartyIntegrationView;\r\n\r\n edm.customerIdType.useAdvertiserCustomerId = !isManagerDashboardView;\r\n\r\n const columnConfig = getUETTagGridColumnConfig({\r\n updateHandler: _.bind(this.updateHandler, this),\r\n customerHierarchy: this.customerHierarchy,\r\n isManagerDashboardView,\r\n windowNameStorage,\r\n isActiveTrackingStatusForUet,\r\n isForVNext,\r\n deps: {\r\n i18n,\r\n s$i18n,\r\n permissions,\r\n config,\r\n },\r\n });\r\n const isUETTagDeletionEnabled = _.get(permissions, ['dynamic', 'UETTagDeletion']);\r\n const gridConfig = new UETTagsGridConfig({\r\n preferenceConfig,\r\n columnConfig,\r\n isManagerDashboardView,\r\n appConfig: config,\r\n afterFindAllCallback: _.bind(this.onGridDataLoaded, this),\r\n windowNameStorage,\r\n options: {\r\n customHeaderOffset,\r\n sortableHeader,\r\n viewport,\r\n },\r\n isForVNext: this.isForVNext,\r\n i18n,\r\n isUETTagDeletionEnabled,\r\n });\r\n const defaultPlugins = getDefaultPlugins({\r\n $blocker,\r\n i18n,\r\n s$i18n,\r\n view: this,\r\n appConfig: config,\r\n preferencesService,\r\n permissions,\r\n pluginFactories,\r\n isForVNext,\r\n perfMarker,\r\n });\r\n const extendedPlugins = extendPlugins({\r\n view: this,\r\n gridConfig,\r\n });\r\n\r\n this.grid = pgridFactory({\r\n gridConfig,\r\n plugins: defaultPlugins.concat(extendedPlugins),\r\n preferenceConfig: preferenceConfig || {},\r\n });\r\n this.gridView = this.grid.gridView;\r\n this.gridView.on('didUpdate', (changes) => {\r\n // for the perf issue, should not patch preference when init view\r\n if (this.isInitialGrid) {\r\n this.isInitialGrid = false;\r\n return;\r\n }\r\n handleSortChange(changes, this.gridView, gridConfig.name);\r\n });\r\n\r\n if (this.filterService) {\r\n this.listenTo(filterService, 'filter-state-changed', () => {\r\n updateGridQuery(this.gridView, this.filterService.getCombinedFilter(), true);\r\n });\r\n }\r\n\r\n return this.gridView;\r\n }\r\n\r\n get events() {\r\n return _.defaults({\r\n 'click .edit-tag-link': (e) => {\r\n const item = this.gridView.itemOfElement(e.target);\r\n const isUETDashboardPhase2Enabled = config.get('Permissions').dynamic.UETDashboardPhase2;\r\n\r\n if (isUETDashboardPhase2Enabled) {\r\n if (!_.isEmpty(item)) {\r\n this.router.navigateToTagIdPage({ tagId: item.Id });\r\n }\r\n } else {\r\n this.trigger('editTag', item);\r\n }\r\n },\r\n 'click .edit-tag-btn': (e) => {\r\n const item = this.gridView.itemOfElement(e.target);\r\n\r\n this.trigger('editTag', item);\r\n },\r\n 'click .link-tag-id': (e) => {\r\n const item = this.gridView.itemOfElement(e.target);\r\n\r\n if (!_.isEmpty(item)) {\r\n if (item.TrackingStatus === 'InactiveDueToTagUnavailable') {\r\n notificationApi.add({\r\n severity: NotificationLevel.Error,\r\n title: '',\r\n message: this.i18n.getString('UETTags_Grid_TrackingStatusMessage_InactiveDueToTagUnavailable'),\r\n target: 'FloatingBanner',\r\n });\r\n return;\r\n }\r\n this.router.navigateToTagIdPage({ tagId: item.Id });\r\n }\r\n },\r\n 'click .uet-tags-grid__action-view-tag': (e) => {\r\n const item = this.gridView.itemOfElement(e.target);\r\n\r\n new TagViewer({\r\n tag: {\r\n name: item.Name,\r\n id: item.Id,\r\n script: item.TrackingCode,\r\n },\r\n renderThirdPartyIntegrationView: this.renderThirdPartyIntegrationView,\r\n }).render();\r\n },\r\n 'click .uet-tags-grid__action-manage-sharing-scope': (e) => {\r\n const item = this.gridView.itemOfElement(e.target);\r\n\r\n if (!_.isEmpty(item) && this.onShowPanel) {\r\n this.onShowPanel({\r\n customerHierarchy: this.customerHierarchy,\r\n scopeOptions: [{\r\n id: SharedLibraryUtils.Scopes.CUSTOMER,\r\n text: this.i18n.getString('SharedLibrary_Tag_SharingScope_Customer', { account: `${item.Owner.Name} (${item.Owner.Number})` }),\r\n }, {\r\n id: SharedLibraryUtils.Scopes.HIERARCHY,\r\n text: this.i18n.getString('SharedLibrary_Tag_SharingScope_Hierarchy'),\r\n }],\r\n selectedOption: item.SharingScope.Total > 0 ? SharedLibraryUtils.Scopes.HIERARCHY : SharedLibraryUtils.Scopes.CUSTOMER,\r\n tagEntity: item,\r\n deps: { i18n: this.i18n },\r\n onShowPanel: this.onShowPanel,\r\n update: ({ treeSelection }) => {\r\n const updatedScope = treeSelection || { Accounts: [], Customers: [], Others: 0, Total: 0 };\r\n\r\n this.updateHandler(item, { SharingScope: updatedScope });\r\n },\r\n });\r\n return;\r\n }\r\n const tagSharingView = new UETTagManageScopeDialog({\r\n dialogOptions: {\r\n title: this.i18n.getString('SharedLibrary_UET_ManageScopeDialog_Title'),\r\n },\r\n customerHierarchy: this.customerHierarchy,\r\n scopeOptions: [{\r\n id: SharedLibraryUtils.Scopes.CUSTOMER,\r\n text: this.i18n.getString('SharedLibrary_Tag_SharingScope_Customer', { account: `${item.Owner.Name} (${item.Owner.Number})` }),\r\n }, {\r\n id: SharedLibraryUtils.Scopes.HIERARCHY,\r\n text: this.i18n.getString('SharedLibrary_Tag_SharingScope_Hierarchy'),\r\n }],\r\n selectedOption: item.SharingScope.Total > 0 ? SharedLibraryUtils.Scopes.HIERARCHY : SharedLibraryUtils.Scopes.CUSTOMER,\r\n tagEntity: item,\r\n deps: { i18n: this.i18n },\r\n withFooter: true,\r\n }).render();\r\n\r\n tagSharingView.on('save', ({ treeSelection }) => {\r\n const updatedScope = treeSelection || { Accounts: [], Customers: [], Others: 0, Total: 0 };\r\n\r\n this.updateHandler(item, { SharingScope: updatedScope });\r\n tagSharingView.remove();\r\n });\r\n tagSharingView.on('close cancel', () => {\r\n tagSharingView.remove();\r\n });\r\n },\r\n 'click .uet-tags-grid__tracking-status-detail': 'onShowTrackingStatusDetails',\r\n 'click .uet-tags-grid__shared-scope-detail': 'onShowSharedScopeDetails',\r\n 'click .uet-tags-grid__used-by-detail': 'onShowUsedByDetails',\r\n 'click .tag-grid__tag-readonly': 'onShowTagReadOnlyPopup',\r\n 'click .uet-tags-grid__link-goals': (e) => {\r\n const item = this.gridView.itemOfElement(e.target);\r\n\r\n if (_.isEmpty(item)) {\r\n return;\r\n }\r\n const { Id: tagId, GoalsCount: goalsCount } = item;\r\n\r\n if (this.router && _.isFunction(this.router.navigateToGoals)) {\r\n this.router.navigateToGoals({ tagId, goalsCount });\r\n return;\r\n }\r\n\r\n if (_.isFinite(goalsCount) && goalsCount > 0) {\r\n const filterExpression = {\r\n FilterExpressions: [{\r\n SelectedColumn: 'Id',\r\n SelectedOperator: 'Equal',\r\n Values: [`${tagId}`],\r\n }],\r\n };\r\n const escapedFilter = encodeURIComponent(JSON.stringify(filterExpression));\r\n\r\n window.App.navigate(`customer/:customer_id/account/:account_id/uet/goals/find/${escapedFilter}`);\r\n } else {\r\n window.App.navigate('customer/:customer_id/account/:account_id/uet/goals');\r\n }\r\n },\r\n 'click .uet-tags-grid__link-audience': (e) => {\r\n const item = this.gridView.itemOfElement(e.target);\r\n\r\n if (_.isEmpty(item)) {\r\n return;\r\n }\r\n const { Id: tagId, AudiencesCount: audiencesCount } = item;\r\n\r\n if (this.router && _.isFunction(this.router.navigateToAudiences)) {\r\n this.router.navigateToAudiences({ tagId, audiencesCount });\r\n return;\r\n }\r\n\r\n if (_.isFinite(audiencesCount) && audiencesCount > 0) {\r\n const filterExpression = {\r\n FilterExpressions: [{\r\n SelectedColumn: 'TagId',\r\n SelectedOperator: 'Equal',\r\n Values: [`${tagId}`],\r\n }],\r\n };\r\n const escapedFilter = encodeURIComponent(JSON.stringify(filterExpression));\r\n\r\n window.App.navigate(`customer/:customer_id/account/:account_id/library/audience/find/${escapedFilter}`);\r\n } else {\r\n window.App.navigate('customer/:customer_id/account/:account_id/library/audience');\r\n }\r\n },\r\n }, this.isForVNext ? {\r\n 'mouseenter .uet-tags-grid__tracking-status-detail': 'onShowTrackingStatusDetails',\r\n 'mouseenter .uet-tags-grid__used-by-detail': 'onShowUsedByDetails',\r\n 'mouseenter .uet-tags-grid__shared-scope-detail': 'onShowSharedScopeDetails',\r\n 'mouseenter .tag-grid__tag-readonly': 'onShowTagReadOnlyPopup',\r\n 'mouseleave .UET-tags-column-TrackingStatus': 'hidePopup',\r\n 'mouseleave .UET-tags-column-UsedBy': 'hidePopup',\r\n 'mouseleave .UET-tags-column-SharingScope': 'hidePopup',\r\n 'mouseleave .tag-grid__tag-readonly': 'hidePopup',\r\n } : {});\r\n }\r\n\r\n hidePopup(e) {\r\n if ($(e.relatedTarget).closest('#popup-callout').length === 0) {\r\n this.trigger('closePopup');\r\n }\r\n }\r\n\r\n onShowTrackingStatusDetails(e, title = this.i18n.getString('UETTags_Grid_ColumnTrackingStatus')) {\r\n if (this.isForVNext && _.isFunction(this.showPopup)) {\r\n const item = this.gridView.itemOfElement(e.target);\r\n const isUnverifiedOrInactive = item.TrackingStatus === this.i18n.getString('UnifiedEventTracking_Tags_TrackingStatus_Enum_Unverified') || item.TrackingStatus === this.i18n.getString('UnifiedEventTracking_Tags_TrackingStatus_Enum_InactiveTag');\r\n const isUETDashboardPhase2Enabled = config.get('Permissions').dynamic.UETDashboardPhase2;\r\n const isTrackingStatusColumn = title === this.i18n.getString('UETTags_Grid_ColumnTrackingStatus');\r\n\r\n if (_.isEmpty(item)) {\r\n return;\r\n }\r\n const a11yId = (suffix) => `${_.uniqueId('a11y-')}__${suffix}`;\r\n const contentView = new contents.TitledContent()\r\n .setBody({\r\n html: trackingStatusPopoverTemplate({\r\n i18n: this.i18n,\r\n helpLinkTemplate,\r\n troubleshootTopic: 'app51206',\r\n value: item.TrackingStatus,\r\n a11yId,\r\n isActiveTrackingStatus: isActiveTrackingStatusForUet,\r\n isUnverifiedOrInactive,\r\n isUETAllTagsDashboard: true,\r\n isUETDashboardPhase2Enabled,\r\n isTrackingStatusColumn,\r\n trackingStatusMessagePrefix: 'UETTags_Grid_TrackingStatusMessage_',\r\n }),\r\n }).delegateEvents({\r\n 'click .uetdashboard': () => {\r\n this.router.navigateToTagIdPage({ tagId: item.Id });\r\n }});\r\n\r\n this.showPopup({\r\n containerSelector: '#rejectionContainer',\r\n title: this.i18n.getString('UETTags_Grid_ColumnTrackingStatus'),\r\n contentView,\r\n event: e,\r\n parentView: this,\r\n });\r\n } else {\r\n showTrackingStatusDetails(\r\n this.gridView.itemOfElement(e.target),\r\n this.$(e.target),\r\n 'uet-tags-grid__tracking-status-popover',\r\n isActiveTrackingStatusForUet,\r\n this.i18n,\r\n 'UETTags_Grid_TrackingStatusMessage_',\r\n );\r\n }\r\n }\r\n\r\n onShowSharedScopeDetails(e) {\r\n const item = this.gridView.itemOfElement(e.target);\r\n\r\n if (_.isEmpty(item)) {\r\n return;\r\n }\r\n const { SharingScope: value } = item;\r\n\r\n if (this.isForVNext && _.isFunction(this.showAccountListPopup)) {\r\n this.showAccountListPopup({\r\n i18n: this.i18n,\r\n containerSelector: '#rejectionContainer',\r\n title: this.i18n.getString('Tag_Shared_To_Popover_Title', { number: value.Total }),\r\n subtitle: this.i18n.getString('Tag_Shared_To_Popover_Message'),\r\n event: e,\r\n value,\r\n parentView: this,\r\n });\r\n } else {\r\n const accountListView = new AccountListView({\r\n value,\r\n i18n: this.i18n,\r\n title: this.i18n.getString('Tag_Shared_To_Popover_Title', { number: value.Total }),\r\n subtitle: this.i18n.getString('Tag_Shared_To_Popover_Message'),\r\n footerText: value.Others > 0 ? this.i18n.getString('Tag_Popover_Number_Other_Accounts', { number: value.Others }) : null,\r\n });\r\n\r\n this.sharingScopePopoverView = new PopoverView({\r\n target: this.$(e.target),\r\n containerClassName: ['uet-tags-grid__shared-scope-popover'],\r\n position: positions.relativeToTableRow(),\r\n }).setContent(accountListView);\r\n }\r\n }\r\n\r\n onShowUsedByDetails(e) {\r\n const item = this.gridView.itemOfElement(e.target);\r\n\r\n if (_.isEmpty(item)) {\r\n return;\r\n }\r\n const { UsedBy: value } = item;\r\n\r\n if (this.isForVNext && _.isFunction(this.showAccountListPopup)) {\r\n this.showAccountListPopup({\r\n i18n: this.i18n,\r\n containerSelector: '#rejectionContainer',\r\n title: this.i18n.getString('Tag_Used_By_Popover_Title', { number: value.Total }),\r\n subtitle: this.i18n.getString('Tag_Used_By_Popover_Message'),\r\n value,\r\n event: e,\r\n parentView: this,\r\n });\r\n } else {\r\n const accountListView = new AccountListView({\r\n value,\r\n i18n: this.i18n,\r\n title: this.i18n.getString('Tag_Used_By_Popover_Title', { number: value.Total }),\r\n subtitle: this.i18n.getString('Tag_Used_By_Popover_Message'),\r\n footerText: value.Others > 0 ? this.i18n.getString('Tag_Popover_Number_Other_Accounts', { number: value.Others }) : null,\r\n });\r\n\r\n this.usedByPopoverView = new PopoverView({\r\n target: this.$(e.target),\r\n containerClassName: ['uet-tags-grid__used-by-popover'],\r\n position: positions.relativeToTableRow(),\r\n }).setContent(accountListView);\r\n }\r\n }\r\n\r\n onShowTagReadOnlyPopup(e) {\r\n const title = this.i18n.getString('Tag_ReadOnly_Popover_Title');\r\n const a11yId = (suffix) => `${_.uniqueId('a11y-')}__${suffix}`;\r\n const popupMessage = this.i18n.getString('Tag_ReadOnly_Popover_Message');\r\n\r\n if (this.isForVNext && _.isFunction(this.showPopup)) {\r\n const contentView = new contents.TitledContent()\r\n .setBody({\r\n html: tagReadOnlyPopoverTemplate({\r\n a11yId,\r\n popupMessage,\r\n }),\r\n });\r\n\r\n this.showPopup({\r\n containerSelector: '#rejectionContainer',\r\n title,\r\n contentView,\r\n event: e,\r\n parentView: this,\r\n });\r\n }\r\n }\r\n\r\n getCreationEditor({ permissions }) {\r\n this.createView = new CreateView({\r\n i18n: this.i18n,\r\n $blocker: this.$blocker,\r\n appConfig: config,\r\n permissions,\r\n isManagerDashboardView: this.isManagerDashboardView,\r\n });\r\n\r\n // toolbarEditor.overrideWith(this.createView.render());\r\n this.grid.toolbar.gridToolbarGroup.hideAllToolbars();\r\n this.createView.once('cancelTagCreation', () => {\r\n this.grid.toolbar.gridToolbarGroup.showAllToolbars();\r\n this.removeCreateView();\r\n });\r\n this.createView.once('finishTagCreation', () => {\r\n this.gridView.refresh(true);\r\n this.grid.toolbar.gridToolbarGroup.showAllToolbars();\r\n this.trigger('tagDidCreated');\r\n this.removeCreateView();\r\n });\r\n\r\n return this.createView;\r\n }\r\n\r\n onGridDataLoaded(options, data) {\r\n const { IsCustomerHierarchyEnabled, IsSharedLibraryPhase1Enabled } = this.permissions;\r\n\r\n if (IsCustomerHierarchyEnabled && IsSharedLibraryPhase1Enabled) {\r\n const ownerIds = _.map(data, (item) => item.Owner.Id);\r\n const { Id: currentCustomerId } = config.get('CurrentCustomer');\r\n\r\n ownerIds.push(currentCustomerId);\r\n SharedLibraryUtils.fetchUserPermissions({\r\n uid: config.get('CurrentUser').Id,\r\n cid: currentCustomerId,\r\n customerIds: ownerIds,\r\n }).then((allCIDCached) => {\r\n if (!allCIDCached) {\r\n this.gridView.refresh(true);\r\n }\r\n }).finally(withUiBlock(this.$blocker, this.i18n.getString('loadingtext')));\r\n }\r\n\r\n return data;\r\n }\r\n\r\n updateHandler(originalItem, patch, editorView) {\r\n const windowNameStorage = new Storage();\r\n\r\n jsdataCampaign.Tag.update(originalItem[schema.key], patch, _.extend({\r\n cacheResponse: false,\r\n entitySet: this.isManagerDashboardView ? edm.currentCustomer.Tags : edm.currentAccount.Tags,\r\n }, config.get('CurrentUser').IsInternal && windowNameStorage.get('rcid') > 0 ? {\r\n headers: { 'x-ms-rootcid': windowNameStorage.get('rcid') },\r\n } : {}))\r\n .then(() => {\r\n if (editorView) {\r\n editorView.trigger('save', patch);\r\n }\r\n this.gridView.refresh(true);\r\n })\r\n .catch((res) => {\r\n const errors = [];\r\n\r\n if (!res || !res.errors) {\r\n errors.push(getErrorMessage('default', this.i18n));\r\n } else {\r\n _.each(res.errors, (error) => {\r\n errors.push(getErrorMessage(error.Code, this.i18n));\r\n });\r\n }\r\n if (editorView) {\r\n editorView.setErrors({ $overall: errors });\r\n }\r\n }).finally(withUiBlock(this.$blocker, this.i18n.getString('loadingtext')));\r\n }\r\n\r\n removeCreateView() {\r\n if (this.createView) {\r\n this.createView.off();\r\n this.createView.remove();\r\n this.createView = null;\r\n }\r\n }\r\n\r\n renderTrunk() {\r\n if (this.isForVNext) {\r\n this.filterService.initializeCombinedFilterPromise.then(() => {\r\n updateGridQuery(this.gridView, this.filterService.getCombinedFilter(), true);\r\n });\r\n }\r\n super.renderTrunk();\r\n }\r\n\r\n remove() {\r\n this.removeCreateView();\r\n return super.remove();\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport logger from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport { editablePlugin } from '@bingads-webui-campaign/projection-grid-editable';\r\nimport { toolbarPlugin, helpers } from '@bingads-webui/projection-grid-toolbar';\r\nimport uiBlockerPlugin from '@bingads-webui-component-legacy/bingads-grid/plugin/ui-blocker';\r\nimport dateFilterPlugin from '@bingads-webui-campaign-legacy/bingadsgrid/vnext/plugin/date-filter';\r\nimport { performanceLogPlugin, perfMarkerPlugin } from '@bingads-webui-campaign/pgrid-performance-log';\r\nimport { a11yPlugin } from '@bingads-webui/projection-grid-a11y';\r\n\r\nexport const getDefaultPlugins = ({\r\n $blocker,\r\n i18n,\r\n view,\r\n appConfig,\r\n preferencesService,\r\n permissions,\r\n pluginFactories,\r\n isForVNext,\r\n perfMarker,\r\n}) => _.compact([\r\n { plugin: perfMarkerPlugin, config: { appConfig, marker: perfMarker } },\r\n { plugin: a11yPlugin, config: { i18n } },\r\n { plugin: dateFilterPlugin },\r\n (!appConfig.get('CurrentAccountInActive') && !permissions.IsReadOnlyUser) && {\r\n plugin: editablePlugin,\r\n config: { i18n },\r\n },\r\n {\r\n plugin: uiBlockerPlugin,\r\n config: { el: $blocker },\r\n },\r\n {\r\n plugin: pluginFactories.placeholderPlugin,\r\n config: {\r\n container: isForVNext ? '.grid-noresult' : '.uet-tags-grid__placeholder',\r\n text: i18n.getString('Grid_NoRecords'),\r\n filteredContainer: isForVNext ? '.grid-noresult' : '.uet-tags-grid__placeholder',\r\n filteredEmptyText: i18n.getString('Grid_NoFilteredRecords'),\r\n },\r\n },\r\n {\r\n plugin: pluginFactories.paginationPlugin,\r\n config: {\r\n pageSize: 20,\r\n availablePageSizes: [20, 50, 100, 200],\r\n enableRandomPage: false,\r\n pageNumberLabelText: i18n.getString('Grid_Page_Number_Label_Text'),\r\n pageSizeText: i18n.getString('Grid_ShowRows'),\r\n totalPageCountText: i18n.getString('Grid_PageOf'),\r\n resetPageNumberOnSort: true,\r\n },\r\n },\r\n {\r\n plugin: performanceLogPlugin,\r\n config: {\r\n appConfig,\r\n logger,\r\n },\r\n },\r\n {\r\n plugin: toolbarPlugin,\r\n config: helpers.singleToolbar({\r\n items: [{\r\n type: 'button',\r\n id: 'button-create-new-tag',\r\n classes: ['btn', 'btn-hero'],\r\n text: i18n.getString('UETTags_Grid_ButtonCreateNewTag'),\r\n onClick: () => {\r\n const createMoreTagsPrompt = preferencesService.findByName('WebApp.CampaignUI.UET.Tags.ShowCreateMoreTagsPrompt');\r\n\r\n if ((!createMoreTagsPrompt || createMoreTagsPrompt.Data) && view.gridView.getItemCount() > 0) {\r\n view.trigger('showModal');\r\n } else {\r\n view.trigger('createTag');\r\n }\r\n },\r\n }, {\r\n type: 'dropdown',\r\n id: 'dropdown-filter',\r\n }, {\r\n type: 'search-box',\r\n id: 'search-box-filter',\r\n }],\r\n }),\r\n },\r\n]);\r\n","import _ from 'underscore';\r\nimport Backbone from 'backbone';\r\n\r\nimport tmpl from '@bingads-webui-campaign-legacy/conversion-tracking/template/upload-conversions/changes-view.pug';\r\n\r\nimport ProjectionGrid from '@bingads-webui-component-legacy/github/modules/projection-grid/module/projection-grid';\r\nimport odata from '@bingads-webui-component-legacy/http/channel/odata';\r\nimport downloadService from '@bingads-webui-component-legacy/download/index';\r\n\r\nimport instrumentationSvc from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport instrumentSetting from '@bingads-webui-static-legacy/instrumentation/campaignSchemaAndSetting';\r\n\r\nimport PageContext from '@bingads-webui-static-legacy/page-context';\r\n\r\nconst i18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/conversion-tracking');\r\n\r\nconst urlTemplate = '/BulkUploadFiles/GetBulkFileUrl(CustomerId=:customer_id,FileIdentifier={{identifier}},BulkFileType={{type}})';\r\n\r\nexport default class View extends Backbone.View {\r\n\r\n get events() {\r\n return {\r\n 'click .btn-apply': 'applyChanges',\r\n 'click .btn-discard': 'discard',\r\n 'click .btn-results': 'downloadResults',\r\n 'click .link-errors': 'downloadErrors',\r\n 'click .btn-errors': 'downloadErrors',\r\n 'click .btn-close': 'close',\r\n };\r\n }\r\n\r\n initialize(options = {}) {\r\n this.options = options || {};\r\n this.isNewUI = !!options.isNewUI;\r\n this.isOfflineConversionGoalCurrencyCustomerScopeSupported = PageContext.Permissions && PageContext.Permissions.IsOfflineConversionGoalCurrencyCustomerScopeSupported;\r\n this.initGridConfig();\r\n }\r\n\r\n render() {\r\n if (this.isNewUI) {\r\n const { data, type } = this.options;\r\n\r\n this.successRows = type === 'review' ? data.SuccessCount : data.RowsProcessed;\r\n this.errorRows = this.options.type === 'review' ? data.ErrorCount : data.TotalRows - data.RowsProcessed;\r\n this.totalRows = (this.successRows || 0) + (this.errorRows || 0);\r\n }\r\n\r\n this.$el.html(tmpl({\r\n type: this.options.type,\r\n hasError: !!this.options.errorsIdentifier,\r\n hasUploadError: this.options.hasUploadError,\r\n hasAcrossAllAccountsOfflineConversionGoal: this.isOfflineConversionGoalCurrencyCustomerScopeSupported && !!this.options.data.HasAcrossAllAccountsOfflineConversionGoal,\r\n i18n,\r\n successRows: this.successRows,\r\n errorRows: this.errorRows,\r\n totalRows: this.totalRows,\r\n isNewUI: this.isNewUI,\r\n }));\r\n\r\n if (!this.isNewUI) {\r\n if (this.options.type === 'review') {\r\n this.config.el = this.$('.changes-grid');\r\n } else if (this.options.type === 'preview' || this.options.type === 'scheduled-preview') {\r\n this.config.el = this.$('.preview-grid');\r\n }\r\n this.grid = ProjectionGrid.factory({vnext: true}).create(this.config).gridView;\r\n this.grid.render();\r\n }\r\n\r\n if (instrumentationSvc.endActivity) {\r\n instrumentationSvc.endActivity();\r\n }\r\n\r\n return this;\r\n }\r\n\r\n initGridConfig() {\r\n switch (this.options.type) {\r\n case 'preview':\r\n case 'scheduled-preview': {\r\n this.config = this.initPreviewGrid(this.options.data);\r\n break;\r\n }\r\n case 'review': {\r\n this.config = this.initSummaryGrid(this.options.data);\r\n break;\r\n }\r\n default: {\r\n break;\r\n }\r\n }\r\n }\r\n\r\n initPreviewGrid(data) {\r\n const config = {\r\n tableClasses: ['table', 'table-bordered'],\r\n };\r\n\r\n config.dataSource = {\r\n type: 'memory',\r\n data: [{'SuccessCount': data.RowsProcessed, 'ErrorCount': data.TotalRows - data.RowsProcessed}],\r\n };\r\n\r\n config.columns = [{\r\n title: i18n.getString('Import_ColumnHeader_Additions'),\r\n name: 'SuccessCount',\r\n }, {\r\n title: i18n.getString('Import_ColumnHeader_Errors'),\r\n name: 'ErrorCount',\r\n }];\r\n\r\n return config;\r\n }\r\n\r\n initSummaryGrid(data) {\r\n const config = {\r\n tableClasses: ['table', 'table-bordered'],\r\n };\r\n\r\n config.dataSource = {\r\n type: 'memory',\r\n data: [{'SuccessCount': data.SuccessCount, 'ErrorCount': data.ErrorCount}],\r\n };\r\n\r\n config.columns = [{\r\n title: i18n.getString('Import_ColumnHeader_Updates'),\r\n name: 'SuccessCount',\r\n }, {\r\n title: i18n.getString('Import_ColumnHeader_Errors'),\r\n name: 'ErrorCount',\r\n }];\r\n\r\n return config;\r\n }\r\n\r\n handleGenericError(errorLog, err) {\r\n if (instrumentationSvc.logError) {\r\n instrumentationSvc.logError('UploadConversions/changesView/handleGenericError',\r\n `Failed on url ${errorLog.Url}`);\r\n }\r\n\r\n this.trigger('error', {\r\n errorMsgKey: 'UnifiedEventTracking_UploadConversions_GenericError',\r\n log: _.extend(\r\n _.pick(err, 'readyState', 'responseText', 'status', 'statusText'),\r\n _.pick(err.headers, 'x-ms-requestid', 'x-ms-trackingid'),\r\n errorLog),\r\n });\r\n }\r\n\r\n applyChanges() {\r\n //send the create commit rule request to odata api\r\n const op = {\r\n data: {\r\n '@odata.type': '#Model.OfflineConversionUploadTaskItem',\r\n 'FileIdentifier': '',\r\n 'SessionId': this.options.sessionId,\r\n 'Name': this.options.filename,\r\n 'Type': 'OfflineConversionUploadCommit',\r\n 'Cron': '',\r\n },\r\n },\r\n url = '/Customers()/Accounts()/TaskItems?$expand=TaskItemExecutions';\r\n\r\n this.$('.btn-apply').prop('disabled', true);\r\n odata.post(url, op).bind(this)\r\n .then((data) => {\r\n this.$('.btn-apply').prop('disabled', false);\r\n this.trigger('startApply', { TaskId: data.Id, ExecutionId: _.first(data.TaskItemExecutions).Id });\r\n })\r\n .catch((err) => {\r\n this.$('.btn-apply').prop('disabled', false);\r\n this.handleGenericError({Url: url, TaskSessionId: this.options.sessionId}, err);\r\n });\r\n if (instrumentationSvc.asLoggingStart) {\r\n instrumentationSvc.asLoggingStart(instrumentSetting.ACTIVITYNAME.ClickOnApplyChanges);\r\n }\r\n }\r\n\r\n discard() {\r\n this.trigger('discard');\r\n if (instrumentationSvc.asLoggingStart) {\r\n instrumentationSvc.asLoggingStart(instrumentSetting.ACTIVITYNAME.ClickOnDiscard);\r\n }\r\n }\r\n\r\n recoverBinding() {\r\n this.undelegateEvents();\r\n this.delegateEvents();\r\n if (instrumentationSvc.endActivity) {\r\n instrumentationSvc.endActivity();\r\n }\r\n }\r\n\r\n downloadResults() {\r\n const url = _.template(urlTemplate)({\r\n identifier: this.options.resultsIdentifier,\r\n type: 'OfflineConversionAllResultFile',\r\n });\r\n\r\n odata.get(url).bind(this)\r\n .then((data) => {\r\n downloadService.download(data);\r\n })\r\n .catch((err) => {\r\n this.handleGenericError({Url: url}, err);\r\n });\r\n\r\n if (instrumentationSvc.asLoggingStart) {\r\n instrumentationSvc.asLoggingStart(instrumentSetting.ACTIVITYNAME.ClickOnDownloadAllResults);\r\n }\r\n }\r\n\r\n downloadErrors() {\r\n const url = _.template(urlTemplate)({\r\n identifier: this.options.errorsIdentifier,\r\n type: 'OfflineConversionErrorResultFile',\r\n });\r\n\r\n odata.get(url).bind(this)\r\n .then((data) => {\r\n downloadService.download(data);\r\n })\r\n .catch((err) => {\r\n this.handleGenericError({Url: url}, err);\r\n });\r\n\r\n if (instrumentationSvc.asLoggingStart) {\r\n instrumentationSvc.asLoggingStart(instrumentSetting.ACTIVITYNAME.ClickOnDownloadErrorsOnly);\r\n }\r\n }\r\n\r\n close() {\r\n this.trigger('close');\r\n if (instrumentationSvc.asLoggingStart) {\r\n instrumentationSvc.asLoggingStart(instrumentSetting.ACTIVITYNAME.ClickOnClose);\r\n }\r\n }\r\n\r\n}\r\n","import _ from 'underscore';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\n\r\nimport datetimeUserTemplate from '@bingads-webui-campaign-legacy/conversion-tracking/template/upload-conversions/columns/datetime-user.pug';\r\nimport uploadedFileTemplate from '@bingads-webui-campaign-legacy/conversion-tracking/template/upload-conversions/columns/uploaded-file.pug';\r\nimport summaryTemplate from '@bingads-webui-campaign-legacy/conversion-tracking/template/upload-conversions/columns/summary.pug';\r\nimport actionsTemplate from '@bingads-webui-campaign-legacy/conversion-tracking/template/upload-conversions/columns/actions.pug';\r\n\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport dateHumanizer from '@bingads-webui-component-legacy/humanize/date';\r\n\r\nconst i18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/conversion-tracking');\r\n\r\nconst dataColumnsConfig = [{\r\n name: 'datetimeuser',\r\n title: i18n.getString('UnifiedEventTracking_UploadConversions_HistoryGrid_DatetimeUser'),\r\n bodyClasses: ['datetimeuser-col'],\r\n template: datetimeUserTemplate,\r\n property: (row) => {\r\n const date = dateHumanizer.parse(row.StartedAt);\r\n\r\n return {\r\n datetime: _.isDate(date) ? date.toLocaleString(config.get('Culture') || pageContext.Culture || 'en-US') : row.StartedAt,\r\n user: row.UserName || i18n.getString('UnifiedEventTracking_UploadConversions_Common_NotAvailable'),\r\n };\r\n },\r\n}, {\r\n name: 'uploadedfile',\r\n title: i18n.getString('UnifiedEventTracking_UploadConversions_HistoryGrid_UploadedFile'),\r\n template: uploadedFileTemplate,\r\n property: (row) => {\r\n const inputFile = _.first(_.where(row.OfflineConversionFiles, {Type: 'InputFile'}));\r\n\r\n let hasExpectedStatus = row.Status === 'Completed' || row.Status === 'PendingExecution' || row.Status === 'Failed';\r\n\r\n return {\r\n name: inputFile && hasExpectedStatus ? inputFile.Name : i18n.getString('UnifiedEventTracking_UploadConversions_Common_NotAvailable'),\r\n identifier: inputFile && hasExpectedStatus ? inputFile.Identifier : '',\r\n shouldDisable: inputFile && hasExpectedStatus ? !(inputFile && inputFile.Identifier) || (inputFile && inputFile.IsExpired) || row.Status === 'Failed' : true,\r\n };\r\n },\r\n}, {\r\n name: 'summary',\r\n title: i18n.getString('UnifiedEventTracking_UploadConversions_HistoryGrid_Summary'),\r\n template: summaryTemplate,\r\n property: (row) => {\r\n if (row.Status === 'PendingExecution') {\r\n return {\r\n isPending: true,\r\n isCompleted: false,\r\n successCount: row.SuccessCount,\r\n errorCount: row.ErrorCount,\r\n i18n,\r\n };\r\n } else if (row.Status === 'Completed') {\r\n return {\r\n isPending: false,\r\n isCompleted: true,\r\n successCount: row.SuccessCount,\r\n errorCount: row.ErrorCount,\r\n i18n,\r\n };\r\n } else if (row.Status === 'Failed' && _.isArray(row.Errors) && !_.isEmpty(row.Errors)) {\r\n const errorCodes = row.Errors.map((error) => error && error.Code).filter(Boolean).map((code) => i18n.getString(code) || i18n.getString(`Error_Campaign_API_${code}`));\r\n\r\n return {\r\n isPending: false,\r\n isCompleted: false,\r\n status: [i18n.getString('GenericUploadError'), ...errorCodes].filter(Boolean).join(' '),\r\n successCount: row.SuccessCount,\r\n errorCount: row.ErrorCount,\r\n i18n,\r\n };\r\n } else {\r\n return {\r\n isPending: false,\r\n isCompleted: false,\r\n status: i18n.getString(`UnifiedEventTracking_UploadConversions_RunResultState_${row.Status}`) || i18n.getString('UnifiedEventTracking_UploadConversions_Common_NotAvailable'),\r\n successCount: row.SuccessCount,\r\n errorCount: row.ErrorCount,\r\n i18n,\r\n };\r\n }\r\n },\r\n}, {\r\n name: 'actions',\r\n title: i18n.getString('UnifiedEventTracking_UploadConversions_HistoryGrid_Actions'),\r\n template: actionsTemplate,\r\n property: (row) => {\r\n const resultsFile = _.first(_.where(row.OfflineConversionFiles, {Type: 'AllRecordsResultFile'}));\r\n const errorsFile = _.first(_.where(row.OfflineConversionFiles, {Type: 'ErrorOnlyResultFile'}));\r\n\r\n return {\r\n isPending: row.Status === 'PendingExecution',\r\n hasError: row.ErrorCount > 0,\r\n resultsId: resultsFile && resultsFile.Identifier,\r\n errorsId: errorsFile && errorsFile.Identifier,\r\n shouldDisable: !(resultsFile && resultsFile.Identifier) || (resultsFile && resultsFile.IsExpired),\r\n i18n,\r\n };\r\n },\r\n}];\r\n\r\nexport const columnsConfig = dataColumnsConfig;\r\n","import DataSource from '@bingads-webui-component-legacy/js-data-campaign/index';\r\n\r\nconst dataSourceConfig = {\r\n type: 'jsdata',\r\n entity: DataSource.OfflineConversionUploadTaskItemExecution,\r\n options: {cacheResponse: false},\r\n query: {\r\n $filter: 'TaskItem/Type eq Enum.TaskItemType\\'OfflineConversionUploadCommit\\' or TaskItem/Type eq Enum.TaskItemType\\'OfflineConversionUploadCommitTest\\'',\r\n },\r\n};\r\n\r\nexport const dataConfig = dataSourceConfig;\r\n","import _ from 'underscore';\r\nimport $ from 'jquery';\r\nimport Backbone from 'backbone';\r\n\r\nimport template from '@bingads-webui-campaign-legacy/conversion-tracking/template/upload-conversions/history-grid.pug';\r\nimport { paginationPlugin } from '@bingads-webui/projection-grid-pagination';\r\nimport { placeholderPlugin } from '@bingads-webui/projection-grid-placeholder';\r\nimport { uiBlockerPlugin } from '@bingads-webui/projection-grid-uiblocker';\r\nimport { a11yPlugin } from '@bingads-webui/projection-grid-a11y';\r\n\r\nimport ProjectionGrid from '@bingads-webui-component-legacy/github/modules/projection-grid/module/projection-grid';\r\nimport downloadService from '@bingads-webui-component-legacy/download/index';\r\nimport odata from '@bingads-webui-component-legacy/http/channel/odata';\r\n\r\nimport instrumentationSvc from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport instrumentSetting from '@bingads-webui-static-legacy/instrumentation/campaignSchemaAndSetting';\r\n\r\nimport { columnsConfig } from '@bingads-webui-campaign-legacy/conversion-tracking/upload-conversions/history-grid-columns-config';\r\nimport { dataConfig } from '@bingads-webui-campaign-legacy/conversion-tracking/upload-conversions/history-grid-data-config';\r\nimport { getPGridColumnResizePlugin } from '@bingads-webui-campaign/projection-grid-column-resize-helper';\r\n\r\nconst i18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/conversion-tracking');\r\n\r\nconst downloadUrlTemplate = '/BulkUploadFiles/GetBulkFileUrl(CustomerId=:customer_id,FileIdentifier={{identifier}},BulkFileType={{type}})';\r\n\r\nexport default class View extends Backbone.View {\r\n\r\n initialize(options = {}) {\r\n this.data = options.data ? options.data : dataConfig;\r\n this.columns = columnsConfig;\r\n }\r\n\r\n render() {\r\n this.$el.append(template());\r\n const {gridName,\r\n preferenceService} = this;\r\n const resizeConfig = getPGridColumnResizePlugin({\r\n gridName,\r\n preferenceService,\r\n });\r\n\r\n this.grid = ProjectionGrid.factory({ vnext: true })\r\n .use(paginationPlugin)\r\n .use(uiBlockerPlugin)\r\n .use(a11yPlugin)\r\n .use(placeholderPlugin)\r\n .use(resizeConfig.plugin)\r\n .create({\r\n el: this.$('.grid-container'),\r\n tableClasses: ['table', 'grid', 'table-hover'],\r\n dataSource: this.data,\r\n columns: this.columns,\r\n plugins: {\r\n pagination: {\r\n enableRandomPage: false,\r\n pageSize: 20,\r\n availablePageSizes: [20, 50, 100, 200],\r\n pageNumberLabelText: i18n.getString('Grid_Page_Number_Label_Text'),\r\n pageSizeText: i18n.getString('Grid_ShowRows'),\r\n totalPageCountText: i18n.getString('Grid_PageOf'),\r\n },\r\n uiBlocker: {\r\n el: this.$('.history-grid'),\r\n },\r\n placeholder: {\r\n container: this.$('.grid-noresult'),\r\n text: i18n.getString('Grid_NoRecords'),\r\n },\r\n },\r\n }).gridView;\r\n\r\n this.grid.render();\r\n\r\n return this;\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click .btn-results': 'downloadResults',\r\n 'click .btn-errors': 'downloadErrors',\r\n 'click .btn-file': 'downloadInputFile',\r\n };\r\n }\r\n\r\n downloadResults(e) {\r\n if (e && e.target && $(e.target).is('[disabled]')) {\r\n return;\r\n }\r\n\r\n const id = this.getDataId(e);\r\n\r\n this.download(id, 'OfflineConversionAllResultFile');\r\n if (instrumentationSvc.asLoggingStart) {\r\n instrumentationSvc.asLoggingStart(instrumentSetting.ACTIVITYNAME.ClickToDownloadAllResultsInGrid);\r\n }\r\n }\r\n\r\n downloadErrors(e) {\r\n const id = this.getDataId(e);\r\n\r\n this.download(id, 'OfflineConversionErrorResultFile');\r\n if (instrumentationSvc.asLoggingStart) {\r\n instrumentationSvc.asLoggingStart(instrumentSetting.ACTIVITYNAME.ClickToDownloadErrorsOnlyInGrid);\r\n }\r\n }\r\n\r\n downloadInputFile(e) {\r\n const id = this.getDataId(e);\r\n\r\n this.download(id, 'OfflineConversionInputFile');\r\n if (instrumentationSvc.asLoggingStart) {\r\n instrumentationSvc.asLoggingStart(instrumentSetting.ACTIVITYNAME.ClickToDownloadInputFileInGrid);\r\n }\r\n }\r\n\r\n download(identifier, type) {\r\n const url = _.template(downloadUrlTemplate)({\r\n identifier,\r\n type,\r\n });\r\n\r\n odata.get(url).bind(this)\r\n .then((data) => {\r\n downloadService.download(data);\r\n })\r\n .catch((err) => {\r\n this.trigger('error:system', _.extend({\r\n Url: url,\r\n }, _.pick(err, 'readyState', 'responseText', 'status', 'statusText'),\r\n _.pick(err.headers, 'x-ms-requestid', 'x-ms-trackingid')));\r\n });\r\n }\r\n\r\n getDataId(e) {\r\n return $(e.target).attr('data-id');\r\n }\r\n\r\n}\r\n","import _ from 'underscore';\r\nimport ko from 'knockout';\r\nimport scopeService from '@bingads-webui-static-legacy/scope-service';\r\nimport KoSchema from '@bingads-webui-component-legacy/ko-schema/index';\r\nimport { MTCampaignTypeEnum } from '@bingads-webui-campaign-legacy/adgroup-create-advanced/util/campaignType';\r\nimport { isXandrDisplayAdsCampaign, isAudienceNativeAdsCampaign, isAudienceCampaign, isXandrVideoAdsCampaign } from '@bingads-webui-campaign-react/constants';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\n\r\nexport default class ViewModel {\r\n constructor({\r\n scope,\r\n hideFooter,\r\n isXandrVideoAd,\r\n isMultiAdFormatDisplayAd,\r\n isMultiAdFormatVideoAd,\r\n isForVNext,\r\n setAdGroupType = _.noop,\r\n setIsDisplayPlusNativeEditAdEditor = _.noop,\r\n permissions = {},\r\n }) {\r\n KoSchema.properties(this);\r\n\r\n this.permissions = permissions;\r\n this.scopeContext = scopeService.getScope();\r\n this.setAdGroupType = setAdGroupType;\r\n this.setIsDisplayPlusNativeEditAdEditor = setIsDisplayPlusNativeEditAdEditor;\r\n this.isXandrVideoAd = ko.observable(isXandrVideoAd);\r\n this.isMultiAdFormatDisplayAd = ko.observable(isMultiAdFormatDisplayAd);\r\n this.isMultiAdFormatVideoAd = ko.observable(isMultiAdFormatVideoAd);\r\n\r\n this.isForVNext = isForVNext;\r\n this.scope = scope;\r\n this.hideFooter = hideFooter;\r\n this.campaignType = this.scope().campaignType;\r\n this.campaignSubType = this.scope().campaignSubType;\r\n this.campaignDomain = this.scope().campaignDomain;\r\n this.isDynamicDescriptionEnabled = this.scope().isDynamicDescriptionEnabled;\r\n this.isFeedBasedCampaign = this.scope().isFeedBasedCampaign;\r\n this.selectorLabelId = _.uniqueId('add-keyword');\r\n\r\n this.showAdGroups = !this.scope().adGroupId;\r\n this.showCampaignLevel = !!this.scope().campaignId;\r\n this.showEditor = ko.observable(!_.isNull(this.scope().adGroupId));\r\n\r\n const audienceCampaignType = 8;\r\n\r\n this.allowAdCreation = ko.observable(!(this.scope().isFeedBasedCampaign && this.scope().campaignType === audienceCampaignType));\r\n\r\n this.selectedCampaigns = ko.observable();\r\n this.selectedAdgroups = ko.observable();\r\n\r\n this.adEditorTitle = ko.observable();\r\n\r\n this.saveAnalyticsId = ko.observable();\r\n\r\n this.saveCreateAnalyticsId = ko.observable();\r\n\r\n this.selectedAdgroups.subscribe((newAdgroup) => this.onAdGroupSelect(newAdgroup));\r\n this.selectedCampaigns.subscribe((newCampaign) => this.onCampaignSelect(newCampaign));\r\n this.isDisplayAdWithCopilot = ko.observable(\r\n this.campaignSubType && this.scope().adGroupId ?\r\n isXandrDisplayAdsCampaign(this.campaignSubType) && this.permissions.dynamic && this.permissions.dynamic.DisplayPlusCopilotAssetGeneration :\r\n false);\r\n\r\n this.isDisplayPlusNativeEdit = ko.observable(\r\n this.campaignType && this.campaignSubType && this.scope().adGroupId ?\r\n isAudienceCampaign(this.campaignType) && isAudienceNativeAdsCampaign(this.campaignSubType) && this.permissions.dynamic && this.permissions.dynamic.DisplayPlusEdit :\r\n false);\r\n\r\n this.containerClass = ko.computed(() => {\r\n return this.isDisplayPlusNativeEdit() ? 'display-plus-ad-editor__container' : 'ad-editor__container';\r\n });\r\n\r\n this.hideSaveAndCreateAnother = ko.observable(this.isSmartShoppingCampaign(this.campaignSubType));\r\n\r\n }\r\n\r\n onAdGroupSelect(newAdgroup) {\r\n const current = this.scope();\r\n const newAdgroupId = newAdgroup ? newAdgroup.Id : null;\r\n\r\n if (newAdgroupId !== current.adGroupId) {\r\n this.campaignType = MTCampaignTypeEnum[newAdgroup.Campaign.CampaignType];\r\n this.scope({\r\n campaignId: newAdgroup.Campaign.Id,\r\n campaignName: newAdgroup.Campaign.Name,\r\n adGroupId: newAdgroupId,\r\n adGroupName: newAdgroup.Name,\r\n campaignType: this.campaignType,\r\n campaignSubType: newAdgroup.Campaign.CampaignSubType,\r\n campaignDomain: _.result(_.first(newAdgroup.Campaign.CampaignSettings), 'DomainName'),\r\n isDynamicDescriptionEnabled: _.result(_.first(newAdgroup.Campaign.CampaignSettings), 'DynamicDescriptionEnabled'),\r\n isFeedBasedCampaign: this.isFeedBasedCampaign,\r\n isTraditionalChinese: newAdgroup.Language === 'TraditionalChinese',\r\n adsCountMap: newAdgroup.adsCountMap,\r\n adGroupType: newAdgroup.adGroupType,\r\n biddingStrategyType: newAdgroup.DisplayBiddingStrategyType,\r\n });\r\n this.setAdGroupType(newAdgroup.AdGroupType);\r\n this.allowAdCreation(!((this.isFeedBasedCampaign && newAdgroup.Campaign.CampaignType === 'Audience') || newAdgroup.Campaign.CampaignType === 'Hotel'));\r\n this.showEditor(!!newAdgroupId);\r\n this.hideSaveAndCreateAnother(newAdgroup.Campaign.CampaignSubType);\r\n this.isDisplayAdWithCopilot(isXandrDisplayAdsCampaign(newAdgroup.Campaign.CampaignSubType) && this.permissions.dynamic && this.permissions.dynamic.DisplayPlusCopilotAssetGeneration);\r\n this.isXandrVideoAd(isXandrVideoAdsCampaign(newAdgroup.Campaign.CampaignSubType) && this.permissions.dynamic && this.permissions.dynamic.XandrVideoCampaigns);\r\n\r\n const isDisplayPlusNativeEditEnabled = isAudienceNativeAdsCampaign(newAdgroup.Campaign.CampaignSubType) && this.permissions.dynamic && this.permissions.dynamic.DisplayPlusEdit;\r\n\r\n if (isDisplayPlusNativeEditEnabled) {\r\n setClarityTag({\r\n IsDisplayPlusAudienceNative: true,\r\n CampaignSubType: newAdgroup.Campaign.CampaignSubType,\r\n });\r\n }\r\n\r\n this.isDisplayPlusNativeEdit(isDisplayPlusNativeEditEnabled);\r\n this.setIsDisplayPlusNativeEditAdEditor(isDisplayPlusNativeEditEnabled);\r\n }\r\n }\r\n\r\n isSmartShoppingCampaign(campaignSubType) {\r\n return campaignSubType === 'ShoppingSmartAds' || campaignSubType === 12;\r\n }\r\n\r\n onCampaignSelect(newCampaign) {\r\n const current = this.scope();\r\n const newCampaignId = newCampaign ? newCampaign.Id : null;\r\n\r\n if (newCampaignId !== current.campaignId) {\r\n this.campaignType = MTCampaignTypeEnum[newCampaign.CampaignType];\r\n this.campaignDomain = _.result(_.first(newCampaign.CampaignSettings), 'DomainName');\r\n this.isDynamicDescriptionEnabled = _.result(_.first(newCampaign.CampaignSettings), 'DynamicDescriptionEnabled');\r\n this.isFeedBasedCampaign = !!_.result(_.first(newCampaign.CampaignSettings), 'ProviderId');\r\n this.hideSaveAndCreateAnother(this.isSmartShoppingCampaign(newCampaign.CampaignSubType));\r\n }\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\n// import odata from '@bingads-webui-component-legacy/http/channel/odata';\r\nimport jsdata from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport edmCampaign from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nimport EntitySelectorService from '@bingads-webui-static-legacy/entity-selector-service';\r\n\r\nconst PAGE_SIZE = 10;\r\n\r\nfunction getAdsCount(adgroupData) {\r\n return new Promise((resolve) => {\r\n if (pageContext.CurrentCampaign && pageContext.CurrentCampaign.CampaignSubType !== 'ShoppingSmartAds') {\r\n resolve({});\r\n } else if (adgroupData && adgroupData.length === 0) {\r\n resolve({});\r\n } else {\r\n const entitySelectorService = new EntitySelectorService();\r\n\r\n entitySelectorService.getAdsCount(adgroupData, pageContext.CurrentCampaign, pageContext.CurrentAccount, pageContext.CurrentCustomer)\r\n .then((adsCountMap) => {\r\n resolve(adsCountMap);\r\n })\r\n .catch((e) => {\r\n // error handling\r\n console.log(e); // eslint-disable-line\r\n resolve({});\r\n });\r\n }\r\n });\r\n}\r\n\r\nfunction transformAdgroupData(data) { // eslint-disable-line\r\n if (!data || !_.isArray(data)) {\r\n return Promise.resolve([]);\r\n }\r\n\r\n return Promise.resolve(getAdsCount(data))\r\n .then((adsCountMap) => {\r\n let adgroupData = _.filter(data, (adgroup) => {\r\n // filter SSC which has 1 product ad and 1 responsive ad if IsResponsiveAdEnabledForSSC is true\r\n // filter SSC which has 1 product ad if IsResponsiveAdEnabledForSSC is false\r\n return EntitySelectorService.shouldKeepSmartShoppingCampaignAdGroup(adgroup, adsCountMap);\r\n });\r\n\r\n const isSmartShoppingCampaign = _.chain(adgroupData)\r\n .result('0')\r\n .result('Campaign')\r\n .result('CampaignSubType')\r\n .value() === 'ShoppingSmartAds';\r\n\r\n adgroupData = adgroupData.map((item) => {\r\n return _.extend({\r\n name: item.Name,\r\n status: item.Status,\r\n campaignName: item.Campaign.Name,\r\n adsCountMap,\r\n }, item);\r\n });\r\n\r\n return {\r\n totalCount: isSmartShoppingCampaign ? adgroupData.length : data.totalCount,\r\n items: adgroupData,\r\n };\r\n });\r\n}\r\n\r\nexport default function getAdgroupData(queryText = '', pageNumber = 0, pageSize = PAGE_SIZE, campaignId) {\r\n const isDSAMixedModeCampaignEnabled = _.result(config.get('Permissions'), 'IsDSAMixedModeCampaignEnabled', false);\r\n\r\n const signleQuoteTerminatedQuery = queryText.replace('\\'', '\\'\\'');\r\n\r\n const query = {\r\n $expand: 'Campaign($select=Id,Name,CampaignType,CampaignSubType,CampaignSettings)',\r\n $select: `Id, Name, Status, Language, DisplayBiddingStrategyType${isDSAMixedModeCampaignEnabled ? ', AdGroupType' : ''}`,\r\n $skip: pageNumber * pageSize,\r\n $top: pageSize,\r\n $count: true,\r\n $filter: `contains(Name, '${signleQuoteTerminatedQuery}')`,\r\n };\r\n\r\n if (campaignId) {\r\n query.entitySet = edmCampaign.currentAccount.Campaigns.$withKey(Number(campaignId)).AdGroups.toJSON();\r\n }\r\n\r\n return jsdata.AdGroup.findAll({\r\n query,\r\n }).then((data) => {\r\n return transformAdgroupData(data);\r\n }).then((data) => {\r\n return data;\r\n });\r\n}\r\n","import _ from 'underscore';\r\nimport { CampaignSelectorView as AdgroupSelectorView } from '@bingads-webui-campaign-react/campaign-selector';\r\nimport withUiBlock from '@bingads-webui-component-legacy/uiblocker/index';\r\nimport getAdgroupData from '@bingads-webui-campaign-legacy/crud-ad/view/adgroup-selector-repository';\r\n\r\nconst i18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/campaign-creation-advanced');\r\n\r\nconst PAGESIZE = 10;\r\n\r\nexport default class AdgroupSelectorProxy {\r\n constructor({\r\n campaignId,\r\n onEventTrigger,\r\n getCustomizedData,\r\n } = {}) {\r\n this.campaignId = campaignId;\r\n this.onEventTrigger = onEventTrigger;\r\n this.getCustomizedData = getCustomizedData || null;\r\n }\r\n\r\n fecthAdgroupData(query, pageNumber, pageSize, adgroupSelectorView) {\r\n const selectorContainer = adgroupSelectorView && adgroupSelectorView.$('.ba-campaign-selector');\r\n const uiBlockContainer = selectorContainer.hasClass('open') ? selectorContainer.find('.dropdown-menu') : selectorContainer;\r\n\r\n if (this.getCustomizedData === null) {\r\n return getAdgroupData(query, pageNumber, pageSize, this.campaignId).finally(withUiBlock(uiBlockContainer));\r\n } else {\r\n return this.getCustomizedData(query, pageNumber, pageSize, this.campaignId).finally(withUiBlock(uiBlockContainer));\r\n }\r\n }\r\n\r\n getAdgroupSelectorView() {\r\n\r\n const adgroupSelectorView = new AdgroupSelectorView({\r\n i18n,\r\n fetch: ({ query = '', pageNumber = 0 }) => {\r\n return this.fecthAdgroupData(query, pageNumber, PAGESIZE, adgroupSelectorView);\r\n },\r\n pageSize: PAGESIZE,\r\n stringKeys: {\r\n emptyListContent: 'No results to display.',\r\n listHeader: 'Available ad groups: {{itemCount}}',\r\n selectEntity: 'Select an ad group',\r\n },\r\n });\r\n\r\n adgroupSelectorView.on('selected-campaign', (selectedItem) => {\r\n if (_.isFunction(this.onEventTrigger)) {\r\n this.onEventTrigger('selected-campaign', selectedItem);\r\n }\r\n });\r\n\r\n return adgroupSelectorView;\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport jsdata from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport edmCampaign from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nimport EntitySelectorService from '@bingads-webui-static-legacy/entity-selector-service';\r\n\r\nconst CAMPAIGN_PAGE_SIZE = 10;\r\nconst ADGROUP_PAGE_SIZE = 6;\r\n\r\nfunction transformCampaignData(data) {\r\n if (!data || !_.isArray(data)) {\r\n return [];\r\n }\r\n\r\n const campaignData = data.map((item) => {\r\n return _.extend({\r\n name: item.Name,\r\n status: item.Status,\r\n }, item);\r\n });\r\n\r\n return {\r\n totalCount: data.totalCount,\r\n items: campaignData,\r\n };\r\n}\r\n\r\nfunction getAdsCount(adgroupData, campaign) {\r\n return new Promise((resolve) => {\r\n if (campaign && campaign.CampaignSubType !== 'ShoppingSmartAds') {\r\n resolve({});\r\n } else if (adgroupData && adgroupData.length === 0) {\r\n resolve({});\r\n } else {\r\n const entitySelectorService = new EntitySelectorService();\r\n\r\n entitySelectorService.getAdsCount(adgroupData, campaign, pageContext.CurrentAccount, pageContext.CurrentCustomer)\r\n .then((adsCountMap) => {\r\n resolve(adsCountMap);\r\n })\r\n .catch((e) => {\r\n // error handling\r\n console.log(e); // eslint-disable-line\r\n resolve({});\r\n });\r\n }\r\n });\r\n}\r\n\r\nfunction transformAdgroupData(data, campaign) { // eslint-disable-line\r\n if (!data || !_.isArray(data)) {\r\n Promise.resolve([]);\r\n }\r\n\r\n return Promise.resolve(getAdsCount(data, campaign))\r\n .then((adsCountMap) => {\r\n let adgroupData = _.filter(data, (adgroup) => {\r\n // filter SSC which has 1 product ad and 1 responsive ad if IsResponsiveAdEnabledForSSC is true\r\n // filter SSC which has 1 product ad if IsResponsiveAdEnabledForSSC is false\r\n return EntitySelectorService.shouldKeepSmartShoppingCampaignAdGroup(adgroup, adsCountMap);\r\n });\r\n\r\n const isSmartShoppingCampaign = _.chain(campaign)\r\n .result('CampaignSubType')\r\n .value() === 'ShoppingSmartAds';\r\n\r\n adgroupData = adgroupData.map((item) => {\r\n return _.extend({\r\n name: item.Name,\r\n status: item.Status,\r\n campaignName: item.Campaign.Name,\r\n adsCountMap,\r\n }, item);\r\n });\r\n\r\n return {\r\n // for SSC, the only ad group may be filtered out due to ad size limit\r\n totalCount: isSmartShoppingCampaign ? adgroupData.length : data.totalCount,\r\n items: adgroupData,\r\n };\r\n });\r\n}\r\n\r\nexport function getCampaignData(queryText = '', pageNumber = 0, pageSize = CAMPAIGN_PAGE_SIZE) {\r\n\r\n const signleQuoteTerminatedQuery = queryText.replace('\\'', '\\'\\'');\r\n\r\n const query = {\r\n $select: 'Id, Name, Status, CampaignType, CampaignSubType, CampaignSettings',\r\n $skip: pageNumber * pageSize,\r\n $top: pageSize,\r\n $filter: `contains(Name, '${signleQuoteTerminatedQuery}') and (CampaignType ne Enum.CampaignType'Smart') and (CampaignType ne Enum.CampaignType'PerformanceMax')`,\r\n };\r\n\r\n return jsdata.Campaign.findAll({\r\n query,\r\n }).then((data) => {\r\n return transformCampaignData(data);\r\n });\r\n}\r\n\r\nexport function getAdgroupData(queryText = '', pageNumber = 0, pageSize = ADGROUP_PAGE_SIZE, scopeParentItem) {\r\n const isDSAMixedModeCampaignEnabled = _.result(config.get('Permissions'), 'IsDSAMixedModeCampaignEnabled', false);\r\n\r\n const signleQuoteTerminatedQuery = queryText.replace('\\'', '\\'\\'');\r\n\r\n const query = {\r\n $expand: 'Campaign($select=Id,Name,CampaignType,CampaignSubType,CampaignSettings)',\r\n $select: `Id, Name, Status, Language, DisplayBiddingStrategyType${isDSAMixedModeCampaignEnabled ? ', AdGroupType' : ''}`,\r\n $skip: pageNumber * pageSize,\r\n $top: pageSize,\r\n $count: true,\r\n $filter: `contains(Name, '${signleQuoteTerminatedQuery}')`,\r\n };\r\n\r\n if (scopeParentItem) {\r\n query.entitySet = edmCampaign.currentAccount.Campaigns.$withKey(Number(scopeParentItem.Id)).AdGroups.toJSON();\r\n }\r\n\r\n return jsdata.AdGroup.findAll({\r\n query,\r\n }).then((data) => {\r\n return transformAdgroupData(data, scopeParentItem);\r\n }).then((data) => {\r\n return data;\r\n });\r\n}\r\n\r\n","import _ from 'underscore';\r\nimport { CampaignAdgroupSelectorView } from '@bingads-webui-campaign-react/campaign-adgroup-selector';\r\nimport withUiBlock from '@bingads-webui-component-legacy/uiblocker/index';\r\nimport { getCampaignData, getAdgroupData } from '@bingads-webui-campaign-legacy/crud-ad/view/campaign-adgroup-selector-repository';\r\n\r\nconst i18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/campaign-adgroup-selector');\r\n\r\nconst CAMPAIGN_PAGESIZE = 10;\r\nconst ADGROUP_PAGESIZE = 6;\r\n\r\nexport default class CampaignAdgroupSelectorProxy {\r\n constructor({\r\n onCampaignSelect = _.noop,\r\n onAdGroupSelect = _.noop,\r\n }) {\r\n this.onCampaignSelect = onCampaignSelect;\r\n this.onAdGroupSelect = onAdGroupSelect;\r\n }\r\n\r\n fecthCampaignData({\r\n query = '', pageNumber = 0, pageSize = CAMPAIGN_PAGESIZE,\r\n }, campaignAdgroupSelectorView) {\r\n const selectorContainer = campaignAdgroupSelectorView && campaignAdgroupSelectorView.$('.ba-campaign-adgroup-selector');\r\n const uiBlockContainer = selectorContainer.hasClass('open') ? selectorContainer.find('.dropdown-menu') : selectorContainer;\r\n\r\n return getCampaignData(query, pageNumber, pageSize).finally(withUiBlock(uiBlockContainer));\r\n }\r\n\r\n fecthAdgroupData({\r\n query = '', pageNumber = 0, pageSize = ADGROUP_PAGESIZE, scopeParentItem = null,\r\n }, campaignAdgroupSelectorView) {\r\n const selectorContainer = campaignAdgroupSelectorView && campaignAdgroupSelectorView.$('.ba-campaign-adgroup-selector');\r\n const uiBlockContainer = selectorContainer.hasClass('open') ? selectorContainer.find('.dropdown-menu') : selectorContainer;\r\n\r\n return getAdgroupData(query, pageNumber, pageSize, scopeParentItem).finally(withUiBlock(uiBlockContainer));\r\n }\r\n\r\n getCampaignAdgroupSelectorView() {\r\n const campaignAdgroupSelectorView = new CampaignAdgroupSelectorView({\r\n campaign: {\r\n pageSize: CAMPAIGN_PAGESIZE,\r\n onFetch: (args) => {\r\n return this.fecthCampaignData(args, campaignAdgroupSelectorView);\r\n },\r\n },\r\n adgroup: {\r\n pageSize: ADGROUP_PAGESIZE,\r\n onFetch: (args) => {\r\n return this.fecthAdgroupData(args, campaignAdgroupSelectorView);\r\n },\r\n },\r\n i18n,\r\n });\r\n\r\n campaignAdgroupSelectorView.on('selected-campaign', (selectedItem) => {\r\n this.onCampaignSelect(selectedItem);\r\n });\r\n\r\n campaignAdgroupSelectorView.on('selected-adgroup', (selectedItem) => {\r\n this.onAdGroupSelect(selectedItem);\r\n });\r\n\r\n return campaignAdgroupSelectorView;\r\n }\r\n}\r\n\r\n","import Backbone from 'backbone';\r\nimport ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport ViewModel from '@bingads-webui-campaign-legacy/crud-ad/viewmodel/index';\r\nimport template from '@bingads-webui-campaign-legacy/crud-ad/template/index.pug';\r\nimport AdEditorView from '@bingads-webui-campaign-legacy/crud-ad/view/adEditor';\r\nimport AdgroupSelectorProxy from '@bingads-webui-campaign-legacy/crud-ad/view/adgroup-selector-proxy';\r\nimport CampaignAdgroupSelectorProxy from '@bingads-webui-campaign-legacy/crud-ad/view/campaign-adgroup-selector-proxy';\r\nimport { PerfMarkerFactory } from '@bingads-webui/performance-marker';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport { isXandrDisplayAdsCampaign } from '@bingads-webui-campaign-react/constants';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\nconst i18nGlobal = window.globalLegacyI18n.get('component/i18n/loader!legacy/global');\r\n\r\nconst saveIds = {\r\n ExpandedText: 'omniture-exta-save',\r\n};\r\n\r\nconst saveCreateIds = {\r\n ExpandedText: 'omniture-exta-save-and-create-another',\r\n};\r\n\r\nconst permissions = config.get('Permissions') || {};\r\n\r\nexport default class View extends Backbone.View {\r\n initialize({\r\n newI18n,\r\n model = null,\r\n campaignId = null,\r\n adGroupId = null,\r\n adGroupType = null,\r\n campaignType = null,\r\n campaignSubType = null,\r\n biddingStrategyType = '',\r\n isSaveToServer = true, // whether or not saving the ad to server when user clicks save button\r\n isTraditionalChinese = false, // is current adgroup with traditional chinese\r\n appLookupDisabled = false,\r\n developerName = '',\r\n campaignDomain = '',\r\n isDynamicDescriptionEnabled = false,\r\n isFeedBasedCampaign = null,\r\n firstTextAdModel = {},\r\n firstExpandedTextAdModel = {},\r\n firstResponsiveSearchAdModel = {},\r\n isForVNext = false,\r\n inlineSuggestionsEnabled = false,\r\n adsCountMap = {},\r\n showSaveAndCreateAnother = true,\r\n isOpenCreatePanel = false,\r\n shouldSendOpportunityLog = () => false,\r\n logOpportunity,\r\n parentPerfMarker,\r\n serverContext,\r\n preferenceService,\r\n loadClipchampPlayer,\r\n } = {}) {\r\n let perfMarker;\r\n\r\n if (parentPerfMarker) {\r\n perfMarker = parentPerfMarker.createChild('Create_Ad_From_Grid', { autoEnd: true, isActiveChild: false });\r\n } else {\r\n perfMarker = PerfMarkerFactory.createMarker('Create_Ad_From_Grid', { autoEnd: true });\r\n }\r\n\r\n perfMarker.willInit();\r\n\r\n this.isForVNext = isForVNext;\r\n this.model = model;\r\n this.campaignSubType = campaignSubType;\r\n this.showSaveAndCreateAnother = showSaveAndCreateAnother;\r\n\r\n const hasWebsiteImageOptedInObservable = ko.observable(true);\r\n\r\n this.adEditor = new AdEditorView({\r\n newI18n,\r\n model,\r\n campaignId,\r\n adGroupId,\r\n adGroupType,\r\n campaignType,\r\n campaignSubType,\r\n biddingStrategyType,\r\n isSaveToServer,\r\n isTraditionalChinese,\r\n appLookupDisabled,\r\n developerName,\r\n showInline: true,\r\n campaignDomain,\r\n isDynamicDescriptionEnabled,\r\n isFeedBasedCampaign,\r\n firstTextAdModel,\r\n firstExpandedTextAdModel,\r\n firstResponsiveSearchAdModel,\r\n perfMarker,\r\n isForVNext,\r\n serverContext,\r\n preferenceService,\r\n inlineSuggestionsEnabled,\r\n adsCountMap,\r\n showSaveAndCreateAnother,\r\n isOpenCreatePanel,\r\n hasWebsiteImageOptedInObservable,\r\n loadClipchampPlayer,\r\n });\r\n\r\n this.viewModel = new ViewModel({\r\n scope: this.adEditor.viewModel.scope,\r\n hideFooter: this.adEditor.viewModel.hideFooter,\r\n isXandrVideoAd: this.adEditor.isXandrVideoAd,\r\n isMultiAdFormatDisplayAd: this.adEditor.isMultiAdFormatDisplayAd,\r\n isMultiAdFormatVideoAd: this.adEditor.isMultiAdFormatVideoAd,\r\n isForVNext,\r\n setAdGroupType: this.setAdGroupType.bind(this),\r\n setIsDisplayPlusNativeEditAdEditor: this.setIsDisplayPlusNativeEditAdEditor.bind(this),\r\n permissions,\r\n });\r\n\r\n this.viewModel.hasWebsiteImageOptedIn = hasWebsiteImageOptedInObservable;\r\n\r\n this.adEditor.on('created updated', (ad) => {\r\n this.trigger('save', ad);\r\n if (shouldSendOpportunityLog()) {\r\n logOpportunity({ context: { campaignId: ad.Campaign.Id, adGroupId: ad.AdGroup.Id, adId: ad.Id } });\r\n }\r\n });\r\n\r\n this.adEditor.on('close', () => {\r\n this.trigger('close');\r\n });\r\n\r\n this.setAnalyticsId(this.adEditor._type);\r\n this.adEditor.on('type', (type) => {\r\n this.setAnalyticsId(type);\r\n });\r\n\r\n this.viewModel.errors = this.adEditor.viewModel.errors;\r\n this.setTitle(model);\r\n\r\n if (isForVNext && this.viewModel.showAdGroups) {\r\n if (this.viewModel.showCampaignLevel) {\r\n const adgroupSelectorProxy = new AdgroupSelectorProxy({\r\n campaignId,\r\n onEventTrigger: (key, selectedAdGroup) => {\r\n this.trigger('adgroup selected', selectedAdGroup);\r\n\r\n if (_.get(selectedAdGroup, 'Campaign.CampaignType') !== 'LinkedIn') {\r\n this.viewModel.onAdGroupSelect(selectedAdGroup);\r\n }\r\n },\r\n });\r\n\r\n this.adgroupSelector = adgroupSelectorProxy.getAdgroupSelectorView();\r\n } else {\r\n const campaignAdgroupSelectorProxy = new CampaignAdgroupSelectorProxy({\r\n onCampaignSelect: (selectedCampaign) => {\r\n this.viewModel.onCampaignSelect(selectedCampaign);\r\n },\r\n onAdGroupSelect: (selectedAdGroup) => {\r\n this.trigger('adgroup selected', selectedAdGroup);\r\n\r\n if (_.get(selectedAdGroup, 'Campaign.CampaignType') !== 'LinkedIn') {\r\n this.viewModel.onAdGroupSelect(selectedAdGroup);\r\n }\r\n },\r\n });\r\n\r\n this.adgroupSelector = campaignAdgroupSelectorProxy.getCampaignAdgroupSelectorView();\r\n }\r\n }\r\n }\r\n\r\n setAdGroupType(adGroupType) {\r\n const isDSAMixedModeCampaignEnabled = _.result(config.get('Permissions'), 'IsDSAMixedModeCampaignEnabled', false);\r\n\r\n if (isDSAMixedModeCampaignEnabled) {\r\n const originalAdEditorScope = this.adEditor.viewModel.scope();\r\n\r\n this.adEditor.viewModel.scope(_.extend({}, originalAdEditorScope, {\r\n adGroupType,\r\n }));\r\n }\r\n }\r\n\r\n setIsDisplayPlusNativeEditAdEditor(isDisplayPlusNativeEdit) {\r\n this.adEditor.viewModel.isDisplayPlusNativeEdit(isDisplayPlusNativeEdit);\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click .appEditor-save-container .save': 'save',\r\n 'click .appEditor-save-container .cancel': 'cancel',\r\n 'click .save-create-another': 'saveAndCreateAnother',\r\n };\r\n }\r\n\r\n render() {\r\n this.$el.empty().append(template({\r\n i18n,\r\n i18nGlobal,\r\n isForVNext: this.isForVNext,\r\n showSaveAndCreateAnother: this.showSaveAndCreateAnother,\r\n isDisplayPlusDisplayAd: permissions.dynamic.DisplayPlusCopilotAssetGeneration && isXandrDisplayAdsCampaign(this.campaignSubType),\r\n }));\r\n ko.applyBindings(this.viewModel, this.el);\r\n\r\n if (this.isForVNext && this.viewModel.showAdGroups) {\r\n this.$('.adgroup-selector').empty().append(this.adgroupSelector.render().$el);\r\n }\r\n this.$('.ad-panel').append(this.adEditor.render().el);\r\n\r\n return this;\r\n }\r\n\r\n remove() {\r\n this.adEditor.remove();\r\n super.remove();\r\n }\r\n\r\n save() {\r\n this.adEditor.save();\r\n }\r\n\r\n saveAndCreateAnother() {\r\n this.adEditor.saveAndCreateAnother();\r\n this.setTitle(null); // Creating new ad, title should be set to \"Create\"\r\n }\r\n\r\n cancel() {\r\n this.trigger('close');\r\n this.adEditor.trigger('cancel');\r\n }\r\n\r\n setTitle(model) {\r\n this.viewModel.adEditorTitle(_.isEmpty(model) ? i18n.get('CampaignCreate_AdSectionTitle') : i18nGlobal.get('Ad_EditAd'));\r\n }\r\n\r\n setAnalyticsId(type) {\r\n this.viewModel.saveAnalyticsId(saveIds[type]);\r\n this.viewModel.saveCreateAnalyticsId(saveCreateIds[type]);\r\n }\r\n}\r\n","import ko from 'knockout';\r\n\r\nexport default class ViewModel {\r\n constructor(options = {}) {\r\n this.options = options;\r\n this.isTextareaEmpty = ko.observable(true);\r\n\r\n this.isKeywordPlannerEnabled = ko.observable(false);\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport Backbone from 'backbone';\r\nimport ko from 'knockout';\r\nimport Promise from 'bluebird';\r\nimport withUiBlock from '@bingads-webui-component-legacy/uiblocker/index';\r\nimport edmCampaign from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport template from '@bingads-webui-campaign-legacy/crud-keywords/template/create-inline-recommendation.pug';\r\nimport CreateView from '@bingads-webui-campaign-legacy/crud-keywords/view/create';\r\nimport KeywordPlannerView from '@bingads-webui-campaign-legacy/crud-adgroup/view/keywordPlanner';\r\nimport ViewModel from '@bingads-webui-campaign-legacy/crud-keywords/viewmodel/create-inline-recommendation';\r\nimport jsdata from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport * as criterionLoader from '@bingads-webui-campaign-legacy/base-targets/util/criterionLoader';\r\nimport { keywordPlannerSupportedLanguages } from '@bingads-webui-campaign-legacy/location-targets/util/constants';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\n\r\nexport default class View extends Backbone.View {\r\n initialize(options = {}) {\r\n this.options = options;\r\n\r\n this.createView = new CreateView({});\r\n this.keywordPlannerView = new KeywordPlannerView({\r\n mode: 'keywordsOnly',\r\n scenario: 'repair keyword creation',\r\n });\r\n this.keywordPlannerView.on({\r\n 'addKeyword': (newKeyword) => {\r\n this.createView.addSuggestion([newKeyword]);\r\n },\r\n });\r\n\r\n this.viewmodel = new ViewModel({\r\n adGroup: this.options.adGroup,\r\n });\r\n\r\n let textarea = this.createView.parser.keywordsTextareaVal;\r\n\r\n this.textAreaSubscription = textarea.subscribe(() => {\r\n this.viewmodel.isTextareaEmpty(this.createView.isEmpty());\r\n });\r\n\r\n this.keywordPlannerView.viewmodel.gridData([]); // Get rid of any suggestions for previous ad group\r\n this.keywordPlannerView.emptySearchTeams();\r\n this.initializeSuggestions();\r\n }\r\n\r\n render() {\r\n this.$el.html(\r\n template({ i18n })\r\n );\r\n\r\n ko.applyBindings(this.viewmodel, this.$('.add-keywords-root')[0]);\r\n\r\n this.createView.render();\r\n this.$('.parser').append(this.createView.el);\r\n this.createView.parser.isAfterFirstInteraction(false);\r\n\r\n this.keywordPlannerView.render();\r\n this.$('.keyword-planner-inline').append(this.keywordPlannerView.el);\r\n\r\n return this;\r\n }\r\n\r\n initializeSuggestions() {\r\n const {\r\n adGroupId,\r\n campaignId,\r\n } = this.options.adGroup;\r\n\r\n const getLandingPageUrl = jsdata.Ad.findAll({\r\n limit: 1,\r\n offset: 0,\r\n query: { $select: 'DisplayUrl,DestinationUrl,FinalUrls' },\r\n }, {\r\n entitySet: edmCampaign.currentAccount.Campaigns.$withKey(Number(campaignId)).AdGroups.$withKey(Number(adGroupId)).Ads,\r\n cacheResponse: false,\r\n });\r\n const campaignParams = {\r\n entitySet: edmCampaign.currentAccount.Campaigns,\r\n bypassCache: true,\r\n queryParameters: {\r\n query: {\r\n $select: 'Languages',\r\n },\r\n },\r\n };\r\n const adGroupParams = {\r\n entitySet: edmCampaign.currentAccount.Campaigns.$withKey(Number(campaignId)).AdGroups,\r\n bypassCache: true,\r\n queryParameters: {\r\n query: {\r\n $select: 'Language',\r\n },\r\n },\r\n };\r\n\r\n Promise.all([\r\n criterionLoader.load(campaignId, adGroupId, ['RadiusCriterion', 'LocationCriterion']),\r\n criterionLoader.load(campaignId, null, ['RadiusCriterion', 'LocationCriterion']),\r\n getLandingPageUrl,\r\n jsdata.Campaign.find(Number(campaignId), campaignParams),\r\n jsdata.AdGroup.find(Number(adGroupId), adGroupParams),\r\n ])\r\n .spread((campaignLocationRes, adGroupLocationRes, landingPageUrlRes, campaignLanguageRes, adGroupLanguageRes) => {\r\n const languages = (adGroupLanguageRes.Language && [keywordPlannerSupportedLanguages[adGroupLanguageRes.Language]]) ||\r\n (!_.isEmpty(campaignLanguageRes.Languages) && campaignLanguageRes.Languages) ||\r\n [30];\r\n\r\n this.viewmodel.isKeywordPlannerEnabled(KeywordPlannerView.isLanguageSupported(languages));\r\n this.keywordPlannerView.setLanguages(languages); // default is English\r\n\r\n let locationTargets = _.filter(campaignLocationRes, (item) => { // Ad group targeting takes priority\r\n return item.Criterion && item['@odata.type'] === '#Model.BiddableAdGroupCriterion';\r\n });\r\n\r\n if (locationTargets.length === 0) {\r\n locationTargets = _.filter(adGroupLocationRes, (item) => { // If there's no ad group targeting, try campaign\r\n return item.Criterion && item['@odata.type'] === '#Model.BiddableCampaignCriterion';\r\n });\r\n }\r\n this.keywordPlannerView.setLocationTargeting(_.pluck(locationTargets, 'Criterion'));\r\n\r\n if (_.isArray(landingPageUrlRes) && _.isObject(_.first(landingPageUrlRes))) {\r\n let landingPageUrl = landingPageUrlRes[0].FinalUrls[0] || landingPageUrlRes[0].DestinationUrl;\r\n\r\n if (_.isString(landingPageUrl) && !this.keywordPlannerView.viewmodel.allLocationsUnsupported() && this.keywordPlannerView.viewmodel.gridData().length === 0) {\r\n this.keywordPlannerView.onSearch({ url: landingPageUrl });\r\n }\r\n }\r\n })\r\n .finally(withUiBlock(this.$('.keyword-planner-inline')));\r\n }\r\n\r\n getKeywords() {\r\n if (!this.createView.parser.validate()) {\r\n return false;\r\n }\r\n\r\n return this.createView.getChangedKeywords({\r\n Id: this.options.adGroup.adGroupId,\r\n });\r\n }\r\n\r\n getSuggestionsAdded() {\r\n return this.createView.keywordSuggestionsAdded;\r\n }\r\n\r\n cancel() {\r\n this.textAreaSubscription.dispose();\r\n this.keywordPlannerView.off();\r\n\r\n this.$('.add-keywords-root').remove();\r\n }\r\n}\r\n","/* eslint-disable */\r\nimport * as _AdapterView from '@bingads-webui-campaign-legacy/griddownload/view/adapter';\r\nexport default _AdapterView.DownloadViewV1;\r\n\r\n","import _ from 'underscore';\r\nimport jsdata from '@bingads-webui-campaign-legacy/hotel-center-js-data/index';\r\nimport edm from '@bingads-webui-campaign-legacy/hotel-center-edm/index';\r\n\r\nconst getQueryOptions = (params) => {\r\n const queryOptions = {};\r\n\r\n if (!params) {\r\n return queryOptions;\r\n }\r\n\r\n if (params.filterText) {\r\n queryOptions.where = _.defaults(queryOptions.where || {}, {\r\n Name: {\r\n $contains: params.filterText,\r\n },\r\n });\r\n }\r\n\r\n if (params.take) {\r\n queryOptions.limit = params.take;\r\n queryOptions.offset = params.skip || 0;\r\n }\r\n\r\n return queryOptions;\r\n};\r\n\r\nexport class HotelCenterEntitySelectorService {\r\n get useInjectedAdgroupFetch() {\r\n return true;\r\n }\r\n getCampaigns(options) {\r\n const jsDataOptions = {\r\n cacheResponse: false,\r\n };\r\n\r\n const queryOptions = getQueryOptions(options);\r\n\r\n jsdata.SubAccount.findAll(queryOptions, jsDataOptions)\r\n .then((items) => {\r\n const results = {\r\n data: _.map(items, (subAccount) => ({\r\n Type: 'Campaign',\r\n Id: subAccount.Id,\r\n Name: subAccount.Name,\r\n // Status as defined in the map in '@bingads-webui-static-legacy/schema/campaign/entityStatus'\r\n Status: subAccount.Status === 'Active' ? 121 : 123,\r\n })),\r\n total: items.totalCount,\r\n HasPaged: true,\r\n };\r\n\r\n options.success(results);\r\n }).catch((error) => options.fail(error));\r\n }\r\n getAdgroups(options) {\r\n const jsDataOptions = {\r\n cacheResponse: false,\r\n };\r\n\r\n const queryOptions = getQueryOptions(options);\r\n\r\n if (options.data && options.data.campaignId) {\r\n jsDataOptions.entitySet = edm.currentAccount.SubAccounts.$withKey(options.data.campaignId).HotelGroups;\r\n }\r\n jsdata.HotelGroup.findAll(queryOptions, jsDataOptions)\r\n .then((items) => {\r\n const results = {\r\n data: _.map(items, (item) => ({\r\n Type: 'AdGroup',\r\n Id: item.Id,\r\n Name: item.Name,\r\n // Status as defined in the map in '@bingads-webui-static-legacy/schema/adgroup/entityStatus'\r\n Status: item.Status === 'Active' ? 141 : 143,\r\n Campaign: {\r\n Id: item.SubAccountId,\r\n Name: item.SubAccountName,\r\n },\r\n })),\r\n total: items.totalCount,\r\n };\r\n\r\n options.success(results);\r\n }).catch((error) => options.fail(error));\r\n }\r\n}\r\n","import $ from 'jquery';\r\nimport _ from 'underscore';\r\nimport DataStore from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport edmCampaign from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport { bingadsGridColumn } from '@bingads-webui-component-legacy/bingads-grid/shared/column';\r\nimport { getSharedColumns, getDeliveryColumn } from '@bingads-webui-campaign-legacy/bingadsgrid/vnext/shared/columns';\r\nimport state from '@bingads-webui-component-legacy/state/index';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport { helpers, constants } from '@bingads-webui/projection-grid-toolbar';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nimport sortableHeaderTemplate from '@bingads-webui-campaign-legacy/common-grid-config/column/sortableHeaderTemplate.pug';\r\nimport { getGridName } from '@bingads-webui-campaign/inline-download-grids-metadata';\r\nimport logger from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport * as putil from '@bingads-webui/primitive-utilities';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/hotel-center');\r\nconst s$i18n = window.globalLegacyI18n.get('$/schema-i18n!hotel-center');\r\nconst AdExtensionAssociationSchema = window.globalLegacySchema.get('AdExtensionAssociation');\r\n\r\nexport default class GridConfig {\r\n constructor({\r\n adextensionType,\r\n columns,\r\n excludedColumns = [],\r\n deleteAssociation,\r\n editExtension,\r\n addExtension,\r\n gridContainer,\r\n toolbarContainer,\r\n associationType,\r\n typeString,\r\n selection = true,\r\n heroButtonText = i18n.get('AdExtensionsSummary_Create_AdExtension'),\r\n dataSourceGenerator,\r\n adExtensionTabPerfMarker,\r\n isForVNext = false,\r\n customHeaderOffset,\r\n }) {\r\n const headerRefreshCache = 'x-ms-refreshcampaigncache';\r\n\r\n this.name = getGridName('AdExtensionAssociation', {\r\n AdExtensionType: adextensionType,\r\n AssociationType: associationType,\r\n });\r\n this.legacyGridName = this.name;\r\n if (!isForVNext) {\r\n this.el = gridContainer;\r\n }\r\n this.tableClasses = ['table', 'table-bordered'];\r\n this.scrolling = {\r\n virtualized: true,\r\n viewport: $('.callout-extension-table-page-container'),\r\n header: {\r\n type: 'sticky',\r\n offset: customHeaderOffset || (() => $('.navbar-fixed-top').height()),\r\n },\r\n };\r\n\r\n this.sortableHeader = {\r\n template: sortableHeaderTemplate,\r\n };\r\n\r\n this.hasCampaignNameColumn = associationType !== 'Account';\r\n this.hasAdGroupNameColumn = associationType === 'HotelGroup';\r\n\r\n const deliveryColumn = getDeliveryColumn({ isForVNext, i18n });\r\n const sharedColumns = [];\r\n\r\n const entityColumns = [\r\n // eslint-disable-next-line no-extra-parens\r\n ...(this.hasCampaignNameColumn ? [bingadsGridColumn({\r\n name: 'SubAccountName',\r\n property: (item) => {\r\n return _.result(item.VerticalSubAccount, 'Name', '');\r\n },\r\n type: 'string',\r\n sortable: 'VerticalSubAccount/Name',\r\n title: s$i18n.type('SubAccount'),\r\n bodyClasses: ['col-SubAccountName'],\r\n })] : []),\r\n\r\n // eslint-disable-next-line no-extra-parens\r\n ...(this.hasAdGroupNameColumn ? [bingadsGridColumn({\r\n name: 'HotelGroupName',\r\n property: (item) => {\r\n return _.result(item.VerticalHotelGroup, 'Name', '');\r\n },\r\n type: 'string',\r\n sortable: 'VerticalHotelGroup/Name',\r\n title: s$i18n.type('HotelGroup'),\r\n bodyClasses: ['col-HotelGroupName'],\r\n })] : []),\r\n ];\r\n\r\n const idColumn = [bingadsGridColumn({\r\n name: 'AdExtensionId',\r\n property: {\r\n get(item) {\r\n return putil.get(item, 'AdExtension.Id');\r\n },\r\n key: 'AdExtension',\r\n },\r\n sortable: 'AdExtension/Id',\r\n title: i18n.get('ColumnName_AdExtensionId'),\r\n })];\r\n\r\n this.columns = columns.concat(getSharedColumns(sharedColumns));\r\n this.columns = this.columns.concat([deliveryColumn]);\r\n this.columns = this.columns.concat(entityColumns);\r\n this.columns = this.columns.concat(idColumn);\r\n\r\n if (!_.isEmpty(excludedColumns)) {\r\n this.columns = _.reject(this.columns, (col) => _.contains(excludedColumns, col.name));\r\n }\r\n\r\n this.plugins = {\r\n a11y: { i18n },\r\n performanceLog: {\r\n appConfig: config,\r\n logger,\r\n },\r\n perfMarker: {\r\n appConfig: config,\r\n marker: adExtensionTabPerfMarker,\r\n },\r\n filter: {\r\n },\r\n toolbar: helpers.singleToolbar({\r\n container: toolbarContainer,\r\n items: ((defaultItems) => {\r\n if (adextensionType === 'AutomatedAdExtension') {\r\n return _.filter(defaultItems, (item) =>\r\n _.contains(['hero-button', 'button-download', 'dropdown-segment', 'dropdown-column-chooser', 'filter-menu'], item.id)\r\n );\r\n }\r\n return defaultItems;\r\n })([\r\n {\r\n id: 'hero-button',\r\n type: 'button',\r\n text: heroButtonText,\r\n classes: ['btn', 'btn-primary'],\r\n onClick: addExtension,\r\n disabled: pageContext.Permissions.IsReadOnlyUser || (config.get('CurrentAccountInActive') === true),\r\n }, {\r\n type: 'dropdown',\r\n id: 'dropdown-extension-edit',\r\n button: {\r\n text: i18n.get('AdExtensionsSummary_EditButton'),\r\n classes: ['btn', 'btn-secondary'],\r\n attributes: { tabindex: '0' },\r\n },\r\n menu: {\r\n items: [\r\n {\r\n iconLeft: 'icon-status-delete',\r\n id: 'delete-association',\r\n text: i18n.get('AdExtensionsSummary_DeleteButton'),\r\n onClick: deleteAssociation,\r\n }, {\r\n type: 'dropdown-divider',\r\n }, {\r\n id: 'edit-an-extension',\r\n text: i18n.get('AdExtensionsSummary_ExtensionEdit'),\r\n onClick: editExtension,\r\n },\r\n ],\r\n },\r\n },\r\n ]),\r\n }),\r\n\r\n dateFilter: {\r\n state,\r\n isOdataActionSource: true,\r\n edm: edmCampaign,\r\n addDateChangeListener: (handler) => {\r\n if (window.App.views.Summary) {\r\n window.App.views.Summary.bindDateFilterChangeHandler(handler, true);\r\n }\r\n },\r\n comparisonColumns: [\r\n 'PeriodPerformanceMetrics',\r\n 'PerformanceMetricsChange',\r\n 'PerformanceMetricsChangePercentage',\r\n ],\r\n },\r\n\r\n pagination: {\r\n pageSize: 50,\r\n availablePageSizes: [20, 50, 100, 200],\r\n enableRandomPage: false,\r\n pageSizeText: i18n.getString('Grid_ShowRows'),\r\n },\r\n placeholder: {\r\n // Message for no data at all.\r\n container: '.noresult-container',\r\n text: i18n.getString('HotelCenter_Intelligence_AdExtensions_Grid_NoActiveAdExtensions').replace('{0}', typeString),\r\n },\r\n };\r\n\r\n this.rows = {\r\n headRows: [\r\n helpers.toolbarRow(constants.DEFAULT_TOOLBAR_NAME),\r\n 'column-header-rows',\r\n ],\r\n };\r\n\r\n const entitySet = edmCampaign.currentAccount;\r\n\r\n this.dataSource = _.isFunction(dataSourceGenerator) ? dataSourceGenerator(entitySet) : {\r\n type: 'jsdata',\r\n entity: DataStore[AdExtensionAssociationSchema.name],\r\n options: {\r\n entitySet: entitySet.AdExtensionAssociations['Default.GridData'].$call({\r\n gridDataParameters: {},\r\n associationType,\r\n adExtensionTypes: [adextensionType],\r\n }),\r\n cacheResponse: false,\r\n headers: {\r\n [headerRefreshCache]: true,\r\n },\r\n },\r\n query: {\r\n $select: 'AdExtension',\r\n $expand: 'AdExtension,VerticalSubAccount,VerticalHotelGroup',\r\n $filter: 'AdExtension/Status eq Enum.AdExtensionStatus\\'Active\\'',\r\n },\r\n schema: AdExtensionAssociationSchema,\r\n };\r\n\r\n if (selection) {\r\n this.selection = {\r\n selectable: (item) => {\r\n return item && item.isAggregateRow !== true;\r\n },\r\n };\r\n }\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\nexport default class SubAccountAssociationsRequestFactory {\r\n setEntityIds(options, scope) {\r\n options.entitySet = options.entitySet.Campaigns.$withKey(scope.campaignId);\r\n }\r\n\r\n generateDestroyRequest(ids, scope) {\r\n return [{\r\n 'adExtensionAssociations': this.getBatchRequest(ids, scope),\r\n }];\r\n }\r\n\r\n generateUpdateRequest(ids, scopes) {\r\n return [{\r\n 'adExtensionAssociations': _.chain(scopes)\r\n .map((scope) => this.getBatchRequest(ids, scope))\r\n .flatten(true)\r\n .value(),\r\n }];\r\n }\r\n\r\n getBatchRequest(idList, scope) {\r\n return _.map(idList, (id) => ({\r\n Type: 'SubAccount',\r\n EntityId: scope.campaignId,\r\n AdExtensionId: id,\r\n }));\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\nexport default class HotelGroupAssociationsRequestFactory {\r\n setEntityIds(options, scope) {\r\n options.entitySet = options.entitySet.Campaigns.$withKey(scope.campaignId);\r\n options.entitySet = options.entitySet.AdGroups.$withKey(scope.adGroupId);\r\n }\r\n\r\n generateDestroyRequest(ids, scope) {\r\n return [{\r\n 'adExtensionAssociations': this.getBatchRequest(ids, scope),\r\n }];\r\n }\r\n\r\n generateUpdateRequest(ids, scopes) {\r\n return [{\r\n 'adExtensionAssociations': _.chain(scopes)\r\n .map((scope) => this.getBatchRequest(ids, scope))\r\n .flatten(true)\r\n .value(),\r\n }];\r\n }\r\n\r\n getBatchRequest(idList, scope) {\r\n return _.map(idList, (id) => ({\r\n Type: 'HotelGroup',\r\n EntityId: scope.adGroupId,\r\n AdExtensionId: id,\r\n }));\r\n }\r\n}\r\n","import AssociationsRepository from '@bingads-webui-campaign-legacy/adextension-shared/service/repos/associations';\r\nimport SubAccountAssociationsRequestFactory from '@bingads-webui-campaign-legacy/hotel-center-ad-extensions/shared/service/subAccountAssociationsRequestFactory';\r\nimport HotelGroupAssociationsRequestFactory from '@bingads-webui-campaign-legacy/hotel-center-ad-extensions/shared/service/hotelGroupAssociationsRequestFactory';\r\n\r\nexport class HotelAssociationsRepository extends AssociationsRepository {\r\n constructor(options) {\r\n super(options);\r\n this._schema = options.schema;\r\n this.requestFactory = new SubAccountAssociationsRequestFactory();\r\n // overriding default Hotel Center batch URL with MT batch URL.\r\n // 'odata.mt_batch_url' is the name of the key in the component/config/index\r\n // set in AdsAppUI\\private\\UI\\Assets\\campaignui\\feature\\hotel-center\\js\\bootstrap\\index.js\r\n this.batchURL = 'odata.mt_batch_url';\r\n }\r\n\r\n createRequestFactory(entityType) {\r\n if (entityType === 'adgroup') {\r\n this.requestFactory = new HotelGroupAssociationsRequestFactory();\r\n } else if (entityType === 'campaign') {\r\n this.requestFactory = new SubAccountAssociationsRequestFactory();\r\n }\r\n }\r\n}\r\n","/* eslint no-param-reassign: 0 */\r\n\r\nimport _ from 'underscore';\r\nimport ExtensionsRepository from '@bingads-webui-campaign-legacy/adextension-shared/service/repos/extensions';\r\nimport { HotelAssociationsRepository } from './hotel-center-associations-repository';\r\n\r\nconst baseSchema = window.globalLegacySchema.get('AdExtension');\r\n\r\nconst standardProperties = [baseSchema.key, 'Scheduling'];\r\nconst commonProperties = _.difference(_.keys(baseSchema.properties), standardProperties);\r\n\r\nexport class HotelCenterAdExtensionsRepository {\r\n constructor(options) {\r\n let ownedProperties = _.difference(_.keys(options.schema.properties), commonProperties);\r\n\r\n options = _.extend({\r\n afterChangeComitted: _.noop,\r\n extensionDataFormatter: _.partial(_.map, _, _.partial(_.pick, _, ownedProperties)),\r\n associationsDataFormatter: _.partial(_.pluck, _, 'AdExtension'),\r\n }, options);\r\n\r\n this.extension = new ExtensionsRepository(options);\r\n this.association = new HotelAssociationsRepository(options);\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport * as putil from '@bingads-webui/primitive-utilities';\r\n\r\nexport function attrsProcessor(attrs, associationType, accountId) {\r\n if (_.isArray(attrs)) {\r\n _.each(attrs, (item) => {\r\n const associationAdgroupId = putil.get(item, 'VerticalHotelGroup.Id');\r\n const associationCampaignId = putil.get(item, 'VerticalSubAccount.Id');\r\n const associationAccountId = accountId;\r\n const adextensionId = putil.get(item, 'AdExtension.Id');\r\n const adextensionStatus = putil.get(item, 'AdExtension.Status');\r\n // associationAdgroupId will be string for hotelcenter.\r\n const Id = (associationAdgroupId === '0' ? 0 : associationAdgroupId) || associationCampaignId || associationAccountId;\r\n\r\n item.Id = `${Id}_${associationType}_${adextensionId}`;\r\n //update delivery status when ad extension deleted, it's a work around in UI side, MT should fix it, bug id 574059\r\n if (adextensionStatus === 'Deleted') {\r\n item.AdExtension.Delivery = 'AdExtensionAssociationDeleted';\r\n }\r\n });\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport _ from 'underscore';\r\nimport $ from 'jquery';\r\nimport * as putil from '@bingads-webui/primitive-utilities';\r\nimport { toolbarPlugin, constants } from '@bingads-webui/projection-grid-toolbar';\r\nimport { dateFilterPlugin as newDateFilterPlugin } from '@bingads-webui-campaign/projection-grid-date-filter';\r\nimport { paginationPlugin as newPaginationPlugin } from '@bingads-webui/projection-grid-pagination';\r\nimport { uiBlockerPlugin as newUiBlockerPlugin } from '@bingads-webui/projection-grid-uiblocker';\r\nimport { placeholderPlugin } from '@bingads-webui/projection-grid-placeholder';\r\nimport { a11yPlugin } from '@bingads-webui/projection-grid-a11y';\r\nimport { assistedSelectionPlugin as newAssistedSelectionPlugin } from '@bingads-webui/projection-grid-assisted-selection';\r\nimport { performanceLogPlugin, perfMarkerPlugin } from '@bingads-webui-campaign/pgrid-performance-log';\r\nimport { pgridFactory } from '@bingads-webui-campaign/pgrid-factory';\r\nimport { appendLearnMoreLink } from '@bingads-webui-component-legacy/help/index';\r\nimport fetchPreferenceConfig from '@bingads-webui-campaign-legacy/bingadsgrid/service/fetch-preference-config';\r\nimport template from '@bingads-webui-campaign-legacy/hotel-center-ad-extensions/shared/template/hotel-extension-page.pug';\r\nimport NewGridConfig from '@bingads-webui-campaign-legacy/hotel-center-ad-extensions/shared/viewmodel/new-grid-config';\r\nimport { HotelAssociationsRepository } from '@bingads-webui-campaign-legacy/hotel-center-ad-extensions/shared/service/hotel-center-associations-repository';\r\nimport { HotelCenterAdExtensionsRepository } from '@bingads-webui-campaign-legacy/hotel-center-ad-extensions/shared/service/repository';\r\n\r\nimport ExtensionsRepository from '@bingads-webui-campaign-legacy/adextension-shared/service/repos/extensions';\r\nimport state from '@bingads-webui-component-legacy/state/index';\r\nimport Promise from 'bluebird';\r\nimport { AdExtensionDeliveryStatusPopupFactory } from '@bingads-webui-campaign-legacy/adextension-shared/view/delivery/adextension-delivery-status-popup-factory';\r\nimport { attrsProcessor as defaultAttrsProcessor }\r\n from '@bingads-webui-campaign-legacy/hotel-center-ad-extensions/shared/view/Hotel-center-base-ad-extension-helper';\r\nimport popup from '@bingads-webui-component-legacy/dialog/popup';\r\n// eslint-disable-next-line\r\nimport _bingads_webui_component_legacy_timezonemapper_index from '@bingads-webui-component-legacy/timezonemapper/index';\r\n// eslint-disable-next-line\r\nconst { getTimeZoneForDateRangeText } = _bingads_webui_component_legacy_timezonemapper_index;\r\nimport preferencesService from '@bingads-webui-component-legacy/preference/service/index';\r\nimport eventDispatcher from '@bingads-webui-component-legacy/event-dispatcher/index';\r\nimport cacheManager from '@bingads-webui-campaign-legacy/cache-manager/index';\r\n\r\nconst i18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/hotel-center');\r\n\r\nconst ENTITY_MAP = { AdGroup: 'VerticalHotelGroup', Campaign: 'VerticalSubAccount' };\r\n\r\n\r\nconst headerRefreshCache = 'x-ms-refreshcampaigncache';\r\nlet deliveryAlertId;\r\n\r\n/* @this: ViewClassName */\r\nfunction updateFlagRefreshCache(operator) {\r\n const { options } = this.grid.gridView.get('dataSource');\r\n\r\n if (operator === 'remove' && _.has(options.headers, headerRefreshCache)) {\r\n delete options.headers[headerRefreshCache];\r\n }\r\n if (operator === 'add' && !_.has(options.headers, headerRefreshCache)) {\r\n options.headers[headerRefreshCache] = true;\r\n }\r\n}\r\n\r\n/* @this: ViewClassName */\r\nfunction expandToolBar(view) {\r\n this.$('.editor__container').html(view.$el);\r\n\r\n // show editor\r\n this.$('.editor__container').show();\r\n // hide the toolbar with empty view, which will have blank height\r\n this.grid.toolbar.gridToolbarGroup.hideAllToolbars();\r\n // on cancel event\r\n view.on('cancel', () => {\r\n updateFlagRefreshCache.call(this, 'add');\r\n this.grid.toolbar.gridToolbarGroup.showAllToolbars();\r\n this.$('.editor__container').hide();\r\n view.remove();\r\n this.grid.gridView.refresh(true);\r\n });\r\n\r\n // on save event\r\n view.on('save', () => {\r\n view.trigger('cancel');\r\n });\r\n}\r\n\r\nfunction checkDeliveryStatus(deliveryStatus) {\r\n let deletedStatuses = ['AssociationDeleted', 'AdExtensionAssociationDeleted'];\r\n\r\n if (_.contains(deletedStatuses, deliveryStatus)) {\r\n deliveryAlertId = window.App.views.alertCenter.showError(i18n.getString('AdExtension_EditDeletedAssociation_Error'));\r\n return false;\r\n }\r\n return true;\r\n}\r\n/* @this: ViewInstantiateEditor */\r\nfunction openAssociationsEditor({\r\n entityType,\r\n currentCampaignId,\r\n currentAdgroupId,\r\n adExtensionId,\r\n editFromGrid,\r\n campaignName,\r\n adgroupName,\r\n}) {\r\n const options = {\r\n entityType,\r\n associationType: this.associationType,\r\n // when isStringFormatId is true, string format is used for Default.Disassociate and Default.Associate calls\r\n isStringFormatId: true,\r\n campaignId: currentCampaignId,\r\n adgroupId: currentAdgroupId,\r\n adExtensionId,\r\n editFromGrid,\r\n campaignName,\r\n adgroupName,\r\n usePanel: false,\r\n disableScheduling: true,\r\n repositoryFactory: ({ schema, updateContext }) => new HotelCenterAdExtensionsRepository({\r\n schema,\r\n afterChangeComitted() {\r\n if (_.isFunction(updateContext)) {\r\n updateContext(['AccountAdExtensionsGrid', 'CampaignAdExtensionsGrid', 'AdGroupAdExtensionsGrid']);\r\n }\r\n },\r\n }),\r\n };\r\n\r\n if (this.isUINext) {\r\n this.createAssociationEditorForUiNext(options);\r\n return null;\r\n }\r\n\r\n let view = this.instantiateEditor(options);\r\n\r\n expandToolBar.call(this, view.render());\r\n return view;\r\n}\r\n/* @this: ViewClassName */\r\nfunction editAssociations() {\r\n const selectedItems = this.grid.gridView.selectedItems();\r\n\r\n if (_.isEmpty(selectedItems)) {\r\n popup.alert(i18n.getString('Grid_RowSelectionRequired'));\r\n return false;\r\n }\r\n // check choosed column numbers\r\n if (selectedItems.length > 1) {\r\n popup.alert(i18n.getString('AdExtensions_Edit_SelectOneRow'));\r\n return false;\r\n }\r\n\r\n const selectedItem = selectedItems[0];\r\n\r\n if (!checkDeliveryStatus(selectedItem.AdExtension.Delivery)) {\r\n return false;\r\n }\r\n const selectedCampaignId = putil.get(selectedItem, 'VerticalSubAccount.Id');\r\n const selectedAdgroupId = putil.get(selectedItem, 'VerticalHotelGroup.Id');\r\n const campaignName = putil.get(selectedItem, 'VerticalSubAccount.Name');\r\n const adgroupName = putil.get(selectedItem, 'VerticalHotelGroup.Name');\r\n\r\n this.editor = openAssociationsEditor.call(this, {\r\n entityType: this.associationType.toLowerCase(),\r\n currentCampaignId: selectedCampaignId,\r\n currentAdgroupId: selectedAdgroupId,\r\n adExtensionId: selectedItem.AdExtension.Id,\r\n editFromGrid: true,\r\n campaignName,\r\n adgroupName,\r\n });\r\n\r\n return true;\r\n}\r\n/* @this: ViewClassName */\r\nfunction getBulkDeleteItems() {\r\n const selectedItems = this.grid.gridView.selectedItems();\r\n\r\n if (_.isEmpty(selectedItems)) {\r\n popup.alert(i18n.getString('Grid_RowSelectionRequired'));\r\n return [];\r\n }\r\n const deleteMessage = i18n.getString('AdExtensionsSummary_DeleteConfirmation');\r\n\r\n if (!popup.confirm(deleteMessage)) {\r\n return false;\r\n }\r\n return _.map(selectedItems, (selectedItem) => {\r\n const selectedCampaignId = putil.get(selectedItem, 'VerticalSubAccount.Id');\r\n const selectedAdgroupId = putil.get(selectedItem, 'VerticalHotelGroup.Id');\r\n const selectedId = putil.get(selectedItem, 'AdExtension.Id');\r\n\r\n return {\r\n where: {\r\n campaignId: selectedCampaignId,\r\n adGroupId: selectedAdgroupId,\r\n id: {\r\n in: [selectedId],\r\n },\r\n },\r\n };\r\n });\r\n}\r\n/* @this: ViewClassName */\r\nfunction deleteAssociations() {\r\n const deletedItems = getBulkDeleteItems.call(this);\r\n\r\n if (_.isEmpty(deletedItems)) {\r\n return false;\r\n }\r\n\r\n // use odata directly\r\n const associations = new HotelAssociationsRepository({\r\n schema: this.schema,\r\n associationsDataFormatter: this.associationsDataFormatter,\r\n afterChangeComitted: this.afterChangeComitted,\r\n });\r\n\r\n const mappingAssociationType = this.associationType.toLowerCase() === 'subaccount' ? 'campaign' : 'adgroup';\r\n\r\n associations.createRequestFactory(mappingAssociationType);\r\n\r\n associations.destroyAllByOdata(deletedItems).then(() => {\r\n updateFlagRefreshCache.call(this, 'add');\r\n this.grid.gridView.refresh(true);\r\n });\r\n\r\n return true;\r\n\r\n}\r\n\r\nconst getDefaultPlugins = ({\r\n isUINext,\r\n pluginFactories,\r\n gridOptions,\r\n}) => _.compact([\r\n {\r\n plugin: pluginFactories.a11yPlugin,\r\n config: gridOptions.plugins.a11y,\r\n },\r\n {\r\n plugin: pluginFactories.performanceLogPlugin,\r\n config: gridOptions.plugins.performanceLog,\r\n },\r\n {\r\n plugin: pluginFactories.perfMarkerPlugin,\r\n config: gridOptions.plugins.perfMarker,\r\n },\r\n {\r\n plugin: pluginFactories.toolbarPlugin,\r\n config: gridOptions.plugins.toolbar,\r\n },\r\n !isUINext && {\r\n plugin: pluginFactories.newDateFilterPlugin,\r\n config: gridOptions.plugins.dateFilter,\r\n },\r\n {\r\n plugin: pluginFactories.newPaginationPlugin,\r\n config: gridOptions.plugins.pagination,\r\n },\r\n {\r\n plugin: pluginFactories.placeholderPlugin,\r\n config: gridOptions.plugins.placeholder,\r\n },\r\n {\r\n plugin: pluginFactories.newUiBlockerPlugin,\r\n config: {\r\n el: isUINext ? $('.callout-extension-table-page-container').get(0) : null,\r\n },\r\n },\r\n {\r\n plugin: pluginFactories.newAssistedSelectionPlugin,\r\n },\r\n]);\r\n\r\nexport default class HotelCenterBaseAdExtensionAssociationsView extends Backbone.View {\r\n initialize({\r\n instantiateEditor,\r\n adextensionType,\r\n columns,\r\n schema,\r\n excludedColumns = [],\r\n associationType,\r\n typeString,\r\n customizedFilterList,\r\n dataPostProcess,\r\n selection,\r\n heroButtonText,\r\n filterListProcessor,\r\n overThresholdErrorMessage,\r\n perfMarker,\r\n isUINext = false,\r\n createAssociationEditorForUiNext = _.noop,\r\n extendPlugins = () => [],\r\n preferenceConfig,\r\n viewport,\r\n customHeaderOffset,\r\n }) {\r\n this.campaignId = state.get('campaign_id');\r\n this.adgroupId = state.get('adgroup_id');\r\n this.instantiateEditor = instantiateEditor;\r\n this.adextensionType = adextensionType || schema.name;\r\n this.columns = columns;\r\n this.schema = schema;\r\n this.excludedColumns = excludedColumns;\r\n this.associationType = associationType;\r\n this.typeString = typeString;\r\n this.customizedFilterList = customizedFilterList;\r\n this.dataPostProcess = dataPostProcess;\r\n this.extensionsRepo = new ExtensionsRepository({\r\n schema,\r\n });\r\n this.selection = selection;\r\n this.heroButtonText = heroButtonText;\r\n this.filterListProcessor = filterListProcessor;\r\n this.overThresholdErrorMessage = overThresholdErrorMessage;\r\n this.deleteAssociation = _.bind(deleteAssociations, this);\r\n this.editExtension = _.bind(editAssociations, this);\r\n this.disableScheduling = true;\r\n this.perfMarker = perfMarker;\r\n this.isUINext = isUINext;\r\n this.createAssociationEditorForUiNext = createAssociationEditorForUiNext;\r\n this.extendPlugins = extendPlugins;\r\n this.viewport = viewport;\r\n this.customHeaderOffset = customHeaderOffset;\r\n this.preferenceConfig = preferenceConfig;\r\n this.isInitialGrid = true;\r\n if (this.isUINext) {\r\n this.prepareGrid({});\r\n }\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click .grid-table .glyph-container .status_icon': 'showAdExtensionRejectReasons',\r\n };\r\n }\r\n\r\n showAdExtensionRejectReasons(event) {\r\n this.deliveryStatusPopupFactory.showRejectionPopup(event);\r\n event.stopPropagation();\r\n $(document).one('click', this.deliveryStatusPopupFactory.closeRejectionPopup);\r\n }\r\n\r\n createAssociations() {\r\n this.editor = openAssociationsEditor.call(this, {\r\n entityType: this.associationType.toLowerCase(),\r\n currentCampaignId: this.campaignId,\r\n currentAdgroupId: this.adgroupId,\r\n });\r\n }\r\n\r\n get template() {\r\n return template;\r\n }\r\n\r\n render({\r\n dataSourceGenerator,\r\n attrsProcessor = defaultAttrsProcessor,\r\n shouldNotShowGrid = false,\r\n } = {}) {\r\n this.$el.html(this.template({\r\n appendLearnMoreLink,\r\n associationType: this.associationType.toLowerCase(),\r\n accountTimeZoneText: getTimeZoneForDateRangeText(),\r\n shouldNotShowGrid,\r\n isUINext: this.isUINext,\r\n }));\r\n this.$('.editor__container').hide();\r\n\r\n if (shouldNotShowGrid) {\r\n return this;\r\n }\r\n\r\n if (this.isUINext) {\r\n this.$('.grid-table').empty().append(this.grid.gridView.render().$el);\r\n } else {\r\n this.prepareGrid({\r\n dataSourceGenerator,\r\n attrsProcessor,\r\n });\r\n }\r\n\r\n return this;\r\n }\r\n\r\n prepareGrid({\r\n dataSourceGenerator,\r\n attrsProcessor = defaultAttrsProcessor,\r\n }) {\r\n const configParams = {\r\n toolbarContainer: this.$('.grid-toolbar-container'),\r\n gridContainer: this.$('.grid-table'),\r\n adextensionType: this.adextensionType,\r\n columns: this.columns,\r\n excludedColumns: this.excludedColumns,\r\n addExtension: _.bind(this.createAssociations, this),\r\n deleteAssociation: this.deleteAssociation,\r\n editExtension: this.editExtension,\r\n associationType: this.associationType,\r\n typeString: this.typeString,\r\n customizedFilterList: this.customizedFilterList,\r\n selection: this.selection,\r\n heroButtonText: this.heroButtonText,\r\n dataSourceGenerator,\r\n filterListProcessor: this.filterListProcessor,\r\n disableScheduling: this.disableScheduling,\r\n adExtensionTabPerfMarker: this.perfMarker,\r\n isForVNext: this.isUINext,\r\n customHeaderOffset: this.customHeaderOffset,\r\n };\r\n\r\n const config = new NewGridConfig(configParams);\r\n\r\n this.filterConfig = config.filterConfig;\r\n\r\n config.dataSource.options.afterFindAll = (resources, attrs) => {\r\n if (attrs && _.isArray(attrs.errors)) {\r\n const error = _.first(attrs.errors);\r\n\r\n if (error && error.Code && error.Code === 'TooMuchDataToDownload') {\r\n config.plugins.placeholder = _.extend(config.plugins.placeholder, {\r\n asyncCallback: () => Promise.resolve(true),\r\n asyncEmptyText: this.overThresholdErrorMessage,\r\n });\r\n } else if (!_.isArray(attrs)) {\r\n return [];\r\n }\r\n } else if (!_.isArray(attrs)) {\r\n return [];\r\n }\r\n\r\n attrsProcessor(attrs, this.associationType, state.get('account_id'));\r\n\r\n if (!_.isUndefined(this.dataPostProcess)) {\r\n return this.dataPostProcess(attrs);\r\n }\r\n\r\n updateFlagRefreshCache.call(this, 'remove');\r\n\r\n return attrs;\r\n };\r\n\r\n if (this.isUINext) {\r\n this.setupGrid(config);\r\n } else {\r\n this.gridPromise = fetchPreferenceConfig(config).then(() => {\r\n this.setupGrid(config);\r\n });\r\n }\r\n }\r\n\r\n setupGrid(config) {\r\n const pluginFactories = {\r\n toolbarPlugin,\r\n newDateFilterPlugin,\r\n newPaginationPlugin,\r\n newUiBlockerPlugin,\r\n a11yPlugin,\r\n newAssistedSelectionPlugin,\r\n perfMarkerPlugin,\r\n placeholderPlugin,\r\n performanceLogPlugin,\r\n };\r\n\r\n const defaultPlugins = getDefaultPlugins({\r\n isUINext: this.isUINext,\r\n pluginFactories,\r\n gridOptions: config,\r\n });\r\n\r\n const extendedPlugins = this.extendPlugins();\r\n\r\n this.grid = pgridFactory({\r\n gridConfig: config,\r\n plugins: defaultPlugins.concat(extendedPlugins),\r\n preferenceConfig: this.preferenceConfig || {},\r\n });\r\n\r\n this.grid.gridView.render();\r\n\r\n this.deliveryStatusPopupFactory = new AdExtensionDeliveryStatusPopupFactory({\r\n grid: this.grid,\r\n type: this.adextensionType,\r\n overrideEntities: ENTITY_MAP,\r\n overrideAssociationType: this.associationType,\r\n BidataNotRequired: true,\r\n });\r\n\r\n this.grid.gridView.on('didUpdate', (changes) => {\r\n if (this.isInitialGrid) {\r\n this.isInitialGrid = false;\r\n } else if (_.has(changes, 'sortableHeader')) {\r\n const orderby = _.result(changes.query, 'orderby') || _.result(this.grid.gridView.get('query'), 'orderby');\r\n const sortableHeader = changes.sortableHeader;\r\n const preference = { sortInfo: { orderby, sortableHeader } };\r\n\r\n preferencesService.setAtUserLevel({ Name: `WebApp.CampaignUI.${config.name}`, Data: preference });\r\n }\r\n // update toolbar\r\n // disabled Edit dropdown button if there is no data\r\n const toolbarEditor = this.grid.toolbar.gridToolbarGroup.toolbarWithName(constants.DEFAULT_TOOLBAR_NAME);\r\n const editMenuId = 'dropdown-extension-edit';\r\n const itemsCount = this.grid.gridView.getItemCount();\r\n\r\n toolbarEditor.set(editMenuId, { disabled: itemsCount === 0 });\r\n });\r\n\r\n this.grid.gridView.on('didReload', () => {\r\n this.grid.gridView.deselectAll();\r\n if (deliveryAlertId) {\r\n window.App.views.alertCenter.dismiss(deliveryAlertId);\r\n }\r\n });\r\n\r\n eventDispatcher.on('page-title.update-status', () => {\r\n cacheManager.invalidate('AdExtensionAssociation');\r\n this.grid.gridView.refresh(true);\r\n });\r\n }\r\n\r\n removeRejectionPopup() {\r\n const rejectionContainer = document.getElementById('rejectionContainer');\r\n\r\n if (rejectionContainer && rejectionContainer.style && rejectionContainer.style.display !== 'none') {\r\n $('#rejectionContainer').css('display', 'none');\r\n $.gridPopup.ResetImage(); //eslint-disable-line\r\n }\r\n }\r\n\r\n remove() {\r\n if (this.grid) {\r\n this.grid.gridView.remove();\r\n this.grid.toolbar.gridToolbarGroup.remove();\r\n this.grid.pagination.remove();\r\n }\r\n\r\n if (this.editor) {\r\n this.editor.remove();\r\n }\r\n this.removeRejectionPopup();\r\n\r\n if (this.deliveryStatusPopupFactory) {\r\n $(document).off('click', this.deliveryStatusPopupFactory.closeRejectionPopup);\r\n }\r\n\r\n super.remove();\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport {\r\n HotelCenterAssignment as hotelCenterAssignmentLoader,\r\n} from '@bingads-webui-campaign/hotel-center-assignment';\r\n\r\n// Import the dependencies to ensure they are loaded\r\nimport * as viewAdapter from '@bingads-webui-campaign-legacy/griddownload/view/adapter';\r\nimport * as hotelCenterEdm from '@bingads-webui-campaign-legacy/hotel-center-edm/index';\r\nimport hotelCenterJsData from '@bingads-webui-campaign-legacy/hotel-center-js-data/index';\r\nimport * as crossPageSelectAll from '@bingads-webui-component-legacy/bingads-grid/plugin/cross-page-select-all/index';\r\nimport * as sharedColumn from '@bingads-webui-component-legacy/bingads-grid/shared/column';\r\nimport * as schemaUtil from '@bingads-webui-component-legacy/bingads-grid/shared/schema-util';\r\nimport state from '@bingads-webui-component-legacy/state/index';\r\nimport appConfig from '@bingads-webui-component-legacy/config/index';\r\nimport * as customUserInfoPreferences from '@bingads-webui-component-legacy/bingads-grid/service/custom-userinfo-preferences';\r\nimport campaignJsData from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nimport * as dateFilterPreferences from '@bingads-webui-component-legacy/bingads-grid/service/date-filter-preferences';\r\n\r\nconst i18nHotelCenter = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/hotel-center');\r\nconst hotelCenterComponentI18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/hotel-center');\r\nconst hotelCenterSharedI18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/hotel-center-shared');\r\n\r\n\r\nconst HotelCenterAssignmentDeps = {\r\n '@bingads-webui/i18n-amd-loader!campaignui/feature/hotel-center': i18nHotelCenter,\r\n 'campaignui/feature/griddownload/view/adapter': viewAdapter,\r\n 'campaignui/feature/hotel-center-edm/index': hotelCenterEdm,\r\n 'campaignui/feature/hotel-center-js-data/index': hotelCenterJsData,\r\n 'component/bingads-grid/plugin/cross-page-select-all/index': crossPageSelectAll,\r\n 'component/bingads-grid/shared/column': sharedColumn,\r\n 'component/bingads-grid/shared/schema-util': schemaUtil,\r\n 'component/i18n/loader!campaignui/feature/hotel-center': hotelCenterComponentI18n,\r\n 'component/state/index': state,\r\n 'component/config/index': appConfig,\r\n 'component/bingads-grid/service/custom-userinfo-preferences': customUserInfoPreferences,\r\n 'component/js-data-campaign/index': campaignJsData,\r\n '@bingads-webui/i18n-amd-loader!campaignui/feature/hotel-center-shared': hotelCenterSharedI18n,\r\n 'PageContext': pageContext,\r\n 'component/bingads-grid/service/date-filter-preferences': dateFilterPreferences,\r\n};\r\n\r\n// Inject the dependencies\r\nexport const HotelCenterAssignment = hotelCenterAssignmentLoader(HotelCenterAssignmentDeps).then(_.property('HotelCenterAssignment'));\r\n","import AssociationContainer from '@bingads-webui-campaign-legacy/adextension-associations-container/view/index';\r\nimport CalloutAssociationEditor from '@bingads-webui-campaign-legacy/adextension-callout/view/associationsEditor';\r\nimport _ from 'underscore';\r\nimport HotelCenterBaseAdExtensionView from '@bingads-webui-campaign-legacy/hotel-center-ad-extensions/shared/view/hotel-center-base-adextension-view';\r\nimport { bingadsGridColumn } from '@bingads-webui-component-legacy/bingads-grid/shared/column';\r\nimport gridRowTemplate from '@bingads-webui-campaign-legacy/adextension-callout/template/gridRowTemplate.pug';\r\nimport { HotelCenterEntitySelectorService } from '@bingads-webui-campaign-legacy/hotel-center-ad-extensions/shared/service/hotel-center-entity-selector-service';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/adextensions');\r\nconst CalloutAdExtensionSchema = window.globalLegacySchema.get('CalloutAdExtension');\r\n\r\nexport class CalloutAdExtensionAssociationsView extends HotelCenterBaseAdExtensionView {\r\n initialize({\r\n associationType,\r\n typeString,\r\n perfMarker,\r\n isNewEntitySelector,\r\n i18nHotelCenter,\r\n }) {\r\n super.initialize({\r\n associationType,\r\n schema: CalloutAdExtensionSchema,\r\n isNewEntitySelector,\r\n instantiateEditor(associationOption) {\r\n const options = _.clone(associationOption);\r\n\r\n options.AssociationEditor = CalloutAssociationEditor;\r\n options.findScope = (association) => (scope) => {\r\n return (association.Type === 'SubAccount' && scope.campaignId === association.EntityId) ||\r\n (association.Type === 'HotelGroup' && scope.adGroupId === association.EntityId);\r\n };\r\n\r\n options.i18nKeys = {\r\n title: 'AdExtensions_Callout_Editor_Title',\r\n multiSelectSubtitle: [],\r\n AdgroupSelectorEntityTypeAdgroups: 'AdgroupSelector_EntityType_Hotelgroups',\r\n AdgroupSelectorEntityTypeCampaigns: 'AdgroupSelector_EntityType_Subaccounts',\r\n AdExtensionsMultiSelectSelectCampaigns: 'AdExtensions_MultiSelect_Select_Subaccounts',\r\n AdExtensionsMultiSelectSelectAdgroups: 'AdExtensions_MultiSelect_Select_Hotelgroups',\r\n };\r\n\r\n const editorOptions = {\r\n i18nKeys: {\r\n subtitle: [],\r\n ErrorGridEntityAdgroupColumn: 'ErrorGrid_Entity_HotelGroup_Column',\r\n ErrorGridEntityCampaignColumn: 'ErrorGrid_Entity_SubAccount_Column',\r\n // eslint-disable-next-line camelcase\r\n delete_confirm: 'AdExtensions_Callout_Delete_Warning_Hotel',\r\n // eslint-disable-next-line camelcase\r\n AdExtensions_Edit_Warning: 'AdExtensions_Edit_Warning_Hotel',\r\n },\r\n };\r\n\r\n // TODO: converting entity type back to Campaign UI entities to reuse\r\n // association container's and editor's code\r\n options.entityType = options.entityType === 'subaccount' ? 'campaign' : 'adgroup';\r\n options.entitySelectorService = new HotelCenterEntitySelectorService();\r\n options.maxSelectedItemsCount = 2;\r\n options.isNewEntitySelector = isNewEntitySelector;\r\n options.i18nHotelCenter = i18nHotelCenter;\r\n\r\n return new AssociationContainer(options, editorOptions);\r\n },\r\n columns: [bingadsGridColumn({\r\n name: 'AdExtension',\r\n property: (item) => {\r\n if (item.isAggregateRow) {\r\n return item.AdExtension;\r\n } else {\r\n return _.pick(item.AdExtension, 'Text');\r\n }\r\n },\r\n template: (local) => {\r\n if (_.isEmpty(local.value)) {\r\n return '';\r\n } else if (typeof local.value !== 'object') {\r\n return local.value;\r\n }\r\n return gridRowTemplate({\r\n data: {\r\n Text: local.value.Text,\r\n },\r\n });\r\n },\r\n type: 'string',\r\n sortable: false,\r\n title: i18n.get('ErrorGrid_AdExtension_Column'),\r\n helpId: 'Page_CampaignGrids_AdExtensions', // TODO: Update with Hotel Center help id\r\n bodyClasses: ['col-AdExtension'],\r\n })],\r\n typeString,\r\n overThresholdErrorMessage: i18n.get('AdExtensions_CalloutExtensions_OverThresholdMessage'),\r\n perfMarker,\r\n });\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport {\r\n HotelCenterIntelligence as hotelCenterIntelligenceLoader,\r\n} from '@bingads-webui-campaign/hotel-center-intelligence';\r\n\r\n// Import the dependencies to ensure they are loaded\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nimport * as hotelCenterEdm from '@bingads-webui-campaign-legacy/hotel-center-edm/index';\r\nimport hotelCenterJsData from '@bingads-webui-campaign-legacy/hotel-center-js-data/index';\r\nimport * as adapter from '@bingads-webui-campaign-legacy/griddownload/view/adapter';\r\nimport azureUpload from '@bingads-webui-component-legacy/azure-upload/index';\r\nimport * as sharedColumn from '@bingads-webui-component-legacy/bingads-grid/shared/column';\r\nimport * as toast from '@bingads-webui-component-legacy/toast/index';\r\nimport * as calloutExtensionAssociation from '@bingads-webui-campaign-legacy/hotel-center-ad-extensions/callout/callout-adextension-associations-view';\r\nimport state from '@bingads-webui-component-legacy/state/index';\r\nimport * as dateFilterPreferences from '@bingads-webui-component-legacy/bingads-grid/service/date-filter-preferences';\r\nimport * as segmentationPerferences from '@bingads-webui-component-legacy/bingads-grid/service/segmentation-preferences';\r\nimport * as servicePreference from '@bingads-webui-component-legacy/preference/service/index';\r\nimport * as customeridtype from '@bingads-webui-component-legacy/edm-campaign/customeridtype';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\n\r\n\r\nconst hotelCenterI18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/hotel-center');\r\nconst hotelCenterShared = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/hotel-center-shared');\r\n\r\nconst HotelCenterIntelligenceDeps = {\r\n 'PageContext': pageContext,\r\n '@bingads-webui/i18n-amd-loader!campaignui/feature/hotel-center': hotelCenterI18n,\r\n 'campaignui/feature/hotel-center-edm/index': hotelCenterEdm,\r\n 'campaignui/feature/hotel-center-js-data/index': hotelCenterJsData,\r\n 'campaignui/feature/griddownload/view/adapter': adapter,\r\n 'component/azure-upload/index': azureUpload,\r\n 'component/bingads-grid/shared/column': sharedColumn,\r\n 'component/toast/index': toast,\r\n 'campaignui/feature/hotel-center-ad-extensions/callout/callout-adextension-associations-view': calloutExtensionAssociation,\r\n '@bingads-webui/i18n-amd-loader!campaignui/feature/hotel-center-shared': hotelCenterShared,\r\n 'component/state/index': state,\r\n 'component/bingads-grid/service/date-filter-preferences': dateFilterPreferences,\r\n 'component/bingads-grid/service/segmentation-preferences': segmentationPerferences,\r\n 'component/preference/service/index': servicePreference,\r\n 'component/edm-campaign/customeridtype': customeridtype,\r\n 'component/config/index': config,\r\n};\r\n\r\n// Inject the dependencies\r\nexport const HotelCenterIntelligence = hotelCenterIntelligenceLoader(HotelCenterIntelligenceDeps).then(\r\n (hotelCenterIntelligence) => _.pick(hotelCenterIntelligence, 'FeedStatus', 'FeedUpload', 'MatchReport', 'ShareOfVoice', 'BookingReport', 'CalloutExtensionsView'));\r\n","import {\r\n HotelCenterOverview as hotelCenterOverviewLoader,\r\n} from '@bingads-webui-campaign/hotel-center-overview';\r\nimport { getHotelCenterShared } from '@bingads-webui-campaign/hotel-center-shared';\r\n\r\n// Import the dependencies to ensure they are loaded\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nimport * as detailMapper from '@bingads-webui-campaign-legacy/bulk-operation/edit-detail/detail-mapper';\r\nimport bulkEditJob from '@bingads-webui-campaign-legacy/bulk-operation/util/bulk-edit-job';\r\nimport * as downloadViewAdapter from '@bingads-webui-campaign-legacy/griddownload/view/adapter';\r\nimport * as hotelCenterEdm from '@bingads-webui-campaign-legacy/hotel-center-edm/index';\r\nimport hotelCenterJsData from '@bingads-webui-campaign-legacy/hotel-center-js-data/index';\r\nimport * as columnChooser from '@bingads-webui-component-legacy/bingads-grid/plugin/column-chooser';\r\nimport * as crossPageSelectAll from '@bingads-webui-component-legacy/bingads-grid/plugin/cross-page-select-all/index';\r\nimport * as newPerformanceLog from '@bingads-webui-component-legacy/bingads-grid/plugin/new-performance-log';\r\nimport * as sharedColumn from '@bingads-webui-component-legacy/bingads-grid/shared/column';\r\nimport * as schemaUtil from '@bingads-webui-component-legacy/bingads-grid/shared/schema-util';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport * as popupEditor from '@bingads-webui-component-legacy/grid-customized-popup-editor/index';\r\nimport decimal from '@bingads-webui-component-legacy/humanize/decimal';\r\nimport state from '@bingads-webui-component-legacy/state/index';\r\nimport * as toast from '@bingads-webui-component-legacy/toast/index';\r\nimport * as preferenceService from '@bingads-webui-component-legacy/preference/service/index';\r\nimport jsDataCampaign from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport * as dateFilterPreferences from '@bingads-webui-component-legacy/bingads-grid/service/date-filter-preferences';\r\nimport * as segmentationPreferences from '@bingads-webui-component-legacy/bingads-grid/service/segmentation-preferences';\r\nimport * as columnChooserPreferences from '@bingads-webui-component-legacy/bingads-grid/service/column-chooser-preferences';\r\n\r\n\r\nconst hotelCenterI18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/hotel-center');\r\nconst hotelCenterSchemaI18n = window.globalLegacyI18n.get('$/schema-i18n!hotel-center');\r\nconst hotelCenterSharedI18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/hotel-center-shared');\r\nconst hotelCenterUtils = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/hotel-center-utils');\r\n\r\nconst HotelCenterOverviewDeps = {\r\n '@bingads-webui/i18n-amd-loader!campaignui/feature/hotel-center': hotelCenterI18n,\r\n '@bingads-webui/i18n-amd-loader!campaignui/feature/hotel-center-shared': hotelCenterSharedI18n,\r\n 'PageContext': pageContext,\r\n 'campaignui/feature/bulk-operation/edit-detail/detail-mapper': detailMapper,\r\n 'campaignui/feature/bulk-operation/util/bulk-edit-job': bulkEditJob,\r\n 'campaignui/feature/griddownload/view/adapter': downloadViewAdapter,\r\n 'campaignui/feature/hotel-center-edm/index': hotelCenterEdm,\r\n 'campaignui/feature/hotel-center-js-data/index': hotelCenterJsData,\r\n 'component/bingads-grid/plugin/column-chooser': columnChooser,\r\n 'component/bingads-grid/plugin/cross-page-select-all/index': crossPageSelectAll,\r\n 'component/bingads-grid/plugin/new-performance-log': newPerformanceLog,\r\n 'component/bingads-grid/shared/column': sharedColumn,\r\n 'component/bingads-grid/shared/schema-util': schemaUtil,\r\n 'component/config/index': config,\r\n 'component/grid-customized-popup-editor/index': popupEditor,\r\n 'component/humanize/decimal': decimal,\r\n 'component/state/index': state,\r\n 'component/toast/index': toast,\r\n 'component/preference/service/index': preferenceService,\r\n '$/schema-i18n!hotel-center': hotelCenterSchemaI18n,\r\n 'component/js-data-campaign/index': jsDataCampaign,\r\n '@bingads-webui/i18n-amd-loader!campaignui/feature/hotel-center-utils': hotelCenterUtils,\r\n 'component/bingads-grid/service/date-filter-preferences': dateFilterPreferences,\r\n 'component/bingads-grid/service/segmentation-preferences': segmentationPreferences,\r\n 'component/bingads-grid/service/column-chooser-preferences': columnChooserPreferences,\r\n};\r\n\r\nexport const HotelCenterOverview = hotelCenterOverviewLoader(HotelCenterOverviewDeps);\r\nexport const { userCountryService } = getHotelCenterShared({ state, i18n: hotelCenterSharedI18n });\r\n","import _ from 'underscore';\r\nimport {\r\n SetupView as setupViewLoader,\r\n} from '@bingads-webui-campaign/hotel-center-setup';\r\n\r\n// Import the dependencies to ensure they are loaded\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport * as toast from '@bingads-webui-component-legacy/toast/index';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nimport state from '@bingads-webui-component-legacy/state/index';\r\nimport hotelCenterJsData from '@bingads-webui-campaign-legacy/hotel-center-js-data/index';\r\nimport * as hotelCenterEdm from '@bingads-webui-campaign-legacy/hotel-center-edm/index';\r\n\r\nconst hotelCenterSharedI18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/hotel-center-shared');\r\nconst hotelCenterSetupI18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/hotel-center-setup');\r\n\r\nconst SetupViewDeps = {\r\n '@bingads-webui/i18n-amd-loader!campaignui/feature/hotel-center-setup': hotelCenterSetupI18n,\r\n 'component/config/index': config,\r\n 'component/toast/index': toast,\r\n 'PageContext': pageContext,\r\n '@bingads-webui/i18n-amd-loader!campaignui/feature/hotel-center-shared': hotelCenterSharedI18n,\r\n 'component/state/index': state,\r\n 'campaignui/feature/hotel-center-js-data/index': hotelCenterJsData,\r\n 'campaignui/feature/hotel-center-edm/index': hotelCenterEdm,\r\n};\r\n\r\n\r\n// Inject the dependencies\r\nexport const HotelCenteSetup = setupViewLoader(SetupViewDeps).then(_.property('SetupView'));\r\n","// Import the dependencies to ensure they are loaded\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nimport state from '@bingads-webui-component-legacy/state/index';\r\nimport { getHotelCenterUtils } from '@bingads-webui-campaign/hotel-center-utils';\r\n\r\nconst i18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/hotel-center-utils');\r\n\r\n// Inject the dependencies\r\nexport const {\r\n bidUtils,\r\n bidMultiplierUtils,\r\n dateUtils,\r\n inlineDownloadUtils,\r\n} = getHotelCenterUtils({ pageContext, state, i18n });\r\n","import dateFilter from '@bingads-webui-static-legacy/app/state/hotelcenter-dateFilter';\r\nimport state from '@bingads-webui-component-legacy/state/index';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport _ from 'underscore';\r\nimport $ from 'jquery';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nimport Promise from 'bluebird';\r\nimport edm from '@bingads-webui-campaign-legacy/hotel-center-edm/index';\r\nimport jsdata from '@bingads-webui-campaign-legacy/hotel-center-js-data/index';\r\n\r\nconst getProvisionedUrl = (cid, aid) => `${config.get('odata.url')}Travel/V1/Customers(${cid})/Accounts(${aid})/Default.IsProvisioned`;\r\n\r\nexport const fetchDbProvisionStatus = () => new Promise((resolve, reject) => {\r\n const cid = state.get('advertisercustomer_id') || state.get('customer_id');\r\n const aid = state.get('account_id');\r\n const url = getProvisionedUrl(cid, aid);\r\n\r\n return $.ajax({\r\n url,\r\n type: 'GET',\r\n headers: {\r\n Authorization: `CCMTSmallToken ${pageContext.Token}`,\r\n },\r\n }).then((isHotelAdsDBPilotEnabled) => {\r\n resolve({ isHotelAdsDBPilotEnabled });\r\n }, reject);\r\n});\r\n\r\n\r\nexport const bootstrapDateFilter = () => dateFilter\r\n .getFilterPromise(['TravelShared', 'HotelCenterFeedStatusGrid', 'HotelCenterProcessedReconGrid'])\r\n .then((filterValues) => {\r\n _.each(filterValues, (filter) => {\r\n const name = filter.name;\r\n\r\n if (name.match('Shared$')) {\r\n state.set('$daterange', filter.value);\r\n } else {\r\n state.set('$daterange'.concat(name), filter.value);\r\n }\r\n });\r\n });\r\n\r\nexport const getTotalSubaccounts = () => {\r\n const options = {\r\n entitySet: edm.currentCustomer.SubAccounts,\r\n cacheResponse: false,\r\n };\r\n\r\n const query = {\r\n limit: 6,\r\n offset: 0,\r\n };\r\n\r\n return jsdata.SubAccount.findAll(query, options).then((subAccounts) => {\r\n return Promise.resolve(subAccounts);\r\n });\r\n};\r\n\r\n// add all the bootstrap for hotel center here\r\nexport const bootstrapHotelCenter = () => fetchDbProvisionStatus()\r\n .then((dbProvisionStatus) => {\r\n const { isHotelAdsDBPilotEnabled: dbProvisionResult } = dbProvisionStatus;\r\n let isHotelAdsDBPilotEnabled = dbProvisionResult;\r\n\r\n if (_.isObject(dbProvisionResult)) {\r\n isHotelAdsDBPilotEnabled = dbProvisionResult.value;\r\n }\r\n\r\n if (isHotelAdsDBPilotEnabled) {\r\n return bootstrapDateFilter()\r\n .then(() => getTotalSubaccounts())\r\n .then((subAccounts) => {\r\n const pageId = subAccounts.totalCount === 0 ? 'setup' : 'overview';\r\n\r\n return Promise.resolve({ isPageReady: true, pageId, subAccounts, isHotelAdsDBPilotEnabled });\r\n });\r\n }\r\n return Promise.resolve({ isHotelAdsDBPilotEnabled });\r\n });\r\n\r\n","import * as i18nErrors from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/import-campaigns');\r\n\r\nexport function getLocalizedMessage(errorCode) {\r\n return i18nErrors.getString(`ErrorNumber_${errorCode}`) || i18n.get('Import_FailedStatus');\r\n}\r\n","import $ from 'jquery';\r\nimport _ from 'underscore';\r\n\r\nimport summaryDataContextManager from '@bingads-webui-static-legacy/summary/SummaryDataContextManager';\r\nimport summaryGridsActionMap from '@bingads-webui-static-legacy/summary/SummaryGridsActionMap';\r\n\r\nimport odata from '@bingads-webui-component-legacy/http/channel/odata';\r\nimport * as i18nErrors from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\n\r\nimport instrumentationSetting from '@bingads-webui-static-legacy/instrumentation/campaignSchemaAndSetting';\r\nimport logger from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport constants from '@bingads-webui-static-legacy/instrumentation/constants';\r\nimport * as importErrorLocalizer from '@bingads-webui-campaign-legacy/import-campaigns/shared/import-error-code-helper';\r\nimport * as safeJson from '@bingads-webui/safe-json';\r\n\r\nimport ImportFailureDetailsTableView from '@bingads-webui-campaign-legacy/import-campaigns/view/import-failure-details-table';\r\nimport errorHelper from '@bingads-webui-campaign-legacy/scheduled-import/view/import-task-engine-error-helper';\r\n\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport * as cookie from '@bingads-webui/cookie';\r\nimport { queryify } from '@bingads-webui/url-util';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/import-campaigns');\r\n\r\n///////////////////////////////////////////////////////////////////////////////\r\n\r\nconst getGoogleCampaignsUrlTmpl =\r\n '/ImportSession/GoogleCampaigns(CustomerId=:customer_id,AccountId=:account_id,SessionId={{SessionId}})';\r\nconst getGoogleAccountsUrlTmpl =\r\n '/ImportSession/GoogleAccounts(CustomerId=:customer_id,AccountId=:account_id,SessionId={{SessionId}})';\r\nconst getImportPreviewUrlTmpl =\r\n '/ImportSession/ImportPreview(CustomerId=:customer_id,AccountId=:account_id)';\r\nconst getImportSummaryUrlTmpl =\r\n '/ImportSession/ImportSubmittedCounts(CustomerId=:customer_id,AccountId=:account_id)';\r\n\r\nfunction getGoogleCampaigns(sessionId, googleCustomerId) {\r\n let url = _.template(getGoogleCampaignsUrlTmpl)({ SessionId: sessionId });\r\n\r\n url = queryify(url, {\r\n googleCustomerId,\r\n });\r\n return odata.get(url)\r\n .then((data) => {\r\n return _.filter(data, (campaign) => {\r\n return campaign.Status !== 'Draft' && campaign.Status !== 'Delete';\r\n });\r\n });\r\n}\r\n\r\nfunction getGoogleAccounts(sessionId) {\r\n let url = _.template(getGoogleAccountsUrlTmpl)({ SessionId: sessionId });\r\n let result = { Accounts: null, Campaigns: null };\r\n\r\n return odata.get(url)\r\n .then((accounts) => {\r\n result.Accounts = accounts;\r\n\r\n if (accounts && accounts.length === 1) {\r\n return getGoogleCampaigns(sessionId, accounts[0].CustomerId);\r\n } else {\r\n return null;\r\n }\r\n })\r\n .then((campaigns) => {\r\n result.Campaigns = campaigns;\r\n return result;\r\n });\r\n}\r\n\r\nfunction scrollToTop(view) {\r\n if (view) {\r\n let body = $('body')[0];\r\n\r\n if (body) {\r\n let isScrollbar = body.scrollHeight > body.clientHeight;\r\n\r\n if (isScrollbar) {\r\n $(window).scrollTop(view.offset().top);\r\n }\r\n }\r\n }\r\n}\r\n\r\nfunction goBack(data) {\r\n if (!data) {\r\n const url = $('#referrer').val();\r\n\r\n if (url && url.length > 0) {\r\n $.advertiser.redirect(url);\r\n } else {\r\n // Fallback for IE8, as it does not set the referrer property\r\n window.history.back();\r\n }\r\n }\r\n}\r\n\r\nfunction removeView(view) {\r\n if (view) {\r\n view.remove();\r\n view = null; //eslint-disable-line no-param-reassign\r\n }\r\n}\r\n\r\nfunction showODataError() {\r\n $.advertiser.showJsonErrors({\r\n 'Message': importErrorLocalizer.getLocalizedMessage(-1),\r\n });\r\n}\r\n\r\nfunction getCustomerId() {\r\n return $.advertiser.getUrlParameter('cid');\r\n}\r\n\r\nfunction logException(err) {\r\n let msg;\r\n\r\n if (err.message) {\r\n msg += err.message;\r\n }\r\n if (err.stack) {\r\n let st = `StackTrace: ${err.stack}`;\r\n\r\n if (msg) {\r\n msg += `\\t${st}`;\r\n } else {\r\n msg = st;\r\n }\r\n\r\n console.error(msg); // eslint-disable-line\r\n }\r\n\r\n msg = msg || JSON.stringify(err); // for response of XMLHttpRequest, \"{\"readyState\":0,\"responseText\":\"\",\"status\":0,\"statusText\":\"error\",\"headers\":{}}\"\r\n\r\n logger.logError('/campaign/importcampaign', msg);\r\n}\r\n\r\nfunction startPollingUntilImportStarted(taskItemExecutionId, completeCallBack = _.noop, showLoadingIcon = true, isMultiAccount = false) {\r\n const MAX_FAILED_ATTEMPTS = 5;\r\n let failedTimes = 0;\r\n let wrappedCompleteCallBack = completeCallBack;\r\n\r\n if (showLoadingIcon) {\r\n wrappedCompleteCallBack = _.wrap(completeCallBack, (func) => {\r\n func();\r\n $.advertiser.hideLoadingPanel();\r\n });\r\n }\r\n\r\n function checkStatus() {\r\n const url = `/Customers()/${isMultiAccount ? '' : 'Accounts()/'}TaskItemExecutions(${taskItemExecutionId})`;\r\n\r\n odata.get(url)\r\n .then((data) => {\r\n if (data.Status === 'PendingExecution') {\r\n setTimeout(checkStatus, 2000);\r\n } else {\r\n wrappedCompleteCallBack();\r\n }\r\n })\r\n .catch((err) => {\r\n failedTimes++;\r\n logException(err);\r\n logger.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, '/campaign/importcampaign',\r\n `StartPollingUntilImportStarted: polling, failedTimes: ${failedTimes}`);\r\n if (failedTimes === MAX_FAILED_ATTEMPTS) {\r\n wrappedCompleteCallBack();\r\n } else {\r\n setTimeout(checkStatus, 2000);\r\n }\r\n });\r\n }\r\n\r\n logger.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, '/campaign/importcampaign',\r\n 'StartPollingUntilImportStarted: start polling');\r\n if (showLoadingIcon) {\r\n $.advertiser.showLoadingPanel();\r\n }\r\n setTimeout(checkStatus, 2000);\r\n}\r\n\r\nconst editImportCookieName = 'EditImport';\r\nconst currentUserName = _.propertyOf(config.get('CurrentUser'))('Name');\r\n\r\nlet cookieHelperForEditImport = {\r\n createCookie(taskItemId, sessionId) {\r\n if (taskItemId && sessionId) {\r\n const cookieValue = {\r\n [currentUserName]: {\r\n [taskItemId]: sessionId,\r\n },\r\n };\r\n let expire = new Date();\r\n\r\n expire.setTime(expire.getTime() + (2 * 60 * 1000)); // 2 mins\r\n\r\n cookie.set(editImportCookieName, JSON.stringify(cookieValue), expire, '/');\r\n } else {\r\n logger.logError('/campaign/importcampaign', `unexpected value. taskItemId: ${taskItemId}, sessionId: ${sessionId}`);\r\n }\r\n },\r\n\r\n deleteCookie() {\r\n cookie.set(editImportCookieName, '', new Date(), '/');\r\n },\r\n\r\n getSessionId(taskItemId) {\r\n let editImportCookie = cookie.get(editImportCookieName);\r\n\r\n if (editImportCookie) {\r\n editImportCookie = safeJson.parseSync(editImportCookie);\r\n if (editImportCookie && editImportCookie[currentUserName]) {\r\n return _.propertyOf(editImportCookie[currentUserName])(taskItemId);\r\n } else {\r\n logger.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO,\r\n '/campaign/importcampaign', `EditImport cookie doesn't have info for ${currentUserName}`);\r\n }\r\n } else {\r\n logger.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO,\r\n '/campaign/importcampaign', 'Failed to fetch cookie EditImport');\r\n }\r\n\r\n return null;\r\n },\r\n};\r\n\r\n///////////////////////////////////////////////////////////////////////////////\r\n\r\n/* @this ImportState */\r\nfunction getSummaryCounts(successCallback) {\r\n logger.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, '/campaign/importcampaign',\r\n `Start to get import summary counts for importId: ${this.importId}`);\r\n\r\n if (this.useOdata) {\r\n const url = queryify(getImportSummaryUrlTmpl, { importId: this.importId });\r\n\r\n odata.get(url)\r\n .then((counts) => {\r\n if (_.isFunction(successCallback)) {\r\n successCallback({\r\n Counts: counts,\r\n });\r\n }\r\n })\r\n .catch(() => {\r\n window.App.views.alertCenter.showError(i18nErrors.getString('ErrorNumber_-1'));\r\n $.advertiser.hideLoadingPanel(); // hide the loading panel shown in polling\r\n });\r\n } else {\r\n const urls = this.options.urls;\r\n\r\n $.advertiser.ajaxPost({\r\n url: urls.getSummaryUrl,\r\n ignoreBeforeAjax: true,\r\n hideLoadingPanelOnSuccess: false,\r\n data: {\r\n importId: this.importId,\r\n rurl: urls.rurl,\r\n },\r\n traditional: true,\r\n onSuccess: successCallback,\r\n });\r\n }\r\n}\r\n\r\nclass ImportState {\r\n constructor(options) {\r\n this.options = options || {};\r\n this.currentAccountId = config.get('CurrentAccount').Id;\r\n this.currentUserId = config.get('CurrentUser').Id;\r\n this.customerId = getCustomerId();\r\n this.isUpdatedImportUIForSignUpEnabled = config.get('Permissions') && config.get('Permissions').IsUpdatedImportUIForSignUpEnabled;\r\n this.useOdata = false; // stop the work of migrating to Odata. This part is included in SPA work.\r\n }\r\n\r\n cancelImport(successCallback) {\r\n let callBack = _.isFunction(successCallback) ? successCallback : _.noop;\r\n\r\n if (this.importId && this.importId > 0) {\r\n logger.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, '/campaign/importcampaign',\r\n `Cancel the import id:${this.importId}, aid:${this.currentAccountId}, cid:${this.customerId}`);\r\n\r\n return $.advertiser.ajaxPost({\r\n data: {\r\n importId: this.importId,\r\n },\r\n url: '/Campaign/ImportCampaign/CancelCurrentImport',\r\n onSuccess: callBack,\r\n });\r\n } else {\r\n callBack();\r\n }\r\n\r\n return true;\r\n }\r\n\r\n pollStatus(successCallback, importFailCallback, scheduledImportOptions) {\r\n let timeOut;\r\n let failedAttempts = 0;\r\n let MAX_FAILED_ATTEMPTS = 5;\r\n let lastCallCompleted = true;\r\n let taskItemExecutionId = scheduledImportOptions && scheduledImportOptions.Id;\r\n\r\n const scheduleForm = this.scheduleForm;\r\n const importOptions = this.importOptions;\r\n\r\n let _activeView = this._activeView;\r\n let importId = this.importId;\r\n const { isFileImport, statuses, unblockTitle, unblockText, unblockLink, urls } = this.options;\r\n const aid = this.currentAccountId;\r\n const cid = this.customerId;\r\n const uid = this.currentUserId;\r\n\r\n function createStatusInfo(currentStatus) {\r\n if (currentStatus) {\r\n let statusList = {\r\n status: statuses,\r\n currentStatusOrder: currentStatus.Order,\r\n };\r\n let container = $('
');\r\n\r\n $('#importStatusSteps').tmpl(statusList).appendTo(container);\r\n return container.html();\r\n }\r\n\r\n return '';\r\n }\r\n\r\n function getUnblockText(currentStatus) {\r\n const statusInfo = createStatusInfo(currentStatus);\r\n\r\n return `${unblockTitle}
${unblockText}

${unblockLink}${statusInfo}`;\r\n }\r\n\r\n function onUnblockSuccess(data) {\r\n if (data && data.RedirectUrl) {\r\n $.advertiser.redirect(data.RedirectUrl);\r\n }\r\n }\r\n\r\n function attachUnblockHandler() {\r\n $('#unblockImportLink').click(() => {\r\n // Stop polling for status\r\n clearInterval(timeOut);\r\n $.advertiser.ajaxPost({\r\n url: urls.unblockUrl,\r\n data: {\r\n importId,\r\n isFileImport,\r\n },\r\n traditional: true,\r\n onSuccess: onUnblockSuccess,\r\n });\r\n });\r\n\r\n $('#historyLink').click(() => {\r\n // Stop polling for status\r\n clearInterval(timeOut);\r\n $.advertiser.ajaxPost({\r\n url: urls.unblockUrl,\r\n data: {\r\n importId,\r\n isFileImport,\r\n },\r\n traditional: true,\r\n onSuccess: () => {\r\n window.location.href = `/Campaign/Campaigns?cid=${cid}&uid=${uid}&aid=${aid}#customer/${cid}/account/${aid}/importschedule`;\r\n },\r\n });\r\n });\r\n }\r\n\r\n function unattachUnblockHandler() {\r\n $('#unblockImportLink').unbind('click');\r\n $('#historyLink').unbind('click');\r\n }\r\n\r\n function shouldStopPolling(data) {\r\n //Do not continue to import summary when we get ImportStatus === ValidationCompleted (used for file import) for run now import via task engine\r\n //All other statuses are valid ends for a run now import, so continue to import summary/import fail.\r\n //Bug fix for 1449835: ImportStatus may return something incorrect when TaskItemExecutionStatus = PendingExecution. Do not halt polling in that scenario.\r\n let importComplete = data.Status === 'Complete' || data.Status === 'Failed' ||\r\n data.Status === 'Cancelled' || data.TaskItemExecutionStatus === 'Failed' || !!data.ErrorCode;\r\n\r\n if (isFileImport) {\r\n importComplete = importComplete || data.Status === 'ValidationCompleted';\r\n }\r\n return data.TaskItemExecutionStatus !== 'PendingExecution' && importComplete;\r\n }\r\n\r\n /* @this ImportState */\r\n function onStatusCheckSuccess(data) {\r\n if (data && !data.Errors) {\r\n if (!importId) {\r\n this.importId = importId = data.ImportId;\r\n }\r\n // Reset the counter for the failed attempts\r\n failedAttempts = 0;\r\n if (data.Status) {\r\n // Update the loading indicator with the current import status\r\n let status = statuses[data.Status];\r\n\r\n if (status && status.Text.length > 0) {\r\n $.advertiser.loadingPanel.updateText(getUnblockText(status));\r\n attachUnblockHandler();\r\n }\r\n\r\n if (shouldStopPolling(data)) {\r\n clearInterval(timeOut);\r\n unattachUnblockHandler();\r\n logger.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, '/campaign/importcampaign',\r\n `onStatusCheckSuccess: polling finished, import status: ${data.Status}, \\\r\ntask status: ${data.TaskItemExecutionStatus}, error code: ${data.ErrorCode}, import id: ${importId}`);\r\n if (data.Status === 'Failed' || data.TaskItemExecutionStatus === 'Failed' || !!data.ErrorCode) {\r\n // Add logging for failed import status #1224009\r\n let prefix = 'ImportCampaignFailed';\r\n\r\n if (isFileImport) {\r\n prefix = `${prefix} file import`;\r\n } else {\r\n prefix = `${prefix} Google import`;\r\n }\r\n\r\n logger.logMessage([constants.LOGCATEGORY.ERROR],\r\n constants.LOGLEVEL.INFO,\r\n '/campaign/importcampaign',\r\n `${prefix}, ImportId : ${data.ImportId}`);\r\n\r\n // For scheduled import run now, we need to set the data's message in order for the import fail callback\r\n // to trigger unblocking the screen and the error message toast.\r\n data.Message = importErrorLocalizer.getLocalizedMessage(data.ErrorCode || data.FailureReason);\r\n if (_.isFunction(importFailCallback)) {\r\n importFailCallback(data);\r\n } else {\r\n this.onImportFail(data);\r\n }\r\n } else if (data.Status === 'Cancelled') {\r\n // This code path should not be hit ideally but adding safety net, otherwise UI keeps on polling for status indefinitly\r\n goBack();\r\n } else if ($.isFunction(successCallback)) {\r\n if (!isFileImport && data && data.ImportId) {\r\n getSummaryCounts.call(this, successCallback);\r\n } else {\r\n successCallback(data);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n function onStatusCheckFailure(data) {\r\n failedAttempts++;\r\n // Stop polling if there are five successive failures\r\n if (failedAttempts === MAX_FAILED_ATTEMPTS) {\r\n clearInterval(timeOut);\r\n $.advertiser.hideLoadingPanel();\r\n $.advertiser.showJsonErrors((data && data.Errors) || importErrorLocalizer.getLocalizedMessage(-1));\r\n\r\n let viewName = _activeView && _activeView.name();\r\n\r\n logger.logError('/campaign/importcampaign', `polling failed with Json errors, current view name: ${viewName}`);\r\n if (viewName === 'OptionsView') {\r\n importOptions.setDisable(true);\r\n } else if (viewName === 'SchedulingView') {\r\n scheduleForm.setErrorView();\r\n }\r\n }\r\n }\r\n\r\n function onStatusCheckComplete() {\r\n lastCallCompleted = true;\r\n }\r\n\r\n\r\n /* @this ImportState */\r\n function checkStatus() {\r\n if (lastCallCompleted) {\r\n lastCallCompleted = false;\r\n\r\n if (taskItemExecutionId) {\r\n const url = `/Customers()/Accounts()/TaskItemExecutions(${taskItemExecutionId})`;\r\n\r\n odata.get(url)\r\n .then((rawData = {}) => {\r\n if (!importId || importId === 0) {\r\n this.importId = importId = rawData.ImportId;\r\n }\r\n let obj = {\r\n Status: rawData.ImportStatus,\r\n ImportType: rawData.Type,\r\n ImportId: rawData.ImportId,\r\n TaskItemExecutionStatus: rawData.Status,\r\n ErrorCode: rawData.ErrorCode,\r\n ErrorDetail: rawData.ErrorDetail,\r\n };\r\n\r\n onStatusCheckSuccess.call(this, obj);\r\n }).catch((err) => {\r\n logException(err);\r\n onStatusCheckFailure();\r\n }).finally(() => {\r\n onStatusCheckComplete();\r\n });\r\n } else {\r\n const url = $.advertiser.setUrlParameter('importId', importId, urls.getStatusUrl);\r\n\r\n $.advertiser.ajaxGet({\r\n url,\r\n traditional: true,\r\n ignoreBeforeAjax: true,\r\n hideLoadingPanelOnSuccess: false,\r\n onSuccess: onStatusCheckSuccess.bind(this),\r\n onJsonError: onStatusCheckFailure,\r\n onAjaxComplete: onStatusCheckComplete,\r\n });\r\n }\r\n }\r\n }\r\n\r\n logger.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, '/campaign/importcampaign', 'start polling');\r\n $.advertiser.showLoadingPanel();\r\n timeOut = setInterval(checkStatus.bind(this), 1000);\r\n }\r\n\r\n //This is temporarily not being used as we discovered a bug with polling import status in continue import scenarios\r\n //this way.\r\n fetchTaskItemExecutionIdAndPollStatus(successCallback) {\r\n let url = '/Customers()/Accounts()/TaskItemExecutions?%24top=1&%24count=true&%24expand=TaskItem&%24filter=TaskItem%2FType+eq+Enum.TaskItemType%27Import%27';\r\n\r\n odata.get(url).bind(this)\r\n .then((response) => {\r\n if (response && _.first(response.value) && _.first(response.value).Id) {\r\n this.pollStatus(successCallback, '', {\r\n Id: _.first(response.value).Id,\r\n });\r\n } else {\r\n showODataError();\r\n }\r\n }).catch((err) => {\r\n logException(err);\r\n showODataError();\r\n });\r\n }\r\n\r\n createImportTaskItem(data, successCallback, signupMode = false) {\r\n let url = '/Customers()/Accounts()/TaskItems?%24expand=TaskItemExecutions';\r\n\r\n $.advertiser.showLoadingPanel();\r\n odata.post(url, { data }).bind(this)\r\n .then((response) => {\r\n if (signupMode && this.isUpdatedImportUIForSignUpEnabled) {\r\n if (_.isFunction(successCallback)) {\r\n successCallback(data);\r\n }\r\n } else {\r\n this.pollStatus(successCallback, '', {\r\n Id: response.TaskItemExecutions[0].Id,\r\n });\r\n }\r\n }).catch((err) => {\r\n logger.endActivity(instrumentationSetting.ACTIVITYNAME.ExecuteImportPreviewTaskItem);\r\n logger.endActivity(instrumentationSetting.ACTIVITYNAME.ExecuteImportTaskItem);\r\n logException(err);\r\n $.advertiser.hideLoadingPanel();\r\n showODataError();\r\n });\r\n }\r\n\r\n expandView(importView) {\r\n this._activeView = importView;\r\n importView.expandView();\r\n }\r\n\r\n openActiveView() {\r\n if (!this._activeView) {\r\n return false;\r\n }\r\n\r\n let viewName = this._activeView.name();\r\n\r\n switch (viewName) {\r\n case 'AccountView':\r\n this.googleLogin.collapseView();\r\n break;\r\n case 'CampaignView':\r\n this.selectAccount.collapseView(true);\r\n break;\r\n case 'OptionsView':\r\n if (this.options.isFileImport) {\r\n this.fileUpload.collapseView();\r\n this.columnMatching.collapseView(true);\r\n } else {\r\n this.selectAccount.collapseView(true);\r\n this.selectCampaign.collapseView(true);\r\n }\r\n break;\r\n case 'ImportPreviewView':\r\n this.fileUpload.collapseView();\r\n this.columnMatching.collapseView(true);\r\n this.importOptions.collapseView(true);\r\n break;\r\n case 'ColumnMatchingView':\r\n this.fileUpload.collapseView();\r\n break;\r\n case 'SchedulingView':\r\n this.selectAccount.collapseView(true);\r\n this.selectCampaign.collapseView(true);\r\n this.importOptions.collapseView(true);\r\n break;\r\n default: break;\r\n }\r\n this.expandView(this._activeView);\r\n return true;\r\n }\r\n\r\n showErrorInGoogleLogin(msg) {\r\n if (msg) {\r\n $.advertiser.campaignImport.logoutGoogle();\r\n\r\n this.googleLogin.expandView();\r\n this.selectAccount.collapseView();\r\n this.selectCampaign.collapseView();\r\n this.importOptions.collapseView();\r\n if (this.scheduleForm) {\r\n this.scheduleForm.collapseView();\r\n }\r\n this.googleLogin.showAuthError(msg);\r\n } else {\r\n window.App.views.alertCenter.showError(i18nErrors.getString('ErrorNumber_-1'));\r\n }\r\n }\r\n\r\n onAuthError(errorCode) {\r\n logger.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, '/campaign/importcampaign',\r\n `Receive an auth error: ${errorCode}`);\r\n const msg = errorHelper.getErrorDetailsMessage(errorCode);\r\n\r\n this.showErrorInGoogleLogin(msg);\r\n }\r\n\r\n onGoogleOdataError(err) {\r\n let code;\r\n let msg;\r\n const googleLoginAccount = this.googleLogin.getSummaryInfo().LoginInfo;\r\n\r\n if (err.body) {\r\n code = _.propertyOf(err.body[0])('Code');\r\n }\r\n\r\n switch (code) {\r\n case 'GoogleSyncNotAdWordsUser':\r\n msg = i18n.get('CampaignImport_GSyncNotAdsUser').replace('{0}', googleLoginAccount);\r\n break;\r\n case 'GoogleSyncInvalidCustomerId':\r\n msg = i18n.get('CampaignImport_GSyncInvalidCustomerId');\r\n break;\r\n case 'GoogleSyncOAuthTokenRevoked':\r\n msg = i18n.get('CampaignImport_GSyncOAuthTokenRevoked');\r\n break;\r\n case 'GoogleSyncWebExceptionTimeout':\r\n msg = i18n.get('CampaignImport_GSyncOperationTimeout');\r\n break;\r\n case code === 'GoogleSyncAccountNotSetUp':\r\n msg = i18n.get('CampaignImport_GSyncAccountNotSetUp').replace('{0}', googleLoginAccount);\r\n break;\r\n case 'GoogleSyncUserIsNotAuthorized':\r\n msg = i18n.get('CampaignImport_GSyncAuthorizationError');\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n this.showErrorInGoogleLogin(msg);\r\n }\r\n\r\n onImportFail(data) {\r\n if (!this._activeView) {\r\n if (this.options.isFileImport && this.importOptions) {\r\n this.expandView(this.importOptions);\r\n } else if (this.scheduleForm) {\r\n this.expandView(this.scheduleForm);\r\n }\r\n }\r\n const viewName = this._activeView && this._activeView.name();\r\n\r\n $('.grid-edit-icon').hide(); //hide edit icons.\r\n\r\n if (viewName === 'OptionsView') {\r\n this.importOptions.setDisable(true);\r\n }\r\n\r\n if (data && data.Message) {\r\n let errorCode = data.FailureReason || data.ErrorCode;\r\n let failureDetailsIncludeErrorCode = data.FailureDetails && safeJson.parseSync(data.FailureDetails);\r\n let errorDetail;\r\n\r\n if (failureDetailsIncludeErrorCode) {\r\n errorDetail = failureDetailsIncludeErrorCode.ErrorCode === errorCode ? failureDetailsIncludeErrorCode.ErrorDetail : '';\r\n } else {\r\n errorDetail = data.ErrorDetail;\r\n }\r\n\r\n if (errorCode === 17015) {\r\n let errorView = new ImportFailureDetailsTableView({\r\n message: data.Message,\r\n data: errorDetail,\r\n failureReason: errorCode,\r\n }).render();\r\n\r\n if (viewName === 'OptionsView') {\r\n // if it is options view, importCampaign.js will handle the render/remove of the error view.\r\n this.importFailureDetailsTableView = errorView;\r\n\r\n $('#ImportOptions .error-panel').html(this.importFailureDetailsTableView.el);\r\n $('#ImportOptionsSection #Cancel').focus();\r\n } else if (viewName === 'SchedulingView') {\r\n // scheduling view will handle the render/remove of the error view\r\n this.scheduleForm.setErrorView(errorView);\r\n $('#ScheduleFormView .btn-cancel').focus();\r\n } else {\r\n $.advertiser.showJsonErrors(data);\r\n }\r\n } else if (errorHelper.isGoogleAuthError(data.ErrorCode)) {\r\n this.onAuthError(data.ErrorCode);\r\n } else {\r\n $.advertiser.showJsonErrors(data);\r\n }\r\n\r\n $.advertiser.hideLoadingPanel();\r\n $.advertiser.loadingPanel.updateText($('#loadingText').val());\r\n }\r\n }\r\n\r\n showImportSummary() {\r\n /* @this ImportState */\r\n function onSuccess(data) {\r\n if (!data.Errors || this.useOdata) {\r\n if (this.options.isFileImport) {\r\n data.FileUpload = this.fileUpload.getSummaryInfo();\r\n data.ColumnMatching = this.columnMatching.getSummaryInfo();\r\n } else {\r\n data.Login = this.googleLogin.getSummaryInfo();\r\n data.Account = this.selectAccount.getSummaryInfo();\r\n data.Campaign = this.selectCampaign.getSummaryInfo();\r\n }\r\n\r\n data.ImportOptions = this.importOptions.getSummaryInfo();\r\n this.importSummary.bindData(data);\r\n $('#ImportEditViews').hide();\r\n this.expandView(this.importSummary);\r\n $.advertiser.hideLoadingPanel();\r\n }\r\n }\r\n\r\n if (this.options.uxMode === 'signup' && this.isUpdatedImportUIForSignUpEnabled) {\r\n $.advertiser.signup.selectAccountSuccess();\r\n $('#ImportSummarySection').show();\r\n $('#LoginDisclaimer').hide();\r\n $('#EditLoginSummary').hide();\r\n $.advertiser.hideLoadingPanel();\r\n this.selectCampaign.collapseView(true);\r\n this.importSummary.enableAddPayment({\r\n url: this.options.urls.rurl,\r\n customerId: this.customerId,\r\n accountId: this.currentAccountId,\r\n });\r\n\r\n logger.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, '/campaign/importcampaign',\r\n 'Sign up user in new sign up UI pilot has reached import summary message');\r\n } else {\r\n getSummaryCounts.call(this, onSuccess.bind(this));\r\n }\r\n }\r\n\r\n onImportOptionsSuccess(data) {\r\n /* @this ImportState */\r\n function onImportPreviewSuccess(result) {\r\n if ((result && !result.Errors) || this.useOdata) {\r\n this.importPreview.bindData(result);\r\n this.importOptions.collapseView(true);\r\n this.expandView(this.importPreview);\r\n } else {\r\n $.advertiser.ajaxError();\r\n }\r\n }\r\n\r\n const isFileImport = this.options.isFileImport;\r\n\r\n // Status in data has two options: ValidationComplete and Complete. Complete, we don't show preview.\r\n if (this.isContinueImport && data && data.Status === 'Complete') {\r\n logger.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, '/campaign/importcampaign',\r\n 'Import is Complete in continue import. Start to show import summary.');\r\n this.showImportSummary();\r\n if (!isFileImport && this.options.uxMode !== 'signup') {\r\n $('#NewImportSummarySection').hide();\r\n $('#ImportSummarySection').show();\r\n }\r\n return;\r\n }\r\n\r\n if (isFileImport) {\r\n if (this.useOdata) {\r\n const url = queryify(getImportPreviewUrlTmpl, { importId: this.importId });\r\n\r\n odata.get(url) // no need ui blocker as polling already has.\r\n .then((result) => {\r\n onImportPreviewSuccess.call(this, { Data: result });\r\n })\r\n .catch(() => {\r\n window.App.views.alertCenter.showError(i18nErrors.getString('ErrorNumber_-1'));\r\n $.advertiser.hideLoadingPanel();\r\n });\r\n } else {\r\n $.advertiser.ajaxPost({\r\n url: this.options.urls.getImportPreviewUrl,\r\n data: {\r\n importId: this.importId,\r\n },\r\n traditional: true,\r\n ignoreBeforeAjax: true,\r\n hideLoadingPanelOnSuccess: false,\r\n onSuccess: onImportPreviewSuccess.bind(this),\r\n });\r\n }\r\n } else {\r\n logger.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, '/campaign/importcampaign',\r\n 'Start to show import summary for google import.');\r\n this.showImportSummary();\r\n }\r\n }\r\n}\r\n\r\nfunction createStateInstance(options) {\r\n return new ImportState(options);\r\n}\r\n\r\nfunction invalidateGridCacheAfterCompleteImport() {\r\n // Need to invalidate cache after an import is completed.\r\n // We don't make a specific request or navigate to a new page when that happens\r\n // so do it manually here. Otherwise, the Campaign grid may not fetch\r\n // newly imported entities\r\n let contextsToUpdate = summaryGridsActionMap.getActionMapping('completeimport');\r\n\r\n if (contextsToUpdate && contextsToUpdate.dependentIds) {\r\n summaryDataContextManager.updateContext(contextsToUpdate.dependentIds);\r\n } else {\r\n throw new Error('Could not find completeimport action mapping');\r\n }\r\n}\r\n\r\nexport {\r\n getGoogleCampaigns,\r\n getGoogleAccounts,\r\n createStateInstance,\r\n scrollToTop,\r\n goBack,\r\n removeView,\r\n showODataError,\r\n getCustomerId,\r\n logException,\r\n startPollingUntilImportStarted,\r\n invalidateGridCacheAfterCompleteImport,\r\n cookieHelperForEditImport,\r\n};\r\n","/* eslint-disable */\r\nimport _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport UploadService from '@bingads-webui-component-legacy/azure-upload/index';\r\nimport logger from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport setting from '@bingads-webui-static-legacy/instrumentation/campaignSchemaAndSetting';\r\nimport constants from '@bingads-webui-static-legacy/instrumentation/constants';\r\nimport instrumentation from '@bingads-webui-static-legacy/instrumentation/instrumentation';\r\nimport * as safeJSON from '@bingads-webui/safe-json';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nvar i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/import-campaigns');\r\nvar upload = (function (options) {\r\n options = options || ({});\r\n if (!options.file) {\r\n logger.logError('import-campaigns/azureUploader', 'Unexpected error: options.file is not set!');\r\n return Promise.reject();\r\n }\r\n var file = options.file;\r\n if (file.size === 0) {\r\n return Promise.reject({\r\n 'localizedError': i18n.get('FileImport_Upload_InvalidFile')\r\n });\r\n }\r\n logger.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'import-campaigns/azureUploader', 'Start file import using new approach, file name: ' + file.name + ', size: ' + file.size + 'bytes, type: ' + file.type);\r\n var allowedExtensions = ['.csv', '.tsv', '.xlsx', '.zip'];\r\n var uploadService = new UploadService({\r\n file: options.file,\r\n validateFunc: function (ext) {\r\n logger.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'import-campaigns/azureUploader', 'File extension is ' + ext);\r\n return ext && _.contains(allowedExtensions, ext);\r\n }\r\n });\r\n return uploadService.start().then(function (data) {\r\n var urlWithoutSas = data && data.slice(0, data.indexOf('?'));\r\n var message = 'Uploaded successfully. File name: ' + options.file.name + ', size: ' + options.file.size + 'bytes, blobUrl: ' + urlWithoutSas;\r\n logger.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'import-campaigns/azureUploader', message);\r\n return Promise.resolve(data);\r\n }).catch(function (err) {\r\n err = err || ({});\r\n if (err.ValidatationFailed) {\r\n logger.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'import-campaigns/azureUploader', 'The file extension is not supported.');\r\n return Promise.reject({\r\n 'localizedError': i18n.get('FileImport_Upload_InvalidFileExtension')\r\n });\r\n } else {\r\n var message;\r\n if (err.stack) {\r\n message = 'Message: ' + err.message + '.\\t Stack: ' + err.stack;\r\n } else {\r\n message = 'Error: ' + safeJSON.stringifySync(err);\r\n }\r\n logger.logError('import-campaigns/azureUploader', message);\r\n if (err.customizedCategory === 'NotSupported') {\r\n err = {\r\n 'localizedError': i18n.get('FileImport_Upload_UnSupportedBrowser')\r\n };\r\n } else if (err.customizedCategory === 'ReadUploadFailed') {\r\n err = {\r\n 'localizedError': i18n.get('FileImport_Upload_FailedMessage')\r\n };\r\n }\r\n return Promise.reject(err);\r\n }\r\n }).finally(function () {\r\n logger.endActivity();\r\n });\r\n}).asLoggingStart(setting.ACTIVITYNAME.ImportCampaignsClickToUploadFile, setting.SCENARIONAME.ImportCampaignsFileUpload);\r\nexport default {\r\n upload: upload\r\n};\r\n\r\n","import _ from 'underscore';\r\nimport { FileImportPage } from '@bingads-webui-campaign/file-import-page';\r\n\r\nimport * as i18nErrors from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\n\r\nimport azureUploader from '../azureUploader';\r\nimport { createDeps, getBlacklist } from './shared-dependencies';\r\n\r\nfunction getImportTemplateUrl({ config }) {\r\n const Permissions = config.get('Permissions');\r\n let fileName = 'ImportTemplateWithAdExtensions.csv';\r\n\r\n if (Permissions.IsDSAMixedModeCampaignEnabled) {\r\n if (Permissions.IsEnhancedShoppingCampaignAllowed) {\r\n fileName = 'ImportTemplateWithAdExtensionsAndBSCAndAdGroupType.csv';\r\n } else {\r\n fileName = 'ImportTemplateWithAdExtensionsAndAdGroupType.csv';\r\n }\r\n } else if (Permissions.IsEnhancedShoppingCampaignAllowed) {\r\n fileName = 'ImportTemplateWithAdExtensionsAndBSC.csv';\r\n }\r\n const TemplatesPathUrl = config.get('TemplatesPathUrl');\r\n\r\n const importTemplateUrl = `${TemplatesPathUrl}Import/${fileName}`;\r\n\r\n return importTemplateUrl;\r\n}\r\n\r\nexport function initFileImportPage(settings) {\r\n const commonDeps = createDeps(settings);\r\n const deps = _.extend(commonDeps, {\r\n azureUploader: azureUploader.upload,\r\n i18nErrors,\r\n importTemplateUrl: getImportTemplateUrl(commonDeps),\r\n defaultLogActivity: commonDeps.logActivities.clickOnImportFromFile,\r\n });\r\n\r\n deps.logActivities = _.extend(deps.logActivities, {\r\n renderImportColumnMatching: deps.scenarios.fileimport.renderImportColumnMatching.create(),\r\n renderImportOptions: deps.scenarios.fileimport.renderImportOptions.create(),\r\n renderImportPreview: deps.scenarios.fileimport.renderImportPreview.create(),\r\n renderImportSummary: deps.scenarios.fileimport.renderImportSummary.create(),\r\n });\r\n\r\n return new FileImportPage({\r\n deps,\r\n el: settings.isForVNext ? undefined : '#ImportPage',\r\n options: {\r\n currentStep: 'file-upload-step',\r\n importId: settings.importId,\r\n subFieldsBlacklist: getBlacklist(),\r\n },\r\n });\r\n}\r\n","import Promise from 'bluebird';\r\nimport _ from 'underscore';\r\nimport { GoogleImportPage } from '@bingads-webui-campaign/google-import-page';\r\nimport { MultiAccountGoogleImportPage } from '@bingads-webui-campaign/account-import-page';\r\n\r\nimport edm from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport jsData from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport { UetTagSelectorView } from '@bingads-webui-campaign-legacy/audiences/components/uet-tag/index';\r\nimport '@bingads-webui-static-legacy/extension/promise/withUiBlock';\r\n\r\nimport { createDeps, getBlacklist } from './shared-dependencies';\r\nimport { cookieHelperForEditImport } from '../shared/import-helper';\r\n\r\nfunction initGapi(settings) {\r\n return Promise.resolve(createDeps(settings));\r\n}\r\n\r\nexport function initDeps(settings) {\r\n return initGapi(settings).then((commonDeps) => {\r\n if (settings.isMultiAccountImport) {\r\n // eslint-disable-next-line no-param-reassign\r\n edm.customerIdType.useAdvertiserCustomerId = false;\r\n }\r\n\r\n const deps = _.extend(commonDeps, {\r\n edm,\r\n google: window.google,\r\n jsData,\r\n defaultLogActivity: commonDeps.logActivities.clickOnImportFromGoogleAdWords,\r\n });\r\n\r\n return deps;\r\n });\r\n}\r\n\r\nexport function initGoogleImportDeps(settings) {\r\n\r\n return initGapi(settings).then((commonDeps) => {\r\n if (settings.isMultiAccountImport) {\r\n // eslint-disable-next-line no-param-reassign\r\n edm.customerIdType.useAdvertiserCustomerId = false;\r\n }\r\n\r\n const deps = _.extend(commonDeps, {\r\n edm,\r\n google: window.google,\r\n jsData,\r\n defaultLogActivity: commonDeps.logActivities.clickOnImportFromGoogleAdWords,\r\n cookieHelperForEditImport,\r\n UetTagSelectorView,\r\n subFieldsBlacklist: getBlacklist(),\r\n });\r\n\r\n deps.logScenario = deps.scenarios.googleimport;\r\n\r\n deps.logActivities = _.extend(deps.logActivities, {\r\n renderSelectAdWordsAccount: deps.scenarios.googleimport.renderSelectAdWordsAccount.create(),\r\n renderImportOptions: deps.scenarios.googleimport.renderImportOptions.create(),\r\n renderSelectAdWordsCampaigns: deps.scenarios.googleimport.renderSelectAdWordsCampaigns.create(),\r\n renderImportSummary: deps.scenarios.googleimport.renderImportSummary.create(),\r\n\r\n // signals, atomic signals are not defined here\r\n logInAccount: deps.scenarios.googleimport.logInAccount.create(),\r\n selectAccount: deps.scenarios.googleimport.selectAccount.create(),\r\n selectCampaign: deps.scenarios.googleimport.selectCampaign.create(),\r\n configureOptions: deps.scenarios.googleimport.configureOptions.create(),\r\n completeSchedule: deps.scenarios.googleimport.completeSchedule.create(),\r\n });\r\n\r\n return deps;\r\n });\r\n}\r\n\r\nexport function initGoogleImportPage(settings) {\r\n return initGoogleImportDeps(settings).then((deps) => {\r\n return settings.isMultiAccountImport ? new MultiAccountGoogleImportPage({\r\n deps,\r\n el: settings.isForVNext ? undefined : '#ImportPage',\r\n options: {\r\n currentStep: 'bing-account-title-step',\r\n importId: settings.importId,\r\n taskItemId: settings.taskItemId,\r\n subFieldsBlacklist: getBlacklist(),\r\n },\r\n }) : new GoogleImportPage({\r\n deps,\r\n el: settings.isForVNext ? undefined : '#ImportPage',\r\n options: {\r\n currentStep: 'google-login-step',\r\n importId: settings.importId,\r\n taskItemId: settings.taskItemId,\r\n subFieldsBlacklist: getBlacklist(),\r\n },\r\n });\r\n });\r\n}\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport { FacebookImportPage } from '@bingads-webui-campaign/facebook-import-page';\r\nimport { loadFacebookSdk, getEnvironment } from '@bingads-webui-campaign/import-shared-repositories';\r\nimport edm from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport jsData from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport timeZoneMapper from '@bingads-webui-component-legacy/timezonemapper/index';\r\nimport { UetTagSelectorView } from '@bingads-webui-campaign-legacy/audiences/components/uet-tag/index';\r\nimport '@bingads-webui-static-legacy/extension/promise/withUiBlock';\r\nimport { createDeps } from './shared-dependencies';\r\nimport { cookieHelperForEditImport } from '../shared/import-helper';\r\n\r\nexport function initFacebookImportDeps(settings) {\r\n // not fetch FB login SDK in local test env with test token used\r\n // this is to decrease the API call for FB to stablize automation tests\r\n const currentEnv = getEnvironment(document.domain);\r\n const loadSDK = currentEnv === 'LOCAL' && settings.token ? () => Promise.resolve() : loadFacebookSdk;\r\n\r\n return loadSDK().then((sdk) => {\r\n const commonDeps = createDeps(settings);\r\n let deps = _.extend(commonDeps, {\r\n edm,\r\n jsData,\r\n timeZoneMapper,\r\n defaultLogActivity: commonDeps.logActivities.clickOnImportFromFacebook,\r\n cookieHelperForEditImport,\r\n UetTagSelectorView,\r\n });\r\n\r\n // if sdk is not undefined then add it into deps\r\n if (!_.isUndefined(sdk)) {\r\n deps = _.extend(deps, {\r\n FB: sdk,\r\n });\r\n }\r\n\r\n deps.logScenario = deps.scenarios.facebookimport;\r\n\r\n deps.logActivities = _.extend(deps.logActivities, {\r\n renderSelectAdWordsAccount: deps.scenarios.facebookimport.renderSelectAdWordsAccount.create(),\r\n renderImportOptions: deps.scenarios.facebookimport.renderImportOptions.create(),\r\n renderSelectAdWordsCampaigns: deps.scenarios.facebookimport.renderSelectAdWordsCampaigns.create(),\r\n renderImportSummary: deps.scenarios.facebookimport.renderImportSummary.create(),\r\n\r\n // signals, atomic signals are not defined here\r\n logInAccount: deps.scenarios.facebookimport.logInAccount.create(),\r\n selectAccount: deps.scenarios.facebookimport.selectAccount.create(),\r\n selectCampaign: deps.scenarios.facebookimport.selectCampaign.create(),\r\n configureOptions: deps.scenarios.facebookimport.configureOptions.create(),\r\n completeSchedule: deps.scenarios.facebookimport.completeSchedule.create(),\r\n });\r\n return deps;\r\n });\r\n}\r\n\r\nexport function initFacebookImportPage(settings) {\r\n return initFacebookImportDeps(settings).then((deps) => {\r\n return new FacebookImportPage({\r\n deps,\r\n options: {\r\n currentStep: 'facebook-login-step',\r\n importId: settings.importId,\r\n taskItemId: settings.taskItemId,\r\n },\r\n });\r\n });\r\n}\r\n","import _ from 'underscore';\r\nimport edm from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport timeZoneMapper from '@bingads-webui-component-legacy/timezonemapper/index';\r\nimport jsData from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport { UetTagSelectorView } from '@bingads-webui-campaign-legacy/audiences/components/uet-tag/index';\r\nimport '@bingads-webui-static-legacy/extension/promise/withUiBlock';\r\n\r\nimport { createDeps } from './shared-dependencies';\r\nimport { cookieHelperForEditImport } from '../shared/import-helper';\r\n\r\n\r\nexport function initAmazonImportDeps(settings) {\r\n const commonDeps = createDeps(settings);\r\n const deps = _.extend(commonDeps, {\r\n edm,\r\n jsData,\r\n timeZoneMapper,\r\n defaultLogActivity: commonDeps.logActivities.clickOnImportFromAmazonSPA,\r\n cookieHelperForEditImport,\r\n UetTagSelectorView,\r\n });\r\n\r\n deps.logScenario = deps.scenarios.amazonimport;\r\n\r\n deps.logActivities = _.extend(deps.logActivities, {\r\n renderSelectAmazonAccount: deps.scenarios.amazonimport.renderSelectAmazonAccount.create(),\r\n renderImportOptions: deps.scenarios.amazonimport.renderImportOptions.create(),\r\n renderSelectAmazonCampaigns: deps.scenarios.amazonimport.renderSelectAmazonCampaigns.create(),\r\n renderImportSummary: deps.scenarios.amazonimport.renderImportSummary.create(),\r\n\r\n // signals, atomic signals are not defined here\r\n logInAccount: deps.scenarios.amazonimport.logInAccount.create(),\r\n selectAccount: deps.scenarios.amazonimport.selectAccount.create(),\r\n selectCampaign: deps.scenarios.amazonimport.selectCampaign.create(),\r\n configureOptions: deps.scenarios.amazonimport.configureOptions.create(),\r\n completeSchedule: deps.scenarios.amazonimport.completeSchedule.create(),\r\n });\r\n\r\n return deps;\r\n}\r\n","import _ from 'underscore';\r\nimport edm from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport timeZoneMapper from '@bingads-webui-component-legacy/timezonemapper/index';\r\nimport jsData from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport { UetTagSelectorView } from '@bingads-webui-campaign-legacy/audiences/components/uet-tag/index';\r\nimport '@bingads-webui-static-legacy/extension/promise/withUiBlock';\r\n\r\nimport { createDeps } from './shared-dependencies';\r\nimport { cookieHelperForEditImport } from '../shared/import-helper';\r\n\r\n\r\nexport function initPinterestImportDeps(settings) {\r\n const commonDeps = createDeps(settings);\r\n const deps = _.extend(commonDeps, {\r\n edm,\r\n jsData,\r\n timeZoneMapper,\r\n defaultLogActivity: commonDeps.logActivities.clickOnImportFromPinterestSPA,\r\n cookieHelperForEditImport,\r\n UetTagSelectorView,\r\n });\r\n\r\n deps.logScenario = deps.scenarios.pinterestimport;\r\n\r\n return deps;\r\n}\r\n","import config from '@bingads-webui-component-legacy/config/index';\r\nimport { getBlackList } from '@bingads-webui-campaign/import-components';\r\nexport function getBlacklist() {\r\n const permissions = config.get('Permissions') || {};\r\n\r\n return getBlackList(permissions);\r\n}\r\n","\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/import-campaigns');\r\n\r\nexport const statusOrderToBlockerTitleMap = [{\r\n Text: i18n.getString('Import_QueueStatus'),\r\n}, {\r\n Text: i18n.getString('Import_UploadStatus'),\r\n}, {\r\n Text: i18n.getString('Import_ValidationInProgressStatus'),\r\n}, {\r\n Text: i18n.getString('Import_ValidationCompletedStatus'),\r\n}, {\r\n Text: i18n.getString('Import_BulkFileGenerateInProgressStatus'),\r\n}, {\r\n Text: i18n.getString('Import_SubmitStatus'),\r\n}, {\r\n Text: i18n.getString('CampaignImport_Completed'),\r\n}];\r\n\r\nexport const statusKeyToOrderMap = {\r\n PendingExecution: 0,\r\n NotStarted: 1,\r\n UploadInProgress: 1,\r\n ValidationInProgress: 2,\r\n ValidationCompleted: 3,\r\n BulkFileGenerateInProgress: 4,\r\n SubmitInProgress: 5,\r\n Complete: 6,\r\n};\r\n","import _ from 'underscore';\r\n\r\nimport { generateCombinedSchemaObject } from '@bingads-webui-campaign/import-components';\r\nimport { formatCoupon } from '@bingads-webui-campaign/recommendation-core';\r\n\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport { FilterStorageFactory } from '@bingads-webui-campaign/filter-storage';\r\nimport * as i18nErrors from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport odata from '@bingads-webui-component-legacy/http/channel/odata';\r\nimport * as timeZoneEnumMapper from '@bingads-webui-component-legacy/timezonemapper/enumMapper';\r\nimport timeZoneMapper from '@bingads-webui-component-legacy/timezonemapper/index';\r\nimport doubleListBox from '@bingads-webui-static-legacy/shared/view/doubleListBox';\r\nimport accountSelectionLists from '@bingads-webui-static-legacy/bulk-edit/model/download/accountSelectionLists';\r\nimport dateUtil from '@bingads-webui-component-legacy/humanize/date';\r\n\r\nimport instrumentation from '@bingads-webui-campaign-legacy/instrumentation/index';\r\nimport { statusKeyToOrderMap, statusOrderToBlockerTitleMap } from './statuses';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/import-campaigns');\r\nconst i18nAmdLoader = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/import-campaigns');\r\n\r\n_.templateSettings = {\r\n interpolate: /\\{\\{(.+?)\\}\\}/g,\r\n};\r\n\r\nconst scenarios = {\r\n amazonimport: instrumentation.importFromAmazonSPA.create(),\r\n pinterestimport: instrumentation.importFromPinterestSPA.create(),\r\n facebookimport: instrumentation.importFromFacebookSPA.create(),\r\n fileimport: instrumentation.importFromFileSPA.create(),\r\n googleimport: instrumentation.importFromGoogleAdWordsSPA.create(),\r\n continueImport: instrumentation.continueImportSPA.create(),\r\n};\r\nconst activities = {\r\n clickOnImportFromFacebook: scenarios.facebookimport.clickOnImportFromFacebookSPA.create(),\r\n clickOnImportFromAmazonSPA: scenarios.amazonimport.clickOnImportFromAmazonSPA.create(),\r\n clickOnImportFromPinterestSPA: scenarios.pinterestimport.clickOnImportFromPinterestSPA.create(),\r\n clickOnImportFromFile: scenarios.fileimport.clickOnImportFromFileSPA.create(),\r\n clickOnImportFromGoogleAdWords: scenarios.googleimport.clickOnImportFromGoogleAdWordsSPA.create(),\r\n loadContinueImport: scenarios.continueImport.loadContinueImportSPA.create(),\r\n};\r\n\r\nexport function createDeps(settings) {\r\n const { coupon, currency, preferenceService } = settings;\r\n const deps = {\r\n check: (dependencyName) => {\r\n if (!dependencyName || _.has(deps, dependencyName)) {\r\n return true;\r\n } else {\r\n throw new Error(`Missing dependency: ${dependencyName}`);\r\n }\r\n },\r\n config,\r\n i18n,\r\n i18nAmdLoader,\r\n i18nErrors,\r\n odata,\r\n timeZoneEnumMapper,\r\n timeZoneMapper,\r\n statusKeyToOrderMap,\r\n statusOrderToBlockerTitleMap,\r\n schema: generateCombinedSchemaObject(),\r\n alertCenter: window.App.views.alertCenter,\r\n logActivities: activities,\r\n scenarios,\r\n doubleListBox,\r\n accountSelectionLists,\r\n dateUtil,\r\n };\r\n\r\n const campaignFilterFactory = new FilterStorageFactory({\r\n preferenceService,\r\n featureName: 'CampaignsGrid',\r\n });\r\n const adGroupFilterFactory = new FilterStorageFactory({\r\n preferenceService,\r\n featureName: 'AdgroupGrid',\r\n });\r\n const adFilterFactory = new FilterStorageFactory({\r\n preferenceService,\r\n featureName: 'AdGrid',\r\n });\r\n\r\n deps.campaignFilterStore = campaignFilterFactory.create('editableFilter', {\r\n filterEntityOptions: {\r\n entitySchema: { name: 'Campaign' },\r\n },\r\n });\r\n deps.adgroupFilterStore = adGroupFilterFactory.create('editableFilter', {\r\n filterEntityOptions: {\r\n entitySchema: { name: 'AdGroup' },\r\n },\r\n });\r\n deps.adFilterStore = adFilterFactory.create('editableFilter', {\r\n filterEntityOptions: {\r\n entitySchema: { name: 'Ad' },\r\n },\r\n });\r\n\r\n return _.extend(\r\n deps,\r\n settings,\r\n coupon && {\r\n coupon: formatCoupon({\r\n i18n: i18nAmdLoader,\r\n coupon,\r\n currency,\r\n }),\r\n }\r\n );\r\n}\r\n\r\nexport { getBlacklist } from './options-blacklist';\r\n","export default {\r\n SearchTermGridId: 'KeywordsSearchTerm',\r\n AuctionInsightsGridId: 'tdAuctionInsightsGrid',\r\n CampaignTabId: 'Campaign',\r\n AdGroupTabId: 'AdGroup',\r\n AdsTabId: 'Ads',\r\n KeywordsTabId: 'Keywords',\r\n ProductsGroupId: 'ProductGroups',\r\n FlattenProductsGroupId: 'FlattenAdGroupLevelProductGroups',\r\n AudienceTabId: 'AudiencesAssociation',\r\n AdExtensionsTabId: 'AdExtensions',\r\n ChangeHistoryTabId: 'ChangeHistory',\r\n DimensionsTabId: 'Bidimensions',\r\n AdGroupStatusFilterColumnName: 'AdGroupStatus',\r\n KeywordNameFilterColumnName: 'KeywordName',\r\n LocationsTabId: 'Locations',\r\n DevicesTabId: 'Devices',\r\n AdScheduleTabId: 'AdSchedule',\r\n DemographicsTabId: 'Demographics',\r\n AdDescriptionFilterColumnName: 'AdDescription',\r\n AdExtensionCampaignAssociationStatus: 'AdExtensionCampaignAssociationStatus',\r\n AdExtensionAssociationStatus: 'AdExtensionAssociationStatus',\r\n KeywordMatchTypeColumnName: 'MatchType',\r\n\r\n CampaignEntity: 'Campaign',\r\n AdGroupEntity: 'AdGroup',\r\n AdEntity: 'Ad',\r\n KeywordEntity: 'Keyword',\r\n SearchTermEntity: 'SearchTerm',\r\n AuctionInsightEntity: 'AuctionInsight',\r\n AudiencesAssociationEntity: 'AdGroupAudienceAssociation',\r\n\r\n AccountEdmEntity: 'Accounts',\r\n AdGroupCriterionEdmEntity: 'AdGroupCriterions',\r\n CampaignCriterionEdmEntity: 'CampaignCriterions',\r\n CampaignEdmEntity: 'Campaigns',\r\n DynamicSearchAdsEdmEntity: 'DynamidSearchAds',\r\n AdGroupEdmEntity: 'AdGroups',\r\n AdEdmEntity: 'Ads',\r\n KeywordEdmEntity: 'Keywords',\r\n ClickMetricId: 1,\r\n NoneMetricId: -1,\r\n};\r\n","import _ from 'underscore';\r\nimport PageContext from '@bingads-webui-static-legacy/page-context';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/inline-chart');\r\n\r\nconst { IsViewThroughConversionEnabled } = PageContext.Permissions;\r\n\r\nexport default class InlineChartDropDownOption {\r\n constructor({filterOptionId} = {filterOptionId: []}) {\r\n this.filterOptionId = filterOptionId;\r\n }\r\n\r\n fetch() {\r\n let result = {\r\n data: _.compact([{\r\n id: 1,\r\n value: i18n.get('ColumnName_Clicks'),\r\n }, {\r\n id: 0,\r\n value: i18n.get('ColumnName_CostPerConversion'),\r\n }, {\r\n id: 2,\r\n value: i18n.get('ColumnName_CPA'),\r\n }, {\r\n id: 3,\r\n value: i18n.get('ColumnName_Conversions'),\r\n }, {\r\n id: 4,\r\n value: i18n.get('ColumnName_CTR'),\r\n }, {\r\n id: 5,\r\n value: i18n.get('TrendAreaChart_AxisY'),\r\n }, {\r\n id: 6,\r\n value: i18n.get('ColumnName_Spend'),\r\n }, {\r\n id: 7,\r\n value: i18n.get('Chart_AvgPosition'),\r\n }, {\r\n id: 8,\r\n value: i18n.get('ColumnName_ConversionRate'),\r\n }, {\r\n id: 9,\r\n value: i18n.get('ColumnName_Revenue'),\r\n }, {\r\n id: 10,\r\n value: i18n.get('ColumnName_ROAS'),\r\n }, {\r\n id: 11,\r\n value: i18n.get('ColumnName_AllConversionCPA'),\r\n }, {\r\n id: 12,\r\n value: i18n.get('ColumnName_AllConversions'),\r\n }, {\r\n id: 13,\r\n value: i18n.get('ColumnName_AllConversionRate'),\r\n }, {\r\n id: 14,\r\n value: i18n.get('ColumnName_AllConversionAdvertiserReportedRevenue'),\r\n }, {\r\n id: 15,\r\n value: i18n.get('ColumnName_AllConversionRevenueOnAdSpend'),\r\n }, IsViewThroughConversionEnabled && {\r\n id: 16,\r\n value: i18n.get('ColumnName_ViewThroughConversions'),\r\n }]),\r\n };\r\n\r\n if (_.isArray(this.filterOptionId) && this.filterOptionId.length !== 0) {\r\n const resultData = result.data;\r\n\r\n result.data = _.filter(resultData, (item) => {\r\n return !_.contains(this.filterOptionId, item.id);\r\n });\r\n }\r\n\r\n return result;\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport state from '@bingads-webui-component-legacy/state/index';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/inline-chart');\r\n\r\nexport default class GranularityDropDownOption extends Backbone.Collection {\r\n constructor(option) {\r\n super();\r\n this.usingNewDatefilter = option && option.usingNewDatefilter;\r\n let dateObj = {};\r\n\r\n return state.getPromise('$daterange')\r\n .then((daterange) => {\r\n dateObj.dateRange = this.usingNewDatefilter ? daterange : window.App.views.Summary.dateFilter.ko_model.appliedRange();\r\n dateObj.comparedDateRange = this.usingNewDatefilter ? daterange.compared : window.App.views.Summary.dateFilter.ko_model.appliedComparedRange();\r\n\r\n let mainDateDiff = this._calculateDiff(dateObj.dateRange);\r\n let comparedDateDiff = this._calculateDiff(dateObj.comparedDateRange);\r\n let now = new Date();\r\n // we only support hourly data for a sliding 6 months window\r\n let hourlyStartDate = new Date(now.setMonth(now.getMonth() - 6));\r\n let hourlyOptionDisabled = mainDateDiff > 0 || (comparedDateDiff ? comparedDateDiff > 0 : false) ||\r\n !(dateObj.dateRange.start > hourlyStartDate) ||\r\n !(dateObj.comparedDateRange ? dateObj.comparedDateRange.start > hourlyStartDate : true);\r\n let dailyOptionDisabled = this._calculateDisabled(mainDateDiff, 1, 30) || (comparedDateDiff ? this._calculateDisabled(comparedDateDiff, 1, 30) : false);\r\n let weeklyOptionDisabled = this._calculateDisabled(mainDateDiff, 7, 210) || (comparedDateDiff ? this._calculateDisabled(comparedDateDiff, 7, 210) : false);\r\n let monthlyOptionDisabled = this._calculateDisabled(mainDateDiff, 31, 900) || (comparedDateDiff ? this._calculateDisabled(comparedDateDiff, 31, 900) : false);\r\n let quarterlyOptionDisabled = this._calculateDisabled(mainDateDiff, 90, Infinity) || (comparedDateDiff ? this._calculateDisabled(comparedDateDiff, 90, Infinity) : false);\r\n let allOptionsDisabled = hourlyOptionDisabled && dailyOptionDisabled &&\r\n weeklyOptionDisabled && monthlyOptionDisabled && quarterlyOptionDisabled;\r\n\r\n if (allOptionsDisabled) {\r\n let longerPeriod = comparedDateDiff > mainDateDiff ? comparedDateDiff : mainDateDiff;\r\n\r\n dailyOptionDisabled = this._calculateDisabled(longerPeriod, 1, 30);\r\n weeklyOptionDisabled = this._calculateDisabled(longerPeriod, 7, 210);\r\n monthlyOptionDisabled = this._calculateDisabled(longerPeriod, 31, 900);\r\n quarterlyOptionDisabled = this._calculateDisabled(longerPeriod, 90, Infinity);\r\n }\r\n\r\n return {\r\n data: [{\r\n id: 0,\r\n value: i18n.get('InlineChart_Granularity_Hourly'),\r\n enumValue: 'Hour',\r\n disabled: hourlyOptionDisabled,\r\n }, {\r\n id: 1,\r\n value: i18n.get('InlineChart_Granularity_Daily'),\r\n enumValue: 'Day',\r\n disabled: dailyOptionDisabled,\r\n }, {\r\n id: 2,\r\n value: i18n.get('InlineChart_Granularity_Weekly'),\r\n enumValue: 'Week',\r\n disabled: weeklyOptionDisabled,\r\n }, {\r\n id: 3,\r\n value: i18n.get('InlineChart_Granularity_Monthly'),\r\n enumValue: 'Month',\r\n disabled: monthlyOptionDisabled,\r\n }, {\r\n id: 4,\r\n value: i18n.get('InlineChart_Granularity_Quarterly'),\r\n disabled: quarterlyOptionDisabled,\r\n enumValue: 'Quarter',\r\n }],\r\n };\r\n });\r\n }\r\n\r\n _calculateDiff (dateRange) {\r\n if (dateRange) {\r\n let startDate = new Date(dateRange.start);\r\n let endDate = new Date(dateRange.end);\r\n let timeDiff = Math.abs(endDate.getTime() - startDate.getTime());\r\n\r\n return Math.round(timeDiff / (1000 * 3600 * 24));\r\n }\r\n return null;\r\n }\r\n\r\n _calculateDisabled (dateDiff, min, max) {\r\n return dateDiff < min || dateDiff > max;\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport DelegateAdapter from '@bingads-webui-component-legacy/js-data-delegate/adapter';\r\n\r\nclass ChartDelegateAdapter extends DelegateAdapter {\r\n // All of the methods shown here must return a promise\r\n\r\n // \"definition\" is a resource definition that would\r\n // be returned by DS#defineResource\r\n\r\n // \"options\" would be the options argument that\r\n // was passed into the DS method that is calling\r\n // the adapter method\r\n\r\n convertToDateObj(dateString) {\r\n let dateParsedArray = dateString.split('-');\r\n let year = dateParsedArray[0];\r\n let month = dateParsedArray[1] - 1;\r\n let day = dateParsedArray[2];\r\n\r\n return new Date(year, month, day, 0, 0, 0);\r\n }\r\n\r\n numberOfDataPoints(request) {\r\n let sd = this.convertToDateObj(request.startDate);\r\n let ed = this.convertToDateObj(request.endDate);\r\n\r\n switch (request.granularity) {\r\n case 'Day':\r\n return Math.round((ed - sd) / (1000 * 60 * 60 * 24)) + 1; // make sure it's 30 data points when the date range is 1-30 (30 minus 1 is 29 so have to plus 1)\r\n case 'Week':\r\n return Math.round((ed - sd) / (1000 * 60 * 60 * 24 * 7));\r\n case 'Month':\r\n return Math.round((ed - sd) / (1000 * 60 * 60 * 24 * 30));\r\n case 'Quarter':\r\n return Math.round((ed - sd) / (1000 * 60 * 60 * 24 * 90)) + 1; // make sure it's counting 1 extra quarter e.g 2013-12-20 -> 2016-12-20 is 13 quarters, not 12\r\n default:\r\n return Math.round((ed - sd) / (1000 * 60 * 60));\r\n }\r\n }\r\n\r\n prependZero(numb) {\r\n return numb < 10 ? `0${numb}` : numb;\r\n }\r\n\r\n generateFormattedDateString(date) {\r\n return `${date.getYear() + 1900}-${this.prependZero(date.getMonth() + 1)}-${this.prependZero(date.getDate())}T${this.prependZero(date.getHours())}:${this.prependZero(date.getMinutes())}:${this.prependZero(date.getSeconds())}-08:00`;\r\n }\r\n\r\n generateMockData(request) {\r\n let rtnData = [];\r\n let chartDropdownOptions = [\r\n 'AverageCPC',\r\n 'Clicks',\r\n 'CPA',\r\n 'Conversions',\r\n 'CTR',\r\n 'Impressions',\r\n 'Spend',\r\n 'AveragePosition',\r\n 'ConversionRate',\r\n 'AdvertiserReportedRevenue',\r\n 'RevenueOnAdSpend',\r\n 'AllConversionCPA',\r\n 'AllConversions',\r\n 'AllConversionRate',\r\n 'AllConversionAdvertiserReportedRevenue',\r\n 'AllConversionRevenueOnAdSpend',\r\n 'ViewThroughConversions',\r\n 'ViewThroughConversionsRevenue',\r\n 'ViewThroughConversionsCPA',\r\n 'ViewThroughConversionsReturnOnAdSpend',\r\n 'ViewThroughConversionsRate',\r\n ];\r\n\r\n _.each(chartDropdownOptions, (metricOption) => {\r\n let obj = {\r\n MetricName: metricOption,\r\n PrimaryDataPoints: [],\r\n ComparisonDataPoints: [],\r\n };\r\n let dateObj = this.convertToDateObj(request.startDate);\r\n\r\n this._fillData(request, obj.PrimaryDataPoints, dateObj);\r\n // fill in pop data\r\n if (request.compareStartDate) {\r\n this._fillData(request, obj.ComparisonDataPoints, dateObj);\r\n }\r\n\r\n rtnData.push(obj);\r\n });\r\n\r\n return rtnData;\r\n }\r\n\r\n _fillData(request, dataPoints, dateObj) {\r\n if (request.granularity === 'Hour') {\r\n let day = dateObj.getDate();\r\n\r\n for (let i = 0; i < 24; i++) {\r\n // make sure if it's hourly, it doesn't exceed to the next day\r\n // this happens when there's the daylight savings time change\r\n if (dateObj.getDate() !== day) {\r\n break;\r\n }\r\n\r\n dataPoints.push({\r\n 'DateTime': this.generateFormattedDateString(dateObj),\r\n 'Value': Math.floor(Math.random() * 100),\r\n });\r\n dateObj.addHour(1);\r\n }\r\n } else if (request.granularity === 'Day') {\r\n let numbOfdataPoints = this.numberOfDataPoints(request);\r\n\r\n for (let i = 0; i < numbOfdataPoints; i++) {\r\n dataPoints.push({\r\n 'DateTime': this.generateFormattedDateString(dateObj),\r\n 'Value': Math.floor(Math.random() * 100),\r\n });\r\n dateObj.addDay(1);\r\n }\r\n } else if (request.granularity === 'Week') {\r\n let numbOfdataPoints = this.numberOfDataPoints(request);\r\n\r\n for (let i = 0; i < numbOfdataPoints; i++) {\r\n dataPoints.push({\r\n 'DateTime': this.generateFormattedDateString(dateObj),\r\n 'Value': Math.floor(Math.random() * 100),\r\n });\r\n dateObj.addDay(7);\r\n }\r\n } else if (request.granularity === 'Month') {\r\n let numbOfdataPoints = this.numberOfDataPoints(request);\r\n\r\n for (let i = 0; i < numbOfdataPoints; i++) {\r\n dataPoints.push({\r\n 'DateTime': this.generateFormattedDateString(dateObj),\r\n 'Value': Math.floor(Math.random() * 100),\r\n });\r\n dateObj.addMonth(1);\r\n }\r\n } else if (request.granularity === 'Quarter') {\r\n let numbOfdataPoints = this.numberOfDataPoints(request);\r\n\r\n for (let i = 0; i < numbOfdataPoints; i++) {\r\n dataPoints.push({\r\n 'DateTime': this.generateFormattedDateString(dateObj),\r\n 'Value': Math.floor(Math.random() * 100),\r\n });\r\n // use setMonth and getMonth because the addMonth function doesn't work\r\n dateObj.setMonth(dateObj.getMonth() + 3);\r\n }\r\n }\r\n }\r\n\r\n findAll(request) {\r\n // Must resolve the promise with the found items\r\n return new Promise((resolve /*, reject */) => {\r\n resolve(this.generateMockData(request));\r\n });\r\n }\r\n\r\n}\r\n\r\nexport default ChartDelegateAdapter;\r\n","import _ from 'underscore';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/inline-chart');\r\n\r\nexport function toODataMetricName(metric) {\r\n let metricMapping = {\r\n 0: 'AverageCPC',\r\n 1: 'Clicks',\r\n 2: 'CPA',\r\n 3: 'Conversions',\r\n 4: 'CTR',\r\n 5: 'Impressions',\r\n 6: 'Spend',\r\n 7: 'AveragePosition',\r\n 8: 'ConversionRate',\r\n 9: 'AdvertiserReportedRevenue',\r\n 10: 'RevenueOnAdSpend',\r\n 11: 'AllConversionCPA',\r\n 12: 'AllConversions',\r\n 13: 'AllConversionRate',\r\n 14: 'AllConversionAdvertiserReportedRevenue',\r\n 15: 'AllConversionRevenueOnAdSpend',\r\n 16: 'ViewThroughConversions',\r\n };\r\n\r\n let allMetrics = metric.toString().split(',');\r\n let ret = _.map(allMetrics, (m) => {\r\n return metricMapping[m] ? metricMapping[m] : m;\r\n });\r\n\r\n return `${ret}`;\r\n}\r\n\r\nexport function getMetricLocalizedNameForOdata(metric) {\r\n let convertedString = '';\r\n\r\n switch (metric) {\r\n case 0:\r\n convertedString = i18n.get('ColumnName_CostPerConversion');\r\n break;\r\n case 1:\r\n convertedString = i18n.get('ColumnName_Clicks');\r\n break;\r\n case 2:\r\n convertedString = i18n.get('ColumnName_CPA');\r\n break;\r\n case 3:\r\n convertedString = i18n.get('ColumnName_Conversions');\r\n break;\r\n case 4:\r\n convertedString = i18n.get('ColumnName_CTR');\r\n break;\r\n case 5:\r\n convertedString = i18n.get('TrendAreaChart_AxisY');\r\n break;\r\n case 6:\r\n convertedString = i18n.get('ColumnName_Spend');\r\n break;\r\n case 7:\r\n convertedString = i18n.get('Chart_AvgPosition');\r\n break;\r\n case 8:\r\n convertedString = i18n.get('ColumnName_ConversionRate');\r\n break;\r\n case 9:\r\n convertedString = i18n.get('ColumnName_Revenue');\r\n break;\r\n case 10:\r\n convertedString = i18n.get('ColumnName_ROAS');\r\n break;\r\n case 11:\r\n convertedString = i18n.get('ColumnName_AllConversionCPA');\r\n break;\r\n case 12:\r\n convertedString = i18n.get('ColumnName_AllConversions');\r\n break;\r\n case 13:\r\n convertedString = i18n.get('ColumnName_AllConversionRate');\r\n break;\r\n case 14:\r\n convertedString = i18n.get('ColumnName_AllConversionAdvertiserReportedRevenue');\r\n break;\r\n case 15:\r\n convertedString = i18n.get('ColumnName_AllConversionRevenueOnAdSpend');\r\n break;\r\n case 16:\r\n convertedString = i18n.get('ColumnName_ViewThroughConversions');\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n return convertedString;\r\n}\r\n\r\nexport function toUIMetricId(metricName) {\r\n let chartNameTable = {};\r\n\r\n chartNameTable.AverageCPC = 0;\r\n chartNameTable.Clicks = 1;\r\n chartNameTable.CPA = 2;\r\n chartNameTable.Conversions = 3;\r\n chartNameTable.ClickThruRate = 4;\r\n chartNameTable.Impressions = 5;\r\n chartNameTable.Spent = 6;\r\n chartNameTable.AveragePosition = 7;\r\n chartNameTable.ConversionRate = 8;\r\n chartNameTable.AdvertiserReportedRevenue = 9;\r\n chartNameTable.RevenueOnAdSpend = 10;\r\n chartNameTable.AllConversionCPA = 11;\r\n chartNameTable.AllConversions = 12;\r\n chartNameTable.AllConversionRate = 13;\r\n chartNameTable.AllConversionAdvertiserReportedRevenue = 14;\r\n chartNameTable.AllConversionRevenueOnAdSpend = 15;\r\n chartNameTable.ViewThroughConversions = 16;\r\n\r\n return chartNameTable[metricName];\r\n}\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport edmCampaign from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport ChartDelegateAdapter from '@bingads-webui-campaign-legacy/inline-chart/chartdelegateadapter';\r\nimport odataFilterConverter from '@bingads-webui-static-legacy/odata-filter-converter';\r\nimport * as chartNameConverter from '@bingads-webui-campaign-legacy/inline-chart/chartnameconverter';\r\nimport { getParameter } from '@bingads-webui/url-util';\r\nimport * as cookie from '@bingads-webui/cookie';\r\nimport Constants from '@bingads-webui-campaign-legacy/inline-chart/constants';\r\nimport instrument from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport instrumentConsts from '@bingads-webui-static-legacy/instrumentation/constants';\r\nimport jsdata from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport PageContext from '@bingads-webui-static-legacy/page-context';\r\n\r\nconst { IsCustomerHierarchyEnabled } = (PageContext && PageContext.Permissions) || {};\r\n\r\nclass DataProvider {\r\n constructor() {\r\n this.p$jsdata = undefined;\r\n }\r\n\r\n fetchData(context, metric) {\r\n let request = this._generateRequest(context, metric);\r\n\r\n //TODO[tedlee]: remove this approach of using query string parameter before GA\r\n let useInlineChartMockData = !!(getParameter('useInlineChartMockData', window.location.href) === 'true') ||\r\n cookie.get('useInlineChartMockData') === 'true';\r\n\r\n if (useInlineChartMockData) {\r\n this.p$jsdata = this._fetchDataUsingMockDBAdapter(request);\r\n } else {\r\n this.p$jsdata = this._fetchDataUsingOdataAdapter(request, context.refreshGridData);\r\n }\r\n return this.p$jsdata;\r\n }\r\n\r\n /**\r\n * @param {Object} context - an object passed from viewmodel layer that contains date filter info, grid filter info, level and tab Id, and time grain.\r\n * @param {String} metric - an optional parameter that specifies which metric to request.\r\n * @return {Object} an request object for adapter layer to construct actual odata/mockdata request.\r\n */\r\n _generateRequest(context, metric) {\r\n let request = {};\r\n let transformedMetric = `'${chartNameConverter.toODataMetricName(metric)}'`;\r\n\r\n _.extend(request, {\r\n parentLevels: context.parentLevels, //[{name: 'Campaigns', id: 21223784}, { name: 'AdGroups', id: 654321}],\r\n edmEntity: context.currentEntity ? this._getEntityCollectionName(context.currentEntity) : Constants.CampaignEdmEntity,\r\n entity: context.currentEntity ? context.currentEntity : Constants.CampaignEntity,\r\n startDate: context && context.period ? this._formatDateString(context.period().start) : null,\r\n endDate: context && context.period ? this._formatDateString(context.period().end) : null,\r\n compareStartDate: context && context.period && context.period().compared ? this._formatDateString(context.period().compared.start) : null,\r\n compareEndDate: context && context.period && context.period().compared ? this._formatDateString(context.period().compared.end) : null,\r\n granularity: context.granularity && context.granularity() ? context.granularity() : 'Day', //TODO: Day\r\n metrics: transformedMetric,\r\n filters: context.filter(),\r\n movingAverage: context.isMovingAverageOn(),\r\n });\r\n return request;\r\n }\r\n\r\n _fetchDataUsingOdataAdapter(request, forceRefresh) {\r\n let filter = null;\r\n const filtersTypeString = typeof request.filters === 'string';\r\n\r\n // filter out the filters that has empty values, and log them\r\n let filtersToUse = filtersTypeString || !request.filters ?\r\n request.filters :\r\n _.select(request.filters, (filterExpression) => {\r\n const valueValid = !_.isEmpty(filterExpression.Values) && !_.contains(filterExpression.Values, ''); // no empty values\r\n\r\n if (!valueValid && instrument.logError) {\r\n instrument.logError('inlineChartV2/filterForFetch',\r\n `there are invalid values, requested filters are ${JSON.stringify(filterExpression)}`);\r\n }\r\n\r\n return valueValid; // filter out the empty values here\r\n });\r\n\r\n if (filtersToUse) {\r\n if (filtersTypeString) {\r\n filter = decodeURIComponent(filtersToUse);\r\n } else {\r\n filter = decodeURIComponent(odataFilterConverter.convertToURLParam(filtersToUse, request.entity));\r\n }\r\n\r\n // Note: temporary log added for analyzing filter expression mismatching issue.\r\n if (instrument.logMessage) {\r\n let filterRequested;\r\n\r\n if (filtersTypeString) {\r\n filterRequested = `{ \"type\" : \"string\", \"value\" : \"${filtersToUse}\" }`;\r\n } else {\r\n filterRequested = `{ \"type\" : \"object\", \"value\" : \"${JSON.stringify(filtersToUse[0])}\" }`;\r\n }\r\n\r\n instrument.logMessage([instrumentConsts.LOGCATEGORY.TRACE],\r\n instrumentConsts.LOGLEVEL.INFO,\r\n 'inlineChartV2/filterForFetch',\r\n `{ \"entity\" : \"${request.entity}\", \"filter\" : \"${filter}\", \"request\" : \"${filterRequested}\" }`);\r\n }\r\n } else {\r\n filter = {};\r\n }\r\n\r\n if (!_.isEmpty(filter)) {\r\n //filter generated from odataFilterConvert starts with '$filter='. Remove this substring.\r\n filter = filter.slice(8);\r\n }\r\n\r\n return jsdata.PerformanceTimeSeries.findAll({\r\n where: filter,\r\n entitySet: this._getScope(request).toJSON(),\r\n }, {\r\n headers: {\r\n 'x-ms-refreshcampaigncache': !!forceRefresh,\r\n },\r\n // bypass cache, as inline chart needs data aligned with grid, we need always update to date here\r\n // use bypassCache instead of cacheResponse as elsewhere (performance card) may cache the response\r\n bypassCache: true,\r\n }).then((result) => {\r\n if (!_.isEmpty(result.errors)) {\r\n return Promise.reject(result);\r\n }\r\n return this._prepareData(request, result);\r\n });\r\n }\r\n\r\n _fetchDataUsingMockDBAdapter(request) {\r\n let mockDataAdapter = new ChartDelegateAdapter('mockdb');\r\n\r\n return mockDataAdapter.findAll(request).then((result) => {\r\n return this._prepareData(request, result);\r\n });\r\n }\r\n\r\n _formatDateString(dateStr) {\r\n let leftPadding = (s) => {\r\n return s.length === 1 ? `0${s}` : s;\r\n };\r\n const dt = new Date(Date.parse(dateStr));\r\n const year = `${dt.getFullYear()}`;\r\n const month = `${dt.getMonth() + 1}`;\r\n const day = `${dt.getDate()}`;\r\n\r\n return `${year}-${leftPadding(month)}-${leftPadding(day)}`;\r\n }\r\n\r\n _prepareData(request, results) {\r\n let transformChartPoints = (series) => {\r\n let ret = {};\r\n\r\n let convertData = (point, isPrimaryData) => {\r\n if (isPrimaryData) {\r\n ret.PrimaryData = ret.PrimaryData || [];\r\n } else {\r\n ret.ComparisonData = ret.ComparisonData || [];\r\n }\r\n\r\n // Because the data-time is based on campaign time zone by default,\r\n // ideally, the format of data-time string in OData response should not\r\n // contain time zone part. In case it does, we should remove it.\r\n // e.g. \"2016-11-11T00:00:00-08:00\" -> \"2016-11-11T00:00:00\"\r\n point.DateTime = point.DateTime.substring(0, 19);\r\n\r\n // Then since chart is based on UTC, we need shift the date-time string to UTC,\r\n // otherwise, it will be treated as client's local time zone which is wrong.\r\n // e.g. \"2016-11-11T00:00:00\" -> \"2016-11-11T00:00:00Z\"\r\n point.DateTime = point.DateTime + 'Z'; // eslint-disable-line\r\n\r\n let dateTime = new Date(point.DateTime);\r\n\r\n if (isPrimaryData) {\r\n ret.PrimaryData.push([dateTime.getTime(), point.Value]);\r\n } else {\r\n ret.ComparisonData.push([dateTime.getTime(), point.Value]);\r\n }\r\n };\r\n\r\n _.each(series.PrimaryDataPoints, (point) => {\r\n convertData(point, true);\r\n });\r\n\r\n _.each(series.ComparisonDataPoints, (point) => {\r\n convertData(point, false);\r\n });\r\n\r\n return ret;\r\n };\r\n\r\n\r\n let ret = {};\r\n\r\n _.each(results, (series) => {\r\n let chartName = chartNameConverter.toUIMetricId(series.MetricName);\r\n\r\n ret[chartName] = {};\r\n ret[chartName] = transformChartPoints(series);\r\n });\r\n\r\n return ret;\r\n }\r\n\r\n _getScope(request) {\r\n let navigation = null;\r\n\r\n navigation = this._getNavigation(request.edmEntity);\r\n\r\n _.each(request.parentLevels, (nav) => {\r\n if (nav && _.isString(nav.id)) {\r\n nav.id = parseInt(nav.id);\r\n }\r\n navigation = navigation[nav.name].$withKey(nav.id);\r\n });\r\n\r\n if (request && request.edmEntity) {\r\n navigation = navigation[request.edmEntity];\r\n }\r\n\r\n let entitySet = navigation[IsCustomerHierarchyEnabled && request.edmEntity === 'Accounts' ? 'Default.HierarchicalPerformanceTimeSeries' : 'Default.PerformanceTimeSeries'].$call({\r\n granularity: `Enum.Granularity'${request.granularity}'`,\r\n startDate: request.startDate,\r\n endDate: request.endDate,\r\n comparisonStartDate: request.compareStartDate ? request.compareStartDate : null,\r\n comparisonEndDate: request.compareEndDate ? request.compareEndDate : null,\r\n metrics: request.metrics,\r\n // [tedled]: put movingAverage as false for now. will make it reflect the checkbox's selection\r\n movingAverage: request.movingAverage,\r\n });\r\n\r\n return entitySet;\r\n }\r\n\r\n _getNavigation(entityType) {\r\n switch (entityType) {\r\n case Constants.AccountEdmEntity:\r\n return edmCampaign.currentCustomer;\r\n case Constants.DynamicSearchAdsEdmEntity:\r\n // placeholder for DSA. This has to be changed.\r\n return edmCampaign.currentCustomer;\r\n case Constants.CampaignEdmEntity:\r\n return edmCampaign.currentAccount;\r\n default:\r\n return edmCampaign.currentAccount;\r\n }\r\n }\r\n\r\n _getEntityCollectionName(name) {\r\n let nameMapping = {\r\n Campaign: Constants.CampaignEdmEntity,\r\n Keyword: Constants.KeywordEdmEntity,\r\n Account: Constants.AccountEdmEntity,\r\n NegativeKeyword: Constants.KeywordEdmEntity, // Negative keywords also show keyword performance trend\r\n NegativeKeywordList: Constants.KeywordEdmEntity, // Negative keyword lists also show keyword performance trend\r\n AdGroup: Constants.AdGroupEdmEntity,\r\n Ad: Constants.AdEdmEntity,\r\n CampaignCriterion: Constants.CampaignCriterionEdmEntity,\r\n AdGroupCriterion: Constants.AdGroupCriterionEdmEntity,\r\n };\r\n\r\n if (nameMapping[name]) {\r\n return nameMapping[name];\r\n }\r\n return name;\r\n }\r\n}\r\n\r\nexport\r\ndefault DataProvider;\r\n","import state from '@bingads-webui-component-legacy/state/index';\r\n\r\nexport default {\r\n\r\n // returns current level\r\n // it is one of the three values: \"Account\", \"Campaign\" and \"AdGroup\"\r\n get currentLevel() {\r\n if (state.get('adgroup_id')) {\r\n return 'AdGroup';\r\n } else if (state.get('campaign_id')) {\r\n return 'Campaign';\r\n } else {\r\n return 'Account';\r\n }\r\n },\r\n};\r\n","import _ from 'underscore';\r\nimport BPromise from 'bluebird';\r\nimport { PreferencesSubadapter } from '@bingads-webui-component-legacy/bingads-grid/service/preference-subadapter';\r\nimport { store, adapter } from '@bingads-webui-component-legacy/bingads-grid/service/grid-preferences';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\n\r\nexport let InlineChart = store.definitions.InlineChart;\r\n\r\n// To avoid 'Duplicated subadapter registration' error in new UI when we inject feature bundles\r\nif (_.isUndefined(InlineChart)) {\r\n InlineChart = store.defineResource('InlineChart');\r\n adapter.registerSubadapter('InlineChart', new PreferencesSubadapter({\r\n Resource: InlineChart,\r\n prefix({\r\n where: {\r\n project = 'CampaignUI',\r\n } = {},\r\n } = {}) {\r\n if (_.some([project], _.negate(_.isString))) {\r\n throw new Error('Invalid where clause');\r\n }\r\n\r\n return `WebApp.${project}.InlineChart`;\r\n },\r\n\r\n serialize(attrs) {\r\n const { id, project, inlineChartData } = attrs;\r\n\r\n if (_.some(project, _.negate(_.isString))) {\r\n throw new Error('Invalid attributes');\r\n }\r\n\r\n return {\r\n Id: id,\r\n Name: `WebApp.${project}.InlineChart`,\r\n Data: inlineChartData,\r\n Type: 'object',\r\n Version: 1,\r\n };\r\n },\r\n\r\n deserialize(data) {\r\n const match = data.Name.match(/^WebApp\\.(\\w+)\\.InlineChart/);\r\n\r\n if (!match) {\r\n throw new Error('Invalid preference name');\r\n }\r\n\r\n const project = match.slice(1);\r\n const inlineChartData = data.Data;\r\n const id = data.Id;\r\n\r\n return { id, project, inlineChartData };\r\n },\r\n }));\r\n}\r\n\r\n/*\r\n * This funciont gets inline chart specific preference data, and returns\r\n * promise with resolved data. If key is injected as parameter, it will\r\n * return the speicific key value inside the inline chart preference\r\n * Otherwise, it returns all key/value pairs saved for inline charts.\r\n * eg) getInlineChartInfo('CampaignUI', 'Campaign-showChart')\r\n * => promise with true/false result\r\n * getInlineChartInfo('CampaignUI')\r\n * => promise with set of key/values stored in preference\r\n*/\r\nexport function getInlineChartInfo(key = null, project = 'CampaignUI') {\r\n return InlineChart.findAll({\r\n where: { project },\r\n }).then((record) => {\r\n if (record.length === 0) {\r\n InlineChart.create({ inlineChartData: {}, project }, {\r\n path: config.get('odata.path'),\r\n });\r\n }\r\n const keyRecord = key ? record[0].inlineChartData[key] : record[0];\r\n\r\n return BPromise.resolve(record.length ? keyRecord : _.noop());\r\n });\r\n}\r\n\r\n/*\r\n * This funciont sets inline chart specific preference data, and returns\r\n * promise with resolved data. If provided key in passed parameter exists in preference\r\n * already, then it will update the value. Otherwise it will create a new key/value pair.\r\n * eg) setInlineChartInfo('{\r\n * 'Campaign-showChart': true,\r\n * }', 'CampaignUI')\r\n * => a 'Campaign-showChart' key is created/updated on preference service\r\n*/\r\nexport function setInlineChartInfo(item, project = 'CampaignUI') {\r\n return getInlineChartInfo().then((record) => {\r\n const inlineChartInfo = _.result(record, 'inlineChartData');\r\n const newinlineChartInfo = inlineChartInfo ? _.extend({}, inlineChartInfo, item) : item;\r\n\r\n if (record && !_.isEmpty(newinlineChartInfo)) {\r\n return InlineChart.update(record.id, { inlineChartData: newinlineChartInfo });\r\n } else {\r\n return InlineChart.create({ inlineChartData: newinlineChartInfo, project }, {\r\n path: config.get('odata.path'),\r\n });\r\n }\r\n });\r\n}\r\n","/* eslint-disable quotes */\r\nimport _ from 'underscore';\r\nimport ko from 'knockout';\r\nimport state from '@bingads-webui-component-legacy/state/index';\r\nimport InlineChartDropDownOption from '@bingads-webui-campaign-legacy/inline-chart/model/inlinechartdropdownoption';\r\nimport GranularityDropDownOption from '@bingads-webui-campaign-legacy/inline-chart/model/granularityDropdownOption';\r\nimport DataProvider from '@bingads-webui-campaign-legacy/inline-chart/chartdataprovider';\r\nimport PageContext from '@bingads-webui-static-legacy/page-context';\r\nimport CampaignState from '@bingads-webui-campaign-legacy/campaign-state/index';\r\nimport * as chartNameConverter from '@bingads-webui-campaign-legacy/inline-chart/chartnameconverter';\r\nimport { getInlineChartInfo, setInlineChartInfo } from '@bingads-webui-campaign-legacy/inline-chart/inline-chart-preferences';\r\nimport instrument from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport instrumentSetting from '@bingads-webui-static-legacy/instrumentation/campaignSchemaAndSetting';\r\nimport instrumentConsts from '@bingads-webui-static-legacy/instrumentation/constants';\r\nimport instrumentation from '@bingads-webui-static-legacy/instrumentation/instrumentation'; // eslint-disable-line\r\nimport $ from 'jquery';\r\nimport BluebirdPromise from 'bluebird';\r\nimport Highcharts from 'highcharts';\r\nimport Constants from '@bingads-webui-campaign-legacy/inline-chart/constants';\r\nimport * as allColors from '@bingads-webui-campaign-legacy/performance-graph/graph/color';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/inline-chart');\r\n\r\nexport default class InlineChartViewModel {\r\n constructor(options) {\r\n // chart context\r\n this.learnMoreLabel = i18n.get('LearnMoreLinkText');\r\n this.isUsingVnextGrid = options.isUsingVnextGrid;\r\n this.entityType = options.entityType;\r\n this.tab = options.tab;\r\n this.currentEntity = ko.observable(null);\r\n this.filter = ko.observable(null);\r\n this.period = ko.observable(null);\r\n this.granularity = ko.observable(null);\r\n this.isMovingAverageChecked = ko.observable(false);\r\n this.primaryMetricId = ko.observable(0);\r\n this.secondaryMetricId = ko.observable(0);\r\n this.parentLevels = ko.observable([]);\r\n this.project = 'CampaignUI';\r\n\r\n this.chartDataProvider = new DataProvider();\r\n this.showChart = ko.observable(true);\r\n this.chartTitle = ko.observable();\r\n this.isDataAvailable = ko.observable(false);\r\n this.noDataText = ko.observable(i18n.get('BI_Chart_NoData'));\r\n this.isComparisonDataMissing = ko.observable(false);\r\n this.comparisonDataMissingText = ko.observable(i18n.get('BI_Chart_Missing_ComparisonData'));\r\n this.showMovingAverageText = ko.observable(i18n.get('BI_Chart_Show_MovingAverage'));\r\n this.newFeatureLabel = ko.observable(i18n.get('New_Feature_Label'));\r\n this.isChartLoading = ko.observable(true);\r\n this.isGranularityShowing = ko.observable(true);\r\n this.xAxisStartValue = ko.observable(null);\r\n this.xAxisEndValue = ko.observable(null);\r\n this.comparedXAxisStartValue = ko.observable(null);\r\n this.comparedXAxisEndValue = ko.observable(null);\r\n this.hideToolbar = ko.observable(false);\r\n this.hideToggleIcon = ko.observable(false);\r\n this.isDataFetchingDone = false;\r\n\r\n if (this.isUsingVnextGrid) {\r\n state.getPromise('$daterange').then((result) => {\r\n this.period(result);\r\n });\r\n }\r\n\r\n this.isPopOn = ko.computed(() => {\r\n return this.period() ? this.period().compared != null : false;\r\n }, this);\r\n\r\n this.isMovingAverageVisible = ko.computed(() => {\r\n if (this.granularity() !== 'Day') {\r\n return false;\r\n }\r\n\r\n let startDate;\r\n let endDate;\r\n let daysBetween;\r\n let oneDayMillisecondFrame = 1000 * 60 * 60 * 24;\r\n\r\n if (this.isUsingVnextGrid) {\r\n startDate = this.period().start;\r\n endDate = this.period().end;\r\n } else if (window.App && window.App.views && window.App.views.Summary && window.App.views.Summary.dateFilter && window.App.views.Summary.dateFilter.ko_model && this.granularity() === 'Day') {\r\n startDate = window.App.views.Summary.dateFilter.ko_model.appliedRange().start;\r\n endDate = window.App.views.Summary.dateFilter.ko_model.appliedRange().end;\r\n }\r\n\r\n if (startDate && endDate) {\r\n daysBetween = Math.round((endDate - startDate) / oneDayMillisecondFrame);\r\n\r\n if (this.isPopOn() || daysBetween > 31) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n } else {\r\n return false;\r\n }\r\n }, this);\r\n\r\n this.isMovingAverageOn = ko.computed(() => {\r\n if (this.isMovingAverageVisible()) {\r\n return this.isMovingAverageChecked();\r\n } else {\r\n return false;\r\n }\r\n }, this);\r\n\r\n this.granularityOptions = ko.observable(null);\r\n this.granularityId = 0;\r\n\r\n this.primaryMetricOptions = ko.observable(null);\r\n this.secondaryMetricOptions = ko.observable(null);\r\n\r\n // cached chart data that's used to render chart for different metric\r\n this.cachedChartData = {};\r\n\r\n this._getChartDataWhenSubscribed(this.granularity);\r\n this._getChartDataWhenSubscribed(this.isMovingAverageOn);\r\n\r\n this.startDate = ko.computed(() => {\r\n return this.period() ? this.period().start : null;\r\n }, this);\r\n\r\n this.endDate = ko.computed(() => {\r\n return this.period() ? this.period().end : null;\r\n }, this);\r\n\r\n this.comparedStartDate = ko.computed(() => {\r\n return this.period() && this.period().compared ? this.period().compared.start : null;\r\n }, this);\r\n\r\n this.comparedEndDate = ko.computed(() => {\r\n return this.period() && this.period().compared ? this.period().compared.end : null;\r\n }, this);\r\n\r\n this.primaryData = ko.observableArray();\r\n this.secondaryData = ko.observableArray();\r\n this.selectedPrimaryCategory = ko.observable();\r\n this.selectedSecondaryCategory = ko.observable();\r\n\r\n this.maxDate = new Date(9999, 12, 31);\r\n\r\n this.needUpdateChart = false;\r\n this.chartUpdatingPromise = null;\r\n\r\n if (window.App && window.App.on) {\r\n window.App.on('log-validation-method', (method) => {\r\n instrument.logMessage(\r\n [instrumentConsts.LOGCATEGORY.TRACE],\r\n instrumentConsts.LOGLEVEL.INFO,\r\n 'inlineChartV2/validateFilter',\r\n `method called: ${method}`);\r\n });\r\n }\r\n\r\n this.queueAsync = BluebirdPromise.resolve();\r\n\r\n _.bindAll(this,\r\n 'onPrimaryMetricSelected',\r\n 'onSecondaryMetricSelected',\r\n 'onShowChartButtonClick',\r\n 'onMovingAverageClick',\r\n 'onGranularitySelected',\r\n 'reloadChartData',\r\n 'formatDate',\r\n 'calculatePercentageDiff',\r\n '_getQuarter',\r\n '_getChartDataWhenSubscribed',\r\n '_updateChart',\r\n '_getChartData',\r\n '_refreshAllCharts',\r\n '_setCategoryAndData',\r\n '_metricSelectedHandler',\r\n '_alignDataForComparison',\r\n '_getChartTitle',\r\n '_getChartDataForMetric',\r\n '_logChartData',\r\n '_validateFilter',\r\n '_logCurrentFilterInfo'\r\n );\r\n }\r\n\r\n onPrimaryMetricSelected(event) {\r\n const prefObj = {};\r\n\r\n this.primaryMetricId(event.id);\r\n this._metricSelectedHandler(this.primaryData, this.selectedPrimaryCategory, allColors.primary, event);\r\n\r\n prefObj[`${PageContext.CurrentTabId}-primaryMetric`] = this.selectedPrimaryCategory().id;\r\n if (setInlineChartInfo) {\r\n setInlineChartInfo(prefObj, this.project);\r\n }\r\n }\r\n\r\n onSecondaryMetricSelected(event) {\r\n const prefObj = {};\r\n\r\n this.secondaryMetricId(event.id);\r\n this._metricSelectedHandler(this.secondaryData, this.selectedSecondaryCategory, allColors.secondary, event);\r\n\r\n prefObj[`${PageContext.CurrentTabId}-secondaryMetric`] = this.selectedSecondaryCategory().id;\r\n if (setInlineChartInfo) {\r\n setInlineChartInfo(prefObj, this.project);\r\n }\r\n }\r\n\r\n onShowChartButtonClick() {\r\n const prefObj = {};\r\n\r\n this.showChart(!this.showChart());\r\n prefObj[`${PageContext.CurrentTabId}-showChart`] = this.showChart();\r\n\r\n if (setInlineChartInfo) {\r\n setInlineChartInfo(prefObj, this.project).then(() => {\r\n if (this.showChart()) {\r\n this.reloadChartData(this.filter(), this.currentEntity());\r\n }\r\n });\r\n }\r\n }\r\n\r\n onMovingAverageClick() {\r\n const prefObj = {};\r\n\r\n this.isMovingAverageChecked(!this.isMovingAverageChecked());\r\n prefObj[`${PageContext.CurrentTabId}-showMovingAverage`] = this.isMovingAverageChecked();\r\n\r\n if (setInlineChartInfo) {\r\n setInlineChartInfo(prefObj, this.project);\r\n }\r\n return true;\r\n }\r\n\r\n onGranularitySelected(event) {\r\n if (this.showChart()) {\r\n const prefObj = {};\r\n\r\n this.granularity(event.enumValue);\r\n this.granularityId = event.id;\r\n\r\n prefObj[`${PageContext.CurrentTabId}-granularity`] = event.enumValue;\r\n if (setInlineChartInfo) {\r\n setInlineChartInfo(prefObj, this.project);\r\n }\r\n }\r\n }\r\n\r\n // DateRange, Pop and Filter and other grid changes will trigger reloadChartData\r\n reloadChartData(filter, entity, forceRefresh) {\r\n this.parentLevels(this._getParentLevels());\r\n\r\n let filterObj = filter;\r\n let entityObj = entity || this.entityType || this._getDefaultEntityBaseOnParentLevels(this.parentLevels());\r\n\r\n this.forceRefresh = forceRefresh;\r\n\r\n // if entity is search term or auction insight, set entity to be empty for default and set filter to empty\r\n if (entityObj === Constants.SearchTermEntity || entityObj === Constants.AuctionInsightEntity || entityObj === Constants.AudiencesAssociationEntity) {\r\n entityObj = '';\r\n filterObj = {};\r\n }\r\n\r\n let filterUrlParam;\r\n\r\n // At line 291, filterUrlParam as a string may be set to this.filter\r\n // onShowChartButtonClick would get the string by calling this.filter() and pass it in the current function\r\n if (_.isString(filter)) {\r\n filterUrlParam = filter;\r\n } else {\r\n const filterString = filterObj && filterObj.odataV4 ? filterObj.odataV4({ ignoreCase: false }) : '';\r\n\r\n filterUrlParam = encodeURI(filterString ? `$filter=${filterString}` : '');\r\n }\r\n\r\n // When there is no filter applied, PerformanceTimeSerieis request for all entities(Adsgroup, Ads, Kewords)\r\n // needs to query on Campaign entity inorder to improve MT performance.\r\n // the PerformanceData fetched is for Account or Campaign based on the parent level.\r\n // We skip this optimization for AccountSummary and demographics tab as they need to use the\r\n // speicified entity.\r\n if (this.isUsingVnextGrid &&\r\n !filterUrlParam &&\r\n entityObj !== 'Accounts' &&\r\n entityObj !== 'CampaignCriterions' &&\r\n entityObj !== 'AdGroupCriterions') {\r\n // No filters set default base entity.\r\n entityObj = this._getDefaultEntityBaseOnParentLevels(this.parentLevels());\r\n }\r\n\r\n this.currentEntity(entityObj);\r\n\r\n // Handles filter and showChart\r\n this.filter(this.isUsingVnextGrid ? filterUrlParam : this._validateFilter(filterObj));\r\n if (getInlineChartInfo) {\r\n getInlineChartInfo().then((result) => {\r\n const prefObj = result ? result.inlineChartData : {};\r\n\r\n this.showChart(_.isUndefined(prefObj[`${PageContext.CurrentTabId}-showChart`]) ?\r\n true :\r\n prefObj[`${PageContext.CurrentTabId}-showChart`]);\r\n if (this.showChart()) {\r\n let func = () => {\r\n let flagUpdateChart = true;\r\n let p$granularityOptions = new GranularityDropDownOption({\r\n usingNewDatefilter: this.isUsingVnextGrid,\r\n });\r\n let dateRange = state.getPromise('$daterange');\r\n\r\n BluebirdPromise.all([p$granularityOptions, dateRange]).then((promiseResults) => {\r\n const granularityOptions = promiseResults[0];\r\n const dateRangeRes = promiseResults[1];\r\n\r\n this.chartTitle(this._getChartTitle());\r\n\r\n if (this.isUsingVnextGrid) {\r\n this.period(dateRangeRes);\r\n } else {\r\n // handle date range (including Pop)\r\n const dateRangeObj = {};\r\n\r\n if (window.App && window.App.views && window.App.views.Summary && window.App.views.Summary.dateFilter && window.App.views.Summary.dateFilter.ko_model) {\r\n dateRangeObj.start = window.App.views.Summary.dateFilter.ko_model.appliedRange().start;\r\n dateRangeObj.end = window.App.views.Summary.dateFilter.ko_model.appliedRange().end;\r\n dateRangeObj.compared = window.App.views.Summary.dateFilter.ko_model.appliedComparedRange();\r\n }\r\n this.period(dateRangeObj);\r\n }\r\n\r\n // Reload Pop\r\n // Recover original value from preference service\r\n const showMovingAverageInPref = prefObj[`${PageContext.CurrentTabId}-showMovingAverage`] || true;\r\n\r\n this.isMovingAverageChecked(showMovingAverageInPref !== null && showMovingAverageInPref !== '' ? showMovingAverageInPref === 'true' : false);\r\n\r\n // Reload granularity\r\n let granularityInPref = prefObj[`${PageContext.CurrentTabId}-granularity`] || 'Day';\r\n let granularityItemArray = $.grep(granularityOptions.data, (e) => {\r\n return !e.disabled && e.enumValue === granularityInPref;\r\n });\r\n let granularityItem = granularityItemArray[0];\r\n\r\n //Get available granularity based on date range\r\n let firstEnabledGranularity = 0;\r\n\r\n for (firstEnabledGranularity = 0; firstEnabledGranularity < granularityOptions.data.length; firstEnabledGranularity++) {\r\n if (granularityOptions.data[firstEnabledGranularity] && !granularityOptions.data[firstEnabledGranularity].disabled) {\r\n break;\r\n }\r\n }\r\n\r\n // if there's no supported granularity, show an error message\r\n if (firstEnabledGranularity >= granularityOptions.data.length) {\r\n this.isChartLoading(false);\r\n this.isDataAvailable(false);\r\n this.isGranularityShowing(false);\r\n\r\n flagUpdateChart = false;\r\n } else {\r\n this.granularity(granularityItem ? granularityItem.enumValue : granularityOptions.data[firstEnabledGranularity].enumValue);\r\n this.granularityId = granularityItem ? granularityItem.id : granularityOptions.data[firstEnabledGranularity].id;\r\n this.granularityOptions(granularityOptions.data);\r\n this.isGranularityShowing(true);\r\n\r\n flagUpdateChart = true;\r\n }\r\n\r\n // Reload metrics\r\n const metricOptions = new InlineChartDropDownOption().fetch();\r\n const primaryMetric = prefObj[`${PageContext.CurrentTabId}-primaryMetric`];\r\n const primaryIdInPref = _.isUndefined(primaryMetric) || _.isNull(primaryMetric) || !_.find(metricOptions.data, {id: primaryMetric}) ?\r\n Constants.ClickMetricId : primaryMetric;\r\n const secondaryMetric = prefObj[`${PageContext.CurrentTabId}-secondaryMetric`];\r\n const secondaryIdInPref = _.isUndefined(secondaryMetric) || _.isNull(secondaryMetric) || !_.find(metricOptions.data, {id: secondaryMetric}) ?\r\n Constants.NoneMetricId : secondaryMetric;\r\n\r\n if (!(_.isUndefined(primaryIdInPref) || _.isNull(primaryIdInPref))) {\r\n this.primaryMetricId(parseInt(primaryIdInPref));\r\n }\r\n if (!(_.isUndefined(secondaryIdInPref) || _.isNull(secondaryIdInPref))) {\r\n this.secondaryMetricId(parseInt(secondaryIdInPref));\r\n }\r\n\r\n const isAgeOrGenderTab = this.tab === \"Age\" || this.tab === \"Gender\";\r\n\r\n this.primaryMetricOptions(new InlineChartDropDownOption({filterOptionId: isAgeOrGenderTab ? [2] : []}).fetch());\r\n\r\n let secondaryMetricOptions = new InlineChartDropDownOption({filterOptionId: isAgeOrGenderTab ? [2] : []}).fetch();\r\n\r\n secondaryMetricOptions.data.unshift({ id: -1, value: i18n.get('InlineChart_Metric_None') });\r\n this.secondaryMetricOptions(secondaryMetricOptions);\r\n\r\n this.isMovingAverageChecked(!!prefObj[`${PageContext.CurrentTabId}-showMovingAverage`]);\r\n\r\n // Update chart\r\n if (flagUpdateChart) {\r\n return this._updateChart();\r\n } else {\r\n return null;\r\n }\r\n });\r\n };\r\n\r\n if (instrument.asLoggingStart) {\r\n return instrument.asLoggingStart(func, instrumentSetting.ACTIVITYNAME.InlineChartV2ReloadChart, instrumentSetting.SCENARIONAME.InlineChartV2ReloadChart)();\r\n } else {\r\n return func();\r\n }\r\n } else {\r\n return null;\r\n }\r\n });\r\n }\r\n }\r\n\r\n formatDate(timestamp) {\r\n if (timestamp) {\r\n switch (this.granularity()) {\r\n case 'Hour':\r\n return Highcharts.dateFormat('%H:%M %m/%d/%Y', timestamp);\r\n case 'Day':\r\n return Highcharts.dateFormat('%a %m/%d/%Y', timestamp);\r\n case 'Week':\r\n return `Week of ${Highcharts.dateFormat('%b %d, %Y', timestamp)}`;\r\n case 'Month':\r\n return Highcharts.dateFormat('%b %Y', timestamp);\r\n case 'Quarter':\r\n return `Q${this._getQuarter(new Date(timestamp))} ${Highcharts.dateFormat('%Y', timestamp)}`;\r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n return '';\r\n }\r\n\r\n calculatePercentageDiff(selectedCategory) {\r\n if (selectedCategory && selectedCategory.id === -1) {\r\n return '';\r\n }\r\n let metricData = this.cachedChartData[selectedCategory.id];\r\n let primarySum = 0;\r\n let comparisonSum = 0;\r\n let primaryAvg = 0;\r\n let comparisonAvg = 0;\r\n let value = 0;\r\n\r\n _.each(metricData.PrimaryData, (dataObj) => {\r\n if (dataObj) {\r\n primarySum = primarySum + dataObj[1];\r\n }\r\n });\r\n _.each(metricData.ComparisonData, (dataObj) => {\r\n if (dataObj) {\r\n comparisonSum = comparisonSum + dataObj[1];\r\n }\r\n });\r\n\r\n if (metricData.PrimaryData && metricData.ComparisonData) {\r\n primaryAvg = primarySum / metricData.PrimaryData.length;\r\n comparisonAvg = comparisonSum / metricData.ComparisonData.length;\r\n let avgDiff = Math.round((primaryAvg - comparisonAvg) * 100 / comparisonAvg);\r\n\r\n value = _.isNaN(avgDiff) ? 'infinity' : avgDiff;\r\n }\r\n\r\n return value === 'infinity' || value >= 0 ? ` (+${value}%)` : ` (${value}%)`;\r\n }\r\n\r\n _getQuarter(dateObj) {\r\n if (dateObj) {\r\n switch (dateObj.getUTCMonth()) {\r\n case 0:\r\n case 1:\r\n case 2:\r\n return 1;\r\n case 3:\r\n case 4:\r\n case 5:\r\n return 2;\r\n case 6:\r\n case 7:\r\n case 8:\r\n return 3;\r\n case 9:\r\n case 10:\r\n case 11:\r\n return 4;\r\n default:\r\n return -1;\r\n }\r\n }\r\n\r\n return -1;\r\n }\r\n\r\n _getChartDataWhenSubscribed(event) {\r\n event.subscribe(() => {\r\n let func = () => {\r\n return this._updateChart();\r\n };\r\n\r\n if (instrument.asLoggingStart) {\r\n return instrument.asLoggingStart(func, instrumentSetting.ACTIVITYNAME.InlineChartV2ReloadChart, instrumentSetting.SCENARIONAME.InlineChartV2ReloadChart)();\r\n } else {\r\n return func();\r\n }\r\n });\r\n }\r\n\r\n // validate the filter\r\n // right now only verify the case when filter value is undefined\r\n _validateFilter(filter) {\r\n if (!filter) {\r\n return filter;\r\n }\r\n\r\n _.each(filter, (obj) => {\r\n // validate the value. exclude the 'undefined' value\r\n if (obj.Values && obj.Values.length > 0) {\r\n let values = [];\r\n\r\n _.each(obj.Values, (value) => {\r\n if (value !== undefined) {\r\n values.push(value);\r\n } else if (instrument.logMessage) {\r\n instrument.logMessage(\r\n [instrumentConsts.LOGCATEGORY.TRACE],\r\n instrumentConsts.LOGLEVEL.INFO,\r\n 'inlineChartV2/validateFilter',\r\n `undefined filter value detected. filter: ${JSON.stringify(filter)}`);\r\n }\r\n });\r\n\r\n obj.Values = values;\r\n }\r\n\r\n // exclude this filter since there's no filter value\r\n if (obj.Values && obj.Values.length === 0) {\r\n return;\r\n }\r\n });\r\n\r\n return filter;\r\n }\r\n\r\n _updateChart() {\r\n this.isDataFetchingDone = false;\r\n\r\n // Clean old data before fetching the new data\r\n this.primaryData([]);\r\n this.secondaryData([]);\r\n\r\n this.needUpdateChart = true;\r\n\r\n this.chartUpdatingPromise = this.queueAsync.then(() => {\r\n if (!this.needUpdateChart) {\r\n return;\r\n }\r\n\r\n this.needUpdateChart = false;\r\n\r\n // Prepare chart context\r\n let chartContext = {\r\n currentEntity: this.currentEntity(),\r\n parentLevels: this.parentLevels(),\r\n filter: this.filter,\r\n period: this.period,\r\n granularity: this.granularity,\r\n isMovingAverageOn: this.isMovingAverageOn,\r\n refreshGridData: this.forceRefresh,\r\n };\r\n\r\n // Note: temporary log added for analyzing filter expression mismatching issue.\r\n if (instrument.logMessage) {\r\n instrument.logMessage([instrumentConsts.LOGCATEGORY.TRACE],\r\n instrumentConsts.LOGLEVEL.INFO,\r\n 'inlineChartV2/updateChartWithFilterASync',\r\n `{ \"entity\" : \"${chartContext.currentEntity}\", \"filter\" : \"${JSON.stringify(chartContext.filter())}\" }`);\r\n }\r\n\r\n // Fetch data\r\n this._getChartData(chartContext, 'All').then((result) => {\r\n this.isDataFetchingDone = true;\r\n\r\n this.isDataAvailable(result && result[0] && result[0].PrimaryData && result[0].PrimaryData.length !== 0);\r\n this.isComparisonDataMissing(!(result && result[0] && result[0].ComparisonData && result[0].ComparisonData.length !== 0));\r\n this.noDataText(i18n.get('BI_Chart_NoData'));\r\n\r\n if (this.isDataAvailable()) {\r\n let xAxisStartDate = result[0].PrimaryData[0][0];\r\n let xAxisEndDate = result[0].PrimaryData[result[0].PrimaryData.length - 1][0];\r\n\r\n this.xAxisStartValue(this.formatDate(xAxisStartDate));\r\n this.xAxisEndValue(this.formatDate(xAxisEndDate));\r\n if (this.isComparisonDataMissing()) {\r\n this.comparedXAxisStartValue(null);\r\n this.comparedXAxisEndValue(null);\r\n } else {\r\n this.comparedXAxisStartValue(this.formatDate(this.comparedStartDate()));\r\n this.comparedXAxisEndValue(this.formatDate(this.comparedEndDate()));\r\n }\r\n } else {\r\n this.xAxisStartValue(null);\r\n this.xAxisEndValue(null);\r\n this.comparedXAxisStartValue(null);\r\n this.comparedXAxisEndValue(null);\r\n }\r\n\r\n //massage data to align charts if number of data points are different in case of pop or moving average\r\n if (this.isPopOn()) {\r\n this._alignDataForComparison(result);\r\n }\r\n\r\n // cache the result\r\n this.cachedChartData = result;\r\n this._refreshAllCharts(result);\r\n\r\n this._logChartData();\r\n }).then(() => {\r\n // loading succeeded\r\n this.isChartLoading(false);\r\n this.noDataText(i18n.get('BI_Chart_NoData'));\r\n if (instrument.endActivity) {\r\n instrument.endActivity(instrumentSetting.ACTIVITYNAME.InlineChartV2ReloadChart);\r\n }\r\n }, (err) => {\r\n const errorCode = _.result(_.first(_.result(err, 'errors')), 'Code');\r\n\r\n // loading failed\r\n this.isChartLoading(false);\r\n this.noDataText(i18n.get(`BI_Chart_Error_${errorCode}`) || i18n.get('BI_Chart_Error'));\r\n this.isDataAvailable(false);\r\n this.xAxisStartValue(null);\r\n this.xAxisEndValue(null);\r\n this.comparedXAxisStartValue(null);\r\n this.comparedXAxisEndValue(null);\r\n\r\n if (instrument.endActivity) {\r\n instrument.endActivity(instrumentSetting.ACTIVITYNAME.InlineChartV2ReloadChart, false);\r\n }\r\n throw err;\r\n });\r\n });\r\n\r\n return this.chartUpdatingPromise;\r\n }\r\n\r\n _getChartData(context, metric) {\r\n this.isChartLoading(true);\r\n\r\n return this.chartDataProvider.fetchData(context, metric);\r\n }\r\n\r\n _refreshAllCharts(chartData) {\r\n this._setCategoryAndData(chartData, this.selectedPrimaryCategory(), allColors.primary, this.primaryData);\r\n this._setCategoryAndData(chartData, this.selectedSecondaryCategory(), allColors.secondary, this.secondaryData);\r\n }\r\n\r\n _setCategoryAndData(chartData, selectedCategory, colors, data) {\r\n if (selectedCategory && selectedCategory.id !== -1) {\r\n let currentData = chartData[selectedCategory.id];\r\n let primaryData = {\r\n data: currentData.PrimaryData,\r\n };\r\n let comparisonData = {\r\n data: currentData.ComparisonData,\r\n };\r\n let rtnData = [];\r\n\r\n if (primaryData && primaryData.data) {\r\n primaryData.category = selectedCategory.id;\r\n primaryData.name = chartNameConverter.getMetricLocalizedNameForOdata(selectedCategory.id);\r\n primaryData.color = colors.original;\r\n rtnData.push(primaryData);\r\n }\r\n\r\n if (comparisonData && comparisonData.data) {\r\n comparisonData.category = selectedCategory.id;\r\n comparisonData.name = chartNameConverter.getMetricLocalizedNameForOdata(selectedCategory.id);\r\n comparisonData.xAxis = 1;\r\n comparisonData.color = colors.comparative;\r\n rtnData.push(comparisonData);\r\n }\r\n\r\n if (colors === allColors.secondary && selectedCategory.id !== -1) {\r\n primaryData.yAxis = 1;\r\n comparisonData.yAxis = 1;\r\n }\r\n\r\n data(rtnData);\r\n }\r\n }\r\n\r\n _metricSelectedHandler(dataObservable, categoryObservable, colors, metric) {\r\n if (metric.id === '-1') {\r\n this.dataObservable([]);\r\n } else {\r\n categoryObservable(metric);\r\n let currentData = this._getChartDataForMetric(metric.id, colors.original);\r\n let primaryData = {\r\n data: currentData.length > 0 ? currentData[0].PrimaryData : null,\r\n };\r\n let comparisonData = {\r\n data: currentData.length > 0 ? currentData[0].ComparisonData : null,\r\n };\r\n let rtnData = [];\r\n\r\n if (primaryData && primaryData.data) {\r\n primaryData.category = metric.id;\r\n primaryData.name = chartNameConverter.getMetricLocalizedNameForOdata(metric.id);\r\n primaryData.color = colors.original;\r\n rtnData.push(primaryData);\r\n }\r\n\r\n if (comparisonData && comparisonData.data) {\r\n comparisonData.name = chartNameConverter.getMetricLocalizedNameForOdata(metric.id);\r\n comparisonData.category = metric.id;\r\n comparisonData.xAxis = 1;\r\n comparisonData.color = colors.comparative;\r\n rtnData.push(comparisonData);\r\n }\r\n\r\n if (colors === allColors.secondary && categoryObservable().id !== -1) {\r\n primaryData.yAxis = 1;\r\n comparisonData.yAxis = 1;\r\n }\r\n\r\n dataObservable(rtnData);\r\n }\r\n this._logChartData();\r\n }\r\n\r\n _alignDataForComparison(dataSet) {\r\n let keys = Object.keys(dataSet);\r\n\r\n _.each(keys, (key) => {\r\n let metricData = dataSet[key];\r\n\r\n if (metricData.PrimaryData && metricData.ComparisonData && metricData.PrimaryData.length !== metricData.ComparisonData.length) {\r\n let shortermetricData = metricData.PrimaryData.length > metricData.ComparisonData.length ? metricData.ComparisonData : metricData.PrimaryData;\r\n let longermetricData = metricData.PrimaryData.length < metricData.ComparisonData.length ? metricData.ComparisonData : metricData.PrimaryData;\r\n let diff = Math.abs(metricData.PrimaryData.length - metricData.ComparisonData.length);\r\n\r\n for (let i = 0; i < diff; i++) {\r\n let diff1 = longermetricData[shortermetricData.length][0] - longermetricData[shortermetricData.length - 1][0];\r\n let dayAfter = shortermetricData[shortermetricData.length - 1][0] + diff1;\r\n\r\n shortermetricData.push([dayAfter, null]);\r\n }\r\n }\r\n\r\n // Current Mt returns last day of month, instead of first day of month.\r\n // Because last day of month\r\n if (this.granularity() === 'Month' || this.granularity() === 'Quarter' ) {\r\n let dayInMillisec = 60 * 60 * 24 * 1000;\r\n\r\n for (let i = 0; i < metricData.PrimaryData.length - 1; i++) {\r\n let primaryDataDateDiff = (metricData.PrimaryData[i + 1][0] - metricData.PrimaryData[i][0]) / dayInMillisec;\r\n let comparisonDataDateDiff = (metricData.ComparisonData[i + 1][0] - metricData.ComparisonData[i][0]) / dayInMillisec;\r\n\r\n if (comparisonDataDateDiff > primaryDataDateDiff) {\r\n metricData.PrimaryData[i + 1][0] += dayInMillisec;\r\n } else if (comparisonDataDateDiff < primaryDataDateDiff) {\r\n metricData.ComparisonData[i + 1][0] += dayInMillisec;\r\n }\r\n }\r\n }\r\n });\r\n }\r\n\r\n _getChartTitle() {\r\n let currentLevel = CampaignState.currentLevel;\r\n\r\n if (currentLevel === 'Account') {\r\n return i18n.get('BI_Chart_AccountLevel');\r\n } else if (currentLevel === 'Campaign') {\r\n return i18n.get('BI_Chart_CampaignLevel');\r\n } else {\r\n return i18n.get('BI_Chart_AdGroupLevel');\r\n }\r\n }\r\n\r\n _getChartDataForMetric(metricId, colorRGB) {\r\n if (this.cachedChartData && this.cachedChartData[metricId]) {\r\n let result = this.cachedChartData[metricId];\r\n\r\n result.category = metricId;\r\n result.color = colorRGB;\r\n\r\n return [result];\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n _getParentLevels() {\r\n let currentCampaign = PageContext.CurrentCampaign;\r\n let currentAdGroup = PageContext.CurrentAdGroup;\r\n let parentLevels = [];\r\n\r\n if (currentCampaign) {\r\n parentLevels.push({name: Constants.CampaignEdmEntity, id: currentCampaign.Id});\r\n }\r\n if (currentAdGroup) {\r\n parentLevels.push({name: Constants.AdGroupEdmEntity, id: currentAdGroup.Id});\r\n }\r\n\r\n return parentLevels;\r\n }\r\n\r\n _getDefaultEntityBaseOnParentLevels(parentLevels) {\r\n let entity = Constants.CampaignEntity;\r\n\r\n if (parentLevels && parentLevels.constructor === Array && parentLevels.length > 0) {\r\n if (parentLevels[parentLevels.length - 1].name === Constants.AdGroupEdmEntity) {\r\n entity = Constants.AdEntity;\r\n } else if (parentLevels[parentLevels.length - 1].name === Constants.CampaignEdmEntity) {\r\n entity = Constants.AdGroupEntity;\r\n }\r\n }\r\n\r\n return entity;\r\n }\r\n\r\n _logChartData() {\r\n if (instrument.logMessage) {\r\n if (this.isUsingVnextGrid) {\r\n instrument.logMessage(\r\n [instrumentConsts.LOGCATEGORY.TRACE],\r\n instrumentConsts.LOGLEVEL.INFO,\r\n 'inlineChartV2/updateChart',\r\n `{ \"entity\": \"${this.currentEntity()}\", \"metric1\": \"${this.primaryData().length > 0 ? this.primaryData()[0].name : ''}\", \"metric2\": \"${this.secondaryData().length > 0 ? this.secondaryData()[0].name : ''}\", \"dateRange\": \"${state.get('$daterange').text}\", \"pop\": \"${state.get('$daterange').compared ? state.get('$daterange').compared.text : ''}\", \"movingAverage\": \"${this.isMovingAverageOn()}\" }`);\r\n } else {\r\n instrument.logMessage(\r\n [instrumentConsts.LOGCATEGORY.TRACE],\r\n instrumentConsts.LOGLEVEL.INFO,\r\n 'inlineChartV2/updateChart',\r\n `{ \"entity\": \"${this.currentEntity()}\", \"metric1\": \"${this.primaryData().length > 0 ? this.primaryData()[0].name : ''}\", \"metric2\": \"${this.secondaryData().length > 0 ? this.secondaryData()[0].name : ''}\", \"dateRange\": \"${window.App.views.Summary.dateFilter.ko_model.appliedRange().key}\", \"pop\": \"${window.App.views.Summary.dateFilter.ko_model.appliedComparedRange() ? window.App.views.Summary.dateFilter.ko_model.appliedComparedRange().key : ''}\", \"movingAverage\": \"${this.isMovingAverageOn()}\" }`);\r\n }\r\n }\r\n }\r\n\r\n _logCurrentFilterInfo(filterObj) {\r\n if (instrument.logMessage) {\r\n instrument.logMessage(\r\n [instrumentConsts.LOGCATEGORY.TRACE],\r\n instrumentConsts.LOGLEVEL.INFO,\r\n 'inlineChartV2/wrongFilterSelected',\r\n `{ \"customerId\": \"${PageContext.CurrentCustomer.Id}\", \"accountId\": \"${PageContext.CurrentAccount.Id}\", \"currentTab\": \"${PageContext.CurrentTabId}\", \"filter\": \"${JSON.stringify(filterObj)}\" }`);\r\n }\r\n }\r\n}\r\n/* eslint-enable quotes */\r\n","\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/inline-chart');\r\n\r\nexport default function numericSymbolFormatter(tickValue, tickInterval, numberFormatter, decimalPoint, thousandsSeparator) {\r\n let sign = tickValue < 0 ? '-' : '';\r\n let formattedNumber = `${tickValue}`;\r\n\r\n let absTickValue = Math.abs(tickValue);\r\n let absTickInterval = Math.abs(tickInterval);\r\n\r\n let numericSymbolKeys = [{\r\n val: 1e12,\r\n key: 'InlineChart_NumericalAbbreviation_Trillion',\r\n }, {\r\n val: 1e9,\r\n key: 'InlineChart_NumericalAbbreviation_Billion',\r\n }, {\r\n val: 1e6,\r\n key: 'InlineChart_NumericalAbbreviation_Million',\r\n }, {\r\n val: 1e3,\r\n key: 'InlineChart_NumericalAbbreviation_Thousand',\r\n }];\r\n\r\n if (absTickInterval >= 1000) {\r\n //when tick interval is >= 1000, treat all y-axis values as whole numbers\r\n for (let i = 0; i < numericSymbolKeys.length; ++i) {\r\n if (absTickInterval >= numericSymbolKeys[i].val ) {\r\n formattedNumber = `${sign}${numberFormatter( absTickValue / numericSymbolKeys[i].val, 0, decimalPoint, thousandsSeparator)}${i18n.get(numericSymbolKeys[i].key)}`;\r\n break;\r\n }\r\n }\r\n } else if (Math.floor(absTickValue) === absTickValue) {\r\n //integer value < 1000, render as whole number without any decimals\r\n formattedNumber = `${sign}${numberFormatter(absTickValue, 0, decimalPoint, thousandsSeparator)}`;\r\n } else {\r\n let absTickValueStr = `${absTickValue}`;\r\n //here we relay on the fact that if we don't change the precision of floating point in javascript,\r\n //javascript engine will format a floating number appropriately. That is,\r\n //String(1.01) should output '1.01', instead of something like '1.010000000000000000000002'\r\n\r\n let dotIdx = absTickValueStr.indexOf('.');\r\n let isOneDecimalValue = dotIdx > 0 && dotIdx === absTickValueStr.length - 2;\r\n\r\n if (isOneDecimalValue) {\r\n // one decimal value, such as 1.2, 0.5, render with one decimal\r\n formattedNumber = `${sign}${numberFormatter(absTickValue, 1, decimalPoint, thousandsSeparator)}`;\r\n } else {\r\n // two decimal value, render with two decimals\r\n formattedNumber = `${sign}${numberFormatter(absTickValue, 2, decimalPoint, thousandsSeparator)}`;\r\n }\r\n }\r\n\r\n return formattedNumber;\r\n}\r\n","/* eslint-disable newline-after-var */\r\nimport _ from 'underscore';\r\nimport $ from 'jquery';\r\nimport Backbone from 'backbone';\r\nimport Highcharts from 'highcharts';\r\nimport PageContext from '@bingads-webui-static-legacy/page-context';\r\nimport ko from 'knockout';\r\nimport state from '@bingads-webui-component-legacy/state/index';\r\nimport inlineChartTemplate from '@bingads-webui-campaign-legacy/inline-chart/template/inlinechart.pug';\r\nimport DropdownView from '@bingads-webui-component-legacy/dropdown/dropdownview';\r\nimport ChartView from '@bingads-webui-component-legacy/chart/chartview';\r\nimport InlineChartViewModel from '@bingads-webui-campaign-legacy/inline-chart/viewmodel/inlinechartviewmodel';\r\nimport BluebirdPromise from 'bluebird';\r\nimport numericSymbolFormatter from '@bingads-webui-campaign-legacy/inline-chart/numericsymbolformatter';\r\nimport Constants from '@bingads-webui-campaign-legacy/inline-chart/constants';\r\nimport instrument from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport instrumentConsts from '@bingads-webui-static-legacy/instrumentation/constants';\r\nimport * as allColors from '@bingads-webui-campaign-legacy/performance-graph/graph/color';\r\nconst legacy$ = $;\r\nexport default class InlineChartView extends Backbone.View {\r\n constructor(options = {}) {\r\n super(options);\r\n\r\n _.bindAll(this,\r\n 'initialize',\r\n 'render',\r\n '_onGridPageLoading',\r\n '_onGridPageLoadingNewGrid',\r\n '_onShowChartChanged',\r\n '_onGranularityOptionsChanged',\r\n '_onPrimaryMetricOptionsChanged',\r\n '_onSecondaryMetricOptionsChanged',\r\n '_onPrimaryDataChanged',\r\n '_onSecondaryDataChanged',\r\n '_onTabChange',\r\n '_toggleOldNewInlineChart',\r\n '_showNewChartOnCurrentTab',\r\n '_showOldChartOnCurrentTab',\r\n '_toggleToolbar',\r\n '_insertToolBarIfNeeded',\r\n '_updateMetricDropdownDiff',\r\n '_round',\r\n '_numberWithCommas',\r\n '_redrawChart'\r\n );\r\n\r\n this.needRedraw = false;\r\n\r\n this.queueAsync = BluebirdPromise.resolve();\r\n\r\n // Create view model\r\n this.inlineChartViewModel = new InlineChartViewModel({\r\n isUsingVnextGrid: options.isUsingVnextGrid,\r\n entityType: options.entityType,\r\n tab: options.tab,\r\n });\r\n\r\n // hookup with view model property changed events\r\n this.inlineChartViewModel.showChart.subscribe(this._onShowChartChanged);\r\n this.inlineChartViewModel.granularityOptions.subscribe(this._onGranularityOptionsChanged);\r\n this.inlineChartViewModel.primaryMetricOptions.subscribe(this._onPrimaryMetricOptionsChanged);\r\n this.inlineChartViewModel.secondaryMetricOptions.subscribe(this._onSecondaryMetricOptionsChanged);\r\n this.inlineChartViewModel.primaryData.subscribe(this._onPrimaryDataChanged);\r\n this.inlineChartViewModel.secondaryData.subscribe(this._onSecondaryDataChanged);\r\n\r\n this.onGridPageLoadingHandler = (e, args) => {\r\n this._onGridPageLoading(e, args);\r\n };\r\n\r\n this.onTabChangeHandler = () => {\r\n this._onTabChange();\r\n };\r\n\r\n legacy$(document).on('grid-page-loading', this.onGridPageLoadingHandler);\r\n\r\n legacy$(document).on('onSummaryPageTabChange', this.onTabChangeHandler);\r\n\r\n this.render(options);\r\n }\r\n\r\n render() {\r\n if (this.$el.length) {\r\n this.$el.html(inlineChartTemplate());\r\n\r\n ko.applyBindings(this.inlineChartViewModel, this.$el[0]);\r\n\r\n this._toggleOldNewInlineChart();\r\n\r\n this._insertToolBarIfNeeded();\r\n\r\n if (this.options.isUsingVnextGrid) {\r\n if (this.options.tab !== 'campaign') {\r\n this._onGridPageLoadingNewGrid(this.options.filter);\r\n }\r\n } else if (legacy$.triggeredGridPageLoading) {\r\n // the 'grid-page-loading' event has been triggered before bind\r\n this._onGridPageLoading(null, legacy$.triggeredGridPageLoading);\r\n }\r\n\r\n let resizeWidth = () => {\r\n // make the chart area the same width as the title area which contains the POP control\r\n let pageTitle = $('.campaignContentContainer section.page-title');\r\n\r\n if (pageTitle && pageTitle.length > 0) {\r\n // make the chart area the same width as the title area which contains the POP control\r\n let chartContainer = this.$('.chart-container');\r\n\r\n // Since pageTitle can have negative margin, border or padding,\r\n // chartContainer's width should be set accordingly.\r\n let pageTitleInclusiveWidth = pageTitle.width() +\r\n parseFloat(pageTitle.css('marginLeft')) +\r\n parseFloat(pageTitle.css('marginRight')) +\r\n parseFloat(pageTitle.css('paddingLeft')) +\r\n parseFloat(pageTitle.css('paddingRight')) +\r\n parseFloat(pageTitle.css('border-left-width')) +\r\n parseFloat(pageTitle.css('border-right-width'));\r\n\r\n if (chartContainer && chartContainer.length > 0) {\r\n chartContainer.width(pageTitleInclusiveWidth);\r\n }\r\n\r\n let highChartContainer = this.$('#highcharts-container');\r\n\r\n let chartConainerWidthDifference = 60;\r\n\r\n if (highChartContainer && highChartContainer.length > 0) {\r\n // highchart container has to be smaller because it has some left margin\r\n highChartContainer.width(pageTitleInclusiveWidth - chartConainerWidthDifference);\r\n }\r\n }\r\n };\r\n\r\n $(window).on('resize', resizeWidth);\r\n $(window).triggerHandler('resize');\r\n }\r\n }\r\n\r\n _onGridPageLoading(e, args) {\r\n if (this._showNewChartOnCurrentTab() &&\r\n (!(args.commandType === 'Paging' || args.commandType === 'Sorting') ||\r\n args.grid.RefreshGridData)) {\r\n // handle filter\r\n let filterObj;\r\n let filterEntity = '';\r\n\r\n if (args.filter && args.filter.length) {\r\n if (instrument.logMessage) {\r\n instrument.logMessage(\r\n [instrumentConsts.LOGCATEGORY.TRACE],\r\n instrumentConsts.LOGLEVEL.INFO,\r\n 'inlineChartV2/filterPassedIn',\r\n `{ \"filter\" : \"${args.filter[0].Value}\" }`);\r\n }\r\n\r\n filterObj = JSON.parse(args.filter[0].Value);\r\n filterEntity = args.filter[0].Entity;\r\n }\r\n\r\n this.inlineChartViewModel.reloadChartData(filterObj ? filterObj.FilterExpressions : {}, filterEntity || this.options.entityType, args.RefreshGridData);\r\n }\r\n }\r\n\r\n _onGridPageLoadingNewGrid(filters) {\r\n state.getPromise('$daterange')\r\n .then((daterange) => {\r\n this.inlineChartViewModel.period(daterange);\r\n this.inlineChartViewModel.reloadChartData(filters);\r\n });\r\n }\r\n\r\n _onShowChartChanged() {\r\n // manually toggle the global toolbar when toggling the chart area\r\n if (this.inlineChartViewModel.showChart()) {\r\n this.$('.btn-toolbar > .grid-groupmenu-container').show();\r\n this.$('.btn-toolbar > .grid-custommenu-container').show();\r\n } else {\r\n this.$('.btn-toolbar > .grid-groupmenu-container').hide();\r\n this.$('.btn-toolbar > .grid-custommenu-container').hide();\r\n }\r\n }\r\n\r\n _onGranularityOptionsChanged() {\r\n ko.cleanNode(this.$('#granularity-dropdown')[0]);\r\n this.granularityDropdown = new DropdownView({\r\n el: this.$('#granularity-dropdown').first(),\r\n defaultOption: this.inlineChartViewModel.granularityId,\r\n dropDownOptions: this.inlineChartViewModel.granularityOptions(),\r\n onDropDownChanged: this.inlineChartViewModel.onGranularitySelected,\r\n });\r\n }\r\n\r\n _onPrimaryMetricOptionsChanged() {\r\n ko.cleanNode(this.$('#main-primary-dropdown')[0]);\r\n\r\n this.primaryMetricDropdown = new DropdownView({\r\n el: this.$('#main-primary-dropdown').first(),\r\n dropDownOptions: this.inlineChartViewModel.primaryMetricOptions().data,\r\n defaultOption: this.inlineChartViewModel.primaryMetricId(),\r\n onDropDownChanged: this.inlineChartViewModel.onPrimaryMetricSelected,\r\n onPopEnabled: this.inlineChartViewModel.calculatePercentageDiff,\r\n });\r\n }\r\n\r\n _onSecondaryMetricOptionsChanged() {\r\n ko.cleanNode(this.$('#main-secondary-dropdown')[0]);\r\n\r\n this.secondaryMetricDropdown = new DropdownView({\r\n el: this.$('#main-secondary-dropdown').first(),\r\n dropDownOptions: this.inlineChartViewModel.secondaryMetricOptions().data,\r\n defaultOption: this.inlineChartViewModel.secondaryMetricId(),\r\n onDropDownChanged: this.inlineChartViewModel.onSecondaryMetricSelected,\r\n onPopEnabled: this.inlineChartViewModel.calculatePercentageDiff,\r\n });\r\n }\r\n\r\n _onPrimaryDataChanged() {\r\n this._redrawChart();\r\n }\r\n\r\n _onSecondaryDataChanged() {\r\n this._redrawChart();\r\n }\r\n\r\n _isDataFetchingDone() {\r\n return this.inlineChartViewModel.isDataFetchingDone;\r\n }\r\n\r\n _redrawChart() {\r\n // There are multiple events which can trigger chart redrawing (primaryData and secondaryData changed),\r\n // to avoid the chart being redrawn multiple times frequently, we defer the redrawing to the next\r\n // execution cycle so that we redraw the view after all events are triggered.\r\n this.needRedraw = true;\r\n\r\n this.queueAsync.then(() => {\r\n if (!this._isDataFetchingDone()) {\r\n // Data is not ready yet, skip redraw\r\n return;\r\n }\r\n\r\n if (!this.needRedraw) {\r\n // The view has been redrawn already, skip redraw\r\n return;\r\n }\r\n\r\n this.needRedraw = false;\r\n\r\n // Bump up chart-iteration every time the chart is redrawn\r\n let chartIteration = parseInt(this.$('.chart-container').attr('chart-iteration'));\r\n\r\n let chartRedrawMarker = instrument.logActivityDurationMarker(\r\n `InlineChart.Redraw.Iteration-${chartIteration}`\r\n );\r\n\r\n this.$('.chart-container').attr('chart-iteration', chartIteration + 1);\r\n\r\n let self = this;\r\n new ChartView({\r\n el: this.$('#highcharts-container')[0],\r\n showWeekend: this.granularityDropdown.koModel.selectedItem().enumValue === 'Day',\r\n highchartsOptions: {\r\n series: this.inlineChartViewModel.primaryData().concat(this.inlineChartViewModel.secondaryData()),\r\n tooltip: {\r\n formatter() {\r\n let primaryPoints = [];\r\n let comparisonPoints = [];\r\n let tempHtml = '';\r\n\r\n _.each(this.points, (point) => {\r\n switch (point.color) {\r\n case allColors.primary.original:\r\n primaryPoints.push(point);\r\n break;\r\n case allColors.primary.comparative:\r\n comparisonPoints.push(point);\r\n break;\r\n case allColors.secondary.original:\r\n primaryPoints.push(point);\r\n break;\r\n case allColors.secondary.comparative:\r\n comparisonPoints.push(point);\r\n break;\r\n default:\r\n break;\r\n }\r\n });\r\n\r\n if (primaryPoints.length > 0) {\r\n tempHtml = `
${self.inlineChartViewModel.formatDate(this.x)}`;\r\n _.each(primaryPoints, (point) => {\r\n tempHtml = `${tempHtml}
${point.series.name}: ${self._numberWithCommas(self._round(point.y), point.series.name)}${self._isPercentNeeded(point) ? '%' : ''}`;\r\n });\r\n }\r\n\r\n if (comparisonPoints.length > 0) {\r\n tempHtml = self.inlineChartViewModel.isMovingAverageOn() ?\r\n `${tempHtml}
Moving average` :\r\n `${tempHtml}
${self.inlineChartViewModel.formatDate(comparisonPoints[0].x)}`;\r\n _.each(comparisonPoints, (point) => {\r\n tempHtml = `${tempHtml}
${point.series.name}: ${self._numberWithCommas(self._round(point.y), point.series.name)}${self._isPercentNeeded(point) ? '%' : ''}`;\r\n });\r\n }\r\n\r\n return tempHtml;\r\n },\r\n },\r\n yAxis: [{\r\n labels: {\r\n formatter() {\r\n let tickInterval = this.axis.tickInterval;\r\n let decimalPoint = Highcharts.getOptions().lang.decimalPoint;\r\n let thousandsSeparator = ',';\r\n\r\n if ( self.inlineChartViewModel.selectedPrimaryCategory() && self.inlineChartViewModel.selectedPrimaryCategory().id === 4 ) {\r\n return `${numericSymbolFormatter(this.value, tickInterval, Highcharts.numberFormat, decimalPoint, thousandsSeparator)}%`;\r\n }\r\n return `${numericSymbolFormatter(this.value, tickInterval, Highcharts.numberFormat, decimalPoint, thousandsSeparator)}`;\r\n },\r\n },\r\n }, {\r\n labels: {\r\n formatter() {\r\n let tickInterval = this.axis.tickInterval;\r\n let decimalPoint = Highcharts.getOptions().lang.decimalPoint;\r\n let thousandsSeparator = ',';\r\n\r\n if ( self.inlineChartViewModel.selectedSecondaryCategory() && self.inlineChartViewModel.selectedSecondaryCategory().id === 4 ) {\r\n return `${numericSymbolFormatter(this.value, tickInterval, Highcharts.numberFormat, decimalPoint, thousandsSeparator)}%`;\r\n }\r\n return `${numericSymbolFormatter(this.value, tickInterval, Highcharts.numberFormat, decimalPoint, thousandsSeparator)}`;\r\n },\r\n },\r\n }],\r\n },\r\n }).render();\r\n\r\n this._updateMetricDropdownDiff();\r\n\r\n chartRedrawMarker.markEnd();\r\n });\r\n }\r\n\r\n _onTabChange() {\r\n this._toggleOldNewInlineChart();\r\n }\r\n\r\n _isPercentNeeded(point) {\r\n if ((point.color === allColors.primary.original || point.color === allColors.primary.comparative ) && this.inlineChartViewModel.selectedPrimaryCategory().id === 4) {\r\n return true;\r\n } else if ((point.color === allColors.secondary.original || point.color === allColors.secondary.comparative) && this.inlineChartViewModel.selectedSecondaryCategory().id === 4) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n _toggleOldNewInlineChart() {\r\n // toggle the new and old inline chart based on current tab\r\n if (this._showNewChartOnCurrentTab()) {\r\n $('#bi-chartToggleContainer').hide();\r\n $('#chart-container').hide();\r\n\r\n this.$el.find('.chartToggle').show();\r\n $('.globalToolBarPanel').show();\r\n if (this.inlineChartViewModel.showChart()) {\r\n this.$('.chart-container').show();\r\n }\r\n } else if (this._showOldChartOnCurrentTab()) {\r\n $('#bi-chartToggleContainer').show();\r\n $('#chart-container').show();\r\n\r\n $('.globalToolBarPanel').hide();\r\n this.$('.chart-container').hide();\r\n } else {\r\n this.$el.find('.chartToggle').hide();\r\n $('#bi-chartToggleContainer').hide();\r\n $('#chart-container').hide();\r\n\r\n $('.globalToolBarPanel').hide();\r\n this.$('.chart-container').hide();\r\n }\r\n\r\n this._toggleToolbar();\r\n\r\n $('#bi-status-text').hide();\r\n }\r\n\r\n _toggleToolbar() {\r\n if (this._showNewChartOnCurrentTab()) {\r\n if (this.options.hideChartToolbar) {\r\n this.inlineChartViewModel.hideToolbar(true);\r\n } else {\r\n this.inlineChartViewModel.hideToolbar(false);\r\n }\r\n this.inlineChartViewModel.hideToggleIcon(false);\r\n } else {\r\n this.inlineChartViewModel.hideToolbar(true);\r\n this.inlineChartViewModel.hideToggleIcon(true);\r\n }\r\n }\r\n\r\n _showNewChartOnCurrentTab() {\r\n let tabsWithNewInlineCharts = [Constants.CampaignTabId, Constants.AdGroupTabId, Constants.ProductsGroupId, Constants.FlattenProductsGroupId, Constants.AdsTabId, Constants.KeywordsTabId,\r\n Constants.LocationsTabId, Constants.AdScheduleTabId, Constants.DevicesTabId, Constants.AudienceTabId, Constants.DemographicsTabId, Constants.SearchTermGridId];\r\n let entitiesUsingNewInlineCharts = [Constants.AccountEdmEntity];\r\n\r\n return entitiesUsingNewInlineCharts.indexOf(this.options.entityType) > -1 ||\r\n tabsWithNewInlineCharts.indexOf(PageContext.CurrentTabId) > -1;\r\n }\r\n\r\n _showOldChartOnCurrentTab() {\r\n let tabsWithOldInlineCharts = [Constants.ChangeHistoryTabId];\r\n\r\n if (tabsWithOldInlineCharts.indexOf(PageContext.CurrentTabId) > -1) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n _insertToolBarIfNeeded() {\r\n let globalToolBar = $('.navbar-tertiary > .btn-toolbar > .globalToolBar');\r\n let globalToolBarPanel = $('.navbar-tertiary > .globalToolBarPanel');\r\n\r\n if (globalToolBar && globalToolBar.length > 0) {\r\n globalToolBar.appendTo(this.$('.btn-toolbar'));\r\n }\r\n\r\n if (globalToolBarPanel && globalToolBarPanel.length > 0) {\r\n globalToolBarPanel.insertAfter(this.$('.btn-toolbar'));\r\n }\r\n }\r\n\r\n _updateMetricDropdownDiff() {\r\n if (this.primaryMetricDropdown) {\r\n this.primaryMetricDropdown.koModel.showDiff(\r\n this.inlineChartViewModel.primaryData().length &&\r\n (this.inlineChartViewModel.isPopOn() || this.inlineChartViewModel.isMovingAverageOn()));\r\n\r\n this.primaryMetricDropdown.koModel.triggerShowDifference();\r\n }\r\n\r\n if (this.secondaryMetricDropdown) {\r\n this.secondaryMetricDropdown.koModel.showDiff(\r\n this.inlineChartViewModel.secondaryData().length &&\r\n (this.inlineChartViewModel.isPopOn() || this.inlineChartViewModel.isMovingAverageOn()));\r\n\r\n this.secondaryMetricDropdown.koModel.triggerShowDifference();\r\n }\r\n }\r\n\r\n _round (num) {\r\n return Math.round(num * 100) / 100;\r\n }\r\n\r\n _numberWithCommas(num, seriesName) {\r\n let numberWithCommas = num.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',');\r\n let metricInvolvingCost = ['AverageCPC', 'CPA', 'Spent', 'Revenue', 'CTR'];\r\n\r\n if (metricInvolvingCost.indexOf(seriesName) > -1 || numberWithCommas !== '0') {\r\n let dotIndex = numberWithCommas.indexOf('.');\r\n return numberWithCommas.length - dotIndex === 2 && dotIndex !== -1 ? `${numberWithCommas}0` : numberWithCommas;\r\n }\r\n return numberWithCommas;\r\n }\r\n\r\n remove() {\r\n super.remove();\r\n legacy$(document).off('grid-page-loading', this.onGridPageLoadingHandler);\r\n legacy$(document).off('onSummaryPageTabChange', this.onTabChangeHandler);\r\n }\r\n}\r\n","import Promise from 'bluebird';\r\nimport _ from 'underscore';\r\nimport { convertSelectionDateRangeToState } from '@bingads-webui-campaign/date-range-utilities';\r\nimport { getGridName, getGridPage, getGridColumnNames, getGridColumnConversions } from '@bingads-webui-campaign/inline-download-grids-metadata';\r\nimport { setSegType } from '@bingads-webui-component-legacy/bingads-grid/service/segmentation-preferences';\r\nimport { Columns } from '@bingads-webui-component-legacy/bingads-grid/service/column-chooser-preferences';\r\n// Here it uses different name with date-filter we are using\r\n// import { setFilter } from '@bingads-webui-component-legacy/bingads-grid/service/filter-preferences';\r\n// import preferencesService from '@bingads-webui-component-legacy/preference/service/index';\r\nimport state from '@bingads-webui-component-legacy/state/index';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport { buildColumnConversions } from '@bingads-webui-campaign/column-conversions';\r\n\r\nconst i18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/campaign-date-filter');\r\nconst permissions = config.get('permissions');\r\nconst { dynamic = {} } = permissions;\r\nconst {\r\n ColumnConversion: IsColumnConversionEnabled,\r\n PartialConversions: IsPartialConversionsEnabled,\r\n} = dynamic;\r\n\r\nconst selectQueryPrefix = '$select=';\r\n\r\nconst ColumnConversionNotEnabledFeatures = {\r\n 'summary_tab_combinations': true,\r\n};\r\n\r\nfunction setGridPreference({\r\n Entity,\r\n SegmentationTypes: [SegmentationType = 'None'],\r\n Selection,\r\n}) {\r\n const {\r\n QueryString,\r\n } = Selection;\r\n const gridName = getGridName(Entity, Selection);\r\n const queries = QueryString.split('&');\r\n const properties = _.find(queries, (query) => query.indexOf(selectQueryPrefix) === 0)\r\n .substr(selectQueryPrefix.length)\r\n .split(',')\r\n .map((property) => property.split('/'));\r\n\r\n const columns = getGridColumnNames(Entity, properties, Selection);\r\n\r\n return Promise.all([\r\n Columns.findAll({\r\n where: {\r\n name: 'Custom',\r\n project: 'CampaignUI',\r\n grid: gridName,\r\n },\r\n }).then(([customColumn]) => {\r\n if (customColumn) {\r\n if (IsColumnConversionEnabled) {\r\n const columnConversions = getGridColumnConversions(Entity, Selection, { withPartialConversion: IsPartialConversionsEnabled && !ColumnConversionNotEnabledFeatures[gridName] });\r\n const { applyColumnConversions } = buildColumnConversions(columnConversions);\r\n const patchedColumns = applyColumnConversions(columns);\r\n\r\n return Columns.update(customColumn.id, { columns: patchedColumns });\r\n }\r\n\r\n return Columns.update(customColumn.id, { columns });\r\n }\r\n // when no column chooser for the grid, customColumn doesn't exist\r\n return null;\r\n }),\r\n setSegType(gridName, SegmentationType),\r\n ]);\r\n}\r\n\r\nfunction setDateRangeForNewUI(Rule, {\r\n convertSelectionDateRangeToDateFilter,\r\n restoreDateFilter,\r\n}) {\r\n const {\r\n DateRange,\r\n ComparisonDateRange,\r\n } = Rule.Selection;\r\n\r\n const dateFilter = convertSelectionDateRangeToDateFilter({\r\n DateRange,\r\n ComparisonDateRange,\r\n });\r\n\r\n restoreDateFilter(dateFilter);\r\n}\r\n\r\nfunction setPreferenceByReportEmailRuleForAccountsSummary(Rule, options = {}) {\r\n if (options.isForNewUI) {\r\n setDateRangeForNewUI(Rule, options);\r\n }\r\n return setGridPreference(Rule);\r\n}\r\n\r\nfunction setPreferenceByReportEmailRuleForCampaigns(Rule, options = {}) {\r\n const {\r\n DateRange,\r\n ComparisonDateRange,\r\n } = Rule.Selection;\r\n\r\n if (options.isForNewUI) {\r\n setDateRangeForNewUI(Rule, options);\r\n } else {\r\n const dateRange = convertSelectionDateRangeToState({\r\n Selection: {\r\n DateRange,\r\n ComparisonDateRange,\r\n },\r\n i18n,\r\n });\r\n\r\n state.set('$daterange', dateRange);\r\n window.App.views.Summary.dateFilter.initializePreference(dateRange);\r\n window.App.views.Summary.dateFilter.save();\r\n }\r\n\r\n return setGridPreference(Rule);\r\n}\r\n\r\nfunction setPreferenceByReportEmailRuleForHotelCenter(Rule, options = {}) {\r\n if (options.isForNewUI) {\r\n setDateRangeForNewUI(Rule, options);\r\n }\r\n return setGridPreference(Rule);\r\n}\r\n\r\nexport default function setPreferenceByReportEmailRule(ReportEmailRule, options) {\r\n switch (getGridPage(ReportEmailRule.Entity, ReportEmailRule.Selection)) {\r\n case 'AccountsSummary':\r\n return setPreferenceByReportEmailRuleForAccountsSummary(ReportEmailRule, options);\r\n case 'HotelCenter':\r\n return setPreferenceByReportEmailRuleForHotelCenter(ReportEmailRule, options);\r\n case 'Campaigns':\r\n default:\r\n return setPreferenceByReportEmailRuleForCampaigns(ReportEmailRule, options);\r\n }\r\n}\r\n","import {\r\n getGridPage,\r\n getGridRoute,\r\n getGridRouteForNewUI,\r\n} from '@bingads-webui-campaign/inline-download-grids-metadata';\r\nimport jsdata from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport edm from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport state from '@bingads-webui-component-legacy/state/index';\r\nimport setPreferenceByReportEmailRule from '@bingads-webui-campaign-legacy/bingadsgrid/service/set-preference-by-report-email-rule';\r\n\r\nconst AccountsSummary = 'AccountsSummary';\r\nconst Campaigns = 'Campaigns';\r\nconst currentPage = edm.currentAccount ? Campaigns : AccountsSummary;\r\n\r\nexport default function createSimilar(reportId, {\r\n isForNewUI,\r\n getUrlSearch,\r\n scopeHistoryPush,\r\n i18n,\r\n convertSelectionDateRangeToDateFilter,\r\n restoreDateFilter,\r\n serverContext,\r\n} = {}) {\r\n return jsdata.TaskItem\r\n .find(reportId, {\r\n entitySet: edm.currentAccount ? edm.currentAccount.TaskItems : edm.currentCustomer.TaskItems,\r\n })\r\n .then((Rule) => {\r\n const {\r\n Entity,\r\n Selection,\r\n } = Rule;\r\n\r\n if (!isForNewUI) {\r\n const page = getGridPage(Entity, Selection);\r\n\r\n if (currentPage !== page) {\r\n window.location = `${page}#reports/create_similar/${Rule.Id}`;\r\n return null;\r\n }\r\n }\r\n\r\n return setPreferenceByReportEmailRule(Rule, isForNewUI ? { isForNewUI: true, i18n, convertSelectionDateRangeToDateFilter, restoreDateFilter } : {})\r\n .then(() => {\r\n state.set('$ReportEmailRule', Rule);\r\n if (isForNewUI) {\r\n const route = getGridRouteForNewUI({ getUrlSearch, entity: Entity, selection: Selection, serverContext });\r\n\r\n scopeHistoryPush(route);\r\n } else {\r\n window.App.navigate(getGridRoute(Entity, Selection));\r\n }\r\n });\r\n });\r\n}\r\n","import _ from 'underscore';\r\nimport state from '@bingads-webui-component-legacy/state/index';\r\n\r\nexport default function loadEmails({allUsersType}) {\r\n const params = allUsersType === 'Customer' ? {\r\n cid: state.get('customer_id'),\r\n uid: state.get('user_id'),\r\n } : {\r\n cid: state.get('customer_id'),\r\n uid: state.get('user_id'),\r\n aid: state.get('account_id'),\r\n };\r\n\r\n const queryString = new URLSearchParams(params).toString();\r\n\r\n return fetch(`/campaign/users/loadEmails?${queryString}`, { method: 'GET' })\r\n .then((response) => response.json())\r\n .then((emails) => {\r\n if (_.isArray(emails)) {\r\n return emails;\r\n }\r\n\r\n const error = new Error();\r\n\r\n error.response = emails;\r\n throw error;\r\n });\r\n}\r\n","export const getImportButtonOptions = (i18n, importChannelType, lazyInject, view) =>\r\n ['start_import', {\r\n id: 'start_import',\r\n type: 'button',\r\n iconLeftGlyphName: 'ba-Add',\r\n text: i18n.getString('Import_ImportCenter_StartImport'),\r\n classes: ['btn-primary'],\r\n onClick: () => {\r\n // lazyInject is for schedule grid and view is for log grid.\r\n const router = lazyInject ? lazyInject().backboneGridView.router : view.router;\r\n\r\n router.navigateToRoute(importChannelType.toLowerCase());\r\n },\r\n }];\r\n","\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/import-campaigns');\r\n\r\nexport { i18n };\r\n","import _ from 'underscore';\r\nimport { cloneDeep } from '@bingads-webui-universal/primitive-utilities';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/import-campaigns');\r\n\r\n\r\nfunction createParentRowForBatchedImports(batchImportGroup) {\r\n const firstInBatchIndex = batchImportGroup.length - 1;\r\n const parent = cloneDeep(batchImportGroup[firstInBatchIndex]);\r\n\r\n delete parent.Id; // remove Id, otherwise, it will make data-key duplicated.\r\n const statisticFields = parent.EntityStatistics ? parent.EntityStatistics.Values.length : 0;\r\n let initStatistics = [];\r\n const entityStatisticChangeTypes = ['Additions', 'Changes', 'Deletions', 'Errors', 'Total'];\r\n const initialEntity = {};\r\n let isBatchStillInProgress = false;\r\n let hasAnyBatchedImportFailed = false;\r\n let hasAnyBatchedImportBeenCancelled = false;\r\n let successCount = 0;\r\n let errorCount = 0;\r\n\r\n _.each(entityStatisticChangeTypes, (key) => {\r\n initialEntity[key] = 0;\r\n });\r\n\r\n for (let index = 0; index < statisticFields; index++) {\r\n initStatistics.push(_.clone(initialEntity));\r\n }\r\n\r\n if (parent.EntityStatistics) {\r\n initStatistics = _.object(parent.EntityStatistics.Keys, initStatistics);\r\n }\r\n\r\n const combinedStatistics = _.reduce(batchImportGroup, (memo, importResult) => {\r\n if (parent.EntityStatistics && importResult.EntityStatistics) {\r\n const entityStatisticMap = _.object(importResult.EntityStatistics.Keys, importResult.EntityStatistics.Values);\r\n\r\n _.each(importResult.EntityStatistics.Keys, (entityType) => {\r\n if (memo[entityType]) {\r\n _.each(entityStatisticChangeTypes, (key) => {\r\n memo[entityType][key] += entityStatisticMap[entityType][key];\r\n });\r\n } else {\r\n memo[entityType] = _.clone(entityStatisticMap[entityType]);\r\n }\r\n });\r\n }\r\n\r\n if (importResult.ErrorCode) {\r\n hasAnyBatchedImportFailed = true;\r\n }\r\n\r\n if (importResult.ImportStatus === 'Cancelled') {\r\n hasAnyBatchedImportBeenCancelled = true;\r\n }\r\n\r\n if (importResult.ImportStatus === 'InProgress' || importResult.Status === 'PendingExecution') {\r\n isBatchStillInProgress = true;\r\n }\r\n\r\n if (_.isNumber(importResult.SuccessCount)) {\r\n successCount += importResult.SuccessCount;\r\n }\r\n\r\n if (_.isNumber(importResult.ErrorCount)) {\r\n errorCount += importResult.ErrorCount;\r\n }\r\n\r\n return memo;\r\n }, initStatistics);\r\n\r\n if (parent.EntityStatistics) {\r\n parent.EntityStatistics.Values = _.values(combinedStatistics);\r\n }\r\n\r\n if (isBatchStillInProgress) {\r\n parent.Status = 'PendingExeuction';\r\n }\r\n\r\n if (hasAnyBatchedImportBeenCancelled) {\r\n parent.ImportStatus = 'Cancelled';\r\n }\r\n\r\n if (hasAnyBatchedImportFailed) {\r\n parent.ErrorCode = -1;\r\n }\r\n\r\n parent.SuccessCount = successCount;\r\n parent.ErrorCount = errorCount;\r\n parent.TotalCount = successCount + errorCount;\r\n parent.ImportName = parent.ImportName || i18n.getString('CampaignImport_GSyncConnect');\r\n parent.ErrorFileIdentifier = null;\r\n parent.CampaignSplitStatus = 0;\r\n parent.CampaignSplitBatchIndex = 0;\r\n parent.CampaignSplitBatchCount = null;\r\n parent.IsBatchParent = true;\r\n\r\n return parent;\r\n}\r\n\r\nexport function processBatchedImports(data) {\r\n const groupedByBatch = _.values(_.groupBy(data, (importResult) => {\r\n if (importResult.CampaignSplitGuid) {\r\n return importResult.CampaignSplitGuid;\r\n }\r\n return importResult.Id;\r\n }));\r\n const sortedGroupedList = _.sortBy(groupedByBatch, (group) => {\r\n const minDateIndex = group.length - 1; // data is returned in reverse date order, last element is earliest\r\n\r\n return new Date(group[minDateIndex].StartDateTime);\r\n });\r\n const sortedGroupWithParentList = _.map(sortedGroupedList, (group) => {\r\n if (group.length > 1) {\r\n const parent = createParentRowForBatchedImports(group);\r\n const processedGroup = _.map(group, (importResult) => {\r\n const indexTemplate = i18n.getString('Alert_CarouselPagination');\r\n const indexText = _.template(indexTemplate)({\r\n page: importResult.CampaignSplitBatchIndex,\r\n total: importResult.CampaignSplitBatchCount,\r\n });\r\n\r\n importResult.ImportName = `${i18n.getString('CampaignImport_GSyncConnect')} ${indexText}`;\r\n importResult.IsChildBatch = true;\r\n\r\n return importResult;\r\n }).reverse();\r\n\r\n processedGroup.unshift(parent);\r\n\r\n return processedGroup;\r\n }\r\n return group;\r\n });\r\n\r\n return _.flatten(sortedGroupWithParentList.reverse());\r\n}\r\n\r\nexport function processMultiAccountBatchedImports(data) {\r\n const groupedByAccount = _.map(data, (item) => {\r\n item.ImportName = item.TaskItem.Name || i18n.getString('CampaignImport_MultiAccount_GSyncConnect');\r\n item.isCustomerLevel = true;\r\n let processedItem = [item];\r\n\r\n _.each(item.ImportResultList, (accountitem) => {\r\n accountitem.Id = accountitem.TaskId;\r\n accountitem.IsChildAccountTask = true;\r\n const indexTemplate = i18n.getString('Alert_CarouselPagination');\r\n const indexText = _.template(indexTemplate)({\r\n page: accountitem.MultiAccountTaskIndex,\r\n total: accountitem.MultiAccountTaskCount,\r\n });\r\n\r\n accountitem.ImportName = `${i18n.getString('CampaignImport_Account')} ${indexText}`;\r\n });\r\n processedItem = processedItem.concat(processBatchedImports(item.ImportResultList));\r\n return processedItem;\r\n });\r\n\r\n return _.flatten(groupedByAccount);\r\n}\r\n","import config from '@bingads-webui-component-legacy/config/index';\r\n\r\nconst permissions = config.get('Permissions') || {};\r\nconst testTypeSuffix = permissions.IsUseImportTestTypeForImportTaskExecutionEnabled ? 'Test' : '';\r\n\r\nexport const FILTER_IMPORT = `TaskItem/Type eq Enum.TaskItemType'Import${testTypeSuffix}'`;\r\nexport const FILTER_MULTIACCOUNT_IMPORT = `TaskItem/Type eq Enum.TaskItemType'MultiAccountGoogleImport${testTypeSuffix}'`;\r\nexport const FILTER_FILE_IMPORT = `TaskItem/Type eq Enum.TaskItemType'FileImport${testTypeSuffix}'`;\r\nexport const FILTER_FACEBOOK_IMPORT = `TaskItem/Type eq Enum.TaskItemType'FacebookImport${testTypeSuffix}'`;\r\nexport const FILTER_AMAZON_IMPORT = `TaskItem/Type eq Enum.TaskItemType'AmazonImport${testTypeSuffix}'`;\r\nexport const FILTER_PINTEREST_IMPORT = `TaskItem/Type eq Enum.TaskItemType'PinterestImport${testTypeSuffix}'`;\r\n","import _ from 'underscore';\r\nimport edm from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport jsData from '@bingads-webui-component-legacy/js-data-campaign/index';\r\n\r\nimport { showError, showSuccess } from '@bingads-webui-component-legacy/toast/index';\r\nimport createImportTaskItemHelper from '@bingads-webui-campaign-legacy/import-campaigns/shared/import-task-item-helper';\r\n\r\nimport { processBatchedImports, processMultiAccountBatchedImports } from './batched-import-processor';\r\nimport * as consts from './import-log-constants';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport constants from '@bingads-webui-static-legacy/instrumentation/constants';\r\n\r\nimport { IMPORT_TYPE } from '@bingads-webui-campaign-legacy/scheduled-import/view/import-type';\r\n\r\nconst schema = window.globalLegacySchema.get('ImportResult');\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/import-campaigns');\r\n\r\n//Max int, used to fetch all task items executions for file import and combined imports (16 bit signed int)\r\nconst MAX_TASK_ITEM_COUNT = 32767;\r\n\r\n// processes batched imports and filters out error imports if needed\r\nfunction processData(isMultiAccount, data) {\r\n return isMultiAccount ?\r\n processMultiAccountBatchedImports(data) :\r\n processBatchedImports(data);\r\n}\r\n\r\nexport function getImportLogDataSourceConfig({ isMultiAccount, isFacebookImport = false, isAmazonImport = false, isPinterestImport = false, supportedImportTypes }) {\r\n if (isMultiAccount) {\r\n // eslint-disable-next-line no-param-reassign\r\n edm.customerIdType.useAdvertiserCustomerId = false;\r\n }\r\n return isMultiAccount ? {\r\n type: 'js-data',\r\n entity: jsData.TaskItemExecution,\r\n schema,\r\n query: {\r\n $expand: 'TaskItem',\r\n $filter: consts.FILTER_MULTIACCOUNT_IMPORT,\r\n },\r\n options: {\r\n entitySet: edm.currentCustomer.TaskItemExecutions,\r\n afterFindAll: (resources, data) => {\r\n const processedData = processData(isMultiAccount, data);\r\n\r\n // ensure that grid still has access to total odata count\r\n _.extend(processedData, {\r\n totalCount: data.totalCount,\r\n });\r\n return processedData;\r\n },\r\n },\r\n } : {\r\n type: 'js-data',\r\n entity: jsData.TaskItemExecution,\r\n options: {\r\n entitySet: edm.currentAccount.TaskItemExecutions,\r\n cacheResponse: false,\r\n afterFindAll: (resource, data) => {\r\n const processedData = processData(isMultiAccount, data);\r\n\r\n // ensure that grid still has access to total odata count\r\n _.extend(processedData, {\r\n totalCount: data.totalCount,\r\n });\r\n return processedData;\r\n },\r\n },\r\n schema,\r\n query: {\r\n $expand: 'TaskItem',\r\n $filter: (() => {\r\n if (supportedImportTypes[IMPORT_TYPE.facebookimport] && isFacebookImport) {\r\n return consts.FILTER_FACEBOOK_IMPORT;\r\n }\r\n if (supportedImportTypes[IMPORT_TYPE.amazonImport] && isAmazonImport) {\r\n return consts.FILTER_AMAZON_IMPORT;\r\n }\r\n if (supportedImportTypes[IMPORT_TYPE.pinterestImport] && isPinterestImport) {\r\n return consts.FILTER_PINTEREST_IMPORT;\r\n }\r\n return consts.FILTER_IMPORT;\r\n })(),\r\n },\r\n };\r\n}\r\n\r\nexport function getMemoryDataSourceConfig() {\r\n return {\r\n type: 'memory',\r\n schema,\r\n data: null,\r\n };\r\n}\r\n\r\nexport function updateMemoryGrid(view) {\r\n view.currentGrid.gridView.trigger('willUpdate');\r\n jsData.TaskItemExecution\r\n .findAll({\r\n query: {\r\n $expand: 'TaskItem',\r\n $filter: consts.FILTER_FILE_IMPORT,\r\n $top: MAX_TASK_ITEM_COUNT,\r\n },\r\n }, {\r\n bypassCache: true,\r\n cacheResponse: false,\r\n entitySet: edm.currentAccount.TaskItemExecutions,\r\n }).then((data) => {\r\n view.currentGrid.gridView.patch({\r\n dataSource: {\r\n data: processData(view.isMultiAccount, data),\r\n },\r\n });\r\n view.currentGrid.gridView.trigger('didUpdate');\r\n });\r\n}\r\n\r\nexport function updateTaskItemSessionId(taskId, sessionId = null, logMsg) {\r\n let adWordsSessionId = sessionId;\r\n\r\n if (!adWordsSessionId) {\r\n adWordsSessionId = createImportTaskItemHelper.getGoogleImportInfoFromCookie().googleSessionId;\r\n }\r\n\r\n if (adWordsSessionId) {\r\n jsData.TaskItem.find(taskId, {\r\n cacheResponse: false,\r\n }).then((taskItem) => {\r\n return jsData.TaskItem.update(taskId, _.extend(taskItem, {\r\n AdWordsImportContext: _.extend(taskItem.AdWordsImportContext, {\r\n SessionId: adWordsSessionId,\r\n AdWordsSessionUserId: _.propertyOf(config.get('CurrentUser'))('Id'),\r\n SessionType: taskItem.AdWordsImportContext.SessionType === 'CloudImport' ? null : taskItem.AdWordsImportContext.SessionType,\r\n }),\r\n // patch request need to reset ImportUserPreferences to undefined, otherwise, MT will meet issue.\r\n ImportUserPreferences: undefined,\r\n }));\r\n }).then(() => {\r\n if (logMsg) {\r\n logMsg(constants.LOGCATEGORY.TRACE, 'login Google_Credentials_Update_Success');\r\n }\r\n\r\n showSuccess(i18n.get('Scheduled_Import_GAuth_Edit_Success'));\r\n }).catch((error) => {\r\n if (logMsg) {\r\n logMsg(constants.LOGCATEGORY.TRACE, `Google_Credentials_Update_Error: ${JSON.stringify(error)}`);\r\n }\r\n\r\n showError(i18n.get('GenericErrorMessage'));\r\n });\r\n } else {\r\n if (logMsg) {\r\n logMsg(constants.LOGCATEGORY.TRACE, 'No_Session_Id');\r\n }\r\n\r\n showError(i18n.get('GenericErrorMessage'));\r\n }\r\n}\r\n\r\nexport function findImportTaskItem(id) {\r\n return jsData.TaskItem.find(id, {\r\n cacheResponse: false,\r\n });\r\n}\r\n","import downloadService from '@bingads-webui-component-legacy/download/index';\r\nimport instrumentation from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport odata from '@bingads-webui-component-legacy/http/channel/odata';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/import-campaigns');\r\n\r\nexport default function download(identifier, type) {\r\n const url = `/BulkUploadFiles/GetBulkFileUrl(CustomerId=:customer_id,FileIdentifier=${identifier},BulkFileType=${type})`;\r\n\r\n odata.get(url)\r\n .then((data) => {\r\n downloadService.download(data);\r\n })\r\n .catch((err) => {\r\n window.App.views.alertCenter.showError(i18n.get('GenericErrorMessage'));\r\n instrumentation.logError('import campaign download', JSON.stringify(err));\r\n });\r\n}\r\n","import _ from 'underscore';\r\n\r\nimport { ImportOptionsSummaryBuilder } from '@bingads-webui-campaign/google-import-page';\r\nimport { ImportOptionsSummaryBuilder as FileImportOptionsSummaryBuilder, parseModelToImportUserPreference, parseJsonFormatImportOptions, getFacebookImportOptionBlackList } from '@bingads-webui-campaign/import-components';\r\nimport { getSubFieldsBlackList as getFileImportOptionBlackList } from '@bingads-webui-campaign/file-import-page';\r\nimport { getSubFieldsBlackList as getAmazonImportOptionBlackList } from '@bingads-webui-campaign/amazon-import';\r\nimport { getSubFieldsBlackList as getPinterestImportOptionBlackList } from '@bingads-webui-campaign/pinterest-import';\r\n\r\nimport creatorColumnTmpl from '@bingads-webui-campaign-legacy/scheduled-import/template/creator-column.pug';\r\nimport freqColumnTmpl from '@bingads-webui-campaign-legacy/scheduled-import/template/freq-column.pug';\r\nimport importTypeTmpl from '@bingads-webui-campaign-legacy/scheduled-import/template/import-type.pug';\r\nimport nameTmpl from '@bingads-webui-campaign-legacy/scheduled-import/template/import-log-name.pug';\r\nimport { bingadsGridColumn } from '@bingads-webui-component-legacy/bingads-grid/shared/column';\r\nimport { importSummaryColDataToTemplate } from '@bingads-webui-campaign-legacy/scheduled-import/view/shared-column-configs/import-summary-col';\r\nimport actionsLogTmpl from '@bingads-webui-campaign-legacy/scheduled-import/template/import-log-actions.pug';\r\nimport preferencesLogTmpl from '@bingads-webui-campaign-legacy/scheduled-import/template/import-settings-col.pug';\r\n\r\nimport config1 from '@bingads-webui-component-legacy/config/index';\r\nimport dateUtil from '@bingads-webui-component-legacy/humanize/date';\r\nimport { IMPORT_TYPE } from '@bingads-webui-campaign-legacy/scheduled-import/view/import-type';\r\nimport { getImportButtonOptions } from './import-center-options';\r\n\r\nconst amdI18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/import-campaigns');\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/import-campaigns');\r\nconst i18nGlobal = window.globalLegacyI18n.get('component/i18n/loader!legacy/global');\r\n\r\nconst permissions = config1.get('Permissions');\r\nconst importSettingsSummaryBuilder = new ImportOptionsSummaryBuilder({ i18n });\r\nconst fileImportSettingsSummaryBuilder = new FileImportOptionsSummaryBuilder({ i18n });\r\n\r\n// import option black lists\r\nconst fileImportOptionBlackList = getFileImportOptionBlackList(permissions);\r\nconst facebookImportOptionBlackList = getFacebookImportOptionBlackList(permissions);\r\nconst amazonImportOptionBlackList = getAmazonImportOptionBlackList(permissions);\r\nconst pinterestImportOptionBlackList = getPinterestImportOptionBlackList(permissions);\r\n\r\nfunction getDropdownItemConfig(view, name, text, isFirstDropdownOption) {\r\n return {\r\n name,\r\n type: 'buttonMenuItem',\r\n text: i18n.getString(text),\r\n action: {\r\n viewFactory: () => {\r\n view.setErrorFilterPredicate(isFirstDropdownOption);\r\n view.refreshGrid();\r\n },\r\n setMenuTitle: i18n.getString(text),\r\n },\r\n };\r\n}\r\n\r\nfunction getLegacyToolbarConfig(view) {\r\n return {\r\n container: view.$('.log-toolbar'),\r\n items: [\r\n {\r\n name: 'logselect',\r\n type: 'dropdown',\r\n isNewFeature: false,\r\n level: 1,\r\n title: i18n.getString('AutomatedRules_RulesHistoryGrid_AllLogs'),\r\n items: [\r\n getDropdownItemConfig(view, 'all', 'AutomatedRules_RulesHistoryGrid_AllLogs', true),\r\n getDropdownItemConfig(view, 'changeorerror', 'Scheduled_Import_Logs_With_Errors', false),\r\n ],\r\n },\r\n {\r\n name: 'refresh',\r\n type: 'button',\r\n text: i18n.getString('CampaignImport_Refresh'),\r\n leftIconClass: 'spritedimage refresh-icon',\r\n action: () => {\r\n view.refreshGrid();\r\n },\r\n }],\r\n };\r\n}\r\n\r\nfunction getGridSwitchDropdownItem(view, text, isGoogleImport) {\r\n return {\r\n key: text,\r\n value: isGoogleImport,\r\n text,\r\n classes: 'grid-menu',\r\n };\r\n}\r\n\r\nfunction getVNextToolbarConfig(view) {\r\n const config = [];\r\n\r\n // if not in import center and not multi account and not smart account and not up smart account's log grid\r\n if (view.importChannelType === undefined && !view.isMultiAccount && !view.isSmartAccount && !view.isUPSmartAccount) {\r\n const filterText = {\r\n [IMPORT_TYPE.facebookimport]: i18n.getString('Scheduled_Import_Logs_Facebook_Imports'),\r\n [IMPORT_TYPE.amazonImport]: i18n.getString('Scheduled_Import_Logs_Amazon_Imports'),\r\n [IMPORT_TYPE.pinterestImport]: i18n.getString('Scheduled_Import_Logs_Pinterest_Imports'),\r\n [IMPORT_TYPE.fileimport]: i18n.getString('Scheduled_Import_Logs_File_Imports'),\r\n }[view.importType] || i18n.getString('Scheduled_Import_Logs_Google_Imports');\r\n\r\n const items = _.compact([\r\n view.supportedImportTypes[IMPORT_TYPE.googleimport] && {\r\n text: i18n.getString('Scheduled_Import_Logs_Google_Imports'),\r\n className: 'google-log-grid',\r\n onClick: () => {\r\n view.setImportType(IMPORT_TYPE.googleimport);\r\n view.updateToolbarTextForVNext(i18n.getString('Scheduled_Import_Logs_Google_Imports'));\r\n },\r\n },\r\n view.supportedImportTypes[IMPORT_TYPE.facebookimport] && {\r\n text: i18n.getString('Scheduled_Import_Logs_Facebook_Imports'),\r\n className: 'facebook-log-grid',\r\n onClick: () => {\r\n view.setImportType(IMPORT_TYPE.facebookimport);\r\n view.updateToolbarTextForVNext(i18n.getString('Scheduled_Import_Logs_Facebook_Imports'));\r\n },\r\n },\r\n view.supportedImportTypes[IMPORT_TYPE.amazonImport] && {\r\n text: i18n.getString('Scheduled_Import_Logs_Amazon_Imports'),\r\n className: 'amazon-log-grid',\r\n onClick: () => {\r\n view.setImportType(IMPORT_TYPE.amazonImport);\r\n view.updateToolbarTextForVNext(i18n.getString('Scheduled_Import_Logs_Amazon_Imports'));\r\n },\r\n },\r\n view.supportedImportTypes[IMPORT_TYPE.pinterestImport] && {\r\n text: i18n.getString('Scheduled_Import_Logs_Pinterest_Imports'),\r\n className: 'pinterest-log-grid',\r\n onClick: () => {\r\n view.setImportType(IMPORT_TYPE.pinterestImport);\r\n\r\n view.updateToolbarTextForVNext(i18n.getString('Scheduled_Import_Logs_Pinterest_Imports'));\r\n },\r\n },\r\n {\r\n text: i18n.getString('Scheduled_Import_Logs_File_Imports'),\r\n className: 'file-log-grid',\r\n onClick: () => {\r\n view.setImportType(IMPORT_TYPE.fileimport);\r\n view.updateToolbarTextForVNext(i18n.getString('Scheduled_Import_Logs_File_Imports'));\r\n },\r\n },\r\n ]);\r\n\r\n if (items.length > 1) {\r\n config.push(['logselect', {\r\n id: 'logselect',\r\n type: 'dropdown',\r\n button: {\r\n text: filterText,\r\n },\r\n menu: {\r\n items,\r\n },\r\n }]);\r\n }\r\n\r\n }\r\n if (view.importChannelType !== undefined) {\r\n const importButtonOptions = getImportButtonOptions(i18n, view.importChannelType, null, view);\r\n\r\n config.push(importButtonOptions);\r\n }\r\n config.push(['refresh', {\r\n id: 'refresh_log',\r\n type: 'button',\r\n iconLeftGlyphName: 'ba-Refresh',\r\n text: i18n.getString('CampaignImport_Refresh'),\r\n onClick: () => {\r\n view.refreshGrid();\r\n },\r\n }]);\r\n\r\n return _.reduce(\r\n config,\r\n (map, [key, value]) => {\r\n map.set(key, value);\r\n return map;\r\n },\r\n new Map(),\r\n );\r\n}\r\n\r\nexport function getToolbarConfig(view) {\r\n if (view.isForVNext) {\r\n return getVNextToolbarConfig(view);\r\n }\r\n return getLegacyToolbarConfig(view);\r\n}\r\n\r\nfunction mapTypeToString(type, isAutomated, isCustomerLevel, multiAccountTaskGuid, supportedImportTypes) {\r\n if (isCustomerLevel) {\r\n return isAutomated ?\r\n i18n.get('Scheduled_Import_MutliAccount_Type') :\r\n i18n.get('Scheduled_Import_MutliAccount_RunNow_Type');\r\n } else if (multiAccountTaskGuid) {\r\n return isAutomated ?\r\n i18n.get('Scheduled_Import_MutliAccount_Task_Type') :\r\n i18n.get('Scheduled_Import_MutliAccount_Task_RunNow_Type');\r\n } else if (isAutomated && type === 'GoogleAPIImport') {\r\n return i18n.get('Scheduled_Import_Type');\r\n } else if (type === 'GoogleAPIImport') {\r\n return i18n.get('Scheduled_Import_RunNow_Type');\r\n } else if (supportedImportTypes[IMPORT_TYPE.facebookimport] && isAutomated && type === 'FacebookImport') {\r\n return i18n.get('Scheduled_Import_Type_Facebook');\r\n } else if (supportedImportTypes[IMPORT_TYPE.facebookimport] && type === 'FacebookImport') {\r\n return i18n.get('Scheduled_Import_RunNow_Type_Facebook');\r\n } else if (supportedImportTypes[IMPORT_TYPE.amazonImport] && isAutomated && type === 'AmazonImport') {\r\n return i18n.get('Scheduled_Import_Type_Amazon');\r\n } else if (supportedImportTypes[IMPORT_TYPE.amazonImport] && type === 'AmazonImport') {\r\n return i18n.get('Scheduled_Import_RunNow_Type_Amazon');\r\n } else if (supportedImportTypes[IMPORT_TYPE.pinterestImport] && isAutomated && type === 'PinterestImport') {\r\n return i18n.get('Scheduled_Import_Type_Pinterest');\r\n } else if (supportedImportTypes[IMPORT_TYPE.pinterestImport] && type === 'PinterestImport') {\r\n return i18n.get('Scheduled_Import_RunNow_Type_Pinterest');\r\n }\r\n return i18n.get('Scheduled_Import_File_Type');\r\n}\r\n\r\nfunction getColumnsConfig(view) {\r\n let columns = _.compact([bingadsGridColumn({\r\n name: 'StartTime',\r\n title: 'ImprovedAdScheduling_Column_Heading_Start_Time',\r\n property: _.identity,\r\n bodyClasses: ['col-StartTime'],\r\n template: (local) => {\r\n return freqColumnTmpl({\r\n Freq: amdI18n.formatDate(new Date(local.value.StartedAt), { datetime: 'full' }),\r\n IsChildBatch: local.value.IsChildBatch,\r\n IsChildAccountTask: local.value.IsChildAccountTask,\r\n });\r\n },\r\n i18n: i18nGlobal,\r\n }), bingadsGridColumn({\r\n name: 'Name',\r\n title: 'Scheduled_Import_Name',\r\n property: _.identity,\r\n bodyClasses: ['col-Name'],\r\n template: (local) => {\r\n const fileName = decodeURIComponent(local.value.UploadFileName);\r\n const fileNameExists = local.value.Type === 'FileBasedImport' && fileName && fileName !== 'null';\r\n let name;\r\n\r\n if (fileNameExists) {\r\n name = fileName;\r\n } else {\r\n name = local.value.ImportName;\r\n }\r\n\r\n return nameTmpl({\r\n ariaLabel: name && i18n.get('Download_Import_File').replace('{{fileName}}', name),\r\n fileNameExists,\r\n name: name || i18nGlobal.get('QualityScore_NA'),\r\n IsChildBatch: local.value.IsChildBatch,\r\n IsChildAccountTask: local.value.IsChildAccountTask,\r\n });\r\n },\r\n i18n,\r\n }), bingadsGridColumn({\r\n name: 'CreatedBy',\r\n title: 'AutomatedRules_RulesManagementGrid_CreatedBy',\r\n property: _.identity,\r\n bodyClasses: ['col-CreatedBy'],\r\n template: (local) => {\r\n if (local.value.TaskItem) {\r\n return creatorColumnTmpl({\r\n Creator: local.value.TaskItem.ModifiedBy && local.value.TaskItem.ModifiedBy.Name,\r\n DateTime: dateUtil.format(new Date(local.value.TaskItem.CreatedAt), 'dddd, MMMM d, yyyy', config1.get('culture')),\r\n Time: dateUtil.format(new Date(local.value.TaskItem.CreatedAt), 'hh:mm:ss tt', config1.get('culture')),\r\n });\r\n }\r\n return i18n.get('Import_Log_Grid_Created_By_Dash');\r\n },\r\n i18n,\r\n }), view.isUPSmartAccount ? null : bingadsGridColumn({\r\n name: 'ImportSettings',\r\n title: 'Import_ImportSettings_Header',\r\n property: _.identity,\r\n helpId: 'pop_BA_Import_ImportSettings',\r\n bodyClasses: ['col-ImportSettings'],\r\n template: (local) => {\r\n const importSettings = local.value.ImportUserPreference;\r\n const parsedValue = importSettings && JSON.parse(importSettings);\r\n const options = parsedValue && parseModelToImportUserPreference(parseJsonFormatImportOptions({ options: parsedValue }));\r\n const showSmartType = !view.isMultiAccount && view.isForVNext && permissions.IsSmartImportEnabled && local.value.TaskItem.IsSmartImport;\r\n let enabledOptions;\r\n let settingsText;\r\n\r\n if (local.value.Type === 'GoogleAPIImport' ||\r\n view.isMultiAccount ||\r\n (view.supportedImportTypes[IMPORT_TYPE.facebookimport] && local.value.Type === 'FacebookImport') ||\r\n (view.supportedImportTypes[IMPORT_TYPE.amazonImport] && local.value.Type === 'AmazonImport') ||\r\n (view.supportedImportTypes[IMPORT_TYPE.pinterestImport] && local.value.Type === 'PinterestImport')) {\r\n const importOptionBlackList = {\r\n 'FacebookImport': facebookImportOptionBlackList,\r\n 'AmazonImport': amazonImportOptionBlackList,\r\n 'PinterestImport': pinterestImportOptionBlackList,\r\n }[local.value.Type] || [];\r\n\r\n if (options && importOptionBlackList.length) {\r\n enabledOptions = {};\r\n _.map(options, (option, key) => {\r\n if (!_.contains(importOptionBlackList, key)) {\r\n enabledOptions[key] = option;\r\n }\r\n });\r\n } else {\r\n enabledOptions = options;\r\n }\r\n\r\n settingsText = enabledOptions && importSettingsSummaryBuilder.generateSummaryFromSelectedOptions(enabledOptions, true);\r\n } else {\r\n if (options && fileImportOptionBlackList.length) {\r\n enabledOptions = {};\r\n _.map(options, (option, key) => {\r\n if (!_.contains(fileImportOptionBlackList, key)) {\r\n enabledOptions[key] = option;\r\n }\r\n });\r\n } else {\r\n enabledOptions = options;\r\n }\r\n\r\n settingsText = enabledOptions && fileImportSettingsSummaryBuilder.generateSummaryFromSelectedOptions(enabledOptions, true);\r\n }\r\n\r\n\r\n return preferencesLogTmpl({\r\n showSmartType,\r\n showTooltipIcon: !!parsedValue,\r\n settingsText: settingsText || i18nGlobal.get('QualityScore_NA'),\r\n importSettingsLabel: i18n.get('Import_ImportSettings_Header'),\r\n i18n,\r\n });\r\n },\r\n i18n,\r\n }), bingadsGridColumn({\r\n name: 'ImportType',\r\n title: 'AudiencesGrid_Header_Type',\r\n property: _.identity,\r\n bodyClasses: ['col-ImportType'],\r\n helpId: 'pop_BA_Import_HistoryType',\r\n template: (local) => {\r\n let importSourceAccountInfo;\r\n\r\n if (local.value.GoogleAccountName && local.value.GoogleCustomerId) {\r\n importSourceAccountInfo = `${local.value.GoogleAccountName} (${local.value.GoogleCustomerId})`;\r\n } else if (local.value.GoogleAccountName) {\r\n importSourceAccountInfo = local.value.GoogleAccountName;\r\n } else if (view.supportedImportTypes[IMPORT_TYPE.facebookimport] || view.supportedImportTypes[IMPORT_TYPE.amazonImport] || view.supportedImportTypes[IMPORT_TYPE.pinterestImport]) {\r\n if (local.value.ExternalAccountName && local.value.ExternalCustomerId) {\r\n importSourceAccountInfo = `${local.value.ExternalAccountName} (${local.value.ExternalCustomerId})`;\r\n } else if (local.value.ExternalAccountName) {\r\n importSourceAccountInfo = local.value.ExternalAccountName;\r\n }\r\n }\r\n\r\n return importTypeTmpl({\r\n Type: mapTypeToString(\r\n local.value.Type,\r\n local.value.IsAutomated,\r\n local.value.isCustomerLevel,\r\n local.value.MultiAccountTaskGuid,\r\n view.supportedImportTypes,\r\n ),\r\n IsGoogleImport: local.value.Type === 'GoogleAPIImport' || view.isMultiAccount,\r\n IsFacebookImport: view.supportedImportTypes[IMPORT_TYPE.facebookimport] && local.value.Type === 'FacebookImport',\r\n IsAmazonImport: view.supportedImportTypes[IMPORT_TYPE.amazonImport] && local.value.Type === 'AmazonImport',\r\n IsPinterestImport: view.supportedImportTypes[IMPORT_TYPE.pinterestImport] && local.value.Type === 'PinterestImport',\r\n ImportSourceAccountInfo: importSourceAccountInfo,\r\n });\r\n },\r\n i18n: i18nGlobal,\r\n }), bingadsGridColumn({\r\n name: 'Summary',\r\n title: 'AutomatedRules_RulesHistoryGrid_Summary',\r\n property: _.identity,\r\n bodyClasses: ['col-Summary'],\r\n helpId: 'pop_BA_Import_HistorySummary',\r\n template: (local) => importSummaryColDataToTemplate(local.value, i18n),\r\n i18n,\r\n }), bingadsGridColumn({\r\n name: 'Error',\r\n title: 'Scheduled_Import_History_Actions_Header',\r\n property: _.identity,\r\n bodyClasses: ['col-Error'],\r\n helpId: 'pop_BA_Import_History_Action',\r\n template: (local) => {\r\n const hasError = (local.value.ErrorCount && local.value.ErrorFileIdentifier) ||\r\n (local.value.EntityStatistics && _.any(local.value.EntityStatistics.Values, (stat) => stat.HasWarning === true));\r\n const hasErrorSummary = permissions && permissions.dynamic && permissions.dynamic.ImportNewErrorSummaryDownloadLink && hasError && local.value.ErrorSummaryFileIdentifier !== null;\r\n const hasPreview = (local.value.ImportStatus === 'ValidationCompleted') && local.value.Status === 'Completed';\r\n const hasErrorCode = permissions && permissions.dynamic && permissions.dynamic.TokenInvalidImportNotification && local.value.ErrorCode !== null;\r\n\r\n if (hasError) {\r\n view.logColumns({\r\n column: 'Import_History_Action',\r\n isMultiAccount: view.isMultiAccount,\r\n columnData: local.value,\r\n action: 'has',\r\n message: 'error file',\r\n });\r\n }\r\n\r\n if (hasErrorSummary) {\r\n view.logColumns({\r\n column: 'Import_History_Action',\r\n isMultiAccount: view.isMultiAccount,\r\n columnData: local.value,\r\n action: 'has',\r\n message: 'error summary file',\r\n });\r\n }\r\n\r\n return actionsLogTmpl({\r\n hasError,\r\n hasErrorSummary,\r\n hasPreview,\r\n i18n,\r\n hasErrorCode,\r\n errorDetailsLabel: i18n.getString('Grid_ErrorDetails'),\r\n });\r\n },\r\n i18n,\r\n })]);\r\n\r\n return columns;\r\n}\r\n\r\nexport class GoogleImportLogConfig {\r\n constructor(view) {\r\n _.extend(this, {\r\n name: 'GoogleImportLogGrid',\r\n el: view.$('.googleImportLogGrid'),\r\n dataSource: view.getImportLogDataSourceConfig(view),\r\n columns: getColumnsConfig(view),\r\n tableClasses: ['table', 'table-bordered'],\r\n tableAttributes: { 'aria-label': i18n.get('Scheduled_Import_History_Logs_Title') },\r\n pluginsConfig: {\r\n toolbar: getToolbarConfig(view),\r\n },\r\n plugins: {\r\n a11y: { i18n },\r\n uiBlocker: {\r\n el: view.$('.googleImportLogGrid'),\r\n },\r\n placeholder: {}, // use placeholder plugin to hide PageSize dropdown\r\n pagination: {\r\n pageSizeText: i18nGlobal.getString('Grid_ShowRows'),\r\n },\r\n perfMarker: {\r\n appConfig: config1,\r\n gridMarker: view.perfMarker,\r\n },\r\n },\r\n });\r\n }\r\n}\r\n\r\nexport class FacebookImportLogConfig {\r\n constructor(view) {\r\n _.extend(this, {\r\n name: 'FacebookImportLogGrid',\r\n el: view.$('.facebookImportLogGrid'),\r\n dataSource: view.getImportLogDataSourceConfig({isForVNext: true, isFacebookImport: true, supportedImportTypes: view.supportedImportTypes }),\r\n columns: getColumnsConfig(view),\r\n tableClasses: ['table', 'table-bordered'],\r\n tableAttributes: { 'aria-label': i18n.get('Scheduled_Import_History_Logs_Title') },\r\n pluginsConfig: {\r\n toolbar: getToolbarConfig(view),\r\n },\r\n plugins: {\r\n a11y: { i18n },\r\n uiBlocker: {\r\n el: view.$('.facebookImportLogGrid'),\r\n },\r\n placeholder: {}, // use placeholder plugin to hide PageSize dropdown\r\n pagination: {\r\n pageSizeText: i18nGlobal.getString('Grid_ShowRows'),\r\n },\r\n perfMarker: {\r\n appConfig: config1,\r\n gridMarker: view.perfMarker,\r\n },\r\n },\r\n });\r\n }\r\n}\r\n\r\nexport class AmazonImportLogConfig {\r\n constructor(view) {\r\n _.extend(this, {\r\n name: 'AmazonImportLogGrid',\r\n el: view.$('.amazonImportLogGrid'),\r\n dataSource: view.getImportLogDataSourceConfig({isForVNext: true, isAmazonImport: true, supportedImportTypes: view.supportedImportTypes }),\r\n columns: getColumnsConfig(view),\r\n tableClasses: ['table', 'table-bordered'],\r\n tableAttributes: { 'aria-label': i18n.get('Scheduled_Import_History_Logs_Title') },\r\n pluginsConfig: {\r\n toolbar: getToolbarConfig(view),\r\n },\r\n plugins: {\r\n a11y: { i18n },\r\n uiBlocker: {\r\n el: view.$('.amazonImportLogGrid'),\r\n },\r\n placeholder: {}, // use placeholder plugin to hide PageSize dropdown\r\n pagination: {\r\n pageSizeText: i18nGlobal.getString('Grid_ShowRows'),\r\n },\r\n perfMarker: {\r\n appConfig: config1,\r\n gridMarker: view.perfMarker,\r\n },\r\n },\r\n });\r\n }\r\n}\r\n\r\nexport class PinterestImportLogConfig {\r\n constructor(view) {\r\n _.extend(this, {\r\n name: 'PinterestImportLogGrid',\r\n el: view.$('.pinterestImportLogGrid'),\r\n dataSource: view.getImportLogDataSourceConfig({isForVNext: true, isPinterestImport: true, supportedImportTypes: view.supportedImportTypes }),\r\n columns: getColumnsConfig(view),\r\n tableClasses: ['table', 'table-bordered'],\r\n tableAttributes: { 'aria-label': i18n.get('Scheduled_Import_History_Logs_Title') },\r\n pluginsConfig: {\r\n toolbar: getToolbarConfig(view),\r\n },\r\n plugins: {\r\n a11y: { i18n },\r\n uiBlocker: {\r\n el: view.$('.pinterestImportLogGrid'),\r\n },\r\n placeholder: {}, // use placeholder plugin to hide PageSize dropdown\r\n pagination: {\r\n pageSizeText: i18nGlobal.getString('Grid_ShowRows'),\r\n },\r\n perfMarker: {\r\n appConfig: config1,\r\n gridMarker: view.perfMarker,\r\n },\r\n },\r\n });\r\n }\r\n}\r\n\r\nexport class FileImportLogConfig {\r\n constructor(view) {\r\n _.extend(this, {\r\n name: 'FileImportLogGrid',\r\n el: view.$('.fileImportLogGrid'),\r\n dataSource: view.getMemoryDataSourceConfig(),\r\n columns: getColumnsConfig(view).filter((item) => {\r\n return item.name !== 'CreatedBy';\r\n }), // we don't show CreatedBy column for file import since it has no such data\r\n tableClasses: ['table', 'table-bordered'],\r\n plugins: {\r\n a11y: { i18n },\r\n uiBlocker: {\r\n el: view.$('.fileImportLogGrid'),\r\n },\r\n placeholder: {}, // use placeholder plugin to hide PageSize dropdown\r\n pagination: {\r\n pageSizeText: i18nGlobal.getString('Grid_ShowRows'),\r\n },\r\n perfMarker: {\r\n appConfig: config1,\r\n gridMarker: view.perfMarker,\r\n },\r\n },\r\n });\r\n }\r\n}\r\n\r\nexport function getGridSwitchToolbarConfig(view) {\r\n return {\r\n classes: ['log-toolbar', 'grid-toolbar'],\r\n items: view.supportedImportTypes[IMPORT_TYPE.googleimport] && Object.keys(view.supportedImportTypes).length === 1 ? [{\r\n type: 'button',\r\n text: i18n.getString('CampaignImport_Refresh'),\r\n iconLeft: ['spiritedimage', 'refresh-icon'],\r\n onClick: () => {\r\n view.refreshGrid();\r\n },\r\n }] : [{\r\n type: 'selector',\r\n classes: ['grid-groupmenu-container', 'dropdown', 'grid-toolbar-front-theme'],\r\n button: {\r\n classes: ['grid-menu-container', 'grid-colchooser', 'dropdown-toggle'],\r\n iconRight: ['spritedimage toolbar-icon icon-arrowdown-normal'],\r\n },\r\n items: [\r\n getGridSwitchDropdownItem(view, i18n.getString('Scheduled_Import_Logs_Google_Imports'), true),\r\n getGridSwitchDropdownItem(view, i18n.getString('Scheduled_Import_Logs_File_Imports'), false),\r\n ],\r\n onChange: (item) => {\r\n view.setImportType(item.value);\r\n },\r\n },\r\n {\r\n type: 'button',\r\n text: i18n.getString('CampaignImport_Refresh'),\r\n iconLeft: ['spiritedimage', 'refresh-icon'],\r\n onClick: () => {\r\n view.refreshGrid();\r\n },\r\n }],\r\n };\r\n}\r\n","import ko from 'knockout';\r\n\r\nexport default function ViewModel() {\r\n this.showGoogleImportGrid = ko.observable(false);\r\n this.showFacebookImportGrid = ko.observable(false);\r\n this.showAmazonImportGrid = ko.observable(false);\r\n this.showPinterestImportGrid = ko.observable(false);\r\n this.showFileImportGrid = ko.observable(false);\r\n this.isFirstSwitch = ko.observable(true);\r\n\r\n this.showNoGoogleImportMsg = ko.observable(false);\r\n this.showNoFileImportMsg = ko.observable(false);\r\n this.showNoFacebookImportMsg = ko.observable(false);\r\n this.showNoAmazonImportMsg = ko.observable(false);\r\n this.showNoPinterestImportMsg = ko.observable(false);\r\n}\r\n","import Backbone from 'backbone';\r\n\r\nimport importSettingsTooltipTmpl from '@bingads-webui-campaign-legacy/scheduled-import/template/import-settings-tooltip.pug';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/import-campaigns');\r\n\r\nexport class ImportSettingsTooltipView extends Backbone.View {\r\n initialize({ formView }) {\r\n this.formView = formView;\r\n }\r\n\r\n render() {\r\n this.$el.html(importSettingsTooltipTmpl({\r\n i18n,\r\n }));\r\n\r\n this.$('.panel-body').append(this.formView.render().$el);\r\n\r\n return this;\r\n }\r\n\r\n remove() {\r\n this.formView.remove();\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport 'bootstrap';\r\nimport $ from 'jquery';\r\nimport ko from 'knockout';\r\nimport Promise from 'bluebird';\r\nimport _ from '@bingads-webui-component-legacy/extension/underscore';\r\n\r\nimport { GoogleLoginRepository, FacebookImportRepository, loadFacebookSdk } from '@bingads-webui-campaign/import-shared-repositories';\r\nimport { PinterestLoginRepository, PinterestImportRepository } from '@bingads-webui-campaign/pinterest-import';\r\nimport { dismissCallout } from '@bingads-webui-campaign/import-callout';\r\nimport { handleGoogleLoginAuthError, handleFacebookLoginError, handlePinterestLoginError } from '@bingads-webui-campaign/imports-core';\r\nimport { createDisabledUETSelectorClass } from '@bingads-webui-campaign/import-components';\r\nimport { ToolbarView } from '@bingads-webui/toolbar';\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\n\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport download from '@bingads-webui-campaign-legacy/import-campaigns/shared/download';\r\nimport showGooglePopup from '@bingads-webui-campaign-legacy/import-campaigns/shared/showGoogleLoginPopup';\r\nimport headerTemplateConfig from '@bingads-webui-campaign-legacy/bingadsgrid/config-preprocessor/header-template-config';\r\nimport { AmazonImportLogConfig, GoogleImportLogConfig, FacebookImportLogConfig, FileImportLogConfig, PinterestImportLogConfig, getGridSwitchToolbarConfig, getToolbarConfig } from '@bingads-webui-campaign-legacy/scheduled-import/view/import-log-grid-config';\r\nimport { a11yPlugin } from '@bingads-webui/projection-grid-a11y';\r\nimport { paginationPlugin } from '@bingads-webui/projection-grid-pagination';\r\nimport { placeholderPlugin } from '@bingads-webui/projection-grid-placeholder';\r\nimport tmpl from '@bingads-webui-campaign-legacy/scheduled-import/template/import-log-grid.pug';\r\nimport toolTipTmpl from '@bingads-webui-campaign-legacy/import-campaigns/template/lastImportTable/toolTip.pug';\r\nimport { uiBlockerPlugin } from '@bingads-webui/projection-grid-uiblocker';\r\nimport ViewModel from '@bingads-webui-campaign-legacy/scheduled-import/viewmodel/import-log-grid';\r\nimport { showError, showSuccess } from '@bingads-webui-component-legacy/toast/index';\r\nimport jsData from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport pgrid from '@bingads-webui-component-legacy/github/modules/projection-grid/module/projection-grid';\r\nimport UIBlocker from '@bingads-webui-component-legacy/uiblocker/service/uiBlocker';\r\nimport $http from '@bingads-webui-component-legacy/http/channel/core';\r\nimport odata from '@bingads-webui-component-legacy/http/channel/odata';\r\nimport { queryify } from '@bingads-webui/url-util';\r\nimport '@bingads-webui-static-legacy/extension/promise/withUiBlock';\r\nimport {\r\n ImportUpdateEntityPreference,\r\n ImportUserPreferences,\r\n ImportAppendDestUrlPreference,\r\n ImportSearchAndReplaceDestUrlPreference,\r\n AppendPreferencesForTrackingTemplate,\r\n SearchAndReplacePreferencesForTrackingTemplate,\r\n ImportPrefixAndSuffixForStringProperty,\r\n ImportSearchAndReplaceForStringProperty,\r\n ImportAdjustmentForNumericProperty,\r\n} from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport { perfMarkerPlugin } from '@bingads-webui-campaign/pgrid-performance-log';\r\n\r\nimport { getBlacklist } from '@bingads-webui-campaign-legacy/import-campaigns/spa/options-blacklist';\r\nimport { ImportSettingsTooltipView } from '@bingads-webui-campaign-legacy/scheduled-import/view/import-settings-tooltip';\r\n\r\nimport logger from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport constants from '@bingads-webui-static-legacy/instrumentation/constants';\r\n\r\nimport { IMPORT_TYPE, IMPORT_TYPE_TO_IMPORT_NAME } from '@bingads-webui-campaign-legacy/scheduled-import/view/import-type';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/import-campaigns');\r\n\r\nconst permissions = config.get('Permissions') || {};\r\n\r\nfunction debouncedVersion(func) { // prevent multiple click\r\n return _.debounce(func, 2000, true);\r\n}\r\n\r\nconst logMsg = (category, msg) => logger.logMessage([category], constants.LOGLEVEL.INFO, '/campaign/importcampaign', msg);\r\nconst logColumns = ({column, isMultiAccount, columnData, action, message}) => {\r\n logger.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, '/campaign/importcampaign', `column:${column}, ExecutionId:${isMultiAccount ? columnData.MultiAccountTaskExecutionId : columnData.Id}, ImportId:${columnData.ImportId}, TaskId:${columnData.TaskId}, MultiAccountTaskId:${isMultiAccount ? columnData.MultiAccountTaskId : null}, Action:${action}, Mes:${message}`);\r\n};\r\n\r\nexport default class View extends Backbone.View {\r\n initialize(options = {}) {\r\n if (options.perfMarker) {\r\n this.perfMarker = options.perfMarker.createChild('Import_Log_Grid_Load');\r\n this.perfMarker.willInit();\r\n }\r\n this.importType = options.importType;\r\n this.viewModel = new ViewModel();\r\n this.isMultiAccount = options.isMultiAccount;\r\n this.isSmartAccount = options.isSmartAccount || false; // default value is used for MAE\r\n this.isUPSmartAccount = options.isUPSmartAccount || false; // default value is used for MAE\r\n this.supportedImportTypes = options.supportedImportTypes || { [IMPORT_TYPE.googleimport]: IMPORT_TYPE_TO_IMPORT_NAME[IMPORT_TYPE.googleimport] }; // default value is used for MAE\r\n this.isForVNext = options.isForVNext;\r\n this.importChannelType = options.importChannelType;\r\n this.scope = options.scope;\r\n this.toolbarConfig = getToolbarConfig(this);\r\n this.updateToolbarTextForVNext = options.updateToolbarTextForVNext;\r\n this.router = options.router;\r\n this.getImportLogDataSourceConfig = options.getImportLogDataSourceConfig;\r\n this.getMemoryDataSourceConfig = options.getMemoryDataSourceConfig;\r\n this.updateTaskItemSessionId = options.updateTaskItemSessionId;\r\n this.findImportTaskItem = options.findImportTaskItem;\r\n this.updateMemoryGrid = options.updateMemoryGrid;\r\n this.overridingEvent = options.overridingEvent;\r\n this.importOptionsFormLoader = options.importOptionsFormLoader;\r\n this.summaryTableLoader = options.summaryTableLoader;\r\n this.uetTagSelectorViewLoader = options.uetTagSelectorViewLoader;\r\n this.newI18n = options.newI18n;\r\n this.logColumns = logColumns;\r\n }\r\n\r\n events() {\r\n return _.defaults({}, this.overridingEvent, {\r\n 'click .import-settings.icon-info': 'showImportSettings',\r\n 'click .import-summary.icon-info, .import-actions.learn-more': 'showSummaryDetails',\r\n 'click .googleLogin': 'showGoogleLoginPopup',\r\n 'click .facebookLogin': 'showFacebookLoginPopup',\r\n 'click .pinterestLogin': 'showPinterestLoginPopup',\r\n 'click .download-error': 'downloadErrorFile',\r\n 'click .download-error-summary': 'downloadErrorSummaryFile',\r\n 'click .download-file': 'downloadUploadedFile',\r\n 'keypress input': 'onKeyPressed',\r\n 'click .btn__preview': debouncedVersion(this.previewAnImport),\r\n 'click .btn__cancel': debouncedVersion(this.cancelAnImport),\r\n });\r\n }\r\n\r\n refreshGrid() {\r\n if (this.viewModel.showGoogleImportGrid()) {\r\n if (this.googleImportGridRendered) {\r\n this.googleImportGrid.gridView.refresh(true);\r\n } else {\r\n this.googleImportGridRendered = true;\r\n this.googleImportGrid.gridView.render();\r\n }\r\n } else if (this.viewModel.showFacebookImportGrid()) {\r\n if (this.facebookImportGridRendered) {\r\n this.facebookImportGrid.gridView.refresh(true);\r\n } else {\r\n this.facebookImportGridRendered = true;\r\n this.facebookImportGrid.gridView.render();\r\n }\r\n } else if (this.viewModel.showAmazonImportGrid()) {\r\n if (this.amazonImportGridRendered) {\r\n this.amazonImportGrid.gridView.refresh(true);\r\n } else {\r\n this.amazonImportGridRendered = true;\r\n this.amazonImportGrid.gridView.render();\r\n }\r\n } else if (this.viewModel.showPinterestImportGrid()) {\r\n if (this.pinterestImportGridRendered) {\r\n this.pinterestImportGrid.gridView.refresh(true);\r\n } else {\r\n this.pinterestImportGridRendered = true;\r\n this.pinterestImportGrid.gridView.render();\r\n }\r\n } else {\r\n this.updateMemoryGrid(this);\r\n }\r\n }\r\n\r\n setImportType(importType = IMPORT_TYPE.googleimport) {\r\n if ((this.viewModel.showGoogleImportGrid() && importType === IMPORT_TYPE.googleimport) ||\r\n (this.viewModel.showFacebookImportGrid() && importType === IMPORT_TYPE.facebookimport) ||\r\n (this.viewModel.showAmazonImportGrid() && importType === IMPORT_TYPE.amazonImport) ||\r\n (this.viewModel.showPinterestImportGrid() && importType === IMPORT_TYPE.pinterestImport)) {\r\n // already displaying correct grid\r\n return;\r\n }\r\n\r\n this.importType = importType;\r\n\r\n // hide old grid, set new, and update new\r\n this.viewModel.showGoogleImportGrid(importType === IMPORT_TYPE.googleimport);\r\n this.viewModel.showFacebookImportGrid(importType === IMPORT_TYPE.facebookimport);\r\n this.viewModel.showAmazonImportGrid(importType === IMPORT_TYPE.amazonImport);\r\n this.viewModel.showPinterestImportGrid(importType === IMPORT_TYPE.pinterestImport);\r\n this.currentGrid = {\r\n [IMPORT_TYPE.googleimport]: this.googleImportGrid,\r\n [IMPORT_TYPE.facebookimport]: this.facebookImportGrid,\r\n [IMPORT_TYPE.amazonImport]: this.amazonImportGrid,\r\n [IMPORT_TYPE.pinterestImport]: this.pinterestImportGrid,\r\n }[importType] || this.fileImportGrid;\r\n this.refreshGrid();\r\n }\r\n\r\n setErrorFilterPredicate(showAllImports) {\r\n logger.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, '/campaign/importcampaign',\r\n `Setting filter in import log grid. Show all imports: ${showAllImports}`);\r\n\r\n // for legacy UI, ignore facebook import settings\r\n this.importType = showAllImports ? IMPORT_TYPE.googleimport : IMPORT_TYPE.fileimport;\r\n\r\n if (showAllImports) {\r\n this.predicate = () => true;\r\n } else {\r\n this.predicate = (execution) => execution.ErrorCount > 0 || (execution.Status === 'Failed' && execution.ImportStatus !== 'Cancelled');\r\n }\r\n }\r\n\r\n onKeyPressed(event) {\r\n const RETURN_CODE = 13;\r\n\r\n if (event.which === RETURN_CODE) {\r\n event.preventDefault();\r\n const pageText = this.currentGrid.pagination.$('input.form-control.page-number-input');\r\n\r\n if (pageText) {\r\n this.currentGrid.pagination.viewModel.pageNumberText(pageText.val());\r\n }\r\n }\r\n }\r\n\r\n showGoogleLoginPopup(e) {\r\n logMsg(constants.LOGCATEGORY.TRACE, 'click Google_Sign_In_Link');\r\n\r\n const data = this.getColumnData(e);\r\n\r\n dismissCallout();\r\n\r\n if (permissions.UseJsGapiClientOnImportLogGrid) {\r\n logMsg(constants.LOGCATEGORY.TRACE, `GSILocal: ${permissions.dynamic.GSILocal}`);\r\n window.require(['ext/google/gsi'], () => {\r\n const google = window.google;\r\n const taskId = data.TaskId;\r\n\r\n const loginRepo = new GoogleLoginRepository({\r\n deps: {\r\n google,\r\n GSILocal: permissions.dynamic.GSILocal,\r\n },\r\n });\r\n\r\n new Promise((resolve, reject) => {\r\n loginRepo.googleSignIn({\r\n onSuccess: resolve,\r\n onFail: reject,\r\n useConsentPrompt: true,\r\n });\r\n }).then(({ code }) => {\r\n logMsg(constants.LOGCATEGORY.TRACE, 'login Google_Sign_In_Success');\r\n\r\n const getGoogleSessionUrlTmpl =\r\n 'ImportSession/StartGoogleSession(CustomerId=:customer_id,AccountId=:account_id)?authCode={{AuthCode}}&redirectUri=postmessage';\r\n const requestUrl = _.template(getGoogleSessionUrlTmpl)({ AuthCode: code });\r\n\r\n odata.post(requestUrl, { data: ''})\r\n .then((sessionId) => {\r\n return this.updateTaskItemSessionId(taskId, sessionId, logMsg);\r\n });\r\n })\r\n .catch((error) => {\r\n logMsg(constants.LOGCATEGORY.TRACE,\r\n `failed to login to google on logs grid with gsi, err: ${JSON.stringify(error)}`);\r\n\r\n // do not show any error message if the popup is closed by user\r\n if (error && error.authErrors === 'popup_closed') {\r\n return;\r\n }\r\n\r\n // show Google login error message\r\n showError(handleGoogleLoginAuthError(error, this.newI18n));\r\n })\r\n .finally(withUiBlock());\r\n });\r\n } else {\r\n showGooglePopup(`/campaign/GoogleOAuth2/DirectToGoogleAuthorizationServer?cid=${config.get('CurrentCustomer').Id}&uid=${config.get('CurrentUser').Id}&aid=${config.get('CurrentAccount').Id}&userId=${encodeURIComponent(data.GoogleAccountName)}`, 'GoogleOAuth', 450, 650, _.partial(this.updateTaskItemSessionId, data.TaskId));\r\n }\r\n }\r\n\r\n showFacebookLoginPopup(e) {\r\n logMsg(constants.LOGCATEGORY.TRACE, 'click Facebook_Sign_In_Link');\r\n\r\n const {TaskId: taskId} = this.getColumnData(e) || {};\r\n const currentUser = config.get('CurrentUser');\r\n\r\n dismissCallout();\r\n\r\n loadFacebookSdk().then((sdk) => {\r\n if (sdk === null) {\r\n logMsg(constants.LOGCATEGORY.ERROR, 'Failed to load Facebook script.');\r\n return;\r\n }\r\n\r\n const facebookRepo = new FacebookImportRepository({ deps: {\r\n FB: sdk,\r\n odata,\r\n config,\r\n defaultLogActivity: {\r\n trace: (msg) => logMsg(constants.LOGCATEGORY.TRACE, msg),\r\n error: (msg) => logMsg(constants.LOGCATEGORY.ERROR, msg),\r\n },\r\n i18n,\r\n edm: { currentAccount: {} },\r\n jsData,\r\n }});\r\n\r\n facebookRepo.login({\r\n onSuccess: ({accessToken}) => {\r\n logMsg(constants.LOGCATEGORY.TRACE, 'login Facebook_Sign_In_Success');\r\n\r\n facebookRepo.refreshScheduledFacebookImportTaskItemSessionId(\r\n accessToken,\r\n taskId,\r\n currentUser,\r\n ).then(() => {\r\n logMsg(constants.LOGCATEGORY.TRACE, 'login Facebook_Credentials_Update_Success');\r\n\r\n showSuccess(i18n.get('Scheduled_Import_Facebook_GAuth_Edit_Success'));\r\n }).catch((error) => {\r\n logMsg(constants.LOGCATEGORY.TRACE, `Facebook_Credentials_Update_Error: ${JSON.stringify(error)}`);\r\n\r\n showError(i18n.get('GenericErrorMessage'));\r\n });\r\n },\r\n onPermissionsDeclined: ({ declinedScopesAndDesc = [], userID}) => {\r\n const declinedPerms = declinedScopesAndDesc.map((ds) => ds.name).join(', ');\r\n\r\n logMsg(constants.LOGCATEGORY.TRACE,\r\n `user (${userID}) decliened permissions: ${declinedPerms || ''}, could not editing import`);\r\n\r\n // show permission error\r\n showError(handleFacebookLoginError({ authErrors: 'FacebookImport_Permission_Denied_Error' }, this.newI18n));\r\n },\r\n onFail: (error) => {\r\n logMsg(constants.LOGCATEGORY.ERROR,\r\n `could not sign into Facebook for editing import: ${JSON.stringify(error)}`);\r\n\r\n // do not show any error message if the popup is closed by user\r\n if (error && error.status === 'unknown') {\r\n return;\r\n }\r\n\r\n // show Facebook login error message\r\n showError(handleFacebookLoginError(error, this.newI18n));\r\n },\r\n rerequest: true,\r\n });\r\n });\r\n }\r\n\r\n showPinterestLoginPopup(e) {\r\n logMsg(constants.LOGCATEGORY.TRACE, 'click Pinterest_Sign_In_Link');\r\n\r\n const { TaskId: taskId } = this.getColumnData(e) || {};\r\n const currentUser = config.get('CurrentUser');\r\n\r\n dismissCallout();\r\n\r\n const pinterestLoginRepo = new PinterestLoginRepository(config);\r\n const deps = {\r\n odata,\r\n config,\r\n defaultLogActivity: {\r\n trace: (msg) => logMsg(constants.LOGCATEGORY.TRACE, msg),\r\n error: (msg) => logMsg(constants.LOGCATEGORY.ERROR, msg),\r\n },\r\n i18n,\r\n edm: { currentAccount: {} },\r\n jsData,\r\n };\r\n const pinterestImportRepo = new PinterestImportRepository({ deps });\r\n\r\n pinterestLoginRepo.login()\r\n .then((authCode) => {\r\n logMsg(constants.LOGCATEGORY.TRACE, 'login Pinterest_Sign_In_Success');\r\n\r\n return pinterestImportRepo.startPinterestSession(authCode);\r\n })\r\n .then((sessionId) => {\r\n return this.findImportTaskItem(taskId).then((taskItem) => {\r\n const data = {\r\n ...taskItem,\r\n PinterestImportContext: {\r\n ...taskItem.PinterestImportContext,\r\n SessionId: sessionId,\r\n PinterestSessionUserId: (currentUser && currentUser.Id) || taskItem.PinterestImportContext.PinterestSessionUserId,\r\n },\r\n };\r\n\r\n return pinterestImportRepo.updateScheduledImportTaskItem(data, taskId);\r\n });\r\n })\r\n .then(() => {\r\n logMsg(constants.LOGCATEGORY.TRACE, 'login Pinterest_Credentials_Update_Success');\r\n\r\n showSuccess(i18n.get('Scheduled_Import_Pinterest_GAuth_Edit_Success'));\r\n })\r\n .catch((res) => {\r\n logMsg(constants.LOGCATEGORY.ERROR,\r\n `could not sign into Pinterest for editing import: ${JSON.stringify(res)}`);\r\n\r\n // do not show any error message if the popup is closed by user\r\n if (res && res.error === 'popup_closed_by_user') {\r\n return;\r\n }\r\n\r\n // show Pinterest login error message\r\n showError(handlePinterestLoginError(res, this.newI18n));\r\n });\r\n }\r\n\r\n render() {\r\n this.$el.html(tmpl({\r\n noGoogleImportMsg: i18n.get('Scheduled_Import_Log_Empty_GoogleImport'),\r\n noFacebookImportMsg: i18n.get('Scheduled_Import_Log_Empty_FacebookImport'),\r\n noAmazonImportMsg: i18n.get('Scheduled_Import_Log_Empty_AmazonImport'),\r\n noPinterestImportMsg: i18n.get('Scheduled_Import_Log_Empty_PinterestImport'),\r\n noFileImportMsg: i18n.get('Scheduled_Import_Log_Empty_FileImport'),\r\n }));\r\n ko.applyBindings(this.viewModel, this.el);\r\n\r\n this.googleImportGrid = this.initGrid(new GoogleImportLogConfig(this));\r\n this.fileImportGrid = this.initGrid(new FileImportLogConfig(this));\r\n\r\n this.fileImportGrid.gridView.render();\r\n\r\n // render facebook import log grid\r\n if (this.supportedImportTypes[IMPORT_TYPE.facebookimport]) {\r\n this.facebookImportGrid = this.initGrid(new FacebookImportLogConfig(this));\r\n // this.facebookImportGrid.gridView.render();\r\n }\r\n\r\n if (this.supportedImportTypes[IMPORT_TYPE.amazonImport]) {\r\n this.amazonImportGrid = this.initGrid(new AmazonImportLogConfig(this));\r\n }\r\n\r\n if (this.supportedImportTypes[IMPORT_TYPE.pinterestImport]) {\r\n this.pinterestImportGrid = this.initGrid(new PinterestImportLogConfig(this));\r\n }\r\n\r\n // select grid based on importType\r\n switch (this.importType) {\r\n case IMPORT_TYPE.facebookimport:\r\n this.currentGrid = this.facebookImportGrid;\r\n this.viewModel.showFacebookImportGrid(true);\r\n break;\r\n case IMPORT_TYPE.amazonImport:\r\n this.currentGrid = this.amazonImportGrid;\r\n this.viewModel.showAmazonImportGrid(true);\r\n break;\r\n case IMPORT_TYPE.pinterestImport:\r\n this.currentGrid = this.pinterestImportGrid;\r\n this.viewModel.showPinterestImportGrid(true);\r\n break;\r\n case IMPORT_TYPE.fileimport:\r\n this.currentGrid = this.fileImportGrid;\r\n this.viewModel.showFileImportGrid(true);\r\n break;\r\n default:\r\n this.currentGrid = this.googleImportGrid;\r\n this.viewModel.showGoogleImportGrid(true);\r\n break;\r\n }\r\n\r\n this.currentGrid.gridView.render();\r\n\r\n if (!this.isForVNext) {\r\n this.toolbar = new ToolbarView(getGridSwitchToolbarConfig(this)).render();\r\n this.$('.log-toolbar').append(this.toolbar.$el);\r\n }\r\n\r\n this.refreshGrid();\r\n\r\n return this;\r\n }\r\n\r\n initGrid(gridConfig) {\r\n let grid = pgrid.factory({ vnext: true })\r\n .use(perfMarkerPlugin)\r\n .use(a11yPlugin)\r\n .use(paginationPlugin)\r\n .use(placeholderPlugin)\r\n .use(uiBlockerPlugin);\r\n\r\n grid = grid.create(_.flow([headerTemplateConfig])(gridConfig));\r\n\r\n this.initUpdateFinishedEventListener(grid);\r\n\r\n return grid;\r\n }\r\n\r\n initUpdateFinishedEventListener(grid) {\r\n grid.gridView.on('didUpdate', () => {\r\n const hasNoResult = grid.gridView.countRows === 0;\r\n\r\n // make sure pagination does not render before first file import grid loads\r\n if (this.viewModel.isFirstSwitch() && !this.viewModel.showGoogleImportGrid() && !this.viewModel.showFacebookImportGrid() && !this.viewModel.showAmazonImportGrid() && !this.viewModel.showPinterestImportGrid()) {\r\n this.viewModel.isFirstSwitch(false);\r\n }\r\n\r\n this.viewModel.showNoGoogleImportMsg(this.importType === IMPORT_TYPE.googleimport && hasNoResult);\r\n this.viewModel.showNoFacebookImportMsg(this.importType === IMPORT_TYPE.facebookimport && hasNoResult);\r\n this.viewModel.showNoAmazonImportMsg(this.importType === IMPORT_TYPE.amazonImport && hasNoResult);\r\n this.viewModel.showNoPinterestImportMsg(this.importType === IMPORT_TYPE.pinterestImport && hasNoResult);\r\n this.viewModel.showNoFileImportMsg(this.importType === IMPORT_TYPE.fileimport && hasNoResult);\r\n });\r\n }\r\n\r\n showImportSettings(e) {\r\n if ($(e.currentTarget).data('showTooltip')) {\r\n // there is already tooltip showing.\r\n return;\r\n }\r\n\r\n const target = e.target;\r\n let tooltipView;\r\n let $targetTooltip;\r\n const columnData = this.getColumnData(e);\r\n const $parent = $(target).parent();\r\n const eventName = _.uniqueId('click.import.log.grid.');\r\n const subFieldsBlacklist = getBlacklist();\r\n\r\n if (columnData.Type === 'FileBasedImport') {\r\n subFieldsBlacklist.push('ImportAccountUrlOptions');\r\n subFieldsBlacklist.push('ImportDeletedEntities');\r\n subFieldsBlacklist.push('ImportNewOption_ImportNewAudienceTargets');\r\n subFieldsBlacklist.push('ImportUpdateEntityPreference_UpdateAudienceTargets');\r\n subFieldsBlacklist.push('ImportUET');\r\n subFieldsBlacklist.push('AssociatedUETTagId');\r\n }\r\n\r\n const options = JSON.parse(columnData.ImportUserPreference);\r\n\r\n function hideTooltip(event) {\r\n if (($(event.target).is($(target)) ||\r\n $(event.target).closest('[role=tooltip]', $parent).length) &&\r\n !$(event.target).closest('.close-image', $parent).length) {\r\n return true;\r\n }\r\n\r\n $(document).off(eventName);\r\n $(e.currentTarget).data('showTooltip', false);\r\n if ($targetTooltip) {\r\n $targetTooltip.tooltip('destroy');\r\n }\r\n tooltipView.remove();\r\n tooltipView = null;\r\n $targetTooltip = null;\r\n return false;\r\n }\r\n\r\n function showTooltip() {\r\n $(e.currentTarget).data('showTooltip', true);\r\n $targetTooltip = $(e.currentTarget).tooltip({\r\n html: true,\r\n title: tooltipView.el,\r\n template: toolTipTmpl({ i18n }),\r\n });\r\n $targetTooltip.tooltip('show');\r\n $parent.find('.closeimage').focus();\r\n\r\n $(document).on(eventName, hideTooltip);\r\n }\r\n\r\n this.importOptionsFormLoader.then(({ ImportOptionsForm }) => {\r\n this.uetTagSelectorViewLoader\r\n .then(({ UetTagSelectorView }) => {\r\n const searchAndReplaceSchema = _.clone(ImportSearchAndReplaceForStringProperty);\r\n // overriding schema here because import options still uses\r\n // old preference and we need to rename the name so options generated can be unique.\r\n\r\n searchAndReplaceSchema.name = 'SearchAndReplaceForCustomParameters';\r\n const findAndReplaceSuffixSchema = _.clone(ImportSearchAndReplaceForStringProperty);\r\n\r\n findAndReplaceSuffixSchema.name = 'SearchAndReplaceForFinalURLSuffix';\r\n tooltipView = new ImportSettingsTooltipView({\r\n formView: new ImportOptionsForm({\r\n jsonFormatImportOptions: options,\r\n deps: {\r\n i18n,\r\n config,\r\n schema: {\r\n ImportUpdateEntityPreference,\r\n ImportUserPreferences,\r\n LandingPageAppendPreference: ImportAppendDestUrlPreference,\r\n LandingPageReplacePreference: ImportSearchAndReplaceDestUrlPreference,\r\n AppendTrackingTemplatePreference: AppendPreferencesForTrackingTemplate,\r\n SearchAndReplacePreferencesForTrackingTemplate,\r\n ImportPrefixAndSuffixForStringProperty,\r\n ImportSearchAndReplaceForStringProperty,\r\n ImportAdjustmentForNumericProperty,\r\n SearchAndReplaceForCustomParameters: searchAndReplaceSchema,\r\n SearchAndReplaceForFinalURLSuffix: findAndReplaceSuffixSchema,\r\n },\r\n subFieldsBlacklist,\r\n isCustomerLevel: !!columnData.isCustomerLevel,\r\n isMultiAccountImport: this.isMultiAccount,\r\n UetTagSelectorView: createDisabledUETSelectorClass(UetTagSelectorView),\r\n },\r\n }),\r\n }).render();\r\n\r\n _.each(tooltipView.$('input[type=\"checkbox\"], input[type=\"text\"], select.input'), (input) => {\r\n $(input).attr('disabled', 'disabled');\r\n });\r\n\r\n tooltipView.$('#AdExtensionOptionsNoBmcMessage').hide();\r\n\r\n showTooltip();\r\n });\r\n });\r\n }\r\n\r\n showSummaryDetails(e) {\r\n this.summaryTableLoader.then(({ showSummaryDetailsPopup }) => {\r\n showSummaryDetailsPopup(e, this.getColumnData(e), i18n, this.findImportTaskItem);\r\n });\r\n }\r\n\r\n getColumnData(e) {\r\n return this.currentGrid.gridView.itemOfElement(e.target);\r\n }\r\n\r\n downloadErrorFile(e) {\r\n let data = this.getColumnData(e);\r\n\r\n logColumns({\r\n column: 'Import_History_Action',\r\n isMultiAccount: this.isMultiAccount,\r\n columnData: data,\r\n action: 'click',\r\n message: 'error file download link'\r\n });\r\n\r\n if (data && data.ErrorFileIdentifier) {\r\n download(data.ErrorFileIdentifier, 'ImportErrorFile');\r\n } else {\r\n logColumns({\r\n column: 'Import_History_Action',\r\n isMultiAccount: this.isMultiAccount,\r\n columnData: data,\r\n action: 'error',\r\n message: 'no error file data'\r\n });\r\n showError(i18n.get('GenericErrorMessage'));\r\n }\r\n }\r\n\r\n downloadErrorSummaryFile(e) {\r\n let data = this.getColumnData(e);\r\n\r\n logColumns({\r\n column: 'Import_History_Action',\r\n isMultiAccount: this.isMultiAccount,\r\n columnData: data,\r\n action: 'click',\r\n message: 'error summary file download link'\r\n });\r\n\r\n if (data && data.ErrorSummaryFileIdentifier) {\r\n download(data.ErrorSummaryFileIdentifier, 'ImportErrorFile');\r\n } else {\r\n logColumns({\r\n column: 'Import_History_Action',\r\n isMultiAccount: this.isMultiAccount,\r\n columnData: data,\r\n action: 'error',\r\n message: 'no error summary file data'\r\n });\r\n showError(i18n.get('GenericErrorMessage'));\r\n }\r\n }\r\n\r\n downloadUploadedFile(e) {\r\n let data = this.getColumnData(e);\r\n\r\n if (data && data.UploadFileIdentifier) {\r\n download(data.UploadFileIdentifier, 'ImportFile');\r\n } else {\r\n showError(i18n.get('GenericErrorMessage'));\r\n }\r\n }\r\n\r\n previewAnImport(e) {\r\n const data = this.getColumnData(e);\r\n\r\n logger.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, '/campaign/importcampaign',\r\n `Preview an import from log grid, import id: ${data.ImportId}`);\r\n\r\n if (this.isForVNext) {\r\n this.router.navigateToRoute('fileimport', { importId: data.ImportId });\r\n } else {\r\n const fileImportContinueUrl = '/campaign/ImportCampaign.m/FileImport';\r\n const redirectUrl = queryify(fileImportContinueUrl, { importId: data.ImportId });\r\n\r\n // redirect to file import page\r\n window.location.href = redirectUrl;\r\n }\r\n }\r\n\r\n cancelAnImport(e) {\r\n // Odata call is not ready yet. Use WCF call to unblock for the moment.\r\n const data = this.getColumnData(e);\r\n const blockerElem = this.$('.importLogGrid');\r\n\r\n this.UIBlockerToken = UIBlocker.block(blockerElem);\r\n\r\n logger.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, '/campaign/importcampaign',\r\n `Cancel an import from log grid, import id: ${data.ImportId}`);\r\n\r\n $http.post({\r\n url: '/campaign/ImportCampaign.m/CancelCurrentImport',\r\n data: {\r\n importId: data.ImportId,\r\n __RequestVerificationToken: $('input[name=\"__RequestVerificationToken\"]').val(),\r\n },\r\n contentType: 'application/x-www-form-urlencoded',\r\n }).bind(this).finally(() => {\r\n UIBlocker.unblock(blockerElem, this.UIBlockerToken);\r\n })\r\n .then(() => {\r\n this.refreshGrid();\r\n }).catch(() => {\r\n showError(i18n.get('GenericErrorMessage'));\r\n });\r\n }\r\n\r\n remove(...args) {\r\n this.googleImportGrid.gridView.remove();\r\n this.googleImportGrid.pagination.remove();\r\n if (this.facebookImportGrid && this.facebookImportGrid.gridView) {\r\n this.facebookImportGrid.gridView.remove();\r\n }\r\n if (this.facebookImportGrid && this.facebookImportGrid.pagination) {\r\n this.facebookImportGrid.pagination.remove();\r\n }\r\n if (this.amazonImportGrid && this.amazonImportGrid.gridView) {\r\n this.amazonImportGrid.gridView.remove();\r\n }\r\n if (this.amazonImportGrid && this.amazonImportGrid.pagination) {\r\n this.amazonImportGrid.pagination.remove();\r\n }\r\n if (this.pinterestImportGrid && this.pinterestImportGrid.gridView) {\r\n this.pinterestImportGrid.gridView.remove();\r\n }\r\n if (this.pinterestImportGrid && this.pinterestImportGrid.pagination) {\r\n this.pinterestImportGrid.pagination.remove();\r\n }\r\n this.fileImportGrid.gridView.remove();\r\n this.fileImportGrid.pagination.remove();\r\n\r\n if (this.toolbar) {\r\n this.toolbar.remove();\r\n }\r\n\r\n super.remove(...args);\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\nfunction isRedirected(windowObj) {\r\n try {\r\n if (windowObj.hasOwnProperty('isAuthSucceed')) {\r\n return true;\r\n }\r\n return false;\r\n } catch (e) {\r\n return false;\r\n }\r\n}\r\n\r\nexport default function(url, title, w, h, callback = _.noop, errorMessage = '') {\r\n const windowWidth = w || 450;\r\n const windowHeight = h || 650;\r\n\r\n let documentElement = document.documentElement;\r\n let screen = window.screen;\r\n\r\n // Multi Screen Popup Positioning (http://stackoverflow.com/a/16861050)\r\n // Credit: http://www.xtf.dk/2011/08/center-new-popup-window-even-on.html\r\n // Fixes dual-screen position Most browsers Firefox\r\n let dualScreenLeft = window.screenLeft === undefined ? screen.left : window.screenLeft;\r\n let dualScreenTop = window.screenTop === undefined ? window.screenTop : screen.top;\r\n\r\n let width = window.innerWidth || documentElement.clientWidth || screen.width;\r\n let height = window.innerHeight || documentElement.clientHeight || screen.height;\r\n\r\n\r\n let left = ((width - windowWidth) / 2) + dualScreenLeft;\r\n let top = ((height - windowHeight) / 2) + dualScreenTop;\r\n\r\n let newWindow = window.open(url, title, `resizable=yes, height=${windowHeight},width=${windowWidth},left=${left},top=${top}`);\r\n\r\n newWindow.focus();\r\n let timer = setInterval(() => {\r\n if (newWindow.closed) {\r\n window.clearInterval(timer);\r\n } else if (isRedirected(newWindow)) {\r\n window.clearInterval(timer);\r\n if (newWindow.isAuthSucceed === true) {\r\n callback(newWindow.googleAccount); //eslint-disable-line\r\n } else {\r\n callback(errorMessage); //eslint-disable-line\r\n }\r\n newWindow.close();\r\n }\r\n }, 100);\r\n}\r\n","import Promise from 'bluebird';\r\nimport _ from 'underscore';\r\n\r\nimport { getMemoryDataSourceConfig, getImportLogDataSourceConfig, updateTaskItemSessionId, findImportTaskItem, updateMemoryGrid } from './import-log-datasource-handler';\r\nimport ImportLogGridBase from './import-log-grid-base';\r\n\r\nexport default class View extends ImportLogGridBase {\r\n constructor(options = {}) {\r\n super(_.defaults(options, {\r\n getImportLogDataSourceConfig,\r\n getMemoryDataSourceConfig,\r\n updateTaskItemSessionId,\r\n findImportTaskItem,\r\n updateMemoryGrid,\r\n importOptionsFormLoader: new Promise((resolve) => {\r\n import(/* webpackMode: 'eager' */ '@bingads-webui-campaign/import-components').then((importOptions) => {\r\n resolve(importOptions);\r\n });\r\n }),\r\n summaryTableLoader: new Promise((resolve) => {\r\n import(/* webpackMode: 'eager' */ '@bingads-webui-campaign-legacy/scheduled-import/view/shared-column-configs/import-summary-col').then((summaryTable) => {\r\n resolve(summaryTable);\r\n });\r\n }),\r\n uetTagSelectorViewLoader: new Promise((resolve) => {\r\n import(/* webpackMode: 'eager' */ '@bingads-webui-campaign-legacy/audiences/components/uet-tag/index').then((uetTagSelector) => {\r\n resolve(uetTagSelector);\r\n });\r\n }),\r\n }));\r\n }\r\n}\r\n","import config from '@bingads-webui-component-legacy/config/index';\r\n\r\nconst permissions = config.get('Permissions');\r\n\r\nconst TEST_TYPE_SUFFIX = permissions && permissions.IsUseImportTestTypeForImportTaskExecutionEnabled ? 'Test' : '';\r\nconst FILTER_OUT_RUNNOW = 'IsRunNow eq false';\r\nconst FILTER_IMPORT_TYPE = `Type eq Enum.TaskItemType'Import${TEST_TYPE_SUFFIX}'`;\r\nconst FILTER_FACEBOOK_IMPORT_TYPE = `Type eq Enum.TaskItemType'FacebookImport${TEST_TYPE_SUFFIX}'`;\r\nconst FILTER_MULTIACCOUNT_IMPORT_TYPE = `Type eq Enum.TaskItemType'MultiAccountGoogleImport${TEST_TYPE_SUFFIX}'`;\r\nconst FILTER_AMAZON_IMPORT_TYPE = `Type eq Enum.TaskItemType'AmazonImport${TEST_TYPE_SUFFIX}'`;\r\nconst FILTER_PINTEREST_IMPORT_TYPE = `Type eq Enum.TaskItemType'PinterestImport${TEST_TYPE_SUFFIX}'`;\r\n\r\nexport const FILTER_ALL_ITEMS = `${FILTER_IMPORT_TYPE} and ${FILTER_OUT_RUNNOW}`;\r\nexport const FILTER_ALL_BUT_DELETED = `${FILTER_IMPORT_TYPE} and State ne Enum.TaskItemState'Deleted' and ${FILTER_OUT_RUNNOW}`;\r\nexport const FILTER_ALL_ITEMS_MULTIACCOUNT = `${FILTER_MULTIACCOUNT_IMPORT_TYPE} and ${FILTER_OUT_RUNNOW}`;\r\nexport const FILTER_ALL_BUT_DELETED_MULTIACCOUNT = `${FILTER_MULTIACCOUNT_IMPORT_TYPE} and State ne Enum.TaskItemState'Deleted' and ${FILTER_OUT_RUNNOW}`;\r\n\r\nexport const FILTER_ALL_FACEBOOK_ITEMS = `${FILTER_FACEBOOK_IMPORT_TYPE} and ${FILTER_OUT_RUNNOW}`;\r\nexport const FILTER_ALL_BUT_DELETED_FACEBOOK_ITEMS = `${FILTER_FACEBOOK_IMPORT_TYPE} and State ne Enum.TaskItemState'Deleted' and ${FILTER_OUT_RUNNOW}`;\r\n\r\nexport const FILTER_ALL_AMAZON_ITEMS = `${FILTER_AMAZON_IMPORT_TYPE} and ${FILTER_OUT_RUNNOW}`;\r\nexport const FILTER_ALL_BUT_DELETED_AMAZON_ITEMS = `${FILTER_AMAZON_IMPORT_TYPE} and State ne Enum.TaskItemState'Deleted' and ${FILTER_OUT_RUNNOW}`;\r\n\r\nexport const FILTER_ALL_PINTEREST_ITEMS = `${FILTER_PINTEREST_IMPORT_TYPE} and ${FILTER_OUT_RUNNOW}`;\r\nexport const FILTER_ALL_BUT_DELETED_PINTEREST_ITEMS = `${FILTER_PINTEREST_IMPORT_TYPE} and State ne Enum.TaskItemState'Deleted' and ${FILTER_OUT_RUNNOW}`;\r\n","import _ from 'underscore';\r\n\r\nimport { ACCOUNT_MODE } from '@bingads-webui-campaign/campaign-ui-common';\r\nimport { supportedRecommendationTypesList, importRecommendationListNameMap, importChannelNameMap } from '@bingads-webui-campaign/import-callout';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport dateUtil from '@bingads-webui-component-legacy/humanize/date';\r\nimport { showError } from '@bingads-webui-component-legacy/toast/index';\r\n\r\nimport odata from '@bingads-webui-static-legacy/communication/channel/odata';\r\nimport { bingadsGridColumn } from '@bingads-webui-component-legacy/bingads-grid/shared/column';\r\nimport statusColumnTmpl from '@bingads-webui-campaign-legacy/bingadsgrid/template/status-column.pug';\r\nimport creatorColumnTmpl from '@bingads-webui-campaign-legacy/scheduled-import/template/creator-column.pug';\r\nimport { importFreqColDataToTemplate } from '@bingads-webui-campaign-legacy/scheduled-import/view/shared-column-configs/import-freq-col';\r\nimport linkTmpl from '@bingads-webui-campaign-legacy/scheduled-import/template/link.pug';\r\nimport modeTmpl from '@bingads-webui-campaign-legacy/scheduled-import/template/import-mode.pug';\r\nimport nameTmpl from '@bingads-webui-campaign-legacy/scheduled-import/template/import-schedule-name.pug';\r\nimport acctTmpl from '@bingads-webui-campaign-legacy/scheduled-import/template/adwords-account-column.pug';\r\nimport taskTmpl from '@bingads-webui-campaign-legacy/scheduled-import/template/import-task-item-list-column.pug';\r\nimport runNowStatusColumnTmpl from '@bingads-webui-campaign-legacy/scheduled-import/template/import-schedule-run-now-status.pug';\r\nimport idTmpl from '@bingads-webui-campaign-legacy/scheduled-import/template/import-id.pug';\r\n\r\nimport popup from '@bingads-webui-component-legacy/dialog/popup';\r\n\r\nimport instrumentation from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport instrumentationConstants from '@bingads-webui-static-legacy/instrumentation/constants';\r\n\r\nimport * as constants from '@bingads-webui-campaign-legacy/scheduled-import/view/import-schedule-constants';\r\n\r\nimport { IMPORT_TYPE, IMPORT_TYPE_TO_IMPORT_NAME, getDefaultImportTypeOfFilter, getSupportedImportTypes } from '@bingads-webui-campaign-legacy/scheduled-import/view/import-type';\r\nimport { getImportButtonOptions } from './import-center-options';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/import-campaigns');\r\nconst i18nGlobal = window.globalLegacyI18n.get('component/i18n/loader!legacy/global');\r\n\r\n// value from AccountStatus enum\r\nconst INACTIVE_STATUS = 32;\r\n\r\nconst permissions = config.get('Permissions');\r\n\r\nexport const preferenceUploadButtonConfig = ({\r\n legacyI18n, lazyInject, publicPath, showTopOfGridPanel, disabled, perfMarker,\r\n}) => {\r\n return {\r\n id: 'upload_file',\r\n type: 'button',\r\n iconLeftGlyphName: 'ba-Upload',\r\n text: legacyI18n.getString('Import_PreferenceUpload_Button_Upload'),\r\n disabled,\r\n onClick: () => {\r\n const logTrace = (action, message) => {\r\n instrumentation.logMessage([instrumentationConstants.LOGCATEGORY.TRACE], instrumentationConstants.LOGLEVEL.INFO, '/campaign/importcampaign', `Import_Preference_Upload ${action} ${message}`);\r\n };\r\n\r\n logTrace('click', 'Upload_Import_Preference_Button');\r\n import(/* webpackMode: \"eager\" */'@bingads-webui-campaign-legacy/scheduled-import/view/preference-upload').then((preferenceUploadViewModule) => {\r\n const gridToolbar = lazyInject().gridToolbar;\r\n const preferenceUploadView = new preferenceUploadViewModule.PreferenceUploadView({\r\n i18n: legacyI18n,\r\n publicPath,\r\n logTrace,\r\n perfMarker,\r\n }).render();\r\n\r\n logTrace('render', 'Import_Preference_Upload_Panel');\r\n showTopOfGridPanel(preferenceUploadView);\r\n gridToolbar.gridToolbarGroup.hideAllToolbars();\r\n window.scrollTo(0, 0);\r\n\r\n preferenceUploadView.on('cancel', () => {\r\n logTrace('click', 'Cancel_Or_Close_Button');\r\n preferenceUploadView.remove();\r\n gridToolbar.gridToolbarGroup.showAllToolbars();\r\n });\r\n });\r\n },\r\n };\r\n};\r\n\r\nlet batchEditStatus = function(gridView, items, value, isMultiAccount, isForVNext, adoptResumeScheduleRecommendation) {\r\n if (items.length === 0) {\r\n popup.alert(i18nGlobal.getString('Grid_RowSelectionRequired'));\r\n return;\r\n }\r\n\r\n const ruleUrlTmpl = (ruleId) => {\r\n return `/Advertiser/Customers()/${isMultiAccount ? '' : 'Accounts()/'}TaskItems({{ruleId}})`.replace('{{ruleId}}', ruleId);\r\n };\r\n\r\n const action = {\r\n type: 'Patch',\r\n data: {\r\n '@odata.type': isMultiAccount ? '#Model.MultiAccountGoogleImportTaskItem' : '#Model.ImportTaskItem',\r\n State: value,\r\n },\r\n };\r\n let batchRequest = [];\r\n let index = 0;\r\n\r\n for (index; index < items.length; index++) {\r\n const item = items[index];\r\n const state = item && item.State && item.State.toString();\r\n\r\n if (state && state !== 'Deleted') {\r\n const url = ruleUrlTmpl(item.Id);\r\n\r\n batchRequest.push({\r\n type: action.type,\r\n data: _.extend({ Type: item.Type }, action.data),\r\n url,\r\n });\r\n }\r\n }\r\n\r\n if (_.size(batchRequest) > 0) {\r\n odata.ajaxBatch(batchRequest, (err, textStatus, data) => {\r\n if (err) {\r\n showError(i18n.get('GenericErrorMessage'));\r\n }\r\n if (data.some((item) => {\r\n return item.status === 200;\r\n })) {\r\n gridView.refresh(true);\r\n if (isForVNext) {\r\n gridView.deselectAll();\r\n }\r\n\r\n // adopt import callout card recommendation\r\n if (adoptResumeScheduleRecommendation) {\r\n adoptResumeScheduleRecommendation(value, items);\r\n }\r\n }\r\n });\r\n }\r\n};\r\n\r\nlet emailMapper = function(notificationType) {\r\n let arr = [\r\n { value: 'None', text: i18n.get('AutomatedRules_NotificationType_None')},\r\n { value: 'OnChange, OnError', text: i18n.get('AutomatedRules_NotificationType_OnChangeOrError')},\r\n { value: 'OnError', text: i18n.get('AutomatedRules_NotificationType_OnError')},\r\n { value: 'Always', text: i18n.get('Scheduled_Import_NotificationType_Always')},\r\n ];\r\n let result = _.find(arr, (obj) => obj.value === notificationType);\r\n\r\n return result ? result.text : null;\r\n};\r\n\r\nfunction updateToolbarText(toolbarConfig, filterText) {\r\n const filterConfig = toolbarConfig.get('filter');\r\n\r\n filterConfig.button.text = filterText;\r\n\r\n config.set('filter', filterConfig);\r\n}\r\n\r\nexport function getToolbarConfigForVNext(scope, lazyInject, importChannelType, showTopOfGridPanel, publicPath, perfMarker) {\r\n const isMultiAccount = scope && scope.values && scope.values.aid === undefined;\r\n const isSmartAccount = config.get('CurrentAccount').AccountMode === ACCOUNT_MODE.SMART;\r\n const isUPSmartAccount = config.get('CurrentAccount').AccountMode === ACCOUNT_MODE.UNIFIED_SMART;\r\n\r\n // get supported import types based on permissions and account status\r\n const supportedImportTypes = getSupportedImportTypes({ permissions, isMultiAccount, isSmartAccount, isUPSmartAccount });\r\n\r\n const isMixedImports = importChannelType === undefined;\r\n const isGoogleImportOnly = importChannelType === IMPORT_TYPE.googleimport;\r\n const isFacebookImportOnly = importChannelType === IMPORT_TYPE.facebookimport;\r\n const isAmazonImportOnly = importChannelType === IMPORT_TYPE.amazonImport;\r\n const isPinterestImportOnly = importChannelType === IMPORT_TYPE.pinterestImport;\r\n\r\n let historyGridFilterTitles;\r\n\r\n if (isMixedImports) {\r\n historyGridFilterTitles = _.extend({\r\n googleAll: supportedImportTypes[IMPORT_TYPE.googleimport] && Object.keys(supportedImportTypes).length === 1 ? i18n.getString('Scheduled_Import_All_Imports') : i18n.getString('Scheduled_Import_All_Google_Imports'),\r\n googleDeleted: supportedImportTypes[IMPORT_TYPE.googleimport] && Object.keys(supportedImportTypes).length === 1 ? i18n.getString('Scheduled_Import_Filter_Deleted') : i18n.getString('Scheduled_Import_All_Google_But_Deleted_Imports'),\r\n }, supportedImportTypes[IMPORT_TYPE.facebookimport] ? {\r\n facebookAll: i18n.getString('Scheduled_Import_All_Facebook_Imports'),\r\n facebookDeleted: i18n.getString('Scheduled_Import_All_Facebook_But_Deleted_Imports'),\r\n } : {}, supportedImportTypes[IMPORT_TYPE.amazonImport] ? {\r\n amazonAll: i18n.getString('Scheduled_Import_All_Amazon_Imports'),\r\n amazonDeleted: i18n.getString('Scheduled_Import_All_Amazon_But_Deleted_Imports'),\r\n } : {}, supportedImportTypes[IMPORT_TYPE.pinterestImport] ? {\r\n pinterestAll: i18n.getString('Scheduled_Import_All_Pinterest_Imports'),\r\n pinterestDeleted: i18n.getString('Scheduled_Import_All_Pinterest_But_Deleted_Imports'),\r\n } : {});\r\n } else {\r\n historyGridFilterTitles = _.extend({\r\n googleAll: i18n.getString('Scheduled_Import_All_Imports'),\r\n googleDeleted: i18n.getString('Scheduled_Import_Filter_Deleted'),\r\n }, supportedImportTypes[IMPORT_TYPE.facebookimport] ? {\r\n facebookAll: i18n.getString('Scheduled_Import_All_Imports'),\r\n facebookDeleted: i18n.getString('Scheduled_Import_Filter_Deleted'),\r\n } : {}, supportedImportTypes[IMPORT_TYPE.amazonImport] ? {\r\n amazonAll: i18n.getString('Scheduled_Import_All_Imports'),\r\n amazonDeleted: i18n.getString('Scheduled_Import_Filter_Deleted'),\r\n } : {}, supportedImportTypes[IMPORT_TYPE.pinterestImport] ? {\r\n pinterestAll: i18n.getString('Scheduled_Import_All_Imports'),\r\n pinterestDeleted: i18n.getString('Scheduled_Import_Filter_Deleted'),\r\n } : {});\r\n }\r\n\r\n // set default dropdown button filter text\r\n const importTypeOfFilter = getDefaultImportTypeOfFilter({\r\n isMultiAccount,\r\n importType: isMixedImports ? scope.values.importType : importChannelType,\r\n supportedImportTypes,\r\n });\r\n const filterText = {\r\n [IMPORT_TYPE.facebookimport]: historyGridFilterTitles.facebookDeleted,\r\n [IMPORT_TYPE.amazonImport]: historyGridFilterTitles.amazonDeleted,\r\n [IMPORT_TYPE.pinterestImport]: historyGridFilterTitles.pinterestDeleted,\r\n }[importTypeOfFilter] || historyGridFilterTitles.googleDeleted;\r\n\r\n return {\r\n toolbarSelectedConfig: _.reduce([\r\n ['edit', {\r\n id: 'edit',\r\n type: 'dropdown',\r\n iconLeftGlyphName: 'ba-Edit',\r\n button: {\r\n text: i18nGlobal.getString('LocationTargeting_SectionEdit'),\r\n },\r\n menu: {\r\n items: [\r\n {\r\n name: 'enable',\r\n type: 'button',\r\n iconLeft: ['icon-status-active'],\r\n iconLeftGlyphName: 'ba-RadioBullet2',\r\n text: i18n.getString('AutomatedRules_RulesManagementGrid_EnableRule'),\r\n onClick: () => {\r\n const { grid: { gridView }, isMultiAccount: ima, adoptResumeScheduleRecommendation } = lazyInject().backboneGridView;\r\n\r\n batchEditStatus(gridView, gridView.selectedItems(), 'Active', ima, true, adoptResumeScheduleRecommendation);\r\n },\r\n }, {\r\n name: 'pause',\r\n type: 'button',\r\n iconLeft: ['icon-status-pause'],\r\n iconLeftGlyphName: 'ba-PauseListView12',\r\n text: i18n.getString('AutomatedRules_RulesManagementGrid_PauseRule'),\r\n onClick: () => {\r\n const gridView = lazyInject().backboneGridView.grid.gridView;\r\n\r\n batchEditStatus(gridView, gridView.selectedItems(), 'Paused', lazyInject().backboneGridView.isMultiAccount, true);\r\n },\r\n }, {\r\n name: 'delete',\r\n type: 'button',\r\n iconLeft: ['icon-status-delete'],\r\n iconLeftGlyphName: 'ba-Delete',\r\n text: i18n.getString('AutomatedRules_RulesManagementGrid_DeleteRule'),\r\n onClick: () => {\r\n // eslint-disable-next-line no-alert, no-restricted-globals\r\n if (!confirm(i18n.getString('Scheduled_Import_DeleteConfirm'))) {\r\n return;\r\n }\r\n const gridView = lazyInject().backboneGridView.grid.gridView;\r\n\r\n batchEditStatus(gridView, gridView.selectedItems(), 'Deleted', lazyInject().backboneGridView.isMultiAccount, true);\r\n },\r\n }],\r\n },\r\n }],\r\n ['expander', {\r\n type: 'expander',\r\n }],\r\n ['button-clear-selection', {\r\n type: 'button-clear-selection',\r\n }],\r\n ],\r\n (map, [key, value]) => {\r\n map.set(key, value);\r\n return map;\r\n }\r\n , new Map()),\r\n toolbarUnselectedConfig: _.reduce(_.compact([\r\n !isMixedImports && getImportButtonOptions(i18n, importChannelType, lazyInject),\r\n !isMixedImports && ['upload', preferenceUploadButtonConfig({\r\n legacyI18n: i18n,\r\n lazyInject,\r\n publicPath,\r\n showTopOfGridPanel,\r\n disabled: permissions && permissions.IsReadOnlyUser,\r\n perfMarker,\r\n })],\r\n ['filter', {\r\n id: 'filter',\r\n type: 'dropdown',\r\n button: {\r\n text: filterText,\r\n },\r\n menu: {\r\n items: _.compact([\r\n (isMixedImports || isGoogleImportOnly) && {\r\n name: 'google-all',\r\n type: 'button',\r\n text: historyGridFilterTitles.googleAll,\r\n onClick: () => {\r\n lazyInject().backboneGridView.grid.gridView.set({\r\n dataSource: {\r\n query: {\r\n // eslint-disable-next-line no-nested-ternary\r\n $filter: lazyInject().backboneGridView.isMultiAccount ? constants.FILTER_ALL_ITEMS_MULTIACCOUNT : constants.FILTER_ALL_ITEMS,\r\n },\r\n },\r\n });\r\n lazyInject().backboneGridView.isFiltered = false;\r\n lazyInject().backboneGridView.importTypeOfFilter = IMPORT_TYPE.googleimport;\r\n lazyInject().updateUnselectedToolbarConfig(updateToolbarText(lazyInject().getUnselectedToolbarConfig(), historyGridFilterTitles.googleAll));\r\n },\r\n },\r\n (isMixedImports || isGoogleImportOnly) && {\r\n name: 'google-deleted',\r\n type: 'buttonMenuItem',\r\n text: historyGridFilterTitles.googleDeleted,\r\n onClick: () => {\r\n lazyInject().backboneGridView.grid.gridView.set({\r\n dataSource: {\r\n query: {\r\n // eslint-disable-next-line no-nested-ternary\r\n $filter: lazyInject().backboneGridView.isMultiAccount ? constants.FILTER_ALL_BUT_DELETED_MULTIACCOUNT : constants.FILTER_ALL_BUT_DELETED,\r\n },\r\n },\r\n });\r\n lazyInject().backboneGridView.isFiltered = true;\r\n lazyInject().backboneGridView.importTypeOfFilter = IMPORT_TYPE.googleimport;\r\n lazyInject().updateUnselectedToolbarConfig(updateToolbarText(lazyInject().getUnselectedToolbarConfig(), historyGridFilterTitles.googleDeleted));\r\n },\r\n },\r\n supportedImportTypes[IMPORT_TYPE.facebookimport] && (isFacebookImportOnly || isMixedImports) && {\r\n name: 'facebook-all',\r\n type: 'button',\r\n text: historyGridFilterTitles.facebookAll,\r\n onClick: () => {\r\n lazyInject().backboneGridView.grid.gridView.set({\r\n dataSource: {\r\n query: {\r\n $filter: constants.FILTER_ALL_FACEBOOK_ITEMS,\r\n },\r\n },\r\n });\r\n lazyInject().backboneGridView.isFiltered = false;\r\n lazyInject().backboneGridView.importTypeOfFilter = IMPORT_TYPE.facebookimport;\r\n lazyInject().updateUnselectedToolbarConfig(updateToolbarText(lazyInject().getUnselectedToolbarConfig(), historyGridFilterTitles.facebookAll));\r\n },\r\n },\r\n supportedImportTypes[IMPORT_TYPE.facebookimport] && (isFacebookImportOnly || isMixedImports) && {\r\n name: 'facebook-deleted',\r\n type: 'buttonMenuItem',\r\n text: historyGridFilterTitles.facebookDeleted,\r\n onClick: () => {\r\n lazyInject().backboneGridView.grid.gridView.set({\r\n dataSource: {\r\n query: {\r\n $filter: constants.FILTER_ALL_BUT_DELETED_FACEBOOK_ITEMS,\r\n },\r\n },\r\n });\r\n lazyInject().backboneGridView.isFiltered = true;\r\n lazyInject().backboneGridView.importTypeOfFilter = IMPORT_TYPE.facebookimport;\r\n lazyInject().updateUnselectedToolbarConfig(updateToolbarText(lazyInject().getUnselectedToolbarConfig(), historyGridFilterTitles.facebookDeleted));\r\n },\r\n },\r\n supportedImportTypes[IMPORT_TYPE.amazonImport] && (isAmazonImportOnly || isMixedImports) && {\r\n name: 'amazon-all',\r\n type: 'button',\r\n text: historyGridFilterTitles.amazonAll,\r\n onClick: () => {\r\n lazyInject().backboneGridView.grid.gridView.set({\r\n dataSource: {\r\n query: {\r\n $filter: constants.FILTER_ALL_AMAZON_ITEMS,\r\n },\r\n },\r\n });\r\n lazyInject().backboneGridView.isFiltered = false;\r\n lazyInject().backboneGridView.importTypeOfFilter = IMPORT_TYPE.amazonImport;\r\n lazyInject().updateUnselectedToolbarConfig(updateToolbarText(lazyInject().getUnselectedToolbarConfig(), historyGridFilterTitles.amazonAll));\r\n },\r\n },\r\n supportedImportTypes[IMPORT_TYPE.amazonImport] && (isAmazonImportOnly || isMixedImports) && {\r\n name: 'amazon-deleted',\r\n type: 'buttonMenuItem',\r\n text: historyGridFilterTitles.amazonDeleted,\r\n onClick: () => {\r\n lazyInject().backboneGridView.grid.gridView.set({\r\n dataSource: {\r\n query: {\r\n $filter: constants.FILTER_ALL_BUT_DELETED_AMAZON_ITEMS,\r\n },\r\n },\r\n });\r\n lazyInject().backboneGridView.isFiltered = true;\r\n lazyInject().backboneGridView.importTypeOfFilter = IMPORT_TYPE.amazonImport;\r\n lazyInject().updateUnselectedToolbarConfig(updateToolbarText(lazyInject().getUnselectedToolbarConfig(), historyGridFilterTitles.amazonDeleted));\r\n },\r\n },\r\n supportedImportTypes[IMPORT_TYPE.pinterestImport] && (isPinterestImportOnly || isMixedImports) && {\r\n name: 'pinterest-all',\r\n type: 'button',\r\n text: historyGridFilterTitles.pinterestAll,\r\n onClick: () => {\r\n lazyInject().backboneGridView.grid.gridView.set({\r\n dataSource: {\r\n query: {\r\n $filter: constants.FILTER_ALL_PINTEREST_ITEMS,\r\n },\r\n },\r\n });\r\n lazyInject().backboneGridView.isFiltered = false;\r\n lazyInject().backboneGridView.importTypeOfFilter = IMPORT_TYPE.pinterestImport;\r\n lazyInject().updateUnselectedToolbarConfig(updateToolbarText(lazyInject().getUnselectedToolbarConfig(), historyGridFilterTitles.pinterestAll));\r\n },\r\n },\r\n supportedImportTypes[IMPORT_TYPE.pinterestImport] && (isPinterestImportOnly || isMixedImports) && {\r\n name: 'pinterest-deleted',\r\n type: 'buttonMenuItem',\r\n text: historyGridFilterTitles.pinterestDeleted,\r\n onClick: () => {\r\n lazyInject().backboneGridView.grid.gridView.set({\r\n dataSource: {\r\n query: {\r\n $filter: constants.FILTER_ALL_BUT_DELETED_PINTEREST_ITEMS,\r\n },\r\n },\r\n });\r\n lazyInject().backboneGridView.isFiltered = true;\r\n lazyInject().backboneGridView.importTypeOfFilter = IMPORT_TYPE.pinterestImport;\r\n lazyInject().updateUnselectedToolbarConfig(updateToolbarText(lazyInject().getUnselectedToolbarConfig(), historyGridFilterTitles.pinterestDeleted));\r\n },\r\n },\r\n ]),\r\n },\r\n }],\r\n ['refresh', {\r\n id: 'refresh_schedule',\r\n type: 'button',\r\n iconLeftGlyphName: 'ba-Refresh',\r\n text: i18n.getString('CampaignImport_Refresh'),\r\n onClick: () => {\r\n lazyInject().backboneGridView.grid.gridView.refresh(true);\r\n },\r\n }],\r\n ]),\r\n (map, [key, value]) => {\r\n map.set(key, value);\r\n return map;\r\n }, new Map()),\r\n };\r\n}\r\n\r\nfunction getPluginsConfig(view) {\r\n return {\r\n toolbar: {\r\n container: view.$('.history-toolbar'),\r\n items: [\r\n {\r\n name: 'edit',\r\n type: 'dropdown',\r\n title: i18nGlobal.getString('LocationTargeting_SectionEdit'),\r\n level: 1,\r\n isNewFeature: false,\r\n items: [\r\n {\r\n name: 'enable',\r\n type: 'buttonMenuItem',\r\n leftIconClass: 'icon-status-active',\r\n text: i18n.getString('AutomatedRules_RulesManagementGrid_EnableRule'),\r\n action: (gridView) => {\r\n return view.batchEditCallback ?\r\n view.batchEditCallback(gridView, gridView.selectedItems(), 'Active') :\r\n batchEditStatus(gridView, gridView.selectedItems(), 'Active', view.isMultiAccount);\r\n },\r\n }, {\r\n name: 'pause',\r\n type: 'buttonMenuItem',\r\n leftIconClass: 'icon-status-pause',\r\n text: i18n.getString('AutomatedRules_RulesManagementGrid_PauseRule'),\r\n action: (gridView) => {\r\n return view.batchEditCallback ?\r\n view.batchEditCallback(gridView, gridView.selectedItems(), 'Paused') :\r\n batchEditStatus(gridView, gridView.selectedItems(), 'Paused', view.isMultiAccount);\r\n },\r\n }, {\r\n name: 'delete',\r\n type: 'buttonMenuItem',\r\n leftIconClass: 'icon-status-delete',\r\n text: i18n.getString('AutomatedRules_RulesManagementGrid_DeleteRule'),\r\n action: (gridView) => {\r\n return view.batchEditCallback ?\r\n view.batchEditCallback(gridView, gridView.selectedItems(), 'Deleted') :\r\n batchEditStatus(gridView, gridView.selectedItems(), 'Deleted', view.isMultiAccount);\r\n },\r\n }],\r\n }, {\r\n name: 'historyfilter',\r\n type: 'dropdown',\r\n title: i18n.getString('Scheduled_Import_Filter_Deleted'),\r\n level: 1,\r\n isNewFeature: false,\r\n items: [\r\n {\r\n name: 'all',\r\n type: 'buttonMenuItem',\r\n text: i18n.getString('Scheduled_Import_All_Imports'),\r\n action: {\r\n viewFactory: () => {\r\n view.grid.gridView.set({\r\n dataSource: {\r\n query: {\r\n $filter: view.isMultiAccount ? constants.FILTER_ALL_ITEMS_MULTIACCOUNT : constants.FILTER_ALL_ITEMS,\r\n },\r\n },\r\n });\r\n view.isFiltered = false;\r\n },\r\n setMenuTitle: {\r\n text: i18n.getString('Scheduled_Import_All_Imports'),\r\n pos: 1,\r\n },\r\n },\r\n }, {\r\n name: 'deleted',\r\n type: 'buttonMenuItem',\r\n text: i18n.getString('Scheduled_Import_Filter_Deleted'),\r\n action: {\r\n viewFactory: () => {\r\n view.grid.gridView.set({\r\n dataSource: {\r\n query: {\r\n $filter: view.isMultiAccount ? constants.FILTER_ALL_BUT_DELETED_MULTIACCOUNT : constants.FILTER_ALL_BUT_DELETED,\r\n },\r\n },\r\n });\r\n view.isFiltered = true;\r\n },\r\n setMenuTitle: {\r\n text: i18n.getString('Scheduled_Import_Filter_Deleted'),\r\n pos: 1,\r\n },\r\n },\r\n }],\r\n }, {\r\n name: 'refresh',\r\n type: 'button',\r\n text: i18n.getString('CampaignImport_Refresh'),\r\n leftIconClass: 'spritedimage refresh-icon',\r\n action: () => {\r\n view.grid.gridView.refresh(true);\r\n },\r\n }],\r\n },\r\n };\r\n}\r\n\r\nfunction getColumnsConfig(isMultiAccount, isForVNext, importChannelType, isSmartAccount, isUPSmartAccount, supportedImportTypes) {\r\n let columns = _.compact([bingadsGridColumn({\r\n name: 'State',\r\n property: _.identity,\r\n title: 'AutomatedRules_RulesManagementGrid_Status',\r\n helpId: 'pop_BA_Import_ScheduleStatus',\r\n bodyClasses: ['col-State'],\r\n sortable: {\r\n key: 'State',\r\n },\r\n template: (local) => {\r\n const tmp = local.value.IsAutoFrequency || local.value.Cron ? statusColumnTmpl : runNowStatusColumnTmpl;\r\n\r\n return tmp({\r\n Status: local.value.State,\r\n i18n: i18nGlobal,\r\n });\r\n },\r\n i18n,\r\n }), (importChannelType !== undefined || (permissions && permissions.dynamic && permissions.dynamic.ImportPreferenceUpload && !isMultiAccount)) && bingadsGridColumn({\r\n name: 'Id',\r\n property: _.identity,\r\n title: 'Scheduled_Import_Task_ID',\r\n bodyClasses: ['col-Id'],\r\n template: (local) => {\r\n return idTmpl({\r\n id: local.value.Id,\r\n });\r\n },\r\n i18n,\r\n }), bingadsGridColumn({\r\n name: 'Name',\r\n property: 'Name',\r\n title: 'Scheduled_Import_Name',\r\n bodyClasses: ['col-Name'],\r\n template: (local) => {\r\n return nameTmpl({\r\n Name: local.value || i18nGlobal.get('QualityScore_NA'),\r\n });\r\n },\r\n i18n,\r\n }), bingadsGridColumn({\r\n name: 'CreatedBy',\r\n title: 'AutomatedRules_RulesManagementGrid_CreatedBy',\r\n property: _.identity,\r\n bodyClasses: ['col-CreatedBy'],\r\n template: (local) => {\r\n return creatorColumnTmpl({\r\n Creator: local.value.ModifiedBy && local.value.ModifiedBy.Name,\r\n DateTime: dateUtil.format(new Date(local.value.CreatedAt), 'dddd, MMMM d, yyyy', config.get('culture')),\r\n Time: dateUtil.format(new Date(local.value.CreatedAt), 'hh:mm:ss tt', config.get('culture')),\r\n });\r\n },\r\n i18n,\r\n }), isMultiAccount ? bingadsGridColumn({\r\n name: 'ImportTaskItemList',\r\n property: 'ImportTaskItemList',\r\n title: 'Import_LastImport_AdWordsAccount',\r\n bodyClasses: ['col-AdWordsImportContext'],\r\n template: () => {\r\n return taskTmpl({\r\n i18n,\r\n className: 'import-schedule-accounts',\r\n });\r\n },\r\n i18n,\r\n }) : bingadsGridColumn({\r\n name: 'AdWordsImportContext',\r\n property: supportedImportTypes[IMPORT_TYPE.facebookimport] || supportedImportTypes[IMPORT_TYPE.amazonImport] || supportedImportTypes[IMPORT_TYPE.pinterestImport] ? (item) => {\r\n return item.AdWordsImportContext || item.FacebookImportContext || item.AmazonImportContext || item.PinterestImportContext;\r\n } : 'AdWordsImportContext',\r\n title: (() => {\r\n const IsFacebookImportEnabled = supportedImportTypes[IMPORT_TYPE.facebookimport];\r\n const IsAmazonImportEnabled = supportedImportTypes[IMPORT_TYPE.amazonImport];\r\n const IsPinterestImportEnabled = supportedImportTypes[IMPORT_TYPE.pinterestImport];\r\n\r\n if (supportedImportTypes[IMPORT_TYPE.googleimport] && Object.keys(supportedImportTypes).length === 1) {\r\n return i18n.get('Import_LastImport_AdWordsAccount');\r\n } else if (IsFacebookImportEnabled || IsAmazonImportEnabled || IsPinterestImportEnabled) {\r\n let enabledImportTypes = 'Google';\r\n\r\n if (importChannelType === undefined) {\r\n enabledImportTypes = enabledImportTypes.concat(IsFacebookImportEnabled ? '/Meta' : '')\r\n .concat(IsAmazonImportEnabled ? '/Amazon' : '')\r\n .concat(IsPinterestImportEnabled ? '/Pinterest' : '');\r\n } else if (IsFacebookImportEnabled && importChannelType === IMPORT_TYPE.facebookimport) {\r\n enabledImportTypes = 'Meta';\r\n } else if (IsAmazonImportEnabled && importChannelType === IMPORT_TYPE.amazonImport) {\r\n enabledImportTypes = 'Amazon';\r\n } else if (IsPinterestImportEnabled && importChannelType === IMPORT_TYPE.pinterestImport) {\r\n enabledImportTypes = 'Pinterest';\r\n }\r\n return i18n.get('Import_LastImport_AdWordsAccount_Dynamic').replace('{0}', enabledImportTypes);\r\n }\r\n\r\n return i18n.get('Import_LastImport_AdWordsAccount');\r\n })(),\r\n bodyClasses: ['col-AdWordsImportContext'],\r\n template: (local) => {\r\n const context = local.value || {};\r\n let accountNumber;\r\n\r\n if (context.CustomerId) {\r\n accountNumber = `(${context.CustomerId})`;\r\n } else if ((supportedImportTypes[IMPORT_TYPE.facebookimport] || supportedImportTypes[IMPORT_TYPE.pinterestImport]) && context.AccountId) {\r\n accountNumber = `(${context.AccountId})`;\r\n } else if (supportedImportTypes[IMPORT_TYPE.amazonImport] && context.ProfileId) {\r\n accountNumber = `(${context.ProfileId})`;\r\n } else {\r\n accountNumber = '';\r\n }\r\n\r\n return acctTmpl({\r\n EmailAddress: context.AccountName || i18n.get('Import_LastImport_Dash'),\r\n AccountNumber: accountNumber,\r\n });\r\n },\r\n }), bingadsGridColumn({\r\n name: 'Frequency',\r\n property: _.identity,\r\n title: 'AutomatedRules_RuleAuthoring_Filter',\r\n helpId: 'pop_BA_Import_ScheduleWhen',\r\n bodyClasses: ['col-Frequency'],\r\n template: (local) => importFreqColDataToTemplate(local.value, i18n),\r\n i18n,\r\n }), permissions.IsSmartImportEnabled && !isMultiAccount && !isUPSmartAccount ? bingadsGridColumn({\r\n name: 'Mode',\r\n property: _.identity,\r\n title: 'Scheduled_Import_Mode_Column',\r\n bodyClasses: ['col-Mode'],\r\n template: (local) => {\r\n return modeTmpl({\r\n mode: local.value.IsSmartImport ? i18n.get('Scheduled_Import_Mode_Smart') : i18n.get('Scheduled_Import_Mode_Advanced'),\r\n });\r\n },\r\n i18n,\r\n }) : null, bingadsGridColumn({\r\n name: 'NotificationType',\r\n title: 'AutomatedRules_RulesManagementGrid_EmailNotification',\r\n property: 'NotificationType',\r\n helpId: 'pop_BA_Import_ScheduleEmail',\r\n bodyClasses: ['col-NotificationType'],\r\n template: (local) => {\r\n return emailMapper(local.value);\r\n },\r\n i18n,\r\n }), bingadsGridColumn({\r\n name: 'Action',\r\n title: 'AutomatedRules_RulesManagementGrid_Action',\r\n property: _.identity,\r\n helpId: 'pop_BA_Import_ScheduleAction',\r\n bodyClasses: ['col-Action'],\r\n template: (local) => {\r\n // since vNext has been GAed, smart import schedules are allowed to edit.\r\n const columnData = local.value;\r\n const allowEdit = !permissions.IsReadOnlyUser && (isMultiAccount || (config.get('CurrentAccount').Status !== INACTIVE_STATUS));\r\n const enableRunNowButton = (columnData.IsAutoFrequency || columnData.Cron) && columnData.State !== 'Deleted' && allowEdit;\r\n\r\n const importRecommendationListName = importRecommendationListNameMap(columnData);\r\n const importChannel = importChannelNameMap(importRecommendationListName);\r\n const supportedRecommendationTypes = supportedRecommendationTypesList();\r\n\r\n const logTrace = (action, type) => {\r\n instrumentation.logMessage([instrumentationConstants.LOGCATEGORY.TRACE], instrumentationConstants.LOGLEVEL.INFO, '/campaign/importcampaign', `Import_Recommendation ${columnData.Id} ${action} ${type} ${importChannel}`);\r\n };\r\n\r\n let showRecommendation;\r\n\r\n if (importRecommendationListName) {\r\n if (columnData[importRecommendationListName] && columnData[importRecommendationListName].length !== 0) {\r\n columnData[importRecommendationListName] = _.filter(\r\n columnData[importRecommendationListName],\r\n (recommendationType) => {\r\n const ifTypeSupported = supportedRecommendationTypes[importRecommendationListName].indexOf(recommendationType) !== -1;\r\n\r\n if (!ifTypeSupported) {\r\n logTrace('not_supported_in_UI', `${recommendationType}`);\r\n }\r\n return ifTypeSupported;\r\n },\r\n );\r\n }\r\n\r\n showRecommendation = isForVNext && permissions.IsSmartImportEnabled && columnData[importRecommendationListName] &&\r\n columnData[importRecommendationListName].length !== 0;\r\n\r\n if (showRecommendation) {\r\n if (isSmartAccount) {\r\n logTrace('belongTo', 'Smart_Campaigns_Import');\r\n } else if (isUPSmartAccount) {\r\n logTrace('belongTo', 'ESC_Import');\r\n }\r\n\r\n logTrace('has', columnData[importRecommendationListName]);\r\n }\r\n }\r\n\r\n return linkTmpl({\r\n edit: allowEdit && !isSmartAccount ? i18nGlobal.get('LocationTargeting_SectionEdit') : '',\r\n runNow: enableRunNowButton ? i18n.get('Import_RunNow') : '',\r\n dash: i18n.get('Import_LastImport_Dash'),\r\n recommendationText: i18n.get('Scheduled_Import_Recommendation_Text'),\r\n showRecommendation,\r\n });\r\n },\r\n i18n,\r\n })]);\r\n\r\n return columns;\r\n}\r\n\r\nexport class ImportScheduleGridConfig {\r\n constructor(view) {\r\n _.extend(this, {\r\n name: `${IMPORT_TYPE_TO_IMPORT_NAME[view.importTypeOfFilter] || IMPORT_TYPE_TO_IMPORT_NAME[IMPORT_TYPE.googleimport]}ImportScheduleGrid`,\r\n el: view.$('.importHistoryGrid'),\r\n dataSource: view.getDataSourceConfig(view),\r\n pluginsConfig: view.isForVNext ? {} : getPluginsConfig(view),\r\n plugins: {\r\n a11y: { i18n },\r\n uiBlocker: {\r\n el: view.$('.importHistoryGrid'),\r\n },\r\n placeholder: {},\r\n pagination: {\r\n pageSizeText: i18nGlobal.getString('Grid_ShowRows'),\r\n },\r\n perfMarker: {\r\n appConfig: config,\r\n gridMarker: view.perfMarker,\r\n },\r\n },\r\n rows: {\r\n classes: {\r\n 'disable': () => {\r\n return false;\r\n },\r\n },\r\n },\r\n columns: getColumnsConfig(view.isMultiAccount, view.isForVNext, view.importChannelType, view.isSmartAccount, view.isUPSmartAccount, view.supportedImportTypes),\r\n tableClasses: ['table', 'table-bordered'],\r\n tableAttributes: { 'aria-label': i18n.get('Scheduled_Import_History_Page_Title') },\r\n selection: {\r\n enabled: true,\r\n },\r\n });\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\nimport { ImportTaskItem, MultiAccountGoogleImportTaskItem } from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport edmCampaign from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport jsdataCampaign from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport { IMPORT_TYPE } from '@bingads-webui-campaign-legacy/scheduled-import/view/import-type';\r\nimport UpdateStatusView from '@bingads-webui-component-legacy/update-status/view/index';\r\nimport * as constants from './import-schedule-constants';\r\n\r\nexport function getImportScheduleDataSourceConfig({ isMultiAccount, importTypeOfFilter }) {\r\n if (isMultiAccount) {\r\n // eslint-disable-next-line no-param-reassign\r\n edmCampaign.customerIdType.useAdvertiserCustomerId = false;\r\n }\r\n\r\n // set default data query filter text\r\n let filterText;\r\n\r\n if (isMultiAccount) {\r\n filterText = constants.FILTER_ALL_BUT_DELETED_MULTIACCOUNT;\r\n } else {\r\n filterText = {\r\n [IMPORT_TYPE.facebookimport]: constants.FILTER_ALL_BUT_DELETED_FACEBOOK_ITEMS,\r\n [IMPORT_TYPE.amazonImport]: constants.FILTER_ALL_BUT_DELETED_AMAZON_ITEMS,\r\n [IMPORT_TYPE.pinterestImport]: constants.FILTER_ALL_BUT_DELETED_PINTEREST_ITEMS,\r\n }[importTypeOfFilter] || constants.FILTER_ALL_BUT_DELETED;\r\n }\r\n\r\n return {\r\n type: 'js-data',\r\n entity: jsdataCampaign.TaskItem,\r\n schema: isMultiAccount ? MultiAccountGoogleImportTaskItem : ImportTaskItem,\r\n query: {\r\n // eslint-disable-next-line no-nested-ternary\r\n $filter: filterText,\r\n },\r\n options: {\r\n entitySet: isMultiAccount ? edmCampaign.currentCustomer.TaskItems : edmCampaign.currentAccount.TaskItems,\r\n cacheResponse: false,\r\n },\r\n };\r\n}\r\n\r\nfunction getJsDataOptions({ isMultiAccount }) {\r\n if (isMultiAccount) {\r\n // eslint-disable-next-line no-param-reassign\r\n edmCampaign.customerIdType.useAdvertiserCustomerId = false;\r\n }\r\n\r\n return {\r\n adapter: 'odata',\r\n entitySet: isMultiAccount ? edmCampaign.currentCustomer.TaskItems : edmCampaign.currentAccount.TaskItems,\r\n urlParameters: {\r\n $expand: 'TaskItemExecutions',\r\n },\r\n };\r\n}\r\n\r\nexport function createRunNowImport({ body, isMultiAccount }) {\r\n return jsdataCampaign.TaskItem.create(body, getJsDataOptions({ isMultiAccount }));\r\n}\r\n\r\nexport function createUpdateStatusView(view, model) {\r\n return new UpdateStatusView(_.defaults({\r\n Id: model.Id,\r\n Grid: view.grid,\r\n Model: model,\r\n Status: model.State.valueOf(),\r\n afterChange: (e, value) => {\r\n view.grid.gridView.refresh(true);\r\n if (value !== model.State) {\r\n view.adoptResumeScheduleRecommendation(value, [model]);\r\n }\r\n },\r\n useStateInsteadOfStatus: true,\r\n addImportTypeToStatusUpdate: true,\r\n ignoreEmptyId: true,\r\n }, getJsDataOptions(view), {\r\n schema: view.isMultiAccount ? MultiAccountGoogleImportTaskItem : ImportTaskItem,\r\n }));\r\n}\r\n\r\n","import _ from 'underscore';\r\n\r\nconst levelClasses = {\r\n 0: ['grid-toolbar-highlight'],\r\n 1: ['grid-toolbar-front-theme'],\r\n 2: [],\r\n};\r\n\r\nexport const getClassesByLevel = (level) => {\r\n if (_.has(levelClasses, level)) {\r\n return levelClasses[level];\r\n }\r\n return [];\r\n};\r\n\r\nexport const getClassNameByLevel = (level) => getClassesByLevel(level).join(' ');\r\n\r\nexport const updateTool = (view, config) => {\r\n view.$el.addClass(_.union(getClassesByLevel(config.level), config.classes).join(' '));\r\n};\r\n","import _ from 'underscore';\r\nimport Button from '@bingads-webui-component-legacy/grid-toolbar/button';\r\nimport ButtonMenuItem from '@bingads-webui-component-legacy/grid-toolbar/buttonMenuItem';\r\nimport DividerMenuItem from '@bingads-webui-component-legacy/grid-toolbar/dividerMenuItem';\r\nimport DropDown from '@bingads-webui-component-legacy/grid-toolbar/dropdown';\r\nimport HeaderMenuItem from '@bingads-webui-component-legacy/grid-toolbar/headerMenuItem';\r\nimport {updateTool} from '@bingads-webui-campaign-legacy/bingadsgrid/shared/update-tool';\r\n\r\nlet factoryContainer = null;\r\n\r\nconst processAction = (action, toolBarView, gridView) => {\r\n if (_.isFunction(action)) {\r\n action(gridView);\r\n } else if (_.isObject(action)) {\r\n let view = action.viewFactory(gridView);\r\n\r\n view = view && view.render();\r\n\r\n if (action.setMenuTitle) {\r\n toolBarView.setMenuTitle(action.setMenuTitle);\r\n }\r\n\r\n if (_.isEmpty(view)) {\r\n return;\r\n }\r\n\r\n toolBarView.expand(view.el);\r\n if (action.shouldHideToolbar) {\r\n toolBarView.hideToolbar();\r\n }\r\n\r\n view.once('close', (arg) => {\r\n view.remove();\r\n toolBarView.showToolbar();\r\n if (arg && arg.refresh === true) {\r\n gridView.projection.update({\r\n deep: true,\r\n });\r\n }\r\n });\r\n view.once('createNew', (arg) => {\r\n view.remove();\r\n if (arg && arg.refresh === true) {\r\n gridView.projection.update({\r\n deep: true,\r\n });\r\n }\r\n processAction(action, toolBarView, gridView);\r\n });\r\n }\r\n};\r\n\r\nconst buttonMenuItemFactory = (btnMenuItemConfig, toolBarView, gridView) => {\r\n const toolItem = new ButtonMenuItem(btnMenuItemConfig);\r\n\r\n toolItem.on('click', _.partial(processAction, btnMenuItemConfig.action, toolBarView, gridView));\r\n toolItem.on('click:link', _.partial(processAction, btnMenuItemConfig.linkAction, toolBarView, gridView));\r\n\r\n updateTool(toolItem, btnMenuItemConfig);\r\n\r\n return toolItem;\r\n};\r\n\r\nconst buttonFactory = (btnConfig, toolBarView, gridView) => {\r\n const toolItem = new Button(btnConfig);\r\n\r\n toolItem.on('click', _.partial(processAction, btnConfig.action, toolBarView, gridView));\r\n\r\n updateTool(toolItem, btnConfig);\r\n\r\n return toolItem;\r\n};\r\n\r\nconst dropDownFactory = (dropdownConfig, toolBarView, gridView) => {\r\n const menuItems = _.map(dropdownConfig.items, (item) => {\r\n if (_.has(factoryContainer, item.type)) {\r\n let tmpView = factoryContainer[item.type](item, toolBarView, gridView);\r\n\r\n updateTool(tmpView, item);\r\n return tmpView;\r\n }\r\n return null;\r\n });\r\n\r\n let tmpDropdown = new DropDown({\r\n title: dropdownConfig.title,\r\n menuItems: _.compact(menuItems),\r\n isNewFeature: dropdownConfig.isNewFeature,\r\n isAvailable: dropdownConfig.isAvailable,\r\n });\r\n\r\n updateTool(tmpDropdown, dropdownConfig);\r\n\r\n return tmpDropdown;\r\n};\r\n\r\nconst dividerMenuItemFactory = () => {\r\n return new DividerMenuItem();\r\n};\r\n\r\nconst headerMenuItemFactory = (headerMenuItemConfig) => {\r\n return new HeaderMenuItem(headerMenuItemConfig);\r\n};\r\n\r\nfactoryContainer = {\r\n 'button': buttonFactory,\r\n 'dropdown': dropDownFactory,\r\n 'buttonMenuItem': buttonMenuItemFactory,\r\n 'dividerMenuItem': dividerMenuItemFactory,\r\n 'headerMenuItem': headerMenuItemFactory,\r\n};\r\n\r\nexport default factoryContainer;\r\n","import _ from 'underscore';\r\nimport GridToolbar from '@bingads-webui-component-legacy/grid-toolbar/gridToolbar';\r\nimport factoryContainer from '@bingads-webui-campaign-legacy/bingadsgrid/shared/control-factory';\r\nimport {updateTool} from '@bingads-webui-campaign-legacy/bingadsgrid/shared/update-tool';\r\n\r\nexport default function (toolNameList = []) {\r\n const dependencies = ['config', 'gridView'].concat(toolNameList);\r\n\r\n return function(definePlugin) {\r\n return definePlugin('toolbar', dependencies, (...args) => {\r\n const config = args.shift();\r\n\r\n const gridView = args.shift();\r\n const toolItems = args;\r\n\r\n let toolbarConfig = {\r\n el: config.pluginsConfig.toolbar.container,\r\n items: _.size(config.pluginsConfig.toolbar.items) > 0 ? [] : toolItems,\r\n };\r\n\r\n const toolBarView = new GridToolbar(toolbarConfig);\r\n\r\n const configToolItems = _.map(config.pluginsConfig.toolbar.items, (item) => {\r\n if (_.isString(item)) {\r\n const index = _.indexOf(toolNameList, item);\r\n\r\n if (index >= 0) {\r\n let tmpItem = toolItems[index];\r\n\r\n if (tmpItem) {\r\n updateTool(tmpItem, config.pluginsConfig[item]);\r\n }\r\n return tmpItem;\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n if (_.has(factoryContainer, item.type)) {\r\n return factoryContainer[item.type](item, toolBarView, gridView);\r\n }\r\n return null;\r\n });\r\n\r\n toolBarView.appendItems(_.compact(configToolItems));\r\n toolBarView.items.forEach((item) => {\r\n if (item.onAttachToolbar) {\r\n item.onAttachToolbar(toolBarView);\r\n }\r\n });\r\n return toolBarView;\r\n });\r\n };\r\n}\r\n","import ko from 'knockout';\r\n\r\nexport default function ViewModel() {\r\n this.showNoGoogleImportMsg = ko.observable(false);\r\n this.showNoFacebookImportMsg = ko.observable(false);\r\n this.showNoFilteredImportMsg = ko.observable(false);\r\n this.showNoAmazonImportMsg = ko.observable(false);\r\n this.showNoPinterestImportMsg = ko.observable(false);\r\n}\r\n","import { DeterministicWrapperView } from '@bingads-webui/deterministic-wrapper-view';\r\nimport { a11yPlugin } from '@bingads-webui/projection-grid-a11y';\r\nimport projectionGrid from 'projection-grid';\r\n\r\nexport class ImportScheduleAccountsDetailView extends DeterministicWrapperView {\r\n viewFactory({\r\n i18n,\r\n data,\r\n }) {\r\n const columns = [{\r\n bodyClasses: 'googleAccount',\r\n name: 'googleAccount',\r\n title: i18n.get('GoogleImport_MicrosoftAdvertising_GoogleAccounts'),\r\n }, {\r\n bodyClasses: 'bingAccount',\r\n name: 'bingAccount',\r\n title: i18n.get('GoogleImport_SelectMultiGoogleAccount_ImportToBingAccount'),\r\n }];\r\n\r\n const config = {\r\n dataSource: {\r\n type: 'memory',\r\n data,\r\n },\r\n columns,\r\n tableClasses: ['table', 'table-bordered'],\r\n plugins: {\r\n a11y: { i18n },\r\n },\r\n };\r\n\r\n this.grid = projectionGrid\r\n .factory({\r\n vnext: true,\r\n })\r\n .use(a11yPlugin)\r\n .create(config);\r\n\r\n return this.grid.gridView;\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport Promise from 'bluebird';\r\nimport $ from 'jquery';\r\nimport ko from 'knockout';\r\nimport _ from '@bingads-webui-component-legacy/extension/underscore';\r\n\r\nimport { GoogleLoginRepository, FacebookImportRepository, loadFacebookSdk } from '@bingads-webui-campaign/import-shared-repositories';\r\nimport { AmazonLoginRepository, AmazonImportRepository } from '@bingads-webui-campaign/amazon-import';\r\nimport { PinterestLoginRepository, PinterestImportRepository } from '@bingads-webui-campaign/pinterest-import';\r\nimport { handleGoogleLoginAuthError, handleFacebookLoginError, handleAmazonLoginError, handlePinterestLoginError } from '@bingads-webui-campaign/imports-core';\r\nimport { importRecommendationListNameMap, importChannelNameMap } from '@bingads-webui-campaign/import-callout';\r\nimport { perfMarkerPlugin } from '@bingads-webui-campaign/pgrid-performance-log';\r\n\r\nimport { PopoverView, contents } from '@bingads-webui/popover';\r\nimport { set } from '@bingads-webui/cookie';\r\n\r\nimport headerTemplateConfig from '@bingads-webui-campaign-legacy/bingadsgrid/config-preprocessor/header-template-config';\r\nimport { a11yPlugin } from '@bingads-webui/projection-grid-a11y';\r\nimport { paginationPlugin } from '@bingads-webui/projection-grid-pagination';\r\nimport { placeholderPlugin } from '@bingads-webui/projection-grid-placeholder';\r\nimport { ImportScheduleGridConfig } from '@bingads-webui-campaign-legacy/scheduled-import/view/import-schedule-grid-config';\r\nimport tmpl from '@bingads-webui-campaign-legacy/scheduled-import/template/import-schedule-grid.pug';\r\nimport toolbarPlugin from '@bingads-webui-campaign-legacy/bingadsgrid/plugin/toolbar';\r\nimport { uiBlockerPlugin } from '@bingads-webui/projection-grid-uiblocker';\r\nimport ViewModel from '@bingads-webui-campaign-legacy/scheduled-import/viewmodel/import-schedule-grid';\r\nimport cacheManager from '@bingads-webui-campaign-legacy/cache-manager/index';\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\nimport { notificationApi } from '@bingads-webui-react/notification-center';\r\n\r\nimport { assistedSelectionPlugin } from '@bingads-webui/projection-grid-assisted-selection';\r\nimport downloadService from '@bingads-webui-component-legacy/download/index';\r\nimport pgrid from '@bingads-webui-component-legacy/github/modules/projection-grid/module/projection-grid';\r\nimport odata from '@bingads-webui-component-legacy/http/channel/odata';\r\nimport { showError } from '@bingads-webui-component-legacy/toast/index';\r\nimport state from '@bingads-webui-component-legacy/state/index';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport UIBlocker from '@bingads-webui-component-legacy/uiblocker/service/uiBlocker';\r\n\r\nimport createImportTaskItemHelper from '@bingads-webui-campaign-legacy/import-campaigns/shared/import-task-item-helper';\r\n\r\nimport instrumentation from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport constants from '@bingads-webui-static-legacy/instrumentation/constants';\r\n\r\nimport { ImportScheduleAccountsDetailView } from '@bingads-webui-campaign-legacy/scheduled-import/view/import-schedule-accounts-detail-view';\r\n\r\nimport { logException, startPollingUntilImportStarted,\r\n cookieHelperForEditImport } from '@bingads-webui-campaign-legacy/import-campaigns/shared/import-helper';\r\n\r\nimport { IMPORT_TYPE, IMPORT_TYPE_TO_IMPORT_NAME } from '@bingads-webui-campaign-legacy/scheduled-import/view/import-type';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/import-campaigns');\r\n\r\nconst permissions = config.get('Permissions');\r\nconst GSILocal = permissions && permissions.dynamic && permissions.dynamic.GSILocal;\r\nconst CNMarketExpansion = permissions && permissions.dynamic && permissions.dynamic.CNMarketExpansion;\r\nconst BaiduFileImport = permissions && permissions.dynamic && permissions.dynamic.BaiduFileImport;\r\n\r\nconst promisifyStartPollingUntilImportStarted = ({\r\n taskItemExecutionId,\r\n showLoadingIcon,\r\n isMultiAccount,\r\n}) => {\r\n return new Promise((resolve) => {\r\n startPollingUntilImportStarted(taskItemExecutionId, resolve, showLoadingIcon, isMultiAccount);\r\n });\r\n};\r\n\r\nfunction gapiSignInSuccess(callback, newI18n, authCode) {\r\n const urlTmpl = 'ImportSession/StartGoogleSession(CustomerId=:advertisercustomer_id,AccountId=:account_id)?authCode={{AuthCode}}&redirectUri=postmessage';\r\n const url = _.template(urlTmpl)({ AuthCode: authCode.code });\r\n\r\n odata.post(url, { data: '' })\r\n .then((sessionId) => {\r\n if (sessionId) {\r\n callback(sessionId, true);\r\n return;\r\n } else {\r\n // show error\r\n showError(handleGoogleLoginAuthError({ authErrors: 'sign_in_error_offline_access' }, newI18n));\r\n }\r\n });\r\n}\r\n\r\nconst logMsg = (category, msg) => instrumentation.logMessage([category], constants.LOGLEVEL.INFO, '/campaign/importcampaign', msg);\r\n\r\nfunction reloginToGoogle(callback, newI18n) {\r\n window.require(['ext/google/gsi'], () => {\r\n logMsg(constants.LOGCATEGORY.TRACE, `GSILocal: ${GSILocal}`);\r\n const loginRepo = new GoogleLoginRepository({ deps: { google: window.google, GSILocal }});\r\n\r\n const blockerElem = document.documentElement;\r\n const UIBlockerToken = UIBlocker.block(blockerElem);\r\n\r\n new Promise((resolve, reject) => {\r\n loginRepo.googleSignIn({\r\n onSuccess: resolve,\r\n onFail: reject,\r\n });\r\n }).then(_.partial(gapiSignInSuccess, callback, newI18n))\r\n .catch((error) => {\r\n instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, '/campaign/importcampaign',\r\n `could not sign into AdWords for editing import: ${error && error.authErrors}`);\r\n\r\n // do not show any error message if the popup is closed by user\r\n if (error && error.authErrors === 'popup_closed') {\r\n return;\r\n }\r\n\r\n // show Google login error message\r\n showError(handleGoogleLoginAuthError(error, newI18n));\r\n }).finally(() => {\r\n UIBlocker.unblock(blockerElem, UIBlockerToken);\r\n });\r\n });\r\n}\r\n\r\nfunction reloginToAmazon(callback, newI18n) {\r\n const amazonLoginRepo = new AmazonLoginRepository();\r\n const deps = {\r\n odata,\r\n config,\r\n defaultLogActivity: {\r\n trace: (msg) => logMsg(constants.LOGCATEGORY.TRACE, msg),\r\n error: (msg) => logMsg(constants.LOGCATEGORY.ERROR, msg),\r\n },\r\n i18n,\r\n edm: { currentAccount: {} },\r\n };\r\n const amazonImportRepo = new AmazonImportRepository({ deps });\r\n\r\n amazonLoginRepo.login()\r\n .then((authCode) => amazonImportRepo.startAmazonSession(authCode, true))\r\n .then((sessionId) => {\r\n if (sessionId) {\r\n callback(sessionId, true);\r\n return;\r\n } else {\r\n // show error\r\n showError(handleAmazonLoginError({ error: 'amazon_already_signed_out' }, newI18n));\r\n }\r\n })\r\n .catch((res) => {\r\n logMsg(constants.LOGCATEGORY.ERROR,\r\n `could not sign into Amazon for editing import: ${res}`);\r\n\r\n // it seems that no error will return if the popup is closed by user\r\n // show Amazon login error message\r\n showError(handleAmazonLoginError(res, newI18n));\r\n });\r\n}\r\n\r\nfunction reloginToFacebook(callback, newI18n) {\r\n loadFacebookSdk().then((sdk) => {\r\n if (sdk === null) {\r\n logMsg(constants.LOGCATEGORY.ERROR, 'Failed to load Facebook script.');\r\n return;\r\n }\r\n\r\n const deps = {\r\n FB: sdk,\r\n odata,\r\n config,\r\n defaultLogActivity: {\r\n trace: (msg) => logMsg(constants.LOGCATEGORY.TRACE, msg),\r\n error: (msg) => logMsg(constants.LOGCATEGORY.ERROR, msg),\r\n },\r\n i18n,\r\n edm: { currentAccount: {} },\r\n };\r\n const facebookRepo = new FacebookImportRepository({ deps });\r\n let hasReLoggedIn = false;\r\n const login2FB = () => {\r\n if (hasReLoggedIn) {\r\n return;\r\n }\r\n hasReLoggedIn = true;\r\n facebookRepo.login({\r\n onSuccess: ({accessToken}) => {\r\n facebookRepo.startFacebookSession(accessToken).then(({ sessionId }) => {\r\n if (sessionId) {\r\n callback(sessionId, true);\r\n return;\r\n } else {\r\n // show error\r\n showError(handleFacebookLoginError({ authErrors: 'FacebookImport_Signin_General_Error' }, newI18n));\r\n }\r\n });\r\n },\r\n onPermissionsDeclined: ({ declinedScopesAndDesc = [], userID}) => {\r\n const declinedPerms = declinedScopesAndDesc.map((ds) => ds.name).join(', ');\r\n\r\n logMsg(constants.LOGCATEGORY.TRACE,\r\n `user (${userID}) decliened permissions: ${declinedPerms || ''}, could not editing import`);\r\n\r\n // show permission error\r\n showError(handleFacebookLoginError({ authErrors: 'FacebookImport_Permission_Denied_Error' }, newI18n));\r\n },\r\n onFail: (error) => {\r\n logMsg(constants.LOGCATEGORY.ERROR,\r\n `could not sign into Facebook for editing import: ${error && error.authErrors}`);\r\n\r\n // do not show any error message if the popup is closed by user\r\n if (error && error.status === 'unknown') {\r\n return;\r\n }\r\n\r\n // show Facebook login error message\r\n showError(handleFacebookLoginError(error, newI18n));\r\n },\r\n });\r\n };\r\n\r\n // logout first, then login again\r\n facebookRepo.logout({onSuccess: login2FB, onFail: login2FB});\r\n });\r\n}\r\n\r\nfunction reloginToPinterest(callback, newI18n) {\r\n const pinterestLoginRepo = new PinterestLoginRepository(config);\r\n const deps = {\r\n odata,\r\n config,\r\n defaultLogActivity: {\r\n trace: (msg) => logMsg(constants.LOGCATEGORY.TRACE, msg),\r\n error: (msg) => logMsg(constants.LOGCATEGORY.ERROR, msg),\r\n },\r\n i18n,\r\n edm: { currentAccount: {} },\r\n };\r\n const pinterestImportRepo = new PinterestImportRepository({ deps });\r\n\r\n pinterestLoginRepo.login()\r\n .then((authCode) => pinterestImportRepo.startPinterestSession(authCode))\r\n .then((sessionId) => {\r\n if (sessionId) {\r\n callback(sessionId, true);\r\n return;\r\n } else {\r\n // show error\r\n showError(handlePinterestLoginError({ error: 'pinterest_already_signed_out' }, newI18n));\r\n }\r\n })\r\n .catch((res) => {\r\n logMsg(constants.LOGCATEGORY.ERROR,\r\n `could not sign into Pinterest for editing import: ${res}`);\r\n\r\n // do not show any error message if the popup is closed by user\r\n if (res && res.error === 'popup_closed_by_user') {\r\n return;\r\n }\r\n\r\n // show Pinterest login error message\r\n showError(handlePinterestLoginError(res, newI18n));\r\n });\r\n}\r\n\r\nfunction gapiSignInMultiAccountSuccess(callback, newI18n, authCode) {\r\n const urlTmpl = 'ImportSession/StartGoogleSession(CustomerId=:customer_id,AccountId={{AccountId}})?authCode={{AuthCode}}&redirectUri=postmessage';\r\n const url = _.template(urlTmpl)({ AccountId: config.get('CurrentAccount').Id, AuthCode: authCode.code });\r\n\r\n odata.post(url, { data: '' })\r\n .then((sessionId) => {\r\n if (sessionId) {\r\n callback(sessionId, true);\r\n return;\r\n } else {\r\n // show error\r\n showError(handleGoogleLoginAuthError({ authErrors: 'sign_in_error_offline_access' }, newI18n));\r\n }\r\n });\r\n}\r\n\r\nexport default class View extends Backbone.View {\r\n initialize(options = {}) {\r\n if (options.perfMarker) {\r\n this.perfMarker = options.perfMarker.createChild('Import_Schedule_Grid_Load');\r\n this.perfMarker.willInit();\r\n }\r\n this.viewModel = new ViewModel();\r\n this.isMultiAccount = options.isMultiAccount;\r\n this.isSmartAccount = options.isSmartAccount || false; // default value is used for MAE\r\n this.isUPSmartAccount = options.isUPSmartAccount || false; // default value is used for MAE\r\n this.supportedImportTypes = options.supportedImportTypes || { [IMPORT_TYPE.googleimport]: IMPORT_TYPE_TO_IMPORT_NAME[IMPORT_TYPE.googleimport] }; // default value is used for MAE\r\n this.isForVNext = options.isForVNext;\r\n this.vNextToolbarPlugin = options.vNextToolbarPlugin;\r\n this.router = options.router;\r\n this.getDataSourceConfig = options.getDataSourceConfig;\r\n this.createRunNowImport = options.createRunNowImport;\r\n this.createUpdateStatusView = options.createUpdateStatusView;\r\n this.batchEditCallback = options.batchEditCallback;\r\n this.overridingEvent = options.overridingEvent;\r\n this.isFiltered = false;\r\n this.importTypeOfFilter = options.importTypeOfFilter;\r\n this.importChannelType = options.importChannelType;\r\n this.adoptResumeScheduleRecommendation = (status, scheduleItems) => options.adoptResumeScheduleRecommendation(\r\n odata,\r\n {\r\n trace: (msg) => logMsg(constants.LOGCATEGORY.TRACE, msg),\r\n error: (msg) => logMsg(constants.LOGCATEGORY.ERROR, msg),\r\n },\r\n status,\r\n scheduleItems,\r\n );\r\n this.newI18n = options.newI18n;\r\n\r\n // pilot logs\r\n logMsg(constants.LOGCATEGORY.TRACE, `CNMarketExpansion: ${CNMarketExpansion}`);\r\n logMsg(constants.LOGCATEGORY.TRACE, `BaiduFileImport: ${BaiduFileImport}`);\r\n }\r\n\r\n events() {\r\n return _.defaults({}, this.overridingEvent, {\r\n 'click .col-State .statuschangehover': 'changeStatus',\r\n 'click .edit-task': this.isMultiAccount ? 'editMultiAccountImportTaskItem' : 'editImportTaskItem',\r\n 'click .run-now': this.isMultiAccount ?\r\n _.debounce(this.runMultiAccountImportNow.bind(this), 1000, true) :\r\n _.debounce(this.runImportNow.bind(this), 1000, true),\r\n 'click .download-file': 'downloadUploadedFile',\r\n 'keypress input': 'onKeyPressed',\r\n 'click .import-schedule-accounts-detail': 'viewAccountsDetails',\r\n });\r\n }\r\n\r\n viewAccountsDetails(event) {\r\n let model = this.getColumnData(event);\r\n\r\n const data = _.map(model.ImportTaskItemList, ({\r\n AccountName,\r\n AccountNumber,\r\n AdWordsImportContext: { AccountName: googleAccount, CustomerId },\r\n }) => ({\r\n googleAccount: `${googleAccount} (${CustomerId})`,\r\n bingAccount: `${AccountName} (${AccountNumber})`,\r\n }));\r\n\r\n const targetRect = event.target.getBoundingClientRect();\r\n\r\n new PopoverView({\r\n target: this.$(event.target),\r\n position: {\r\n isAbsolute: true,\r\n left: targetRect.right,\r\n top: targetRect.top,\r\n },\r\n containerClassName: ['GoogleAdsAccountView'],\r\n }).setContent(new contents.TitledContent()\r\n .setTitle('')\r\n .setBody(new ImportScheduleAccountsDetailView({i18n, data})));\r\n }\r\n\r\n onKeyPressed(event) {\r\n const RETURN_CODE = 13;\r\n\r\n if (event.which === RETURN_CODE) {\r\n event.preventDefault();\r\n const pageText = this.grid.pagination.$('input.form-control.page-number-input');\r\n\r\n if (pageText) {\r\n this.grid.pagination.viewModel.pageNumberText(pageText.val());\r\n }\r\n }\r\n }\r\n\r\n changeStatus(e) {\r\n e.stopPropagation();\r\n let model = this.getColumnData(e);\r\n\r\n if (this.updateStatusView) {\r\n this.updateStatusView.remove();\r\n this.updateStatusView = null;\r\n }\r\n\r\n this.updateStatusView = this.createUpdateStatusView(this, model).render();\r\n\r\n $(e.target).closest('td', this.el).append(this.updateStatusView.el);\r\n }\r\n\r\n getColumnData(e) {\r\n return this.grid.gridView.itemOfElement(e.target);\r\n }\r\n\r\n clickStatusIcon() {\r\n this.indicator = true;\r\n }\r\n\r\n checkEditButton() {\r\n const selectedItems = this.grid.gridView.selectedItems();\r\n const editDropDown = this.grid.toolbar.items[0];\r\n const enableEdit = _.find(selectedItems, (item) => {\r\n return item && item.State.toString() !== 'Deleted';\r\n });\r\n\r\n if (enableEdit) {\r\n editDropDown.enable();\r\n } else {\r\n editDropDown.disable();\r\n }\r\n }\r\n\r\n renderGrid(gridConfig, useQuickFilter) {\r\n this.grid = pgrid\r\n .factory({ vnext: true })\r\n .use(perfMarkerPlugin)\r\n .use(a11yPlugin)\r\n .use(paginationPlugin)\r\n .use(placeholderPlugin)\r\n .use(uiBlockerPlugin)\r\n .use(assistedSelectionPlugin);\r\n\r\n if (useQuickFilter) {\r\n this.grid = this.grid.use(toolbarPlugin(['quickFilter']));\r\n } else if (this.isForVNext) {\r\n this.grid = this.grid.use(this.vNextToolbarPlugin.plugin);\r\n } else {\r\n this.grid = this.grid.use(toolbarPlugin());\r\n }\r\n\r\n this.grid = this.grid.create(_.flow([headerTemplateConfig])(gridConfig));\r\n if (!this.isForVNext) {\r\n this.grid.toolbar.render();\r\n }\r\n this.grid.gridView.render();\r\n\r\n this.grid.gridView.on('didUpdate', () => {\r\n const hasNoResult = this.grid.gridView.countRows === 0;\r\n const filterCheck = this.isFiltered;\r\n\r\n this.viewModel.showNoGoogleImportMsg(this.importTypeOfFilter === IMPORT_TYPE.googleimport && !filterCheck && hasNoResult);\r\n this.viewModel.showNoFacebookImportMsg(this.importTypeOfFilter === IMPORT_TYPE.facebookimport && !filterCheck && hasNoResult);\r\n this.viewModel.showNoAmazonImportMsg(this.importTypeOfFilter === IMPORT_TYPE.amazonImport && !filterCheck && hasNoResult);\r\n this.viewModel.showNoPinterestImportMsg(this.importTypeOfFilter === IMPORT_TYPE.pinterestImport && !filterCheck && hasNoResult);\r\n this.viewModel.showNoFilteredImportMsg(filterCheck && hasNoResult);\r\n\r\n if (!this.isForVNext) {\r\n this.checkEditButton();\r\n }\r\n });\r\n }\r\n\r\n render() {\r\n this.$el.html(tmpl({\r\n noImportMsgHeader: i18n.get('Scheduled_Import_History_EmptyHeader'),\r\n noGoogleImportMsg: i18n.get('Scheduled_Import_History_EmptyBody'),\r\n noFacebookImportMsg: i18n.get('Scheduled_Import_History_EmptyBody_Facebook'),\r\n noAmazonImportMsg: i18n.get('Scheduled_Import_History_EmptyBody_Amazon'),\r\n noPinterestImportMsg: i18n.get('Scheduled_Import_History_EmptyBody_Pinterest'),\r\n noFilteredImportMsg: i18n.get('Grid_NoFilteredRecords'),\r\n }));\r\n ko.applyBindings(this.viewModel, this.el);\r\n\r\n const gridConfig = new ImportScheduleGridConfig(this);\r\n\r\n this.renderGrid(gridConfig, false);\r\n if (!this.isForVNext) {\r\n this.grid.gridView.on('didSelect', this.checkEditButton.bind(this));\r\n }\r\n\r\n return this;\r\n }\r\n\r\n handleActionForScheduledImport(model, callback, isRunnow = false) {\r\n if (!model || (!model.AdWordsImportContext && !model.FacebookImportContext && !model.AmazonImportContext && !model.PinterestImportContext)) {\r\n instrumentation.logMessage([constants.LOGCATEGORY.ERROR], constants.LOGLEVEL.INFO, '/campaign/importcampaign', 'Bad model or context');\r\n return;\r\n }\r\n\r\n const currentUserId = _.propertyOf(config.get('CurrentUser'))('Id');\r\n const isFacebookImport = this.supportedImportTypes[IMPORT_TYPE.facebookimport] && model && model['@odata.type'] === '#Model.FacebookTaskItem';\r\n const isAmazonImport = this.supportedImportTypes[IMPORT_TYPE.amazonImport] && model && model['@odata.type'] === '#Model.AmazonImportTaskItem';\r\n const isPinterestImport = this.supportedImportTypes[IMPORT_TYPE.pinterestImport] && model && model['@odata.type'] === '#Model.PinterestImportTaskItem';\r\n\r\n if (model.ModifiedBy.Id === currentUserId) {\r\n if (isFacebookImport) {\r\n callback(model.FacebookImportContext.SessionId);\r\n return;\r\n } else if (isAmazonImport) {\r\n callback(model.AmazonImportContext.SessionId);\r\n return;\r\n } else if (isPinterestImport) {\r\n callback(model.PinterestImportContext.SessionId);\r\n return;\r\n } else if (isRunnow || (model.AdWordsImportContext && model.AdWordsImportContext.SessionType !== 'CloudImport')) {\r\n // Add login confirmation if the task is from MAE to relogin the user into webui\r\n // Run now job of MAE can trigger directly.\r\n callback(model.AdWordsImportContext.SessionId);\r\n return;\r\n }\r\n }\r\n\r\n instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, '/campaign/importcampaign',\r\n ` Session Type:${model && model.AdWordsImportContext && model.AdWordsImportContext.SessionType}\r\n ModifiedById: ${model && model.ModifiedBy.Id}\r\n currentUserId: ${currentUserId}\r\n isFacebookImport: ${isFacebookImport}\r\n isAmazonImport: ${isAmazonImport}\r\n isPinterestImport: ${isPinterestImport}\r\n `);\r\n\r\n // ask user to relogin\r\n if (isFacebookImport) {\r\n reloginToFacebook(callback, this.newI18n);\r\n } else if (isAmazonImport) {\r\n reloginToAmazon(callback, this.newI18n);\r\n } else if (isPinterestImport) {\r\n reloginToPinterest(callback, this.newI18n);\r\n } else {\r\n reloginToGoogle(callback, this.newI18n);\r\n }\r\n }\r\n\r\n handleActionForMultiAccountScheduledImport(model, callback) {\r\n const currentUserId = _.propertyOf(config.get('CurrentUser'))('Id');\r\n\r\n if (model.ModifiedBy.Id === currentUserId) {\r\n callback(model.SessionId);\r\n return;\r\n } else {\r\n window.require(['ext/google/gsi'], () => {\r\n logMsg(constants.LOGCATEGORY.TRACE, `GSILocal: ${GSILocal}`);\r\n const loginRepo = new GoogleLoginRepository({ deps: { google: window.google, GSILocal }});\r\n\r\n new Promise((resolve, reject) => {\r\n loginRepo.googleSignIn({\r\n onSuccess: resolve,\r\n onFail: reject,\r\n });\r\n }).then(_.partial(gapiSignInMultiAccountSuccess, callback, this.newI18n))\r\n .catch((error) => {\r\n instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, '/campaign/AccountsSummary',\r\n `could not sign into AdWords for editing import: ${error && error.authErrors}`);\r\n\r\n // do not show any error message if the popup is closed by user\r\n if (error && error.authErrors === 'popup_closed') {\r\n return;\r\n }\r\n\r\n // show Google login error message\r\n showError(handleGoogleLoginAuthError(error, this.newI18n));\r\n })\r\n .finally(withUiBlock());\r\n });\r\n }\r\n }\r\n\r\n editImportTaskItem(e) {\r\n const model = this.getColumnData(e);\r\n\r\n this.goToGoogleImportWizard({\r\n model,\r\n });\r\n }\r\n\r\n goToGoogleImportWizard({\r\n model, importStep = '',\r\n }) {\r\n const aid = state.get('account_id');\r\n const cid = state.get('customer_id');\r\n const uid = state.get('user_id');\r\n const taskItemId = model.Id;\r\n let navigator = null;\r\n\r\n if (this.isForVNext) {\r\n let routeName;\r\n\r\n if (this.supportedImportTypes[IMPORT_TYPE.facebookimport] && model['@odata.type'] === '#Model.FacebookTaskItem') {\r\n routeName = 'facebookimport';\r\n } else if (this.supportedImportTypes[IMPORT_TYPE.amazonImport] && model['@odata.type'] === '#Model.AmazonImportTaskItem') {\r\n routeName = 'amazonimport';\r\n } else if (this.supportedImportTypes[IMPORT_TYPE.pinterestImport] && model['@odata.type'] === '#Model.PinterestImportTaskItem') {\r\n routeName = 'pinterestimport';\r\n } else {\r\n routeName = 'googleimport';\r\n }\r\n\r\n const params = { taskItemId };\r\n\r\n if (_.isString(importStep) && !_.isEmpty(importStep)) {\r\n params.importStep = importStep;\r\n }\r\n\r\n navigator = _.partial(this.router.navigateToRoute, routeName, params);\r\n } else {\r\n const returnUrl = `/Campaign/ImportCampaign/GoogleImport?cid=${cid}&uid=${uid}&aid=${aid}&taskItemId=${taskItemId}`;\r\n\r\n navigator = _.partial(this.navigateToUrl, returnUrl);\r\n }\r\n\r\n this.handleActionForScheduledImport(model, _.partial(this.setDestination, navigator, taskItemId));\r\n }\r\n\r\n editMultiAccountImportTaskItem(e) {\r\n const model = this.getColumnData(e);\r\n const cid = state.get('customer_id');\r\n const uid = state.get('user_id');\r\n const taskItemId = model.Id;\r\n let navigator = null;\r\n\r\n if (this.isForVNext) {\r\n navigator = _.partial(this.router.navigateToRoute, 'googleimport');\r\n } else {\r\n const returnUrl = `/Campaign/AccountsSummary?cid=${cid}&uid=${uid}#customer/${cid}/import-accounts/googleImport`;\r\n\r\n navigator = _.partial(this.navigateToUrl, returnUrl);\r\n }\r\n\r\n // reserve task item id in cookie\r\n set('multi-account-scheduled-import-task-item-id', taskItemId);\r\n this.handleActionForMultiAccountScheduledImport(model, _.partial(this.setDestination, navigator, taskItemId));\r\n }\r\n\r\n setDestination(navigator, taskItemId, sessionId, ifUpdated) {\r\n if (ifUpdated) {\r\n cookieHelperForEditImport.createCookie(taskItemId, sessionId);\r\n } else {\r\n cookieHelperForEditImport.deleteCookie();\r\n }\r\n\r\n navigator();\r\n }\r\n\r\n navigateToUrl(url) {\r\n window.location.href = url;\r\n }\r\n\r\n downloadUploadedFile(e) {\r\n let data = this.getColumnData(e);\r\n\r\n if (this.isFileImportODataMigrationEnabled && data && data.FileImportContext && data.FileImportContext.FilePath) {\r\n downloadService.download(data.FileImportContext.FilePath);\r\n } else {\r\n showError(i18n.get('GenericErrorMessage'));\r\n }\r\n }\r\n\r\n runImportNow(e) {\r\n const model = this.getColumnData(e);\r\n\r\n this.handleActionForScheduledImport(model, _.partial(this.runImportNowInternal, model).bind(this), true);\r\n }\r\n\r\n // save import settings in edit panel\r\n saveImportSettingsInEditPanel({ columnData, updateData, edm, jsData, closeEditPanel }) {\r\n this.handleActionForScheduledImport(columnData, _.partial(this.editTaskSaveInternal, columnData, updateData, edm, jsData, closeEditPanel).bind(this));\r\n }\r\n\r\n editTaskSaveInternal(model, updateData, edm, jsData, closeEditPanel, sessionId) {\r\n const taskItemOptions = {\r\n adapter: 'odata',\r\n entitySet: this.isMultiAccount ?\r\n edm.currentCustomer.TaskItems : edm.currentAccount.TaskItems,\r\n };\r\n\r\n const taskItemId = model.Id;\r\n const data = _.extend({}, model,\r\n model['@odata.type'] === '#Model.ImportTaskItem' ? {\r\n AdWordsImportContext: _.extend({}, model.AdWordsImportContext, {\r\n AdWordsSessionUserId: _.propertyOf(config.get('CurrentUser'))('Id'),\r\n SessionId: sessionId,\r\n SessionType: model.AdWordsImportContext.SessionType === 'CloudImport' ? null : model.AdWordsImportContext.SessionType,\r\n }),\r\n } : null, model['@odata.type'] === '#Model.FacebookTaskItem' ? {\r\n FacebookImportContext: _.extend({}, model.FacebookImportContext, {\r\n FacebookSessionUserId: _.propertyOf(config.get('CurrentUser'))('Id'),\r\n SessionId: sessionId,\r\n }),\r\n } : null,\r\n { ImportUserPreferences: undefined },\r\n updateData,\r\n );\r\n\r\n jsData.TaskItem.update(taskItemId, data, taskItemOptions).then(() => {\r\n closeEditPanel();\r\n this.grid.gridView.refresh(true);\r\n }).catch((error) => {\r\n logMsg(constants.LOGCATEGORY.ERROR, `edit task failed due to: ${error}`);\r\n }).finally(withUiBlock(\r\n /* target */ $('.schedule-setting-editor-panel .panel-content'),\r\n /* loadingText */ undefined,\r\n /* shouldFocus */ undefined,\r\n /* delayedLoading */ undefined,\r\n /* overlayZIndex */ '1010',\r\n ));\r\n }\r\n\r\n applyAdCustomizerFeedRecommendation(columnData, notificationString, edm, jsData, recommendationType) {\r\n const updateData = {\r\n ImportUserPreference: _.extend({}, columnData.ImportUserPreference, {\r\n UpdateAdCustomizerFeeds: true,\r\n ImportNewAdCustomizerFeeds: true,\r\n }),\r\n };\r\n\r\n this.handleActionForScheduledImport(columnData, _.partial(this.applyRecommendationInternal, columnData, updateData, notificationString, edm, jsData, recommendationType).bind(this));\r\n }\r\n\r\n applySetMinBidValueAdjustRecommendation(columnData, notificationString, edm, jsData, recommendationType) {\r\n const updateData = {\r\n ImportUserPreference: _.extend({}, columnData.ImportUserPreference, {\r\n SetLowerBidsToAdCenterMinBids: true,\r\n }),\r\n };\r\n\r\n this.handleActionForScheduledImport(columnData, _.partial(this.applyRecommendationInternal, columnData, updateData, notificationString, edm, jsData, recommendationType).bind(this));\r\n }\r\n\r\n applyCurrencyConversionRecommendation(columnData, notificationString, edm, jsData, recommendationType) {\r\n const updateData = {\r\n ImportUserPreference: _.extend({}, columnData.ImportUserPreference, {\r\n EnableAutoCurrencyConversion: true,\r\n }),\r\n };\r\n\r\n this.handleActionForScheduledImport(columnData, _.partial(this.applyRecommendationInternal, columnData, updateData, notificationString, edm, jsData, recommendationType).bind(this));\r\n }\r\n\r\n applyAutoFrequencyRecommendation(columnData, notificationString, edm, jsData, recommendationType) {\r\n const updateData = {\r\n Cron: null,\r\n IsAutoFrequency: true,\r\n };\r\n\r\n this.handleActionForScheduledImport(columnData, _.partial(this.applyRecommendationInternal, columnData, updateData, notificationString, edm, jsData, recommendationType).bind(this));\r\n }\r\n\r\n applyGetGoogleAdsPermissionRecommendation(columnData, notificationString, edm, jsData, recommendationType) {\r\n const callback = (sessionId) => {\r\n this.handleActionForScheduledImport(columnData, _.partial(this.applyRecommendationInternal, columnData, null, notificationString, edm, jsData, recommendationType, sessionId).bind(this));\r\n };\r\n\r\n // relogin to google to refresh the token\r\n reloginToGoogle(callback, this.newI18n);\r\n }\r\n\r\n applyAccessTokenExpiringRecommendation(columnData, notificationString, edm, jsData, recommendationType) {\r\n const callback = (sessionId) => {\r\n this.handleActionForScheduledImport(columnData, _.partial(this.applyRecommendationInternal, columnData, null, notificationString, edm, jsData, recommendationType, sessionId).bind(this));\r\n };\r\n\r\n // relogin to facebook to refresh the token\r\n reloginToFacebook(callback, this.newI18n);\r\n }\r\n\r\n applyRecommendationInternal(model, updateData, notificationString, edm, jsData, recommendationType, sessionId) {\r\n const taskItemOptions = {\r\n adapter: 'odata',\r\n entitySet: this.isMultiAccount ?\r\n edm.currentCustomer.TaskItems : edm.currentAccount.TaskItems,\r\n };\r\n\r\n const taskItemId = model.Id;\r\n const data = _.extend({}, model,\r\n model['@odata.type'] === '#Model.ImportTaskItem' ? {\r\n AdWordsImportContext: _.extend({}, model.AdWordsImportContext, {\r\n AdWordsSessionUserId: _.propertyOf(config.get('CurrentUser'))('Id'),\r\n SessionId: sessionId,\r\n SessionType: model.AdWordsImportContext.SessionType === 'CloudImport' ? null : model.AdWordsImportContext.SessionType,\r\n }),\r\n } : null, model['@odata.type'] === '#Model.FacebookTaskItem' ? {\r\n FacebookImportContext: _.extend({}, model.FacebookImportContext, {\r\n FacebookSessionUserId: _.propertyOf(config.get('CurrentUser'))('Id'),\r\n SessionId: sessionId,\r\n }),\r\n } : null,\r\n { ImportUserPreferences: undefined },\r\n updateData,\r\n );\r\n\r\n const importChannel = importChannelNameMap(importRecommendationListNameMap(model));\r\n\r\n jsData.TaskItem.update(taskItemId, data, taskItemOptions).then(() => {\r\n this.grid.gridView.refresh(true);\r\n notificationApi.showInfo(notificationString);\r\n logMsg(constants.LOGCATEGORY.TRACE, `Import_Recommendation ${taskItemId} apply_success ${recommendationType} ${importChannel}`);\r\n }).catch((error) => {\r\n logMsg(constants.LOGCATEGORY.ERROR, `Import_Recommendation ${taskItemId} apply_fail ${recommendationType} ${error} ${importChannel}`);\r\n });\r\n }\r\n\r\n runMultiAccountImportNow(e) {\r\n const model = this.getColumnData(e);\r\n\r\n this.handleActionForMultiAccountScheduledImport(model, _.partial(this.runMultiAccountImportNowInternal, model).bind(this));\r\n }\r\n\r\n runImportNowInternal(model, sessionId) {\r\n if (this.supportedImportTypes[IMPORT_TYPE.facebookimport] && model['@odata.type'] === '#Model.FacebookTaskItem') {\r\n const isSmartImportWizardJob = model.IsSmartImport === true || model.IsSmartImport === false;\r\n const facebookBody = _.extend(\r\n _.pick(model, '@odata.type', 'AccountId', 'Type', 'TimeZoneId', 'AdGroupMedium', 'NotificationMedium', 'CultureName', 'UserName', 'AccountName'),\r\n {\r\n AdGroupMedium: 'Search', // TODO: MT bug? MT reponse with '0'\r\n FacebookImportContext: _.extend({}, model.FacebookImportContext, {\r\n '@odata.type': '#Model.FacebookImportContext',\r\n SessionId: sessionId,\r\n FacebookSessionUserId: _.propertyOf(config.get('CurrentUser'))('Id'),\r\n }),\r\n ImportType: `FacebookImport${permissions && permissions.IsUseImportTestTypeForImportTaskExecutionEnabled ? 'Test' : ''}`,\r\n ImportUserPreference: model.ImportUserPreference,\r\n State: 'Active',\r\n NotificationType: 'None',\r\n }, isSmartImportWizardJob && { // pass IsAutoFrequency as false, IsSmartImport and Name if it is from smart import workflow (smart/expert)\r\n IsAutoFrequency: false,\r\n IsSmartImport: model.IsSmartImport,\r\n Name: model.Name,\r\n });\r\n\r\n this.triggerRunNowImportTask(facebookBody, model.Id);\r\n return;\r\n } else if (this.supportedImportTypes[IMPORT_TYPE.amazonImport] && model['@odata.type'] === '#Model.AmazonImportTaskItem') {\r\n const amazonBody = _.extend(\r\n _.pick(model, '@odata.type', 'AccountId', 'Type', 'TimeZoneId', 'AdGroupMedium', 'NotificationMedium', 'CultureName', 'UserName', 'AccountName'),\r\n {\r\n AdGroupMedium: 'Search', // TODO: MT bug? MT reponse with '0'\r\n AmazonImportContext: _.extend({}, model.AmazonImportContext, {\r\n '@odata.type': '#Model.AmazonImportContext',\r\n SessionId: sessionId,\r\n }),\r\n ImportType: `AmazonImport${permissions && permissions.IsUseImportTestTypeForImportTaskExecutionEnabled ? 'Test' : ''}`,\r\n ImportUserPreference: model.ImportUserPreference,\r\n State: 'Active',\r\n NotificationType: 'None',\r\n IsAutoFrequency: false,\r\n IsSmartImport: model.IsSmartImport,\r\n Name: model.Name,\r\n });\r\n\r\n this.triggerRunNowImportTask(amazonBody, model.Id);\r\n return;\r\n } else if (this.supportedImportTypes[IMPORT_TYPE.pinterestImport] && model['@odata.type'] === '#Model.PinterestImportTaskItem') {\r\n const pinterestBody = _.extend(\r\n _.pick(model, '@odata.type', 'AccountId', 'Type', 'TimeZoneId', 'AdGroupMedium', 'NotificationMedium', 'CultureName', 'UserName', 'AccountName'),\r\n {\r\n AdGroupMedium: 'Search',\r\n PinterestImportContext: _.extend({}, model.PinterestImportContext, {\r\n '@odata.type': '#Model.PinterestImportContext',\r\n SessionId: sessionId,\r\n PinterestSessionUserId: _.propertyOf(config.get('CurrentUser'))('Id'),\r\n }),\r\n ImportType: `PinterestImport${permissions && permissions.IsUseImportTestTypeForImportTaskExecutionEnabled ? 'Test' : ''}`,\r\n ImportUserPreference: model.ImportUserPreference,\r\n State: 'Active',\r\n NotificationType: 'None',\r\n IsAutoFrequency: false,\r\n IsSmartImport: model.IsSmartImport,\r\n Name: model.Name,\r\n });\r\n\r\n this.triggerRunNowImportTask(pinterestBody, model.Id);\r\n return;\r\n }\r\n\r\n const adWordsImportContext = model.AdWordsImportContext;\r\n let body;\r\n\r\n const isSmartImportWizardJob = permissions.IsSmartImportEnabled && (model.IsSmartImport === true || model.IsSmartImport === false);\r\n const isSmartCampaignOnlyJob = model.IsSmartCampaignOnly === true || model.IsSmartCampaignOnly === false;\r\n const isPmaxRecommendationJob = model.DefaultImportSettings === 'PMaxRecommendation'; // if pmax import recommendation task\r\n\r\n if (isPmaxRecommendationJob) {\r\n logMsg(constants.LOGCATEGORY.TRACE, {\r\n TaskType: 'PmaxRecommendationImportTask',\r\n TaskId: model.Id,\r\n Event: 'Trigger runnow button',\r\n });\r\n }\r\n\r\n try {\r\n body = createImportTaskItemHelper.prepareGoogleImport(_.extend({\r\n importUserPreferences: model.ImportUserPreferences,\r\n notificationType: model.NotificationType,\r\n timeZoneId: model.TimeZoneId,\r\n market: model.CustomerMarket,\r\n language: model.Language,\r\n adGroupMedium: model.AdGroupMedium,\r\n googleCustomerId: adWordsImportContext.CustomerId,\r\n loginCustomerId: adWordsImportContext.LoginCustomerId,\r\n campaignIds: adWordsImportContext.CampaignIds,\r\n googleEntitiesBlobName: adWordsImportContext.GoogleEntitiesBlobName,\r\n // if there is a new sessionId, reset value from 'CloudImport' into null.\r\n // same user triagger a runnow job for BAE task from webui, it will keep origin SessionType, SessionId.\r\n sessionType: adWordsImportContext.SessionId !== sessionId && adWordsImportContext.SessionType === 'CloudImport' ? null : adWordsImportContext.SessionType,\r\n initialAdWordsAccount: {\r\n sessionId,\r\n googleAccountName: adWordsImportContext.AccountName,\r\n },\r\n }, isSmartImportWizardJob && { // pass IsAutoFrequency as false, IsSmartImport and Name if it is from smart import workflow (smart/expert)\r\n IsAutoFrequency: false,\r\n IsSmartImport: model.IsSmartImport,\r\n Name: model.Name,\r\n }, isSmartCampaignOnlyJob && {\r\n IsSmartCampaignOnly: model.IsSmartCampaignOnly,\r\n }, model.IsEscImport && {\r\n IsEscImport: model.IsEscImport,\r\n }, isPmaxRecommendationJob && {\r\n DefaultImportSettings: model.DefaultImportSettings, // pass default import settings for MT to generate customized preferences\r\n }));\r\n } catch (err) {\r\n logException(err);\r\n throw err;\r\n }\r\n\r\n body = _.extend(body, {\r\n State: 'Active',\r\n NotificationType: 'None',\r\n });\r\n\r\n if (model.ImportUserPreference) {\r\n body = _.extend(body, {\r\n ImportUserPreference: model.ImportUserPreference,\r\n ImportUserPreferences: undefined,\r\n });\r\n }\r\n\r\n this.triggerRunNowImportTask(body, model.Id);\r\n }\r\n\r\n runMultiAccountImportNowInternal(model, sessionId) {\r\n let body;\r\n\r\n try {\r\n body = createImportTaskItemHelper.prepareMultiAccountGoogleImport({\r\n importUserPreference: model.ImportUserPreference,\r\n importTaskItemList: model.ImportTaskItemList,\r\n notificationType: model.NotificationType,\r\n timeZoneId: model.TimeZoneId,\r\n loginCustomerId: model.ImportTaskItemList[0].AdWordsImportContext.LoginCustomerId,\r\n sessionId,\r\n });\r\n } catch (err) {\r\n logException(err);\r\n throw err;\r\n }\r\n\r\n body = _.extend(body, {\r\n State: 'Active',\r\n NotificationType: 'None',\r\n });\r\n\r\n this.triggerRunNowImportTask(body, model.Id);\r\n }\r\n\r\n triggerRunNowImportTask(body, originalTaskId) {\r\n this.grid.gridView.trigger('willUpdate');\r\n this.createRunNowImport({\r\n body,\r\n isMultiAccount: this.isMultiAccount,\r\n })\r\n .then((data) => {\r\n instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, '/campaign/importcampaign',\r\n 'disable cache for campaign grid after runnow');\r\n cacheManager.invalidate('Campaign');\r\n\r\n const taskItemExecutionId = data.TaskItemExecutions[0].Id;\r\n\r\n instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, '/campaign/importcampaign',\r\n `successfuly trigger a run now import with task execution id: ${taskItemExecutionId}, original task id: ${originalTaskId}`);\r\n return promisifyStartPollingUntilImportStarted({\r\n taskItemExecutionId,\r\n showLoadingIcon: false,\r\n isMultiAccount: this.isMultiAccount,\r\n });\r\n })\r\n .then(() => {\r\n instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, '/campaign/importcampaign',\r\n 'successfuly start the run now import');\r\n this.grid.gridView.refresh(true);\r\n this.trigger('didRunNowImport');\r\n })\r\n .catch((err) => {\r\n this.handleGridErrors(err);\r\n })\r\n .finally(withUiBlock(this.grid.gridView.$el));\r\n }\r\n\r\n handleGridErrors(err) {\r\n this.grid.gridView.trigger('didUpdate');\r\n logException(err);\r\n let msg = i18n.get('GenericErrorMessage');\r\n\r\n if (_.propertyOf(_.first(err.errors))('Code') === 'TaskThrottlingLimitReached') {\r\n msg = i18n.get('Error_Import_ActiveImportLimit');\r\n }\r\n showError(msg);\r\n }\r\n\r\n remove(...args) {\r\n this.grid.gridView.remove();\r\n if (!this.isForVNext) {\r\n this.grid.toolbar.remove();\r\n }\r\n this.grid.pagination.remove();\r\n super.remove(...args);\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\nimport { getImportScheduleDataSourceConfig, createRunNowImport, createUpdateStatusView } from './import-schedule-grid-data-source';\r\nimport ImportScheduleGridBase from './import-schedule-grid-base';\r\n\r\nexport default class View extends ImportScheduleGridBase {\r\n constructor(options = {}) {\r\n super(_.defaults(options, {\r\n getDataSourceConfig: getImportScheduleDataSourceConfig,\r\n createRunNowImport,\r\n createUpdateStatusView,\r\n }));\r\n }\r\n}\r\n","import Promise from 'bluebird';\r\nimport odata from '@bingads-webui-component-legacy/http/channel/odata';\r\n\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport dateUtil from '@bingads-webui-component-legacy/humanize/date';\r\n\r\nexport const getBlobUploadUrl = async ({ fileExtension = 'csv' }) => {\r\n const odataOptions = {\r\n cacheResponse: false,\r\n url: `/BulkUploadFiles/GetBlobUploadUrl(CustomerId=:customer_id,BulkFileType=21,FileExtension=${fileExtension})`,\r\n };\r\n\r\n const res = await odata.get(odataOptions);\r\n\r\n return res;\r\n};\r\n\r\nasync function postTask({\r\n BlobName, fileName, TaskType, SasUrl, UploadDateTime = null,\r\n}) {\r\n const permissions = config.get('Permissions') || {};\r\n const testTypeSuffix = permissions.IsUseImportTestTypeForImportTaskExecutionEnabled ? 'Test' : '';\r\n\r\n const odataOptions = {\r\n cacheResponse: false,\r\n url: '/Customers(:customer_id)/TaskItems?$expand=TaskItemExecutions',\r\n data: {\r\n '@odata.type': '#Model.ImportPreferenceBulkUpdateTaskItem',\r\n Name: `ImportPreferenceBulkUpdate-${dateUtil.format(new Date(), 'yyyy-MM-dd')}`,\r\n Type: `ImportPreferenceBulkUpdate${testTypeSuffix}`,\r\n Cron: '',\r\n FileIdentifier: BlobName,\r\n SasUrl,\r\n TaskType,\r\n UploadedFileName: fileName,\r\n UploadDateTime,\r\n },\r\n };\r\n\r\n const res = await odata.post(odataOptions);\r\n\r\n return res;\r\n}\r\n\r\nexport const postPreviewTask = async ({ BlobName, fileName, SasUrl }) => {\r\n const res = await postTask({\r\n BlobName, fileName, TaskType: 'Preview', SasUrl,\r\n });\r\n\r\n return res;\r\n};\r\n\r\nexport const postCommitTask = async ({\r\n BlobName, fileName, UploadDateTime, SasUrl,\r\n}) => {\r\n const res = await postTask({\r\n BlobName, fileName, TaskType: 'Commit', SasUrl, UploadDateTime,\r\n });\r\n\r\n return res;\r\n};\r\n\r\nexport const pollExecutionResult = ({ id }) => {\r\n const odataOptions = {\r\n cacheResponse: false,\r\n url: `/Customers(:customer_id)/TaskItemExecutions(${id})`,\r\n };\r\n\r\n return new Promise((resolve) => {\r\n const timer = setInterval(() => {\r\n odata.get(odataOptions).then((res) => {\r\n if (res.Status === 'Completed' || res.Status === 'Failed') {\r\n clearInterval(timer);\r\n resolve(res);\r\n }\r\n });\r\n }, 5000);\r\n });\r\n};\r\n","\r\nexport const PREFERENCE_UPLOAD_STATUS = {\r\n NotStart: 1,\r\n Upload: 2,\r\n Preview: 3,\r\n Apply: 4,\r\n Previewed: 5,\r\n Applied: 6,\r\n Error: 7,\r\n};\r\n","// TODO: confirm with MT and PM about the error messages\r\nexport const PREFERENCE_UPLOAD_ERROR_MAP = {\r\n InvalidImportPreferenceBulkUpdateTaskType: 'Import_PreferenceUpload_Invalid_Task_Type',\r\n ImportPreferenceBulkUpdateUploadFileSizeExceeded: 'Import_PreferenceUpload_Upload_File_Size_Exceeded',\r\n ImportPreferenceBulkUpdateBlobDownloadError: 'Import_PreferenceUpload_Blob_Download_Error',\r\n ImportPreferenceBulkUpdateBlobUploadError: 'Import_PreferenceUpload_Blob_Upload_Error',\r\n ImportPreferenceBulkUpdateFileFormatInvalid: 'Import_PreferenceUpload_File_Format_Invalid',\r\n ImportPreferenceBulkUpdateFileIsEmpty: 'Import_PreferenceUpload_File_Is_Empty',\r\n ImportPreferenceBulkUpdateFileMissingHeaderRow: 'Import_PreferenceUpload_File_Missing_HeaderRow',\r\n ImportPreferenceBulkUpdateColumnTaskIdNotFound: 'Import_PreferenceUpload_Column_Task_Id_Not_Found',\r\n ImportPreferenceBulkUpdateColumnAccountIdNotFound: 'Import_PreferenceUpload_Column_Account_Id_Not_Found',\r\n ImportPreferenceBulkUpdateColumnPreferenceNotFound: 'Import_PreferenceUpload_Column_Preference_Not_Found',\r\n ImportPreferenceBulkUpdateColumnImportTypeNotFound: 'Import_PreferenceUpload_Column_Import_Type_Not_Found',\r\n ImportPreferenceBulkUpdateParseFailedInvalidValuesInDataRows: 'Import_PreferenceUpload_Parse_Failed_Invalid_Values_In_DataRows',\r\n};\r\n","/* eslint-disable no-unused-vars */\r\nimport _ from 'underscore';\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport { ProgressIndicator } from '@fluentui/react/lib/ProgressIndicator';\r\nimport { FilePayload } from '@bingads-webui/azure-upload';\r\nimport { DeterministicView } from '@bingads-webui/deterministic-view';\r\nimport { iframeDownload } from '@bingads-webui/download-service';\r\nimport { FilePicker } from '@bingads-webui/file-picker';\r\nimport { PerfMarkerFactory } from '@bingads-webui/performance-marker';\r\nimport UploadService from '@bingads-webui-component-legacy/azure-upload/index';\r\nimport { getBlobUploadUrl, postPreviewTask, postCommitTask, pollExecutionResult } from '@bingads-webui-campaign-legacy/scheduled-import/service/preference-upload-api';\r\n\r\nimport preferenceUploadTemplate from '../template/preference-upload.pug';\r\nimport { PREFERENCE_UPLOAD_STATUS } from './preference-upload-status';\r\nimport { PREFERENCE_UPLOAD_ERROR_MAP } from './preference-upload-error-maps';\r\n\r\nexport class PreferenceUploadView extends DeterministicView {\r\n initialize({\r\n i18n,\r\n publicPath,\r\n logTrace,\r\n perfMarker,\r\n }) {\r\n this.i18n = i18n;\r\n this.publicPath = publicPath;\r\n this.logTrace = logTrace;\r\n this.perfMarker = perfMarker;\r\n if (this.perfMarker) {\r\n this.renderPerfMarker = this.perfMarker.createChild('Import_Preference_Upload_First_Render');\r\n this.renderPerfMarker.willInit();\r\n }\r\n this.FilePicker = FilePicker;\r\n this.title = i18n.getString('Import_PreferenceUpload_Title');\r\n this.description = i18n.getString('Import_PreferenceUpload_Description');\r\n this.PREFERENCE_UPLOAD_STATUS = PREFERENCE_UPLOAD_STATUS;\r\n this.initFilePicker();\r\n\r\n this.defaultState = {\r\n status: PREFERENCE_UPLOAD_STATUS.NotStart,\r\n isApplyEnabled: false,\r\n hideFilePicker: false,\r\n isPreviewEnabled: false,\r\n uploading: false,\r\n showSummaryGrid: false,\r\n downloadPath: '',\r\n progressPercentage: 0,\r\n errorMessage: null,\r\n };\r\n this.setState(this.defaultState);\r\n this.progressTitle = {\r\n [PREFERENCE_UPLOAD_STATUS.Upload]: this.i18n.getString('Schedule_Import_Preference_Upload_Status_Upload'),\r\n [PREFERENCE_UPLOAD_STATUS.Apply]: this.i18n.getString('Schedule_Import_Preference_Upload_Status_Apply'),\r\n [PREFERENCE_UPLOAD_STATUS.Preview]: this.i18n.getString('Schedule_Import_Preference_Upload_Status_Preview'),\r\n };\r\n }\r\n\r\n clearError() {\r\n this.setState({ errorMessage: null });\r\n }\r\n\r\n initFilePicker() {\r\n this.filePicker = new this.FilePicker({\r\n theme: 'default',\r\n className: 'preference-upload-file-picker',\r\n allowedFileExtensions: ['.csv'],\r\n i18n: this.i18n,\r\n validator: () => {\r\n this.setState({ isPreviewEnabled: true });\r\n this.clearError();\r\n },\r\n displayFilePath: 'filename',\r\n }).render();\r\n this.filePicker.on('error.extension', () => {\r\n this.logTrace('error_in_file_upload', 'Not_Supported_File_Extension');\r\n\r\n this.setState({ isPreviewEnabled: false });\r\n });\r\n this.filePicker.on('cleared', () => {\r\n this.setState({ isPreviewEnabled: false });\r\n this.clearError();\r\n });\r\n }\r\n\r\n get template() {\r\n return preferenceUploadTemplate;\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click .cancel, .close-panel': () => {\r\n this.trigger('cancel');\r\n },\r\n 'click .upload-and-preview': () => this.uploadAndPreview(),\r\n 'click .apply-changes': () => this.apply(),\r\n 'click .helpLink.download-template': 'downloadTemplate',\r\n 'click .download-results': () => this.downloadResults(),\r\n };\r\n }\r\n\r\n // Download sample file\r\n downloadTemplate(event) {\r\n this.logTrace('click', 'Sample_File_Download_Button');\r\n\r\n event.stopPropagation();\r\n event.preventDefault();\r\n const templateUrl = `${this.publicPath}files/templates/Import/ImportPreferenceBulkUpdate_Sample.csv`;\r\n\r\n iframeDownload(templateUrl);\r\n }\r\n\r\n async uploadAndPreview() {\r\n this.logTrace('click', 'Upload_And_Preview_Button');\r\n\r\n if (this.perfMarker) {\r\n this.previewPerfMarker = this.perfMarker.createChild('Import_Preference_Upload_Preview_Fetch_Data');\r\n this.previewPerfMarker.willInit();\r\n this.previewPerfMarker.willFetchData();\r\n }\r\n\r\n // TODO: progress indicator improvement\r\n this.setState({ uploading: true, hideFilePicker: true, progressPercentage: 0, status: PREFERENCE_UPLOAD_STATUS.Upload });\r\n const file = this.filePicker.fileObject;\r\n const fileExtension = new FilePayload({\r\n file,\r\n }).getFileExtension();\r\n\r\n try {\r\n const { SasUrl, BlobName } = await getBlobUploadUrl({ fileExtension });\r\n\r\n const uploadService = new UploadService({\r\n blobSetting: {\r\n SasUrl,\r\n blobName: BlobName,\r\n },\r\n file,\r\n });\r\n\r\n // Uploading\r\n this.logTrace('preview', 'Uploading');\r\n\r\n await uploadService.start();\r\n this.setState({ progressPercentage: 0.2 });\r\n\r\n // Previewing\r\n this.logTrace('preview', 'Previewing');\r\n\r\n this.setState({ status: PREFERENCE_UPLOAD_STATUS.Preview });\r\n const previewTask = await postPreviewTask({ BlobName, fileName: file.name, SasUrl});\r\n\r\n this.setState({ progressPercentage: 0.4});\r\n\r\n // Get preview result\r\n this.logTrace('preview', 'Get_Preview_Task_Result');\r\n\r\n const taskId = previewTask.TaskItemExecutions[0].Id;\r\n let previewResult = await pollExecutionResult({ id: taskId });\r\n\r\n this.setState({ progressPercentage: 1 });\r\n this.onUploadFinish(previewResult, true);\r\n } catch (e) {\r\n this.logTrace('error_in_preview_stage', JSON.stringify(e));\r\n\r\n // TODO: confirm with MT about returned error structure\r\n const state = _.defaults({ errorMessage: this.getErrorMessage() }, this.defaultState);\r\n\r\n this.setState(state);\r\n }\r\n }\r\n\r\n async apply() {\r\n if (this.perfMarker) {\r\n this.applyPerfMarker = this.perfMarker.createChild('Import_Preference_Upload_Apply_Fetch_Data');\r\n this.applyPerfMarker.willInit();\r\n this.applyPerfMarker.willFetchData();\r\n }\r\n\r\n this.logTrace('click', 'Apply_Button');\r\n\r\n this.setState({ progressPercentage: 0, uploading: true });\r\n this.clearError();\r\n\r\n const { commitTaskSasUrl, BlobName, fileName, UploadDateTime } = this.getState();\r\n\r\n this.setState({ status: PREFERENCE_UPLOAD_STATUS.Apply });\r\n\r\n try {\r\n // Processing\r\n this.logTrace('apply', 'Processing');\r\n\r\n const commitTask = await postCommitTask({ BlobName, fileName, SasUrl: commitTaskSasUrl, UploadDateTime });\r\n\r\n this.setState({ progressPercentage: 0.4});\r\n\r\n // Get apply result\r\n this.logTrace('apply', 'Get_Apply_Task_Result');\r\n\r\n const taskId = commitTask.TaskItemExecutions[0].Id;\r\n let commitResult = await pollExecutionResult({ id: taskId });\r\n\r\n this.setState({ progressPercentage: 1 });\r\n this.onUploadFinish(commitResult, false);\r\n } catch (e) {\r\n this.logTrace('error_in_apply_stage', JSON.stringify(e));\r\n\r\n // TODO: confirm with MT about returned error structure\r\n const state = _.defaults({ errorMessage: this.getErrorMessage() }, this.defaultState);\r\n\r\n this.setState(state);\r\n }\r\n }\r\n\r\n\r\n onUploadFinish(res, isPreview) {\r\n if (this.previewPerfMarker) {\r\n this.previewPerfMarker.done();\r\n }\r\n\r\n if (this.applyPerfMarker) {\r\n this.applyPerfMarker.done();\r\n }\r\n\r\n const status = isPreview ? PREFERENCE_UPLOAD_STATUS.Previewed : PREFERENCE_UPLOAD_STATUS.Applied;\r\n const state = {\r\n successCount: res.SuccessCount,\r\n errorCount: res.ErrorCount,\r\n status,\r\n showSummaryGrid: true,\r\n downloadPath: res.OutputFileSasURL || '',\r\n uploading: false,\r\n };\r\n const logStage = isPreview ? 'preview' : 'apply';\r\n\r\n this.logTrace(`${logStage}`, `Success_Count:${state.successCount},Error_Count:${state.errorCount}`);\r\n\r\n if (res.Errors && res.Errors.length) {\r\n this.logTrace(`error_in_${logStage}_result`, `${res.Errors[0].Code}`);\r\n\r\n // TODO: confirm with MT about if it may return multiple error codes\r\n _.extend(state, {\r\n errorMessage: this.getErrorMessage(res.Errors[0].Code),\r\n });\r\n }\r\n\r\n if (isPreview) {\r\n _.extend(state, {\r\n isApplyEnabled: res.SuccessCount > 0,\r\n BlobName: res.FileIdentifier,\r\n fileName: res.InputFileName,\r\n commitTaskSasUrl: res.OutputFileSasURL,\r\n UploadDateTime: res.UploadDateTime,\r\n });\r\n }\r\n\r\n this.setState(state);\r\n }\r\n\r\n downloadResults() {\r\n this.logTrace('click', 'Download_Results_File_Button');\r\n\r\n const { downloadPath } = this.getState();\r\n\r\n iframeDownload(downloadPath);\r\n }\r\n\r\n getErrorMessage(err) {\r\n // don't show warning level error messages since it may be confused for customer\r\n if (err === 'ImportPreferenceBulkUpdateSmartImportWillChangeToExpertImport') {\r\n return null;\r\n }\r\n\r\n if (PREFERENCE_UPLOAD_ERROR_MAP[err] !== undefined) {\r\n return this.i18n.getString(PREFERENCE_UPLOAD_ERROR_MAP[err]);\r\n }\r\n\r\n // Default error\r\n return this.i18n.getString('Import_PreferenceUpload_Error_RequestFailed');\r\n }\r\n\r\n renderTrunk() {\r\n if (this.renderPerfMarker) {\r\n this.renderPerfMarker.willRender();\r\n }\r\n\r\n super.renderTrunk();\r\n\r\n this.$('.preference-upload-file-picker-placeholder').html(this.filePicker.$el);\r\n\r\n const { progressPercentage, status, uploading } = this.getState();\r\n\r\n if (uploading) {\r\n ReactDOM.render(\r\n , this.$('.progress-container').get(0));\r\n }\r\n\r\n if (this.renderPerfMarker) {\r\n this.renderPerfMarker.done();\r\n }\r\n\r\n return this;\r\n }\r\n\r\n remove() {\r\n ReactDOM.unmountComponentAtNode(this.el);\r\n return super.remove();\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\nimport timeZoneMapper from '@bingads-webui-component-legacy/timezonemapper/index';\r\nimport dateUtil from '@bingads-webui-component-legacy/humanize/date';\r\nimport adSchedulingOptions from '@bingads-webui-campaign-legacy/adextension-shared/viewmodel/adSchedulingOptions';\r\nimport freqColumnTmpl from '@bingads-webui-campaign-legacy/scheduled-import/template/freq-column.pug';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\n\r\nconst i18nGlobal = window.globalLegacyI18n.get('component/i18n/loader!legacy/global');\r\n\r\nlet dayMapper = function(dayOfTheWeek) {\r\n let arr = [\r\n i18nGlobal.getString('DayOfWeek_Sunday'),\r\n i18nGlobal.getString('DayOfWeek_Monday'),\r\n i18nGlobal.getString('DayOfWeek_Tuesday'),\r\n i18nGlobal.getString('DayOfWeek_Wednesday'),\r\n i18nGlobal.getString('DayOfWeek_Thursday'),\r\n i18nGlobal.getString('DayOfWeek_Friday'),\r\n i18nGlobal.getString('DayOfWeek_Saturday'),\r\n ];\r\n\r\n return arr[parseInt(dayOfTheWeek)];\r\n};\r\n\r\nlet hourMapper = function(hourString) {\r\n let hour = parseInt(hourString);\r\n let hourObj = _.find(adSchedulingOptions.fromHourOptions, (obj) => obj.val === hour);\r\n\r\n return hourObj && hourObj.twelveHourDisplay ? hourObj.twelveHourDisplay : null;\r\n};\r\n\r\nlet frequencyMapper = function(cron, i18n) {\r\n if (cron && cron.split && cron !== '') {\r\n let arr = cron.split(' ');\r\n\r\n if (arr.length === 6) {\r\n const numOfBlank = _.reduce(arr, (memo, char) => {\r\n return memo + (char === '*' ? 1 : 0);\r\n }, 0);\r\n\r\n if (numOfBlank === 1) {\r\n return i18n.getString('Scheduled_Import_OnceTemplate')\r\n .replace('{0}', i18n.getString('AutomatedRules_FrequencyGrain_Once'))\r\n .replace('{1}', dateUtil.format(new Date(`${arr[3]}/${arr[2]}/${arr[5]}`), 'MM/d/yyyy', config.get('culture')))\r\n .replace('{2}', hourMapper(arr[1]));\r\n }\r\n if (arr[2] !== '*') {\r\n return i18n.getString('AutomatedRules_Frequency_MonthlyTemplate')\r\n .replace('{0}', i18n.getString('AutomatedRules_FrequencyGrain_Monthly'))\r\n .replace('{1}', arr[2])\r\n .replace('{2}', hourMapper(arr[1]));\r\n }\r\n if (arr[4] !== '*') {\r\n return i18n.getString('AutomatedRules_Frequency_WeeklyTemplate')\r\n .replace('{0}', i18n.getString('AutomatedRules_FrequencyGrain_Weekly'))\r\n .replace('{1}', dayMapper(arr[4]))\r\n .replace('{2}', hourMapper(arr[1]));\r\n }\r\n return i18n.getString('AutomatedRules_Frequency_DailyTemplate')\r\n .replace('{0}', i18n.getString('AutomatedRules_FrequencyGrain_Daily'))\r\n .replace('{1}', hourMapper(arr[1]));\r\n }\r\n }\r\n return null;\r\n};\r\n\r\nexport function importFreqColDataToTemplate({\r\n IsAutoFrequency: isAuto,\r\n TimeZoneId,\r\n Cron: frequency,\r\n}, i18n) {\r\n if (!_.isNumber(TimeZoneId)) {\r\n // eslint-disable-next-line no-param-reassign\r\n TimeZoneId = config.get('AccountTimeZone');\r\n }\r\n\r\n let result = _.find(timeZoneMapper.getTimeZoneOptions(), (obj) => obj.index === TimeZoneId.toString());\r\n\r\n return freqColumnTmpl({\r\n i18n,\r\n isAuto,\r\n Freq: frequencyMapper(frequency, i18n),\r\n TimeZone: result ? result.text : null,\r\n });\r\n}\r\n","import _ from 'underscore';\r\nimport state from '@bingads-webui-component-legacy/state/index';\r\nimport jsdata from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport timezonemapper from '@bingads-webui-component-legacy/timezonemapper/index';\r\nimport edmCampaign from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport { queryify } from '@bingads-webui/url-util';\r\nimport { defaultBidForShoppingCampaign } from '@bingads-webui-campaign-legacy/budget/shared/defaultBid';\r\nimport * as i18nErrors from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\n\r\nexport function getProductData(shouldShowPlaceholderStoreIfExists = false) {\r\n let url = queryify('/Campaign/NewCampaign/GetProductScope', {\r\n aid: state.get('account_id'),\r\n cid: state.get('customer_id'),\r\n uid: state.get('user_id'),\r\n });\r\n\r\n if (shouldShowPlaceholderStoreIfExists) {\r\n url = `${url}&storeTypes=placeholder`;\r\n }\r\n\r\n const params = {\r\n url,\r\n adapter: 'legacy',\r\n // We shouldn't cache the response when showing placeholder stores.\r\n // If we do, there will be a bug when the user goes from campaign settings to creation.\r\n // The bug will be that the user sees draft stores in campaign creation since it reads from cache.\r\n bypassCache: shouldShowPlaceholderStoreIfExists,\r\n cacheResponse: !shouldShowPlaceholderStoreIfExists,\r\n };\r\n\r\n return jsdata.Product.find('MetaData', params).then((productData) => {\r\n // need to filter out all coop stores.\r\n return _.extend({}, productData, {\r\n ProductCollectionAccounts: productData.ProductCollectionAccounts.filter((item) => !item.IsCoOpStore && !item.IsGlobalStore),\r\n });\r\n });\r\n}\r\n\r\n\r\nconst defaultAdGroupName = 'Ad group #1';\r\n\r\nfunction getAdGroup({ campaignName, adgroupId, campaignId, startDate, endDate }) {\r\n const adgroup = {\r\n Campaign: {\r\n Id: campaignId,\r\n },\r\n Id: adgroupId,\r\n SearchBid: adgroupId == null ? 1 /* defaultBidForShoppingCampaign() */ : null, //FIXME: defaultBidForShoppingCampaign returns `undefined` for not mapped currencies and breaks SSC creation\r\n CampaignName: campaignName,\r\n Name: defaultAdGroupName,\r\n Status: 'Active',\r\n StartDate: startDate,\r\n EndDate: endDate,\r\n };\r\n\r\n return adgroup;\r\n}\r\n\r\nfunction getAd(campaignName) {\r\n const productAd = {\r\n CampaignName: campaignName,\r\n AdGroupName: defaultAdGroupName,\r\n PromotionalText: '',\r\n };\r\n\r\n return productAd;\r\n}\r\n\r\nfunction getProductPartition(campaignName) {\r\n return {\r\n // bid amount is a mandatory field in MT API, so here we need to set a default bid amount.\r\n // this value is useless for downstream as smart shopping campaign is auto bidding.\r\n BidAmount: 1, // defaultBidForShoppingCampaign(), //FIXME: defaultBidForShoppingCampaign returns `undefined` for not mapped currencies and breaks SSC creation\r\n ProductCondition: 'All',\r\n ProductValue: '',\r\n CampaignName: campaignName,\r\n AdGroupName: defaultAdGroupName,\r\n IsExcluded: false,\r\n IsLeaf: 'Unit',\r\n Status: 'Paused',\r\n };\r\n}\r\n\r\nfunction formatCriterions(campaignTargetingModel, campaignName) {\r\n let dayTimeCriterions = [];\r\n\r\n if (campaignTargetingModel.adScheduleModel) {\r\n dayTimeCriterions = campaignTargetingModel.adScheduleModel.dayTimeRanges;\r\n }\r\n let locationCriterions = [];\r\n let deletedLocationCriterions = [];\r\n\r\n if (campaignTargetingModel.locationTargets) {\r\n locationCriterions = campaignTargetingModel.locationTargets.locations;\r\n deletedLocationCriterions = campaignTargetingModel.locationTargets.deletedLocations;\r\n }\r\n let result = dayTimeCriterions;\r\n\r\n result = result.concat(locationCriterions).concat(deletedLocationCriterions).map((criterion) => {\r\n return _.extend({}, criterion, { CampaignName: campaignName });\r\n });\r\n return result.sort((__, b) => {\r\n if (b.Status === 'Delete') {\r\n return 1;\r\n }\r\n return -1;\r\n });\r\n}\r\n\r\nexport function bulkUpsertSmartShoppingCampaign({\r\n model,\r\n campaignId = null,\r\n adgroupId = null,\r\n}) {\r\n const timeZone = timezonemapper.getAccountTimeZone();\r\n const { adScheduleUseSearcherTimeZone } = model.campaignTargeting.adScheduleModel;\r\n const campaignName = model.campaignSetting.Name;\r\n const criterions = formatCriterions(model.campaignTargeting, campaignName);\r\n const startDate = model.campaignTargeting && model.campaignTargeting.adScheduleModel ?\r\n model.campaignTargeting.adScheduleModel.startDate : null;\r\n const endDate = model.campaignTargeting && model.campaignTargeting.adScheduleModel ?\r\n model.campaignTargeting.adScheduleModel.endDate : null;\r\n\r\n let shoppingSettingModel = { ...model.shoppingSetting };\r\n\r\n // Pick fields for feed label\r\n if (shoppingSettingModel.FeedLabel && shoppingSettingModel.FeedLabel.length > 0) {\r\n shoppingSettingModel = _.omit(shoppingSettingModel, 'SalesCountry');\r\n } else if (shoppingSettingModel.SalesCountry) {\r\n shoppingSettingModel = _.omit(shoppingSettingModel, 'FeedLabel');\r\n } else {\r\n shoppingSettingModel = _.omit(shoppingSettingModel, ['FeedLabel', 'SalesCountry']);\r\n }\r\n\r\n let smartShoppingModel = _.extend({}, model.campaignSetting, shoppingSettingModel, {\r\n AdScheduleUseSearcherTimeZone: adScheduleUseSearcherTimeZone,\r\n CampaignCriterions: criterions,\r\n TimeZone: timeZone,\r\n CampaignType: 'Shopping',\r\n CampaignSubType: 'ShoppingSmartAds',\r\n Priority: 'Highest',\r\n Languages: ['All'],\r\n });\r\n\r\n smartShoppingModel = _.omit(smartShoppingModel, ['BudgetId']);\r\n const adgroupToCreate = getAdGroup({ campaignName, adgroupId, campaignId, startDate, endDate });\r\n\r\n smartShoppingModel = _.extend({}, smartShoppingModel, {\r\n AdGroups: [adgroupToCreate],\r\n ProductAds: [getAd(campaignName)],\r\n ProductPartitions: [getProductPartition(campaignName)],\r\n Id: campaignId,\r\n });\r\n // if adgroup is created, no need to update default product ad and product group.\r\n if (adgroupId != null) {\r\n smartShoppingModel = _.omit(smartShoppingModel, ['ProductAds', 'ProductPartitions']);\r\n }\r\n\r\n return jsdata.ShoppingCampaign.create(smartShoppingModel, {\r\n adapter: 'bulk',\r\n cacheResponse: false,\r\n }).then((data) => {\r\n const result = {\r\n campaignId: data.Id,\r\n adgroupId: data.AdGroups && data.AdGroups.length ? data.AdGroups[0].Id : '',\r\n createdCampaign: data,\r\n campaignName: data.Name,\r\n };\r\n\r\n return result;\r\n }).catch((response) => {\r\n i18nErrors.getPartial(response, ['AdGroups', 'CampaignProductScope', 'CampaignCriterions'], 'newcampaign');\r\n throw response;\r\n });\r\n}\r\n\r\nexport function bulkUpdateSmartShoppingCampaign({ campaignId, model }) {\r\n const { adScheduleUseSearcherTimeZone } = model.adScheduleModel || {};\r\n let formatModel = _.omit(_.extend({}, model, {\r\n CampaignType: 'Shopping',\r\n CampaignSubType: 'ShoppingSmartAds',\r\n Priority: 'Highest',\r\n Languages: ['All'],\r\n Id: campaignId,\r\n AdScheduleUseSearcherTimeZone: adScheduleUseSearcherTimeZone,\r\n }), ['locationTargets', 'adScheduleModel']);\r\n // must use the campaign name after modified. or the bulk upsert API will return criterion error.\r\n const criterions = formatCriterions(model, formatModel.Name);\r\n\r\n formatModel.CampaignCriterions = criterions;\r\n\r\n // Pick fields for feed label\r\n if (formatModel.FeedLabel && formatModel.FeedLabel.length > 0) {\r\n formatModel.SalesCountry = 'delete_value';\r\n } else if (formatModel.SalesCountry) {\r\n formatModel.FeedLabel = 'delete_value';\r\n } else {\r\n formatModel.SalesCountry = 'delete_value';\r\n formatModel.FeedLabel = 'delete_value';\r\n }\r\n\r\n return jsdata.ShoppingCampaign.create(formatModel, {\r\n adapter: 'bulk',\r\n cacheResponse: false,\r\n }).catch((response) => {\r\n i18nErrors.getPartial(response, ['AdGroups', 'CampaignProductScope', 'CampaignCriterions'], 'newcampaign');\r\n throw response;\r\n });\r\n}\r\n\r\nexport function getCampaign(campaignId) {\r\n const params = {\r\n queryParameters: {\r\n entitySet: edmCampaign.currentAccount.Campaigns,\r\n expand: ['Budget', 'CampaignConversionGoal/Goals'],\r\n },\r\n bypassCache: true,\r\n };\r\n\r\n return jsdata.Campaign.find(campaignId, params);\r\n}\r\n\r\nexport function createAdGroupWithDefaulSettings(campaign) {\r\n return jsdata.AdGroup\r\n .create({\r\n Name: defaultAdGroupName,\r\n Campaign: {\r\n Id: campaign.Id,\r\n },\r\n SearchBid: defaultBidForShoppingCampaign(),\r\n Status: 'Active',\r\n ProductAds: [\r\n {\r\n CampaignName: campaign.Name ? campaign.Name : campaign.name,\r\n AdGroupName: defaultAdGroupName,\r\n PromotionalText: '',\r\n },\r\n ],\r\n }, { adapter: 'bulk', cacheResponse: false });\r\n}\r\n","import Backbone from 'backbone';\r\nimport _ from 'underscore';\r\nimport template from '@bingads-webui-campaign-legacy/shopping-campaign/template/campaign-creation/smart-shopping-campaign-creation.pug';\r\nimport CampaignSettingsView from '@bingads-webui-campaign-legacy/crud-campaign/view/create';\r\nimport ShoppingSettingsView from '@bingads-webui-campaign-legacy/shopping-campaign/view/campaign-creation/shopping-settings';\r\nimport CampaignTargetingView from '@bingads-webui-campaign-legacy/campaign-targeting/view/campaign-targeting';\r\nimport summaryDataContextManager from '@bingads-webui-static-legacy/summary/SummaryDataContextManager';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nimport * as scrollUtil from '@bingads-webui-component-legacy/extension/scrollTo';\r\n// eslint-disable-next-line\r\nimport _bingads_webui_component_legacy_legacy_router_index from '@bingads-webui-component-legacy/legacy-router/index';\r\n// eslint-disable-next-line\r\nconst router = _bingads_webui_component_legacy_legacy_router_index.legacyRouter;\r\nimport ModalManager from '@bingads-webui-component-legacy/dialog/modalManager';\r\nimport * as i18nError from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport * as gmcToMMCGridDeps from '@bingads-webui-campaign-react/gmc-to-mmc-mapping-grid-shared';\r\n\r\nconst isBSCSmartImportEnabled = pageContext && pageContext.Permissions && pageContext.Permissions.IsBSCSmartImportEnabled;\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/shopping-campaign');\r\n\r\nconst modalManager = new ModalManager(i18n.get('Browser_Reload_AlertMessage'));\r\n\r\nexport default class View extends Backbone.View {\r\n initialize({\r\n deps,\r\n }) {\r\n this.deps = deps;\r\n this.template = template;\r\n this.campaignSettingsView = null;\r\n this.shoppingSettingsView = null;\r\n this.campaignTargetingView = null;\r\n this.cachedModel = {\r\n campaignSettings: {},\r\n shoppingSettings: {},\r\n campaignTargeting: {\r\n locationTargets: {},\r\n adScheduleModel: {},\r\n },\r\n };\r\n this.navigateToRoute = router.navigateToRoute;\r\n this.campaignId = null;\r\n this.adgroupId = null;\r\n this.campaignName = null;\r\n\r\n this.initModalManager();\r\n }\r\n\r\n initModalManager() {\r\n modalManager.on();\r\n\r\n window.App && window.App.router_new.on('route', () => { // eslint-disable-line\r\n if (modalManager.active) {\r\n modalManager.off();\r\n }\r\n });\r\n }\r\n\r\n renderSubViews(productData, editMode, campaignInfo) {\r\n this.campaignSettingsPlaceholder = this.$el.find('.campaign-settings');\r\n this.shoppingSettingsPlaceholder = this.$el.find('.shopping-settings');\r\n this.campaignTargetingPlaceholder = this.$el.find('.campaign-targeting');\r\n\r\n // init campaign settings\r\n this.campaignSettingsView = this.renderCampaignSettingsView();\r\n this.campaignSettingsPlaceholder.empty().append(this.campaignSettingsView.$el);\r\n // init shopping settings\r\n this.shoppingSettingsView = this.renderShoppingSettingsView(productData, editMode);\r\n this.shoppingSettingsPlaceholder.empty().append(this.shoppingSettingsView.$el);\r\n // init campaign targeting\r\n this.campaignTargetingView = this.renderCampaignTargetingView(editMode, campaignInfo);\r\n this.campaignTargetingPlaceholder.empty().append(this.campaignTargetingView.$el);\r\n }\r\n\r\n renderCampaignSettingsView() {\r\n return new CampaignSettingsView(_.extend({\r\n scenario: 'smart-shopping-campaign-creation-workflow',\r\n showLanguage: false,\r\n campaignType: 'shopping',\r\n campaignSubType: 'ShoppingSmartAds',\r\n Id: this.campaignId,\r\n isNotAudienceCampaign: true,\r\n }, this.cachedModel.campaignSettings)).render();\r\n }\r\n\r\n renderShoppingSettingsView(productData, editMode = false) {\r\n return new ShoppingSettingsView({\r\n data: productData,\r\n campaignType: 'Shopping',\r\n campaignSubType: 'ShoppingSmartAds',\r\n model: this.cachedModel.shoppingSettings,\r\n editMode,\r\n // For BSC Import, we will show some information if the smart shopping campaign has a placeholder store associated to it\r\n shouldShowPlaceholderStoreIfExists: isBSCSmartImportEnabled && editMode,\r\n deps: {\r\n gmcToMMCGridDeps,\r\n i18nNewDesign: this.deps.i18nNewDesign,\r\n },\r\n }).render();\r\n }\r\n\r\n renderCampaignTargetingView(editMode, campaignInfo = {}) {\r\n const { AdScheduleUseSearcherTimeZone: adScheduleUseSearcherTimeZone } = campaignInfo;\r\n\r\n this.cachedModel.campaignTargeting.adScheduleModel.adScheduleUseSearcherTimeZone = adScheduleUseSearcherTimeZone;\r\n return new CampaignTargetingView({\r\n deps: {\r\n eventDelegator: this.deps.eventDelegator,\r\n },\r\n model: this.cachedModel.campaignTargeting,\r\n campaignId: this.campaignId,\r\n adgroupId: this.adgroupId,\r\n showDateSettings: !editMode,\r\n }).render();\r\n }\r\n\r\n navigateToCampaignSummaryPage(isEditMode) {\r\n modalManager.off();\r\n const { campaignId, campaignName } = this;\r\n\r\n if (campaignId) {\r\n if (isEditMode) {\r\n // eslint-disable-next-line camelcase\r\n this.navigateToRoute('campaign_adgroup', { campaign_id: campaignId });\r\n } else {\r\n this.navigateToRoute('campaign');\r\n }\r\n\r\n summaryDataContextManager.getContext('/campaign/NewCampaign/Create?');\r\n if (this.deps.eventDelegator) {\r\n this.deps.eventDelegator.trigger(\r\n isEditMode ? 'campaignUpdated' : 'campaignCreated', {\r\n data: [{\r\n Id: Number(campaignId),\r\n Name: campaignName,\r\n AccountId: pageContext.CurrentAccount.Id,\r\n CampaignType: 2,\r\n CampaignSubType: 12,\r\n }]});\r\n }\r\n } else {\r\n this.navigateToRoute('campaign');\r\n }\r\n }\r\n\r\n refreshCampaignTargetingView() {\r\n this.campaignTargetingView.remove();\r\n this.campaignTargetingView = this.renderCampaignTargetingView();\r\n this.campaignTargetingPlaceholder.empty().append(this.campaignTargetingView.el);\r\n }\r\n\r\n handleApiErrors(response) {\r\n if (!response || response === 'exclusion error') {\r\n return null;\r\n }\r\n\r\n const errors = _.chain(response.errors).map((error) => error.Error).uniq().value();\r\n\r\n if (response.entity && response.entity.Id) {\r\n //the campaign is saved to server\r\n this.campaignId = response.entity.Id;\r\n this.campaignSettingsView.ko_model.Id(response.entity.Id); // eslint-disable-line\r\n }\r\n\r\n let campaignErrors = _.reject(response.entity.errors, (error) => {\r\n return _.contains(['TrackingUrlTemplate', 'UrlCustomParameters'], error.property);\r\n });\r\n\r\n if (campaignErrors.length) {\r\n this.campaignSettingsView.handleApiErrors(campaignErrors);\r\n } else {\r\n const bulkApiErrors = i18nError.getBulkApiErrors(response.errors);\r\n const errMsg = bulkApiErrors && bulkApiErrors[0] && bulkApiErrors[0].message ?\r\n bulkApiErrors[0].message : document.querySelector('#internalErrorMsg').value;\r\n\r\n window.App.views.alertCenter.showError(errMsg);\r\n }\r\n\r\n return errors;\r\n }\r\n\r\n getValue() {\r\n const campaignSetting = this.campaignSettingsView.getData();\r\n const shoppingSetting = this.shoppingSettingsView.viewModel.toObject();\r\n const campaignTargeting = this.campaignTargetingView.getValue();\r\n\r\n if (campaignSetting && shoppingSetting && campaignTargeting) {\r\n const model = {\r\n campaignSetting,\r\n shoppingSetting,\r\n campaignTargeting,\r\n };\r\n\r\n return model;\r\n }\r\n return false;\r\n }\r\n\r\n scrollToErrors() {\r\n let errors = this.$('.error, .is-error')\r\n .filter(':visible');\r\n\r\n errors = errors.filter((index) => {\r\n const err = errors.eq(index);\r\n\r\n return err.text() !== '';\r\n });\r\n\r\n scrollUtil.scrollAndCenter(errors);\r\n }\r\n\r\n remove() {\r\n if (this.campaignSettingsView) {\r\n this.campaignSettingsView.remove();\r\n }\r\n if (this.campaignTargetingView) {\r\n this.campaignTargetingView.remove();\r\n }\r\n if (this.shoppingSettingsView) {\r\n this.shoppingSettingsView.remove();\r\n }\r\n super.remove();\r\n }\r\n}\r\n","import instrumentation from '@bingads-webui-campaign-legacy/instrumentation/index';\r\n\r\nexport class SSCInstrumentation {\r\n constructor() {\r\n const scenario = instrumentation.oldUISmartShoppingCampaignCreationScenario.create();\r\n\r\n this.activity = scenario.SSCCreationActivity.create();\r\n }\r\n\r\n signal(message) {\r\n try {\r\n const str = JSON.stringify(message);\r\n\r\n this.activity.signal(str);\r\n } catch (e) {\r\n console.log(e.stack); // eslint-disable-line\r\n }\r\n }\r\n\r\n sendEnterPageLog() {\r\n this.signal({\r\n messageType: 'ENTER_PAGE',\r\n });\r\n }\r\n\r\n sendCreateCampaignSucceededLog(campaignId) {\r\n this.signal({\r\n messageType: 'CAMPAIGN_CREATED',\r\n campaignId,\r\n });\r\n }\r\n\r\n sendCreateCampaignErrorLog(errors) {\r\n this.signal({\r\n messageType: 'CAMPAIGN_CREATION_FAILED',\r\n });\r\n errors.forEach((err) => {\r\n this.signal({\r\n messageType: 'CAMPAIGN_CREATION_ERROR',\r\n error: err,\r\n });\r\n });\r\n }\r\n\r\n sendValidationErrorLog(validationError) {\r\n this.signal({\r\n messageType: 'CAMPAIGN_CREATION_VALIDATION_FAILED',\r\n });\r\n Object.keys(validationError).forEach((property) => {\r\n const errorList = validationError[property];\r\n\r\n if (errorList && errorList.length) {\r\n errorList.forEach((err) => {\r\n if (err) {\r\n this.signal({\r\n messageType: 'CAMPAIGN_CREATION_VALIDATION_ERROR',\r\n property,\r\n error: err,\r\n });\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n sendCancelCreationLog() {\r\n this.signal({\r\n messageType: 'CANCEL',\r\n });\r\n }\r\n\r\n sendPageError(stack) {\r\n this.signal({\r\n messageType: 'PAGE_ERROR',\r\n stack,\r\n });\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport template from '@bingads-webui-campaign-legacy/shopping-campaign/template/campaign-creation/smart-shopping-campaign-creation.pug';\r\nimport { getProductData, bulkUpdateSmartShoppingCampaign, getCampaign } from '@bingads-webui-campaign-legacy/shopping-campaign/service/campaign-creation/service'; // eslint-disable-line\r\nimport timezonemapper from '@bingads-webui-component-legacy/timezonemapper/index';\r\nimport AdvancedSettingsView from '@bingads-webui-campaign-legacy/advanced-settings/view/advancedSettings';\r\nimport withUiBlock from '@bingads-webui-component-legacy/uiblocker/index';\r\nimport { loadMap } from '@bingads-webui-campaign-legacy/dashboard-page/service/load-map';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nimport Promise from 'bluebird';\r\nimport state from '@bingads-webui-component-legacy/state/index';\r\nimport jsdata from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport { GoalSelectorView } from '@bingads-webui-campaign-react/goal-selector/src/view';\r\nimport SmartShoppingBase from './smart-shopping-base';\r\nimport { SSCInstrumentation } from './ssc-instrumentation';\r\n\r\nconst isBSCSmartImportEnabled = pageContext && pageContext.Permissions && pageContext.Permissions.IsBSCSmartImportEnabled;\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/shopping-campaign');\r\n\r\n\r\nexport default class View extends SmartShoppingBase {\r\n initialize(options) {\r\n super.initialize(options);\r\n this.campaignId = options.campaignId;\r\n this.sscInstrumentation = new SSCInstrumentation();\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click .btn-save': 'save',\r\n 'click .btn-cancel': 'cancel',\r\n };\r\n }\r\n\r\n render() {\r\n const unblock = withUiBlock(this.$el);\r\n\r\n // For BSC Import, we will show some information in campaign settings\r\n // if the smart shopping campaign has a placeholder store associated to it.\r\n const shouldShowPlaceholderStoreIfExists = isBSCSmartImportEnabled;\r\n\r\n Promise.all([\r\n getCampaign(this.campaignId),\r\n getProductData(shouldShowPlaceholderStoreIfExists),\r\n loadMap(),\r\n ]).then(([campaignInfo, productData]) => {\r\n unblock();\r\n this.cachedModel = _.extend(this.cachedModel, {\r\n campaignSettings: _.pick(campaignInfo, ['Name', 'BiddingScheme', 'Budget', 'CampaignCashback']),\r\n shoppingSettings: _.extend({}, _.result(campaignInfo, 'CampaignSettings', [{}])[0], {\r\n CampaignSubType: 'ShoppingSmartAds',\r\n }),\r\n });\r\n this.campaign = campaignInfo;\r\n this.campaignName = campaignInfo.Name;\r\n this.$el.html(template({ i18n, isStoreNotValid: false })).addClass('smart-shopping-settings');\r\n this.renderSubViews(productData, true, campaignInfo);\r\n this.advancedSettingsViewPlaceholder = this.$el.find('.advanced-settings');\r\n this.advancedSettingsView = this.renderAdvancedSettingsView(campaignInfo);\r\n this.advancedSettingsViewPlaceholder.empty().append(this.advancedSettingsView.$el);\r\n this.renderGoalSelector(campaignInfo);\r\n }).catch((e) => {\r\n this.sscInstrumentation.sendPageError(e.stack);\r\n const errMsg = document.querySelector('#internalErrorMsg').value;\r\n\r\n window.App.views.alertCenter.showError(errMsg);\r\n throw e;\r\n });\r\n return this;\r\n }\r\n\r\n renderAdvancedSettingsView(campaignInfo) {\r\n return new AdvancedSettingsView({\r\n campaignId: this.campaignId,\r\n level: 'campaign',\r\n scenario: 'smart-shopping-campaign',\r\n TimeZone: timezonemapper.getAccountTimeZone(),\r\n model: campaignInfo,\r\n nativeAdsCampaignBid: _.result(this.campaign, 'NativeBidAdjustment') || 0,\r\n campaignType: 'shopping',\r\n collapseAdvancedSettings: this.isSponsoredCampaign,\r\n }).render();\r\n }\r\n\r\n validate() {\r\n const isFeedFilterValid = this.shoppingSettingsView.isFeedLabelEnabled ? this.shoppingSettingsView.validateFeedFilter() : true;\r\n\r\n return super.getValue() && this.advancedSettingsView.validate() && isFeedFilterValid;\r\n }\r\n\r\n renderGoalSelector(campaign) {\r\n const cashbackSettings = _.result(campaign, 'CampaignCashback');\r\n const hasCashbackSettings = cashbackSettings &&\r\n (cashbackSettings.PersonalizedOffersEnabled === true ||\r\n cashbackSettings.MonthlyBudget > 0);\r\n const isSPA = campaign.CampaignSubType === 'ShoppingSponsoredProductAd';\r\n\r\n const enableGoalSelector = !isSPA && !hasCashbackSettings;\r\n\r\n if (enableGoalSelector) {\r\n this.goalSelectionView = new GoalSelectorView({\r\n i18n: i18n.realI18n,\r\n pageSize: 10,\r\n isMultiMode: true,\r\n isHideSaveBar: true,\r\n campaign,\r\n jsdata,\r\n state,\r\n });\r\n this.$('.conversion-goal-selection').empty().html(this.goalSelectionView.render().el);\r\n } else {\r\n this.$('.conversion-goal-section').empty();\r\n }\r\n }\r\n getValue() {\r\n if (this.validate()) {\r\n const value = super.getValue();\r\n let model = _.extend({}, value.campaignSetting, value.shoppingSetting, value.campaignTargeting);\r\n const advancedSettings = this.advancedSettingsView.getValues();\r\n\r\n model = _.extend(model, advancedSettings.urlOptions);\r\n if (this.goalSelectionView) {\r\n model.CampaignConversionGoalAssociations =\r\n this.goalSelectionView.convertToMTFormat(this.campaignId);\r\n }\r\n return model;\r\n }\r\n return false;\r\n }\r\n\r\n handleApiErrors(response) {\r\n super.handleApiErrors(response);\r\n if (response.entity && response.entity.Id) {\r\n this.advancedSettingsView.setData(response);\r\n this.advancedSettingsView.handleErrors(response);\r\n }\r\n }\r\n\r\n save() {\r\n const model = this.getValue();\r\n\r\n if (model) {\r\n const unblock = withUiBlock();\r\n\r\n bulkUpdateSmartShoppingCampaign({\r\n campaignId: this.campaignId,\r\n model,\r\n })\r\n .then((data) => {\r\n unblock();\r\n this.campaignName = data.Name;\r\n this.advancedSettingsView.setData(data);\r\n this.navigateToCampaignSummaryPage(true);\r\n })\r\n .catch((response) => {\r\n unblock();\r\n this.handleApiErrors(response);\r\n this.scrollToErrors();\r\n });\r\n } else {\r\n this.scrollToErrors();\r\n }\r\n }\r\n\r\n cancel() {\r\n this.navigateToCampaignSummaryPage(true);\r\n }\r\n\r\n remove() {\r\n super.remove();\r\n if (this.advancedSettingsView) {\r\n this.advancedSettingsView.remove();\r\n }\r\n }\r\n}\r\n","import BaseViewModel from '../common/base';\r\n\r\nclass ViewModel extends BaseViewModel {\r\n constructor() {\r\n super();\r\n\r\n this.configSchema(this);\r\n }\r\n}\r\n\r\nexport default ViewModel;\r\n","/*eslint new-cap:0 */\r\nimport Backbone from 'backbone';\r\nimport ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport template from '@bingads-webui-campaign-legacy/shopping-campaign/template/campaign-creation/update.pug';\r\nimport CreateView from '@bingads-webui-campaign-legacy/shopping-campaign/view/campaign-creation/index';\r\nimport ViewModel from '@bingads-webui-campaign-legacy/shopping-campaign/viewmodel/campaign-creation/update';\r\nimport { getODataErrors } from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport jsData from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport withUiBlock from '@bingads-webui-component-legacy/uiblocker/index';\r\nimport edmCampaign from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport state from '@bingads-webui-component-legacy/state/index';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport Promise from 'bluebird';\r\nimport { getFeedData as GetFeedData } from '@bingads-webui-campaign/audience-campaign-creation-wizard';\r\nimport { isMSStoreAdsCampaign } from '@bingads-webui-campaign-react/ms-store-ads-common';\r\n\r\nconst permissions = config.get('Permissions') || {};\r\nconst isEnabledDynamicFeedCampaign = permissions.IsEnabledForDynamicFeedCampaign;\r\n\r\nexport default class View extends Backbone.View {\r\n initialize({\r\n deps,\r\n perfMarker,\r\n ccJsData,\r\n }) {\r\n if (perfMarker) {\r\n this.campaignScopeAllSettingsPerfMarker = perfMarker.createChild('CampaignScope_AllSettings_EditShoppingCampaign');\r\n }\r\n\r\n this.mark('willInit');\r\n this.campaignId = Number(state.get('campaign_id'));\r\n this.deps = deps;\r\n this.ccJsData = ccJsData;\r\n this.viewModel = new ViewModel();\r\n }\r\n\r\n render() {\r\n this.$el.html(template());\r\n ko.applyBindings(this.viewModel, this.el);\r\n\r\n this.hideUIBlocker = withUiBlock();\r\n this.mark('willFetchData');\r\n Promise.all(isEnabledDynamicFeedCampaign ? [this.getCampaign(), this.getFeedData()] : [this.getCampaign()])\r\n .then(([campaign, feed = null]) => {\r\n this.mark('willRender');\r\n const isMSStoreAdsGAWorkflow = isMSStoreAdsCampaign(campaign);\r\n\r\n this.shoppingCampaignView = new CreateView({ campaign, deps: this.deps, feed, isSettingsPage: true, isMSStoreAdsGAWorkflow, ccJsData: this.ccJsData });\r\n this.$('.update-container').html(this.shoppingCampaignView.render().el);\r\n })\r\n .finally(() => {\r\n this.hideUIBlocker();\r\n this.mark('done');\r\n })\r\n .catch(({ errors }) => {\r\n this.viewModel.errors.add(getODataErrors(errors));\r\n });\r\n\r\n return this;\r\n }\r\n\r\n getCampaign() {\r\n const params = {\r\n queryParameters: {\r\n entitySet: edmCampaign.currentAccount.Campaigns,\r\n expand: ['Budget', 'CampaignConversionGoal/Goals'],\r\n },\r\n bypassCache: true,\r\n };\r\n\r\n return jsData.Campaign.find(this.campaignId, params);\r\n }\r\n\r\n getFeedData({ $top = 10000, $skip = 0 } = {}) {\r\n return GetFeedData({ $top, $skip, permissions });\r\n }\r\n\r\n remove() {\r\n if (this.shoppingCampaignView) {\r\n this.shoppingCampaignView.remove();\r\n }\r\n super.remove();\r\n }\r\n\r\n mark(perfMarkerEvent) {\r\n if (this.campaignScopeAllSettingsPerfMarker) {\r\n this.campaignScopeAllSettingsPerfMarker[perfMarkerEvent]();\r\n }\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport BaseModel from '@bingads-webui-campaign-legacy/bulk-operation/util/bulk-edit-job';\r\n\r\nexport default class ChangeBidAdjustmentModel extends BaseModel {\r\n initialize() {\r\n this.defaults = _.extend({}, BaseModel.prototype.defaults, {\r\n Entity: 'CampaignCriterion',\r\n BatchAction: {\r\n Actions: [{\r\n '@odata.type': '#Model.NumericAction',\r\n Property: 'BidAdjustment',\r\n ActionType: 'SetToAmount',\r\n Value: '',\r\n }],\r\n },\r\n });\r\n }\r\n}\r\n","import ko from 'knockout';\r\nimport BaseViewModel from '@bingads-webui-static-legacy/bulk-edit/viewmodel/bulkEditJob';\r\n\r\nconst i18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/targeting-settings');\r\n\r\nexport default class ViewModel {\r\n constructor(options) {\r\n BaseViewModel.call(this);\r\n this.settingView = options.settingView;\r\n this.showButtonBar = ko.observable(true);\r\n this.showCloseButton = ko.observable(false);\r\n this.selectedEntityCount(options.model.get('selectedEntityCount'));\r\n this.entity = options.entity;\r\n this.gridType = options.gridType;\r\n this.crossPageSelectAll = options.crossPageSelectAll;\r\n this.titleText = ko.computed(() =>\r\n i18n.getString(`BulkEdit_${this.gridType}_ChangeBidTitle`, {selectCount: this.selectedEntityCount()}), this);\r\n this.entityNameHeader = ko.computed(() =>\r\n i18n.getString(`BulkEdit_${this.gridType}_EntityNameHeader`), this);\r\n this.bulkEditInfo = ko.computed(() =>\r\n i18n.getString(`BulkEdit_${this.gridType}_BulkEditInfo`), this);\r\n this.showAdgroupSelectedAllMixInheritWarning = ko.computed(() => {\r\n if (this.entity === 'AdGroupCriterion' && this.crossPageSelectAll.isAllSelected) {\r\n return true;\r\n }\r\n return false;\r\n });\r\n this.validate = () => {\r\n return this.settingView.validate();\r\n };\r\n }\r\n}\r\n","import { getLocationDisplayName, getDayTimeDisplayName, getDeviceDisplayName } from '@bingads-webui-campaign/targeting-settings-scaffolds';\r\nimport _ from 'underscore';\r\nimport $ from 'jquery';\r\n\r\nconst i18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/targeting-settings');\r\n\r\nexport function getDisplayName(entity) {\r\n if (entity.DeviceName) {\r\n return getDeviceDisplayName(i18n, { Criterion: entity });\r\n } else if (entity.Day) {\r\n return getDayTimeDisplayName(i18n, { Criterion: entity });\r\n } else {\r\n return getLocationDisplayName({ Criterion: entity });\r\n }\r\n}\r\n\r\nexport function getSelectedEntityIdStrings(gridView) {\r\n return _.map(gridView.selectedItems(), (obj) => {\r\n if (obj.LevelOfDetails === 'AdGroup') {\r\n const campaignId = obj.Campaign ? obj.Campaign.Id : $.advertiser.getUrlParameter('cmpid');\r\n\r\n return `CampaignId=${campaignId},AdGroupId=${obj.AdGroup.Id},TargetGroupDetailId=${obj.Id}`;\r\n } else {\r\n return `CampaignId=${obj.Campaign.Id},TargetGroupDetailId=${obj.Id}`;\r\n }\r\n });\r\n}\r\n","import _ from 'underscore';\r\nimport decimalNumber from '@bingads-webui-component-legacy/humanize/decimal';\r\nimport BaseView from '@bingads-webui-static-legacy/bulk-edit/view/bulkEditJob';\r\nimport logger from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport { BidAdjustmentView } from '@bingads-webui-campaign/bid-adjustment';\r\nimport template from '@bingads-webui-static-legacy/bulk-edit/template/settings/changeBid.pug';\r\nimport ChangeBidAdjustmentViewModel from './change-bid-adjustment-viewmodel';\r\nimport filterConverter from '@bingads-webui-static-legacy/odata-filter-converter';\r\nimport { getSelectedEntityIdStrings } from '../helpers';\r\n\r\nconst i18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/targeting-settings');\r\n\r\nfunction formatBid(rows, formatEntityString) {\r\n if (rows) {\r\n _.each(rows, (value) => {\r\n value.data = [];\r\n value.EntityKeyObject = {};\r\n\r\n _.each(value.EntityKey, (obj) => {\r\n value.EntityKeyObject[obj.Key] = obj.Value;\r\n });\r\n\r\n let name = '';\r\n\r\n if (_.isFunction(formatEntityString)) {\r\n name = formatEntityString(value.EntityKeyObject);\r\n }\r\n value.data.push({value: name, isHtml: false});\r\n\r\n if (value.Changes && value.Changes.length) {\r\n value.data.push({value: decimalNumber.fromFloatToPercentString(value.Changes[0].OriginalValue, 0), isHtml: false});\r\n value.data.push({value: decimalNumber.fromFloatToPercentString(value.Changes[0].NewValue, 0), isHtml: false});\r\n } else {\r\n value.data.push({value: '', isHtml: false});\r\n value.data.push({value: '', isHtml: false});\r\n }\r\n });\r\n }\r\n return rows;\r\n}\r\n\r\nexport default class ChangeBidAdjustmentView extends BaseView {\r\n initialize(options) {\r\n this.options = options || {};\r\n this.entity = options.entity;\r\n super.initialize(options);\r\n this.gridType = options.gridType;\r\n this.customValidators = options.customValidators;\r\n this.formatEntityString = options.formatEntityString;\r\n this.checkInheritTargets = options.checkInheritTargets;\r\n this.template = template;\r\n this.settingView = new BidAdjustmentView({\r\n value: 0,\r\n i18n,\r\n showButtons: false,\r\n customValidators: this.customValidators,\r\n });\r\n // eslint-disable-next-line camelcase\r\n this.ko_model = new ChangeBidAdjustmentViewModel({\r\n entity: this.entity,\r\n model: this.model,\r\n settingView: this.settingView,\r\n gridType: this.gridType,\r\n crossPageSelectAll: this.grid.pgridPlugins.crossPageSelectAll,\r\n });\r\n }\r\n\r\n render(options) {\r\n super.render(options);\r\n this.$('#bid-adjustment-bulk-edit').empty().html(this.settingView.render().el);\r\n return this;\r\n }\r\n\r\n setAction(simulateResults) {\r\n // not use PreviewEntityIds but use PreviewCompositeIds for this feature.\r\n this.model.unset('PreviewEntityIds');\r\n this.model.unset('PreviewCompositeIds');\r\n if (simulateResults) {\r\n if (this.grid.pgridPlugins.crossPageSelectAll.isAllSelected) {\r\n this.model.set('PreviewCompositeIds', getSelectedEntityIdStrings(this.grid.gridView));\r\n }\r\n }\r\n\r\n const action = {\r\n Actions: [{\r\n '@odata.type': '#Model.NumericAction',\r\n Property: 'BidAdjustment',\r\n ActionType: 'SetToAmount',\r\n Value: this.settingView && this.settingView.currentModel ?\r\n this.settingView.currentModel.BidMultiplier : '',\r\n }],\r\n };\r\n\r\n const selectedItems = this.grid.gridView.selectedItems();\r\n\r\n // bid bulk edit log\r\n // TODO: will improve later\r\n logger.logMessage(\r\n 'ClientTrace',\r\n { name: 'Info', value: 0 },\r\n 'AdScheduleGridView.bidBulkEdit',\r\n `changeBidValue:${action.Actions[0].Value},selectedItems:${JSON.stringify(selectedItems)}}`,\r\n );\r\n\r\n this.model.set('BatchAction', action);\r\n this.model.set('Entity', this.entity);\r\n }\r\n\r\n formatErrors(errors) {\r\n return formatBid(errors, this.formatEntityString);\r\n }\r\n\r\n formatPreviewResults(results) {\r\n return formatBid(results, this.formatEntityString);\r\n }\r\n\r\n getFilterURLParam(filter, entity) {\r\n // New UI: replace the filterState with filterService, how the filterService/filterState used?\r\n let conditionString;\r\n\r\n if (this.grid.filterState) {\r\n conditionString = this.grid.filterState.getAllFilters().odataV4({ignoreCase: false});\r\n } else {\r\n conditionString = this.grid.filterService.getCombinedFilter().odataV4({ignoreCase: false});\r\n }\r\n let result;\r\n\r\n // This is for chaining the id rules with Criterion\r\n if (filter.idBased) {\r\n const idString = filterConverter.convert(filter.FilterExpressions, entity).$filter;\r\n const conditionRegex = /isof\\(Criterion, 'Model.[\\w]+Criterion'\\)/g;\r\n const conditionFragment = conditionString.match(conditionRegex);\r\n let conditionFragmentALl = conditionFragment[0];\r\n\r\n // location has 2 criterions\r\n if (conditionFragment.length > 1) {\r\n conditionFragmentALl = `${conditionFragmentALl} or ${conditionFragment[1]}`;\r\n }\r\n\r\n result = `(${conditionFragmentALl}) and (${idString})`;\r\n } else {\r\n result = conditionString;\r\n }\r\n\r\n return `$filter=(${encodeURIComponent(result)})`;\r\n }\r\n\r\n getIdFilter() {\r\n const FilterExpressions = [];\r\n\r\n if (this.grid.pgridPlugins.crossPageSelectAll.isAllSelected === false) {\r\n FilterExpressions.push({\r\n SelectedColumn: 'IdString',\r\n SelectedOperator: 'Equal',\r\n Values: getSelectedEntityIdStrings(this.grid.gridView),\r\n });\r\n }\r\n\r\n return {\r\n FilterExpressions,\r\n };\r\n }\r\n\r\n makeChanges(simulateResults) {\r\n // when view by ad group and not select all, we need to check if there is any inherit records.\r\n if (this.entity === 'AdGroupCriterion' && !this.grid.pgridPlugins.crossPageSelectAll.isAllSelected) {\r\n const selectedItems = this.grid.gridView.selectedItems();\r\n\r\n if (_.isFunction(this.checkInheritTargets)) {\r\n const inheritResult = this.checkInheritTargets(selectedItems, false);\r\n\r\n if (inheritResult) {\r\n return;\r\n }\r\n }\r\n }\r\n super.makeChanges(simulateResults);\r\n }\r\n}\r\n","import ChangeCashbackPercentView from '@bingads-webui-static-legacy/bulk-edit/view/demographics/changeCashbackPercent';\r\nimport tmpl from '@bingads-webui-static-legacy/bulk-edit/template/targeting/changeCashbackPercent.pug';\r\nimport filterConverter from '@bingads-webui-static-legacy/odata-filter-converter';\r\nimport decimalNumber from '@bingads-webui-component-legacy/humanize/decimal';\r\nimport _ from 'underscore';\r\nimport { getSelectedEntityIdStrings } from '../helpers';\r\n\r\nconst i18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/targeting-settings');\r\n\r\nfunction formatBid(rows, formatEntityString) {\r\n if (rows) {\r\n _.each(rows, (value) => {\r\n value.data = [];\r\n value.EntityKeyObject = {};\r\n\r\n _.each(value.EntityKey, (obj) => {\r\n value.EntityKeyObject[obj.Key] = obj.Value;\r\n });\r\n\r\n let name = '';\r\n\r\n if (_.isFunction(formatEntityString)) {\r\n name = formatEntityString(value.EntityKeyObject);\r\n }\r\n value.data.push({value: name, isHtml: false});\r\n\r\n if (value.Changes && value.Changes.length) {\r\n let newValue = value.Changes[0].NewValue;\r\n\r\n if (+newValue === -1 || newValue === '') {\r\n newValue = i18n.getString('Campaign_Cashback_Offer_Scope_InheritFromParent');\r\n } else {\r\n newValue = decimalNumber.fromFloatToPercentString(newValue, 2);\r\n }\r\n\r\n const originalValue = value.Changes[0].OriginalValue;\r\n\r\n value.data.push({\r\n value: originalValue === '' || +originalValue === -1 ?\r\n i18n.getString('Campaign_Cashback_Offer_Scope_InheritFromParent') :\r\n decimalNumber.fromFloatToPercentString(value.Changes[0].OriginalValue, 2),\r\n isHtml: false,\r\n });\r\n value.data.push({value: newValue, isHtml: false});\r\n } else {\r\n value.data.push({value: '', isHtml: false});\r\n value.data.push({value: '', isHtml: false});\r\n }\r\n });\r\n }\r\n return rows;\r\n\r\n}\r\n\r\nexport class ChangeTargetingCashbackPercentView extends ChangeCashbackPercentView {\r\n initialize(options) {\r\n super.initialize(options);\r\n this.template = tmpl;\r\n }\r\n\r\n setAction(simulateResults) {\r\n // not use PreviewEntityIds but use PreviewCompositeIds for this feature.\r\n this.model.unset('PreviewEntityIds');\r\n this.model.unset('PreviewCompositeIds');\r\n if (simulateResults) {\r\n if (this.grid.pgridPlugins.crossPageSelectAll.isAllSelected) {\r\n this.model.set('PreviewCompositeIds', getSelectedEntityIdStrings(this.grid.gridView));\r\n }\r\n }\r\n\r\n const action = {\r\n Actions: [{\r\n '@odata.type': '#Model.NumericAction',\r\n Property: 'CashbackAdjustment',\r\n ActionType: 'SetToAmount',\r\n Value: this.ko_model.getCashbackPercentValueByAction(),\r\n }],\r\n };\r\n\r\n this.model.set('BatchAction', action);\r\n this.model.set('Entity', this.entity);\r\n }\r\n\r\n getFilterURLParam(filter, entity) {\r\n // New UI: replace the filterState with filterService, how the filterService/filterState used?\r\n let conditionString;\r\n\r\n if (this.grid.filterState) {\r\n conditionString = this.grid.filterState.getAllFilters().odataV4({ignoreCase: false});\r\n } else {\r\n conditionString = this.grid.filterService.getCombinedFilter().odataV4({ignoreCase: false});\r\n }\r\n let result;\r\n\r\n // This is for chaining the id rules with Criterion\r\n if (filter.idBased) {\r\n const idString = filterConverter.convert(filter.FilterExpressions, entity).$filter;\r\n const conditionRegex = /isof\\(Criterion, 'Model.[\\w]+Criterion'\\)/g;\r\n const conditionFragment = conditionString.match(conditionRegex);\r\n let conditionFragmentALl = conditionFragment[0];\r\n\r\n // location has 2 criterions\r\n if (conditionFragment.length > 1) {\r\n conditionFragmentALl = `${conditionFragmentALl} or ${conditionFragment[1]}`;\r\n }\r\n\r\n result = `(${conditionFragmentALl}) and (${idString})`;\r\n } else {\r\n result = conditionString;\r\n }\r\n\r\n return `$filter=(${encodeURIComponent(result)})`;\r\n }\r\n\r\n getIdFilter() {\r\n const FilterExpressions = [];\r\n\r\n if (this.grid.pgridPlugins.crossPageSelectAll.isAllSelected === false) {\r\n FilterExpressions.push({\r\n SelectedColumn: 'IdString',\r\n SelectedOperator: 'Equal',\r\n Values: getSelectedEntityIdStrings(this.grid.gridView),\r\n });\r\n }\r\n\r\n return {\r\n FilterExpressions,\r\n };\r\n }\r\n\r\n makeChanges(simulateResults) {\r\n // when view by ad group and not select all, we need to check if there is any inherit records.\r\n if (this.entity === 'AdGroupCriterion' && !this.grid.pgridPlugins.crossPageSelectAll.isAllSelected) {\r\n const selectedItems = this.grid.gridView.selectedItems();\r\n\r\n if (_.isFunction(this.checkInheritTargets)) {\r\n const inheritResult = this.checkInheritTargets(selectedItems, false);\r\n\r\n if (inheritResult) {\r\n return;\r\n }\r\n }\r\n }\r\n super.makeChanges(simulateResults);\r\n }\r\n\r\n formatErrors(errors) {\r\n return formatBid(errors, this.formatEntityString);\r\n }\r\n\r\n formatPreviewResults(results) {\r\n return formatBid(results, this.formatEntityString);\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { shouldSupportCashbackSettings } from '@bingads-webui-campaign/personalized-offer-shared';\r\nimport ChangeBidAdjustmentModel from './change-bid-adjustment/change-bid-adjustment-model';\r\nimport ChangeBidAdjustmentView from './change-bid-adjustment/change-bid-adjustment-view';\r\nimport { ChangeTargetingCashbackPercentView } from './change-cashback-percent/change-cashback-percent-view';\r\nimport ChangeCashbackPercentModel from '@bingads-webui-static-legacy/bulk-edit/model/demographics/changeCashbackPercent';\r\nimport popup from '@bingads-webui-component-legacy/dialog/popup';\r\nimport { showAlert } from './common-alert/index';\r\nimport appConfig from '@bingads-webui-component-legacy/config/index';\r\nimport { isDeprecatedLocation } from '@bingads-webui-campaign-legacy/location-targets/util/locationTargetDeprecationHelper';\r\n\r\nconst i18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/targeting-settings');\r\n\r\nexport default (definePlugin) => definePlugin('bidAdjustmentBulkEdit', [\r\n 'config',\r\n 'gridView',\r\n 'toolbar',\r\n 'pagination',\r\n 'crossPageSelectAll',\r\n 'filter',\r\n 'filterState',\r\n], (config, gridView, toolbar, pagination, crossPageSelectAll, filter, filterState) => {\r\n const pluginName = 'bidAdjustmentBulkEdit';\r\n let pluginConfig = _.result(config.plugins, pluginName, {});\r\n const isForVNext = _.result(pluginConfig, 'isForVNext', false);\r\n let toolbarEditor;\r\n let filterService;\r\n\r\n if (isForVNext) {\r\n // Currently, VNext toolbar, toolbarWithItem return toolbarEditor directly\r\n toolbarEditor = toolbar.gridToolbarGroup.toolbarWithItem();\r\n // Implicit dependency\r\n filterService = _.result(config, 'filterService', {});\r\n } else {\r\n const menuId = 'bulk-edit-bid-multiplier';\r\n\r\n toolbarEditor = toolbar.gridToolbarGroup.toolbarWithItem(menuId);\r\n pluginConfig = _.findWhere(toolbarEditor.options.items, { id: menuId });\r\n }\r\n\r\n function noneSelectedAndAlert(count) {\r\n if (count < 1) {\r\n popup.alert(i18n.getString('Grid_RowSelectionRequired'));\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n function getGridSelectionCount() {\r\n return crossPageSelectAll.isAllSelected ?\r\n crossPageSelectAll.viewModel.totalRowsTotalPageCount() :\r\n gridView.selectedKeys().length;\r\n }\r\n\r\n function smartShoppingCampaignSelected(items) {\r\n return _.some(items, (item) => {\r\n return _.chain(item)\r\n .result('Campaign')\r\n .result('CampaignSubType')\r\n .value() === 'ShoppingSmartAds';\r\n });\r\n }\r\n\r\n /// return false if all are physical records\r\n /// return true if some are inherit or all inherit but not belong to 1 ad group\r\n /// return adgroupItems list if all are belong to 1 ad group\r\n function checkInheritTargets(selectedItems, editable = true) {\r\n const campaignItems = _.reject(selectedItems, (obj) => obj.LevelOfDetails === 'AdGroup');\r\n\r\n if (campaignItems.length === selectedItems.length && editable) {\r\n const adgroupItems = _.reject(campaignItems, (obj) => obj.AdGroupId !== campaignItems[0].AdGroupId);\r\n\r\n if (campaignItems.length === adgroupItems.length) {\r\n return adgroupItems;\r\n } else {\r\n showAlert({\r\n i18n,\r\n title: i18n.getString('BulkEdit_BidAdjustment_Invalid_Alert_Title'),\r\n messageDetails: i18n.getString(`BulkEdit_BidAdjustment_Inherit_NotSameAdGroup_${pluginConfig.gridType}`),\r\n });\r\n return true;\r\n }\r\n } else if (campaignItems.length > 0) {\r\n showAlert({\r\n i18n,\r\n title: i18n.getString('BulkEdit_BidAdjustment_Invalid_Alert_Title'),\r\n messageDetails: i18n.getString(`BulkEdit_BidAdjustment_MixInheritWarning_${pluginConfig.gridType}`),\r\n });\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n function checkDeprecatedLocations() {\r\n const selectedItems = gridView.selectedItems();\r\n const deprecatedLocationSelected = _.some(selectedItems, (item) => isDeprecatedLocation(item.Criterion));\r\n\r\n if (deprecatedLocationSelected) {\r\n showAlert({\r\n i18n,\r\n title: i18n.getString('BulkEdit_BidAdjustment_Invalid_Alert_Title'),\r\n messageDetails: i18n.getString('BulkEdit_BidAdjustment_DeprecatedWarning_Locations'),\r\n });\r\n }\r\n\r\n return deprecatedLocationSelected;\r\n }\r\n\r\n function renderView(view) {\r\n view.listenTo(gridView, 'didSelect', () => {\r\n view.updateSelectedEntityCount(getGridSelectionCount());\r\n });\r\n\r\n view.render();\r\n view.$el.find(':input:enabled:first').focus();\r\n }\r\n\r\n function expandToolBar(view) {\r\n let gridContainer;\r\n let gridToolbar;\r\n let editorContainer;\r\n\r\n if (isForVNext) {\r\n gridView.overrideWith(view);\r\n } else {\r\n gridContainer = gridView.$el.closest('.settings-view');\r\n gridToolbar = gridContainer.find('.grid-toolbar');\r\n editorContainer = gridContainer.find('.bulkedit-container');\r\n\r\n editorContainer.html(view.$el);\r\n editorContainer.show();\r\n gridToolbar.hide();\r\n }\r\n toolbar.gridToolbarGroup.hideAllToolbars();\r\n\r\n view.on('hide', () => {\r\n if (isForVNext) {\r\n gridView.overrideWith(null);\r\n } else {\r\n gridToolbar.show();\r\n editorContainer.hide();\r\n }\r\n toolbar.gridToolbarGroup.showAllToolbars();\r\n view.remove();\r\n gridView.deselectAll();\r\n gridView.refresh(true);\r\n });\r\n }\r\n\r\n function showBulkEditor(type = 'BidMultiplier') {\r\n let bulkEditView;\r\n\r\n if (noneSelectedAndAlert(getGridSelectionCount()) || checkDeprecatedLocations()) {\r\n return;\r\n }\r\n\r\n // when view by ad group and not select all, we need to check if there is any inherit records.\r\n if (pluginConfig.entity === 'AdGroupCriterion' && !crossPageSelectAll.isAllSelected) {\r\n const selectedItems = gridView.selectedItems();\r\n const inheritResult = checkInheritTargets(selectedItems);\r\n\r\n if (_.isArray(inheritResult)) {\r\n if (smartShoppingCampaignSelected(selectedItems)) {\r\n showAlert({\r\n i18n,\r\n title: i18n.getString('BulkEdit_BidAdjustment_Invalid_Alert_Title'),\r\n messageDetails: i18n.getString('BulkEdit_BidAdjustment_NoSmartShoppingCampaign'),\r\n });\r\n return;\r\n }\r\n gridView.trigger('editInherited', inheritResult);\r\n }\r\n if (inheritResult) {\r\n return;\r\n }\r\n }\r\n\r\n let grid;\r\n\r\n if (isForVNext) {\r\n grid = {\r\n gridView,\r\n pgridPlugins: {\r\n pagination,\r\n crossPageSelectAll,\r\n },\r\n filterService,\r\n };\r\n } else {\r\n grid = {\r\n gridView,\r\n pgridPlugins: {\r\n pagination,\r\n crossPageSelectAll,\r\n filter,\r\n },\r\n filterState,\r\n };\r\n }\r\n\r\n if (type === 'BidMultiplier') {\r\n bulkEditView = new ChangeBidAdjustmentView({\r\n model: new ChangeBidAdjustmentModel({\r\n selectedEntityCount: getGridSelectionCount(),\r\n }),\r\n grid,\r\n entity: _.isEmpty(pluginConfig.entity) ? 'CampaignCriterion' : pluginConfig.entity,\r\n gridType: pluginConfig.gridType,\r\n customValidators: pluginConfig.customValidators,\r\n formatEntityString: pluginConfig.formatEntityString,\r\n checkInheritTargets,\r\n onOperationSuccess: () => {\r\n gridView.deselectAll();\r\n },\r\n isForVNext,\r\n });\r\n } else {\r\n bulkEditView = new ChangeTargetingCashbackPercentView({\r\n model: new ChangeCashbackPercentModel({\r\n selectedEntityCount: getGridSelectionCount(),\r\n }),\r\n grid,\r\n entity: _.isEmpty(pluginConfig.entity) ? 'CampaignCriterion' : pluginConfig.entity,\r\n gridType: pluginConfig.gridType,\r\n customValidators: pluginConfig.customValidators,\r\n formatEntityString: pluginConfig.formatEntityString,\r\n checkInheritTargets,\r\n onOperationSuccess: () => {\r\n gridView.deselectAll();\r\n },\r\n isForVNext,\r\n });\r\n }\r\n\r\n renderView(bulkEditView);\r\n expandToolBar(bulkEditView);\r\n }\r\n\r\n function updateToolbar() {\r\n if (isForVNext) {\r\n toolbarEditor.update({\r\n type: 'button',\r\n id: 'bulk-edit-bid-multiplier',\r\n text: i18n.getString('TargetingSettings_Grid_Bulk_Edit_Bid_Multiplier'),\r\n classes: ['btn-link'],\r\n iconLeftGlyphName: 'ba-Edit',\r\n onClick: () => {\r\n showBulkEditor();\r\n },\r\n });\r\n\r\n const { IsPersonalizedOffersEnabled } = appConfig.get('Permissions');\r\n const currentCampaign = appConfig.get('CurrentCampaign');\r\n const showBulkEditCashbackPercentButton = (currentCampaign == null ||\r\n shouldSupportCashbackSettings(currentCampaign, appConfig.get('Permissions'))) && IsPersonalizedOffersEnabled;\r\n\r\n if (showBulkEditCashbackPercentButton) {\r\n toolbarEditor.update({\r\n type: 'button',\r\n id: 'bulk-edit-cashback-percent',\r\n text: i18n.getString('TargetingSettings_Grid_Bulk_Edit_CashbackPercent'),\r\n classes: ['btn-link'],\r\n iconLeftGlyphName: 'ba-Edit',\r\n onClick: () => {\r\n showBulkEditor('CashbackPercent');\r\n },\r\n });\r\n }\r\n } else {\r\n toolbarEditor.update({\r\n type: 'button',\r\n id: 'bulk-edit-bid-multiplier',\r\n text: i18n.getString('TargetingSettings_Grid_Bulk_Edit_Bid_Multiplier'),\r\n classes: ['btn', 'btn-secondary'],\r\n onClick: () => {\r\n showBulkEditor('BidMultiplier');\r\n },\r\n });\r\n }\r\n }\r\n\r\n updateToolbar();\r\n\r\n gridView.on('didUpdate', () => {\r\n updateToolbar();\r\n });\r\n});\r\n","import _ from 'underscore';\r\nimport $ from 'jquery';\r\nimport popup from '@bingads-webui-component-legacy/dialog/popup';\r\nimport DataStore from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport eventDispatcher from '@bingads-webui-component-legacy/event-dispatcher/index';\r\nimport state from '@bingads-webui-component-legacy/state/index';\r\nimport gridFilterSerializer from '@bingads-webui-campaign-legacy/bulk-operation/util/grid-filter-serializer';\r\nimport summaryDataContextManager from '@bingads-webui-static-legacy/summary/SummaryDataContextManager';\r\nimport { showAlert } from './common-alert/index';\r\n\r\nconst i18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/targeting-settings');\r\n\r\nexport default (definePlugin) => definePlugin('removeBulkEdit', [\r\n 'config',\r\n 'gridView',\r\n 'toolbar',\r\n 'crossPageSelectAll',\r\n 'filterState',\r\n], (config, gridView, toolbar, crossPageSelectAll, filterState) => {\r\n const menuId = 'bulk-edit-remove';\r\n const toolbarEditor = toolbar.gridToolbarGroup.toolbarWithItem(menuId);\r\n const pluginConfig = _.isUndefined(toolbarEditor.options) ?\r\n _.result(config.plugins, 'removeBulkEdit', {}) :\r\n _.findWhere(toolbarEditor.options.items, { id: menuId });\r\n\r\n let filterService;\r\n\r\n const isForVNext = pluginConfig.isForVNext;\r\n\r\n if (isForVNext) {\r\n filterService = _.result(config, 'filterService', {});\r\n }\r\n function noneSelectedAndAlert(count) {\r\n if (count < 1) {\r\n popup.alert(i18n.getString('Grid_RowSelectionRequired'));\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n function getGridSelectionCount() {\r\n return crossPageSelectAll.isAllSelected ?\r\n crossPageSelectAll.viewModel.totalRowsTotalPageCount() :\r\n gridView.selectedKeys().length;\r\n }\r\n\r\n function pollStatus (taskId, successCb, failedCb) {\r\n DataStore.BulkEditSession.find(taskId, {cacheResponse: false}).then((response) => {\r\n successCb(response);\r\n })\r\n .catch(failedCb);\r\n }\r\n\r\n function processResponse (completeCB, failedCB, progressCB, response) {\r\n if (_.contains(['Completed', 'CompletedWithErrors'], response.Status)) {\r\n completeCB(response);\r\n } else if (_.contains(['Failed', 'Aborted', 'Expired'], response.Status)) {\r\n failedCB(response);\r\n } else { //task is inprogress or pending\r\n progressCB(response);\r\n setTimeout(_.partial(pollStatus, response.Id, _.partial(processResponse, completeCB, failedCB, progressCB), failedCB), 500);\r\n }\r\n return response;\r\n }\r\n\r\n function getDateRange () {\r\n try {\r\n const dateRange = state.get('$daterange');\r\n const startdate = (dateRange.start || dateRange.RangeStartDate).toISOString();\r\n const enddate = (dateRange.end || dateRange.RangeEndDate).toISOString();\r\n\r\n return `startdate=${startdate}&enddate=${enddate}`;\r\n } catch (e) {\r\n return '';\r\n }\r\n }\r\n\r\n function getQueryString (projection) {\r\n const dateRange = getDateRange();\r\n let query = '';\r\n const IdStrings = projection.IdString;\r\n\r\n if (_.isEmpty(projection)) {\r\n return dateRange;\r\n }\r\n\r\n if (projection.filters) {\r\n query = projection.filters.odataV4({ ignoreCase: false });\r\n }\r\n\r\n if (_.size(IdStrings) > 0) { //select some ids will distinguish it when new grid support select cross page\r\n const idStringsFilters = _.map(IdStrings, (obj) => {\r\n if (_.isUndefined(obj.AdGroupId)) {\r\n return `IdString eq 'CampaignId=${obj.CampaignId},TargetGroupDetailId=${obj.TargetGroupDetailId}'`;\r\n } else {\r\n return `IdString eq 'CampaignId=${obj.CampaignId},AdGroupId=${obj.AdGroupId},TargetGroupDetailId=${obj.TargetGroupDetailId}'`;\r\n }\r\n }).join(' or ');\r\n\r\n if (_.isEmpty(query)) {\r\n query = idStringsFilters;\r\n } else {\r\n query = `(${query}) and (${idStringsFilters})`;\r\n }\r\n }\r\n query = $.param({$filter: `${query}`});\r\n\r\n return `${query}&${dateRange}`;\r\n }\r\n\r\n function getParams(projection, batchActions, entity, campaignId, adgroupId) {\r\n return {\r\n BatchAction: batchActions,\r\n Description: crossPageSelectAll.isAllSelected ?\r\n gridFilterSerializer.toDescription(isForVNext ? filterService.getCombinedFilter() : filterState.getFilter() ) : JSON.stringify({ idsCount: getGridSelectionCount() }),\r\n Entity: entity,\r\n Selection: {\r\n QueryString: getQueryString(projection),\r\n CampaignId: campaignId,\r\n AdGroupId: adgroupId,\r\n },\r\n };\r\n }\r\n\r\n function bulkEditChange(options) {\r\n let params = options.params;\r\n\r\n let opt = _.defaults({}, options, {\r\n campaignId: null,\r\n adgroupId: null,\r\n completeCB: _.noop,\r\n failedCB: _.noop,\r\n progressCB: _.noop,\r\n });\r\n\r\n let process = _.partial(processResponse, opt.completeCB, opt.failedCB, opt.progressCB);\r\n\r\n let urlParameters = {$expand: 'BulkEditResults'};\r\n\r\n if (_.isEmpty(params)) {\r\n params = getParams(opt.projection, opt.batchActions, opt.entity, opt.campaignId, opt.adgroupId);\r\n }\r\n\r\n return DataStore.BulkEditSession.create(params, {\r\n urlParameters,\r\n cacheResponse: false,\r\n }).then(process)\r\n .catch(opt.failedCB);\r\n }\r\n\r\n function deleteTargets() {\r\n if (noneSelectedAndAlert(getGridSelectionCount())) {\r\n return;\r\n }\r\n\r\n // when view by ad group and not select all, we need to check if there is any inherit records.\r\n if (pluginConfig.entity.indexOf('AdGroupCriterion') >= 0 && !crossPageSelectAll.isAllSelected) {\r\n const selectedItems = gridView.selectedItems();\r\n\r\n const campaignItems = _.reject(selectedItems, (obj) => obj.LevelOfDetails === 'AdGroup');\r\n\r\n if (campaignItems.length > 0) {\r\n showAlert({\r\n i18n,\r\n title: i18n.getString('BulkEdit_Delete_Invalid_Alert_Title'),\r\n messageDetails: i18n.getString(`BulkEdit_Delete_Warning_${pluginConfig.gridType}`),\r\n });\r\n return;\r\n }\r\n }\r\n\r\n let confirmationMessage = '';\r\n\r\n confirmationMessage = i18n.getString('BulkEdit_Delete_Confirmation');\r\n if (pluginConfig.entity.indexOf('AdGroupCriterion') >= 0 && crossPageSelectAll.isAllSelected) {\r\n confirmationMessage = confirmationMessage.concat('\\n', i18n.getString('BulkEdit_Delete_SelectedAll_MixInheritWarning'));\r\n }\r\n\r\n if (!confirm(confirmationMessage)) { // eslint-disable-line no-alert\r\n return;\r\n }\r\n\r\n // invalidate cache\r\n switch (pluginConfig.entity) {\r\n case 'CampaignCriterion':\r\n case 'NegativeCampaignCriterion':\r\n summaryDataContextManager.emitter.trigger('invalidate', 'CampaignSettingsGrid');\r\n break;\r\n case 'AdGroupCriterion':\r\n case 'NegativeAdGroupCriterion':\r\n summaryDataContextManager.emitter.trigger('invalidate', 'AdGroupSettingsGrid');\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n const batchActions = {\r\n Actions: [{\r\n '@odata.type': '#Model.TextAction',\r\n ActionType: 'Set',\r\n Property: 'Status',\r\n Value: 'Deleted',\r\n }]};\r\n\r\n bulkEditChange({\r\n projection: {\r\n IdString: crossPageSelectAll.isAllSelected ? null : _.map(gridView.selectedItems(), (obj) => {\r\n return {\r\n CampaignId: obj.Campaign ? obj.Campaign.Id : Number(pluginConfig.view.options.campaignId),\r\n AdGroupId: obj.LevelOfDetails === 'AdGroup' ? obj.AdGroup.Id : undefined,\r\n TargetGroupDetailId: obj.Id,\r\n };\r\n }),\r\n // eslint-disable-next-line no-nested-ternary\r\n filters: crossPageSelectAll.isAllSelected ? isForVNext ? filterService.getCombinedFilter() : filterState.getAllFilters() : undefined,\r\n },\r\n batchActions,\r\n entity: pluginConfig.entity,\r\n campaignId: Number(pluginConfig.view.options.campaignId),\r\n adgroupId: Number(pluginConfig.view.options.adgroupId),\r\n completeCB: (response) => {\r\n if (response.SuccessRowCount === response.TotalRowCount) {\r\n window.App.views.alertCenter.toastConfirmation(i18n.getString('BulkEdit_Delete_Success', {\r\n success: response.SuccessRowCount,\r\n total: response.TotalRowCount,\r\n }));\r\n } else {\r\n window.App.views.alertCenter.toastWarning(i18n.getString('BulkEdit_Delete_Partial_Success', {\r\n success: response.SuccessRowCount,\r\n total: response.TotalRowCount,\r\n }));\r\n }\r\n gridView.deselectAll();\r\n gridView.refresh(true);\r\n eventDispatcher.trigger('targeting-settings:bulkRemoved', gridView);\r\n },\r\n failedCB: () => {\r\n gridView.deselectAll();\r\n window.App.views.alertCenter.toastError(i18n.getString('BulkEdit_Delete_Failed'));\r\n },\r\n }).withUiBlock(pluginConfig.view.$el);\r\n }\r\n\r\n function updateToolbar() {\r\n if (isForVNext) {\r\n toolbarEditor.update({\r\n type: 'button',\r\n id: menuId,\r\n text: i18n.getString('Button_Delete'),\r\n iconLeftGlyphName: 'ba-Delete',\r\n classes: ['btn-link'],\r\n onClick: () => {\r\n deleteTargets();\r\n },\r\n });\r\n } else {\r\n toolbarEditor.update({\r\n type: 'button',\r\n id: menuId,\r\n text: i18n.getString('TargetingSettings_Remove'),\r\n classes: ['btn', 'btn-secondary'],\r\n onClick: () => {\r\n deleteTargets();\r\n },\r\n });\r\n }\r\n }\r\n\r\n updateToolbar();\r\n});\r\n","import Backbone from 'backbone';\r\nimport template from './common-alert-template.pug';\r\n\r\nexport default class View extends Backbone.View {\r\n initialize(options = {}) {\r\n this.options = options;\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click input.btn-default': '_ok',\r\n };\r\n }\r\n\r\n _ok() {\r\n this.trigger('ok');\r\n }\r\n\r\n render({\r\n i18n,\r\n messageDetails,\r\n learnMoreId = '',\r\n }) {\r\n this.$el.html(template({\r\n i18n,\r\n messageDetails,\r\n learnMoreId,\r\n }));\r\n\r\n return this;\r\n }\r\n}\r\n","import { decorate } from '@bingads-webui/dialog';\r\nimport commonAlert from './common-alert';\r\n\r\nconst CommonAlertDialog = decorate(commonAlert);\r\n\r\nexport function showAlert ({\r\n i18n,\r\n title = '',\r\n messageDetails,\r\n learnMoreId = '',\r\n}) {\r\n let alertView = new CommonAlertDialog({\r\n dialogOptions: {\r\n title,\r\n maxWidth: 658,\r\n },\r\n i18n,\r\n messageDetails,\r\n learnMoreId,\r\n }).render();\r\n\r\n alertView.center();\r\n\r\n alertView.bind('ok', () => {\r\n alertView.destroy();\r\n alertView = null;\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 (data, getIconClass, getMediaUrl) {pug_html = pug_html + \"\\u003Cdiv class=\\\"appListItem\\\"\\u003E\";\nif (!!data.MediaUrl) {\npug_html = pug_html + \"\\u003Cimg\" + (\" class=\\\"appListIcon\\\"\"+pug.attr(\"src\", getMediaUrl(data), true, true)) + \"\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"appListIcon\",getIconClass(data)], [false,true]), false, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"appListItem-text\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = data.AppPlatform) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cbr\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = data.DisplayText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"data\" in locals_for_with?locals_for_with.data:typeof data!==\"undefined\"?data:undefined,\"getIconClass\" in locals_for_with?locals_for_with.getIconClass:typeof getIconClass!==\"undefined\"?getIconClass:undefined,\"getMediaUrl\" in locals_for_with?locals_for_with.getMediaUrl:typeof getMediaUrl!==\"undefined\"?getMediaUrl:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, i18nKeys) {pug_mixins[\"selectedItemsContainer\"] = pug_interp = function(){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"campaign-adgroup-list\\\"\\u003E\\u003Cdiv data-bind=\\\"foreach: scopes().slice(0,selectedItemsLimit)\\\"\\u003E\\u003Cdiv class=\\\"selection-item truncated\\\"\\u003E\\u003Cspan data-bind=\\\"text: adGroupName.length>0 ? campaignName + " > " + adGroupName : campaignName, attr: {title: adGroupName.length>0 ? campaignName + " > " + adGroupName : campaignName}\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"remaining-items-text\\\" data-bind=\\\"visible: scopes().length>selectedItemsLimit, text: remainingItemsText()\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-horizontal\\\"\\u003E\\u003Cdiv class=\\\"bulkedit\\\"\\u003E\\u003Cdiv class=\\\"panel\\\"\\u003E\\u003Cdiv class=\\\"panel-heading\\\"\\u003E\\u003Ch3 class=\\\"panel-title\\\" data-bind=\\\"visible: !isEditMode()\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get(i18nKeys.title)) ? \"\" : pug_interp)) + \"\\u003C\\u002Fh3\\u003E\\u003Ch3 class=\\\"panel-title\\\" data-bind=\\\"visible: isEditMode()\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get(i18nKeys.editTitle)) ? \"\" : pug_interp)) + \"\\u003C\\u002Fh3\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"panel-body\\\"\\u003E\\u003Cdiv class=\\\"panel-subtitle-container\\\" data-bind=\\\"visible: !isEditMode()\\\"\\u003E\";\n// iterate i18nKeys.subtitle\n;(function(){\n var $$obj = i18nKeys.subtitle;\n if ('number' == typeof $$obj.length) {\n for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) {\n var subTitle = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Ch5\\u003E\" + (null == (pug_interp = i18n.get(subTitle)) ? \"\" : pug_interp) + \"\\u003C\\u002Fh5\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index0 in $$obj) {\n $$l++;\n var subTitle = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Ch5\\u003E\" + (null == (pug_interp = i18n.get(subTitle)) ? \"\" : pug_interp) + \"\\u003C\\u002Fh5\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv class=\\\"campaignAdgroupSelection col-sm-3\\\" data-bind=\\\"visible: isMultiSelect && showSelection && scopes().length>0 && showEditor()\\\"\\u003E\";\npug_mixins[\"selectedItemsContainer\"]();\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"associations\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"i18nKeys\" in locals_for_with?locals_for_with.i18nKeys:typeof i18nKeys!==\"undefined\"?i18nKeys:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (OptionalDisplayTextForSingleImageAdExtensions, _TL_, i18n, i18nGlobal, isRecommendation, newI18n, readOnly) {\n\n\n\n\n\n\n\n\n\n\n\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-horizontal img-editor image-ad-extension-v2-edit\\\"\\u003E\\u003Cdiv class=\\\"imgEditor-form form-horizontal\\\"\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Clabel class=\\\"col-sm-4 control-label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('AdExtensions_Image_Dialog_Field_AltText_NEW')) ? \"\" : pug_interp)) + \"\\u003Ca class=\\\"helpbutton\\\" topic=\\\"pop_BA_ImageExtension_Name\\\" type=\\\"helppopup\\\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Flabel\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cinput\" + (\" class=\\\"form-control text\\\"\"+pug.attr(\"placeholder\", i18n.getString('AdExtensions_Image_Editor_NameMax'), true, true)+\" type=\\\"text\\\" maxlength=\\\"35\\\" required=\\\"required\\\" data-bind=\\\"textInput: displayText, css: { error: !displayTextIsValid() }\\\"\"+pug.attr(\"aria-label\", i18n.getString('AdExtensions_Image_Dialog_Field_AltText_NEW'), true, true)+\" aria-describedby=\\\"ImgExtension_DisplayText_Error\\\"\") + \"\\u003E\\u003Cdiv\" + (\" class=\\\"error\\\"\"+\" id=\\\"ImgExtension_DisplayText_Error\\\"\"+pug.attr(\"data-bind\", 'text: !displayTextIsValid() ? \"' + (OptionalDisplayTextForSingleImageAdExtensions ? i18n.getString('AdExtensions_Image_Editor_InvalidNonoptionalDisplayText') : i18n.getString('AdExtensions_Image_Editor_InvalidAltText_PS4N')) + '\" : \"\"', true, true)+\" role=\\\"alert\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Clabel class=\\\"col-sm-4 control-label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('AdExtensions_Image_Dialog_Field_Image_AltText')) ? \"\" : pug_interp)) + \"\\u003Ca class=\\\"helpbutton\\\" topic=\\\"pop_BA_ImageExtension_AltText\\\" type=\\\"helppopup\\\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Flabel\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"span alt-text-description\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('AdExtensions_Image_Editor_ImageAltTextDescription')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cinput\" + (\" class=\\\"form-control text\\\"\"+pug.attr(\"placeholder\", i18n.getString('AdExtensions_Image_Editor_ImageAltTextMax'), true, true)+\" type=\\\"text\\\" maxlength=\\\"90\\\" required=\\\"false\\\" data-bind=\\\"textInput: altText, css: { error: !altTextIsValid() }\\\"\"+pug.attr(\"aria-label\", i18n.getString('AdExtensions_Image_Dialog_Field_Image_AltText'), true, true)+\" aria-describedby=\\\"ImgExtension_AltText_Error\\\"\") + \"\\u003E\\u003Cdiv\" + (\" class=\\\"error\\\"\"+\" id=\\\"ImgExtension_AltText_Error\\\"\"+pug.attr(\"data-bind\", 'text: !altTextIsValid() ? \"' + i18n.getString('AdExtensions_Image_Editor_Invalid_ImageAltText') + '\" : \"\"', true, true)+\" role=\\\"alert\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"extension-editor__extra\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (!isRecommendation) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Clabel class=\\\"col-sm-4 control-label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('AdExtensions_Image_Eligibility_Label')) ? \"\" : pug_interp)) + \"\\u003Ca class=\\\"helpbutton\\\" topic=\\\"pop_BA_ImageExtension_Eligibility\\\" type=\\\"helppopup\\\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Flabel\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"checkbox single-eligible\\\"\\u003E\\u003Cinput class=\\\"single-eligible-checkbox\\\" type=\\\"checkbox\\\" data-bind=\\\"checked: isSingleEligible\\\" role=\\\"checkbox\\\"\\u003E\\u003Cdiv class=\\\"text\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('AdExtensions_Image_Eligibility_Single_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"checkbox multi-eligible\\\"\\u003E\\u003Cinput class=\\\"multi-eligible-checkbox\\\" type=\\\"checkbox\\\" data-bind=\\\"checked: isMultiEligible\\\" role=\\\"checkbox\\\"\\u003E\\u003Cdiv class=\\\"text\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('AdExtensions_Image_Eligibility_Multi_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (\" class=\\\"error\\\"\"+\" id=\\\"ImgExtension_Eligibility_Error\\\"\"+pug.attr(\"data-bind\", 'text: !isEligibilityValid() ? \"' + i18n.getString('AdExtensions_Image_Editor_InvalidEligibility') + '\" : \"\"', true, true)+\" role=\\\"alert\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"scheduling\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"image-extension-image-experience\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"alert alert-info\\\"\\u003E\\u003Cdiv class=\\\"alert-image\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cspan class=\\\"alert-info-inline\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('AdExtensions_Created_Latency')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"visible: errorMessages() && errorMessages().length > 0\\\"\\u003E\\u003Cul data-bind=\\\"foreach:errorMessages\\\" role=\\\"alert\\\"\\u003E\\u003Cli\\u003E\\u003Cspan data-bind=\\\"html: $data\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"save-bar imgeditor-save-container\\\"\\u003E\";\nif (isRecommendation) {\npug_html = pug_html + \"\\u003Cbutton\" + (\" class=\\\"btn btn-primary\\\"\"+\" type=\\\"button\\\" data-bind=\\\"click: apply\\\"\"+pug.attr(\"disabled\", readOnly, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = newI18n.getString(_TL_('Apply'))) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cbutton class=\\\"btn btn-primary\\\" type=\\\"button\\\" data-bind=\\\"click: save\\\" aria-describedby=\\\"ImgExtension_AltText_Error ImgExtension_DestUrl_Error\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18nGlobal.getString('Button_Save')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\";\n}\npug_html = pug_html + \"\\u003Cbutton class=\\\"btn btn-default\\\" type=\\\"button\\\" data-bind=\\\"click: cancel\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18nGlobal.getString('Button_Cancel')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"OptionalDisplayTextForSingleImageAdExtensions\" in locals_for_with?locals_for_with.OptionalDisplayTextForSingleImageAdExtensions:typeof OptionalDisplayTextForSingleImageAdExtensions!==\"undefined\"?OptionalDisplayTextForSingleImageAdExtensions:undefined,\"_TL_\" in locals_for_with?locals_for_with._TL_:typeof _TL_!==\"undefined\"?_TL_:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"i18nGlobal\" in locals_for_with?locals_for_with.i18nGlobal:typeof i18nGlobal!==\"undefined\"?i18nGlobal:undefined,\"isRecommendation\" in locals_for_with?locals_for_with.isRecommendation:typeof isRecommendation!==\"undefined\"?isRecommendation:undefined,\"newI18n\" in locals_for_with?locals_for_with.newI18n:typeof newI18n!==\"undefined\"?newI18n:undefined,\"readOnly\" in locals_for_with?locals_for_with.readOnly:typeof readOnly!==\"undefined\"?readOnly:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (OptionalDisplayTextForSingleImageAdExtensions, i18n, i18nGlobal, readOnly, systemGenerated) {\n\n\n\n\n\n\n\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-horizontal imgEditor-container-edit-ps4n image-ad-extension-v2-edit\\\"\\u003E\";\nif (systemGenerated) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"alert alert-info alert-center-align form-group\\\"\\u003E\\u003Cdiv class=\\\"alert-image\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('AdExtensions_NotEditable_SystemGenerated')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"imgEditor-form form-horizontal\\\"\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Clabel class=\\\"col-sm-4 control-label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('AdExtensions_Image_Dialog_Field_AltText_NEW')) ? \"\" : pug_interp)) + \"\\u003Ca class=\\\"helpbutton\\\" topic=\\\"pop_BA_ImageExtension_Name\\\" type=\\\"helppopup\\\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Flabel\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cinput\" + (\" class=\\\"form-control text\\\"\"+pug.attr(\"placeholder\", i18n.getString('AdExtensions_Image_Editor_NameMax'), true, true)+\" type=\\\"text\\\" maxlength=\\\"35\\\" required=\\\"required\\\" data-bind=\\\"textInput: displayText, css: { error: !displayTextIsValid() }\\\"\"+pug.attr(\"aria-label\", i18n.getString('AdExtensions_Image_Dialog_Field_AltText_NEW'), true, true)+\" aria-describedby=\\\"ImgExtension_DisplayText_Error\\\"\"+pug.attr(\"disabled\", readOnly, true, true)) + \"\\u003E\\u003Cdiv class=\\\"error\\\" id=\\\"ImgExtension_DisplayText_Error\\\" data-bind=\\\"visible: !displayTextIsValid()\\\"\\u003E\" + (pug.escape(null == (pug_interp = OptionalDisplayTextForSingleImageAdExtensions ? i18n.getString('AdExtensions_Image_Editor_InvalidNonoptionalDisplayText') : i18n.getString('AdExtensions_Image_Editor_InvalidAltText_PS4N')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Clabel class=\\\"col-sm-4 control-label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('AdExtensions_Image_Dialog_Field_Image_AltText')) ? \"\" : pug_interp)) + \"\\u003Ca class=\\\"helpbutton\\\" topic=\\\"pop_BA_ImageExtension_AltText\\\" type=\\\"helppopup\\\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Flabel\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"span alt-text-description\\\"\\u003E\" + (pug.escape(null == (pug_interp = systemGenerated ? i18n.getString('AdExtensions_Image_Editor_ImageAltTextDescriptionForSystemGenerated') : i18n.getString('AdExtensions_Image_Editor_ImageAltTextDescription')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cinput\" + (\" class=\\\"form-control text\\\"\"+pug.attr(\"placeholder\", i18n.getString('AdExtensions_Image_Editor_ImageAltTextMax'), true, true)+\" type=\\\"text\\\" maxlength=\\\"90\\\" required=\\\"false\\\" data-bind=\\\"textInput: altText, css: { error: !altTextIsValid() }\\\"\"+pug.attr(\"aria-label\", i18n.getString('AdExtensions_Image_Dialog_Field_Image_AltText'), true, true)+\" aria-describedby=\\\"ImgExtension_AltText_Error\\\"\"+pug.attr(\"disabled\", readOnly, true, true)) + \"\\u003E\\u003Cdiv\" + (\" class=\\\"error\\\"\"+\" id=\\\"ImgExtension_AltText_Error\\\"\"+pug.attr(\"data-bind\", 'text: !altTextIsValid() ? \"' + i18n.getString('AdExtensions_Image_Editor_Invalid_ImageAltText') + '\" : \"\"', true, true)+\" role=\\\"alert\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\" data-bind=\\\"visible: description() && description().length > 0\\\"\\u003E\\u003Clabel class=\\\"control-label col-sm-4\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('AdExtensions_Image_Dialog_Field_Description')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cinput\" + (\" class=\\\"form-control text\\\"\"+pug.attr(\"placeholder\", i18n.getString('AdExtensions_Image_Editor_DescriptionMax'), true, true)+\" type=\\\"text\\\" maxlength=\\\"100\\\" data-bind=\\\"value: description, valueUpdate: "input"\\\"\"+pug.attr(\"aria-label\", i18n.getString('AdExtensions_Image_Dialog_Field_Description'), true, true)+pug.attr(\"disabled\", true, true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"extension-editor__extra\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Clabel class=\\\"col-sm-4 control-label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('AdExtensions_Image_Eligibility_Label')) ? \"\" : pug_interp)) + \"\\u003Ca class=\\\"helpbutton\\\" topic=\\\"pop_BA_ImageExtension_Eligibility\\\" type=\\\"helppopup\\\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Flabel\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"checkbox single-eligible\\\"\\u003E\\u003Cinput\" + (\" class=\\\"single-eligible-checkbox\\\"\"+\" type=\\\"checkbox\\\" data-bind=\\\"checked: isSingleEligible\\\" role=\\\"checkbox\\\"\"+pug.attr(\"disabled\", readOnly, true, true)) + \"\\u003E\\u003Cdiv class=\\\"text\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('AdExtensions_Image_Eligibility_Single_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"checkbox multi-eligible\\\"\\u003E\\u003Cinput\" + (\" class=\\\"multi-eligible-checkbox\\\"\"+\" type=\\\"checkbox\\\" data-bind=\\\"checked: isMultiEligible\\\" role=\\\"checkbox\\\"\"+pug.attr(\"disabled\", readOnly, true, true)) + \"\\u003E\\u003Cdiv class=\\\"text\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('AdExtensions_Image_Eligibility_Multi_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (\" class=\\\"error\\\"\"+\" id=\\\"ImgExtension_Eligibility_Error\\\"\"+pug.attr(\"data-bind\", 'text: !isEligibilityValid() ? \"' + i18n.getString('AdExtensions_Image_Editor_InvalidEligibility') + '\" : \"\"', true, true)+\" role=\\\"alert\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"scheduling\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"image-extension-image-experience\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"alert alert-info form-group\\\"\\u003E\\u003Cdiv class=\\\"alert-image\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cspan class=\\\"alert-info-inline\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('AdExtensions_Edited_Latency')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"visible: errorMessages() && errorMessages().length > 0\\\"\\u003E\\u003Cul data-bind=\\\"foreach:errorMessages\\\" role=\\\"alert\\\"\\u003E\\u003Cli\\u003E\\u003Cspan data-bind=\\\"html: $data\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"save-bar form-group imgeditor-save-container\\\"\\u003E\\u003Cbutton\" + (\" class=\\\"btn btn-primary\\\"\"+\" type=\\\"button\\\" data-bind=\\\"click: save\\\"\"+pug.attr(\"disabled\", readOnly, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = i18nGlobal.getString('Button_Save')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\\u003Cbutton class=\\\"btn btn-default\\\" type=\\\"button\\\" data-bind=\\\"click: cancel\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18nGlobal.getString('Button_Cancel')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"OptionalDisplayTextForSingleImageAdExtensions\" in locals_for_with?locals_for_with.OptionalDisplayTextForSingleImageAdExtensions:typeof OptionalDisplayTextForSingleImageAdExtensions!==\"undefined\"?OptionalDisplayTextForSingleImageAdExtensions:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"i18nGlobal\" in locals_for_with?locals_for_with.i18nGlobal:typeof i18nGlobal!==\"undefined\"?i18nGlobal:undefined,\"readOnly\" in locals_for_with?locals_for_with.readOnly:typeof readOnly!==\"undefined\"?readOnly:undefined,\"systemGenerated\" in locals_for_with?locals_for_with.systemGenerated:typeof systemGenerated!==\"undefined\"?systemGenerated:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (convertCurrencyCode, data) {pug_html = pug_html + \"\\u003Cdiv class=\\\"itemTemplate-text\\\"\\u003E\\u003Cul\\u003E\";\n// iterate data.TableRows\n;(function(){\n var $$obj = data.TableRows;\n if ('number' == typeof $$obj.length) {\n for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) {\n var tableRow = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cli class=\\\"price-adextension-item\\\" style=\\\"text-overflow: ellipsis;overflow: hidden;\\\"\\u003E\\u003Ca\" + (\" class=\\\"price-adextension-header\\\"\"+pug.attr(\"href\", tableRow.FinalUrls[0], true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = tableRow.Header) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = ' - ') ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"price-adextension-description\\\"\\u003E\" + (pug.escape(null == (pug_interp = tableRow.Description + ' ') ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"price-adextension-price-info\\\"\\u003E\" + (pug.escape(null == (pug_interp = convertCurrencyCode(tableRow.CurrencyCode) + tableRow.Price) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fli\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index0 in $$obj) {\n $$l++;\n var tableRow = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cli class=\\\"price-adextension-item\\\" style=\\\"text-overflow: ellipsis;overflow: hidden;\\\"\\u003E\\u003Ca\" + (\" class=\\\"price-adextension-header\\\"\"+pug.attr(\"href\", tableRow.FinalUrls[0], true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = tableRow.Header) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = ' - ') ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"price-adextension-description\\\"\\u003E\" + (pug.escape(null == (pug_interp = tableRow.Description + ' ') ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"price-adextension-price-info\\\"\\u003E\" + (pug.escape(null == (pug_interp = convertCurrencyCode(tableRow.CurrencyCode) + tableRow.Price) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fli\\u003E\";\n }\n }\n}).call(this);\n\nif (data.moreString) {\npug_html = pug_html + \"\\u003Cli class=\\\"price-adextension-more-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = data.moreString) ? \"\" : pug_interp)) + \"\\u003C\\u002Fli\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Ful\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"convertCurrencyCode\" in locals_for_with?locals_for_with.convertCurrencyCode:typeof convertCurrencyCode!==\"undefined\"?convertCurrencyCode:undefined,\"data\" in locals_for_with?locals_for_with.data:typeof data!==\"undefined\"?data:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (value) {pug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = value.$total.text) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";}.call(this,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, isShowDisclaimerBannerEnabled) {pug_mixins[\"koErrors\"] = pug_interp = function(id, cssClass){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cul\" + (pug.attr(\"class\", pug.classes([cssClass ? cssClass : 'alert alert-danger'], [true]), false, true)+\" data-bind=\\\"visible: errors().length > 0, foreach: errors, attr: {"aria-hidden": errors().length == 0}\\\"\"+pug.attr(\"id\", id ? id : 'KoErrors', true, true)) + \"\\u003E\\u003Cli\\u003E\\u003Cdiv data-bind=\\\"html: $data\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\";\n};\npug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_mixins[\"koValidationError\"] = pug_interp = function(item, id){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cul\" + (pug.attr(\"data-bind\", 'visible: !' + item + '.isValid(), foreach: ' + item + '.errors, attr: {\"aria-hidden\": ' + item + '.isValid()}', true, true)+pug.attr(\"id\", id ? id : item + 'ValidationError', true, true)+\" role=\\\"alert\\\"\") + \"\\u003E\\u003Cli role=\\\"presentation\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: $data\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\";\n};\npug_mixins[\"koCharactersRemaining\"] = pug_interp = function(item, id){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"remaining-hint help-block\\\"\\u003E\\u003Cspan\" + (pug.attr(\"data-bind\", 'text:' + item + '.char_rem', true, true)+pug.attr(\"id\", id ? id : item + '_CharactersRemaining', true, true)+\" role=\\\"status\\\" aria-live=\\\"polite\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"koErrors\"]();\npug_html = pug_html + \"\\u003Cdiv class=\\\"adgroup-settings-page\\\"\\u003E\\u003Cdiv class=\\\"adgroup-settings-container\\\" data-bind=\\\"visible: dataLoaded\\\"\\u003E\\u003C!--ko ifnot: isNewUI()--\\u003E\\u003Ch3 class=\\\"type-bold\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('AdGroupSetting_SectionTitle')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fh3\\u003E\\u003Chr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003Cdiv class=\\\"adgroup-settings form-horizontal\\\"\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Ch5 class=\\\"adgroup-settings__name-label col-sm-2 control-label\\\"\\u003E\\u003Clabel id=\\\"AdGroupSettings_AdGroup_Name_Label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('AdGroup_Label_Name')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_CampaignCreate_Keywords_AdGroupName', i18n.get('AdGroup_Label_Name'), i18n);\npug_html = pug_html + \"\\u003C\\u002Fh5\\u003E\\u003Cdiv class=\\\"col-sm-4\\\"\\u003E\\u003Cinput class=\\\"name form-control\\\" data-bind=\\\"value: Name, valueUpdate: "input", css: {"validation-error": !Name.isValid()}\\\" type=\\\"text\\\" aria-labelledby=\\\"AdGroupSettings_AdGroup_Name_Label\\\" aria-describedby=\\\"Name_CharactersRemaining\\\"\\u003E\";\npug_mixins[\"koCharactersRemaining\"]('Name');\npug_html = pug_html + \"\\u003Cdiv class=\\\"clear\\\"\\u003E\";\npug_mixins[\"koValidationError\"]('Name');\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!--ko if: shouldShowAdGroupType--\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Ch5 class=\\\"adgroup-settings__adgroup-type-label col-sm-2 control-label\\\"\\u003E\\u003Clabel\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('AdGroupType_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_DSA_AdGroupType', i18n.get('AdGroupType_Label'), i18n);\npug_html = pug_html + \"\\u003C\\u002Fh5\\u003E\\u003Cdiv class=\\\"col-sm-4 adgroup-type\\\" data-bind=\\\"text: adGroupTypeString\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C!--ko if: enableLanguageSelection()--\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Ch5 class=\\\"adgroup-settings__language-selector-label col-sm-2 control-label\\\"\\u003E\\u003Clabel\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Campaign_Language')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_Settings_Language', i18n.get('LanguageLabelText'), i18n);\npug_html = pug_html + \"\\u003C\\u002Fh5\\u003E\\u003Cdiv class=\\\"col-sm-4 adgroup-language\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C!--ko if: !hideLanguage() && !enableLanguageSelection()--\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Ch5 class=\\\"adgroup-settings__language-label col-sm-2 control-label\\\"\\u003E\\u003Clabel\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Campaign_Language')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_AdGroup_Settings_Language', i18n.get('LanguageLabelText'), i18n);\npug_html = pug_html + \"\\u003C\\u002Fh5\\u003E\\u003Cdiv class=\\\"col-sm-4\\\"\\u003E\\u003Cdiv class=\\\"adgroup-settings__language form-control-static\\\" data-bind=\\\"text: languageString\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!--\\u002Fko--\\u003E\\u003Cdiv class=\\\"bidding-strategy__container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"cpg-adgroup-type__container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!--ko if: supportCashbackSettings--\\u003E\\u003Cdiv class=\\\"cashback-settings-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003Cdiv class=\\\"advanced-settings-section\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"bid-block\\\"\\u003E\\u003Ch3 class=\\\"type-bold\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('SectionTitle_SetBids')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fh3\\u003E\\u003Chr\\u003E\\u003Cdiv class=\\\"bid-section\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"cpg-bid-section__container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Ch3 class=\\\"adgroup-targets__label type-bold\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('SectionTitle_AdgroupTargets')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fh3\\u003E\\u003Chr\\u003E\\u003Cdiv class=\\\"adgroup-targets clearfix\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (isShowDisclaimerBannerEnabled) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"alert alert-info form-group page-alert\\\"\\u003E\\u003Cdiv class=\\\"alert-image\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"alert-info-inline\\\"\\u003E\" + (null == (pug_interp = i18n.get('Targeting_Disclaimer')) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C!--ko if: showHighLatencyAlert()--\\u003E\\u003Cdiv class=\\\"alert alert-info form-group page-alert\\\"\\u003E\\u003Cdiv class=\\\"alert-image\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"alert-info-inline\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('TargetingSettings_OnSave_HighLantency_Text')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!--\\u002Fko--\\u003E\\u003Cdiv class=\\\"alert alert-info form-group page-alert\\\"\\u003E\\u003Cdiv class=\\\"alert-image\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"alert-info-inline\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('AdGroups_Latency')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"save-bar form-group\\\"\\u003E\\u003C!--ko ifnot: isNewUI()--\\u003E\\u003Cinput\" + (\" class=\\\"btn-save btn btn-primary\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", i18n.get('Button_Save'), true, true)) + \"\\u003E\\u003Cinput\" + (\" class=\\\"btn-cancel btn btn-default\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", i18n.get('Button_Cancel'), true, true)) + \"\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C!--ko if: isNewUI()--\\u003E\\u003Cbutton\" + (\" class=\\\"btn-save btn btn-primary\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", i18n.get('Button_Save'), true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Button_Save')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\\u003Cbutton\" + (\" class=\\\"btn-cancel btn btn-default\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", i18n.get('Button_Cancel'), true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Button_Cancel')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"isShowDisclaimerBannerEnabled\" in locals_for_with?locals_for_with.isShowDisclaimerBannerEnabled:typeof isShowDisclaimerBannerEnabled!==\"undefined\"?isShowDisclaimerBannerEnabled:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (column, containerType, label, name, popupId) {pug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"grid-header-\" + containerType], [true]), false, true)) + \"\\u003E\";\nif (column.$orderby) {\nif (column.$orderby.dir > 0) {\npug_html = pug_html + \"\\u003Cspan class=\\\"grid-asc\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan class=\\\"grid-des\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\n}\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"grid-header-text\\\"\"+\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", label, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = name) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\nif (popupId) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"grid-subheader-text\\\"\\u003E\";\npug_mixins[\"popupHelp\"](popupId);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"column\" in locals_for_with?locals_for_with.column:typeof column!==\"undefined\"?column:undefined,\"containerType\" in locals_for_with?locals_for_with.containerType:typeof containerType!==\"undefined\"?containerType:undefined,\"label\" in locals_for_with?locals_for_with.label:typeof label!==\"undefined\"?label:undefined,\"name\" in locals_for_with?locals_for_with.name:typeof name!==\"undefined\"?name:undefined,\"popupId\" in locals_for_with?locals_for_with.popupId:typeof popupId!==\"undefined\"?popupId:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (Status, i18n, noHover) {var statusIconLabel\nif (i18n) {\nswitch (Status){\ncase 'Deleted':\nstatusIconLabel = i18n.getString('EntityStatus_Deleted')\n break;\ncase 'Paused':\nstatusIconLabel = i18n.getString('EntityStatus_Paused')\n break;\ndefault:\nstatusIconLabel = i18n.getString('EntityStatus_Active')\n break;\n}\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"grid-cell\\\"\\u003E\";\nif (!Status) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"statusHeader_icon clickable\\\" tabindex=\\\"0\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse\nif (Status === 'Deleted') {\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"statusicondisplay\\\"\"+pug.attr(\"aria-label\", statusIconLabel, true, true)) + \"\\u003E\\u003Cdiv class=\\\"statusDeleted_icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse\nif (noHover) {\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"statusicondisplay\\\"\"+pug.attr(\"aria-label\", statusIconLabel, true, true)) + \"\\u003E\";\nif (Status === 'Paused') {\npug_html = pug_html + \"\\u003Cdiv class=\\\"statusPaused_icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"statusEnabled_icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"statuschangehover statusicondisplay clickable\\\"\"+\" tabindex=\\\"0\\\" role=\\\"button\\\"\"+pug.attr(\"aria-label\", statusIconLabel, true, true)) + \"\\u003E\";\nif (Status === 'Paused') {\npug_html = pug_html + \"\\u003Cdiv class=\\\"statusPaused_icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"statusEnabled_icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"Status\" in locals_for_with?locals_for_with.Status:typeof Status!==\"undefined\"?Status:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"noHover\" in locals_for_with?locals_for_with.noHover:typeof noHover!==\"undefined\"?noHover:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (DeliveryTemplates, isForVNext) {if (isForVNext) {\nvar statusTypeClass = DeliveryTemplates.status === 'error' ? 'status-error' : (DeliveryTemplates.status === 'warning' ? 'status-warning' : 'status-info')\nvar needsPopup = DeliveryTemplates.hasGlyph || DeliveryTemplates.status === 'error' || DeliveryTemplates.status === 'warning'\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"delivery-info\",`${needsPopup ? 'trigger-popup' : ''}`], [false,true]), false, true)) + \"\\u003E\";\nif ((DeliveryTemplates.status === 'error')) {\npug_html = pug_html + \"\\u003Cspan\" + (\" class=\\\"status-icon iconba iconba-ErrorBadge\\\"\"+pug.attr(\"title\", DeliveryTemplates.i18n.getString('DeliveryStatusIcon_Tooltip_Error'), true, true)+pug.attr(\"aria-label\", DeliveryTemplates.i18n.getString('DeliveryStatusIcon_Tooltip_Error'), true, true)+\" tabindex=\\\"0\\\" role=\\\"button\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\nelse\nif ((DeliveryTemplates.status === 'warning')) {\npug_html = pug_html + \"\\u003Cspan\" + (\" class=\\\"status-icon iconba iconba-Warning\\\"\"+pug.attr(\"title\", DeliveryTemplates.i18n.getString('DeliveryStatusIcon_Tooltip_Warning'), true, true)+pug.attr(\"aria-label\", DeliveryTemplates.i18n.getString('DeliveryStatusIcon_Tooltip_Warning'), true, true)+\" tabindex=\\\"0\\\" role=\\\"button\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\nif (DeliveryTemplates.hasGlyph) {\npug_html = pug_html + \"\\u003Cspan\" + (pug.attr(\"class\", pug.classes([\"status-column\",\"clickable\",statusTypeClass], [false,false,true]), false, true)+\" tabindex=\\\"0\\\" role=\\\"button\\\"\") + \"\\u003E\" + (pug.escape(null == (pug_interp = DeliveryTemplates.i18n.getString(DeliveryTemplates.deliveryStatus)) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan\" + (pug.attr(\"class\", pug.classes([\"status-column\",statusTypeClass], [false,true]), false, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = DeliveryTemplates.i18n.getString(DeliveryTemplates.deliveryStatus)) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"layout-marked-element status-row\\\"\\u003E\\u003Cdiv class=\\\"mark-container\\\"\\u003E\";\nif ((DeliveryTemplates.status === 'error')) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"status-icon\\\"\\u003E\\u003Cdiv\" + (\" class=\\\"status_error spritedimagealign\\\"\"+pug.attr(\"title\", DeliveryTemplates.i18n.getString('DeliveryStatusIcon_Tooltip_Error'), true, true)+pug.attr(\"aria-label\", DeliveryTemplates.i18n.getString('DeliveryStatusIcon_Tooltip_Error'), true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse\nif ((DeliveryTemplates.status === 'warning')) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"status-icon\\\"\\u003E\\u003Cdiv\" + (\" class=\\\"status_warning spritedimagealign\\\"\"+pug.attr(\"title\", DeliveryTemplates.i18n.getString('DeliveryStatusIcon_Tooltip_Warning'), true, true)+pug.attr(\"aria-label\", DeliveryTemplates.i18n.getString('DeliveryStatusIcon_Tooltip_Warning'), true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"decorated-element\\\"\\u003E\\u003Cdiv class=\\\"status-column\\\"\\u003E\" + (pug.escape(null == (pug_interp = DeliveryTemplates.i18n.getString(DeliveryTemplates.deliveryStatus)) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\nif ((DeliveryTemplates.hasGlyph)) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"glyph-container\\\"\\u003E\\u003Cdiv class=\\\"status-image\\\"\\u003E\\u003Cdiv class=\\\"status_icon gridDetailsImage spritedimagealign clickable\\\" tabindex=\\\"0\\\" role=\\\"button\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n}}.call(this,\"DeliveryTemplates\" in locals_for_with?locals_for_with.DeliveryTemplates:typeof DeliveryTemplates!==\"undefined\"?DeliveryTemplates:undefined,\"isForVNext\" in locals_for_with?locals_for_with.isForVNext:typeof isForVNext!==\"undefined\"?isForVNext:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, isMMAForRetailEnabled, isNotAudienceCampaign, isShowDisclaimerBannerEnabled, title) {pug_mixins[\"koErrors\"] = pug_interp = function(id, cssClass){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cul\" + (pug.attr(\"class\", pug.classes([cssClass ? cssClass : 'alert alert-danger'], [true]), false, true)+\" data-bind=\\\"visible: errors().length > 0, foreach: errors, attr: {"aria-hidden": errors().length == 0}\\\"\"+pug.attr(\"id\", id ? id : 'KoErrors', true, true)) + \"\\u003E\\u003Cli\\u003E\\u003Cdiv data-bind=\\\"html: $data\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\";\n};\npug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_mixins[\"koErrors\"]();\npug_html = pug_html + \"\\u003Cdiv class=\\\"campaign-settings-page\\\"\\u003E\\u003Cdiv class=\\\"setting-container\\\" data-bind=\\\"visible: dataLoaded\\\"\\u003E\\u003C!--ko ifnot: isNewUI()--\\u003E\\u003Ch3 class=\\\"type-bold\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = title) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fh3\\u003E\\u003Chr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003Cdiv class=\\\"campaign-update\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"budget-settings\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (isNotAudienceCampaign) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"advanced-settings-section\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (isMMAForRetailEnabled) {\npug_html = pug_html + \"\\u003Ch3 class=\\\"type-bold\\\" data-bind=\\\"visible: hasStore\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('ShoppingCampaign_ShoppingSetting_SectionTitle')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_MMA_Enable', i18n.get('ShoppingCampaign_ShoppingSetting_SectionTitle'), i18n);\npug_html = pug_html + \"\\u003C\\u002Fh3\\u003E\\u003Chr data-bind=\\\"visible: hasStore\\\"\\u003E\\u003Cdiv class=\\\"shopping-settings\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Ch3 class=\\\"type-bold\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('SectionTitle_CampaignTargets')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fh3\\u003E\\u003Chr\\u003E\\u003Cdiv class=\\\"campaign-targets clearfix\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003C!--ko ifnot: isNewUI()--\\u003E\\u003Ch3 class=\\\"type-bold\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('SectionTitle_AdvancedSettings')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fh3\\u003E\\u003Chr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003Cdiv class=\\\"advanced-settings-section\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"conversion-goal-section\\\"\\u003E\\u003Ch3 class=\\\"type-bold\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Campaign_Goals_Section_Title')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fh3\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Campaign_Goals_Help_Text')) ? \"\" : pug_interp)) + (pug.escape(null == (pug_interp = ' ') ? \"\" : pug_interp)) + \"\\u003Ca class=\\\"HelpTopic\\\" href=\\\"javascript:void(0);\\\" query=\\\"help:app54814\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('LearnMoreLinkText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003Cdiv class=\\\"conversion-goal-selection\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!--ko if: showGoalRemoveAlert()--\\u003E\\u003Cdiv class=\\\"alert alert-warning form-group page-alert\\\"\\u003E\\u003Cdiv class=\\\"alert-image\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"alert-info-inline\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Campaign_Conversion_Goal_Remove_Warning')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E \\u003Ca target=\\\"_blank\\\" href=\\\"https:\\u002F\\u002Fhelp.ads.microsoft.com\\u002F#apex\\u002Fads\\u002Fen\\u002F60138\\u002F2\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('LearnMoreLinkText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!--\\u002Fko--\\u003E\";\nif (isShowDisclaimerBannerEnabled && isNotAudienceCampaign) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"alert alert-info form-group page-alert\\\"\\u003E\\u003Cdiv class=\\\"alert-image\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"alert-info-inline\\\"\\u003E\" + (null == (pug_interp = i18n.get('Targeting_Disclaimer')) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C!--ko if: showHighLatencyAlert()--\\u003E\\u003Cdiv class=\\\"alert alert-info form-group page-alert\\\"\\u003E\\u003Cdiv class=\\\"alert-image\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"alert-info-inline\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('TargetingSettings_OnSave_HighLantency_Text')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!--\\u002Fko--\\u003E\\u003Cdiv class=\\\"alert alert-info form-group page-alert\\\"\\u003E\\u003Cdiv class=\\\"alert-image\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"alert-info-inline\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Campaigns_Latency')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cbutton class=\\\"btn btn-primary btn-save\\\" type=\\\"button\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Button_Save')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\\u003Cbutton class=\\\"btn btn-default btn-cancel\\\" type=\\\"button\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Button_Cancel')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"isMMAForRetailEnabled\" in locals_for_with?locals_for_with.isMMAForRetailEnabled:typeof isMMAForRetailEnabled!==\"undefined\"?isMMAForRetailEnabled:undefined,\"isNotAudienceCampaign\" in locals_for_with?locals_for_with.isNotAudienceCampaign:typeof isNotAudienceCampaign!==\"undefined\"?isNotAudienceCampaign:undefined,\"isShowDisclaimerBannerEnabled\" in locals_for_with?locals_for_with.isShowDisclaimerBannerEnabled:typeof isShowDisclaimerBannerEnabled!==\"undefined\"?isShowDisclaimerBannerEnabled:undefined,\"title\" in locals_for_with?locals_for_with.title:typeof title!==\"undefined\"?title:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n) {pug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_html = pug_html + (\"\\u003Cdiv class=\\\"campaign-targeting\\\"\\u003E\\u003Cdiv class=\\\"location-targets-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"adschedule-targets-container\\\"\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Clabel class=\\\"control-label col-sm-2\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('ColumnName_AdSchedule')) ? \"\" : pug_interp)));\npug_mixins[\"popupHelp\"]('pop_BA_Targeting_DayTime', i18n.getString('ColumnName_AdSchedule'), i18n);\npug_html = pug_html + \"\\u003C\\u002Flabel\\u003E\\u003Cdiv class=\\\"col-sm-10\\\"\\u003E\\u003Cdiv class=\\\"ad-schedule\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (model, view) {pug_html = pug_html + \"\\u003Ch3\\u003E\\u003Cstrong\\u003E\" + (pug.escape(null == (pug_interp = model.title) ? \"\" : pug_interp)) + \"\\u003C\\u002Fstrong\\u003E\\u003C\\u002Fh3\\u003E\\u003Cdiv class=\\\"popover-body\\\"\\u003E\";\nif (model.subtitle) {\npug_html = pug_html + \"\\u003Cp\\u003E\" + (pug.escape(null == (pug_interp = model.subtitle) ? \"\" : pug_interp)) + \"\\u003Ca\" + (\" class=\\\"HelpTopic\\\"\"+\" query=\\\"app54544\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", view.i18n.getString('LearnMore'), true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = view.i18n.getString('LearnMore')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fp\\u003E\";\n}\npug_html = pug_html + \"\\u003Cul class=\\\"account-list text-nowrap\\\"\\u003E\";\nif (model.value.Accounts) {\n// iterate model.value.Accounts\n;(function(){\n var $$obj = model.value.Accounts;\n if ('number' == typeof $$obj.length) {\n for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) {\n var account = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cli\\u003E\" + (pug.escape(null == (pug_interp = account.Name) ? \"\" : pug_interp)) + \" (\" + (pug.escape(null == (pug_interp = account.Number) ? \"\" : pug_interp)) + \") - \\u003Cstrong\\u003E\" + (pug.escape(null == (pug_interp = view.i18n.getString('Ad_Account')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fstrong\\u003E\\u003C\\u002Fli\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index0 in $$obj) {\n $$l++;\n var account = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cli\\u003E\" + (pug.escape(null == (pug_interp = account.Name) ? \"\" : pug_interp)) + \" (\" + (pug.escape(null == (pug_interp = account.Number) ? \"\" : pug_interp)) + \") - \\u003Cstrong\\u003E\" + (pug.escape(null == (pug_interp = view.i18n.getString('Ad_Account')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fstrong\\u003E\\u003C\\u002Fli\\u003E\";\n }\n }\n}).call(this);\n\n}\nif (model.value.Customers) {\n// iterate model.value.Customers\n;(function(){\n var $$obj = model.value.Customers;\n if ('number' == typeof $$obj.length) {\n for (var pug_index1 = 0, $$l = $$obj.length; pug_index1 < $$l; pug_index1++) {\n var customer = $$obj[pug_index1];\npug_html = pug_html + \"\\u003Cli\\u003E\" + (pug.escape(null == (pug_interp = customer.Name) ? \"\" : pug_interp)) + \" (\" + (pug.escape(null == (pug_interp = customer.Number) ? \"\" : pug_interp)) + \") - \\u003Cstrong\\u003E\" + (pug.escape(null == (pug_interp = view.i18n.getString('Manager_Account')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fstrong\\u003E\\u003C\\u002Fli\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index1 in $$obj) {\n $$l++;\n var customer = $$obj[pug_index1];\npug_html = pug_html + \"\\u003Cli\\u003E\" + (pug.escape(null == (pug_interp = customer.Name) ? \"\" : pug_interp)) + \" (\" + (pug.escape(null == (pug_interp = customer.Number) ? \"\" : pug_interp)) + \") - \\u003Cstrong\\u003E\" + (pug.escape(null == (pug_interp = view.i18n.getString('Manager_Account')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fstrong\\u003E\\u003C\\u002Fli\\u003E\";\n }\n }\n}).call(this);\n\n}\nif (model.footerText) {\npug_html = pug_html + \"\\u003Cp\\u003E\" + (pug.escape(null == (pug_interp = model.footerText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fp\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Ful\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"model\" in locals_for_with?locals_for_with.model:typeof model!==\"undefined\"?model:undefined,\"view\" in locals_for_with?locals_for_with.view:typeof view!==\"undefined\"?view:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, label, labelledBy, text, topic) {var attrs = { query: 'help:' + topic, href: 'javascript:void(0)' };\ntext = text || i18n.getString('ConversionTracking_Learn_More');\nif (labelledBy) {\nattrs['aria-labelledby'] = labelledBy + ' ' + labelledBy + '__self';\nattrs['id'] = labelledBy + '__self';\n} else {\nattrs['aria-label'] = label || text;\n}\npug_html = pug_html + \"\\u003Ca\" + (pug.attrs(pug.merge([{\"class\": \"HelpTopic\"},attrs]), true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = text) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"label\" in locals_for_with?locals_for_with.label:typeof label!==\"undefined\"?label:undefined,\"labelledBy\" in locals_for_with?locals_for_with.labelledBy:typeof labelledBy!==\"undefined\"?labelledBy:undefined,\"text\" in locals_for_with?locals_for_with.text:typeof text!==\"undefined\"?text:undefined,\"topic\" in locals_for_with?locals_for_with.topic:typeof topic!==\"undefined\"?topic:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (a11yId, customExtensionEntranceText, helpLinkTemplate, i18n, isActiveTrackingStatus, isAudiencesLibrary, isClarityGoal, isInPilot, isNoRecentConversions, isTrackingStatusColumn, isUETAllTagsDashboard, isUETDashboardEnabled, isUETDashboardPhase2Enabled, isUnverifiedOrInactive, testType, trackingStatusMessagePrefix, value) {pug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"tracking-status-popover\\\"\"+pug.attr(\"id\", a11yId('tracking-status-popover'), true, true)) + \"\\u003E\\u003Cdiv class=\\\"tracking-status-popover__message\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString(trackingStatusMessagePrefix + value)) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\nif ((testType === 'DestinationGoal' || testType === 'EventGoal' || (isInPilot && testType === 'ProductConversionGoal') || (isUETDashboardPhase2Enabled && isUETAllTagsDashboard && isUnverifiedOrInactive) || (isUETDashboardEnabled && isAudiencesLibrary && isUnverifiedOrInactive)) && (value !== 'InactiveDueToTagUnavailable')) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"entrances\\\"\\u003E\";\nif (isTrackingStatusColumn && isUETDashboardEnabled && isUnverifiedOrInactive) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"entrance-button-default uetdashboard\\\"\\u003E\\u003Cspan class=\\\"entrance-text-default\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('UnifiedEventTracking_Goals_ViewDashboard')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"entrance-button extension\\\"\\u003E\\u003Cspan class=\\\"entrance-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = (customExtensionEntranceText || i18n.getString('UnifiedEventTracking_Goals_TestInAdvisorExtension'))) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse\nif (isTrackingStatusColumn && isUETDashboardEnabled && isNoRecentConversions) {\nif (!isClarityGoal) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"entrance-button-default extension\\\"\\u003E\\u003Cspan class=\\\"entrance-text-default\\\"\\u003E\" + (pug.escape(null == (pug_interp = (customExtensionEntranceText || i18n.getString('UnifiedEventTracking_Goals_TestInAdvisorExtension'))) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"entrance-button uetdashboard\\\"\\u003E\\u003Cspan class=\\\"entrance-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('UnifiedEventTracking_Goals_ViewDashboard')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse\nif (isTrackingStatusColumn && isUETDashboardPhase2Enabled && isUnverifiedOrInactive) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"entrance-button-default uetdashboard\\\"\\u003E\\u003Cspan class=\\\"entrance-text-default\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('UnifiedEventTracking_Goals_ViewDashboard')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"entrance-button extension\\\"\\u003E\\u003Cspan class=\\\"entrance-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = (customExtensionEntranceText || i18n.getString('UnifiedEventTracking_Goals_TestInAdvisorExtension'))) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n}\nif (!isActiveTrackingStatus(value)) {\nvar helpLink = helpLinkTemplate({\ni18n: i18n,\ntopic: 'app51206',\nlabelledBy: a11yId('tracking-status-popover'),\ntext: i18n.getString('UETTags_Grid_Troubleshoot'),\n});\npug_html = pug_html + \"\\u003Cdiv class=\\\"tracking-status-popover__troubleshoot\\\"\\u003E\" + (null == (pug_interp = helpLink) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"a11yId\" in locals_for_with?locals_for_with.a11yId:typeof a11yId!==\"undefined\"?a11yId:undefined,\"customExtensionEntranceText\" in locals_for_with?locals_for_with.customExtensionEntranceText:typeof customExtensionEntranceText!==\"undefined\"?customExtensionEntranceText:undefined,\"helpLinkTemplate\" in locals_for_with?locals_for_with.helpLinkTemplate:typeof helpLinkTemplate!==\"undefined\"?helpLinkTemplate:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"isActiveTrackingStatus\" in locals_for_with?locals_for_with.isActiveTrackingStatus:typeof isActiveTrackingStatus!==\"undefined\"?isActiveTrackingStatus:undefined,\"isAudiencesLibrary\" in locals_for_with?locals_for_with.isAudiencesLibrary:typeof isAudiencesLibrary!==\"undefined\"?isAudiencesLibrary:undefined,\"isClarityGoal\" in locals_for_with?locals_for_with.isClarityGoal:typeof isClarityGoal!==\"undefined\"?isClarityGoal:undefined,\"isInPilot\" in locals_for_with?locals_for_with.isInPilot:typeof isInPilot!==\"undefined\"?isInPilot:undefined,\"isNoRecentConversions\" in locals_for_with?locals_for_with.isNoRecentConversions:typeof isNoRecentConversions!==\"undefined\"?isNoRecentConversions:undefined,\"isTrackingStatusColumn\" in locals_for_with?locals_for_with.isTrackingStatusColumn:typeof isTrackingStatusColumn!==\"undefined\"?isTrackingStatusColumn:undefined,\"isUETAllTagsDashboard\" in locals_for_with?locals_for_with.isUETAllTagsDashboard:typeof isUETAllTagsDashboard!==\"undefined\"?isUETAllTagsDashboard:undefined,\"isUETDashboardEnabled\" in locals_for_with?locals_for_with.isUETDashboardEnabled:typeof isUETDashboardEnabled!==\"undefined\"?isUETDashboardEnabled:undefined,\"isUETDashboardPhase2Enabled\" in locals_for_with?locals_for_with.isUETDashboardPhase2Enabled:typeof isUETDashboardPhase2Enabled!==\"undefined\"?isUETDashboardPhase2Enabled:undefined,\"isUnverifiedOrInactive\" in locals_for_with?locals_for_with.isUnverifiedOrInactive:typeof isUnverifiedOrInactive!==\"undefined\"?isUnverifiedOrInactive:undefined,\"testType\" in locals_for_with?locals_for_with.testType:typeof testType!==\"undefined\"?testType:undefined,\"trackingStatusMessagePrefix\" in locals_for_with?locals_for_with.trackingStatusMessagePrefix:typeof trackingStatusMessagePrefix!==\"undefined\"?trackingStatusMessagePrefix:undefined,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (appendLearnMoreLink, view) {pug_html = pug_html + \"\\u003Cdiv class=\\\"form-inline\\\"\\u003E\\u003Cdiv class=\\\"summarypage-bifreshtime\\\"\\u003E\" + (null == (pug_interp = view.stampNotes) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"summarypage-bifreshtime\\\"\\u003E\";\nif (view.accountTimeZoneText) {\npug_html = pug_html + (null == (pug_interp = appendLearnMoreLink(view.i18n.get('MRCAccredited_Label') + ' ' + view.accountTimeZoneText, 'ext54483')) ? \"\" : pug_interp);\n}\nelse {\npug_html = pug_html + (null == (pug_interp = view.i18n.get('MRCAccredited_Label')) ? \"\" : pug_interp);\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"appendLearnMoreLink\" in locals_for_with?locals_for_with.appendLearnMoreLink:typeof appendLearnMoreLink!==\"undefined\"?appendLearnMoreLink:undefined,\"view\" in locals_for_with?locals_for_with.view:typeof view!==\"undefined\"?view:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (isForVNext, unassigned) {if (isForVNext) {\npug_html = pug_html + \"\\u003Cspan class=\\\"goals-grid__category-detail cell-with-popover clickable\\\" tabindex=\\\"0\\\" role=\\\"button\\\"\\u003E\" + (pug.escape(null == (pug_interp = unassigned) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"pull-left goals-grid__category-unassigned\\\"\\u003E\" + (pug.escape(null == (pug_interp = unassigned) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"pull-right btn btn-flat goals-grid__category-detail\\\"\\u003E\\u003Cdiv class=\\\"category-image status-image status_icon clickable\\\" type=\\\"button\\\" tabindex=\\\"0\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}}.call(this,\"isForVNext\" in locals_for_with?locals_for_with.isForVNext:typeof isForVNext!==\"undefined\"?isForVNext:undefined,\"unassigned\" in locals_for_with?locals_for_with.unassigned:typeof unassigned!==\"undefined\"?unassigned:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (a11yId, popupMessage) {pug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"goal-read-only-popover\\\"\"+pug.attr(\"id\", a11yId('goal-read-only-popover'), true, true)) + \"\\u003E\\u003Cdiv class=\\\"goal-read-only-popover__message\\\"\\u003E\" + (pug.escape(null == (pug_interp = popupMessage) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"a11yId\" in locals_for_with?locals_for_with.a11yId:typeof a11yId!==\"undefined\"?a11yId:undefined,\"popupMessage\" in locals_for_with?locals_for_with.popupMessage:typeof popupMessage!==\"undefined\"?popupMessage:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (a11yId, i18n) {var message = i18n.getString('ConversionGoals_Grid_SmartGoal_Popover_Msg')\nvar learnMoreI18n = i18n.getString('ConversionGoals_Grid_SmartGoal_Popover_Learnmore')\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"goal-type-popover\\\"\"+pug.attr(\"id\", a11yId('goal-type-popover'), true, true)) + \"\\u003E\\u003Cdiv class=\\\"goal-type-popover__message\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = message) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E \\u003Ca\" + (\" class=\\\"HelpTopic\\\"\"+\" href=\\\"https:\\u002F\\u002Fhelp.ads.microsoft.com\\u002F#apex\\u002Fads\\u002Fen\\u002F52099\\u002F-1\\\" query=\\\"hlp_BA_CONC_SmartGoals.htm\\\"\"+pug.attr(\"aria-label\", learnMoreI18n, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = learnMoreI18n) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"a11yId\" in locals_for_with?locals_for_with.a11yId:typeof a11yId!==\"undefined\"?a11yId:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (ariaLabel, isForVNext, value) {if (isForVNext) {\npug_html = pug_html + \"\\u003Cspan class=\\\"goals-grid__smart-goal cell-with-popover clickable\\\" tabindex=\\\"0\\\" role=\\\"button\\\"\\u003E\" + (pug.escape(null == (pug_interp = value) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"pull-left goals-grid__smart-goal text-left\\\"\\u003E\" + (pug.escape(null == (pug_interp = value) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"pull-right btn btn-flat goals-grid__smart-goal\\\"\\u003E\\u003Cdiv\" + (\" class=\\\"status_icon clickable\\\"\"+\" type=\\\"button\\\" tabindex=\\\"0\\\"\"+pug.attr(\"aria-label\", ariaLabel, true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}}.call(this,\"ariaLabel\" in locals_for_with?locals_for_with.ariaLabel:typeof ariaLabel!==\"undefined\"?ariaLabel:undefined,\"isForVNext\" in locals_for_with?locals_for_with.isForVNext:typeof isForVNext!==\"undefined\"?isForVNext:undefined,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (ariaLabel, goalSuggestionAriaLabel, isAutoGoal, isForVNext, isNonSupportGoal, isReadOnly, name, showGoalSuggestion) {if (showGoalSuggestion && !isAutoGoal && !isNonSupportGoal) {\npug_html = pug_html + \"\\u003Cspan\" + (\" class=\\\"conversion-goals-light-bulb clickable\\\"\"+\" type=\\\"button\\\" tabindex=\\\"0\\\"\"+pug.attr(\"aria-label\", goalSuggestionAriaLabel, true, true)) + \"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\nif (isForVNext && isAutoGoal) {\npug_html = pug_html + \"\\u003Cspan\" + (\" class=\\\"goals-grid__goal-isAutoGoal clickable\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"aria-label\", ariaLabel, true, true)+\" role=\\\"button\\\" tabindex=\\\"0\\\"\") + \"\\u003E\" + (pug.escape(null == (pug_interp = name) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\nelse\nif (isForVNext && !isReadOnly && !isNonSupportGoal) {\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"edit-goal-link\\\"\"+\" href=\\\"javascript:;\\\"\"+pug.attr(\"aria-label\", ariaLabel, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = name) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}\nelse\nif (isReadOnly) {\npug_html = pug_html + \"\\u003Cspan class=\\\"goals-grid__goal-readonly cell-with-popover clickable\\\" tabindex=\\\"0\\\" role=\\\"button\\\"\\u003E\" + (pug.escape(null == (pug_interp = name) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\nelse\nif (isNonSupportGoal) {\npug_html = pug_html + \"\\u003Cspan class=\\\"goals-grid__goal-nonsupportGoal cell-with-popover clickable\\\" tabindex=\\\"0\\\" role=\\\"button\\\"\\u003E\" + (pug.escape(null == (pug_interp = name) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + (pug.escape(null == (pug_interp = name) ? \"\" : pug_interp));\n}}.call(this,\"ariaLabel\" in locals_for_with?locals_for_with.ariaLabel:typeof ariaLabel!==\"undefined\"?ariaLabel:undefined,\"goalSuggestionAriaLabel\" in locals_for_with?locals_for_with.goalSuggestionAriaLabel:typeof goalSuggestionAriaLabel!==\"undefined\"?goalSuggestionAriaLabel:undefined,\"isAutoGoal\" in locals_for_with?locals_for_with.isAutoGoal:typeof isAutoGoal!==\"undefined\"?isAutoGoal:undefined,\"isForVNext\" in locals_for_with?locals_for_with.isForVNext:typeof isForVNext!==\"undefined\"?isForVNext:undefined,\"isNonSupportGoal\" in locals_for_with?locals_for_with.isNonSupportGoal:typeof isNonSupportGoal!==\"undefined\"?isNonSupportGoal:undefined,\"isReadOnly\" in locals_for_with?locals_for_with.isReadOnly:typeof isReadOnly!==\"undefined\"?isReadOnly:undefined,\"name\" in locals_for_with?locals_for_with.name:typeof name!==\"undefined\"?name:undefined,\"showGoalSuggestion\" in locals_for_with?locals_for_with.showGoalSuggestion:typeof showGoalSuggestion!==\"undefined\"?showGoalSuggestion:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (isForVNext, value) {if (isForVNext) {\npug_html = pug_html + \"\\u003Cspan class=\\\"goals-grid__revenue-detail cell-with-popover clickable\\\" tabindex=\\\"0\\\" role=\\\"button\\\"\\u003E\" + (pug.escape(null == (pug_interp = value) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"pull-left goals-grid__revenue-unassigned text-left\\\"\\u003E\" + (pug.escape(null == (pug_interp = value) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"pull-right btn btn-flat goals-grid__revenue-detail\\\"\\u003E\\u003Cdiv class=\\\"revenue-image status-image status_icon clickable\\\" type=\\\"button\\\" tabindex=\\\"0\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}}.call(this,\"isForVNext\" in locals_for_with?locals_for_with.isForVNext:typeof isForVNext!==\"undefined\"?isForVNext:undefined,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (isReadOnly, s$i18n, value) {var i18nValue = s$i18n.value('Goal', 'Status', value)\npug_html = pug_html + \"\\u003Cdiv class=\\\"grid-cell\\\"\\u003E\";\nif (!isReadOnly) {\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"statuschangehover statusicondisplay clickable\\\"\"+\" tabindex=\\\"0\\\" role=\\\"button\\\"\"+pug.attr(\"title\", i18nValue, true, true)+pug.attr(\"aria-label\", i18nValue, true, true)) + \"\\u003E\";\nif (value === 'Removed') {\npug_html = pug_html + \"\\u003Cdiv class=\\\"statusPaused_icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"statusEnabled_icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\nif (value === 'Removed') {\npug_html = pug_html + \"\\u003Cdiv class=\\\"statusPaused_icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"statusEnabled_icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"isReadOnly\" in locals_for_with?locals_for_with.isReadOnly:typeof isReadOnly!==\"undefined\"?isReadOnly:undefined,\"s$i18n\" in locals_for_with?locals_for_with.s$i18n:typeof s$i18n!==\"undefined\"?s$i18n:undefined,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (IsUETDashboardEnabled, i18n, value) {pug_html = pug_html + \"\\u003Cdiv class=\\\"goals-grid-tag-id-cell\\\"\\u003E\";\nif (IsUETDashboardEnabled) {\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"link-tag-id\\\"\"+\" href=\\\"javascript:void(0)\\\"\"+pug.attr(\"id\", 'tagId4Tags_' + value, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = value) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}\nelse {\npug_html = pug_html + (pug.escape(null == (pug_interp = value + ' ') ? \"\" : pug_interp)) + \"\\u003Ca\" + (\" class=\\\"link-tag\\\"\"+\" href=\\\"javascript:void(0)\\\"\"+pug.attr(\"id\", 'tagId4Tags_' + value, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('ConversionGoals_Grid_LinkViewTag')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"IsUETDashboardEnabled\" in locals_for_with?locals_for_with.IsUETDashboardEnabled:typeof IsUETDashboardEnabled!==\"undefined\"?IsUETDashboardEnabled:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (isActiveTrackingStatus, isForVNext, s$i18n, value) {var statusText = s$i18n.value('Goal', 'TrackingStatus', value);\nvar statusClass = 'uet-tags-grid__tracking-status--' + (isActiveTrackingStatus(value) ? 'active' : 'inactive');\nif (isForVNext) {\npug_html = pug_html + \"\\u003Cspan\" + (pug.attr(\"class\", pug.classes([\"tracking-status\",\"cell-with-popover\",\"uet-tags-grid__tracking-status-detail\",\"clickable\",statusClass], [false,false,false,false,true]), false, true)+\" tabindex=\\\"0\\\" role=\\\"button\\\"\") + \"\\u003E\" + (pug.escape(null == (pug_interp = statusText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"pull-left\",\"uet-tags-grid__tracking-status\",statusClass], [false,false,true]), false, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = statusText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"pull-right btn btn-flat uet-tags-grid__tracking-status-detail\\\"\\u003E\\u003Cdiv class=\\\"status-image status_icon clickable\\\" type=\\\"button\\\" tabindex=\\\"0\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}}.call(this,\"isActiveTrackingStatus\" in locals_for_with?locals_for_with.isActiveTrackingStatus:typeof isActiveTrackingStatus!==\"undefined\"?isActiveTrackingStatus:undefined,\"isForVNext\" in locals_for_with?locals_for_with.isForVNext:typeof isForVNext!==\"undefined\"?isForVNext:undefined,\"s$i18n\" in locals_for_with?locals_for_with.s$i18n:typeof s$i18n!==\"undefined\"?s$i18n:undefined,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (a11yId, popupMessage) {pug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"unassigned-category-popover\\\"\"+pug.attr(\"id\", a11yId('unassigned-category-popover'), true, true)) + \"\\u003E\\u003Cdiv class=\\\"unassigned-category-popover__message\\\"\\u003E\" + (pug.escape(null == (pug_interp = popupMessage) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"a11yId\" in locals_for_with?locals_for_with.a11yId:typeof a11yId!==\"undefined\"?a11yId:undefined,\"popupMessage\" in locals_for_with?locals_for_with.popupMessage:typeof popupMessage!==\"undefined\"?popupMessage:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (a11yId, i18n) {pug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"unassigned-revenue-popover\\\"\"+pug.attr(\"id\", a11yId('unassigned-revenue-popover'), true, true)) + \"\\u003E\\u003Cdiv class=\\\"unassigned-revenue-popover__message\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('ConversionGoals_Grid_Revenue_Unassigned_Msg_1')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"bold\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('ConversionGoals_Grid_Revenue_Unassigned_Msg_2_bold')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('ConversionGoals_Grid_Revenue_Unassigned_Msg_3')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"bold\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('ConversionGoals_Grid_Revenue_Unassigned_Msg_4_bold')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('ConversionGoals_Grid_Revenue_Unassigned_Msg_5')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"bold\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('ConversionGoals_Grid_Revenue_Unassigned_Msg_6_bold')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('ConversionGoals_Grid_Revenue_Unassigned_Msg_7')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"a11yId\" in locals_for_with?locals_for_with.a11yId:typeof a11yId!==\"undefined\"?a11yId:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (errorRows, hasAcrossAllAccountsOfflineConversionGoal, hasError, hasUploadError, i18n, isNewUI, successRows, totalRows, type) {pug_mixins[\"resultsView\"] = pug_interp = function(){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"upload-results\\\"\\u003E\\u003Cdiv class=\\\"upload-result-row\\\"\\u003E\\u003Cdiv class=\\\"status_success spritedimagealign\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cspan class=\\\"result-row\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('UnifiedEventTracking_UploadConversions_HistoryGrid_ChangesCount', { count: totalRows })) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"upload-result-row\\\"\\u003E\\u003Cdiv class=\\\"status_success spritedimagealign\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cspan class=\\\"result-row\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('UnifiedEventTracking_UploadConversions_HistoryGrid_SuccessCount', { count: successRows })) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"upload-result-row\\\"\\u003E\\u003Cdiv class=\\\"status_error spritedimagealign\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cspan class=\\\"result-row\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('UnifiedEventTracking_UploadConversions_HistoryGrid_ErrorCount', { count: errorRows })) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_html = pug_html + \"\\u003Cdiv class=\\\"changeview\\\"\\u003E\";\nif (type === 'preview') {\npug_html = pug_html + \"\\u003Cdiv class=\\\"row\\\"\\u003E\\u003Cdiv class=\\\"col-sm-6\\\"\\u003E\\u003Ch3 class=\\\"type-bold panel-title\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Import_ImportPreview_TableTitle')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fh3\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"row\\\"\\u003E\\u003Cdiv class=\\\"col-sm-6\\\"\\u003E\";\nif (isNewUI) {\npug_mixins[\"resultsView\"]();\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"bingadsgrid preview-grid\\\"\\u003E\\u003Cdiv class=\\\"grid-table\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (hasError) {\npug_html = pug_html + \"\\u003Ca class=\\\"link-errors\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('UnifiedEventTracking_UploadConversions_DownloadErrorsOnly_Button')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"row action-bar\\\"\\u003E\\u003Cdiv class=\\\"col-sm-6\\\"\\u003E\\u003Cbutton class=\\\"btn btn-primary btn-apply\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('UnifiedEventTracking_UploadConversions_ApplyChanges_Button')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\\u003Cbutton class=\\\"btn btn-default btn-discard\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('UnifiedEventTracking_UploadConversions_Discard_Button')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse\nif (type === 'scheduled-preview') {\npug_html = pug_html + \"\\u003Cdiv class=\\\"row\\\"\\u003E\\u003Cdiv class=\\\"col-sm-6\\\"\\u003E\\u003Ch3 class=\\\"type-bold panel-title\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Import_ImportPreview_TableTitle')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fh3\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"row\\\"\\u003E\\u003Cdiv class=\\\"col-sm-6\\\"\\u003E\";\nif (isNewUI) {\npug_mixins[\"resultsView\"]();\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"bingadsgrid preview-grid\\\"\\u003E\\u003Cdiv class=\\\"grid-table\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"row action-bar\\\"\\u003E\\u003Cdiv class=\\\"col-sm-6\\\"\\u003E\";\nif (!hasUploadError) {\npug_html = pug_html + \"\\u003Cbutton class=\\\"btn btn-primary btn-results\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('UnifiedEventTracking_UploadConversions_DownloadAllResults_Button')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\";\nif (hasError) {\npug_html = pug_html + \"\\u003Cbutton class=\\\"btn btn-default btn-errors\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('UnifiedEventTracking_UploadConversions_DownloadErrorsOnly_Button')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\";\n}\n}\npug_html = pug_html + \"\\u003Cbutton class=\\\"btn btn-default btn-close\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('UnifiedEventTracking_UploadConversions_Close_Button')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse\nif (type === 'review') {\npug_html = pug_html + \"\\u003Cdiv class=\\\"row\\\"\\u003E\\u003Cdiv class=\\\"col-sm-6\\\"\\u003E\\u003Ch3 class=\\\"type-bold panel-title\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('UnifiedEventTracking_UploadConversions_ChangesViewTitle_AppliedChanges')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fh3\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"row\\\"\\u003E\\u003Cdiv class=\\\"col-sm-6\\\"\\u003E\";\nif (isNewUI) {\npug_mixins[\"resultsView\"]();\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"bingadsgrid changes-grid\\\"\\u003E\\u003Cdiv class=\\\"grid-table\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (hasAcrossAllAccountsOfflineConversionGoal) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"row\\\"\\u003E\\u003Cdiv class=\\\"col-sm-6\\\"\\u003E\\u003Ch4\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('UnifiedEventTracking_UploadConversions_OfflineConversionGoalCurrencyCustomScope')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fh4\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"row action-bar\\\"\\u003E\\u003Cdiv class=\\\"col-sm-6\\\"\\u003E\\u003Cbutton class=\\\"btn btn-primary btn-results\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('UnifiedEventTracking_UploadConversions_DownloadAllResults_Button')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\";\nif (hasError) {\npug_html = pug_html + \"\\u003Cbutton class=\\\"btn btn-default btn-errors\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('UnifiedEventTracking_UploadConversions_DownloadErrorsOnly_Button')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\";\n}\npug_html = pug_html + \"\\u003Cbutton class=\\\"btn btn-default btn-close\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('UnifiedEventTracking_UploadConversions_Close_Button')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"errorRows\" in locals_for_with?locals_for_with.errorRows:typeof errorRows!==\"undefined\"?errorRows:undefined,\"hasAcrossAllAccountsOfflineConversionGoal\" in locals_for_with?locals_for_with.hasAcrossAllAccountsOfflineConversionGoal:typeof hasAcrossAllAccountsOfflineConversionGoal!==\"undefined\"?hasAcrossAllAccountsOfflineConversionGoal:undefined,\"hasError\" in locals_for_with?locals_for_with.hasError:typeof hasError!==\"undefined\"?hasError:undefined,\"hasUploadError\" in locals_for_with?locals_for_with.hasUploadError:typeof hasUploadError!==\"undefined\"?hasUploadError:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"isNewUI\" in locals_for_with?locals_for_with.isNewUI:typeof isNewUI!==\"undefined\"?isNewUI:undefined,\"successRows\" in locals_for_with?locals_for_with.successRows:typeof successRows!==\"undefined\"?successRows:undefined,\"totalRows\" in locals_for_with?locals_for_with.totalRows:typeof totalRows!==\"undefined\"?totalRows:undefined,\"type\" in locals_for_with?locals_for_with.type:typeof type!==\"undefined\"?type:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (value) {if (value.isPending) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"grid-content-container\\\"\\u003E\\u003Cdiv class=\\\"action_pending\\\"\\u003E\" + (pug.escape(null == (pug_interp = value.i18n.getString('UnifiedEventTracking_UploadConversions_PendingText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse\nif (value.shouldDisable) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"results\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse\nif (value.hasError) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"results-row\\\"\\u003E\\u003Ca\" + (\" class=\\\"btn-results\\\"\"+pug.attr(\"data-id\", value.resultsId, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = value.i18n.getString('UnifiedEventTracking_UploadConversions_DownloadAll_Button')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003Ca\" + (\" class=\\\"btn-errors\\\"\"+pug.attr(\"data-id\", value.errorsId, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = value.i18n.getString('UnifiedEventTracking_UploadConversions_DownloadErrors_Button')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"btn-results\\\"\"+pug.attr(\"data-id\", value.resultsId, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = value.i18n.getString('UnifiedEventTracking_UploadConversions_DownloadResults_Button')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}}.call(this,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (value) {pug_html = pug_html + \"\\u003Cdiv class=\\\"grid-content-container\\\"\\u003E\" + (pug.escape(null == (pug_interp = value.datetime) ? \"\" : pug_interp)) + \"\\u003Cbr\\u003E\" + (pug.escape(null == (pug_interp = value.user) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (value) {if (value.isPending) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"information-popup-container\\\"\\u003E\\u003Cdiv class=\\\"status-row\\\"\\u003E\\u003Cdiv class=\\\"mark-container\\\"\\u003E\\u003Cdiv class=\\\"status-icon\\\"\\u003E\\u003Cdiv class=\\\"status_pending spritedimagealign\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"decorated-element\\\"\\u003E\\u003Cdiv class=\\\"status-column\\\"\\u003E\" + (pug.escape(null == (pug_interp = value.i18n.getString('UnifiedEventTracking_UploadConversions_HistoryGrid_Processing')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse\nif (!value.isCompleted) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"grid-content-container\\\"\\u003E\" + (pug.escape(null == (pug_interp = value.status) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"information-popup-container\\\"\\u003E\\u003Cdiv class=\\\"status-row\\\"\\u003E\\u003Cdiv class=\\\"mark-container\\\"\\u003E\\u003Cdiv class=\\\"status-icon\\\"\\u003E\\u003Cdiv class=\\\"status_success spritedimagealign\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"decorated-element\\\"\\u003E\\u003Cdiv class=\\\"status-column\\\"\\u003E\" + (pug.escape(null == (pug_interp = value.i18n.getString('UnifiedEventTracking_UploadConversions_HistoryGrid_SuccessCount', { count: value.successCount })) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (value.errorCount > 0) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"status-row\\\"\\u003E\\u003Cdiv class=\\\"mark-container\\\"\\u003E\\u003Cdiv class=\\\"status-icon\\\"\\u003E\\u003Cdiv class=\\\"status_error spritedimagealign\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"decorated-element\\\"\\u003E\\u003Cdiv class=\\\"status-column\\\"\\u003E\" + (pug.escape(null == (pug_interp = value.i18n.getString('UnifiedEventTracking_UploadConversions_HistoryGrid_ErrorCount', { count: value.errorCount })) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n}}.call(this,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (value) {if (value.shouldDisable) {\npug_html = pug_html + \"\\u003Cspan class=\\\"inactive-grey-bg\\\"\\u003E\" + (pug.escape(null == (pug_interp = value.name) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"btn-file clickable\\\"\"+pug.attr(\"data-id\", value.identifier, true, true)+\" tabindex=\\\"0\\\"\") + \"\\u003E\" + (pug.escape(null == (pug_interp = value.name) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}}.call(this,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;pug_html = pug_html + \"\\u003Cdiv class=\\\"history-grid bingadsgrid\\\"\\u003E\\u003Cdiv class=\\\"grid-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"grid-noresult grid-nodata-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (Object, i18n, value) {pug_html = pug_html + \"\\u003Cdiv\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('UETTags_Event_Grid_ParametersPopupMessage')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cbr\\u003E\";\n// iterate Object.keys(value)\n;(function(){\n var $$obj = Object.keys(value);\n if ('number' == typeof $$obj.length) {\n for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) {\n var key = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cdiv\\u003E\" + (pug.escape(null == (pug_interp = key + ': ' + value[key]) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index0 in $$obj) {\n $$l++;\n var key = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cdiv\\u003E\" + (pug.escape(null == (pug_interp = key + ': ' + value[key]) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\n }\n }\n}).call(this);\n}.call(this,\"Object\" in locals_for_with?locals_for_with.Object:typeof Object!==\"undefined\"?Object:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, val) {if (val !== '-')\n{\nlet vals = val.split(',')\nif (vals.length > 2)\n{\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = vals[0]) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = ' and ') ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Ca class=\\\"uet-tags-test-table__parameters-tag\\\" href=\\\"javascript:void(0)\\\"\\u003E\" + (pug.escape(null == (pug_interp = `${vals.length - 1}`) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = ' ') ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Ca class=\\\"uet-tags-test-table__parameters-tag\\\" href=\\\"javascript:void(0)\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('UETTags_Event_Grid_ColumnOthers')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}\nelse if (vals.length === 2)\n{\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = vals[0]) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = ' and ') ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Ca class=\\\"uet-tags-test-table__parameters-tag\\\" href=\\\"javascript:void(0)\\\"\\u003E\" + (pug.escape(null == (pug_interp = `${vals.length - 1}`) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = ' ') ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Ca class=\\\"uet-tags-test-table__parameters-tag\\\" href=\\\"javascript:void(0)\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('UETTags_Event_Grid_ColumnOther')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}\nelse\n{\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = val) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\n}}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"val\" in locals_for_with?locals_for_with.val:typeof val!==\"undefined\"?val:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n) {pug_html = pug_html + \"\\u003Ca class=\\\"uet-tags-dashboard-grid__data-view-tag\\\" href=\\\"javascript:void(0)\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('UETTags_Event_Grid_ColumnExportData')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","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, value) {pug_html = pug_html + \"\\u003Cdiv\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('UETTags_Event_Grid_ParametersPopupMessage')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cbr\\u003E\";\n// iterate value\n;(function(){\n var $$obj = value;\n if ('number' == typeof $$obj.length) {\n for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) {\n var val = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cdiv\\u003E\" + (pug.escape(null == (pug_interp = val) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index0 in $$obj) {\n $$l++;\n var val = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cdiv\\u003E\" + (pug.escape(null == (pug_interp = val) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\n }\n }\n}).call(this);\n}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, value) {if (value.length > 2) {\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = value[0]) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = ' and ') ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Ca class=\\\"uet-tags-dashboard-grid__parameters-tag\\\" href=\\\"javascript:void(0)\\\"\\u003E\" + (pug.escape(null == (pug_interp = value.length-1) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = ' ') ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Ca class=\\\"uet-tags-dashboard-grid__parameters-tag\\\" href=\\\"javascript:void(0)\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('UETTags_Event_Grid_ColumnOthers')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}\nelse\nif (value.length === 2) {\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = value[0]) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = ' and ') ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Ca class=\\\"uet-tags-dashboard-grid__parameters-tag\\\" href=\\\"javascript:void(0)\\\"\\u003E\" + (pug.escape(null == (pug_interp = value.length-1) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = ' ') ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Ca class=\\\"uet-tags-dashboard-grid__parameters-tag\\\" href=\\\"javascript:void(0)\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('UETTags_Event_Grid_ColumnOther')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}\nelse\nif (value.length === 1) {\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = value[0]) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = '-') ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n) {pug_html = pug_html + \"\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv class=\\\"form-label-container col-sm-4\\\"\\u003E\\u003Clabel class=\\\"control-label\\\" id=\\\"Form-SharedLibrary-Tag-Sharing-Label\\\" for=\\\"Form-SharedLibrary-Tag-Sharing\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('SharedLibrary_Scope_Label_Sharing')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Ca class=\\\"helpbutton\\\" type=\\\"helppopup\\\" topic=\\\"pop_BA_UET_Hierarchies_Sharing\\\" href=\\\"javascript:void(0)\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"manageRemarketingListContainer\\\" id=\\\"Form-SharedLibrary-Tag-Sharing\\\" aria-labelledby=\\\"Form-SharedLibrary-Tag-Sharing-Label\\\" aria-required=\\\"false\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, isEdit) {pug_html = pug_html + \"\\u003Cdiv class=\\\"panel uet-tags-grid__tag-creator\\\"\\u003E\\u003Cdiv class=\\\"panel-heading\\\" role=\\\"heading\\\" aria-level=\\\"2\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (isEdit) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"panel-title\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('UnifiedEventTracking_Tags_EditTagPanelTitle')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"panel-title\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('UnifiedEventTracking_Tags_CreateTagPanelTitle')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"panel-body uet-tags__form-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"panel-footer\\\"\\u003E\\u003Cbutton class=\\\"btn btn-primary btn-tag-create-save\\\" type=\\\"button\\\" data-analyticsid=\\\"omniture-UET-create-tag-save\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('UnifiedEventTracking_Create')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\\u003Cbutton class=\\\"btn btn-default btn-tag-create-cancel\\\" type=\\\"button\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('UnifiedEventTracking_Cancel')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"isEdit\" in locals_for_with?locals_for_with.isEdit:typeof isEdit!==\"undefined\"?isEdit:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, manageScopePermission) {pug_html = pug_html + \"\\u003Ca class=\\\"uet-tags-grid__action-view-tag\\\" href=\\\"javascript:void(0)\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('UETTags_Grid_LinkViewTag')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\nif (manageScopePermission) {\npug_html = pug_html + \"\\u003Ca class=\\\"uet-tags-grid__action-manage-sharing-scope\\\" href=\\\"javascript:void(0)\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('UETTags_Grid_ManageScope_Action')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"manageScopePermission\" in locals_for_with?locals_for_with.manageScopePermission:typeof manageScopePermission!==\"undefined\"?manageScopePermission:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (ariaLabel, disabled, value) {if (disabled) {\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = value) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"uet-tags-grid__link-audience\\\"\"+\" href=\\\"javascript:void(0)\\\"\"+pug.attr(\"aria-label\", ariaLabel, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = value) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}}.call(this,\"ariaLabel\" in locals_for_with?locals_for_with.ariaLabel:typeof ariaLabel!==\"undefined\"?ariaLabel:undefined,\"disabled\" in locals_for_with?locals_for_with.disabled:typeof disabled!==\"undefined\"?disabled:undefined,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (className, isForVNext, text) {if (isForVNext) {\npug_html = pug_html + \"\\u003Cspan\" + (pug.attr(\"class\", pug.classes([\"cell-with-popover\",\"clickable\",className + '-detail'], [false,false,true]), false, true)+\" tabindex=\\\"0\\\" role=\\\"button\\\"\") + \"\\u003E\" + (pug.escape(null == (pug_interp = text) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = text) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\" + (pug.attr(\"class\", pug.classes([\"status_icon\",\"clickable\",\"gridDetailsImage\",className + '-detail'], [false,false,false,true]), false, true)+\" type=\\\"button\\\" tabindex=\\\"0\\\" role=\\\"button\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\";\n}}.call(this,\"className\" in locals_for_with?locals_for_with.className:typeof className!==\"undefined\"?className:undefined,\"isForVNext\" in locals_for_with?locals_for_with.isForVNext:typeof isForVNext!==\"undefined\"?isForVNext:undefined,\"text\" in locals_for_with?locals_for_with.text:typeof text!==\"undefined\"?text:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (ariaLabel, disabled, value) {if (disabled) {\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = value) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"uet-tags-grid__link-goals\\\"\"+\" href=\\\"javascript:void(0)\\\"\"+pug.attr(\"aria-label\", ariaLabel, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = value) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}}.call(this,\"ariaLabel\" in locals_for_with?locals_for_with.ariaLabel:typeof ariaLabel!==\"undefined\"?ariaLabel:undefined,\"disabled\" in locals_for_with?locals_for_with.disabled:typeof disabled!==\"undefined\"?disabled:undefined,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (IsUETDashboardPhase2Enabled, ariaLabel, isEditable, isReadOnly, name) {if (isEditable && !isReadOnly) {\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"edit-tag-link\\\"\"+\" href=\\\"javascript:;\\\"\"+pug.attr(\"aria-label\", ariaLabel, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = name) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\nif (IsUETDashboardPhase2Enabled) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"pull-right span edit-tag-btn\\\"\\u003E\\u003Ci class=\\\"glyphicon glyphicon-pencil\\\"\\u003E\\u003C\\u002Fi\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}\nelse\nif (isReadOnly) {\npug_html = pug_html + \"\\u003Cspan class=\\\"tag-grid__tag-readonly cell-with-popover clickable\\\" tabindex=\\\"0\\\" role=\\\"button\\\"\\u003E\" + (pug.escape(null == (pug_interp = name) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + (pug.escape(null == (pug_interp = name) ? \"\" : pug_interp));\n}}.call(this,\"IsUETDashboardPhase2Enabled\" in locals_for_with?locals_for_with.IsUETDashboardPhase2Enabled:typeof IsUETDashboardPhase2Enabled!==\"undefined\"?IsUETDashboardPhase2Enabled:undefined,\"ariaLabel\" in locals_for_with?locals_for_with.ariaLabel:typeof ariaLabel!==\"undefined\"?ariaLabel:undefined,\"isEditable\" in locals_for_with?locals_for_with.isEditable:typeof isEditable!==\"undefined\"?isEditable:undefined,\"isReadOnly\" in locals_for_with?locals_for_with.isReadOnly:typeof isReadOnly!==\"undefined\"?isReadOnly:undefined,\"name\" in locals_for_with?locals_for_with.name:typeof name!==\"undefined\"?name:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (IsUETDashboardEnabled, value) {pug_html = pug_html + \"\\u003Cdiv class=\\\"grid-tag-id-cell\\\"\\u003E\";\nif (IsUETDashboardEnabled) {\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"link-tag-id\\\"\"+\" href=\\\"javascript:void(0)\\\"\"+pug.attr(\"id\", 'tagId4Tags_' + value, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = value) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}\nelse {\npug_html = pug_html + (pug.escape(null == (pug_interp = value) ? \"\" : pug_interp));\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"IsUETDashboardEnabled\" in locals_for_with?locals_for_with.IsUETDashboardEnabled:typeof IsUETDashboardEnabled!==\"undefined\"?IsUETDashboardEnabled:undefined,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (a11yId, popupMessage) {pug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"tag-read-only-popover\\\"\"+pug.attr(\"id\", a11yId('tag-read-only-popover'), true, true)) + \"\\u003E\\u003Cdiv class=\\\"tag-read-only-popover__message\\\"\\u003E\" + (pug.escape(null == (pug_interp = popupMessage) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"a11yId\" in locals_for_with?locals_for_with.a11yId:typeof a11yId!==\"undefined\"?a11yId:undefined,\"popupMessage\" in locals_for_with?locals_for_with.popupMessage:typeof popupMessage!==\"undefined\"?popupMessage:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (isActiveTrackingStatus, isForVNext, s$i18n, value) {var statusText = s$i18n.value('Tag', 'TrackingStatus', value);\nvar statusClass = 'uet-tags-grid__tracking-status--' + (isActiveTrackingStatus(value) ? 'active' : 'inactive');\nif (isForVNext) {\npug_html = pug_html + \"\\u003Cspan\" + (pug.attr(\"class\", pug.classes([\"tracking-status\",\"cell-with-popover\",\"uet-tags-grid__tracking-status-detail\",\"clickable\",statusClass], [false,false,false,false,true]), false, true)+\" tabindex=\\\"0\\\" role=\\\"button\\\"\") + \"\\u003E\" + (pug.escape(null == (pug_interp = statusText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"pull-left\",\"uet-tags-grid__tracking-status\",statusClass], [false,false,true]), false, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = statusText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"pull-right btn btn-flat uet-tags-grid__tracking-status-detail\\\"\\u003E\\u003Cdiv class=\\\"status-image status_icon clickable\\\" type=\\\"button\\\" tabindex=\\\"0\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}}.call(this,\"isActiveTrackingStatus\" in locals_for_with?locals_for_with.isActiveTrackingStatus:typeof isActiveTrackingStatus!==\"undefined\"?isActiveTrackingStatus:undefined,\"isForVNext\" in locals_for_with?locals_for_with.isForVNext:typeof isForVNext!==\"undefined\"?isForVNext:undefined,\"s$i18n\" in locals_for_with?locals_for_with.s$i18n:typeof s$i18n!==\"undefined\"?s$i18n:undefined,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, i18nGlobal, isForVNext, showSaveAndCreateAnother) {pug_mixins[\"koErrors\"] = pug_interp = function(id, cssClass){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cul\" + (pug.attr(\"class\", pug.classes([cssClass ? cssClass : 'alert alert-danger'], [true]), false, true)+\" data-bind=\\\"visible: errors().length > 0, foreach: errors, attr: {"aria-hidden": errors().length == 0}\\\"\"+pug.attr(\"id\", id ? id : 'KoErrors', true, true)) + \"\\u003E\\u003Cli\\u003E\\u003Cdiv data-bind=\\\"html: $data\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\";\n};\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-horizontal\\\"\\u003E\\u003Cdiv data-bind=\\\"attr:{class: containerClass}\\\"\\u003E\\u003Cdiv class=\\\"panel-heading\\\" role=\\\"heading\\\" aria-level=\\\"2\\\"\\u003E\\u003Cdiv class=\\\"panel-title\\\" data-bind=\\\"text: adEditorTitle\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"panel-body-ad\\\"\\u003E\\u003Cdiv class=\\\"form-group\\\" data-bind=\\\"visible: errors().length > 0\\\"\\u003E\";\npug_mixins[\"koErrors\"]();\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\" data-bind=\\\"visible: showAdGroups\\\"\\u003E\\u003Clabel class=\\\"col-sm-2 control-label\\\" data-bind=\\\"attr: {id:selectorLabelId}\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18nGlobal.get('CampaignAdGroupSelector_SelectAdGroup')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003Cdiv class=\\\"col-sm-4 adgroup-selector\\\"\\u003E\";\nif (!isForVNext) {\npug_html = pug_html + \"\\u003Cdiv data-bind=\\\"campaignAdgroupSelectorControl: selectedCampaigns, adgroupObservable: selectedAdgroups, scope: scopeContext, showAdgroupSelector: showAdGroups, selectorLabelId:selectorLabelId\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"ad-panel\\\" data-bind=\\\"visible: showEditor() && allowAdCreation()\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"p\\\" data-bind=\\\"visible: showEditor() && !allowAdCreation()\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_Cannot_Create_Ad_For_This_campaign')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"panel-footer save-bar appEditor-save-container\\\" data-bind=\\\"visible: !isDisplayAdWithCopilot() && !isXandrVideoAd() && !isMultiAdFormatDisplayAd() && !isMultiAdFormatVideoAd() && !hideFooter()\\\"\\u003E\\u003Cinput\" + (\" class=\\\"btn btn-primary save\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", i18nGlobal.get('Button_Save'), true, true)+\" data-bind=\\\"enable: showEditor() && allowAdCreation() && hasWebsiteImageOptedIn(), attr: { "data-analyticsid": saveAnalyticsId() }\\\"\") + \"\\u003E\";\nif (showSaveAndCreateAnother) {\npug_html = pug_html + \"\\u003Cinput\" + (\" class=\\\"save-create-another btn btn-default\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", i18n.get('Ad_SaveCreate'), true, true)+\" data-bind=\\\"visible: !hideSaveAndCreateAnother(), enable: showEditor() && allowAdCreation() && hasWebsiteImageOptedIn(), attr: { "data-analyticsid": saveCreateAnalyticsId() }\\\"\") + \"\\u003E\";\n}\npug_html = pug_html + \"\\u003Cinput\" + (\" class=\\\"btn btn-default cancel\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", i18nGlobal.get('Button_Cancel'), true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"i18nGlobal\" in locals_for_with?locals_for_with.i18nGlobal:typeof i18nGlobal!==\"undefined\"?i18nGlobal:undefined,\"isForVNext\" in locals_for_with?locals_for_with.isForVNext:typeof isForVNext!==\"undefined\"?isForVNext:undefined,\"showSaveAndCreateAnother\" in locals_for_with?locals_for_with.showSaveAndCreateAnother:typeof showSaveAndCreateAnother!==\"undefined\"?showSaveAndCreateAnother:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;\n\n\n\npug_html = pug_html + \"\\u003Cdiv class=\\\"add-keywords-root\\\"\\u003E\\u003Cdiv class=\\\"panel-body\\\"\\u003E\\u003Cdiv class=\\\"row\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4\\\"\\u003E\\u003Cdiv class=\\\"parser\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-1\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-7\\\" data-bind=\\\"visible: isKeywordPlannerEnabled()\\\"\\u003E\\u003Cdiv class=\\\"keyword-planner-inline\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (associationType, isUINext) {pug_html = pug_html + \"\\u003Cdiv class=\\\"bingadsgrid adextensions-grid\\\"\\u003E\\u003Cdiv railviewid=\\\"AdExtensions_Load\\\" style=\\\"display: none\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([associationType + '__container'], [true]), false, true)) + \"\\u003E\\u003Cdiv class=\\\"grid-toolbar-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"filter-bar\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"editor__container bulkedit-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\\u003E\\u003Cdiv class=\\\"grid-table\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"grid-pagination-control\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"noresult-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"filter-noresult-container\\\" style=\\\"display:none\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (!isUINext) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"pager\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"associationType\" in locals_for_with?locals_for_with.associationType:typeof associationType!==\"undefined\"?associationType:undefined,\"isUINext\" in locals_for_with?locals_for_with.isUINext:typeof isUINext!==\"undefined\"?isUINext:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;pug_html = pug_html + \"\\u003Cdiv class=\\\"btn-toolbar\\\" data-bind=\\\"visible: !hideToolbar()\\\"\\u003E\\u003Cdiv class=\\\"btn-group chartToggle\\\" data-bind=\\\"visible: !hideToggleIcon()\\\"\\u003E\\u003Cbutton class=\\\"btn btn-square\\\" id=\\\"bi-chartToggle\\\" type=\\\"button\\\" title=\\\"Show graph\\\" data-bind=\\\"click: onShowChartButtonClick\\\"\\u003E\\u003Cdiv class=\\\"chart-icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fbutton\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"chart-container\\\" data-bind=\\\"visible: showChart()\\\" chart-iteration=\\\"0\\\"\\u003E\\u003Ctable class=\\\"cbTable\\\" id=\\\"chartTable\\\" data-bind=\\\"visible: !isChartLoading()\\\"\\u003E\\u003Ctbody\\u003E\\u003Ctr\\u003E\\u003Ctd class=\\\"chartDropdowns\\\" id=\\\"chartDropdowns\\\" colspan=\\\"2\\\"\\u003E\\u003Cdiv class=\\\"chart_ctc_title chart_biz\\\"\\u003E\\u003Cspan id=\\\"chartTitle\\\" data-bind=\\\"text: chartTitle\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003Ca class=\\\"helpbutton chart_viz\\\" id=\\\"chart-helpicon\\\" data-bind=\\\"attr: { 'aria-label': learnMoreLabel}\\\" type=\\\"helppopup\\\" topic=\\\"Page_Campaigns_AccountPerformance\\\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\" aria-labelledby=\\\"chart-helpicon chartTitle\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003Cdiv class=\\\"inline-block metricVsSpan\\\" data-bind=\\\"visible: (isPopOn() || isMovingAverageOn()) && isComparisonDataMissing()\\\"\\u003E\\u003Cspan data-bind=\\\"comparisonDataMissingText()\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"dropdown-inline inline-block\\\"\\u003E\\u003Cdiv id=\\\"bi_ctc_dropdowns\\\"\\u003E\\u003Cspan class=\\\"metricColorLine primary-line\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"metricColorLine primary-comparison-line\\\" data-bind=\\\"visible: isPopOn()\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cdiv class=\\\"dropdown-container\\\" id=\\\"main-primary-dropdown\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cspan class=\\\"metricVsSpan\\\"\\u003Evs\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"metricColorLine secondary-line\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"metricColorLine secondary-comparison-line\\\" data-bind=\\\"visible: isPopOn()\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cdiv class=\\\"dropdown-container\\\" id=\\\"main-secondary-dropdown\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"dropdown-container\\\" id=\\\"granularity-dropdown-container\\\" data-bind=\\\"visible: isGranularityShowing()\\\"\\u003E\\u003Cdiv class=\\\"dropdown-container\\\" id=\\\"granularity-dropdown\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"inline-block\\\" id=\\\"bi-moving-average\\\" data-bind=\\\"visible: isMovingAverageVisible()\\\"\\u003E\\u003Cinput class=\\\"ma-checkbox\\\" type=\\\"checkbox\\\" data-bind=\\\"checked: isMovingAverageOn(), click: onMovingAverageClick, attr: {'aria-label': showMovingAverageText, 'aria-checked': isMovingAverageOn() ? 'true' : 'false'}\\\"\\u003E\\u003Cspan id=\\\"ShowMovingAverageLabel\\\" data-bind=\\\"text: showMovingAverageText\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Ca class=\\\"helpbutton\\\" id=\\\"chart-helpicon-PMA\\\" type=\\\"helppopup\\\" topic=\\\"pop_BA_PerformanceMovingAverage\\\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\" aria-labelledby=\\\"chart-helpicon-PMA ShowMovingAverageLabel\\\" data-bind=\\\"attr: { 'aria-label': learnMoreLabel}\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Ftd\\u003E\\u003C\\u002Ftr\\u003E\\u003Ctr id=\\\"chartMainArea\\\"\\u003E\\u003Ctd class=\\\"chartTableColumn1\\\" data-bind=\\\"visible: isDataAvailable()\\\"\\u003E\\u003Cdiv id=\\\"highcharts-container\\\" style=\\\"height: 105px;\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv id=\\\"charts-label\\\"\\u003E\\u003Cdiv class=\\\"row\\\"\\u003E\\u003Cdiv class=\\\"col-md-4\\\"\\u003E\\u003Cspan class=\\\"xAxisLabelLeft primary-date\\\" data-bind=\\\"text: xAxisStartValue()\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-md-4 col-md-offset-4\\\"\\u003E\\u003Cspan class=\\\"xAxisLabelRight primary-date\\\" data-bind=\\\"text: xAxisEndValue()\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"row\\\" data-bind=\\\"if: isPopOn()\\\"\\u003E\\u003Cdiv class=\\\"col-md-4\\\"\\u003E\\u003Cspan class=\\\"xAxisLabelLeft compared-date\\\" data-bind=\\\"text: comparedXAxisStartValue()\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-md-4 col-md-offset-4\\\"\\u003E\\u003Cspan class=\\\"xAxisLabelRight compared-date\\\" data-bind=\\\"text: comparedXAxisEndValue()\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Ftd\\u003E\\u003C\\u002Ftr\\u003E\\u003C\\u002Ftbody\\u003E\\u003C\\u002Ftable\\u003E\\u003Cdiv class=\\\"spinner\\\" data-bind=\\\"visible: isChartLoading()\\\"\\u003E\\u003Cdiv class=\\\"spinner-icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"chart-no-data-container\\\" data-bind=\\\"visible: !isChartLoading() && !isDataAvailable()\\\"\\u003E\\u003Cdiv class=\\\"chart-no-data-label\\\"\\u003E\\u003Cspan data-bind=\\\"html: noDataText()\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (AccountNumber, EmailAddress) {pug_html = pug_html + \"\\u003Cp\\u003E\" + (pug.escape(null == (pug_interp = EmailAddress) ? \"\" : pug_interp)) + \"\\u003Cbr\\u003E\" + (pug.escape(null == (pug_interp = AccountNumber) ? \"\" : pug_interp)) + \"\\u003C\\u002Fp\\u003E\";}.call(this,\"AccountNumber\" in locals_for_with?locals_for_with.AccountNumber:typeof AccountNumber!==\"undefined\"?AccountNumber:undefined,\"EmailAddress\" in locals_for_with?locals_for_with.EmailAddress:typeof EmailAddress!==\"undefined\"?EmailAddress:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (id) {pug_html = pug_html + \"\\u003Cp\\u003E\" + (pug.escape(null == (pug_interp = id) ? \"\" : pug_interp)) + \"\\u003C\\u002Fp\\u003E\";}.call(this,\"id\" in locals_for_with?locals_for_with.id:typeof id!==\"undefined\"?id:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (errorDetailsLabel, hasError, hasErrorCode, hasErrorSummary, hasPreview, i18n) {pug_html = pug_html + \"\\u003Cdiv class=\\\"status-row\\\"\\u003E\";\nif (hasError) {\npug_html = pug_html + \"\\u003Ca class=\\\"download-error\\\" role=\\\"button\\\" tabindex=\\\"0\\\" href=\\\"javascript:void(0);\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Import_LastImport_DownloadErrorFile')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\nif (hasErrorSummary) {\npug_html = pug_html + \"\\u003Cspan\\u003E  |  \\u003C\\u002Fspan\\u003E\\u003Ca class=\\\"download-error-summary\\\" role=\\\"button\\\" tabindex=\\\"0\\\" href=\\\"javascript:void(0);\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Import_LastImport_DownloadErrorSummaryFile')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}\n}\nelse\nif (hasPreview) {\npug_html = pug_html + \"\\u003Ca class=\\\"btn__preview\\\" role=\\\"button\\\" tabindex=\\\"0\\\" href=\\\"javascript:void(0);\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('CampaignImport_ButtonPreview')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003Cspan\\u003E | \\u003C\\u002Fspan\\u003E\\u003Ca class=\\\"btn__cancel\\\" role=\\\"button\\\" tabindex=\\\"0\\\" href=\\\"javascript:void(0);\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('CampaignImport_ButtonCancel')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}\nelse\nif (hasErrorCode) {\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"import-actions learn-more\\\"\"+\" role=\\\"button\\\" tabindex=\\\"0\\\" href=\\\"javascript:void(0);\\\" data-toggle=\\\"tooltip\\\" data-trigger=\\\"manual\\\" data-placement=\\\"left\\\"\"+pug.attr(\"aria-label\", errorDetailsLabel, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Scheduled_Import_History_Actions_LearnMore')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Import_LastImport_Dash')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"errorDetailsLabel\" in locals_for_with?locals_for_with.errorDetailsLabel:typeof errorDetailsLabel!==\"undefined\"?errorDetailsLabel:undefined,\"hasError\" in locals_for_with?locals_for_with.hasError:typeof hasError!==\"undefined\"?hasError:undefined,\"hasErrorCode\" in locals_for_with?locals_for_with.hasErrorCode:typeof hasErrorCode!==\"undefined\"?hasErrorCode:undefined,\"hasErrorSummary\" in locals_for_with?locals_for_with.hasErrorSummary:typeof hasErrorSummary!==\"undefined\"?hasErrorSummary:undefined,\"hasPreview\" in locals_for_with?locals_for_with.hasPreview:typeof hasPreview!==\"undefined\"?hasPreview:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (noAmazonImportMsg, noFacebookImportMsg, noFileImportMsg, noGoogleImportMsg, noPinterestImportMsg) {pug_html = pug_html + \"\\u003Cdiv class=\\\"section-item form-horizontal\\\"\\u003E\\u003Cdiv class=\\\"log-toolbar\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"all-log-grids bingadsgrid importLogGrid\\\"\\u003E\\u003Cdiv class=\\\"grid-table bulk-status-grid googleImportLogGrid\\\" data-bind=\\\"visible: showGoogleImportGrid()\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"grid-table bulk-status-grid facebookImportLogGrid\\\" data-bind=\\\"visible: showFacebookImportGrid()\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"grid-table bulk-status-grid amazonImportLogGrid\\\" data-bind=\\\"visible: showAmazonImportGrid()\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"grid-table bulk-status-grid pinterestImportLogGrid\\\" data-bind=\\\"visible: showPinterestImportGrid()\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"grid-table bulk-status-grid fileImportLogGrid\\\" data-bind=\\\"visible: !showGoogleImportGrid() && !showFacebookImportGrid() && !showAmazonImportGrid() && !showPinterestImportGrid()\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"grid-nodata-container\\\" data-bind=\\\"style: { display: showNoGoogleImportMsg() || showNoFileImportMsg() || showNoFacebookImportMsg() || showNoAmazonImportMsg() || showNoPinterestImportMsg() ? "inline" : "none" }\\\"\\u003E\\u003Cdiv class=\\\"grid-nodata-more\\\" data-bind=\\\"visible: showNoGoogleImportMsg\\\"\\u003E\" + (pug.escape(null == (pug_interp = noGoogleImportMsg) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"grid-nodata-more\\\" data-bind=\\\"visible: showNoFileImportMsg\\\"\\u003E\" + (pug.escape(null == (pug_interp = noFileImportMsg) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"grid-nodata-more\\\" data-bind=\\\"visible: showNoFacebookImportMsg\\\"\\u003E\" + (pug.escape(null == (pug_interp = noFacebookImportMsg) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"grid-nodata-more\\\" data-bind=\\\"visible: showNoAmazonImportMsg\\\"\\u003E\" + (pug.escape(null == (pug_interp = noAmazonImportMsg) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"grid-nodata-more\\\" data-bind=\\\"visible: showNoPinterestImportMsg\\\"\\u003E\" + (pug.escape(null == (pug_interp = noPinterestImportMsg) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"page-control\\\"\\u003E\\u003Cdiv class=\\\"google-pager-container\\\" data-bind=\\\"visible: showGoogleImportGrid()\\\"\\u003E\\u003Cdiv class=\\\"google-log-pager\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"facebook-pager-container\\\" data-bind=\\\"visible: showFacebookImportGrid()\\\"\\u003E\\u003Cdiv class=\\\"facebook-log-pager\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"amazon-pager-container\\\" data-bind=\\\"visible:showAmazonImportGrid()\\\"\\u003E\\u003Cdiv class=\\\"amazon-log-pager\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"pinterest-pager-container\\\" data-bind=\\\"visible:showPinterestImportGrid()\\\"\\u003E\\u003Cdiv class=\\\"pinterest-log-pager\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"file-pager-container\\\" data-bind=\\\"visible: !isFirstSwitch() && !showGoogleImportGrid() && !showFacebookImportGrid() && !showAmazonImportGrid() && !showPinterestImportGrid()\\\"\\u003E\\u003Cdiv class=\\\"file-log-pager\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"noAmazonImportMsg\" in locals_for_with?locals_for_with.noAmazonImportMsg:typeof noAmazonImportMsg!==\"undefined\"?noAmazonImportMsg:undefined,\"noFacebookImportMsg\" in locals_for_with?locals_for_with.noFacebookImportMsg:typeof noFacebookImportMsg!==\"undefined\"?noFacebookImportMsg:undefined,\"noFileImportMsg\" in locals_for_with?locals_for_with.noFileImportMsg:typeof noFileImportMsg!==\"undefined\"?noFileImportMsg:undefined,\"noGoogleImportMsg\" in locals_for_with?locals_for_with.noGoogleImportMsg:typeof noGoogleImportMsg!==\"undefined\"?noGoogleImportMsg:undefined,\"noPinterestImportMsg\" in locals_for_with?locals_for_with.noPinterestImportMsg:typeof noPinterestImportMsg!==\"undefined\"?noPinterestImportMsg:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (mode) {pug_html = pug_html + \"\\u003Cp\\u003E\" + (pug.escape(null == (pug_interp = mode) ? \"\" : pug_interp)) + \"\\u003C\\u002Fp\\u003E\";}.call(this,\"mode\" in locals_for_with?locals_for_with.mode:typeof mode!==\"undefined\"?mode:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (noAmazonImportMsg, noFacebookImportMsg, noFilteredImportMsg, noGoogleImportMsg, noImportMsgHeader, noPinterestImportMsg) {pug_html = pug_html + \"\\u003Cdiv class=\\\"section-item form-horizontal\\\"\\u003E\\u003Cdiv class=\\\"history-toolbar\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"grid-table importHistoryGrid bingadsgrid\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"grid-nodata-container\\\" data-bind=\\\"style: { display: showNoGoogleImportMsg() || showNoFacebookImportMsg() || showNoFilteredImportMsg() || showNoAmazonImportMsg() || showNoPinterestImportMsg() ? "inline" : "none" }\\\"\\u003E\\u003Cdiv class=\\\"grid-nodata\\\" data-bind=\\\"visible: showNoGoogleImportMsg() || showNoFacebookImportMsg() || showNoAmazonImportMsg() || showNoPinterestImportMsg()\\\"\\u003E\" + (pug.escape(null == (pug_interp = noImportMsgHeader) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"grid-nodata-more\\\" data-bind=\\\"visible: showNoGoogleImportMsg\\\"\\u003E\" + (pug.escape(null == (pug_interp = noGoogleImportMsg) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"grid-nodata-more\\\" data-bind=\\\"visible: showNoFacebookImportMsg\\\"\\u003E\" + (pug.escape(null == (pug_interp = noFacebookImportMsg) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"grid-nodata-more\\\" data-bind=\\\"visible: showNoAmazonImportMsg\\\"\\u003E\" + (pug.escape(null == (pug_interp = noAmazonImportMsg) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"grid-nodata-more\\\" data-bind=\\\"visible: showNoPinterestImportMsg\\\"\\u003E\" + (pug.escape(null == (pug_interp = noPinterestImportMsg) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"grid-nodata-more\\\" data-bind=\\\"visible: showNoFilteredImportMsg\\\"\\u003E\" + (pug.escape(null == (pug_interp = noFilteredImportMsg) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"page-control\\\"\\u003E\\u003Cdiv class=\\\"history-pager\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv id=\\\"history-edit-panel\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"noAmazonImportMsg\" in locals_for_with?locals_for_with.noAmazonImportMsg:typeof noAmazonImportMsg!==\"undefined\"?noAmazonImportMsg:undefined,\"noFacebookImportMsg\" in locals_for_with?locals_for_with.noFacebookImportMsg:typeof noFacebookImportMsg!==\"undefined\"?noFacebookImportMsg:undefined,\"noFilteredImportMsg\" in locals_for_with?locals_for_with.noFilteredImportMsg:typeof noFilteredImportMsg!==\"undefined\"?noFilteredImportMsg:undefined,\"noGoogleImportMsg\" in locals_for_with?locals_for_with.noGoogleImportMsg:typeof noGoogleImportMsg!==\"undefined\"?noGoogleImportMsg:undefined,\"noImportMsgHeader\" in locals_for_with?locals_for_with.noImportMsgHeader:typeof noImportMsgHeader!==\"undefined\"?noImportMsgHeader:undefined,\"noPinterestImportMsg\" in locals_for_with?locals_for_with.noPinterestImportMsg:typeof noPinterestImportMsg!==\"undefined\"?noPinterestImportMsg:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (Name) {pug_html = pug_html + \"\\u003Cp class=\\\"truncated\\\"\\u003E\" + (pug.escape(null == (pug_interp = Name) ? \"\" : pug_interp)) + \"\\u003Cbr\\u003E\\u003C\\u002Fp\\u003E\";}.call(this,\"Name\" in locals_for_with?locals_for_with.Name:typeof Name!==\"undefined\"?Name:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (Status, i18n) {var statusIconLabel\nif (i18n) {\nswitch (Status){\ncase 'Deleted':\nstatusIconLabel = i18n.getString('EntityStatus_Deleted')\n break;\ncase 'Paused':\nstatusIconLabel = i18n.getString('EntityStatus_Paused')\n break;\ndefault:\nstatusIconLabel = i18n.getString('EntityStatus_Active')\n break;\n}\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"grid-cell\\\"\\u003E\\u003Cdiv\" + (\" class=\\\"statusicondisplay\\\"\"+pug.attr(\"aria-label\", statusIconLabel, true, true)) + \"\\u003E\";\nif (Status === 'Paused') {\npug_html = pug_html + \"\\u003Cdiv class=\\\"statusPaused_icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse\nif (Status === 'Deleted') {\npug_html = pug_html + \"\\u003Cdiv class=\\\"statusDeleted_icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"statusEnabled_icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"Status\" in locals_for_with?locals_for_with.Status:typeof Status!==\"undefined\"?Status:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, importSettingsLabel, settingsText, showSmartType, showTooltipIcon) {pug_html = pug_html + \"\\u003Cdiv class=\\\"information-popup-container\\\"\\u003E\\u003Cdiv class=\\\"status-row\\\"\\u003E\";\nif (showSmartType) {\npug_html = pug_html + (pug.escape(null == (pug_interp = i18n.get('Scheduled_Import_Smart_Type_In_Settings')) ? \"\" : pug_interp)) + \"\\u003Cbr\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"settingsText\\\"\\u003E\" + (pug.escape(null == (pug_interp = settingsText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\nif (showTooltipIcon) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"glyph-container\\\"\\u003E\\u003Cdiv class=\\\"status-image\\\"\\u003E\\u003Cdiv\" + (\" class=\\\"status_icon gridDetailsImage spritedimagealign import-settings icon-info clickable\\\"\"+\" data-toggle=\\\"tooltip\\\" tabindex=\\\"0\\\" data-trigger=\\\"manual\\\" data-placement=\\\"left\\\" role=\\\"button\\\"\"+pug.attr(\"aria-label\", importSettingsLabel, true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"importSettingsLabel\" in locals_for_with?locals_for_with.importSettingsLabel:typeof importSettingsLabel!==\"undefined\"?importSettingsLabel:undefined,\"settingsText\" in locals_for_with?locals_for_with.settingsText:typeof settingsText!==\"undefined\"?settingsText:undefined,\"showSmartType\" in locals_for_with?locals_for_with.showSmartType:typeof showSmartType!==\"undefined\"?showSmartType:undefined,\"showTooltipIcon\" in locals_for_with?locals_for_with.showTooltipIcon:typeof showTooltipIcon!==\"undefined\"?showTooltipIcon:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n) {pug_html = pug_html + \"\\u003Cdiv class=\\\"panel panel-white\\\"\\u003E\\u003Cdiv class=\\\"panel-heading\\\"\\u003E\\u003Ch4 class=\\\"panel-title\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Import_ImportSettings_Header')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fh4\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"panel-body\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (className, i18n) {pug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('GoogleImport_MicrosoftAdvertising_MultipleAccounts')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\" + (pug.attr(\"class\", pug.classes([\"status_icon\",\"clickable\",\"gridDetailsImage\",className + '-detail'], [false,false,false,true]), false, true)+\" type=\\\"button\\\" tabindex=\\\"0\\\" role=\\\"button\\\"\"+pug.attr(\"aria-label\", i18n.get('Grid_DetailsButtonText'), true, true)) + \"\\u003E\\u003C\\u002Fspan\\u003E\";}.call(this,\"className\" in locals_for_with?locals_for_with.className:typeof className!==\"undefined\"?className:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (ImportSourceAccountInfo, IsAmazonImport, IsFacebookImport, IsGoogleImport, IsPinterestImport, Type) {pug_html = pug_html + \"\\u003Cp\\u003E\" + (pug.escape(null == (pug_interp = Type) ? \"\" : pug_interp)) + \"\\u003Cbr\\u003E\";\nif (IsGoogleImport || IsFacebookImport || IsAmazonImport || IsPinterestImport) {\npug_html = pug_html + (pug.escape(null == (pug_interp = ImportSourceAccountInfo) ? \"\" : pug_interp));\n}\npug_html = pug_html + \"\\u003C\\u002Fp\\u003E\";}.call(this,\"ImportSourceAccountInfo\" in locals_for_with?locals_for_with.ImportSourceAccountInfo:typeof ImportSourceAccountInfo!==\"undefined\"?ImportSourceAccountInfo:undefined,\"IsAmazonImport\" in locals_for_with?locals_for_with.IsAmazonImport:typeof IsAmazonImport!==\"undefined\"?IsAmazonImport:undefined,\"IsFacebookImport\" in locals_for_with?locals_for_with.IsFacebookImport:typeof IsFacebookImport!==\"undefined\"?IsFacebookImport:undefined,\"IsGoogleImport\" in locals_for_with?locals_for_with.IsGoogleImport:typeof IsGoogleImport!==\"undefined\"?IsGoogleImport:undefined,\"IsPinterestImport\" in locals_for_with?locals_for_with.IsPinterestImport:typeof IsPinterestImport!==\"undefined\"?IsPinterestImport:undefined,\"Type\" in locals_for_with?locals_for_with.Type:typeof Type!==\"undefined\"?Type:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (dash, edit, recommendationText, runNow, showRecommendation) {if (edit) {\nif (showRecommendation) {\npug_html = pug_html + \"\\u003Cspan\" + (\" class=\\\"insight_icon import-recommondation icon-info clickable\\\"\"+\" data-toggle=\\\"tooltip\\\" tabindex=\\\"0\\\" data-trigger=\\\"manual\\\" data-placement=\\\"left\\\" role=\\\"button\\\"\"+pug.attr(\"aria-label\", recommendationText, true, true)) + \"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003Ca class=\\\"edit-task\\\" href=\\\"javascript:void(0);\\\"\\u003E\" + (pug.escape(null == (pug_interp = edit) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\nif (runNow) {\npug_html = pug_html + \"\\u003Cspan\\u003E | \\u003C\\u002Fspan\\u003E\\u003Ca class=\\\"run-now\\\" href=\\\"javascript:void(0);\\\"\\u003E\" + (pug.escape(null == (pug_interp = runNow) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}\n}\nelse\nif (runNow) {\npug_html = pug_html + \"\\u003Ca class=\\\"run-now\\\" href=\\\"javascript:void(0);\\\"\\u003E\" + (pug.escape(null == (pug_interp = runNow) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = dash) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}}.call(this,\"dash\" in locals_for_with?locals_for_with.dash:typeof dash!==\"undefined\"?dash:undefined,\"edit\" in locals_for_with?locals_for_with.edit:typeof edit!==\"undefined\"?edit:undefined,\"recommendationText\" in locals_for_with?locals_for_with.recommendationText:typeof recommendationText!==\"undefined\"?recommendationText:undefined,\"runNow\" in locals_for_with?locals_for_with.runNow:typeof runNow!==\"undefined\"?runNow:undefined,\"showRecommendation\" in locals_for_with?locals_for_with.showRecommendation:typeof showRecommendation!==\"undefined\"?showRecommendation:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (model, view) {pug_html = pug_html + \"\\u003Cdiv class=\\\"preference-upload-form panel form-horizontal\\\"\\u003E\\u003Cform class=\\\"preferenceupload\\\"\\u003E\\u003Cdiv class=\\\"panel-heading\\\"\\u003E\\u003Cdiv class=\\\"panel-title\\\" role=\\\"heading\\\" aria-level=\\\"2\\\"\\u003E\" + (pug.escape(null == (pug_interp = view.title) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"panel-body\\\"\\u003E\\u003Cdiv class=\\\"preference-upload-description\\\"\\u003E\\u003Cspan class=\\\"description-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = view.description) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Ca class=\\\"HelpTopic\\\" query=\\\"help:ext60175\\\" href=\\\"javascript:void(0);\\\" role=\\\"button\\\"\\u003E\" + (pug.escape(null == (pug_interp = view.i18n.getString('Learn_more_link_text')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"preference-upload preference-create\\\"\\u003E\\u003Cdiv\" + (\" class=\\\"uploadRow form-group\\\"\"+pug.attr(\"hidden\", model.hideFilePicker, true, true)) + \"\\u003E\\u003Clabel class=\\\"col-sm-3 control-label label-width\\\"\\u003E\" + (pug.escape(null == (pug_interp = view.i18n.getString('Import_PreferenceUpload_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003Cdiv class=\\\"col-sm-6 preference-upload-file-picker-placeholder\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-6\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = view.i18n.getString('Import_PreferenceUpload_AcceptFormat_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E \\u003Ca class=\\\"helpLink clickable download-template\\\" href=\\\"#\\\" role=\\\"button\\\"\\u003E\" + (pug.escape(null == (pug_interp = view.i18n.getString('Import_PreferenceUpload_SampleFile_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (\" class=\\\"progress-container\\\"\"+pug.attr(\"hidden\", !model.uploading, true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (\" class=\\\"preference-upload-summary-grid\\\"\"+pug.attr(\"hidden\", (!model.showSummaryGrid||model.uploading), true, true)) + \"\\u003E\\u003Ctable border=\\\"1\\\" bordercolor=\\\"#ddd\\\"\\u003E\\u003Cthead\\u003E\\u003Ctr\\u003E\\u003Cth\\u003E\\u003C\\u002Fth\\u003E\\u003Cth class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = view.i18n.getString('Import_PreferenceUpload_Preview_Success')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fth\\u003E\\u003Cth class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = view.i18n.getString('Import_PreferenceUpload_Preview_Error')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fth\\u003E\\u003C\\u002Ftr\\u003E\\u003Ctr\\u003E\\u003C\\u002Ftr\\u003E\\u003C\\u002Fthead\\u003E\\u003Cthead\\u003E\\u003C\\u002Fthead\\u003E\\u003Ctbody\\u003E\\u003Ctr\\u003E\\u003Ctd class=\\\"grid-cell-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = view.i18n.getString(model.status === view.PREFERENCE_UPLOAD_STATUS.Applied ? 'Import_PreferenceUpload_Preview_Item_Changes' : 'Import_PreferenceUpload_Preview_Expected_Item_Changes')) ? \"\" : pug_interp)) + \"\\u003C\\u002Ftd\\u003E\\u003Ctd class=\\\"grid-cell-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = model.successCount) ? \"\" : pug_interp)) + \"\\u003C\\u002Ftd\\u003E\\u003Ctd class=\\\"grid-cell-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = model.errorCount) ? \"\" : pug_interp)) + \"\\u003C\\u002Ftd\\u003E\\u003C\\u002Ftr\\u003E\\u003Ctr\\u003E\\u003C\\u002Ftr\\u003E\\u003C\\u002Ftbody\\u003E\\u003Ctbody\\u003E\\u003C\\u002Ftbody\\u003E\\u003C\\u002Ftable\\u003E\\u003Ctable\\u003E\\u003C\\u002Ftable\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (model.errorMessage != null) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"alert alert-warning\\\"\\u003E\\u003Cspan class=\\\"alert-image\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"errorMsg\\\"\\u003E\" + (pug.escape(null == (pug_interp = model.errorMessage) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (\" class=\\\"panel-footer\\\"\"+pug.attr(\"hidden\", model.uploading, true, true)) + \"\\u003E\";\nif (model.status === view.PREFERENCE_UPLOAD_STATUS.NotStart) {\npug_html = pug_html + \"\\u003Cinput\" + (\" class=\\\"upload-and-preview btn btn-primary\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", view.i18n.getString('Import_PreferenceUpload_Button_UploadAndPreview'), true, true)+pug.attr(\"disabled\", !model.isPreviewEnabled, true, true)) + \"\\u003E\\u003Cinput\" + (\" class=\\\"cancel btn btn-default\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", view.i18n.getString('Import_PreferenceUpload_Button_Cancel'), true, true)) + \"\\u003E\";\n}\nelse\nif (model.status === view.PREFERENCE_UPLOAD_STATUS.Previewed) {\npug_html = pug_html + \"\\u003Cinput\" + (\" class=\\\"apply-changes btn btn-primary\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", view.i18n.getString('Import_PreferenceUpload_Button_Apply'), true, true)+pug.attr(\"disabled\", !model.isApplyEnabled, true, true)) + \"\\u003E\\u003Cinput\" + (\" class=\\\"download-results btn btn-default\\\"\"+pug.attr(\"type\", (model.downloadPath === ''?'hidden':'button'), true, true)+pug.attr(\"value\", view.i18n.getString('Import_PreferenceUpload_Button_Download'), true, true)) + \"\\u003E\\u003Cinput\" + (\" class=\\\"cancel btn btn-default\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", view.i18n.getString('Import_PreferenceUpload_Button_Cancel'), true, true)) + \"\\u003E\";\n}\nelse\nif (model.status === view.PREFERENCE_UPLOAD_STATUS.Applied) {\npug_html = pug_html + \"\\u003Cinput\" + (\" class=\\\"download-results btn btn-primary\\\"\"+pug.attr(\"type\", (model.downloadPath === ''?'hidden':'button'), true, true)+pug.attr(\"value\", view.i18n.getString('Import_PreferenceUpload_Button_Download'), true, true)+pug.attr(\"hidden\", (model.downloadPath === ''), true, true)) + \"\\u003E\\u003Cinput\" + (\" class=\\\"close-panel btn btn-default\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", view.i18n.getString('Import_PreferenceUpload_Button_Close'), true, true)) + \"\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cinput\" + (\" class=\\\"cancel btn btn-primary\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", view.i18n.getString('Import_PreferenceUpload_Button_Cancel'), true, true)) + \"\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fform\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"model\" in locals_for_with?locals_for_with.model:typeof model!==\"undefined\"?model:undefined,\"view\" in locals_for_with?locals_for_with.view:typeof view!==\"undefined\"?view:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, isResponsiveAdForSSCEnabled, isStoreNotValid, scenario) {\n\n\n\nif (scenario === 'creation') {\npug_html = pug_html + \"\\u003Ch1\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('SmartShoppingCampaign_Header_Title')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fh1\\u003E\";\n}\nif (isStoreNotValid) {\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('ShoppingCampaign_NoBMCAccount_Message')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Ca class=\\\"bmc_url_link\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('ShoppingCampaign_BmcURL_Text')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fa\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003C!-- koErrors--\\u003E\\u003Ch3 class=\\\"type-bold campaign-settings-title\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('ShoppingCampaign_CampaignSetting_SectionTitle')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fh3\\u003E\\u003Chr\\u003E\\u003Cdiv class=\\\"campaign-settings\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Ch3 class=\\\"type-bold\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('ShoppingCampaign_ShoppingSetting_SectionTitle')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fh3\\u003E\\u003Chr\\u003E\\u003Cdiv class=\\\"shopping-settings\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Ch3 class=\\\"type-bold\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('SectionTitle_CampaignTargeting')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fh3\\u003E\\u003Chr\\u003E\\u003Cdiv class=\\\"campaign-targeting clearfix\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (scenario === 'creation') {\nif (isResponsiveAdForSSCEnabled) {\npug_html = pug_html + \"\\u003Ch3 class=\\\"type-bold\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('SectionTitle_ResponsiveAd')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fh3\\u003E\\u003Chr\\u003E\\u003Cdiv class=\\\"responsive-ad clearfix\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}\nelse {\npug_html = pug_html + \"\\u003Ch3 class=\\\"type-bold advaced-settings-title\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('SectionTitle_AdvancedSettings')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fh3\\u003E\\u003Chr\\u003E\\u003Cdiv class=\\\"advanced-settings clearfix\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"conversion-goal-section\\\"\\u003E\\u003Ch3 class=\\\"type-bold\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Campaign_Goals_Section_Title')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fh3\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Campaign_Goals_Help_Text')) ? \"\" : pug_interp)) + (pug.escape(null == (pug_interp = ' ') ? \"\" : pug_interp)) + \"\\u003Ca class=\\\"HelpTopic\\\" href=\\\"javascript:void(0);\\\" query=\\\"help:app54814\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('LearnMoreLinkText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003Cdiv class=\\\"conversion-goal-selection\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"save-bar form-group create-smart-shopping-campaign-save-bar\\\"\\u003E\";\nif (!isStoreNotValid) {\npug_html = pug_html + \"\\u003Cinput\" + (\" class=\\\"btn-save btn btn-primary\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", i18n.get('ShoppingCampaign_Button_Save'), true, true)) + \"\\u003E\";\n}\npug_html = pug_html + \"\\u003Cinput\" + (\" class=\\\"btn-cancel btn btn-default\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", i18n.get('ShoppingCampaign_Button_Cancel'), true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"isResponsiveAdForSSCEnabled\" in locals_for_with?locals_for_with.isResponsiveAdForSSCEnabled:typeof isResponsiveAdForSSCEnabled!==\"undefined\"?isResponsiveAdForSSCEnabled:undefined,\"isStoreNotValid\" in locals_for_with?locals_for_with.isStoreNotValid:typeof isStoreNotValid!==\"undefined\"?isStoreNotValid:undefined,\"scenario\" in locals_for_with?locals_for_with.scenario:typeof scenario!==\"undefined\"?scenario:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;pug_mixins[\"koErrors\"] = pug_interp = function(id, cssClass){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cul\" + (pug.attr(\"class\", pug.classes([cssClass ? cssClass : 'alert alert-danger'], [true]), false, true)+\" data-bind=\\\"visible: errors().length > 0, foreach: errors, attr: {"aria-hidden": errors().length == 0}\\\"\"+pug.attr(\"id\", id ? id : 'KoErrors', true, true)) + \"\\u003E\\u003Cli\\u003E\\u003Cdiv data-bind=\\\"html: $data\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\";\n};\npug_mixins[\"koErrors\"]();\npug_html = pug_html + \"\\u003Cdiv class=\\\"update-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, learnMoreId, messageDetails) {pug_html = pug_html + \"\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = messageDetails) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\nif ((learnMoreId)) {\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"HelpTopic\\\"\"+pug.attr(\"query\", learnMoreId, true, true)+\" href=\\\"javascript:void(0);\\\"\") + \"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Learn_more_link_text')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"save-bar form-group\\\"\\u003E\\u003Cinput\" + (\" class=\\\"btn btn-default\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", i18n.getString('Button_Ok'), true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"learnMoreId\" in locals_for_with?locals_for_with.learnMoreId:typeof learnMoreId!==\"undefined\"?learnMoreId:undefined,\"messageDetails\" in locals_for_with?locals_for_with.messageDetails:typeof messageDetails!==\"undefined\"?messageDetails:undefined));;return pug_html;};\nmodule.exports = template;"],"names":["defaultIconClasses","getIconClass","extension","AppPlatform","getMediaUrl","mediaUrl","MediaUrl","adExtensionConfig","config","get","AdExtension","AppExtensionIconBaseUrl","indexOf","$url","universalItemTemplate","arg0","rawItemTemplate","extend","i18n","window","globalLegacyI18n","ViewModel","_createClass","options","_this","_classCallCheck","this","scope","ko","campaignId","adGroupId","adgroupId","scopes","entitySelectorService","i18nKeys","showCampaigns","entityType","showAdGroups","showSelector","maximumSelectedEntities","predicates","campaign","predicate","CampaignType","adgroup","operand","operator","value","toggleEditor","showEditor","scopeContext","isMultiSelect","showSelection","subtitle","multiSelectSubtitle","selectedItemsLimit","maxDisplayedEntities","remainingItemsText","campaignAdgroupLimitText","count","length","isEditMode","selectedCampaigns","selectedAdgroups","subscribe","newCampaign","_","Id","campaignName","Name","name","adGroupName","current","newCampaignId","newAdgroup","Campaign","newAdgroupId","CampaignAdgroupSelectorI18n","campaignFilter","adgroupNoHotelFilter","View","_Backbone$View","_callSuper","arguments","_inherits","key","editorOptions","undefined","defaultOptions","editTitle","editLabel","IsBulkAdExtensionAssociationAllowed","extensionCampaignTypeCheck","scopeService","getScope","ko_model","Number","editor","AssociationEditor","hasSubTitle","showErrorsInline","adgroupName","isNewEntitySelector","show","_this2","$el","html","templateNew","selectorView","proxy","createCampaignView","i18nHotelCenter","render","createCampaignAdgroupView","currentCampaignFilter","currentAdgroupnFilter","pageContext","Permissions","dynamic","PerformanceMaxCampaigns","pmaxSupportedExtentions","adExtensionType","UnifiedAppAds","appSupportedExtensions","HotelCampaign","hotelSupportedExtentions","concat","CampaignSelectorProxy","onSelectDone","selectedCampaign","jsData","jsdata","edmCampaign","withUiBlocker","uiBlockContainer","withUiBlock","isMultiMode","optionalCampaignFilter","optionalAdgroupFilter","getCampaignSelectorView","AdgroupSelectorProxy","selectedAdGroup","getAdgroupSelectorView","CampaignAdgroupSelectorProxy","onCampaignSelect","onAdGroupSelect","onMultiSelectedDone","getCampaignAdgroupSelectorView","$","append","el","find","newScope","trigger","newScopes","on","param","isEdit","undelegateEvents","empty","remove","Backbone","i18nGlobal","ImageAdExtensionSchema","globalLegacySchema","odataToken","odataPath","odataRootUrl","permissions","IsAADUser","PageContext","_permissions$dynamic","_permissions$dynamic2","OptionalDisplayTextForSingleImageAdExtensions","ImageFittingForImageAnnotation","ImageFittingForImageExtension","ImageFittingExlcudeMAE","ImageFittingUnifiedImageROI","IsTransparentImageAnnotationEnabled","oDataConfig","oDataPath","oDataToken","ExtensionEditor","_backbone$View","perfMarker","PerfMarkerFactory","createMarker","autoEnd","willInit","createNew","isRecommendation","recommendation","AltText","DisplayText","Description","DestinationUrl","ImageUrl","MobileFinalUrls","FinalUrls","UrlCustomParameters","TrackingUrlTemplate","Images","Scheduling","EligibleLayout","SingleAndMulti","_objectSpread","systemGenerated","SourceType","readOnly","Unset","Single","viewModel","_createViewModel","extensionsRepo","ImageAdExtensionsRepository","schema","isFinal","url","upgradedUrlView","UpgradedUrl","finalMobileUrl","trackingTemplate","finalUrlSuffix","FinalUrlSuffix","customParameters","urlOptionsEnabled","isMobilePreferred","placeholderEnabled","useUrlOptionsV2","landingPageUrlRequired","showUurlTestTool","destinationURLDisabled","subscribeToUrlChanged","callback","urlEditor","setFullUrl","fullUrl","setError","errorStr","schedulingView","SchedulingView","labelClass","controlClass","model","imageList","isImageFittingEnabled","aid","targetAccountId","state","cid","AdvertiserCustomerID","promise","Promise","getAssetEnhancementSettings","then","result","AssetAIEnhancementOptout","assetEnhancementSettingsPromise","imageListLoadPromise","dataModelUtil","getImageListFromMTImagesAsync","hasImageUrl","getAutoCroppedImages","originalImageToCrop","Width","Height","Text","IdString","Src","ImageSourceStr","StockImages","ThumbnailURL","WebsiteImages","ImageURL","isRecommendedImage","onImageListChanged","bind","template","creatorTemplate","editorTemplate","imageAspectRatios","newI18n","renderExtensionImagesControl","replaceWith","_this3","imagesControlOptions","odata","genericImage","image191to1","text","isForVNext","isStockPhotoEnabled","instrumentation","preferencesService","setImageControlSetText","imageControlSetText","setImageControlSetEligibleLayout","imageControlSetEligibleLayout","setImageControlsValidate","imageControlsValidate","serverContext","CurrentCustomer","CurrentAccount","Token","imagesControlNode","React","props","_jsx","ServerContext","Provider","children","ExtensionImagesControl","ReactDOM","onDisplayTextUpdated","displayText","onEligibleLayoutUpdated","eligibleLayout","imageExperienceView","_superPropGet","_this4","id","errorMessages","handleErrors","_handleErrors","existingExtension","displayTextIsValid","altTextInternal","altTextIsValid","shouldAltTextMatchDisplayText","description","destinationUrl","error","save","_add","_update","apply","applyRecommendation","newImageExtensionInfo","AlternativeText","altText","FinalURL","getValues","finalUrl","MobileURL","mobileUrl","isValid","validate","cancel","_cancel","_modelIsValid","isSingleEligible","isMultiEligible","Multi","read","isEligibilityValid","write","newValue","clearAllErrors","getImagesFromImageList","ImageIds","map","assetLink","Asset","toObject","_this5","extensionData","_getDataForSave","update","savedExtension","fetchedExtension","finally","_this6","create","newExtension","createdExtension","displayTextToValidate","trim","altTextToValidate","schedulingValid","finalUrlTestRegEx","RegExp","mobileUrlTestRegEx","urlErrors","finalUrlUrl","test","push","getString","handleApiErrors","urlViewIsValid","imagesValid","errors","errorMsgList","toString","backbone","moreCount","size","data","TableRows","slice","moreString","convertCurrencyCode","getUseTotalsPlugin","_ref$dynamic","AdExtensionsAudienceAdsTotals","PerformanceMaxCampaignsPhaseTwoCrossNetwork","showAdExtensionRejectionReasons","type","overrideAssociationType","BidataNotRequired","event","adextension","_ref","extensionId","version","args","App","cmpid","adgid","replace","queryify","_url","setUrlParameter","ajaxPost","ignoreBeforeAjax","dataType","onSuccess","Callback","onsuccessEventData","rowId","AdExtensionDeliveryStatusPopupFactory","_DeliveryStatusPopupF","_ref2","grid","_ref2$overrideEntitie","overrideEntities","_ref2$overrideAssocia","_ref2$BidataNotRequir","showAdExtensionRejectionReasonsHandler","handler","entityMap","AdGroup","getEventTargetModel","Version","DeliveryStatusPopupFactory","adextensionGridColumn","bingadsGridColumn","sortable","title","helpId","bodyClasses","property","userProperty","item","$total","userTemplate","local","totalsTemplate","SiteLinks","adGroupI18n","isNewUI","isDSAMixedModeCampaignEnabled","_ref$supportCashbackS","supportCashbackSettings","koSchema","properties","dataLoaded","hideLanguage","campaignType","AdGroupType","shouldShowAdGroupType","languageString","keyToUse","Language","adGroupTypeString","enableLanguageSelection","showHighLatencyAlert","backRouteName","isArabicEnabled","IsArabicLanguageEnabledInMultipleLanguage","isSimplifiedChineseEnabled","IsSimplifiedChineseLanguageEnabledInMultipleLanguage","isSponsoredPilotEnabled","IsSPAv2Enabled","isManualBiddingDeprecationEnabled","IsManualBiddingDeprecationEnabled","IsDSAMixedModeCampaignEnabled","adGroupScopePerfMarker","createChild","mark","router","deps","CurrentCampaign","isMSStoreAdsGAWorkflow","isMSStoreAdsCampaign","navigateToRoute","scenario","activity","adGroupSettings","dynamicPermissions","showDisclaimerBanner","isMranEcpcEnabled","isMranTroasEnabled","locationTargetsView","LocationTargetsView","level","CurrentAdGroup","popupIds","Location","showInitialUiBlocker","showPhysicalIntentView","physicalIntent","physicalIntentOptions","PeopleIn","languageLocationConnector","LanguageLocationConnector","bidView","advancedSettingsView","adDistributionView","viewmodel","useCampaignSettings","setLanguageSet","languages","adDistribution","syndEnum","BingYahooAndSearchPartners","isSyndicationAllowed","AdvancedSettingsView","nativeAdsCampaignBid","NativeBidAdjustment","nativeAdsAdgroupBid","multimediaAdsCampaignBid","MultiMediaAdBidAdjustment","multimediaAdsAdgroupBid","Languages","TimeZone","campaignSubType","isSponsoredCampaign","campaignBiddingStrategy","BiddingScheme","Type","campaignAdScheduleUseSearcherTimeZone","AdScheduleUseSearcherTimeZone","isSPBCampaign","CampaignCashback","IsPromotionsForBrands","AdDistribution","CampaignSubType","showCpgAdGroupType","Settings","BidOption","biddingStrategyView","BiddingStrategyView","biddingStrategyType","campaignBiddingStrategyType","biddingStrategyTypes","costPerSale","notShowBidView","hide","BidView","showTrafficEstimation","resetIsAutoBidding","enableArabic","enableSimplifiedChinese","withInheritOption","i18nStrings","SaveWarning","language","IsAdsGlobalizationPhase1Enabled","IsAdsGlobalizationPhase2Enabled","IsAdsGlobalizationPhase6Enabled","IsAdsGlobalizationPhase2JapanEnabled","IsDomesticSimplifiedChineseEnabled","IsAdsGlobalizationPhase9Enabled","IsAdsGlobalizationPhase9VIEnabled","languageSelector","LanguageSettingView","eventDispatcher","newLanguage","cpgAdGroupType","AdGroupBidType","cpgBidSection","CpgBidSection","adGroupTargetInfo","AudienceTargetInfo","resourceName","listenToLocationCriterion","useLocationControl","initAudienceAssociationView","campaignTargetInfo","fetchCriterions","adGroupTargetsView","AudienceAdvancedTargetSettings","viewContext","accountCurrencyCode","AccountCurrencyCode","currentCampaign","currentAdGroup","currentLevelTargetInfo","parentLevelTargetInfo","initialLoadTask","CashbackPercent","CouponsEnabled","CashbackScope","ParentLevelCashbackPercent","ParentLevelCashbackScope","ParentCouponsEnabled","cashbackSettingsView","CashbackSettings","showCashbackBudget","showEnableCashbackSettingsCheckbox","showInheritFromParentOption","isCashbackScopeReadonly","showCoupon","decimal","validateCashbackPercent","formattedValue","fromLocalToFloat","toggleCashbackPercentColumns","adScheduleView","isShowDisclaimerBannerEnabled","hideUIBlocker","uiBlocker","entitySet","AdGroups","bypassCache","queryParameters","currentAccount","Campaigns","expand","loadMap","shouldSupportCashbackSettings","mutableModel","MutableModel","context","memo","mutables","Medium","hasChanges","AdRotation","RotationType","SearchBid","ContentBid","setModel","initCashbackSettingsView","renderLanguageSelector","renderCpgAdGroupType","renderBidView","i18nNewDesign","renderBiddingStrategy","addEventListener","renderAdvancedSettings","medium","renderLocationTargets","renderAdGroupTargets","add","catch","logger","logMessage","constants","LOGCATEGORY","TRACE","LOGLEVEL","INFO","JSON","stringify","val","checkIMAReachPromise","adGroupCriterions","getLocationCriterion","changedLocationCriterions","CriterionType","hasLocationChanged","locationCriterions","getAllAdGroupLocationCriterion","IsIMAReachRepresentationPhase1Enabled","locationsInfo","getLocationsInfo","showIMAReachModal","onYes","deliveryChannel","isIMAReachModalShow","locationTargets","keepAllLocations","locations","c","Status","campaignCriterions","inheritInfo","getLocationsInfoFromCampaignCriterions","intent","adGroupTargetsData","getAllLocations","adGroupCriterionsWithoutIntent","getCampaignLocationCriterions","overrideInfo","deletedLocations","getData","adGroupTargetsCriterions","clearApiErrors","params","isCostPerSaleCampaign","advancedSettings","targets","deviceTargets","ageTargets","genderTargets","scheduling","target","AdGroupCriterions","urlOptions","netWorkOptions","adRotation","dateSettings","nativeAds","multimediaAds","adScheduleUseSearcherTimeZone","set","getIncremental","chunks","groupBy","index","Math","floor","toArray","batchedParams","reqs","batch","adapter","cacheResponse","overrideResponse","processResponse","responses","mergedAdGroupCriterions","dest","res","response","setData","logAdGroupPersonalizedOffers","signal","exclusionsUpdated","saveExtensions","summaryDataContextManager","getContext","CampaignId","AccountId","Bidding","campaign_id","adgroup_id","clear","i18nErrors","entity","adgroupErrors","handleApiErrorsForAdGroupLevel","stopListening","perfMarkerEvent","audiencesi18n","AudienceBaseColumn","_ProjectionGridBaseCo","Column","helpAriaLabel","Property","columnConversion","ProjectionGridBaseColumn","selectedCampaignId","selectedAdgroupId","campaignSettings","DataStore","findStrictCache","isEmptySelector","columns","column","headerTemplate","containerType","headerBuilder","columnInfo","isSubHeader","subColTitle","label","$orderby","dir","popupId","formatDate","date","dateUtil","format","formatDateForGridDataParameters","gridConfig","sortInfoKey","getPromise","fetchPaginationConfig","getCustomColumnsPreference","getSegPreference","spread","dateRange","queryConfig","pageSize","orderbyInfo","sortableHeader","pageable","isDataFetchManagerSource","query","dataSource","plugins","gridDataParameters","CustomColumns","DateRange","StartDate","start","EndDate","end","compared","ComparisonDateRange","gridData","edm","$call","toJSON","pagination","endDate","startDate","endDate2","startDate2","comparisonEndDate","comparisonStartDate","segType","getSegType","segmentationType","segmentTimeChecker","isTimeRangeValid","SegmentationTypes","orderby","formatDateInQuery","formatDateInEntitySet","parseDate","dateString","parse","defaultComparisonColumns","definePlugin","gridView","events","pluginConfig","_pluginConfig$compari","comparisonColumns","originalQuery","currentDateRange","queryParams","isOdataActionSource","select","root","identifyEntitySet","action","navigation","source","RangeStartDate","RangeEndDate","parameters","changeEntitySet","addDateRangeToQueryParams","call","views","Summary","bindDateFilterChangeHandler","e","newDateRange","firstRange","secondRange","convertForComparison","range","dates","comparedStart","comparedEnd","dateRangeEquals","refresh","getCurrentDateRange","p$getCurrentDateRange","defineGridPlugin","_ref$method","method","_ref$contexts","contexts","path","putil","headers","_defineProperty","contextsToUpdate","union","legacyGridName","compact","updateContext","s$i18n","withoutColumns","names","reject","contains","getAriaLabelTextTemplate","getPerformanceMetrics","helpAriaLabelTextTemplate","_config$get","IsViewThroughConversionEnabled","IsViewThroughConversionsRevenueEnabled","_config$get$dynamic","IsPartialConversionsEnabled","PartialConversions","IsColumnConversionEnabled","ColumnConversion","usePartialConversions","sourceColumnName","sourceSortableProperty","targetSortableProperty","_toConsumableArray","getDeliveryStatus","DeliveryStatus","GeoCodeStatus","ret","deliveryStatus","status","GeoStatus","hasGlyph","getDeliveryColumn","isEmpty","Delivery","deliveryStatusTemplate","DeliveryTemplates","IsAppealable","getEntityColumns","statusIconColumnTemplate","pick","IsDeleted","defaults","Performance","Conversions","applyPartialConversionColumnName","getColumnChooser","choosers","appendList","blackList","clone","chain","difference","getPerformanceColumnChooser","getConversionsColumnChooser","combinedBlackList","getSharedColumns","filter","performanceMetrics","biColumns","getSharedCustomizedColumns","items","pluck","each","ariaLabel","verification","isNumber","customizedTemplate","parentName","BaseCampaignName","associationType","isDeleted","legacyGlobalI18n","schemaI18nCampaign","appConfig","stateManager","getCreatedBy","getFrequency","getExpression","getNotificationType","getEditLink","jsdataCampaign","preferenceService","sessionStore","getFilters","cacheService","dataContextManager","customColumnPreference","noData","getDateTime","offset","getTimezoneOffset","offsetStr","kendo","abs","taskItem","modifiedBy","ModifiedBy","modifiedAt","Date","ModifiedAt","datetime","Cron","cronString","timeZone","cronParser","hourString","hour","year","month","dayOfMonth","frequency","ONCE","toLocaleDateString","MONTHLY","WEEKLY","dayOfWeek","DAILY","HOURLY","TimeZoneId","Selection","DateRangePreset","toLowerCase","NotificationType","ruleAuthoringOptions","emailOptions","OnChangeOrError","tempModel","JobModel","desc","odataParser","getRuleSelection","summary","Actions","isEmailRule","getJobDescription","actionName","State","getStartTime","jobModel","getDescription","targetTab","queryParts","getScopeCallback","routeArgs","routeUrl","gridFilterSerializer","fromDescription","entityObj","FilterExpressions","toQueryString","ID","navigate","join","router_new","legacy_tab_to_url","getSelection","vnextInfo","selection","getJobSelection","scopeCallback","idBased","header","footer","isForVnext","entityToObject","entityKey","keys","values","getCampaignLink","getUiNextCampaignLink","_scope$values","getAdgroupLink","AdGroupId","AdTitle","AdType","subPath","getUiNextAdgroupLink","_scope$values2","entityKeyMap","getEntityKeyField","getEntityWrapper","entityKeyField","bulkEditResult","EntityKey","entityName","moreTitleHint","dictionary","AdHeadlines","getTitlePreviewFromJson","getMoreTitleHintFromJson","CampaignName","adGroup","AdgroupName","getEntity","keyword","Keyword","ad","normalizeErrorMsg","origin","msg","includes","splitStr","charAt","toUpperCase","splitErrorMsg","getStatusText","mapEntityErrors","success","HasError","Errors","attemptedValue","attempted","formatEntityValue","Changes","getCopyPasteStatusText","getResultValue","isNew","isCopyPaste","campaignUrl","campaignAriaLabel","adGroupUrl","adGroupAriaLabel","getOldValue","getNewValue","hasStore","isStoreValid","showGoalRemoveAlert","isEnabledDynamicFeedCampaign","IsEnabledForDynamicFeedCampaign","isCPGForBSCEnabled","IsCPGForBSCEnabled","isBSCSmartImportEnabled","IsBSCSmartImportEnabled","isPredictiveMatchingEnabled","PredictiveMatching","campaignScopeAllSettingsPerfMarker","isMMAForRetailEnabled","IsMMAForRetailEnabled","ccJsData","activityLogger","providerId","setting","ProductCollectionAccounts","store","Value","isAudienceDynamicFeedBasedCampaign","editMode","shouldShowPlaceholderStoreIfExists","campaignProductScopeId","CampaignCriterionsData","hasAnyStores","IsGlobalStore","IsCoOpStore","checkIfStoreValid","shoppingSettingsView","ShoppingSettingsView","isSponsoredSettings","isSearchCampaign","isMMAForRetailWorkflow","uid","urlQueryStringObject","Product","isNotAudienceCampaign","audienceTargetInfo","loadCriterionsTask","campaignTargetsView","createView","loadBudgetTask","budget","isSPA","isCPS","PersonalizedOffersEnabled","MonthlyBudget","goalSelectionView","GoalSelectorView","realI18n","isHideSaveBar","turnOnRemoveAlert","shouldShowWarning","checked","CampaignSettings","CreateView","showLanguage","usePanel","renderConversionGoalSelection","isEnablePersonalizedOffersChecked","onEnablePersonalizedOfferCheckboxChange","onCashbackPercentChange","selectedBidStrategy","onSelectedBidStrategyChange","renderCampaignTargets","getProductData","renderShoppingSettings","hasFilteredProducts","CampaignProductScope","destroy","parentId","advancedSettingsValues","AutoTargetingEnabled","criterion","hasValidStore","isFeedProductFilterEnabled","isFeedFilterChecked","FeedLabel","SalesCountry","getProductScope","ProviderId","campaignTargetsData","campaignTargetsCriterions","CampaignCriterions","automatedCTA","vanityUrlSettings","CampaignConversionGoalAssociations","convertToMTFormat","allLocations","getParams","getAllLocationCriterions","mergedCampaignCriterions","createScenarioAndActivity","scenarioName","activityName","showBudgetBidCampaignNotifications","campaignItemList","oldBudget","Budget","newBudget","oldBidStrategy","newBidStrategy","logCampaignPersonalizedOffers","saveTargetingSource","destroyProductScoeIfNeed","Amount","toFixed","trace","DomainName","Source","LanguageCode","DynamicDescriptionEnabled","tasks","_this5$createView$get","getLocationRecommendationsStatus","targetedLocationRecommendations","dismissedLocationRecommendations","httpUtils","odataOptions","host","BingAdsAdInsightWebApiUri","SessionId","customerId","accountId","recommendationType","channel","applyRecommendations","recommendations","dismissRecommendations","processItems","hasOwnProperty","subEntity","campaignErrors","scrollToErrors","scrollUtils","errorElements","campaignGoalSeletorView","adScheduleModel","showDateSettings","needRestore","eventDelegator","criterionLoader","campaignTargets","formattedDayTimeRanges","formatLoadedCriterions","renderSubViews","_ref$adScheduleModel","_adScheduleModel$dayT","dayTimeRanges","renderLocationTargetsView","renderAdScheduleView","criterions","String","Criterion","BidAdjustment","OriginalBidAdjustment","DayTimeCriterion","_this$locationTargets","_this$adScheduleView","_len","Array","_key","hideAudience","setLocationData","existingLocations","targetOption","targetOptions","bundleOrDefaultMarket","splits","split","day","adDayTimeRanges","schedulingRows","Day","StartHour","FromHour","StartMinute","FromMinute","adSchedulingOptions","minuteToReadMap","EndHour","ToHour","EndMinute","ToMinute","_this$options","_this$options$showDat","formatModel","adGroupStatus","formatSchedulingRows","AdScheduleView","showBidAdjustmentColumn","timeZoneMapper","getAccountTimeZone","deletedDayTimeCriterions","currentCampaignId","getPropertyValidationErrors","locationTargetsData","populateParentField","removeNegativeId","deletedDayTimeCb","adDateSetting","getDateSettings","hasEndDate","getAdScheduleUseSearcherTimeZone","cloneDeep","AccountListView","_DeterministicView","footerText","setState","accountListTemplate","DeterministicView","isActiveTrackingStatusForUet","isActiveTrackingStatusForGoals","showTrackingStatusDetails","className","isActiveTrackingStatus","trackingStatusMessagePrefix","customTitle","customExtensionEntranceText","a11yIdPrefix","PopoverView","position","positions","relativeToTableRow","marginBottom","height","setContent","contents","TitledContent","setTitle","setBody","trackingStatusPopoverTemplate","helpLinkTemplate","troubleshootTopic","TrackingStatus","a11yId","suffix","testType","DeliveryStatusToCategoryMap","globalConfig","Eligible","AdGroupAudienceAssociationPaused","AdGroupAudienceAssociationExcluded","AdGroupCriterionPaused","AdGroupCriterionExcluded","New","EditorialApprovedLimited","EditorialApprovedLimitedAppealRejected","LowSupply","LowQuality","NegativeKeywordConflicts","BidBelowFirstPageBid","BudgetSuggestions","AutoBiddingLimitedByNotEnoughConversions","AutoBiddingLimitedByNotEnoughRevenue","AutoBiddingLimitedInventoryLimit","AutoBiddingLimitedMaxCPCRestriction","AutoBiddingLimitedBudgetRestriction","AutoBiddingLimitedUnAttainableTarget","AutoBiddingPortfolioBidStrategyTrainingStatus","AutoBiddingLearning","CreditCardExpired","IOExceeded","PaymentInformationMissing","InvalidFinancialStatusOther","CampaignSuspended","CampaignBudgetPaused","DomainLanguageNotSupported","AdGroupExpired","EditorialRejected","EditorialAppealRejected","CampaignDeleted","StoreIdNotAssociated","AdGroupTargetingTooNarrow","VideoExtensionVideoProcessingFailed","VideoExtensionVideoTooSmall","VideoExtensionVideoAspectRatioInvalid","VideoExtensionVideoDurationInvalid","VideoExtensionThumbnailProcessingFailed","VideoExtensionThumbnailTooSmall","VideoExtensionThumbnailAspectInvalid","CampaignUserPaused","AdGroupUserPaused","AdGroupDraft","AdGroupPrivacyPending","AdUserPaused","EditorialPending","AssociationDeleted","KeywordUserPaused","EditorialUnderAppeal","UrlInvalid","ApplicationNotFound","ApplicationDestinationUrlMismatch","PendingMetadataSync","ProductTargetUserPaused","AdExtensionDeleted","AdExtensionAssociationDeleted","AdNotPresent","AdNotActive","VideoExtensionProcessing","updateDeliveryStatusOptionForFilter","deliveryStatusOption","enumSet","mockI18n","_getDeliveryStatusCat","groupedItems","enumSetToUse","localized","categoryEnumValuesMap","enumValue","enumValues","category","mappedValues","mapEnumValueForFilter","categoryName","itemLocalized","getDeliveryStatusCategoryForFilter","enum","operators","selectionConfig","enabled","headClasses","goalInPilotingMap","OfflineConversionGoal","InStoreTransactionGoal","MultiStageGoal","getErrorMessage","errorCode","defaultMessage","TagWithSameNameAlreadyExistsUnderCustomer","InvalidTagName","TagNameNullOrEmpty","InvalidTagDescription","MaxUetTagPerCustomerLimitReached","CustomerUnderMigration","SharedLibraryUserPermissionDenied","UpdateFailedForIsClarityTagEnabled","cleanAlerts","alertIds","alertId","alertCenter","dismiss","processTypeEnumForGoals","propertyName","filterEnumValuesFromProperty","processTypeBooleanForGoals","chooseType","IsAccountLevel","parseConversion","parseInt","deParseConversion","minutes","tempPeriod","Minutes","Hours","days","hours","Error","getConversionWindowPeriodInMinutes","getDefWithAccountInfo","goalItem","accountInfo","CurrentUser","isInternalUser","IsInternalUser","CCBaseUrl","showUnAssignedDetails","htmlContent","getColumnChooserConfig","columnConfig","_ref$permissions","columnConversions","getColumnConversions","columnNames","locked","categories","startsWith","_ref3","selectOption","_ref4","_ref5","selected","customToolbarIcon","Columns","ColumnsResource","SelectedColumns","SelectedColumnsResource","getConversionWindow","lookbackWindowInMinutes","windowInMins","hrs","mins","getColumnConfig","_ref7","newi18n","isViewThroughConversionEnabled","IsUETDashboardEnabled","UETDashboard","IsAllowAutoGoalWizard","AllowAutoGoalWizard","_ref8","tag","statusTemplate","isReadOnly","IsReadOnly","_ref9","goal","nameTemplate","goalName","showGoalSuggestion","goalSuggestionAriaLabel","isNonSupportGoal","isAutoGoal","IsAutoGoal","_ref10","smartGoalTemplate","_ref11","_ref12","acctname","Title","_ref13","_ref14","ConversionCountType","_ref15","LookbackWindowInMinutes","_ref16","unassigned","categoryColumnTemplate","_TL_","_ref17","attributionModelTypeStr","_ref18","_ref19","_ref20","_ref6","tagIdTemplate","getTagIdLink","_ref21","trackingStatusTemplate","_ref22","GoalValueType","revenueTemplate","GoalPerformanceMetrics","Revenue","getTimeZoneForDateRangeText","_bingads_webui_component_legacy_timezonemapper_index","PerfDataExplanationView","stampNotes","appendLearnMoreLink","accountTimeZoneText","locals","explanationTemplate","perfDataExplanationPlugin","perfDataExplanationView","appendFootRows","view","classes","GridConfig","preferenceConfig","_ref$options","customHeaderOffset","viewport","tableName","gridName","Goal","primaryKey","Goals","$expand","scrolling","attributes","virtualized","tableClasses","tableAttributes","rows","headRows","helpers","singleToolbarHeadRows","directionIndex","sortableHeaderTemplate","single","validateOrder","ConversionGoalsGrid","_DeterministicWrapper","initializeInstrumentation","$blocker","pgridFactory","pluginFactories","_ref$extendPlugins","extendPlugins","filterService","showPopup","setShowAutoGoalDrawer","resource","isInitialGrid","defaultPlugins","columnChooserConfig","plugin","perfMarkerPlugin","marker","a11yPlugin","assistedSelectionPlugin","dateFilterPlugin","performanceLogPlugin","columnChooserPlugin","paginationPlugin","availablePageSizes","enableRandomPage","pageNumberLabelText","pageSizeText","totalPageCountText","resetPageNumberOnSort","uiBlockerPlugin","placeholderPlugin","container","filteredContainer","filteredEmptyText","ignoreFilters","$in","toolbarPlugin","singleToolbar","onClick","disabled","button","menu","selectedItems","fromGoalEdit","iconLeft","updateAllStatus","getDefaultPlugins","extendedPlugins","toolbar","gridToolbarGroup","toolbarWithName","DEFAULT_TOOLBAR_NAME","changes","handleSortChange","listenTo","updateGridQuery","getCombinedFilter","itemOfElement","navigateToGoalEditingPage","goalId","notificationApi","severity","NotificationLevel","message","navigateToTagIdPage","tagId","Tag","TagViewer","script","TrackingCode","stopPropagation","updateStatusView","itemToUpdate","ViewThroughLookbackWindowinMinutes","UpdateStatusView","extendData","afterChange","err","errCode","responseJSON","Code","ejectAll","beforeRemove","triggerQualtricsEvent","stateWhitelist","closest","scenarios","testConversionGoals","activities","clickOnGoalBulbIcon","clickOnTestThisGoalFromGoalBulbPopup","clickOnTestThisGoalFromTrackingStatusPopup","monitor","relatedTarget","onShowTrackingStatusPopover","testGoalClickActivity","isUnverifiedOrInactive","isNoRecentConversions","isTrackingStatusColumn","contentView","isInPilot","IsConversionAdvisorEntryLinkEnabled","isUETDashboardEnabled","isClarityGoal","ClarityEventDefinitionId","delegateEvents","goalDef","startConversionAdvisor","containerSelector","parentView","popoverClassName","goalItemWithAccountInfo","popupMessage","unassignedCategoryPopoverTemplate","unassignedRevenuePopoverTemplate","smartGoalTypePopoverTemplate","goalReadOnlyPopoverTemplate","selectedItem","afterUpdate","initializeCombinedFilterPromise","DeterministicWrapperView","UETTagsGridDashboardTestConfig","fetchCustomerHierarchy","windowNameStorage","Storage","currentUser","parentCustomerId","ParentCustomerId","currentCustomer","loginCID","IsInternal","fetchCustomerHierarchyPromise","ClientCenterCustomerService","ccBaseUrl","getCustomerHierarchy","returnOnlyDirectlyLinkedEntities","fetchUserPermissionPromise","customerHierarchy","customerHierarchyEntities","currentCustomerId","SharedLibraryUtils","UETTagsDashboardGridTest","_ref$isManagerDashboa","isManagerDashboardView","showAccountListPopup","customerIdType","useAdvertiserCustomerId","parametersColumnTemplate","updateDate","now","delta","getTime","getUETTagDashboardTestGridColumnConfig","updateHandler","IsReadOnlyUser","editablePlugin","onShowParametersReceivedPopover","parametersReceivedPopoverTemplate","ParameterMap","Object","originalItem","patch","editorView","Tags","setErrors","$overall","off","removeCreateView","UETTagsGridDashboardConfig","afterFindAllCallback","granularity","startDateEpoch","endDateEpoch","timeDiff","hoursDiff","daysDiff","monthsDiff","getMonth","getFullYear","URLSearchParams","location","search","timezoneId","performanceTimeSeriesParameters","Granularity","afterFindAll","getQueryStartAndEndDates","fourteenDaysAgoDate","getDate","getHours","getMinutes","dateFormat","raw","ExportData","download","UETDashboardPhase2Enabled","UETDashboardPhase2","waterfallFilterStorage","WaterfallFilterStorage","dateFilter","waterfallDateFilterProcessor","WaterfallFilterType","DateFilter","Customers","$withKey","Accounts","$makeCall","payload","eventAction","toPromise","tagResponse","showInfo","autoDismissTime","showWarning","UETTagsDashboardGrid","onShowPanel","renderThirdPartyIntegrationView","dataColumnTemplate","getUETTagDashboardGridColumnConfig","onGridDataLoaded","EventAction","open","Parameters","s$Tag","schemai18n","_ref$model","groupFields","placeholder","validators","maxLength","blockInput","control","isEditView","tagEntity","vmDefault","IsClarityTagEnabled","editForm","SimpleForm","showButtons","fields","PopupController","PopupJsClick","testUetClarity","createTag","editTag","treeSelection","Others","Total","vm","tagSharingView","Owner","owner","SharingScope","convertSharingScope","getSharingScope","formTemplate","_this$permissions","IsCustomerHierarchyEnabled","IsSharedLibraryPhase1Enabled","userId","ccCustomerService","parentCid","UETTagManageSopeView","scopeOptions","CUSTOMER","account","HIERARCHY","sharingTemplate","getUETTagGridColumnConfig","IsUETDashboardPhase2Enabled","editable","enableEdit","isEditable","_ref5$value","trackingStatusColumnTemplate","_ref7$value","sharedUsedbyTemplate","number","_$first","goalsTemplate","audienceTemplate","actionColumnTemplate","manageScopePermission","UETTagsGridConfig","isUETTagDeletionEnabled","UETTagsGrid","createMoreTagsPrompt","findByName","Data","getItemCount","UETTagManageScopeDialog","dialogOptions","selectedOption","withFooter","updatedScope","goalsCount","GoalsCount","navigateToGoals","filterExpression","SelectedColumn","SelectedOperator","Values","escapedFilter","encodeURIComponent","audiencesCount","AudiencesCount","navigateToAudiences","isUETDashboardPhase2Enabled","isUETAllTagsDashboard","accountListView","sharingScopePopoverView","containerClassName","UsedBy","usedByPopoverView","tagReadOnlyPopoverTemplate","hideAllToolbars","once","showAllToolbars","ownerIds","customerIds","allCIDCached","_this7","urlTemplate","isOfflineConversionGoalCurrencyCustomerScopeSupported","IsOfflineConversionGoalCurrencyCustomerScopeSupported","initGridConfig","successRows","SuccessCount","RowsProcessed","errorRows","ErrorCount","TotalRows","totalRows","tmpl","hasError","errorsIdentifier","hasUploadError","hasAcrossAllAccountsOfflineConversionGoal","HasAcrossAllAccountsOfflineConversionGoal","ProjectionGrid","vnext","instrumentationSvc","endActivity","initPreviewGrid","initSummaryGrid","errorLog","logError","Url","errorMsgKey","log","op","sessionId","filename","prop","post","TaskId","ExecutionId","TaskItemExecutions","handleGenericError","TaskSessionId","asLoggingStart","instrumentSetting","ACTIVITYNAME","ClickOnApplyChanges","ClickOnDiscard","identifier","resultsIdentifier","downloadService","ClickOnDownloadAllResults","ClickOnDownloadErrorsOnly","ClickOnClose","columnsConfig","datetimeUserTemplate","row","dateHumanizer","StartedAt","toLocaleString","Culture","user","UserName","uploadedFileTemplate","inputFile","OfflineConversionFiles","hasExpectedStatus","Identifier","shouldDisable","IsExpired","summaryTemplate","isPending","isCompleted","successCount","errorCount","errorCodes","Boolean","code","actionsTemplate","resultsFile","errorsFile","resultsId","errorsId","dataConfig","DataSource","OfflineConversionUploadTaskItemExecution","$filter","resizeConfig","getPGridColumnResizePlugin","use","is","getDataId","ClickToDownloadAllResultsInGrid","ClickToDownloadErrorsOnlyInGrid","ClickToDownloadInputFileInGrid","attr","hideFooter","isXandrVideoAd","isMultiAdFormatDisplayAd","isMultiAdFormatVideoAd","_ref$setAdGroupType","setAdGroupType","_ref$setIsDisplayPlus","setIsDisplayPlusNativeEditAdEditor","KoSchema","campaignDomain","isDynamicDescriptionEnabled","isFeedBasedCampaign","selectorLabelId","showCampaignLevel","allowAdCreation","adEditorTitle","saveAnalyticsId","saveCreateAnalyticsId","isDisplayAdWithCopilot","isXandrDisplayAdsCampaign","DisplayPlusCopilotAssetGeneration","isDisplayPlusNativeEdit","isAudienceCampaign","isAudienceNativeAdsCampaign","DisplayPlusEdit","containerClass","hideSaveAndCreateAnother","isSmartShoppingCampaign","MTCampaignTypeEnum","isTraditionalChinese","adsCountMap","adGroupType","DisplayBiddingStrategyType","isXandrVideoAdsCampaign","XandrVideoCampaigns","isDisplayPlusNativeEditEnabled","setClarityTag","IsDisplayPlusAudienceNative","transformAdgroupData","adgroupData","resolve","EntitySelectorService","getAdsCount","console","shouldKeepSmartShoppingCampaignAdGroup","totalCount","onEventTrigger","getCustomizedData","pageNumber","adgroupSelectorView","selectorContainer","hasClass","queryText","signleQuoteTerminatedQuery","$select","$skip","$top","$count","findAll","getAdgroupData","AdgroupSelectorView","fetch","_ref2$query","_ref2$pageNumber","fecthAdgroupData","stringKeys","emptyListContent","listHeader","selectEntity","getCampaignData","campaignData","transformCampaignData","_ref$onCampaignSelect","_ref$onAdGroupSelect","campaignAdgroupSelectorView","_ref2$pageSize","_ref3$query","_ref3$pageNumber","_ref3$pageSize","_ref3$scopeParentItem","scopeParentItem","CampaignAdgroupSelectorView","onFetch","fecthCampaignData","saveIds","ExpandedText","saveCreateIds","_ref$campaignId","_ref$adGroupId","_ref$adGroupType","_ref$campaignType","_ref$campaignSubType","_ref$biddingStrategyT","_ref$isSaveToServer","isSaveToServer","_ref$isTraditionalChi","_ref$appLookupDisable","appLookupDisabled","_ref$developerName","developerName","_ref$campaignDomain","_ref$isDynamicDescrip","_ref$isFeedBasedCampa","_ref$firstTextAdModel","firstTextAdModel","_ref$firstExpandedTex","firstExpandedTextAdModel","_ref$firstResponsiveS","firstResponsiveSearchAdModel","_ref$isForVNext","_ref$inlineSuggestion","inlineSuggestionsEnabled","_ref$adsCountMap","_ref$showSaveAndCreat","showSaveAndCreateAnother","_ref$isOpenCreatePane","isOpenCreatePanel","_ref$shouldSendOpport","shouldSendOpportunityLog","logOpportunity","parentPerfMarker","loadClipchampPlayer","isActiveChild","hasWebsiteImageOptedInObservable","adEditor","AdEditorView","showInline","hasWebsiteImageOptedIn","adId","setAnalyticsId","_type","adgroupSelectorProxy","adgroupSelector","campaignAdgroupSelectorProxy","originalAdEditorScope","isDisplayPlusDisplayAd","saveAndCreateAnother","isTextareaEmpty","isKeywordPlannerEnabled","keywordPlannerView","KeywordPlannerView","mode","newKeyword","addSuggestion","textarea","parser","keywordsTextareaVal","textAreaSubscription","emptySearchTeams","initializeSuggestions","isAfterFirstInteraction","_this$options$adGroup","getLandingPageUrl","Ad","limit","Ads","campaignParams","adGroupParams","load","campaignLocationRes","adGroupLocationRes","landingPageUrlRes","campaignLanguageRes","adGroupLanguageRes","keywordPlannerSupportedLanguages","isLanguageSupported","setLanguages","setLocationTargeting","landingPageUrl","allLocationsUnsupported","onSearch","getChangedKeywords","keywordSuggestionsAdded","dispose","_AdapterView","getQueryOptions","queryOptions","filterText","where","$contains","take","skip","HotelCenterEntitySelectorService","SubAccount","results","subAccount","total","HasPaged","fail","jsDataOptions","SubAccounts","HotelGroups","HotelGroup","SubAccountId","SubAccountName","AdExtensionAssociationSchema","adextensionType","_ref$excludedColumns","excludedColumns","deleteAssociation","editExtension","addExtension","gridContainer","toolbarContainer","typeString","_ref$selection","_ref$heroButtonText","heroButtonText","dataSourceGenerator","adExtensionTabPerfMarker","getGridName","AdExtensionType","AssociationType","hasCampaignNameColumn","hasAdGroupNameColumn","defaultItems","deliveryColumn","entityColumns","VerticalSubAccount","VerticalHotelGroup","idColumn","col","a11y","performanceLog","tabindex","addDateChangeListener","toolbarRow","AdExtensionAssociations","adExtensionTypes","selectable","isAggregateRow","SubAccountAssociationsRequestFactory","ids","getBatchRequest","flatten","idList","EntityId","AdExtensionId","HotelGroupAssociationsRequestFactory","HotelAssociationsRepository","_AssociationsReposito","_schema","requestFactory","batchURL","AssociationsRepository","baseSchema","standardProperties","commonProperties","HotelCenterAdExtensionsRepository","ownedProperties","afterChangeComitted","extensionDataFormatter","associationsDataFormatter","ExtensionsRepository","association","attrsProcessor","attrs","associationAdgroupId","associationCampaignId","associationAccountId","adextensionId","adextensionStatus","deliveryAlertId","ENTITY_MAP","headerRefreshCache","updateFlagRefreshCache","expandToolBar","openAssociationsEditor","currentAdgroupId","adExtensionId","editFromGrid","isStringFormatId","disableScheduling","repositoryFactory","isUINext","createAssociationEditorForUiNext","instantiateEditor","editAssociations","popup","alert","showError","getBulkDeleteItems","deleteMessage","confirm","in","deleteAssociations","deletedItems","associations","mappingAssociationType","createRequestFactory","destroyAllByOdata","HotelCenterBaseAdExtensionAssociationsView","_ref4$excludedColumns","customizedFilterList","dataPostProcess","filterListProcessor","overThresholdErrorMessage","_ref4$isUINext","_ref4$createAssociati","_ref4$extendPlugins","prepareGrid","deliveryStatusPopupFactory","showRejectionPopup","document","one","closeRejectionPopup","_ref5$attrsProcessor","defaultAttrsProcessor","_ref5$shouldNotShowGr","shouldNotShowGrid","_ref6$attrsProcessor","configParams","createAssociations","NewGridConfig","filterConfig","resources","asyncCallback","asyncEmptyText","setupGrid","gridPromise","fetchPreferenceConfig","newDateFilterPlugin","newPaginationPlugin","newUiBlockerPlugin","newAssistedSelectionPlugin","gridOptions","preference","sortInfo","toolbarEditor","itemsCount","deselectAll","cacheManager","invalidate","rejectionContainer","getElementById","style","display","css","ResetImage","removeRejectionPopup","hotelCenterComponentI18n","hotelCenterSharedI18n","HotelCenterAssignmentDeps","viewAdapter","hotelCenterEdm","hotelCenterJsData","crossPageSelectAll","sharedColumn","schemaUtil","customUserInfoPreferences","campaignJsData","dateFilterPreferences","HotelCenterAssignment","hotelCenterAssignmentLoader","CalloutAdExtensionSchema","CalloutAdExtensionAssociationsView","_HotelCenterBaseAdExt","associationOption","CalloutAssociationEditor","findScope","AdgroupSelectorEntityTypeAdgroups","AdgroupSelectorEntityTypeCampaigns","AdExtensionsMultiSelectSelectCampaigns","AdExtensionsMultiSelectSelectAdgroups","maxSelectedItemsCount","AssociationContainer","ErrorGridEntityAdgroupColumn","ErrorGridEntityCampaignColumn","delete_confirm","AdExtensions_Edit_Warning","gridRowTemplate","HotelCenterBaseAdExtensionView","hotelCenterI18n","hotelCenterShared","HotelCenterIntelligenceDeps","azureUpload","toast","calloutExtensionAssociation","segmentationPerferences","servicePreference","customeridtype","HotelCenterIntelligence","hotelCenterIntelligenceLoader","hotelCenterIntelligence","hotelCenterSchemaI18n","hotelCenterUtils","HotelCenterOverviewDeps","detailMapper","bulkEditJob","downloadViewAdapter","columnChooser","newPerformanceLog","popupEditor","jsDataCampaign","segmentationPreferences","columnChooserPreferences","HotelCenterOverview","hotelCenterOverviewLoader","userCountryService","getHotelCenterShared","SetupViewDeps","HotelCenteSetup","setupViewLoader","_getHotelCenterUtils","getHotelCenterUtils","bidUtils","bidMultiplierUtils","dateUtils","inlineDownloadUtils","fetchDbProvisionStatus","getProvisionedUrl","Authorization","isHotelAdsDBPilotEnabled","bootstrapHotelCenter","dbProvisionStatus","dbProvisionResult","getFilterPromise","filterValues","match","subAccounts","getTotalSubaccounts","pageId","isPageReady","logException","stack","st","startPollingUntilImportStarted","taskItemExecutionId","completeCallBack","showLoadingIcon","isMultiAccount","failedTimes","wrappedCompleteCallBack","func","hideLoadingPanel","showLoadingPanel","setTimeout","checkStatus","editImportCookieName","currentUserName","cookieHelperForEditImport","createCookie","taskItemId","cookieValue","expire","setTime","cookie","deleteCookie","getSessionId","editImportCookie","safeJson","upload","file","allowedExtensions","UploadService","validateFunc","ext","urlWithoutSas","ValidatationFailed","safeJSON","customizedCategory","ImportCampaignsClickToUploadFile","SCENARIONAME","ImportCampaignsFileUpload","getImportTemplateUrl","fileName","IsEnhancedShoppingCampaignAllowed","TemplatesPathUrl","initFileImportPage","settings","commonDeps","createDeps","azureUploader","importTemplateUrl","defaultLogActivity","logActivities","clickOnImportFromFile","renderImportColumnMatching","fileimport","renderImportOptions","renderImportPreview","renderImportSummary","FileImportPage","currentStep","importId","subFieldsBlacklist","getBlacklist","initGapi","initDeps","isMultiAccountImport","google","clickOnImportFromGoogleAdWords","initGoogleImportDeps","UetTagSelectorView","logScenario","googleimport","renderSelectAdWordsAccount","renderSelectAdWordsCampaigns","logInAccount","selectAccount","selectCampaign","configureOptions","completeSchedule","initGoogleImportPage","MultiAccountGoogleImportPage","GoogleImportPage","initFacebookImportDeps","getEnvironment","domain","token","loadFacebookSdk","sdk","clickOnImportFromFacebook","FB","facebookimport","initFacebookImportPage","FacebookImportPage","initAmazonImportDeps","clickOnImportFromAmazonSPA","amazonimport","renderSelectAmazonAccount","renderSelectAmazonCampaigns","initPinterestImportDeps","clickOnImportFromPinterestSPA","pinterestimport","getBlackList","statusOrderToBlockerTitleMap","statusKeyToOrderMap","PendingExecution","NotStarted","UploadInProgress","ValidationInProgress","ValidationCompleted","BulkFileGenerateInProgress","SubmitInProgress","Complete","i18nAmdLoader","interpolate","importFromAmazonSPA","importFromPinterestSPA","importFromFacebookSPA","importFromFileSPA","importFromGoogleAdWordsSPA","continueImport","continueImportSPA","clickOnImportFromFacebookSPA","clickOnImportFromFileSPA","clickOnImportFromGoogleAdWordsSPA","loadContinueImport","loadContinueImportSPA","coupon","currency","check","dependencyName","timeZoneEnumMapper","generateCombinedSchemaObject","doubleListBox","accountSelectionLists","campaignFilterFactory","FilterStorageFactory","featureName","adGroupFilterFactory","adFilterFactory","campaignFilterStore","filterEntityOptions","entitySchema","adgroupFilterStore","adFilterStore","formatCoupon","SearchTermGridId","AuctionInsightsGridId","CampaignTabId","AdGroupTabId","AdsTabId","KeywordsTabId","ProductsGroupId","FlattenProductsGroupId","AudienceTabId","AdExtensionsTabId","ChangeHistoryTabId","DimensionsTabId","AdGroupStatusFilterColumnName","KeywordNameFilterColumnName","LocationsTabId","DevicesTabId","AdScheduleTabId","DemographicsTabId","AdDescriptionFilterColumnName","AdExtensionCampaignAssociationStatus","AdExtensionAssociationStatus","KeywordMatchTypeColumnName","CampaignEntity","AdGroupEntity","AdEntity","KeywordEntity","SearchTermEntity","AuctionInsightEntity","AudiencesAssociationEntity","AccountEdmEntity","AdGroupCriterionEdmEntity","CampaignCriterionEdmEntity","CampaignEdmEntity","DynamicSearchAdsEdmEntity","AdGroupEdmEntity","AdEdmEntity","KeywordEdmEntity","ClickMetricId","NoneMetricId","InlineChartDropDownOption","filterOptionId","resultData","GranularityDropDownOption","_Backbone$Collection","option","usingNewDatefilter","dateObj","_possibleConstructorReturn","daterange","appliedRange","comparedDateRange","appliedComparedRange","mainDateDiff","_calculateDiff","comparedDateDiff","hourlyStartDate","setMonth","hourlyOptionDisabled","dailyOptionDisabled","_calculateDisabled","weeklyOptionDisabled","monthlyOptionDisabled","quarterlyOptionDisabled","Infinity","longerPeriod","round","dateDiff","min","max","ChartDelegateAdapter","_DelegateAdapter","dateParsedArray","request","sd","convertToDateObj","ed","numb","getYear","prependZero","getSeconds","rtnData","metricOption","obj","MetricName","PrimaryDataPoints","ComparisonDataPoints","_fillData","compareStartDate","dataPoints","i","generateFormattedDateString","random","addHour","numbOfdataPoints","numberOfDataPoints","addDay","addMonth","generateMockData","DelegateAdapter","getMetricLocalizedNameForOdata","metric","convertedString","DataProvider","p$jsdata","_generateRequest","useInlineChartMockData","getParameter","href","_fetchDataUsingMockDBAdapter","_fetchDataUsingOdataAdapter","refreshGridData","transformedMetric","metricMapping","allMetrics","m","chartNameConverter","parentLevels","edmEntity","currentEntity","_getEntityCollectionName","Constants","period","_formatDateString","compareEndDate","metrics","filters","movingAverage","isMovingAverageOn","forceRefresh","filterRequested","filtersTypeString","filtersToUse","valueValid","instrument","decodeURIComponent","odataFilterConverter","convertToURLParam","instrumentConsts","PerformanceTimeSeries","_getScope","_prepareData","dateStr","leftPadding","s","dt","series","chartName","chartNameTable","convertData","point","isPrimaryData","PrimaryData","ComparisonData","DateTime","substring","dateTime","transformChartPoints","_getNavigation","nav","nameMapping","Account","NegativeKeyword","NegativeKeywordList","CampaignCriterion","AdGroupCriterion","currentLevel","InlineChart","definitions","getInlineChartInfo","project","record","inlineChartData","keyRecord","BPromise","setInlineChartInfo","inlineChartInfo","newinlineChartInfo","defineResource","registerSubadapter","PreferencesSubadapter","Resource","prefix","_ref$where","_ref$where2$project","serialize","deserialize","InlineChartViewModel","learnMoreLabel","isUsingVnextGrid","tab","isMovingAverageChecked","primaryMetricId","secondaryMetricId","chartDataProvider","showChart","chartTitle","isDataAvailable","noDataText","isComparisonDataMissing","comparisonDataMissingText","showMovingAverageText","newFeatureLabel","isChartLoading","isGranularityShowing","xAxisStartValue","xAxisEndValue","comparedXAxisStartValue","comparedXAxisEndValue","hideToolbar","hideToggleIcon","isDataFetchingDone","isPopOn","isMovingAverageVisible","daysBetween","granularityOptions","granularityId","primaryMetricOptions","secondaryMetricOptions","cachedChartData","_getChartDataWhenSubscribed","comparedStartDate","comparedEndDate","primaryData","secondaryData","selectedPrimaryCategory","selectedSecondaryCategory","maxDate","needUpdateChart","chartUpdatingPromise","queueAsync","BluebirdPromise","prefObj","_metricSelectedHandler","allColors","CurrentTabId","reloadChartData","_getParentLevels","filterUrlParam","filterObj","_getDefaultEntityBaseOnParentLevels","filterString","odataV4","ignoreCase","encodeURI","_validateFilter","flagUpdateChart","p$granularityOptions","promiseResults","dateRangeRes","_getChartTitle","dateRangeObj","showMovingAverageInPref","granularityInPref","granularityItem","firstEnabledGranularity","metricOptions","primaryMetric","primaryIdInPref","secondaryMetric","secondaryIdInPref","isAgeOrGenderTab","unshift","_updateChart","InlineChartV2ReloadChart","timestamp","Highcharts","_getQuarter","selectedCategory","metricData","primarySum","comparisonSum","primaryAvg","comparisonAvg","dataObj","avgDiff","getUTCMonth","chartContext","_getChartData","xAxisStartDate","xAxisEndDate","_alignDataForComparison","_refreshAllCharts","_logChartData","fetchData","chartData","_setCategoryAndData","colors","currentData","comparisonData","color","original","xAxis","comparative","yAxis","dataObservable","categoryObservable","_getChartDataForMetric","dataSet","shortermetricData","longermetricData","diff","diff1","dayAfter","dayInMillisec","primaryDataDateDiff","comparisonDataDateDiff","CampaignState","metricId","colorRGB","constructor","numericSymbolFormatter","tickValue","tickInterval","numberFormatter","decimalPoint","thousandsSeparator","sign","formattedNumber","absTickValue","absTickInterval","numericSymbolKeys","absTickValueStr","dotIdx","legacy$","InlineChartView","needRedraw","inlineChartViewModel","_onShowChartChanged","_onGranularityOptionsChanged","_onPrimaryMetricOptionsChanged","_onSecondaryMetricOptionsChanged","_onPrimaryDataChanged","_onSecondaryDataChanged","onGridPageLoadingHandler","_onGridPageLoading","onTabChangeHandler","_onTabChange","inlineChartTemplate","_toggleOldNewInlineChart","_insertToolBarIfNeeded","_onGridPageLoadingNewGrid","triggeredGridPageLoading","pageTitle","chartContainer","pageTitleInclusiveWidth","width","parseFloat","highChartContainer","triggerHandler","_showNewChartOnCurrentTab","commandType","RefreshGridData","filterEntity","Entity","granularityDropdown","DropdownView","first","defaultOption","dropDownOptions","onDropDownChanged","onGranularitySelected","primaryMetricDropdown","onPrimaryMetricSelected","onPopEnabled","calculatePercentageDiff","secondaryMetricDropdown","onSecondaryMetricSelected","_redrawChart","_isDataFetchingDone","chartIteration","chartRedrawMarker","logActivityDurationMarker","self","ChartView","showWeekend","koModel","highchartsOptions","tooltip","formatter","primaryPoints","comparisonPoints","tempHtml","points","x","_numberWithCommas","_round","y","_isPercentNeeded","labels","axis","lang","_updateMetricDropdownDiff","markEnd","_showOldChartOnCurrentTab","_toggleToolbar","hideChartToolbar","tabsWithNewInlineCharts","globalToolBar","globalToolBarPanel","appendTo","insertAfter","showDiff","triggerShowDifference","num","seriesName","numberWithCommas","dotIndex","selectQueryPrefix","ColumnConversionNotEnabledFeatures","setGridPreference","_ref$SegmentationType2","_slicedToArray","SegmentationType","QueryString","queries","substr","getGridColumnNames","customColumn","getGridColumnConversions","withPartialConversion","patchedColumns","applyColumnConversions","buildColumnConversions","setSegType","setDateRangeForNewUI","Rule","convertSelectionDateRangeToDateFilter","restoreDateFilter","_Rule$Selection","setPreferenceByReportEmailRule","ReportEmailRule","getGridPage","isForNewUI","setPreferenceByReportEmailRuleForAccountsSummary","setPreferenceByReportEmailRuleForHotelCenter","_Rule$Selection2","convertSelectionDateRangeToState","initializePreference","setPreferenceByReportEmailRuleForCampaigns","currentPage","createSimilar","reportId","getUrlSearch","scopeHistoryPush","TaskItem","TaskItems","page","route","getGridRouteForNewUI","getGridRoute","loadEmails","allUsersType","queryString","json","emails","getImportButtonOptions","importChannelType","lazyInject","iconLeftGlyphName","backboneGridView","processBatchedImports","groupedByBatch","importResult","CampaignSplitGuid","sortedGroupedList","group","minDateIndex","StartDateTime","sortedGroupWithParentList","parent","batchImportGroup","firstInBatchIndex","statisticFields","EntityStatistics","initStatistics","entityStatisticChangeTypes","initialEntity","isBatchStillInProgress","hasAnyBatchedImportFailed","hasAnyBatchedImportBeenCancelled","Keys","combinedStatistics","entityStatisticMap","ErrorCode","ImportStatus","TotalCount","ImportName","ErrorFileIdentifier","CampaignSplitStatus","CampaignSplitBatchIndex","CampaignSplitBatchCount","IsBatchParent","createParentRowForBatchedImports","processedGroup","indexTemplate","indexText","IsChildBatch","reverse","testTypeSuffix","IsUseImportTestTypeForImportTaskExecutionEnabled","FILTER_IMPORT","FILTER_MULTIACCOUNT_IMPORT","FILTER_FILE_IMPORT","FILTER_FACEBOOK_IMPORT","FILTER_AMAZON_IMPORT","FILTER_PINTEREST_IMPORT","processData","groupedByAccount","isCustomerLevel","processedItem","ImportResultList","accountitem","IsChildAccountTask","MultiAccountTaskIndex","MultiAccountTaskCount","processMultiAccountBatchedImports","getImportLogDataSourceConfig","_ref$isFacebookImport","isFacebookImport","_ref$isAmazonImport","isAmazonImport","_ref$isPinterestImpor","isPinterestImport","supportedImportTypes","TaskItemExecution","consts","processedData","IMPORT_TYPE","amazonImport","pinterestImport","getMemoryDataSourceConfig","updateMemoryGrid","currentGrid","updateTaskItemSessionId","taskId","logMsg","adWordsSessionId","createImportTaskItemHelper","getGoogleImportInfoFromCookie","googleSessionId","AdWordsImportContext","AdWordsSessionUserId","SessionType","ImportUserPreferences","showSuccess","findImportTaskItem","amdI18n","config1","importSettingsSummaryBuilder","ImportOptionsSummaryBuilder","fileImportSettingsSummaryBuilder","FileImportOptionsSummaryBuilder","fileImportOptionBlackList","getFileImportOptionBlackList","facebookImportOptionBlackList","getFacebookImportOptionBlackList","amazonImportOptionBlackList","getAmazonImportOptionBlackList","pinterestImportOptionBlackList","getPinterestImportOptionBlackList","getDropdownItemConfig","isFirstDropdownOption","viewFactory","setErrorFilterPredicate","refreshGrid","setMenuTitle","getGridSwitchDropdownItem","isGoogleImport","getToolbarConfig","isSmartAccount","isUPSmartAccount","importType","setImportType","updateToolbarTextForVNext","importButtonOptions","Map","getVNextToolbarConfig","isNewFeature","leftIconClass","getLegacyToolbarConfig","mapTypeToString","isAutomated","multiAccountTaskGuid","getColumnsConfig","freqColumnTmpl","Freq","UploadFileName","fileNameExists","nameTmpl","creatorColumnTmpl","Creator","CreatedAt","Time","enabledOptions","settingsText","importSettings","ImportUserPreference","parsedValue","parseModelToImportUserPreference","parseJsonFormatImportOptions","showSmartType","IsSmartImportEnabled","IsSmartImport","importOptionBlackList","generateSummaryFromSelectedOptions","preferencesLogTmpl","showTooltipIcon","importSettingsLabel","importSourceAccountInfo","GoogleAccountName","GoogleCustomerId","ExternalAccountName","ExternalCustomerId","importTypeTmpl","IsAutomated","MultiAccountTaskGuid","IsGoogleImport","IsFacebookImport","IsAmazonImport","IsPinterestImport","ImportSourceAccountInfo","importSummaryColDataToTemplate","stat","HasWarning","hasErrorSummary","ImportNewErrorSummaryDownloadLink","ErrorSummaryFileIdentifier","hasPreview","hasErrorCode","TokenInvalidImportNotification","logColumns","columnData","actionsLogTmpl","errorDetailsLabel","GoogleImportLogConfig","pluginsConfig","gridMarker","FacebookImportLogConfig","AmazonImportLogConfig","PinterestImportLogConfig","FileImportLogConfig","showGoogleImportGrid","showFacebookImportGrid","showAmazonImportGrid","showPinterestImportGrid","showFileImportGrid","isFirstSwitch","showNoGoogleImportMsg","showNoFileImportMsg","showNoFacebookImportMsg","showNoAmazonImportMsg","showNoPinterestImportMsg","ImportSettingsTooltipView","formView","importSettingsTooltipTmpl","debouncedVersion","debounce","MultiAccountTaskExecutionId","ImportId","MultiAccountTaskId","IMPORT_TYPE_TO_IMPORT_NAME","toolbarConfig","overridingEvent","importOptionsFormLoader","summaryTableLoader","uetTagSelectorViewLoader","previewAnImport","cancelAnImport","googleImportGridRendered","googleImportGrid","facebookImportGridRendered","facebookImportGrid","amazonImportGridRendered","amazonImportGrid","pinterestImportGridRendered","pinterestImportGrid","fileImportGrid","showAllImports","execution","which","preventDefault","pageText","pageNumberText","getColumnData","dismissCallout","UseJsGapiClientOnImportLogGrid","GSILocal","require","loginRepo","GoogleLoginRepository","googleSignIn","onFail","useConsentPrompt","requestUrl","AuthCode","authErrors","handleGoogleLoginAuthError","w","h","errorMessage","windowWidth","windowHeight","documentElement","screen","dualScreenLeft","screenLeft","left","dualScreenTop","screenTop","top","innerWidth","clientWidth","innerHeight","clientHeight","newWindow","focus","timer","setInterval","closed","clearInterval","windowObj","isRedirected","isAuthSucceed","googleAccount","close","showGooglePopup","partial","facebookRepo","FacebookImportRepository","ERROR","login","accessToken","refreshScheduledFacebookImportTaskItemSessionId","onPermissionsDeclined","_ref6$declinedScopesA","declinedScopesAndDesc","userID","declinedPerms","ds","handleFacebookLoginError","rerequest","pinterestLoginRepo","PinterestLoginRepository","pinterestImportRepo","PinterestImportRepository","authCode","startPinterestSession","PinterestImportContext","PinterestSessionUserId","updateScheduledImportTaskItem","handlePinterestLoginError","noGoogleImportMsg","noFacebookImportMsg","noAmazonImportMsg","noPinterestImportMsg","noFileImportMsg","initGrid","ToolbarView","iconRight","onChange","getGridSwitchToolbarConfig","pgrid","flow","headerTemplateConfig","initUpdateFinishedEventListener","hasNoResult","countRows","currentTarget","tooltipView","$targetTooltip","$parent","eventName","uniqueId","ImportOptionsForm","searchAndReplaceSchema","ImportSearchAndReplaceForStringProperty","findAndReplaceSuffixSchema","jsonFormatImportOptions","ImportUpdateEntityPreference","LandingPageAppendPreference","ImportAppendDestUrlPreference","LandingPageReplacePreference","ImportSearchAndReplaceDestUrlPreference","AppendTrackingTemplatePreference","AppendPreferencesForTrackingTemplate","SearchAndReplacePreferencesForTrackingTemplate","ImportPrefixAndSuffixForStringProperty","ImportAdjustmentForNumericProperty","SearchAndReplaceForCustomParameters","SearchAndReplaceForFinalURLSuffix","createDisabledUETSelectorClass","input","toolTipTmpl","hideTooltip","showSummaryDetailsPopup","UploadFileIdentifier","redirectUrl","blockerElem","UIBlockerToken","UIBlocker","block","$http","__RequestVerificationToken","contentType","unblock","_ImportLogGridBase","importOptions","summaryTable","uetTagSelector","ImportLogGridBase","TEST_TYPE_SUFFIX","FILTER_OUT_RUNNOW","FILTER_IMPORT_TYPE","FILTER_FACEBOOK_IMPORT_TYPE","FILTER_MULTIACCOUNT_IMPORT_TYPE","FILTER_AMAZON_IMPORT_TYPE","FILTER_PINTEREST_IMPORT_TYPE","FILTER_ALL_ITEMS","FILTER_ALL_BUT_DELETED","FILTER_ALL_ITEMS_MULTIACCOUNT","FILTER_ALL_BUT_DELETED_MULTIACCOUNT","FILTER_ALL_FACEBOOK_ITEMS","FILTER_ALL_BUT_DELETED_FACEBOOK_ITEMS","FILTER_ALL_AMAZON_ITEMS","FILTER_ALL_BUT_DELETED_AMAZON_ITEMS","FILTER_ALL_PINTEREST_ITEMS","FILTER_ALL_BUT_DELETED_PINTEREST_ITEMS","preferenceUploadButtonConfig","legacyI18n","publicPath","showTopOfGridPanel","logTrace","instrumentationConstants","preferenceUploadViewModule","gridToolbar","preferenceUploadView","PreferenceUploadView","scrollTo","batchEditStatus","adoptResumeScheduleRecommendation","ruleId","batchRequest","ajaxBatch","textStatus","some","updateToolbarText","getToolbarConfigForVNext","historyGridFilterTitles","AccountMode","ACCOUNT_MODE","SMART","UNIFIED_SMART","getSupportedImportTypes","isMixedImports","isGoogleImportOnly","isFacebookImportOnly","isAmazonImportOnly","isPinterestImportOnly","googleAll","googleDeleted","facebookAll","facebookDeleted","amazonAll","amazonDeleted","pinterestAll","pinterestDeleted","importTypeOfFilter","getDefaultImportTypeOfFilter","toolbarSelectedConfig","_lazyInject$backboneG","ima","toolbarUnselectedConfig","isFiltered","updateUnselectedToolbarConfig","getUnselectedToolbarConfig","getPluginsConfig","batchEditCallback","pos","IsAutoFrequency","statusColumnTmpl","runNowStatusColumnTmpl","ImportPreferenceUpload","idTmpl","taskTmpl","FacebookImportContext","AmazonImportContext","IsFacebookImportEnabled","IsAmazonImportEnabled","IsPinterestImportEnabled","enabledImportTypes","accountNumber","CustomerId","ProfileId","acctTmpl","EmailAddress","AccountName","AccountNumber","importFreqColDataToTemplate","modeTmpl","notificationType","arr","emailMapper","showRecommendation","allowEdit","enableRunNowButton","importRecommendationListName","importRecommendationListNameMap","importChannel","importChannelNameMap","supportedRecommendationTypes","supportedRecommendationTypesList","ifTypeSupported","linkTmpl","edit","runNow","dash","recommendationText","ImportScheduleGridConfig","getDataSourceConfig","getImportScheduleDataSourceConfig","MultiAccountGoogleImportTaskItem","ImportTaskItem","getJsDataOptions","urlParameters","createRunNowImport","body","createUpdateStatusView","Grid","Model","valueOf","useStateInsteadOfStatus","addImportTypeToStatusUpdate","ignoreEmptyId","levelClasses","getClassesByLevel","updateTool","addClass","factoryContainer","processAction","toolBarView","shouldHideToolbar","arg","showToolbar","projection","deep","btnConfig","toolItem","Button","dropdownConfig","menuItems","tmpView","tmpDropdown","DropDown","isAvailable","btnMenuItemConfig","ButtonMenuItem","linkAction","DividerMenuItem","headerMenuItemConfig","HeaderMenuItem","toolNameList","dependencies","shift","toolItems","GridToolbar","configToolItems","tmpItem","appendItems","forEach","onAttachToolbar","showNoFilteredImportMsg","ImportScheduleAccountsDetailView","projectionGrid","CNMarketExpansion","BaiduFileImport","gapiSignInSuccess","reloginToGoogle","reloginToFacebook","hasReLoggedIn","login2FB","startFacebookSession","_ref4$declinedScopesA","logout","gapiSignInMultiAccountSuccess","vNextToolbarPlugin","scheduleItems","runMultiAccountImportNow","runImportNow","ImportTaskItemList","_ref6$AdWordsImportCo","bingAccount","targetRect","getBoundingClientRect","isAbsolute","right","indicator","editDropDown","enable","disable","useQuickFilter","filterCheck","checkEditButton","noImportMsgHeader","noFilteredImportMsg","renderGrid","isRunnow","currentUserId","propertyOf","amazonLoginRepo","AmazonLoginRepository","amazonImportRepo","AmazonImportRepository","startAmazonSession","handleAmazonLoginError","reloginToAmazon","reloginToPinterest","goToGoogleImportWizard","_ref7$importStep","importStep","navigator","routeName","isString","returnUrl","navigateToUrl","handleActionForScheduledImport","setDestination","handleActionForMultiAccountScheduledImport","ifUpdated","isFileImportODataMigrationEnabled","FileImportContext","FilePath","runImportNowInternal","updateData","closeEditPanel","editTaskSaveInternal","taskItemOptions","FacebookSessionUserId","notificationString","UpdateAdCustomizerFeeds","ImportNewAdCustomizerFeeds","applyRecommendationInternal","SetLowerBidsToAdCenterMinBids","EnableAutoCurrencyConversion","runMultiAccountImportNowInternal","isSmartImportWizardJob","facebookBody","AdGroupMedium","ImportType","triggerRunNowImportTask","amazonBody","pinterestBody","adWordsImportContext","isSmartCampaignOnlyJob","IsSmartCampaignOnly","isPmaxRecommendationJob","DefaultImportSettings","TaskType","Event","prepareGoogleImport","importUserPreferences","timeZoneId","market","CustomerMarket","adGroupMedium","googleCustomerId","loginCustomerId","LoginCustomerId","campaignIds","CampaignIds","googleEntitiesBlobName","GoogleEntitiesBlobName","sessionType","initialAdWordsAccount","googleAccountName","IsEscImport","prepareMultiAccountGoogleImport","importUserPreference","importTaskItemList","originalTaskId","promisifyStartPollingUntilImportStarted","handleGridErrors","_ImportScheduleGridBa","ImportScheduleGridBase","getBlobUploadUrl","_asyncToGenerator","_regeneratorRuntime","_callee","_ref$fileExtension","wrap","_context","prev","next","fileExtension","sent","abrupt","stop","_x","postTask","_x2","_postTask","_callee4","BlobName","SasUrl","_ref3$UploadDateTime","UploadDateTime","_context4","FileIdentifier","UploadedFileName","postPreviewTask","_callee2","_context2","_x3","postCommitTask","_callee3","_context3","_x4","pollExecutionResult","PREFERENCE_UPLOAD_STATUS","NotStart","Upload","Preview","Apply","Previewed","Applied","PREFERENCE_UPLOAD_ERROR_MAP","InvalidImportPreferenceBulkUpdateTaskType","ImportPreferenceBulkUpdateUploadFileSizeExceeded","ImportPreferenceBulkUpdateBlobDownloadError","ImportPreferenceBulkUpdateBlobUploadError","ImportPreferenceBulkUpdateFileFormatInvalid","ImportPreferenceBulkUpdateFileIsEmpty","ImportPreferenceBulkUpdateFileMissingHeaderRow","ImportPreferenceBulkUpdateColumnTaskIdNotFound","ImportPreferenceBulkUpdateColumnAccountIdNotFound","ImportPreferenceBulkUpdateColumnPreferenceNotFound","ImportPreferenceBulkUpdateColumnImportTypeNotFound","ImportPreferenceBulkUpdateParseFailedInvalidValuesInDataRows","renderPerfMarker","FilePicker","initFilePicker","defaultState","isApplyEnabled","hideFilePicker","isPreviewEnabled","uploading","showSummaryGrid","downloadPath","progressPercentage","progressTitle","filePicker","theme","allowedFileExtensions","validator","clearError","displayFilePath","preferenceUploadTemplate","uploadAndPreview","downloadResults","templateUrl","iframeDownload","_uploadAndPreview","_yield$getBlobUploadU","uploadService","previewTask","previewResult","previewPerfMarker","willFetchData","fileObject","FilePayload","getFileExtension","blobSetting","blobName","onUploadFinish","t0","_apply","_this$getState","commitTaskSasUrl","commitTask","commitResult","applyPerfMarker","getState","isPreview","done","OutputFileSasURL","logStage","InputFileName","willRender","_this$getState3","ProgressIndicator","percentComplete","hourMapper","hourObj","fromHourOptions","twelveHourDisplay","frequencyMapper","cron","char","dayOfTheWeek","isAuto","getTimeZoneOptions","productData","defaultAdGroupName","getAd","AdGroupName","PromotionalText","getProductPartition","BidAmount","ProductCondition","ProductValue","IsExcluded","IsLeaf","formatCriterions","campaignTargetingModel","dayTimeCriterions","deletedLocationCriterions","sort","__","b","bulkUpsertSmartShoppingCampaign","_ref2$campaignId","_ref2$adgroupId","timezonemapper","campaignTargeting","campaignSetting","shoppingSettingModel","shoppingSetting","smartShoppingModel","Priority","adgroupToCreate","getAdGroup","ProductAds","ProductPartitions","ShoppingCampaign","createdCampaign","bulkUpdateSmartShoppingCampaign","getCampaign","createAdGroupWithDefaulSettings","defaultBidForShoppingCampaign","_bingads_webui_component_legacy_legacy_router_index","legacyRouter","modalManager","ModalManager","campaignSettingsView","campaignTargetingView","cachedModel","shoppingSettings","initModalManager","active","campaignInfo","campaignSettingsPlaceholder","shoppingSettingsPlaceholder","campaignTargetingPlaceholder","renderCampaignSettingsView","renderShoppingSettingsView","renderCampaignTargetingView","CampaignSettingsView","gmcToMMCGridDeps","CampaignTargetingView","uniq","bulkApiErrors","i18nError","errMsg","querySelector","getValue","eq","scrollUtil","SSCInstrumentation","oldUISmartShoppingCampaignCreationScenario","SSCCreationActivity","str","messageType","validationError","errorList","_SmartShoppingBase","sscInstrumentation","isStoreNotValid","advancedSettingsViewPlaceholder","renderAdvancedSettingsView","renderGoalSelector","sendPageError","collapseAdvancedSettings","isFeedFilterValid","isFeedLabelEnabled","validateFeedFilter","cashbackSettings","hasCashbackSettings","navigateToCampaignSummaryPage","SmartShoppingBase","_BaseViewModel","configSchema","BaseViewModel","getFeedData","_ref3$","feed","shoppingCampaignView","isSettingsPage","getODataErrors","_ref5$$top","_ref5$$skip","GetFeedData","ChangeBidAdjustmentModel","_BaseModel","BaseModel","prototype","BatchAction","ActionType","settingView","showButtonBar","showCloseButton","selectedEntityCount","gridType","titleText","selectCount","entityNameHeader","bulkEditInfo","showAdgroupSelectedAllMixInheritWarning","isAllSelected","getSelectedEntityIdStrings","LevelOfDetails","getUrlParameter","formatBid","formatEntityString","EntityKeyObject","Key","isHtml","decimalNumber","fromFloatToPercentString","OriginalValue","NewValue","ChangeBidAdjustmentView","_BaseView","customValidators","checkInheritTargets","BidAdjustmentView","ChangeBidAdjustmentViewModel","pgridPlugins","simulateResults","unset","currentModel","BidMultiplier","conditionString","filterState","getAllFilters","idString","filterConverter","convert","conditionFragment","conditionFragmentALl","BaseView","originalValue","ChangeTargetingCashbackPercentView","_ChangeCashbackPercen","getCashbackPercentValueByAction","ChangeCashbackPercentView","toolbarWithItem","menuId","getGridSelectionCount","totalRowsTotalPageCount","selectedKeys","campaignItems","adgroupItems","showAlert","messageDetails","showBulkEditor","bulkEditView","deprecatedLocationSelected","isDeprecatedLocation","checkDeprecatedLocations","inheritResult","updateSelectedEntityCount","renderView","onOperationSuccess","ChangeCashbackPercentModel","editorContainer","overrideWith","updateToolbar","IsPersonalizedOffersEnabled","pollStatus","successCb","failedCb","BulkEditSession","completeCB","failedCB","progressCB","getQueryString","startdate","toISOString","enddate","getDateRange","IdStrings","idStringsFilters","TargetGroupDetailId","bulkEditChange","batchActions","opt","process","toDescription","getFilter","idsCount","deleteTargets","confirmationMessage","emitter","SuccessRowCount","TotalRowCount","toastConfirmation","toastWarning","toastError","_ref$learnMoreId","learnMoreId","CommonAlertDialog","decorate","commonAlert","_ref$title","alertView","maxWidth","center","pug","module","exports","pug_interp","pug_html","locals_for_with","escape","pug_mixins","$$obj","pug_index0","$$l","subTitle","tableRow","Header","CurrencyCode","Price","cssClass","ariaLabelContext","templateString","noHover","statusIconLabel","statusTypeClass","needsPopup","pug_index1","customer","labelledBy","topic","merge","isAudiencesLibrary","helpLink","learnMoreI18n","i18nValue","statusText","statusClass","vals","isResponsiveAdForSSCEnabled"],"sourceRoot":""}