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AkBC,GAAS,IAAoCC,EAAhCC,EAAW,GAAqCC,EAAmBH,GAAU,CAAC,EAKD,OALK,SAAUj9B,GAAYA,EACvIm9B,EAAWA,kDAAwEL,EAAIS,KAAK,QAASv9B,GAAO,GAAM,GAAS,iCAAqD88B,EAAIO,OAAO,OAASH,EAAal9B,GAAS,GAAKk9B,GAAe,gBAG9OC,GAAsB,+BACrB,EAAEG,KAAKn7B,KAAK,UAAWi7B,EAAgBA,EAAgBp9B,MAAqB,qBAARA,MAAoBA,WAAM9L,GAAoBipC,CAAS,C","sources":["../../../../account-summary-tabs/packages/accounts-grid/index.js","../../../../account-summary-tabs/packages/accounts-grid/src/plugins/toolbar-config.js","../../../../account-summary-tabs/packages/accounts-grid/src/accounts-grid.js","../../../../account-summary-tabs/packages/accounts-grid/src/plugins/toolbar-facade.js","../../../../account-summary-tabs/packages/accounts-grid/src/helper/import-status-helper.js","../../../../account-summary-tabs/packages/accounts-grid/src/columns/import-status-column-config.js","../../../../account-summary-tabs/packages/accounts-grid/src/columns/management-column-config.js","../../../../account-summary-tabs/packages/accounts-grid/src/columns/index.js","../../../../account-summary-tabs/packages/accounts-grid/mock/js-data-resource.js","../../../../account-summary-tabs/packages/accounts-grid/src/accounts-grid-config.js","../../../../account-summary-tabs/packages/accounts-grid/mock/dummy-data-source.js","../../../../account-summary-tabs/packages/accounts-grid/src/plugins/bam-plugin.js","../../../../account-summary-tabs/packages/accounts-grid/src/plugins/column-chooser-config.js","../../../../account-summary-tabs/packages/accounts-grid/src/plugins/index.js","../../../../account-summary-tabs/packages/accounts-grid/src/accounts-grid-factory.js","../../../../account-summary-tabs/packages/accounts-grid/src/columns/shared-column-configuration.js","../../../../account-summary-tabs/packages/accounts-grid/src/common-utils.js","../../../../account-summary-tabs/packages/accounts-grid/src/constants.js","../../../../account-summary-tabs/packages/accounts-grid/src/helper/customer-hierarchy-helper.js","../../../../account-summary-tabs/packages/accounts-grid/src/helper/management-dashboard-helper.js","../../../../account-summary-tabs/packages/accounts-grid/src/helper/scheduled-import-popup.js","../../../../account-summary-tabs/packages/accounts-grid/src/helper/show-scheduled-import-popup.js","../../../../account-summary-tabs/packages/accounts-grid/src/grid-footer.js","../../../../account-summary-tabs/packages/accounts-grid/src/index.js","../../ad-groups-data/src/columns-config.js","../../ad-groups-data/src/filter-config.js","../../ad-groups-data/src/data-fetch-config.js","../../ad-groups-data/src/data-fetch-source.js","../../../../account-summary-tabs/packages/accounts-grid/src/template/grid-footer.pug","../../../../account-summary-tabs/packages/accounts-grid/src/template/scheduled-import-column.pug","../../../../account-summary-tabs/packages/accounts-grid/src/template/scheduled-import-popup.pug","../../../../account-summary-tabs/packages/accounts-grid/src/template/vnext/account-mode-column.pug","../../../../account-summary-tabs/packages/accounts-grid/src/template/vnext/account-name-column.pug","../../../../account-summary-tabs/packages/accounts-grid/src/template/vnext/account-type-column.pug","../../../../account-summary-tabs/packages/accounts-grid/src/template/vnext/account-verification-status-column.pug","../../../../account-summary-tabs/packages/accounts-grid/src/template/vnext/actions-column.pug","../../../../account-summary-tabs/packages/accounts-grid/src/template/vnext/alert-icon-column.pug","../../../../account-summary-tabs/packages/accounts-grid/src/template/vnext/alert-icon-header.pug","../../../../account-summary-tabs/packages/accounts-grid/src/template/vnext/business-location-column.pug","../../../../account-summary-tabs/packages/accounts-grid/src/template/vnext/manager-accounts-column.pug","../../../../account-summary-tabs/packages/accounts-grid/src/template/vnext/status-column-readonly.pug","../../../../account-summary-tabs/packages/accounts-grid/src/template/vnext/tax-id-column.pug","../../../../account-summary-tabs/packages/accounts-grid/src/template/vnext/text-overflow-ellipsis.pug"],"sourcesContent":["import { uncheckedInjectionContext as globalContext } from '@bingads-webui-campaign/injection-context';\r\n\r\nimport pkg from './package.json';\r\n\r\nexport const AccountsGrid = globalContext.define(\r\n [...pkg.legacyDependencies, ...pkg.indexOnlyDependencies],\r\n Promise => import(/* webpackMode: 'eager' */ './src/index') // eslint-disable-line no-unused-vars\r\n);\r\n\r\nexport { getSharedColumnConfiguration } from './src/columns/shared-column-configuration';\r\n\r\nexport const getAccountsGridFactory = (initializeGlobalContext = true) => {\r\n if (initializeGlobalContext) {\r\n return globalContext.define(\r\n pkg.legacyDependencies,\r\n Promise => import(/* webpackMode: 'eager' */ './src/accounts-grid-factory') // eslint-disable-line no-unused-vars\r\n );\r\n }\r\n return import(/* webpackMode: 'eager' */ './src/accounts-grid-factory'); // eslint-disable-line no-unused-vars\r\n};\r\n\r\nexport { gridsType, gridsMap } from './src/constants';\r\nexport { ScheduledImportPopup } from './src/helper/scheduled-import-popup';\r\n","import _ from 'underscore';\r\n\r\nimport { uncheckedInjectionContext as globalContext } from '@bingads-webui-campaign/injection-context';\r\nimport { Constants, AccountUtils } from '@bingads-webui-clientcenter/entity-utils';\r\nimport { FormUtils } from '@bingads-webui-clientcenter/common-utils';\r\nimport { set } from '@bingads-webui/cookie';\r\n\r\nimport { isInManagementTab } from '../helper/management-dashboard-helper';\r\nimport * as CommonUtils from '../common-utils';\r\nimport { gridsMap } from '../constants';\r\n\r\nconst i18n = globalContext.require('@bingads-webui/i18n-amd-loader!campaignui/feature/accounts-summary');\r\nconst {\r\n bulkDeleteAccounts, bulkReactivateAccounts, bulkEditAbl, bulkEditManualHold,\r\n} = globalContext.require('campaignui/feature/bulk-action-accounts-grid/index');\r\nconst { setLoadDirectlyLinkedAccounts } = globalContext.require('component/bingads-grid/service/linked-accounts-preferences');\r\nconst { getCCUrl: ccUrl } = globalContext.require('component/bingads-grid/shared/clientcenter-url-helper');\r\nconst globalConfig = globalContext.require('component/config/index');\r\nconst bulkTransferAccounts = globalContext.requireDefault('campaignui/feature/bulk-transfer-accounts/index');\r\nconst bulkUnlinkAccounts = globalContext.requireDefault('campaignui/feature/bulk-unlink-accounts/index');\r\nconst singleUnlinkAccounts = globalContext.requireDefault('campaignui/feature/single-unlink-accounts/index');\r\nconst { getLoadDirectlyLinkedAccountsPreference } = globalContext.require('component/bingads-grid/service/linked-accounts-preferences');\r\nconst jsdataCampaign = globalContext.require('component/js-data-campaign/index');\r\n\r\nconst { isManualHold, isDeleted: isAccountDeleted } = AccountUtils;\r\nconst { PaymentOption } = Constants;\r\n\r\nconst {\r\n navigate,\r\n currentCid,\r\n currentUid,\r\n isInImportTab,\r\n isInPerformanceTab,\r\n isInSmartPerformanceTab,\r\n isManagerAccount,\r\n getGridPermissions,\r\n currentCustomer,\r\n} = CommonUtils;\r\n\r\nconst {\r\n IsCustomerHierarchyEnabled,\r\n IsManagementDashboardEnabled,\r\n IsOBOAgencyCreateAccountEnabled,\r\n} = globalConfig.get('Permissions');\r\n\r\nconst BulkEditMenuItemIds = {\r\n PrimaryContactId: 'dropdown_bulkEdit_primary_contact',\r\n BusinessLocationId: 'dropdown_bulkEdit_business_location',\r\n ApplyHoldId: 'dropdown_bulkEdit_apply_hold',\r\n RemoveHoldId: 'dropdown_bulkEdit_remove_hold',\r\n};\r\n\r\nconst AccountUrls = {\r\n AccountsBillingUrl: 'accounts',\r\n CreateAccountUrl: 'account/create',\r\n CreateAccountUrlOBO: 'customers/createcustomer',\r\n ExportAccountsUrl: 'accounts/RenderExcel',\r\n LinkaccountsUrl: 'agency/sendinvite',\r\n};\r\n\r\nconst {\r\n AccountsBillingUrl,\r\n CreateAccountUrl,\r\n CreateAccountUrlOBO,\r\n ExportAccountsUrl,\r\n LinkaccountsUrl,\r\n} = AccountUrls;\r\n\r\nconst {\r\n PrimaryContactId,\r\n BusinessLocationId,\r\n ApplyHoldId,\r\n RemoveHoldId,\r\n} = BulkEditMenuItemIds;\r\n\r\nconst extractToolbarItems = toolbar => (toolbar.get() || {}).items;\r\n\r\nconst updateBulkEditMenuHandler = (toolbar, itemId, onClickHandler) => {\r\n const bulkEditConfig = _.findWhere(extractToolbarItems(toolbar), { id: 'dropdown_bulkEdit' });\r\n\r\n if (bulkEditConfig && bulkEditConfig.menu) {\r\n const itemConfig = _.findWhere(bulkEditConfig.menu.items, { id: itemId });\r\n\r\n itemConfig.onClick = onClickHandler;\r\n toolbar.update(bulkEditConfig);\r\n }\r\n};\r\n\r\nconst setToolbarMenuEnable = (toolbar, id, enabled) => {\r\n const bulkEditConfig = _.findWhere(extractToolbarItems(toolbar), { id });\r\n\r\n if (bulkEditConfig && !bulkEditConfig.disabled !== enabled) {\r\n bulkEditConfig.disabled = !enabled;\r\n toolbar.update(bulkEditConfig);\r\n }\r\n};\r\n\r\nconst setDropdownOptionEnabled = (toolbar, dropDownId, menuItemId, enabled) => {\r\n const dropDown = _.findWhere(extractToolbarItems(toolbar), { id: dropDownId });\r\n const bulkEditConfig = _.findWhere(dropDown.menu.items, { id: menuItemId });\r\n\r\n if (bulkEditConfig && bulkEditConfig.disabled !== !enabled) {\r\n bulkEditConfig.disabled = !enabled;\r\n bulkEditConfig.classes = enabled ? [] : ['disabled-dropdown-item'];\r\n toolbar.update(bulkEditConfig);\r\n }\r\n};\r\n\r\n// This function is duplicated in ui-next due to globalContext injection requirement to be used, and can be deleted when ui-next is GAed\r\nconst forceAccountsGridRefresh = ({\r\n gridView,\r\n}) => {\r\n // To refresh the grid, we actually need to destroy the accounts from jsdata cache, so a new oData call get trigger to the server and new data get updated\r\n // gridView.refresh(true); needs to be call after data is invalidated otherwise the same set of data will be returned, without any network call\r\n // We also need to deselect the current grid selection to avoid unexpected behavior with selected items not updated in the model, even though the checkboxes are unselected correctly\r\n const invalidateAccountsData = jsdataCampaign.Account.destroyAll();\r\n invalidateAccountsData.then(() => {\r\n gridView.deselectAll();\r\n gridView.refresh(true);\r\n });\r\n};\r\n\r\n// Field \"OwnerId\" is assigned to the agency customer (special usage) or parent customer in current hierarchy when Hierarchy feature is on\r\n// As temporary solution, use \"ManagerAccounts\" to determine if the account is linked or owned by current customer before Hierarchy feature GA.\r\nconst isAgencyOfAccount = (account, customerId) =>\r\n !_.isEmpty(account.ManagerAccounts) && _.any(account.ManagerAccounts, manager => manager.Id === customerId);\r\n\r\nconst transferAccounts = ({\r\n gridView,\r\n}) => {\r\n const selectedAccounts = gridView.selectedItems();\r\n\r\n bulkTransferAccounts({ selectedAccounts, customerId: currentCid(), userId: currentUid() });\r\n};\r\n\r\nconst unlinkAccounts = ({\r\n gridView,\r\n}) => {\r\n const selectedAccounts = gridView.selectedItems();\r\n\r\n if (IsCustomerHierarchyEnabled) {\r\n bulkUnlinkAccounts({\r\n selectedAccounts,\r\n customerId: currentCid(),\r\n userId: currentUid(),\r\n onConfirm: (revisedModel, redirectUri) => {\r\n FormUtils.postRedirect({\r\n url: redirectUri,\r\n fields: [\r\n {\r\n name: 'unlinkacc',\r\n value: JSON.stringify(revisedModel),\r\n },\r\n ],\r\n });\r\n },\r\n });\r\n } else {\r\n singleUnlinkAccounts({\r\n currentCid: currentCid(), userId: currentUid(), managedAccount: selectedAccounts[0], managingCustomer: currentCustomer(),\r\n });\r\n }\r\n};\r\n\r\nconst bulkABL = ({\r\n gridView,\r\n}) => {\r\n const selectedAccounts = gridView.selectedItems();\r\n const cid = currentCid();\r\n const uid = currentUid();\r\n\r\n bulkEditAbl({\r\n selectedAccounts, customerId: cid, userId: uid,\r\n });\r\n};\r\n\r\nconst bulkManualHold = ({\r\n gridView,\r\n isApplyHold,\r\n}) => {\r\n const selectedAccounts = gridView.selectedItems();\r\n\r\n bulkEditManualHold({\r\n selectedAccounts, isApplyHold, successCallback: () => forceAccountsGridRefresh({ gridView }),\r\n });\r\n};\r\n\r\nconst updateToolbarMenuHandler = ({\r\n view: {\r\n gridView,\r\n primaryContactBulkEditor,\r\n toolbarFacade: { currentToolbar },\r\n },\r\n}) => {\r\n primaryContactBulkEditor.registerToolbar(currentToolbar);\r\n updateBulkEditMenuHandler(currentToolbar, PrimaryContactId, () => primaryContactBulkEditor.show({\r\n cid: currentCid(),\r\n uid: currentUid(),\r\n callBack: () => forceAccountsGridRefresh({ gridView }),\r\n }));\r\n updateBulkEditMenuHandler(currentToolbar, BusinessLocationId, () => bulkABL({ gridView }));\r\n\r\n updateBulkEditMenuHandler(currentToolbar, ApplyHoldId, () => bulkManualHold({ gridView, isApplyHold: true }));\r\n updateBulkEditMenuHandler(currentToolbar, RemoveHoldId, () => bulkManualHold({ gridView, isApplyHold: false }));\r\n};\r\n\r\nconst updateToolbarCustomerHierarchySelector = ({\r\n currentToolbar,\r\n gridName,\r\n}) => {\r\n getLoadDirectlyLinkedAccountsPreference(gridName).then(({ loadDirectlyLinkedAccounts }) => {\r\n const update = {\r\n id: 'accountsSelection_selector',\r\n selectedKey: loadDirectlyLinkedAccounts ? 'accountsSelection_showLinkedAccounts' : 'accountsSelection_showAllAccounts',\r\n };\r\n currentToolbar.update(update);\r\n });\r\n};\r\n\r\nconst customerHierarchySelector = {\r\n type: 'selector',\r\n id: 'accountsSelection_selector',\r\n selectedKey: 'accountsSelection_showLinkedAccounts',\r\n items: [{\r\n text: i18n.getString('AccountsSelection_showAllAccounts'),\r\n key: 'accountsSelection_showAllAccounts',\r\n }, {\r\n text: i18n.getString('AccountsSelection_showDirectlyLinkedAccounts'),\r\n key: 'accountsSelection_showLinkedAccounts',\r\n }],\r\n};\r\n\r\nconst importGridSelector = {\r\n type: 'text-view',\r\n text: i18n.getString('AccountsSelection_ShowingDirectlyLinkedAccountsOnly'),\r\n};\r\n\r\nconst createAccountButton = {\r\n type: 'button',\r\n id: 'create-account',\r\n text: i18n.getString('Menu_CreateAccount'),\r\n classes: ['btn', 'btn-hero'],\r\n onClick: () => {\r\n const createAccountOBOUrl = ccUrl(CreateAccountUrlOBO, { cid: currentCid(), rurl: window.location.href });\r\n const creationUrl = IsManagementDashboardEnabled ?\r\n ccUrl(CreateAccountUrl, { cid: currentCid(), uid: currentUid() }) :\r\n ccUrl(AccountsBillingUrl, { cid: currentCid(), uid: currentUid(), ecaf: true });\r\n const url = IsOBOAgencyCreateAccountEnabled ? createAccountOBOUrl : creationUrl;\r\n navigate(url);\r\n },\r\n};\r\n\r\nconst deleteAccountButton = {\r\n type: 'button',\r\n id: 'delete-account',\r\n text: i18n.getString('Menu_DeleteAccount'),\r\n classes: ['btn', 'btn-secondary'],\r\n disabled: true,\r\n};\r\n\r\nconst reactivateAccountButton = {\r\n type: 'button',\r\n id: 'reactivate-account',\r\n text: i18n.getString('Menu_ReactivateAccount'),\r\n classes: ['btn', 'btn-secondary'],\r\n disabled: true,\r\n};\r\n\r\nconst linkAccountButton = {\r\n type: 'button',\r\n id: 'link-account',\r\n text: i18n.getString('Menu_LinkAccount'),\r\n classes: ['btn', 'btn-secondary'],\r\n onClick: () => navigate(ccUrl(LinkaccountsUrl, { cid: currentCid(), uid: currentUid() })),\r\n};\r\n\r\nconst unlinkButton = {\r\n type: 'button',\r\n id: 'unlink-account',\r\n text: i18n.getString('Menu_UnlinkAccount'),\r\n classes: ['btn', 'btn-secondary'],\r\n disabled: true,\r\n};\r\n\r\nconst transferButton = {\r\n type: 'button',\r\n id: 'transfer-account',\r\n text: i18n.getString('Menu_TransferAccount'),\r\n classes: ['btn', 'btn-secondary'],\r\n disabled: true,\r\n};\r\n\r\nconst bulkEditDropdown = {\r\n type: 'dropdown',\r\n id: 'dropdown_bulkEdit',\r\n button: {\r\n text: i18n.getString('GridToolbar_FilterBar_Edit'),\r\n },\r\n classes: ['btn-secondary'],\r\n disabled: true,\r\n menu: {\r\n items: [{\r\n text: i18n.getString('ColumnName_PrimaryContact'),\r\n id: PrimaryContactId,\r\n }, {\r\n text: i18n.getString('ColumnName_BusinessLocation'),\r\n id: BusinessLocationId,\r\n }],\r\n },\r\n};\r\n\r\nconst bulkManualHoldMenuItems = [{\r\n classes: ['divider'],\r\n}, {\r\n text: i18n.getString('BulkEditDropDownName_ApplyHold'),\r\n id: ApplyHoldId,\r\n}, {\r\n text: i18n.getString('BulkEditDropDownName_RemoveHold'),\r\n id: RemoveHoldId,\r\n}];\r\n\r\nconst exportButton = {\r\n type: 'button',\r\n id: 'export-account',\r\n text: i18n.getString('Grid_ExportButtonText'),\r\n classes: ['btn', 'btn-secondary'],\r\n onClick: () => navigate(ccUrl(ExportAccountsUrl, { cid: currentCid(), uid: currentUid() })),\r\n};\r\n\r\nconst editDropdown = {\r\n type: 'dropdown',\r\n id: 'dropdown-edit',\r\n};\r\nconst downloadButton = {\r\n type: 'button',\r\n id: 'button-download',\r\n};\r\nconst segmentDropdown = {\r\n type: 'dropdown',\r\n id: 'dropdown-segment',\r\n button: {\r\n text: 'Segment',\r\n },\r\n};\r\nconst columnChooserDropdown = {\r\n type: 'dropdown',\r\n id: 'dropdown-column-chooser',\r\n};\r\nconst dropdownFilter = {\r\n type: 'dropdown',\r\n id: 'dropdown-filter',\r\n};\r\nconst searchBoxFilter = {\r\n type: 'search-box',\r\n id: 'search-box-filter',\r\n};\r\nconst importFromGoogleAdsButton = {\r\n type: 'button',\r\n id: 'import-from-googleads',\r\n text: i18n.getString('Import_GoogleSource_Rebrand'),\r\n classes: ['btn', 'btn-hero'],\r\n};\r\n\r\nexport const getToolbarItems = ({\r\n gridType,\r\n isForVNext,\r\n}) => {\r\n let toolbarItems = [];\r\n\r\n const gridPermissions = getGridPermissions({ gridType });\r\n const isImportGrid = isInImportTab(gridType);\r\n const isPerformanceGrid = isInPerformanceTab(gridType);\r\n const isSmartPerformanceGrid = isInSmartPerformanceTab(gridType);\r\n\r\n\r\n if (_.every(bulkEditDropdown.menu.items, s => s.id !== ApplyHoldId)) {\r\n bulkEditDropdown.menu.items = [\r\n ...bulkEditDropdown.menu.items,\r\n ...bulkManualHoldMenuItems,\r\n ];\r\n }\r\n\r\n toolbarItems = _.union(toolbarItems, _.compact([\r\n gridPermissions.createAccount && createAccountButton,\r\n gridPermissions.checkAndDeleteAccount && deleteAccountButton,\r\n gridPermissions.checkAndReactivateAccount && reactivateAccountButton,\r\n gridPermissions.linkAccount && linkAccountButton,\r\n gridPermissions.checkAndUnlinkAccount && unlinkButton,\r\n gridPermissions.checkAndTransferAccount && isForVNext && transferButton,\r\n gridPermissions.checkAndEditAccount && bulkEditDropdown,\r\n gridPermissions.exportAccount && exportButton,\r\n ]));\r\n\r\n if (isPerformanceGrid || isSmartPerformanceGrid) {\r\n // performance tab\r\n toolbarItems = _.union(toolbarItems, [editDropdown, downloadButton, columnChooserDropdown, segmentDropdown, dropdownFilter, searchBoxFilter]);\r\n } else if (isImportGrid) {\r\n toolbarItems = _.union([importFromGoogleAdsButton], [dropdownFilter, searchBoxFilter]);\r\n } else {\r\n // management tab\r\n toolbarItems = _.union(toolbarItems, [editDropdown, columnChooserDropdown, dropdownFilter, searchBoxFilter]);\r\n }\r\n\r\n if (IsCustomerHierarchyEnabled) {\r\n toolbarItems = _.union(toolbarItems, [isImportGrid ? importGridSelector : customerHierarchySelector]);\r\n }\r\n\r\n return toolbarItems;\r\n};\r\n\r\n// Enable/disable the toolbar menu based on selection\r\nexport const updateToolbarAfterSelection = ({\r\n view: {\r\n gridView,\r\n primaryContactBulkEditor,\r\n toolbarFacade: { currentToolbar },\r\n },\r\n gridType,\r\n}) => {\r\n const selectedAccounts = gridView.selectedItems();\r\n const hasSelection = selectedAccounts.length > 0;\r\n\r\n if (IsCustomerHierarchyEnabled) {\r\n setToolbarMenuEnable(currentToolbar, unlinkButton.id, hasSelection);\r\n } else if (IsManagementDashboardEnabled) {\r\n const singleAccountSelection = selectedAccounts.length === 1;\r\n const singleLinkedAccountSelected = singleAccountSelection && isAgencyOfAccount(selectedAccounts[0], currentCid());\r\n\r\n setToolbarMenuEnable(currentToolbar, unlinkButton.id, singleLinkedAccountSelected);\r\n }\r\n\r\n if (isInManagementTab(gridType)) {\r\n const onlyAdAccounts = !_.some(selectedAccounts, account => isManagerAccount(account));\r\n const onlyDeletedAccountSelected = hasSelection && _.every(selectedAccounts, account => isAccountDeleted(account));\r\n const noDeletedAccountSelected = hasSelection && !_.some(selectedAccounts, account => isAccountDeleted(account));\r\n const bulkEditDropdownEnabled = onlyAdAccounts && noDeletedAccountSelected;\r\n\r\n setToolbarMenuEnable(currentToolbar, bulkEditDropdown.id, bulkEditDropdownEnabled);\r\n setToolbarMenuEnable(currentToolbar, deleteAccountButton.id, onlyAdAccounts && noDeletedAccountSelected);\r\n setToolbarMenuEnable(currentToolbar, reactivateAccountButton.id, onlyAdAccounts && onlyDeletedAccountSelected);\r\n\r\n // Update manual hold option\r\n if (bulkEditDropdownEnabled) {\r\n const isAllInvoiceAccount = hasSelection && _.every(selectedAccounts, account => _.isObject(account) && PaymentOption.Invoice === account.PaymentOption);\r\n const onlyUnManualHoldAccountSelected = isAllInvoiceAccount && _.every(selectedAccounts, account => !isManualHold(account));\r\n const onlyManualHoldAccountSelected = isAllInvoiceAccount && _.every(selectedAccounts, account => isManualHold(account));\r\n\r\n setDropdownOptionEnabled(currentToolbar, bulkEditDropdown.id, ApplyHoldId, onlyUnManualHoldAccountSelected);\r\n setDropdownOptionEnabled(currentToolbar, bulkEditDropdown.id, RemoveHoldId, onlyManualHoldAccountSelected);\r\n }\r\n\r\n // Update Primary Contact plugin when selected accounts changes on the grid.\r\n if (primaryContactBulkEditor.isInEditing()) {\r\n primaryContactBulkEditor.show(currentCid(), currentUid());\r\n }\r\n }\r\n};\r\n\r\nexport const updateToolbarAfterGridInitialized = ({\r\n view,\r\n view: {\r\n gridView,\r\n toolbarFacade: { currentToolbar, updateButtonConfig },\r\n },\r\n gridType,\r\n}) => {\r\n const { gridName } = gridsMap[gridType];\r\n\r\n if (IsCustomerHierarchyEnabled) {\r\n updateToolbarCustomerHierarchySelector({ currentToolbar, gridName });\r\n }\r\n\r\n updateButtonConfig({\r\n itemId: deleteAccountButton.id,\r\n toolbarConfig: {\r\n onClick: () => {\r\n const selectedAccounts = gridView.selectedItems();\r\n bulkDeleteAccounts({ selectedAccounts, successCallback: () => forceAccountsGridRefresh({ gridView }) });\r\n },\r\n },\r\n });\r\n\r\n updateButtonConfig({\r\n itemId: customerHierarchySelector.id,\r\n toolbarConfig: {\r\n onChange: (item) => {\r\n setLoadDirectlyLinkedAccounts(gridName, item.key === 'accountsSelection_showAllAccounts' ? 'false' : 'true').then(() => {\r\n gridView.refresh(true);\r\n });\r\n },\r\n },\r\n });\r\n\r\n updateButtonConfig({\r\n itemId: reactivateAccountButton.id,\r\n toolbarConfig: {\r\n onClick: () => {\r\n const selectedAccounts = gridView.selectedItems();\r\n bulkReactivateAccounts({ selectedAccounts, successCallback: () => forceAccountsGridRefresh({ gridView }) });\r\n },\r\n },\r\n });\r\n\r\n updateButtonConfig({\r\n itemId: unlinkButton.id,\r\n toolbarConfig: {\r\n onClick: () => unlinkAccounts({ gridView }),\r\n },\r\n });\r\n\r\n updateButtonConfig({\r\n itemId: transferButton.id,\r\n toolbarConfig: {\r\n onClick: () => transferAccounts({ gridView }),\r\n },\r\n });\r\n\r\n if (isInManagementTab(gridType)) {\r\n // TODO: Task 2178697: Bulk primary contact top-of-grid form\r\n // TODO: Task 2194573: Migrate the bulk edit logic\r\n updateToolbarMenuHandler({ view });\r\n }\r\n\r\n if (isInImportTab(gridType)) {\r\n updateButtonConfig({\r\n itemId: importFromGoogleAdsButton.id,\r\n toolbarConfig: {\r\n onClick: () => {\r\n const selectedAccounts = gridView.selectedKeys();\r\n // reserve task item id in cookie\r\n set('multi-account-presseleced-account-ids', selectedAccounts.join(','));\r\n navigate(`/Campaign/AccountsSummary?cid=${currentCid()}&uid=${currentUid()}#customer/${currentCid()}/import-accounts/googleImport`);\r\n },\r\n },\r\n });\r\n }\r\n};\r\n\r\n","import _ from 'underscore';\r\nimport Backbone from 'backbone';\r\n\r\nimport { uncheckedInjectionContext as globalContext } from '@bingads-webui-campaign/injection-context';\r\nimport { pgridFactory } from '@bingads-webui-campaign/pgrid-factory';\r\nimport { updateGridQuery } from '@bingads-webui-campaign/summary-grid-helper';\r\nimport { PageReady } from '@bingads-webui/page-ready';\r\n\r\nimport { gridsMap } from './constants';\r\nimport { isInManagementTab, updateDynamicColumnWidth } from './helper/management-dashboard-helper';\r\nimport { updateToolbarAfterSelection, updateToolbarAfterGridInitialized } from './plugins/toolbar-config';\r\nimport { getToolbarFacade } from './plugins/toolbar-facade';\r\n\r\nconst edm = globalContext.requireDefault('component/edm-campaign/index');\r\nconst eventDispatcher = globalContext.requireDefault('component/event-dispatcher/index');\r\nconst state = globalContext.require('component/state/index');\r\nconst logger = globalContext.require('module/service/instrumentation/index');\r\nconst { handleSortChange } = globalContext.require('campaignui/feature/bingadsgrid/service/state-manager-helper');\r\n\r\nlogger.logActivityMarker('AccountsGrid.Module.Loaded');\r\n\r\nedm.customerIdType.useAdvertiserCustomerId = false;\r\n\r\nexport class AccountsGrid extends Backbone.View {\r\n initialize({\r\n className = '',\r\n gridType,\r\n getGridConfig,\r\n getPlugins,\r\n filterService,\r\n pageName = '',\r\n isForVNext,\r\n }) {\r\n const perfDurationMarker = logger.logActivityDurationMarker(`AccountsGrid.${gridType}.initialize`);\r\n\r\n this.gridType = gridType;\r\n this.filterService = filterService;\r\n this.pageName = pageName;\r\n this.isForVNext = isForVNext;\r\n this.classNames = ['grid'];\r\n if (className) {\r\n this.classNames.push(className);\r\n }\r\n\r\n this.gridName = gridsMap[gridType].gridName;\r\n\r\n const perfGridViewCreateDurationMarker = logger.logActivityDurationMarker(`AccountsGrid.${gridType}.initialize.GridView.Create`);\r\n\r\n const {\r\n gridView,\r\n toolbar,\r\n columnChooser,\r\n filter,\r\n filterState,\r\n pagination,\r\n inlineDownload,\r\n primaryContactBulkEditor,\r\n dateFilter,\r\n } = pgridFactory({\r\n gridConfig: getGridConfig(this),\r\n plugins: getPlugins(this),\r\n });\r\n\r\n perfGridViewCreateDurationMarker.markEnd();\r\n\r\n if (!isForVNext) {\r\n state.on('change:$ReportEmailRule', (model, Rule) => {\r\n if (Rule) {\r\n inlineDownload.setReportEmailRule(Rule);\r\n state.unset('$ReportEmailRule');\r\n }\r\n });\r\n }\r\n\r\n this.gridView = gridView;\r\n this.toolbar = toolbar;\r\n this.columnChooser = columnChooser;\r\n this.filter = filter;\r\n this.filterState = filterState;\r\n this.pagination = pagination;\r\n this.inlineDownload = inlineDownload;\r\n this.primaryContactBulkEditor = primaryContactBulkEditor;\r\n this.toolbarFacade = getToolbarFacade({ view: this, isForVNext });\r\n this.dateFilter = dateFilter;\r\n\r\n if (!isForVNext) {\r\n updateToolbarAfterGridInitialized({ view: this, gridType });\r\n\r\n this.gridView.on('didUpdate', () => {\r\n if (isInManagementTab(gridType)) {\r\n updateDynamicColumnWidth();\r\n }\r\n updateToolbarAfterSelection({ view: this, gridType });\r\n });\r\n\r\n this.gridView.on('didSelect', () => {\r\n updateToolbarAfterSelection({ view: this, gridType });\r\n });\r\n }\r\n\r\n // Only track this for the first load of given grid.\r\n this.gridView.once('willReload', () => {\r\n logger.logActivityMarker(`AccountsGrid.${gridType}.gridView.dataFetchStart`);\r\n eventDispatcher.trigger('accounts-summary.grid-data-fetch');\r\n });\r\n\r\n let initialGrid = true;\r\n this.gridView.on('willUpdate', (changes) => {\r\n if (initialGrid) {\r\n initialGrid = false;\r\n return;\r\n }\r\n\r\n handleSortChange(changes, this.gridView, this.gridName);\r\n });\r\n\r\n this.gridView.once('didReload', () => {\r\n this.gridView.once('didRedraw', () => {\r\n PageReady.pageIsReady(this.pageName);\r\n }, this);\r\n });\r\n\r\n if (this.filterService) {\r\n this.filterService.on('filter-state-changed', () => {\r\n updateGridQuery(this.gridView, this.filterService.getCombinedFilter(), true);\r\n });\r\n }\r\n\r\n // need to handle the page number here, since legacy paginationPlugin will be used if DFM enabled\r\n if (this.gridView.get('isDataFetchManagerSource') && this.pagination) {\r\n this.pagination.on('change:page-number', (pageNumber) => {\r\n this.setPageNumberToState(pageNumber);\r\n });\r\n }\r\n\r\n perfDurationMarker.markEnd();\r\n return this;\r\n }\r\n\r\n setPageNumberToState(number) {\r\n state.set('pgridPageNumber', _.defaults({\r\n [this.gridName]: number,\r\n }, state.get('pgridPageNumber') || {}));\r\n }\r\n\r\n render() {\r\n const perfDurationMarker = logger.logActivityDurationMarker(`AccountsGrid.${this.gridType}.gridView.render`);\r\n\r\n if (this.filterService) {\r\n this.filterService.refreshSource();\r\n this.filterService.initializeCombinedFilterPromise.then(() => {\r\n updateGridQuery(this.gridView, this.filterService.getCombinedFilter(), true);\r\n });\r\n }\r\n\r\n this.gridView.render(() => perfDurationMarker.markEnd());\r\n this.$el.append(this.gridView.el);\r\n\r\n return this;\r\n }\r\n\r\n remove() {\r\n if (this.gridView) {\r\n this.gridView.remove();\r\n }\r\n if (this.toolbar.gridToolbarGroup) {\r\n this.toolbar.gridToolbarGroup.remove();\r\n }\r\n if (this.columnChooser) {\r\n this.columnChooser.remove();\r\n }\r\n if (this.filter) {\r\n this.filter.remove();\r\n }\r\n if (this.inlineDownload) {\r\n this.inlineDownload.remove();\r\n }\r\n this.setPageNumberToState(0);\r\n super.remove();\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\nexport const getToolbarFacade = ({ view, isForVNext }) => {\r\n const currentToolbar = isForVNext ?\r\n view.toolbar.gridToolbarGroup.toolbarWithName() :\r\n view.toolbar.gridToolbarGroup.toolbars['default-toolbar'];\r\n\r\n const updateButtonConfig = ({ itemId, toolbarConfig }) => {\r\n if (isForVNext) {\r\n currentToolbar.update({ id: itemId, ...toolbarConfig });\r\n } else {\r\n const itemConfig = _.findWhere(currentToolbar.get().items, { id: itemId });\r\n if (itemConfig) {\r\n const newToolbarConfig = _.extend({}, itemConfig, toolbarConfig);\r\n currentToolbar.update(newToolbarConfig);\r\n }\r\n }\r\n };\r\n\r\n return {\r\n currentToolbar,\r\n updateButtonConfig,\r\n };\r\n};\r\n\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\n\r\nimport { uncheckedInjectionContext as globalContext } from '@bingads-webui-campaign/injection-context';\r\nimport * as putil from '@bingads-webui-universal/primitive-utilities';\r\n\r\nconst { showSummaryDetailsPopup } = globalContext.require('campaignui/feature/scheduled-import/view/shared-column-configs/import-summary-col');\r\nconst jsdataCampaign = globalContext.require('component/js-data-campaign/index');\r\n\r\nconst importSchemaExtensionForFilter = {\r\n ImportName: {\r\n filterable: true,\r\n },\r\n EntityIdsSpecified: {\r\n chooseType: 'radio-boolean',\r\n filterable: true,\r\n operators: ['eq'],\r\n },\r\n};\r\n\r\nfunction findImportTaskItem(id) {\r\n return jsdataCampaign.TaskItem.find(id, {\r\n cacheResponse: false,\r\n });\r\n}\r\n\r\nexport function updateEntitySchemaForImport(originalSchema, copy = true) {\r\n const schema = (copy ? putil.cloneDeep : _.identity)(originalSchema);\r\n const lastImportInfo = putil.get(schema, 'properties.LastImportInfo');\r\n const lastImportInfoProperties = putil.get(lastImportInfo, 'schema.properties');\r\n\r\n if (lastImportInfoProperties) {\r\n _.each(lastImportInfoProperties, (prop, propName) => {\r\n _.extend(prop, importSchemaExtensionForFilter[propName]);\r\n });\r\n }\r\n return schema;\r\n}\r\n\r\nexport function getImportStatusFilterOptions(originalOptions) {\r\n const importGridFilterableFields = _.union(['Name', 'AccountInactiveReasons'], _.keys(importSchemaExtensionForFilter));\r\n\r\n // eslint-disable-next-line no-param-reassign\r\n originalOptions.fields = _.filter(originalOptions.fields, field => _.contains(importGridFilterableFields, field.name));\r\n return originalOptions;\r\n}\r\n\r\nexport function removeImportStatusFilterOptions(originalFields) {\r\n return _.reject(originalFields, field => _.contains(_.keys(importSchemaExtensionForFilter), field.name));\r\n}\r\n\r\nexport function showImportSummaryDetailsPopup(e, account, i18n) {\r\n // file import-summary-col is already loaded to render import summary column, so no need to make it lazy load.\r\n showSummaryDetailsPopup(e, account.LastImportInfo, i18n, findImportTaskItem);\r\n}\r\n\r\nexport function loadShowScheduledImportPopup() {\r\n return new Promise((resolve) => {\r\n const deps = [\r\n '@bingads-webui/i18n-amd-loader!campaignui/feature/accounts-summary',\r\n 'component/i18n/loader!legacy/global',\r\n '$/schema!campaign/ImportTaskItem',\r\n 'campaignui/feature/bingadsgrid/template/status-column',\r\n 'campaignui/feature/scheduled-import/template/import-schedule-name',\r\n 'campaignui/feature/scheduled-import/view/import-schedule-constants',\r\n 'campaignui/feature/scheduled-import/view/shared-column-configs/import-freq-col',\r\n 'component/edm-campaign/index',\r\n 'component/js-data-campaign/index',\r\n ];\r\n window.require(deps, () => {\r\n import(/* webpackMode: 'eager' */ './show-scheduled-import-popup')\r\n .then(resolve);\r\n });\r\n });\r\n}\r\n","import { uncheckedInjectionContext as globalContext } from '@bingads-webui-campaign/injection-context';\r\n\r\nimport { column } from '../common-utils';\r\nimport scheduledImportColTmpl from '../template/scheduled-import-column.pug';\r\n\r\nconst i18nGlobal = globalContext.require('$/i18n!legacy/global');\r\nconst i18nLocal = globalContext.require('@bingads-webui/i18n-amd-loader!campaignui/feature/accounts-summary');\r\n\r\nconst importFreqColumnTmpl = globalContext.require('campaignui/feature/scheduled-import/template/freq-column');\r\nconst importLogNameTmpl = globalContext.require('campaignui/feature/scheduled-import/template/import-log-name');\r\nconst creatorColumnTmpl = globalContext.require('campaignui/feature/scheduled-import/template/creator-column');\r\nconst { importSummaryColDataToTemplate } = globalContext.require('campaignui/feature/scheduled-import/view/shared-column-configs/import-summary-col');\r\n\r\nexport const importTabColumnsConfig = ({ isForVNext }) => ([\r\n column({\r\n name: 'LastImportDateAndTime',\r\n title: 'ColumnName_LastGoogleImportDateAndTime',\r\n property: 'LastImportInfo/StartDateTime',\r\n sortable: true,\r\n type: 'date',\r\n i18n: i18nLocal,\r\n template: ({ value }) => importFreqColumnTmpl({ Freq: value && i18nLocal.formatDate(new Date(value), { datetime: 'full' }) }),\r\n }),\r\n column({\r\n name: 'LastImportName',\r\n title: 'ColumnName_LastImportName',\r\n property: 'LastImportInfo',\r\n sortable: 'LastImportInfo/ImportName',\r\n type: 'string',\r\n template: ({ value }) => (value ? importLogNameTmpl({ name: value.ImportName || i18nGlobal.getString('QualityScore_NA') }) : '-'),\r\n i18n: i18nLocal,\r\n }),\r\n column({\r\n name: 'LastImportCreatedBy',\r\n title: 'ColumnName_LastImportCreatedBy',\r\n property: 'LastImportInfo',\r\n sortable: false,\r\n type: 'string',\r\n template: ({ value }) => (value && value.UserName && value.ModifiedAt ? creatorColumnTmpl({\r\n Creator: value.UserName,\r\n DateTime: i18nLocal.formatDate(new Date(value.ModifiedAt), { date: 'full' }),\r\n Time: i18nLocal.formatDate(new Date(value.ModifiedAt), { time: 'medium' }),\r\n }) : '-'),\r\n i18n: i18nLocal,\r\n }),\r\n column({\r\n name: 'LastImportTool',\r\n title: 'ColumnName_LastImportTool',\r\n helpId: 'Pop_BA_Import_Acct_ImportedFrom',\r\n property: {\r\n get({ LastImportInfo }) {\r\n return LastImportInfo && i18nLocal.getString(`LastImportTool_${LastImportInfo.SessionType === 'BAECloudImport' ? 'MAECloud' : 'WebClient'}`);\r\n },\r\n key: ['LastImportInfo/SessionType'],\r\n },\r\n sortable: false,\r\n type: 'string',\r\n i18n: i18nLocal,\r\n }),\r\n column({\r\n name: 'LastImportScope',\r\n title: 'ColumnName_LastImportScope',\r\n helpId: 'Pop_BA_Import_Acct_Level',\r\n property: {\r\n get({ LastImportInfo }) {\r\n return LastImportInfo && i18nLocal.getString(`LastImportScope_${LastImportInfo.EntityIdsSpecified ? 'Specific' : 'All'}`);\r\n },\r\n key: ['LastImportInfo/EntityIdsSpecified'],\r\n },\r\n sortable: false,\r\n type: 'string',\r\n i18n: i18nLocal,\r\n }),\r\n column({\r\n name: 'LastImportSummary',\r\n title: 'ColumnName_LastImportSummary',\r\n helpId: 'Pop_BA_Import_Acct_Summary',\r\n property: 'LastImportInfo',\r\n sortable: false,\r\n type: 'string',\r\n i18n: i18nLocal,\r\n template: ({ value }) => importSummaryColDataToTemplate(value, i18nLocal, true),\r\n }),\r\n column({\r\n name: 'ScheduledImports',\r\n title: 'ColumnName_ScheduledImports',\r\n property: 'Id',\r\n template: ({ value }) => scheduledImportColTmpl({ i18n: i18nLocal, Id: value, isForVNext }),\r\n i18n: i18nLocal,\r\n }),\r\n]);\r\n","import _ from 'underscore';\r\n\r\nimport { uncheckedInjectionContext as globalContext } from '@bingads-webui-campaign/injection-context';\r\nimport { Constants, TaxUtils, AccountUtils, AccountIdentityVerificationUtils } from '@bingads-webui-clientcenter/entity-utils';\r\nimport entityUtilLegacyString from '@bingads-webui-clientcenter/entity-utils-legacy-strings';\r\nimport { buildLegacyI18n } from '@bingads-webui/build-legacy-i18n';\r\n\r\nimport { currentCid, currentUid, isAccountItemRow, isAdAccount, isManagerAccount } from '../common-utils';\r\nimport { getSharedColumnConfiguration } from './shared-column-configuration';\r\nimport { EmptyColumnValue } from '../constants';\r\n\r\nimport actionsColumnTemplate from '../template/vnext/actions-column.pug';\r\nimport businessLocationColumnTemplate from '../template/vnext/business-location-column.pug';\r\nimport taxIdColumnTemplate from '../template/vnext/tax-id-column.pug';\r\nimport textOverflowEllipsisTemplate from '../template/vnext/text-overflow-ellipsis.pug';\r\nimport accountVerificationStatusColumnTemplate from '../template/vnext/account-verification-status-column.pug';\r\n\r\nconst i18nGlobal = globalContext.require('$/i18n!legacy/global');\r\nconst i18n = globalContext.require('@bingads-webui/i18n-amd-loader!campaignui/feature/accounts-summary');\r\nconst { getCCUrl: ccUrl } = globalContext.require('component/bingads-grid/shared/clientcenter-url-helper');\r\nconst globalConfig = globalContext.require('component/config/index');\r\nconst { columnNames } = getSharedColumnConfiguration(globalConfig);\r\n\r\nconst { isDeleted: isAccountDeleted } = AccountUtils;\r\nconst {\r\n IsEditAccountEnabled,\r\n dynamic,\r\n} = globalConfig.get('Permissions');\r\n\r\nconst adAccountsSettingsUrl = 'settings/account';\r\nconst billingUrl = 'billing';\r\nconst managerAccountsSettingsUrl = 'settings/manageraccount';\r\nconst accountsUpdateSegments = 'accounts/update';\r\nconst IsChinaMarket = dynamic && dynamic.CNMarketExpansion;\r\nconst { getAccountAIVStatusForUI } = AccountIdentityVerificationUtils;\r\n\r\nconst formatAddressBusinessLocation = (accountItem) => {\r\n const emptyTextValue = { text: EmptyColumnValue };\r\n\r\n if (!isAdAccount(accountItem)) {\r\n return emptyTextValue;\r\n }\r\n\r\n const { Id, Country, PaymentInstrumentType } = accountItem;\r\n const localizedCountry = i18nGlobal.getString(`UserCountry_${Country}`);\r\n\r\n if (!_.isEmpty(localizedCountry)) {\r\n return {\r\n text: localizedCountry,\r\n };\r\n }\r\n\r\n if (PaymentInstrumentType !== Constants.PaymentInstrumentType.Invoice &&\r\n !isAccountDeleted(accountItem) &&\r\n IsEditAccountEnabled && _.isNumber(Id)) {\r\n return {\r\n text: i18n.getString('Account_BusinessLocation_EditLink'),\r\n url: ccUrl(accountsUpdateSegments, { accountIds: [Id], cid: currentCid(), uid: currentUid() }),\r\n };\r\n }\r\n return emptyTextValue;\r\n};\r\n\r\n// TODO: move to entity-utils constant\r\nconst VatStatusEnum = {\r\n Valid: 174,\r\n Invalid: 175,\r\n Pending: 176,\r\n PastDue: 177,\r\n};\r\n\r\n// TODO: move to entity-utils TaxUtils and give a doc of the background\r\nconst getTaxInfoStatusLocalized = (taxInfoArray, businessLocationCountry, vatStatus) => {\r\n const statusCss = vatStatus === VatStatusEnum.Invalid || vatStatus === VatStatusEnum.PastDue ? 'status-inactive' : '';\r\n // If we have tax information, then we can trust the country is texable country because we have this validation when update tax information. So we can show status depending on vatStatus when country and tax info are not empty.\r\n const statusText = !_.isEmpty(businessLocationCountry) && !_.isEmpty(taxInfoArray) && _.isNumber(vatStatus) ? i18n.getString(`AccountGrid_TaxInformation_VatStatus_${vatStatus}`) : '';\r\n\r\n return {\r\n statusCss,\r\n statusText,\r\n };\r\n};\r\n\r\nconst formatTaxIdColumn = (accountItem, newI18n) => {\r\n const emptyTaxInfo = { taxInfoArray: null };\r\n\r\n if (!isAdAccount(accountItem)) {\r\n return emptyTaxInfo;\r\n }\r\n\r\n const { Country, TaxInformation, VatStatus } = accountItem;\r\n const entityUtilLegacyI18n = buildLegacyI18n(newI18n, [{ ...entityUtilLegacyString, Account_RFCLabel: _TL_('RFC') }]);\r\n\r\n if (!_.isEmpty(Country) && !_.isEmpty(TaxInformation)) {\r\n const taxInfoArray = TaxUtils.mapToLocalizedTaxInfos(TaxInformation, entityUtilLegacyI18n, { countryCode: Country });\r\n // TODO: use TaxUtils.getTaxInfoStatusLocalized\r\n const { statusCss, statusText } = getTaxInfoStatusLocalized(taxInfoArray, Country, VatStatus);\r\n\r\n return {\r\n taxInfoArray,\r\n statusCss,\r\n statusText,\r\n };\r\n }\r\n return emptyTaxInfo;\r\n};\r\n\r\nexport const managementTabColumnsConfig = ({\r\n column, isForVNext, i18n: newI18n,\r\n}) => _.compact([\r\n column({\r\n name: 'AccountVerificationStatus',\r\n title: 'ColumnName_AccountVerificationStatus',\r\n sortable: 'AccountVerificationStatus',\r\n type: 'string',\r\n property: {\r\n get({ AccountVerificationStatus }) {\r\n // when the AIV status is invalid, MT gives a null value; when in the first/last row, the AIV status is undefined\r\n return AccountVerificationStatus !== undefined ?\r\n getAccountAIVStatusForUI({ i18n: newI18n, accountVerificationStatus: AccountVerificationStatus })\r\n : EmptyColumnValue;\r\n },\r\n key: ['AccountVerificationStatus'],\r\n },\r\n template: accountVerificationStatusColumnTemplate,\r\n helpId: IsChinaMarket ? 'pop_BA_Accounts_AIVChina_AIVStatus' : 'pop_BA_Accounts_AIV_Status',\r\n }),\r\n column({\r\n name: columnNames.Balance,\r\n title: 'ColumnName_Balance',\r\n sortable: 'Balance',\r\n type: 'string',\r\n property: {\r\n key: ['Currency', 'Balance'],\r\n get(accountItem) {\r\n return isAdAccount(accountItem) ? i18n.formatCurrency(parseFloat(accountItem.Balance) || 0, accountItem.Currency) : EmptyColumnValue;\r\n },\r\n },\r\n }),\r\n column({\r\n name: columnNames.TaxId,\r\n title: 'ColumnName_TaxId',\r\n sortable: 'TaxInformationSort', // This value is used for sorting TaxInformation. No need in response.\r\n type: 'string',\r\n property: {\r\n key: ['TaxInformation', 'VatStatus', 'Country'],\r\n get(accountItem) {\r\n return formatTaxIdColumn(accountItem, newI18n);\r\n },\r\n },\r\n template: taxIdColumnTemplate,\r\n // Remove this since we don't have it in old accounts list and the infos are not match.\r\n // helpId: 'pop_BA_Accounts_TaxInfo',\r\n }),\r\n column({\r\n name: columnNames.PaymentSetting,\r\n title: 'ColumnName_PaymentSetting',\r\n sortable: 'PaymentType',\r\n type: 'string',\r\n property: {\r\n key: ['PaymentType'],\r\n get(accountItem) {\r\n return isAdAccount(accountItem) ? i18nGlobal.getString(`PaymentType_${accountItem.PaymentType}`) || EmptyColumnValue : EmptyColumnValue;\r\n },\r\n },\r\n helpId: 'Page_Accounts_Index_PaymentSetting',\r\n }),\r\n column({\r\n name: columnNames.BillingLanguage,\r\n title: 'ColumnName_BillingLanguage',\r\n sortable: false, // No need to sort since we don't have it in old accounts list\r\n type: 'string',\r\n property: {\r\n get(accountItem) {\r\n return isAdAccount(accountItem) ? i18nGlobal.getString(`Dimension_Lang_${accountItem.LanguageType}`) || EmptyColumnValue : EmptyColumnValue;\r\n },\r\n key: ['LanguageType'],\r\n },\r\n }),\r\n column({\r\n name: 'BusinessLegalName',\r\n title: 'ColumnName_BusinessLegalName',\r\n sortable: 'BusinessLegalName',\r\n type: 'string',\r\n property: 'BusinessLegalName',\r\n bodyClasses: ['business-legal-name-cell'],\r\n template: textOverflowEllipsisTemplate,\r\n }),\r\n column({\r\n name: columnNames.BusinessLocation,\r\n title: 'ColumnName_BusinessLocation',\r\n sortable: 'Country',\r\n type: 'string',\r\n property: {\r\n get(accountItem) {\r\n return formatAddressBusinessLocation(accountItem);\r\n },\r\n key: ['Country', 'PaymentInstrumentType'],\r\n },\r\n helpId: 'pop_BA_Accounts_BusinessLocation',\r\n template: businessLocationColumnTemplate,\r\n }),\r\n column({\r\n name: columnNames.AccountTimeZone,\r\n title: 'ColumnName_AccountTimeZone',\r\n sortable: 'TimeZone',\r\n type: 'string',\r\n property: {\r\n get({ TimeZone }) {\r\n return i18nGlobal.getString(`TimeZoneId_${TimeZone}`) || EmptyColumnValue;\r\n },\r\n key: ['TimeZone'],\r\n },\r\n bodyClasses: ['time-zone-cell', 'nowrap'],\r\n }),\r\n column({\r\n name: columnNames.PaymentMethod,\r\n title: 'ColumnName_PaymentMethod',\r\n sortable: 'PaymentInstrumentType',\r\n type: 'string',\r\n property: {\r\n get(accountItem) {\r\n return isAdAccount(accountItem) ? i18nGlobal.getString(`PaymentInstrTypeId_${accountItem.PaymentInstrumentType || 0}`) : EmptyColumnValue;\r\n },\r\n key: ['PaymentInstrumentType'],\r\n },\r\n bodyClasses: ['payment-method-cell', 'nowrap'],\r\n }),\r\n column({\r\n name: columnNames.AutoTagging,\r\n title: 'ColumnName_AutoTagging',\r\n sortable: 'AutoTagType',\r\n type: 'string',\r\n property: {\r\n get(accountItem) {\r\n const autoTaggingTypeMapping = {\r\n 0: 'OFF',\r\n 1: 'CustomerOverride',\r\n 2: 'BingAdsOverride',\r\n };\r\n\r\n return isAdAccount(accountItem) ? i18n.getString(`Account_AutoTagging_${autoTaggingTypeMapping[accountItem.AutoTagType]}`) || EmptyColumnValue : EmptyColumnValue;\r\n },\r\n key: ['AutoTagType'],\r\n },\r\n }),\r\n column({\r\n name: columnNames.PrimaryContact,\r\n title: 'ColumnName_PrimaryContact',\r\n sortable: true,\r\n type: 'string',\r\n property: 'PreferredUserName',\r\n bodyClasses: ['primary-contact-cell', 'nowrap'],\r\n template: isForVNext ? textOverflowEllipsisTemplate : undefined,\r\n }),\r\n !isForVNext && column({\r\n name: columnNames.Actions,\r\n title: 'ColumnName_Actions',\r\n sortable: false,\r\n type: 'string',\r\n template: actionsColumnTemplate,\r\n property: {\r\n get(account) {\r\n if (!isAccountItemRow(account)) {\r\n return { emptyValue: EmptyColumnValue };\r\n }\r\n\r\n const common = {\r\n billingTitle: i18n.getString('BillingAndPayment_Settings_Title'),\r\n };\r\n\r\n if (isManagerAccount(account)) {\r\n return {\r\n ...common,\r\n accountSettingsHref: ccUrl(managerAccountsSettingsUrl, { cid: account.Id }),\r\n accountSettingsTitle: i18n.getString('ManagerAccount_Settings_Title'),\r\n billingHref: ccUrl(billingUrl, { cid: account.Id }),\r\n };\r\n }\r\n\r\n // account row\r\n const cid = account.IsParentAuthorized ? account.OwnerId : currentCid();\r\n return {\r\n ...common,\r\n accountSettingsHref: ccUrl(adAccountsSettingsUrl, { cid, aid: account.Id }),\r\n accountSettingsTitle: i18n.getString('AdAccount_Settings_Title'),\r\n billingHref: ccUrl(billingUrl, { cid, aid: account.Id }),\r\n };\r\n },\r\n },\r\n bodyClasses: ['actions-cell', 'nowrap'],\r\n }),\r\n]);\r\n","import _ from 'underscore';\r\n\r\nimport { uncheckedInjectionContext as globalContext } from '@bingads-webui-campaign/injection-context';\r\nimport { AccountUtils, Constants, InsertionOrderUtils } from '@bingads-webui-clientcenter/entity-utils';\r\nimport { toHex, contrastColor } from '@bingads-webui-universal/primitive-utilities';\r\nimport { performanceMetricWithFluctuationTemplate, hasFluctuations, ColumnNameToFluctuationTypeEnum, formatMetricValue } from '@bingads-webui-campaign/campaignui-common-columns';\r\nimport { labelsColumnHeaderTemplate, labelsColumnTemplate } from '@bingads-webui-campaign/labels';\r\n\r\nimport {\r\n currentCid,\r\n column as legacyColumn,\r\n buildVNextColumn,\r\n isManagerAccount,\r\n isInPerformanceTab,\r\n isInImportTab,\r\n getSwitchCustomerShellLink,\r\n isAccountItemRow,\r\n getVNextCampaignWithCidAndAid,\r\n getVNextCampaignWithAid,\r\n getVNextAccountsSummaryWithCid,\r\n} from '../common-utils';\r\nimport { EmptyColumnValue } from '../constants';\r\nimport { isInManagementTab } from '../helper/management-dashboard-helper';\r\nimport { importTabColumnsConfig } from './import-status-column-config';\r\nimport { managementTabColumnsConfig } from './management-column-config';\r\nimport { getSharedColumnConfiguration } from './shared-column-configuration';\r\nimport accountNameToCampaignTemplate from '../template/vnext/account-name-column.pug';\r\nimport accountModeColumnTemplate from '../template/vnext/account-mode-column.pug';\r\nimport accountTypeColumnTemplate from '../template/vnext/account-type-column.pug';\r\nimport alertIconColumnTemplate from '../template/vnext/alert-icon-column.pug';\r\nimport alertIconHeaderTemplate from '../template/vnext/alert-icon-header.pug';\r\nimport managerAccountColumnTemplate from '../template/vnext/manager-accounts-column.pug';\r\nimport statusColumnReadonlyTemplate from '../template/vnext/status-column-readonly.pug';\r\nimport textOverflowEllipsisTemplate from '../template/vnext/text-overflow-ellipsis.pug';\r\n\r\nconst i18n = globalContext.require('@bingads-webui/i18n-amd-loader!campaignui/feature/accounts-summary');\r\nconst urls = globalContext.require('campaignui/feature/app/urls');\r\nconst globalConfig = globalContext.require('component/config/index');\r\nconst logger = globalContext.require('module/service/instrumentation/index');\r\nconst qualityScoreTemplate = globalContext.require('campaignui/feature/common-grid-config/column/quality-score/quality-score-template');\r\nconst {\r\n formatUnlimitedIOBudgetInGrid,\r\n isEndlessIOEndDate,\r\n getSpendCapAmountNumber,\r\n} = InsertionOrderUtils;\r\n\r\nconst {\r\n deletedReasonValueMatcher: isDeletedMatcher,\r\n isDeleted: isAccountDeleted,\r\n} = AccountUtils;\r\nconst {\r\n IsCustomerHierarchyEnabled,\r\n IsManagementDashboardEnabled,\r\n IsAccountDashboardAlertsColumnAllowed,\r\n IsFixDeletedAccountLinksEnabled,\r\n IsAvgPositionDeprecationPhase2Enabled,\r\n IsSmartUIEnabled,\r\n IsInternalUser,\r\n IsAudienceSOVEnabled,\r\n IsAccountLabelsEnabled,\r\n IsViewThroughConversionsRevenueEnabled,\r\n IsUnifiedSmartMode,\r\n IsSmartMode,\r\n dynamic = {},\r\n} = globalConfig.get('Permissions');\r\n\r\nconst isUnlimitedIOBudget = spendCapAmountValue => InsertionOrderUtils.isUnlimitedIOBudget((getSpendCapAmountNumber({ spendCapAmountValue, i18n })));\r\n\r\nconst columnConversion = (sourceMetricName, targetMetricName) => ({\r\n sourceColumnName: sourceMetricName,\r\n sourceSortableProperty: `PerformanceMetrics/${sourceMetricName}`,\r\n targetSortableProperty: `PerformanceMetrics/${targetMetricName}`,\r\n});\r\n\r\nexport const columnConfiguration = ({\r\n gridType, isForVNext, hasUnifiedSmartAccount = false, i18n: newI18n,\r\n}) => {\r\n // for vnext, $/i18n!global does not contain resources for accounts summary\r\n // we need to pass i18n for cloumn object creation\r\n const column = isForVNext ? buildVNextColumn(i18n) : legacyColumn;\r\n const { columnNames } = getSharedColumnConfiguration(globalConfig);\r\n const isPerformanceGrid = isInPerformanceTab(gridType);\r\n const {\r\n PartialConversions: IsPartialConversionsEnabled,\r\n ColumnConversion: IsColumnConversionEnabled,\r\n IsSmartPageStandalone: IsSmartPageStandaloneEnabled,\r\n NewCustomerAcquisition: isNewCustomerAcquisitionEnabled,\r\n CBTLifetimeBudget: IsCampaignLifetimeBudgetEnabled,\r\n ConvValueRules,\r\n CNMarketExpansion,\r\n BaiduFileImport,\r\n } = dynamic;\r\n const usePartialConversions = isPerformanceGrid && IsPartialConversionsEnabled && IsColumnConversionEnabled;\r\n const isConversionValueRuleColumnsEnabled = isPerformanceGrid && ConvValueRules;\r\n\r\n const statusColumn = (IsAccountDashboardAlertsColumnAllowed || isForVNext) ? column({\r\n name: 'AccountInactiveReasons',\r\n property: {\r\n get({ Id, AccountInactiveReasons }) {\r\n let accountInactiveReasons;\r\n\r\n if (IsFixDeletedAccountLinksEnabled) {\r\n accountInactiveReasons = _.any(AccountInactiveReasons, isDeletedMatcher) ? [] : AccountInactiveReasons;\r\n } else {\r\n accountInactiveReasons = _.reject(AccountInactiveReasons, isDeletedMatcher);\r\n }\r\n\r\n return {\r\n Id,\r\n AccountInactiveReasons: accountInactiveReasons,\r\n AccountActivityStatusEnum: Constants.AccountActivityStatus,\r\n activityStatus: AccountUtils.activityStatus({ AccountInactiveReasons }),\r\n isForVNext,\r\n };\r\n },\r\n key: ['Id', 'AccountInactiveReasons', 'AccountInactiveReasonsCount', 'BillToCustomerId'],\r\n },\r\n sortable: 'AccountInactiveReasonsCount',\r\n title: 'AccountGrid_Alerts',\r\n template: alertIconColumnTemplate,\r\n type: 'string',\r\n helpId: isForVNext ? undefined : 'Pop_BA_AccountsGrid_Alerts',\r\n bodyClasses: ['account-inactive-reasons-cell'],\r\n html: isForVNext ? alertIconHeaderTemplate({ helpId: 'Pop_BA_AccountsGrid_Alerts', helpAriaLabel: i18n.getString('Click to learn more about {{item}}', { item: i18n.getString('AccountGrid_Alerts') }) }) : undefined,\r\n }) : column({\r\n name: 'Status',\r\n title: 'ColumnName_Status',\r\n template: statusColumnReadonlyTemplate,\r\n sortable: true,\r\n type: 'string',\r\n helpId: 'Pop_BA_Accounts_Index_Status',\r\n });\r\n\r\n const accountNameColumn = column({\r\n name: 'AccountName',\r\n title: 'ColumnName_AccountName',\r\n property: {\r\n get(account) {\r\n let link = isForVNext ? getVNextCampaignWithAid(account.Id) : urls.getCampaignWithAid(account.Id);\r\n // cid and aid are used for VNext client side navigation:\r\n let cid = currentCid();\r\n let aid = account.Id;\r\n\r\n if (IsCustomerHierarchyEnabled) {\r\n if (isManagerAccount(account)) {\r\n // account here means the data for the cell/row, if it is a manager account, then its Id is customer id\r\n aid = 0;\r\n cid = account.Id;\r\n link = isForVNext ? getVNextAccountsSummaryWithCid(cid) : urls.getAccountsSummaryWithCid(cid);\r\n } else {\r\n // if link is null, we don't have the element\r\n cid = account.IsParentAuthorized ? account.OwnerId : currentCid();\r\n aid = account.Id;\r\n if (account.IsAccountAuthorized) {\r\n link = isForVNext ? getVNextCampaignWithCidAndAid(cid, aid) : urls.getCampaignWithCidAndAid(cid, aid);\r\n } else {\r\n link = null;\r\n }\r\n }\r\n }\r\n\r\n return {\r\n AccountName: account.Name,\r\n AccountNumber: account.AccountNumber,\r\n link,\r\n AggregateName: account.$total && account.$total.text,\r\n hasVNextDropdown: isForVNext && isInManagementTab(gridType),\r\n inactiveLabel: isForVNext && isAccountDeleted(account) && i18n.getString('AccountInfo_InActiveNote'),\r\n isForVNext,\r\n aid,\r\n cid,\r\n ariaLabel: i18n.getString('Click to scope to account {{accountName}}', { accountName: account.Name }),\r\n };\r\n },\r\n // ManagerAccounts is used for /cc/managers/bulkunlinkaccountsconfirmation call for Unlink button in toolbar.\r\n // So fetching ManagerAccounts with account name since this column is locked.\r\n key: ['Name', 'AccountNumber', 'Id', 'ManagerAccounts'],\r\n },\r\n template: accountNameToCampaignTemplate,\r\n sortable: 'Name',\r\n type: 'string',\r\n });\r\n\r\n if (isInImportTab(gridType)) {\r\n // pilot logs\r\n logger.logMessage([logger.constants.LOGCATEGORY.TRACE], logger.constants.LOGLEVEL.INFO, '/accounts/import', `CNMarketExpansion: ${CNMarketExpansion}`);\r\n logger.logMessage([logger.constants.LOGCATEGORY.TRACE], logger.constants.LOGLEVEL.INFO, '/accounts/import', `BaiduFileImport: ${BaiduFileImport}`);\r\n\r\n return _.union([statusColumn, accountNameColumn], importTabColumnsConfig({ isForVNext }));\r\n }\r\n\r\n let accountsSummaryColumns = _.compact([\r\n statusColumn,\r\n accountNameColumn,\r\n (IsSmartUIEnabled || hasUnifiedSmartAccount) && column({\r\n name: 'AccountMode',\r\n title: 'ColumnName_AccountMode',\r\n property: {\r\n get(account) {\r\n let mode;\r\n if (!isManagerAccount(account) && isAccountItemRow(account)) {\r\n mode = account.AccountMode ? i18n.getString(`AccountMode_${account.AccountMode}`) : i18n.getString('AccountMode_0');\r\n } else {\r\n // for accounts created before being in pilot, `AccountMode` will be `null`\r\n // Also grid entries for linked Manager Accounts will be null\r\n mode = EmptyColumnValue;\r\n }\r\n return {\r\n AccountMode: mode,\r\n };\r\n },\r\n key: ['AccountMode'],\r\n },\r\n template: accountModeColumnTemplate,\r\n sortable: 'AccountMode',\r\n type: 'string',\r\n }),\r\n column({\r\n name: columnNames.Currency,\r\n title: 'ColumnName_AccountDashboard_Currency',\r\n sortable: true,\r\n type: 'string',\r\n }),\r\n column({\r\n name: 'Clicks',\r\n title: 'ColumnName_Clicks',\r\n property: {\r\n get({ PerformanceMetrics, AvailableInsightTypeIds }) {\r\n return {\r\n metricType: ColumnNameToFluctuationTypeEnum.Clicks,\r\n metricName: i18n.getString('ColumnName_Clicks'),\r\n metricValue: formatMetricValue({ i18n, format: 'integer', metricValue: _.result(PerformanceMetrics, 'Clicks') }),\r\n hasFluctuation: hasFluctuations({ propertyName: 'Clicks', availableInsightTypeIds: AvailableInsightTypeIds }),\r\n };\r\n },\r\n key: ['PerformanceMetrics/Clicks', 'AvailableInsightTypeIds'],\r\n },\r\n sortable: 'PerformanceMetrics/Clicks',\r\n type: 'number',\r\n format: 'integer',\r\n helpId: 'Pop_BA_AccountsGrid_Clicks',\r\n template: performanceMetricWithFluctuationTemplate,\r\n }),\r\n column({\r\n name: 'Impressions',\r\n title: 'ColumnName_Impressions',\r\n property: {\r\n get({ PerformanceMetrics, AvailableInsightTypeIds }) {\r\n return {\r\n metricType: ColumnNameToFluctuationTypeEnum.Impressions,\r\n metricName: i18n.getString('ColumnName_Impressions'),\r\n metricValue: formatMetricValue({ i18n, format: 'integer', metricValue: _.result(PerformanceMetrics, 'Impressions') }),\r\n hasFluctuation: hasFluctuations({ propertyName: 'Impressions', availableInsightTypeIds: AvailableInsightTypeIds }),\r\n };\r\n },\r\n key: ['PerformanceMetrics/Impressions', 'AvailableInsightTypeIds'],\r\n },\r\n sortable: 'PerformanceMetrics/Impressions',\r\n type: 'number',\r\n format: 'integer',\r\n helpId: 'Pop_BA_AccountsGrid_Impr',\r\n template: performanceMetricWithFluctuationTemplate,\r\n }),\r\n IsAccountLabelsEnabled && column({\r\n name: 'Labels',\r\n title: 'ColumnName_Labels',\r\n property: {\r\n get(account) {\r\n const { Labels } = account;\r\n if (Labels) {\r\n const maxLabelsToShow = 2;\r\n const labelsLength = _.isEmpty(Labels) ? 0 : Labels.length;\r\n const labelsCountToShow = _.min([labelsLength, maxLabelsToShow]);\r\n const labelsToUse = [];\r\n\r\n for (let i = 0; i < labelsCountToShow; i += 1) {\r\n const label = Labels[i];\r\n const title = _.isEmpty(label.Description) ?\r\n label.Name :\r\n i18n.getString('label_tooltip_format').replace('{0}', label.Name).replace('{1}', label.Description);\r\n\r\n labelsToUse.push(_.extend(\r\n _.pick(label, 'Id', 'Name', 'Scope'),\r\n {\r\n labelColor: toHex(label.ColorCode),\r\n contractColor: toHex(contrastColor(label.ColorCode)),\r\n title,\r\n }\r\n ));\r\n }\r\n return {\r\n Labels: labelsToUse,\r\n ShowViewMoreLink: labelsLength > maxLabelsToShow,\r\n TotalLength: labelsLength,\r\n IsAggregateRow: !!account.$total,\r\n i18n,\r\n isMCCLabelEnabled: IsAccountLabelsEnabled,\r\n };\r\n }\r\n return {\r\n IsAggregateRow: !!account.$total,\r\n Labels: [],\r\n };\r\n },\r\n key: ['Labels'],\r\n },\r\n type: 'string',\r\n format: 'integer',\r\n helpId: 'pop_BA_CampaignGrids_Labels',\r\n template: args => labelsColumnTemplate(args.value),\r\n headerTemplate: args => labelsColumnHeaderTemplate({ i18n, ...args }),\r\n }),\r\n column({\r\n name: 'CTR',\r\n title: 'ColumnName_ClickThruRate',\r\n property: 'PerformanceMetrics/CTR',\r\n sortable: true,\r\n type: 'number',\r\n format: 'percentage-value',\r\n helpId: 'Pop_BA_AccountsGrid_CTR',\r\n }),\r\n usePartialConversions ?\r\n column({\r\n name: 'ConversionsCredit',\r\n title: 'ColumnName_Conversions',\r\n property: {\r\n get({ PerformanceMetrics, AvailableInsightTypeIds }) {\r\n const metricValue = formatMetricValue({ i18n, format: 'decimal', metricValue: _.result(PerformanceMetrics, 'ConversionsCredit') });\r\n const obj = {\r\n metricType: ColumnNameToFluctuationTypeEnum.Conversions,\r\n metricName: i18n.getString('ColumnName_Conversions'),\r\n metricValue,\r\n hasFluctuation: hasFluctuations({ propertyName: 'ConversionsCredit', availableInsightTypeIds: AvailableInsightTypeIds }),\r\n };\r\n return obj;\r\n },\r\n key: ['PerformanceMetrics/ConversionsCredit', 'AvailableInsightTypeIds'],\r\n },\r\n sortable: 'PerformanceMetrics/ConversionsCredit',\r\n type: 'number',\r\n format: 'decimal',\r\n helpId: 'Pop_BA_AccountsGrid_Conv',\r\n template: performanceMetricWithFluctuationTemplate,\r\n columnConversion: columnConversion('Conversions', 'ConversionsCredit'),\r\n }) :\r\n column({\r\n name: 'Conversions',\r\n title: 'ColumnName_Conversions',\r\n property: {\r\n get({ PerformanceMetrics, AvailableInsightTypeIds }) {\r\n const metricValue = formatMetricValue({ i18n, format: 'integer', metricValue: _.result(PerformanceMetrics, 'Conversions') });\r\n const obj = {\r\n metricType: ColumnNameToFluctuationTypeEnum.Conversions,\r\n metricName: i18n.getString('ColumnName_Conversions'),\r\n metricValue,\r\n hasFluctuation: hasFluctuations({ propertyName: 'Conversions', availableInsightTypeIds: AvailableInsightTypeIds }),\r\n };\r\n return obj;\r\n },\r\n key: ['PerformanceMetrics/Conversions', 'AvailableInsightTypeIds'],\r\n },\r\n sortable: 'PerformanceMetrics/Conversions',\r\n type: 'number',\r\n format: 'integer',\r\n helpId: 'Pop_BA_AccountsGrid_Conv',\r\n template: performanceMetricWithFluctuationTemplate,\r\n columnConversion: columnConversion('ConversionsCredit', 'Conversions'),\r\n }),\r\n column({\r\n name: 'AverageCPC',\r\n title: 'ColumnName_AverageCPC',\r\n property: 'PerformanceMetrics/AverageCPC',\r\n sortable: true,\r\n type: 'number',\r\n helpId: 'Pop_BA_AccountsGrid_CPC',\r\n }),\r\n column({\r\n name: 'AverageCPM',\r\n title: 'ColumnName_CostPerImpression',\r\n property: 'PerformanceMetrics/AverageCPM',\r\n sortable: true,\r\n type: 'number',\r\n helpId: 'Page_CampaignGrids_AvgCPM',\r\n }),\r\n column({\r\n name: 'VideoViews',\r\n title: 'ColumnName_VideoViews',\r\n property: 'PerformanceMetrics/VideoViews',\r\n sortable: true,\r\n type: 'number',\r\n format: 'integer',\r\n helpId: 'Page_CampaignGrids_VideoViews',\r\n }),\r\n column({\r\n name: 'ViewThroughRate',\r\n title: 'ColumnName_ViewThroughRate',\r\n property: 'PerformanceMetrics/ViewThroughRate',\r\n sortable: true,\r\n type: 'number',\r\n format: 'percentage-value',\r\n helpId: 'Page_CampaignGrids_ViewThroughRate',\r\n }),\r\n column({\r\n name: 'AverageCPV',\r\n title: 'ColumnName_AverageCPV',\r\n property: 'PerformanceMetrics/AverageCPV',\r\n sortable: true,\r\n type: 'number',\r\n helpId: 'Page_CampaignGrids_AverageCPV',\r\n }),\r\n column({\r\n name: 'TotalWatchTimeInMS',\r\n title: 'ColumnName_TotalWatchTimeInMS',\r\n property: 'PerformanceMetrics/TotalWatchTimeInMS',\r\n sortable: true,\r\n format: 'thousandth',\r\n type: 'number',\r\n helpId: 'Page_CampaignGrids_TotalWatchTime',\r\n }),\r\n column({\r\n name: 'AverageWatchTimePerImpression',\r\n title: 'ColumnName_AverageWatchTimePerImpression',\r\n property: 'PerformanceMetrics/AverageWatchTimePerImpression',\r\n sortable: true,\r\n type: 'number',\r\n helpId: 'Page_CampaignGrids_AverageWatchTimePerImpression',\r\n }),\r\n column({\r\n name: 'AverageWatchTimePerVideoView',\r\n title: 'ColumnName_AverageWatchTimePerVideoView',\r\n property: 'PerformanceMetrics/AverageWatchTimePerVideoView',\r\n sortable: true,\r\n type: 'number',\r\n helpId: 'Page_CampaignGrids_AverageWatchTimePerVideoView',\r\n }),\r\n column({\r\n name: 'VideoViewsAt25Percent',\r\n title: 'ColumnName_VideoViewsAt25Percent',\r\n property: 'PerformanceMetrics/VideoViewsAt25Percent',\r\n sortable: true,\r\n type: 'number',\r\n format: 'integer',\r\n helpId: 'Page_CampaignGrids_VideoViewsAt25Percent',\r\n }),\r\n column({\r\n name: 'VideoViewsAt50Percent',\r\n title: 'ColumnName_VideoViewsAt50Percent',\r\n property: 'PerformanceMetrics/VideoViewsAt50Percent',\r\n sortable: true,\r\n type: 'number',\r\n format: 'integer',\r\n helpId: 'Page_CampaignGrids_VideoViewsAt50Percent',\r\n }),\r\n column({\r\n name: 'VideoViewsAt75Percent',\r\n title: 'ColumnName_VideoViewsAt75Percent',\r\n property: 'PerformanceMetrics/VideoViewsAt75Percent',\r\n sortable: true,\r\n type: 'number',\r\n format: 'integer',\r\n helpId: 'Page_CampaignGrids_VideoViewsAt75Percent',\r\n }),\r\n column({\r\n name: 'CompletedVideoViews',\r\n title: 'ColumnName_CompletedVideoViews',\r\n property: 'PerformanceMetrics/CompletedVideoViews',\r\n sortable: true,\r\n type: 'number',\r\n format: 'integer',\r\n helpId: 'Page_CampaignGrids_CompletedVideoViews',\r\n }),\r\n column({\r\n name: 'VideoCompletionRate',\r\n title: 'ColumnName_VideoCompletionRate',\r\n property: 'PerformanceMetrics/VideoCompletionRate',\r\n sortable: true,\r\n type: 'number',\r\n format: 'percentage-value',\r\n helpId: 'Page_CampaignGrids_VideoCompletionRate',\r\n }),\r\n column({\r\n name: 'AveragePosition',\r\n title: 'FilterLocalization_DataAttribute_AveragePosition',\r\n property: 'PerformanceMetrics/AveragePosition',\r\n sortable: true,\r\n type: 'number',\r\n helpId: 'Page_CampaignGrids_AvgPosition',\r\n }),\r\n usePartialConversions ?\r\n column({\r\n name: 'PartialConversionCPA',\r\n title: 'FilterLocalization_DataAttribute_CPA',\r\n property: 'PerformanceMetrics/PartialConversionCPA',\r\n sortable: true,\r\n type: 'number',\r\n helpId: 'Page_CampaignGrids_CPA',\r\n columnConversion: columnConversion('CPA', 'PartialConversionCPA'),\r\n }) :\r\n column({\r\n name: 'CPA',\r\n title: 'FilterLocalization_DataAttribute_CPA',\r\n property: 'PerformanceMetrics/CPA',\r\n sortable: true,\r\n type: 'number',\r\n helpId: 'Page_CampaignGrids_CPA',\r\n columnConversion: columnConversion('PartialConversionCPA', 'CPA'),\r\n }),\r\n usePartialConversions ?\r\n column({\r\n name: 'PartialConversionRate',\r\n title: 'FilterLocalization_DataAttribute_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 columnConversion: columnConversion('ConversionRate', 'PartialConversionRate'),\r\n }) :\r\n column({\r\n name: 'ConversionRate',\r\n title: 'FilterLocalization_DataAttribute_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 columnConversion: columnConversion('PartialConversionRate', 'ConversionRate'),\r\n }),\r\n column({\r\n name: 'AdvertiserReportedRevenue',\r\n title: 'FilterLocalization_DataAttribute_AdvertiserReportedRevenue',\r\n property: 'PerformanceMetrics/AdvertiserReportedRevenue',\r\n sortable: true,\r\n type: 'number',\r\n helpId: 'Page_CampaignGrids_Revenue',\r\n }),\r\n column({\r\n name: 'RevenueOnAdSpend',\r\n title: 'ColumnName_RevenueOnAdSpend',\r\n property: 'PerformanceMetrics/RevenueOnAdSpend',\r\n sortable: true,\r\n type: 'number',\r\n helpId: 'Page_CampaignGrids_ReturnAdSpend',\r\n }),\r\n usePartialConversions ?\r\n column({\r\n name: 'AllConversionsCredit',\r\n title: 'ColumnName_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 columnConversion: columnConversion('AllConversions', 'AllConversionsCredit'),\r\n }) :\r\n column({\r\n name: 'AllConversions',\r\n title: 'ColumnName_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 columnConversion: columnConversion('AllConversionsCredit', 'AllConversions'),\r\n }),\r\n usePartialConversions ?\r\n column({\r\n name: 'AllPartialConversionCPA',\r\n title: 'ColumnName_AllConversionCPA',\r\n property: 'PerformanceMetrics/AllPartialConversionCPA',\r\n sortable: true,\r\n type: 'number',\r\n helpId: 'pop_BA_CampaignGrids_AllConvCPA',\r\n columnConversion: columnConversion('AllConversionCPA', 'AllPartialConversionCPA'),\r\n }) :\r\n column({\r\n name: 'AllConversionCPA',\r\n title: 'ColumnName_AllConversionCPA',\r\n property: 'PerformanceMetrics/AllConversionCPA',\r\n sortable: true,\r\n type: 'number',\r\n helpId: 'pop_BA_CampaignGrids_AllConvCPA',\r\n columnConversion: columnConversion('AllPartialConversionCPA', 'AllConversionCPA'),\r\n }),\r\n usePartialConversions ?\r\n column({\r\n name: 'AllPartialConversionRate',\r\n title: 'ColumnName_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 columnConversion: columnConversion('AllConversionRate', 'AllPartialConversionRate'),\r\n }) :\r\n column({\r\n name: 'AllConversionRate',\r\n title: 'ColumnName_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 columnConversion: columnConversion('AllPartialConversionRate', 'AllConversionRate'),\r\n }),\r\n column({\r\n name: 'AllConversionAdvertiserReportedRevenue',\r\n title: 'ColumnName_AllConversionAdvertiserReportedRevenue',\r\n property: 'PerformanceMetrics/AllConversionAdvertiserReportedRevenue',\r\n sortable: true,\r\n type: 'number',\r\n helpId: 'pop_BA_CampaignGrids_AllConvRevenue',\r\n }),\r\n column({\r\n name: 'AllConversionRevenueOnAdSpend',\r\n title: 'ColumnName_AllConversionRevenueOnAdSpend',\r\n property: 'PerformanceMetrics/AllConversionRevenueOnAdSpend',\r\n sortable: true,\r\n type: 'number',\r\n helpId: 'pop_BA_CampaignGrids_AllConvROAS',\r\n }),\r\n usePartialConversions ?\r\n column({\r\n name: 'ViewThroughConversionsCredit',\r\n title: 'ColumnName_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 columnConversion: columnConversion('ViewThroughConversions', 'ViewThroughConversionsCredit'),\r\n }) :\r\n column({\r\n name: 'ViewThroughConversions',\r\n title: 'ColumnName_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 columnConversion: columnConversion('ViewThroughConversionsCredit', 'ViewThroughConversions'),\r\n }),\r\n column({\r\n name: 'TotalEffectiveCost',\r\n title: 'ColumnName_TotalEffectiveCost',\r\n property: {\r\n get(account) {\r\n const { PerformanceMetrics, AvailableInsightTypeIds, Id } = account;\r\n return {\r\n metricType: ColumnNameToFluctuationTypeEnum.Spend,\r\n metricName: i18n.getString('ColumnName_TotalEffectiveCost'),\r\n metricValue: formatMetricValue({ i18n, format: 'decimal', metricValue: _.result(PerformanceMetrics, 'Spend') }),\r\n hasFluctuation: hasFluctuations({ propertyName: 'Spend', availableInsightTypeIds: AvailableInsightTypeIds }),\r\n isBudgetCenterEntryEnabled: Id && !IsSmartPageStandaloneEnabled && !IsSmartMode && !IsUnifiedSmartMode, // Only show budget center entry for row with accountId\r\n };\r\n },\r\n key: ['PerformanceMetrics/Spend', 'AvailableInsightTypeIds'],\r\n },\r\n sortable: 'PerformanceMetrics/Spend',\r\n type: 'number',\r\n helpId: 'Pop_BA_AccountsGrid_Spend',\r\n template: performanceMetricWithFluctuationTemplate,\r\n }),\r\n column({\r\n name: 'CompanyName',\r\n title: 'ColumnName_CompanyName',\r\n sortable: true,\r\n type: 'string',\r\n helpId: 'Pop_BA_AccountsGrid_CoName',\r\n }),\r\n column({\r\n name: 'BillToCustomerName',\r\n title: 'ColumnName_BillToCustomerName',\r\n sortable: true,\r\n type: 'string',\r\n helpId: 'Pop_BA_AccountsGrid_BillTo',\r\n bodyClasses: ['bill-to-customer-cell'],\r\n template: isForVNext ? textOverflowEllipsisTemplate : undefined,\r\n }),\r\n column({\r\n name: 'IOPurchaseOrder',\r\n title: 'ColumnName_IOPurchaseOrder',\r\n property: 'InsertionOrderDetails/CurrentInsertionOrder/PurchaseOrder',\r\n sortable: true,\r\n type: 'string',\r\n helpId: 'Pop_BA_AccountsGrid_PO',\r\n }),\r\n column({\r\n name: 'IOBudget',\r\n title: 'ColumnName_IOBudget',\r\n property: {\r\n get({ InsertionOrderDetails }) {\r\n const { CurrentInsertionOrder: { Budget } = {} } = InsertionOrderDetails || {};\r\n return formatUnlimitedIOBudgetInGrid({ i18n, spendCapAmountValue: Budget });\r\n },\r\n key: ['InsertionOrderDetails/CurrentInsertionOrder/Budget'],\r\n },\r\n sortable: 'InsertionOrderDetails/CurrentInsertionOrder/Budget',\r\n type: 'string',\r\n helpId: 'Pop_BA_AccountsGrid_Budget',\r\n }),\r\n column({\r\n name: 'RemainingIOBudget',\r\n title: 'ColumnName_RemainingIOBudget',\r\n property: {\r\n get({ InsertionOrderDetails }) {\r\n const { CurrentInsertionOrder: { Budget, RemainingBudget } = {} } = InsertionOrderDetails || {};\r\n return isUnlimitedIOBudget(Budget) ? null : RemainingBudget;\r\n },\r\n key: ['InsertionOrderDetails/CurrentInsertionOrder/RemainingBudget'],\r\n },\r\n sortable: 'InsertionOrderDetails/CurrentInsertionOrder/RemainingBudget',\r\n type: 'number',\r\n helpId: 'Pop_BA_AccountsGrid_BudgetRem',\r\n }),\r\n column({\r\n name: 'StartDate',\r\n title: 'ColumnName_StartDate',\r\n property: 'InsertionOrderDetails/CurrentInsertionOrder/StartDate',\r\n sortable: true,\r\n type: 'date',\r\n helpId: 'Pop_BA_AccountsGrid_StartDate',\r\n }),\r\n column({\r\n name: 'EndDate',\r\n title: 'ColumnName_EndDate',\r\n property: {\r\n get({ InsertionOrderDetails }) {\r\n const { CurrentInsertionOrder: { EndDate } = {} } = InsertionOrderDetails || {};\r\n\r\n if (isEndlessIOEndDate(_.isString(EndDate) && new Date(EndDate.split('T')[0]))) {\r\n return i18n.getString('InsertionOrder_NoEndDate');\r\n }\r\n return EndDate;\r\n },\r\n key: ['InsertionOrderDetails/CurrentInsertionOrder/EndDate'],\r\n },\r\n sortable: 'InsertionOrderDetails/CurrentInsertionOrder/EndDate',\r\n type: 'date',\r\n helpId: 'Pop_BA_AccountsGrid_EndDate',\r\n }),\r\n column({\r\n name: columnNames.DailyBudget,\r\n title: 'ColumnName_DailyBudget',\r\n property: 'Budget/DailyBudget',\r\n sortable: true,\r\n type: 'number',\r\n helpId: 'Pop_BA_AccountsGrid_TotDailyBudget',\r\n }),\r\n IsCampaignLifetimeBudgetEnabled && column({\r\n name: columnNames.CampaignLifetimeBudget,\r\n title: 'ColumnName_CampaignLifetimeBudget',\r\n property: 'Budget/LifetimeBudget',\r\n sortable: true,\r\n type: 'number',\r\n helpId: 'Pop_BA_AccountsGrid_TotDailyBudget',\r\n }),\r\n column({\r\n name: 'QualityScore',\r\n title: 'FilterLocalization_DataAttribute_QualityScore',\r\n property: {\r\n get(account) {\r\n return _.defaults({ i18n }, _.pick(account.QualityScoreData, 'OverallQualityScore'));\r\n },\r\n key: 'QualityScoreData/OverallQualityScore',\r\n },\r\n template: qualityScoreTemplate,\r\n sortable: true,\r\n helpId: 'Page_CampaignGrids_QualScore',\r\n bodyClasses: ['quality-score-cell'],\r\n }),\r\n column({\r\n name: 'TotalRemainingIOBudget',\r\n title: 'ColumnName_TotalRemainingIOBudget',\r\n property: {\r\n get({ InsertionOrderDetails }) {\r\n const { TotalRemainingBudget } = InsertionOrderDetails || {};\r\n return isUnlimitedIOBudget(TotalRemainingBudget) ? null : TotalRemainingBudget;\r\n },\r\n key: 'InsertionOrderDetails/TotalRemainingBudget',\r\n },\r\n sortable: true,\r\n type: 'string',\r\n helpId: 'Pop_BA_AccountsGrid_TotBudget',\r\n }),\r\n column({\r\n name: 'OverallEndDate',\r\n title: 'ColumnName_OverallEndDate',\r\n property: 'InsertionOrderDetails/OverallEndDate',\r\n sortable: true,\r\n type: 'date',\r\n helpId: 'Pop_BA_AccountsGrid_LastEndDate',\r\n }),\r\n column({\r\n name: 'ImpShare',\r\n title: 'ColumnName_ImpShare',\r\n property: 'PerformanceMetrics/AuctionWonPercent',\r\n sortable: true,\r\n type: 'number',\r\n format: 'percentage-value',\r\n helpId: 'pop_BA_CampaignGrids_IS',\r\n }),\r\n column({\r\n name: 'ImpShareLostToBudget',\r\n title: 'ColumnName_ImpShareLostToBudget',\r\n property: 'PerformanceMetrics/AuctionLostToBudgetPercent',\r\n sortable: true,\r\n type: 'number',\r\n format: 'percentage-value',\r\n helpId: 'pop_BA_CampaignGrids_ISBudget',\r\n }),\r\n column({\r\n name: 'ImpShareLostToRank',\r\n title: 'ColumnName_ImpShareLostToRank',\r\n property: 'PerformanceMetrics/AuctionLostToRankPercent',\r\n sortable: true,\r\n type: 'number',\r\n format: 'percentage-value',\r\n helpId: 'pop_BA_CampaignGrids_ISRank',\r\n }),\r\n column({\r\n name: 'ClickSharePercent',\r\n title: 'ColumnName_ClickSharePercent',\r\n property: 'PerformanceMetrics/ClickSharePercent',\r\n sortable: true,\r\n type: 'number',\r\n format: 'percentage-value',\r\n helpId: 'pop_BA_Reporting_ProductAds_ClickSharePercent',\r\n }),\r\n column({\r\n name: 'AbsoluteTopImpressionSharePercent',\r\n title: 'ColumnName_AbsoluteTopImpressionSharePercent',\r\n property: 'PerformanceMetrics/AbsoluteTopImpressionSharePercent',\r\n sortable: true,\r\n type: 'number',\r\n format: 'percentage-value',\r\n helpId: 'pop_BA_Reporting_ProductAds_AbsoluteTopImpShare',\r\n }),\r\n IsAudienceSOVEnabled && column({\r\n name: 'AudienceImpressionShare',\r\n title: 'ColumnName_AudienceImpressionShare',\r\n property: 'PerformanceMetrics/AudienceAuctionWonPercent',\r\n sortable: true,\r\n type: 'number',\r\n format: 'percentage-value',\r\n helpId: 'pop_BA_Reporting_Clarity_AudienceNetwork_ImpressionShare',\r\n }),\r\n IsAudienceSOVEnabled && column({\r\n name: 'AudienceImpressionShareLostToBudget',\r\n title: 'ColumnName_AudienceImpressionShareLostToBudget',\r\n property: 'PerformanceMetrics/AudienceTopISLostToBudgetPercent',\r\n sortable: true,\r\n type: 'number',\r\n format: 'percentage-value',\r\n helpId: 'pop_BA_Reporting_Clarity_AudienceNetwork_ImpressionShare_LostBudget',\r\n }),\r\n IsAudienceSOVEnabled && column({\r\n name: 'AudienceImpressionShareLostToRank',\r\n title: 'ColumnName_AudienceImpressionShareLostToRank',\r\n property: 'PerformanceMetrics/AudienceTopISLostToRankPercent',\r\n sortable: true,\r\n type: 'number',\r\n format: 'percentage-value',\r\n helpId: 'pop_BA_Reporting_Clarity_AudienceNetwork_ImpressionShare_LostRank',\r\n }),\r\n IsViewThroughConversionsRevenueEnabled && column({\r\n name: 'ViewThroughConversionsRevenue',\r\n title: 'ColumnName_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 }),\r\n IsViewThroughConversionsRevenueEnabled && usePartialConversions && column({\r\n name: 'ViewThroughPartialConversionsCPA',\r\n title: 'ColumnName_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 columnConversion: columnConversion('ViewThroughConversionsCPA', 'ViewThroughPartialConversionsCPA'),\r\n }),\r\n IsViewThroughConversionsRevenueEnabled && !usePartialConversions && column({\r\n name: 'ViewThroughConversionsCPA',\r\n title: 'ColumnName_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 columnConversion: columnConversion('ViewThroughPartialConversionsCPA', 'ViewThroughConversionsCPA'),\r\n }),\r\n IsViewThroughConversionsRevenueEnabled && column({\r\n name: 'ViewThroughConversionsReturnOnAdSpend',\r\n title: 'ColumnName_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 }),\r\n IsViewThroughConversionsRevenueEnabled && usePartialConversions && column({\r\n name: 'ViewThroughPartialConversionsRate',\r\n title: 'ColumnName_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 columnConversion: columnConversion('ViewThroughConversionsRate', 'ViewThroughPartialConversionsRate'),\r\n }),\r\n IsViewThroughConversionsRevenueEnabled && !usePartialConversions && column({\r\n name: 'ViewThroughConversionsRate',\r\n title: 'ColumnName_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 columnConversion: columnConversion('ViewThroughPartialConversionsRate', 'ViewThroughConversionsRate'),\r\n }),\r\n isConversionValueRuleColumnsEnabled && column({\r\n name: 'AdvertiserReportedRevenueAdjustment',\r\n title: 'ColumnName_AdvertiserReportedRevenueAdjustment',\r\n property: 'PerformanceMetrics/AdvertiserReportedRevenueAdjustment',\r\n sortable: true,\r\n type: 'number',\r\n format: 'decimal',\r\n helpId: 'pop_BA_CampaignGrids_RevenueAdjustment',\r\n }),\r\n isConversionValueRuleColumnsEnabled && column({\r\n name: 'ViewThroughConversionsRevenueAdjustment',\r\n title: 'ColumnName_ViewThroughConversionsRevenueAdjustment',\r\n property: 'PerformanceMetrics/ViewThroughConversionsRevenueAdjustment',\r\n sortable: true,\r\n type: 'number',\r\n format: 'decimal',\r\n helpId: 'pop_BA_CampaignGrids_ViewthroughRevenueAdjustment',\r\n }),\r\n isConversionValueRuleColumnsEnabled && column({\r\n name: 'AllConversionAdvertiserReportedRevenueAdjustment',\r\n title: 'ColumnName_AllConversionAdvertiserReportedRevenueAdjustment',\r\n property: 'PerformanceMetrics/AllConversionAdvertiserReportedRevenueAdjustment',\r\n sortable: true,\r\n type: 'number',\r\n format: 'decimal',\r\n helpId: 'pop_BA_CampaignGrids_AllRevenueAdjustment',\r\n }),\r\n ]);\r\n\r\n if (IsCustomerHierarchyEnabled || IsManagementDashboardEnabled) {\r\n accountsSummaryColumns = _.without(accountsSummaryColumns, _.findWhere(accountsSummaryColumns, { name: 'CompanyName' }));\r\n\r\n accountsSummaryColumns.push(column({\r\n name: 'Owner',\r\n title: 'ColumnName_Owner',\r\n sortable: true,\r\n type: 'string',\r\n helpId: 'pop_BA_Accounts_MD_Owner',\r\n bodyClasses: _.compact(['owners-accounts-cell']),\r\n template: isForVNext ? textOverflowEllipsisTemplate : undefined,\r\n }));\r\n }\r\n\r\n if (IsCustomerHierarchyEnabled) {\r\n accountsSummaryColumns.push(\r\n column({\r\n name: 'AccountType',\r\n title: 'ColumnName_AccountType',\r\n sortable: 'AccountType',\r\n type: 'string',\r\n template: accountTypeColumnTemplate,\r\n property: {\r\n get({ AccountType }) {\r\n return {\r\n AccountType: i18n.getString(`AccountType_${AccountType}`),\r\n };\r\n },\r\n key: ['AccountType'],\r\n },\r\n helpId: 'pop_BA_Accounts_MD_AccountType',\r\n }),\r\n column({\r\n name: 'ManagerAccounts',\r\n title: isForVNext ? 'ColumnName_DirectManagers' : 'ColumnName_ManagerAccounts',\r\n sortable: false,\r\n type: 'string',\r\n template: managerAccountColumnTemplate,\r\n property: {\r\n get({ Id, ManagerAccounts }) {\r\n return {\r\n Id,\r\n ManagerAccounts,\r\n isForVNext,\r\n // for multiple manager accounts, we'll add links in the popover content\r\n singleAccountLink: (IsInternalUser && _.size(ManagerAccounts) === 1)\r\n ? getSwitchCustomerShellLink((ManagerAccounts[0] || {}).Id) : '',\r\n };\r\n },\r\n key: ['ManagerAccounts'],\r\n },\r\n helpId: 'pop_BA_Accounts_MD_DirectManager',\r\n bodyClasses: ['manager-accounts-cell'],\r\n })\r\n );\r\n }\r\n\r\n if (isInManagementTab(gridType)) {\r\n accountsSummaryColumns = accountsSummaryColumns.concat(managementTabColumnsConfig({\r\n column, isForVNext, i18n: newI18n,\r\n }));\r\n }\r\n\r\n if (IsAvgPositionDeprecationPhase2Enabled) {\r\n accountsSummaryColumns = _.reject(accountsSummaryColumns, ({ name }) => name === 'AveragePosition');\r\n }\r\n\r\n accountsSummaryColumns = accountsSummaryColumns.concat([\r\n column({\r\n name: 'TopImpressionRate',\r\n title: 'ColumnName_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 }),\r\n column({\r\n name: 'AbsoluteTopImpressionRate',\r\n title: 'ColumnName_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 }),\r\n column({\r\n name: 'ExactMatchImpressionSharePercent',\r\n title: 'ColumnName_ExactMatchImpressionSharePercent',\r\n property: 'PerformanceMetrics/ExactMatchImpressionSharePercent',\r\n sortable: true,\r\n type: 'number',\r\n format: 'percentage-value',\r\n helpId: 'pop_BA_Reporting_Clarity_ExactMatchImpressionShare',\r\n }),\r\n column({\r\n name: 'TopImpressionSharePercent',\r\n title: 'ColumnName_TopImpressionSharePercent',\r\n property: 'PerformanceMetrics/TopImpressionSharePercent',\r\n sortable: true,\r\n type: 'number',\r\n format: 'percentage-value',\r\n helpId: 'pop_BA_Reporting_Clarity_TopImpressionShare',\r\n }),\r\n column({\r\n name: 'TopImpressionShareLostToBudget',\r\n title: 'ColumnName_TopImpressionShareLostToBudget',\r\n property: 'PerformanceMetrics/TopISLostToBudgetPercent',\r\n sortable: true,\r\n type: 'number',\r\n format: 'percentage-value',\r\n helpId: 'pop_BA_Reporting_Clarity_TopImpressionLosttoBudget',\r\n }),\r\n column({\r\n name: 'TopImpressionShareLostToRank',\r\n title: 'ColumnName_TopImpressionShareLostToRank',\r\n property: 'PerformanceMetrics/TopISLostToRankPercent',\r\n sortable: true,\r\n type: 'number',\r\n format: 'percentage-value',\r\n helpId: 'pop_BA_Reporting_Clarity_TopImpressionLosttoRank',\r\n }),\r\n column({\r\n name: 'AbsoluteTopImpressionShareLostToBudget',\r\n title: 'ColumnName_AbsoluteTopImpressionShareLostToBudget',\r\n property: 'PerformanceMetrics/AbsoluteTopISLostToBudgetPercent',\r\n sortable: true,\r\n type: 'number',\r\n format: 'percentage-value',\r\n helpId: 'pop_BA_Reporting_Clarity_AbsoluteTopISLosttoBudget',\r\n }),\r\n column({\r\n name: 'AbsoluteTopImpressionShareLostToRank',\r\n title: 'ColumnName_AbsoluteTopImpressionShareLostToRank',\r\n property: 'PerformanceMetrics/AbsoluteTopISLostToRankPercent',\r\n sortable: true,\r\n type: 'number',\r\n format: 'percentage-value',\r\n helpId: 'pop_BA_Reporting_Clarity_AbsoluteTopISLosttoRank',\r\n }),\r\n ]);\r\n\r\n if (dynamic.CPSReporting) {\r\n accountsSummaryColumns = accountsSummaryColumns.concat([\r\n column({\r\n name: 'SalesCount',\r\n title: 'ColumnName_SalesCount',\r\n property: 'PerformanceMetrics/SalesCount',\r\n sortable: true,\r\n type: 'number',\r\n format: 'integer',\r\n helpId: 'pop_BA_CampaignGrids_Sale',\r\n }),\r\n ]);\r\n }\r\n\r\n if (dynamic.InstallPerformanceColumns) {\r\n accountsSummaryColumns = accountsSummaryColumns.concat([\r\n column({\r\n name: 'Installs',\r\n title: 'ColumnName_Installs',\r\n property: 'PerformanceMetrics/Installs',\r\n sortable: true,\r\n type: 'number',\r\n format: 'integer',\r\n helpId: 'pop_BA_StoreAds_Install',\r\n }),\r\n ]);\r\n }\r\n\r\n if (isNewCustomerAcquisitionEnabled) {\r\n accountsSummaryColumns = accountsSummaryColumns.concat([\r\n column({\r\n name: 'NewCustomerConversions',\r\n title: 'ColumnName_NewCustomerConversions',\r\n property: 'PerformanceMetrics/NewCustomerConversions',\r\n sortable: true,\r\n type: 'number',\r\n format: 'integer',\r\n helpId: 'pop_BA_CampaignGrids_NewCustomerConversions',\r\n }),\r\n column({\r\n name: 'NewCustomerRevenue',\r\n title: 'ColumnName_NewCustomerRevenue',\r\n property: 'PerformanceMetrics/NewCustomerRevenue',\r\n sortable: true,\r\n type: 'number',\r\n format: 'decimal',\r\n helpId: 'pop_BA_CampaignGrids_NewCustomerConversionsValue',\r\n }),\r\n column({\r\n name: 'NewCustomerConversionRate',\r\n title: 'ColumnName_NewCustomerConversionRate',\r\n property: 'PerformanceMetrics/NewCustomerConversionRate',\r\n sortable: true,\r\n type: 'number',\r\n format: 'percentage-value',\r\n helpId: 'pop_BA_CampaignGrids_NewCustomerConversionsRate',\r\n }),\r\n column({\r\n name: 'NewCustomerCPA',\r\n title: 'ColumnName_NewCustomerCPA',\r\n property: 'PerformanceMetrics/NewCustomerCPA',\r\n sortable: true,\r\n type: 'number',\r\n format: 'decimal',\r\n helpId: 'pop_BA_CampaignGrids_NewCustomerCPA',\r\n }),\r\n column({\r\n name: 'NewCustomerRevenueOnAdSpend',\r\n title: 'ColumnName_NewCustomerRevenueOnAdSpend',\r\n property: 'PerformanceMetrics/NewCustomerRevenueOnAdSpend',\r\n sortable: true,\r\n type: 'percentage',\r\n helpId: 'pop_BA_CampaignGrids_NewCustomerRevenueOnAdSpend',\r\n }),\r\n ]);\r\n }\r\n\r\n\r\n return accountsSummaryColumns;\r\n};\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\n// eslint-disable-next-line import/no-extraneous-dependencies\r\nimport { DS } from 'js-data';\r\n\r\nimport mockData from './data.json';\r\n\r\nexport const store = new DS();\r\n\r\nclass CustomerAdapter {\r\n // All of the methods shown here must return a promise\r\n\r\n // \"definition\" is a resource defintion 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 findAll(/* definition, params, options */) {\r\n const result = _.clone(mockData.value);\r\n\r\n result.raw = mockData;\r\n return Promise.resolve(result);\r\n }\r\n}\r\n\r\nstore.registerAdapter('Account', new CustomerAdapter(), { default: true });\r\n\r\nexport const account = store.defineResource({\r\n name: 'Account',\r\n idAttribute: 'Id',\r\n});\r\n","/* eslint-disable no-param-reassign */\r\nimport _ from 'underscore';\r\nimport $ from 'jquery';\r\n\r\nimport { uncheckedInjectionContext as globalContext } from '@bingads-webui-campaign/injection-context';\r\nimport { DataSourceStore } from '@bingads-webui-campaign/data-source-store';\r\nimport { helpers } from '@bingads-webui/projection-grid-toolbar';\r\nimport { AccountUtils } from '@bingads-webui-clientcenter/entity-utils';\r\nimport { showLabelsPopup, filterOnLabelClick, navigateToManagePage } from '@bingads-webui-campaign/labels';\r\nimport { validateOrder } from '@bingads-webui-campaign/summary-grid-helper';\r\n\r\nimport * as CommonUtils from './common-utils';\r\nimport { gridsMap } from './constants';\r\nimport { applyCustomerHierarchyOrderbyFilter, HiddenCustomerHierarchyColumns, HiddenManagementColumns, ManualHoldStatusColumns } from './helper/customer-hierarchy-helper';\r\nimport { loadShowScheduledImportPopup, showImportSummaryDetailsPopup } from './helper/import-status-helper';\r\nimport { columnConfiguration } from './columns/index';\r\nimport { dummyDataSource } from '../mock/dummy-data-source';\r\n\r\nconst i18n = globalContext.require('@bingads-webui/i18n-amd-loader!campaignui/feature/accounts-summary');\r\nconst preferenceService = globalContext.requireDefault('component/preference/service/index');\r\nconst { showQualityScoreDetail } = globalContext.require('campaignui/feature/common-grid-config/column/quality-score/quality-score-click-handler');\r\nconst AlertPopup = globalContext.requireDefault('campaignui/feature/alerts-popup/view/alertsPopup');\r\nconst sortableHeaderTemplate = globalContext.require('campaignui/feature/common-grid-config/column/sortableHeaderTemplate');\r\nconst globalConfig = globalContext.require('component/config/index');\r\nconst jsdataCampaign = globalContext.require('component/js-data-campaign/index');\r\nconst edm = globalContext.requireDefault('component/edm-campaign/index');\r\nconst logger = globalContext.require('module/service/instrumentation/index');\r\nconst { legacyRouter } = globalContext.require('component/legacy-router/index');\r\nconst router = _.clone(legacyRouter);\r\n\r\nconst {\r\n deletedReasonValueMatcher: isDeletedMatcher,\r\n isDeleted: isAccountDeleted,\r\n} = AccountUtils;\r\nconst {\r\n isAccountItemRow,\r\n isInImportTab,\r\n isInManagementOrBudgetTab,\r\n getGridPermissions,\r\n getSwitchCustomerShellLink,\r\n} = CommonUtils;\r\n\r\nconst {\r\n IsCustomerHierarchyEnabled,\r\n IsManagementDashboardEnabled,\r\n IsAccountSummaryGridDataActionEnabled,\r\n IsCustomColumnsInAccountsSummarySupported,\r\n IsAccountDashboardAlertsColumnAllowed,\r\n IsInternalUser,\r\n} = globalConfig.get('Permissions');\r\n\r\nconst headerRefreshCache = 'x-ms-refreshcampaigncache';\r\nconst headerLastWriteTime = 'x-ms-lastwritetime';\r\nconst isOdataActionSource = IsAccountSummaryGridDataActionEnabled || IsCustomColumnsInAccountsSummarySupported;\r\nlet alertPopup;\r\nlet alertPopupManagerAccounts;\r\n\r\nconst overridePreferenceConfig = ({ gridType, preferenceConfig }) => {\r\n const { orderby: orderbyInfo } = preferenceConfig.dataSource;\r\n const isImportGrid = isInImportTab(gridType);\r\n const config = _.extend({}, preferenceConfig);\r\n if (orderbyInfo && orderbyInfo.length > 0) {\r\n config.dataSource.orderby = applyCustomerHierarchyOrderbyFilter(orderbyInfo, IsCustomerHierarchyEnabled || IsManagementDashboardEnabled);\r\n }\r\n if (isImportGrid) {\r\n config.dataSource.query.$select = 'Name,AccountNumber,Id,OwnerId,AccountInactiveReasons,AccountInactiveReasonsCount,IsAccountAuthorized,IsParentAuthorized,AccountType,LastImportInfo';\r\n }\r\n\r\n const permissions = globalConfig.get('Permissions');\r\n if (permissions.IsAccountLabelsEnabled) {\r\n const labelsColumn = 'Labels';\r\n config.dataSource.query.$expand =\r\n config.dataSource.query.$expand ? config.dataSource.query.$expand += `,${labelsColumn}` : labelsColumn;\r\n }\r\n return config;\r\n};\r\n\r\nconst afterFindAll = (resources, attrs, options = {}, queryBuilder, gridName) => {\r\n // Only for first call add these headers. After that cache manager will handle it\r\n delete options.useDfmCache;\r\n\r\n if (options.headers) {\r\n delete options.headers[headerRefreshCache];\r\n delete options.headers[headerLastWriteTime];\r\n }\r\n\r\n // Only for first call that was using the preload.\r\n // After that, we should let cache manager and x-ms-lastwritetime values decide which cache to use/bypass.\r\n if (queryBuilder) {\r\n const gridDataParameters = queryBuilder.getDecoratorByName('gridDataParameters');\r\n if (gridDataParameters && gridDataParameters.preloadOptions === 'UsePreload') {\r\n gridDataParameters.preloadOptions = undefined; // or 'None' should be similar\r\n }\r\n }\r\n\r\n if (gridName === 'PerformanceGrid' && Array.isArray(attrs) && attrs.length) {\r\n attrs.forEach((v) => {\r\n if (v.AvailableInsightTypeIds && v.AvailableInsightTypeIds.length) {\r\n logger.logMessage([logger.constants.LOGCATEGORY.TRACE], logger.constants.LOGLEVEL.INFO, '/accounts/performance', `Fluctuations Rendered. FromScenario: PerformanceGrid, TypeIds: ${v.AvailableInsightTypeIds.toString()}, aid: ${v.Id}}.`);\r\n }\r\n });\r\n }\r\n\r\n $.advertiser.clearErrorSummary();\r\n\r\n if (_.isArray(attrs)) {\r\n return attrs;\r\n }\r\n\r\n const errors = attrs ? attrs.errors : [];\r\n\r\n if (_.some(errors, error => error.Code === 'TooMuchDataToDownload')) {\r\n $.advertiser.appendErrorSummary(i18n.getString('Accounts_TooMuchDataToDownload'));\r\n } else {\r\n $.advertiser.appendErrorSummary(i18n.getString('Manage_Error_Default'));\r\n }\r\n\r\n return {};\r\n};\r\n\r\nconst isAccountSelectable = ({ account, gridPermissions }) => {\r\n // Don't show checkbox for total row\r\n if (!isAccountItemRow(account)) {\r\n return false;\r\n }\r\n\r\n const isAccountActive = !isAccountDeleted(account);\r\n\r\n return _.some([\r\n gridPermissions.checkAndTransferAccount && isAccountActive,\r\n gridPermissions.checkAndUnlinkAccount && isAccountActive,\r\n gridPermissions.checkAndReactivateAccount && !isAccountActive,\r\n gridPermissions.checkAndDeleteAccount && isAccountActive,\r\n gridPermissions.checkAndEditAccount && isAccountActive,\r\n gridPermissions.importFromGoogleAds && isAccountActive,\r\n ]);\r\n};\r\n\r\nexport function getConfig({\r\n view,\r\n gridType,\r\n preferenceConfig,\r\n viewport,\r\n filterService,\r\n isForVNext,\r\n preexecuteFlag = false,\r\n hasUnifiedSmartAccount = false,\r\n additionalEvents = {},\r\n customHeaderOffset,\r\n permissions,\r\n i18n: newI18n,\r\n}) {\r\n const { gridName } = gridsMap[gridType];\r\n const preferenceConfigOverriden = overridePreferenceConfig({ gridType, preferenceConfig });\r\n const isManagementGrid = isInManagementOrBudgetTab(gridType);\r\n const isImportGrid = isInImportTab(gridType);\r\n\r\n // For the Old UI grid, this is set in the ui-legacy bootstrap. For the vNext grid, this is only set if DFM is enabled on the performance page.\r\n let customDataSource = DataSourceStore.get(gridName);\r\n\r\n const gridPermissions = getGridPermissions({ gridType });\r\n\r\n const { dynamic } = permissions;\r\n const { AccountSummaryFilterImprovementEnabled } = dynamic;\r\n\r\n if (customDataSource) {\r\n if (AccountSummaryFilterImprovementEnabled) {\r\n const { dataSource: cachedDataSource } = customDataSource;\r\n customDataSource = cachedDataSource;\r\n }\r\n // eslint-disable-next-line no-underscore-dangle\r\n customDataSource._options.afterFindAll = (resources, attrs) => afterFindAll(resources, attrs, customDataSource._options, customDataSource.queryBuilder, gridName);\r\n if (isForVNext) {\r\n customDataSource.queryBuilder.getDecoratorByName('filter').filterService = filterService;\r\n }\r\n }\r\n\r\n const entitySetParam = {\r\n gridDataParameters: {},\r\n };\r\n\r\n if (IsManagementDashboardEnabled) {\r\n entitySetParam.isCustomerHierachyRequest = true; // MT has a typo in this param, missing an r in 'hierarchy'\r\n if (isManagementGrid) {\r\n entitySetParam.isManagementRequest = true;\r\n }\r\n }\r\n\r\n // Mangement grid requires extra fields used by buttons/menus/checkbox in toolbar\r\n let extraColumns = null;\r\n\r\n if (IsCustomerHierarchyEnabled) {\r\n extraColumns = HiddenCustomerHierarchyColumns;\r\n } else if (IsManagementDashboardEnabled) {\r\n // field \"OwnerId\" gets assigned to special value so require extra field \"Owner\" In NewUI-Only management grid.\r\n extraColumns = HiddenManagementColumns;\r\n }\r\n\r\n extraColumns = [\r\n ...extraColumns,\r\n ...ManualHoldStatusColumns,\r\n ];\r\n\r\n // Account Mode filtering for Unified Product Phase 2\r\n // Note: should enable DFM for smart performance eventually, if DFM is turned on the grid call will not actually be made here\r\n // (see fetch-performance-page-data-webpack.js for how to set right param for DFM call)\r\n if (hasUnifiedSmartAccount) {\r\n if (CommonUtils.isInPerformanceTab(gridType) || CommonUtils.isInImportTab(gridType)) {\r\n entitySetParam.accountModes = ['Expert'];\r\n } else if (CommonUtils.isInSmartPerformanceTab(gridType)) {\r\n entitySetParam.accountModes = ['Smart'];\r\n }\r\n }\r\n\r\n const tableName = i18n.getString(gridsMap[gridType].tableNameLocalizedKey);\r\n\r\n const gridConfigCol = columnConfiguration({\r\n gridType, isForVNext, hasUnifiedSmartAccount, i18n: newI18n,\r\n });\r\n\r\n validateOrder(preferenceConfigOverriden, gridConfigCol, gridName, permissions);\r\n\r\n const gridConfig = {\r\n name: gridName,\r\n tableClasses: _.union(['table', 'table-bordered'], isImportGrid && ['bulk-status-grid']),\r\n tableAttributes: { 'aria-label': tableName },\r\n isDataFetchManagerSource: preexecuteFlag || !!customDataSource,\r\n filterService: isForVNext ? filterService : undefined,\r\n customerHierarchyExtras: extraColumns,\r\n dataSource: preexecuteFlag ? dummyDataSource : customDataSource || {\r\n type: 'jsdata',\r\n entity: jsdataCampaign.Account,\r\n primaryKey: 'Id',\r\n query: preferenceConfigOverriden.dataSource.query,\r\n orderby: preferenceConfigOverriden.dataSource.orderby,\r\n options: {\r\n cacheResponse: false,\r\n entitySet: isOdataActionSource ? edm.currentCustomer.Accounts['Default.GridData'].$call(entitySetParam) : edm.currentCustomer.Accounts,\r\n headers: {\r\n [headerRefreshCache]: true,\r\n },\r\n // DFM Cache is query-based and blocks calls that only update payload (e.g. segmentation type)\r\n useDfmCache: false,\r\n afterFindAll: (resources, attrs) => afterFindAll(resources, attrs, view.gridView.get('dataSource').options, undefined, gridName),\r\n },\r\n },\r\n query: customDataSource && {\r\n query: preferenceConfigOverriden.dataSource.query,\r\n orderby: preferenceConfigOverriden.dataSource.orderby,\r\n },\r\n sortableHeader: _.defaults(_.pick(preferenceConfigOverriden.sortableHeader, 'name', 'directionIndex'), {\r\n template: sortableHeaderTemplate,\r\n }),\r\n rows: {\r\n headRows: helpers.singleToolbarHeadRows(),\r\n bodyRows: [\r\n {\r\n type: 'data-rows',\r\n classes: {\r\n 'deleted-account': item => isAccountDeleted(item),\r\n },\r\n },\r\n ],\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 i18n,\r\n preferenceService,\r\n config: globalConfig,\r\n columns: gridConfigCol,\r\n events: _.pick({\r\n 'click .account-inactive-reasons-cell .status_icon': IsAccountDashboardAlertsColumnAllowed && !isForVNext && ((e) => {\r\n const key = view.gridView.keyOfElement(e.target);\r\n const account = view.gridView.itemWithKey(key);\r\n\r\n $.gridPopup.clickEvent({ target: e.target }, () => {\r\n if (!alertPopup) {\r\n alertPopup = new AlertPopup({\r\n el: $(`#${AlertPopup.popupId}`),\r\n });\r\n }\r\n alertPopup.accountInactiveReasons = _.reject(account.AccountInactiveReasons, isDeletedMatcher);\r\n alertPopup.accountId = key;\r\n alertPopup.render();\r\n }, AlertPopup.popupId, '', true);\r\n }),\r\n 'click .quality-score-cell .status-image.status_icon.gridDetailsImage': (e) => {\r\n const key = view.gridView.keyOfElement(e.target);\r\n const account = view.gridView.itemWithKey(key);\r\n\r\n showQualityScoreDetail(e, account.QualityScoreData, 'qsContainer');\r\n },\r\n 'click .manager-accounts-cell .status_icon': !isForVNext && ((e) => {\r\n const key = view.gridView.keyOfElement(e.target);\r\n const account = view.gridView.itemWithKey(key);\r\n\r\n $.gridPopup.clickEvent({ target: e.target }, () => {\r\n if (!alertPopupManagerAccounts) {\r\n alertPopupManagerAccounts = new AlertPopup({\r\n el: $(`#${AlertPopup.popupId}`),\r\n });\r\n }\r\n alertPopupManagerAccounts.manageraccounts = _.map(account.ManagerAccounts, (managerAccount = {}) => ({\r\n ...managerAccount,\r\n link: IsInternalUser ? getSwitchCustomerShellLink(managerAccount.Id) : '',\r\n }));\r\n alertPopupManagerAccounts.renderManagerAccountsContent();\r\n }, AlertPopup.popupId, '', true);\r\n }),\r\n 'click .import-summary.icon-info': !isForVNext && ((e) => {\r\n const key = view.gridView.keyOfElement(e.target);\r\n const account = view.gridView.itemWithKey(key);\r\n\r\n showImportSummaryDetailsPopup(e, account, i18n);\r\n }),\r\n 'click .show-scheduled-imports': !isForVNext && ((e) => {\r\n loadShowScheduledImportPopup()\r\n .then(({ showScheduledImportPopup }) => {\r\n const key = view.gridView.keyOfElement(e.target);\r\n const account = view.gridView.itemWithKey(key);\r\n showScheduledImportPopup(e, account, $('.scheduled-imports-popup'));\r\n });\r\n }),\r\n 'click .labels-cell-container a': ((event) => {\r\n const key = view.gridView.keyOfElement(event.target);\r\n const targetEntity = view.gridView.itemWithKey(key);\r\n\r\n showLabelsPopup({\r\n labels: targetEntity.Labels,\r\n entityType: 'Account',\r\n entityName: targetEntity.Name,\r\n event,\r\n router,\r\n i18n,\r\n grid: view,\r\n filterService,\r\n isMCCLabelEnabled: true,\r\n });\r\n }),\r\n 'click .labels-cell-item': ((event) => {\r\n const key = view.gridView.keyOfElement(event.target);\r\n const targetEntity = view.gridView.itemWithKey(key);\r\n\r\n filterOnLabelClick(event, targetEntity.Labels, view.gridView, filterService, true);\r\n }),\r\n 'click .manage-labels-button': () => {\r\n navigateToManagePage(router);\r\n },\r\n ...additionalEvents,\r\n }, Boolean),\r\n ...(isForVNext ? {\r\n selection: gridPermissions.checkboxColumns ? {\r\n selectable: account => isAccountSelectable({ account, gridPermissions }),\r\n } : undefined,\r\n } : {\r\n selection: gridPermissions.checkboxColumns ? {\r\n bodyClasses: ['text-center'],\r\n headClasses: ['text-center'],\r\n selectable: account => isAccountSelectable({ account, gridPermissions }),\r\n } : undefined,\r\n customDepsMap: (nameToDepsMap) => {\r\n if (nameToDepsMap && nameToDepsMap.filterState) {\r\n _.extend(nameToDepsMap, { filterState: _.union(nameToDepsMap.filterState, ['aggregatedRows']) });\r\n }\r\n },\r\n }),\r\n };\r\n\r\n if (viewport) {\r\n gridConfig.scrolling.viewport = viewport;\r\n }\r\n\r\n return gridConfig;\r\n}\r\n","import { noop } from 'underscore';\r\nimport { account } from './js-data-resource';\r\n\r\nexport const dummyDataSource = {\r\n type: 'js-data',\r\n entity: account,\r\n primaryKey: 'Id',\r\n options: {\r\n entitySet: {\r\n toJSON: noop,\r\n },\r\n },\r\n};\r\n","import _ from 'underscore';\r\n\r\nimport { uncheckedInjectionContext as globalContext } from '@bingads-webui-campaign/injection-context';\r\n\r\nconst i18n = globalContext.require('$/i18n!legacy/global');\r\n\r\nconst { arrowDownIcon } = globalContext.require('component/bingads-grid/shared/icons');\r\nconst globalConfig = globalContext.require('component/config/index');\r\n\r\nconst { IsManagementDashboardEnabled } = globalConfig.get('Permissions');\r\n\r\nexport default definePlugin => definePlugin('bulkAccountManagement', [\r\n 'config',\r\n 'gridView',\r\n 'toolbar',\r\n], (config, gridView, toolbar) => {\r\n const {\r\n dropdown = 'dropdown-edit',\r\n enabled = false,\r\n } = _.chain(config).result('plugins').result('bulkAccountManagement').value();\r\n const toolbarEditor = toolbar.gridToolbarGroup.toolbarWithItem(dropdown);\r\n\r\n if (!enabled) {\r\n toolbarEditor.update({\r\n id: dropdown,\r\n attributes: { style: 'display: none;' },\r\n });\r\n return;\r\n }\r\n\r\n function buildBulkSheet() {\r\n const accountNumberList = _.map(\r\n gridView.selectedKeys(),\r\n key => _.result(gridView.itemWithKey(key), 'AccountNumber')\r\n );\r\n\r\n window.App.trigger('accounts.bam.loadQueryBuilder', { accountNumberList });\r\n }\r\n\r\n function uploadBulkSheet() {\r\n window.App.trigger('accounts.bam.loadBulkUploads');\r\n }\r\n\r\n gridView.set({\r\n selection: {\r\n bodyClasses: ['text-center'],\r\n headClasses: ['text-center'],\r\n },\r\n });\r\n\r\n toolbarEditor.update({\r\n id: dropdown,\r\n button: {\r\n classes: IsManagementDashboardEnabled ? ['btn', 'btn-secondary'] : ['btn', 'btn-primary'],\r\n text: i18n.getString('Edit'),\r\n iconRight: arrowDownIcon,\r\n },\r\n menu: {\r\n items: [{\r\n text: i18n.getString('Bulk_Download_Edit_Title'),\r\n onClick: buildBulkSheet,\r\n }, {\r\n text: i18n.getString('BulkUpload_MenuItem_Title'),\r\n onClick: uploadBulkSheet,\r\n }],\r\n },\r\n });\r\n});\r\n\r\n","import _ from 'underscore';\r\n\r\nimport { uncheckedInjectionContext as globalContext } from '@bingads-webui-campaign/injection-context';\r\nimport { accountMetricCategoriesFactory } from '@bingads-webui/custom-columns-shared-config';\r\nimport { applyPartialConversionColumnName, getColumnsConversionMap } from '@bingads-webui-campaign/column-conversions';\r\n\r\nimport * as CommonUtils from '../common-utils';\r\nimport { getSharedColumnConfiguration } from '../columns/shared-column-configuration';\r\nimport { columnConfiguration } from '../columns/index';\r\nimport { gridsMap } from '../constants';\r\n\r\nconst i18n = globalContext.require('@bingads-webui/i18n-amd-loader!campaignui/feature/accounts-summary');\r\nconst i18nGlobal = globalContext.require('$/i18n!legacy/global');\r\nconst { Columns, SelectedColumns } = globalContext.require('component/bingads-grid/service/column-chooser-preferences');\r\nconst { MCCCustomColumns } = globalContext.require('component/bingads-grid/service/custom-column-preferences');\r\nconst { LegacyColumns, LegacySelectedColumns } = globalContext.require('component/bingads-grid/service/legacy-column-chooser-preferences');\r\nconst globalConfig = globalContext.require('component/config/index');\r\nconst logger = globalContext.require('module/service/instrumentation/index');\r\nconst { getLockedColumns, columnNames } = getSharedColumnConfiguration(globalConfig);\r\n\r\nconst {\r\n isInManagementOrBudgetTab,\r\n isInPerformanceTab,\r\n isInSmartPerformanceTab,\r\n} = CommonUtils;\r\n\r\nconst permissions = globalConfig.get('Permissions');\r\nconst {\r\n IsCustomerHierarchyEnabled,\r\n IsCustomColumnsInAccountsSummarySupported,\r\n IsAvgPositionDeprecationPhase2Enabled,\r\n IsViewThroughConversionEnabled,\r\n IsSmartUIEnabled,\r\n IsAudienceSOVEnabled,\r\n IsAvgPositionDeprecationPhase1Enabled,\r\n IsAccountLabelsEnabled,\r\n dynamic = {},\r\n IsViewThroughConversionsRevenueEnabled,\r\n} = permissions;\r\n\r\nconst {\r\n ColumnConversion: IsColumnConversionEnabled,\r\n PartialConversions: IsPartialConversionsEnabled,\r\n ConvValueRules: isConversionValueRuleColumnsEnabled,\r\n CBTLifetimeBudget: IsCampaignLifetimeBudgetEnabled,\r\n} = dynamic;\r\nconst usePartialConversions = IsColumnConversionEnabled && IsPartialConversionsEnabled;\r\n\r\nexport const columnChooserConfiguration = ({\r\n gridType,\r\n isForVNext,\r\n filterService,\r\n hasUnifiedSmartAccount = false,\r\n}) => {\r\n const { gridName } = gridsMap[gridType];\r\n const isManagementGrid = isInManagementOrBudgetTab(gridType);\r\n const isPerformanceGrid = isInPerformanceTab(gridType);\r\n const isSmartPerformanceGrid = isInSmartPerformanceTab(gridType);\r\n const lockedColumns = getLockedColumns({ gridType, isForVNext });\r\n let customColumnConfig;\r\n\r\n if (IsCustomColumnsInAccountsSummarySupported && isPerformanceGrid && isForVNext) {\r\n const { metricCategories, segmentCategories } =\r\n accountMetricCategoriesFactory(permissions);\r\n\r\n customColumnConfig = {\r\n enabled: true,\r\n metricCategories,\r\n segmentCategories,\r\n filterService,\r\n };\r\n }\r\n\r\n const columnTitleMap = {};\r\n\r\n _.each(columnConfiguration({ gridType, isForVNext, hasUnifiedSmartAccount }), (columnInstance) => {\r\n columnTitleMap[columnInstance.name] = columnInstance.title;\r\n });\r\n\r\n const columnWithNewTagMap = {\r\n AccountVerificationStatus: true,\r\n BusinessLegalName: true,\r\n };\r\n\r\n const makeOptions = (category, selectOption = 'optional') => _.chain(category)\r\n .map((columnName) => {\r\n const columnTitle = columnTitleMap[columnName];\r\n const isNewColumn = columnWithNewTagMap[columnName];\r\n\r\n return {\r\n key: columnName,\r\n name: columnTitle,\r\n selectOption,\r\n isNewColumn,\r\n };\r\n })\r\n .value();\r\n\r\n const geti18nString = key => (isForVNext ? i18n.getString(key) : i18nGlobal.getString(key));\r\n let categories = [];\r\n if (isManagementGrid) {\r\n categories = [\r\n {\r\n name: geti18nString('Attributes'),\r\n isNewCategory: true,\r\n options: [\r\n ...makeOptions(lockedColumns, 'locked'),\r\n ...makeOptions(_.compact([\r\n (IsSmartUIEnabled || hasUnifiedSmartAccount) && 'AccountMode',\r\n IsCustomerHierarchyEnabled && 'AccountType',\r\n 'Owner',\r\n 'AccountVerificationStatus',\r\n IsCustomerHierarchyEnabled && 'ManagerAccounts',\r\n 'BillToCustomerName',\r\n columnNames.PaymentSetting,\r\n columnNames.Balance,\r\n columnNames.Currency,\r\n columnNames.BillingLanguage,\r\n 'BusinessLegalName',\r\n columnNames.BusinessLocation,\r\n columnNames.AccountTimeZone,\r\n columnNames.TaxId,\r\n columnNames.PaymentMethod,\r\n columnNames.DailyBudget,\r\n IsCampaignLifetimeBudgetEnabled && columnNames.CampaignLifetimeBudget,\r\n columnNames.AutoTagging,\r\n columnNames.PrimaryContact,\r\n IsAccountLabelsEnabled && columnNames.Labels,\r\n ]))],\r\n },\r\n ];\r\n } else if (isSmartPerformanceGrid) {\r\n // Limit column chooser to UP Smart supported columns only\r\n categories = [\r\n {\r\n name: geti18nString('Attributes'),\r\n options: [\r\n ...makeOptions(lockedColumns, 'locked'),\r\n ...makeOptions(_.compact([\r\n 'AccountMode',\r\n IsCustomerHierarchyEnabled && 'AccountType',\r\n 'Owner',\r\n IsCustomerHierarchyEnabled && 'ManagerAccounts',\r\n columnNames.Currency,\r\n 'BillToCustomerName',\r\n columnNames.DailyBudget,\r\n IsCampaignLifetimeBudgetEnabled && columnNames.CampaignLifetimeBudget,\r\n IsAccountLabelsEnabled && columnNames.Labels,\r\n ])),\r\n ],\r\n },\r\n {\r\n name: geti18nString('Performance'),\r\n options: makeOptions(_.compact([\r\n 'Clicks',\r\n 'Impressions',\r\n 'CTR',\r\n 'TotalEffectiveCost',\r\n ])),\r\n },\r\n {\r\n name: geti18nString('Conversions'),\r\n options: makeOptions(_.compact([\r\n 'CPA',\r\n 'Conversions',\r\n 'ConversionRate',\r\n ])),\r\n },\r\n ];\r\n } else {\r\n categories = [\r\n {\r\n name: geti18nString('Attributes'),\r\n options: [\r\n ...makeOptions(lockedColumns, 'locked'),\r\n ...makeOptions(_.compact([\r\n (IsSmartUIEnabled || hasUnifiedSmartAccount) && 'AccountMode',\r\n IsCustomerHierarchyEnabled && 'AccountType',\r\n 'Owner',\r\n IsCustomerHierarchyEnabled && 'ManagerAccounts',\r\n columnNames.Currency,\r\n 'BillToCustomerName',\r\n 'IOPurchaseOrder',\r\n 'IOBudget',\r\n 'RemainingIOBudget',\r\n 'StartDate',\r\n 'EndDate',\r\n columnNames.DailyBudget,\r\n IsCampaignLifetimeBudgetEnabled && columnNames.CampaignLifetimeBudget,\r\n 'QualityScore',\r\n IsAccountLabelsEnabled && columnNames.Labels,\r\n ])),\r\n ],\r\n },\r\n {\r\n name: geti18nString('Performance'),\r\n options: makeOptions(_.compact([\r\n 'Clicks',\r\n 'Impressions',\r\n 'CTR',\r\n 'AverageCPC',\r\n 'AverageCPM',\r\n 'VideoViews',\r\n 'ViewThroughRate',\r\n 'AverageCPV',\r\n 'TotalWatchTimeInMS',\r\n 'AverageWatchTimePerImpression',\r\n 'AverageWatchTimePerVideoView',\r\n 'VideoViewsAt25Percent',\r\n 'VideoViewsAt50Percent',\r\n 'VideoViewsAt75Percent',\r\n 'CompletedVideoViews',\r\n 'VideoCompletionRate',\r\n !IsAvgPositionDeprecationPhase2Enabled && 'AveragePosition',\r\n 'TotalEffectiveCost',\r\n 'TopImpressionRate',\r\n 'AbsoluteTopImpressionRate',\r\n ])),\r\n },\r\n {\r\n name: geti18nString('Conversions'),\r\n options: makeOptions(applyPartialConversionColumnName(permissions, _.compact([\r\n 'CPA',\r\n 'Conversions',\r\n 'ConversionRate',\r\n 'AdvertiserReportedRevenue',\r\n 'RevenueOnAdSpend',\r\n 'AllConversionCPA',\r\n 'AllConversions',\r\n 'AllConversionRate',\r\n 'AllConversionRevenueOnAdSpend',\r\n 'AllConversionAdvertiserReportedRevenue',\r\n isConversionValueRuleColumnsEnabled && 'AdvertiserReportedRevenueAdjustment',\r\n isConversionValueRuleColumnsEnabled && 'ViewThroughConversionsRevenueAdjustment',\r\n isConversionValueRuleColumnsEnabled && 'AllConversionAdvertiserReportedRevenueAdjustment',\r\n IsViewThroughConversionEnabled && 'ViewThroughConversions',\r\n IsViewThroughConversionsRevenueEnabled && 'ViewThroughConversionsRevenue',\r\n IsViewThroughConversionsRevenueEnabled && 'ViewThroughConversionsCPA',\r\n IsViewThroughConversionsRevenueEnabled && 'ViewThroughConversionsReturnOnAdSpend',\r\n IsViewThroughConversionsRevenueEnabled && 'ViewThroughConversionsRate',\r\n dynamic.NewCustomerAcquisition && 'NewCustomerConversionRate',\r\n dynamic.NewCustomerAcquisition && 'NewCustomerConversions',\r\n dynamic.NewCustomerAcquisition && 'NewCustomerCPA',\r\n dynamic.NewCustomerAcquisition && 'NewCustomerRevenue',\r\n dynamic.NewCustomerAcquisition && 'NewCustomerRevenueOnAdSpend',\r\n dynamic.CPSReporting && 'SalesCount',\r\n dynamic.InstallPerformanceColumns && 'Installs',\r\n ]))),\r\n },\r\n {\r\n name: geti18nString('Competitive'),\r\n options: makeOptions(_.compact([\r\n 'ImpShare',\r\n 'ExactMatchImpressionSharePercent',\r\n 'ImpShareLostToBudget',\r\n 'ImpShareLostToRank',\r\n 'ClickSharePercent',\r\n 'TopImpressionSharePercent',\r\n 'TopImpressionShareLostToBudget',\r\n 'TopImpressionShareLostToRank',\r\n 'AbsoluteTopImpressionSharePercent',\r\n 'AbsoluteTopImpressionShareLostToBudget',\r\n 'AbsoluteTopImpressionShareLostToRank',\r\n IsAudienceSOVEnabled && 'AudienceImpressionShare',\r\n IsAudienceSOVEnabled && 'AudienceImpressionShareLostToBudget',\r\n IsAudienceSOVEnabled && 'AudienceImpressionShareLostToRank',\r\n ])),\r\n },\r\n ];\r\n }\r\n\r\n const columnChooserConfig = {\r\n i18n,\r\n Columns,\r\n SelectedColumns,\r\n LegacyColumns,\r\n LegacySelectedColumns,\r\n CustomColumns: MCCCustomColumns,\r\n customColumnConfig,\r\n categories,\r\n selected: lockedColumns.concat(_.compact([\r\n IsCustomerHierarchyEnabled && 'AccountType',\r\n (isPerformanceGrid || isSmartPerformanceGrid) && 'AccountMode',\r\n 'Owner',\r\n isManagementGrid && 'AccountVerificationStatus',\r\n IsCustomerHierarchyEnabled && 'ManagerAccounts',\r\n (isPerformanceGrid || isSmartPerformanceGrid) && 'Clicks',\r\n (isPerformanceGrid || isSmartPerformanceGrid) && 'Impressions',\r\n (isPerformanceGrid || isSmartPerformanceGrid) && 'CTR',\r\n isPerformanceGrid && 'AverageCPC',\r\n (isPerformanceGrid || isSmartPerformanceGrid) && 'TotalEffectiveCost',\r\n isSmartPerformanceGrid && 'Conversions',\r\n isPerformanceGrid && usePartialConversions && 'ConversionsCredit',\r\n isPerformanceGrid && !usePartialConversions && 'Conversions',\r\n (isPerformanceGrid || isSmartPerformanceGrid) && 'TopImpressionRate',\r\n (isPerformanceGrid || isSmartPerformanceGrid) && 'AbsoluteTopImpressionRate',\r\n isManagementGrid && 'BillToCustomerName',\r\n isManagementGrid && columnNames.PaymentSetting,\r\n isManagementGrid && columnNames.Balance,\r\n isManagementGrid && columnNames.Currency,\r\n isManagementGrid && 'BusinessLegalName',\r\n isManagementGrid && columnNames.BusinessLocation,\r\n isManagementGrid && columnNames.TaxId,\r\n isManagementGrid && columnNames.PaymentMethod,\r\n isManagementGrid && columnNames.DailyBudget,\r\n isManagementGrid && IsCampaignLifetimeBudgetEnabled && columnNames.CampaignLifetimeBudget,\r\n isManagementGrid && columnNames.PrimaryContact,\r\n ])),\r\n\r\n locked: lockedColumns,\r\n patchQuery: true,\r\n\r\n ...isPerformanceGrid ? {\r\n columnConversions: getColumnsConversionMap(gridName, permissions),\r\n } : {},\r\n };\r\n\r\n if (isForVNext) {\r\n columnChooserConfig.customToolbarIcon = 'ba-TripleColumnSolid';\r\n }\r\n\r\n // Logging default cols to sort out warmup cache issue, remove after problem fixed\r\n logger.logMessage([logger.constants.LOGCATEGORY.TRACE], logger.constants.LOGLEVEL.INFO, '/accounts/performance', `Default columns used in warmup query in column-chooser-config.js: ${columnChooserConfig.selected}, SelectedColumns: ${SelectedColumns}, LegacySelectedColumns: ${LegacySelectedColumns}, isPerformanceGrid: ${isPerformanceGrid}, IsAvgPositionDeprecationPhase1Enabled: ${IsAvgPositionDeprecationPhase1Enabled}`);\r\n\r\n return columnChooserConfig;\r\n};\r\n","import _ from 'underscore';\r\nimport $ from 'jquery';\r\n\r\nimport { uncheckedInjectionContext as globalContext } from '@bingads-webui-campaign/injection-context';\r\nimport { helpers, toolbarPlugin } from '@bingads-webui/projection-grid-toolbar';\r\n\r\nimport { aggregatedRowsPluginBuilder } from '@bingads-webui-campaign/pgrid-aggregated-rows';\r\nimport { performanceLogPlugin, perfMarkerPlugin } from '@bingads-webui-campaign/pgrid-performance-log';\r\nimport { columnChooserPlugin } from '@bingads-webui-campaign/projection-grid-column-chooser';\r\nimport { dateFilterPlugin } from '@bingads-webui-campaign/projection-grid-date-filter';\r\nimport { periodOverPeriodPlugin } from '@bingads-webui-campaign/projection-grid-period-over-period';\r\nimport { segmentPlugin } from '@bingads-webui-campaign/projection-grid-segment';\r\nimport { a11yPlugin } from '@bingads-webui/projection-grid-a11y';\r\nimport { assistedSelectionPlugin } from '@bingads-webui/projection-grid-assisted-selection';\r\nimport { uiBlockerPlugin } from '@bingads-webui/projection-grid-uiblocker';\r\nimport { paginationPlugin } from '@bingads-webui/projection-grid-pagination';\r\nimport { placeholderPlugin } from '@bingads-webui/projection-grid-placeholder';\r\nimport { labelsPlugin } from '@bingads-webui-campaign/projection-grid-labels';\r\nimport { Label } from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport {\r\n timeSegmentationTypeEnum,\r\n campaignSegmentationTypeEnum,\r\n segmentationType,\r\n} from '@bingads-webui-campaign/segmentation-utilities';\r\nimport bamPlugin from './bam-plugin';\r\n\r\nimport { getToolbarItems } from './toolbar-config';\r\nimport { columnChooserConfiguration } from './column-chooser-config';\r\nimport { gridsMap } from '../constants';\r\nimport { isInImportTab, isInPerformanceTab, isInSmartPerformanceTab, isInManagementOrBudgetTab } from '../common-utils';\r\nimport { isInManagementTab } from '../helper/management-dashboard-helper';\r\n\r\nconst i18n = globalContext.require('@bingads-webui/i18n-amd-loader!campaignui/feature/accounts-summary');\r\nconst schemaI18n = globalContext.require('$/schema-i18n!campaign');\r\nconst accountSchema = globalContext.require('$/schema!campaign/Account');\r\nconst globalConfig = globalContext.require('component/config/index');\r\nconst { setSegType, getSegType } = globalContext.require('component/bingads-grid/service/segmentation-preferences');\r\nconst edm = globalContext.requireDefault('component/edm-campaign/index');\r\nconst state = globalContext.require('component/state/index');\r\nconst logger = globalContext.require('module/service/instrumentation/index');\r\nconst { legacyRouter } = globalContext.require('component/legacy-router/index');\r\nconst i18nErrors = globalContext.require('component/api-errors-campaign/index');\r\nconst instrumentation = globalContext.requireDefault('campaignui/feature/instrumentation/index');\r\nconst jsdata = globalContext.require('component/js-data-campaign/index');\r\nconst router = _.clone(legacyRouter);\r\nconst cacheService = globalContext.require('Services/CacheService');\r\nconst dataContextManager = globalContext.require('SummaryDataContextManager');\r\nconst { LabelAssociationView } = globalContext.require('campaignui/feature/common-grid-plugins/label/label-association-view');\r\n\r\nconst customerHierarchyPlugin = globalContext.requireDefault('campaignui/feature/bingadsgrid/vnext/plugin/customer-hierarchy-plugin');\r\nconst inlineDownloadPlugin = globalContext.requireDefault('campaignui/feature/bingadsgrid/vnext/plugin/inline-download');\r\nconst { inlineDownloadWithoutFilterStatePlugin } = globalContext.require('campaignui/feature/bingadsgrid/vnext/plugin/inline-download');\r\nconst primaryContactBulkEditorPlugin = globalContext.requireDefault('campaignui/feature/bingadsgrid/vnext/plugin/primary-contacts-bulk-edit-plugin');\r\nconst { jsdataRawDataPlugin } = globalContext.require('campaignui/feature/common-grid-plugins/js-data-raw-data');\r\n\r\nconst {\r\n IsCampaignBAMEnabled,\r\n IsCustomerHierarchyEnabled,\r\n IsAccountLabelsEnabled,\r\n} = globalConfig.get('Permissions');\r\n\r\nconst dateFilterConfiguration = ({ addDateChangeListener }) => ({\r\n isOdataActionSource: true,\r\n edm,\r\n state,\r\n addDateChangeListener,\r\n comparisonColumns: [\r\n 'PeriodPerformanceMetrics',\r\n 'PerformanceMetricsChange',\r\n 'PerformanceMetricsChangePercentage',\r\n ],\r\n});\r\n\r\nexport function getAdsPlugins({\r\n view,\r\n gridType,\r\n parentPerfMarker,\r\n preferenceConfig,\r\n viewport,\r\n addDateChangeListener,\r\n isForVNext,\r\n filterService,\r\n p$daterange,\r\n scope,\r\n hasUnifiedSmartAccount = false,\r\n}) {\r\n const {\r\n pageable: {\r\n pageSize,\r\n },\r\n dataSource,\r\n } = preferenceConfig;\r\n const isPerformanceGrid = isInPerformanceTab(gridType);\r\n const isSmartPerformanceGrid = isInSmartPerformanceTab(gridType);\r\n const isImportGrid = isInImportTab(gridType);\r\n const isManagementGrid = isInManagementOrBudgetTab(gridType);\r\n const permissions = globalConfig.get('Permissions');\r\n const isManagementRequest = permissions.IsManagementDashboardEnabled && isManagementGrid;\r\n const { gridName } = gridsMap[gridType];\r\n\r\n const aggregatedRowsPlugin = aggregatedRowsPluginBuilder({\r\n i18n,\r\n keys: {\r\n overallI18nKey: 'AccountDashboard_Total_New',\r\n filteredI18nKey: 'AccountDashboard_FilteredTotal_New',\r\n },\r\n permissions,\r\n customConfig: {\r\n showSearchRow: false,\r\n showAudienceRow: false,\r\n showNativeRow: false,\r\n showDeletedRow: false,\r\n },\r\n filterService: isForVNext ? filterService : undefined,\r\n });\r\n\r\n const getSegmentationTypes = () => {\r\n if (isSmartPerformanceGrid) {\r\n return timeSegmentationTypeEnum;\r\n } else if (permissions.IsVerticalAdsReportingPhase1Enabled) {\r\n return [...campaignSegmentationTypeEnum, segmentationType.AdScenario];\r\n }\r\n\r\n return campaignSegmentationTypeEnum;\r\n };\r\n\r\n const plugins = _.compact([{\r\n // For accurate grid init latency, PerfMarkerPlugin should be the first plugin to load.\r\n plugin: perfMarkerPlugin,\r\n config: {\r\n appConfig: globalConfig,\r\n marker: parentPerfMarker,\r\n },\r\n },\r\n {\r\n plugin: dateFilterPlugin,\r\n config: dateFilterConfiguration({ addDateChangeListener }),\r\n },\r\n !isForVNext && {\r\n plugin: toolbarPlugin,\r\n config: helpers.singleToolbar({\r\n items: getToolbarItems({ view, gridType, isForVNext }),\r\n }),\r\n },\r\n {\r\n plugin: performanceLogPlugin,\r\n config: {\r\n appConfig: globalConfig,\r\n logger,\r\n },\r\n },\r\n {\r\n plugin: uiBlockerPlugin,\r\n config: {\r\n el: isForVNext ? viewport : $('#child-page'),\r\n },\r\n },\r\n {\r\n plugin: paginationPlugin,\r\n config: {\r\n pageSize,\r\n availablePageSizes: [20, 50, 100, 200],\r\n enableRandomPage: false,\r\n pageNumberLabelText: isForVNext ? '' : i18n.getString('Grid_Page_Colon'),\r\n pageSizeText: i18n.getString('Grid_ShowRows'),\r\n totalPageCountText: i18n.getString('Grid_PageOf'),\r\n },\r\n },\r\n {\r\n plugin: jsdataRawDataPlugin,\r\n },\r\n {\r\n plugin: assistedSelectionPlugin,\r\n },\r\n {\r\n plugin: aggregatedRowsPlugin,\r\n },\r\n {\r\n plugin: a11yPlugin,\r\n config: { i18n },\r\n },\r\n (isPerformanceGrid || isSmartPerformanceGrid) && {\r\n plugin: isForVNext ? inlineDownloadWithoutFilterStatePlugin : inlineDownloadPlugin,\r\n config: {\r\n isForVNext,\r\n p$daterange,\r\n isAvailable: true,\r\n schema: accountSchema,\r\n gridId: isForVNext ? gridName : '',\r\n s$i18n: schemaI18n,\r\n ReportEmailRule: (() => {\r\n if (isForVNext) {\r\n const ReportEmailRule = state.get('$ReportEmailRule');\r\n state.unset('$ReportEmailRule');\r\n return ReportEmailRule;\r\n }\r\n return undefined;\r\n })(),\r\n },\r\n },\r\n (isPerformanceGrid || isSmartPerformanceGrid) && {\r\n plugin: periodOverPeriodPlugin,\r\n config: { i18n },\r\n },\r\n (isPerformanceGrid || isSmartPerformanceGrid) && {\r\n plugin: segmentPlugin,\r\n config: {\r\n i18n,\r\n permissions: globalConfig.get('Permissions'),\r\n state,\r\n // Uses payload instead of query to indicate segmentation type\r\n isOdataActionSource: isForVNext,\r\n edm,\r\n getSegType,\r\n setSegType,\r\n cellTemplates: {\r\n AccountName: 'default',\r\n },\r\n segmentationTypes: getSegmentationTypes(),\r\n },\r\n },\r\n !isImportGrid && {\r\n plugin: columnChooserPlugin,\r\n config: columnChooserConfiguration({\r\n gridType, isForVNext, filterService, hasUnifiedSmartAccount,\r\n }),\r\n },\r\n !isImportGrid && {\r\n plugin: bamPlugin,\r\n config: {\r\n // We don't show bulkAccountManagement edit button in management grid toolbar after new ui pilot turn on since we have a new bulk edit button.\r\n enabled: IsCampaignBAMEnabled && !isInManagementTab(gridType),\r\n },\r\n },\r\n (isPerformanceGrid || isSmartPerformanceGrid || isManagementGrid) && IsAccountLabelsEnabled && {\r\n plugin: labelsPlugin,\r\n config: {\r\n isForVNext: true,\r\n i18n,\r\n i18nErrors,\r\n router,\r\n jsdata,\r\n LabelAssociationView,\r\n instrumentation,\r\n dataContextManager,\r\n cacheService,\r\n s$label: Label,\r\n edm,\r\n scope,\r\n dataSource,\r\n isManagementRequest,\r\n perfMarker: parentPerfMarker,\r\n },\r\n },\r\n (isPerformanceGrid || isSmartPerformanceGrid || isManagementGrid) && {\r\n plugin: placeholderPlugin,\r\n config: {\r\n container: '.grid-noresult',\r\n text: i18n.getString('Grid_NoRecords'),\r\n filteredContainer: '.grid-noresult',\r\n filteredEmptyText: i18n.getString('Grid_NoFilteredRecords'),\r\n filterService,\r\n },\r\n },\r\n IsCustomerHierarchyEnabled && {\r\n plugin: customerHierarchyPlugin,\r\n config: {\r\n i18n,\r\n isForVNext,\r\n },\r\n },\r\n isInManagementTab(gridType) && {\r\n plugin: primaryContactBulkEditorPlugin,\r\n }]);\r\n\r\n return plugins;\r\n}\r\n","import $ from 'jquery';\r\nimport { AccountsGrid } from './accounts-grid';\r\nimport { getConfig } from './accounts-grid-config';\r\nimport { getAdsPlugins } from './plugins/index';\r\n\r\nexport function createAccountsGridView({\r\n i18n,\r\n gridType,\r\n el, // For OldUI only\r\n preferenceConfig,\r\n parentPerfMarker,\r\n addDateChangeListener,\r\n viewport,\r\n filterService,\r\n getAdditionalPlugins = () => [],\r\n isForVNext = false,\r\n getAdditionalEvents = () => ({}),\r\n p$daterange,\r\n pageName,\r\n scope,\r\n preexecuteFlag = false,\r\n hasUnifiedSmartAccount = false,\r\n permissions,\r\n}) {\r\n return new AccountsGrid({\r\n el,\r\n gridType,\r\n preferenceConfig,\r\n filterService,\r\n pageName,\r\n isForVNext,\r\n getGridConfig: view => getConfig({\r\n view,\r\n gridType,\r\n preferenceConfig,\r\n viewport,\r\n filterService,\r\n isForVNext,\r\n preexecuteFlag,\r\n hasUnifiedSmartAccount,\r\n additionalEvents: getAdditionalEvents(view),\r\n customHeaderOffset: () => $('.sticky-container').height(),\r\n permissions,\r\n i18n,\r\n }),\r\n getPlugins: view => getAdsPlugins({\r\n view,\r\n gridType,\r\n preferenceConfig,\r\n viewport,\r\n parentPerfMarker,\r\n addDateChangeListener,\r\n filterService,\r\n isForVNext,\r\n p$daterange,\r\n scope,\r\n hasUnifiedSmartAccount,\r\n }).concat(getAdditionalPlugins(view)),\r\n });\r\n}\r\n","import _ from 'underscore';\r\n\r\nimport { applyCustomerHierarchyColumnFilter } from '../helper/customer-hierarchy-helper';\r\nimport { isInManagementTab } from '../helper/management-dashboard-helper';\r\n\r\nexport function getSharedColumnConfiguration(globalConfig) {\r\n const {\r\n IsAccountDashboardAlertsColumnAllowed,\r\n IsCustomerHierarchyEnabled,\r\n IsManagementDashboardEnabled,\r\n IsAudienceSOVEnabled,\r\n IsAccountLabelsEnabled,\r\n IsViewThroughConversionsRevenueEnabled,\r\n dynamic = {},\r\n } = globalConfig.get('Permissions');\r\n\r\n const {\r\n PartialConversions: IsPartialConversionsEnabled,\r\n ColumnConversion: IsColumnConversionEnabled,\r\n ConvValueRules: isConversionValueRuleColumnsEnabled,\r\n NewCustomerAcquisition: isNewCustomerAcquisitionEnabled,\r\n CBTLifetimeBudget: IsCampaignLifetimeBudgetEnabled,\r\n } = dynamic;\r\n const usePartialConversions = IsPartialConversionsEnabled && IsColumnConversionEnabled;\r\n\r\n const columnNames = {\r\n AccountInactiveReasons: 'AccountInactiveReasons',\r\n AccountName: 'AccountName',\r\n AccountMode: 'AccountMode',\r\n PaymentSetting: 'PaymentSetting',\r\n Balance: 'Balance',\r\n Currency: 'Currency',\r\n BillingLanguage: 'BillingLanguage',\r\n BusinessLocation: 'BusinessLocation',\r\n AccountTimeZone: 'AccountTimeZone',\r\n TaxId: 'TaxId',\r\n PaymentMethod: 'PaymentMethod',\r\n DailyBudget: 'DailyBudget',\r\n CampaignLifetimeBudget: 'CampaignLifetimeBudget',\r\n AutoTagging: 'AutoTagging',\r\n PrimaryContact: 'PrimaryContact',\r\n Actions: 'Actions',\r\n Labels: 'Labels',\r\n };\r\n\r\n const lockedForVisualRefresh = [columnNames.AccountInactiveReasons, columnNames.AccountName];\r\n const lockedForLegacy = [columnNames.AccountName, columnNames.AccountInactiveReasons];\r\n\r\n // TODO: need to clean up other logic with IsAccountDashboardAlertsColumnAllowed since it's GAed.\r\n const locked = IsManagementDashboardEnabled ? lockedForVisualRefresh : lockedForLegacy;\r\n // NOTE: Please also make any changes to accounts-grid.es and PerformanceGridColumnConfiguration.cs\r\n // The config in PerformanceGridColumnConfiguration.cs is stored in PageContext.GridPrefetchQuery and not used in client-side code anywhere. So no need to change this file.\r\n\r\n function getAccountsSummaryColumns() {\r\n const summaryColumns = {\r\n AccountName: ['Name', 'AccountNumber', 'Id'],\r\n AccountMode: ['AccountMode'],\r\n Clicks: ['PerformanceMetrics/Clicks', 'AvailableInsightTypeIds'],\r\n Impressions: ['PerformanceMetrics/Impressions', 'AvailableInsightTypeIds'],\r\n CTR: 'PerformanceMetrics/CTR',\r\n AverageCPC: 'PerformanceMetrics/AverageCPC',\r\n AverageCPM: 'PerformanceMetrics/AverageCPM',\r\n VideoViews: 'PerformanceMetrics/VideoViews',\r\n ViewThroughRate: 'PerformanceMetrics/ViewThroughRate',\r\n AverageCPV: 'PerformanceMetrics/AverageCPV',\r\n TotalWatchTimeInMS: 'PerformanceMetrics/TotalWatchTimeInMS',\r\n AverageWatchTimePerImpression: 'PerformanceMetrics/AverageWatchTimePerImpression',\r\n AverageWatchTimePerVideoView: 'PerformanceMetrics/AverageWatchTimePerVideoView',\r\n VideoViewsAt25Percent: 'PerformanceMetrics/VideoViewsAt25Percent',\r\n VideoViewsAt50Percent: 'PerformanceMetrics/VideoViewsAt50Percent',\r\n VideoViewsAt75Percent: 'PerformanceMetrics/VideoViewsAt75Percent',\r\n CompletedVideoViews: 'PerformanceMetrics/CompletedVideoViews',\r\n VideoCompletionRate: 'PerformanceMetrics/VideoCompletionRate',\r\n AveragePosition: 'PerformanceMetrics/AveragePosition',\r\n AdvertiserReportedRevenue: 'PerformanceMetrics/AdvertiserReportedRevenue',\r\n RevenueOnAdSpend: 'PerformanceMetrics/RevenueOnAdSpend',\r\n AllConversionRevenueOnAdSpend: 'PerformanceMetrics/AllConversionRevenueOnAdSpend',\r\n AllConversionAdvertiserReportedRevenue: 'PerformanceMetrics/AllConversionAdvertiserReportedRevenue',\r\n TotalEffectiveCost: ['PerformanceMetrics/Spend', 'AvailableInsightTypeIds'],\r\n IOPurchaseOrder:\r\n 'InsertionOrderDetails/CurrentInsertionOrder/PurchaseOrder',\r\n IOBudget: 'InsertionOrderDetails/CurrentInsertionOrder/Budget',\r\n RemainingIOBudget:\r\n 'InsertionOrderDetails/CurrentInsertionOrder/RemainingBudget',\r\n StartDate: 'InsertionOrderDetails/CurrentInsertionOrder/StartDate',\r\n EndDate: 'InsertionOrderDetails/CurrentInsertionOrder/EndDate',\r\n DailyBudget: 'Budget/DailyBudget',\r\n QualityScore: 'QualityScoreData/OverallQualityScore',\r\n TotalRemainingIOBudget: 'InsertionOrderDetails/TotalRemainingBudget',\r\n OverallEndDate: 'InsertionOrderDetails/OverallEndDate',\r\n };\r\n\r\n if (isConversionValueRuleColumnsEnabled) {\r\n summaryColumns.AllConversionAdvertiserReportedRevenueAdjustment = 'PerformanceMetrics/AllConversionAdvertiserReportedRevenueAdjustment';\r\n summaryColumns.AdvertiserReportedRevenueAdjustment = 'PerformanceMetrics/AdvertiserReportedRevenueAdjustment';\r\n summaryColumns.ViewThroughConversionsRevenueAdjustment = 'PerformanceMetrics/ViewThroughConversionsRevenueAdjustment';\r\n }\r\n\r\n if (usePartialConversions) {\r\n summaryColumns.ViewThroughConversionsCredit = 'PerformanceMetrics/ViewThroughConversionsCredit';\r\n summaryColumns.ConversionsCredit = 'PerformanceMetrics/ConversionsCredit';\r\n summaryColumns.PartialConversionCPA = 'PerformanceMetrics/PartialConversionCPA';\r\n summaryColumns.PartialConversionRate = 'PerformanceMetrics/PartialConversionRate';\r\n summaryColumns.AllConversionCPA = 'PerformanceMetrics/AllConversionCPA';\r\n summaryColumns.AllConversionsCredit = 'PerformanceMetrics/AllConversionsCredit';\r\n summaryColumns.AllPartialConversionRate = 'PerformanceMetrics/AllPartialConversionRate';\r\n } else {\r\n summaryColumns.ViewThroughConversions = 'PerformanceMetrics/ViewThroughConversions';\r\n summaryColumns.Conversions = 'PerformanceMetrics/Conversions';\r\n summaryColumns.CPA = 'PerformanceMetrics/CPA';\r\n summaryColumns.ConversionRate = 'PerformanceMetrics/ConversionRate';\r\n summaryColumns.AllConversionCPA = 'PerformanceMetrics/AllConversionCPA';\r\n summaryColumns.AllConversions = 'PerformanceMetrics/AllConversions';\r\n summaryColumns.AllConversionRate = 'PerformanceMetrics/AllConversionRate';\r\n }\r\n if (IsAccountLabelsEnabled) {\r\n summaryColumns.Labels = ['Labels'];\r\n }\r\n\r\n if (IsViewThroughConversionsRevenueEnabled) {\r\n summaryColumns.ViewThroughConversionsRevenue = 'PerformanceMetrics/ViewThroughConversionsRevenue';\r\n summaryColumns.ViewThroughConversionsReturnOnAdSpend = 'PerformanceMetrics/ViewThroughConversionsReturnOnAdSpend';\r\n\r\n if (usePartialConversions) {\r\n summaryColumns.ViewThroughPartialConversionsCPA = 'PerformanceMetrics/ViewThroughPartialConversionsCPA';\r\n summaryColumns.ViewThroughPartialConversionsRate = 'PerformanceMetrics/ViewThroughPartialConversionsRate';\r\n } else {\r\n summaryColumns.ViewThroughConversionsCPA = 'PerformanceMetrics/ViewThroughConversionsCPA';\r\n summaryColumns.ViewThroughConversionsRate = 'PerformanceMetrics/ViewThroughConversionsRate';\r\n }\r\n }\r\n\r\n if (dynamic.CPSReporting) {\r\n summaryColumns.SalesCount = 'PerformanceMetrics/SalesCount';\r\n }\r\n\r\n if (dynamic.InstallPerformanceColumns) {\r\n summaryColumns.Installs = 'PerformanceMetrics/Installs';\r\n }\r\n\r\n if (isNewCustomerAcquisitionEnabled) {\r\n summaryColumns.NewCustomerConversionsRate = 'PerformanceMetrics/NewCustomerConversionRate';\r\n summaryColumns.NewCustomerConversions = 'PerformanceMetrics/NewCustomerConversions';\r\n summaryColumns.NewCustomerConversionsCPA = 'PerformanceMetrics/NewCustomerCPA';\r\n summaryColumns.NewCustomerConversionsValue = 'PerformanceMetrics/NewCustomerRevenue';\r\n summaryColumns.NewCustomerConversionsReturnOnAdSpend = 'PerformanceMetrics/NewCustomerRevenueOnAdSpend';\r\n }\r\n\r\n if (IsCampaignLifetimeBudgetEnabled) {\r\n summaryColumns.CampaignLifetimeBudget = 'Budget/LifetimeBudget';\r\n }\r\n\r\n return summaryColumns;\r\n }\r\n\r\n function getSimpleColumns() {\r\n let simpleNameColumns = applyCustomerHierarchyColumnFilter(\r\n ['Currency', 'CompanyName', 'BillToCustomerName'],\r\n IsCustomerHierarchyEnabled\r\n );\r\n if (IsManagementDashboardEnabled) {\r\n simpleNameColumns = _.reject(simpleNameColumns, col => col === 'CompanyName');\r\n }\r\n\r\n return _.object(simpleNameColumns, simpleNameColumns);\r\n }\r\n\r\n function getSOVColumns() {\r\n return {\r\n ImpShare: 'PerformanceMetrics/AuctionWonPercent',\r\n ImpShareLostToBudget: 'PerformanceMetrics/AuctionLostToBudgetPercent',\r\n ImpShareLostToRank: 'PerformanceMetrics/AuctionLostToRankPercent',\r\n ImpShareLostToAdRelevance:\r\n 'PerformanceMetrics/AuctionLostToLandingPercent',\r\n ImpShareLostToExpectedCTR:\r\n 'PerformanceMetrics/AuctionLostToAdQualityPercent',\r\n ImpShareLostToBid: 'PerformanceMetrics/AuctionLostToBidPercent',\r\n ClickSharePercent: 'PerformanceMetrics/ClickSharePercent',\r\n AbsoluteTopImpressionSharePercent: 'PerformanceMetrics/AbsoluteTopImpressionSharePercent',\r\n };\r\n }\r\n\r\n function getSOVTopISColumns() {\r\n return {\r\n TopImpressionRate: 'PerformanceMetrics/TopImpressionRate',\r\n AbsoluteTopImpressionRate: 'PerformanceMetrics/AbsoluteTopImpressionRate',\r\n ExactMatchImpressionSharePercent: 'PerformanceMetrics/ExactMatchImpressionSharePercent',\r\n TopImpressionSharePercent: 'PerformanceMetrics/TopImpressionSharePercent',\r\n TopImpressionShareLostToBudget: 'PerformanceMetrics/TopISLostToBudgetPercent',\r\n TopImpressionShareLostToRank: 'PerformanceMetrics/TopISLostToRankPercent',\r\n AbsoluteTopImpressionShareLostToBudget: 'PerformanceMetrics/AbsoluteTopISLostToBudgetPercent',\r\n AbsoluteTopImpressionShareLostToRank: 'PerformanceMetrics/AbsoluteTopISLostToRankPercent',\r\n };\r\n }\r\n\r\n function getAudienceSOVColumns() {\r\n return {\r\n AudienceImpressionShare: 'PerformanceMetrics/AudienceAuctionWonPercent',\r\n AudienceImpressionShareLostToBudget: 'PerformanceMetrics/AudienceTopISLostToBudgetPercent',\r\n AudienceImpressionShareLostToRank: 'PerformanceMetrics/AudienceTopISLostToRankPercent',\r\n };\r\n }\r\n\r\n function columnsMap() {\r\n const statusColumn = IsAccountDashboardAlertsColumnAllowed ? {\r\n AccountInactiveReasons: ['Id', 'AccountInactiveReasons', 'AccountInactiveReasonsCount', 'BillToCustomerId'],\r\n } : { Status: 'Status' };\r\n\r\n const lockedColumnsMap = _.object(locked, locked);\r\n\r\n return _.chain(getAccountsSummaryColumns())\r\n .extend(getSimpleColumns())\r\n .extend(getSOVColumns())\r\n .extend(IsAudienceSOVEnabled ? getAudienceSOVColumns() : {})\r\n .extend(getSOVTopISColumns())\r\n .extend(statusColumn)\r\n .defaults(lockedColumnsMap)\r\n .value();\r\n }\r\n\r\n /* Used only in performance grid */\r\n function defaultColumns(gridName) {\r\n const isPerformanceGrid = gridName === 'PerformanceGrid';\r\n\r\n let defaultCols = locked.concat([\r\n 'Currency',\r\n 'AccountMode',\r\n ]).concat(applyCustomerHierarchyColumnFilter(isPerformanceGrid ? _.compact([\r\n 'Clicks',\r\n 'Impressions',\r\n 'CTR',\r\n 'AverageCPC',\r\n 'TotalEffectiveCost',\r\n isPerformanceGrid && usePartialConversions ? 'ConversionsCredit' : 'Conversions',\r\n 'TopImpressionRate',\r\n 'AbsoluteTopImpressionRate',\r\n ]) : [\r\n 'CompanyName',\r\n 'BillToCustomerName',\r\n 'DailyBudget',\r\n IsCampaignLifetimeBudgetEnabled && 'CampaignLifetimeBudget',\r\n ], IsCustomerHierarchyEnabled));\r\n\r\n if (IsManagementDashboardEnabled) {\r\n defaultCols = _.reject(defaultCols, col => col === 'CompanyName');\r\n }\r\n return defaultCols;\r\n }\r\n\r\n // this function is also used in old ui data-fetch-config.js\r\n function getLockedColumns({ gridType, isForVNext } = {}) {\r\n if (isInManagementTab(gridType, () => globalConfig) && !isForVNext) {\r\n return locked.concat(columnNames.Actions);\r\n }\r\n if (isForVNext) {\r\n // TODO: cleanup this logic after ReactRouter GA everywhere\r\n // This is for columns related JS Selenium test suite\r\n // For phase 2 we always assume that ReactRouter is GAed\r\n // under Onebox we enable ReactRouter pilot, but in SI not\r\n // Fixing this gap does not affect Prod as ReactRouter is GAed (with some exceptions) in Prod\r\n return lockedForVisualRefresh;\r\n }\r\n return locked;\r\n }\r\n\r\n return {\r\n columnNames,\r\n columnsMap,\r\n defaultColumns,\r\n getLockedColumns,\r\n };\r\n}\r\n","import _ from 'underscore';\r\nimport $ from 'jquery';\r\nimport URI from 'urijs';\r\n\r\nimport { uncheckedInjectionContext as globalContext } from '@bingads-webui-campaign/injection-context';\r\n\r\nimport { gridsType } from './constants';\r\n\r\nconst i18nGlobal = globalContext.require('$/i18n!legacy/global');\r\nconst globalConfig = globalContext.require('component/config/index');\r\nconst { bingadsGridColumn } = globalContext.require('component/bingads-grid/shared/column');\r\n\r\nconst {\r\n IsCustomerHierarchyEnabled,\r\n IsNewBillToCustomerHierarchyEnabled,\r\n IsReactivateAccountEnabled,\r\n IsEditAccountEnabled,\r\n IsDeleteAccountEnabled,\r\n IsCreateAccountEnabled,\r\n IsLinkAccountEnabled,\r\n IsUnlinkAccountEnabled,\r\n IsTransferAccountEnabled,\r\n IsManagementDashboardEnabled,\r\n IsInternalUser,\r\n} = globalConfig.get('Permissions');\r\n\r\nexport const navigate = (url) => {\r\n window.location.href = url;\r\n};\r\n\r\nexport const currentCid = () => {\r\n const customer = globalConfig.get('CurrentCustomer') || {};\r\n\r\n return customer.Id || $.advertiser.getUrlParameter('cid');\r\n};\r\n\r\nexport const currentCustomer = () => {\r\n const customer = globalConfig.get('CurrentCustomer') || {};\r\n\r\n return customer.Name || '';\r\n};\r\n\r\nexport const parentCustomerCid = () => globalConfig.get('ParentCustomerId');\r\n\r\nexport const currentUid = () => {\r\n const currentUser = globalConfig.get('CurrentUser') || {};\r\n\r\n return currentUser.Id || $.advertiser.getUrlParameter('uid');\r\n};\r\n\r\n// the name column should not be renamed, otherwise there'll be requirejs error\r\nexport function column(options) {\r\n return bingadsGridColumn(_.defaults({}, options, { i18n: i18nGlobal }));\r\n}\r\n\r\nexport const buildVNextColumn = i18n => options => bingadsGridColumn(_.defaults({}, options, { i18n }));\r\n\r\n// Some row in grid has special usage, like aggregated row.\r\nexport const isAccountItemRow = item => !_.isEmpty(item) && !_.isEmpty(item.AccountNumber);\r\n\r\nexport const isAdAccount = account => isAccountItemRow(account) && (!IsCustomerHierarchyEnabled || account.AccountType === 'AdAccount');\r\n\r\nexport const isManagerAccount = account => isAccountItemRow(account) && IsCustomerHierarchyEnabled && account.AccountType === 'ManagerAccount';\r\n\r\nexport const isInImportTab = gridType => gridType === gridsType.import;\r\n\r\nexport const isInManagementOrBudgetTab = gridType => gridType === gridsType.budget || gridType === gridsType.management;\r\n\r\nexport const isInPerformanceTab = gridType => gridType === gridsType.performance;\r\n\r\nexport const isInSmartPerformanceTab = gridType => gridType === gridsType.smartPerformance;\r\n\r\nexport const getGridPermissions = ({ gridType }) => {\r\n let createAccount = false;\r\n let checkAndDeleteAccount = false;\r\n let checkAndReactivateAccount = false;\r\n let linkAccount = false;\r\n let checkAndUnlinkAccount = false;\r\n let checkAndTransferAccount = false;\r\n let checkAndEditAccount = false;\r\n let exportAccount = false;\r\n let importFromGoogleAds = false;\r\n const isImportGrid = isInImportTab(gridType);\r\n\r\n if (!isImportGrid && (IsManagementDashboardEnabled || IsCustomerHierarchyEnabled)) {\r\n createAccount = IsCreateAccountEnabled;\r\n if (createAccount &&\r\n IsCustomerHierarchyEnabled &&\r\n !IsNewBillToCustomerHierarchyEnabled &&\r\n parentCustomerCid() !== 0 && parentCustomerCid() !== currentCid()) {\r\n createAccount = false;\r\n }\r\n checkAndUnlinkAccount = IsUnlinkAccountEnabled;\r\n linkAccount = IsLinkAccountEnabled;\r\n }\r\n\r\n const isManagementGrid = isInManagementOrBudgetTab(gridType);\r\n\r\n checkAndTransferAccount = IsManagementDashboardEnabled && IsTransferAccountEnabled && IsInternalUser;\r\n if (isManagementGrid) {\r\n checkAndDeleteAccount = IsManagementDashboardEnabled && IsDeleteAccountEnabled;\r\n checkAndReactivateAccount = IsManagementDashboardEnabled && IsReactivateAccountEnabled;\r\n checkAndEditAccount = IsManagementDashboardEnabled && IsEditAccountEnabled;\r\n exportAccount = IsManagementDashboardEnabled;\r\n }\r\n\r\n if (isImportGrid) {\r\n importFromGoogleAds = true;\r\n }\r\n const checkboxColumns = checkAndDeleteAccount || checkAndReactivateAccount || checkAndUnlinkAccount || checkAndTransferAccount || checkAndEditAccount || importFromGoogleAds;\r\n\r\n return {\r\n createAccount,\r\n checkAndDeleteAccount,\r\n checkAndReactivateAccount,\r\n linkAccount,\r\n checkAndUnlinkAccount,\r\n checkAndTransferAccount,\r\n checkAndEditAccount,\r\n exportAccount,\r\n checkboxColumns,\r\n importFromGoogleAds,\r\n };\r\n};\r\n\r\nexport const getSwitchCustomerShellLink = cid => new URI(window.location.href)\r\n .setSearch('cid', String(cid))\r\n .removeSearch('uid')\r\n .removeSearch('aid')\r\n .hash('')\r\n .toString();\r\n\r\nexport const getVNextCampaignWithCidAndAid = (cid, aid) => `/campaign/vnext?cid=${cid}&uid=${currentUid()}&aid=${aid}`;\r\n\r\nexport const getVNextCampaignWithAid = aid => `/campaign/vnext?cid=${currentCid()}&uid=${currentUid()}&aid=${aid}`;\r\n\r\nexport const getVNextAccountsSummaryWithCid = cid => `/campaign/vnext/Accounts?cid=${cid}&uid=${currentUid()}`;\r\n","export const gridsType = {\r\n performance: 'performance',\r\n smartPerformance: 'smartPerformance',\r\n budget: 'budget',\r\n management: 'management',\r\n import: 'import',\r\n};\r\n\r\nexport const gridsMap = {\r\n [gridsType.performance]: {\r\n gridName: 'PerformanceGrid',\r\n el: '.performanceGrid',\r\n tableNameLocalizedKey: 'AccountDashboard_PerformanceTab',\r\n },\r\n [gridsType.smartPerformance]: {\r\n gridName: 'SmartPerformanceGrid',\r\n el: '.smartPerformanceGrid',\r\n tableNameLocalizedKey: 'AccountDashboard_SmartPerformanceTab',\r\n },\r\n [gridsType.budget]: {\r\n gridName: 'BudgetGrid',\r\n el: '.budgetGrid',\r\n tableNameLocalizedKey: 'AccountDashboard_BudgetTab',\r\n },\r\n [gridsType.management]: {\r\n gridName: 'ManagementGrid',\r\n el: '.budgetGrid',\r\n tableNameLocalizedKey: 'AccountDashboard_BudgetManagementTab',\r\n },\r\n [gridsType.import]: {\r\n gridName: 'ImportGrid',\r\n el: '.importGrid',\r\n tableNameLocalizedKey: 'AccountDashboard_ImportTab',\r\n },\r\n};\r\n\r\nexport const EmptyColumnValue = '-';\r\n","import _ from 'underscore';\r\n\r\nconst NonHierarchyColumns = [\r\n 'CompanyName',\r\n];\r\n\r\nexport const CustomerHierarchyColumns = [\r\n 'AccountType',\r\n 'Owner',\r\n 'ManagerAccounts',\r\n];\r\n\r\nexport const HiddenCustomerHierarchyColumns = [\r\n 'IsAccountAuthorized',\r\n 'OwnerId',\r\n 'IsParentAuthorized',\r\n 'AccountType',\r\n];\r\n\r\nexport const HiddenManagementColumns = [\r\n 'IsAccountAuthorized',\r\n 'ManagerAccounts',\r\n 'OwnerId',\r\n 'IsParentAuthorized',\r\n 'AccountType',\r\n];\r\n\r\nexport const ManualHoldStatusColumns = [\r\n 'LastFinStatusUpdatedSourceBitMap',\r\n 'PaymentOption',\r\n];\r\n\r\nexport function applyCustomerHierarchyExtrasFilter(columns, isCustomerHierarchyEnabled = false) {\r\n return isCustomerHierarchyEnabled ? columns.concat(HiddenCustomerHierarchyColumns) : columns;\r\n}\r\n\r\nexport function applyCustomerHierarchyColumnFilter(columns, isCustomerHierarchyEnabled = false) {\r\n return isCustomerHierarchyEnabled ? CustomerHierarchyColumns.concat(_.without(columns, 'CompanyName')) : columns;\r\n}\r\n\r\nexport function customerHierarchyColumnsToIgnore(isCustomerHierarchyEnabled) {\r\n return isCustomerHierarchyEnabled ? NonHierarchyColumns : CustomerHierarchyColumns;\r\n}\r\n\r\nexport function applyCustomerHierarchyOrderbyFilter(orderbyInfo, isCustomerHierarchyEnabled = false) {\r\n return _.reject(orderbyInfo, ({ key }) => _.contains(customerHierarchyColumnsToIgnore(isCustomerHierarchyEnabled), key));\r\n}\r\n","import $ from 'jquery';\r\nimport _ from 'underscore';\r\n\r\nimport { uncheckedInjectionContext as globalContext } from '@bingads-webui-campaign/injection-context';\r\n\r\nconst getGlobalConfig = () => globalContext.require('component/config/index');\r\nconst getIsManagementDashboardEnabled = (getAppConfig = getGlobalConfig) => getAppConfig().get('Permissions').IsManagementDashboardEnabled;\r\n\r\nconst HiddenNewManagementDashboardColumns = ['OwnerId'];\r\n\r\nexport function isInManagementTab(gridType, getAppConfig) {\r\n const IsManagementDashboardEnabled = getIsManagementDashboardEnabled(getAppConfig);\r\n\r\n return gridType ? IsManagementDashboardEnabled && (gridType === 'budget' || gridType === 'management') : IsManagementDashboardEnabled;\r\n}\r\n\r\nexport function appendNewManagementDashboardExtrasFilter(columns, getAppConfig) {\r\n return getIsManagementDashboardEnabled(getAppConfig) ? columns.concat(HiddenNewManagementDashboardColumns) : columns;\r\n}\r\n\r\nconst ColumnPadding = 5;\r\n\r\nconst columnsWithDynamicWidth = [\r\n {\r\n cellContentClass: 'td.actions-cell ul',\r\n headerClass: 'th[data-name=\"Actions\"] .grid-header-text',\r\n columnClass: 'col.col-Actions',\r\n gridClass: '.budgetGrid',\r\n },\r\n {\r\n cellContentClass: 'td.primary-contact-cell span',\r\n headerClass: 'th[data-name=\"PrimaryContact\"] .column-header-container',\r\n columnClass: 'col.col-PrimaryContact',\r\n gridClass: '.budgetGrid',\r\n },\r\n {\r\n cellContentClass: 'td.time-zone-cell span',\r\n headerClass: 'th[data-name=\"AccountTimeZone\"] .column-header-container',\r\n columnClass: 'col.col-AccountTimeZone',\r\n gridClass: '.budgetGrid',\r\n },\r\n {\r\n cellContentClass: 'td.payment-method-cell span',\r\n headerClass: 'th[data-name=\"PaymentMethod\"] .column-header-container',\r\n columnClass: 'col.col-PaymentMethod',\r\n gridClass: '.budgetGrid',\r\n },\r\n {\r\n cellContentClass: '.bill-to-customer-cell span',\r\n headerClass: 'th[data-name=\"BillToCustomerName\"] .column-header-container',\r\n columnClass: 'col.col-BillToCustomerName',\r\n gridClass: '.budgetGrid',\r\n },\r\n {\r\n cellContentClass: '.owners-accounts-cell span',\r\n headerClass: 'th[data-name=\"Owner\"] .column-header-container',\r\n columnClass: 'col.col-Owner',\r\n gridClass: '.budgetGrid',\r\n },\r\n];\r\n\r\nconst getMaxWidthOfAllCellContents = cellContents => _.chain(cellContents)\r\n .map(cell => Math.ceil(_.max([$(cell).width(), cell.scrollWidth])))\r\n .max()\r\n .value();\r\n\r\nconst buildStyleContent = ({ gridClass, columnClass, width }) => `.bingadsgrid${gridClass} table.table ${columnClass} { width: ${width}px; }`;\r\n\r\nconst getDynamicStyleDom = () => {\r\n const dynamicStyleDomId = 'dynamic-col-width';\r\n let dynamicStyleDom = $(`#${dynamicStyleDomId}`);\r\n\r\n if (!dynamicStyleDom.length) {\r\n dynamicStyleDom = $('