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AI,SAAAC,GAAK,OAAIA,EAAMuU,OAAO,IAAI,SAErFlV,EAAAA,EAAAA,KAACyyC,EAAS,CACR9wC,KAAMA,EACN0jE,0BAA2B,WAAF,OAAQxkE,IAAAA,IAAM,EACvC6xC,IAAKwyB,EACLtyB,mBAAiB,EACjBC,oBAAqBjG,GACrBkG,wBAAsB,EACtBlkB,YAAaA,EACbg/C,oBAAqBA,QAGzB5tE,EAAAA,EAAAA,KAACwyC,GAAAA,EAAO,KACRxyC,EAAAA,EAAAA,KAAC2zF,GAAc,CACbC,OAtDK,WACbxoB,GACF,EAqDU5vC,KAAM,WAAF,OAAQA,IAAK,EAAM,EACvBq4D,qBAAsB,WAAF,OAAQr4D,IAAK,EAAK,UAKlD,EA4BAypC,GAAS7jE,aAAe,CACtB+jE,aAAc,KACdqqB,cAAe,CAAC,EAChBE,wBAAwB,EACxB/kB,mBAAmB,GAIrB,IAAM2qB,IAA2B5oB,EAAAA,EAAAA,KAAmB5qB,EAAAA,GAAAA,IAClDmjB,GACA,0B","sources":["../../../../component-react/packages/web-exclusions/src/exclusion-errors.js","../../../../component-react/packages/web-exclusions/src/ip-exclusions.js","../../../../component-react/packages/web-exclusions/src/styles/site-exclusion-note-style.js","../../../../component-react/packages/web-exclusions/src/site-exclusions-note.js","../../../../component-react/packages/web-exclusions/src/site-exclusions.js","../../../../component-react/packages/web-exclusions/src/web-exclusions.js","../../../../component-react/packages/web-exclusions/util/web-exclusions.util.ts","../../../../component-react/packages/web-exclusions/src/server-validated-web-exclusions.js","../../../../component-react/packages/web-exclusions/src/web-exclusions-section.js","../../../../component-react/packages/website-list-selector/src/types/exclusion-lists.tsx","../../../../component-react/packages/website-list-selector/src/custom-tag-item-renderer.tsx","../../../../component-react/packages/website-list-selector/src/utils.ts","../../../../component-react/packages/website-list-selector/src/types/api.ts","../../../../component-react/packages/website-list-selector/src/repository.ts","../../../../component-react/packages/website-list-selector/src/main.tsx","../../../../component-react/packages/with-props/src/with-props.js","../../../../component-react/packages/with-store-details/src/style.js","../../../../component-react/packages/with-store-details/src/with-store-from-provider-id.js","../../../../component-react/packages/with-store-details/src/shared.js","../../../../component-react/packages/with-store-details/src/with-store-url.js","../../../../component-react/packages/wizard-performance-marker/src/utils.js","../../../../component-react/packages/wizard-performance-marker/src/step-perf-marker.js","../../../../component-react/packages/wizard-performance-marker/src/wizard-perf-marker.js","../../../../component-react/packages/wizard-shared-components/src/utils/shared.js","../../../../component-react/packages/wizard-shared-components/src/components/name.js","../../../../component-react/packages/wizard-shared-components/src/utils/location-target-shared.js","../../../../component-react/packages/wizard-shared-components/src/components/specific-location-targets-editor.js","../../../../component-react/packages/wizard-shared-components/src/components/shimmers/single-line-shimmer.js","../../../../component-react/packages/wizard-shared-components/src/components/shimmers/section-shimmer.js","../../../../component-react/packages/wizard-shared-components/src/components/shimmers/ad-schedule-shimmer.js","../../../../component-react/packages/wizard-shared-components/src/components/shimmers/radius-shimmer.js","../../../../component-react/packages/wizard-shared-components/src/components/shimmers/audience-signal-shimmer.js","../../../../component-react/packages/wizard-shared-components/src/components/shimmers/with-shimmer.js","../../../../component-react/packages/wizard-shared-components/src/constants/error_entity.js","../../../../component-react/packages/wizard-shared-components/src/constants/default-data.js","../../../../component-react/packages/wizard-shared-components/src/constants/campaign-language.js","../../../../component-react/packages/wizard-shared-components/src/components/validated-campaign-name.js","../../../../component-react/packages/wizard-shared-components/src/components/panels/campaign-name-panel.js","../../../../component-react/packages/wizard-shared-components/src/components/panels/panel-keys.js","../../../../component-react/packages/wizard-shared-components/src/components/validated-language-target.js","../../../../component-react/packages/wizard-shared-components/src/components/panels/language-target-panel.js","../../../../component-react/packages/wizard-shared-components/src/utils/ad-schedule-shared.js","../../../../component-react/packages/wizard-shared-components/src/components/panels/ad-schedule-panel.js","../../../../component-react/packages/wizard-shared-components/src/components/panels/single-language-target-panel.js","../../../../component-react/packages/wizard-shared-components/src/utils/use-localize-budget.js","../../../../component-react/packages/wizard-shared-components/src/components/panels/budget-panel.js","../../../../component-react/packages/wizard-shared-components/src/components/panels/date-settings-panel.js","../../../../component-react/packages/wizard-shared-components/src/components/shimmers/date-settings-shimmer.js","../../../../component-react/packages/wizard-shared-components/src/components/panels/short-headlines-panel.js","../../../../component-react/packages/wizard-shared-components/src/components/panels/descriptions-panel.js","../../../../component-react/packages/wizard-shared-components/src/components/panels/images-panel.js","../../../../component-react/packages/wizard-shared-components/src/components/conversion-based-bidding-banner.js","../../../../component-react/packages/wizard-shared-components/src/components/panels/bid-strategy-panel.js","../../../../component-react/packages/wizard-shared-components/src/components/panels/url-options-panel.js","../../../../component-react/packages/wizard-shared-components/src/components/sections/bid-value.js","../../../../component-react/packages/wizard-shared-components/src/components/panels/bid-value-panel.js","../../../../component-react/packages/wizard-shared-components/src/components/panels/app-details-panel.js","../../../../component-react/packages/wizard-shared-components/src/components/sections/audience-signal-section.js","../../../../component-react/packages/wizard-shared-components/src/utils/data-converter.js","../../../../component-react/packages/wizard-shared-components/src/utils/p$dadeRange.js","../../../../component-react/packages/wizard-shared-components/src/utils/conversion-goal-shared.js","../../../../component-react/packages/wizard-shared-components/src/utils/final-url-expansion-shared.js","../../../../component-react/packages/wizard-shared-components/src/utils/bid-budget-shared.js","../../../../component-react/packages/wizard-shared-components/src/utils/listing-group-shared.js","../../../../component-react/packages/wizard-shared-components/src/utils/store-shared.js","../../../../component-react/packages/wizard-shared-components/src/utils/search-themes-shared.js","../../../../component-react/packages/wizard-shared-components/src/utils/disclaimer-shared.js","../../../../component-react/packages/wizard-shared-components/src/constants/localization-keys.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/styles.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/cropped-preview.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/image-targets.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/ad-preview.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/pagination.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/model/utl.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/add-image/add-image.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/populate-images.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/model/constants.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/validated-image-experience.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/display-ad-panel.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/display-ads-container.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/validated-legacy-call-to-action.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/use-display-ads-copilot.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/display-ad-panel-with-copilot.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/view-all-recommendations-panel.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/carousel-style.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/display-ads-suggestion-carousel.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/creative-workbench.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/ratio-picker.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/create-another-ad-menu.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/create-ad-with-ai-dialog.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/use-create-ads.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/display-ads-container-with-copilot.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/ad-editor.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/display-ads-with-copilot.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/model/verified-tracking-setting.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/wizards/use-display-ads-repository.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/wizards/edit-ad-footer.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/wizards/edit-display-ad-wizard.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/common/shared-components.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/ad-components/styles.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/ad-components/ad-preview.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/ad-components/add-video-button.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/ad-components/carousel-style.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/ad-components/video-suggestion-card.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/ad-components/video-recommendations-panel.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/ad-components/video-ads-suggestion-carousel.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/ad-components/use-video-ads-copilot.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/ad-components/video-metadata.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/common/bulk.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/common/bulk-upsert-errors.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/common/map-bulk-upsert-errors.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/common/deal-detils-style.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/common/target-constants.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/common/deal-constraints/targets-constraints.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/common/account-currency-daily-exchange-rate.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/common/deal-details.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/common/format-numbers.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/model/ad.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/model/ad-bulk.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/common/fetch-exchange-rate-mapping.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/common/utils.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/ad-components/validated-video-experience.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/ad-components/final-url.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/ad-components/video-panel.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/ad-components/page-manager.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/ad-components/video-ads-container.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/model/deal.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/ad-components/ad-editor-footer.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/ad-components/ad-editor.js"],"sourcesContent":["import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\n\r\nconst ErrorReason = ({ reason }) => (\r\n
\r\n {reason}\r\n
\r\n);\r\n\r\nErrorReason.propTypes = {\r\n reason: PropTypes.string.isRequired,\r\n};\r\n\r\nexport const ExclusionErrors = ({ errors }) => (\r\n errors.map(error => (\r\n
\r\n {_.isEmpty(error.Value) ? : error.Value.map(value => (\r\n \r\n {value}:\r\n \r\n \r\n ))}\r\n
\r\n ))\r\n);\r\n\r\nExclusionErrors.propTypes = {\r\n errors: PropTypes.shape([]),\r\n};\r\n\r\nExclusionErrors.defaultProps = {\r\n errors: [],\r\n};\r\n","import React, { useState, useCallback, useContext, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { TextField, Text, Stack } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { HelpButton } from '@bingads-webui-react/help-popup';\r\nimport { ExclusionErrors } from './exclusion-errors';\r\n\r\nconst textStyles = { root: { fontWeight: 600 } };\r\n\r\nexport const IpExclusions = ({\r\n exclusions, placeholder, handleExclusionInputChange, errors,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n const [exclusionList, setExclusionList] = useState(exclusions);\r\n\r\n useMemo(() => {\r\n setExclusionList(exclusions);\r\n }, [exclusions]);\r\n\r\n const handleExclusionTextFieldChange = useCallback(\r\n (input) => {\r\n setExclusionList(input.target.value);\r\n handleExclusionInputChange({ value: input.target.value, type: 'ExcludedIPs' });\r\n },\r\n [setExclusionList, handleExclusionInputChange]\r\n );\r\n\r\n return (\r\n
\r\n \r\n {i18n.getString(_TL_('IP address'))}\r\n \r\n \r\n\r\n \r\n {!placeholder && (\r\n {i18n.getString(_TL_('Enter IP addresses or a range of IP addresses that will be blocked from seeing your ad, one IP address per line.'))}\r\n )}\r\n \r\n\r\n {errors && errors.length > 0 && (\r\n
\r\n \r\n
\r\n )}\r\n
\r\n
\r\n );\r\n};\r\n\r\nIpExclusions.propTypes = {\r\n exclusions: PropTypes.string.isRequired,\r\n placeholder: PropTypes.string,\r\n handleExclusionInputChange: PropTypes.func.isRequired,\r\n errors: PropTypes.shape([]),\r\n};\r\n\r\nIpExclusions.defaultProps = {\r\n errors: [],\r\n placeholder: '',\r\n};\r\n","\r\nexport const getStyles = () => ({\r\n link: {\r\n paddingLeft: 10,\r\n },\r\n});\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { withSiteMap, getRoutePathById } from '@bingads-webui-react/with-site-map';\r\nimport { Link, Text } from '@fluentui/react-components';\r\nimport { MessageBar, MessageBarTitle, MessageBarBody } from '@fluentui/react-message-bar';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { ScopeLevel } from '@bingads-webui-campaign-react/constants';\r\nimport { PermissionsContext } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { getStyles } from './styles/site-exclusion-note-style';\r\n\r\nconst SiteExclusionNoteBase = ({ level, siteMap }) => {\r\n const i18n = useContext(I18nContext);\r\n const path = getRoutePathById(siteMap, 'site-exclusion-lists-entrypoint');\r\n const classes = useDefaultStyles(getStyles);\r\n const { dynamic: { AWFWebExclusionsWarning: showAWFWarning } } = useContext(PermissionsContext);\r\n\r\n return (\r\n
\r\n \r\n \r\n {i18n.getString(_TL_('Note'))}\r\n {level === ScopeLevel.AdGroup ? (\r\n {showAWFWarning ? i18n.getString(_TL_('Add websites to exclude at the ad group level below. Any account-level website exclusion lists will also be applied to this ad group. Please note that Audience campaigns will always serve on Microsoft sites (e.g., Microsoft Bing, Microsoft Casual Games, MSN, and Outlook.com) even if you\\'ve added website exclusions for them.')) : i18n.getString(_TL_('Add websites to exclude at the ad group level below. Any account-level website exclusion lists will also be applied to this ad group.'))}\r\n ) : (\r\n {showAWFWarning ? i18n.getString(_TL_('Add websites to exclude at the campaign level below. Any account-level website exclusion lists will also be applied to this campaign. Please note that Audience campaigns will always serve on Microsoft sites (e.g., Microsoft Bing, Microsoft Casual Games, MSN, and Outlook.com) even if you\\'ve added website exclusions for them.')) : i18n.getString(_TL_('Add websites to exclude at the campaign level below. Any account-level website exclusion lists will also be applied to this campaign.'))}\r\n )}\r\n {path && (\r\n \r\n \r\n \r\n {i18n.getString(_TL_('View account-level website exclusion lists'))}\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nSiteExclusionNoteBase.propTypes = {\r\n level: PropTypes.string.isRequired,\r\n siteMap: PropTypes.shape({}).isRequired,\r\n};\r\n\r\nexport const SiteExclusionNote = withSiteMap(SiteExclusionNoteBase);\r\n","import React, { useState, useCallback, useContext, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { TextField, Text, Stack } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { HelpButton } from '@bingads-webui-react/help-popup';\r\nimport { ScopeLevel } from '@bingads-webui-campaign-react/constants';\r\nimport { ExclusionErrors } from './exclusion-errors';\r\nimport { SiteExclusionNote } from './site-exclusions-note';\r\n\r\nconst textFieldStyles = { fieldGroup: { borderColor: '#D1D1D1' } };\r\nconst textStyles = { root: { fontWeight: 600 } };\r\n\r\nexport const SiteExclusions = ({\r\n level, placeholder, exclusions, readOnlyExclusions, handleExclusionInputChange, errors,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n const [exclusionList, setExclusionList] = useState(exclusions);\r\n\r\n useMemo(() => {\r\n setExclusionList(exclusions);\r\n }, [exclusions]);\r\n\r\n const handleExclusionTextFieldChange = useCallback(\r\n (input) => {\r\n setExclusionList(input.target.value);\r\n handleExclusionInputChange({ value: input.target.value, type: 'ExcludedSites' });\r\n },\r\n [setExclusionList, handleExclusionInputChange]\r\n );\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n {i18n.getString(_TL_('Website'))}\r\n \r\n \r\n {!placeholder && (\r\n {i18n.getString(_TL_('Enter websites to exclude from showing your ads, one website per line.'))}\r\n )}\r\n \r\n\r\n {errors && errors.length > 0 && (\r\n
\r\n \r\n
\r\n )}\r\n
\r\n\r\n \r\n\r\n {level === ScopeLevel.AdGroup && (\r\n \r\n {i18n.getString(_TL_('Campaign-level website exclusions'))}\r\n \r\n \r\n )}\r\n
\r\n
\r\n );\r\n};\r\n\r\nSiteExclusions.propTypes = {\r\n level: PropTypes.string.isRequired,\r\n placeholder: PropTypes.string,\r\n exclusions: PropTypes.string.isRequired,\r\n readOnlyExclusions: PropTypes.string,\r\n siteMap: PropTypes.shape({}).isRequired,\r\n handleExclusionInputChange: PropTypes.func.isRequired,\r\n errors: PropTypes.shape([]),\r\n};\r\n\r\nSiteExclusions.defaultProps = {\r\n placeholder: '',\r\n readOnlyExclusions: '',\r\n errors: [],\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Stack } from '@bingads-webui-react/fabric-control';\r\nimport { ScopeLevel } from '@bingads-webui-campaign-react/constants';\r\nimport {\r\n Accordion,\r\n AccordionItem,\r\n AccordionHeader,\r\n AccordionPanel,\r\n} from '@fluentui/react-components';\r\nimport { IpExclusions } from './ip-exclusions';\r\nimport { SiteExclusions } from './site-exclusions';\r\n\r\nexport const WebExclusions = ({\r\n showSiteExclusion,\r\n showIPExclusion,\r\n showAccordion,\r\n siteInputProps,\r\n ipInputProps,\r\n level,\r\n exclusionData,\r\n setExclusionsCallback,\r\n errors,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n const siteExclusions =\r\n level === ScopeLevel.Campaign\r\n ? _.result(\r\n exclusionData && exclusionData.campaignExclusions,\r\n 'ExcludedSites'\r\n )\r\n : _.result(\r\n exclusionData && exclusionData.adgroupExclusions,\r\n 'ExcludedSites'\r\n ) || '';\r\n const campaignReadOnlySiteExclusions =\r\n level === ScopeLevel.AdGroup\r\n ? _.result(\r\n exclusionData && exclusionData.campaignExclusions,\r\n 'ExcludedSites'\r\n )\r\n : '';\r\n const ipExclusions =\r\n _.result(\r\n exclusionData && exclusionData.campaignExclusions,\r\n 'ExcludedIPs'\r\n ) || '';\r\n\r\n const hasSiteExclusionsErrors = errors.find(error => 'NegativeSitesResult' in error);\r\n const hasIpExclusionsErrors = errors.find(error => 'NegativeIPsResult' in error);\r\n\r\n const siteExclusionsError = hasSiteExclusionsErrors\r\n ? hasSiteExclusionsErrors.NegativeSitesResult\r\n : [];\r\n const ipExclusionsError = hasIpExclusionsErrors\r\n ? hasIpExclusionsErrors.NegativeIPsResult\r\n : [];\r\n\r\n const handleExclusionInputChange = ({ value, type }) => {\r\n setExclusionsCallback(value, type);\r\n };\r\n\r\n const siteExclusionsInput = (\r\n \r\n );\r\n\r\n const ipExclusionsInput = (\r\n \r\n );\r\n\r\n return (\r\n
\r\n {showAccordion ? (\r\n \r\n {showSiteExclusion && (\r\n \r\n {i18n.getString(_TL_('Add websites'))}\r\n \r\n {siteExclusionsInput}\r\n \r\n \r\n )}\r\n {showIPExclusion && (\r\n \r\n {i18n.getString(_TL_('Manually add IP addresses'))}\r\n \r\n {ipExclusionsInput}\r\n \r\n \r\n )}\r\n \r\n ) : (\r\n \r\n {showSiteExclusion && siteExclusionsInput}\r\n {showIPExclusion && ipExclusionsInput}\r\n \r\n )}\r\n
\r\n );\r\n};\r\n\r\nWebExclusions.propTypes = {\r\n showSiteExclusion: PropTypes.bool,\r\n showIPExclusion: PropTypes.bool,\r\n showAccordion: PropTypes.bool,\r\n siteInputProps: PropTypes.shape({}),\r\n ipInputProps: PropTypes.shape({}),\r\n level: PropTypes.string.isRequired,\r\n exclusionData: PropTypes.shape({}).isRequired,\r\n setExclusionsCallback: PropTypes.func.isRequired,\r\n errors: PropTypes.shape([]),\r\n};\r\n\r\nWebExclusions.defaultProps = {\r\n showSiteExclusion: false,\r\n showIPExclusion: false,\r\n showAccordion: false,\r\n siteInputProps: {},\r\n ipInputProps: {},\r\n errors: [],\r\n};\r\n","import _ from 'underscore';\r\nimport { ScopeLevel } from '@bingads-webui-campaign-react/constants';\r\n\r\nexport const entitySeparator = '-------------------------';\r\n\r\nexport const formatInvalidEntities = ({\r\n InvalidEntities,\r\n ValidEntities,\r\n}: {\r\n InvalidEntities: string[];\r\n ValidEntities: string[];\r\n}): string => _.compact(_.union(InvalidEntities, _.isEmpty(ValidEntities) ? [] : [entitySeparator], ValidEntities)).join('\\r\\n');\r\n\r\nconst getExclusionCount = exclusionData => _.compact(exclusionData.split(/\\r?\\n/)).length;\r\n\r\nexport const getSummary = (level, exclusionData, i18n) => {\r\n if (level === ScopeLevel.Campaign) {\r\n const siteExclusions = _.result(exclusionData && exclusionData.campaignExclusions, 'ExcludedSites', '');\r\n const ipExclusions = _.result(exclusionData && exclusionData.campaignExclusions, 'ExcludedIPs', '');\r\n const siteExclusionsCount = getExclusionCount(siteExclusions);\r\n const ipExclusionsCount = getExclusionCount(ipExclusions);\r\n return i18n.getString(_TL_('{{siteExclusionsCount}} website(s) excluded at the ad level. {{ipExclusionsCount}} IP address(es) excluded at the ad level.'), { siteExclusionsCount, ipExclusionsCount });\r\n }\r\n\r\n const siteExclusions = _.result(exclusionData && exclusionData.adgroupExclusions, 'ExcludedSites', '');\r\n const campaignReadOnlySiteExclusions = _.result(exclusionData && exclusionData.campaignExclusions, 'ExcludedSites', '');\r\n const adgroupLevelExclusionCount = getExclusionCount(siteExclusions);\r\n const campaignLevelExclusionCount = getExclusionCount(campaignReadOnlySiteExclusions);\r\n return i18n.getString(_TL_('{{adgroupLevelExclusionCount}} website(s) excluded at the ad level. {{campaignLevelExclusionCount}} website(s) excluded at the campaign level.'), { adgroupLevelExclusionCount, campaignLevelExclusionCount });\r\n};\r\n","import {\r\n withFormError,\r\n propertyIs,\r\n} from '@bingads-webui-campaign-react/form-error';\r\nimport React from 'react';\r\nimport {\r\n FormErrorBeaconAdapter, ValidationBeaconAdapter,\r\n} from '@bingads-webui-campaign-react/error-handling';\r\nimport { withAttentionBeacon } from '@bingads-webui-campaign-react/attention-beacon';\r\nimport { withCustomValidation } from '@bingads-webui-react/validation';\r\nimport { ScopeLevel } from '@bingads-webui-campaign-react/constants';\r\nimport { WebExclusions } from './web-exclusions';\r\n\r\nexport const webExclusionPropertyVal = propertyIs('webExclusions');\r\n\r\nexport const ServerValidatedWebExclusions = withAttentionBeacon(\r\n withFormError(WebExclusions, { showError: false }),\r\n { Adapters: [FormErrorBeaconAdapter, ValidationBeaconAdapter] }\r\n);\r\n\r\nconst WebExclusionsInternal = ({\r\n updateValidation,\r\n parentData,\r\n level,\r\n ...rest\r\n}) => {\r\n const onChange = (exclusionsData, type) => {\r\n const keyName = level === ScopeLevel.Campaign ? 'campaignExclusions' : 'adgroupExclusions';\r\n const patchExclusions = {\r\n exclusions: {\r\n ...(parentData.exclusions || {}),\r\n [keyName]: {\r\n ...(parentData.exclusions && parentData.exclusions[keyName] ? parentData.exclusions[keyName] : {}),\r\n [type]: exclusionsData,\r\n },\r\n },\r\n };\r\n\r\n updateValidation([], patchExclusions);\r\n };\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nconst WebExclusionsWithValidation = withCustomValidation(WebExclusionsInternal);\r\n\r\nexport const ServerValidatedWebExclusionsWithValidation = withAttentionBeacon(\r\n withFormError(WebExclusionsWithValidation, { showError: false }),\r\n { Adapters: [FormErrorBeaconAdapter, ValidationBeaconAdapter] }\r\n);\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Stack } from '@bingads-webui-react/fabric-control';\r\nimport {\r\n TextTitle,\r\n ValidatedPanel,\r\n getPanelErrorProps,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { ServerValidatedWebExclusions, webExclusionPropertyVal } from './server-validated-web-exclusions';\r\nimport { getSummary } from '../util/web-exclusions.util';\r\nimport image from './media/website-exclusion.svg';\r\n\r\nexport const WebExclusionsSection = ({\r\n showSiteExclusion, showIPExclusion, level, exclusionData, setExclusionsCallback, errors, expand, ...rest\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n return (\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand,\r\n expandKey: 'web-exclusions',\r\n }}\r\n {...rest}\r\n >\r\n \r\n \r\n {i18n.getString(_TL_('Which websites should not show your ads and which IP addresses should be blocked from seeing your ads?'))}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nWebExclusionsSection.propTypes = {\r\n showSiteExclusion: PropTypes.bool,\r\n showIPExclusion: PropTypes.bool,\r\n level: PropTypes.string.isRequired,\r\n exclusionData: PropTypes.shape({}).isRequired,\r\n setExclusionsCallback: PropTypes.func.isRequired,\r\n errors: PropTypes.shape([]),\r\n expand: PropTypes.func.isRequired,\r\n};\r\n\r\nWebExclusionsSection.defaultProps = {\r\n showSiteExclusion: false,\r\n showIPExclusion: false,\r\n errors: [],\r\n};\r\n","export interface AccountPlacementExclusionList {\r\n ItemCount: number;\r\n AssociationCount: number;\r\n Id: number;\r\n Name: string;\r\n}\r\n\r\nexport type ListType = 'block' | 'allow';\r\n\r\nexport type CampaignType = 'Audience' | 'BrandAwarenessVideoAds' | 'Search' | 'Display' | number | null;\r\n\r\nexport interface ListSelectorProps {\r\n listType: ListType\r\n selected?: AccountPlacementExclusionList[]\r\n onChange: (selected: any[]) => void\r\n}\r\n\r\nexport const TEXT_CONTENT = {\r\n description: {\r\n block: _TL_('Add website exclusion lists to your campaign to help prevent your ads from being shown on certain websites. Note: You can create, edit, and view account-level lists in your Website control lists.'),\r\n allow: _TL_('Adding allowed website lists to this campaign is optional. This option helps you specify sites where you want your ads to appear, giving you more control over ad placement while still maintaining broader distribution across other sites.'),\r\n },\r\n listLabel: {\r\n block: _TL_('Blocked Lists'),\r\n allow: _TL_('Allowed Lists'),\r\n },\r\n ariaLabel: {\r\n block: _TL_('Select blocked website lists'),\r\n allow: _TL_('Select allowed website lists'),\r\n },\r\n};\r\n","\r\nimport React from 'react';\r\nimport { makeStyles, tokens, Text, makeStaticStyles } from '@fluentui/react-components';\r\n\r\nexport const useTagContentStyles = makeStyles({\r\n Text: {\r\n fontWeight: tokens.fontWeightSemibold,\r\n },\r\n List: {\r\n fontWeight: tokens.fontWeightSemibold,\r\n alignItems: 'center',\r\n display: 'flex',\r\n columnGap: tokens.spacingHorizontalXS,\r\n marginBottom: tokens.spacingVerticalL,\r\n },\r\n ListItem: {\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n },\r\n Container: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n marginBottom: tokens.spacingVerticalL,\r\n },\r\n ButtonContainer: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n justifyContent: 'space-between',\r\n columnGap: tokens.spacingHorizontalL,\r\n width: 'fit-content',\r\n },\r\n MessageBar: {\r\n width: 'fit-content',\r\n },\r\n PopoverContentBefore: {\r\n fontWeight: tokens.fontWeightSemibold,\r\n paddingLeft: tokens.spacingHorizontalS,\r\n },\r\n EntitySelector: {\r\n maxWidth: '100%',\r\n marginTop: tokens.spacingVerticalS,\r\n },\r\n});\r\n\r\nconst useStaticStyles = makeStaticStyles({\r\n '.entities-collection-container': {\r\n maxWidth: '630px',\r\n },\r\n});\r\n\r\nexport const CustomWebsiteListTagItemRenderer: React.FC<{content: string}> = ({ content }) => {\r\n useStaticStyles();\r\n const classes = useTagContentStyles();\r\n return (\r\n \r\n {content}\r\n \r\n );\r\n};\r\n","import { RequestMethod, ServerContext } from './types/api';\r\n\r\nexport const callMT = async (\r\n url: string,\r\n method: RequestMethod,\r\n body: any,\r\n headers\r\n) => {\r\n const response = await fetch(url, {\r\n method,\r\n body: JSON.stringify(body),\r\n headers,\r\n });\r\n\r\n if (!response.ok) {\r\n throw new Error('Network response was not ok');\r\n }\r\n\r\n return response.json();\r\n};\r\n\r\nexport const getHeadersRequestByServerContext = (serverContext: ServerContext) => ({\r\n 'Content-Type': 'application/json',\r\n lcid: serverContext.CurrentUser.Locale,\r\n 'x-ms-clientapplication': 'bingadsweb',\r\n 'x-ms-applicationname': 'bingadsweb',\r\n 'x-ms-pagetrackingid': serverContext.PageTrackingId,\r\n Authorization: `CCMTSmallToken ${serverContext.Token}`,\r\n CustomerAccountId: serverContext.CurrentAccount.Id,\r\n CustomerId: serverContext.CurrentAccount.AdvertiserCustomerID,\r\n});\r\n","export interface ServerContext {\r\n CurrentAccount: {\r\n Id: number;\r\n AdvertiserCustomerID: number;\r\n };\r\n CurrentUser: {\r\n Locale: string;\r\n };\r\n PageTrackingId: string;\r\n ServicesEndpoints: {\r\n CmAPI: string;\r\n };\r\n Token: string;\r\n}\r\nexport interface SharedEntity {\r\n Id: number;\r\n Name: string;\r\n Description: string;\r\n Type: string;\r\n Scope: string;\r\n}\r\nexport interface BatchErrors {\r\n Index: number;\r\n Message: string;\r\n}\r\nexport interface SharedEntityAssociation {\r\n EntityId: number;\r\n EntityType: 'Campaign' | 'Account';\r\n SharedEntityId: number; // AccountPlacementExclusionListId\r\n SharedEntityType: 'AccountPlacementExclusionList';\r\n SharedEntityCustomerId?: number; // Ignore for account level\r\n}\r\nexport interface SetSharedEntityAssociationsRequest {\r\n Associations: SharedEntityAssociation[];\r\n SharedEntityScope: string;\r\n}\r\nexport interface GetSharedEntitiesRequest {\r\n SharedEntityScope: string;\r\n SharedEntityType: string;\r\n SharedEntityId: number;\r\n}\r\nexport interface GetSharedEntitiesResponse {\r\n SharedEntities: SharedEntity[];\r\n PartialErrors?: BatchErrors[];\r\n}\r\nexport interface SetSharedEntityAssociationsResponse {\r\n PartialErrors?: BatchErrors[];\r\n}\r\nexport interface DeleteSharedEntityAssociationsRequest {\r\n Associations: SharedEntityAssociation[];\r\n SharedEntityScope: string;\r\n}\r\nexport interface DeleteSharedEntityAssociationsResponse {\r\n PartialErrors?: BatchErrors[];\r\n}\r\nexport interface GetSharedEntityAssociationsByEntityIdsRequest {\r\n EntityIds: number[];\r\n EntityType: string;\r\n SharedEntityScope: string;\r\n SharedEntityType: string;\r\n}\r\nexport interface GetSharedEntityAssociationsByEntityIdsResponse {\r\n Associations: SharedEntityAssociation[];\r\n PartialErrors?: BatchErrors[];\r\n}\r\nexport enum RequestMethod {\r\n Post = 'POST',\r\n Delete = 'DELETE'\r\n}\r\n","import { getHeadersRequestByServerContext, callMT } from './utils';\r\nimport {\r\n RequestMethod,\r\n ServerContext,\r\n GetSharedEntitiesResponse,\r\n GetSharedEntitiesRequest,\r\n SetSharedEntityAssociationsResponse,\r\n SetSharedEntityAssociationsRequest,\r\n DeleteSharedEntityAssociationsResponse,\r\n DeleteSharedEntityAssociationsRequest,\r\n GetSharedEntityAssociationsByEntityIdsResponse,\r\n GetSharedEntityAssociationsByEntityIdsRequest,\r\n SharedEntity,\r\n} from './types/api';\r\n\r\nclass WebsiteListSelectorRepository {\r\n async getListsByAccountId(serverContext = {} as ServerContext): Promise {\r\n const headers = getHeadersRequestByServerContext(serverContext);\r\n const body: GetSharedEntitiesRequest = {\r\n SharedEntityScope: 'Account',\r\n SharedEntityType: 'AccountPlacementExclusionList',\r\n SharedEntityId: headers.CustomerAccountId,\r\n };\r\n\r\n return callMT(\r\n `${serverContext.ServicesEndpoints?.CmAPI}v13/SharedEntities/Query`,\r\n RequestMethod.Post,\r\n body,\r\n headers\r\n );\r\n }\r\n\r\n async associateListsToCampaign(\r\n serverContext = {} as ServerContext,\r\n lists: SharedEntity[],\r\n campaignId: number\r\n ): Promise {\r\n const headers = getHeadersRequestByServerContext(serverContext);\r\n\r\n const previousAssociations = await this.getListsByCampaignId(serverContext, campaignId);\r\n\r\n // Convert arrays to sets for easier comparison\r\n const previousSet = new Set(previousAssociations.map(({ Id }) => Id));\r\n const newSet = new Set(lists.map(({ Id }) => Id));\r\n\r\n // Find ids in previous associations but not in new associations\r\n const removedAssociations = Array.from(previousSet).filter(id => !newSet.has(id));\r\n\r\n // Find ids in new associations but not in previous associations\r\n const newAssociations = Array.from(newSet).filter(id => !previousSet.has(id));\r\n\r\n // Delete associations that are not in the new list\r\n await this.deleteListAssociationsByAccountId(serverContext, removedAssociations, campaignId);\r\n\r\n // if there are no new associations, return early\r\n if (newAssociations.length === 0) {\r\n return {};\r\n }\r\n\r\n const body: SetSharedEntityAssociationsRequest = {\r\n SharedEntityScope: 'Account',\r\n Associations: newAssociations.map(id => ({\r\n SharedEntityId: id,\r\n SharedEntityType: 'AccountPlacementExclusionList',\r\n SharedEntityScope: 'Account',\r\n EntityId: campaignId,\r\n EntityType: 'Campaign',\r\n })),\r\n };\r\n\r\n // Create new associations\r\n return callMT(\r\n `${serverContext.ServicesEndpoints?.CmAPI}v13/SharedEntityAssociations/Set`,\r\n RequestMethod.Post,\r\n body,\r\n headers\r\n );\r\n }\r\n\r\n async deleteListAssociationsByAccountId(\r\n serverContext = {} as ServerContext,\r\n lists: number[],\r\n campaignId: number\r\n ): Promise {\r\n const headers = getHeadersRequestByServerContext(serverContext);\r\n const body: DeleteSharedEntityAssociationsRequest = {\r\n SharedEntityScope: 'Account',\r\n Associations: lists.map(id => ({\r\n SharedEntityId: id,\r\n SharedEntityType: 'AccountPlacementExclusionList',\r\n EntityId: campaignId,\r\n EntityType: 'Campaign',\r\n })),\r\n };\r\n\r\n return callMT(\r\n `${serverContext.ServicesEndpoints?.CmAPI}v13/SharedEntityAssociations`,\r\n RequestMethod.Delete,\r\n body,\r\n headers\r\n );\r\n }\r\n\r\n async getListsByCampaignId(\r\n serverContext = {} as ServerContext,\r\n payload: number\r\n ): Promise {\r\n const headers = getHeadersRequestByServerContext(serverContext);\r\n const body: GetSharedEntityAssociationsByEntityIdsRequest = {\r\n EntityIds: [payload],\r\n EntityType: 'Campaign',\r\n SharedEntityScope: 'Account',\r\n SharedEntityType: 'AccountPlacementExclusionList',\r\n };\r\n\r\n const associated: GetSharedEntityAssociationsByEntityIdsResponse = await callMT(\r\n `${serverContext.ServicesEndpoints?.CmAPI}v13/SharedEntityAssociations/QueryByEntityIds`,\r\n RequestMethod.Post,\r\n body,\r\n headers\r\n );\r\n\r\n const queryBody: GetSharedEntitiesRequest = {\r\n SharedEntityScope: 'Account',\r\n SharedEntityType: 'AccountPlacementExclusionList',\r\n SharedEntityId: associated.Associations[0].EntityId,\r\n };\r\n\r\n const entities: GetSharedEntitiesResponse = await callMT(\r\n `${serverContext.ServicesEndpoints?.CmAPI}v13/SharedEntities/Query`,\r\n RequestMethod.Post,\r\n queryBody,\r\n headers\r\n );\r\n\r\n return associated.Associations.map(item =>\r\n entities.SharedEntities.find(entity => entity.Id === item.SharedEntityId) || { Id: item.SharedEntityId } as SharedEntity);\r\n }\r\n}\r\n\r\nexport const repository = new WebsiteListSelectorRepository();\r\n","import React, { useContext } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { LearnMoreLink } from '@bingads-webui-campaign-react/help';\r\nimport { ServerEntitySelectorInline } from '@bingads-webui-fluent-component/entity-selector';\r\nimport { Text, Label } from '@fluentui/react-components';\r\nimport { Info16Regular } from '@fluentui/react-icons';\r\nimport { ListSelectorProps, TEXT_CONTENT } from './types/exclusion-lists';\r\nimport { CustomWebsiteListTagItemRenderer, useTagContentStyles } from './custom-tag-item-renderer';\r\nimport { repository } from './repository';\r\n\r\nexport const WebsiteListSelector = ({ listType, selected, onChange }: ListSelectorProps) => {\r\n const i18n: any = useContext(I18nContext);\r\n const serverContext: any = useContext(ServerContext);\r\n const classes = useTagContentStyles();\r\n\r\n const fetchData = () => repository.getListsByAccountId(serverContext).then(response => ({\r\n count: response.SharedEntities?.length || 0,\r\n items: (response.SharedEntities || []).map(item => ({\r\n ...item,\r\n // selection tree requires those props\r\n value: item.Id,\r\n content: item.Name,\r\n })),\r\n }));\r\n\r\n const renderItemContent = flatItem => (\r\n
\r\n \r\n {flatItem.Name}\r\n \r\n \r\n {flatItem.ItemCount}{' '}{i18n.getString(_TL_('websites'))}\r\n \r\n
\r\n );\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n\r\n
\r\n \r\n {`${i18n.getString(_TL_('Lists'))} (${selected?.length})`}\r\n \r\n \r\n
\r\n\r\n item?.Name.toLowerCase().includes(search.toLowerCase())}\r\n selectionMode=\"multiselect\"\r\n onRenderTagContent={CustomWebsiteListTagItemRenderer}\r\n onRenderItemContent={renderItemContent}\r\n popOverContentBefore={{i18n.getString(TEXT_CONTENT.listLabel[listType])}}\r\n aria-label={i18n.getString(TEXT_CONTENT.ariaLabel[listType])}\r\n />\r\n
\r\n );\r\n};\r\n\r\nWebsiteListSelector.defaultProps = {\r\n listType: 'block',\r\n selected: [],\r\n onChange: () => { },\r\n};\r\n","import _ from 'underscore';\r\nimport React from 'react';\r\nimport hoistNonReactStatics from 'hoist-non-react-statics';\r\nimport { getDisplayName } from '@bingads-webui-react/hoc-utils';\r\n\r\nexport const withProps = (extraProps, WrappedComponent) => {\r\n const HoC = (props) => {\r\n const finalProps = _.isFunction(extraProps) ?\r\n extraProps(props) :\r\n _.extend({}, props, extraProps);\r\n return (\r\n \r\n );\r\n };\r\n\r\n HoC.displayName = `WithProps(${getDisplayName(WrappedComponent)})`;\r\n hoistNonReactStatics(HoC, WrappedComponent);\r\n\r\n return HoC;\r\n};\r\n","export const getStyles = () => ({\r\n withStoreLoadingContainer: {\r\n minHeight: 84,\r\n '& .loading': {\r\n paddingTop: 30,\r\n },\r\n },\r\n withStoreErrorContainer: {\r\n paddingTop: 10,\r\n '& .alert': {\r\n alignItems: 'center',\r\n padding: [4, 16, 4, 12],\r\n\r\n '& .alert-image:before': {\r\n lineHeight: '32px',\r\n },\r\n\r\n '& .alert__content': {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n flexGrow: 1,\r\n alignItems: 'center',\r\n },\r\n\r\n '& .alert__action': {\r\n marginLeft: 'auto',\r\n marginTop: 'unset',\r\n },\r\n },\r\n UrlContainer: {\r\n width: '435px',\r\n '& .store-url-text-container': {\r\n marginBottom: '10px',\r\n },\r\n },\r\n MobileUrlContainer: {\r\n width: '435px',\r\n marginTop: '20px',\r\n },\r\n },\r\n});\r\n\r\n","import { noop, isArray, some } from 'underscore';\r\nimport React, { useState, useEffect, useMemo, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport hoistNonReactStatics from 'hoist-non-react-statics';\r\nimport { getDisplayName } from '@bingads-webui-react/hoc-utils';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { getStoreQueriesWithLocalMock } from '@bingads-webui-campaign-react/merchant-shared';\r\nimport { Loading } from '@bingads-webui-campaign-react/loading';\r\nimport { Alert } from '@bingads-webui-react/alert';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { getStyles } from './style';\r\n\r\nconst storeFormattedText = (providerId, getStoreResponse) => (getStoreResponse ? `ID: ${getStoreResponse.Id}, Name: ${getStoreResponse.Name}` : `ID: ${providerId}`);\r\n\r\nconst isStoreNotFoundFetchError = storeFetchError =>\r\n storeFetchError && isArray(storeFetchError.raw) && some(storeFetchError.raw, ({ ErrorCode }) => ErrorCode === 'StoreNotFoundErr');\r\n\r\nconst createStoreDetails = (providerId, getStoreResponse) => ({\r\n id: providerId,\r\n name: getStoreResponse && getStoreResponse.Name,\r\n storeUrl: getStoreResponse && getStoreResponse.DestinationUrl,\r\n text: storeFormattedText(providerId, getStoreResponse),\r\n});\r\n\r\nexport function withStoreFromProviderId(WrappedComponent) {\r\n const HOC = (props) => {\r\n const {\r\n i18n,\r\n providerId,\r\n updateValidation,\r\n } = props;\r\n\r\n const [storeFetchState, setStoreFetchState] = useState({ fetchComplete: !providerId, storeDetails: null });\r\n const activity = useContext(ActivityContext);\r\n\r\n const storeQueries = useMemo(() => getStoreQueriesWithLocalMock(), []);\r\n\r\n useEffect(() => {\r\n if (providerId) {\r\n updateValidation(['store load in progress'], null, false /* shouldDirty */);\r\n storeQueries.getStore(providerId, true /* withCache */).then(\r\n (getStoreResponse) => {\r\n updateValidation([], null, false /* shouldDirty */);\r\n setStoreFetchState({ fetchComplete: true, storeDetails: createStoreDetails(providerId, getStoreResponse) });\r\n },\r\n (getStoreError) => {\r\n if (isStoreNotFoundFetchError(getStoreError)) {\r\n // deleted store and draft (placeholder) store scenarios will both return StoreNotFoundErr - we still return store details\r\n // with the information we have.\r\n if (activity) {\r\n activity.trace(`Store was not found for Store ID: ${providerId}`);\r\n }\r\n\r\n updateValidation([], null, false /* shouldDirty */);\r\n setStoreFetchState({ fetchComplete: true, storeDetails: createStoreDetails(providerId) });\r\n } else {\r\n if (activity) {\r\n activity.error(`Store load failed: ${getStoreError instanceof Error ? getStoreError : JSON.stringify(getStoreError)}`);\r\n }\r\n // TODO: This needs to be imporoved. Currently setting empty validation message to mar invalid but\r\n // to avoid showing message in withError HOC since this wrapper has it's own error message for load failure.\r\n updateValidation([''], null, false /* shouldDirty */);\r\n setStoreFetchState({ fetchComplete: true, getStoreError });\r\n }\r\n }\r\n );\r\n }\r\n }, [activity, providerId, storeQueries, updateValidation]);\r\n\r\n const classes = useDefaultStyles(getStyles);\r\n\r\n const loadingSpinner = useMemo(() => (\r\n
\r\n \r\n
\r\n ), [classes.withStoreLoadingContainer, i18n]);\r\n\r\n const loadingError = useMemo(() => (\r\n
\r\n )}\r\n dismissible={false}\r\n />\r\n
\r\n ), [classes.withStoreErrorContainer, i18n]);\r\n\r\n if (providerId && !storeFetchState.fetchComplete) {\r\n return loadingSpinner;\r\n }\r\n\r\n if (providerId && storeFetchState.fetchComplete && storeFetchState.getStoreError) {\r\n return loadingError;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n };\r\n\r\n HOC.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n providerId: PropTypes.number,\r\n updateValidation: PropTypes.func,\r\n };\r\n\r\n HOC.defaultProps = {\r\n providerId: undefined,\r\n updateValidation: noop,\r\n };\r\n\r\n HOC.displayName = `withStoreFromProviderId(${getDisplayName(WrappedComponent)})`;\r\n hoistNonReactStatics(HOC, WrappedComponent);\r\n\r\n return HOC;\r\n}\r\n","\r\nexport const getTopLevelDomainFromUrl = (url) => {\r\n const hostNameParts = new URL(url).hostname.split('.');\r\n const partCount = hostNameParts.length;\r\n\r\n if (partCount >= 2) {\r\n const ccTldSpecified = partCount >= 3 && (hostNameParts[partCount - 2].length === 3 || hostNameParts[partCount - 2].length === 2) && hostNameParts[partCount - 1].length === 2;\r\n return ccTldSpecified ?\r\n `${hostNameParts[partCount - 3]}.${hostNameParts[partCount - 2]}.${hostNameParts[partCount - 1]}` :\r\n `${hostNameParts[partCount - 2]}.${hostNameParts[partCount - 1]}`;\r\n }\r\n\r\n return null;\r\n};\r\n\r\nexport const isFinalUrlAlignedWithStoreDomain = (finalUrl, storeDomain) => {\r\n const finalUrlDomain = getTopLevelDomainFromUrl(finalUrl);\r\n return finalUrlDomain && storeDomain && finalUrlDomain.toLowerCase() === storeDomain.toLowerCase();\r\n};\r\n\r\n","import React, { useRef, useMemo, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { noop, result } from 'underscore';\r\nimport classNames from 'classnames';\r\nimport hoistNonReactStatics from 'hoist-non-react-statics';\r\nimport { getDisplayName } from '@bingads-webui-react/hoc-utils';\r\nimport { Text } from '@fluentui/react';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { isFinalUrlAlignedWithStoreDomain, getTopLevelDomainFromUrl } from './shared';\r\nimport { getStyles } from './style';\r\n\r\nexport function withStoreUrl(WrappedComponent) {\r\n const HOC = (props) => {\r\n const {\r\n i18n,\r\n validationProps,\r\n updateValidation,\r\n storeDetails,\r\n } = props;\r\n\r\n const classes = useDefaultStyles(getStyles);\r\n const storeDetailsInternal = useRef(null);\r\n\r\n useMemo(() => {\r\n const storeUrl = storeDetails && storeDetails.storeUrl;\r\n if (storeUrl) {\r\n const storeDomain = getTopLevelDomainFromUrl(storeUrl);\r\n storeDetailsInternal.current = { url: storeUrl, domain: storeDomain };\r\n }\r\n }, [storeDetails]);\r\n\r\n const validationOnUrlChange = useCallback((value) => {\r\n const storeDomain = result(storeDetailsInternal.current, 'domain', null);\r\n let finalUrlValidatorError;\r\n if (storeDomain) {\r\n finalUrlValidatorError = isFinalUrlAlignedWithStoreDomain(value, storeDomain) ?\r\n null :\r\n i18n.getString(_TL_('Final URL domain does not match merchant center store URL'));\r\n }\r\n return finalUrlValidatorError;\r\n }, [i18n]);\r\n\r\n const storeUrl = result(storeDetailsInternal.current, 'url', null);\r\n const storeUrlText = useMemo(() => (storeUrl &&\r\n
\r\n { i18n.getString(_TL_('Merchant center store URL: {{storeUrl}}'), { storeUrl }) }\r\n
\r\n ), [i18n, storeUrl]);\r\n\r\n return (\r\n \r\n
\r\n {storeUrlText}\r\n \r\n
\r\n
\r\n );\r\n };\r\n\r\n HOC.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n providerId: PropTypes.number,\r\n updateValidation: PropTypes.func,\r\n storeDetails: PropTypes.shape({\r\n storeUrl: PropTypes.string,\r\n }),\r\n validationProps: PropTypes.shape({\r\n data: PropTypes.shape({\r\n FinalUrls: PropTypes.arrayOf(PropTypes.string),\r\n }),\r\n updateOnMount: PropTypes.bool,\r\n }).isRequired,\r\n };\r\n\r\n HOC.defaultProps = {\r\n providerId: undefined,\r\n updateValidation: noop,\r\n storeDetails: undefined,\r\n };\r\n\r\n HOC.displayName = `withStoreUrl(${getDisplayName(WrappedComponent)})`;\r\n hoistNonReactStatics(HOC, WrappedComponent);\r\n\r\n return HOC;\r\n}\r\n","import { createContext } from 'react';\r\n\r\nexport const STEP_STATE = {\r\n AUTO: 'AUTO',\r\n MANUAL: 'MANUAL',\r\n};\r\n\r\nexport const WizardPerfMarkerContext = createContext({});\r\n","import _ from 'underscore';\r\nimport { useEffect, useRef, useCallback, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { STEP_STATES, useWizardService } from '@bingads-webui-react/wizard-core';\r\nimport { WizardPerfMarkerContext } from './utils';\r\n\r\nexport const StepPerfMarker = ({ parentPerfMarker, markerName }) => {\r\n const stepPerfMarkerRef = useRef(null);\r\n const { register = _.noop, unregister = _.noop } = useContext(WizardPerfMarkerContext);\r\n\r\n const { state } = useWizardService();\r\n const currentStepFullState = state.toStrings()[1] || '';\r\n const currentStepState = currentStepFullState.split('.')[1];\r\n\r\n useEffect(() => {\r\n if (parentPerfMarker) {\r\n stepPerfMarkerRef.current = parentPerfMarker.createChild(markerName, { autoEnd: false });\r\n register();\r\n }\r\n\r\n return () => {\r\n stepPerfMarkerRef.current = null;\r\n unregister();\r\n };\r\n }, [markerName, parentPerfMarker, register, unregister]);\r\n\r\n const handleStepStateChange = useCallback(\r\n () => {\r\n if (!stepPerfMarkerRef.current) {\r\n return;\r\n }\r\n\r\n if (currentStepState === STEP_STATES.FETCHING) {\r\n stepPerfMarkerRef.current.willFetchFile();\r\n } else if (currentStepState === STEP_STATES.LOADING) {\r\n stepPerfMarkerRef.current.willInit();\r\n } else if (currentStepState === STEP_STATES.ACTIVE) {\r\n stepPerfMarkerRef.current.willRender();\r\n setTimeout(() => {\r\n stepPerfMarkerRef.current && stepPerfMarkerRef.current.done();\r\n }, 0);\r\n }\r\n },\r\n [currentStepState]\r\n );\r\n\r\n useEffect(\r\n () => {\r\n handleStepStateChange();\r\n },\r\n [handleStepStateChange]\r\n );\r\n\r\n return null;\r\n};\r\n\r\nStepPerfMarker.propTypes = {\r\n markerName: PropTypes.string.isRequired,\r\n parentPerfMarker: PropTypes.shape({\r\n createChild: PropTypes.func.isRequired,\r\n }).isRequired,\r\n};\r\n","\r\nimport PropTypes from 'prop-types';\r\nimport React, { useContext, useCallback, useRef } from 'react';\r\nimport { getCurrentStepId, useWizardService } from '@bingads-webui-react/wizard-core';\r\nimport { StepPerfMarker } from './step-perf-marker';\r\nimport { STEP_STATE, WizardPerfMarkerContext } from './utils';\r\n\r\nexport const WizardPerfMarker = ({ wizardName, wizardMarker, children }) => {\r\n const { state } = useWizardService();\r\n const wizardPerfMarkerContext = useContext(WizardPerfMarkerContext);\r\n const currentStepId = getCurrentStepId(state);\r\n const currentStep = `${wizardName}_${currentStepId}`;\r\n const perfMarkerRef = useRef(currentStep);\r\n\r\n const checkAndCreateChildMarker = useCallback(() => {\r\n if (!wizardPerfMarkerContext[currentStep] ||\r\n (wizardPerfMarkerContext[currentStep] === STEP_STATE.AUTO && currentStep === perfMarkerRef.current)) {\r\n wizardPerfMarkerContext[currentStep] = STEP_STATE.AUTO;\r\n return ;\r\n }\r\n perfMarkerRef.current = currentStep;\r\n return null;\r\n }, [currentStep, wizardMarker, wizardPerfMarkerContext]);\r\n\r\n const register = useCallback(() => {\r\n if (wizardPerfMarkerContext[currentStep] !== STEP_STATE.AUTO) {\r\n wizardPerfMarkerContext[currentStep] = STEP_STATE.MANUAL;\r\n }\r\n }, [currentStep, wizardPerfMarkerContext]);\r\n\r\n const unregister = useCallback(() => {\r\n delete wizardPerfMarkerContext[currentStep];\r\n }, [currentStep, wizardPerfMarkerContext]);\r\n\r\n return (\r\n \r\n {checkAndCreateChildMarker()}\r\n {children}\r\n \r\n );\r\n};\r\n\r\nWizardPerfMarker.propTypes = {\r\n wizardName: PropTypes.string.isRequired,\r\n wizardMarker: PropTypes.shape({\r\n createChild: PropTypes.func.isRequired,\r\n done: PropTypes.func.isRequired,\r\n }).isRequired,\r\n children: PropTypes.node.isRequired,\r\n};\r\n","import React, { Fragment } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Stack, Text } from '@bingads-webui-react/fabric-control';\r\n\r\nexport const ErrorString = ({\r\n error,\r\n}) => (\r\n \r\n {error}\r\n \r\n);\r\n\r\nErrorString.propTypes = {\r\n error: PropTypes.string,\r\n};\r\nErrorString.defaultProps = {\r\n error: '',\r\n};\r\n\r\nexport const Errors = ({\r\n errors,\r\n}) => (\r\n
\r\n {errors && errors.map(error => ErrorString({ error }))}\r\n
\r\n);\r\n\r\nErrors.propTypes = {\r\n errors: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n};\r\n\r\nexport const SpanWithComponent = ({\r\n SpanText,\r\n Component,\r\n}) => (\r\n \r\n {SpanText}\r\n \r\n \r\n);\r\n\r\nSpanWithComponent.propTypes = {\r\n Component: PropTypes.func.isRequired,\r\n SpanText: PropTypes.oneOfType([PropTypes.func, PropTypes.string]).isRequired,\r\n};\r\n\r\nexport const withVerticalAlignCenterSpan = Component => (\r\n props,\r\n defaultRender\r\n) => (\r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nconst nameErrorCode = {\r\n RequiredField: 'RequiredField',\r\n ExceedLength: 'ExceedLength',\r\n};\r\n\r\nexport const getNameErrorMsg = ({ code, i18n, maxLength }) => {\r\n switch (code) {\r\n case nameErrorCode.RequiredField:\r\n return i18n.getString(_TL_('Required field'));\r\n case nameErrorCode.ExceedLength:\r\n return i18n.getString(_TL_('Field should not exceed {{number}} characters'), { number: maxLength });\r\n default:\r\n return null;\r\n }\r\n};\r\n\r\nexport const validateName = ({ name, maxLength }) => {\r\n let error = null;\r\n if (name == null || name === '') {\r\n error = nameErrorCode.RequiredField;\r\n } else if (name && name.length > maxLength) {\r\n error = nameErrorCode.ExceedLength;\r\n }\r\n return error;\r\n};\r\n\r\nexport const checkShouldShowError = attribute => attribute.isInvalid || attribute.isDirty;\r\nexport const checkShouldShowErrors = attribute => (attribute.errors && attribute.errors.length > 0);\r\n","import React, { useContext } from 'react';\r\nimport classnames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport { HelpPopup } from '@bingads-webui-react/help-popup';\r\nimport { TextField } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { withVerticalAlignCenterSpan, ErrorString, getNameErrorMsg, validateName, checkShouldShowError, checkShouldShowErrors, Errors } from '../utils/shared';\r\n\r\nconst maxLength = 128;\r\n\r\nexport const isCampaignNameValid = name => validateName({ name, maxLength }) == null;\r\n\r\nexport const defaultName = undefined;\r\n\r\nexport const CampaignName = React.memo((props) => {\r\n const {\r\n name,\r\n setName,\r\n } = props;\r\n const i18n = useContext(I18nContext);\r\n const campaingNameText = i18n.getString(_TL_('Campaign name'));\r\n const error = name.error ? name.error : getNameErrorMsg({ code: validateName({ name: name.value, maxLength }), i18n, maxLength });\r\n const shouldShowError = checkShouldShowError(name);\r\n return (\r\n
\r\n ())}\r\n onChange={(e, value) => {\r\n setName({\r\n value,\r\n isDirty: true,\r\n isInvalid: isCampaignNameValid(value) !== true,\r\n });\r\n }}\r\n styles={{ fieldGroup: { width: 461, marginTop: '8px' } }}\r\n />\r\n {shouldShowError && error && }\r\n {checkShouldShowErrors(name) && x.message)} />}\r\n
\r\n );\r\n});\r\n\r\nCampaignName.propTypes = {\r\n name: PropTypes.shape({}),\r\n setName: PropTypes.func.isRequired,\r\n};\r\n\r\nCampaignName.defaultProps = {\r\n name: {\r\n value: undefined,\r\n isDirty: false,\r\n isInvalid: false,\r\n },\r\n};\r\n","import { LocalizationKeys } from '../constants/localization-keys';\r\n\r\nexport const locationTargetsOptionKeys = {\r\n everywhere: 'everywhere',\r\n specific: 'specific',\r\n bundleOrDefaultMarket: 'bundle',\r\n};\r\n\r\nexport const getLocationsString = (i18n, settings, isAdGroupLevel = false, bidStrategyType, hideBid = false) => {\r\n if (settings == null) {\r\n return i18n.getString(_TL_('Targeting everywhere.'));\r\n }\r\n\r\n const {\r\n targetOption,\r\n currentLocations = [],\r\n } = settings;\r\n\r\n let isTargetEverywhere = targetOption === locationTargetsOptionKeys.everywhere;\r\n if (isAdGroupLevel) {\r\n isTargetEverywhere = currentLocations.length === 0;\r\n }\r\n\r\n if (isTargetEverywhere) {\r\n return i18n.getString(_TL_('Targeting everywhere.'));\r\n }\r\n\r\n let details = '';\r\n let includedLocations = currentLocations.filter(x => x.SelectionStatus === 'Included');\r\n const excludedLocations = currentLocations.filter(x => x.SelectionStatus === 'Excluded');\r\n if (bidStrategyType === 'Commission') {\r\n includedLocations = [];\r\n }\r\n if (includedLocations.length) {\r\n details += `${i18n.getString(_TL_('Included locations: '))}`;\r\n includedLocations.forEach((target, index) => {\r\n details += target.location;\r\n if (!hideBid) {\r\n details += `: ${i18n.getString(LocalizationKeys[target.bidAdjustmentDropdown])}`;\r\n details += `: ${target.bidAdjustmentInput}%`;\r\n }\r\n if (index < includedLocations.length - 1) {\r\n details += ', ';\r\n }\r\n });\r\n }\r\n if (excludedLocations.length) {\r\n if (includedLocations.length) {\r\n details += ', ';\r\n }\r\n details += `${i18n.getString(_TL_('Excluded locations: '))}`;\r\n excludedLocations.forEach((target, index) => {\r\n details += target.location;\r\n if (index < excludedLocations.length - 1) {\r\n details += ', ';\r\n }\r\n });\r\n }\r\n return details;\r\n};\r\n\r\nexport const getLocationTargetTitleDetails = (i18n, location, isAdGroupLevel, bidStrategyType, hideBid = false) => {\r\n if (!location) return '';\r\n const {\r\n parentLevelSettings,\r\n currentLevelSettings,\r\n useParentLevel,\r\n } = location;\r\n\r\n if (useParentLevel) {\r\n if (isAdGroupLevel) {\r\n return getLocationsString(i18n, parentLevelSettings, isAdGroupLevel, bidStrategyType, hideBid);\r\n }\r\n return i18n.getString(_TL_('Targeting everywhere.'));\r\n }\r\n\r\n return getLocationsString(i18n, currentLevelSettings, isAdGroupLevel, bidStrategyType, hideBid);\r\n};\r\n\r\nexport const mergeLocations = (includedLocations, excludedLocations, targetedLocations) => {\r\n let conflictingCount = 0;\r\n let duplicateCount = 0;\r\n\r\n // Create Sets of existing location IDs for efficient lookup\r\n const includedLocationIds = new Set(includedLocations.map(loc => loc.location.Id));\r\n const excludedLocationIds = new Set(excludedLocations.map(loc => loc.location.Id));\r\n\r\n const newIncludedLocations = [];\r\n const newExcludedLocations = [];\r\n\r\n // Process targeted included locations\r\n targetedLocations.includedLocations.forEach((loc) => {\r\n const locId = loc.location.Id;\r\n if (excludedLocationIds.has(locId)) {\r\n conflictingCount += 1;\r\n } else if (includedLocationIds.has(locId)) {\r\n duplicateCount += 1;\r\n } else {\r\n newIncludedLocations.push(loc);\r\n }\r\n });\r\n\r\n // Process targeted excluded locations\r\n targetedLocations.excludedLocations.forEach((loc) => {\r\n const locId = loc.location.Id;\r\n if (includedLocationIds.has(locId)) {\r\n conflictingCount += 1;\r\n } else if (excludedLocationIds.has(locId)) {\r\n duplicateCount += 1;\r\n } else {\r\n newExcludedLocations.push(loc);\r\n }\r\n });\r\n\r\n return {\r\n includedLocations: [...includedLocations, ...newIncludedLocations],\r\n excludedLocations: [...excludedLocations, ...newExcludedLocations],\r\n conflictingCount,\r\n duplicateCount,\r\n };\r\n};\r\n","import React, { useContext, useCallback, useMemo, useRef, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport {\r\n LocationTargetsEditor as BingMapsLocationTargetsEditor,\r\n isLegacyLocationAndRadiusEqual,\r\n BingMapsContextProvider,\r\n getIsRadiusTarget as defaultGetIsRadiusTarget,\r\n TARGETING_TYPE,\r\n} from '@bingads-webui-react/bing-maps';\r\nimport { BulkLocationsSearchProvider, BulkLocationsSearchDrawer } from '@bingads-webui-react/bulk-locations-search';\r\nimport { Dismiss24Regular } from '@fluentui/react-icons';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n Toaster,\r\n useToastController,\r\n ToastTitle,\r\n Toast,\r\n ToastTrigger,\r\n ToastBody,\r\n} from '@fluentui/react-toast';\r\nimport { Button } from '@fluentui/react-components';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { mergeLocations } from '../utils/location-target-shared';\r\n\r\n\r\n// reference: private/new-expert-signup/packages/expert-location-target/src/with-bing-maps-context-provider.js\r\nconst BING_MAPS_API_KEY = 'AgRuCtepgsuuCYV9J6S6w1j8ay2JJwnu8f5EPgv4kkoJoIuka8yui-NzKrvlESTQ';\r\n\r\nconst toasterId = 'bulkLocationsSearchToasterID';\r\n\r\nexport const SpecificLocationTargetsEditor = (props) => {\r\n const {\r\n data,\r\n setData,\r\n edmCampaign,\r\n allowPositiveLocationTargeting,\r\n allowNegativeLocationTargeting,\r\n showSearchTypeOptions,\r\n strings,\r\n scope,\r\n defaultSelectedSearchType,\r\n isBrandAwarenessCampaignScenario,\r\n showBulkLocations,\r\n } = props;\r\n const i18n = useContext(I18nContext);\r\n const mapRef = useRef();\r\n const mapBulkLocationsRef = useRef();\r\n const [isDrawerOpen, setIsBulkLocationsSearchDrawerOpen] = useState(false);\r\n const { dispatchToast, dismissToast } = useToastController(toasterId);\r\n const serverContext = useContext(ServerContext);\r\n const {\r\n includedLocations,\r\n excludedLocations,\r\n } = data;\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n // TODO: useMemo\r\n\r\n // reference: private/multi-channel/packages/mca-data/src/use-campaign-api-call/use-campaign-api-call.js\r\n const {\r\n Token,\r\n } = serverContext;\r\n\r\n const makeLocationsCall = useCallback((search) => {\r\n const {\r\n cid,\r\n aid,\r\n } = scope.values;\r\n\r\n return edmCampaign.Customers.$withKey(cid).Accounts.$withKey(aid).Locations.get({\r\n select: ['ParentLocations'],\r\n search,\r\n ...(isBrandAwarenessCampaignScenario ? { IsBrandAwarenessCampaignScenario: true } : {}),\r\n IsBrandAwarenessCampaignScenario: isBrandAwarenessCampaignScenario,\r\n }).toPromise()\r\n .then(response => response)\r\n .catch(error => console.log(error));\r\n }, [scope, edmCampaign, isBrandAwarenessCampaignScenario]);\r\n\r\n // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars\r\n const makeBulkLocationsCall = useCallback((searchTerms, countryCode) => {\r\n const {\r\n cid,\r\n aid,\r\n } = scope.values;\r\n\r\n activity.signal('BulkSearchLocations called');\r\n\r\n return edmCampaign.Customers.$withKey(cid).Accounts.$withKey(aid).Locations['Default.BulkSearchLocations']\r\n .$makeCall({\r\n query: {\r\n select: ['Location'],\r\n ...(countryCode ? { filter: { where: `Location/CountryCode eq '${countryCode}'` } } : {}),\r\n ...(isBrandAwarenessCampaignScenario ? { servingChannel: 'Xandr' } : {}),\r\n },\r\n payload: {\r\n searchTerms,\r\n },\r\n }).toPromise()\r\n .then(response => response)\r\n .catch(error => console.log(error));\r\n }, [scope, edmCampaign, isBrandAwarenessCampaignScenario]);\r\n\r\n const renderToaster = useCallback((toastId, intent, toastTitle, toastMessage) =>\r\n dispatchToast(\r\n \r\n \r\n }\r\n onClick={() => dismissToast(toastId)}\r\n />\r\n \r\n }\r\n >\r\n {toastTitle}\r\n \r\n {toastMessage && {toastMessage}}\r\n ,\r\n {\r\n toastId, pauseOnHover: true, timeout: 8000, position: 'bottom-start', intent,\r\n }\r\n ), [dispatchToast, i18n]);\r\n\r\n const handleBulkLocationsSearchDrawerOpen = useCallback(() => {\r\n activity.signal('Add Bulk Locations panel opens');\r\n setIsBulkLocationsSearchDrawerOpen(true);\r\n }, [setIsBulkLocationsSearchDrawerOpen]);\r\n\r\n const searchOptions = useMemo(() => ({\r\n getLocations: makeLocationsCall,\r\n skipBingMapAPISearch: isBrandAwarenessCampaignScenario,\r\n }), [isBrandAwarenessCampaignScenario, makeLocationsCall]);\r\n\r\n const maxItems = 1000;\r\n const getIsRadiusTarget = useCallback((location, targetingType) => {\r\n if (targetingType) {\r\n return defaultGetIsRadiusTarget(location, targetingType) &&\r\n targetingType === TARGETING_TYPE.Included;\r\n }\r\n return defaultGetIsRadiusTarget(location, targetingType);\r\n }, []);\r\n\r\n // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars\r\n const setBulkLocationsData = useCallback((targetedLocations) => {\r\n const result = mergeLocations(includedLocations, excludedLocations, targetedLocations);\r\n activity.signal('Add Locations Button clicked')\r\n\r\n if (result.conflictingCount > 0) {\r\n renderToaster('bulkLocationConflict', 'warning', i18n.getString(_TL_('Unable to add locations')), i18n.getString(_TL_('{{count}} location(s) cannot be added due to targeting conflicts.'), { count: result.conflictingCount }));\r\n }\r\n if (result.duplicateCount > 0) {\r\n renderToaster('bulkLocationSuccess', 'success', i18n.getString(_TL_('Duplicate locations removed')), i18n.getString(_TL_('We automatically removed {{count}} duplicate location(s).'), { count: result.duplicateCount }));\r\n }\r\n\r\n setData({\r\n includedLocations: result.includedLocations,\r\n excludedLocations: result.excludedLocations,\r\n });\r\n }, [includedLocations, excludedLocations, setData, renderToaster, i18n]);\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n\r\n \r\n setData({ includedLocations: bingMapLocations })}\r\n onNegativeLocationTargetsChange={bingMapLocations => setData({ excludedLocations: bingMapLocations })}\r\n customizedLocationEqual={isLegacyLocationAndRadiusEqual}\r\n getIsRadiusTarget={getIsRadiusTarget}\r\n />\r\n \r\n
\r\n );\r\n};\r\n\r\nSpecificLocationTargetsEditor.propTypes = {\r\n setData: PropTypes.func.isRequired,\r\n data: PropTypes.shape({}),\r\n scope: PropTypes.shape({\r\n values: PropTypes.shape({\r\n cid: PropTypes.number.isRequired,\r\n aid: PropTypes.number.isRequired,\r\n }).isRequired,\r\n }).isRequired,\r\n edmCampaign: PropTypes.shape({}).isRequired,\r\n allowPositiveLocationTargeting: PropTypes.bool,\r\n allowNegativeLocationTargeting: PropTypes.bool,\r\n showSearchTypeOptions: PropTypes.bool,\r\n showBulkLocations: PropTypes.bool,\r\n strings: PropTypes.shape({}),\r\n defaultSelectedSearchType: PropTypes.string,\r\n isBrandAwarenessCampaignScenario: PropTypes.bool,\r\n};\r\n\r\nSpecificLocationTargetsEditor.defaultProps = {\r\n data: {},\r\n allowPositiveLocationTargeting: true,\r\n allowNegativeLocationTargeting: true,\r\n showSearchTypeOptions: true,\r\n showBulkLocations: false,\r\n strings: {},\r\n defaultSelectedSearchType: undefined,\r\n isBrandAwarenessCampaignScenario: false,\r\n};\r\n","import React from 'react';\r\nimport { Shimmer, ShimmerElementType } from '@fluentui/react';\r\n\r\nconst singleLineShimmer = [\r\n { type: ShimmerElementType.line, width: 200, height: 50 },\r\n];\r\n\r\nexport const SingleLineShimmer = () => (\r\n
\r\n \r\n
\r\n);\r\n","import React from 'react';\r\nimport { Shimmer, ShimmerElementType } from '@fluentui/react';\r\n\r\nexport const radiusShimmerElement = [\r\n { type: ShimmerElementType.line, width: 20, height: 20 },\r\n { type: ShimmerElementType.gap, width: 5 },\r\n { type: ShimmerElementType.line, height: 16, width: 300 },\r\n { type: ShimmerElementType.gap, height: 20, width: '100%' },\r\n];\r\n\r\nexport const SectionShimmer = () => (\r\n
\r\n \r\n \r\n \r\n
\r\n);\r\n","import React from 'react';\r\nimport { Shimmer, ShimmerElementType, mergeStyles } from '@fluentui/react';\r\n\r\nconst wrapperClass = mergeStyles({\r\n padding: 2,\r\n selectors: {\r\n '& > .ms-Shimmer-container': {\r\n margin: '10px 0',\r\n border: 'none',\r\n },\r\n },\r\n});\r\n\r\nconst shimmerWithElementFirstRow = [\r\n { type: ShimmerElementType.line, height: 30 },\r\n { type: ShimmerElementType.gap, width: 10, height: 30 },\r\n { type: ShimmerElementType.line, height: 30 },\r\n { type: ShimmerElementType.gap, width: 10, height: 30 },\r\n { type: ShimmerElementType.line, height: 30 },\r\n { type: ShimmerElementType.gap, width: 10, height: 30 },\r\n { type: ShimmerElementType.line, height: 30 },\r\n { type: ShimmerElementType.gap, width: 10, height: 30 },\r\n { type: ShimmerElementType.line, height: 30 },\r\n { type: ShimmerElementType.gap, width: 10, height: 30 },\r\n];\r\n\r\nconst shimmerWithElementSecondRow = [\r\n { type: ShimmerElementType.circle, height: 24 },\r\n { type: ShimmerElementType.gap, width: '2%', height: 24 },\r\n { type: ShimmerElementType.line, height: 16, width: '20%' },\r\n { type: ShimmerElementType.gap, width: '100%', height: 16 },\r\n];\r\n\r\nexport const AdScheduleShimmer = () => (\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n);\r\n","import React from 'react';\r\nimport { Shimmer, ShimmerElementType } from '@fluentui/react';\r\n\r\nexport const radiusShimmerElement = [\r\n { type: ShimmerElementType.line, width: 20, height: 20 },\r\n { type: ShimmerElementType.gap, width: 5 },\r\n { type: ShimmerElementType.line, height: 16, width: 300 },\r\n { type: ShimmerElementType.gap, height: 20, width: '100%' },\r\n];\r\n\r\nexport const RadiusShimmer = () => (\r\n \r\n);\r\n","import React from 'react';\r\nimport { Shimmer, ShimmerElementType } from '@fluentui/react';\r\n\r\nconst audienceShimmerElement = [\r\n { type: ShimmerElementType.line, width: 200, height: 100 },\r\n { type: ShimmerElementType.gap, width: '2%', height: 100 },\r\n { type: ShimmerElementType.line, width: 200, height: 100 },\r\n { type: ShimmerElementType.gap, width: '100%', height: 100 },\r\n];\r\n\r\nexport const AudienceSignalShimmer = () => (\r\n
\r\n \r\n
\r\n);\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nexport const withShimmer = (WrappedComponent, Shimmer) => {\r\n const ShimmerWrapper = ({ showShimmer, ...props }) => {\r\n if (showShimmer) {\r\n return ;\r\n }\r\n\r\n return ;\r\n };\r\n\r\n ShimmerWrapper.propTypes = {\r\n showShimmer: PropTypes.bool,\r\n };\r\n\r\n ShimmerWrapper.defaultProps = {\r\n showShimmer: false,\r\n };\r\n\r\n return ShimmerWrapper;\r\n};\r\n\r\n","export const ERROR_ENTITY = {\r\n Campaign: 'campaign',\r\n AdGroup: 'adGroup',\r\n AssetGroup: 'assetGroup',\r\n CampaignLocation: 'campaignLocation',\r\n CampaignRadius: 'campaignRadius',\r\n CampaignNegativeLocation: 'campaignNegativeLocation',\r\n CampaignLocationIntent: 'campaignLocationIntent',\r\n CampaignDayTimeCriterion: 'campaignDayTimeCriterion',\r\n CampaignNegativeWebpage: 'campaignNegativeWebpage',\r\n AudienceGroupAssetGroupAssociation: 'audienceGroupAssetGroupAssociation',\r\n BrandListAssociation: 'brandListAssociation',\r\n};\r\n","export const CnDefaultLocationTargetsViewModel = {\r\n bidMode: false,\r\n currentLevelSettings: {\r\n currentLocations: [{\r\n Criterion: {\r\n BidAdjustment: 0,\r\n LocationCriterion: {\r\n CountryCode: 'CN',\r\n Latitude: 36.5594,\r\n LesLocationType: 'Country',\r\n LocationId: 39,\r\n LocationType: 'Country',\r\n Longitude: 103.753,\r\n Name: 'China',\r\n NameTypeCombo: 'China (country/region)',\r\n Type: 'Location',\r\n },\r\n OriginalBidAdjustment: 0,\r\n OriginalCashbackPercent: undefined,\r\n Type: 'Location',\r\n },\r\n CriterionType: 'Location',\r\n Id: undefined,\r\n SelectionStatus: 'Included',\r\n Status: 'Active',\r\n bidAdjustmentDropdown: 'Increase by',\r\n bidAdjustmentInput: 0,\r\n location: 'China (country/region)',\r\n }],\r\n initLocations: [],\r\n peopleInLocation: true,\r\n peopleSearchingForLocation: true,\r\n targetOption: 'specific',\r\n },\r\n parentLevelSettings: {},\r\n useParentLevel: false,\r\n};\r\n\r\nexport const globalDefaultLocationTargetsViewModel = {\r\n bidMode: false,\r\n currentLevelSettings: {\r\n initLocations: [],\r\n peopleInLocation: true,\r\n peopleSearchingForLocation: true,\r\n targetOption: 'everywhere',\r\n },\r\n parentLevelSettings: {},\r\n useParentLevel: false,\r\n};\r\n\r\nexport const getDefaultLocationTargetsViewModel = isCnMarket => (isCnMarket ? CnDefaultLocationTargetsViewModel : globalDefaultLocationTargetsViewModel);\r\n\r\nexport const getDefaultLanguagesViewModel = isCnMarket => (isCnMarket ? ['SimplifiedChinese'] : ['All']);\r\n","export const campaignLanguageStrings = {\r\n None: _TL_('Use my campaign settings'),\r\n Albanian: _TL_('Albanian'),\r\n Arabic: _TL_('Arabic'),\r\n Bosnian: _TL_('Bosnian'),\r\n Bulgarian: _TL_('Bulgarian'),\r\n Croatian: _TL_('Croatian'),\r\n Czech: _TL_('Czech'),\r\n Danish: _TL_('Danish'),\r\n Dutch: _TL_('Dutch'),\r\n English: _TL_('English'),\r\n Estonian: _TL_('Estonian'),\r\n Finnish: _TL_('Finnish'),\r\n French: _TL_('French'),\r\n German: _TL_('German'),\r\n Greek: _TL_('Greek'),\r\n Hungarian: _TL_('Hungarian'),\r\n Icelandic: _TL_('Icelandic'),\r\n Italian: _TL_('Italian'),\r\n Japanese: _TL_('Japanese'),\r\n Latvian: _TL_('Latvian'),\r\n Lithuanian: _TL_('Lithuanian'),\r\n Macedonian: _TL_('Macedonian'),\r\n Maltese: _TL_('Maltese'),\r\n Norwegian: _TL_('Norwegian'),\r\n Polish: _TL_('Polish'),\r\n Portuguese: _TL_('Portuguese'),\r\n Romanian: _TL_('Romanian'),\r\n Russian: _TL_('Russian'),\r\n Serbian: _TL_('Serbian'),\r\n SimplifiedChinese: _TL_('Simplified Chinese'),\r\n Slovak: _TL_('Slovak'),\r\n Slovenian: _TL_('Slovenian'),\r\n Spanish: _TL_('Spanish'),\r\n Swedish: _TL_('Swedish'),\r\n TraditionalChinese: _TL_('Traditional Chinese'),\r\n Turkish: _TL_('Turkish'),\r\n Hebrew: _TL_('Hebrew'),\r\n Hindi: _TL_('Hindi'),\r\n Malay: _TL_('Malay'),\r\n Thai: _TL_('Thai'),\r\n Indonesian: _TL_('Indonesian'),\r\n Tagalog: _TL_('Tagalog'),\r\n Vietnamese: _TL_('Vietnamese'),\r\n};\r\n","import React, { useContext } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { RemainingCharsValidatedTextField } from '@bingads-webui-campaign-react/remaining-chars-hint';\r\nimport { Campaign } from '@bingads-webui/campaign-odata-schemas';\r\nimport {\r\n entityIs,\r\n andComp,\r\n propertyIs,\r\n} from '@bingads-webui-campaign-react/form-error';\r\n\r\nimport { ERROR_ENTITY } from '../constants';\r\n\r\nconst entityIsCampaign = entityIs(ERROR_ENTITY.Campaign);\r\nconst campaignNameProp = andComp(entityIsCampaign, propertyIs('Name'));\r\n\r\nexport const ValidatedCampaignName = () => {\r\n const i18n = useContext(I18nContext);\r\n\r\n return (\r\n \r\n );\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n TextTitle,\r\n getPanelErrorProps,\r\n ValidatedFixedPanel,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\n\r\nimport { ValidatedCampaignName } from '../validated-campaign-name';\r\nimport { SingleLineShimmer, withShimmer } from '../shimmers';\r\n\r\nconst ValidatedCampaignNameWithShimmer = withShimmer(ValidatedCampaignName, SingleLineShimmer);\r\n\r\nexport const CampaignNamePanel = ({ key, isLoading, ...rest }) => (\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n {...rest}\r\n >\r\n \r\n \r\n);\r\n\r\nCampaignNamePanel.propTypes = {\r\n key: PropTypes.string.isRequired,\r\n isLoading: PropTypes.bool,\r\n};\r\n\r\nCampaignNamePanel.defaultProps = {\r\n isLoading: false,\r\n};\r\n","export const PANEL_KEYS = {\r\n CAMPAIGN_NAME: 'campaign',\r\n LANGUAGE_TARGET: 'language-target',\r\n LOCATIONS: 'locations',\r\n AD_SCHEDULE: 'ad-schedule',\r\n BUDGET: 'budget',\r\n START_END_DATES: 'start-end-dates',\r\n SHORT_HEADLINES: 'headlines',\r\n DESCRIPTIONS: 'descriptions',\r\n IMAGES: 'images',\r\n AUDIENCE_SIGNAL: 'audience-signal',\r\n VIDEOS: 'videos',\r\n BID_STRATEGY: 'bid-strategy',\r\n BID_VALUE: 'bid-value',\r\n URL_OPTIONS: 'url-options',\r\n LOGOS: 'logos',\r\n FINAL_URL_EXPANSION: 'final-url-expansion',\r\n AUTO_GEN_ASSETS: 'auto-gen-assets',\r\n PAGE_FEEDS: 'page-feeds',\r\n CAMPAIGN_URL_OPTIONS: 'campaign-url-options',\r\n BRAND_EXCLUSIONS: 'brand-exclusions',\r\n COST_PER_SALE: 'cost_per_sale',\r\n SHOPPING: 'shopping-ads',\r\n CONVERSIONS: 'conversions',\r\n PRONG_IMAGES: 'prong-images',\r\n SPOTLIGHT_IMAGES: 'spotlight-images',\r\n NEW_CUSTOMER_ACQUISITION: 'new-customer-acquisition',\r\n APP: 'app',\r\n DISCLAIMERS: 'disclaimers',\r\n};\r\n","import { isEmpty } from 'underscore';\r\nimport { withValidation, withError, AdapterFactory } from '@bingads-webui-react/validation';\r\nimport { LanguageTarget, SingleLanguageTarget } from '@bingads-webui-campaign-react/language-target';\r\n\r\nconst LanguageTargetValidationAdapter = AdapterFactory({\r\n defaultValue: [],\r\n valueToInject: 'selectedLanguages',\r\n functionToInject: 'setSelectedLanguages',\r\n});\r\n\r\nexport const LanguageTargetValidatorFactory = i18n => function LanguageTargetValidator(value, defaultValidator) {\r\n const defaultErrors = defaultValidator(value);\r\n return [\r\n ...isEmpty(defaultErrors) ? [] : defaultErrors,\r\n ...value.length < 1 ? [i18n.getString(_TL_('Select at least one language'))] : [],\r\n ];\r\n};\r\n\r\nexport const SingleLanguageTargetValidator = (value, defaultValidator) => {\r\n if (value === null || value === undefined) {\r\n return [];\r\n }\r\n return defaultValidator(value);\r\n};\r\n\r\nconst SingleLanguageTargetValidationAdapter = AdapterFactory({\r\n defaultValue: 'None',\r\n valueToInject: 'selectedLanguage',\r\n functionToInject: 'setSelectedLanguage',\r\n});\r\n\r\nexport const ValidatedLanguageTarget = withError(withValidation(LanguageTarget, LanguageTargetValidationAdapter));\r\n\r\nexport const ValidatedSingleLanguageTarget = withError(withValidation(SingleLanguageTarget, SingleLanguageTargetValidationAdapter));\r\n","import React, { useContext, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { map } from 'underscore';\r\nimport { withUnvalidatedControlErrors, withControlErrorHandling } from '@bingads-webui-campaign-react/error-handling';\r\nimport {\r\n entityIs,\r\n propertyIs,\r\n andComp,\r\n} from '@bingads-webui-campaign-react/form-error';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport {\r\n TextTitle,\r\n ValidatedPanel,\r\n getPanelErrorProps\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\n\r\nimport { PANEL_KEYS } from './panel-keys';\r\nimport { ERROR_ENTITY, campaignLanguageStrings } from '../../constants';\r\nimport { LanguageImg } from '../../media';\r\nimport { SectionShimmer, withShimmer } from '../shimmers';\r\nimport { ValidatedLanguageTarget, LanguageTargetValidatorFactory } from '../validated-language-target';\r\n\r\nconst entityIsCampaign = entityIs(ERROR_ENTITY.Campaign);\r\nconst campaignLanguagesProp = andComp(entityIsCampaign, propertyIs('Languages'));\r\n\r\nconst ServerValidatedLanguageTargetWithShimmer =\r\n withShimmer(\r\n withControlErrorHandling(withUnvalidatedControlErrors(\r\n ValidatedLanguageTarget,\r\n { filter: campaignLanguagesProp }\r\n )),\r\n SectionShimmer\r\n );\r\n\r\nexport const LanguageTargetPanel = (props) => {\r\n const i18n = useContext(I18nContext);\r\n const serverContext = useContext(ServerContext);\r\n\r\n const {\r\n CurrentLocale: locale,\r\n DynamicPermissions,\r\n Permissions,\r\n } = serverContext;\r\n\r\n const permissions = useMemo(() => ({ dynamic: { ...DynamicPermissions }, ...Permissions }), [DynamicPermissions, Permissions]);\r\n\r\n const {\r\n isLoading,\r\n expand,\r\n data = {},\r\n topicKey,\r\n ...rest\r\n } = props;\r\n\r\n return (\r\n i18n.getString(campaignLanguageStrings[lang] || lang)\r\n ).toString()}\r\n icon={LanguageImg}\r\n />}\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand,\r\n expandKey: PANEL_KEYS.LANGUAGE_TARGET,\r\n }}\r\n {...rest}\r\n >\r\n \r\n \r\n );\r\n};\r\n\r\nLanguageTargetPanel.propTypes = {\r\n isLoading: PropTypes.bool,\r\n expand: PropTypes.func.isRequired,\r\n data: PropTypes.shape({}),\r\n topicKey: PropTypes.string,\r\n};\r\n\r\nLanguageTargetPanel.defaultProps = {\r\n isLoading: false,\r\n data: {},\r\n topicKey: null,\r\n};\r\n","import _ from 'underscore';\r\n\r\nexport const minuteToSaveMap = {\r\n ZERO: 0,\r\n FIFTEEN: 15,\r\n THIRTY: 30,\r\n FORTY_FIVE: 45,\r\n};\r\n\r\nexport const getDay = (day) => {\r\n switch (day) {\r\n case 'Alldays':\r\n return _TL_('All days');\r\n case 'Monday':\r\n return _TL_('Monday');\r\n case 'Tuesday':\r\n return _TL_('Tuesday');\r\n case 'Wednesday':\r\n return _TL_('Wednesday');\r\n case 'Thursday':\r\n return _TL_('Thursday');\r\n case 'Friday':\r\n return _TL_('Friday');\r\n case 'Saturday':\r\n return _TL_('Saturday');\r\n case 'Sunday':\r\n return _TL_('Sunday');\r\n case 'MondayToFriday':\r\n return _TL_('Monday - Friday');\r\n default:\r\n return _TL_('All days');\r\n }\r\n};\r\n\r\nexport const getMin = (min) => {\r\n switch (min) {\r\n case 0:\r\n return '00';\r\n case 15:\r\n return '15';\r\n case 30:\r\n return '30';\r\n case 45:\r\n return '45';\r\n default:\r\n return '00';\r\n }\r\n};\r\n\r\nexport const getTime = (hour, is12) => {\r\n switch (hour) {\r\n case 0:\r\n return is12 ? _TL_('12:{{min}} AM') : _TL_('00:{{min}}');\r\n case 1:\r\n return is12 ? _TL_('01:{{min}} AM') : _TL_('01:{{min}}');\r\n case 2:\r\n return is12 ? _TL_('02:{{min}} AM') : _TL_('02:{{min}}');\r\n case 3:\r\n return is12 ? _TL_('03:{{min}} AM') : _TL_('03:{{min}}');\r\n case 4:\r\n return is12 ? _TL_('04:{{min}} AM') : _TL_('04:{{min}}');\r\n case 5:\r\n return is12 ? _TL_('05:{{min}} AM') : _TL_('05:{{min}}');\r\n case 6:\r\n return is12 ? _TL_('06:{{min}} AM') : _TL_('06:{{min}}');\r\n case 7:\r\n return is12 ? _TL_('07:{{min}} AM') : _TL_('07:{{min}}');\r\n case 8:\r\n return is12 ? _TL_('08:{{min}} AM') : _TL_('08:{{min}}');\r\n case 9:\r\n return is12 ? _TL_('09:{{min}} AM') : _TL_('09:{{min}}');\r\n case 10:\r\n return is12 ? _TL_('10:{{min}} AM') : _TL_('10:{{min}}');\r\n case 11:\r\n return is12 ? _TL_('11:{{min}} AM') : _TL_('11:{{min}}');\r\n case 12:\r\n return is12 ? _TL_('12:{{min}} PM') : _TL_('12:{{min}}');\r\n case 13:\r\n return is12 ? _TL_('01:{{min}} PM') : _TL_('13:{{min}}');\r\n case 14:\r\n return is12 ? _TL_('02:{{min}} PM') : _TL_('14:{{min}}');\r\n case 15:\r\n return is12 ? _TL_('03:{{min}} PM') : _TL_('15:{{min}}');\r\n case 16:\r\n return is12 ? _TL_('04:{{min}} PM') : _TL_('16:{{min}}');\r\n case 17:\r\n return is12 ? _TL_('05:{{min}} PM') : _TL_('17:{{min}}');\r\n case 18:\r\n return is12 ? _TL_('06:{{min}} PM') : _TL_('18:{{min}}');\r\n case 19:\r\n return is12 ? _TL_('07:{{min}} PM') : _TL_('19:{{min}}');\r\n case 20:\r\n return is12 ? _TL_('08:{{min}} PM') : _TL_('20:{{min}}');\r\n case 21:\r\n return is12 ? _TL_('09:{{min}} PM') : _TL_('21:{{min}}');\r\n case 22:\r\n return is12 ? _TL_('10:{{min}} PM') : _TL_('22:{{min}}');\r\n case 23:\r\n return is12 ? _TL_('11:{{min}} PM') : _TL_('23:{{min}}');\r\n case 24:\r\n return is12 ? _TL_('12:{{min}} AM') : _TL_('24:{{min}}');\r\n default:\r\n return is12 ? _TL_('00:{{min}} AM') : _TL_('00:{{min}}');\r\n }\r\n};\r\n\r\n\r\nexport const getDayTimeDetails = (i18n, dayTime, is12, hideBidAdjustment = false) => {\r\n const startHour = dayTime().StartHour();\r\n const endHour = dayTime().EndHour();\r\n const startMin = getMin(minuteToSaveMap[dayTime().StartMinute()]);\r\n const endMin = getMin(minuteToSaveMap[dayTime().EndMinute()]);\r\n const dateTimePart = `${i18n.getString(getDay(dayTime().Day()))} ${i18n.getString(_TL_('from {{from}} to {{to}}'), {\r\n from: i18n.getString(getTime(startHour, is12), { min: startMin }),\r\n to: i18n.getString(getTime(endHour, is12), { min: endMin }),\r\n })}`;\r\n\r\n if (hideBidAdjustment) {\r\n return dateTimePart;\r\n }\r\n return `${dateTimePart}: ${(_.isUndefined(dayTime().BidAdjustmentType()) || dayTime().BidAdjustmentType() > 0) ? i18n.getString(_TL_('Increase By')) : i18n.getString(_TL_('Decrease By'))}\r\n ${_.isUndefined(dayTime().BidAdjustmentAmount()) ? 0 : dayTime().BidAdjustmentAmount()}%`;\r\n};\r\n\r\nexport const getAdScheduleDetails = (i18n, adScheduleView, hideBidAdjustment = false) => {\r\n if (adScheduleView) {\r\n const useCampaignSettings = adScheduleView.koModel.useCampaignSettings();\r\n const schedules = useCampaignSettings ? adScheduleView.koModel.campaignDayTimeRanges() : adScheduleView.koModel.dayTimeRanges();\r\n let details = '';\r\n const dateSettings = adScheduleView.getDateSettings();\r\n if (!_.isEmpty(dateSettings) && dateSettings.EndDate !== '1/1/3000') {\r\n details = i18n.getString(_TL_('Scheduled from {{from}} to {{to}}: '), { from: dateSettings.StartDate, to: dateSettings.EndDate });\r\n }\r\n\r\n const hideAdScheduleBidAdjustments = adScheduleView.koModel.hideAdScheduleBidAdjustments();\r\n if (!hideAdScheduleBidAdjustments) {\r\n const is12 = adScheduleView.koModel.timeDisplayType() === '12-hour';\r\n const len = schedules.length;\r\n schedules.forEach((schedule, index) => {\r\n details += getDayTimeDetails(i18n, schedule, is12, hideBidAdjustment);\r\n if (details && index < len - 1) {\r\n details += ', ';\r\n }\r\n });\r\n }\r\n const adScheduleUseSearcherTimeZone = adScheduleView.getAdScheduleUseSearcherTimeZone();\r\n if (adScheduleUseSearcherTimeZone) {\r\n details += ` ${i18n.getString(_TL_('In Ad viewer\\'s time zone'))}`;\r\n } else {\r\n details += ` ${i18n.getString(_TL_('In Your account\\'s time zone'))}`;\r\n }\r\n return details;\r\n }\r\n return '';\r\n};\r\n","import React, { useContext, useState, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { withUnvalidatedControlErrors, withControlErrorHandling } from '@bingads-webui-campaign-react/error-handling';\r\nimport { ValidatedLegacyAdSchedule } from '@bingads-webui-campaign/ad-schedule';\r\nimport {\r\n entityIs,\r\n} from '@bingads-webui-campaign-react/form-error';\r\nimport {\r\n TextTitle,\r\n getPanelErrorProps,\r\n ValidatedPanel,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\n\r\nimport { ERROR_ENTITY } from '../../constants';\r\nimport { getAdScheduleDetails } from '../../utils/ad-schedule-shared';\r\nimport { AdScheduleImg } from '../../media';\r\nimport { AdScheduleShimmer, withShimmer } from '../shimmers';\r\n\r\nconst campaignDayTimeCriterions = entityIs(ERROR_ENTITY.CampaignDayTimeCriterion);\r\n\r\nconst ServerValidatedLegacyAdScheduleWithShimmer =\r\n withShimmer(\r\n withControlErrorHandling(withUnvalidatedControlErrors(\r\n ValidatedLegacyAdSchedule,\r\n { filter: campaignDayTimeCriterions }\r\n )),\r\n AdScheduleShimmer\r\n );\r\n\r\nexport const AdSchedulePanel = (props) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const [adScheduleView, setAdScheduleView] = useState(null);\r\n const setAdScheduleViewCallback = useCallback((view) => { setAdScheduleView(view); }, []);\r\n\r\n const {\r\n key,\r\n isLoading,\r\n expand,\r\n data = {},\r\n ...rest\r\n } = props;\r\n\r\n const { adSchedules } = data;\r\n\r\n return (\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand,\r\n expandKey: key,\r\n }}\r\n {...rest}\r\n >\r\n \r\n \r\n );\r\n};\r\n\r\nAdSchedulePanel.propTypes = {\r\n key: PropTypes.string.isRequired,\r\n isLoading: PropTypes.bool,\r\n expand: PropTypes.func.isRequired,\r\n data: PropTypes.shape({}),\r\n};\r\n\r\nAdSchedulePanel.defaultProps = {\r\n isLoading: false,\r\n data: {},\r\n};\r\n","import React, { useContext, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { withUnvalidatedControlErrors, withControlErrorHandling } from '@bingads-webui-campaign-react/error-handling';\r\nimport {\r\n entityIs,\r\n propertyIs,\r\n andComp,\r\n} from '@bingads-webui-campaign-react/form-error';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n TextTitle,\r\n ValidatedPanel,\r\n getPanelErrorProps\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\n\r\nimport { ERROR_ENTITY, campaignLanguageStrings } from '../../constants';\r\nimport { LanguageImg } from '../../media';\r\nimport { ValidatedSingleLanguageTarget, SingleLanguageTargetValidator } from '../validated-language-target';\r\n\r\nconst entityIsAdgroup = entityIs(ERROR_ENTITY.AdGroup);\r\nconst adgroupLanguageProp = andComp(entityIsAdgroup, propertyIs('Language'));\r\n\r\nconst ServerValidatedLanguageTarget = withControlErrorHandling(withUnvalidatedControlErrors(ValidatedSingleLanguageTarget, { filter: adgroupLanguageProp }));\r\n\r\nexport const SingleLanguageTargetPanel = (props) => {\r\n const serverContext = useContext(ServerContext);\r\n const i18n = useContext(I18nContext);\r\n\r\n const {\r\n CurrentLocale: locale,\r\n DynamicPermissions,\r\n Permissions,\r\n } = serverContext;\r\n\r\n const permissions = useMemo(() => ({ dynamic: { ...DynamicPermissions }, ...Permissions }), [DynamicPermissions, Permissions]);\r\n\r\n const {\r\n expand,\r\n data = {},\r\n ...rest\r\n } = props;\r\n\r\n return (\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand,\r\n expandKey: 'language',\r\n }}\r\n {...rest}\r\n >\r\n \r\n \r\n );\r\n};\r\n\r\nSingleLanguageTargetPanel.propTypes = {\r\n expand: PropTypes.func.isRequired,\r\n data: PropTypes.shape({}),\r\n};\r\n\r\nSingleLanguageTargetPanel.defaultProps = {\r\n data: {},\r\n};\r\n","import { useContext, useCallback } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\n\r\nexport const useLocalizeBudget = () => {\r\n const i18n = useContext(I18nContext);\r\n const localizeBudget = useCallback((budget, currency) => i18n.formatCurrency(\r\n Number(budget), currency.toUpperCase(),\r\n { withSymbol: false, maximumFractionDigits: 2 }\r\n ), [i18n]);\r\n return {\r\n localizeBudget,\r\n };\r\n};\r\n","import React, { useContext, useMemo, useCallback, useState, useEffect } from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { withUnvalidatedControlErrors, withControlErrorHandling } from '@bingads-webui-campaign-react/error-handling';\r\nimport {\r\n entityIs,\r\n propertyIs,\r\n andComp,\r\n} from '@bingads-webui-campaign-react/form-error';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport {\r\n TextTitle,\r\n ValidatedPanel,\r\n getPanelErrorProps\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { BudgetComponent } from '@bingads-webui-campaign-react/budget-component';\r\nimport { useResponsiveStyles } from '@bingads-webui-campaign-react/common-hooks';\r\n// eslint-disable-next-line\r\nimport BingAdsWebUIStaticLegacyPageContext from '@bingads-webui-static-legacy/page-context';\r\n// eslint-disable-next-line\r\nimport { BudgetSuggestionDialog, useBudgetSuggestionRepository, MODE } from '@bingads-webui-campaign-react/budget-suggestion-v2';\r\n\r\nimport { ERROR_ENTITY } from '../../constants';\r\nimport { BudgetImg } from '../../media';\r\nimport { useLocalizeBudget } from '../../utils/use-localize-budget';\r\nimport { SectionShimmer, withShimmer } from '../shimmers';\r\n\r\nconst { BudgetRange } = BingAdsWebUIStaticLegacyPageContext;\r\n\r\nconst getStyles = () => ({\r\n budgetTitle: {\r\n fontSize: '18px',\r\n display: 'inline',\r\n },\r\n});\r\n\r\nconst entityIsCampaign = entityIs(ERROR_ENTITY.Campaign);\r\nconst budgetProp = andComp(entityIsCampaign, propertyIs('Budget'));\r\nconst ServerValidatedBudgetComponentWithShimmer =\r\n withShimmer(\r\n withControlErrorHandling(withUnvalidatedControlErrors(\r\n BudgetComponent,\r\n { filter: budgetProp }\r\n )),\r\n SectionShimmer\r\n );\r\n\r\nexport const BudgetPanel = (props) => {\r\n const i18n = useContext(I18nContext);\r\n const serverContext = useContext(ServerContext);\r\n const { CurrentAccount: { CurrencyCode } } = serverContext || {};\r\n const getResponsiveStyles = useResponsiveStyles(getStyles);\r\n const { localizeBudget } = useLocalizeBudget();\r\n\r\n const {\r\n key,\r\n isLoading,\r\n expand,\r\n onDataChange,\r\n data = {},\r\n ...rest\r\n } = props;\r\n\r\n const {\r\n budgetAmount,\r\n currency,\r\n campaignId,\r\n campaignType,\r\n showBudgetSuggestion,\r\n isCampaignSetting,\r\n campaign,\r\n } = data;\r\n\r\n const { DailyRange } = BudgetRange || {};\r\n\r\n const budgetSuggestion = useMemo(() => ({\r\n Currency: currency,\r\n GlobalMaximumBudget: { DailyBudget: DailyRange.CeilingValue ? DailyRange.CeilingValue : 3000000 },\r\n GlobalMinimumBudget: { DailyBudget: DailyRange.FloorValue ? DailyRange.FloorValue : 0.05 },\r\n }), [currency, DailyRange.CeilingValue, DailyRange.FloorValue]);\r\n\r\n\r\n const budgetTitleDetails = useMemo(() => i18n.getString(_TL_('{{budgetAmount}} {{currency}} per day'), { budgetAmount, currency }), [budgetAmount, currency, i18n]);\r\n\r\n const onFieldChange = useCallback((updatedData) => {\r\n onDataChange({\r\n data: prevData => ({\r\n ...prevData,\r\n ...updatedData,\r\n }),\r\n });\r\n }, [onDataChange]);\r\n\r\n const onBudgetChange = useCallback((newBudget, shouldLocalize = false) => {\r\n if (newBudget) {\r\n const budgetAmountValue = shouldLocalize ? localizeBudget(newBudget, currency) : newBudget;\r\n onFieldChange({ budgetAmount: budgetAmountValue });\r\n }\r\n }, [currency, onFieldChange, localizeBudget]);\r\n\r\n const onBudgetChangeFromBudgetSuggestion = useCallback((newBudget, shouldLocalize = false) => {\r\n if (newBudget && newBudget.Amount) {\r\n const budgetAmountValue = shouldLocalize ? localizeBudget(newBudget.Amount, currency) : newBudget.Amount;\r\n onFieldChange({ budgetAmount: budgetAmountValue });\r\n }\r\n }, [currency, onFieldChange, localizeBudget]);\r\n\r\n const onBudgetValidate = useCallback(({ isValid, messages }) => {\r\n onFieldChange({ isBudgetValid: isValid, budgetErrors: messages });\r\n }, [onFieldChange]);\r\n\r\n const [budgetSuggestionData, setBudgetSuggestionData] = useState(null);\r\n const {\r\n loadBudget,\r\n } = useBudgetSuggestionRepository({\r\n campaignId,\r\n mode: MODE.EDITING,\r\n campaignType,\r\n currency,\r\n });\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n useEffect(() => {\r\n if (showBudgetSuggestion && isCampaignSetting) {\r\n loadBudget({ campaign: {}, assetGroup: {} }).then((datas) => {\r\n setBudgetSuggestionData(datas);\r\n }).finally(() => {\r\n });\r\n }\r\n }, [isCampaignSetting, loadBudget, showBudgetSuggestion]);\r\n\r\n return (\r\n \r\n }\r\n actuationProps={{\r\n expandKey: key,\r\n expand,\r\n }}\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n {...rest}\r\n >\r\n \r\n\r\n {/* will check Delivery Status in campaign when MT added */}\r\n {/* {showBudgetSuggestion && (data.DeliveryStatus === 'BudgetSuggestions' || 'BudgetSuggestions' in data.DeliveryStatusDetails) && isCampaignSetting && */}\r\n {showBudgetSuggestion &&\r\n isCampaignSetting &&\r\n !_.isEmpty(budgetSuggestionData) &&\r\n \r\n }\r\n \r\n );\r\n};\r\n\r\nBudgetPanel.propTypes = {\r\n key: PropTypes.string.isRequired,\r\n isLoading: PropTypes.bool,\r\n expand: PropTypes.func.isRequired,\r\n data: PropTypes.shape({}),\r\n onDataChange: PropTypes.func.isRequired,\r\n};\r\n\r\nBudgetPanel.defaultProps = {\r\n isLoading: false,\r\n data: {},\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n TextTitle,\r\n ValidatedPanel,\r\n getPanelErrorProps\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { ValidatedLegacyDateSetting, getDateSettingDetails } from '@bingads-webui-campaign/date-setting';\r\n\r\nimport { PANEL_KEYS } from './panel-keys';\r\nimport { StartEndDateImg } from '../../media';\r\nimport { DateSettingsShimmer, withShimmer } from '../shimmers';\r\n\r\nconst ValidatedLegacyDateSettingWithShimmer = withShimmer(ValidatedLegacyDateSetting, DateSettingsShimmer);\r\n\r\nexport const DateSettingsPanel = (props) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const {\r\n isLoading,\r\n expand,\r\n timeZone,\r\n data = {},\r\n ...rest\r\n } = props;\r\n\r\n const {\r\n StartDate,\r\n EndDate,\r\n Id,\r\n } = data;\r\n\r\n return (\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand,\r\n expandKey: PANEL_KEYS.START_END_DATES,\r\n }}\r\n {...rest}\r\n >\r\n \r\n \r\n );\r\n};\r\n\r\nDateSettingsPanel.propTypes = {\r\n isLoading: PropTypes.bool,\r\n // eslint-disable-next-line react/forbid-prop-types\r\n collapseState: PropTypes.arrayOf(PropTypes.any).isRequired,\r\n expand: PropTypes.func.isRequired,\r\n data: PropTypes.shape({}),\r\n timeZone: PropTypes.string,\r\n};\r\n\r\nDateSettingsPanel.defaultProps = {\r\n isLoading: false,\r\n data: {},\r\n timeZone: null,\r\n};\r\n","import React from 'react';\r\nimport { Shimmer, ShimmerElementType } from '@fluentui/react';\r\n\r\nimport { SectionShimmer } from './section-shimmer';\r\nimport { RadiusShimmer } from './radius-shimmer';\r\n\r\nexport const DateSettingsShimmer = () => (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n HeadlineAssetCollection,\r\n} from '@bingads-webui-campaign-react/pmax-text-input';\r\nimport {\r\n TextTitle,\r\n ValidatedPanel,\r\n getPanelErrorProps,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { PANEL_KEYS } from './panel-keys';\r\n\r\nexport const ShortHeadlinesPanel = ({\r\n headlinesCardSummaryDetails,\r\n allAssetsExpand,\r\n icon,\r\n featureName,\r\n setAddNewShortHeadlinesCallback,\r\n isOptional,\r\n ...rest\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n return (\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: allAssetsExpand,\r\n expandKey: PANEL_KEYS.SHORT_HEADLINES,\r\n }}\r\n {...rest}\r\n >\r\n \r\n \r\n );\r\n};\r\n\r\nShortHeadlinesPanel.propTypes = {\r\n headlinesCardSummaryDetails: PropTypes.shape({}).isRequired,\r\n allAssetsExpand: PropTypes.func.isRequired,\r\n icon: PropTypes.node.isRequired,\r\n setAddNewShortHeadlinesCallback: PropTypes.func.isRequired,\r\n featureName: PropTypes.string.isRequired,\r\n isOptional: PropTypes.bool,\r\n};\r\n\r\nShortHeadlinesPanel.defaultProps = {\r\n isOptional: false,\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n DescriptionAssetCollection,\r\n} from '@bingads-webui-campaign-react/pmax-text-input';\r\nimport {\r\n TextTitle,\r\n ValidatedPanel,\r\n getPanelErrorProps,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { PANEL_KEYS } from './panel-keys';\r\n\r\nexport const DescriptionsPanel = ({\r\n descriptionsCardSummaryDetails,\r\n allAssetsExpand,\r\n icon,\r\n setAddNewDescriptionCallback,\r\n featureName,\r\n isOptional,\r\n ...rest\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n return (\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: allAssetsExpand,\r\n expandKey: PANEL_KEYS.DESCRIPTIONS,\r\n }}\r\n {...rest}\r\n >\r\n \r\n \r\n );\r\n};\r\n\r\nDescriptionsPanel.propTypes = {\r\n descriptionsCardSummaryDetails: PropTypes.shape({}).isRequired,\r\n allAssetsExpand: PropTypes.func.isRequired,\r\n icon: PropTypes.node.isRequired,\r\n setAddNewDescriptionCallback: PropTypes.func.isRequired,\r\n featureName: PropTypes.string.isRequired,\r\n isOptional: PropTypes.bool,\r\n};\r\n\r\nDescriptionsPanel.defaultProps = {\r\n isOptional: false,\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n TextTitle,\r\n ValidatedPanel,\r\n getPanelErrorProps,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n ImageListPortalContainerWithControlErrorHandling,\r\n ImageListSummaryCardDetails,\r\n PerfMaxImageSuggestionCarousel,\r\n} from '@bingads-webui-campaign-react/pmax-image-experience';\r\nimport { PermissionsContext } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { PANEL_KEYS } from './panel-keys';\r\n\r\nexport const BaseImagePanel = ({\r\n titleKey,\r\n topicKey,\r\n panelKey,\r\n icon,\r\n iconAltText,\r\n imagesData,\r\n allAssetsExpand,\r\n containerRef,\r\n portalContainerState,\r\n addNewImageCallback,\r\n description,\r\n maxUploadNum,\r\n ...rest\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const permissions = useContext(PermissionsContext);\r\n return (\r\n }\r\n />}\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: allAssetsExpand,\r\n expandKey: panelKey,\r\n }}\r\n {...rest}\r\n >\r\n {description && i18n.getString(description)}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nBaseImagePanel.propTypes = {\r\n titleKey: PropTypes.string.isRequired,\r\n topicKey: PropTypes.string.isRequired,\r\n panelKey: PropTypes.string.isRequired,\r\n icon: PropTypes.string.isRequired,\r\n iconAltText: PropTypes.string.isRequired,\r\n imagesData: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n allAssetsExpand: PropTypes.func.isRequired,\r\n containerRef: PropTypes.shape({}).isRequired,\r\n portalContainerState: PropTypes.shape({}).isRequired,\r\n addNewImageCallback: PropTypes.func.isRequired,\r\n description: PropTypes.string.isRequired,\r\n maxUploadNum: PropTypes.number.isRequired,\r\n};\r\n\r\nexport const ImagesPanel = ({\r\n images,\r\n allAssetsExpand,\r\n icon,\r\n imageExperienceAddNewImageCallback,\r\n maxUploadNum,\r\n imagesContainerRef,\r\n imageExperiencePortalContainerState,\r\n topicKey,\r\n ...rest\r\n}) => (\r\n \r\n);\r\n\r\nImagesPanel.propTypes = {\r\n images: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n allAssetsExpand: PropTypes.func.isRequired,\r\n icon: PropTypes.string.isRequired,\r\n imageExperienceAddNewImageCallback: PropTypes.func.isRequired,\r\n maxUploadNum: PropTypes.number.isRequired,\r\n imagesContainerRef: PropTypes.shape({}).isRequired,\r\n imageExperiencePortalContainerState: PropTypes.shape({}).isRequired,\r\n topicKey: PropTypes.string,\r\n};\r\n\r\nImagesPanel.defaultProps = {\r\n topicKey: null,\r\n};\r\n\r\nexport const LogosPanel = ({\r\n logos,\r\n allAssetsExpand,\r\n icon,\r\n logoExperienceAddNewImageCallback,\r\n maxUploadNum,\r\n logosContainerRef,\r\n logoExperiencePortalContainerState,\r\n description,\r\n titleKey,\r\n ...rest\r\n}) => (\r\n \r\n);\r\n\r\nLogosPanel.propTypes = {\r\n logos: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n allAssetsExpand: PropTypes.func.isRequired,\r\n icon: PropTypes.string.isRequired,\r\n logoExperienceAddNewImageCallback: PropTypes.func.isRequired,\r\n maxUploadNum: PropTypes.number.isRequired,\r\n logosContainerRef: PropTypes.shape({}).isRequired,\r\n logoExperiencePortalContainerState: PropTypes.shape({}).isRequired,\r\n description: PropTypes.string.isRequired,\r\n titleKey: PropTypes.string,\r\n};\r\n\r\nLogosPanel.defaultProp = {\r\n titleKey: null,\r\n};\r\n\r\n","import _ from 'underscore';\r\nimport React, { useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { DefaultButton, Link } from '@bingads-webui-react/fluent-controls';\r\nimport { MessageBar, MessageBarBody } from '@fluentui/react-message-bar';\r\n\r\nimport { ReactTemplate } from '@bingads-webui-react/react-template';\r\n\r\nconst DEFAULT_MESSAGE = _TL_('Conversion tracking must be configured for your bid strategy to be effective. Without configured conversion tracking, your bid strategy will automatically switch to maximizing clicks instead of optimizing for conversions, which may not be ideal for your campaign performance.');\r\nconst TRANSITION_MESSAGE = _TL_('Once we track a sufficient amount of conversion data, your Performance Max campaigns will automatically switch to your selected conversion-based bid strategy. You can always change the bid strategy in the campaign\\'s settings. {{link}}Learn more about bid strategy for Performance Max campaigns{{/link}}');\r\n\r\nconst getTemplateToDisplay = (i18n, usesMaxClicks, isCampaignCreation, hasActiveGoal) => {\r\n if (_.isUndefined(hasActiveGoal)) {\r\n return null;\r\n }\r\n\r\n if (isCampaignCreation) {\r\n if (!hasActiveGoal) {\r\n return { message: i18n.getString(DEFAULT_MESSAGE), type: 'warning' };\r\n }\r\n return null;\r\n }\r\n\r\n if (usesMaxClicks) {\r\n if (!hasActiveGoal) {\r\n return { message: i18n.getString(DEFAULT_MESSAGE), type: 'warning' };\r\n }\r\n return { message: i18n.getString(TRANSITION_MESSAGE), type: 'info' };\r\n }\r\n\r\n return null;\r\n};\r\n\r\nconst getUsesMaxClicks = campaign => _.chain(campaign)\r\n .get(['data', 'CampaignSettings'], [])\r\n .where({ '@odata.type': '#Model.PerformanceMaxSetting' })\r\n .first()\r\n .get('UseMaxClicks')\r\n .value();\r\n\r\nconst getHasActiveGoal = conversionGoalsDetails => _.get(conversionGoalsDetails, 'IsActiveConversionGoalPresent');\r\n\r\n// TODO(orlandom): Remove when the new Big Strategy component is ready\r\nexport const ConversionBasedBiddingBanner = (props) => {\r\n const {\r\n i18n,\r\n scope,\r\n campaign,\r\n conversionGoalsDetails,\r\n isCampaignCreation,\r\n } = props;\r\n\r\n const usesMaxClicks = useMemo(() => getUsesMaxClicks(campaign), [campaign]);\r\n const hasActiveGoal = useMemo(() => getHasActiveGoal(conversionGoalsDetails), [conversionGoalsDetails]);\r\n\r\n const messageSettings = useMemo(\r\n () => getTemplateToDisplay(i18n, usesMaxClicks, isCampaignCreation, hasActiveGoal),\r\n [i18n, usesMaxClicks, isCampaignCreation, hasActiveGoal]\r\n );\r\n\r\n const onSetConversionTracking = useCallback(() => {\r\n scope.save('/campaign/vnext/conversiongoals/create');\r\n }, [scope]);\r\n\r\n if (!messageSettings) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n
\r\n {text},\r\n link: text => (\r\n // eslint-disable-next-line jsx-a11y/anchor-is-valid\r\n {text}\r\n ),\r\n }}\r\n />\r\n
\r\n {(!isCampaignCreation && !hasActiveGoal) && (\r\n
\r\n \r\n
\r\n )}\r\n
\r\n \r\n );\r\n};\r\n\r\nConversionBasedBiddingBanner.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n scope: PropTypes.shape({\r\n save: PropTypes.func.isRequired,\r\n }).isRequired,\r\n campaign: PropTypes.shape({}).isRequired,\r\n conversionGoalsDetails: PropTypes.shape({}).isRequired,\r\n isCampaignCreation: PropTypes.bool.isRequired,\r\n};\r\n","import React, { useContext, useMemo, useCallback } from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport {\r\n BidStrategyComponent,\r\n BID_STRATEGY_OPTIONS_MAP,\r\n MAX_CONVERSIONS,\r\n MAX_CONVERSIONS_VALUE\r\n} from '@bingads-webui-campaign-react/bid-strategy-component';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport {\r\n TextTitle,\r\n ValidatedPanel,\r\n getPanelErrorProps,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport {\r\n entityIs,\r\n propertyIs,\r\n andComp,\r\n} from '@bingads-webui-campaign-react/form-error';\r\nimport {\r\n withUnvalidatedControlErrors,\r\n withControlErrorHandling,\r\n} from '@bingads-webui-campaign-react/error-handling';\r\nimport { useResponsiveStyles } from '@bingads-webui-campaign-react/common-hooks';\r\nimport { TargetCpaWarningBanner } from '@bingads-webui-campaign-react/target-cpa-warning-banner';\r\n\r\nimport { ConversionBasedBiddingBanner } from '../conversion-based-bidding-banner';\r\nimport { BidStrategyImg } from '../../media';\r\nimport { ERROR_ENTITY } from '../../constants';\r\n\r\nconst getBidStrategyStyles = () => ({\r\n budgetTitle: {\r\n fontSize: '18px',\r\n display: 'inline',\r\n },\r\n bottomMargin: {\r\n marginBottom: '8px',\r\n },\r\n});\r\n\r\nconst entityIsCampaign = entityIs(ERROR_ENTITY.Campaign);\r\nconst bidStrategyProp = andComp(entityIsCampaign, propertyIs('BiddingScheme'));\r\nconst ServerValidatedBidStrategyComponent = withControlErrorHandling(withUnvalidatedControlErrors(BidStrategyComponent, { filter: bidStrategyProp }));\r\n\r\nexport const BidStrategyPanel = (props) => {\r\n const i18n = useContext(I18nContext);\r\n const { scope } = useContext(ScopeContext) || {};\r\n const serverContext = useContext(ServerContext);\r\n const { CurrentAccount: { CurrencyCode } } = serverContext || {};\r\n const bidRange = (serverContext && serverContext.KeywordBidRange) || null;\r\n\r\n const getStyles = useResponsiveStyles(getBidStrategyStyles);\r\n\r\n const {\r\n key,\r\n isLoading,\r\n expand,\r\n onDataChange,\r\n options,\r\n data = {},\r\n topicKey,\r\n ...rest\r\n } = props;\r\n\r\n const {\r\n campaign,\r\n conversionGoalDetails,\r\n bidStrategy,\r\n currency,\r\n cpa,\r\n roas,\r\n isInitialAdditionalDetailsChecked,\r\n budgetAmount,\r\n } = data;\r\n\r\n const {\r\n bidStrategyComponentOptions = {},\r\n biddingBannerOptions = {},\r\n scenario = '',\r\n } = options;\r\n\r\n const {\r\n bidStrategyOptions,\r\n hideAdditionalDetails,\r\n ...restBidStrategyComponentOptions\r\n } = bidStrategyComponentOptions;\r\n\r\n const {\r\n ...restBiddingBannerOptions\r\n } = biddingBannerOptions;\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const bidStrategyTitleDetails = useMemo(() => {\r\n let targetValue = '';\r\n let bidStrategyText = '';\r\n if (bidStrategy) {\r\n if (bidStrategy === MAX_CONVERSIONS.type && cpa) {\r\n targetValue = `${cpa} ${currency}`;\r\n } else if (bidStrategy === MAX_CONVERSIONS_VALUE.type && roas) {\r\n targetValue = `${roas} %`;\r\n }\r\n const predefinedBidStrategy = BID_STRATEGY_OPTIONS_MAP[bidStrategy];\r\n bidStrategyText = predefinedBidStrategy ? predefinedBidStrategy.text : bidStrategy;\r\n }\r\n\r\n return (\r\n <>\r\n {i18n.getString(_TL_('{{bidStrategyText}}'), { bidStrategyText }) + (targetValue ? `, ${i18n.getString(_TL_('target {{targetValue}}'), { targetValue })}` : '')}\r\n \r\n \r\n );\r\n }, [bidStrategy, i18n, budgetAmount, cpa, activity, scenario, roas, currency]);\r\n\r\n const addBottomMargin = useMemo(() => hideAdditionalDetails, [hideAdditionalDetails]);\r\n\r\n const onFieldChange = useCallback((updatedData) => {\r\n onDataChange({\r\n data: prevData => ({\r\n ...prevData,\r\n ...updatedData,\r\n }),\r\n });\r\n }, [onDataChange]);\r\n\r\n const onBidStrategyChange = useCallback((e, newBidStrategy) => {\r\n const bidStrategyType = _.get(newBidStrategy, 'type');\r\n onFieldChange({ bidStrategy: bidStrategyType });\r\n }, [onFieldChange]);\r\n\r\n const onMarketingMetricChange = useCallback(({\r\n data: newMarketingMetric,\r\n isValid,\r\n messages,\r\n }) => {\r\n onFieldChange({\r\n ...newMarketingMetric,\r\n isMarketingMetricValid: isValid,\r\n marketingMetricErrors: messages,\r\n });\r\n }, [onFieldChange]);\r\n\r\n return (\r\n \r\n }\r\n actuationProps={{\r\n expandKey: key,\r\n expand,\r\n }}\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n {...rest}\r\n >\r\n \r\n \r\n \r\n {addBottomMargin &&
}\r\n \r\n );\r\n};\r\n\r\nBidStrategyPanel.propTypes = {\r\n key: PropTypes.string.isRequired,\r\n onDataChange: PropTypes.func.isRequired,\r\n data: PropTypes.shape({\r\n bidStrategy: PropTypes.string,\r\n currency: PropTypes.string,\r\n cpa: PropTypes.number,\r\n roas: PropTypes.number,\r\n campaign: PropTypes.shape({}),\r\n conversionGoalDetails: PropTypes.shape({}),\r\n isInitialAdditionalDetailsChecked: PropTypes.bool,\r\n }),\r\n options: PropTypes.shape({\r\n bidStrategyComponentOptions: PropTypes.shape({}),\r\n biddingBannerOptions: PropTypes.shape({}),\r\n scenario: PropTypes.string,\r\n }),\r\n isLoading: PropTypes.bool,\r\n expand: PropTypes.func.isRequired,\r\n topicKey: PropTypes.string,\r\n};\r\n\r\nBidStrategyPanel.defaultProps = {\r\n data: {},\r\n options: {},\r\n isLoading: false,\r\n topicKey: null,\r\n};\r\n","import React, { useContext, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n TextTitle,\r\n ValidatedPanel,\r\n getPanelErrorProps,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { ValidatedUrlOptionsParameter, ValidatedUrlOptionsParameterWithError } from '@bingads-webui-campaign-react/validated-url-input';\r\nimport { getUrlOptionsDetails } from '@bingads-webui-campaign-react/url-options';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\n\r\nimport { UrlOptionsImg } from '../../media';\r\nimport { SingleLineShimmer, withShimmer } from '../shimmers';\r\n\r\nconst getUrlOptionsStyles = () => ({\r\n urlOptionsContainer: {\r\n maxWidth: 435,\r\n },\r\n});\r\n\r\nconst ValidatedUrlOptionsParameterWithShimmer = withShimmer(ValidatedUrlOptionsParameter, SingleLineShimmer);\r\nconst ValidatedUrlOptionsParameterWithErrorWithShimmer = withShimmer(ValidatedUrlOptionsParameterWithError, SingleLineShimmer);\r\n\r\nexport const UrlOptionsPanel = (props) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const classes = useDefaultStyles(getUrlOptionsStyles);\r\n\r\n const {\r\n key,\r\n isLoading,\r\n expand,\r\n options,\r\n data = {},\r\n isTrackingUrlTemplateRequired,\r\n isWithError,\r\n ...rest\r\n } = props;\r\n\r\n const {\r\n showDescription,\r\n urlParameterOptions,\r\n } = options;\r\n\r\n const {\r\n TrackingUrlTemplate: trackingUrlTemplate,\r\n FinalUrlSuffix: finalUrlSuffix,\r\n UrlCustomParameters: urlCustomParameters,\r\n } = data || {};\r\n\r\n const urlOptions = useMemo(() => ({\r\n TrackingUrlTemplate: trackingUrlTemplate,\r\n FinalUrlSuffix: finalUrlSuffix,\r\n UrlCustomParameters: urlCustomParameters,\r\n }), [trackingUrlTemplate, finalUrlSuffix, urlCustomParameters]);\r\n\r\n const urlOptionsDetails = useMemo(() => getUrlOptionsDetails(i18n, urlOptions), [urlOptions, i18n]);\r\n\r\n return (\r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand,\r\n expandKey: key,\r\n }}\r\n {...rest}\r\n >\r\n
\r\n {\r\n showDescription &&\r\n \r\n {i18n.getString(_TL_('Set up the tracking and redirect information for your ads.'))}\r\n \r\n }\r\n {\r\n isWithError ?\r\n () :\r\n ()\r\n }\r\n
\r\n \r\n );\r\n};\r\n\r\nUrlOptionsPanel.propTypes = {\r\n key: PropTypes.string.isRequired,\r\n options: PropTypes.shape({\r\n showDescription: PropTypes.bool,\r\n urlParameterOptions: PropTypes.shape({}),\r\n }),\r\n data: PropTypes.shape({\r\n TrackingUrlTemplate: PropTypes.string,\r\n FinalUrlSuffix: PropTypes.string,\r\n UrlCustomParameters: PropTypes.arrayOf(PropTypes.shape({})),\r\n }),\r\n isLoading: PropTypes.bool,\r\n expand: PropTypes.func.isRequired,\r\n isTrackingUrlTemplateRequired: PropTypes.bool,\r\n isWithError: PropTypes.bool,\r\n};\r\n\r\nUrlOptionsPanel.defaultProps = {\r\n data: {},\r\n options: {},\r\n isLoading: false,\r\n isTrackingUrlTemplateRequired: false,\r\n isWithError: false,\r\n};\r\n","import React, { useContext, useCallback } from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { CustomValidatedDefaultBid } from '@bingads-webui-campaign-react/default-bid';\r\nimport { Label } from '@fluentui/react';\r\nimport { HelpPopup } from '@bingads-webui-react/help-popup';\r\n\r\nexport const PriceModelToRange = {\r\n ManualCpa: 'KeywordBidRange',\r\n ManualCpc: 'KeywordBidRange',\r\n};\r\n\r\nexport const ValidatedBidValue = ({\r\n validationProps,\r\n onBidChange,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n const serverContext = useContext(ServerContext);\r\n\r\n const { data: campaign, bidValueType } = validationProps || {};\r\n\r\n const { BiddingScheme } = campaign;\r\n\r\n const getBidRange = useCallback((type) => {\r\n const bidCeil = _.result(serverContext[PriceModelToRange[type]], 'CeilingValue');\r\n const bidFloor = _.result(serverContext[PriceModelToRange[type]], 'FloorValue');\r\n\r\n return { bidCeil, bidFloor };\r\n }, [serverContext]);\r\n\r\n const SearchBid = useCallback(() => {\r\n const { bidCeil, bidFloor } = getBidRange(BiddingScheme.Type);\r\n\r\n return (\r\n \r\n );\r\n }, [getBidRange, i18n, BiddingScheme, serverContext.CurrentAccount.CurrencyCode, bidValueType, onBidChange]);\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nValidatedBidValue.propTypes = {\r\n validationProps: PropTypes.shape({\r\n data: PropTypes.shape({\r\n campaign: PropTypes.shape({}).isRequired,\r\n bidValueType: PropTypes.string.isRequired,\r\n }).isRequired,\r\n }).isRequired,\r\n onBidChange: PropTypes.func.isRequired,\r\n};\r\n\r\n","import React, { useContext, useMemo, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { withUnvalidatedControlErrors } from '@bingads-webui-campaign-react/error-handling';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n TextTitle,\r\n ValidatedPanel,\r\n getPanelErrorProps,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport {\r\n entityIs,\r\n propertyIs,\r\n andComp,\r\n} from '@bingads-webui-campaign-react/form-error';\r\nimport { useResponsiveStyles } from '@bingads-webui-campaign-react/common-hooks';\r\nimport { SectionShimmer, withShimmer } from '../shimmers';\r\n\r\nimport { ERROR_ENTITY } from '../../constants';\r\nimport { ValidatedBidValue } from '../sections/bid-value';\r\n\r\nconst getBidStrategyStyles = () => ({\r\n budgetTitle: {\r\n fontSize: '18px',\r\n display: 'inline',\r\n },\r\n bottomMargin: {\r\n marginBottom: '8px',\r\n },\r\n});\r\n\r\nconst entityIsCampaign = entityIs(ERROR_ENTITY.Campaign);\r\nconst bidValueProp = andComp(entityIsCampaign, propertyIs('BiddingScheme'));\r\nconst ServerValidatedBidValueComponentWithShimmer =\r\n withShimmer(\r\n withUnvalidatedControlErrors(\r\n ValidatedBidValue,\r\n { filter: bidValueProp }\r\n ),\r\n SectionShimmer\r\n );\r\n\r\nexport const BidValuePanel = (props) => {\r\n const i18n = useContext(I18nContext);\r\n const getStyles = useResponsiveStyles(getBidStrategyStyles);\r\n\r\n const {\r\n key,\r\n isLoading,\r\n expand,\r\n onDataChange,\r\n data = {},\r\n bidValueType,\r\n ...rest\r\n } = props;\r\n\r\n const {\r\n campaign,\r\n currency,\r\n } = data;\r\n\r\n const bidAmount = useMemo(() => {\r\n if (!isLoading && campaign?.BiddingScheme) {\r\n const { BiddingScheme } = campaign;\r\n return BiddingScheme[bidValueType];\r\n }\r\n return null;\r\n }, [isLoading, campaign, bidValueType]);\r\n\r\n const bidValueDetails = useMemo(() => i18n.getString(_TL_('{{bidAmount}} {{currency}}'), { bidAmount, currency }), [bidAmount, currency, i18n]);\r\n\r\n const onBidValueChange = useCallback((updatedData) => {\r\n onDataChange({\r\n data: prevData => ({\r\n ...prevData,\r\n [bidValueType]: updatedData,\r\n }),\r\n });\r\n }, [onDataChange, bidValueType]);\r\n\r\n return (\r\n \r\n }\r\n actuationProps={{\r\n expandKey: key,\r\n expand,\r\n }}\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n {...rest}\r\n >\r\n \r\n \r\n );\r\n};\r\n\r\nBidValuePanel.propTypes = {\r\n key: PropTypes.string.isRequired,\r\n onDataChange: PropTypes.func.isRequired,\r\n data: PropTypes.shape({\r\n currency: PropTypes.string,\r\n campaign: PropTypes.shape({}),\r\n }),\r\n isLoading: PropTypes.bool,\r\n expand: PropTypes.func.isRequired,\r\n bidValueType: PropTypes.string.isRequired,\r\n};\r\n\r\nBidValuePanel.defaultProps = {\r\n data: {},\r\n isLoading: false,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n TextTitle,\r\n getPanelErrorProps,\r\n ValidatedFixedPanel,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\n\r\nimport { AppPanel } from '@bingads-webui-campaign-react/app-store-selector';\r\n\r\nimport { SingleLineShimmer, withShimmer } from '../shimmers';\r\n\r\nexport const AppDetailsPanel = (props) => {\r\n const {\r\n key, isLoading, data = {}, ...rest\r\n } = props;\r\n const { campaign } = data || {};\r\n const selectedApp = campaign && campaign.AppSetting;\r\n\r\n const AppPanelWithShimmer = withShimmer(AppPanel, SingleLineShimmer);\r\n\r\n return (\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n {...rest}\r\n >\r\n \r\n \r\n );\r\n};\r\n\r\nAppDetailsPanel.propTypes = {\r\n key: PropTypes.string.isRequired,\r\n isLoading: PropTypes.bool,\r\n data: PropTypes.shape({\r\n campaign: PropTypes.shape({\r\n AppSetting: PropTypes.shape({}),\r\n }),\r\n }),\r\n platform: PropTypes.string.isRequired,\r\n};\r\n\r\nAppDetailsPanel.defaultProps = {\r\n isLoading: false,\r\n data: {},\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Stack } from '@bingads-webui-react/fluent-controls';\r\nimport { useResponsiveStyles } from '@bingads-webui-campaign-react/common-hooks';\r\n\r\nimport { SignalsSparkleImg } from '../../media';\r\n\r\nconst getStyles = () => ({\r\n root: {\r\n marginTop: 24,\r\n },\r\n title: {\r\n fontSize: 20,\r\n fontWeight: 600,\r\n lineHeight: '28px',\r\n margin: 0,\r\n },\r\n});\r\n\r\nexport const AudienceSignalSection = ({ children }) => {\r\n const i18n = useContext(I18nContext);\r\n const getResponsiveStyles = useResponsiveStyles(getStyles);\r\n\r\n return (\r\n \r\n

\r\n {i18n.getString(_TL_('Signals (Optional)'))}\r\n

\r\n \r\n \"\"\r\n \r\n {i18n.getString(_TL_('Signals give us valuable information about who you want to reach.'))}\r\n {i18n.getString(_TL_('We\\'ll use them as a starting point to find customers and determine who sees your ads.'))}\r\n \r\n \r\n
\r\n {children}\r\n
\r\n
\r\n );\r\n};\r\n\r\nAudienceSignalSection.propTypes = {\r\n children: PropTypes.node,\r\n};\r\n\r\nAudienceSignalSection.defaultProps = {\r\n children: null,\r\n};\r\n","export function modelToViewModelDayTimeTargets(targets, resetId = false) {\r\n const schedulingRows = [];\r\n\r\n targets.forEach((target) => {\r\n const criterion = target.Criterion;\r\n const multiplier = target.CriterionBid.Multiplier;\r\n\r\n schedulingRows.push({\r\n Id: resetId ? '' : target.Id,\r\n Day: criterion.Day,\r\n StartHour: criterion.FromHour,\r\n StartMinute: criterion.FromMinute,\r\n EndHour: criterion.ToHour,\r\n EndMinute: criterion.ToMinute,\r\n BidAdjustmentType: multiplier < 0 ? -1 : 1,\r\n BidAdjustmentAmount: window.Math.abs(multiplier),\r\n });\r\n });\r\n\r\n return schedulingRows;\r\n}\r\n","import { WaterfallFilterStorage, WaterfallFilterType, waterfallDateFilterProcessor } from '@bingads-webui-campaign/filter-storage';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { PreferenceContext } from '@bingads-webui-react/preference-context';\r\nimport { useContext } from 'react';\r\nimport kendo from '@bingads-webui/kendo/kendo.core';\r\n\r\n// date-filter plugin and related logic is in \"projection-grid-date-filter/src/plugin.js\"\r\n\r\nconst formatDateInEntitySet = date => kendo.toString(date, 'yyyy-MM-dd');\r\nconst parseDate = dateString => kendo.parseDate(dateString);\r\n\r\nfunction useDateRangeDefault() {\r\n const preferenceService = useContext(PreferenceContext);\r\n const serverContext = useContext(ServerContext);\r\n const waterfallFilterStorage = new WaterfallFilterStorage({\r\n preferenceService,\r\n });\r\n const waterFallDateFilters = waterfallFilterStorage.getFilters([WaterfallFilterType.DateFilter]);\r\n const dateFilter = waterfallDateFilterProcessor(waterFallDateFilters, serverContext);\r\n return dateFilter;\r\n}\r\n\r\nexport function useP$DaterangeDefault() {\r\n const dateFilter = useDateRangeDefault();\r\n return Promise.resolve(dateFilter);\r\n}\r\n\r\n// What about comparison date range?\r\n// Listing Gruop page does not have comparison date range\r\nexport function useDateRange() {\r\n const dateRange = useDateRangeDefault();\r\n return {\r\n StartDate: formatDateInEntitySet(dateRange.start) ||\r\n formatDateInEntitySet(parseDate(dateRange.RangeStartDate)),\r\n EndDate: formatDateInEntitySet(dateRange.end) ||\r\n formatDateInEntitySet(parseDate(dateRange.RangeEndDate)),\r\n };\r\n}\r\n","import _ from 'underscore';\r\nimport { Scopes } from '@bingads-webui-campaign-react/goal-selector';\r\n\r\nexport const getConversionGoalTitleDetails = (i18n, conversionGoals = {}) => {\r\n const {\r\n goalScopeSelection,\r\n goalSelection,\r\n } = conversionGoals;\r\n\r\n if (goalScopeSelection === Scopes.CAMPAIGN && _.size(goalSelection) > 0) {\r\n const goalNames = _.pluck(goalSelection, 'Name');\r\n\r\n return goalNames.join(', ');\r\n }\r\n\r\n return i18n.getString(_TL_('Use account settings'));\r\n};\r\n","import _ from 'underscore';\r\n\r\nexport const getFinalUrlExpansionTitleDetails = (i18n, view, isFinalUrlExpansionEnabled) => {\r\n if (!view) return '';\r\n if (!isFinalUrlExpansionEnabled) {\r\n return i18n.getString(_TL_('Use the Final URL only'));\r\n }\r\n const selected = view.selectedTargetsView.viewmodel.values();\r\n const exactUrls = [];\r\n const rules = [];\r\n\r\n _.each(selected, (target) => {\r\n const conditions = target.Criterion.WebPage.Parameter.Conditions;\r\n _.each(conditions, (condition) => {\r\n if (condition.Operator === 'Equals') {\r\n exactUrls.push(condition.ArgumentOperand);\r\n } else {\r\n rules.push(`URL contains ${condition.ArgumentOperand}`);\r\n }\r\n });\r\n });\r\n\r\n const exactUrlsDetails = exactUrls.length > 0 ? `${i18n.getString(_TL_('Excluded URLs: '))}${exactUrls.join(', ')}` : null;\r\n const rulesDetails = rules.length > 0 ? `${i18n.getString(_TL_('Exclusion rules: '))}${rules.join(', ')}`:null;\r\n\r\n if (exactUrlsDetails && rulesDetails) {\r\n return `${exactUrlsDetails}; ${rulesDetails}`;\r\n }\r\n return exactUrlsDetails || rulesDetails || i18n.getString(_TL_('You’ve enabled Final URL expansion'));\r\n};\r\n","import _ from 'underscore';\r\n\r\nexport const getBidStrategyMap = _.memoize(() => ({\r\n MaxClicks: _TL_('Maximize clicks'),\r\n MaxConversions: _TL_('Maximize conversions'),\r\n MaxConversionValue: _TL_('Maximize conversion value'),\r\n MaxImpressions: _TL_('Maximize impressions'),\r\n MaxReach: _TL_('Maximize reach'),\r\n ManualCpa: _TL_('CPI (cost per install)'),\r\n ManualCpm: _TL_('CPM (cost per thousand impressions) for maximizing reach'),\r\n ManualCpv: _TL_('CPCV (cost per completed view)'),\r\n ManualCpc: _TL_('CPC (cost per click)'),\r\n EnhancedCpc: _TL_('Enhanced CPC (enhanced cost per click)'),\r\n CostPerSale: _TL_('Cost per Sale'),\r\n TargetRoas: _TL_('Target ROAS'),\r\n TargetCpa: _TL_('Target CPA'),\r\n TargetImpressionShare: _TL_('Target impression share'),\r\n}));\r\n\r\nexport const getBidTitleDetails = (i18n, bid) => {\r\n if (!bid || !getBidStrategyMap()[bid.Type]) {\r\n return '';\r\n }\r\n\r\n return i18n.getString(getBidStrategyMap()[bid.Type]);\r\n};\r\n\r\nexport const getBidBudgetTitleDetails = (serverContext, i18n, bid, budget) => {\r\n const currencyCode = serverContext.CurrentAccount.CurrencyCode;\r\n const amount = _.isNumber(budget.Amount) ?\r\n i18n.formatCurrency(budget.Amount, currencyCode) :\r\n '-';\r\n const bidType = getBidTitleDetails(i18n, bid);\r\n let bidVal = '';\r\n if (bid.TargetCpa) {\r\n bidVal = i18n.formatCurrency(bid.TargetCpa, currencyCode);\r\n }\r\n if (bid.TargetRoas) {\r\n bidVal = i18n.formatPercent(bid.TargetRoas);\r\n }\r\n return i18n.getString(_TL_('{{amount}} per day; {{bidType}}, default CPA {{bidVal}}'), {\r\n amount, bidType, bidVal,\r\n });\r\n};\r\n\r\nexport const getBudgetTitleDetails = (serverContext, i18n, budget) => {\r\n const currencyCode = serverContext.CurrentAccount.CurrencyCode;\r\n const amount = _.isNumber(budget && budget.Amount) ?\r\n i18n.formatCurrency(budget.Amount, currencyCode) :\r\n '-';\r\n return i18n.getString(_TL_('{{amount}} per day'), {\r\n amount,\r\n });\r\n};\r\n","import { pluck } from 'underscore';\r\n\r\nexport const getListingGroupDetails = (i18n, isEditing, {\r\n productFilter,\r\n listingGroup,\r\n}) => {\r\n if (isEditing && productFilter) {\r\n return `${i18n.getString(_TL_('Products: Filterd by '))}${productFilter}`;\r\n }\r\n if (!isEditing) {\r\n if (!listingGroup) {\r\n return i18n.getString('All products');\r\n }\r\n return `${listingGroup.operand}: ${pluck(listingGroup.items, 'primary').join(',')}`;\r\n }\r\n return '';\r\n};\r\n","export const getStoreTitleDetails = (i18n, storesData, storeContainerData = {}, isAudience = false) => {\r\n const storeId = storeContainerData.ProviderId;\r\n if (!storeId) {\r\n return i18n.getString(_TL_('No store added'));\r\n }\r\n const { countries, stores } = storesData;\r\n const store =\r\n (stores[storeId] && stores[storeId].text) ||\r\n `ID: ${storeId}`; // Display only Store ID while stores are loading. No localization to be consistent with how we display stores.\r\n const salesCountry =\r\n (countries[storeContainerData.SalesCountry] && countries[storeContainerData.SalesCountry].text)\r\n || storeContainerData.SalesCountry;\r\n const localInventoryAdsEnabled = storeContainerData.LocalInventoryAdsEnabled ?\r\n i18n.getString(_TL_('Enabled')) :\r\n i18n.getString(_TL_('Disabled'));\r\n\r\n if (isAudience) {\r\n return i18n.getString(_TL_('Merchant Center store: {{store}}. Country/region of sale: {{salesCountry}}'), {\r\n store, salesCountry,\r\n });\r\n }\r\n return i18n.getString(_TL_('Merchant Center store: {{store}}. Country/region of sale: {{salesCountry}}. Local inventory ads: {{localInventoryAdsEnabled}}'), {\r\n store, salesCountry, localInventoryAdsEnabled,\r\n });\r\n};\r\n","export const getSearchThemeDetails = (i18n, searchThemes) => {\r\n const selected = searchThemes && searchThemes.filter(item => item.Status !== 'Deleted');\r\n if (selected && selected.length > 0) {\r\n return selected.map(item => item.SearchTheme).join(', ');\r\n }\r\n return i18n.getString(_TL_('No search themes added'));\r\n};\r\n","export const getDisclaimerTitleDetails = (i18n, disclaimer) => {\r\n const {\r\n selectedDisclaimer,\r\n } = disclaimer || {};\r\n\r\n if (selectedDisclaimer && selectedDisclaimer.Name) {\r\n return selectedDisclaimer.Name;\r\n }\r\n return i18n.getString(_TL_('No disclaimer selected'));\r\n};\r\n","export const LocalizationKeys = {\r\n ManualCpc: _TL_('Fixed bid per night (per click)'),\r\n PercentCpc: _TL_('Percentage of room price (per click)'),\r\n Commission: _TL_('Percentage of room price (per stay)'),\r\n Individual: _TL_('Individual budget'),\r\n individual: _TL_('Individual budget'),\r\n 'Increase by': _TL_('Increase by'),\r\n 'Decrease by': _TL_('Decrease by'),\r\n UrlCustomParameters: _TL_('Custom parameters'),\r\n TrackingUrlTemplate: _TL_('Tracking template'),\r\n FinalUrlSuffix: _TL_('Final URL suffix'),\r\n ExcludedSites: _TL_('Website'),\r\n ExcludedIPs: _TL_('IP Address'),\r\n Targeted: _TL_('Targeted'),\r\n Computer: _TL_('Computer'),\r\n Desktop: _TL_('Desktop'),\r\n Tablet: _TL_('Tablet'),\r\n Smartphone: _TL_('Smartphone'),\r\n Monday: _TL_('Monday'),\r\n Tuesday: _TL_('Tuesday'),\r\n Wednesday: _TL_('Wednesday'),\r\n Thursday: _TL_('Thursday'),\r\n Friday: _TL_('Friday'),\r\n Saturday: _TL_('Saturday'),\r\n Sunday: _TL_('Sunday'),\r\n 'Selected date': _TL_('Selected date'),\r\n 'Default date': _TL_('Default date'),\r\n};\r\n\r\nexport const ConversionGoalKeyToStringMapping = {\r\n Campaign_Goals_Account_Level_Label: _TL_('Use the account \"Include in conversions\" setting'),\r\n Campaign_Goals_Account_Level_Subtext: _TL_('This option applies the same conversion goals that you have selected at the account level to this campaign.'),\r\n Campaign_Goals_Campaign_Level_Label: _TL_('Choose conversion goals for this campaign'),\r\n Campaign_Goals_Campaign_Level_Subtext: _TL_('This option allows you to select specific conversion goals for this campaign only.'),\r\n GoalSelector_List_Header: _TL_('Available goals: {{itemCount}}'),\r\n GoalSelector_Result_List_Header: _TL_('Selected goal: {{itemCount}}'),\r\n GoalSelector_Radio_Aria_Label: _TL_('Select which conversions are included in the Conversion columns for this campaign and used for optimizing your bid strategy. Updating this setting will override the “Include in conversions” setting made at the account level.'),\r\n GoalSelector_EmptyList_Content: _TL_('No results to display.'),\r\n EntitySelector_Search_Placeholder: _TL_('Search'),\r\n UnifiedEventTracking_Goal_Creation_Type_Event_Category: _TL_('Category'),\r\n GoalSelector_Result_Action_Bar: _TL_('Select all on this page'),\r\n GoalSelector_TrackingStatus_Value_InactiveDueToTagUnavailable: _TL_('This goal is not associated with an active UET tag. Verify the tag setup and associate the goal with a valid UET tag.'),\r\n GoalSelector_TrackingStatus_Value_NoRecentConversion: _TL_(\"This goal doesn't have enough conversions to optimize campaign performance because it hasn't recorded conversions in the past 7 days. Ensure that for an online goal, the UET tag is placed on every webpage.\"),\r\n GoalSelector_TrackingStatus_Value_RecordingConversions: _TL_(\"We've seen your UET tag and have recorded conversions within the last 7 days. If your conversion window is greater than 7 days and you are filtering on the last 7 days, you may see this status even if no conversions are shown in the Conversions column, as conversions are reported at the time of the click.\"),\r\n GoalSelector_TrackingStatus_Value_TagInactive: _TL_('No website activity data has been received from the UET tag associated with this goal in the past 24 hours. Verify the UET tag setup or associate the goal with an active tag.'),\r\n GoalSelector_TrackingStatus_Value_Unverified: _TL_(\"We haven't received any data from the UET tag for this goal. For new goals, allow 24 hours for conversions to start recording. Otherwise, verify the UET tag setup or associate this goal with an active tag.\"),\r\n Segment_Goal_Category_Download: _TL_('Download'),\r\n Segment_Goal_Category_Purchase: _TL_('Purchase'),\r\n Segment_Goal_Category_AddToCart: _TL_('Add to cart'),\r\n Segment_Goal_Category_BeginCheckout: _TL_('Begin checkout'),\r\n Segment_Goal_Category_BookAppointment: _TL_('Book appointment'),\r\n Segment_Goal_Category_Contact: _TL_('Contact'),\r\n Segment_Goal_Category_GetDirections: _TL_('Get directions'),\r\n Segment_Goal_Category_InStoreVisit: _TL_('In-store visit'),\r\n Segment_Goal_Category_Other: _TL_('Other'),\r\n Segment_Goal_Category_OutboundClick: _TL_('Outbound click'),\r\n Segment_Goal_Category_PageView: _TL_('Page view'),\r\n Segment_Goal_Category_RequestQuote: _TL_('Request quote'),\r\n Segment_Goal_Category_SignUp: _TL_('Sign-up'),\r\n Segment_Goal_Category_SubmitLeadForm: _TL_('Submit lead form'),\r\n Segment_Goal_Category_Subscribe: _TL_('Subscribe'),\r\n Segment_Goal_Category_Unassigned: _TL_('Unassigned'),\r\n Campaign_Goals_Option_Goals: _TL_('Goals'),\r\n Campaign_Goals_Option_GoalSets: _TL_('Goal Sets'),\r\n EntitySelector_Pagination_Page: _TL_('Page:'),\r\n EntitySelector_Pagination_TotalPageCountText: _TL_('of'),\r\n EntitySelector_Pagination_PreviousPageText: _TL_('Previous page'),\r\n EntitySelector_Pagination_NextPageText: _TL_('Next page'),\r\n 'Remove all': 'Remove all',\r\n 'No results found for {{searchText}}': _TL_('No results found for {{searchText}}'),\r\n 'Found {{totalCount}} Results for {{searchText}}': _TL_('Found {{totalCount}} Results for {{searchText}}'),\r\n};\r\n","export const getAdsStepStyles = (/* components, theme */) => ({\r\n displayAdPanelRoot: {\r\n marginTop: 20,\r\n width: 500,\r\n minHeight: 181,\r\n padding: 20,\r\n paddingBottom: 20,\r\n paddingTop: 10,\r\n background: '#FFFFFF',\r\n boxShadow: '0px 2px 4px rgba(0, 0, 0, 0.1)',\r\n borderRadius: 6,\r\n '& .image-list-item-status-indicator': {\r\n background: 'linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%)',\r\n borderRadius: 6,\r\n width: '170px !important',\r\n height: '96px !important',\r\n paddingTop: '10px !important',\r\n '&:hover': {\r\n '& .edit-button': {\r\n display: 'none',\r\n },\r\n },\r\n '& .placeholder-content': {\r\n color: 'white !important',\r\n },\r\n },\r\n '& .error': {\r\n width: 400,\r\n marginTop: 20,\r\n float: 'left',\r\n },\r\n '& .image-experience-content': {\r\n width: 170,\r\n '& .col-sm-3': {\r\n background: 'linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%)',\r\n borderRadius: 6,\r\n width: '170px !important',\r\n height: '96px !important',\r\n paddingTop: '10px !important',\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n '&:hover': {\r\n '& .edit-button': {\r\n display: 'none',\r\n },\r\n },\r\n '& .placeholder-content': {\r\n color: 'white !important',\r\n },\r\n '& .ms-Button': {\r\n width: 56,\r\n height: 24,\r\n marginTop: 10,\r\n },\r\n },\r\n '& .add-image-button': {\r\n border: '1px solid #8a8886',\r\n background: '#FFFFFF !important',\r\n fontWeight: 600,\r\n borderRadius: 2,\r\n '&:before': {\r\n content: '\"\\\\E710\"',\r\n color: '#0078D4',\r\n marginRight: 8,\r\n fontFamily: 'MsAds MDL2 Assets',\r\n },\r\n },\r\n },\r\n '& .image-section-label': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '& .image-list-label': {\r\n fontWeight: 600,\r\n },\r\n '& .image-list-content': {\r\n width: '170px !important', // fixed for 16:9 aspect ratio\r\n border: 'none !important',\r\n padding: '0px !important',\r\n },\r\n '& .image-list-item-video': {\r\n position: 'relative',\r\n backgroundColor: 'none !important',\r\n width: '170px !important', // fixed for 16:9 aspect ratio\r\n '&:hover': {\r\n '& .edit-button': {\r\n display: 'flex',\r\n },\r\n },\r\n '& .placeholder-content': {\r\n color: 'black !important',\r\n },\r\n\r\n },\r\n '& .image-item-ratio-label': {\r\n paddingTop: 10,\r\n },\r\n '& .thumbnail-preview': {\r\n borderRadius: 6,\r\n filter: 'drop-shadow(0px 0.6px 1.8px rgba(0, 0, 0, 0.1)) drop-shadow(0px 3.2px 7.2px rgba(0, 0, 0, 0.13))',\r\n width: '170px !important',\r\n height: '96px !important',\r\n },\r\n },\r\n addNewImageButton: {\r\n height: 96,\r\n width: 170,\r\n borderRadius: '6px',\r\n border: '1px dashed #c8c6c4',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n },\r\n selectedPanel: {\r\n border: '1px solid #0078D4',\r\n },\r\n displayAdPanelHeader: {\r\n display: 'flex',\r\n width: '100%',\r\n justifyContent: 'flex-end',\r\n height: 5,\r\n },\r\n displayAdPanelButton: {\r\n justifyContent: 'flex-end',\r\n display: 'none',\r\n cursor: 'pointer',\r\n borderRadius: 99,\r\n background: '#FFFFFF',\r\n width: 32,\r\n height: 32,\r\n },\r\n displayAdPanelButtonContainer: {\r\n position: 'absolute',\r\n left: '50%',\r\n top: '50%',\r\n transform: 'translate(-50%, -50%)',\r\n columnGap: '2px',\r\n display: 'flex',\r\n },\r\n previewContainer: {\r\n height: 280,\r\n width: '100%',\r\n },\r\n emptyPreview: {\r\n width: '100%',\r\n height: '100%',\r\n backgroundColor: '#F3F2F1',\r\n borderRadius: 6,\r\n },\r\n adPreviewRoot: {\r\n maxWidth: '540px',\r\n width: '100%',\r\n padding: 20,\r\n paddingTop: 0,\r\n position: 'sticky',\r\n top: '-10px',\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n justifyContent: 'center',\r\n marginTop: '-18px',\r\n },\r\n adPreviewSizeHeader: {\r\n height: 40,\r\n },\r\n adPreviewPageTitle: {\r\n fontSize: 14,\r\n fontWeight: 600,\r\n },\r\n adPreviewSizeTitle: {\r\n fontSize: 14,\r\n fontWeight: 700,\r\n paddingRight: 5,\r\n },\r\n adPreviewPanel: {\r\n maxWidth: '540px',\r\n width: '100%',\r\n padding: 20,\r\n position: 'sticky',\r\n top: '0px',\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n justifyContent: 'center',\r\n marginTop: 16,\r\n background: '#FFFFFF',\r\n boxShadow: '0px 2px 4px rgba(0, 0, 0, 0.1)',\r\n borderRadius: 6,\r\n },\r\n displayAd: {\r\n borderRadius: '6px',\r\n filter: 'drop-shadow(0px 0.6px 1.8px rgba(0, 0, 0, 0.1)) drop-shadow(0px 3.2px 7.2px rgba(0, 0, 0, 0.13))',\r\n },\r\n previewTag: {\r\n marginTop: 20,\r\n },\r\n previewTagText: {\r\n fontSize: 12,\r\n color: '#605E5C',\r\n },\r\n pagination: {\r\n paddingTop: 20,\r\n width: '100%',\r\n },\r\n pageControls: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'space-between',\r\n columnGap: '10px',\r\n },\r\n pageControl: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n pageControlPreviousIcon: {\r\n paddingRight: 8,\r\n },\r\n pageControlNextIcon: {\r\n paddingLeft: 8,\r\n },\r\n paginationIndicatorDot: {\r\n height: 8,\r\n width: 8,\r\n borderRadius: '50%',\r\n display: 'inline-block',\r\n cursor: 'pointer',\r\n marginRight: 10,\r\n },\r\n paginationButton: {\r\n height: 8,\r\n width: 8,\r\n opacity: 0,\r\n },\r\n paginationIndicator: {\r\n display: 'flex',\r\n columnGap: '2px',\r\n },\r\n displayAdPanelContent: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n },\r\n placementInfoTile: {\r\n paddingTop: 20,\r\n marginLeft: 10,\r\n },\r\n placementInfos: {\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n columnGap: 10,\r\n rowGap: '5px',\r\n },\r\n enabledPlacement: {\r\n backgroundColor: '#DFF6DD',\r\n padding: '3px 5px',\r\n borderRadius: 4,\r\n },\r\n enabledText: {\r\n color: '#0C5E0C',\r\n fontWeight: 600,\r\n display: 'flex',\r\n alignItems: 'center',\r\n columnGap: 5,\r\n },\r\n disabledPlacement: {\r\n backgroundColor: '#F3F2F1',\r\n padding: '3px 5px',\r\n borderRadius: 4,\r\n },\r\n disabledText: {\r\n color: '#605E5C',\r\n fontWeight: 600,\r\n display: 'flex',\r\n alignItems: 'center',\r\n columnGap: 5,\r\n },\r\n fontStyle: {\r\n fontSize: 14,\r\n fontWeight: 600,\r\n },\r\n placementLabel: {\r\n paddingTop: 0,\r\n paddingBottom: 0,\r\n },\r\n placmentResolution: {\r\n paddingTop: 5,\r\n paddingBottom: 5,\r\n },\r\n displayAdPanelFinalUrlContainer: {\r\n width: 45,\r\n },\r\n displayImageLabel: {\r\n marginBottom: 4,\r\n },\r\n});\r\n\r\nexport const getCreativeWorkbenchStyles = () => ({\r\n creativeWorkbenchRoot: {\r\n position: 'relative',\r\n display: 'flex',\r\n padding: '24px',\r\n height: 'auto',\r\n flexDirection: 'column',\r\n justifyContent: 'space-between',\r\n borderRadius: '12px',\r\n marginTop: '16px',\r\n border: '1px dashed #B3B0AD',\r\n },\r\n header: {\r\n fontSize: 16,\r\n fontWeight: '600',\r\n lineHeight: '20px',\r\n display: 'flex',\r\n },\r\n copilotIcon: {\r\n paddingTop: '3px !important',\r\n paddingLeft: '0px !important',\r\n paddingRight: '9px !important',\r\n marginBottom: '2px',\r\n height: '21px',\r\n },\r\n description: {\r\n fontSize: 14,\r\n fontWeight: '400',\r\n color: 'rgba(96, 94, 92, 1)',\r\n lineHeight: '20px',\r\n },\r\n});\r\n\r\nexport const getImageSuggestionCarouselStyles = () => ({\r\n imageSuggestionCarouselRoot: {\r\n '& .image-suggestion-carousel-root': {\r\n '& .panel': {\r\n backgroundColor: 'transparent',\r\n },\r\n },\r\n marginTop: 10,\r\n },\r\n croppedImage: {\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n width: '107px',\r\n height: '76px',\r\n background: '#F3F2F1',\r\n },\r\n});\r\n\r\nexport const getDisplayAdStepBaseStyles = () => ({\r\n displayAdsStepRoot: {\r\n '& .display-ad-panel-root': {\r\n width: '100% !important',\r\n },\r\n },\r\n});\r\n","import React from 'react';\r\nimport { CroppedImageView } from '@bingads-webui-campaign-react/cropped-image-view';\r\n\r\nexport const CropPreview = props => (\r\n
\r\n
\r\n
\r\n);\r\n","import { DropdownMenuItemType } from '@bingads-webui-react/fabric-control';\r\n\r\nconst partnerTrafficString = _TL_('Eligible to serve on partner traffic');\r\nconst onoTrafficString = _TL_('Eligible to serve on Microsoft sites');\r\n\r\nconst standard = [{\r\n width: 970,\r\n height: 250,\r\n text: _TL_('970 x 250 — Billboard'),\r\n sizeText: _TL_('970 x 250'),\r\n targetText: _TL_('Billboard'),\r\n}, {\r\n width: 970,\r\n height: 90,\r\n text: _TL_('970 x 90 — Super leaderboard'),\r\n sizeText: _TL_('970 x 90'),\r\n targetText: _TL_('Super leaderboard'),\r\n}, {\r\n width: 728,\r\n height: 90,\r\n text: _TL_('728 x 90 — Leaderboard'),\r\n sizeText: _TL_('728 x 90'),\r\n targetText: _TL_('Leaderboard'),\r\n}, {\r\n width: 468,\r\n height: 60,\r\n text: _TL_('468 x 60 — Full banner'),\r\n sizeText: _TL_('468 x 60'),\r\n targetText: _TL_('Full banner'),\r\n}, {\r\n width: 336,\r\n height: 280,\r\n text: _TL_('336 x 280 — Large rectangle'),\r\n sizeText: _TL_('336 x 280'),\r\n targetText: _TL_('Large rectangle'),\r\n}, {\r\n width: 300,\r\n height: 600,\r\n text: _TL_('300 x 600 — Half-page'),\r\n sizeText: _TL_('300 x 600'),\r\n targetText: _TL_('Half-page'),\r\n}, {\r\n width: 300,\r\n height: 250,\r\n text: _TL_('300 x 250 — Medium rectangle'),\r\n sizeText: _TL_('300 x 250'),\r\n targetText: _TL_('Medium rectangle'),\r\n}, {\r\n width: 250,\r\n height: 250,\r\n text: _TL_('250 x 250 — Square'),\r\n sizeText: _TL_('250 x 250'),\r\n targetText: _TL_('Square'),\r\n}, {\r\n width: 234,\r\n height: 60,\r\n text: _TL_('234 x 60 — Half-banner'),\r\n sizeText: _TL_('234 x 60'),\r\n targetText: _TL_('Half-banner'),\r\n}, {\r\n width: 180,\r\n height: 150,\r\n text: _TL_('180 x 150 — Rectangle'),\r\n sizeText: _TL_('180 x 150'),\r\n targetText: _TL_('Rectangle'),\r\n}, {\r\n width: 160,\r\n height: 600,\r\n text: _TL_('160 x 600 — Wide skyscraper'),\r\n sizeText: _TL_('160 x 600'),\r\n targetText: _TL_('Wide skyscraper'),\r\n}, {\r\n width: 120,\r\n height: 600,\r\n text: _TL_('120 x 600 — Skyscraper'),\r\n sizeText: _TL_('120 x 600'),\r\n targetText: _TL_('Skyscraper'),\r\n}];\r\n\r\nconst mobile = [{\r\n width: 480,\r\n height: 320,\r\n text: _TL_('480 x 320 — Landscape (interstitial)'),\r\n sizeText: _TL_('480 x 320'),\r\n targetText: _TL_('Landscape (interstitial)'),\r\n}, {\r\n width: 320,\r\n height: 480,\r\n text: _TL_('320 x 480 — Portrait (interstitial)'),\r\n sizeText: _TL_('320 x 480'),\r\n targetText: _TL_('Portrait (interstitial)'),\r\n}, {\r\n width: 320,\r\n height: 100,\r\n text: _TL_('320 x 100 — Large banner'),\r\n sizeText: _TL_('320 x 100'),\r\n targetText: _TL_('Large banner'),\r\n}, {\r\n width: 320,\r\n height: 50,\r\n text: _TL_('320 x 50 — Leaderboard'),\r\n sizeText: _TL_('320 x 50'),\r\n targetText: _TL_('Leaderboard'),\r\n}, {\r\n width: 300,\r\n height: 50,\r\n text: _TL_('300 x 50 — Banner'),\r\n sizeText: _TL_('300 x 50'),\r\n targetText: _TL_('Banner'),\r\n}, {\r\n width: 216,\r\n height: 36,\r\n text: _TL_('216 x 36 — Large banner'),\r\n sizeText: _TL_('216 x 36'),\r\n targetText: _TL_('Large banner'),\r\n}, {\r\n width: 168,\r\n height: 28,\r\n text: _TL_('168 x 28 — Medium banner'),\r\n sizeText: _TL_('168 x 28'),\r\n targetText: _TL_('Medium banner'),\r\n}, {\r\n width: 120,\r\n height: 20,\r\n text: _TL_('120 x 20 — Small banner'),\r\n sizeText: _TL_('120 x 20'),\r\n targetText: _TL_('Small banner'),\r\n}];\r\n\r\nconst getSupportedSize = (supportedSize, source) => {\r\n if (!supportedSize || !source) {\r\n return [];\r\n }\r\n\r\n return source.filter(sourceSize => supportedSize.some(baseSize => baseSize.width === sourceSize.width && baseSize.height === sourceSize.height));\r\n};\r\n\r\nconst getStandardOnO = () => {\r\n const supportedSize = [{\r\n width: 300,\r\n height: 250,\r\n }, {\r\n width: 728,\r\n height: 90,\r\n }, {\r\n width: 300,\r\n height: 600,\r\n }, {\r\n width: 160,\r\n height: 600,\r\n }, {\r\n width: 970,\r\n height: 250,\r\n }];\r\n\r\n return getSupportedSize(supportedSize, standard);\r\n};\r\n\r\nconst getStandardOthers = () => {\r\n const supportedSize = [{\r\n width: 336,\r\n height: 280,\r\n }, {\r\n width: 250,\r\n height: 250,\r\n }, {\r\n width: 120,\r\n height: 600,\r\n }, {\r\n width: 970,\r\n height: 90,\r\n }, {\r\n width: 468,\r\n height: 60,\r\n }, {\r\n width: 234,\r\n height: 60,\r\n }, {\r\n width: 180,\r\n height: 150,\r\n }];\r\n\r\n return getSupportedSize(supportedSize, standard);\r\n};\r\n\r\nconst getMobileOnO = () => {\r\n const supportedSize = [{\r\n width: 320,\r\n height: 50,\r\n }];\r\n\r\n return getSupportedSize(supportedSize, mobile);\r\n};\r\n\r\nconst getMobileOthers = () => {\r\n const supportedSize = [{\r\n width: 320,\r\n height: 100,\r\n }, {\r\n width: 320,\r\n height: 480,\r\n }, {\r\n width: 480,\r\n height: 320,\r\n }, {\r\n width: 120,\r\n height: 20,\r\n }, {\r\n width: 300,\r\n height: 50,\r\n }, {\r\n width: 216,\r\n height: 36,\r\n }, {\r\n width: 168,\r\n height: 28,\r\n }];\r\n\r\n return getSupportedSize(supportedSize, mobile);\r\n};\r\n\r\nconst getOptionsTranslated = (\r\n i18n,\r\n sourceWidth,\r\n sourceHeight,\r\n sourceOptions\r\n) => {\r\n const resultOptions = [];\r\n sourceOptions.forEach(({\r\n width,\r\n height,\r\n text,\r\n sizeText,\r\n targetText,\r\n }) => {\r\n if ((!sourceHeight || sourceHeight >= height) && (!sourceWidth || sourceWidth >= width)) {\r\n resultOptions.push({\r\n key: `Image${width}x${height}`,\r\n width,\r\n height,\r\n text: i18n.getString(text),\r\n sizeText: i18n.getString(sizeText),\r\n targetText: i18n.getString(targetText),\r\n });\r\n }\r\n });\r\n\r\n return resultOptions;\r\n};\r\n\r\nexport const getAllStandardOptions = () => getStandardOnO().concat(getStandardOthers());\r\n\r\nexport const getAllMobileOptions = () => getMobileOnO().concat(getMobileOthers());\r\n\r\nexport const getStandardTargetOptions = ({\r\n i18n,\r\n sourceWidth,\r\n sourceHeight,\r\n}) => {\r\n const standardOnO = getStandardOnO();\r\n const standardOnoOptions = getOptionsTranslated(i18n, sourceWidth, sourceHeight, standardOnO);\r\n const standardOthers = getStandardOthers();\r\n const standardOtherOptions = getOptionsTranslated(i18n, sourceWidth, sourceHeight, standardOthers);\r\n\r\n const options = [\r\n ...(standardOnoOptions.length > 0 ? [{\r\n key: 'standardOnoPlacements',\r\n text: i18n.getString(onoTrafficString),\r\n itemType: DropdownMenuItemType.Header,\r\n }]: []),\r\n ...standardOnoOptions,\r\n ...(standardOnoOptions.length > 0 ? [{\r\n key: 'divider',\r\n itemType: DropdownMenuItemType.Divider,\r\n }]: []),\r\n ...(standardOtherOptions.length > 0 ? [{\r\n key: 'standardOtherPlacements',\r\n text: i18n.getString(partnerTrafficString),\r\n itemType: DropdownMenuItemType.Header,\r\n }]:[]),\r\n ...standardOtherOptions,\r\n ];\r\n\r\n return options;\r\n};\r\n\r\nexport const getMobileTargetOptions = ({\r\n i18n,\r\n sourceWidth,\r\n sourceHeight,\r\n}) => {\r\n const mobileOnO = getMobileOnO();\r\n const mobileOnoOptions = getOptionsTranslated(i18n, sourceWidth, sourceHeight, mobileOnO);\r\n const mobileOthers = getMobileOthers();\r\n const mobileOtherOptions = getOptionsTranslated(i18n, sourceWidth, sourceHeight, mobileOthers);\r\n\r\n const options = [\r\n ...(mobileOnoOptions.length > 0 ? [{\r\n key: 'mobileOnoPlacements',\r\n text: i18n.getString(onoTrafficString),\r\n itemType: DropdownMenuItemType.Header,\r\n }]: []),\r\n ...mobileOnoOptions,\r\n ...(mobileOnoOptions.length > 0 ? [{\r\n key: 'divider',\r\n itemType: DropdownMenuItemType.Divider,\r\n }]: []),\r\n ...(mobileOtherOptions.length > 0 ? [{\r\n key: 'mobileOtherPlacements',\r\n text: i18n.getString(partnerTrafficString),\r\n itemType: DropdownMenuItemType.Header,\r\n }]:[]),\r\n ...mobileOtherOptions,\r\n ];\r\n\r\n return options;\r\n};\r\n\r\nexport const getTargetOptions = ({\r\n i18n,\r\n sourceWidth,\r\n sourceHeight,\r\n}) => {\r\n const standardOptions = [];\r\n standard.forEach(({\r\n width,\r\n height,\r\n text,\r\n sizeText,\r\n targetText,\r\n }) => {\r\n if ((!sourceHeight || sourceHeight >= height) && (!sourceWidth || sourceWidth >= width)) {\r\n standardOptions.push({\r\n key: `Image${width}x${height}`,\r\n width,\r\n height,\r\n text: i18n.getString(text),\r\n sizeText: i18n.getString(sizeText),\r\n targetText: i18n.getString(targetText),\r\n });\r\n }\r\n });\r\n\r\n const mobileOptions = [];\r\n mobile.forEach(({\r\n width,\r\n height,\r\n text,\r\n sizeText,\r\n targetText,\r\n }) => {\r\n if ((!sourceHeight || sourceHeight >= height) && (!sourceWidth || sourceWidth >= width)) {\r\n mobileOptions.push({\r\n key: `Image${width}x${height}`,\r\n width,\r\n height,\r\n text: i18n.getString(text),\r\n sizeText: i18n.getString(sizeText),\r\n targetText: i18n.getString(targetText),\r\n });\r\n }\r\n });\r\n\r\n const options = [\r\n ...(standardOptions.length > 0 ? [{\r\n key: 'standard',\r\n text: i18n.getString(_TL_('Standard')),\r\n itemType: DropdownMenuItemType.Header,\r\n }]: []),\r\n ...standardOptions,\r\n ...(standardOptions.length > 0 ? [{\r\n key: 'divider',\r\n itemType: DropdownMenuItemType.Divider,\r\n }]: []),\r\n ...(mobileOptions.length > 0 ? [{\r\n key: 'Mobile',\r\n text: i18n.getString(_TL_('Mobile')),\r\n itemType: DropdownMenuItemType.Header,\r\n }]:[]),\r\n ...mobileOptions,\r\n ];\r\n\r\n return options;\r\n};\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React, { useEffect, useState, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { Text, FontIcon } from '@bingads-webui-react/fabric-control';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { Link } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { getAdsStepStyles } from './styles';\r\nimport { CropPreview } from './cropped-preview';\r\nimport { getTargetOptions } from './image-targets';\r\n\r\nconst ITEMS_PER_PAGE = 10;\r\n\r\nexport const AdPreview = (props) => {\r\n const {\r\n i18n,\r\n ads,\r\n onUpdateCurrentImageIndex,\r\n disablePagination,\r\n customStyleFunction,\r\n useCustomStyleFunction,\r\n } = props;\r\n\r\n const displayAds = (ads && ads.data) || [];\r\n const defaultClasses = useDefaultStyles(getAdsStepStyles);\r\n const customClasses = useDefaultStyles(customStyleFunction);\r\n const classes = useCustomStyleFunction ? customClasses : defaultClasses;\r\n const { currentPageIndex } = ads;\r\n const [currentImageIdx, setCurrentImageIdx] = useState(0);\r\n const targetOptions = useMemo(() => getTargetOptions({ i18n }), [i18n]);\r\n\r\n const getPageAdjustedIndex = (idx, pageNumber = null) => {\r\n const page = pageNumber || currentPageIndex;\r\n\r\n const val = (((page - 1) * ITEMS_PER_PAGE) + idx);\r\n\r\n return val;\r\n };\r\n\r\n const goToPrevImage = () => {\r\n setCurrentImageIdx(currentImageIdx - 1);\r\n };\r\n\r\n const goToNextImage = () => {\r\n setCurrentImageIdx(currentImageIdx + 1);\r\n };\r\n\r\n const goToImageIndex = (idx) => {\r\n setCurrentImageIdx(idx);\r\n };\r\n\r\n const displayAdsArray = _.isArray(displayAds) ? displayAds : [];\r\n const displayAdsInPage = displayAdsArray.slice(getPageAdjustedIndex(0), getPageAdjustedIndex(9) + 1);\r\n const currentAd = displayAds[getPageAdjustedIndex(currentImageIdx)] || displayAds[0];\r\n const currentImage = (currentAd && currentAd.data && currentAd.data.image) || undefined;\r\n const resizeImageHeight = useMemo(() => {\r\n if (currentImage && currentImage.cropHeight && currentImage.cropWidth) {\r\n const aspectRatio = currentImage.cropWidth / currentImage.cropHeight;\r\n const maxWidth = 458;\r\n return Math.min(maxWidth / aspectRatio, 280);\r\n }\r\n return 0;\r\n }, [currentImage]);\r\n\r\n const currentImageTarget = useMemo(() => {\r\n if (!currentImage) {\r\n return null;\r\n }\r\n const target = targetOptions.find(option => option.key === `Image${currentImage.targetWidth}x${currentImage.targetHeight}`);\r\n\r\n return target || null;\r\n }, [currentImage, targetOptions]);\r\n\r\n useEffect(() => {\r\n setCurrentImageIdx(0);\r\n }, [currentPageIndex]);\r\n\r\n useEffect(() => {\r\n if (currentImageIdx > displayAdsInPage.length - 1) {\r\n setCurrentImageIdx(0);\r\n }\r\n onUpdateCurrentImageIndex(currentImageIdx);\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [currentImageIdx, displayAdsInPage.length]);\r\n\r\n return (\r\n
\r\n
\r\n {`${i18n.getString(_TL_('Preview'))}: ${i18n.getString(_TL_('Ad'))} ${currentImageIdx + 1}`} \r\n
\r\n
\r\n
\r\n {currentImageTarget &&\r\n
\r\n {currentImageTarget.sizeText}\r\n \r\n {currentImageTarget.targetText}\r\n \r\n
\r\n }\r\n
\r\n
\r\n { currentImage ? (\r\n ) : (\r\n
\r\n )\r\n }\r\n
\r\n {\r\n !disablePagination && displayAdsInPage.length > 1 && (\r\n
\r\n
\r\n \r\n {i18n.getString(_TL_('Previous ad'))} \r\n \r\n
\r\n {displayAdsInPage.map((image, idx) => (\r\n
\r\n goToImageIndex(idx)}\r\n onClick={() => goToImageIndex(idx)}\r\n className={classes.paginationIndicatorDot}\r\n style={{ backgroundColor: getPageAdjustedIndex(idx) === getPageAdjustedIndex(currentImageIdx) ? '#0078d4' : '#c8c6c4' }}\r\n />\r\n
\r\n ))}\r\n
\r\n \r\n {i18n.getString(_TL_('Next ad'))} \r\n \r\n
\r\n
\r\n )\r\n }\r\n
\r\n \r\n {i18n.getString(_TL_('This is an example of what your display ad might look like. Depending on placement, the actual ad shown may appear differently.'))}\r\n \r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nAdPreview.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n ads: PropTypes.shape({\r\n data: PropTypes.instanceOf(Array),\r\n currentPageIndex: PropTypes.number,\r\n }).isRequired,\r\n disablePagination: PropTypes.bool,\r\n onUpdateCurrentImageIndex: PropTypes.func,\r\n customStyleFunction: PropTypes.func,\r\n useCustomStyleFunction: PropTypes.bool,\r\n};\r\n\r\nAdPreview.defaultProps = {\r\n disablePagination: false,\r\n customStyleFunction: _.noop,\r\n useCustomStyleFunction: false,\r\n onUpdateCurrentImageIndex: _.noop,\r\n};\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Link, TextField } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { FontIcon, Text } from '@bingads-webui-react/fabric-control';\r\n\r\nexport const Pagination = ({\r\n totalPages,\r\n disablePagination,\r\n classes,\r\n goToPrevPage,\r\n goToNextPage,\r\n goToPage,\r\n currentPageIndex,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n return (\r\n <>\r\n {totalPages > 1 && !disablePagination && (\r\n
\r\n
\r\n \r\n Prev \r\n \r\n goToPage(val)}\r\n />\r\n {i18n.getString(_TL_('of'))} {totalPages} \r\n \r\n {i18n.getString(_TL_('Next'))} \r\n \r\n
\r\n
\r\n )}\r\n \r\n );\r\n};\r\n\r\nPagination.propTypes = {\r\n totalPages: PropTypes.number.isRequired,\r\n disablePagination: PropTypes.bool,\r\n classes: PropTypes.shape({\r\n pagination: PropTypes.shape({}).isRequired,\r\n pageControls: PropTypes.shape({}).isRequired,\r\n }).isRequired,\r\n goToPrevPage: PropTypes.func.isRequired,\r\n goToNextPage: PropTypes.func.isRequired,\r\n goToPage: PropTypes.func.isRequired,\r\n currentPageIndex: PropTypes.number.isRequired,\r\n};\r\n\r\nPagination.defaultProps = {\r\n disablePagination: false,\r\n};\r\n","import _ from 'underscore';\r\nimport { AspectRatiosForDisplayAds } from '@bingads-webui-campaign-react/image-experience-model';\r\n\r\nexport const imageModelToViewModel = (imageModel) => {\r\n const type = /^Image(\\d+)x(\\d+)/.exec(imageModel.type);\r\n const width = parseInt(type[1], 10);\r\n const height = parseInt(type[2], 10);\r\n const image = {\r\n id: imageModel.id,\r\n disableEdit: imageModel.disableEdit,\r\n subType: 'DisplayCreativeImage',\r\n targetWidth: width,\r\n targetHeight: height,\r\n cropX: imageModel.cropSettings.SourceX,\r\n cropY: imageModel.cropSettings.SourceY,\r\n cropWidth: imageModel.cropSettings.SourceWidth,\r\n cropHeight: imageModel.cropSettings.SourceHeight,\r\n src: imageModel.src,\r\n text: imageModel.text,\r\n originalWidth: imageModel.width,\r\n originalHeight: imageModel.height,\r\n };\r\n\r\n return image;\r\n};\r\n\r\nexport const imagePlacementsToImage = ({ crops, defaults, selected }) => {\r\n const filtered = crops.filter(({ type, width, height }) => {\r\n const aspectRatio = AspectRatiosForDisplayAds[type];\r\n const { minSize: [minWidth, minHeight] } = aspectRatio;\r\n return width >= minWidth && height >= minHeight;\r\n });\r\n\r\n let selectedImage = null;\r\n if (selected) {\r\n const selectedIndex = filtered.findIndex(({ type }) => type === `Image${selected.TargetWidth}x${selected.TargetHeight}`);\r\n filtered[selectedIndex].cropSettings = {\r\n ...filtered[selectedIndex].cropSettings,\r\n SourceWidth: selected.CropWidth,\r\n SourceHeight: selected.CropHeight,\r\n SourceX: selected.CropX,\r\n SourceY: selected.CropY,\r\n };\r\n selectedImage = filtered[selectedIndex];\r\n } else {\r\n selectedImage = _.max(filtered, ({ cropSettings: { SourceHeight, SourceWidth }, width, height }) => (SourceHeight * SourceWidth) / width / height);\r\n }\r\n\r\n return {\r\n data: {\r\n ...defaults,\r\n image: imageModelToViewModel(selectedImage),\r\n imagePlacements: filtered,\r\n },\r\n };\r\n};\r\n\r\nexport const isAdsEmpty = ({\r\n displayAds,\r\n}) => {\r\n if (displayAds.length === 1) {\r\n return displayAds[0].data && displayAds[0].data.image === null && displayAds[0].data.FinalUrls.length === 1 && displayAds[0].data.FinalUrls[0] === undefined;\r\n }\r\n\r\n return !(displayAds.length > 1);\r\n};\r\n\r\nexport const addCreativesToDisplayAds = ({\r\n displayAds, creatives,\r\n}) => {\r\n if (isAdsEmpty({ displayAds })) {\r\n // no ad exists, all ads are empty.\r\n return [...creatives];\r\n }\r\n\r\n return [...displayAds, ...creatives];\r\n};\r\n\r\n// recursivley translate all the keys and child keys first character to upper case for now\r\nexport const transformFirstCharacterToUpperCase = (creativeData = {}) => Object.keys(creativeData).reduce((acc, key) => {\r\n if (typeof creativeData[key] === 'object') {\r\n acc[key.charAt(0).toUpperCase() + key.slice(1)] = transformFirstCharacterToUpperCase(creativeData[key]);\r\n } else {\r\n acc[key.charAt(0).toUpperCase() + key.slice(1)] = creativeData[key];\r\n }\r\n return acc;\r\n}, {});\r\n\r\n","import React, { useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { noop } from 'underscore';\r\nimport { constants } from '@bingads-webui-campaign-react/image-experience-model';\r\nimport { AddImageCrudAdComponent } from '@bingads-webui-campaign-react/add-media-panel-crud-ad';\r\nimport { useAssetLibraryImagePicker } from '@bingads-webui-campaign-react/add-image-hooks';\r\n\r\nexport const AddImage = ({\r\n advertiserCustomerId,\r\n accountId,\r\n i18n,\r\n perfMarker,\r\n preferenceService,\r\n permissions,\r\n oDataConfig,\r\n suggestionState,\r\n suggestionPoller,\r\n fullUrl,\r\n urlPrefix,\r\n onUpdateUrlPrefix,\r\n onUpdateUrlValue,\r\n dateFormat,\r\n timeZone,\r\n activityLogger,\r\n maxUploadNum,\r\n displayImagePicker,\r\n setDisplayImagePicker,\r\n selectedMediaPanelSource,\r\n setSelectedMediaPanelSource,\r\n onNewImageSelected,\r\n isAADUser,\r\n creativeEditorProps,\r\n serverContext,\r\n}) => {\r\n const [addImageChildPerfmarker] = useState(() => perfMarker.createChild('imagePicker'));\r\n const emptyFinalUrl = !fullUrl || fullUrl === `${urlPrefix}://`;\r\n\r\n const {\r\n imagePickerError,\r\n setImagePickerError,\r\n clearImagePickerError,\r\n uploadImage,\r\n processUploadedImage,\r\n minSize,\r\n addImageByUrl,\r\n getStockImages,\r\n getInvestImages,\r\n onSelectStockImage,\r\n onImageSelected,\r\n onImagesSelected,\r\n socialMediaDataSource,\r\n customMediaSourceConfig,\r\n } = useAssetLibraryImagePicker({\r\n cid: advertiserCustomerId.toString(),\r\n aid: accountId.toString(),\r\n oDataConfig,\r\n onNewImageSelected,\r\n i18n,\r\n permissions,\r\n isDisplayAds: true,\r\n });\r\n\r\n const { suggestion = {} } = suggestionState;\r\n\r\n return (\r\n {\r\n setDisplayImagePicker(newOpen);\r\n if (!newOpen) {\r\n clearImagePickerError();\r\n }\r\n }}\r\n uploadImage={uploadImage}\r\n processUploadedImage={processUploadedImage}\r\n minSize={minSize}\r\n maxUploadNum={maxUploadNum}\r\n imageExperienceProps={{\r\n suggestion,\r\n suggestionPoller,\r\n finalUrl: emptyFinalUrl ? '' : fullUrl,\r\n finalUrlProtocol: `${urlPrefix}://`,\r\n onUpdateFinalUrl: onUpdateUrlValue,\r\n onUpdateFinalUrlPrefix: onUpdateUrlPrefix,\r\n isMultimediaAd: false,\r\n imageOption: constants.defaultImageOption,\r\n isDisplayAds: true,\r\n }}\r\n addImageByUrl={addImageByUrl}\r\n managedViewSelectionState={selectedMediaPanelSource}\r\n updateManagedViewSelectionState={setSelectedMediaPanelSource}\r\n stockImageConfig={{\r\n getStockImages,\r\n onSelectStockImage,\r\n }}\r\n investImageConfig={{\r\n getInvestImages,\r\n }}\r\n socialImageConfig={{\r\n socialMediaDataSource,\r\n activityLogger,\r\n }}\r\n assetLibraryConfig={{\r\n cid: advertiserCustomerId.toString(),\r\n aid: accountId.toString(),\r\n oDataConfig,\r\n dateFormat,\r\n timeZone,\r\n preferencesService: preferenceService,\r\n activityLogger,\r\n onImageSelected,\r\n onImagesSelected,\r\n onImageAddError: e => setImagePickerError(e),\r\n enableStockMultipleSelection: true,\r\n enableInvestMultipleSelection: true,\r\n enableWebsiteMultipleSelection: true,\r\n }}\r\n i18n={i18n}\r\n cid={advertiserCustomerId.toString()}\r\n aid={accountId.toString()}\r\n errorMessage={imagePickerError}\r\n imageType={null}\r\n customMediaSourceConfig={customMediaSourceConfig}\r\n perfMarker={addImageChildPerfmarker}\r\n permissions={permissions}\r\n isAADUser={isAADUser}\r\n creativeEditorProps={creativeEditorProps}\r\n serverContext={serverContext}\r\n />\r\n );\r\n};\r\n\r\nAddImage.propTypes = {\r\n advertiserCustomerId: PropTypes.number.isRequired,\r\n accountId: PropTypes.number.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n perfMarker: PropTypes.shape({\r\n willFetchFile: PropTypes.func.isRequired,\r\n willInit: PropTypes.func.isRequired,\r\n willFetchData: PropTypes.func.isRequired,\r\n willRender: PropTypes.func.isRequired,\r\n done: PropTypes.func.isRequired,\r\n createChild: PropTypes.func.isRequired,\r\n }).isRequired,\r\n preferenceService: PropTypes.shape({\r\n setAtUserLevel: PropTypes.func,\r\n findByNameAtUserLevel: PropTypes.func,\r\n }).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n }),\r\n }),\r\n oDataConfig: PropTypes.shape({\r\n odataRootUrl: PropTypes.string,\r\n odataPath: PropTypes.string,\r\n odataToken: PropTypes.string,\r\n }).isRequired,\r\n suggestionState: PropTypes.shape({\r\n suggestion: PropTypes.shape({}),\r\n carousel: PropTypes.shape({}),\r\n }).isRequired,\r\n suggestionPoller: PropTypes.shape({}).isRequired,\r\n adCreatorScenario: PropTypes.shape({\r\n scenarioName: PropTypes.string,\r\n scenarioValue: PropTypes.string,\r\n }),\r\n fullUrl: PropTypes.string,\r\n urlPrefix: PropTypes.string,\r\n onUpdateUrlPrefix: PropTypes.func,\r\n onUpdateUrlValue: PropTypes.func,\r\n dateFormat: PropTypes.string,\r\n timeZone: PropTypes.number,\r\n activityLogger: PropTypes.shape({}),\r\n maxUploadNum: PropTypes.number,\r\n displayImagePicker: PropTypes.bool,\r\n setDisplayImagePicker: PropTypes.func.isRequired,\r\n selectedMediaPanelSource: PropTypes.string.isRequired,\r\n setSelectedMediaPanelSource: PropTypes.func.isRequired,\r\n onNewImageSelected: PropTypes.func.isRequired,\r\n isAADUser: PropTypes.bool,\r\n creativeEditorProps: PropTypes.shape({}),\r\n assetLibraryConfigs: PropTypes.shape({\r\n imagePickerError: PropTypes.string,\r\n setImagePickerError: PropTypes.func,\r\n clearImagePickerError: PropTypes.func,\r\n uploadImage: PropTypes.func,\r\n processUploadedImage: PropTypes.func,\r\n minSize: PropTypes.number,\r\n addImageByUrl: PropTypes.func,\r\n getStockImages: PropTypes.func,\r\n getInvestImages: PropTypes.func,\r\n onSelectStockImage: PropTypes.func,\r\n onImageSelected: PropTypes.func,\r\n onImagesSelected: PropTypes.func,\r\n socialMediaDataSource: PropTypes.shape({}),\r\n customMediaSourceConfig: PropTypes.shape({}),\r\n }).isRequired,\r\n};\r\n\r\nAddImage.defaultProps = {\r\n permissions: {},\r\n adCreatorScenario: undefined,\r\n fullUrl: '',\r\n urlPrefix: '',\r\n onUpdateUrlPrefix: noop,\r\n onUpdateUrlValue: noop,\r\n dateFormat: 'M/d/yyyy',\r\n timeZone: 71,\r\n activityLogger: {},\r\n displayImagePicker: false,\r\n maxUploadNum: 1,\r\n isAADUser: false,\r\n creativeEditorProps: undefined,\r\n};\r\n","import React, { useContext, useState, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { get } from 'underscore';\r\nimport classNames from 'classnames';\r\nimport { DefaultButton } from '@bingads-webui-react/fabric-control';\r\nimport { ActivityContext, ScenarioContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { withInstrumentation } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { withPreference } from '@bingads-webui-react/preference-context';\r\nimport {\r\n getUrlPrefixAndDestination,\r\n getUpdatedFullUrlOnPrefixUpdate,\r\n getUpdatedFullUrlOnTextUpdate,\r\n validateAdUrl\r\n} from '@bingads-webui-campaign-react/url-input-fluent';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { useWebsiteSuggestion } from '@bingads-webui-campaign-react/add-image-hooks';\r\n\r\nimport { AddImage } from './add-image';\r\n\r\nconst getStyles = () => ({\r\n buttonContainer: {\r\n display: 'flex',\r\n padding: '32px',\r\n height: '134px',\r\n flexDirection: 'column',\r\n justifyContent: 'space-between',\r\n alignItems: 'center',\r\n borderRadius: '12px',\r\n marginTop: '16px',\r\n border: '1px dashed #B3B0AD',\r\n },\r\n});\r\n\r\nconst PopulateImages = ({\r\n aid,\r\n i18n,\r\n perfMarker,\r\n preferenceService,\r\n permissions,\r\n oDataConfig,\r\n serverContext,\r\n onNewImageSelected,\r\n selectedMediaPanelSource,\r\n setSelectedMediaPanelSource,\r\n displayImagePicker,\r\n setDisplayImagePicker,\r\n instrumentation,\r\n campaignId,\r\n onUpdateUrl,\r\n fullUrl,\r\n maxUploadNum,\r\n showAddButton,\r\n creativeEditorProps,\r\n}) => {\r\n const classes = useDefaultStyles(getStyles);\r\n const activity = useContext(ActivityContext);\r\n const scenario = useContext(ScenarioContext);\r\n const [privateUrl, setPrivateUrl] = useState('');\r\n\r\n const url = useMemo(() => {\r\n if (validateAdUrl(fullUrl)=== null) {\r\n return fullUrl;\r\n }\r\n\r\n return privateUrl || 'https://';\r\n }, [fullUrl, privateUrl]);\r\n\r\n const urlPrefixValue = useMemo(() => {\r\n const [prefix] = getUrlPrefixAndDestination(url);\r\n return prefix;\r\n }, [url]);\r\n\r\n const {\r\n suggestionState,\r\n suggestionPoller,\r\n } = useWebsiteSuggestion({\r\n oDataConfig,\r\n adContext: {\r\n advertiserCustomerId: get(serverContext, ['CurrentAccount', 'AdvertiserCustomerID']),\r\n accountId: aid,\r\n campaignId,\r\n },\r\n instrumentation,\r\n logActivity: activity.signal,\r\n permissions,\r\n fullUrl: url,\r\n hasErrorInUrl: validateAdUrl(url) !== null,\r\n adCreatorScenario: {\r\n scenarioName: `${scenario.name}AdCreation`,\r\n scenarioValue: `${scenario.name}AdCreation`,\r\n },\r\n });\r\n\r\n const updateUrl = (evt) => {\r\n const { value } = evt.target;\r\n const newUrl = getUpdatedFullUrlOnTextUpdate(urlPrefixValue, value);\r\n if (onUpdateUrl) {\r\n onUpdateUrl(newUrl);\r\n } else {\r\n setPrivateUrl(newUrl);\r\n }\r\n };\r\n\r\n const updateUrlPrefix = (evt, { text }) => {\r\n const newPrefix = text.substring(0, text.length - 3);\r\n const [, original] = getUrlPrefixAndDestination(url);\r\n const newUrl = getUpdatedFullUrlOnPrefixUpdate(original, newPrefix);\r\n if (onUpdateUrl) {\r\n onUpdateUrl(newUrl);\r\n } else {\r\n setPrivateUrl(newUrl);\r\n }\r\n };\r\n\r\n return (\r\n <>\r\n { showAddButton &&\r\n
\r\n {\r\n setDisplayImagePicker(true);\r\n }}\r\n className=\"add-image-button\"\r\n styles={{ root: { minWidth: '200px', marginTop: 16 } }}\r\n />\r\n
\r\n }\r\n \r\n );\r\n};\r\n\r\nPopulateImages.propTypes = {\r\n aid: PropTypes.number.isRequired,\r\n campaignId: PropTypes.number.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n perfMarker: PropTypes.shape({\r\n }).isRequired,\r\n preferenceService: PropTypes.shape({\r\n setAtUserLevel: PropTypes.func,\r\n findByNameAtUserLevel: PropTypes.func,\r\n }).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n }),\r\n }).isRequired,\r\n oDataConfig: PropTypes.shape({\r\n odataRootUrl: PropTypes.string,\r\n odataPath: PropTypes.string,\r\n odataToken: PropTypes.string,\r\n }).isRequired,\r\n serverContext: PropTypes.shape({\r\n CurrentAccount: PropTypes.shape({\r\n AdvertiserCustomerID: PropTypes.number,\r\n TimeZone: PropTypes.number,\r\n }),\r\n CurrentUser: PropTypes.shape({\r\n CultureDateTimeFormat: PropTypes.shape({\r\n ShortDatePattern: PropTypes.string,\r\n }),\r\n }),\r\n }).isRequired,\r\n onNewImageSelected: PropTypes.func.isRequired,\r\n selectedMediaPanelSource: PropTypes.string.isRequired,\r\n setSelectedMediaPanelSource: PropTypes.func.isRequired,\r\n displayImagePicker: PropTypes.bool.isRequired,\r\n setDisplayImagePicker: PropTypes.func.isRequired,\r\n instrumentation: PropTypes.shape({\r\n addScenario: PropTypes.func,\r\n }).isRequired,\r\n onUpdateUrl: PropTypes.func,\r\n fullUrl: PropTypes.string,\r\n maxUploadNum: PropTypes.number,\r\n showAddButton: PropTypes.bool,\r\n creativeEditorProps: PropTypes.shape({}),\r\n};\r\n\r\nPopulateImages.defaultProps = {\r\n onUpdateUrl: undefined,\r\n fullUrl: '',\r\n maxUploadNum: 10,\r\n showAddButton: true,\r\n creativeEditorProps: undefined,\r\n};\r\n\r\nconst wrapped = withPreference(withInstrumentation(PopulateImages));\r\n\r\nexport { wrapped as PopulateImages };\r\n","import _ from 'underscore';\r\n\r\n// errors\r\nexport const errors = {\r\n NO_RECOMMENDATION: _TL_('There are no recommendations for this Final URL'),\r\n FinalURL: _TL_('Unable to generate recommendations for this Final URL'),\r\n DEFAULT: _TL_('Unable to generate recommendations'),\r\n};\r\n\r\n// convert placementTexts and placements to a map\r\nexport const placements = {\r\n SuperLeaderboard: {\r\n name: _TL_('970x90 Super leaderboard'),\r\n size: '970x90',\r\n },\r\n Leaderboard: {\r\n name: _TL_('728x90 Leaderboard'),\r\n size: '728x90',\r\n },\r\n FullBanner: {\r\n name: _TL_('468x60 Full banner'),\r\n size: '468x60',\r\n },\r\n SmallLeaderboard: {\r\n name: _TL_('320x50 Small leaderboard'),\r\n size: '320x50',\r\n },\r\n Banner: {\r\n name: _TL_('300x50 Banner'),\r\n size: '300x50',\r\n },\r\n LargeBanner: {\r\n name: _TL_('216x36 Large banner'),\r\n size: '216x36',\r\n },\r\n MediumBanner: {\r\n name: _TL_('168x28 Medium banner'),\r\n size: '168x28',\r\n },\r\n SmallBanner: {\r\n name: _TL_('120x20 Small banner'),\r\n size: '120x20',\r\n },\r\n HalfBanner: {\r\n name: _TL_('234x60 Half banner'),\r\n size: '234x60',\r\n },\r\n Billboard: {\r\n name: _TL_('970x250 Billboard'),\r\n size: '970x250',\r\n },\r\n LandscapeLargeBanner: {\r\n name: _TL_('320x100 Landscape large banner'),\r\n size: '320x100',\r\n },\r\n Landscape: {\r\n name: _TL_('480x320 Landscape'),\r\n size: '480x320',\r\n },\r\n LargeRectangle: {\r\n name: _TL_('336x280 Large rectangle'),\r\n size: '336x280',\r\n },\r\n MediumRectangle: {\r\n name: _TL_('300x250 Medium rectangle'),\r\n size: '300x250',\r\n },\r\n Rectangle: {\r\n name: _TL_('180x150 Rectangle'),\r\n size: '180x150',\r\n },\r\n Square: {\r\n name: _TL_('250x250 Square'),\r\n size: '250x250',\r\n },\r\n Portrait: {\r\n name: _TL_('320x480 Portrait'),\r\n size: '320x480',\r\n },\r\n HalfPage: {\r\n name: _TL_('300x600 Half page'),\r\n size: '300x600',\r\n },\r\n WideSkyscraper: {\r\n name: _TL_('160x600 Wide skyscraper'),\r\n size: '160x600',\r\n },\r\n Skyscraper: {\r\n name: _TL_('120x600 Skyscraper'),\r\n size: '120x600',\r\n },\r\n};\r\n\r\nconst ratios = {\r\n [placements.SuperLeaderboard.size]: 'SuperLeaderboard',\r\n [placements.Leaderboard.size]: 'Leaderboard',\r\n [placements.FullBanner.size]: 'FullBanner',\r\n [placements.SmallLeaderboard.size]: 'SmallLeaderboard',\r\n [placements.Banner.size]: 'Banner',\r\n [placements.LargeBanner.size]: 'LargeBanner',\r\n [placements.MediumBanner.size]: 'MediumBanner',\r\n [placements.SmallBanner.size]: 'SmallBanner',\r\n [placements.HalfBanner.size]: 'HalfBanner',\r\n [placements.Billboard.size]: 'Billboard',\r\n [placements.LandscapeLargeBanner.size]: 'LandscapeLargeBanner',\r\n [placements.Landscape.size]: 'Landscape',\r\n [placements.LargeRectangle.size]: 'LargeRectangle',\r\n [placements.MediumRectangle.size]: 'MediumRectangle',\r\n [placements.Rectangle.size]: 'Rectangle',\r\n [placements.Square.size]: 'Square',\r\n [placements.Portrait.size]: 'Portrait',\r\n [placements.HalfPage.size]: 'HalfPage',\r\n [placements.WideSkyscraper.size]: 'WideSkyscraper',\r\n [placements.Skyscraper.size]: 'Skyscraper',\r\n};\r\n\r\nexport const ratioGrouping = {\r\n XWide: [\r\n ratios[placements.SuperLeaderboard.size],\r\n ratios[placements.Leaderboard.size],\r\n ratios[placements.FullBanner.size],\r\n ratios[placements.SmallLeaderboard.size],\r\n ratios[placements.Banner.size],\r\n ratios[placements.LargeBanner.size],\r\n ratios[placements.MediumBanner.size],\r\n ratios[placements.SmallBanner.size],\r\n ],\r\n Landscape: [\r\n ratios[placements.HalfBanner.size],\r\n ratios[placements.Billboard.size],\r\n ratios[placements.LandscapeLargeBanner.size],\r\n ratios[placements.Landscape.size],\r\n ],\r\n Square: [\r\n ratios[placements.LargeRectangle.size],\r\n ratios[placements.MediumRectangle.size],\r\n ratios[placements.Rectangle.size],\r\n ratios[placements.Square.size],\r\n ],\r\n Vertical: [\r\n ratios[placements.Portrait.size],\r\n ratios[placements.HalfPage.size],\r\n ratios[placements.WideSkyscraper.size],\r\n ratios[placements.Skyscraper.size],\r\n ],\r\n};\r\n\r\n// MT has this unicode character : –\r\nexport const getPlacement = ad => ratios[ad.template.templateName.split('-')[0].trim()];\r\n\r\nexport const getPlacementFromTemplate = template => ratios[template.templateName.split('-')[0].trim()];\r\n\r\n// add placement to each ad\r\nexport const addPlacementToAd = (ads) => {\r\n const adsWithPlacement = ads.map((ad) => {\r\n const MTPlacement = getPlacement(ad);\r\n\r\n return {\r\n ...ad,\r\n placement: MTPlacement,\r\n };\r\n });\r\n\r\n return adsWithPlacement;\r\n};\r\n\r\n// return a map grouped by image url\r\nexport const groupAdsByImages = (ads) => {\r\n const groupedAds = _.groupBy(ads, ad => ad.template.image.url);\r\n return groupedAds;\r\n};\r\n\r\nexport const groupAdsByRatio = (groupedAds) => {\r\n const adsWithRatioGroups = {};\r\n\r\n const imageUrls = _.keys(groupedAds);\r\n\r\n // for each image url, group by placement ratio group\r\n _.each(imageUrls, (imageUrl) => {\r\n const ads = groupedAds[imageUrl];\r\n const groupedByPlacement = _.groupBy(ads, (ad) => {\r\n const { placement } = ad;\r\n const ratioGroup = _.findKey(ratioGrouping, ratiosKey => _.contains(ratiosKey, placement));\r\n return ratioGroup;\r\n });\r\n\r\n adsWithRatioGroups[imageUrl] = groupedByPlacement;\r\n });\r\n\r\n return adsWithRatioGroups;\r\n};\r\n\r\nconst getRandomImageForEachRatioGroup = (adsWithRatioGroups) => {\r\n const randomImages = [];\r\n\r\n _.each(adsWithRatioGroups, (ads) => {\r\n const randomImage = _.mapObject(ads, (group) => {\r\n const randomAd = _.sample(group);\r\n\r\n const imageSuggestionCarouselObj = {\r\n thumbnailUrl: randomAd.url,\r\n fullUrl: randomAd.template.image.url,\r\n suggestionId: randomAd.recommendationId,\r\n };\r\n\r\n return imageSuggestionCarouselObj;\r\n });\r\n\r\n randomImages.push(..._.values(randomImage));\r\n });\r\n\r\n return randomImages;\r\n};\r\n\r\n\r\nexport const processAndGroupAds = (ads) => {\r\n const adsWithPlacement = addPlacementToAd(ads);\r\n const groupedAds = groupAdsByImages(adsWithPlacement);\r\n const adsWithRatioGroups = groupAdsByRatio(groupedAds);\r\n\r\n return {\r\n imagesToSuggest: getRandomImageForEachRatioGroup(adsWithRatioGroups),\r\n groupedAds: adsWithRatioGroups,\r\n };\r\n};\r\n\r\n\r\nexport const getItemsForListFromGroupedAds = (groupedAds) => {\r\n const items = [];\r\n\r\n _.each(groupedAds, (ratioGroups) => {\r\n _.each(ratioGroups, (ads) => {\r\n const sampleAd = _.sample(ads);\r\n\r\n const newItem = {\r\n id: sampleAd.recommendationId,\r\n previewSrc: sampleAd.url,\r\n previewType: sampleAd.placement,\r\n placements: ads.map(ad => ({\r\n id: ad.recommendationId,\r\n type: ad.placement,\r\n })),\r\n };\r\n\r\n items.push(newItem);\r\n });\r\n });\r\n\r\n return items;\r\n};\r\n\r\nexport const getAdsInMatchingGroup = (groupedAds, id) => {\r\n const matchingGroup = _.find(groupedAds, ratioGroups => _.find(ratioGroups, ads => _.some(ads, ad => ad.recommendationId === id)));\r\n const matchingAds = _.find(matchingGroup, ads => _.some(ads, ad => ad.recommendationId === id));\r\n\r\n return matchingAds;\r\n};\r\n\r\nexport const getODataConfig = (serverContext) => {\r\n const isLocal = () => {\r\n const hostname = document.location.hostname.toLowerCase();\r\n return hostname.indexOf('ads.microsoft.com') === -1 &&\r\n hostname.indexOf('ads-int.microsoft.com') === -1;\r\n };\r\n\r\n const odataPath = isLocal() ? 'Advertiser/V2' : 'Campaign/V2';\r\n\r\n const oDataConfig = {\r\n odataToken: serverContext.Token,\r\n oDataToken: serverContext.Token,\r\n odataPath: `${serverContext.ServicesEndpoints.CampaignAPI}${odataPath}`,\r\n oDataPath: `${serverContext.ServicesEndpoints.CampaignAPI}${odataPath}`,\r\n };\r\n\r\n return oDataConfig;\r\n};\r\n","import React, { useEffect, useMemo, useCallback, useState, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport classNames from 'classnames';\r\nimport { Text, ChoiceGroup } from '@fluentui/react';\r\nimport { Dropdown, Label, Stack } from '@bingads-webui-react/fabric-control';\r\nimport { withCustomValidation, withError } from '@bingads-webui-react/validation';\r\nimport { entityIs, propertyIs, andComp } from '@bingads-webui-campaign-react/form-error';\r\nimport { PreferenceContext } from '@bingads-webui-react/preference-context';\r\nimport { withControlErrorHandling, withUnvalidatedControlErrors } from '@bingads-webui-campaign-react/error-handling';\r\nimport { DefaultButton, ERROR_ENTITY, IconButton } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { MediaEditorPanel } from '@bingads-webui-campaign-react/media-editor-panel';\r\nimport { PivotItemKey } from '@bingads-webui-campaign-react/media-editor';\r\nimport { isTestEnvironment } from '@bingads-webui-campaign/global-app-init';\r\nimport { MediaRepository } from '@bingads-webui-campaign/media-repository';\r\nimport { constants } from '@bingads-webui-campaign-react/image-experience';\r\nimport { ScenarioContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { AspectRatiosForDisplayAds } from '@bingads-webui-campaign-react/image-experience-model';\r\nimport { withServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { useImagePicker } from '@bingads-webui-campaign-react/add-image-hooks';\r\nimport { PreviewSingleRightRailWrapper } from '@bingads-webui-campaign-react/preview-right-rail-wrapper';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { CroppedImageView } from '@bingads-webui-campaign-react/cropped-image-view';\r\nimport { HelpPopupInline } from '@bingads-webui-react/help-popup';\r\nimport { useCopilotRepositoryContext } from '@bingads-webui/inline-copilot';\r\nimport { DisplayAdsEditorDrawer as DisplayAdsEditor } from '@bingads-webui-campaign-react/display-ads-editor';\r\nimport { InstrumentationContext } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { useBrandKitService } from '@bingads-webui-campaign-react/brandkit-data-service';\r\nimport { withComponentErrorLogging } from '@bingads-webui-campaign-react/global-error-options';\r\n\r\nimport { getTargetOptions, getStandardTargetOptions, getMobileTargetOptions, getAllStandardOptions, getAllMobileOptions } from './image-targets';\r\nimport { imageModelToViewModel, imagePlacementsToImage } from '../model/utl';\r\nimport { PopulateImages } from './populate-images';\r\nimport { CropPreview } from './cropped-preview';\r\nimport { placements, getPlacementFromTemplate } from '../model/constants';\r\n\r\nconst DisplayAdsEditorDrawer = withComponentErrorLogging(DisplayAdsEditor, 'DisplayAdsEditorDrawer');\r\n\r\nconst ImageContainerWidth = 170;\r\nconst ImageContainerHeight = 107;\r\n\r\nconst getStyles = () => ({\r\n rootContainer: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n columnGap: '20px',\r\n },\r\n imageContainer: {\r\n position: 'relative',\r\n height: `${ImageContainerHeight}px`,\r\n width: `${ImageContainerWidth}px`,\r\n overflow: 'hidden',\r\n borderRadius: '6px',\r\n backgroundColor: '#F3F2F1',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n },\r\n buttonContainerStyle: {\r\n display: 'flex',\r\n position: 'absolute',\r\n bottom: '5px',\r\n width: '100%',\r\n justifyContent: 'space-evenly',\r\n },\r\n choiceGroupStyles: {\r\n '& .ms-ChoiceField': {\r\n margin: '0',\r\n },\r\n '& label': {\r\n padding: '0 0 2px 0',\r\n fontWeight: 'normal',\r\n },\r\n },\r\n});\r\n\r\nconst dropdownStyles = {\r\n dropdown: { width: 250 },\r\n};\r\n\r\nconst editButtonStyle = {\r\n root: {\r\n borderRadius: '99px',\r\n height: 32,\r\n width: 32,\r\n backgroundColor: '#ffffffd4',\r\n },\r\n};\r\n\r\nexport const validateImage = (/* Image, i18n */) => {\r\n const messages = [];\r\n\r\n return messages;\r\n};\r\n\r\nconst entityIsAd = entityIs(ERROR_ENTITY.Ad);\r\nconst imageTypeFromImage = image => `Image${image.targetWidth}x${image.targetHeight}`;\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\r\nfunction getImageStyles(image) {\r\n const contentWidth = ImageContainerWidth;\r\n const contentHeight = ImageContainerHeight;\r\n let desiredCropWidth = contentWidth;\r\n let desiredCropHeight = contentHeight;\r\n\r\n const cropImageWidth = image.cropWidth;\r\n const cropImageHeight = image.cropHeight;\r\n\r\n const cropRatio = contentHeight / cropImageHeight > contentWidth / cropImageWidth ?\r\n contentHeight / cropImageHeight : contentWidth / cropImageWidth;\r\n\r\n desiredCropHeight = cropImageHeight * cropRatio;\r\n desiredCropWidth = cropImageWidth * cropRatio;\r\n\r\n const xScale = desiredCropWidth / image.cropWidth;\r\n const yScale = desiredCropHeight / image.cropHeight;\r\n\r\n const midPointOffsetX = desiredCropWidth > contentWidth ?\r\n Math.ceil(-(desiredCropWidth - contentWidth) / 2) : 0;\r\n const midPointOffsetY = desiredCropHeight > contentHeight ?\r\n Math.ceil(-(desiredCropHeight - contentHeight) / 2) : 0;\r\n\r\n return {\r\n image: {\r\n width: image.originalWidth * xScale,\r\n height: image.originalHeight * yScale,\r\n },\r\n container: {\r\n marginLeft: `${(-image.cropX * xScale) + midPointOffsetX}px`,\r\n marginTop: `${(-image.cropY * yScale) + midPointOffsetY}px`,\r\n },\r\n };\r\n}\r\n\r\nconst standardDeviceType = 'standard';\r\nconst mobileDeviceType = 'mobile';\r\nconst standardSizes = getAllStandardOptions();\r\nconst mobileSizes = getAllMobileOptions();\r\n\r\nconst getImageTypeFromSize = ((displayAd) => {\r\n if (!displayAd || !displayAd.image || !displayAd.image.targetHeight || !displayAd.image.targetWidth) {\r\n return standardDeviceType;\r\n }\r\n const { targetWidth, targetHeight } = displayAd.image;\r\n const findDeviceType = size => size.width === targetWidth && size.height === targetHeight;\r\n\r\n if (standardSizes.findIndex(findDeviceType) >=0) {\r\n return standardDeviceType;\r\n }\r\n\r\n if (mobileSizes.findIndex(findDeviceType) >=0) {\r\n return mobileDeviceType;\r\n }\r\n\r\n return standardDeviceType;\r\n});\r\n\r\nconst CustomComponent = (props) => {\r\n const {\r\n i18n,\r\n displayAd,\r\n updateValidation,\r\n oDataConfig,\r\n campaignId,\r\n cid,\r\n aid,\r\n permissions,\r\n serverContext,\r\n perfMarker,\r\n isLoadingImage,\r\n creativeEditorProps,\r\n onRenderCustomAddImageButton,\r\n } = props;\r\n\r\n const {\r\n displayImagePicker,\r\n setDisplayImagePicker,\r\n selectedMediaPanelSource,\r\n setSelectedMediaPanelSource,\r\n } = useImagePicker();\r\n\r\n const isDisplayImageRegroupEnabled = permissions && permissions.dynamic && permissions.dynamic.IsDisplayImageRegroupEnabled;\r\n const scenario = useContext(ScenarioContext);\r\n const instrumentation = useContext(InstrumentationContext);\r\n const [isImageEditDisplayed, setIsImageEditDisplayed] = useState(false);\r\n const [isDisplayTemplateEditorOpen, setIsDisplayTemplateEditorOpen] = useState(false);\r\n const classes = useDefaultStyles(getStyles);\r\n const preferenceService = useContext(PreferenceContext);\r\n\r\n const [deviceFormatType, setDeviceFormatType] = useState(standardDeviceType);\r\n const mediaRepository = useMemo(() => new MediaRepository({\r\n cid,\r\n aid,\r\n cmpId: campaignId,\r\n oDataConfig,\r\n }), [aid, campaignId, cid, oDataConfig]);\r\n\r\n const currentPlacementIndex = useMemo(() => {\r\n if (displayAd && displayAd.image && displayAd.image.targetWidth && displayAd.image.targetHeight) {\r\n const type = imageTypeFromImage(displayAd.image);\r\n const imagePlacementIndex = _.findIndex(displayAd.imagePlacements, placement => placement.type === type);\r\n return imagePlacementIndex;\r\n }\r\n return -1;\r\n }, [displayAd]);\r\n\r\n const copilotRepository = useCopilotRepositoryContext();\r\n const { brandKitDataService, brandkitApiState } = useBrandKitService();\r\n\r\n useEffect(() => {\r\n const shouldDirty = !(_.isUndefined(displayAd) || _.isNull(displayAd));\r\n if (isDisplayImageRegroupEnabled === true) {\r\n const deviceType = getImageTypeFromSize(displayAd);\r\n setDeviceFormatType(deviceType);\r\n }\r\n\r\n // update on mount.\r\n updateValidation(displayAd && (displayAd.image || isLoadingImage) ? validateImage(displayAd.image, i18n) : [i18n.getString(_TL_('Please add an image.'))], {\r\n image: displayAd ? displayAd.image : null,\r\n imagePlacements: displayAd ? displayAd.imagePlacements : null,\r\n creativeData: displayAd ? displayAd.creativeData : null,\r\n }, shouldDirty);\r\n }, [displayAd, i18n, isLoadingImage, updateValidation, isDisplayImageRegroupEnabled]);\r\n\r\n const onEdit = useCallback(() => {\r\n if (displayAd && displayAd.creativeData) {\r\n if (\r\n displayAd.creativeData.creativeMeta &&\r\n displayAd.creativeData.creativeMeta.template &&\r\n Number(displayAd.creativeData.creativeMeta.template.version) >= 1.2\r\n ) {\r\n setIsDisplayTemplateEditorOpen(true);\r\n } else {\r\n setDisplayImagePicker(true);\r\n }\r\n } else {\r\n setIsImageEditDisplayed(true);\r\n }\r\n }, [displayAd, setDisplayImagePicker]);\r\n\r\n const onRemoveImage = useCallback(() => {\r\n updateValidation([i18n.getString(_TL_('Please add an image.'))], {\r\n image: null,\r\n creativeData: null,\r\n });\r\n }, [i18n, updateValidation]);\r\n\r\n const dropdownOptions = useMemo(() => {\r\n if (isDisplayImageRegroupEnabled === true) {\r\n if (deviceFormatType === 'mobile') {\r\n return getMobileTargetOptions({\r\n i18n,\r\n sourceWidth: displayAd && displayAd.image ? displayAd.image.originalWidth : null,\r\n sourceHeight: displayAd && displayAd.image ? displayAd.image.originalHeight : null,\r\n });\r\n }\r\n\r\n return getStandardTargetOptions({\r\n i18n,\r\n sourceWidth: displayAd && displayAd.image ? displayAd.image.originalWidth : null,\r\n sourceHeight: displayAd && displayAd.image ? displayAd.image.originalHeight : null,\r\n });\r\n }\r\n\r\n return getTargetOptions({\r\n i18n,\r\n sourceWidth: displayAd && displayAd.image ? displayAd.image.originalWidth : null,\r\n sourceHeight: displayAd && displayAd.image ? displayAd.image.originalHeight : null,\r\n });\r\n }, [i18n, displayAd, deviceFormatType, isDisplayImageRegroupEnabled]);\r\n\r\n const deviceFormatOptions = useMemo(() => [\r\n {\r\n key: standardDeviceType,\r\n text: i18n.getString(_TL_('Standard')),\r\n }, {\r\n key: mobileDeviceType,\r\n text: i18n.getString(_TL_('Mobile')),\r\n },\r\n ], [i18n]);\r\n\r\n const onChangeTarget = useCallback((event, item, selectItem) => {\r\n const image = displayAd && displayAd.image ? displayAd.image : {};\r\n const currentItem = item || selectItem;\r\n if (image) {\r\n const imagePlacementIndex = _.findIndex(displayAd.imagePlacements, placement => placement.type === currentItem.key);\r\n if (imagePlacementIndex >=0) {\r\n const imageViewModel = imageModelToViewModel(displayAd.imagePlacements[imagePlacementIndex]);\r\n\r\n updateValidation([], {\r\n image: {\r\n ...imageViewModel,\r\n },\r\n imagePlacements: displayAd.imagePlacements,\r\n });\r\n }\r\n } else {\r\n updateValidation([i18n.getString(_TL_('Please add an image.'))], {\r\n image: {\r\n targetWidth: currentItem.width,\r\n targetHeight: currentItem.height,\r\n },\r\n });\r\n }\r\n }, [displayAd, i18n, updateValidation]);\r\n\r\n const selectedItem = useMemo(() => {\r\n if (displayAd && displayAd.image && displayAd.image.targetWidth && displayAd.image.targetHeight) {\r\n if (isDisplayImageRegroupEnabled === true) {\r\n const imageKey = imageTypeFromImage(displayAd.image);\r\n const target = dropdownOptions.find(option => option.key === imageKey);\r\n if (target) {\r\n return imageKey;\r\n }\r\n\r\n const firstItem = dropdownOptions.find(option => !option.itemType);\r\n if (firstItem) {\r\n firstItem.key;\r\n onChangeTarget(null, null, firstItem);\r\n }\r\n }\r\n\r\n return imageTypeFromImage(displayAd.image);\r\n }\r\n return undefined;\r\n }, [displayAd, dropdownOptions, onChangeTarget, isDisplayImageRegroupEnabled]);\r\n\r\n const minCropSize = useMemo(() => {\r\n if (displayAd && displayAd.imagePlacements && displayAd.imagePlacements[currentPlacementIndex]) {\r\n return constants.getMinimumSizeForImage(\r\n displayAd.imagePlacements[currentPlacementIndex].type,\r\n false,\r\n constants.defaultImageOption,\r\n false,\r\n false,\r\n true\r\n );\r\n }\r\n return null;\r\n }, [currentPlacementIndex, displayAd]);\r\n\r\n const baseImage = useMemo(() => {\r\n if (displayAd && displayAd.imagePlacements && displayAd.imagePlacements[currentPlacementIndex]) {\r\n const base = displayAd.imagePlacements[currentPlacementIndex];\r\n return {\r\n Type: base.type,\r\n Src: base.src,\r\n Width: base.width,\r\n Height: base.height,\r\n };\r\n }\r\n return null;\r\n }, [currentPlacementIndex, displayAd]);\r\n\r\n const onSaveEditImage = useCallback(({ cropSettings }) => {\r\n const base = displayAd.imagePlacements[currentPlacementIndex];\r\n\r\n base.cropSettings = cropSettings;\r\n\r\n updateValidation([], {\r\n image: {\r\n ...displayAd.image,\r\n cropWidth: cropSettings.SourceWidth,\r\n cropHeight: cropSettings.SourceHeight,\r\n cropX: cropSettings.SourceX,\r\n cropY: cropSettings.SourceY,\r\n },\r\n imagePlacements: displayAd.imagePlacements,\r\n creativeData: displayAd.creativeData,\r\n });\r\n\r\n setIsImageEditDisplayed(false);\r\n }, [currentPlacementIndex, displayAd, updateValidation]);\r\n\r\n const onNewImageSelected = useCallback((imagePlacements) => {\r\n if (imagePlacements && imagePlacements[0] && imagePlacements[0].creativeData) {\r\n updateValidation([], {\r\n ...imagePlacements[0],\r\n });\r\n } else {\r\n const newAdData = imagePlacementsToImage({ crops: imagePlacements[0] });\r\n updateValidation([], {\r\n ...newAdData.data,\r\n });\r\n }\r\n setDisplayImagePicker(false);\r\n }, [setDisplayImagePicker, updateValidation]);\r\n\r\n const placementTitle = useMemo(() => {\r\n if (!creativeEditorProps) {\r\n return '';\r\n }\r\n const { creativeData } = creativeEditorProps || {};\r\n\r\n const { creativeMeta } = creativeData || {};\r\n\r\n const { placement, template = {} } = creativeMeta || {};\r\n\r\n if (!placement) {\r\n const placementFromTemplate = getPlacementFromTemplate(template);\r\n\r\n return placements[placementFromTemplate].name;\r\n }\r\n return placements[placement].name;\r\n }, [creativeEditorProps]);\r\n\r\n const resizeImageHeightForThumbnail = useMemo(() => {\r\n if (displayAd && displayAd.image && displayAd.image.cropHeight && displayAd.image.cropWidth) {\r\n const aspectRatio = displayAd.image.cropWidth / displayAd.image.cropHeight;\r\n const maxWidth = 170;\r\n return Math.min(maxWidth / aspectRatio, 107);\r\n }\r\n return 0;\r\n }, [displayAd]);\r\n\r\n const imageControl = useMemo(() => {\r\n if (!displayAd) {\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n
\r\n
\r\n {!isLoadingImage && displayAd.image &&\r\n (\r\n \r\n )\r\n }\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n {\r\n creativeEditorProps ?\r\n \r\n {i18n.getString(placementTitle)}\r\n \r\n :\r\n
\r\n {isDisplayImageRegroupEnabled ===true &&\r\n (\r\n
\r\n
\r\n \r\n
\r\n setDeviceFormatType(item.key)}\r\n selectedKey={deviceFormatType}\r\n className={classes.choiceGroupStyles}\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 }, [classes.choiceGroupStyles, classes.buttonContainerStyle, classes.imageContainer, classes.rootContainer, isDisplayImageRegroupEnabled, deviceFormatType, deviceFormatOptions, creativeEditorProps, displayAd, dropdownOptions, i18n, isLoadingImage, onChangeTarget, onEdit, onRemoveImage, placementTitle, resizeImageHeightForThumbnail, selectedItem]);\r\n\r\n const AddImageButton = useMemo(() => {\r\n if (onRenderCustomAddImageButton) {\r\n return onRenderCustomAddImageButton({\r\n setDisplayImagePicker,\r\n });\r\n }\r\n\r\n return (\r\n setDisplayImagePicker(true)}\r\n />\r\n );\r\n }, [i18n, onRenderCustomAddImageButton, setDisplayImagePicker]);\r\n\r\n return (\r\n
\r\n
\r\n {displayAd && (displayAd.image || isLoadingImage) ?\r\n imageControl : AddImageButton\r\n }\r\n
\r\n 0 ? displayAd.FinalUrls[0] : null}\r\n creativeEditorProps={creativeEditorProps}\r\n />\r\n setIsImageEditDisplayed(false)}\r\n onApply={onSaveEditImage}\r\n mediaRepository={mediaRepository}\r\n aspectRatioConfig={AspectRatiosForDisplayAds}\r\n cropSettings={displayAd && displayAd.imagePlacements && displayAd.imagePlacements[currentPlacementIndex] ? displayAd.imagePlacements[currentPlacementIndex].cropSettings : null}\r\n minCropSize={minCropSize}\r\n baseImage={baseImage}\r\n hasRightRail\r\n onRenderRightRailContent={({\r\n previewImageUrl,\r\n cropSettings = {},\r\n }) => {\r\n const {\r\n SourceWidth, SourceX, SourceY,\r\n } = cropSettings || {};\r\n const aspectRatio = displayAd.image.cropWidth / displayAd.image.cropHeight;\r\n const maxWidth = 500;\r\n const resizeImageHeight = Math.min(maxWidth / aspectRatio, 600);\r\n\r\n return (\r\n \r\n );\r\n }}\r\n adCreatorScenario={{\r\n scenarioName: `${scenario.name}AdCreation`,\r\n scenarioValue: `${scenario.name}AdCreation`,\r\n }}\r\n isThumbsUpDownEnabled={serverContext.IsAADUser}\r\n isTestEnv={isTestEnvironment(document.domain)}\r\n disabledPivotItemKeys={[PivotItemKey.Effect]}\r\n customizedDefaultSelectedPivotItemKey={PivotItemKey.Crop}\r\n />\r\n {\r\n isDisplayTemplateEditorOpen &&\r\n 0 ? displayAd.FinalUrls[0] : null}\r\n showNavigation\r\n showSummaryBarControl\r\n preferenceService={preferenceService}\r\n displayTemplatesDataService={copilotRepository}\r\n isOpen={isDisplayTemplateEditorOpen}\r\n setIsOpen={setIsDisplayTemplateEditorOpen}\r\n imageData={{\r\n ...displayAd.image,\r\n metadata: displayAd.creativeData.creativeMeta,\r\n }}\r\n onApplyCreative={creativeEditorProps.onApplyCreative}\r\n scenario={scenario}\r\n aid={aid}\r\n cid={cid}\r\n sourceType={displayAd.image.originalSourceType}\r\n />\r\n }\r\n
\r\n );\r\n};\r\n\r\nCustomComponent.propTypes = {\r\n // onDataChange: PropTypes.func.isRequired,\r\n // idx: PropTypes.number.isRequired,\r\n displayAd: PropTypes.shape({\r\n FinalUrls: PropTypes.arrayOf(PropTypes.string),\r\n image: PropTypes.shape({\r\n src: PropTypes.string,\r\n originalWidth: PropTypes.number,\r\n originalHeight: PropTypes.number,\r\n cropWidth: PropTypes.number,\r\n cropHeight: PropTypes.number,\r\n cropX: PropTypes.number,\r\n cropY: PropTypes.number,\r\n targetHeight: PropTypes.number,\r\n targetWidth: PropTypes.number,\r\n }),\r\n imagePlacements: PropTypes.arrayOf(PropTypes.shape({\r\n src: PropTypes.string,\r\n width: PropTypes.number,\r\n height: PropTypes.number,\r\n type: PropTypes.string,\r\n cropSettings: PropTypes.shape({\r\n SourceX: PropTypes.number,\r\n SourceY: PropTypes.number,\r\n SourceWidth: PropTypes.number,\r\n SourceHeight: PropTypes.number,\r\n }),\r\n })),\r\n creativeData: PropTypes.shape({\r\n creativeMeta: PropTypes.shape({\r\n placement: PropTypes.string,\r\n template: PropTypes.shape({ version: PropTypes.string }),\r\n }),\r\n }),\r\n messages: PropTypes.arrayOf(PropTypes.string),\r\n }).isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n oDataConfig: PropTypes.shape({}).isRequired,\r\n campaignId: PropTypes.number.isRequired,\r\n cid: PropTypes.number.isRequired,\r\n aid: PropTypes.number.isRequired,\r\n perfMarker: PropTypes.shape({}).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n IsDisplayImageRegroupEnabled: PropTypes.bool,\r\n BrandKitUI: PropTypes.bool,\r\n }).isRequired,\r\n }).isRequired,\r\n serverContext: PropTypes.shape({\r\n IsAADUser: PropTypes.bool,\r\n }).isRequired,\r\n isLoadingImage: PropTypes.bool.isRequired,\r\n creativeEditorProps: PropTypes.shape({\r\n onApplyCreative: PropTypes.func,\r\n }),\r\n onRenderCustomAddImageButton: PropTypes.func,\r\n useBrandKit: PropTypes.bool,\r\n};\r\n\r\nCustomComponent.defaultProps = {\r\n creativeEditorProps: undefined,\r\n onRenderCustomAddImageButton: undefined,\r\n};\r\n\r\nconst ImageExperienceWithValidation = withServerContext(withControlErrorHandling(withUnvalidatedControlErrors(withError(withCustomValidation(CustomComponent)))));\r\n\r\nexport const ValidatedImageExperience = (props) => {\r\n const {\r\n displayAd, idx, i18n, ...rest\r\n } = props;\r\n\r\n const ImageProp = andComp(entityIsAd, propertyIs(`Image.ImageMedia_${idx}`));\r\n\r\n const dataObj = {\r\n image: (displayAd && displayAd.image) || null,\r\n imagePlacements: (displayAd && displayAd.imagePlacements) || null,\r\n };\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nValidatedImageExperience.propTypes = {\r\n displayAd: PropTypes.shape({\r\n image: PropTypes.shape({ }),\r\n imagePlacements: PropTypes.arrayOf(PropTypes.shape({})),\r\n messages: PropTypes.arrayOf(PropTypes.string),\r\n }).isRequired,\r\n idx: PropTypes.number.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n};\r\n","import React, { useMemo, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport _ from 'underscore';\r\nimport { Label, Stack } from '@bingads-webui-react/fabric-control';\r\nimport { ResponsiveAd } from '@bingads-webui/campaign-odata-schemas';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { mergeI18n } from '@bingads-webui-campaign-react/i18n-merger';\r\nimport { ValidationGroup, withCustomValidation, withError } from '@bingads-webui-react/validation';\r\nimport { withControlErrorHandling, withUnvalidatedControlErrors } from '@bingads-webui-campaign-react/error-handling';\r\nimport { ValidatedFinalUrl as UrlInput } from '@bingads-webui-campaign-react/validated-url-input';\r\nimport { IconButton } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { ThirdPartyMeasurementContainerWithValidation } from '@bingads-webui-campaign-react/third-party-measurement';\r\nimport { HelpPopupInline } from '@bingads-webui-react/help-popup';\r\nimport { AdvancedSettings } from '@bingads-webui-campaign-react/display-plus-native-ads';\r\n\r\nimport { ValidatedImageExperience } from './validated-image-experience';\r\nimport { getAdsStepStyles } from './styles';\r\n\r\nconst ValidatedFinalUrl = withControlErrorHandling(withUnvalidatedControlErrors(withError(withCustomValidation(UrlInput))));\r\n\r\nexport const DisplayAdPanel = ({\r\n i18n,\r\n perfMarker,\r\n cid,\r\n aid,\r\n campaignId,\r\n onUpdate,\r\n onRemovePanel,\r\n removeCloseButton,\r\n permissions,\r\n displayAd,\r\n keyIndex,\r\n isSelectedPanel,\r\n oDataConfig,\r\n customStyleFunction,\r\n useCustomStyleFunction,\r\n isLoadingImage,\r\n}) => {\r\n const defaultClasses = useDefaultStyles(getAdsStepStyles);\r\n\r\n const customClasses = useDefaultStyles(customStyleFunction);\r\n\r\n const classes = useCustomStyleFunction ? customClasses : defaultClasses;\r\n\r\n const legacyI18n = useMemo(() => window.globalLegacyI18n.get('$/i18n!legacy/global'), []);\r\n const i18nMerged = useMemo(() => mergeI18n(legacyI18n, i18n), [legacyI18n, i18n]);\r\n const finalUrlsObj = { FinalUrls: displayAd && displayAd.FinalUrls };\r\n\r\n const verifiedTrackingSettingObj = {\r\n VerifiedTrackingSettings: displayAd && displayAd.VerifiedTrackingSettings,\r\n };\r\n\r\n const isIasTrackingEnable = _.result(permissions.dynamic, 'EnableDisplayAdsIasTracking', false);\r\n const isAdvancedURLOptionsForMSANDisplayEnabled =\r\n _.result(permissions.dynamic, 'AdvancedURLOptionsForDisplay', false) &&\r\n _.result(permissions.dynamic, 'EnableMSANDisplayCampaigns', false);\r\n\r\n const isImpressionTrackingForDisplayAndVideoEnabled =\r\n _.result(permissions, 'isImpressionTrackingForDisplayAndVideoEnabled', false);\r\n\r\n const IsMOATEnabled = _.result(permissions, 'IsMOATEnabled', false);\r\n\r\n const onValidationUpdate = useCallback((result) => {\r\n onUpdate(result);\r\n }, [onUpdate]);\r\n\r\n const advancedSettings = useMemo(() => (\r\n \r\n ), [verifiedTrackingSettingObj.VerifiedTrackingSettings, displayAd]);\r\n\r\n return (\r\n
\r\n \r\n \r\n { !removeCloseButton &&\r\n
\r\n \r\n
\r\n }\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n { !(isAdvancedURLOptionsForMSANDisplayEnabled || isImpressionTrackingForDisplayAndVideoEnabled)\r\n && isIasTrackingEnable && (\r\n \r\n )}\r\n { (isAdvancedURLOptionsForMSANDisplayEnabled || isImpressionTrackingForDisplayAndVideoEnabled) && (\r\n
\r\n {advancedSettings}\r\n
\r\n )}\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nDisplayAdPanel.propTypes = {\r\n perfMarker: PropTypes.shape({}).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n EnableDisplayAdsIasTracking: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n cid: PropTypes.number.isRequired,\r\n aid: PropTypes.number.isRequired,\r\n campaignId: PropTypes.number.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n onUpdate: PropTypes.func.isRequired,\r\n onRemovePanel: PropTypes.func.isRequired,\r\n removeCloseButton: PropTypes.bool.isRequired,\r\n displayAd: PropTypes.shape([]).isRequired,\r\n keyIndex: PropTypes.number.isRequired,\r\n isSelectedPanel: PropTypes.bool.isRequired,\r\n oDataConfig: PropTypes.shape({}),\r\n customStyleFunction: PropTypes.func,\r\n useCustomStyleFunction: PropTypes.bool,\r\n isLoadingImage: PropTypes.bool.isRequired,\r\n};\r\n\r\nDisplayAdPanel.defaultProps = {\r\n oDataConfig: null,\r\n customStyleFunction: _.noop,\r\n useCustomStyleFunction: false,\r\n};\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React, { useState, useEffect, useContext, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { FontIcon } from '@bingads-webui-react/fabric-control';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport { Link, usePageManager } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { Pagination } from './pagination';\r\nimport { DisplayAdPanel } from './display-ad-panel';\r\nimport { getAdsStepStyles } from './styles';\r\n\r\nexport const DisplayAdsContainer = (props) => {\r\n const {\r\n aid,\r\n cid,\r\n i18n,\r\n perfMarker,\r\n onAdsValidation,\r\n currentImageIndex,\r\n ads = [],\r\n oDataConfig,\r\n disablePagination,\r\n permissions,\r\n customStyleFunction,\r\n useCustomStyleFunction,\r\n resetFields,\r\n isAdGridEditorMode,\r\n campaignId,\r\n isLoadingImage,\r\n initialAdsCount,\r\n } = props;\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const defaultClasses = useDefaultStyles(getAdsStepStyles);\r\n\r\n const customClasses = useDefaultStyles(customStyleFunction);\r\n\r\n const classes = useCustomStyleFunction ? customClasses : defaultClasses;\r\n\r\n const [DisplayAds, setDisplayAds] = useState(ads || []);\r\n\r\n const {\r\n goToNextPage,\r\n goToPrevPage,\r\n goToPage,\r\n getPageAdjustedIndex,\r\n currentPage,\r\n currentPageIndex,\r\n pages,\r\n onAddItem,\r\n removeItem,\r\n totalPages,\r\n maxItems,\r\n } = usePageManager(ads, initialAdsCount);\r\n\r\n const onAddAd = useCallback(() => {\r\n onAddItem();\r\n if (activity) {\r\n activity.signal(`Adding new ad panel - current total: ${currentPage.numberOfAdsInPage}`);\r\n }\r\n }, [activity, currentPage.numberOfAdsInPage, onAddItem]);\r\n\r\n const onImagePanelUpdate = (result, idx, uid) => {\r\n let itemAtIdx = DisplayAds[idx] || { image: null, FinalUrls: [], uid: null };\r\n\r\n if (!itemAtIdx.uid) {\r\n itemAtIdx = { ...result, uid, Id: itemAtIdx.Id };\r\n } else {\r\n itemAtIdx = { ...result, uid: itemAtIdx.uid, Id: itemAtIdx.Id };\r\n }\r\n\r\n const itemsBefore = DisplayAds.slice(0, idx);\r\n const itemsAfter = DisplayAds.slice(idx + 1, DisplayAds.length);\r\n setDisplayAds([...itemsBefore, { ...itemAtIdx }, ...itemsAfter]);\r\n };\r\n\r\n const onRemovePanel = (idx) => {\r\n if (activity) {\r\n activity.signal(`Removing ad panel at idx ${idx}`);\r\n }\r\n DisplayAds.splice(idx, 1);\r\n\r\n setDisplayAds([...DisplayAds]);\r\n\r\n removeItem();\r\n };\r\n\r\n const isAllValid = () => {\r\n let valid = true;\r\n // eslint-disable-next-line consistent-return\r\n _.each(DisplayAds, (ad) => {\r\n if (!ad.isValid) {\r\n valid = false;\r\n }\r\n });\r\n\r\n return valid;\r\n };\r\n\r\n const isAllDirty = () => {\r\n let dirty = false;\r\n // eslint-disable-next-line consistent-return\r\n _.each(DisplayAds, (ad) => {\r\n if (ad.isDirty) {\r\n dirty = true;\r\n }\r\n });\r\n\r\n return dirty;\r\n };\r\n\r\n useEffect(() => {\r\n const result = {\r\n data: [...DisplayAds], isValid: isAllValid(), isDirty: isAllDirty(), currentPageIndex,\r\n };\r\n onAdsValidation(result);\r\n if (activity) {\r\n activity.signal(`onDisplayAdsContainerValidated - ${JSON.stringify(result)}`);\r\n }\r\n // disabling exhaustive deps since the onAdsValidation value changes on each rerender.\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [currentPageIndex, DisplayAds]);\r\n\r\n useEffect(() => {\r\n if (resetFields) {\r\n setDisplayAds([]);\r\n }\r\n }, [resetFields]);\r\n\r\n useEffect(() => {\r\n setClarityTag('XandrDisplayAds', 'true');\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!_.isEqual(ads, DisplayAds) && !isAdGridEditorMode) {\r\n // check if ads has any ad that has id. (update scenario)\r\n let shouldUpdate = false;\r\n\r\n _.each(ads, (ad) => {\r\n const displayAd = _.filter(DisplayAds, vAd => vAd.uid === ad.uid);\r\n\r\n if (displayAd && displayAd[0] && _.isUndefined(displayAd[0].Id) && ad.Id) {\r\n shouldUpdate = true;\r\n }\r\n });\r\n\r\n if (shouldUpdate) {\r\n setDisplayAds(ads);\r\n }\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [ads]);\r\n\r\n return (\r\n
\r\n {\r\n _.map(pages, (page) => {\r\n const panels = _.map(_.range(page.numberOfAdsInPage), (idx) => {\r\n const displayAd = (DisplayAds[getPageAdjustedIndex(idx, page.pageNumber)] && DisplayAds[getPageAdjustedIndex(idx, page.pageNumber)].data);\r\n\r\n const uid = (DisplayAds[getPageAdjustedIndex(idx, page.pageNumber)] && DisplayAds[getPageAdjustedIndex(idx, page.pageNumber)].uid) || _.uniqueId('displayAd_');\r\n\r\n const isCurrentPage = page.id === currentPage.id;\r\n\r\n return (\r\n
\r\n onImagePanelUpdate(result, getPageAdjustedIndex(idx, page.pageNumber), uid)}\r\n onRemovePanel={() => onRemovePanel(getPageAdjustedIndex(idx, page.pageNumber), page)}\r\n removeCloseButton={page.numberOfAdsInPage === 1}\r\n keyIndex={uid}\r\n isSelectedPanel={currentImageIndex === idx}\r\n oDataConfig={oDataConfig}\r\n isLoadingImage={isLoadingImage}\r\n />\r\n
\r\n );\r\n });\r\n\r\n return panels;\r\n })\r\n }\r\n {\r\n (currentPage.numberOfAdsInPage < maxItems && !disablePagination && !_.isEmpty(DisplayAds)) &&\r\n
\r\n \r\n  {i18n.getString(_TL_('Create another ad'))}\r\n \r\n
\r\n }\r\n \r\n
\r\n );\r\n};\r\n\r\nDisplayAdsContainer.propTypes = {\r\n aid: PropTypes.number.isRequired,\r\n cid: PropTypes.number.isRequired,\r\n campaignId: PropTypes.number.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n perfMarker: PropTypes.shape({}).isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n onAdsValidation: PropTypes.func.isRequired,\r\n ads: PropTypes.shape({\r\n data: PropTypes.shape({}),\r\n }).isRequired,\r\n oDataConfig: PropTypes.shape({}),\r\n disablePagination: PropTypes.bool,\r\n customStyleFunction: PropTypes.func,\r\n useCustomStyleFunction: PropTypes.bool,\r\n resetFields: PropTypes.bool,\r\n currentImageIndex: PropTypes.number,\r\n isAdGridEditorMode: PropTypes.bool,\r\n isLoadingImage: PropTypes.bool,\r\n initialAdsCount: PropTypes.number,\r\n};\r\n\r\nDisplayAdsContainer.defaultProps = {\r\n oDataConfig: null,\r\n disablePagination: false,\r\n customStyleFunction: _.noop,\r\n useCustomStyleFunction: false,\r\n resetFields: false,\r\n currentImageIndex: 0,\r\n isAdGridEditorMode: false,\r\n isLoadingImage: false,\r\n initialAdsCount: 0,\r\n};\r\n","import React, { useContext } from 'react';\r\nimport { ValidationGroup } from '@bingads-webui-react/validation';\r\nimport { ValidatedLegacyCallToAction } from '@bingads-webui-campaign-react/legacy-call-to-action';\r\nimport { AssetGroup } from '@bingads-webui/campaign-odata-schemas';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { PermissionsContext } from '@bingads-webui-react/hoc-with-permissions';\r\n\r\nconst getStyles = () => ({\r\n container: {\r\n position: 'relative',\r\n },\r\n});\r\n\r\nexport const CTAInCreativeEditor = ({ newCTA, onValidate }) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const classes = useDefaultStyles(getStyles);\r\n\r\n const permissions = useContext(PermissionsContext);\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n","import { useContext, useCallback, useState } from 'react';\r\nimport { RecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { useCopilotRepositoryContext } from '@bingads-webui/inline-copilot';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { PermissionsContext } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { useCopilotLoggers } from '@bingads-webui-campaign-react/copilot-loggers';\r\nimport { isCopilotRegionRestricted } from '@bingads-webui-react/copilot-utils';\r\nimport { useBrandKitDataService } from '@bingads-webui-campaign-react/brandkit-data-service';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\n\r\nimport { processAndGroupAds, errors } from '../model/constants';\r\n\r\nconst formatReturnedSuggestions = suggestions => ({\r\n RecommendedAssets: {\r\n ImageAssets: suggestions.map(({ recommendationId }) =>\r\n ({ RecommendationId: recommendationId })),\r\n },\r\n});\r\n\r\nconst formatBrandkitForAPI = (obj) => {\r\n if (Array.isArray(obj)) {\r\n return obj.map(formatBrandkitForAPI);\r\n } else if (obj !== null && typeof obj === 'object') {\r\n const formattedObj = {};\r\n Object.keys(obj).forEach((key) => {\r\n if (key === 'Id') {\r\n formattedObj.Id = parseInt(obj[key], 10);\r\n } else if (key === 'SubType') {\r\n formattedObj.SubType = 'None';\r\n } else if (key !== 'Type') {\r\n formattedObj[key] = formatBrandkitForAPI(obj[key]);\r\n }\r\n });\r\n return formattedObj;\r\n }\r\n return obj;\r\n};\r\n\r\nexport const useDisplayAdsCopilot = () => {\r\n const [, setRecommendationContext] = useContext(RecommendationContext);\r\n const { logBannerGenerated } = useCopilotLoggers();\r\n const [isLoadingBrandKit, setIsLoadingBrandkit] = useState(false);\r\n const [brandkit, setBrandKit] = useState(null);\r\n const [isBrandKitEmpty, setIsBrandKitEmpty] = useState(true);\r\n const { scope } = useContext(ScopeContext) || {};\r\n\r\n const { aid } = scope.values;\r\n const permissions = useContext(PermissionsContext);\r\n const serverContext = useContext(ServerContext);\r\n const isBrandKitEnabled = permissions && permissions.dynamic && permissions.dynamic.BrandKitUI;\r\n\r\n const repository = useCopilotRepositoryContext();\r\n\r\n const {\r\n fetchDisplayAdsAssetRecommendations,\r\n fetchDisplayAdsTemplateDefinition,\r\n editDisplayAdsAssetRecommendations,\r\n finalUrl,\r\n } = repository;\r\n\r\n const { getBrandKitDataByAccId } = useBrandKitDataService();\r\n\r\n const fetchBrandKit = useCallback(async () => {\r\n if (isBrandKitEnabled) {\r\n const restrictionCall = isCopilotRegionRestricted({\r\n feature: 'Recommendations',\r\n permissions,\r\n serverContext,\r\n });\r\n setIsLoadingBrandkit(true);\r\n const response = await getBrandKitDataByAccId({ accId: aid });\r\n const isRestricted = await restrictionCall;\r\n if (!isRestricted) {\r\n const isBrandKitHavingData = response?.BrandKits?.[0] && Object.keys(response.BrandKits[0]).length > 0 && (response.BrandKits[0].Fonts?.length !== 0 ||\r\n response.BrandKits[0].Images?.length !== 0 ||\r\n response.BrandKits[0].LandscapeLogos?.length !== 0 ||\r\n response.BrandKits[0].Palettes?.length !== 0 ||\r\n response.BrandKits[0].SquareLogos?.length !== 0);\r\n if (isBrandKitHavingData) {\r\n setIsBrandKitEmpty(false);\r\n setClarityTag({ DisplayAdsWithBrandKit: 'true' });\r\n setBrandKit(formatBrandkitForAPI(response.BrandKits[0]));\r\n } else {\r\n setIsBrandKitEmpty(true);\r\n }\r\n setIsLoadingBrandkit(false);\r\n } else {\r\n setIsBrandKitEmpty(true);\r\n setIsLoadingBrandkit(false);\r\n }\r\n }\r\n }, [isBrandKitEnabled, getBrandKitDataByAccId, aid, serverContext, permissions, setBrandKit, setIsBrandKitEmpty]);\r\n\r\n const fetch = useCallback(async (count = 10, useBrandKit) => {\r\n if (!finalUrl) {\r\n return;\r\n }\r\n\r\n setRecommendationContext({\r\n isLoading: true,\r\n });\r\n\r\n if (!isLoadingBrandKit) {\r\n fetchDisplayAdsAssetRecommendations(count, (useBrandKit && brandkit) ? brandkit : null, isBrandKitEnabled ? '1.2' : '1.1').then((response) => {\r\n const { ImageAssets, Ads } = response;\r\n\r\n const {\r\n groupedAds,\r\n imagesToSuggest,\r\n } = processAndGroupAds(Ads);\r\n\r\n setRecommendationContext({\r\n ImageAssets,\r\n Ads,\r\n isLoading: false,\r\n finalUrl,\r\n groupedAds,\r\n imagesToSuggest,\r\n errorMessage: null,\r\n });\r\n\r\n logBannerGenerated(finalUrl, formatReturnedSuggestions(Ads));\r\n }).catch((e) => {\r\n if (e.message === 'NO_RECOMMENDATION') {\r\n setRecommendationContext({\r\n isLoading: false,\r\n finalUrl,\r\n imagesToSuggest: [],\r\n Ads: [],\r\n groupedAds: [],\r\n errorMessage: errors.NO_RECOMMENDATION,\r\n });\r\n }\r\n\r\n setRecommendationContext({\r\n isLoading: false,\r\n finalUrl,\r\n imagesToSuggest: [],\r\n Ads: [],\r\n groupedAds: [],\r\n errorMessage: (e && e.errors && e.errors[0] && errors[e.errors[0].target]) || errors.DEFAULT,\r\n });\r\n });\r\n }\r\n }, [fetchDisplayAdsAssetRecommendations, finalUrl, logBannerGenerated, brandkit, isLoadingBrandKit, setRecommendationContext, isBrandKitEnabled]);\r\n\r\n const fetchAigcTemplateDefinition = useCallback(templateId => fetchDisplayAdsTemplateDefinition(templateId)\r\n .then(response => response)\r\n .catch(err => ({ err })), [fetchDisplayAdsTemplateDefinition]);\r\n\r\n\r\n const generate = useCallback(ads => editDisplayAdsAssetRecommendations(ads).then((updatedCreative) => {\r\n const { Ads } = updatedCreative;\r\n\r\n return Ads && Ads[0];\r\n }), [editDisplayAdsAssetRecommendations]);\r\n\r\n return {\r\n fetch,\r\n fetchAigcTemplateDefinition,\r\n generate,\r\n finalUrlForCopilot: finalUrl,\r\n isBrandKitEmpty,\r\n fetchBrandKit,\r\n };\r\n};\r\n","import React, { useMemo, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport _ from 'underscore';\r\nimport { Label, Stack } from '@bingads-webui-react/fabric-control';\r\nimport { ResponsiveAd } from '@bingads-webui/campaign-odata-schemas';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { mergeI18n } from '@bingads-webui-campaign-react/i18n-merger';\r\nimport { ValidationGroup, withCustomValidation, withError } from '@bingads-webui-react/validation';\r\nimport { withControlErrorHandling, withUnvalidatedControlErrors } from '@bingads-webui-campaign-react/error-handling';\r\nimport { ValidatedFinalUrl as UrlInput } from '@bingads-webui-campaign-react/validated-url-input-fluent-v2';\r\nimport { IconButton } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { ThirdPartyMeasurementContainerWithValidation } from '@bingads-webui-campaign-react/third-party-measurement';\r\nimport { HelpPopupInline } from '@bingads-webui-react/help-popup';\r\nimport { Button, makeStyles } from '@fluentui/react-components';\r\nimport { AddRegular } from '@fluentui/react-icons';\r\nimport { AdvancedSettings } from '@bingads-webui-campaign-react/display-plus-native-ads';\r\n\r\nimport { ValidatedImageExperience } from './validated-image-experience';\r\nimport { getAdsStepStyles } from './styles';\r\nimport { CTAInCreativeEditor } from './validated-legacy-call-to-action';\r\nimport { useDisplayAdsCopilot } from './use-display-ads-copilot';\r\n\r\nconst useFluentV2Styles = makeStyles({\r\n button: {\r\n display: 'flex',\r\n 'flex-flow': 'column',\r\n },\r\n addIcon: {\r\n color: '#0078D4',\r\n fontSize: '32px',\r\n },\r\n});\r\n\r\nconst ValidatedFinalUrl = withControlErrorHandling(withUnvalidatedControlErrors(withError(withCustomValidation(UrlInput))));\r\n\r\nexport const DisplayAdPanelWithCopilot = ({\r\n i18n,\r\n perfMarker,\r\n cid,\r\n aid,\r\n campaignId,\r\n onUpdate,\r\n onRemovePanel,\r\n removeCloseButton,\r\n permissions,\r\n displayAd,\r\n useBrandKit,\r\n keyIndex,\r\n isSelectedPanel,\r\n oDataConfig,\r\n customStyleFunction,\r\n useCustomStyleFunction,\r\n isLoadingImage,\r\n}) => {\r\n const defaultClasses = useDefaultStyles(getAdsStepStyles);\r\n\r\n const customClasses = useDefaultStyles(customStyleFunction);\r\n\r\n const classes = useCustomStyleFunction ? customClasses : defaultClasses;\r\n\r\n const { generate, fetchAigcTemplateDefinition } = useDisplayAdsCopilot();\r\n\r\n const fluentV2Styles = useFluentV2Styles();\r\n\r\n const legacyI18n = useMemo(() => window.globalLegacyI18n.get('$/i18n!legacy/global'), []);\r\n const i18nMerged = useMemo(() => mergeI18n(legacyI18n, i18n), [legacyI18n, i18n]);\r\n const finalUrlsObj = { FinalUrls: displayAd && displayAd.FinalUrls };\r\n\r\n const verifiedTrackingSettingObj = {\r\n VerifiedTrackingSettings: displayAd && displayAd.VerifiedTrackingSettings,\r\n };\r\n\r\n const isIasTrackingEnable = _.result(permissions.dynamic, 'EnableDisplayAdsIasTracking', false);\r\n const isAdvancedURLOptionsForMSANDisplayEnabled =\r\n _.result(permissions.dynamic, 'AdvancedURLOptionsForDisplay', false) &&\r\n _.result(permissions.dynamic, 'EnableMSANDisplayCampaigns', false);\r\n\r\n const isImpressionTrackingForDisplayAndVideoEnabled =\r\n _.result(permissions, 'isImpressionTrackingForDisplayAndVideoEnabled', false);\r\n\r\n\r\n const IsMOATEnabled = _.result(permissions, 'IsMOATEnabled', false);\r\n\r\n const onValidationUpdate = useCallback((result) => {\r\n onUpdate(result);\r\n }, [onUpdate]);\r\n\r\n const advancedSettings = useMemo(() => (\r\n \r\n ), [verifiedTrackingSettingObj.VerifiedTrackingSettings, displayAd, isAdvancedURLOptionsForMSANDisplayEnabled]);\r\n\r\n const onCTAUpdate = useCallback((data, setCTA) => {\r\n if (!_.isEmpty(data)) {\r\n setCTA(data);\r\n }\r\n }, []);\r\n\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n const creativeEditorProps = useMemo(() => ({\r\n onRenderCTA: (newCTA, setCTA) => { onCTAUpdate(result.data, setCTA); }} />,\r\n onApplyCreative: ({\r\n imageObj,\r\n creativeMeta,\r\n }) => {\r\n onUpdate({\r\n data: {\r\n ...displayAd,\r\n image: imageObj,\r\n creativeData: {\r\n creativeMeta,\r\n },\r\n },\r\n isValid: true,\r\n isDirty: true,\r\n });\r\n },\r\n finalUrl: displayAd && displayAd.FinalUrls && displayAd.FinalUrls[0],\r\n creativeData: displayAd && displayAd.creativeData,\r\n onGenerateCreative: creativeDataInner => generate({\r\n template: {\r\n ...creativeDataInner,\r\n },\r\n }),\r\n fetchAigcTemplateDefinition,\r\n }), [displayAd, generate, fetchAigcTemplateDefinition, onCTAUpdate, onUpdate]);\r\n\r\n const onRenderCustomAddImageButton = useCallback(({ setDisplayImagePicker }) => (\r\n
\r\n \r\n
\r\n\r\n ), [classes.addNewImageButton, fluentV2Styles.addIcon, fluentV2Styles.button]);\r\n\r\n return (\r\n
\r\n \r\n \r\n { !removeCloseButton &&\r\n
\r\n \r\n
\r\n }\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n { !(isAdvancedURLOptionsForMSANDisplayEnabled || isImpressionTrackingForDisplayAndVideoEnabled) && isIasTrackingEnable && (\r\n \r\n )}\r\n { (isAdvancedURLOptionsForMSANDisplayEnabled || isImpressionTrackingForDisplayAndVideoEnabled) && (\r\n
\r\n {advancedSettings}\r\n
\r\n )}\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nDisplayAdPanelWithCopilot.propTypes = {\r\n perfMarker: PropTypes.shape({}).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n EnableDisplayAdsIasTracking: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n cid: PropTypes.number.isRequired,\r\n aid: PropTypes.number.isRequired,\r\n campaignId: PropTypes.number.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n onUpdate: PropTypes.func.isRequired,\r\n onRemovePanel: PropTypes.func.isRequired,\r\n removeCloseButton: PropTypes.bool.isRequired,\r\n displayAd: PropTypes.shape([]).isRequired,\r\n useBrandKit: PropTypes.bool,\r\n keyIndex: PropTypes.number.isRequired,\r\n isSelectedPanel: PropTypes.bool.isRequired,\r\n oDataConfig: PropTypes.shape({}),\r\n customStyleFunction: PropTypes.func,\r\n useCustomStyleFunction: PropTypes.bool,\r\n isLoadingImage: PropTypes.bool.isRequired,\r\n};\r\n\r\nDisplayAdPanelWithCopilot.defaultProps = {\r\n oDataConfig: null,\r\n customStyleFunction: _.noop,\r\n useCustomStyleFunction: false,\r\n};\r\n","import _ from 'underscore';\r\nimport React, { useCallback, useContext, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Panel, PanelType } from '@fluentui/react';\r\nimport { FluentProvider, webLightTheme } from '@fluentui/react-components';\r\n\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { useCopilotRepositoryContext } from '@bingads-webui/inline-copilot';\r\nimport { ViewAllRecommendations } from '@bingads-webui/inline-copilot-ui';\r\nimport { RecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\n\r\nimport { getAdsInMatchingGroup, getItemsForListFromGroupedAds } from '../model/constants';\r\n\r\n\r\nexport const AllRecommendationsPanel = ({ isOpen, onDismiss, onSelectImageSuggestion }) => {\r\n const i18n = useContext(I18nContext);\r\n const activity = useContext(ActivityContext);\r\n\r\n const [{ isLoading, groupedAds } = {}] = useContext(RecommendationContext);\r\n const { finalUrl } = useCopilotRepositoryContext();\r\n\r\n const images = useMemo(() => getItemsForListFromGroupedAds(groupedAds), [groupedAds]);\r\n\r\n const handleDismiss = useCallback(() => {\r\n if (activity) {\r\n activity.signal('[All Recommendations Panel] - Closing panel');\r\n }\r\n\r\n onDismiss();\r\n }, [activity, onDismiss]);\r\n\r\n const handleSelectImageSuggestion = useCallback((id) => {\r\n if (activity) {\r\n activity.signal(`[All Recommendations Panel] - Selecting image ${id}`);\r\n }\r\n\r\n const matchingAds = getAdsInMatchingGroup(groupedAds, id);\r\n\r\n onSelectImageSuggestion(matchingAds);\r\n onDismiss();\r\n }, [activity, groupedAds, onSelectImageSuggestion, onDismiss]);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nAllRecommendationsPanel.propTypes = {\r\n isOpen: PropTypes.bool.isRequired,\r\n onDismiss: PropTypes.func.isRequired,\r\n onSelectImageSuggestion: PropTypes.func.isRequired,\r\n};\r\n","const IMAGE_DIM = {\r\n width: 106,\r\n height: 76,\r\n marginRight: 8,\r\n};\r\n\r\nconst PaddleBottomValue = 18;\r\n\r\nexport const initialImageContainerLeftMargin = 10;\r\n\r\nexport const getFullyShownImagesCount = (width) => {\r\n if (!width) {\r\n return 0;\r\n }\r\n\r\n const itemWidth = IMAGE_DIM.width + IMAGE_DIM.marginRight;\r\n\r\n return Math.floor(width / itemWidth);\r\n};\r\n\r\nexport const getCarouselStyles = (components, { palette = {} } = {}, iconFontFamily = 'MsAds MDL2 Assets') => ({\r\n carouselParent: {\r\n position: 'relative',\r\n display: 'inline-flex',\r\n width: '100%',\r\n alignItems: 'end',\r\n },\r\n disabledCarouselParent: {\r\n pointerEvents: 'none',\r\n opacity: 0.4,\r\n },\r\n image: {\r\n ...IMAGE_DIM,\r\n boxShadow: '0px 0.3px 0.9px rgba(0, 0, 0, 0.1), 0px 1.6px 3.6px rgba(0, 0, 0, 0.13)',\r\n objectFit: 'cover',\r\n borderRadius: 6,\r\n },\r\n imageContainer: ({ imageContainerLeftMargin, isCollapsible }) => ({\r\n height: 80,\r\n overflowX: 'hidden',\r\n overflowY: 'hidden',\r\n display: 'flex',\r\n marginLeft: isCollapsible ? imageContainerLeftMargin : 0,\r\n flexGrow: 1,\r\n }),\r\n imageParentContainer: ({ imageParentLeftOffset, numberOfImages }) => ({\r\n width: (IMAGE_DIM.width + IMAGE_DIM.marginRight) * numberOfImages,\r\n position: 'relative',\r\n left: ((-1 * IMAGE_DIM.width) - IMAGE_DIM.marginRight) * imageParentLeftOffset,\r\n display: 'flex',\r\n columnGap: '10px',\r\n }),\r\n imageClickableContainer: {\r\n display: 'inline',\r\n width: 107,\r\n '& :hover': {\r\n cursor: 'pointer',\r\n },\r\n '& img': {\r\n verticalAlign: 'top',\r\n },\r\n },\r\n loadingMessageContainer: {\r\n marginTop: 16,\r\n marginLeft: 16,\r\n },\r\n loadingText: {\r\n display: 'inline-block',\r\n fontSize: '12px',\r\n lineHeight: '16px',\r\n verticalAlign: 'top',\r\n },\r\n panel: {},\r\n panelHeading: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n panelTitle: {\r\n flexGrow: 0,\r\n },\r\n panelIcon: {\r\n marginRight: 3,\r\n paddingBottom: 12,\r\n '&:before': {\r\n fontFamily: iconFontFamily,\r\n content: '\"\\\\E3AF\"',\r\n },\r\n },\r\n panelHelpButton: {\r\n display: 'flex',\r\n },\r\n imageHintRight: {\r\n display: 'inline-block',\r\n position: 'absolute',\r\n background: 'linear-gradient(270deg, #FFFFFF 0%, rgba(255, 255, 255, 0.927755) 18.23%, rgba(255, 255, 255, 0.776042) 48.44%, rgba(250, 249, 255, 0.5) 78.24%, rgba(255, 255, 255, 0) 100%)',\r\n width: 20,\r\n height: IMAGE_DIM.height,\r\n right: 32,\r\n },\r\n imageHintLeft: {\r\n display: 'inline-block',\r\n position: 'absolute',\r\n background: 'linear-gradient(270deg, #FFFFFF 0%, rgba(255, 255, 255, 0.927755) 18.23%, rgba(255, 255, 255, 0.776042) 48.44%, rgba(250, 249, 255, 0.5) 78.24%, rgba(255, 255, 255, 0) 100%)',\r\n width: 30,\r\n height: IMAGE_DIM.height,\r\n left: 34,\r\n transform: 'rotate(-180deg)',\r\n },\r\n paddleBtn: {\r\n bottom: PaddleBottomValue,\r\n },\r\n moreIcon: {\r\n fontSize: '18px',\r\n height: '60px',\r\n width: '33px',\r\n color: palette.themeDarkAlt,\r\n },\r\n seeAll: {\r\n display: 'inline-block',\r\n position: 'absolute',\r\n right: 0,\r\n bottom: 12,\r\n whiteSpace: 'nowrap',\r\n maxWidth: 50,\r\n overflow: 'hidden',\r\n textOverflow: 'ellipsis',\r\n },\r\n seeAllInHeader: {\r\n marginLeft: 'auto',\r\n '& a': {\r\n position: 'static',\r\n color: palette.themePrimary,\r\n fontSize: 12,\r\n '&:hover, $:acitve, $:focus': {\r\n color: palette.themeDarkAlt,\r\n },\r\n '&:hover': {\r\n backgroundColor: 'transparent',\r\n },\r\n },\r\n },\r\n useBrandKitHeader: {\r\n float: 'right',\r\n },\r\n spinner: {\r\n ...components.getBlockerStyle(16, palette),\r\n display: 'inline-block',\r\n lineHeight: '16px',\r\n },\r\n parentContainer: {\r\n '& $panel': { // need more selector specificity to override styles applied to top of grid panels\r\n marginLeft: 0,\r\n marginTop: 12,\r\n },\r\n '& $panelHeading': {\r\n border: 'none',\r\n '& $panelTitle.collapsible-title': {\r\n fontSize: '12px',\r\n fontWeight: 600,\r\n lineHeight: '24px',\r\n '& > a': {\r\n '& .helpbutton': {\r\n fontSize: '14px',\r\n lineHeight: '24px',\r\n display: 'inline',\r\n verticalAlign: 'bottom',\r\n },\r\n },\r\n marginTop: 0,\r\n },\r\n },\r\n '& + .alert-info': {\r\n marginTop: 8,\r\n '& a': {\r\n color: palette.themeDarkAlt,\r\n },\r\n },\r\n },\r\n});\r\n","import React, { useContext, useCallback, useState, useMemo, useEffect } from 'react';\r\nimport _ from 'underscore';\r\nimport classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport { RecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { ImageSuggestionCarousel } from '@bingads-webui-campaign-react/image-suggestion-carousel';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { PermissionsContext } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { Spinner } from '@fluentui/react-components';\r\nimport { Shimmer, ShimmerElementsGroup, ShimmerElementType, MessageBar, MessageBarType } from '@fluentui/react';\r\nimport { CroppedImageView } from '@bingads-webui-campaign-react/cropped-image-view';\r\nimport { useCopilotLoggers } from '@bingads-webui-campaign-react/copilot-loggers';\r\nimport { isCopilotRegionRestricted } from '@bingads-webui-react/copilot-utils';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { AllRecommendationsPanel } from './view-all-recommendations-panel';\r\nimport { getCarouselStyles, getFullyShownImagesCount, initialImageContainerLeftMargin } from './carousel-style';\r\nimport { getImageSuggestionCarouselStyles } from './styles';\r\n\r\nconst SuggestionViewImageCount = 5;\r\nconst MaxSuggestionsInCarousel = 15;\r\n\r\nconst LoadingShimmer = () => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const shimmerElements = useMemo(() => {\r\n const shimmerElement = [];\r\n\r\n _.each(_.range(SuggestionViewImageCount), () => {\r\n shimmerElement.push({ type: ShimmerElementType.line, height: 76, width: 106 });\r\n shimmerElement.push({ type: ShimmerElementType.gap, width: 10, height: 76 });\r\n });\r\n\r\n return shimmerElement;\r\n }, []);\r\n\r\n return (\r\n
\r\n \r\n } />\r\n
\r\n );\r\n};\r\n\r\nconst getImageDimension = src => new Promise((resolve) => {\r\n const img = new Image();\r\n img.src = src;\r\n img.onload = () => {\r\n const width = img.naturalWidth;\r\n const height = img.naturalHeight;\r\n\r\n resolve({\r\n imgWidth: width, imgHeight: height,\r\n });\r\n };\r\n});\r\n\r\nconst ImageView = ({ src }) => {\r\n const [width, setWidth] = useState(0);\r\n const [height, setHeight] = useState(0);\r\n\r\n const aspectRatio = width / height;\r\n const maxWidth = 107;\r\n\r\n const resizeHeight = Math.min(maxWidth / aspectRatio, 76);\r\n\r\n useEffect(() => {\r\n getImageDimension(src).then(({ imgWidth, imgHeight }) => {\r\n setWidth(imgWidth);\r\n setHeight(imgHeight);\r\n });\r\n }, [src]);\r\n\r\n if (!width || !height) {\r\n return
;\r\n }\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nImageView.propTypes = {\r\n src: PropTypes.string.isRequired,\r\n};\r\n\r\nexport const DisplayAdsImageSuggestionCarousel = ({\r\n maxUploadNum = 5,\r\n onSelectImageSuggestion,\r\n useBrandKit = false,\r\n isBrandKitEmpty,\r\n setUseBrandKit,\r\n}) => {\r\n const [isSeeAllPanelOpen, setIsSeeAllPanelOpen] = useState(false);\r\n const [imagesToSuggest, setImagesToSuggest] = useState([]);\r\n const [isCopilotEnabled, setIsCopilotEnabled] = useState(false);\r\n const activity = useContext(ActivityContext);\r\n\r\n const [recommendationContext, , reportRecommendations] = useContext(RecommendationContext);\r\n const { logSuggestionsViewed } = useCopilotLoggers();\r\n const permissions = useContext(PermissionsContext);\r\n const serverContext = useContext(ServerContext);\r\n const isBrandKitEnabled = permissions && permissions.dynamic && permissions.dynamic.BrandKitUI;\r\n\r\n const {\r\n imagesToSuggest: imageSuggestions,\r\n isLoading,\r\n groupedAds,\r\n errorMessage,\r\n } = recommendationContext || {};\r\n\r\n const i18n = useContext(I18nContext);\r\n\r\n const classes = useDefaultStyles(getImageSuggestionCarouselStyles);\r\n\r\n const { carouselState } = useMemo(() => ({\r\n carouselState: {\r\n carousel: {\r\n isError: _.isEmpty(imageSuggestions),\r\n },\r\n suggestion: {\r\n images: imageSuggestions,\r\n },\r\n },\r\n panelState: {\r\n panelImages: imageSuggestions,\r\n hasMore: false,\r\n },\r\n }), [imageSuggestions]);\r\n\r\n\r\n const { suggestion, carousel } = carouselState || {};\r\n const { images: suggestionImages } = suggestion || {};\r\n\r\n const onOffsetChange = useCallback((offset) => {\r\n const viewedImages = imagesToSuggest.slice(offset, offset + SuggestionViewImageCount);\r\n const suggestionIds = _.pluck(viewedImages, 'suggestionId');\r\n reportRecommendations({ view: suggestionIds });\r\n logSuggestionsViewed(suggestionIds);\r\n }, [imagesToSuggest, reportRecommendations, logSuggestionsViewed]);\r\n\r\n const onSelectImage = useCallback((fullUrl, index) => {\r\n // get all the groups for this base image.\r\n const allGroupedAds = groupedAds[fullUrl];\r\n\r\n // get thumbnail url from index\r\n const { thumbnailUrl } = imagesToSuggest[index];\r\n\r\n // find which group this thumbnail url belongs to\r\n const ads = _.find(allGroupedAds, group => _.find(group, ad => ad.url === thumbnailUrl));\r\n\r\n onSelectImageSuggestion(ads);\r\n }, [groupedAds, imagesToSuggest, onSelectImageSuggestion]);\r\n\r\n const onSelectSeeAllImages = useCallback(() => {\r\n const suggestionIds = suggestionImages.map(({ suggestionId }) => suggestionId);\r\n\r\n setIsSeeAllPanelOpen(true);\r\n logSuggestionsViewed(suggestionIds);\r\n }, [logSuggestionsViewed, suggestionImages]);\r\n\r\n const onRenderImage = useCallback((src, classesProp) => (\r\n
\r\n \r\n
\r\n ), [classes.croppedImage]);\r\n\r\n const onBrandKitToggle = useCallback((value) => {\r\n if (activity) {\r\n activity.signal(`[DisplayAdsCopilot] - useBrandKitToggle changed to ${value}`);\r\n }\r\n setUseBrandKit(value);\r\n }, [activity, setUseBrandKit]);\r\n\r\n useEffect(() => {\r\n const truncatedImages = _.isArray(suggestionImages) && suggestionImages.slice(0, MaxSuggestionsInCarousel);\r\n setImagesToSuggest(truncatedImages || []);\r\n }, [suggestionImages]);\r\n\r\n useEffect(() => {\r\n if (isBrandKitEnabled) {\r\n isCopilotRegionRestricted({\r\n feature: 'Recommendations',\r\n permissions,\r\n serverContext,\r\n }).then(isRestricted => setIsCopilotEnabled(!isRestricted));\r\n } else {\r\n setIsCopilotEnabled(false);\r\n }\r\n }, [isBrandKitEnabled, permissions, serverContext]);\r\n\r\n return (\r\n
\r\n { isLoading ?\r\n : (\r\n 0 ? imagesToSuggest : []}\r\n i18n={i18n}\r\n isEmpty={carousel && carousel.isError}\r\n onSelectImage={onSelectImage}\r\n onSelectSeeAll={onSelectSeeAllImages}\r\n showEllipsisWhenNoMoreImages\r\n showViewAllInHeader\r\n enableBrandKit={isBrandKitEnabled && !isBrandKitEmpty && isCopilotEnabled}\r\n useBrandKit={useBrandKit}\r\n setUseBrandKit={onBrandKitToggle}\r\n stylingOverrides={{\r\n getCarouselStyles,\r\n getFullyShownImagesCount,\r\n initialImageContainerLeftMargin,\r\n seeAllLinkText: _TL_('View all'),\r\n }}\r\n onOffsetChange={onOffsetChange}\r\n onRenderImage={onRenderImage}\r\n />\r\n )}\r\n {isSeeAllPanelOpen && (\r\n setIsSeeAllPanelOpen(false)}\r\n onSelectImageSuggestion={onSelectImageSuggestion}\r\n />\r\n )}\r\n {\r\n errorMessage && (\r\n \r\n {i18n.getString(errorMessage)}\r\n \r\n )\r\n }\r\n
\r\n );\r\n};\r\n\r\nDisplayAdsImageSuggestionCarousel.propTypes = {\r\n maxUploadNum: PropTypes.number.isRequired,\r\n onSelectImageSuggestion: PropTypes.func.isRequired,\r\n useBrandKit: PropTypes.bool,\r\n isBrandKitEmpty: PropTypes.bool,\r\n setUseBrandKit: PropTypes.func,\r\n};\r\n","import _ from 'underscore';\r\nimport React, { useContext, useState, useCallback, useEffect, useMemo } from 'react';\r\nimport {\r\n useId,\r\n Button,\r\n Toaster,\r\n useToastController,\r\n Toast,\r\n ToastTitle,\r\n ToastBody,\r\n Spinner,\r\n} from '@fluentui/react-components';\r\nimport { DismissRegular } from '@fluentui/react-icons';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ValidatedFinalUrl as UrlInput } from '@bingads-webui-campaign-react/validated-url-input-fluent-v2';\r\nimport { RecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { CopilotIcon } from '@bingads-webui-react/copilot-ui-base';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { useCopilotRepositoryContext } from '@bingads-webui/inline-copilot';\r\nimport { ValidationGroup, withCustomValidation, withError } from '@bingads-webui-react/validation';\r\nimport { getCreativeWorkbenchStyles } from './styles';\r\nimport { DisplayAdsImageSuggestionCarousel } from './display-ads-suggestion-carousel';\r\nimport { useDisplayAdsCopilot } from './use-display-ads-copilot';\r\n\r\n\r\nconst ValidatedFinalUrl = withError(withCustomValidation(UrlInput));\r\n\r\nexport const CreativeWorkbench = ({\r\n onFinalURLFocusOut,\r\n onCreateAds,\r\n isNewLogo,\r\n useBrandKit,\r\n setUseBrandKit,\r\n}) => {\r\n const [dataModel, setDataModel] = useState({\r\n data: {},\r\n });\r\n\r\n const toasterId = useId('toaster');\r\n const { dispatchToast, dismissToast, updateToast } = useToastController(toasterId);\r\n\r\n const classes = useDefaultStyles(getCreativeWorkbenchStyles);\r\n\r\n const [, setRecommendationContext] = useContext(RecommendationContext);\r\n const { finalUrl: finalUrlFromContext } = useCopilotRepositoryContext();\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const i18n = useContext(I18nContext);\r\n\r\n const FETCH_COUNT = 10;\r\n\r\n const { finalUrlForCopilot, fetch, isBrandKitEmpty, fetchBrandKit } = useDisplayAdsCopilot();\r\n\r\n const onValidate = (result) => {\r\n setDataModel(result);\r\n };\r\n\r\n const notifyFinalURLchange = () => {\r\n const isValid = _.result(dataModel, 'isValid', false);\r\n const finalUrls = _.result(dataModel, ['data', 'FinalUrls'], undefined);\r\n const finalUrl = _.first(finalUrls);\r\n\r\n if (isValid) {\r\n if (activity) {\r\n activity.signal(`[DisplayAdsCopilot] - Final URL changed to ${finalUrl}`);\r\n }\r\n\r\n onFinalURLFocusOut(finalUrl);\r\n }\r\n };\r\n\r\n const finalUrlValidationProps = {\r\n data: {\r\n FinalUrls: dataModel.data.FinalUrls,\r\n },\r\n initialValue: {\r\n FinalUrls: dataModel.data.FinalUrls,\r\n },\r\n };\r\n\r\n const addingRecommendationToast = useMemo(() => (\r\n \r\n }>\r\n {i18n.getString(_TL_('Adding recommendation'))}\r\n \r\n \r\n ), [i18n]);\r\n\r\n const errorOnCreateAdsToast = useMemo(() => (\r\n \r\n } onClick={() => dismissToast(toasterId)} />\r\n }\r\n >\r\n {i18n.getString(_TL_('Error adding recommendation'))}\r\n \r\n \r\n {i18n.getString(_TL_('An error occurred while adding the recommendation. Please try again later.'))}\r\n \r\n \r\n ), [dismissToast, i18n, toasterId]);\r\n\r\n const onSelectImageSuggestion = useCallback((ads) => {\r\n if (activity) {\r\n activity.signal(`[DisplayAdsCopilot] - User selected image suggestion - ${JSON.stringify(ads)}`);\r\n }\r\n\r\n if (ads && ads.length === 1) {\r\n dispatchToast(addingRecommendationToast, { toastId: toasterId, timeout: -1 });\r\n onCreateAds(ads)\r\n .then(() => dismissToast(toasterId))\r\n .catch((error) => {\r\n activity.error(`[DisplayAdsCopilot] - Error adding recommendation -- error: ${JSON.stringify(error)} -- ads: ${JSON.stringify(ads)}`);\r\n\r\n updateToast({\r\n content: errorOnCreateAdsToast,\r\n intent: 'error',\r\n toastId: toasterId,\r\n timeout: 5000,\r\n });\r\n });\r\n return;\r\n }\r\n\r\n setRecommendationContext({\r\n openRatioPicker: true,\r\n creatives: ads,\r\n });\r\n }, [activity, addingRecommendationToast, dismissToast, dispatchToast, errorOnCreateAdsToast, onCreateAds, setRecommendationContext, toasterId, updateToast]);\r\n\r\n useEffect(() => {\r\n if (finalUrlFromContext) {\r\n setDataModel({\r\n data: {\r\n FinalUrls: [finalUrlFromContext],\r\n },\r\n });\r\n }\r\n }, [finalUrlFromContext]);\r\n\r\n useEffect(() => {\r\n if (finalUrlForCopilot) {\r\n fetch(FETCH_COUNT, useBrandKit);\r\n }\r\n }, [fetch, finalUrlForCopilot, useBrandKit]);\r\n\r\n useEffect(() => {\r\n fetchBrandKit();\r\n }, []);\r\n\r\n return (\r\n
\r\n
\r\n \r\n {\r\n i18n.getString(_TL_('AI-generated creatives'))\r\n }\r\n
\r\n
\r\n {\r\n i18n.getString(_TL_('Our AI pulls text and images from your Final URL to automatically generate creatives for your ads.'))\r\n }\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nCreativeWorkbench.propTypes = {\r\n onFinalURLFocusOut: PropTypes.func.isRequired,\r\n onCreateAds: PropTypes.func.isRequired,\r\n isNewLogo: PropTypes.bool,\r\n useBrandKit: PropTypes.bool,\r\n setUseBrandKit: PropTypes.func,\r\n};\r\n\r\nCreativeWorkbench.defaultProps = {\r\n isNewLogo: false,\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React, { useContext, useCallback, useState, useEffect, useMemo } from 'react';\r\nimport _ from 'underscore';\r\nimport {\r\n Dialog, DialogSurface, DialogBody, DialogTitle, DialogTrigger, Button, DialogContent, DialogActions,\r\n Image, makeStyles, mergeClasses, shorthands, Badge, Checkbox, tokens, Spinner,\r\n} from '@fluentui/react-components';\r\nimport { Dismiss24Regular } from '@fluentui/react-icons';\r\nimport { RecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { useCopilotLoggers } from '@bingads-webui-campaign-react/copilot-loggers';\r\n\r\nimport { placements } from '../model/constants';\r\n\r\nconst useStyles = makeStyles({\r\n selectableImageContainer: {\r\n display: 'inline-block',\r\n position: 'relative',\r\n ...shorthands.padding('2px'),\r\n ...shorthands.border('2px', 'solid', tokens.colorTransparentBackground),\r\n },\r\n selectedImageContainer: {\r\n ...shorthands.border('2px', 'solid', tokens.colorPaletteBlueBorderActive),\r\n ...shorthands.borderRadius('4px'),\r\n },\r\n selectableImageList: {\r\n display: 'grid',\r\n gridTemplateColumns: '1fr 1fr',\r\n ...shorthands.gap('16px'),\r\n ...shorthands.margin('16px', '0px', '0px'),\r\n },\r\n ratioDescription: {\r\n position: 'absolute',\r\n bottom: '8px',\r\n left: '8px',\r\n },\r\n imageCheckbox: {\r\n position: 'absolute',\r\n top: '4px',\r\n right: '4px',\r\n },\r\n});\r\n\r\nconst SelectableImage = (props) => {\r\n const {\r\n id, src, description, size, onSelect, checked,\r\n } = props;\r\n\r\n const handleClick = useCallback(() => {\r\n onSelect(id);\r\n }, [id, onSelect]);\r\n\r\n const imageDimension = useMemo(() => {\r\n const dimensionList = size.split('x');\r\n const width = Number(dimensionList[0]);\r\n const height = Number(dimensionList[1]);\r\n\r\n // handle aspect ratio for portrait images\r\n if (height > width) {\r\n const maxHeightRatio = 500 / height;\r\n const maxWidthRatio = 250 / width;\r\n\r\n const ratio = Math.min(maxHeightRatio, maxWidthRatio);\r\n\r\n return {\r\n width: width * ratio,\r\n height: height * ratio,\r\n };\r\n }\r\n\r\n return null;\r\n }, [size]);\r\n\r\n const styles = useStyles();\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n {description}\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nSelectableImage.propTypes = {\r\n id: PropTypes.string.isRequired,\r\n src: PropTypes.string.isRequired,\r\n description: PropTypes.string.isRequired,\r\n size: PropTypes.string.isRequired,\r\n onSelect: PropTypes.func.isRequired,\r\n checked: PropTypes.bool.isRequired,\r\n};\r\n\r\nconst RatioPickerInternal = (props) => {\r\n const {\r\n open,\r\n creatives,\r\n onApply,\r\n onOpenChange,\r\n onApplyButtonText,\r\n } = props;\r\n const i18n = useContext(I18nContext);\r\n const [creativeSelections, setCreativeSelections] = useState(Array(creatives.length).fill(true));\r\n\r\n const [isApplying, setIsApplying] = useState(false);\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n // reset the selected creatives when the creatives change\r\n useEffect(() => {\r\n setCreativeSelections(creatives.map(() => true));\r\n }, [creatives]);\r\n\r\n const onRatioApply = useCallback(() => {\r\n const selectedCreatives = creatives.filter((creative, index) => creativeSelections[index]);\r\n\r\n setIsApplying(true);\r\n\r\n onApply(selectedCreatives).finally(() => {\r\n setIsApplying(false);\r\n if (activity) {\r\n activity.signal(`[DisplayAdsCopilot] - Successfully saved creatives - ${JSON.stringify(selectedCreatives)}`);\r\n }\r\n });\r\n }, [activity, creativeSelections, creatives, onApply]);\r\n\r\n const onImageSelect = useCallback((id) => {\r\n const index = creatives.findIndex(creative => creative.recommendationId === id);\r\n const newSelectedCreative = [...creativeSelections];\r\n newSelectedCreative[index] = !newSelectedCreative[index];\r\n\r\n setCreativeSelections(newSelectedCreative);\r\n }, [creatives, creativeSelections]);\r\n\r\n const styles = useStyles();\r\n\r\n return (\r\n {\r\n onOpenChange(data.open);\r\n }}\r\n >\r\n \r\n
\r\n \r\n \r\n }\r\n />\r\n \r\n }\r\n >\r\n {i18n.getString(_TL_('Which display placements do you want your creatives to serve in?'))}\r\n \r\n \r\n {i18n.getString(_TL_('Select the checkbox next to all the placements where you want your creatives to serve. Then, we\\'ll create your ads.'))}\r\n
\r\n {\r\n creatives.map((creative, index) => (\r\n \r\n ))\r\n }\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n selected) || isApplying}\r\n className=\"create-ads\"\r\n >\r\n {\r\n isApplying\r\n ? \r\n : onApplyButtonText || i18n.getString(_TL_('Create ads'))\r\n }\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n );\r\n};\r\n\r\nRatioPickerInternal.propTypes = {\r\n open: PropTypes.bool,\r\n creatives: PropTypes.arrayOf(PropTypes.shape({})),\r\n onApply: PropTypes.func.isRequired,\r\n onOpenChange: PropTypes.func.isRequired,\r\n onApplyButtonText: PropTypes.string,\r\n};\r\n\r\nRatioPickerInternal.defaultProps = {\r\n open: false,\r\n creatives: [],\r\n onApplyButtonText: undefined,\r\n};\r\n\r\nconst RatioPickerWithRecommendationContext = (props) => {\r\n const {\r\n onCreateAds,\r\n ...rest\r\n } = props;\r\n\r\n const [recommendationContext, setRecommendationContext] = useContext(RecommendationContext);\r\n const { logSuggestionsViewed } = useCopilotLoggers();\r\n\r\n const { openRatioPicker, creatives } = recommendationContext;\r\n\r\n const handleRatioPickerState = useCallback((state) => {\r\n setRecommendationContext({\r\n openRatioPicker: state,\r\n });\r\n }, [setRecommendationContext]);\r\n\r\n const onApply = useCallback(selectedCreatives => onCreateAds(selectedCreatives).then(() => handleRatioPickerState(false)), [onCreateAds, handleRatioPickerState]);\r\n\r\n useEffect(() => {\r\n if (_.isEmpty(creatives)) { return; }\r\n\r\n logSuggestionsViewed(creatives.map(creative => creative.recommendationId));\r\n }, [creatives, logSuggestionsViewed]);\r\n\r\n if (_.isEmpty(creatives)) {\r\n return null;\r\n }\r\n\r\n return (\r\n 0 ? creatives[0].recommendationId : 'empty'}\r\n creatives={creatives}\r\n open={openRatioPicker}\r\n onOpenChange={handleRatioPickerState}\r\n onApply={onApply}\r\n {...rest}\r\n />\r\n );\r\n};\r\n\r\nRatioPickerWithRecommendationContext.propTypes = {\r\n onCreateAds: PropTypes.func.isRequired,\r\n};\r\n\r\nexport const RatioPicker = RatioPickerWithRecommendationContext;\r\n","import React, { useCallback, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Button, Menu, MenuItem, MenuList, MenuPopover, MenuTrigger } from '@fluentui/react-components';\r\nimport { Add20Regular, Image20Regular, GlanceHorizontalSparkles20Regular } from '@fluentui/react-icons';\r\n\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\n\r\nexport const CreateAnotherAdMenu = ({\r\n onCreateWithAI,\r\n onCreateFromExistingImage,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n const activity = useContext(ActivityContext);\r\n\r\n const handleCreateWithAI = useCallback(() => {\r\n onCreateWithAI();\r\n\r\n if (activity) {\r\n activity.signal('[Creating another ad] - With AI');\r\n }\r\n }, [onCreateWithAI, activity]);\r\n\r\n const handleCreateFromExistingImage = useCallback(() => {\r\n onCreateFromExistingImage();\r\n\r\n if (activity) {\r\n activity.signal('[Creating another ad] - From existing image');\r\n }\r\n }, [onCreateFromExistingImage, activity]);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n } onClick={handleCreateWithAI}>\r\n {i18n.getString(_TL_('Create with AI'))}\r\n \r\n } onClick={handleCreateFromExistingImage}>\r\n {i18n.getString(_TL_('Use existing image'))}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nCreateAnotherAdMenu.propTypes = {\r\n onCreateWithAI: PropTypes.func.isRequired,\r\n onCreateFromExistingImage: PropTypes.func.isRequired,\r\n};\r\n","import _ from 'underscore';\r\nimport React, { useCallback, useContext, useEffect, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { useCopilotRepositoryContext } from '@bingads-webui/inline-copilot';\r\nimport { CreateDisplayAdDialog } from '@bingads-webui/inline-copilot-ui';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { RecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\n\r\nimport { getAdsInMatchingGroup, getItemsForListFromGroupedAds } from '../model/constants';\r\n\r\nexport const CreateAdWithAiDialog = ({\r\n isOpen,\r\n onDismiss,\r\n onFinalURLFocusOut,\r\n onCreateAds,\r\n}) => {\r\n const activity = useContext(ActivityContext);\r\n\r\n const [{ isLoading, groupedAds } = {}] = useContext(RecommendationContext);\r\n const { finalUrl: initialFinalUrl = '' } = useCopilotRepositoryContext();\r\n\r\n const [finalUrl, setFinalUrl] = useState(initialFinalUrl);\r\n const [images, setImages] = useState([]);\r\n const [selectedImages, setSelectedImages] = useState([]);\r\n\r\n const handleFinalUrlUpdate = useCallback((url) => {\r\n if (url === finalUrl) { return; }\r\n\r\n if (activity) {\r\n activity.signal('[Create Ad with AI dialog] - Updating Final URL');\r\n }\r\n\r\n setFinalUrl(url);\r\n setImages([]);\r\n setSelectedImages([]);\r\n\r\n onFinalURLFocusOut(url);\r\n }, [finalUrl, onFinalURLFocusOut, activity]);\r\n\r\n useEffect(() => {\r\n setImages(getItemsForListFromGroupedAds(groupedAds));\r\n }, [groupedAds]);\r\n\r\n const handleSelectImages = useCallback((ids) => {\r\n if (activity) {\r\n // ids and selectedImage should differ by one element, the last the user clicked\r\n const lastId = _.difference(_.union(ids, selectedImages), _.intersection(ids, selectedImages))[0];\r\n\r\n if (ids.includes(lastId)) {\r\n activity.signal(`[Create Ad with AI dialog] - Selecting image ${lastId}`);\r\n } else {\r\n activity.signal(`[Create Ad with AI dialog] - Deselecting image ${lastId}`);\r\n }\r\n }\r\n\r\n setSelectedImages(ids);\r\n }, [selectedImages, activity]);\r\n\r\n const handleCreateAds = useCallback((ids) => {\r\n if (activity) {\r\n activity.signal('[Create Ad with AI dialog] - Creating ads');\r\n }\r\n\r\n const matchingAds = _.chain(ids)\r\n .map(id => getAdsInMatchingGroup(groupedAds, id))\r\n .flatten()\r\n .value();\r\n\r\n return onCreateAds(matchingAds).then(onDismiss);\r\n }, [groupedAds, onCreateAds, onDismiss, activity]);\r\n\r\n const handleDismiss = useCallback(() => {\r\n if (activity) {\r\n activity.signal('[Create Ad with AI dialog] - Closing dialog');\r\n }\r\n\r\n onDismiss();\r\n }, [onDismiss, activity]);\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nCreateAdWithAiDialog.propTypes = {\r\n isOpen: PropTypes.bool.isRequired,\r\n onDismiss: PropTypes.func.isRequired,\r\n onFinalURLFocusOut: PropTypes.func.isRequired,\r\n onCreateAds: PropTypes.func.isRequired,\r\n};\r\n","import _ from 'underscore';\r\nimport { useCallback, useContext } from 'react';\r\n\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { RecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { useAssetLibraryImagePicker } from '@bingads-webui-campaign-react/add-image-hooks';\r\n\r\nconst getProcessedCreative = (finalUrl, image, creative) => ({\r\n data: {\r\n FinalUrls: [finalUrl],\r\n image,\r\n creativeData: {\r\n creativeId: image.id,\r\n creativeMeta: {\r\n ...creative,\r\n },\r\n },\r\n },\r\n});\r\n\r\nexport const useCreateAds = ({\r\n oDataConfig,\r\n permissions,\r\n aid,\r\n onCreateAds,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n const serverContext = useContext(ServerContext);\r\n const [{ finalUrl }] = useContext(RecommendationContext);\r\n\r\n const advertiserCustomerId = _.get(serverContext, ['CurrentAccount', 'AdvertiserCustomerID']);\r\n\r\n const {\r\n addCreatives: addToAssetLibrary,\r\n } = useAssetLibraryImagePicker({\r\n cid: advertiserCustomerId.toString(),\r\n aid: aid.toString(),\r\n oDataConfig,\r\n onNewImageSelected: _.noop,\r\n i18n,\r\n permissions,\r\n isDisplayAds: true,\r\n });\r\n\r\n return useCallback(creativesToAdd => addToAssetLibrary({ creativeData: creativesToAdd })\r\n .then((savedImages) => {\r\n const creatives = savedImages.map((savedImage, index) => getProcessedCreative(finalUrl, savedImage, creativesToAdd[index]));\r\n onCreateAds(creatives);\r\n return creatives;\r\n }), [addToAssetLibrary, finalUrl, onCreateAds]);\r\n};\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React, { useState, useEffect, useContext, useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport { usePageManager } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { CopilotRepositoryProvider } from '@bingads-webui/inline-copilot';\r\nimport { CampaignFetchProvider } from '@bingads-webui-campaign-react/campaign-http';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { useCopilotLoggers, useInitCopilotLoggers } from '@bingads-webui-campaign-react/copilot-loggers';\r\nimport { DisplayAdPanelWithCopilot } from './display-ad-panel-with-copilot';\r\nimport { Pagination } from './pagination';\r\nimport { CreativeWorkbench } from './creative-workbench';\r\nimport { getAdsStepStyles } from './styles';\r\nimport { addCreativesToDisplayAds } from '../model/utl';\r\nimport { RatioPicker } from './ratio-picker';\r\nimport { CreateAnotherAdMenu } from './create-another-ad-menu';\r\nimport { CreateAdWithAiDialog } from './create-ad-with-ai-dialog';\r\nimport { useCreateAds } from './use-create-ads';\r\n\r\nexport const DisplayAdsContainerWithCopilot = (props) => {\r\n const {\r\n aid,\r\n cid,\r\n i18n,\r\n perfMarker,\r\n onAdsValidation,\r\n currentImageIndex,\r\n ads = [],\r\n oDataConfig,\r\n disablePagination,\r\n permissions,\r\n customStyleFunction,\r\n useCustomStyleFunction,\r\n resetFields,\r\n isAdGridEditorMode,\r\n campaignId,\r\n isLoadingImage,\r\n initialAdsCount,\r\n hideFooter,\r\n } = props;\r\n\r\n const isEditScenario = useMemo(() => isAdGridEditorMode && ads && ads[0] && !!ads[0].Id, [ads, isAdGridEditorMode]);\r\n\r\n useInitCopilotLoggers({ campaignId, isEditScenario });\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const defaultClasses = useDefaultStyles(getAdsStepStyles);\r\n\r\n const customClasses = useDefaultStyles(customStyleFunction);\r\n\r\n const serverContext = useContext(ServerContext);\r\n\r\n const { logEnterFlow } = useCopilotLoggers();\r\n\r\n const classes = useCustomStyleFunction ? customClasses : defaultClasses;\r\n\r\n const [DisplayAds, setDisplayAds] = useState(ads);\r\n const [copilotFinalUrl, setCopilotFinalUrl] = useState();\r\n const [isCreateAdDialogOpen, setIsCreateAdDialogOpen] = useState(false);\r\n const [useBrandKit, setUseBrandKit] = useState(true);\r\n\r\n const {\r\n goToNextPage,\r\n goToPrevPage,\r\n goToPage,\r\n getPageAdjustedIndex,\r\n currentPage,\r\n currentPageIndex,\r\n onAddItem,\r\n pages,\r\n onAddItemsToPage,\r\n removeItem,\r\n totalPages,\r\n maxItems,\r\n } = usePageManager(ads, initialAdsCount);\r\n\r\n const onAddAd = useCallback(() => {\r\n onAddItem();\r\n if (activity) {\r\n activity.signal(`Adding new ad panel - current total: ${currentPage.numberOfAdsInPage}`);\r\n }\r\n }, [activity, currentPage.numberOfAdsInPage, onAddItem]);\r\n\r\n const onImagePanelUpdate = useCallback((result, idx, uid) => {\r\n let itemAtIdx = DisplayAds[idx] || { image: null, FinalUrls: [], uid: null };\r\n\r\n if (!itemAtIdx.uid) {\r\n itemAtIdx = { ...result, uid, Id: itemAtIdx.Id };\r\n } else {\r\n itemAtIdx = { ...result, uid: itemAtIdx.uid, Id: itemAtIdx.Id };\r\n }\r\n\r\n const itemsBefore = DisplayAds.slice(0, idx);\r\n const itemsAfter = DisplayAds.slice(idx + 1, DisplayAds.length);\r\n setDisplayAds([...itemsBefore, { ...itemAtIdx }, ...itemsAfter]);\r\n }, [DisplayAds]);\r\n\r\n const onRemovePanel = useCallback((idx) => {\r\n if (activity) {\r\n activity.signal(`Removing ad panel at idx ${idx}`);\r\n }\r\n DisplayAds.splice(idx, 1);\r\n\r\n setDisplayAds([...DisplayAds]);\r\n\r\n removeItem();\r\n }, [DisplayAds, activity, removeItem]);\r\n\r\n const isAllValid = () => {\r\n let valid = true;\r\n // eslint-disable-next-line consistent-return\r\n _.each(DisplayAds, (ad) => {\r\n if (!ad.isValid) {\r\n valid = false;\r\n }\r\n });\r\n\r\n return valid;\r\n };\r\n\r\n const isAllDirty = () => {\r\n let dirty = false;\r\n // eslint-disable-next-line consistent-return\r\n _.each(DisplayAds, (ad) => {\r\n if (ad.isDirty) {\r\n dirty = true;\r\n }\r\n });\r\n\r\n return dirty;\r\n };\r\n\r\n // method to create ads in the wizard.\r\n // ads should be an array of ads with entire ad object.\r\n // ads should have the assets already saved to asset library and image experience object.\r\n // ads: [{ data: { image: {..}, FinalUrls: [..], creativeData: {..} }}]\r\n const onCreateAds = useCallback((creatives) => {\r\n const newAds = addCreativesToDisplayAds({ displayAds: DisplayAds, creatives });\r\n\r\n // get total numeber of ads possible\r\n const totalAdsExculudingLastPage = pages.length > 1 ? (pages.length - 1) * 10 : 0;\r\n\r\n // current number of items\r\n const currentItemCount = totalAdsExculudingLastPage + pages[pages.length - 1].numberOfAdsInPage;\r\n\r\n if (newAds.length > currentItemCount) {\r\n onAddItemsToPage(newAds.length - currentItemCount);\r\n }\r\n\r\n if (activity) {\r\n activity.signal(`[DisplayAdsCopilot] - Adding new copilot recommended ads - ${creatives.length}`);\r\n }\r\n setDisplayAds(newAds);\r\n }, [DisplayAds, onAddItemsToPage, pages, activity]);\r\n\r\n const createAds = useCreateAds({\r\n oDataConfig,\r\n permissions,\r\n aid,\r\n onCreateAds,\r\n });\r\n\r\n useEffect(() => logEnterFlow(), [logEnterFlow]);\r\n\r\n useEffect(() => {\r\n const result = {\r\n data: [...DisplayAds], isValid: isAllValid(), isDirty: isAllDirty(), currentPageIndex,\r\n };\r\n onAdsValidation(result);\r\n if (activity) {\r\n activity.signal(`onDisplayAdsContainerValidated - ${JSON.stringify(result)}`);\r\n }\r\n // disabling exhaustive deps since the onAdsValidation value changes on each rerender.\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [currentPageIndex, DisplayAds]);\r\n\r\n useEffect(() => {\r\n if (resetFields) {\r\n setDisplayAds([]);\r\n }\r\n }, [resetFields]);\r\n\r\n useEffect(() => {\r\n setClarityTag('XandrDisplayAds', 'true');\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!_.isEqual(ads, DisplayAds) && !isAdGridEditorMode) {\r\n // check if ads has any ad that has id. (update scenario)\r\n let shouldUpdate = false;\r\n\r\n _.each(ads, (ad) => {\r\n const displayAd = _.filter(DisplayAds, vAd => vAd.uid === ad.uid);\r\n\r\n if (displayAd && displayAd[0] && _.isUndefined(displayAd[0].Id) && ad.Id) {\r\n shouldUpdate = true;\r\n }\r\n\r\n // For reload scenario if we can't find any ad in local state, refresh state\r\n if (permissions.dynamic.MultiAdFormat && _.isEmpty(displayAd) && ad.Id) {\r\n shouldUpdate = true;\r\n }\r\n });\r\n\r\n if (shouldUpdate) {\r\n setDisplayAds(ads);\r\n }\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [ads]);\r\n\r\n const onFinalURLFocusOut = (finalUrl) => {\r\n setCopilotFinalUrl(finalUrl);\r\n };\r\n const isNewLogo = _.get(permissions, ['dynamic', 'AdsCopilotUxImprovements']);\r\n\r\n const pageComponent = useMemo(() => (\r\n _.map(_.range(currentPage.numberOfAdsInPage), (idx) => {\r\n const displayAd = (DisplayAds[getPageAdjustedIndex(idx, currentPage.pageNumber)] && DisplayAds[getPageAdjustedIndex(idx, currentPage.pageNumber)].data);\r\n\r\n const uid = (DisplayAds[getPageAdjustedIndex(idx, currentPage.pageNumber)] && DisplayAds[getPageAdjustedIndex(idx, currentPage.pageNumber)].uid) || _.uniqueId('displayAd_');\r\n\r\n return (\r\n
\r\n onImagePanelUpdate(result, getPageAdjustedIndex(idx, currentPage.pageNumber), uid)}\r\n onRemovePanel={() => onRemovePanel(getPageAdjustedIndex(idx, currentPage.pageNumber), currentPage)}\r\n removeCloseButton={currentPage.numberOfAdsInPage === 1}\r\n keyIndex={uid}\r\n isSelectedPanel={currentImageIndex === idx}\r\n oDataConfig={oDataConfig}\r\n isLoadingImage={isLoadingImage}\r\n />\r\n
\r\n );\r\n })\r\n ), [DisplayAds, aid, campaignId, cid, currentImageIndex, currentPage, getPageAdjustedIndex, i18n, isLoadingImage, oDataConfig, onImagePanelUpdate, onRemovePanel, perfMarker, permissions]);\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n

\r\n {i18n.getString(_TL_('Your ads'))}\r\n

\r\n

\r\n {\r\n i18n.getString(_TL_('We create ads for you based on your assets. You can choose to add your own images below.'))\r\n }\r\n

\r\n
\r\n {pageComponent}\r\n {\r\n !hideFooter && (currentPage.numberOfAdsInPage < maxItems && !disablePagination && !_.isEmpty(DisplayAds)) &&\r\n
\r\n setIsCreateAdDialogOpen(true)}\r\n />\r\n
\r\n }\r\n {isCreateAdDialogOpen && (\r\n setIsCreateAdDialogOpen(false)}\r\n onFinalURLFocusOut={onFinalURLFocusOut}\r\n />\r\n )}\r\n \r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nDisplayAdsContainerWithCopilot.propTypes = {\r\n aid: PropTypes.number.isRequired,\r\n cid: PropTypes.number.isRequired,\r\n campaignId: PropTypes.number.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n perfMarker: PropTypes.shape({}).isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n onAdsValidation: PropTypes.func.isRequired,\r\n ads: PropTypes.shape({\r\n data: PropTypes.shape({}),\r\n }).isRequired,\r\n oDataConfig: PropTypes.shape({}),\r\n disablePagination: PropTypes.bool,\r\n customStyleFunction: PropTypes.func,\r\n useCustomStyleFunction: PropTypes.bool,\r\n resetFields: PropTypes.bool,\r\n currentImageIndex: PropTypes.number,\r\n isAdGridEditorMode: PropTypes.bool,\r\n isLoadingImage: PropTypes.bool,\r\n hideFooter: PropTypes.bool,\r\n initialAdsCount: PropTypes.number,\r\n};\r\n\r\nDisplayAdsContainerWithCopilot.defaultProps = {\r\n oDataConfig: null,\r\n disablePagination: false,\r\n customStyleFunction: _.noop,\r\n useCustomStyleFunction: false,\r\n resetFields: false,\r\n currentImageIndex: 0,\r\n isAdGridEditorMode: false,\r\n isLoadingImage: false,\r\n hideFooter: false,\r\n initialAdsCount: 0,\r\n};\r\n","import React from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { ErrorMessages } from '@bingads-webui-react/validation';\r\n// import { withComponentErrorLogging } from '@bingads-webui-campaign-react/global-error-options';\r\nimport { DisplayAdsContainer } from './display-ads-container';\r\nimport { AdPreview } from './ad-preview';\r\n\r\nconst getAdsStepStyles = (/* components, theme */) => ({\r\n displayAdPanelRoot: {\r\n marginTop: 20,\r\n width: 500,\r\n minHeight: 181,\r\n padding: 20,\r\n paddingBottom: 20,\r\n background: '#FFFFFF',\r\n boxShadow: '0px 2px 4px rgba(0, 0, 0, 0.1)',\r\n borderRadius: 6,\r\n '& .image-list-item-status-indicator': {\r\n background: 'linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%)',\r\n borderRadius: 6,\r\n width: '170px !important',\r\n height: '96px !important',\r\n paddingTop: '10px !important',\r\n '&:hover': {\r\n '& .edit-button': {\r\n display: 'none',\r\n },\r\n },\r\n '& .placeholder-content': {\r\n color: 'white !important',\r\n },\r\n },\r\n '& .error': {\r\n width: 400,\r\n marginTop: 20,\r\n float: 'left',\r\n },\r\n '& .image-experience-content': {\r\n width: 170,\r\n '& .col-sm-3': {\r\n background: 'linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%)',\r\n borderRadius: 6,\r\n width: '170px !important',\r\n height: '96px !important',\r\n paddingTop: '10px !important',\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n '&:hover': {\r\n '& .edit-button': {\r\n display: 'none',\r\n },\r\n },\r\n '& .placeholder-content': {\r\n color: 'white !important',\r\n },\r\n '& .ms-Button': {\r\n width: 56,\r\n height: 24,\r\n marginTop: 10,\r\n },\r\n '& .image-list-content': {\r\n width: '170px !important', // fixed for 16:9 aspect ratio\r\n border: 'none !important',\r\n padding: '0px !important',\r\n },\r\n },\r\n },\r\n '& .image-section-label': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '& .image-list-label': {\r\n fontWeight: 600,\r\n },\r\n '& .image-list-content': {\r\n width: '170px !important', // fixed for 16:9 aspect ratio\r\n border: 'none !important',\r\n padding: '0px !important',\r\n },\r\n '& .image-list-item-video': {\r\n position: 'relative',\r\n width: '170px !important', // fixed for 16:9 aspect ratio\r\n '&:hover': {\r\n '& .edit-button': {\r\n display: 'flex',\r\n },\r\n },\r\n '& .placeholder-content': {\r\n color: 'black !important',\r\n },\r\n\r\n },\r\n '& .image-item-ratio-label': {\r\n paddingTop: 10,\r\n },\r\n '& .thumbnail-preview': {\r\n borderRadius: 6,\r\n filter: 'drop-shadow(0px 0.6px 1.8px rgba(0, 0, 0, 0.1)) drop-shadow(0px 3.2px 7.2px rgba(0, 0, 0, 0.13))',\r\n width: '170px !important',\r\n height: '96px !important',\r\n },\r\n },\r\n selectedPanel: {\r\n border: '1px solid #0078D4',\r\n },\r\n displayAdPanelHeader: {\r\n display: 'flex',\r\n width: '100%',\r\n justifyContent: 'space-between',\r\n },\r\n displayAdPanelButton: {\r\n justifyContent: 'flex-end',\r\n display: 'none',\r\n cursor: 'pointer',\r\n borderRadius: 99,\r\n background: '#FFFFFF',\r\n width: 32,\r\n height: 32,\r\n },\r\n displayAdPanelButtonContainer: {\r\n position: 'absolute',\r\n left: '50%',\r\n top: '50%',\r\n transform: 'translate(-50%, -50%)',\r\n columnGap: '2px',\r\n display: 'flex',\r\n },\r\n adPreviewSizeTitle: {\r\n fontSize: 18,\r\n fontWeight: 600,\r\n },\r\n previewContainer: {\r\n height: 280,\r\n width: 498,\r\n },\r\n adPreviewSizeHeader: {\r\n height: 40,\r\n },\r\n adPreviewPanel: {\r\n width: 540,\r\n padding: 20,\r\n paddingBottom: 20,\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n justifyContent: 'center',\r\n },\r\n displayAd: {\r\n borderRadius: '6px',\r\n filter: 'drop-shadow(0px 0.6px 1.8px rgba(0, 0, 0, 0.1)) drop-shadow(0px 3.2px 7.2px rgba(0, 0, 0, 0.13))',\r\n },\r\n previewTag: {\r\n marginTop: 10,\r\n },\r\n emptyPreview: {\r\n width: '100%',\r\n height: '100%',\r\n backgroundColor: '#F3F2F1',\r\n borderRadius: 6,\r\n },\r\n pagination: {\r\n paddingTop: 10,\r\n width: '100%',\r\n },\r\n pageControls: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n columnGap: '10px',\r\n },\r\n paginationIndicatorDot: {\r\n height: 8,\r\n width: 8,\r\n borderRadius: '50%',\r\n display: 'inline-block',\r\n cursor: 'pointer',\r\n },\r\n paginationButton: {\r\n height: 8,\r\n width: 8,\r\n opacity: 0,\r\n },\r\n paginationIndicator: {\r\n display: 'flex',\r\n columnGap: '2px',\r\n },\r\n displayAdPanelContent: {\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n },\r\n placementInfoTile: {\r\n paddingTop: 20,\r\n marginLeft: 10,\r\n },\r\n});\r\n\r\nconst containerStyle = {\r\n display: 'flex',\r\n '& .image-list-content': {\r\n border: 'none !important',\r\n padding: '0px !important',\r\n },\r\n};\r\n\r\nexport const AdEditor = ({\r\n aid,\r\n cid,\r\n i18n,\r\n perfMarker,\r\n permissions,\r\n adsModel,\r\n onAdsValidation,\r\n oDataConfig,\r\n resetFields,\r\n serverErrors,\r\n isLoadingImage,\r\n}) => (\r\n
\r\n
\r\n \r\n error.message) : []} />\r\n
\r\n _.noop}\r\n ads={adsModel}\r\n disablePagination\r\n customStyleFunction={getAdsStepStyles}\r\n useCustomStyleFunction\r\n />\r\n
);\r\n\r\nAdEditor.propTypes = {\r\n containerStyle: PropTypes.shape({}).isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n aid: PropTypes.string.isRequired,\r\n cid: PropTypes.string.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n perfMarker: PropTypes.shape({}).isRequired,\r\n adsModel: PropTypes.shape({\r\n data: PropTypes.shape({}),\r\n }).isRequired,\r\n onAdsValidation: PropTypes.func.isRequired,\r\n oDataConfig: PropTypes.shape({}).isRequired,\r\n resetFields: PropTypes.bool.isRequired,\r\n serverErrors: PropTypes.shape({}),\r\n isLoadingImage: PropTypes.bool.isRequired,\r\n};\r\n\r\nAdEditor.defaultProps = {\r\n serverErrors: null,\r\n};\r\n\r\n/*\r\nconst AdEditorWithErrorLogging = withComponentErrorLogging(\r\n AdEditor,\r\n 'XandrVideoAdsAdEditing'\r\n);\r\n\r\nexport { AdEditorWithErrorLogging as AdEditor };\r\n*/\r\n","import React, { useState, useCallback, useContext, useMemo, useEffect } from 'react';\r\nimport classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { Stack } from '@fluentui/react';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { PerformanceMarkerContext } from '@bingads-webui-campaign-react/performance-marker-provider';\r\nimport { useFormService } from '@bingads-webui-react/form-core';\r\nimport { useWizardService, matchStepState, STEP_STATES } from '@bingads-webui-react/wizard';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { FormErrorGroup, UnmappedFormErrors } from '@bingads-webui-campaign-react/form-error';\r\nimport { AttentionBeaconGroup } from '@bingads-webui-campaign-react/attention-beacon';\r\nimport { ActuationGroup } from '@bingads-webui-campaign-react/actuator';\r\nimport { getODataConfig } from '../model/constants';\r\nimport { getDisplayAdStepBaseStyles } from './styles';\r\nimport { DisplayAdsContainerWithCopilot, AdPreview } from './index';\r\n\r\nconst StepHeader = ({\r\n title,\r\n description,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n return (\r\n \r\n

\r\n {i18n.getString(title)}\r\n

\r\n {description &&\r\n

\r\n {i18n.getString(description)}\r\n

\r\n }\r\n
\r\n );\r\n};\r\n\r\nStepHeader.propTypes = {\r\n title: PropTypes.string.isRequired,\r\n description: PropTypes.string.isRequired,\r\n};\r\n\r\nexport const DisplayAdsWithCopilot = ({\r\n data = {},\r\n onDataChange,\r\n error,\r\n isAdGridEditorMode,\r\n hideFooter,\r\n}) => {\r\n const {\r\n errors = [],\r\n } = error || {};\r\n\r\n const { scope } = useContext(ScopeContext) || {};\r\n const { cid, aid } = scope.values;\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const { state } = useWizardService();\r\n\r\n const classes = useDefaultStyles(getDisplayAdStepBaseStyles);\r\n\r\n const { campaign = {}, editingAdId } = state.context.wizardData;\r\n\r\n const { Id: campaignId } = campaign;\r\n\r\n const currentStates = state.toStrings()[1];\r\n\r\n const i18n = useContext(I18nContext);\r\n\r\n const serverContext = useContext(ServerContext);\r\n const { Permissions, DynamicPermissions } = serverContext || {};\r\n const permissions = useMemo(() => ({ dynamic: { ...DynamicPermissions }, ...Permissions }), [DynamicPermissions, Permissions]);\r\n\r\n const perfMarker = useContext(PerformanceMarkerContext);\r\n\r\n const [currentImageIndex, setCurrentImageIndex] = useState(0);\r\n\r\n const oDataConfig = useMemo(() => getODataConfig(serverContext), [serverContext]);\r\n\r\n const { state: { context: { saveFailed } } } = useFormService();\r\n\r\n\r\n const removeEmptyAds = newAdsData => newAdsData.filter(ad => !_.isEmpty(ad.data));\r\n\r\n const onAdsValidation = useCallback((results) => {\r\n const { data: newAdsData, ...restResults } = results;\r\n\r\n const newAds = removeEmptyAds(newAdsData);\r\n\r\n const dataPatch = {\r\n data: [\r\n ...newAds,\r\n ],\r\n ...restResults,\r\n };\r\n onDataChange({ data: dataPatch, isValid: dataPatch.isValid });\r\n }, [onDataChange]);\r\n\r\n useEffect(() => {\r\n if (activity && matchStepState(state, STEP_STATES.LOADING)) {\r\n activity.signal(`onDisplayAdsStepLoading - ${currentStates}`);\r\n }\r\n\r\n if (activity && matchStepState(state, STEP_STATES.SAVING)) {\r\n activity.signal(`onDisplayAdsStepSaving - ${currentStates}`);\r\n }\r\n }, [activity, currentStates, state]);\r\n\r\n return (\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n {\r\n data && data.data ? (\r\n \r\n ) : null\r\n }\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n );\r\n};\r\n\r\nDisplayAdsWithCopilot.propTypes = {\r\n data: PropTypes.shape({\r\n data: PropTypes.shape({}),\r\n }),\r\n onDataChange: PropTypes.func.isRequired,\r\n error: PropTypes.shape({\r\n errors: PropTypes.arrayOf(PropTypes.shape({})),\r\n }),\r\n isAdGridEditorMode: PropTypes.bool,\r\n hideFooter: PropTypes.bool,\r\n};\r\n\r\nDisplayAdsWithCopilot.defaultProps = {\r\n data: {},\r\n error: {},\r\n isAdGridEditorMode: false,\r\n hideFooter: false,\r\n};\r\n\r\n","import _ from 'underscore';\r\n\r\nexport function getVerifiedTrackingSettings(model) {\r\n const verifiedTrackingSettings = _.get(model, 'VerifiedTrackingSettings');\r\n\r\n if (!verifiedTrackingSettings || verifiedTrackingSettings.length === 0) {\r\n return {};\r\n }\r\n const results = [];\r\n\r\n verifiedTrackingSettings.forEach((setting) => {\r\n const vendor = _.get(setting, 'VerifiedTrackingVendor');\r\n\r\n if (!_.isString(vendor)) {\r\n return;\r\n }\r\n\r\n if (!_.isEqual(vendor, 'IAS') && !_.isEqual(vendor, 'MOAT')) {\r\n return;\r\n }\r\n\r\n const result = {};\r\n\r\n result.vendorName = vendor;\r\n if (_.isEqual(vendor, 'MOAT')) {\r\n results.push(result);\r\n return;\r\n }\r\n\r\n const data = _.get(setting, 'VerifiedTrackingData[0].Data');\r\n\r\n if (!_.isObject(data) || _.isEmpty(data)) {\r\n return;\r\n }\r\n\r\n const keys = _.get(data, 'Keys');\r\n\r\n if (!_.isArray(keys) || _.isEmpty(keys)) {\r\n return;\r\n }\r\n\r\n const values = _.get(data, 'Values');\r\n\r\n if (!_.isArray(values) || _.isEmpty(values)) {\r\n return;\r\n }\r\n\r\n const keyMap = { IAS_advertiserEntityId: 'advertiserEntityId', IAS_publisherEntityId: 'publisherEntityId' };\r\n\r\n\r\n _.each(keys, (key, index) => {\r\n if (keyMap[key]) {\r\n result[keyMap[key]] = values[index];\r\n }\r\n });\r\n results.push(result);\r\n });\r\n\r\n return { VerifiedTrackingSettings: results };\r\n}\r\n","import { useContext } from 'react';\r\nimport _ from 'underscore';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { saveAds } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { ActivityContext, ScenarioContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { useWizardService } from '@bingads-webui-react/wizard';\r\nimport { ImageRepository } from '@bingads-webui-campaign-react/image-experience';\r\nimport { constants, newImageFromMTObject } from '@bingads-webui-campaign-react/image-experience-model';\r\nimport { useCopilotLoggers } from '@bingads-webui-campaign-react/copilot-loggers';\r\nimport { getAutoCroppedImages } from '@bingads-webui-campaign/image-experience-utils';\r\nimport { parseSync } from '@bingads-webui/safe-json';\r\nimport { getODataConfig } from '../model/constants';\r\nimport { imagePlacementsToImage } from '../model/utl';\r\nimport { getVerifiedTrackingSettings } from '../model/verified-tracking-setting';\r\n\r\nexport const useDisplayAdsRepository = () => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const serverContext = useContext(ServerContext);\r\n const scenarioContext = useContext(ScenarioContext);\r\n\r\n const activity = useContext(ActivityContext);\r\n const { scope } = useContext(ScopeContext);\r\n const { state } = useWizardService();\r\n const { logSuggestionsApplied } = useCopilotLoggers();\r\n\r\n const advertiserCustomerId = _.get(serverContext, ['CurrentAccount', 'AdvertiserCustomerID']);\r\n\r\n const imageRepository = new ImageRepository(advertiserCustomerId, scope.values.aid, getODataConfig(serverContext));\r\n\r\n const load = () => {\r\n const initialAds = state.context.wizardData.savedAdModel;\r\n\r\n if (!initialAds) {\r\n return Promise.resolve({\r\n data: [\r\n {\r\n uid: Math.random(),\r\n data: {\r\n FinalUrls: [],\r\n image: null,\r\n },\r\n },\r\n ],\r\n });\r\n }\r\n const imageAsset = initialAds.Images[0].Asset;\r\n\r\n const verifiedTrackingSetting = getVerifiedTrackingSettings(initialAds);\r\n\r\n const imagePromise = imageRepository.getImageByIdAsync(imageAsset.IdString)\r\n .then((imgObjMT) => {\r\n const imageObject = newImageFromMTObject(imgObjMT, constants.imageSources.Existing);\r\n const croppedImagePlacements = getAutoCroppedImages({\r\n originalImageToCrop: imageObject,\r\n isMultimediaAd: false,\r\n isMultimediaAdinMSANEnabled: false,\r\n imageOption: constants.defaultImageOption,\r\n aspectRatioOption: constants.defaultAspectRatioOption,\r\n isDisplayAds: true,\r\n });\r\n const imageData = imagePlacementsToImage({\r\n crops: croppedImagePlacements,\r\n selected: {\r\n TargetWidth: imageAsset.TargetWidth,\r\n TargetHeight: imageAsset.TargetHeight,\r\n CropWidth: imageAsset.CropWidth,\r\n CropHeight: imageAsset.CropHeight,\r\n CropX: imageAsset.CropX,\r\n CropY: imageAsset.CropY,\r\n },\r\n });\r\n\r\n const metaData = imageObject.metadata;\r\n let uriDecodedMetaData = metaData;\r\n\r\n // while saving we only replace the ',' symbol with %2C. So we need to replace it back to ','\r\n if (metaData) {\r\n uriDecodedMetaData = metaData.replace(/%2C/g, ',');\r\n }\r\n\r\n const decodedMetadata = parseSync(uriDecodedMetaData);\r\n\r\n const creativeData = decodedMetadata ? {\r\n creativeId: imageAsset.IdString,\r\n creativeMeta: decodedMetadata,\r\n } : null;\r\n\r\n const { TrackingUrlTemplate, FinalUrlSuffix, UrlCustomParameters, ImpressionTrackingUrls } = initialAds;\r\n\r\n const savedAd = {\r\n data: [{\r\n uid: Math.random(),\r\n Id: initialAds.Id ? initialAds.Id : null,\r\n data: {\r\n FinalUrls: initialAds.Id ? initialAds && initialAds.FinalUrls : [],\r\n creativeData,\r\n ...imageData.data,\r\n ...verifiedTrackingSetting,\r\n TrackingUrlTemplate,\r\n FinalUrlSuffix,\r\n UrlCustomParameters,\r\n ImpressionTrackingUrls,\r\n },\r\n }],\r\n };\r\n\r\n return savedAd;\r\n });\r\n\r\n return imagePromise;\r\n };\r\n\r\n const save = ({ data }) => {\r\n const {\r\n isCreateAnother,\r\n onSave,\r\n onSaveAndCreateAnother,\r\n isMultiAdFormatAd,\r\n } = state.context.wizardData;\r\n\r\n return new Promise((resolve, reject) => {\r\n saveAds({\r\n ads: isMultiAdFormatAd ? { ...data, adSubType: 'Display' } : data,\r\n campaign: { Id: scope.values.campaignId },\r\n adGroup: { Id: scope.values.adGroupId },\r\n activity,\r\n }, { scenario: scenarioContext.name, i18n, activityLogger: activity }).then((result) => {\r\n if (isCreateAnother) {\r\n onSaveAndCreateAnother(result);\r\n } else {\r\n onSave(result);\r\n }\r\n\r\n const suggestionIds = _.chain(data.data)\r\n .map(ad => _.get(ad, 'data.creativeData.creativeMeta.recommendationId'))\r\n .compact()\r\n .value();\r\n\r\n logSuggestionsApplied(\r\n scope.values.campaignId,\r\n scope.values.adGroupId,\r\n undefined /* textSuggestions */,\r\n suggestionIds\r\n );\r\n\r\n resolve();\r\n }).catch(() => {\r\n reject();\r\n });\r\n });\r\n };\r\n\r\n return {\r\n load,\r\n save,\r\n };\r\n};\r\n","import React, { useContext, useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Stack, PrimaryButton, DefaultButton } from '@fluentui/react';\r\nimport {\r\n useWizardService,\r\n matchStepState,\r\n STEP_STATES,\r\n WIZARD_EVENTS,\r\n} from '@bingads-webui-react/wizard';\r\nimport { CancelButton } from '@bingads-webui-react/wizard-ui-library';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\n\r\nconst Save = () => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const { state, send } = useWizardService();\r\n const isBlocking = matchStepState(state, STEP_STATES.FETCHING) || matchStepState(state, STEP_STATES.LOADING) || matchStepState(state, STEP_STATES.SAVING);\r\n\r\n const onNextClicked = useCallback(() => {\r\n if (activity) {\r\n activity.signal('onSaveAndPublishClicked');\r\n }\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { isCreateAnother: false });\r\n send(WIZARD_EVENTS.SAVE_AND_EXIT);\r\n }, [activity, send]);\r\n\r\n const buttonText = useMemo(() => i18n.getString(_TL_('Save ad')), [i18n]);\r\n\r\n return (\r\n \r\n {buttonText}\r\n \r\n );\r\n};\r\n\r\nexport const SaveAndCreateAnother = () => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const { state, send } = useWizardService();\r\n const isBlocking = matchStepState(state, STEP_STATES.FETCHING) || matchStepState(state, STEP_STATES.LOADING) || matchStepState(state, STEP_STATES.SAVING);\r\n\r\n const onNextClicked = useCallback(() => {\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { isCreateAnother: true });\r\n send(WIZARD_EVENTS.SAVE_AND_NEXT);\r\n }, [send]);\r\n\r\n return (\r\n \r\n {i18n.getString(_TL_('Save & create another ad'))}\r\n \r\n );\r\n};\r\n\r\n\r\nexport const EditAdFooter = ({\r\n cancelButtonText,\r\n}) => (\r\n \r\n \r\n \r\n \r\n \r\n);\r\nEditAdFooter.propTypes = {\r\n cancelButtonText: PropTypes.string,\r\n};\r\nEditAdFooter.defaultProps = {\r\n cancelButtonText: undefined,\r\n};\r\n","import React, { useMemo, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { PerformanceMarkerProvider } from '@bingads-webui-campaign-react/performance-marker-provider';\r\nimport { Scenario, Activity } from '@bingads-webui-react/hoc-with-signal';\r\nimport { WizardPerfMarker } from '@bingads-webui-campaign/wizard-performance-marker';\r\nimport { InstrumentationContext } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport {\r\n Wizard,\r\n LayoutContainer,\r\n Layout,\r\n StepContainer,\r\n} from '@bingads-webui-react/wizard';\r\nimport {\r\n BusyBlocker,\r\n CancelWizardDialog,\r\n DefaultTemplate,\r\n} from '@bingads-webui-react/wizard-ui-library';\r\nimport { withLoggingContext } from '@bingads-webui-campaign-react/copilot-loggers';\r\nimport { withRecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { FluentProvider, webLightTheme } from '@fluentui/react-components';\r\nimport { DisplayAdsWithCopilot } from '../ad-components';\r\nimport { useDisplayAdsRepository } from './use-display-ads-repository';\r\nimport { EditAdFooter } from './edit-ad-footer';\r\n\r\nconst DISPLAY_AD = 'Display Ad';\r\n\r\nconst StepConfig = [{\r\n id: DISPLAY_AD,\r\n view: props => (\r\n \r\n \r\n \r\n ),\r\n repository: useDisplayAdsRepository,\r\n}];\r\n\r\nconst EditDisplayAdWizardInternal = ({\r\n gridData,\r\n perfMarker,\r\n onCancel,\r\n onSave,\r\n onSaveAndCreateAnother,\r\n isMultiAdFormatAd,\r\n}) => {\r\n const instrumentation = useContext(InstrumentationContext);\r\n\r\n const wizardPerfMarker = useMemo(() => (\r\n perfMarker.createChild('DisplayAdEditAdWizard')\r\n ), [perfMarker]);\r\n\r\n const config = useMemo(() => ({\r\n id: 'display-plus-wizard',\r\n initialStep: DISPLAY_AD,\r\n steps: StepConfig,\r\n actions: {\r\n onDone: () => { },\r\n onExited: () => onCancel(),\r\n },\r\n initialWizardData: {\r\n savedAdModel: gridData,\r\n onSave,\r\n onSaveAndCreateAnother,\r\n isMultiAdFormatAd,\r\n },\r\n attachStepActivities: false,\r\n }), [gridData, onCancel, onSave, onSaveAndCreateAnother, isMultiAdFormatAd]);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nEditDisplayAdWizardInternal.propTypes = {\r\n gridData: PropTypes.object.isRequired,\r\n perfMarker: PropTypes.object.isRequired,\r\n onCancel: PropTypes.func.isRequired,\r\n onSave: PropTypes.func.isRequired,\r\n onSaveAndCreateAnother: PropTypes.func.isRequired,\r\n isMultiAdFormatAd: PropTypes.bool,\r\n};\r\n\r\nEditDisplayAdWizardInternal.defaultProps = {\r\n isMultiAdFormatAd: false,\r\n};\r\n\r\nexport const EditDisplayAdWizard = withLoggingContext(withRecommendationContext(EditDisplayAdWizardInternal));\r\n","import { withSignal, CommonEventParser } from '@bingads-webui-react/hoc-with-signal';\r\nimport {\r\n PrimaryButton as FabricPrimaryButton,\r\n DefaultButton as FabricDefaultButton,\r\n Link as FabricLink,\r\n TextField as FabricTextField,\r\n IconButton as FabricIconButton,\r\n} from '@bingads-webui-react/fabric-control';\r\n\r\nexport const PrimaryButton = withSignal(FabricPrimaryButton, {\r\n onClick: CommonEventParser,\r\n});\r\n\r\nexport const DefaultButton = withSignal(FabricDefaultButton, {\r\n onClick: CommonEventParser,\r\n});\r\n\r\nexport const Link = withSignal(FabricLink, {\r\n onClick: CommonEventParser,\r\n});\r\n\r\nexport const TextField = withSignal(FabricTextField, {\r\n onChange: CommonEventParser,\r\n});\r\n\r\nexport const IconButton = withSignal(FabricIconButton, {\r\n onClick: CommonEventParser,\r\n});\r\n","export const getAdsStepStyles = (/* components, theme */) => ({\r\n videoPanelRoot: {\r\n marginTop: 20,\r\n width: 500,\r\n minHeight: 181,\r\n padding: 20,\r\n paddingBottom: 20,\r\n paddingTop: 10,\r\n background: '#FFFFFF',\r\n boxShadow: '0px 2px 4px rgba(0, 0, 0, 0.1)',\r\n borderRadius: 6,\r\n '& .image-list-item-status-indicator': {\r\n background: 'linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%)',\r\n borderRadius: 6,\r\n width: '170px !important',\r\n height: '96px !important',\r\n paddingTop: '10px !important',\r\n '&:hover': {\r\n '& .edit-button': {\r\n display: 'none',\r\n },\r\n },\r\n '& .placeholder-content': {\r\n color: 'white !important',\r\n },\r\n },\r\n '& .error': {\r\n marginTop: 20,\r\n },\r\n '& .image-experience-content': {\r\n width: 170,\r\n '& .col-sm-3': {\r\n background: 'linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%)',\r\n borderRadius: 6,\r\n width: '170px !important',\r\n height: '96px !important',\r\n paddingTop: '10px !important',\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n '&:hover': {\r\n '& .edit-button': {\r\n display: 'none',\r\n },\r\n },\r\n '& .placeholder-content': {\r\n color: 'white !important',\r\n },\r\n '& .ms-Button': {\r\n width: 56,\r\n height: 24,\r\n marginTop: 10,\r\n },\r\n },\r\n '& .add-image-button': {\r\n border: '1px solid #8a8886',\r\n background: '#FFFFFF !important',\r\n fontWeight: 600,\r\n borderRadius: 2,\r\n '&:before': {\r\n content: '\"\\\\E710\"',\r\n color: '#0078D4',\r\n marginRight: 8,\r\n fontFamily: 'MsAds MDL2 Assets',\r\n },\r\n },\r\n },\r\n '& .image-section-label': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '& .image-list-label': {\r\n fontWeight: 600,\r\n },\r\n '& .image-list-content': {\r\n width: '170px !important', // fixed for 16:9 aspect ratio\r\n border: 'none !important',\r\n padding: '0px !important',\r\n },\r\n '& .image-list-item-video': {\r\n position: 'relative',\r\n backgroundColor: 'none !important',\r\n width: '170px !important', // fixed for 16:9 aspect ratio\r\n '&:hover': {\r\n '& .edit-button': {\r\n display: 'flex',\r\n },\r\n },\r\n '& .placeholder-content': {\r\n color: 'black !important',\r\n },\r\n\r\n },\r\n '& .image-item-ratio-label': {\r\n paddingTop: 10,\r\n },\r\n '& .thumbnail-preview': {\r\n borderRadius: 6,\r\n filter: 'drop-shadow(0px 0.6px 1.8px rgba(0, 0, 0, 0.1)) drop-shadow(0px 3.2px 7.2px rgba(0, 0, 0, 0.13))',\r\n width: '170px !important',\r\n height: '96px !important',\r\n },\r\n },\r\n videoRepairPanelRoot: {\r\n marginTop: 20,\r\n width: 800,\r\n minHeight: 181,\r\n padding: 20,\r\n paddingBottom: 20,\r\n paddingTop: 10,\r\n background: '#FFFFFF',\r\n boxShadow: '0px 2px 4px rgba(0, 0, 0, 0.1)',\r\n borderRadius: 6,\r\n '& .image-list-item-status-indicator': {\r\n background: 'linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%)',\r\n borderRadius: 6,\r\n width: '170px !important',\r\n height: '96px !important',\r\n paddingTop: '10px !important',\r\n '&:hover': {\r\n '& .edit-button': {\r\n display: 'none',\r\n },\r\n },\r\n '& .placeholder-content': {\r\n color: 'white !important',\r\n },\r\n },\r\n '& .error': {\r\n marginTop: 20,\r\n },\r\n '& .image-experience-content': {\r\n width: 170,\r\n '& .col-sm-3': {\r\n background: 'linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%)',\r\n borderRadius: 6,\r\n width: '170px !important',\r\n height: '96px !important',\r\n paddingTop: '10px !important',\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n '&:hover': {\r\n '& .edit-button': {\r\n display: 'none',\r\n },\r\n },\r\n '& .placeholder-content': {\r\n color: 'white !important',\r\n },\r\n '& .ms-Button': {\r\n width: 56,\r\n height: 24,\r\n marginTop: 10,\r\n },\r\n },\r\n '& .add-image-button': {\r\n border: '1px solid #8a8886',\r\n background: '#FFFFFF !important',\r\n fontWeight: 600,\r\n borderRadius: 2,\r\n '&:before': {\r\n content: '\"\\\\E710\"',\r\n color: '#0078D4',\r\n marginRight: 8,\r\n fontFamily: 'MsAds MDL2 Assets',\r\n },\r\n },\r\n },\r\n '& .image-section-label': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '& .image-list-label': {\r\n fontWeight: 600,\r\n },\r\n '& .image-list-content': {\r\n width: '170px !important', // fixed for 16:9 aspect ratio\r\n border: 'none !important',\r\n padding: '0px !important',\r\n },\r\n '& .image-list-item-video': {\r\n position: 'relative',\r\n backgroundColor: 'none !important',\r\n width: '170px !important', // fixed for 16:9 aspect ratio\r\n '&:hover': {\r\n '& .edit-button': {\r\n display: 'flex',\r\n },\r\n },\r\n '& .placeholder-content': {\r\n color: 'black !important',\r\n },\r\n\r\n },\r\n '& .image-item-ratio-label': {\r\n paddingTop: 10,\r\n },\r\n '& .thumbnail-preview': {\r\n borderRadius: 6,\r\n filter: 'drop-shadow(0px 0.6px 1.8px rgba(0, 0, 0, 0.1)) drop-shadow(0px 3.2px 7.2px rgba(0, 0, 0, 0.13))',\r\n width: '170px !important',\r\n height: '96px !important',\r\n },\r\n },\r\n selectedPanel: {\r\n border: '1px solid #0078D4',\r\n },\r\n videoPanelHeader: {\r\n display: 'flex',\r\n width: '100%',\r\n justifyContent: 'flex-end',\r\n height: 5,\r\n },\r\n adPreviewTitle: {\r\n fontSize: 18,\r\n fontWeight: 600,\r\n },\r\n previewContainer: {\r\n width: '100%',\r\n },\r\n adPreviewHeader: {\r\n height: 40,\r\n },\r\n adPreviewRoot: {\r\n maxWidth: '540px',\r\n width: '100%',\r\n padding: 20,\r\n paddingBottom: 20,\r\n position: 'sticky',\r\n top: '0px',\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n },\r\n video: {\r\n borderRadius: '6px',\r\n filter: 'drop-shadow(0px 0.6px 1.8px rgba(0, 0, 0, 0.1)) drop-shadow(0px 3.2px 7.2px rgba(0, 0, 0, 0.13))',\r\n },\r\n previewTag: {\r\n marginTop: 10,\r\n },\r\n pagination: {\r\n paddingTop: 10,\r\n width: '100%',\r\n },\r\n pageControls: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n columnGap: '10px',\r\n },\r\n paginationIndicatorDot: {\r\n height: 8,\r\n width: 8,\r\n borderRadius: '50%',\r\n display: 'inline-block',\r\n cursor: 'pointer',\r\n },\r\n paginationButton: {\r\n height: 8,\r\n width: 8,\r\n opacity: 0,\r\n },\r\n paginationIndicator: {\r\n display: 'flex',\r\n columnGap: '2px',\r\n },\r\n videoPanelContent: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n },\r\n placementInfoTile: {\r\n paddingTop: 20,\r\n marginLeft: 10,\r\n },\r\n placementInfos: {\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n columnGap: 10,\r\n rowGap: '5px',\r\n alignItems: 'center',\r\n },\r\n enabledPlacement: {\r\n backgroundColor: '#DFF6DD',\r\n padding: '3px 5px',\r\n borderRadius: 4,\r\n },\r\n enabledText: {\r\n color: '#0C5E0C',\r\n fontWeight: 600,\r\n display: 'flex',\r\n alignItems: 'center',\r\n columnGap: 5,\r\n },\r\n disabledPlacement: {\r\n backgroundColor: '#F3F2F1',\r\n padding: '3px 5px',\r\n borderRadius: 4,\r\n },\r\n disabledText: {\r\n color: '#605E5C',\r\n fontWeight: 600,\r\n display: 'flex',\r\n alignItems: 'center',\r\n columnGap: 5,\r\n },\r\n fontStyle: {\r\n fontSize: 14,\r\n fontWeight: 600,\r\n },\r\n placementLabel: {\r\n paddingTop: 0,\r\n paddingBottom: 0,\r\n },\r\n placmentResolution: {\r\n paddingTop: 5,\r\n paddingBottom: 5,\r\n },\r\n videoPanelFinalUrlContainer: {\r\n width: 45,\r\n },\r\n starStyle: {\r\n fontSize: 20,\r\n },\r\n});\r\n\r\nexport const getImageSuggestionCarouselStyles = () => ({\r\n imageSuggestionCarouselRoot: {\r\n '& .image-suggestion-carousel-root': {\r\n '& .panel': {\r\n backgroundColor: 'transparent',\r\n\r\n '& .helpbutton': {\r\n margin: '4px 0px',\r\n },\r\n },\r\n },\r\n marginTop: 10,\r\n },\r\n croppedImage: {\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n width: '107px',\r\n height: '76px',\r\n background: '#F3F2F1',\r\n },\r\n});\r\n","/* eslint-disable jsx-a11y/no-static-element-interactions */\r\n/* eslint-disable jsx-a11y/anchor-is-valid */\r\n/* eslint-disable jsx-a11y/media-has-caption */\r\nimport React, { useRef, useEffect, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { Text, FontIcon } from '@bingads-webui-react/fabric-control';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { ClipchampPlayer } from '@bingads-webui-campaign-react/clipchamp-player';\r\nimport { Link } from '../common/shared-components';\r\nimport { getAdsStepStyles } from './styles';\r\n\r\nconst ITEMS_PER_PAGE = 10;\r\n\r\nexport const AdPreview = (props) => {\r\n const {\r\n i18n,\r\n ads,\r\n onUpdateCurrentVideoIndex,\r\n disablePagination,\r\n customStyleFunction,\r\n useCustomStyleFunction,\r\n permissions,\r\n loadClipchampPlayer,\r\n } = props;\r\n\r\n const videos = (ads && ads.data && _.isArray(ads.data)) ? ads.data : [];\r\n\r\n const videoRef = useRef();\r\n\r\n const defaultClasses = useDefaultStyles(getAdsStepStyles);\r\n\r\n const customClasses = useDefaultStyles(customStyleFunction);\r\n\r\n const classes = useCustomStyleFunction ? customClasses : defaultClasses;\r\n\r\n const { currentPageIndex } = ads;\r\n\r\n const [currentVideoIdx, setCurrentVideoIdx] = useState(0);\r\n\r\n const [videoHeight, setVideoHeight] = useState('280'); // default 280 height for horizontal videos\r\n const videoTemplateUIEnabled = permissions && permissions.dynamic && permissions.dynamic.VideoTemplateUI;\r\n\r\n const getPageAdjustedIndex = (idx, pageNumber = null) => {\r\n const page = pageNumber || currentPageIndex;\r\n\r\n const val = (((page - 1) * ITEMS_PER_PAGE) + idx);\r\n\r\n return val;\r\n };\r\n\r\n const goToPrevVideo = () => {\r\n setCurrentVideoIdx(currentVideoIdx - 1);\r\n };\r\n\r\n const goToNextVideo = () => {\r\n setCurrentVideoIdx(currentVideoIdx + 1);\r\n };\r\n\r\n const goToVideoIndex = (idx) => {\r\n setCurrentVideoIdx(idx);\r\n };\r\n\r\n const videosInPage = videos.slice(getPageAdjustedIndex(0), getPageAdjustedIndex(9) + 1);\r\n\r\n const currentVideo = videos[getPageAdjustedIndex(currentVideoIdx)] || videos[0];\r\n\r\n useEffect(() => {\r\n setCurrentVideoIdx(0);\r\n }, [currentPageIndex]);\r\n\r\n useEffect(() => {\r\n if (currentVideoIdx > videosInPage.length - 1) {\r\n setCurrentVideoIdx(0);\r\n }\r\n onUpdateCurrentVideoIndex(currentVideoIdx);\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [currentVideoIdx, videosInPage.length]);\r\n\r\n const source = (currentVideo && currentVideo.data && currentVideo.data.video && currentVideo.data.video.src) || '';\r\n\r\n useEffect(() => {\r\n if (videoRef.current) {\r\n videoRef.current.load();\r\n }\r\n }, [source]);\r\n\r\n\r\n useEffect(() => {\r\n if (currentVideo?.data?.video) {\r\n const { height, width } = currentVideo.data.video;\r\n const isVertical = height > width;\r\n\r\n if (isVertical) {\r\n setVideoHeight('420');\r\n } else {\r\n setVideoHeight('280');\r\n }\r\n }\r\n }, [currentVideo]);\r\n\r\n return (\r\n
\r\n
\r\n {i18n.getString(_TL_('Ad preview'))} \r\n
\r\n
\r\n {videoTemplateUIEnabled ? (\r\n \r\n ) : (\r\n \r\n )}\r\n
\r\n {\r\n !disablePagination && videosInPage.length > 1 && (\r\n
\r\n
\r\n \r\n {i18n.getString(_TL_('Previous ad'))} \r\n \r\n
\r\n {\r\n videosInPage.map((video, idx) => (\r\n
\r\n goToVideoIndex(idx)} onClick={() => goToVideoIndex(idx)} className={classes.paginationIndicatorDot} style={{ backgroundColor: getPageAdjustedIndex(idx) === getPageAdjustedIndex(currentVideoIdx) ? '#0078d4' : '#c8c6c4' }} />\r\n
\r\n ))\r\n }\r\n
\r\n \r\n {i18n.getString(_TL_('Next ad'))} \r\n \r\n
\r\n
\r\n )\r\n }\r\n
\r\n \r\n {i18n.getString(_TL_('This is an example of what your video ad might look like. Depending on placement, the actual ad shown may appear differently.'))}\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nAdPreview.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n ads: PropTypes.shape({\r\n data: PropTypes.instanceOf(Array),\r\n currentPageIndex: PropTypes.number,\r\n }).isRequired,\r\n disablePagination: PropTypes.bool,\r\n onUpdateCurrentVideoIndex: PropTypes.func.isRequired,\r\n customStyleFunction: PropTypes.func,\r\n useCustomStyleFunction: PropTypes.bool,\r\n loadClipchampPlayer: PropTypes.func,\r\n};\r\n\r\nAdPreview.defaultProps = {\r\n disablePagination: false,\r\n customStyleFunction: _.noop,\r\n useCustomStyleFunction: false,\r\n loadClipchampPlayer: _.noop,\r\n};\r\n","\r\nimport React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Button, makeStyles, mergeClasses, shorthands } from '@fluentui/react-components';\r\nimport { AddRegular } from '@fluentui/react-icons';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\n\r\nconst useStyles = makeStyles({\r\n buttonContainer: {\r\n width: '170px',\r\n ...shorthands.border('1px', 'dashed', '#c8c6c4'),\r\n height: '96px',\r\n display: 'flex',\r\n ...shorthands.borderRadius('6px'),\r\n },\r\n buttonContainerMultiple: {\r\n width: '112px',\r\n height: '99px',\r\n },\r\n button: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n flexGrow: 1,\r\n },\r\n addIcon: {\r\n color: '#0078D4',\r\n fontSize: '32px',\r\n },\r\n addIconMultiple: {\r\n fontSize: '22px',\r\n },\r\n});\r\n\r\nexport const AddVideoButton = ({ onClick, multiVideoMode }) => {\r\n const classes = useStyles();\r\n const i18n = useContext(I18nContext);\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nAddVideoButton.propTypes = {\r\n onClick: PropTypes.func.isRequired,\r\n multiVideoMode: PropTypes.bool,\r\n};\r\n\r\nAddVideoButton.defaultProps = {\r\n multiVideoMode: false,\r\n};\r\n","export const overrideClasses = {\r\n image: {\r\n borderRadius: 6,\r\n },\r\n imageContainer: {\r\n height: 80,\r\n display: 'flex',\r\n },\r\n imageParentContainer: {\r\n display: 'flex',\r\n columnGap: '10px',\r\n },\r\n imageClickableContainer: {\r\n width: 107,\r\n '& img': {\r\n verticalAlign: 'top',\r\n },\r\n },\r\n seeAll: {\r\n bottom: 12,\r\n maxWidth: 'initial',\r\n },\r\n parentContainer: {\r\n '& $panelHeading': {\r\n display: 'flex',\r\n border: 'none',\r\n '& $panelTitle.collapsible-title': {\r\n flexGrow: 0,\r\n fontSize: '12px',\r\n fontWeight: 600,\r\n lineHeight: '24px',\r\n '& > a': {\r\n '& .helpbutton': {\r\n fontSize: '14px',\r\n lineHeight: '24px',\r\n display: 'inline',\r\n verticalAlign: 'bottom',\r\n },\r\n },\r\n marginTop: 0,\r\n },\r\n },\r\n },\r\n};\r\n","/* eslint-disable jsx-a11y/media-has-caption */\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { CroppedImageView } from '@bingads-webui-campaign-react/cropped-image-view';\r\nimport { PlacementQualityToText } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { submitEvent } from '@bingads-webui-universal/accessibility-helper';\r\nimport {\r\n makeStyles,\r\n mergeClasses,\r\n shorthands,\r\n tokens,\r\n Badge,\r\n} from '@fluentui/react-components';\r\nimport { TimerRegular } from '@fluentui/react-icons';\r\nimport { curlyTemplate } from '@bingads-webui-universal/primitive-utilities';\r\nimport { Label } from '@bingads-webui-react/primitive';\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n position: 'relative',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n boxShadow: '0px 0.6px 1.8px 0px rgba(0, 0, 0, 0.10), 0px 3.2px 7.2px 0px rgba(0, 0, 0, 0.13)',\r\n ...shorthands.borderRadius(tokens.borderRadiusLarge),\r\n ...shorthands.overflow('hidden'),\r\n },\r\n overlay: {\r\n position: 'absolute',\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0,\r\n fontSize: tokens.fontSizeBase200,\r\n },\r\n qualityContainer: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n columnGap: '5px',\r\n marginTop: '5px',\r\n },\r\n info: {\r\n position: 'absolute',\r\n top: '210px',\r\n left: tokens.spacingHorizontalS,\r\n backgroundColor: 'black',\r\n color: 'white',\r\n width: '52px',\r\n fontSize: tokens.fontSizeBase200,\r\n height: tokens.spacingVerticalXXL,\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\r\n ...shorthands.overflow('hidden'),\r\n },\r\n icon: {\r\n fontSize: tokens.fontSizeBase400,\r\n },\r\n videoContainer: {\r\n position: 'absolute',\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0,\r\n },\r\n video: {\r\n width: '100%',\r\n height: '100%',\r\n },\r\n});\r\n\r\n// create a description for the video from text in the scenes\r\nconst getVideoDescription = ({ videoAsset, i18n }) => {\r\n const { duration } = videoAsset.template;\r\n const texts = videoAsset.template.scenes.map(scene => scene.text.join(' '));\r\n return curlyTemplate(i18n.getString(_TL_('video recommendation with duration {{duration}} seconds. Description: {{description}}')))({\r\n duration,\r\n description: texts.join(' '),\r\n });\r\n};\r\n\r\nexport const VideoSuggestionCard = ({\r\n videoAsset, resizeHeight, onSelectVideoSuggestion, i18n, showQuality,\r\n}) => {\r\n const classes = useStyles();\r\n const [showVideo, setShowVideo] = React.useState(false);\r\n const src = videoAsset.thumbnailUrl;\r\n const { width } = videoAsset.template;\r\n const { height } = videoAsset.template;\r\n const aspectRatio = width / height;\r\n\r\n // convert seconds to mm:ss\r\n const { duration } = videoAsset.template;\r\n const totalSeconds = duration / 1000;\r\n const minutes = Math.floor((totalSeconds) / 60);\r\n const seconds = Math.floor((totalSeconds) % 60);\r\n const durationString = `${minutes < 10 ? '0' : ''}${minutes}:${seconds < 10 ? '0' : ''}${seconds}`;\r\n const description = getVideoDescription({ videoAsset, i18n });\r\n\r\n return (\r\n
\r\n setShowVideo(true)}\r\n onMouseOut={() => setShowVideo(false)}\r\n onFocus={() => setShowVideo(true)}\r\n onBlur={() => setShowVideo(false)}\r\n aria-label={description}\r\n >\r\n \r\n {showVideo && (\r\n
\r\n \r\n \r\n \r\n
\r\n )}\r\n
\r\n
\r\n \r\n {durationString}\r\n
\r\n
\r\n
\r\n {\r\n showQuality && (\r\n
\r\n \r\n {i18n.getString(PlacementQualityToText[videoAsset.quality])}\r\n
\r\n )\r\n }\r\n
\r\n );\r\n};\r\n\r\nVideoSuggestionCard.propTypes = {\r\n videoAsset: PropTypes.shape({\r\n url: PropTypes.string,\r\n thumbnailUrl: PropTypes.string,\r\n template: PropTypes.shape({\r\n width: PropTypes.number,\r\n height: PropTypes.number,\r\n duration: PropTypes.number,\r\n scenes: PropTypes.arrayOf(PropTypes.shape({\r\n text: PropTypes.arrayOf(PropTypes.string),\r\n })),\r\n }),\r\n }).isRequired,\r\n resizeHeight: PropTypes.number.isRequired,\r\n onSelectVideoSuggestion: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n showQuality: PropTypes.bool,\r\n};\r\n","/* eslint-disable jsx-a11y/media-has-caption */\r\nimport React, { useRef, useCallback, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classnames from 'classnames';\r\nimport { useCopilotRepositoryContext } from '@bingads-webui/inline-copilot';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { Panel, PanelType, DefaultButton } from '@bingads-webui-react/fabric-control';\r\nimport { RecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { FluentProvider, webLightTheme } from '@fluentui/react-components';\r\nimport { ReactTemplate } from '@bingads-webui-react/react-template';\r\n\r\nimport { VideoSuggestionCard } from './video-suggestion-card';\r\n\r\nconst getPanelStyles = (components, { palette = {} } = {}) => ({\r\n panel: {\r\n top: 60,\r\n },\r\n subtitle: {\r\n paddingTop: 22,\r\n color: palette.neutralDark,\r\n },\r\n panelHeader: {\r\n paddingLeft: 24,\r\n paddingRight: 24,\r\n alignSelf: 'justify-start',\r\n flexGrow: 1,\r\n },\r\n panelTitle: {\r\n fontSize: 20,\r\n fontWeight: 600,\r\n display: 'inline-block',\r\n lineHeight: '27px',\r\n },\r\n contentHeading: {\r\n paddingTop: 17,\r\n fontSize: '12px',\r\n paddingBottom: 20,\r\n },\r\n gridContainer: {\r\n display: 'grid',\r\n columnGap: '16px',\r\n rowGap: '16px',\r\n gridTemplateColumns: '430px 430px',\r\n },\r\n});\r\n\r\nexport const VideoRecommendationsPanel = ({\r\n i18n, isOpen, close, onSelectVideoSuggestion, permissions,\r\n}) => {\r\n const classes = useDefaultStyles(getPanelStyles);\r\n const contentRef = useRef(null);\r\n const { finalUrl } = useCopilotRepositoryContext();\r\n const [recommendationContext] = useContext(RecommendationContext);\r\n const {\r\n videoAssets,\r\n } = recommendationContext || {};\r\n const isVideoAsAnAssetEnabled = permissions.dynamic.VideoAsAnAsset && !permissions.isAmplifyEnabled;\r\n\r\n const onDismiss = useCallback((evt) => {\r\n const target = evt && evt.currentTarget;\r\n if (evt.key === 'Escape' || (contentRef.current && contentRef.current.closest(`.${classes.panel}`).contains(target))) {\r\n close();\r\n }\r\n }, [classes.panel, close]);\r\n\r\n const onRenderFooterContent = () => (\r\n close()}\r\n text={i18n.getString(_TL_('Cancel'))}\r\n />\r\n );\r\n\r\n const onSelection = (index) => {\r\n onSelectVideoSuggestion(index);\r\n close();\r\n };\r\n\r\n return (\r\n \r\n \r\n
\r\n {text},\r\n finalUrl,\r\n }}\r\n template={i18n.getString(_TL_('{{strong}}Final URL:{{/strong}} {{finalUrl}}'))}\r\n />\r\n
\r\n
\r\n {videoAssets &&\r\n videoAssets.map((videoAsset, index) => ( onSelection(index)}\r\n resizeHeight={242}\r\n i18n={i18n}\r\n showQuality={isVideoAsAnAssetEnabled}\r\n />))\r\n }\r\n
\r\n
\r\n \r\n );\r\n};\r\n\r\nVideoRecommendationsPanel.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n isOpen: PropTypes.bool.isRequired,\r\n close: PropTypes.func.isRequired,\r\n onSelectVideoSuggestion: PropTypes.func.isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n};\r\n","import React, { useContext, useCallback, useState, useMemo, useEffect } from 'react';\r\nimport _ from 'underscore';\r\nimport classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport { RecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { ImageSuggestionCarousel } from '@bingads-webui-campaign-react/image-suggestion-carousel';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { Spinner } from '@fluentui/react-components';\r\nimport { Shimmer, ShimmerElementsGroup, ShimmerElementType, MessageBar, MessageBarType } from '@fluentui/react';\r\nimport { CroppedImageView } from '@bingads-webui-campaign-react/cropped-image-view';\r\nimport { useCopilotLoggers } from '@bingads-webui-campaign-react/copilot-loggers';\r\nimport { overrideClasses } from './carousel-style';\r\nimport { getImageSuggestionCarouselStyles } from './styles';\r\nimport { VideoRecommendationsPanel } from './video-recommendations-panel';\r\n\r\nconst IMAGE_DIM = {\r\n width: 106,\r\n height: 76,\r\n marginRight: 8,\r\n};\r\n\r\nconst initialImageContainerLeftMargin = 10;\r\nconst SuggestionViewImageCount = 5;\r\nconst MaxSuggestionsInCarousel = 15;\r\n\r\nconst LoadingShimmer = ({ i18n }) => {\r\n const shimmerElements = useMemo(() => {\r\n const shimmerElement = [];\r\n\r\n _.each(_.range(SuggestionViewImageCount), () => {\r\n shimmerElement.push({ type: ShimmerElementType.line, height: 76, width: 106 });\r\n shimmerElement.push({ type: ShimmerElementType.gap, width: 10, height: 76 });\r\n });\r\n\r\n return shimmerElement;\r\n }, []);\r\n\r\n return (\r\n
\r\n \r\n } />\r\n
\r\n );\r\n};\r\n\r\nLoadingShimmer.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n};\r\n\r\nconst getImageDimension = src => new Promise((resolve) => {\r\n const img = new Image();\r\n img.src = src;\r\n img.onload = () => {\r\n const width = img.naturalWidth;\r\n const height = img.naturalHeight;\r\n\r\n resolve({\r\n imgWidth: width, imgHeight: height,\r\n });\r\n };\r\n});\r\n\r\nconst ImageView = ({ src }) => {\r\n const [width, setWidth] = useState(0);\r\n const [height, setHeight] = useState(0);\r\n\r\n const aspectRatio = width / height;\r\n const maxWidth = 107;\r\n\r\n const resizeHeight = Math.min(maxWidth / aspectRatio, 76);\r\n\r\n useEffect(() => {\r\n getImageDimension(src).then(({ imgWidth, imgHeight }) => {\r\n setWidth(imgWidth);\r\n setHeight(imgHeight);\r\n });\r\n }, [src]);\r\n\r\n if (!width || !height) {\r\n return
;\r\n }\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nImageView.propTypes = {\r\n src: PropTypes.string.isRequired,\r\n};\r\n\r\nexport const VideoAdsSuggestionCarousel = ({\r\n onSelectVideoSuggestion,\r\n i18n,\r\n permissions,\r\n useBrandKit = false,\r\n isBrandKitEmpty,\r\n setUseBrandKit,\r\n}) => {\r\n // For Video BK will only work with new templates\r\n const isBrandKitEnabled = permissions && permissions.dynamic && (permissions.dynamic.BrandKitUI && permissions.dynamic.VideoTemplateUI);\r\n const [isSeeAllPanelOpen, setIsSeeAllPanelOpen] = useState(false);\r\n const [videosToSuggest, setVideosToSuggest] = useState([]);\r\n\r\n const [recommendationContext, , reportRecommendations] = useContext(RecommendationContext);\r\n const { logSuggestionsViewed } = useCopilotLoggers();\r\n\r\n const {\r\n videoAssets: videoSuggestions,\r\n isLoading,\r\n errorMessage,\r\n } = recommendationContext || {};\r\n\r\n const classes = useDefaultStyles(getImageSuggestionCarouselStyles);\r\n\r\n const { carouselState } = useMemo(() => ({\r\n carouselState: {\r\n carousel: {\r\n isError: _.isEmpty(videoSuggestions),\r\n },\r\n suggestion: {\r\n images: videoSuggestions,\r\n },\r\n },\r\n panelState: {\r\n panelImages: videoSuggestions,\r\n hasMore: false,\r\n },\r\n }), [videoSuggestions]);\r\n\r\n const { suggestion, carousel } = carouselState || {};\r\n const { images: suggestionImages } = suggestion || {};\r\n\r\n const onOffsetChange = useCallback((offset) => {\r\n const viewedImages = videosToSuggest.slice(offset, offset + SuggestionViewImageCount);\r\n const suggestionIds = _.pluck(viewedImages, 'suggestionId');\r\n reportRecommendations({ view: suggestionIds });\r\n logSuggestionsViewed(undefined /* imageSuggestionIds */, suggestionIds);\r\n }, [videosToSuggest, reportRecommendations, logSuggestionsViewed]);\r\n\r\n const onSelectIndex = useCallback((index) => {\r\n onSelectVideoSuggestion(videosToSuggest[index]);\r\n }, [videosToSuggest, onSelectVideoSuggestion]);\r\n\r\n const onSelectImage = useCallback((__, index) => {\r\n onSelectIndex(index);\r\n }, [onSelectIndex]);\r\n\r\n const onSelectSeeAllImages = useCallback(() => {\r\n const suggestionIds = suggestionImages.map(({ suggestionId }) => suggestionId);\r\n\r\n setIsSeeAllPanelOpen(true);\r\n logSuggestionsViewed(undefined /* imageSuggestionIds */, suggestionIds);\r\n }, [logSuggestionsViewed, suggestionImages]);\r\n\r\n const onRenderImage = useCallback((src, classesProp) => (\r\n
\r\n \r\n
\r\n ), [classes.croppedImage]);\r\n\r\n useEffect(() => {\r\n const truncatedImages = _.isArray(suggestionImages) && suggestionImages.slice(0, MaxSuggestionsInCarousel);\r\n setVideosToSuggest(truncatedImages || []);\r\n }, [suggestionImages]);\r\n\r\n return (\r\n
\r\n {isLoading ?\r\n : (\r\n )}\r\n {isSeeAllPanelOpen && (\r\n setIsSeeAllPanelOpen(false)}\r\n onSelectVideoSuggestion={onSelectIndex}\r\n permissions={permissions}\r\n />)}\r\n {errorMessage && (\r\n \r\n {i18n.getString(errorMessage)}\r\n )}\r\n
\r\n );\r\n};\r\n\r\nVideoAdsSuggestionCarousel.propTypes = {\r\n onSelectVideoSuggestion: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n useBrandKit: PropTypes.bool,\r\n isBrandKitEmpty: PropTypes.bool,\r\n setUseBrandKit: PropTypes.func,\r\n};\r\n","import { useContext, useCallback, useState } from 'react';\r\nimport _ from 'underscore';\r\nimport { RecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { useCopilotRepositoryContext } from '@bingads-webui/inline-copilot';\r\nimport { useCopilotLoggers } from '@bingads-webui-campaign-react/copilot-loggers';\r\nimport { getLocalStorage } from '@bingads-webui/storage';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { PermissionsContext } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { useBrandKitDataService } from '@bingads-webui-campaign-react/brandkit-data-service';\r\nimport { formatBrandkitForAPI } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nconst FetchCount = 10;\r\n\r\nexport const useVideoAdsCopilot = () => {\r\n const [, setRecommendationContext] = useContext(RecommendationContext);\r\n\r\n const repository = useCopilotRepositoryContext();\r\n\r\n const { logBannerGenerated } = useCopilotLoggers();\r\n\r\n const { fetchVideoAdsAssetRecommendations, finalUrl } = repository;\r\n const [isLoadingBrandKit, setIsLoadingBrandkit] = useState(false);\r\n const [brandkit, setBrandKit] = useState(null);\r\n const [isBrandKitEmpty, setIsBrandKitEmpty] = useState(true);\r\n const { scope } = useContext(ScopeContext) || {};\r\n\r\n const { aid } = scope.values;\r\n const permissions = useContext(PermissionsContext);\r\n // For Video BK will only work with new templates\r\n const isBrandKitEnabled = permissions && permissions.dynamic && (permissions.dynamic.BrandKitUI && permissions.dynamic.VideoTemplateUI);\r\n\r\n const { getBrandKitDataByAccId } = useBrandKitDataService();\r\n\r\n const fetchBrandKit = useCallback(async () => {\r\n if (isBrandKitEnabled) {\r\n setIsLoadingBrandkit(true);\r\n const response = await getBrandKitDataByAccId({ accId: aid });\r\n setIsLoadingBrandkit(false);\r\n const isBrandKitHavingData = response && response.BrandKits && response.BrandKits[0] && (!_.isEmpty(response.BrandKits[0].Fonts) ||\r\n !_.isEmpty(response.BrandKits[0].Images) ||\r\n !_.isEmpty(response.BrandKits[0].LandscapeLogos) ||\r\n !_.isEmpty(response.BrandKits[0].Palettes) ||\r\n !_.isEmpty(response.BrandKits[0].SquareLogos));\r\n if (isBrandKitHavingData) {\r\n setIsBrandKitEmpty(false);\r\n const updatedResponse = {\r\n ...response.BrandKits[0],\r\n };\r\n setBrandKit(formatBrandkitForAPI(updatedResponse));\r\n } else {\r\n setIsBrandKitEmpty(true);\r\n }\r\n }\r\n }, [isBrandKitEnabled, getBrandKitDataByAccId, aid, setBrandKit, setIsBrandKitEmpty]);\r\n\r\n const fetch = useCallback((taskManager, useBrandKit) => {\r\n if (!finalUrl || isLoadingBrandKit) {\r\n return;\r\n }\r\n\r\n setRecommendationContext({\r\n isLoading: true,\r\n errorMessage: undefined,\r\n });\r\n\r\n taskManager.addTask({\r\n taskId: isBrandKitEnabled ? `${finalUrl}-brandkit-${useBrandKit}` : finalUrl,\r\n taskFn: () => {\r\n setRecommendationContext({ isLoading: true });\r\n const localStorage = getLocalStorage();\r\n const campaignObjective = localStorage.get('CampaignObjective');\r\n const recommendationType = campaignObjective === 'Awareness' ? 'OLV' : 'CTV';\r\n return fetchVideoAdsAssetRecommendations(FetchCount, false, recommendationType, null, (useBrandKit && brandkit) ? brandkit : null);\r\n },\r\n }).then((response) => {\r\n const { ads } = response.data;\r\n\r\n const videoAssets = ads.map((ad) => {\r\n const {\r\n url, thumbnailUrl, recommendationId, template, videoMetadata,\r\n } = ad;\r\n\r\n return {\r\n url,\r\n thumbnailUrl,\r\n quality: videoMetadata.quality,\r\n width: videoMetadata.width,\r\n height: videoMetadata.height,\r\n sourceVideoBitRate: videoMetadata.sourceVideoBitRate,\r\n suggestionId: recommendationId,\r\n RecommendationId: recommendationId,\r\n template,\r\n };\r\n });\r\n\r\n logBannerGenerated(finalUrl, {\r\n RecommendedAssets: {\r\n VideoAssets: videoAssets,\r\n },\r\n });\r\n\r\n setRecommendationContext({\r\n isLoading: false,\r\n finalUrl,\r\n videoAssets,\r\n });\r\n }).catch(() => {\r\n setRecommendationContext({\r\n isLoading: false,\r\n finalUrl,\r\n videoAssets: [],\r\n errorMessage: _TL_('Unable to generate recommendations for this Final URL'),\r\n });\r\n });\r\n }, [fetchVideoAdsAssetRecommendations, finalUrl, logBannerGenerated, setRecommendationContext, isLoadingBrandKit, brandkit]);\r\n\r\n return {\r\n fetch,\r\n finalUrlForCopilot: finalUrl,\r\n isBrandKitEmpty,\r\n fetchBrandKit,\r\n };\r\n};\r\n","import React from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { Label, Icon } from '@bingads-webui-react/fabric-control';\r\nimport { HelpPopupInline } from '@bingads-webui-react/help-popup';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { getAdsStepStyles } from './styles';\r\n\r\nconst convertBpsToKbps = (bps) => {\r\n // Divide bps by 1,000\r\n const Kbps = bps / (10 ** 3);\r\n\r\n return Math.floor(Kbps);\r\n};\r\n\r\nconst Placements = {\r\n AUDIENCE_NETWORK: _TL_('Microsoft Advertising Network'),\r\n GENERAL_CTV: _TL_('General CTV'),\r\n NETFLIX: _TL_('Premium CTV'),\r\n};\r\n\r\nexport const PlacementQualities = {\r\n PERFECT: 7,\r\n EXCELLENT_AND_PERFECT: 6,\r\n PERFECT_AND_GOOD: 5,\r\n ONLY_PERFECT: 4,\r\n EXCELLENT: 3,\r\n ONLY_EXCELLENT: 2,\r\n GOOD: 1,\r\n NONE: 0,\r\n};\r\n\r\n// recently changed wording for each quality label\r\n// perfect -> excellent\r\n// excellent -> good\r\n// good -> fair\r\nexport const PlacementQualityToText = {\r\n [PlacementQualities.PERFECT]: _TL_('Excellent'),\r\n [PlacementQualities.EXCELLENT]: _TL_('Good'),\r\n [PlacementQualities.GOOD]: _TL_('Fair'),\r\n [PlacementQualities.NONE]: _TL_('Poor'),\r\n [PlacementQualities.PERFECT_AND_GOOD]: _TL_('Excellent'),\r\n [PlacementQualities.EXCELLENT_AND_PERFECT]: _TL_('Excellent'),\r\n [PlacementQualities.ONLY_PERFECT]: _TL_('Excellent'),\r\n [PlacementQualities.ONLY_EXCELLENT]: _TL_('Good'),\r\n};\r\n\r\nconst QualityToPlacements = {\r\n [PlacementQualities.PERFECT]: { enabled: [Placements.AUDIENCE_NETWORK, Placements.GENERAL_CTV, Placements.NETFLIX], disabled: [] },\r\n [PlacementQualities.EXCELLENT]: { enabled: [Placements.AUDIENCE_NETWORK, Placements.GENERAL_CTV], disabled: [Placements.NETFLIX] },\r\n [PlacementQualities.GOOD]: { enabled: [Placements.AUDIENCE_NETWORK], disabled: [Placements.GENERAL_CTV, Placements.NETFLIX] },\r\n [PlacementQualities.NONE]: { enabled: [], disabled: [Placements.AUDIENCE_NETWORK, Placements.GENERAL_CTV, Placements.NETFLIX] },\r\n [PlacementQualities.PERFECT_AND_GOOD]: { enabled: [Placements.AUDIENCE_NETWORK, Placements.GENERAL_CTV], disabled: [Placements.NETFLIX] },\r\n [PlacementQualities.EXCELLENT_AND_PERFECT]: { enabled: [Placements.GENERAL_CTV, Placements.NETFLIX], disabled: [Placements.AUDIENCE_NETWORK] },\r\n [PlacementQualities.ONLY_PERFECT]: { enabled: [Placements.NETFLIX], disabled: [Placements.AUDIENCE_NETWORK, Placements.GENERAL_CTV] },\r\n [PlacementQualities.ONLY_EXCELLENT]: { enabled: [Placements.GENERAL_CTV], disabled: [Placements.AUDIENCE_NETWORK, Placements.NETFLIX] },\r\n};\r\n\r\nconst StarsToQuality = {\r\n [PlacementQualities.PERFECT]: 3,\r\n [PlacementQualities.EXCELLENT_AND_PERFECT]: 3,\r\n [PlacementQualities.PERFECT_AND_GOOD]: 3,\r\n [PlacementQualities.ONLY_PERFECT]: 3,\r\n [PlacementQualities.EXCELLENT]: 2,\r\n [PlacementQualities.ONLY_EXCELLENT]: 2,\r\n [PlacementQualities.GOOD]: 1,\r\n [PlacementQualities.NONE]: 0,\r\n};\r\n\r\nexport const PlacementTitle = ({ i18n, classes, titleText }) => (\r\n
\r\n \r\n \r\n
\r\n);\r\n\r\nPlacementTitle.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n classes: PropTypes.shape({\r\n placementLabel: PropTypes.string.isRequired,\r\n }).isRequired,\r\n titleText: PropTypes.string.isRequired,\r\n};\r\n\r\n\r\nexport const PlacementInfo = (props) => {\r\n const {\r\n i18n,\r\n videoAd,\r\n } = props;\r\n\r\n const defaultClasses = useDefaultStyles(getAdsStepStyles);\r\n\r\n const classes = defaultClasses;\r\n\r\n if (videoAd && videoAd.video) {\r\n const {\r\n width, height, quality = 0, sourceVideoBitRate,\r\n } = videoAd.video;\r\n\r\n return (\r\n
\r\n \r\n
{width}px x {height}px, {`${convertBpsToKbps(sourceVideoBitRate)} ${_TL_('Kbps')}`} ({PlacementQualityToText[quality]} {i18n.getString(_TL_('quality'))})
\r\n
\r\n {QualityToPlacements[quality].enabled.map(placement => (\r\n
{i18n.getString(placement)}
\r\n ))}\r\n {QualityToPlacements[quality].disabled.map(placement => (\r\n
{i18n.getString(placement)}
\r\n ))}\r\n
\r\n
\r\n );\r\n }\r\n\r\n return null;\r\n};\r\n\r\nPlacementInfo.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n videoAd: PropTypes.shape({\r\n video: PropTypes.shape({\r\n width: PropTypes.number,\r\n height: PropTypes.number,\r\n quality: PropTypes.number,\r\n sourceVideoBitRate: PropTypes.number,\r\n }),\r\n }).isRequired,\r\n};\r\n\r\n\r\nexport const PlacementInfoWithStars = (props) => {\r\n const {\r\n i18n,\r\n videoAd,\r\n } = props;\r\n\r\n const defaultClasses = useDefaultStyles(getAdsStepStyles);\r\n\r\n const classes = defaultClasses;\r\n\r\n if (videoAd && videoAd.video) {\r\n const {\r\n width, height, quality = 0, sourceVideoBitRate,\r\n } = videoAd.video;\r\n\r\n const numberOfStars = StarsToQuality[quality] || 0;\r\n\r\n const numberOfDisabledStars = 3 - numberOfStars;\r\n\r\n return (\r\n
\r\n \r\n
\r\n {\r\n _.range(numberOfStars).map(idx => (\r\n \r\n ))\r\n }\r\n {\r\n numberOfDisabledStars > 0 && _.range(numberOfDisabledStars).map(idx => (\r\n \r\n ))\r\n }\r\n ({PlacementQualityToText[quality]} {i18n.getString(_TL_('quality'))})\r\n
\r\n
{width}px x {height}px, {`${convertBpsToKbps(sourceVideoBitRate)} ${_TL_('Kbps')}`}
\r\n
\r\n );\r\n }\r\n\r\n return null;\r\n};\r\n\r\n\r\nPlacementInfoWithStars.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n videoAd: PropTypes.shape({\r\n video: PropTypes.shape({\r\n width: PropTypes.number,\r\n height: PropTypes.number,\r\n quality: PropTypes.number,\r\n sourceVideoBitRate: PropTypes.number,\r\n }),\r\n }).isRequired,\r\n};\r\n","import { has } from 'underscore';\r\n\r\nexport const isBulkWrappedResponse = bulkResult => has(bulkResult, 'entity'); // && has(bulkResult, 'errors');\r\n","import { identity, contains, isEmpty, isEqual } from 'underscore';\r\nimport { mapBulkUpsertErrors } from './map-bulk-upsert-errors';\r\n\r\nexport const ERROR_ENTITY = {\r\n Campaign: 'campaign',\r\n AdGroup: 'adGroup',\r\n AssetGroup: 'assetGroup',\r\n Ad: 'ad',\r\n CampaignLocation: 'campaignLocation',\r\n CampaignRadius: 'campaignRadius',\r\n CampaignNegativeLocation: 'campaignNegativeLocation',\r\n CampaignLocationIntent: 'campaignLocationIntent',\r\n CampaignDayTimeCriterion: 'campaignDayTimeCriterion',\r\n CampaignNegativeWebpage: 'campaignNegativeWebpage',\r\n};\r\n\r\nexport const serverErrorsCompare = (prev, curr) => !(!isEmpty(curr) && !isEqual(prev, curr));\r\n\r\nconst getBulkUploadEntityType = entitySchema =>\r\n (entitySchema.properties['bulk-upload-type'] || {}).value ||\r\n entitySchema.name;\r\n\r\nexport const getBulkUploadErrorType = entitySchema =>\r\n `${getBulkUploadEntityType(entitySchema)} Error`;\r\n\r\nexport const modelToViewModelForBulkErrors = (errors, bulkUpsertEntityErrorMap, scenario, i18n, activityLogger) =>\r\n mapBulkUpsertErrors(errors, bulkUpsertEntityErrorMap, /* errorProcessor */ identity, scenario, i18n, activityLogger);\r\n\r\nconst ReferencedEntityInvalidIdErrors = ['CampaignServiceInvalidCampaignId', 'CampaignServiceFutureFeatureCode', 'CampaignServiceInvalidAdGroupId'];\r\nexport const removeReferencedEntityInvalidIdErrors = bulkErrors =>\r\n bulkErrors.filter(({ Error }) => !contains(ReferencedEntityInvalidIdErrors, Error));\r\n\r\nexport const getPanelErrorProps = ({ needsAttention }) => (needsAttention ? {\r\n error: _TL_(\"* Something's wrong\"),\r\n} : {});\r\n","import { identity, result } from 'underscore';\r\nimport { getBulkApiErrors } from '@bingads-webui-campaign/api-errors';\r\n\r\nexport const mapBulkUpsertErrors = (errors, bulkUpsertEntityErrorMap, errorProcessor = identity, scenario, i18n, activityLogger) =>\r\n getBulkApiErrors(errors, scenario, i18n, activityLogger).map((error) => {\r\n const errorType = error.type;\r\n const mappedErrorType = result(bulkUpsertEntityErrorMap, errorType, errorType);\r\n // eslint-disable-next-line no-param-reassign\r\n error.type = mappedErrorType;\r\n return errorProcessor(error);\r\n });\r\n","/* istanbul ignore file */\r\n\r\nexport const getDealDetailsStyle = () => ({\r\n dealDetails: {\r\n width: 313,\r\n '& h5': {\r\n fontSize: 14,\r\n },\r\n '& .option-wrapper': {\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n fontSize: 12,\r\n marginBottom: 8,\r\n '& .option-name': {\r\n flex: 2,\r\n color: '#605E5C',\r\n },\r\n '& .option-value': {\r\n color: '#323130',\r\n },\r\n },\r\n },\r\n});\r\n","/* istanbul ignore file */\r\n\r\nexport const DeviceKeys = {\r\n Computers: 'Computers',\r\n Tablets: 'Tablets',\r\n Smartphones: 'Smartphones',\r\n ConnectedTVs: 'ConnectedTVs',\r\n};\r\n","/* istanbul ignore file */\r\n\r\nimport _, { difference, each, get } from 'underscore';\r\nimport { edmCampaign } from '@bingads-webui/edm-campaign';\r\nimport odata from '@bingads-webui-component-legacy/http/channel/odata';\r\nimport * as locationTargetConverter from '@bingads-webui-campaign-legacy/location-targets/util/locationTargetConverter';\r\nimport { DeviceKeys } from '../target-constants';\r\n\r\nexport function getCountriesLocations(locationIds, lcid, cid, aid) {\r\n if (_.size(locationIds) === 0) {\r\n return Promise.resolve([]);\r\n }\r\n const reqs = _.map(locationIds, id => ({\r\n type: 'GET',\r\n url: `${edmCampaign.Customers.$withKey(cid).Accounts.$withKey(aid).Locations.$withKey(id).path}?%24expand=ParentLocations`,\r\n headers: lcid ? {\r\n lcid,\r\n } : undefined,\r\n }));\r\n\r\n return odata.batch({ reqs, needContentType: true });\r\n}\r\n\r\nconst targetTypes = {\r\n Device: 'Device',\r\n Age: 'Age',\r\n Gender: 'Gender',\r\n Location: 'Location',\r\n Audience: 'Audience',\r\n};\r\n\r\nexport function getTargetConstraints(deal, targetType) {\r\n const ret = {\r\n mandatory: [],\r\n isRestricted: deal.Type === 'Restricted',\r\n };\r\n\r\n if (!deal || !deal.DealTargetConstraints) { return ret; }\r\n\r\n const devicesConstraints = deal.DealTargetConstraints.find(target => target.TargetType === targetType);\r\n\r\n if (!devicesConstraints) {\r\n return ret;\r\n }\r\n\r\n ret.mandatory = devicesConstraints.Mandatory || [];\r\n ret.isRestricted = devicesConstraints.DealTargetRestrictionLevel === 'Restricted';\r\n\r\n return ret;\r\n}\r\n\r\nasync function getLocationCritetions({\r\n serverContext, countries,\r\n}) {\r\n const cid = serverContext.CurrentCustomer.Id;\r\n const aid = serverContext.CurrentAccount.Id;\r\n const lcid = serverContext ? serverContext.CurrentUser.LocaleID : '1033';\r\n\r\n const response = await getCountriesLocations(countries, lcid, cid, aid);\r\n const locationCriterions = [];\r\n\r\n each(response, (location) => {\r\n const criterion = locationTargetConverter.buildLocationCriterionFromSearchResult(\r\n location.data,\r\n { mode: 'location', status: 'Included' }\r\n );\r\n criterion.location = get(criterion, 'Criterion.LocationCriterion.NameTypeCombo');\r\n locationCriterions.push(criterion);\r\n });\r\n\r\n return locationCriterions;\r\n}\r\n\r\nexport async function modelConstraints(deal, adGroup, serverContext) {\r\n if (!deal || !adGroup) { return adGroup; }\r\n\r\n const isCreating = !adGroup.Id;\r\n\r\n const deviceConstraints = getTargetConstraints(deal, targetTypes.Device);\r\n const locationConstraints = getTargetConstraints(deal, targetTypes.Location);\r\n const ageConstraints = getTargetConstraints(deal, targetTypes.Age);\r\n const genderConstraints = getTargetConstraints(deal, targetTypes.Gender);\r\n const audienceConstraints = getTargetConstraints(deal, targetTypes.Audience);\r\n\r\n const dealLocationTargets = adGroup.locationTargets;\r\n if (isCreating && locationConstraints && locationConstraints.isRestricted === false && dealLocationTargets && dealLocationTargets.currentLevelSettings) {\r\n dealLocationTargets.currentLevelSettings.targetOption = 'everywhere';\r\n dealLocationTargets.currentLevelSettings.currentLocations = [];\r\n } else if (get(adGroup, ['locationTargets', 'currentLevelSettings', 'initLocations'], []).length === 0) {\r\n // locations\r\n const locations = await getLocationCritetions({\r\n serverContext,\r\n countries: locationConstraints.mandatory,\r\n });\r\n\r\n if (locations.length !== 0) {\r\n dealLocationTargets.currentLevelSettings.currentLocations = locations;\r\n dealLocationTargets.currentLevelSettings.initLocations = [];\r\n dealLocationTargets.currentLevelSettings.targetOption = 'specific';\r\n dealLocationTargets.useParentLevel = false;\r\n }\r\n }\r\n const adGroupModel = {};\r\n if (ageConstraints.isRestricted) {\r\n adGroupModel.ageRanges = [];\r\n adGroupModel.initialAgeRanges = [];\r\n adGroupModel.negativeAgeRanges = [];\r\n }\r\n\r\n if (genderConstraints.isRestricted) {\r\n adGroupModel.initialGenderTypes = [];\r\n adGroupModel.negativeGenderTYpes = [];\r\n adGroupModel.genderTypes = [];\r\n }\r\n\r\n if (audienceConstraints.isRestricted) {\r\n adGroupModel.audiences = [];\r\n }\r\n\r\n return {\r\n ...adGroup,\r\n ...adGroupModel,\r\n deal,\r\n locationTargets: dealLocationTargets,\r\n dealLocationList: locationConstraints.mandatory,\r\n deviceTypes: isCreating ? deviceConstraints.mandatory : adGroup.deviceTypes,\r\n deviceRestrictions: deviceConstraints.isRestricted ? Object.keys(DeviceKeys) : difference(Object.keys(DeviceKeys), deviceConstraints.mandatory),\r\n deviceRestricted: deviceConstraints.isRestricted,\r\n locationRestricted: locationConstraints.isRestricted,\r\n // locationRestricted: false,\r\n ageRestricted: ageConstraints.isRestricted,\r\n genderRestricted: genderConstraints.isRestricted,\r\n audienceRestricted: audienceConstraints.isRestricted,\r\n genreRestricted: true,\r\n };\r\n}\r\n","/* istanbul ignore file */\r\nimport { find, get } from 'underscore';\r\nimport { ceil } from 'lodash';\r\n\r\n// ref: /private/Campaign/MT/Source/Interface/Entity/CurrencyType.cs\r\n\r\nexport const CurrencyCode2CurrencyId = {\r\n AUD: 1,\r\n BRL: 2,\r\n ARS: 15,\r\n CAD: 3,\r\n CLP: 16,\r\n COP: 18,\r\n DKK: 5,\r\n EUR: 6,\r\n HKD: 30,\r\n INR: 36,\r\n JPY: 8,\r\n MXN: 57,\r\n NOK: 9,\r\n NZD: 10,\r\n PEN: 64,\r\n SGD: 74,\r\n ZAR: 13,\r\n SEK: 11,\r\n CHF: 4,\r\n USD: 12,\r\n GBP: 7,\r\n VEF: 87,\r\n TWD: 82,\r\n MYR: 58,\r\n PHP: 65,\r\n VND: 88,\r\n THB: 78,\r\n IDR: 34,\r\n DZD: 23,\r\n BHD: 42,\r\n EGP: 25,\r\n IQD: 37,\r\n JOD: 41,\r\n KWD: 46,\r\n LBP: 48,\r\n MAD: 52,\r\n QAR: 69,\r\n OMR: 62,\r\n SAR: 72,\r\n TND: 79,\r\n CNY: 17,\r\n TRY: 93,\r\n PLN: 67,\r\n AED: 21,\r\n ILS: 35,\r\n NGN: 99,\r\n KRW: 45,\r\n};\r\n\r\nexport const MTCurrencyConvertor = {\r\n AustralianDollar: 'AUD',\r\n BrazilianReal: 'BRL',\r\n CanadianDollar: 'CAD',\r\n SwissFranc: 'CHF',\r\n DanishKrone: 'DKK',\r\n EURO: 'EUR',\r\n UKPound: 'GBP',\r\n JapaneseYen: 'JPY',\r\n NorwegianKrone: 'NOK',\r\n NewZealandDollar: 'NZD',\r\n SwedishKrona: 'SEK',\r\n USDollar: 'USD',\r\n SouthAfricanRand: 'ZAR',\r\n ArgentinePeso: 'ARS',\r\n ChileanPeso: 'CLP',\r\n YuanRenminbi: 'CNY',\r\n ColombianPeso: 'COP',\r\n UAEDirham: 'AED',\r\n AlgerianDinar: 'DZD',\r\n EgyptianPound: 'EGP',\r\n HongKongDollar: 'HKD',\r\n IndonesianRupiah: 'IDR',\r\n IsraeliSheqel: 'ILS',\r\n IndianRupee: 'INR',\r\n LebanesePound: 'LBP',\r\n MoroccanDirham: 'MAD',\r\n MexicanPeso: 'MXN',\r\n MalaysianRinggit: 'MYR',\r\n PeruvianNuevoSol: 'PEN',\r\n PhilippinePeso: 'PHP',\r\n Zloty: 'PLN',\r\n QatariRial: 'QAR',\r\n SaudiRiyal: 'SAR',\r\n SingaporeDollar: 'SGD',\r\n ThaiBaht: 'THB',\r\n NewTaiwanDollar: 'TWD',\r\n VenezuelanBolivar: 'VEF',\r\n VietnamDong: 'VND',\r\n NewTurkishLira: 'TRY',\r\n NigerianNaira: 'NGN',\r\n Won: 'KRW',\r\n};\r\n\r\nexport const getConvertedCurrencyDealMinimumBid = (minimumBid, dealCurrency, accountCurrency, exchangeRateMapping) => {\r\n if (minimumBid && accountCurrency && exchangeRateMapping) {\r\n const dealCurrencyId = CurrencyCode2CurrencyId[MTCurrencyConvertor[dealCurrency] || 'USD'] || 12;\r\n const dealCurrencyToUSD = get(find(exchangeRateMapping, item => item.CurrencyId === dealCurrencyId), 'ExchangeRateValue', 1);\r\n\r\n const accountCurrencyId = CurrencyCode2CurrencyId[accountCurrency] || 12;\r\n const accountCurrencyToUSD = get(find(exchangeRateMapping, item => item.CurrencyId === accountCurrencyId), 'ExchangeRateValue', 1);\r\n\r\n return ceil((minimumBid * dealCurrencyToUSD) / accountCurrencyToUSD, 2);\r\n }\r\n return minimumBid;\r\n};\r\n","/* istanbul ignore file */\r\n\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { get, isNumber, uniq, chain, sortBy, compact } from 'underscore';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport decimal from '@bingads-webui-component-legacy/humanize/decimal';\r\nimport { getDealDetailsStyle } from './deal-detils-style';\r\nimport { getTargetConstraints } from './deal-constraints';\r\nimport { MTCurrencyConvertor } from './account-currency-daily-exchange-rate';\r\n\r\nexport function getVideoConstraintDuration(dealDetails, i18n) {\r\n const minimumDuration = get(dealDetails, 'DealAdQualityConstraints[0].MinimumDuration');\r\n if (minimumDuration && isNumber(minimumDuration)) {\r\n return `${Math.round(minimumDuration/1000, 1)} ${i18n.getString(_TL_('seconds'))}`;\r\n }\r\n return i18n.getString(_TL_('Unavailable'));\r\n}\r\n\r\nexport function isNetflixDeal(deal) {\r\n return deal.Seller && deal.Seller.toLowerCase().indexOf('netflix') > -1;\r\n}\r\n\r\nexport function isDealDeleted(deal) {\r\n return deal.Error && deal.Error === 'InvalidId';\r\n}\r\n\r\nconst AgeRanges = {\r\n EighteenToTwentyFive: _TL_('18-24'),\r\n TwentyFiveToThirtyFive: _TL_('25-34'),\r\n ThirtyFiveToFifty: _TL_('35-49'),\r\n FiftyToSixtyFive: _TL_('50-64'),\r\n SixtyFiveAndAbove: _TL_('65+'),\r\n Unknown: _TL_('Unknown'),\r\n};\r\n\r\nconst sortAgeRanges = ageRanges => sortBy(ageRanges, ageRange => AgeRanges[ageRange]);\r\n\r\nconst formatAgeRange = (ageRange, i18n) => (AgeRanges[ageRange] ? i18n.getString(AgeRanges[ageRange]) : ageRange);\r\n\r\nconst formatAgeRanges = (ageRanges, i18n) => {\r\n return chain(sortAgeRanges(ageRanges))\r\n .map(ageRange => formatAgeRange(ageRange, i18n))\r\n .join(i18n.getString(_TL_(', ')))\r\n .value();\r\n};\r\n\r\nexport function targetConstraintsToText(dealDetails, targetType, i18n, locationMap = {}) {\r\n const { mandatory, isRestricted } = getTargetConstraints(dealDetails, targetType);\r\n\r\n if (mandatory.length === 0) {\r\n if (isRestricted) {\r\n if (isNetflixDeal(dealDetails)) {\r\n return i18n.getString(_TL_('Unavailable'));\r\n }\r\n return i18n.getString(_TL_('Restricted'));\r\n }\r\n return i18n.getString(_TL_('No Restrictions'));\r\n }\r\n\r\n if (targetType === 'Location') {\r\n return uniq(mandatory.map((location) => {\r\n const locationName = locationMap[location];\r\n return locationName;\r\n })).join(', ');\r\n } else if (targetType === 'Age') {\r\n return formatAgeRanges(mandatory, i18n);\r\n }\r\n return mandatory.join(', ');\r\n}\r\n\r\nexport const DealDetails = (props) => {\r\n const { i18n, dealDetails, style, shouldShowGenre } = props;\r\n const classes = useDefaultStyles(getDealDetailsStyle);\r\n const dealOptions = compact([{\r\n name: i18n.getString(_TL_('Publisher')),\r\n value: dealDetails.Seller,\r\n }, {\r\n name: i18n.getString(_TL_('Minimum bid ')),\r\n value: dealDetails.MinimumBid ?\r\n `${decimal.fromFloatToString(dealDetails.MinimumBid, 2)} ${MTCurrencyConvertor[dealDetails.Currency] || 'USD'}` : `${i18n.getString(_TL_('Unavailable'))}`,\r\n }, {\r\n name: i18n.getString(_TL_('Duration ')),\r\n value: `${getVideoConstraintDuration(dealDetails, i18n)}`,\r\n }, {\r\n name: i18n.getString(_TL_('Country')),\r\n value: dealDetails.CountryName || i18n.getString(_TL_('Everywhere')),\r\n }, {\r\n name: i18n.getString(_TL_('Device targeting')),\r\n value: targetConstraintsToText(dealDetails, 'Device', i18n),\r\n }, {\r\n name: i18n.getString(_TL_('Gender targeting')),\r\n value: targetConstraintsToText(dealDetails, 'Gender', i18n),\r\n }, {\r\n name: i18n.getString(_TL_('Age targeting')),\r\n value: dealDetails.AgeRange || targetConstraintsToText(dealDetails, 'Age', i18n),\r\n }, {\r\n name: i18n.getString(_TL_('Audience targeting')),\r\n value: targetConstraintsToText(dealDetails, 'Audience', i18n),\r\n }, shouldShowGenre && {\r\n name: i18n.getString(_TL_('Genre targeting')),\r\n value: dealDetails.Genre ? _TL_('Available') : _TL_('Unavailable'),\r\n }]);\r\n\r\n return (\r\n
\r\n
\r\n
{i18n.getString(_TL_('Media deal details'))}
\r\n
\r\n {dealOptions.map(option => (\r\n
\r\n
{option.name}
\r\n
{option.value}
\r\n
\r\n ))}\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nDealDetails.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n dealDetails: PropTypes.shape({\r\n Seller: PropTypes.string,\r\n StartDate: PropTypes.string,\r\n EndDate: PropTypes.string,\r\n Genre: PropTypes.string,\r\n Currency: PropTypes.string,\r\n Duration: PropTypes.string,\r\n CountryName: PropTypes.string,\r\n MinimumBid: PropTypes.number,\r\n AskPrice: PropTypes.number,\r\n }).isRequired,\r\n style: PropTypes.shape({}),\r\n};\r\n\r\nDealDetails.defaultProps = {\r\n style: {},\r\n};\r\n","/* istanbul ignore file */\r\n\r\nexport function bytesForHuman(bytes) {\r\n if (!bytes) {\r\n return '';\r\n }\r\n let num = bytes;\r\n const units = ['', 'K', 'M', 'B', 'T', 'P'];\r\n\r\n let i = 0;\r\n\r\n for (i; num > 1000; i += 1) {\r\n num /= 1000;\r\n }\r\n\r\n return `${num.toFixed(1)} ${units[i]}`;\r\n}\r\n","import { pick, each, values, filter, extend, isUndefined, isNull, isEmpty, mapObject } from 'underscore';\r\n\r\nconst verifiedTrackingSettingAttachment = (ad) => {\r\n const verifiedTrackingSettings = ad.data.VerifiedTrackingSettings;\r\n if (isUndefined(verifiedTrackingSettings) || isNull(verifiedTrackingSettings)) {\r\n return {};\r\n }\r\n\r\n if (isEmpty(verifiedTrackingSettings)) {\r\n return { VerifiedTrackingData: '' };\r\n }\r\n const results = [];\r\n\r\n each(verifiedTrackingSettings, (setting) => {\r\n const result = [];\r\n mapObject(setting, (value, key) => {\r\n result.push({ Key: key, Value: value });\r\n });\r\n results.push(result);\r\n });\r\n\r\n return { VerifiedTrackingData: JSON.stringify(results) };\r\n};\r\n\r\nexport const viewModelToModelForAd = ({ adsViewModel, campaign, adGroup }, isDeletedEntities = false) => {\r\n // parse the ads\r\n const adViewModel = [];\r\n\r\n each(adsViewModel, (ad) => {\r\n const finalUrl = ad.data.FinalUrls;\r\n const trackingUrlTemplate = ad.data.TrackingUrlTemplate;\r\n const finalUrlSuffix = ad.data.FinalUrlSuffix;\r\n const urlCustomParameters = ad.data.UrlCustomParameters;\r\n\r\n const video = ad.data.video ? JSON.stringify([{ id: ad.data.video.id, idString: ad.data.video.idString, subType: ad.data.video.type }]) : undefined;\r\n const image = ad.data.image ? JSON.stringify([{\r\n id: ad.data.image.id,\r\n subType: 'DisplayCreativeImage',\r\n targetWidth: ad.data.image.targetWidth,\r\n targetHeight: ad.data.image.targetHeight,\r\n cropX: ad.data.image.cropX,\r\n cropY: ad.data.image.cropY,\r\n cropWidth: ad.data.image.cropWidth,\r\n cropHeight: ad.data.image.cropHeight,\r\n }]) : undefined;\r\n\r\n const verifiedTrackingSettingAttachmentObj = verifiedTrackingSettingAttachment(ad);\r\n const impressionTrackingUrls = ad.data.ImpressionTrackingUrls ? { ImpressionTrackingUrls: ad.data.ImpressionTrackingUrls } : {};\r\n\r\n const fields = {\r\n 'Client Id': `${ad.uid}`,\r\n FinalUrls: finalUrl,\r\n TrackingUrlTemplate: trackingUrlTemplate,\r\n FinalUrlSuffix: finalUrlSuffix,\r\n UrlCustomParameters: urlCustomParameters,\r\n Campaign: pick(campaign, 'Id'),\r\n AdGroup: pick(adGroup, 'Id'),\r\n ...verifiedTrackingSettingAttachmentObj,\r\n ...impressionTrackingUrls,\r\n };\r\n\r\n if (image) {\r\n extend(fields, { Images: image });\r\n }\r\n if (video) {\r\n extend(fields, { Videos: video });\r\n }\r\n\r\n if (ad.Id) {\r\n fields.Id = ad.Id;\r\n }\r\n\r\n if (isDeletedEntities) {\r\n fields.Status = 'Deleted';\r\n }\r\n\r\n if (ad.adSubType) {\r\n fields.AdSubType = ad.adSubType;\r\n }\r\n\r\n adViewModel.push(fields);\r\n });\r\n\r\n return adViewModel;\r\n};\r\n\r\nconst adsWithIdsAttached = (savedAdsData, oldAdsData) => {\r\n const ads = [];\r\n\r\n each(oldAdsData, (ad, idx) => {\r\n // From API find the saved Item that has the client id same as the view model uid.\r\n // Once we have this item we try to patch the Id into the data model, so next time we know this will be an update scenario.\r\n const savedAdItem = filter(savedAdsData, sAd => sAd['Client Id'] === `${ad.uid}`);\r\n\r\n if (savedAdItem && savedAdItem[0] && savedAdItem[0].Id) {\r\n ads[idx] = { ...ad, Id: savedAdItem[0].Id };\r\n } else {\r\n ads[idx] = { ...ad, Id: undefined };\r\n }\r\n });\r\n\r\n return ads;\r\n};\r\n\r\nexport const bulkModelToViewModelForAd = ({\r\n adsModel,\r\n originalAdsModel,\r\n}) => {\r\n const processedAds = adsWithIdsAttached(adsModel, originalAdsModel.data);\r\n\r\n const adViewModel = {\r\n data: processedAds,\r\n isValid: true,\r\n isDirty: false,\r\n currentPageIndex: 1,\r\n };\r\n\r\n return adViewModel;\r\n};\r\n\r\n\r\nexport const modelToViewModelForAd = ({\r\n adsModel,\r\n}) => {\r\n const adsVideoModel = { ...adsModel };\r\n\r\n return adsVideoModel;\r\n};\r\n\r\nexport const splitUpdateAndCreateAds = ({\r\n adsViewModel, oldAdsModel, campaign, adGroup,\r\n}) => {\r\n const adIds = [];\r\n\r\n const adsToCreate = [];\r\n const adsToUpdate = [];\r\n const adsToDelete = [];\r\n\r\n each(values(adsViewModel.data), (ad) => {\r\n if (ad.data && (ad.data.video || ad.data.image)) {\r\n const adToSave = { ...ad };\r\n if (adsViewModel.adSubType) {\r\n adToSave.adSubType = adsViewModel.adSubType;\r\n }\r\n\r\n // check if the ad has ID\r\n if (adToSave.Id) {\r\n adsToUpdate.push(adToSave);\r\n\r\n // add the Ids of Ads that have already been saved to API\r\n // so that we can delete if the oldAdsModel contains more Ids\r\n adIds.push(adToSave.Id);\r\n } else {\r\n adsToCreate.push(adToSave);\r\n }\r\n }\r\n });\r\n\r\n if (oldAdsModel) {\r\n // get ids of the ads that are deleted (missing in adIds array)\r\n each(values(oldAdsModel.data), (oldAd) => {\r\n if (oldAd.Id && !adIds.includes(oldAd.Id)) {\r\n adsToDelete.push(oldAd);\r\n }\r\n });\r\n }\r\n\r\n const adsNeededToCreate = viewModelToModelForAd({ adsViewModel: adsToCreate, campaign, adGroup });\r\n\r\n const adsNeededToUpdate = [\r\n ...viewModelToModelForAd({ adsViewModel: adsToUpdate, campaign, adGroup }),\r\n ...viewModelToModelForAd({ adsViewModel: adsToDelete, campaign, adGroup }, true),\r\n ];\r\n\r\n return { adsNeededToCreate, adsNeededToUpdate };\r\n};\r\n","import Promise from 'bluebird';\r\nimport _ from 'underscore';\r\nimport { ResponsiveAd } from '@bingads-webui/campaign-odata-schemas';\r\nimport { newVideoFromMTObject } from '@bingads-webui-campaign-react/image-experience-video-part';\r\nimport { edmCampaign, getEntityFromScope } from '@bingads-webui/edm-campaign';\r\nimport { QueryParam } from '@bingads-webui-react/scope-service';\r\n\r\nimport { isBulkWrappedResponse, getBulkUploadErrorType, modelToViewModelForBulkErrors, ERROR_ENTITY } from '../common';\r\nimport { bulkModelToViewModelForAd, splitUpdateAndCreateAds } from './ad';\r\n\r\nconst attachUidToErrorProperty = errors => _.map(errors, (error) => {\r\n // eslint-disable-next-line no-param-reassign\r\n error.Property = `${error.Property}_${error['Client Id']}`;\r\n\r\n return error;\r\n});\r\n\r\nconst GENERIC_ERROR_MESSAGE_KEY = _TL_(\"We've encountered an error and can't continue. Please contact support for further assistance.\");\r\n\r\nconst adEDM = edmCampaign.types.resolve('Model.ResponsiveAd');\r\nconst adResource = new adEDM.ResourceIdentifier();\r\n\r\n\r\nconst createData = data => adResource.bulkCreate.bind(adResource)(data);\r\n\r\nconst updateData = data => adResource.bulkUpdate.bind(adResource)(data);\r\n\r\nconst bulkUpsertAdSettingsEntityErrorMap = {\r\n [getBulkUploadErrorType(ResponsiveAd)]: ERROR_ENTITY.Ad,\r\n};\r\n\r\nexport const getODataConfig = (serverContext) => {\r\n const isLocal = () => {\r\n const hostname = document.location.hostname.toLowerCase();\r\n return hostname.indexOf('ads.microsoft.com') === -1 &&\r\n hostname.indexOf('ads-int.microsoft.com') === -1;\r\n };\r\n\r\n const odataPath = isLocal() ? 'Advertiser/V2' : 'Campaign/V2';\r\n\r\n const oDataConfig = {\r\n odataToken: serverContext.Token,\r\n oDataToken: serverContext.Token,\r\n odataPath: `${serverContext.ServicesEndpoints.CampaignAPI}${odataPath}`,\r\n oDataPath: `${serverContext.ServicesEndpoints.CampaignAPI}${odataPath}`,\r\n };\r\n\r\n return oDataConfig;\r\n};\r\n\r\nexport const getErrorsPlaceholders = () => ({\r\n systemErrors: [],\r\n serverErrors: [],\r\n});\r\n\r\nconst postVideoByUrl = ({ videoUrl }) => {\r\n const queryParam = new QueryParam(window.location);\r\n\r\n queryParam.remove(['adGroupId', 'campaignId']);\r\n const { currentEntity } = getEntityFromScope(queryParam);\r\n\r\n return currentEntity\r\n .Videos['Default.CreateVideo']\r\n .$makeCall({\r\n functionParams: {},\r\n payload: {\r\n videoUrl,\r\n description: '',\r\n },\r\n })\r\n .toPromise();\r\n};\r\n\r\nconst uploadVideo = ({ ad }) => postVideoByUrl({ videoUrl: ad.data.video.url }).then((res) => {\r\n _.extend(ad.data.video, newVideoFromMTObject({ SubType: 'VideoMedia16X9', Status: 'Draft', Id: res.value }));\r\n});\r\n\r\nconst uploadVideoIfNeeded = ({ ads }) => {\r\n const videoPromises = [];\r\n ads.data.forEach((ad) => {\r\n if (ad.data && ad.data.video && !ad.data.video.id) {\r\n videoPromises.push(uploadVideo({ ad }));\r\n }\r\n });\r\n\r\n if (_.isEmpty(videoPromises)) {\r\n return Promise.resolve(ads);\r\n }\r\n\r\n return Promise.all(videoPromises).then(() => ads);\r\n};\r\n\r\nexport const saveAds = ({\r\n ads,\r\n oldAdsModel,\r\n campaign,\r\n adGroup,\r\n activity = null,\r\n}, { scenario, i18n }) => uploadVideoIfNeeded({ ads }).then((adsViewModel) => {\r\n const { adsNeededToCreate, adsNeededToUpdate } = splitUpdateAndCreateAds({\r\n adsViewModel, oldAdsModel, campaign, adGroup,\r\n });\r\n\r\n const promises = {};\r\n\r\n if (adsNeededToCreate.length > 0) {\r\n promises.createAds = createData(adsNeededToCreate);\r\n }\r\n\r\n if (adsNeededToUpdate.length > 0) {\r\n promises.updateAds = updateData(adsNeededToUpdate);\r\n }\r\n\r\n return Promise.props(promises).then((results) => {\r\n const updatedAds = results.updateAds || [];\r\n const createdAds = results.createAds || [];\r\n\r\n const result = [...updatedAds, ...createdAds];\r\n\r\n const data = {\r\n ads: bulkModelToViewModelForAd({\r\n adsModel: result,\r\n originalAdsModel: adsViewModel,\r\n }),\r\n ...getErrorsPlaceholders(),\r\n };\r\n\r\n\r\n if (activity) {\r\n activity.signal(`onAdsSavedSuccessfully, redirecting to campaign grid page - adCount: ${result.length}`);\r\n }\r\n return data;\r\n }, (bulkOrSystemError) => {\r\n if (isBulkWrappedResponse(bulkOrSystemError)) {\r\n const { entity, errors } = bulkOrSystemError;\r\n\r\n // we need to attach uid to each error to identify which video panel has an error.\r\n // the uid is stored in the clientid of the error.\r\n const errorsWithPropertyIdsAttached = attachUidToErrorProperty(errors);\r\n\r\n const entities = entity ?\r\n bulkModelToViewModelForAd({\r\n adsModel: entity,\r\n originalAdsModel: adsViewModel,\r\n }) :\r\n adsViewModel;\r\n\r\n const serverErrors = modelToViewModelForBulkErrors(\r\n errorsWithPropertyIdsAttached,\r\n bulkUpsertAdSettingsEntityErrorMap,\r\n scenario,\r\n i18n,\r\n activity\r\n );\r\n\r\n if (activity) {\r\n activity.signal(`onAdsSavedUnsuccessfully, ${JSON.stringify(serverErrors)}`);\r\n }\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n ads: { ...entities },\r\n serverErrors,\r\n });\r\n }\r\n\r\n // Activity\r\n // eslint-disable-next-line no-console\r\n console.warn(`Campaign bulk upsert system error: ${bulkOrSystemError.stack || bulkOrSystemError.message || bulkOrSystemError}`);\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n ads: adsViewModel,\r\n systemErrors: [i18n.getString(GENERIC_ERROR_MESSAGE_KEY)],\r\n // TODO: We would want to return the criterions with Ids, but UI's bulk drops them\r\n });\r\n });\r\n});\r\n","import { odata } from '@bingads-webui/http-util';\r\nimport { getODataConfig } from '../model/ad-bulk';\r\n\r\nconst expireTimeDefault = 86400 * 1000; // 1 day\r\n\r\n\r\nexport function setLocalStorageWithExpire(key, data, expire) {\r\n const obj = {\r\n data,\r\n time: Date.now(),\r\n expire,\r\n };\r\n localStorage.setItem(key, JSON.stringify(obj));\r\n}\r\n\r\nfunction getLocalStorageWithExpire(key) {\r\n let val = localStorage.getItem(key);\r\n if (!val) {\r\n return null;\r\n }\r\n try {\r\n val = JSON.parse(val);\r\n } catch (error) {\r\n console.error('Error during JSON parse:', error);\r\n return null;\r\n }\r\n if (Date.now() - val.time > val.expire) {\r\n localStorage.removeItem(key);\r\n return { val: val.data, expired: true };\r\n }\r\n return { val: val.data, expired: false };\r\n}\r\n\r\nexport function getKey() {\r\n const date = new Date();\r\n return `${date.getFullYear}/${date.getMonth}/${date.getDay}`;\r\n}\r\n\r\nexport async function fetchExchangeRateMapping(serverContext) {\r\n const oDataConfig = getODataConfig(serverContext);\r\n const baseURL = `${oDataConfig.oDataPath}/Customers(${serverContext.CurrentCustomer.Id})/Accounts(${serverContext.CurrentAccount.Id})/`;\r\n const url = `${baseURL}/Default.GetExchangeRate`;\r\n\r\n try {\r\n const result = await odata.get(url, oDataConfig);\r\n if (result && result.value) {\r\n setLocalStorageWithExpire(getKey(), result.value, expireTimeDefault);\r\n return result.value;\r\n }\r\n } catch (error) {\r\n console.error(error + url);\r\n }\r\n return Promise.resolve();\r\n}\r\n\r\nexport function getAccountExchangeRateFromLocalStorage(serverContext) {\r\n let exchangeRateMapping = getLocalStorageWithExpire(getKey());\r\n\r\n if (!exchangeRateMapping || exchangeRateMapping.expired) {\r\n exchangeRateMapping = fetchExchangeRateMapping(serverContext);\r\n }\r\n\r\n return exchangeRateMapping;\r\n}\r\n","import config from '@bingads-webui-component-legacy/config/index';\r\nimport localStorage from '@bingads-webui-component-legacy/storage/localStorage';\r\n\r\nexport const isDealCampaign = () => location.pathname.includes('awarenessmediadeal');\r\nexport const isCTVCampaign = () => location.pathname.includes('awareness') && !isDealCampaign();\r\n\r\nexport const getVideoDeal = () => {\r\n if (!isDealCampaign()) {\r\n return null;\r\n }\r\n let videoDeal = config.get('VideoMediaDeal');\r\n if (!videoDeal) {\r\n if (localStorage.supportsStorage()) {\r\n videoDeal = localStorage.get('VideoMediaDeal');\r\n config.set('VideoMediaDeal', videoDeal);\r\n }\r\n }\r\n\r\n return videoDeal;\r\n};\r\n","import React, { useEffect, useState, useContext, useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport _ from 'underscore';\r\nimport { withCustomValidation, withError } from '@bingads-webui-react/validation';\r\nimport { VideoExperience, newVideoFromMTObject, ImageExperienceVideo } from '@bingads-webui-campaign-react/image-experience-video-part';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { entityIs, propertyIs, andComp } from '@bingads-webui-campaign-react/form-error';\r\nimport { Stack } from '@bingads-webui-react/fabric-control';\r\nimport { withControlErrorHandling, withUnvalidatedControlErrors } from '@bingads-webui-campaign-react/error-handling';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { withPreference } from '@bingads-webui-react/preference-context';\r\nimport { CopilotVideoEditor } from '@bingads-webui-campaign-react/edit-video-ads-view';\r\nimport { withAssetLibraryServicesLoaded } from '@bingads-webui-campaign-react/asset-library-services';\r\nimport { UiBlocker } from '@bingads-webui-react/ui-blocker';\r\nimport { TaskManager } from '@bingads-webui-universal/task-manager';\r\nimport { VideoTemplateEditorContextWrapper } from '@bingads-webui-campaign-react/video-ads-editor';\r\n\r\nimport { AddVideoButton } from './add-video-button';\r\nimport { IconButton } from '../common/shared-components';\r\nimport { VideoAdsSuggestionCarousel } from './video-ads-suggestion-carousel';\r\nimport { useVideoAdsCopilot } from './use-video-ads-copilot';\r\nimport { PlacementInfoWithStars } from './video-metadata';\r\nimport { ERROR_ENTITY } from '../common';\r\n\r\nconst entityIsAd = entityIs(ERROR_ENTITY.Ad);\r\n// TODO - move to a common place.\r\nconst legacyTemplates = ['00000001-0000-0000-0000-000000000000', '00000001-0000-0000-0000-000000000001'];\r\n\r\nexport const validateVideo = (video, i18n, videoRequirementForDeal, skipQualityValidation) => {\r\n const messages = [];\r\n\r\n if (!video) {\r\n messages.push(i18n.getString(_TL_('Please add a video.')));\r\n return messages;\r\n }\r\n\r\n if (video.Status !== 'Active') {\r\n return [];\r\n }\r\n\r\n /* istanbul ignore next */\r\n if (video.quality === 0 && !skipQualityValidation) {\r\n messages.push(i18n.getString(_TL_('Your video is low quality and doesn\\'t meet our requirements to serve on eligible networks. Please upload another file and try again.')));\r\n }\r\n\r\n if ((video.height < 720 || video.width < 960) && !skipQualityValidation) {\r\n messages.push(i18n.getString(_TL_('Your video must be at least 960x720 pixels. Please upload another file and try again.')));\r\n }\r\n\r\n /* istanbul ignore next */\r\n if (videoRequirementForDeal && video.quality < videoRequirementForDeal) {\r\n if (videoRequirementForDeal === 2) {\r\n messages.push(i18n.getString(_TL_('For this deal your asset must meet the General CTV requirements.')));\r\n } else if (videoRequirementForDeal === 4) {\r\n messages.push(i18n.getString(_TL_('For this deal your asset must meet the Premium Video requirements.')));\r\n }\r\n }\r\n\r\n if (messages.length > 1) {\r\n return video.Status === 'Active' ? [_.first(messages)] : [];\r\n }\r\n\r\n // for draft video, we only show processing error message.\r\n return messages;\r\n};\r\n\r\nconst getStyles = (/* components, theme */) => ({\r\n videoPanelButton: {\r\n justifyContent: 'flex-end',\r\n display: 'none',\r\n cursor: 'pointer',\r\n borderRadius: 99,\r\n background: '#FFFFFF',\r\n width: 32,\r\n height: 32,\r\n },\r\n videoPanelButtonContainer: {\r\n position: 'absolute',\r\n left: '50%',\r\n top: '50%',\r\n transform: 'translate(-50%, -50%)',\r\n columnGap: '10px',\r\n display: 'flex',\r\n },\r\n});\r\n\r\nconst CustomComponent = (props) => {\r\n const {\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n onDataChange,\r\n idx,\r\n i18n,\r\n videoAd,\r\n updateValidation,\r\n videoRequirementForDeal,\r\n permissions,\r\n renderError,\r\n assetLibraryConfig,\r\n dataService,\r\n copilotEnabled,\r\n isCTV,\r\n multiVideoMode,\r\n isVideoRequired,\r\n skipQualityValidation,\r\n loadClipchampPlayer,\r\n useBrandKit,\r\n setUseBrandKit,\r\n isBrandKitEmpty,\r\n ...rest\r\n } = props;\r\n const {\r\n getVideo,\r\n } = dataService;\r\n const {\r\n cid, aid, perfMarker, serverContext,\r\n } = rest;\r\n\r\n const video = videoAd && videoAd.video ? videoAd.video : null;\r\n\r\n const videoTemplateUIEnabled = permissions && permissions.dynamic && permissions.dynamic.VideoTemplateUI;\r\n const isGoogleImportVideoAdNeedsRepair = permissions && permissions.IsGoogleImportVideoAdsEnabled\r\n && _.get(videoAd, 'video.sourceType') === 'GoogleImported'\r\n && _.get(videoAd, 'video.status') === 'Failed';\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const classes = useDefaultStyles(getStyles);\r\n\r\n const [isUploading, setIsUploading] = useState(false);\r\n const [showVideoEditor, setShowVideoEditor] = useState(false);\r\n const [isFetchingVideo, setIsFetchingVideo] = useState(false);\r\n const [multiVideoList, setMultiVideoList] = useState(() => (videoAd && videoAd.videos ? [...videoAd.videos] : []));\r\n const [showMultiVideoCopilotEditor, setShowMultiVideoCopilotEditor] = useState({\r\n isOpen: false,\r\n });\r\n const [isVideoFetched, setIsVideoFetched] = useState(false);\r\n\r\n const enableEdit = video && video.template;\r\n const templateId = video && video.template && video.template.templateId;\r\n const isLegacyTemplate = legacyTemplates.includes(templateId);\r\n\r\n const onErrorsUpdated = (errors) => {\r\n // already converted using i18n;\r\n\r\n if (errors) {\r\n updateValidation(errors, { video: null });\r\n }\r\n };\r\n\r\n const onUpdateVideoList = (list) => {\r\n if (list.length > 0) {\r\n const validationMessage = validateVideo(list[0], i18n, videoRequirementForDeal, skipQualityValidation);\r\n updateValidation(validationMessage, { video: list[0] });\r\n if (activity) {\r\n activity.signal(`onVideoValidated - messages: ${validationMessage} - isValid: ${validationMessage.length === 0}`);\r\n }\r\n } else {\r\n updateValidation([i18n.getString(_TL_('Please add a video.'))], { video: null });\r\n }\r\n };\r\n\r\n const onUpdateMultiAdVideoList = useCallback((list) => {\r\n const validVideos = list.filter(multiVideo => multiVideo !== undefined);\r\n setMultiVideoList(validVideos);\r\n\r\n let validationMessages = [];\r\n if (validVideos.length > 0) {\r\n validationMessages = validVideos.map(valVideo => validateVideo(valVideo, i18n, videoRequirementForDeal, skipQualityValidation));\r\n }\r\n\r\n const aggregatedMessages = validationMessages.flat();\r\n\r\n updateValidation(aggregatedMessages, { videos: validVideos });\r\n if (activity) {\r\n activity.signal(`onVideoValidated - messages: ${aggregatedMessages} - isValid: ${aggregatedMessages.length === 0}`);\r\n }\r\n }, [i18n, updateValidation, videoRequirementForDeal, activity, skipQualityValidation]);\r\n\r\n useEffect(() => {\r\n if (isUploading) {\r\n updateValidation([i18n.getString(_TL_('Please wait while we upload your video.'))], { video: null });\r\n\r\n if (activity) {\r\n activity.signal('video is uploading');\r\n }\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [isUploading]);\r\n\r\n useEffect(() => {\r\n const shouldDirty = !(_.isUndefined(videoAd) || _.isNull(videoAd));\r\n ((multiVideoMode === false) && updateValidation(\r\n videoAd ? validateVideo(videoAd.video, i18n, videoRequirementForDeal, skipQualityValidation) : [i18n.getString(_TL_('Please add a video.'))],\r\n { video: videoAd && videoAd.video ? videoAd.video : null },\r\n shouldDirty\r\n ));\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, []);\r\n\r\n const onRenderItemDropdown = (values, videoAsset) => {\r\n if (values.uploadVideo !== null) {\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n
\r\n values.onReplace(videoAsset.Type)}\r\n iconProps={{ iconName: 'Edit' }}\r\n className=\"edit-icon-button\"\r\n styles={{ root: { borderRadius: '99px', height: 32, width: 32 } }}\r\n />\r\n
\r\n
\r\n );\r\n };\r\n\r\n const onRenderItemDropdownCoPilot = (values) => {\r\n if (values.uploadVideo !== null) {\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n {enableEdit &&\r\n
\r\n setShowVideoEditor(true)}\r\n iconProps={{ iconName: 'Edit' }}\r\n className=\"edit-icon-button\"\r\n styles={{ root: { borderRadius: '99px', height: 32, width: 32 } }}\r\n />\r\n
\r\n }\r\n
\r\n {\r\n const validationMessage = validateVideo(null, i18n, videoRequirementForDeal, skipQualityValidation);\r\n updateValidation(validationMessage, { video: null });\r\n }}\r\n iconProps={{ iconName: 'Cancel' }}\r\n className=\"remove-icon-button\"\r\n styles={{ root: { borderRadius: '99px', height: 32, width: 32 } }}\r\n />\r\n
\r\n
\r\n );\r\n };\r\n\r\n const onRenderItemDropDownForMultiModeWithCopilot = useCallback((selectedVideo, selectedIdx) => {\r\n const selectedMultiVideo = multiVideoList[selectedIdx];\r\n\r\n\r\n return (\r\n
\r\n {\r\n selectedVideo.template && (\r\n
\r\n setShowMultiVideoCopilotEditor({\r\n isOpen: true,\r\n video: selectedMultiVideo,\r\n idx: selectedIdx,\r\n })}\r\n iconProps={{ iconName: 'Edit' }}\r\n className=\"edit-icon-button\"\r\n styles={{ root: { borderRadius: '99px', height: 32, width: 32 } }}\r\n />\r\n
\r\n )\r\n }\r\n
\r\n {\r\n // remove only the selected video\r\n const updatedVideos = [...multiVideoList];\r\n updatedVideos.splice(selectedIdx, 1);\r\n onUpdateMultiAdVideoList(updatedVideos);\r\n }}\r\n\r\n iconProps={{ iconName: 'Cancel' }}\r\n className=\"remove-icon-button\"\r\n styles={{ root: { borderRadius: '99px', height: 32, width: 32 } }}\r\n />\r\n
\r\n
\r\n );\r\n }, [multiVideoList, classes.videoPanelButton, onUpdateMultiAdVideoList]);\r\n\r\n const getNewVideoObject = useCallback((newVideo) => {\r\n const validationMessage = validateVideo(newVideo, i18n, videoRequirementForDeal, skipQualityValidation);\r\n const videoObject = new ImageExperienceVideo({\r\n ...newVideo,\r\n width: newVideo.template.width,\r\n height: newVideo.template.height,\r\n src: newVideo.src || newVideo.url,\r\n type: 'VideoMedia16X9',\r\n thumbnailUrl: newVideo.thumbnailUrl,\r\n });\r\n videoObject.url = newVideo.url;\r\n if (!videoObject.recommendationId) {\r\n videoObject.recommendationId = newVideo.recommendationId || newVideo.suggestionId;\r\n }\r\n\r\n return { videoObject, validationMessage };\r\n }, [i18n, videoRequirementForDeal, skipQualityValidation]);\r\n\r\n const updateWithNewVideo = useCallback((newVideo) => {\r\n const { videoObject, validationMessage } = getNewVideoObject(newVideo);\r\n\r\n if (multiVideoMode) {\r\n const isDuplicate = multiVideoList.find(v => v.recommendationId === videoObject.recommendationId);\r\n if (!isDuplicate) {\r\n onUpdateMultiAdVideoList([...multiVideoList, videoObject]);\r\n }\r\n } else {\r\n updateValidation(validationMessage, {\r\n video: videoObject,\r\n });\r\n }\r\n }, [getNewVideoObject, multiVideoMode, multiVideoList, onUpdateMultiAdVideoList, updateValidation]);\r\n\r\n const updateWithNewVideoAtIdx = useCallback((newVideo, newVideoIdx) => {\r\n const videoObject = new ImageExperienceVideo({\r\n ...newVideo,\r\n width: newVideo.template.width,\r\n height: newVideo.template.height,\r\n src: newVideo.src || newVideo.url,\r\n type: 'VideoMedia16X9',\r\n thumbnailUrl: newVideo.thumbnailUrl,\r\n });\r\n videoObject.url = newVideo.url;\r\n if (!videoObject.recommendationId) {\r\n videoObject.recommendationId = newVideo.recommendationId || newVideo.suggestionId;\r\n }\r\n\r\n const updatedVideos = [...multiVideoList];\r\n updatedVideos[newVideoIdx] = videoObject;\r\n onUpdateMultiAdVideoList(updatedVideos);\r\n }, [multiVideoList, onUpdateMultiAdVideoList]);\r\n\r\n const onChangeVideo = useCallback((newVideo) => {\r\n updateWithNewVideo({ ...newVideo, status: 'Active' });\r\n }, [updateWithNewVideo]);\r\n\r\n const onChangeMultiVideo = useCallback((newVideo, newVideoIdx) => {\r\n updateWithNewVideoAtIdx({ ...newVideo, status: 'Active' }, newVideoIdx);\r\n }, [updateWithNewVideoAtIdx]);\r\n\r\n useEffect(() => {\r\n if (!multiVideoMode && video && video.id && video.metadata && !video.template) {\r\n setIsFetchingVideo(true);\r\n getVideo({ id: video.id, fetchMetadata: true }).then((newVideo) => {\r\n updateWithNewVideo(newVideoFromMTObject(newVideo));\r\n }).finally(() => {\r\n setIsFetchingVideo(false);\r\n });\r\n }\r\n }, [getVideo, updateWithNewVideo, video, multiVideoMode]);\r\n\r\n useEffect(() => {\r\n if (!isFetchingVideo & !isVideoFetched && copilotEnabled && multiVideoMode && multiVideoList.length > 0 && multiVideoList.some(v => v && v.id && v.metadata && !v.template)) {\r\n setIsFetchingVideo(true);\r\n const getVideoPromises = [];\r\n const updatedVideos = [];\r\n multiVideoList.forEach((v, index) => {\r\n if (v && v.id && v.metadata && !v.template) {\r\n getVideoPromises.push(getVideo({ id: v.id, fetchMetadata: true }).then((newVideo) => {\r\n const { videoObject } = getNewVideoObject(newVideoFromMTObject(newVideo));\r\n updatedVideos.push([videoObject, index]);\r\n }));\r\n } else {\r\n updatedVideos.push([v, index]);\r\n }\r\n });\r\n\r\n Promise.all(getVideoPromises).finally(() => {\r\n const existingVideos = [...multiVideoList];\r\n updatedVideos.forEach(([newVideo, index]) => {\r\n existingVideos[index] = newVideo;\r\n });\r\n\r\n onUpdateMultiAdVideoList(existingVideos);\r\n setIsFetchingVideo(false);\r\n setIsVideoFetched(true);\r\n });\r\n }\r\n }, [getVideo, updateWithNewVideo, multiVideoMode, multiVideoList, isFetchingVideo, onUpdateMultiAdVideoList, copilotEnabled, isVideoFetched, getNewVideoObject]);\r\n\r\n useEffect(() => {\r\n if (multiVideoMode && isVideoRequired && _.isEmpty(videoAd.videos)) {\r\n updateValidation([i18n.getString(_TL_('Please add a video.'))], { video: null }, false);\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, []);\r\n\r\n const { finalUrlForCopilot } = useVideoAdsCopilot();\r\n\r\n return (\r\n <>\r\n \r\n {(multiVideoMode === false) ? (\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n {!isGoogleImportVideoAdNeedsRepair && videoAd && videoAd.video && videoAd.video.quality !== undefined && (\r\n )}\r\n
) : (\r\n
\r\n \r\n
)}\r\n {renderError}\r\n {copilotEnabled && (!multiVideoMode || (multiVideoMode && multiVideoList.length < 5)) &&\r\n \r\n }\r\n \r\n {\r\n copilotEnabled && video && video.template && (\r\n videoTemplateUIEnabled && !isLegacyTemplate ? (\r\n {\r\n setShowVideoEditor(newOpen);\r\n }}\r\n isCTV={isCTV}\r\n cid={cid}\r\n aid={aid}\r\n finalUrl={finalUrlForCopilot}\r\n assetLibraryConfig={assetLibraryConfig}\r\n permissions={permissions}\r\n isAADUser={serverContext && serverContext.IsAADUser}\r\n serverContext={serverContext}\r\n perfMarker={perfMarker.createChild('VideoTemplateEditor')}\r\n isDialog\r\n loadClipchampPlayer={loadClipchampPlayer}\r\n />\r\n ) : (\r\n {\r\n setShowVideoEditor(newOpen);\r\n }}\r\n onApply={onChangeVideo}\r\n cid={cid}\r\n aid={aid}\r\n finalUrl={finalUrlForCopilot}\r\n assetLibraryConfig={assetLibraryConfig}\r\n permissions={permissions}\r\n isAADUser={serverContext && serverContext.IsAADUser}\r\n i18n={i18n}\r\n perfMarker={perfMarker.createChild('CopilotVideoEditor')}\r\n isCTV={isCTV}\r\n />\r\n )\r\n )\r\n }\r\n {\r\n copilotEnabled && multiVideoMode && (\r\n videoTemplateUIEnabled ? (\r\n onChangeMultiVideo(newVideo, showMultiVideoCopilotEditor.idx)}\r\n setIsOpen={(newOpen) => {\r\n setShowMultiVideoCopilotEditor({ isOpen: newOpen });\r\n }}\r\n isCTV={isCTV}\r\n cid={cid}\r\n aid={aid}\r\n finalUrl={finalUrlForCopilot}\r\n assetLibraryConfig={assetLibraryConfig}\r\n permissions={permissions}\r\n isAADUser={serverContext && serverContext.IsAADUser}\r\n serverContext={serverContext}\r\n perfMarker={perfMarker.createChild('VideoTemplateEditor')}\r\n isDialog\r\n loadClipchampPlayer={loadClipchampPlayer}\r\n />\r\n ) : (\r\n {\r\n setShowMultiVideoCopilotEditor({ isOpen: newOpen });\r\n }}\r\n onApply={newVideo => onChangeMultiVideo(newVideo, showMultiVideoCopilotEditor.idx)}\r\n cid={cid}\r\n aid={aid}\r\n finalUrl={finalUrlForCopilot}\r\n assetLibraryConfig={assetLibraryConfig}\r\n permissions={permissions}\r\n isAADUser={serverContext && serverContext.IsAADUser}\r\n i18n={i18n}\r\n perfMarker={perfMarker.createChild('CopilotVideoEditor')}\r\n isCTV={isCTV}\r\n />\r\n )\r\n )\r\n }\r\n \r\n );\r\n};\r\n\r\n\r\nCustomComponent.propTypes = {\r\n onDataChange: PropTypes.func.isRequired,\r\n idx: PropTypes.number.isRequired,\r\n videoAd: PropTypes.shape({\r\n video: PropTypes.shape({\r\n Status: PropTypes.string,\r\n VideoTemplateUI: PropTypes.bool,\r\n }),\r\n messages: PropTypes.arrayOf(PropTypes.string),\r\n }).isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n videoRequirementForDeal: PropTypes.number.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n VideoCopilotGeneration: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n renderError: PropTypes.node.isRequired,\r\n cid: PropTypes.string.isRequired,\r\n aid: PropTypes.string.isRequired,\r\n oDataConfig: PropTypes.shape({}).isRequired,\r\n perfMarker: PropTypes.shape({\r\n createChild: PropTypes.func,\r\n }).isRequired,\r\n serverContext: PropTypes.shape({\r\n IsAADUser: PropTypes.bool,\r\n }).isRequired,\r\n preferenceService: PropTypes.shape({}).isRequired,\r\n copilotEnabled: PropTypes.bool.isRequired,\r\n isVideoRequired: PropTypes.bool.isRequired,\r\n};\r\n\r\nconst VideoExperienceWithValidation = _.compose(\r\n withControlErrorHandling,\r\n withUnvalidatedControlErrors,\r\n withError,\r\n withCustomValidation,\r\n withAssetLibraryServicesLoaded\r\n)(CustomComponent);\r\n\r\nconst ValidatedVideoExperience = (props) => {\r\n const {\r\n videoAd, idx, i18n, multiVideoMode, isCTV, isVideoRequired, ...rest\r\n } = props;\r\n\r\n const {\r\n serverContext, preferenceService, cid, aid, oDataConfig,\r\n } = rest;\r\n\r\n const videoProp = andComp(entityIsAd, propertyIs(`Video.VideoMedia16X9_${idx}`));\r\n\r\n const validVideos = videoAd && Array.isArray(videoAd.videos) ? videoAd.videos.filter(video => video !== undefined) : [];\r\n\r\n const multiAdDataObj = { videos: validVideos };\r\n\r\n const dataObj = { video: videoAd ? videoAd.video : null };\r\n\r\n const processingMessage = i18n.getString(_TL_('We\\'re processing your video and reviewing its quality, which may take some time to complete. Please provide your Final URL and select Save. Then, you can check your video\\'s status from the ad grid.'));\r\n\r\n const passiveMessages = videoAd && videoAd.video && videoAd.video.Status === 'Draft' ? [processingMessage] : [];\r\n\r\n const updatedVideoAd = multiVideoMode ? { videos: validVideos } : videoAd;\r\n\r\n const activityLogger = useContext(ActivityContext);\r\n\r\n const assetLibraryConfig = {\r\n cid,\r\n aid,\r\n oDataConfig,\r\n dateFormat: _.get(serverContext, ['CurrentUser', 'CultureDateTimeFormat', 'ShortDatePattern']),\r\n timeZone: _.get(serverContext, ['CurrentAccount', 'TimeZone']),\r\n preferencesService: preferenceService,\r\n activityLogger,\r\n };\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nValidatedVideoExperience.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n videoAd: PropTypes.shape({\r\n video: PropTypes.shape({\r\n Status: PropTypes.string,\r\n }),\r\n }).isRequired,\r\n idx: PropTypes.number.isRequired,\r\n multiVideoMode: PropTypes.bool,\r\n isCTV: PropTypes.bool,\r\n isVideoRequired: PropTypes.bool.isRequired,\r\n skipQualityValidation: PropTypes.bool,\r\n};\r\n\r\nValidatedVideoExperience.defaultProps = {\r\n multiVideoMode: false,\r\n isCTV: false,\r\n skipQualityValidation: false,\r\n};\r\n\r\nconst VideoExperienceWithPreference = withPreference(ValidatedVideoExperience);\r\n\r\nconst VideoExperienceWithPreferenceRecommendationFetch = (props) => {\r\n const copilotFetchTaskManager = useMemo(() => new TaskManager(), []);\r\n const { fetch, isBrandKitEmpty, fetchBrandKit } = useVideoAdsCopilot();\r\n const { useBrandKit } = props;\r\n\r\n useEffect(() => {\r\n fetchBrandKit();\r\n }, [fetchBrandKit]);\r\n\r\n useEffect(() => {\r\n if (props.copilotEnabled) {\r\n fetch(copilotFetchTaskManager, useBrandKit);\r\n }\r\n }, [props, copilotFetchTaskManager, fetch]);\r\n\r\n return ;\r\n};\r\n\r\nexport { VideoExperienceWithPreference as ValidatedVideoExperience };\r\nexport { VideoExperienceWithPreferenceRecommendationFetch as ValidatedVideoExperienceWithRecommendationFetch };\r\n","import React, { useContext, useEffect, useMemo, useState, useCallback } from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { withCustomValidation, withError, ValidationGroup } from '@bingads-webui-react/validation';\r\nimport { withControlErrorHandling, withUnvalidatedControlErrors } from '@bingads-webui-campaign-react/error-handling';\r\nimport { ValidatedFinalUrl as UrlInput } from '@bingads-webui-campaign-react/validated-url-input';\r\n\r\n\r\nconst ValidatedFinalUrl = withControlErrorHandling(withUnvalidatedControlErrors(withError(withCustomValidation(UrlInput))));\r\n\r\nexport const FinalUrl = ({\r\n i18n,\r\n finalUrlsObj,\r\n containerClassName,\r\n setCopilotFinalUrl,\r\n isAdGridEditorMode,\r\n}) => {\r\n const activity = useContext(ActivityContext);\r\n const [validationState, setValidationState] = useState({});\r\n const [updatedCopilotFinalUrl, setUpdatedCopilotFinalUrl] = useState(false);\r\n\r\n const updateValidationState = (result) => {\r\n setValidationState(result);\r\n };\r\n\r\n const notifyCopilotFinalURLchange = useCallback(() => {\r\n const isValid = _.result(validationState, 'isValid', false);\r\n const finalUrls = _.result(validationState, ['data', 'FinalUrls'], undefined);\r\n const finalUrl = _.first(finalUrls);\r\n\r\n if (isValid) {\r\n if (activity) {\r\n activity.signal(`[VideoAdsCopilot] - Final URL changed to ${finalUrl}`);\r\n }\r\n\r\n setCopilotFinalUrl(finalUrl);\r\n setUpdatedCopilotFinalUrl(true);\r\n }\r\n }, [activity, validationState, setCopilotFinalUrl]);\r\n\r\n const handleKeyUp = useCallback((e) => {\r\n const { key } = e;\r\n if (key === 'Enter') {\r\n notifyCopilotFinalURLchange();\r\n }\r\n }, [notifyCopilotFinalURLchange]);\r\n\r\n const additionalProperties = useMemo(() => ({ onBlur: notifyCopilotFinalURLchange, onKeyUp: handleKeyUp }), [notifyCopilotFinalURLchange, handleKeyUp]);\r\n\r\n useEffect(() => {\r\n // for editor notify final url to trigger copilot on editor open\r\n if (isAdGridEditorMode && !updatedCopilotFinalUrl) {\r\n notifyCopilotFinalURLchange();\r\n }\r\n }, [isAdGridEditorMode, notifyCopilotFinalURLchange, updatedCopilotFinalUrl]);\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nFinalUrl.propTypes = {\r\n i18n: PropTypes.shape({}).isRequired,\r\n finalUrlsObj: PropTypes.shape({}).isRequired,\r\n containerClassName: PropTypes.string,\r\n setCopilotFinalUrl: PropTypes.func.isRequired,\r\n validationProps: PropTypes.shape({}).isRequired,\r\n isAdGridEditorMode: PropTypes.bool,\r\n};\r\n\r\nFinalUrl.defaultProps = {\r\n containerClassName: '',\r\n isAdGridEditorMode: false,\r\n};\r\n","import React, { useContext, useMemo, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport _ from 'underscore';\r\nimport { Stack } from '@bingads-webui-react/fabric-control';\r\nimport { ResponsiveAd } from '@bingads-webui/campaign-odata-schemas';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { mergeI18n } from '@bingads-webui-campaign-react/i18n-merger';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { ValidationGroup } from '@bingads-webui-react/validation';\r\nimport { ThirdPartyMeasurementContainerWithValidation } from '@bingads-webui-campaign-react/third-party-measurement';\r\nimport { CopilotRepositoryProvider } from '@bingads-webui/inline-copilot';\r\nimport { withRecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { AdvancedSettings } from '@bingads-webui-campaign-react/display-plus-native-ads';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport { CampaignFetchProvider } from '@bingads-webui-campaign-react/campaign-http';\r\n\r\nimport { ValidatedVideoExperience } from './validated-video-experience';\r\nimport { getAdsStepStyles } from './styles';\r\nimport { IconButton } from '../common/shared-components';\r\nimport { FinalUrl } from './final-url';\r\nimport { useVideoAdsCopilot } from './use-video-ads-copilot';\r\nimport { getODataConfig } from '../model/ad-bulk';\r\n\r\nconst VideoPanel = ({\r\n i18n,\r\n perfMarker,\r\n cid,\r\n aid,\r\n onUpdate,\r\n onRemovePanel,\r\n removeCloseButton,\r\n permissions,\r\n videoAd,\r\n keyIndex,\r\n isSelectedPanel,\r\n videoRequirementForDeal,\r\n oDataConfig: oDataConfigProp,\r\n customStyleFunction,\r\n useCustomStyleFunction,\r\n biddingScheme,\r\n isForDeal,\r\n isXandrServingCampaign,\r\n dealLoaded,\r\n setCopilotFinalUrl,\r\n isAdGridEditorMode,\r\n copilotFetchTaskManager,\r\n copilotEnabled,\r\n loadClipchampPlayer,\r\n useBrandKit,\r\n setUseBrandKit,\r\n}) => {\r\n const defaultClasses = useDefaultStyles(getAdsStepStyles);\r\n\r\n const customClasses = useDefaultStyles(customStyleFunction);\r\n\r\n const classes = useCustomStyleFunction ? customClasses : defaultClasses;\r\n\r\n const videoTypesWithOrder = ['VideoMedia16X9'];\r\n\r\n const serverContext = useContext(ServerContext);\r\n\r\n const {\r\n DynamicPermissions: {\r\n EnableMSANVideoCampaigns,\r\n },\r\n } = serverContext;\r\n\r\n const oDataConfig = oDataConfigProp || getODataConfig(serverContext);\r\n\r\n const isBiddingStrategyCPV = _.get(biddingScheme, 'Type') === 'ManualCpv';\r\n\r\n const legacyI18n = useMemo(() => window.globalLegacyI18n.get('$/i18n!legacy/global'), []);\r\n\r\n const i18nMerged = useMemo(() => mergeI18n(legacyI18n, i18n), [legacyI18n, i18n]);\r\n\r\n const finalUrlsObj = { FinalUrls: videoAd && videoAd.FinalUrls };\r\n\r\n const { fetch, isBrandKitEmpty, fetchBrandKit } = useVideoAdsCopilot();\r\n\r\n const verifiedTrackingSettingObj = useMemo(() => ({\r\n VerifiedTrackingSettings: videoAd && videoAd.VerifiedTrackingSettings,\r\n }), [videoAd]);\r\n\r\n const shouldRepairGoogleImportVideoAd = permissions && permissions.IsGoogleImportVideoAdsEnabled\r\n && _.get(videoAd, 'video.sourceType') === 'GoogleImported'\r\n && _.get(videoAd, 'video.status') === 'Failed';\r\n\r\n const onValidationUpdate = (result) => {\r\n onUpdate(result);\r\n };\r\n\r\n useEffect(() => {\r\n fetchBrandKit();\r\n }, [fetchBrandKit]);\r\n\r\n useEffect(() => {\r\n if (copilotEnabled) {\r\n fetch(copilotFetchTaskManager, useBrandKit);\r\n setClarityTag({ VideoCopilotGeneration: true });\r\n }\r\n }, [copilotEnabled, copilotFetchTaskManager, fetch, useBrandKit]);\r\n\r\n const advancedSettings = useMemo(() => (\r\n \r\n ), [biddingScheme, verifiedTrackingSettingObj.VerifiedTrackingSettings, videoAd]);\r\n\r\n return (\r\n
\r\n \r\n \r\n {!removeCloseButton &&\r\n
\r\n \r\n
\r\n }\r\n \r\n
\r\n \r\n
\r\n {\r\n // If Xandr serving campaign\r\n // and\r\n // CPM and enable IAS\r\n isXandrServingCampaign &&\r\n permissions.EnableIASVerifiedImpressionTrackingURLsForBrandAwarenessCampaign && !isBiddingStrategyCPV\r\n && (\r\n \r\n )}\r\n {\r\n // Hide when Deal or CTV or EditMode Xandr Serving\r\n EnableMSANVideoCampaigns &&\r\n !isForDeal && !isBiddingStrategyCPV && !(isAdGridEditorMode && isXandrServingCampaign) &&\r\n
\r\n {advancedSettings}\r\n
\r\n }\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nVideoPanel.propTypes = {\r\n perfMarker: PropTypes.shape({}).isRequired,\r\n permissions: PropTypes.shape({\r\n EnableIASVerifiedImpressionTrackingURLsForBrandAwarenessCampaign: PropTypes.bool,\r\n IsMOATEnabled: PropTypes.bool,\r\n IsGoogleImportVideoAdsEnabled: PropTypes.bool,\r\n dynamic: PropTypes.shape({\r\n VideoCopilotGeneration: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n cid: PropTypes.number.isRequired,\r\n aid: PropTypes.number.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n getLocale: PropTypes.func.isRequired,\r\n }).isRequired,\r\n biddingScheme: PropTypes.shape({}).isRequired,\r\n onUpdate: PropTypes.func.isRequired,\r\n onRemovePanel: PropTypes.func.isRequired,\r\n removeCloseButton: PropTypes.bool.isRequired,\r\n videoAd: PropTypes.shape([]).isRequired,\r\n keyIndex: PropTypes.number.isRequired,\r\n isSelectedPanel: PropTypes.bool.isRequired,\r\n oDataConfig: PropTypes.shape({}),\r\n customStyleFunction: PropTypes.func,\r\n useCustomStyleFunction: PropTypes.bool,\r\n videoRequirementForDeal: PropTypes.number,\r\n isForDeal: PropTypes.bool,\r\n dealLoaded: PropTypes.bool,\r\n setCopilotFinalUrl: PropTypes.func.isRequired,\r\n isAdGridEditorMode: PropTypes.bool,\r\n copilotFetchTaskManager: PropTypes.shape({}).isRequired,\r\n copilotEnabled: PropTypes.bool.isRequired,\r\n isXandrServingCampaign: PropTypes.bool,\r\n};\r\n\r\nVideoPanel.defaultProps = {\r\n oDataConfig: null,\r\n customStyleFunction: _.noop,\r\n videoRequirementForDeal: null,\r\n useCustomStyleFunction: false,\r\n isForDeal: false,\r\n dealLoaded: null,\r\n isAdGridEditorMode: false,\r\n isXandrServingCampaign: false,\r\n};\r\n\r\nconst VideoPanelWithContexts = ({ ...props }) => {\r\n const [copilotFinalUrl, setCopilotFinalUrl] = React.useState('');\r\n const serverContext = useContext(ServerContext);\r\n const { permissions } = props;\r\n const isUsingVideoTemplates = permissions && permissions.dynamic && permissions.dynamic.VideoTemplateUI;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nVideoPanelWithContexts.propTypes = {\r\n i18n: PropTypes.shape({\r\n getLocale: PropTypes.func.isRequired,\r\n }).isRequired,\r\n campaignId: PropTypes.number.isRequired,\r\n};\r\n\r\nconst WrappedComponent = withRecommendationContext(VideoPanelWithContexts);\r\n\r\nexport { WrappedComponent as VideoPanel };\r\n\r\n","import { useState, useCallback } from 'react';\r\nimport _ from 'underscore';\r\n\r\nconst ITEMS_PER_PAGE = 10;\r\n\r\nconst MAX_ITEMS = 10;\r\n\r\nconst addItemsToPages = (pages, lastPage, lastPageIndex, count) => {\r\n const page = lastPage;\r\n\r\n if (page.numberOfAdsInPage + count > ITEMS_PER_PAGE) {\r\n const remaining = count - (ITEMS_PER_PAGE - page.numberOfAdsInPage);\r\n const itemsBefore = pages.slice(0, lastPageIndex - 1);\r\n const itemsAfter = pages.slice(lastPageIndex, pages.length);\r\n\r\n const newPageItem = { numberOfAdsInPage: ITEMS_PER_PAGE, pageNumber: page.pageNumber, id: page.id };\r\n\r\n const nextPageItem = { numberOfAdsInPage: 0, pageNumber: page.pageNumber + 1, id: Math.random() };\r\n\r\n return addItemsToPages([...itemsBefore, newPageItem, ...itemsAfter], nextPageItem, lastPageIndex + 1, remaining);\r\n }\r\n\r\n const itemsBefore = pages.slice(0, lastPageIndex - 1);\r\n const itemsAfter = pages.slice(lastPageIndex, pages.length);\r\n\r\n const newPageItem = { numberOfAdsInPage: page.numberOfAdsInPage + count, pageNumber: page.pageNumber, id: page.id };\r\n\r\n return {\r\n currentPage: newPageItem,\r\n pages: [...itemsBefore, newPageItem, ...itemsAfter],\r\n };\r\n};\r\n\r\nexport const usePageManager = (ads, initialAdsCount = 1) => {\r\n const calculateTotalPages = () => {\r\n if (_.isUndefined(ads)) {\r\n return 1;\r\n }\r\n const totalPages = Math.ceil(ads.length / ITEMS_PER_PAGE);\r\n\r\n return totalPages;\r\n };\r\n\r\n const [totalPages, setTotalPages] = useState(calculateTotalPages());\r\n\r\n const maxItems = MAX_ITEMS;\r\n\r\n const createPages = () => {\r\n if (_.isUndefined(ads)) {\r\n return [{ numberOfAdsInPage: initialAdsCount, pageNumber: 1, id: Math.random() }];\r\n }\r\n\r\n if (ads.length === 0) {\r\n return [{ numberOfAdsInPage: initialAdsCount, pageNumber: 1, id: Math.random() }];\r\n }\r\n\r\n let totalAds = ads.length;\r\n\r\n return _.map(_.range(totalPages), (idx) => {\r\n const numberOfAdsInPage = totalAds > ITEMS_PER_PAGE ? ITEMS_PER_PAGE : totalAds;\r\n\r\n totalAds -= ITEMS_PER_PAGE;\r\n return { numberOfAdsInPage, pageNumber: idx + 1, id: Math.random() };\r\n });\r\n };\r\n\r\n const [currentPageIndex, setCurrentPageIndex] = useState(1);\r\n\r\n const [pages, setPages] = useState(createPages());\r\n\r\n const [currentPage, setCurrentPage] = useState(pages[0]);\r\n\r\n const getPageAdjustedIndex = (idx, pageNumber = null) => {\r\n const page = pageNumber || currentPageIndex;\r\n\r\n const val = (((page - 1) * ITEMS_PER_PAGE) + idx);\r\n\r\n return val;\r\n };\r\n\r\n const onAddPage = useCallback(() => {\r\n const newPage = { numberOfAdsInPage: 1, pageNumber: currentPageIndex + 1, id: Math.random() };\r\n\r\n setPages([...pages.concat(newPage)]);\r\n setCurrentPage(newPage);\r\n setCurrentPageIndex(currentPageIndex + 1);\r\n setTotalPages(totalPages + 1);\r\n }, [currentPageIndex, pages, totalPages]);\r\n\r\n const onAddItem = () => {\r\n const page = currentPage;\r\n\r\n if (page.numberOfAdsInPage === ITEMS_PER_PAGE) {\r\n onAddPage();\r\n } else {\r\n const itemsBefore = pages.slice(0, currentPageIndex - 1);\r\n const itemsAfter = pages.slice(currentPageIndex, pages.length);\r\n\r\n const newPageItem = { numberOfAdsInPage: page.numberOfAdsInPage + 1, pageNumber: page.pageNumber, id: page.id };\r\n setCurrentPage(newPageItem);\r\n setPages([...itemsBefore, newPageItem, ...itemsAfter]);\r\n }\r\n };\r\n\r\n const onAddItemsToPage = (count) => {\r\n const lastPage = pages[pages.length - 1];\r\n\r\n const lastPageIndex = pages.length;\r\n\r\n const {\r\n pages: newPages,\r\n } = addItemsToPages(pages, lastPage, lastPageIndex, count);\r\n\r\n setPages(newPages);\r\n setTotalPages(newPages.length);\r\n setCurrentPage(newPages[newPages.length - 1]);\r\n setCurrentPageIndex(newPages.length);\r\n };\r\n\r\n const goToNextPage = () => {\r\n setCurrentPageIndex(currentPageIndex + 1);\r\n setCurrentPage({ ...pages[(currentPageIndex - 1) + 1] });\r\n };\r\n\r\n const goToPrevPage = () => {\r\n setCurrentPageIndex(currentPageIndex - 1);\r\n setCurrentPage({ ...pages[(currentPageIndex - 1) - 1] });\r\n };\r\n\r\n const goToPage = (val) => {\r\n const valInt = parseInt(val, 10);\r\n if (valInt > 0 && valInt <= totalPages) {\r\n _.debounce(setCurrentPageIndex(parseInt(valInt, 10)), 100);\r\n setCurrentPage(pages[valInt - 1]);\r\n }\r\n };\r\n\r\n const removeLastPage = () => {\r\n setCurrentPage({ ...pages[(currentPageIndex - 1) - 1] });\r\n setPages([...pages.splice(0, pages.length - 1)]);\r\n setCurrentPageIndex(currentPageIndex - 1);\r\n setTotalPages(totalPages - 1);\r\n };\r\n\r\n const removeItemFromLastPage = () => {\r\n const lastPage = pages[pages.length - 1];\r\n\r\n if (lastPage.numberOfAdsInPage === 1) {\r\n removeLastPage();\r\n } else {\r\n const newPage = { id: lastPage.id, numberOfAdsInPage: lastPage.numberOfAdsInPage - 1, pageNumber: lastPage.pageNumber };\r\n\r\n const itemsBefore = pages.slice(0, pages.length - 1);\r\n\r\n setCurrentPage({ ...newPage });\r\n setPages([...itemsBefore, newPage]);\r\n }\r\n };\r\n\r\n const removeItem = () => {\r\n if (currentPage.numberOfAdsInPage === 1) {\r\n removeLastPage();\r\n } else if (pages.length === 1) {\r\n const newPage = { id: currentPage.id, numberOfAdsInPage: currentPage.numberOfAdsInPage - 1, pageNumber: currentPage.pageNumber };\r\n\r\n setCurrentPage({ ...newPage });\r\n setPages([newPage]);\r\n } else {\r\n removeItemFromLastPage();\r\n }\r\n };\r\n\r\n return {\r\n currentPage,\r\n currentPageIndex,\r\n pages,\r\n getPageAdjustedIndex,\r\n goToPrevPage,\r\n goToNextPage,\r\n goToPage,\r\n onAddPage,\r\n onAddItem,\r\n onAddItemsToPage,\r\n removeItem,\r\n totalPages,\r\n maxItems,\r\n };\r\n};\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React, { useState, useEffect, useContext, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { MessageBar } from '@fluentui/react';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { FontIcon, Text } from '@bingads-webui-react/fabric-control';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport { TaskManager } from '@bingads-webui-universal/task-manager';\r\nimport { useCopilotLoggers, useInitCopilotLoggers } from '@bingads-webui-campaign-react/copilot-loggers';\r\nimport { isCopilotRegionRestricted } from '@bingads-webui-react/copilot-utils';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { VideoPanel } from './video-panel';\r\nimport { PlacementQualities } from '../ad-components';\r\nimport { Link, TextField } from '../common/shared-components';\r\nimport { getAdsStepStyles } from './styles';\r\nimport { usePageManager } from './page-manager';\r\n\r\n// TODO: Upload video styling for smaller videos.\r\n// TODO: Upload video styling for larger videos.\r\n// TODO: Add background of video while uploading.\r\n// TODO: Add label for processing.\r\n// TODO: Add progress video background\r\n// TODO: Add suggested placements component next to the video.\r\n\r\n\r\n// TODO: Add dots for Ad Preview pagination - DONE\r\n\r\n\r\nexport const VideoAdsContainer = (props) => {\r\n const {\r\n aid,\r\n cid,\r\n i18n,\r\n perfMarker,\r\n onAdsValidation,\r\n currentVideoIndex,\r\n ads = [],\r\n oDataConfig,\r\n disablePagination,\r\n permissions,\r\n deal,\r\n dealLoaded,\r\n customStyleFunction,\r\n useCustomStyleFunction,\r\n resetFields,\r\n isAdGridEditorMode,\r\n allowCopilotVideoGeneration,\r\n biddingScheme = {},\r\n campaignId,\r\n hideFooter,\r\n isXandrServingCampaign,\r\n loadClipchampPlayer,\r\n } = props;\r\n\r\n const videoRequirementForDeal = _.get(deal, ['DealAdQualityConstraints', '0', 'VideoQuality']);\r\n\r\n const isForDeal = !_.isEmpty(deal);\r\n\r\n let dealVideoRequirementText;\r\n if (videoRequirementForDeal === PlacementQualities.ONLY_PERFECT) {\r\n dealVideoRequirementText = i18n.getString(_TL_('Your campaign\\'s media deal requires that your video is of excellent quality (three stars). For more information about the technical requirements, see '));\r\n } else if (videoRequirementForDeal === PlacementQualities.ONLY_EXCELLENT) {\r\n dealVideoRequirementText = i18n.getString(_TL_('For this deal your asset must meet the General Video requirements.'));\r\n }\r\n\r\n const isEditScenario = useMemo(() => isAdGridEditorMode && ads && ads[0] && ads[0].Id, [ads, isAdGridEditorMode]);\r\n\r\n useInitCopilotLoggers({ campaignId, feature: 'VideoAds', isEditScenario });\r\n\r\n const { logEnterFlow } = useCopilotLoggers();\r\n\r\n const defaultClasses = useDefaultStyles(getAdsStepStyles);\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const customClasses = useDefaultStyles(customStyleFunction);\r\n\r\n const classes = useCustomStyleFunction ? customClasses : defaultClasses;\r\n\r\n const [videoAds, setVideoAds] = useState(ads || []);\r\n\r\n const [useBrandKit, setUseBrandKit] = useState(true);\r\n\r\n const copilotFetchTaskManager = useMemo(() => new TaskManager(), []);\r\n\r\n const serverContext = useContext(ServerContext);\r\n const [isAdsCopilotRegionRestricted, setIsAdsCopilotRegionRestricted] = useState(true);\r\n useEffect(() => {\r\n isCopilotRegionRestricted({\r\n feature: 'Recommendations',\r\n permissions,\r\n serverContext,\r\n }).then(setIsAdsCopilotRegionRestricted);\r\n }, [permissions, serverContext]);\r\n\r\n const copilotEnabled = allowCopilotVideoGeneration &&\r\n permissions.dynamic.VideoCopilotGeneration &&\r\n !isAdsCopilotRegionRestricted &&\r\n (!videoRequirementForDeal || videoRequirementForDeal < PlacementQualities.ONLY_PERFECT);\r\n\r\n const {\r\n goToNextPage,\r\n goToPrevPage,\r\n goToPage,\r\n getPageAdjustedIndex,\r\n currentPage,\r\n currentPageIndex,\r\n pages,\r\n onAddItem,\r\n removeItem,\r\n totalPages,\r\n maxItems,\r\n } = usePageManager(ads);\r\n\r\n const onAddAd = () => {\r\n onAddItem();\r\n if (activity) {\r\n activity.signal(`Adding new ad panel - current total: ${currentPage.numberOfAdsInPage}`);\r\n }\r\n };\r\n\r\n const onVideoPanelUpdate = (result, idx, uid) => {\r\n let itemAtIdx = videoAds[idx] || { video: null, FinalUrls: [], uid: null };\r\n\r\n if (itemAtIdx.uid === null) {\r\n itemAtIdx = { ...result, uid, Id: itemAtIdx.Id };\r\n } else {\r\n itemAtIdx = { ...result, uid: itemAtIdx.uid, Id: itemAtIdx.Id };\r\n }\r\n\r\n const itemsBefore = videoAds.slice(0, idx);\r\n const itemsAfter = videoAds.slice(idx + 1, videoAds.length);\r\n setVideoAds([...itemsBefore, { ...itemAtIdx }, ...itemsAfter]);\r\n };\r\n\r\n const onRemovePanel = (idx) => {\r\n if (activity) {\r\n activity.signal(`Removing ad panel at idx ${idx}`);\r\n }\r\n videoAds.splice(idx, 1);\r\n\r\n setVideoAds([...videoAds]);\r\n\r\n removeItem();\r\n };\r\n\r\n const isAllValid = () => {\r\n let valid = true;\r\n // eslint-disable-next-line consistent-return\r\n _.each(videoAds, (ad) => {\r\n if (!ad.isValid) {\r\n valid = false;\r\n }\r\n });\r\n\r\n return valid;\r\n };\r\n\r\n const isAllDirty = () => {\r\n let dirty = false;\r\n // eslint-disable-next-line consistent-return\r\n _.each(videoAds, (ad) => {\r\n if (ad.isDirty) {\r\n dirty = true;\r\n }\r\n });\r\n\r\n return dirty;\r\n };\r\n\r\n useEffect(() => {\r\n if (activity) {\r\n activity.signal(`[VideoAdsCopilot] - useBrandKitToggle changed to ${useBrandKit}`);\r\n }\r\n }, [useBrandKit, activity]);\r\n\r\n useEffect(() => {\r\n const result = {\r\n data: [...videoAds], isValid: isAllValid(), isDirty: isAllDirty(), currentPageIndex,\r\n };\r\n onAdsValidation(result);\r\n if (activity) {\r\n activity.signal(`onVideoAdsContainerValidated - ${JSON.stringify(result)}`);\r\n }\r\n // disabling exhaustive deps since the onAdsValidation value changes on each rerender.\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [currentPageIndex, videoAds]);\r\n\r\n useEffect(() => {\r\n if (resetFields) {\r\n setVideoAds([]);\r\n }\r\n }, [resetFields]);\r\n\r\n useEffect(() => {\r\n setClarityTag('XandrVideoAds', 'true');\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!_.isEqual(ads, videoAds) && !isAdGridEditorMode) {\r\n // check if ads has any ad that has id. (update scenario)\r\n let shouldUpdate = false;\r\n\r\n _.each(ads, (ad) => {\r\n const videoAd = _.filter(videoAds, vAd => vAd.uid === ad.uid);\r\n\r\n if (videoAd && videoAd[0] && _.isUndefined(videoAd[0].Id) && ad.Id) {\r\n shouldUpdate = true;\r\n }\r\n\r\n // For reload scenario if we can't find any ad in local state, refresh state\r\n if (permissions.dynamic.MultiAdFormat && _.isEmpty(videoAd) && ad.Id) {\r\n shouldUpdate = true;\r\n }\r\n });\r\n\r\n if (shouldUpdate) {\r\n setVideoAds(ads);\r\n }\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [ads]);\r\n\r\n useEffect(() => {\r\n if (copilotEnabled) {\r\n logEnterFlow();\r\n }\r\n }, [copilotEnabled, logEnterFlow]);\r\n\r\n return (\r\n
\r\n {\r\n dealVideoRequirementText &&\r\n \r\n {dealVideoRequirementText}\r\n {(videoRequirementForDeal === PlacementQualities.ONLY_PERFECT) &&\r\n \r\n {i18n.getString(_TL_('About video ads'))}.\r\n }\r\n \r\n }\r\n {\r\n _.map(pages, (page) => {\r\n const panels = _.map(_.range(page.numberOfAdsInPage), (idx) => {\r\n const videoAd = (videoAds[getPageAdjustedIndex(idx, page.pageNumber)] && videoAds[getPageAdjustedIndex(idx, page.pageNumber)].data);\r\n\r\n const uid = (videoAds[getPageAdjustedIndex(idx, page.pageNumber)] && videoAds[getPageAdjustedIndex(idx, page.pageNumber)].uid) || Math.random();\r\n\r\n const isCurrentPage = page.id === currentPage.id;\r\n\r\n return (\r\n
\r\n onVideoPanelUpdate(result, getPageAdjustedIndex(idx, page.pageNumber), uid)}\r\n onRemovePanel={() => onRemovePanel(getPageAdjustedIndex(idx, page.pageNumber), page)}\r\n removeCloseButton={page.numberOfAdsInPage === 1}\r\n keyIndex={uid}\r\n videoRequirementForDeal={videoRequirementForDeal}\r\n isSelectedPanel={currentVideoIndex === idx}\r\n oDataConfig={oDataConfig}\r\n biddingScheme={biddingScheme}\r\n isXandrServingCampaign={isXandrServingCampaign}\r\n isForDeal={isForDeal}\r\n dealLoaded={dealLoaded}\r\n isAdGridEditorMode={isAdGridEditorMode}\r\n copilotEnabled={copilotEnabled}\r\n loadClipchampPlayer={loadClipchampPlayer}\r\n useBrandKit={useBrandKit}\r\n setUseBrandKit={setUseBrandKit}\r\n />\r\n
\r\n );\r\n });\r\n\r\n return panels;\r\n })\r\n }\r\n
\r\n {\r\n (!hideFooter && (currentPage.numberOfAdsInPage < maxItems && !disablePagination)) && (\r\n \r\n  {i18n.getString(_TL_('Create another ad'))}\r\n \r\n )\r\n }\r\n
\r\n {totalPages > 1 && !disablePagination && (\r\n
\r\n
\r\n \r\n Prev \r\n \r\n goToPage(val)}\r\n />\r\n of {totalPages} \r\n \r\n Next \r\n \r\n
\r\n
\r\n )}\r\n
\r\n );\r\n};\r\n\r\n\r\nVideoAdsContainer.propTypes = {\r\n aid: PropTypes.string.isRequired,\r\n cid: PropTypes.string.isRequired,\r\n biddingScheme: PropTypes.shape({}).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n perfMarker: PropTypes.shape({}).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n VideoCopilotGeneration: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n onAdsValidation: PropTypes.func.isRequired,\r\n ads: PropTypes.shape({\r\n data: PropTypes.shape({}),\r\n }).isRequired,\r\n oDataConfig: PropTypes.shape({}),\r\n disablePagination: PropTypes.bool,\r\n customStyleFunction: PropTypes.func,\r\n useCustomStyleFunction: PropTypes.bool,\r\n resetFields: PropTypes.bool,\r\n currentVideoIndex: PropTypes.number,\r\n isAdGridEditorMode: PropTypes.bool,\r\n hideFooter: PropTypes.bool,\r\n deal: PropTypes.shape({}),\r\n dealLoaded: PropTypes.bool,\r\n allowCopilotVideoGeneration: PropTypes.bool,\r\n campaignId: PropTypes.number,\r\n isXandrServingCampaign: PropTypes.bool,\r\n};\r\n\r\nVideoAdsContainer.defaultProps = {\r\n oDataConfig: null,\r\n disablePagination: false,\r\n customStyleFunction: _.noop,\r\n useCustomStyleFunction: false,\r\n deal: null,\r\n dealLoaded: false,\r\n resetFields: false,\r\n hideFooter: false,\r\n currentVideoIndex: 0,\r\n isAdGridEditorMode: false,\r\n allowCopilotVideoGeneration: false,\r\n campaignId: -1,\r\n isXandrServingCampaign: false,\r\n};\r\n","/* istanbul ignore file */\r\n\r\nimport { get, uniq, isEmpty } from 'underscore';\r\nimport { edmCampaign } from '@bingads-webui/edm-campaign';\r\nimport { getTargetConstraints, getCountriesLocations } from '../common/deal-constraints';\r\n\r\nexport const fillLocationForDeal = async (deal, serverContext) => {\r\n if (!deal) {\r\n return Promise.resolve();\r\n }\r\n const locationIds = getTargetConstraints(deal, 'Location').mandatory;\r\n\r\n const cid = serverContext.CurrentCustomer.Id;\r\n const aid = serverContext.CurrentAccount.Id;\r\n const lcid = serverContext ? serverContext.CurrentUser.LocaleID : '1033';\r\n\r\n const responses = await getCountriesLocations(locationIds, lcid, cid, aid);\r\n const CountryName = uniq(responses.map(res => res.data.EnglishName)).join(',');\r\n return {\r\n ...deal,\r\n CountryName,\r\n };\r\n};\r\n\r\nexport const getDealDetails = async (cid, aid, campaignId, serverContext) => {\r\n try {\r\n const targets = await edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .Campaigns.$withKey(campaignId)\r\n .CampaignCriterions.$cast('Model.CampaignCriterion')\r\n .get({\r\n filter: {\r\n where: \"isof(Criterion,'Model.DealCriterion')\",\r\n },\r\n })\r\n .toPromise();\r\n\r\n const dealId = get(targets, 'value[0].Criterion.DealId');\r\n\r\n if (!dealId) {\r\n return Promise.resolve();\r\n }\r\n\r\n try {\r\n const dealDetail = await edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .Deals.$withKey(targets.value[0].Criterion.DealId)\r\n .get()\r\n .toPromise();\r\n\r\n if (serverContext) {\r\n const filledDeal = await fillLocationForDeal(dealDetail, serverContext);\r\n return filledDeal;\r\n }\r\n return dealDetail;\r\n } catch (error) {\r\n console.error(error);\r\n // If we get an error with errorCode InvalidId,\r\n // we will return the dealId and the error code as it is deleted by Xandr.\r\n const errorCodeTarget = GetDealErrorCode(error, 'InvalidId');\r\n if (errorCodeTarget) {\r\n return Promise.resolve({\r\n Id: dealId,\r\n Error: errorCodeTarget,\r\n });\r\n }\r\n return Promise.resolve();\r\n }\r\n } catch (error) {\r\n console.error(error);\r\n return Promise.resolve();\r\n }\r\n};\r\n\r\nconst GetDealErrorCode = (error, expectedError) => {\r\n if (error.status !== 400) {\r\n return null;\r\n }\r\n\r\n const responseErrArray = get(error, ['responseJSON', 'value']);\r\n if (isEmpty(responseErrArray)) {\r\n return null;\r\n }\r\n\r\n if (get(responseErrArray, [0, 'Code']) === expectedError) {\r\n return expectedError;\r\n }\r\n return null;\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Button, makeStyles, mergeClasses, tokens } from '@fluentui/react-components';\r\n\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\n\r\nconst useStyles = makeStyles({\r\n buttonStyle: {\r\n marginRight: tokens.spacingHorizontalS,\r\n marginTop: tokens.spacingVerticalL,\r\n },\r\n});\r\n\r\nexport const AdEditorFooter = ({\r\n cancel,\r\n save,\r\n saveAndCreateAnother,\r\n}) => {\r\n const classes = useStyles();\r\n const i18n = useContext(I18nContext);\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nAdEditorFooter.propTypes = {\r\n cancel: PropTypes.func.isRequired,\r\n save: PropTypes.func.isRequired,\r\n saveAndCreateAnother: PropTypes.func.isRequired,\r\n};\r\n","import React, { useEffect, useState, useContext } from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { FluentProvider, webLightTheme, Divider } from '@fluentui/react-components';\r\nimport { ErrorMessages } from '@bingads-webui-react/validation';\r\nimport { withComponentErrorLogging } from '@bingads-webui-campaign-react/global-error-options';\r\nimport { withLoggingContext, useCopilotLoggers } from '@bingads-webui-campaign-react/copilot-loggers';\r\nimport { InstrumentationContext } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { getLogVersion } from '@bingads-webui-campaign-react/asset-library-model';\r\nimport {\r\n getLoggerWithoutPageInfo,\r\n createVideoRepository,\r\n createImageRepository,\r\n createFolderRepository,\r\n uploadVideoMetadata,\r\n} from '@bingads-webui-campaign-react/asset-library-services';\r\nimport { newVideoFromMTObject } from '@bingads-webui-campaign-react/image-experience-video-part';\r\nimport { UiBlocker } from '@bingads-webui-react/ui-blocker';\r\n\r\n\r\nimport { saveAds, getDealDetails } from '../model';\r\nimport { VideoAdsContainer } from './video-ads-container';\r\nimport { AdPreview } from './ad-preview';\r\nimport { AdEditorFooter } from './ad-editor-footer';\r\n\r\nconst getAdsStepStyles = (/* components, theme */) => ({\r\n videoPanelRoot: {\r\n marginTop: 20,\r\n width: 500,\r\n minHeight: 181,\r\n padding: 20,\r\n paddingBottom: 20,\r\n background: '#FFFFFF',\r\n boxShadow: '0px 2px 4px rgba(0, 0, 0, 0.1)',\r\n borderRadius: 6,\r\n '& .image-list-item-status-indicator': {\r\n background: 'linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%)',\r\n borderRadius: 6,\r\n width: '170px !important',\r\n height: '96px !important',\r\n paddingTop: '10px !important',\r\n '&:hover': {\r\n '& .edit-button': {\r\n display: 'none',\r\n },\r\n },\r\n '& .placeholder-content': {\r\n color: 'white !important',\r\n },\r\n },\r\n '& .error': {\r\n marginTop: 20,\r\n },\r\n '& .image-experience-content': {\r\n width: 170,\r\n '& .col-sm-3': {\r\n background: 'linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%)',\r\n borderRadius: 6,\r\n width: '170px !important',\r\n height: '96px !important',\r\n paddingTop: '10px !important',\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n '&:hover': {\r\n '& .edit-button': {\r\n display: 'none',\r\n },\r\n },\r\n '& .placeholder-content': {\r\n color: 'white !important',\r\n },\r\n '& .ms-Button': {\r\n width: 56,\r\n height: 24,\r\n marginTop: 10,\r\n },\r\n '& .image-list-content': {\r\n width: '170px !important', // fixed for 16:9 aspect ratio\r\n border: 'none !important',\r\n padding: '0px !important',\r\n },\r\n },\r\n },\r\n '& .image-section-label': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '& .image-list-label': {\r\n fontWeight: 600,\r\n },\r\n '& .image-list-content': {\r\n width: '170px !important', // fixed for 16:9 aspect ratio\r\n border: 'none !important',\r\n padding: '0px !important',\r\n },\r\n '& .image-list-item-video': {\r\n position: 'relative',\r\n width: '170px !important', // fixed for 16:9 aspect ratio\r\n '&:hover': {\r\n '& .edit-button': {\r\n display: 'flex',\r\n },\r\n },\r\n '& .placeholder-content': {\r\n color: 'black !important',\r\n },\r\n\r\n },\r\n '& .image-item-ratio-label': {\r\n paddingTop: 10,\r\n },\r\n '& .thumbnail-preview': {\r\n borderRadius: 6,\r\n filter: 'drop-shadow(0px 0.6px 1.8px rgba(0, 0, 0, 0.1)) drop-shadow(0px 3.2px 7.2px rgba(0, 0, 0, 0.13))',\r\n width: '170px !important',\r\n height: '96px !important',\r\n },\r\n },\r\n selectedPanel: {\r\n border: '1px solid #0078D4',\r\n },\r\n videoPanelHeader: {\r\n display: 'flex',\r\n width: '100%',\r\n justifyContent: 'flex-end',\r\n },\r\n adPreviewTitle: {\r\n fontSize: 18,\r\n fontWeight: 600,\r\n },\r\n previewContainer: {\r\n height: 280,\r\n width: 498,\r\n },\r\n adPreviewHeader: {\r\n height: 40,\r\n },\r\n adPreviewRoot: {\r\n width: 540,\r\n padding: 20,\r\n paddingBottom: 20,\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n },\r\n video: {\r\n borderRadius: '6px',\r\n filter: 'drop-shadow(0px 0.6px 1.8px rgba(0, 0, 0, 0.1)) drop-shadow(0px 3.2px 7.2px rgba(0, 0, 0, 0.13))',\r\n },\r\n previewTag: {\r\n marginTop: 10,\r\n },\r\n pagination: {\r\n paddingTop: 10,\r\n width: '100%',\r\n },\r\n pageControls: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n columnGap: '10px',\r\n },\r\n paginationIndicatorDot: {\r\n height: 8,\r\n width: 8,\r\n borderRadius: '50%',\r\n display: 'inline-block',\r\n cursor: 'pointer',\r\n },\r\n paginationButton: {\r\n height: 8,\r\n width: 8,\r\n opacity: 0,\r\n },\r\n paginationIndicator: {\r\n display: 'flex',\r\n columnGap: '2px',\r\n },\r\n videoPanelContent: {\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n },\r\n placementInfoTile: {\r\n paddingTop: 20,\r\n marginLeft: 10,\r\n },\r\n});\r\n\r\nconst containerStyle = {\r\n display: 'flex',\r\n '& .image-list-content': {\r\n border: 'none !important',\r\n padding: '0px !important',\r\n },\r\n};\r\n\r\nconst AdEditor = ({\r\n aid,\r\n cid,\r\n i18n,\r\n perfMarker,\r\n permissions,\r\n adsModel,\r\n campaignId,\r\n adGroupId,\r\n onAdsValidation,\r\n oDataConfig,\r\n resetFields,\r\n biddingScheme,\r\n isXandrServingCampaign,\r\n onCancel,\r\n onSave,\r\n onSaveAndCreateAnother,\r\n isMultiAdFormatAd,\r\n loadClipchampPlayer,\r\n}) => {\r\n const [deal, setDeal] = useState(null);\r\n const [dealLoaded, setDealLoaded] = useState(false);\r\n const [serverErrors, setServerErrors] = useState(null);\r\n const [blocking, setBlocking] = useState(false);\r\n const instrumentation = useContext(InstrumentationContext);\r\n const { logSuggestionsApplied } = useCopilotLoggers();\r\n\r\n useEffect(() => {\r\n const fetchDeal = async () => {\r\n const dealDetail = await getDealDetails(cid, aid, campaignId);\r\n setDeal(dealDetail);\r\n setDealLoaded(true);\r\n };\r\n\r\n fetchDeal();\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, []);\r\n\r\n const scenario = instrumentation.createScenario('XandrVideoAdsAdEditing');\r\n const activity = scenario.createActivity('Ad');\r\n const versionForLog = getLogVersion(permissions);\r\n const logger = getLoggerWithoutPageInfo(activity, versionForLog, 'XandrVideoAdsAdEditing');\r\n\r\n const videoRepository = createVideoRepository({\r\n oDataConfig,\r\n aid,\r\n cid,\r\n });\r\n const folderRepository = createFolderRepository({\r\n i18n,\r\n logger,\r\n oDataConfig,\r\n aid,\r\n cid,\r\n });\r\n const imageRepository = createImageRepository({\r\n oDataConfig,\r\n aid,\r\n cid,\r\n logger,\r\n i18n,\r\n activity,\r\n });\r\n\r\n const saveAd = () => saveAds({\r\n ads: isMultiAdFormatAd ? { ...adsModel, adSubType: 'Video' } : adsModel,\r\n campaign: { Id: campaignId },\r\n adGroup: { Id: adGroupId },\r\n activity,\r\n }, { scenario, i18n }).then((adData) => {\r\n const suggestionIds = _.chain(adsModel.data)\r\n .map(ad => ad.data.video.recommendationId).compact().value();\r\n\r\n logSuggestionsApplied(\r\n campaignId,\r\n adGroupId,\r\n undefined /* textSuggestions */,\r\n undefined /* imageSuggestionIds */,\r\n suggestionIds\r\n );\r\n return adData;\r\n }).finally(() => setBlocking(false));\r\n\r\n const saveVideoAd = () => {\r\n setBlocking(true);\r\n\r\n if (adsModel.data[0].data.video.id) {\r\n return saveAd();\r\n }\r\n\r\n const videoMetaData = _.omit(adsModel.data[0].data.video, 'savedMaterial');\r\n const { savedImages, savedLogo } = adsModel.data[0].data.video.savedMaterial || {};\r\n\r\n return uploadVideoMetadata({\r\n videoMetadata: videoMetaData,\r\n newVideoFromMTObject,\r\n savedImages,\r\n savedLogo,\r\n folderRepository,\r\n imageRepository,\r\n videoRepository,\r\n }).then((uploadedVideo) => {\r\n // eslint-disable-next-line no-param-reassign\r\n adsModel.data[0].data.video = uploadedVideo;\r\n return saveAd();\r\n });\r\n };\r\n\r\n const save = (saveAnother) => {\r\n setServerErrors(null);\r\n\r\n if (!adsModel.isValid) {\r\n return Promise.resolve(false);\r\n }\r\n\r\n return saveVideoAd().then((result) => {\r\n if (result && result.ads && result.ads.data) {\r\n if (saveAnother) {\r\n onSaveAndCreateAnother(result);\r\n } else {\r\n onSave(result);\r\n }\r\n }\r\n }).catch((result) => {\r\n setServerErrors(result.serverErrors);\r\n });\r\n };\r\n\r\n const cancel = () => {\r\n onCancel();\r\n };\r\n\r\n return (\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n error.message) : []} />\r\n
\r\n _.noop}\r\n ads={adsModel}\r\n disablePagination\r\n customStyleFunction={getAdsStepStyles}\r\n useCustomStyleFunction\r\n permissions={permissions}\r\n loadClipchampPlayer={loadClipchampPlayer}\r\n />\r\n
\r\n \r\n save(false)}\r\n saveAndCreateAnother={() => save(true)}\r\n />\r\n
\r\n \r\n
);\r\n};\r\nAdEditor.propTypes = {\r\n containerStyle: PropTypes.shape({}).isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n aid: PropTypes.string.isRequired,\r\n cid: PropTypes.string.isRequired,\r\n campaignId: PropTypes.string.isRequired,\r\n adGroupId: PropTypes.string.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n perfMarker: PropTypes.shape({}).isRequired,\r\n adsModel: PropTypes.shape({\r\n data: PropTypes.shape({}),\r\n isValid: PropTypes.bool.isRequired,\r\n }).isRequired,\r\n onAdsValidation: PropTypes.func.isRequired,\r\n oDataConfig: PropTypes.shape({}).isRequired,\r\n resetFields: PropTypes.bool.isRequired,\r\n serverErrors: PropTypes.shape({}),\r\n biddingScheme: PropTypes.shape({}),\r\n isXandrServingCampaign: PropTypes.bool,\r\n isMultiAdFormatAd: PropTypes.bool,\r\n onCancel: PropTypes.func.isRequired,\r\n onSave: PropTypes.func.isRequired,\r\n onSaveAndCreateAnother: PropTypes.func.isRequired,\r\n};\r\n\r\nAdEditor.defaultProps = {\r\n serverErrors: null,\r\n biddingScheme: {},\r\n isXandrServingCampaign: false,\r\n isMultiAdFormatAd: false,\r\n};\r\n\r\n\r\nconst AdEditorWithErrorLogging = withLoggingContext(withComponentErrorLogging(\r\n AdEditor,\r\n 'XandrVideoAdsAdEditing'\r\n));\r\n\r\nexport { AdEditorWithErrorLogging as AdEditor };\r\n\r\n"],"names":["ErrorReason","_ref","reason","_jsx","children","Text","variant","styles","root","color","ExclusionErrors","_ref2","errors","map","error","className","_","Value","Key","value","_jsxs","style","display","defaultProps","textStyles","fontWeight","IpExclusions","exclusions","placeholder","handleExclusionInputChange","i18n","useContext","I18nContext","_useState","useState","_useState2","_slicedToArray","exclusionList","setExclusionList","useMemo","handleExclusionTextFieldChange","useCallback","input","target","type","Stack","horizontal","tokens","childrenGap","getString","_TL_","HelpButton","topic","TextField","multiline","rows","resizable","onChange","length","getStyles","link","paddingLeft","SiteExclusionNote","withSiteMap","level","siteMap","path","getRoutePathById","classes","useDefaultStyles","showAWFWarning","PermissionsContext","dynamic","AWFWebExclusionsWarning","MessageBar","layout","MessageBarBody","MessageBarTitle","ScopeLevel","AdGroup","size","Link","href","rel","textFieldStyles","fieldGroup","borderColor","SiteExclusions","readOnlyExclusions","readOnly","WebExclusions","showSiteExclusion","showIPExclusion","showAccordion","siteInputProps","ipInputProps","exclusionData","setExclusionsCallback","siteExclusions","Campaign","campaignExclusions","adgroupExclusions","campaignReadOnlySiteExclusions","ipExclusions","hasSiteExclusionsErrors","find","hasIpExclusionsErrors","siteExclusionsError","NegativeSitesResult","ipExclusionsError","NegativeIPsResult","siteExclusionsInput","_objectSpread","ipExclusionsInput","Accordion","multiple","collapsible","AccordionItem","AccordionHeader","AccordionPanel","entitySeparator","formatInvalidEntities","InvalidEntities","ValidEntities","join","getExclusionCount","split","getSummary","siteExclusionsCount","ipExclusionsCount","adgroupLevelExclusionCount","campaignLevelExclusionCount","webExclusionPropertyVal","propertyIs","ServerValidatedWebExclusions","withAttentionBeacon","withFormError","showError","Adapters","FormErrorBeaconAdapter","ValidationBeaconAdapter","WebExclusionsWithValidation","withCustomValidation","updateValidation","parentData","rest","_objectWithoutProperties","_excluded","exclusionsData","keyName","patchExclusions","_defineProperty","ServerValidatedWebExclusionsWithValidation","WebExclusionsSection","expand","ValidatedPanel","title","TextTitle","titleKey","icon","image","iconStyles","width","topicKey","details","attentionBeaconProps","getExtraProps","getPanelErrorProps","actuationProps","expandKey","formErrorProps","filter","TEXT_CONTENT","description","block","allow","listLabel","ariaLabel","useTagContentStyles","fontWeightSemibold","List","alignItems","columnGap","spacingHorizontalXS","marginBottom","spacingVerticalL","ListItem","justifyContent","Container","flexDirection","ButtonContainer","spacingHorizontalL","PopoverContentBefore","spacingHorizontalS","EntitySelector","maxWidth","marginTop","spacingVerticalS","useStaticStyles","CustomWebsiteListTagItemRenderer","content","callMT","async","url","method","body","headers","response","fetch","JSON","stringify","ok","Error","json","getHeadersRequestByServerContext","serverContext","lcid","CurrentUser","Locale","PageTrackingId","Authorization","Token","CustomerAccountId","CurrentAccount","Id","CustomerId","AdvertiserCustomerID","RequestMethod","repository","getListsByAccountId","SharedEntityScope","SharedEntityType","SharedEntityId","ServicesEndpoints","CmAPI","Post","associateListsToCampaign","lists","campaignId","previousAssociations","this","getListsByCampaignId","previousSet","Set","newSet","removedAssociations","Array","from","id","has","newAssociations","deleteListAssociationsByAccountId","Associations","EntityId","EntityType","Delete","payload","EntityIds","associated","queryBody","entities","item","SharedEntities","entity","WebsiteListSelector","listType","selected","isUnderlineLink","isGreyBackground","linkType","text","linkText","Label","ServerEntitySelectorInline","fetchData","then","count","items","Name","customFilter","search","toLowerCase","includes","selectionMode","onRenderTagContent","onRenderItemContent","flatItem","ItemCount","popOverContentBefore","withProps","extraProps","WrappedComponent","HoC","props","finalProps","displayName","concat","getDisplayName","hoistNonReactStatics","withStoreLoadingContainer","minHeight","paddingTop","withStoreErrorContainer","padding","lineHeight","flexGrow","marginLeft","UrlContainer","MobileUrlContainer","storeFormattedText","providerId","getStoreResponse","isStoreNotFoundFetchError","storeFetchError","isArray","raw","some","ErrorCode","createStoreDetails","name","storeUrl","DestinationUrl","withStoreFromProviderId","HOC","fetchComplete","storeDetails","storeFetchState","setStoreFetchState","activity","ActivityContext","storeQueries","getStoreQueriesWithLocalMock","useEffect","getStore","getStoreError","trace","loadingSpinner","Loading","isVisible","loadingError","Alert","message","dismissible","React","undefined","noop","getTopLevelDomainFromUrl","hostNameParts","URL","hostname","partCount","isFinalUrlAlignedWithStoreDomain","finalUrl","storeDomain","finalUrlDomain","withStoreUrl","validationProps","storeDetailsInternal","useRef","current","domain","validationOnUrlChange","finalUrlValidatorError","result","storeUrlText","classNames","prepopulateUrl","STEP_STATE","WizardPerfMarkerContext","createContext","StepPerfMarker","parentPerfMarker","markerName","stepPerfMarkerRef","_useContext","_useContext$register","register","_useContext$unregiste","unregister","currentStepState","useWizardService","state","toStrings","createChild","autoEnd","handleStepStateChange","STEP_STATES","FETCHING","willFetchFile","LOADING","willInit","ACTIVE","willRender","setTimeout","done","propTypes","PropTypes","isRequired","WizardPerfMarker","wizardName","wizardMarker","wizardPerfMarkerContext","currentStepId","getCurrentStepId","currentStep","perfMarkerRef","checkAndCreateChildMarker","Provider","ErrorString","Fragment","nowrap","Errors","SpanWithComponent","_ref3","SpanText","Component","withVerticalAlignCenterSpan","defaultRender","verticalAlign","nameErrorCode","getNameErrorMsg","_ref4","code","maxLength","number","validateName","_ref5","checkShouldShowError","attribute","isInvalid","isDirty","checkShouldShowErrors","isCampaignNameValid","defaultName","CampaignName","setName","campaingNameText","shouldShowError","classnames","label","onRenderLabel","HelpPopup","e","x","locationTargetsOptionKeys","everywhere","specific","bundleOrDefaultMarket","getLocationsString","settings","isAdGroupLevel","arguments","bidStrategyType","hideBid","targetOption","_settings$currentLoca","currentLocations","isTargetEverywhere","includedLocations","SelectionStatus","excludedLocations","forEach","index","location","LocalizationKeys","bidAdjustmentDropdown","bidAdjustmentInput","getLocationTargetTitleDetails","parentLevelSettings","currentLevelSettings","useParentLevel","BING_MAPS_API_KEY","toasterId","SpecificLocationTargetsEditor","data","setData","edmCampaign","allowPositiveLocationTargeting","allowNegativeLocationTargeting","showSearchTypeOptions","strings","scope","defaultSelectedSearchType","isBrandAwarenessCampaignScenario","showBulkLocations","mapRef","mapBulkLocationsRef","isDrawerOpen","setIsBulkLocationsSearchDrawerOpen","_useToastController","useToastController","dispatchToast","dismissToast","ServerContext","makeLocationsCall","_scope$values","values","cid","aid","Customers","$withKey","Accounts","Locations","get","select","IsBrandAwarenessCampaignScenario","toPromise","catch","console","log","makeBulkLocationsCall","searchTerms","countryCode","_scope$values2","signal","$makeCall","query","where","servingChannel","renderToaster","toastId","intent","toastTitle","toastMessage","Toast","ToastTitle","action","ToastTrigger","Button","appearance","Dismiss24Regular","onClick","ToastBody","pauseOnHover","timeout","position","handleBulkLocationsSearchDrawerOpen","searchOptions","getLocations","skipBingMapAPISearch","getIsRadiusTarget","targetingType","defaultGetIsRadiusTarget","TARGETING_TYPE","Included","setBulkLocationsData","targetedLocations","conflictingCount","duplicateCount","includedLocationIds","loc","excludedLocationIds","newIncludedLocations","newExcludedLocations","locId","push","_toConsumableArray","mergeLocations","Toaster","BulkLocationsSearchProvider","onBulkLocationsSearch","onAddLocations","setIsDrawerOpen","campaignApiToken","bingMapsApiKey","campaignApiServiceRoot","CampaignAPI","CampaignAPIPath","BulkLocationsSearchDrawer","BingMapsContextProvider","BingMapsLocationTargetsEditor","onBulkLocationButtonClick","locationTargets","negativeLocationTargets","isRadiusExcludeEnabled","maxLocationTargets","maxNegativeLocationTargets","onLocationTargetsChange","bingMapLocations","onNegativeLocationTargetsChange","customizedLocationEqual","isLegacyLocationAndRadiusEqual","singleLineShimmer","ShimmerElementType","line","height","SingleLineShimmer","Shimmer","shimmerElements","radiusShimmerElement","gap","SectionShimmer","wrapperClass","mergeStyles","selectors","margin","border","shimmerWithElementFirstRow","shimmerWithElementSecondRow","circle","RadiusShimmer","audienceShimmerElement","AudienceSignalShimmer","withShimmer","ShimmerWrapper","showShimmer","ERROR_ENTITY","AssetGroup","CampaignLocation","CampaignRadius","CampaignNegativeLocation","CampaignLocationIntent","CampaignDayTimeCriterion","CampaignNegativeWebpage","AudienceGroupAssetGroupAssociation","BrandListAssociation","CnDefaultLocationTargetsViewModel","bidMode","Criterion","BidAdjustment","LocationCriterion","CountryCode","Latitude","LesLocationType","LocationId","LocationType","Longitude","NameTypeCombo","Type","OriginalBidAdjustment","OriginalCashbackPercent","CriterionType","Status","initLocations","peopleInLocation","peopleSearchingForLocation","globalDefaultLocationTargetsViewModel","getDefaultLocationTargetsViewModel","isCnMarket","getDefaultLanguagesViewModel","campaignLanguageStrings","None","Albanian","Arabic","Bosnian","Bulgarian","Croatian","Czech","Danish","Dutch","English","Estonian","Finnish","French","German","Greek","Hungarian","Icelandic","Italian","Japanese","Latvian","Lithuanian","Macedonian","Maltese","Norwegian","Polish","Portuguese","Romanian","Russian","Serbian","SimplifiedChinese","Slovak","Slovenian","Spanish","Swedish","TraditionalChinese","Turkish","Hebrew","Hindi","Malay","Thai","Indonesian","Tagalog","Vietnamese","entityIsCampaign","entityIs","campaignNameProp","andComp","ValidatedCampaignNameWithShimmer","RemainingCharsValidatedTextField","field","schema","CampaignNamePanel","key","isLoading","ValidatedFixedPanel","PANEL_KEYS","CAMPAIGN_NAME","LANGUAGE_TARGET","LOCATIONS","AD_SCHEDULE","BUDGET","START_END_DATES","SHORT_HEADLINES","DESCRIPTIONS","IMAGES","AUDIENCE_SIGNAL","VIDEOS","BID_STRATEGY","BID_VALUE","URL_OPTIONS","LOGOS","FINAL_URL_EXPANSION","AUTO_GEN_ASSETS","PAGE_FEEDS","CAMPAIGN_URL_OPTIONS","BRAND_EXCLUSIONS","COST_PER_SALE","SHOPPING","CONVERSIONS","PRONG_IMAGES","SPOTLIGHT_IMAGES","NEW_CUSTOMER_ACQUISITION","APP","DISCLAIMERS","LanguageTargetValidationAdapter","AdapterFactory","defaultValue","valueToInject","functionToInject","LanguageTargetValidatorFactory","defaultValidator","defaultErrors","isEmpty","SingleLanguageTargetValidator","SingleLanguageTargetValidationAdapter","ValidatedLanguageTarget","withError","withValidation","LanguageTarget","ValidatedSingleLanguageTarget","SingleLanguageTarget","campaignLanguagesProp","ServerValidatedLanguageTargetWithShimmer","withControlErrorHandling","withUnvalidatedControlErrors","LanguageTargetPanel","locale","CurrentLocale","DynamicPermissions","Permissions","permissions","_props$data","Languages","lang","toString","LanguageImg","validator","minuteToSaveMap","ZERO","FIFTEEN","THIRTY","FORTY_FIVE","getDay","day","getMin","min","getTime","hour","is12","getAdScheduleDetails","adScheduleView","hideBidAdjustment","schedules","koModel","useCampaignSettings","campaignDayTimeRanges","dayTimeRanges","dateSettings","getDateSettings","EndDate","StartDate","to","hideAdScheduleBidAdjustments","timeDisplayType","len","schedule","dayTime","startHour","StartHour","endHour","EndHour","startMin","StartMinute","endMin","EndMinute","dateTimePart","Day","BidAdjustmentType","BidAdjustmentAmount","getDayTimeDetails","adScheduleUseSearcherTimeZone","getAdScheduleUseSearcherTimeZone","campaignDayTimeCriterions","ServerValidatedLegacyAdScheduleWithShimmer","ValidatedLegacyAdSchedule","AdSchedulePanel","setAdScheduleView","setAdScheduleViewCallback","view","adSchedules","AdScheduleImg","isCreation","entityIsAdgroup","adgroupLanguageProp","ServerValidatedLanguageTarget","SingleLanguageTargetPanel","Language","IsDomesticSimplifiedChineseEnabled","showSelectedLanguages","multiSelect","supportAllOption","additionalOptions","useLocalizeBudget","localizeBudget","budget","currency","formatCurrency","Number","toUpperCase","withSymbol","maximumFractionDigits","BudgetRange","BingAdsWebUIStaticLegacyPageContext","budgetTitle","fontSize","budgetProp","ServerValidatedBudgetComponentWithShimmer","BudgetComponent","BudgetPanel","CurrencyCode","getResponsiveStyles","useResponsiveStyles","onDataChange","budgetAmount","campaignType","showBudgetSuggestion","isCampaignSetting","campaign","DailyRange","budgetSuggestion","Currency","GlobalMaximumBudget","DailyBudget","CeilingValue","GlobalMinimumBudget","FloorValue","budgetTitleDetails","onFieldChange","updatedData","prevData","onBudgetChange","newBudget","budgetAmountValue","onBudgetChangeFromBudgetSuggestion","shouldLocalize","Amount","onBudgetValidate","isValid","messages","isBudgetValid","budgetErrors","budgetSuggestionData","setBudgetSuggestionData","loadBudget","useBudgetSuggestionRepository","mode","MODE","EDITING","assetGroup","datas","finally","BudgetImg","as","headingClassName","showDropdown","onNotifyValidation","withSlider","BudgetSuggestionDialog","Budget","minBudget","maxBudget","defaultBudget","ValidatedLegacyDateSettingWithShimmer","ValidatedLegacyDateSetting","_Fragment","DateSettingsPanel","timeZone","getDateSettingDetails","StartEndDateImg","TimeZone","isCreate","initialValue","Date","ShortHeadlinesPanel","headlinesCardSummaryDetails","allAssetsExpand","featureName","setAddNewShortHeadlinesCallback","isOptional","iconAltText","HeadlineAssetCollection","showDeleteButton","DescriptionsPanel","descriptionsCardSummaryDetails","setAddNewDescriptionCallback","DescriptionAssetCollection","BaseImagePanel","panelKey","imagesData","containerRef","portalContainerState","addNewImageCallback","maxUploadNum","ImageListSummaryCardDetails","images","isLogos","ImageListPortalContainerWithControlErrorHandling","containerState","PerfMaxImageSuggestionCarousel","addImageCallback","ImagesPanel","imageExperienceAddNewImageCallback","imagesContainerRef","imageExperiencePortalContainerState","_excluded2","LogosPanel","logos","logoExperienceAddNewImageCallback","logosContainerRef","logoExperiencePortalContainerState","_excluded3","defaultProp","DEFAULT_MESSAGE","ConversionBasedBiddingBanner","conversionGoalsDetails","isCampaignCreation","usesMaxClicks","first","getUsesMaxClicks","hasActiveGoal","getHasActiveGoal","messageSettings","getTemplateToDisplay","onSetConversionTracking","save","wordBreak","ReactTemplate","template","model","b","disableShrink","DefaultButton","getBidStrategyStyles","bottomMargin","bidStrategyProp","ServerValidatedBidStrategyComponent","BidStrategyComponent","BidStrategyPanel","ScopeContext","bidRange","KeywordBidRange","options","conversionGoalDetails","bidStrategy","cpa","roas","isInitialAdditionalDetailsChecked","_options$bidStrategyC","bidStrategyComponentOptions","_options$biddingBanne","biddingBannerOptions","_options$scenario","scenario","bidStrategyOptions","hideAdditionalDetails","restBidStrategyComponentOptions","restBiddingBannerOptions","Object","assign","_objectDestructuringEmpty","bidStrategyTitleDetails","targetValue","bidStrategyText","MAX_CONVERSIONS","MAX_CONVERSIONS_VALUE","predefinedBidStrategy","BID_STRATEGY_OPTIONS_MAP","TargetCpaWarningBanner","addBottomMargin","onBidStrategyChange","newBidStrategy","onMarketingMetricChange","newMarketingMetric","isMarketingMetricValid","marketingMetricErrors","BidStrategyImg","selectedBidStrategy","defaultChecked","marketingMetricsValue","inputUnit","hideMessage","getUrlOptionsStyles","urlOptionsContainer","ValidatedUrlOptionsParameterWithShimmer","ValidatedUrlOptionsParameter","ValidatedUrlOptionsParameterWithErrorWithShimmer","ValidatedUrlOptionsParameterWithError","UrlOptionsPanel","isTrackingUrlTemplateRequired","isWithError","showDescription","urlParameterOptions","trackingUrlTemplate","TrackingUrlTemplate","finalUrlSuffix","FinalUrlSuffix","urlCustomParameters","UrlCustomParameters","urlOptions","urlOptionsDetails","getUrlOptionsDetails","UrlOptionsImg","PriceModelToRange","ManualCpa","ManualCpc","ValidatedBidValue","onBidChange","bidValueType","BiddingScheme","getBidRange","bidCeil","bidFloor","SearchBid","_getBidRange","CustomValidatedDefaultBid","placeholderText","currencyCode","properties","minimum","maximum","required","htmlFor","bidValueProp","ServerValidatedBidValueComponentWithShimmer","BidValuePanel","bidAmount","bidValueDetails","onBidValueChange","AppDetailsPanel","selectedApp","AppSetting","AppPanelWithShimmer","AppPanel","AudienceSignalSection","src","SignalsSparkleImg","alt","modelToViewModelDayTimeTargets","targets","resetId","schedulingRows","criterion","multiplier","CriterionBid","Multiplier","FromHour","FromMinute","ToHour","ToMinute","window","Math","abs","formatDateInEntitySet","date","kendo","parseDate","dateString","useDateRangeDefault","preferenceService","PreferenceContext","waterFallDateFilters","WaterfallFilterStorage","getFilters","WaterfallFilterType","DateFilter","waterfallDateFilterProcessor","useP$DaterangeDefault","dateFilter","Promise","resolve","useDateRange","dateRange","start","RangeStartDate","end","RangeEndDate","getConversionGoalTitleDetails","conversionGoals","goalScopeSelection","goalSelection","Scopes","CAMPAIGN","getFinalUrlExpansionTitleDetails","isFinalUrlExpansionEnabled","selectedTargetsView","viewmodel","exactUrls","rules","conditions","WebPage","Parameter","Conditions","condition","Operator","ArgumentOperand","exactUrlsDetails","rulesDetails","getBidStrategyMap","MaxClicks","MaxConversions","MaxConversionValue","MaxImpressions","MaxReach","ManualCpm","ManualCpv","EnhancedCpc","CostPerSale","TargetRoas","TargetCpa","TargetImpressionShare","getBidTitleDetails","bid","getBidBudgetTitleDetails","amount","bidType","bidVal","formatPercent","getBudgetTitleDetails","getListingGroupDetails","isEditing","productFilter","listingGroup","operand","pluck","getStoreTitleDetails","storesData","storeContainerData","isAudience","storeId","ProviderId","countries","stores","store","salesCountry","SalesCountry","localInventoryAdsEnabled","LocalInventoryAdsEnabled","getSearchThemeDetails","searchThemes","SearchTheme","getDisclaimerTitleDetails","disclaimer","selectedDisclaimer","PercentCpc","Commission","Individual","individual","ExcludedSites","ExcludedIPs","Targeted","Computer","Desktop","Tablet","Smartphone","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday","ConversionGoalKeyToStringMapping","Campaign_Goals_Account_Level_Label","Campaign_Goals_Account_Level_Subtext","Campaign_Goals_Campaign_Level_Label","Campaign_Goals_Campaign_Level_Subtext","GoalSelector_List_Header","GoalSelector_Result_List_Header","GoalSelector_Radio_Aria_Label","GoalSelector_EmptyList_Content","EntitySelector_Search_Placeholder","UnifiedEventTracking_Goal_Creation_Type_Event_Category","GoalSelector_Result_Action_Bar","GoalSelector_TrackingStatus_Value_InactiveDueToTagUnavailable","GoalSelector_TrackingStatus_Value_NoRecentConversion","GoalSelector_TrackingStatus_Value_RecordingConversions","GoalSelector_TrackingStatus_Value_TagInactive","GoalSelector_TrackingStatus_Value_Unverified","Segment_Goal_Category_Download","Segment_Goal_Category_Purchase","Segment_Goal_Category_AddToCart","Segment_Goal_Category_BeginCheckout","Segment_Goal_Category_BookAppointment","Segment_Goal_Category_Contact","Segment_Goal_Category_GetDirections","Segment_Goal_Category_InStoreVisit","Segment_Goal_Category_Other","Segment_Goal_Category_OutboundClick","Segment_Goal_Category_PageView","Segment_Goal_Category_RequestQuote","Segment_Goal_Category_SignUp","Segment_Goal_Category_SubmitLeadForm","Segment_Goal_Category_Subscribe","Segment_Goal_Category_Unassigned","Campaign_Goals_Option_Goals","Campaign_Goals_Option_GoalSets","EntitySelector_Pagination_Page","EntitySelector_Pagination_TotalPageCountText","EntitySelector_Pagination_PreviousPageText","EntitySelector_Pagination_NextPageText","getAdsStepStyles","displayAdPanelRoot","paddingBottom","background","boxShadow","borderRadius","float","flexWrap","marginRight","fontFamily","backgroundColor","addNewImageButton","selectedPanel","displayAdPanelHeader","displayAdPanelButton","cursor","displayAdPanelButtonContainer","left","top","transform","previewContainer","emptyPreview","adPreviewRoot","adPreviewSizeHeader","adPreviewPageTitle","adPreviewSizeTitle","paddingRight","adPreviewPanel","displayAd","previewTag","previewTagText","pagination","pageControls","pageControl","pageControlPreviousIcon","pageControlNextIcon","paginationIndicatorDot","paginationButton","opacity","paginationIndicator","displayAdPanelContent","placementInfoTile","placementInfos","rowGap","enabledPlacement","enabledText","disabledPlacement","disabledText","fontStyle","placementLabel","placmentResolution","displayAdPanelFinalUrlContainer","displayImageLabel","getCreativeWorkbenchStyles","creativeWorkbenchRoot","header","copilotIcon","getImageSuggestionCarouselStyles","imageSuggestionCarouselRoot","croppedImage","getDisplayAdStepBaseStyles","displayAdsStepRoot","CropPreview","overflow","CroppedImageView","partnerTrafficString","onoTrafficString","standard","sizeText","targetText","mobile","getSupportedSize","supportedSize","source","sourceSize","baseSize","getStandardOnO","getStandardOthers","getMobileOnO","getMobileOthers","getOptionsTranslated","sourceWidth","sourceHeight","sourceOptions","resultOptions","getTargetOptions","standardOptions","mobileOptions","_ref6","itemType","DropdownMenuItemType","Header","Divider","AdPreview","ads","onUpdateCurrentImageIndex","disablePagination","customStyleFunction","useCustomStyleFunction","displayAds","defaultClasses","customClasses","currentPageIndex","currentImageIdx","setCurrentImageIdx","targetOptions","getPageAdjustedIndex","idx","goToImageIndex","displayAdsInPage","slice","currentAd","currentImage","resizeImageHeight","cropHeight","cropWidth","aspectRatio","currentImageTarget","option","targetWidth","targetHeight","adPreviewPageHeader","adPreviewTargetTitle","originalWidth","SourceX","cropX","SourceY","cropY","SourceWidth","disabled","FontIcon","iconName","tabIndex","role","onKeyDown","Pagination","totalPages","goToPrevPage","goToNextPage","goToPage","val","imageModelToViewModel","imageModel","exec","parseInt","disableEdit","subType","cropSettings","SourceHeight","originalHeight","imagePlacementsToImage","crops","defaults","filtered","AspectRatiosForDisplayAds","_aspectRatio$minSize","minSize","minWidth","selectedImage","selectedIndex","findIndex","TargetWidth","TargetHeight","CropWidth","CropHeight","CropX","CropY","_ref4$cropSettings","imagePlacements","AddImage","advertiserCustomerId","accountId","perfMarker","oDataConfig","suggestionState","suggestionPoller","fullUrl","urlPrefix","onUpdateUrlPrefix","onUpdateUrlValue","dateFormat","activityLogger","displayImagePicker","setDisplayImagePicker","selectedMediaPanelSource","setSelectedMediaPanelSource","onNewImageSelected","isAADUser","creativeEditorProps","addImageChildPerfmarker","emptyFinalUrl","_useAssetLibraryImage","useAssetLibraryImagePicker","isDisplayAds","imagePickerError","setImagePickerError","clearImagePickerError","uploadImage","processUploadedImage","addImageByUrl","getStockImages","getInvestImages","onSelectStockImage","onImageSelected","onImagesSelected","socialMediaDataSource","customMediaSourceConfig","_suggestionState$sugg","suggestion","AddImageCrudAdComponent","isOpen","setIsOpen","newOpen","imageExperienceProps","finalUrlProtocol","onUpdateFinalUrl","onUpdateFinalUrlPrefix","isMultimediaAd","imageOption","constants","defaultImageOption","managedViewSelectionState","updateManagedViewSelectionState","stockImageConfig","investImageConfig","socialImageConfig","assetLibraryConfig","preferencesService","onImageAddError","enableStockMultipleSelection","enableInvestMultipleSelection","enableWebsiteMultipleSelection","errorMessage","imageType","adCreatorScenario","buttonContainer","PopulateImages","instrumentation","onUpdateUrl","showAddButton","ScenarioContext","privateUrl","setPrivateUrl","validateAdUrl","urlPrefixValue","_getUrlPrefixAndDesti","getUrlPrefixAndDestination","_useWebsiteSuggestion","useWebsiteSuggestion","adContext","logActivity","hasErrorInUrl","scenarioName","scenarioValue","evt","newPrefix","substring","_getUrlPrefixAndDesti3","original","newUrl","getUpdatedFullUrlOnPrefixUpdate","getUpdatedFullUrlOnTextUpdate","IsAADUser","wrapped","withPreference","withInstrumentation","NO_RECOMMENDATION","FinalURL","DEFAULT","placements","SuperLeaderboard","Leaderboard","FullBanner","SmallLeaderboard","Banner","LargeBanner","MediumBanner","SmallBanner","HalfBanner","Billboard","LandscapeLargeBanner","Landscape","LargeRectangle","MediumRectangle","Rectangle","Square","Portrait","HalfPage","WideSkyscraper","Skyscraper","ratios","_ratios","ratioGrouping","XWide","Vertical","addPlacementToAd","ad","MTPlacement","templateName","trim","getPlacement","placement","getRandomImageForEachRatioGroup","adsWithRatioGroups","randomImages","randomImage","group","randomAd","thumbnailUrl","suggestionId","recommendationId","apply","processAndGroupAds","groupedAds","groupAdsByImages","imageUrls","imageUrl","groupedByPlacement","ratiosKey","groupAdsByRatio","imagesToSuggest","getItemsForListFromGroupedAds","ratioGroups","sampleAd","newItem","previewSrc","previewType","getAdsInMatchingGroup","matchingGroup","getODataConfig","odataPath","document","indexOf","isLocal","odataToken","oDataToken","oDataPath","DisplayAdsEditorDrawer","withComponentErrorLogging","DisplayAdsEditor","rootContainer","imageContainer","buttonContainerStyle","bottom","choiceGroupStyles","dropdownStyles","dropdown","editButtonStyle","entityIsAd","Ad","imageTypeFromImage","standardDeviceType","mobileDeviceType","standardSizes","mobileSizes","CustomComponent","isLoadingImage","onRenderCustomAddImageButton","_useImagePicker","useImagePicker","isDisplayImageRegroupEnabled","IsDisplayImageRegroupEnabled","InstrumentationContext","isImageEditDisplayed","setIsImageEditDisplayed","_useState3","_useState4","isDisplayTemplateEditorOpen","setIsDisplayTemplateEditorOpen","_useState5","_useState6","deviceFormatType","setDeviceFormatType","mediaRepository","MediaRepository","cmpId","currentPlacementIndex","copilotRepository","useCopilotRepositoryContext","_useBrandKitService","useBrandKitService","brandKitDataService","brandkitApiState","shouldDirty","deviceType","_displayAd$image","findDeviceType","getImageTypeFromSize","creativeData","onEdit","creativeMeta","version","onRemoveImage","dropdownOptions","mobileOnO","mobileOnoOptions","mobileOthers","mobileOtherOptions","getMobileTargetOptions","standardOnO","standardOnoOptions","standardOthers","standardOtherOptions","getStandardTargetOptions","deviceFormatOptions","onChangeTarget","event","selectItem","currentItem","imagePlacementIndex","imageViewModel","selectedItem","imageKey","firstItem","minCropSize","getMinimumSizeForImage","baseImage","base","Src","Width","Height","onSaveEditImage","newAdData","placementTitle","_ref4$template","placementFromTemplate","getPlacementFromTemplate","resizeImageHeightForThumbnail","imageControl","IconButton","iconProps","HelpPopupInline","ChoiceGroup","selectedKey","Dropdown","AddImageButton","FinalUrls","MediaEditorPanel","onDismiss","onApply","aspectRatioConfig","hasRightRail","onRenderRightRailContent","previewImageUrl","_ref5$cropSettings","PreviewSingleRightRailWrapper","previewTitle","previewSettings","Preview","isThumbsUpDownEnabled","isTestEnv","isTestEnvironment","disabledPivotItemKeys","PivotItemKey","Effect","customizedDefaultSelectedPivotItemKey","Crop","containerClassName","editorContainer","hasFetchBrandKitData","useBrandKit","showNavigation","showSummaryBarControl","displayTemplatesDataService","imageData","metadata","onApplyCreative","sourceType","originalSourceType","ImageExperienceWithValidation","withServerContext","ValidatedImageExperience","ImageProp","dataObj","ValidatedFinalUrl","UrlInput","DisplayAdPanel","onUpdate","onRemovePanel","removeCloseButton","keyIndex","isSelectedPanel","legacyI18n","globalLegacyI18n","i18nMerged","mergeI18n","finalUrlsObj","verifiedTrackingSettingObj","VerifiedTrackingSettings","isIasTrackingEnable","isAdvancedURLOptionsForMSANDisplayEnabled","isImpressionTrackingForDisplayAndVideoEnabled","IsMOATEnabled","onValidationUpdate","advancedSettings","AdvancedSettings","impressionTrackingUrls","ImpressionTrackingUrls","verifiedTrackingSettings","isDisplay","isVideo","ValidationGroup","ResponsiveAd","onValidate","validateOnRender","disableRemoveAll","hideRatioLabel","ImageExperienceCircleUploadType","disableUploadTextField","ImagePickerContainerHeight","ThirdPartyMeasurementContainerWithValidation","videoAd","adType","DisplayAdsContainer","onAdsValidation","currentImageIndex","_props$ads","resetFields","isAdGridEditorMode","initialAdsCount","DisplayAds","setDisplayAds","_usePageManager","usePageManager","currentPage","pages","onAddItem","removeItem","maxItems","onAddAd","numberOfAdsInPage","isAllValid","valid","isAllDirty","dirty","setClarityTag","shouldUpdate","vAd","uid","rootDisplayAdsContainer","page","pageNumber","isCurrentPage","itemAtIdx","itemsBefore","itemsAfter","onImagePanelUpdate","splice","container","CTAInCreativeEditor","newCTA","stopPropagation","ValidatedLegacyCallToAction","CallToAction","valueText","CallToActionValue","ctaText","CallToActionText","isCustomCTAEnabled","formatBrandkitForAPI","obj","formattedObj","keys","SubType","useDisplayAdsCopilot","RecommendationContext","setRecommendationContext","logBannerGenerated","useCopilotLoggers","isLoadingBrandKit","setIsLoadingBrandkit","brandkit","setBrandKit","isBrandKitEmpty","setIsBrandKitEmpty","isBrandKitEnabled","BrandKitUI","fetchDisplayAdsAssetRecommendations","fetchDisplayAdsTemplateDefinition","editDisplayAdsAssetRecommendations","getBrandKitDataByAccId","useBrandKitDataService","fetchBrandKit","_asyncToGenerator","_regeneratorRuntime","mark","_callee","restrictionCall","_response$BrandKits","_response$BrandKits$","_response$BrandKits$2","_response$BrandKits$3","_response$BrandKits$4","_response$BrandKits$5","wrap","_context","prev","next","isCopilotRegionRestricted","feature","accId","sent","BrandKits","Fonts","Images","LandscapeLogos","Palettes","SquareLogos","DisplayAdsWithBrandKit","stop","_callee2","_args2","_context2","abrupt","ImageAssets","Ads","_processAndGroupAds","RecommendedAssets","RecommendationId","fetchAigcTemplateDefinition","templateId","err","generate","updatedCreative","finalUrlForCopilot","useFluentV2Styles","makeStyles","button","addIcon","DisplayAdPanelWithCopilot","_useDisplayAdsCopilot","fluentV2Styles","isAdvancedURLOptionsForMSANVideoEnabled","onCTAUpdate","setCTA","onRenderCTA","imageObj","onGenerateCreative","creativeDataInner","AddRegular","AllRecommendationsPanel","onSelectImageSuggestion","_useContext2$","_useContext2$2","handleDismiss","handleSelectImageSuggestion","matchingAds","Panel","scrollableContent","main","animation","PanelType","custom","customWidth","closeButtonAriaLabel","headerText","FluentProvider","theme","webLightTheme","ViewAllRecommendations","creatives","onFinalUrlEntered","onCreativeSelected","IMAGE_DIM","getFullyShownImagesCount","itemWidth","floor","getCarouselStyles","components","_ref$palette","palette","iconFontFamily","carouselParent","disabledCarouselParent","pointerEvents","objectFit","imageContainerLeftMargin","overflowX","overflowY","isCollapsible","imageParentContainer","imageParentLeftOffset","numberOfImages","imageClickableContainer","loadingMessageContainer","loadingText","panel","panelHeading","panelTitle","panelIcon","panelHelpButton","imageHintRight","right","imageHintLeft","paddleBtn","moreIcon","themeDarkAlt","seeAll","whiteSpace","textOverflow","seeAllInHeader","themePrimary","useBrandKitHeader","spinner","getBlockerStyle","parentContainer","LoadingShimmer","shimmerElement","Spinner","labelPosition","customElementsGroup","ShimmerElementsGroup","ImageView","setWidth","setHeight","resizeHeight","img","Image","onload","naturalWidth","naturalHeight","imgWidth","imgHeight","getImageDimension","DisplayAdsImageSuggestionCarousel","_ref3$maxUploadNum","_ref3$useBrandKit","setUseBrandKit","isSeeAllPanelOpen","setIsSeeAllPanelOpen","_useState7","_useState8","setImagesToSuggest","_useState9","_useState10","isCopilotEnabled","setIsCopilotEnabled","_useContext2","recommendationContext","reportRecommendations","logSuggestionsViewed","imageSuggestions","carouselState","carousel","isError","panelState","panelImages","hasMore","suggestionImages","onOffsetChange","offset","viewedImages","suggestionIds","onSelectImage","allGroupedAds","onSelectSeeAllImages","_ref7","onRenderImage","classesProp","onBrandKitToggle","truncatedImages","isRestricted","ImageSuggestionCarousel","helpTopic","onSelectSeeAll","showEllipsisWhenNoMoreImages","showViewAllInHeader","enableBrandKit","stylingOverrides","initialImageContainerLeftMargin","seeAllLinkText","messageBarType","MessageBarType","CreativeWorkbench","onFinalURLFocusOut","onCreateAds","isNewLogo","dataModel","setDataModel","useId","updateToast","finalUrlFromContext","finalUrlValidationProps","addingRecommendationToast","media","errorOnCreateAdsToast","DismissRegular","openRatioPicker","CopilotIcon","additionalProperties","onBlur","finalUrls","inline","useStyles","selectableImageContainer","shorthands","colorTransparentBackground","selectedImageContainer","colorPaletteBlueBorderActive","selectableImageList","gridTemplateColumns","ratioDescription","imageCheckbox","SelectableImage","onSelect","checked","handleClick","imageDimension","dimensionList","maxHeightRatio","maxWidthRatio","ratio","mergeClasses","Checkbox","bordered","shape","fit","Badge","RatioPickerInternal","open","onOpenChange","onApplyButtonText","fill","creativeSelections","setCreativeSelections","isApplying","setIsApplying","onRatioApply","selectedCreatives","creative","onImageSelect","newSelectedCreative","Dialog","DialogSurface","DialogBody","DialogTitle","DialogTrigger","DialogContent","DialogActions","disableButtonEnhancement","RatioPicker","handleRatioPickerState","CreateAnotherAdMenu","onCreateWithAI","onCreateFromExistingImage","handleCreateWithAI","handleCreateFromExistingImage","Menu","MenuTrigger","Add20Regular","MenuPopover","MenuList","MenuItem","GlanceHorizontalSparkles20Regular","Image20Regular","CreateAdWithAiDialog","_useCopilotRepository2","initialFinalUrl","setFinalUrl","setImages","selectedImages","setSelectedImages","handleFinalUrlUpdate","handleSelectImages","ids","lastId","handleCreateAds","flatten","CreateDisplayAdDialog","onFinalUrlUpdate","onSelectedImagesUpdate","useCreateAds","addToAssetLibrary","addCreatives","creativesToAdd","savedImages","savedImage","creativeId","getProcessedCreative","DisplayAdsContainerWithCopilot","hideFooter","isEditScenario","useInitCopilotLoggers","logEnterFlow","copilotFinalUrl","setCopilotFinalUrl","isCreateAdDialogOpen","setIsCreateAdDialogOpen","onAddItemsToPage","newAds","isAdsEmpty","addCreativesToDisplayAds","currentItemCount","createAds","MultiAdFormat","pageComponent","CampaignFetchProvider","CopilotRepositoryProvider","getLocale","recommendationType","containerStyle","AdEditor","adsModel","serverErrors","ErrorMessages","onUpdateCurrentVideoIndex","StepHeader","DisplayAdsWithCopilot","_ref2$data","_ref3$errors","_state$context$wizard","context","wizardData","_state$context$wizard2","editingAdId","currentStates","PerformanceMarkerContext","setCurrentImageIndex","saveFailed","useFormService","results","newAdsData","restResults","removeEmptyAds","dataPatch","matchStepState","SAVING","ActuationGroup","isActive","AttentionBeaconGroup","FormErrorGroup","showAllValidationErrors","UnmappedFormErrors","getVerifiedTrackingSettings","setting","vendor","vendorName","keyMap","IAS_advertiserEntityId","IAS_publisherEntityId","Save","_useWizardService","send","isBlocking","onNextClicked","WIZARD_EVENTS","UPDATE_WIZARD_DATA","isCreateAnother","SAVE_AND_EXIT","buttonText","PrimaryButton","SaveAndCreateAnother","_useWizardService2","SAVE_AND_NEXT","EditAdFooter","cancelButtonText","CancelButton","DISPLAY_AD","StepConfig","Activity","scenarioContext","logSuggestionsApplied","imageRepository","ImageRepository","load","initialAds","savedAdModel","random","imageAsset","Asset","verifiedTrackingSetting","getImageByIdAsync","IdString","imgObjMT","imageObject","newImageFromMTObject","imageSources","Existing","croppedImagePlacements","getAutoCroppedImages","originalImageToCrop","isMultimediaAdinMSANEnabled","aspectRatioOption","defaultAspectRatioOption","metaData","uriDecodedMetaData","replace","decodedMetadata","parseSync","onSave","onSaveAndCreateAnother","isMultiAdFormatAd","reject","saveAds","adSubType","adGroup","adGroupId","compact","EditDisplayAdWizardInternal","gridData","onCancel","wizardPerfMarker","config","initialStep","steps","actions","onDone","onExited","initialWizardData","attachStepActivities","PerformanceMarkerProvider","immediateDone","Scenario","Wizard","LayoutContainer","DefaultTemplate","Layout","component","StepContainer","BusyBlocker","CancelWizardDialog","EditDisplayAdWizard","withLoggingContext","withRecommendationContext","withSignal","FabricPrimaryButton","CommonEventParser","FabricDefaultButton","FabricLink","FabricTextField","FabricIconButton","videoPanelRoot","videoRepairPanelRoot","videoPanelHeader","adPreviewTitle","adPreviewHeader","video","videoPanelContent","videoPanelFinalUrlContainer","starStyle","loadClipchampPlayer","videos","videoRef","currentVideoIdx","setCurrentVideoIdx","videoHeight","setVideoHeight","videoTemplateUIEnabled","VideoTemplateUI","goToVideoIndex","videosInPage","currentVideo","_currentVideo$data","_currentVideo$data$vi","ClipchampPlayer","videoUrl","controls","ref","buttonContainerMultiple","addIconMultiple","AddVideoButton","multiVideoMode","overrideClasses","borderRadiusLarge","overlay","fontSizeBase200","qualityContainer","info","spacingVerticalXXL","borderRadiusMedium","fontSizeBase400","videoContainer","VideoSuggestionCard","videoAsset","onSelectVideoSuggestion","showQuality","_React$useState","_React$useState2","showVideo","setShowVideo","totalSeconds","duration","minutes","seconds","durationString","texts","scenes","scene","curlyTemplate","getVideoDescription","submitEvent","onMouseOver","onMouseOut","onFocus","autoPlay","loop","TimerRegular","PlacementQualityToText","quality","getPanelStyles","subtitle","neutralDark","panelHeader","alignSelf","contentHeading","gridContainer","VideoRecommendationsPanel","close","contentRef","videoAssets","isVideoAsAnAssetEnabled","VideoAsAnAsset","isAmplifyEnabled","currentTarget","closest","contains","onSelection","isFooterAtBottom","onRenderFooterContent","strong","VideoAdsSuggestionCarousel","_ref4$useBrandKit","videosToSuggest","setVideosToSuggest","videoSuggestions","onSelectIndex","__","_ref8","alwaysShowViewAll","classOverrides","useVideoAdsCopilot","fetchVideoAdsAssetRecommendations","updatedResponse","taskManager","addTask","taskId","taskFn","campaignObjective","getLocalStorage","videoMetadata","sourceVideoBitRate","VideoAssets","convertBpsToKbps","bps","Kbps","pow","Placements","PlacementQualities","StarsToQuality","enabled","PlacementTitle","titleText","PlacementInfoWithStars","_videoAd$video2","_videoAd$video2$quali","numberOfStars","numberOfDisabledStars","Icon","isBulkWrappedResponse","bulkResult","serverErrorsCompare","curr","isEqual","getBulkUploadErrorType","entitySchema","getBulkUploadEntityType","modelToViewModelForBulkErrors","bulkUpsertEntityErrorMap","errorProcessor","identity","getBulkApiErrors","errorType","mappedErrorType","mapBulkUpsertErrors","ReferencedEntityInvalidIdErrors","removeReferencedEntityInvalidIdErrors","bulkErrors","needsAttention","getDealDetailsStyle","dealDetails","flex","DeviceKeys","Computers","Tablets","Smartphones","ConnectedTVs","getCountriesLocations","locationIds","reqs","odata","batch","needContentType","targetTypes","getTargetConstraints","deal","targetType","ret","mandatory","DealTargetConstraints","devicesConstraints","TargetType","Mandatory","DealTargetRestrictionLevel","getLocationCritetions","_x","_getLocationCritetions","locationCriterions","CurrentCustomer","LocaleID","each","locationTargetConverter","buildLocationCriterionFromSearchResult","status","modelConstraints","_x2","_x3","_x4","_modelConstraints","isCreating","deviceConstraints","locationConstraints","ageConstraints","genderConstraints","audienceConstraints","dealLocationTargets","locations","adGroupModel","ageRanges","initialAgeRanges","negativeAgeRanges","initialGenderTypes","negativeGenderTYpes","genderTypes","audiences","dealLocationList","deviceTypes","deviceRestrictions","difference","deviceRestricted","locationRestricted","ageRestricted","genderRestricted","audienceRestricted","genreRestricted","CurrencyCode2CurrencyId","AUD","BRL","ARS","CAD","CLP","COP","DKK","EUR","HKD","INR","JPY","MXN","NOK","NZD","PEN","SGD","ZAR","SEK","CHF","USD","GBP","VEF","TWD","MYR","PHP","VND","THB","IDR","DZD","BHD","EGP","IQD","JOD","KWD","LBP","MAD","QAR","OMR","SAR","TND","CNY","TRY","PLN","AED","ILS","NGN","KRW","MTCurrencyConvertor","AustralianDollar","BrazilianReal","CanadianDollar","SwissFranc","DanishKrone","EURO","UKPound","JapaneseYen","NorwegianKrone","NewZealandDollar","SwedishKrona","USDollar","SouthAfricanRand","ArgentinePeso","ChileanPeso","YuanRenminbi","ColombianPeso","UAEDirham","AlgerianDinar","EgyptianPound","HongKongDollar","IndonesianRupiah","IsraeliSheqel","IndianRupee","LebanesePound","MoroccanDirham","MexicanPeso","MalaysianRinggit","PeruvianNuevoSol","PhilippinePeso","Zloty","QatariRial","SaudiRiyal","SingaporeDollar","ThaiBaht","NewTaiwanDollar","VenezuelanBolivar","VietnamDong","NewTurkishLira","NigerianNaira","Won","getConvertedCurrencyDealMinimumBid","minimumBid","dealCurrency","accountCurrency","exchangeRateMapping","dealCurrencyId","dealCurrencyToUSD","CurrencyId","accountCurrencyId","accountCurrencyToUSD","ceil","getVideoConstraintDuration","minimumDuration","isNumber","round","isNetflixDeal","Seller","isDealDeleted","AgeRanges","EighteenToTwentyFive","TwentyFiveToThirtyFive","ThirtyFiveToFifty","FiftyToSixtyFive","SixtyFiveAndAbove","Unknown","formatAgeRanges","chain","sortBy","ageRange","sortAgeRanges","formatAgeRange","targetConstraintsToText","locationMap","_getTargetConstraints","uniq","DealDetails","shouldShowGenre","dealOptions","MinimumBid","decimal","fromFloatToString","CountryName","AgeRange","Genre","bytesForHuman","bytes","num","i","toFixed","viewModelToModelForAd","adsViewModel","isDeletedEntities","adViewModel","idString","verifiedTrackingSettingAttachmentObj","isUndefined","isNull","VerifiedTrackingData","mapObject","verifiedTrackingSettingAttachment","fields","pick","extend","Videos","AdSubType","bulkModelToViewModelForAd","savedAdsData","oldAdsData","savedAdItem","sAd","adsWithIdsAttached","originalAdsModel","modelToViewModelForAd","adResource","types","ResourceIdentifier","bulkUpsertAdSettingsEntityErrorMap","getErrorsPlaceholders","systemErrors","uploadVideo","queryParam","QueryParam","remove","getEntityFromScope","currentEntity","functionParams","postVideoByUrl","res","newVideoFromMTObject","oldAdsModel","_ref4$activity","videoPromises","uploadVideoIfNeeded","_splitUpdateAndCreate","adIds","adsToCreate","adsToUpdate","adsToDelete","adToSave","oldAd","adsNeededToCreate","adsNeededToUpdate","splitUpdateAndCreateAds","promises","bulkCreate","bind","updateAds","bulkUpdate","updateData","updatedAds","createdAds","bulkOrSystemError","errorsWithPropertyIdsAttached","Property","attachUidToErrorProperty","warn","stack","setLocalStorageWithExpire","expire","time","now","localStorage","setItem","getKey","getFullYear","getMonth","_fetchExchangeRateMapping","baseURL","t0","getAccountExchangeRateFromLocalStorage","getItem","parse","expired","getLocalStorageWithExpire","fetchExchangeRateMapping","isDealCampaign","pathname","isCTVCampaign","getVideoDeal","videoDeal","supportsStorage","set","legacyTemplates","validateVideo","videoRequirementForDeal","skipQualityValidation","videoPanelButton","videoPanelButtonContainer","VideoExperienceWithValidation","withAssetLibraryServicesLoaded","renderError","dataService","copilotEnabled","isCTV","isVideoRequired","getVideo","isGoogleImportVideoAdNeedsRepair","IsGoogleImportVideoAdsEnabled","isUploading","setIsUploading","showVideoEditor","setShowVideoEditor","isFetchingVideo","setIsFetchingVideo","multiVideoList","setMultiVideoList","showMultiVideoCopilotEditor","setShowMultiVideoCopilotEditor","_useState11","_useState12","isVideoFetched","setIsVideoFetched","enableEdit","isLegacyTemplate","onErrorsUpdated","onUpdateMultiAdVideoList","list","validVideos","multiVideo","validationMessages","valVideo","aggregatedMessages","flat","onRenderItemDropdownCoPilot","validationMessage","onRenderItemDropDownForMultiModeWithCopilot","selectedVideo","selectedIdx","selectedMultiVideo","updatedVideos","getNewVideoObject","newVideo","videoObject","ImageExperienceVideo","updateWithNewVideo","_getNewVideoObject","v","updateWithNewVideoAtIdx","newVideoIdx","onChangeVideo","onChangeMultiVideo","fetchMetadata","getVideoPromises","all","existingVideos","UiBlocker","blocking","blockUiContainer","blockerIndicator","_createElement","VideoExperience","videoList","onVideoListUpdated","onVideoUploadStatusUpdate","showErrors","videoLabelHelpTopic","CustomAddVideoControl","onRenderItemDropdown","onReplace","enableShowingErrors","VideoTemplateEditorContextWrapper","videoMetaData","isDialog","CopilotVideoEditor","ValidatedVideoExperience","videoProp","multiAdDataObj","processingMessage","passiveMessages","updatedVideoAd","customErrorRendering","VideoExperienceWithPreference","VideoExperienceWithPreferenceRecommendationFetch","copilotFetchTaskManager","TaskManager","_useVideoAdsCopilot2","FinalUrl","validationState","setValidationState","updatedCopilotFinalUrl","setUpdatedCopilotFinalUrl","notifyCopilotFinalURLchange","handleKeyUp","onKeyUp","VideoPanel","oDataConfigProp","biddingScheme","isForDeal","isXandrServingCampaign","dealLoaded","EnableMSANVideoCampaigns","isBiddingStrategyCPV","_useVideoAdsCopilot","shouldRepairGoogleImportVideoAd","VideoCopilotGeneration","allowedVideoSizes","videoExperienceCircleUploadType","videoPickerContainerHeight","EnableIASVerifiedImpressionTrackingURLsForBrandAwarenessCampaign","isMOATEnabled","isUsingVideoTemplates","enableLogoAndCTA","useClipchamp","ITEMS_PER_PAGE","addItemsToPages","lastPage","lastPageIndex","remaining","newPageItem","nextPageItem","setTotalPages","setCurrentPageIndex","totalAds","createPages","setPages","setCurrentPage","onAddPage","newPage","removeLastPage","valInt","newPages","removeItemFromLastPage","VideoAdsContainer","dealVideoRequirementText","currentVideoIndex","allowCopilotVideoGeneration","_props$biddingScheme","videoAds","setVideoAds","isAdsCopilotRegionRestricted","setIsAdsCopilotRegionRestricted","rootVideoAdsContainer","onVideoPanelUpdate","fillLocationForDeal","responses","EnglishName","getDealDetails","dealId","dealDetail","filledDeal","errorCodeTarget","Campaigns","CampaignCriterions","$cast","Deals","DealId","GetDealErrorCode","t1","_x5","_x6","expectedError","responseErrArray","buttonStyle","AdEditorFooter","cancel","saveAndCreateAnother","setDeal","setDealLoaded","setServerErrors","setBlocking","fetchDeal","createScenario","createActivity","versionForLog","getLogVersion","logger","getLoggerWithoutPageInfo","videoRepository","createVideoRepository","folderRepository","createFolderRepository","createImageRepository","saveAd","adData","saveAnother","savedMaterial","savedLogo","uploadVideoMetadata","uploadedVideo","saveVideoAd","AdEditorWithErrorLogging"],"sourceRoot":""}