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,MAE1CkC,EAAAA,EAAAA,MACAC,EAAAA,EAAAA,IAA+B,CAAEnC,QAAAA,KACjCoC,EAAAA,EAAAA,2BACAC,EAAAA,EAAAA,GAAc,CAAErC,QAAAA,KAChBsC,EAAAA,EAAAA,iBAAgB,CAAEtC,QAAAA,KAClBuC,EAAAA,EAAAA,2BACAC,EAAAA,EAAAA,qBAAoB,CAAExC,QAAAA,KACtByC,EAAAA,EAAAA,4BACAC,EAAAA,EAAAA,2BAA0B,CAAE1C,QAAAA,KAC5B2C,EAAAA,EAAAA,uBAAsB,CAAE3C,QAAAA,KACxB4C,EAAAA,EAAAA,+BACAC,EAAAA,EAAAA,+BACAC,EAAAA,EAAAA,gCACAC,EAAAA,EAAAA,qBAAoB,CAAE/C,QAAAA,KACtBa,EAAAA,EAAAA,iBAAgB,CAAEb,QAAAA,KAErB,C,4DCjUK9J,EAAiB,WACrB,klEACF,EAEM8M,GAAUC,EAAAA,EAAAA,GAAgB,CAC9BC,cAAe,WAAF,OAPU,yCAQpBt3B,MAAK,SAAArE,GAAA,IAAG+1B,EAAe/1B,EAAf+1B,gBAAe,OAAO6F,EAAAA,EAAAA,IAAa7F,EAAiBpH,EAAe,GAAC,EAC/EkN,WAAY,WAAF,OAAQ,wDAAoF,EACtGC,eAAe,IAGjB,W","sources":["../../autobidding-coupon-callout/src/components/close-icon-button.js","../../autobidding-coupon-callout/src/components/header.js","../../autobidding-coupon-callout/src/hooks/use-hide-callout-preference.js","../../autobidding-coupon-callout/src/constants.js","../../autobidding-coupon-callout/src/hooks/use-auto-bidding-fac.js","../../autobidding-coupon-callout/src/hooks/use-campaigns.js","../../autobidding-coupon-callout/src/hooks/use-campaign-filtering/index.js","../../autobidding-coupon-callout/src/hooks/use-campaign-filtering/max-clicks-coupon-filtering.js","../../autobidding-coupon-callout/src/hooks/use-campaign-filtering/max-conversions-coupon-filtering.js","../../autobidding-coupon-callout/src/hooks/use-bulk-session.js","../../autobidding-coupon-callout/src/components/step-wrapper.js","../../autobidding-coupon-callout/src/components/step-wrapper-completion-confirmation.js","../../autobidding-coupon-callout/src/components/buttons.js","../../autobidding-coupon-callout/src/components/ui-blocker.js","../../autobidding-coupon-callout/src/steps/coupon-frontdoor.js","../../autobidding-coupon-callout/src/steps/campaign-autobidding-selection/constants.js","../../autobidding-coupon-callout/src/steps/campaign-autobidding-selection/campaign-selection-mode.js","../../autobidding-coupon-callout/src/steps/campaign-autobidding-selection/campaign-selection-double-list-box/data-source.js","../../autobidding-coupon-callout/src/steps/campaign-autobidding-selection/campaign-selection-double-list-box/campaign-data.js","../../autobidding-coupon-callout/src/steps/campaign-autobidding-selection/campaign-selection-double-list-box/index.js","../../autobidding-coupon-callout/src/steps/campaign-autobidding-selection/specific-campaign-selection.js","../../autobidding-coupon-callout/src/steps/campaign-autobidding-selection/applying-changes.js","../../autobidding-coupon-callout/src/steps/campaign-autobidding-selection/index.js","../../autobidding-coupon-callout/src/steps/completion-confirmation.js","../../autobidding-coupon-callout/src/autobidding-coupon-callout.js","../../pgrid-selection-state-plugin/src/index.js","../../../../components/packages/projection-grid-tracking/src/constant.js","../../../../components/packages/projection-grid-tracking/src/plugin.js","../../campaigns-page/src/additional-plugins.js","../../campaigns-page/src/campaigns-factory.js","../../campaigns-page/src/toolbar-config.js","../../campaigns-page/src/campaign-filter-utilities.js","../../campaigns-page/src/campaigns-page.js","../../campaigns-page/src/campaigns-page-styles.js","feature-bootstrap/campaigns-page.js"],"sourcesContent":["import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { IconButton } from '@fluentui/react/lib/Button';\r\n\r\nconst iconButtonStyles = {\r\n root: {\r\n color: '#424242',\r\n marginLeft: 'auto',\r\n marginTop: '4px',\r\n marginRight: '2px',\r\n },\r\n};\r\n\r\nconst cancelIcon = { iconName: 'Cancel' };\r\n\r\nexport const CloseIconButton = ({ closeButtonAriaLabel, onClick }) => (\r\n \r\n);\r\n\r\nCloseIconButton.propTypes = {\r\n onClick: PropTypes.func.isRequired,\r\n closeButtonAriaLabel: PropTypes.string.isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { mergeStyles, Stack } from '@fluentui/react';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport { CloseIconButton } from './close-icon-button';\r\n\r\nconst headerTextStyles = mergeStyles({\r\n fontStyle: 'normal',\r\n fontWeight: 600,\r\n fontSize: 20,\r\n lineHeight: 26,\r\n});\r\n\r\nconst Header = ({ text, onCloseButtonClick, i18n }) => (\r\n \r\n
\r\n {text}\r\n
\r\n \r\n
\r\n);\r\n\r\nHeader.propTypes = {\r\n text: PropTypes.string.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n onCloseButtonClick: PropTypes.func.isRequired,\r\n};\r\n\r\nconst HeaderWrapped = withI18nConsumer(Header);\r\n\r\nexport { HeaderWrapped as Header };\r\n","import { useState, useEffect, useCallback, useMemo, useContext } from 'react';\r\nimport _ from 'underscore';\r\nimport { InstrumentationContext } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { useJsDataContext } from '@bingads-webui-cc-react/js-data-rest';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\n\r\nconst CCUI_PREFERENCE_KEY = 18190;\r\n\r\nconst DISPLAY_CALLOUT_QUERY = 'displaycallout';\r\n\r\nconst buildHideCouponCalloutKey = (couponId, aid) => `hide_coupon_callout_${couponId}_${aid}`;\r\n\r\nconst getDaysFromNow = (days) => {\r\n const date = new Date(Date.now());\r\n date.setDate(date.getDate() + days);\r\n\r\n return date;\r\n};\r\n\r\nexport const useHideCalloutPreference = (uid, aid, coupon) => {\r\n const [userPreferencesLoaded, setUserPreferencesLoaded] = useState(false);\r\n const [hideCalloutPreference, setHideCalloutPreference] = useState(null);\r\n\r\n const ccJsData = useJsDataContext();\r\n const { scope } = useContext(ScopeContext);\r\n\r\n const instrumentation = useContext(InstrumentationContext);\r\n const { activity } = useMemo(() => instrumentation.createScenarioAndActivity({\r\n scenarioName: 'AutoBiddingCoupon',\r\n activityName: 'GetCouponPreference',\r\n }), [instrumentation]);\r\n\r\n useEffect(() => {\r\n if (coupon) {\r\n ccJsData.UserPreference\r\n .findAll({ uid })\r\n .then((data) => {\r\n if (data && data.length) {\r\n setUserPreferencesLoaded(true);\r\n try {\r\n const userPreferences = _.find(data, userPreference => userPreference.upkey === CCUI_PREFERENCE_KEY);\r\n if (userPreferences && userPreferences.resultAsJsonString) {\r\n const preferenceJson = JSON.parse(decodeURIComponent(userPreferences.resultAsJsonString));\r\n const hideCouponCallout = buildHideCouponCalloutKey(coupon.id, aid);\r\n setHideCalloutPreference(preferenceJson[hideCouponCallout] ? JSON.parse(preferenceJson[hideCouponCallout]) : null);\r\n }\r\n } catch (e) {\r\n if (e instanceof SyntaxError) {\r\n activity.trace(`getUserPreference: resultAsJsonString JSON parse failed: ${e}`);\r\n } else {\r\n throw e;\r\n }\r\n }\r\n }\r\n });\r\n }\r\n }, [activity, aid, ccJsData.UserPreference, coupon, uid]);\r\n\r\n const hideCalloutForEver = useCallback(() => {\r\n const hideCouponCalloutData = {\r\n couponId: coupon && coupon.id,\r\n aid,\r\n hide: true,\r\n endDate: null,\r\n };\r\n\r\n const hideCouponCallout = buildHideCouponCalloutKey(coupon.id, aid);\r\n\r\n const data = { upkey: CCUI_PREFERENCE_KEY, data: JSON.stringify({ [hideCouponCallout]: JSON.stringify(hideCouponCalloutData) }) };\r\n return ccJsData.UserPreference.create(data);\r\n }, [aid, ccJsData.UserPreference, coupon]);\r\n\r\n const hideCalloutFor7Days = useCallback(() => {\r\n const hideCouponCalloutData = {\r\n couponId: coupon && coupon.id,\r\n aid,\r\n hide: true,\r\n endDate: getDaysFromNow(7),\r\n };\r\n\r\n const hideCouponCallout = buildHideCouponCalloutKey(coupon.id, aid);\r\n\r\n const data = { upkey: CCUI_PREFERENCE_KEY, data: JSON.stringify({ [hideCouponCallout]: JSON.stringify(hideCouponCalloutData) }) };\r\n return ccJsData.UserPreference.create(data);\r\n }, [aid, ccJsData.UserPreference, coupon]);\r\n\r\n const isPreferenceSetToHidden = useMemo(\r\n () => hideCalloutPreference && hideCalloutPreference.hide,\r\n [hideCalloutPreference]\r\n );\r\n\r\n const isAfterDismissEndDate = useMemo(\r\n () => hideCalloutPreference && (!hideCalloutPreference.endDate || Date.parse(hideCalloutPreference.endDate) < Date.now()),\r\n [hideCalloutPreference]\r\n );\r\n\r\n const isDisplayCalloutQuery = useMemo(() => {\r\n const displayQueryCallout = scope.values[DISPLAY_CALLOUT_QUERY];\r\n return displayQueryCallout === 1 || displayQueryCallout === 'true';\r\n }, [scope.values]);\r\n\r\n const isCalloutVisible = useMemo(\r\n () => isDisplayCalloutQuery || (userPreferencesLoaded && (!isPreferenceSetToHidden || (isPreferenceSetToHidden && isAfterDismissEndDate))),\r\n [isAfterDismissEndDate, isPreferenceSetToHidden, isDisplayCalloutQuery, userPreferencesLoaded]\r\n );\r\n\r\n return {\r\n isCalloutHidden: !isCalloutVisible,\r\n userPreferencesLoaded,\r\n hideCalloutPreference,\r\n hideCalloutForEver,\r\n hideCalloutFor7Days,\r\n };\r\n};\r\n","import { FAC_FEATURE_ID } from '@bingads-webui-campaign/recommendation-core';\r\nimport { Constants as CCUIConstants } from '@bingads-webui-clientcenter/entity-utils';\r\n\r\nexport const FAC_STATUS = Object.freeze({\r\n NOT_IN_PROGRESS: CCUIConstants.RecommendationAdoptionStatus.NotInProgess,\r\n ACTIVE: CCUIConstants.RecommendationAdoptionStatus.Active,\r\n ADOPTED: CCUIConstants.RecommendationAdoptionStatus.Adopted,\r\n});\r\n\r\nexport const AUTO_BIDDING_FEATURE_IDS = Object.freeze({\r\n MAX_CLICKS: parseInt(FAC_FEATURE_ID.AUTO_BIDDING_MAX_CLICKS, 10),\r\n MAX_CONVERSIONS: parseInt(FAC_FEATURE_ID.AUTO_BIDDING_MAX_CONVERSIONS, 10),\r\n});\r\n","import { useCallback, useContext, useMemo } from 'react';\r\nimport _ from 'underscore';\r\nimport { getCurrencyText } from '@bingads-webui-react/currency';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { useJsDataContext } from '@bingads-webui-cc-react/js-data-rest';\r\nimport { InstrumentationContext } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { AUTO_BIDDING_FEATURE_IDS, FAC_STATUS } from '../constants';\r\n\r\nexport const useAutoBiddingFac = () => {\r\n const serverContext = useContext(ServerContext);\r\n const ccJsData = useJsDataContext();\r\n const instrumentation = useContext(InstrumentationContext);\r\n const i18n = useContext(I18nContext);\r\n\r\n const { activity } = useMemo(() => instrumentation.createScenarioAndActivity({\r\n scenarioName: 'AutoBiddingCoupon',\r\n activityName: 'CouponRender',\r\n }), [instrumentation]);\r\n\r\n\r\n const getCoupon = useCallback(\r\n () =>\r\n ccJsData.FeatureAdoptionCoupon\r\n .findAll({ aid: serverContext.CurrentAccount.Id })\r\n .catch((err) => {\r\n // It seems this returns 401 sometimes, which might just be user token expiring. Do just trace for now to see what issues are here.\r\n activity.trace(`Got following response when fetching FACs: ${JSON.stringify(err)}`);\r\n return [];\r\n })\r\n .then(coupons => _.filter(\r\n coupons,\r\n ({ Status, FeatureId }) => (FeatureId === AUTO_BIDDING_FEATURE_IDS.MAX_CLICKS || FeatureId === AUTO_BIDDING_FEATURE_IDS.MAX_CONVERSIONS)\r\n && (Status === FAC_STATUS.NOT_IN_PROGRESS || Status === FAC_STATUS.ACTIVE)\r\n )).then((coupons) => {\r\n if (coupons.length > 0) {\r\n const coupon = coupons[0];\r\n coupon.CouponUpfrontSpend = 50;\r\n\r\n return coupon;\r\n }\r\n\r\n return null;\r\n })\r\n , [ccJsData.FeatureAdoptionCoupon, serverContext.CurrentAccount.Id, activity]\r\n );\r\n\r\n const updateCouponStatus = useCallback((coupon, status) => ccJsData.FeatureAdoptionCoupon\r\n .update(\r\n coupon.id,\r\n {\r\n adoption: {\r\n ...coupon,\r\n Status: status,\r\n },\r\n }\r\n ), [ccJsData.FeatureAdoptionCoupon]);\r\n\r\n const activateCoupon = useCallback(coupon => updateCouponStatus(coupon, FAC_STATUS.ACTIVE), [updateCouponStatus]);\r\n\r\n const adoptCoupon = useCallback(coupon => updateCouponStatus(coupon, FAC_STATUS.ADOPTED), [updateCouponStatus]);\r\n\r\n const getFormattedCurrencyValue = useCallback(value =>\r\n getCurrencyText({\r\n currencyCode: serverContext.CurrentAccount.CurrencyCode,\r\n amount: value,\r\n i18n,\r\n maxFractionDigits: 0,\r\n hideCurrencyCode: true,\r\n }), [i18n, serverContext]);\r\n\r\n return {\r\n getCoupon,\r\n activateCoupon,\r\n adoptCoupon,\r\n getFormattedCurrencyValue,\r\n };\r\n};\r\n","import { edmCampaign } from '@bingads-webui/edm-campaign';\r\nimport { AUTO_BIDDING_FEATURE_IDS } from '../constants';\r\n\r\nconst campaignEDM = edmCampaign.types.resolve('Model.Campaign');\r\nconst campaignResource = new campaignEDM.ResourceIdentifier();\r\n\r\nconst bulkEditCampaigns = (data) => {\r\n const createOrUpdateCall = campaignResource.bulkUpdate.bind(campaignResource);\r\n return createOrUpdateCall(data);\r\n};\r\n\r\nconst getBiddingScheme = (coupon) => {\r\n switch (coupon.FeatureId) {\r\n case AUTO_BIDDING_FEATURE_IDS.MAX_CLICKS:\r\n return { Type: 'MaxClicks' };\r\n case AUTO_BIDDING_FEATURE_IDS.MAX_CONVERSIONS:\r\n return { Type: 'MaxConversions' };\r\n default:\r\n return null;\r\n }\r\n};\r\n\r\nexport const useCampaigns = () => {\r\n const updateSelectedCampaigns = (selectedCampaigns, coupon) => {\r\n const biddingScheme = getBiddingScheme(coupon);\r\n const mtCampaignData = selectedCampaigns.map(camp => ({ Id: camp.id, BiddingScheme: biddingScheme }));\r\n return bulkEditCampaigns(mtCampaignData);\r\n };\r\n\r\n return ({\r\n updateSelectedCampaigns,\r\n });\r\n};\r\n","import { useMemo } from 'react';\r\nimport { maxClicksCouponFiltering } from './max-clicks-coupon-filtering';\r\nimport { maxConversionsCouponFiltering } from './max-conversions-coupon-filtering';\r\nimport { AUTO_BIDDING_FEATURE_IDS } from '../../constants';\r\n\r\nconst featureIdToCampaignFiltering = Object.freeze({\r\n [AUTO_BIDDING_FEATURE_IDS.MAX_CLICKS]: maxClicksCouponFiltering,\r\n [AUTO_BIDDING_FEATURE_IDS.MAX_CONVERSIONS]: maxConversionsCouponFiltering,\r\n});\r\n\r\nconst search = searchQuery => `contains(Name, '${searchQuery.toString().toLowerCase()}')`;\r\n\r\nconst and = (...filters) => `${filters.map(filter => `(${filter})`).join(' and ')}`;\r\n\r\nconst or = (...filters) => `${filters.map(filter => `(${filter})`).join(' or ')}`;\r\n\r\nconst setFilter = filterString => `$filter=(${filterString})`;\r\n\r\nconst toQueryString = filterString => encodeURI(setFilter(filterString));\r\n\r\nconst selectCampaignsIds = ids => `${ids.map(id => `Id eq ${id}`).join(' or ')}`;\r\n\r\nexport const useCampaignFiltering = (coupon) => {\r\n const campaignFiltering = useMemo(() => featureIdToCampaignFiltering[coupon.FeatureId] || {}, [coupon.FeatureId]);\r\n\r\n return {\r\n campaignTypeFiltering: campaignFiltering.campaignTypeFiltering,\r\n biddingStrategyTypeFiltering: campaignFiltering.biddingStrategyTypeFiltering,\r\n search,\r\n and,\r\n or,\r\n setFilter,\r\n toQueryString,\r\n selectCampaignsIds,\r\n };\r\n};\r\n","\r\nexport const maxClicksCouponFiltering = {\r\n campaignTypeFiltering: \"CampaignType eq 'Default' or CampaignType eq 'Shopping'\",\r\n biddingStrategyTypeFiltering: \"DisplayBiddingStrategyType ne 'MaxClicks'\",\r\n};\r\n","export const maxConversionsCouponFiltering = {\r\n campaignTypeFiltering: \"CampaignType eq 'Default'\",\r\n biddingStrategyTypeFiltering: \"DisplayBiddingStrategyType ne 'MaxConversions'\",\r\n};\r\n","import { useCallback } from 'react';\r\nimport _ from 'underscore';\r\nimport odata from '@bingads-webui-static-legacy/communication/channel/odata';\r\nimport { dispatchPoll } from '@bingads-webui-universal/poll';\r\nimport { useCampaignFiltering } from './use-campaign-filtering';\r\nimport { AUTO_BIDDING_FEATURE_IDS } from '../constants';\r\n\r\nconst BID_STRATEGY_TYPES = Object.freeze({\r\n MAX_CLICKS: 2,\r\n MAX_CONVERSIONS: 3,\r\n});\r\n\r\nconst FEATURE_ID_TO_BID_STRATEGY_TYPE = Object.freeze({\r\n [AUTO_BIDDING_FEATURE_IDS.MAX_CLICKS]: BID_STRATEGY_TYPES.MAX_CLICKS,\r\n [AUTO_BIDDING_FEATURE_IDS.MAX_CONVERSIONS]: BID_STRATEGY_TYPES.MAX_CONVERSIONS,\r\n});\r\n\r\nconst TASK_STATUS = Object.freeze({\r\n COMPLETED: 'Completed',\r\n COMPLETED_WITH_ERRORS: 'CompletedWithErrors',\r\n PENDING_FILE_UPLOAD: 'PendingFileUpload',\r\n});\r\n\r\nconst baseBulkActionPayload = {\r\n Entity: 'Campaign',\r\n BatchAction: {\r\n Actions: [\r\n {\r\n '@odata.type': '#Model.TextAction',\r\n Property: 'BiddingScheme',\r\n ActionType: 'Set',\r\n Value: null,\r\n },\r\n ],\r\n },\r\n Selection: {\r\n QueryString: null,\r\n CampaignId: null,\r\n AdGroupId: null,\r\n },\r\n Description: null,\r\n PreviewCompositeIds: [],\r\n};\r\n\r\nconst getJob = jobId => `/Advertiser/Customers()/Accounts()/BulkEditSessions('${jobId}')?`;\r\n\r\nconst verifyTaskCompletion = response => response.Status === TASK_STATUS.COMPLETED || response.Status === TASK_STATUS.COMPLETED_WITH_ERRORS;\r\n\r\nconst onTaskSuccess = (data) => {\r\n const { Id, Status } = data;\r\n\r\n if (Status === TASK_STATUS.PENDING_FILE_UPLOAD) {\r\n return dispatchPoll(() => odata.get(getJob(Id)), verifyTaskCompletion);\r\n }\r\n\r\n return data;\r\n};\r\n\r\nexport const useBulkSession = (coupon) => {\r\n const {\r\n campaignTypeFiltering, biddingStrategyTypeFiltering, and, toQueryString, selectCampaignsIds,\r\n } = useCampaignFiltering(coupon);\r\n\r\n const getBulkActionPayload = useCallback((selectedCampaigns) => {\r\n baseBulkActionPayload.BatchAction.Actions[0].Value = JSON.stringify({ Type: FEATURE_ID_TO_BID_STRATEGY_TYPE[coupon.FeatureId] });\r\n\r\n if (_.isArray(selectedCampaigns) && selectedCampaigns.length > 0) {\r\n baseBulkActionPayload.Selection.QueryString = toQueryString(selectCampaignsIds(selectedCampaigns.map(camp => camp.id)));\r\n } else {\r\n baseBulkActionPayload.Selection.QueryString = toQueryString(and(campaignTypeFiltering, biddingStrategyTypeFiltering));\r\n }\r\n\r\n return baseBulkActionPayload;\r\n }, [and, biddingStrategyTypeFiltering, campaignTypeFiltering, coupon.FeatureId, selectCampaignsIds, toQueryString]);\r\n\r\n const updateCampaigns = useCallback((selectedCampaigns) => {\r\n const bulkActionPayload = getBulkActionPayload(selectedCampaigns);\r\n\r\n return odata.post('Advertiser/Customers()/Accounts()/BulkEditSessions?', JSON.stringify(bulkActionPayload))\r\n .then(onTaskSuccess);\r\n }, [getBulkActionPayload]);\r\n\r\n return {\r\n updateCampaigns,\r\n };\r\n};\r\n","import React, { useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport { Header } from './header';\r\nimport { useAutoBiddingFac } from '../hooks';\r\nimport { AUTO_BIDDING_FEATURE_IDS } from '../constants';\r\n\r\nconst StepWrapperInternal = (props) => {\r\n const {\r\n coupon, children, onClose, i18n,\r\n } = props;\r\n const { getFormattedCurrencyValue } = useAutoBiddingFac(i18n);\r\n\r\n const formattedCouponValue = useMemo(() => getFormattedCurrencyValue(coupon.CouponValue), [coupon.CouponValue, getFormattedCurrencyValue]);\r\n\r\n const headerText = useMemo(() => {\r\n switch (coupon.FeatureId) {\r\n case AUTO_BIDDING_FEATURE_IDS.MAX_CLICKS:\r\n return i18n.getString(_TL_('Get {0} when you set a maximize clicks bid strategy')).replace('{0}', formattedCouponValue);\r\n case AUTO_BIDDING_FEATURE_IDS.MAX_CONVERSIONS:\r\n return i18n.getString(_TL_('Get {0} when you set a maximize conversions bid strategy')).replace('{0}', formattedCouponValue);\r\n default:\r\n return '';\r\n }\r\n }, [coupon.FeatureId, formattedCouponValue, i18n]);\r\n\r\n return (\r\n <>\r\n
\r\n {children}\r\n \r\n );\r\n};\r\n\r\nStepWrapperInternal.propTypes = {\r\n children: PropTypes.node.isRequired,\r\n coupon: PropTypes.shape({\r\n CouponValue: PropTypes.number.isRequired,\r\n FeatureId: PropTypes.number.isRequired,\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n onClose: PropTypes.func.isRequired,\r\n};\r\n\r\nexport const StepWrapper = withI18nConsumer(StepWrapperInternal);\r\n","import React, { useMemo } from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport { Header } from './header';\r\nimport { AUTO_BIDDING_FEATURE_IDS } from '../constants';\r\n\r\nconst StepWrapperInternal = (props) => {\r\n const {\r\n coupon, selectedCampaigns, children, onClose, i18n,\r\n } = props;\r\n\r\n const areCampaignsSelected = useMemo(() => _.isArray(selectedCampaigns) && selectedCampaigns.length > 0, [selectedCampaigns]);\r\n\r\n const headerText = useMemo(() => {\r\n switch (coupon.FeatureId) {\r\n case AUTO_BIDDING_FEATURE_IDS.MAX_CLICKS:\r\n return areCampaignsSelected ?\r\n i18n.getString(_TL_('Maximize clicks is applied to your selected campaigns')) :\r\n i18n.getString(_TL_('Maximize clicks is applied to all your campaigns'));\r\n case AUTO_BIDDING_FEATURE_IDS.MAX_CONVERSIONS:\r\n return areCampaignsSelected ?\r\n i18n.getString(_TL_('Maximize conversions is applied to your selected campaigns')) :\r\n i18n.getString(_TL_('Maximize conversions is applied to all your campaigns'));\r\n default:\r\n return '';\r\n }\r\n }, [areCampaignsSelected, coupon.FeatureId, i18n]);\r\n\r\n return (\r\n <>\r\n
\r\n {children}\r\n \r\n );\r\n};\r\n\r\nStepWrapperInternal.propTypes = {\r\n children: PropTypes.node.isRequired,\r\n coupon: PropTypes.shape({\r\n FeatureId: PropTypes.number.isRequired,\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n onClose: PropTypes.func.isRequired,\r\n selectedCampaigns: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n};\r\n\r\nexport const StepWrapperCompletionConfirmation = withI18nConsumer(StepWrapperInternal);\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { mergeStyles } from '@fluentui/react';\r\nimport { DefaultButton as FluentDefaultButton, PrimaryButton as FluentPrimaryButton } from '@fluentui/react/lib/Button';\r\nimport classNames from 'classnames';\r\n\r\nconst buttonStyles = mergeStyles({\r\n width: 96,\r\n height: 32,\r\n});\r\n\r\nconst withCustomStyle = (Component) => {\r\n const ComponentWithStyles = (props) => {\r\n const { className } = props;\r\n return (\r\n <>\r\n \r\n \r\n );\r\n };\r\n\r\n ComponentWithStyles.propTypes = {\r\n className: PropTypes.string,\r\n };\r\n\r\n ComponentWithStyles.defaultProps = {\r\n className: null,\r\n };\r\n\r\n return ComponentWithStyles;\r\n};\r\n\r\nexport const DefaultButton = withCustomStyle(FluentDefaultButton);\r\nexport const PrimaryButton = withCustomStyle(FluentPrimaryButton);\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Stack, mergeStyles, Spinner, SpinnerSize } from '@fluentui/react';\r\n\r\nconst blockUiContainer = mergeStyles({\r\n position: 'absolute',\r\n backgroundColor: 'rgba(255, 255, 255, 0.5)',\r\n zIndex: 1010,\r\n top: 0,\r\n right: 0,\r\n bottom: 0,\r\n left: 0,\r\n width: '100%',\r\n height: '100%',\r\n cursor: 'wait',\r\n});\r\n\r\nconst blockUiOverlay = mergeStyles({\r\n width: '100%',\r\n height: '100%',\r\n});\r\n\r\nconst reactBlockUi = mergeStyles({\r\n position: 'relative',\r\n minHeight: '2em',\r\n});\r\n\r\nexport const UiBlocker = (props) => {\r\n const {\r\n blocking,\r\n children,\r\n loadingText,\r\n } = props;\r\n\r\n return (\r\n
\r\n {children}\r\n {blocking &&\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\nUiBlocker.propTypes = {\r\n blocking: PropTypes.bool.isRequired,\r\n children: PropTypes.node.isRequired,\r\n loadingText: PropTypes.string.isRequired,\r\n};\r\n","import React, { useState, useCallback, useMemo, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { Stack, Checkbox, mergeStyles } from '@fluentui/react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { notificationApi } from '@bingads-webui-campaign/notification-center';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { DefaultButton, PrimaryButton, StepWrapper, UiBlocker } from '../components';\r\nimport { useHideCalloutPreference, useAutoBiddingFac } from '../hooks';\r\nimport { FAC_STATUS, AUTO_BIDDING_FEATURE_IDS } from '../constants';\r\nimport CouponIcon from '../../media/CouponIcon.svg';\r\n\r\nconst frontdoorStyles = mergeStyles({\r\n width: 600,\r\n});\r\n\r\nconst descriptionStyles = mergeStyles({\r\n fontStyle: 'normal',\r\n fontWeight: 400,\r\n fontSize: 14,\r\n lineHeight: 20,\r\n});\r\n\r\nconst couponImageStyles = mergeStyles({\r\n marginTop: 24,\r\n marginBottom: 56,\r\n});\r\n\r\nconst nextButtonStyles = mergeStyles({\r\n margin: 8,\r\n});\r\n\r\nexport const CouponFrontdoor = (props) => {\r\n const {\r\n coupon,\r\n onNext,\r\n onClose,\r\n } = props;\r\n\r\n const i18n = useContext(I18nContext);\r\n\r\n const serverContext = useContext(ServerContext);\r\n const { CurrentUser, CurrentAccount } = serverContext;\r\n const { hideCalloutForEver, hideCalloutFor7Days } = useHideCalloutPreference(CurrentUser.Id, CurrentAccount.Id, coupon);\r\n const { getFormattedCurrencyValue, activateCoupon } = useAutoBiddingFac();\r\n\r\n const [doNotShowAgainCheck, setDoNotShowAgainCheck] = useState(false);\r\n const [isActivatingCoupon, setIsActivatingCoupon] = useState(false);\r\n\r\n const onNextClick = useCallback(() => {\r\n if (coupon.Status === FAC_STATUS.NOT_IN_PROGRESS) {\r\n setIsActivatingCoupon(true);\r\n activateCoupon(coupon)\r\n .then(onNext)\r\n .catch(() => {\r\n setIsActivatingCoupon(false);\r\n notificationApi.showWarning(i18n.getString(_TL_('Microsoft Advertising problem, try again later.')));\r\n });\r\n } else {\r\n onNext();\r\n }\r\n }, [activateCoupon, coupon, i18n, onNext]);\r\n\r\n const onCloseClick = useCallback(() => {\r\n onClose();\r\n if (doNotShowAgainCheck) {\r\n hideCalloutForEver();\r\n } else {\r\n hideCalloutFor7Days();\r\n }\r\n }, [doNotShowAgainCheck, hideCalloutFor7Days, hideCalloutForEver, onClose]);\r\n\r\n const formattedCouponValue = useMemo(() => getFormattedCurrencyValue(coupon.CouponValue), [coupon.CouponValue, getFormattedCurrencyValue]);\r\n const formattedCouponUpfrontSpend = useMemo(() => getFormattedCurrencyValue(coupon.CouponUpfrontSpend), [coupon.CouponUpfrontSpend, getFormattedCurrencyValue]);\r\n\r\n const descriptionText = useMemo(() => {\r\n switch (coupon.FeatureId) {\r\n case AUTO_BIDDING_FEATURE_IDS.MAX_CLICKS:\r\n return i18n.getString(_TL_('You can redeem {0} in advertising credit when you set a maximize clicks bid strategy and accrue {1} of spend for one or more campaign(s).'))\r\n .replace('{0}', formattedCouponValue)\r\n .replace('{1}', formattedCouponUpfrontSpend);\r\n case AUTO_BIDDING_FEATURE_IDS.MAX_CONVERSIONS:\r\n return i18n.getString(_TL_('You can redeem {0} in advertising credit when you set a maximize conversions bid strategy and accrue {1} of spend for one or more campaign(s).'))\r\n .replace('{0}', formattedCouponValue)\r\n .replace('{1}', formattedCouponUpfrontSpend);\r\n default:\r\n return '';\r\n }\r\n }, [coupon.FeatureId, formattedCouponUpfrontSpend, formattedCouponValue, i18n]);\r\n\r\n return (\r\n \r\n \r\n
\r\n
\r\n {descriptionText}\r\n
\r\n \r\n \r\n \r\n \r\n { setDoNotShowAgainCheck(!doNotShowAgainCheck); }} />\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
);\r\n};\r\n\r\nCouponFrontdoor.propTypes = {\r\n coupon: PropTypes.shape({\r\n CouponUpfrontSpend: PropTypes.number.isRequired,\r\n CouponValue: PropTypes.number.isRequired,\r\n Status: PropTypes.number.isRequired,\r\n FeatureId: PropTypes.number.isRequired,\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n onClose: PropTypes.func.isRequired,\r\n onNext: PropTypes.func.isRequired,\r\n};\r\n","export const CAMPAIGN_SELECTION_MODES = Object.freeze({\r\n ALL: 'All',\r\n SPECIFIC: 'Specific',\r\n});\r\n","import React, { useMemo, useCallback, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { Stack, mergeStyles } from '@fluentui/react';\r\nimport { ChoiceGroup } from '@fluentui/react/lib/ChoiceGroup';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { DefaultButton, PrimaryButton } from '../../components';\r\nimport { CAMPAIGN_SELECTION_MODES } from './constants';\r\n\r\nconst descriptionStyles = mergeStyles({\r\n marginBottom: 16,\r\n});\r\n\r\nconst choiceGroupStyles = mergeStyles({\r\n paddingLeft: 8,\r\n});\r\n\r\nconst footerStyles = mergeStyles({\r\n marginTop: 32,\r\n});\r\n\r\nconst nextButtonStyles = mergeStyles({\r\n marginRight: 8,\r\n});\r\n\r\nconst fieldStyles = {\r\n field: {\r\n padding: 0,\r\n fontWeight: 400,\r\n fontSize: 14,\r\n lineHeight: 19,\r\n },\r\n};\r\n\r\nexport const CampaignSelectionMode = ({\r\n campaignSelectionMode, setCampaignSelectionMode, goToSpecificCampaignSelection, applyChangesToAllCampaigns, onClose,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const options = useMemo(() => [\r\n {\r\n key: CAMPAIGN_SELECTION_MODES.ALL,\r\n text: i18n.getString(_TL_('Apply to all campaigns')),\r\n styles: fieldStyles,\r\n },\r\n {\r\n key: CAMPAIGN_SELECTION_MODES.SPECIFIC,\r\n text: i18n.getString(_TL_('Apply to a specific campaign')),\r\n styles: fieldStyles,\r\n },\r\n ], [i18n]);\r\n\r\n const onCampaignSelectionModeChange = useCallback((ev, option) => {\r\n setCampaignSelectionMode(option.key);\r\n }, [setCampaignSelectionMode]);\r\n\r\n const onNext = useCallback(() => {\r\n if (campaignSelectionMode === CAMPAIGN_SELECTION_MODES.ALL) {\r\n applyChangesToAllCampaigns();\r\n } else if (campaignSelectionMode === CAMPAIGN_SELECTION_MODES.SPECIFIC) {\r\n goToSpecificCampaignSelection();\r\n }\r\n }, [campaignSelectionMode, applyChangesToAllCampaigns, goToSpecificCampaignSelection]);\r\n\r\n return (\r\n
\r\n
{i18n.getString(_TL_('You can choose to set automated bidding for a specific campaign or all campaigns.'))}
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nCampaignSelectionMode.propTypes = {\r\n campaignSelectionMode: PropTypes.string.isRequired,\r\n applyChangesToAllCampaigns: PropTypes.func.isRequired,\r\n goToSpecificCampaignSelection: PropTypes.func.isRequired,\r\n onClose: PropTypes.func.isRequired,\r\n setCampaignSelectionMode: PropTypes.func.isRequired,\r\n};\r\n","import { useMemo, useEffect, useContext } from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { DoubleListBoxContext } from '@bingads-webui-react/double-list-box-fluent';\r\n\r\nexport const DataSource = ({ campaignData }) => {\r\n const {\r\n state: {\r\n pageSize,\r\n pageNumber,\r\n search,\r\n },\r\n dispatch,\r\n } = useContext(DoubleListBoxContext);\r\n\r\n const data = useMemo(() => campaignData.value.map(camp => ({ id: camp.Id, name: camp.Name })), [campaignData.value]);\r\n\r\n useEffect(() => {\r\n dispatch({ type: 'START_LOAD_DATA' });\r\n\r\n _.delay(() => {\r\n const items = search ? data.filter(item => item.name.toLowerCase().includes(search.toLowerCase())) : data;\r\n const start = (pageNumber - 1) * pageSize;\r\n const end = pageNumber * pageSize > items.length ? items.length : pageNumber * pageSize;\r\n dispatch({\r\n type: 'FINISH_LOAD_DATA',\r\n payload: {\r\n items: items.slice(start, end),\r\n totalCount: items.length,\r\n },\r\n });\r\n }, 100);\r\n }, [data, dispatch, pageNumber, pageSize, search]);\r\n\r\n return null;\r\n};\r\n\r\nDataSource.propTypes = {\r\n campaignData: PropTypes.shape({\r\n value: PropTypes.arrayOf(PropTypes.shape({\r\n id: PropTypes.number,\r\n name: PropTypes.string,\r\n })).isRequired,\r\n }).isRequired,\r\n};\r\n","import React, { useMemo, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { DoubleListBoxContext } from '@bingads-webui-react/double-list-box-fluent';\r\nimport { CampaignOData } from '@bingads-webui-react/campaign-odata';\r\nimport { notificationApi } from '@bingads-webui-campaign/notification-center';\r\nimport { DataSource } from './data-source';\r\nimport { useCampaignFiltering } from '../../../hooks';\r\n\r\nexport const CampaignData = ({ coupon }) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const {\r\n state: {\r\n search,\r\n },\r\n } = useContext(DoubleListBoxContext);\r\n\r\n const {\r\n campaignTypeFiltering, biddingStrategyTypeFiltering, search: campaignSearch, and,\r\n } = useCampaignFiltering(coupon);\r\n\r\n const campaignSelectionConfigs = useMemo(() => {\r\n const baseConfigs = {\r\n top: 1000,\r\n select: ['Id', 'Name'],\r\n orderby: { Name: 1 },\r\n filter: {\r\n where: and(campaignTypeFiltering, biddingStrategyTypeFiltering),\r\n },\r\n };\r\n\r\n if (search) {\r\n baseConfigs.filter.where = and(baseConfigs.filter.where, campaignSearch(search));\r\n }\r\n\r\n return baseConfigs;\r\n }, [and, biddingStrategyTypeFiltering, campaignSearch, campaignTypeFiltering, search]);\r\n\r\n return (\r\n currentAccount.Campaigns.get(campaignSelectionConfigs)}\r\n fallback={() => }\r\n onError={() => {\r\n notificationApi.showWarning(i18n.getString(_TL_('Microsoft Advertising problem, try again later.')));\r\n return () => ();\r\n }}\r\n >\r\n {campaignLoadResult => ()}\r\n \r\n );\r\n};\r\n\r\nCampaignData.propTypes = {\r\n coupon: PropTypes.shape({\r\n FeatureId: PropTypes.number.isRequired,\r\n }).isRequired,\r\n};\r\n","import React, { useRef } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { DoubleListBox, DoubleListBoxContextProvider } from '@bingads-webui-react/double-list-box-fluent';\r\nimport { CampaignData } from './campaign-data';\r\n\r\nexport const CampaignSelectionDoubleListBox = ({ coupon, onSelectionChange }) => {\r\n const dlbRef = useRef();\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nCampaignSelectionDoubleListBox.propTypes = {\r\n coupon: PropTypes.shape({}).isRequired,\r\n onSelectionChange: PropTypes.func.isRequired,\r\n};\r\n","import React, { useContext, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport classNames from 'classnames';\r\nimport { Stack, mergeStyles } from '@fluentui/react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { DefaultButton, PrimaryButton } from '../../components';\r\nimport { CampaignSelectionDoubleListBox } from './campaign-selection-double-list-box/index';\r\nimport { AUTO_BIDDING_FEATURE_IDS } from '../../constants';\r\n\r\nconst campaignSelectionStyles = mergeStyles({\r\n marginTop: 12,\r\n marginBottom: 24,\r\n});\r\n\r\nconst nextButtonStyles = mergeStyles({\r\n marginRight: 8,\r\n});\r\n\r\nexport const SpecificCampaignSelection = ({\r\n onNext, onBack, onClose, selectedCampaigns, setSelectedCampaigns, coupon,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const anySelectedCampaigns = useMemo(() => _.isArray(selectedCampaigns) && selectedCampaigns.length > 0, [selectedCampaigns]);\r\n\r\n const descriptionText = useMemo(() => {\r\n switch (coupon.FeatureId) {\r\n case AUTO_BIDDING_FEATURE_IDS.MAX_CLICKS:\r\n return i18n.getString(_TL_('You can search and select the campaign(s) to which you want to apply a maximize clicks bid strategy.'));\r\n case AUTO_BIDDING_FEATURE_IDS.MAX_CONVERSIONS:\r\n return i18n.getString(_TL_('You can search and select the campaign(s) to which you want to apply a maximize conversions bid strategy.'));\r\n default:\r\n return '';\r\n }\r\n }, [coupon.FeatureId, i18n]);\r\n\r\n return (\r\n <>\r\n
{descriptionText}
\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\nSpecificCampaignSelection.propTypes = {\r\n coupon: PropTypes.shape({\r\n FeatureId: PropTypes.number.isRequired,\r\n }).isRequired,\r\n onBack: PropTypes.func.isRequired,\r\n onClose: PropTypes.func.isRequired,\r\n onNext: PropTypes.func.isRequired,\r\n selectedCampaigns: PropTypes.shape({\r\n length: PropTypes.number,\r\n }).isRequired,\r\n setSelectedCampaigns: PropTypes.func.isRequired,\r\n};\r\n","import React, { useContext } from 'react';\r\nimport { Stack, mergeStyles } from '@fluentui/react';\r\nimport { Spinner, SpinnerSize } from '@fluentui/react/lib/Spinner';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\n\r\nconst stackStyles = {\r\n root: {\r\n marginTop: 64,\r\n marginBottom: 48,\r\n },\r\n};\r\n\r\nconst spinnerStyles = mergeStyles({\r\n marginBottom: 12,\r\n});\r\n\r\nconst loadingMessageStyles = mergeStyles({\r\n fontWeight: 600,\r\n fontSize: 16,\r\n lineHeight: 22,\r\n});\r\n\r\nexport const ApplyingChanges = () => {\r\n const i18n = useContext(I18nContext);\r\n return (\r\n
\r\n \r\n \r\n
\r\n {i18n.getString(_TL_('We\\'re applying your bid strategy.'))}\r\n
\r\n
\r\n
\r\n );\r\n};\r\n","import React, { useState, useMemo, useCallback, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { notificationApi } from '@bingads-webui-campaign/notification-center';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { StepWrapper } from '../../components';\r\nimport { CampaignSelectionMode } from './campaign-selection-mode';\r\nimport { SpecificCampaignSelection } from './specific-campaign-selection';\r\nimport { ApplyingChanges } from './applying-changes';\r\nimport { CAMPAIGN_SELECTION_MODES } from './constants';\r\nimport { useBulkSession, useAutoBiddingFac } from '../../hooks';\r\n\r\nconst CAMPAIGN_SELECTION_STEPS = Object.freeze({\r\n SELECTION_MODE: 0,\r\n SPECIFIC_CAMPAIGN_SELECTION: 1,\r\n APPLYING_CHANGES: 2,\r\n});\r\n\r\nexport const CampaignAutobiddingSelection = (props) => {\r\n const {\r\n coupon,\r\n selectedCampaigns,\r\n setSelectedCampaigns,\r\n onNext,\r\n onClose,\r\n } = props;\r\n\r\n const i18n = useContext(I18nContext);\r\n const { updateCampaigns } = useBulkSession(coupon);\r\n const { adoptCoupon } = useAutoBiddingFac();\r\n\r\n const [currentStep, setCurrentStep] = useState(CAMPAIGN_SELECTION_STEPS.SELECTION_MODE);\r\n const [campaignSelectionMode, setCampaignSelectionMode] = useState(CAMPAIGN_SELECTION_MODES.ALL);\r\n\r\n const applyChangesToCampaigns = useCallback(() => {\r\n setCurrentStep(CAMPAIGN_SELECTION_STEPS.APPLYING_CHANGES);\r\n\r\n return updateCampaigns(selectedCampaigns)\r\n .then(() => adoptCoupon(coupon))\r\n .then(onNext)\r\n .catch(() => {\r\n setCurrentStep(CAMPAIGN_SELECTION_STEPS.SPECIFIC_CAMPAIGN_SELECTION);\r\n notificationApi.showWarning(i18n.getString(_TL_('Microsoft Advertising problem, try again later.')));\r\n });\r\n }, [adoptCoupon, coupon, i18n, onNext, selectedCampaigns, updateCampaigns]);\r\n\r\n const campaignSelectionContent = useMemo(() => {\r\n switch (currentStep) {\r\n case CAMPAIGN_SELECTION_STEPS.SELECTION_MODE:\r\n return (\r\n \r\n
\r\n setCurrentStep(CAMPAIGN_SELECTION_STEPS.SPECIFIC_CAMPAIGN_SELECTION)}\r\n applyChangesToAllCampaigns={applyChangesToCampaigns}\r\n goToConfirmationStep={onNext}\r\n campaignSelectionMode={campaignSelectionMode}\r\n setCampaignSelectionMode={setCampaignSelectionMode}\r\n />\r\n
\r\n
\r\n );\r\n case CAMPAIGN_SELECTION_STEPS.SPECIFIC_CAMPAIGN_SELECTION:\r\n return (\r\n \r\n
\r\n setCurrentStep(CAMPAIGN_SELECTION_STEPS.SELECTION_MODE)}\r\n />\r\n
\r\n
\r\n );\r\n case CAMPAIGN_SELECTION_STEPS.APPLYING_CHANGES:\r\n return (\r\n
\r\n \r\n
\r\n );\r\n default:\r\n return null;\r\n }\r\n }, [applyChangesToCampaigns, campaignSelectionMode, coupon, currentStep, onClose, onNext, selectedCampaigns, setSelectedCampaigns]);\r\n\r\n return (\r\n <>\r\n {campaignSelectionContent}\r\n \r\n );\r\n};\r\n\r\nCampaignAutobiddingSelection.propTypes = {\r\n coupon: PropTypes.shape({\r\n FeatureId: PropTypes.number.isRequired,\r\n }).isRequired,\r\n onClose: PropTypes.func.isRequired,\r\n onNext: PropTypes.func.isRequired,\r\n selectedCampaigns: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n setSelectedCampaigns: PropTypes.func.isRequired,\r\n};\r\n","import React, { useMemo, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { Stack, Link, mergeStyles } from '@fluentui/react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { PrimaryButton, StepWrapperCompletionConfirmation } from '../components';\r\nimport { useAutoBiddingFac } from '../hooks';\r\n\r\nconst completionConfirmationStyles = mergeStyles({\r\n width: 600,\r\n});\r\n\r\nexport const CompletionConfirmation = (props) => {\r\n const {\r\n coupon,\r\n selectedCampaigns,\r\n onClose,\r\n } = props;\r\n\r\n const serverContext = useContext(ServerContext);\r\n const i18n = useContext(I18nContext);\r\n\r\n const { getFormattedCurrencyValue } = useAutoBiddingFac();\r\n\r\n const couponDetailsUrl = useMemo(\r\n () => `${serverContext.ServicesEndpoints.ClientCenterUIAPI}Billing/CouponDetails?cid=${serverContext.CurrentCustomer.Id}&aid=${serverContext.CurrentAccount.Id}`,\r\n [serverContext.CurrentAccount.Id, serverContext.CurrentCustomer.Id, serverContext.ServicesEndpoints.ClientCenterUIAPI]\r\n );\r\n\r\n const formattedCouponValue = useMemo(() => getFormattedCurrencyValue(coupon.CouponValue), [coupon.CouponValue, getFormattedCurrencyValue]);\r\n const formattedCouponUpfrontSpend = useMemo(() => getFormattedCurrencyValue(coupon.CouponUpfrontSpend), [coupon.CouponUpfrontSpend, getFormattedCurrencyValue]);\r\n\r\n return (\r\n \r\n
\r\n {i18n.getString(_TL_('Your coupon is now activated! When you spend {0} on your selected campaigns, your advertising credit of {1} will be automatically redeemed.'))\r\n .replace('{0}', formattedCouponUpfrontSpend)\r\n .replace('{1}', formattedCouponValue)}\r\n {' '}\r\n {i18n.getString(_TL_('Learn more about your coupon details and claim status.'))}\r\n \r\n \r\n \r\n
\r\n
);\r\n};\r\n\r\nCompletionConfirmation.propTypes = {\r\n coupon: PropTypes.shape({\r\n CouponUpfrontSpend: PropTypes.number.isRequired,\r\n CouponValue: PropTypes.number.isRequired,\r\n }).isRequired,\r\n onClose: PropTypes.func.isRequired,\r\n selectedCampaigns: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n};\r\n","import React, { useState, useEffect, useMemo, useCallback, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Modal, mergeStyles } from '@fluentui/react';\r\nimport { useBoolean } from '@fluentui/react-hooks';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { CouponFrontdoor, CampaignAutobiddingSelection, CompletionConfirmation } from './steps';\r\nimport { useHideCalloutPreference, useAutoBiddingFac } from './hooks';\r\n\r\nconst AUTOBIDDING_COUPON_STEPS = Object.freeze({\r\n FRONTDOOR: 0,\r\n CAMPAIGN_SELECTION: 1,\r\n COMPLETION_CONFIRMATION: 2,\r\n});\r\n\r\nconst modalStyles = mergeStyles({\r\n minWidth: 600,\r\n padding: 24,\r\n});\r\n\r\nconst overlayStyles = {\r\n root: {\r\n backgroundColor: 'rgba(255, 255, 255, 0.5)',\r\n },\r\n};\r\n\r\nexport const AutoBiddingCouponCallout = () => {\r\n const [isModalOpen, { setTrue: showModal, setFalse: hideModal }] = useBoolean(false);\r\n const [currentStep, setCurrentStep] = useState(AUTOBIDDING_COUPON_STEPS.FRONTDOOR);\r\n const [coupon, setCoupon] = useState(null);\r\n\r\n const { getCoupon } = useAutoBiddingFac();\r\n const serverContext = useContext(ServerContext);\r\n const { CurrentUser, CurrentAccount } = serverContext;\r\n const { isCalloutHidden, hideCalloutFor7Days, hideCalloutForEver } = useHideCalloutPreference(CurrentUser.Id, CurrentAccount.Id, coupon);\r\n\r\n const [selectedCampaigns, setSelectedCampaigns] = useState([]);\r\n\r\n useEffect(() => {\r\n if (coupon === null) {\r\n getCoupon().then((autoBiddingCoupon) => { setCoupon(autoBiddingCoupon); });\r\n }\r\n }, [coupon, getCoupon]);\r\n\r\n useEffect(() => {\r\n if (coupon !== null && !isCalloutHidden) {\r\n showModal();\r\n } else {\r\n hideModal();\r\n }\r\n }, [showModal, coupon, hideModal, isCalloutHidden]);\r\n\r\n const hideCalloutFor7DaysOnClose = useCallback(() => {\r\n hideModal();\r\n hideCalloutFor7Days();\r\n }, [hideCalloutFor7Days, hideModal]);\r\n\r\n const hideCalloutForEverOnClose = useCallback(() => {\r\n hideModal();\r\n hideCalloutForEver();\r\n }, [hideCalloutForEver, hideModal]);\r\n\r\n const modalContent = useMemo(() => {\r\n switch (currentStep) {\r\n case AUTOBIDDING_COUPON_STEPS.FRONTDOOR:\r\n return ( setCurrentStep(AUTOBIDDING_COUPON_STEPS.CAMPAIGN_SELECTION)}\r\n />);\r\n case AUTOBIDDING_COUPON_STEPS.CAMPAIGN_SELECTION:\r\n return ( { setCurrentStep(AUTOBIDDING_COUPON_STEPS.COMPLETION_CONFIRMATION); }}\r\n selectedCampaigns={selectedCampaigns}\r\n setSelectedCampaigns={setSelectedCampaigns}\r\n />);\r\n case AUTOBIDDING_COUPON_STEPS.COMPLETION_CONFIRMATION:\r\n return ;\r\n default:\r\n return null;\r\n }\r\n }, [currentStep, coupon, hideModal, hideCalloutFor7DaysOnClose, selectedCampaigns, hideCalloutForEverOnClose]);\r\n\r\n return (\r\n \r\n
\r\n {modalContent}\r\n
\r\n \r\n );\r\n};\r\n\r\nAutoBiddingCouponCallout.propTypes = {\r\n i18n: PropTypes.shape({}).isRequired,\r\n};\r\n","import _ from 'underscore';\r\n\r\nexport const selectionStatePlugin = definePlugin => definePlugin('selectionState', [\r\n 'gridView',\r\n 'crossPageSelectAll',\r\n], (gridView, crossPageSelectAll) => {\r\n let selectedKeys = [];\r\n const { primaryKey } = gridView;\r\n\r\n function setSelectedKeys(keys) {\r\n let { selected } = gridView.get('selection');\r\n\r\n const rowsToSelect = _.difference(keys, selected);\r\n const rowsToDeselect = _.difference(selected, keys);\r\n\r\n _.each(rowsToSelect, (id) => {\r\n const { resolver } = gridView.get('selection');\r\n const selection = resolver.selectRow(id);\r\n gridView.set({ selection });\r\n });\r\n\r\n _.each(rowsToDeselect, (id) => {\r\n const { resolver } = gridView.get('selection');\r\n const selection = resolver.deselectRow(id);\r\n gridView.set({ selection });\r\n });\r\n\r\n selected = gridView.get('selection').selected; // eslint-disable-line prefer-destructuring\r\n gridView.trigger('didSelect', selected);\r\n }\r\n\r\n gridView.on('didSelect', (selections) => {\r\n if (_.size(selections) === gridView.countRows && crossPageSelectAll.isAllSelected) {\r\n selectedKeys = [];\r\n } else {\r\n selectedKeys = selections;\r\n }\r\n });\r\n\r\n gridView.on('didReload', (success, { totalCount, items }) => {\r\n if (success && totalCount > 0 && !crossPageSelectAll.isAllSelected) {\r\n const keysAfterReload = _.map(items, item => item[primaryKey].toString());\r\n selectedKeys = _.intersection(selectedKeys, keysAfterReload);\r\n\r\n gridView.once('didUpdate', () => {\r\n setSelectedKeys(selectedKeys);\r\n });\r\n }\r\n });\r\n});\r\n","export const AllowedGridEntityTypes = [\r\n 'Campaign',\r\n];\r\n","import _ from 'underscore';\r\n\r\nimport { AllowedGridEntityTypes } from './constant';\r\nimport { ViewTracker } from './trackers/view-tracker';\r\n\r\nconst trackerFactory = (type, options, deps = {}) => {\r\n const mixedOptions = _.defaults(options, deps);\r\n\r\n let tracker = null;\r\n\r\n switch (type) {\r\n case 'ViewTracker':\r\n tracker = new ViewTracker(mixedOptions);\r\n break;\r\n\r\n default:\r\n // eslint-disable-next-line\r\n console.error(`Unsupported tracker type ${type}`);\r\n }\r\n\r\n return tracker;\r\n};\r\n\r\nexport const trackingPlugin = definePlugin => definePlugin('tracking', [\r\n 'config',\r\n 'gridView',\r\n], (config, gridView) => {\r\n const {\r\n trackers: trackerOptions,\r\n entityType,\r\n enabled = false,\r\n } = _.result(config.plugins, 'tracking', {});\r\n\r\n let trackers = [];\r\n\r\n const entityTypeAllowed = _.contains(AllowedGridEntityTypes, entityType);\r\n\r\n if (false && enabled && entityTypeAllowed) {\r\n const Instrumentation = null;\r\n const scenario = Instrumentation.mainlineGrid.create();\r\n const commonDeps = { entityType, gridView, logScenario: scenario };\r\n\r\n trackers = _.compact(_.map(\r\n trackerOptions,\r\n (options, type) => trackerFactory(type, options, commonDeps)\r\n ));\r\n }\r\n\r\n return {\r\n remove: () => {\r\n _.each(trackers, x => x.close());\r\n },\r\n };\r\n});\r\n","import _ from 'underscore';\r\n\r\nimport { PredicateList } from '@bingads-webui/predicate-list-react';\r\nimport { getEntityFromScope } from '@bingads-webui/edm-campaign';\r\nimport { campaignBulkEdit } from '@bingads-webui-campaign/campaign-bulk-edit';\r\nimport { showPausedCampaignNotifications, showBudgetBidCampaignNotifications } from '@bingads-webui-campaign/import-shared-utils';\r\nimport { placeholderPlugin } from '@bingads-webui/projection-grid-placeholder';\r\nimport { automatedRulesPlugin } from '@bingads-webui-campaign/projection-grid-automated-rules';\r\nimport { labelsPlugin } from '@bingads-webui-campaign/projection-grid-labels';\r\nimport { triggerQualtricsEvent } from '@bingads-webui-campaign/qualtrics';\r\nimport { pastePlugin } from '@bingads-webui-campaign/projection-grid-paste';\r\nimport { projectionGridScopeNavigator } from '@bingads-webui-campaign/projection-grid-scope-navigator';\r\nimport { projectionGridPopupPlugin } from '@bingads-webui-campaign/projection-grid-popup';\r\nimport { qualityScoreTitleTemplate, qualityScoreContentTemplate } from '@bingads-webui-campaign/quality-score';\r\nimport { CampaignAdgroupSelectorEdmView } from '@bingads-webui-campaign-react/campaign-adgroup-selector-edm';\r\nimport { selectionStatePlugin } from '@bingads-webui-campaign/pgrid-selection-state-plugin';\r\nimport { trackingPlugin } from '@bingads-webui-campaign/projection-grid-tracking';\r\nimport { getPGridColumnResizePlugin } from '@bingads-webui-campaign/projection-grid-column-resize-helper';\r\nimport { projectionGridFlexColumnResize } from '@bingads-webui-campaign/projection-grid-flex-column-resize';\r\nimport { projectionGridScrollbarPlugin } from '@bingads-webui-campaign/projection-grid-scrollbar';\r\nimport ChangeBudgetView from '@bingads-webui-static-legacy/bulk-edit/view/campaign/changeBudget';\r\nimport BulkCampaignExclusionsView from '@bingads-webui-campaign-legacy/bulk-campaign-exclusions/view/bulk-campaign-exclusions';\r\nimport ChangeBudgetModel from '@bingads-webui-static-legacy/bulk-edit/model/campaign/changeBudget';\r\nimport AudienceAssociationView from '@bingads-webui-campaign-legacy/audience-bulk-edit-campaign-association/view/association';\r\nimport AudienceAssociationModel from '@bingads-webui-campaign-legacy/audience-bulk-edit-campaign-association/model/association';\r\nimport ChangeCashbackBudgetView from '@bingads-webui-static-legacy/bulk-edit/view/campaign/changeCashbackBudget';\r\nimport ChangeCashbackBudgetModel from '@bingads-webui-static-legacy/bulk-edit/model/campaign/changeCashbackBudget';\r\nimport ChangeCashbackPercentView from '@bingads-webui-static-legacy/bulk-edit/view/campaign/changeCashbackPercent';\r\nimport ChangeCashbackPercentModel from '@bingads-webui-static-legacy/bulk-edit/model/campaign/changeCashbackPercent';\r\nimport ChangeRsaAutoAssetsView from '@bingads-webui-static-legacy/bulk-edit/view/shared/changeRsaAutoAssets';\r\nimport ChangeRsaAutoAssetsModel from '@bingads-webui-static-legacy/bulk-edit/model/shared/changeRsaAutoAssets';\r\n\r\nconst { noop } = _;\r\n\r\nexport const getAdditionalPlugins = ({\r\n gridName,\r\n toolbarPlugin,\r\n filterService,\r\n scope,\r\n appConfig,\r\n ChangeStatusView,\r\n ChangeStatusModel,\r\n ChangeBidStrategyModel,\r\n ChangeBidStrategyView,\r\n ChangeLanguageView,\r\n ChangeLanguageModel,\r\n CopyPaste,\r\n crossPageSelectPlugin,\r\n i18n,\r\n newI18n,\r\n i18nGlobal,\r\n instrumentation,\r\n odata,\r\n appState,\r\n stateManager,\r\n preferenceService,\r\n i18nErrors,\r\n jsData,\r\n LabelAssociationView,\r\n dataContextManager,\r\n cacheService,\r\n s$label,\r\n router,\r\n permissions,\r\n edm,\r\n getCampaignTypeGlobalFilter,\r\n perfMarker,\r\n campaignUpgradeProps,\r\n}) => {\r\n const campaignStatus = {\r\n Active: 'Active',\r\n Deleted: 'Deleted',\r\n Paused: 'UserPaused',\r\n Suspended: 'Suspended',\r\n\r\n // used in wunderbar, needs to be migrated once workflow goes to oData\r\n EnumPaused: 124,\r\n EnumBudgetPaused: 126,\r\n EnumBudgetUserPaused: 127,\r\n };\r\n\r\n const enableSelectionState = permissions.dynamic.SelectionStatePluginOnCampaign;\r\n\r\n const { activity: pausedCampaignImportNotificationActivity } = instrumentation.createScenarioAndActivity({\r\n scenarioName: 'PausedCampaignImportNotification',\r\n activityName: 'CampaignsGridBulkEdit',\r\n });\r\n\r\n\r\n const { activity: BudgetBidCampaignImportNotificationActivity } = instrumentation.createScenarioAndActivity({\r\n scenarioName: 'BudgetBidCampaignImportNotification',\r\n activityName: 'CampaignsGridBulkEdit',\r\n });\r\n\r\n const bulkEditPlugin = campaignBulkEdit({\r\n status: campaignStatus,\r\n ChangeStatusView,\r\n ChangeStatusModel,\r\n filterService,\r\n scope,\r\n ChangeBudgetView,\r\n ChangeBudgetModel,\r\n ChangeCashbackBudgetView,\r\n ChangeCashbackBudgetModel,\r\n ChangeCashbackPercentView,\r\n ChangeCashbackPercentModel,\r\n ChangeBidStrategyModel,\r\n ChangeBidStrategyView,\r\n ChangeLanguageView,\r\n ChangeLanguageModel,\r\n BulkCampaignExclusionsView,\r\n AudienceAssociationView,\r\n AudienceAssociationModel,\r\n ChangeRsaAutoAssetsView,\r\n ChangeRsaAutoAssetsModel,\r\n campaignUpgradeProps,\r\n CopyPaste,\r\n config: appConfig,\r\n i18n,\r\n i18nNewDesign: newI18n,\r\n router,\r\n isForVNext: true,\r\n qualtricsSurveyCallback: () => triggerQualtricsEvent('UserPausedCampaignMainLineGrid'),\r\n importNotificationCallback: ({ campaignItemList, updateStatus }) => showPausedCampaignNotifications({ campaignItemList, updateStatus, activity: pausedCampaignImportNotificationActivity }), // show paused campaign notifications based on specific conditions\r\n importBudgetBidNotificationCallback: ({ campaignItemList, newBudget, newBidStrategy }) => showBudgetBidCampaignNotifications({\r\n campaignItemList,\r\n newBudget,\r\n newBidStrategy,\r\n activity: BudgetBidCampaignImportNotificationActivity,\r\n }), // show budget and bid campaign notifications based on specific conditions\r\n disableDeselectAll: enableSelectionState,\r\n getCampaignTypeGlobalFilter,\r\n perfMarker,\r\n });\r\n\r\n return () => _.compact([\r\n {\r\n plugin: crossPageSelectPlugin.plugin,\r\n config: _.extend({}, crossPageSelectPlugin.config, {\r\n disableDeselectAll: enableSelectionState,\r\n }),\r\n },\r\n toolbarPlugin,\r\n {\r\n plugin: definePlugin => definePlugin('filterState', [], noop),\r\n },\r\n {\r\n plugin: bulkEditPlugin,\r\n },\r\n {\r\n plugin: automatedRulesPlugin,\r\n config: {\r\n isForVNext: true,\r\n entityName: 'Campaign',\r\n i18n,\r\n i18nGlobal,\r\n router,\r\n instrumentation,\r\n currentUserId: appConfig.get('CurrentUser').Id,\r\n permissions,\r\n scope,\r\n accountTimeZone: appConfig.get('AccountTimeZone'),\r\n accountCurrencyCode: appConfig.get('AccountCurrencyCode'),\r\n state: appState,\r\n odata,\r\n stateMgr: stateManager,\r\n preferenceSvc: preferenceService,\r\n appCfg: appConfig,\r\n bidRange: appConfig.get('KeywordBidRange'),\r\n budgetRange: appConfig.get('BudgetRange').DailyRange,\r\n newI18n,\r\n CampaignAdgroupSelectorEdmView,\r\n currentEntity: getEntityFromScope(scope).currentAccount,\r\n PredicateListReact: PredicateList,\r\n },\r\n },\r\n {\r\n plugin: labelsPlugin,\r\n config: {\r\n isForVNext: true,\r\n i18n,\r\n i18nErrors,\r\n router,\r\n jsdata: jsData,\r\n LabelAssociationView,\r\n dataContextManager,\r\n cacheService,\r\n instrumentation,\r\n s$label,\r\n disableDeselectAll: true,\r\n scope,\r\n edm,\r\n perfMarker,\r\n },\r\n },\r\n {\r\n plugin: projectionGridScopeNavigator,\r\n config: scope,\r\n },\r\n {\r\n plugin: projectionGridPopupPlugin,\r\n config: [{\r\n selector: '.quality-score-tooltip',\r\n outerSelector: '.grid-column-QualityScore',\r\n container: 'body',\r\n className: 'quality-score-popup',\r\n content: value => qualityScoreContentTemplate({ value, i18n }),\r\n title: value => qualityScoreTitleTemplate({ value, i18n }),\r\n }],\r\n },\r\n {\r\n plugin: definePlugin => definePlugin('placeholder', [], noop), // nothing actually depends on this, just a reminder of plugins which have been removed\r\n },\r\n {\r\n plugin: placeholderPlugin,\r\n config: {\r\n footerVisableElement: ['.scrollbar'],\r\n // Message for no results when using filter\r\n filteredContainer: '.campaigns-table .grid-noresult',\r\n filteredEmptyText: i18n.getString('Grid_NoFilteredRecords'),\r\n\r\n // Message for no data at all.\r\n container: '.campaigns-table .grid-noresult',\r\n text: newI18n.getString(_TL_('Looks like you haven\\'t created any campaigns yet. Click the create campaign button to get started.')),\r\n },\r\n },\r\n {\r\n plugin: pastePlugin,\r\n config: {\r\n i18n,\r\n CopyPaste,\r\n filterService,\r\n perfMarker,\r\n },\r\n },\r\n {\r\n plugin: trackingPlugin,\r\n config: {\r\n entityType: 'Campaign',\r\n trackers: {\r\n ViewTracker: {\r\n timeWindow: 500,\r\n enabled: true,\r\n },\r\n },\r\n enabled: permissions.IsTrackingPluginEnabled,\r\n },\r\n },\r\n enableSelectionState && {\r\n plugin: selectionStatePlugin,\r\n },\r\n ...permissions.dynamic.GridFlexLayout ? [{\r\n plugin: projectionGridScrollbarPlugin,\r\n config: {\r\n scrollElementSelector: '.grid-group-other',\r\n },\r\n }, {\r\n plugin: projectionGridFlexColumnResize,\r\n config: {\r\n gridName,\r\n softDependencies: ['popColumns'],\r\n preferenceService,\r\n },\r\n }] : [getPGridColumnResizePlugin({\r\n gridName,\r\n preferenceService,\r\n permissions,\r\n })],\r\n ]);\r\n};\r\n","/* eslint-disable no-param-reassign */\r\nimport Promise from 'bluebird';\r\nimport $ from 'jquery';\r\nimport _, { noop, extend, chain } from 'underscore';\r\n\r\nimport { getRoutePathById } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { FilterService } from '@bingads-webui/filter-service';\r\nimport { getCampaignsGridFactory, dummyDataSource } from '@bingads-webui-campaign/campaigns-grid';\r\nimport { WaterfallFilterStorage, WaterfallFilterType, waterfallDateFilterProcessor } from '@bingads-webui-campaign/filter-storage';\r\nimport { getGridPreferences } from '@bingads-webui-campaign/summary-grid-helper';\r\nimport { getRouterDep } from '@bingads-webui-campaign-react/legacy-router-dep';\r\nimport { getGridName } from '@bingads-webui-campaign/inline-download-grids-metadata';\r\nimport { getDataSourceWithInjection, getFilterConfigWithInjection } from '@bingads-webui-campaign/campaigns-data';\r\nimport { Label } from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport { getFilteredCampaignTypeFromRawFilter } from '@bingads-webui-campaign-react/shell-ui-common';\r\n\r\nimport jsData from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport edm from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport * as customColumnPreference from '@bingads-webui-component-legacy/bingads-grid/service/custom-column-preferences';\r\nimport * as SegmentationPreference from '@bingads-webui-component-legacy/bingads-grid/service/segmentation-preferences';\r\nimport * as fetchPagination from '@bingads-webui-component-legacy/bingads-grid/service/fetch-pagination';\r\nimport state from '@bingads-webui-component-legacy/state/index';\r\nimport appConfig from '@bingads-webui-component-legacy/config/index';\r\nimport cacheService from '@bingads-webui-static-legacy/cache-service';\r\nimport dataContextManager from '@bingads-webui-static-legacy/summary/SummaryDataContextManager';\r\nimport cacheManager from '@bingads-webui-campaign-legacy/cache-manager/index';\r\nimport instrumentation from '@bingads-webui-campaign-legacy/instrumentation/index';\r\nimport odata from '@bingads-webui-static-legacy/communication/channel/odata';\r\nimport * as i18nErrors from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport { LabelAssociationView } from '@bingads-webui-campaign-legacy/common-grid-plugins/label/label-association-view';\r\nimport preferenceServiceLegacy from '@bingads-webui-component-legacy/preference/service/index';\r\nimport segmentTimeChecker from '@bingads-webui-component-legacy/bingads-grid/shared/timeRangeChecker';\r\nimport ChangeStatusView from '@bingads-webui-static-legacy/bulk-edit/view/campaign/changeStatus';\r\nimport ChangeStatusModel from '@bingads-webui-static-legacy/bulk-edit/model/campaign/changeStatus';\r\nimport ChangeBidStrategyModel from '@bingads-webui-static-legacy/bulk-edit/model/shared/changeBiddingStrategy';\r\nimport ChangeBidStrategyView from '@bingads-webui-static-legacy/bulk-edit/view/shared/changeBiddingStrategy';\r\nimport ChangeLanguageView from '@bingads-webui-campaign-legacy/campaign-bulk-edit/view/bulkEditLanguage';\r\nimport ChangeLanguageModel from '@bingads-webui-campaign-legacy/campaign-bulk-edit/model/bulkEditLanguage';\r\nimport CopyPaste from '@bingads-webui-static-legacy/bulk-edit/view/copyPaste';\r\nimport azureUrlRewrite from '@bingads-webui-static-legacy/app/component/azureUrlRewrite';\r\nimport sessionStore from '@bingads-webui-component-legacy/js-data-storage/session-storage';\r\nimport { getFilters } from '@bingads-webui-component-legacy/bingads-grid/service/filter-preferences';\r\nimport * as ColumnChooserPreference from '@bingads-webui-component-legacy/bingads-grid/service/column-chooser-preferences';\r\nimport dateUtil from '@bingads-webui-component-legacy/humanize/date';\r\nimport { fetchSortInfo } from '@bingads-webui-component-legacy/bingads-grid/service/fetch-sortinfo';\r\nimport { getColumnsMap, getBaseColumnsByType } from '@bingads-webui-campaign-legacy/campaigns-tab-campaigns/grid/columns-config-base';\r\nimport logger from '@bingads-webui-static-legacy/instrumentation/index';\r\n\r\nimport { getAdditionalPlugins } from './additional-plugins';\r\n\r\nconst i18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/campaigns-tab/campaigns');\r\nconst legacyGlobalI18n = window.globalLegacyI18n.get('component/i18n/loader!legacy/global');\r\nconst i18nGlobal = window.globalLegacyI18n.get('$/i18n!global');\r\nconst schemaI18nCampaign = window.globalLegacyI18n.get('$/schema-i18n!campaign');\r\n\r\nconst campaignsGridPromiseFactory = () => getCampaignsGridFactory()();\r\n\r\nexport function createCampaignsGridForUiNext({\r\n serverContext,\r\n toolbarPlugin,\r\n preferenceService,\r\n scope,\r\n permissions,\r\n crossPageSelectPlugin,\r\n newI18n,\r\n siteMap,\r\n perfMarker,\r\n pageName,\r\n willParentViewUnMount,\r\n deps = {},\r\n preexecuteFlag = false,\r\n theme,\r\n campaignUpgradeProps,\r\n}) {\r\n return new Promise((resolve) => {\r\n campaignsGridPromiseFactory({\r\n serverContext,\r\n scope,\r\n permissions,\r\n siteMap,\r\n preferenceService,\r\n deps,\r\n }).then(({ createCampaignsGrid }) => {\r\n const legacyDeps = {\r\n customColumnPreference,\r\n jsData,\r\n appConfig,\r\n i18n,\r\n sessionStore,\r\n preferenceStoreFactory: getFilters,\r\n legacyGlobalI18n,\r\n schemaI18nCampaign,\r\n cacheService,\r\n dataContextManager,\r\n edm,\r\n ColumnChooserPreference,\r\n SegmentationPreference,\r\n fetchPagination,\r\n dateUtil,\r\n state,\r\n fetchSortInfo,\r\n getColumnsMap,\r\n getBaseColumnsByType,\r\n logger,\r\n };\r\n\r\n const { getSegPreference, getSegType } = SegmentationPreference;\r\n const { fetchPaginationConfig } = fetchPagination;\r\n\r\n const gridName = getGridName('Campaign');\r\n\r\n let errorId = null;\r\n let flucActivity = null;\r\n const headerRefreshCache = 'x-ms-refreshcampaigncache';\r\n\r\n\r\n const fluctuationScenario = instrumentation.fluctuation.create();\r\n if (fluctuationScenario && fluctuationScenario.fluctuationInstr) {\r\n flucActivity = fluctuationScenario.fluctuationInstr.create();\r\n }\r\n\r\n function afterFindAll(resources, attrs, options = {}) {\r\n if (options.useDfmCache) {\r\n delete options.useDfmCache;\r\n }\r\n\r\n if (options.headers) {\r\n delete options.headers[headerRefreshCache];\r\n }\r\n\r\n if (errorId) {\r\n window.App.views.alertCenter.dismiss(errorId);\r\n errorId = null;\r\n }\r\n\r\n if (Array.isArray(attrs) && attrs.length) {\r\n attrs.forEach((v) => {\r\n if (v.AvailableInsightTypeIds && v.AvailableInsightTypeIds.length) {\r\n flucActivity.trace(`Fluctuations Rendered. FromScenario: CampaignsGrid, TypeIds: ${v.AvailableInsightTypeIds.toString()}, campaignId: ${v.Id}}.`);\r\n }\r\n });\r\n }\r\n const unfilteredTotals = attrs.raw['@ns.unfiltered.totals'];\r\n if (unfilteredTotals && unfilteredTotals.AvailableInsightTypeIds) {\r\n unfilteredTotals.AvailableInsightTypeIds.forEach((v) => {\r\n flucActivity.trace(`Overall Fluctuations Rendered. FromScenario: CampaignsGrid, TypeIds: ${v.toString()}.`);\r\n });\r\n }\r\n\r\n if (_.isArray(attrs)) {\r\n return attrs;\r\n }\r\n\r\n errorId = window.App.views.alertCenter.show({\r\n message: legacyGlobalI18n.getString('Manage_Error_Default'),\r\n level: 'Error',\r\n dismissible: true,\r\n });\r\n return {};\r\n }\r\n\r\n\r\n // merge the scopeService instance and scope entity object together\r\n const scopeAdapter = extend({\r\n customerId: scope.values.cid,\r\n accountId: scope.values.aid,\r\n campaignId: scope.values.campaignId,\r\n }, scope);\r\n\r\n const edmEntity = edm.currentAccount;\r\n const waterfallFilterStorage = new WaterfallFilterStorage({\r\n preferenceService,\r\n });\r\n\r\n const router = {\r\n getRouteTo: () => 'route',\r\n navigateToRoute: getRouterDep(scope, siteMap).navigateToRoute,\r\n getRoutePathById: pageId => getRoutePathById(siteMap, pageId),\r\n };\r\n\r\n getGridPreferences({\r\n gridName: 'summary_tab_campaign',\r\n dateUtil: {\r\n format: value => i18n.formatDate(value),\r\n },\r\n state,\r\n edm: edmEntity,\r\n getSegPreference,\r\n getSegType,\r\n segmentTimeChecker,\r\n fetchPaginationConfig,\r\n customColumnPreference,\r\n }).then((preferenceConfig) => {\r\n if (willParentViewUnMount()) {\r\n resolve({});\r\n return;\r\n }\r\n\r\n const dataSourceWithInjection = getDataSourceWithInjection({\r\n gridName,\r\n preferenceService,\r\n newI18n,\r\n serverContext,\r\n ..._.pick(\r\n legacyDeps,\r\n 'customColumnPreference',\r\n 'jsData',\r\n 'appConfig',\r\n 'i18n',\r\n 'sessionStore',\r\n 'preferenceStoreFactory',\r\n 'legacyGlobalI18n',\r\n 'schemaI18nCampaign',\r\n 'cacheService',\r\n 'dataContextManager',\r\n 'edm',\r\n 'ColumnChooserPreference',\r\n 'SegmentationPreference',\r\n 'fetchPagination',\r\n 'dateUtil',\r\n 'state',\r\n 'fetchSortInfo',\r\n 'getColumnsMap',\r\n 'getBaseColumnsByType',\r\n 'logger'\r\n ),\r\n });\r\n\r\n const { CampaignFilterImprovementEnabled } = permissions.dynamic;\r\n let customDataSource = null;\r\n let filterConfig = null;\r\n let filterService = null;\r\n if (CampaignFilterImprovementEnabled) {\r\n const {\r\n dataSource: cachedDataSource,\r\n filterService: cachedFilterService,\r\n } = dataSourceWithInjection;\r\n\r\n filterConfig = getFilterConfigWithInjection({\r\n preferenceService,\r\n newI18n,\r\n cachedEntitySchema: cachedFilterService.entitySchema, // use entitySchema from cahced service because it's flattened and pilots are alreayd applied to it.\r\n customColumnPreference,\r\n scope: scopeAdapter,\r\n ..._.pick(\r\n legacyDeps,\r\n 'customColumnPreference',\r\n 'jsData',\r\n 'appConfig',\r\n 'i18n',\r\n 'sessionStore',\r\n 'preferenceStoreFactory',\r\n 'legacyGlobalI18n',\r\n 'schemaI18nCampaign',\r\n 'cacheService',\r\n 'dataContextManager',\r\n 'edm'\r\n ),\r\n });\r\n\r\n cachedFilterService.entitySchema = filterConfig.schemaProcessor(filterConfig.entitySchema);\r\n customDataSource = cachedDataSource;\r\n filterService = cachedFilterService;\r\n } else {\r\n customDataSource = dataSourceWithInjection;\r\n\r\n filterConfig = getFilterConfigWithInjection({\r\n preferenceService,\r\n newI18n,\r\n customColumnPreference,\r\n scope: scopeAdapter,\r\n ..._.pick(\r\n legacyDeps,\r\n 'customColumnPreference',\r\n 'jsData',\r\n 'appConfig',\r\n 'i18n',\r\n 'sessionStore',\r\n 'preferenceStoreFactory',\r\n 'legacyGlobalI18n',\r\n 'schemaI18nCampaign',\r\n 'cacheService',\r\n 'dataContextManager',\r\n 'edm'\r\n ),\r\n });\r\n filterService = new FilterService(filterConfig);\r\n }\r\n\r\n if (customDataSource) {\r\n // eslint-disable-next-line no-underscore-dangle\r\n customDataSource._options.afterFindAll = (resources, attrs) => afterFindAll(resources, attrs, customDataSource._options);\r\n customDataSource.type = 'jsdata';\r\n customDataSource.queryBuilder.getDecoratorByName('filter').filterService = filterService;\r\n }\r\n\r\n const dataSource = preexecuteFlag ? dummyDataSource : customDataSource;\r\n const getCampaignTypeGlobalFilter = () => {\r\n const filters = waterfallFilterStorage.getFilters([WaterfallFilterType.CampaignType]);\r\n const rawFilter = chain(filters).first().result('filter').value();\r\n return getFilteredCampaignTypeFromRawFilter(rawFilter);\r\n };\r\n const gridView = createCampaignsGrid({\r\n addDateChangeListener: noop,\r\n p$daterange: () => {\r\n const dateFilter = waterfallDateFilterProcessor(\r\n waterfallFilterStorage.getFilters([WaterfallFilterType.DateFilter]),\r\n serverContext\r\n );\r\n return Promise.resolve(dateFilter);\r\n },\r\n dataSource,\r\n filterService,\r\n pageName,\r\n preexecuteFlag,\r\n theme,\r\n preferenceConfig,\r\n preferenceService,\r\n router,\r\n isDataFetchManagerSource: true,\r\n newI18n,\r\n getAdditionalPlugins: getAdditionalPlugins({\r\n gridName,\r\n ChangeStatusView,\r\n ChangeStatusModel,\r\n ChangeBidStrategyModel,\r\n ChangeBidStrategyView,\r\n ChangeLanguageView,\r\n ChangeLanguageModel,\r\n CopyPaste,\r\n i18nGlobal,\r\n edm,\r\n toolbarPlugin,\r\n filterService,\r\n scope: scopeAdapter,\r\n appConfig,\r\n cacheManager,\r\n crossPageSelectPlugin,\r\n i18n,\r\n newI18n,\r\n instrumentation,\r\n appState: state,\r\n odata,\r\n preferenceService: preferenceServiceLegacy,\r\n i18nErrors,\r\n jsData,\r\n LabelAssociationView,\r\n dataContextManager,\r\n cacheService,\r\n s$label: Label,\r\n router,\r\n permissions,\r\n deps,\r\n getCampaignTypeGlobalFilter,\r\n perfMarker,\r\n campaignUpgradeProps,\r\n }),\r\n scope: scopeAdapter,\r\n serverContext,\r\n instrumentation,\r\n isForVNext: true,\r\n viewport: $('.campaigns-page'),\r\n campaignTabPerfMarker: perfMarker,\r\n customHeaderOffset: () => $('.sticky-container').height(),\r\n azureUrlRewrite,\r\n getCampaignTypeGlobalFilter,\r\n });\r\n\r\n resolve({\r\n filterConfig,\r\n filterService,\r\n gridView,\r\n gridDataSource: dataSource,\r\n i18n,\r\n });\r\n });\r\n });\r\n });\r\n}\r\n","import _ from 'underscore';\r\nimport { getRoutePathById } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { noteCreationButtonConfig, openNotesPanelButtonConfig } from '@bingads-webui-campaign-react/note-editor';\r\nimport { getLocalStorage } from '@bingads-webui/storage';\r\n\r\n/* global Map */\r\nconst automatedRuleConfig = ['dropdown-automate', {\r\n id: 'dropdown-automate',\r\n type: 'dropdown',\r\n}];\r\n\r\nexport function getToolbarConfig({\r\n onSelectCrossPage,\r\n scope,\r\n i18n,\r\n siteMap,\r\n permissions,\r\n serverContext,\r\n notesPanelProps,\r\n noteDialogProps,\r\n instrumentation,\r\n}) {\r\n const isCurrentAccountInActive = _.chain(serverContext).result('CurrentAccount').result('Status').value() === 32; // 32 is InActive\r\n const createScenario = instrumentation.newUICreateCampaignImportIntegration.create();\r\n const importIntegrationLogger = createScenario.importIntegration.create();\r\n\r\n importIntegrationLogger.trace('ShowMenuCreateCamapaign');\r\n\r\n // eslint-disable-next-line\r\n const toolbarSelectedConfig = _.reduce(\r\n [\r\n ['selection-widget', {\r\n type: 'selection-widget',\r\n onSelectCrossPage,\r\n }],\r\n ['divider', {\r\n type: 'divider',\r\n }],\r\n ['dropdown-edit', {\r\n id: 'dropdown-edit',\r\n type: 'dropdown',\r\n }],\r\n ['dropdown-labels', {\r\n id: 'dropdown-labels',\r\n type: 'dropdown',\r\n }],\r\n automatedRuleConfig,\r\n ['button-auction-insights', {\r\n type: 'button',\r\n isFallbackEnabled: false,\r\n }],\r\n ['button-create-note',\r\n permissions.IsNoteEnabled ? noteCreationButtonConfig(i18n, permissions, isCurrentAccountInActive, () => noteDialogProps.openCreateNoteDialog('Campaign')) : null,\r\n ],\r\n ['expander', {\r\n type: 'expander',\r\n }],\r\n ['button-clear-selection', {\r\n type: 'button-clear-selection',\r\n }],\r\n ['button-chart-toggle', {\r\n id: 'button-chart-toggle',\r\n type: 'button',\r\n }],\r\n ], (map, [key, value]) => {\r\n if (value != null) {\r\n map.set(key, value);\r\n }\r\n\r\n return map;\r\n },\r\n new Map()\r\n );\r\n\r\n const toolbarUnselectedItems = [\r\n ['button-campaign-create', {\r\n id: 'button-campaign-create',\r\n type: 'button',\r\n text: i18n.getString(_TL_('Create')),\r\n classes: ['btn-primary', 'btn'],\r\n iconLeftGlyphName: 'ba-Add',\r\n primary: true,\r\n split: true,\r\n splitButtonAriaLabel: i18n.getString(_TL_('See options')),\r\n 'aria-roledescription': i18n.getString(_TL_('split button')),\r\n menuProps: permissions.IsDomesticSimplifiedChineseEnabled ? null : {\r\n items: [\r\n {\r\n key: 'googleImport',\r\n text: i18n.getString(_TL_('Import from Google Ads')),\r\n ariaLabel: i18n.getString(_TL_('Go to page Import from Google Ads')),\r\n className: 'import-from-google',\r\n onClick: () => {\r\n importIntegrationLogger.trace('ClickMenuImportFromGoogleAds');\r\n scope.save(getRoutePathById(siteMap, 'import-google'));\r\n },\r\n },\r\n ...permissions.dynamic.FacebookImport ? [{\r\n key: 'facebookImport',\r\n text: i18n.getString(_TL_('Import from Meta Ads')),\r\n ariaLabel: i18n.getString(_TL_('Go to page Import from Meta Ads')),\r\n className: 'import-from-facebook',\r\n onClick: () => {\r\n importIntegrationLogger.trace('ClickMenuImportFromFacebookAds');\r\n scope.save(getRoutePathById(siteMap, 'import-facebook'));\r\n },\r\n }] : [],\r\n ...permissions.IsAmazonImportEnabled ? [{\r\n key: 'amazonImport',\r\n text: i18n.getString(_TL_('Import from Amazon Ads')),\r\n ariaLabel: i18n.getString(_TL_('Go to page Import from Amazon Ads')),\r\n className: 'import-from-amazon',\r\n onClick: () => {\r\n importIntegrationLogger.trace('ClickMenuImportFromAmazonAds');\r\n scope.save(getRoutePathById(siteMap, 'import-amazon'));\r\n },\r\n }] : [],\r\n {\r\n key: 'pinterestImport',\r\n text: i18n.getString(_TL_('Import from Pinterest Ads')),\r\n ariaLabel: i18n.getString(_TL_('Go to page Import from Pinterest Ads')),\r\n className: 'import-from-pinterest',\r\n onClick: () => {\r\n importIntegrationLogger.trace('ClickMenuImportFromPinterestAds');\r\n scope.save(getRoutePathById(siteMap, 'import-pinterest'));\r\n },\r\n },\r\n ],\r\n },\r\n noResponsive: true,\r\n disabled: permissions.IsReadOnlyUser || isCurrentAccountInActive,\r\n onClick: () => {\r\n importIntegrationLogger.trace('ClickMenuCreateCamapaign');\r\n scope.save(getRoutePathById(siteMap, 'campaign-create-objective'));\r\n const localStorage = getLocalStorage();\r\n if (localStorage.supportsStorage()) {\r\n localStorage.set('fromPathId', 'campaigns');\r\n }\r\n },\r\n }],\r\n ['predicate-list', {\r\n id: 'predicate-list',\r\n type: 'custom',\r\n }],\r\n ['search-box-filter', {\r\n id: 'search-box-filter',\r\n type: 'search-box',\r\n isAdvancedFilterEnabled: true,\r\n isCustomItemRenderingEnabled: _.result(permissions.dynamic, 'AdGroupsPageAdvancedFiltering', false),\r\n ariaLabel: i18n.getString(_TL_('Filter by campaign')),\r\n entityName: i18n.getString(_TL_('campaigns')),\r\n }],\r\n ['dropdown-segment', {\r\n id: 'dropdown-segment',\r\n type: 'dropdown',\r\n }],\r\n ['dropdown-column-chooser', {\r\n id: 'dropdown-column-chooser',\r\n type: 'dropdown',\r\n ariaLabel: i18n.getString(_TL_('Columns')),\r\n }],\r\n automatedRuleConfig,\r\n ['button-download', {\r\n id: 'button-download',\r\n type: 'nav-item',\r\n iconLeftGlyphName: 'ba-Download',\r\n ariaLabel: i18n.getString(_TL_('Download')),\r\n }],\r\n ];\r\n\r\n if (permissions.IsCampaignAdGroupCopyPasteEnabled) {\r\n toolbarUnselectedItems.push(['button-paste', {\r\n id: 'button-paste',\r\n type: 'nav-item',\r\n iconLeftGlyphName: 'ba-Paste',\r\n }]);\r\n }\r\n\r\n if (permissions.IsNoteEnabled) {\r\n toolbarUnselectedItems.push(['button-open-note-panel', openNotesPanelButtonConfig(i18n, notesPanelProps.openNotesPanel)]);\r\n }\r\n toolbarUnselectedItems.push(\r\n ['expand-table', {\r\n type: 'expand-table',\r\n }],\r\n ['divider', {\r\n type: 'divider',\r\n }],\r\n ['button-chart-toggle', {\r\n id: 'button-chart-toggle',\r\n type: 'button',\r\n }]\r\n );\r\n\r\n // eslint-disable-next-line\r\n const toolbarUnselectedConfig = _.reduce(\r\n toolbarUnselectedItems,\r\n (map, [key, value]) => {\r\n map.set(key, value);\r\n return map;\r\n },\r\n new Map()\r\n );\r\n return {\r\n toolbarSelectedConfig,\r\n toolbarUnselectedConfig,\r\n };\r\n}\r\n","import { each, size, keys } from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport { updateSeasonalityNameFromMT } from '@bingads-webui-campaign/seasonality-id-name-utils';\r\n\r\nfunction getSeasonalityAdjustmentId(query) {\r\n let seasonalityId;\r\n if (size(query.$and) > 1) {\r\n each(query.$and, (clause) => {\r\n if (each(keys(clause), (key) => {\r\n if (key === 'SeasonalityAdjustmentId') {\r\n seasonalityId = clause.SeasonalityAdjustmentId.$eq;\r\n }\r\n }));\r\n });\r\n return seasonalityId;\r\n }\r\n\r\n if (each(keys(query), (key) => {\r\n if (key === 'SeasonalityAdjustmentId') {\r\n seasonalityId = query.SeasonalityAdjustmentId.$eq;\r\n }\r\n }));\r\n return seasonalityId;\r\n}\r\n\r\nexport const onBeforeApplySavedFilter = ({\r\n filters, scope, i18n, jsdata,\r\n}) => {\r\n if (filters[1] && filters[1].query) {\r\n const id = getSeasonalityAdjustmentId(filters[1].query);\r\n if (id) {\r\n return updateSeasonalityNameFromMT({\r\n id, scope, i18n, jsdata,\r\n });\r\n }\r\n }\r\n return Promise.resolve();\r\n};\r\n","import classNames from 'classnames';\r\nimport React, { Fragment } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { noop, bind, compose, compact, isFunction, get, isUndefined } from 'underscore';\r\nimport { FilterViewManagerWithGlobalFilterContext } from '@bingads-webui-campaign-react/filter-view-manager';\r\nimport { StyledGridViewWrapper } from '@bingads-webui-campaign-react/grid-view-wrapper';\r\nimport { getToolbarEditor } from '@bingads-webui-campaign-react/toolbar-plugin';\r\nimport { TopGridPanel } from '@bingads-webui-campaign-react/top-grid-panel';\r\nimport { withGlobalFilter } from '@bingads-webui-campaign-react/global-filter-context';\r\nimport { StyledTablePageContainer } from '@bingads-webui-campaign-react/table-page-container';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport { withTablePageStateManager } from '@bingads-webui-campaign-react/table-page-state-manager';\r\nimport { withSiteMap } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { DisclaimerBannerWithInstore } from '@bingads-webui-campaign-react/help';\r\nimport { ProgressiveLoadingBlock, getFilteredCampaignTypeFromRawFilter, CampaignType } from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport { perfMarkerPropTypes } from '@bingads-webui/performance-marker';\r\nimport { withInstrumentation } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { withNoteStateManager, NotesPanel, NoteDialog } from '@bingads-webui-campaign-react/note-editor';\r\nimport { dismissPopupIfExist } from '@bingads-webui-campaign/fluctuation-common';\r\nimport { RECOMMENDATION_TYPES } from '@bingads-webui-campaign/recommendation-core';\r\nimport { withHotKeys, ShortcutType } from '@bingads-webui-react/hot-keys';\r\nimport { seasonalityPredicateValueNameGetter } from '@bingads-webui-campaign/seasonality-id-name-utils';\r\nimport jsdata from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport { loadInlineChartWithWebpack } from '@bingads-webui-campaign-react/inline-chart-factory-webpack';\r\nimport { withCampaignUpgradeManager } from '@bingads-webui-campaign-react/campaign-upgrade-tool';\r\nimport { withDelayedStyles } from '@bingads-webui-campaign-react/common-utils';\r\nimport eventDispatcher from '@bingads-webui-component-legacy/event-dispatcher/index';\r\nimport { MessageBar, Link } from '@fluentui/react';\r\nimport { WaterfallFilterType } from '@bingads-webui-campaign/filter-storage';\r\nimport { ShoppingFACScenario } from '@bingads-webui-campaign-react/shopping-coupon-callout';\r\nimport { ReactTemplate } from '@bingads-webui-react/react-template';\r\n\r\nimport { createCampaignsGridForUiNext } from './campaigns-factory';\r\nimport { getToolbarConfig } from './toolbar-config';\r\nimport { onBeforeApplySavedFilter } from './campaign-filter-utilities';\r\n\r\nconst AutoBiddingCouponCallout = React.lazy(() => import(/* webpackMode: 'eager' */'@bingads-webui-campaign-react/autobidding-coupon-callout'));\r\nconst ShoppingCouponCallout = React.lazy(() => import(/* webpackMode: 'eager' */'@bingads-webui-campaign-react/shopping-coupon-callout'));\r\nconst StyledCampaignUpgradeDialog = React.lazy(() => import(/* webpackMode: 'eager' */'@bingads-webui-campaign-react/campaign-upgrade-tool'));\r\n\r\nconst getDelayedCampaignStyles = () => (\r\n import(/* webpackMode: 'eager' */'./campaigns-page-styles')\r\n .then(({ getCampaignsGridViewStyles }) => ({\r\n getDelayedStyles: getCampaignsGridViewStyles,\r\n }))\r\n);\r\n\r\nconst getDefaultStyles = () => ({\r\n inlineChartContainer: {\r\n '& .flex-chart-panel': {\r\n display: 'none',\r\n },\r\n },\r\n});\r\n\r\nconst messageBarStyle = {\r\n root: {\r\n background: '#eff6fc',\r\n '& span.iconba-Insights': {\r\n fontSize: '16px',\r\n top: 0,\r\n color: '#0078D4',\r\n },\r\n },\r\n};\r\n\r\nconst StyledGridViewWrapperWithFilterContext = withGlobalFilter(StyledGridViewWrapper);\r\n\r\nclass Campaigns extends React.PureComponent {\r\n constructor(props) {\r\n super(props);\r\n this.columnAction = noop;\r\n this.chartView = null;\r\n this.viewport = React.createRef();\r\n this.createGrid(props);\r\n }\r\n\r\n componentDidMount() {\r\n const pageContainer = document.querySelector('.table-page-container');\r\n\r\n if (pageContainer) {\r\n pageContainer.addEventListener('scroll', () => dismissPopupIfExist([document.getElementById('mcc-perf-fluctuation-placeholder')]));\r\n }\r\n }\r\n\r\n componentDidUpdate(prevProps) {\r\n if (this.props.hotKey === 'shift+n') {\r\n this.props.scope.save('/campaign/vnext/createcampaign/objective');\r\n }\r\n if (prevProps.scope !== this.props.scope) {\r\n this.createGrid(this.props);\r\n }\r\n\r\n if (this.isColumnSetChangedOnUpdate(prevProps)) {\r\n this.createGrid(this.props);\r\n\r\n if (this.state && this.state.backboneGridView && this.state.backboneGridView.grid && this.state.backboneGridView.grid.columnChooser) {\r\n this.state.backboneGridView.grid.columnChooser.restoreToolbar();\r\n }\r\n }\r\n }\r\n\r\n componentWillUnmount() {\r\n if (this.state.backboneGridView) {\r\n this.state.backboneGridView.remove();\r\n }\r\n this.willUnMount = true;\r\n }\r\n\r\n getSscUpgradeMessage(showPhase12Message) {\r\n const { preferenceService } = this.props;\r\n\r\n const onDismissSscUpgradeBanner = () => {\r\n if (!isUndefined(preferenceService)) {\r\n const preferenceName = showPhase12Message ? 'Phase12SscUpgradedMessageDismissed' : 'Phase0SscUpgradedMessageDismissed';\r\n const stateKey = showPhase12Message ? 'phase12SscUpgradedMessageDismissed' : 'phase0SscUpgradedMessageDismissed';\r\n\r\n preferenceService.setAtAccountLevel({\r\n Name: preferenceName,\r\n Data: true,\r\n });\r\n\r\n this.setState({\r\n [stateKey]: true,\r\n isSscUpgradedMessageDismissed: true,\r\n });\r\n }\r\n };\r\n\r\n const messageContent = showPhase12Message ?\r\n _TL_('We\\'ve upgraded your Smart Shopping campaigns to Performance Max campaigns, which use the best of Microsoft\\'s automation to find you more conversions. {{learnMore}}{{/learnMore}}') :\r\n _TL_('We\\'ve upgraded some of your Smart Shopping campaigns to Performance Max campaigns, which use the best of Microsoft\\'s automation to find you more conversions. {{learnMore}}{{/learnMore}}');\r\n\r\n const PmaxLearnMore = () => (\r\n \r\n {this.props.i18n.getString(_TL_('Learn more about Performance Max campaigns.'))}\r\n \r\n );\r\n\r\n return (\r\n onDismissSscUpgradeBanner()}\r\n >\r\n \r\n \r\n );\r\n }\r\n\r\n isColumnSetChangedOnUpdate(prevProps) {\r\n // Checking if global filter changed in a way that would require grid, column chooser or performance chart to update.\r\n const campaignType = getFilteredCampaignTypeFromRawFilter(this.props[WaterfallFilterType.CampaignType]);\r\n const prevCampaignType = getFilteredCampaignTypeFromRawFilter(prevProps[WaterfallFilterType.CampaignType]);\r\n\r\n // no global filter change\r\n if (campaignType === prevCampaignType) {\r\n return false;\r\n }\r\n\r\n // return true if we entered or left App or All global filter\r\n return campaignType === CampaignType.App || campaignType === CampaignType.All || prevCampaignType === CampaignType.App || prevCampaignType === CampaignType.All;\r\n }\r\n\r\n createGrid(props) {\r\n const {\r\n serverContext,\r\n scope,\r\n preferenceService,\r\n permissions,\r\n crossPageSelectPlugin,\r\n toolbarPlugin,\r\n onGridInjected,\r\n toolbarSelectedConfig,\r\n showTopOfGridPanel,\r\n toolbarUnselectedConfig,\r\n updateToolbar,\r\n siteMap,\r\n i18n: newI18n,\r\n resetToolbarVisibility,\r\n perfMarker,\r\n pageName,\r\n deps,\r\n preexecuteFlag,\r\n theme,\r\n campaignUpgradeProps,\r\n prefetchChunks,\r\n } = props;\r\n\r\n this.contexts = {\r\n serverContext,\r\n scope,\r\n preferenceService,\r\n siteMap,\r\n permissions,\r\n };\r\n\r\n this.columnAction = noop;\r\n this.chartView = null;\r\n this.viewport = React.createRef();\r\n this.scope = scope;\r\n this.willUnMount = false;\r\n\r\n if (perfMarker) {\r\n perfMarker.doneCallback = () => {\r\n eventDispatcher.trigger('campaigns_grid_loaded');\r\n if (isFunction(prefetchChunks)) {\r\n prefetchChunks();\r\n }\r\n };\r\n }\r\n\r\n const phase0SscUpgradedMessageDismissed = preferenceService.findByNameAtAccountLevel('Phase0SscUpgradedMessageDismissed');\r\n const phase12SscUpgradedMessageDismissed = preferenceService.findByNameAtAccountLevel('Phase12SscUpgradedMessageDismissed');\r\n\r\n if (this.state && this.state.backboneGridView) {\r\n this.state.backboneGridView.remove();\r\n }\r\n\r\n if (this.state) {\r\n this.setState({\r\n backboneGridView: null,\r\n phase0SscUpgradedMessageDismissed: !!phase0SscUpgradedMessageDismissed,\r\n phase12SscUpgradedMessageDismissed: !!phase12SscUpgradedMessageDismissed,\r\n });\r\n } else {\r\n this.state = {\r\n backboneGridView: null,\r\n phase0SscUpgradedMessageDismissed: !!phase0SscUpgradedMessageDismissed, // flag from Preference which marks if the user dismissed the message in previous visits\r\n phase12SscUpgradedMessageDismissed: !!phase12SscUpgradedMessageDismissed,\r\n isSscUpgradedMessageDismissed: false, // flag to mark if the message is dismissed in current visit\r\n };\r\n }\r\n const { onSelectCrossPage } = crossPageSelectPlugin;\r\n const campaignsGridPromise = createCampaignsGridForUiNext({\r\n serverContext,\r\n scope,\r\n preferenceService,\r\n permissions,\r\n onSelectCrossPage,\r\n viewport: this.viewport.current,\r\n crossPageSelectPlugin,\r\n toolbarPlugin,\r\n newI18n: props.i18n,\r\n siteMap,\r\n perfMarker,\r\n pageName,\r\n willParentViewUnMount: () => this.willUnMount,\r\n deps,\r\n preexecuteFlag,\r\n theme,\r\n campaignUpgradeProps,\r\n });\r\n\r\n const CampaignsGridView = React.lazy(() => { // eslint-disable-line arrow-body-style\r\n return campaignsGridPromise.then(({\r\n gridView, gridDataSource, filterService, i18n,\r\n }) => {\r\n if (this.willUnMount) {\r\n return {};\r\n }\r\n onGridInjected({\r\n backboneGridView: gridView,\r\n deselectAll: gridView.grid.gridView.deselectAll.bind(gridView.grid.gridView),\r\n });\r\n this.filterService = filterService;\r\n this.i18n = i18n;\r\n\r\n const inlineChartFactory = loadInlineChartWithWebpack;\r\n\r\n inlineChartFactory({\r\n serverContext,\r\n gridView,\r\n gridDataSource: serverContext.DynamicPermissions.CampaignsCombineGridAndChartOdataCallEnabled && gridDataSource,\r\n filterService,\r\n chartContainer: '.campaigns-inline-chart',\r\n entityType: 'Campaign',\r\n preexecuteFlag,\r\n showInContextCard: permissions.dynamic.InContextRecommendationCardPhase1,\r\n recommendationTypes: compact([\r\n RECOMMENDATION_TYPES.CREATE_CONVERSION_GOAL,\r\n RECOMMENDATION_TYPES.SETUP_CONVERSION_TRACKING_OPPORTUNITY,\r\n RECOMMENDATION_TYPES.FIX_CONVERSION_GOAL_SETTINGS,\r\n RECOMMENDATION_TYPES.FIX_CONVERSION_TRACKING_OPPORTUNITY,\r\n RECOMMENDATION_TYPES.BUDGET_OPPORTUNITY,\r\n RECOMMENDATION_TYPES.ADJUST_SHARED_BUDGET_OPPORTUNITY,\r\n RECOMMENDATION_TYPES.SSC_2_PMAX_MIGRATION,\r\n RECOMMENDATION_TYPES.DSA_2_PMAX_MIGRATION,\r\n RECOMMENDATION_TYPES.SYNDICATION_GAP,\r\n ]),\r\n permissions,\r\n scope,\r\n newI18n,\r\n isFluctuationsEnabled: permissions.IsFluctuationEnabled,\r\n perfMarker,\r\n }).then((inlineChartView) => {\r\n this.chartView = inlineChartView;\r\n });\r\n\r\n this.setState({\r\n backboneGridView: gridView,\r\n });\r\n\r\n gridView.grid.gridView.overrideWith = bind(showTopOfGridPanel, this); // eslint-disable-line no-param-reassign\r\n return {\r\n default: () => (),\r\n };\r\n }).bind(this);\r\n });\r\n\r\n const toolbarEditor = getToolbarEditor({\r\n toolbarConfig: { toolbarSelectedConfig, toolbarUnselectedConfig },\r\n updateToolbar,\r\n });\r\n const updateToolbarBinded = bind(toolbarEditor.update, toolbarEditor);\r\n const FilterBarView = React.lazy(() => { // eslint-disable-line arrow-body-style\r\n return campaignsGridPromise.then(({ filterService, filterConfig }) => {\r\n if (this.willUnMount) {\r\n return {};\r\n }\r\n const {\r\n i18n: legacyI18n,\r\n ...filterProps\r\n } = filterConfig;\r\n\r\n const IsRenameHotelToLodgingEnabled = permissions && permissions.dynamic && permissions.dynamic.IsRenameHotelToLodgingEnabled;\r\n if (IsRenameHotelToLodgingEnabled) { // When enable IsRenameHotelToLodgingEnabled, show text as \"Lodging\"\r\n try {\r\n // eslint-disable-next-line no-param-reassign\r\n filterService.entitySchema.properties.CampaignType.enumValueMap[\"Enum.CampaignType'Hotel'\"] = 'Lodging';\r\n } catch (error) { console.log(`Rename hotel to lodging error at campaign page scenario:: ${error}`); }\r\n }\r\n\r\n return {\r\n default: () => (\r\n onBeforeApplySavedFilter({\r\n filters, scope, i18n: newI18n, jsdata,\r\n })}\r\n predicateValueNameGetter={seasonalityPredicateValueNameGetter}\r\n permissions={permissions}\r\n {...filterProps}\r\n />\r\n ),\r\n };\r\n });\r\n });\r\n\r\n this.campaignsGrid = ();\r\n this.filterViewManager = ();\r\n }\r\n\r\n render() {\r\n const {\r\n serverContext: {\r\n CurrentAccount: { TimeZone },\r\n },\r\n panelView,\r\n renderToolbarContainer,\r\n showTopGridPanel,\r\n showInlineChart,\r\n permissions,\r\n } = this.props;\r\n const topGridPanel = showTopGridPanel ? (\r\n ) : null;\r\n const inlineChart = showInlineChart ? this.chartView : null;\r\n\r\n const topOfGridContent = (\r\n }>\r\n \r\n
\r\n
\r\n {inlineChart}\r\n
\r\n
\r\n {topGridPanel}\r\n
\r\n
\r\n );\r\n\r\n const stickyTopOfGridContent = (\r\n \r\n {renderToolbarContainer()}\r\n {this.filterViewManager}\r\n \r\n );\r\n const isSSCUpgradeToPMaxPhase0NotificationEnabled = get(permissions, ['dynamic', 'SSCUpgradeToPMaxNotification'], false);\r\n const isSSCUpgradeToPMaxPhase12NotificationEnabled = get(permissions, ['dynamic', 'SSCUpgradeToPMaxPhase12Notification'], false);\r\n\r\n const showSscUpgradedPhase12Message = isSSCUpgradeToPMaxPhase12NotificationEnabled && !this.state.phase12SscUpgradedMessageDismissed;\r\n // Show the Phase 0 message only if the Phase 12 message is not shown\r\n const showSscUpgradedPhase0Message = isSSCUpgradeToPMaxPhase0NotificationEnabled && !isSSCUpgradeToPMaxPhase12NotificationEnabled && !this.state.phase0SscUpgradedMessageDismissed;\r\n const sscUpgradedMessage = this.getSscUpgradeMessage(showSscUpgradedPhase12Message);\r\n\r\n return (\r\n }>\r\n {(showSscUpgradedPhase0Message || showSscUpgradedPhase12Message) && !this.state.isSscUpgradedMessageDismissed && sscUpgradedMessage}\r\n { this.props.permissions.dynamic && this.props.permissions.dynamic.AutoBiddingCouponCallout &&\r\n \r\n }\r\n { this.props.permissions.dynamic && this.props.permissions.dynamic.FACForShopping &&\r\n window.open(`${location.origin}/campaign/vnext/createcampaign/searchshopping${location.search}`, '_blank')}\r\n scenarioName={ShoppingFACScenario.FACShoppingInCampaignPage}\r\n />\r\n }\r\n \r\n { this.props.permissions.IsNoteEnabled && }\r\n { this.props.permissions.IsNoteEnabled && this.state.backboneGridView.view.selectedItems()}\r\n /> }\r\n {\r\n import(/* webpackMode: 'eager' */'@bingads-webui-static-legacy/summary/SummaryDataContextManager')\r\n .then(({ default: dataContextManager }) => {\r\n dataContextManager.successEmitter.trigger('invalidate', 'Campaign');\r\n this.state.backboneGridView.view.refresh(true);\r\n });\r\n }}\r\n />\r\n \r\n );\r\n }\r\n}\r\n\r\n/* eslint-disable react/forbid-prop-types */\r\nCampaigns.propTypes = {\r\n location: PropTypes.shape({\r\n pathname: PropTypes.string.isRequired,\r\n search: PropTypes.string.isRequired,\r\n }).isRequired,\r\n serverContext: PropTypes.shape({\r\n CurrentAccount: PropTypes.object.isRequired,\r\n CurrentCustomer: PropTypes.object.isRequired,\r\n }).isRequired,\r\n classes: PropTypes.object.isRequired,\r\n scope: PropTypes.object.isRequired,\r\n deps: PropTypes.object,\r\n preferenceService: PropTypes.object.isRequired,\r\n permissions: PropTypes.object.isRequired,\r\n theme: PropTypes.shape({}).isRequired,\r\n siteMap: PropTypes.arrayOf(PropTypes.shape({\r\n id: PropTypes.string,\r\n })).isRequired,\r\n hotKey: PropTypes.string.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n renderToolbarContainer: PropTypes.func.isRequired,\r\n crossPageSelectPlugin: PropTypes.shape({\r\n plugin: PropTypes.func.isRequired,\r\n }).isRequired,\r\n toolbarPlugin: PropTypes.shape({\r\n plugin: PropTypes.func.isRequired,\r\n }).isRequired,\r\n panelView: PropTypes.func,\r\n onGridInjected: PropTypes.func.isRequired,\r\n showInlineChart: PropTypes.bool.isRequired,\r\n showTopGridPanel: PropTypes.bool.isRequired,\r\n toolbarSelectedConfig: PropTypes.object.isRequired, // eslint-disable-line react/forbid-prop-types\r\n toolbarUnselectedConfig: PropTypes.object.isRequired, // eslint-disable-line react/forbid-prop-types\r\n updateToolbar: PropTypes.func.isRequired,\r\n resetToolbarVisibility: PropTypes.func.isRequired,\r\n perfMarker: perfMarkerPropTypes.isRequired,\r\n forceHideToolbar: PropTypes.bool.isRequired,\r\n forceResetScrollFlag: PropTypes.bool.isRequired,\r\n notesPanelProps: PropTypes.shape({\r\n isNotesPanelOpen: PropTypes.bool.isRequired,\r\n openNotesPanel: PropTypes.func.isRequired,\r\n closeNotesPanel: PropTypes.func.isRequired,\r\n }).isRequired,\r\n noteDialogProps: PropTypes.shape({\r\n isNoteDialogOpen: PropTypes.bool.isRequired,\r\n noteDialogMode: PropTypes.string.isRequired,\r\n openCreateNoteDialog: PropTypes.func.isRequired,\r\n closeNoteDialog: PropTypes.func.isRequired,\r\n }).isRequired,\r\n campaignUpgradeProps: PropTypes.shape({\r\n toolbarDropdownText: PropTypes.string.isRequired,\r\n isCampaignUpgradeDialogOpen: PropTypes.bool.isRequired,\r\n openCampaignUpgradeDialog: PropTypes.func.isRequired,\r\n closeCampaignUpgradeDialog: PropTypes.func.isRequired,\r\n selectedCampaigns: PropTypes.arrayOf(PropTypes.shape({\r\n Id: PropTypes.number.isRequired,\r\n })).isRequired,\r\n }).isRequired,\r\n preexecuteFlag: PropTypes.bool,\r\n prefetchChunks: PropTypes.func.isRequired,\r\n};\r\n\r\nCampaigns.defaultProps = {\r\n panelView: null,\r\n preexecuteFlag: false,\r\n deps: {},\r\n};\r\n\r\nexport const StyledCampaigns = compose(\r\n WrappedComponent => withHotKeys(WrappedComponent, ShortcutType.CreateNew),\r\n withI18nConsumer,\r\n WrappedComponent => withSiteMap(withDelayedStyles(WrappedComponent, getDefaultStyles, getDelayedCampaignStyles, 'campaigns_grid_loaded')),\r\n withNoteStateManager,\r\n withCampaignUpgradeManager,\r\n withInstrumentation,\r\n withGlobalFilter,\r\n withTablePageStateManager({ getToolbarConfig })\r\n)(Campaigns);\r\n","import {\r\n paginationStyle,\r\n audienceBulkAssociationStyle,\r\n audienceModalStyles,\r\n audienceExpressionStyle,\r\n kendoMultiSelectStyle,\r\n audienceCombinedListStyle,\r\n labelPopupStyle,\r\n labelColumnHeaderStyle,\r\n getFluctuationGridCellStyle,\r\n getFluctuationLoadingStyle,\r\n getFluctuationTooltipStyle,\r\n getBudgetCenterTooltipStyle,\r\n qualityScorePopupStyle,\r\n entitySelectorStyle,\r\n campaignGridBudgetCenterEntryStyle,\r\n} from '@bingads-webui-campaign-react/common-styles';\r\nimport { cashbackPercentGridCommonStyle } from '@bingads-webui-campaign/personalized-offer-columns';\r\nimport { gridFlexStyle } from '@bingads-webui-campaign-react/grid-flex-style';\r\nimport {\r\n adEditorOverrideStyle,\r\n} from '@bingads-webui-campaign-react/ad-editor-styles';\r\nimport { inlineChartContainerStyle } from '@bingads-webui-campaign-react/inline-chart-style';\r\nimport { pagePaddingStyle } from '@bingads-webui-campaign-react/page-padding-style';\r\n\r\nexport const getTopGridPanelCustomStyles = (_, palette) => (\r\n Object.assign(\r\n {},\r\n {\r\n '& .previewTable tr > td': {\r\n maxWidth: '512px',\r\n wordBreak: 'normal',\r\n overflowWrap: 'anywhere',\r\n },\r\n '& .top-panel-cashback-settings': {\r\n '& .bidding-strategy-form': {\r\n marginTop: 12,\r\n '& .col-sm-6': {\r\n boxSizing: 'content-box',\r\n paddingTop: 5,\r\n '& > .form-control-static': {\r\n paddingBottom: 8,\r\n minHeight: 1,\r\n },\r\n },\r\n '& select': {\r\n margin: '5px 0',\r\n width: 460,\r\n },\r\n '& div[data-bind=\"visible: checkCPC\"]': {\r\n paddingTop: 8,\r\n },\r\n '& input[type=\"checkbox\"]': {\r\n float: 'left',\r\n },\r\n '& .custom-param__key-field': {\r\n display: 'inline-block',\r\n width: 85,\r\n marginLeft: 5,\r\n marginRight: 5,\r\n },\r\n '& #currencyLabelTargetCpa': {\r\n display: 'inline-block',\r\n 'vertical-align': 'initial',\r\n marginTop: 0,\r\n },\r\n '& #currencyLabelTargetRoas': {\r\n display: 'inline-block',\r\n 'vertical-align': 'initial',\r\n marginTop: 0,\r\n },\r\n '& #currencyLabelCostPerSale': {\r\n display: 'inline-block',\r\n 'vertical-align': 'initial',\r\n marginTop: 0,\r\n },\r\n '& .alert.alert-info': {\r\n marginTop: 8,\r\n },\r\n '& a.helpbutton': {\r\n 'margin-left': '5px',\r\n },\r\n },\r\n '& .enable-po-checkbox-container, .cashback-settings, .bidding-strategy-form': {\r\n '& .checkbox-inline .text': {\r\n display: 'inline',\r\n },\r\n '& .col-sm-2, .col-sm-4, .col-sm-8, .col-sm-12, .col-sm-6': {\r\n float: 'none',\r\n paddingLeft: 'unset',\r\n paddingRight: 'unset',\r\n },\r\n '& .alert-div': {\r\n width: '50%',\r\n },\r\n '& .control-label': {\r\n width: 'auto',\r\n },\r\n '& .col-sm-4': {\r\n width: 'auto',\r\n },\r\n '& label': {\r\n display: 'inline-block',\r\n },\r\n '& label.checkbox-inline': {\r\n width: '300px',\r\n },\r\n '& .po-switch-container .HelpTopic': {\r\n marginLeft: '5px',\r\n textDecoration: 'underline',\r\n },\r\n '& .form-group': {\r\n '& .control-label': {\r\n fontSize: 14,\r\n display: 'block',\r\n },\r\n '& .input-group-addon': {\r\n width: 'auto',\r\n },\r\n },\r\n '& .cashback-budget-cap-input': {\r\n width: 168,\r\n },\r\n '& .cashback-percent-input': {\r\n width: 66,\r\n display: 'inline-block',\r\n marginRight: 0,\r\n },\r\n '& .cashback-option-select': {\r\n width: 180,\r\n display: 'inline-block',\r\n marginRight: 10,\r\n },\r\n },\r\n },\r\n\r\n '& .add_icon.spritedimage::before': {\r\n content: '\"\\\\E710\"',\r\n fontFamily: 'MsAds MDL2 Assets',\r\n fontSize: 15,\r\n verticalAlign: 'middle',\r\n marginRight: '5px',\r\n cursor: 'pointer',\r\n },\r\n },\r\n audienceBulkAssociationStyle({ palette }),\r\n paginationStyle({ palette })\r\n )\r\n);\r\n\r\nexport const getCampaignsGridViewStyles = (_, { palette = {}, iconFontFamily = 'MsAds MDL2 Assets' }) => ({\r\n inlineChartContainer: inlineChartContainerStyle(palette),\r\n topGridPanelCustomStyles: getTopGridPanelCustomStyles(_, palette),\r\n '@global': Object.assign(\r\n {\r\n '.optimization_score_with_popover': {\r\n borderBottom: '1px dashed #0078D4',\r\n minWidth: 15,\r\n },\r\n '.performance-insights-status': {\r\n justifyContent: 'center',\r\n backgroundColor: '#F0F0F0',\r\n display: 'flex',\r\n alignItems: 'center',\r\n width: 'fit-content',\r\n height: 24,\r\n borderRadius: 19,\r\n paddingLeft: 8,\r\n paddingRight: 8,\r\n columnGap: 6,\r\n cursor: 'pointer',\r\n },\r\n '.performance-insights-null-status': {\r\n display: 'flex',\r\n },\r\n '.toolbar-container #button-campaign-create .iconba.iconba-Add': {\r\n marginTop: -4,\r\n },\r\n '.ms-Callout-container .import-from-google': {\r\n minWidth: 202,\r\n },\r\n '#bulkEditContainer input[type=\"checkbox\"]': {\r\n float: 'left',\r\n bottom: '0px',\r\n },\r\n '.recommendation-new-ads-inline-view': {\r\n ...adEditorOverrideStyle({ palette }),\r\n },\r\n '.campaign-tab-grid': {\r\n ...getFluctuationGridCellStyle({ palette }),\r\n '& .cashback-budget-container': {\r\n wordBreak: 'break-all',\r\n },\r\n },\r\n '.campaign-creation-success-dialog': {\r\n '& .modal-content': {\r\n width: 600,\r\n '& .modal-header': {\r\n '& button': {\r\n zIndex: 1,\r\n },\r\n },\r\n '& .modal-body': {\r\n marginTop: -62,\r\n '& .success-dialog__header': {\r\n '& h2': {\r\n fontSize: 20,\r\n },\r\n },\r\n '& .success-dialog__content': {\r\n margin: '24px 0',\r\n '& .content-line': {\r\n fontSize: 14,\r\n fontWeight: 'normal',\r\n margin: '10.5px 0',\r\n display: 'block',\r\n },\r\n '@media screen and (-ms-high-contrast: active), (forced-colors: active)': {\r\n '& .campaign-creation-status-icon-active, .horizontal-line-success, .campaign-creation-status-text-active': {\r\n color: 'highlight !important',\r\n },\r\n },\r\n '& .dialog-diagram': {\r\n marginTop: 15,\r\n '& .dialog-diagram__bar': {\r\n width: '100%',\r\n textAlign: 'center',\r\n '& .campaign-creation-status-icon-active': {\r\n fontFamily: iconFontFamily,\r\n color: palette.green,\r\n '&:before': {\r\n content: '\"\\\\E920\"',\r\n },\r\n },\r\n '& .campaign-creation-status-icon-warning': {\r\n fontFamily: iconFontFamily,\r\n color: palette.neutralPrimary,\r\n '&:before': {\r\n content: '\"\\\\E920\"',\r\n },\r\n },\r\n '& .campaign-creation-status-icon-danger': {\r\n fontFamily: iconFontFamily,\r\n color: '#A80000',\r\n '&:before': {\r\n content: '\"\\\\EB90\"',\r\n },\r\n },\r\n '& .campaign-creation-status-icon-inactive': {\r\n fontFamily: iconFontFamily,\r\n color: palette.neutralSecondary,\r\n '&:before': {\r\n content: '\"\\\\E920\"',\r\n },\r\n },\r\n '& .horizontal-line-1of3rd': {\r\n display: 'inline-block',\r\n width: 150,\r\n margin: '5px -1px',\r\n border: `1px solid ${palette.neutralSecondary}`,\r\n },\r\n '& .horizontal-line-1of2rd': {\r\n display: 'inline-block',\r\n width: 225,\r\n margin: '5px -1px',\r\n border: `1px solid ${palette.neutralSecondary}`,\r\n },\r\n '& .horizontal-line-success': {\r\n borderColor: palette.green,\r\n },\r\n },\r\n '& .dialog-diagram__row': {\r\n width: '100%',\r\n display: 'flex',\r\n flexDirection: 'row',\r\n justifyContent: 'space-between',\r\n alignItems: 'flex-start',\r\n '& .dialog-diagram__row__cell': {\r\n flex: '0 0 auto',\r\n display: 'inline-block',\r\n width: 100,\r\n textAlign: 'center',\r\n fontSize: 12,\r\n },\r\n '& .campaign-creation-status-text-active': {\r\n color: palette.green,\r\n },\r\n '& .campaign-creation-status-text-warning': {\r\n color: palette.neutralPrimary,\r\n },\r\n '& .campaign-creation-status-text-danger': {\r\n color: '#A80000',\r\n },\r\n },\r\n },\r\n '& .dialog-form': {\r\n marginTop: 20,\r\n '& .btn': {\r\n lineHeight: '28px',\r\n },\r\n },\r\n },\r\n },\r\n },\r\n },\r\n '.doubleListBoxContainer.association__create': {\r\n width: '99%',\r\n },\r\n ...campaignGridBudgetCenterEntryStyle({ palette }),\r\n },\r\n pagePaddingStyle(),\r\n cashbackPercentGridCommonStyle({ palette }),\r\n qualityScorePopupStyle(),\r\n gridFlexStyle({ palette }),\r\n labelPopupStyle({ palette }),\r\n labelColumnHeaderStyle(),\r\n audienceModalStyles({ palette }),\r\n audienceExpressionStyle(),\r\n audienceCombinedListStyle({ palette }),\r\n kendoMultiSelectStyle({ palette }),\r\n getFluctuationLoadingStyle(),\r\n getFluctuationTooltipStyle(),\r\n getBudgetCenterTooltipStyle(),\r\n entitySelectorStyle({ palette }),\r\n paginationStyle({ palette })\r\n ),\r\n});\r\n\r\n","import { loadPageWebpack } from './legacy-bootstrap-utils';\r\nimport { withPrefetch } from '../components/utils';\r\n\r\nconst importPage = () => import(/* webpackMode: \"eager\" */ '@bingads-webui-campaign-react/campaigns-page');\r\n\r\nconst prefetchChunks = () => {\r\n import(/* webpackChunkName: \"campaign-onboarding-v2-page\" */ '../feature-bootstrap/campaign-onboarding-v2-page');\r\n};\r\n\r\nconst Feature = loadPageWebpack({\r\n importFeature: () => importPage()\r\n .then(({ StyledCampaigns }) => withPrefetch(StyledCampaigns, prefetchChunks)),\r\n importL10n: () => import(/* webpackChunkName: \"campaigns-page.dynamic.l10n\" */'./campaigns-page.l10n'),\r\n hasLegacyI18n: true,\r\n});\r\n\r\nexport default Feature;\r\n"],"names":["iconButtonStyles","root","color","marginLeft","marginTop","marginRight","cancelIcon","iconName","CloseIconButton","_ref","closeButtonAriaLabel","onClick","_jsx","IconButton","styles","iconProps","ariaLabel","headerTextStyles","mergeStyles","fontStyle","fontWeight","fontSize","lineHeight","HeaderWrapped","withI18nConsumer","text","onCloseButtonClick","i18n","_jsxs","Stack","horizontal","horizontalAlign","verticalAlign","marginBottom","children","className","getString","_TL_","CCUI_PREFERENCE_KEY","buildHideCouponCalloutKey","couponId","aid","concat","getDaysFromNow","days","date","Date","now","setDate","getDate","useHideCalloutPreference","uid","coupon","_useState","useState","_useState2","_slicedToArray","userPreferencesLoaded","setUserPreferencesLoaded","_useState3","_useState4","hideCalloutPreference","setHideCalloutPreference","ccJsData","useJsDataContext","scope","useContext","ScopeContext","instrumentation","InstrumentationContext","activity","useMemo","createScenarioAndActivity","scenarioName","activityName","useEffect","UserPreference","findAll","then","data","length","userPreferences","_","userPreference","upkey","resultAsJsonString","preferenceJson","JSON","parse","decodeURIComponent","hideCouponCallout","id","e","SyntaxError","trace","hideCalloutForEver","useCallback","hideCouponCalloutData","hide","endDate","stringify","_defineProperty","create","hideCalloutFor7Days","isPreferenceSetToHidden","isAfterDismissEndDate","isDisplayCalloutQuery","displayQueryCallout","values","isCalloutHidden","FAC_STATUS","Object","freeze","NOT_IN_PROGRESS","CCUIConstants","RecommendationAdoptionStatus","NotInProgess","ACTIVE","Active","ADOPTED","Adopted","AUTO_BIDDING_FEATURE_IDS","MAX_CLICKS","parseInt","FAC_FEATURE_ID","AUTO_BIDDING_MAX_CLICKS","MAX_CONVERSIONS","AUTO_BIDDING_MAX_CONVERSIONS","useAutoBiddingFac","serverContext","ServerContext","I18nContext","getCoupon","FeatureAdoptionCoupon","CurrentAccount","Id","catch","err","coupons","Status","FeatureId","CouponUpfrontSpend","updateCouponStatus","status","update","adoption","_objectSpread","activateCoupon","adoptCoupon","getFormattedCurrencyValue","value","getCurrencyText","currencyCode","CurrencyCode","amount","maxFractionDigits","hideCurrencyCode","edmCampaign","types","resolve","ResourceIdentifier","featureIdToCampaignFiltering","campaignTypeFiltering","biddingStrategyTypeFiltering","search","searchQuery","toString","toLowerCase","and","_len","arguments","filters","Array","_key","map","filter","join","or","_len2","_key2","setFilter","filterString","toQueryString","encodeURI","selectCampaignsIds","ids","useCampaignFiltering","campaignFiltering","BID_STRATEGY_TYPES","FEATURE_ID_TO_BID_STRATEGY_TYPE","TASK_STATUS","COMPLETED","COMPLETED_WITH_ERRORS","PENDING_FILE_UPLOAD","baseBulkActionPayload","Entity","BatchAction","Actions","Property","ActionType","Value","Selection","QueryString","CampaignId","AdGroupId","Description","PreviewCompositeIds","verifyTaskCompletion","response","onTaskSuccess","dispatchPoll","odata","get","StepWrapper","props","onClose","formattedCouponValue","CouponValue","headerText","replace","_Fragment","Header","StepWrapperCompletionConfirmation","selectedCampaigns","areCampaignsSelected","buttonStyles","width","height","withCustomStyle","Component","ComponentWithStyles","classNames","defaultProps","DefaultButton","FluentDefaultButton","PrimaryButton","FluentPrimaryButton","blockUiContainer","position","backgroundColor","zIndex","top","right","bottom","left","cursor","blockUiOverlay","reactBlockUi","minHeight","UiBlocker","blocking","loadingText","Spinner","size","SpinnerSize","large","label","labelPosition","frontdoorStyles","descriptionStyles","couponImageStyles","nextButtonStyles","margin","CouponFrontdoor","onNext","CurrentUser","_useHideCalloutPrefer","_useAutoBiddingFac","doNotShowAgainCheck","setDoNotShowAgainCheck","isActivatingCoupon","setIsActivatingCoupon","onNextClick","notificationApi","showWarning","onCloseClick","formattedCouponUpfrontSpend","descriptionText","alt","src","CouponIcon","Checkbox","onChange","CAMPAIGN_SELECTION_MODES","ALL","SPECIFIC","choiceGroupStyles","paddingLeft","footerStyles","fieldStyles","field","padding","CampaignSelectionMode","campaignSelectionMode","setCampaignSelectionMode","goToSpecificCampaignSelection","applyChangesToAllCampaigns","options","key","onCampaignSelectionModeChange","ev","option","ChoiceGroup","defaultSelectedKey","DataSource","campaignData","_useContext","DoubleListBoxContext","_useContext$state","state","pageSize","pageNumber","dispatch","camp","name","Name","type","items","item","includes","start","end","payload","slice","totalCount","propTypes","PropTypes","isRequired","CampaignData","_useCampaignFiltering","campaignSearch","campaignSelectionConfigs","baseConfigs","select","orderby","where","CampaignOData","call","_ref2","currentAccount","Campaigns","fallback","onError","campaignLoadResult","CampaignSelectionDoubleListBox","onSelectionChange","dlbRef","useRef","DoubleListBoxContextProvider","DoubleListBox","componentRef","campaignSelectionStyles","SpecificCampaignSelection","onBack","setSelectedCampaigns","anySelectedCampaigns","disabled","stackStyles","spinnerStyles","loadingMessageStyles","ApplyingChanges","CAMPAIGN_SELECTION_STEPS","SELECTION_MODE","SPECIFIC_CAMPAIGN_SELECTION","APPLYING_CHANGES","CampaignAutobiddingSelection","_useBulkSession","getBulkActionPayload","Type","updateCampaigns","bulkActionPayload","post","useBulkSession","currentStep","setCurrentStep","applyChangesToCampaigns","campaignSelectionContent","goToConfirmationStep","completionConfirmationStyles","CompletionConfirmation","couponDetailsUrl","ServicesEndpoints","ClientCenterUIAPI","CurrentCustomer","Link","href","AUTOBIDDING_COUPON_STEPS","FRONTDOOR","CAMPAIGN_SELECTION","COMPLETION_CONFIRMATION","modalStyles","minWidth","overlayStyles","AutoBiddingCouponCallout","_useBoolean","useBoolean","_useBoolean2","isModalOpen","_useBoolean2$","showModal","setTrue","hideModal","setFalse","setCoupon","_useState5","_useState6","autoBiddingCoupon","hideCalloutFor7DaysOnClose","hideCalloutForEverOnClose","modalContent","Modal","isOpen","overlay","isBlocking","selectionStatePlugin","definePlugin","gridView","crossPageSelectAll","selectedKeys","primaryKey","on","selections","countRows","isAllSelected","success","keysAfterReload","once","keys","selected","rowsToSelect","rowsToDeselect","selection","resolver","selectRow","set","deselectRow","trigger","setSelectedKeys","AllowedGridEntityTypes","trackingPlugin","config","_$result","plugins","entityType","trackers","enabled","remove","x","close","noop","getAdditionalPlugins","gridName","toolbarPlugin","filterService","appConfig","ChangeStatusView","ChangeStatusModel","ChangeBidStrategyModel","ChangeBidStrategyView","ChangeLanguageView","ChangeLanguageModel","CopyPaste","crossPageSelectPlugin","newI18n","i18nGlobal","appState","stateManager","preferenceService","i18nErrors","jsData","LabelAssociationView","dataContextManager","cacheService","s$label","router","permissions","edm","getCampaignTypeGlobalFilter","perfMarker","campaignUpgradeProps","enableSelectionState","dynamic","SelectionStatePluginOnCampaign","pausedCampaignImportNotificationActivity","BudgetBidCampaignImportNotificationActivity","bulkEditPlugin","campaignBulkEdit","Deleted","Paused","Suspended","EnumPaused","EnumBudgetPaused","EnumBudgetUserPaused","ChangeBudgetView","ChangeBudgetModel","ChangeCashbackBudgetView","ChangeCashbackBudgetModel","ChangeCashbackPercentView","ChangeCashbackPercentModel","BulkCampaignExclusionsView","AudienceAssociationView","AudienceAssociationModel","ChangeRsaAutoAssetsView","ChangeRsaAutoAssetsModel","i18nNewDesign","isForVNext","qualtricsSurveyCallback","triggerQualtricsEvent","importNotificationCallback","campaignItemList","updateStatus","showPausedCampaignNotifications","importBudgetBidNotificationCallback","_ref3","newBudget","newBidStrategy","showBudgetBidCampaignNotifications","disableDeselectAll","plugin","automatedRulesPlugin","entityName","currentUserId","accountTimeZone","accountCurrencyCode","stateMgr","preferenceSvc","appCfg","bidRange","budgetRange","DailyRange","CampaignAdgroupSelectorEdmView","currentEntity","getEntityFromScope","PredicateListReact","PredicateList","labelsPlugin","jsdata","projectionGridScopeNavigator","projectionGridPopupPlugin","selector","outerSelector","container","content","qualityScoreContentTemplate","title","qualityScoreTitleTemplate","placeholderPlugin","footerVisableElement","filteredContainer","filteredEmptyText","pastePlugin","ViewTracker","timeWindow","IsTrackingPluginEnabled","_toConsumableArray","GridFlexLayout","projectionGridScrollbarPlugin","scrollElementSelector","projectionGridFlexColumnResize","softDependencies","getPGridColumnResizePlugin","window","globalLegacyI18n","legacyGlobalI18n","schemaI18nCampaign","createCampaignsGridForUiNext","siteMap","pageName","willParentViewUnMount","_ref$deps","deps","_ref$preexecuteFlag","preexecuteFlag","theme","Promise","getCampaignsGridFactory","createCampaignsGrid","legacyDeps","customColumnPreference","sessionStore","preferenceStoreFactory","getFilters","ColumnChooserPreference","SegmentationPreference","fetchPagination","dateUtil","fetchSortInfo","getColumnsMap","getBaseColumnsByType","logger","getSegPreference","getSegType","fetchPaginationConfig","getGridName","errorId","flucActivity","fluctuationScenario","fluctuation","fluctuationInstr","scopeAdapter","extend","customerId","cid","accountId","campaignId","edmEntity","waterfallFilterStorage","WaterfallFilterStorage","getRouteTo","navigateToRoute","getRouterDep","getRoutePathById","pageId","getGridPreferences","format","formatDate","segmentTimeChecker","preferenceConfig","dataSourceWithInjection","getDataSourceWithInjection","CampaignFilterImprovementEnabled","customDataSource","filterConfig","cachedDataSource","dataSource","cachedFilterService","getFilterConfigWithInjection","cachedEntitySchema","entitySchema","schemaProcessor","FilterService","_options","afterFindAll","resources","attrs","undefined","useDfmCache","headers","App","views","alertCenter","dismiss","isArray","forEach","v","AvailableInsightTypeIds","unfilteredTotals","raw","show","message","level","dismissible","queryBuilder","getDecoratorByName","dummyDataSource","WaterfallFilterType","CampaignType","rawFilter","chain","first","result","getFilteredCampaignTypeFromRawFilter","addDateChangeListener","p$daterange","dateFilter","waterfallDateFilterProcessor","DateFilter","isDataFetchManagerSource","cacheManager","preferenceServiceLegacy","Label","viewport","$","campaignTabPerfMarker","customHeaderOffset","azureUrlRewrite","gridDataSource","automatedRuleConfig","onBeforeApplySavedFilter","query","seasonalityId","$and","each","clause","SeasonalityAdjustmentId","$eq","getSeasonalityAdjustmentId","updateSeasonalityNameFromMT","React","ShoppingCouponCallout","StyledCampaignUpgradeDialog","getDelayedCampaignStyles","getDelayedStyles","getCampaignsGridViewStyles","getDefaultStyles","inlineChartContainer","display","messageBarStyle","background","StyledGridViewWrapperWithFilterContext","withGlobalFilter","StyledGridViewWrapper","_React$PureComponent","_this","_classCallCheck","_callSuper","columnAction","chartView","createGrid","_inherits","_createClass","pageContainer","document","querySelector","addEventListener","dismissPopupIfExist","getElementById","prevProps","this","hotKey","save","isColumnSetChangedOnUpdate","backboneGridView","grid","columnChooser","restoreToolbar","willUnMount","showPhase12Message","_this2","messageContent","MessageBar","isMultiline","messageBarIconProps","onDismiss","isUndefined","preferenceName","stateKey","setAtAccountLevel","Data","setState","onDismissSscUpgradeBanner","ReactTemplate","template","model","learnMore","target","campaignType","prevCampaignType","All","_this3","onGridInjected","toolbarSelectedConfig","showTopOfGridPanel","toolbarUnselectedConfig","updateToolbar","resetToolbarVisibility","prefetchChunks","contexts","doneCallback","eventDispatcher","isFunction","phase0SscUpgradedMessageDismissed","findByNameAtAccountLevel","phase12SscUpgradedMessageDismissed","isSscUpgradedMessageDismissed","onSelectCrossPage","campaignsGridPromise","current","CampaignsGridView","deselectAll","bind","inlineChartFactory","loadInlineChartWithWebpack","DynamicPermissions","CampaignsCombineGridAndChartOdataCallEnabled","chartContainer","showInContextCard","InContextRecommendationCardPhase1","recommendationTypes","compact","RECOMMENDATION_TYPES","CREATE_CONVERSION_GOAL","SETUP_CONVERSION_TRACKING_OPPORTUNITY","FIX_CONVERSION_GOAL_SETTINGS","FIX_CONVERSION_TRACKING_OPPORTUNITY","BUDGET_OPPORTUNITY","ADJUST_SHARED_BUDGET_OPPORTUNITY","SSC_2_PMAX_MIGRATION","DSA_2_PMAX_MIGRATION","SYNDICATION_GAP","isFluctuationsEnabled","IsFluctuationEnabled","inlineChartView","overrideWith","default","gridClassName","toolbarEditor","getToolbarEditor","toolbarConfig","updateToolbarBinded","FilterBarView","legacyI18n","filterProps","_objectWithoutProperties","_excluded","IsRenameHotelToLodgingEnabled","properties","enumValueMap","error","console","log","FilterViewManagerWithGlobalFilterContext","readOnlyProperties","beforeApplySavedFilter","predicateValueNameGetter","seasonalityPredicateValueNameGetter","campaignsGrid","filterViewManager","_this4","_this$props","TimeZone","panelView","renderToolbarContainer","showTopGridPanel","showInlineChart","topGridPanel","TopGridPanel","customClasses","topGridPanelCustomStyles","classes","inlineChart","topOfGridContent","ProgressiveLoadingBlock","Fragment","stickyTopOfGridContent","isSSCUpgradeToPMaxPhase0NotificationEnabled","isSSCUpgradeToPMaxPhase12NotificationEnabled","showSscUpgradedPhase12Message","showSscUpgradedPhase0Message","sscUpgradedMessage","getSscUpgradeMessage","FACForShopping","activeSuccessCallback","open","location","origin","ShoppingFACScenario","FACShoppingInCampaignPage","StyledTablePageContainer","tablePageContainer","gridContainer","gridViewContainer","timeZone","scrollToTop","forceHideToolbar","forceResetScrollFlag","CustomDisclaimerBanner","IsInStoreVisitGoalEnabled","DisclaimerBannerWithInstore","IsNoteEnabled","NotesPanel","notesPanelProps","openCreateNoteDialog","noteDialogProps","NoteDialog","getSelectedItems","view","selectedItems","refreshGrid","_ref4","successEmitter","refresh","StyledCampaigns","compose","WrappedComponent","withHotKeys","ShortcutType","CreateNew","withSiteMap","withDelayedStyles","withNoteStateManager","withCampaignUpgradeManager","withInstrumentation","withTablePageStateManager","getToolbarConfig","isCurrentAccountInActive","importIntegrationLogger","newUICreateCampaignImportIntegration","importIntegration","isFallbackEnabled","noteCreationButtonConfig","Map","toolbarUnselectedItems","iconLeftGlyphName","primary","split","splitButtonAriaLabel","menuProps","IsDomesticSimplifiedChineseEnabled","FacebookImport","IsAmazonImportEnabled","noResponsive","IsReadOnlyUser","localStorage","getLocalStorage","supportsStorage","isAdvancedFilterEnabled","isCustomItemRenderingEnabled","IsCampaignAdGroupCopyPasteEnabled","push","openNotesPanelButtonConfig","openNotesPanel","_ref5","getTopGridPanelCustomStyles","palette","assign","maxWidth","wordBreak","overflowWrap","boxSizing","paddingTop","paddingBottom","float","paddingRight","textDecoration","fontFamily","audienceBulkAssociationStyle","paginationStyle","_ref$palette","_ref$iconFontFamily","iconFontFamily","inlineChartContainerStyle","borderBottom","justifyContent","alignItems","borderRadius","columnGap","adEditorOverrideStyle","getFluctuationGridCellStyle","textAlign","green","neutralPrimary","neutralSecondary","border","borderColor","flexDirection","flex","campaignGridBudgetCenterEntryStyle","pagePaddingStyle","cashbackPercentGridCommonStyle","qualityScorePopupStyle","gridFlexStyle","labelPopupStyle","labelColumnHeaderStyle","audienceModalStyles","audienceExpressionStyle","audienceCombinedListStyle","kendoMultiSelectStyle","getFluctuationLoadingStyle","getFluctuationTooltipStyle","getBudgetCenterTooltipStyle","entitySelectorStyle","Feature","loadPageWebpack","importFeature","withPrefetch","importL10n","hasLegacyI18n"],"sourceRoot":""}