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AIW,OAAO,OAASP,EAAah7B,EAAK2G,UAAU,sBAAwB,GAAKq0B,GAAe,sEAA+I,EAAE9M,KAAK/mB,KAAK,oBAAqB+zB,EAAgBA,EAAgB/kB,gBAAyC,qBAAlBA,gBAA8BA,qBAAgBhW,EAAU,SAAU+6B,EAAgBA,EAAgBl7B,KAAmB,qBAAPA,KAAmBA,UAAKG,EAAU,2BAA4B+6B,EAAgBA,EAAgB9kB,uBAAuD,qBAAzBA,uBAAqCA,4BAAuBjW,EAAU,eAAgB+6B,EAAgBA,EAAgBzkB,WAA+B,qBAAbA,WAAyBA,gBAAWtW,EAAU,aAAc+6B,EAAgBA,EAAgBhlB,SAA2B,qBAAXA,SAAuBA,cAAS/V,EAAU,mBAAoB+6B,EAAgBA,EAAgBnpB,eAAuC,qBAAjBA,eAA6BA,oBAAe5R,EAAU,SAAU+6B,EAAgBA,EAAgBxkB,KAAmB,qBAAPA,KAAmBA,UAAKvW,GAAoB86B,CAAS,C","sources":["../../../../shared-library/packages/brand-lists-data/src/brand-list.js","../../../../shared-library/packages/brand-lists-data/src/grid-edm.js","../../../../shared-library/packages/brand-lists-data/src/load-campaign-associated-brand-lists-factory.js","../../../../shared-library/packages/brand-lists-data/src/bulk-upsert-errors.js","../../../../shared-library/packages/brand-lists-data/src/error-handling.js","../../../../shared-library/packages/brand-lists-data/src/manage-brand-list-error-handling.js","../../../../shared-library/packages/sharing-scope-editor/src/tree-operations.js","../../../../shared-library/packages/sharing-scope-editor/src/shapes.js","../../../../shared-library/packages/sharing-scope-editor/src/scope-editor-source-panel.js","../../../../shared-library/packages/sharing-scope-editor/src/scope-editor-target-panel.js","../../../../shared-library/packages/sharing-scope-editor/src/index.js","../../../../shared-library/packages/shared-library-scopes/src/util.js","../../../../shared-library/packages/shared-library-scopes/src/account-list-popover.js","../../../../shared-library/packages/shared-library-scopes/src/audience-scope-editor.js","../../../../shared-library/packages/shared-library-scopes/src/audience-sharing-view.js","../../../../shared-library/packages/shared-library-scopes/src/uet-tag-scope-editor.js","../../../../shared-library/packages/shared-library-scopes/src/uet-tag-manage-scope-view.js","../../../../shopping-campaign/packages/cashback-percent-control-view/src/cashback-percent-control-view.js","../../../../shopping-campaign/packages/ms-store-ads-common/src/utils.js","../../../../shopping-campaign/packages/personalized-offer-shared/src/utils.js","../../../../smart-campaigns/packages/smart-i18n/src/build-legacy-i18n.js","../../../../smart-campaigns/packages/smart-i18n/src/i18n/legacy-keys.js","../../router/src/index.js","../../scope-bar/src/styles.js","../../scope-bar/src/campaign-status-menu-button/status-icon.js","../../scope-bar/src/campaign-status-menu-button/campaign-status-menu-button.js","../../scope-bar/src/teaching-bubble.js","../../scope-bar/src/campaign-scope-bar.js","../../scope-bar/src/scope-bar-loader.js","../../scope-panel/src/campaign-scope-panel.js","../../scope-panel/src/styles.js","../../scope-panel/src/scope-panel.js","../../scope-selector/src/config.js","../../scope-selector/src/with-campaign-data.js","../../scope-selector/src/helper/scope-helper.js","../../scope-selector/src/with-campaign-filter.js","../../scope-selector/src/media/linkedin-icon.js","../../scope-selector/src/filters/filter-options.js","../../scope-selector/src/filters/adgroup-status-filter.js","../../scope-selector/src/filters/campaign-status-filter.js","../../scope-selector/src/filters/campaign-type-filter.js","../../scope-selector/src/filters/campaign-filters.js","../../scope-selector/src/filters/helper.js","../../shell-ui-common/src/enums/constants.js","../../shell-ui-common/src/mainmenu-placeholder-with-responsive-size.js","../../shell-ui-common/src/global-menu-wrapper-placeholder.js","../../shell-ui-common/src/new-global-menu-wrapper-placeholder.js","../../shell-ui-common/src/primary-navigation-placeholder.js","../../shell-ui-common/src/secondary-navigation-placeholder.js","../../shell-ui-common/src/scope-panel-placeholder.js","../../shell-ui-common/src/entity-converter/campaign-converter.js","../../shell-ui-common/src/entity-converter/adgroup-converter.js","../../shell-ui-common/src/spinner/spinner-with-label.js","../../shell-ui-common/src/spinner/spinner-with-label-styles.js","../../shell-ui-common/src/scope-selector-container/level-selector-items.js","../../shell-ui-common/src/enums/shell-tips.js","../../smart-campaigns-popup/src/smart-campaigns-popup.js","../../smart-campaigns-popup/src/styles.js","../../../../shopping-campaign/packages/cashback-percent-control-view/src/cashback-percent-control-view.pug"],"sourcesContent":["/* eslint-disable no-console */\r\nimport { edmCampaign } from '@bingads-webui/edm-campaign';\r\n\r\nconst MT_ALLOWED_MIN_SEARCH_FILTER_LENGTH = 2;\r\nconst MAX_BRAND_LISTS = 20;\r\n\r\nexport const getBrandListById = async ({ cid, aid, brandListId }) => {\r\n const payload = {\r\n $filter: `Id eq ${brandListId}`,\r\n $top: 1,\r\n };\r\n const edm = edmCampaign\r\n .Customers\r\n .$withKey(cid)\r\n .Accounts\r\n .$withKey(aid)\r\n .BrandLists;\r\n const res = await edm.get(payload).toPromise();\r\n return res && res.value && res.value.length > 0 ? res.value[0] : null;\r\n};\r\n\r\nexport const loadBrandListsFactory = (cid, aid) => async () => {\r\n const payload = {\r\n top: MAX_BRAND_LISTS,\r\n skip: 0,\r\n endDate: Date.now(),\r\n };\r\n\r\n const edm = edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .BrandLists;\r\n\r\n const res = await edm.get(payload).toPromise();\r\n return res.value.map(brandList => ({\r\n key: brandList.Id,\r\n ...brandList,\r\n }));\r\n};\r\n\r\nexport const loadBrandsFactoryFromProp = ({ cid, aid }) => async ({ searchFilter, top }) => {\r\n // If there's no search filter, we don't need to load brands since MT will not allow it\r\n if (!searchFilter || searchFilter.length < MT_ALLOWED_MIN_SEARCH_FILTER_LENGTH) {\r\n return [];\r\n }\r\n\r\n const payload = {\r\n search: searchFilter,\r\n top,\r\n count: true,\r\n endDate: Date.now(),\r\n };\r\n\r\n const edm = edmCampaign\r\n .Customers\r\n .$withKey(cid)\r\n .Accounts\r\n .$withKey(aid)\r\n .Brands;\r\n\r\n const result = await edm.get(payload).toPromise();\r\n if (result && result.value && result.value.length > 0) {\r\n const options = result.value.map(brand => ({\r\n key: brand.Id,\r\n name: brand.Name,\r\n link: brand.Uri,\r\n isUnderReview: brand.Status === 'Pending',\r\n }));\r\n return options;\r\n }\r\n return [];\r\n};\r\n\r\nexport const loadBrandsUnderBrandListFactoryFromProp = ({\r\n cid, aid, brandListId, isEdit, top,\r\n}) => async () => {\r\n // If it's not in edit mode, we don't need to load brands\r\n if (!isEdit) {\r\n return [];\r\n }\r\n\r\n const payload = {\r\n endDate: Date.now(),\r\n top,\r\n };\r\n\r\n const edm = edmCampaign\r\n .Customers\r\n .$withKey(cid)\r\n .Accounts\r\n .$withKey(aid)\r\n .BrandLists\r\n .$withKey(brandListId)\r\n .BrandItems;\r\n\r\n const result = await edm.get(payload).toPromise();\r\n if (result && result.value && result.value.length > 0) {\r\n const options = result.value.map(brand => ({\r\n key: brand.BrandId,\r\n name: brand.BrandName,\r\n link: brand.Uri,\r\n isUnderReview: false,\r\n }));\r\n return options;\r\n }\r\n return [];\r\n};\r\n\r\nexport const createBrandListFromProp = ({ cid, aid }) => (brandListPayload) => {\r\n const edmEntityAccount = edmCampaign\r\n .Customers\r\n .$withKey(cid)\r\n .Accounts\r\n .$withKey(aid);\r\n\r\n return edmEntityAccount.bulkCreate(brandListPayload, {\r\n entityName: 'Model.BrandList',\r\n });\r\n};\r\n\r\nexport const updateBrandListFromProp = ({ cid, aid }) => async (brandListPayload) => {\r\n const edmEntityAccount = edmCampaign\r\n .Customers\r\n .$withKey(cid)\r\n .Accounts\r\n .$withKey(aid);\r\n\r\n return edmEntityAccount.bulkUpdate(brandListPayload, {\r\n entityName: 'Model.BrandItem',\r\n });\r\n};\r\n\r\nexport const deleteBrandListFromProp = ({ cid, aid }) => (brandLists) => {\r\n const payload = brandLists.map(Id => ({\r\n BrandLists: {\r\n Id,\r\n Status: 'Deleted',\r\n },\r\n }));\r\n const edmEntityAccount = edmCampaign\r\n .Customers\r\n .$withKey(cid)\r\n .Accounts\r\n .$withKey(aid);\r\n return edmEntityAccount.bulkUpdate(payload, {\r\n entityName: 'Model.BrandList',\r\n });\r\n};\r\n\r\nexport const getCampaignsFromProp = ({ cid, aid }) => (getCampaignsPayload) => {\r\n const edmEntityCampaign = edmCampaign\r\n .Customers\r\n .$withKey(cid)\r\n .Accounts\r\n .$withKey(aid)\r\n .Campaigns;\r\n const { search, pageNumber, campaignType } = getCampaignsPayload;\r\n const broadOnlyFilter = campaignType === 'PerformanceMax' ? '' : 'isBroadMatchOnlyCampaign eq true and ';\r\n const query = {\r\n count: true,\r\n top: 10,\r\n skip: (pageNumber - 1) * 10 || 0,\r\n filter: { where: `(${broadOnlyFilter}CampaignType eq Enum.CampaignType'${campaignType}')${search ? `and contains(Name, '${search}')` : ''}` },\r\n select: ['Id', 'Name'],\r\n };\r\n const payload = {\r\n gridDataParameters: {\r\n CurrentCustomerId: cid,\r\n },\r\n };\r\n return edmEntityCampaign['Default.GridData'].$makeCall({ query, payload }).toPromise();\r\n};\r\n\r\nexport const getCampaignBrandListAssociationFromProp = ({ cid, aid }) => (brandListId, isExclusion) => {\r\n const edmEntityBrandLists = edmCampaign\r\n .Customers\r\n .$withKey(cid)\r\n .Accounts\r\n .$withKey(aid)\r\n .BrandLists\r\n .$withKey(brandListId);\r\n return edmEntityBrandLists['Default.GetCampaignAssociations'].$makeCall({\r\n query: {\r\n top: 100,\r\n endDate: Date.now(),\r\n filter: { where: `IsExclusion eq ${!!isExclusion}` },\r\n },\r\n }).toPromise();\r\n};\r\n\r\n\r\nexport const campaignBrandListAssociationFromProp = ({ cid, aid }) => (brandListCampaignAssociationPayload) => {\r\n const edmEntityAccount = edmCampaign\r\n .Customers\r\n .$withKey(cid)\r\n .Accounts\r\n .$withKey(aid);\r\n const {\r\n brandList, campaigns, originalAssociation, isExclusion,\r\n } = brandListCampaignAssociationPayload;\r\n const campaignsMap = {};\r\n campaigns.forEach((id) => {\r\n campaignsMap[id] = 1;\r\n });\r\n const originalAssociationMap = {};\r\n originalAssociation.forEach((EntityId) => {\r\n originalAssociationMap[EntityId] = 1;\r\n });\r\n const payload = [];\r\n for (let i = 0; i < campaigns.length; i += 1) {\r\n if (!originalAssociationMap[campaigns[i]]) {\r\n payload.push({\r\n BrandListsAssociations: {\r\n SharedEntityId: brandList,\r\n EntityId: campaigns[i],\r\n IsExclusion: isExclusion,\r\n },\r\n });\r\n }\r\n }\r\n for (let i = 0; i < originalAssociation.length; i += 1) {\r\n if (!campaignsMap[originalAssociation[i]]) {\r\n payload.push({\r\n BrandListsAssociations: {\r\n SharedEntityId: brandList,\r\n EntityId: originalAssociation[i],\r\n Status: 'Deleted',\r\n IsExclusion: isExclusion,\r\n },\r\n });\r\n }\r\n }\r\n return edmEntityAccount.bulkCreateMany(payload);\r\n};\r\n\r\nexport const createBrandFromProp = ({ cid, aid }) => ({ brandName, brandLink, brandReason }) => {\r\n const payload = [{\r\n Name: brandName,\r\n Uri: brandLink,\r\n RequestReason: brandReason,\r\n }];\r\n\r\n const edmEntityAccount = edmCampaign\r\n .Customers\r\n .$withKey(cid)\r\n .Accounts\r\n .$withKey(aid);\r\n\r\n return edmEntityAccount.Brands['Default.PostBrands']\r\n .$makeCall({ payload })\r\n .toPromise();\r\n};\r\n","import { edmCampaign } from '@bingads-webui/edm-campaign';\r\n\r\nexport const getBrandListsEdm = ({\r\n customerId,\r\n accountId,\r\n}) => {\r\n const edm = edmCampaign\r\n .Customers.$withKey(customerId)\r\n .Accounts.$withKey(accountId)\r\n .BrandLists;\r\n edm.$makeCall = params => edm.get({\r\n ...params.query,\r\n cache: Date.now(),\r\n });\r\n return edm;\r\n};\r\n\r\nexport const getBrandsUnderBrandListEdm = ({\r\n cid, aid, brandListId,\r\n}) => {\r\n const edm = edmCampaign\r\n .Customers\r\n .$withKey(cid)\r\n .Accounts\r\n .$withKey(aid)\r\n .BrandLists\r\n .$withKey(brandListId)\r\n .BrandItems;\r\n edm.$makeCall = params => edm.get(params.query);\r\n return edm;\r\n};\r\n","import { edmCampaign } from '@bingads-webui/edm-campaign';\r\n\r\nexport const loadCampaignAssociatedBrandListsFactory = (cid, aid, campaignId) => () =>\r\n edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .Campaigns.$withKey(campaignId)\r\n .BrandLists['Default.GetCampaignAssociations']\r\n .$makeCall({\r\n functionParams: {\r\n },\r\n query: {\r\n count: true,\r\n skip: 0,\r\n top: 2147483647, // max Int32,\r\n endDate: Date.now(),\r\n },\r\n })\r\n .toPromise()\r\n .then(({ value }) => value.map(({ SharedEntityId, SharedEntityName, ListItemCount }) => ({\r\n key: SharedEntityId,\r\n Id: SharedEntityId,\r\n Name: SharedEntityName,\r\n Count: ListItemCount,\r\n })));\r\n","import { identity, result } from 'underscore';\r\nimport { Campaign, BrandList, BrandListAssociation, BrandItem } from '@bingads-webui/campaign-odata-schemas';\r\nimport { getBulkApiErrors } from '@bingads-webui-campaign/api-errors';\r\n\r\nexport const ERROR_ENTITY = {\r\n Campaign: 'campaign',\r\n BrandList: 'brandList',\r\n BrandListAssociation: 'brandListAssociation',\r\n BrandItem: 'brandItem',\r\n};\r\n\r\nconst getBulkUploadEntityType = entitySchema =>\r\n (entitySchema.properties['bulk-upload-type'] || {}).value ||\r\n entitySchema.name;\r\n\r\nconst getBulkUploadErrorType = entitySchema =>\r\n `${getBulkUploadEntityType(entitySchema)} Error`;\r\n\r\nexport const bulkUpsertBrandListsEntityErrorMap = {\r\n [getBulkUploadErrorType(Campaign)]: ERROR_ENTITY.Campaign,\r\n [getBulkUploadErrorType(BrandList)]: ERROR_ENTITY.BrandList,\r\n [getBulkUploadErrorType(BrandListAssociation)]: ERROR_ENTITY.BrandListAssociation,\r\n [getBulkUploadErrorType(BrandItem)]: ERROR_ENTITY.BrandItem,\r\n};\r\n\r\nexport const mapBulkUpsertErrors = (\r\n errors,\r\n bulkUpsertEntityErrorMap,\r\n errorProcessor = identity,\r\n scenario,\r\n i18n,\r\n activityLogger\r\n) =>\r\n getBulkApiErrors(errors, scenario, i18n, activityLogger).map((error) => {\r\n const errorType = error.type;\r\n const mappedErrorType = result(bulkUpsertEntityErrorMap, errorType, errorType);\r\n // eslint-disable-next-line no-param-reassign\r\n error.type = mappedErrorType;\r\n return errorProcessor(error);\r\n });\r\n\r\nexport const modelToViewModelForBulkErrors = (errors, bulkUpsertEntityErrorMap, scenario, i18n, activityLogger) =>\r\n mapBulkUpsertErrors(errors, bulkUpsertEntityErrorMap, /* errorProcessor */ identity, scenario, i18n, activityLogger);\r\n","import { has } from 'underscore';\r\nimport { CampaignApiError, getODataErrors } from '@bingads-webui-campaign/api-errors';\r\nimport { bulkUpsertBrandListsEntityErrorMap, modelToViewModelForBulkErrors } from './bulk-upsert-errors';\r\n\r\nexport const GENERIC_ERROR_MESSAGE = _TL_(\"We've encountered an error and can't continue. Please contact support for further assistance.\");\r\n\r\nexport const getViewModelBulkUpsertErrors = (i18n, result) => {\r\n if (has(result, 'entity')) {\r\n const serverErrors = modelToViewModelForBulkErrors(\r\n result.errors,\r\n bulkUpsertBrandListsEntityErrorMap,\r\n 'brandList',\r\n i18n\r\n );\r\n\r\n if (serverErrors && serverErrors.length > 0) {\r\n return serverErrors;\r\n }\r\n }\r\n\r\n return [new CampaignApiError(GENERIC_ERROR_MESSAGE)];\r\n};\r\n\r\nexport const getOdataResponseErrors = (i18n, result) => {\r\n if (result && result.errors) {\r\n const serverErrors = getODataErrors(result.errors, i18n);\r\n\r\n if (serverErrors && serverErrors.length > 0) {\r\n return serverErrors;\r\n }\r\n }\r\n\r\n return [new CampaignApiError(GENERIC_ERROR_MESSAGE)];\r\n};\r\n","import { isEmpty, reduce, filter, find } from 'underscore';\r\n\r\nconst and = (predicate1, predicate2) => item => predicate1(item) && predicate2(item);\r\nconst or = (predicate1, predicate2) => item => predicate1(item) || predicate2(item);\r\nconst not = predicate => item => !predicate(item);\r\nconst errorIs = errorCode => error => error.Error === errorCode;\r\nconst clientIdIs = clientId => error => error['Client Id'] === clientId;\r\n\r\nexport const extractAndRestoreFailedBrandItemAssociations = (errors, BrandList, BrandItemsAssociations) => {\r\n // If the brand list itself has errors, we don't need to process the brand item associations\r\n if (BrandList) {\r\n const brandListClientId = clientIdIs(BrandList['Client Id']);\r\n const brandListErrors = filter(errors, brandListClientId);\r\n if (!isEmpty(brandListErrors)) {\r\n return { savedAddedBrandItemIds: [], savedDeletedBrandItemIds: [], filteredErrors: brandListErrors };\r\n }\r\n }\r\n\r\n const { savedAddedBrandItemIds, savedDeletedBrandItemIds, filteredErrors } =\r\n reduce(BrandItemsAssociations, (acc, brandItemAssociation) => {\r\n const brandItemAssociationClientId = clientIdIs(brandItemAssociation['Client Id']);\r\n\r\n const brandItemAssociationErrors = filter(acc.filteredErrors, brandItemAssociationClientId);\r\n if (isEmpty(brandItemAssociationErrors)) {\r\n if (brandItemAssociation.Status === 'Active') {\r\n acc.savedAddedBrandItemIds.push(brandItemAssociation.SharedEntityId);\r\n } else if (brandItemAssociation.Status === 'Deleted') {\r\n acc.savedDeletedBrandItemIds.push(brandItemAssociation.SharedEntityId);\r\n }\r\n } else {\r\n const campaignServiceSharedEntityAssociationDoesNotExistError = errorIs('CampaignServiceSharedEntityAssociationDoesNotExist');\r\n\r\n // Some errors are non-blocking and should be filtered out\r\n // Case #1.1: Deleting an association that doesn't exist\r\n // Case #1.2: Deleting an association where both the association and the brand list are already deleted\r\n const associationDoesNotExistError = find(brandItemAssociationErrors, campaignServiceSharedEntityAssociationDoesNotExistError);\r\n if (associationDoesNotExistError) {\r\n acc.filteredErrors = acc.filteredErrors.filter(not(or(\r\n and(campaignServiceSharedEntityAssociationDoesNotExistError, brandItemAssociationClientId),\r\n and(errorIs('CampaignServiceSharedListIdInvalid'), brandItemAssociationClientId)\r\n )));\r\n }\r\n\r\n // Case #2: Adding an association that already exists\r\n // FIXME: MT returns incorrect error code for this case\r\n acc.filteredErrors = acc.filteredErrors\r\n .filter(not(and(errorIs('CampaignServiceFutureFeatureCode'), brandItemAssociationClientId)));\r\n }\r\n return acc;\r\n }, { savedAddedBrandItemIds: [], savedDeletedBrandItemIds: [], filteredErrors: errors });\r\n\r\n return {\r\n savedAddedBrandItemIds, savedDeletedBrandItemIds, filteredErrors,\r\n };\r\n};\r\n","import _ from 'underscore';\r\n\r\n/**\r\n * sort children of each nodes in the following order:\r\n * owned accounts\r\n * linked accounts\r\n * customers\r\n * @param {array} nodes - tree structure\r\n * @returns {array} tree nodes sorted\r\n */\r\nexport const sortedByNodeType = nodes =>\r\n _.map(nodes, node => ({\r\n ...node,\r\n children: _.sortBy(\r\n sortedByNodeType(node.children),\r\n child => (child.isCustomer * 100) + (child.isLinkedAccount * 10)\r\n ),\r\n }));\r\n\r\n/**\r\n * Add helper properties to each node in the tree\r\n * @param {array} nodes - tree structure\r\n * @param {array} parents - all parent node ids along the path from root\r\n * @returns {array} tree with helper properties\r\n */\r\nexport const nodesWithHelpers = (nodes, parents = []) =>\r\n _.map(nodes, node => ({\r\n ...node,\r\n state: {\r\n ...(node.state || {}),\r\n expanded: true, // expand all by default\r\n },\r\n deepness: parents.length,\r\n parents,\r\n children: nodesWithHelpers(node.children, [...parents, node.id]),\r\n }));\r\n\r\n/**\r\n * Filter a tree, return nodes pass the truth test.\r\n * Parent node on the path from root will be kept.\r\n * @param {array} nodes - tree structure\r\n * @param {function} predicate - truth test\r\n * @returns {array} filtered tree\r\n */\r\nexport const filteredNodes = (nodes, predicate) =>\r\n _.reduce(nodes, (memo, node) => {\r\n const filteredChildren = filteredNodes(node.children, predicate);\r\n return predicate(node) || !_.isEmpty(filteredChildren) ?\r\n [\r\n ...memo,\r\n {\r\n ...node,\r\n children: filteredChildren,\r\n },\r\n ] : memo;\r\n }, []);\r\n\r\n/**\r\n * Filter a tree, return nodes pass the truth test, and return a flattened list.\r\n * For accounts, also keep their customers\r\n * @param {array} nodes - tree structure\r\n * @param {function} predicate - truth test\r\n * @returns {array} the result tree\r\n */\r\nexport const compactCustomers = (nodes, predicate) =>\r\n _.reduce(nodes, (memo, node) => {\r\n const children = compactCustomers(node.children, predicate);\r\n const childCustomers = _.filter(children, child => child.isCustomer);\r\n const childAccounts = _.filter(children, child => !child.isCustomer);\r\n memo.push(...childCustomers);\r\n if (predicate(node) || !_.isEmpty(childAccounts)) {\r\n memo.push({\r\n ...node,\r\n children: childAccounts,\r\n });\r\n }\r\n\r\n return memo;\r\n }, []);\r\n\r\n/**\r\n * Patch state of all nodes\r\n * @param {array} nodes - tree structure\r\n * @param {Object} statePatch - the state to patch\r\n * @returns {array} updated nodes\r\n */\r\nexport const patchedNodes = (nodes, statePatch) =>\r\n // update only leaf node(ad account)\r\n _.map(nodes, node => (node.isLinkedAccount || node.isCustomer ? node : ({\r\n ...node,\r\n state: { ...(node.state || {}), ...statePatch },\r\n })));\r\n\r\n/**\r\n * return a deep copy of the tree with the updatedNode and its child accounts state updated\r\n * @param {array} nodes - tree structure\r\n * @param {Object} updatedNode - the tree node whose state is changed\r\n * @returns {array} the updated tree\r\n */\r\nexport const updatedTree = (nodes, updatedNode) => {\r\n const { id, state: statePatch = {} } = updatedNode;\r\n const updatedTreeNodes = _.map(nodes, (node) => {\r\n if (node.id === id) {\r\n const state = { ...(node.state || {}), ...statePatch, indeterminate: false };\r\n return {\r\n ...node,\r\n state,\r\n children: patchedNodes(node.children, {\r\n ...statePatch,\r\n // disable child accounts if customer is checked\r\n disabled: state.checked,\r\n }),\r\n };\r\n }\r\n\r\n return {\r\n ...node,\r\n children: updatedTree(node.children, updatedNode),\r\n };\r\n });\r\n\r\n return updatedTreeNodes;\r\n};\r\n\r\n/**\r\n * Disable all nodes that pass the truth test\r\n * @param {array} nodes - tree structure\r\n * @param {function} predicate - truth test\r\n * @returns {array} - the updated tree\r\n */\r\nexport const disableNodes = (nodes, predicate) =>\r\n _.reduce(nodes, (memo, node) => {\r\n const updatedChildren = disableNodes(node.children, predicate);\r\n const updatedNode =\r\n {\r\n ...node,\r\n state: {\r\n ...(node.state || {}),\r\n ...(predicate(node) ? { disabled: true } : {}),\r\n },\r\n children: updatedChildren,\r\n };\r\n\r\n memo.push(updatedNode);\r\n return memo;\r\n }, []);\r\n\r\n/**\r\n * Create a piping function that apply all functions in order\r\n * @param {...function} fnsToApply - array of functions to apply\r\n * @returns {function} piping function\r\n */\r\nexport const pipe = (...fnsToApply) =>\r\n nodes => _.reduce(\r\n _.compact(fnsToApply),\r\n (memo, fn) => fn(memo),\r\n nodes\r\n );\r\n\r\n/**\r\n * @param {array} nodes - tree structure\r\n * @param {bool} checked - select or deselect\r\n * @returns {array} a deep copy of the updated tree\r\n */\r\nexport const selectAll = (nodes, checked = true) =>\r\n _.map(nodes, node => (\r\n node.isLinkedAccount || (node.isCustomer && node.state.disabled) ? ({\r\n ...node,\r\n children: _.filter(node.children, child => !child.isCustomer)\r\n .concat(selectAll(_.filter(node.children, child => child.isCustomer), checked)),\r\n }) : ({\r\n ...node,\r\n state: {\r\n ...(node.state || {}),\r\n checked,\r\n ...(!node.isCustomer ? { disabled: checked } : {}),\r\n },\r\n children: selectAll(node.children, checked),\r\n })));\r\n\r\n/**\r\n * @param {array} nodes - tree structure\r\n * @param {Object} updatedNode - the tree node whose state is changed\r\n * @returns {array} a deep copy of the updated tree\r\n */\r\nexport const expandTree = (nodes, updatedNode) =>\r\n _.map(nodes, (node) => {\r\n if (node.id === updatedNode.id) {\r\n return {\r\n ...node,\r\n state: {\r\n ...(node.state || {}),\r\n expanded: updatedNode.state.expanded,\r\n },\r\n };\r\n }\r\n\r\n return {\r\n ...node,\r\n children: expandTree(node.children, updatedNode),\r\n };\r\n });\r\n","import PropTypes from 'prop-types';\r\nimport { NodeOperations } from '@bingads-webui-react/tree-view';\r\n\r\nexport const HierarchyNodesProp = PropTypes.shape({\r\n id: PropTypes.number.isRequired,\r\n number: PropTypes.string.isRequired,\r\n name: PropTypes.string.isRequired,\r\n isCustomer: PropTypes.bool.isRequired,\r\n});\r\n\r\nexport const AccountProp = PropTypes.shape({\r\n Id: PropTypes.number.isRequired,\r\n Number: PropTypes.string.isRequired,\r\n Name: PropTypes.string.isRequired,\r\n});\r\n\r\nexport const SharingScopeProp = PropTypes.shape({\r\n Customers: PropTypes.arrayOf(AccountProp),\r\n Accounts: PropTypes.arrayOf(AccountProp),\r\n});\r\n\r\nexport const NodeUpdateHandlersProp = PropTypes.shape({\r\n [NodeOperations.SELECTED]: PropTypes.func.isRequired,\r\n [NodeOperations.EXPANDED]: PropTypes.func.isRequired,\r\n [NodeOperations.COLLAPSED]: PropTypes.func.isRequired,\r\n});\r\n","import _ from 'underscore';\r\nimport React, { PureComponent } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { SearchBox, SearchResultLiveRegion } from '@bingads-webui-react/search-box';\r\nimport { CheckBoxNode, TreeView } from '@bingads-webui-react/tree-view';\r\nimport { compactCustomers } from './tree-operations';\r\nimport { HierarchyNodesProp, NodeUpdateHandlersProp } from './shapes';\r\n\r\nexport class ScopeEditorSrcPanel extends PureComponent {\r\n static propTypes = {\r\n data: PropTypes.arrayOf(HierarchyNodesProp).isRequired,\r\n deps: PropTypes.shape({\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n }).isRequired,\r\n nodeUpdateHandlers: NodeUpdateHandlersProp.isRequired,\r\n onTreeUpdated: PropTypes.func.isRequired,\r\n onSelectAll: PropTypes.func.isRequired,\r\n }\r\n\r\n constructor(props) {\r\n super(props);\r\n this.onSearch = _.debounce(this.onSearch, 500);\r\n }\r\n\r\n state = {\r\n query: '',\r\n searchText: '',\r\n }\r\n\r\n onSearch = () => {\r\n this.setState(prevState => ({ query: prevState.searchText }));\r\n }\r\n\r\n onQueryChange = (searchText) => {\r\n this.setState({ searchText });\r\n this.onSearch();\r\n }\r\n\r\n onKeyDown = (event) => {\r\n if (event.key === 'Enter') {\r\n this.props.onSelectAll();\r\n }\r\n }\r\n\r\n matchNode(query) {\r\n return ({ name, number }) => {\r\n const lowerCaseQuery = query.toLowerCase();\r\n return name.toString().toLowerCase().indexOf(lowerCaseQuery) >= 0 ||\r\n number.toString().toLowerCase().indexOf(lowerCaseQuery) >= 0;\r\n };\r\n }\r\n\r\n renderTree(nodes) {\r\n const { nodeUpdateHandlers, onTreeUpdated } = this.props;\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n renderNodeLabel = (node) => {\r\n const { deps: { i18n } } = this.props;\r\n const labelText = `${node.name} (${node.number})`;\r\n\r\n return (\r\n node.isLinkedAccount\r\n ? (\r\n \r\n {`${labelText} - ${i18n.getString('SharingScopeEditor_Linked_Label')}`}\r\n )\r\n : ({labelText})\r\n );\r\n }\r\n\r\n render() {\r\n const {\r\n query,\r\n searchText,\r\n } = this.state;\r\n const {\r\n data,\r\n deps: { i18n },\r\n onSelectAll,\r\n } = this.props;\r\n\r\n const relevantNodes = query ? compactCustomers(data, this.matchNode(query)) : data;\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n {i18n.getString('SharingScopeEditor_AddAll')}\r\n \r\n \r\n
\r\n
\r\n {this.renderTree(relevantNodes)}\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import React, { PureComponent } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Checkbox } from '@bingads-webui-react/checkbox';\r\nimport { ExpandableNode, NodeOperations, TreeView } from '@bingads-webui-react/tree-view';\r\nimport { get } from '@bingads-webui-universal/primitive-utilities';\r\nimport { compactCustomers } from './tree-operations';\r\nimport { HierarchyNodesProp, NodeUpdateHandlersProp } from './shapes';\r\n\r\nexport class ScopeEditorTargetPanel extends PureComponent {\r\n static propTypes = {\r\n data: PropTypes.arrayOf(HierarchyNodesProp).isRequired,\r\n deps: PropTypes.shape({\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n }).isRequired,\r\n nodeUpdateHandlers: NodeUpdateHandlersProp.isRequired,\r\n onTreeUpdated: PropTypes.func.isRequired,\r\n onRemoveAll: PropTypes.func.isRequired,\r\n }\r\n\r\n onKeyDown = (event) => {\r\n if (event.key === 'Enter') {\r\n this.props.onRemoveAll();\r\n }\r\n }\r\n\r\n checkBoxNodeRender = (node, args) => {\r\n const { state = {} } = node;\r\n const { checked, disabled, indeterminate } = state;\r\n const onChange = () => {\r\n const updatedNode = node;\r\n updatedNode.state = {\r\n ...state,\r\n checked: !checked,\r\n indeterminate: false,\r\n };\r\n args.onChange({\r\n node: updatedNode,\r\n type: NodeOperations.SELECTED,\r\n });\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n {args.nodeChildRenderer(node)}\r\n \r\n \r\n \r\n );\r\n }\r\n\r\n renderNodeLabel = (node) => {\r\n const labelText = `${node.name} (${node.number})`;\r\n\r\n return {labelText};\r\n }\r\n\r\n renderTree(nodes) {\r\n const { nodeUpdateHandlers, onTreeUpdated } = this.props;\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n render() {\r\n const {\r\n data,\r\n deps: { i18n },\r\n onRemoveAll,\r\n } = this.props;\r\n const relevantNodes = compactCustomers(data, node => get(node, 'state.checked', false));\r\n const shouldDisableRemoveAll = relevantNodes.length === 1 &&\r\n relevantNodes[0].isCustomer &&\r\n relevantNodes[0].state.checked &&\r\n relevantNodes[0].state.disabled;\r\n\r\n return (\r\n
\r\n
\r\n \r\n \r\n {i18n.getString('SharingScopeEditor_RemoveAll')}\r\n \r\n
\r\n
\r\n {this.renderTree(relevantNodes)}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport React, { PureComponent } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { NodeOperations } from '@bingads-webui-react/tree-view';\r\nimport { Grid, Col, Row } from '@bingads-webui-react/primitive';\r\nimport { ScopeEditorSrcPanel } from './scope-editor-source-panel';\r\nimport { ScopeEditorTargetPanel } from './scope-editor-target-panel';\r\nimport {\r\n disableNodes,\r\n expandTree,\r\n nodesWithHelpers,\r\n pipe,\r\n selectAll,\r\n sortedByNodeType,\r\n updatedTree,\r\n} from './tree-operations';\r\nimport {\r\n AccountProp,\r\n SharingScopeProp,\r\n HierarchyNodesProp,\r\n} from './shapes';\r\n\r\nexport class SharingScopeEditor extends PureComponent {\r\n static propTypes = {\r\n deps: PropTypes.shape({\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }),\r\n }).isRequired,\r\n onSelectionUpdated: PropTypes.func,\r\n availableEntities: PropTypes.arrayOf(HierarchyNodesProp).isRequired,\r\n selectedEntities: SharingScopeProp.isRequired,\r\n owner: AccountProp.isRequired,\r\n editorProps: PropTypes.shape({\r\n sourceboxTitle: PropTypes.string.isRequired,\r\n targetboxTitle: PropTypes.string.isRequired,\r\n }).isRequired,\r\n children: PropTypes.node,\r\n }\r\n\r\n static defaultProps = {\r\n onSelectionUpdated: () => { },\r\n children: null,\r\n }\r\n\r\n state = {\r\n treeNodes: this.generateTreeNodes(),\r\n }\r\n\r\n componentDidUpdate(prevProps) {\r\n const {\r\n availableEntities,\r\n selectedEntities,\r\n owner,\r\n } = this.props;\r\n\r\n if (_.any(\r\n !_.isEqual(availableEntities, prevProps.availableEntities),\r\n !_.isEqual(selectedEntities, prevProps.selectedEntities),\r\n !_.isEqual(owner, prevProps.owner)\r\n )) {\r\n // eslint-disable-next-line\r\n this.setState({\r\n treeNodes: this.generateTreeNodes(),\r\n });\r\n }\r\n }\r\n\r\n onTreeUpdated = (updatedTreeNodes) => {\r\n this.setState({ treeNodes: updatedTreeNodes });\r\n }\r\n\r\n onSelectAll = () => {\r\n const { onSelectionUpdated } = this.props;\r\n const { treeNodes } = this.state;\r\n this.setState({\r\n treeNodes: selectAll(treeNodes, true),\r\n }, () => onSelectionUpdated(this.state.treeNodes));\r\n }\r\n\r\n onRemoveAll = () => {\r\n const { onSelectionUpdated } = this.props;\r\n const { treeNodes } = this.state;\r\n this.setState({\r\n treeNodes: selectAll(treeNodes, false),\r\n }, () => onSelectionUpdated(this.state.treeNodes));\r\n }\r\n\r\n generateTreeNodes() {\r\n const {\r\n availableEntities,\r\n selectedEntities,\r\n owner,\r\n } = this.props;\r\n\r\n let treeNodes = [];\r\n if (availableEntities) {\r\n treeNodes = pipe(\r\n sortedByNodeType,\r\n // add helper properties to each node\r\n nodesWithHelpers,\r\n // disable linked accounts\r\n nodes => disableNodes(nodes, node => node.isLinkedAccount),\r\n // owner node are selected by default, and can not be removed from sharing scope\r\n nodes => updatedTree(nodes, {\r\n id: owner.Id,\r\n state: {\r\n checked: true,\r\n disabled: true,\r\n },\r\n })\r\n )(availableEntities);\r\n\r\n // update state for each selected accounts\r\n _.each(selectedEntities.Accounts, ({ Id: aid }) => {\r\n treeNodes = updatedTree(treeNodes, {\r\n id: aid,\r\n state: {\r\n checked: true,\r\n },\r\n });\r\n });\r\n\r\n // update state for each selected customers\r\n _.each(selectedEntities.Customers, ({ Id: cid }) => {\r\n treeNodes = updatedTree(treeNodes, {\r\n id: cid,\r\n state: {\r\n checked: true,\r\n },\r\n });\r\n });\r\n }\r\n\r\n return treeNodes;\r\n }\r\n\r\n nodeSelectHandler = (visibleNodes, updatedNode) => {\r\n const updatedTreeNodes = updatedTree(this.state.treeNodes, {\r\n ...updatedNode,\r\n state: _.pick(updatedNode.state, 'checked'),\r\n });\r\n\r\n this.props.onSelectionUpdated(updatedTreeNodes);\r\n\r\n return updatedTreeNodes;\r\n }\r\n\r\n nodeExpandHandler = (visibleNodes, updatedNode) => expandTree(this.state.treeNodes, updatedNode)\r\n\r\n nodeUpdateHandlers = {\r\n [NodeOperations.SELECTED]: this.nodeSelectHandler,\r\n [NodeOperations.EXPANDED]: this.nodeExpandHandler,\r\n [NodeOperations.COLLAPSED]: this.nodeExpandHandler,\r\n }\r\n\r\n render() {\r\n const { treeNodes } = this.state;\r\n const {\r\n deps: { i18n },\r\n editorProps: {\r\n sourceboxTitle,\r\n targetboxTitle,\r\n },\r\n } = this.props;\r\n\r\n return (\r\n \r\n { this.props.children }\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n

{sourceboxTitle}

\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n

{targetboxTitle}

\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n );\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport { compactCustomers } from '@bingads-webui-campaign-react/sharing-scope-editor';\r\nimport { http } from '@bingads-webui/http-util';\r\nimport { getSessionStorage } from '@bingads-webui/storage';\r\nimport { getParameter } from '@bingads-webui/url-util';\r\n\r\nexport const isLinkedAccount = (appConfig) => {\r\n const { Id: currentCid } = appConfig.get('CurrentCustomer');\r\n const currentAccount = appConfig.get('CurrentAccount');\r\n let { AdvertiserCustomerID: parentCid } = currentAccount || {};\r\n // in case AdvertiserCustomerID is cleared, try get from config.advertiserCustomerID\r\n if (!_.isFinite(parentCid)) {\r\n parentCid = appConfig.get('advertiserCustomerID');\r\n }\r\n return _.isFinite(parentCid) && parentCid !== currentCid;\r\n};\r\n\r\nexport const isEntityOwner = (entity, appConfig) => {\r\n const { Owner: { Id } = {} } = entity;\r\n\r\n return Id === appConfig.get('CurrentCustomer').Id;\r\n};\r\n\r\n/**\r\n * return current scope (manager dashboard or campaign page) by checking fragment identifier.\r\n * @param {object} location - current location object\r\n * @returns {bool} true if we're in account scope\r\n */\r\nexport const isInAccountScope = (location = window.location) => {\r\n const matchResult = (/customer\\/(\\d+)(?:\\/account\\/(\\d+))?/).exec(location.hash);\r\n let [customerId, accountId] = matchResult ? _.tail(matchResult) : [];\r\n if (!customerId) {\r\n customerId = getParameter('cid', location.href);\r\n accountId = getParameter('aid', location.href);\r\n }\r\n\r\n return _.isString(customerId) && _.isString(accountId);\r\n};\r\n\r\nconst findNode = (nodes, { id }) =>\r\n _.reduce(nodes, (memo, node) => {\r\n if (memo) {\r\n return memo;\r\n }\r\n\r\n if (node.id === id) {\r\n return node;\r\n }\r\n\r\n return findNode(node.children, { id });\r\n }, undefined);\r\n\r\n/**\r\n * Check if a customer has child customers in the given customer hierarchy.\r\n *\r\n * @param {array} customerHierarchy - the customer hierarchy.\r\n * @param {object} customer - customer to search for.\r\n * @returns {bool} true if it has child customers, false otherwise.\r\n */\r\nexport const hasChildCustomers = (customerHierarchy, { cid }) => {\r\n const node = findNode(customerHierarchy, { id: cid });\r\n\r\n if (node) {\r\n return _.any(node.children, child => child.isCustomer);\r\n }\r\n\r\n return false;\r\n};\r\n\r\n/**\r\n * Check if current user is super admin on the customers\r\n * @param {number} cid - customer to verify\r\n * @returns {bool} true if it is super admin\r\n */\r\nexport const isSuperAdmin = ({ cid, uid }) => {\r\n const sessionStorage = getSessionStorage();\r\n const hasPermission = sessionStorage.get(`SharedLibrary_Permission_${uid}_${cid}`);\r\n if (_.isBoolean(hasPermission)) {\r\n return hasPermission;\r\n }\r\n\r\n return false;\r\n};\r\n\r\nconst getAllCustomerIdsFromHierarchy = customerHierarchy =>\r\n _.reduce(customerHierarchy, (memo, node) => {\r\n if (node.isCustomer) {\r\n return [...memo, node.id, ...getAllCustomerIdsFromHierarchy(node.children)];\r\n }\r\n\r\n return memo;\r\n }, []);\r\n\r\nexport const fetchUserPermissions = ({\r\n uid,\r\n cid,\r\n customerIds,\r\n customerHierarchy,\r\n}) => {\r\n const sessionStorage = getSessionStorage();\r\n const allCustomerIds = _.union(customerIds, getAllCustomerIdsFromHierarchy(customerHierarchy));\r\n\r\n const allCached = _.every(_.map(allCustomerIds, (customerId) => {\r\n const hasPermission = sessionStorage.get(`SharedLibrary_Permission_${uid}_${customerId}`);\r\n\r\n return _.isBoolean(hasPermission);\r\n }));\r\n\r\n if (allCached) {\r\n return Promise.resolve(true);\r\n }\r\n\r\n return http.post(`/campaign/users/HierarchyPermission?uid=${uid}&cid=${cid}`, {\r\n data: JSON.stringify({ UserId: uid, CustomerIds: allCustomerIds }),\r\n }).then((response) => {\r\n if (response && response.Errors && response.Errors.length > 0) {\r\n return Promise.reject(response.Errors[0]);\r\n }\r\n const { UserId, Permissions } = response;\r\n\r\n _.each(Permissions, ({ CustomerId, hasPermisson }) => {\r\n sessionStorage.set(`SharedLibrary_Permission_${UserId}_${CustomerId}`, hasPermisson);\r\n });\r\n\r\n return false;\r\n });\r\n};\r\n\r\nexport const Scopes = Object.freeze({\r\n ACCOUNT: 'account-scope',\r\n CUSTOMER: 'customer-scope',\r\n HIERARCHY: 'hierarchy-scope',\r\n});\r\n\r\nexport const treeToSharingScope = (treeNodes) => {\r\n const sharingScope = {\r\n Customers: [],\r\n Accounts: [],\r\n Others: 0,\r\n Total: 0,\r\n };\r\n const flatCustomers = compactCustomers(treeNodes, node => _.result(node.state, 'checked', false));\r\n const result = _.reduce(flatCustomers, (memo, node) => {\r\n if (_.result(node.state, 'checked', false)) {\r\n memo.Customers.push({\r\n Id: node.id,\r\n Name: node.name,\r\n Number: node.number,\r\n });\r\n } else {\r\n memo.Accounts.push(..._.map(node.children, child => ({\r\n Id: child.id,\r\n Name: child.name,\r\n Number: child.number,\r\n })));\r\n }\r\n\r\n return memo;\r\n }, sharingScope);\r\n\r\n return result;\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { Callout } from '@bingads-webui-react/callout';\r\n\r\nexport const AccountList = (props) => {\r\n const {\r\n i18n,\r\n description,\r\n accounts: {\r\n adAccounts = [],\r\n managerAccounts = [],\r\n others = 0,\r\n },\r\n } = props;\r\n const adAccountLabel = i18n.getString('Ad_Account');\r\n const managerAccountLabel = i18n.getString('Manager_Account');\r\n\r\n return (\r\n
\r\n {description &&\r\n

\r\n {description}\r\n

\r\n }\r\n
    \r\n {\r\n adAccounts.map(({ Name, Number }) => (\r\n
  • \r\n {`${Name} (${Number}) - `}\r\n {adAccountLabel}\r\n
  • \r\n ))\r\n }\r\n {\r\n managerAccounts.map(({ Name, Number }) => (\r\n
  • \r\n {`${Name} (${Number}) - `}\r\n {managerAccountLabel}\r\n
  • \r\n ))\r\n }\r\n {others > 0 ? i18n.getString('AudiencesGrid_Popover_Number_Other_Accounts', { number: others }) : null}\r\n
\r\n
\r\n );\r\n};\r\n\r\nAccountList.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n description: PropTypes.string,\r\n accounts: PropTypes.shape({\r\n adAccounts: PropTypes.arrayOf(PropTypes.shape({\r\n Name: PropTypes.string.isRequired,\r\n Number: PropTypes.string.isRequired,\r\n })),\r\n managerAccounts: PropTypes.arrayOf(PropTypes.shape({\r\n Name: PropTypes.string.isRequired,\r\n Number: PropTypes.string.isRequired,\r\n })),\r\n others: PropTypes.number,\r\n }).isRequired,\r\n};\r\n\r\nAccountList.defaultProps = {\r\n description: null,\r\n};\r\n\r\nexport class AccountListPopover extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n show: false,\r\n };\r\n }\r\n\r\n show = () => {\r\n this.setState({ show: true });\r\n }\r\n\r\n hide = () => {\r\n this.setState({ show: false });\r\n }\r\n\r\n render() {\r\n const {\r\n description, accountInfo, i18n, popoverId, placement, className, text, title,\r\n } = this.props;\r\n const classes = classNames('text-with-popover', 'clickable', className);\r\n const content = (\r\n );\r\n return (\r\n
\r\n \r\n \r\n {text}\r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nAccountListPopover.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n text: PropTypes.string.isRequired,\r\n title: PropTypes.string.isRequired,\r\n description: PropTypes.string,\r\n className: PropTypes.string,\r\n popoverId: PropTypes.string.isRequired,\r\n placement: PropTypes.string,\r\n accountInfo: PropTypes.arrayOf(PropTypes.shape({\r\n Name: PropTypes.string.isRequired,\r\n Number: PropTypes.string.isRequired,\r\n })).isRequired,\r\n};\r\n\r\nAccountListPopover.defaultProps = {\r\n description: '',\r\n className: '',\r\n placement: 'right',\r\n};\r\n","import _ from 'underscore';\r\nimport React, { PureComponent } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { RadioGroup } from '@bingads-webui-react/radio';\r\nimport {\r\n AccountProp,\r\n HierarchyNodesProp,\r\n SharingScopeEditor,\r\n SharingScopeProp,\r\n} from '@bingads-webui-campaign-react/sharing-scope-editor';\r\nimport { Scopes } from './util';\r\nimport { AccountListPopover } from './account-list-popover';\r\n\r\nexport class AudiencesSharingEditor extends PureComponent {\r\n static propTypes = {\r\n availableScope: PropTypes.arrayOf(HierarchyNodesProp).isRequired,\r\n deps: PropTypes.shape({\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }),\r\n }).isRequired,\r\n scopeOptions: PropTypes.arrayOf(PropTypes.shape({\r\n id: PropTypes.string.isRequired,\r\n text: PropTypes.string.isRequired,\r\n })).isRequired,\r\n audienceEntity: PropTypes.shape({\r\n IsAccountLevel: PropTypes.bool.isRequired,\r\n SharingScope: SharingScopeProp,\r\n Owner: AccountProp,\r\n }),\r\n onSelectedOptionChanged: PropTypes.func.isRequired,\r\n onTreeSelectionUpdated: PropTypes.func.isRequired,\r\n disabled: PropTypes.bool,\r\n tagEntityName: PropTypes.string,\r\n }\r\n\r\n static defaultProps = {\r\n audienceEntity: {},\r\n disabled: false,\r\n tagEntityName: null,\r\n }\r\n\r\n state = {\r\n selected: _.result(_.findWhere(this.props.scopeOptions, { selected: true }) || _.first(this.props.scopeOptions), 'id'),\r\n }\r\n\r\n onRadioChange = item => this.setState({\r\n selected: item,\r\n }, () => this.props.onSelectedOptionChanged(this.state.selected))\r\n\r\n renderItem = (item) => {\r\n const currentScopeOption = _.findWhere(this.props.scopeOptions, { id: item });\r\n\r\n if (currentScopeOption && !_.isObject(currentScopeOption.text)) {\r\n return _.result(currentScopeOption, 'text');\r\n }\r\n return ();\r\n }\r\n\r\n render() {\r\n const {\r\n availableScope,\r\n onTreeSelectionUpdated,\r\n deps,\r\n audienceEntity,\r\n scopeOptions,\r\n disabled,\r\n tagEntityName,\r\n } = this.props;\r\n const { SharingScope, Owner } = audienceEntity;\r\n const { selected } = this.state;\r\n const { i18n } = deps;\r\n\r\n return (\r\n
\r\n \r\n {\r\n selected === Scopes.HIERARCHY && (\r\n \r\n {\r\n tagEntityName && (\r\n
\r\n
\r\n
{i18n.getString('SharingScopeEditor_Audience_Banner', { tagName: tagEntityName })}
\r\n
\r\n )\r\n }\r\n \r\n )\r\n }\r\n
\r\n );\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport Backbone from 'backbone';\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport { disableNodes } from '@bingads-webui-campaign-react/sharing-scope-editor';\r\nimport { AudiencesSharingEditor } from './audience-scope-editor';\r\nimport { Scopes, treeToSharingScope } from './util';\r\n\r\nexport class AudienceSharingView extends Backbone.View {\r\n initialize({\r\n customerHierarchy,\r\n deps,\r\n scopeOptions,\r\n selectedOption = Scopes.ACCOUNT,\r\n audienceEntity,\r\n tagEntity,\r\n disabled = false,\r\n }) {\r\n this.customerHierarchy = customerHierarchy;\r\n this.deps = deps;\r\n this.audienceEntity = audienceEntity;\r\n this.tagEntity = tagEntity;\r\n this.selectedOption = selectedOption;\r\n this.treeSelection = audienceEntity.SharingScope;\r\n this.scopeOptions = scopeOptions;\r\n this.disabled = disabled;\r\n }\r\n\r\n onSelectedOptionChanged = (radio) => {\r\n this.selectedOption = radio;\r\n }\r\n\r\n onTreeSelectionUpdated = (treeNodes) => {\r\n this.treeSelection = treeToSharingScope(treeNodes);\r\n }\r\n\r\n getSharingScope() {\r\n return {\r\n selectedOption: this.selectedOption,\r\n ...(this.selectedOption === Scopes.HIERARCHY ? { treeSelection: this.treeSelection } : {}),\r\n };\r\n }\r\n\r\n getAvailableScope() {\r\n // Intersection of customer hierarchy and the scope of selected tag\r\n if (_.isUndefined(this.tagEntity)) {\r\n return this.customerHierarchy;\r\n }\r\n const { SharingScope: { Customers } = {} } = this.tagEntity;\r\n const customerSet = _.indexBy(Customers, 'Id');\r\n const result = disableNodes(\r\n this.customerHierarchy,\r\n (node) => {\r\n if (node.isCustomer) {\r\n return !_.has(customerSet, node.id);\r\n }\r\n\r\n return !_.has(customerSet, node.parentCustomerId);\r\n }\r\n );\r\n return result;\r\n }\r\n\r\n render() {\r\n ReactDOM.render((\r\n ), this.el);\r\n\r\n return this;\r\n }\r\n\r\n remove() {\r\n ReactDOM.unmountComponentAtNode(this.el);\r\n return super.remove();\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport React, { PureComponent } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { RadioGroup } from '@bingads-webui-react/radio';\r\nimport {\r\n SharingScopeEditor,\r\n AccountProp,\r\n HierarchyNodesProp,\r\n SharingScopeProp,\r\n filteredNodes,\r\n} from '@bingads-webui-campaign-react/sharing-scope-editor';\r\nimport { Scopes } from './util';\r\n\r\nexport class UETTagScopeEditor extends PureComponent {\r\n static propTypes = {\r\n customerHierarchy: PropTypes.arrayOf(HierarchyNodesProp).isRequired,\r\n deps: PropTypes.shape({\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }),\r\n }).isRequired,\r\n onSave: PropTypes.func,\r\n onCancel: PropTypes.func,\r\n onSelectedOptionChanged: PropTypes.func.isRequired,\r\n onTreeSelectionUpdated: PropTypes.func.isRequired,\r\n scopeOptions: PropTypes.arrayOf(PropTypes.shape({\r\n id: PropTypes.string.isRequired,\r\n text: PropTypes.string.isRequired,\r\n })).isRequired,\r\n selectedOption: PropTypes.string.isRequired,\r\n tagEntity: PropTypes.shape({\r\n SharingScope: SharingScopeProp,\r\n Owner: AccountProp,\r\n }),\r\n }\r\n\r\n static defaultProps = {\r\n tagEntity: {},\r\n onSave: null,\r\n onCancel: null,\r\n }\r\n\r\n constructor(props) {\r\n super(props);\r\n const { customerHierarchy } = this.props;\r\n\r\n this.nodes = filteredNodes(customerHierarchy, node => node.isCustomer);\r\n }\r\n\r\n state = {\r\n selected: this.props.selectedOption,\r\n }\r\n\r\n onRadioChange = item => this.setState({\r\n selected: item,\r\n }, () => this.props.onSelectedOptionChanged(this.state.selected))\r\n\r\n renderItem = item => _.result(_.findWhere(this.props.scopeOptions, { id: item }), 'text')\r\n\r\n render() {\r\n const {\r\n scopeOptions,\r\n onTreeSelectionUpdated,\r\n tagEntity: {\r\n SharingScope,\r\n Owner,\r\n },\r\n onSave,\r\n onCancel,\r\n deps,\r\n } = this.props;\r\n const { i18n } = deps;\r\n const { selected } = this.state;\r\n const footer = (\r\n
\r\n
\r\n
\r\n
{i18n.getString('SharedLibrary_Tag_ManageScope_Alert')}
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n );\r\n\r\n return (\r\n
\r\n
\r\n \r\n {\r\n selected === Scopes.HIERARCHY && (\r\n \r\n )\r\n }\r\n
\r\n {\r\n !_.isNull(onSave) && footer\r\n }\r\n
\r\n );\r\n }\r\n}\r\n","import { decorate } from '@bingads-webui/dialog';\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport Backbone from 'backbone';\r\nimport { UETTagScopeEditor } from './uet-tag-scope-editor';\r\nimport { Scopes, treeToSharingScope } from './util';\r\n\r\nexport class UETTagManageSopeView extends Backbone.View {\r\n initialize({\r\n customerHierarchy,\r\n scopeOptions,\r\n selectedOption = Scopes.CUSTOMER,\r\n tagEntity,\r\n deps,\r\n withFooter = false,\r\n }) {\r\n this.customerHierarchy = customerHierarchy;\r\n this.scopeOptions = scopeOptions;\r\n this.selectedOption = selectedOption;\r\n this.treeSelection = tagEntity.SharingScope;\r\n this.tagEntity = tagEntity;\r\n this.deps = deps;\r\n this.withFooter = withFooter;\r\n }\r\n\r\n get className() {\r\n return 'shared-library-audience-scope-editor';\r\n }\r\n\r\n onSelectedOptionChanged = (radio) => {\r\n this.selectedOption = radio;\r\n }\r\n\r\n onTreeSelectionUpdated = (treeNodes) => {\r\n this.treeSelection = treeToSharingScope(treeNodes);\r\n }\r\n\r\n getSharingScope() {\r\n return {\r\n selectedOption: this.selectedOption,\r\n ...(this.selectedOption === Scopes.HIERARCHY ? { treeSelection: this.treeSelection } : {}),\r\n };\r\n }\r\n\r\n render() {\r\n ReactDOM.render(\r\n (\r\n \r\n ), this.el\r\n );\r\n\r\n return this;\r\n }\r\n\r\n remove() {\r\n ReactDOM.unmountComponentAtNode(this.el);\r\n return super.remove();\r\n }\r\n\r\n save = () => {\r\n this.trigger('save', this.getSharingScope());\r\n }\r\n\r\n cancel = () => {\r\n this.trigger('close');\r\n }\r\n}\r\n\r\nexport const UETTagManageScopeDialog = decorate(UETTagManageSopeView, {\r\n position: 'center',\r\n minWidth: 720,\r\n maxWidth: 2000,\r\n});\r\n","import Backbone from 'backbone';\r\nimport {\r\n isCashbackPercentValid,\r\n getCashbackPercentValidationError,\r\n getRealCashbackPercentValue,\r\n isCashbackPercentEmpty,\r\n getCashbackInheritOptions } from '@bingads-webui-campaign/personalized-offer-shared';\r\nimport template from './cashback-percent-control-view.pug';\r\n\r\nexport class CashbackPercentControlView extends Backbone.View {\r\n initialize({\r\n viewContext,\r\n i18n,\r\n decimal,\r\n CashbackPercent = null,\r\n isParentLevel = false,\r\n showInheritFromParentOption = true,\r\n isCreationScenario = false,\r\n allowEmptyCashbackPercent = true,\r\n }) {\r\n this.i18n = i18n;\r\n this.decimal = decimal;\r\n this.isValid = true;\r\n this.viewContext = viewContext;\r\n this.isParentLevel = isParentLevel;\r\n this.showInheritFromParentOption = showInheritFromParentOption;\r\n this.isCreationScenario = isCreationScenario;\r\n this.allowEmptyCashbackPercent = allowEmptyCashbackPercent;\r\n\r\n this.snapshotValue = '';\r\n this.cashbackPercentValue = isCashbackPercentEmpty(CashbackPercent) ? '' : decimal.fromFloatToString(CashbackPercent);\r\n }\r\n\r\n get events() {\r\n return {\r\n 'input .cashback-percent-input': e => this.handleCashbackPercentChange(e),\r\n 'change .cashback-option-select': e => this.handleCashbackOptionChange(e),\r\n };\r\n }\r\n\r\n handleCashbackOptionChange() {\r\n this.$('.error').empty();\r\n this.isValid = true;\r\n const selectedOption = this.$('.cashback-option-select').val();\r\n\r\n if (selectedOption !== 'override') {\r\n // save snapshot value\r\n const currentCashbackInputVal = this.$('.cashback-percent-input').val();\r\n this.snapshotValue = currentCashbackInputVal;\r\n }\r\n\r\n if (selectedOption === 'noCashback') {\r\n this.cashbackPercentValue = 0;\r\n this.$('.cashback-input-container').addClass('hide');\r\n this.$('.inherit-cashback-value').addClass('hide');\r\n this.trigger('change', true, this.cashbackPercentValue);\r\n } else if (selectedOption === 'inherit') {\r\n this.cashbackPercentValue = null;\r\n this.$('.inherit-cashback-value').removeClass('hide');\r\n this.$('.cashback-input-container').addClass('hide');\r\n\r\n this.trigger('change', true, this.cashbackPercentValue);\r\n } else if (selectedOption === 'override') {\r\n this.$('.cashback-input-container').removeClass('hide');\r\n this.$('.inherit-cashback-value').addClass('hide');\r\n this.$('.cashback-percent-input').val(this.snapshotValue);\r\n\r\n if (!isCashbackPercentValid(\r\n this.snapshotValue,\r\n this.decimal,\r\n this.allowEmptyCashbackPercent\r\n )) {\r\n this.showError(this.snapshotValue);\r\n this.trigger('change', false);\r\n } else {\r\n this.cashbackPercentValue = getRealCashbackPercentValue(\r\n this.snapshotValue,\r\n this.decimal\r\n );\r\n this.trigger('change', true, this.cashbackPercentValue);\r\n }\r\n } else {\r\n this.$('.inherit-cashback-value').addClass('hide');\r\n this.$('.cashback-input-container').addClass('hide');\r\n this.cashbackPercentValue = 0;\r\n this.trigger('change', true, this.cashbackPercentValue);\r\n }\r\n }\r\n\r\n showError(cashbackPercentValue) {\r\n const error = getCashbackPercentValidationError(\r\n cashbackPercentValue,\r\n this.i18n,\r\n this.decimal,\r\n this.allowEmptyCashbackPercent\r\n );\r\n this.$('.error').text(error);\r\n this.isValid = false;\r\n }\r\n\r\n handleCashbackPercentChange() {\r\n this.$('.error').empty();\r\n this.isValid = true;\r\n const cashbackPercentInputValue = this.$('.cashback-percent-input').val();\r\n const cashbackPercentValid = isCashbackPercentValid(\r\n cashbackPercentInputValue,\r\n this.decimal,\r\n this.allowEmptyCashbackPercent\r\n );\r\n\r\n if (!cashbackPercentValid) {\r\n this.showError(cashbackPercentInputValue);\r\n this.trigger('change', false);\r\n } else {\r\n this.cashbackPercentValue = getRealCashbackPercentValue(\r\n cashbackPercentInputValue,\r\n this.decimal\r\n );\r\n this.trigger('change', true, this.cashbackPercentValue);\r\n }\r\n }\r\n\r\n validate() {\r\n const selectedOption = this.$('.cashback-option-select').val();\r\n const inputValue = this.$('.cashback-percent-input').val();\r\n if (selectedOption !== 'override') {\r\n return true;\r\n }\r\n\r\n const cashbackPercentValid = isCashbackPercentValid(\r\n inputValue,\r\n this.decimal,\r\n this.allowEmptyCashbackPercent\r\n );\r\n\r\n if (!cashbackPercentValid) {\r\n this.showError(inputValue);\r\n this.trigger('change', false);\r\n }\r\n return cashbackPercentValid;\r\n }\r\n\r\n getCashbackPercentValue() {\r\n return getRealCashbackPercentValue(this.cashbackPercentValue, this.decimal);\r\n }\r\n\r\n getCashbackOptionInfo() {\r\n const campaignCashbackOptions = [\r\n {\r\n text: this.i18n.getString('CashbackOption_OverrideTo'),\r\n value: 'override',\r\n },\r\n {\r\n text: this.i18n.getString('CashbackOption_NoCashback'),\r\n value: 'noCashback',\r\n },\r\n ];\r\n\r\n const cashbackOptionInfo =\r\n getCashbackInheritOptions({\r\n CashbackPercent: this.cashbackPercentValue,\r\n viewContext: this.viewContext,\r\n i18n: this.i18n,\r\n readonly: this.isParentLevel,\r\n });\r\n let {\r\n options: cashbackOptions,\r\n selected: selectedOption,\r\n } = cashbackOptionInfo;\r\n const {\r\n inheritValue: inheritCashbackPercent,\r\n } = cashbackOptionInfo;\r\n\r\n if (!this.showInheritFromParentOption) {\r\n cashbackOptions = campaignCashbackOptions;\r\n cashbackOptions[0].text = this.i18n.getString('CashbackOption_SetTo');\r\n }\r\n\r\n if (!this.showInheritFromParentOption) {\r\n if (this.isCreationScenario || isCashbackPercentEmpty(this.cashbackPercentValue)) {\r\n selectedOption = 'override';\r\n } else if (getRealCashbackPercentValue(this.cashbackPercentValue, this.decimal) === 0) {\r\n selectedOption = 'noCashback';\r\n } else {\r\n selectedOption = 'override';\r\n }\r\n }\r\n\r\n return {\r\n inheritCashbackPercent: inheritCashbackPercent === '-' ? '-' :\r\n this.decimal.fromFloatToString(inheritCashbackPercent),\r\n selectedOption,\r\n cashbackOptions,\r\n readonly: this.isParentLevel,\r\n };\r\n }\r\n\r\n render() {\r\n this.$el.html(template({\r\n i18n: this.i18n,\r\n percentage: this.cashbackPercentValue,\r\n size: 5,\r\n ...this.getCashbackOptionInfo(),\r\n }));\r\n\r\n return this;\r\n }\r\n\r\n setValues(cashbackPercent) {\r\n cashbackPercent = getRealCashbackPercentValue(cashbackPercent, this.decimal); // eslint-disable-line\r\n let selectedOption;\r\n if (cashbackPercent === -1) {\r\n selectedOption = 'inherit';\r\n } else if (cashbackPercent === 0 && !this.showInheritFromParentOption) {\r\n selectedOption = 'noCashback';\r\n } else {\r\n selectedOption = 'override';\r\n }\r\n\r\n const cashbackOptionSelect = this.$('.cashback-option-select');\r\n cashbackOptionSelect.val(selectedOption);\r\n this.handleCashbackOptionChange();\r\n\r\n const cashbackPercentInput = this.$('.cashback-percent-input');\r\n if (!isCashbackPercentEmpty(cashbackPercent)) {\r\n cashbackPercentInput.val(this.decimal.fromFloatToString(cashbackPercent));\r\n } else {\r\n cashbackPercentInput.val('');\r\n }\r\n if (selectedOption === 'override') {\r\n this.handleCashbackPercentChange();\r\n }\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\nexport const MS_STORE_PROVIDER_ID_MAP = {\r\n SI: [10624440, 5104030, 5353239],\r\n PROD: [182978],\r\n CI: [108],\r\n};\r\n\r\nexport function getMSStoreIdByEnv(url) {\r\n if (url.includes('redmond.corp.microsoft.com')) {\r\n return MS_STORE_PROVIDER_ID_MAP.CI;\r\n }\r\n if (url.includes('ads-int.microsoft.com') || url.includes('si.bingads.microsoft.com')) {\r\n return MS_STORE_PROVIDER_ID_MAP.SI;\r\n }\r\n return MS_STORE_PROVIDER_ID_MAP.PROD;\r\n}\r\n\r\nexport const isMSStoreProviderId = (providerId, url = window.location.href) => {\r\n const id = +providerId;\r\n\r\n const msStoreIds = getMSStoreIdByEnv(url);\r\n return msStoreIds.includes(id);\r\n};\r\n\r\nexport function isMSStoreAdsCampaign(campaign) {\r\n const msStoreIds = getMSStoreIdByEnv(window.location.href);\r\n const providerId = _.chain(campaign).result('CampaignSettings').result('0').result('ProviderId')\r\n .value();\r\n return !!(msStoreIds.some(id => String(id) === String(providerId)));\r\n}\r\n","import _ from 'underscore';\r\n\r\nconst invalidShoppingCampaignSubTypes = permissions => _.compact([\r\n !permissions.IsPersonalizedOffersV3Enabled && 'ShoppingSmartAds',\r\n 'ShoppingSponsoredProductAd',\r\n 'ShoppingCoOperative',\r\n 'AudienceDynamicFeedBased',\r\n]).map(subtype => subtype.toLowerCase());\r\n\r\nexport function isShowCoupon({ CampaignType, CampaignSubType }, permissions) {\r\n if (CampaignType == null) {\r\n return false;\r\n }\r\n if (CampaignSubType == null) {\r\n CampaignSubType = ''; // eslint-disable-line\r\n }\r\n\r\n switch (CampaignType.toLowerCase()) {\r\n case 'shopping': {\r\n // available only for standard search shopping\r\n return !_\r\n .contains(invalidShoppingCampaignSubTypes(permissions), CampaignSubType.toLowerCase());\r\n }\r\n default:\r\n return false;\r\n }\r\n}\r\n\r\nexport function isPersonalizedOfferAvailable(\r\n permissions,\r\n campaignType = '',\r\n campaignSubType = ''\r\n) {\r\n if (_.result(permissions, ['IsPersonalizedOffersV4Enabled'], false)) {\r\n return false;\r\n }\r\n\r\n if (!_.result(permissions, ['IsPersonalizedOffersEnabled'], false)) {\r\n return false;\r\n }\r\n\r\n if (campaignSubType == null) {\r\n campaignSubType = ''; // eslint-disable-line\r\n }\r\n\r\n switch (campaignType.toLowerCase()) {\r\n case 'default':\r\n case 'search':\r\n case 'dynamicsearchad':\r\n return true;\r\n case 'shopping': {\r\n // available only for standard search shopping\r\n return !_\r\n .contains(invalidShoppingCampaignSubTypes(permissions), campaignSubType.toLowerCase());\r\n }\r\n case 'audience':\r\n return campaignSubType.toLowerCase() === 'audiencefeedbased'; // the only validated sub type for audience campaign\r\n default:\r\n return false;\r\n }\r\n}\r\n\r\nexport function shouldSupportCashbackSettings(campaign, permissions) {\r\n if (_.result(permissions, ['IsPersonalizedOffersV4Enabled'], false)) {\r\n return false;\r\n }\r\n\r\n return _.chain(campaign)\r\n .result('CampaignCashback')\r\n .result('MonthlyBudget', 0)\r\n .value() > 0 ||\r\n _.chain(campaign) // MT should return this flag only if V3 is supported\r\n .result('CampaignCashback')\r\n .result('PersonalizedOffersEnabled')\r\n .value() === true;\r\n}\r\n\r\nexport function isCashbackPercentEmpty(value) {\r\n return value == null || value === '' || +value === -1;\r\n}\r\n\r\nexport function getParentLevelCashbackScope({\r\n currentCampaign,\r\n}) {\r\n const campaignCashbackScope = _.chain(currentCampaign)\r\n .result('CampaignCashback')\r\n .result('Scope')\r\n .value() || 'None';\r\n\r\n return campaignCashbackScope;\r\n}\r\n\r\nexport function getParentLevelCashbackPercent({\r\n currentAdGroup,\r\n currentCampaign,\r\n}) {\r\n const adGroupCashbackPercent = _.chain(currentAdGroup)\r\n .result('AdGroupCashback')\r\n .result('Percent')\r\n .value();\r\n const campaignCashbackPercent = _.chain(currentCampaign)\r\n .result('CampaignCashback')\r\n .result('Percent')\r\n .value();\r\n\r\n if (adGroupCashbackPercent != null && adGroupCashbackPercent !== -1) {\r\n return { value: adGroupCashbackPercent, level: 'AdGroup' };\r\n }\r\n return { value: campaignCashbackPercent, level: 'Campaign' };\r\n}\r\n\r\nexport function getParentLevelCoupon({\r\n currentCampaign,\r\n}) {\r\n const campaignCoupon = _.chain(currentCampaign)\r\n .result('CampaignCashback')\r\n .result('CouponsEnabled')\r\n .value() || 'None';\r\n\r\n return campaignCoupon;\r\n}\r\n\r\nexport function getCashbackInheritOptions({\r\n CashbackPercent, readonly, viewContext, i18n,\r\n}) {\r\n let cashbackInheritInfo;\r\n let inheritCashbackPercent;\r\n if (!readonly) {\r\n cashbackInheritInfo = getParentLevelCashbackPercent(viewContext);\r\n inheritCashbackPercent = (cashbackInheritInfo.value == null || cashbackInheritInfo.value === -1)\r\n ? '-' : +cashbackInheritInfo.value;\r\n } else {\r\n cashbackInheritInfo = getParentLevelCashbackPercent({\r\n currentCampaign: viewContext.currentCampaign,\r\n });\r\n inheritCashbackPercent = (cashbackInheritInfo.value == null || cashbackInheritInfo.value === -1)\r\n ? '-' : +cashbackInheritInfo.value;\r\n }\r\n const cashbackOptions = [\r\n {\r\n text: i18n.getString(`CashbackOption_InheritFrom${cashbackInheritInfo.level}`),\r\n value: 'inherit',\r\n },\r\n {\r\n text: i18n.getString('CashbackOption_OverrideTo'),\r\n value: 'override',\r\n },\r\n {\r\n text: i18n.getString('CashbackOption_NoCashback'),\r\n value: 'noCashback',\r\n },\r\n ];\r\n\r\n let selectedOption;\r\n if (CashbackPercent === '' || CashbackPercent == null || +CashbackPercent === -1) {\r\n selectedOption = 'inherit';\r\n } else if (+CashbackPercent === 0) {\r\n selectedOption = 'noCashback';\r\n } else {\r\n selectedOption = 'override';\r\n }\r\n\r\n return {\r\n options: cashbackOptions,\r\n selected: selectedOption,\r\n inheritValue: inheritCashbackPercent,\r\n };\r\n}\r\n\r\nexport function isCashbackPercentValid(val, decimal, allowEmptyCashbackPercent = true) {\r\n if (val == null || val === '') {\r\n if (allowEmptyCashbackPercent) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n const isValidNumber = typeof val === 'number' ? true : decimal.isValid(val);\r\n if (isValidNumber) {\r\n const number = decimal.fromLocalToFloat(val);\r\n return number >= 0 && number <= 50;\r\n }\r\n return false;\r\n}\r\n\r\nexport const getCashbackPercentValidationError = (\r\n val,\r\n i18n,\r\n decimal,\r\n allowEmptyCashbackPercent = true\r\n) => {\r\n let validationError = '';\r\n const isValidNumber = typeof val === 'number' ? true : decimal.isValid(val);\r\n\r\n if (!allowEmptyCashbackPercent && (val === '' || val == null)) {\r\n validationError = i18n.getString('Validation_NotEmpty_Required_Field');\r\n } else if (!isValidNumber) {\r\n validationError = i18n.getString('Audience_Campaign_Settings_Bid_Invalid');\r\n } else {\r\n const number = decimal.fromLocalToFloat(val);\r\n if (number < 0 || number > 50) {\r\n validationError = i18n.getString('Audience_Campaign_Settings_Bid_Validation')\r\n .replace('{{min}}', 0).replace('{{max}}', 50);\r\n }\r\n }\r\n\r\n return validationError;\r\n};\r\n\r\nexport const getRealCashbackPercentValue = (val, decimal) => {\r\n if (isCashbackPercentEmpty(val)) {\r\n return -1;\r\n }\r\n\r\n if (typeof val === 'number') {\r\n return val;\r\n }\r\n\r\n return decimal.fromLocalToFloat(val);\r\n};\r\n\r\nexport const shouldPersonalizedOffersReadOnly = (isAfterSave, biddingStrategyView) => {\r\n if (!isAfterSave) return false;\r\n if (biddingStrategyView) {\r\n const BiddingScheme = biddingStrategyView.getValues();\r\n return BiddingScheme.Type === 'CostPerSale';\r\n }\r\n return false;\r\n};\r\n\r\nexport const getBidStrategyByCampaignTypeWhenPersonalizedOffersEnabled = ({\r\n campaignType = 'default',\r\n i18n,\r\n isAfterSave,\r\n Permissions,\r\n selectedBidStrategy,\r\n}) => {\r\n if (campaignType.toLowerCase() === 'audience') {\r\n return {\r\n targetBidStrategy: 'ManualCpc',\r\n bidStrategyOptions: [],\r\n };\r\n }\r\n\r\n const isSearchCampaign = campaignType.toLowerCase() === 'search' || campaignType.toLowerCase() === 'default';\r\n const commonBidStrategy = {\r\n Value: isSearchCampaign ? 'MaxConversions' : 'MaxConversionValue',\r\n Text: i18n.getString(isSearchCampaign ? 'BidStrategy_Option_MaximizeConversions' : 'BidStrategy_Option_MaxConversionValue'),\r\n };\r\n const costPerSaleBidStrategy = {\r\n Value: 'CostPerSale',\r\n Text: i18n.getString('BidStrategy_Option_CostPerSale'),\r\n };\r\n const bidStrategyOptions = [];\r\n if (isAfterSave) {\r\n if (selectedBidStrategy === 'CostPerSale') {\r\n bidStrategyOptions.push(costPerSaleBidStrategy);\r\n } else {\r\n bidStrategyOptions.push(commonBidStrategy);\r\n }\r\n } else {\r\n bidStrategyOptions.push(commonBidStrategy);\r\n if (Permissions && Permissions.IsCostPerSaleEnabled && !isSearchCampaign) {\r\n bidStrategyOptions.push(costPerSaleBidStrategy);\r\n }\r\n }\r\n const targetBidStrategy = bidStrategyOptions[0].Value;\r\n\r\n return { targetBidStrategy, bidStrategyOptions };\r\n};\r\n\r\nexport const logCampaignPersonalizedOffers = (shouldLog, log, campaign, message) => {\r\n if (shouldLog) {\r\n const campaignCashback = _.chain(campaign).result('CampaignCashback');\r\n const CashbackPercent = campaignCashback\r\n .result('Percent')\r\n .value() || _.chain(campaign)\r\n .result('CashbackPercent')\r\n .value();\r\n const CouponsEnabled = campaignCashback\r\n .result('CouponsEnabled')\r\n .value() || _.chain(campaign)\r\n .result('CouponsEnabled')\r\n .value();\r\n const PersonalizedOffersEnabled = campaignCashback\r\n .result('PersonalizedOffersEnabled')\r\n .value() || _.chain(campaign)\r\n .result('PersonalizedOffersEnabled')\r\n .value() || campaignCashback\r\n .result('MonthlyBudget', 0)\r\n .value() > 0 || _.chain(campaign)\r\n .result('CashbackMonthlyBudget', 0)\r\n .value() > 0;\r\n\r\n if (CashbackPercent != null && CashbackPercent > 0) {\r\n log(`${message || ''}CashbackEnabled`);\r\n }\r\n\r\n if (CouponsEnabled != null && CouponsEnabled === 'Enabled') {\r\n log(`${message || ''}CouponsEnabled`);\r\n }\r\n\r\n if (PersonalizedOffersEnabled != null && PersonalizedOffersEnabled) {\r\n log(`${message || ''}PersonalizedOffersEnabled`);\r\n }\r\n }\r\n};\r\n\r\nexport const logAdGroupPersonalizedOffers = (shouldLog, log, adgroup, message) => {\r\n if (shouldLog) {\r\n const adgroupCashback = _.chain(adgroup).result('AdGroupCashback');\r\n const CashbackPercent = adgroupCashback\r\n .result('Percent')\r\n .value() || _.chain(adgroup)\r\n .result('CashbackPercent')\r\n .value();\r\n const CouponsEnabled = adgroupCashback\r\n .result('CouponsEnabled')\r\n .value() || _.chain(adgroup)\r\n .result('CouponsEnabled')\r\n .value();\r\n\r\n if (CashbackPercent != null) {\r\n if (CashbackPercent > 0) {\r\n log(`${message || ''}CashbackEnabled.Override`);\r\n } else if (CashbackPercent === -1) {\r\n log(`${message || ''}CashbackEnabled.Inherited`);\r\n } else {\r\n log(`${message || ''}CashbackEnabled.NoCashback`);\r\n }\r\n }\r\n\r\n if (CouponsEnabled != null) {\r\n if (CouponsEnabled === 'Enabled') {\r\n log(`${message || ''}CouponsEnabled.Enabled`);\r\n } else if (CouponsEnabled === 'None') {\r\n log(`${message || ''}CouponsEnabled.Inherited`);\r\n } else {\r\n log(`${message || ''}CouponsEnabled.Disabled`);\r\n }\r\n }\r\n }\r\n};\r\n\r\nexport function setBidStrategyForPersonalizedOffers(isEnabled) {\r\n if (this.biddingStrategyView) {\r\n this.biddingStrategyView.setPersonalizedOffersOptionsAndValue({\r\n enabled: isEnabled,\r\n });\r\n }\r\n}\r\n\r\nexport function setupCommonCashbackObserver(target) {\r\n const setBidStrategy = setBidStrategyForPersonalizedOffers.bind(target);\r\n target.cashbackSettingsView.viewModel.isEnablePersonalizedOffersChecked.subscribe((checked) => {\r\n setBidStrategy(checked);\r\n });\r\n}\r\n","import _ from 'underscore';\r\nimport { I18nModel } from '@bingads-webui-universal/i18n-model';\r\nimport { toIANATimeZone, fromLegacyTimeZone } from '@bingads-webui-universal/time-zone-converter';\r\n\r\nconst buildStringsMap = legacyKeys => _.extend(\r\n {},\r\n ...(_.flatten([legacyKeys]))\r\n);\r\n\r\nconst buildLegacyStrings =\r\n (i18n, allStrings) => _.mapObject(buildStringsMap(allStrings), str => i18n.getString(str));\r\n\r\n/**\r\n * buildLegacyI18n\r\n * @param {object} i18n translation object\r\n * @param {*} legacyKeys array of keys to _TL_ strings\r\n * @param {*} param2 extra options\r\n * @returns {object} built legacy i18n\r\n */\r\nexport const buildLegacyI18n = (i18n, legacyKeys, {\r\n timeZone,\r\n currency,\r\n} = {}) =>\r\n // rely on global locale\r\n new I18nModel({\r\n timeZone: _.isNumber(timeZone) ?\r\n toIANATimeZone(fromLegacyTimeZone(timeZone)) :\r\n undefined,\r\n currency,\r\n loadTranslationData: () => buildLegacyStrings(i18n, legacyKeys),\r\n loadCLDRData(locale) { return locale; },\r\n failFast: true,\r\n });\r\n","export const validationLocalization = {\r\n Validation_Base_Field_Not_Valid: _TL_('Field is not valid'),\r\n Validation_NotEmpty_Required_Field: _TL_('Required field'),\r\n Validation_String_Max_Length: _TL_('Field should not exceed {{maxlength}} characters'),\r\n Validation_String_Min_Length: _TL_('Field should exceed {{minlength}} characters'),\r\n Validation_String_Invalid_Characters: _TL_('Field contains invalid characters'),\r\n Validation_Number_Require_Numeric: _TL_('Field requires numeric value'),\r\n Validation_Number_Max_Length: _TL_('Number should not exceed max length'),\r\n Validation_Number_Range_Min: _TL_('Number should be larger than {{min}}'),\r\n Validation_Number_Range_Max: _TL_('Number should be smaller than {{max}}'),\r\n Validation_Number_Range_Between: _TL_('Number should be between {{min}} and {{max}}'),\r\n Validation_Array_Size_Max: _TL_('List should have at most {{max}} items'),\r\n Validation_Array_Size_Between: _TL_('List should have at least {{min}} and at most {{max}} items'),\r\n Validation_Array_Items_Invalid: _TL_('Some of items in list are invalid'),\r\n Validation_Array_Items_Duplicate: _TL_('List has duplicate items'),\r\n Validation_NegativeKeywords_ListName_Required: _TL_('The list name is required.'),\r\n Validation_NegativeKeywords_Max_Count: _TL_('Maximum of 5,000 negative keywords'),\r\n Validation_NegativeKeywords_Invalid_Keywords: _TL_('Some of the keyword(s) are invalid: {{invalidKeywords}}'),\r\n Validation_NegativeKeywords_Required: _TL_('At least 1 negative keyword is required.'),\r\n};\r\n\r\nexport const ImportNotificationLocalization = {\r\n Campaign_Status_Change_Overwrite_Notification_Message: _TL_('You’ve paused or unpaused a campaign that will have its status changed when your next scheduled import runs. To maintain this campaign’s current status even after import, go to your {{redirectLink}}Import schedule{{/redirectLink}} and deselect Campaigns under Customize status.'),\r\n Campaign_Budget_Change_Overwrite_Notification_Message: _TL_('Your edits to this campaign’s budget may be overwritten when your next scheduled import runs. To maintain these edits even after import, go to your {{redirectLink}}scheduled import{{/redirectLink}} and deselect {{bold}}Sync your bid strategies{{/bold}} under {{bold}}Customize bids{{/bold}}.'),\r\n Campaign_BidStrategy_Change_Overwrite_Notification_Message: _TL_('Your edits to this campaign’s bid strategy may be overwritten when your next scheduled import runs. To maintain these edits even after import, go to your {{redirectLink}}scheduled import{{/redirectLink}} and deselect {{bold}}Sync your campaign budgets{{/bold}} under {{bold}}Customize budgets{{/bold}}.'),\r\n Campaign_Budget_And_BidStrategy_Change_Overwrite_Notification_Message: _TL_('Your edits to this campaign’s budget and bid strategy may be overwritten when your next scheduled import runs. To maintain these edits even after import, go to your {{redirectLink}}scheduled import{{/redirectLink}}, deselect {{bold}}Sync your campaign budgets{{/bold}} under {{bold}}Customize budgets{{/bold}} and {{bold}}Sync your bid strategies{{/bold}} under {{bold}}Customize bids{{/bold}}.'),\r\n};\r\n","import React from 'react';\r\nimport { Switch as ReactSwitch, Redirect as ReactRedirect } from 'react-router';\r\nimport { Link as ReactLink, matchPath as reactMatchPath } from 'react-router-dom';\r\n\r\nimport {\r\n Router as SharedRouter,\r\n Route as SharedRoute,\r\n withRouter as sharedWithRouter,\r\n MemoryRouter as SharedMemoryRouter,\r\n HashRouter as SharedHashRouter,\r\n} from '@bingads-webui-react/router';\r\n\r\n/*\r\n * @bingads-webui-react/router elements\r\n */\r\nexport const Router = props => ;\r\n\r\nexport const Route = props => ;\r\n\r\nexport const withRouter = sharedWithRouter;\r\n\r\nexport const MemoryRouter = props => ;\r\n\r\nexport const HashRouter = props => ;\r\n\r\n/*\r\n * react-router elements\r\n */\r\nexport const Switch = ReactSwitch;\r\n\r\nexport const Redirect = ReactRedirect;\r\n\r\n/*\r\n * react-router-dom elements\r\n */\r\nexport const Link = ReactLink;\r\n\r\nexport const matchPath = reactMatchPath;\r\n","import { makeStyles, shorthands, tokens } from '@fluentui/react-components';\r\n\r\nexport const useCampaignScopeBarStyles = makeStyles({\r\n scopeBarLeftContent: {\r\n flexShrink: 1,\r\n minWidth: '50px',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'flex-start',\r\n ...shorthands.gap('10px'),\r\n },\r\n});\r\n\r\nexport const useCampaignStatusMenuButtonStyles = makeStyles({\r\n menuButton: {\r\n fontWeight: 'normal',\r\n },\r\n});\r\n\r\nexport const useStatusIconStyles = makeStyles({\r\n activeStatus: {\r\n color: tokens.colorPaletteGreenForeground1,\r\n fontSize: '10px',\r\n },\r\n pausedStatus: {\r\n color: tokens.colorNeutralForeground3,\r\n fontSize: '10px',\r\n },\r\n});\r\n","import PropTypes from 'prop-types';\r\nimport React from 'react';\r\nimport { CircleFilled, PauseFilled } from '@fluentui/react-icons';\r\nimport { useStatusIconStyles } from '../styles';\r\n\r\nexport const StatusIcon = ({ status }) => {\r\n const styles = useStatusIconStyles();\r\n\r\n if (!status) return null;\r\n\r\n if (status === 'Active') {\r\n return ;\r\n }\r\n\r\n return ;\r\n};\r\n\r\nStatusIcon.propTypes = {\r\n status: PropTypes.string,\r\n};\r\n\r\nStatusIcon.defaultProps = {\r\n status: undefined,\r\n};\r\n","import React, { useContext, useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { isFunction } from 'underscore';\r\nimport {\r\n Menu,\r\n MenuButton,\r\n MenuItem,\r\n MenuList,\r\n MenuPopover,\r\n MenuTrigger,\r\n mergeClasses,\r\n} from '@fluentui/react-components';\r\n\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { edmCampaign } from '@bingads-webui/edm-campaign';\r\nimport { AlertHelper } from '@bingads-webui-campaign/alert-helper';\r\n\r\nimport { StatusIcon } from './status-icon';\r\nimport { useCampaignStatusMenuButtonStyles } from '../styles';\r\n\r\nconst StatusText = {\r\n Active: _TL_('Enabled'),\r\n Pause: _TL_('Paused'),\r\n};\r\n\r\nexport const CampaignStatusMenuButton = ({\r\n id,\r\n status,\r\n i18n,\r\n importNotificationCallback,\r\n}) => {\r\n const styles = useCampaignStatusMenuButtonStyles();\r\n const buttonText = status === 'Active' ? StatusText.Active : StatusText.Pause;\r\n\r\n const { scope } = useContext(ScopeContext);\r\n const alertHelper = useMemo(() => new AlertHelper({ i18n }), [i18n]);\r\n const {\r\n values: {\r\n cid,\r\n aid,\r\n },\r\n } = scope;\r\n const onClick = useCallback(newStatus => () => {\r\n if (newStatus === status) {\r\n return;\r\n }\r\n edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .Campaigns.$withKey(id)\r\n .bulkUpdate({\r\n Id: id,\r\n Status: newStatus,\r\n }).then(() => {\r\n if (importNotificationCallback && isFunction(importNotificationCallback)) {\r\n // call import notifications callback for campaign status change in scope menu bar\r\n // convert the paused status text to be consistent with other scenarios\r\n importNotificationCallback({ updateStatus: newStatus === 'Paused' ? 'UserPaused' : newStatus });\r\n }\r\n }, () => {\r\n alertHelper.showError(i18n.getString(_TL_('We’ve encountered an error and can’t continue. Please contact support for further assistance.')));\r\n });\r\n }, [aid, alertHelper, cid, i18n, id, status]);\r\n const onClickEnable = useMemo(() => onClick('Active'), [onClick]);\r\n const onClickPause = useMemo(() => onClick('Paused'), [onClick]);\r\n\r\n return (\r\n \r\n \r\n }\r\n className={mergeClasses(styles.menuButton, 'campaign-status-menu-trigger')}\r\n >\r\n {i18n.getString(buttonText)}\r\n \r\n \r\n\r\n \r\n \r\n }\r\n >\r\n {i18n.getString(_TL_('Enable'))}\r\n \r\n }\r\n >\r\n {i18n.getString(_TL_('Pause'))}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nCampaignStatusMenuButton.propTypes = {\r\n id: PropTypes.number.isRequired,\r\n status: PropTypes.string.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n};\r\n\r\nCampaignStatusMenuButton.defaultProps = {\r\n\r\n};\r\n","import React, { useContext, useEffect, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n triggerMultiStepTeachingBubbleWithLock,\r\n MultiStepTeachingBubbleContext,\r\n} from '@bingads-webui-campaign-react/multi-step-teaching-bubble';\r\nimport { TeachingBubbleConfigs } from '@bingads-webui-campaign-react/navigation-refresh-teaching-bubble-config';\r\nimport { LayoutSizeScale, useLayoutResizeObserver } from '@bingads-webui-fluent-component/layout-size';\r\nimport { LayoutContext, Mode } from '@bingads-webui-react/app-layout-container';\r\nimport { getParameter } from '@bingads-webui/url-util';\r\n\r\nconst getModeByLayoutSize = (layoutSize) => {\r\n const result = LayoutSizeScale[layoutSize] >= LayoutSizeScale.XL;\r\n\r\n return result;\r\n};\r\n\r\nexport const BubbleRenderer = ({ isAccountScope, entityCount }) => {\r\n const bubbleContext = useContext(MultiStepTeachingBubbleContext);\r\n const [layoutSize, setLayoutSize] = React.useState('S');\r\n useLayoutResizeObserver(setLayoutSize);\r\n const largeSize = getModeByLayoutSize(layoutSize);\r\n const { config: layoutConfig } = useContext(LayoutContext);\r\n const ise2etest = getParameter('ise2etest') === 'true';\r\n const showForTest = getParameter('showNavRefreshTeachingBubble') === 'true';\r\n\r\n const showBubble = useMemo(\r\n () => isAccountScope && entityCount > 1 && largeSize &&\r\n layoutConfig.menu.mode === Mode.Expanded &&\r\n (!ise2etest || showForTest),\r\n [entityCount, isAccountScope, largeSize, layoutConfig.menu.mode, ise2etest, showForTest]\r\n );\r\n\r\n useEffect(() => {\r\n if (showBubble) {\r\n triggerMultiStepTeachingBubbleWithLock({\r\n ...bubbleContext,\r\n featureName: TeachingBubbleConfigs.featureName,\r\n });\r\n }\r\n }, [bubbleContext, showBubble]);\r\n\r\n return
;\r\n};\r\n\r\nBubbleRenderer.propTypes = {\r\n isAccountScope: PropTypes.bool,\r\n entityCount: PropTypes.number.isRequired,\r\n};\r\n\r\nBubbleRenderer.defaultProps = {\r\n isAccountScope: false,\r\n};\r\n\r\n","import PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport React, { useMemo, useContext, useCallback, useEffect, useState } from 'react';\r\nimport { showPausedCampaignNotifications } from '@bingads-webui-campaign/import-shared-utils';\r\nimport {\r\n ScopeBar,\r\n ScopeFilters,\r\n ScopeFiltersOverflow,\r\n ScopeSelectorDropdown,\r\n ScopeSelector,\r\n ScopeBarLeftContent,\r\n useFocusedEntityContext,\r\n} from '@bingads-webui-fluent-component/scope-selector-menu';\r\nimport { withInstrumentation } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { withScope } from '@bingads-webui-react/scope-service';\r\nimport { setCampaignTypes } from '@bingads-webui-campaign-react/with-campaign-type';\r\nimport {\r\n getCurrentScopeFromService,\r\n Scope,\r\n CampaignType,\r\n StatusWaterfallFilterOptions\r\n} from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport {\r\n withCampaignData,\r\n withCampaignFilter,\r\n useCampaignFilter,\r\n getScopeAdder,\r\n getScopeRemover,\r\n shouldRenderAdGroupFilter,\r\n CampaignFilters,\r\n AdGroupStatusFilter,\r\n CampaignTypeFilter,\r\n CampaignStatusFilter,\r\n Campaign,\r\n} from '@bingads-webui-campaign-react/scope-selector';\r\nimport { withComponentErrorLogging } from '@bingads-webui-campaign-react/global-error-options';\r\nimport {\r\n CopilotSummaryButton,\r\n getIsCopilotSummaryButtonEnabled,\r\n getIsInCampaignsOrOverviewPage,\r\n} from '@bingads-webui-campaign-react/reporting-insights-components';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { CampaignStatusMenuButton } from './campaign-status-menu-button/campaign-status-menu-button';\r\nimport { BubbleRenderer } from './teaching-bubble';\r\nimport { useCampaignScopeBarStyles } from './styles';\r\n\r\nconst CampaignScopeBar = ({ isLoading, ...rest }) => {\r\n const {\r\n scope,\r\n i18n,\r\n instrumentation,\r\n rootEntityTypeDisplayName,\r\n selectedEntity,\r\n entityList,\r\n permissions,\r\n } = rest;\r\n\r\n const styles = useCampaignScopeBarStyles();\r\n const currentScope = getCurrentScopeFromService(scope);\r\n const addScope = getScopeAdder(scope);\r\n const removeScope = getScopeRemover(scope);\r\n const { focusedEntity } = useFocusedEntityContext();\r\n\r\n const handleBackClick = useMemo(() => {\r\n if (currentScope < Scope.Campaign) {\r\n return undefined;\r\n }\r\n\r\n return removeScope;\r\n }, [currentScope, removeScope]);\r\n\r\n const { selectedCampaignTypeFilter, selectedCampaignStatusFilter, selectedAdGroupStatusFilter } = useCampaignFilter();\r\n\r\n const shouldRenderAdGroup = useMemo(\r\n () => shouldRenderAdGroupFilter(currentScope, selectedEntity, selectedCampaignTypeFilter),\r\n [currentScope, selectedEntity, selectedCampaignTypeFilter]\r\n );\r\n\r\n const isCampaignScope = useMemo(() => selectedEntity && selectedEntity.entityType === Campaign.entityType, [selectedEntity]);\r\n const isExperimentCampaign = isCampaignScope && selectedEntity.isExperiment;\r\n\r\n const reportingInsightsScenario = instrumentation.reportingInsightsScenario.create();\r\n const logger = reportingInsightsScenario.summaryButton.create();\r\n\r\n const onCopilotSummaryButtonRender = useCallback(() => {\r\n logger.trace('CopilotSummaryButton displayed in CampaignScopeBar');\r\n }, [logger]);\r\n\r\n const onCopilotSummaryButtonClick = useCallback((message) => {\r\n const isNewLogo = _.get(permissions, ['dynamic', 'AdsCopilotUxImprovements']);\r\n logger.trace(`CopilotSummaryButton clicked in CampaignScopeBar, message=${message} isNewLogo:${isNewLogo}`);\r\n }, [logger, permissions]);\r\n\r\n const serverContext = useContext(ServerContext);\r\n const [isCopilotSummaryButtonEnabled, setIsCopilotSummaryButtonEnabled] = useState();\r\n useEffect(() => {\r\n getIsCopilotSummaryButtonEnabled({ serverContext, permissions }).then(setIsCopilotSummaryButtonEnabled);\r\n }, [scope, permissions]);\r\n\r\n if (isLoading) {\r\n return null;\r\n }\r\n\r\n const scopeBarProps = {\r\n i18n,\r\n onBackClick: handleBackClick,\r\n selectedEntity,\r\n };\r\n\r\n const hasRootEntityFilter = selectedCampaignTypeFilter !== CampaignType.All || selectedCampaignStatusFilter !== StatusWaterfallFilterOptions.All;\r\n\r\n const hasSubEntityFilter = selectedAdGroupStatusFilter !== StatusWaterfallFilterOptions.All;\r\n\r\n const scopeSelectorDropdownProps = {\r\n i18n,\r\n rootEntityTypeDisplayName,\r\n selectedEntity,\r\n hasRootEntityFilter,\r\n };\r\n\r\n const scopeSelectorProps = {\r\n inMenuPopover: true,\r\n addScope,\r\n removeScope,\r\n hideSubEntitySelector: !shouldRenderAdGroup && isCampaignScope && (focusedEntity !== 'All'),\r\n hasRootEntityFilter,\r\n hasSubEntityFilter,\r\n className: 'scope-bar-scope-selector',\r\n ...rest,\r\n };\r\n\r\n // TODO: support new entity in campaign-converter.js after MT ready\r\n const { activity: pausedCampaignImportNotificationActivity } = rest.instrumentation.createScenarioAndActivity({\r\n scenarioName: 'PausedCampaignImportNotification',\r\n activityName: 'ScopeBar',\r\n });\r\n const importNotificationCallback = ({ updateStatus }) => {\r\n // show paused campaign notifications based on specific conditions\r\n showPausedCampaignNotifications({ campaignItemList: [selectedEntity], updateStatus, activity: pausedCampaignImportNotificationActivity });\r\n };\r\n\r\n const isInCampaignsOrOverviewPage = getIsInCampaignsOrOverviewPage();\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n {currentScope < Scope.Campaign && }\r\n {shouldRenderAdGroup && }\r\n \r\n \r\n }\r\n />\r\n {isCampaignScope && !isExperimentCampaign &&\r\n \r\n }\r\n {isCopilotSummaryButtonEnabled &&\r\n isInCampaignsOrOverviewPage &&\r\n }\r\n \r\n \r\n {\r\n currentScope < Scope.Campaign &&\r\n \r\n }\r\n {// filters child needs to flat for Overflow menu to keep id unique\r\n currentScope < Scope.Campaign &&\r\n \r\n }\r\n {\r\n shouldRenderAdGroup && \r\n }\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nCampaignScopeBar.propTypes = {\r\n scope: PropTypes.shape({\r\n values: PropTypes.shape({\r\n campaignId: PropTypes.string,\r\n adGroupId: PropTypes.string,\r\n }),\r\n }).isRequired,\r\n isLoading: PropTypes.bool,\r\n entityList: PropTypes.arrayOf(PropTypes.shape({\r\n id: PropTypes.string.isRequired,\r\n name: PropTypes.string.isRequired,\r\n status: PropTypes.string.isRequired,\r\n entityType: PropTypes.string.isRequired,\r\n })).isRequired,\r\n selectedEntity: PropTypes.shape({\r\n id: PropTypes.string.isRequired,\r\n name: PropTypes.string.isRequired,\r\n status: PropTypes.string.isRequired,\r\n }),\r\n rootEntityTypeDisplayName: PropTypes.string.isRequired,\r\n onSubMenuOpen: PropTypes.func,\r\n};\r\n\r\n\r\nCampaignScopeBar.defaultProps = {\r\n isLoading: false,\r\n selectedEntity: undefined,\r\n onSubMenuOpen: undefined,\r\n};\r\n\r\nconst CampaignScopeBarWithData = withComponentErrorLogging(\r\n withScope(withCampaignData(withInstrumentation(withCampaignFilter((CampaignScopeBar))), setCampaignTypes)),\r\n 'NavigationRefreshScopedBar'\r\n);\r\n\r\nexport { CampaignScopeBarWithData as CampaignScopeBar };\r\n","import _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useEffect, useMemo } from 'react';\r\nimport {\r\n withCampaignSiteMap,\r\n siteMapPropType,\r\n processorSet,\r\n} from '@bingads-webui-campaign-react/with-site-map';\r\nimport { withScope } from '@bingads-webui-react/scope-service';\r\nimport { withLayoutContext, Mode } from '@bingads-webui-react/app-layout-container';\r\nimport { isTableExpanded as getIsTableExpanded, getConfigComponents } from '@bingads-webui-campaign-react/toolbar-container';\r\nimport { CampaignScopeBar } from './campaign-scope-bar';\r\n\r\nconst isInCampaignAdGroupCreationPage = () => (\r\n window.location.href.indexOf('createcampaign') > -1 ||\r\n window.location.href.indexOf('createadgroup') > -1 ||\r\n window.location.href.indexOf('conversiongoals/create') > -1 ||\r\n window.location.href.indexOf('conversiongoals/autocreate') > -1 ||\r\n window.location.href.indexOf('conversiongoals/edit') > -1 ||\r\n window.location.href.indexOf('uettags/create') > -1 ||\r\n window.location.href.indexOf('uettags/edit') > -1 ||\r\n window.location.href.indexOf('audience/create') > -1 ||\r\n window.location.href.indexOf('audience/edit') > -1 ||\r\n window.location.href.indexOf('createassociation') > -1 ||\r\n window.location.href.indexOf('recommendations/history') > -1 ||\r\n window.location.href.indexOf('recommendations/AutoApplySettings') > -1 ||\r\n window.location.href.indexOf('reports-v4') > -1\r\n);\r\n\r\nexport const Loader = (props) => {\r\n const {\r\n siteMap, updateAvailability, changeLayout, scope, layoutConfig, ...others\r\n } = props;\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n\r\n const isTableExpanded = useMemo(\r\n () => (getIsTableExpanded(getConfigComponents(layoutConfig))),\r\n [layoutConfig]\r\n );\r\n\r\n useEffect(() => {\r\n updateAvailability(!_.isEmpty(selectedParent));\r\n });\r\n\r\n if (_.isEmpty(selectedParent) || (scope && !scope.values.aid)) {\r\n return null;\r\n }\r\n\r\n if (!isTableExpanded &&\r\n layoutConfig && layoutConfig.status.mode !== Mode.Expanded &&\r\n !isInCampaignAdGroupCreationPage(siteMap)) {\r\n changeLayout({ status: { mode: Mode.Expanded } });\r\n }\r\n\r\n return ;\r\n};\r\n\r\nLoader.propTypes = {\r\n siteMap: siteMapPropType.isRequired,\r\n updateAvailability: PropTypes.func,\r\n scope: PropTypes.shape({\r\n values: PropTypes.shape({\r\n aid: PropTypes.string,\r\n }),\r\n }).isRequired,\r\n changeLayout: PropTypes.func.isRequired,\r\n layoutConfig: PropTypes.shape({\r\n status: PropTypes.string.isRequired,\r\n scopePanel: PropTypes.string.isRequired,\r\n }).isRequired,\r\n};\r\n\r\nLoader.defaultProps = {\r\n updateAvailability: _.noop,\r\n};\r\n\r\nexport const CampaignScopeBarLoader = withLayoutContext(withScope((withCampaignSiteMap(\r\n React.memo(Loader),\r\n processorSet.all\r\n))));\r\n","import PropTypes from 'prop-types';\r\nimport React, { useMemo } from 'react';\r\nimport {\r\n getCurrentScopeFromService,\r\n Scope,\r\n CampaignType,\r\n StatusWaterfallFilterOptions\r\n} from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport {\r\n ScopeSelector,\r\n ScopeFilters,\r\n useFocusedEntityContext\r\n} from '@bingads-webui-fluent-component/scope-selector-menu';\r\nimport {\r\n withCampaignData,\r\n withCampaignFilter,\r\n useCampaignFilter,\r\n getScopeAdder,\r\n getScopeRemover,\r\n shouldRenderAdGroupFilter,\r\n CampaignFilters,\r\n AdGroupStatusFilter,\r\n Campaign,\r\n} from '@bingads-webui-campaign-react/scope-selector';\r\nimport { withScope } from '@bingads-webui-react/scope-service';\r\n\r\nconst CampaignScopePanel = (props) => {\r\n const { scope, ...rest } = props;\r\n const currentScope = getCurrentScopeFromService(scope);\r\n const { i18n, selectedEntity } = props;\r\n const { focusedEntity } = useFocusedEntityContext();\r\n const { selectedCampaignTypeFilter, selectedCampaignStatusFilter, selectedAdGroupStatusFilter } = useCampaignFilter();\r\n\r\n const hasRootEntityFilter = selectedCampaignTypeFilter !== CampaignType.All || selectedCampaignStatusFilter !== StatusWaterfallFilterOptions.All;\r\n const hasSubEntityFilter = selectedAdGroupStatusFilter !== StatusWaterfallFilterOptions.All;\r\n const shouldRenderAdGroup = useMemo(\r\n () => shouldRenderAdGroupFilter(currentScope, selectedEntity, selectedCampaignTypeFilter),\r\n [currentScope, selectedEntity, selectedCampaignTypeFilter]\r\n );\r\n const isCampaignScope = useMemo(() => selectedEntity && selectedEntity.entityType === Campaign.entityType, [selectedEntity]);\r\n const addScope = getScopeAdder(scope);\r\n const removeScope = getScopeRemover(scope);\r\n\r\n const scopeSelectorProps = {\r\n addScope,\r\n removeScope,\r\n hideSubEntitySelector: !shouldRenderAdGroup && isCampaignScope && (focusedEntity !== 'All'),\r\n hasRootEntityFilter,\r\n hasSubEntityFilter,\r\n className: 'scope-bar-scope-selector',\r\n ...rest,\r\n };\r\n\r\n return (\r\n \r\n \r\n {currentScope < Scope.Campaign && }\r\n {shouldRenderAdGroup && }\r\n \r\n \r\n );\r\n};\r\n\r\nCampaignScopePanel.propTypes = {\r\n scope: PropTypes.shape({}).isRequired,\r\n selectedEntity: PropTypes.shape({\r\n entityType: PropTypes.string,\r\n }),\r\n i18n: PropTypes.shape({}).isRequired,\r\n};\r\n\r\nCampaignScopePanel.defaultProps = {\r\n selectedEntity: undefined,\r\n};\r\n\r\nconst CampaignScopePanelWithData = withScope(withCampaignData(withCampaignFilter((CampaignScopePanel))));\r\n\r\nexport { CampaignScopePanelWithData as CampaignScopePanel };\r\n","import { makeStyles, shorthands, tokens } from '@fluentui/react-components';\r\n\r\nexport const useScopePanelStyles = makeStyles({\r\n scopePanelContainer: {\r\n width: '224px',\r\n height: '100%',\r\n ...shorthands.padding('4px'),\r\n ...shorthands.borderRight('1px', 'solid', tokens.colorNeutralStroke2),\r\n backgroundColor: tokens.colorNeutralBackground3,\r\n },\r\n});\r\n","import { get, find } from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useMemo, useContext } from 'react';\r\nimport { mergeClasses } from '@fluentui/react-components';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { withLayoutSizeContext, useLayoutSizeContext, LayoutSizeScale } from '@bingads-webui-fluent-component/layout-size';\r\nimport { isTableExpanded as getIsTableExpanded, getConfigComponents } from '@bingads-webui-campaign-react/toolbar-container';\r\nimport { withLayoutContext, Mode } from '@bingads-webui-react/app-layout-container';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n withSiteMap,\r\n processor,\r\n navRefreshSiteMap\r\n} from '@bingads-webui-campaign-react/with-site-map';\r\nimport { processorSet } from '@bingads-webui-react/with-site-map';\r\nimport { PreferenceContext } from '@bingads-webui-react/preference-context';\r\nimport { CampaignScopePanel } from './campaign-scope-panel';\r\nimport { useScopePanelStyles } from './styles';\r\n\r\nconst navRefreshProcessorSet = [\r\n processor.processImportCenterMode,\r\n processor.processMixedModeAdGroup,\r\n processor.processGlobalFilter,\r\n processor.processCampaignType,\r\n processor.processCampaignId,\r\n processor.processSmartCampaign,\r\n processor.processSmartShoppingCampaign,\r\n processor.processHotelCampaign,\r\n processor.processPmaxCampaignPageMenu,\r\n processor.processPmaxRetailCampaignPageMenu,\r\n ...processorSet.navRefresh,\r\n];\r\n\r\nconst ScopeViewOnTopKey = 'ScopeViewOnTop';\r\n\r\nconst ScopePanel = (props) => {\r\n const styles = useScopePanelStyles();\r\n const { layoutSize } = useLayoutSizeContext();\r\n const { siteMap, changeLayout, layoutConfig } = props;\r\n\r\n const { scope } = useContext(ScopeContext);\r\n const preferenceService = useContext(PreferenceContext);\r\n const scopeViewOnTopPreference = preferenceService.findByNameAtUserLevel(ScopeViewOnTopKey);\r\n const isScopeViewOnTop = get(scopeViewOnTopPreference, 'Data', true);\r\n\r\n const campaignsRouteSelected = useMemo(() => {\r\n const selectedSiteMap = find(siteMap, item => !!item.selected);\r\n return get(selectedSiteMap, 'id', '') === 'advertise';\r\n }, [siteMap]);\r\n\r\n const isTableExpanded = useMemo(\r\n () => (getIsTableExpanded(getConfigComponents(layoutConfig))),\r\n [layoutConfig]\r\n );\r\n\r\n if (LayoutSizeScale[layoutSize] < LayoutSizeScale.XL || !campaignsRouteSelected || isScopeViewOnTop ||\r\n !get(scope, ['values', 'aid'])) {\r\n changeLayout({ scopePanel: { mode: Mode.Hidden } });\r\n return null;\r\n }\r\n\r\n if (!isTableExpanded && layoutConfig && layoutConfig.scopePanel.mode !== Mode.Expanded) {\r\n changeLayout({ scopePanel: { mode: Mode.Expanded } });\r\n }\r\n\r\n if (layoutConfig.scopePanel.mode !== Mode.Expanded) {\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nScopePanel.propTypes = {\r\n siteMap: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n changeLayout: PropTypes.func.isRequired,\r\n layoutConfig: PropTypes.shape({\r\n scopePanel: PropTypes.shape({\r\n mode: PropTypes.string,\r\n }),\r\n }).isRequired,\r\n};\r\n\r\nconst ScopePanelWithResizeContext = withLayoutContext(withLayoutSizeContext(withI18nConsumer(withSiteMap(ScopePanel, navRefreshProcessorSet, navRefreshSiteMap))));\r\n\r\nexport { ScopePanelWithResizeContext as ScopePanel };\r\n","import {\r\n CampaignType\r\n} from '@bingads-webui-campaign-react/shell-ui-common';\r\n\r\nexport const AdGroup = {\r\n name: _TL_('Ad group'),\r\n nameLowerCasePlural: _TL_('ad groups'),\r\n entityType: 'AdGroup',\r\n campaignTypes: [CampaignType.Default, CampaignType.Shopping, CampaignType.Audience,\r\n CampaignType.DynamicSearchAds, CampaignType.Smart, CampaignType.Hotel],\r\n};\r\n\r\nexport const Campaign = {\r\n name: _TL_('Campaign'),\r\n nameLowerCasePlural: _TL_('campaigns'),\r\n entityType: 'Campaign',\r\n};\r\n","import _ from 'underscore';\r\nimport React, { useMemo, useRef, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { CampaignOData } from '@bingads-webui-react/campaign-odata';\r\nimport { withInstrumentation } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { getCampaignOdataConfig } from '@bingads-webui-campaign-react/campaign-entity-search';\r\nimport { notificationApi } from '@bingads-webui-campaign/notification-center';\r\nimport {\r\n convertToCampaign,\r\n convertToAdGroup,\r\n shellTips,\r\n Scope,\r\n getCurrentScopeFromService,\r\n CampaignType,\r\n} from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport {\r\n withFocusedEntityContext,\r\n useFocusedEntityContext,\r\n} from '@bingads-webui-fluent-component/scope-selector-menu';\r\nimport { Campaign, AdGroup } from './config';\r\n\r\nconst MAXIMUM_AD_GROUP_COUNT_UNDER_ACCOUNT = 20000;\r\n\r\nconst withCampaignData = (Component, setCampaignTypes = _.noop) => {\r\n const HOC = (props) => {\r\n const {\r\n i18n,\r\n scope,\r\n instrumentation,\r\n } = props;\r\n\r\n const previousEntityListProps = useRef({});\r\n const previousSelectedEntity = useRef(null);\r\n const { focusedEntity, setFocusedEntity } = useFocusedEntityContext();\r\n\r\n const currentScope = getCurrentScopeFromService(scope);\r\n const {\r\n campaignId: selectedCampaignId,\r\n adGroupId: selectedAdGroupId,\r\n } = scope.values;\r\n\r\n const hasSelectedEntityChanged = useMemo(() => {\r\n const prevSelectedEntity = previousSelectedEntity.current;\r\n const prevSelectedEntityId = prevSelectedEntity && prevSelectedEntity.id;\r\n const prevSelectedEntityType = prevSelectedEntity && prevSelectedEntity.entityType;\r\n\r\n if (selectedAdGroupId) {\r\n return prevSelectedEntityType !== AdGroup.entityType || prevSelectedEntityId !== selectedAdGroupId;\r\n }\r\n\r\n if (selectedCampaignId) {\r\n return prevSelectedEntityType !== Campaign.entityType || prevSelectedEntityId !== selectedCampaignId;\r\n }\r\n\r\n return previousSelectedEntity.current !== null;\r\n }, [selectedCampaignId, selectedAdGroupId, previousSelectedEntity.current]);\r\n\r\n if (hasSelectedEntityChanged) {\r\n setFocusedEntity(null);\r\n }\r\n\r\n const rootEntityTypeDisplayName = useMemo(() => i18n.getString(Campaign.nameLowerCasePlural), [i18n]);\r\n const adgoupsDisplayText = useMemo(() => i18n.getString(AdGroup.nameLowerCasePlural), [i18n]);\r\n\r\n const commonComponentProps = {\r\n rootEntityTypeDisplayName,\r\n };\r\n\r\n const campaignsLoadFallback = (\r\n \r\n );\r\n\r\n const { activity } = instrumentation.createScenarioAndActivity({\r\n scenarioName: 'LoadCampaignData',\r\n activityName: 'LoadCampaignData',\r\n });\r\n\r\n const removeId = useCallback((id) => {\r\n scope.remove(id);\r\n scope.save();\r\n }, [scope]);\r\n\r\n return (\r\n currentAccount.Campaigns.get(getCampaignOdataConfig())}\r\n escapeHatch={({ currentAccount }) => (currentAccount ? undefined : { value: [] })}\r\n fallback={campaignsLoadFallback}\r\n onError={() => {\r\n notificationApi.showWarning(i18n.getString(shellTips.shellDataError));\r\n return campaignsLoadFallback;\r\n }}\r\n >\r\n {\r\n (campaignLoadResult) => {\r\n setCampaignTypes(_.get(campaignLoadResult, 'value', []));\r\n\r\n const existingCampaignTypes = new Set([CampaignType.All]);\r\n const campaigns = campaignLoadResult.value.map((campaignInOdata) => {\r\n const campaign = convertToCampaign(campaignInOdata);\r\n campaign.entityTypeDisplayName = rootEntityTypeDisplayName;\r\n existingCampaignTypes.add(campaign.campaignType);\r\n\r\n // exclude performance max and smart campaigns from lazy loading sub entity\r\n if (campaign.campaignType !== CampaignType.PerformanceMax && campaign.campaignType !== CampaignType.Smart) {\r\n campaign.subEntityTypeDisplayName = adgoupsDisplayText;\r\n }\r\n return campaign;\r\n });\r\n\r\n const adGroupLoadFallback = (\r\n \r\n );\r\n const adGroupCampaignId = focusedEntity && focusedEntity.entityType === Campaign.entityType\r\n ? focusedEntity.id\r\n : selectedCampaignId;\r\n\r\n return (\r\n (\r\n currentAccount.Campaigns.$withKey(adGroupCampaignId).AdGroups.get({\r\n top: MAXIMUM_AD_GROUP_COUNT_UNDER_ACCOUNT,\r\n select: ['Id', 'Name', 'Status'],\r\n orderby: { Name: 1 },\r\n })\r\n )\r\n }\r\n escapeHatch={({ currentAccount }) => (\r\n currentAccount && adGroupCampaignId ?\r\n undefined : { value: [] }\r\n )}\r\n fallback={adGroupLoadFallback}\r\n onError={() => {\r\n notificationApi.showWarning(i18n.getString(shellTips.shellDataError));\r\n return adGroupLoadFallback;\r\n }}\r\n >\r\n {\r\n (adGroupLoadResult) => {\r\n const adGroups = adGroupLoadResult.value.map((adGroupInOdata) => {\r\n const adGroup = convertToAdGroup({ ...adGroupInOdata, Campaign: { Id: adGroupCampaignId } });\r\n adGroup.entityTypeDisplayName = adgoupsDisplayText;\r\n\r\n return adGroup;\r\n });\r\n\r\n let selectedEntity = null;\r\n const entityListProps = (currentScope >= Scope.Campaign ||\r\n (focusedEntity && focusedEntity.entityType === Campaign.entityType)) &&\r\n !(focusedEntity && focusedEntity === 'All')\r\n ? {\r\n entityList: adGroups,\r\n entityListType: AdGroup.entityType,\r\n entityTypeDisplayName: adgoupsDisplayText,\r\n }\r\n : {\r\n entityList: campaigns,\r\n entityListType: Campaign.entityType,\r\n entityTypeDisplayName: rootEntityTypeDisplayName,\r\n };\r\n\r\n previousEntityListProps.current = entityListProps;\r\n\r\n if (currentScope === Scope.Campaign && hasSelectedEntityChanged) {\r\n selectedEntity = campaigns.find(campaign => campaign.id === selectedCampaignId);\r\n\r\n if (!selectedEntity) {\r\n activity.trace(`previousSelectedEntity: ${JSON.stringify(previousSelectedEntity.current)}, scope: ${currentScope}, campaign id ${selectedCampaignId} not found in the list of campaigns: ${JSON.stringify(campaigns)}`);\r\n removeId('campaignId');\r\n } else {\r\n selectedEntity.subEntityTypeDisplayName = adgoupsDisplayText;\r\n }\r\n }\r\n\r\n if (currentScope === Scope.AdGroup && hasSelectedEntityChanged) {\r\n selectedEntity = adGroups.find(adgroup => adgroup.id === selectedAdGroupId);\r\n const parentCampaign = campaigns.find(campaign => campaign.id === selectedCampaignId);\r\n\r\n if (!parentCampaign) {\r\n activity.trace(`previousSelectedEntity: ${JSON.stringify(previousSelectedEntity.current)}, scope: ${currentScope}, campaign id ${selectedCampaignId} not found in the list of campaigns: ${JSON.stringify(campaigns)}`);\r\n removeId('campaignId');\r\n } else {\r\n parentCampaign.subEntityTypeDisplayName = adgoupsDisplayText;\r\n }\r\n\r\n if (!selectedEntity) {\r\n activity.trace(`previousSelectedEntity: ${JSON.stringify(previousSelectedEntity.current)}, scope: ${currentScope}, adgroup id ${selectedAdGroupId} not found in the list of adgroups: ${JSON.stringify(adGroups)}`);\r\n removeId('adGroupId');\r\n } else {\r\n selectedEntity.parentEntity = parentCampaign;\r\n }\r\n }\r\n\r\n if (hasSelectedEntityChanged) {\r\n previousSelectedEntity.current = selectedEntity;\r\n } else {\r\n selectedEntity = previousSelectedEntity.current;\r\n }\r\n\r\n return (\r\n \r\n );\r\n }\r\n }\r\n \r\n );\r\n }\r\n }\r\n \r\n );\r\n };\r\n\r\n HOC.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n scope: PropTypes.shape({\r\n values: PropTypes.shape({\r\n campaignId: PropTypes.string,\r\n adGroupId: PropTypes.string,\r\n }),\r\n }).isRequired,\r\n instrumentation: PropTypes.shape({\r\n createScenarioAndActivity: PropTypes.func.isRequired,\r\n }).isRequired,\r\n };\r\n\r\n HOC.displayName = `withCampaignData(${Component.displayName || Component.name})`;\r\n\r\n return withFocusedEntityContext(withInstrumentation(HOC));\r\n};\r\n\r\nexport { withCampaignData };\r\n","import { CampaignType } from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport { AdGroup, Campaign } from '../config';\r\n\r\nexport const EntityScopeProperty = {\r\n Campaign: 'campaignId',\r\n AdGroup: 'adGroupId',\r\n Assets: 'assetId',\r\n};\r\n\r\nexport const addScope = (entity, scope) => {\r\n const scopeProperty = EntityScopeProperty[entity.entityType];\r\n\r\n if (scopeProperty) {\r\n scope.append({ [scopeProperty]: entity.id });\r\n\r\n if (entity.entityType === Campaign.entityType) {\r\n scope.remove(EntityScopeProperty.AdGroup);\r\n scope.remove(EntityScopeProperty.Assets);\r\n }\r\n\r\n if (entity.entityType === AdGroup.entityType) {\r\n const campaignId = entity.parentId;\r\n if (campaignId) {\r\n scope.append({ [EntityScopeProperty.Campaign]: campaignId });\r\n }\r\n }\r\n\r\n scope.save();\r\n }\r\n};\r\n\r\nexport function getSmartPath(scope) {\r\n const { uid, cid, aid } = scope.values;\r\n return `/campaign/smart?uid=${uid}&cid=${cid}&aid=${aid}`;\r\n}\r\n\r\nexport function getSmartCampaignUrl(node, scope) {\r\n const path = getSmartPath(scope);\r\n return node.rawStatus === 'InProgress' ?\r\n `${path}#/CreateCampaign/${node.id}` :\r\n `${path}#/campaign/${node.id}`;\r\n}\r\n\r\nexport const getScopeAdder = scope => (entity) => {\r\n if (entity.campaignType === CampaignType.Smart) {\r\n window.location.href = getSmartCampaignUrl(entity, scope);\r\n return;\r\n }\r\n addScope(entity, scope);\r\n};\r\n\r\nexport const removeScope = (entity, scope) => {\r\n if (!entity) {\r\n scope.remove(EntityScopeProperty.Campaign);\r\n scope.remove(EntityScopeProperty.AdGroup);\r\n scope.remove(EntityScopeProperty.Assets);\r\n\r\n scope.save();\r\n return;\r\n }\r\n\r\n const scopeProperty = EntityScopeProperty[entity.entityType];\r\n\r\n if (scopeProperty) {\r\n scope.remove(scopeProperty);\r\n\r\n scope.save();\r\n }\r\n};\r\n\r\nexport const getScopeRemover = scope => (entity) => {\r\n removeScope(entity, scope);\r\n};\r\n","import hoistNonReactStatics from 'hoist-non-react-statics';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useContext } from 'react';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { withGlobalFilter } from '@bingads-webui-campaign-react/global-filter-context';\r\nimport { WaterfallFilterType } from '@bingads-webui-campaign/filter-storage';\r\nimport {\r\n getFilteredCampaignTypeFromRawFilter,\r\n getFilteredCampaignStatusFromRawFilter,\r\n getFilteredAdGroupStatusFromRawFilter,\r\n convertFilteredCampaignTypeToFilter,\r\n CampaignType,\r\n StatusWaterfallFilterOptions\r\n} from '@bingads-webui-campaign-react/shell-ui-common';\r\n\r\nimport { getSmartPath } from './helper/scope-helper';\r\n\r\nexport const CampaignFilterContext = React.createContext();\r\n\r\nexport const useCampaignFilter = () => React.useContext(CampaignFilterContext);\r\n\r\nexport const withCampaignFilter = (Component) => {\r\n const HOC = (props) => {\r\n const {\r\n entityList, entityListType, updateWaterfallFilter, existingCampaignTypes, ...rest\r\n } = props;\r\n const { scope } = useContext(ScopeContext);\r\n const selectedCampaignTypeFilter = getFilteredCampaignTypeFromRawFilter(props[WaterfallFilterType.CampaignType]);\r\n const selectedCampaignStatusFilter = getFilteredCampaignStatusFromRawFilter(props[WaterfallFilterType.CampaignStatus]);\r\n const selectedAdGroupStatusFilter = getFilteredAdGroupStatusFromRawFilter(props[WaterfallFilterType.AdGroupStatus]);\r\n\r\n const filterCampaigns = campaigns => campaigns.filter(campaign =>\r\n (selectedCampaignTypeFilter === CampaignType.All || selectedCampaignTypeFilter === campaign.campaignType) &&\r\n (selectedCampaignStatusFilter === StatusWaterfallFilterOptions.All || campaign.status === 'Active') &&\r\n campaign.rawStatus !== 'InProgress');\r\n\r\n const filterAdsGroups = adGroups => adGroups.filter(adGroup =>\r\n selectedAdGroupStatusFilter === StatusWaterfallFilterOptions.All || adGroup.status === 'Active');\r\n\r\n let filteredEntityList;\r\n\r\n switch (entityListType) {\r\n case 'Campaign':\r\n filteredEntityList = filterCampaigns(entityList);\r\n filteredEntityList = filteredEntityList.map(campaign => ({\r\n ...campaign,\r\n subEntityList: campaign.subEntityList\r\n ? filterAdsGroups(campaign.subEntityList)\r\n : campaign.subEntityList,\r\n }));\r\n break;\r\n case 'AdGroup':\r\n filteredEntityList = filterAdsGroups(entityList);\r\n break;\r\n default:\r\n filteredEntityList = entityList;\r\n }\r\n\r\n const updateCampaignTypeFilter = (campaignType) => {\r\n if (!existingCampaignTypes.has(campaignType)) {\r\n updateWaterfallFilter({\r\n filterType: WaterfallFilterType.CampaignType,\r\n filter: convertFilteredCampaignTypeToFilter(CampaignType.All),\r\n });\r\n return;\r\n }\r\n\r\n if (campaignType === CampaignType.Smart) {\r\n window.location.href = getSmartPath(scope);\r\n return;\r\n }\r\n\r\n updateWaterfallFilter({\r\n filterType: WaterfallFilterType.CampaignType,\r\n filter: convertFilteredCampaignTypeToFilter(campaignType),\r\n });\r\n };\r\n\r\n const updateCampaignStatusFilter = (campaignStatusFilter) => {\r\n updateWaterfallFilter({\r\n filterType: WaterfallFilterType.CampaignStatus,\r\n filter: campaignStatusFilter,\r\n });\r\n };\r\n\r\n const updateAdGroupStatusFilter = (adGroupStatusFilter) => {\r\n updateWaterfallFilter({\r\n filterType: WaterfallFilterType.AdGroupStatus,\r\n filter: adGroupStatusFilter,\r\n });\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n };\r\n\r\n HOC.propTypes = {\r\n entityList: PropTypes.arrayOf(PropTypes.shape({\r\n id: PropTypes.string.isRequired,\r\n name: PropTypes.string.isRequired,\r\n status: PropTypes.string.isRequired,\r\n entityType: PropTypes.string.isRequired,\r\n })).isRequired,\r\n entityListType: PropTypes.string,\r\n updateWaterfallFilter: PropTypes.func.isRequired,\r\n existingCampaignTypes: PropTypes.instanceOf(Set),\r\n };\r\n\r\n HOC.defaultProps = {\r\n entityListType: undefined,\r\n existingCampaignTypes: new Set(),\r\n };\r\n\r\n HOC.displayName = `withCampaignFilter(${Component.displayName || Component.name})`;\r\n\r\n return withGlobalFilter(hoistNonReactStatics(HOC, Component));\r\n};\r\n","import React from 'react';\r\n\r\nexport const LinkedInRegular = () => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n","import { get, filter } from 'underscore';\r\nimport React from 'react';\r\nimport {\r\n AppsRegular,\r\n ArrowTrendingSparkleRegular,\r\n LuggageRegular,\r\n PeopleAudienceRegular,\r\n ShoppingBagRegular,\r\n SlideMultipleSearchRegular,\r\n StoreMicrosoftRegular,\r\n TextboxSettingsRegular,\r\n} from '@fluentui/react-icons';\r\nimport { CampaignType, StatusWaterfallFilterOptions } from '@bingads-webui-campaign-react/shell-ui-common';\r\n\r\nimport { LinkedInRegular } from '../media/linkedin-icon';\r\n\r\nexport const getCampaignTypeFilterOptions = ({ i18n, permissions, existingCampaignTypes }) => {\r\n const IsRenameHotelToLodgingEnabled = get(permissions, ['dynamic', 'IsRenameHotelToLodgingEnabled']);\r\n const isAppAdsCampaignEnabled = permissions && permissions.dynamic && permissions.dynamic.AppAdsCampaignPhaseOne;\r\n const isLinkedInEnabled = permissions && permissions.dynamic && permissions.dynamic.LinkedInCampaigns;\r\n const isUnifiedAppCampaignEnabled = permissions && permissions.dynamic && permissions.dynamic.UnifiedAppAds;\r\n\r\n const menuItems = [\r\n {\r\n key: CampaignType.All,\r\n icon: ,\r\n description: i18n.getString(_TL_('All Types')),\r\n name: i18n.getString(_TL_('All campaigns')),\r\n defaultChecked: true,\r\n id: 'campaign-type-All',\r\n },\r\n {\r\n key: CampaignType.Default,\r\n icon: ,\r\n description: i18n.getString(_TL_('Search')),\r\n name: i18n.getString(_TL_('Search campaigns')),\r\n id: 'campaign-type-Search',\r\n },\r\n {\r\n key: CampaignType.Audience,\r\n icon: ,\r\n description: i18n.getString(_TL_('Audience')),\r\n name: i18n.getString(_TL_('Audience campaigns')),\r\n id: 'campaign-type-Audience',\r\n },\r\n {\r\n key: CampaignType.Shopping,\r\n icon: ,\r\n description: i18n.getString(_TL_('Shopping')),\r\n name: i18n.getString(_TL_('Shopping campaigns')),\r\n id: 'campaign-type-Shopping',\r\n },\r\n {\r\n key: CampaignType.Smart,\r\n icon: ,\r\n description: _TL_('Smart'),\r\n name: _TL_('Smart campaigns'),\r\n id: 'campaign-type-Smart',\r\n },\r\n {\r\n key: CampaignType.Hotel,\r\n icon: ,\r\n description: IsRenameHotelToLodgingEnabled ? i18n.getString(_TL_('Lodging')) : i18n.getString(_TL_('Hotel')),\r\n name: IsRenameHotelToLodgingEnabled ? i18n.getString(_TL_('Lodging campaigns')) : i18n.getString(_TL_('Hotel campaigns')),\r\n id: 'campaign-type-Lodging',\r\n },\r\n {\r\n key: CampaignType.PerformanceMax,\r\n icon: ,\r\n description: i18n.getString(_TL_('Performance Max')),\r\n name: i18n.getString(_TL_('Performance Max campaigns')),\r\n id: 'campaign-type-PerformanceMax',\r\n },\r\n ...((isAppAdsCampaignEnabled || isUnifiedAppCampaignEnabled) ? [{\r\n key: CampaignType.App,\r\n icon: ,\r\n description: i18n.getString(_TL_('App')),\r\n name: i18n.getString(_TL_('App campaigns')),\r\n }] : []),\r\n ...(isLinkedInEnabled ? [{\r\n key: CampaignType.LinkedIn,\r\n icon: ,\r\n description: i18n.getString(_TL_('LinkedIn')),\r\n name: i18n.getString(_TL_('LinkedIn campaigns')),\r\n id: 'campaign-type-LinkedIn',\r\n }] : []),\r\n ];\r\n\r\n return {\r\n key: 'campaign-type',\r\n name: i18n.getString(_TL_('Campaign type')),\r\n menuItems: filter(menuItems, item => existingCampaignTypes.has(item.key)),\r\n };\r\n};\r\n\r\n\r\nexport const getCampaignStatusFilterOptions = i18n => ({\r\n key: 'campaign-status',\r\n name: i18n.getString(_TL_('Campaign status')),\r\n menuItems: [\r\n {\r\n key: StatusWaterfallFilterOptions.All,\r\n description: i18n.getString(_TL_('Enabled, Paused')),\r\n name: i18n.getString(_TL_('All')),\r\n defaultChecked: true,\r\n id: 'campaign-status-all',\r\n },\r\n {\r\n key: StatusWaterfallFilterOptions.AllEnabled,\r\n description: i18n.getString(_TL_('Enabled')),\r\n name: i18n.getString(_TL_('All enabled')),\r\n id: 'campaign-status-all-enabled',\r\n },\r\n ],\r\n});\r\n\r\nexport const getAdGroupStatusFilterOptions = i18n => ({\r\n key: 'adgroup-status',\r\n name: i18n.getString(_TL_('Ad Group Status')),\r\n menuItems: [\r\n {\r\n key: StatusWaterfallFilterOptions.All,\r\n description: i18n.getString(_TL_('Enabled, Paused')),\r\n name: i18n.getString(_TL_('All')),\r\n defaultChecked: true,\r\n id: 'adgroup-status-all',\r\n },\r\n {\r\n key: StatusWaterfallFilterOptions.AllEnabled,\r\n description: i18n.getString(_TL_('Enabled')),\r\n name: i18n.getString(_TL_('All enabled')),\r\n id: 'adgroup-status-all-enabled',\r\n },\r\n ],\r\n});\r\n\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { ScopeFilterMenu } from '@bingads-webui-fluent-component/scope-selector-menu';\r\nimport {\r\n convertFilteredAdGroupStatusToFilter,\r\n StatusWaterfallFilterOptions,\r\n} from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport { getAdGroupStatusFilterOptions } from './filter-options';\r\nimport { useCampaignFilter } from './../with-campaign-filter';\r\n\r\nexport const AdGroupStatusFilter = (props) => {\r\n const {\r\n i18n,\r\n inPopover,\r\n } = props;\r\n\r\n const adGroupStatusFilterMenuOptions = getAdGroupStatusFilterOptions(i18n);\r\n const menuItemsGroupList = [\r\n adGroupStatusFilterMenuOptions,\r\n ];\r\n\r\n const { selectedAdGroupStatusFilter, updateAdGroupStatusFilter } = useCampaignFilter();\r\n\r\n const selectedValues = {\r\n [adGroupStatusFilterMenuOptions.key]: [selectedAdGroupStatusFilter],\r\n };\r\n\r\n const onAdGroupStatusChange = (item) => {\r\n const adGroupStatusFilterValues = item[adGroupStatusFilterMenuOptions.key];\r\n const adGroupStatusFilterValue = adGroupStatusFilterValues && adGroupStatusFilterValues.length > 0\r\n ? adGroupStatusFilterValues[0]\r\n : StatusWaterfallFilterOptions.All;\r\n const filter = convertFilteredAdGroupStatusToFilter(adGroupStatusFilterValue);\r\n\r\n updateAdGroupStatusFilter(filter);\r\n };\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nAdGroupStatusFilter.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n inPopover: PropTypes.bool,\r\n};\r\n\r\nAdGroupStatusFilter.defaultProps = {\r\n inPopover: false,\r\n};\r\n\r\n","import React, { useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { ScopeFilterMenu } from '@bingads-webui-fluent-component/scope-selector-menu';\r\nimport {\r\n convertFilteredCampaignStatusToFilter,\r\n StatusWaterfallFilterOptions,\r\n} from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport { getCampaignStatusFilterOptions } from './filter-options';\r\nimport { useCampaignFilter } from '../with-campaign-filter';\r\n\r\nexport const CampaignStatusFilter = (props) => {\r\n const {\r\n i18n,\r\n inPopover,\r\n } = props;\r\n\r\n const campaignStatusFilterMenuOptions = getCampaignStatusFilterOptions(i18n);\r\n\r\n const menuItemsGroupList = [\r\n campaignStatusFilterMenuOptions,\r\n ];\r\n\r\n const { selectedCampaignStatusFilter, updateCampaignStatusFilter } = useCampaignFilter();\r\n\r\n const selectedValues = {\r\n [campaignStatusFilterMenuOptions.key]: [selectedCampaignStatusFilter],\r\n };\r\n\r\n const onCampaignStatusChange = useCallback((item) => {\r\n const campaignStatusFilterValues = item[campaignStatusFilterMenuOptions.key];\r\n const campaignStatusFilterValue = campaignStatusFilterValues && campaignStatusFilterValues.length > 0\r\n ? campaignStatusFilterValues[0]\r\n : StatusWaterfallFilterOptions.All;\r\n\r\n const filter = convertFilteredCampaignStatusToFilter(campaignStatusFilterValue);\r\n\r\n updateCampaignStatusFilter(filter);\r\n }, [campaignStatusFilterMenuOptions, updateCampaignStatusFilter]);\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nCampaignStatusFilter.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n inPopover: PropTypes.bool,\r\n};\r\n\r\nCampaignStatusFilter.defaultProps = {\r\n inPopover: false,\r\n};\r\n","import React, { useContext, useEffect, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { ScopeFilterMenu } from '@bingads-webui-fluent-component/scope-selector-menu';\r\nimport {\r\n CampaignType\r\n} from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport { withHotKeys, ShortcutType } from '@bingads-webui-react/hot-keys';\r\nimport { usePrevious } from '@bingads-webui-react/primitive-hooks';\r\nimport { PermissionsContext } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { getCampaignTypeFilterOptions } from './filter-options';\r\nimport { useCampaignFilter } from '../with-campaign-filter';\r\n\r\nconst CampaignTypeFilter = (props) => {\r\n const {\r\n i18n,\r\n inPopover,\r\n hotKey,\r\n count,\r\n } = props;\r\n\r\n const permissions = useContext(PermissionsContext);\r\n const previousCount = usePrevious(count);\r\n const {\r\n selectedCampaignTypeFilter,\r\n updateCampaignTypeFilter,\r\n existingCampaignTypes,\r\n } = useCampaignFilter();\r\n\r\n const campaignTypeFilterMenuOptions = getCampaignTypeFilterOptions({ i18n, permissions, existingCampaignTypes });\r\n\r\n const menuItemsGroupList = [\r\n campaignTypeFilterMenuOptions,\r\n ];\r\n\r\n\r\n const selectedValues = {\r\n [campaignTypeFilterMenuOptions.key]: [selectedCampaignTypeFilter],\r\n };\r\n\r\n useEffect(() => {\r\n if (!existingCampaignTypes.has(selectedCampaignTypeFilter)) {\r\n updateCampaignTypeFilter(CampaignType.All);\r\n }\r\n }, [existingCampaignTypes, selectedCampaignTypeFilter, updateCampaignTypeFilter]);\r\n\r\n const onCampaignTypeChange = useCallback((item) => {\r\n const campaignTypeFilterValues = item[campaignTypeFilterMenuOptions.key];\r\n const campaignTypeFilterValue = campaignTypeFilterValues && campaignTypeFilterValues.length > 0 ?\r\n campaignTypeFilterValues[0] : CampaignType.All;\r\n\r\n updateCampaignTypeFilter(campaignTypeFilterValue);\r\n }, [campaignTypeFilterMenuOptions.key, updateCampaignTypeFilter]);\r\n\r\n useEffect(() => {\r\n if (previousCount !== count) {\r\n if (hotKey === 'shift+a') {\r\n updateCampaignTypeFilter(CampaignType.All);\r\n } else if (hotKey === 'shift+s') {\r\n updateCampaignTypeFilter(CampaignType.Default);\r\n } else if (hotKey === 'shift+p') {\r\n updateCampaignTypeFilter(CampaignType.Shopping);\r\n } else if (hotKey === 'shift+d') {\r\n updateCampaignTypeFilter(CampaignType.Audience);\r\n } else if (hotKey === 'shift+l') {\r\n updateCampaignTypeFilter(CampaignType.Hotel);\r\n } else if (hotKey === 'shift+t') {\r\n updateCampaignTypeFilter(CampaignType.Smart);\r\n }\r\n }\r\n }, [count, existingCampaignTypes, hotKey, onCampaignTypeChange, previousCount, updateCampaignTypeFilter]);\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nCampaignTypeFilter.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n inPopover: PropTypes.bool,\r\n hotKey: PropTypes.string.isRequired,\r\n count: PropTypes.number.isRequired,\r\n};\r\n\r\nCampaignTypeFilter.defaultProps = {\r\n inPopover: false,\r\n};\r\n\r\n\r\nconst CampaignFiltersWithHotKeys = withHotKeys(CampaignTypeFilter, ShortcutType.CampaignTypes);\r\n\r\nexport { CampaignFiltersWithHotKeys as CampaignTypeFilter };\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { ScopeFilterMenu } from '@bingads-webui-fluent-component/scope-selector-menu';\r\nimport {\r\n CampaignType,\r\n convertFilteredCampaignStatusToFilter,\r\n StatusWaterfallFilterOptions,\r\n} from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport { PermissionsContext } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { getCampaignTypeFilterOptions, getCampaignStatusFilterOptions } from './filter-options';\r\nimport { useCampaignFilter } from '../with-campaign-filter';\r\n\r\nexport const CampaignFilters = (props) => {\r\n const {\r\n i18n,\r\n inPopover,\r\n } = props;\r\n\r\n const permissions = useContext(PermissionsContext);\r\n const {\r\n selectedCampaignTypeFilter,\r\n selectedCampaignStatusFilter,\r\n updateCampaignTypeFilter,\r\n updateCampaignStatusFilter,\r\n existingCampaignTypes,\r\n } = useCampaignFilter();\r\n const campaignTypeFilterMenuOptions = getCampaignTypeFilterOptions({ i18n, permissions, existingCampaignTypes });\r\n const campaignStatusFilterMenuOptions = getCampaignStatusFilterOptions(i18n);\r\n\r\n const menuItemsGroupList = [\r\n campaignTypeFilterMenuOptions,\r\n campaignStatusFilterMenuOptions,\r\n ];\r\n\r\n\r\n const selectedValues = {\r\n [campaignTypeFilterMenuOptions.key]: [selectedCampaignTypeFilter],\r\n [campaignStatusFilterMenuOptions.key]: [selectedCampaignStatusFilter],\r\n };\r\n\r\n const onCampaignStatusChange = (item) => {\r\n const campaignTypeFilterValues = item[campaignTypeFilterMenuOptions.key];\r\n const campaignTypeFilterValue = campaignTypeFilterValues && campaignTypeFilterValues.length > 0 ?\r\n campaignTypeFilterValues[0] : CampaignType.All;\r\n\r\n const campaignStatusFilterValues = item[campaignStatusFilterMenuOptions.key];\r\n const campaignStatusFilterValue = campaignStatusFilterValues && campaignStatusFilterValues.length > 0\r\n ? campaignStatusFilterValues[0]\r\n : StatusWaterfallFilterOptions.All;\r\n\r\n updateCampaignTypeFilter(campaignTypeFilterValue);\r\n updateCampaignStatusFilter(convertFilteredCampaignStatusToFilter(campaignStatusFilterValue));\r\n };\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nCampaignFilters.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n inPopover: PropTypes.bool,\r\n};\r\n\r\nCampaignFilters.defaultProps = {\r\n inPopover: true,\r\n};\r\n","import { Scope, CampaignType } from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport { AdGroup, Campaign } from '../config';\r\n\r\nexport const shouldRenderAdGroupFilter = (currentScope, selectedEntity, selectedCampaignTypeFilter) => {\r\n const entity = selectedEntity && selectedEntity.entityType === AdGroup.entityType\r\n ? selectedEntity.parentEntity\r\n : selectedEntity;\r\n\r\n const selectedCampaignType = entity && entity.entityType === Campaign.entityType\r\n ? [entity.campaignType]\r\n : [];\r\n\r\n const filteredCampaignType = selectedCampaignTypeFilter && selectedCampaignTypeFilter !== CampaignType.All\r\n ? [selectedCampaignTypeFilter]\r\n : [];\r\n\r\n const campaignTypesInScope = [...selectedCampaignType, ...filteredCampaignType];\r\n const isMappedToAdGroup = campaignType => AdGroup.campaignTypes.includes(campaignType);\r\n\r\n if (!campaignTypesInScope.every(isMappedToAdGroup)) {\r\n return false;\r\n }\r\n\r\n return currentScope <= Scope.AdGroup;\r\n};\r\n","\r\nexport const largeSize = 1366;\r\n\r\nexport const COPILOT_WIDTH = 320;\r\n\r\nexport const sizes = [\r\n {\r\n name: 'small',\r\n minWidth: 0,\r\n },\r\n {\r\n name: 'large',\r\n minWidth: largeSize,\r\n },\r\n];\r\n\r\nexport const CAMPAIGN_MAIN_MENU_MODE = 'WebApp.CampaignUI.New.ManiMenuMode';\r\nexport const MERCHANT_MAIN_MENU_MODE = 'WebApp.CampaignUI.New.MerchantCenterManiMenuMode';\r\n","import React from 'react';\r\nimport Media from 'react-media';\r\nimport PropTypes from 'prop-types';\r\nimport { result } from 'underscore';\r\nimport { MainMenuPlaceholder } from '@bingads-webui-react/ui-next-placeholder';\r\nimport { withPreference } from '@bingads-webui-react/preference-context';\r\nimport { Mode } from '@bingads-webui-react/app-layout-container';\r\nimport { CAMPAIGN_MAIN_MENU_MODE, largeSize as minWidth } from './enums/constants';\r\n\r\nclass PlaceholderWrapper extends React.PureComponent {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n isViewportSizeLarge: true,\r\n preferencedMainMenuMode: result(props.preferenceService.findByNameAtUserLevel(props.modePreferenceName), 'Data', null),\r\n };\r\n\r\n if (props.changeLayout) {\r\n props.changeLayout({\r\n nav: {\r\n mode: this.state.preferencedMainMenuMode || Mode.Collapsed,\r\n },\r\n });\r\n }\r\n\r\n this.handleMediaChange = this.handleMediaChange.bind(this);\r\n }\r\n\r\n componentDidUpdate(prevProps, prevState) {\r\n if (!this.props.changeLayout || this.props.mode === Mode.Hidden) {\r\n return;\r\n }\r\n\r\n // resize window from large size to small size\r\n if (prevState.isViewportSizeLarge && !this.state.isViewportSizeLarge) {\r\n this.props.changeLayout({\r\n nav: {\r\n mode: Mode.Collapsed,\r\n },\r\n });\r\n }\r\n\r\n // resize window from small size to large size\r\n if (!prevState.isViewportSizeLarge && this.state.isViewportSizeLarge) {\r\n if (this.state.preferencedMainMenuMode === Mode.Expanded || this.state.preferencedMainMenuMode === null) {\r\n this.props.changeLayout({\r\n nav: {\r\n mode: Mode.Expanded,\r\n },\r\n });\r\n }\r\n }\r\n }\r\n\r\n handleMediaChange(matches) {\r\n this.setState({ isViewportSizeLarge: matches });\r\n }\r\n\r\n render() {\r\n return (\r\n \r\n {() => }\r\n \r\n );\r\n }\r\n}\r\n\r\nPlaceholderWrapper.propTypes = {\r\n changeLayout: PropTypes.func,\r\n preferenceService: PropTypes.shape({\r\n setAtUserLevel: PropTypes.func,\r\n findByNameAtUserLevel: PropTypes.func,\r\n }).isRequired,\r\n mode: PropTypes.string,\r\n modePreferenceName: PropTypes.string,\r\n};\r\n\r\nPlaceholderWrapper.defaultProps = {\r\n changeLayout: undefined,\r\n mode: undefined,\r\n modePreferenceName: CAMPAIGN_MAIN_MENU_MODE,\r\n};\r\n\r\nexport const placeholderWithResponsiveSize = withPreference(PlaceholderWrapper);\r\n","import React from 'react';\r\n\r\nexport function GlobalMenueWrapperPlaceholder() {\r\n return (\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n );\r\n}\r\n\r\n","import React from 'react';\r\n\r\nexport function NewGlobalMenueWrapperPlaceholder() {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n}\r\n\r\n","import React from 'react';\r\n\r\nexport const PrimaryNavigationPlaceholder = () => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n);\r\n","import React, { useContext, useState, useEffect } from 'react';\r\nimport { PreferenceContext } from '@bingads-webui-react/preference-context';\r\nimport { LayoutContext, Mode } from '@bingads-webui-react/app-layout-container';\r\n\r\nconst SecondaryNavigationCollapsedKey = 'SecondaryNavigationCollapsed';\r\nconst MediaQuery = '(max-width: 1025px)';\r\nexport const SecondaryNavigationPlaceholder = () => {\r\n const preferenceService = useContext(PreferenceContext);\r\n const preferences = (preferenceService && preferenceService.findByNameAtUserLevel(SecondaryNavigationCollapsedKey)) || { Data: false };\r\n const { config: layoutConfig } = useContext(LayoutContext);\r\n const [matches, setMatches] = useState(window.matchMedia(MediaQuery).matches);\r\n\r\n useEffect(() => {\r\n window\r\n .matchMedia(MediaQuery)\r\n .addEventListener('change', e => setMatches(e.matches));\r\n }, []);\r\n\r\n\r\n if (preferences.Data || layoutConfig.menu.mode !== Mode.Expanded || matches) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n","import React from 'react';\r\n\r\nexport const ScopePanelPlaceholder = () => (\r\n \r\n \r\n \r\n
\r\n)","import { CampaignTypeByODataValue } from '@bingads-webui-campaign/campaign-ui-common';\r\n\r\nconst convertToCampaignStatus = (statusFromOdata) => {\r\n if (statusFromOdata === 'Active' ||\r\n statusFromOdata === 'BudgetPaused' ||\r\n statusFromOdata === 'InProgress'\r\n ) {\r\n return 'Active';\r\n }\r\n\r\n return 'Paused';\r\n};\r\n\r\n// TODO: currently the structure only used by Main menu and summary bar.\r\n// Will consider to have a better structure when serving more components.\r\nexport const convertToCampaign = campaignFromOData => ({\r\n id: campaignFromOData.Id,\r\n name: campaignFromOData.Name,\r\n status: convertToCampaignStatus(campaignFromOData.Status),\r\n rawStatus: campaignFromOData.Status,\r\n entityType: 'Campaign',\r\n campaignType: CampaignTypeByODataValue[campaignFromOData.CampaignType],\r\n isExperiment: campaignFromOData.ExperimentId !== null && campaignFromOData.ExperimentId !== undefined,\r\n ImportProperties: campaignFromOData.ImportProperties,\r\n});\r\n","const convertToAdGroupStatus = (statusFromOdata) => {\r\n if (statusFromOdata === 'Active'\r\n || statusFromOdata === 'CampaignBudgetPaused') {\r\n return 'Active';\r\n }\r\n\r\n return 'Paused';\r\n};\r\n\r\n// TODO: currently the structure only used by Main menu and summary bar.\r\n// Will consider to have a better structure when serving more components.\r\nexport const convertToAdGroup = adGroupFromOData => ({\r\n id: adGroupFromOData.Id,\r\n name: adGroupFromOData.Name,\r\n status: convertToAdGroupStatus(adGroupFromOData.Status),\r\n entityType: 'AdGroup',\r\n parentId: adGroupFromOData.Campaign.Id,\r\n isExperiment: false,\r\n predictiveTargeting: adGroupFromOData.UseOptimizedTargeting,\r\n dealMinimumBid: adGroupFromOData.DealMinimumBid,\r\n});\r\n","import React from 'react';\r\nimport classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\n\r\nimport { getSpinnerWithLabelStyles } from './spinner-with-label-styles';\r\n\r\nexport function SpinnerWithLabel({ classes, label }) {\r\n return (\r\n \r\n
\r\n {label}\r\n \r\n );\r\n}\r\n\r\nSpinnerWithLabel.propTypes = {\r\n classes: PropTypes.shape({\r\n spinnerContainer: PropTypes.string.isRequired,\r\n labelContainer: PropTypes.string.isRequired,\r\n }).isRequired,\r\n label: PropTypes.string.isRequired,\r\n};\r\n\r\nexport const StyledSpinnerWithLabel = withDefaultStyles(SpinnerWithLabel, getSpinnerWithLabelStyles);\r\n","import { getBlockerStyle, spinnerKeyframe } from '@bingads-webui-campaign-react/common-styles';\r\n\r\nexport const getSpinnerWithLabelStyles = (spinnerWithLabel, { palette = {} }) => ({\r\n spinnerContainer: getBlockerStyle(14, palette),\r\n ...spinnerKeyframe,\r\n labelContainer: {\r\n fontSize: 12,\r\n color: palette.themePrimary,\r\n },\r\n});\r\n","export const SelectorLevels = {\r\n Acount: 'Account',\r\n Campaign: 'Campaign',\r\n AdGroup: 'AdGroup',\r\n};\r\n\r\nexport function getLevelItems({ i18n, levels = 2 }) {\r\n const levelItems = [];\r\n if (levels === 3) {\r\n levelItems.push({\r\n name: i18n.getString(_TL_('Account')),\r\n value: SelectorLevels.Acount,\r\n });\r\n }\r\n\r\n levelItems.push({\r\n name: i18n.getString(_TL_('Campaign')),\r\n value: SelectorLevels.Campaign,\r\n }, {\r\n name: i18n.getString(_TL_('Ad group')),\r\n value: SelectorLevels.AdGroup,\r\n });\r\n\r\n return levelItems;\r\n}\r\n","export const shellTips = {\r\n shellDataError: _TL_('Microsoft Advertising problem, try again later.'),\r\n};\r\n","import $ from 'jquery';\r\nimport React, { useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FallbackCallout } from '@bingads-webui-react/fallback-feature';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\n\r\nimport { getStyles } from './styles';\r\n\r\n// The selector is case sensitive, so this should cover all variations\r\nconst SELECTOR = 'a[href*=\"ampaign/Smart\"], a[href*=\"ampaign/smart\"]';\r\n\r\nexport const SmartCampaignsPopup = withDefaultStyles(({ i18n, classes }) => {\r\n useEffect(() => {\r\n const smartNavigate = (event) => {\r\n event.stopPropagation();\r\n window.location.href = event.target.href;\r\n\r\n // We want to suppress the hyperlink navigation\r\n return false;\r\n };\r\n\r\n const rootFunction = (e) => {\r\n // We need to dynamically bind on mousedown otherwise our event doesn't trigger\r\n $(e.target).off('click', smartNavigate);\r\n $(e.target).on('click', smartNavigate);\r\n };\r\n\r\n $('#root').on(\r\n 'mousedown',\r\n SELECTOR,\r\n rootFunction\r\n );\r\n\r\n return () => {\r\n $('#root').off(\r\n 'mousedown',\r\n SELECTOR,\r\n rootFunction\r\n );\r\n };\r\n }, []);\r\n\r\n return (\r\n );\r\n}, getStyles);\r\n\r\nSmartCampaignsPopup.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n classes: PropTypes.shape({\r\n calloutTargetContainer: PropTypes.string.isRequired,\r\n }).isRequired,\r\n};\r\n","export const getStyles = () => ({\r\n calloutTargetContainer: {\r\n width: '100%',\r\n },\r\n});\r\n\r\n","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (cashbackOptions, i18n, inheritCashbackPercent, percentage, readonly, selectedOption, size) {pug_html = pug_html + \"\\u003Cdiv class=\\\"form-inline cashback-percent-cell\\\"\\u003E\\u003Cselect\" + (\" class=\\\"cashback-option-select form-control\\\"\"+pug.attr(\"disabled\", readonly, true, true)+pug.attr(\"aria-label\", i18n.getString('CashbackPercent_Options'), true, true)) + \"\\u003E\";\n// iterate cashbackOptions\n;(function(){\n var $$obj = cashbackOptions;\n if ('number' == typeof $$obj.length) {\n for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) {\n var item = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Coption\" + (pug.attr(\"value\", item.value, true, true)+pug.attr(\"selected\", item.value === selectedOption, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = item.text) ? \"\" : pug_interp)) + \"\\u003C\\u002Foption\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index0 in $$obj) {\n $$l++;\n var item = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Coption\" + (pug.attr(\"value\", item.value, true, true)+pug.attr(\"selected\", item.value === selectedOption, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = item.text) ? \"\" : pug_interp)) + \"\\u003C\\u002Foption\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003C\\u002Fselect\\u003E\\u003Cspan\" + (pug.attr(\"class\", pug.classes([\"inherit-cashback-value\",\"cashback-inherit-container\",\"input-group\",selectedOption !== 'inherit' ? 'hide': ''], [false,false,false,true]), false, true)) + \"\\u003E\\u003Cinput\" + (\" class=\\\"inline-input inherit-value-span form-control\\\"\"+\" disabled\"+pug.attr(\"value\", inheritCashbackPercent, true, true)) + \"\\u003E\\u003Cspan class=\\\"input-group-addon\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Campaign_Discount')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan\" + (pug.attr(\"class\", pug.classes([\"cashback-input-container\",\"input-group\",selectedOption !== 'override' ? 'hide': ''], [false,false,true]), false, true)) + \"\\u003E\\u003Cinput\" + (\" class=\\\"inline-input cashback-percent-input form-control\\\"\"+\" type=\\\"text\\\"\"+pug.attr(\"aria-label\", i18n.getString('Campaign_Maximum_Cashback_Offer'), true, true)+pug.attr(\"size\", size, true, true)+pug.attr(\"maxlength\", size, true, true)+pug.attr(\"value\", percentage, true, true)+pug.attr(\"disabled\", readonly, true, true)) + \"\\u003E\\u003Cspan class=\\\"input-group-addon\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Campaign_Discount')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fspan\\u003E\\u003Cdiv class=\\\"error cashback-percent-error\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"cashbackOptions\" in locals_for_with?locals_for_with.cashbackOptions:typeof cashbackOptions!==\"undefined\"?cashbackOptions:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"inheritCashbackPercent\" in locals_for_with?locals_for_with.inheritCashbackPercent:typeof inheritCashbackPercent!==\"undefined\"?inheritCashbackPercent:undefined,\"percentage\" in locals_for_with?locals_for_with.percentage:typeof percentage!==\"undefined\"?percentage:undefined,\"readonly\" in locals_for_with?locals_for_with.readonly:typeof readonly!==\"undefined\"?readonly:undefined,\"selectedOption\" in locals_for_with?locals_for_with.selectedOption:typeof selectedOption!==\"undefined\"?selectedOption:undefined,\"size\" in locals_for_with?locals_for_with.size:typeof size!==\"undefined\"?size:undefined));;return pug_html;};\nmodule.exports = template;"],"names":["getBrandListById","_ref2","_asyncToGenerator","_regeneratorRuntime","mark","_callee","_ref","cid","aid","brandListId","payload","edm","res","wrap","_context","prev","next","$filter","concat","$top","edmCampaign","Customers","$withKey","Accounts","BrandLists","get","toPromise","sent","abrupt","value","length","stop","_x","apply","arguments","loadBrandListsFactory","_callee2","_context2","top","skip","endDate","Date","now","map","brandList","_objectSpread","key","Id","loadBrandsFactoryFromProp","_ref4","_ref6","_callee3","_ref5","searchFilter","result","options","_context3","search","count","Brands","brand","name","Name","link","Uri","isUnderReview","Status","_x2","loadBrandsUnderBrandListFactoryFromProp","_ref7","isEdit","_callee4","_context4","BrandItems","BrandId","BrandName","createBrandListFromProp","_ref9","brandListPayload","bulkCreate","entityName","updateBrandListFromProp","_ref10","_ref11","_callee5","edmEntityAccount","_context5","bulkUpdate","_x3","deleteBrandListFromProp","_ref12","brandLists","getCampaignsFromProp","_ref13","getCampaignsPayload","edmEntityCampaign","Campaigns","pageNumber","campaignType","query","filter","where","select","gridDataParameters","CurrentCustomerId","$makeCall","getCampaignBrandListAssociationFromProp","_ref14","isExclusion","campaignBrandListAssociationFromProp","_ref15","brandListCampaignAssociationPayload","campaigns","originalAssociation","campaignsMap","forEach","id","originalAssociationMap","EntityId","i","push","BrandListsAssociations","SharedEntityId","IsExclusion","bulkCreateMany","createBrandFromProp","_ref16","_ref17","brandName","brandLink","RequestReason","brandReason","getBrandListsEdm","customerId","accountId","params","cache","getBrandsUnderBrandListEdm","loadCampaignAssociatedBrandListsFactory","campaignId","functionParams","then","SharedEntityName","Count","ListItemCount","ERROR_ENTITY","getBulkUploadErrorType","entitySchema","properties","getBulkUploadEntityType","bulkUpsertBrandListsEntityErrorMap","_defineProperty","Campaign","BrandList","BrandListAssociation","BrandItem","modelToViewModelForBulkErrors","errors","bulkUpsertEntityErrorMap","scenario","i18n","activityLogger","errorProcessor","undefined","identity","getBulkApiErrors","error","errorType","type","mappedErrorType","mapBulkUpsertErrors","GENERIC_ERROR_MESSAGE","_TL_","getViewModelBulkUpsertErrors","has","serverErrors","CampaignApiError","getOdataResponseErrors","getODataErrors","and","predicate1","predicate2","item","not","predicate","errorIs","errorCode","Error","clientIdIs","clientId","extractAndRestoreFailedBrandItemAssociations","BrandItemsAssociations","brandListClientId","brandListErrors","isEmpty","savedAddedBrandItemIds","savedDeletedBrandItemIds","filteredErrors","_reduce","reduce","acc","brandItemAssociation","brandItemAssociationClientId","brandItemAssociationErrors","campaignServiceSharedEntityAssociationDoesNotExistError","find","sortedByNodeType","nodes","_","node","children","child","isCustomer","isLinkedAccount","nodesWithHelpers","parents","state","expanded","deepness","_toConsumableArray","filteredNodes","memo","filteredChildren","compactCustomers","childCustomers","childAccounts","patchedNodes","statePatch","updatedTree","updatedNode","_updatedNode$state","indeterminate","disabled","checked","disableNodes","updatedChildren","selectAll","expandTree","AccountProp","PropTypes","isRequired","number","Number","NodeOperations","SELECTED","EXPANDED","COLLAPSED","ScopeEditorSrcPanel","_PureComponent","props","_this","_classCallCheck","_callSuper","searchText","onSearch","setState","prevState","onQueryChange","onKeyDown","event","onSelectAll","renderNodeLabel","deps","labelText","_jsx","className","title","getString","_inherits","_createClass","lowerCaseQuery","toLowerCase","toString","indexOf","_this$props","this","nodeUpdateHandlers","onTreeUpdated","TreeView","onChange","nodeRenderer","CheckBoxNode","nodeChildRenderer","treeViewClassNames","updateTypeHandlers","iconsClassNameMap","collapsed","lastChild","_this$state","_this$props2","data","relevantNodes","matchNode","_jsxs","SearchBox","placeholder","onClick","role","tabIndex","renderTree","SearchResultLiveRegion","totalCount","emptyText","resultText","PureComponent","ScopeEditorTargetPanel","_len","_args","Array","_key","onRemoveAll","checkBoxNodeRender","args","_node$state","ExpandableNode","Checkbox","inline","shouldDisableRemoveAll","SharingScopeEditor","treeNodes","generateTreeNodes","updatedTreeNodes","onSelectionUpdated","nodeSelectHandler","visibleNodes","nodeExpandHandler","prevProps","availableEntities","selectedEntities","owner","fnsToApply","fn","pipe","_this$props3","_this$props3$editorPr","editorProps","sourceboxTitle","targetboxTitle","Grid","fluid","Row","Col","md","lg","defaultProps","appConfig","currentCid","parentCid","AdvertiserCustomerID","isEntityOwner","entity","_entity$Owner","Owner","isInAccountScope","location","window","matchResult","exec","hash","_ref3","_slicedToArray","getParameter","href","findNode","hasChildCustomers","customerHierarchy","isSuperAdmin","uid","hasPermission","getSessionStorage","getAllCustomerIdsFromHierarchy","fetchUserPermissions","customerIds","sessionStorage","allCustomerIds","Promise","http","post","JSON","stringify","UserId","CustomerIds","response","Errors","Permissions","_ref8","CustomerId","hasPermisson","set","Scopes","Object","freeze","ACCOUNT","CUSTOMER","HIERARCHY","treeToSharingScope","flatCustomers","_memo$Accounts","Others","Total","AccountList","description","_props$accounts","accounts","_props$accounts$adAcc","adAccounts","_props$accounts$manag","managerAccounts","_props$accounts$other","others","adAccountLabel","managerAccountLabel","AccountListPopover","_React$Component","show","hide","accountInfo","popoverId","placement","text","classes","classNames","content","onMouseLeave","Callout","closeButton","onMouseOver","onFocus","React","AudiencesSharingEditor","selected","scopeOptions","onRadioChange","onSelectedOptionChanged","renderItem","currentScopeOption","availableScope","onTreeSelectionUpdated","audienceEntity","tagEntityName","SharingScope","RadioGroup","items","tagName","AudienceSharingView","_Backbone$View","radio","selectedOption","treeSelection","_ref$selectedOption","tagEntity","_ref$disabled","_this$tagEntity$Shari","customerSet","parentCustomerId","ReactDOM","getAvailableScope","el","_superPropGet","Backbone","UETTagScopeEditor","_this$props$tagEntity","onSave","onCancel","footer","UETTagManageSopeView","save","trigger","getSharingScope","cancel","_ref$withFooter","withFooter","UETTagManageScopeDialog","decorate","position","minWidth","maxWidth","CashbackPercentControlView","viewContext","decimal","_ref$CashbackPercent","CashbackPercent","_ref$isParentLevel","isParentLevel","_ref$showInheritFromP","showInheritFromParentOption","_ref$isCreationScenar","isCreationScenario","_ref$allowEmptyCashba","allowEmptyCashbackPercent","isValid","snapshotValue","cashbackPercentValue","isCashbackPercentEmpty","fromFloatToString","e","handleCashbackPercentChange","handleCashbackOptionChange","$","empty","val","currentCashbackInputVal","addClass","removeClass","isCashbackPercentValid","getRealCashbackPercentValue","showError","getCashbackPercentValidationError","cashbackPercentInputValue","inputValue","cashbackPercentValid","campaignCashbackOptions","cashbackOptionInfo","getCashbackInheritOptions","readonly","cashbackOptions","inheritCashbackPercent","inheritValue","$el","html","template","percentage","size","getCashbackOptionInfo","cashbackPercent","cashbackPercentInput","MS_STORE_PROVIDER_ID_MAP","SI","PROD","CI","getMSStoreIdByEnv","url","includes","isMSStoreProviderId","providerId","isMSStoreAdsCampaign","campaign","msStoreIds","some","String","invalidShoppingCampaignSubTypes","permissions","IsPersonalizedOffersV3Enabled","subtype","isShowCoupon","CampaignType","CampaignSubType","isPersonalizedOfferAvailable","campaignSubType","shouldSupportCashbackSettings","getParentLevelCashbackScope","currentCampaign","getParentLevelCashbackPercent","currentAdGroup","adGroupCashbackPercent","campaignCashbackPercent","level","getParentLevelCoupon","cashbackInheritInfo","fromLocalToFloat","validationError","isValidNumber","replace","shouldPersonalizedOffersReadOnly","isAfterSave","biddingStrategyView","getValues","Type","getBidStrategyByCampaignTypeWhenPersonalizedOffersEnabled","_ref6$campaignType","selectedBidStrategy","targetBidStrategy","bidStrategyOptions","isSearchCampaign","commonBidStrategy","Value","Text","costPerSaleBidStrategy","IsCostPerSaleEnabled","logCampaignPersonalizedOffers","shouldLog","log","message","campaignCashback","CouponsEnabled","PersonalizedOffersEnabled","logAdGroupPersonalizedOffers","adgroup","adgroupCashback","setBidStrategyForPersonalizedOffers","isEnabled","setPersonalizedOffersOptionsAndValue","enabled","setupCommonCashbackObserver","target","setBidStrategy","bind","cashbackSettingsView","viewModel","isEnablePersonalizedOffersChecked","subscribe","buildLegacyStrings","allStrings","legacyKeys","str","buildLegacyI18n","timeZone","currency","I18nModel","toIANATimeZone","fromLegacyTimeZone","loadTranslationData","loadCLDRData","locale","failFast","validationLocalization","Validation_Base_Field_Not_Valid","Validation_NotEmpty_Required_Field","Validation_String_Max_Length","Validation_String_Min_Length","Validation_String_Invalid_Characters","Validation_Number_Require_Numeric","Validation_Number_Max_Length","Validation_Number_Range_Min","Validation_Number_Range_Max","Validation_Number_Range_Between","Validation_Array_Size_Max","Validation_Array_Size_Between","Validation_Array_Items_Invalid","Validation_Array_Items_Duplicate","Validation_NegativeKeywords_ListName_Required","Validation_NegativeKeywords_Max_Count","Validation_NegativeKeywords_Invalid_Keywords","Validation_NegativeKeywords_Required","Router","SharedRouter","Route","SharedRoute","withRouter","sharedWithRouter","Switch","ReactSwitch","Redirect","ReactRedirect","Link","ReactLink","useCampaignScopeBarStyles","makeStyles","scopeBarLeftContent","flexShrink","display","alignItems","justifyContent","shorthands","gap","useCampaignStatusMenuButtonStyles","menuButton","fontWeight","useStatusIconStyles","activeStatus","color","tokens","colorPaletteGreenForeground1","fontSize","pausedStatus","colorNeutralForeground3","StatusIcon","status","styles","CircleFilled","PauseFilled","StatusText","CampaignStatusMenuButton","importNotificationCallback","buttonText","scope","useContext","ScopeContext","alertHelper","useMemo","AlertHelper","_scope$values","values","useCallback","newStatus","isFunction","updateStatus","onClickEnable","onClickPause","Menu","MenuTrigger","MenuButton","icon","mergeClasses","MenuPopover","MenuList","MenuItem","BubbleRenderer","isAccountScope","entityCount","bubbleContext","MultiStepTeachingBubbleContext","_React$useState","_React$useState2","layoutSize","setLayoutSize","useLayoutResizeObserver","largeSize","LayoutSizeScale","XL","getModeByLayoutSize","layoutConfig","LayoutContext","config","ise2etest","showForTest","showBubble","menu","mode","Mode","Expanded","useEffect","triggerMultiStepTeachingBubbleWithLock","featureName","TeachingBubbleConfigs","CampaignScopeBar","isLoading","rest","_objectWithoutProperties","_excluded","instrumentation","rootEntityTypeDisplayName","selectedEntity","entityList","currentScope","getCurrentScopeFromService","addScope","getScopeAdder","removeScope","getScopeRemover","focusedEntity","useFocusedEntityContext","handleBackClick","Scope","_useCampaignFilter","useCampaignFilter","selectedCampaignTypeFilter","selectedCampaignStatusFilter","selectedAdGroupStatusFilter","shouldRenderAdGroup","shouldRenderAdGroupFilter","isCampaignScope","entityType","isExperimentCampaign","isExperiment","logger","reportingInsightsScenario","create","summaryButton","onCopilotSummaryButtonRender","trace","onCopilotSummaryButtonClick","isNewLogo","serverContext","ServerContext","_useState","useState","_useState2","isCopilotSummaryButtonEnabled","setIsCopilotSummaryButtonEnabled","getIsCopilotSummaryButtonEnabled","scopeBarProps","onBackClick","hasRootEntityFilter","All","StatusWaterfallFilterOptions","hasSubEntityFilter","scopeSelectorDropdownProps","scopeSelectorProps","inMenuPopover","hideSubEntitySelector","pausedCampaignImportNotificationActivity","createScenarioAndActivity","scenarioName","activityName","activity","isInCampaignsOrOverviewPage","getIsInCampaignsOrOverviewPage","_Fragment","ScopeBar","ScopeBarLeftContent","ScopeSelectorDropdown","shouldHideStatusIcon","popoverContent","ScopeSelector","ScopeFilters","CampaignFilters","AdGroupStatusFilter","inPopover","showPausedCampaignNotifications","campaignItemList","CopilotSummaryButton","campaignName","onRender","ScopeFiltersOverflow","CampaignTypeFilter","CampaignStatusFilter","Account","onSubMenuOpen","CampaignScopeBarWithData","withComponentErrorLogging","withScope","withCampaignData","withInstrumentation","withCampaignFilter","setCampaignTypes","Loader","siteMap","updateAvailability","changeLayout","selectedParent","isTableExpanded","getIsTableExpanded","getConfigComponents","CampaignScopeBarLoader","withLayoutContext","withCampaignSiteMap","processorSet","all","CampaignScopePanel","style","height","CampaignScopePanelWithData","useScopePanelStyles","scopePanelContainer","width","padding","borderRight","colorNeutralStroke2","backgroundColor","colorNeutralBackground3","navRefreshProcessorSet","processor","processImportCenterMode","processMixedModeAdGroup","processGlobalFilter","processCampaignType","processCampaignId","processSmartCampaign","processSmartShoppingCampaign","processHotelCampaign","processPmaxCampaignPageMenu","processPmaxRetailCampaignPageMenu","navRefresh","ScopePanelWithResizeContext","withLayoutSizeContext","withI18nConsumer","withSiteMap","useLayoutSizeContext","scopeViewOnTopPreference","PreferenceContext","findByNameAtUserLevel","isScopeViewOnTop","campaignsRouteSelected","selectedSiteMap","scopePanel","Hidden","navRefreshSiteMap","AdGroup","nameLowerCasePlural","campaignTypes","Default","Shopping","Audience","DynamicSearchAds","Smart","Hotel","Component","HOC","previousEntityListProps","useRef","previousSelectedEntity","_useFocusedEntityCont","setFocusedEntity","selectedCampaignId","selectedAdGroupId","adGroupId","hasSelectedEntityChanged","prevSelectedEntity","current","prevSelectedEntityId","prevSelectedEntityType","adgoupsDisplayText","commonComponentProps","campaignsLoadFallback","removeId","remove","CampaignOData","call","currentAccount","getCampaignOdataConfig","escapeHatch","fallback","onError","notificationApi","showWarning","shellTips","shellDataError","campaignLoadResult","existingCampaignTypes","Set","campaignInOdata","convertToCampaign","entityTypeDisplayName","add","PerformanceMax","subEntityTypeDisplayName","adGroupLoadFallback","adGroupCampaignId","AdGroups","orderby","adGroupLoadResult","adGroups","adGroupInOdata","adGroup","convertToAdGroup","entityListProps","entityListType","parentCampaign","parentEntity","displayName","withFocusedEntityContext","EntityScopeProperty","Assets","getSmartPath","scopeProperty","append","parentId","path","rawStatus","getSmartCampaignUrl","CampaignFilterContext","filteredEntityList","updateWaterfallFilter","getFilteredCampaignTypeFromRawFilter","WaterfallFilterType","getFilteredCampaignStatusFromRawFilter","CampaignStatus","getFilteredAdGroupStatusFromRawFilter","AdGroupStatus","filterAdsGroups","subEntityList","Provider","updateCampaignTypeFilter","filterType","convertFilteredCampaignTypeToFilter","updateCampaignStatusFilter","campaignStatusFilter","updateAdGroupStatusFilter","adGroupStatusFilter","withGlobalFilter","hoistNonReactStatics","LinkedInRegular","viewBox","fill","xmlns","clipPath","d","stroke","strokeWidth","fillRule","clipRule","transform","getCampaignTypeFilterOptions","IsRenameHotelToLodgingEnabled","isAppAdsCampaignEnabled","dynamic","AppAdsCampaignPhaseOne","isLinkedInEnabled","LinkedInCampaigns","isUnifiedAppCampaignEnabled","UnifiedAppAds","menuItems","AppsRegular","defaultChecked","SlideMultipleSearchRegular","PeopleAudienceRegular","ShoppingBagRegular","TextboxSettingsRegular","LuggageRegular","ArrowTrendingSparkleRegular","App","StoreMicrosoftRegular","LinkedIn","getCampaignStatusFilterOptions","AllEnabled","adGroupStatusFilterMenuOptions","getAdGroupStatusFilterOptions","menuItemsGroupList","selectedValues","ScopeFilterMenu","menuName","adGroupStatusFilterValues","adGroupStatusFilterValue","convertFilteredAdGroupStatusToFilter","campaignStatusFilterMenuOptions","onCampaignStatusChange","campaignStatusFilterValues","campaignStatusFilterValue","convertFilteredCampaignStatusToFilter","hotKey","PermissionsContext","previousCount","usePrevious","campaignTypeFilterMenuOptions","onCampaignTypeChange","campaignTypeFilterValues","campaignTypeFilterValue","CampaignFiltersWithHotKeys","withHotKeys","ShortcutType","CampaignTypes","selectedCampaignType","filteredCampaignType","every","COPILOT_WIDTH","sizes","CAMPAIGN_MAIN_MENU_MODE","MERCHANT_MAIN_MENU_MODE","PlaceholderWrapper","_React$PureComponent","isViewportSizeLarge","preferencedMainMenuMode","preferenceService","modePreferenceName","nav","Collapsed","handleMediaChange","matches","Media","MainMenuPlaceholder","placeholderWithResponsiveSize","withPreference","GlobalMenueWrapperPlaceholder","paddingTop","flexDirection","marginLeft","marginRight","marginTop","NewGlobalMenueWrapperPlaceholder","background","borderRadius","margin","PrimaryNavigationPlaceholder","aspectRatio","MediaQuery","SecondaryNavigationPlaceholder","preferences","Data","matchMedia","setMatches","addEventListener","ScopePanelPlaceholder","campaignFromOData","statusFromOdata","CampaignTypeByODataValue","ExperimentId","ImportProperties","adGroupFromOData","predictiveTargeting","UseOptimizedTargeting","dealMinimumBid","DealMinimumBid","StyledSpinnerWithLabel","withDefaultStyles","label","spinnerContainer","labelContainer","spinnerWithLabel","_ref$palette","palette","getBlockerStyle","spinnerKeyframe","themePrimary","SelectorLevels","Acount","getLevelItems","_ref$levels","levels","levelItems","SELECTOR","SmartCampaignsPopup","smartNavigate","stopPropagation","rootFunction","off","on","FallbackCallout","calloutTargetContainer","handleClose","pug","module","exports","locals","pug_interp","pug_html","locals_for_with","attr","$$obj","pug_index0","$$l","escape"],"sourceRoot":""}