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,CAAOqI,EAAKQ,UAAUoI,eAAqB,KAAGshC,EAAgBn/B,KAAI,SAAAtY,GAAM,OAAIA,EAAOqY,KAAK,KAAK,IAAEA,KAAK,MAAM,QACxIq/B,EAAmBruC,OAAS,IAAKN,EAAAA,EAAAA,MAAA,QAAA7D,SAAA,CAAOqI,EAAKQ,UAAUoI,mBAAyB,KAAGuhC,EAAmBp/B,KAAI,SAAAtY,GAAM,OAAIA,EAAOqY,KAAK,KAAK,IAAEA,KAAK,MAAM,UAGzJ,GAAG,CAACqN,EAAUnY,EAAMqhC,EAAY2I,EAAkBC,EAAoBC,EAAiBC,IAEvF,OACE3uC,EAAAA,EAAAA,MAAA,OAAK6H,UAAW2a,EAAOyqB,mCAAmC9wC,SAAA,EACxD6C,EAAAA,EAAAA,KAAA,QAAA7C,SAAOyxC,KACJD,GAAqBE,MAG9B,EAaAhxB,GAA2B3d,aAAe,CACxCqd,UAAW,GACXC,MAAO,GACPC,MAAO,GACPC,gBAAiB,GACjBC,SAAU,G","sources":["../../../../component-react/packages/simplified-sign-up-suggestions/src/config/states.js","../../../../component-react/packages/simplified-sign-up-suggestions/src/config/events.js","../../../../component-react/packages/simplified-sign-up-suggestions/src/config/actions.js","../../../../component-react/packages/simplified-sign-up-suggestions/src/config/machine-config.js","../../../../component-react/packages/simplified-sign-up-suggestions/src/config/guards.js","../../../../component-react/packages/simplified-sign-up-suggestions/src/config/services.js","../../../../component-react/packages/simplified-sign-up-suggestions/src/use-suggestions-service.js","../../../../component-react/packages/step-wizard-logger/src/helper.js","../../../../component-react/packages/step-wizard-logger/src/constants.js","../../../../component-react/packages/step-wizard-logger/src/step-flow-provider-with-context.js","../../../../component-react/packages/step-wizard-logger/src/basic-step-logger.js","../../../../component-react/packages/step-wizard-logger/src/step-logger.js","../../../../component-react/packages/step-wizard-logger/src/wizard-step-logger.js","../../../../component-react/packages/step-wizard-logger/src/single-step-logger.js","../../../../component-react/packages/stock-image-data-service/src/stock-image-data-service.js","../../../../component-react/packages/stock-image-filter/src/shutter-stock/shutter-stock-filter.js","../../../../component-react/packages/stock-image-filter/src/shutter-stock/shutter-stock-filter-schema.js","../../../../component-react/packages/stock-image-filter/src/stock-filter.js","../../../../component-react/packages/summary-page/src/components/properties/ad-creation-preview.js","../../../../component-react/packages/summary-page/src/components/properties/store.js","../../../../component-react/packages/summary-page/src/components/properties/product-collections.js","../../../../component-react/packages/summary-page/src/components/properties/local-inventory.js","../../../../component-react/packages/summary-page/src/components/properties/products.js","../../../../component-react/packages/summary-page/src/components/properties/feeds.js","../../../../component-react/packages/summary-page/src/components/properties/location-targeting.js","../../../../component-react/packages/summary-page/src/components/properties/age-range-targeting.js","../../../../component-react/packages/summary-page/src/components/properties/gender-targeting.js","../../../../component-react/packages/summary-page/src/components/properties/ad-schedule.js","../../../../component-react/packages/summary-page/src/components/properties/ad-schedule-with-bid-adjustments.js","../../../../component-react/packages/summary-page/src/components/properties/common-targeting.js","../../../../component-react/packages/summary-page/src/components/properties/audience.js","../../../../component-react/packages/summary-page/src/components/properties/interest.js","../../../../component-react/packages/summary-page/src/components/properties/predictive-targeting.js","../../../../component-react/packages/summary-page/src/components/properties/start-end-dates.js","../../../../component-react/packages/summary-page/src/components/properties/ad-distribution.js","../../../../component-react/packages/summary-page/src/components/properties/keywords.js","../../../../component-react/packages/summary-page/src/components/properties/genre.js","../../../../component-react/packages/summary-page/src/components/properties/disclaimer.js","../../../../component-react/packages/summary-page/src/components/properties/company-name-targeting.js","../../../../component-react/packages/summary-page/src/components/properties/job-function-targeting.js","../../../../component-react/packages/summary-page/src/components/properties/industry-targeting.js","../../../../component-react/packages/summary-page/src/components/properties/conversion-goals.js","../../../../component-react/packages/summary-page/src/components/properties/budget.js","../../../../component-react/packages/summary-page/src/components/properties/bid-strategy.js","../../../../component-react/packages/summary-page/src/components/properties/bid-value.js","../../../../component-react/packages/summary-page/src/components/properties/languages.js","../../../../component-react/packages/summary-page/src/components/properties/audience-signal.js","../../../../component-react/packages/summary-page/src/components/properties/images.js","../../../../component-react/packages/summary-page/src/components/properties/store-info.js","../../../../component-react/packages/summary-page/src/components/properties/auto-gen-assets.js","../../../../component-react/packages/summary-page/src/components/properties/url-options.js","../../../../component-react/packages/summary-page/src/components/properties/bid-target.js","../../../../component-react/packages/summary-page/src/components/properties/final-url-expansions.js","../../../../component-react/packages/summary-page/src/components/properties/search-themes.js","../../../../component-react/packages/summary-page/src/components/properties/cost-per-sale.js","../../../../component-react/packages/summary-page/src/components/properties/url-rules.js","../../../../component-react/packages/summary-page/src/components/properties/new-customer-acquisition.js","../../../../component-react/packages/summary-page/src/components/properties/videos.js","../../../../component-react/packages/summary-page/src/summary-page-component-types.js","../../../../component-react/packages/summary-page/src/components/properties/ad-creation.js","../../../../component-react/packages/summary-page/src/components/properties/text-asset-summary.js","../../../../component-react/packages/summary-page/src/components/properties/listing-group.js","../../../../component-react/packages/third-party-measurement/src/view/third-party-measurement.js","../../../../component-react/packages/third-party-measurement/src/view/third-party-measurement-V2.js","../../../../component-react/packages/third-party-measurement/src/view/third-party-measurement-container.js","../../../../component-react/packages/third-party-measurement/src/view/third-party-measurement-backbone-view.js","../../../../component-react/packages/third-party-measurement/src/model/campaign-third-party-vendor-setting.js","../../../../component-react/packages/third-party-measurement/src/styles/third-party-measurement-setting-styles.js","../../../../component-react/packages/third-party-measurement/src/view/component/warning-message.js","../../../../component-react/packages/third-party-measurement/src/view/component/account-linked-status-label.js","../../../../component-react/packages/third-party-measurement/src/view/component/custom-config.js","../../../../component-react/packages/third-party-measurement/src/view/component/third-party-vendor-setting.js","../../../../component-react/packages/third-party-measurement/src/view/component/third-party-measurement-remove-all-button.js","../../../../component-react/packages/third-party-measurement/src/view/third-party-measurement-V3.js","../../../../component-react/packages/third-party-measurement/src/view/component/use-account-property-repository.js","../../../../component-react/packages/third-party-measurement/src/model/verified-tracking-setting.js","../../../../component-react/packages/ui-generator/src/components/text.js","../../../../component-react/packages/ui-generator/src/components/custom-component/custom-component.js","../../../../component-react/packages/ui-generator/src/components/custom-component/with-custom-rendering.js","../../../../component-react/packages/ui-generator/src/components/panel/action-button.js","../../../../component-react/packages/ui-generator/src/components/panel/header.js","../../../../component-react/packages/ui-generator/src/components/panel/panel.js","../../../../component-react/packages/ui-generator/src/components/message-bar.js","../../../../component-react/packages/ui-generator/src/components/property-row/property-label.js","../../../../component-react/packages/ui-generator/src/components/property-row/property-data.js","../../../../component-react/packages/ui-generator/src/components/property-row/property-row.js","../../../../component-react/packages/ui-generator/src/components/horizontal-divider.js","../../../../component-react/packages/ui-generator/src/components/data.js","../../../../component-react/packages/ui-generator/src/component-types.js","../../../../component-react/packages/ui-generator/src/generate-components.js","../../../../component-react/packages/ui-generator/src/generated-ui.js","../../../../component-react/packages/ui-generator/src/schemas/default-text-property.js","../../../../component-react/packages/ui-generator/src/schemas/default-data-property.js","../../../../component-react/packages/upload-file-picker/src/utils/parse-file.js","../../../../component-react/packages/upload-file-picker/src/file-picker-view/file-picker.js","../../../../component-react/packages/upload-file-picker/src/utils/read-file.js","../../../../component-react/packages/upload-file-picker/src/utils/constants.js","../../../../component-react/packages/upload-file-picker/src/file-picker-view/image-file-picker.js","../../../../component-react/packages/upload-file-picker/src/file-picker-view/video-file-picker.js","../../../../component-react/packages/upload-file-picker/src/upload-progress-view/styles/upload-assets-preview-style.js","../../../../component-react/packages/upload-file-picker/src/upload-progress-view/upload-assets-preview.js","../../../../component-react/packages/upload-file-picker/src/upload-progress-view/upload-progress-control.js","../../../../component-react/packages/upload-file-picker/src/upload-progress-view/progress-helpers.js","../../../../component-react/packages/upload-file-picker/src/utils/validate-file.js","../../../../component-react/packages/url-editor/src/build-url.js","../../../../component-react/packages/url-editor/src/parse-url.js","../../../../component-react/packages/url-editor/src/url-editor.js","../../../../component-react/packages/url-editor/src/url-editor-for-array.js","../../../../component-react/packages/url-rules-v2/src/helpers/constants.js","../../../../component-react/packages/url-rules-v2/src/helpers/utils.js","../../../../component-react/packages/url-rules-v2/src/side-panel/url-rules-editor.js","../../../../component-react/packages/url-rules-v2/src/url-rules-preview.js","../../../../component-react/packages/url-rules-v2/src/url-rules-impl.js","../../../../component-react/packages/url-rules-v2/src/url-rules.js","../../../../component-react/packages/url-rules-v2/src/url-options-details-with-rules.js","../../../../component-react/packages/url-rules/src/helpers/constants.js","../../../../component-react/packages/url-rules/src/helpers/utils.js","../../../../component-react/packages/url-rules/src/side-panel/tag-with-tooltips.js","../../../../component-react/packages/url-rules/src/side-panel/custom-label-editor.js","../../../../component-react/packages/url-rules/src/side-panel/url-rules-editor.js","../../../../component-react/packages/url-rules/src/url-rules-preview.js","../../../../component-react/packages/url-rules/src/url-rules-impl.js","../../../../component-react/packages/url-rules/src/url-rules.js","../../../../component-react/packages/url-rules/src/url-options-details-with-rules.js"],"sourcesContent":["export const STATES = {\r\n INIT: 'INIT',\r\n\r\n LOADING: 'LOADING',\r\n\r\n RSA: 'RSA',\r\n NEEDS_RSA: 'NEEDS_RSA',\r\n RSA_LOADING: 'RSA_LOADING',\r\n RSA_DONE: 'RSA_DONE',\r\n\r\n IMAGES: 'IMAGES',\r\n NEEDS_IMAGES: 'NEEDS_IMAGES',\r\n IMAGES_LOADING: 'IMAGES_LOADING',\r\n IMAGES_DONE: 'IMAGES_DONE',\r\n\r\n TEXT_ADS: 'TEXT_ADS',\r\n NEEDS_TEXT_ADS: 'NEEDS_TEXT_ADS',\r\n TEXT_ADS_LOADING: 'TEXT_ADS_LOADING',\r\n TEXT_ADS_DONE: 'TEXT_ADS_DONE',\r\n\r\n IMAGE_ADS: 'IMAGE_ADS',\r\n NEEDS_IMAGE_ADS: 'NEEDS_IMAGE_ADS',\r\n IMAGE_ADS_LOADING: 'IMAGE_ADS_LOADING',\r\n IMAGE_ADS_DONE: 'IMAGE_ADS_DONE',\r\n\r\n BUDGET: 'BUDGET',\r\n NEEDS_TARGETS: 'NEEDS_TARGETS',\r\n TARGETS_LOADING: 'TARGETS_LOADING',\r\n NEEDS_KEYWORDS: 'NEEDS_KEYWORDS',\r\n KEYWORDS_LOADING: 'KEYWORDS_LOADING',\r\n BUDGET_LOADING: 'BUDGET_LOADING',\r\n BUDGET_DONE: 'BUDGET_DONE',\r\n\r\n BI: 'BI',\r\n BI_LOADING: 'BI_LOADING',\r\n BI_DONE: 'BI_DONE',\r\n\r\n DONE: 'DONE',\r\n};\r\n","export const EVENTS = {\r\n LOAD: 'LOAD',\r\n START_OVER: 'START_OVER',\r\n};\r\n","import { assign } from 'xstate';\r\nimport _ from 'underscore';\r\n\r\nexport const defaultContext = {\r\n flags: {\r\n isRSADone: false,\r\n isTextAdsDone: false,\r\n isImageAdsDone: false,\r\n isImagesDone: false,\r\n isTargetsDone: false,\r\n isKeywordsDone: false,\r\n isBudgetDone: false,\r\n isBIDone: false,\r\n allDone: false,\r\n },\r\n inputs: {\r\n isSmartMode: true,\r\n isPMaxLite: false,\r\n url: undefined,\r\n language: undefined,\r\n categoryIds: [],\r\n },\r\n outputs: {},\r\n};\r\n\r\nexport const actions = {\r\n markRSADone: assign({\r\n flags: context => ({\r\n ...context.flags,\r\n isRSADone: true,\r\n }),\r\n }),\r\n markTextAdsDone: assign({\r\n flags: context => ({\r\n ...context.flags,\r\n isTextAdsDone: true,\r\n }),\r\n }),\r\n markImageAdsDone: assign({\r\n flags: context => ({\r\n ...context.flags,\r\n isImageAdsDone: true,\r\n }),\r\n }),\r\n markImagesDone: assign({\r\n flags: context => ({\r\n ...context.flags,\r\n isImagesDone: true,\r\n }),\r\n }),\r\n markTargetsDone: assign({\r\n flags: context => ({\r\n ...context.flags,\r\n isTargetsDone: true,\r\n }),\r\n }),\r\n markKeywordsDone: assign({\r\n flags: context => ({\r\n ...context.flags,\r\n isKeywordsDone: true,\r\n }),\r\n }),\r\n markBudgetDone: assign({\r\n flags: context => ({\r\n ...context.flags,\r\n isBudgetDone: true,\r\n }),\r\n }),\r\n markBIDone: assign({\r\n flags: context => ({\r\n ...context.flags,\r\n isBIDone: true,\r\n }),\r\n }),\r\n markAllFlagsDone: assign({\r\n flags: context => ({\r\n ...context.flags,\r\n allDone: true,\r\n }),\r\n }),\r\n\r\n resetFlags: assign({\r\n flags: () => ({\r\n ...defaultContext.flags,\r\n }),\r\n }),\r\n resetOutputs: assign({\r\n outputs: () => ({\r\n ...defaultContext.outputs,\r\n }),\r\n }),\r\n updateInputs: assign({\r\n inputs: (context, event) => _.defaults({\r\n isPMaxLite: event.isPMaxLite,\r\n isSmartMode: event.isSmartMode,\r\n url: event.url,\r\n language: event.language,\r\n categoryIds: event.categoryIds,\r\n }, context.inputs),\r\n }),\r\n updateOutputs: assign({\r\n outputs: (context, event) => _.defaults({\r\n rsa: event.rsa,\r\n textAds: event.textAds,\r\n imageAds: event.imageAds,\r\n images: event.images,\r\n targets: event.targets,\r\n keywords: event.keywords,\r\n }, context.outputs),\r\n }),\r\n\r\n assignRSAData: assign({\r\n outputs: (context, event) => ({\r\n ...context.outputs,\r\n rsa: event.data,\r\n }),\r\n }),\r\n assignTextAdsData: assign({\r\n outputs: (context, event) => ({\r\n ...context.outputs,\r\n textAds: event.data,\r\n }),\r\n }),\r\n assignImageAdsData: assign({\r\n outputs: (context, event) => ({\r\n ...context.outputs,\r\n imageAds: event.data,\r\n }),\r\n }),\r\n assignImagesData: assign({\r\n outputs: (context, event) => ({\r\n ...context.outputs,\r\n images: event.data,\r\n }),\r\n }),\r\n assignTargetsData: assign({\r\n outputs: (context, event) => ({\r\n ...context.outputs,\r\n targets: event.data,\r\n }),\r\n }),\r\n assignKeywordsData: assign({\r\n outputs: (context, event) => ({\r\n ...context.outputs,\r\n keywords: event.data,\r\n }),\r\n }),\r\n assignBudgetData: assign({\r\n outputs: (context, event) => ({\r\n ...context.outputs,\r\n budget: event.data,\r\n }),\r\n }),\r\n assignBIData: assign({\r\n outputs: (context, event) => ({\r\n ...context.outputs,\r\n bi: event.data,\r\n }),\r\n }),\r\n};\r\n","import { STATES } from './states';\r\nimport { EVENTS } from './events';\r\nimport { defaultContext } from './actions';\r\n\r\nexport const machineConfig = {\r\n id: 'simplified-sign-up-suggestions-state-machine',\r\n initial: STATES.INIT,\r\n context: defaultContext,\r\n preserveActionOrder: true,\r\n predictableActionArguments: true,\r\n states: {\r\n [STATES.INIT]: {\r\n on: {\r\n [EVENTS.LOAD]: {\r\n target: STATES.LOADING,\r\n actions: ['updateInputs'],\r\n },\r\n },\r\n },\r\n [STATES.LOADING]: {\r\n type: 'parallel',\r\n states: {\r\n [STATES.RSA]: {\r\n initial: STATES.NEEDS_RSA,\r\n states: {\r\n [STATES.NEEDS_RSA]: {\r\n always: [\r\n { target: STATES.RSA_LOADING, cond: 'needsRSA' },\r\n { target: STATES.RSA_DONE },\r\n ],\r\n },\r\n [STATES.RSA_LOADING]: {\r\n invoke: {\r\n src: 'loadRSASuggestions',\r\n onDone: {\r\n target: STATES.RSA_DONE,\r\n actions: ['assignRSAData'],\r\n },\r\n onError: {\r\n target: STATES.RSA_DONE,\r\n },\r\n },\r\n },\r\n [STATES.RSA_DONE]: {\r\n type: 'final',\r\n entry: ['markRSADone'],\r\n },\r\n },\r\n },\r\n [STATES.TEXT_ADS]: {\r\n initial: STATES.NEEDS_TEXT_ADS,\r\n states: {\r\n [STATES.NEEDS_TEXT_ADS]: {\r\n always: [\r\n { target: STATES.TEXT_ADS_LOADING, cond: 'needsTextAds' },\r\n { target: STATES.TEXT_ADS_DONE },\r\n ],\r\n },\r\n [STATES.TEXT_ADS_LOADING]: {\r\n invoke: {\r\n src: 'loadTextAdsSuggestions',\r\n onDone: {\r\n target: STATES.TEXT_ADS_DONE,\r\n actions: ['assignTextAdsData'],\r\n },\r\n onError: {\r\n target: STATES.TEXT_ADS_DONE,\r\n },\r\n },\r\n },\r\n [STATES.TEXT_ADS_DONE]: {\r\n type: 'final',\r\n entry: ['markTextAdsDone'],\r\n },\r\n },\r\n },\r\n [STATES.IMAGE_ADS]: {\r\n initial: STATES.NEEDS_IMAGE_ADS,\r\n states: {\r\n [STATES.NEEDS_IMAGE_ADS]: {\r\n always: [\r\n { target: STATES.IMAGE_ADS_LOADING, cond: 'needsImageAds' },\r\n { target: STATES.IMAGE_ADS_DONE },\r\n ],\r\n },\r\n [STATES.IMAGE_ADS_LOADING]: {\r\n invoke: {\r\n src: 'loadImageAdsSuggestions',\r\n onDone: {\r\n target: STATES.IMAGE_ADS_DONE,\r\n actions: ['assignImageAdsData'],\r\n },\r\n onError: {\r\n target: STATES.IMAGE_ADS_DONE,\r\n },\r\n },\r\n },\r\n [STATES.IMAGE_ADS_DONE]: {\r\n entry: ['markImageAdsDone'],\r\n type: 'final',\r\n },\r\n },\r\n },\r\n [STATES.IMAGES]: {\r\n initial: STATES.NEEDS_IMAGES,\r\n states: {\r\n [STATES.NEEDS_IMAGES]: {\r\n always: [\r\n { target: STATES.IMAGES_LOADING, cond: 'needsImages' },\r\n { target: STATES.IMAGES_DONE },\r\n ],\r\n },\r\n [STATES.IMAGES_LOADING]: {\r\n invoke: {\r\n src: 'loadImagesSuggestions',\r\n onDone: {\r\n target: STATES.IMAGES_DONE,\r\n actions: ['assignImagesData'],\r\n },\r\n onError: {\r\n target: STATES.IMAGES_DONE,\r\n },\r\n },\r\n },\r\n [STATES.IMAGES_DONE]: {\r\n entry: ['markImagesDone'],\r\n type: 'final',\r\n },\r\n },\r\n },\r\n [STATES.BUDGET]: {\r\n initial: STATES.NEEDS_TARGETS,\r\n states: {\r\n [STATES.NEEDS_TARGETS]: {\r\n always: [\r\n { target: STATES.TARGETS_LOADING, cond: 'needsTargets' },\r\n { target: STATES.NEEDS_KEYWORDS },\r\n ],\r\n },\r\n [STATES.TARGETS_LOADING]: {\r\n invoke: {\r\n src: 'loadTargetsSuggestions',\r\n onDone: {\r\n target: STATES.KEYWORDS_LOADING,\r\n actions: ['assignTargetsData'],\r\n },\r\n onError: {\r\n target: STATES.KEYWORDS_LOADING,\r\n },\r\n },\r\n },\r\n [STATES.NEEDS_KEYWORDS]: {\r\n always: [\r\n { target: STATES.KEYWORDS_LOADING, cond: 'needsKeywords' },\r\n { target: STATES.BUDGET_LOADING },\r\n ],\r\n },\r\n [STATES.KEYWORDS_LOADING]: {\r\n entry: ['markTargetsDone'],\r\n invoke: {\r\n src: 'loadKeywordsSuggestions',\r\n onDone: {\r\n target: STATES.BUDGET_LOADING,\r\n actions: ['assignKeywordsData'],\r\n },\r\n onError: {\r\n target: STATES.BUDGET_LOADING,\r\n },\r\n },\r\n },\r\n [STATES.BUDGET_LOADING]: {\r\n entry: ['markKeywordsDone'],\r\n invoke: {\r\n src: 'loadBudgetSuggestions',\r\n onDone: {\r\n target: STATES.BUDGET_DONE,\r\n actions: ['assignBudgetData', 'markBudgetDone'],\r\n },\r\n onError: {\r\n target: STATES.BUDGET_DONE,\r\n actions: ['markBudgetDone'],\r\n },\r\n },\r\n },\r\n [STATES.BUDGET_DONE]: {\r\n entry: ['markBudgetDone'],\r\n type: 'final',\r\n },\r\n },\r\n },\r\n [STATES.BI]: {\r\n initial: STATES.BI_LOADING,\r\n states: {\r\n [STATES.BI_LOADING]: {\r\n invoke: {\r\n src: 'loadBISuggestions',\r\n onDone: {\r\n target: STATES.BI_DONE,\r\n actions: ['assignBIData'],\r\n },\r\n onError: {\r\n target: STATES.BI_DONE,\r\n },\r\n },\r\n },\r\n [STATES.BI_DONE]: {\r\n entry: ['markBIDone'],\r\n type: 'final',\r\n },\r\n },\r\n },\r\n },\r\n onDone: STATES.DONE,\r\n },\r\n [STATES.DONE]: {\r\n entry: ['markAllFlagsDone'],\r\n on: {\r\n [EVENTS.LOAD]: STATES.LOADING,\r\n },\r\n },\r\n },\r\n on: {\r\n [EVENTS.START_OVER]: {\r\n actions: ['resetFlags', 'resetOutputs', 'updateInputs', 'updateOutputs'],\r\n target: STATES.LOADING,\r\n },\r\n },\r\n};\r\n","export const guards = {\r\n needsRSA: context => !context.inputs.isSmartMode && !context.outputs.rsa,\r\n needsTextAds: context => context.inputs.isSmartMode && !context.outputs.textAds,\r\n needsImageAds: context => context.inputs.isSmartMode && !context.outputs.imageAds,\r\n needsImages: context => !context.inputs.isSmartMode && context.inputs.isPMaxLite && !context.outputs.images,\r\n needsTargets: context => !context.outputs.targets,\r\n needsKeywords: context => !context.outputs.keywords,\r\n};\r\n","export const services = {\r\n loadBISuggestions: () => Promise.resolve(),\r\n loadTextAdsSuggestions: () => Promise.resolve(),\r\n loadImageAdsSuggestions: () => Promise.resolve(),\r\n loadImagesSuggestions: () => Promise.resolve(),\r\n loadKeywordsSuggestions: () => Promise.resolve(),\r\n loadRSASuggestions: () => Promise.resolve(),\r\n loadTargetsSuggestions: () => Promise.resolve(),\r\n loadBudgetSuggestions: () => Promise.resolve(),\r\n};\r\n","import { createMachine } from 'xstate';\r\nimport { useMemo } from 'react';\r\nimport { useMachine } from '@xstate/react';\r\n\r\nimport {\r\n machineConfig,\r\n} from './config/index';\r\nimport { actions } from './config/actions';\r\nimport { guards } from './config/guards';\r\nimport { services as defaultServices } from './config/services';\r\n\r\nexport function useSuggestionsService(serviceConfig) {\r\n const machine = useMemo(() => createMachine(machineConfig, {\r\n actions,\r\n guards,\r\n }), []);\r\n const machineWithServiceConfig = useMemo(() => machine.withConfig({\r\n services: {\r\n ...defaultServices,\r\n ...serviceConfig,\r\n },\r\n }), [machine, serviceConfig]);\r\n const [state, send, service] = useMachine(machineWithServiceConfig);\r\n\r\n const result = useMemo(() => ({\r\n state,\r\n send,\r\n service,\r\n }), [send, service, state]);\r\n\r\n return result;\r\n}\r\n","import { useEffect, useState } from 'react';\r\n\r\nexport function useOnceEffect(callFn) {\r\n const [called, setCalled] = useState(false);\r\n\r\n useEffect(() => {\r\n if (!called && callFn()) {\r\n setCalled(true);\r\n }\r\n }, [callFn, called]);\r\n}\r\n","import { STEP_STATES } from '@bingads-webui-react/wizard-core';\r\n\r\n/**\r\n * Define this file to simplify later logging mapping in consumer side.\r\n */\r\nexport const WIZARD_EVENT_PREFIX = 'WizardStepFlow:';\r\n\r\nexport const WIZARD_STEP_EVENT = {\r\n APP_LOAD: 'AppLoad',\r\n START_FLOW: 'StartedFlow',\r\n SWITCH_FLOW: 'SwitchedFlow',\r\n ENTER_PAGE: 'EnteredPage',\r\n COMPLETE: 'WizardComplete',\r\n};\r\n\r\nexport const SINGLE_STEP_EVENT = {\r\n LOADING: 'Loading',\r\n SAVING_SUCCEEDED: 'SavingSucceeded',\r\n SAVING_FAILED: 'SavingFailed',\r\n};\r\n\r\nexport const USER_TRIGGER_STEP_EVENT = {\r\n [STEP_STATES.GOING_NEXT]: 'SaveAndGoNext',\r\n [STEP_STATES.GOING_BACK]: 'SaveAndGoBack',\r\n [STEP_STATES.EXITING]: 'SaveAndExit',\r\n};\r\n\r\nexport const USER_TRIGGER_STEP_EVENT_KEYS = Object.keys(USER_TRIGGER_STEP_EVENT);\r\n","import _ from 'underscore';\r\nimport React, { useCallback, useEffect, useState, useRef, useContext, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { InstrumentationContext } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { useOnceEffect } from './helper';\r\nimport { WIZARD_EVENT_PREFIX, WIZARD_STEP_EVENT } from './constants';\r\n\r\nconst NoOpContext = {\r\n logComplete: _.noop,\r\n changedChannel: _.noop,\r\n enteredPage: _.noop,\r\n};\r\n\r\nexport const StepFlowContext = React.createContext(NoOpContext);\r\nconst DEFAULT_EVENT_VALUE = '';\r\n\r\nexport function useLogEnteredPage({\r\n Flow,\r\n SubFlow = DEFAULT_EVENT_VALUE,\r\n Page,\r\n}) {\r\n const { enteredPage } = useContext(StepFlowContext);\r\n useEffect(() => {\r\n if (Page) {\r\n enteredPage({ Flow, SubFlow, Page });\r\n }\r\n }, [Flow, Page, SubFlow, enteredPage]);\r\n}\r\n\r\nfunction useStateWithPrevious(initialValue) {\r\n const [state, setState] = useState(initialValue);\r\n const cache = useRef({});\r\n\r\n const updateState = useCallback((newValue) => {\r\n const value = {\r\n Flow: newValue.Flow || DEFAULT_EVENT_VALUE,\r\n SubFlow: newValue.SubFlow || DEFAULT_EVENT_VALUE,\r\n Page: newValue.Page || DEFAULT_EVENT_VALUE,\r\n };\r\n setState((prev) => {\r\n if (!_.isEqual(prev, value)) {\r\n cache.current = prev;\r\n return value;\r\n }\r\n return prev;\r\n });\r\n }, []);\r\n\r\n return [state, updateState, cache.current];\r\n}\r\n\r\nexport function StepFlowProvider({ children, shouldPost, postEventLog }) {\r\n const serverContext = useContext(ServerContext);\r\n const instrumentation = useContext(InstrumentationContext);\r\n\r\n const activity = useMemo(() => {\r\n if (instrumentation && instrumentation.stepFlowScenario) {\r\n const scenario = instrumentation.stepFlowScenario.create();\r\n return scenario.stepFlow.create();\r\n }\r\n return { trace: _.noop, error: _.noop };\r\n }, [instrumentation]);\r\n\r\n const triggerPostEventLog = postEventLog(serverContext, activity.trace);\r\n const shouldPostLog = shouldPost && _.isFunction(activity.trace) && _.isFunction(triggerPostEventLog);\r\n\r\n const [{\r\n Flow,\r\n SubFlow,\r\n Page,\r\n }, setContext, prevContext] = useStateWithPrevious({\r\n Flow: DEFAULT_EVENT_VALUE,\r\n SubFlow: DEFAULT_EVENT_VALUE,\r\n Page: DEFAULT_EVENT_VALUE,\r\n });\r\n\r\n const eventValues = useRef({});\r\n const postEventLogRef = useRef({});\r\n postEventLogRef.current = {\r\n postEvent: (EventName, EventValue) => triggerPostEventLog({\r\n EventName: `${WIZARD_EVENT_PREFIX}${EventName}`,\r\n EventValue,\r\n }),\r\n logValidationError: (error) => {\r\n const message = `WizardStepFlow validation error: ${error}`;\r\n activity.trace(message);\r\n },\r\n };\r\n\r\n useOnceEffect(() => {\r\n if (shouldPostLog) {\r\n postEventLogRef.current.postEvent(WIZARD_STEP_EVENT.APP_LOAD, {\r\n ...eventValues.current,\r\n });\r\n return true;\r\n }\r\n return false;\r\n });\r\n\r\n useOnceEffect(() => {\r\n if (shouldPostLog && Flow !== DEFAULT_EVENT_VALUE) {\r\n postEventLogRef.current.postEvent(WIZARD_STEP_EVENT.START_FLOW, {\r\n ...eventValues.current,\r\n Flow,\r\n });\r\n return true;\r\n }\r\n return false;\r\n });\r\n\r\n const logComplete = useCallback(() => {\r\n postEventLogRef.current.postEvent(WIZARD_STEP_EVENT.COMPLETE, {\r\n ...eventValues.current,\r\n Flow,\r\n SubFlow,\r\n Page,\r\n Complete: true,\r\n });\r\n }, [Flow, SubFlow, Page]);\r\n\r\n\r\n useEffect(() => {\r\n if (!shouldPost || Flow === DEFAULT_EVENT_VALUE) {\r\n return;\r\n }\r\n\r\n if (\r\n (prevContext.Flow !== Flow || prevContext.SubFlow !== SubFlow || prevContext.Page !== Page) &&\r\n Page !== DEFAULT_EVENT_VALUE\r\n ) {\r\n postEventLogRef.current.postEvent(WIZARD_STEP_EVENT.ENTER_PAGE, {\r\n ...eventValues.current,\r\n Flow,\r\n SubFlow,\r\n Page,\r\n });\r\n }\r\n\r\n if (prevContext.Flow !== Flow && prevContext.Flow !== DEFAULT_EVENT_VALUE) {\r\n if (prevContext.Page === Page) {\r\n postEventLogRef.current.logValidationError('page should have been modified when flow changed');\r\n }\r\n\r\n postEventLogRef.current.postEvent(WIZARD_STEP_EVENT.SWITCH_FLOW, {\r\n CID: eventValues.current.CID,\r\n AID: eventValues.current.AID,\r\n FromFlow: prevContext.Flow,\r\n ToFlow: Flow,\r\n FromPage: prevContext.Page || null,\r\n ToPage: Page || null,\r\n });\r\n }\r\n }, [Flow, Page, SubFlow, prevContext.Flow, prevContext.Page, prevContext.SubFlow, shouldPost]);\r\n\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n}\r\n\r\nStepFlowProvider.propTypes = {\r\n shouldPost: PropTypes.bool,\r\n postEventLog: PropTypes.func.isRequired,\r\n children: PropTypes.oneOfType([PropTypes.node, PropTypes.arrayOf(PropTypes.node)]).isRequired,\r\n serverContext: PropTypes.shape({}),\r\n};\r\n\r\nStepFlowProvider.defaultProps = {\r\n shouldPost: true,\r\n serverContext: undefined,\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport { useLogEnteredPage } from './step-flow-provider-with-context';\r\n\r\nexport const BasicStepLogger = ({\r\n flow, subflow, Page,\r\n}) => {\r\n useLogEnteredPage({ Flow: flow, SubFlow: subflow, Page: Page || 'unknown step' });\r\n return null;\r\n};\r\n\r\nBasicStepLogger.propTypes = {\r\n flow: PropTypes.string.isRequired,\r\n Page: PropTypes.string.isRequired,\r\n subflow: PropTypes.string,\r\n};\r\nBasicStepLogger.defaultProps = {\r\n subflow: '',\r\n};\r\n","import _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { useContext, useMemo } from 'react';\r\nimport { useWizardService, getCurrentStepId } from '@bingads-webui-react/wizard-core';\r\nimport { InstrumentationContext } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { useLogEnteredPage } from './step-flow-provider-with-context';\r\n\r\nexport const StepLogger = ({\r\n flow, subflow, stepToPage,\r\n}) => {\r\n const { state } = useWizardService();\r\n const currentStepId = getCurrentStepId(state);\r\n const instrumentation = useContext(InstrumentationContext);\r\n const activity = useMemo(() => {\r\n if (instrumentation && instrumentation.stepFlowScenario) {\r\n const scenario = instrumentation.stepFlowScenario.create();\r\n return scenario.stepFlow.create();\r\n }\r\n return { trace: _.noop, error: _.noop };\r\n }, [instrumentation]);\r\n\r\n if (!stepToPage[currentStepId]) {\r\n activity.error(`Cannot find the step name from stepToPage: ${currentStepId}`);\r\n }\r\n\r\n useLogEnteredPage({ Flow: flow, SubFlow: subflow, Page: stepToPage[currentStepId] || 'unknown step' });\r\n\r\n return null;\r\n};\r\n\r\nStepLogger.propTypes = {\r\n flow: PropTypes.string.isRequired,\r\n stepToPage: PropTypes.shape({}).isRequired,\r\n subflow: PropTypes.string.isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { StepFlowProvider } from './step-flow-provider-with-context';\r\nimport { StepLogger } from './step-logger';\r\n\r\nexport const WizardStepLogger = ({\r\n children,\r\n writeLog,\r\n shouldPost,\r\n flow,\r\n subflow,\r\n stepToPage,\r\n}) => (\r\n writeLog}\r\n shouldPost={shouldPost}\r\n >\r\n {children}\r\n \r\n \r\n);\r\n\r\nWizardStepLogger.propTypes = {\r\n children: PropTypes.oneOfType([PropTypes.node, PropTypes.arrayOf(PropTypes.node)]).isRequired,\r\n writeLog: PropTypes.func.isRequired,\r\n shouldPost: PropTypes.bool,\r\n flow: PropTypes.string.isRequired,\r\n subflow: PropTypes.string.isRequired,\r\n stepToPage: PropTypes.shape({}).isRequired,\r\n};\r\n\r\nWizardStepLogger.defaultProps = {\r\n shouldPost: true,\r\n};\r\n","import _ from 'underscore';\r\nimport { useCallback, useEffect, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { useFormService, FORM_STATES } from '@bingads-webui-react/form-core';\r\nimport { useWizardService } from '@bingads-webui-react/wizard-core';\r\nimport { SINGLE_STEP_EVENT, USER_TRIGGER_STEP_EVENT, USER_TRIGGER_STEP_EVENT_KEYS } from './constants';\r\n\r\nconst matchStepSubState = (wizardState, stepSubState) => {\r\n const stateArr = wizardState.toStrings();\r\n const fullState = stateArr[stateArr.length - 1];\r\n return fullState.includes(stepSubState);\r\n};\r\n\r\n/**\r\n * This component logs the single step, which needs to be put under the FormService.\r\n * @param {writeLog} write log function, e.g., API call or aria logging\r\n * @returns {void}\r\n */\r\nexport const SingleStepLogger = ({ writeLog }) => {\r\n const [startTime, setStartTime] = useState(Date.now());\r\n const { state } = useFormService();\r\n const isLoading = state.matches(FORM_STATES.LOADING);\r\n const isSaveSucceeded = state.matches(FORM_STATES.SAVING_SUCCEEDED);\r\n const isSaveFailed = state.matches(FORM_STATES.SAVING_FAILED);\r\n\r\n const { state: wizardState } = useWizardService();\r\n const [trigger, setTrigger] = useState(null);\r\n\r\n useEffect(() => {\r\n if (_.some(USER_TRIGGER_STEP_EVENT_KEYS, key => matchStepSubState(wizardState, key))) {\r\n const triggerKey = _.find(USER_TRIGGER_STEP_EVENT_KEYS, key => matchStepSubState(wizardState, key));\r\n setTrigger(USER_TRIGGER_STEP_EVENT[triggerKey]);\r\n }\r\n }, [wizardState]);\r\n\r\n const triggerWriteLog = useCallback((EventName, EventValue) => {\r\n writeLog({\r\n EventName,\r\n EventValue,\r\n });\r\n }, [writeLog]);\r\n\r\n useEffect(() => {\r\n if (isLoading) {\r\n setStartTime(Date.now());\r\n triggerWriteLog(SINGLE_STEP_EVENT.LOADING);\r\n }\r\n }, [isLoading, triggerWriteLog]);\r\n\r\n useEffect(() => {\r\n if (isSaveSucceeded) {\r\n const duration = Date.now() - startTime;\r\n triggerWriteLog(SINGLE_STEP_EVENT.SAVING_SUCCEEDED, {\r\n duration,\r\n trigger,\r\n });\r\n }\r\n }, [trigger, isSaveSucceeded, startTime, triggerWriteLog]);\r\n\r\n useEffect(() => {\r\n if (isSaveFailed) {\r\n triggerWriteLog(SINGLE_STEP_EVENT.SAVING_FAILED, {\r\n trigger,\r\n });\r\n }\r\n }, [trigger, isSaveFailed, triggerWriteLog, writeLog]);\r\n\r\n return null;\r\n};\r\n\r\nSingleStepLogger.propTypes = {\r\n writeLog: PropTypes.func.isRequired,\r\n};\r\n","import _ from 'underscore';\r\nimport { odata } from '@bingads-webui/http-util';\r\n\r\nexport class StockImageDataService {\r\n constructor({\r\n cid,\r\n aid,\r\n oDataConfig,\r\n controller,\r\n }) {\r\n this.cid = cid;\r\n this.aid = aid;\r\n this.path = oDataConfig.odataPath;\r\n this.controller = controller || 'Images';\r\n this.oDataConfig = {\r\n oDataToken: oDataConfig.odataToken,\r\n oDataTokenType: oDataConfig.oDataTokenType,\r\n applicationName: oDataConfig.applicationName,\r\n };\r\n this.odata = odata;\r\n }\r\n\r\n /**\r\n * Get the stock images using the OData\r\n *\r\n * @param {Object} options - options for getting\r\n * @param {Number} options.top - top\r\n * @param {Number} options.skip - skip\r\n * @param {Object} options.customQueries - key value pair for the additional queries.\r\n *\r\n * @returns {Promise} - Promise of getting the images\r\n */\r\n getStockImages(options) {\r\n const defaultOptions = {\r\n top: 20,\r\n skip: 0,\r\n customQueries: {},\r\n };\r\n\r\n const optionsWithDefault = _.defaults(options, defaultOptions);\r\n\r\n const url = `${this.path}/Customers(${this.cid})/Accounts(${this.aid})/${this.controller}`;\r\n\r\n const query = _.extend({\r\n $top: optionsWithDefault.top,\r\n $skip: optionsWithDefault.skip,\r\n }, optionsWithDefault.customQueries);\r\n\r\n return this.odata.get(url, _.extend({ data: query }, this.oDataConfig));\r\n }\r\n\r\n /**\r\n * Save the stock image using the OData\r\n *\r\n * @param {Object} options - options for saving\r\n * @param {string} options.stockImageId - the id of the stock image to save\r\n * @param {string} options.stockImageVendorId - the id of the stock vendor\r\n * @returns {Promise} - Promise of saving the images\r\n */\r\n saveStockImage({ stockImageId, stockImageVendorId }) {\r\n const url = `${this.path}/Customers(${this.cid})/Accounts(${this.aid})/${this.controller}`;\r\n\r\n return this.odata.post(\r\n url,\r\n _.extend({\r\n data: {\r\n Id: stockImageId.toString(),\r\n StockImageVendor: stockImageVendorId,\r\n },\r\n }, this.oDataConfig)\r\n );\r\n }\r\n}\r\n","import React from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { FilterEntity } from '@bingads-webui/filter-entity';\r\nimport { PredicateList } from '@bingads-webui/predicate-list-react';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { getStockPhotoFilterStyle } from '@bingads-webui-campaign/shared-image-experience-styles';\r\n\r\nimport { getShutterStockFilterSchema } from './shutter-stock-filter-schema';\r\n\r\nconst isPlainObject = value => _.isObject(value) && !_.isArray(value);\r\n\r\n/* istanbul ignore next */\r\nconst queryToPredicates = (query) => {\r\n if (!isPlainObject(query) || _.isEmpty(query)) {\r\n return [];\r\n }\r\n if (query.$and) {\r\n return query.$and;\r\n }\r\n return [query];\r\n};\r\n\r\n/* istanbul ignore next */\r\nconst predicatesToQuery = (predicates) => {\r\n if (!_.isArray(predicates) || _.isEmpty(predicates)) {\r\n return {};\r\n }\r\n if (predicates.length === 1) {\r\n return predicates[0];\r\n }\r\n return {\r\n $and: predicates,\r\n };\r\n};\r\n\r\nclass ShutterStockFilterInternal extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n const { i18nLegacy } = props;\r\n\r\n this.filterSchema = getShutterStockFilterSchema(i18nLegacy);\r\n\r\n this.editableFilter = new FilterEntity({}, {\r\n entitySchema: this.filterSchema,\r\n });\r\n }\r\n\r\n onQueryChange = (query) => {\r\n const {\r\n data: prevData,\r\n setData,\r\n } = this.props;\r\n const currData = {\r\n predicates: queryToPredicates(query),\r\n };\r\n\r\n /* istanbul ignore else */\r\n if (!_.isEqual(prevData, currData)) {\r\n setData(currData);\r\n }\r\n }\r\n\r\n render() {\r\n const {\r\n classes,\r\n data: {\r\n predicates,\r\n },\r\n popoverContainer,\r\n } = this.props;\r\n\r\n const query = predicatesToQuery(predicates);\r\n this.editableFilter.updateQuery(query);\r\n\r\n return (\r\n
\r\n \r\n {i18n => (\r\n \r\n )}\r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nShutterStockFilterInternal.propTypes = {\r\n classes: PropTypes.objectOf(PropTypes.string).isRequired,\r\n setData: PropTypes.func.isRequired,\r\n data: PropTypes.objectOf(PropTypes.any),\r\n i18nLegacy: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }),\r\n popoverContainer: PropTypes.shape(),\r\n};\r\n\r\nShutterStockFilterInternal.defaultProps = {\r\n data: null,\r\n i18n: {\r\n getString: _.identity,\r\n },\r\n popoverContainer: {},\r\n};\r\n\r\nconst ShutterStockFilter = withDefaultStyles(ShutterStockFilterInternal, getStockPhotoFilterStyle);\r\nexport { ShutterStockFilter };\r\n\r\n","const getShutterStockFilterSchema = (i18n) => {\r\n const filterSchema = {\r\n properties: {\r\n people_model_released: {\r\n name: 'People Model Released',\r\n filterable: true,\r\n title: i18n.getString('ShutterStock_Filter_People_Model_Released'),\r\n type: 'string',\r\n property: 'people_model_released',\r\n enum: [\r\n 'true',\r\n 'false',\r\n ],\r\n localized: {\r\n true: i18n.getString('ShutterStock_Filter_People_Model_Released_True'),\r\n false: i18n.getString('ShutterStock_Filter_People_Model_Released_False'),\r\n },\r\n operatorDisplayNameMap: {\r\n eq: i18n.getString('ShutterStock_Filter_Operator_Eq'),\r\n },\r\n operators: [\r\n 'eq',\r\n ],\r\n chooseType: 'radio',\r\n },\r\n people_ethnicity: {\r\n name: 'People Ethnicity',\r\n filterable: true,\r\n title: i18n.getString('ShutterStock_Filter_People_Ethnicity'),\r\n type: 'string',\r\n property: 'people_ethnicity',\r\n enum: [\r\n 'african',\r\n 'african_american',\r\n 'black',\r\n 'brazilian',\r\n 'chinese',\r\n 'caucasian',\r\n 'east_asian',\r\n 'hispanic',\r\n 'japanese',\r\n 'middle_eastern',\r\n 'native_american',\r\n 'pacific_islander',\r\n 'south_asian',\r\n 'southeast_asian',\r\n 'other',\r\n ],\r\n localized: {\r\n african: i18n.getString('ShutterStock_Filter_People_Ethnicity_African'),\r\n african_american: i18n.getString('ShutterStock_Filter_People_Ethnicity_African_American'),\r\n black: i18n.getString('ShutterStock_Filter_People_Ethnicity_Black'),\r\n brazilian: i18n.getString('ShutterStock_Filter_People_Ethnicity_Brazilian'),\r\n chinese: i18n.getString('ShutterStock_Filter_People_Ethnicity_Chinese'),\r\n caucasian: i18n.getString('ShutterStock_Filter_People_Ethnicity_Caucasian'),\r\n east_asian: i18n.getString('ShutterStock_Filter_People_Ethnicity_East_Asian'),\r\n hispanic: i18n.getString('ShutterStock_Filter_People_Ethnicity_Hispanic'),\r\n japanese: i18n.getString('ShutterStock_Filter_People_Ethnicity_Japanese'),\r\n middle_eastern: i18n.getString('ShutterStock_Filter_People_Ethnicity_Middle_Eastern'),\r\n native_american: i18n.getString('ShutterStock_Filter_People_Ethnicity_Native_American'),\r\n pacific_islander: i18n.getString('ShutterStock_Filter_People_Ethnicity_Pacific_Islander'),\r\n south_asian: i18n.getString('ShutterStock_Filter_People_Ethnicity_South_Asian'),\r\n southeast_asian: i18n.getString('ShutterStock_Filter_People_Ethnicity_Southeast_Asian'),\r\n other: i18n.getString('ShutterStock_Filter_People_Ethnicity_Other'),\r\n },\r\n operatorDisplayNameMap: {\r\n eq: i18n.getString('ShutterStock_Filter_Operator_Eq'),\r\n },\r\n operators: [\r\n 'eq',\r\n ],\r\n chooseType: 'checkbox',\r\n },\r\n people_gender: {\r\n name: 'People Gender',\r\n filterable: true,\r\n title: i18n.getString('ShutterStock_Filter_People_Gender'),\r\n type: 'string',\r\n property: 'people_gender',\r\n enum: [\r\n 'male',\r\n 'female',\r\n 'both',\r\n ],\r\n localized: {\r\n male: i18n.getString('ShutterStock_Filter_People_Male'),\r\n female: i18n.getString('ShutterStock_Filter_People_Female'),\r\n both: i18n.getString('ShutterStock_Filter_People_Both'),\r\n },\r\n operatorDisplayNameMap: {\r\n eq: i18n.getString('ShutterStock_Filter_Operator_Eq'),\r\n },\r\n operators: [\r\n 'eq',\r\n ],\r\n chooseType: 'radio',\r\n },\r\n people_age: {\r\n name: 'People Age',\r\n filterable: true,\r\n title: i18n.getString('ShutterStock_Filter_People_Age'),\r\n type: 'string',\r\n property: 'people_model_age',\r\n enum: [\r\n 'infants',\r\n 'children',\r\n 'teenagers',\r\n '20s',\r\n '30s',\r\n '40s',\r\n '50s',\r\n '60s',\r\n 'older',\r\n ],\r\n localized: {\r\n infants: i18n.getString('ShutterStock_Filter_People_Age_Infants'),\r\n children: i18n.getString('ShutterStock_Filter_People_Age_Children'),\r\n teenagers: i18n.getString('ShutterStock_Filter_People_Age_Teenagers'),\r\n '20s': i18n.getString('ShutterStock_Filter_People_Age_20s'),\r\n '30s': i18n.getString('ShutterStock_Filter_People_Age_30s'),\r\n '40s': i18n.getString('ShutterStock_Filter_People_Age_40s'),\r\n '50s': i18n.getString('ShutterStock_Filter_People_Age_50s'),\r\n '60s': i18n.getString('ShutterStock_Filter_People_Age_60s'),\r\n older: i18n.getString('ShutterStock_Filter_People_Age_Older'),\r\n },\r\n operatorDisplayNameMap: {\r\n eq: i18n.getString('ShutterStock_Filter_Operator_Eq'),\r\n },\r\n operators: [\r\n 'eq',\r\n ],\r\n chooseType: 'radio',\r\n },\r\n people_number: {\r\n name: 'People Number',\r\n filterable: true,\r\n title: i18n.getString('ShutterStock_Filter_People_Number'),\r\n type: 'string',\r\n property: 'people_number',\r\n enum: [\r\n '1',\r\n '2',\r\n '3',\r\n '4',\r\n ],\r\n localized: {\r\n 1: '1',\r\n 2: '2',\r\n 3: '3',\r\n 4: '4+',\r\n },\r\n operatorDisplayNameMap: {\r\n eq: i18n.getString('ShutterStock_Filter_Operator_Eq'),\r\n },\r\n operators: [\r\n 'eq',\r\n ],\r\n chooseType: 'radio',\r\n },\r\n },\r\n // work-around to have the noDuplicateValidation. Will remove once predicate supports it\r\n name: 'ShutterStockPeopleFilterSchema',\r\n type: 'object',\r\n };\r\n\r\n return filterSchema;\r\n};\r\n\r\nexport { getShutterStockFilterSchema };\r\n","import React, { useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { ShutterStockFilter } from './shutter-stock/shutter-stock-filter';\r\n\r\nexport const StockImageFilter = (props) => {\r\n const {\r\n i18nLegacy,\r\n onFilterQueryChange,\r\n popoverContainer,\r\n } = props;\r\n\r\n const [data, setData] = useState({});\r\n // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars\r\n const [filterQuery, setFilterQuery] = useState({});\r\n\r\n useEffect(() => {\r\n if (data.predicates) {\r\n const keyValueQueryPairs = _.reduce(\r\n data.predicates,\r\n (memo, predicate) => {\r\n // there is only one key per predicate\r\n const [key] = _.keys(predicate);\r\n const addedKeyValue = {};\r\n const [valuesArray] = _.values(_.values(predicate)[0]);\r\n\r\n // As we support multi-selection, we format the array in the following way\r\n // key[0]=value, key[1]=value\r\n /* istanbul ignore next */\r\n if (valuesArray.length > 1) {\r\n valuesArray.forEach((value, index) => {\r\n addedKeyValue[`${key}[${index}]`] = value;\r\n });\r\n } else {\r\n [addedKeyValue[key]] = valuesArray;\r\n }\r\n\r\n return _.extend(memo, addedKeyValue);\r\n }, {}\r\n );\r\n\r\n setFilterQuery(keyValueQueryPairs);\r\n\r\n /* istanbul ignore else */\r\n onFilterQueryChange(keyValueQueryPairs);\r\n }\r\n }, [data, onFilterQueryChange]);\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nStockImageFilter.propTypes = {\r\n onFilterQueryChange: PropTypes.func.isRequired,\r\n i18nLegacy: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n popoverContainer: PropTypes.shape(),\r\n};\r\n\r\nStockImageFilter.defaultProps = {\r\n popoverContainer: null,\r\n};\r\n","/* eslint-disable jsx-a11y/img-redundant-alt */\r\n/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport _ from 'underscore';\r\nimport React, { useCallback, useContext, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\nimport { Link } from '@bingads-webui-react/fabric-with-signal';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { getTitlePreview, getDescPreview } from '@bingads-webui-campaign/summary-grid-helper';\r\nimport { getExpandedTextAdDisplayUrl } from '@bingads-webui-campaign-legacy/crud-ad/service/displayUrl';\r\nimport { originalActionTextMapper } from '@bingads-webui-campaign-legacy/adextension-actionlink/model/language-type-translator';\r\n\r\nconst getAdCreationPreviewStyle = () => ({\r\n AdCreationPreviewContainer: {\r\n whiteSpace: 'normal',\r\n '& .ad-preview-content-container': {\r\n width: '338px',\r\n border: '1px solid rgba(151, 151, 151, 1)',\r\n borderRadius: '2px',\r\n padding: '16px',\r\n '& .ad-title-preview': {\r\n fontSize: '18px',\r\n lineHeight: '22px',\r\n color: '#1A0DAB',\r\n },\r\n '& .url-line': {\r\n alignItems: 'baseline',\r\n },\r\n '& .ad-url-preview': {\r\n fontSize: '14px',\r\n fontWeight: '700',\r\n lineHeight: '20px',\r\n color: '#006621',\r\n },\r\n '& .ad-description-preview': {\r\n '& .ad-slug': {\r\n color: '#666',\r\n lineHeight: '24px',\r\n border: '1px solid #ddd',\r\n padding: '0 2px',\r\n fontSize: '11px',\r\n marginRight: '4px',\r\n borderRadius: '6px',\r\n },\r\n fontSize: '14px',\r\n lineHeight: '20px',\r\n color: '#666666',\r\n marginTop: '6px',\r\n },\r\n },\r\n '& .responsive-ad-preview-content-container': {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n position: 'relative',\r\n borderRadius: '10px',\r\n width: '260px',\r\n overflow: 'hidden',\r\n cursor: 'pointer',\r\n textDecoration: 'none',\r\n boxShadow: '0px 4px 4px 0px rgba(0, 0, 0, 0.15)',\r\n '&:active:hover': {\r\n textDecoration: 'none',\r\n },\r\n '& .ad-label': {\r\n color: '#ddddd',\r\n opacity: '0.9',\r\n margin: '5px',\r\n position: 'absolute',\r\n fontSize: '8px',\r\n borderRadius: '2px',\r\n backgroundColor: 'white',\r\n width: '18px',\r\n height: '13px',\r\n textAlign: 'center',\r\n verticalAlign: 'middle',\r\n },\r\n '& .ad-preview-image': {\r\n width: '100%',\r\n height: '136px',\r\n objectFit: 'cover',\r\n objectPosition: 'top',\r\n },\r\n '& .mma-text-content-container': {\r\n padding: '12px 0 16px 16px',\r\n fontWeight: '600',\r\n wordWrap: 'break-word',\r\n '& .mma-short-headline': {\r\n fontSize: '16px',\r\n color: '#323130',\r\n },\r\n '& .mma-display-url': {\r\n fontSize: '8px',\r\n lineHeight: '12px',\r\n color: '#459D64',\r\n },\r\n '& .mma-description': {\r\n fontSize: '10px',\r\n lineHeight: '16px',\r\n color: '#323130',\r\n maxWidth: '160px',\r\n wordWrap: 'break-word',\r\n },\r\n\r\n },\r\n '& .mma-callToAction': {\r\n color: 'white',\r\n right: '12px',\r\n border: 'none',\r\n bottom: '12px',\r\n position: 'absolute',\r\n fontSize: '11px',\r\n lineHeight: '24px',\r\n fontWeight: '600',\r\n borderRadius: '20px',\r\n opacity: '0.9',\r\n backgroundColor: '#A0A0A0',\r\n },\r\n },\r\n },\r\n});\r\n\r\nconst ResponsiveSearchAdPreview = ({ data }) => { // for RSA\r\n const i18n = useContext(I18nContext);\r\n const handleRSAData = useCallback(() => {\r\n const convertedFinalUrl = _.first(data.FinalUrls);\r\n const headlineList = _.map(data.Headlines, i => ({\r\n Text: i.Asset && i.Asset.Text,\r\n PinnedField: i.PinnedField,\r\n }));\r\n const descriptionList = _.map(data.Descriptions, i => ({\r\n Text: i.Asset && i.Asset.Text,\r\n PinnedField: i.PinnedField,\r\n }));\r\n const convertedTitle = getTitlePreview(headlineList);\r\n const convertedText = getDescPreview(descriptionList);\r\n const convertedDisplayUrl = getExpandedTextAdDisplayUrl(_.first(data.FinalUrls), data.DisplayUrl, data.Path1, data.Path2);\r\n const resultData = {\r\n convertedFinalUrl,\r\n convertedTitle,\r\n convertedText,\r\n convertedDisplayUrl,\r\n };\r\n return resultData;\r\n }, [data]);\r\n\r\n const resultData = useMemo(handleRSAData, [data]);\r\n return (\r\n
\r\n \r\n {resultData.convertedTitle}\r\n \r\n \r\n {resultData.convertedDisplayUrl}\r\n \r\n \r\n {i18n.getString(_TL_('Ad'))}{resultData.convertedText}\r\n \r\n
\r\n );\r\n};\r\nResponsiveSearchAdPreview.propTypes = {\r\n data: PropTypes.shape({\r\n FinalUrls: PropTypes.arrayOf(PropTypes.string),\r\n Headlines: PropTypes.arrayOf(PropTypes.shape({\r\n Asset: PropTypes.shape({\r\n Text: PropTypes.string,\r\n }),\r\n PinnedField: PropTypes.string,\r\n })),\r\n Descriptions: PropTypes.arrayOf(PropTypes.shape({\r\n Asset: PropTypes.shape({\r\n Text: PropTypes.string,\r\n }),\r\n PinnedField: PropTypes.string,\r\n })),\r\n DisplayUrl: PropTypes.string,\r\n Path1: PropTypes.string,\r\n Path2: PropTypes.string,\r\n }),\r\n};\r\nResponsiveSearchAdPreview.defaultProps = {\r\n data: {\r\n FinalUrls: [],\r\n Headlines: [],\r\n Descriptions: [],\r\n DisplayUrl: '',\r\n Path1: '',\r\n Path2: '',\r\n },\r\n};\r\n\r\nconst ResponsiveAdPreview = ({ data }) => { // for MMA\r\n const i18n = useContext(I18nContext);\r\n const { LandscapeImageMediaUrl } = data;\r\n const convertedFinalUrl = _.first(data.FinalUrls);\r\n const callToAction = originalActionTextMapper[data.CallToActionLanguage] && originalActionTextMapper[data.CallToActionLanguage][data.CallToAction];\r\n return (\r\n \r\n
\r\n
{i18n.getString(_TL_('Ad'))}
\r\n {LandscapeImageMediaUrl && \"Ad}\r\n
\r\n
\r\n
{data.Headline}
\r\n
{data.DisplayUrl}
\r\n
{data.Text}
\r\n
\r\n {callToAction && }\r\n \r\n );\r\n};\r\n\r\nResponsiveAdPreview.propTypes = {\r\n data: PropTypes.shape({\r\n Headline: PropTypes.string,\r\n Text: PropTypes.string,\r\n LandscapeImageMediaUrl: PropTypes.string,\r\n DisplayUrl: PropTypes.string,\r\n CallToActionLanguage: PropTypes.string,\r\n CallToAction: PropTypes.string,\r\n }),\r\n};\r\nResponsiveAdPreview.defaultProps = {\r\n data: {\r\n Headline: '',\r\n Text: '',\r\n LandscapeImageMediaUrl: '',\r\n DisplayUrl: '',\r\n CallToActionLanguage: '',\r\n CallToAction: '',\r\n },\r\n};\r\n\r\nexport const AdCreationPreview = ({ data }) => {\r\n const i18n = useContext(I18nContext);\r\n const classes = useDefaultStyles(getAdCreationPreviewStyle);\r\n\r\n const getAdContent = useCallback(() => {\r\n if (_.isEmpty(data)) {\r\n return i18n.getString(_TL_('No Ad'));\r\n } else if (data.Type === 'ResponsiveSearch') {\r\n return
;\r\n } else if (data.Type === 'Responsive') {\r\n return
;\r\n }\r\n return i18n.getString(_TL_('1 Ad'));\r\n }, [data, classes, i18n]);\r\n\r\n return (\r\n \r\n {getAdContent()}\r\n \r\n );\r\n};\r\n\r\nAdCreationPreview.propTypes = {\r\n data: PropTypes.shape({\r\n Type: PropTypes.string.isRequired,\r\n }),\r\n};\r\n\r\nAdCreationPreview.defaultProps = {\r\n data: PropTypes.shape({\r\n }),\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\n\r\nexport const Store = ({ storeName }) => (\r\n \r\n {storeName}\r\n \r\n);\r\n\r\nStore.propTypes = {\r\n storeName: PropTypes.string,\r\n};\r\n\r\nStore.defaultProps = {\r\n storeName: null,\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\n\r\nexport const ProductCollections = ({ isProductCollectionsEnabled }) => {\r\n const i18n = useContext(I18nContext);\r\n const productCollectionsText = isProductCollectionsEnabled ? i18n.getString(_TL_('Enabled')) : i18n.getString(_TL_('Not enabled'));\r\n\r\n return (\r\n \r\n {productCollectionsText}\r\n \r\n );\r\n};\r\n\r\nProductCollections.propTypes = {\r\n isProductCollectionsEnabled: PropTypes.bool,\r\n};\r\n\r\nProductCollections.defaultProps = {\r\n isProductCollectionsEnabled: false,\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\n\r\nexport const LocalInventory = ({ isLocalInventoryEnabled }) => {\r\n const i18n = useContext(I18nContext);\r\n const localInventoryText = isLocalInventoryEnabled ? i18n.getString(_TL_('Enabled')) : i18n.getString(_TL_('Not enabled'));\r\n\r\n return (\r\n \r\n {localInventoryText}\r\n \r\n );\r\n};\r\n\r\nLocalInventory.propTypes = {\r\n isLocalInventoryEnabled: PropTypes.bool,\r\n};\r\n\r\nLocalInventory.defaultProps = {\r\n isLocalInventoryEnabled: false,\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { isEmpty } from 'underscore';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\nimport { SelectedItem } from '@bingads-webui-campaign-react/pill-item-components';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\n\r\nconst getProductsStyle = () => ({\r\n productFilterItem: {\r\n marginBottom: 5,\r\n },\r\n});\r\n\r\nexport const Products = ({ productFilters, useSelectedItem }) => {\r\n const i18n = useContext(I18nContext);\r\n const classes = useDefaultStyles(getProductsStyle);\r\n\r\n let productsText = '';\r\n\r\n if (isEmpty(productFilters)) {\r\n productsText = i18n.getString(_TL_('All products'));\r\n } else if (!useSelectedItem) {\r\n productsText = productFilters.join(' & ');\r\n }\r\n\r\n return (\r\n \r\n {useSelectedItem && !isEmpty(productFilters) ?\r\n productFilters.map((filter, index) => (\r\n
\r\n \r\n
)) :\r\n ({productsText})}\r\n
\r\n );\r\n};\r\n\r\nProducts.propTypes = {\r\n productFilters: PropTypes.arrayOf(PropTypes.string),\r\n useSelectedItem: PropTypes.bool,\r\n};\r\n\r\nProducts.defaultProps = {\r\n productFilters: [],\r\n useSelectedItem: false,\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\n\r\nexport const Feeds = ({ feedLabel }) => {\r\n const i18n = useContext(I18nContext);\r\n const feedLabelsText = i18n.getString(_TL_('Filter by feed label: {{feedLabel}}'), { feedLabel });\r\n\r\n return (\r\n \r\n {feedLabelsText}\r\n \r\n );\r\n};\r\n\r\nFeeds.propTypes = {\r\n feedLabel: PropTypes.string.isRequired,\r\n};\r\n","import React, { useContext, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\n\r\nexport const LocationTargeting = ({ locations, targetOption }) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const explicitLocations = useMemo(() => {\r\n const numLocations = locations.length;\r\n\r\n if (targetOption === 'everywhere') {\r\n return i18n.getString(_TL_('Everywhere'));\r\n }\r\n\r\n if (numLocations === 1) {\r\n return locations[0];\r\n } else if (numLocations === 2) {\r\n return `${locations[0]}, ${locations[1]}`;\r\n } else if (numLocations >= 3) {\r\n const moreThan2LocationsTemplate = _TL_('{0} +{1} more', 'The {0} placeholder represents the first location. The {1} placeholder represents the number of remaining locations');\r\n return i18n.getString(moreThan2LocationsTemplate).replace('{0}', locations[0]).replace('{1}', numLocations - 1);\r\n }\r\n return null;\r\n }, [i18n, locations, targetOption]);\r\n\r\n return (\r\n \r\n {explicitLocations}\r\n \r\n );\r\n};\r\n\r\nLocationTargeting.propTypes = {\r\n locations: PropTypes.arrayOf(PropTypes.string),\r\n targetOption: PropTypes.string,\r\n};\r\n\r\nLocationTargeting.defaultProps = {\r\n locations: [],\r\n targetOption: null,\r\n};\r\n","import React, { useContext } from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\n\r\nexport const 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 // LinkedIn specific\r\n ThirtyFiveToFiftyFive: _TL_('35-54'),\r\n FiftyFiveAndAbove: _TL_('55+'),\r\n};\r\n\r\nconst sortAgeRanges = ageRanges => _.sortBy(ageRanges, ageRange => AgeRanges[ageRange]);\r\n\r\nexport const formatAgeRange = (ageRange, i18n) => (AgeRanges[ageRange] ? i18n.getString(AgeRanges[ageRange]) : ageRange);\r\n\r\nexport const formatAgeRanges = (ageRanges, i18n) => _.chain(sortAgeRanges(ageRanges))\r\n .map(ageRange => formatAgeRange(ageRange, i18n))\r\n .join(i18n.getString(_TL_(', ')))\r\n .value();\r\n\r\nexport const AgeRangeTargeting = ({ ageRanges }) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n return (\r\n \r\n {formatAgeRanges(ageRanges, i18n)}\r\n \r\n );\r\n};\r\n\r\nAgeRangeTargeting.propTypes = {\r\n ageRanges: PropTypes.arrayOf(PropTypes.string),\r\n};\r\n\r\nAgeRangeTargeting.defaultProps = {\r\n ageRanges: [],\r\n};\r\n","import React, { useContext } from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\n\r\nexport const Genders = {\r\n Female: _TL_('Female'),\r\n Male: _TL_('Male'),\r\n Unknown: _TL_('Unknown'),\r\n};\r\n\r\nconst sortGenders = genders => _.sortBy(genders, gender => Genders[gender]);\r\n\r\nexport const formatGender = (gender, i18n) => (Genders[gender] ? i18n.getString(Genders[gender]) : gender);\r\n\r\nexport const formatGenders = (genders, i18n) => _.chain(sortGenders(genders))\r\n .map(gender => formatGender(gender, i18n))\r\n .join(i18n.getString(_TL_(', ')))\r\n .value();\r\n\r\nexport const GenderTargeting = ({ genders }) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n return (\r\n \r\n {formatGenders(genders, i18n)}\r\n \r\n );\r\n};\r\n\r\nGenderTargeting.propTypes = {\r\n genders: PropTypes.arrayOf(PropTypes.string),\r\n};\r\n\r\nGenderTargeting.defaultProps = {\r\n genders: [],\r\n};\r\n","import React, { useContext, useMemo } from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\nimport { getDay, getMin, getTime, minuteToSaveMap } from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport { getDateSettingDetails } from '@bingads-webui-campaign/date-setting';\r\n\r\nexport const getDayTimeDetails = (i18n, dayTime, is12) => {\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 return dateTimePart;\r\n};\r\n\r\nconst getAdScheduleDetails = (i18n, adSchedules, timeDisplayType, useSearcherTimeZone) => {\r\n let details = '';\r\n\r\n const is12 = timeDisplayType === '12-hour';\r\n const len = adSchedules.length;\r\n\r\n if (len === 0) {\r\n const defaultSchedule = {\r\n Id: '',\r\n Day: 'Alldays',\r\n StartHour: 0,\r\n StartMinute: 'ZERO',\r\n EndHour: 24,\r\n EndMinute: 'ZERO',\r\n BidAdjustmentType: 1,\r\n BidAdjustmentAmount: 0,\r\n CashbackPercent: null,\r\n };\r\n\r\n details += getDayTimeDetails(i18n, defaultSchedule, is12);\r\n } else {\r\n _.forEach(adSchedules, (schedule, index) => {\r\n details += getDayTimeDetails(i18n, schedule, is12);\r\n if (details && index < len - 1) {\r\n details += ', ';\r\n }\r\n });\r\n }\r\n\r\n if (useSearcherTimeZone) {\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\r\n return details;\r\n};\r\n\r\nexport const AdSchedule = ({\r\n startDate, endDate, adSchedules, useSearcherTimeZone, timeDisplayType, includeStartEnd,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const dateSettings = useMemo(() => (includeStartEnd ? getDateSettingDetails(i18n, startDate, endDate) : ''), [endDate, i18n, includeStartEnd, startDate]);\r\n const adScheduleSettings = useMemo(\r\n () => (adSchedules ?\r\n getAdScheduleDetails(i18n, adSchedules, timeDisplayType, useSearcherTimeZone) : '')\r\n , [adSchedules, i18n, timeDisplayType, useSearcherTimeZone]\r\n );\r\n\r\n return (\r\n \r\n {includeStartEnd ? `${dateSettings}${adScheduleSettings && `: ${adScheduleSettings}`}` : adScheduleSettings}\r\n \r\n );\r\n};\r\n\r\nAdSchedule.propTypes = {\r\n startDate: PropTypes.string.isRequired,\r\n endDate: PropTypes.string,\r\n adSchedules: PropTypes.arrayOf(PropTypes.shape({})),\r\n useSearcherTimeZone: PropTypes.bool,\r\n timeDisplayType: PropTypes.string,\r\n includeStartEnd: PropTypes.bool,\r\n};\r\n\r\nAdSchedule.defaultProps = {\r\n endDate: null,\r\n adSchedules: null,\r\n useSearcherTimeZone: false,\r\n timeDisplayType: '12-hour',\r\n includeStartEnd: true,\r\n};\r\n","/* eslint-disable react/no-array-index-key */\r\nimport React, { useContext, useMemo } from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\nimport { getDay, getMin, getTime, minuteToSaveMap, } from '@bingads-webui-campaign-react/wizard-shared-components';\r\n\r\nexport const getDayTimeDetails = (i18n, dayTime, is12) => {\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}} - {{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 return `${dateTimePart}: ${dayTime.BidAdjustmentType > 0 ? i18n.getString(_TL_('Increase by')) : i18n.getString(_TL_('Decrease by'))}\r\n ${dayTime.BidAdjustmentAmount || 0}%`;\r\n};\r\n\r\nconst getAdScheduleDetails = (i18n, adSchedules, timeDisplayType, useSearcherTimeZone) => {\r\n const details = [];\r\n\r\n const is12 = timeDisplayType === '12-hour';\r\n const len = (adSchedules && adSchedules.length) || 0;\r\n\r\n if (len === 0) {\r\n const defaultSchedule = {\r\n Id: '',\r\n Day: 'Alldays',\r\n StartHour: 0,\r\n StartMinute: 'ZERO',\r\n EndHour: 24,\r\n EndMinute: 'ZERO',\r\n BidAdjustmentType: 1,\r\n BidAdjustmentAmount: 0,\r\n CashbackPercent: null,\r\n };\r\n\r\n details.push(getDayTimeDetails(i18n, defaultSchedule, is12));\r\n } else {\r\n _.forEach(adSchedules, (schedule) => {\r\n details.push(getDayTimeDetails(i18n, schedule, is12));\r\n });\r\n }\r\n\r\n if (useSearcherTimeZone) {\r\n details.push(i18n.getString(_TL_('In ad viewer\\'s time zone')));\r\n } else {\r\n details.push(i18n.getString(_TL_('In your account\\'s time zone')));\r\n }\r\n\r\n return details;\r\n};\r\n\r\nexport const AdScheduleWithBidAdjustments = ({\r\n adSchedules, useSearcherTimeZone, timeDisplayType,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const adScheduleSettings = useMemo(\r\n () => (getAdScheduleDetails(i18n, adSchedules, timeDisplayType, useSearcherTimeZone))\r\n , [adSchedules, i18n, timeDisplayType, useSearcherTimeZone]\r\n );\r\n\r\n return (\r\n \r\n {adScheduleSettings.map((schedule, index) => (\r\n {schedule}\r\n ))}\r\n \r\n );\r\n};\r\n\r\nAdScheduleWithBidAdjustments.propTypes = {\r\n adSchedules: PropTypes.arrayOf(PropTypes.shape({})),\r\n useSearcherTimeZone: PropTypes.bool,\r\n timeDisplayType: PropTypes.string,\r\n};\r\n\r\nAdScheduleWithBidAdjustments.defaultProps = {\r\n adSchedules: null,\r\n useSearcherTimeZone: false,\r\n timeDisplayType: '12-hour',\r\n};\r\n","import React, { useContext } from 'react';\r\nimport { isEmpty } from 'underscore'\r\nimport PropTypes from 'prop-types';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\n\r\nexport const formatTargets = ({ data, includedData, excludedData, i18n, singularText, pluralText }) => {\r\n if ((!data || !data.length) && (isEmpty(includedData) && isEmpty(excludedData))) {\r\n return i18n.getString(_TL_('Targeting: No {{singularText}} segments selected.'), { singularText });\r\n }\r\n\r\n const targetedCriterions = includedData || data.filter(({ Status }) => Status === 'Active');\r\n const excludedCriterions = excludedData || data.filter(({ Status }) => Status === 'Excluded');\r\n\r\n let targetedCriterionDetails = '';\r\n let excludedCriterionDetails = '';\r\n\r\n if (targetedCriterions.length === 1) {\r\n targetedCriterionDetails = i18n.getString(_TL_('Targeted: 1 {{singularText}}'), { singularText });\r\n } else if (targetedCriterions.length > 1) {\r\n targetedCriterionDetails = i18n.getString(_TL_('Targeted: {{count}} {{pluralText}}'), { count: (targetedCriterions.length), pluralText });\r\n }\r\n\r\n if (excludedCriterions.length === 1) {\r\n excludedCriterionDetails = i18n.getString(_TL_('Excluded: 1 {{singularText}}'), { singularText });\r\n } else if (excludedCriterions.length > 1) {\r\n excludedCriterionDetails = i18n.getString(_TL_('Excluded: {{count}} {{pluralText}}'), { count: (excludedCriterions.length), pluralText });\r\n }\r\n\r\n return `${targetedCriterionDetails}${targetedCriterionDetails && excludedCriterionDetails && '. '}${excludedCriterionDetails}`;\r\n};\r\n\r\nexport const CommonTarget = ({ data, label, singularText, pluralText, includedData, excludedData }) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n return (\r\n \r\n {formatTargets({ data, i18n, singularText, pluralText, includedData, excludedData })}\r\n \r\n );\r\n};\r\n\r\nCommonTarget.propTypes = {\r\n data: PropTypes.arrayOf(PropTypes.shape({})),\r\n label: PropTypes.string,\r\n includedData: PropTypes.arrayOf(PropTypes.shape({})),\r\n excludedData: PropTypes.arrayOf(PropTypes.shape({})),\r\n singularText: PropTypes.string,\r\n pluralText: PropTypes.string,\r\n};\r\n\r\nCommonTarget.defaultProps = {\r\n data: [],\r\n label: '',\r\n includedData: null,\r\n excludedData: null,\r\n singularText: '',\r\n pluralText: '',\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { CommonTarget } from './common-targeting';\r\n\r\nexport const Audience = ({ audiences }) => (\r\n \r\n);\r\n\r\nAudience.propTypes = {\r\n audiences: PropTypes.arrayOf(PropTypes.shape({})),\r\n};\r\n\r\nAudience.defaultProps = {\r\n audiences: [],\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { CommonTarget } from './common-targeting';\r\n\r\nexport const Interest = ({ interests }) => (\r\n \r\n);\r\n\r\nInterest.propTypes = {\r\n interests: PropTypes.arrayOf(PropTypes.shape({})),\r\n};\r\n\r\nInterest.defaultProps = {\r\n interests: [],\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\n\r\nconst predictiveTargetingMessageTemplate = _TL_('Predictive targeting is {0}', \"The placeholder will display either 'on' or 'off'.\");\r\nconst predictiveTargetingOn = _TL_('on');\r\nconst predictiveTargetingOff = _TL_('off');\r\n\r\nexport const PredictiveTargeting = ({ isPredictiveTargetingEnabled }) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const predictiveTargetingText = i18n.getString(predictiveTargetingMessageTemplate).replace('{0}', isPredictiveTargetingEnabled ? predictiveTargetingOn : predictiveTargetingOff);\r\n\r\n return (\r\n \r\n {predictiveTargetingText}\r\n \r\n );\r\n};\r\n\r\nPredictiveTargeting.propTypes = {\r\n isPredictiveTargetingEnabled: PropTypes.bool,\r\n};\r\n\r\nPredictiveTargeting.defaultProps = {\r\n isPredictiveTargetingEnabled: false,\r\n};\r\n","import React, { useContext, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\nimport { getDateSettingDetails } from '@bingads-webui-campaign/date-setting';\r\n\r\nexport const StartEndDates = ({\r\n startDate, endDate, isUseCampaignLevelDates, isDateLevelDisplayed,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n const dateSettings = useMemo(\r\n () => getDateSettingDetails(i18n, startDate, endDate, isUseCampaignLevelDates, isDateLevelDisplayed),\r\n [i18n, startDate, endDate, isUseCampaignLevelDates, isDateLevelDisplayed]\r\n );\r\n\r\n return (\r\n \r\n {dateSettings}\r\n \r\n );\r\n};\r\n\r\nStartEndDates.propTypes = {\r\n startDate: PropTypes.string.isRequired,\r\n endDate: PropTypes.string,\r\n isUseCampaignLevelDates: PropTypes.bool,\r\n isDateLevelDisplayed: PropTypes.bool,\r\n};\r\n\r\nStartEndDates.defaultProps = {\r\n endDate: null,\r\n isUseCampaignLevelDates: false,\r\n isDateLevelDisplayed: false,\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { syndEnum } from '@bingads-webui-campaign-react/constants';\r\n\r\n// Does not support campaign type specific localization\r\nconst getLocalizationMapping = (adDistribution) => {\r\n switch (adDistribution) {\r\n case syndEnum.BingYahooOnly:\r\n return _TL_('Microsoft sites and select traffic');\r\n case syndEnum.SearchPartnersOnly:\r\n return _TL_('Only partner traffic');\r\n case syndEnum.BingYahooAndSearchPartners:\r\n default:\r\n return _TL_('The entire Microsoft Advertising Network (recommended)');\r\n }\r\n};\r\n\r\nexport const AdDistribution = ({ adDistribution }) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n return (\r\n \r\n {i18n.getString(getLocalizationMapping(adDistribution))}\r\n \r\n );\r\n};\r\n\r\nAdDistribution.propTypes = {\r\n adDistribution: PropTypes.string.isRequired,\r\n};\r\n","import _ from 'underscore';\r\nimport React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\n\r\nconst formatKeywords = ({ i18n, data, showLength }) => {\r\n if (_.isEmpty(data) || data.total === 0 || _.isEmpty(data.value)) {\r\n return i18n.getString(_TL_('No keyword'));\r\n }\r\n const len = data.total;\r\n if (len > showLength) {\r\n let detail = data.value.slice(0, showLength).map(keyword => keyword.Text).join(i18n.getString(_TL_(', ')));\r\n detail += i18n.getString(_TL_('... +{{count}} more'), { count: len - showLength });\r\n return detail;\r\n }\r\n return data.value.map(keyword => keyword.Text).join(i18n.getString(_TL_(', ')));\r\n};\r\n\r\nexport const Keywords = ({ data, showLength }) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n return (\r\n \r\n {formatKeywords({ i18n, data, showLength })}\r\n \r\n );\r\n};\r\n\r\nKeywords.propTypes = {\r\n data: PropTypes.shape({\r\n value: PropTypes.arrayOf(PropTypes.shape({\r\n Text: PropTypes.string,\r\n })),\r\n total: PropTypes.number,\r\n }),\r\n showLength: PropTypes.number,\r\n};\r\n\r\nKeywords.defaultProps = {\r\n data: {},\r\n showLength: 10,\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\n\r\nconst formatText = ({ data, i18n }) => {\r\n if (!data || data.length === 0) {\r\n return i18n.getString(_TL_('All genres'));\r\n }\r\n\r\n if (data.length === 1) {\r\n return i18n.getString(_TL_('1 genre'));\r\n }\r\n\r\n return i18n.getString(_TL_('{{count}} genres'), { count: data.length });\r\n};\r\n\r\nexport const Genre = ({ genreTargets }) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n return (\r\n \r\n {formatText({ data: genreTargets, i18n })}\r\n \r\n );\r\n};\r\n\r\nGenre.propTypes = {\r\n genreTargets: PropTypes.arrayOf(PropTypes.shape({})),\r\n};\r\n\r\nGenre.defaultProps = {\r\n genreTargets: [],\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\n\r\nexport const Disclaimer = ({ data }) => {\r\n const i18n = useContext(I18nContext);\r\n const disclaimerName = data?.Name || '';\r\n const disclaimerText = disclaimerName.length > 0 ? i18n.getString(_TL_('{{disclaimerName}}'), { disclaimerName }) : i18n.getString(_TL_('No disclaimer selected'));\r\n\r\n return (\r\n \r\n {disclaimerText}\r\n \r\n );\r\n};\r\n\r\nDisclaimer.propTypes = {\r\n data: PropTypes.shape({\r\n Name: PropTypes.string,\r\n }),\r\n};\r\n\r\nDisclaimer.defaultProps = {\r\n data: {\r\n Name: '',\r\n },\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { CommonTarget } from './common-targeting';\r\n\r\nexport const CompanyName = ({ companyTargets, negativeCompanyTargets }) => (\r\n \r\n);\r\n\r\nCompanyName.propTypes = {\r\n companyTargets: PropTypes.arrayOf(PropTypes.shape({})),\r\n negativeCompanyTargets: PropTypes.arrayOf(PropTypes.shape({})),\r\n};\r\n\r\nCompanyName.defaultProps = {\r\n companyTargets: [],\r\n negativeCompanyTargets: [],\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { CommonTarget } from './common-targeting';\r\n\r\nexport const JobFunction = ({ jobTargets, negativeJobTargets }) => (\r\n \r\n);\r\n\r\nJobFunction.propTypes = {\r\n jobTargets: PropTypes.arrayOf(PropTypes.shape({})),\r\n negativeJobTargets: PropTypes.arrayOf(PropTypes.shape({})),\r\n};\r\n\r\nJobFunction.defaultProps = {\r\n jobTargets: [],\r\n negativeJobTargets: [],\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { CommonTarget } from './common-targeting';\r\n\r\nexport const Industry = ({ industryTargets, negativeIndustryTargets }) => (\r\n \r\n);\r\n\r\nIndustry.propTypes = {\r\n industryTargets: PropTypes.arrayOf(PropTypes.shape({})),\r\n negativeIndustryTargets: PropTypes.arrayOf(PropTypes.shape({})),\r\n};\r\n\r\nIndustry.defaultProps = {\r\n industryTargets: [],\r\n negativeIndustryTargets: [],\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\n\r\nexport const formatConversionGoals = (i18n, conversionGoals) => {\r\n if (conversionGoals && conversionGoals.goalScopeSelection === 'account-scope') {\r\n return i18n.getString(_TL_('Account level conversion goals'));\r\n }\r\n\r\n const goalSelection = (conversionGoals && conversionGoals.goalSelection) || [];\r\n\r\n if (goalSelection.length === 1) {\r\n return i18n.getString(_TL_('1 conversion goal'));\r\n } else if (goalSelection.length > 1) {\r\n return i18n.getString(_TL_('{{count}} conversion goals'), { count: goalSelection.length });\r\n }\r\n\r\n return i18n.getString(_TL_('No conversion goals'));\r\n};\r\n\r\nexport const ConversionGoals = ({ conversionGoals }) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n return (\r\n \r\n {formatConversionGoals(i18n, conversionGoals)}\r\n \r\n );\r\n};\r\n\r\nConversionGoals.propTypes = {\r\n conversionGoals: PropTypes.shape({}),\r\n};\r\n\r\nConversionGoals.defaultProps = {\r\n conversionGoals: null,\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\n\r\nexport const BudgetTypes = {\r\n DailyStandard: 'DailyStandard',\r\n LifetimeBudgetStandard: 'LifetimeBudgetStandard',\r\n};\r\n\r\n\r\nconst formatBudget = (i18n, data, currencyCode) => {\r\n if (!data) {\r\n return i18n.getString(_TL_('No budget'));\r\n }\r\n\r\n const { Amount, Id, Type } = data;\r\n\r\n if (Id) {\r\n return i18n.getString(_TL_('Budget applied from shared library'));\r\n }\r\n\r\n const currencySymbol = i18n.getCurrencySymbol(currencyCode);\r\n\r\n if (Type === BudgetTypes.LifetimeBudgetStandard) {\r\n return `${currencySymbol}${Amount} ${i18n.getString(_TL_('campaign total'))}`;\r\n }\r\n\r\n return `${currencySymbol}${Amount}/${i18n.getString(_TL_('day'))}`;\r\n};\r\n\r\nexport const Budget = ({ data, currencyCode }) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n return (\r\n \r\n {formatBudget(i18n, data, currencyCode)}\r\n \r\n );\r\n};\r\n\r\nBudget.propTypes = {\r\n data: PropTypes.shape({}),\r\n currencyCode: PropTypes.string,\r\n};\r\n\r\nBudget.defaultProps = {\r\n data: null,\r\n currencyCode: 'USD',\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\nimport { getBidTitleDetails } from '@bingads-webui-campaign-react/wizard-shared-components';\r\n\r\nconst formatBidStrategy = (i18n, data) => getBidTitleDetails(i18n, data);\r\n\r\n\r\nexport const BidStrategy = ({ data }) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n return (\r\n \r\n {formatBidStrategy(i18n, data)}\r\n \r\n );\r\n};\r\n\r\nBidStrategy.propTypes = {\r\n data: PropTypes.shape({}),\r\n};\r\n\r\nBidStrategy.defaultProps = {\r\n data: {},\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\n\r\nexport const formatBidValue = (i18n, data, currencyCode) => {\r\n if (!data) {\r\n return i18n.getString(_TL_('No bid value'));\r\n }\r\n\r\n return `${i18n.getCurrencySymbol(currencyCode)}${data} ${currencyCode}`;\r\n};\r\n\r\nexport const BidValue = ({ data, currencyCode }) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n return (\r\n \r\n {formatBidValue(i18n, data, currencyCode)}\r\n \r\n );\r\n};\r\n\r\nBidValue.propTypes = {\r\n data: PropTypes.string,\r\n currencyCode: PropTypes.string,\r\n};\r\n\r\nBidValue.defaultProps = {\r\n data: '',\r\n currencyCode: 'USD',\r\n};\r\n","import React, { useContext, useMemo } from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\nimport { campaignLanguageStrings } from '@bingads-webui-campaign-react/language-target';\r\n\r\nexport const Languages = ({ data }) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n // format languages\r\n const formattedLanguages = useMemo(() => _.map(data, language => i18n.getString(campaignLanguageStrings[language] || language)).toString(), [i18n, data]);\r\n\r\n return (\r\n \r\n {formattedLanguages}\r\n \r\n );\r\n};\r\n\r\nLanguages.propTypes = {\r\n data: PropTypes.arrayOf(PropTypes.string),\r\n};\r\n\r\nLanguages.defaultProps = {\r\n data: [],\r\n};\r\n","import React, { useContext, useMemo } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport PropTypes from 'prop-types';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\n\r\nexport const AudienceSignal = ({ data }) => {\r\n const i18n = useContext(I18nContext);\r\n // get audience signal name\r\n const audienceSignalName = useMemo(() => data && data.Name, [data]);\r\n\r\n return (\r\n \r\n {audienceSignalName || i18n.getString(_TL_('No audience signal'))}\r\n \r\n );\r\n};\r\n\r\nAudienceSignal.propTypes = {\r\n data: PropTypes.arrayOf(PropTypes.string),\r\n};\r\n\r\nAudienceSignal.defaultProps = {\r\n data: [],\r\n};\r\n","import React, { useContext, useEffect, useState } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport PropTypes from 'prop-types';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\nimport { Shimmer } from '@fluentui/react';\r\nimport { ImageListSummaryCardDetails, processImageListModelToViewModel } from '@bingads-webui-campaign-react/pmax-image-experience';\r\n\r\nexport const Images = ({\r\n data,\r\n shouldFetchFromMT,\r\n cid,\r\n aid,\r\n isLogo,\r\n label,\r\n}) => {\r\n // get images\r\n const i18n = useContext(I18nContext);\r\n\r\n const [images, setImages] = useState({});\r\n const [isLoading, setIsLoading] = useState(false);\r\n\r\n useEffect(() => {\r\n if (shouldFetchFromMT) {\r\n setIsLoading(true);\r\n // fetch images from MT\r\n processImageListModelToViewModel(data.ImageAssets, cid, aid).on({\r\n onSuccess: (loadedImageList) => {\r\n setImages({\r\n ImageList: loadedImageList,\r\n });\r\n setIsLoading(false);\r\n },\r\n onError: () => {\r\n setImages({});\r\n setIsLoading(false);\r\n },\r\n });\r\n }\r\n }, [aid, cid, data.ImageAssets, shouldFetchFromMT]);\r\n\r\n return (\r\n \r\n {\r\n isLoading\r\n ? \r\n : \r\n }\r\n \r\n );\r\n};\r\n\r\nImages.propTypes = {\r\n data: PropTypes.shape({\r\n ImageAssets: PropTypes.arrayOf(PropTypes.shape({})),\r\n }),\r\n shouldFetchFromMT: PropTypes.bool,\r\n aid: PropTypes.string,\r\n cid: PropTypes.string,\r\n isLogo: PropTypes.bool,\r\n label: PropTypes.string,\r\n};\r\n\r\nImages.defaultProps = {\r\n data: {},\r\n shouldFetchFromMT: false,\r\n aid: null,\r\n cid: null,\r\n isLogo: false,\r\n label: _TL_('Images'),\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 { getStoreTitleDetails } from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\n\r\nconst getStoreInfoStyle = () => ({\r\n storeTitleDetails: {\r\n whiteSpace: 'normal',\r\n },\r\n});\r\n\r\nexport const StoreInfo = ({ data }) => {\r\n const i18n = useContext(I18nContext);\r\n const classes = useDefaultStyles(getStoreInfoStyle);\r\n\r\n const {\r\n ProviderId,\r\n IsFeedFiltered,\r\n SalesCountry,\r\n FeedLabel,\r\n LocalInventoryAdsEnabled,\r\n storesData,\r\n } = data || {};\r\n\r\n const storeContainerData = useMemo(() => ({\r\n ProviderId,\r\n IsFeedFiltered,\r\n SalesCountry,\r\n FeedLabel,\r\n LocalInventoryAdsEnabled,\r\n }), [ProviderId, IsFeedFiltered, SalesCountry, FeedLabel, LocalInventoryAdsEnabled]);\r\n\r\n return (\r\n \r\n
{storesData && getStoreTitleDetails(i18n, storesData, storeContainerData)}
\r\n
\r\n );\r\n};\r\n\r\nStoreInfo.propTypes = {\r\n data: PropTypes.shape({\r\n ProviderId: PropTypes.string,\r\n IsFeedFiltered: PropTypes.bool,\r\n SalesCountry: PropTypes.string,\r\n FeedLabel: PropTypes.string,\r\n LocalInventoryAdsEnabled: PropTypes.bool,\r\n }).isRequired,\r\n};\r\n","import React, { useContext, useMemo } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport PropTypes from 'prop-types';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\n\r\nexport const AutoGeneratedAssets = ({ data }) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const {\r\n autoGeneratedTextOptOut,\r\n autoGeneratedImageOptOut,\r\n finalUrlExpansionOptOut,\r\n } = data || {};\r\n\r\n const autoGenAssetsSummary = useMemo(() => {\r\n if (finalUrlExpansionOptOut && autoGeneratedTextOptOut && autoGeneratedImageOptOut) {\r\n return i18n.getString(_TL_('Off: Do not use autogenerated assets in ads.'));\r\n }\r\n return i18n.getString(_TL_('On: You’ve enabled autogenerated assets for your ads.'));\r\n }, [i18n, finalUrlExpansionOptOut, autoGeneratedTextOptOut, autoGeneratedImageOptOut]);\r\n\r\n return (\r\n \r\n {autoGenAssetsSummary}\r\n \r\n );\r\n};\r\n\r\nAutoGeneratedAssets.propTypes = {\r\n data: PropTypes.shape({\r\n autoGeneratedTextOptOut: PropTypes.bool,\r\n autoGeneratedImageOptOut: PropTypes.bool,\r\n finalUrlExpansionOptOut: PropTypes.bool,\r\n finalUrlExpansions: PropTypes.arrayOf(PropTypes.string),\r\n }),\r\n};\r\n\r\nAutoGeneratedAssets.defaultProps = {\r\n data: {},\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\nimport { getUrlOptionsDetails } from '@bingads-webui-campaign-react/url-options';\r\n\r\nexport const UrlOptions = ({ data }) => {\r\n const i18n = useContext(I18nContext);\r\n const urlOptionsDetails = getUrlOptionsDetails(i18n, data);\r\n\r\n return (\r\n \r\n {urlOptionsDetails}\r\n \r\n );\r\n};\r\n\r\nUrlOptions.propTypes = {\r\n data: PropTypes.shape({\r\n TrackingUrlTemplate: PropTypes.string,\r\n FinalUrlSuffix: PropTypes.string,\r\n UrlCustomParameters: PropTypes.arrayOf(PropTypes.shape({\r\n Key: PropTypes.string,\r\n Value: PropTypes.string,\r\n })),\r\n }),\r\n};\r\n\r\nUrlOptions.defaultProps = {\r\n data: {\r\n TrackingUrlTemplate: '',\r\n FinalUrlSuffix: '',\r\n UrlCustomParameters: [],\r\n },\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\n\r\nconst formatBidValue = (i18n, targetCpa, currencyCode) => {\r\n if (!targetCpa) {\r\n return i18n.getString(_TL_('No bid value'));\r\n }\r\n return `${i18n.getCurrencySymbol(currencyCode)}${targetCpa} ${currencyCode}`;\r\n};\r\n\r\nconst formatRoasValue = (i18n, targetRoas) => {\r\n if (!targetRoas) {\r\n return i18n.getString(_TL_('No bid value'));\r\n }\r\n return `${targetRoas * 100} %`;\r\n};\r\n\r\nexport const BidTarget = ({ data, currencyCode }) => {\r\n const i18n = useContext(I18nContext);\r\n const {\r\n Type,\r\n TargetRoas,\r\n TargetCpa,\r\n } = data || {};\r\n\r\n let label = null;\r\n let targetValue = null;\r\n if (Type === 'MaxConversions') {\r\n label = _TL_('Target CPA');\r\n targetValue = formatBidValue(i18n, TargetCpa, currencyCode);\r\n } else {\r\n label = _TL_('Target ROAS');\r\n targetValue = formatRoasValue(i18n, TargetRoas);\r\n }\r\n\r\n return (\r\n \r\n {targetValue}\r\n \r\n );\r\n};\r\n\r\nBidTarget.propTypes = {\r\n data: PropTypes.shape({\r\n Type: PropTypes.string,\r\n TargetRoas: PropTypes.number,\r\n TargetCpa: PropTypes.number,\r\n }),\r\n currencyCode: PropTypes.string,\r\n};\r\n\r\nBidTarget.defaultProps = {\r\n data: {\r\n Type: '',\r\n TargetRoas: null,\r\n TargetCpa: null,\r\n },\r\n currencyCode: 'USD',\r\n};\r\n","import React, { useContext } from 'react';\r\nimport _ from 'underscore';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport PropTypes from 'prop-types';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\n\r\nconst getExpansionsSummary = (i18n, finalUrlExpansions) => {\r\n const exactUrls = [];\r\n const rules = [];\r\n\r\n _.each(finalUrlExpansions, (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 disabled Final URL expansion'));\r\n};\r\n\r\nexport const FinalURLExpansions = ({ data }) => {\r\n const i18n = useContext(I18nContext);\r\n const { finalUrlExpansions } = data || {};\r\n\r\n return (\r\n \r\n {getExpansionsSummary(i18n, finalUrlExpansions)}\r\n \r\n );\r\n};\r\n\r\nFinalURLExpansions.propTypes = {\r\n data: PropTypes.shape({\r\n finalUrlExpansions: PropTypes.arrayOf(PropTypes.string),\r\n }),\r\n};\r\n\r\nFinalURLExpansions.defaultProps = {\r\n data: {},\r\n};\r\n","import React, { useContext } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport PropTypes from 'prop-types';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\n\r\nexport const getSearchThemeDetails = (i18n, searchThemes) => {\r\n if (searchThemes && searchThemes.length > 0) {\r\n return searchThemes.map(item => item.SearchTheme).join(', ');\r\n }\r\n return i18n.getString(_TL_('No search themes added'));\r\n};\r\n\r\nexport const SearchThemes = ({ data }) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n return (\r\n \r\n {getSearchThemeDetails(i18n, data)}\r\n \r\n );\r\n};\r\n\r\nSearchThemes.propTypes = {\r\n data: PropTypes.arrayOf(PropTypes.string),\r\n};\r\n\r\nSearchThemes.defaultProps = {\r\n data: [],\r\n};\r\n","import React, { useContext, useMemo } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport PropTypes from 'prop-types';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\n\r\nexport const CostPerSale = ({ data }) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const { costPerSaleOptOut } = data || {};\r\n\r\n const costPerSaleSummary = useMemo(() => {\r\n if (costPerSaleOptOut) {\r\n return i18n.getString(_TL_('Off'));\r\n }\r\n return i18n.getString(_TL_('On'));\r\n }, [i18n, costPerSaleOptOut]);\r\n\r\n return (\r\n \r\n {costPerSaleSummary}\r\n \r\n );\r\n};\r\n\r\nCostPerSale.propTypes = {\r\n data: PropTypes.shape({\r\n costPerSaleOptOut: PropTypes.bool,\r\n }),\r\n};\r\n\r\nCostPerSale.defaultProps = {\r\n data: {},\r\n};\r\n","import React, { useContext } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport PropTypes from 'prop-types';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\nimport { UrlOptionsDetailsWithRules } from '@bingads-webui-campaign-react/url-rules';\r\nimport { UrlOptionsDetailsWithRulesV2 } from '@bingads-webui-campaign-react/url-rules-v2';\r\n\r\nexport const UrlRules = ({ data, isAssetGroupUrlRulesV2Enabled }) => {\r\n const i18n = useContext(I18nContext);\r\n const {\r\n finalUrls, path1, path2, mobileFinalUrls, urlRules,\r\n } = data || {};\r\n\r\n return (\r\n \r\n {\r\n isAssetGroupUrlRulesV2Enabled ? (\r\n \r\n ) : (\r\n \r\n )\r\n }\r\n \r\n );\r\n};\r\n\r\nUrlRules.propTypes = {\r\n data: PropTypes.shape({\r\n finalUrls: PropTypes.arrayOf(PropTypes.string),\r\n path1: PropTypes.string,\r\n path2: PropTypes.string,\r\n mobileFinalUrls: PropTypes.arrayOf(PropTypes.string),\r\n urlRules: PropTypes.arrayOf(PropTypes.shape({})),\r\n }),\r\n isAssetGroupUrlRulesV2Enabled: PropTypes.bool,\r\n};\r\n\r\nUrlRules.defaultProps = {\r\n data: {\r\n finalUrls: [],\r\n path1: '',\r\n path2: '',\r\n mobileFinalUrls: [],\r\n urlRules: [],\r\n },\r\n};\r\n","import React, { useContext, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { get } from 'underscore';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\n\r\nexport const NewCustomerAcquisition = ({ data, currencyCode }) => {\r\n const i18n = useContext(I18nContext);\r\n const { newCustomerAcquisitionOptOut, newCustomerAcquisition } = data || {};\r\n const { campaignSettings, accountSettings } = newCustomerAcquisition || {};\r\n\r\n const summary = useMemo(() => {\r\n let summaryText = newCustomerAcquisitionOptOut ? i18n.getString(_TL_('Off')) : i18n.getString(_TL_('On'));\r\n\r\n if (!newCustomerAcquisitionOptOut) {\r\n const bidOnlyMode = get(campaignSettings, 'bidOnlyMode', false);\r\n const campaignAdditionalValue = get(campaignSettings, 'additionalConversionValue', 0) || 0;\r\n const accountAdditionalValue = get(accountSettings, 'additionalConversionValue', 0) || 0;\r\n\r\n if (!bidOnlyMode) {\r\n if (campaignAdditionalValue !== 0) {\r\n summaryText += i18n.getString(_TL_('; Bid higher for new customers; Additional conversion value'));\r\n summaryText += ` ${i18n.formatCurrency(campaignAdditionalValue, currencyCode)}`;\r\n } else {\r\n summaryText += i18n.getString(_TL_('; Bid higher for new customers; Additional conversion value (account level setting)'));\r\n summaryText += ` ${i18n.formatCurrency(accountAdditionalValue, currencyCode)}`;\r\n }\r\n } else {\r\n summaryText += i18n.getString(_TL_('; Bid only for new customers'));\r\n }\r\n }\r\n\r\n return summaryText;\r\n }, [accountSettings, campaignSettings, currencyCode, i18n, newCustomerAcquisitionOptOut]);\r\n\r\n return (\r\n \r\n {summary}\r\n \r\n );\r\n};\r\n\r\nNewCustomerAcquisition.propTypes = {\r\n data: PropTypes.shape({\r\n newCustomerAcquisitionOptOut: PropTypes.bool,\r\n newCustomerAcquisition: PropTypes.shape({\r\n campaignSettings: PropTypes.shape({}),\r\n accountSettings: PropTypes.shape({}),\r\n }),\r\n }),\r\n currencyCode: PropTypes.string,\r\n};\r\n\r\nNewCustomerAcquisition.defaultProps = {\r\n data: {\r\n newCustomerAcquisitionOptOut: true,\r\n newCustomerAcquisition: {\r\n campaignSettings: {},\r\n accountSettings: {},\r\n },\r\n },\r\n currencyCode: '',\r\n};\r\n","import React, { useContext } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport PropTypes from 'prop-types';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\nimport { ImageListSummaryCardDetails } from '@bingads-webui-campaign-react/pmax-image-experience';\r\n\r\nexport const Videos = ({\r\n data,\r\n label,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nVideos.propTypes = {\r\n data: PropTypes.arrayOf(PropTypes.shape({})),\r\n label: PropTypes.string,\r\n};\r\n\r\nVideos.defaultProps = {\r\n data: [],\r\n label: _TL_('Videos'),\r\n};\r\n","import {\r\n AdCreation,\r\n AdCreationPreview,\r\n Store,\r\n ProductCollections,\r\n LocalInventory,\r\n Products,\r\n Feeds,\r\n LocationTargeting,\r\n AgeRangeTargeting,\r\n GenderTargeting,\r\n AdSchedule,\r\n AdScheduleWithBidAdjustments,\r\n StartEndDates,\r\n AdDistribution,\r\n Audience,\r\n Interest,\r\n PredictiveTargeting,\r\n CompanyName,\r\n JobFunction,\r\n Industry,\r\n ConversionGoals,\r\n Budget,\r\n BidStrategy,\r\n BidValue,\r\n Languages,\r\n AudienceSignal,\r\n Images,\r\n LongHeadlinesSummary,\r\n DescriptionsSummary,\r\n HeadlinesSummary,\r\n StoreInfo,\r\n ListingGroup,\r\n AutoGeneratedAssets,\r\n UrlOptions,\r\n BidTarget,\r\n FinalURLExpansions,\r\n Keywords,\r\n SearchThemes,\r\n CostPerSale,\r\n UrlRules,\r\n Genre,\r\n NewCustomerAcquisition,\r\n Videos,\r\n Disclaimer,\r\n} from './components';\r\n\r\nexport const summaryPageComponentTypes = {\r\n 'ad-creation': AdCreation,\r\n 'ad-creation-preview': AdCreationPreview,\r\n store: Store,\r\n 'product-collections': ProductCollections,\r\n 'local-inventory': LocalInventory,\r\n feeds: Feeds,\r\n products: Products,\r\n 'location-targeting': LocationTargeting,\r\n 'age-range-targeting': AgeRangeTargeting,\r\n 'gender-targeting': GenderTargeting,\r\n 'genre-targeting': Genre,\r\n 'ad-schedule': AdSchedule,\r\n 'ad-schedule-with-bid-adjustments': AdScheduleWithBidAdjustments,\r\n 'start-end-dates': StartEndDates,\r\n 'ad-distribution': AdDistribution,\r\n interest: Interest,\r\n audience: Audience,\r\n company: CompanyName,\r\n industry: Industry,\r\n 'job-function': JobFunction,\r\n 'predictive-targeting': PredictiveTargeting,\r\n 'conversion-goals': ConversionGoals,\r\n budget: Budget,\r\n 'bid-strategy': BidStrategy,\r\n 'bid-value': BidValue,\r\n languages: Languages,\r\n 'audience-signal': AudienceSignal,\r\n images: Images,\r\n 'long-headlines': LongHeadlinesSummary,\r\n descriptions: DescriptionsSummary,\r\n headlines: HeadlinesSummary,\r\n 'store-info': StoreInfo,\r\n 'listing-group': ListingGroup,\r\n 'auto-generated-assets': AutoGeneratedAssets,\r\n 'url-options': UrlOptions,\r\n 'bid-target': BidTarget,\r\n 'final-url-expansions': FinalURLExpansions,\r\n keywords: Keywords,\r\n 'search-themes': SearchThemes,\r\n 'cost-per-sale': CostPerSale,\r\n 'url-rules': UrlRules,\r\n 'new-customer-acquisition': NewCustomerAcquisition,\r\n videos: Videos,\r\n disclaimer: Disclaimer,\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\n\r\nexport const AdCreation = ({ numAds }) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n return (\r\n \r\n {`${numAds} ${numAds === 1 ? i18n.getString(_TL_('Ad')) : i18n.getString(_TL_('Ads'))}`}\r\n \r\n );\r\n};\r\n\r\nAdCreation.propTypes = {\r\n numAds: PropTypes.number.isRequired,\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { getHeadlinesCardSummaryDetails, getLongHeadlinesCardSummaryDetails, getDescriptionsCardSummaryDetails } from '@bingads-webui-campaign-react/validated-text-collection';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\n\r\nexport const HeadlinesSummary = ({\r\n data: headlines,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n return (\r\n \r\n \r\n {getHeadlinesCardSummaryDetails(i18n, headlines)}\r\n \r\n \r\n );\r\n};\r\n\r\nHeadlinesSummary.propTypes = {\r\n data: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n};\r\n\r\n\r\nexport const LongHeadlinesSummary = ({\r\n data: longHeadlines,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n return (\r\n \r\n \r\n {getLongHeadlinesCardSummaryDetails(i18n, longHeadlines)}\r\n \r\n \r\n );\r\n};\r\n\r\nLongHeadlinesSummary.propTypes = {\r\n data: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n};\r\n\r\nexport const DescriptionsSummary = ({\r\n data: descriptions,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n return (\r\n \r\n \r\n {getDescriptionsCardSummaryDetails(i18n, descriptions)}\r\n \r\n \r\n );\r\n};\r\n\r\nDescriptionsSummary.propTypes = {\r\n data: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\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 { getListingGroupDetails } from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport { PropertyRow } from '@bingads-webui-campaign-react/ui-generator';\r\n\r\nexport const ListingGroup = ({ data }) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const {\r\n productFilter,\r\n listingGroup,\r\n } = data || {};\r\n\r\n const listingGroupDetails = useMemo(() => getListingGroupDetails(\r\n i18n,\r\n !!productFilter,\r\n {\r\n productFilter,\r\n listingGroup,\r\n }\r\n ), [i18n, listingGroup, productFilter]);\r\n\r\n return (\r\n \r\n
{listingGroupDetails}
\r\n
\r\n );\r\n};\r\n\r\nListingGroup.propTypes = {\r\n data: PropTypes.shape({\r\n listingGroup: PropTypes.shape({}),\r\n productFilter: PropTypes.shape({}),\r\n }).isRequired,\r\n};\r\n","import React, { useCallback, useEffect, useMemo, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\n\r\nimport { Button, Dropdown, Icon, Label, Stack, TextField } from '@bingads-webui-react/fabric-control';\r\nimport { HelpPopupInline } from '@bingads-webui-react/help-popup';\r\nimport { withCustomValidation, withError } from '@bingads-webui-react/validation';\r\nimport { withControlErrorHandling, withUnvalidatedControlErrors } from '@bingads-webui-campaign-react/error-handling';\r\n\r\nconst defaultLabelStyle = options => ({\r\n label: {\r\n color: options.success ? '#0A610A' : '#A80000',\r\n backgroundColor: options.success ? '#DFF6DD' : '#FDE7E9',\r\n fontWeight: 600,\r\n fontSize: 12,\r\n border: 4,\r\n paddingInline: 5,\r\n paddingTop: 2,\r\n paddingBottom: 2,\r\n verticalAlign: 'middle',\r\n borderRadius: 4,\r\n marginLeft: 8,\r\n },\r\n labelIcon: {\r\n fontSize: 14,\r\n height: 14,\r\n width: 14,\r\n fontWeight: 400,\r\n marginLeft: 4,\r\n marginRight: 5,\r\n verticalAlign: '-2.5px',\r\n },\r\n});\r\n\r\nconst defaultStyles = {\r\n disconnectedStatusTile: {\r\n root: {\r\n marginLeft: 22,\r\n },\r\n },\r\n connectedStatusTile: {\r\n root: {\r\n marginLeft: 22,\r\n },\r\n },\r\n connectedStatusLabel: {\r\n root: {\r\n color: '#0C5E0C',\r\n fontWeight: 600,\r\n fontSize: 12,\r\n lineHeight: 'normal',\r\n },\r\n },\r\n saveButton: {\r\n root: {\r\n width: 68,\r\n },\r\n },\r\n removeButton: {\r\n root: {\r\n width: 89,\r\n },\r\n },\r\n};\r\n\r\nconst VerifiedTrackingSettingKey = 'VerifiedTrackingSettings';\r\nconst vendorNameKey = 'vendorName';\r\nconst advertiserEntityIdKey = 'advertiserEntityId';\r\nconst publisherEntityIdKey = 'publisherEntityId';\r\nconst regexMappping = {\r\n video: [/v2\\/(\\d*)\\/(\\d*)/],\r\n display: [/rjss\\/st\\/(\\d*)\\/(\\d*)/, /rfw\\/st\\/(\\d*)\\/(\\d*)/],\r\n native: [/rjss\\/st\\/(\\d*)\\/(\\d*)/, /rfw\\/st\\/(\\d*)\\/(\\d*)/],\r\n};\r\n\r\nconst ThirdPartyMeasurementNameMap = {\r\n [advertiserEntityIdKey]: _TL_('Advertiser ID: '),\r\n [publisherEntityIdKey]: _TL_('Publisher ID: '),\r\n [vendorNameKey]: _TL_('Vendor Name: '),\r\n};\r\n\r\nexport const formatThirdPartyMeasurementSetting = (verifiedTrackingSettings, i18n) => {\r\n const verifiedTrackingSetting = _.first(verifiedTrackingSettings);\r\n const vendorName = _.get(verifiedTrackingSetting, vendorNameKey, '');\r\n const advertiserEntityId = _.get(verifiedTrackingSetting, advertiserEntityIdKey, '');\r\n const publisherEntityId = _.get(verifiedTrackingSetting, publisherEntityIdKey, '');\r\n\r\n const settingEmpty = _.isEmpty(vendorName) || _.isEmpty(advertiserEntityId) || _.isEmpty(publisherEntityId);\r\n\r\n const getVerifiedTrackingComponent = (key, value) =>\r\n (
{i18n.getString(ThirdPartyMeasurementNameMap[key]) + value}
);\r\n\r\n return (\r\n
\r\n {\r\n settingEmpty ?\r\n i18n.getString(_TL_('None')) :\r\n (\r\n
\r\n {getVerifiedTrackingComponent(vendorNameKey, vendorName)}\r\n {getVerifiedTrackingComponent(publisherEntityIdKey, publisherEntityId)}\r\n {getVerifiedTrackingComponent(advertiserEntityIdKey, advertiserEntityId)}\r\n
\r\n )\r\n }\r\n
\r\n );\r\n};\r\n\r\nexport const extractIdsFromIASInput = ({ value, adType }) => {\r\n const regexStrArr = regexMappping[adType];\r\n let result = [];\r\n _.each(regexStrArr, (regexStr) => {\r\n const regex = new RegExp(regexStr);\r\n const currentRes = regex.exec(value);\r\n if (currentRes && currentRes.length >= 3) {\r\n result = currentRes;\r\n }\r\n });\r\n\r\n if (result.length >= 3) {\r\n return [result[1], result[2]];\r\n }\r\n\r\n return [];\r\n};\r\n\r\nconst errorMessages = {\r\n advertiserEntityId: 'advertiserEntityId',\r\n publisherEntityId: 'publisherEntityId',\r\n};\r\n\r\nconst createVerifiedTrackingSettingViewModel = value => ({\r\n [VerifiedTrackingSettingKey]: _.isEmpty(value) ? [] : [value],\r\n});\r\n\r\nconst StatusLabel = ({\r\n value, i18n, success, type,\r\n}) => {\r\n let statusMessage = i18n.getString(_TL_('Unknown status'));\r\n if (type === advertiserEntityIdKey) {\r\n statusMessage = success ? i18n.getString(_TL_('IAS Advertiser ID: {0}')).replace('{0}', value) : i18n.getString(_TL_('IAS Advertiser ID'));\r\n } else if (type === publisherEntityIdKey) {\r\n statusMessage = success ? i18n.getString(_TL_('IAS Publisher ID: {0}')).replace('{0}', value) : i18n.getString(_TL_('IAS Publisher ID'));\r\n }\r\n\r\n const statusStyle = useMemo(() => defaultLabelStyle({ success }), [success]);\r\n\r\n return (\r\n \r\n \r\n {statusMessage}\r\n \r\n );\r\n};\r\n\r\nexport const ThirdPartyMeasurement = (props) => {\r\n const {\r\n i18n,\r\n updateValidation,\r\n validationProps,\r\n adType = 'video',\r\n overrideStyles = {},\r\n } = props;\r\n\r\n const { data } = validationProps;\r\n const verifiedTrackingData = useMemo(\r\n () => _.result(data, [VerifiedTrackingSettingKey, 0], {})\r\n , [data]\r\n );\r\n const styles = useMemo(() => ({\r\n ...defaultStyles,\r\n ...overrideStyles,\r\n }), [overrideStyles]);\r\n\r\n const [connected, setConnected] = useState(false);\r\n const [verifiedTrackingSettingRaw, setVerifiedTrackingSettingRaw] = useState('');\r\n const [tagUrlErrors, setTagErrors] = useState([]);\r\n\r\n const options = useMemo(() => [\r\n { key: 'IAS', text: i18n.getString(_TL_('Integral Ad Science (IAS)')) },\r\n ], [i18n]);\r\n\r\n useEffect(() => {\r\n if (\r\n !!verifiedTrackingData &&\r\n !!verifiedTrackingData[vendorNameKey] &&\r\n !!verifiedTrackingData[advertiserEntityIdKey] &&\r\n !!verifiedTrackingData[publisherEntityIdKey]) {\r\n setConnected(true);\r\n } else {\r\n setConnected(false);\r\n }\r\n }, [verifiedTrackingData]);\r\n\r\n const validateUrl = useCallback((value) => {\r\n const ids = extractIdsFromIASInput({ value, adType });\r\n let result = true;\r\n const verifiedTrackingSettingToAdd = {};\r\n if (ids.length === 2) {\r\n const advertiserEntityId = ids[0];\r\n const publisherEntityId = ids[1];\r\n const errors = [];\r\n if (_.isEmpty(advertiserEntityId)) {\r\n errors.push(errorMessages.advertiserEntityId);\r\n result = false;\r\n } else {\r\n verifiedTrackingSettingToAdd[advertiserEntityIdKey] = advertiserEntityId;\r\n }\r\n\r\n if (_.isEmpty(publisherEntityId)) {\r\n errors.push(errorMessages.publisherEntityId);\r\n result = false;\r\n } else {\r\n verifiedTrackingSettingToAdd[publisherEntityIdKey] = publisherEntityId;\r\n }\r\n\r\n setTagErrors(errors);\r\n } else {\r\n setTagErrors([errorMessages.advertiserEntityId, errorMessages.publisherEntityId]);\r\n result = false;\r\n }\r\n\r\n return { result, verifiedTrackingSettingToAdd };\r\n }, [adType]);\r\n\r\n const save = useCallback(() => {\r\n const { result, verifiedTrackingSettingToAdd } = validateUrl(verifiedTrackingSettingRaw);\r\n if (result\r\n && verifiedTrackingSettingToAdd[advertiserEntityIdKey]\r\n && verifiedTrackingSettingToAdd[publisherEntityIdKey]) {\r\n const value = {\r\n [vendorNameKey]: options[0].key,\r\n [advertiserEntityIdKey]: verifiedTrackingSettingToAdd[advertiserEntityIdKey],\r\n [publisherEntityIdKey]: verifiedTrackingSettingToAdd[publisherEntityIdKey],\r\n };\r\n // We will just pass the value to the Validate Group.\r\n updateValidation([], createVerifiedTrackingSettingViewModel(value));\r\n }\r\n }, [\r\n options,\r\n validateUrl,\r\n verifiedTrackingSettingRaw,\r\n updateValidation,\r\n ]);\r\n\r\n const remove = () => {\r\n updateValidation([], createVerifiedTrackingSettingViewModel());\r\n };\r\n\r\n const onRenderLabelDropDown = () => (\r\n \r\n \r\n \r\n \r\n );\r\n\r\n const onRenderLabelTextField = () => (\r\n \r\n \r\n \r\n \r\n );\r\n\r\n const onTagUrlChange = useCallback((event, value) => {\r\n // remove the error message when the user is typing.\r\n setTagErrors([]);\r\n setVerifiedTrackingSettingRaw(value);\r\n }, []);\r\n\r\n const tagErrorMessage = useMemo(() => {\r\n if (!_.isEmpty(tagUrlErrors)) {\r\n return (\r\n \r\n {i18n.getString(_TL_('Cannot detect:'))}\r\n {\r\n _.map(tagUrlErrors, error => (\r\n \r\n ))\r\n }\r\n \r\n );\r\n }\r\n return '';\r\n }, [tagUrlErrors, i18n]);\r\n\r\n return (\r\n
\r\n {(\r\n !connected ?\r\n (\r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nThirdPartyMeasurement.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n validationProps: PropTypes.shape({\r\n data: PropTypes.shape({\r\n VerifiedTrackingSettings: PropTypes.arrayOf(PropTypes.shape({})),\r\n }),\r\n }).isRequired,\r\n adType: PropTypes.string,\r\n overrideStyles: PropTypes.shape({}),\r\n};\r\n\r\nThirdPartyMeasurement.defaultProps = {\r\n adType: 'video',\r\n overrideStyles: {},\r\n};\r\n\r\nStatusLabel.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n type: PropTypes.string.isRequired,\r\n success: PropTypes.bool.isRequired,\r\n value: PropTypes.string,\r\n};\r\n\r\nStatusLabel.defaultProps = {\r\n value: '',\r\n};\r\n\r\nexport const ThirdPartyMeasurementWithValidation = withControlErrorHandling(withUnvalidatedControlErrors(withError(withCustomValidation(ThirdPartyMeasurement))));\r\n","import React, { useCallback, useEffect, useMemo, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\n\r\nimport { Icon, Label, Stack, TextField, Checkbox } from '@bingads-webui-react/fabric-control';\r\nimport { HelpPopupInline } from '@bingads-webui-react/help-popup';\r\nimport { withCustomValidation, withError } from '@bingads-webui-react/validation';\r\nimport { withControlErrorHandling, withUnvalidatedControlErrors } from '@bingads-webui-campaign-react/error-handling';\r\n\r\nconst defaultLabelStyle = options => ({\r\n label: {\r\n color: options.success ? '#0A610A' : '#A80000',\r\n backgroundColor: options.success ? '#DFF6DD' : '#FDE7E9',\r\n fontWeight: 600,\r\n fontSize: 12,\r\n border: 4,\r\n paddingInline: 5,\r\n paddingTop: 2,\r\n paddingBottom: 2,\r\n verticalAlign: 'middle',\r\n borderRadius: 4,\r\n marginLeft: 8,\r\n },\r\n labelIcon: {\r\n fontSize: 14,\r\n height: 14,\r\n width: 14,\r\n fontWeight: 400,\r\n marginLeft: 4,\r\n marginRight: 5,\r\n verticalAlign: '-2.5px',\r\n },\r\n});\r\n\r\nconst defaultStyles = {\r\n disconnectedStatusTile: {\r\n root: {\r\n },\r\n },\r\n connectedStatusTile: {\r\n root: {\r\n marginLeft: 22,\r\n },\r\n },\r\n connectedStatusLabel: {\r\n root: {\r\n color: '#0C5E0C',\r\n fontWeight: 600,\r\n fontSize: 12,\r\n lineHeight: 'normal',\r\n },\r\n },\r\n saveButton: {\r\n root: {\r\n width: 68,\r\n },\r\n },\r\n removeButton: {\r\n root: {\r\n width: 89,\r\n },\r\n },\r\n};\r\n\r\nconst VerifiedTrackingSettingKey = 'VerifiedTrackingSettings';\r\nconst vendorNameKey = 'vendorName';\r\nconst advertiserEntityIdKey = 'advertiserEntityId';\r\nconst publisherEntityIdKey = 'publisherEntityId';\r\n\r\nconst StatusLabel = ({\r\n value, i18n, success, type,\r\n}) => {\r\n let statusMessage = i18n.getString(_TL_('Unknown status'));\r\n if (type === advertiserEntityIdKey) {\r\n statusMessage = success ? i18n.getString(_TL_('IAS Advertiser ID: {0}')).replace('{0}', value) : i18n.getString(_TL_('Invalid Advertiser ID'));\r\n } else if (type === publisherEntityIdKey) {\r\n statusMessage = success ? i18n.getString(_TL_('IAS Publisher ID: {0}')).replace('{0}', value) : i18n.getString(_TL_('Invalid Publisher ID'));\r\n }\r\n\r\n const statusStyle = useMemo(() => defaultLabelStyle({ success }), [success]);\r\n\r\n return (\r\n \r\n \r\n {statusMessage}\r\n \r\n );\r\n};\r\n\r\nconst createVerifiedTrackingSettingViewModel = value => ({\r\n [VerifiedTrackingSettingKey]: value,\r\n});\r\n\r\nconst getCheckStatus = (settings, vendor) => {\r\n if (_.isEmpty(settings) || !settings[vendor]) {\r\n return false;\r\n }\r\n\r\n return settings[vendor].enabled;\r\n};\r\n\r\nexport const ThirdPartyMeasurementV2 = (props) => {\r\n const {\r\n i18n,\r\n updateValidation,\r\n validationProps,\r\n overrideStyles = {},\r\n } = props;\r\n\r\n const { data } = validationProps;\r\n const [settings, setSettings] = useState({});\r\n const [errors, setErrors] = useState({});\r\n\r\n const verifiedTrackingDatas = useMemo(\r\n () => _.result(data, [VerifiedTrackingSettingKey], [])\r\n , [data]\r\n );\r\n const styles = useMemo(() => ({\r\n ...defaultStyles,\r\n ...overrideStyles,\r\n }), [overrideStyles]);\r\n\r\n useEffect(() => {\r\n const settingsToUpdate = {};\r\n if (verifiedTrackingDatas.length > 0) {\r\n const iasData = verifiedTrackingDatas.find(setting =>\r\n setting.vendorName === 'IAS');\r\n const moatData = verifiedTrackingDatas.find(setting =>\r\n setting.vendorName === 'MOAT');\r\n\r\n if (!_.isEmpty(iasData)) {\r\n settingsToUpdate.IAS = {\r\n enabled: true,\r\n ...iasData,\r\n };\r\n } else {\r\n settingsToUpdate.IAS = {\r\n enabled: false,\r\n };\r\n }\r\n\r\n if (!_.isEmpty(moatData)) {\r\n settingsToUpdate.MOAT = {\r\n enabled: true,\r\n ...moatData,\r\n };\r\n } else {\r\n settingsToUpdate.MOAT = {\r\n enabled: false,\r\n };\r\n }\r\n\r\n setSettings(settingsToUpdate);\r\n } else {\r\n settingsToUpdate.IAS = { enabled: false };\r\n settingsToUpdate.MOAT = { enabled: false };\r\n setSettings(settingsToUpdate);\r\n }\r\n }, [verifiedTrackingDatas]);\r\n\r\n useEffect(() => {\r\n if (_.isEmpty(settings)) {\r\n return;\r\n }\r\n // Validate IAS\r\n let iasSettingsToUpdate = { [vendorNameKey]: 'IAS' };\r\n const iasEnabled = _.get(settings, ['IAS', 'enabled'], false);\r\n if (iasEnabled) {\r\n const advertiserEntityId = _.get(settings, ['IAS', advertiserEntityIdKey], '');\r\n const publisherEntityId = _.get(settings, ['IAS', publisherEntityIdKey], '');\r\n const numericPattern = /^\\d+$/;\r\n const errorsToUpdate = {};\r\n if (!numericPattern.test(advertiserEntityId)) {\r\n errorsToUpdate[advertiserEntityIdKey] = advertiserEntityIdKey;\r\n }\r\n\r\n if (!numericPattern.test(publisherEntityId)) {\r\n errorsToUpdate[publisherEntityIdKey] = publisherEntityIdKey;\r\n }\r\n if (!_.isEmpty(errorsToUpdate)) {\r\n setErrors(errorsToUpdate);\r\n } else {\r\n setErrors({});\r\n }\r\n iasSettingsToUpdate = {\r\n ...iasSettingsToUpdate,\r\n enabled: true,\r\n advertiserEntityId,\r\n publisherEntityId,\r\n };\r\n } else {\r\n iasSettingsToUpdate.enabled = false;\r\n }\r\n\r\n // validate MOAT\r\n const moatSettingsToUpdate = {\r\n enabled: _.get(settings, ['MOAT', 'enabled'], false),\r\n [vendorNameKey]: 'MOAT',\r\n };\r\n\r\n // update validation\r\n updateValidation([], createVerifiedTrackingSettingViewModel([iasSettingsToUpdate, moatSettingsToUpdate]));\r\n }, [settings, updateValidation]);\r\n\r\n const onRenderadvertiserIdTextField = useCallback(() => (\r\n \r\n \r\n \r\n \r\n ), [i18n]);\r\n\r\n const onRenderpublisherIdTextField = useCallback(() => (\r\n \r\n \r\n \r\n \r\n ), [i18n]);\r\n\r\n const onAdvertiserIdChange = useCallback((event, value) => {\r\n if (!_.isEmpty(settings.IAS) && !!settings.IAS.enabled) {\r\n setSettings({\r\n ...settings,\r\n IAS: {\r\n ...settings.IAS,\r\n advertiserEntityId: value,\r\n },\r\n });\r\n }\r\n }, [settings]);\r\n\r\n const onPublisherIdChange = useCallback((event, value) => {\r\n if (!_.isEmpty(settings.IAS) && !!settings.IAS.enabled) {\r\n setSettings({\r\n ...settings,\r\n IAS: {\r\n ...settings.IAS,\r\n publisherEntityId: value,\r\n },\r\n });\r\n }\r\n }, [settings]);\r\n\r\n const onCheckStatusChangeGenerator = useCallback(vendor => (event, checked) => {\r\n setSettings((originalSettings) => {\r\n const newSettings = { ...originalSettings };\r\n if (_.isEmpty(newSettings[vendor])) {\r\n newSettings[vendor] = {\r\n enabled: checked,\r\n };\r\n } else {\r\n newSettings[vendor].enabled = checked;\r\n }\r\n return newSettings;\r\n });\r\n }, []);\r\n\r\n const tagErrorMessage = useCallback((errorType) => {\r\n if (!_.isEmpty(errors) && !!errors[errorType]) {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n return '';\r\n }, [errors, i18n]);\r\n\r\n const onRenderIASLabel = useCallback(() => (\r\n \r\n ), [i18n]);\r\n\r\n const onRenderMOATLabel = useCallback(() => (\r\n \r\n ), [i18n]);\r\n\r\n const onRenderIASCheckbox = useCallback(() => (\r\n \r\n \r\n \r\n \r\n \r\n ), [styles.disconnectedStatusTile.root, onCheckStatusChangeGenerator, onRenderIASLabel, settings, onRenderadvertiserIdTextField, onAdvertiserIdChange, tagErrorMessage, onRenderpublisherIdTextField, onPublisherIdChange]);\r\n\r\n return (\r\n
\r\n \r\n {onRenderIASCheckbox()}\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nThirdPartyMeasurementV2.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n validationProps: PropTypes.shape({\r\n data: PropTypes.shape({\r\n VerifiedTrackingSettings: PropTypes.arrayOf(PropTypes.shape({})),\r\n }),\r\n }).isRequired,\r\n overrideStyles: PropTypes.shape({}),\r\n};\r\n\r\nThirdPartyMeasurementV2.defaultProps = {\r\n overrideStyles: {},\r\n};\r\n\r\nStatusLabel.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n type: PropTypes.string.isRequired,\r\n success: PropTypes.bool.isRequired,\r\n value: PropTypes.string,\r\n};\r\n\r\nStatusLabel.defaultProps = {\r\n value: '',\r\n};\r\n\r\nexport const ThirdPartyMeasurementV2WithValidation = withControlErrorHandling(withUnvalidatedControlErrors(withError(withCustomValidation(ThirdPartyMeasurementV2))));\r\n","import React, { useMemo, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\n\r\nimport { CommandButton, Stack } from '@bingads-webui-react/fabric-control';\r\nimport { HelpPopupInline } from '@bingads-webui-react/help-popup';\r\nimport { withCustomValidation, withError } from '@bingads-webui-react/validation';\r\nimport { withControlErrorHandling, withUnvalidatedControlErrors } from '@bingads-webui-campaign-react/error-handling';\r\nimport { ThirdPartyMeasurement, formatThirdPartyMeasurementSetting } from './third-party-measurement';\r\nimport { ThirdPartyMeasurementV2 } from './third-party-measurement-V2';\r\n\r\n\r\nconst defaultStyles = {\r\n thirdPartyMeasurementFolderButton: {\r\n label: { color: '#0078D4', fontWeight: 600 },\r\n icon: { fontSize: 14, fontWeight: 400 },\r\n root: { verticalAlign: 'middle' },\r\n },\r\n};\r\n\r\nexport const ThirdPartyMeasurementCardContainer = (props) => {\r\n const {\r\n i18n,\r\n updateValidation,\r\n validationProps,\r\n adType = 'video',\r\n overrideStyles = {},\r\n showSimpleMessage,\r\n isForDeal,\r\n dealLoaded,\r\n isMOATEnabled,\r\n } = props;\r\n\r\n const initialFolded = !_.isEmpty(_.get(validationProps, ['data', 'VerifiedTrackingSettings'], {}));\r\n const [folded, setFolded] = useState(initialFolded);\r\n\r\n const foldedIconProps = useMemo(() => {\r\n const iconName = folded ? 'ChevronDown' : 'ChevronRight';\r\n return { iconName };\r\n }, [folded]);\r\n\r\n const styles = useMemo(() => ({\r\n ...defaultStyles,\r\n ...overrideStyles,\r\n }), [overrideStyles]);\r\n\r\n if (!dealLoaded || isForDeal) return null;\r\n\r\n const ThirdPartyMeasurementComponent = isMOATEnabled ? ThirdPartyMeasurementV2: ThirdPartyMeasurement;\r\n\r\n return (\r\n
\r\n \r\n setFolded(!folded)}\r\n iconProps={foldedIconProps}\r\n styles={\r\n styles.thirdPartyMeasurementFolderButton\r\n }\r\n />\r\n \r\n \r\n {folded ? (\r\n \r\n ) : (showSimpleMessage && formatThirdPartyMeasurementSetting(validationProps.data.VerifiedTrackingSettings, i18n))}\r\n
\r\n );\r\n};\r\n\r\nThirdPartyMeasurementCardContainer.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n validationProps: PropTypes.shape({\r\n data: PropTypes.shape({\r\n VerifiedTrackingSettings: PropTypes.arrayOf(PropTypes.shape({})),\r\n }),\r\n }).isRequired,\r\n adType: PropTypes.string,\r\n showSimpleMessage: PropTypes.bool,\r\n overrideStyles: PropTypes.shape({}),\r\n isForDeal: PropTypes.bool,\r\n dealLoaded: PropTypes.bool,\r\n isMOATEnabled: PropTypes.bool,\r\n};\r\n\r\nThirdPartyMeasurementCardContainer.defaultProps = {\r\n adType: 'video',\r\n showSimpleMessage: false,\r\n overrideStyles: {},\r\n isForDeal: false,\r\n dealLoaded: true,\r\n isMOATEnabled: false,\r\n};\r\n\r\nexport const ThirdPartyMeasurementContainerWithValidation = withControlErrorHandling(withUnvalidatedControlErrors(withError(withCustomValidation(ThirdPartyMeasurementCardContainer))));\r\n","import { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport Backbone from 'backbone';\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\n\r\nimport { ThirdPartyMeasurementCardContainer } from './third-party-measurement-container';\r\n\r\n\r\nconst overrideStyles = {\r\n thirdPartyMeasurementFolderButton: {\r\n label: { color: '#0078D4', fontWeight: 600 },\r\n icon: {\r\n fontSize: 14, fontWeight: 600, marginLeft: 0, marginRight: 4,\r\n },\r\n root: { verticalAlign: 'middle' },\r\n },\r\n disconnectedStatusTile: {\r\n root: {\r\n marginLeft: 0,\r\n },\r\n },\r\n connectedStatusTile: {\r\n root: {\r\n marginLeft: 0,\r\n },\r\n },\r\n};\r\n\r\nexport class ThirdPartyMeasurementBackboneView extends Backbone.View {\r\n initialize({\r\n i18n,\r\n initialThirdPartyMeasurement,\r\n isMOATEnabled = false,\r\n }) {\r\n this.i18n = i18n;\r\n this.validationProps = {\r\n data: {\r\n VerifiedTrackingSettings: initialThirdPartyMeasurement,\r\n },\r\n };\r\n this.isMOATEnabled = isMOATEnabled;\r\n this.saveVerifiedTrackingSetting = this.saveVerifiedTrackingSetting.bind(this);\r\n return this;\r\n }\r\n\r\n // We need to make this func fit for ThirdPartyMeasurementCardContainer\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n saveVerifiedTrackingSetting(dummyErrorArr = [], VerifiedTrackingObj) {\r\n const verifiedTrackingSettings = VerifiedTrackingObj.VerifiedTrackingSettings;\r\n\r\n this.trigger('InputChange', verifiedTrackingSettings);\r\n }\r\n\r\n renderWithInput(verifiedTrackingObj) {\r\n this.validationProps = {\r\n data: {\r\n VerifiedTrackingSettings: verifiedTrackingObj,\r\n },\r\n };\r\n this.render();\r\n }\r\n\r\n render() {\r\n ReactDOM.render(\r\n \r\n \r\n \r\n , this.el\r\n );\r\n return this;\r\n }\r\n}\r\n\r\n","import _ from 'underscore';\r\n\r\nexport const campaignThirdPartyVendors = {\r\n ISPOT: 'ISPOT',\r\n DV: 'DV',\r\n};\r\n\r\nexport const reachVendors = [\r\n campaignThirdPartyVendors.ISPOT,\r\n];\r\n\r\nexport const verificationVendors = [\r\n campaignThirdPartyVendors.DV,\r\n];\r\n\r\nexport const campaignThirdPartyVendorNames = {\r\n ISPOT: _TL_('iSPOT'),\r\n DV: _TL_('DoubleVerify'),\r\n};\r\n\r\nexport const thirdPartyMeasurementTrackingVendorHeader = {\r\n ISPOT: _TL_('Reach vendor'),\r\n DV: _TL_('Verification vendor'),\r\n};\r\n\r\nexport const thirdPartyVendorHeaderPopupTopic = {\r\n ISPOT: 'pop_BA_Measurement_Reach',\r\n DV: 'pop_BA_Measurement_Verification',\r\n};\r\n\r\nexport const thirdPartyMeasurementTrackingVendorField = {\r\n ISPOT_brandId: 'brandId',\r\n ThirdPartyMeasurement_setting: 'setting',\r\n};\r\n\r\nconst thirdPartySettingError = {\r\n ISPOT_brandId_shouldNotBeEmpty: _TL_('iSpot Brand ID is required'),\r\n ISPOT_brandId_shouldBeNumeric: _TL_('iSpot Brand ID should be numeric'),\r\n ISPOT_brandId_brandIdTooLong: _TL_('iSpot Brand ID should be no more than 7 characters'),\r\n DV_linkNotEstablished: _TL_('DoubleVerify link not established'),\r\n};\r\n\r\nexport const vendorNameKey = 'vendorName';\r\nexport const settingEnabledKey = 'enabled';\r\nconst numericPattern = /^\\d+$/;\r\nconst maxBrandIdLength = 7;\r\nexport const VerifiedTrackingSettingKey = 'VerifiedTrackingSettings';\r\n\r\nconst ispotValidator = ({ setting, i18n }) => {\r\n const errors = [];\r\n const brandId = _.get(setting, [thirdPartyMeasurementTrackingVendorField.ISPOT_brandId]);\r\n if (_.isEmpty(brandId)) {\r\n errors.push(i18n.getString(thirdPartySettingError.ISPOT_brandId_shouldNotBeEmpty));\r\n return errors;\r\n }\r\n\r\n if (numericPattern.test(brandId) === false) {\r\n errors.push(i18n.getString(thirdPartySettingError.ISPOT_brandId_shouldBeNumeric));\r\n return errors;\r\n }\r\n\r\n if (brandId.length > maxBrandIdLength) {\r\n errors.push(i18n.getString(thirdPartySettingError.ISPOT_brandId_brandIdTooLong));\r\n }\r\n return errors;\r\n};\r\n\r\nconst dvValidator = ({ setting, i18n, doubleVerifyLinkEstablished }) => {\r\n const errors = [];\r\n\r\n if (setting.enabled && !doubleVerifyLinkEstablished) {\r\n errors.push(i18n.getString(thirdPartySettingError.DV_linkNotEstablished));\r\n return errors;\r\n }\r\n\r\n return errors;\r\n};\r\n\r\nexport const isVendorSelectedInSetting = (settings, vendorName) => {\r\n const foundSetting = _.find(settings, setting => setting[vendorNameKey] === vendorName);\r\n if (foundSetting) {\r\n return _.get(foundSetting, settingEnabledKey, false);\r\n }\r\n return false;\r\n};\r\n\r\nexport const thirdPartySettingValidatorMap = {\r\n ISPOT: ispotValidator,\r\n DV: dvValidator,\r\n};\r\n\r\nexport const createVerifiedTrackingSettingViewModel = value => ({\r\n [VerifiedTrackingSettingKey]: value,\r\n});\r\n\r\n","export const thridPartyMeasurementTrackingStyles = {\r\n thirdPartyMeasurementGuide: {\r\n root: {\r\n ' .ms-Label': {\r\n fontSize: 14,\r\n fontWeight: 400,\r\n },\r\n lineHeight: 20,\r\n },\r\n },\r\n\r\n thirdPartyMeasurementRemoveAllStack: {\r\n root: {\r\n height: 0,\r\n },\r\n },\r\n\r\n thirdPartyMeasurementRemoveAllButton: {\r\n label: { color: '#424242', fontWeight: 600 },\r\n root: {\r\n marginTop: 16,\r\n height: 31,\r\n // Fix the focus wrapping un-complete issue in desert mode\r\n '@media screen and (-ms-high-contrast: active), screen and (forced-colors: active)': {\r\n '&:focus::after': {\r\n inset: '0px !important',\r\n },\r\n },\r\n },\r\n },\r\n\r\n thirdPartyMeasurementAddButton: {\r\n label: { color: '#0078D4', fontWeight: 600 },\r\n icon: { fontSize: 14, fontWeight: 400 },\r\n root: {\r\n verticalAlign: 'middle',\r\n // Fix the focus wrapping un-complete issue in desert mode\r\n '@media screen and (-ms-high-contrast: active), screen and (forced-colors: active)': {\r\n '&:focus::after': {\r\n inset: '0px !important',\r\n },\r\n },\r\n },\r\n dropdown: {\r\n root: {\r\n width: 312,\r\n ' .ms-ContextualMenu-header': {\r\n paddingLeft: 8,\r\n fontSize: 12,\r\n fontWeight: 600,\r\n color: '#616161',\r\n },\r\n ' .ms-ContextualMenu-link': {\r\n paddingLeft: 28,\r\n fontSize: 14,\r\n fontWeight: 400,\r\n lineHeight: 20,\r\n },\r\n },\r\n },\r\n },\r\n\r\n thirdPartyMeasurementVendorSettings: {\r\n root: {\r\n justifyContent: 'space-between',\r\n alignItems: 'center',\r\n ' .vendor-settings': {\r\n ' .third-party-measurement-vendor': {\r\n marginLeft: 10,\r\n marginRight: 10,\r\n paddingTop: 31,\r\n ' .ms-TextField-field': {\r\n width: 215,\r\n height: 32,\r\n },\r\n ' label': {\r\n fontWeight: 400,\r\n },\r\n },\r\n\r\n ' .ispot-brand-id': {\r\n marginLeft: 10,\r\n marginRight: 10,\r\n ' .ms-TextField-field': {\r\n width: 215,\r\n height: 32,\r\n },\r\n ' label': {\r\n fontWeight: 400,\r\n },\r\n },\r\n ' .account-linked-status': {\r\n paddingTop: 30,\r\n },\r\n },\r\n ' .third-party-measurement-remove-button': {\r\n paddingTop: 30,\r\n },\r\n },\r\n },\r\n\r\n thirdPartyMeasurementRemoveButton: {\r\n icon: { fontSize: 14, fontWeight: 400, color: '#424242' },\r\n root: { verticalAlign: 'middle', marginRight: 27 },\r\n },\r\n\r\n warningMessageContainer: {\r\n root: {\r\n marginTop: 16,\r\n padding: 8,\r\n },\r\n },\r\n\r\n warningMessage: {\r\n backgroundColor: '#F5F5F5',\r\n border: '1px solid',\r\n paddingInline: 12,\r\n verticalAlign: 'middle',\r\n borderRadius: 4,\r\n borderColor: '#D1D1D1',\r\n gap: 8,\r\n height: 36,\r\n icon: {\r\n color: '#616161',\r\n fontSize: 20,\r\n height: 20,\r\n width: 20,\r\n fontWeight: 400,\r\n marginTop: 2,\r\n },\r\n },\r\n\r\n warningMessageText: {\r\n root: {\r\n fontWeight: 400,\r\n },\r\n },\r\n\r\n label: options => ({\r\n color: options.linked ? '#115EA3' : '#8A3707',\r\n backgroundColor: options.linked ? '#EBF3FC' : '#FDCFB4',\r\n borderColor: options.linked ? '#B4D6FA' : '#FFF9F5',\r\n fontWeight: 600,\r\n fontSize: 12,\r\n border: '1px solid',\r\n verticalAlign: 'middle',\r\n borderRadius: 99,\r\n height: 20,\r\n minWidth: 24,\r\n paddingInline: 5,\r\n paddingTop: 1,\r\n paddingBottom: 3,\r\n marginLeft: 8,\r\n marginRight: 8,\r\n }),\r\n};\r\n","import React, { useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { Stack, Label, Icon } from '@bingads-webui-react/fabric-control';\r\nimport { thridPartyMeasurementTrackingStyles } from '../../styles/third-party-measurement-setting-styles';\r\n\r\nconst warningMessageDefaultSettings = {\r\n iconName: 'InfoSolid',\r\n tagName: _TL_('Note'),\r\n};\r\n\r\nexport const WarningMessage = (props) => {\r\n const {\r\n i18n,\r\n message,\r\n customSettings,\r\n overrideStyles,\r\n } = props;\r\n\r\n const styles = useMemo(() => ({\r\n ...thridPartyMeasurementTrackingStyles,\r\n ...overrideStyles,\r\n }), [overrideStyles]);\r\n\r\n const settings = {\r\n ...warningMessageDefaultSettings,\r\n ...customSettings,\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nWarningMessage.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n message: PropTypes.string.isRequired,\r\n customSettings: PropTypes.shape({}),\r\n overrideStyles: PropTypes.shape({}),\r\n};\r\n\r\nWarningMessage.defaultProps = {\r\n customSettings: {},\r\n overrideStyles: {},\r\n};\r\n\r\n","import React, { useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { Label } from '@bingads-webui-react/fabric-control';\r\nimport { thridPartyMeasurementTrackingStyles } from '../../styles/third-party-measurement-setting-styles';\r\n\r\nexport const AccountLinkedStatusLabel = ({ doubleVerifyLinkEstablished, i18n, overrideStyle }) => {\r\n let statusMessage = i18n.getString(_TL_('Unknown status'));\r\n if (!doubleVerifyLinkEstablished) {\r\n statusMessage = i18n.getString(_TL_('Not activated'));\r\n } else {\r\n statusMessage = i18n.getString(_TL_('Activated'));\r\n }\r\n const style = useMemo(() => ({\r\n ...thridPartyMeasurementTrackingStyles.label({ linked: doubleVerifyLinkEstablished }),\r\n ...overrideStyle,\r\n }), [overrideStyle, doubleVerifyLinkEstablished]);\r\n\r\n return (\r\n \r\n {statusMessage}\r\n \r\n );\r\n};\r\n\r\nAccountLinkedStatusLabel.propTypes = {\r\n doubleVerifyLinkEstablished: PropTypes.bool.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n overrideStyle: PropTypes.shape({}),\r\n};\r\n\r\nAccountLinkedStatusLabel.defaultProps = {\r\n overrideStyle: {},\r\n};\r\n\r\n","import React from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { TextField, Stack, Label } from '@bingads-webui-react/fabric-control';\r\nimport { HelpPopupInline } from '@bingads-webui-react/help-popup';\r\nimport {\r\n thirdPartyMeasurementTrackingVendorField,\r\n} from '../../model/campaign-third-party-vendor-setting';\r\nimport { AccountLinkedStatusLabel } from './account-linked-status-label';\r\n\r\nconst ISPOTConfig = ({ setting, i18n, setSetting }) => {\r\n const onChangeBrandId = (e, value) => {\r\n const updatedSetting = {\r\n ..._.omit(setting, 'indexInSettings'),\r\n [thirdPartyMeasurementTrackingVendorField.ISPOT_brandId]: value,\r\n };\r\n setSetting(updatedSetting);\r\n };\r\n\r\n const onRenderLabel = () => (\r\n \r\n \r\n \r\n \r\n );\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nconst DVConfig = ({ i18n, doubleVerifyLinkEstablished }) => (\r\n \r\n \r\n { doubleVerifyLinkEstablished ?\r\n i18n.getString(_TL_('This measurement provider is activated for your account.'))\r\n : i18n.getString(_TL_('This measurement provider isn’t activated for your account.'))\r\n }\r\n \r\n);\r\n\r\nexport const customVendorConfigs = {\r\n ISPOT: ISPOTConfig,\r\n DV: DVConfig,\r\n};\r\n\r\nISPOTConfig.propTypes = {\r\n setting: PropTypes.shape({}).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n setSetting: PropTypes.func.isRequired,\r\n};\r\n\r\nDVConfig.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n doubleVerifyLinkEstablished: PropTypes.bool.isRequired,\r\n};\r\n\r\n","import React, { useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { Stack, CommandButton, TextField } from '@bingads-webui-react/fabric-control';\r\n\r\nimport {\r\n vendorNameKey,\r\n campaignThirdPartyVendorNames,\r\n campaignThirdPartyVendors,\r\n} from '../../model/campaign-third-party-vendor-setting';\r\nimport { thridPartyMeasurementTrackingStyles } from '../../styles/third-party-measurement-setting-styles';\r\nimport { WarningMessage } from './warning-message';\r\nimport { customVendorConfigs } from './custom-config';\r\n\r\nexport const ThirdPartyTrackingSetting = (props) => {\r\n const {\r\n i18n,\r\n setting,\r\n setSetting,\r\n removeSetting,\r\n overrideStyles,\r\n doubleVerifyLinkEstablished,\r\n } = props;\r\n\r\n const styles = useMemo(() => ({\r\n ...thridPartyMeasurementTrackingStyles,\r\n ...overrideStyles,\r\n }), [overrideStyles]);\r\n\r\n const VendorConfig = customVendorConfigs[setting[vendorNameKey]];\r\n const isiSPOTSetting = setting[vendorNameKey] === campaignThirdPartyVendors.ISPOT;\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n {VendorConfig &&\r\n }\r\n \r\n \r\n \r\n {isiSPOTSetting &&\r\n \r\n \r\n \r\n }\r\n
\r\n );\r\n};\r\n\r\nThirdPartyTrackingSetting.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n setting: PropTypes.shape({\r\n [vendorNameKey]: PropTypes.string,\r\n }).isRequired,\r\n setSetting: PropTypes.func.isRequired,\r\n removeSetting: PropTypes.func.isRequired,\r\n overrideStyles: PropTypes.shape({}),\r\n doubleVerifyLinkEstablished: PropTypes.bool,\r\n};\r\n\r\nThirdPartyTrackingSetting.defaultProps = {\r\n overrideStyles: {},\r\n doubleVerifyLinkEstablished: false,\r\n};\r\n\r\n","import React, { useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { Stack, CommandButton } from '@bingads-webui-react/fabric-control';\r\n\r\nimport { thridPartyMeasurementTrackingStyles } from '../../styles/third-party-measurement-setting-styles';\r\n\r\n\r\nexport const ThirdPartyTrackingRemoveAllButton = (props) => {\r\n const {\r\n i18n,\r\n removeAllVendorSettings,\r\n overrideStyles,\r\n } = props;\r\n\r\n const styles = useMemo(() => ({\r\n ...thridPartyMeasurementTrackingStyles,\r\n ...overrideStyles,\r\n }), [overrideStyles]);\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nThirdPartyTrackingRemoveAllButton.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n removeAllVendorSettings: PropTypes.func.isRequired,\r\n overrideStyles: PropTypes.shape({}),\r\n};\r\n\r\nThirdPartyTrackingRemoveAllButton.defaultProps = {\r\n overrideStyles: {},\r\n};\r\n","import React, { useState, useMemo, useEffect, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\n\r\nimport { Stack, Label, CommandButton } from '@bingads-webui-react/fabric-control';\r\nimport {\r\n ContextualMenuItemType,\r\n} from '@fluentui/react/lib/ContextualMenu';\r\nimport { withCustomValidation, withError } from '@bingads-webui-react/validation';\r\nimport { withControlErrorHandling, withUnvalidatedControlErrors } from '@bingads-webui-campaign-react/error-handling';\r\nimport { useAccountPropertyRepository } from './component/use-account-property-repository';\r\n\r\nimport {\r\n campaignThirdPartyVendors,\r\n vendorNameKey,\r\n settingEnabledKey,\r\n thirdPartySettingValidatorMap,\r\n createVerifiedTrackingSettingViewModel,\r\n reachVendors,\r\n verificationVendors,\r\n campaignThirdPartyVendorNames,\r\n VerifiedTrackingSettingKey,\r\n isVendorSelectedInSetting,\r\n} from '../model/campaign-third-party-vendor-setting';\r\n\r\nimport { ThirdPartyTrackingSetting } from './component/third-party-vendor-setting';\r\nimport { ThirdPartyTrackingRemoveAllButton } from './component/third-party-measurement-remove-all-button';\r\nimport { thridPartyMeasurementTrackingStyles } from '../styles/third-party-measurement-setting-styles';\r\n\r\nexport const formatVendorSettings = ({ verifiedTrackingSettingsValidationProps, i18n }) => {\r\n const verifiedTrackingSettings = _.result(verifiedTrackingSettingsValidationProps, ['data', VerifiedTrackingSettingKey], []);\r\n const isSettingsAllDisabled = settings => _.every(settings, setting => !_.get(setting, [settingEnabledKey], true));\r\n const settingEmpty = _.isEmpty(verifiedTrackingSettings) || isSettingsAllDisabled(verifiedTrackingSettings);\r\n\r\n const getVendorNames = (settings) => {\r\n const validSettings = _.filter(settings, setting => _.get(setting, [settingEnabledKey], true));\r\n const selectedVendors = _.map(validSettings, setting => _.get(setting, [vendorNameKey], ''));\r\n const vendorNameArr = _.map(selectedVendors, vendor => i18n.getString(campaignThirdPartyVendorNames[vendor]));\r\n return vendorNameArr.join(', ');\r\n };\r\n\r\n return (\r\n
\r\n {\r\n settingEmpty ?\r\n i18n.getString(_TL_('No third-party vendor selected')) :\r\n (\r\n
\r\n {i18n.getString(_TL_('Added: ')) + getVendorNames(verifiedTrackingSettings)}\r\n
\r\n )\r\n }\r\n
\r\n );\r\n};\r\n\r\nexport const ThirdPartyMeasurementV3 = (props) => {\r\n const {\r\n i18n,\r\n updateValidation,\r\n validationProps,\r\n overrideStyles,\r\n IsMSANISPOTEnabled,\r\n EnableDoubleVerify,\r\n cid,\r\n aid,\r\n } = props;\r\n\r\n const [doubleVerifyLinkEstablished] = useAccountPropertyRepository({ cid, aid });\r\n\r\n const [settings, setSettings] = useState([]);\r\n const styles = useMemo(() => ({\r\n ...thridPartyMeasurementTrackingStyles,\r\n ...overrideStyles,\r\n }), [overrideStyles]);\r\n const verifiedTrackingData = useMemo(\r\n () => {\r\n const data = _.result(validationProps, ['data'], null);\r\n if (_.isNull(data)) {\r\n return null;\r\n }\r\n return _.result(validationProps, ['data', VerifiedTrackingSettingKey], []);\r\n }\r\n , [validationProps]\r\n );\r\n\r\n // Set settings on initailization\r\n useEffect(() => {\r\n if (_.isNull(verifiedTrackingData) || _.isUndefined(verifiedTrackingData)) return;\r\n const settingsToUpdate = [];\r\n _.each(campaignThirdPartyVendors, (vendor) => {\r\n const vendorData = verifiedTrackingData.find(setting => setting[vendorNameKey] === vendor);\r\n if (!_.isEmpty(vendorData)) {\r\n settingsToUpdate.push({\r\n [settingEnabledKey]: true,\r\n ...vendorData,\r\n });\r\n } else {\r\n settingsToUpdate.push({\r\n [settingEnabledKey]: false,\r\n [vendorNameKey]: vendor,\r\n });\r\n }\r\n });\r\n setSettings(settingsToUpdate);\r\n }, [verifiedTrackingData]);\r\n\r\n // Update to outside when settings change and valiate\r\n useEffect(() => {\r\n if (_.isEmpty(settings)) {\r\n return;\r\n }\r\n // Validate each vendor settings\r\n const errorsToUpdate = [];\r\n const validatedSettingsArray = [];\r\n _.each(settings, (setting) => {\r\n const vendor = setting[vendorNameKey];\r\n if (_.isEmpty(vendor)) {\r\n return;\r\n }\r\n let validatedVendorSetting = { [vendorNameKey]: vendor };\r\n const settingEnabled = _.get(setting, [settingEnabledKey], false);\r\n if (settingEnabled) {\r\n // Validate each setting\r\n if (_.isFunction(thirdPartySettingValidatorMap[vendor])) {\r\n const currentVendorErrors = thirdPartySettingValidatorMap[vendor]({ setting, i18n, doubleVerifyLinkEstablished });\r\n if (!_.isEmpty(currentVendorErrors)) {\r\n errorsToUpdate.push(...currentVendorErrors);\r\n }\r\n }\r\n\r\n validatedVendorSetting = {\r\n ...validatedVendorSetting,\r\n ...setting,\r\n [settingEnabledKey]: true,\r\n };\r\n } else {\r\n validatedVendorSetting[settingEnabledKey] = false;\r\n }\r\n validatedSettingsArray.push(validatedVendorSetting);\r\n });\r\n // TODO: flatten the errors\r\n updateValidation(errorsToUpdate, createVerifiedTrackingSettingViewModel(validatedSettingsArray));\r\n }, [settings, updateValidation, i18n, doubleVerifyLinkEstablished]);\r\n\r\n const addSetting = useCallback((vendorName) => {\r\n setSettings((originalSettings) => {\r\n const updatedSettings = [];\r\n let vendorFound = false;\r\n _.each(originalSettings, (setting) => {\r\n if (_.get(setting, [vendorNameKey], '') !== vendorName) {\r\n updatedSettings.push({ ...setting });\r\n } else {\r\n // If already existing a vendor setting, enable it\r\n updatedSettings.push({\r\n ...setting,\r\n [settingEnabledKey]: true,\r\n });\r\n vendorFound = true;\r\n }\r\n });\r\n\r\n return vendorFound ? updatedSettings : [\r\n ...updatedSettings,\r\n {\r\n [vendorNameKey]: vendorName,\r\n [settingEnabledKey]: true,\r\n },\r\n ];\r\n });\r\n }, [setSettings]);\r\n\r\n const removeSetting = useCallback((index) => {\r\n setSettings((originalSettings) => {\r\n const newSettings = [];\r\n _.each(originalSettings, (setting, i) => {\r\n if (i === index) {\r\n newSettings.push({\r\n ...setting,\r\n [settingEnabledKey]: false,\r\n });\r\n } else {\r\n newSettings.push({ ...setting });\r\n }\r\n });\r\n return newSettings;\r\n });\r\n }, [setSettings]);\r\n\r\n const removeAllVendorSettings = useCallback((vendorNameArr) => {\r\n setSettings((originalSettings) => {\r\n const newSettings = [];\r\n _.each(originalSettings, (setting) => {\r\n const currentVendorName = _.get(setting, [vendorNameKey], '');\r\n if (_.includes(vendorNameArr, currentVendorName)) {\r\n newSettings.push({\r\n ...setting,\r\n [settingEnabledKey]: false,\r\n });\r\n } else {\r\n newSettings.push({ ...setting });\r\n }\r\n });\r\n return newSettings;\r\n });\r\n }, []);\r\n\r\n const setSetting = useCallback((index, updatedSetting) => {\r\n setSettings(oldSettings => _.map(oldSettings, (s, i) => (i === index ? updatedSetting : s)));\r\n }, [setSettings]);\r\n\r\n const onRenderReachSettings = useCallback(() => {\r\n const reachSettings = [];\r\n _.each(settings, (setting, index) => {\r\n if (_.get(setting, [settingEnabledKey], false) && _.contains(reachVendors, _.get(setting, [vendorNameKey], ''))) {\r\n reachSettings.push({\r\n ...setting,\r\n indexInSettings: index,\r\n });\r\n }\r\n });\r\n\r\n if (_.isEmpty(reachSettings)) {\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n removeAllVendorSettings(reachVendors)}\r\n />\r\n {reachSettings.map(setting => (\r\n setSetting(setting.indexInSettings, updatedSetting)}\r\n removeSetting={() => removeSetting(setting.indexInSettings)}\r\n />\r\n ))}\r\n
\r\n );\r\n }, [settings, i18n, setSetting, removeSetting, removeAllVendorSettings]);\r\n\r\n const onRenderVerificationSettings = useCallback(() => {\r\n const verificationSettings = [];\r\n _.each(settings, (setting, index) => {\r\n if (_.get(setting, [settingEnabledKey], false) && _.contains(verificationVendors, _.get(setting, [vendorNameKey], ''))) {\r\n verificationSettings.push({\r\n ...setting,\r\n indexInSettings: index,\r\n });\r\n }\r\n });\r\n\r\n if (_.isEmpty(verificationSettings)) {\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n removeAllVendorSettings(reachVendors)}\r\n />\r\n {verificationSettings.map(setting => (\r\n setSetting(setting.indexInSettings, updatedSetting)}\r\n removeSetting={() => removeSetting(setting.indexInSettings)}\r\n doubleVerifyLinkEstablished={doubleVerifyLinkEstablished}\r\n />\r\n ))}\r\n
\r\n );\r\n }, [settings, i18n, setSetting, removeSetting, removeAllVendorSettings, doubleVerifyLinkEstablished]);\r\n\r\n const addVendorMenuProps = useMemo(() => {\r\n const itemsToPush = [];\r\n if (IsMSANISPOTEnabled) {\r\n itemsToPush.push({ key: 'ReachAndIncrementalityHeader', text: i18n.getString(_TL_('Reach vendor')), itemType: ContextualMenuItemType.Header });\r\n const ispotSelected = isVendorSelectedInSetting(settings, campaignThirdPartyVendors.ISPOT);\r\n itemsToPush.push({\r\n key: 'ISPOT', text: i18n.getString(_TL_('iSpot.tv')), onClick: () => addSetting(campaignThirdPartyVendors.ISPOT), disabled: ispotSelected,\r\n });\r\n }\r\n if (IsMSANISPOTEnabled && EnableDoubleVerify) {\r\n itemsToPush.push({ key: 'divider1', text: '-', itemType: ContextualMenuItemType.Divider });\r\n }\r\n if (EnableDoubleVerify) {\r\n itemsToPush.push({ key: 'VerificationHeader', text: i18n.getString(_TL_('Verification vendor')), itemType: ContextualMenuItemType.Header });\r\n const DVSelected = isVendorSelectedInSetting(settings, campaignThirdPartyVendors.DV);\r\n itemsToPush.push({\r\n key: 'DV', text: i18n.getString(_TL_('DoubleVerify')), onClick: () => addSetting(campaignThirdPartyVendors.DV), disabled: DVSelected,\r\n });\r\n }\r\n return {\r\n items: itemsToPush,\r\n styles: styles.thirdPartyMeasurementAddButton.dropdown,\r\n className: 'third-party-measurement-vendor-dropdown',\r\n };\r\n }, [i18n, addSetting, styles.thirdPartyMeasurementAddButton, IsMSANISPOTEnabled, EnableDoubleVerify, settings]);\r\n\r\n return (\r\n
\r\n {onRenderReachSettings()}\r\n {onRenderVerificationSettings()}\r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nThirdPartyMeasurementV3.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n validationProps: PropTypes.shape({\r\n data: PropTypes.shape({\r\n VerifiedTrackingSettings: PropTypes.arrayOf(PropTypes.shape({})),\r\n }),\r\n }).isRequired,\r\n overrideStyles: PropTypes.shape({}),\r\n IsMSANISPOTEnabled: PropTypes.bool,\r\n EnableDoubleVerify: PropTypes.bool,\r\n cid: PropTypes.string.isRequired,\r\n aid: PropTypes.string.isRequired,\r\n};\r\n\r\nThirdPartyMeasurementV3.defaultProps = {\r\n overrideStyles: {},\r\n IsMSANISPOTEnabled: false,\r\n EnableDoubleVerify: false,\r\n};\r\n\r\nexport const ThirdPartyMeasurementV3WithValidation = withControlErrorHandling(withUnvalidatedControlErrors(withError(withCustomValidation(ThirdPartyMeasurementV3))));\r\n","import { useCallback, useEffect, useState } from 'react';\r\nimport { edmCampaign } from '@bingads-webui/edm-campaign';\r\n\r\nfunction useAccountPropertyRepository({ cid, aid }) {\r\n const [enableDoubleVerifyForAllCampaigns, setEnableDoubleVerifyForAllCampaigns] = useState(false);\r\n const [doubleVerifyLinkEstablished, setDoubleVerifyLinkEstablished] = useState(false);\r\n\r\n const readAccount = useCallback(() => edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .get({ select: ['EnableDoubleVerifyForAllCampaigns,DoubleVerifyLinkEstablished'] })\r\n .toPromise(), [aid, cid]);\r\n\r\n useEffect(() => {\r\n readAccount().then((account) => {\r\n setEnableDoubleVerifyForAllCampaigns(account.EnableDoubleVerifyForAllCampaigns === 'true');\r\n setDoubleVerifyLinkEstablished(account.DoubleVerifyLinkEstablished === '1');\r\n }).catch((e) => {\r\n throw e;\r\n });\r\n }, [readAccount]);\r\n\r\n return [doubleVerifyLinkEstablished, enableDoubleVerifyForAllCampaigns];\r\n}\r\n\r\nexport { useAccountPropertyRepository };\r\n","import _ from 'underscore';\r\n\r\nexport const getVerifiedTrackingSettingWrite = (verifiedTrackingSettings = null) => {\r\n if (_.isNull(verifiedTrackingSettings)) {\r\n return {};\r\n }\r\n\r\n if (_.isEmpty(verifiedTrackingSettings)) {\r\n return { VerifiedTrackingData: '' };\r\n }\r\n\r\n const results = [];\r\n _.each(verifiedTrackingSettings, (setting) => {\r\n const result = [];\r\n if (setting.vendorName === 'DV') {\r\n result.push({ Key: 'vendorName', Value: 'DV' });\r\n if (setting.enabled === true) {\r\n result.push({ Key: 'settings', Value: '' });\r\n } else {\r\n result.push({ Key: 'enabled', Value: 'false' });\r\n }\r\n } else {\r\n _.mapObject(setting, (value, key) => {\r\n result.push({ Key: key, Value: value });\r\n });\r\n }\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 getVerifiedTrackingSettingsRead = (model, customKey = null) => {\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, 'DV') && !_.isEqual(vendor, 'ISPOT')) {\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 = {\r\n IAS_advertiserEntityId: 'advertiserEntityId',\r\n IAS_publisherEntityId: 'publisherEntityId',\r\n ISPOT_brandId: 'brandId',\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 if (!_.isEmpty(customKey)) {\r\n return { [customKey]: results };\r\n }\r\n\r\n return { VerifiedTrackingSettings: results };\r\n};\r\n\r\nexport const thirdPartyMeasurementStringToViewModel = (verifiedTrackingDataString = '') => {\r\n if (_.isEmpty(verifiedTrackingDataString)) {\r\n return [];\r\n }\r\n\r\n let thirdPartyMeasurementFromBulkModel = {};\r\n try {\r\n thirdPartyMeasurementFromBulkModel = JSON.parse(verifiedTrackingDataString);\r\n } catch (e) {\r\n console.log(e);\r\n return [];\r\n }\r\n\r\n if (!_.isArray(thirdPartyMeasurementFromBulkModel) || thirdPartyMeasurementFromBulkModel.length === 0) {\r\n return [];\r\n }\r\n\r\n const results = [];\r\n thirdPartyMeasurementFromBulkModel.forEach((thirdPartyMeasurementSetting) => {\r\n if (!_.isArray(thirdPartyMeasurementSetting)) {\r\n return;\r\n }\r\n const result = {};\r\n _.each(thirdPartyMeasurementSetting, (setting) => {\r\n result[setting.Key] = setting.Value;\r\n });\r\n\r\n results.push(result);\r\n });\r\n\r\n return results;\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { mergeStyles, Text as FluentText } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\n\r\nconst style = mergeStyles({\r\n lineHeight: 19,\r\n});\r\n\r\nexport const Text = ({ text, ...rest }) => {\r\n const i18n = useContext(I18nContext);\r\n return {i18n.getString(text)};\r\n};\r\n\r\nText.propTypes = {\r\n text: PropTypes.string.isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nexport const CustomComponent = ({\r\n Renderer, renderProps, children, ...dynamicProps\r\n}) => {children};\r\n\r\nCustomComponent.propTypes = {\r\n Renderer: PropTypes.elementType.isRequired,\r\n renderProps: PropTypes.shape({}),\r\n children: PropTypes.oneOfType([\r\n PropTypes.arrayOf(PropTypes.node),\r\n PropTypes.node,\r\n ]),\r\n};\r\n\r\nCustomComponent.defaultProps = {\r\n renderProps: null,\r\n children: null,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { CustomComponent } from './custom-component';\r\n\r\nexport const withCustomRendering = (Component) => {\r\n const CustomRenderingWrapper = (props) => {\r\n const { Renderer } = props;\r\n\r\n return (\r\n <>\r\n {Renderer ? : }\r\n \r\n );\r\n };\r\n\r\n CustomRenderingWrapper.propTypes = {\r\n Renderer: PropTypes.elementType,\r\n };\r\n\r\n CustomRenderingWrapper.defaultProps = {\r\n Renderer: null,\r\n };\r\n\r\n return CustomRenderingWrapper;\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { DefaultButton } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { withCustomRendering } from '../custom-component';\r\n\r\nconst ActionButton = ({\r\n label, iconName, iconStyles, ariaLabel, onClick, ...rest\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n const buttonIcon = iconName && {\r\n iconName,\r\n styles: iconStyles || {\r\n root: {\r\n color: '#0078D4',\r\n },\r\n },\r\n };\r\n\r\n return (\r\n
\r\n {i18n.getString(label)}\r\n
\r\n );\r\n};\r\n\r\nActionButton.propTypes = {\r\n ariaLabel: PropTypes.string.isRequired,\r\n iconName: PropTypes.string,\r\n iconStyles: PropTypes.shape({}),\r\n label: PropTypes.string.isRequired,\r\n onClick: PropTypes.func.isRequired,\r\n};\r\n\r\nActionButton.defaultProps = {\r\n iconName: null,\r\n iconStyles: null,\r\n};\r\n\r\nconst ActionButtonWrapped = withCustomRendering(ActionButton);\r\n\r\nexport { ActionButtonWrapped as ActionButton };\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { mergeStyles, Stack, Text } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport classNames from 'classnames';\r\nimport { ActionButton } from './action-button';\r\nimport { withCustomRendering } from '../custom-component';\r\n\r\nconst headerStyles = mergeStyles({\r\n padding: '0px 24px 0px 24px',\r\n borderStyle: 'solid',\r\n borderWidth: '0px 0px 1px 0px',\r\n borderColor: '#EDEBE9',\r\n});\r\n\r\nconst headerStackStyles = {\r\n root: {\r\n height: 56,\r\n },\r\n};\r\n\r\nconst titleStyles = mergeStyles({\r\n fontSize: 18,\r\n fontWeight: 600,\r\n});\r\n\r\nconst Header = ({\r\n title, actionButton, actionButtonDynamic, as,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n return (\r\n
\r\n \r\n {i18n.getString(title)}\r\n {actionButton && }\r\n \r\n
\r\n );\r\n};\r\n\r\nHeader.propTypes = {\r\n actionButton: PropTypes.shape({}),\r\n actionButtonDynamic: PropTypes.shape({}),\r\n title: PropTypes.string.isRequired,\r\n as: PropTypes.string,\r\n};\r\n\r\nHeader.defaultProps = {\r\n actionButton: null,\r\n actionButtonDynamic: null,\r\n as: 'span',\r\n};\r\n\r\nconst HeaderWrapped = withCustomRendering(Header);\r\n\r\nexport { HeaderWrapped as Header };\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { mergeStyles } from '@bingads-webui-react/fabric-control';\r\nimport { Header } from './header';\r\n\r\nconst panelStyles = mergeStyles({\r\n width: 928,\r\n background: '#FFFFFF',\r\n borderRadius: 4,\r\n boxShadow: '0px 1.600000023841858px 3.5999999046325684px 0px #00000021',\r\n});\r\n\r\nconst panelContentStyles = mergeStyles({\r\n padding: '16px 24px 16px 24px',\r\n});\r\n\r\nexport const Panel = ({\r\n header, headerDynamic, children,\r\n}) =>\r\n (\r\n
\r\n {header &&
}\r\n
\r\n {children}\r\n
\r\n
\r\n );\r\n\r\nPanel.propTypes = {\r\n header: PropTypes.shape({}),\r\n headerDynamic: PropTypes.shape({}),\r\n children: PropTypes.oneOfType([\r\n PropTypes.arrayOf(PropTypes.node),\r\n PropTypes.node,\r\n ]).isRequired,\r\n};\r\n\r\nPanel.defaultProps = {\r\n header: null,\r\n headerDynamic: null,\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { MessageBar as FluentMessageBar } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { withCustomRendering } from './custom-component';\r\n\r\nconst MessageBar = (props) => {\r\n const i18n = useContext(I18nContext);\r\n const { text, ...rest } = props;\r\n return {i18n.getString(text)};\r\n};\r\n\r\nMessageBar.propTypes = {\r\n Renderer: PropTypes.elementType,\r\n rendererProps: PropTypes.shape({}),\r\n text: PropTypes.string,\r\n};\r\n\r\nMessageBar.defaultProps = {\r\n Renderer: null,\r\n rendererProps: null,\r\n text: null,\r\n};\r\n\r\nconst MessageBarWrapped = withCustomRendering(MessageBar);\r\n\r\nexport { MessageBarWrapped as MessageBar };\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Text, mergeStyles } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport classNames from 'classnames';\r\nimport { withCustomRendering } from '../custom-component';\r\n\r\nconst labelStyles = mergeStyles({\r\n fontWeight: 400,\r\n fontSize: 14,\r\n lineHeight: 19,\r\n width: 148,\r\n paddingLeft: 8,\r\n paddingTop: 10,\r\n paddingBottom: 10,\r\n});\r\n\r\nconst PropertyLabel = ({ label }) => {\r\n const i18n = useContext(I18nContext);\r\n return (\r\n
{i18n.getString(label)}
\r\n );\r\n};\r\n\r\nPropertyLabel.propTypes = {\r\n label: PropTypes.string.isRequired,\r\n};\r\n\r\nconst PropertyLabelWrapped = withCustomRendering(PropertyLabel);\r\n\r\nexport { PropertyLabelWrapped as PropertyLabel };\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { mergeStyles } from '@bingads-webui-react/fabric-control';\r\nimport classNames from 'classnames';\r\nimport { withCustomRendering } from '../custom-component';\r\n\r\n\r\nconst dataStyles = mergeStyles({\r\n paddingLeft: 8,\r\n paddingTop: 10,\r\n paddingBottom: 10,\r\n overflow: 'hidden',\r\n width: 716,\r\n whiteSpace: 'nowrap',\r\n});\r\n\r\nconst PropertyData = ({ children }) =>\r\n (\r\n
\r\n {children}\r\n
\r\n );\r\n\r\nPropertyData.propTypes = {\r\n children: PropTypes.oneOfType([\r\n PropTypes.arrayOf(PropTypes.node),\r\n PropTypes.node,\r\n ]).isRequired,\r\n};\r\n\r\nconst PropertyDataWrapped = withCustomRendering(PropertyData);\r\n\r\nexport { PropertyDataWrapped as PropertyData };\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Stack } from '@bingads-webui-react/fabric-control';\r\nimport { PropertyLabel } from './property-label';\r\nimport { PropertyData } from './property-data';\r\n\r\nexport const PropertyRow = ({\r\n propertyLabel, propertyLabelDynamic, propertyData, propertyDataDynamic, children,\r\n}) => (\r\n
\r\n \r\n \r\n \r\n {children}\r\n \r\n \r\n
\r\n);\r\n\r\nPropertyRow.propTypes = {\r\n propertyData: PropTypes.shape({}),\r\n propertyDataDynamic: PropTypes.shape({}),\r\n propertyLabel: PropTypes.shape({}).isRequired,\r\n propertyLabelDynamic: PropTypes.shape({}),\r\n children: PropTypes.oneOfType([\r\n PropTypes.arrayOf(PropTypes.node),\r\n PropTypes.node,\r\n ]),\r\n};\r\n\r\nPropertyRow.defaultProps = {\r\n propertyData: null,\r\n propertyDataDynamic: null,\r\n propertyLabelDynamic: null,\r\n children: null,\r\n};\r\n","import React from 'react';\r\nimport { mergeStyles } from '@bingads-webui-react/fabric-control';\r\n\r\nconst dividerStyles = mergeStyles({\r\n height: 1,\r\n background: '#EDEBE9',\r\n});\r\n\r\nexport const HorizontalDivider = () =>
;\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { mergeStyles, Text as FluentText } from '@bingads-webui-react/fabric-control';\r\n\r\nconst style = mergeStyles({\r\n lineHeight: 19,\r\n});\r\n\r\nexport const Data = ({ data, ...rest }) => {data};\r\n\r\nData.propTypes = {\r\n data: PropTypes.oneOfType([\r\n PropTypes.number,\r\n PropTypes.string,\r\n ]).isRequired,\r\n};\r\n","import _ from 'underscore';\r\nimport {\r\n Text,\r\n Panel,\r\n MessageBar,\r\n CustomComponent,\r\n PropertyRow,\r\n HorizontalDivider,\r\n Data,\r\n} from './components';\r\n\r\nexport const componentTypes = {\r\n text: Text,\r\n panel: Panel,\r\n 'message-bar': MessageBar,\r\n 'property-row': PropertyRow,\r\n 'horizontal-divider': HorizontalDivider,\r\n 'custom-component': CustomComponent,\r\n data: Data,\r\n};\r\n\r\nexport const register = (label, Component) => {\r\n componentTypes[label] = Component;\r\n};\r\n\r\nexport const bulkRegister = (registrationMap) => {\r\n _.extend(componentTypes, registrationMap);\r\n};\r\n","import React from 'react';\r\nimport _ from 'underscore';\r\nimport { mergeStyles } from '@fluentui/react';\r\nimport classNames from 'classnames';\r\nimport { componentTypes, bulkRegister } from './component-types';\r\nimport { GeneratedUI } from './generated-ui';\r\n\r\nexport const generateComponents = (props) => {\r\n const { schema, customComponentTypes } = props;\r\n\r\n const selectComponentType = ({\r\n schemaComponent, key, commonSchemaStyles, numberOfComponents, separatorStyles,\r\n }) => {\r\n const field = schemaComponent[0];\r\n const params = schemaComponent[1];\r\n\r\n const Component = componentTypes[params.type];\r\n\r\n const separatorStylesForComponent = separatorStyles && key < numberOfComponents - 1 ? separatorStyles : {};\r\n\r\n const componentStyles = _.extend(separatorStylesForComponent, params.styles || commonSchemaStyles);\r\n const componentClassName = params.className || `${field}-${params.type}`;\r\n\r\n const { dynamicProps: getDirectlyDefinedDynamicProperties, components: componentsSchema } = params;\r\n\r\n const build = Component ? (propertiesSchema, dynamicProperties) => {\r\n const directlyDefinedComponentDynamicProperties = (dynamicProperties\r\n && getDirectlyDefinedDynamicProperties\r\n && getDirectlyDefinedDynamicProperties(dynamicProperties)) || {};\r\n const schemaBasedComponentDynamicProperties = (propertiesSchema && propertiesSchema[field]) || {};\r\n\r\n const { components: childComponentsDynamicProperties, ...rest } = schemaBasedComponentDynamicProperties;\r\n const componentDynamicProperties = (!_.isEmpty(directlyDefinedComponentDynamicProperties) && directlyDefinedComponentDynamicProperties) || rest;\r\n\r\n const dynamicallyHideComponent = componentDynamicProperties.isRendered === false;\r\n const componentStylesWithDynamics = mergeStyles(_.extend(componentStyles, componentDynamicProperties.styles, { display: dynamicallyHideComponent ? 'none' : 'block' }));\r\n\r\n return (\r\n
\r\n \r\n {componentsSchema && }\r\n \r\n
\r\n );\r\n } : null;\r\n\r\n return build ? { field, build } : null;\r\n };\r\n\r\n bulkRegister(customComponentTypes);\r\n\r\n const { styles, separatorStyles } = schema;\r\n\r\n const unrenderedComponents = _.keys(_.pick(schema, c => c.isRendered === false));\r\n const componentsToRenderSchema = _.omit(schema, 'styles', 'separatorStyles', ...unrenderedComponents);\r\n\r\n const schemaComponents = _.pairs(componentsToRenderSchema);\r\n\r\n const selectedComponentTypes = _.map(schemaComponents, (schemaComponent, key) =>\r\n selectComponentType({\r\n schemaComponent,\r\n key,\r\n numberOfComponents: schemaComponents.length,\r\n commonSchemaStyles: styles,\r\n separatorStyles,\r\n }));\r\n\r\n return _.without(selectedComponentTypes, null);\r\n};\r\n","import { useMemo } from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { generateComponents } from './generate-components';\r\n\r\nexport const GeneratedUI = ({\r\n schema, propertiesSchema, customComponentTypes, ...dynamicProperties\r\n}) => {\r\n const dynamicComponentBuilders = useMemo(() => generateComponents({ schema, customComponentTypes }), [schema, customComponentTypes]);\r\n\r\n const completedComponents = useMemo(\r\n () =>\r\n _.map(dynamicComponentBuilders, componentBuilder => componentBuilder.build(propertiesSchema, dynamicProperties)),\r\n [dynamicComponentBuilders, dynamicProperties, propertiesSchema]\r\n );\r\n\r\n return completedComponents;\r\n};\r\n\r\nGeneratedUI.propTypes = {\r\n schema: PropTypes.shape({}).isRequired,\r\n};\r\n","import _ from 'underscore';\r\n\r\nexport const buildDefaultTextProperty = (props) => {\r\n const {\r\n label,\r\n text,\r\n styles,\r\n isRendered,\r\n dynamicProps,\r\n } = props;\r\n\r\n const baselineProperty = {\r\n type: 'property-row',\r\n isRendered,\r\n propertyLabel: {\r\n label,\r\n },\r\n components: {\r\n text: {\r\n type: 'text',\r\n text,\r\n dynamicProps,\r\n },\r\n },\r\n };\r\n\r\n return _.extend(baselineProperty, { styles });\r\n};\r\n","import _ from 'underscore';\r\n\r\nexport const buildDefaultDataProperty = (props) => {\r\n const {\r\n label,\r\n data,\r\n styles,\r\n dynamicProps,\r\n } = props;\r\n\r\n const baselineProperty = {\r\n type: 'property-row',\r\n propertyLabel: {\r\n label,\r\n },\r\n components: {\r\n data: {\r\n type: 'data',\r\n data,\r\n dynamicProps,\r\n },\r\n },\r\n };\r\n\r\n return _.extend(baselineProperty, { styles });\r\n};\r\n","export const parseFileName = (nameWithExtension) => {\r\n let nameWithoutExt = null;\r\n let ext = null;\r\n\r\n if (nameWithExtension) {\r\n const index = nameWithExtension.lastIndexOf('.');\r\n if (index > 0) {\r\n nameWithoutExt = nameWithExtension.slice(0, index);\r\n ext = nameWithExtension.slice(index);\r\n } else {\r\n nameWithoutExt = nameWithExtension;\r\n ext = '';\r\n }\r\n }\r\n\r\n return {\r\n nameWithoutExt,\r\n ext,\r\n };\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\n\r\nimport { FileDragger } from '@bingads-webui-campaign-react/file-dragger';\r\nimport { FilePicker as BackboneFilePicker } from '@bingads-webui/file-picker';\r\nimport { BackboneInstanceWrapper } from '@bingads-webui-react/backbone-instance-wrapper';\r\nimport { parseFileName } from '../utils/parse-file';\r\n\r\nexport class FilePicker extends React.PureComponent {\r\n constructor(props) {\r\n super(props);\r\n\r\n const {\r\n i18n,\r\n enableMultiple,\r\n allowedFileExtensions,\r\n showExtensionError,\r\n useButton,\r\n } = props;\r\n const filePickerOptions = {\r\n allowedFileExtensions,\r\n i18n,\r\n isNative: false,\r\n displayFilePath: 'filename',\r\n enableMultiple,\r\n useButton,\r\n };\r\n\r\n // This dependency injection is only for test purpose\r\n // For the implementation is coupled tightly with BackboneFilePicker\r\n this.filePicker = this.props.filePicker ? this.props.filePicker : new BackboneFilePicker(filePickerOptions);\r\n\r\n this.filePicker.on('validated', this.readFile);\r\n this.filePicker.on('error.extension', () => { showExtensionError(); });\r\n\r\n this.filePicker.render();\r\n this.filePicker.$('.remove-file').remove();\r\n this.filePicker.$('.file-text').hide();\r\n\r\n this.state = {\r\n isFileDraging: false,\r\n };\r\n\r\n // Only for test purpose\r\n if (this.props.testRef) {\r\n this.props.testRef.current = {\r\n filePicker: this.filePicker,\r\n readFile: this.readFile.bind(this),\r\n getReachFileSizeLimitErrorMessage: this.props.getReachFileSizeLimitErrorMessage.bind(this),\r\n };\r\n }\r\n }\r\n\r\n readFile = (fileObjects) => {\r\n const {\r\n onFileRead,\r\n showErrors,\r\n onFileSelected,\r\n maximumFileSizeMB,\r\n isReachFileSizeLimit,\r\n getReachFileSizeLimitErrorMessage,\r\n } = this.props;\r\n\r\n const selectedFiles = !_.isUndefined(fileObjects) && fileObjects.length > 0 ? fileObjects :\r\n this.filePicker.fileObjects;\r\n\r\n if (selectedFiles) {\r\n const selectedFilesCount = selectedFiles.length;\r\n let fileIndex;\r\n const errorArr = [];\r\n\r\n for (fileIndex = 0; fileIndex < selectedFilesCount; fileIndex += 1) {\r\n const fileObj = selectedFiles[fileIndex];\r\n const fileSizeMB = (fileObj.size / 1024 / 1024).toFixed(3);\r\n let reachLimit;\r\n\r\n if (isReachFileSizeLimit) {\r\n const { ext } = parseFileName(fileObj.name);\r\n reachLimit = isReachFileSizeLimit({ ext, fileSizeMB });\r\n } else {\r\n reachLimit = maximumFileSizeMB > 0 && fileSizeMB > maximumFileSizeMB;\r\n }\r\n\r\n if (reachLimit) {\r\n errorArr.push(getReachFileSizeLimitErrorMessage(_.extend({\r\n fileSizeMB,\r\n }, !isReachFileSizeLimit && { maximumFileSizeMB })));\r\n\r\n break;\r\n }\r\n }\r\n\r\n if (_.isEmpty(errorArr)) {\r\n if (_.isFunction(onFileSelected)) {\r\n onFileSelected(selectedFiles);\r\n }\r\n\r\n return onFileRead(selectedFiles);\r\n }\r\n\r\n showErrors(errorArr);\r\n } // else no media picked, so do nothing\r\n\r\n return ''; // for testability\r\n };\r\n\r\n handleDraging = (isDraging) => {\r\n this.setState({\r\n isFileDraging: isDraging,\r\n });\r\n };\r\n\r\n render() {\r\n const {\r\n i18n,\r\n enableDrag,\r\n hideDescription,\r\n allowedFileExtensions,\r\n showExtensionError,\r\n fileDraggerLabel,\r\n fileDraggerTip,\r\n fileDraggerDropDescription,\r\n useLargeStyling,\r\n } = this.props;\r\n\r\n const {\r\n isFileDraging,\r\n } = this.state;\r\n\r\n const fileButton = (\r\n
\r\n \r\n
\r\n );\r\n\r\n return (\r\n
\r\n {!hideDescription &&\r\n
\r\n {i18n.getString('ImageExperience_Choose_File_Description')}\r\n
\r\n }\r\n {\r\n !enableDrag ?\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\nFilePicker.propTypes = {\r\n onFileRead: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n parseDecimal: PropTypes.func.isRequired,\r\n }).isRequired,\r\n showErrors: PropTypes.func.isRequired,\r\n enableMultiple: PropTypes.bool,\r\n enableDrag: PropTypes.bool,\r\n hideDescription: PropTypes.bool,\r\n fileDraggerLabel: PropTypes.string,\r\n fileDraggerTip: PropTypes.string,\r\n fileDraggerDropDescription: PropTypes.string,\r\n onFileSelected: PropTypes.func,\r\n allowedFileExtensions: PropTypes.arrayOf(PropTypes.string),\r\n showExtensionError: PropTypes.func,\r\n\r\n maximumFileSizeMB: PropTypes.number,\r\n isReachFileSizeLimit: PropTypes.func,\r\n getReachFileSizeLimitErrorMessage: PropTypes.func,\r\n useLargeStyling: PropTypes.bool,\r\n useButton: PropTypes.bool,\r\n};\r\n\r\nFilePicker.defaultProps = {\r\n enableMultiple: false,\r\n enableDrag: false,\r\n hideDescription: false,\r\n onFileSelected: _.noop(),\r\n allowedFileExtensions: [],\r\n showExtensionError: _.noop,\r\n\r\n fileDraggerLabel: '',\r\n fileDraggerTip: '',\r\n fileDraggerDropDescription: '',\r\n\r\n // below two are conflict and isReachFileSizeLimit takes higher priority\r\n isReachFileSizeLimit: undefined,\r\n maximumFileSizeMB: undefined,\r\n getReachFileSizeLimitErrorMessage: _.noop,\r\n useLargeStyling: false,\r\n useButton: false,\r\n};\r\n","import Promise from 'bluebird';\r\n\r\nexport const readFileAsDataURLAsync = file => new Promise((resolve, reject) => {\r\n const reader = new FileReader();\r\n\r\n reader.addEventListener('load', (e) => {\r\n resolve(e.target.result);\r\n });\r\n\r\n reader.onerror = reject;\r\n\r\n reader.readAsDataURL(file);\r\n});\r\n","export const MaximumImageFileSizeMB = 50;\r\nexport const MaximumVideoFileSizeMB = 1e4;\r\n\r\n// Refer to https://docs.microsoft.com/en-us/azure/media-services/latest/encode-media-encoder-standard-formats-reference\r\n// Plus some additional video formats supported by Xandr confirmed by Weiyuan to work with AMS\r\nexport const allowedVideoFileExtensions = [\r\n '.flv',\r\n '.mxf',\r\n '.gxf',\r\n '.ts',\r\n '.ps',\r\n '.3gp',\r\n '.3gpp',\r\n '.mpg',\r\n '.wmv',\r\n '.asf',\r\n '.avi',\r\n '.mp4',\r\n '.m4a',\r\n '.m4v',\r\n '.isma',\r\n '.ismv',\r\n '.dvr-ms',\r\n '.mkv',\r\n '.wav',\r\n '.mov',\r\n '.vob',\r\n '.ogv',\r\n '.qt',\r\n '.mpv',\r\n '.m2v',\r\n '.3g2',\r\n '.swf',\r\n '.mpeg',\r\n '.mpe',\r\n];\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport Promise from 'bluebird';\r\nimport _ from 'underscore';\r\nimport { LearnMoreLink } from '@bingads-webui-campaign-react/help';\r\n\r\nimport { FilePicker } from './file-picker';\r\nimport { readFileAsDataURLAsync } from '../utils/read-file';\r\nimport { MaximumImageFileSizeMB } from '../utils/constants';\r\n\r\n// Refer to https://docs.microsoft.com/en-us/azure/media-services/latest/encode-media-encoder-standard-formats-reference\r\nconst defaultAllowedImageExtensions = ['.png', '.jpg', '.jpeg', '.gif'];\r\n\r\n// to reuse existing test coverage, still keep class format\r\nexport class ImageFilePicker extends React.PureComponent {\r\n onFileReadInternal = (selectedFiles) => {\r\n const { onFileRead } = this.props;\r\n\r\n return Promise.map(\r\n selectedFiles,\r\n fileObj => readFileAsDataURLAsync(fileObj)\r\n ).then((imageSources) => {\r\n onFileRead(imageSources, selectedFiles);\r\n });\r\n };\r\n\r\n getReachFileSizeLimitErrorMessage = ({ fileSizeMB, maximumFileSizeMB }) => {\r\n const { enableMultiple, i18n } = this.props;\r\n let errorMsg;\r\n\r\n if (enableMultiple) {\r\n errorMsg = i18n.getString('ImageExperience_MultipleUpload_FileSize_TooBig', {\r\n maximumFileSize: maximumFileSizeMB,\r\n });\r\n } else {\r\n errorMsg = i18n.getString('ImageExperience_FileSize_Too_Big_Template', {\r\n fileSize: fileSizeMB,\r\n maximumFileSize: maximumFileSizeMB,\r\n });\r\n }\r\n\r\n return errorMsg;\r\n };\r\n\r\n showExtensionError = () => {\r\n const {\r\n i18n, showErrors, enableMultiple, isMultimediaAd, isAudienceAd,\r\n } = this.props;\r\n\r\n let errorLinkText;\r\n let errorTopic;\r\n\r\n if (isMultimediaAd) {\r\n errorLinkText = i18n.getString(_TL_('About multimedia ads'));\r\n errorTopic = 'app54810';\r\n } else if (isAudienceAd) {\r\n errorLinkText = i18n.getString('ImageExperience_BestPracticeHelp');\r\n errorTopic = 'app54718';\r\n } else {\r\n errorLinkText = i18n.getString(_TL_('About image guidelines and policies'));\r\n errorTopic = 'app54718';\r\n }\r\n\r\n showErrors([\r\n \r\n {i18n.getString(`ImageExperience_${enableMultiple ? 'MultipleUpload_' : ''}Error_MediaFormatNotSupported`)}\r\n \r\n ,\r\n ]);\r\n };\r\n\r\n render() {\r\n const {\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n onFileRead, minimumSize, maxUploadNum, ...rest\r\n } = this.props;\r\n const { i18n } = rest;\r\n let fileDraggerTip = maxUploadNum >= 0 ? i18n.getString('ImageExperience_Drag_File_Maximum_Upload_Num', { maxCount: maxUploadNum }) : '';\r\n if (!_.isUndefined(minimumSize) && _.isArray(minimumSize) && minimumSize.length > 1) {\r\n if (fileDraggerTip) {\r\n fileDraggerTip += ' ';\r\n }\r\n fileDraggerTip += i18n.getString('ImageExperience_Drag_File_Minimum_Size_Tip', { width: minimumSize[0], height: minimumSize[1] });\r\n }\r\n\r\n return (\r\n \r\n );\r\n }\r\n}\r\n\r\nImageFilePicker.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n parseDecimal: PropTypes.func.isRequired,\r\n }).isRequired,\r\n onFileRead: PropTypes.func.isRequired,\r\n isMultimediaAd: PropTypes.bool,\r\n isAudienceAd: PropTypes.bool,\r\n showErrors: PropTypes.func.isRequired,\r\n minimumSize: PropTypes.arrayOf(PropTypes.number),\r\n maxUploadNum: PropTypes.number,\r\n enableMultiple: PropTypes.bool,\r\n};\r\n\r\nImageFilePicker.defaultProps = {\r\n isMultimediaAd: false,\r\n isAudienceAd: false,\r\n minimumSize: [],\r\n maxUploadNum: -1,\r\n enableMultiple: false,\r\n};\r\n","import React from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { LearnMoreLink } from '@bingads-webui-campaign-react/help';\r\n\r\nimport { FilePicker } from './file-picker';\r\nimport { MaximumVideoFileSizeMB, allowedVideoFileExtensions } from '../utils/constants';\r\n\r\n// to reuse existing test coverage, still keep class format\r\nexport class VideoFilePicker extends React.PureComponent {\r\n onFileReadInternal = (selectedFiles) => {\r\n const { onFileRead, enableMultiple } = this.props;\r\n\r\n return onFileRead(enableMultiple ? selectedFiles: _.first(selectedFiles));\r\n };\r\n\r\n\r\n getReachFileSizeLimitErrorMessage = () => {\r\n const { i18n } = this.props;\r\n\r\n return i18n.getString(\r\n 'ImageExperience_Video_FileSize_Too_Big_Template',\r\n {\r\n maximumFileSize: MaximumVideoFileSizeMB / 1000,\r\n }\r\n );\r\n };\r\n\r\n showExtensionError = () => {\r\n const {\r\n i18n, showErrors, enableMultiple,\r\n } = this.props;\r\n\r\n const errorLinkText = i18n.getString('ImageExperience_BestPracticeHelp_Video');\r\n const errorTopic = 'app54794';\r\n\r\n showErrors([\r\n \r\n {i18n.getString(`ImageExperience_${enableMultiple ? 'MultipleUpload_' : ''}Error_MediaFormatNotSupported`)}\r\n \r\n ,\r\n ]);\r\n };\r\n\r\n render() {\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n const { onFileRead, enableMultiple, ...rest } = this.props;\r\n\r\n return (\r\n \r\n );\r\n }\r\n}\r\n\r\nVideoFilePicker.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n parseDecimal: PropTypes.func.isRequired,\r\n }).isRequired,\r\n enableMultiple: PropTypes.bool,\r\n onFileRead: PropTypes.func,\r\n showErrors: PropTypes.func.isRequired,\r\n};\r\n\r\nVideoFilePicker.defaultProps = {\r\n enableMultiple: false,\r\n onFileRead: _.noop,\r\n};\r\n","export const baseStyles = {\r\n imageItemBox: {\r\n marginBottom: '16px',\r\n marginRight: '16px',\r\n width: '298px',\r\n height: '274px',\r\n borderRadius: '4px',\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 overflow: 'hidden',\r\n },\r\n imageContent: {\r\n width: '100%',\r\n height: '200px',\r\n objectFit: 'contain',\r\n },\r\n};\r\n\r\nexport const uploadPreviewStyle = (_, { palette = {}, iconFontFamily = 'MsAds MDL2 Assets' }) => ({\r\n uploadPreviewContainer: {\r\n width: '100%',\r\n },\r\n uploadTitle: {\r\n fontFamily: 'Segoe UI',\r\n fontSize: '14px',\r\n lineHeight: '20px',\r\n color: palette.neutralSecondary,\r\n textAlign: 'center',\r\n },\r\n imagePreviewContainer: {\r\n marginTop: '16px',\r\n width: '100%',\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n maxHeight: '637px',\r\n overflowY: 'scroll',\r\n scrollBar: 'none',\r\n '&::-webkit-scrollbar': {\r\n width: '0',\r\n display: 'none',\r\n },\r\n },\r\n imageItemBox: {\r\n ...baseStyles.imageItemBox,\r\n backgroundColor: palette.neutralLighterAlt,\r\n },\r\n imageItemBoxRight: {\r\n marginRight: '0',\r\n },\r\n imageItemErrBox: {\r\n backgroundColor: '#FDE7E9', // hardcoded; not exported from fluent/theme package, but is used by fluent ui (see Messaging Colors)\r\n position: 'relative',\r\n },\r\n imageContent: {\r\n ...baseStyles.imageContent,\r\n },\r\n imageName: {\r\n marginTop: '12px',\r\n marginLeft: '18px',\r\n fontFamily: 'Segoe UI',\r\n fontSize: '14px',\r\n lineHeight: '20px',\r\n color: palette.neutralPrimary,\r\n width: '206px',\r\n overflow: 'hidden',\r\n whiteSpace: 'nowrap',\r\n textOverflow: 'ellipsis',\r\n },\r\n progressBox: {\r\n margin: '0 18px',\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n },\r\n progressLine: {\r\n marginTop: '8px',\r\n width: '206px',\r\n height: '2px',\r\n backgroundColor: palette.neutralLight,\r\n overflow: 'hidden',\r\n },\r\n statusIcon: {\r\n fontFamily: iconFontFamily,\r\n lineHeight: '16px',\r\n fontSize: 16,\r\n verticalAlign: 'middle',\r\n },\r\n completeIcon: {\r\n color: palette.green,\r\n display: 'block',\r\n '&:before': {\r\n content: '\"\\\\EC61\"',\r\n },\r\n transition: 'all 0.6s ease',\r\n },\r\n ongoingIcon: {\r\n color: palette.themePrimary,\r\n '&:before': {\r\n content: '\"\\\\E898\"',\r\n },\r\n },\r\n errorIcon: {\r\n position: 'absolute',\r\n bottom: '32px',\r\n right: '18px',\r\n color: '#A80000', // hardcoded; not exported from fluent/theme package, but is used by fluent ui (see Messaging Colors)\r\n '&:before': {\r\n content: '\"\\\\EA39\"',\r\n },\r\n },\r\n errorMsg: {\r\n marginTop: '8px',\r\n fontFamily: 'Segoe UI',\r\n fontSize: '12px',\r\n lineHeight: '16px',\r\n color: '#A80000', // hardcoded; not exported from fluent/theme package, but is used by fluent ui (see Messaging Colors)\r\n marginLeft: '18px',\r\n },\r\n imageSize: {\r\n marginTop: '2px',\r\n marginLeft: '18px',\r\n fontFamily: 'Segoe UI',\r\n fontSize: '12px',\r\n lineHeight: '16px',\r\n },\r\n});\r\n","import React, { useContext, useCallback, useMemo } from 'react';\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 { Progress } from '@bingads-webui-react/progress';\r\n\r\nimport { uploadPreviewStyle } from './styles/upload-assets-preview-style';\r\n\r\nexport const UploadPreviewWithCustomPreview = ({\r\n assetList,\r\n maxUploadNum,\r\n PreviewComponent,\r\n customClasses,\r\n showTitle,\r\n}) => {\r\n const classes = useDefaultStyles(uploadPreviewStyle);\r\n const i18n = useContext(I18nContext);\r\n\r\n const getFileSize = useCallback((fileSize) => {\r\n let size = fileSize;\r\n let fileSizeStr = '';\r\n if ((fileSize / 1024) < 1024) {\r\n size = fileSize / 1024;\r\n fileSizeStr = i18n.getString(_TL_('{{fileSize}} KB'), { fileSize: size.toFixed(2) });\r\n } else {\r\n size = fileSize / 1024 / 1024;\r\n fileSizeStr = i18n.getString(_TL_('{{fileSize}} MB'), { fileSize: size.toFixed(2) });\r\n }\r\n\r\n return fileSizeStr;\r\n }, [i18n]);\r\n\r\n const normalInfoBox = item => (\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
{getFileSize(item.size)}
\r\n
\r\n );\r\n\r\n const errorInfoBox = () => (\r\n
\r\n \r\n
{i18n.getString(_TL_('Upload failed. Maximum limit reached.'))}
\r\n
\r\n );\r\n\r\n const uploadTitle = i18n.getString(_TL_('Uploading {{uploadingNum}} files...'), { uploadingNum: maxUploadNum ? Math.min(maxUploadNum, assetList.length) : assetList.length });\r\n\r\n const previewComponentClasses = useMemo(() => ({\r\n imageContent: classnames(classes.imageContent, customClasses.imageContent),\r\n imageContentText: classnames(customClasses.imageContentText),\r\n }), [customClasses, classes]);\r\n\r\n return (\r\n assetList && assetList.length > 0 ?\r\n
\r\n {\r\n showTitle && (\r\n
\r\n {uploadTitle}\r\n
\r\n )\r\n }\r\n
\r\n {\r\n assetList.map((item, index) => {\r\n const exceedMaxUploadNum = maxUploadNum && index >= maxUploadNum;\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n const { progress, ...rest } = item;\r\n\r\n return (\r\n \r\n \r\n
{item.name}
\r\n {\r\n exceedMaxUploadNum ? errorInfoBox() : normalInfoBox(item)\r\n }\r\n
\r\n );\r\n })\r\n }\r\n
\r\n
: null\r\n );\r\n};\r\nUploadPreviewWithCustomPreview.propTypes = {\r\n assetList: PropTypes.arrayOf(PropTypes.shape({\r\n url: PropTypes.string,\r\n progress: PropTypes.number,\r\n name: PropTypes.string,\r\n size: PropTypes.number,\r\n })).isRequired,\r\n maxUploadNum: PropTypes.number,\r\n PreviewComponent: PropTypes.func.isRequired,\r\n customClasses: PropTypes.shape({}),\r\n showTitle: PropTypes.bool,\r\n};\r\n\r\nUploadPreviewWithCustomPreview.defaultProps = {\r\n customClasses: {},\r\n showTitle: true,\r\n maxUploadNum: undefined,\r\n};\r\n\r\nexport const SimpleImagePreview = ({ className, url, alt }) => (\r\n {alt}\r\n);\r\n\r\nSimpleImagePreview.propTypes = {\r\n className: PropTypes.string.isRequired,\r\n url: PropTypes.string.isRequired,\r\n alt: PropTypes.string.isRequired,\r\n};\r\n\r\nexport const UploadPreview = props => (\r\n \r\n);\r\n","/* eslint-disable max-len */\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { Progress, RadialProgress } from '@bingads-webui-react/progress';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { getCircleProgressStyle } from '@bingads-webui-campaign/shared-image-experience-styles';\r\n\r\nconst BarUploadProgress = (props) => {\r\n const uploadProcessText = `${((100 * props.uploadedBytes) / props.totalBytes).toFixed(1)} %`;\r\n\r\n return (\r\n
\r\n \r\n
{uploadProcessText}
\r\n
);\r\n};\r\n\r\nconst CircleUploadProgress = (props) => {\r\n const styles = useDefaultStyles(getCircleProgressStyle);\r\n return (\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport const UploadProgress = (props) => {\r\n switch (props.type) {\r\n case 'bar':\r\n return ;\r\n case 'circle':\r\n return ;\r\n default:\r\n return null;\r\n }\r\n};\r\n\r\nUploadProgress.propTypes = {\r\n totalBytes: PropTypes.number.isRequired,\r\n uploadedBytes: PropTypes.number.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n parseDecimal: PropTypes.func.isRequired,\r\n }).isRequired,\r\n type: PropTypes.string,\r\n};\r\n\r\nBarUploadProgress.propTypes = UploadProgress.propTypes;\r\nCircleUploadProgress.propTypes = UploadProgress.propTypes;\r\n\r\nUploadProgress.defaultProps = {\r\n type: 'bar',\r\n};\r\n","import { map } from 'underscore';\r\n\r\n// for uploading image during crud-ad workflow, there are additional\r\n// async operations needed after the asset upload to MT is complete\r\n// so the default boundary on the progress bar is set to 80% to account\r\n// for the additional time needed to process the image for crud-ad\r\nexport const defaultUploadProgressBoundary = 0.8;\r\n\r\n/**\r\n * Helper to update the state of the progress bar based on current upload progress\r\n * @param {function} setProgress - function to update progress of files being uploaded\r\n * @param {number} index - index of the image being uploading within the array of images\r\n * to be uploaded\r\n * @param {number} uploadProgressBoundary - custom upload progress boundary for use in cases\r\n * where the amount of processing happening after upload to MT is complete is different than\r\n * default case used by crud-ad workflow. 1 is 100% (show full progress bar when upload is done).\r\n * @returns {function} event handler function which will take an event with loaded/total properties\r\n * and update progress based on the loaded state\r\n */\r\nexport const updateProgress = ({ setProgress, index, uploadProgressBoundary }) => (evt) => {\r\n const boundary = uploadProgressBoundary || defaultUploadProgressBoundary;\r\n const progress = (evt.loaded / evt.total) * boundary;\r\n\r\n setProgress(index, progress);\r\n};\r\n\r\n/**\r\n * Helper to update the progress of files in the array of files to be uploaded. Returns\r\n * a function which can directly be passed into setState if maintaining previewImageArr\r\n * via class component state.\r\n * @param {number} index - index of the file being uploading within the array of files\r\n * to be uploaded\r\n * @param {number} progress - current progress of uploading.\r\n * @returns {function} takes array of files to be uploaded as argument, will update the\r\n * progress of the file specified by index in the upload preview array\r\n */\r\nexport const updateFilePreviewArrayUploadProgress = (index, progress) => ({ previewArr }) => {\r\n const newPreviewArr = map(previewArr, (previous, i) => {\r\n if (i === index) {\r\n return {\r\n ...previous,\r\n progress,\r\n };\r\n }\r\n return previous;\r\n });\r\n\r\n return { previewArr: newPreviewArr };\r\n};\r\n\r\n/**\r\n * Helper to generate an array of files to be uploaded with properties used by the\r\n * upload progress UI.\r\n * @param {array} selectedFiles - array containing file objects\r\n * @param {array} fileSources - array of file data encoded as string.\r\n * @param {array} parsedInfos - array of object containing parsed info of each file.\r\n * @returns {array} array of files to be uploaded with properties\r\n * url (file data encoded), progress (0 for now, will be updated as file starts uploading),\r\n * size, name\r\n */\r\nexport const generatePreviewArray = ({ files = [], fileSources, customizedOptions = [] }) => {\r\n const previewArr = map(fileSources, (source, index) => {\r\n const uploadInfo = {\r\n url: source,\r\n progress: 0,\r\n size: files[index] ? files[index].size : 0,\r\n name: files[index] ? files[index].name : '',\r\n ...(customizedOptions[index] || {}),\r\n };\r\n return uploadInfo;\r\n });\r\n\r\n return previewArr;\r\n};\r\n","import { validateImageSyncAsyncWithDimensionParams } from '@bingads-webui-campaign/image-experience-utils';\r\n\r\n// Put all validations in this package along with the view\r\nexport const validateImageAsync = ({\r\n imageSource,\r\n minimumWidth,\r\n minimumHeight,\r\n}) => validateImageSyncAsyncWithDimensionParams({\r\n imageSource,\r\n minimumWidth,\r\n minimumHeight,\r\n});\r\n\r\n// currently there is no client side check, so here leave an empty interface\r\nexport const validateVideoAsync = () => Promise.resolve(true);\r\n","import _ from 'underscore';\r\n\r\nconst defaultProtocols = [{\r\n value: 'https',\r\n text: 'https://',\r\n}, {\r\n value: 'http',\r\n text: 'http://',\r\n}];\r\n\r\nexport const buildUrl = ({ protocol = '', url = '', protocols = defaultProtocols } = {}) => {\r\n const prefix = (_.findWhere(\r\n protocols,\r\n { value: protocol }\r\n ) || { text: '' }).text;\r\n return `${prefix}${url}`;\r\n};\r\n","export const parseUrl = (url) => {\r\n const urlRegex = new RegExp('^(?:\\\\s*(?:(\\\\S+):\\\\/\\\\/)?(?:(.+))?)?', 'i');\r\n const regexResult = urlRegex.exec(url);\r\n return { protocol: regexResult && regexResult[1], url: regexResult && regexResult[2] };\r\n};\r\n","import _ from 'underscore';\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { AdapterFactory, withValidation, withError } from '@bingads-webui-react/validation';\r\nimport { Input, Select } from '@bingads-webui-react/primitive';\r\nimport { buildUrl } from './build-url';\r\nimport { parseUrl } from './parse-url';\r\n\r\nconst protocols = [{\r\n value: 'https',\r\n text: 'https://',\r\n}, {\r\n value: 'http',\r\n text: 'http://',\r\n}];\r\n\r\nexport class UrlEditor extends React.Component {\r\n static propTypes = {\r\n id: PropTypes.string,\r\n containerClassName: PropTypes.string,\r\n selectClassName: PropTypes.string,\r\n inputClassName: PropTypes.string,\r\n url: PropTypes.string,\r\n onChange: PropTypes.func.isRequired,\r\n protocols: PropTypes.arrayOf(PropTypes.shape({\r\n value: PropTypes.string.isRequired,\r\n text: PropTypes.string.isRequired,\r\n })),\r\n ariaProtocolLabelledBy: PropTypes.string,\r\n ariaUrlLabelledBy: PropTypes.string,\r\n ariaProtocolLabel: PropTypes.string,\r\n ariaUrlLabel: PropTypes.string,\r\n };\r\n\r\n static defaultProps = {\r\n id: undefined,\r\n containerClassName: undefined,\r\n selectClassName: undefined,\r\n inputClassName: undefined,\r\n url: '',\r\n protocols,\r\n ariaProtocolLabelledBy: undefined,\r\n ariaUrlLabelledBy: undefined,\r\n ariaProtocolLabel: undefined,\r\n ariaUrlLabel: undefined,\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n let { protocol, url } = parseUrl(props.url);\r\n protocol = protocol || _.first(props.protocols).value;\r\n url = url || '';\r\n this.state = { protocol, url };\r\n }\r\n\r\n onUrlChange = (url) => {\r\n this.props.onChange(url);\r\n }\r\n\r\n onUrlPartChange = (e) => {\r\n const rawInput = e.target.value;\r\n let { protocol, url } = parseUrl(rawInput);\r\n if (!protocol || (protocol && !_.findWhere(this.props.protocols, { value: protocol }))) {\r\n // ignoring not supported protocols\r\n // and keeping URL input's value\r\n protocol = null;\r\n url = rawInput;\r\n }\r\n\r\n const newUrl = url || '';\r\n const newProtocol = protocol || this.state.protocol;\r\n\r\n const fullUrl = url ? this.buildFullUrl({\r\n protocol: newProtocol,\r\n url: newUrl.trim(),\r\n }) : '';\r\n\r\n this.setState({ url: newUrl, protocol: newProtocol });\r\n this.onUrlChange(fullUrl);\r\n }\r\n\r\n onProtocolPartChange = (e) => {\r\n e.stopPropagation();\r\n const protocol = e.target.value;\r\n const url = this.state.url.trim();\r\n\r\n const fullUrl = url ? this.buildFullUrl({\r\n protocol,\r\n url,\r\n }) : '';\r\n\r\n this.setState({ protocol });\r\n this.onUrlChange(fullUrl);\r\n }\r\n\r\n buildFullUrl = ({ protocol, url }) => buildUrl({ protocol, url, protocols: this.props.protocols })\r\n\r\n render() {\r\n const { protocol, url } = this.state;\r\n\r\n return (\r\n
\r\n \r\n {this.props.protocols.map(option => (\r\n \r\n ))}\r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nconst UrlEditorValidationAdapter = AdapterFactory({\r\n valueToInject: 'url',\r\n});\r\n\r\nexport const UrlEditorWithValidation = withError(withValidation(\r\n UrlEditor,\r\n UrlEditorValidationAdapter\r\n));\r\n","import _ from 'underscore';\r\nimport React, { useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { UrlEditorWithValidation } from './url-editor';\r\n\r\nexport function UrlEditorForArray(props) {\r\n const [url, setUrl] = useState(_.first(props.value[props.field]));\r\n const urlSchema = {\r\n properties: {\r\n url: {\r\n ...props.schema.properties[props.field],\r\n type: 'string',\r\n },\r\n },\r\n };\r\n\r\n const onUrlChange = (newUrl) => {\r\n setUrl(newUrl);\r\n const urls = newUrl ? [newUrl] : [];\r\n props.onChange({\r\n [props.field]: urls,\r\n });\r\n };\r\n\r\n return (\r\n \r\n );\r\n}\r\n\r\nUrlEditorForArray.propTypes = {\r\n value: PropTypes.shape({}),\r\n onChange: PropTypes.func.isRequired,\r\n schema: PropTypes.shape({\r\n properties: PropTypes.shape({}),\r\n }).isRequired,\r\n field: PropTypes.string.isRequired,\r\n};\r\n\r\nUrlEditorForArray.defaultProps = {\r\n value: undefined,\r\n};\r\n","export const TARGET_TYPE = {\r\n Url: 'URL',\r\n PageTitle: 'PAGE_TITLE',\r\n PageContent: 'PAGE_CONTENT',\r\n Category: 'CATEGORY',\r\n CustomLabel: 'CUSTOM_LABEL',\r\n};\r\n\r\nexport const TARGET_TYPE_MAP = {\r\n URL: 'URL',\r\n PAGE_TITLE: 'Page title',\r\n PAGE_CONTENT: 'Page content',\r\n CATEGORY: 'Category',\r\n CUSTOM_LABEL: 'Custom label',\r\n};\r\n\r\nexport const CONDITION_OPERATOR = {\r\n Contains: 'Contains',\r\n Equals: 'Equals',\r\n};\r\n\r\nexport const RULE_SEPERATOR = ' ăƒ» ';\r\n\r\nexport const MAX_VALUE_LENGTH = 2048;\r\n\r\nexport const RULE_TYPE = {\r\n Url: 'URL',\r\n CustomLabel: 'CUSTOM_LABEL',\r\n};\r\n","import { TARGET_TYPE, TARGET_TYPE_MAP } from '../helpers/constants';\r\n\r\nexport const getTargetStrings = (rule) => {\r\n const firstTarget = rule.TargetCondition1;\r\n const isCustomLabel = firstTarget === TARGET_TYPE.CustomLabel;\r\n const values = isCustomLabel ? [`${TARGET_TYPE_MAP[firstTarget]}`] : [];\r\n\r\n [1, 2, 3].forEach((id) => {\r\n const target = rule[`TargetCondition${id}`];\r\n if (target) {\r\n const formattedValue = isCustomLabel ? `(${rule[`TargetValue${id}`]})` : `${TARGET_TYPE_MAP[target]} (${rule[`TargetValue${id}`]}) `;\r\n values.push(formattedValue);\r\n }\r\n });\r\n\r\n return isCustomLabel ? [values.join(' ')] : values;\r\n};\r\n\r\nexport const extractTargetsFromViewModel = assetGroupUrlRules => ({ urlTargets: assetGroupUrlRules.map(rule => getTargetStrings(rule)) });\r\n\r\nexport const isCategoryOrCustomLabel = (target) => target === TARGET_TYPE.Category || target === TARGET_TYPE.CustomLabel;\r\n\r\nexport const getPlaceHolderText = (i18n, selectedTargetType) => {\r\n switch (selectedTargetType) {\r\n case TARGET_TYPE.Url:\r\n return i18n.getString(_TL_('Enter URL rule'));\r\n case TARGET_TYPE.PageTitle:\r\n return i18n.getString(_TL_('Enter page title'));\r\n case TARGET_TYPE.PageContent:\r\n return i18n.getString(_TL_('Enter page content'));\r\n case TARGET_TYPE.Category:\r\n return i18n.getString(_TL_('Enter category'));\r\n case TARGET_TYPE.CustomLabel:\r\n return i18n.getString(_TL_('Enter custom label'));\r\n default:\r\n return '';\r\n }\r\n};\r\n\r\n","/* eslint-disable react/no-array-index-key, function-paren-newline, react/no-unused-prop-types */\r\nimport React, { useCallback, useState, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classnames from 'classnames';\r\nimport {\r\n Field,\r\n tokens,\r\n Button,\r\n Text,\r\n Input,\r\n Combobox,\r\n Option,\r\n Card,\r\n CardHeader,\r\n CardFooter,\r\n shorthands,\r\n} from '@fluentui/react-components';\r\nimport { Drawer, DrawerHeader, DrawerHeaderTitle, DrawerBody, DrawerFooter } from '@fluentui/react-drawer';\r\nimport { MessageBar, MessageBarBody } from '@fluentui/react-message-bar';\r\nimport { Dismiss24Regular, Add24Regular, Delete24Regular, Delete16Regular } from '@fluentui/react-icons';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport {\r\n TARGET_TYPE,\r\n TARGET_TYPE_MAP,\r\n CONDITION_OPERATOR,\r\n RULE_SEPERATOR,\r\n MAX_VALUE_LENGTH,\r\n RULE_TYPE,\r\n} from '../helpers/constants';\r\nimport { extractTargetsFromViewModel, getPlaceHolderText, getTargetStrings, isCategoryOrCustomLabel } from '../helpers/utils';\r\n\r\nexport const getUrlRulesEditorStyle = () => ({\r\n rulesInputInnerContainer: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n padding: '0px',\r\n '& .target-dropdown': {\r\n minWidth: '161px',\r\n height: '32px',\r\n },\r\n '& .conditions': {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'flex-end',\r\n gap: '12px',\r\n marginLeft: '12px',\r\n },\r\n '& .condition': {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n gap: '12px',\r\n '& .operator': {\r\n paddingTop: '6px',\r\n minWidth: '60px',\r\n },\r\n },\r\n '& .validated-input': {\r\n width: '231px',\r\n '& .ms-TextField-fieldGroup': {\r\n borderRadius: '4px',\r\n },\r\n },\r\n },\r\n\r\n cardHeader: {\r\n borderBottom: '1px solid var(--colorNeutralStroke1)',\r\n paddingBottom: tokens.spacingVerticalS,\r\n marginBottom: tokens.spacingVerticalS,\r\n },\r\n\r\n verticalSpacing: {\r\n ...shorthands.margin(tokens.spacingVerticalS, '0'),\r\n },\r\n\r\n rulesListItem: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n gap: tokens.spacingHorizontalXS,\r\n },\r\n\r\n ruleCard: {\r\n flex: 1,\r\n width: '100%',\r\n },\r\n});\r\n\r\nexport const UrlRulesEditor = ({ i18n, urlRules, onChange, isOpen, onClose }) => {\r\n const styles = useDefaultStyles(getUrlRulesEditorStyle);\r\n\r\n const [newAssetGroupUrlRules, setNewAssetGroupUrlRules] = useState(urlRules || []);\r\n const [conditions, setConditions] = useState([{ target: TARGET_TYPE.Url }]);\r\n const [errorMessages, setErrorMessages] = useState([]);\r\n\r\n const { urlTargets } = useMemo(() => extractTargetsFromViewModel(newAssetGroupUrlRules), [newAssetGroupUrlRules]);\r\n const isCustomLabelType = useMemo(() => conditions[0].target === TARGET_TYPE.CustomLabel, [conditions[0].target]);\r\n const isAnyConditionEmpty = useMemo(() => conditions.some(({ condition = '' }) => !condition.trim().length), [conditions]);\r\n\r\n const onAddRuleButtonClick = useCallback(() => {\r\n setConditions([...conditions, { target: isCustomLabelType ? TARGET_TYPE.CustomLabel : TARGET_TYPE.Url }]);\r\n }, [conditions, setConditions, isCustomLabelType]);\r\n\r\n const onCreateRuleButtonClick = useCallback(() => {\r\n setConditions([{ target: TARGET_TYPE.Url, condition: '' }]);\r\n\r\n const rule = {};\r\n conditions.forEach(({ target, condition }, index) => {\r\n const trimmedCondition = condition.trim();\r\n if (!trimmedCondition) return;\r\n rule[`TargetCondition${index + 1}`] = target;\r\n rule[`TargetConditionOperator${index + 1}`] = isCategoryOrCustomLabel(target) ? CONDITION_OPERATOR.Equals : CONDITION_OPERATOR.Contains;\r\n rule[`TargetValue${index + 1}`] = trimmedCondition;\r\n });\r\n\r\n const ruleAlreadyExists = newAssetGroupUrlRules.some((existingRule) =>\r\n Object.keys(rule).length === Object.keys(existingRule).length &&\r\n Object.keys(rule).every((key) => existingRule[key] === rule[key])\r\n );\r\n if (ruleAlreadyExists) return;\r\n\r\n setNewAssetGroupUrlRules([...newAssetGroupUrlRules, rule]);\r\n }, [conditions, newAssetGroupUrlRules]);\r\n\r\n const targetTypeDropdownOptions = useMemo(() => [\r\n { key: TARGET_TYPE.Url, text: i18n.getString(_TL_('URL')), type: RULE_TYPE.Url },\r\n { key: TARGET_TYPE.PageTitle, text: i18n.getString(_TL_('Page title')), type: RULE_TYPE.Url },\r\n { key: TARGET_TYPE.PageContent, text: i18n.getString(_TL_('Page content')), type: RULE_TYPE.Url },\r\n { key: TARGET_TYPE.Category, text: i18n.getString(_TL_('Category')), type: RULE_TYPE.Url },\r\n { key: TARGET_TYPE.CustomLabel, text: i18n.getString(_TL_('Custom Label')), type: RULE_TYPE.CustomLabel },\r\n ], [i18n]);\r\n\r\n const updateValue = (value, index) => {\r\n const newConditions = [...conditions];\r\n newConditions[index] = { ...newConditions[index], condition: value };\r\n setConditions(newConditions);\r\n\r\n let validationMessage = '';\r\n if (value.length > MAX_VALUE_LENGTH) {\r\n validationMessage = i18n.getString(_TL_('Field should not exceed {{maxLength}} characters'), { maxLength: MAX_VALUE_LENGTH });\r\n }\r\n\r\n setErrorMessages((prevMessages) => {\r\n const newErrorMessages = [...prevMessages];\r\n newErrorMessages[index] = validationMessage;\r\n return newErrorMessages;\r\n });\r\n };\r\n\r\n const renderMessageBar = useCallback(() => (\r\n \r\n \r\n { i18n.getString(_TL_(\"URL condition types and custom labels can't be combined in the same rule.\")) }\r\n \r\n \r\n ), [i18n]);\r\n\r\n const renderTargetTypeDropdownOptions = useCallback(() => targetTypeDropdownOptions.map((option) => (\r\n \r\n )), [targetTypeDropdownOptions]);\r\n\r\n const renderTargetTypeDropdownOptionsByType = useCallback((type) => targetTypeDropdownOptions.map((option) => (\r\n \r\n )), [targetTypeDropdownOptions]);\r\n\r\n const renderRulesInput = useCallback(() => {\r\n const conditionInput = conditions.map(({ target, condition = '' }, index) => (\r\n
\r\n {\r\n const newConditions = [...conditions];\r\n newConditions[index] = { ...newConditions[index], target: data.optionValue };\r\n setConditions(newConditions);\r\n }}\r\n >\r\n {conditions.length === 1 && renderTargetTypeDropdownOptions()}\r\n {conditions.length > 1 && renderTargetTypeDropdownOptionsByType(isCustomLabelType ? RULE_TYPE.CustomLabel : RULE_TYPE.Url)}\r\n \r\n\r\n {isCategoryOrCustomLabel(target) ? i18n.getString(_TL_('is')) : i18n.getString(_TL_('contains'))}\r\n\r\n
\r\n \r\n updateValue(event.target.value, index)}\r\n />\r\n \r\n
\r\n\r\n }\r\n onClick={() => {\r\n if (conditions.length === 1) {\r\n setConditions([{ target: TARGET_TYPE.Url }]);\r\n } else {\r\n const newConditions = [...conditions];\r\n newConditions.splice(index, 1);\r\n setConditions(newConditions);\r\n }\r\n }}\r\n />\r\n
\r\n ));\r\n\r\n return (\r\n
\r\n
\r\n { conditionInput }\r\n
\r\n
\r\n );\r\n }, [conditions, styles.rulesInputInnerContainer, targetTypeDropdownOptions, renderTargetTypeDropdownOptions, isCustomLabelType, i18n, errorMessages]);\r\n\r\n const removeTargetTag = useCallback((targetString) => {\r\n const newRules = newAssetGroupUrlRules.filter((rule) => {\r\n return getTargetStrings(rule).join(RULE_SEPERATOR) !== targetString;\r\n });\r\n\r\n setNewAssetGroupUrlRules(newRules);\r\n }, [newAssetGroupUrlRules]);\r\n\r\n const renderTargets = useCallback((targets) => (\r\n <>\r\n {targets.map((target) => {\r\n const targetString = target.join(RULE_SEPERATOR);\r\n\r\n return (\r\n <>\r\n
\r\n \r\n {targetString}} />\r\n \r\n }\r\n onClick={() => removeTargetTag(targetString)}\r\n />\r\n
\r\n {i18n.getString(_TL_('Or'))}\r\n \r\n );\r\n })}\r\n \r\n ), [i18n, removeTargetTag]);\r\n\r\n const onSave = useCallback(() => {\r\n onChange({ AssetGroupUrlTargets: [...newAssetGroupUrlRules] });\r\n onClose();\r\n }, [newAssetGroupUrlRules, onChange, onClose]);\r\n\r\n const renderDrawerFooter = useCallback(() => (\r\n <>\r\n \r\n \r\n \r\n ), [i18n, onClose, onSave]);\r\n\r\n return (\r\n <>\r\n \r\n \r\n }\r\n onClick={onClose}\r\n />\r\n }\r\n >\r\n {i18n.getString(_TL_('Create URL rules'))}\r\n \r\n \r\n {i18n.getString(_TL_('Specify pages with URLs that contain a certain piece of text to target specific content, and use custom labels to define subsets of your page feeds for more precise and effective advertising campaigns.'))}\r\n \r\n
{renderMessageBar()}
\r\n
\r\n \r\n {renderTargets(urlTargets)}\r\n\r\n \r\n {i18n.getString(_TL_('Rule'))}} />\r\n {renderRulesInput()}\r\n \r\n }\r\n onClick={onAddRuleButtonClick}\r\n disabled={conditions.length > 2}\r\n >\r\n {i18n.getString(_TL_('And'))}\r\n \r\n \r\n \r\n\r\n
\r\n }\r\n onClick={onCreateRuleButtonClick}\r\n disabled={isAnyConditionEmpty || errorMessages.some(messages => messages?.length > 0)}\r\n >\r\n {i18n.getString(_TL_('Create another rule'))}\r\n \r\n
\r\n
\r\n \r\n {renderDrawerFooter()}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nUrlRulesEditor.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n urlRules: PropTypes.arrayOf(PropTypes.shape({\r\n Id: PropTypes.string,\r\n TargetCondition1: PropTypes.string,\r\n TargetConditionOperator1: PropTypes.string,\r\n TargetValue1: PropTypes.string,\r\n TargetCondition2: PropTypes.string,\r\n TargetConditionOperator2: PropTypes.string,\r\n TargetValue2: PropTypes.string,\r\n TargetCondition3: PropTypes.string,\r\n TargetConditionOperator3: PropTypes.string,\r\n TargetValue3: PropTypes.string,\r\n })),\r\n onChange: PropTypes.func.isRequired,\r\n onClose: PropTypes.func.isRequired,\r\n isOpen: PropTypes.bool.isRequired,\r\n enableSpecialCharactersValidation: PropTypes.bool,\r\n};\r\n\r\nUrlRulesEditor.defaultProps = {\r\n urlRules: [],\r\n enableSpecialCharactersValidation: false,\r\n};\r\n","import React, { useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n Overflow,\r\n OverflowItem,\r\n tokens,\r\n useOverflowMenu,\r\n makeStyles,\r\n} from '@fluentui/react-components';\r\nimport { Tag } from '@fluentui/react-tags';\r\nimport { RULE_SEPERATOR } from './helpers/constants';\r\nimport { extractTargetsFromViewModel } from './helpers/utils';\r\n\r\n/**\r\n * There's a known bug that fluentui/react-overflow doesn't take gap of the overflow container\r\n * and margin of overflow item into account and cause weird styling issues.\r\n * https://github.com/microsoft/fluentui/issues/23066\r\n */\r\nconst useUrlRulesPreviewStyles = makeStyles({\r\n overflowItem: {\r\n marginBottom: tokens.spacingVerticalXS,\r\n },\r\n overflowCount: {\r\n marginLeft: tokens.spacingHorizontalXS,\r\n },\r\n tag: {\r\n marginRight: tokens.spacingHorizontalXS,\r\n },\r\n});\r\n\r\nconst MIN_VISIBLE_ROWS = 3;\r\n\r\nconst OverflowPlaceholder = () => {\r\n const styles = useUrlRulesPreviewStyles();\r\n const { ref, overflowCount, isOverflowing } = useOverflowMenu();\r\n if (!isOverflowing) {\r\n return null;\r\n }\r\n\r\n return (+{overflowCount});\r\n};\r\n\r\nexport const UrlRulesPreview = (props) => {\r\n const { urlRules, isSingleRow } = props;\r\n\r\n const styles = useUrlRulesPreviewStyles();\r\n\r\n const { urlTargets } = useMemo(() => extractTargetsFromViewModel(urlRules), [urlRules]);\r\n\r\n const renderPreview = useCallback(() => {\r\n return (\r\n \r\n
\r\n { urlTargets.map((target, index) => {\r\n const targetString = target.join(RULE_SEPERATOR);\r\n return (\r\n \r\n
\r\n {targetString}\r\n { (index === MIN_VISIBLE_ROWS - 1) && }\r\n
\r\n
\r\n );\r\n }) }\r\n
\r\n
\r\n );\r\n }, [styles, urlTargets]);\r\n\r\n const renderPreviewRow = useCallback(() => (\r\n \r\n
\r\n { urlTargets.map((target) => {\r\n const targetString = target.join(RULE_SEPERATOR);\r\n return (\r\n \r\n {targetString}\r\n \r\n );\r\n }) }\r\n \r\n
\r\n
\r\n ), [styles, urlTargets]);\r\n\r\n return (\r\n
\r\n { isSingleRow ? renderPreviewRow() : renderPreview() }\r\n
\r\n );\r\n};\r\n\r\nUrlRulesPreview.propTypes = {\r\n urlRules: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n isSingleRow: PropTypes.bool,\r\n};\r\n\r\n\r\nUrlRulesPreview.defaultProps = {\r\n isSingleRow: false,\r\n};\r\n","import React, { useCallback, useState, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n Button,\r\n Label,\r\n Text,\r\n tokens,\r\n makeStyles,\r\n} from '@fluentui/react-components';\r\nimport { UrlRulesEditor } from './side-panel/url-rules-editor';\r\nimport { UrlRulesPreview } from './url-rules-preview';\r\nimport { extractTargetsFromViewModel } from './helpers/utils';\r\n\r\nconst useUrlRulesStyles = makeStyles({\r\n title: {\r\n marginBottom: tokens.spacingVerticalXS,\r\n },\r\n urlRulesEditButton: {\r\n marginTop: tokens.spacingVerticalXS,\r\n },\r\n});\r\n\r\nexport const UrlRulesImpl = (props) => {\r\n const {\r\n i18n,\r\n urlRules,\r\n onChange,\r\n enableSpecialCharactersValidation,\r\n } = props;\r\n const styles = useUrlRulesStyles();\r\n\r\n const { urlTargets } = useMemo(() => extractTargetsFromViewModel(urlRules), [urlRules]);\r\n\r\n const [isUrlRulesEditorOn, setIsUrlRulesEditorOn] = useState(false);\r\n const onOpenUrlRulesEditor = useCallback(() => setIsUrlRulesEditorOn(true), []);\r\n const onCloseUrlRulesEditor = useCallback(() => setIsUrlRulesEditorOn(false), []);\r\n\r\n const renderEditor = useCallback(() => {\r\n if (isUrlRulesEditorOn) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n return null;\r\n }, [isUrlRulesEditorOn, i18n, urlRules, onChange, onCloseUrlRulesEditor, enableSpecialCharactersValidation]);\r\n\r\n const renderCreateRulesButton = useCallback(() => (\r\n
\r\n \r\n \r\n {(urlTargets.length > 0)\r\n ? i18n.getString(_TL_('Manage URL rules'))\r\n : i18n.getString(_TL_('Create URL rules'))}\r\n \r\n
\r\n ), [i18n, urlTargets.length, urlRules, onOpenUrlRulesEditor]);\r\n\r\n return (\r\n
\r\n \r\n { urlRules.length === 0 && {i18n.getString(_TL_('Your campaign will target all webpages'))} }\r\n {renderCreateRulesButton()}\r\n {renderEditor()}\r\n
\r\n );\r\n};\r\n\r\nUrlRulesImpl.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n urlRules: PropTypes.arrayOf(PropTypes.shape({\r\n Id: PropTypes.number,\r\n TargetCondition1: PropTypes.string,\r\n TargetConditionOperator1: PropTypes.string,\r\n TargetValue1: PropTypes.string,\r\n TargetCondition2: PropTypes.string,\r\n TargetConditionOperator2: PropTypes.string,\r\n TargetValue2: PropTypes.string,\r\n TargetCondition3: PropTypes.string,\r\n TargetConditionOperator3: PropTypes.string,\r\n TargetValue3: PropTypes.string,\r\n })),\r\n onChange: PropTypes.func.isRequired,\r\n enableSpecialCharactersValidation: PropTypes.bool,\r\n};\r\n\r\nUrlRulesImpl.defaultProps = {\r\n urlRules: [],\r\n enableSpecialCharactersValidation: false,\r\n};\r\n","import React, { useCallback, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { withCustomValidation } from '@bingads-webui-react/validation';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { UrlRulesImpl } from './url-rules-impl';\r\n\r\nconst UrlRules = ({ validationProps, updateValidation, enableSpecialCharactersValidation }) => {\r\n const activity = useContext(ActivityContext);\r\n const i18n = useContext(I18nContext);\r\n const { data: { urlRules } } = validationProps;\r\n const onChange = useCallback((newData) => {\r\n updateValidation([], newData);\r\n if (activity) {\r\n activity.signal(`onAssetGroupUrlRulesChange - ${JSON.stringify(newData)}`);\r\n }\r\n }, [updateValidation, activity]);\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nUrlRules.propTypes = {\r\n validationProps: PropTypes.shape({\r\n data: PropTypes.shape({\r\n urlRules: PropTypes.arrayOf(PropTypes.shape({\r\n Id: PropTypes.number,\r\n TargetCondition1: PropTypes.string,\r\n TargetConditionOperator1: PropTypes.string,\r\n TargetValue1: PropTypes.string,\r\n TargetCondition2: PropTypes.string,\r\n TargetConditionOperator2: PropTypes.string,\r\n TargetValue2: PropTypes.string,\r\n TargetCondition3: PropTypes.string,\r\n TargetConditionOperator3: PropTypes.string,\r\n TargetValue3: PropTypes.string,\r\n })),\r\n }),\r\n }).isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n enableSpecialCharactersValidation: PropTypes.bool,\r\n};\r\n\r\nUrlRules.defaultProps = {\r\n enableSpecialCharactersValidation: false,\r\n};\r\n\r\nexport const ValidatedUrlRules = withCustomValidation(UrlRules);\r\n","import React, { useCallback } from 'react';\r\nimport { PropTypes } from 'prop-types';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { first, isEmpty } from 'underscore';\r\nimport { getDomain } from '@bingads-webui/url-util';\r\nimport { extractTargetsFromViewModel } from './helpers/utils';\r\nimport { UrlRulesPreview } from './url-rules-preview';\r\n\r\nconst getSummaryStyle = () => ({\r\n advancedUrlOptionsSummaryContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n gap: '8px',\r\n },\r\n});\r\n\r\nexport const UrlOptionsDetailsWithRules = ({\r\n i18n, finalUrls, path1, path2, mobileFinalUrls, urlRules,\r\n}) => {\r\n const styles = useDefaultStyles(getSummaryStyle);\r\n\r\n const finalUrl = first(finalUrls);\r\n const mobileFinalUrl = first(mobileFinalUrls);\r\n let displayUrl = '';\r\n if (!isEmpty(path1)) {\r\n const finalUrlDomain = getDomain(finalUrl) || 'www.example.com';\r\n displayUrl = `${finalUrlDomain}/${path1}`;\r\n if (!isEmpty(path2)) {\r\n displayUrl = `${displayUrl}/${path2}`;\r\n }\r\n }\r\n const noDisplayUrl = isEmpty(displayUrl);\r\n const noMboileUrl = isEmpty(mobileFinalUrl);\r\n const noUrlRules = isEmpty(urlRules);\r\n const noSettingsApplied = noDisplayUrl && noMboileUrl && noUrlRules;\r\n\r\n let urlPathText = '';\r\n if (noSettingsApplied) {\r\n urlPathText = i18n.getString(_TL_('No URL settings applied'));\r\n } else {\r\n if (!noDisplayUrl) {\r\n urlPathText += `${i18n.getString(_TL_('Display URL'))}: ${displayUrl}`;\r\n }\r\n if (!noMboileUrl) {\r\n if (urlPathText.length > 0) {\r\n urlPathText += '; '; // Add separator if there are details before\r\n }\r\n urlPathText += `${i18n.getString(_TL_('Mobile URL'))}: ${mobileFinalUrl}`;\r\n }\r\n }\r\n\r\n const { urlTargets } = extractTargetsFromViewModel(urlRules || []);\r\n\r\n const renderRulesSummary = useCallback(() => {\r\n if (urlRules.length === 0) {\r\n return ({i18n.getString(_TL_('No URL rules set'))});\r\n }\r\n return (\r\n <>\r\n {i18n.getString(_TL_('URL rules and custom labels'))}:\r\n \r\n \r\n );\r\n }, [urlRules, i18n, urlTargets]);\r\n\r\n return (\r\n
\r\n {urlPathText}\r\n { !noSettingsApplied && renderRulesSummary() }\r\n
\r\n );\r\n};\r\n\r\nUrlOptionsDetailsWithRules.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n finalUrls: PropTypes.arrayOf(PropTypes.string),\r\n path1: PropTypes.string,\r\n path2: PropTypes.string,\r\n mobileFinalUrls: PropTypes.arrayOf(PropTypes.string),\r\n urlRules: PropTypes.arrayOf(PropTypes.shape({})),\r\n};\r\n\r\nUrlOptionsDetailsWithRules.defaultProps = {\r\n finalUrls: [],\r\n path1: '',\r\n path2: '',\r\n mobileFinalUrls: [],\r\n urlRules: [],\r\n};\r\n","export const URL_RULES_OPTIONS = {\r\n All: 'all',\r\n Rules: 'rules',\r\n Labels: 'labels',\r\n};\r\n\r\nexport const TARGET_TYPE = {\r\n Url: 'URL',\r\n PageTitle: 'PAGE_TITLE',\r\n PageContent: 'PAGE_CONTENT',\r\n Category: 'CATEGORY',\r\n CustomLabel: 'CUSTOM_LABEL',\r\n};\r\n\r\nexport const CONDITION_OPERATOR = {\r\n Contains: 'Contains',\r\n};\r\n\r\nexport const INPUT_VALIDATION_SCHEMA = {\r\n name: 'Url Rule Input',\r\n type: 'object',\r\n properties: {\r\n ruleInput1: {\r\n type: 'string',\r\n maxLength: 2048,\r\n },\r\n ruleInput2: {\r\n type: 'string',\r\n maxLength: 2048,\r\n },\r\n ruleInput3: {\r\n type: 'string',\r\n maxLength: 2048,\r\n },\r\n },\r\n};\r\n","import { get } from 'underscore';\r\nimport { TARGET_TYPE, URL_RULES_OPTIONS } from '../helpers/constants';\r\n\r\nexport const extractTargetsFromViewModel = (assetGroupUrlRules) => {\r\n const targetMapping = {\r\n [TARGET_TYPE.Url]: [],\r\n [TARGET_TYPE.PageTitle]: [],\r\n [TARGET_TYPE.PageContent]: [],\r\n [TARGET_TYPE.Category]: [],\r\n [TARGET_TYPE.CustomLabel]: [],\r\n };\r\n\r\n assetGroupUrlRules.forEach((rule) => {\r\n const type = get(rule, 'TargetCondition1', '');\r\n const values = [get(rule, 'TargetValue1', ''), get(rule, 'TargetValue2', ''), get(rule, 'TargetValue3', '')]\r\n .filter(Boolean);\r\n\r\n if (targetMapping[type]) {\r\n targetMapping[type].push(values);\r\n }\r\n });\r\n\r\n return {\r\n urlTargets: targetMapping[TARGET_TYPE.Url],\r\n pageTitleTargets: targetMapping[TARGET_TYPE.PageTitle],\r\n pageContentTargets: targetMapping[TARGET_TYPE.PageContent],\r\n categoryTargets: targetMapping[TARGET_TYPE.Category],\r\n customLabelTargets: targetMapping[TARGET_TYPE.CustomLabel],\r\n };\r\n};\r\n\r\nexport const getPlaceHolderText = (i18n, selectedTargetType) => {\r\n switch (selectedTargetType) {\r\n case TARGET_TYPE.Url:\r\n return i18n.getString(_TL_('Enter URL rule'));\r\n case TARGET_TYPE.PageTitle:\r\n return i18n.getString(_TL_('Enter page title'));\r\n case TARGET_TYPE.PageContent:\r\n return i18n.getString(_TL_('Enter page content'));\r\n case TARGET_TYPE.Category:\r\n return i18n.getString(_TL_('Enter category'));\r\n case TARGET_TYPE.CustomLabel:\r\n return i18n.getString(_TL_('Enter custom label'));\r\n default:\r\n return '';\r\n }\r\n};\r\n\r\nexport const getUrlRulesOption = (assetGroupUrlRules) => {\r\n const {\r\n urlTargets,\r\n pageTitleTargets,\r\n pageContentTargets,\r\n categoryTargets,\r\n customLabelTargets,\r\n } = extractTargetsFromViewModel(assetGroupUrlRules);\r\n\r\n let urlRulesOption = URL_RULES_OPTIONS.All;\r\n if (urlTargets.length > 0 || pageTitleTargets.length > 0 || pageContentTargets.length > 0 || categoryTargets.length > 0) {\r\n urlRulesOption = URL_RULES_OPTIONS.Rules;\r\n } else if (customLabelTargets.length > 0) {\r\n urlRulesOption = URL_RULES_OPTIONS.Labels;\r\n }\r\n return urlRulesOption;\r\n};\r\n","import React, { useState, useRef, useEffect } from 'react';\r\nimport Proptypes from 'prop-types';\r\nimport { Tooltip } from '@fluentui/react-components';\r\n\r\nexport const TagWithTooltip = ({ content }) => {\r\n const [isOverflow, setIsOverflow] = useState(false);\r\n const [isTooltipVisible, setIsTooltipVisible] = useState(false);\r\n\r\n const tagRef = useRef();\r\n\r\n useEffect(() => {\r\n if (tagRef.current) {\r\n setIsOverflow(tagRef.current.clientWidth < tagRef.current.scrollWidth);\r\n }\r\n }, []);\r\n\r\n return (\r\n setIsTooltipVisible(data.visible)}\r\n >\r\n \r\n {content}\r\n \r\n \r\n );\r\n};\r\n\r\nTagWithTooltip.propTypes = {\r\n content: Proptypes.string.isRequired,\r\n};\r\n","import React, { useCallback, useState, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classnames from 'classnames';\r\nimport { get } from 'underscore';\r\nimport {\r\n DefaultButton,\r\n PrimaryButton,\r\n IconButton,\r\n Panel,\r\n PanelType,\r\n Text,\r\n TextField,\r\n} from '@fluentui/react';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { ValidationGroup, withValidation } from '@bingads-webui-react/validation';\r\nimport {\r\n TARGET_TYPE,\r\n CONDITION_OPERATOR,\r\n INPUT_VALIDATION_SCHEMA,\r\n} from '../helpers/constants';\r\nimport { extractTargetsFromViewModel } from '../helpers/utils';\r\nimport { TagWithTooltip } from './tag-with-tooltips';\r\n\r\nconst ValidatedInput = withValidation(TextField);\r\n\r\nexport const getCustomLabelsEditorStyle = (_, { palette = {} }) => ({\r\n sectionsContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n '& .description': {\r\n marginTop: '12px',\r\n marginBottom: '12px',\r\n },\r\n '& .footer': {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n gap: '8px',\r\n },\r\n '& .create-rule-button': {\r\n width: 'fit-content',\r\n padding: '6px 12px',\r\n marginTop: '16px',\r\n marginBottom: '16px',\r\n border: '1px solid rgba(209, 209, 209, 1)',\r\n borderRadius: '4px',\r\n },\r\n '& button[disabled]': {\r\n backgroundColor: 'transparent',\r\n },\r\n },\r\n rulesInputOuterContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n gap: '12px',\r\n border: '1px solid rgba(225, 223, 221, 1)',\r\n borderRadius: '4px',\r\n padding: '16px',\r\n '& .add-rule-button': {\r\n width: 'fit-content',\r\n padding: '6px 12px',\r\n borderWidth: '0px',\r\n },\r\n },\r\n rulesInputInnerContainer: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n padding: '0px',\r\n '& .conditions': {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'flex-end',\r\n gap: '12px',\r\n width: '100%',\r\n },\r\n '& .condition': {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n gap: '12px',\r\n width: '100%',\r\n '& .operator': {\r\n paddingTop: '6px',\r\n minWidth: '100px',\r\n textAlign: 'right',\r\n flexShrink: 0,\r\n },\r\n },\r\n '& .input-container': {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n flexGrow: 1,\r\n },\r\n '& .validated-input': {\r\n width: '100%',\r\n '& .ms-TextField-fieldGroup': {\r\n borderRadius: '4px',\r\n },\r\n },\r\n '& .error-message': {\r\n color: palette.redDark,\r\n },\r\n },\r\n rulesResultContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n gap: '16px',\r\n borderTop: '1px solid rgba(237, 235, 233, 1)',\r\n '& .top-row': {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n justifyContent: 'space-between',\r\n alignItems: 'flex-start',\r\n marginTop: '12px',\r\n '& .title': {\r\n fontSize: '18px',\r\n fontWeight: '600',\r\n lineHeight: '24px',\r\n },\r\n '& .delete-all-button': {\r\n width: 'fit-content',\r\n padding: '6px 12px',\r\n borderWidth: '0px',\r\n },\r\n },\r\n '& .result-row': {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n gap: '8px',\r\n },\r\n '& .result-items': {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n flexWrap: 'wrap',\r\n gap: '4px',\r\n '& .result-item': {\r\n alignItems: 'normal',\r\n backgroundColor: '#F3F2F1',\r\n borderRadius: 3,\r\n display: 'flex',\r\n flexDirection: 'row',\r\n fontWeight: 600,\r\n '& button': {\r\n color: palette.neutralSecondary,\r\n height: 'auto',\r\n '& .ms-Icon': {\r\n fontSize: 12,\r\n },\r\n },\r\n '& .tagText': {\r\n maxWidth: '488px',\r\n overflow: 'hidden',\r\n textWrap: 'nowrap',\r\n textOverflow: 'ellipsis',\r\n padding: '4px 0px 4px 10px',\r\n },\r\n },\r\n },\r\n },\r\n});\r\n\r\nexport const CustomLabelsEditor = (props) => {\r\n const {\r\n i18n,\r\n urlRules,\r\n onChange,\r\n isOpen,\r\n onClose,\r\n } = props;\r\n\r\n const styles = useDefaultStyles(getCustomLabelsEditorStyle);\r\n\r\n const [newAssetGroupUrlRules, setNewAssetGroupUrlRules] = useState(urlRules || []);\r\n\r\n const { customLabelTargets } = useMemo(() => extractTargetsFromViewModel(newAssetGroupUrlRules), [newAssetGroupUrlRules]);\r\n\r\n const [conditions, setConditions] = useState(['']);\r\n const [errorMessages, setErrorMessages] = useState([]);\r\n\r\n const onAddRuleButtonClick = useCallback(() => {\r\n setConditions([...conditions, '']);\r\n }, [conditions, setConditions]);\r\n\r\n const onCreateRuleButtonClick = useCallback(() => {\r\n setConditions(['']);\r\n if (customLabelTargets.some(target => target.join(', ') === conditions.join(', '))) return;\r\n\r\n const rule = {};\r\n conditions.forEach((condition, index) => {\r\n const trimmedCondition = condition.trim();\r\n if (!trimmedCondition) return;\r\n rule[`TargetCondition${index + 1}`] = TARGET_TYPE.CustomLabel;\r\n rule[`TargetConditionOperator${index + 1}`] = CONDITION_OPERATOR.Contains;\r\n rule[`TargetValue${index + 1}`] = trimmedCondition;\r\n });\r\n setNewAssetGroupUrlRules([...newAssetGroupUrlRules, rule]);\r\n }, [conditions, customLabelTargets, newAssetGroupUrlRules]);\r\n\r\n const renderRulesInput = useCallback(() => {\r\n const conditionInput = conditions.map((condition, index) => (\r\n // eslint-disable-next-line react/no-array-index-key\r\n
\r\n { index === 0 ? i18n.getString(_TL_('Custom label is')) : i18n.getString(_TL_('And')) }\r\n
\r\n {\r\n const { data, messages } = result;\r\n const newInput = get(data, [`ruleInput${index + 1}`], '');\r\n const newConditions = [...conditions];\r\n newConditions[index] = newInput;\r\n setConditions(newConditions);\r\n const newErrorMessages = [...errorMessages];\r\n newErrorMessages[index] = messages;\r\n setErrorMessages(newErrorMessages);\r\n },\r\n }}\r\n placeholder={i18n.getString(_TL_('Enter custom label'))}\r\n value={condition}\r\n />\r\n { errorMessages[index] && errorMessages[index].map(message => ({message}))}\r\n
\r\n {\r\n if (conditions.length === 1) {\r\n setConditions(['']);\r\n } else {\r\n const newConditions = [...conditions];\r\n newConditions.splice(index, 1);\r\n setConditions(newConditions);\r\n }\r\n }}\r\n />\r\n
\r\n ));\r\n\r\n return (\r\n
\r\n
\r\n { conditionInput }\r\n
\r\n
\r\n );\r\n }, [conditions, errorMessages, i18n, styles.rulesInputInnerContainer]);\r\n\r\n const removeTargetTag = useCallback((targetType, targetString) => {\r\n const newRules = newAssetGroupUrlRules.filter((rule) => {\r\n const values = [\r\n get(rule, 'TargetValue1', ''),\r\n get(rule, 'TargetValue2', ''),\r\n get(rule, 'TargetValue3', ''),\r\n ].filter(Boolean).join(', ');\r\n return get(rule, 'TargetCondition1', '') !== targetType || values !== targetString;\r\n });\r\n setNewAssetGroupUrlRules(newRules);\r\n }, [newAssetGroupUrlRules]);\r\n\r\n const renderCustomLabelTargetTags = useCallback(() => (\r\n
\r\n {i18n.getString(_TL_('Label is:'))}\r\n
\r\n { customLabelTargets.map((target) => {\r\n const targetString = target.join(', ');\r\n return (\r\n
\r\n \r\n removeTargetTag(TARGET_TYPE.CustomLabel, targetString)}\r\n />\r\n
\r\n );\r\n })}\r\n
\r\n
\r\n ), [i18n, removeTargetTag, customLabelTargets]);\r\n\r\n const onSave = useCallback(() => {\r\n const customLabelRules = newAssetGroupUrlRules.filter((rule) => {\r\n const type = get(rule, 'TargetCondition1', '');\r\n return type === TARGET_TYPE.CustomLabel;\r\n });\r\n onChange({ AssetGroupUrlTargets: customLabelRules });\r\n onClose();\r\n }, [newAssetGroupUrlRules, onChange, onClose]);\r\n\r\n const renderPanelFooter = useCallback(() => (\r\n
\r\n \r\n \r\n
\r\n ), [i18n, onClose, onSave]);\r\n\r\n return (\r\n <>\r\n \r\n \r\n
\r\n {i18n.getString(_TL_('Add custom labels from your page feeds.'))}\r\n
\r\n
\r\n { renderRulesInput() }\r\n 2}\r\n />\r\n
\r\n messages.length > 0)}\r\n />\r\n { customLabelTargets.length > 0 && (\r\n
\r\n
\r\n {i18n.getString(_TL_('Custom labels'))}\r\n setNewAssetGroupUrlRules([])}\r\n />\r\n
\r\n { renderCustomLabelTargetTags() }\r\n
\r\n )}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nCustomLabelsEditor.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n urlRules: PropTypes.arrayOf(PropTypes.shape({\r\n Id: PropTypes.string,\r\n TargetCondition1: PropTypes.string,\r\n TargetConditionOperator1: PropTypes.string,\r\n TargetValue1: PropTypes.string,\r\n TargetCondition2: PropTypes.string,\r\n TargetConditionOperator2: PropTypes.string,\r\n TargetValue2: PropTypes.string,\r\n TargetCondition3: PropTypes.string,\r\n TargetConditionOperator3: PropTypes.string,\r\n TargetValue3: PropTypes.string,\r\n })),\r\n onChange: PropTypes.func.isRequired,\r\n onClose: PropTypes.func.isRequired,\r\n isOpen: PropTypes.bool.isRequired,\r\n};\r\n\r\nCustomLabelsEditor.defaultProps = {\r\n urlRules: [],\r\n};\r\n","import React, { useCallback, useState, useMemo } from 'react';\r\nimport { get } from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport classnames from 'classnames';\r\nimport {\r\n DefaultButton,\r\n PrimaryButton,\r\n IconButton,\r\n Panel,\r\n PanelType,\r\n Dropdown,\r\n Text,\r\n TextField,\r\n} from '@fluentui/react';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { ValidationGroup, withValidation } from '@bingads-webui-react/validation';\r\nimport {\r\n TARGET_TYPE,\r\n CONDITION_OPERATOR,\r\n INPUT_VALIDATION_SCHEMA,\r\n} from '../helpers/constants';\r\nimport { extractTargetsFromViewModel, getPlaceHolderText } from '../helpers/utils';\r\nimport { TagWithTooltip } from './tag-with-tooltips';\r\n\r\nconst ValidatedInput = withValidation(TextField);\r\n\r\nexport const getUrlRulesEditorStyle = (_, { palette = {} }) => ({\r\n sectionsContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n '& .description': {\r\n marginTop: '12px',\r\n marginBottom: '12px',\r\n },\r\n '& .footer': {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n gap: '8px',\r\n },\r\n '& .create-rule-button': {\r\n width: 'fit-content',\r\n padding: '6px 12px',\r\n marginTop: '16px',\r\n marginBottom: '16px',\r\n border: '1px solid rgba(209, 209, 209, 1)',\r\n borderRadius: '4px',\r\n },\r\n '& button[disabled]': {\r\n backgroundColor: 'transparent',\r\n },\r\n },\r\n rulesInputOuterContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n gap: '12px',\r\n border: '1px solid rgba(225, 223, 221, 1)',\r\n borderRadius: '4px',\r\n padding: '16px',\r\n '& .add-rule-button': {\r\n width: 'fit-content',\r\n padding: '6px 12px',\r\n borderWidth: '0px',\r\n },\r\n },\r\n rulesInputInnerContainer: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n padding: '0px',\r\n '& .target-dropdown': {\r\n minWidth: '161px',\r\n height: '32px',\r\n },\r\n '& .conditions': {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'flex-end',\r\n gap: '12px',\r\n marginLeft: '12px',\r\n },\r\n '& .condition': {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n gap: '12px',\r\n '& .operator': {\r\n paddingTop: '6px',\r\n },\r\n },\r\n '& .input-container': {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n },\r\n '& .validated-input': {\r\n width: '231px',\r\n '& .ms-TextField-fieldGroup': {\r\n borderRadius: '4px',\r\n },\r\n },\r\n '& .operator-text': {\r\n alignSelf: 'center',\r\n },\r\n '& .error-message': {\r\n color: palette.redDark,\r\n },\r\n },\r\n rulesResultContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n gap: '16px',\r\n borderTop: '1px solid rgba(237, 235, 233, 1)',\r\n '& .top-row': {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n justifyContent: 'space-between',\r\n alignItems: 'flex-start',\r\n marginTop: '12px',\r\n '& .title': {\r\n fontSize: '18px',\r\n fontWeight: '600',\r\n lineHeight: '24px',\r\n },\r\n '& .delete-all-button': {\r\n width: 'fit-content',\r\n padding: '6px 12px',\r\n borderWidth: '0px',\r\n },\r\n },\r\n '& .result-row': {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n gap: '8px',\r\n },\r\n '& .result-items': {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n flexWrap: 'wrap',\r\n gap: '4px',\r\n '& .result-item': {\r\n alignItems: 'normal',\r\n backgroundColor: '#F3F2F1',\r\n borderRadius: 3,\r\n display: 'flex',\r\n flexDirection: 'row',\r\n fontWeight: 600,\r\n '& button': {\r\n color: palette.neutralSecondary,\r\n height: 'auto',\r\n '& .ms-Icon': {\r\n fontSize: 12,\r\n },\r\n },\r\n '& .tagText': {\r\n maxWidth: '488px',\r\n overflow: 'hidden',\r\n textWrap: 'nowrap',\r\n textOverflow: 'ellipsis',\r\n padding: '4px 0px 4px 10px',\r\n },\r\n },\r\n },\r\n },\r\n optionText: {\r\n paddingLeft: '16px',\r\n },\r\n});\r\n\r\nexport const UrlRulesEditor = (props) => {\r\n const {\r\n i18n,\r\n urlRules,\r\n onChange,\r\n isOpen,\r\n onClose,\r\n enableSpecialCharactersValidation,\r\n } = props;\r\n\r\n const unsafeCharacterErrorMessage = i18n.getString(_TL_('Field should not contain invalid characters'));\r\n const doesUrlContainUnsafeCharacters = (url) => {\r\n const specialCharactersRegex = /[\\s<>{}]/;\r\n return specialCharactersRegex.test(url);\r\n };\r\n\r\n const styles = useDefaultStyles(getUrlRulesEditorStyle);\r\n\r\n const [newAssetGroupUrlRules, setNewAssetGroupUrlRules] = useState(urlRules || []);\r\n\r\n const {\r\n urlTargets,\r\n pageTitleTargets,\r\n pageContentTargets,\r\n categoryTargets,\r\n } = useMemo(() => extractTargetsFromViewModel(newAssetGroupUrlRules), [newAssetGroupUrlRules]);\r\n\r\n const [selectedTargetType, setSelectedTargetType] = useState(TARGET_TYPE.Url);\r\n const [conditions, setConditions] = useState(['']);\r\n const [errorMessages, setErrorMessages] = useState([]);\r\n\r\n const onAddRuleButtonClick = useCallback(() => {\r\n setConditions([...conditions, '']);\r\n }, [conditions, setConditions]);\r\n\r\n const onCreateRuleButtonClick = useCallback(() => {\r\n setConditions(['']);\r\n if (selectedTargetType === TARGET_TYPE.Url && urlTargets.some(target => target.join(', ') === conditions.join(', '))) return;\r\n if (selectedTargetType === TARGET_TYPE.PageTitle && pageTitleTargets.some(target => target.join(', ') === conditions.join(', '))) return;\r\n if (selectedTargetType === TARGET_TYPE.PageContent && pageContentTargets.some(target => target.join(', ') === conditions.join(', '))) return;\r\n if (selectedTargetType === TARGET_TYPE.Category && categoryTargets.some(target => target.join(', ') === conditions.join(', '))) return;\r\n\r\n const rule = {};\r\n conditions.forEach((condition, index) => {\r\n const trimmedCondition = condition.trim();\r\n if (!trimmedCondition) return;\r\n rule[`TargetCondition${index + 1}`] = selectedTargetType;\r\n rule[`TargetConditionOperator${index + 1}`] = CONDITION_OPERATOR.Contains;\r\n rule[`TargetValue${index + 1}`] = trimmedCondition;\r\n });\r\n\r\n setNewAssetGroupUrlRules([...newAssetGroupUrlRules, rule]);\r\n }, [categoryTargets, conditions, newAssetGroupUrlRules, pageContentTargets, pageTitleTargets, selectedTargetType, urlTargets]);\r\n\r\n const targetTypeDropdownOptions = useMemo(() => [\r\n { key: TARGET_TYPE.Url, text: i18n.getString(_TL_('URL')) },\r\n { key: TARGET_TYPE.PageTitle, text: i18n.getString(_TL_('Page title')) },\r\n { key: TARGET_TYPE.PageContent, text: i18n.getString(_TL_('Page content')) },\r\n { key: TARGET_TYPE.Category, text: i18n.getString(_TL_('Category')) },\r\n ], [i18n]);\r\n\r\n const renderTargetTypeDropdownOptions = useCallback(option => (\r\n {option.text}\r\n ), [styles.optionText]);\r\n\r\n const renderRulesInput = useCallback(() => {\r\n const conditionInput = conditions.map((condition, index) => (\r\n // eslint-disable-next-line react/no-array-index-key\r\n
\r\n { index === 0 ? i18n.getString(_TL_('contains')) : i18n.getString(_TL_('And')) }\r\n
\r\n {\r\n const { data, messages } = result;\r\n const newInput = get(data, [`ruleInput${index + 1}`], '');\r\n const newConditions = [...conditions];\r\n newConditions[index] = newInput;\r\n setConditions(newConditions);\r\n const newErrorMessages = [...errorMessages];\r\n enableSpecialCharactersValidation && doesUrlContainUnsafeCharacters(newInput) ? newErrorMessages[index] = [...messages, unsafeCharacterErrorMessage] : newErrorMessages[index] = messages;\r\n setErrorMessages(newErrorMessages);\r\n },\r\n }}\r\n placeholder={getPlaceHolderText(i18n, selectedTargetType)}\r\n value={condition}\r\n />\r\n { errorMessages[index] && errorMessages[index].map(message => ({message}))}\r\n
\r\n {\r\n if (conditions.length === 1) {\r\n setConditions(['']);\r\n } else {\r\n const newConditions = [...conditions];\r\n newConditions.splice(index, 1);\r\n setConditions(newConditions);\r\n }\r\n }}\r\n />\r\n
\r\n ));\r\n\r\n return (\r\n
\r\n setSelectedTargetType(data.key)}\r\n />\r\n
\r\n { conditionInput }\r\n
\r\n
\r\n );\r\n }, [conditions, styles.rulesInputInnerContainer, targetTypeDropdownOptions, renderTargetTypeDropdownOptions, selectedTargetType, i18n, errorMessages, enableSpecialCharactersValidation, unsafeCharacterErrorMessage]);\r\n\r\n const removeTargetTag = useCallback((targetType, targetString) => {\r\n const newRules = newAssetGroupUrlRules.filter((rule) => {\r\n const values = [\r\n get(rule, 'TargetValue1', ''),\r\n get(rule, 'TargetValue2', ''),\r\n get(rule, 'TargetValue3', ''),\r\n ].filter(Boolean).join(', ');\r\n return get(rule, 'TargetCondition1', '') !== targetType || values !== targetString;\r\n });\r\n setNewAssetGroupUrlRules(newRules);\r\n }, [newAssetGroupUrlRules]);\r\n\r\n const renderTargetTags = useCallback((label, targets, targetType) => (\r\n
\r\n {i18n.getString(_TL_('{{label}}'), { label })}\r\n
\r\n {targets.map((target) => {\r\n const targetString = target.join(', ');\r\n return (\r\n
\r\n \r\n removeTargetTag(targetType, targetString)}\r\n />\r\n
\r\n );\r\n })}\r\n
\r\n
\r\n ), [i18n, removeTargetTag]);\r\n\r\n const onSave = useCallback(() => {\r\n const newUrlRules = newAssetGroupUrlRules.filter((rule) => {\r\n const type = get(rule, 'TargetCondition1', '');\r\n return type !== TARGET_TYPE.CustomLabel;\r\n });\r\n onChange({ AssetGroupUrlTargets: newUrlRules });\r\n onClose();\r\n }, [newAssetGroupUrlRules, onChange, onClose]);\r\n\r\n const renderPanelFooter = useCallback(() => (\r\n
\r\n \r\n \r\n
\r\n ), [i18n, onClose, onSave]);\r\n\r\n return (\r\n <>\r\n \r\n \r\n
\r\n {i18n.getString(_TL_('Enter URLs or create rules to include non-commercial pages or sections of your website.'))}\r\n
\r\n
\r\n { renderRulesInput() }\r\n 2}\r\n />\r\n
\r\n messages.length > 0)}\r\n />\r\n {(urlTargets.length > 0 || pageTitleTargets.length > 0 || pageContentTargets.length > 0 || categoryTargets.length > 0)\r\n && (\r\n
\r\n
\r\n Included URL Rules\r\n setNewAssetGroupUrlRules([])}\r\n />\r\n
\r\n { urlTargets.length > 0 && renderTargetTags('URL includes:', urlTargets, TARGET_TYPE.Url) }\r\n { pageTitleTargets.length > 0 && renderTargetTags('Page title is:', pageTitleTargets, TARGET_TYPE.PageTitle) }\r\n { pageContentTargets.length > 0 && renderTargetTags('Page content is:', pageContentTargets, TARGET_TYPE.PageContent) }\r\n { categoryTargets.length > 0 && renderTargetTags('Category is:', categoryTargets, TARGET_TYPE.Category) }\r\n
\r\n )}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nUrlRulesEditor.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n urlRules: PropTypes.arrayOf(PropTypes.shape({\r\n Id: PropTypes.string,\r\n TargetCondition1: PropTypes.string,\r\n TargetConditionOperator1: PropTypes.string,\r\n TargetValue1: PropTypes.string,\r\n TargetCondition2: PropTypes.string,\r\n TargetConditionOperator2: PropTypes.string,\r\n TargetValue2: PropTypes.string,\r\n TargetCondition3: PropTypes.string,\r\n TargetConditionOperator3: PropTypes.string,\r\n TargetValue3: PropTypes.string,\r\n })),\r\n onChange: PropTypes.func.isRequired,\r\n onClose: PropTypes.func.isRequired,\r\n isOpen: PropTypes.bool.isRequired,\r\n enableSpecialCharactersValidation: PropTypes.bool,\r\n};\r\n\r\nUrlRulesEditor.defaultProps = {\r\n urlRules: [],\r\n enableSpecialCharactersValidation: false,\r\n};\r\n","import React, { useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n Overflow,\r\n OverflowItem,\r\n useOverflowMenu,\r\n makeStyles,\r\n shorthands,\r\n} from '@fluentui/react-components';\r\nimport { TARGET_TYPE } from './helpers/constants';\r\nimport { extractTargetsFromViewModel } from './helpers/utils';\r\nimport UrlsImage from './media/url.svg';\r\n\r\n/**\r\n * There's a known bug that fluentui/react-overflow doesn't take gap of the overflow container\r\n * and margin of overflow item into account and cause weird styling issues.\r\n * https://github.com/microsoft/fluentui/issues/23066\r\n */\r\nconst useUrlRulesPreviewStyles = makeStyles({\r\n previewContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n ...shorthands.margin('8px', '28px'),\r\n ...shorthands.gap('8px'),\r\n },\r\n previewRow: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n alignItems: 'center',\r\n ...shorthands.gap('4px'),\r\n flexWrap: 'nowrap',\r\n maxWidth: '95%',\r\n '& .icon': {\r\n paddingTop: '2px',\r\n },\r\n '& .row-label': {\r\n ...shorthands.padding('2px', '0px', '2px', '0px'),\r\n textWrap: 'nowrap',\r\n },\r\n },\r\n overflowContainer: {\r\n display: 'flex',\r\n flexWrap: 'nowrap',\r\n flexGrow: 1,\r\n minWidth: 0,\r\n maxWidth: '100%',\r\n overflowX: 'hidden',\r\n ...shorthands.gap('4px'),\r\n '& .tag': {\r\n flexShrink: 0,\r\n ...shorthands.padding('2px', '6px', '2px', '6px'),\r\n ...shorthands.borderRadius('4px'),\r\n backgroundColor: 'rgba(243, 242, 241, 1)',\r\n maxWidth: '160px',\r\n textOverflow: 'ellipsis',\r\n whiteSpace: 'nowrap',\r\n overflowX: 'hidden',\r\n },\r\n },\r\n});\r\n\r\nconst OverflowPlaceholder = () => {\r\n const { ref, overflowCount, isOverflowing } = useOverflowMenu();\r\n if (!isOverflowing) {\r\n return null;\r\n }\r\n return (+{overflowCount});\r\n};\r\n\r\nexport const UrlRulesPreview = (props) => {\r\n const {\r\n i18n,\r\n urlRules,\r\n conditions,\r\n titleText,\r\n } = props;\r\n\r\n const styles = useUrlRulesPreviewStyles();\r\n\r\n const {\r\n urlTargets,\r\n pageTitleTargets,\r\n pageContentTargets,\r\n categoryTargets,\r\n customLabelTargets,\r\n } = useMemo(() => extractTargetsFromViewModel(urlRules), [urlRules]);\r\n\r\n const renderPreviewRow = useCallback(({\r\n iconImg,\r\n description,\r\n targets,\r\n }) => (\r\n
\r\n { iconImg && \"Link }\r\n { description && {i18n.getString(_TL_('{{description}}'), { description })} }\r\n \r\n
\r\n { targets.map((target) => {\r\n const targetString = target.join(', ');\r\n return (\r\n \r\n {targetString}\r\n \r\n );\r\n }) }\r\n \r\n
\r\n
\r\n
\r\n ), [styles, i18n]);\r\n\r\n const renderPreviewRows = useCallback(() => conditions.map((condition) => {\r\n switch (condition) {\r\n case TARGET_TYPE.Url:\r\n return urlTargets.length > 0 ? renderPreviewRow({ iconImg: UrlsImage, description: 'URL contains', targets: urlTargets }) : null;\r\n case TARGET_TYPE.PageTitle:\r\n return pageTitleTargets.length > 0 ? renderPreviewRow({ iconImg: UrlsImage, description: 'Page title is', targets: pageTitleTargets }) : null;\r\n case TARGET_TYPE.PageContent:\r\n return pageContentTargets.length > 0 ? renderPreviewRow({ iconImg: UrlsImage, description: 'Page content contains', targets: pageContentTargets }) : null;\r\n case TARGET_TYPE.Category:\r\n return categoryTargets.length > 0 ? renderPreviewRow({ iconImg: UrlsImage, description: 'Category is', targets: categoryTargets }) : null;\r\n case TARGET_TYPE.CustomLabel:\r\n return customLabelTargets.length > 0 ? renderPreviewRow({ targets: customLabelTargets }) : null;\r\n default:\r\n return null;\r\n }\r\n }), [categoryTargets, conditions, customLabelTargets, pageContentTargets, pageTitleTargets, renderPreviewRow, urlTargets]);\r\n\r\n return (\r\n
\r\n {titleText}\r\n { renderPreviewRows() }\r\n
\r\n );\r\n};\r\n\r\nUrlRulesPreview.propTypes = {\r\n classes: PropTypes.shape({\r\n previewContainer: PropTypes.string,\r\n previewRow: PropTypes.string,\r\n overflowContainer: PropTypes.string,\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n urlRules: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n conditions: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n titleText: PropTypes.string.isRequired,\r\n};\r\n","import React, { useCallback, useState, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n Button,\r\n Label,\r\n Radio,\r\n RadioGroup,\r\n Text,\r\n makeStyles,\r\n mergeClasses,\r\n shorthands,\r\n} from '@fluentui/react-components';\r\nimport { CustomLabelsEditor } from './side-panel/custom-label-editor';\r\nimport { UrlRulesEditor } from './side-panel/url-rules-editor';\r\nimport { UrlRulesPreview } from './url-rules-preview';\r\nimport { extractTargetsFromViewModel } from './helpers/utils';\r\nimport { URL_RULES_OPTIONS, TARGET_TYPE } from './helpers/constants';\r\n\r\nconst useUrlRulesStyles = makeStyles({\r\n title: {\r\n marginBottom: '4px',\r\n },\r\n radioGroupContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n ...shorthands.gap('8px'),\r\n '& input[type=\"radio\"]': {\r\n height: '20px',\r\n width: '20px',\r\n ...shorthands.margin('0px'),\r\n },\r\n '& .fui-Radio__indicator': {\r\n height: '20px',\r\n width: '20px',\r\n ...shorthands.margin('0px'),\r\n },\r\n '& label': {\r\n ...shorthands.padding('0px', '0px', '0px', '8px'),\r\n },\r\n },\r\n radioOptionContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n ...shorthands.gap('4px'),\r\n '& .editButton': {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n justifyContent: 'flex-start',\r\n marginLeft: '16px',\r\n width: 'fit-content',\r\n color: 'var(--colorCompoundBrandForeground1, #0F6CBD)',\r\n },\r\n },\r\n radioOptionLabelContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n ...shorthands.gap('4px'),\r\n },\r\n});\r\n\r\nexport const UrlRulesImpl = (props) => {\r\n const {\r\n i18n,\r\n urlRules,\r\n urlRulesOption,\r\n onChange,\r\n enableSpecialCharactersValidation,\r\n } = props;\r\n const styles = useUrlRulesStyles();\r\n\r\n const targets = useMemo(() => extractTargetsFromViewModel(urlRules || []), [urlRules]);\r\n const {\r\n urlTargets,\r\n pageTitleTargets,\r\n pageContentTargets,\r\n categoryTargets,\r\n customLabelTargets,\r\n } = targets;\r\n\r\n const [isUrlRulesEditorOn, setIsUrlRulesEditorOn] = useState(false);\r\n const onOpenUrlRulesEditor = useCallback(() => setIsUrlRulesEditorOn(true), []);\r\n const onCloseUrlRulesEditor = useCallback(() => setIsUrlRulesEditorOn(false), []);\r\n const [isCustomLabelEditorOn, setIsCustomLabelEditorOn] = useState(false);\r\n const onOpenCustomLabelEditor = useCallback(() => setIsCustomLabelEditorOn(true), []);\r\n const onCloseCustomLabelEditor = useCallback(() => setIsCustomLabelEditorOn(false), []);\r\n\r\n const renderTargetAllOption = useCallback(() => (\r\n \r\n {i18n.getString(_TL_('Target all webpages'))}\r\n \r\n }\r\n />\r\n ), [i18n]);\r\n\r\n const renderUrlRulesOption = useCallback(() => (\r\n
\r\n \r\n {i18n.getString(_TL_('Specify URL rules to include'))}\r\n { urlRulesOption === URL_RULES_OPTIONS.Rules && {i18n.getString(_TL_('Send traffic to the most relevant URLs on your site when it’s likely to result in better performance.'))} }\r\n
\r\n }\r\n />\r\n { urlRulesOption === URL_RULES_OPTIONS.Rules && (urlTargets.length > 0 || pageTitleTargets.length > 0 || pageContentTargets.length > 0 || categoryTargets.length > 0) && (\r\n \r\n )}\r\n { urlRulesOption === URL_RULES_OPTIONS.Rules && (\r\n \r\n {(urlTargets.length > 0 || pageTitleTargets.length > 0 || pageContentTargets.length > 0 || categoryTargets.length > 0)\r\n ? i18n.getString(_TL_('Edit URL rules'))\r\n : i18n.getString(_TL_('Include URL rules'))}\r\n \r\n )}\r\n \r\n ), [styles.radioOptionContainer, styles.radioOptionLabelContainer, i18n, urlRulesOption, urlTargets.length, pageTitleTargets.length, pageContentTargets.length, categoryTargets.length, urlRules, onOpenUrlRulesEditor]);\r\n\r\n const renderCustomLabelsOption = useCallback(() => (\r\n
\r\n \r\n {i18n.getString(_TL_('Add custom labels to your URLs'))}\r\n { urlRulesOption === URL_RULES_OPTIONS.Labels && {i18n.getString(_TL_('Add custom labels from your page feeds to focus your ads on specific categories of pages.'))} }\r\n
\r\n }\r\n />\r\n { urlRulesOption === URL_RULES_OPTIONS.Labels && customLabelTargets.length > 0 && (\r\n \r\n )}\r\n { urlRulesOption === URL_RULES_OPTIONS.Labels && (\r\n \r\n {(customLabelTargets.length > 0)\r\n ? i18n.getString(_TL_('Edit custom labels'))\r\n : i18n.getString(_TL_('Include custom labels'))}\r\n \r\n )}\r\n \r\n ), [styles.radioOptionContainer, styles.radioOptionLabelContainer, i18n, urlRulesOption, customLabelTargets.length, urlRules, onOpenCustomLabelEditor]);\r\n\r\n const renderEditor = useCallback(() => {\r\n if (isUrlRulesEditorOn) {\r\n return (\r\n \r\n );\r\n } else if (isCustomLabelEditorOn) {\r\n return (\r\n \r\n );\r\n }\r\n return null;\r\n }, [isUrlRulesEditorOn, isCustomLabelEditorOn, i18n, urlRules, onChange, onCloseUrlRulesEditor, onCloseCustomLabelEditor, enableSpecialCharactersValidation]);\r\n\r\n const onRadioChange = useCallback((_, data) => onChange({ UrlRulesOption: data.value }), [onChange]);\r\n\r\n return (\r\n
\r\n \r\n \r\n {renderTargetAllOption()}\r\n {renderUrlRulesOption()}\r\n {renderCustomLabelsOption()}\r\n {renderEditor()}\r\n \r\n
\r\n );\r\n};\r\n\r\nUrlRulesImpl.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n urlRules: PropTypes.arrayOf(PropTypes.shape({\r\n Id: PropTypes.number,\r\n TargetCondition1: PropTypes.string,\r\n TargetConditionOperator1: PropTypes.string,\r\n TargetValue1: PropTypes.string,\r\n TargetCondition2: PropTypes.string,\r\n TargetConditionOperator2: PropTypes.string,\r\n TargetValue2: PropTypes.string,\r\n TargetCondition3: PropTypes.string,\r\n TargetConditionOperator3: PropTypes.string,\r\n TargetValue3: PropTypes.string,\r\n })).isRequired,\r\n urlRulesOption: PropTypes.string,\r\n onChange: PropTypes.func.isRequired,\r\n enableSpecialCharactersValidation: PropTypes.bool,\r\n};\r\n\r\nUrlRulesImpl.defaultProps = {\r\n urlRulesOption: URL_RULES_OPTIONS.All,\r\n enableSpecialCharactersValidation: false,\r\n};\r\n","import React, { useCallback, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { withCustomValidation } from '@bingads-webui-react/validation';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { UrlRulesImpl } from './url-rules-impl';\r\n\r\nconst UrlRules = ({ validationProps, updateValidation, enableSpecialCharactersValidation }) => {\r\n const activity = useContext(ActivityContext);\r\n const i18n = useContext(I18nContext);\r\n const { data: { urlRules, urlRulesOption } } = validationProps;\r\n const onChange = useCallback((newData) => {\r\n updateValidation([], newData);\r\n if (activity) {\r\n activity.signal(`onAssetGroupUrlRulesChange - ${JSON.stringify(newData)}`);\r\n }\r\n }, [updateValidation, activity]);\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nUrlRules.propTypes = {\r\n validationProps: PropTypes.shape({\r\n data: PropTypes.shape({\r\n urlRules: PropTypes.arrayOf(PropTypes.shape({\r\n Id: PropTypes.number,\r\n TargetCondition1: PropTypes.string,\r\n TargetConditionOperator1: PropTypes.string,\r\n TargetValue1: PropTypes.string,\r\n TargetCondition2: PropTypes.string,\r\n TargetConditionOperator2: PropTypes.string,\r\n TargetValue2: PropTypes.string,\r\n TargetCondition3: PropTypes.string,\r\n TargetConditionOperator3: PropTypes.string,\r\n TargetValue3: PropTypes.string,\r\n })),\r\n urlRulesOption: PropTypes.string,\r\n }),\r\n }).isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n enableSpecialCharactersValidation: PropTypes.bool,\r\n};\r\n\r\nUrlRules.defaultProps = {\r\n enableSpecialCharactersValidation: false,\r\n};\r\n\r\nexport const ValidatedUrlRules = withCustomValidation(UrlRules);\r\n","import React, { useCallback } from 'react';\r\nimport { PropTypes } from 'prop-types';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { first, get, isEmpty } from 'underscore';\r\nimport { getDomain } from '@bingads-webui/url-util';\r\n\r\nconst getSummaryStyle = () => ({\r\n advancedUrlOptionsSummaryContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n gap: '8px',\r\n },\r\n});\r\n\r\nconst TARGET_TYPE = {\r\n Url: 'URL',\r\n PageTitle: 'PAGE_TITLE',\r\n PageContent: 'PAGE_CONTENT',\r\n Category: 'CATEGORY',\r\n CustomLabel: 'CUSTOM_LABEL',\r\n};\r\n\r\nconst extractTargetsFromViewModel = (assetGroupUrlRules) => {\r\n const targetMapping = {\r\n [TARGET_TYPE.Url]: [],\r\n [TARGET_TYPE.PageTitle]: [],\r\n [TARGET_TYPE.PageContent]: [],\r\n [TARGET_TYPE.Category]: [],\r\n [TARGET_TYPE.CustomLabel]: [],\r\n };\r\n\r\n assetGroupUrlRules.forEach((rule) => {\r\n const type = get(rule, 'TargetCondition1', '');\r\n const values = [get(rule, 'TargetValue1', ''), get(rule, 'TargetValue2', ''), get(rule, 'TargetValue3', '')]\r\n .filter(Boolean);\r\n\r\n if (targetMapping[type]) {\r\n targetMapping[type].push(values);\r\n }\r\n });\r\n\r\n return {\r\n urlTargets: targetMapping[TARGET_TYPE.Url],\r\n pageTitleTargets: targetMapping[TARGET_TYPE.PageTitle],\r\n pageContentTargets: targetMapping[TARGET_TYPE.PageContent],\r\n categoryTargets: targetMapping[TARGET_TYPE.Category],\r\n customLabelTargets: targetMapping[TARGET_TYPE.CustomLabel],\r\n };\r\n};\r\n\r\nexport const UrlOptionsDetailsWithRules = ({\r\n i18n, finalUrls, path1, path2, mobileFinalUrls, urlRules,\r\n}) => {\r\n const styles = useDefaultStyles(getSummaryStyle);\r\n\r\n const finalUrl = first(finalUrls);\r\n const mobileFinalUrl = first(mobileFinalUrls);\r\n let displayUrl = '';\r\n if (!isEmpty(path1)) {\r\n const finalUrlDomain = getDomain(finalUrl) || 'www.example.com';\r\n displayUrl = `${finalUrlDomain}/${path1}`;\r\n if (!isEmpty(path2)) {\r\n displayUrl = `${displayUrl}/${path2}`;\r\n }\r\n }\r\n const noDisplayUrl = isEmpty(displayUrl);\r\n const noMboileUrl = isEmpty(mobileFinalUrl);\r\n const noUrlRules = isEmpty(urlRules);\r\n const noSettingsApplied = noDisplayUrl && noMboileUrl && noUrlRules;\r\n\r\n let urlPathText = '';\r\n if (noSettingsApplied) {\r\n urlPathText = i18n.getString(_TL_('No URL settings applied'));\r\n } else {\r\n if (!noDisplayUrl) {\r\n urlPathText += `${i18n.getString(_TL_('Display URL'))}: ${displayUrl}`;\r\n }\r\n if (!noMboileUrl) {\r\n if (urlPathText.length > 0) {\r\n urlPathText += '; '; // Add separator if there are details before\r\n }\r\n urlPathText += `${i18n.getString(_TL_('Mobile URL'))}: ${mobileFinalUrl}`;\r\n }\r\n }\r\n\r\n const {\r\n urlTargets, pageTitleTargets, pageContentTargets, categoryTargets, customLabelTargets,\r\n } = extractTargetsFromViewModel(urlRules || []);\r\n const renderRulesSummary = useCallback(() => {\r\n if (urlRules.length === 0) {\r\n return ({i18n.getString(_TL_('No URL rules set'))});\r\n }\r\n return (\r\n <>\r\n {urlTargets.length > 0 && {i18n.getString(_TL_('URL contains'))}: {urlTargets.map(target => target.join(', ')).join('; ')}; }\r\n {pageTitleTargets.length > 0 && {i18n.getString(_TL_('Page title is'))}: {pageTitleTargets.map(target => target.join(', ')).join('; ')}; }\r\n {pageContentTargets.length > 0 && {i18n.getString(_TL_('Page content contains'))}: {pageContentTargets.map(target => target.join(', ')).join('; ')}; }\r\n {categoryTargets.length > 0 && {i18n.getString(_TL_('Category is'))}: {categoryTargets.map(target => target.join(', ')).join('; ')}; }\r\n {customLabelTargets.length > 0 && {i18n.getString(_TL_('Custom label is'))}: {customLabelTargets.map(target => target.join(', ')).join('; ')}; }\r\n \r\n );\r\n }, [urlRules, i18n, urlTargets, pageTitleTargets, pageContentTargets, categoryTargets, customLabelTargets]);\r\n\r\n return (\r\n
\r\n {urlPathText}\r\n { !noSettingsApplied && renderRulesSummary() }\r\n
\r\n );\r\n};\r\n\r\nUrlOptionsDetailsWithRules.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n finalUrls: PropTypes.arrayOf(PropTypes.string),\r\n path1: PropTypes.string,\r\n path2: PropTypes.string,\r\n mobileFinalUrls: PropTypes.arrayOf(PropTypes.string),\r\n urlRules: PropTypes.arrayOf(PropTypes.shape({})),\r\n};\r\n\r\nUrlOptionsDetailsWithRules.defaultProps = {\r\n finalUrls: [],\r\n path1: '',\r\n path2: '',\r\n mobileFinalUrls: [],\r\n urlRules: [],\r\n};\r\n"],"names":["STATES","INIT","LOADING","RSA","NEEDS_RSA","RSA_LOADING","RSA_DONE","IMAGES","NEEDS_IMAGES","IMAGES_LOADING","IMAGES_DONE","TEXT_ADS","NEEDS_TEXT_ADS","TEXT_ADS_LOADING","TEXT_ADS_DONE","IMAGE_ADS","NEEDS_IMAGE_ADS","IMAGE_ADS_LOADING","IMAGE_ADS_DONE","BUDGET","NEEDS_TARGETS","TARGETS_LOADING","NEEDS_KEYWORDS","KEYWORDS_LOADING","BUDGET_LOADING","BUDGET_DONE","BI","BI_LOADING","BI_DONE","DONE","EVENTS","LOAD","START_OVER","defaultContext","flags","isRSADone","isTextAdsDone","isImageAdsDone","isImagesDone","isTargetsDone","isKeywordsDone","isBudgetDone","isBIDone","allDone","inputs","isSmartMode","isPMaxLite","url","undefined","language","categoryIds","outputs","actions","markRSADone","assign","context","_objectSpread","markTextAdsDone","markImageAdsDone","markImagesDone","markTargetsDone","markKeywordsDone","markBudgetDone","markBIDone","markAllFlagsDone","resetFlags","resetOutputs","updateInputs","event","_","updateOutputs","rsa","textAds","imageAds","images","targets","keywords","assignRSAData","data","assignTextAdsData","assignImageAdsData","assignImagesData","assignTargetsData","assignKeywordsData","assignBudgetData","budget","assignBIData","bi","machineConfig","id","initial","preserveActionOrder","predictableActionArguments","states","_defineProperty","on","target","type","always","cond","invoke","src","onDone","onError","entry","guards","needsRSA","needsTextAds","needsImageAds","needsImages","needsTargets","needsKeywords","services","loadBISuggestions","Promise","resolve","loadTextAdsSuggestions","loadImageAdsSuggestions","loadImagesSuggestions","loadKeywordsSuggestions","loadRSASuggestions","loadTargetsSuggestions","loadBudgetSuggestions","useSuggestionsService","serviceConfig","machine","useMemo","createMachine","machineWithServiceConfig","withConfig","defaultServices","_useMachine","useMachine","_useMachine2","_slicedToArray","state","send","service","useOnceEffect","callFn","_useState","useState","_useState2","called","setCalled","useEffect","WIZARD_EVENT_PREFIX","WIZARD_STEP_EVENT","APP_LOAD","START_FLOW","SWITCH_FLOW","ENTER_PAGE","COMPLETE","SINGLE_STEP_EVENT","USER_TRIGGER_STEP_EVENT","STEP_STATES","GOING_NEXT","GOING_BACK","EXITING","USER_TRIGGER_STEP_EVENT_KEYS","Object","keys","NoOpContext","logComplete","changedChannel","enteredPage","StepFlowContext","React","DEFAULT_EVENT_VALUE","useLogEnteredPage","_ref","Flow","_ref$SubFlow","SubFlow","Page","useContext","StepFlowProvider","_ref2","children","shouldPost","postEventLog","serverContext","ServerContext","instrumentation","InstrumentationContext","activity","stepFlowScenario","create","stepFlow","trace","error","triggerPostEventLog","shouldPostLog","_useStateWithPrevious","initialValue","setState","cache","useRef","useCallback","newValue","value","prev","current","useStateWithPrevious","_useStateWithPrevious2","_useStateWithPrevious3","setContext","prevContext","eventValues","postEventLogRef","postEvent","EventName","EventValue","concat","logValidationError","message","Complete","CID","AID","FromFlow","ToFlow","FromPage","ToPage","_jsx","Provider","defaultProps","BasicStepLogger","flow","subflow","propTypes","PropTypes","isRequired","StepLogger","stepToPage","useWizardService","currentStepId","getCurrentStepId","WizardStepLogger","writeLog","_jsxs","matchStepSubState","wizardState","stepSubState","stateArr","toStrings","length","includes","SingleStepLogger","Date","now","startTime","setStartTime","useFormService","isLoading","matches","FORM_STATES","isSaveSucceeded","SAVING_SUCCEEDED","isSaveFailed","SAVING_FAILED","_useState3","_useState4","trigger","setTrigger","key","triggerKey","triggerWriteLog","duration","StockImageDataService","_createClass","cid","aid","oDataConfig","controller","_classCallCheck","this","path","odataPath","oDataToken","odataToken","oDataTokenType","applicationName","odata","options","optionsWithDefault","top","skip","customQueries","query","$top","$skip","get","stockImageId","stockImageVendorId","post","Id","toString","StockImageVendor","queryToPredicates","$and","ShutterStockFilterInternal","_React$Component","props","_this","_callSuper","onQueryChange","_this$props","prevData","setData","currData","predicates","i18n","i18nLegacy","filterSchema","properties","people_model_released","name","filterable","title","getString","property","enum","localized","true","false","operatorDisplayNameMap","eq","operators","chooseType","people_ethnicity","african","african_american","black","brazilian","chinese","caucasian","east_asian","hispanic","japanese","middle_eastern","native_american","pacific_islander","south_asian","southeast_asian","other","people_gender","male","female","both","people_age","infants","teenagers","older","people_number","editableFilter","FilterEntity","entitySchema","_inherits","_this2","_this$props2","classes","popoverContainer","predicatesToQuery","updateQuery","className","filterContainer","I18nContext","Consumer","PredicateList","onApplySavedFilter","onDeleteFilters","selector","selectableFilter","onEditableFilterUpdate","onSelectableFilterUpdate","disallowDuplicateFilters","ShutterStockFilter","withDefaultStyles","getStockPhotoFilterStyle","StockImageFilter","onFilterQueryChange","setFilterQuery","keyValueQueryPairs","memo","predicate","_$keys","addedKeyValue","_$values","valuesArray","forEach","index","_valuesArray","getAdCreationPreviewStyle","AdCreationPreviewContainer","whiteSpace","width","border","borderRadius","padding","fontSize","lineHeight","color","alignItems","fontWeight","marginRight","marginTop","display","flexDirection","position","overflow","cursor","textDecoration","boxShadow","opacity","margin","backgroundColor","height","textAlign","verticalAlign","objectFit","objectPosition","wordWrap","maxWidth","right","bottom","ResponsiveSearchAdPreview","handleRSAData","convertedFinalUrl","FinalUrls","headlineList","Headlines","i","Text","Asset","PinnedField","descriptionList","Descriptions","convertedTitle","getTitlePreview","convertedText","getDescPreview","convertedDisplayUrl","getExpandedTextAdDisplayUrl","DisplayUrl","Path1","Path2","resultData","block","Link","href","nowrap","_TL_","ResponsiveAdPreview","LandscapeImageMediaUrl","callToAction","originalActionTextMapper","CallToActionLanguage","CallToAction","align","alt","Headline","AdCreationPreview","_ref3","useDefaultStyles","getAdContent","Type","PropertyRow","propertyLabel","label","Store","storeName","ProductCollections","isProductCollectionsEnabled","productCollectionsText","LocalInventory","isLocalInventoryEnabled","localInventoryText","getProductsStyle","productFilterItem","marginBottom","Products","productFilters","useSelectedItem","productsText","isEmpty","join","map","filter","SelectedItem","itemText","itemIndex","maxContentWidth","LocationTargeting","locations","targetOption","explicitLocations","numLocations","replace","AgeRanges","EighteenToTwentyFive","TwentyFiveToThirtyFive","ThirtyFiveToFifty","FiftyToSixtyFive","SixtyFiveAndAbove","Unknown","ThirtyFiveToFiftyFive","FiftyFiveAndAbove","formatAgeRanges","ageRanges","ageRange","sortAgeRanges","formatAgeRange","AgeRangeTargeting","Genders","Female","Male","formatGenders","genders","gender","sortGenders","formatGender","GenderTargeting","getDayTimeDetails","dayTime","is12","startHour","StartHour","endHour","EndHour","startMin","getMin","minuteToSaveMap","StartMinute","endMin","EndMinute","getDay","Day","from","getTime","min","to","AdSchedule","startDate","endDate","adSchedules","useSearcherTimeZone","timeDisplayType","includeStartEnd","dateSettings","getDateSettingDetails","adScheduleSettings","details","len","BidAdjustmentType","BidAdjustmentAmount","CashbackPercent","schedule","getAdScheduleDetails","dateTimePart","AdScheduleWithBidAdjustments","push","formatTargets","includedData","excludedData","singularText","pluralText","targetedCriterions","Status","excludedCriterions","targetedCriterionDetails","excludedCriterionDetails","count","CommonTarget","_ref4","Audience","audiences","Interest","interests","PredictiveTargeting","isPredictiveTargetingEnabled","predictiveTargetingText","StartEndDates","isUseCampaignLevelDates","isDateLevelDisplayed","getLocalizationMapping","adDistribution","syndEnum","BingYahooOnly","SearchPartnersOnly","BingYahooAndSearchPartners","formatKeywords","showLength","total","detail","slice","keyword","Keywords","style","formatText","Genre","genreTargets","Disclaimer","disclaimerName","Name","disclaimerText","CompanyName","companyTargets","negativeCompanyTargets","JobFunction","jobTargets","negativeJobTargets","Industry","industryTargets","negativeIndustryTargets","formatConversionGoals","conversionGoals","goalScopeSelection","goalSelection","ConversionGoals","BudgetTypes","formatBudget","currencyCode","Amount","currencySymbol","getCurrencySymbol","Budget","formatBidStrategy","getBidTitleDetails","BidStrategy","formatBidValue","BidValue","Languages","formattedLanguages","campaignLanguageStrings","AudienceSignal","audienceSignalName","Images","shouldFetchFromMT","isLogo","setImages","setIsLoading","processImageListModelToViewModel","ImageAssets","onSuccess","loadedImageList","ImageList","Shimmer","ImageListSummaryCardDetails","isLogos","getStoreInfoStyle","storeTitleDetails","AutoGeneratedAssets","autoGeneratedTextOptOut","autoGeneratedImageOptOut","finalUrlExpansionOptOut","autoGenAssetsSummary","UrlOptions","urlOptionsDetails","getUrlOptionsDetails","TrackingUrlTemplate","FinalUrlSuffix","UrlCustomParameters","BidTarget","TargetRoas","TargetCpa","targetValue","targetCpa","targetRoas","formatRoasValue","getExpansionsSummary","finalUrlExpansions","exactUrls","rules","conditions","Criterion","WebPage","Parameter","Conditions","condition","Operator","ArgumentOperand","exactUrlsDetails","rulesDetails","FinalURLExpansions","getSearchThemeDetails","searchThemes","item","SearchTheme","SearchThemes","CostPerSale","costPerSaleOptOut","costPerSaleSummary","UrlRules","isAssetGroupUrlRulesV2Enabled","finalUrls","path1","path2","mobileFinalUrls","urlRules","UrlOptionsDetailsWithRulesV2","UrlOptionsDetailsWithRules","NewCustomerAcquisition","newCustomerAcquisitionOptOut","newCustomerAcquisition","campaignSettings","accountSettings","summary","summaryText","bidOnlyMode","campaignAdditionalValue","accountAdditionalValue","formatCurrency","Videos","videos","isVideos","summaryPageComponentTypes","numAds","store","feeds","feedLabel","feedLabelsText","products","interest","audience","company","industry","languages","longHeadlines","getLongHeadlinesCardSummaryDetails","descriptions","getDescriptionsCardSummaryDetails","headlines","getHeadlinesCardSummaryDetails","ProviderId","IsFeedFiltered","SalesCountry","FeedLabel","LocalInventoryAdsEnabled","storesData","storeContainerData","getStoreTitleDetails","productFilter","listingGroup","listingGroupDetails","getListingGroupDetails","disclaimer","defaultStyles","disconnectedStatusTile","root","marginLeft","connectedStatusTile","connectedStatusLabel","saveButton","removeButton","VerifiedTrackingSettingKey","vendorNameKey","advertiserEntityIdKey","publisherEntityIdKey","regexMappping","video","native","ThirdPartyMeasurementNameMap","formatThirdPartyMeasurementSetting","verifiedTrackingSettings","verifiedTrackingSetting","vendorName","advertiserEntityId","publisherEntityId","settingEmpty","getVerifiedTrackingComponent","errorMessages","createVerifiedTrackingSettingViewModel","StatusLabel","success","statusMessage","statusStyle","paddingInline","paddingTop","paddingBottom","labelIcon","Label","Icon","iconName","ThirdPartyMeasurement","updateValidation","validationProps","_props$adType","adType","_props$overrideStyles","overrideStyles","verifiedTrackingData","styles","connected","setConnected","verifiedTrackingSettingRaw","setVerifiedTrackingSettingRaw","_useState5","_useState6","tagUrlErrors","setTagErrors","text","validateUrl","ids","regexStrArr","result","regexStr","currentRes","RegExp","exec","extractIdsFromIASInput","verifiedTrackingSettingToAdd","errors","save","_validateUrl","onTagUrlChange","tagErrorMessage","Stack","horizontal","tokens","childrenGap","wrap","Button","onClick","Dropdown","defaultSelectedKey","onRenderLabel","HelpPopupInline","topic","disabled","TextField","multiline","autoAdjustHeight","onChange","errorMessage","ThirdPartyMeasurementWithValidation","withControlErrorHandling","withUnvalidatedControlErrors","withError","withCustomValidation","getCheckStatus","settings","vendor","enabled","ThirdPartyMeasurementV2","setSettings","setErrors","verifiedTrackingDatas","settingsToUpdate","iasData","find","setting","moatData","IAS","MOAT","iasSettingsToUpdate","numericPattern","errorsToUpdate","test","moatSettingsToUpdate","onRenderadvertiserIdTextField","onRenderpublisherIdTextField","onAdvertiserIdChange","onPublisherIdChange","onCheckStatusChangeGenerator","checked","originalSettings","newSettings","errorType","onRenderIASLabel","onRenderMOATLabel","onRenderIASCheckbox","Checkbox","ThirdPartyMeasurementV2WithValidation","thirdPartyMeasurementFolderButton","icon","ThirdPartyMeasurementCardContainer","showSimpleMessage","isForDeal","dealLoaded","isMOATEnabled","initialFolded","folded","setFolded","foldedIconProps","ThirdPartyMeasurementComponent","CommandButton","iconProps","VerifiedTrackingSettings","ThirdPartyMeasurementContainerWithValidation","ThirdPartyMeasurementBackboneView","_Backbone$View","arguments","initialThirdPartyMeasurement","_ref$isMOATEnabled","saveVerifiedTrackingSetting","bind","verifiedTrackingObj","render","ReactDOM","el","Backbone","campaignThirdPartyVendors","ISPOT","DV","reachVendors","verificationVendors","campaignThirdPartyVendorNames","thirdPartyMeasurementTrackingVendorField","thirdPartySettingError","settingEnabledKey","isVendorSelectedInSetting","foundSetting","thirdPartySettingValidatorMap","brandId","doubleVerifyLinkEstablished","thridPartyMeasurementTrackingStyles","thirdPartyMeasurementGuide","thirdPartyMeasurementRemoveAllStack","thirdPartyMeasurementRemoveAllButton","inset","thirdPartyMeasurementAddButton","dropdown","paddingLeft","thirdPartyMeasurementVendorSettings","justifyContent","thirdPartyMeasurementRemoveButton","warningMessageContainer","warningMessage","borderColor","gap","warningMessageText","linked","minWidth","warningMessageDefaultSettings","tagName","WarningMessage","customSettings","horizontalAlign","AccountLinkedStatusLabel","overrideStyle","customVendorConfigs","setSetting","e","updatedSetting","ariaLabel","ThirdPartyTrackingSetting","removeSetting","VendorConfig","isiSPOTSetting","readOnly","defaultValue","ThirdPartyTrackingRemoveAllButton","removeAllVendorSettings","formatVendorSettings","verifiedTrackingSettingsValidationProps","validSettings","selectedVendors","getVendorNames","ThirdPartyMeasurementV3","IsMSANISPOTEnabled","EnableDoubleVerify","_useAccountPropertyRe","enableDoubleVerifyForAllCampaigns","setEnableDoubleVerifyForAllCampaigns","setDoubleVerifyLinkEstablished","readAccount","edmCampaign","Customers","$withKey","Accounts","select","toPromise","then","account","EnableDoubleVerifyForAllCampaigns","DoubleVerifyLinkEstablished","catch","useAccountPropertyRepository","vendorData","validatedSettingsArray","validatedVendorSetting","currentVendorErrors","apply","_toConsumableArray","addSetting","updatedSettings","vendorFound","vendorNameArr","currentVendorName","oldSettings","s","onRenderReachSettings","reachSettings","indexInSettings","onRenderVerificationSettings","verificationSettings","addVendorMenuProps","itemsToPush","itemType","ContextualMenuItemType","Header","ispotSelected","Divider","DVSelected","items","menuProps","ThirdPartyMeasurementV3WithValidation","getVerifiedTrackingSettingWrite","VerifiedTrackingData","results","Key","Value","JSON","stringify","getVerifiedTrackingSettingsRead","model","customKey","values","keyMap","IAS_advertiserEntityId","IAS_publisherEntityId","ISPOT_brandId","thirdPartyMeasurementStringToViewModel","verifiedTrackingDataString","thirdPartyMeasurementFromBulkModel","parse","console","log","thirdPartyMeasurementSetting","mergeStyles","CustomComponent","Renderer","renderProps","dynamicProps","_objectWithoutProperties","_excluded","withCustomRendering","Component","CustomRenderingWrapper","_Fragment","ActionButton","iconStyles","rest","buttonIcon","DefaultButton","ActionButtonWrapped","headerStyles","borderStyle","borderWidth","headerStackStyles","titleStyles","actionButton","actionButtonDynamic","as","classNames","HeaderWrapped","panelStyles","background","panelContentStyles","Panel","header","headerDynamic","MessageBar","FluentMessageBar","rendererProps","MessageBarWrapped","labelStyles","PropertyLabelWrapped","dataStyles","PropertyDataWrapped","propertyLabelDynamic","propertyData","propertyDataDynamic","disableShrink","PropertyLabel","PropertyData","dividerStyles","componentTypes","FluentText","panel","generateComponents","registrationMap","schema","customComponentTypes","separatorStyles","unrenderedComponents","c","isRendered","componentsToRenderSchema","schemaComponents","selectedComponentTypes","schemaComponent","commonSchemaStyles","numberOfComponents","field","params","separatorStylesForComponent","componentStyles","componentClassName","getDirectlyDefinedDynamicProperties","componentsSchema","components","build","propertiesSchema","dynamicProperties","directlyDefinedComponentDynamicProperties","schemaBasedComponentDynamicProperties","childComponentsDynamicProperties","componentDynamicProperties","dynamicallyHideComponent","componentStylesWithDynamics","GeneratedUI","selectComponentType","dynamicComponentBuilders","componentBuilder","buildDefaultDataProperty","baselineProperty","parseFileName","nameWithExtension","nameWithoutExt","ext","lastIndexOf","FilePicker","_React$PureComponent","readFile","fileObjects","onFileRead","showErrors","onFileSelected","maximumFileSizeMB","isReachFileSizeLimit","getReachFileSizeLimitErrorMessage","selectedFiles","filePicker","fileIndex","selectedFilesCount","errorArr","fileObj","fileSizeMB","size","toFixed","reachLimit","handleDraging","isDraging","isFileDraging","enableMultiple","allowedFileExtensions","showExtensionError","filePickerOptions","isNative","displayFilePath","useButton","BackboneFilePicker","$","remove","hide","testRef","enableDrag","hideDescription","fileDraggerLabel","fileDraggerTip","fileDraggerDropDescription","useLargeStyling","fileButton","BackboneInstanceWrapper","instance","FileDragger","onReadFile","allowedFileExtension","onInvalidExtension","description","dropDescription","dragging","readFileAsDataURLAsync","file","reject","reader","FileReader","addEventListener","onerror","readAsDataURL","MaximumImageFileSizeMB","MaximumVideoFileSizeMB","allowedVideoFileExtensions","defaultAllowedImageExtensions","ImageFilePicker","_len","args","Array","_key","onFileReadInternal","imageSources","maximumFileSize","fileSize","errorLinkText","errorTopic","isMultimediaAd","isAudienceAd","LearnMoreLink","linkText","_this$props3","minimumSize","maxUploadNum","maxCount","VideoFilePicker","isVideo","baseStyles","imageItemBox","imageContent","uploadPreviewStyle","_ref$palette","palette","_ref$iconFontFamily","iconFontFamily","uploadPreviewContainer","uploadTitle","fontFamily","neutralSecondary","imagePreviewContainer","flexWrap","maxHeight","overflowY","scrollBar","neutralLighterAlt","imageItemBoxRight","imageItemErrBox","imageName","neutralPrimary","textOverflow","progressBox","progressLine","neutralLight","statusIcon","completeIcon","green","content","transition","ongoingIcon","themePrimary","errorIcon","errorMsg","imageSize","UploadPreviewWithCustomPreview","assetList","PreviewComponent","customClasses","showTitle","getFileSize","fileSizeStr","normalInfoBox","classnames","Progress","progressPercentage","progress","uploadingNum","Math","previewComponentClasses","imageContentText","exceedMaxUploadNum","errorInfoBox","SimpleImagePreview","UploadPreview","BarUploadProgress","uploadProcessText","uploadedBytes","totalBytes","CircleUploadProgress","getCircleProgressStyle","circle","RadialProgress","stroke","strokeWidth","UploadProgress","updateProgress","setProgress","uploadProgressBoundary","evt","boundary","loaded","updateFilePreviewArrayUploadProgress","previewArr","previous","generatePreviewArray","_ref3$files","files","fileSources","_ref3$customizedOptio","customizedOptions","source","validateImageAsync","imageSource","minimumWidth","minimumHeight","validateImageSyncAsyncWithDimensionParams","validateVideoAsync","defaultProtocols","buildUrl","_ref$protocol","protocol","_ref$url","_ref$protocols","protocols","prefix","parseUrl","regexResult","UrlEditor","onUrlChange","onUrlPartChange","rawInput","_parseUrl","newUrl","newProtocol","fullUrl","buildFullUrl","trim","onProtocolPartChange","stopPropagation","_parseUrl2","_this$state","containerClassName","Select","selectClassName","ariaProtocolLabelledBy","ariaProtocolLabel","option","Input","inputClassName","ariaUrlLabelledBy","ariaUrlLabel","UrlEditorValidationAdapter","AdapterFactory","valueToInject","UrlEditorWithValidation","withValidation","UrlEditorForArray","setUrl","urlSchema","urls","TARGET_TYPE","TARGET_TYPE_MAP","URL","PAGE_TITLE","PAGE_CONTENT","CATEGORY","CUSTOM_LABEL","CONDITION_OPERATOR","RULE_SEPERATOR","RULE_TYPE","getTargetStrings","rule","firstTarget","TargetCondition1","isCustomLabel","formattedValue","extractTargetsFromViewModel","assetGroupUrlRules","urlTargets","isCategoryOrCustomLabel","getPlaceHolderText","selectedTargetType","getUrlRulesEditorStyle","rulesInputInnerContainer","cardHeader","borderBottom","spacingVerticalS","verticalSpacing","shorthands","rulesListItem","spacingHorizontalXS","ruleCard","flex","UrlRulesEditor","isOpen","onClose","newAssetGroupUrlRules","setNewAssetGroupUrlRules","setConditions","setErrorMessages","isCustomLabelType","isAnyConditionEmpty","some","_ref2$condition","onAddRuleButtonClick","onCreateRuleButtonClick","trimmedCondition","existingRule","every","targetTypeDropdownOptions","renderMessageBar","MessageBarBody","renderTargetTypeDropdownOptions","Option","renderTargetTypeDropdownOptionsByType","renderRulesInput","conditionInput","_ref4$condition","Combobox","selectedOptions","onOptionSelect","newConditions","optionValue","inputContainer","Field","validationState","validationMessage","placeholder","maxLength","prevMessages","newErrorMessages","updateValue","appearance","Delete24Regular","splice","removeTargetTag","targetString","newRules","renderTargets","Card","CardHeader","Delete16Regular","weight","onSave","AssetGroupUrlTargets","renderDrawerFooter","Drawer","open","onOpenChange","DrawerHeader","DrawerHeaderTitle","action","Dismiss24Regular","DrawerBody","CardFooter","Add24Regular","messages","DrawerFooter","enableSpecialCharactersValidation","useUrlRulesPreviewStyles","makeStyles","overflowItem","spacingVerticalXS","overflowCount","tag","OverflowPlaceholder","_useOverflowMenu","useOverflowMenu","ref","isOverflowing","UrlRulesPreview","isSingleRow","renderPreview","Overflow","overflowAxis","minimumVisible","OverflowItem","Tag","MIN_VISIBLE_ROWS","renderPreviewRow","useUrlRulesStyles","urlRulesEditButton","UrlRulesImpl","isUrlRulesEditorOn","setIsUrlRulesEditorOn","onOpenUrlRulesEditor","onCloseUrlRulesEditor","renderEditor","renderCreateRulesButton","ActivityContext","newData","signal","ValidatedUrlRules","getSummaryStyle","advancedUrlOptionsSummaryContainer","finalUrl","first","mobileFinalUrl","displayUrl","finalUrlDomain","getDomain","noDisplayUrl","noMboileUrl","noUrlRules","noSettingsApplied","urlPathText","renderRulesSummary","URL_RULES_OPTIONS","All","Rules","Labels","INPUT_VALIDATION_SCHEMA","ruleInput1","ruleInput2","ruleInput3","targetMapping","Boolean","pageTitleTargets","pageContentTargets","categoryTargets","customLabelTargets","getUrlRulesOption","_extractTargetsFromVi","urlRulesOption","TagWithTooltip","isOverflow","setIsOverflow","isTooltipVisible","setIsTooltipVisible","tagRef","clientWidth","scrollWidth","Tooltip","relationship","withArrow","visible","onVisibleChange","ev","ValidatedInput","getCustomLabelsEditorStyle","sectionsContainer","rulesInputOuterContainer","flexShrink","flexGrow","redDark","rulesResultContainer","borderTop","textWrap","CustomLabelsEditor","onValidate","newInput","IconButton","targetType","renderCustomLabelTargetTags","customLabelRules","renderPanelFooter","PrimaryButton","headerText","closeButtonAriaLabel","onDismiss","onRenderFooterContent","isFooterAtBottom","PanelType","medium","ValidationGroup","alignSelf","optionText","unsafeCharacterErrorMessage","_useMemo","setSelectedTargetType","_useState7","_useState8","onRenderOption","selectedKey","renderTargetTags","newUrlRules","previewContainer","previewRow","overflowContainer","overflowX","titleText","iconImg","renderPreviewRows","UrlsImage","radioGroupContainer","radioOptionContainer","radioOptionLabelContainer","isCustomLabelEditorOn","setIsCustomLabelEditorOn","onOpenCustomLabelEditor","onCloseCustomLabelEditor","renderTargetAllOption","Radio","renderUrlRulesOption","mergeClasses","renderCustomLabelsOption","onRadioChange","UrlRulesOption","RadioGroup","_validationProps$data"],"sourceRoot":""}