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xH,KAAK4xH,eAAiB,MAExBE,EAAAA,uBAAgC9xH,KAAK+xH,KACrCC,EAAAA,EAAAA,GAAAR,EAAA,gBAAAQ,CAAA,GACF,IAAC,CA/CyB,CAASpuH,IAAAA,K,wECL/B5G,E,UAAc8pG,UAAUmrB,YAAYC,4BAuC7BC,EAAmB,WAAH,OAAAptH,EAAAA,EAAAA,IAAAA,EAAAA,EAAAA,GAAA,CAC3B,yCAA0C,CACxC/H,YAAAA,IAvCmC,CACrC,kCAAmC,CACjCA,YAAa,EACb,qBAAsB,CACpB,gBAAiB,CACf,4BAA6B,CAC3BA,YAAAA,GAEF,mCAAoC,CAClCA,YAAAA,GAEF,uBAAwB,CACtBA,YAAAA,GAEF,yCAA0C,CACxCtK,SAAU,GACVuE,MAAO,MAIb,iBAAkB,CAChB,uBAAwB,CACtB,sCAAuC,CACrC+F,YAAAA,GAEF,mCAAoC,CAClCtK,SAAU,GACVuE,MAAO,KAGX,kCAAmC,CACjC+F,YAAAA,OAUe,IACrB,+CAAgD,CAC9CA,YAAAA,IACD,C","sources":["../../../../perf-max-campaign/packages/auto-generated-assets/src/alerts.js","../../../../perf-max-campaign/packages/auto-generated-assets/src/helpers/utils.js","../../../../perf-max-campaign/packages/auto-generated-assets/src/final-url-expansion-preview.js","../../../../perf-max-campaign/packages/auto-generated-assets/src/helpers/constants.js","../../../../perf-max-campaign/packages/auto-generated-assets/src/side-panel/validated-url-input.js","../../../../perf-max-campaign/packages/auto-generated-assets/src/side-panel/tag-with-tooltip.js","../../../../perf-max-campaign/packages/auto-generated-assets/src/side-panel/final-url-expansion-editor.js","../../../../perf-max-campaign/packages/auto-generated-assets/src/auto-generated-assets-impl.js","../../../../perf-max-campaign/packages/auto-generated-assets/src/auto-generated-assets.js","../../../../perf-max-campaign/packages/cost-per-sale-option/src/style.js","../../../../perf-max-campaign/packages/cost-per-sale-option/src/cost-per-sale.js","../../../../perf-max-campaign/packages/editorial-appeal/src/params.js","../../../../perf-max-campaign/packages/editorial-appeal/src/editorial-appeal-aggregator.js","../../../../perf-max-campaign/packages/legacy-editorial-appeal-request-form/src/style.js","../../../../perf-max-campaign/packages/legacy-editorial-appeal-request-form/src/legacy-editorial-appeal-request-form.js","../../../../perf-max-campaign/packages/legacy-editorial-appeal-request-form/src/legacy-inline-error-view.js","../../../../perf-max-campaign/packages/editorial-appeal/src/editorial-appeal-request-panel.js","../../../../perf-max-campaign/packages/legacy-final-url-expansion/src/legacy-final-url-expansion.js","../../../../perf-max-campaign/packages/legacy-final-url-expansion/src/validated-legacy-final-url-expansion.js","../../../../perf-max-campaign/packages/listing-groups-page/src/constant.ts","../../../../perf-max-campaign/packages/listing-groups-page/src/treeViewPanelSelector/PanelSelector/paginator.styles.ts","../../../../perf-max-campaign/packages/listing-groups-page/src/treeViewPanelSelector/PanelSelector/paginator.tsx","../../../../perf-max-campaign/packages/listing-groups-page/src/treeViewPanelSelector/PanelSelector/BulkAddEditor.tsx","../../../../perf-max-campaign/packages/listing-groups-page/src/treeViewPanelSelector/PanelSelector/index.tsx","../../../../perf-max-campaign/packages/listing-groups-page/src/rawColumns.ts","../../../../perf-max-campaign/packages/listing-groups-page/src/render/toolbar/ColumnChooser/columns.ts","../../../../perf-max-campaign/packages/listing-groups-page/src/legacyI18nMap.ts","../../../../perf-max-campaign/packages/listing-groups-page/src/API/adsOdata.ts","../../../../perf-max-campaign/packages/listing-groups-page/src/API/getListingGroupConditions.ts","../../../../perf-max-campaign/packages/listing-groups-page/src/API/updateListingTree.ts","../../../../perf-max-campaign/packages/listing-groups-page/src/API/index.ts","../../../../perf-max-campaign/packages/listing-groups-page/src/API/listingGroupGridData.ts","../../../../perf-max-campaign/packages/listing-groups-page/src/API/productAttributeStatistics.ts","../../../../perf-max-campaign/packages/listing-groups-page/src/API/productOffer.ts","../../../../perf-max-campaign/packages/listing-groups-page/src/style.ts","../../../../perf-max-campaign/packages/listing-groups-page/src/toolbarConfig.ts","../../../../perf-max-campaign/packages/listing-groups-page/src/ColumnOdataMap.ts","../../../../perf-max-campaign/packages/listing-groups-page/src/render/utils.tsx","../../../../perf-max-campaign/packages/listing-groups-page/src/render/column/ProductOffersCallout.tsx","../../../../perf-max-campaign/packages/listing-groups-page/src/render/column/ConditionTemplate.tsx","../../../../perf-max-campaign/packages/listing-groups-page/src/render/column/FlattenConditionTemplate.tsx","../../../../perf-max-campaign/packages/listing-groups-page/src/render/column/NameTemplate.tsx","../../../../perf-max-campaign/packages/listing-groups-page/src/API/bulk.ts","../../../../perf-max-campaign/packages/listing-groups-page/src/render/column/IncludeExcludeTemplate.tsx","../../../../perf-max-campaign/packages/listing-groups-page/src/render/column/index.tsx","../../../../perf-max-campaign/packages/listing-groups-page/src/render/sortByHelper.ts","../../../../perf-max-campaign/packages/listing-groups-page/src/logger.ts","../../../../perf-max-campaign/packages/listing-groups-page/src/treeViewPanelSelector/panel-callbacks.ts","../../../../perf-max-campaign/packages/listing-groups-page/src/treeViewPanelSelector/panel-helper.tsx","../../../../perf-max-campaign/packages/listing-groups-page/src/useTreeViewPanelSelector.ts","../../../../perf-max-campaign/packages/listing-groups-page/src/API/useAccountData.js","../../../../perf-max-campaign/packages/listing-groups-page/src/API/getProductScope.ts","../../../../perf-max-campaign/packages/listing-groups-page/src/utils.ts","../../../../perf-max-campaign/packages/listing-groups-page/src/listing-groups-page.tsx","../../../../perf-max-campaign/packages/listing-groups-page/src/filter-config.js","../../../../perf-max-campaign/packages/listing-groups-page/src/legacy-adapter/filter-entity.js","../../../../perf-max-campaign/packages/listing-groups-page/src/listing-groups-shell.js","../../../../perf-max-campaign/packages/perf-max-data/src/crud.js","../../../../perf-max-campaign/packages/perf-max-step-wizard/src/common/constants.js","../../../../perf-max-campaign/packages/perf-max-step-wizard/src/common/bulk.js","../../../../perf-max-campaign/packages/perf-max-step-wizard/src/model/bulk-upsert-errors.js","../../../../perf-max-campaign/packages/perf-max-step-wizard/src/common/map-bulk-upsert-errors.js","../../../../perf-max-campaign/packages/perf-max-step-wizard/src/model/api-errors.js","../../../../perf-max-campaign/packages/perf-max-step-wizard/src/common/strings.js","../../../../perf-max-campaign/packages/perf-max-step-wizard/src/model/asset-group.js","../../../../perf-max-campaign/packages/perf-max-step-wizard/src/model/campaign-criterions.js","../../../../perf-max-campaign/packages/perf-max-step-wizard/src/model/campaign.js","../../../../perf-max-campaign/packages/perf-max-step-wizard/src/model/ad-extension.js","../../../../perf-max-campaign/packages/perf-max-step-wizard/src/steps/asset-group/step-campaign-asset-group-impl.js","../../../../perf-max-campaign/packages/perf-max-step-wizard/src/steps/shared.js","../../../../perf-max-campaign/packages/perf-max-step-wizard/src/steps/asset-group/use-step-campaign-asset-group-state.js","../../../../perf-max-campaign/packages/perf-max-step-wizard/src/steps/asset-group/step-campaign-asset-group-styles.js","../../../../perf-max-campaign/packages/perf-max-step-wizard/src/common/has-assets-in-assets-group.js","../../../../perf-max-campaign/packages/perf-max-step-wizard/src/steps/asset-group/step-campaign-asset-group.js","../../../../perf-max-campaign/packages/perf-max-step-wizard/src/steps/asset-group/step-wizard-config.js","../../../../perf-max-campaign/packages/perf-max-step-wizard/src/model/campaign-bulk.js","../../../../perf-max-campaign/packages/perf-max-step-wizard/src/model/conversion-goals-details.js","../../../../perf-max-campaign/packages/perf-max-step-wizard/src/steps/campaign-settings/step-campaign-settings-impl.js","../../../../perf-max-campaign/packages/perf-max-step-wizard/src/steps/campaign-settings/use-step-campaign-settings-state.js","../../../../perf-max-campaign/packages/perf-max-step-wizard/src/steps/campaign-settings/step-campaign-settings-styles.js","../../../../perf-max-campaign/packages/perf-max-step-wizard/src/steps/campaign-settings/step-campaign-settings.js","../../../../perf-max-campaign/packages/perf-max-step-wizard/src/steps/campaign-settings/step-wizard-config.js","../../../../perf-max-campaign/packages/perf-max-step-wizard/src/common/perf-max-campaign-crud-scenarios.js","../../../../perf-max-campaign/packages/perf-max-step-wizard/src/pages/perf-max-asset-group-creation-page.js","../../../../perf-max-campaign/packages/perf-max-step-wizard/src/pages/perf-max-asset-group-settings-page.js","../../../../perf-max-campaign/packages/perf-max-step-wizard/src/pages/perf-max-campaign-creation-page.js","../../../../perf-max-campaign/packages/perf-max-step-wizard/src/pages/perf-max-campaign-settings-page.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/constants.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/step-constants.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/shared/model/api-error.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/assets/components/asset-group-name-section.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/assets/components/social-site-recommendation-section.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/assets/components/asset-group-name-section-with-social-site-recommendation.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/shared/model/social-site-recommendation.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/assets/components/get-assets-styles.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/assets/components/assets-section.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/assets/components/more-options-section.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/assets/components/get-ad-extensions-section.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/assets/components/enhance-your-ads-section.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/assets/components/more-assets-section.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/assets/components/more-settings-section.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/shared/components/section-shimmer.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/assets/components/audience-signal-section.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/assets/assets-step-styles.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/assets/assets-step-form.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/assets/assets-step-shell.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/shared/components/odata-config.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/shared/model/default-data.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/shared/model/create-default-campaign.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/budget/utils/const.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/budget/utils/use-budget-localized.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/budget/styles/get-budget-form-styles.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/budget/budget-step-shell.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/budget/use-budget-suggestion-data.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/budget/use-budget-step-repository.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/targeting/targeting-step-shell.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/products/products-step-shell.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/campaign-details/campaign-details-step-shell.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/summary/use-summary-schema-data.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/shared/components/summary-shimmer.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/summary/diagnostics/constants.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/summary/summary-step-shell.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/summary/diagnostics/utils.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/summary/diagnostics/use-action-callback.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/summary/schema.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/shared/model/update-entity-status.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/summary/diagnostics/use-diagnostics-data.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/step-config.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/assets/use-assets-step-repository.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/products/use-products-step-repository.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/targeting/use-targeting-step-repository.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/campaign-details/use-campaign-details-step-repository.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/summary/use-summary-step-repository.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/step-lists.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/footer.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/shared/components/wizard-logger.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/wizard.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/campaign-setting/campaign-setting-step-shell.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/campaign-setting/use-campaign-setting-step-repository.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/setting-page.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/asset-group-setting-page.js","../../../../perf-max-campaign/packages/perf-max-wizard-north-star/src/steps/asset-group-setting/use-asset-group-setting-step-repository.js","../../../../perf-max-campaign/packages/search-theme-selector/src/alerts.js","../../../../perf-max-campaign/packages/search-theme-selector/src/search-theme-selector-section-impl.js","../../../../perf-max-campaign/packages/search-theme-selector/src/search-theme-selector-section.js","../../../../perf-max-campaign/packages/step-wizard-controls/src/use-impulse.js","../../../../perf-max-campaign/packages/step-wizard-controls/src/use-is-mounted.js","../../../../perf-max-campaign/packages/legacy-budget/src/style.js","../../../../perf-max-campaign/packages/legacy-budget/src/legacy-budget.js","../../../../perf-max-campaign/packages/step-wizard-controls/src/validated-budget.js","../../../../perf-max-campaign/packages/step-wizard-controls/src/validated-conversion-goals.js","../../../../perf-max-campaign/packages/step-wizard-controls/src/validated-conversion-goals-selector.js","../../../../perf-max-campaign/packages/step-wizard-controls/src/validated-fabric-controls.js","../../../../perf-max-campaign/packages/step-wizard-controls/src/validated-listing-groups.js","../../../../perf-max-campaign/packages/step-wizard-controls/src/validated-location-target-setting.js","../../../../perf-max-campaign/packages/step-wizard-controls/src/location-target-setting-panel.js","../../../../perf-max-campaign/packages/step-wizard-controls/src/audience-signal-panel.js","../../../../perf-max-campaign/packages/step-wizard-controls/src/server-validated-url-options-parameters.js","../../../../perf-max-campaign/packages/step-wizard-controls/src/video-panel.js","../../../../perf-max-campaign/packages/step-wizard-machine/src/wizard-events.js","../../../../perf-max-campaign/packages/step-wizard-machine/src/step-events.js","../../../../perf-max-campaign/packages/step-wizard-machine/src/debug.js","../../../../perf-max-campaign/packages/step-wizard-machine/src/wizard-state-machine.js","../../../../perf-max-campaign/packages/step-wizard-machine/src/step-state-machine.js","../../../../perf-max-campaign/packages/step-wizard-machine-capi/index.js","../../../../perf-max-campaign/packages/step-wizard/src/styles/wizard-styles.js","../../../../perf-max-campaign/packages/step-wizard/src/shared/use-is-mounted.js","../../../../perf-max-campaign/packages/step-wizard/src/shared/step-repository.js","../../../../perf-max-campaign/packages/step-wizard/src/wizard/use-wizard-state.js","../../../../perf-max-campaign/packages/step-wizard/src/styles/get-step-progress-item-glyphicon.js","../../../../perf-max-campaign/packages/step-wizard/src/styles/footer-style-overrides.js","../../../../perf-max-campaign/packages/step-wizard/src/wizard/multi-step-layout.js","../../../../perf-max-campaign/packages/step-wizard/src/wizard/single-step-layout.js","../../../../perf-max-campaign/packages/step-wizard/src/wizard/wizard.js","../../../../perf-max-campaign/packages/step-wizard/src/shared/use-navigation-confirmation-prompt.js","../../../../perf-max-campaign/packages/step-wizard/src/shared/use-exit-without-saving-confirmation.js","../../../../perf-max-campaign/packages/step-wizard/src/shared/use-window-confirm.js","../../../../perf-max-campaign/packages/step-wizard/src/shared/step-loading-shell.js","../../../../perf-max-campaign/packages/step-wizard/src/shared/no-data-step-repository.js","../../../../performance-charts/packages/base-inline-chart-style/src/style.js","../../../../performance-charts/packages/inline-chart-service/src/constants.js","../../../../performance-charts/packages/inline-chart-service/src/inline-chart-request.js","../../../../performance-charts/packages/inline-chart-service/src/inline-chart-service.js","../../../../performance-charts/packages/inline-chart-wrapper/src/inline-chart-wrapper.js","../../../../performance-charts/packages/inline-chart-wrapper/src/inline-chart-view.js","../../page-padding-style/src/style.js"],"sourcesContent":["import React, { useContext } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Alert } from '@bingads-webui-react/alert';\r\n\r\nexport const TurnOnAllAlert = () => {\r\n const i18n = useContext(I18nContext);\r\n return (\r\n \r\n {i18n.getString(_TL_('For the best results,'))} {i18n.getString(_TL_('consider turning on all asset types.'))}\r\n \r\n }\r\n level=\"Info\"\r\n icon={(
)}\r\n dismissible={false}\r\n />\r\n );\r\n};\r\n\r\nexport const FullyOptimizedAlert = () => {\r\n const i18n = useContext(I18nContext);\r\n return (\r\n \r\n {i18n.getString(_TL_('Automatically generated assets are fully optimized.'))}\r\n \r\n }\r\n level=\"Confirmation\"\r\n icon={(
)}\r\n dismissible={false}\r\n />\r\n );\r\n};\r\n","import { each, get, isEmpty } from 'underscore';\r\n\r\nexport const extractExclusionRules = (finalUrlExpansions) => {\r\n const urlEquals = [];\r\n const urlContains = [];\r\n const customLabels = [];\r\n each(finalUrlExpansions, (target) => {\r\n const conditions = get(target, ['Criterion', 'WebPage', 'Parameter', 'Conditions'], []);\r\n if (isEmpty(conditions)) return;\r\n if (conditions[0].Operand === 'Url' && conditions[0].Operator === 'Equals') {\r\n urlEquals.push(conditions[0].ArgumentOperand);\r\n } else if (conditions[0].Operand === 'Url' && conditions[0].Operator === 'Contains') {\r\n const rules = [];\r\n each(conditions, (condition) => {\r\n rules.push(condition.ArgumentOperand);\r\n });\r\n urlContains.push(rules);\r\n } else if (conditions[0].Operand === 'CustomLabel') {\r\n customLabels.push(conditions[0].ArgumentOperand);\r\n }\r\n });\r\n return [urlEquals, urlContains, customLabels];\r\n};\r\n\r\nexport const withHttpsPrefix = (url) => {\r\n if (!url) return '';\r\n else if (url.startsWith('http://') || url.startsWith('https://')) return url;\r\n return `https://${url}`;\r\n};\r\n\r\nexport const keywordsToCriterionName = (keywords) => {\r\n const target = [];\r\n keywords.forEach((keyword) => {\r\n target.push(`Url contains ${keyword}`);\r\n });\r\n return target.join(' and ');\r\n};\r\n\r\nexport const convertURLEqualsToCriterion = url => ({\r\n Criterion: {\r\n WebPage: {\r\n Type: 'Webpage',\r\n Parameter: {\r\n Conditions: [\r\n {\r\n Operand: 'Url',\r\n Operator: 'Equals',\r\n ArgumentOperand: url,\r\n },\r\n ],\r\n CriterionName: `Url=${url}`,\r\n },\r\n },\r\n },\r\n});\r\n\r\nexport const convertURLContainsToCriterion = keyword => ({\r\n Criterion: {\r\n WebPage: {\r\n Type: 'Webpage',\r\n Parameter: {\r\n Conditions: [\r\n {\r\n Operand: 'Url',\r\n Operator: 'Contains',\r\n ArgumentOperand: keyword,\r\n },\r\n ],\r\n CriterionName: `Url contains ${keyword}`,\r\n },\r\n },\r\n },\r\n});\r\n\r\nexport const convertCustomLabelToCriterion = label => ({\r\n Criterion: {\r\n Type: 'Webpage',\r\n WebPage: {\r\n Parameter: {\r\n Conditions: [\r\n {\r\n Operand: 'CustomLabel',\r\n Operator: 'Equals',\r\n ArgumentOperand: label,\r\n },\r\n ],\r\n CriterionName: `CustomLabel=${label}`,\r\n },\r\n },\r\n },\r\n});\r\n","import React, { useCallback, useMemo } from 'react';\r\nimport classnames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport {\r\n Button,\r\n Overflow,\r\n OverflowItem,\r\n useOverflowMenu,\r\n} from '@fluentui/react-components';\r\nimport {\r\n extractExclusionRules,\r\n keywordsToCriterionName,\r\n} from './helpers/utils';\r\nimport UrlsImage from './media/url.svg';\r\nimport RulesImage from './media/rules.svg';\r\nimport LabelsImage from './media/labels.svg';\r\nimport EditImage from './media/edit.svg';\r\nimport DismissImage from './media/dismiss.svg';\r\n\r\n// eslint-disable-next-line valid-jsdoc\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 getStyles = () => ({\r\n previewContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n background: 'rgba(255, 255, 255, 1)',\r\n boxShadow: '0px 2px 4px 0px rgba(0, 0, 0, 0.1)',\r\n padding: '12px',\r\n margin: '4px 28px',\r\n borderRadius: '4px',\r\n gap: '4px',\r\n maxWidth: '95%',\r\n },\r\n previewHeader: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n justifyContent: 'space-between',\r\n '& .button-group': {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n gap: '12px',\r\n '& button': {\r\n padding: '0px',\r\n minWidth: '20px',\r\n },\r\n },\r\n },\r\n previewRow: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n gap: '4px',\r\n flexWrap: 'nowrap',\r\n maxWidth: '95%',\r\n '& .row-label': {\r\n padding: '2px 0px 2px 0px',\r\n textWrap: 'nowrap',\r\n },\r\n },\r\n overflowContainer: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n flexWrap: 'nowrap',\r\n flexGrow: 1,\r\n minWidth: 0,\r\n maxWidth: '100%',\r\n overflowX: 'hidden',\r\n gap: '4px',\r\n '& .tag': {\r\n padding: '2px 8px 2px 8px',\r\n borderRadius: '4px',\r\n background: 'rgba(243, 242, 241, 1)',\r\n flexShrink: 0,\r\n maxWidth: '250px',\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, isOverflowing } = useOverflowMenu();\r\n if (!isOverflowing) {\r\n return null;\r\n }\r\n return (...);\r\n};\r\n\r\nconst UnStyledFinalUrlExpansionPreview = ({\r\n classes,\r\n i18n,\r\n finalUrlExpansions,\r\n setToggleFinalURLsEditor,\r\n onChange,\r\n}) => {\r\n const [urls, rules, labels] = useMemo(() => extractExclusionRules(finalUrlExpansions), [finalUrlExpansions]);\r\n\r\n const onEditClick = useCallback(() => setToggleFinalURLsEditor(true), [setToggleFinalURLsEditor]);\r\n const onDismissClick = useCallback(() => {\r\n onChange({ finalUrlExpansions: [] });\r\n }, [onChange]);\r\n\r\n const renderUrlsRow = useMemo(() => (\r\n
\r\n { UrlsImage && \"Link }\r\n {urls.length} {i18n.getString(_TL_('URLs'))}: \r\n \r\n
\r\n { urls.map(url => (\r\n \r\n \r\n {url}\r\n \r\n \r\n )) }\r\n \r\n
\r\n
\r\n
\r\n ), [classes, i18n, urls]);\r\n\r\n const renderRulesRow = useMemo(() => (\r\n
\r\n { RulesImage && \"Link }\r\n {rules.length} {i18n.getString(_TL_('Exclusion Rules'))}: \r\n \r\n
\r\n { rules.map((rule) => {\r\n const tag = keywordsToCriterionName(rule);\r\n return (\r\n \r\n \r\n {tag}\r\n \r\n \r\n );\r\n }) }\r\n \r\n
\r\n
\r\n
\r\n ), [classes, i18n, rules]);\r\n\r\n const renderLabelsRow = useMemo(() => (\r\n
\r\n { LabelsImage && \"Label }\r\n {labels.length} {i18n.getString(_TL_('Custom Labels'))}: \r\n \r\n
\r\n { labels.map(label => (\r\n \r\n \r\n {label}\r\n \r\n \r\n )) }\r\n \r\n
\r\n
\r\n
\r\n ), [classes, i18n, labels]);\r\n\r\n return (\r\n
\r\n
\r\n { i18n.getString((_TL_('Excluded some URLs'))) }\r\n
\r\n \r\n \r\n
\r\n
\r\n { urls.length > 0 && renderUrlsRow }\r\n { rules.length > 0 && renderRulesRow }\r\n { labels.length > 0 && renderLabelsRow }\r\n
\r\n );\r\n};\r\n\r\nUnStyledFinalUrlExpansionPreview.propTypes = {\r\n classes: PropTypes.shape({\r\n previewContainer: PropTypes.string,\r\n previewHeader: 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 finalUrlExpansions: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n setToggleFinalURLsEditor: PropTypes.func.isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n};\r\n\r\nexport const FinalUrlExpansionPreview = withDefaultStyles(UnStyledFinalUrlExpansionPreview, getStyles);\r\n","export const EXCLUSTION_TYPE = {\r\n URL: 'urls',\r\n Rule: 'urlContains',\r\n Label: 'customLabels',\r\n};\r\n\r\nexport const URL_LENGTH_LIMIT = 2048;\r\n","import React, { memo, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { get } from 'underscore';\r\nimport { isValidUrl } from '@bingads-webui/url-util';\r\nimport { withCustomValidation } from '@bingads-webui-react/validation';\r\nimport { TextField } from '@fluentui/react';\r\nimport { URL_LENGTH_LIMIT } from '../helpers/constants';\r\nimport { withHttpsPrefix } from '../helpers/utils';\r\n\r\nconst UrlInput = memo(({\r\n className,\r\n i18n,\r\n validationProps,\r\n updateValidation,\r\n placeholder,\r\n}) => {\r\n const input = get(validationProps, ['data', 'input'], '');\r\n\r\n const validateAndUpdateUrl = useCallback((value) => {\r\n const finalUrlValidatorErrors = [];\r\n const fullUrl = value.indexOf('://') >= 0 ? value : withHttpsPrefix(value);\r\n if (!value || !isValidUrl(fullUrl)) {\r\n finalUrlValidatorErrors.push(i18n.getString(_TL_('Please enter a valid URL')));\r\n }\r\n if (value.length > URL_LENGTH_LIMIT) {\r\n finalUrlValidatorErrors.push(i18n.getString(_TL_('The number of characters in this field cannot exceed {{lengthLimit}}'), { lengthLimit: URL_LENGTH_LIMIT }));\r\n }\r\n updateValidation(finalUrlValidatorErrors, { input: value });\r\n }, [i18n, updateValidation]);\r\n\r\n const onTextChange = useCallback((ev, value) => validateAndUpdateUrl(value), [validateAndUpdateUrl]);\r\n\r\n return (\r\n \r\n );\r\n}, (prevProps, nextProps) => prevProps.validationProps.data.input === nextProps.validationProps.data.input);\r\n\r\nUrlInput.propTypes = {\r\n className: PropTypes.string,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n validationProps: PropTypes.shape({\r\n data: PropTypes.shape({\r\n input: PropTypes.string,\r\n }),\r\n }).isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n placeholder: PropTypes.string,\r\n};\r\n\r\nUrlInput.defaultProps = {\r\n className: '',\r\n placeholder: '',\r\n};\r\n\r\nexport const ValidatedUrlInput = withCustomValidation(UrlInput);\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 setIsOverflow(tagRef.current.clientWidth < tagRef.current.scrollWidth);\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","/* eslint-disable no-param-reassign */\r\nimport React, { useCallback, useMemo, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { get, map } from 'underscore';\r\nimport classnames from 'classnames';\r\nimport {\r\n DefaultButton,\r\n Label,\r\n IconButton,\r\n TextField,\r\n PrimaryButton,\r\n Panel,\r\n PanelType,\r\n Dropdown,\r\n Icon,\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 extractExclusionRules,\r\n withHttpsPrefix,\r\n keywordsToCriterionName,\r\n convertURLEqualsToCriterion,\r\n convertURLContainsToCriterion,\r\n convertCustomLabelToCriterion,\r\n} from '../helpers/utils';\r\nimport { EXCLUSTION_TYPE } from '../helpers/constants';\r\nimport { ValidatedUrlInput } from './validated-url-input';\r\nimport { TagWithTooltip } from './tag-with-tooltip';\r\n\r\nconst ValidatedInput = withValidation(TextField);\r\nconst ValidationSchema = {\r\n name: 'Exclusion Input',\r\n type: 'object',\r\n properties: {\r\n rule: {\r\n type: 'string',\r\n maxLength: 2048,\r\n },\r\n label: {\r\n type: 'string',\r\n maxLength: 2048,\r\n },\r\n },\r\n};\r\n\r\nexport const getFinalURLSectionStyle = (_, { palette = {} }) => ({\r\n inputContainer: {\r\n display: 'flex',\r\n },\r\n dropdown: {\r\n minWidth: '161px', height: '32px', marginRight: '8px',\r\n },\r\n dropdownOption: {\r\n display: 'flex',\r\n },\r\n iconStyles: {\r\n marginRight: '8px',\r\n },\r\n textField: {\r\n width: '100%', height: '32px',\r\n },\r\n addButton: {\r\n width: '60px', height: '32px', float: 'right', margin: '8px 0px 8px 8px ',\r\n },\r\n sectionsContainer: {\r\n '& label': {\r\n fontSize: 18,\r\n },\r\n '& .footerButton': {\r\n marginLeft: '8px',\r\n },\r\n '& .description': { marginTop: '12px', marginBottom: '12px' },\r\n '& .divider': {\r\n marginTop: '37px',\r\n '& .final-urls-section:last-child': { borderBottom: 'none' },\r\n },\r\n '& .final-urls-section': {\r\n margin: '2px 0',\r\n borderBottom: '1px solid #EDEBE9',\r\n },\r\n '& .dimension': {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n flexWrap: 'wrap',\r\n gap: '4px',\r\n margin: '8px 0 0 0',\r\n padding: '0 0 16px 0',\r\n '& .dimensionItem': {\r\n alignItems: 'normal',\r\n backgroundColor: '#F3F2F1',\r\n borderRadius: 3,\r\n display: 'flex',\r\n flexDirection: 'row',\r\n gap: '6px',\r\n fontWeight: 600,\r\n padding: '4px 0px 4px 10px',\r\n height: '30px',\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 },\r\n },\r\n },\r\n },\r\n errorContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n '& .error': {\r\n color: '#A80000',\r\n },\r\n },\r\n});\r\n\r\nexport const FinalURLsEditor = (props) => {\r\n const {\r\n i18n,\r\n isOpen,\r\n onClose,\r\n onChange,\r\n finalUrlExpansions,\r\n } = props;\r\n\r\n const classes = useDefaultStyles(getFinalURLSectionStyle);\r\n\r\n const [newFinalUrlExpansions, setNewFinalUrlExpansions] = useState(finalUrlExpansions);\r\n const [urls, rules, labels] = useMemo(() => extractExclusionRules(newFinalUrlExpansions), [newFinalUrlExpansions]);\r\n const [selectedOption, setSelectedOption] = useState(EXCLUSTION_TYPE.URL);\r\n const [input, setInput] = useState('');\r\n const [validationErrors, setValidationErrors] = useState([]);\r\n\r\n const onAddTag = useCallback(() => {\r\n if (!input) return;\r\n if (selectedOption === EXCLUSTION_TYPE.URL) {\r\n const newUrl = withHttpsPrefix(input);\r\n if (!urls.includes(newUrl)) {\r\n setNewFinalUrlExpansions([...newFinalUrlExpansions, convertURLEqualsToCriterion(newUrl)]);\r\n }\r\n } else if (selectedOption === EXCLUSTION_TYPE.Rule) {\r\n // Current UI doesn't support multiple AND for a single URL condition so just ignore the case.\r\n const flattenRules = rules.filter(rule => rule.length === 1).flat();\r\n if (!flattenRules.includes(input)) {\r\n setNewFinalUrlExpansions([...newFinalUrlExpansions, convertURLContainsToCriterion(input)]);\r\n }\r\n } else if (selectedOption === EXCLUSTION_TYPE.Label) {\r\n if (!labels.includes(input)) {\r\n setNewFinalUrlExpansions([...newFinalUrlExpansions, convertCustomLabelToCriterion(input)]);\r\n }\r\n }\r\n setInput('');\r\n }, [input, setInput, urls, rules, labels, selectedOption, newFinalUrlExpansions]);\r\n\r\n const onRemovetag = useCallback((value, id, seletedGroup) => {\r\n if (seletedGroup === EXCLUSTION_TYPE.Rule) {\r\n const target = keywordsToCriterionName(value);\r\n setNewFinalUrlExpansions(newFinalUrlExpansions.filter((exclusion) => {\r\n const criterionName = get(exclusion, ['Criterion', 'WebPage', 'Parameter', 'CriterionName'], '');\r\n return criterionName !== target;\r\n }));\r\n } else {\r\n setNewFinalUrlExpansions(newFinalUrlExpansions.filter((exclusion) => {\r\n const { ArgumentOperand } = get(exclusion, ['Criterion', 'WebPage', 'Parameter', 'Conditions', 0], {});\r\n return ArgumentOperand !== value;\r\n }));\r\n }\r\n }, [newFinalUrlExpansions]);\r\n\r\n const onSave = useCallback(() => {\r\n onChange({ finalUrlExpansions: newFinalUrlExpansions });\r\n onClose();\r\n }, [newFinalUrlExpansions, onChange, onClose]);\r\n\r\n const options = [\r\n { key: EXCLUSTION_TYPE.URL, text: i18n.getString(_TL_('URLs')), data: { icon: 'Accept' } },\r\n { key: EXCLUSTION_TYPE.Rule, text: i18n.getString(_TL_('URL contains')), data: { icon: 'Accept' } },\r\n { key: EXCLUSTION_TYPE.Label, text: i18n.getString(_TL_('Custom labels')), data: { icon: 'Accept' } },\r\n ];\r\n\r\n const renderInputField = useCallback(() => {\r\n switch (selectedOption) {\r\n case EXCLUSTION_TYPE.URL:\r\n return (\r\n \r\n );\r\n case EXCLUSTION_TYPE.Rule:\r\n return (\r\n \r\n );\r\n case EXCLUSTION_TYPE.Label:\r\n return (\r\n \r\n );\r\n default:\r\n return null;\r\n }\r\n }, [classes, i18n, selectedOption, input]);\r\n\r\n const renderUrlTags = useCallback(() => (\r\n
\r\n \r\n
{i18n.getString(_TL_('URLs that should be excluded'))}:
\r\n
\r\n { map(urls, (url, index) => (\r\n
\r\n \r\n onRemovetag(url, index, EXCLUSTION_TYPE.URL)}\r\n />\r\n
\r\n )) }\r\n
\r\n
\r\n ), [i18n, urls, onRemovetag]);\r\n\r\n const renderRuleTags = useCallback(() => (\r\n
\r\n \r\n
{i18n.getString(_TL_('Rules to exclude non-commercial pages or sections of your website'))}:
\r\n
\r\n {\r\n map(rules, (rule, index) => {\r\n const tag = keywordsToCriterionName(rule);\r\n return (\r\n
\r\n \r\n onRemovetag(rule, index, EXCLUSTION_TYPE.Rule)}\r\n />\r\n
\r\n );\r\n })\r\n }\r\n
\r\n
\r\n ), [i18n, rules, onRemovetag]);\r\n\r\n const renderCustomLabelTags = useCallback(() => (\r\n
\r\n \r\n
{i18n.getString(_TL_('Specific which labels from page feeds to exlude'))}:
\r\n
\r\n { map(labels, (label, index) => (\r\n
\r\n \r\n onRemovetag(label, index, EXCLUSTION_TYPE.Label)}\r\n />\r\n
\r\n )) }\r\n
\r\n
\r\n ), [i18n, labels, onRemovetag]);\r\n\r\n const renderDropdownOptions = useCallback(option => (\r\n
\r\n {option.data && option.data.icon && option.key === selectedOption && (\r\n \r\n )}\r\n {option.text}\r\n
\r\n ), [classes, selectedOption]);\r\n\r\n const renderPanelFooter = useCallback(() => (\r\n
\r\n \r\n {i18n.getString(_TL_('Apply'))}\r\n \r\n \r\n {i18n.getString(_TL_('Cancel'))}\r\n \r\n
\r\n ), [i18n, onClose, onSave]);\r\n\r\n const renderValidationErrors = useCallback(() => (\r\n
\r\n { validationErrors.map(message => {message}) }\r\n
\r\n ), [classes, validationErrors]);\r\n\r\n const onValidate = useCallback((result) => {\r\n const { data, messages } = result;\r\n const newInput = data.input || data.rule || data.label;\r\n setValidationErrors(messages);\r\n setInput(newInput);\r\n }, []);\r\n\r\n return (\r\n <>\r\n \r\n \r\n
{i18n.getString(_TL_('Enter URLs or create rules to exclude non-commercial pages or sections of your website'))}.
\r\n
\r\n setSelectedOption(selected.key)}\r\n />\r\n { renderInputField() }\r\n
\r\n { renderValidationErrors() }\r\n 0}\r\n />\r\n \r\n
\r\n { urls.length > 0 && renderUrlTags() }\r\n { rules.length > 0 && renderRuleTags() }\r\n { labels.length > 0 && renderCustomLabelTags() }\r\n
\r\n \r\n \r\n );\r\n};\r\n\r\nFinalURLsEditor.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n finalUrlExpansions: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n onClose: PropTypes.func.isRequired,\r\n isOpen: PropTypes.bool.isRequired,\r\n};\r\n","import React, { useCallback, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n Button,\r\n Checkbox,\r\n} from '@fluentui/react-components';\r\nimport classNames from 'classnames';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { TurnOnAllAlert, FullyOptimizedAlert } from './alerts';\r\nimport { FinalUrlExpansionPreview } from './final-url-expansion-preview';\r\nimport { FinalURLsEditor } from './side-panel/final-url-expansion-editor';\r\n\r\nconst getAutoGeneratedAssetsStyles = () => ({\r\n root: {\r\n position: 'relative',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n gap: '12px',\r\n },\r\n OptionContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n gap: '8px',\r\n },\r\n assetsOption: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n gap: '4px',\r\n '& label': {\r\n padding: '0px 0px 0px 8px',\r\n },\r\n '& .editorButton': {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n justifyContent: 'flex-start',\r\n paddingLeft: '28px',\r\n width: 'fit-content',\r\n },\r\n '& input[type=\"checkbox\"]': {\r\n boxSizing: 'border-box',\r\n cursor: 'inherit',\r\n height: '100%',\r\n margin: '0px',\r\n opacity: 0,\r\n position: 'absolute',\r\n top: '0px',\r\n },\r\n '& .fui-Checkbox__indicator': {\r\n margin: '0px',\r\n },\r\n '& .checkboxDescription': {\r\n paddingLeft: '28px',\r\n },\r\n },\r\n});\r\n\r\nexport const AutoGeneratedAssetsImpl = (props) => {\r\n const {\r\n i18n,\r\n finalUrlExpansions,\r\n options,\r\n onChange,\r\n } = props;\r\n const textAssetChecked = !options.autoGeneratedTextOptOut;\r\n const imageAssetChecked = !options.autoGeneratedImageOptOut;\r\n const finalUrlChecked = !options.finalUrlExpansionOptOut;\r\n\r\n const styles = useDefaultStyles(getAutoGeneratedAssetsStyles);\r\n const [toggleFinalURLsEditor, setToggleFinalURLsEditor] = useState(false);\r\n\r\n const onOpenFinalUrlEditor = useCallback(() => setToggleFinalURLsEditor(true), []);\r\n\r\n const renderAlert = useCallback(() => {\r\n if (textAssetChecked && imageAssetChecked && finalUrlChecked) {\r\n return ;\r\n }\r\n return ;\r\n }, [textAssetChecked, imageAssetChecked, finalUrlChecked]);\r\n\r\n const renderFinalUrlExpansionPreview = useCallback(() => {\r\n if (finalUrlChecked && finalUrlExpansions && finalUrlExpansions.length > 0) {\r\n return (\r\n \r\n );\r\n }\r\n return (\r\n \r\n {i18n.getString(_TL_('Exclude some URLs'))}\r\n \r\n );\r\n }, [finalUrlChecked, finalUrlExpansions, onOpenFinalUrlEditor, i18n, onChange]);\r\n\r\n return (\r\n
\r\n {i18n.getString(_TL_('Microsoft Advertising will automatically generate relevant assets in combination with the assets you provide to maximize your ad performance. Choose which assets you’d like us to automatically generate.'))}\r\n { renderAlert() }\r\n
\r\n
\r\n onChange({ autoGeneratedTextOptOut: !data.checked })}\r\n />\r\n
{i18n.getString(_TL_('Generate text assets in combination with assets you provide.'))}
\r\n
\r\n
\r\n onChange({ autoGeneratedImageOptOut: !data.checked })}\r\n />\r\n
{i18n.getString(_TL_('Generate image assets pulled from your ads, business domain, and landing page in combination with image assets you provide.'))}
\r\n
\r\n
\r\n onChange({ finalUrlExpansionOptOut: !data.checked })}\r\n />\r\n
{i18n.getString(_TL_('Send potential customers to the most relevant URLs on your website when it’s likely to enhance ad performance.'))}
\r\n { renderFinalUrlExpansionPreview() }\r\n {toggleFinalURLsEditor && (\r\n setToggleFinalURLsEditor(false)}\r\n onChange={onChange}\r\n finalUrlExpansions={finalUrlExpansions}\r\n />\r\n )}\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nAutoGeneratedAssetsImpl.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n finalUrlExpansions: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n options: PropTypes.shape({\r\n autoGeneratedTextOptOut: PropTypes.bool,\r\n autoGeneratedImageOptOut: PropTypes.bool,\r\n finalUrlExpansionOptOut: PropTypes.bool,\r\n }).isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n};\r\n","/* eslint-disable react-hooks/exhaustive-deps */\r\nimport 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 { AutoGeneratedAssetsImpl } from './auto-generated-assets-impl';\r\n\r\nconst AutoGeneratedAssets = ({ validationProps, updateValidation }) => {\r\n const activity = useContext(ActivityContext);\r\n const i18n = useContext(I18nContext);\r\n const { data: { finalUrlExpansions, options } } = validationProps;\r\n const onChange = useCallback((newData) => {\r\n updateValidation([], newData);\r\n if (activity) {\r\n activity.signal(`onAutoGeneratedAssetsChange - ${JSON.stringify(newData)}`);\r\n }\r\n }, [updateValidation]);\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nAutoGeneratedAssets.propTypes = {\r\n validationProps: PropTypes.shape({\r\n data: PropTypes.shape({\r\n finalUrlExpansions: PropTypes.arrayOf(PropTypes.shape({})),\r\n options: PropTypes.shape({\r\n autoGeneratedTextOptOut: PropTypes.bool,\r\n autoGeneratedImageOptOut: PropTypes.bool,\r\n finalUrlExpansionOptOut: PropTypes.bool,\r\n }),\r\n }),\r\n }).isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n};\r\n\r\nexport const ValidatedAutoGeneratedAssets = withCustomValidation(AutoGeneratedAssets);\r\n","export const getCPSStyles = () => ({\r\n cpsOptions: {\r\n '& .alert-container': {\r\n marginTop: 8,\r\n },\r\n },\r\n});\r\n","/* eslint-disable react/no-danger */\r\n/* eslint-disable react-hooks/exhaustive-deps */\r\nimport React, { useCallback, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Alert } from '@bingads-webui-react/alert';\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 { HelpPopup } from '@bingads-webui-react/help-popup';\r\nimport { withVerticalAlignCenterSpan } from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport { Checkbox } from '@bingads-webui-react/fabric-control';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { LearnMoreLink } from '@bingads-webui-campaign-react/help';\r\nimport { getCPSStyles } from './style';\r\n\r\n\r\nconst CostPerSale = ({ validationProps, updateValidation }) => {\r\n const activity = useContext(ActivityContext);\r\n const i18n = useContext(I18nContext);\r\n const { data: costPerSaleOptOut } = validationProps;\r\n const onChange = useCallback((newData) => {\r\n updateValidation([], newData);\r\n if (activity) {\r\n activity.signal(`onCPSOptionChange - ${JSON.stringify(newData)}`);\r\n }\r\n }, [updateValidation]);\r\n\r\n const classes = useDefaultStyles(getCPSStyles);\r\n\r\n return (\r\n
\r\n onChange({ costPerSaleOptOut: !isChecked })}\r\n onRenderLabel={withVerticalAlignCenterSpan(() => ())}\r\n />\r\n {costPerSaleOptOut &&\r\n
\r\n For the best results, consider turning on CPS bid option.')) }} />\r\n )}\r\n linkText={i18n.getString(_TL_('Learn more'))}\r\n href=\"https://help.ads.microsoft.com/#apex/ads/en/56786/1/#CPS\"\r\n linkType=\"directLink\"\r\n />\r\n )}\r\n level=\"Info\"\r\n icon={(
)}\r\n dismissible={false}\r\n />\r\n
}\r\n
\r\n );\r\n};\r\n\r\nCostPerSale.propTypes = {\r\n validationProps: PropTypes.shape({\r\n data: PropTypes.shape({\r\n costPerSaleOptOut: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n};\r\n\r\nexport const ValidatedCostPerSale = withCustomValidation(CostPerSale);\r\n","import { isArray, isEmpty, negate, some } from 'underscore';\r\n\r\n/**\r\n * @typedef {Object} EntityAndParentID\r\n * @property {string|number} EntityID Entity ID\r\n * @property {string|number} ParentID Parent Entity ID\r\n */\r\n\r\n\r\n/**\r\n * @typedef {Object} AppealBaseOptions\r\n * @property {number} cid Customer ID\r\n * @property {number} aid Account ID\r\n * @property {Object} permissions Permissions\r\n */\r\n\r\nconst isValidEntityAndParentID = entityAndParentID =>\r\n entityAndParentID && entityAndParentID.EntityID && entityAndParentID.ParentID;\r\n\r\n\r\nclass AppealBase {\r\n constructor(options) {\r\n this.options = options;\r\n }\r\n}\r\n\r\nexport class AppealByIDsForParentEntity extends AppealBase {\r\n /**\r\n * Initialized AppealByIDsForParentEntity\r\n * @param {AppealBaseOptions} options options\r\n * @param {number|string} parentId parent entity ID\r\n * @param {Array} ids array of entity IDs\r\n */\r\n constructor(options, parentId, ids) {\r\n super(options);\r\n if (!parentId) {\r\n throw new Error('parentId is required');\r\n }\r\n if (!isArray(ids) || isEmpty(ids)) {\r\n throw new Error('ids is required and must be an array');\r\n }\r\n this.parentId = parentId;\r\n this.ids = ids;\r\n }\r\n}\r\n\r\nexport class AppealAllForParentEntity extends AppealBase {\r\n constructor(options, parentId) {\r\n super(options);\r\n if (!parentId) {\r\n throw new Error('parentId is required');\r\n }\r\n this.parentId = parentId;\r\n }\r\n\r\n createAppealParamsWithIDs(ids) {\r\n return new AppealByIDsForParentEntity(this.options, this.parentId, ids);\r\n }\r\n}\r\n\r\nexport class AppealByIDs extends AppealBase {\r\n /**\r\n * Initialized AppealByIDs\r\n * @param {AppealBaseOptions} options options\r\n * @param {Array} ids array of entity+parent entity IDs\r\n */\r\n constructor(options, ids) {\r\n super(options);\r\n if (!isArray(ids) || isEmpty(ids) || some(ids, negate(isValidEntityAndParentID))) {\r\n throw new Error('ids is required and must be an array of EntityAndParentID');\r\n }\r\n this.ids = ids;\r\n }\r\n}\r\n\r\nexport class AppealAllByFilter extends AppealBase {\r\n constructor(options, filter) {\r\n super(options);\r\n if (!filter) {\r\n throw new Error('filter is required');\r\n }\r\n this.filter = filter;\r\n }\r\n}\r\n","import Promise from 'bluebird';\r\nimport * as utilities from '@bingads-webui-campaign-legacy/editorial-appeal/utilities';\r\nimport { AppealAllForParentEntity, AppealByIDsForParentEntity } from './params';\r\n\r\nexport { isAppealableStatus } from '@bingads-webui-campaign-legacy/editorial-appeal/utilities';\r\n\r\nconst toType = obj =>\r\n ({})\r\n .toString.call(obj) // returns \"[object Type]\"\r\n .substring(8, obj.length - 1); // returns \"Type\"\r\n\r\nconst assertInputs = (appealParams) => {\r\n if (!appealParams) {\r\n throw new Error('appealParams is required');\r\n }\r\n if (!(appealParams instanceof AppealByIDsForParentEntity) && !(appealParams instanceof AppealAllForParentEntity)) {\r\n // TODO: see TODOs\r\n throw new Error(`appealParams must be an instance of AppealByIDsForParentEntity, AppealAllForParentEntity. ${toType(appealParams)} is not supported`);\r\n }\r\n};\r\n\r\nconst processRejectReasonsFromOdata = (controller, permissions) =>\r\n odataResponse => (odataResponse.Errors ?\r\n Promise.reject(odataResponse.Errors) :\r\n utilities.processRejectReasonsFromOdata(odataResponse, controller, permissions));\r\n\r\n/**\r\n * @typedef {Object} AggregatedRejectReasons\r\n * @property {Array} appealIds array of entity IDs that can be appealed\r\n * @property {Array} appealData array of appeal data\r\n * @property {boolean} appealData.Appeal whether the entity has been appealed(?)\r\n * @property {string} appealData.Justification justification for appeal\r\n * @property {boolean} appealData.IsAppealable whether the entity can be appealed\r\n * @property {Array} appealData.RejectedReasons array of rejection reasons\r\n * @property {Array} appealData.RejectedTerms array of rejection terms\r\n * @property {string} appealData.EntityType entity type\r\n */\r\n\r\nconst resolveAppealParams = (appealParams) => {\r\n const {\r\n getEditorialReasonsByIDsForParentEntity, getAllEntitiesForParentEntity,\r\n } = appealParams.options;\r\n let getEditorialReasons;\r\n let appealParamsPromise;\r\n if (appealParams instanceof AppealByIDsForParentEntity ||\r\n appealParams instanceof AppealAllForParentEntity) {\r\n getEditorialReasons = getEditorialReasonsByIDsForParentEntity;\r\n\r\n if (appealParams instanceof AppealAllForParentEntity) {\r\n appealParamsPromise = getAllEntitiesForParentEntity(appealParams)\r\n .then(appealParams.createAppealParamsWithIDs.bind(appealParams));\r\n } else {\r\n appealParamsPromise = Promise.resolve(appealParams);\r\n }\r\n } // TODO: add support for AppealByIDs and AppealAllByFilter when needed\r\n\r\n return Promise.props({ getEditorialReasons, appealParams: appealParamsPromise });\r\n};\r\n\r\n/**\r\n * Fetches and aggregates editorial rejections for given entities\r\n * @param {AppealByIDsForParentEntity|AppealAllForParentEntity|AppealByIDs|AppealAllByFilter} appealParams Customer ID\r\n * @returns {Promise} a promise that resolves to an object of aggregated reject reasons\r\n */\r\nconst getAppealRejections = ({ appealParams, getEditorialReasons }) => {\r\n const {\r\n permissions,\r\n controller,\r\n } = appealParams.options;\r\n\r\n return Promise.resolve(appealParams)\r\n .then(getEditorialReasons)\r\n .then(processRejectReasonsFromOdata(controller, permissions));\r\n};\r\n\r\nexport const editorialAppealAggregator = (appealParams) => {\r\n assertInputs(appealParams);\r\n return Promise.resolve(appealParams)\r\n .then(resolveAppealParams)\r\n .then(getAppealRejections);\r\n};\r\n\r\nexport const requestAppeal = (appealParams, appealData, appealIds) => {\r\n const {\r\n requestAppealAllForParentEntity,\r\n requestAppealByIDsForParentEntity,\r\n } = appealParams.options;\r\n let requestAppealFunc;\r\n if (appealParams instanceof AppealByIDsForParentEntity) {\r\n requestAppealFunc = requestAppealByIDsForParentEntity;\r\n } else if (appealParams instanceof AppealAllForParentEntity) {\r\n requestAppealFunc = requestAppealAllForParentEntity;\r\n } // TODO: add support for AppealByIDs and AppealAllByFilter when needed\r\n\r\n return requestAppealFunc(appealParams, appealData, appealIds);\r\n};\r\n","export const getRequestFormStyle = (_, { palette = {} }) => ({\r\n requestFormContainer: {\r\n '& .form-horizontal': {\r\n margin: 0,\r\n maxWidth: 784,\r\n border: 0,\r\n boxShadow: 'none',\r\n '& .form-group': {\r\n margin: '0px 0px 18px 0px',\r\n '& .root': {\r\n width: 'unset',\r\n margin: 0,\r\n padding: 0,\r\n '& .error': {\r\n color: '#a4262c',\r\n },\r\n '& > label': {\r\n padding: 0,\r\n },\r\n '& .title': {\r\n fontWeight: 'normal',\r\n },\r\n '& .details': {\r\n margin: '27px 0px 0px 0px',\r\n padding: 0,\r\n '& .col-sm-4': {\r\n padding: '0px 0px 0px 1px',\r\n width: '50%',\r\n '& .appeal-column-title': {\r\n fontSize: 18,\r\n lineHeight: '24px',\r\n fontWeight: 'normal',\r\n },\r\n '& .reasons > ul': {\r\n margin: '1px 0px 0px 0px',\r\n paddingLeft: 0,\r\n listStyle: 'none',\r\n '& > li': {\r\n marginTop: '10px',\r\n },\r\n },\r\n },\r\n '& .col-sm-8': {\r\n width: '50%',\r\n paddingLeft: 14,\r\n paddingRight: 0,\r\n '& .appeal-column-title': {\r\n fontSize: 14,\r\n lineHeight: '19px',\r\n fontWeight: 600,\r\n },\r\n '& .appeal-textarea': {\r\n marginTop: 7,\r\n padding: 8,\r\n fontSize: 14,\r\n lineHeight: '19px',\r\n border: `1px solid ${palette.neutralSecondary}`,\r\n borderRadius: '2px',\r\n background: '#FFFFFF',\r\n width: '100%',\r\n },\r\n '& .remaining-hint': {\r\n textAlign: 'right',\r\n marginTop: 3,\r\n marginBottom: 3,\r\n fontSize: 12,\r\n lineHeight: '16px',\r\n },\r\n },\r\n },\r\n '& .non-appeal-msg-panel': {\r\n margin: '11px 0px 0px 1px',\r\n },\r\n },\r\n },\r\n },\r\n },\r\n});\r\n","import { clone } from 'underscore';\r\nimport Backbone from 'backbone';\r\nimport React, { useEffect, useRef, 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 EditorView from '@bingads-webui-campaign-legacy/editorial-appeal/view/editor';\r\nimport '@bingads-webui-campaign/ko-stop-binding';\r\nimport { getRequestFormStyle } from './style';\r\n\r\nexport const LegacyEditorialAppealRequestForm = React.memo(({\r\n id, className, appealTitle, infoMsg, appealData, appealIds, onChange,\r\n}) => {\r\n const view = useRef();\r\n const viewListener = useMemo(() => clone(Backbone.Events), []);\r\n let container;\r\n\r\n useEffect(() => {\r\n view.current = new EditorView({\r\n appealData,\r\n appealTitle,\r\n infoMsg,\r\n hideAppealCheckBox: true,\r\n isForVNext: true,\r\n withRealTimeUpdates: true,\r\n });\r\n\r\n viewListener.listenTo(view.current, 'change', onChange);\r\n\r\n view.current.render();\r\n view.current.$el.appendTo(container);\r\n\r\n view.current.toBulk(appealIds);\r\n\r\n return () => {\r\n viewListener.stopListening(view.current);\r\n view.current.remove();\r\n };\r\n }, [appealTitle, container, appealData, appealIds, infoMsg, viewListener, onChange]);\r\n\r\n const classes = useDefaultStyles(getRequestFormStyle);\r\n\r\n return (\r\n \r\n
{ container = ref; }} />\r\n
\r\n );\r\n});\r\n\r\nLegacyEditorialAppealRequestForm.propTypes = {\r\n id: PropTypes.string,\r\n className: PropTypes.string,\r\n appealData: PropTypes.shape({}).isRequired,\r\n appealIds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])).isRequired,\r\n appealTitle: PropTypes.string.isRequired,\r\n infoMsg: PropTypes.string,\r\n onChange: PropTypes.func.isRequired,\r\n};\r\n\r\nLegacyEditorialAppealRequestForm.defaultProps = {\r\n id: undefined,\r\n className: undefined,\r\n infoMsg: undefined,\r\n};\r\n","import React, { useEffect, useRef } 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 InlineErrorView from '@bingads-webui-campaign-legacy/editorial-appeal/view/inline-error';\r\nimport '@bingads-webui-campaign/ko-stop-binding';\r\nimport { getRequestFormStyle } from './style';\r\n\r\nexport const LegacyInlineErrorView = React.memo(({\r\n id, className,\r\n}) => {\r\n const view = useRef();\r\n let container;\r\n\r\n useEffect(() => {\r\n view.current = new InlineErrorView({ rowId: 'bulk', useKwCss: true });\r\n\r\n view.current.render();\r\n view.current.$el.appendTo(container);\r\n\r\n return () => {\r\n view.current.remove();\r\n };\r\n }, [container]);\r\n\r\n const classes = useDefaultStyles(getRequestFormStyle);\r\n\r\n return (\r\n \r\n
{ container = ref; }} />\r\n
\r\n );\r\n});\r\n\r\nLegacyInlineErrorView.propTypes = {\r\n id: PropTypes.string,\r\n className: PropTypes.string,\r\n};\r\n\r\nLegacyInlineErrorView.defaultProps = {\r\n id: undefined,\r\n className: undefined,\r\n};\r\n","import { first } from 'underscore';\r\nimport React, { useCallback, useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { DefaultButton, PrimaryButton, Panel, PanelType, Stack } from '@fluentui/react';\r\nimport { LegacyEditorialAppealRequestForm, LegacyInlineErrorView } from '@bingads-webui-campaign-react/legacy-editorial-appeal-request-form';\r\nimport { UiBlocker } from '@bingads-webui-react/ui-blocker';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { mergeStyles, fabricPanelFixStyle } from '@bingads-webui-campaign-react/common-styles';\r\n\r\nconst PANEL_WIDTH = 784;\r\n\r\nexport const panelStylesProp = {\r\n footer: {\r\n ...fabricPanelFixStyle().footer,\r\n },\r\n commands: {\r\n zIndex: 1,\r\n },\r\n content: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n },\r\n};\r\n\r\nconst getStyles = (components, theme = {}) => ({\r\n uiBlockerAdapter: {\r\n ...mergeStyles(\r\n { theme },\r\n components.reactUIBlockerStyle(theme.palette, 'rgba(255, 255, 255, 0.4)'),\r\n {\r\n '& .react-block-ui-none, & .react-block-ui': {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n flexGrow: 1,\r\n overflowY: 'hidden', // to not extend to the content, but shrink to flex-parent\r\n },\r\n },\r\n {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n flexGrow: 1,\r\n overflowY: 'hidden',\r\n }\r\n ),\r\n },\r\n});\r\n\r\nexport const EditorialAppealRequestPanel = ({\r\n i18n, onSave, onCancel, title, appealDataPromise,\r\n}) => {\r\n const [appealData, setAppealData] = useState(null);\r\n const [appealIds, setAppealIds] = useState([]);\r\n const [isBusy, setIsBusy] = useState(true);\r\n const [hasError, setHasError] = useState(false);\r\n\r\n const handleAppealData = useCallback((aggregatedRejectReasons) => {\r\n setAppealData(first(aggregatedRejectReasons.appealData));\r\n setAppealIds(aggregatedRejectReasons.appealIds);\r\n }, []);\r\n const handleAppealDataError = useCallback(() => {\r\n setHasError(true);\r\n }, []);\r\n\r\n useEffect(() => {\r\n setIsBusy(true);\r\n setAppealData(null);\r\n setAppealIds([]);\r\n setHasError(false);\r\n appealDataPromise.then(handleAppealData).catch(handleAppealDataError).finally(() => setIsBusy(false));\r\n }, [appealDataPromise, handleAppealData, handleAppealDataError]);\r\n\r\n const [editorialAppealFormData, setEditorialAppealFormData] = useState();\r\n const [isEditorialAppealFormDataValid, setIsEditorialAppealFormDataValid] = useState(false);\r\n const onEditorialAppealChange = useCallback((data, isValid) => {\r\n setEditorialAppealFormData(data);\r\n setIsEditorialAppealFormDataValid(isValid);\r\n }, []);\r\n\r\n const onSaveClick = useCallback(() => {\r\n onSave(editorialAppealFormData, appealIds);\r\n }, [onSave, editorialAppealFormData, appealIds]);\r\n\r\n const onCancelClick = useCallback(() => {\r\n onCancel();\r\n }, [onCancel]);\r\n\r\n const classes = useDefaultStyles(getStyles);\r\n\r\n const onRenderFooterContent = useCallback(() => (\r\n \r\n \r\n \r\n {i18n.getString(_TL_('Request exception'))}\r\n \r\n \r\n \r\n \r\n {i18n.getString(_TL_('Cancel'))}\r\n \r\n \r\n \r\n ), [i18n, onSaveClick, onCancelClick, hasError, isEditorialAppealFormDataValid]);\r\n\r\n\r\n return (\r\n \r\n \r\n {hasError &&\r\n \r\n }\r\n {!hasError && appealData &&\r\n \r\n }\r\n \r\n \r\n );\r\n};\r\n\r\nEditorialAppealRequestPanel.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n title: PropTypes.string.isRequired,\r\n onSave: PropTypes.func.isRequired,\r\n onCancel: PropTypes.func.isRequired,\r\n appealDataPromise: PropTypes.shape({\r\n then: PropTypes.func.isRequired,\r\n catch: PropTypes.func.isRequired,\r\n finally: PropTypes.func.isRequired,\r\n }).isRequired,\r\n};\r\n\r\nEditorialAppealRequestPanel.defaultProps = {\r\n};\r\n","/* eslint-disable no-param-reassign */\r\nimport ko from 'knockout';\r\nimport { isArray, each, bind, isEqual } from 'underscore';\r\nimport React from 'react';\r\nimport classnames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport { Toggle, Text } from '@fluentui/react';\r\nimport { cloneDeep } from '@bingads-webui-universal/primitive-utilities';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport AutoTargetView from '@bingads-webui-campaign-legacy/auto-targets/view/create/index';\r\nimport { dsaCampaignStyles, creationCommonStyle, campaignSettingsStyles, adgroupsKeywordsStyles } from '@bingads-webui-campaign-react/campaign-adgroup-settings-shared-styles';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\n\r\nexport const getStyles = (_, { palette = {} }) => (\r\n Object.assign(\r\n {},\r\n {\r\n finalUrlContainer: Object.assign(\r\n {},\r\n creationCommonStyle({ palette }),\r\n dsaCampaignStyles({ palette }),\r\n campaignSettingsStyles({ palette }),\r\n adgroupsKeywordsStyles({ palette })\r\n ),\r\n }\r\n )\r\n);\r\n\r\nclass LegacyFinalUrlExpansionUnStyled extends React.Component {\r\n static propTypes = {\r\n data: PropTypes.shape({\r\n length: PropTypes.number,\r\n }).isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n setFinalUrlExpansionsView: PropTypes.func.isRequired,\r\n isFinalUrlExpansionEnabled: PropTypes.bool.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n classes: PropTypes.shape({\r\n finalUrlContainer: PropTypes.string,\r\n }).isRequired,\r\n };\r\n constructor(props) {\r\n super(props);\r\n\r\n const { isFinalUrlExpansionEnabled } = props;\r\n this.state = { isFinalUrlExpansionEnabled };\r\n this.view = React.createRef();\r\n this.container = null;\r\n this.operatorMap = {\r\n Equals: this.props.i18n.getString(_TL_('equals')),\r\n Contains: this.props.i18n.getString(_TL_('contains')),\r\n };\r\n\r\n this.operandMap = {\r\n Url: this.props.i18n.getString(_TL_('URL')),\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n this.setViewAndUpdateViewModel();\r\n }\r\n\r\n componentDidUpdate(prevProps) {\r\n if (!isEqual(prevProps.data, this.props.data) || prevProps.isFinalUrlExpansionEnabled !== this.props.isFinalUrlExpansionEnabled) {\r\n this.setViewAndUpdateViewModel();\r\n }\r\n // We will refresh the view if data changes\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }\r\n\r\n setViewAndUpdateViewModel() {\r\n if (this.state.isFinalUrlExpansionEnabled) {\r\n if (!this.view.current) {\r\n this.view.current = new AutoTargetView({\r\n isForVNext: true,\r\n onChange: bind((newData) => {\r\n this.props.onChange({\r\n finalUrlExpansionOptOut: !this.state.isFinalUrlExpansionEnabled,\r\n finalUrlExpansionsBulkUpsert: newData,\r\n });\r\n }),\r\n isNegativeAutoTarget: true,\r\n isShowUrlOnly: true,\r\n selectedItem: 'mixedspecificwebpage',\r\n hideViewSelection: true,\r\n hideWebsiteLabel: true,\r\n isExclude: true,\r\n });\r\n }\r\n\r\n this.view.current.render();\r\n this.view.current.$el.appendTo(this.container);\r\n this.props.setFinalUrlExpansionsView(this.view);\r\n\r\n if (isArray(this.props.data)) {\r\n let toAddToViewModel = [];\r\n this.view.current.updateViewModels(cloneDeep(this.props.data));\r\n each(this.props.data, (target) => {\r\n let isExactMatch = false;\r\n const conditions = target.Criterion.WebPage.Parameter.Conditions;\r\n const results = [];\r\n\r\n each(conditions, (condition) => {\r\n if (condition.Operator === 'Equals') {\r\n isExactMatch = true;\r\n results.push({\r\n conditions: [{\r\n Operand: condition.Operand,\r\n ArgumentOperand: condition.ArgumentOperand,\r\n Operator: condition.Operator,\r\n DisplayOperator: this.operatorMap[condition.Operator],\r\n DisplayOperand: this.operandMap[condition.Operand],\r\n },\r\n ],\r\n type: 'exacturls',\r\n });\r\n } else {\r\n results.push({\r\n Operand: ko.observable(condition.Operand),\r\n ArgumentOperand: ko.observable(condition.ArgumentOperand),\r\n Operator: ko.observable(condition.Operator),\r\n DisplayOperator: ko.observable(this.operatorMap[condition.Operator]),\r\n DisplayOperand: ko.observable(this.operandMap[condition.Operand]),\r\n });\r\n }\r\n });\r\n\r\n if (isExactMatch) {\r\n toAddToViewModel = toAddToViewModel.concat(results);\r\n } else {\r\n toAddToViewModel.push({\r\n conditions: results,\r\n type: 'specificpage',\r\n shouldCheckArgumentOperandFormat: true,\r\n });\r\n }\r\n });\r\n if (this.props.data.length > 0) {\r\n this.view.current.selectedTargetsView.viewmodel.addBatch(toAddToViewModel);\r\n }\r\n }\r\n\r\n return () => {\r\n this.view.current.remove();\r\n };\r\n }\r\n return null;\r\n }\r\n\r\n static i8n = I18nContext;\r\n\r\n render() {\r\n const onToggle = (event, checked) => {\r\n this.setState({\r\n isFinalUrlExpansionEnabled: checked,\r\n }, () => {\r\n if (!checked) {\r\n this.view.current.selectedTargetsView.viewmodel.clear();\r\n } else {\r\n this.props.onChange({\r\n finalUrlExpansionOptOut: false,\r\n });\r\n }\r\n });\r\n };\r\n\r\n return (\r\n \r\n \r\n {this.state.isFinalUrlExpansionEnabled &&\r\n
\r\n
\r\n \r\n {this.props.i18n.getString(_TL_('You have the option to exclude certain webpages from being displayed in your ads. Please note that these URLs won’t appear in your ads even if you’ve enabled Final URL expansion. The exclusion list requires 24 hours for it to become fully effective.'))}\r\n \r\n
\r\n
{ this.container = ref; }} />\r\n
\r\n }\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport const LegacyFinalUrlExpansion = withDefaultStyles(LegacyFinalUrlExpansionUnStyled, getStyles);\r\n","/* eslint-disable react-hooks/exhaustive-deps */\r\nimport 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 { LegacyFinalUrlExpansion } from './legacy-final-url-expansion';\r\n\r\n\r\nconst LegacyFinalUrlExpansionWithCustomValidation = ({ validationProps, updateValidation, ...restProps }) => {\r\n const { data: finalUrlExpansions } = validationProps;\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const i18n = useContext(I18nContext);\r\n const onChange = useCallback((newData) => {\r\n updateValidation([], newData);\r\n\r\n if (activity) {\r\n activity.signal(`onLegacyFinalUrlExpansionChange - ${JSON.stringify(newData)}`);\r\n }\r\n }, [updateValidation]);\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nLegacyFinalUrlExpansionWithCustomValidation.propTypes = {\r\n validationProps: PropTypes.shape({\r\n data: PropTypes.shape({}),\r\n }).isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n};\r\n\r\nexport const ValidatedLegacyFinalUrlExpansion = withCustomValidation(LegacyFinalUrlExpansionWithCustomValidation);\r\n","export const LISTING_GROUP_PERF_MARKER = 'Listing_Group';\r\nexport const LISTING_GROUP_TREE_ROUTING = '/campaign/vnext/listinggroups/hierarchy';\r\nexport const LISTING_GROUP_LIST_ROUTING = '/campaign/vnext/listinggroups/list';\r\nexport enum GridType {\r\n List = 'List',\r\n Tree = 'Tree',\r\n}\r\nexport const GRID_NAME = 'ListingGroupGrid';\r\nexport const columnChooserId = 'dropdown-column-chooser';\r\nexport enum ScopeLevel {\r\n Campaign = 'campaign',\r\n AssetGroup = 'assetGroup',\r\n}\r\nexport const nameColumnOdataPath = 'Condition/Attribute';\r\n\r\nexport const treeViewButtonId = 'button-hierarchy-view';\r\n\r\nexport const listViewButtonId = 'button-list-view';\r\n\r\nexport const firstColumnName = 'primary';\r\nexport const conversionsFiledName = 'conversions';\r\nexport const impressionsFiledName = 'impressions';\r\nexport const clicksFiledName = 'clicks';\r\nexport const hotelsFiledName = 'hotels';\r\n\r\nexport const EVERYTHING_ELSE_NODE_ATTRIBUTE = '';\r\n\r\nexport type NullPartial = {\r\n [P in keyof T]: T[P] | null;\r\n};\r\n","import { mergeStyles } from '@fluentui/react';\r\n\r\nexport const paginatorStyleClassName = mergeStyles({\r\n display: 'flex',\r\n '& .page-size-selector': {\r\n display: 'flex',\r\n '& .page-size-selector-dropdown': {\r\n marginLeft: 8,\r\n },\r\n },\r\n '& .page-index-selector': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n marginLeft: 12,\r\n '& .page-index-selector-dropdown': {\r\n marginRight: 8,\r\n },\r\n '& .page-change-icon': {\r\n marginLeft: 8,\r\n marginRight: 8,\r\n },\r\n },\r\n});\r\n","/* eslint-disable react/prop-types */\r\n/* eslint-disable react/jsx-filename-extension */\r\nimport { assert } from '@bingads-webui-campaign-react/debug-assert';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Dropdown, IconButton, IDropdownOption, Label, IDropdownProps } from '@fluentui/react';\r\nimport { useId } from '@fluentui/react-hooks';\r\nimport React, { FC, useContext } from 'react';\r\nimport { paginatorStyleClassName } from './paginator.styles';\r\n\r\nexport interface PaginatorProps {\r\n className?: string;\r\n /**\r\n * @default _TL_(\"Show rows:\")\r\n */\r\n pageSizeLabel?: string;\r\n /**\r\n * @default [10,20,50]\r\n */\r\n pageSizeOptions?: number[];\r\n totalCount: number;\r\n currentPage: number;\r\n pageSize: number;\r\n onPageIndexChange(pageNum: number): void;\r\n onPageSizeChange(pageSize: number): void;\r\n}\r\n\r\nfunction buildPageSizeOptions(selectedPageSize: number, pageSizeOptions: number[]): IDropdownOption[] {\r\n assert(pageSizeOptions.includes(selectedPageSize));\r\n return pageSizeOptions.map(pageSize => ({\r\n key: pageSize,\r\n text: pageSize.toString(),\r\n selected: selectedPageSize === pageSize,\r\n data: pageSize,\r\n }));\r\n}\r\n\r\nfunction buildPageIndexOptions(selectedPageIndex: number, pageIndexOptions: number[]): IDropdownOption[] {\r\n assert(pageIndexOptions.includes(selectedPageIndex));\r\n return pageIndexOptions.map(pageIndex => ({\r\n key: pageIndex,\r\n text: pageIndex.toString(),\r\n selected: selectedPageIndex === pageIndex,\r\n data: pageIndex,\r\n }));\r\n}\r\n\r\nexport const Paginator: FC = (props) => {\r\n const {\r\n className,\r\n currentPage,\r\n onPageIndexChange,\r\n onPageSizeChange,\r\n pageSize,\r\n totalCount,\r\n pageSizeLabel = _TL_('Show rows:'),\r\n pageSizeOptions = [10, 20, 50],\r\n } = props;\r\n assert(currentPage >= 1);\r\n const i18n: any = useContext(I18nContext);\r\n const pageCount = Math.ceil(totalCount / pageSize);\r\n\r\n const pageSizeSelectorId = useId('page-size-selector');\r\n const pageSizeSelectorOptions = buildPageSizeOptions(pageSize, pageSizeOptions);\r\n const pageIndexSelectorOptions = buildPageIndexOptions(currentPage, Array.from(Array(pageCount), (_, i) => i + 1));\r\n\r\n const PREVIOUS_BUTTON = i18n.getString(_TL_('Previous page'));\r\n const NEXT_BUTTON = i18n.getString(_TL_('Next page'));\r\n\r\n function pageIndexChangeHandler(newPageIndex: number) {\r\n onPageIndexChange(newPageIndex);\r\n }\r\n\r\n function onPageSizeSelectorChange(event: React.FormEvent, option?: IDropdownOption) {\r\n const newPageSize = option.data;\r\n onPageSizeChange(newPageSize);\r\n\r\n // when change page size, the currentPageIndex might be out of range. If so, set it to the new last page.\r\n const newMaxPageNum = Math.ceil(totalCount / newPageSize);\r\n if (currentPage > newMaxPageNum) {\r\n pageIndexChangeHandler(newMaxPageNum);\r\n }\r\n }\r\n\r\n const onPageIndexSelectorChange: IDropdownProps['onChange'] = (event, option) => {\r\n pageIndexChangeHandler(option.data);\r\n };\r\n\r\n return (\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n { pageIndexChangeHandler(currentPage - 1); }}\r\n />\r\n \r\n {` / ${pageCount}`}\r\n { pageIndexChangeHandler(currentPage + 1); }}\r\n />\r\n
\r\n
\r\n );\r\n};\r\n","/* eslint-disable react/prop-types */\r\n/* eslint-disable react/jsx-filename-extension */\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { DefaultButton, PrimaryButton, Stack, TextField, ITextFieldProps, mergeStyles } from '@fluentui/react';\r\nimport React, { FC, useContext, useState } from 'react';\r\n\r\nexport interface BulkAddEditorProps {\r\n className?: string;\r\n onSubmit(bulkValues: string[]): void;\r\n onCancel(): void;\r\n}\r\n\r\nfunction formatRawString(value: string) {\r\n const values = value.split(/[\\n\\r]/).map(str => str.trim()).filter(str => str !== '');\r\n const unqiue = new Set();\r\n const res: string[] = [];\r\n values.forEach((v) => {\r\n if (!unqiue.has(v.toLowerCase())) {\r\n unqiue.add(v);\r\n res.push(v);\r\n }\r\n });\r\n return res;\r\n}\r\n\r\nconst bulkAddEditorStyleClassName = mergeStyles({\r\n display: 'flex',\r\n flexDirection: 'column',\r\n '& .bulk-add-editor-textarea': {\r\n paddingLeft: 16,\r\n paddingRight: 16,\r\n },\r\n});\r\n\r\n// This component is only used for add new bulk-enabled values\r\nexport const BulkAddEditor: FC = (props) => {\r\n const {\r\n className,\r\n onCancel,\r\n onSubmit,\r\n } = props;\r\n const i18n: any = useContext(I18nContext);\r\n\r\n const [value, setValue] = useState('');\r\n\r\n function onClickSubmit() {\r\n const finalValues = formatRawString(value ?? '');\r\n onSubmit(finalValues);\r\n }\r\n\r\n function onClickCancel() {\r\n onCancel();\r\n }\r\n\r\n const onValueChange: ITextFieldProps['onChange'] = (event, newValue) => {\r\n setValue(newValue);\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n {i18n.getString(_TL_('Submit'))}\r\n {i18n.getString(_TL_('Cancel'))}\r\n \r\n
\r\n
\r\n );\r\n};\r\n","/* eslint-disable react/jsx-filename-extension */\r\n/* eslint-disable react/prop-types */\r\nimport { assertIsDefined } from '@bingads-webui-campaign-react/debug-assert';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { DefaultButton, Dropdown, IColumn, IDropdownOption, Label, Panel, PanelType, PrimaryButton, ShimmeredDetailsList, Stack, Selection, IGroup, IDetailsListCheckboxProps, IRenderFunction, mergeStyles, CheckboxVisibility, CollapseAllVisibility, CommandBarButton, IIconProps, IDropdownProps, MessageBar } from '@fluentui/react';\r\nimport { useId, usePrevious } from '@fluentui/react-hooks';\r\nimport { Loading } from '@bingads-webui-campaign-react/loading';\r\nimport { ListViewSelectionZone } from '@bingads-webui-grid/well-known';\r\nimport React, { FC, useContext, useEffect, useMemo, useRef, useState } from 'react';\r\nimport { Paginator } from './paginator';\r\nimport { BulkAddEditorProps, BulkAddEditor } from './BulkAddEditor';\r\n\r\nconst panelStyles = {\r\n main: {\r\n top: 60,\r\n },\r\n content: {\r\n paddingLeft: 0,\r\n paddingRight: 0,\r\n display: 'flex',\r\n overflow: 'hidden',\r\n },\r\n footerInner: {\r\n padding: 0,\r\n borderTop: '1px solid #EDEBE9',\r\n },\r\n} as const;\r\n\r\nconst overlayProps = {\r\n styles: {\r\n root: {\r\n top: 60,\r\n },\r\n },\r\n};\r\n\r\nconst panelSelectorStyleClassName = mergeStyles({\r\n '& .content': {\r\n display: 'flex',\r\n flex: 1,\r\n flexDirection: 'column',\r\n '& .divider': {\r\n display: 'flex',\r\n marginLeft: 28,\r\n marginTop: 16,\r\n marginBottom: 16,\r\n '& .divider-dropdown': {\r\n marginLeft: 8,\r\n width: 220,\r\n },\r\n },\r\n '& .bulk-value-editor-toggler': {\r\n height: 32,\r\n marginLeft: 28,\r\n marginTop: 16,\r\n marginBottom: 6,\r\n },\r\n '& .grid': {\r\n overflow: 'hidden',\r\n display: 'flex',\r\n flex: 1,\r\n flexDirection: 'column',\r\n '& .list-view-selection-zone': {\r\n display: 'flex',\r\n flex: 1,\r\n overflow: 'hidden',\r\n },\r\n '& .ms-Viewport': {\r\n display: 'flex',\r\n flex: 1,\r\n '& .ms-DetailsList': {\r\n marginBottom: 0,\r\n '& div[role=grid]': {\r\n height: '100%',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n '& .ms-DetailsList-contentWrapper': {\r\n overflowY: 'overlay',\r\n overflowX: 'hidden',\r\n '.ms-List-cell': {\r\n minHeight: 0, // empty group should not ocupy any space\r\n },\r\n },\r\n },\r\n },\r\n },\r\n '& .paginator': {\r\n marginLeft: 16,\r\n marginTop: 12,\r\n },\r\n },\r\n '& .error-region': {\r\n color: '#A80000',\r\n },\r\n },\r\n});\r\n\r\nconst onRenderSquareCheckbox: IRenderFunction = (props) => {\r\n assertIsDefined(props, 'props of checkbox render is undefined');\r\n const { checked } = props;\r\n\r\n // Do not use Chekbox of FluentUI. It is hard to manage events when working with `SelectionZone`(used by DetailsList)\r\n return ();\r\n};\r\n\r\nconst addIcon: IIconProps = { iconName: 'Add' };\r\n\r\nexport type WithBulk =\r\n { __bulk?: boolean; } & T;\r\n\r\nexport interface PanelSelectorProps {\r\n enableShimmer?: boolean;\r\n isOpen: boolean;\r\n /**\r\n *\r\n */\r\n onSave: (selectedItems: WithBulk[], selectedDimension: IDropdownOption) => void;\r\n onCancel: () => void;\r\n /**\r\n * Dimension Dropdown\r\n *\r\n * Control this variable to show default selected dimension\r\n */\r\n dimensions: IDropdownOption[];\r\n onSelectedDimensionChange: NonNullable;\r\n columns: IColumn[];\r\n /**\r\n * If the key of item is a negative number, it is added by `bulk add values`\r\n */\r\n items: any[];\r\n initialSelectedItems: any[];\r\n headerText: string;\r\n keyOfItem: (item: any) => string;\r\n /**\r\n * Some dimensions are avaliable to give arbitry values to divide them.\r\n *\r\n * If so, enable this flag so user could input arbitry values.\r\n */\r\n isBulkAddEnabledForDimension: (diemnsion: IDropdownOption) => boolean;\r\n\r\n // Error handing\r\n getErrors?: (selectedItems: any[], selectedDimension: IDropdownOption) => string[];\r\n}\r\n\r\nfunction copyAndSort(items: T[], columnKey: string, isSortedDescending?: boolean): T[] {\r\n const key = columnKey as keyof T;\r\n return items.slice(0).sort((a, b) => {\r\n const aValue = a[key];\r\n const bValue = b[key];\r\n let res = 0;\r\n if (aValue !== undefined && bValue !== undefined) {\r\n res = aValue > bValue ? 1 : -1;\r\n } else if (aValue === undefined && bValue === undefined) {\r\n res = 0;\r\n } else {\r\n // assume undefined as -Infinate\r\n res = aValue !== undefined ? 1 : -1;\r\n }\r\n return isSortedDescending ? -res : res;\r\n });\r\n}\r\n\r\nexport const PanelSelector: FC = (props) => {\r\n const {\r\n enableShimmer, isOpen, headerText,\r\n columns, items, dimensions,\r\n onCancel, onSave, onSelectedDimensionChange,\r\n initialSelectedItems, keyOfItem, isBulkAddEnabledForDimension,\r\n getErrors,\r\n } = props;\r\n const i18n: any = useContext(I18nContext);\r\n\r\n const preItems = usePrevious(items);\r\n const preColumns = usePrevious(columns);\r\n const preDimensions = usePrevious(dimensions);\r\n const preInitialSelectedItems = usePrevious(initialSelectedItems);\r\n\r\n const [finalItems, setFinalItemsImpl] = useState(items);\r\n const setFinalItems: typeof setFinalItemsImpl = (param) => {\r\n let finalValue;\r\n if (typeof param === 'function') {\r\n setFinalItemsImpl((pre) => {\r\n finalValue = param(pre);\r\n return finalValue;\r\n });\r\n } else {\r\n finalValue = param;\r\n setFinalItemsImpl(finalValue);\r\n }\r\n\r\n // / sync items and selected to selection\r\n // when dimension is still same, if all items are all selected in pre state, keep all selected\r\n // when dimension is changed, only when next dimension is default dimension and `initialSelectedItems` is `finalItems`, it is all selected\r\n\r\n const defaultSelectedDimension = getDefaultSelectedDimension();\r\n assertIsDefined(defaultSelectedDimension);\r\n assertIsDefined(selectedDimension);\r\n const isSelectedDimensionChanged = previousSelectedDimension?.key !== selectedDimension.key;\r\n\r\n const isCurrentAllSelected = selection.isAllSelected();\r\n let isNextAllSelect = false;\r\n const isDefaultDimensionSelected = selectedDimension.key === defaultSelectedDimension.key;\r\n if (isDefaultDimensionSelected && initialSelectedItems.length !== 0) {\r\n isNextAllSelect = initialSelectedItems.length === finalValue.length; // a quick and dirty check\r\n }\r\n\r\n const isEventSupressed = isSelectedDimensionChanged ? isCurrentAllSelected === isNextAllSelect : true;\r\n\r\n selection.setChangeEvents(false);\r\n if (finalValue) {\r\n selection.setItems(finalValue, true);\r\n }\r\n selection.setChangeEvents(true, isEventSupressed);\r\n if (isNextAllSelect) {\r\n setSelectedItemKeys(initialSelectedItems.map(keyOfItem));\r\n }\r\n setSelectedItemKeys((selectedItemKeys) => {\r\n selection.setChangeEvents(false);\r\n selectedItemKeys.forEach((key) => {\r\n selection.setKeySelected(key, true, false);\r\n });\r\n selection.setChangeEvents(true, isEventSupressed);\r\n return selectedItemKeys;\r\n });\r\n };\r\n\r\n const [finalColumns, setFinalColumns] = useState(columns);\r\n\r\n const [selectedItemKeys, setSelectedItemKeys] = useState([]);\r\n\r\n const selection = useMemo(() => new Selection({\r\n onSelectionChanged: () => {\r\n // The main purpose is to sync user operation to `selectedItemKeys`\r\n setSelectedItemKeys((pre) => {\r\n const newSelectedItemKeysCandidate = selection.getSelection().map(keyOfItem);\r\n if (pre.join() !== newSelectedItemKeysCandidate.join()) { return newSelectedItemKeysCandidate; }\r\n return pre;\r\n });\r\n },\r\n getKey: keyOfItem,\r\n items: finalItems,\r\n }), []);\r\n\r\n useEffect(() => {\r\n // if dimensions changes, update selectedDimension\r\n // if defualt selected dimension changes, update selectedDimension\r\n if (\r\n dimensions.map(dimension => dimension.key).join() !== (preDimensions?.map(dimension => dimension.key) ?? []).join()\r\n || dimensions.map(dimension => dimension.selected).join() !== (preDimensions?.map(dimension => dimension.selected) ?? []).join()\r\n ) {\r\n setSelectedDimension(getDefaultSelectedDimension());\r\n }\r\n\r\n // if items chagnes, update finalItems\r\n if (items.map(keyOfItem).join() !== (preItems?.map(keyOfItem) ?? []).join()) {\r\n setFinalItems(items);\r\n }\r\n\r\n // if initialSelectedItems changes, update selectedItemKeys\r\n if (initialSelectedItems.map(keyOfItem).join() !== preInitialSelectedItems?.map(keyOfItem).join()) {\r\n setSelectedItemKeys(initialSelectedItems.map(keyOfItem));\r\n }\r\n\r\n // if selection does not match selectedItemKeys, sync to selectedItemKeys\r\n if (selectedItemKeys.join() !== selection.getSelection().map(keyOfItem).join()) {\r\n selection.setChangeEvents(false);\r\n selectedItemKeys.forEach((key) => {\r\n selection.setKeySelected(key, true, false);\r\n });\r\n selection.setChangeEvents(true, true);\r\n }\r\n\r\n // if columns changes, update finalColumns\r\n if (columns.map(c => c.key).join() !== (preColumns?.map(c => c.key) ?? []).join()) {\r\n setFinalColumns(columns);\r\n // eslint-disable-next-line brace-style\r\n }\r\n // if column changes, we do not need to update binding of finalColumns\r\n else {\r\n // bind column click\r\n finalColumns.forEach((finalColumn) => {\r\n // eslint-disable-next-line no-param-reassign\r\n finalColumn.onColumnClick = (ev, column) => {\r\n // bind sort\r\n // eslint-disable-next-line @typescript-eslint/no-shadow\r\n setFinalColumns((preColumns) => {\r\n let { isSortedDescending } = column;\r\n if (column.isSorted) {\r\n isSortedDescending = !isSortedDescending;\r\n }\r\n setFinalItems(pre =>\r\n copyAndSort(pre, column.fieldName!, isSortedDescending));\r\n return preColumns.map(preColumn => ({\r\n ...preColumn,\r\n isSorted: preColumn.key === column.key,\r\n isSortedDescending: preColumn.key === column.key ? isSortedDescending : undefined,\r\n }));\r\n });\r\n };\r\n });\r\n }\r\n });\r\n\r\n const dimensionSelectorId = useId('divide-by');\r\n\r\n const [currentPageSize, setCurrentPageSize] = useState(20);\r\n const [currentPageIndex, setCurrentPageIndex] = useState(1);\r\n\r\n // use groups as false pages\r\n const pageCount = Math.ceil(finalItems.length / currentPageSize);\r\n\r\n const groups: IGroup[] = Array(pageCount).fill(null).map((_, i) => ({\r\n key: i.toString(), // maybe we should add currentPageSize and currentPageIndex as part of key?\r\n name: '', // name is not important, the group header should never be rendered.\r\n startIndex: i * currentPageSize,\r\n count: currentPageSize,\r\n isCollapsed: i + 1 !== currentPageIndex, // page is base-1, array index is base 0\r\n }));\r\n\r\n function onSaveClick() {\r\n const selectedItems = finalItems.filter(item => selectedItemKeys.includes(keyOfItem(item)));\r\n assertIsDefined(selectedDimension);\r\n onSave(selectedItems, selectedDimension);\r\n }\r\n\r\n const onRenderFooterContent = () => (\r\n
\r\n \r\n {i18n.getString(_TL_('Save'))}\r\n {i18n.getString(_TL_('Cancel'))}\r\n \r\n
\r\n );\r\n\r\n const isLoading = enableShimmer;\r\n\r\n const [isBulkAddEditorOpened, setIsBulkAddEditorOpened] = useState(false);\r\n\r\n const [selectedDimension, setSelectedDimension] = useState(getDefaultSelectedDimension);\r\n const previousSelectedDimension = usePrevious(selectedDimension);\r\n\r\n const errors = isLoading ? [] : getErrors?.(\r\n finalItems.filter(item => selectedItemKeys.includes(keyOfItem(item))),\r\n selectedDimension!\r\n );\r\n\r\n /** Always negative and not repeat, chooser a big enough number to avoid conflict with ID from API */\r\n const customCounter = useRef(-100000);\r\n\r\n function onClickBulkAddValues() {\r\n setIsBulkAddEditorOpened(true);\r\n }\r\n\r\n const onBulkAddEditorCancel: BulkAddEditorProps['onCancel'] = () => {\r\n setIsBulkAddEditorOpened(false);\r\n };\r\n\r\n function buildNewItemsByBulkAdd(strings: string[]) {\r\n return strings.map(s => ({\r\n __bulk: true,\r\n key: customCounter.current--,\r\n [firstColumnName]: s,\r\n }));\r\n }\r\n\r\n const onBulkAddEditorCommit: BulkAddEditorProps['onSubmit'] = (newValues) => {\r\n // Note: for current, `PanelSelector` do not do anything like deduplicate, so user might have multi same values\r\n // The callback should make sure the situation is handled correctly\r\n const newItems = buildNewItemsByBulkAdd(newValues);\r\n setFinalItems(pre => [...newItems, ...pre]);\r\n setSelectedItemKeys((pre) => {\r\n const newKeys = newItems.map(item => keyOfItem(item));\r\n const newSelectedItemKeys = [...pre, ...newKeys];\r\n\r\n selection.setChangeEvents(false);\r\n newSelectedItemKeys.forEach((key) => {\r\n selection.setKeySelected(key, true, false);\r\n });\r\n selection.setChangeEvents(true);\r\n\r\n return newSelectedItemKeys;\r\n });\r\n setIsBulkAddEditorOpened(false);\r\n };\r\n\r\n function renderBulkValueEditor() {\r\n return (\r\n
\r\n {selectedDimension && isBulkAddEnabledForDimension(selectedDimension) &&\r\n (!isBulkAddEditorOpened ?\r\n \r\n : )\r\n }\r\n
\r\n );\r\n }\r\n\r\n function getDefaultSelectedDimension() {\r\n return dimensions.find(dimension => dimension.selected === true);\r\n }\r\n\r\n const onSelectedDimensionChangeInner: IDropdownProps['onChange'] = (event, option, index) => {\r\n setSelectedDimension(option!);\r\n onSelectedDimensionChange(event, option, index);\r\n setCurrentPageIndex(1);\r\n };\r\n\r\n\r\n function renderErrorMessages() {\r\n return (\r\n
\r\n {errors?.map(error => (
{error}
))}\r\n
\r\n );\r\n }\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\n {renderBulkValueEditor()}\r\n {finalItems.length === 0 &&\r\n \r\n {i18n.getString(_TL_('No suggestions available. Please add values manually.'))}\r\n \r\n }\r\n
\r\n {/* After Fluent UI is updated to a version that have `selectionClearedOnSurfaceClick` in `SelectionZone` */}\r\n {/* We should deprecated `ListViewSelectionZone` immediately. */}\r\n \r\n null, // only show items in current page\r\n collapseAllVisibility: CollapseAllVisibility.hidden,\r\n }}\r\n disableSelectionZone\r\n />\r\n \r\n {finalItems.length > 0 && }\r\n
\r\n {renderErrorMessages()}\r\n
\r\n }\r\n
\r\n \r\n );\r\n};\r\n\r\n/**\r\n * This is exported for `bulk add`\r\n *\r\n * Or we could export another callback for `bulk add value`, then let users to change items by themself, but it is kind of heavy.\r\n */\r\nexport const firstColumnName = 'primary';\r\n","import { ColumnRawData } from '@bingads-webui-grid/well-known';\r\n\r\nexport const ListingGroupColumn: ColumnRawData = {\r\n key: 'ListingGroup',\r\n name: _TL_('Listing group'),\r\n};\r\n\r\n/**\r\n * @deprecated\r\n */\r\nexport const AssetGroupColumn: ColumnRawData = {\r\n key: 'AssetGroup',\r\n name: _TL_('Asset group'),\r\n};\r\n\r\nexport const AssetGroupNameColumn: ColumnRawData = {\r\n key: 'AssetGroupName',\r\n name: _TL_('Asset group'),\r\n};\r\n\r\nexport const ListingColumn: ColumnRawData = {\r\n key: 'Listing',\r\n name: _TL_('Products'),\r\n};\r\n\r\nexport const IncludeExcludeColumn: ColumnRawData = {\r\n key: 'IncludeExclude',\r\n name: _TL_('Inclusion'),\r\n};\r\n","/* eslint-disable no-use-before-define */\r\nimport {\r\n absoluteTopImpressionRateColumn, advertiserReportedRevenue, allConversionAdvertiserReportedRevenue, allConversionCPAColumn,\r\n allConversionRateColumn, allConversionRevenueOnAdSpendColumn, allConversionsColumn, averageCPCColumn, averageCPMColumn, clicksColumn, conversionRateColumn,\r\n conversionsColumn, CPAColumn, CTRColumn, impressionsColumn, returnOnAdSpendColumn, spendColumn, I18n, ColumnChooserCategory, SelectOption,\r\n ColumnRawData, ColumnChooserColumnOption, averageCPSColumn, salesCountColumn\r\n} from '@bingads-webui-grid/well-known';\r\nimport { GridType, ScopeLevel } from '../../../constant';\r\nimport {\r\n ListingGroupColumn, AssetGroupNameColumn, IncludeExcludeColumn\r\n} from '../../../rawColumns';\r\n\r\ninterface GetColumnChooserCategoriesOptions {\r\n gridType: GridType,\r\n i18n: I18n,\r\n scopeLevel: ScopeLevel,\r\n permissions: any,\r\n}\r\n\r\nexport function getColumnChooserCategories(parameters: GetColumnChooserCategoriesOptions): ColumnChooserCategory[] {\r\n const {\r\n gridType, i18n, scopeLevel, permissions,\r\n } = parameters;\r\n\r\n const cpsColumnsEnabled = permissions && permissions.dynamic && permissions.dynamic.SupportCPSForPmax;\r\n\r\n const attributesCategory: ColumnChooserCategory = {\r\n name: i18n.getString(_TL_('Attributes')),\r\n type: 'Attributes',\r\n options: getAttributeColumnKeys(gridType, scopeLevel).map(o => buildCategoryOptionFromColumnRawData(o, i18n)),\r\n };\r\n\r\n const performaceCategory: ColumnChooserCategory = {\r\n name: i18n.getString(_TL_('Performance')),\r\n type: 'Performance',\r\n options: getPerfColumnKeys(cpsColumnsEnabled).map(o => buildCategoryOptionFromColumnRawData(o, i18n)),\r\n };\r\n\r\n const conversionsCategory: ColumnChooserCategory = {\r\n name: i18n.getString(_TL_('Conversions')),\r\n type: 'Conversions',\r\n options: getConvColumnKeys(cpsColumnsEnabled).map(o => buildCategoryOptionFromColumnRawData(o, i18n)),\r\n };\r\n\r\n return [\r\n attributesCategory,\r\n performaceCategory,\r\n conversionsCategory,\r\n ];\r\n}\r\n\r\nfunction buildCategoryOptionFromColumnRawData(column: ColumnRawData, i18n: I18n): ColumnChooserColumnOption {\r\n const selectOption = isLockedColumn(column.key);\r\n return {\r\n key: column.key,\r\n name: i18n.getString(column.name),\r\n selectOption,\r\n };\r\n}\r\n\r\nfunction isNotNullOrUndefined(value) {\r\n return value !== null && value !== undefined;\r\n}\r\n\r\nfunction getAttributeColumnKeys(gridType: GridType, scopeLevel: ScopeLevel) {\r\n return [\r\n IncludeExcludeColumn,\r\n ListingGroupColumn,\r\n (scopeLevel === ScopeLevel.Campaign) ? AssetGroupNameColumn : undefined,\r\n ].filter(isNotNullOrUndefined);\r\n}\r\n\r\nfunction getPerfColumnKeys(cpsColumnsEnabled) {\r\n const colmuns = [\r\n clicksColumn,\r\n impressionsColumn,\r\n CTRColumn,\r\n spendColumn,\r\n averageCPCColumn,\r\n averageCPMColumn,\r\n absoluteTopImpressionRateColumn,\r\n ];\r\n if (cpsColumnsEnabled) {\r\n colmuns.push(averageCPSColumn);\r\n }\r\n return colmuns;\r\n}\r\n\r\nfunction getConvColumnKeys(cpsColumnsEnabled) {\r\n const colmuns = [\r\n conversionRateColumn,\r\n conversionsColumn,\r\n CPAColumn,\r\n advertiserReportedRevenue,\r\n returnOnAdSpendColumn,\r\n allConversionsColumn,\r\n allConversionRateColumn,\r\n allConversionRevenueOnAdSpendColumn,\r\n allConversionAdvertiserReportedRevenue,\r\n allConversionCPAColumn,\r\n ];\r\n if (cpsColumnsEnabled) {\r\n colmuns.push(salesCountColumn);\r\n }\r\n return colmuns;\r\n}\r\n\r\nconst lockColumns = new Set([\r\n IncludeExcludeColumn.key,\r\n ListingGroupColumn.key,\r\n AssetGroupNameColumn.key,\r\n]);\r\n\r\nfunction isLockedColumn(columnKey: string) {\r\n return lockColumns.has(columnKey) ? SelectOption.locked : SelectOption.optional;\r\n}\r\n","import {\r\n allConversionCPAColumn,\r\n allConversionRateColumn,\r\n allConversionRevenueOnAdSpendColumn,\r\n allConversionsColumn,\r\n averageCPCColumn,\r\n averageCPMColumn,\r\n clicksColumn,\r\n conversionRateColumn,\r\n conversionsColumn,\r\n CPAColumn,\r\n CTRColumn,\r\n impressionsColumn,\r\n advertiserReportedRevenue,\r\n returnOnAdSpendColumn,\r\n spendColumn,\r\n averageCPSColumn,\r\n salesCountColumn\r\n} from '@bingads-webui-grid/well-known';\r\n\r\nexport const legacyI18nOfListingGroup = {\r\n Schema_PerformanceMetrics_Property_Impressions: impressionsColumn.name,\r\n Schema_PerformanceMetrics_Property_Clicks: clicksColumn.name,\r\n Schema_PerformanceMetrics_Property_CTR: CTRColumn.name,\r\n Schema_PerformanceMetrics_Property_Spend: spendColumn.name,\r\n Schema_PerformanceMetrics_Property_AverageCPC: averageCPCColumn.name,\r\n Schema_PerformanceMetrics_Property_AverageCPM: averageCPMColumn.name,\r\n Schema_PerformanceMetrics_Property_Conversions: conversionsColumn.name,\r\n Schema_PerformanceMetrics_Property_ConversionRate: conversionRateColumn.name,\r\n Schema_PerformanceMetrics_Property_RevenueOnAdSpend: returnOnAdSpendColumn.name,\r\n Schema_PerformanceMetrics_Property_AdvertiserReportedRevenue: advertiserReportedRevenue.name,\r\n Schema_PerformanceMetrics_Property_CPA: CPAColumn.name,\r\n Schema_PerformanceMetrics_Property_AllConversions: allConversionsColumn.name,\r\n Schema_PerformanceMetrics_Property_AllConversionRate: allConversionRateColumn.name,\r\n Schema_PerformanceMetrics_Property_AllConversionRevenueOnAdSpend: allConversionRevenueOnAdSpendColumn.name,\r\n Schema_PerformanceMetrics_Property_AllConversionAdvertiserReportedRevenue: advertiserReportedRevenue.name,\r\n Schema_PerformanceMetrics_Property_AllConversionCPA: allConversionCPAColumn.name,\r\n Schema_PerformanceMetrics_Property_AverageCPS: averageCPSColumn.name,\r\n Schema_PerformanceMetrics_Property_SalesCount: salesCountColumn.name,\r\n Schema_PerformanceMetrics_Property_ViewThroughConversions: _TL_('View-through conv.'),\r\n Schema_PerformanceMetrics_Property_ViewThroughConversionsRevenue: _TL_('View-through conv. revenue'),\r\n Schema_PerformanceMetrics_Property_ViewThroughConversionsCPA: _TL_('View-through conv. CPA'),\r\n Schema_PerformanceMetrics_Property_ViewThroughConversionsReturnOnAdSpend: _TL_('View-through conv. return on ad spend'),\r\n Schema_PerformanceMetrics_Property_ViewThroughConversionsRate: _TL_('View-through conv. rate'),\r\n ProductsGrid_Column_All: _TL_('All products'),\r\n ProductsGrid_Column_Brand: _TL_('Brand'),\r\n ProductsGrid_Column_Category1: _TL_('Category (1st level)'),\r\n ProductsGrid_Column_Category2: _TL_('Category (2nd level)'),\r\n ProductsGrid_Column_Category3: _TL_('Category (3rd level)'),\r\n ProductsGrid_Column_Category4: _TL_('Category (4th level)'),\r\n ProductsGrid_Column_Category5: _TL_('Category (5th level)'),\r\n ProductsGrid_Column_CategoryL1: _TL_('Category (1st level)'),\r\n ProductsGrid_Column_CategoryL2: _TL_('Category (2nd level)'),\r\n ProductsGrid_Column_CategoryL3: _TL_('Category (3rd level)'),\r\n ProductsGrid_Column_CategoryL4: _TL_('Category (4th level)'),\r\n ProductsGrid_Column_CategoryL5: _TL_('Category (5th level)'),\r\n ProductsGrid_Column_Channel: _TL_('Channel'),\r\n ProductsGrid_Column_ChannelExclusivity: _TL_('Channel Exclusivity'),\r\n ProductsGrid_Column_Condition: _TL_('Condition'),\r\n ProductsGrid_Column_CountryOfSale: _TL_('Country/region of sale'),\r\n ProductsGrid_Column_CustomLabel0: _TL_('Custom label 0'),\r\n ProductsGrid_Column_CustomLabel1: _TL_('Custom label 1'),\r\n ProductsGrid_Column_CustomLabel2: _TL_('Custom label 2'),\r\n ProductsGrid_Column_CustomLabel3: _TL_('Custom label 3'),\r\n ProductsGrid_Column_CustomLabel4: _TL_('Custom label 4'),\r\n ProductsGrid_Column_GTIN: _TL_('GTIN'),\r\n ProductsGrid_Column_Id: _TL_('Item ID'),\r\n ProductsGrid_Column_Language: _TL_('Language'),\r\n ProductsGrid_Column_MerchantId: _TL_('Merchant identifier'),\r\n ProductsGrid_Column_MPN: _TL_('MPN'),\r\n ProductsGrid_Column_Price: _TL_('Price'),\r\n ProductsGrid_Column_ProductBought: _TL_('Product Bought'),\r\n ProductsGrid_Column_ProductType1: _TL_('Product type (1st level)'),\r\n ProductsGrid_Column_ProductType2: _TL_('Product type (2nd level)'),\r\n ProductsGrid_Column_ProductType3: _TL_('Product type (3rd level)'),\r\n ProductsGrid_Column_ProductType4: _TL_('Product type (4th level)'),\r\n ProductsGrid_Column_ProductType5: _TL_('Product type (5th level)'),\r\n ProductsGrid_Column_Title: _TL_('Title'),\r\n};\r\n\r\n","import { OdataSystemQueryOptions } from './odata';\r\n\r\ntype CustomQueryOptions = {\r\n [x: string]: any;\r\n}\r\n\r\ntype CustomEntityPath = {\r\n [x: string]: number | string;\r\n}\r\n\r\ninterface AdsOdataGeneralEntityPath {\r\n /**\r\n * one of four general scope levels, will be transformed to `Customers(${customerId})` in url if not undefined\r\n */\r\n customerId?: number | undefined;\r\n /**\r\n * one of four general scope levels, will be transformed to `Accounts(${accountId})` in url if not undefined\r\n */\r\n accountId?: number | undefined;\r\n /**\r\n * one of four general scope levels, will be transformed to `Campaigns(${campaignId})` in url if not undefined\r\n */\r\n campaignId?: number | undefined;\r\n /**\r\n * one of four general scope levels, will be transformed to `AssetGroups(${assetGroupId})` in url if not undefined\r\n */\r\n assetGroupId?: number | undefined;\r\n}\r\n\r\nexport interface AdsOdataAPIParamsBase {\r\n /**\r\n * This property should be handled by user to get the correct URL path. There is no way to predicate the order of entity.\r\n *\r\n * The intention is place all relative things together.\r\n */\r\n entityPath: AdsOdataGeneralEntityPath & CustomEntityPath;\r\n queryOptions?: OdataSystemQueryOptions & CustomQueryOptions;\r\n}\r\n\r\ninterface RequestWithPayload {\r\n payload: Payload;\r\n}\r\n\r\n// Copy from https://stackoverflow.com/a/61132308\r\ntype DeepPartial = T extends object ? {\r\n [P in keyof T]?: DeepPartial;\r\n} : T;\r\n\r\nexport type PostOdataAdsAPIParams = AdsOdataAPIParamsBase & RequestWithPayload;\r\n\r\nexport type PatchOdataAdsAPIParams = AdsOdataAPIParamsBase & RequestWithPayload>;\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\r\nexport type GetOdataAdsAPIParams = AdsOdataAPIParamsBase;\r\n\r\n\r\n// @example\r\n// baseUrl: `https://app1.ui.ads-int.microsoft.com:12000/ODataApi/Campaign/V2/`\r\n// path: `ProductListingGroups/Default.GridData`\r\n// adsOdataParams: { customerId:\"123456789\", queryStrings:{$top:1} }\r\n// --> https://app1.ui.ads-int.microsoft.com:12000/ODataApi/Campaign/V2/Customers(123456789)/ProductListingGroups/Default.GridData&$top=1\r\nexport function getFullUrlOfAdsOdata(baseUrl: string, path: string, adsOdataParams: AdsOdataAPIParamsBase) {\r\n const {\r\n queryOptions, entityPath: {\r\n customerId, accountId, campaignId, assetGroupId,\r\n },\r\n } = adsOdataParams;\r\n\r\n const scopeLevelPath = [\r\n '/',\r\n customerId ? `Customers(${customerId})/` : '',\r\n accountId ? `Accounts(${accountId})/` : '',\r\n campaignId ? `Campaigns(${campaignId})/` : '',\r\n assetGroupId ? `AssetGroups(${assetGroupId})/` : '',\r\n ].join('');\r\n\r\n const queryString = Object.entries(queryOptions ?? []).reduce((cur, [key, value]) => {\r\n if (value) {\r\n cur.set(key, value.toString());\r\n }\r\n return cur;\r\n }, new URLSearchParams()).toString();\r\n\r\n // omit `baseUrl`, for we are using a special fetch\r\n const finalUrl = `${scopeLevelPath}${path}${queryString ? `?${queryString}` : ''}`;\r\n return finalUrl;\r\n}\r\n\r\n/**\r\n * @example\r\n * interface CustomEntityPath1{\r\n * custom1: number | string;\r\n * }\r\n *\r\n * type FinalType = PostOdataAdsAPIParams & WithEntityPath\r\n */\r\nexport interface WithEntityPath {\r\n entityPath: T;\r\n}\r\n","import _ from 'underscore';\r\nimport { assertIsDefined } from '@bingads-webui-campaign-react/debug-assert';\r\nimport { WithTreeViewData } from '@bingads-webui-grid/well-known';\r\nimport { ListingGroupGridItemData } from '../interface';\r\nimport { Model$Listing, Model$ListingCondition, Model$ListingGroup } from '../ApiType';\r\nimport { GetOdataAdsAPIParams, getFullUrlOfAdsOdata } from './adsOdata';\r\n\r\nconst NonSplittableConditions = ['CategoryL1', 'CategoryL2', 'CategoryL3', 'CategoryL4', 'CategoryL5'];\r\n\r\nexport type GetListingGroupConditionsParams = GetOdataAdsAPIParams;\r\n\r\ninterface GetListingGroupConditionsResponseBody {\r\n value: Model$ListingCondition[];\r\n}\r\n\r\nexport function getListingGroupConditionsRequest(baseUrl: string, params: GetListingGroupConditionsParams) {\r\n const path = 'ProductListingGroups/Default.GetProductListingGroupConditions';\r\n const finalUrl = getFullUrlOfAdsOdata(baseUrl, path, params);\r\n return [finalUrl, {\r\n method: 'GET',\r\n }];\r\n}\r\n\r\nexport async function getListingGroupConditionsResponseHandler(responsePromise: Promise) {\r\n const response = await responsePromise;\r\n const responseBody: GetListingGroupConditionsResponseBody = await response.json();\r\n return responseBody;\r\n}\r\n\r\n// If we have used the dimension, it should not be used anymore in its subtree\r\n// @param `pathsToParent` from root to current node, like [rootInfo, path1Info, currentNodeDimensionInfo]\r\nfunction filterOutUsedDimensions(listingConditions: Model$ListingCondition[], pathsToParent: Model$Listing[]) {\r\n return listingConditions.filter(c =>\r\n pathsToParent.every(p => p.Operand !== c.Operand));\r\n}\r\n\r\n// Some dimension are only avaliable after some other dimension is chosen\r\n// Note: root is filtered out in this step\r\n// @param `pathsToParent` from root to current node, like [rootInfo, path1Info, currentNodeDimensionInfo]\r\nfunction filterReachableDimensions(listingConditions: Model$ListingCondition[], pathsToParent: Model$Listing[]): Model$ListingCondition[] {\r\n // Current impl is not effective, but easy to understand :)\r\n const reservedIds = new Set();\r\n pathsToParent.forEach((path) => {\r\n const currentOperand = path.Operand;\r\n const currentId = listingConditions.find(c =>\r\n (c.Operand === 'All' && currentOperand === '') ||\r\n c.Operand === currentOperand)?.Id;\r\n assertIsDefined(currentId);\r\n listingConditions.forEach((c) => {\r\n if (c.ParentId === currentId) {\r\n reservedIds.add(c.Id);\r\n }\r\n });\r\n });\r\n return listingConditions.filter(c => reservedIds.has(c.Id));\r\n}\r\n\r\n// There are some dimensions that everything else node cannot be split on\r\nfunction filterNonSplittableDimensions(listingConditions: Model$ListingCondition[], item:(WithTreeViewData)): Model$ListingCondition[] {\r\n assertIsDefined(item);\r\n\r\n let isFromEverythingElse = false;\r\n if (item.Condition?.Operand !== '' && item.Condition?.Attribute === '') {\r\n isFromEverythingElse = true;\r\n }\r\n\r\n _.each(item.ParentConditions || [], (condition) => {\r\n if (condition?.Operand !== '' && condition?.Attribute === '') {\r\n isFromEverythingElse = true;\r\n }\r\n });\r\n\r\n assertIsDefined(item.ParentConditions);\r\n assertIsDefined(item.Condition);\r\n\r\n const parentConditionOperands = _.pluck(item.ParentConditions, 'Operand');\r\n const allItemOperands = [item.Condition.Operand, ...parentConditionOperands];\r\n\r\n if (_.intersection(NonSplittableConditions, allItemOperands) && isFromEverythingElse) {\r\n return _.filter(listingConditions, condition => !_.contains(NonSplittableConditions, condition.Operand));\r\n }\r\n\r\n return listingConditions;\r\n}\r\n\r\n// Do we need to filter the country by current Campaign? In backend, we get current campaign by use something like `this.contextProvider.CurrentCampaign?.CampaignSettings[0]?.SalesCountry;`\r\n// function filterCountry() { }\r\n\r\n// All data is returned now, however, user should only see part of them\r\n// - user should not see any dimension they have used\r\n// - user should not see the root dimension\r\n// - user should not see a dimension if its partent is not reached\r\n// In conclusion, a valid node is valid if it is the direct son of a `pathsToParent` and it is not in `pathsToParent`\r\n// @param `pathsToParent` from root to current node, like [rootInfo, path1Info, currentNodeDimensionInfo]\r\nexport function getValidListingConditions(response: GetListingGroupConditionsResponseBody, pathsToParent: Model$Listing[], item: WithTreeViewData) {\r\n let conditions = response.value;\r\n conditions = filterReachableDimensions(conditions, pathsToParent);\r\n conditions = filterOutUsedDimensions(conditions, pathsToParent);\r\n conditions = filterNonSplittableDimensions(conditions, item);\r\n return conditions;\r\n}\r\n\r\nexport function getValidListingConditionsForWithoutPreselectedTreeNode(response: GetListingGroupConditionsResponseBody, pathsToParent: Model$Listing[]) {\r\n let conditions = response.value;\r\n conditions = filterReachableDimensions(conditions, pathsToParent);\r\n conditions = filterOutUsedDimensions(conditions, pathsToParent);\r\n return conditions;\r\n}\r\n","import { map } from 'underscore';\r\nimport { createOrUpdateListingGroup } from '@bingads-webui-campaign-react/perf-max-data';\r\nimport { Model$ListingGroup } from '../ApiType';\r\nimport { NullPartial, } from '../constant';\r\n\r\ninterface UpdateListingTreePayload {\r\n ListingGroupsToAdd: Partial>[];\r\n ListingGroupsToDelete: number[];\r\n AssetGroupId: number,\r\n}\r\n\r\n// edit tree view\r\nexport async function updateListingTree(payload: UpdateListingTreePayload) {\r\n const { ListingGroupsToAdd, ListingGroupsToDelete, AssetGroupId } = payload;\r\n const itemsToAdd = ListingGroupsToAdd;\r\n const itemsToDelete = map(ListingGroupsToDelete, id => ({\r\n Id: id,\r\n AssetGroupId,\r\n Status: 'Deleted',\r\n }));\r\n return createOrUpdateListingGroup(itemsToAdd, itemsToDelete).then(res => res).catch(e => e);\r\n}\r\n\r\nexport async function createRootListingTree(assetGroupId: number) {\r\n const itemsToAdd = [{\r\n Id: -1,\r\n AssetGroupId: assetGroupId,\r\n IsLeaf: true,\r\n IsExcluded: false,\r\n Condition: {\r\n Operand: 'All',\r\n Attribute: '',\r\n },\r\n }];\r\n\r\n return createOrUpdateListingGroup(itemsToAdd, []);\r\n}\r\n","import { useFetch } from '@bingads-webui-campaign/react-hook-use-fetch';\r\nimport { ProductAttrubuteStatisticsParams, productAttrubuteStatisticsResponseHandler, productAttrubuteStatisticsRequest } from './productAttributeStatistics';\r\nimport { GetListingGroupGridDataParmas, listingGroupGridDataResponseHandler, listingGroupGridDataRequest } from './listingGroupGridData';\r\nimport { GetListingGroupConditionsParams, getListingGroupConditionsResponseHandler, getListingGroupConditionsRequest } from './getListingGroupConditions';\r\nimport { productOfferRequest, productOfferResponseHandler, ProductOfferParams } from './productOffer';\r\n\r\nimport { updateListingTree, createRootListingTree } from './updateListingTree';\r\n\r\nexport function useAPIsOfListingGroup() {\r\n const { fetch: fetchImpl } = useFetch();\r\n\r\n // baseUrl is not used for now, for we are using a special fetch wrapper\r\n const baseUrl = '';\r\n\r\n return {\r\n listingGroupGridData: (params: GetListingGroupGridDataParmas) =>\r\n listingGroupGridDataResponseHandler(fetchImpl(...listingGroupGridDataRequest(baseUrl, params))),\r\n productAttributeStatistics: (params: ProductAttrubuteStatisticsParams) =>\r\n productAttrubuteStatisticsResponseHandler(fetchImpl(...productAttrubuteStatisticsRequest(baseUrl, params))),\r\n getListingGroupConditions: (params: GetListingGroupConditionsParams) =>\r\n getListingGroupConditionsResponseHandler(fetchImpl(...getListingGroupConditionsRequest(baseUrl, params))),\r\n getProductOffers: (params: ProductOfferParams) =>\r\n productOfferResponseHandler(fetchImpl(...productOfferRequest(baseUrl, params))),\r\n updateListingTree,\r\n createRootListingTree,\r\n };\r\n}\r\n","import { Model$ListingGroup } from '../ApiType';\r\nimport { PostOdataAdsAPIParams, getFullUrlOfAdsOdata } from './adsOdata';\r\n\r\nexport interface DateRange {\r\n /**\r\n * YYYY-MM-DD\r\n *\r\n * @example 2022-05-15\r\n */\r\n EndDate: string;\r\n /**\r\n * YYYY-MM-DD\r\n *\r\n * @example 2022-05-02\r\n */\r\n StartDate: string;\r\n}\r\n\r\ninterface GetListingGroupGridDataPayload {\r\n gridDataParameters: {\r\n DateRange: DateRange;\r\n },\r\n}\r\n\r\nexport type GetListingGroupGridDataParmas = PostOdataAdsAPIParams;\r\n\r\ninterface GetListingGroupGridDataResponseBody {\r\n value: Model$ListingGroup[];\r\n}\r\n\r\nexport function listingGroupGridDataRequest(baseUrl: string, params: GetListingGroupGridDataParmas) {\r\n const path = 'ProductListingGroups/Default.GridData';\r\n const finalUrl = getFullUrlOfAdsOdata(baseUrl, path, params);\r\n return [finalUrl, {\r\n method: 'POST',\r\n headers: {\r\n 'x-ms-lastwritetime': 'Max',\r\n },\r\n body: JSON.stringify(params.payload),\r\n }];\r\n}\r\n\r\nexport async function listingGroupGridDataResponseHandler(responsePromise: Promise) {\r\n const response = await responsePromise;\r\n const responseBody: GetListingGroupGridDataResponseBody = await response.json();\r\n return responseBody;\r\n}\r\n","import { PostOdataAdsAPIParams, getFullUrlOfAdsOdata, WithEntityPath } from './adsOdata';\r\nimport { DateRange } from './listingGroupGridData';\r\nimport { Model$ProductAttributeStatistic, Header } from '../ApiType';\r\n\r\ninterface ProductAttrubuteStatisticsEntityPath {\r\n productListingGroupId: number;\r\n}\r\n\r\ninterface ProductAttrubuteStatisticsPayload {\r\n gridDataParameters: {\r\n DateRange: DateRange;\r\n },\r\n operand: string;\r\n}\r\n\r\nexport type ProductAttrubuteStatisticsParams = PostOdataAdsAPIParams & WithEntityPath;\r\n\r\nexport interface ProductAttrubuteStatisticsResponse {\r\n value: Model$ProductAttributeStatistic[];\r\n headers: Header;\r\n}\r\n\r\n// when editing tree view, the opened panel is also a grid, use this API to get data.\r\nexport function productAttrubuteStatisticsRequest(baseUrl: string, params: ProductAttrubuteStatisticsParams) {\r\n const path = `ProductListingGroups(${params.entityPath.productListingGroupId})/ProductAttributeStatistics/Default.ProductListingGroupGridData`;\r\n const finalUrl = getFullUrlOfAdsOdata(baseUrl, path, params);\r\n return [finalUrl, {\r\n method: 'POST',\r\n body: JSON.stringify(params.payload),\r\n }];\r\n}\r\n\r\nexport async function productAttrubuteStatisticsResponseHandler(responsePromise: Promise) {\r\n const p$response = await responsePromise;\r\n const response: ProductAttrubuteStatisticsResponse = await p$response.json();\r\n response.headers = p$response.headers;\r\n\r\n return response;\r\n}\r\n","import { GetOdataAdsAPIParams, getFullUrlOfAdsOdata, WithEntityPath } from './adsOdata';\r\nimport { DateRange } from './listingGroupGridData';\r\nimport { Model$ProductOffer, Header } from '../ApiType';\r\n\r\ninterface ProductOfferEntityPath {\r\n productListingGroupId: number;\r\n}\r\n\r\ninterface ProductOfferPayload {\r\n gridDataParameters: {\r\n DateRange: DateRange;\r\n },\r\n}\r\n\r\nexport type ProductOfferParams = GetOdataAdsAPIParams & WithEntityPath;\r\n\r\nexport interface ProductOfferResponse {\r\n value: Model$ProductOffer[];\r\n headers: Header;\r\n}\r\n\r\n// when editing tree view, the opened panel is also a grid, use this API to get data.\r\nexport function productOfferRequest(baseUrl: string, params: ProductOfferParams) {\r\n const path = `ProductListingGroups(${params.entityPath.productListingGroupId})/ProductOffers/Default.GetProductOffersForListingGroup`;\r\n const finalUrl = getFullUrlOfAdsOdata(baseUrl, path, params);\r\n return [finalUrl, {\r\n method: 'GET',\r\n }];\r\n}\r\n\r\nexport async function productOfferResponseHandler(responsePromise: Promise) {\r\n const p$response = await responsePromise;\r\n const response: ProductOfferResponse = await p$response.json();\r\n response.headers = p$response.headers;\r\n\r\n return response;\r\n}\r\n","import { helpbuttonStyle, convertToLocalStyle, statusStyle } from '@bingads-webui-campaign-react/common-styles';\r\nimport { mergeStyleSets } from '@fluentui/react';\r\n// import { ComponentSettings } from '@bingads-webui-theme-2018/theme-fluent';\r\nimport { merge } from '@bingads-webui-universal/primitive-utilities';\r\nimport { pagePaddingStyle } from '@bingads-webui-campaign-react/page-padding-style';\r\n\r\n// export const pageRootClass = mergeStyles({\r\n// });\r\n\r\nexport const staticStyles = mergeStyleSets({\r\n errorColor: {\r\n color: '#A80000',\r\n },\r\n});\r\n\r\nexport const styles = (_, core) => {\r\n const helpButtonStyle = convertToLocalStyle(helpbuttonStyle({ palette: core.palette ?? {} }));\r\n const { palette } = core;\r\n return {\r\n '@global': {\r\n ...pagePaddingStyle(),\r\n },\r\n 'listing-group-content-root': merge(\r\n {},\r\n // columnChooserStyle,\r\n // getColumnChooserOverrideStyle,\r\n statusStyle({ palette }),\r\n {\r\n '& .toolbar-container': {\r\n fontSize: 14,\r\n '& .navbar .container-fluid': {\r\n paddingLeft: 3,\r\n },\r\n },\r\n '& .ms-DetailsHeader .ms-DetailsHeader-cellName': {\r\n width: '100%',\r\n },\r\n '& #bulkEditContainer': {\r\n maxWidth: 'inherit',\r\n },\r\n '& .grid-header-helpId': helpButtonStyle,\r\n '& .listing-group-name-container': {\r\n whiteSpace: 'normal',\r\n },\r\n '& .campaign-details-list-pagination': {\r\n marginLeft: 15,\r\n },\r\n '& .listing-group-condition-cell .iconba.small-icon': {\r\n fontSize: 12,\r\n },\r\n '& .show-listing-group-selector': {\r\n color: palette.themePrimary,\r\n },\r\n '& #button-hierarchy-view': {\r\n borderRadius: '2px 0px 0px 2px',\r\n },\r\n '& #button-list-view': {\r\n borderRadius: '0px 2px 2px 0px',\r\n },\r\n '& .tree-view-cell': {\r\n display: 'flex',\r\n },\r\n '& .view-switch-button': {\r\n background: palette.white,\r\n color: palette.themePrimary,\r\n padding: '0px',\r\n width: 32,\r\n minWidth: 32,\r\n minHeight: 32,\r\n height: 32,\r\n margin: '0px !important',\r\n },\r\n '& .view-switch-button.active': {\r\n background: palette.themePrimary,\r\n border: '0px',\r\n '& .iconba': {\r\n color: palette.white,\r\n },\r\n },\r\n '& .view-switch-button.not-allowed': {\r\n cursor: 'not-allowed',\r\n },\r\n '& input[type=\"checkbox\"]::after': {\r\n transitionDuration: '0s !important',\r\n },\r\n '& .grid-nodata': {\r\n padding: '20px 0 20px 40px',\r\n fontSize: '26px',\r\n lineHeight: '36px',\r\n },\r\n '& .iconba-ChevronDown': {\r\n lineHeight: '16px',\r\n opacity: 0,\r\n marginLeft: 5,\r\n fontSize: 11,\r\n color: palette.themeDark,\r\n '&:hover': {\r\n opacity: 1,\r\n },\r\n },\r\n '& .create-first-listing-group': {\r\n color: palette.neutralSecondary,\r\n fontSize: 26,\r\n lineHeight: '36px',\r\n padding: '20px 0 20px 40px',\r\n },\r\n }\r\n ),\r\n };\r\n};\r\n","/* eslint-disable @typescript-eslint/no-unused-vars */\r\nimport { columnChooserId, ScopeLevel, treeViewButtonId, listViewButtonId } from './constant';\r\n\r\ninterface ToolbarWithSelectionProps {\r\n selectedItems: any[];\r\n permissions: any;\r\n i18n: any;\r\n serverContext: any;\r\n onBidChangeClick: Function;\r\n}\r\n\r\nfunction toolbarItemsWithSelection({\r\n selectedItems,\r\n permissions,\r\n i18n,\r\n serverContext,\r\n onBidChangeClick,\r\n}: ToolbarWithSelectionProps) {\r\n // const isCurrentAccountInActive = serverContext.CurrentAccount.Status === 32; // 32 is InActive\r\n const isBidValueOption = true;\r\n const isBidBoostOption = false;\r\n\r\n const candidates: any[] = [\r\n ['expander', {\r\n type: 'expander',\r\n }],\r\n ['button-clear-selection', {\r\n type: 'button-clear-selection',\r\n }],\r\n ['divider', {\r\n id: 'product-groups-toolbar-divider',\r\n type: 'divider',\r\n }],\r\n ['button-chart-toggle', {\r\n id: 'button-chart-toggle',\r\n type: 'button',\r\n }],\r\n ];\r\n return new Map(candidates.filter(c => !!c));\r\n}\r\n\r\ninterface ToolbarWithoutSelectionConfigProps {\r\n scopeLevel: ScopeLevel,\r\n i18n: any,\r\n}\r\n\r\nfunction toolbarItemsWithoutSelection({\r\n scopeLevel, i18n,\r\n}: ToolbarWithoutSelectionConfigProps) {\r\n const candidates: any[] = [\r\n ['expander', {\r\n type: 'expander',\r\n }],\r\n [columnChooserId, {\r\n id: columnChooserId,\r\n type: 'dropdown',\r\n }],\r\n ['Expand table', {\r\n type: 'expand-table',\r\n }],\r\n scopeLevel === ScopeLevel.AssetGroup && [treeViewButtonId, {\r\n type: 'button',\r\n classes: ['view-switch-button', 'inactive'], // default inactive, update by callback\r\n iconLeftGlyphName: 'ba-BulletedTreeList',\r\n id: treeViewButtonId,\r\n ariaLabel: i18n.getString(_TL_('switch to hierarchy view')),\r\n attrs: {\r\n title: i18n.getString(_TL_('Hierarchy view')),\r\n },\r\n }],\r\n scopeLevel === ScopeLevel.AssetGroup && [listViewButtonId, {\r\n type: 'button',\r\n classes: ['view-switch-button', 'inactive'], // default inactive, update by callback\r\n iconLeftGlyphName: 'ba-BulletedList2',\r\n id: listViewButtonId,\r\n ariaLabel: i18n.getString(_TL_('switch to list view')),\r\n attrs: {\r\n title: i18n.getString(_TL_('List view')),\r\n },\r\n }],\r\n ];\r\n\r\n return new Map(candidates.filter(toolbarItem => !!toolbarItem));\r\n}\r\n\r\ninterface ToolbarConfigProps {\r\n scopeLevel: ScopeLevel,\r\n i18n: any,\r\n selectedItems: any[];\r\n permissions: any;\r\n serverContext: any;\r\n onBidChangeClick: Function;\r\n}\r\n\r\nexport function getGridToolbarConfig({\r\n scopeLevel, i18n, onBidChangeClick, permissions, selectedItems, serverContext,\r\n}: ToolbarConfigProps) {\r\n const toolbarUnselectedConfig = toolbarItemsWithoutSelection({\r\n scopeLevel, i18n,\r\n });\r\n const toolbarSelectedConfig = toolbarItemsWithSelection({\r\n i18n,\r\n onBidChangeClick,\r\n permissions,\r\n selectedItems,\r\n serverContext,\r\n });\r\n return { toolbarSelectedConfig, toolbarUnselectedConfig };\r\n}\r\n","import {\r\n destinationUrlColumn, finalUrlSuffixColumn, absoluteTopImpressionRateColumn, advertiserReportedRevenue, allConversionAdvertiserReportedRevenue, allConversionCPAColumn,\r\n allConversionRateColumn, allConversionRevenueOnAdSpendColumn, allConversionsColumn, averageCPCColumn, averageCPMColumn, clicksColumn, conversionRateColumn,\r\n conversionsColumn, CPAColumn, CTRColumn, impressionsColumn, returnOnAdSpendColumn, spendColumn, trackingUrlTemplateColumn, urlCustomParametersColumn,\r\n netRevenueColumn, eligibleImpressionsColumn, missedImpressionsColumn, impressionShareColumn, missedImpressionsNoBidColumn,\r\n missedImpressionsSpendingCapReachedColumn, missedImpressionsInsufficientBidColumn, missedImpressionsNoTaxColumn,\r\n missedImpressionsOtherColumn, ColumnKeyOdataPathMap, averageCPSColumn, salesCountColumn,\r\n} from '@bingads-webui-grid/well-known';\r\n\r\nimport {\r\n ListingGroupColumn,\r\n AssetGroupNameColumn,\r\n IncludeExcludeColumn\r\n} from './rawColumns';\r\n\r\n/**\r\n * To know how to get column raw data by column key\r\n */\r\nexport const columnKeyRawDataMap = {\r\n [ListingGroupColumn.key]: ListingGroupColumn,\r\n [AssetGroupNameColumn.key]: AssetGroupNameColumn,\r\n [IncludeExcludeColumn.key]: IncludeExcludeColumn,\r\n [absoluteTopImpressionRateColumn.key]: absoluteTopImpressionRateColumn,\r\n [advertiserReportedRevenue.key]: advertiserReportedRevenue,\r\n [allConversionAdvertiserReportedRevenue.key]: allConversionAdvertiserReportedRevenue,\r\n [allConversionCPAColumn.key]: allConversionCPAColumn,\r\n [allConversionRateColumn.key]: allConversionRateColumn,\r\n [allConversionRevenueOnAdSpendColumn.key]: allConversionRevenueOnAdSpendColumn,\r\n [allConversionsColumn.key]: allConversionsColumn,\r\n [averageCPCColumn.key]: averageCPCColumn,\r\n [averageCPMColumn.key]: averageCPMColumn,\r\n [CPAColumn.key]: CPAColumn,\r\n [CTRColumn.key]: CTRColumn,\r\n [clicksColumn.key]: clicksColumn,\r\n [conversionRateColumn.key]: conversionRateColumn,\r\n [conversionsColumn.key]: conversionsColumn,\r\n [impressionsColumn.key]: impressionsColumn,\r\n [returnOnAdSpendColumn.key]: returnOnAdSpendColumn,\r\n [spendColumn.key]: spendColumn,\r\n [eligibleImpressionsColumn.key]: eligibleImpressionsColumn,\r\n [missedImpressionsColumn.key]: missedImpressionsColumn,\r\n [missedImpressionsNoBidColumn.key]: missedImpressionsNoBidColumn,\r\n [missedImpressionsSpendingCapReachedColumn.key]: missedImpressionsSpendingCapReachedColumn,\r\n [missedImpressionsInsufficientBidColumn.key]: missedImpressionsInsufficientBidColumn,\r\n [missedImpressionsNoTaxColumn.key]: missedImpressionsNoTaxColumn,\r\n [missedImpressionsOtherColumn.key]: missedImpressionsOtherColumn,\r\n [impressionShareColumn.key]: impressionShareColumn,\r\n [averageCPSColumn.key]: averageCPSColumn,\r\n [salesCountColumn.key]: salesCountColumn,\r\n\r\n // FIXME: this is not added by back-end, so the data is always undefined/0(depend on how to treat undefeined data)\r\n // This should be an undefined behavior to visit them, but we could use them here to avoid page crash\r\n [netRevenueColumn.key]: netRevenueColumn,\r\n\r\n\r\n // FIXME: According to back-end's opinion, this column is not in back-end DB, so we should not have this column.\r\n [destinationUrlColumn.key]: destinationUrlColumn,\r\n\r\n} as const;\r\n\r\nexport const cpsColumnKeys = [\r\n averageCPSColumn.key,\r\n salesCountColumn.key,\r\n];\r\n\r\nconst odataPathOfCommonColumnsIterable: [string, string][] = [\r\n [absoluteTopImpressionRateColumn.key, 'PerformanceMetrics/AbsoluteTopImpressionRate'],\r\n [advertiserReportedRevenue.key, 'PerformanceMetrics/AdvertiserReportedRevenue'],\r\n [allConversionAdvertiserReportedRevenue.key, 'PerformanceMetrics/AllConversionAdvertiserReportedRevenue'],\r\n [allConversionCPAColumn.key, 'PerformanceMetrics/AllConversionCPA'],\r\n [allConversionRateColumn.key, 'PerformanceMetrics/AllConversionRate'],\r\n [allConversionRevenueOnAdSpendColumn.key, 'PerformanceMetrics/AllConversionRevenueOnAdSpend'],\r\n [allConversionsColumn.key, 'PerformanceMetrics/AllConversions'],\r\n [averageCPCColumn.key, 'PerformanceMetrics/AverageCPC'],\r\n [averageCPMColumn.key, 'PerformanceMetrics/AverageCPM'],\r\n [CPAColumn.key, 'PerformanceMetrics/CPA'],\r\n [CTRColumn.key, 'PerformanceMetrics/CTR'],\r\n [clicksColumn.key, 'PerformanceMetrics/Clicks'],\r\n [conversionRateColumn.key, 'PerformanceMetrics/ConversionRate'],\r\n [conversionsColumn.key, 'PerformanceMetrics/Conversions'],\r\n [impressionsColumn.key, 'PerformanceMetrics/Impressions'],\r\n [impressionShareColumn.key, 'PerformanceMetrics/ImpressionShare'],\r\n [returnOnAdSpendColumn.key, 'PerformanceMetrics/RevenueOnAdSpend'],\r\n [spendColumn.key, 'PerformanceMetrics/Spend'],\r\n [eligibleImpressionsColumn.key, 'PerformanceMetrics/EligibleImpressions'],\r\n [missedImpressionsColumn.key, 'PerformanceMetrics/MissedImpressions'],\r\n [missedImpressionsNoBidColumn.key, 'PerformanceMetrics/MissedImpressionsNoBid'],\r\n [missedImpressionsSpendingCapReachedColumn.key, 'PerformanceMetrics/MissedImpressionsSpendingCapReached'],\r\n [missedImpressionsInsufficientBidColumn.key, 'PerformanceMetrics/MissedImpressionsInsufficientBid'],\r\n [missedImpressionsNoTaxColumn.key, 'PerformanceMetrics/MissedImpressionsNoTax'],\r\n [missedImpressionsOtherColumn.key, 'PerformanceMetrics/MissedImpressionsOther'],\r\n [urlCustomParametersColumn.key, 'UrlCustomParameters'],\r\n [finalUrlSuffixColumn.key, 'FinalUrlSuffix'],\r\n [trackingUrlTemplateColumn.key, 'TrackingUrlTemplate'],\r\n [destinationUrlColumn.key, 'DestinationUrl'],\r\n [averageCPSColumn.key, 'PerformanceMetrics/AverageCPS'],\r\n [salesCountColumn.key, 'PerformanceMetrics/SalesCount'],\r\n];\r\n\r\nconst odataPathOfListingGroupColumnIterable: [string, string][] = [\r\n [ListingGroupColumn.key, 'Condition/Attribute'],\r\n [AssetGroupNameColumn.key, 'AssetGroupName'],\r\n [IncludeExcludeColumn.key, 'IsExcluded'],\r\n];\r\n\r\nexport const odataMapOfListingGroupResponse: ColumnKeyOdataPathMap = new Map([...odataPathOfCommonColumnsIterable, ...odataPathOfListingGroupColumnIterable]);\r\n","/* eslint-disable no-use-before-define */\r\n/* eslint-disable no-nested-ternary */\r\n/* eslint-disable react/prop-types */\r\n/* eslint-disable react/jsx-indent */\r\n/* eslint-disable react/jsx-filename-extension */\r\nimport { assertIsDefined } from '@bingads-webui-campaign-react/debug-assert';\r\nimport { IColumn } from '@fluentui/react';\r\nimport { Model$ListingGroup } from '../ApiType';\r\nimport { odataMapOfListingGroupResponse } from '../ColumnOdataMap';\r\nimport { ListingGroupGridItemData } from '../interface';\r\n\r\n// Not use '#', which will cause a lot of rerender\r\n// eslint-disable-next-line no-script-url\r\nexport const anchorHrefPlaceholder = 'javascript:void(0)';\r\nexport const NOT_INTERACTIVE_PLACEHOLDER = '-';\r\nexport const NO_DATA_PLACEHOLDER_NONLEAF = '-';\r\nexport const NO_DATA_PLACEHOLDER_LEAF = '';\r\n\r\nexport const IsProductGroupBidLandscapeEnabled = (serverContext: any) => serverContext.Permissions.IsProductGroupBidLandscapeEnabled;\r\nexport const IsBidLessThan5CentsInShoppingCampaignEnabled = (serverContext: any) => serverContext.Permissions.IsBidLessThan5CentsInShoppingCampaignEnabled;\r\nexport const IsCurrentAccountInactive = (serverContext: any) => serverContext.CurrentAccountInActive;\r\nexport const IsReadOnlyMode = (serverContext: any) => serverContext.ReadOnlyMode;\r\nexport const showBidBoostValue = (itemData: ListingGroupGridItemData) => itemData.BidBoost && itemData.BidBoost.Multiplier != null;\r\n\r\nexport function shouldEnableEdit(enable: boolean, serverContext: any) {\r\n return !IsCurrentAccountInactive(serverContext) && !IsReadOnlyMode(serverContext) && enable;\r\n}\r\n\r\nexport function getPropertyFromItemWithDefaultString(itemData: Model$ListingGroup | undefined, index: number | undefined, column: IColumn | undefined) {\r\n assertIsDefined(itemData);\r\n assertIsDefined(column);\r\n assertIsDefined(column.key);\r\n return itemData.IsLeaf ? getPropertyFromItem(itemData, index, column) || NO_DATA_PLACEHOLDER_LEAF : NO_DATA_PLACEHOLDER_NONLEAF;\r\n}\r\n\r\nexport function getPropertyFromItem(itemData: Model$ListingGroup | undefined, index: number | undefined, column: IColumn | undefined) {\r\n assertIsDefined(column);\r\n assertIsDefined(column.key);\r\n return getPropertyFromItemByColumnKey(itemData, column.key);\r\n}\r\n\r\nexport function getPropertyFromItemByColumnKey(itemData: Model$ListingGroup | undefined, columnKey: string) {\r\n const odataPathOfProperty = odataMapOfListingGroupResponse.get(columnKey);\r\n assertIsDefined(odataPathOfProperty);\r\n return getPropertyByPath(itemData, odataPathOfProperty);\r\n}\r\n\r\n// Format of property is like 'xx/yy/zz', then we get value from data.xx.yy.zz\r\nexport function getPropertyByPath(data: any, propertyPath: string) {\r\n const propertyPaths = propertyPath.split('/');\r\n return propertyPaths.reduce((obj, path) => (obj ? obj[path] : NO_DATA_PLACEHOLDER_NONLEAF), data);\r\n}\r\n\r\nexport const getAccountCurrencyCode = serverContext => (serverContext && serverContext.CurrentAccount && serverContext.CurrentAccount.CurrencyCode) || 'USD';\r\n\r\nexport const offerLimitExceededWarning = i18n => i18n.getString(_TL_('Products data cannot be shown if your campaign targets more than 16 million products.'));\r\nexport const offerLimitExceededWarningForListingGroup = i18n => i18n.getString(_TL_('Product performance data cannot be displayed since your campaign targets exceed 16 million products. However, you can still create or edit a listing group.'));\r\n","import React, { useMemo, useEffect, useState } from 'react';\r\nimport _ from 'underscore';\r\nimport { Callout, Link, mergeStyleSets, Text, MessageBarType, MessageBar } from '@fluentui/react';\r\nimport { I18n } from '@bingads-webui-grid/well-known';\r\nimport { ReactTemplate } from '@bingads-webui-react/react-template';\r\nimport { UiBlocker } from '@bingads-webui-react/ui-blocker';\r\nimport { Model$Listing, Model$ProductOffer } from '../../ApiType';\r\nimport { useAPIsOfListingGroup } from '../../API';\r\nimport { offerLimitExceededWarning } from '../utils';\r\n\r\nconst styles = mergeStyleSets({\r\n callout: {\r\n maxWidth: '90%',\r\n padding: '20px 24px',\r\n },\r\n partitionTrail: {\r\n fontWeight: 600,\r\n color: '#605e5c',\r\n },\r\n currentOperand: {\r\n marginBottom: 10,\r\n },\r\n currentAttribute: {\r\n color: '#323130',\r\n fontSize: '20px',\r\n },\r\n productSampleDescription: {\r\n color: '#323130',\r\n fontSize: '12px',\r\n lineHeight: '22px',\r\n marginBottom: 10,\r\n },\r\n productSampleId: {\r\n fontSize: '14px',\r\n fontWeight: '600',\r\n },\r\n link: {\r\n display: 'block',\r\n marginTop: 20,\r\n },\r\n});\r\n\r\ninterface ProductOffersCalloutProps {\r\n target: any;\r\n i18n: I18n;\r\n fullPath: Model$Listing[];\r\n scope: { save: Function, values: any };\r\n productListingGroupId: number,\r\n}\r\n\r\nexport const ProductOffersCallout: React.FunctionComponent = (props) => {\r\n const {\r\n target, i18n, fullPath, scope, productListingGroupId,\r\n } = props;\r\n\r\n const commonEntityPath = {\r\n accountId: scope.values.aid,\r\n campaignId: scope.values.campaignId,\r\n customerId: scope.values.cid,\r\n assetGroupId: scope.values.assetGroupId,\r\n };\r\n const currentCondition: Model$Listing = fullPath[fullPath.length - 1];\r\n const currentOperand =\r\n _.isEmpty(currentCondition.Operand) ? '' : i18n.getString(`ProductsGrid_Column_${currentCondition.Operand}`);\r\n const partitionTrail = useMemo(() => {\r\n let trail = i18n.getString(_TL_('All products')).concat(' > ');\r\n\r\n for (let index = 1; index < fullPath.length - 1; index += 1) {\r\n const item = fullPath[index];\r\n\r\n trail = trail.concat(item.Attribute || '', ' (', i18n.getString(`ProductsGrid_Column_${item.Operand}`), ') > ');\r\n }\r\n return trail;\r\n }, [fullPath, i18n]);\r\n\r\n const {\r\n getProductOffers,\r\n } = useAPIsOfListingGroup();\r\n const [offerCount, setOfferCount] = useState(0);\r\n const [sampleOffers, setSampleOffers] = useState>([]);\r\n const [isLoading, setIsLoading] = useState(false);\r\n const [showOfferLimitExceededError, setShowOfferLimitExceededError] = useState(false);\r\n\r\n useEffect(() => {\r\n setIsLoading(true);\r\n getProductOffers({\r\n entityPath: {\r\n ...commonEntityPath,\r\n assetGroupId: scope.values.assetGroupId,\r\n productListingGroupId,\r\n },\r\n queryOptions: {\r\n $top: 10,\r\n },\r\n }).then((response) => {\r\n setIsLoading(false);\r\n\r\n const offerLimitExceeded = response.headers.get('offerlimitexceeded');\r\n\r\n if (offerLimitExceeded === 'true') {\r\n setShowOfferLimitExceededError(true);\r\n } else {\r\n setOfferCount(response['@odata.count']);\r\n setSampleOffers(response.value);\r\n }\r\n });\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [productListingGroupId]);\r\n\r\n const navigateToProductTab = () => {\r\n scope.save('/campaign/vnext/products/');\r\n };\r\n\r\n const offerLimitExceededContent = useMemo(() => offerLimitExceededWarning(i18n), [i18n]);\r\n\r\n return (\r\n // eslint-disable-next-line react/jsx-filename-extension\r\n <>\r\n \r\n \r\n \r\n {partitionTrail}\r\n \r\n \r\n {currentOperand}\r\n \r\n \r\n {currentCondition.Attribute}\r\n \r\n \r\n {\r\n offerCount === 0 && !showOfferLimitExceededError &&\r\n {i18n.getString(_TL_('This product group does not contain any products.'))}\r\n }\r\n {\r\n offerCount === 1 &&\r\n ({offerCount} {text}),\r\n }}\r\n template={i18n.getString(_TL_('This product group contains {{offerCountModel}} product{{/offerCountModel}}, including:'))}\r\n />\r\n }\r\n {\r\n offerCount > 1 &&\r\n ({offerCount} {text}),\r\n }}\r\n template={i18n.getString(_TL_('This product group contains {{offerCountModel}} products{{/offerCountModel}}, including:'))}\r\n />\r\n }\r\n \r\n {\r\n offerCount > 0 && sampleOffers.map(sampleOffer => (\r\n
\r\n { sampleOffer.Id }\r\n ({sampleOffer.Title})\r\n
\r\n ))\r\n }\r\n {\r\n offerCount > 0 &&\r\n // eslint-disable-next-line jsx-a11y/anchor-is-valid\r\n \r\n {i18n.getString(_TL_('View full list of products'))}\r\n \r\n }\r\n {\r\n showOfferLimitExceededError &&\r\n \r\n {offerLimitExceededContent}\r\n \r\n }\r\n \r\n \r\n \r\n );\r\n};\r\n","/* eslint-disable no-use-before-define */\r\n/* eslint-disable no-nested-ternary */\r\n/* eslint-disable react/prop-types */\r\n/* eslint-disable react/jsx-indent */\r\n\r\nimport { I18n } from '@bingads-webui-grid/well-known';\r\nimport React, { FC, Fragment, useRef, useState } from 'react';\r\nimport { anchorHrefPlaceholder } from '../utils';\r\nimport { ProductOffersCallout } from './ProductOffersCallout';\r\nimport { Model$Listing } from '../../ApiType';\r\n\r\n/* eslint-disable react/jsx-filename-extension */\r\ninterface ConditionTemplateProps {\r\n total: any;\r\n depth: number;\r\n hasChildren: boolean;\r\n i18n: I18n;\r\n showSelectorIcon: boolean;\r\n attributeText: string;\r\n isExpanded: boolean;\r\n onToggleCollapse: () => void;\r\n onAddOrEditTrigger: () => void;\r\n partitionFullPath: Array;\r\n scope: {\r\n values: {\r\n campaignId: string | number;\r\n };\r\n save: Function;\r\n };\r\n productListingGroupId: number;\r\n assetGroupId: number | undefined;\r\n}\r\n\r\nconst iconWidth = 12;\r\n\r\nconst levelGap = 10;\r\n\r\nconst textIconGap = 7;\r\n\r\nexport const ConditionTemplate: FC = (props) => {\r\n const {\r\n total, depth, hasChildren, i18n, showSelectorIcon,\r\n attributeText, isExpanded, onToggleCollapse, onAddOrEditTrigger,\r\n partitionFullPath, scope, productListingGroupId, assetGroupId,\r\n } = props;\r\n\r\n const updatedScope = {\r\n values: {\r\n ...scope.values,\r\n assetGroupId,\r\n },\r\n save: scope.save,\r\n };\r\n\r\n const attributeRef = useRef(null);\r\n const [showCallout, setShowCallout] = useState(false);\r\n let hideCalloutTimer: number | undefined;\r\n const slowHideCallout = () => {\r\n hideCalloutTimer = window.setTimeout(() => {\r\n setShowCallout(false);\r\n }, 300);\r\n };\r\n\r\n const textPadding: React.CSSProperties = {\r\n paddingLeft: (hasChildren ? 0 : ((depth - 1) * levelGap) + iconWidth) + textIconGap,\r\n };\r\n\r\n const toggleIconMargin: React.CSSProperties = {\r\n marginLeft: (depth - 1) * levelGap,\r\n fontFamily: 'MsAds MDL2 Assets',\r\n };\r\n\r\n const onCollpaseToggleKeyDown: React.KeyboardEventHandler = (e) => {\r\n if (e.key === 'Enter') {\r\n onToggleCollapse();\r\n }\r\n e.stopPropagation();\r\n };\r\n\r\n const onCollapseClick: React.MouseEventHandler = (e) => {\r\n onToggleCollapse();\r\n e.stopPropagation();\r\n };\r\n\r\n const onAddOrEditClick: React.MouseEventHandler = (e) => {\r\n onAddOrEditTrigger();\r\n e.stopPropagation();\r\n };\r\n\r\n const onAddOrEditKeyDown: React.KeyboardEventHandler = (e) => {\r\n if (e.key === 'Enter') {\r\n onAddOrEditTrigger();\r\n }\r\n e.stopPropagation();\r\n };\r\n const closeTooltip: React.KeyboardEventHandler = (e) => {\r\n if (e.key === 'Escape') {\r\n setShowCallout(false);\r\n }\r\n e.stopPropagation();\r\n };\r\n return (\r\n \r\n {total ?
{total}
:\r\n
\r\n {hasChildren &&\r\n (isExpanded ?\r\n \r\n : )\r\n }\r\n
\r\n
clearTimeout(hideCalloutTimer)} onMouseLeave={() => slowHideCallout()}>\r\n {\r\n // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events\r\n setShowCallout(true)} onFocus={() => setShowCallout(true)} onKeyDown={e => closeTooltip(e)} onBlur={() => setShowCallout(false)} href={anchorHrefPlaceholder} className=\"listing-group-name-container\" aria-label={attributeText}>\r\n {attributeText}\r\n \r\n }\r\n { showCallout && }\r\n
\r\n
\r\n {showSelectorIcon &&\r\n \r\n }\r\n
\r\n
\r\n
\r\n }\r\n
);\r\n};\r\n","/* eslint-disable no-use-before-define */\r\n/* eslint-disable no-nested-ternary */\r\n/* eslint-disable react/prop-types */\r\n/* eslint-disable react/jsx-indent */\r\n/* eslint-disable react/jsx-filename-extension */\r\nimport { I18n } from '@bingads-webui-grid/well-known';\r\nimport React, { FC, Fragment, useRef, useState } from 'react';\r\nimport { anchorHrefPlaceholder } from '../utils';\r\nimport { ProductOffersCallout } from './ProductOffersCallout';\r\nimport { Model$Listing } from '../../ApiType';\r\n\r\ninterface FlattenConditionTemplateProps {\r\n path: string;\r\n Attribute: string;\r\n i18n: I18n;\r\n partitionFullPath: Array;\r\n scope: {\r\n values: {\r\n campaignId: string | number;\r\n };\r\n save: Function;\r\n };\r\n productListingGroupId: number;\r\n assetGroupId: number | undefined;\r\n}\r\n\r\nexport const FlattenConditionTemplate: FC = (props) => {\r\n const {\r\n path, Attribute, i18n, partitionFullPath, scope, productListingGroupId, assetGroupId,\r\n } = props;\r\n const attributeRef = useRef(null);\r\n const [showCallout, setShowCallout] = useState(false);\r\n let hideCalloutTimer: number | undefined;\r\n const slowHideCallout = () => {\r\n hideCalloutTimer = window.setTimeout(() => {\r\n setShowCallout(false);\r\n }, 300);\r\n };\r\n\r\n const updatedScope = {\r\n values: {\r\n ...scope.values,\r\n assetGroupId,\r\n },\r\n save: scope.save,\r\n };\r\n\r\n const closeTooltip: React.KeyboardEventHandler = (e) => {\r\n if (e.key === 'Escape') {\r\n setShowCallout(false);\r\n }\r\n e.stopPropagation();\r\n };\r\n\r\n return (\r\n \r\n {\r\n
\r\n
{path}
\r\n
\r\n
clearTimeout(hideCalloutTimer)} onMouseLeave={() => slowHideCallout()}>\r\n {\r\n // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events\r\n setShowCallout(true)} onFocus={() => setShowCallout(true)} onKeyDown={e => closeTooltip(e)} onBlur={() => setShowCallout(false)} href={anchorHrefPlaceholder} className=\"listing-group-name-container\" aria-label={Attribute}>\r\n {Attribute}\r\n \r\n }\r\n { showCallout && }\r\n
\r\n
\r\n
}\r\n
);\r\n};\r\n","/* eslint-disable no-script-url */\r\n/* eslint-disable jsx-a11y/anchor-is-valid */\r\n/* eslint-disable no-use-before-define */\r\n/* eslint-disable no-nested-ternary */\r\n/* eslint-disable react/prop-types */\r\n/* eslint-disable react/jsx-indent */\r\n/* eslint-disable react/jsx-filename-extension */\r\nimport React, { FC, Fragment } from 'react';\r\nimport { LISTING_GROUP_TREE_ROUTING } from '../../constant';\r\n\r\ninterface NameTemplateProps {\r\n campaignId: number;\r\n assetGroupId?: number;\r\n ariaLabel: string;\r\n name: string;\r\n scope: {\r\n append: Function,\r\n save: Function;\r\n };\r\n}\r\n\r\n\r\nexport const NameTemplate: FC = (props) => {\r\n const {\r\n assetGroupId, ariaLabel, campaignId, name,\r\n scope,\r\n } = props;\r\n\r\n const onNavigateClick: React.MouseEventHandler = () => {\r\n scope.append({\r\n assetGroupId,\r\n });\r\n scope.save(LISTING_GROUP_TREE_ROUTING);\r\n };\r\n\r\n return (\r\n \r\n {name ?\r\n {name}\r\n \r\n : ''}\r\n \r\n );\r\n};\r\n","import { ListingGroupGridItemData, } from '../interface';\r\n\r\nexport function fromViewModelToBulkModel(itemData: ListingGroupGridItemData) {\r\n const condition = itemData.Condition || {};\r\n if (condition.Attribute === '' && condition.Operand === '') {\r\n condition.Operand = 'All';\r\n }\r\n return {\r\n Id: itemData.Id,\r\n AssetGroupId: itemData.AssetGroupId,\r\n IsExcluded: itemData.IsExcluded,\r\n IsLeaf: itemData.IsLeaf,\r\n Condition: itemData.Condition,\r\n ParentId: itemData.ParentId,\r\n };\r\n}\r\n","/* eslint-disable react/jsx-filename-extension */\r\nimport _ from 'underscore';\r\nimport React, { FC, useCallback, useState } from 'react';\r\nimport classnames from 'classnames';\r\nimport { Callout, Text, FontIcon } from '@fluentui/react';\r\nimport { Target } from '@fluentui/react-hooks';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { merge } from '@bingads-webui-universal/primitive-utilities';\r\nimport { statusStyle } from '@bingads-webui-campaign-react/common-styles';\r\nimport { createOrUpdateListingGroup } from '@bingads-webui-campaign-react/perf-max-data';\r\nimport { ListingGroupGridItemData, } from '../../interface';\r\nimport { fromViewModelToBulkModel } from '../../API/bulk';\r\n\r\ninterface IncludeExcludeTemplateProps {\r\n itemData: ListingGroupGridItemData\r\n}\r\n\r\nexport const styles = (p, core) => {\r\n const { palette } = core;\r\n return {\r\n bold: {\r\n fontWeight: 600,\r\n },\r\n includeExcludeStatusContainer: {\r\n '& .include-exclude-status.disabled': {\r\n cursor: 'default',\r\n },\r\n '& .statusEnabled_icon.parent-node:before': {\r\n color: 'grey',\r\n },\r\n },\r\n includeExcludeCallout: merge(\r\n {\r\n marginTop: 10,\r\n marginLeft: 10,\r\n maxWidth: '90%',\r\n background: palette.white,\r\n '& .statuschangelink': {\r\n padding: '7px 20px',\r\n display: 'block',\r\n cursor: 'pointer',\r\n },\r\n '& .statuschange-icon': {\r\n marginRight: 5,\r\n },\r\n '& ul': {\r\n listStyle: 'none',\r\n paddingLeft: 0,\r\n marginBottom: 0,\r\n marginTop: 0,\r\n '& li': {\r\n cursor: 'pointer',\r\n display: 'list-item',\r\n '&:hover': {\r\n backgroundColor: palette.neutralLight,\r\n },\r\n },\r\n '& .ms-Icon': {\r\n paddingRight: 5,\r\n },\r\n },\r\n },\r\n statusStyle({ palette })\r\n ),\r\n };\r\n};\r\n\r\n\r\nexport const IncludeExcludeTemplate: FC = (props) => {\r\n const styleClassNames: any = useDefaultStyles(styles);\r\n const {\r\n itemData,\r\n } = props;\r\n const [showCallout, setShowCallout] = useState(false);\r\n const [target, setTarget] = useState(null);\r\n const statusIcon = !itemData.IsExcluded ? (\r\n
\r\n
\r\n {itemData.IsLeaf &&
}\r\n
) : (\r\n
\r\n {itemData.IsLeaf && }\r\n {!itemData.IsLeaf &&
}\r\n {itemData.IsLeaf &&
}\r\n
);\r\n\r\n const dismiss = useCallback(() => {\r\n setShowCallout(false);\r\n }, []);\r\n\r\n const show = useCallback((e) => {\r\n if (itemData.IsLeaf) {\r\n const cellEl = e.target.closest('.ms-DetailsRow-cell');\r\n setTarget(cellEl.getBoundingClientRect());\r\n setShowCallout(true);\r\n }\r\n }, [itemData.IsLeaf]);\r\n\r\n\r\n const onSave = useCallback((isInclude) => {\r\n const itemToAdd = _.extend(fromViewModelToBulkModel(itemData), {\r\n Id: -1,\r\n IsExcluded: !isInclude,\r\n });\r\n const itemToDelete = {\r\n Id: itemData.Id,\r\n AssetGroupId: itemData.AssetGroupId,\r\n Status: 'Deleted',\r\n };\r\n const res = createOrUpdateListingGroup([itemToAdd], [itemToDelete])\r\n .then(() => {\r\n itemData.refreshGridData();\r\n });\r\n\r\n return res;\r\n }, [itemData]);\r\n\r\n const onInclude = useCallback(() => {\r\n onSave(true);\r\n }, [onSave]);\r\n\r\n const onExclude = useCallback(() => {\r\n onSave(false);\r\n }, [onSave]);\r\n\r\n return (\r\n
\r\n
\r\n {statusIcon}\r\n
\r\n {showCallout && (\r\n \r\n
    \r\n
  • \r\n \r\n \r\n \r\n {itemData.i18n.getString(_TL_('Include'))}\r\n \r\n \r\n
  • \r\n
  • \r\n \r\n \r\n \r\n {itemData.i18n.getString(_TL_('Exclude'))}\r\n \r\n \r\n
  • \r\n
\r\n )}\r\n
);\r\n};\r\n","/* eslint-disable no-use-before-define */\r\n/* eslint-disable no-nested-ternary */\r\n/* eslint-disable react/prop-types */\r\n/* eslint-disable react/jsx-indent */\r\n/* eslint-disable react/jsx-filename-extension */\r\nimport React from 'react';\r\nimport { assertIsDefined } from '@bingads-webui-campaign-react/debug-assert';\r\nimport { ColumnFormat, I18n, getFormatter } from '@bingads-webui-grid/well-known';\r\nimport { IColumn } from '@fluentui/react';\r\nimport { ListingGroupColumn, AssetGroupNameColumn, IncludeExcludeColumn } from '../../rawColumns';\r\nimport { ListingGroupGridColumnOnRender, ListingGroupGridItemData, } from '../../interface';\r\nimport { getPropertyFromItem, shouldEnableEdit, IsCurrentAccountInactive, IsReadOnlyMode } from '../utils';\r\nimport { columnKeyRawDataMap } from '../../ColumnOdataMap';\r\nimport { Model$Listing } from '../../ApiType';\r\nimport { ConditionTemplate } from './ConditionTemplate';\r\nimport { FlattenConditionTemplate } from './FlattenConditionTemplate';\r\nimport { NameTemplate } from './NameTemplate';\r\nimport { IncludeExcludeTemplate } from './IncludeExcludeTemplate';\r\n\r\nconst PATH_SPLITER = '>';\r\n\r\nconst isEverythingElse = (condition: Model$Listing) =>\r\n !!(!condition.Attribute && condition.Operand);\r\n\r\nconst isAllProduct = (condition: Model$Listing) =>\r\n !!(condition.Operand === '' && !condition.Attribute);\r\n\r\nconst getNearestParentCondition = (parentConditions: Model$Listing[]) => (parentConditions[parentConditions.length - 1]);\r\n\r\nexport const getDisplayName = (condition: Model$Listing, parentConditions:Model$Listing[], i18n: I18n): any => {\r\n if (isAllProduct(condition)) {\r\n return i18n.getString(_TL_('All Products'));\r\n }\r\n const parentCondition = getNearestParentCondition(parentConditions);\r\n if (isEverythingElse(condition)) {\r\n if (isEverythingElse(parentCondition)) {\r\n return i18n.getString(_TL_('Everything else'));\r\n }\r\n return i18n.getString(_TL_(\"Everything else in '{0}'\")).replace('{0}', getDisplayName(parentCondition, parentConditions.slice(0, -1), i18n));\r\n }\r\n return condition.Attribute;\r\n};\r\n\r\nconst getPath = (parentConditions: Model$Listing[], i18n: I18n) => {\r\n if (!parentConditions || parentConditions.length === 0) {\r\n return '';\r\n }\r\n let path = '';\r\n path += getDisplayName(parentConditions[0], [], i18n);\r\n for (let i = 1; i < parentConditions.length; i += 1) {\r\n path += ` ${PATH_SPLITER} ${getDisplayName(parentConditions[i], parentConditions.slice(0, i), i18n)}`;\r\n }\r\n return path;\r\n};\r\n\r\nconst getFullPath = (conditions: Model$Listing[], i18n: I18n) => {\r\n const path: any[] = [];\r\n for (let i = 0; i < conditions.length; i += 1) {\r\n path.push({\r\n ...conditions[i],\r\n Attribute: getDisplayName(conditions[i], conditions.slice(0, i), i18n),\r\n });\r\n }\r\n return path;\r\n};\r\n\r\nexport function getAttributeTextOfConditionTemplate(i18n: I18n, item: ListingGroupGridItemData) {\r\n assertIsDefined(item.treeViewInfo);\r\n assertIsDefined(item.Condition);\r\n const parentItem = item.treeViewInfo.parent;\r\n let attributeText: string;\r\n if (isAllProduct(item.Condition)) {\r\n attributeText = i18n.getString(_TL_('All Products'));\r\n } else if (isEverythingElse(item.Condition)) {\r\n // if item is not root, it must have parent.\r\n assertIsDefined(parentItem?.Condition);\r\n if (isEverythingElse(parentItem.Condition)) {\r\n // Parent node is everything else\r\n attributeText = i18n.getString(_TL_('Everything else'));\r\n } else {\r\n // Everything else in `parent's attribute`\r\n const parentAttribute = parentItem.Condition.Attribute || i18n.getString(_TL_('All Products'));\r\n\r\n attributeText = i18n.getString(_TL_(\"Everything else in '{0}'\")).replace('{0}', parentAttribute);\r\n }\r\n } else {\r\n assertIsDefined(item.Condition.Attribute);\r\n attributeText = item.Condition.Attribute;\r\n }\r\n return attributeText;\r\n}\r\n\r\nconst onListingGroupColumnRender: ListingGroupGridColumnOnRender = (itemData) => {\r\n const isTreeView = !!itemData?.treeViewInfo;\r\n if (isTreeView) {\r\n return onListingGroupColumnTreeViewRender(itemData);\r\n }\r\n return onListingGroupColumnListViewRender(itemData);\r\n};\r\n\r\nconst onAssetGroupNameColumnRender: ListingGroupGridColumnOnRender = (itemData) => {\r\n assertIsDefined(itemData, 'item with no data');\r\n const { i18n, serverContext, scope } = itemData;\r\n const name = itemData.AssetGroupName;\r\n const assetGroupId = itemData.AssetGroupId;\r\n const currentCampaign = serverContext.CurrentCampaign;\r\n // In campaign level, there is no CampaignId in row value\r\n const cmpid = itemData.CampaignId || (currentCampaign && currentCampaign.Id);\r\n const ariaLabel = i18n.getString(_TL_('Click to scope to asset group {{assetGroupName}}'), { assetGroupName: name });\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nconst onIncludeExcludeColumnRender: ListingGroupGridColumnOnRender = (itemData) => {\r\n assertIsDefined(itemData, 'item with no data');\r\n return ();\r\n};\r\n\r\nconst onListingGroupColumnListViewRender: ListingGroupGridColumnOnRender = (itemData) => {\r\n assertIsDefined(itemData, 'item with no data');\r\n const { i18n, scope } = itemData;\r\n // if (value.$total) {\r\n // return flattenConditionTemplate(value);\r\n // }\r\n const condition = { ...itemData.Condition };\r\n const parentConditions = itemData.ParentConditions;\r\n assertIsDefined(parentConditions);\r\n const attribute = getDisplayName(condition, parentConditions, i18n);\r\n const path = getPath(parentConditions, i18n);\r\n const conditions = itemData.ParentConditions ?\r\n [...itemData.ParentConditions, itemData.Condition] : [itemData.Condition];\r\n const partitionFullPath = getFullPath(conditions, i18n);\r\n return ();\r\n};\r\n\r\nconst onListingGroupColumnTreeViewRender: ListingGroupGridColumnOnRender = (itemData) => {\r\n assertIsDefined(itemData?.treeViewInfo);\r\n assertIsDefined(itemData.treeViewInfo.depth);\r\n assertIsDefined(itemData.treeViewInfo.hasChildren);\r\n const {\r\n serverContext, i18n, total, scope, parentConditions,\r\n treeViewInfo: { hasChildren, depth, isExpanded },\r\n } = itemData;\r\n\r\n const showSelectorIcon = shouldEnableEdit(!IsCurrentAccountInactive(serverContext) &&\r\n !IsReadOnlyMode(serverContext) && (hasChildren || depth < 7), serverContext);\r\n\r\n function onToggleCollapse() {\r\n assertIsDefined(itemData?.eventHandlers.onTreeViewColumnToggleCollapse);\r\n itemData.eventHandlers.onTreeViewColumnToggleCollapse(itemData);\r\n }\r\n\r\n function onAddOrEditTrigger() {\r\n assertIsDefined(itemData?.eventHandlers.onTreeViewColumnAddOrEdit);\r\n itemData.eventHandlers.onTreeViewColumnAddOrEdit(itemData as any); // TODO: not use this trick\r\n }\r\n\r\n const attributeText = getAttributeTextOfConditionTemplate(i18n, itemData);\r\n\r\n assertIsDefined(parentConditions);\r\n const conditions = itemData.ParentConditions ?\r\n [...itemData.ParentConditions, itemData.Condition] : [itemData.Condition];\r\n const partitionFullPath = getFullPath(conditions, i18n);\r\n\r\n return ( onAddOrEditTrigger()}\r\n onToggleCollapse={() => onToggleCollapse()}\r\n attributeText={attributeText}\r\n depth={depth}\r\n hasChildren={hasChildren}\r\n i18n={i18n}\r\n isExpanded={!!isExpanded}\r\n showSelectorIcon={showSelectorIcon}\r\n total={total}\r\n partitionFullPath={partitionFullPath}\r\n scope={scope}\r\n productListingGroupId={itemData.Id}\r\n assetGroupId={itemData.AssetGroupId}\r\n />);\r\n};\r\n\r\n/**\r\n * key is the key of column raw data\r\n *\r\n * value is the render callback of fluentUI\r\n */\r\nconst columnRenderMap: Map = new Map([\r\n [IncludeExcludeColumn.key, onIncludeExcludeColumnRender],\r\n [ListingGroupColumn.key, onListingGroupColumnRender],\r\n [AssetGroupNameColumn.key, onAssetGroupNameColumnRender],\r\n]);\r\n\r\nconst defaultRender: ListingGroupGridColumnOnRender = getFormattedPropertyValueOfItem;\r\n\r\nfunction getFormattedPropertyValueOfItem(itemData: ListingGroupGridItemData | undefined, index: number | undefined, column: IColumn | undefined): string {\r\n assertIsDefined(itemData);\r\n assertIsDefined(column);\r\n const value = getPropertyFromItem(itemData, index, column);\r\n const format = getFormatOfColumn(column);\r\n return tryGetFormatString(value, itemData.i18n, format);\r\n}\r\n\r\nfunction getFormatOfColumn(column: IColumn) {\r\n return columnKeyRawDataMap[column.key].format;\r\n}\r\n\r\nexport function tryGetFormatString(value: string | number, i18n: I18n, format: ColumnFormat | undefined) {\r\n if (format) {\r\n const formatter = getFormatter(format, i18n);\r\n return formatter(value);\r\n }\r\n return value;\r\n}\r\n\r\nexport function getColumnRenderByColumnKey(columnKey: string) {\r\n if (columnRenderMap.has(columnKey)) {\r\n return columnRenderMap.get(columnKey);\r\n }\r\n return defaultRender;\r\n}\r\n","import { ListingGroupColumn, AssetGroupNameColumn } from '../rawColumns';\r\n\r\nconst isColumnSortEnabledMap: Map = new Map([\r\n [ListingGroupColumn.key, true],\r\n [AssetGroupNameColumn.key, true],\r\n]);\r\n\r\nexport function isSortEnabledByColumnKey(columnKey: string): boolean {\r\n if (isColumnSortEnabledMap.has(columnKey)) {\r\n return isColumnSortEnabledMap.get(columnKey)!;\r\n }\r\n return false;\r\n}\r\n","import { useContext, useMemo } from 'react';\r\nimport { InstrumentationContext } from '@bingads-webui-react/hoc-with-instrumentation';\r\n\r\nconst listingGroupActivityName = 'ListingGroupPage';\r\n\r\nconst schema = {\r\n scenario: [\r\n {\r\n name: 'ListingGroup',\r\n value: 'ListingGroup',\r\n activity: [\r\n { name: listingGroupActivityName, value: listingGroupActivityName },\r\n ],\r\n },\r\n ],\r\n};\r\n\r\nfunction getActivity(instrumentation) {\r\n instrumentation.addScenario(schema);\r\n\r\n const scenario = instrumentation.ListingGroup.create();\r\n const activity = scenario[listingGroupActivityName].create();\r\n\r\n return activity;\r\n}\r\n\r\nfunction getLogger(activity) {\r\n function signal(message: string) {\r\n activity.signal(message);\r\n }\r\n return { signal };\r\n}\r\n\r\nexport function useLogger() {\r\n const instrumentation = useContext(InstrumentationContext);\r\n const activity = useMemo(() => getActivity(instrumentation), [instrumentation]);\r\n const logger = useMemo(() => getLogger(activity), [activity]);\r\n return logger;\r\n}\r\n","import _ from 'underscore';\r\nimport { assertIsDefined } from '@bingads-webui-campaign-react/debug-assert';\r\nimport { WithTreeViewData } from '@bingads-webui-grid/well-known';\r\nimport { IDropdownOption } from '@fluentui/react';\r\nimport { Model$ListingGroup } from '../ApiType';\r\nimport { EVERYTHING_ELSE_NODE_ATTRIBUTE, NullPartial } from '../constant';\r\nimport { ListingGroupGridItemData } from '../interface';\r\nimport { ListingGroupTreeViewSelectorGridItem } from './panel-helper';\r\n\r\nfunction getKeyOfHotelListingGroupItem(item: ListingGroupGridItemData) { return `${item.Condition?.Operand ?? ''}-${item.Condition?.Attribute ?? ''}`; }\r\nfunction getAttributeValueOfPanelSelectorItem(item: ListingGroupTreeViewSelectorGridItem) { return item.data.Attribute; }\r\nfunction getKeyOfPanelSelectorItem(item: ListingGroupTreeViewSelectorGridItem, diemnsionKey: string) { return `${diemnsionKey}-${getAttributeValueOfPanelSelectorItem(item) ?? ''}`; }\r\n\r\nexport interface TreeViewSaveWorkerOptions {\r\n selectedItems: ListingGroupTreeViewSelectorGridItem[];\r\n selectedDimension: IDropdownOption;\r\n treeItem: WithTreeViewData;\r\n\r\n // / Need adGroup and campaign info to send request\r\n\r\n assetGroupId: number;\r\n campaignId: number;\r\n\r\n callbackWhenSkipUpdate: () => void;\r\n callbackWhenUpdate: (\r\n listingGroupsToAdd: Partial>[],\r\n listingGroupsToDelete: number[],\r\n ) => Promise;\r\n}\r\n\r\nexport function getAddAndDeleteItem(selectedDimension: IDropdownOption, selectedItems: ListingGroupTreeViewSelectorGridItem[], treeItem: WithTreeViewData) {\r\n // / handle children\r\n // 1. use `${DimensionType}-${DimensionValue}`(.i.e `${Operand}-${Attribute}`) as key\r\n // 2. calculate the difference\r\n // 3. use API to update\r\n assertIsDefined(treeItem);\r\n const childrenOfEidtItem = treeItem.treeViewInfo.children;\r\n\r\n const currentOperandOfChildren: string = selectedDimension.data.operand;\r\n\r\n const dummyEveryThingElse: ListingGroupTreeViewSelectorGridItem = {\r\n key: '_DUMMY_EVERY_THING_ELSE',\r\n data: { Attribute: EVERYTHING_ELSE_NODE_ATTRIBUTE },\r\n } as unknown as ListingGroupTreeViewSelectorGridItem;\r\n\r\n const finalSelectedItems = selectedItems.length === 0 ? selectedItems : [\r\n ...selectedItems,\r\n dummyEveryThingElse,\r\n ];\r\n\r\n const oldItemKeys = new Set(childrenOfEidtItem.map(child =>\r\n getKeyOfHotelListingGroupItem(child)));\r\n\r\n const newItemKeys = new Set(finalSelectedItems.map(item =>\r\n getKeyOfPanelSelectorItem(item, currentOperandOfChildren)));\r\n\r\n // deleted item ids are the difference of oldItemIds and newItemIds\r\n const deleteItemIds = childrenOfEidtItem.filter((child) => {\r\n const key = getKeyOfHotelListingGroupItem(child);\r\n return !newItemKeys.has(key);\r\n }).map(child => child.Id);\r\n\r\n // added item ids are the difference of newItemIds and oldItemIds\r\n const addedItems = finalSelectedItems.filter((item) => {\r\n const key = getKeyOfPanelSelectorItem(item, currentOperandOfChildren);\r\n return !oldItemKeys.has(key);\r\n });\r\n\r\n return { deleteItemIds, addedItems };\r\n}\r\n\r\nexport async function treeViewSaveWorker(params: TreeViewSaveWorkerOptions) {\r\n const {\r\n selectedItems,\r\n selectedDimension,\r\n treeItem,\r\n callbackWhenSkipUpdate,\r\n callbackWhenUpdate,\r\n assetGroupId,\r\n campaignId,\r\n } = params;\r\n\r\n // / handle children\r\n // 1. use `${DimensionType}-${DimensionValue}`(.i.e `${Operand}-${Attribute}`) as key\r\n // 2. calculate the difference\r\n // 3. use API to update\r\n assertIsDefined(treeItem);\r\n const childrenOfEidtItem = treeItem.treeViewInfo.children;\r\n\r\n const prevOperandOfChildren = childrenOfEidtItem.length === 0 ? undefined : childrenOfEidtItem[0].Condition?.Operand;\r\n\r\n const currentOperandOfChildren: string = selectedDimension.data.operand;\r\n\r\n const { addedItems, deleteItemIds } = getAddAndDeleteItem(selectedDimension, selectedItems, treeItem);\r\n\r\n // for all new node, it should have a unique negative ID.\r\n // There should only be one new root, whose ID is `-1`\r\n const rootNodeId = -1;\r\n let negativeId = -2;\r\n const editItemId = treeItem.Id;\r\n const wasEditingNodeLeaf = treeItem.treeViewInfo.children.length === 0;\r\n const isEditingNodeLeaf = selectedItems.length === 0;\r\n\r\n const inheritNode = (() => {\r\n switch (true) {\r\n case wasEditingNodeLeaf && !isEditingNodeLeaf:\r\n // add patition under leaf node, new partition inherits bid from leaf node.\r\n return treeItem;\r\n case !wasEditingNodeLeaf && prevOperandOfChildren === currentOperandOfChildren:\r\n // add partition under non-leaf node,\r\n // new partition inherits bid from everythingElse at the same level.\r\n return treeItem.treeViewInfo.children.find(child => child.Condition?.Attribute === EVERYTHING_ELSE_NODE_ATTRIBUTE);\r\n default:\r\n return undefined;\r\n }\r\n })();\r\n\r\n // children could be add to editing node, which could be\r\n // - parent, children should set parent ID to editing node\r\n // - leaf, editing node will have a dummy ID and all children should set it as parent\r\n const parentIdOfChildren = !wasEditingNodeLeaf ? treeItem.Id : rootNodeId;\r\n assertIsDefined(parentIdOfChildren);\r\n\r\n const listingGroupsToAdd: Partial>[] = addedItems.map(item => buildListingGroupToAdd({\r\n Attribute: getAttributeValueOfPanelSelectorItem(item),\r\n Operand: currentOperandOfChildren,\r\n ParentId: parentIdOfChildren,\r\n isLeaf: true,\r\n inheritNode,\r\n isDeleteAll: false,\r\n }));\r\n\r\n const listingGroupsToDelete = Array.from(deleteItemIds);\r\n\r\n // if nothing is changed, just skip\r\n if (listingGroupsToAdd.length === 0 && listingGroupsToDelete.length === 0) {\r\n callbackWhenSkipUpdate();\r\n return;\r\n }\r\n\r\n // handle current node itself and \"everything else\" node.\r\n switch (true) {\r\n case wasEditingNodeLeaf && !isEditingNodeLeaf:\r\n // if the item is changed from leaf to parent\r\n // - delete it and add it back to make back-end happy(make this item a`Subdivision` rather than`Unit`)\r\n\r\n // item itself\r\n listingGroupsToDelete.push(editItemId);\r\n listingGroupsToAdd.push(buildListingGroupToAdd({\r\n ParentId: treeItem.ParentId ?? undefined,\r\n Attribute: treeItem.Condition?.Attribute ?? null,\r\n Operand: (!treeItem.Condition || treeItem.Condition.Operand === '') ? 'All' : treeItem.Condition.Operand,\r\n isLeaf: false,\r\n inheritNode,\r\n isDeleteAll: _.isEmpty(listingGroupsToAdd),\r\n }));\r\n break;\r\n case isEditingNodeLeaf:\r\n // Note: from leaf to leaf is skipped, for nothing will be changed\r\n // if the item is changed from parent to leaf, delete it and add it back to make back-end happy(make this item a `Unit` rather than `Subdivision`)\r\n listingGroupsToDelete.push(editItemId);\r\n listingGroupsToAdd.push(buildListingGroupToAdd({\r\n ParentId: treeItem.ParentId ?? undefined,\r\n Attribute: treeItem.Condition?.Attribute ?? null,\r\n Operand: (!treeItem.Condition || treeItem.Condition.Operand === '') ? 'All' : treeItem.Condition.Operand,\r\n isLeaf: true,\r\n inheritNode,\r\n isDeleteAll: _.isEmpty(listingGroupsToAdd),\r\n }));\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n // sort the requests to make the root is the first child\r\n listingGroupsToAdd.sort((a, b) => {\r\n assertIsDefined(a.Id);\r\n assertIsDefined(b.Id);\r\n if (a.Id < b.Id) {\r\n return 1;\r\n }\r\n if (a.Id > b.Id) {\r\n return -1;\r\n }\r\n return 0;\r\n });\r\n\r\n await callbackWhenUpdate(listingGroupsToAdd, listingGroupsToDelete);\r\n\r\n interface MetaInfo {\r\n ParentId: number | undefined;\r\n Attribute: string | null;\r\n Operand: string | undefined;\r\n isLeaf: boolean;\r\n inheritNode: WithTreeViewData | undefined;\r\n isDeleteAll: boolean;\r\n }\r\n\r\n function buildListingGroupToAdd(metaInfo: MetaInfo): Partial> {\r\n return {\r\n Id: metaInfo.isLeaf ? negativeId-- : rootNodeId,\r\n ParentId: metaInfo.ParentId,\r\n IsLeaf: metaInfo.isLeaf,\r\n AssetGroupId: assetGroupId, // in tree editor page, we always have AdGroupId\r\n CampaignId: campaignId, // in tree editor page, we always have CampaignId\r\n // IsAutoBidding: false, // TODO: Not enabled for phase 1\r\n Condition: { Attribute: metaInfo.Attribute ?? (null as unknown as undefined), Operand: metaInfo.Operand ?? (null as unknown as undefined) },\r\n IsExcluded: !metaInfo.isDeleteAll && metaInfo.isLeaf && ((metaInfo.Attribute === '' && metaInfo.Operand !== 'All') || (metaInfo.inheritNode?.IsExcluded)),\r\n };\r\n }\r\n}\r\n","/* eslint-disable react/jsx-filename-extension */\r\nimport { isString } from 'underscore';\r\nimport { assertIsDefined } from '@bingads-webui-campaign-react/debug-assert';\r\nimport { clicksColumn, conversionsColumn, impressionsColumn, WithTreeViewData } from '@bingads-webui-grid/well-known';\r\nimport { IColumn, TextField } from '@fluentui/react';\r\nimport React from 'react';\r\nimport { WithBulk } from './PanelSelector';\r\nimport { Model$ProductAttributeStatistic, Model$ListingCondition } from '../ApiType';\r\nimport { ListingGroupGridItemData } from '../interface';\r\nimport { ListingColumn } from '../rawColumns';\r\n\r\nconst conversionsFiledName = 'conversions';\r\nconst impressionsFiledName = 'impressions';\r\nconst clicksFiledName = 'clicks';\r\nconst productsFiledName = 'products';\r\nconst defaultValuePlaceholder = '-';\r\nconst firstColumnName = 'primary';\r\nexport interface ListingGroupTreeViewSelectorGridItem {\r\n key: string;\r\n // fileds\r\n [firstColumnName]: string;\r\n /**\r\n * @default \"-\"\r\n */\r\n [conversionsFiledName]: number | string | undefined | null;\r\n /**\r\n * @default \"-\"\r\n */\r\n [impressionsFiledName]: number | string | undefined | null;\r\n /**\r\n * @default \"-\"\r\n */\r\n [clicksFiledName]: number | string | undefined | null;\r\n /**\r\n * @default \"-\"\r\n */\r\n [productsFiledName]: number | string | undefined | null;\r\n\r\n data: {\r\n Attribute: string;\r\n }\r\n}\r\n\r\nconst dataColumnWidth = 80;\r\n\r\nexport function buildTreeViewSelectorItems(selectedDimension: Model$ListingCondition, selectedDimensionGridData: Model$ProductAttributeStatistic[], childrenOfNode: WithTreeViewData[]): ListingGroupTreeViewSelectorGridItem[] {\r\n const selectedDimensionGridDataMap: { [attributeName: string]: Model$ProductAttributeStatistic } = selectedDimensionGridData.reduce((cur, item) => {\r\n assertIsDefined(item.AttributeName);\r\n // eslint-disable-next-line no-param-reassign\r\n cur[item.AttributeName] = item;\r\n return cur;\r\n }, {});\r\n const domainDataItems: ListingGroupTreeViewSelectorGridItem[] = selectedDimension.DomainData?.map((item) => {\r\n const curItemDataitem = selectedDimensionGridDataMap[item.Id];\r\n assertIsDefined(item.Value);\r\n return {\r\n key: item.Id.toString(),\r\n [firstColumnName]: item.Value,\r\n [clicksFiledName]: curItemDataitem?.PerformanceMetrics.Clicks,\r\n [conversionsFiledName]: curItemDataitem?.PerformanceMetrics.Conversions,\r\n [impressionsFiledName]: curItemDataitem?.PerformanceMetrics.Impressions,\r\n [productsFiledName]: curItemDataitem?.ProductCount,\r\n data: {\r\n Attribute: item.Value,\r\n },\r\n };\r\n }) ?? [];\r\n\r\n const apiDataItems: ListingGroupTreeViewSelectorGridItem[] = selectedDimensionGridData.map((item) => {\r\n assertIsDefined(item.AttributeName);\r\n return {\r\n key: item.Id.toString(),\r\n [firstColumnName]: item.AttributeName,\r\n [clicksFiledName]: item?.PerformanceMetrics.Clicks,\r\n [conversionsFiledName]: item?.PerformanceMetrics.Conversions,\r\n [impressionsFiledName]: item?.PerformanceMetrics.Impressions,\r\n [productsFiledName]: item?.OfferCount,\r\n data: {\r\n Attribute: item.AttributeName,\r\n },\r\n };\r\n }) ?? [];\r\n\r\n const existingItems = buildTreeViewSelectorItemsByChildrenOfNode(selectedDimension, childrenOfNode);\r\n const tempDataItems = mergeTreeViewSelectorItems(domainDataItems, existingItems);\r\n return fillDataFromAPI(tempDataItems, apiDataItems, selectedDimension.HasDomainData);\r\n}\r\n\r\nexport function buildTreeViewSelectorItemsWithoutStatistics(selectedDimension: Model$ListingCondition): ListingGroupTreeViewSelectorGridItem[] {\r\n const domainDataItems: ListingGroupTreeViewSelectorGridItem[] = selectedDimension.DomainData?.map((item) => {\r\n assertIsDefined(item.Value);\r\n return {\r\n key: item.Id.toString(),\r\n [firstColumnName]: item.Value,\r\n [clicksFiledName]: undefined,\r\n [conversionsFiledName]: undefined,\r\n [impressionsFiledName]: undefined,\r\n [productsFiledName]: undefined,\r\n data: {\r\n Attribute: item.Value,\r\n },\r\n };\r\n }) ?? [];\r\n\r\n const existingItems = buildTreeViewSelectorItemsByChildrenOfNode(selectedDimension, []);\r\n const tempDataItems = mergeTreeViewSelectorItems(domainDataItems, existingItems);\r\n return tempDataItems;\r\n}\r\n\r\nfunction fillDataFromAPI(candidateItems: ListingGroupTreeViewSelectorGridItem[], apiDataItems: ListingGroupTreeViewSelectorGridItem[], hasDomainData: boolean) {\r\n return overrideMergeByValue(\r\n candidateItems,\r\n apiDataItems,\r\n x => x.data.Attribute,\r\n (b, index, arr) => {\r\n const newItem = { ...arr[index] };\r\n newItem[clicksFiledName] = b?.[clicksFiledName];\r\n newItem[conversionsFiledName] = b?.[conversionsFiledName];\r\n newItem[impressionsFiledName] = b?.[impressionsFiledName];\r\n newItem[productsFiledName] = b?.[productsFiledName];\r\n // eslint-disable-next-line no-param-reassign\r\n arr[index] = newItem;\r\n },\r\n !hasDomainData\r\n );\r\n}\r\n\r\n/**\r\n * Given two array, \"base\" and \"additional\".\r\n *\r\n * Shadow copy \"base\" array to \"result\" array.\r\n * If found any element in \"additional\" is existed in \"base\", call the callback.\r\n * Else add the element to the \"result\" array.\r\n *\r\n * @param a base array\r\n * @param b additional array\r\n * @param comparator a callback to compare whether two element is same\r\n * @param callback called when two element is the same according to `comparator`\r\n * @returns result array\r\n */\r\nfunction overrideMergeByComparator(a: T[], b: T[], comparator: (x: T, y: T) => boolean, callback: (b: T, index: number, arr: T[]) => void, appendNewItems:boolean) {\r\n const res = [...a];\r\n b.forEach((x) => {\r\n const index = res.findIndex(y => comparator(x, y));\r\n if (index >= 0) {\r\n callback(x, index, res);\r\n } else if (appendNewItems) {\r\n res.push(x);\r\n }\r\n });\r\n return res;\r\n}\r\n\r\nfunction overrideMergeByValue(a: T[], b: T[], valuePicker: (x: T) => unknown, callback: (b: T, index: number, arr: T[]) => void, appendNewItems:boolean) {\r\n const comperator = (x: T, y: T) => {\r\n const xValue = valuePicker(x);\r\n const yValue = valuePicker(y);\r\n\r\n if (isString(xValue) && isString(yValue)) {\r\n return xValue.toLowerCase() === yValue.toLowerCase();\r\n }\r\n\r\n return xValue === yValue;\r\n };\r\n\r\n return overrideMergeByComparator(a, b, comperator, callback, appendNewItems);\r\n}\r\n\r\nexport function mergeTreeViewSelectorItems(oldItems: ListingGroupTreeViewSelectorGridItem[], additionalItems: ListingGroupTreeViewSelectorGridItem[]) {\r\n return overrideMergeByValue(\r\n oldItems,\r\n additionalItems,\r\n x => x.data.Attribute,\r\n // eslint-disable-next-line no-return-assign, no-param-reassign\r\n (b, index, arr) => arr[index] = b,\r\n true\r\n );\r\n}\r\n\r\nexport function buildTreeViewSelectorItemsByChildrenOfNode(selectedDimension: Model$ListingCondition, childrenOfNode: WithTreeViewData[]): ListingGroupTreeViewSelectorGridItem[] {\r\n const res: ListingGroupTreeViewSelectorGridItem[] = [];\r\n childrenOfNode.forEach((child) => {\r\n // filter out everything else\r\n if (child.Condition?.Attribute\r\n && selectedDimension.Operand === child.Condition.Operand\r\n ) {\r\n res.push({\r\n key: child.Id.toString(),\r\n [firstColumnName]: child.Condition.Attribute,\r\n [clicksFiledName]: undefined,\r\n [conversionsFiledName]: undefined,\r\n [impressionsFiledName]: undefined,\r\n [productsFiledName]: undefined,\r\n data: {\r\n Attribute: child.Condition.Attribute,\r\n },\r\n });\r\n }\r\n });\r\n return res;\r\n}\r\n\r\nconst defaultRender: IColumn['onRender'] = (item, index, column) => {\r\n let value = item && column?.fieldName ? item[column.fieldName] : '';\r\n\r\n if (value === null || value === undefined) {\r\n value = defaultValuePlaceholder;\r\n }\r\n\r\n if (typeof value === 'boolean') {\r\n return value.toString();\r\n }\r\n\r\n return (\r\n \r\n {value}\r\n \r\n );\r\n};\r\n\r\nexport function fillDataToBulkAddedItem(item: WithBulk) {\r\n const isAddedByBulkEdit = !!item.__bulk;\r\n if (isAddedByBulkEdit) {\r\n if (!item.data) {\r\n // eslint-disable-next-line no-param-reassign\r\n item.data = {\r\n Attribute: item[firstColumnName],\r\n };\r\n } else {\r\n // eslint-disable-next-line no-param-reassign\r\n item.data.Attribute = item[firstColumnName];\r\n }\r\n }\r\n}\r\n\r\nconst primaryColumnRender: IColumn['onRender'] = (item, index, column) => {\r\n const value = item && column?.fieldName ? item[column.fieldName] : '';\r\n\r\n const isEditableItem = Number.isInteger(item.key) && item.key < 0;\r\n if (!isEditableItem) {\r\n return (\r\n \r\n {value}\r\n );\r\n }\r\n return (\r\n {\r\n assertIsDefined(column?.fieldName);\r\n // eslint-disable-next-line no-param-reassign\r\n item[column.fieldName] = newValue;\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport function buildTreeViewSelectorColumns(primaryColumnId: string, primaryColumnName: string, i18n: any, includeDataColumns: boolean): IColumn[] {\r\n const primaryColumn: IColumn = {\r\n key: primaryColumnId,\r\n name: i18n.getString(`ProductsGrid_Column_${primaryColumnName}`),\r\n minWidth: 180,\r\n fieldName: firstColumnName,\r\n isRowHeader: true,\r\n onRender: primaryColumnRender,\r\n };\r\n if (!includeDataColumns) {\r\n return [primaryColumn];\r\n }\r\n const dataColumns: IColumn[] = [\r\n { ...conversionsColumn, filedName: conversionsFiledName },\r\n { ...impressionsColumn, filedName: impressionsFiledName },\r\n { ...clicksColumn, filedName: clicksFiledName },\r\n { ...ListingColumn, filedName: productsFiledName },\r\n ].map(column => ({\r\n key: column.key,\r\n name: i18n.getString(column.name),\r\n minWidth: dataColumnWidth,\r\n maxWidth: dataColumnWidth,\r\n fieldName: column.filedName,\r\n onRender: defaultRender,\r\n }));\r\n return [primaryColumn, ...dataColumns];\r\n}\r\n","/* eslint-disable */\r\nimport React, { useState, useRef, useCallback, useContext } from 'react';\r\nimport _ from 'underscore';\r\nimport { assertIsDefined } from '@bingads-webui-campaign-react/debug-assert';\r\nimport { IColumn, IDropdownOption } from '@fluentui/react';\r\nimport {WithTreeViewData, I18n } from '@bingads-webui-grid/well-known';\r\nimport { useDateRange } from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport { PanelSelectorProps, WithBulk } from './treeViewPanelSelector/PanelSelector';\r\nimport { AlertHelper } from '@bingads-webui-campaign/alert-helper';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { mergeData } from '@bingads-webui-campaign-react/product-services';\r\nimport { Model$ListingCondition, Model$ListingGroup } from './ApiType';\r\nimport { getValidListingConditions, getValidListingConditionsForWithoutPreselectedTreeNode } from './API/getListingGroupConditions';\r\nimport { useAPIsOfListingGroup } from './API';\r\nimport { ListingGroupGridItemData, TreeViewEventHandler } from './interface';\r\nimport { getAttributeTextOfConditionTemplate } from './render';\r\nimport { getAddAndDeleteItem, treeViewSaveWorker } from './treeViewPanelSelector/panel-callbacks';\r\nimport { buildTreeViewSelectorColumns, buildTreeViewSelectorItems, buildTreeViewSelectorItemsWithoutStatistics, buildTreeViewSelectorItemsByChildrenOfNode, fillDataToBulkAddedItem, ListingGroupTreeViewSelectorGridItem } from './treeViewPanelSelector/panel-helper';\r\nimport { ProductAttrubuteStatisticsResponse } from './API/productAttributeStatistics';\r\nimport { useLogger } from './logger';\r\nimport { getProductData, getProductScopeFromOData } from './API/getProductScope';\r\nimport { useAccountData } from './API/useAccountData';\r\nimport { offerLimitExceededWarningForListingGroup } from './render/utils';\r\n\r\n/**\r\n * default value used in fluent-ui\r\n * reference https://github.com/microsoft/fluentui/blob/31345de30d356731eeb0ac1e658a2652f8f00aa7/packages/react/src/components/DetailsList/DetailsList.base.tsx\r\n */\r\ninterface UseTreeViewPanelSelectorProps {\r\n allRowRawData: Model$ListingGroup[] | undefined;\r\n setAllRowRawData: Function,\r\n scope: { save: Function, values: any };\r\n refreshGridData: Function;\r\n getArguemntsOfUpdateGridDataByCurrentState: Function,\r\n i18n: I18n;\r\n currentCampaign: any;\r\n}\r\n\r\nconst NonSplittableConditions = ['CategoryL1', 'CategoryL2', 'CategoryL3', 'CategoryL4', 'CategoryL5'];\r\n\r\nconst DEFAULT_SALES_COUNTRY = 'US';\r\n\r\nexport const useTreeViewPanelSelector = (props: UseTreeViewPanelSelectorProps) => {\r\n const {\r\n i18n, allRowRawData, setAllRowRawData, scope, currentCampaign,\r\n refreshGridData,getArguemntsOfUpdateGridDataByCurrentState\r\n } = props;\r\n\r\nconst { productAttributeStatistics, getListingGroupConditions, updateListingTree } = useAPIsOfListingGroup();\r\nconst commonEntityPath = {\r\n accountId: scope.values.aid,\r\n campaignId: scope.values.campaignId || currentCampaign.Id,\r\n customerId: scope.values.cid,\r\n assetGroupId: scope.values.assetGroupId\r\n};\r\nconst dataRange = useDateRange();\r\nconst logger = useLogger();\r\n// #region TreeView\r\nconst [expandedItemIds, setExpandedItemIds] = useState(new Set());\r\nconst [isTreeViewSelectorOpen, setIsTreeViewSelectorOpen] = useState(false);\r\n\r\nconst [treeViewSelectorDimensions, setTreeViewSelectorDimensions] = useState[]>([]);\r\nconst [treeViewSelectorHeaderText, setTreeViewSelectorHeaderText] = useState('');\r\nconst [treeViewSelectorInitialSelectedItems, setTreeViewSelectorInitialSelectedItems] = useState([]);\r\nconst [treeViewSelectorItems, setTreeViewSelectorItems] = useState([]);\r\nconst [treeViewSelectorColumns, setTreeViewSelectorColumns] = useState([]);\r\nconst [isTreeViewShimmerEnabled, setIsTreeViewShimmerEnabled] = useState(false);\r\nconst serverContext = useContext(ServerContext);\r\nconst { getAccount } = useAccountData({ scope });\r\nfunction onTreeViewCancel() {\r\n setIsTreeViewSelectorOpen(false);\r\n logger.signal('Cancel button is clicked in tree view selector');\r\n}\r\n\r\nconst ADD_ONCE_LIMIT = 5_000;\r\nconst ADD_ONCE_LIMIT_STRING = \"5,000\";\r\nconst ALL_LIMIT = 20_000;\r\nconst ALL_LIMIT_STRING = \"20,000\";\r\nconst getErrorsForTreeViewSelector: PanelSelectorProps[\"getErrors\"] = (items: WithBulk[], selectedDimension: IDropdownOption) => {\r\n assertIsDefined(currentEditTreeItem.current);\r\n assertIsDefined(allRowRawData);\r\n items.forEach(selectedItem => {\r\n fillDataToBulkAddedItem(selectedItem);\r\n });\r\n const { addedItems, deleteItemIds } = getAddAndDeleteItem(selectedDimension, items, currentEditTreeItem.current);\r\n const totalItemsCount = allRowRawData.length;\r\n const errors: string[] = [];\r\n if (addedItems.length + deleteItemIds.length > ADD_ONCE_LIMIT) {\r\n errors.push(i18n.getString(_TL_(\"Number of updated values should not exceed {{number}}.\"), { number: ADD_ONCE_LIMIT_STRING }));\r\n }\r\n if (totalItemsCount + addedItems.length - deleteItemIds.length > ALL_LIMIT) {\r\n errors.push(i18n.getString(_TL_(\"Change exceeds maximum allowed number of {{number}} Products in a single Asset Group.\"), { number: ALL_LIMIT_STRING }));\r\n }\r\n return errors;\r\n}\r\n\r\nconst onGenericError = useCallback(() => {\r\n const alertHelper = new AlertHelper({ i18n });\r\n alertHelper.showError(i18n.getString(_TL_('We\\'ve encountered an error and can\\'t continue. Please contact support for further assistance.')));\r\n}, [i18n]);\r\n\r\nconst showOfferLimitExceededError = useCallback(() => {\r\n const warning = offerLimitExceededWarningForListingGroup(i18n);\r\n const alertHelper = new AlertHelper({ i18n });\r\n alertHelper.showWarning(warning);\r\n}, [i18n, scope]);\r\n\r\nconst onTreeViewSave: PanelSelectorProps[\"onSave\"] = async (selectedItems: WithBulk[], selectedDimension) => {\r\n logger.signal('Save button is clicked in tree view selector');\r\n assertIsDefined(currentEditTreeItem.current);\r\n assertIsDefined(scope.values.assetGroupId);\r\n assertIsDefined(scope.values.campaignId);\r\n selectedItems.forEach(selectedItem => {\r\n fillDataToBulkAddedItem(selectedItem);\r\n });\r\n await treeViewSaveWorker({\r\n selectedItems,\r\n selectedDimension,\r\n treeItem: currentEditTreeItem.current,\r\n assetGroupId: scope.values.assetGroupId,\r\n campaignId: scope.values.campaignId,\r\n callbackWhenSkipUpdate: () => {\r\n setIsTreeViewSelectorOpen(false);\r\n },\r\n callbackWhenUpdate: async (listingGroupsToAdd, listingGroupsToDelete) => {\r\n setIsTreeViewSelectorOpen(false);\r\n // change to loading state before sending update hotel listing tree API\r\n setAllRowRawData(undefined);\r\n\r\n await updateListingTree({\r\n ListingGroupsToAdd: listingGroupsToAdd,\r\n ListingGroupsToDelete: listingGroupsToDelete,\r\n AssetGroupId: scope.values.assetGroupId\r\n });\r\n\r\n await refreshGridData(getArguemntsOfUpdateGridDataByCurrentState());\r\n }\r\n });\r\n}\r\n\r\n// When updating tree view for Loactions, the 'Attribute' should be LocationID, but they are translated text when getting ListingGroup GridData.\r\n// Tricky thing:\r\n// If we want to add leaves under \"Country\", we also need to change the parent node(whose Operand is \"Country\") from \"leaf\" to \"non-leaf\" by deleting it and creating a new one.\r\n// However, we do not know the LocationID of the parent node. So we have to send another request to get the mapping.\r\nconst currentSelectedDimensionGridDataTask = useRef>();\r\n\r\nconst productAttributeStatisticsHelper = async (productListingGroupId: number, operand: string) => {\r\n return productAttributeStatistics({\r\n entityPath: {\r\n ...commonEntityPath,\r\n assetGroupId: scope.values.assetGroupId,\r\n productListingGroupId,\r\n },\r\n payload: {\r\n gridDataParameters: {\r\n DateRange: {\r\n StartDate: dataRange.StartDate,\r\n EndDate: dataRange.EndDate,\r\n }\r\n },\r\n operand,\r\n },\r\n queryOptions: {\r\n $top: 10000\r\n },\r\n })\r\n}\r\n\r\nasync function updateTreeViewGridByEditTreeItemAndSelectedDimension(treeItem: WithTreeViewData, selectedDimension: Model$ListingCondition) {\r\n assertIsDefined(selectedDimension?.Operand);\r\n setTreeViewSelectorColumns(buildTreeViewSelectorColumns(selectedDimension.Operand, selectedDimension.Operand, i18n, true));\r\n\r\n const task = productAttributeStatisticsHelper(treeItem.Id, selectedDimension.Operand);\r\n currentSelectedDimensionGridDataTask.current = task;\r\n const productAttrubuteStatisticsResponse = await task;\r\n const selectedDimensionGridData = productAttrubuteStatisticsResponse.value;\r\n\r\n const offerLimitExceeded = productAttrubuteStatisticsResponse.headers.get('Offerlimitexceeded');\r\n\r\n if (offerLimitExceeded === 'true') {\r\n showOfferLimitExceededError();\r\n }\r\n\r\n setTreeViewSelectorItems(buildTreeViewSelectorItems(\r\n selectedDimension,\r\n selectedDimensionGridData,\r\n treeItem.treeViewInfo.children));\r\n}\r\n\r\n\r\nfunction updateTreeViewGridByEditTreeItemAndSelectedDimensionWithoutStatistics(treeItem: WithTreeViewData, selectedDimension: Model$ListingCondition) {\r\n assertIsDefined(selectedDimension?.Operand);\r\n setTreeViewSelectorColumns(buildTreeViewSelectorColumns(selectedDimension.Operand, selectedDimension.Operand, i18n, false));\r\n setTreeViewSelectorItems(buildTreeViewSelectorItemsWithoutStatistics(selectedDimension));\r\n}\r\n\r\nasync function onTreeViewSelectedDimensionChange(event: React.FormEvent, option?: IDropdownOption, index?: number) {\r\n logger.signal('Change to another dimension in tree view selector');\r\n assertIsDefined(option);\r\n assertIsDefined(currentEditTreeItem.current);\r\n\r\n setIsTreeViewShimmerEnabled(true);\r\n\r\n const selectedDimension = currentValidListingConditions.current\r\n .find(c => c.Id === option.key);\r\n assertIsDefined(selectedDimension);\r\n\r\n await updateTreeViewGridByEditTreeItemAndSelectedDimension(currentEditTreeItem.current, selectedDimension);\r\n\r\n setIsTreeViewShimmerEnabled(false);\r\n}\r\n\r\nfunction onTreeViewSelectedDimensionChangeWithoutStatistics(event: React.FormEvent, option?: IDropdownOption, index?: number) {\r\n logger.signal('Change to another dimension in tree view selector');\r\n assertIsDefined(option);\r\n assertIsDefined(currentEditTreeItem.current);\r\n\r\n const selectedDimension = currentValidListingConditions.current\r\n .find(c => c.Id === option.key);\r\n assertIsDefined(selectedDimension);\r\n\r\n updateTreeViewGridByEditTreeItemAndSelectedDimensionWithoutStatistics(currentEditTreeItem.current, selectedDimension);\r\n}\r\n\r\n// this data should be shared in different callbacks for one opened data\r\n// use `Ref` rather than `State`, for this is useless for render\r\nconst currentValidListingConditions = useRef([]);\r\n// a quick and dirty way to share editing item\r\nconst currentEditTreeItem = useRef>();\r\n\r\nfunction getInitialSelectedDimension(item: WithTreeViewData, dimensions: Model$ListingCondition[]) {\r\n const DimensionProperties = [\r\n 'Category', 'CategoryL1', 'CategoryL2', 'CategoryL3', 'CategoryL4', 'CategoryL5', 'Condition',\r\n ];\r\n let selectedDimensionName = '';\r\n\r\n if (item.treeViewInfo.children.length) {\r\n assertIsDefined(item.treeViewInfo.children[0].Condition?.Operand);\r\n selectedDimensionName = item.treeViewInfo.children[0].Condition.Operand;\r\n } else {\r\n const operands = dimensions.map(diemnsion => diemnsion.Operand);\r\n const findResult = DimensionProperties.find(dimension => operands.includes(dimension)) || operands[0];\r\n assertIsDefined(findResult);\r\n selectedDimensionName = findResult;\r\n }\r\n\r\n const result = dimensions.find(dimension => dimension.Operand === selectedDimensionName);\r\n assertIsDefined(result);\r\n return result;\r\n}\r\n\r\nasync function getSupportedCountries() {\r\n const isOdataGetProductScopeEnabled = _.get(serverContext, ['DynamicPermissions', 'OdataGetProductScope'], false);\r\n const callStartTime = Date.now();\r\n const pData = isOdataGetProductScopeEnabled ?\r\n await getProductScopeFromOData(serverContext) :\r\n await getProductData({\r\n cid: scope.values.cid,\r\n aid: scope.values.aid,\r\n uid: scope.values.uid,\r\n });\r\n\r\n if (isOdataGetProductScopeEnabled) {\r\n logger.signal(`[PmaxListingGroup][OdataGetProductScopeForPmax] GetProductDataCallTime: ${Date.now() - callStartTime}`);\r\n } else {\r\n logger.signal(`[PmaxListingGroup] GetProductDataCallTime: ${Date.now() - callStartTime}`);\r\n }\r\n\r\n let data = pData;\r\n\r\n if (isOdataGetProductScopeEnabled && _.isArray(data)) {\r\n data = mergeData(pData);\r\n }\r\n\r\n const {\r\n SalesCountryCollection,\r\n } = data;\r\n if (!SalesCountryCollection) {\r\n return new Set();\r\n }\r\n return new Set(SalesCountryCollection.map(({ Value }) => Value.toUpperCase()));\r\n}\r\n\r\n// When FeedLabel is set then SalesCountry is empty, use supported account country, otherwise US\r\nasync function getCountryCode(shoppingSettings: any) {\r\n let countryCode = shoppingSettings?.SalesCountry;\r\n\r\n if (!countryCode) {\r\n const account = await getAccount();\r\n if (account && account.CountryCode) {\r\n const accountCountry = account.CountryCode;\r\n\r\n const supportedCountries = await getSupportedCountries();\r\n const ifAccountryCountrySupported = supportedCountries?.has(accountCountry);\r\n if (ifAccountryCountrySupported) {\r\n countryCode = accountCountry;\r\n }\r\n }\r\n }\r\n return countryCode || DEFAULT_SALES_COUNTRY;\r\n}\r\n\r\nconst onTreeViewColumnAddOrEdit: TreeViewEventHandler = async (item) => {\r\n assertIsDefined(item);\r\n currentEditTreeItem.current = item;\r\n\r\n setIsTreeViewSelectorOpen(true);\r\n setIsTreeViewShimmerEnabled(true);\r\n setTreeViewSelectorHeaderText(getAttributeTextOfConditionTemplate(i18n, item));\r\n const shoppingSettings = currentCampaign?.CampaignSettings?.find(setting => setting['@odata.type'] === '#Model.ShoppingSettings');\r\n let countryCode = await getCountryCode(shoppingSettings);\r\n try {\r\n const getListingGroupConditionsResponseBody = await getListingGroupConditions({\r\n entityPath: commonEntityPath,\r\n queryOptions: {\r\n countryCode,\r\n },\r\n });\r\n assertIsDefined(item.ParentConditions);\r\n assertIsDefined(item.Condition);\r\n let validListingConditions = getValidListingConditions(\r\n getListingGroupConditionsResponseBody,\r\n [...item.ParentConditions, item.Condition],\r\n item);\r\n currentValidListingConditions.current = validListingConditions;\r\n\r\n const dimensionsOfItem = validListingConditions;\r\n const selectedDimension = getInitialSelectedDimension(item, dimensionsOfItem);\r\n const currentDimension = getListingGroupConditionsResponseBody.value.find(dimension => dimension.Operand === item.Condition?.Operand);\r\n const currentAttributeId = currentDimension?.DomainData?.find(domainData => domainData.Value === item.Condition?.Attribute)?.Id;\r\n selectedDimension.DomainData = selectedDimension.DomainData?.filter(domainData => (!currentAttributeId && domainData.ParentId === 0) || domainData.ParentId === currentAttributeId);\r\n\r\n setTreeViewSelectorInitialSelectedItems(buildTreeViewSelectorItemsByChildrenOfNode(selectedDimension, item.treeViewInfo.children));\r\n\r\n setTreeViewSelectorDimensions(dimensionsOfItem.map(dimension => {\r\n return {\r\n key: dimension.Id,\r\n text: i18n.getString(`ProductsGrid_Column_${dimension.Operand}`),\r\n selected: selectedDimension.Id === dimension.Id,\r\n data: {\r\n isBulkAddEnabled: !dimension.HasDomainData,\r\n operand: dimension.Operand,\r\n }\r\n }\r\n }));\r\n\r\n await updateTreeViewGridByEditTreeItemAndSelectedDimension(item, selectedDimension);\r\n } catch (e) {\r\n setIsTreeViewSelectorOpen(false);\r\n onGenericError();\r\n console.error(e);\r\n }\r\n setIsTreeViewShimmerEnabled(false);\r\n}\r\n\r\nconst onFilterProduct: TreeViewEventHandler = async () => {\r\n setIsTreeViewSelectorOpen(true);\r\n setIsTreeViewShimmerEnabled(true);\r\n setTreeViewSelectorHeaderText(i18n.getString(_TL_('All Products')));\r\n const shoppingSettings = currentCampaign?.CampaignSettings[0];\r\n const countryCode = await getCountryCode(shoppingSettings);\r\n const getListingGroupConditionsResponseBody = await getListingGroupConditions({\r\n entityPath: commonEntityPath,\r\n queryOptions: {\r\n countryCode,\r\n },\r\n });\r\n\r\n const validListingConditions = getValidListingConditionsForWithoutPreselectedTreeNode(\r\n getListingGroupConditionsResponseBody,\r\n [{\r\n Attribute: '',\r\n Operand: 'All',\r\n }]);\r\n currentValidListingConditions.current = validListingConditions;\r\n\r\n const dimensionsOfItem = validListingConditions;\r\n const selectedDimension = dimensionsOfItem[0];\r\n\r\n setTreeViewSelectorDimensions(dimensionsOfItem.map(dimension => {\r\n return {\r\n key: dimension.Id,\r\n text: i18n.getString(`ProductsGrid_Column_${dimension.Operand}`),\r\n selected: selectedDimension.Id === dimension.Id,\r\n data: {\r\n isBulkAddEnabled: !dimension.HasDomainData,\r\n operand: dimension.Operand,\r\n }\r\n }\r\n }));\r\n\r\n updateTreeViewGridByEditTreeItemAndSelectedDimensionWithoutStatistics({\r\n Id: 4578228980083101,\r\n treeViewInfo: {\r\n children: [],\r\n depth: 1,\r\n hasChildren: false,\r\n isExpanded: false,\r\n parent: undefined,\r\n },\r\n serverContext: undefined,\r\n scope,\r\n eventHandlers: {\r\n onTreeViewColumnAddOrEdit: undefined,\r\n onTreeViewColumnToggleCollapse: undefined\r\n },\r\n refreshGridData: _.identity,\r\n IsLeaf: false,\r\n IsExcluded: false,\r\n CampaignId: currentCampaign.Id,\r\n i18n: i18n\r\n }, selectedDimension);\r\n\r\n setIsTreeViewShimmerEnabled(false);\r\n}\r\n// #endregion TreeView\r\n return {\r\n expandedItemIds,\r\n setExpandedItemIds,\r\n isTreeViewSelectorOpen,\r\n setIsTreeViewSelectorOpen,\r\n treeViewSelectorColumns,\r\n treeViewSelectorDimensions,\r\n treeViewSelectorInitialSelectedItems,\r\n treeViewSelectorItems,\r\n treeViewSelectorHeaderText,\r\n onTreeViewCancel,\r\n onTreeViewSave,\r\n onTreeViewSelectedDimensionChange,\r\n onTreeViewSelectedDimensionChangeWithoutStatistics,\r\n isTreeViewShimmerEnabled,\r\n getErrorsForTreeViewSelector,\r\n onTreeViewColumnAddOrEdit,\r\n onFilterProduct,\r\n };\r\n};\r\n","import { useJsDataContext } from '@bingads-webui-cc-react/js-data-rest';\r\n\r\nexport const useAccountData = ({\r\n scope,\r\n}) => {\r\n const ccJsData = useJsDataContext();\r\n\r\n return {\r\n getAccount: () => ccJsData.Account.find(scope.values.aid),\r\n };\r\n};\r\n","import { queryify } from '@bingads-webui/url-util';\r\nimport { withDFMCache } from '@bingads-webui/dfm-cache';\r\nimport jsdata from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport { getProductScopeData } from '@bingads-webui-campaign-react/product-services';\r\n\r\nexport function getProductData({\r\n cid,\r\n aid,\r\n uid,\r\n}) {\r\n const url = queryify('/Campaign/NewCampaign/GetProductScope', {\r\n cid,\r\n aid,\r\n uid,\r\n });\r\n\r\n return jsdata.Product.find('MetaData', {\r\n url,\r\n adapter: 'legacy',\r\n bypassCache: false,\r\n cacheResponse: true,\r\n });\r\n}\r\n\r\nexport const getProductScopeFromOData = (serverContext) => {\r\n const options = {\r\n dataName: 'MetaData',\r\n bypassCache: false,\r\n cacheResponse: true,\r\n getSalesCountryCollection: true,\r\n noBMCAccounts: true,\r\n };\r\n\r\n const p$GetProductData = () => getProductScopeData(null, serverContext, options);\r\n const getProductDataWithCache = withDFMCache(p$GetProductData, 'getPmaxProductScopeDFM', {}, false);\r\n\r\n return getProductDataWithCache();\r\n};\r\n","import { Model$ListingGroup } from './ApiType';\r\n\r\nexport const isEveryThingElseRow = (item: Model$ListingGroup) =>\r\n !!(item && item.Condition && !item.Condition.Attribute && item.Condition.Operand);\r\n","/* eslint-disable */\r\nimport React, { useMemo, useContext, useState, useRef, useEffect } from 'react';\r\nimport { compose, contains } from 'underscore';\r\nimport classNames from 'classnames';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { mergeI18n } from '@bingads-webui-campaign-react/i18n-merger';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { buildLegacyI18n } from '@bingads-webui/build-legacy-i18n';\r\nimport { FilterService } from '@bingads-webui/filter-service';\r\nimport { ToolbarContainer } from '@bingads-webui-campaign-react/toolbar-container';\r\nimport { useConstructor } from '@bingads-webui-campaign/hooks';\r\nimport { I18nContext, withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport { assertIsDefined, assertNever } from '@bingads-webui-campaign-react/debug-assert';\r\nimport { legacyKeys } from '@bingads-webui-campaign-react/hotel-campaign-shared';\r\nimport { getToolbarEditor } from '@bingads-webui-campaign-react/toolbar-plugin';\r\nimport { CampaignShimmeredDetailsList } from '@bingads-webui-grid/campaign-details-list';\r\nimport { useColumnsWithToolbarColumnChooser } from '@bingads-webui-campaign/hotel-column-chooser';\r\nimport { IColumn, CheckboxVisibility } from '@fluentui/react';\r\nimport { useForceUpdate } from '@fluentui/react-hooks';\r\nimport { buildTreeViewItems, I18n } from '@bingads-webui-grid/well-known';\r\nimport { SelectionMode } from '@bingads-webui-react/fabric-control';\r\nimport { useDateRange } from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport { DisclaimerBanner } from '@bingads-webui-campaign-react/help';\r\n\r\nimport { PanelSelector } from './treeViewPanelSelector/PanelSelector';\r\nimport { getColumnChooserCategories } from './render/toolbar/ColumnChooser';\r\nimport { convertFilterEntity2$filter } from './legacy-adapter/filter-entity';\r\nimport { legacyI18nOfListingGroup } from './legacyI18nMap';\r\nimport { Model$ListingGroup } from './ApiType';\r\nimport { OdataSystemQueryOptions } from './API/odata';\r\nimport { useAPIsOfListingGroup } from './API';\r\nimport { styles } from './style';\r\nimport { getGridToolbarConfig } from './toolbarConfig';\r\nimport { GridType, GRID_NAME, ScopeLevel, nameColumnOdataPath, LISTING_GROUP_PERF_MARKER,\r\n LISTING_GROUP_LIST_ROUTING, LISTING_GROUP_TREE_ROUTING, treeViewButtonId, listViewButtonId } from './constant';\r\n import { ListingGroupGridItemData } from './interface';\r\nimport { getFilterConfig } from './filter-config';\r\nimport { columnKeyRawDataMap, odataMapOfListingGroupResponse, cpsColumnKeys } from './ColumnOdataMap';\r\nimport { AssetGroupNameColumn, ListingGroupColumn, IncludeExcludeColumn } from './rawColumns';\r\nimport { getColumnRenderByColumnKey } from './render';\r\nimport { isSortEnabledByColumnKey } from './render/sortByHelper';\r\nimport { useLogger } from './logger';\r\nimport { useTreeViewPanelSelector } from './useTreeViewPanelSelector';\r\nimport { isEveryThingElseRow, } from './utils';\r\nimport { getPropertyByPath } from './render/utils';\r\n\r\n/**\r\n * default value used in fluent-ui\r\n * reference https://github.com/microsoft/fluentui/blob/31345de30d356731eeb0ac1e658a2652f8f00aa7/packages/react/src/components/DetailsList/DetailsList.base.tsx\r\n */\r\nconst MIN_COLUMN_WIDTH = 120;\r\nconst FIRST_COLUMN_WIDTH = 40;\r\n\r\ninterface ListingGroupsPageProps {\r\n preferenceService: any;\r\n permissions: any;\r\n gridType: GridType;\r\n scope: { save: Function, values: any };\r\n perfMarker: any;\r\n currentCampaign: any;\r\n}\r\n\r\ninterface BuildItemDataOptions {\r\n rawData: Model$ListingGroup[] | undefined;\r\n gridType: GridType;\r\n serverContext: any;\r\n scope: any;\r\n i18n: I18n;\r\n expandedItemIds: Set;\r\n}\r\n\r\ninterface RefreshGridDataOptions {\r\n gridType?: GridType;\r\n $top: OdataSystemQueryOptions['$top'];\r\n $skip: OdataSystemQueryOptions['$skip'];\r\n $orderby?: OdataSystemQueryOptions['$orderby'];\r\n $select?: OdataSystemQueryOptions['$select'];\r\n $filter?: OdataSystemQueryOptions['$filter'];\r\n}\r\n\r\ntype SortOrder = 'asc' | 'desc';\r\n\r\nenum ToolbarShownItem {\r\n Toolbar,\r\n Download,\r\n ColumnChooser,\r\n FilterView,\r\n BidEditor,\r\n}\r\n\r\nenum InitializationState {\r\n NotStart,\r\n Running,\r\n Done,\r\n}\r\nconst defaultPageIndex = 1;\r\nconst defaultPageSize = 20;\r\nconst maxPageSize = 20000;\r\nconst metaColumnOdataPaths: string[] = [\r\n 'AssetGroupId',\r\n 'AssetGroupName',\r\n 'Condition',\r\n 'Id',\r\n 'IsLeaf',\r\n 'ParentConditions',\r\n 'ParentId',\r\n];\r\n\r\nfunction buildColumns(gridType: GridType, selectedColumnKeys: string[], sortOrder: SortOrder, i18n: I18n, permissions: any): IColumn[] {\r\n const bindSortFunction = permissions?.dynamic?.ListingGroupsAllColumnsSortSupport ? bindSortSupportAll : bindSort;\r\n\r\n const result = selectedColumnKeys\r\n .filter(filterByPermissions)\r\n .map(buildColumnBase)\r\n .map(bindOnRender)\r\n .map(bindSortFunction);\r\n\r\n return result;\r\n\r\n function filterByPermissions(columnKey: string): boolean {\r\n const cpsColumnsEnabled = permissions && permissions.dynamic && permissions.dynamic.SupportCPSForPmax;\r\n\r\n if (!cpsColumnsEnabled) {\r\n return !contains(cpsColumnKeys, columnKey);\r\n }\r\n return true\r\n }\r\n\r\n function buildColumnBase(columnKey: string, index: number): IColumn {\r\n const columnRawData = columnKeyRawDataMap[columnKey];\r\n assertIsDefined(columnRawData, 'Column is not defined in listing groups column raw data map');\r\n const column = {\r\n key: columnKey,\r\n className: columnKey,\r\n minWidth: index !== 0 ? MIN_COLUMN_WIDTH : FIRST_COLUMN_WIDTH,\r\n maxWidth: index !== 0 ? 300 : FIRST_COLUMN_WIDTH,\r\n isResizable: index !== 0,\r\n name: i18n.getString(columnRawData.name),\r\n fieldName: columnKey,\r\n onRenderHeader: index !== 0 ? undefined : () => (
),\r\n };\r\n return column;\r\n }\r\n\r\n function bindOnRender(column: IColumn, index: number): IColumn {\r\n column.onRender = getColumnRenderByColumnKey(column.key);\r\n return column;\r\n }\r\n\r\n function bindSort(column: IColumn): IColumn {\r\n const enhancedColumn = {\r\n ...column,\r\n sortable: isSortEnabledByColumnKey(column.key),\r\n isSortedDescending: sortOrder === 'desc',\r\n };\r\n return enhancedColumn;\r\n }\r\n\r\n function bindSortSupportAll(column: IColumn): IColumn {\r\n const enhancedColumn = {\r\n ...column,\r\n sortable: true,\r\n isSortedDescending: sortOrder === 'desc',\r\n };\r\n return enhancedColumn;\r\n }\r\n}\r\n\r\nconst ListingGroupsPage = (props: ListingGroupsPageProps) => {\r\n const {\r\n preferenceService, permissions, gridType, scope, perfMarker, currentCampaign\r\n } = props;\r\n\r\n const [listingGroupPerfMarker] = useConstructor(() => {\r\n const marker = perfMarker.createChild(LISTING_GROUP_PERF_MARKER);\r\n marker.willInit();\r\n return marker;\r\n });\r\n const defaultColumns = [IncludeExcludeColumn.key, ListingGroupColumn.key, AssetGroupNameColumn.key];\r\n\r\n const [allRowRawData, setAllRowRawData] = useState(undefined);\r\n const serverContext: any = useContext(ServerContext);\r\n\r\n const logger = useLogger();\r\n const i18nWithTL = (useContext(I18nContext) as I18n);\r\n const i18n = useMemo(() => mergeI18n(\r\n buildLegacyI18n(i18nWithTL, [...legacyKeys, legacyI18nOfListingGroup]),\r\n i18nWithTL\r\n ), [i18nWithTL]);\r\n\r\n const scopeLevel = (() => {\r\n if (!scope.values.assetGroupId) {\r\n return ScopeLevel.Campaign;\r\n }\r\n return ScopeLevel.AssetGroup;\r\n })();\r\n\r\n const { toolbarSelectedConfig, toolbarUnselectedConfig } = useMemo(() => getGridToolbarConfig({\r\n scopeLevel,\r\n i18n,\r\n onBidChangeClick: () => {},\r\n permissions: {},\r\n selectedItems: [],\r\n serverContext: {},\r\n }), [i18n, scopeLevel]);\r\n const [toolbarShownItem, setToolbarShownItem] = useState(ToolbarShownItem.Toolbar);\r\n const latestGridDataRequestId = useRef(0);\r\n const styleClassNames: any = useDefaultStyles(styles);\r\n\r\n const toolbarEditor = getToolbarEditor({\r\n toolbarConfig: {\r\n toolbarSelectedConfig,\r\n toolbarUnselectedConfig,\r\n },\r\n updateToolbar: undefined,\r\n overrideWith: undefined,\r\n });\r\n\r\n const filterConfig = useMemo(() => getFilterConfig({ preferenceService, i18n }), [preferenceService, i18n]);\r\n\r\n const filterService = useMemo(() => {\r\n const filterService = new FilterService(filterConfig);\r\n return filterService;\r\n }, [filterConfig]);\r\n const [pageIndex, setPageIndex] = useState(defaultPageIndex);\r\n const [pageSize, setPageSize] = useState(defaultPageSize);\r\n const [sortColumnOdataPath, setSortColumnOdataPath] = useState(nameColumnOdataPath);\r\n const [sortOrder, setSortOrder] = useState('asc');\r\n\r\n const [pageItemsTotal, setPageItemsTotal] = useState(0);\r\n const availablePageSizes = [20, 50, 100, 200];\r\n\r\n const {\r\n expandedItemIds,\r\n setExpandedItemIds,\r\n isTreeViewSelectorOpen,\r\n treeViewSelectorColumns,\r\n treeViewSelectorDimensions,\r\n treeViewSelectorInitialSelectedItems,\r\n treeViewSelectorItems,\r\n treeViewSelectorHeaderText,\r\n onTreeViewCancel,\r\n onTreeViewSave,\r\n onTreeViewSelectedDimensionChange,\r\n isTreeViewShimmerEnabled,\r\n getErrorsForTreeViewSelector,\r\n onTreeViewColumnAddOrEdit,\r\n } = useTreeViewPanelSelector({\r\n i18n, allRowRawData, setAllRowRawData, scope, currentCampaign,\r\n refreshGridData,getArguemntsOfUpdateGridDataByCurrentState\r\n });\r\n\r\n const pager = {\r\n pageNumber: pageIndex,\r\n total: pageItemsTotal,\r\n pageSize,\r\n availablePageSizes,\r\n onPageChange,\r\n onPageSizeChange,\r\n };\r\n\r\n function onPageChange(newPageIndex) {\r\n logger.signal('Page index is changed');\r\n setPageIndex(newPageIndex);\r\n refreshGridData({\r\n ...getArguemntsOfUpdateGridDataByCurrentState(),\r\n ...getOdataSkipAndTop(newPageIndex, pageSize),\r\n });\r\n }\r\n\r\n function onPageSizeChange(newPageSize) {\r\n logger.signal('Page size is changed');\r\n setPageSize(newPageSize);\r\n refreshGridData({\r\n ...getArguemntsOfUpdateGridDataByCurrentState(),\r\n ...getOdataSkipAndTop(pageIndex, newPageSize),\r\n });\r\n }\r\n\r\n function changeToListView() {\r\n scope.save(LISTING_GROUP_LIST_ROUTING);\r\n // setCurrentGridType(GridType.List);\r\n changeActiveViewButton(GridType.List);\r\n logger.signal('change to list view');\r\n }\r\n\r\n function changeToTreeView() {\r\n scope.save(LISTING_GROUP_TREE_ROUTING);\r\n // setCurrentGridType(GridType.Tree);\r\n changeActiveViewButton(GridType.Tree);\r\n logger.signal('change to tree view');\r\n }\r\n\r\n function changeActiveViewButton(gridType: GridType) {\r\n toolbarEditor.update({\r\n id: treeViewButtonId,\r\n classes: ['view-switch-button', gridType === GridType.Tree ? 'btn-primary' : '', gridType === GridType.Tree ? 'active' : 'inactive'],\r\n ariaLabel: gridType === GridType.Tree ? i18n.getString(_TL_('Switch to hierarchy view, selected')) : i18n.getString(_TL_('Switch to hierarchy view, unselected')),\r\n });\r\n toolbarEditor.update({\r\n id: listViewButtonId,\r\n classes: ['view-switch-button', gridType === GridType.List ? 'btn-primary' : '', gridType === GridType.List ? 'active' : 'inactive'],\r\n ariaLabel: gridType === GridType.List ? i18n.getString(_TL_('Switch to list view, selected')) : i18n.getString(_TL_('Switch to list view, unselected')),\r\n });\r\n }\r\n\r\n function buildItemData({\r\n gridType, rawData, i18n, serverContext, expandedItemIds, scope,\r\n }: BuildItemDataOptions): ListingGroupGridItemData[] | undefined {\r\n if (rawData === undefined) {\r\n return undefined;\r\n }\r\n const items = rawData.map(raw => ({\r\n ...raw,\r\n serverContext,\r\n i18n,\r\n scope,\r\n eventHandlers: {},\r\n refreshGridData: () => {\r\n logger.signal('Refresh grid from item');\r\n refreshGridData(getArguemntsOfUpdateGridDataByCurrentState())\r\n }\r\n }));\r\n // registerEventHandlersForInlineEidtor(items);\r\n if (gridType === GridType.Tree) {\r\n const listingGroupGridItemsData = buildTreeViewItems({\r\n expandedItemIds,\r\n getParentKeyOfItem: item => item.ParentId,\r\n getPrimaryKeyOfItem: item => item.Id,\r\n items,\r\n });\r\n registerEventHandlersForTreeView(listingGroupGridItemsData);\r\n return listingGroupGridItemsData;\r\n }\r\n return items;\r\n }\r\n\r\n function registerEventHandlersForTreeView(items: ListingGroupGridItemData[]) {\r\n items.forEach(item => {\r\n item.eventHandlers.onTreeViewColumnAddOrEdit = onTreeViewColumnAddOrEdit;\r\n\r\n item.eventHandlers.onTreeViewColumnToggleCollapse = (item) => {\r\n assertIsDefined(item?.treeViewInfo);\r\n const id = item.Id;\r\n if (item.treeViewInfo.isExpanded)\r\n expandedItemIds.delete(id);\r\n else\r\n expandedItemIds.add(id);\r\n setExpandedItemIds(new Set(expandedItemIds));\r\n }\r\n });\r\n }\r\n\r\n function getSortedColumn() {\r\n const sortColumn = columns.find(c =>\r\n odataMapOfListingGroupResponse.get(c.key) === sortColumnOdataPath);\r\n assertIsDefined(sortColumn);\r\n return sortColumn;\r\n }\r\n\r\n const { listingGroupGridData, createRootListingTree } = useAPIsOfListingGroup();\r\n const {\r\n isOrderByEnabled,\r\n isSelectEnabled,\r\n isFilterEnabled,\r\n } = scope.values;\r\n const commonEntityPath = {\r\n accountId: scope.values.aid,\r\n campaignId: scope.values.campaignId,\r\n customerId: scope.values.cid,\r\n assetGroupId: scope.values.assetGroupId\r\n };\r\n const dataRange = useDateRange();\r\n const dataRangeCacheKey = `${dataRange.StartDate}-${dataRange.EndDate}`;\r\n\r\n function onColumnChooserApply(newColumnKeys: string[]) {\r\n // change to loading state\r\n // columns might update faster than items, in this case it will try to get value that is not existed yet.\r\n setAllRowRawData(undefined);\r\n setToolbarShownItem(ToolbarShownItem.Toolbar);\r\n // logger.signal('choose new columns');\r\n }\r\n\r\n function onColumnChooserCancel() {\r\n setToolbarShownItem(ToolbarShownItem.Toolbar);\r\n // logger.signal('cancel column chooser');\r\n }\r\n function getOdataOrderby(sortColumnOdataPath: string, sortOrder: SortOrder) {\r\n return {\r\n $orderby: isOrderByEnabled !== 'false' ? `${sortColumnOdataPath} ${sortOrder}` : undefined,\r\n };\r\n }\r\n function getOdataSkipAndTop(pageIndex, pageSize) {\r\n return {\r\n $skip: (pageIndex - 1) * pageSize,\r\n $top: pageSize,\r\n };\r\n }\r\n function getOdataSelect(selectedColumnKeys: string[]) {\r\n if (isSelectEnabled === 'false') {\r\n return {\r\n $select: undefined,\r\n };\r\n }\r\n const selectedColumnOdataPaths = selectedColumnKeys.map((selectedColumnKey) => {\r\n const columnOdataPath = odataMapOfListingGroupResponse.get(selectedColumnKey);\r\n assertIsDefined(columnOdataPath);\r\n return columnOdataPath;\r\n });\r\n\r\n return {\r\n $select: selectedColumnOdataPaths.concat(metaColumnOdataPaths).join(','),\r\n };\r\n }\r\n\r\n function getOdataFilter() {\r\n return {\r\n $filter: isFilterEnabled !== 'false' ? $filterContainer.current : undefined,\r\n };\r\n }\r\n\r\n function getArguemntsOfUpdateGridDataByCurrentState() {\r\n return {\r\n ...getOdataSkipAndTop(pageIndex, pageSize),\r\n ...getOdataOrderby(sortColumnOdataPath, sortOrder),\r\n ...getOdataSelect(trickySelectedColumnKeys),\r\n ...getOdataFilter(),\r\n gridType: currentGridType,\r\n };\r\n }\r\n\r\n async function refreshGridData({\r\n $top,\r\n $skip,\r\n $filter,\r\n $orderby = undefined,\r\n $select = undefined,\r\n gridType = currentGridType,\r\n }: RefreshGridDataOptions) {\r\n if (initializationState.current !== InitializationState.Done) {\r\n return;\r\n }\r\n // change to loading state\r\n setAllRowRawData(undefined);\r\n latestGridDataRequestId.current += 1;\r\n const requestId = latestGridDataRequestId.current;\r\n\r\n listingGroupPerfMarker.willFetchData();\r\n\r\n logger.signal(`listing group grid data request #${requestId}`);\r\n\r\n const response = await listingGroupGridData({\r\n queryOptions: {\r\n $top: gridType === GridType.Tree ? maxPageSize : $top,\r\n $skip,\r\n $filter,\r\n $orderby,\r\n $select,\r\n $count: true,\r\n },\r\n entityPath: commonEntityPath,\r\n payload: {\r\n gridDataParameters: {\r\n DateRange: {\r\n StartDate: dataRange.StartDate,\r\n EndDate: dataRange.EndDate,\r\n },\r\n },\r\n },\r\n });\r\n const gridData = response.value;\r\n\r\n if (requestId === latestGridDataRequestId.current) {\r\n listingGroupPerfMarker.willRender();\r\n setAllRowRawData(gridData);\r\n setPageItemsTotal(response['@odata.count']);\r\n }\r\n\r\n if (document.getElementsByClassName('ms-DetailsList-headerWrapper')) {\r\n const gridIndex = document.getElementsByClassName('ms-DetailsList-headerWrapper').length;\r\n document.getElementsByClassName('ms-DetailsList-headerWrapper')[gridIndex - 1].parentElement.setAttribute('aria-busy', 'true');\r\n }\r\n }\r\n\r\n async function initial() {\r\n initialColumns();\r\n }\r\n\r\n function onSort(column: IColumn) {\r\n logger.signal('Sort column or sort order is changed');\r\n const newSortOrder = column.isSortedDescending ? 'desc' : 'asc';\r\n const newSortColumnOdataPath = odataMapOfListingGroupResponse.get(column.key);\r\n assertIsDefined(newSortColumnOdataPath);\r\n setSortColumnOdataPath(newSortColumnOdataPath);\r\n setSortOrder(newSortOrder);\r\n if (currentGridType === GridType.List) {\r\n refreshGridData({\r\n ...getArguemntsOfUpdateGridDataByCurrentState(),\r\n ...getOdataOrderby(newSortColumnOdataPath, newSortOrder),\r\n });\r\n }\r\n }\r\n\r\n const resetToolbarVisibility = ({ forceHideToolbar }: { forceHideToolbar: boolean }) => {\r\n if (forceHideToolbar) {\r\n setToolbarShownItem(ToolbarShownItem.FilterView);\r\n } else {\r\n setToolbarShownItem(ToolbarShownItem.Toolbar);\r\n }\r\n };\r\n const forceUpdate = useForceUpdate();\r\n const currentGridType = gridType;\r\n const initializationState = useRef(InitializationState.NotStart);\r\n const onFilterStateChanged = useRef(() => { });\r\n // Filter is special, generally, it should be a state. However, we are using legacy component, and it's not fully controlled and kind of subtle.\r\n const $filterContainer = useRef('');\r\n\r\n const [isRefreshReady, setIsRefreshReady] = useState(false);\r\n\r\n // reregister the callback to make sure there is no closure issue so that we could get latest state.\r\n // And we could not remove other callbacks. For example, the toolbar component might add callback too.\r\n filterService.off('filter-state-changed', onFilterStateChanged.current);\r\n onFilterStateChanged.current = async () => {\r\n const filterEntity = filterService.getEditableFilter();\r\n const filterString = convertFilterEntity2$filter(filterEntity);\r\n $filterContainer.current = filterString;\r\n let gridType = currentGridType;\r\n\r\n switch (true) {\r\n // as long as there is filter, jump to list view.\r\n // TODO: add a test\r\n case filterString && currentGridType === GridType.Tree:\r\n changeToListView();\r\n gridType = GridType.List;\r\n // no filter --> some filter, not allow change to tree\r\n // some filter --> no filter, allow change to tree\r\n // TODO: add a test\r\n case currentGridType === GridType.List:\r\n // toolbarChangeOnFilterChange(filterString);\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n // tricky, initial here for we only want to send one request to get grid data after everything is initialized.\r\n // but filter is iniitialized by itself.\r\n switch (initializationState.current) {\r\n case InitializationState.NotStart:\r\n initializationState.current = InitializationState.Running;\r\n await initial();\r\n initializationState.current = InitializationState.Done;\r\n setIsRefreshReady(true);\r\n break;\r\n case InitializationState.Running:\r\n break;\r\n case InitializationState.Done:\r\n logger.signal('Refresh grid by filter change');\r\n refreshGridData({ ...getArguemntsOfUpdateGridDataByCurrentState(), gridType });\r\n forceUpdate();\r\n break;\r\n default:\r\n assertNever(initializationState.current);\r\n }\r\n };\r\n\r\n filterService.on('filter-state-changed', onFilterStateChanged.current);\r\n\r\n const {\r\n initialColumns,\r\n columns: selectedColumnKeys,\r\n ColumnChooserTrivia,\r\n ColumnChooser,\r\n } = useColumnsWithToolbarColumnChooser({\r\n defaultColumns,\r\n gridName: GRID_NAME,\r\n toolbarOptions: {\r\n toolbarEditor,\r\n openColumnChooser: () => { setToolbarShownItem(ToolbarShownItem.ColumnChooser); },\r\n },\r\n });\r\n const toolbarEditorUpdate = useMemo(() => toolbarEditor.update.bind(toolbarEditor), [toolbarEditor]);\r\n\r\n const toolbar = (\r\n \r\n {/* campaignContentContainer is for inline-chart. Read code of inline-chart for details :)\r\n
\r\n {inlineChart}\r\n
*/}\r\n {toolbarShownItem === ToolbarShownItem.ColumnChooser &&\r\n \r\n }\r\n \r\n
\r\n );\r\n\r\n let trickySelectedColumnKeys = selectedColumnKeys.filter(k => {\r\n return columnKeyRawDataMap[k]; // only when the key is existed in columnKeyRawDataMap, we keep it.\r\n });\r\n\r\n const listingGroupColumnIndex = trickySelectedColumnKeys.findIndex(k => k === ListingGroupColumn.key);\r\n trickySelectedColumnKeys = trickySelectedColumnKeys.filter(key => key !== AssetGroupNameColumn.key);\r\n if (scopeLevel === ScopeLevel.Campaign) {\r\n trickySelectedColumnKeys.splice(listingGroupColumnIndex + 1, 0, AssetGroupNameColumn.key);\r\n }\r\n\r\n const columns = buildColumns(GridType.List, trickySelectedColumnKeys, sortOrder, i18n, permissions);\r\n\r\n const filteredRowData = (() => {\r\n // when in grid type is tree, we sort the data in front-end\r\n if (currentGridType === GridType.Tree) {\r\n const sortedItems = allRowRawData?.slice()?.sort(compareFn);\r\n return sortOrder === \"desc\" ? sortedItems?.reverse() : sortedItems;\r\n }\r\n return allRowRawData;\r\n\r\n function compareFn(a: Model$ListingGroup, b: Model$ListingGroup) {\r\n if (sortColumnOdataPath === nameColumnOdataPath) {\r\n // direction: -1 for desc, 1 for asc\r\n if (isEveryThingElseRow(a)) {\r\n return 1;\r\n }\r\n\r\n if (isEveryThingElseRow(b)) {\r\n return -1;\r\n }\r\n }\r\n const valueA = getPropertyByPath(a, sortColumnOdataPath);\r\n\r\n const valueB = getPropertyByPath(b, sortColumnOdataPath);\r\n\r\n let v1 = valueA;\r\n let v2 = valueB;\r\n if (typeof valueA === 'string' && typeof valueB === 'string' && sortColumnOdataPath === nameColumnOdataPath) {\r\n v1 = valueA.toLowerCase();\r\n v2 = valueB.toLowerCase();\r\n }\r\n\r\n if (v1 < v2) {\r\n return -1;\r\n }\r\n if (v1 > v2) {\r\n return 1;\r\n }\r\n return 0;\r\n }\r\n })();\r\n\r\n const items = buildItemData({\r\n scope,\r\n serverContext,\r\n i18n,\r\n gridType: currentGridType,\r\n rawData: filteredRowData,\r\n expandedItemIds,\r\n });\r\n\r\n useEffect(() => {\r\n if (isRefreshReady) {\r\n logger.signal('Refresh grid by column/range/type change');\r\n refreshGridData({ ...getArguemntsOfUpdateGridDataByCurrentState() });\r\n }\r\n }, [selectedColumnKeys, dataRangeCacheKey, gridType, scope.values, isRefreshReady]);\r\n\r\n // setup toolbar\r\n useEffect(() => {\r\n toolbarEditor.update({\r\n id: treeViewButtonId,\r\n onClick: changeToTreeView,\r\n });\r\n toolbarEditor.update({\r\n id: listViewButtonId,\r\n onClick: changeToListView,\r\n });\r\n\r\n // initial for the first time mount\r\n changeActiveViewButton(currentGridType);\r\n }, [toolbarSelectedConfig, toolbarUnselectedConfig]);\r\n\r\n const [creatingRootNode, setCreatingRootNode] = useState(false);\r\n\r\n const createFirstListingGroupLink = useMemo(() => {\r\n if (scopeLevel !== ScopeLevel.AssetGroup) {\r\n // do not show create first listing group link when scope is campaign scope\r\n return null;\r\n }\r\n\r\n if (!items || items.length > 0) {\r\n // only show create first listing group link when there is no listing group\r\n return null;\r\n }\r\n\r\n const createRootNode = () => {\r\n setCreatingRootNode(true);\r\n createRootListingTree(scope.values.assetGroupId)\r\n .then(() => {\r\n setCreatingRootNode(false);\r\n refreshGridData(getArguemntsOfUpdateGridDataByCurrentState());\r\n }).catch(() => {\r\n setCreatingRootNode(false);\r\n });\r\n };\r\n\r\n return (\r\n
\r\n
{i18n.getString(_TL_('You haven\\'t created any listing groups for this asset group yet.'))}
\r\n {i18n.getString(_TL_('Create first listing group.'))}\r\n
\r\n )\r\n }, [items, scope.values.assetGroupId, scopeLevel]);\r\n\r\n return (\r\n \r\n {isTreeViewSelectorOpen && item.key}\r\n isBulkAddEnabledForDimension={(d) => d.data.isBulkAddEnabled}\r\n />}\r\n {\r\n if (prev.enableShimmer && items) {\r\n listingGroupPerfMarker.done();\r\n }\r\n }}\r\n onRenderRow={(detailsRowProps, defaultRender) => {\r\n if (detailsRowProps.focusZoneProps) {\r\n detailsRowProps.focusZoneProps.preventFocusRestoration = true;\r\n } else {\r\n detailsRowProps.focusZoneProps = { preventFocusRestoration: true };\r\n }\r\n return defaultRender(detailsRowProps);\r\n }}\r\n />\r\n { createFirstListingGroupLink }\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport const StyledListingGroupsPage = compose(\r\n withI18nConsumer,\r\n WrappedComponent => withDefaultStyles(WrappedComponent, () => ({}))\r\n)(ListingGroupsPage);","import { getCommonFilterConfig } from '@bingads-webui-campaign/common-grid-config';\r\nimport { ProductListingGroup } from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport sessionStore from '@bingads-webui-component-legacy/js-data-storage/session-storage';\r\nimport jsData from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport cacheService from '@bingads-webui-static-legacy/cache-service';\r\nimport dataContextManager from '@bingads-webui-static-legacy/summary/SummaryDataContextManager';\r\nimport * as filterPreferences from '@bingads-webui-component-legacy/bingads-grid/service/filter-preferences';\r\nimport appConfig from '@bingads-webui-component-legacy/config/index';\r\nimport { GRID_NAME } from './constant';\r\n\r\nexport function getFilterConfig({\r\n preferenceService,\r\n i18n,\r\n}) {\r\n const featureName = GRID_NAME;\r\n const enableCampaignWaterfall = false;\r\n const enableAdGroupWaterfall = false;\r\n const entitySchema = ProductListingGroup;\r\n const legacyGlobalI18n = window.globalLegacyI18n.get('component/i18n/loader!legacy/global');\r\n const schemaI18nCampaign = window.globalLegacyI18n.get('$/schema-i18n!campaign');\r\n const preferenceStoreFactory = filterPreferences.getFilters;\r\n\r\n const filterConfig = getCommonFilterConfig({\r\n updatePilot: false,\r\n featureName,\r\n preferenceService,\r\n entitySchema,\r\n i18n,\r\n legacyGlobalI18n,\r\n sessionStore,\r\n preferenceStoreFactory,\r\n globalConfig: appConfig,\r\n schemaI18nCampaign,\r\n cacheService,\r\n dataContextManager,\r\n jsdata: jsData,\r\n editor: {},\r\n enableCampaignWaterfall,\r\n enableAdGroupWaterfall,\r\n // selector: [{\r\n // property: 'Status',\r\n // items: [\r\n // {\r\n // text: i18n.getString('AllAdGroup'),\r\n // value: null,\r\n // },\r\n // {\r\n // text: i18n.getString('AllEnabledAdGroup'),\r\n // value: [\"Enum.AdGroupStatus'Active'\", \"Enum.AdGroupStatus'CampaignBudgetPaused'\"],\r\n // },\r\n // ],\r\n // removable: false,\r\n // defaultValue: null,\r\n // }],\r\n searchbox: {\r\n placeholder: i18n.getString(_TL_('Listing group')),\r\n searchProperty: 'ConditionAttribute',\r\n searchOperator: '$contains',\r\n // maxLength: entitySchema.properties.Name.maxLength,\r\n },\r\n });\r\n\r\n return filterConfig;\r\n}\r\n","import { FilterEntity } from '@bingads-webui/filter-entity';\r\n\r\n// `$filter` is an OData query option\r\nexport function convertFilterEntity2$filter(filterEntity) {\r\n return filterEntity ? FilterEntity.toOdata(filterEntity.query, filterEntity.odataOptions) : undefined;\r\n}\r\n","/* eslint-disable react/sort-comp */\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Route, Switch, Redirect } from '@bingads-webui-campaign-react/router';\r\nimport { withInstrumentation } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { withCurrentExpandedScope } from '@bingads-webui-campaign-react/use-current-scope-entity';\r\nimport { LISTING_GROUP_TREE_ROUTING, LISTING_GROUP_LIST_ROUTING } from './constant';\r\nimport { StyledListingGroupsPage } from './listing-groups-page';\r\n\r\nclass ListingGroupsRouterShell extends React.Component {\r\n static propTypes = {\r\n history: PropTypes.shape({\r\n push: PropTypes.func.isRequired,\r\n }).isRequired,\r\n location: PropTypes.shape({\r\n pathname: PropTypes.string.isRequired,\r\n search: PropTypes.string.isRequired,\r\n }).isRequired,\r\n scope: PropTypes.shape({\r\n save: PropTypes.func,\r\n values: PropTypes.shape({\r\n assetGroupId: PropTypes.number,\r\n campaignId: PropTypes.number,\r\n }).isRequired,\r\n }).isRequired,\r\n currentCampaign: PropTypes.shape({\r\n Id: PropTypes.string,\r\n }).isRequired,\r\n currentAdGroup: PropTypes.shape({\r\n Id: PropTypes.string,\r\n }).isRequired,\r\n instrumentation: PropTypes.shape({}).isRequired,\r\n changeLayout: PropTypes.func.isRequired,\r\n };\r\n\r\n static defaultProps = {\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n this.props.changeLayout({ tab: { disableCompare: true } });\r\n }\r\n\r\n componentWillUnmount() {\r\n this.props.changeLayout({ tab: { disableCompare: false } });\r\n }\r\n\r\n render() {\r\n return (\r\n \r\n (\r\n // Will change back to list view when in hierarchy view of campaign scope\r\n this.props.scope.values.assetGroupId\r\n ? \r\n : \r\n )\r\n }\r\n />\r\n (\r\n \r\n \r\n \r\n )\r\n }\r\n />\r\n \r\n );\r\n }\r\n}\r\n\r\nexport const ListingGroupsShell = withInstrumentation(withCurrentExpandedScope(ListingGroupsRouterShell));\r\n","import { edmCampaign } from '@bingads-webui/edm-campaign';\r\n\r\nexport const createOrUpdateCampaign = (data) => {\r\n const campaignEDM = edmCampaign.types.resolve('Model.ShoppingCampaign');\r\n const campaignResource = new campaignEDM.ResourceIdentifier();\r\n const createOrUpdateCall = data && data.Id ?\r\n campaignResource.bulkUpdate.bind(campaignResource) :\r\n campaignResource.bulkCreate.bind(campaignResource);\r\n return createOrUpdateCall(data);\r\n};\r\n\r\nexport const deleteCampaign = (id) => {\r\n const campaignEDM = edmCampaign.types.resolve('Model.ShoppingCampaign');\r\n const campaignResource = new campaignEDM.ResourceIdentifier();\r\n const deleteCall = campaignResource.bulkDestroy.bind(campaignResource);\r\n return deleteCall(id);\r\n};\r\n\r\nexport const readCampaign = (cid, aid, campaignId) =>\r\n edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .Campaigns.$withKey(campaignId)\r\n .get({\r\n select: ['Budget', 'CampaignConversionGoal/Goals'],\r\n })\r\n .toPromise();\r\n\r\n// Read campaigns with PerformanceMax campaign type\r\nexport const readCampaigns = (cid, aid) =>\r\n edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .Campaigns\r\n .get({\r\n filter: {\r\n where: 'CampaignType eq \\'PerformanceMax\\'',\r\n },\r\n })\r\n .toPromise();\r\n\r\nconst campaignCriterionTypeName = 'Model.CampaignCriterion';\r\n\r\nexport const readCampaignCriterions = (cid, aid, campaignId, type) =>\r\n edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .Campaigns.$withKey(campaignId)\r\n .CampaignCriterions\r\n .$cast(campaignCriterionTypeName)\r\n .get({\r\n filter: {\r\n where: type,\r\n },\r\n })\r\n .toPromise();\r\n\r\nexport const readLocationCriterions = (cid, aid, campaignId) =>\r\n readCampaignCriterions(\r\n cid, aid, campaignId,\r\n \"isof(Criterion,'Model.LocationCriterion') or isof(Criterion,'Model.RadiusCriterion') or isof(Criterion,'Model.LocationIntentCriterion')\"\r\n );\r\n\r\nexport const readDayTimeCriterions = (cid, aid, campaignId) =>\r\n readCampaignCriterions(\r\n cid, aid, campaignId,\r\n \"isof(Criterion,'Model.DayTimeCriterion')\"\r\n );\r\n\r\nexport const createOrUpdateAssetGroup = (data) => {\r\n const assetGroupEDM = edmCampaign.types.resolve('Model.AssetGroup');\r\n const assetGroupResource = new assetGroupEDM.ResourceIdentifier();\r\n const createOrUpdateCall = data && data.Id ?\r\n assetGroupResource.bulkUpdate.bind(assetGroupResource) :\r\n assetGroupResource.bulkCreate.bind(assetGroupResource);\r\n return createOrUpdateCall(data);\r\n};\r\n\r\nexport const createOrUpdateListingGroup = (itemsToAdd, itemsToDelete) => {\r\n const listingGroupEDM = edmCampaign.types.resolve('Model.ProductListingGroup');\r\n const listingGroupResource = new listingGroupEDM.ResourceIdentifier();\r\n const data = itemsToDelete.concat(itemsToAdd);\r\n const createOrUpdateCall = data && data.Id ?\r\n listingGroupResource.bulkUpdate.bind(listingGroupResource) :\r\n listingGroupResource.bulkCreate.bind(listingGroupResource);\r\n return createOrUpdateCall(data);\r\n};\r\n\r\nexport const readAssetGroup = (cid, aid, campaignId, assetGroupId, isSearchThemeEnabled, isUrlRulesEnabled = false) => {\r\n const toSelect = ['Headlines', 'LongHeadlines', 'Descriptions', 'AudienceGroup', 'Images', 'Videos'];\r\n\r\n if (isSearchThemeEnabled) toSelect.push('AssetGroupSearchThemes');\r\n if (isUrlRulesEnabled) toSelect.push('AssetGroupUrlTargets');\r\n\r\n return edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .Campaigns.$withKey(campaignId)\r\n .AssetGroups.$withKey(assetGroupId)\r\n .get({ select: toSelect })\r\n .toPromise();\r\n};\r\n\r\nexport const readCampaignNegativeWebpages = (cid, aid, campaignId) =>\r\n edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .Campaigns.$withKey(campaignId)\r\n .CampaignNegativeWebpages\r\n .get({\r\n top: 10000,\r\n skip: 0,\r\n })\r\n .toPromise();\r\n\r\nexport const readConversionGoalDetails = (cid, aid) =>\r\n edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)['Default.ConversionGoalDetails']\r\n .$makeCall()\r\n .toPromise();\r\n\r\nexport const readExtensionAssociations = (cid, aid, campaignId, payload, top = 20) =>\r\n edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .Campaigns.$withKey(campaignId)\r\n .AdExtensionAssociations['Default.GridData']\r\n .$makeCall({\r\n query: {\r\n top,\r\n filter: { where: \"(AdExtension/Status eq Enum.AdExtensionStatus'Active')\" },\r\n select: ['AdExtension'],\r\n },\r\n payload,\r\n })\r\n .toPromise();\r\n\r\nexport const readNewCustomerAcquisitionGoals = (cid, aid) => {\r\n const edm = edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .NewCustomerAcquisitionGoals;\r\n\r\n return edm.get().toPromise();\r\n};\r\n","import { Scopes } from '@bingads-webui-campaign-react/goal-selector';\r\n\r\nexport const STEP_PATHS = {\r\n CAMPAIGN_SETTINGS: 'CAMPAIGN_SETTINGS',\r\n ASSET_GROUP: 'ASSET_GROUP',\r\n};\r\n\r\nexport const ScenarioName = {\r\n PerformanceMaxCampaignCreation: 'PerformanceMaxCampaignCreation',\r\n PerformanceMaxAssetGroupCreation: 'PerformanceMaxAssetGroupCreation',\r\n PerformanceMaxCampaignSettings: 'PerformanceMaxCampaignSettings',\r\n PerformanceMaxAssetGroupSettings: 'PerformanceMaxAssetGroupSettings',\r\n};\r\n\r\nexport const initialCampaignData = {\r\n Name: '',\r\n Status: 'Active',\r\n TimeZone: 'PacificTimeUSCanadaTijuana',\r\n Budget: {\r\n Amount: 25,\r\n Type: 'DailyStandard',\r\n },\r\n Languages: ['English'],\r\n BiddingScheme: {\r\n Type: undefined,\r\n TargetCpa: undefined,\r\n TargetRoas: undefined,\r\n },\r\n CampaignType: 'PerformanceMax',\r\n FinalUrlSuffix: '',\r\n TrackingUrlTemplate: '',\r\n UrlCustomParameters: [],\r\n locationTargets: {\r\n bidMode: false,\r\n currentLevelSettings: {\r\n initLocations: [],\r\n peopleInLocation: true,\r\n peopleSearchingForLocation: true,\r\n targetOption: 'everywhere',\r\n },\r\n parentLevelSettings: {},\r\n useParentLevel: false,\r\n },\r\n adSchedules: {\r\n adScheduleUseSearcherTimeZone: undefined,\r\n dayTimeRanges: [],\r\n timeZone: undefined,\r\n },\r\n finalUrlExpansions: [],\r\n conversionGoals: {\r\n originalConversionGoals: [],\r\n goalSelection: [],\r\n goalScopeSelection: Scopes.ACCOUNT,\r\n },\r\n ProviderId: '',\r\n IsFeedFiltered: false,\r\n SalesCountry: undefined,\r\n FeedLabel: undefined,\r\n LocalInventoryAdsEnabled: false,\r\n finalUrlExpansionOptOut: false,\r\n costPerSaleOptOut: false,\r\n};\r\n\r\nexport const initialBrandExclusionsData = {\r\n addedBrandListIds: [],\r\n deletedBrandListIds: [],\r\n savedAddedBrandListIds: [],\r\n savedDeletedBrandListIds: [],\r\n};\r\n\r\nexport const minuteMap = {\r\n 0: 'ZERO',\r\n 15: 'FIFTEEN',\r\n 30: 'THIRTY',\r\n 45: 'FORTY_FIVE',\r\n};\r\n\r\nexport const initialAssetGroupData = {\r\n Status: 'Active',\r\n // TODO: use for testing bulkupsert. Remove after integration is complete.\r\n // Name: 'ag01',\r\n // Headlines: {\r\n // Headline0: 'a1',\r\n // Headline1: 'a2',\r\n // Headline2: 'a3',\r\n // },\r\n // LongHeadlines: {\r\n // LongHeadline0: 'a4',\r\n // },\r\n // Descriptions: {\r\n // Description0: 'a5',\r\n // Description1: 'a6',\r\n // },\r\n // Images: [{\r\n // '@odata.type': '#Model.ImageAsset',\r\n // Id: 13812614829529,\r\n // IdString: '13812614829529',\r\n // SubType: 'LandscapeImageMedia191X100',\r\n // CropX: 0,\r\n // CropY: 0,\r\n // CropWidth: 2048,\r\n // CropHeight: 1072,\r\n // }, {\r\n // '@odata.type': '#Model.ImageAsset',\r\n // Id: 13812614829531,\r\n // IdString: '13812614829531',\r\n // SubType: 'SquareImageMedia',\r\n // CropX: 0,\r\n // CropY: 0,\r\n // CropWidth: 1014,\r\n // CropHeight: 1014,\r\n // }, {\r\n // '@odata.type': '#Model.ImageAsset',\r\n // Id: 13812614829532,\r\n // IdString: '13812614829532',\r\n // SubType: 'SquareLogoMedia',\r\n // CropX: 0,\r\n // CropY: 0,\r\n // CropWidth: 1072,\r\n // CropHeight: 1072,\r\n // }],\r\n // BusinessName: 'bn',\r\n // CallToAction: 'Unknown',\r\n // FinalUrls: [\r\n // 'https://fr.com',\r\n // ],\r\n};\r\n\r\nexport const campaignLanguageStrings = {\r\n Albanian: _TL_('Albanian'),\r\n Arabic: _TL_('Arabic'),\r\n Bosnian: _TL_('Bosnian'),\r\n Bulgarian: _TL_('Bulgarian'),\r\n Croatian: _TL_('Croatian'),\r\n Czech: _TL_('Czech'),\r\n Danish: _TL_('Danish'),\r\n Dutch: _TL_('Dutch'),\r\n English: _TL_('English'),\r\n Estonian: _TL_('Estonian'),\r\n Finnish: _TL_('Finnish'),\r\n French: _TL_('French'),\r\n German: _TL_('German'),\r\n Greek: _TL_('Greek'),\r\n Hungarian: _TL_('Hungarian'),\r\n Icelandic: _TL_('Icelandic'),\r\n Italian: _TL_('Italian'),\r\n Japanese: _TL_('Japanese'),\r\n Latvian: _TL_('Latvian'),\r\n Lithuanian: _TL_('Lithuanian'),\r\n Macedonian: _TL_('Macedonian'),\r\n Maltese: _TL_('Maltese'),\r\n Norwegian: _TL_('Norwegian'),\r\n Polish: _TL_('Polish'),\r\n Portuguese: _TL_('Portuguese'),\r\n Romanian: _TL_('Romanian'),\r\n Russian: _TL_('Russian'),\r\n Serbian: _TL_('Serbian'),\r\n SimplifiedChinese: _TL_('Simplified Chinese'),\r\n Slovak: _TL_('Slovak'),\r\n Slovenian: _TL_('Slovenian'),\r\n Spanish: _TL_('Spanish'),\r\n Swedish: _TL_('Swedish'),\r\n TraditionalChinese: _TL_('Traditional Chinese'),\r\n Turkish: _TL_('Turkish'),\r\n Hebrew: _TL_('Hebrew'),\r\n Hindi: _TL_('Hindi'),\r\n Malay: _TL_('Malay'),\r\n Thai: _TL_('Thai'),\r\n Indonesian: _TL_('Indonesian'),\r\n Tagalog: _TL_('Tagalog'),\r\n Vietnamese: _TL_('Vietnamese'),\r\n};\r\n\r\nexport const CampaignNegativeReferenceId = -111;\r\nexport const AssetGroupNegativeReferenceId = -21;\r\n\r\nexport const SupportedExtensionPreviewTypes = {\r\n Sitelink: 'Sitelink2AdExtension',\r\n Callout: 'CalloutAdExtension',\r\n StructuredSnippet: 'StructuredSnippetAdExtension',\r\n Promotion: 'PromotionAdExtension',\r\n Price: 'PriceAdExtension',\r\n};\r\n","import { has } from 'underscore';\r\n\r\nexport const isBulkWrappedResponse = bulkResult => has(bulkResult, 'entity'); // && has(bulkResult, 'errors');\r\n","import { identity, contains, constant, chain, negate, has } from 'underscore';\r\nimport { mapBulkUpsertErrors } from '../common/map-bulk-upsert-errors';\r\n\r\nconst getBulkUploadEntityType = entitySchema =>\r\n (entitySchema.properties['bulk-upload-type'] || {}).value ||\r\n entitySchema.name;\r\n\r\nexport const getBulkUploadErrorType = entitySchema =>\r\n `${getBulkUploadEntityType(entitySchema)} Error`;\r\n\r\nexport const modelToViewModelForBulkErrors = (errors, bulkUpsertEntityErrorMap, scenario, i18n, activityLogger) =>\r\n mapBulkUpsertErrors(errors, bulkUpsertEntityErrorMap, /* errorProcessor */ identity, scenario, i18n, activityLogger);\r\n\r\nexport const removeErrors = (bulkErrors, filter) =>\r\n bulkErrors.filter(negate(filter));\r\n\r\nexport const isAudienceAssociationDoesntExistError = ({ Error }) => Error === 'AssetGroupAudienceGroupAssociationDoesNotExist';\r\n\r\nconst ReferencedEntityInvalidIdErrors = ['CampaignServiceInvalidCampaignId', 'AssetGroupIdInvalid'];\r\nexport const isReferencedEntityInvalidIdError = ({ Error }) => contains(ReferencedEntityInvalidIdErrors, Error);\r\nexport const removeReferencedEntityInvalidIdErrors = bulkErrors =>\r\n bulkErrors.filter(negate(isReferencedEntityInvalidIdError));\r\n\r\nexport const hasBulkErrorsForEntityType = (bulkErrors, entityType, filter = constant(true)) =>\r\n chain(bulkErrors)\r\n .filter(filter)\r\n .some(({ Type }) => Type === entityType)\r\n .value();\r\n\r\nexport const unexpectedBulkErrorToString = bulkOrSystemError =>\r\n // If it is an Error instance\r\n bulkOrSystemError.stack ||\r\n bulkOrSystemError.message ||\r\n // If it is a jQuery.ajax completion error object\r\n (has(bulkOrSystemError, 'status') && has(bulkOrSystemError, 'statusText') && `[jQuery.ajax] { status: ${bulkOrSystemError.status}, statusText: ${bulkOrSystemError.statusText} }`) ||\r\n // Everything else\r\n bulkOrSystemError;\r\n","import { identity, result } from 'underscore';\r\nimport { getBulkApiErrors } from '@bingads-webui-campaign/api-errors';\r\n\r\nexport const mapBulkUpsertErrors = (errors, bulkUpsertEntityErrorMap, errorProcessor = identity, scenario, i18n, activityLogger) =>\r\n getBulkApiErrors(errors, scenario, i18n, activityLogger).map((error) => {\r\n const errorType = error.type;\r\n const mappedErrorType = result(bulkUpsertEntityErrorMap, errorType, errorType);\r\n // eslint-disable-next-line no-param-reassign\r\n error.type = mappedErrorType;\r\n return errorProcessor(error);\r\n });\r\n","import { CampaignApiError } from '@bingads-webui-campaign/api-errors';\r\nimport { GENERIC_ERROR_MESSAGE_KEY } from '../common/strings';\r\n\r\nexport const ERROR_ENTITY = {\r\n Campaign: 'campaign',\r\n AssetGroup: 'assetGroup',\r\n CampaignLocation: 'campaignLocation',\r\n CampaignRadius: 'campaignRadius',\r\n CampaignNegativeLocation: 'campaignNegativeLocation',\r\n CampaignLocationIntent: 'campaignLocationIntent',\r\n CampaignDayTimeCriterion: 'campaignDayTimeCriterion',\r\n CampaignNegativeWebpage: 'campaignNegativeWebpage',\r\n AudienceGroupAssetGroupAssociation: 'audienceGroupAssetGroupAssociation',\r\n BrandListAssociation: 'brandListAssociation',\r\n};\r\n\r\nexport const apiErrorMapper = campaignApiError => (campaignApiError &&\r\n (campaignApiError.isHtmlMessage ?\r\n { DangerousHtmlMessage: campaignApiError.message } :\r\n campaignApiError.message || campaignApiError.code || campaignApiError.toString())) || '';\r\n\r\nexport const genericApiError = new CampaignApiError(GENERIC_ERROR_MESSAGE_KEY);\r\n","export const GENERIC_ERROR_MESSAGE_KEY = _TL_(\"We've encountered an error and can't continue. Please contact support for further assistance.\");\r\n","/* eslint-disable no-plusplus */\r\nimport { pick, extend, chain, isNumber, result, isString, map, each, isEmpty, clone, negate, isUndefined, pluck, difference, findWhere } from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport { AssetGroup, AudienceGroupAssetGroupAssociation } from '@bingads-webui/campaign-odata-schemas';\r\nimport { createOrUpdateAssetGroup, readAssetGroup } from '@bingads-webui-campaign-react/perf-max-data';\r\nimport { processImageListViewModelToModel } from '@bingads-webui-campaign-react/pmax-image-experience';\r\nimport { fromViewModelToBulkModel as viewModelToBulkModelForListingGroup } from '@bingads-webui-campaign-react/listing-groups-page';\r\nimport { isEmptyUrl } from '@bingads-webui-campaign-react/url-input-fluent';\r\nimport { getUrlRulesOption, URL_RULES_OPTIONS } from '@bingads-webui-campaign-react/url-rules';\r\nimport { newVideoFromMTObject } from '@bingads-webui-campaign-react/image-experience-video-part';\r\nimport { getImagesFromMTAssetsAsync } from '@bingads-webui-campaign-react/responsive-ad-editor-utils';\r\nimport odata from '@bingads-webui-component-legacy/http/channel/odata';\r\nimport { initialAssetGroupData, AssetGroupNegativeReferenceId } from '../common/constants';\r\nimport { isBulkWrappedResponse } from '../common/bulk';\r\nimport { getBulkUploadErrorType, hasBulkErrorsForEntityType, isAudienceAssociationDoesntExistError, modelToViewModelForBulkErrors, removeErrors, removeReferencedEntityInvalidIdErrors, unexpectedBulkErrorToString } from './bulk-upsert-errors';\r\nimport { ERROR_ENTITY, genericApiError } from './api-errors';\r\n\r\nconst globalLegacyI18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/campaign-creation-advanced');\r\n\r\nconst bulkUpsertAssetGroupSettingsEntityErrorMap = {\r\n [getBulkUploadErrorType(AssetGroup)]: ERROR_ENTITY.AssetGroup,\r\n [getBulkUploadErrorType(AudienceGroupAssetGroupAssociation)]: ERROR_ENTITY.AudienceGroupAssetGroupAssociation,\r\n};\r\n\r\nexport const initialAssetGroupViewModel = {\r\n data: initialAssetGroupData,\r\n isValid: false,\r\n isDirty: false,\r\n};\r\n\r\nexport const getErrorsPlaceholders = () => ({\r\n serverErrors: [],\r\n systemErrors: [],\r\n});\r\n\r\n\r\nconst whitelistedSchemaPropertyKeysForBulkModel = [\r\n 'Headlines', 'LongHeadlines', 'Descriptions', 'Images', 'Campaign', 'Id', 'Name', 'Status',\r\n 'Path1', 'Path2', 'BusinessName', 'CallToAction', 'FinalUrls', 'MobileFinalUrls', 'StartDate', 'EndDate',\r\n 'AssetGroupSearchThemes', 'AssetGroupUrlTargets', 'Videos',\r\n];\r\n\r\nconst whitelistedSchemaPropertyKeysForModel = ['AudienceGroup', 'UrlRulesOption'].concat(whitelistedSchemaPropertyKeysForBulkModel);\r\n\r\nconst whitelistedSchemaPropertyKeys = whitelistedSchemaPropertyKeysForModel;\r\n\r\nconst assetsArrayToObject = (assetsArray, propertyPrefix) => {\r\n const assetObject = {};\r\n\r\n each(assetsArray, (asset, index) => {\r\n const assetText = chain(asset).result('Asset', {}).result('Text', '').value();\r\n assetObject[`${propertyPrefix}${index}`] = assetText;\r\n });\r\n\r\n return assetObject;\r\n};\r\n\r\nconst modelToViewModelForTextAssets = (assetGroupModel, propertyName, propertyPrefix) => {\r\n const assetsArray = result(assetGroupModel, propertyName, []);\r\n const viewModelOverride = {};\r\n viewModelOverride[`${propertyName}`] = assetsArrayToObject(assetsArray, propertyPrefix);\r\n return viewModelOverride;\r\n};\r\n\r\nconst modelToViewModelForSearchThemes = (assetGroupModel, assetGroupViewModel) => {\r\n const searchThemes = result(assetGroupViewModel.data, 'AssetGroupSearchThemes', []);\r\n const newResult = [];\r\n\r\n assetGroupModel.AssetGroupSearchThemes.forEach((item) => {\r\n const index = searchThemes.findIndex(element => element.SearchTheme === item.SearchTheme);\r\n if (item.Status === 'Deleted') {\r\n searchThemes.splice(index, 1);\r\n } else {\r\n if (index >= 0) {\r\n searchThemes.splice(index, 1);\r\n }\r\n newResult.push(item);\r\n }\r\n });\r\n\r\n return { AssetGroupSearchThemes: searchThemes.concat(newResult) };\r\n};\r\n\r\nconst bulkModelToViewModelForUrlRules = (assetGroupBulkModel, assetGroupViewModel) => {\r\n const urlRulesOption = result(assetGroupViewModel.data, 'UrlRulesOption', URL_RULES_OPTIONS.All);\r\n if (urlRulesOption === URL_RULES_OPTIONS.All) {\r\n return { AssetGroupUrlTargets: [] };\r\n }\r\n\r\n const urlTargets = result(assetGroupViewModel.data, 'AssetGroupUrlTargets', []);\r\n const bulkResponse = result(assetGroupBulkModel, 'AssetGroupUrlTargets', []);\r\n const resultsWithIds = map(urlTargets, (item) => {\r\n if (item.Id) return item;\r\n const target = bulkResponse.filter(targetItem => targetItem.Status !== 'Deleted'\r\n && targetItem.Condition1 === item.TargetCondition1\r\n && targetItem.Value1 === item.TargetValue1\r\n && targetItem.Value2 === item.TargetValue2\r\n && targetItem.Value3 === item.TargetValue3);\r\n return { ...item, Id: target.length ? target[0].Id : undefined };\r\n });\r\n\r\n return { AssetGroupUrlTargets: resultsWithIds, UrlRulesOption: getUrlRulesOption(resultsWithIds) };\r\n};\r\n\r\nconst bulkModelToViewModelForUrlRulesV2 = (assetGroupBulkModel, assetGroupViewModel) => {\r\n const urlTargets = result(assetGroupViewModel.data, 'AssetGroupUrlTargets', []);\r\n const bulkResponse = result(assetGroupBulkModel, 'AssetGroupUrlTargets', []);\r\n const resultsWithIds = map(urlTargets, (item) => {\r\n if (item.Id) return item;\r\n const target = bulkResponse.filter(targetItem => targetItem.Status !== 'Deleted'\r\n && targetItem.Condition1 === item.TargetCondition1\r\n && targetItem.Condition2 === item.TargetCondition2\r\n && targetItem.Condition3 === item.TargetCondition3\r\n && targetItem.Value1 === item.TargetValue1\r\n && targetItem.Value2 === item.TargetValue2\r\n && targetItem.Value3 === item.TargetValue3);\r\n return { ...item, Id: target.length ? target[0].Id : undefined };\r\n });\r\n\r\n return { AssetGroupUrlTargets: resultsWithIds };\r\n};\r\n\r\nconst modelToViewModelForAudienceGroup = (assetGroupModel, assetGroupViewModel) => {\r\n const associatedIds = map(assetGroupModel.AudienceGroupAssetGroupAssociations, association => association.AudienceGroupId);\r\n\r\n const audienceGroup = result(assetGroupViewModel.data, 'AudienceGroup', []);\r\n\r\n // deleted audience group\r\n if (!audienceGroup) {\r\n return { AudienceGroup: null };\r\n }\r\n\r\n const associatedAudienceGroup = associatedIds.includes(audienceGroup.Id) ? audienceGroup : null;\r\n\r\n if (associatedAudienceGroup) {\r\n return {\r\n AudienceGroup: associatedAudienceGroup,\r\n };\r\n }\r\n\r\n return {};\r\n};\r\n\r\nconst viewModelToBulkModelForSearchThemes = (assetGroupViewModel) => {\r\n const { AssetGroupSearchThemes, Id = AssetGroupNegativeReferenceId } = assetGroupViewModel;\r\n const searchThemesresult = [];\r\n AssetGroupSearchThemes.forEach((item) => {\r\n if (item.Status === 'Deleted') {\r\n searchThemesresult.push({\r\n AssetGroupId: Id,\r\n SearchTheme: item.SearchTheme,\r\n AssetGroupSearchThemeId: item.Id,\r\n Status: item.Status,\r\n });\r\n } else if (!item.Id) {\r\n searchThemesresult.push({\r\n AssetGroupId: Id,\r\n SearchTheme: item.SearchTheme,\r\n });\r\n }\r\n });\r\n return { AssetGroupSearchThemes: searchThemesresult };\r\n};\r\n\r\nconst viewModelToBulkModelForUrlRules = (assetGroupViewModel, originalAssetGroupViewModel, serverContext) => {\r\n const isAssetGroupUrlRulesV2Enabled = serverContext?.DynamicPermissions?.AssetGroupUrlRulesV2 || false;\r\n const { AssetGroupUrlTargets: newAssetGroupUrlTargets, Id = AssetGroupNegativeReferenceId } = assetGroupViewModel;\r\n\r\n if (!isAssetGroupUrlRulesV2Enabled) {\r\n const { UrlRulesOption } = assetGroupViewModel;\r\n\r\n if (UrlRulesOption === URL_RULES_OPTIONS.All) {\r\n const deletedTargets = newAssetGroupUrlTargets.map(target => ({\r\n AssetGroupId: Id,\r\n AssetGroupUrlTargetId: target.Id,\r\n Status: 'Deleted',\r\n }));\r\n\r\n return {\r\n AssetGroupUrlTargets: deletedTargets,\r\n };\r\n }\r\n }\r\n\r\n const newTargetIds = pluck(newAssetGroupUrlTargets, 'Id');\r\n\r\n const mapTargetFields = (target) => {\r\n const bulkModel = {\r\n AssetGroupId: Id,\r\n Condition1: target.TargetCondition1,\r\n Operator1: target.TargetConditionOperator1,\r\n Value1: target.TargetValue1,\r\n };\r\n\r\n each([2, 3], (index) => {\r\n if (target[`TargetCondition${index}`]) {\r\n extend(bulkModel, {\r\n [`Condition${index}`]: target[`TargetCondition${index}`],\r\n [`Operator${index}`]: target[`TargetConditionOperator${index}`],\r\n [`Value${index}`]: target[`TargetValue${index}`],\r\n });\r\n }\r\n });\r\n\r\n return bulkModel;\r\n };\r\n\r\n let deletedTargets = [];\r\n if (originalAssetGroupViewModel) {\r\n const { AssetGroupUrlTargets: originalAssetGroupUrlTargets } = originalAssetGroupViewModel;\r\n const originalTargetIds = pluck(originalAssetGroupUrlTargets, 'Id');\r\n const deletedTargetIds = difference(originalTargetIds, newTargetIds);\r\n deletedTargets = deletedTargetIds.map((id) => {\r\n const target = findWhere(originalAssetGroupUrlTargets, { Id: id });\r\n return {\r\n AssetGroupId: Id,\r\n AssetGroupUrlTargetId: target.Id,\r\n Status: 'Deleted',\r\n };\r\n });\r\n }\r\n\r\n const newTargets = newAssetGroupUrlTargets.filter(target => !target.Id).map(target => mapTargetFields(target));\r\n\r\n return {\r\n AssetGroupUrlTargets: [\r\n ...deletedTargets,\r\n ...newTargets,\r\n ],\r\n };\r\n};\r\n\r\nconst prepareViewModelForWindowsImageFetch = (assetGroupModel, cid, aid) => {\r\n const images = {\r\n ImageSPOTLIGHT: {\r\n ImageAssets: null,\r\n ImageList: null,\r\n },\r\n ImagePRONG: {\r\n ImageAssets: null,\r\n ImageList: null,\r\n },\r\n TransparentLogo: {\r\n ImageAssets: null,\r\n ImageList: null,\r\n },\r\n };\r\n if (!assetGroupModel || !assetGroupModel.Images) {\r\n return images;\r\n }\r\n const imageProngModel = assetGroupModel.Images.find(x => x.AssociationType === 'ImagePRONG');\r\n const imageSpotLightModel = assetGroupModel.Images.find(x => x.AssociationType === 'ImageSPOTLIGHT');\r\n const transparentLogoModel = assetGroupModel.Images.find(x => x.AssociationType === 'TransparentLogo');\r\n\r\n const imageProngVMPromise = imageProngModel\r\n ? getImagesFromMTAssetsAsync(odata, `/Customers(${cid})/Accounts(${aid})/` /* baseUrl */, [imageProngModel], false, false, false, true, false)\r\n : Promise.resolve([]);\r\n const imageSpotLightVMPromise = imageSpotLightModel\r\n ? getImagesFromMTAssetsAsync(odata, `/Customers(${cid})/Accounts(${aid})/` /* baseUrl */, [imageSpotLightModel], false, false, false, false, true)\r\n : Promise.resolve([]);\r\n const transparentLogoVMPromise = transparentLogoModel\r\n ? getImagesFromMTAssetsAsync(odata, `/Customers(${cid})/Accounts(${aid})/` /* baseUrl */, [transparentLogoModel], false, false, false, false, false, true)\r\n : Promise.resolve([]);\r\n\r\n return imageProngVMPromise.then(imageProngVM => imageSpotLightVMPromise.then(imageSpotLightVM => transparentLogoVMPromise.then(transparentLogoVM => ({\r\n ImageSPOTLIGHT: {\r\n ImageAssets: null,\r\n ImageList: imageSpotLightVM,\r\n },\r\n ImagePRONG: {\r\n ImageAssets: null,\r\n ImageList: imageProngVM,\r\n },\r\n TransparentLogo: {\r\n ImageAssets: null,\r\n ImageList: transparentLogoVM,\r\n },\r\n }))));\r\n};\r\n\r\nconst prepareViewModelForImageFetch = assetGroupModel => ({\r\n Images: {\r\n ImageAssets: result(assetGroupModel, 'Images', []),\r\n },\r\n});\r\n\r\n// keeping unused i18n in case we find bugs with replacement to globalLegacyI18n and change need to be reverted\r\nfunction parseLoadDate(i18n, dateString) {\r\n return globalLegacyI18n.parseDate(dateString.substring(0, 10), { raw: 'yyyy-MM-dd' });\r\n}\r\n\r\nconst modelToViewModelForDateSetting = ({ assetGroupModel, i18n }) => ({\r\n StartDate: parseLoadDate(i18n, assetGroupModel.StartDate),\r\n EndDate: assetGroupModel.EndDate ? parseLoadDate(i18n, assetGroupModel.EndDate) : undefined,\r\n});\r\n\r\nconst modelToViewModelForURLRules = (assetGroupModel, isUrlRulesV2Enabled) => {\r\n const assetGroupUrlTargets = result(assetGroupModel, 'AssetGroupUrlTargets', []);\r\n return isUrlRulesV2Enabled ? {} : { UrlRulesOption: getUrlRulesOption(assetGroupUrlTargets) };\r\n};\r\n\r\nconst modelToViewModelForAssetGroup = (assetGroupModel, i18n, isUrlRulesV2Enabled) => {\r\n let data = pick(assetGroupModel, whitelistedSchemaPropertyKeys);\r\n data = extend(data, modelToViewModelForTextAssets(assetGroupModel, 'Headlines', 'Headline'));\r\n data = extend(data, modelToViewModelForTextAssets(assetGroupModel, 'LongHeadlines', 'LongHeadline'));\r\n data = extend(data, modelToViewModelForTextAssets(assetGroupModel, 'Descriptions', 'Description'));\r\n data = extend(data, prepareViewModelForImageFetch(assetGroupModel));\r\n\r\n data = extend(data, modelToViewModelForDateSetting({\r\n assetGroupModel,\r\n i18n,\r\n }));\r\n\r\n data = extend(data, modelToViewModelForURLRules(assetGroupModel, isUrlRulesV2Enabled));\r\n\r\n const assetGroupViewModel = {\r\n data,\r\n isValid: true,\r\n isDirty: false,\r\n };\r\n return assetGroupViewModel;\r\n};\r\n\r\n// keeping unused i18n in case we find bugs with replacement to globalLegacyI18n and change need to be reverted\r\nconst formatDateToAPIFormat = (i18n, date) => {\r\n if (date == null) {\r\n return '';\r\n }\r\n return globalLegacyI18n.formatDate(date, {\r\n raw: 'M/d/yyyy',\r\n });\r\n};\r\n\r\n// keeping unused i18n in case we find bugs with replacement to globalLegacyI18n and change need to be reverted\r\nconst parseDateFromAPIFormat = (i18n, date) => {\r\n if (date == null) {\r\n return null;\r\n }\r\n\r\n if (typeof date === 'string') {\r\n return globalLegacyI18n.parseDate(date.substring(0, 10), { raw: 'M/d/yyyy' });\r\n }\r\n\r\n return date;\r\n};\r\n\r\nconst viewModelToBulkModelForDateSetting = (i18n, assetGroupViewModel) => ({\r\n StartDate: formatDateToAPIFormat(i18n, assetGroupViewModel.data.StartDate),\r\n EndDate: assetGroupViewModel.data.EndDate ? formatDateToAPIFormat(i18n, assetGroupViewModel.data.EndDate) : '1/1/3000',\r\n});\r\n\r\nconst bulkModelToViewModelForDateSetting = ({ assetGroupModel, i18n }) => ({\r\n StartDate: parseDateFromAPIFormat(i18n, assetGroupModel.StartDate),\r\n EndDate: assetGroupModel.EndDate ? parseDateFromAPIFormat(i18n, assetGroupModel.EndDate) : undefined,\r\n});\r\n\r\nconst createBulkModelForListingGroup = (listingGroups) => {\r\n const hasProductFilters = listingGroups && listingGroups.items && listingGroups.items.length > 0;\r\n\r\n const rootNodeId = -1;\r\n let negativeId = -2;\r\n let bulkModel = [{\r\n Id: rootNodeId,\r\n AssetGroupId: AssetGroupNegativeReferenceId,\r\n IsExcluded: false,\r\n IsLeaf: !hasProductFilters,\r\n Condition: {\r\n Operand: 'All',\r\n Attribute: '',\r\n },\r\n }];\r\n if (hasProductFilters) {\r\n const dummyEveryThingElse = {\r\n key: '_DUMMY_EVERY_THING_ELSE',\r\n data: { Attribute: '' },\r\n };\r\n\r\n let finalListingGroups = [\r\n ...listingGroups.items,\r\n dummyEveryThingElse,\r\n ];\r\n finalListingGroups = finalListingGroups.map(item => ({\r\n Id: negativeId--,\r\n IsExcluded: item.key === dummyEveryThingElse.key,\r\n ParentId: rootNodeId,\r\n IsLeaf: true,\r\n AssetGroupId: AssetGroupNegativeReferenceId,\r\n Condition: { Attribute: item.data.Attribute, Operand: listingGroups.operand },\r\n }));\r\n\r\n bulkModel = bulkModel.concat(map(finalListingGroups, listingGroup => viewModelToBulkModelForListingGroup(listingGroup)));\r\n }\r\n\r\n return {\r\n ProductListingGroups: bulkModel,\r\n };\r\n};\r\n\r\nconst textAssetPropertyNameRegEx = /([^\\d]+)(\\d+)/;\r\nconst parseAssetPropertyName = (propertyName) => {\r\n const matches = propertyName.match(textAssetPropertyNameRegEx);\r\n return matches !== null ?\r\n ({ name: matches[1], index: parseInt(matches[2], 10) }) :\r\n ({ name: 'invalid property', index: NaN });\r\n};\r\n\r\nconst assetsObjectToArray = (assetsObject, propertyPrefix) =>\r\n chain(assetsObject)\r\n .pairs()\r\n .filter(([, value]) => !isEmpty(value))\r\n .map(([key, value]) => [parseAssetPropertyName(key), value])\r\n .filter(([{ name, index }]) => name === propertyPrefix && isNumber(index))\r\n .value();\r\n\r\nconst assetToModel = ([, value]) => ({\r\n Asset: {\r\n Text: value,\r\n },\r\n});\r\n\r\nconst viewModelToBulkModelForTextAssets = (assetGroupViewModel, propertyName, vmPropertyPrefix) => ({\r\n [propertyName]:\r\n assetsObjectToArray(result(assetGroupViewModel, propertyName, {}), vmPropertyPrefix)\r\n .map(assetToModel),\r\n});\r\n\r\nconst viewModelToBulkModelForImages = (assetGroupViewModel, serverContext, aid, cid) => {\r\n const { ImageList = [] } = assetGroupViewModel.Images;\r\n\r\n if (assetGroupViewModel.ImageSPOTLIGHT && assetGroupViewModel.ImageSPOTLIGHT.ImageList) {\r\n ImageList.push(...assetGroupViewModel.ImageSPOTLIGHT.ImageList);\r\n }\r\n if (assetGroupViewModel.ImagePRONG && assetGroupViewModel.ImagePRONG.ImageList) {\r\n ImageList.push(...assetGroupViewModel.ImagePRONG.ImageList);\r\n }\r\n if (assetGroupViewModel.TransparentLogo && assetGroupViewModel.TransparentLogo.ImageList) {\r\n ImageList.push(...assetGroupViewModel.TransparentLogo.ImageList);\r\n }\r\n const model = processImageListViewModelToModel(ImageList, serverContext, aid, cid);\r\n return model;\r\n};\r\n\r\nconst isAudienceSignalAssetGroupAssociationCreateOrUpdateScenario = assetGroupViewModel =>\r\n !!result(assetGroupViewModel.AudienceGroup, 'Id');\r\nconst isAudienceSignalAssetGroupAssociationDeleteScenario = (assetGroupViewModel, originalAssetGroupViewModel) =>\r\n !isAudienceSignalAssetGroupAssociationCreateOrUpdateScenario(assetGroupViewModel) &&\r\n !!result(originalAssetGroupViewModel?.AudienceGroup, 'Id');\r\n\r\n\r\nconst viewModelToBulkModelForAudienceGroup = (assetGroupViewModel, originalAssetGroupViewModel) => {\r\n const { AudienceGroup, Id = AssetGroupNegativeReferenceId } = assetGroupViewModel;\r\n let model = {};\r\n if (isAudienceSignalAssetGroupAssociationCreateOrUpdateScenario(assetGroupViewModel)) {\r\n model = extend({\r\n AudienceGroupAssetGroupAssociations: [{\r\n AudienceGroupId: AudienceGroup.Id,\r\n AssetGroupId: Id,\r\n Status: 'Active',\r\n }],\r\n });\r\n } else if (isAudienceSignalAssetGroupAssociationDeleteScenario(assetGroupViewModel, originalAssetGroupViewModel)) {\r\n const { AudienceGroup: OriginalAudienceGroup } = originalAssetGroupViewModel;\r\n model = extend({\r\n AudienceGroupAssetGroupAssociations: [{\r\n AudienceGroupId: OriginalAudienceGroup.Id,\r\n AssetGroupId: Id,\r\n Status: 'Deleted',\r\n }],\r\n });\r\n }\r\n return model;\r\n};\r\n\r\nconst viewModelToBulkModelForFinalUrls = (assetGroupViewModel) => {\r\n const urls = result(assetGroupViewModel, 'FinalUrls', null);\r\n if (!urls || isEmptyUrl(urls)) {\r\n return { FinalUrls: [] };\r\n }\r\n\r\n return { FinalUrls: urls };\r\n};\r\n\r\nconst viewModelToBulkModelForMobileFinalUrls = (assetGroupViewModel) => {\r\n const isCreation = !(assetGroupViewModel.Id > 0);\r\n const urls = result(assetGroupViewModel, 'MobileFinalUrls', null);\r\n if (!urls || isEmptyUrl(urls)) {\r\n if (isCreation) {\r\n return { MobileFinalUrls: '' };\r\n }\r\n\r\n return { MobileFinalUrls: 'delete_value' };\r\n }\r\n\r\n return { MobileFinalUrls: urls.join(';') };\r\n};\r\n\r\nconst viewModelToBulkModelForAssetGroup = (i18n, serverContext, cid, aid, assetGroupViewModel, originalAssetGroup, campaign) => {\r\n let model = pick(assetGroupViewModel.data, whitelistedSchemaPropertyKeysForBulkModel);\r\n if (!assetGroupViewModel.data.Id) {\r\n model.Id = AssetGroupNegativeReferenceId;\r\n }\r\n if (!assetGroupViewModel.data.Id && campaign && campaign.CampaignSettings && campaign.CampaignSettings.ProviderId) {\r\n model = extend(model, createBulkModelForListingGroup(assetGroupViewModel.data.listingGroup));\r\n }\r\n model = extend(model, viewModelToBulkModelForDateSetting(i18n, assetGroupViewModel));\r\n model = extend(model, viewModelToBulkModelForTextAssets(assetGroupViewModel.data, 'Headlines', 'Headline'));\r\n model = extend(model, viewModelToBulkModelForTextAssets(assetGroupViewModel.data, 'LongHeadlines', 'LongHeadline'));\r\n model = extend(model, viewModelToBulkModelForTextAssets(assetGroupViewModel.data, 'Descriptions', 'Description'));\r\n\r\n if (assetGroupViewModel.data.AudienceGroup || originalAssetGroup.data?.AudienceGroup) {\r\n model = extend(model, viewModelToBulkModelForAudienceGroup(assetGroupViewModel.data, originalAssetGroup.data));\r\n }\r\n\r\n model = extend(model, viewModelToBulkModelForFinalUrls(assetGroupViewModel.data));\r\n model = extend(model, viewModelToBulkModelForMobileFinalUrls(assetGroupViewModel.data));\r\n\r\n if (assetGroupViewModel.data.AssetGroupSearchThemes || originalAssetGroup.data?.AssetGroupSearchThemes) {\r\n model = extend(model, viewModelToBulkModelForSearchThemes(assetGroupViewModel.data, 'AssetGroupSearchTheme', 'AssetGroupSearchTheme'));\r\n }\r\n\r\n if (assetGroupViewModel.data.AssetGroupUrlTargets || originalAssetGroup.data?.AssetGroupUrlTargets) {\r\n model = extend(model, viewModelToBulkModelForUrlRules(assetGroupViewModel.data, originalAssetGroup.data, serverContext));\r\n }\r\n\r\n if (assetGroupViewModel.data.videos && Array.isArray(assetGroupViewModel.data.videos)) {\r\n const videos = assetGroupViewModel.data.videos.map(video => ({\r\n id: video.id,\r\n idString: video.idString,\r\n subType: video.type,\r\n }));\r\n\r\n model = extend(model, { Videos: JSON.stringify(videos) });\r\n }\r\n\r\n return viewModelToBulkModelForImages(assetGroupViewModel.data, serverContext, cid, aid)\r\n .then(imagesModel => extend(model, imagesModel));\r\n};\r\n\r\nexport const viewModelToModelForAssetGroup = (assetGroupViewModel) => {\r\n const model = pick(assetGroupViewModel.data, whitelistedSchemaPropertyKeysForModel);\r\n if (!assetGroupViewModel.data.Id) {\r\n model.Id = AssetGroupNegativeReferenceId;\r\n }\r\n return model;\r\n};\r\n\r\nexport const modelToViewModelForWindowsAssetGroup = (assetGroupModel, i18n, cid, aid) => {\r\n let data = pick(assetGroupModel, whitelistedSchemaPropertyKeys);\r\n data = extend(data, modelToViewModelForTextAssets(assetGroupModel, 'Headlines', 'Headline'));\r\n data = extend(data, modelToViewModelForTextAssets(assetGroupModel, 'LongHeadlines', 'LongHeadline'));\r\n data = extend(data, modelToViewModelForTextAssets(assetGroupModel, 'Descriptions', 'Description'));\r\n\r\n data = extend(data, modelToViewModelForDateSetting({\r\n assetGroupModel,\r\n i18n,\r\n }));\r\n\r\n return prepareViewModelForWindowsImageFetch(assetGroupModel, cid, aid).then((image) => {\r\n data = extend(data, image);\r\n const assetGroupViewModel = {\r\n data,\r\n isValid: true,\r\n isDirty: false,\r\n };\r\n return assetGroupViewModel;\r\n });\r\n};\r\n\r\nexport const loadAssetGroup = (cid, aid, campaignId, assetGroupId, i18n, isSearchThemeEnabled, isUrlRulesEnabled, isUrlRulesV2Enabled) =>\r\n readAssetGroup(cid, aid, campaignId, assetGroupId, isSearchThemeEnabled, isUrlRulesEnabled).then(assetGroupModel => modelToViewModelForAssetGroup(assetGroupModel, i18n, isUrlRulesV2Enabled));\r\n\r\nexport const loadAssetGroupForWindowsStore = (cid, aid, campaignId, assetGroupId, i18n) =>\r\n readAssetGroup(cid, aid, campaignId, assetGroupId, false, false).then(assetGroupModel => modelToViewModelForWindowsAssetGroup(assetGroupModel, i18n, cid, aid));\r\n\r\nexport const loadAssetGroupWithVideos = (cid, aid, campaignId, assetGroupId, i18n, isSearchThemeEnabled, isUrlRulesEnabled, videoRepository) => loadAssetGroup(cid, aid, campaignId, assetGroupId, i18n, isSearchThemeEnabled, isUrlRulesEnabled).then((assetGroup) => {\r\n const { Videos } = assetGroup && assetGroup.data;\r\n\r\n if (Videos) {\r\n const videoPromises = Promise.map(Videos, video => videoRepository.getVideo({ id: video.Asset.Id }));\r\n\r\n return videoPromises.then((videos) => {\r\n const videoObjects = map(videos, (video) => {\r\n const videoMT = newVideoFromMTObject(video);\r\n\r\n const associationType = Videos.find(v => v.Asset.Id === video.Id).AssociationType;\r\n return {\r\n ...videoMT,\r\n type: associationType,\r\n ThumbnailUrl: videoMT.thumbnailUrl,\r\n };\r\n });\r\n\r\n return {\r\n ...assetGroup,\r\n data: {\r\n ...assetGroup.data,\r\n videos: videoObjects,\r\n },\r\n };\r\n });\r\n }\r\n\r\n return assetGroup;\r\n});\r\n\r\nconst bulkModelToViewModelForAssetGroup = ({\r\n i18n, scenario, activityLogger,\r\n assetGroupViewModel, // the asset group's view model the user tried to save\r\n originalAssetGroupViewModel, // the asset group's view model before the save attempt\r\n assetGroupModel, // the asset group's model as was generated off of assetGroupViewModel and processed by bulk infrastructure\r\n serverContext,\r\n errors = [], // the bulk upsert errors\r\n}) => {\r\n let data;\r\n let newOriginalAssetGroupViewModel;\r\n\r\n const hasAssetGroupErrors = hasBulkErrorsForEntityType(errors, getBulkUploadErrorType(AssetGroup));\r\n const hasAudienceSignalAssetGroupAssociationErrors = hasBulkErrorsForEntityType(errors, getBulkUploadErrorType(AudienceGroupAssetGroupAssociation), negate(isAudienceAssociationDoesntExistError));\r\n if (!hasAssetGroupErrors) {\r\n data = pick(assetGroupModel, whitelistedSchemaPropertyKeys);\r\n // Correct the type of the AssetGroup's ID:\r\n if (data.Id && isString(data.Id)) {\r\n // eslint-disable-next-line no-param-reassign\r\n data.Id = parseInt(data.Id, 10);\r\n }\r\n data = extend(data, modelToViewModelForTextAssets(assetGroupModel, 'Headlines', 'Headline'));\r\n data = extend(data, modelToViewModelForTextAssets(assetGroupModel, 'LongHeadlines', 'LongHeadline'));\r\n data = extend(data, modelToViewModelForTextAssets(assetGroupModel, 'Descriptions', 'Description'));\r\n data = extend(data, bulkModelToViewModelForDateSetting({ assetGroupModel, i18n }));\r\n\r\n if (assetGroupModel.AudienceGroupAssetGroupAssociations) {\r\n data = extend(data, modelToViewModelForAudienceGroup(assetGroupModel, assetGroupViewModel));\r\n }\r\n if (assetGroupModel.AssetGroupSearchThemes) {\r\n data = extend(data, modelToViewModelForSearchThemes(assetGroupModel, assetGroupViewModel));\r\n }\r\n if (assetGroupModel.MobileFinalUrls) {\r\n data.MobileFinalUrls = assetGroupModel.MobileFinalUrls === 'delete_value' ? [] : [assetGroupModel.MobileFinalUrls];\r\n }\r\n if (assetGroupModel.AssetGroupUrlTargets) {\r\n const isAssetGroupUrlRulesV2Enabled = serverContext?.DynamicPermissions?.AssetGroupUrlRulesV2 || false;\r\n data = extend(\r\n data,\r\n isAssetGroupUrlRulesV2Enabled\r\n ? bulkModelToViewModelForUrlRulesV2(assetGroupModel, assetGroupViewModel)\r\n : bulkModelToViewModelForUrlRules(assetGroupModel, assetGroupViewModel)\r\n );\r\n }\r\n newOriginalAssetGroupViewModel = clone(assetGroupViewModel);\r\n } else {\r\n ({ data } = assetGroupViewModel);\r\n newOriginalAssetGroupViewModel = originalAssetGroupViewModel;\r\n\r\n // If AsetGroup change was not accepted, but audience signal association change was, then\r\n // we need to update the model to reflect the new state of audience signal association or, otherwise,\r\n // when the user was removing the association MT will return the error that the association is not found and the user will be blocked from saving the changes.\r\n // For the association creation scenario, MT doesn't generate errors if we request the create an association that already exist.\r\n if (!hasAudienceSignalAssetGroupAssociationErrors) {\r\n if (isAudienceSignalAssetGroupAssociationDeleteScenario(assetGroupViewModel.data, originalAssetGroupViewModel.data)) {\r\n delete newOriginalAssetGroupViewModel.data.AudienceGroup;\r\n } else if (isAudienceSignalAssetGroupAssociationCreateOrUpdateScenario(assetGroupViewModel.data)) {\r\n newOriginalAssetGroupViewModel.data.AudienceGroup = assetGroupViewModel.data.AudienceGroup;\r\n }\r\n }\r\n }\r\n\r\n data = extend(data, pick(assetGroupViewModel.data, 'Images', 'FinalUrlForRecommendation', 'videos'));\r\n\r\n const newAssetGroupViewModel = {\r\n data,\r\n isValid: true,\r\n isDirty: false,\r\n };\r\n\r\n let filteredErrors = errors;\r\n if (newAssetGroupViewModel.data.Id <= 0 || isUndefined(newAssetGroupViewModel.data.Id)) {\r\n // Handling the common creation scenario where the main entity didn't get created. In this case all related entities will not be created as well and will generate errors.\r\n filteredErrors = removeReferencedEntityInvalidIdErrors(errors);\r\n }\r\n // Handling the concurrency scenario where while the user was deleting the association somebody else already deleted it\r\n filteredErrors = removeErrors(filteredErrors, isAudienceAssociationDoesntExistError);\r\n\r\n const serverErrors = modelToViewModelForBulkErrors(\r\n filteredErrors,\r\n bulkUpsertAssetGroupSettingsEntityErrorMap,\r\n scenario,\r\n i18n,\r\n activityLogger\r\n );\r\n\r\n return { assetGroupViewModel: newAssetGroupViewModel, originalAssetGroupViewModel: newOriginalAssetGroupViewModel, serverErrors };\r\n};\r\n\r\nexport const saveAssetGroupAndLinkedData = (\r\n {\r\n assetGroup: assetGroupViewModel,\r\n originalAssetGroup: originalAssetGroupViewModel,\r\n campaign,\r\n },\r\n {\r\n scenario,\r\n i18n,\r\n activity,\r\n activityLogger,\r\n serverContext,\r\n cid,\r\n aid,\r\n }\r\n) => viewModelToBulkModelForAssetGroup(i18n, serverContext, cid, aid, assetGroupViewModel, originalAssetGroupViewModel, campaign)\r\n .then((bulkModel) => {\r\n const modelToSave = {\r\n ...bulkModel,\r\n Campaign: pick(campaign, 'Id'),\r\n };\r\n return createOrUpdateAssetGroup(modelToSave);\r\n })\r\n .then((assetGroupModel) => {\r\n const { assetGroupViewModel: assetGroup, originalAssetGroupViewModel: originalAssetGroup } = bulkModelToViewModelForAssetGroup({\r\n i18n, scenario, activityLogger, assetGroupViewModel, originalAssetGroupViewModel, assetGroupModel, serverContext,\r\n });\r\n const data = {\r\n assetGroup,\r\n originalAssetGroup,\r\n ...getErrorsPlaceholders(),\r\n };\r\n\r\n if (activity) {\r\n activity.signal('onAssetGroupCreationSucceeded');\r\n }\r\n\r\n return data;\r\n }, (bulkOrSystemError) => {\r\n if (isBulkWrappedResponse(bulkOrSystemError)) {\r\n const { entity: assetGroupModel, errors } = bulkOrSystemError;\r\n const { assetGroupViewModel: assetGroup, originalAssetGroupViewModel: originalAssetGroup, serverErrors } = bulkModelToViewModelForAssetGroup({\r\n i18n,\r\n scenario,\r\n activityLogger,\r\n assetGroupViewModel,\r\n originalAssetGroupViewModel,\r\n assetGroupModel,\r\n serverContext,\r\n errors,\r\n });\r\n\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n const res = {\r\n assetGroup,\r\n originalAssetGroup,\r\n ...getErrorsPlaceholders(),\r\n serverErrors,\r\n };\r\n if (isEmpty(serverErrors)) {\r\n return Promise.resolve(res);\r\n }\r\n return Promise.reject(res);\r\n }\r\n\r\n // Activity\r\n // eslint-disable-next-line no-console\r\n console.warn(`Asset group bulk upsert system error: ${unexpectedBulkErrorToString(bulkOrSystemError)}`);\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n assetGroup: assetGroupViewModel,\r\n originalAssetGroup: originalAssetGroupViewModel,\r\n ...getErrorsPlaceholders(),\r\n serverErrors: [genericApiError],\r\n });\r\n });\r\n","import { map, pick, isEmpty, chain, pluck, difference, findWhere, get } from 'underscore';\r\nimport { CampaignCriterion } from '@bingads-webui/campaign-odata-schemas';\r\nimport { modelToViewModelDayTimeTargets, locationTargetsOptionKeys } from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport { getBundleCountriesAndBundleLocationCriterions, shouldSelectBundleOption, parseLocationTargets, convertLocationStateToLocationSchemaCampaign, getLocationIntent } from '@bingads-webui-campaign/hotel-common-targets';\r\nimport { minuteMap } from '../common/constants';\r\n\r\nexport const initialCampaignCriterionsViewModel = {\r\n data: [],\r\n isValid: true,\r\n isDirty: false,\r\n};\r\n\r\n\r\nconst whitelistedSchemaPropertyKeys = Object.keys(CampaignCriterion.properties);\r\n\r\nexport const viewModelToModelForCampaignCriterions = (campaignCriterionsViewModel) => {\r\n const model = pick(campaignCriterionsViewModel.data, whitelistedSchemaPropertyKeys);\r\n return model;\r\n};\r\n\r\nexport const modelToViewModelForCampaignCriterions = (campaignCriterionsModel) => {\r\n const data = pick(campaignCriterionsModel, whitelistedSchemaPropertyKeys);\r\n const campaignCriterionsViewModel = {\r\n data,\r\n isValid: true,\r\n isDirty: false,\r\n };\r\n return campaignCriterionsViewModel;\r\n};\r\n\r\nexport const viewModelToBulkModelForCampaignCriterions = (campaignModel, campaignCriterionsViewModel) => {\r\n const campaignCriterionsModel = viewModelToModelForCampaignCriterions(campaignCriterionsViewModel);\r\n const campaignCriterionsBulkUpserModel = map(\r\n campaignCriterionsModel,\r\n campaignCriterionModel => ({ ...campaignCriterionModel, Campaign: { Id: campaignModel.Id } })\r\n );\r\n\r\n return campaignCriterionsBulkUpserModel;\r\n};\r\n\r\nexport const modelToViewModelForLocationTargets = ({\r\n model, bundleCountries, campaignId,\r\n}) => {\r\n const {\r\n locations,\r\n intentId,\r\n intentOption,\r\n } = parseLocationTargets(model, 'campaign', campaignId);\r\n let targetOption = locations.length ? locationTargetsOptionKeys.specific : locationTargetsOptionKeys.everywhere;\r\n targetOption = shouldSelectBundleOption(bundleCountries, locations) ? locationTargetsOptionKeys.bundleOrDefaultMarket : targetOption;\r\n return {\r\n locationTargets: {\r\n currentLevelSettings: {\r\n initLocations: locations,\r\n currentLocations: locations,\r\n targetOption,\r\n intentId,\r\n ...intentOption,\r\n },\r\n bidMode: false,\r\n useParentLevel: locations.length === 0,\r\n },\r\n };\r\n};\r\n\r\nexport const modelToViewModelForDayTimeTargets = ({\r\n model,\r\n}) => {\r\n const campaignDayTimeRanges = modelToViewModelDayTimeTargets(model);\r\n return {\r\n adSchedules: {\r\n dayTimeRanges: campaignDayTimeRanges,\r\n },\r\n };\r\n};\r\n\r\nexport const bulkModelToViewModelForDayTimeTargets = ({\r\n criterions,\r\n}) => {\r\n const schedulingRows = [];\r\n\r\n chain(criterions)\r\n .filter(criterion => criterion.CriterionType === 'DayTime')\r\n .each((criterion) => {\r\n schedulingRows.push({\r\n Id: criterion.Id,\r\n Day: criterion.Criterion.DayTimeCriterion.Day,\r\n StartHour: criterion.Criterion.DayTimeCriterion.FromHour,\r\n StartMinute: minuteMap[criterion.Criterion.DayTimeCriterion.FromMinute],\r\n EndHour: criterion.Criterion.DayTimeCriterion.ToHour,\r\n EndMinute: minuteMap[criterion.Criterion.DayTimeCriterion.ToMinute],\r\n });\r\n })\r\n .value();\r\n\r\n return {\r\n adSchedules: {\r\n dayTimeRanges: schedulingRows,\r\n },\r\n };\r\n};\r\n\r\nexport const modelToViewModelForCampaignNegativeWebpages = ({\r\n model,\r\n}) => ({\r\n finalUrlExpansions: map(model, campaignNegativeWebpage => ({\r\n Id: campaignNegativeWebpage.Id,\r\n Criterion: {\r\n WebPage: {\r\n ...campaignNegativeWebpage.Criterion,\r\n },\r\n },\r\n })),\r\n});\r\n\r\nexport const bulkModelToViewModelForCampaignNegativeWebpages = ({\r\n model,\r\n}) => ({\r\n finalUrlExpansions:\r\n chain(model)\r\n .filter(campaignNegativeWebpage => campaignNegativeWebpage.Status !== 'Deleted')\r\n .map(campaignNegativeWebpage => ({\r\n Id: campaignNegativeWebpage.Id,\r\n Criterion: {\r\n ...campaignNegativeWebpage.Criterion,\r\n },\r\n }))\r\n .value(),\r\n});\r\n\r\nexport const bulkModelToViewModelForLocationTargets = ({\r\n locationTargetsModel, bundleCountries,\r\n}) => {\r\n const locations = locationTargetsModel\r\n .filter(criterion => criterion.Criterion.Type === 'Radius' || criterion.Criterion.Type === 'Location');\r\n const intent = locationTargetsModel.find(criterion => criterion.Criterion.Type === 'LocationIntentCriterion');\r\n const intentId = intent ? intent.Id : null;\r\n const intentOption = intent ? getLocationIntent(intent.Criterion.LocationIntentCriterion.IntentOption) : null;\r\n let targetOption = locations.length ? locationTargetsOptionKeys.specific : locationTargetsOptionKeys.everywhere;\r\n targetOption = shouldSelectBundleOption(bundleCountries, locations) ? locationTargetsOptionKeys.bundleOrDefaultMarket : targetOption;\r\n return {\r\n locationTargets: {\r\n currentLevelSettings: {\r\n initLocations: locations,\r\n currentLocations: locations,\r\n targetOption,\r\n intentId,\r\n ...intentOption,\r\n },\r\n bidMode: false,\r\n useParentLevel: locations.length === 0,\r\n },\r\n };\r\n};\r\n\r\nexport const viewModelToBulkModelForLocationTargets = (campaignViewModel, bundleLocationCriterions) => {\r\n const bulkUpsertModel = convertLocationStateToLocationSchemaCampaign(\r\n campaignViewModel.data.locationTargets,\r\n bundleLocationCriterions,\r\n {\r\n ...campaignViewModel.data,\r\n bidStrategy: {\r\n option: '',\r\n },\r\n name: {\r\n value: campaignViewModel.data.Name,\r\n },\r\n }\r\n );\r\n return bulkUpsertModel;\r\n};\r\n\r\nexport const viewModelToBulkModelForAdSchedules = (campaignViewModel) => {\r\n const targets = campaignViewModel.data.adSchedulesBulkUpsert || [];\r\n return targets.map((criterion) => {\r\n const Status = isEmpty(criterion) ? 'Active' : criterion.Status;\r\n if (campaignViewModel.data.Id) {\r\n return {\r\n ...criterion,\r\n Status,\r\n Campaign: {\r\n Id: campaignViewModel.data.Id,\r\n },\r\n };\r\n }\r\n return {\r\n ...criterion,\r\n Status,\r\n CampaignName: campaignViewModel.data.Name,\r\n };\r\n });\r\n};\r\n\r\nexport const viewModelToBulkModelFoFinalUrlExpansions = (campaignViewModel) => {\r\n let autoTargets = campaignViewModel.data.finalUrlExpansionsBulkUpsert || [];\r\n autoTargets = autoTargets\r\n .filter(target => target.Id || target.Status !== 'Deleted')\r\n .map((target) => {\r\n const Status = !target.Status ? 'Active' : target.Status;\r\n\r\n if (campaignViewModel.data.Id) {\r\n return {\r\n ...{\r\n Criterion: {\r\n ...target.Criterion,\r\n Type: 'NegativeWebpage',\r\n },\r\n },\r\n Status,\r\n Campaign: {\r\n Id: campaignViewModel.data.Id,\r\n },\r\n Id: target.Id,\r\n };\r\n }\r\n return {\r\n ...{\r\n Criterion: {\r\n ...target.Criterion,\r\n Type: 'NegativeWebpage',\r\n },\r\n },\r\n Status,\r\n CampaignName: campaignViewModel.data.Name,\r\n Id: target.Id,\r\n };\r\n });\r\n return {\r\n CampaignNegativeWebpages: autoTargets,\r\n };\r\n};\r\n\r\nexport const viewModelToBulkModelForFinalUrlExpansions = (campaignViewModel, originalCampaignViewModel) => {\r\n // Ignore changes of final url exclusions if the option is opt-out.\r\n if (campaignViewModel.data.finalUrlExpansionOptOut) return {};\r\n\r\n // Workaround for keeping current final url implementation until the new control is fully released.\r\n if (!isEmpty(campaignViewModel.data.finalUrlExpansionsBulkUpsert)) return viewModelToBulkModelFoFinalUrlExpansions(campaignViewModel);\r\n\r\n const newFinalUrlExpansions = get(campaignViewModel, ['data', 'finalUrlExpansions'], []);\r\n const originalFinalUrlExpansions = get(originalCampaignViewModel, ['data', 'finalUrlExpansions'], []);\r\n\r\n function transformObject(target) {\r\n const status = !target.Status ? 'Active' : target.Status;\r\n const baseObject = {\r\n Criterion: {\r\n ...target.Criterion,\r\n Type: 'NegativeWebpage',\r\n },\r\n Status: status,\r\n Id: target.Id,\r\n };\r\n if (campaignViewModel.data.Id) {\r\n return { ...baseObject, Campaign: { Id: campaignViewModel.data.Id } };\r\n }\r\n return { ...baseObject, CampaignName: campaignViewModel.data.Name };\r\n }\r\n\r\n const newIds = pluck(newFinalUrlExpansions, 'Id');\r\n const originalIds = pluck(originalFinalUrlExpansions, 'Id');\r\n const deletedIds = difference(originalIds, newIds);\r\n\r\n const deletedTargets = deletedIds.map((id) => {\r\n const target = findWhere(originalFinalUrlExpansions, { Id: id });\r\n return transformObject({ ...target, Status: 'Deleted' });\r\n });\r\n const addedTargets = newFinalUrlExpansions.filter(target => !target.Id).map(transformObject);\r\n\r\n return {\r\n CampaignNegativeWebpages: [\r\n ...deletedTargets,\r\n ...addedTargets,\r\n ],\r\n };\r\n};\r\n\r\nexport const loadBundleCountries = ({\r\n cid,\r\n aid,\r\n serverContext,\r\n}) => {\r\n const lcid = serverContext ? serverContext.CurrentUser.LocaleID : '1033';\r\n const market = serverContext ? serverContext.CurrentUser.Market : 'US';\r\n const language = 'All';\r\n\r\n return getBundleCountriesAndBundleLocationCriterions(cid, aid, lcid, language, market);\r\n};\r\n","import { pick, extend, chain, contains, pluck, isString, isArray, findWhere, isEmpty, reduce, filter, find } from 'underscore';\r\nimport { readCampaign } from '@bingads-webui-campaign-react/perf-max-data';\r\nimport { convertToMTFormat, Scopes } from '@bingads-webui-campaign-react/goal-selector';\r\nimport {\r\n modelToViewModelForLocationTargets,\r\n modelToViewModelForDayTimeTargets,\r\n bulkModelToViewModelForLocationTargets,\r\n bulkModelToViewModelForDayTimeTargets,\r\n modelToViewModelForCampaignNegativeWebpages,\r\n bulkModelToViewModelForCampaignNegativeWebpages\r\n} from './campaign-criterions';\r\nimport { initialCampaignData, CampaignNegativeReferenceId, initialBrandExclusionsData } from '../common/constants';\r\n\r\nexport const initialCampaignViewModel = {\r\n data: initialCampaignData,\r\n isValid: false,\r\n isDirty: false,\r\n};\r\n\r\nexport const initialBrandExclusionsViewModel = {\r\n data: initialBrandExclusionsData,\r\n isDirty: false,\r\n};\r\n\r\nconst whitelistedSchemaPropertyKeysForModel = [\r\n 'Notes', 'Budget', 'Id', 'Name', 'TimeZone', 'BidStrategyName', 'Status',\r\n 'DeliveryStatus', 'DeliveryStatusDetails', 'CampaignType', 'CampaignSubType',\r\n 'HasAuctionInsight', 'IsBidLandscapeAvailable', 'TrackingUrlTemplate',\r\n 'FinalUrlSuffix', 'UrlCustomParameters', 'BiddingScheme', 'NativeBidAdjustment',\r\n 'CampaignSettings', 'DisplayBiddingStrategyType',\r\n 'DisplayBiddingStrategyMaxCpc', 'DisplayBiddingStrategyTargetCpa', 'Languages',\r\n 'ExperimentId', 'BaseCampaignName', 'TargetSetting',\r\n 'AdScheduleUseSearcherTimeZone', 'AvailableInsightTypeIds',\r\n 'MultiMediaAdBidAdjustment', 'DisclaimerAdsEnabled',\r\n // 'CampaignCashback', 'KeywordVariantMatchEnabled',\r\n];\r\n\r\nconst whitelistedSchemaPropertyKeys = whitelistedSchemaPropertyKeysForModel.concat(['CampaignConversionGoal']);\r\n\r\nexport const modelToViewModelForConversionGoals = (campaignModel) => {\r\n const hasCampaignLevelGoals = campaignModel.CampaignConversionGoal && campaignModel.CampaignConversionGoal.Goals\r\n && campaignModel.CampaignConversionGoal.Goals.length > 0;\r\n return {\r\n conversionGoals: {\r\n originalConversionGoals: campaignModel.CampaignConversionGoal.Goals,\r\n goalSelection: campaignModel.CampaignConversionGoal.Goals,\r\n goalScopeSelection: hasCampaignLevelGoals ?\r\n Scopes.CAMPAIGN : Scopes.ACCOUNT,\r\n },\r\n };\r\n};\r\n\r\nexport const modelToViewModelForNewCustomerAcquisitionGoals = ({ accountSettings, campaignSettings }) => {\r\n const campaignSettingsModel = {\r\n goalId: null,\r\n bidOnlyMode: false,\r\n additionalConversionValue: null,\r\n };\r\n if (isArray(campaignSettings)) {\r\n const campaignGoal = findWhere(campaignSettings, { '@odata.type': '#Model.NewCustomerAcquisitionGoalSetting' });\r\n if (campaignGoal) {\r\n campaignSettingsModel.goalId = campaignGoal.NewCustomerAcquisitionGoalId;\r\n campaignSettingsModel.bidOnlyMode = campaignGoal.NewCustomerAcquisitionBidOnlyMode;\r\n campaignSettingsModel.additionalConversionValue = campaignGoal.AdditionalConversionValue;\r\n }\r\n }\r\n return {\r\n newCustomerAcquisitionOptOut: accountSettings === null || campaignSettingsModel.goalId === null || campaignSettingsModel.goalId === 'delete_value',\r\n newCustomerAcquisition: {\r\n campaignSettings: campaignSettingsModel,\r\n accountSettings: isEmpty(accountSettings)\r\n ? null\r\n : {\r\n goalId: accountSettings[0].Id,\r\n additionalConversionValue: accountSettings[0].AdditionalValue,\r\n audiences: accountSettings[0].Audiences,\r\n },\r\n },\r\n };\r\n};\r\n\r\nexport const modelToViewModelForCampaign = ({\r\n campaignModel,\r\n locationCriterionsModel,\r\n dayTimeCriterionsModel,\r\n campaignNegativeWebpagesModel,\r\n bundleCountries,\r\n newCustomerAcquisitionGoalsModel,\r\n}) => {\r\n let data = pick(campaignModel, [...whitelistedSchemaPropertyKeys, 'ImportProperties']);\r\n if (locationCriterionsModel) {\r\n data = extend(data, modelToViewModelForLocationTargets({\r\n model: locationCriterionsModel,\r\n bundleCountries,\r\n campaignId: campaignModel.Id,\r\n }));\r\n }\r\n\r\n if (dayTimeCriterionsModel) {\r\n data = extend(data, modelToViewModelForDayTimeTargets({\r\n model: dayTimeCriterionsModel,\r\n }));\r\n }\r\n\r\n if (campaignNegativeWebpagesModel) {\r\n data = extend(data, modelToViewModelForCampaignNegativeWebpages({\r\n model: campaignNegativeWebpagesModel,\r\n }));\r\n }\r\n\r\n if (newCustomerAcquisitionGoalsModel) {\r\n data = extend(data, modelToViewModelForNewCustomerAcquisitionGoals({\r\n accountSettings: newCustomerAcquisitionGoalsModel,\r\n campaignSettings: campaignModel.CampaignSettings,\r\n }));\r\n }\r\n\r\n if (campaignModel.CampaignSettings && campaignModel.CampaignSettings[0] && campaignModel.CampaignSettings[0]['@odata.type'] === '#Model.ShoppingSettings') {\r\n data.ProviderId = campaignModel.CampaignSettings[0].ProviderId;\r\n data.SalesCountry = campaignModel.CampaignSettings[0].SalesCountry;\r\n data.FeedLabel = campaignModel.CampaignSettings[0].FeedLabel;\r\n data.IsFeedFiltered = campaignModel.CampaignSettings[0].SalesCountry || campaignModel.CampaignSettings[0].FeedLabel;\r\n data.LocalInventoryAdsEnabled = campaignModel.CampaignSettings[0].LocalInventoryAdsEnabled;\r\n }\r\n\r\n // if (campaignModel.BiddingScheme) {\r\n // data.BiddingScheme.ManualCpc = campaignModel.BiddingScheme.ManualCPC;\r\n // }\r\n\r\n if (isArray(campaignModel.CampaignSettings)) {\r\n const perfMaxCampaignSetting = findWhere(campaignModel.CampaignSettings, { '@odata.type': '#Model.PerformanceMaxSetting' });\r\n if (perfMaxCampaignSetting) {\r\n data.finalUrlExpansionOptOut = perfMaxCampaignSetting.FinalUrlExpansionOptOut;\r\n data.autoGeneratedTextOptOut = perfMaxCampaignSetting.AutoGeneratedTextOptOut;\r\n data.autoGeneratedImageOptOut = perfMaxCampaignSetting.AutoGeneratedImageOptOut;\r\n data.costPerSaleOptOut = perfMaxCampaignSetting.CostPerSaleOptOut;\r\n }\r\n }\r\n\r\n data = extend(data, modelToViewModelForConversionGoals(campaignModel));\r\n\r\n if (campaignModel.Status === 'UserPaused') {\r\n data.Status = 'Paused'; // if we send back userpaused mt treats it as active, we explicitly need to send paused\r\n }\r\n\r\n const campaignViewModel = {\r\n data,\r\n isValid: true,\r\n isDirty: false,\r\n };\r\n return campaignViewModel;\r\n};\r\n\r\nexport const bulkModelToViewModelForConversionGoals = ({\r\n campaignModel,\r\n originalCampaignViewModel,\r\n errors = [],\r\n}) => {\r\n const conversionGoalsBulkModel = campaignModel.CampaignConversionGoalAssociations;\r\n const errorKey = 'Client Id';\r\n const originalGoalSelection =\r\n chain(conversionGoalsBulkModel)\r\n .filter(goal => !contains(pluck(errors, errorKey), goal[errorKey]))\r\n .filter(goal => goal.Action === 'Add')\r\n .map(goal => ({\r\n Id: goal.GoalId,\r\n }))\r\n .value();\r\n return {\r\n conversionGoals: {\r\n ...originalCampaignViewModel.data.conversionGoals,\r\n originalConversionGoals: originalGoalSelection,\r\n },\r\n };\r\n};\r\n\r\nconst and = (predicate1, predicate2) => item => predicate1(item) && predicate2(item);\r\nconst or = (predicate1, predicate2) => item => predicate1(item) || predicate2(item);\r\nconst not = predicate => item => !predicate(item);\r\nconst errorIs = errorCode => error => error.Error === errorCode;\r\nconst clientIdIs = clientId => error => error['Client Id'] === clientId;\r\n\r\nconst extractAndRestoreFailedBrandListAssociations = (errors, BrandListsAssociations) => {\r\n const { savedAddedBrandListIds, savedDeletedBrandListIds, filteredErrors } =\r\n reduce(BrandListsAssociations, (acc, brandListAssociation) => {\r\n const brandListAssociationClientId = clientIdIs(brandListAssociation['Client Id']);\r\n\r\n const brandListAssociationErrors = filter(acc.filteredErrors, brandListAssociationClientId);\r\n if (isEmpty(brandListAssociationErrors)) {\r\n if (brandListAssociation.Status === 'Active') {\r\n acc.savedAddedBrandListIds.push(brandListAssociation.SharedEntityId);\r\n } else if (brandListAssociation.Status === 'Deleted') {\r\n acc.savedDeletedBrandListIds.push(brandListAssociation.SharedEntityId);\r\n }\r\n } else {\r\n const campaignServiceSharedEntityAssociationDoesNotExistError = errorIs('CampaignServiceSharedEntityAssociationDoesNotExist');\r\n\r\n // Some errors are non-blocking and should be filtered out\r\n // Case #1.1: Deleting an association that doesn't exist\r\n // Case #1.2: Deleting an association where both the association and the brand list are already deleted\r\n const associationDoesNotExistError = find(brandListAssociationErrors, campaignServiceSharedEntityAssociationDoesNotExistError);\r\n if (associationDoesNotExistError) {\r\n acc.filteredErrors = acc.filteredErrors.filter(not(or(\r\n and(campaignServiceSharedEntityAssociationDoesNotExistError, brandListAssociationClientId),\r\n and(errorIs('CampaignServiceSharedListIdInvalid'), brandListAssociationClientId)\r\n )));\r\n }\r\n\r\n // Case #2: Adding an association that already exists\r\n acc.filteredErrors = acc.filteredErrors\r\n .filter(not(and(errorIs('CampaignServiceSharedEntityAssociationDuplicate'), brandListAssociationClientId)));\r\n }\r\n return acc;\r\n }, { savedAddedBrandListIds: [], savedDeletedBrandListIds: [], filteredErrors: errors });\r\n\r\n return {\r\n savedAddedBrandListIds, savedDeletedBrandListIds, filteredErrors,\r\n };\r\n};\r\n\r\nexport const bulkModelToViewModelForBrandExclusions = ({ errors = [], campaignModel }) => {\r\n const { BrandListsAssociations = [] } = campaignModel;\r\n const {\r\n savedAddedBrandListIds, savedDeletedBrandListIds, filteredErrors,\r\n } = extractAndRestoreFailedBrandListAssociations(errors, BrandListsAssociations);\r\n\r\n return {\r\n brandExclusions: {\r\n data: {\r\n savedAddedBrandListIds,\r\n savedDeletedBrandListIds,\r\n },\r\n isDirty: false,\r\n },\r\n errors: filteredErrors,\r\n };\r\n};\r\n\r\nconst bulkModelToViewModelForNewCustomerAcquisitionGoals = ({ campaignModel, originalCampaignViewModel }) => {\r\n if (!originalCampaignViewModel.data.newCustomerAcquisition) return {};\r\n return {\r\n newCustomerAcquisition: {\r\n accountSettings: originalCampaignViewModel.data.newCustomerAcquisition.accountSettings,\r\n campaignSettings: {\r\n goalId: campaignModel.NewCustomerAcquisitionGoalId,\r\n bidOnlyMode: campaignModel.NewCustomerAcquisitionBidOnlyMode,\r\n additionalConversionValue: campaignModel.AdditionalConversionValue === 'delete_value' ? null : campaignModel.AdditionalConversionValue,\r\n },\r\n },\r\n };\r\n};\r\n\r\nexport const bulkModelToViewModelForCampaign = ({\r\n campaignModel,\r\n originalCampaignViewModel,\r\n bundleCountries,\r\n errors,\r\n}) => {\r\n let data = pick(campaignModel, whitelistedSchemaPropertyKeys);\r\n if (data.Id && isString(data.Id)) {\r\n // eslint-disable-next-line no-param-reassign\r\n data.Id = parseInt(data.Id, 10);\r\n }\r\n data = extend(data, bulkModelToViewModelForLocationTargets({\r\n locationTargetsModel: campaignModel.CampaignCriterions,\r\n bundleCountries,\r\n }));\r\n data = extend(data, bulkModelToViewModelForConversionGoals({\r\n campaignModel,\r\n originalCampaignViewModel,\r\n errors,\r\n }));\r\n data = extend(data, bulkModelToViewModelForDayTimeTargets({\r\n criterions: campaignModel.CampaignCriterions,\r\n }));\r\n data = extend(data, bulkModelToViewModelForCampaignNegativeWebpages({\r\n model: campaignModel.CampaignNegativeWebpages,\r\n }));\r\n\r\n data = extend(data, bulkModelToViewModelForNewCustomerAcquisitionGoals({\r\n campaignModel,\r\n originalCampaignViewModel,\r\n }));\r\n\r\n data = extend(data, {\r\n ProviderId: originalCampaignViewModel.data.ProviderId,\r\n SalesCountry: originalCampaignViewModel.data.SalesCountry,\r\n FeedLabel: originalCampaignViewModel.data.FeedLabel,\r\n LocalInventoryAdsEnabled: originalCampaignViewModel.data.LocalInventoryAdsEnabled,\r\n finalUrlExpansionOptOut: originalCampaignViewModel.data.finalUrlExpansionOptOut,\r\n autoGeneratedImageOptOut: originalCampaignViewModel.data.autoGeneratedImageOptOut,\r\n autoGeneratedTextOptOut: originalCampaignViewModel.data.autoGeneratedTextOptOut,\r\n costPerSaleOptOut: originalCampaignViewModel.data.costPerSaleOptOut,\r\n });\r\n\r\n data = extend(data, {\r\n pageFeeds: originalCampaignViewModel.data.pageFeeds,\r\n });\r\n\r\n const campaignViewModel = {\r\n data,\r\n isValid: true,\r\n isDirty: false,\r\n };\r\n return campaignViewModel;\r\n};\r\n\r\nconst viewModelToModelForUrlCustomParameters = urlCustomParametersViewModel =>\r\n urlCustomParametersViewModel.filter(({ Key }) => Key);\r\n\r\nexport const viewModelToBulkModelForNewCustomerAcquisitionGoals = (campaignViewModel) => {\r\n const { newCustomerAcquisition, newCustomerAcquisitionOptOut } = campaignViewModel.data;\r\n if (!newCustomerAcquisition) return null;\r\n\r\n const { accountSettings, campaignSettings } = newCustomerAcquisition;\r\n\r\n if (!accountSettings) return {};\r\n\r\n return {\r\n NewCustomerAcquisitionGoalId: newCustomerAcquisitionOptOut ? 'delete_value' : accountSettings.goalId,\r\n NewCustomerAcquisitionBidOnlyMode: campaignSettings.bidOnlyMode,\r\n AdditionalConversionValue: campaignSettings.bidOnlyMode || campaignSettings.additionalConversionValue === null ? 'delete_value' : campaignSettings.additionalConversionValue,\r\n };\r\n};\r\n\r\nexport const viewModelToBulkModelForCampaign = (campaignViewModel, brandExclusionsViewModel) => {\r\n const model = pick(campaignViewModel.data, whitelistedSchemaPropertyKeysForModel);\r\n\r\n if (model.UrlCustomParameters) {\r\n // only convert if we have UrlCustomParameters.\r\n model.UrlCustomParameters = viewModelToModelForUrlCustomParameters(model.UrlCustomParameters);\r\n }\r\n\r\n if (campaignViewModel.data.ProviderId) {\r\n model.ProviderId = campaignViewModel.data.ProviderId;\r\n model.Priority = 'Low';\r\n if (campaignViewModel.data.FeedLabel) {\r\n model.FeedLabel = campaignViewModel.data.FeedLabel;\r\n } else if (campaignViewModel.data.SalesCountry) {\r\n model.SalesCountry = campaignViewModel.data.SalesCountry;\r\n }\r\n const isEditMode = campaignViewModel.data.Id && campaignViewModel.data.Id > 0;\r\n if (isEditMode) {\r\n if (!campaignViewModel.data.FeedLabel) {\r\n model.FeedLabel = 'delete_value';\r\n }\r\n if (!campaignViewModel.data.SalesCountry) {\r\n model.SalesCountry = 'delete_value';\r\n }\r\n }\r\n\r\n model.LocalInventoryAdsEnabled = campaignViewModel.data.LocalInventoryAdsEnabled;\r\n }\r\n\r\n model.AutoGeneratedImageOptOut = campaignViewModel.data.autoGeneratedImageOptOut;\r\n model.AutoGeneratedTextOptOut = campaignViewModel.data.autoGeneratedTextOptOut;\r\n model.FinalUrlExpansionOptOut = campaignViewModel.data.finalUrlExpansionOptOut;\r\n\r\n model.CostPerSaleOptOut = campaignViewModel.data.costPerSaleOptOut;\r\n\r\n if (isArray(campaignViewModel.data.pageFeeds)) {\r\n model.PageFeedIds = campaignViewModel.data.pageFeeds.map(pageFeed => pageFeed.key);\r\n }\r\n\r\n if (isArray(brandExclusionsViewModel.data.deletedBrandListIds) && !isEmpty(brandExclusionsViewModel.data.deletedBrandListIds)) {\r\n model.BrandListsAssociations = [\r\n ...model.BrandListsAssociations || [],\r\n ...brandExclusionsViewModel.data.deletedBrandListIds.map(brandListId => ({\r\n Id: brandListId, SharedEntityId: brandListId, EntityId: campaignViewModel.data.Id || CampaignNegativeReferenceId, Status: 'Deleted',\r\n })),\r\n ];\r\n }\r\n if (isArray(brandExclusionsViewModel.data.addedBrandListIds) && !isEmpty(brandExclusionsViewModel.data.addedBrandListIds)) {\r\n model.BrandListsAssociations = [\r\n ...model.BrandListsAssociations || [],\r\n ...brandExclusionsViewModel.data.addedBrandListIds.map(brandListId => ({\r\n Id: brandListId, SharedEntityId: brandListId, EntityId: campaignViewModel.data.Id || CampaignNegativeReferenceId, Status: 'Active',\r\n })),\r\n ];\r\n }\r\n\r\n if (!campaignViewModel.data.Id) {\r\n model.Id = CampaignNegativeReferenceId;\r\n }\r\n return model;\r\n};\r\n\r\nexport const viewModelToModelForCampaign = (campaignViewModel) => {\r\n const model = pick(campaignViewModel.data, whitelistedSchemaPropertyKeysForModel);\r\n if (campaignViewModel.data.ProviderId) {\r\n model.CampaignSettings = {\r\n ProviderId: campaignViewModel.data.ProviderId,\r\n LocalInventoryAdsEnabled: campaignViewModel.data.LocalInventoryAdsEnabled,\r\n SalesCountry: campaignViewModel.data.SalesCountry,\r\n FeedLabel: campaignViewModel.data.FeedLabel,\r\n };\r\n }\r\n return model;\r\n};\r\n\r\nexport const viewModelToBulkModelForConversionGoals = (campaignViewModel, campaignId) => {\r\n const { conversionGoals } = campaignViewModel.data;\r\n return convertToMTFormat(\r\n campaignId,\r\n conversionGoals.goalScopeSelection,\r\n conversionGoals.originalConversionGoals,\r\n conversionGoals.goalSelection,\r\n true\r\n );\r\n};\r\n\r\nexport const loadCampaign = (cid, aid, campaignId) =>\r\n readCampaign(cid, aid, campaignId);\r\n\r\nexport const loadCampaignAsViewModel = (cid, aid, campaignId) =>\r\n loadCampaign(cid, aid, campaignId)\r\n .then(campaignModel => modelToViewModelForCampaign({\r\n campaignModel,\r\n }));\r\n","import { getPromotionDataFormatConfig } from '@bingads-webui-campaign/promotion-extension';\r\nimport { convertCurrencyCode } from '@bingads-webui-campaign-legacy/adextension-price';\r\nimport { UAPAdExtensionType as EAdExtensionType } from '@bingads-webui-campaign-react/unified-ad-preview-library-cmui';\r\nimport { readExtensionAssociations } from '@bingads-webui-campaign-react/perf-max-data';\r\n\r\nimport { SupportedExtensionPreviewTypes } from '../common/constants';\r\n\r\n\r\nexport const promotionFormatter = (i18n, promotion) => {\r\n const {\r\n OccasionI18nKeys,\r\n ItemPreviewI18nKeys,\r\n getPromotionTypeForModel,\r\n getPromotionDetailTypeForModel,\r\n Occasion,\r\n PromotionItem,\r\n } = getPromotionDataFormatConfig(promotion);\r\n\r\n const promotionType = getPromotionTypeForModel(promotion);\r\n let promotionTypeI18nKey;\r\n let promotionTypeI18nData;\r\n switch (promotionType) {\r\n case 'UptoMonetaryDiscount':\r\n promotionTypeI18nKey = ItemPreviewI18nKeys['Up to {{monetaryDiscount}} off'];\r\n promotionTypeI18nData = { monetaryDiscount: i18n.formatCurrency(promotion.MoneyAmountOff, promotion.CurrencyCode) };\r\n break;\r\n case 'MonetaryDiscount':\r\n promotionTypeI18nKey = ItemPreviewI18nKeys['{{monetaryDiscount}} off'];\r\n promotionTypeI18nData = { monetaryDiscount: i18n.formatCurrency(promotion.MoneyAmountOff, promotion.CurrencyCode) };\r\n break;\r\n case 'UptoPercentDiscount':\r\n promotionTypeI18nKey = ItemPreviewI18nKeys['Up to {{percentDiscount}} off'];\r\n promotionTypeI18nData = { percentDiscount: i18n.formatPercent(promotion.PercentOff / 100) };\r\n break;\r\n case 'PercentDiscount':\r\n promotionTypeI18nKey = ItemPreviewI18nKeys['{{percentDiscount}} off'];\r\n promotionTypeI18nData = { percentDiscount: i18n.formatPercent(promotion.PercentOff / 100) };\r\n break;\r\n default:\r\n promotionTypeI18nKey = '';\r\n promotionTypeI18nData = {};\r\n }\r\n const promotionTypeFormatted = i18n.getString(promotionTypeI18nKey, promotionTypeI18nData);\r\n\r\n const promotionDetail = getPromotionDetailTypeForModel(promotion);\r\n let promotionDetailI18nKey = '';\r\n let promotionDetailI18nData;\r\n let promotionDetailFormatted = '';\r\n const hasPromotionDetail = promotionDetail !== 'None';\r\n if (hasPromotionDetail) {\r\n switch (promotionDetail) {\r\n case 'OnOrdersOver':\r\n promotionDetailI18nKey = ItemPreviewI18nKeys['On orders over {{amount}}'];\r\n promotionDetailI18nData = { amount: i18n.formatCurrency(promotion.OrdersOverAmount, promotion.CurrencyCode) };\r\n break;\r\n case 'PromotionCode':\r\n promotionDetailI18nKey = ItemPreviewI18nKeys['Code {{promotionCode}}'];\r\n promotionDetailI18nData = { promotionCode: promotion.PromotionCode };\r\n break;\r\n default:\r\n promotionDetailI18nKey = '';\r\n promotionDetailI18nData = {};\r\n }\r\n promotionDetailFormatted = i18n.getString(promotionDetailI18nKey, promotionDetailI18nData);\r\n }\r\n\r\n let dateRangeI18nKey = '';\r\n let dateRangeI18nData;\r\n let startDateFormatted = '';\r\n let endDateFormatted = '';\r\n function formatISODateString(isoDatetimeString) {\r\n const dateToUse = i18n.parseDate(\r\n isoDatetimeString.substring(0, 10),\r\n {\r\n raw: 'yyyy-MM-dd',\r\n timeZone: null,\r\n }\r\n );\r\n\r\n return i18n.formatDate(dateToUse, { skeleton: 'MMMd', timeZone: null });\r\n }\r\n\r\n let dateRangeFormatted = '';\r\n const hasDateRange = promotion.PromotionStartDate || promotion.PromotionEndDate;\r\n if (hasDateRange) {\r\n if (promotion.PromotionStartDate) {\r\n startDateFormatted = formatISODateString(promotion.PromotionStartDate);\r\n }\r\n if (promotion.PromotionEndDate) {\r\n endDateFormatted = formatISODateString(promotion.PromotionEndDate);\r\n }\r\n if (startDateFormatted && endDateFormatted) {\r\n if (startDateFormatted !== endDateFormatted) {\r\n dateRangeI18nKey = ItemPreviewI18nKeys['Valid {{startDate}} - {{endDate}}'];\r\n dateRangeI18nData = { startDate: startDateFormatted, endDate: endDateFormatted };\r\n } else {\r\n dateRangeI18nKey = ItemPreviewI18nKeys['Valid {{date}}'];\r\n dateRangeI18nData = { date: startDateFormatted };\r\n }\r\n } else if (startDateFormatted) {\r\n dateRangeI18nKey = ItemPreviewI18nKeys['Starts {{startDate}}'];\r\n dateRangeI18nData = { startDate: startDateFormatted };\r\n } else if (endDateFormatted) {\r\n dateRangeI18nKey = ItemPreviewI18nKeys['Ends {{endDate}}'];\r\n dateRangeI18nData = { endDate: endDateFormatted };\r\n }\r\n dateRangeFormatted = i18n.getString(dateRangeI18nKey, dateRangeI18nData);\r\n }\r\n\r\n return {\r\n Occasion: i18n.getString(OccasionI18nKeys[Occasion] || Occasion),\r\n PromotionType: promotionTypeFormatted,\r\n PromotionDetail: promotionDetailFormatted,\r\n PromotionItem,\r\n DateRange: dateRangeFormatted,\r\n hasOccasion: Occasion !== 'None',\r\n hasPromotionDetail,\r\n hasDateRange,\r\n };\r\n};\r\n\r\nconst priceExtensionFormatter = price => ({\r\n ...price,\r\n Currency: convertCurrencyCode(price.CurrencyCode),\r\n});\r\n\r\nexport const getExtensionFormatters = i18n => ({\r\n [EAdExtensionType.Promotion]: promotion => promotionFormatter(i18n, promotion),\r\n [EAdExtensionType.Price]: price => priceExtensionFormatter(price),\r\n});\r\n\r\nconst getExtensionsFromResponse = (response) => {\r\n const { value } = response;\r\n return value.map(({ AdExtension }) => ({\r\n ...AdExtension,\r\n }));\r\n};\r\n\r\nexport const loadAdExtensionData = (cid, aid, campaignId) => {\r\n const payload = {\r\n gridDataParameters: {\r\n DateRange: {\r\n // Just want to get extension data and don't care BI data, so pass dummy date ranges.\r\n StartDate: '2024-05-05',\r\n EndDate: '2024-05-05',\r\n },\r\n },\r\n associationType: 'Campaign',\r\n };\r\n\r\n return Promise.all([\r\n readExtensionAssociations(cid, aid, campaignId, { ...payload, adExtensionTypes: [SupportedExtensionPreviewTypes.Sitelink] }, 4),\r\n readExtensionAssociations(cid, aid, campaignId, { ...payload, adExtensionTypes: [SupportedExtensionPreviewTypes.Callout] }, 4),\r\n readExtensionAssociations(cid, aid, campaignId, { ...payload, adExtensionTypes: [SupportedExtensionPreviewTypes.Promotion] }, 1),\r\n readExtensionAssociations(cid, aid, campaignId, { ...payload, adExtensionTypes: [SupportedExtensionPreviewTypes.StructuredSnippet] }, 1),\r\n readExtensionAssociations(cid, aid, campaignId, { ...payload, adExtensionTypes: [SupportedExtensionPreviewTypes.Price] }, 8),\r\n ]).then(([sitelinkExtensions, calloutExtensions, promotionExtensions, structuredSnippetExtensions, priceExtensions]) => ({\r\n SiteLink: getExtensionsFromResponse(sitelinkExtensions),\r\n Callout: getExtensionsFromResponse(calloutExtensions),\r\n Promotion: getExtensionsFromResponse(promotionExtensions),\r\n StructuredSnippet: getExtensionsFromResponse(structuredSnippetExtensions),\r\n Price: getExtensionsFromResponse(priceExtensions),\r\n }));\r\n};\r\n","import { isEmpty, result, noop } from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport { assign } from 'xstate';\r\nimport { log } from '@bingads-webui-campaign-react/step-wizard-machine';\r\nimport { logRecommendations } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { logCopilotRecommendations } from '@bingads-webui-campaign-react/copilot-common';\r\nimport { getErrorsPlaceholders, loadAssetGroup, saveAssetGroupAndLinkedData, viewModelToModelForAssetGroup } from '../../model/asset-group';\r\nimport { loadCampaign, modelToViewModelForCampaign, viewModelToModelForCampaign } from '../../model/campaign';\r\nimport { loadAdExtensionData } from '../../model/ad-extension';\r\nimport { ScenarioName } from '../../common/constants';\r\n\r\nconst hasCampaignData = context =>\r\n Boolean(result(context, ['stepsData', 'campaign', 'Id']));\r\n\r\nconst getCampaignId = context =>\r\n result(context, ['stepsData', 'campaign', 'Id']) || // when coming from the Campaign settings step\r\n // result(context, ['data', 'campaign', 'data', 'Id']) || // when in the Asset group creation and settings flows and already loaded and cached the campaign's data\r\n result(context, ['stepsData', 'campaignId']); // when in the Asset group creation and settings flows\r\n\r\nconst getAssetGroupId = context =>\r\n result(context, ['data', 'assetGroup', 'data', 'Id']) || // when in the Campaign creation flow\r\n result(context, ['stepsData', 'assetGroup', 'Id']) || // when in the Asset group creation or settings flows\r\n result(context, ['stepsData', 'assetGroupId']); // when in the Asset group settings flows\r\n\r\n// FIXME: [User Story 4721721: PMax wizard perceived performance optimizations](https://msasg.visualstudio.com/Bing_Ads/_workitems/edit/4721721)\r\n// Always reloads the asset group. Optimization can be done at the EDM level\r\nexport const needsLoading = (/* context */) => true;\r\n\r\n/**\r\n * Loads step data asynchronously. The returned promise must resolve\r\n * into a single object, opaque to the step, which will be saved\r\n * in the context under the `data` property.\r\n *\r\n * The function is called when the wizard enters the step.\r\n * The step will be blocked until the promise resolves.\r\n * @param {Object} context - the current context\r\n * @returns {Promise} a promise that must resolve\r\n * into a single object, opaque to the step, which will be saved\r\n * in the context under the `data` property.\r\n */\r\nexport const loadData = (context) => {\r\n const {\r\n cid, aid, permissions, scenarioName,\r\n } = context.stepsData;\r\n const campaignId = getCampaignId(context);\r\n if (!campaignId) {\r\n throw new Error('Asset group settings/creation page requires a campaign ID');\r\n }\r\n const assetGroupId = getAssetGroupId(context);\r\n if (context.stepsData.isEditing && !assetGroupId) {\r\n throw new Error('Asset group settings page requires an asset group ID');\r\n }\r\n const {\r\n PmaxExtensionPreview,\r\n PMaxNewAspectRatios: isPMaxNewAspectRatiosEnabled,\r\n PMaxExcludeNewAspectRatios: isPMaxNewAspectRatiosExcluded,\r\n } = permissions.dynamic;\r\n const isLoadExtensionFromAPI = PmaxExtensionPreview && (scenarioName === ScenarioName.PerformanceMaxAssetGroupCreation || scenarioName === ScenarioName.PerformanceMaxAssetGroupSettings);\r\n\r\n const isSearchThemeEnabled = permissions && permissions.dynamic && permissions.dynamic.SearchThemes;\r\n const isUrlRulesEnabled = permissions && permissions.dynamic && permissions.dynamic.AssetGroupUrlRules;\r\n const isUrlRulesV2Enabled = permissions && permissions.dynamic && permissions.dynamic.AssetGroupUrlRulesV2;\r\n const isPMaxNewAspectRatios = isPMaxNewAspectRatiosEnabled && !isPMaxNewAspectRatiosExcluded;\r\n\r\n if (isPMaxNewAspectRatios) {\r\n log('[AssetGroupSetting] - New Aspect Ratios is enabled');\r\n }\r\n\r\n const loadPromises = {\r\n ...assetGroupId ? { assetGroup: loadAssetGroup(cid, aid, campaignId, assetGroupId, context.stepsData.i18n, isSearchThemeEnabled, isUrlRulesEnabled, isUrlRulesV2Enabled) } : {},\r\n // Full campaign entity is needed and will be loaded, if it's not loaded yet\r\n // and will be used not from `data` but from `stepsData` to simplify the \"get-campaign-data\" logic\r\n ...hasCampaignData(context) ? {} : {\r\n campaign: loadCampaign(cid, aid, campaignId)\r\n .then(campaignModel => modelToViewModelForCampaign({ campaignModel })),\r\n },\r\n ...isLoadExtensionFromAPI ? { extensionsAssociations: loadAdExtensionData(cid, aid, campaignId) } : {},\r\n };\r\n\r\n return Promise.props(loadPromises).then((data) => {\r\n log('Asset step data loaded, data=_', data);\r\n return {\r\n assetGroup: context.data.assetGroup,\r\n originalAssetGroup: { ...context.data.assetGroup, ...data.assetGroup },\r\n extensionsAssociations: context.data.extensionsAssociations,\r\n recommendationContext: context.data.recommendationContext,\r\n ...getErrorsPlaceholders(),\r\n ...data,\r\n };\r\n });\r\n};\r\n\r\nconst logRecommendationsFromContext = (context, assetGroup, originalAssetGroup) => {\r\n const {\r\n isEditing, aid, uid, campaign: { Id: campaignId },\r\n } = context.stepsData;\r\n const { activity, recommendationContext } = context.data;\r\n logRecommendations({\r\n recommendationContext,\r\n activity,\r\n aid,\r\n uid,\r\n campaignId,\r\n isEditing,\r\n assetGroup,\r\n originalAssetGroup,\r\n });\r\n\r\n logCopilotRecommendations({\r\n recommendationContext,\r\n assetGroup,\r\n isEditing,\r\n });\r\n};\r\n\r\nexport const saveData = (context) => {\r\n const assetGroupChanges = {\r\n assetGroup: context.data.assetGroup,\r\n originalAssetGroup: context.data.originalAssetGroup,\r\n campaign: context.stepsData.campaign,\r\n };\r\n\r\n const saveContext = {\r\n scenario: context.stepsData.scenarioName,\r\n activity: context.data.activity || { trace: noop },\r\n activityLogger: context.stepsData.scenario.createActivity('saveAssetGroupAndLinkedData'),\r\n i18n: context.stepsData.i18n,\r\n serverContext: context.stepsData.serverContext,\r\n cid: context.stepsData.cid,\r\n aid: context.stepsData.aid,\r\n };\r\n\r\n const { permissions } = context.stepsData;\r\n const {\r\n PMaxNewAspectRatios: isPMaxNewAspectRatiosEnabled,\r\n PMaxExcludeNewAspectRatios: isPMaxNewAspectRatiosExcluded,\r\n } = permissions.dynamic;\r\n const isPMaxNewAspectRatios = isPMaxNewAspectRatiosEnabled && !isPMaxNewAspectRatiosExcluded;\r\n\r\n if (isPMaxNewAspectRatios) {\r\n saveContext.activity.trace('[AssetGroupSetting] - New Aspect Ratios is enabled');\r\n }\r\n\r\n return saveAssetGroupAndLinkedData(assetGroupChanges, saveContext)\r\n .then((data) => {\r\n saveContext.activity.trace(`[PmaxWizard] saveData succeeded. StepId: ${context.id}`);\r\n logRecommendationsFromContext(context, viewModelToModelForAssetGroup(data.assetGroup), context.data.originalAssetGroup ? viewModelToModelForAssetGroup(context.data.originalAssetGroup) : {});\r\n return data;\r\n }).then(data => ({\r\n ...data,\r\n extensionsAssociations: context.data.extensionsAssociations,\r\n recommendationContext: context.data.recommendationContext,\r\n })).catch((errorData) => {\r\n saveContext.activity.trace(`[PmaxWizard] saveData failed. StepId: ${context.id}`);\r\n\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n ...errorData,\r\n extensionsAssociations: context.data.extensionsAssociations,\r\n recommendationContext: context.data.recommendationContext,\r\n });\r\n });\r\n};\r\n\r\nexport const clearErrors = assign({\r\n data: context => ({\r\n ...context.data,\r\n ...getErrorsPlaceholders(),\r\n }),\r\n});\r\n\r\nexport const isValid = context => context.data.assetGroup.isValid;\r\nexport const isDirty = context => context.data.assetGroup.isDirty;\r\nconst hasServerErrors = context => !isEmpty(context.data.serverErrors) || !isEmpty(context.data.systemErrors);\r\nexport const needsSaving = context => isDirty(context) || hasServerErrors(context);\r\n\r\nexport const patchStepsData = assign({\r\n stepsData: (context/* , event */) => ({\r\n ...context.stepsData,\r\n assetGroup: viewModelToModelForAssetGroup(context.data.assetGroup),\r\n // Full campaign entity is needed and will be loaded, if it's not loaded yet\r\n // and will be used not from `data` but from `stepsData` to simplify the \"get-campaign-data\" logic\r\n ...hasCampaignData(context) ? {} :\r\n { campaign: viewModelToModelForCampaign(context.data.campaign) },\r\n }),\r\n});\r\n","import { isEmpty, isEqual } from 'underscore';\r\nimport { RemainingCharsValidatedTextField } from '@bingads-webui-campaign-react/remaining-chars-hint';\r\n\r\nexport const serverErrorsCompare = (prev, curr) => !(!isEmpty(curr) && !isEqual(prev, curr));\r\n\r\nexport const ServerValidatedRemainingCharsValidatedTextField = RemainingCharsValidatedTextField;\r\n","import { useContext, useCallback, useMemo, useState, useEffect } from 'react';\r\nimport { useSelector } from '@xstate/react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { buildLegacyI18n } from '@bingads-webui/build-legacy-i18n';\r\nimport { ValidationStringMap } from '@bingads-webui/validation-string-map';\r\nimport {\r\n isCanceling as isStateMachineCanceling,\r\n StepEvents,\r\n isSaving as isStateMachineSaving,\r\n} from '@bingads-webui-campaign-react/step-wizard-machine';\r\nimport { legacyI18nOfListingGroup } from '@bingads-webui-campaign-react/listing-groups-page';\r\nimport { useExitWithoutSavingConfirmation } from '@bingads-webui-campaign-react/step-wizard';\r\nimport { useImpulse, useIsMounted, usePrevProp } from '@bingads-webui-campaign-react/step-wizard-controls';\r\nimport { RecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { needsSaving } from './step-campaign-asset-group-impl';\r\nimport { ScenarioName } from '../../common/constants';\r\nimport { serverErrorsCompare } from '../shared';\r\n\r\nconst hideStepHeaderSelector = state => state.context.stepInfo.hideStepHeader;\r\nconst scenarioNameSelector = state => state.context.stepsData.scenarioName;\r\nconst permissionsSelector = state => state.context.stepsData.permissions;\r\nconst doesNeedSavingSelector = state => !isStateMachineCanceling(state) && needsSaving(state.context);\r\nconst currentLocaleSelector = state => state.context.stepsData.serverContext.CurrentLocale;\r\nconst campaignObjectiveSelector = state => state.context.stepsData.campaignObjective;\r\nconst campaignIdSelector = state => state.context.stepsData.campaign.Id;\r\nconst campaignNameSelector = state => state.context.stepsData.campaign.Name;\r\nconst campaignTimeZoneSelector = state => state.context.stepsData.campaign.TimeZone;\r\nconst campaignSettingsSelector = state => state.context.stepsData.campaign.CampaignSettings;\r\nconst assetGroupSelector = state => state.context.data.assetGroup;\r\nconst headlinesSelector = state => state.context.data.assetGroup.data.Headlines;\r\nconst longHeadlinesSelector = state => state.context.data.assetGroup.data.LongHeadlines;\r\nconst descriptionsSelector = state => state.context.data.assetGroup.data.Descriptions;\r\nconst path1Selector = state => state.context.data.assetGroup.data.Path1;\r\nconst path2Selector = state => state.context.data.assetGroup.data.Path2;\r\nconst finalMobileUrlsSelector = state => state.context.data.assetGroup.data.MobileFinalUrls;\r\nconst imagesSelector = state => state.context.data.assetGroup.data.Images;\r\nconst businessNameSelector = state => state.context.data.assetGroup.data.BusinessName;\r\nconst finalUrlsSelector = state => state.context.data.assetGroup.data.FinalUrls;\r\nconst finalUrlForRecommendationSelector = state => state.context.data.assetGroup.data.FinalUrlForRecommendation;\r\nconst adExtensionsDynamicFeaturesSelector = state => state.context.stepsData.adExtensionsDynamicFeatures;\r\nconst adExtensionsAssociationsFactorySelector = state => state.context.stepsData.adExtensionsAssociationsFactory;\r\nconst extensionsAssociationsSelector = state => state.context.data.extensionsAssociations;\r\nconst assetGroupURLRulesSelector = state => state.context.data.assetGroup.data.AssetGroupUrlTargets;\r\nconst assetGroupURLRulesOptionSelector = state => state.context.data.assetGroup.data.UrlRulesOption;\r\nconst audienceGroupSelector = state => state.context.data.assetGroup.data.AudienceGroup;\r\nconst originalAudienceGroupSelector = state => state.context.data.originalAssetGroup.data.AudienceGroup;\r\nconst listingGroupSelector = state => state.context.data.assetGroup.data.listingGroup;\r\nconst productFilterSelector = state => state.context.data.assetGroup.data.productFilter;\r\nconst searchThemesSelector = state => state.context.data.assetGroup.data.AssetGroupSearchThemes;\r\nconst aidSelector = state => state.context.stepsData.aid;\r\nconst cidSelector = state => state.context.stepsData.cid;\r\nconst serverErrorsSelector = state => state.context.data.serverErrors;\r\nconst systemErrorsSelector = state => state.context.data.systemErrors;\r\nconst invalidSaveAttemptSelector = state => state.context.invalidSaveAttempt;\r\nconst isEditingSelector = state => state.context.stepsData.isEditing;\r\nconst isSavingSelector = state => isStateMachineSaving(state);\r\nconst isCancelingSelector = state => isStateMachineCanceling(state);\r\n\r\nexport const useStepAssetGroupState = (stepService, activity) => {\r\n const isMounted = useIsMounted();\r\n const i18n = useContext(I18nContext);\r\n const legacyI18n = useMemo(() => buildLegacyI18n(i18n, [ValidationStringMap, legacyI18nOfListingGroup]), [i18n]);\r\n\r\n const hideStepHeader = useSelector(stepService, hideStepHeaderSelector);\r\n const scenarioName = useSelector(stepService, scenarioNameSelector);\r\n const locale = useSelector(stepService, currentLocaleSelector);\r\n const assetGroup = useSelector(stepService, assetGroupSelector);\r\n const finalUrls = useSelector(stepService, finalUrlsSelector);\r\n const finalUrlForRecommendation = useSelector(stepService, finalUrlForRecommendationSelector);\r\n const headlines = useSelector(stepService, headlinesSelector);\r\n const longHeadlines = useSelector(stepService, longHeadlinesSelector);\r\n const descriptions = useSelector(stepService, descriptionsSelector);\r\n const campaignId = useSelector(stepService, campaignIdSelector);\r\n const campaignName = useSelector(stepService, campaignNameSelector);\r\n const campaignTimeZone = useSelector(stepService, campaignTimeZoneSelector);\r\n const campaignObjective = useSelector(stepService, campaignObjectiveSelector);\r\n const campaignSettings = useSelector(stepService, campaignSettingsSelector);\r\n const permissions = useSelector(stepService, permissionsSelector);\r\n const adExtensionsDynamicFeatures = useSelector(stepService, adExtensionsDynamicFeaturesSelector);\r\n const adExtensionsAssociationsFactory = useSelector(stepService, adExtensionsAssociationsFactorySelector);\r\n const extensionsAssociations = useSelector(stepService, extensionsAssociationsSelector);\r\n const urlPath1 = useSelector(stepService, path1Selector);\r\n const urlPath2 = useSelector(stepService, path2Selector);\r\n const finalMobileUrls = useSelector(stepService, finalMobileUrlsSelector);\r\n const urlRules = useSelector(stepService, assetGroupURLRulesSelector);\r\n const urlRulesOption = useSelector(stepService, assetGroupURLRulesOptionSelector);\r\n const images = useSelector(stepService, imagesSelector);\r\n const businessName = useSelector(stepService, businessNameSelector);\r\n const audienceGroup = useSelector(stepService, audienceGroupSelector);\r\n const originalAudienceGroup = useSelector(stepService, originalAudienceGroupSelector);\r\n const listingGroup = useSelector(stepService, listingGroupSelector);\r\n const searchThemes = useSelector(stepService, searchThemesSelector);\r\n const productFilter = useSelector(stepService, productFilterSelector);\r\n const aid = useSelector(stepService, aidSelector);\r\n const cid = useSelector(stepService, cidSelector);\r\n const serverErrors = useSelector(stepService, serverErrorsSelector);\r\n const systemErrors = useSelector(stepService, systemErrorsSelector);\r\n const invalidSaveAttempt = useSelector(stepService, invalidSaveAttemptSelector);\r\n const isEditing = useSelector(stepService, isEditingSelector);\r\n const isSaving = useSelector(stepService, isSavingSelector);\r\n const isCanceling = useSelector(stepService, isCancelingSelector);\r\n\r\n const doesNeedSaving = useSelector(stepService, doesNeedSavingSelector);\r\n\r\n const { suggestedObjectiveExtensions = [], otherObjectiveExtensions = [] } = useMemo(\r\n () => (scenarioName === ScenarioName.PerformanceMaxCampaignCreation ?\r\n adExtensionsAssociationsFactory.getObjectiveExtensions(\r\n permissions,\r\n { campaignType: 'PerformanceMax', campaignObjective }\r\n ) : {}),\r\n [scenarioName, permissions, campaignObjective, adExtensionsAssociationsFactory]\r\n );\r\n\r\n const [navigationConfirmationPrompt] = useExitWithoutSavingConfirmation(doesNeedSaving, stepService, i18n);\r\n\r\n const onAssetGroupValidation = useCallback((results) => {\r\n if (!isMounted.current) return;\r\n const { data: newAssetGroupData, ...restResults } = results;\r\n const dataPatch = {\r\n assetGroup: {\r\n ...assetGroup,\r\n data: {\r\n ...assetGroup.data,\r\n ...newAssetGroupData,\r\n },\r\n ...restResults,\r\n },\r\n activity,\r\n };\r\n stepService.send({ type: StepEvents.UPDATE_VALIDATION, data: dataPatch });\r\n }, [isMounted, assetGroup, activity, stepService]);\r\n\r\n const onUpdateExtensionsAssociations = useCallback((extensionType, associations) => {\r\n if (!isMounted.current) return;\r\n const dataPatch = {\r\n extensionsAssociations: {\r\n ...extensionsAssociations,\r\n [extensionType]: associations,\r\n },\r\n };\r\n stepService.send({ type: StepEvents.UPDATE_VALIDATION, data: dataPatch });\r\n }, [stepService, extensionsAssociations, isMounted]);\r\n\r\n // Connecting UI layer's RecommendationContext to the step's state\r\n const onUpdateRecommendationsContext = useCallback((recommendationContext) => {\r\n if (!isMounted.current) return;\r\n const dataPatch = {\r\n recommendationContext,\r\n };\r\n stepService.send({ type: StepEvents.UPDATE_VALIDATION, data: dataPatch });\r\n }, [stepService, isMounted]);\r\n const [recommendationContext] = useContext(RecommendationContext);\r\n useEffect(() => {\r\n onUpdateRecommendationsContext(recommendationContext);\r\n }, [recommendationContext, onUpdateRecommendationsContext]);\r\n\r\n const onUpdateFinalUrls = useCallback((newFinalUrls) => {\r\n if (!isMounted.current) return;\r\n const dataPatch = {\r\n assetGroup: {\r\n ...assetGroup,\r\n data: {\r\n ...assetGroup.data,\r\n FinalUrls: newFinalUrls,\r\n },\r\n },\r\n };\r\n stepService.send({ type: StepEvents.UPDATE_VALIDATION, data: dataPatch });\r\n }, [stepService, assetGroup, isMounted]);\r\n\r\n const onUpdateSearchThemes = useCallback((newSearchThemes) => {\r\n if (!isMounted.current) return;\r\n const dataPatch = {\r\n assetGroup: {\r\n ...assetGroup,\r\n data: {\r\n ...assetGroup.data,\r\n AssetGroupSearchThemes: newSearchThemes,\r\n },\r\n },\r\n };\r\n stepService.send({ type: StepEvents.UPDATE_VALIDATION, data: dataPatch });\r\n }, [stepService, assetGroup, isMounted]);\r\n\r\n const onUpdateImageList = useCallback((imageList) => {\r\n if (!isMounted.current) return;\r\n const dataPatch = {\r\n assetGroup: {\r\n ...assetGroup,\r\n data: {\r\n ...assetGroup.data,\r\n Images: {\r\n ...assetGroup.data.Images,\r\n ImageList: imageList,\r\n ImageAssets: null,\r\n },\r\n },\r\n },\r\n };\r\n stepService.send({ type: StepEvents.UPDATE_VALIDATION, data: dataPatch });\r\n }, [stepService, assetGroup, isMounted]);\r\n\r\n const onClearAssets = useCallback(() => {\r\n if (!isMounted.current) return;\r\n const dataPatch = {\r\n assetGroup: {\r\n ...assetGroup,\r\n data: {\r\n ...assetGroup.data,\r\n Images: {\r\n ...assetGroup.data.Images,\r\n ImageList: [],\r\n ImageAssets: null,\r\n },\r\n Headlines: {\r\n Headline0: '',\r\n Headline1: '',\r\n Headline2: '',\r\n },\r\n LongHeadlines: {\r\n LongHeadline0: '',\r\n },\r\n Descriptions: {\r\n Description0: '',\r\n Description1: '',\r\n },\r\n },\r\n },\r\n };\r\n stepService.send({ type: StepEvents.UPDATE_VALIDATION, data: dataPatch });\r\n }, [stepService, assetGroup, isMounted]);\r\n\r\n // eslint-disable-next-line no-bitwise\r\n const [, hasInvalidSaveAttemptChanged] = usePrevProp(invalidSaveAttempt | 0);\r\n const [, hasServerErrorsChanged] = usePrevProp(serverErrors, serverErrorsCompare);\r\n const areBeaconsActive = useImpulse(hasInvalidSaveAttemptChanged || hasServerErrorsChanged);\r\n\r\n const [showAllValidationErrors, setShowAllValidationErrors] = useState(false);\r\n if (hasInvalidSaveAttemptChanged) {\r\n setShowAllValidationErrors(true);\r\n }\r\n\r\n const state = {\r\n isMounted,\r\n scenarioName,\r\n i18n,\r\n legacyI18n,\r\n locale,\r\n hideStepHeader,\r\n assetGroup,\r\n navigationConfirmationPrompt,\r\n campaignId,\r\n campaignName,\r\n campaignTimeZone,\r\n campaignObjective,\r\n campaignSettings,\r\n finalUrls,\r\n finalUrlForRecommendation,\r\n headlines,\r\n longHeadlines,\r\n descriptions,\r\n suggestedObjectiveExtensions,\r\n otherObjectiveExtensions,\r\n adExtensionsDynamicFeatures,\r\n adExtensionsAssociationsFactory,\r\n extensionsAssociations,\r\n urlPath1,\r\n urlPath2,\r\n finalMobileUrls,\r\n urlRules,\r\n urlRulesOption,\r\n images,\r\n businessName,\r\n audienceGroup,\r\n originalAudienceGroup,\r\n listingGroup,\r\n productFilter,\r\n searchThemes,\r\n aid,\r\n cid,\r\n permissions,\r\n showAllValidationErrors,\r\n areBeaconsActive,\r\n serverErrors,\r\n systemErrors,\r\n isEditing,\r\n isSaving,\r\n isCanceling,\r\n };\r\n const api = {\r\n onAssetGroupValidation,\r\n onUpdateExtensionsAssociations,\r\n onUpdateFinalUrls,\r\n onUpdateImageList,\r\n onClearAssets,\r\n onUpdateSearchThemes,\r\n };\r\n\r\n return [state, api];\r\n};\r\n","const assetGroupControlsContainer = {\r\n width: '660px',\r\n marginRight: '40px',\r\n};\r\n\r\nexport const getAssetGroupStepStyles = (components, theme) => ({\r\n collapsiblePanel: {\r\n border: 'none',\r\n marginBottom: 'unset',\r\n backgroundColor: 'unset',\r\n\r\n '& .panel-heading': {\r\n padding: 0,\r\n borderBottom: 'none',\r\n marginBottom: 18,\r\n\r\n '& .panel-title': {\r\n fontSize: 18,\r\n '& > a': {\r\n marginLeft: '-8px', // compensate 8px padding on the left of icon\r\n color: theme.palette.themePrimary,\r\n padding: 0,\r\n '&:hover, &:active': {\r\n color: theme.palette.themeDarker,\r\n textDecoration: 'none',\r\n backgroundColor: 'unset',\r\n },\r\n },\r\n\r\n '& > a:after': {\r\n transform: 'rotate(180deg)',\r\n },\r\n\r\n '& > a.collapsed:after': {\r\n transform: 'rotate(90deg)',\r\n },\r\n },\r\n },\r\n\r\n '& .panel-collapse': {\r\n '& .panel-body': {\r\n padding: 0,\r\n overflow: 'hidden',\r\n },\r\n },\r\n },\r\n\r\n h3LabelOptional: {\r\n fontSize: 14,\r\n color: theme.palette.neutralSecondary,\r\n },\r\n\r\n audienceSignalDescription: {\r\n display: 'grid',\r\n gridTemplateColumns: 'auto 1fr',\r\n columnGap: 12,\r\n fontSize: 14,\r\n\r\n '& > img': {\r\n gridRow: '1 / 3',\r\n },\r\n\r\n '& .audience-signal-main-description': {\r\n fontWeight: 600,\r\n },\r\n\r\n '& .audience-signal-sub-description': {\r\n color: theme.palette.neutralSecondary,\r\n },\r\n },\r\n\r\n assetGroupSettingsContentContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n\r\n '& .page-title': {\r\n marginBottom: '16px',\r\n },\r\n\r\n '& .page-description': {\r\n marginBottom: '32px',\r\n },\r\n\r\n '& .section-title': {\r\n marginTop: '28px',\r\n marginBottom: '8px',\r\n },\r\n\r\n '& .section-description': {\r\n marginBottom: '16px',\r\n },\r\n\r\n '& .asset-group-controls-container': {\r\n ...assetGroupControlsContainer,\r\n },\r\n\r\n '& .asset-group-controls-with-preview-container':\r\n {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n alignItems: 'flex-start',\r\n\r\n '& .controls-affecting-preview-container': {\r\n ...assetGroupControlsContainer,\r\n },\r\n\r\n '& .asset-group-preview-container': {\r\n marginTop: '41px',\r\n position: 'sticky',\r\n top: '0px',\r\n },\r\n },\r\n },\r\n audienceWizard: {\r\n marginTop: 24,\r\n },\r\n});\r\n\r\n","import _ from 'underscore';\r\n\r\nconst textAssetFields = ['Headlines', 'LongHeadlines', 'Descriptions'];\r\n\r\n/**\r\n * Checks if an asset group has at least 1 image or text asset.\r\n * @param {Object} data - Asset group data.\r\n * @returns {boolean} - True if asset group has at least 1 asset, false otherwise.\r\n */\r\nexport function hasAssetsInAssetGroup(data) {\r\n const ImageList = _.get(data, ['Images', 'ImageList']);\r\n if (!_.isEmpty(ImageList)) {\r\n // asset group has at least 1 image, return true\r\n return true;\r\n }\r\n\r\n for (let i = 0; i < textAssetFields.length; i += 1) {\r\n const key = textAssetFields[i];\r\n const values = _.values(data[key]);\r\n for (let j = 0; j < values.length; j += 1) {\r\n if (!_.isEmpty(values[j])) {\r\n // asset group has at least 1 text asset, return true\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n return false;\r\n}\r\n","import _, { noop, pick, constant, first, isArray, flatten, pluck } from 'underscore';\r\nimport React, { useCallback, useMemo, useRef, useState, useContext, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { Panel as BootstrapPanel } from 'react-bootstrap';\r\nimport { Text, Stack, Separator } from '@fluentui/react';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport {\r\n Collapse,\r\n collapseExpander,\r\n getPanelErrorProps,\r\n TextTitle,\r\n useCollapseState,\r\n ValidatedBootstrapPanel,\r\n ValidatedFixedPanel,\r\n ValidatedPanel,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { withScope } from '@bingads-webui-react/scope-service';\r\nimport { withServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { withInstrumentation } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { ValidationGroup, ErrorMessages, withCustomValidation, withError } from '@bingads-webui-react/validation';\r\nimport { withStoreFromProviderId, withStoreUrl } from '@bingads-webui-campaign-react/with-store-details';\r\nimport {\r\n FormErrorGroup, UnmappedFormErrors as OriginalUnmappedFormErrors,\r\n entityIs, andComp, propertyIs, orComp, StandardControlAdapter,\r\n} from '@bingads-webui-campaign-react/form-error';\r\nimport { AttentionBeaconGroup } from '@bingads-webui-campaign-react/attention-beacon';\r\nimport { ActuationGroup, FocusableActuator } from '@bingads-webui-campaign-react/actuator';\r\nimport { withControlErrorHandling, withUnvalidatedControlErrors, withContainerErrors } from '@bingads-webui-campaign-react/error-handling';\r\nimport { LearnMoreLink } from '@bingads-webui-campaign-react/help';\r\nimport { AssetGroup } from '@bingads-webui/campaign-odata-schemas';\r\nimport { ValidatedLegacyDateSetting, getDateSettingDetails } from '@bingads-webui-campaign/date-setting';\r\nimport { constants as ImageassetsConstants } from '@bingads-webui-campaign-react/image-experience-model';\r\nimport { ValidatedUrlPath, ValidatedMobileUrl, getAdvancedUrlOptionsCardSummaryDetails, getFinalUrlWithPath } from '@bingads-webui-campaign-react/validated-url-input';\r\nimport { getTextCardSummaryDetails, getHeadlinesCardSummaryDetails, getLongHeadlinesCardSummaryDetails, getDescriptionsCardSummaryDetails, hasTextAssets } from '@bingads-webui-campaign-react/validated-text-collection';\r\nimport {\r\n ValidatedStoreBackedBusinessName,\r\n ValidatedFinalUrlWithRecommendations,\r\n HeadlineAssetCollection,\r\n LongHeadlineAssetCollection,\r\n DescriptionAssetCollection,\r\n MAX_INLINE_RECOMMENDATIONS_PER_PAGE,\r\n} from '@bingads-webui-campaign-react/pmax-text-input';\r\nimport { ValidatedLegacyCallToAction } from '@bingads-webui-campaign-react/legacy-call-to-action';\r\nimport { AudienceWizard } from '@bingads-webui-campaign-react/audience-signals';\r\nimport {\r\n ValidatedImageExperienceWrapper,\r\n ImageListPortalContainerWithControlErrorHandling,\r\n LogoListPortalContainerWithControlErrorHandling,\r\n ImageListSummaryCardDetails,\r\n PerfMaxAdPreviewUAPL,\r\n hasImages,\r\n PerfMaxImageSuggestionCarousel,\r\n PMaxImageExperienceMaxImageCount,\r\n SuggestionViewImageCount\r\n} from '@bingads-webui-campaign-react/pmax-image-experience';\r\nimport { mergeI18n } from '@bingads-webui-campaign-react/i18n-merger';\r\nimport { withStepLoadingShell } from '@bingads-webui-campaign-react/step-wizard';\r\nimport { ValidatedListingGroups } from '@bingads-webui-campaign-react/step-wizard-controls';\r\nimport { getListingGroupDetails, getSearchThemeDetails } from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { HelpPopup } from '@bingads-webui-react/help-popup';\r\nimport {\r\n useRecommendations,\r\n withFinalUrlRecommendationUpdate,\r\n uniqAssetRecommendationsInThemes,\r\n RecommendationContext,\r\n} from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { FluentProvider, webLightTheme } from '@fluentui/react-components';\r\nimport {\r\n AssetEventFeature,\r\n AssetPropertyName,\r\n getCopilotRecommendationIdsFromThemes,\r\n getFormattedThemeForApplying,\r\n getUniqueAssetsFromThemes,\r\n useCopilotRecommendationSurvey,\r\n useEventLog,\r\n} from '@bingads-webui-campaign-react/copilot-common';\r\nimport {\r\n CopilotRecommendationBanner,\r\n CopilotRepositoryProvider,\r\n CopilotThemesRecommendationDialog,\r\n useBannerService,\r\n} from '@bingads-webui/inline-copilot';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport { SearchThemeSelector } from '@bingads-webui-campaign-react/search-theme-selector';\r\nimport { ValidatedUrlRules, UrlOptionsDetailsWithRules } from '@bingads-webui-campaign-react/url-rules';\r\nimport { ValidatedUrlRulesV2, UrlOptionsDetailsWithRulesV2 } from '@bingads-webui-campaign-react/url-rules-v2';\r\nimport { isCopilotRegionRestricted } from '@bingads-webui-react/copilot-utils';\r\n\r\nimport { ScenarioName } from '../../common/constants';\r\nimport {\r\n ServerValidatedRemainingCharsValidatedTextField,\r\n} from '../shared';\r\nimport { useStepAssetGroupState } from './use-step-campaign-asset-group-state';\r\nimport { getAssetGroupStepStyles } from './step-campaign-asset-group-styles';\r\nimport { hasAssetsInAssetGroup } from '../../common/has-assets-in-assets-group';\r\nimport { ERROR_ENTITY } from '../../model/api-errors';\r\nimport { getExtensionFormatters } from '../../model/ad-extension';\r\nimport SparkleImg from './media/sparkle.svg';\r\nimport ImageAssetsImg from './media/image-assets.svg';\r\nimport LogoAssetsImg from './media/logo-assets.svg';\r\nimport TextAssetsImg from './media/text-assets.svg';\r\nimport CallToActionImg from './media/call-to-action.svg';\r\nimport BusinessNameImg from './media/business-name.svg';\r\nimport StartEndDateImg from './media/start-end-date.svg';\r\nimport ListingGroupImg from './media/listing-groups.svg';\r\nimport GroupInfoImg from './media/group-info.svg';\r\nimport SearchThemesImg from './media/search-themes.svg';\r\n\r\nconst entityIsAssetGroup = entityIs(ERROR_ENTITY.AssetGroup);\r\nconst assetGroupNameProp = andComp(entityIsAssetGroup, propertyIs('Name'));\r\nconst assetGroupBusinessNameProp = andComp(entityIsAssetGroup, propertyIs('BusinessName'));\r\nconst assetGroupFinalUrlsProp = andComp(entityIsAssetGroup, propertyIs('FinalUrls'));\r\nconst assetGroupPath1AndPath2Props = andComp(entityIsAssetGroup, orComp(propertyIs('Path1'), propertyIs('Path2')));\r\nconst assetGroupMobileFinalUrlsProp = andComp(entityIsAssetGroup, propertyIs('MobileFinalUrls'));\r\nconst assetGroupSearchThemesProp = andComp(entityIsAssetGroup, propertyIs('SearchThemes'));\r\nconst assetGroupImageAssetsProp = andComp(entityIsAssetGroup, propertyIs('Images'));\r\n\r\nconst ValidatedFinalUrlWithStoreURL = withError(withCustomValidation(withFinalUrlRecommendationUpdate(withStoreFromProviderId(withStoreUrl(ValidatedFinalUrlWithRecommendations)))));\r\n\r\nconst ServerValidatedFinalUrl = withControlErrorHandling(withUnvalidatedControlErrors(ValidatedFinalUrlWithStoreURL, { filter: assetGroupFinalUrlsProp }));\r\nconst ServerValidatedUrlPath = withControlErrorHandling(withUnvalidatedControlErrors(ValidatedUrlPath, { filter: assetGroupPath1AndPath2Props }));\r\nconst ServerValidatedMobileUrl = withControlErrorHandling(withUnvalidatedControlErrors(ValidatedMobileUrl, { filter: assetGroupMobileFinalUrlsProp }));\r\nconst ServerValidatedSearchThemeSelector = withControlErrorHandling(withContainerErrors(SearchThemeSelector, { filter: assetGroupMobileFinalUrlsProp, Adapter: StandardControlAdapter() }), [FocusableActuator]);\r\nconst ServerValidatedImageListPortalContainer = withUnvalidatedControlErrors(ImageListPortalContainerWithControlErrorHandling, { filter: assetGroupImageAssetsProp });\r\nconst UnmappedFormErrors = withControlErrorHandling(OriginalUnmappedFormErrors);\r\n\r\nconst AssetGroupStep = (props) => {\r\n const classes = useDefaultStyles(getAssetGroupStepStyles);\r\n\r\n const {\r\n stepService,\r\n scope,\r\n serverContext,\r\n instrumentation,\r\n wizardPerfMarker,\r\n } = props;\r\n\r\n const activity = useContext(ActivityContext);\r\n const [stepState, stepApi] = useStepAssetGroupState(stepService, activity);\r\n\r\n const {\r\n scenarioName,\r\n i18n,\r\n legacyI18n,\r\n locale,\r\n hideStepHeader,\r\n assetGroup,\r\n navigationConfirmationPrompt,\r\n finalUrls,\r\n finalUrlForRecommendation,\r\n headlines,\r\n longHeadlines,\r\n descriptions,\r\n campaignId,\r\n campaignName,\r\n campaignTimeZone,\r\n campaignSettings,\r\n suggestedObjectiveExtensions,\r\n otherObjectiveExtensions,\r\n adExtensionsDynamicFeatures = constant({}),\r\n adExtensionsAssociationsFactory,\r\n extensionsAssociations,\r\n urlPath1,\r\n urlPath2,\r\n finalMobileUrls,\r\n urlRules,\r\n urlRulesOption,\r\n images,\r\n businessName,\r\n audienceGroup,\r\n searchThemes,\r\n originalAudienceGroup,\r\n listingGroup,\r\n productFilter,\r\n isSaving,\r\n isCanceling,\r\n aid,\r\n cid,\r\n permissions,\r\n showAllValidationErrors,\r\n areBeaconsActive,\r\n serverErrors,\r\n systemErrors,\r\n } = stepState;\r\n\r\n const {\r\n onAssetGroupValidation,\r\n onUpdateExtensionsAssociations,\r\n onUpdateFinalUrls,\r\n onUpdateImageList,\r\n onClearAssets,\r\n onUpdateSearchThemes,\r\n } = stepApi;\r\n\r\n const {\r\n UAPLPMaxLogoPreviewEnabled,\r\n CopilotCTALogoGeneration,\r\n PmaxExtensionPreview,\r\n AssetGroupUrlRules: isAssetGroupUrlRulesEnabled,\r\n AssetGroupUrlRulesV2: isAssetGroupUrlRulesV2Enabled,\r\n PerformanceMaxInCnMarket: IsPerformanceMaxInCnMarketEnabled,\r\n PMaxNewAspectRatios: isPMaxNewAspectRatiosEnabled,\r\n PMaxExcludeNewAspectRatios: isPMaxNewAspectRatiosExcluded,\r\n AdPreviewRefresh: isAdPreviewRefreshEnabled,\r\n } = permissions.dynamic;\r\n\r\n const isPMaxAspectRatiosV2Enabled = isPMaxNewAspectRatiosEnabled && !isPMaxNewAspectRatiosExcluded;\r\n\r\n const { IsDomesticSimplifiedChineseEnabled } = permissions;\r\n\r\n const isFeatureBlockedForCnMarket = IsDomesticSimplifiedChineseEnabled && IsPerformanceMaxInCnMarketEnabled;\r\n\r\n const { send: sendCopilotBannerNotification } = useBannerService();\r\n\r\n const [finalUrlForCopilotRecommendations, setFinalUrlForCopilotRecommendations] = useState(first(finalUrls));\r\n\r\n const {\r\n handleCopilotBannerFetch,\r\n handleCopilotBannerFetchSucceeded,\r\n handleCopilotBannerFetchFailed,\r\n suggestionPoller,\r\n } = useRecommendations({\r\n cid,\r\n aid,\r\n campaignId,\r\n permissions,\r\n finalUrl: finalUrlForCopilotRecommendations,\r\n instrumentation,\r\n });\r\n\r\n const [recommendationContext, setRecommendationContext] = useContext(RecommendationContext);\r\n const {\r\n themes, imageAssets, copilotTracking, postAssetEventLog = noop, logo, cta, isCustomerIdInExclusionList,\r\n } = recommendationContext;\r\n const finalUrlRecommendations = recommendationContext.finalUrls;\r\n\r\n const {\r\n logEnterFlow,\r\n logFinalUrlRecommendations,\r\n logBannerRefresh,\r\n logBannerRefreshCompleted,\r\n logFetch,\r\n logFetchSucceeded,\r\n logFetchAssetsSucceeded,\r\n logApplyThemes,\r\n logSuggestionsViewed,\r\n logPrefillAssets,\r\n logRemoveAssets,\r\n } = useEventLog(postAssetEventLog);\r\n\r\n const {\r\n triggerSurveyOnSubmit,\r\n triggerSurveyOnCancel,\r\n } = useCopilotRecommendationSurvey(AssetEventFeature.PMAX);\r\n\r\n useEffect(() => {\r\n if (isSaving) {\r\n triggerSurveyOnSubmit();\r\n }\r\n }, [isSaving, triggerSurveyOnSubmit]);\r\n\r\n useEffect(() => {\r\n if (isCanceling && _.size(themes) > 0) {\r\n triggerSurveyOnCancel();\r\n }\r\n }, [isCanceling, triggerSurveyOnCancel, themes]);\r\n\r\n useEffect(() => {\r\n activity.trace('[PmaxWizard] AssetGroupStep mounted');\r\n }, [activity]);\r\n\r\n useEffect(() => {\r\n setClarityTag({ PMaxCampaignsCopilotRecommendations: 'true' });\r\n });\r\n\r\n useEffect(() => {\r\n logEnterFlow();\r\n }, [logEnterFlow]);\r\n\r\n\r\n useEffect(() => {\r\n if (finalUrlRecommendations && finalUrlRecommendations.length > 0) {\r\n logFinalUrlRecommendations(finalUrlRecommendations);\r\n copilotTracking.trackReturnedFinalUrlAssets({ FinalUrls: finalUrlRecommendations });\r\n }\r\n }, [finalUrlRecommendations, logFinalUrlRecommendations, copilotTracking]);\r\n\r\n useEffect(() => {\r\n if (themes && themes.length > 0) {\r\n if (copilotTracking) {\r\n const {\r\n descriptionRecommendationIds, headlineRecommendationIds, longHeadlineRecommendationIds,\r\n } = getCopilotRecommendationIdsFromThemes(themes);\r\n\r\n // By default, user views first 5 copilot image and text recommendations when they are returned\r\n const displayedDescriptions = first(descriptionRecommendationIds, MAX_INLINE_RECOMMENDATIONS_PER_PAGE);\r\n const displayedHeadlines = first(headlineRecommendationIds, MAX_INLINE_RECOMMENDATIONS_PER_PAGE);\r\n const displayedLongHeadlines = first(longHeadlineRecommendationIds, MAX_INLINE_RECOMMENDATIONS_PER_PAGE);\r\n const viewedTextSuggestionIds = copilotTracking.getUntrackedViewedSuggestionIds(flatten([displayedDescriptions, displayedHeadlines, displayedLongHeadlines]));\r\n\r\n const displayedImages = first(pluck(imageAssets, 'suggestionId'), SuggestionViewImageCount);\r\n const viewedImageSuggestionIds = copilotTracking.getUntrackedViewedSuggestionIds(displayedImages);\r\n\r\n if (viewedTextSuggestionIds.length > 0 || viewedImageSuggestionIds.length > 0) {\r\n logSuggestionsViewed(viewedTextSuggestionIds, viewedImageSuggestionIds);\r\n copilotTracking.trackViewedSuggestionIds([...viewedTextSuggestionIds, ...viewedImageSuggestionIds]);\r\n }\r\n }\r\n }\r\n }, [copilotTracking, imageAssets, logSuggestionsViewed, themes]);\r\n\r\n const [\r\n allAssetsSections,\r\n assetsExpandedSections,\r\n setAssetsExpandedSections,\r\n ] = useCollapseState(\r\n ['final-url', 'images', 'logos', 'headlines', 'long-headlines', 'descriptions', 'business-name', 'call-to-action'] /* all sections */,\r\n ['final-url', 'images', 'logos', 'headlines', 'long-headlines', 'descriptions', 'business-name', 'call-to-action'] /* initially expanded sections */\r\n );\r\n\r\n const providerId = campaignSettings && campaignSettings.ProviderId;\r\n const finalUrlExpansion = campaignSettings && campaignSettings.length > 0 && !campaignSettings[0].FinalUrlExpansionOptOut;\r\n const finalUrlValidationProps = useMemo(() => ({\r\n data: {\r\n FinalUrls: finalUrls,\r\n },\r\n initialValue: {\r\n FinalUrls: finalUrls,\r\n },\r\n debounce: 700,\r\n }), [finalUrls]);\r\n const allAssetsExpand = useMemo(\r\n () => collapseExpander({ setActiveKeys: setAssetsExpandedSections }),\r\n [setAssetsExpandedSections]\r\n );\r\n\r\n const onRenderAdGroupNameLabel = useCallback(() => (\r\n \r\n ), []);\r\n const onRenderDescription = useMemo(() => (\r\n \r\n \r\n {i18n.getString(_TL_('URL expansion is on'))}\r\n \r\n \r\n \r\n ), [i18n]);\r\n\r\n const [showCopilotDialog, setShowCopilotDialog] = useState(false);\r\n const [imageExperiencePortalContainerState, setImageExperiencePortalContainerState] = useState({});\r\n const [imageExperienceAddNewImageCallback, setImageExperienceAddNewImageCallback] = useState(noop);\r\n const [addNewDescriptionCallback, setAddNewDescriptionCallback] = useState(noop);\r\n const [addNewShortHeadlinesCallback, setAddNewShortHeadlinesCallback] = useState(noop);\r\n const [addNewLongHeadlinesCallback, setAddNewLongHeadlinesCallback] = useState(noop);\r\n const [newCTACallback, setNewCTACallback] = useState(noop);\r\n\r\n const handleRefresh = useCallback(() => {\r\n setShowCopilotDialog(true);\r\n logBannerRefresh();\r\n }, [logBannerRefresh]);\r\n\r\n const handleReset = useCallback(() => {\r\n onClearAssets();\r\n copilotTracking.removeAllInitialSuggestions();\r\n logRemoveAssets();\r\n }, [onClearAssets, logRemoveAssets, copilotTracking]);\r\n\r\n const handleCopilotDialogClose = useCallback(() => {\r\n setShowCopilotDialog(false);\r\n }, []);\r\n\r\n const maxUploadNum = useMemo(() => {\r\n const imageListLength = images && images.ImageList && isArray(images.ImageList) ? images.ImageList.length : 0;\r\n return PMaxImageExperienceMaxImageCount - imageListLength;\r\n }, [images]);\r\n\r\n // only prefill for new asset groups & when customer is not in exclusion list\r\n const [shouldPrefill, setShouldPrefill] = useState(assetGroup.data.Id == null);\r\n\r\n useEffect(() => {\r\n if (shouldPrefill && _.size(themes) > 0) {\r\n if (!hasAssetsInAssetGroup(assetGroup.data)) {\r\n setShouldPrefill(false);\r\n\r\n if (isCustomerIdInExclusionList) {\r\n activity.trace('not prefilling asset group, customer is in exclusion list');\r\n return;\r\n }\r\n\r\n // new asset group with no text or image assets, prefill with copilot recommendations\r\n activity.trace('prefilling asset group with copilot recommendations');\r\n sendCopilotBannerNotification('Apply');\r\n\r\n if (addNewShortHeadlinesCallback) {\r\n const newHeadlines = getUniqueAssetsFromThemes(themes, 'headlines', 12);\r\n copilotTracking.trackInitialSuggestions(AssetPropertyName.HEADLINE, newHeadlines);\r\n\r\n addNewShortHeadlinesCallback(newHeadlines);\r\n }\r\n\r\n if (addNewLongHeadlinesCallback) {\r\n const newLongHeadlines = getUniqueAssetsFromThemes(themes, 'longHeadlines', 4);\r\n copilotTracking.trackInitialSuggestions(AssetPropertyName.LONG_HEADLINE, newLongHeadlines);\r\n\r\n addNewLongHeadlinesCallback(newLongHeadlines);\r\n }\r\n\r\n if (addNewDescriptionCallback) {\r\n const newDescriptions = getUniqueAssetsFromThemes(themes, 'descriptions', 4);\r\n copilotTracking.trackInitialSuggestions(AssetPropertyName.DESCRIPTION, newDescriptions);\r\n\r\n addNewDescriptionCallback(newDescriptions);\r\n }\r\n\r\n // prefill images\r\n new Promise((resolve) => {\r\n if (imageExperienceAddNewImageCallback) {\r\n const newImages = getUniqueAssetsFromThemes(themes, 'images', 5);\r\n if (newImages.length > 0) {\r\n resolve(imageExperienceAddNewImageCallback(newImages, ImageassetsConstants.imageOptionKeys.Image));\r\n return;\r\n }\r\n }\r\n resolve({ processedImages: [] });\r\n }).then((response) => {\r\n if (!_.isEmpty(response.processedImages)) {\r\n const newImagesAssets = _.map(response.processedImages, image => image.idString);\r\n copilotTracking.trackInitialSuggestions(AssetPropertyName.IMAGE, newImagesAssets);\r\n }\r\n\r\n if (response.errorMessage && activity) {\r\n const message = `Apply image from copilot prefill error: ${response.errorMessage}`;\r\n activity.trace(message);\r\n }\r\n }).then(() => {\r\n if (cta && newCTACallback && assetGroup.data && assetGroup.data.CallToAction !== 'Automated') {\r\n newCTACallback({\r\n CallToAction: cta.replace(' ', ''),\r\n });\r\n }\r\n if (logo) {\r\n return imageExperienceAddNewImageCallback([{\r\n fullUrl: logo,\r\n suggestionId: -1,\r\n }], ImageassetsConstants.imageOptionKeys.Logo);\r\n }\r\n return Promise.resolve();\r\n }).finally(() => {\r\n sendCopilotBannerNotification('ApplySucceeded');\r\n logPrefillAssets();\r\n });\r\n } else {\r\n activity.trace('not prefilling asset group, text or image assets already exist');\r\n }\r\n }\r\n }, [\r\n activity,\r\n addNewDescriptionCallback,\r\n addNewLongHeadlinesCallback,\r\n addNewShortHeadlinesCallback,\r\n assetGroup.data,\r\n imageExperienceAddNewImageCallback,\r\n logPrefillAssets,\r\n sendCopilotBannerNotification,\r\n shouldPrefill,\r\n themes,\r\n cta,\r\n logo,\r\n newCTACallback,\r\n copilotTracking,\r\n isCustomerIdInExclusionList,\r\n ]);\r\n\r\n const onApplyCopilotRecommendation = useCallback((selectedThemes, selectedThemesAndAssets) => {\r\n logApplyThemes(selectedThemes);\r\n\r\n const formattedThemesAndAssets = _.map(selectedThemesAndAssets, getFormattedThemeForApplying);\r\n\r\n sendCopilotBannerNotification('Apply');\r\n setRecommendationContext({\r\n themes: [...formattedThemesAndAssets],\r\n ...uniqAssetRecommendationsInThemes(formattedThemesAndAssets),\r\n });\r\n\r\n if (addNewShortHeadlinesCallback) {\r\n addNewShortHeadlinesCallback(getUniqueAssetsFromThemes(formattedThemesAndAssets, 'headlines'));\r\n }\r\n if (addNewLongHeadlinesCallback) {\r\n addNewLongHeadlinesCallback(getUniqueAssetsFromThemes(formattedThemesAndAssets, 'longHeadlines'));\r\n }\r\n if (addNewDescriptionCallback) {\r\n addNewDescriptionCallback(getUniqueAssetsFromThemes(formattedThemesAndAssets, 'descriptions'));\r\n }\r\n\r\n const logCopilotViewedImageSuggestions = (suggestionIds) => {\r\n if (copilotTracking) {\r\n const viewedImageSuggestionIds = copilotTracking.getUntrackedViewedSuggestionIds(suggestionIds);\r\n if (viewedImageSuggestionIds.length > 0) {\r\n logSuggestionsViewed([], viewedImageSuggestionIds);\r\n copilotTracking.trackViewedSuggestionIds(viewedImageSuggestionIds);\r\n }\r\n }\r\n };\r\n\r\n const availableNewImages = getUniqueAssetsFromThemes(formattedThemesAndAssets, 'images', maxUploadNum);\r\n if (imageExperienceAddNewImageCallback && availableNewImages && availableNewImages.length > 0) {\r\n imageExperienceAddNewImageCallback(availableNewImages, ImageassetsConstants.imageOptionKeys.Image)\r\n .then((response) => {\r\n if (response.processedImages) {\r\n logCopilotViewedImageSuggestions(_.pluck(response.processedImages, 'suggestionId'));\r\n response.processedImages.forEach((image) => {\r\n copilotTracking.trackSelectedImageAssets({ ImageAssets: [{ suggestionId: image.suggestionId, imageId: image.idString }] });\r\n });\r\n }\r\n if (response.errorMessage && activity) {\r\n const message = `Apply image from copilot dialog error: ${response.errorMessage}`;\r\n activity.trace(message);\r\n }\r\n })\r\n .finally(() => {\r\n sendCopilotBannerNotification('ApplySucceeded');\r\n });\r\n } else {\r\n sendCopilotBannerNotification('ApplySucceeded');\r\n }\r\n handleCopilotDialogClose();\r\n }, [sendCopilotBannerNotification, setRecommendationContext, addNewShortHeadlinesCallback, addNewLongHeadlinesCallback, addNewDescriptionCallback, imageExperienceAddNewImageCallback, handleCopilotDialogClose, maxUploadNum, activity, copilotTracking, logSuggestionsViewed, logApplyThemes]);\r\n\r\n const onFinalURLFocusOut = useCallback(() => {\r\n // to prevent sending too many requests, only update the copilot recommendations after user has finished editing URL\r\n setFinalUrlForCopilotRecommendations(finalUrlForRecommendation);\r\n }, [finalUrlForRecommendation]);\r\n\r\n const onFinalUrlEnter = useCallback((e) => {\r\n const { key } = e;\r\n if (key === 'Enter') {\r\n setFinalUrlForCopilotRecommendations(finalUrlForRecommendation);\r\n }\r\n }, [finalUrlForRecommendation]);\r\n\r\n const finalUrlAdditionalProps = useMemo(() => ({\r\n onBlur: onFinalURLFocusOut,\r\n onKeyUp: onFinalUrlEnter,\r\n }), [onFinalUrlEnter, onFinalURLFocusOut]);\r\n\r\n const handleFetchThemes = useCallback(() => {\r\n logFetch();\r\n }, [logFetch]);\r\n\r\n const handleFetchThemesSucceeded = useCallback((finalUrl, themesList) => {\r\n logFetchSucceeded(finalUrl, themesList);\r\n }, [logFetchSucceeded]);\r\n\r\n const handleFetchAssetsSucceeded = useCallback((finalUrl, assetsRecommendationData) => {\r\n logFetchAssetsSucceeded(finalUrl, assetsRecommendationData);\r\n if (copilotTracking) {\r\n copilotTracking.trackReturnedTextAssets(assetsRecommendationData.RecommendedAssets);\r\n }\r\n }, [logFetchAssetsSucceeded, copilotTracking]);\r\n\r\n const [isRegionRestricted, setIsRegionRestricted] = useState(true);\r\n useEffect(() => {\r\n isCopilotRegionRestricted({\r\n feature: 'Recommendations',\r\n permissions,\r\n serverContext,\r\n }).then(setIsRegionRestricted);\r\n }, [permissions, serverContext]);\r\n\r\n const validateSpecialCharacters = permissions && permissions.dynamic && permissions.dynamic.PerformanceMaxCampaignsFinalURLValidation && permissions.dynamic.PMaxAndDSAFinalURLValidation;\r\n\r\n const assetGroupNameSection = useMemo(() => (\r\n
\r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n >\r\n \r\n \r\n {finalUrlExpansion && onRenderDescription}\r\n \r\n \r\n {!isRegionRestricted && (\r\n \r\n \r\n {showCopilotDialog &&\r\n \r\n }\r\n \r\n )}\r\n
\r\n ), [\r\n finalUrlAdditionalProps,\r\n finalUrlExpansion,\r\n finalUrlValidationProps,\r\n handleCopilotDialogClose,\r\n handleRefresh,\r\n i18n,\r\n isRegionRestricted,\r\n onApplyCopilotRecommendation,\r\n handleCopilotBannerFetch,\r\n handleCopilotBannerFetchFailed,\r\n handleCopilotBannerFetchSucceeded,\r\n logBannerRefreshCompleted,\r\n handleReset,\r\n onRenderAdGroupNameLabel,\r\n onRenderDescription,\r\n permissions,\r\n handleFetchThemes,\r\n handleFetchThemesSucceeded,\r\n handleFetchAssetsSucceeded,\r\n providerId,\r\n scenarioName,\r\n setAssetsExpandedSections,\r\n showCopilotDialog,\r\n ]);\r\n\r\n const [\r\n allListingGroupsSections,\r\n listingGroupsExpandedSections,\r\n setListingGroupsExpandedSections,\r\n ] = useCollapseState(\r\n ['listing-groups'] /* all sections */,\r\n ['listing-groups'] /* initially expanded sections */\r\n );\r\n\r\n const listingGroupExpand = useMemo(\r\n () => collapseExpander({ setActiveKeys: setListingGroupsExpandedSections }),\r\n [setListingGroupsExpandedSections]\r\n );\r\n\r\n const mergedI18n = useMemo(() => mergeI18n(\r\n legacyI18n,\r\n i18n\r\n ), [i18n, legacyI18n]);\r\n\r\n const listingGroupDetails = useMemo(() => getListingGroupDetails(\r\n i18n,\r\n !!scope.values.assetGroupId,\r\n {\r\n productFilter,\r\n listingGroup,\r\n }\r\n ), [i18n, listingGroup, productFilter, scope.values.assetGroupId]);\r\n\r\n const listingGroupsSection = useMemo(() => (\r\n
\r\n

{i18n.getString(_TL_('Add products'))}

\r\n
\r\n {i18n.getString(_TL_('Choose which products you want to display in your ads. Some of your ads will use images, headlines, and descriptions from Merchant Center.'))}\r\n
\r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: listingGroupExpand,\r\n expandKey: 'listing-groups',\r\n }}\r\n >\r\n \r\n \r\n \r\n
\r\n ), [i18n, allListingGroupsSections, listingGroupsExpandedSections, setListingGroupsExpandedSections, listingGroupDetails, listingGroupExpand, mergedI18n, campaignId, campaignSettings, listingGroup, providerId]);\r\n\r\n\r\n const imagesContainerRef = useRef(null);\r\n const logosContainerRef = useRef(null);\r\n const collectionsSummary = [\r\n { collection: headlines, displayText: i18n.getString(_TL_('short headlines')) },\r\n { collection: longHeadlines, displayText: i18n.getString(_TL_('long headlines')) },\r\n { collection: descriptions, displayText: i18n.getString(_TL_('descriptions')) },\r\n ];\r\n\r\n const textCardSummaryDetails = useMemo(() => getTextCardSummaryDetails(collectionsSummary, i18n), [collectionsSummary, i18n]);\r\n const headlinesCardSummaryDetails = useMemo(() => getHeadlinesCardSummaryDetails(i18n, headlines), [headlines, i18n]);\r\n const longHeadlinesCardSummaryDetails = useMemo(() => getLongHeadlinesCardSummaryDetails(i18n, longHeadlines), [longHeadlines, i18n]);\r\n const descriptionsCardSummaryDetails = useMemo(() => getDescriptionsCardSummaryDetails(i18n, descriptions), [descriptions, i18n]);\r\n\r\n const textAndImageAssetsOptional = useMemo(() => providerId && !hasImages(images) && !hasTextAssets(headlines, longHeadlines, descriptions), [providerId, images, headlines, longHeadlines, descriptions]);\r\n\r\n const assetsSection = useMemo(() => (\r\n
\r\n

{i18n.getString(_TL_('Add assets'))}

\r\n
\r\n {i18n.getString(_TL_('Provide your assets and we’ll automatically determine what your ads look like, where and when they appear, and who sees them.'))}\r\n
\r\n \r\n }\r\n />}\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: allAssetsExpand,\r\n expandKey: 'images',\r\n }}\r\n >\r\n {i18n.getString(_TL_('You can add up to 20 images to your ad. We recommend that you add two to three relevant images. Required aspect ratios: 1.91:1 and 1:1. Minimum image upload dimensions: 703 x 368 pixels. '))}\r\n \r\n \r\n \r\n }\r\n />}\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: allAssetsExpand,\r\n expandKey: 'logos',\r\n }}\r\n >\r\n {i18n.getString(_TL_('You can add up to 5 different logos. Each logo can have one or both 4:1 aspect ratio and 1:1 aspect ratio.'))}\r\n \r\n \r\n\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: allAssetsExpand,\r\n expandKey: 'headlines',\r\n }}\r\n >\r\n \r\n \r\n\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: allAssetsExpand,\r\n expandKey: 'long-headlines',\r\n }}\r\n >\r\n \r\n \r\n\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: allAssetsExpand,\r\n expandKey: 'descriptions',\r\n }}\r\n >\r\n \r\n \r\n\r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n >\r\n \r\n \r\n \r\n }\r\n noOverflowHidden\r\n relativePosition\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n >\r\n \r\n \r\n \r\n
\r\n ), [i18n, allAssetsSections, assetsExpandedSections, setAssetsExpandedSections, isPMaxAspectRatiosV2Enabled, images, allAssetsExpand, imageExperiencePortalContainerState, imageExperienceAddNewImageCallback, permissions, maxUploadNum, headlinesCardSummaryDetails, textAndImageAssetsOptional, longHeadlinesCardSummaryDetails, descriptionsCardSummaryDetails, textCardSummaryDetails, providerId, businessName, locale, assetGroup.data, isFeatureBlockedForCnMarket]);\r\n\r\n const getAdExtensionsSections = useCallback(\r\n extensionTypes => (scenarioName === ScenarioName.PerformanceMaxCampaignCreation ?\r\n adExtensionsAssociationsFactory.extensionsAssociationsFactory(campaignId, campaignName, extensionTypes, adExtensionsDynamicFeatures) : [])\r\n .reduce((memo, {\r\n extensionType,\r\n title,\r\n topic,\r\n details,\r\n AssociationPanel,\r\n }) => {\r\n const sectionKey = extensionType;\r\n const associations = extensionsAssociations[extensionType];\r\n\r\n const panel = (\r\n }\r\n >\r\n \r\n \r\n\r\n );\r\n memo.panels.push(panel);\r\n memo.sectionsInfo.allSections.push(sectionKey);\r\n\r\n return memo;\r\n }, { panels: [], sectionsInfo: { allSections: [] } }),\r\n [scenarioName, i18n, campaignId, campaignName, adExtensionsDynamicFeatures, adExtensionsAssociationsFactory, extensionsAssociations, onUpdateExtensionsAssociations]\r\n );\r\n\r\n const suggestedAdExtensionsSections = useMemo(() => getAdExtensionsSections(suggestedObjectiveExtensions), [getAdExtensionsSections, suggestedObjectiveExtensions]);\r\n const otherAdExtensionsSections = useMemo(() => getAdExtensionsSections(otherObjectiveExtensions), [getAdExtensionsSections, otherObjectiveExtensions]);\r\n\r\n const [\r\n allEnhanceYourAdsSections,\r\n enhanceYourAdsExpandedSections,\r\n setEnhanceYourAdsExpandedSections,\r\n ] = useCollapseState(\r\n suggestedAdExtensionsSections.sectionsInfo.allSections /* all sections */,\r\n [] /* initially expanded sections */\r\n );\r\n\r\n const enhanceYourAdsSection = useMemo(() => (\r\n <>\r\n {suggestedAdExtensionsSections.panels.length > 0 &&\r\n
\r\n

{i18n.getString(_TL_('Add more information to your ads'))}

\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n {suggestedAdExtensionsSections.panels}\r\n \r\n
\r\n }\r\n \r\n ), [i18n, allEnhanceYourAdsSections, enhanceYourAdsExpandedSections, setEnhanceYourAdsExpandedSections, suggestedAdExtensionsSections]);\r\n\r\n const [\r\n allMoreAssetsSections,\r\n moreAssetsExpandedSections,\r\n setMoreAssetsExpandedSections,\r\n ] = useCollapseState(\r\n otherAdExtensionsSections.sectionsInfo.allSections /* all sections */,\r\n [] /* initially expanded sections */\r\n );\r\n\r\n const moreAssetsSection = useMemo(() => (\r\n <>\r\n {otherAdExtensionsSections.panels.length > 0 &&\r\n (\r\n <>\r\n \r\n \r\n {i18n.getString(_TL_('More assets'))}\r\n \r\n \r\n \r\n \r\n
\r\n \r\n {otherAdExtensionsSections.panels}\r\n \r\n
\r\n
\r\n
\r\n \r\n )}\r\n />\r\n }\r\n \r\n ), [i18n, classes.collapsiblePanel, allMoreAssetsSections, moreAssetsExpandedSections, setMoreAssetsExpandedSections, otherAdExtensionsSections.panels]);\r\n\r\n const [\r\n allMoreOptionsSections,\r\n moreOptionsExpandedSections,\r\n setMoreOptionsExpandedSections,\r\n ] = useCollapseState(\r\n ['advanced-url-options'] /* all sections */,\r\n ['advanced-url-options'] /* initially expanded sections */\r\n );\r\n const moreOptionsExpand = useMemo(\r\n () => collapseExpander({ setActiveKeys: setMoreOptionsExpandedSections }),\r\n [setMoreOptionsExpandedSections]\r\n );\r\n\r\n const [moreOptionsSectionExpanded, setNameAndTitleExpanded] = useState(false);\r\n const onMoreOptionsSectionToggle = useCallback((expanded) => {\r\n setNameAndTitleExpanded(expanded);\r\n }, []);\r\n\r\n const moreOptionsSection = useMemo(() => (\r\n (\r\n <>\r\n \r\n \r\n {i18n.getString(_TL_('More options'))}\r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n : }\r\n />}\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: moreOptionsExpand,\r\n expandKey: 'advanced-url-options',\r\n }}\r\n >\r\n \r\n \r\n {\r\n isAssetGroupUrlRulesEnabled && !isAssetGroupUrlRulesV2Enabled && (\r\n <>\r\n \r\n \r\n \r\n )\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\n
\r\n
\r\n
\r\n \r\n )}\r\n />\r\n ), [onMoreOptionsSectionToggle, moreOptionsSectionExpanded, classes.collapsiblePanel, i18n, allMoreOptionsSections, moreOptionsExpandedSections, setMoreOptionsExpandedSections, isAssetGroupUrlRulesEnabled, isAssetGroupUrlRulesV2Enabled, finalUrls, urlPath1, urlPath2, finalMobileUrls, urlRules, moreOptionsExpand, urlRulesOption]);\r\n\r\n const isReadOnlyUser = useMemo(() => permissions.IsReadOnlyUser || serverContext.CurrentAccount.Status === 32, [permissions.IsReadOnlyUser, serverContext.CurrentAccount.Status]); // 32 is InActive\r\n\r\n const audienceSignalSection = useMemo(() => (\r\n
\r\n

{i18n.getString(_TL_('Audience signals'))} {i18n.getString(_TL_('(OPTIONAL)'))}

\r\n
\r\n \"\"\r\n {i18n.getString(_TL_('Audience signals help us reach the right audience for your ads and maximize your conversions.'))}\r\n {i18n.getString(_TL_('Create an audience signal or choose from your existing audience signals. We’ll use them as a starting point to find customers and determine who sees your ads.'))}\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n ), [i18n, classes.h3LabelOptional, classes.audienceSignalDescription, classes.audienceWizard, audienceGroup, originalAudienceGroup, aid, cid, isReadOnlyUser, wizardPerfMarker]);\r\n\r\n const [\r\n allMoreSettingsSections,\r\n moreSettingsExpandedSections,\r\n setMoreSettingsExpandedSections,\r\n ] = useCollapseState(\r\n permissions.dynamic.SearchThemes ? ['start-end-dates', 'search-themes'] : ['start-end-dates'] /* all sections */,\r\n permissions.dynamic.SearchThemes ? ['start-end-dates', 'search-themes'] : ['start-end-dates'] /* initially expanded sections */\r\n );\r\n const moreSettingsExpand = useMemo(\r\n () => collapseExpander({ setActiveKeys: setMoreSettingsExpandedSections }),\r\n [setMoreSettingsExpandedSections]\r\n );\r\n\r\n const searchThemesSection = useMemo(() => (\r\n
\r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: moreSettingsExpand,\r\n expandKey: 'search-themes',\r\n }}\r\n >\r\n \r\n \r\n \r\n
\r\n ), [allMoreSettingsSections, moreSettingsExpandedSections, setMoreSettingsExpandedSections, i18n, searchThemes, moreSettingsExpand, wizardPerfMarker, onUpdateSearchThemes]);\r\n\r\n const moreSettingsSection = useMemo(() => (\r\n
\r\n
{i18n.getString(_TL_('MORE SETTINGS'))}
\r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: moreSettingsExpand,\r\n expandKey: 'start-end-dates',\r\n }}\r\n >\r\n \r\n \r\n \r\n
\r\n ), [i18n, allMoreSettingsSections, moreSettingsExpandedSections, setMoreSettingsExpandedSections, assetGroup.data.StartDate, assetGroup.data.EndDate, assetGroup.data.Id, campaignTimeZone, moreSettingsExpand]);\r\n\r\n const [previewImagesSharedState, setPreviewImagesSharedState] = useState({\r\n previewImageId: null,\r\n previewLogoId: null,\r\n cropImageObj: null,\r\n editingPlacementType: '',\r\n });\r\n\r\n const imageExperienceComponents = useMemo(() => (\r\n
\r\n \r\n
), [i18n, permissions, campaignId, textAndImageAssetsOptional, onUpdateFinalUrls, previewImagesSharedState, assetGroup.data, suggestionPoller, wizardPerfMarker, postAssetEventLog, isAdPreviewRefreshEnabled, isPMaxAspectRatiosV2Enabled]);\r\n\r\n const displayUrl = useMemo(() => getFinalUrlWithPath(finalUrls, urlPath1, urlPath2), [finalUrls, urlPath1, urlPath2]);\r\n\r\n const adPreview = useMemo(() => {\r\n const previewProps = {\r\n i18n,\r\n imageList: images && images.ImageList,\r\n updateImageList: onUpdateImageList,\r\n shortHeadline: headlines && headlines.Headline0,\r\n longHeadline: longHeadlines && longHeadlines.LongHeadline0,\r\n description: descriptions && descriptions.Description0,\r\n businessName,\r\n callToAction: assetGroup.data.CallToAction,\r\n displayUrl,\r\n url: first(finalUrls),\r\n previewImagesSharedState,\r\n setPreviewImagesSharedState,\r\n };\r\n return (\r\n \r\n );\r\n }, [i18n, images, onUpdateImageList, headlines, longHeadlines, descriptions, businessName, assetGroup.data.CallToAction, displayUrl, finalUrls, previewImagesSharedState, UAPLPMaxLogoPreviewEnabled, extensionsAssociations, PmaxExtensionPreview, isAdPreviewRefreshEnabled, isPMaxAspectRatiosV2Enabled]);\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n {!hideStepHeader &&\r\n <>\r\n

{i18n.getString(_TL_('Asset group'))}

\r\n
\r\n {i18n.getString(_TL_('Performance Max campaigns consist of asset groups, which contain the information and media you want to include in your ads. We\\'ll mix and match the most optimal asset combinations to create effective, high-performing ads.'))}\r\n
\r\n \r\n }\r\n \r\n
\r\n \r\n
\r\n {assetGroupNameSection}\r\n {providerId && listingGroupsSection}\r\n
\r\n
\r\n
\r\n {assetsSection}\r\n {enhanceYourAdsSection}\r\n {moreAssetsSection}\r\n {moreOptionsSection}\r\n
\r\n
\r\n {adPreview}\r\n
\r\n
\r\n
\r\n {audienceSignalSection}\r\n {permissions.dynamic.SearchThemes && searchThemesSection}\r\n {moreSettingsSection}\r\n {imageExperienceComponents}\r\n
\r\n \r\n \r\n {navigationConfirmationPrompt}\r\n
\r\n
\r\n
\r\n\r\n
\r\n );\r\n};\r\n\r\nAssetGroupStep.propTypes = {\r\n stepService: PropTypes.shape({}).isRequired,\r\n scope: PropTypes.shape({\r\n values: PropTypes.shape({\r\n cid: PropTypes.number.isRequired,\r\n aid: PropTypes.number.isRequired,\r\n uid: PropTypes.number.isRequired,\r\n campaignId: PropTypes.number,\r\n assetGroupId: PropTypes.number,\r\n }).isRequired,\r\n }).isRequired,\r\n serverContext: PropTypes.shape({\r\n CurrentAccount: PropTypes.shape({\r\n Status: PropTypes.number,\r\n }).isRequired,\r\n }).isRequired,\r\n instrumentation: PropTypes.shape({\r\n AdsCopilot: PropTypes.shape({\r\n create: PropTypes.func,\r\n }),\r\n }).isRequired,\r\n wizardPerfMarker: PropTypes.shape({}).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n PerformanceMaxCampaignsFinalURLValidation: PropTypes.bool,\r\n PMaxAndDSAFinalURLValidation: PropTypes.bool,\r\n }).isRequired,\r\n }).isRequired,\r\n};\r\n\r\nexport const StepAssetGroupShell = withStepLoadingShell(withInstrumentation(withServerContext(withScope(AssetGroupStep))));\r\n","import { stepStateMachine } from '@bingads-webui-campaign-react/step-wizard-machine';\r\nimport { withRecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { withBannerService } from '@bingads-webui/inline-copilot';\r\nimport { STEP_PATHS } from '../../common/constants';\r\nimport { getErrorsPlaceholders, initialAssetGroupViewModel } from '../../model/asset-group';\r\nimport { patchStepsData, loadData, saveData, needsLoading, needsSaving, isValid, isDirty, clearErrors } from './step-campaign-asset-group-impl';\r\nimport { StepAssetGroupShell } from './step-campaign-asset-group';\r\n\r\nexport const stepAssetGroupWizardConfig = {\r\n id: STEP_PATHS.ASSET_GROUP,\r\n title: _TL_('Asset group'),\r\n StepMachine: stepStateMachine,\r\n StepMachineOptions: (stepInfo, initialStepsData) => ({\r\n machineId: STEP_PATHS.ASSET_GROUP,\r\n initialContext: {\r\n id: stepInfo.id,\r\n stepInfo,\r\n stepsData: initialStepsData,\r\n data: {\r\n assetGroup: initialAssetGroupViewModel,\r\n extensionsAssociations: {},\r\n ...getErrorsPlaceholders(),\r\n },\r\n invalidSaveAttempt: 0,\r\n },\r\n actions: {\r\n patchStepsData,\r\n clearErrors,\r\n },\r\n guards: {\r\n needsLoading,\r\n needsSaving,\r\n isValid,\r\n isDirty,\r\n },\r\n }),\r\n StepComponent: withBannerService(withRecommendationContext(StepAssetGroupShell)),\r\n canNavigateBackWithoutSaving: true,\r\n stepRepositoryConfig: {\r\n saveData,\r\n loadData,\r\n },\r\n};\r\n","import _ from 'underscore';\r\nimport { createOrUpdateCampaign } from '@bingads-webui-campaign-react/perf-max-data';\r\nimport { Campaign, BrandListAssociation } from '@bingads-webui/campaign-odata-schemas';\r\nimport { bulkModelToViewModelForBrandExclusions, bulkModelToViewModelForCampaign, viewModelToBulkModelForCampaign, viewModelToBulkModelForConversionGoals, viewModelToBulkModelForNewCustomerAcquisitionGoals } from './campaign';\r\nimport { viewModelToBulkModelForLocationTargets, viewModelToBulkModelForAdSchedules, viewModelToBulkModelForFinalUrlExpansions } from './campaign-criterions';\r\nimport { getBulkUploadErrorType, modelToViewModelForBulkErrors, removeReferencedEntityInvalidIdErrors, unexpectedBulkErrorToString } from './bulk-upsert-errors';\r\nimport { CampaignNegativeReferenceId } from '../common/constants';\r\nimport { isBulkWrappedResponse } from '../common/bulk';\r\nimport { ERROR_ENTITY, genericApiError } from './api-errors';\r\n\r\nconst bulkUpsertCampaignSettingsEntityErrorMap = {\r\n [getBulkUploadErrorType(Campaign)]: ERROR_ENTITY.Campaign,\r\n 'Campaign Location Criterion Error': ERROR_ENTITY.CampaignLocation,\r\n 'Campaign Radius Criterion Error': ERROR_ENTITY.CampaignRadius,\r\n 'Campaign Negative Location Criterion Error': ERROR_ENTITY.CampaignNegativeLocation,\r\n 'Campaign Location Intent Criterion Error': ERROR_ENTITY.CampaignLocationIntent,\r\n 'Campaign Day Time Criterion Error': ERROR_ENTITY.CampaignDayTimeCriterion,\r\n 'Campaign Negative Webpage Error': ERROR_ENTITY.CampaignNegativeWebpage,\r\n [getBulkUploadErrorType(BrandListAssociation)]: ERROR_ENTITY.BrandListAssociation,\r\n};\r\n\r\nexport const getErrorsPlaceholders = () => ({\r\n serverErrors: [],\r\n systemErrors: [],\r\n});\r\n\r\nexport const saveCampaignAndLinkedData = ({\r\n campaign: campaignViewModel,\r\n originalCampaign: originalCampaignViewModel,\r\n brandExclusions: brandExclusionsViewModel,\r\n bundleCountries,\r\n bundleLocationCriterions,\r\n viewModelToBulkModelForDisclaimerAssociation = null,\r\n}, { scenario, i18n, activityLogger }) => {\r\n const campaignModel = viewModelToBulkModelForCampaign(campaignViewModel, brandExclusionsViewModel);\r\n const locationTargetsModel = viewModelToBulkModelForLocationTargets(campaignViewModel, bundleLocationCriterions);\r\n const adSchedulesModel = viewModelToBulkModelForAdSchedules(campaignViewModel);\r\n const finalUrlExpansionsModel = viewModelToBulkModelForFinalUrlExpansions(campaignViewModel, originalCampaignViewModel);\r\n const conversionGoalsAssociations = {\r\n CampaignConversionGoalAssociations: viewModelToBulkModelForConversionGoals(campaignViewModel, campaignViewModel.data.Id || CampaignNegativeReferenceId),\r\n };\r\n const newCustomerAcquisitionGoal = viewModelToBulkModelForNewCustomerAcquisitionGoals(campaignViewModel);\r\n\r\n const modelToSave = {\r\n ...campaignModel,\r\n CampaignCriterions: [\r\n ...locationTargetsModel,\r\n ...adSchedulesModel,\r\n ],\r\n ...finalUrlExpansionsModel,\r\n ...conversionGoalsAssociations,\r\n ...newCustomerAcquisitionGoal,\r\n };\r\n\r\n let adExtensionAssociations = {};\r\n if (viewModelToBulkModelForDisclaimerAssociation) {\r\n adExtensionAssociations = viewModelToBulkModelForDisclaimerAssociation({ campaignViewModel });\r\n }\r\n _.extend(modelToSave, { ...adExtensionAssociations });\r\n\r\n return createOrUpdateCampaign(modelToSave)\r\n // with bulk the result will have shape of:\r\n // - { ...entityData } - in case of success;\r\n // - { entity: { ...entityData }, errors: [(EditorialError|MTError)] } - in case of error(s).\r\n .then((result) => {\r\n const campaign = bulkModelToViewModelForCampaign({\r\n campaignModel: result,\r\n originalCampaignViewModel: campaignViewModel,\r\n bundleCountries,\r\n });\r\n const { brandExclusions } = bulkModelToViewModelForBrandExclusions({\r\n campaignModel: result,\r\n });\r\n\r\n const data = {\r\n campaign,\r\n brandExclusions,\r\n ...getErrorsPlaceholders(),\r\n };\r\n\r\n return data;\r\n }, (bulkOrSystemError) => {\r\n if (isBulkWrappedResponse(bulkOrSystemError)) {\r\n const { entity, errors } = bulkOrSystemError;\r\n const campaign = entity ?\r\n bulkModelToViewModelForCampaign({\r\n campaignModel: entity,\r\n originalCampaignViewModel: campaignViewModel,\r\n bundleCountries,\r\n errors,\r\n }) :\r\n campaignViewModel;\r\n const { brandExclusions, errors: filteredErrorsAfterBrandExclusions } = bulkModelToViewModelForBrandExclusions({\r\n campaignModel: entity,\r\n errors,\r\n });\r\n\r\n let filteredErrors = filteredErrorsAfterBrandExclusions;\r\n if (campaign.data.Id <= 0) {\r\n filteredErrors = removeReferencedEntityInvalidIdErrors(filteredErrors);\r\n }\r\n const serverErrors = modelToViewModelForBulkErrors(\r\n filteredErrors,\r\n bulkUpsertCampaignSettingsEntityErrorMap,\r\n scenario,\r\n i18n,\r\n activityLogger\r\n );\r\n\r\n const data = {\r\n campaign,\r\n brandExclusions,\r\n ...getErrorsPlaceholders(),\r\n serverErrors,\r\n };\r\n\r\n return _.isEmpty(filteredErrors) ? data : Promise.reject(data);\r\n }\r\n\r\n // Activity\r\n // eslint-disable-next-line no-console\r\n console.warn(`Campaign bulk upsert system error: ${unexpectedBulkErrorToString(bulkOrSystemError)}`);\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n campaign: campaignViewModel,\r\n brandExclusions: brandExclusionsViewModel,\r\n ...getErrorsPlaceholders(),\r\n serverErrors: [genericApiError],\r\n // TODO: We would want to return the criterions with Ids, but UI's bulk drops them\r\n });\r\n });\r\n};\r\n","import { pick } from 'underscore';\r\nimport { readConversionGoalDetails } from '@bingads-webui-campaign-react/perf-max-data';\r\n\r\nconst whitelistedSchemaPropertyKeys = [\r\n 'IsActiveConversionGoalPresent', 'IsActiveConversionGoalPresentWithValidRevenueValue',\r\n];\r\n\r\nexport const modelToViewModelForConversionGoalDetails = (model) => {\r\n const data = pick(model, whitelistedSchemaPropertyKeys);\r\n\r\n return data;\r\n};\r\n\r\nexport const loadConversionGoalDetails = ({ cid, aid }) => readConversionGoalDetails(cid, aid)\r\n .then(modelToViewModelForConversionGoalDetails);\r\n","import { extend, isEmpty, result, noop } from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport { assign } from 'xstate';\r\nimport { readCampaignNegativeWebpages, readDayTimeCriterions, readLocationCriterions, readNewCustomerAcquisitionGoals } from '@bingads-webui-campaign-react/perf-max-data';\r\nimport { showBudgetBidCampaignNotifications } from '@bingads-webui-campaign/import-shared-utils';\r\nimport instrumentation from '@bingads-webui-campaign-legacy/instrumentation/index';\r\nimport { initialBrandExclusionsViewModel, initialCampaignViewModel, loadCampaign, modelToViewModelForCampaign, viewModelToModelForCampaign } from '../../model/campaign';\r\nimport { getErrorsPlaceholders, saveCampaignAndLinkedData } from '../../model/campaign-bulk';\r\nimport { loadBundleCountries } from '../../model/campaign-criterions';\r\nimport { loadConversionGoalDetails } from '../../model/conversion-goals-details';\r\n\r\nconst getCampaignId = context =>\r\n result(context, ['data', 'campaign', 'data', 'Id']) ||\r\n result(context, ['stepsData', 'campaignId']);\r\n\r\n/**\r\n * Loads step data asynchronously. The returned promise must resolve\r\n * into a single object, opaque to the step, which will be saved\r\n * in the context under the `data` property.\r\n *\r\n * The function is called when the wizard enters the step.\r\n * The step will be blocked until the promise resolves.\r\n * @param {Object} context - the current context\r\n * @returns {Promise} a promise that must resolve\r\n * into a single object, opaque to the step, which will be saved\r\n * in the context under the `data` property.\r\n */\r\nexport const loadData = (context) => {\r\n const {\r\n cid, aid, serverContext,\r\n } = context.stepsData;\r\n const { activity = { trace: noop } } = context.data;\r\n activity.trace(`[PmaxWizard] loadData started in campaign settings step. StepId: ${context.id}`);\r\n const campaignId = getCampaignId(context);\r\n const { Permissions, DynamicPermissions } = serverContext || {};\r\n const permissions = { dynamic: { ...DynamicPermissions }, ...Permissions };\r\n const {\r\n NewCustomerAcquisition: isNewCustomerAcquisitionEnabled,\r\n } = permissions.dynamic;\r\n\r\n let loadPromises = {\r\n campaign: Promise.resolve(initialCampaignViewModel),\r\n brandExclusions: Promise.resolve(initialBrandExclusionsViewModel),\r\n bundleCountriesAndLocationCriterions: loadBundleCountries({\r\n cid,\r\n aid,\r\n serverContext,\r\n }),\r\n conversionGoalDetails: loadConversionGoalDetails({ cid, aid }),\r\n ...(isNewCustomerAcquisitionEnabled && { newCustomerAcquisitionGoals: readNewCustomerAcquisitionGoals(cid, aid) }),\r\n };\r\n if (campaignId) {\r\n loadPromises = extend(loadPromises, {\r\n campaign: loadCampaign(cid, aid, campaignId),\r\n // Note: CampaignCriterions are not loaded, but only saved during step life-time.\r\n // It is the responsibility of various targeting controls to load the criterions they manage.\r\n // As an optimization, there are two options:\r\n // 1) Use preFetch (shown below) to pre-load parallel with main data;\r\n // 2) In addition to #1, use stepsData for storing and retrieving\r\n // last edited criterions (can have stale data).\r\n locationCriterions: readLocationCriterions(cid, aid, campaignId),\r\n dayTimeCriterions: readDayTimeCriterions(cid, aid, campaignId),\r\n campaignNegativeWebpages: readCampaignNegativeWebpages(cid, aid, campaignId),\r\n });\r\n }\r\n return Promise.props(loadPromises).then(({\r\n bundleCountriesAndLocationCriterions,\r\n campaign,\r\n brandExclusions,\r\n locationCriterions,\r\n dayTimeCriterions,\r\n campaignNegativeWebpages,\r\n conversionGoalDetails,\r\n newCustomerAcquisitionGoals,\r\n }) => {\r\n let results = {\r\n ...bundleCountriesAndLocationCriterions,\r\n campaign,\r\n brandExclusions,\r\n conversionGoalDetails,\r\n ...getErrorsPlaceholders(),\r\n };\r\n if (campaignId) {\r\n const campaignData = modelToViewModelForCampaign({\r\n campaignModel: campaign,\r\n locationCriterionsModel: locationCriterions ? locationCriterions.value : [],\r\n dayTimeCriterionsModel: dayTimeCriterions ? dayTimeCriterions.value : [],\r\n campaignNegativeWebpagesModel: campaignNegativeWebpages ? campaignNegativeWebpages.value : [],\r\n bundleCountries: bundleCountriesAndLocationCriterions.bundleCountries,\r\n ...(isNewCustomerAcquisitionEnabled && { newCustomerAcquisitionGoalsModel: newCustomerAcquisitionGoals ? newCustomerAcquisitionGoals.value : [] }),\r\n });\r\n results = extend(results, {\r\n campaign: campaignData,\r\n originalCampaign: { ...campaignData },\r\n });\r\n }\r\n activity.trace(`[PmaxWizard] loadData succeeded in campaign settings step. StepId: ${context.id}`);\r\n return results;\r\n }).catch((errorData) => {\r\n activity.trace(`[PmaxWizard] loadData failed. Error: ${JSON.stringify(errorData)}`);\r\n\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n error: {\r\n ...errorData,\r\n },\r\n });\r\n });\r\n};\r\n\r\nexport const saveData = (context) => {\r\n const { activity = { trace: noop } } = context.data;\r\n\r\n return saveCampaignAndLinkedData({\r\n campaign: context.data.campaign,\r\n originalCampaign: context.data.originalCampaign,\r\n brandExclusions: context.data.brandExclusions,\r\n campaignCriterions: context.data.campaignCriterions,\r\n bundleLocationCriterions: context.data.bundleLocationCriterions,\r\n bundleCountries: context.data.bundleCountries,\r\n }, {\r\n scenario: context.stepsData.scenarioName,\r\n activityLogger: context.stepsData.scenario.createActivity('saveCampaignAndLinkedData'),\r\n i18n: context.stepsData.i18n,\r\n }).then((data) => {\r\n activity.trace(`[PmaxWizard] saveData succeeded. StepId: ${context.id}`);\r\n const { activity: BudgetBidCampaignImportNotificationActivity } = instrumentation.createScenarioAndActivity({\r\n scenarioName: 'BudgetBidCampaignImportNotification',\r\n activityName: 'PmaxCampaignSettingPage',\r\n });\r\n\r\n const initialCampaign = context.data.originalCampaign.data;\r\n const newCampaign = context.data.campaign.data;\r\n showBudgetBidCampaignNotifications({\r\n campaignItemList: [initialCampaign],\r\n oldBudget: initialCampaign.Budget,\r\n newBudget: newCampaign.Budget,\r\n oldBidStrategy: initialCampaign.BiddingScheme,\r\n newBidStrategy: newCampaign.BiddingScheme,\r\n activity: BudgetBidCampaignImportNotificationActivity,\r\n });\r\n return data;\r\n }).catch((bulkOrSystemError) => {\r\n activity.trace(`[PmaxWizard] saveData failed. StepId: ${context.id}`);\r\n return Promise.reject(bulkOrSystemError);\r\n });\r\n};\r\n\r\n\r\nexport const needsLoading = () => true;\r\n\r\nexport const isValid = context => context.data.campaign.isValid;\r\nexport const isDirty = context => context.data.campaign.isDirty || context.data.brandExclusions.isDirty;\r\nconst hasServerErrors = context => !isEmpty(context.data.serverErrors) || !isEmpty(context.data.systemErrors);\r\nexport const needsSaving = context => isDirty(context) || hasServerErrors(context);\r\n\r\nexport const patchStepsData = assign({\r\n stepsData: (context/* , event */) => ({\r\n ...context.stepsData,\r\n campaign: viewModelToModelForCampaign(context.data.campaign),\r\n }),\r\n});\r\nexport const clearErrors = assign({\r\n data: context => ({\r\n ...context.data,\r\n ...getErrorsPlaceholders(),\r\n }),\r\n});\r\nexport const hasIncomingSystemError = () => false;\r\n","import { isEmpty } from 'underscore';\r\nimport { useCallback, useMemo, useContext, useState } from 'react';\r\nimport { useSelector } from '@xstate/react';\r\nimport { isCanceling, StepEvents } from '@bingads-webui-campaign-react/step-wizard-machine';\r\nimport { getUrlOptionsDetails } from '@bingads-webui-campaign-react/url-options';\r\nimport { getBidBudgetTitleDetails, getConversionGoalTitleDetails, getStoreTitleDetails } from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { buildLegacyI18n } from '@bingads-webui/build-legacy-i18n';\r\nimport { ValidationStringMap } from '@bingads-webui/validation-string-map';\r\nimport { useExitWithoutSavingConfirmation } from '@bingads-webui-campaign-react/step-wizard';\r\nimport { useImpulse, usePrevProp, useIsMounted } from '@bingads-webui-campaign-react/step-wizard-controls';\r\nimport { needsSaving } from './step-campaign-settings-impl';\r\nimport { serverErrorsCompare } from '../shared';\r\n\r\nconst doesNeedSavingSelector = state => !isCanceling(state) && needsSaving(state.context);\r\nconst hideStepHeaderSelector = state => state.context.stepInfo.hideStepHeader;\r\nconst scenarioNameSelector = state => state.context.stepsData.scenarioName;\r\nconst campaignObjectiveSelector = state => state.context.stepsData.campaignObjective;\r\nconst serverContextSelector = state => state.context.stepsData.serverContext;\r\nconst campaignIdSelector = state => state.context.stepsData.campaignId;\r\nconst campaignSelector = state => state.context.data.campaign;\r\nconst locationTargetsSelector = state => state.context.data.campaign.data.locationTargets;\r\nconst adSchedulesSelector = state => state.context.data.campaign.data.adSchedules;\r\nconst adSchedulesBulkUpsertModelSelector = state => state.context.data.campaign.data.adSchedulesBulkUpsert;\r\nconst finalUrlExpansionsSelector = state => state.context.data.campaign.data.finalUrlExpansions;\r\nconst finalUrlExpansionOptOutSelector = state => state.context.data.campaign.data.finalUrlExpansionOptOut;\r\nconst finalUrlExpansionsBulkUpsertModelSelector = state => state.context.data.campaign.data.finalUrlExpansionsBulkUpsert;\r\nconst bundleCountriesSelector = state => state.context.data.bundleCountries;\r\nconst bundleLocationCriterionsSelector = state => state.context.data.bundleLocationCriterions;\r\nconst serverErrorsSelector = state => state.context.data.serverErrors;\r\nconst systemErrorsSelector = state => state.context.data.systemErrors;\r\nconst invalidSaveAttemptSelector = state => state.context.invalidSaveAttempt;\r\nconst urlCustomParametersSelector = state => state.context.data.campaign.data.UrlCustomParameters;\r\nconst trackingUrlTemplateSelector = state => state.context.data.campaign.data.TrackingUrlTemplate;\r\nconst finalUrlSuffixSelector = state => state.context.data.campaign.data.FinalUrlSuffix;\r\nconst conversionGoalsSelector = state => state.context.data.campaign.data.conversionGoals;\r\nconst permissionsSelector = state => state.context.stepsData.permissions;\r\nconst currentLocaleSelector = state => state.context.stepsData.serverContext.CurrentLocale;\r\nconst advertiserCustomerIdSelector = state => state.context.stepsData.serverContext.CurrentAccount.AdvertiserCustomerID;\r\nconst conversionGoalsDetailsSelector = state => state.context.data.conversionGoalDetails;\r\nconst autoGeneratedTextOptOutSelector = state => state.context.data.campaign.data.autoGeneratedTextOptOut;\r\nconst autoGeneratedImageOptOutSelector = state => state.context.data.campaign.data.autoGeneratedImageOptOut;\r\nconst savedAddedBrandListIdsSelector = state => state.context.data.brandExclusions.data.savedAddedBrandListIds;\r\nconst savedDeletedBrandListIdsSelector = state => state.context.data.brandExclusions.data.savedDeletedBrandListIds;\r\nconst costPerSaleOptOutSelector = state => state.context.data.campaign.data.costPerSaleOptOut;\r\nconst currencySelector = state => state.context.stepsData.serverContext.CurrentAccount.CurrencyCode;\r\nconst newCustomerAcquisitionSelector = state => state.context.data.campaign.data.newCustomerAcquisition;\r\nconst newCustomerAcquisitionOptOutSelector = state => state.context.data.campaign.data.newCustomerAcquisitionOptOut;\r\n\r\nexport const useStepCampaignSettingsState = (stepService, activity) => {\r\n const isMounted = useIsMounted();\r\n const i18n = useContext(I18nContext);\r\n const legacyI18n = useMemo(() => buildLegacyI18n(i18n, [ValidationStringMap]), [i18n]);\r\n\r\n const hideStepHeader = useSelector(stepService, hideStepHeaderSelector);\r\n const scenarioName = useSelector(stepService, scenarioNameSelector);\r\n\r\n const campaignObjective = useSelector(stepService, campaignObjectiveSelector);\r\n const serverContext = useSelector(stepService, serverContextSelector);\r\n const campaignId = useSelector(stepService, campaignIdSelector);\r\n const campaign = useSelector(stepService, campaignSelector);\r\n const locationTargets = useSelector(stepService, locationTargetsSelector);\r\n const adSchedules = useSelector(stepService, adSchedulesSelector);\r\n const adSchedulesBulkUpsert = useSelector(stepService, adSchedulesBulkUpsertModelSelector);\r\n const finalUrlExpansions = useSelector(stepService, finalUrlExpansionsSelector);\r\n const finalUrlExpansionOptOut = useSelector(stepService, finalUrlExpansionOptOutSelector);\r\n const finalUrlExpansionsBulkUpsert = useSelector(stepService, finalUrlExpansionsBulkUpsertModelSelector);\r\n const autoGeneratedTextOptOut = useSelector(stepService, autoGeneratedTextOptOutSelector);\r\n const autoGeneratedImageOptOut = useSelector(stepService, autoGeneratedImageOptOutSelector);\r\n const bundleCountries = useSelector(stepService, bundleCountriesSelector);\r\n const bundleLocationCriterions = useSelector(stepService, bundleLocationCriterionsSelector);\r\n const urlCustomParameters = useSelector(stepService, urlCustomParametersSelector);\r\n const trackingUrlTemplate = useSelector(stepService, trackingUrlTemplateSelector);\r\n const finalUrlSuffix = useSelector(stepService, finalUrlSuffixSelector);\r\n const conversionGoalsState = useSelector(stepService, conversionGoalsSelector);\r\n const conversionGoalsDetails = useSelector(stepService, conversionGoalsDetailsSelector);\r\n const savedAddedBrandListIds = useSelector(stepService, savedAddedBrandListIdsSelector);\r\n const savedDeletedBrandListIds = useSelector(stepService, savedDeletedBrandListIdsSelector);\r\n const costPerSaleOptOut = useSelector(stepService, costPerSaleOptOutSelector);\r\n const newCustomerAcquisition = useSelector(stepService, newCustomerAcquisitionSelector);\r\n const newCustomerAcquisitionOptOut = useSelector(stepService, newCustomerAcquisitionOptOutSelector);\r\n\r\n const doesNeedSaving = useSelector(stepService, doesNeedSavingSelector);\r\n const serverErrors = useSelector(stepService, serverErrorsSelector);\r\n const systemErrors = useSelector(stepService, systemErrorsSelector);\r\n const invalidSaveAttempt = useSelector(stepService, invalidSaveAttemptSelector);\r\n const locale = useSelector(stepService, currentLocaleSelector);\r\n const permissions = useSelector(stepService, permissionsSelector);\r\n const advertiserCustomerId = useSelector(stepService, advertiserCustomerIdSelector);\r\n const currency = useSelector(stepService, currencySelector);\r\n\r\n const [navigationConfirmationPrompt] = useExitWithoutSavingConfirmation(doesNeedSaving, stepService, i18n);\r\n\r\n const conversionGoals = useMemo(() => ({\r\n conversionGoals: conversionGoalsState,\r\n }), [conversionGoalsState]);\r\n const conversionGoalsTitleDetails = useMemo(() => getConversionGoalTitleDetails(i18n, conversionGoalsState), [i18n, conversionGoalsState]);\r\n\r\n const urlOptions = useMemo(() => ({\r\n TrackingUrlTemplate: trackingUrlTemplate,\r\n FinalUrlSuffix: finalUrlSuffix,\r\n UrlCustomParameters: urlCustomParameters,\r\n }), [trackingUrlTemplate, finalUrlSuffix, urlCustomParameters]);\r\n const urlOptionsDetails = useMemo(() => getUrlOptionsDetails(i18n, urlOptions), [urlOptions, i18n]);\r\n\r\n const biddingScheme = useMemo(() => ({ BiddingScheme: campaign.data.BiddingScheme }), [campaign.data.BiddingScheme]);\r\n const bidBudgetTitleDetails = useMemo(\r\n () => getBidBudgetTitleDetails(serverContext, i18n, campaign.data.BiddingScheme, campaign.data.Budget),\r\n [campaign.data.BiddingScheme, campaign.data.Budget, i18n, serverContext]\r\n );\r\n\r\n const storeContainerData = useMemo(() => ({\r\n ProviderId: campaign.data.ProviderId,\r\n IsFeedFiltered: campaign.data.IsFeedFiltered,\r\n SalesCountry: campaign.data.SalesCountry,\r\n FeedLabel: campaign.data.FeedLabel,\r\n LocalInventoryAdsEnabled: campaign.data.LocalInventoryAdsEnabled,\r\n }), [campaign.data.ProviderId, campaign.data.IsFeedFiltered, campaign.data.SalesCountry, campaign.data.FeedLabel, campaign.data.LocalInventoryAdsEnabled]);\r\n\r\n const [storesData, setStoresData] = useState({ error: undefined, stores: {}, countries: {} });\r\n const onStoreDataLoaded = useCallback(({ error, stores = {}, countries = {} }) => {\r\n if (isMounted.current) {\r\n setStoresData({ error, stores, countries });\r\n }\r\n }, [isMounted]);\r\n\r\n const storeTitleDetails = useMemo(() => getStoreTitleDetails(i18n, storesData, storeContainerData), [i18n, storesData, storeContainerData]);\r\n\r\n const onCampaignValidation = useCallback((results) => {\r\n if (!isMounted.current) return;\r\n const { data: newCampaignData, ...restResults } = results;\r\n const dataPatch = {\r\n campaign: {\r\n ...campaign,\r\n data: {\r\n ...campaign.data,\r\n ...newCampaignData,\r\n },\r\n ...restResults,\r\n },\r\n activity,\r\n };\r\n // log('UPDATE_VALIDATION, results=_, dataPatch=_', results, dataPatch);\r\n stepService.send({ type: StepEvents.UPDATE_VALIDATION, data: dataPatch });\r\n }, [stepService, campaign, isMounted, activity]);\r\n\r\n // This callback tracks user-made changes to the page feeds selection.\r\n const onPageFeedsChange = useCallback((selectedPageFeeds) => {\r\n if (!isMounted.current) return;\r\n const dataPatch = {\r\n campaign: {\r\n ...campaign,\r\n isDirty: true,\r\n data: {\r\n ...campaign.data,\r\n pageFeeds: selectedPageFeeds,\r\n },\r\n },\r\n };\r\n stepService.send({ type: StepEvents.UPDATE_VALIDATION, data: dataPatch });\r\n }, [stepService, campaign, isMounted]);\r\n\r\n const [reportedSelectedPageFeeds, setReportedSelectedPageFeeds] = useState([]);\r\n // This callback tracks the page feeds selection reported by the page feed selector\r\n // and uses the reported information to update the page feeds details.\r\n const onSelectedPageFeedsUpdate = useCallback((selectedPageFeeds) => {\r\n if (!isMounted.current) return;\r\n setReportedSelectedPageFeeds(selectedPageFeeds);\r\n }, [isMounted]);\r\n const pageFeedsDetails = useMemo(\r\n () => {\r\n if (isEmpty(reportedSelectedPageFeeds)) {\r\n return i18n.getString(_TL_('Upload all the relevant URLs for your campaign by spreadsheet.'));\r\n }\r\n if (reportedSelectedPageFeeds.length === 1) {\r\n return i18n.getString(_TL_('You’ve successfully added 1 page feed.'));\r\n }\r\n return i18n.getString(_TL_('You’ve successfully added {{number}} page feeds.'), { number: reportedSelectedPageFeeds.length });\r\n },\r\n [i18n, reportedSelectedPageFeeds]\r\n );\r\n\r\n // This callback tracks user-made changes to the brand lists selection.\r\n const onBrandListsChange = useCallback((selectedBrandLists, [deletedBrandListIds, addedBrandListIds]) => {\r\n if (!isMounted.current) return;\r\n const dataPatch = {\r\n brandExclusions: {\r\n isDirty: true,\r\n data: {\r\n deletedBrandListIds,\r\n addedBrandListIds,\r\n },\r\n },\r\n };\r\n stepService.send({ type: StepEvents.UPDATE_VALIDATION, data: dataPatch });\r\n }, [stepService, isMounted]);\r\n\r\n const [reportedSelectedBrandLists, setReportedSelectedBrandLists] = useState([]);\r\n // This callback tracks the brand lists selection reported by the brand list selector\r\n // and uses the reported information to update the brand lists panel details.\r\n const onSelectedBrandListsUpdate = useCallback((selectedBrandLists) => {\r\n if (!isMounted.current) return;\r\n setReportedSelectedBrandLists(selectedBrandLists);\r\n }, [isMounted]);\r\n const brandListsDetails = useMemo(\r\n () => {\r\n if (isEmpty(reportedSelectedBrandLists)) {\r\n return i18n.getString(_TL_('Add brand exclusions so that your ads won’t show on search queries that mention those brands.'));\r\n }\r\n if (reportedSelectedBrandLists.length === 1) {\r\n return i18n.getString(_TL_('You’ve added 1 brand list, which makes it so that your ads won’t show on search queries that mention those brands.'));\r\n }\r\n return i18n.getString(_TL_('You’ve added {{number}} brand lists, which makes it so that your ads won’t show on search queries that mention those brands.'), { number: reportedSelectedBrandLists.length });\r\n },\r\n [i18n, reportedSelectedBrandLists]\r\n );\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 const autoGenAssetsData = {\r\n finalUrlExpansions,\r\n options: {\r\n finalUrlExpansionOptOut,\r\n autoGeneratedTextOptOut,\r\n autoGeneratedImageOptOut,\r\n },\r\n };\r\n\r\n // eslint-disable-next-line no-bitwise\r\n const [, hasInvalidSaveAttemptChanged] = usePrevProp(invalidSaveAttempt | 0);\r\n const [, hasServerErrorsChanged] = usePrevProp(serverErrors, serverErrorsCompare);\r\n const areBeaconsActive = useImpulse(hasInvalidSaveAttemptChanged || hasServerErrorsChanged);\r\n\r\n const [showAllValidationErrors, setShowAllValidationErrors] = useState(false);\r\n if (hasInvalidSaveAttemptChanged) {\r\n setShowAllValidationErrors(true);\r\n }\r\n\r\n const state = {\r\n isMounted,\r\n scenarioName,\r\n campaign,\r\n biddingScheme,\r\n bidBudgetTitleDetails,\r\n adSchedules,\r\n adSchedulesBulkUpsert,\r\n finalUrlExpansions,\r\n finalUrlExpansionsBulkUpsert,\r\n finalUrlExpansionOptOut,\r\n locationTargets,\r\n conversionGoals,\r\n conversionGoalsTitleDetails,\r\n conversionGoalsDetails,\r\n bundleCountries,\r\n bundleLocationCriterions,\r\n i18n,\r\n legacyI18n,\r\n hideStepHeader,\r\n campaignId,\r\n urlOptions,\r\n urlOptionsDetails,\r\n showAllValidationErrors,\r\n areBeaconsActive,\r\n serverErrors,\r\n systemErrors,\r\n navigationConfirmationPrompt,\r\n campaignObjective,\r\n storeContainerData,\r\n storeTitleDetails,\r\n permissions,\r\n locale,\r\n advertiserCustomerId,\r\n pageFeedsDetails,\r\n autoGenAssetsData,\r\n autoGenAssetsSummary,\r\n brandListsDetails,\r\n savedAddedBrandListIds,\r\n savedDeletedBrandListIds,\r\n costPerSaleOptOut,\r\n currency,\r\n newCustomerAcquisition,\r\n newCustomerAcquisitionOptOut,\r\n };\r\n const api = {\r\n onCampaignValidation, onStoreDataLoaded, onPageFeedsChange, onSelectedPageFeedsUpdate, onBrandListsChange, onSelectedBrandListsUpdate,\r\n };\r\n\r\n return [state, api];\r\n};\r\n","export const getStepCampaignSettingsStyles = (_, { palette = {} }) => ({\r\n urlOptionsContainer: {\r\n maxWidth: 435,\r\n },\r\n moreBasicCampaignSection: {\r\n '& .advanced-scheduling-grid': {\r\n '& .alert-info-inline': {\r\n '& a:focus': {\r\n outline: `1px solid ${palette.neutralSecondary}`,\r\n },\r\n },\r\n },\r\n },\r\n collapsiblePanel: {\r\n border: 'none',\r\n marginBottom: 'unset',\r\n backgroundColor: 'unset',\r\n\r\n '& .panel-heading': {\r\n padding: 0,\r\n borderBottom: 'none',\r\n marginBottom: 18,\r\n\r\n '& .panel-title': {\r\n fontSize: 18,\r\n '& > a': {\r\n marginLeft: '-8px', // compensate 8px padding on the left of icon\r\n color: palette.themePrimary,\r\n padding: 0,\r\n '&:hover, &:active': {\r\n color: palette.themeDarker,\r\n textDecoration: 'none',\r\n backgroundColor: 'unset',\r\n },\r\n },\r\n\r\n '& > a:after': {\r\n transform: 'rotate(180deg)',\r\n },\r\n\r\n '& > a.collapsed:after': {\r\n transform: 'rotate(90deg)',\r\n },\r\n },\r\n },\r\n\r\n '& .panel-collapse': {\r\n '& .panel-body': {\r\n padding: 0,\r\n overflow: 'hidden',\r\n },\r\n },\r\n },\r\n\r\n advancedBidStrategyContent: {\r\n '& .toggle-icon': {\r\n visibility: 'hidden',\r\n },\r\n },\r\n\r\n header: {\r\n marginBottom: 20,\r\n },\r\n});\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React, { useState, useMemo, useCallback, useEffect, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { map, without } from 'underscore';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport {\r\n ConversionBasedBiddingBanner,\r\n getAdScheduleDetails,\r\n getLocationTargetTitleDetails,\r\n getFinalUrlExpansionTitleDetails,\r\n} from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport { Panel as BootstrapPanel } from 'react-bootstrap';\r\nimport {\r\n Collapse,\r\n TextTitle,\r\n useCollapseState,\r\n collapseExpander,\r\n ValidatedBootstrapPanel,\r\n ValidatedFixedPanel,\r\n ValidatedPanel,\r\n getPanelErrorProps\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { Link, Stack, Label } from '@bingads-webui-react/fabric-control';\r\nimport { ValidatedLegacyAdSchedule } from '@bingads-webui-campaign/ad-schedule';\r\nimport { ValidatedLegacyFinalUrlExpansion } from '@bingads-webui-campaign-react/legacy-final-url-expansion';\r\nimport { ValidationGroup, ErrorMessages } from '@bingads-webui-react/validation';\r\nimport {\r\n FormErrorGroup, UnmappedFormErrors as OriginalUnmappedFormErrors,\r\n entityIs, andComp, propertyIs, anyComp, notComp, StandardControlAdapter,\r\n} from '@bingads-webui-campaign-react/form-error';\r\nimport { AttentionBeaconGroup } from '@bingads-webui-campaign-react/attention-beacon';\r\nimport { ActuationGroup, FocusableActuator } from '@bingads-webui-campaign-react/actuator';\r\nimport { withUnvalidatedControlErrors, withContainerErrors, withControlErrorHandling, FormErrorBeaconAdapter } from '@bingads-webui-campaign-react/error-handling';\r\nimport { Campaign } from '@bingads-webui/campaign-odata-schemas';\r\nimport { StoreSelectContainer } from '@bingads-webui-campaign-react/store-select';\r\nimport { ValidatedUrlOptionsParameter } from '@bingads-webui-campaign-react/validated-url-input';\r\nimport {\r\n LanguageTargetValidatorFactory,\r\n ValidatedLanguageTarget,\r\n ValidatedLegacyBudget,\r\n ValidatedLegacyBidStrategy,\r\n ValidatedLocationTargetSetting,\r\n ValidatedConversionGoals\r\n} from '@bingads-webui-campaign-react/step-wizard-controls';\r\nimport { withStepLoadingShell } from '@bingads-webui-campaign-react/step-wizard';\r\nimport { FluentProvider, webLightTheme } from '@fluentui/react-components';\r\nimport { PageFeedSelectorSection } from '@bingads-webui-campaign-react/page-feed-selector';\r\nimport { BrandListsPicker } from '@bingads-webui-campaign-react/brand-lists-components';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { ValidatedAutoGeneratedAssets } from '@bingads-webui-campaign-react/auto-generated-assets';\r\nimport { ValidatedCostPerSale } from '@bingads-webui-campaign-react/cost-per-sale-option';\r\nimport { ValidatedNewCustomerAcquisition, ValidatedNewCustomerAcquisitionHeader, newCustomerAcquisitionServerErrorFilter } from '@bingads-webui-campaign-react/new-customer-acquisition';\r\nimport { useStepCampaignSettingsState } from './use-step-campaign-settings-state';\r\nimport { apiErrorMapper, ERROR_ENTITY } from '../../model/api-errors';\r\nimport { ScenarioName, campaignLanguageStrings } from '../../common/constants';\r\nimport {\r\n ServerValidatedRemainingCharsValidatedTextField,\r\n} from '../shared';\r\nimport { getStepCampaignSettingsStyles } from './step-campaign-settings-styles';\r\nimport BudgetBidImg from './media/budget-bid.svg';\r\nimport AdScheduleImg from './media/ad-schedule.svg';\r\nimport UrlOptionsImg from './media/campaign-url-options.svg';\r\nimport ConversionsImg from './media/conversions.svg';\r\nimport FinalUrlExpansionsImg from './media/final-url-expansion.svg';\r\nimport LanguageImg from './media/language.svg';\r\nimport LocationImg from './media/location.svg';\r\nimport ShoppingImg from './media/shopping.svg';\r\nimport PageFeedsImg from './media/page-feeds.svg';\r\nimport AutoGenAssetsImg from './media/auto-gen-assets.svg';\r\nimport BrandExclusionsImg from './media/brand-exclusions.svg';\r\nimport CostPerSaleImg from './media/cost-per-sale.svg';\r\n\r\nconst entityIsCampaign = entityIs(ERROR_ENTITY.Campaign);\r\n\r\nconst campaignNameProp = andComp(entityIsCampaign, propertyIs('Name'));\r\nconst campaignBudgetProp = andComp(entityIsCampaign, propertyIs('Budget'));\r\nconst campaignBiddingSchemeProp = andComp(entityIsCampaign, propertyIs('BiddingScheme'));\r\nconst campaignLanguagesProp = andComp(entityIsCampaign, propertyIs('Languages'));\r\nconst feedAssociationsProp = andComp(entityIsCampaign, propertyIs('FeedAssociations'));\r\nconst campaignCPSOptOutProp = andComp(entityIsCampaign, propertyIs('CostPerSaleOptOut'));\r\nconst campaignLocationCriterions = anyComp(\r\n entityIs(ERROR_ENTITY.CampaignLocation),\r\n entityIs(ERROR_ENTITY.CampaignRadius),\r\n entityIs(ERROR_ENTITY.CampaignNegativeLocation),\r\n entityIs(ERROR_ENTITY.CampaignLocationIntent)\r\n);\r\nconst campaignDayTimeCriterions = entityIs(ERROR_ENTITY.CampaignDayTimeCriterion);\r\nconst campaignNegativeWebPages = entityIs(ERROR_ENTITY.CampaignNegativeWebpage);\r\nconst campaignUrlOptionsProperties = andComp(\r\n entityIsCampaign,\r\n anyComp(\r\n propertyIs('TrackingUrlTemplate'),\r\n propertyIs('FinalUrlSuffix'),\r\n propertyIs('UrlCustomParameters')\r\n )\r\n);\r\nconst brandListAssociationEntity = entityIs(ERROR_ENTITY.BrandListAssociation);\r\n\r\nconst notCampaignUrlOptionsProperties = notComp(campaignUrlOptionsProperties);\r\nconst ServerValidatedLegacyBudget = withControlErrorHandling(withUnvalidatedControlErrors(ValidatedLegacyBudget, { filter: campaignBudgetProp }));\r\nconst ServerValidatedLegacyBidStrategy = withControlErrorHandling(withUnvalidatedControlErrors(ValidatedLegacyBidStrategy, { filter: campaignBiddingSchemeProp }));\r\nconst ServerValidatedLanguageTarget = withControlErrorHandling(withUnvalidatedControlErrors(ValidatedLanguageTarget, { filter: campaignLanguagesProp }));\r\nconst ServerValidatedLocationTargetSetting = withControlErrorHandling(withUnvalidatedControlErrors(ValidatedLocationTargetSetting, { filter: campaignLocationCriterions }));\r\nconst ServerValidatedLegacyAdSchedule = withControlErrorHandling(withUnvalidatedControlErrors(ValidatedLegacyAdSchedule, { filter: campaignDayTimeCriterions }));\r\nconst ServerValidatedLegacyFinalUrlExpansion = withControlErrorHandling(withUnvalidatedControlErrors(ValidatedLegacyFinalUrlExpansion, { filter: campaignNegativeWebPages }));\r\nconst ServerValidatedPageFeedSelectorSection = withControlErrorHandling(withContainerErrors(PageFeedSelectorSection, { filter: feedAssociationsProp, Adapter: StandardControlAdapter() }), [FocusableActuator], [FormErrorBeaconAdapter]);\r\nconst ServerValidatedBrandListsPicker = withControlErrorHandling(withContainerErrors(BrandListsPicker, { filter: brandListAssociationEntity, Adapter: StandardControlAdapter() }), [FocusableActuator], [FormErrorBeaconAdapter]);\r\nconst ServerValidatedAutoGeneratedAssets = withControlErrorHandling(withUnvalidatedControlErrors(ValidatedAutoGeneratedAssets, { filter: campaignNegativeWebPages }));\r\nconst ServerValidatedCostPerSale = withControlErrorHandling(withUnvalidatedControlErrors(ValidatedCostPerSale, { filter: campaignCPSOptOutProp }));\r\nconst ServerValidatedNewCustomerAcquisition = withControlErrorHandling(withUnvalidatedControlErrors(ValidatedNewCustomerAcquisition, { filter: newCustomerAcquisitionServerErrorFilter }));\r\nconst UnmappedFormErrors = withControlErrorHandling(OriginalUnmappedFormErrors);\r\n\r\nconst StepCampaignSettings = (props) => {\r\n const {\r\n stepService,\r\n scope,\r\n } = props;\r\n\r\n const activity = useContext(ActivityContext);\r\n const [stepState, stepApi] = useStepCampaignSettingsState(stepService, activity);\r\n\r\n const [adScheduleView, setAdScheduleView] = useState(null);\r\n const setAdScheduleViewCallback = useCallback((view) => {\r\n setAdScheduleView(view);\r\n }, []);\r\n const [finalUrlExpansionsView, setFinalUrlExpansionsView] = useState(null);\r\n const setFinalUrlExpansionsViewCallback = useCallback((view) => {\r\n setFinalUrlExpansionsView(view);\r\n }, []);\r\n\r\n const {\r\n i18n,\r\n legacyI18n,\r\n hideStepHeader,\r\n scenarioName,\r\n campaignId,\r\n campaign,\r\n campaignObjective,\r\n biddingScheme,\r\n bidBudgetTitleDetails,\r\n locationTargets,\r\n adSchedules,\r\n conversionGoals,\r\n conversionGoalsTitleDetails,\r\n conversionGoalsDetails,\r\n finalUrlExpansions,\r\n finalUrlExpansionOptOut,\r\n bundleCountries,\r\n bundleLocationCriterions,\r\n urlOptions,\r\n urlOptionsDetails,\r\n serverErrors,\r\n systemErrors,\r\n areBeaconsActive,\r\n showAllValidationErrors,\r\n navigationConfirmationPrompt,\r\n storeContainerData,\r\n storeTitleDetails,\r\n permissions,\r\n locale,\r\n advertiserCustomerId,\r\n pageFeedsDetails,\r\n autoGenAssetsSummary,\r\n autoGenAssetsData,\r\n brandListsDetails,\r\n savedAddedBrandListIds,\r\n savedDeletedBrandListIds,\r\n costPerSaleOptOut,\r\n currency,\r\n newCustomerAcquisition,\r\n newCustomerAcquisitionOptOut,\r\n } = stepState;\r\n const {\r\n onCampaignValidation, onStoreDataLoaded, onPageFeedsChange, onSelectedPageFeedsUpdate,\r\n onBrandListsChange, onSelectedBrandListsUpdate,\r\n } = stepApi;\r\n\r\n const {\r\n PerformanceMaxCampaignsPageFeeds: IsPerformanceMaxCampaignsPageFeedsEnabled,\r\n PerformanceMaxCampaignsAutoGenAssetControl: IsPerformanceMaxCampaignsAutoGenAssetControlEnabled,\r\n PerformanceMaxInCnMarket: IsPerformanceMaxInCnMarketEnabled,\r\n BrandExclusion: IsBrandExclusionEnabled,\r\n SupportCPSForPmax: IsSupportCPSForPmaxEnabled,\r\n EnableBudgetSuggestion: showBudgetSuggestion,\r\n NewCustomerAcquisition: IsNewCustomerAcquisitionEnabled,\r\n ConversionAssociationWarning: IsConversionAssociationWarningEnabled,\r\n } = permissions.dynamic;\r\n\r\n const { IsDomesticSimplifiedChineseEnabled } = permissions;\r\n\r\n const isFeatureBlockedForCnMarket = IsDomesticSimplifiedChineseEnabled && IsPerformanceMaxInCnMarketEnabled;\r\n\r\n useEffect(() => {\r\n activity.trace('[PmaxWizard] StepCampaignSettings mounted');\r\n }, [activity]);\r\n\r\n const effectiveCampaignId = useMemo(\r\n () => {\r\n let savedCampaignId;\r\n if (campaignId > 0) {\r\n savedCampaignId = campaignId;\r\n } else if (campaign.data.Id > 0) {\r\n savedCampaignId = campaign.data.Id;\r\n } else {\r\n savedCampaignId = undefined;\r\n }\r\n return savedCampaignId;\r\n },\r\n [campaignId, campaign.data.Id]\r\n );\r\n\r\n const classes = useDefaultStyles(getStepCampaignSettingsStyles);\r\n\r\n const [\r\n allCampaignSettingsSections,\r\n campaignSettingsExpandedSections,\r\n setCampaignSettingsExpandedSections,\r\n flipCampaignSettingsExpandAllState,\r\n ] = useCollapseState(\r\n ['campaign', 'locations', 'language-target', 'budget-bid', 'new-customer-acquisition', 'conversions', 'shopping-ads', 'advanced-bid-strategy'] /* all sections */,\r\n ['campaign', 'locations', 'language-target', 'budget-bid', 'new-customer-acquisition', 'conversions', 'shopping-ads'] /* initially expanded sections */\r\n );\r\n const basicSettingsExpand = useMemo(\r\n () => collapseExpander({ setActiveKeys: setCampaignSettingsExpandedSections }),\r\n [setCampaignSettingsExpandedSections]\r\n );\r\n\r\n const [\r\n allMoreSettingsSections,\r\n moreSettingsExpandedSections,\r\n setMoreSettingsExpandedSections,\r\n flipMoreSettingsExpandAllState,\r\n ] = useCollapseState(\r\n ['ad-schedule', 'start-end-dates', 'final-url-expansion', 'page-feeds', 'auto-gen-assets', 'brand-exclusions', 'campaign-url-options'] /* all sections */,\r\n [] /* initially expanded sections */\r\n );\r\n const moreBasicSettingsExpand = useMemo(\r\n () => collapseExpander({ setActiveKeys: setMoreSettingsExpandedSections }),\r\n [setMoreSettingsExpandedSections]\r\n );\r\n\r\n const basicSettingsSection = useMemo(() => {\r\n const campaignPanel = (\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n >\r\n \r\n \r\n );\r\n const bidBudgetPanel = (\r\n }\r\n formErrorProps={{ showAllValidationErrors: true }}\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: basicSettingsExpand,\r\n expandKey: 'budget-bid',\r\n }}\r\n >\r\n \r\n \r\n \r\n \r\n );\r\n const newCustomerAcquisitionPanel = (\r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: basicSettingsExpand,\r\n expandKey: 'new-customer-acquisition',\r\n }}\r\n >\r\n \r\n \r\n );\r\n const advancedBidStrategy = (\r\n (\r\n <>\r\n \r\n \r\n {i18n.getString(_TL_('Advanced bid strategy'))}\r\n \r\n \r\n \r\n \r\n
\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n isActive\r\n >\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n )}\r\n />\r\n );\r\n const locationPanel = (\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: basicSettingsExpand,\r\n expandKey: 'locations',\r\n }}\r\n >\r\n \r\n \r\n );\r\n const languagePanel = (\r\n i18n.getString(campaignLanguageStrings[lang] || lang)).toString()}\r\n icon={LanguageImg}\r\n />}\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: basicSettingsExpand,\r\n expandKey: 'language-target',\r\n }}\r\n >\r\n \r\n \r\n );\r\n const conversionPanel = (\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: basicSettingsExpand,\r\n expandKey: 'conversions',\r\n }}\r\n >\r\n \r\n \r\n );\r\n const shoppingAdsPanel = (\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: basicSettingsExpand,\r\n expandKey: 'shopping-ads',\r\n }}\r\n >\r\n \r\n \r\n );\r\n\r\n let generalSettings = [\r\n campaignPanel,\r\n bidBudgetPanel,\r\n newCustomerAcquisitionPanel,\r\n advancedBidStrategy,\r\n locationPanel,\r\n languagePanel,\r\n conversionPanel,\r\n shoppingAdsPanel,\r\n ];\r\n let sellFromCatalogSettings = [\r\n campaignPanel,\r\n bidBudgetPanel,\r\n newCustomerAcquisitionPanel,\r\n advancedBidStrategy,\r\n shoppingAdsPanel,\r\n locationPanel,\r\n languagePanel,\r\n conversionPanel,\r\n ];\r\n\r\n if (!IsSupportCPSForPmaxEnabled) {\r\n generalSettings = without(generalSettings, advancedBidStrategy);\r\n sellFromCatalogSettings = without(sellFromCatalogSettings, advancedBidStrategy);\r\n }\r\n\r\n if (!IsNewCustomerAcquisitionEnabled) {\r\n generalSettings = without(generalSettings, newCustomerAcquisitionPanel);\r\n sellFromCatalogSettings = without(sellFromCatalogSettings, newCustomerAcquisitionPanel);\r\n }\r\n\r\n return (\r\n
\r\n \r\n {campaignSettingsExpandedSections.length ? i18n.getString(_TL_('Collapse all')) : i18n.getString(_TL_('Expand all'))}\r\n \r\n \r\n {campaignObjective === 'ShoppingCampaign' ? sellFromCatalogSettings\r\n : generalSettings}\r\n \r\n
\r\n );\r\n }, [i18n, bidBudgetTitleDetails, basicSettingsExpand, campaign, campaignId, showBudgetSuggestion, scenarioName, currency, biddingScheme, scope, conversionGoalsDetails, newCustomerAcquisitionOptOut, newCustomerAcquisition, advertiserCustomerId, classes.collapsiblePanel, classes.advancedBidStrategyContent, locationTargets, bundleCountries, bundleLocationCriterions, locale, permissions, conversionGoalsTitleDetails, conversionGoals, IsConversionAssociationWarningEnabled, storeTitleDetails, campaignObjective, storeContainerData, onStoreDataLoaded, IsSupportCPSForPmaxEnabled, IsNewCustomerAcquisitionEnabled, flipCampaignSettingsExpandAllState, campaignSettingsExpandedSections, allCampaignSettingsSections, setCampaignSettingsExpandedSections, costPerSaleOptOut]);\r\n\r\n const moreBasicSettingsSection = useMemo(() => (\r\n
\r\n \r\n \r\n {moreSettingsExpandedSections.length ? i18n.getString(_TL_('Collapse all')) : i18n.getString(_TL_('Expand all'))}\r\n \r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: moreBasicSettingsExpand,\r\n expandKey: 'ad-schedule',\r\n }}\r\n >\r\n \r\n \r\n {!IsPerformanceMaxCampaignsAutoGenAssetControlEnabled && !isFeatureBlockedForCnMarket &&\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: moreBasicSettingsExpand,\r\n expandKey: 'final-url-expansion',\r\n }}\r\n >\r\n \r\n \r\n }\r\n {IsPerformanceMaxCampaignsPageFeedsEnabled &&\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: moreBasicSettingsExpand,\r\n expandKey: 'page-feeds',\r\n }}\r\n >\r\n \r\n \r\n \r\n \r\n }\r\n {IsPerformanceMaxCampaignsAutoGenAssetControlEnabled && !isFeatureBlockedForCnMarket &&\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: moreBasicSettingsExpand,\r\n expandKey: 'auto-gen-assets',\r\n }}\r\n >\r\n \r\n \r\n \r\n \r\n }\r\n {IsBrandExclusionEnabled &&\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: moreBasicSettingsExpand,\r\n expandKey: 'brand-exclusions',\r\n }}\r\n >\r\n \r\n \r\n \r\n \r\n }\r\n\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: moreBasicSettingsExpand,\r\n expandKey: 'campaign-url-options',\r\n }}\r\n >\r\n
\r\n \r\n {i18n.getString(_TL_('Set up the tracking and redirect information for your ads.'))}\r\n \r\n \r\n
\r\n \r\n
\r\n
), [classes.moreBasicCampaignSection, classes.urlOptionsContainer, i18n, flipMoreSettingsExpandAllState, moreSettingsExpandedSections, allMoreSettingsSections, setMoreSettingsExpandedSections, adScheduleView, moreBasicSettingsExpand, campaign, adSchedules, setAdScheduleViewCallback, IsPerformanceMaxCampaignsAutoGenAssetControlEnabled, isFeatureBlockedForCnMarket, finalUrlExpansionsView, finalUrlExpansionOptOut, finalUrlExpansions, setFinalUrlExpansionsViewCallback, IsPerformanceMaxCampaignsPageFeedsEnabled, pageFeedsDetails, advertiserCustomerId, scope.values.aid, effectiveCampaignId, onPageFeedsChange, onSelectedPageFeedsUpdate, autoGenAssetsSummary, autoGenAssetsData, IsBrandExclusionEnabled, brandListsDetails, onBrandListsChange, onSelectedBrandListsUpdate, savedAddedBrandListIds, savedDeletedBrandListIds, urlOptionsDetails, urlOptions]);\r\n return (\r\n \r\n \r\n \r\n {!hideStepHeader &&\r\n <>\r\n

{i18n.getString(_TL_('Campaign settings'))}

\r\n {i18n.getString(_TL_('Tell us about your campaign, how much you want to spend, and where you want your ads to appear.'))}\r\n \r\n }\r\n \r\n
\r\n \r\n
\r\n \r\n {basicSettingsSection}\r\n {moreBasicSettingsSection}\r\n \r\n {navigationConfirmationPrompt}\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nStepCampaignSettings.propTypes = {\r\n stepService: PropTypes.shape({}).isRequired,\r\n scope: PropTypes.shape({\r\n values: PropTypes.shape({\r\n cid: PropTypes.number.isRequired,\r\n aid: PropTypes.number.isRequired,\r\n uid: PropTypes.number.isRequired,\r\n campaignId: PropTypes.number,\r\n }).isRequired,\r\n }).isRequired,\r\n};\r\n\r\nexport const StepCampaignSettingsShell = withStepLoadingShell(StepCampaignSettings);\r\n","import { withScope } from '@bingads-webui-react/scope-service';\r\nimport { stepStateMachine } from '@bingads-webui-campaign-react/step-wizard-machine';\r\nimport { STEP_PATHS } from '../../common/constants';\r\nimport { StepCampaignSettingsShell } from './step-campaign-settings';\r\nimport { initialCampaignCriterionsViewModel } from '../../model/campaign-criterions';\r\nimport { initialBrandExclusionsViewModel, initialCampaignViewModel } from '../../model/campaign';\r\nimport { getErrorsPlaceholders } from '../../model/campaign-bulk';\r\nimport { loadData, saveData, patchStepsData, clearErrors, needsLoading, isValid, isDirty, needsSaving, hasIncomingSystemError } from './step-campaign-settings-impl';\r\n\r\nexport const stepCampaignSettingsWizardConfig = {\r\n id: STEP_PATHS.CAMPAIGN_SETTINGS,\r\n title: _TL_('Campaign settings'),\r\n StepMachine: stepStateMachine,\r\n StepMachineOptions: (stepInfo, initialStepsData) => ({\r\n machineId: STEP_PATHS.CAMPAIGN_SETTINGS,\r\n initialContext: {\r\n id: stepInfo.id,\r\n stepsData: initialStepsData,\r\n stepInfo,\r\n data: {\r\n campaign: initialCampaignViewModel,\r\n campaignCriterions: initialCampaignCriterionsViewModel,\r\n brandExclusions: initialBrandExclusionsViewModel,\r\n ...getErrorsPlaceholders(),\r\n },\r\n invalidSaveAttempt: 0,\r\n },\r\n actions: {\r\n patchStepsData,\r\n clearErrors,\r\n },\r\n guards: {\r\n needsLoading,\r\n isValid,\r\n isDirty,\r\n needsSaving,\r\n hasIncomingSystemError,\r\n },\r\n }),\r\n StepComponent: withScope(StepCampaignSettingsShell),\r\n stepRepositoryConfig: {\r\n saveData,\r\n loadData,\r\n },\r\n};\r\n","import { ScenarioName, STEP_PATHS } from './constants';\r\nimport { stepAssetGroupWizardConfig, stepCampaignSettingsWizardConfig } from '../steps';\r\n\r\nconst STEP_INFOS = {\r\n [STEP_PATHS.CAMPAIGN_SETTINGS]: stepCampaignSettingsWizardConfig,\r\n [STEP_PATHS.ASSET_GROUP]: stepAssetGroupWizardConfig,\r\n};\r\n\r\nconst applyCommonSettingsPageSettings = stepInfo => ({\r\n ...stepInfo,\r\n hideStepHeader: true,\r\n});\r\n\r\n// Scenarios\r\n// I. Creation\r\n// 1. Campaign creation\r\n// 2. Asset group\r\n// II. Settings\r\n// 1. Campaign settings\r\n// 2. Asset group settings\r\n\r\nconst PERF_MAX_CAMPAIGN_CREATION = {\r\n scenarioName: ScenarioName.PerformanceMaxCampaignCreation,\r\n isEditing: false,\r\n stepList: [\r\n STEP_INFOS[STEP_PATHS.CAMPAIGN_SETTINGS],\r\n STEP_INFOS[STEP_PATHS.ASSET_GROUP],\r\n ],\r\n};\r\n\r\nconst PERF_MAX_ASSET_GROUP_CREATION = {\r\n scenarioName: ScenarioName.PerformanceMaxAssetGroupCreation,\r\n isEditing: false,\r\n isCenteredLayout: true,\r\n stepList: [\r\n STEP_INFOS[STEP_PATHS.ASSET_GROUP],\r\n ],\r\n};\r\n\r\nconst PERF_MAX_CAMPAIGN_SETTINGS = {\r\n scenarioName: ScenarioName.PerformanceMaxCampaignSettings,\r\n isEditing: true,\r\n stepList: [\r\n applyCommonSettingsPageSettings(STEP_INFOS[STEP_PATHS.CAMPAIGN_SETTINGS]),\r\n ],\r\n};\r\n\r\nconst PERF_MAX_ASSET_GROUP_SETTINGS = {\r\n scenarioName: ScenarioName.PerformanceMaxAssetGroupSettings,\r\n isEditing: true,\r\n isCenteredLayout: true,\r\n stepList: [\r\n applyCommonSettingsPageSettings(STEP_INFOS[STEP_PATHS.ASSET_GROUP]),\r\n ],\r\n};\r\n\r\nexport const PERF_MAX_CAMPAIGN_CRUD_SCENARIOS = {\r\n PERF_MAX_CAMPAIGN_CREATION,\r\n PERF_MAX_ASSET_GROUP_CREATION,\r\n PERF_MAX_CAMPAIGN_SETTINGS,\r\n PERF_MAX_ASSET_GROUP_SETTINGS,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { StepWizard } from '@bingads-webui-campaign-react/step-wizard';\r\nimport { PERF_MAX_CAMPAIGN_CRUD_SCENARIOS } from '../common/perf-max-campaign-crud-scenarios';\r\n\r\nexport const PerfMaxAssetGroupCreationPage = (props) => {\r\n const routeToNavigateToWhenDone = '/campaign/vnext/assetgroups';\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nPerfMaxAssetGroupCreationPage.propTypes = {\r\n instrumentation: PropTypes.shape({}).isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { PerformanceMarkerProvider } from '@bingads-webui-campaign-react/performance-marker-provider';\r\nimport { StepWizard } from '@bingads-webui-campaign-react/step-wizard';\r\nimport { PERF_MAX_CAMPAIGN_CRUD_SCENARIOS } from '../common/perf-max-campaign-crud-scenarios';\r\n\r\nexport const PerfMaxAssetGroupSettingsPage = (props) => {\r\n const routeToNavigateToWhenDone = '/campaign/vnext/assetgroups';\r\n const scopeToRemoveWhenDone = ['assetGroupId'];\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nPerfMaxAssetGroupSettingsPage.propTypes = {\r\n instrumentation: PropTypes.shape({}).isRequired,\r\n};\r\n","import { isUndefined } from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport React, { useEffect, useMemo, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { withTheme } from 'react-jss';\r\nimport { withProps } from '@bingads-webui-react/with-props';\r\nimport { withSiteMap, getRoutePathById } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { withCreationHeader } from '@bingads-webui-campaign-react/campaign-adgroup-creation';\r\nimport { ProgressiveLoadingBlock } from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport localStorage from '@bingads-webui-component-legacy/storage/localStorage';\r\nimport { StepWizard } from '@bingads-webui-campaign-react/step-wizard';\r\nimport { PERF_MAX_CAMPAIGN_CRUD_SCENARIOS } from '../common/perf-max-campaign-crud-scenarios';\r\n\r\nconst getCampaignObjective = () => {\r\n let campaignObjective = config.get('CampaignObjective');\r\n if (isUndefined(campaignObjective)) {\r\n if (localStorage.supportsStorage()) {\r\n campaignObjective = localStorage.get('CampaignObjective');\r\n config.set('CampaignObjective', campaignObjective);\r\n }\r\n }\r\n\r\n return campaignObjective;\r\n};\r\n\r\nconst StepWizardWithDynamicOptions = ({\r\n dynamicOptions, campaignObjective, routeToNavigateToWhenDone, ...restProps\r\n}) => {\r\n const extraStepsData = useMemo(() => ({ campaignObjective, ...dynamicOptions }), [campaignObjective, dynamicOptions]);\r\n return (\r\n \r\n );\r\n};\r\n\r\nStepWizardWithDynamicOptions.propTypes = {\r\n dynamicOptions: PropTypes.shape({}).isRequired,\r\n campaignObjective: PropTypes.string.isRequired,\r\n routeToNavigateToWhenDone: PropTypes.string.isRequired,\r\n};\r\n\r\nconst PerfMaxCampaignCreationPageImpl = ((props) => {\r\n const campaignObjective = useMemo(() => getCampaignObjective(), []);\r\n const routeToNavigateToWhenDone = useMemo(() => getRoutePathById(props.siteMap, 'campaigns'), [props.siteMap]);\r\n\r\n const {\r\n adExtensionsDynamicFeaturesLoader, permissions, theme, scope, instrumentation, i18n,\r\n } = props;\r\n const dynamicOptionsLoader = useCallback(\r\n () => Promise.props({\r\n adExtensionsDynamicFeatures: adExtensionsDynamicFeaturesLoader({\r\n permissions,\r\n theme,\r\n scope,\r\n instrumentation,\r\n i18n,\r\n }),\r\n adExtensionsAssociationsFactory:\r\n import(/* webpackChunkName: \"perf-max-campaign-creation\" */'@bingads-webui-campaign-react/ad-extensions-associations-factory')\r\n .then(({ extensionsAssociationsFactory, getObjectiveExtensions }) => ({ extensionsAssociationsFactory, getObjectiveExtensions })),\r\n })\r\n .then(({ adExtensionsDynamicFeatures, adExtensionsAssociationsFactory }) => ({\r\n adExtensionsDynamicFeatures,\r\n adExtensionsAssociationsFactory,\r\n }))\r\n .then(dynamicOptions => ({\r\n default: withProps({ dynamicOptions }, StepWizardWithDynamicOptions),\r\n })),\r\n [adExtensionsDynamicFeaturesLoader, permissions, theme, scope, instrumentation, i18n]\r\n );\r\n\r\n const LazyView = useMemo(() => React.lazy(dynamicOptionsLoader), [dynamicOptionsLoader]);\r\n\r\n useEffect(() => {\r\n if (!campaignObjective) {\r\n props.scope.save('/campaign/vnext/createcampaign/objective');\r\n }\r\n\r\n return () => {\r\n // eslint-disable-next-line no-console\r\n console.log('[DWD] PerfMaxCampaignCreationPage unmounted');\r\n // clear objective choice in local storage\r\n if (localStorage.supportsStorage()) {\r\n localStorage.invalidate('CampaignObjective');\r\n }\r\n };\r\n }, [campaignObjective, props.scope]);\r\n\r\n return (\r\n <>\r\n {campaignObjective &&\r\n }>\r\n \r\n \r\n }\r\n {!campaignObjective &&\r\n
\r\n }\r\n \r\n );\r\n});\r\n\r\nPerfMaxCampaignCreationPageImpl.propTypes = {\r\n siteMap: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n theme: PropTypes.shape({}).isRequired,\r\n scope: PropTypes.shape({\r\n save: PropTypes.func.isRequired,\r\n }).isRequired,\r\n instrumentation: PropTypes.shape({}).isRequired,\r\n i18n: PropTypes.shape({}).isRequired,\r\n adExtensionsDynamicFeaturesLoader: PropTypes.func.isRequired,\r\n};\r\n\r\nexport const PerfMaxCampaignCreationPage = withSiteMap(withCreationHeader(withTheme(PerfMaxCampaignCreationPageImpl, undefined, undefined, false, true)));\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { PerformanceMarkerProvider } from '@bingads-webui-campaign-react/performance-marker-provider';\r\nimport { StepWizard } from '@bingads-webui-campaign-react/step-wizard';\r\nimport { PERF_MAX_CAMPAIGN_CRUD_SCENARIOS } from '../common/perf-max-campaign-crud-scenarios';\r\n\r\nexport const PerfMaxCampaignSettingsPage = (props) => {\r\n const routeToNavigateToWhenDone = '/campaign/vnext/assetgroups';\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nPerfMaxCampaignSettingsPage.propTypes = {\r\n instrumentation: PropTypes.shape({}).isRequired,\r\n};\r\n","export const PMAX_WIZARD_ID_NAME = {\r\n PMAX_NORTH_STAR_SETTING_WIZARD: 'perf-max-north-star-setting-wizard',\r\n PMAX_NORTH_STAR_WIZARD: 'perf-max-north-star-wizard',\r\n};\r\n","export const STEP_PATHS = {\r\n PRODUCTS: 'PRODUCTS',\r\n ASSETS: 'ASSETS',\r\n TARGETING: 'TARGETING',\r\n CAMPAIGNDETAILS: 'CAMPAIGNDETAILS',\r\n BUDGET: 'BUDGET',\r\n SUMMARY: 'SUMMARY',\r\n CAMPAIGNSETTING: 'CAMPAIGNSETTING',\r\n ASSETGROUPSETTING: 'ASSETGROUPSETTING',\r\n};\r\n\r\nexport const FLOWS = {\r\n PERFMAX_WIZARD: 'PERFMAX_WIZARD',\r\n RETAIL_PERF_MAX: 'RETAIL_PERF_MAX',\r\n};\r\n\r\nexport const FLOWS_TO_FIRST_STEP = {\r\n [FLOWS.PERFMAX_WIZARD]: STEP_PATHS.ASSETS,\r\n [FLOWS.RETAIL_PERF_MAX]: STEP_PATHS.PRODUCTS,\r\n};\r\n\r\nexport const getFlow = ({ flow }) => {\r\n if (flow === FLOWS.RETAIL_PERF_MAX) {\r\n const steps = [\r\n STEP_PATHS.PRODUCTS,\r\n STEP_PATHS.ASSETS,\r\n STEP_PATHS.TARGETING,\r\n STEP_PATHS.CAMPAIGNDETAILS,\r\n STEP_PATHS.BUDGET,\r\n STEP_PATHS.SUMMARY,\r\n ];\r\n\r\n return steps;\r\n }\r\n\r\n const steps = [\r\n STEP_PATHS.ASSETS,\r\n STEP_PATHS.TARGETING,\r\n STEP_PATHS.CAMPAIGNDETAILS,\r\n STEP_PATHS.BUDGET,\r\n STEP_PATHS.SUMMARY,\r\n ];\r\n\r\n return steps;\r\n};\r\n\r\nexport const getAssetsPanels = (permissions) => {\r\n const panels = ['final-url', 'images', 'logos', 'headlines', 'long-headlines', 'descriptions', 'business-name', 'call-to-action'];\r\n\r\n if (permissions.dynamic.PMaxVideo && permissions.dynamic.PmaxNorthStarAssetGroupSetting) {\r\n panels.push('videos');\r\n }\r\n\r\n return panels;\r\n};\r\n","export const ERROR_ENTITY = {\r\n Campaign: 'campaign',\r\n AssetGroup: 'assetGroup',\r\n CampaignLocation: 'campaignLocation',\r\n CampaignRadius: 'campaignRadius',\r\n CampaignNegativeLocation: 'campaignNegativeLocation',\r\n CampaignLocationIntent: 'campaignLocationIntent',\r\n CampaignDayTimeCriterion: 'campaignDayTimeCriterion',\r\n CampaignNegativeWebpage: 'campaignNegativeWebpage',\r\n AudienceGroupAssetGroupAssociation: 'audienceGroupAssetGroupAssociation',\r\n BrandListAssociation: 'brandListAssociation',\r\n};\r\n","import React, { useContext, useMemo, useCallback } from 'react';\r\nimport classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n ServerValidatedRemainingCharsValidatedTextField,\r\n GroupInfoImg,\r\n} from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport { withControlErrorHandling, withUnvalidatedControlErrors } from '@bingads-webui-campaign-react/error-handling';\r\nimport { withCustomValidation, withError } from '@bingads-webui-react/validation';\r\nimport { withFinalUrlRecommendationUpdate, } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { withStoreFromProviderId, withStoreUrl } from '@bingads-webui-campaign-react/with-store-details';\r\nimport { ValidatedFinalUrlWithRecommendations } from '@bingads-webui-campaign-react/pmax-text-input';\r\nimport { entityIs, andComp, propertyIs } from '@bingads-webui-campaign-react/form-error';\r\nimport {\r\n ValidatedFixedPanel,\r\n Collapse,\r\n TextTitle,\r\n getPanelErrorProps\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { AssetGroup } from '@bingads-webui/campaign-odata-schemas';\r\nimport { Text, Stack } from '@fluentui/react';\r\nimport { HelpPopup } from '@bingads-webui-react/help-popup';\r\n\r\nimport { ERROR_ENTITY } from '../../../shared/model/api-error';\r\n\r\nconst entityIsAssetGroup = entityIs(ERROR_ENTITY.AssetGroup);\r\nconst assetGroupNameProp = andComp(entityIsAssetGroup, propertyIs('Name'));\r\nconst assetGroupFinalUrlsProp = andComp(entityIsAssetGroup, propertyIs('FinalUrls'));\r\n\r\nconst ValidatedFinalUrlWithStoreURL = withError(withCustomValidation(withFinalUrlRecommendationUpdate(withStoreFromProviderId(withStoreUrl(ValidatedFinalUrlWithRecommendations)))));\r\nconst ServerValidatedFinalUrl = withControlErrorHandling(withUnvalidatedControlErrors(ValidatedFinalUrlWithStoreURL, { filter: assetGroupFinalUrlsProp }));\r\n\r\nexport const AssetGroupNameSection = ({\r\n FinalUrls,\r\n permissions,\r\n onFinalURLFocusOut,\r\n campaign,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const validateSpecialCharacters = permissions && permissions.dynamic && permissions.dynamic.PerformanceMaxCampaignsFinalURLValidation && permissions.dynamic.PMaxAndDSAFinalURLValidation;\r\n\r\n const finalUrlExpansion = campaign && campaign.finalUrlExpansionOptOut;\r\n const providerId = campaign && campaign.ProviderId;\r\n\r\n const onRenderAdGroupNameLabel = useCallback(() => (\r\n \r\n ), []);\r\n\r\n const onRenderDescription = useMemo(() => (\r\n \r\n \r\n {i18n.getString(_TL_('URL expansion is on'))}\r\n \r\n \r\n \r\n ), [i18n]);\r\n\r\n const finalUrlValidationProps = useMemo(() => ({\r\n data: {\r\n FinalUrls,\r\n },\r\n initialValue: {\r\n FinalUrls,\r\n },\r\n debounce: 700,\r\n }), [FinalUrls]);\r\n\r\n return (\r\n
\r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n >\r\n \r\n \r\n {finalUrlExpansion && onRenderDescription}\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nAssetGroupNameSection.propTypes = {\r\n FinalUrls: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n PerformanceMaxCampaignsFinalURLValidation: PropTypes.bool,\r\n PMaxAndDSAFinalURLValidation: PropTypes.bool,\r\n }).isRequired,\r\n }).isRequired,\r\n onFinalURLFocusOut: PropTypes.func.isRequired,\r\n campaign: PropTypes.shape({\r\n finalUrlExpansionOptOut: PropTypes.bool,\r\n ProviderId: PropTypes.number,\r\n }).isRequired,\r\n};\r\n","import { map, isEmpty } from 'underscore';\r\nimport React, { useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Checkbox, Button, makeStyles } from '@fluentui/react-components';\r\nimport { UiBlocker } from '@bingads-webui-react/ui-blocker';\r\n\r\nconst useStyles = makeStyles({\r\n socialRecommendationContainer: {\r\n marginTop: '20px',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n '& .title': {\r\n fontWeight: '600',\r\n },\r\n '& .url-container': {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n paddingTop: '10px',\r\n paddingBottom: '10px',\r\n },\r\n '& .generate-button': {\r\n width: '140px',\r\n marginLeft: 'auto',\r\n },\r\n },\r\n});\r\n\r\nexport const SocialSiteRecommendationSection = ({\r\n i18n, isSocialSitesLoading, socialSites, onSocialSiteCheckboxChange, prefillAssetRecommendation,\r\n}) => {\r\n const classes = useStyles();\r\n\r\n const onCheckboxChange = useCallback((index, checked) => {\r\n onSocialSiteCheckboxChange(index, checked);\r\n }, [onSocialSiteCheckboxChange]);\r\n\r\n const onGenerateButtonClick = useCallback(() => {\r\n prefillAssetRecommendation();\r\n }, [prefillAssetRecommendation]);\r\n\r\n return (\r\n \r\n
\r\n
{i18n.getString(_TL_('Select pages to enhance recommendations'))}
\r\n {isSocialSitesLoading ?
: (\r\n
\r\n {\r\n map(socialSites, (recommendation, index) => (\r\n onCheckboxChange(index, data.checked)}\r\n />\r\n ))\r\n }\r\n
\r\n )}\r\n {!isEmpty(socialSites) && (\r\n \r\n {i18n.getString(_TL_('Generate assets'))}\r\n \r\n )}\r\n
\r\n \r\n );\r\n};\r\n\r\nSocialSiteRecommendationSection.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n isSocialSitesLoading: PropTypes.bool.isRequired,\r\n socialSites: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n onSocialSiteCheckboxChange: PropTypes.func.isRequired,\r\n prefillAssetRecommendation: PropTypes.func.isRequired,\r\n};\r\n\r\n","import { map, first } from 'underscore';\r\nimport React, { useContext, useMemo, useCallback, useState } from 'react';\r\nimport classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n ServerValidatedRemainingCharsValidatedTextField,\r\n GroupInfoImg,\r\n} from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport { withControlErrorHandling, withUnvalidatedControlErrors } from '@bingads-webui-campaign-react/error-handling';\r\nimport { withCustomValidation, withError } from '@bingads-webui-react/validation';\r\nimport { withFinalUrlRecommendationUpdate, } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { withStoreFromProviderId, withStoreUrl } from '@bingads-webui-campaign-react/with-store-details';\r\nimport { ValidatedFinalUrlWithRecommendations } from '@bingads-webui-campaign-react/pmax-text-input';\r\nimport { entityIs, andComp, propertyIs } from '@bingads-webui-campaign-react/form-error';\r\nimport {\r\n ValidatedFixedPanel,\r\n Collapse,\r\n TextTitle,\r\n getPanelErrorProps\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { AssetGroup } from '@bingads-webui/campaign-odata-schemas';\r\nimport { Text, Stack } from '@fluentui/react';\r\nimport { HelpPopup } from '@bingads-webui-react/help-popup';\r\n\r\nimport { ERROR_ENTITY } from '../../../shared/model/api-error';\r\nimport { SocialSiteRecommendationSection } from './social-site-recommendation-section';\r\nimport { readSocialSiteRecommendation } from '../../../shared/model/social-site-recommendation';\r\n\r\nconst entityIsAssetGroup = entityIs(ERROR_ENTITY.AssetGroup);\r\nconst assetGroupNameProp = andComp(entityIsAssetGroup, propertyIs('Name'));\r\nconst assetGroupFinalUrlsProp = andComp(entityIsAssetGroup, propertyIs('FinalUrls'));\r\n\r\nconst ValidatedFinalUrlWithStoreURL = withError(withCustomValidation(withFinalUrlRecommendationUpdate(withStoreFromProviderId(withStoreUrl(ValidatedFinalUrlWithRecommendations)))));\r\nconst ServerValidatedFinalUrl = withControlErrorHandling(withUnvalidatedControlErrors(ValidatedFinalUrlWithStoreURL, { filter: assetGroupFinalUrlsProp }));\r\n\r\nexport const AssetGroupNameSectionWithSocialSiteRecommendation = ({\r\n FinalUrls,\r\n permissions,\r\n onFinalURLFocusOut: prefillAssetRecommendation,\r\n campaign,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const validateSpecialCharacters = permissions && permissions.dynamic && permissions.dynamic.PerformanceMaxCampaignsFinalURLValidation && permissions.dynamic.PMaxAndDSAFinalURLValidation;\r\n\r\n const finalUrlExpansion = campaign && campaign.finalUrlExpansionOptOut;\r\n const providerId = campaign && campaign.ProviderId;\r\n const campaignId = campaign && campaign.Id;\r\n\r\n const { scope } = useContext(ScopeContext) || {};\r\n const { aid, cid } = scope.values;\r\n\r\n const [socialSites, setSocialSites] = useState([]);\r\n const [isSocialSitesLoading, setIsSocialSitesLoading] = useState(false);\r\n\r\n const onFinalURLFocusOut = useCallback(() => {\r\n setIsSocialSitesLoading(true);\r\n readSocialSiteRecommendation(cid, aid, campaignId, first(FinalUrls))\r\n .then(({ Data }) => {\r\n setIsSocialSitesLoading(false);\r\n if (Data && Data.SocialSites) {\r\n const socialSitesRecommendations = Data.SocialSites;\r\n const additionalSocialSites = map(socialSitesRecommendations, socialSite => ({\r\n ...socialSite,\r\n checked: true,\r\n }));\r\n setSocialSites([{ Url: first(FinalUrls), checked: true }].concat(additionalSocialSites));\r\n } else {\r\n setSocialSites([{ Url: first(FinalUrls), checked: true }]);\r\n }\r\n });\r\n }, [cid, aid, campaignId, FinalUrls]);\r\n\r\n const onSocialSiteCheckboxChange = useCallback((index, checked) => {\r\n socialSites[index].checked = checked;\r\n setSocialSites([...socialSites]);\r\n }, [socialSites]);\r\n\r\n const onRenderAdGroupNameLabel = useCallback(() => (\r\n \r\n ), []);\r\n\r\n const onRenderDescription = useMemo(() => (\r\n \r\n \r\n {i18n.getString(_TL_('URL expansion is on'))}\r\n \r\n \r\n \r\n ), [i18n]);\r\n\r\n const finalUrlValidationProps = useMemo(() => ({\r\n data: {\r\n FinalUrls,\r\n },\r\n initialValue: {\r\n FinalUrls,\r\n },\r\n debounce: 700,\r\n }), [FinalUrls]);\r\n\r\n return (\r\n
\r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n >\r\n \r\n \r\n {finalUrlExpansion && onRenderDescription}\r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nAssetGroupNameSectionWithSocialSiteRecommendation.propTypes = {\r\n FinalUrls: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n PerformanceMaxCampaignsFinalURLValidation: PropTypes.bool,\r\n PMaxAndDSAFinalURLValidation: PropTypes.bool,\r\n }).isRequired,\r\n }).isRequired,\r\n onFinalURLFocusOut: PropTypes.func.isRequired,\r\n campaign: PropTypes.shape({\r\n finalUrlExpansionOptOut: PropTypes.bool,\r\n ProviderId: PropTypes.number,\r\n Id: PropTypes.number,\r\n }).isRequired,\r\n};\r\n","import { edmCampaign } from '@bingads-webui/edm-campaign';\r\n\r\nexport const readSocialSiteRecommendation = (cid, aid, campaignId, finalUrl) => (\r\n edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .Campaigns.$withKey(campaignId)['Default.GetSocialSitesRecommendation']\r\n .$makeCall({\r\n payload: {\r\n GetSocialSitesRecommendationRequest: {\r\n FinalURL: finalUrl,\r\n },\r\n },\r\n })\r\n .toPromise()\r\n);\r\n","export const getAssetsStyles = () => ({\r\n '@global': {\r\n '.text-asset-recommendations-panel .selectable-suggested-item-toggle': {\r\n height: 'auto',\r\n minHeight: '32px',\r\n\r\n '& > span': {\r\n margin: '8px 0',\r\n textAlign: 'left',\r\n },\r\n },\r\n },\r\n container: {\r\n '& .control-label': {\r\n display: 'none',\r\n },\r\n\r\n '& .text-assets-collection-container': {\r\n width: 'auto',\r\n },\r\n\r\n '& .text-input-container': {\r\n width: '100%',\r\n },\r\n '& .business-name-container': {\r\n width: 'auto',\r\n },\r\n\r\n '& .add-asset-btn': {\r\n marginBottom: '0',\r\n },\r\n '& .image-experience-content': {\r\n minWidth: 'unset !important',\r\n },\r\n '& .image-list-choice-group .ms-ChoiceFieldGroup-flexContainer': {\r\n width: 'unset !important',\r\n },\r\n '& .section-description': {\r\n marginBottom: '16px',\r\n },\r\n '& .input-asset-text.error': {\r\n '& .ms-TextField-fieldGroup, .ms-TextField-fieldGroup::after': {\r\n borderColor: '#a4262c',\r\n },\r\n },\r\n },\r\n});\r\n","import React, { useContext, useMemo, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n Collapse,\r\n TextTitle,\r\n useCollapseState,\r\n ValidatedPanel,\r\n ValidatedFixedPanel,\r\n getPanelErrorProps,\r\n collapseExpander,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { useVideoAdsCopilot } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { TaskManager } from '@bingads-webui-universal/task-manager';\r\nimport {\r\n ImageListPortalContainerWithControlErrorHandling,\r\n LogoListPortalContainerWithControlErrorHandling,\r\n ImageListSummaryCardDetails,\r\n hasImages,\r\n PerfMaxImageSuggestionCarousel,\r\n} from '@bingads-webui-campaign-react/pmax-image-experience';\r\nimport {\r\n ValidatedStoreBackedBusinessName,\r\n HeadlineAssetCollection,\r\n LongHeadlineAssetCollection,\r\n DescriptionAssetCollection,\r\n} from '@bingads-webui-campaign-react/pmax-text-input';\r\nimport {\r\n TextAssetsImg,\r\n ImageAssetsImg,\r\n LogoAssetsImg,\r\n BusinessNameImg,\r\n CallToActionImg,\r\n} from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport { VideoPanel } from '@bingads-webui-campaign-react/step-wizard-controls';\r\nimport { ValidatedLegacyCallToAction } from '@bingads-webui-campaign-react/legacy-call-to-action';\r\nimport { getHeadlinesCardSummaryDetails, getLongHeadlinesCardSummaryDetails, getDescriptionsCardSummaryDetails, hasTextAssets } from '@bingads-webui-campaign-react/validated-text-collection';\r\nimport { entityIs, andComp, propertyIs } from '@bingads-webui-campaign-react/form-error';\r\nimport { withUnvalidatedControlErrors } from '@bingads-webui-campaign-react/error-handling';\r\n\r\nimport { ERROR_ENTITY } from '../../../shared/model/api-error';\r\nimport { getAssetsStyles } from './get-assets-styles';\r\nimport { getAssetsPanels } from '../../step-constants';\r\n\r\nconst entityIsAssetGroup = entityIs(ERROR_ENTITY.AssetGroup);\r\n\r\nconst assetGroupImageAssetsProp = andComp(entityIsAssetGroup, propertyIs('Images'));\r\nconst assetGroupBusinessNameProp = andComp(entityIsAssetGroup, propertyIs('BusinessName'));\r\nconst ServerValidatedImageListPortalContainer = withUnvalidatedControlErrors(ImageListPortalContainerWithControlErrorHandling, { filter: assetGroupImageAssetsProp });\r\n\r\nexport const AssetsSection = ({\r\n permissions,\r\n images,\r\n videos,\r\n mergedI18n,\r\n perfMarker,\r\n businessName,\r\n headlines,\r\n longHeadlines,\r\n descriptions,\r\n imagesContainerRef,\r\n imageExperienceAddNewImageCallback,\r\n setAddNewShortHeadlinesCallback,\r\n setAddNewLongHeadlinesCallback,\r\n setAddNewDescriptionCallback,\r\n imageExperiencePortalContainerState,\r\n logosContainerRef,\r\n providerId,\r\n maxUploadNum,\r\n locale,\r\n CallToAction,\r\n setNewCTACallback,\r\n setSelectedVideoId,\r\n selectedVideoId,\r\n}) => {\r\n const { IsPerformanceMaxAutomatedCTAEnabled, IsDomesticSimplifiedChineseEnabled } = permissions;\r\n\r\n const {\r\n PerformanceMaxInCnMarket: IsPerformanceMaxInCnMarketEnabled,\r\n PMaxNewAspectRatios,\r\n PMaxExcludeNewAspectRatios,\r\n } = permissions.dynamic;\r\n\r\n const isFeatureBlockedForCnMarket = IsDomesticSimplifiedChineseEnabled && IsPerformanceMaxInCnMarketEnabled;\r\n const isPMaxAspectRatiosV2Enabled = PMaxNewAspectRatios && !PMaxExcludeNewAspectRatios;\r\n\r\n const i18n = useContext(I18nContext);\r\n\r\n const allPanels = useMemo(() => getAssetsPanels(permissions), [permissions]);\r\n\r\n const [\r\n allAssetsSections,\r\n assetsExpandedSections,\r\n setAssetsExpandedSections,\r\n ] = useCollapseState(\r\n allPanels, /* all sections */\r\n allPanels /* initially expanded sections */\r\n );\r\n\r\n const allAssetsExpand = useMemo(\r\n () => collapseExpander({ setActiveKeys: setAssetsExpandedSections }),\r\n [setAssetsExpandedSections]\r\n );\r\n\r\n const headlinesCardSummaryDetails = useMemo(() => getHeadlinesCardSummaryDetails(i18n, headlines), [headlines, i18n]);\r\n const longHeadlinesCardSummaryDetails = useMemo(() => getLongHeadlinesCardSummaryDetails(i18n, longHeadlines), [longHeadlines, i18n]);\r\n const descriptionsCardSummaryDetails = useMemo(() => getDescriptionsCardSummaryDetails(i18n, descriptions), [descriptions, i18n]);\r\n\r\n const textAndImageAssetsOptional = useMemo(() => providerId && !hasImages(images) && !hasTextAssets(headlines, longHeadlines, descriptions), [providerId, images, headlines, longHeadlines, descriptions]);\r\n\r\n const classes = useDefaultStyles(getAssetsStyles);\r\n\r\n const { fetch } = useVideoAdsCopilot();\r\n\r\n const copilotFetchTaskManager = useMemo(() => new TaskManager(), []);\r\n\r\n useEffect(() => {\r\n fetch(copilotFetchTaskManager);\r\n setClarityTag({ VideoCopilotGeneration: true });\r\n }, [copilotFetchTaskManager, fetch]);\r\n\r\n const assets = useMemo(() => (\r\n
\r\n

{i18n.getString(_TL_('Add assets'))}

\r\n
\r\n {i18n.getString(_TL_('Provide your assets and we’ll automatically determine what your ads look like, where and when they appear, and who sees them.'))}\r\n
\r\n \r\n }\r\n />}\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: allAssetsExpand,\r\n expandKey: 'images',\r\n }}\r\n >\r\n {i18n.getString(_TL_('You can add up to 20 images to your ad. We recommend that you add two to three relevant images. Required aspect ratios: 1.91:1 and 1:1. Minimum image upload dimensions: 703 x 368 pixels. '))}\r\n \r\n \r\n \r\n }\r\n />}\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: allAssetsExpand,\r\n expandKey: 'logos',\r\n }}\r\n >\r\n {i18n.getString(_TL_('You can add up to 5 different logos. Each logo can have one or both 4:1 aspect ratio and 1:1 aspect ratio.'))}\r\n \r\n \r\n\r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: allAssetsExpand,\r\n expandKey: 'headlines',\r\n }}\r\n >\r\n \r\n \r\n\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: allAssetsExpand,\r\n expandKey: 'long-headlines',\r\n }}\r\n >\r\n \r\n \r\n\r\n\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: allAssetsExpand,\r\n expandKey: 'descriptions',\r\n }}\r\n >\r\n \r\n \r\n\r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n >\r\n \r\n \r\n \r\n }\r\n noOverflowHidden\r\n relativePosition\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n >\r\n \r\n \r\n \r\n
\r\n ), [classes.container, i18n, allAssetsSections, assetsExpandedSections, setAssetsExpandedSections, isPMaxAspectRatiosV2Enabled, images, allAssetsExpand, imagesContainerRef, imageExperiencePortalContainerState, imageExperienceAddNewImageCallback, permissions, maxUploadNum, logosContainerRef, headlinesCardSummaryDetails, textAndImageAssetsOptional, setAddNewShortHeadlinesCallback, longHeadlinesCardSummaryDetails, setAddNewLongHeadlinesCallback, descriptionsCardSummaryDetails, setAddNewDescriptionCallback, providerId, businessName, locale, CallToAction, IsPerformanceMaxAutomatedCTAEnabled, isFeatureBlockedForCnMarket, setNewCTACallback]);\r\n\r\n return assets;\r\n};\r\n\r\nAssetsSection.propTypes = {\r\n permissions: PropTypes.shape({\r\n IsPerformanceMaxAutomatedCTAEnabled: PropTypes.bool,\r\n IsDomesticSimplifiedChineseEnabled: PropTypes.bool,\r\n dynamic: PropTypes.shape({\r\n PerformanceMaxInCnMarket: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n images: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n businessName: PropTypes.string.isRequired,\r\n headlines: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n longHeadlines: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n descriptions: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n imagesContainerRef: PropTypes.shape({}).isRequired,\r\n imageExperienceAddNewImageCallback: PropTypes.func.isRequired,\r\n setAddNewShortHeadlinesCallback: PropTypes.func.isRequired,\r\n setAddNewLongHeadlinesCallback: PropTypes.func.isRequired,\r\n setAddNewDescriptionCallback: PropTypes.func.isRequired,\r\n imageExperiencePortalContainerState: PropTypes.shape({}).isRequired,\r\n logosContainerRef: PropTypes.shape({}).isRequired,\r\n providerId: PropTypes.string.isRequired,\r\n maxUploadNum: PropTypes.number.isRequired,\r\n locale: PropTypes.string.isRequired,\r\n CallToAction: PropTypes.shape({}).isRequired,\r\n setNewCTACallback: PropTypes.func.isRequired,\r\n};\r\n","import React, { useMemo, useState, useCallback, useContext } from 'react';\r\nimport classNames from 'classnames';\r\nimport {\r\n ValidatedBootstrapPanel,\r\n Collapse,\r\n ValidatedPanel,\r\n TextTitle,\r\n useCollapseState,\r\n getPanelErrorProps,\r\n collapseExpander,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { Panel as BootstrapPanel } from 'react-bootstrap';\r\nimport { Separator } from '@fluentui/react';\r\nimport { ValidatedUrlPath, ValidatedMobileUrl, getAdvancedUrlOptionsCardSummaryDetails } from '@bingads-webui-campaign-react/validated-url-input';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { withControlErrorHandling, withUnvalidatedControlErrors } from '@bingads-webui-campaign-react/error-handling';\r\nimport { entityIs, andComp, orComp, propertyIs } from '@bingads-webui-campaign-react/form-error';\r\nimport { AttentionBeaconGroup } from '@bingads-webui-campaign-react/attention-beacon';\r\nimport { ValidatedUrlRules, UrlOptionsDetailsWithRules } from '@bingads-webui-campaign-react/url-rules';\r\nimport { ValidatedUrlRulesV2, UrlOptionsDetailsWithRulesV2 } from '@bingads-webui-campaign-react/url-rules-v2';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\n\r\nimport { ERROR_ENTITY } from '../../../shared/model/api-error';\r\n\r\nconst entityIsAssetGroup = entityIs(ERROR_ENTITY.AssetGroup);\r\nconst assetGroupPath1AndPath2Props = andComp(entityIsAssetGroup, orComp(propertyIs('Path1'), propertyIs('Path2')));\r\nconst assetGroupMobileFinalUrlsProp = andComp(entityIsAssetGroup, propertyIs('MobileFinalUrls'));\r\n\r\nconst ServerValidatedUrlPath = withControlErrorHandling(withUnvalidatedControlErrors(ValidatedUrlPath, { filter: assetGroupPath1AndPath2Props }));\r\nconst ServerValidatedMobileUrl = withControlErrorHandling(withUnvalidatedControlErrors(ValidatedMobileUrl, { filter: assetGroupMobileFinalUrlsProp }));\r\n\r\nconst urlOptionStyles = () => ({\r\n urlContainer: {\r\n '& .path2, .path1': {\r\n width: '150px',\r\n },\r\n },\r\n});\r\n\r\nexport const MoreOptionsSection = ({\r\n permissions,\r\n finalUrls,\r\n urlPath1,\r\n urlPath2,\r\n finalMobileUrls,\r\n urlRules,\r\n urlRulesOption,\r\n classes,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const urlClasses = useDefaultStyles(urlOptionStyles);\r\n\r\n const {\r\n AssetGroupUrlRules: isAssetGroupUrlRulesEnabled,\r\n AssetGroupUrlRulesV2: isAssetGroupUrlRulesV2Enabled,\r\n } = permissions.dynamic;\r\n\r\n const [\r\n allMoreOptionsSections,\r\n moreOptionsExpandedSections,\r\n setMoreOptionsExpandedSections,\r\n ] = useCollapseState(\r\n ['advanced-url-options'] /* all sections */,\r\n ['advanced-url-options'] /* initially expanded sections */\r\n );\r\n\r\n const [moreOptionsSectionExpanded, setNameAndTitleExpanded] = useState(false);\r\n const onMoreOptionsSectionToggle = useCallback((expanded) => {\r\n setNameAndTitleExpanded(expanded);\r\n }, []);\r\n\r\n\r\n const moreOptionsExpand = useMemo(\r\n () => collapseExpander({ setActiveKeys: setMoreOptionsExpandedSections }),\r\n [setMoreOptionsExpandedSections]\r\n );\r\n\r\n const moreOptionsSection = useMemo(() => (\r\n (\r\n <>\r\n \r\n \r\n {i18n.getString(_TL_('More options'))}\r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n )\r\n : ()}\r\n />}\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: moreOptionsExpand,\r\n expandKey: 'advanced-url-options',\r\n }}\r\n >\r\n \r\n \r\n {\r\n isAssetGroupUrlRulesEnabled && !isAssetGroupUrlRulesV2Enabled && (\r\n <>\r\n \r\n \r\n \r\n )\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\n
\r\n
\r\n
\r\n \r\n )}\r\n />\r\n ), [onMoreOptionsSectionToggle, moreOptionsSectionExpanded, classes.collapsiblePanel, i18n, urlClasses.urlContainer, allMoreOptionsSections, moreOptionsExpandedSections, setMoreOptionsExpandedSections, isAssetGroupUrlRulesEnabled, finalUrls, urlPath1, urlPath2, finalMobileUrls, urlRules, moreOptionsExpand, urlRulesOption]);\r\n\r\n return moreOptionsSection;\r\n};\r\n","import React from 'react';\r\nimport {\r\n Collapse,\r\n TextTitle,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\n\r\nexport const getAdExtensionsSections = ({\r\n extensionTypes,\r\n extensionsAssociations,\r\n adExtensionsAssociationsFactory,\r\n adExtensionsDynamicFeatures = {},\r\n i18n,\r\n onUpdateExtensionsAssociations,\r\n campaign,\r\n}) => adExtensionsAssociationsFactory.extensionsAssociationsFactory(campaign.Id, campaign.Name, extensionTypes, adExtensionsDynamicFeatures)\r\n .reduce((memo, {\r\n extensionType,\r\n title,\r\n topic,\r\n details,\r\n AssociationPanel,\r\n }) => {\r\n const sectionKey = extensionType;\r\n const associations = extensionsAssociations[extensionType];\r\n\r\n const panel = (\r\n }\r\n >\r\n \r\n \r\n\r\n );\r\n memo.panels.push(panel);\r\n memo.sectionsInfo.allSections.push(sectionKey);\r\n\r\n return memo;\r\n }, { panels: [], sectionsInfo: { allSections: [] } });\r\n","import React, { useContext, useMemo } from 'react';\r\nimport classNames from 'classnames';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { LearnMoreLink } from '@bingads-webui-campaign-react/help';\r\nimport {\r\n Collapse,\r\n useCollapseState,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { getAdExtensionsSections } from './get-ad-extensions-section';\r\n\r\nexport const EnhanceYourAdsSection = ({\r\n suggestedObjectiveExtensions,\r\n adExtensionsAssociationsFactory,\r\n adExtensionsDynamicFeatures,\r\n onUpdateExtensionsAssociations,\r\n extensionsAssociations,\r\n campaign,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n const suggestedAdExtensionsSections = useMemo(() => getAdExtensionsSections({\r\n extensionTypes: suggestedObjectiveExtensions,\r\n i18n,\r\n adExtensionsAssociationsFactory,\r\n adExtensionsDynamicFeatures,\r\n onUpdateExtensionsAssociations,\r\n extensionsAssociations,\r\n campaign,\r\n }), [adExtensionsAssociationsFactory, adExtensionsDynamicFeatures, campaign, extensionsAssociations, i18n, onUpdateExtensionsAssociations, suggestedObjectiveExtensions]);\r\n\r\n const [\r\n allEnhanceYourAdsSections,\r\n enhanceYourAdsExpandedSections,\r\n setEnhanceYourAdsExpandedSections,\r\n ] = useCollapseState(\r\n suggestedAdExtensionsSections.sectionsInfo.allSections /* all sections */,\r\n [] /* initially expanded sections */\r\n );\r\n\r\n const enhanceYourAdsSection = useMemo(() => (\r\n <>\r\n {suggestedAdExtensionsSections.panels.length > 0 &&\r\n
\r\n

{i18n.getString(_TL_('Add more information to your ads'))}

\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n {suggestedAdExtensionsSections.panels}\r\n \r\n
\r\n }\r\n \r\n ), [i18n, allEnhanceYourAdsSections, enhanceYourAdsExpandedSections, setEnhanceYourAdsExpandedSections, suggestedAdExtensionsSections]);\r\n\r\n return enhanceYourAdsSection;\r\n};\r\n","import React, { useMemo, useContext } from 'react';\r\nimport classNames from 'classnames';\r\nimport { Panel as BootstrapPanel } from 'react-bootstrap';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n Collapse,\r\n useCollapseState,\r\n ValidatedBootstrapPanel,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\n\r\nimport { getAdExtensionsSections } from './get-ad-extensions-section';\r\n\r\nexport const MoreAssetsSection = ({\r\n otherObjectiveExtensions,\r\n adExtensionsAssociationsFactory,\r\n adExtensionsDynamicFeatures,\r\n onUpdateExtensionsAssociations,\r\n extensionsAssociations,\r\n classes,\r\n campaign,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const otherAdExtensionsSections = useMemo(() => getAdExtensionsSections({\r\n extensionTypes: otherObjectiveExtensions,\r\n i18n,\r\n adExtensionsAssociationsFactory,\r\n adExtensionsDynamicFeatures,\r\n onUpdateExtensionsAssociations,\r\n extensionsAssociations,\r\n campaign,\r\n }), [adExtensionsAssociationsFactory, adExtensionsDynamicFeatures, campaign, extensionsAssociations, i18n, onUpdateExtensionsAssociations, otherObjectiveExtensions]);\r\n\r\n const [\r\n allMoreAssetsSections,\r\n moreAssetsExpandedSections,\r\n setMoreAssetsExpandedSections,\r\n ] = useCollapseState(\r\n otherAdExtensionsSections.sectionsInfo.allSections /* all sections */,\r\n [] /* initially expanded sections */\r\n );\r\n\r\n const moreAssetsSection = useMemo(() => (\r\n <>\r\n {otherAdExtensionsSections.panels.length > 0 &&\r\n (\r\n <>\r\n \r\n \r\n {i18n.getString(_TL_('More assets'))}\r\n \r\n \r\n \r\n \r\n
\r\n \r\n {otherAdExtensionsSections.panels}\r\n \r\n
\r\n
\r\n
\r\n \r\n )}\r\n />\r\n }\r\n \r\n ), [allMoreAssetsSections, classes.collapsiblePanel, i18n, moreAssetsExpandedSections, otherAdExtensionsSections.panels, setMoreAssetsExpandedSections]);\r\n\r\n return moreAssetsSection;\r\n};\r\n","import React, { useContext, useMemo } from 'react';\r\nimport _ from 'underscore';\r\nimport classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Collapse, TextTitle, useCollapseState, ValidatedPanel, collapseExpander, getPanelErrorProps } from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { ValidatedLegacyDateSetting, getDateSettingDetails } from '@bingads-webui-campaign/date-setting';\r\nimport { StartEndDateImg } from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\n\r\nexport const MoreSettingsSection = ({\r\n assetGroup,\r\n campaignTimeZone,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const [\r\n allMoreSettingsSections,\r\n moreSettingsExpandedSections,\r\n setMoreSettingsExpandedSections,\r\n ] = useCollapseState(\r\n ['start-end-dates'] /* all sections */,\r\n ['start-end-dates'] /* initially expanded sections */\r\n );\r\n\r\n const moreSettingsExpand = useMemo(\r\n () => collapseExpander({ setActiveKeys: setMoreSettingsExpandedSections }),\r\n [setMoreSettingsExpandedSections]\r\n );\r\n\r\n const startDate = useMemo(() => (assetGroup.data && assetGroup.data.StartDate ? assetGroup.data.StartDate : new Date()), [assetGroup.data]);\r\n\r\n const moreSettingsSection = useMemo(() => (\r\n
\r\n
{i18n.getString(_TL_('MORE SETTINGS'))}
\r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: moreSettingsExpand,\r\n expandKey: 'start-end-dates',\r\n }}\r\n >\r\n \r\n \r\n \r\n
\r\n ), [i18n, allMoreSettingsSections, moreSettingsExpandedSections, setMoreSettingsExpandedSections, startDate, moreSettingsExpand, assetGroup.data?.EndDate, assetGroup.data?.Id, campaignTimeZone]);\r\n\r\n return moreSettingsSection;\r\n};\r\n\r\nMoreSettingsSection.propTypes = {\r\n assetGroup: PropTypes.shape({}).isRequired,\r\n campaignTimeZone: PropTypes.string.isRequired,\r\n};\r\n","import React from 'react';\r\nimport { Shimmer, ShimmerElementType, mergeStyles } from '@fluentui/react';\r\n\r\nconst wrapperClass = mergeStyles({\r\n padding: 2,\r\n selectors: {\r\n '& > .ms-Shimmer-container': {\r\n margin: '10px 0',\r\n border: 'none',\r\n },\r\n },\r\n});\r\n\r\nexport const radiusShimmerElement = [\r\n { type: ShimmerElementType.line, width: 20, height: 20 },\r\n { type: ShimmerElementType.gap, width: 5 },\r\n { type: ShimmerElementType.line, height: 16, width: 300 },\r\n { type: ShimmerElementType.gap, height: 20, width: '100%' },\r\n];\r\n\r\nexport const SectionShimmer = () => (\r\n
\r\n \r\n \r\n \r\n
\r\n);\r\n\r\nconst audienceShimmerElement = [\r\n { type: ShimmerElementType.line, width: 200, height: 100 },\r\n { type: ShimmerElementType.gap, width: '2%', height: 100 },\r\n { type: ShimmerElementType.line, width: 200, height: 100 },\r\n { type: ShimmerElementType.gap, width: '100%', height: 100 },\r\n];\r\n\r\nconst shimmerWithElementFirstRow = [\r\n { type: ShimmerElementType.line, height: 30 },\r\n { type: ShimmerElementType.gap, width: 10, height: 30 },\r\n { type: ShimmerElementType.line, height: 30 },\r\n { type: ShimmerElementType.gap, width: 10, height: 30 },\r\n { type: ShimmerElementType.line, height: 30 },\r\n { type: ShimmerElementType.gap, width: 10, height: 30 },\r\n { type: ShimmerElementType.line, height: 30 },\r\n { type: ShimmerElementType.gap, width: 10, height: 30 },\r\n { type: ShimmerElementType.line, height: 30 },\r\n { type: ShimmerElementType.gap, width: 10, height: 30 },\r\n];\r\nconst shimmerWithElementSecondRow = [\r\n { type: ShimmerElementType.circle, height: 24 },\r\n { type: ShimmerElementType.gap, width: '2%', height: 24 },\r\n { type: ShimmerElementType.line, height: 16, width: '20%' },\r\n { type: ShimmerElementType.gap, width: '100%', height: 16 },\r\n];\r\n\r\nexport const AudienceSignalShimmer = () => (\r\n
\r\n \r\n
\r\n);\r\n\r\nconst singleLineShimmer = [\r\n { type: ShimmerElementType.line, width: 200, height: 50 },\r\n];\r\n\r\nexport const SingleLineShimmer = () => (\r\n
\r\n \r\n
\r\n);\r\n\r\nexport const AdScheduleShimmer = () => (\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n);\r\n\r\nexport const RadioShimmer = () => (\r\n
\r\n \r\n \r\n
\r\n);\r\n\r\nexport const StoreSelectorShimmer = () => (\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n);\r\n","import React, { useContext, useMemo } from 'react';\r\nimport { isEmpty } from 'underscore';\r\nimport classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Collapse, TextTitle, useCollapseState, ValidatedPanel, getPanelErrorProps } from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { SearchThemesImg } from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport { AudienceSignalPanel } from '@bingads-webui-campaign-react/step-wizard-controls';\r\nimport { AudienceSignalSection, getSearchThemeDetails, PANEL_KEYS } from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport { PerformanceMarkerContext } from '@bingads-webui-campaign-react/performance-marker-provider';\r\nimport { ValidationSearchThemeSelector } from '@bingads-webui-campaign-react/search-theme-selector';\r\nimport { SingleLineShimmer } from '../../../shared/components/section-shimmer';\r\n\r\nexport const SignalSection = ({\r\n assetGroup,\r\n permissions,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n const isSearchThemeEnabled = permissions && permissions.dynamic && permissions.dynamic.SearchThemes;\r\n const isLoading = useMemo(() => isEmpty(assetGroup), [assetGroup]);\r\n const perfMarker = useContext(PerformanceMarkerContext);\r\n\r\n const [\r\n audienceSignalSections,\r\n audienceSignalExpandedSections,\r\n setaudienceSignalSettingsExpandedSections,\r\n ] = useCollapseState(\r\n isSearchThemeEnabled ? ['audience-signal', 'search-themes'] : ['audience-signal'] /* all sections */,\r\n isSearchThemeEnabled ? ['audience-signal', 'search-themes'] : ['audience-signal'] /* initially expanded sections */\r\n );\r\n\r\n const searchThemeSection = useMemo(() => (\r\n
\r\n {isLoading ? :\r\n ()\r\n }\r\n
\r\n ), [assetGroup, i18n, isLoading, perfMarker]);\r\n\r\n const signalSection = useMemo(() => (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n {isSearchThemeEnabled &&\r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{ expandKey: 'search-themes' }}\r\n >\r\n {searchThemeSection}\r\n \r\n }\r\n
\r\n ), [audienceSignalSections, audienceSignalExpandedSections, setaudienceSignalSettingsExpandedSections, isLoading, perfMarker, assetGroup, isSearchThemeEnabled, i18n, searchThemeSection]);\r\n\r\n return signalSection;\r\n};\r\n\r\nSignalSection.propTypes = {\r\n assetGroup: PropTypes.shape({}).isRequired,\r\n campaignTimeZone: PropTypes.string.isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n SearchThemes: PropTypes.bool,\r\n }).isRequired,\r\n }).isRequired,\r\n};\r\n","export const getAssetsStepStyles = () => ({\r\n container: {\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n width: '100%',\r\n gap: '32px',\r\n\r\n '& .title-item': {\r\n width: 'unset !important',\r\n },\r\n },\r\n 'container-l': {\r\n width: 'calc(100% - 64px)',\r\n },\r\n imageExperience: {\r\n '& .image-experience-content': {\r\n minWidth: 'unset !important',\r\n },\r\n },\r\n formContainer: {\r\n width: '100%',\r\n '& .text-assets-collection-container': {\r\n width: 'auto',\r\n },\r\n '& .asset-group-name-section .error-string-wrapper': {\r\n right: 'unset !important',\r\n position: 'unset !important',\r\n },\r\n\r\n '& .text-input-container': {\r\n width: '100%',\r\n },\r\n '& .date-settings table': {\r\n width: 'unset !important',\r\n },\r\n '& .asset-group-enhance-ads-section': {\r\n '& .section-description': {\r\n marginBottom: '16px',\r\n },\r\n },\r\n },\r\n 'formContainer-xxl': {\r\n width: '530px',\r\n },\r\n 'formContainer-xl': {\r\n width: '430px',\r\n },\r\n previewerContainer: {\r\n '& > div': {\r\n top: 124,\r\n },\r\n flexGrow: '1',\r\n },\r\n 'previewerContainer-l': {\r\n width: 'calc(100% - 64px)',\r\n },\r\n 'previewerContainer-m': {\r\n width: 'calc(100% - 64px)',\r\n },\r\n 'previewerContainer-s': {\r\n width: 'calc(100% - 64px)',\r\n },\r\n formHeader: {\r\n marginBottom: '24px',\r\n },\r\n});\r\n","import _, { noop, first, isArray } from 'underscore';\r\nimport classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useRef, useState, useContext, useMemo, useCallback, useEffect } from 'react';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { RecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { withBannerService, CopilotRepositoryProvider } from '@bingads-webui/inline-copilot';\r\nimport { getAssetGroupStepStyles, getExtensionFormatters } from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport { useWizardService, matchStepState, STEP_STATES } from '@bingads-webui-react/wizard';\r\nimport { withControlErrorHandling } from '@bingads-webui-campaign-react/error-handling';\r\nimport {\r\n ValidatedImageExperienceWrapper,\r\n hasImages,\r\n PerfMaxResponsiveAdPreviewUAPL,\r\n} from '@bingads-webui-campaign-react/pmax-image-experience';\r\nimport { mergeI18n } from '@bingads-webui-campaign-react/i18n-merger';\r\nimport { buildLegacyI18n } from '@bingads-webui/build-legacy-i18n';\r\nimport { ValidationStringMap } from '@bingads-webui/validation-string-map';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { AttentionBeaconGroup } from '@bingads-webui-campaign-react/attention-beacon';\r\nimport { ActuationGroup } from '@bingads-webui-campaign-react/actuator';\r\nimport { ValidationGroup, ErrorMessages } from '@bingads-webui-react/validation';\r\nimport {\r\n FormErrorGroup, UnmappedFormErrors as OriginalUnmappedFormErrors,\r\n} from '@bingads-webui-campaign-react/form-error';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport { AssetGroup } from '@bingads-webui/campaign-odata-schemas';\r\nimport { withScope } from '@bingads-webui-react/scope-service';\r\nimport { useFormService } from '@bingads-webui-react/form';\r\nimport { hasTextAssets } from '@bingads-webui-campaign-react/validated-text-collection';\r\nimport { PerformanceMarkerContext } from '@bingads-webui-campaign-react/performance-marker-provider';\r\nimport { getFinalUrlWithPath } from '@bingads-webui-campaign-react/validated-url-input';\r\nimport { useResponsiveStyles } from '@bingads-webui-campaign-react/common-hooks';\r\n\r\nimport {\r\n AssetEventFeature,\r\n useCopilotRecommendationSurvey,\r\n} from '@bingads-webui-campaign-react/copilot-common';\r\nimport { useCopilot } from '@bingads-webui-campaign-react/copilot-experience';\r\n\r\nimport { InstrumentationContext } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { useIsMounted } from '@bingads-webui-campaign-react/step-wizard-controls';\r\nimport { legacyI18nOfListingGroup } from '@bingads-webui-campaign-react/listing-groups-page';\r\nimport { AssetScenario } from '@bingads-webui-react/copilot-event-provider';\r\n\r\nimport { AssetGroupNameSection } from './components/asset-group-name-section';\r\nimport { AssetGroupNameSectionWithSocialSiteRecommendation } from './components/asset-group-name-section-with-social-site-recommendation';\r\nimport { AssetsSection } from './components/assets-section';\r\nimport { MoreOptionsSection } from './components/more-options-section';\r\nimport { EnhanceYourAdsSection } from './components/enhance-your-ads-section';\r\nimport { MoreAssetsSection } from './components/more-assets-section';\r\nimport { MoreSettingsSection } from './components/more-settings-section';\r\nimport { SignalSection } from './components/audience-signal-section';\r\nimport { getAssetsStepStyles } from './assets-step-styles';\r\nimport { STEP_PATHS } from '../step-constants';\r\n\r\nconst UnmappedFormErrors = withControlErrorHandling(OriginalUnmappedFormErrors);\r\n\r\nconst AssetsStepFormInternal = ({\r\n data,\r\n onDataChange: onDataChangeProp,\r\n error,\r\n scope,\r\n}) => {\r\n const getStyles = useResponsiveStyles(getAssetsStepStyles);\r\n\r\n const isMounted = useIsMounted();\r\n\r\n const onDataChange = useCallback((...args) => {\r\n if (!isMounted.current) return;\r\n onDataChangeProp(...args);\r\n }, [isMounted, onDataChangeProp]);\r\n\r\n const {\r\n serverErrors = [],\r\n systemErrors = [],\r\n } = error || {};\r\n\r\n const {\r\n campaign,\r\n assetGroup,\r\n } = data;\r\n\r\n const activity = useContext(ActivityContext);\r\n const i18n = useContext(I18nContext);\r\n const serverContext = useContext(ServerContext);\r\n const instrumentation = useContext(InstrumentationContext);\r\n const perfMarker = useContext(PerformanceMarkerContext);\r\n\r\n const imagesContainerRef = useRef(null);\r\n const logosContainerRef = useRef(null);\r\n\r\n const { state } = useWizardService();\r\n\r\n const { context: { wizardData } } = state;\r\n\r\n const legacyI18n = useMemo(() => buildLegacyI18n(i18n, [ValidationStringMap, legacyI18nOfListingGroup]), [i18n]);\r\n const legacyGlobalI18n = useMemo(() => window.globalLegacyI18n.get('$/i18n!legacy/global'), []);\r\n\r\n const mergedI18n = useMemo(() => {\r\n const mergedTempI18n = mergeI18n(\r\n legacyI18n,\r\n i18n\r\n );\r\n\r\n return mergeI18n(\r\n legacyGlobalI18n,\r\n mergedTempI18n\r\n );\r\n }, [i18n, legacyI18n, legacyGlobalI18n]);\r\n\r\n const {\r\n adExtensionsAssociationsFactory,\r\n adExtensionsDynamicFeatures,\r\n } = wizardData;\r\n\r\n const {\r\n wizardData: { flow },\r\n } = state.context;\r\n\r\n const { state: { context: { saveFailed } } } = useFormService();\r\n\r\n const classes = useDefaultStyles(getAssetGroupStepStyles);\r\n\r\n const isSaving = matchStepState(state, STEP_STATES.SAVING);\r\n const isCanceling = matchStepState(state, STEP_STATES.CANCELING);\r\n\r\n const { cid, aid } = scope.values || {};\r\n\r\n const {\r\n FinalUrls,\r\n Images,\r\n CallToAction,\r\n FinalUrlForRecommendation,\r\n BusinessName,\r\n videos = [],\r\n Headlines = {},\r\n LongHeadlines = {},\r\n Descriptions = {},\r\n extensionsAssociations = {},\r\n Path1,\r\n Path2,\r\n MobileFinalUrls,\r\n AssetGroupUrlTargets,\r\n UrlRulesOption,\r\n } = assetGroup || {};\r\n\r\n const {\r\n ProviderId,\r\n Id,\r\n } = campaign || {};\r\n\r\n const { Permissions, DynamicPermissions } = serverContext || {};\r\n const permissions = useMemo(() => ({ dynamic: { ...DynamicPermissions }, ...Permissions }), [DynamicPermissions, Permissions]);\r\n\r\n const {\r\n UAPLPMaxLogoPreviewEnabled, CopilotCTALogoGeneration, PmaxExtensionPreview,\r\n PMaxNewAspectRatios: isPMaxNewAspectRatiosEnabled,\r\n PMaxExcludeNewAspectRatios: isPMaxNewAspectRatiosExcluded,\r\n AdPreviewRefresh: isAdPreviewRefreshEnabled,\r\n } = permissions.dynamic;\r\n\r\n const isPMaxAspectRatiosV2Enabled = isPMaxNewAspectRatiosEnabled && !isPMaxNewAspectRatiosExcluded;\r\n\r\n const {\r\n triggerSurveyOnSubmit,\r\n triggerSurveyOnCancel,\r\n } = useCopilotRecommendationSurvey(AssetEventFeature.PMAX);\r\n\r\n const [recommendationContext] = useContext(RecommendationContext);\r\n\r\n const { postAssetEventLog } = recommendationContext || _.noop;\r\n\r\n const [selectedVideoId, setSelectedVideoId] = useState(0);\r\n\r\n const [finalUrlForCopilotRecommendations, setFinalUrlForCopilotRecommendations] = useState(first(FinalUrls) || FinalUrlForRecommendation);\r\n const [imageExperiencePortalContainerState, setImageExperiencePortalContainerState] = useState({});\r\n const [imageExperienceAddNewImageCallback, setImageExperienceAddNewImageCallback] = useState(noop);\r\n const [addNewDescriptionCallback, setAddNewDescriptionCallback] = useState(noop);\r\n const [addNewShortHeadlinesCallback, setAddNewShortHeadlinesCallback] = useState(noop);\r\n const [addNewLongHeadlinesCallback, setAddNewLongHeadlinesCallback] = useState(noop);\r\n const [newCTACallback, setNewCTACallback] = useState(noop);\r\n const [previewImagesSharedState, setPreviewImagesSharedState] = useState({\r\n previewImageId: null,\r\n previewLogoId: null,\r\n cropImageObj: null,\r\n editingPlacementType: '',\r\n });\r\n\r\n const onReset = useCallback(() => {\r\n onDataChange({\r\n data: prevData => ({\r\n ...prevData,\r\n assetGroup: {\r\n ...prevData.assetGroup,\r\n Images: {\r\n ...assetGroup.Images,\r\n ImageList: [],\r\n ImageAssets: null,\r\n },\r\n Headlines: {\r\n Headline0: '',\r\n Headline1: '',\r\n Headline2: '',\r\n },\r\n LongHeadlines: {\r\n LongHeadline0: '',\r\n },\r\n Descriptions: {\r\n Description0: '',\r\n Description1: '',\r\n },\r\n },\r\n }),\r\n isValid: false,\r\n });\r\n }, [assetGroup, onDataChange]);\r\n\r\n const maxUploadNum = useMemo(() => {\r\n const imageListLength = Images && Images.ImageList && isArray(Images.ImageList) ? Images.ImageList.length : 0;\r\n return 20 - imageListLength;\r\n }, [Images]);\r\n\r\n const {\r\n copilotBanner,\r\n suggestionPoller,\r\n themes,\r\n } = useCopilot({\r\n maxUploadNum,\r\n addNewShortHeadlinesCallback,\r\n addNewLongHeadlinesCallback,\r\n addNewDescriptionCallback,\r\n imageExperienceAddNewImageCallback,\r\n newCTACallback,\r\n currentCTA: CallToAction,\r\n onReset,\r\n cid,\r\n aid,\r\n serverContext,\r\n instrumentation,\r\n data: assetGroup,\r\n isSaving,\r\n isCanceling,\r\n enableCopilotRecommendations: true,\r\n feature: AssetEventFeature.PMAX,\r\n assetScenario: AssetScenario.CREATE_WORK_FLOW,\r\n });\r\n\r\n const onFinalURLFocusOut = useCallback(() => {\r\n // to prevent sending too many requests, only update the copilot recommendations after user has finished editing URL\r\n setFinalUrlForCopilotRecommendations(FinalUrlForRecommendation);\r\n }, [FinalUrlForRecommendation]);\r\n\r\n const assetGroupNameSection = useMemo(() => (\r\n <>\r\n {permissions && permissions.dynamic && permissions.dynamic.SocialSitesRecommendation ? (\r\n \r\n ) : (\r\n \r\n )}\r\n {copilotBanner}\r\n \r\n ), [FinalUrls, campaign, copilotBanner, onFinalURLFocusOut, permissions]);\r\n\r\n const textAndImageAssetsOptional = useMemo(() => ProviderId && !hasImages(Images) && !hasTextAssets(Headlines, LongHeadlines, Descriptions), [Descriptions, Headlines, Images, LongHeadlines, ProviderId]);\r\n\r\n const updateFinalUrlCallback = useCallback((newFinalUrls) => {\r\n onDataChange({\r\n data: prevData => ({\r\n ...prevData,\r\n assetGroup: {\r\n ...prevData.assetGroup,\r\n FinalUrls: newFinalUrls,\r\n },\r\n }),\r\n });\r\n }, [onDataChange]);\r\n\r\n const updateExtensionsAssociations = useCallback((extensionType, associations) => {\r\n onDataChange({\r\n data: prevData => ({\r\n ...prevData,\r\n assetGroup: {\r\n ...prevData.assetGroup,\r\n extensionsAssociations: {\r\n ...prevData.assetGroup.extensionsAssociations,\r\n [extensionType]: associations,\r\n },\r\n },\r\n }),\r\n });\r\n }, [onDataChange]);\r\n\r\n const onUpdateImageList = useCallback((newImageList) => {\r\n onDataChange({\r\n data: prevData => ({\r\n ...prevData,\r\n assetGroup: {\r\n ...prevData.assetGroup,\r\n Images: {\r\n ...prevData.assetGroup.Images,\r\n ImageList: newImageList,\r\n ImageAssets: null,\r\n },\r\n },\r\n }),\r\n });\r\n }, [onDataChange]);\r\n\r\n const { suggestedObjectiveExtensions = [], otherObjectiveExtensions = [] } = useMemo(() =>\r\n flow !== STEP_PATHS.ASSETGROUPSETTING &&\r\n adExtensionsAssociationsFactory.getObjectiveExtensions(\r\n permissions,\r\n // TODO CHANGE OBJECTIVE\r\n { campaignType: 'PerformanceMax', campaignObjective: 'WebsiteConversions' }\r\n ), [flow, adExtensionsAssociationsFactory, permissions]);\r\n\r\n const assetsSection = useMemo(() => (\r\n <>\r\n \r\n \r\n ), [permissions, selectedVideoId, Images, mergedI18n, videos, perfMarker, BusinessName, Headlines, LongHeadlines, Descriptions, imageExperienceAddNewImageCallback, imageExperiencePortalContainerState, maxUploadNum, CallToAction, ProviderId]);\r\n\r\n const moreOptionsSection = useMemo(() => (\r\n \r\n ), [AssetGroupUrlTargets, FinalUrls, MobileFinalUrls, Path1, Path2, UrlRulesOption, classes, permissions]);\r\n\r\n const enhanceYourAdsSection = useMemo(() => (\r\n \r\n ), [adExtensionsAssociationsFactory, adExtensionsDynamicFeatures, campaign, extensionsAssociations, suggestedObjectiveExtensions, updateExtensionsAssociations]);\r\n\r\n const moreAssetsSection = useMemo(() => (\r\n \r\n ), [adExtensionsAssociationsFactory, adExtensionsDynamicFeatures, campaign, classes, extensionsAssociations, otherObjectiveExtensions, updateExtensionsAssociations]);\r\n\r\n const moreSettingsSection = useMemo(() => (\r\n \r\n ), [assetGroup, campaign]);\r\n\r\n const imageExperienceComponents = useMemo(() => (\r\n
\r\n \r\n
), [i18n, permissions, textAndImageAssetsOptional, updateFinalUrlCallback, previewImagesSharedState, assetGroup, suggestionPoller, perfMarker, postAssetEventLog, isPMaxAspectRatiosV2Enabled, isAdPreviewRefreshEnabled]);\r\n\r\n const displayUrl = useMemo(() => getFinalUrlWithPath(FinalUrls, Path1, Path2), [FinalUrls, Path1, Path2]);\r\n\r\n const adPreview = useMemo(() => {\r\n const previewProps = {\r\n i18n,\r\n imageList: Images && Images.ImageList,\r\n updateImageList: onUpdateImageList,\r\n shortHeadline: Headlines && Headlines.Headline0,\r\n longHeadline: LongHeadlines && LongHeadlines.LongHeadline0,\r\n description: Descriptions && Descriptions.Description0,\r\n businessName: BusinessName,\r\n callToAction: CallToAction,\r\n displayUrl,\r\n url: first(FinalUrls),\r\n videos: (videos.length > selectedVideoId && selectedVideoId !== null) ? [videos[selectedVideoId]] : [],\r\n previewImagesSharedState,\r\n setPreviewImagesSharedState,\r\n permissions,\r\n };\r\n return (\r\n \r\n );\r\n }, [i18n, Images, videos, permissions, onUpdateImageList, selectedVideoId, Headlines, LongHeadlines, Descriptions, BusinessName, CallToAction, displayUrl, FinalUrls, previewImagesSharedState, UAPLPMaxLogoPreviewEnabled, extensionsAssociations, isAdPreviewRefreshEnabled, PmaxExtensionPreview, isPMaxAspectRatiosV2Enabled]);\r\n\r\n const isSettingPage = useMemo(() => permissions.dynamic.PmaxNorthStarAssetGroupSetting && flow === STEP_PATHS.ASSETGROUPSETTING, [flow, permissions.dynamic.PmaxNorthStarAssetGroupSetting]);\r\n\r\n const signalSection = useMemo(() => (\r\n \r\n ), [assetGroup, permissions]);\r\n\r\n useEffect(() => {\r\n if (isSaving) {\r\n triggerSurveyOnSubmit();\r\n }\r\n }, [isSaving, triggerSurveyOnSubmit]);\r\n\r\n useEffect(() => {\r\n if (isCanceling && _.size(themes) > 0) {\r\n triggerSurveyOnCancel();\r\n }\r\n }, [isCanceling, themes, triggerSurveyOnCancel]);\r\n\r\n useEffect(() => {\r\n activity.trace('[PmaxNorthStarWizard] Assets step mounted');\r\n }, [activity]);\r\n\r\n useEffect(() => {\r\n setClarityTag({ PMaxCampaignsCopilotRecommendations: 'true' });\r\n }, []);\r\n\r\n const onAssetGroupValidate = useCallback((result) => {\r\n onDataChange({\r\n data: prevData => ({\r\n ...prevData,\r\n assetGroup: {\r\n ...prevData.assetGroup,\r\n ...result.data,\r\n },\r\n }),\r\n isValid: result.isValid,\r\n isDirty: result.isDirty,\r\n });\r\n }, [onDataChange]);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n {!false &&\r\n <>\r\n

{i18n.getString(_TL_('Asset group'))}

\r\n
\r\n {i18n.getString(_TL_('Performance Max campaigns consist of asset groups, which contain the information and media you want to include in your ads. We\\'ll mix and match the most optimal asset combinations to create effective, high-performing ads.'))}\r\n
\r\n \r\n }\r\n
\r\n \r\n
\r\n \r\n
\r\n {assetGroupNameSection}\r\n
\r\n {assetsSection}\r\n {!isSettingPage && enhanceYourAdsSection}\r\n {!isSettingPage && moreAssetsSection}\r\n {moreOptionsSection}\r\n {moreSettingsSection}\r\n {isSettingPage && signalSection}\r\n
\r\n
\r\n
\r\n {adPreview}\r\n
\r\n
\r\n {imageExperienceComponents}\r\n
\r\n
\r\n \r\n \r\n {/* {navigationConfirmationPrompt} */}\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nAssetsStepFormInternal.propTypes = {\r\n data: PropTypes.shape({\r\n campaign: PropTypes.shape({\r\n Id: PropTypes.number,\r\n TimeZone: PropTypes.string,\r\n }),\r\n assetGroup: PropTypes.shape({\r\n FinalUrls: PropTypes.arrayOf(PropTypes.string),\r\n Images: PropTypes.shape({\r\n ImageList: PropTypes.arrayOf(PropTypes.string),\r\n ImageAssets: PropTypes.shape({}),\r\n }),\r\n CallToAction: PropTypes.shape({\r\n cta: PropTypes.string,\r\n }),\r\n FinalUrlForRecommendation: PropTypes.string,\r\n BusinessName: PropTypes.string,\r\n Headlines: PropTypes.shape({}),\r\n LongHeadlines: PropTypes.shape({}),\r\n Descriptions: PropTypes.shape({}),\r\n }),\r\n }).isRequired,\r\n onDataChange: PropTypes.func.isRequired,\r\n error: PropTypes.shape({\r\n serverErrors: PropTypes.arrayOf(PropTypes.string),\r\n systemErrors: PropTypes.arrayOf(PropTypes.string),\r\n }),\r\n scope: PropTypes.shape({\r\n values: PropTypes.shape({\r\n cid: PropTypes.string,\r\n aid: PropTypes.string,\r\n }),\r\n }).isRequired,\r\n};\r\n\r\nAssetsStepFormInternal.defaultProps = {\r\n error: {},\r\n};\r\n\r\nexport const AssetsStepForm = withBannerService(withScope(AssetsStepFormInternal));\r\n","import React, { useMemo } from 'react';\r\nimport classNames from 'classnames';\r\nimport _ from 'underscore';\r\nimport { AdAssetsFormShimmer, AdAssetsPreviewerShimmer } from '@bingads-webui-campaign-react/pmax-lite-shimmers';\r\nimport { useResponsiveStyles } from '@bingads-webui-campaign-react/common-hooks';\r\n\r\nimport { AssetsStepForm } from './assets-step-form';\r\nimport { getAssetsStepStyles } from './assets-step-styles';\r\n\r\nexport const AssetsStepShell = (props) => {\r\n const { data } = props || {};\r\n\r\n const isLoading = useMemo(() => _.isEmpty(data), [data]);\r\n const getStyles = useResponsiveStyles(getAssetsStepStyles);\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\n
\r\n
\r\n : \r\n }\r\n \r\n );\r\n};\r\n","export const getODataConfig = (serverContext) => {\r\n const isLocal = () => {\r\n const hostname = document.location.hostname.toLowerCase();\r\n return hostname.indexOf('ads.microsoft.com') === -1 &&\r\n hostname.indexOf('ads-int.microsoft.com') === -1;\r\n };\r\n\r\n const odataPath = isLocal() ? 'Advertiser/V2' : 'Campaign/V2';\r\n\r\n const oDataConfig = {\r\n odataToken: serverContext.Token,\r\n oDataToken: serverContext.Token,\r\n odataPath: `${serverContext.ServicesEndpoints.CampaignAPI}${odataPath}`,\r\n oDataPath: `${serverContext.ServicesEndpoints.CampaignAPI}${odataPath}`,\r\n };\r\n\r\n return oDataConfig;\r\n};\r\n","\r\nimport { generateNameSuggestionSuffix } from '@bingads-webui-campaign/audience-campaign-shared';\r\nimport { MAX_CONVERSIONS_VALUE } from '@bingads-webui-campaign-react/bid-strategy-component';\r\nimport { Scopes } from '@bingads-webui-campaign-react/goal-selector';\r\nimport { getBudgetRange } from '@bingads-webui-campaign-legacy/common-grid-config/budget/get-budget-range';\r\nimport timeZoneMapper from '@bingads-webui-component-legacy/timezonemapper/index';\r\nimport { URL_RULES_OPTIONS } from '@bingads-webui-campaign-react/url-rules';\r\nimport { getDefaultLocationTargetsViewModel, getDefaultLanguagesViewModel } from '@bingads-webui-campaign-react/wizard-shared-components';\r\n\r\nexport const getDefaultCampaignData = ({\r\n i18n,\r\n serverContext,\r\n providerId,\r\n salesCountry,\r\n localInventory,\r\n isFeedFiltered,\r\n feedLabel,\r\n cnMarketAccount,\r\n}) => ({\r\n Name: `${generateNameSuggestionSuffix(i18n.getString(_TL_('PerformanceMax-Campaign')))}-${Math.floor(Math.random() * 100)}`,\r\n Status: 'Paused',\r\n TimeZone: timeZoneMapper.getAccountTimeZone(),\r\n Budget: {\r\n Amount: getBudgetRange(serverContext.CurrentAccount.CurrencyCode).Daily.Default,\r\n Type: 'DailyStandard',\r\n },\r\n Languages: getDefaultLanguagesViewModel(cnMarketAccount),\r\n BiddingScheme: {\r\n Type: MAX_CONVERSIONS_VALUE.type,\r\n TargetCpa: undefined,\r\n TargetRoas: undefined,\r\n },\r\n CampaignType: 'PerformanceMax',\r\n FinalUrlSuffix: '',\r\n TrackingUrlTemplate: '',\r\n UrlCustomParameters: [],\r\n locationTargets: getDefaultLocationTargetsViewModel(cnMarketAccount),\r\n adSchedules: {\r\n adScheduleUseSearcherTimeZone: undefined,\r\n dayTimeRanges: [],\r\n timeZone: undefined,\r\n },\r\n finalUrlExpansions: [],\r\n conversionGoals: {\r\n originalConversionGoals: [],\r\n goalSelection: [],\r\n goalScopeSelection: Scopes.ACCOUNT,\r\n },\r\n CampaignConversionGoal: {\r\n Goals: [],\r\n },\r\n ProviderId: providerId,\r\n IsFeedFiltered: isFeedFiltered,\r\n SalesCountry: salesCountry,\r\n FeedLabel: feedLabel,\r\n LocalInventoryAdsEnabled: localInventory,\r\n finalUrlExpansionOptOut: cnMarketAccount,\r\n autoGeneratedTextOptOut: cnMarketAccount,\r\n autoGeneratedImageOptOut: cnMarketAccount,\r\n costPerSaleOptOut: false,\r\n});\r\n\r\nexport const getDefaultAssetGroup = ({ i18n, businessName, storeFinalUrl = null }) => ({\r\n Name: generateNameSuggestionSuffix(i18n.getString(_TL_('AssetGroup'))),\r\n Status: 'Paused',\r\n Images: {\r\n ImageList: [],\r\n IsOptional: true,\r\n },\r\n BusinessName: businessName,\r\n FinalUrls: [storeFinalUrl],\r\n FinalUrlForRecommendation: storeFinalUrl,\r\n UrlRulesOption: URL_RULES_OPTIONS.All,\r\n});\r\n\r\n","import {\r\n apiErrorMapper,\r\n initialBrandExclusionsViewModel,\r\n saveCampaignAndLinkedData,\r\n} from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport { notificationApi } from '@bingads-webui-campaign/notification-center';\r\nimport { getRoutePathById, allSiteMap } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { getDefaultCampaignData } from './default-data';\r\n\r\nexport const createDefaultCampaign = ({\r\n i18n,\r\n serverContext,\r\n scenarioContext,\r\n providerId = '',\r\n salesCountry = undefined,\r\n localInventory = false,\r\n isFeedFiltered = false,\r\n feedLabel = null,\r\n}) => {\r\n const permissions = serverContext.Permissions || {};\r\n\r\n const initialCampaignViewModel = {\r\n data: getDefaultCampaignData({\r\n i18n,\r\n serverContext,\r\n providerId,\r\n salesCountry,\r\n localInventory,\r\n isFeedFiltered,\r\n feedLabel,\r\n cnMarketAccount: permissions.IsDomesticSimplifiedChineseEnabled,\r\n }),\r\n };\r\n\r\n return saveCampaignAndLinkedData({\r\n campaign: initialCampaignViewModel,\r\n originalCampaign: {},\r\n brandExclusions: initialBrandExclusionsViewModel,\r\n }, {\r\n scenario: scenarioContext.name,\r\n i18n,\r\n activityLogger: scenarioContext.createActivity('saveDefaultCampaign'),\r\n });\r\n};\r\n\r\nexport const handleDefaultCampaignCreationError = ({\r\n i18n,\r\n scope,\r\n errorData,\r\n}) => {\r\n // Only server errors are avaialble at this point\r\n const { serverErrors = [] } = errorData || {};\r\n const errorMessages = serverErrors.map(apiErrorMapper).join(', ');\r\n notificationApi.showWarning(i18n.getString(_TL_(\"We've encountered errors - {{errorMessages}} and can't continue. Please contact support for further assistance.\"), { errorMessages }));\r\n\r\n const campaignsPagePath = getRoutePathById(allSiteMap, 'campaigns');\r\n const { aid, cid, uid } = scope.values;\r\n const searchParams = `?uid=${uid}&cid=${cid}&aid=${aid}`;\r\n scope.history.push({\r\n pathname: campaignsPagePath,\r\n search: searchParams,\r\n });\r\n};\r\n","export const BudgetStepSection = {\r\n Budget: 'budget',\r\n BidStrategy: 'bid-strategy',\r\n AdvancedBidStrategy: 'advanced-bid-strategy',\r\n NewCustomerAcquisition: 'new-customer-acquisition',\r\n};\r\n\r\nexport const AllBudgetStepSections = [\r\n BudgetStepSection.Budget,\r\n BudgetStepSection.BidStrategy,\r\n BudgetStepSection.AdvancedBidStrategy,\r\n BudgetStepSection.NewCustomerAcquisition,\r\n];\r\n","import { useContext, useCallback } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\n\r\nexport const useLocalizeBudget = () => {\r\n const i18n = useContext(I18nContext);\r\n const localizeBudget = useCallback((budget, currency) => i18n.formatCurrency(\r\n Number(budget), currency.toUpperCase(),\r\n { withSymbol: false, maximumFractionDigits: 2 }\r\n ), [i18n]);\r\n return {\r\n localizeBudget,\r\n };\r\n};\r\n","export const getBudgetFormStyles = (_, { palette = {} }) => ({\r\n budgetPerformanceTile: {\r\n width: 'max-content',\r\n },\r\n header: {\r\n marginBottom: 20,\r\n },\r\n 'budgetPerformanceTile-m': {\r\n width: '100%',\r\n },\r\n 'budgetPerformanceTile-s': {\r\n width: '100%',\r\n },\r\n formContainer: {\r\n maxWidth: 680,\r\n minWidth: 300,\r\n flex: '1',\r\n '& .bid-strategy-dropdown': {\r\n '& .ms-Dropdown': {\r\n maxWidth: 312,\r\n },\r\n },\r\n '& .title-item': {\r\n width: 'auto',\r\n },\r\n },\r\n budgetTitle: {\r\n fontSize: '18px',\r\n display: 'inline',\r\n },\r\n collapsiblePanel: {\r\n border: 'none',\r\n marginBottom: 'unset',\r\n backgroundColor: 'unset',\r\n '& .panel-heading': {\r\n padding: 0,\r\n borderBottom: 'none',\r\n marginBottom: 18,\r\n\r\n '& .panel-title': {\r\n fontSize: 18,\r\n '& > a': {\r\n marginLeft: '-8px', // compensate 8px padding on the left of icon\r\n color: palette.themePrimary,\r\n padding: 0,\r\n '&:hover, &:active': {\r\n color: palette.themeDarker,\r\n textDecoration: 'none',\r\n backgroundColor: 'unset',\r\n },\r\n },\r\n\r\n '& > a:after': {\r\n transform: 'rotate(180deg)',\r\n },\r\n\r\n '& > a.collapsed:after': {\r\n transform: 'rotate(90deg)',\r\n },\r\n },\r\n },\r\n\r\n '& .panel-collapse': {\r\n '& .panel-body': {\r\n padding: 0,\r\n overflow: 'hidden',\r\n },\r\n },\r\n },\r\n advancedBidStrategyContent: {\r\n '& .toggle-icon': {\r\n visibility: 'hidden',\r\n },\r\n },\r\n});\r\n","import React, { useMemo, useContext, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport _ from 'underscore';\r\nimport BingAdsWebUIStaticLegacyPageContext from '@bingads-webui-static-legacy/page-context';\r\nimport { ValidationGroup, ErrorMessages } from '@bingads-webui-react/validation';\r\nimport { AttentionBeaconGroup } from '@bingads-webui-campaign-react/attention-beacon';\r\nimport { ActuationGroup } from '@bingads-webui-campaign-react/actuator';\r\nimport { BudgetComponent } from '@bingads-webui-campaign-react/budget-component';\r\nimport {\r\n BidStrategyComponent,\r\n MAX_CONVERSIONS,\r\n MAX_CONVERSIONS_VALUE\r\n} from '@bingads-webui-campaign-react/bid-strategy-component';\r\nimport { useIsMounted } from '@bingads-webui-campaign-react/step-wizard-controls';\r\nimport { ConversionBasedBiddingBanner } from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport { TargetCpaWarningBanner } from '@bingads-webui-campaign-react/target-cpa-warning-banner';\r\nimport { ValidatedCostPerSale } from '@bingads-webui-campaign-react/cost-per-sale-option';\r\nimport { ValidatedNewCustomerAcquisition, ValidatedNewCustomerAcquisitionHeader, newCustomerAcquisitionServerErrorFilter } from '@bingads-webui-campaign-react/new-customer-acquisition';\r\nimport { useResponsiveStyles } from '@bingads-webui-campaign-react/common-hooks';\r\nimport { Panel as BootstrapPanel } from 'react-bootstrap';\r\nimport { mergeI18n } from '@bingads-webui-campaign-react/i18n-merger';\r\nimport { buildLegacyI18n } from '@bingads-webui/build-legacy-i18n';\r\nimport { ValidationStringMap } from '@bingads-webui/validation-string-map';\r\nimport {\r\n Collapse,\r\n TextTitle,\r\n useCollapseState,\r\n collapseExpander,\r\n ValidatedPanel,\r\n getPanelErrorProps,\r\n ValidatedBootstrapPanel,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { useFormService, FORM_STATES } from '@bingads-webui-react/form';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport {\r\n FormErrorGroup,\r\n UnmappedFormErrors as OriginalUnmappedFormErrors,\r\n entityIs,\r\n propertyIs,\r\n andComp,\r\n} from '@bingads-webui-campaign-react/form-error';\r\nimport { Campaign } from '@bingads-webui/campaign-odata-schemas';\r\nimport {\r\n apiErrorMapper,\r\n ERROR_ENTITY,\r\n CostPerSaleImg,\r\n} from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport {\r\n withUnvalidatedControlErrors,\r\n withControlErrorHandling,\r\n} from '@bingads-webui-campaign-react/error-handling';\r\nimport { BudgetSuggestionContainer, MODE } from '@bingads-webui-campaign-react/budget-suggestion-v2';\r\nimport { CampaignTypes } from '@bingads-webui-campaign-react/constants';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { useWizardService, getFlowFactors } from '@bingads-webui-react/wizard';\r\nimport { BudgetStepSection, AllBudgetStepSections } from './utils/const';\r\nimport { useLocalizeBudget } from './utils/use-budget-localized';\r\nimport BidStrategyIcon from './media/bid-strategy.svg';\r\nimport BudgetIcon from './media/budget.svg';\r\nimport { getBudgetFormStyles } from './styles/get-budget-form-styles';\r\nimport { useBudgetSuggestionData } from './use-budget-suggestion-data';\r\nimport { FLOWS } from '../step-constants';\r\nimport { SingleLineShimmer } from '../../shared/components/section-shimmer';\r\n\r\nconst { BudgetRange } = BingAdsWebUIStaticLegacyPageContext;\r\n\r\nconst entityIsCampaign = entityIs(ERROR_ENTITY.Campaign);\r\nconst budgetProp = andComp(entityIsCampaign, propertyIs('Budget'));\r\nconst bidStrategyProp = andComp(entityIsCampaign, propertyIs('BiddingScheme'));\r\nconst campaignCPSOptOutProp = andComp(entityIsCampaign, propertyIs('CostPerSaleOptOut'));\r\n\r\nconst ServerValidatedBudgetComponent = withControlErrorHandling(withUnvalidatedControlErrors(BudgetComponent, { filter: budgetProp }));\r\nconst ServerValidatedBidStrategyComponent = withControlErrorHandling(withUnvalidatedControlErrors(BidStrategyComponent, { filter: bidStrategyProp }));\r\nconst ServerValidatedCostPerSale = withControlErrorHandling(withUnvalidatedControlErrors(ValidatedCostPerSale, { filter: campaignCPSOptOutProp }));\r\nconst ServerValidatedNewCustomerAcquisition = withControlErrorHandling(withUnvalidatedControlErrors(ValidatedNewCustomerAcquisition, { filter: newCustomerAcquisitionServerErrorFilter }));\r\nconst UnmappedFormErrors = withControlErrorHandling(OriginalUnmappedFormErrors);\r\n\r\nconst BID_STRATEGY_OPTIONS = [\r\n MAX_CONVERSIONS,\r\n MAX_CONVERSIONS_VALUE,\r\n];\r\n\r\nexport const BudgetStepShell = ({\r\n data: budgetInfo,\r\n onDataChange,\r\n error,\r\n}) => {\r\n const {\r\n campaign,\r\n conversionGoalDetails,\r\n budgetAmount,\r\n bidStrategy,\r\n currency,\r\n cpa,\r\n roas,\r\n isInitialAdditionalDetailsChecked,\r\n budgetSuggestionData,\r\n fetchCustomBudgetPerformanceData,\r\n budgetTier,\r\n loadBudgetPartial,\r\n } = budgetInfo || {};\r\n const {\r\n costPerSaleOptOut,\r\n newCustomerAcquisition,\r\n newCustomerAcquisitionOptOut,\r\n } = campaign || {};\r\n\r\n const getStyles = useResponsiveStyles(getBudgetFormStyles);\r\n const { serverErrors, systemErrors } = error || {};\r\n const { state } = useFormService();\r\n const { saveFailed } = state.context;\r\n const isLoading = state.matches(FORM_STATES.LOADING);\r\n const isDataLoading = useMemo(() => _.isEmpty(budgetInfo), [budgetInfo]);\r\n const { localizeBudget } = useLocalizeBudget();\r\n const isMounted = useIsMounted();\r\n const serverContext = useContext(ServerContext);\r\n const bidRange = (serverContext && serverContext.KeywordBidRange) || null;\r\n const { Permissions, DynamicPermissions, CurrentAccount: { AdvertiserCustomerID: advertiserCustomerId, CurrencyCode } } = serverContext || {};\r\n const permissions = useMemo(() => ({ dynamic: { ...DynamicPermissions }, ...Permissions }), [DynamicPermissions, Permissions]);\r\n const {\r\n SupportCPSForPmax: IsSupportCPSForPmaxEnabled,\r\n EnableBudgetSuggestion,\r\n NewCustomerAcquisition: IsNewCustomerAcquisitionEnabled,\r\n } = permissions.dynamic;\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const { state: wizardState } = useWizardService();\r\n\r\n const { flow } = getFlowFactors(wizardState);\r\n\r\n const shouldShowBudgetSuggestion = useMemo(() => EnableBudgetSuggestion && flow === FLOWS.PERFMAX_WIZARD, [EnableBudgetSuggestion, flow]);\r\n\r\n const i18n = useContext(I18nContext);\r\n const { scope } = useContext(ScopeContext) || {};\r\n\r\n const legacyI18n = useMemo(() => buildLegacyI18n(i18n, [ValidationStringMap]), [i18n]);\r\n\r\n const mergedI18n = useMemo(() => mergeI18n(\r\n legacyI18n,\r\n i18n\r\n ), [i18n, legacyI18n]);\r\n\r\n const [\r\n allSections,\r\n expandedSections,\r\n setExpandedSections,\r\n ] = useCollapseState(AllBudgetStepSections, AllBudgetStepSections);\r\n\r\n const expandSections = useMemo(() =>\r\n collapseExpander({ setActiveKeys: setExpandedSections }), [setExpandedSections]);\r\n\r\n const {\r\n isBudgetSuggestionLoading,\r\n customPerformanceData,\r\n budgetSuggestionData: updatedBudgetSuggestionData,\r\n } = useBudgetSuggestionData({\r\n loadBudgetPartial,\r\n shouldShowBudgetSuggestion,\r\n campaign,\r\n fetchCustomBudgetPerformanceData,\r\n cpa,\r\n roas,\r\n bidStrategy,\r\n budgetTier,\r\n budgetAmount,\r\n });\r\n\r\n /**\r\n * This is a workaround to fit the budget schema inside PMaxLite's BudgetComponent.\r\n * The schema expects suggestion from UP providing minimum and maximum budget which doesn't work here.\r\n * Using the valid range from legacy budget schema instead.\r\n * */\r\n const { DailyRange } = BudgetRange || {};\r\n\r\n const budgetSuggestion = useMemo(() => ({\r\n Currency: currency,\r\n GlobalMaximumBudget: { DailyBudget: DailyRange.CeilingValue ? DailyRange.CeilingValue : 3000000 },\r\n GlobalMinimumBudget: { DailyBudget: DailyRange.FloorValue ? DailyRange.FloorValue : 0.05 },\r\n }), [currency, DailyRange.CeilingValue, DailyRange.FloorValue]);\r\n\r\n const budgetTitleDetails = useMemo(() => i18n.getString(_TL_('{{budgetAmount}} {{currency}} per day'), { budgetAmount, currency }), [budgetAmount, currency, i18n]);\r\n\r\n const bidStrategyTitleDetails = useMemo(() => {\r\n let targetValue = '';\r\n if (bidStrategy === MAX_CONVERSIONS.type && cpa) {\r\n targetValue = `${cpa} ${currency}`;\r\n } else if (bidStrategy === MAX_CONVERSIONS_VALUE.type && roas) {\r\n targetValue = `${roas} %`;\r\n }\r\n return (\r\n <>\r\n {i18n.getString(_TL_('{{bidStrategy}}'), { bidStrategy }) + (targetValue ? `, ${i18n.getString(_TL_('target {{targetValue}}'), { targetValue })}` : '')}\r\n \r\n \r\n );\r\n }, [bidStrategy, cpa, roas, i18n, budgetAmount, activity, currency]);\r\n\r\n const onFieldChange = useCallback((updatedData) => {\r\n onDataChange({\r\n data: prevData => ({\r\n ...prevData,\r\n ...updatedData,\r\n }),\r\n });\r\n }, [onDataChange]);\r\n\r\n const onBidStrategyChange = useCallback((e, newBidStrategy) => {\r\n const bidStrategyType = _.get(newBidStrategy, 'type');\r\n onFieldChange({ bidStrategy: bidStrategyType });\r\n }, [onFieldChange]);\r\n\r\n const onBudgetChange = useCallback((newBudget, shouldLocalize = false) => {\r\n const budgetAmountValue = shouldLocalize ? localizeBudget(newBudget, currency) : newBudget;\r\n onFieldChange({ budgetAmount: budgetAmountValue });\r\n }, [currency, onFieldChange, localizeBudget]);\r\n\r\n const onBudgetValidate = useCallback(({ isValid, messages }) => {\r\n onFieldChange({ isBudgetValid: isValid, budgetErrors: messages });\r\n }, [onFieldChange]);\r\n\r\n const onBudgetSuggestionValidate = useCallback((result) => {\r\n const { data = {}, isValid, messages } = result || {};\r\n\r\n onFieldChange({\r\n budgetTier: data.budgetTier,\r\n budgetAmount: `${data.budget}`,\r\n isBudgetValid: isValid,\r\n budgetErrors: messages,\r\n });\r\n }, [onFieldChange]);\r\n\r\n const onMarketingMetricChange = useCallback(({\r\n data: newMarketingMetric,\r\n isValid,\r\n messages,\r\n }) => {\r\n onFieldChange({\r\n ...newMarketingMetric,\r\n isMarketingMetricValid: isValid,\r\n marketingMetricErrors: messages,\r\n });\r\n }, [onFieldChange]);\r\n\r\n const onCampaignValidation = useCallback((results) => {\r\n if (!isMounted.current) return;\r\n onDataChange({\r\n data: prevData => ({\r\n ...prevData,\r\n campaign: {\r\n ...prevData.campaign,\r\n ...results.data,\r\n },\r\n }),\r\n isValid: results.isValid,\r\n isDirty: results.isDirty,\r\n });\r\n }, [isMounted, onDataChange]);\r\n\r\n return (\r\n \r\n \r\n
\r\n \r\n <>\r\n
\r\n

{i18n.getString(_TL_('How much do you want to spend?'))}

\r\n {i18n.getString(_TL_('Tell us about your campaign and how much you want to spend'))}\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n }\r\n actuationProps={{\r\n expandKey: BudgetStepSection.Budget,\r\n expand: expandSections,\r\n }}\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n >\r\n {\r\n shouldShowBudgetSuggestion ? (\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n {IsNewCustomerAcquisitionEnabled && (\r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: BudgetStepSection.NewCustomerAcquisition,\r\n expandKey: expandSections,\r\n }}\r\n >\r\n {\r\n isDataLoading ? : (\r\n \r\n )\r\n }\r\n \r\n )}\r\n \r\n }\r\n actuationProps={{\r\n expandKey: BudgetStepSection.BidStrategy,\r\n expand: expandSections,\r\n }}\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n >\r\n \r\n \r\n \r\n \r\n {\r\n IsSupportCPSForPmaxEnabled && (\r\n (\r\n <>\r\n \r\n \r\n {i18n.getString(_TL_('Advanced bid strategy'))}\r\n \r\n \r\n \r\n \r\n
\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n isActive\r\n >\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n )}\r\n />\r\n )\r\n }\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nBudgetStepShell.propTypes = {\r\n data: PropTypes.shape({\r\n budgetAmount: PropTypes.number,\r\n bidStrategy: PropTypes.string,\r\n currency: PropTypes.string,\r\n cpa: PropTypes.number,\r\n roas: PropTypes.number,\r\n costPerSaleOptOut: PropTypes.bool,\r\n isInitialAdditionalDetailsChecked: PropTypes.bool,\r\n campaign: PropTypes.shape({}),\r\n conversionGoalDetails: PropTypes.shape({}),\r\n }).isRequired,\r\n error: PropTypes.shape({\r\n serverErrors: PropTypes.arrayOf(PropTypes.shape({})),\r\n systemErrors: PropTypes.arrayOf(PropTypes.shape({})),\r\n }).isRequired,\r\n onDataChange: PropTypes.func.isRequired,\r\n};\r\n","import { useState, useEffect } from 'react';\r\n\r\nexport const useBudgetSuggestionData = ({\r\n loadBudgetPartial,\r\n fetchCustomBudgetPerformanceData,\r\n cpa,\r\n roas,\r\n bidStrategy,\r\n campaign,\r\n budgetTier,\r\n budgetAmount,\r\n shouldShowBudgetSuggestion,\r\n}) => {\r\n const EnableBudgetSuggestion = shouldShowBudgetSuggestion;\r\n\r\n const [isBudgetSuggestionLoading, setIsBudgetSuggestionLoading] = useState(false);\r\n\r\n const [budgetSuggestionData, setBudgetSuggestionData] = useState(null);\r\n\r\n const [customPerformanceData, setCustomPerformanceData] = useState(null);\r\n\r\n useEffect(() => {\r\n if (loadBudgetPartial && bidStrategy && campaign && campaign.BiddingScheme.Type !== bidStrategy && EnableBudgetSuggestion) {\r\n setIsBudgetSuggestionLoading(true);\r\n\r\n loadBudgetPartial({\r\n BiddingScheme: {\r\n Type: bidStrategy,\r\n TargetCpa: cpa,\r\n TargetRoas: roas,\r\n },\r\n }).then((budgetSuggestions) => {\r\n setBudgetSuggestionData(budgetSuggestions);\r\n setIsBudgetSuggestionLoading(false);\r\n }).catch(() => {\r\n setIsBudgetSuggestionLoading(false);\r\n });\r\n }\r\n }, [EnableBudgetSuggestion, bidStrategy, campaign, cpa, loadBudgetPartial, roas]);\r\n\r\n\r\n useEffect(() => {\r\n if (loadBudgetPartial && EnableBudgetSuggestion) {\r\n setIsBudgetSuggestionLoading(true);\r\n\r\n loadBudgetPartial({\r\n BiddingScheme: {\r\n Type: bidStrategy,\r\n TargetCpa: cpa,\r\n TargetRoas: roas,\r\n },\r\n }).then((budgetSuggestions) => {\r\n setBudgetSuggestionData(budgetSuggestions);\r\n setIsBudgetSuggestionLoading(false);\r\n }).catch(() => {\r\n setIsBudgetSuggestionLoading(false);\r\n });\r\n }\r\n }, [EnableBudgetSuggestion, bidStrategy, cpa, loadBudgetPartial, roas]);\r\n\r\n useEffect(() => {\r\n if (budgetTier === 'CustomBudget' && EnableBudgetSuggestion) {\r\n setCustomPerformanceData({ isLoading: true });\r\n\r\n if (fetchCustomBudgetPerformanceData && parseInt(budgetAmount, 10) > 0) {\r\n fetchCustomBudgetPerformanceData({ budgetAmount })\r\n .then(result => setCustomPerformanceData({ isLoading: false, ...result }))\r\n .catch(() => setCustomPerformanceData({ isLoading: false }));\r\n }\r\n }\r\n }, [EnableBudgetSuggestion, budgetAmount, budgetTier, fetchCustomBudgetPerformanceData]);\r\n\r\n return {\r\n isBudgetSuggestionLoading,\r\n budgetSuggestionData,\r\n customPerformanceData,\r\n };\r\n};\r\n","import { useCallback, useContext, useMemo } from 'react';\r\nimport Promise from 'bluebird';\r\nimport _ from 'underscore';\r\nimport { usePreference, preferenceNames } from '@bingads-webui-campaign-react/pmax-lite-data';\r\nimport { useWizardService, getFlowFactors, WIZARD_EVENTS } from '@bingads-webui-react/wizard';\r\nimport {\r\n initialBrandExclusionsViewModel,\r\n loadCampaign,\r\n loadConversionGoalDetails,\r\n saveCampaignAndLinkedData,\r\n loadBundleCountries,\r\n modelToViewModelForCampaign,\r\n} from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport { readLocationCriterions, readNewCustomerAcquisitionGoals } from '@bingads-webui-campaign-react/perf-max-data';\r\nimport { MAX_CONVERSIONS } from '@bingads-webui-campaign-react/bid-strategy-component';\r\nimport { ScenarioContext, ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { useBudgetSuggestionRepository, MODE } from '@bingads-webui-campaign-react/budget-suggestion-v2';\r\nimport { CampaignTypes } from '@bingads-webui-campaign-react/constants';\r\nimport { LogTargetCpaCheckOnSave } from '@bingads-webui-campaign-react/target-cpa-warning-banner';\r\nimport { useLocalizeBudget } from './utils/use-budget-localized';\r\nimport { FLOWS } from '../step-constants';\r\n\r\nexport const roasMtToUI = roas => (_.isNumber(roas) ? roas * 100 : null);\r\nexport const roasUiToMt = roas => (_.isNumber(roas) ? (roas / 100).toFixed(4) : null);\r\n\r\nexport const useBudgetStepRepository = () => {\r\n const { localizeBudget } = useLocalizeBudget();\r\n const [{ value: currencyPreference }] = usePreference(preferenceNames.SelectedCurrency);\r\n const { state, send } = useWizardService();\r\n const scenarioContext = useContext(ScenarioContext);\r\n const activity = useContext(ActivityContext);\r\n const i18n = useContext(I18nContext);\r\n const serverContext = useContext(ServerContext);\r\n const { Permissions, DynamicPermissions, CurrentAccount: { CurrencyCode } } = serverContext || {};\r\n\r\n const permissions = useMemo(() => ({ dynamic: { ...DynamicPermissions }, ...Permissions }), [DynamicPermissions, Permissions]);\r\n const {\r\n EnableBudgetSuggestion,\r\n NewCustomerAcquisition: isNewCustomerAcquisitionEnabled,\r\n } = permissions.dynamic;\r\n\r\n const { flow } = getFlowFactors(state);\r\n\r\n const shouldShowBudgetSuggestion = useMemo(() => EnableBudgetSuggestion && flow === FLOWS.PERFMAX_WIZARD, [EnableBudgetSuggestion, flow]);\r\n\r\n const { scope } = useContext(ScopeContext) || {};\r\n const { cid, aid } = scope.values;\r\n\r\n const { campaign: savedCampaign, assetGroup, diagnostics } = state.context.wizardData;\r\n\r\n const {\r\n loadBudget,\r\n loadBudgetPartial,\r\n saveBudget,\r\n fetchCustomBudgetPerformanceData,\r\n } = useBudgetSuggestionRepository({\r\n campaignId: savedCampaign.Id,\r\n mode: MODE.CREATION,\r\n campaignType: CampaignTypes.PerformanceMax,\r\n currency: CurrencyCode,\r\n campaign: savedCampaign,\r\n assetGroup,\r\n });\r\n\r\n const modelToViewModel = useCallback((campaign) => {\r\n const budgetAmount = _.get(campaign, ['Budget', 'Amount']);\r\n const bidStrategy = _.get(campaign, ['BiddingScheme', 'Type']);\r\n const cpa = _.get(campaign, ['BiddingScheme', 'TargetCpa']);\r\n const roas = parseFloat(_.get(campaign, ['BiddingScheme', 'TargetRoas'])) || null;\r\n const language = _.get(campaign, ['Languages', 0]);\r\n const isInitialAdditionalDetailsChecked = _.isNumber(cpa) || _.isNumber(roas);\r\n\r\n return {\r\n budgetAmount: localizeBudget(budgetAmount, 'USD'),\r\n bidStrategy,\r\n currency: currencyPreference,\r\n cpa,\r\n roas: roasMtToUI(roas),\r\n language,\r\n isInitialAdditionalDetailsChecked,\r\n isMarketingMetricValid: true,\r\n };\r\n }, [currencyPreference, localizeBudget]);\r\n\r\n const load = useCallback(() => {\r\n const { Id: campaignId } = savedCampaign || {};\r\n\r\n const loadPromises = {\r\n campaign: loadCampaign(cid, aid, campaignId), // This is necessary to read 'CampaignConversionGoal' from MT. The current conversion is coupled with the value.\r\n conversionGoalDetails: loadConversionGoalDetails({ cid, aid }),\r\n locationTargets: readLocationCriterions(cid, aid, campaignId),\r\n bundleCountriesAndLocationCriterions: loadBundleCountries({\r\n cid,\r\n aid,\r\n serverContext,\r\n }),\r\n ...(isNewCustomerAcquisitionEnabled && { newCustomerAcquisitionGoals: readNewCustomerAcquisitionGoals(cid, aid) }),\r\n };\r\n\r\n return Promise.props(loadPromises).then(({\r\n campaign,\r\n locationTargets,\r\n bundleCountriesAndLocationCriterions,\r\n conversionGoalDetails,\r\n newCustomerAcquisitionGoals,\r\n }) => {\r\n const campaignData = modelToViewModelForCampaign({\r\n campaignModel: { ...campaign, Status: savedCampaign.status },\r\n locationCriterionsModel: locationTargets ? locationTargets.value : [],\r\n bundleCountries: bundleCountriesAndLocationCriterions.bundleCountries,\r\n ...(isNewCustomerAcquisitionEnabled && { newCustomerAcquisitionGoalsModel: newCustomerAcquisitionGoals ? newCustomerAcquisitionGoals.value : [] }),\r\n });\r\n\r\n return {\r\n campaign: campaignData.data,\r\n assetGroup,\r\n conversionGoalDetails,\r\n locationCriterionsModel: locationTargets ? locationTargets.value : [],\r\n bundleCountries: bundleCountriesAndLocationCriterions.bundleCountries,\r\n ...bundleCountriesAndLocationCriterions,\r\n ...modelToViewModel(campaign),\r\n fetchCustomBudgetPerformanceData,\r\n loadBudgetPartial,\r\n };\r\n })\r\n .then((result) => {\r\n if (shouldShowBudgetSuggestion) {\r\n return loadBudget()\r\n .then(budgetSuggestionData => ({ ...result, budgetSuggestionData }))\r\n .catch((err) => {\r\n activity.error('[PmaxNorthStarWizard] - failed to load budget suggestion data', err);\r\n return { ...result, budgetSuggestionData: null };\r\n });\r\n }\r\n return Promise.resolve(result);\r\n });\r\n }, [savedCampaign, cid, aid, serverContext, isNewCustomerAcquisitionEnabled, assetGroup, modelToViewModel, fetchCustomBudgetPerformanceData, loadBudgetPartial, shouldShowBudgetSuggestion, loadBudget, activity]);\r\n\r\n const save = useCallback(({ data }) => {\r\n const {\r\n campaign: updatedCampaign,\r\n budgetAmount,\r\n bidStrategy,\r\n cpa,\r\n roas,\r\n isBudgetValid,\r\n isMarketingMetricValid,\r\n conversionGoalDetails,\r\n budgetTier,\r\n bundleCountries,\r\n bundleLocationCriterions,\r\n budgetSuggestionData,\r\n } = data || {};\r\n\r\n if (!isBudgetValid || !isMarketingMetricValid) {\r\n return Promise.reject();\r\n }\r\n\r\n const newCampaign = {\r\n ...updatedCampaign,\r\n BiddingScheme: {\r\n Type: bidStrategy,\r\n ...(\r\n bidStrategy === MAX_CONVERSIONS.type\r\n ? { TargetCpa: cpa }\r\n : { TargetRoas: roasUiToMt(roas) }\r\n ),\r\n },\r\n Budget: {\r\n Amount: i18n.parseDecimal(budgetAmount),\r\n Type: 'DailyStandard',\r\n },\r\n };\r\n\r\n const savePromises = {\r\n campaign: saveCampaignAndLinkedData({\r\n campaign: { data: newCampaign },\r\n originalCampaign: { data: savedCampaign },\r\n brandExclusions: initialBrandExclusionsViewModel,\r\n bundleCountries,\r\n bundleLocationCriterions,\r\n }, {\r\n scenario: scenarioContext.name,\r\n i18n,\r\n activityLogger: scenarioContext.createActivity('updateCampaign'),\r\n }),\r\n };\r\n\r\n if (shouldShowBudgetSuggestion) {\r\n // we call save budget from the hook, since it has the necessary metrics logging to report.\r\n savePromises.budgetSuggestion = saveBudget({ campaign: newCampaign, budgetAmount, budgetTier });\r\n }\r\n\r\n return Promise.props(savePromises).then(({\r\n campaign: campaignResults,\r\n budgetSuggestion: budgetSuggestionResults,\r\n }) => {\r\n activity.trace('[PmaxNorthStarWizard] - campaign settings updated in budget step');\r\n activity.signal('[PmaxNorthStarWizard] - campaign settings updated in budget step');\r\n\r\n const { campaign } = campaignResults;\r\n\r\n LogTargetCpaCheckOnSave(i18n, permissions, campaign?.data?.Budget?.Amount, campaign?.data?.BiddingScheme.TargetCpa, activity, 'PmaxNorthStarWizard');\r\n\r\n\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, {\r\n campaign: {\r\n ...campaign.data,\r\n locationTargets: updatedCampaign.locationTargets,\r\n },\r\n diagnostics: {\r\n ...diagnostics,\r\n budgetSuggestionData,\r\n },\r\n });\r\n\r\n if (budgetSuggestionResults) {\r\n activity.trace('[PmaxNorthStarWizard] - budget suggestion adopted in budget step');\r\n }\r\n\r\n return {\r\n campaign: campaign.data,\r\n conversionGoalDetails,\r\n ...modelToViewModel(campaign.data),\r\n };\r\n }).catch((errorData) => {\r\n activity.trace('[PmaxNorthStarWizard] - campaign settings update failed in budget step');\r\n\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({ error: { ...errorData } });\r\n });\r\n }, [i18n, savedCampaign, scenarioContext, shouldShowBudgetSuggestion, saveBudget, activity, permissions, send, diagnostics, modelToViewModel]);\r\n\r\n return {\r\n load,\r\n save,\r\n };\r\n};\r\n","import React, { useMemo, useContext, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { map, isEmpty } from 'underscore';\r\nimport { ValidatedLanguageTarget,\r\n ValidatedLocationTargetSetting,\r\n LanguageTargetValidatorFactory,\r\n AudienceSignalPanel } from '@bingads-webui-campaign-react/step-wizard-controls';\r\nimport { withUnvalidatedControlErrors, withControlErrorHandling } from '@bingads-webui-campaign-react/error-handling';\r\nimport { ValidationGroup, ErrorMessages } from '@bingads-webui-react/validation';\r\nimport { AttentionBeaconGroup } from '@bingads-webui-campaign-react/attention-beacon';\r\nimport { ActuationGroup } from '@bingads-webui-campaign-react/actuator';\r\nimport {\r\n Collapse,\r\n TextTitle,\r\n useCollapseState,\r\n collapseExpander,\r\n ValidatedPanel,\r\n getPanelErrorProps\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { useFormService } from '@bingads-webui-react/form';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport {\r\n LocationImg,\r\n LanguageImg,\r\n apiErrorMapper,\r\n campaignLanguageStrings,\r\n SearchThemesImg,\r\n} from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport { AudienceSignalSection,\r\n getLocationTargetTitleDetails,\r\n getSearchThemeDetails,\r\n PANEL_KEYS } from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport { ValidationSearchThemeSelector } from '@bingads-webui-campaign-react/search-theme-selector';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n FormErrorGroup, UnmappedFormErrors as OriginalUnmappedFormErrors,\r\n entityIs, andComp, propertyIs, anyComp,\r\n} from '@bingads-webui-campaign-react/form-error';\r\nimport { Campaign, AssetGroup } from '@bingads-webui/campaign-odata-schemas';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { PerformanceMarkerContext } from '@bingads-webui-campaign-react/performance-marker-provider';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { getLocationTargetingStyles } from '@bingads-webui-campaign-react/location-targeting';\r\n\r\nimport { ERROR_ENTITY } from '../../shared/model/api-error';\r\nimport { SectionShimmer, SingleLineShimmer } from '../../shared/components/section-shimmer';\r\n\r\n\r\nconst getTargetingStyles = () => ({\r\n container: {\r\n maxWidth: 680,\r\n '& .title-item': {\r\n width: 'unset !important',\r\n },\r\n '& .specific-location-targets-editor': {\r\n marginLeft: '-25px !important',\r\n },\r\n '& .intent-target ul': {\r\n paddingLeft: '20px',\r\n },\r\n },\r\n header: {\r\n marginBottom: 20,\r\n },\r\n ...getLocationTargetingStyles(),\r\n});\r\n\r\nconst entityIsCampaign = entityIs(ERROR_ENTITY.Campaign);\r\nconst campaignLocationCriterions = anyComp(\r\n entityIs(ERROR_ENTITY.CampaignLocation),\r\n entityIs(ERROR_ENTITY.CampaignRadius),\r\n entityIs(ERROR_ENTITY.CampaignNegativeLocation),\r\n entityIs(ERROR_ENTITY.CampaignLocationIntent)\r\n);\r\nconst campaignLanguagesProp = andComp(entityIsCampaign, propertyIs('Languages'));\r\n\r\nconst ServerValidatedLocationTargetSetting = withControlErrorHandling(withUnvalidatedControlErrors(ValidatedLocationTargetSetting, { filter: campaignLocationCriterions }));\r\nconst ServerValidatedLanguageTarget = withControlErrorHandling(withUnvalidatedControlErrors(ValidatedLanguageTarget, { filter: campaignLanguagesProp }));\r\nconst UnmappedFormErrors = withControlErrorHandling(OriginalUnmappedFormErrors);\r\n\r\nexport const TargetingStepShell = ({\r\n data: targetingInfo = {},\r\n onDataChange,\r\n error,\r\n}) => {\r\n const isLoading = useMemo(() => isEmpty(targetingInfo), [targetingInfo]);\r\n\r\n const classes = useDefaultStyles(getTargetingStyles);\r\n\r\n const { serverErrors, systemErrors } = error || {};\r\n\r\n const { state: { context: { saveFailed } } } = useFormService();\r\n\r\n const serverContext = useContext(ServerContext);\r\n const perfMarker = useContext(PerformanceMarkerContext);\r\n\r\n const {\r\n CurrentLocale: locale,\r\n DynamicPermissions,\r\n Permissions,\r\n } = serverContext;\r\n\r\n const permissions = useMemo(() => ({ dynamic: { ...DynamicPermissions }, ...Permissions }), [DynamicPermissions, Permissions]);\r\n\r\n const {\r\n bundleCountries,\r\n bundleLocationCriterions,\r\n campaign = {},\r\n assetGroup = {},\r\n } = targetingInfo || {};\r\n\r\n const i18n = useContext(I18nContext);\r\n const { scope } = useContext(ScopeContext) || {};\r\n\r\n const isSearchThemeEnabled = permissions && permissions.dynamic && permissions.dynamic.SearchThemes;\r\n\r\n const [\r\n allAssetGroupSections,\r\n assetGroupExpandedSections,\r\n setAssetGroupExpandedSections,\r\n ] = useCollapseState(\r\n isSearchThemeEnabled ? [PANEL_KEYS.AUDIENCE_SIGNAL, 'search-themes'] : [PANEL_KEYS.AUDIENCE_SIGNAL] /* all sections */,\r\n isSearchThemeEnabled ? [PANEL_KEYS.AUDIENCE_SIGNAL, 'search-themes'] : [PANEL_KEYS.AUDIENCE_SIGNAL] /* initially expanded sections */\r\n );\r\n\r\n const [\r\n allCampaignSettingsSections,\r\n campaignSettingsExpandedSections,\r\n setCampaignSettingsExpandedSections,\r\n ] = useCollapseState(\r\n ['locations', 'language-target'],\r\n ['locations', 'language-target']\r\n );\r\n\r\n const campaignSettingsExpand = useMemo(\r\n () => collapseExpander({ setActiveKeys: setCampaignSettingsExpandedSections }),\r\n [setCampaignSettingsExpandedSections]\r\n );\r\n\r\n const locationPanel = useMemo(() => (\r\n
\r\n \r\n
\r\n ), [bundleCountries, bundleLocationCriterions, campaign, classes.LocationTargeting, scope]);\r\n\r\n const searchThemeSection = useMemo(() => (\r\n
\r\n {\r\n isLoading ? :\r\n ()\r\n }\r\n
\r\n ), [assetGroup, i18n, isLoading, perfMarker]);\r\n\r\n const onAssetGroupSettingsValidate = useCallback((result) => {\r\n onDataChange({\r\n data: prevData => ({\r\n ...prevData,\r\n assetGroup: {\r\n ...prevData.assetGroup,\r\n ...result.data,\r\n },\r\n }),\r\n isValid: result.isValid,\r\n isDirty: result.isDirty,\r\n });\r\n }, [onDataChange]);\r\n\r\n const onCampaignSettingsValidate = useCallback((result) => {\r\n onDataChange({\r\n data: prevData => ({\r\n ...prevData,\r\n campaign: {\r\n ...prevData.campaign,\r\n ...result.data,\r\n },\r\n }),\r\n isValid: result.isValid,\r\n isDirty: result.isDirty,\r\n });\r\n }, [onDataChange]);\r\n\r\n return (\r\n \r\n \r\n \r\n
\r\n
\r\n

{i18n.getString(_TL_('Who do you want to see your ads?'))}

\r\n {i18n.getString(_TL_('Tell us how and when you\\'d like to optimize placements for your ads'))}\r\n
\r\n \r\n
\r\n \r\n
\r\n\r\n \r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: campaignSettingsExpand,\r\n expandKey: 'locations',\r\n }}\r\n >\r\n {isLoading ? : locationPanel}\r\n \r\n i18n.getString(campaignLanguageStrings[lang] || lang)\r\n ).toString()}\r\n icon={LanguageImg}\r\n />}\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: campaignSettingsExpand,\r\n expandKey: 'language-target',\r\n }}\r\n >\r\n {\r\n isLoading ? : (\r\n \r\n )\r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {isSearchThemeEnabled &&\r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expandKey: 'search-themes',\r\n }}\r\n >\r\n {searchThemeSection}\r\n \r\n \r\n }\r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n );\r\n};\r\n\r\nTargetingStepShell.propTypes = {\r\n data: PropTypes.shape({\r\n locationTargets: PropTypes.shape({}),\r\n bundleCountries: PropTypes.shape({}),\r\n bundleLocationCriterions: PropTypes.shape({}),\r\n campaign: PropTypes.shape({}),\r\n assetGroup: PropTypes.shape({}),\r\n }).isRequired,\r\n error: PropTypes.shape({\r\n serverErrors: PropTypes.arrayOf(PropTypes.shape({})),\r\n systemErrors: PropTypes.arrayOf(PropTypes.shape({})),\r\n }).isRequired,\r\n onDataChange: PropTypes.func.isRequired,\r\n scope: PropTypes.shape({}).isRequired,\r\n};\r\n\r\n","import React, { useContext, useMemo, useCallback, useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport _ from 'underscore';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n Collapse,\r\n TextTitle,\r\n useCollapseState,\r\n collapseExpander,\r\n ValidatedPanel,\r\n getPanelErrorProps\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { ValidationStringMap } from '@bingads-webui/validation-string-map';\r\nimport { ValidationGroup, ErrorMessages } from '@bingads-webui-react/validation';\r\nimport { AssetGroup, Campaign } from '@bingads-webui/campaign-odata-schemas';\r\nimport { StoreSelectContainer } from '@bingads-webui-campaign-react/store-select';\r\nimport { useWizardService, WIZARD_EVENTS } from '@bingads-webui-react/wizard';\r\nimport { ShoppingImg, ListingGroupImg, apiErrorMapper } from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport { getStoreTitleDetails, getListingGroupDetails } from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport { ValidatedListingGroups } from '@bingads-webui-campaign-react/step-wizard-controls';\r\nimport { withScope, QueryParam, ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { mergeI18n } from '@bingads-webui-campaign-react/i18n-merger';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { buildLegacyI18n } from '@bingads-webui/build-legacy-i18n';\r\nimport { legacyI18nOfListingGroup } from '@bingads-webui-campaign-react/listing-groups-page';\r\nimport { FormErrorGroup, UnmappedFormErrors } from '@bingads-webui-campaign-react/form-error';\r\nimport { useResponsiveStyles } from '@bingads-webui-campaign-react/common-hooks';\r\nimport { StoreSelectorShimmer, SingleLineShimmer } from '../../shared/components/section-shimmer';\r\n\r\nconst getProductStepStyles = () => ({\r\n container: {\r\n maxWidth: 680,\r\n },\r\n header: {\r\n marginBottom: 20,\r\n },\r\n});\r\n\r\nconst getProductSettingStyles = () => ({\r\n width: '100%',\r\n '& .text-assets-collection-container': {\r\n width: 'auto',\r\n },\r\n '& .asset-group-name-section .error-string-wrapper': {\r\n right: 'unset !important',\r\n position: 'unset !important',\r\n },\r\n\r\n '& .text-input-container': {\r\n width: '100%',\r\n },\r\n '& .date-settings table': {\r\n width: 'unset !important',\r\n },\r\n '& .asset-group-enhance-ads-section': {\r\n '& .section-description': {\r\n marginBottom: '16px',\r\n },\r\n },\r\n 'formContainer-xxl': {\r\n width: '530px',\r\n },\r\n 'formContainer-xl': {\r\n width: '430px',\r\n },\r\n});\r\n\r\nconst ProductsStepShellInternal = ({\r\n data = {},\r\n onDataChange,\r\n error,\r\n isSettingPage,\r\n}) => {\r\n const isLoading = useMemo(() => _.isEmpty(data), [data]);\r\n\r\n const i18n = useContext(I18nContext);\r\n\r\n const getStyles = useResponsiveStyles(getProductSettingStyles);\r\n const classes = useDefaultStyles(getProductStepStyles);\r\n\r\n const { scope } = useContext(ScopeContext) || {};\r\n\r\n const { state, send } = useWizardService();\r\n\r\n const { campaignObjective } = state.context.wizardData;\r\n\r\n const { saveFailed } = state.context;\r\n\r\n const [storesData, setStoresData] = useState(null);\r\n\r\n const { serverErrors, systemErrors } = error || {};\r\n\r\n const {\r\n campaign = {},\r\n assetGroup = {},\r\n } = data || {};\r\n\r\n const {\r\n listingGroup,\r\n productFilter,\r\n } = assetGroup;\r\n\r\n const {\r\n Id,\r\n ProviderId,\r\n IsFeedFiltered,\r\n SalesCountry,\r\n FeedLabel,\r\n LocalInventoryAdsEnabled,\r\n } = campaign || {};\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 const storeTitleDetails = useMemo(() => storesData && getStoreTitleDetails(i18n, storesData, storeContainerData), [i18n, storesData, storeContainerData]);\r\n\r\n const legacyI18n = useMemo(() => buildLegacyI18n(i18n, [ValidationStringMap, legacyI18nOfListingGroup]), [i18n]);\r\n\r\n const mergedI18n = useMemo(() => mergeI18n(\r\n legacyI18n,\r\n i18n\r\n ), [i18n, legacyI18n]);\r\n\r\n const [\r\n allProductsSections,\r\n productsSectionsExpandedSections,\r\n setProdutsSectionExpandedSections,\r\n ] = useCollapseState(\r\n ['shopping-ads'] /* all sections */,\r\n ['shopping-ads'] /* initially expanded sections */\r\n );\r\n\r\n const [\r\n allListingGroupSections,\r\n lisitngGroupSectionsExpandedSections,\r\n setListingGroupExpandedSections,\r\n ] = useCollapseState(\r\n ['listing-groups'] /* all sections */,\r\n ['listing-groups'] /* initially expanded sections */\r\n );\r\n\r\n const basicSettingsExpand = useMemo(\r\n () => collapseExpander({ setActiveKeys: setProdutsSectionExpandedSections }),\r\n [setProdutsSectionExpandedSections]\r\n );\r\n\r\n const listingGroupDetails = useMemo(() => getListingGroupDetails(\r\n i18n,\r\n !!assetGroup.Id,\r\n {\r\n productFilter,\r\n listingGroup,\r\n }\r\n ), [assetGroup.Id, i18n, listingGroup, productFilter]);\r\n\r\n const onStoreDataLoaded = useCallback(({ error: apiError, stores = {}, countries = {} }) => {\r\n setStoresData({ apiError, stores, countries });\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (storesData) {\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { loadedStoresData: storesData });\r\n }\r\n }, [send, storesData]);\r\n\r\n const shoppingAdsPanel = (\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: basicSettingsExpand,\r\n expandKey: 'shopping-ads',\r\n }}\r\n >\r\n {\r\n isLoading ? : (\r\n }\r\n />\r\n )\r\n }\r\n \r\n );\r\n\r\n const onNavigateToListingGroups = useCallback(() => {\r\n const queryParam = new QueryParam(scope.history.location, scope.history);\r\n queryParam.append({ campaignId: Id, assetGroupId: assetGroup.Id });\r\n scope.history.push({\r\n pathname: '/campaign/vnext/listinggroups/list',\r\n search: queryParam.stringify(),\r\n });\r\n }, [Id, assetGroup.Id, scope.history]);\r\n\r\n const listingGroupsSection = useMemo(() => (\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: basicSettingsExpand,\r\n expandKey: 'listing-groups',\r\n }}\r\n >\r\n {\r\n isLoading ? : (\r\n \r\n )\r\n }\r\n \r\n ), [Id, ProviderId, assetGroup.Id, basicSettingsExpand, isLoading, listingGroup, listingGroupDetails, mergedI18n, onNavigateToListingGroups, storeContainerData]);\r\n\r\n const onAssetGroupSettingsValidate = useCallback((result) => {\r\n onDataChange({\r\n data: prevData => ({\r\n ...prevData,\r\n assetGroup: {\r\n ...prevData.assetGroup,\r\n ...result.data,\r\n },\r\n }),\r\n isValid: result.isValid,\r\n isDirty: result.isDirty,\r\n });\r\n }, [onDataChange]);\r\n\r\n const onCampaignSettingsValidate = useCallback((result) => {\r\n onDataChange({\r\n data: prevData => ({\r\n ...prevData,\r\n campaign: {\r\n ...prevData.campaign,\r\n CampaignSettings: {\r\n ...prevData.campaign.CampaignSettings,\r\n ...storeContainerData,\r\n },\r\n ...result.data,\r\n },\r\n }),\r\n isValid: result.isValid,\r\n isDirty: result.isDirty,\r\n });\r\n }, [onDataChange, storeContainerData]);\r\n\r\n return (\r\n \r\n
\r\n {!isSettingPage &&\r\n
\r\n

{ i18n.getString(_TL_('Add your products')) }

\r\n
\r\n {i18n.getString(_TL_('Choose which products to show in your ads. Some of your ads will use images, headlines and descriptions from Merchant center'))}\r\n
\r\n
\r\n }\r\n <>\r\n {!isSettingPage &&\r\n <>\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n {shoppingAdsPanel}\r\n \r\n \r\n \r\n \r\n {listingGroupsSection}\r\n \r\n \r\n \r\n }\r\n {isSettingPage &&\r\n
\r\n \r\n \r\n {listingGroupsSection}\r\n \r\n \r\n
\r\n}\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nProductsStepShellInternal.propTypes = {\r\n data: PropTypes.shape({\r\n campaign: PropTypes.shape({\r\n Id: PropTypes.number,\r\n }),\r\n assetGroup: PropTypes.shape({\r\n Id: PropTypes.number,\r\n }),\r\n }).isRequired,\r\n onDataChange: PropTypes.func.isRequired,\r\n error: PropTypes.shape({\r\n serverErrors: PropTypes.arrayOf(PropTypes.string),\r\n systemErrors: PropTypes.arrayOf(PropTypes.string),\r\n }),\r\n scope: PropTypes.shape({\r\n values: PropTypes.shape({\r\n assetGroupId: PropTypes.number,\r\n }),\r\n }).isRequired,\r\n isSettingPage: PropTypes.bool,\r\n};\r\n\r\nProductsStepShellInternal.defaultProps = {\r\n error: {},\r\n isSettingPage: false,\r\n};\r\n\r\nexport const ProductsStepShell = withScope(ProductsStepShellInternal);\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React, { useMemo, useContext, useCallback, useEffect, useRef, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport _ from 'underscore';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { ValidationGroup, ErrorMessages } from '@bingads-webui-react/validation';\r\nimport Repository from '@bingads-webui-campaign-legacy/adextension-shared/service/repository';\r\nimport { AttentionBeaconGroup } from '@bingads-webui-campaign-react/attention-beacon';\r\nimport { ActuationGroup, FocusableActuator } from '@bingads-webui-campaign-react/actuator';\r\nimport { DisclaimerAdExtension } from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport { DisclaimerStringMap } from '@bingads-webui-campaign-react/ads-campaign-disclaimers';\r\nimport {\r\n bidAdjustmentIcon,\r\n getAssociatedDisclaimer,\r\n getCampaignStyles,\r\n ValidatedDisclaimerExtension,\r\n} from '@bingads-webui-campaign-react/display-plus-campaigns';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport {\r\n getAdScheduleDetails,\r\n getConversionGoalTitleDetails,\r\n getDisclaimerTitleDetails,\r\n getFinalUrlExpansionTitleDetails,\r\n} from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport {\r\n Collapse,\r\n TextTitle,\r\n useCollapseState,\r\n collapseExpander,\r\n ValidatedPanel,\r\n ValidatedFixedPanel,\r\n getPanelErrorProps,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { useFormService } from '@bingads-webui-react/form';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ValidatedConversionGoals, ValidatedConversionGoalsScopeSelector, useIsMounted } from '@bingads-webui-campaign-react/step-wizard-controls';\r\nimport { ValidatedUrlOptionsParameter } from '@bingads-webui-campaign-react/validated-url-input';\r\nimport { ValidatedAutoGeneratedAssets } from '@bingads-webui-campaign-react/auto-generated-assets';\r\nimport { BrandListsPicker } from '@bingads-webui-campaign-react/brand-lists-components';\r\nimport { buildLegacyI18n } from '@bingads-webui/build-legacy-i18n';\r\nimport { getUrlOptionsDetails } from '@bingads-webui-campaign-react/url-options';\r\nimport {\r\n FormErrorGroup,\r\n UnmappedFormErrors as OriginalUnmappedFormErrors,\r\n entityIs,\r\n andComp,\r\n anyComp,\r\n notComp,\r\n propertyIs,\r\n StandardControlAdapter,\r\n} from '@bingads-webui-campaign-react/form-error';\r\nimport { PageFeedSelectorSection } from '@bingads-webui-campaign-react/page-feed-selector';\r\nimport { ValidationStringMap } from '@bingads-webui/validation-string-map';\r\nimport {\r\n apiErrorMapper,\r\n ERROR_ENTITY,\r\n getStepCampaignSettingsStyles,\r\n AdScheduleImg,\r\n ConversionsImg,\r\n AutoGenAssetsImg,\r\n PageFeedsImg,\r\n UrlOptionsImg,\r\n BrandExclusionsImg,\r\n FinalUrlExpansionsImg,\r\n} from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport { RemainingCharsValidatedTextField } from '@bingads-webui-campaign-react/remaining-chars-hint';\r\nimport { Campaign } from '@bingads-webui/campaign-odata-schemas';\r\nimport { ValidatedLegacyFinalUrlExpansion } from '@bingads-webui-campaign-react/legacy-final-url-expansion';\r\nimport { ValidatedLegacyAdSchedule } from '@bingads-webui-campaign/ad-schedule';\r\nimport { withUnvalidatedControlErrors, withControlErrorHandling, withContainerErrors, FormErrorBeaconAdapter } from '@bingads-webui-campaign-react/error-handling';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { Link, Stack, Label } from '@bingads-webui-react/fabric-control';\r\nimport { FluentProvider, webLightTheme } from '@fluentui/react-components';\r\nimport { SingleLineShimmer, AdScheduleShimmer, RadioShimmer } from '../../shared/components/section-shimmer';\r\n\r\nconst getCampaignStylesNorthStar = () => ({\r\n header: {\r\n marginBottom: 20,\r\n },\r\n formContainer: {\r\n maxWidth: 800,\r\n '& .advanced-scheduling-grid': {\r\n width: 'unset !important',\r\n\r\n '& .ad-scheduling-grid': {\r\n minWidth: 'unset !important',\r\n },\r\n },\r\n '& .title-item': {\r\n width: 'unset !important',\r\n },\r\n '& .goal-selector-with-scope': {\r\n width: '100%',\r\n '& .ba-goal-selector': {\r\n width: '100%',\r\n ' & .multi-selector': {\r\n width: '100%',\r\n '& .multi-selector-content': {\r\n width: '100%',\r\n '& .ba-entity-selector': {\r\n minWidth: '50% !important',\r\n '& .list-selector-container': {\r\n width: 'unset !important',\r\n '& .ba-list-selector': {\r\n width: 'unset !important',\r\n },\r\n },\r\n },\r\n '& .multi-selector-result-container': {\r\n minWidth: '50% !important',\r\n },\r\n },\r\n },\r\n },\r\n },\r\n },\r\n});\r\n\r\nconst entityIsCampaign = entityIs(ERROR_ENTITY.Campaign);\r\n\r\nconst campaignNegativeWebPages = entityIs(ERROR_ENTITY.CampaignNegativeWebpage);\r\nconst campaignDayTimeCriterions = entityIs(ERROR_ENTITY.CampaignDayTimeCriterion);\r\nconst campaignNameProp = andComp(entityIsCampaign, propertyIs('Name'));\r\nconst feedAssociationsProp = andComp(entityIsCampaign, propertyIs('FeedAssociations'));\r\nconst campaignUrlOptionsProperties = andComp(\r\n entityIsCampaign,\r\n anyComp(\r\n propertyIs('TrackingUrlTemplate'),\r\n propertyIs('FinalUrlSuffix'),\r\n propertyIs('UrlCustomParameters')\r\n )\r\n);\r\nconst brandListAssociationEntity = entityIs(ERROR_ENTITY.BrandListAssociation);\r\nconst notCampaignUrlOptionsProperties = notComp(campaignUrlOptionsProperties);\r\n\r\nconst ServerValidatedLegacyAdSchedule = withControlErrorHandling(withUnvalidatedControlErrors(ValidatedLegacyAdSchedule, { filter: campaignDayTimeCriterions }));\r\nconst ServerValidatedPageFeedSelectorSection = withControlErrorHandling(withContainerErrors(PageFeedSelectorSection, { filter: feedAssociationsProp, Adapter: StandardControlAdapter() }), [FocusableActuator], [FormErrorBeaconAdapter]);\r\nconst ServerValidatedAutoGeneratedAssets = withControlErrorHandling(withUnvalidatedControlErrors(ValidatedAutoGeneratedAssets, { filter: campaignNegativeWebPages }));\r\nconst ServerValidatedBrandListsPicker = withControlErrorHandling(withContainerErrors(BrandListsPicker, { filter: brandListAssociationEntity, Adapter: StandardControlAdapter() }), [FocusableActuator], [FormErrorBeaconAdapter]);\r\nconst ServerValidatedLegacyFinalUrlExpansion = withControlErrorHandling(withUnvalidatedControlErrors(ValidatedLegacyFinalUrlExpansion, { filter: campaignNegativeWebPages }));\r\nconst UnmappedFormErrors = withControlErrorHandling(OriginalUnmappedFormErrors);\r\n\r\nexport const CampaignDetailsStepShell = ({\r\n data: campaignInfo,\r\n onDataChange,\r\n error,\r\n}) => {\r\n const isLoading = useMemo(() => _.isEmpty(campaignInfo), [campaignInfo]);\r\n\r\n const {\r\n campaign,\r\n brandExclusions,\r\n } = campaignInfo || {};\r\n const {\r\n Id: campaignId,\r\n adSchedules,\r\n conversionGoals: conversionGoalsState,\r\n TrackingUrlTemplate: trackingUrlTemplate,\r\n FinalUrlSuffix: finalUrlSuffix,\r\n UrlCustomParameters: urlCustomParameters,\r\n finalUrlExpansionOptOut,\r\n autoGeneratedTextOptOut,\r\n autoGeneratedImageOptOut,\r\n finalUrlExpansions,\r\n } = campaign || {};\r\n const {\r\n savedAddedBrandListIds,\r\n savedDeletedBrandListIds,\r\n } = brandExclusions || {};\r\n\r\n const { serverErrors, systemErrors } = error || {};\r\n\r\n const classes = useDefaultStyles(getStepCampaignSettingsStyles);\r\n const styles = useDefaultStyles(getCampaignStylesNorthStar);\r\n const campaignClasses = useDefaultStyles(getCampaignStyles);\r\n\r\n const { state } = useFormService();\r\n const { saveFailed } = state.context;\r\n const i18n = useContext(I18nContext);\r\n const isMounted = useIsMounted();\r\n const legacyI18n = useMemo(() => buildLegacyI18n(i18n, [ValidationStringMap, DisclaimerStringMap]), [i18n]);\r\n const { scope } = useContext(ScopeContext) || {};\r\n const serverContext = useContext(ServerContext);\r\n const { Permissions, DynamicPermissions, CurrentAccount } = serverContext || {};\r\n const permissions = useMemo(() => ({ dynamic: { ...DynamicPermissions }, ...Permissions }), [DynamicPermissions, Permissions]);\r\n const { AdvertiserCustomerID: advertiserCustomerId } = CurrentAccount || {};\r\n const {\r\n PerformanceMaxCampaignsAutoGenAssetControl: IsPerformanceMaxCampaignsAutoGenAssetControlEnabled,\r\n PerformanceMaxCampaignsPageFeeds: IsPerformanceMaxCampaignsPageFeedsEnabled,\r\n BrandExclusion: IsBrandExclusionEnabled,\r\n PerformanceMaxInCnMarket: IsPerformanceMaxInCnMarketEnabled,\r\n ConversionWarningImprovement: ConversionWarningImprovementEnabled,\r\n PMaxDisclaimers,\r\n } = permissions.dynamic;\r\n const {\r\n IsDomesticSimplifiedChineseEnabled,\r\n IsMSANDisclaimerEnabled,\r\n } = permissions;\r\n const isFeatureBlockedForCnMarket = IsDomesticSimplifiedChineseEnabled && IsPerformanceMaxInCnMarketEnabled;\r\n const isPMaxDisclaimersEnabled = !IsDomesticSimplifiedChineseEnabled && PMaxDisclaimers && IsMSANDisclaimerEnabled;\r\n\r\n const [adScheduleView, setAdScheduleView] = useState(null);\r\n const setAdScheduleViewCallback = useCallback((view) => { setAdScheduleView(view); }, []);\r\n const conversionGoals = useMemo(() => ({ conversionGoals: conversionGoalsState }), [conversionGoalsState]);\r\n const conversionGoalsTitleDetails = useMemo(() => getConversionGoalTitleDetails(i18n, conversionGoals && conversionGoals.conversionGoals), [i18n, conversionGoals]);\r\n const [reportedSelectedPageFeeds, setReportedSelectedPageFeeds] = useState([]);\r\n const onSelectedPageFeedsUpdate = useCallback((selectedPageFeeds) => {\r\n if (!isMounted.current) return;\r\n setReportedSelectedPageFeeds(selectedPageFeeds);\r\n }, [isMounted]);\r\n const pageFeedsDetails = useMemo(\r\n () => {\r\n if (_.isEmpty(reportedSelectedPageFeeds)) {\r\n return i18n.getString(_TL_('Upload all the relevant URLs for your campaign by spreadsheet.'));\r\n }\r\n if (reportedSelectedPageFeeds.length === 1) {\r\n return i18n.getString(_TL_('You’ve successfully added 1 page feed.'));\r\n }\r\n return i18n.getString(_TL_('You’ve successfully added {{number}} page feeds.'), { number: reportedSelectedPageFeeds.length });\r\n },\r\n [i18n, reportedSelectedPageFeeds]\r\n );\r\n const onPageFeedsChange = useCallback((selectedPageFeeds) => {\r\n if (!isMounted.current) return;\r\n onDataChange({\r\n data: prevData => ({\r\n ...prevData,\r\n campaign: {\r\n ...prevData.campaign,\r\n pageFeeds: selectedPageFeeds,\r\n },\r\n }),\r\n isDirty: true,\r\n });\r\n }, [isMounted, onDataChange]);\r\n const effectiveCampaignId = useMemo(\r\n () => {\r\n let savedCampaignId;\r\n if (campaignId > 0) {\r\n savedCampaignId = campaignId;\r\n } else if (campaign && campaign.data && campaign.data.Id > 0) {\r\n savedCampaignId = campaign.data.Id;\r\n } else {\r\n savedCampaignId = undefined;\r\n }\r\n return savedCampaignId;\r\n },\r\n [campaignId, campaign]\r\n );\r\n const urlOptions = useMemo(() => ({\r\n TrackingUrlTemplate: trackingUrlTemplate,\r\n FinalUrlSuffix: finalUrlSuffix,\r\n UrlCustomParameters: urlCustomParameters,\r\n }), [trackingUrlTemplate, finalUrlSuffix, urlCustomParameters]);\r\n const urlOptionsDetails = useMemo(() => getUrlOptionsDetails(i18n, urlOptions), [urlOptions, i18n]);\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 const onBrandListsChange = useCallback((selectedBrandLists, [deletedBrandListIds, addedBrandListIds]) => {\r\n if (!isMounted.current) return;\r\n onDataChange({\r\n data: prevData => ({\r\n ...prevData,\r\n brandExclusions: {\r\n ...prevData.brandExclusions,\r\n deletedBrandListIds,\r\n addedBrandListIds,\r\n },\r\n }),\r\n isDirty: true,\r\n });\r\n }, [isMounted, onDataChange]);\r\n const [reportedSelectedBrandLists, setReportedSelectedBrandLists] = useState([]);\r\n const onSelectedBrandListsUpdate = useCallback((selectedBrandLists) => {\r\n if (!isMounted.current) return;\r\n setReportedSelectedBrandLists(selectedBrandLists);\r\n }, [isMounted]);\r\n const brandListsDetails = useMemo(\r\n () => {\r\n if (_.isEmpty(reportedSelectedBrandLists)) {\r\n return i18n.getString(_TL_('Add brand exclusions so that your ads won’t show on search queries that mention those brands.'));\r\n }\r\n if (reportedSelectedBrandLists.length === 1) {\r\n return i18n.getString(_TL_('You’ve added 1 brand list, which makes it so that your ads won’t show on search queries that mention those brands.'));\r\n }\r\n return i18n.getString(_TL_('You’ve added {{number}} brand lists, which makes it so that your ads won’t show on search queries that mention those brands.'), { number: reportedSelectedBrandLists.length });\r\n },\r\n [i18n, reportedSelectedBrandLists]\r\n );\r\n const [finalUrlExpansionsView, setFinalUrlExpansionsView] = useState(null);\r\n const setFinalUrlExpansionsViewCallback = useCallback((view) => {\r\n setFinalUrlExpansionsView(view);\r\n }, []);\r\n\r\n const DisclaimerAdsEnabled = useMemo(\r\n () =>\r\n _.result(_.find( // from campaign setting DB\r\n _.get(campaign, 'CampaignSettings', []),\r\n setting => setting['@odata.type'] === '#Model.DisclaimerSetting'\r\n ), 'DisclaimerAdsEnabled', false)\r\n , [campaign]\r\n );\r\n const disclaimerRepositoryRef = useRef(new Repository({\r\n schema: DisclaimerAdExtension,\r\n skipExtensionCache: true,\r\n }));\r\n\r\n const [associatedDisclaimer, setAssociatedDisclaimer] = useState(null);\r\n useEffect(() => {\r\n if (isPMaxDisclaimersEnabled && campaignId) {\r\n getAssociatedDisclaimer(campaignId, disclaimerRepositoryRef.current).then((disclaimer) => {\r\n if (!_.isEmpty(disclaimer)) {\r\n setAssociatedDisclaimer(disclaimer);\r\n }\r\n });\r\n }\r\n return null;\r\n }, [isPMaxDisclaimersEnabled, campaignId]);\r\n\r\n const disclaimersDetails = useMemo(() => getDisclaimerTitleDetails(i18n, { selectedDisclaimer: associatedDisclaimer }), [associatedDisclaimer, i18n]);\r\n const isCampaignShoppingType = useMemo(\r\n // check if the odata type is ShoppingSettings, return true if it is, false if not\r\n () => !!_.find(_.get(campaign, 'CampaignSettings', []), setting => setting['@odata.type'] === '#Model.ShoppingSettings')\r\n , [campaign]\r\n );\r\n\r\n const [\r\n allCampaignSettingsSections,\r\n campaignSettingsExpandedSections,\r\n setCampaignSettingsExpandedSections,\r\n ] = useCollapseState(\r\n ['campaign', 'ad-schedule', 'conversions'] /* all sections */,\r\n ['campaign', 'ad-schedule', 'conversions'] /* initially expanded sections */\r\n );\r\n const basicSettingsExpand = useMemo(\r\n () => collapseExpander({ setActiveKeys: setCampaignSettingsExpandedSections }),\r\n [setCampaignSettingsExpandedSections]\r\n );\r\n\r\n const basicSettingsSection = useMemo(() => {\r\n const campaignPanel = (\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n >\r\n {\r\n isLoading ? : (\r\n \r\n )\r\n }\r\n \r\n );\r\n\r\n const adSchedulePanel = (\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: basicSettingsExpand,\r\n expandKey: 'ad-schedule',\r\n }}\r\n >\r\n {\r\n isLoading ? : (\r\n \r\n )\r\n }\r\n \r\n );\r\n\r\n const conversionPanel = (\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: basicSettingsExpand,\r\n expandKey: 'conversions',\r\n }}\r\n >\r\n {!ConversionWarningImprovementEnabled &&\r\n (isLoading ? : (\r\n \r\n ))\r\n }\r\n {ConversionWarningImprovementEnabled && (isLoading ? : (\r\n \r\n ))}\r\n \r\n );\r\n\r\n const generalSettings = [\r\n campaignPanel,\r\n adSchedulePanel,\r\n conversionPanel,\r\n ];\r\n\r\n return (\r\n
\r\n \r\n { generalSettings }\r\n \r\n
\r\n );\r\n }, [isLoading, i18n, adScheduleView, basicSettingsExpand, campaign, adSchedules, setAdScheduleViewCallback, conversionGoalsTitleDetails, ConversionWarningImprovementEnabled, conversionGoals, advertiserCustomerId, scope.values.aid, allCampaignSettingsSections, campaignSettingsExpandedSections, setCampaignSettingsExpandedSections]);\r\n\r\n const [\r\n allMoreSettingsSections,\r\n moreSettingsExpandedSections,\r\n setMoreSettingsExpandedSections,\r\n flipMoreSettingsExpandAllState,\r\n ] = useCollapseState(\r\n ['final-url-expansion', 'auto-gen-assets', 'page-feeds', 'campaign-url-options', 'brand-exclusions', 'disclaimers'] /* all sections */,\r\n [] /* initially expanded sections */\r\n );\r\n const moreBasicSettingsExpand = useMemo(\r\n () => collapseExpander({ setActiveKeys: setMoreSettingsExpandedSections }),\r\n [setMoreSettingsExpandedSections]\r\n );\r\n\r\n const moreBasicSettingsSection = useMemo(() => (\r\n
\r\n \r\n \r\n {moreSettingsExpandedSections.length ? i18n.getString(_TL_('Collapse all')) : i18n.getString(_TL_('Expand all'))}\r\n \r\n \r\n {!IsPerformanceMaxCampaignsAutoGenAssetControlEnabled && !isFeatureBlockedForCnMarket &&\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: moreBasicSettingsExpand,\r\n expandKey: 'final-url-expansion',\r\n }}\r\n >\r\n \r\n \r\n }\r\n {IsPerformanceMaxCampaignsAutoGenAssetControlEnabled && !isFeatureBlockedForCnMarket &&\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: moreBasicSettingsExpand,\r\n expandKey: 'auto-gen-assets',\r\n }}\r\n >\r\n \r\n {\r\n isLoading ? : (\r\n \r\n )\r\n }\r\n \r\n \r\n }\r\n {IsPerformanceMaxCampaignsPageFeedsEnabled &&\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: moreBasicSettingsExpand,\r\n expandKey: 'page-feeds',\r\n }}\r\n >\r\n \r\n {\r\n isLoading ? : (\r\n \r\n )\r\n }\r\n \r\n \r\n }\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: moreBasicSettingsExpand,\r\n expandKey: 'campaign-url-options',\r\n }}\r\n >\r\n
\r\n \r\n {i18n.getString(_TL_('Set up the tracking and redirect information for your ads.'))}\r\n \r\n {\r\n isLoading ? : (\r\n \r\n )\r\n }\r\n
\r\n \r\n {IsBrandExclusionEnabled &&\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: moreBasicSettingsExpand,\r\n expandKey: 'brand-exclusions',\r\n }}\r\n >\r\n \r\n {\r\n isLoading ? : (\r\n \r\n )\r\n }\r\n \r\n \r\n }\r\n {isPMaxDisclaimersEnabled && !isCampaignShoppingType && (\r\n \r\n }\r\n >\r\n {isLoading ? : (\r\n \r\n )}\r\n \r\n )}\r\n
\r\n
\r\n ), [classes.moreBasicCampaignSection, classes.urlOptionsContainer, i18n, flipMoreSettingsExpandAllState, moreSettingsExpandedSections, allMoreSettingsSections, setMoreSettingsExpandedSections, IsPerformanceMaxCampaignsAutoGenAssetControlEnabled, isFeatureBlockedForCnMarket, finalUrlExpansionsView, finalUrlExpansionOptOut, moreBasicSettingsExpand, campaign, finalUrlExpansions, setFinalUrlExpansionsViewCallback, autoGenAssetsSummary, isLoading, autoGeneratedTextOptOut, autoGeneratedImageOptOut, IsPerformanceMaxCampaignsPageFeedsEnabled, pageFeedsDetails, advertiserCustomerId, scope.values.aid, effectiveCampaignId, onPageFeedsChange, onSelectedPageFeedsUpdate, urlOptionsDetails, urlOptions, IsBrandExclusionEnabled, brandListsDetails, campaignId, onBrandListsChange, onSelectedBrandListsUpdate, savedAddedBrandListIds, savedDeletedBrandListIds, isPMaxDisclaimersEnabled, isCampaignShoppingType, disclaimersDetails, campaignClasses.disclaimerContainerWrapper, legacyI18n, DisclaimerAdsEnabled, associatedDisclaimer]);\r\n\r\n const onCampaignValidation = useCallback((results) => {\r\n if (!isMounted.current) return;\r\n onDataChange({\r\n data: prevData => ({\r\n ...prevData,\r\n campaign: {\r\n ...prevData.campaign,\r\n ...results.data,\r\n },\r\n }),\r\n isValid: results.isValid,\r\n isDirty: results.isDirty,\r\n });\r\n }, [isMounted, onDataChange]);\r\n\r\n return (\r\n \r\n \r\n \r\n
\r\n
\r\n

{i18n.getString(_TL_('Campaign details'))}

\r\n {i18n.getString(_TL_('Tell us how and when you’d like to optimize placements for your ads.'))}\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n { basicSettingsSection }\r\n { moreBasicSettingsSection }\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nCampaignDetailsStepShell.propTypes = {\r\n data: PropTypes.shape({\r\n campaign: PropTypes.shape({}),\r\n adSchedules: PropTypes.shape({}),\r\n conversionGoalsState: PropTypes.shape({}),\r\n }).isRequired,\r\n error: PropTypes.shape({\r\n serverErrors: PropTypes.arrayOf(PropTypes.shape({})),\r\n systemErrors: PropTypes.arrayOf(PropTypes.shape({})),\r\n }).isRequired,\r\n onDataChange: PropTypes.func.isRequired,\r\n};\r\n","import { useState, useEffect, useContext, useMemo } from 'react';\r\nimport _ from 'underscore';\r\nimport _preferencesService from '@bingads-webui-component-legacy/preference/service/index';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { getActionText } from '@bingads-webui-campaign-legacy/adextension-actionlink/model/language-type-text-mapper';\r\nimport { useWizardService, getFlowFactors } from '@bingads-webui-react/wizard';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\n\r\nimport { FLOWS } from '../step-constants';\r\n\r\n// const BiddingSchemeToBidType = {\r\n// EnhancedCpc: 'SearchBid',\r\n// ManualCpc: 'SearchBid',\r\n// ManualCpm: 'CpmBid',\r\n// };\r\n\r\nconst buildSchemaData = ({\r\n data,\r\n timeDisplayType,\r\n serverContext,\r\n cid,\r\n aid,\r\n flow,\r\n loadedStoresData,\r\n savedProductFilter,\r\n savedListingGroup,\r\n i18n,\r\n permissions,\r\n}) => {\r\n const locations = _.map(\r\n _.filter(\r\n data.campaign && data.campaign.locationTargets && data.campaign.locationTargets.currentLevelSettings.currentLocations,\r\n loc => loc.SelectionStatus === 'Included'\r\n ),\r\n loc => loc.location\r\n );\r\n\r\n const {\r\n PerformanceMaxCampaignsAutoGenAssetControl: IsPerformanceMaxCampaignsAutoGenAssetControlEnabled,\r\n SearchThemes: IsSearchThemesEnabled,\r\n SupportCPSForPmax: IsSupportCPSForPmaxEnabled,\r\n AssetGroupUrlRules: isAssetGroupUrlRulesEnabled,\r\n AssetGroupUrlRulesV2: isAssetGroupUrlRulesV2Enabled,\r\n NewCustomerAcquisition: isNewCustomerAcquisitionEnabled,\r\n PMaxDisclaimers,\r\n } = permissions.dynamic;\r\n\r\n const isPMaxDisclaimersEnabled = !serverContext.Permissions.IsDomesticSimplifiedChineseEnabled && PMaxDisclaimers && serverContext.Permissions.IsMSANDisclaimerEnabled;\r\n const isCampaignShoppingType = !!_.find(_.get(data.campaign, 'CampaignSettings', []), setting => setting['@odata.type'] === '#Model.ShoppingSettings');\r\n\r\n return ({\r\n campaignName: {\r\n data: data.campaign.Name,\r\n },\r\n assetGroupName: {\r\n data: data.assetGroup.Name,\r\n },\r\n autoGeneratedAssets: {\r\n data: {\r\n finalUrlExpansionOptOut: data.campaign.finalUrlExpansionOptOut,\r\n finalUrlExpansions: data.campaign.finalUrlExpansions,\r\n autoGeneratedTextOptOut: data.campaign.autoGeneratedTextOptOut,\r\n autoGeneratedImageOptOut: data.campaign.autoGeneratedImageOptOut,\r\n },\r\n isRendered: IsPerformanceMaxCampaignsAutoGenAssetControlEnabled,\r\n },\r\n budget: {\r\n data: data.campaign.Budget,\r\n currencyCode: serverContext.CurrentAccount.CurrencyCode,\r\n },\r\n bidStrategy: {\r\n data: data.campaign.BiddingScheme,\r\n },\r\n bidTarget: {\r\n data: data.campaign.BiddingScheme,\r\n currencyCode: serverContext.CurrentAccount.CurrencyCode,\r\n },\r\n costPerSale: {\r\n data: {\r\n costPerSaleOptOut: data.campaign.costPerSaleOptOut,\r\n },\r\n isRendered: IsSupportCPSForPmaxEnabled,\r\n },\r\n conversionGoals: {\r\n conversionGoals: data.campaign.conversionGoals,\r\n },\r\n disclaimer: {\r\n data: data.disclaimer,\r\n isRendered: isPMaxDisclaimersEnabled && !isCampaignShoppingType,\r\n },\r\n locationTargeting: {\r\n locations,\r\n targetOption: data.campaign && data.campaign.locationTargets && data.campaign.locationTargets.currentLevelSettings.targetOption,\r\n },\r\n languages: {\r\n data: data.campaign.Languages,\r\n },\r\n audienceSignal: {\r\n data: data.assetGroup.AudienceGroup,\r\n },\r\n searchThemes: {\r\n data: data.assetGroup.AssetGroupSearchThemes,\r\n isRendered: IsSearchThemesEnabled,\r\n },\r\n images: {\r\n data: data.assetGroup.Images,\r\n shouldFetchFromMT: true,\r\n cid,\r\n aid,\r\n },\r\n logos: {\r\n data: data.assetGroup.Images,\r\n shouldFetchFromMT: true,\r\n cid,\r\n aid,\r\n label: _TL_('Logos'),\r\n isLogo: true,\r\n },\r\n videos: {\r\n data: data.assetGroup.videos,\r\n isRendered: data.assetGroup.videos && data.assetGroup.videos.length > 0,\r\n },\r\n headlines: {\r\n data: data.assetGroup.Headlines,\r\n },\r\n descriptions: {\r\n data: data.assetGroup.Descriptions,\r\n },\r\n longHeadlines: {\r\n data: data.assetGroup.LongHeadlines,\r\n },\r\n businessName: {\r\n data: data.assetGroup.BusinessName,\r\n },\r\n callToAction: {\r\n data: data.assetGroup.CallToAction === 'Automated' ? i18n.getString(_TL_('Automated')) : getActionText({ Language: 'English', ActionType: data.assetGroup.CallToAction }),\r\n },\r\n adScheduleCampaign: {\r\n startDate: data.assetGroup.StartDate,\r\n endDate: data.assetGroup.EndDate,\r\n adSchedules: data.campaign && data.campaign.adSchedules && data.campaign.adSchedules.dayTimeRanges,\r\n useSearcherTimeZone: data.campaign.AdScheduleUseSearcherTimeZone,\r\n timeDisplayType,\r\n },\r\n productsPanel: {\r\n isRendered: flow === FLOWS.RETAIL_PERF_MAX,\r\n },\r\n storeInfo: {\r\n data: {\r\n storesData: loadedStoresData,\r\n ProviderId: data.campaign.ProviderId,\r\n IsFeedFiltered: data.campaign.IsFeedFiltered,\r\n SalesCountry: data.campaign.SalesCountry,\r\n FeedLabel: data.campaign.FeedLabel,\r\n LocalInventoryAdsEnabled: data.campaign.LocalInventoryAdsEnabled,\r\n },\r\n },\r\n listingGroup: {\r\n data: {\r\n productFilter: savedProductFilter,\r\n listingGroup: savedListingGroup,\r\n },\r\n },\r\n urlOptions: {\r\n data: {\r\n TrackingUrlTemplate: data.campaign.TrackingUrlTemplate,\r\n FinalUrlSuffix: data.campaign.FinalUrlSuffix,\r\n UrlCustomParameters: data.campaign.UrlCustomParameters,\r\n },\r\n },\r\n finalUrlExpansions: {\r\n data: {\r\n finalUrlExpansions: data.campaign.finalUrlExpansions,\r\n },\r\n isRendered: !IsPerformanceMaxCampaignsAutoGenAssetControlEnabled,\r\n },\r\n urlRules: {\r\n data: {\r\n i18n,\r\n finalUrls: data.assetGroup.FinalUrls,\r\n path1: data.assetGroup.Path1,\r\n path2: data.assetGroup.Path2,\r\n mobileFinalUrls: data.assetGroup.MobileFinalUrls,\r\n urlRules: data.assetGroup.AssetGroupUrlTargets,\r\n },\r\n isAssetGroupUrlRulesV2Enabled,\r\n isRendered: isAssetGroupUrlRulesEnabled,\r\n },\r\n newCustomerAcquisition: {\r\n data: {\r\n newCustomerAcquisitionOptOut: data.campaign.newCustomerAcquisitionOptOut,\r\n newCustomerAcquisition: data.campaign.newCustomerAcquisition,\r\n },\r\n currencyCode: serverContext.CurrentAccount.CurrencyCode,\r\n isRendered: isNewCustomerAcquisitionEnabled,\r\n },\r\n });\r\n};\r\n\r\nexport const useSummarySchemaData = ({ data }) => {\r\n const { scope } = useContext(ScopeContext) || {};\r\n\r\n const i18n = useContext(I18nContext);\r\n\r\n const { cid, aid } = scope.values;\r\n\r\n const [timeDisplayType, setTimeDisplayType] = useState('12-hour');\r\n\r\n const serverContext = useContext(ServerContext);\r\n const { Permissions, DynamicPermissions } = serverContext || {};\r\n const permissions = useMemo(() => ({ dynamic: { ...DynamicPermissions }, ...Permissions }), [DynamicPermissions, Permissions]);\r\n\r\n const { state } = useWizardService();\r\n\r\n const { loadedStoresData, savedProductFilter, savedListingGroup } = state.context.wizardData;\r\n\r\n const { flow } = getFlowFactors(state);\r\n\r\n useEffect(() => {\r\n const preferencesService = _preferencesService.default || _preferencesService;\r\n preferencesService.initialize().then(() => {\r\n const isTwelveHourDisplay = preferencesService.findByName('WebApp.CampaignUI.isTwelveHourDisplay') || {};\r\n setTimeDisplayType(_.isUndefined(isTwelveHourDisplay.Data) || isTwelveHourDisplay.Data ? '12-hour' : '24-hour');\r\n });\r\n }, []);\r\n\r\n return (data && buildSchemaData({\r\n data,\r\n timeDisplayType,\r\n serverContext,\r\n cid,\r\n aid,\r\n flow,\r\n loadedStoresData,\r\n savedProductFilter,\r\n savedListingGroup,\r\n i18n,\r\n permissions,\r\n })) || {};\r\n};\r\n\r\n","import React from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { Shimmer, ShimmerElementsGroup, ShimmerElementType, mergeStyles } from '@fluentui/react';\r\nimport { STEP_PATHS } from '../../steps/step-constants';\r\n\r\nconst PANEL_CONFIGS = {\r\n [STEP_PATHS.ASSETS]: {\r\n rowCount: 6,\r\n hasImages: true,\r\n },\r\n [STEP_PATHS.PRODUCTS]: {\r\n rowCount: 2,\r\n },\r\n [STEP_PATHS.TARGETING]: {\r\n rowCount: 3,\r\n },\r\n [STEP_PATHS.CAMPAIGNDETAILS]: {\r\n rowCount: 3,\r\n },\r\n [STEP_PATHS.BUDGET]: {\r\n rowCount: 3,\r\n },\r\n};\r\n\r\nconst wrapperClass = mergeStyles({\r\n padding: 2,\r\n width: 700,\r\n selectors: {\r\n '& > .ms-Shimmer-container': {\r\n margin: '10px 0',\r\n },\r\n },\r\n});\r\n\r\nconst getPanelTitleShimmer = () => (\r\n \r\n);\r\n\r\nconst getSummaryRowElement = isLastRow => (\r\n <>\r\n \r\n {!isLastRow && }\r\n \r\n\r\n\r\n);\r\n\r\nconst getSummaryImageRowElement = (isLastRow) => {\r\n const shimmerElements = [{ type: ShimmerElementType.line, width: 200, height: 50 }];\r\n\r\n // add 3 images\r\n _.range(3).forEach(() => {\r\n shimmerElements.push({ type: ShimmerElementType.gap, width: 30, height: 50 });\r\n shimmerElements.push({ type: ShimmerElementType.line, width: 100, height: 50 });\r\n });\r\n\r\n // add gap\r\n shimmerElements.push({ type: ShimmerElementType.gap, width: '100%', height: 50 });\r\n\r\n return (\r\n <>\r\n \r\n {!isLastRow && }\r\n \r\n );\r\n};\r\n\r\nconst getPanel = ({ rowCount, hasImages }) => {\r\n const title = getPanelTitleShimmer();\r\n\r\n const rows = Array.from({ length: rowCount }, (value, index) => (hasImages && index === 1\r\n ? getSummaryImageRowElement(index === rowCount - 1)\r\n : getSummaryRowElement(index === rowCount - 1)));\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport const SummaryShimmer = ({\r\n currentSteps = [],\r\n panelConfigs = PANEL_CONFIGS,\r\n}) => {\r\n const panels = currentSteps.map((step) => {\r\n const panelConfig = panelConfigs[step];\r\n return panelConfig && getPanel(panelConfig);\r\n });\r\n\r\n return
{panels}
;\r\n};\r\n\r\nSummaryShimmer.propTypes = {\r\n currentSteps: PropTypes.arrayOf(PropTypes.shape({})),\r\n panelConfigs: PropTypes.shape({}),\r\n};\r\n\r\nSummaryShimmer.defaultProps = {\r\n currentSteps: [],\r\n panelConfigs: PANEL_CONFIGS,\r\n};\r\n\r\n","import { DiagnosticsTypes } from '@bingads-webui-campaign-react/summary-diagnostic';\r\nimport { STEP_PATHS } from '../../step-constants';\r\n\r\nexport const Areas = {\r\n AssetGroup: 'AssetGroup',\r\n Bidding: 'Bidding',\r\n Budget: 'Budget',\r\n Campaign: 'Campaign',\r\n Conversion: 'Conversion',\r\n};\r\n\r\nexport const ActionTypes = {\r\n View: 'View',\r\n Apply: 'Apply',\r\n SetUpNow: 'SetUpNow',\r\n};\r\n\r\nconst AuditPoints = {\r\n IncreaseYourBudget: 'increase-your-budget',\r\n EnableAutoGeneratedAssets: 'enable-auto-generated-assets',\r\n NoAccountConversionGoals: 'no-account-conversion-goals',\r\n NoCampaignConversionGoals: 'no-campaign-conversion-goals',\r\n TargetCpaHigherThanBudget: 'target-cpa-higher-than-budget',\r\n HasNoValidGoalAtCampaignOrAccountLevel: 'has-no-valid-goal-at-campaign-or-account-level',\r\n};\r\n\r\nconst getDefaultConversionsWarning = locator => ({\r\n title: _TL_('Conversion goal issues'),\r\n description: _TL_('There are issues with the configuration of your conversion goals. Please review the warnings to make sure they are set up correctly.'),\r\n type: DiagnosticsTypes.Issue,\r\n actions: [\r\n {\r\n type: ActionTypes.SetUpNow,\r\n text: _TL_('Set up now'),\r\n stepId: STEP_PATHS.CAMPAIGNDETAILS,\r\n },\r\n ],\r\n locator,\r\n});\r\n\r\nconst getNoConversionGoalsWarning = locator => ({\r\n title: _TL_('No conversion goals'),\r\n description: _TL_('Maximize clicks will remain the default bid strategy for this campaign until you\\'ve either created a conversion goal or selected a campaign level conversion goal.'),\r\n type: DiagnosticsTypes.Issue,\r\n actions: [\r\n {\r\n type: ActionTypes.SetUpNow,\r\n text: _TL_('Set up now'),\r\n stepId: STEP_PATHS.CAMPAIGNDETAILS,\r\n },\r\n ],\r\n locator,\r\n});\r\n\r\nexport const ScenarioMap = {\r\n [Areas.Budget]: {\r\n LowerThanSuggestion: {\r\n EstimatedIncreaseInBudget: {\r\n title: _TL_('Increase your campaign budget'),\r\n description: _TL_('Your campaign budget is lower than the suggested amount, which may prevent it from performing optimally.'),\r\n link: {\r\n text: _TL_('Learn more about increasing your campaign budget.'),\r\n url: 'https://help.ads.microsoft.com/#apex/ads/en/53050/1',\r\n },\r\n type: DiagnosticsTypes.Issue,\r\n actions: [\r\n {\r\n type: ActionTypes.View,\r\n text: _TL_('View'),\r\n stepId: STEP_PATHS.BUDGET,\r\n },\r\n ],\r\n locator: AuditPoints.IncreaseYourBudget,\r\n },\r\n },\r\n InvalidCpa: {\r\n TargetCpaHigherThanBudget: {\r\n title: _TL_('Adjust your target CPA'),\r\n description: _TL_('Your campaign\\'s total cost per acquisition is higher than the daily budget, which could prevent you from receiving any conversions. Please consider lowering your total cost per acquisition or raising your daily budget.'),\r\n type: DiagnosticsTypes.Issue,\r\n actions: [\r\n {\r\n type: ActionTypes.View,\r\n text: _TL_('View'),\r\n stepId: STEP_PATHS.BUDGET,\r\n },\r\n ],\r\n locator: AuditPoints.TargetCpaHigherThanBudget,\r\n },\r\n },\r\n },\r\n [Areas.Campaign]: {\r\n NoAutoGeneratedAssets: {\r\n EnableAutoGeneratedAssets: {\r\n title: _TL_('Enable auto-generated assets'),\r\n description: _TL_('Create additional AI-generated assets for your ads.'),\r\n type: DiagnosticsTypes.Recommendation,\r\n actions: [\r\n {\r\n type: ActionTypes.View,\r\n text: _TL_('View'),\r\n stepId: STEP_PATHS.CAMPAIGNDETAILS,\r\n },\r\n ],\r\n locator: AuditPoints.EnableAutoGeneratedAssets,\r\n },\r\n },\r\n },\r\n [Areas.Conversion]: {\r\n NotSetUpGoal: {\r\n HasNoValidCampaignLevelGoal: {\r\n title: _TL_('Select a conversion goal for this campaign'),\r\n description: _TL_('Your campaign doesn\\'t have a conversion goal set up to attribute conversions, which may impact its performance.'),\r\n link: {\r\n text: _TL_('Learn more about conversion goals'),\r\n url: 'https://help.ads.microsoft.com/#apex/ads/en/56709/2',\r\n },\r\n type: DiagnosticsTypes.Issue,\r\n actions: [\r\n {\r\n type: ActionTypes.View,\r\n text: _TL_('View'),\r\n stepId: STEP_PATHS.CAMPAIGNDETAILS,\r\n },\r\n ],\r\n locator: AuditPoints.NoCampaignConversionGoals,\r\n },\r\n HasNoValidAccountLevelGoal: {\r\n title: _TL_('Create a conversion goal'),\r\n description: _TL_('You haven\\'t created a conversion goal for this account to attribute conversions, which may impact its performance.'),\r\n link: {\r\n text: _TL_('Learn more about conversion goals'),\r\n url: 'https://help.ads.microsoft.com/#apex/ads/en/56709/2',\r\n },\r\n type: DiagnosticsTypes.Issue,\r\n locator: AuditPoints.NoAccountConversionGoals,\r\n },\r\n },\r\n NoConversionGoal: {\r\n HasNoValidGoalAtCampaignOrAccountLevel: getNoConversionGoalsWarning(AuditPoints.HasNoValidGoalAtCampaignOrAccountLevel),\r\n HasNoValidGoalAtCampaignOrAccountLevel_NoAccountGoal: getNoConversionGoalsWarning('has-no-valid-goal-at-campaign-or-account-level-no-account-goal'),\r\n HasNoValidGoalAtCampaignOrAccountLevel_ChangeToMainGoal: getDefaultConversionsWarning('has-no-valid-goal-at-campaign-or-account-level-change-to-main-goal'),\r\n },\r\n NoRecentConversion: {\r\n TrackingStatusNoConversions_NotUploadOfflineConversion: getDefaultConversionsWarning('tracking-status-no-conversions-not-upload-offline-conversion'),\r\n TrackingStatusNoConversions_EventGoalInvalidParameter: getDefaultConversionsWarning('tracking-status-no-conversions-event-goal-invalid-parameter'),\r\n TrackingStatusNoConversions_UrlGoalInvalidParameter: getDefaultConversionsWarning('tracking-status-no-conversions-url-goal-invalid-parameter'),\r\n TrackingStatusNoConversions_UETMismatch: getDefaultConversionsWarning('tracking-status-no-conversions-uet-mismatch'),\r\n TrackingStatusNoConversions_UETActiveMissingConversionEvent: getDefaultConversionsWarning('tracking-status-no-conversions-uet-active-missing-conversion-event'),\r\n TrackingStatusNoConversions_ChangeToMainGoal: getDefaultConversionsWarning('tracking-status-no-conversions-change-to-main-goal'),\r\n TrackingStatusNoConversions: getDefaultConversionsWarning('tracking-status-no-conversions'),\r\n },\r\n Unverified: {\r\n TrackingStatusUnverified_UETMismatch: getDefaultConversionsWarning('tracking-status-unverified-uet-mismatch'),\r\n TrackingStatusUnverified_ChangeToMainGoal: getDefaultConversionsWarning('tracking-status-unverified-change-to-main-goal'),\r\n TrackingStatusUnverified: getDefaultConversionsWarning('tracking-status-unverified'),\r\n },\r\n TagInactive: {\r\n TrackingStatusTagInactive_UETMismatch: getDefaultConversionsWarning('tracking-status-tag-inactive-uet-mismatch'),\r\n TrackingStatusTagInactive_ChangeToMainGoal: getDefaultConversionsWarning('tracking-status-tag-inactive-change-to-main-goal'),\r\n TrackingStatusTagInactive: getDefaultConversionsWarning('tracking-status-tag-inactive'),\r\n },\r\n InactiveDueToTagUnavailable: {\r\n TrackingStatusInactiveDueToTagUnavailable_UETMismatch: getDefaultConversionsWarning('tracking-status-inactive-due-to-tag-unavailable-uet-mismatch'),\r\n TrackingStatusInactiveDueToTagUnavailable_ChangeToMainGoal: getDefaultConversionsWarning('tracking-status-inactive-due-to-tag-unavailable-change-to-main-goal'),\r\n TrackingStatusInactiveDueToTagUnavailable: getDefaultConversionsWarning('tracking-status-inactive-due-to-tag-unavailable'),\r\n },\r\n MissGoalWithRevenueValue: {\r\n MissGoalWithRevenueValue: getDefaultConversionsWarning('miss-goal-with-revenue-value'),\r\n },\r\n },\r\n};\r\n","import React, { useMemo, useCallback, useContext, useEffect } from 'react';\r\nimport _ from 'underscore';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport PropTypes from 'prop-types';\r\nimport { Stack } from '@bingads-webui-react/fabric-control';\r\nimport { GeneratedUI } from '@bingads-webui-campaign-react/ui-generator';\r\nimport { summaryPageComponentTypes } from '@bingads-webui-campaign-react/summary-page';\r\nimport { WIZARD_EVENTS, useWizardService, getCurrentFlow } from '@bingads-webui-react/wizard';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { SummaryDiagnostic } from '@bingads-webui-campaign-react/summary-diagnostic';\r\nimport { buildSchema } from './schema';\r\nimport { useSummarySchemaData } from './use-summary-schema-data';\r\nimport { STEP_PATHS } from '../step-constants';\r\nimport { SummaryShimmer } from '../../shared/components/summary-shimmer';\r\nimport { extractAuditPoints } from './diagnostics/utils';\r\nimport { useActionCallback } from './diagnostics/use-action-callback';\r\n\r\nexport const SummaryStepShell = ({\r\n data,\r\n onDataChange,\r\n}) => {\r\n const { issueList, recommendList } = useMemo(() => extractAuditPoints(_.get(data, 'diagnosticsData')), [data]);\r\n const onActionClick = useActionCallback();\r\n const isLoading = useMemo(() => _.isEmpty(data), [data]);\r\n\r\n const i18n = useContext(I18nContext);\r\n\r\n const schemaData = useSummarySchemaData({ data });\r\n\r\n const { send, state } = useWizardService();\r\n\r\n const currentFlow = getCurrentFlow(state);\r\n\r\n const serverContext = useContext(ServerContext);\r\n const { Permissions, DynamicPermissions } = serverContext || {};\r\n const permissions = useMemo(() => ({ dynamic: { ...DynamicPermissions }, ...Permissions }), [DynamicPermissions, Permissions]);\r\n const {\r\n PMaxCreationDiagnostic: isPMaxCreationDiagnosticEnabled,\r\n } = permissions.dynamic;\r\n\r\n const onAssetsHeaderActionClick = useCallback(() => {\r\n send(WIZARD_EVENTS.NAVIGATE_TO, {\r\n stepId: STEP_PATHS.ASSETS,\r\n });\r\n }, [send]);\r\n\r\n const onTargetingHeaderActionClick = useCallback(() => send(WIZARD_EVENTS.NAVIGATE_TO, {\r\n stepId: STEP_PATHS.TARGETING,\r\n }), [send]);\r\n\r\n const onCampaignSettingsHeaderActionClick = useCallback(() =>\r\n send(WIZARD_EVENTS.NAVIGATE_TO, {\r\n stepId: STEP_PATHS.CAMPAIGNDETAILS,\r\n }), [send]);\r\n\r\n const onBudgetSettingsHeaderActionClick = useCallback(() =>\r\n send(WIZARD_EVENTS.NAVIGATE_TO, {\r\n stepId: STEP_PATHS.BUDGET,\r\n }), [send]);\r\n\r\n const onProductsHeaderActionClick = useCallback(() =>\r\n send(WIZARD_EVENTS.NAVIGATE_TO, {\r\n stepId: STEP_PATHS.PRODUCTS,\r\n }), [send]);\r\n\r\n const options = useMemo(() => ({\r\n onAssetsHeaderActionClick,\r\n onTargetingHeaderActionClick,\r\n onCampaignSettingsHeaderActionClick,\r\n onBudgetSettingsHeaderActionClick,\r\n onProductsHeaderActionClick,\r\n }), [onAssetsHeaderActionClick, onTargetingHeaderActionClick, onCampaignSettingsHeaderActionClick, onBudgetSettingsHeaderActionClick, onProductsHeaderActionClick]);\r\n\r\n const schema = useMemo(() => buildSchema(options), [options]);\r\n\r\n useEffect(() => (\r\n onDataChange({\r\n data,\r\n isValid: true,\r\n })\r\n ), [data, onDataChange]);\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n

{i18n.getString(_TL_('Prepare for success!'))}

\r\n
\r\n {i18n.getString(_TL_('Here\\'s a summary of everything in your campaign. All objects are available, but campaign is not live yet.'))}\r\n
\r\n
\r\n
\r\n {isLoading ? : (\r\n <>\r\n {isPMaxCreationDiagnosticEnabled && }\r\n
\r\n \r\n
\r\n \r\n )\r\n }\r\n
\r\n
\r\n );\r\n};\r\n\r\nSummaryStepShell.propTypes = {\r\n data: PropTypes.shape({}),\r\n onDataChange: PropTypes.func.isRequired,\r\n};\r\n\r\nSummaryStepShell.defaultProps = {\r\n data: null,\r\n};\r\n","import _ from 'underscore';\r\nimport { DiagnosticsTypes } from '@bingads-webui-campaign-react/summary-diagnostic';\r\nimport { ScenarioMap } from './constants';\r\n\r\nexport const extractAuditPoints = (dataArray) => {\r\n const issueList = [];\r\n const recommendList = [];\r\n\r\n if (!dataArray) return { issueList, recommendList };\r\n\r\n dataArray.forEach((item) => {\r\n const { Key, Value } = item;\r\n const { Status, AuditPoints } = Value;\r\n\r\n const scenario = _.get(ScenarioMap, [Key, Status]);\r\n if (!scenario) return;\r\n\r\n AuditPoints.forEach((auditPoint) => {\r\n const auditDetails = scenario[auditPoint];\r\n if (auditDetails) {\r\n if (auditDetails.type === DiagnosticsTypes.Issue) {\r\n issueList.push(auditDetails);\r\n } else if (auditDetails.type === DiagnosticsTypes.Recommendation) {\r\n recommendList.push(auditDetails);\r\n }\r\n }\r\n });\r\n });\r\n\r\n return { issueList, recommendList };\r\n};\r\n\r\nexport const convertDiagnosticsDataToTrackingLog = (diagnosticsData) => {\r\n let msg = '';\r\n if (!diagnosticsData) return msg;\r\n\r\n const auditCheckList = [];\r\n diagnosticsData.forEach((item) => {\r\n const { Key, Value } = item;\r\n const { Status, AuditPoints } = Value;\r\n const scenario = _.get(ScenarioMap, [Key, Status]);\r\n if (!scenario) return;\r\n\r\n AuditPoints.forEach((auditPoint) => {\r\n const auditDetails = scenario[auditPoint];\r\n if (auditDetails) {\r\n auditCheckList.push(auditPoint);\r\n }\r\n });\r\n });\r\n msg += `@auditCheckCount=${auditCheckList.length};`;\r\n msg += `@auditCheckList=${auditCheckList.join(',')};`;\r\n\r\n return msg;\r\n};\r\n","import { useContext } from 'react';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { WIZARD_EVENTS, useWizardService } from '@bingads-webui-react/wizard';\r\nimport { ActionTypes } from './constants';\r\n\r\nexport const useActionCallback = () => {\r\n const activity = useContext(ActivityContext);\r\n const { send } = useWizardService();\r\n return ({ action, item }) => {\r\n if (action.type === ActionTypes.View || action.type === ActionTypes.SetUpNow) {\r\n send(WIZARD_EVENTS.NAVIGATE_TO, {\r\n stepId: action.stepId,\r\n });\r\n activity.trace(`[PmaxNorthStarWizard][SummaryStep][Checks] View action clicked: ${item.locator}`);\r\n }\r\n };\r\n};\r\n","import { buildDefaultDataProperty } from '@bingads-webui-campaign-react/ui-generator';\r\n\r\nexport const buildSchema = options => ({\r\n separatorStyles: {\r\n marginBottom: 20,\r\n },\r\n products: {\r\n type: 'panel',\r\n header: {\r\n title: _TL_('Products'),\r\n actionButton: {\r\n label: _TL_('Edit'),\r\n iconName: 'Edit',\r\n ariaLabel: _TL_('Edit'),\r\n onClick: options.onProductsHeaderActionClick,\r\n },\r\n },\r\n components: {\r\n separatorStyles: {\r\n marginBottom: 8,\r\n },\r\n storeInfo: {\r\n type: 'store-info',\r\n dynamicProps: props => props.storeInfo,\r\n },\r\n hd1: {\r\n type: 'horizontal-divider',\r\n },\r\n listingGroup: {\r\n type: 'listing-group',\r\n dynamicProps: props => props.listingGroup,\r\n },\r\n },\r\n dynamicProps: props => props.productsPanel,\r\n },\r\n assets: {\r\n type: 'panel',\r\n header: {\r\n title: _TL_('Assets'),\r\n actionButton: {\r\n label: _TL_('Edit'),\r\n iconName: 'Edit',\r\n ariaLabel: _TL_('Edit'),\r\n onClick: options.onAssetsHeaderActionClick,\r\n },\r\n },\r\n components: {\r\n separatorStyles: {\r\n marginBottom: 8,\r\n },\r\n assetGroupName: buildDefaultDataProperty({\r\n label: _TL_('Asset group name'),\r\n dynamicProps: props => props.assetGroupName,\r\n }),\r\n hd3: {\r\n type: 'horizontal-divider',\r\n },\r\n images: {\r\n type: 'images',\r\n dynamicProps: props => props.images,\r\n },\r\n videos: {\r\n type: 'videos',\r\n dynamicProps: props => props.videos,\r\n },\r\n hd1: {\r\n type: 'horizontal-divider',\r\n },\r\n logos: {\r\n type: 'images',\r\n dynamicProps: props => props.logos,\r\n },\r\n hd2: {\r\n type: 'horizontal-divider',\r\n },\r\n headlines: {\r\n type: 'headlines',\r\n dynamicProps: props => props.headlines,\r\n },\r\n longHeadlines: {\r\n type: 'long-headlines',\r\n dynamicProps: props => props.longHeadlines,\r\n },\r\n descriptions: {\r\n type: 'descriptions',\r\n dynamicProps: props => props.descriptions,\r\n },\r\n hd4: {\r\n type: 'horizontal-divider',\r\n },\r\n businessName: buildDefaultDataProperty({\r\n label: _TL_('Business name'),\r\n dynamicProps: props => props.businessName,\r\n }),\r\n callToAction: buildDefaultDataProperty({\r\n label: _TL_('Call to action'),\r\n dynamicProps: props => props.callToAction,\r\n }),\r\n hd5: {\r\n type: 'horizontal-divider',\r\n },\r\n urlRules: {\r\n type: 'url-rules',\r\n dynamicProps: props => props.urlRules,\r\n },\r\n },\r\n },\r\n targeting: {\r\n type: 'panel',\r\n header: {\r\n title: _TL_('Targeting'),\r\n actionButton: {\r\n label: _TL_('Edit'),\r\n iconName: 'Edit',\r\n ariaLabel: _TL_('Edit'),\r\n onClick: options.onTargetingHeaderActionClick,\r\n },\r\n },\r\n components: {\r\n separatorStyles: {\r\n marginBottom: 8,\r\n },\r\n locationTargeting: {\r\n type: 'location-targeting',\r\n dynamicProps: props => props.locationTargeting,\r\n },\r\n languages: {\r\n type: 'languages',\r\n dynamicProps: props => props.languages,\r\n },\r\n hd1: {\r\n type: 'horizontal-divider',\r\n },\r\n audienceSignal: {\r\n type: 'audience-signal',\r\n dynamicProps: props => props.audienceSignal,\r\n },\r\n searchThemes: {\r\n type: 'search-themes',\r\n dynamicProps: props => props.searchThemes,\r\n },\r\n },\r\n },\r\n campaignSettings: {\r\n type: 'panel',\r\n header: {\r\n title: _TL_('Campaign settings'),\r\n actionButton: {\r\n label: _TL_('Edit'),\r\n iconName: 'Edit',\r\n ariaLabel: _TL_('Edit'),\r\n onClick: options.onCampaignSettingsHeaderActionClick,\r\n },\r\n },\r\n components: {\r\n separatorStyles: {\r\n marginBottom: 8,\r\n },\r\n campaignName: buildDefaultDataProperty({\r\n label: _TL_('Campaign name'),\r\n dynamicProps: props => props.campaignName,\r\n }),\r\n adScheduleCampaign: {\r\n type: 'ad-schedule',\r\n dynamicProps: props => props.adScheduleCampaign,\r\n },\r\n conversionGoals: {\r\n type: 'conversion-goals',\r\n dynamicProps: props => props.conversionGoals,\r\n },\r\n hd1: {\r\n type: 'horizontal-divider',\r\n },\r\n finalUrlExpansions: {\r\n type: 'final-url-expansions',\r\n dynamicProps: props => props.finalUrlExpansions,\r\n },\r\n autoGeneratedAssets: {\r\n type: 'auto-generated-assets',\r\n dynamicProps: props => props.autoGeneratedAssets,\r\n },\r\n urlOptions: {\r\n type: 'url-options',\r\n dynamicProps: props => props.urlOptions,\r\n },\r\n disclaimer: {\r\n type: 'disclaimer',\r\n dynamicProps: props => props.disclaimer,\r\n },\r\n },\r\n },\r\n budget: {\r\n type: 'panel',\r\n header: {\r\n title: _TL_('Budget'),\r\n actionButton: {\r\n label: _TL_('Edit'),\r\n iconName: 'Edit',\r\n ariaLabel: _TL_('Edit'),\r\n onClick: options.onBudgetSettingsHeaderActionClick,\r\n },\r\n },\r\n components: {\r\n separatorStyles: {\r\n marginBottom: 8,\r\n },\r\n budget: {\r\n type: 'budget',\r\n dynamicProps: props => props.budget,\r\n },\r\n bidStrategy: {\r\n type: 'bid-strategy',\r\n dynamicProps: props => props.bidStrategy,\r\n },\r\n bidTarget: {\r\n type: 'bid-target',\r\n dynamicProps: props => props.bidTarget,\r\n },\r\n costPerSale: {\r\n type: 'cost-per-sale',\r\n dynamicProps: props => props.costPerSale,\r\n },\r\n newCustomerAcquisition: {\r\n type: 'new-customer-acquisition',\r\n dynamicProps: props => props.newCustomerAcquisition,\r\n },\r\n },\r\n },\r\n});\r\n","import Promise from 'bluebird';\r\nimport { createOrUpdateCampaign, createOrUpdateAssetGroup } from '@bingads-webui-campaign-react/perf-max-data';\r\n\r\nexport const updateAssetGroupAndCampaignStatus = ({ campaignId, assetGroupId }) => {\r\n const campaignData = {\r\n Id: campaignId,\r\n Status: 'Active',\r\n };\r\n\r\n const assetGroupData = {\r\n Id: assetGroupId,\r\n Status: 'Active',\r\n Campaign: {\r\n Id: campaignId,\r\n },\r\n };\r\n\r\n return Promise.props({\r\n campaign: createOrUpdateCampaign(campaignData),\r\n assetGroup: createOrUpdateAssetGroup(assetGroupData),\r\n });\r\n};\r\n","import { useCallback, useMemo } from 'react';\r\nimport _ from 'underscore';\r\nimport { odata } from '@bingads-webui/http-util';\r\nimport { edmCampaign } from '@bingads-webui/edm-campaign';\r\nimport { Areas } from './constants';\r\n\r\nconst getODataConfig = (serverContext) => {\r\n const isLocal = () => {\r\n const hostname = document.location.hostname.toLowerCase();\r\n return hostname.indexOf('ads.microsoft.com') === -1 &&\r\n hostname.indexOf('ads-int.microsoft.com') === -1;\r\n };\r\n\r\n const odataPath = isLocal() ? 'AdInsight/V2' : 'AdInsight/V2';\r\n\r\n const oDataConfig = {\r\n odataToken: serverContext.Token,\r\n oDataToken: serverContext.Token,\r\n odataPath: `${serverContext.ServicesEndpoints.AdInsightAPI}${odataPath}`,\r\n oDataPath: `${serverContext.ServicesEndpoints.AdInsightAPI}${odataPath}`,\r\n };\r\n\r\n return oDataConfig;\r\n};\r\n\r\nexport const useDiagnosticsData = ({\r\n advertiserCustomerId,\r\n aid,\r\n campaignId,\r\n serverContext,\r\n areas = [Areas.AssetGroup, Areas.Conversion], // Default to AssetGroup and Conversion\r\n}) => {\r\n const timeZoneId = _.get(serverContext, ['CurrentAccount', 'TimeZone']);\r\n\r\n const oDataConfig = useMemo(() => getODataConfig(serverContext), [serverContext]);\r\n const oDataOptions = useMemo(() => ({\r\n contentType: 'application/json',\r\n path: oDataConfig.odataPath,\r\n oDataToken: oDataConfig.odataToken,\r\n }), [oDataConfig]);\r\n\r\n const fetchDiagnosticData = useCallback(() => {\r\n if (_.get(serverContext, ['DynamicPermissions', 'DiagnosticCMMTApi']) || _.get(serverContext, ['DynamicPermissions', 'ConversionWarningImprovement'])) {\r\n return edmCampaign\r\n .Customers.$withKey(advertiserCustomerId)\r\n .Accounts.$withKey(aid)\r\n .Campaigns.$withKey(campaignId)\r\n .Diagnostic['Default.GetCampaignCreationDiagnostics']\r\n .$makeCall({})\r\n .toPromise()\r\n .then(data => data.CampaignDiagnosticDetail);\r\n }\r\n const areasStr = areas.map(area => `\"${area}\"`).join(',');\r\n const baseURL = `${oDataConfig.odataPath}/Customers(${advertiserCustomerId})/Accounts(${aid})/Campaigns(${campaignId})/Recommendation.GetCampaignCreationDiagnostics(timeZoneId=${timeZoneId},areas=[${areasStr}])`;\r\n const options = _.extend(\r\n {},\r\n oDataOptions,\r\n {\r\n url: baseURL,\r\n }\r\n );\r\n const promise = odata.get(options);\r\n\r\n return promise.then(data => data.CampaignDiagnosticDetail);\r\n }, [advertiserCustomerId, aid, areas, campaignId, oDataConfig.odataPath, oDataOptions, timeZoneId, serverContext]);\r\n\r\n const patchDiagnosticsData = useCallback(({\r\n diagnosticsData,\r\n campaignData,\r\n budgetSuggestionData,\r\n }) => {\r\n const patchedDiagnosticsData = _.clone(diagnosticsData);\r\n\r\n const {\r\n autoGeneratedImageOptOut,\r\n autoGeneratedTextOptOut,\r\n finalUrlExpansionOptOut,\r\n } = campaignData || {};\r\n if (autoGeneratedImageOptOut || autoGeneratedTextOptOut || finalUrlExpansionOptOut) {\r\n patchedDiagnosticsData.push({\r\n Key: Areas.Campaign,\r\n Value: {\r\n AuditPoints: ['EnableAutoGeneratedAssets'],\r\n Status: 'NoAutoGeneratedAssets',\r\n },\r\n });\r\n }\r\n\r\n const enableTcpaCheck = _.get(serverContext, ['DynamicPermissions', 'TargetCpaValueCheck']);\r\n if (enableTcpaCheck) {\r\n const {\r\n Budget: { Amount: BudgetAmount, Type: BudgetType, Status: BudgetStatus } = {},\r\n BiddingScheme: { Type: BiddingSchemeType, TargetCpa } = {},\r\n } = campaignData || {};\r\n if (BudgetType === 'DailyStandard' && BudgetStatus === 'Private' && BiddingSchemeType === 'MaxConversions' && TargetCpa && BudgetAmount < TargetCpa) {\r\n patchedDiagnosticsData.push({\r\n Key: Areas.Budget,\r\n Value: {\r\n AuditPoints: ['TargetCpaHigherThanBudget'],\r\n Status: 'InvalidCpa',\r\n },\r\n });\r\n }\r\n }\r\n\r\n if (budgetSuggestionData) {\r\n const currentDailyBudget = _.get(campaignData, ['Budget', 'Amount']);\r\n const suggestedDailyBudget = _.get(budgetSuggestionData, ['Balanced', 'BudgetAmountDaily']);\r\n if (suggestedDailyBudget && currentDailyBudget < suggestedDailyBudget) {\r\n patchedDiagnosticsData.push({\r\n Key: Areas.Budget,\r\n Value: {\r\n AuditPoints: ['EstimatedIncreaseInBudget'],\r\n Status: 'LowerThanSuggestion',\r\n },\r\n });\r\n }\r\n }\r\n\r\n return patchedDiagnosticsData;\r\n }, [serverContext]);\r\n\r\n return {\r\n fetchDiagnosticData,\r\n patchDiagnosticsData,\r\n };\r\n};\r\n","import React from 'react';\r\nimport { Activity } from '@bingads-webui-react/hoc-with-signal';\r\nimport { STEP_PATHS, FLOWS } from './step-constants';\r\nimport { AssetsStepShell, useAssetStepRepository } from './assets';\r\nimport { BudgetStepShell, useBudgetStepRepository } from './budget';\r\nimport { TargetingStepShell, useTargetingStepRepository } from './targeting';\r\nimport { ProductsStepShell, useProductsStepRepository } from './products';\r\nimport { CampaignDetailsStepShell, useCampaignDetailsStepRepository } from './campaign-details';\r\nimport { SummaryStepShell, useSummaryStepRepository } from './summary';\r\n\r\nexport const StepConfig = [{\r\n id: STEP_PATHS.ASSETS,\r\n view: props => ,\r\n repository: useAssetStepRepository,\r\n},\r\n{\r\n id: STEP_PATHS.PRODUCTS,\r\n view: props => ,\r\n repository: useProductsStepRepository,\r\n},\r\n{\r\n id: STEP_PATHS.TARGETING,\r\n view: props => ,\r\n repository: useTargetingStepRepository,\r\n},\r\n{\r\n id: STEP_PATHS.CAMPAIGNDETAILS,\r\n view: props => ,\r\n repository: useCampaignDetailsStepRepository,\r\n},\r\n{\r\n id: STEP_PATHS.BUDGET,\r\n view: props => ,\r\n repository: useBudgetStepRepository,\r\n},\r\n{\r\n id: STEP_PATHS.SUMMARY,\r\n view: props => ,\r\n repository: useSummaryStepRepository,\r\n}];\r\n\r\n\r\nexport const getStepListConfig = ({ i18n, flow }) => {\r\n const stepListConfig = [{\r\n id: STEP_PATHS.ASSETS,\r\n title: i18n.getString(_TL_('Assets')),\r\n }, {\r\n id: STEP_PATHS.TARGETING,\r\n title: i18n.getString(_TL_('Targeting')),\r\n }, {\r\n id: STEP_PATHS.CAMPAIGNDETAILS,\r\n title: i18n.getString(_TL_('Campaign details')),\r\n }, {\r\n id: STEP_PATHS.BUDGET,\r\n title: i18n.getString(_TL_('Budget')),\r\n }, {\r\n id: STEP_PATHS.SUMMARY,\r\n title: i18n.getString(_TL_('Summary')),\r\n }];\r\n\r\n if (flow === FLOWS.RETAIL_PERF_MAX) {\r\n // add products step to the first\r\n stepListConfig.unshift({\r\n id: STEP_PATHS.PRODUCTS,\r\n title: i18n.getString(_TL_('Products')),\r\n });\r\n }\r\n\r\n return stepListConfig;\r\n};\r\n","import { useCallback, useContext, useMemo } from 'react';\r\nimport _ from 'underscore';\r\nimport { saveAssetGroupAndLinkedData } from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport Promise from 'bluebird';\r\nimport { useWizardService, WIZARD_EVENTS } from '@bingads-webui-react/wizard';\r\nimport { ScenarioContext, ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { PermissionsContext } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { logCopilotRecommendations } from '@bingads-webui-campaign-react/copilot-common';\r\nimport { RecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport {\r\n getLoggerWithoutPageInfo,\r\n createVideoRepository,\r\n createImageRepository,\r\n createFolderRepository,\r\n uploadVideoMetadata,\r\n} from '@bingads-webui-campaign-react/asset-library-services';\r\nimport { getLogVersion } from '@bingads-webui-campaign-react/asset-library-model';\r\nimport { newVideoFromMTObject } from '@bingads-webui-campaign-react/image-experience-video-part';\r\nimport { getODataConfig } from '../../shared/components/odata-config';\r\nimport { createDefaultCampaign, handleDefaultCampaignCreationError } from '../../shared/model/create-default-campaign';\r\nimport { getDefaultAssetGroup } from '../../shared/model/default-data';\r\n\r\nconst GENERIC_ERROR_MESSAGE_KEY = _TL_(\"We've encountered an error and can't continue. Please contact support for further assistance.\");\r\n\r\nexport const useAssetStepRepository = () => {\r\n const scenarioContext = useContext(ScenarioContext);\r\n const i18n = useContext(I18nContext);\r\n const permissions = useContext(PermissionsContext);\r\n const { scope } = useContext(ScopeContext) || {};\r\n const [recommendationContext] = useContext(RecommendationContext);\r\n const activity = useContext(ActivityContext);\r\n\r\n const { state, send } = useWizardService();\r\n\r\n const versionForLog = getLogVersion(permissions);\r\n\r\n const logger = getLoggerWithoutPageInfo(activity, versionForLog, 'PMaxAdsStep');\r\n\r\n const serverContext = useContext(ServerContext);\r\n\r\n const {\r\n PMaxNewAspectRatios: isPMaxNewAspectRatiosEnabled,\r\n PMaxExcludeNewAspectRatios: isPMaxNewAspectRatiosExcluded,\r\n } = serverContext.DynamicPermissions || {};\r\n\r\n const isPMaxNewAspectRatios = isPMaxNewAspectRatiosEnabled && !isPMaxNewAspectRatiosExcluded;\r\n\r\n const { aid, cid } = scope.values;\r\n\r\n const oDataConfig = useMemo(() => getODataConfig(serverContext), [serverContext]);\r\n\r\n const videoRepository = createVideoRepository({\r\n oDataConfig,\r\n aid,\r\n cid,\r\n });\r\n\r\n const folderRepository = createFolderRepository({\r\n i18n,\r\n logger,\r\n oDataConfig,\r\n aid,\r\n cid,\r\n });\r\n\r\n const imageRepository = createImageRepository({\r\n oDataConfig,\r\n aid,\r\n cid,\r\n logger,\r\n i18n,\r\n activity,\r\n });\r\n\r\n const uploadVideoIfNeeded = useCallback(({ assetGroup }) => {\r\n const videoPromises = [];\r\n\r\n if (!assetGroup.videos) {\r\n return Promise.resolve(assetGroup);\r\n }\r\n\r\n // check for videos in the assetGroup that dont have an id.\r\n assetGroup.videos.forEach((video) => {\r\n if (!video.id) {\r\n videoPromises.push(uploadVideoMetadata({\r\n videoMetadata: video,\r\n newVideoFromMTObject,\r\n folderRepository,\r\n imageRepository,\r\n videoRepository,\r\n }).then((newVideo) => {\r\n _.extend(video, newVideo);\r\n }));\r\n }\r\n });\r\n\r\n if (_.isEmpty(videoPromises)) {\r\n return Promise.resolve(assetGroup);\r\n }\r\n\r\n return Promise.all(videoPromises).then(() => assetGroup).catch(((err) => {\r\n activity.trace('[PmaxNorthStarWizard] - Error uploading video metadata', { ...err });\r\n\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n serverErrors: [i18n.getString(GENERIC_ERROR_MESSAGE_KEY)],\r\n });\r\n }));\r\n }, [folderRepository, imageRepository, videoRepository, activity, i18n]);\r\n\r\n const load = useCallback(() => {\r\n const { assetGroup: savedAssetGroup, campaign: savedCampaign } = state.context.wizardData;\r\n\r\n if (isPMaxNewAspectRatios) {\r\n activity.trace('[PmaxNorthStarWizard] - New Aspect Ratios is enabled');\r\n }\r\n\r\n const saveCampaignsPromise = savedCampaign\r\n ? Promise.resolve(savedCampaign)\r\n : createDefaultCampaign({\r\n i18n,\r\n serverContext,\r\n scenarioContext,\r\n }).then((result) => {\r\n const { campaign } = result;\r\n\r\n activity.trace('[PmaxNorthStarWizard] - Default Campaign saved');\r\n activity.signal(`[PmaxNorthStarWizard] - Default Campaign saved, campaignId: ${campaign.data.Id}`);\r\n\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { campaign: result.campaign.data });\r\n\r\n return result.campaign.data;\r\n }).catch((errorData) => {\r\n activity.trace('[PmaxNorthStarWizard] - Default Campaign creation failed', { ...errorData });\r\n\r\n handleDefaultCampaignCreationError({ i18n, scope, errorData });\r\n\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({ ...errorData });\r\n });\r\n\r\n const savedAssetGroupPromise = savedAssetGroup ? Promise.resolve(savedAssetGroup) : Promise.resolve(getDefaultAssetGroup({ i18n }));\r\n\r\n return Promise.props({ campaign: saveCampaignsPromise, assetGroup: savedAssetGroupPromise }).then(({ campaign, assetGroup }) => ({\r\n campaign,\r\n assetGroup,\r\n })).catch((errorData) => {\r\n activity.trace(`[PmaxNorthStarWizard] loadData failed. Error: ${errorData}`);\r\n\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n error: {\r\n ...errorData,\r\n },\r\n });\r\n });\r\n }, [activity, i18n, isPMaxNewAspectRatios, scenarioContext, scope, send, serverContext, state.context.wizardData]);\r\n\r\n const save = useCallback(({\r\n data,\r\n initialData,\r\n }) => {\r\n const savedCampaign = state.context.wizardData.campaign;\r\n\r\n const { assetGroup: assetGroupToSave } = data;\r\n\r\n const { assetGroup: initialAssetGroup } = initialData;\r\n\r\n if (isPMaxNewAspectRatios) {\r\n activity.trace('[PmaxNorthStarWizard] - New Aspect Ratios is enabled');\r\n }\r\n\r\n const saveCampaignsPromise = savedCampaign\r\n ? Promise.resolve({\r\n campaign: {\r\n data: savedCampaign,\r\n },\r\n }) :\r\n createDefaultCampaign({\r\n i18n,\r\n serverContext,\r\n scenarioContext,\r\n });\r\n\r\n return saveCampaignsPromise.then((result) => {\r\n const { campaign } = result;\r\n\r\n activity.trace('[PmaxNorthStarWizard] - Default Campaign saved');\r\n activity.signal(`[PmaxNorthStarWizard] - Default Campaign saved, campaignId: ${campaign.data.Id}`);\r\n\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { campaign: result.campaign.data });\r\n\r\n return {\r\n campaign: result.campaign.data,\r\n };\r\n }).then((result) => {\r\n const assetGroupChanges = {\r\n assetGroup: {\r\n data: assetGroupToSave,\r\n },\r\n originalAssetGroup: {\r\n data: initialAssetGroup,\r\n },\r\n campaign: result.campaign,\r\n };\r\n\r\n const saveContext = {\r\n scenario: scenarioContext.name,\r\n activity,\r\n activityLogger: scenarioContext.createActivity('saveAssets'),\r\n i18n,\r\n serverContext,\r\n cid,\r\n aid,\r\n };\r\n\r\n return Promise.props({\r\n campaign: Promise.resolve(result.campaign),\r\n savedAssetGroup: uploadVideoIfNeeded({ assetGroup: assetGroupToSave })\r\n .then(() => saveAssetGroupAndLinkedData(assetGroupChanges, saveContext)),\r\n });\r\n }).then((result) => {\r\n const { savedAssetGroup } = result;\r\n\r\n activity.trace(`[PmaxWizard] saveData succeeded. Assets count: ${result}`);\r\n\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { assetGroup: savedAssetGroup.assetGroup.data });\r\n\r\n logCopilotRecommendations({\r\n recommendationContext,\r\n assetGroup: savedAssetGroup.assetGroup.data,\r\n campaignId: result.campaign.Id,\r\n });\r\n\r\n return {\r\n campaign: result.campaign,\r\n assetGroup: savedAssetGroup.assetGroup.data,\r\n };\r\n }).catch((errorData) => {\r\n activity.trace(`[PmaxWizard] saveData failed. Error: ${errorData}`);\r\n\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n error: {\r\n ...errorData,\r\n },\r\n });\r\n });\r\n }, [activity, aid, cid, i18n, recommendationContext, uploadVideoIfNeeded, scenarioContext, send, serverContext, state.context.wizardData.campaign]);\r\n\r\n return {\r\n load,\r\n save,\r\n };\r\n};\r\n","import { useCallback, useContext, useMemo } from 'react';\r\nimport Promise from 'bluebird';\r\nimport { useWizardService, WIZARD_EVENTS } from '@bingads-webui-react/wizard';\r\nimport { ScenarioContext, ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { saveCampaignAndLinkedData, initialBrandExclusionsViewModel, saveAssetGroupAndLinkedData } from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport { getStoreQueriesWithLocalMock } from '@bingads-webui-campaign-react/merchant-shared';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { createDefaultCampaign, handleDefaultCampaignCreationError } from '../../shared/model/create-default-campaign';\r\nimport { getDefaultAssetGroup } from '../../shared/model/default-data';\r\n\r\nexport const useProductsStepRepository = () => {\r\n const { state, send } = useWizardService();\r\n\r\n const scenarioContext = useContext(ScenarioContext);\r\n\r\n const i18n = useContext(I18nContext);\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const { scope } = useContext(ScopeContext) || {};\r\n\r\n const { cid, aid } = scope.values;\r\n\r\n const serverContext = useContext(ServerContext);\r\n\r\n const storeQueries = useMemo(() => getStoreQueriesWithLocalMock(), []);\r\n\r\n const load = useCallback(() => {\r\n const {\r\n providerId,\r\n salesCountry,\r\n localInventory,\r\n isFeedFiltered,\r\n feedLabel,\r\n campaign: savedCampaign,\r\n assetGroup: savedAssetGroup,\r\n } = state.context.wizardData;\r\n\r\n const saveCampaignsPromise = savedCampaign\r\n ? Promise.resolve(savedCampaign)\r\n : createDefaultCampaign({\r\n i18n,\r\n serverContext,\r\n scenarioContext,\r\n providerId,\r\n salesCountry,\r\n localInventory,\r\n isFeedFiltered,\r\n feedLabel,\r\n }).then((result) => {\r\n const { campaign } = result;\r\n\r\n activity.trace('[PmaxNorthStarWizard] - Default Campaign saved');\r\n activity.signal(`[PmaxNorthStarWizard] - Default Campaign saved, campaignId: ${campaign.data.Id}`);\r\n\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { campaign: result.campaign.data });\r\n\r\n return result.campaign.data;\r\n }).catch((errorData) => {\r\n activity.trace('[PmaxNorthStarWizard] - Default Campaign creation failed', { ...errorData });\r\n\r\n handleDefaultCampaignCreationError({ i18n, scope, errorData });\r\n\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({ ...errorData });\r\n });\r\n\r\n const getStoreInfoPromise = storeQueries.getStore(providerId, true);\r\n\r\n const savedAssetGroupsPromise = savedAssetGroup ?\r\n Promise.resolve(savedAssetGroup) :\r\n getStoreInfoPromise.then((storeInfo) => {\r\n const assetGroup = getDefaultAssetGroup({\r\n businessName: storeInfo && storeInfo.Name,\r\n i18n,\r\n storeFinalUrl: storeInfo && storeInfo.DestinationUrl,\r\n });\r\n\r\n return assetGroup;\r\n });\r\n\r\n const promises = {\r\n campaign: saveCampaignsPromise,\r\n assetGroup: savedAssetGroupsPromise,\r\n };\r\n\r\n return Promise.props(promises).then(({ campaign, assetGroup }) => ({\r\n campaign,\r\n assetGroup,\r\n })).catch((errorData) => {\r\n activity.trace('[PmaxNorthStarWizard] - Default Campaign save failed');\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n error: {\r\n ...errorData,\r\n },\r\n });\r\n });\r\n }, [activity, i18n, scenarioContext, scope, send, serverContext, state.context.wizardData, storeQueries]);\r\n\r\n const save = useCallback(({\r\n data,\r\n initialData,\r\n }) => {\r\n const {\r\n campaign: campaignToSave, assetGroup: assetGroupToSave,\r\n } = data;\r\n\r\n const { assetGroup: savedAssetGroup } = state.context.wizardData;\r\n\r\n const { campaign: initialCampaign, assetGroup: initialAssetGroup } = initialData;\r\n\r\n const saveCampaignPromise = saveCampaignAndLinkedData({\r\n campaign: { data: campaignToSave },\r\n originalCampaign: { data: initialCampaign },\r\n brandExclusions: initialBrandExclusionsViewModel,\r\n }, {\r\n scenario: scenarioContext.name,\r\n i18n,\r\n activityLogger: scenarioContext.createActivity('saveDefaultCampaign'),\r\n });\r\n\r\n const saveAssetGroupPromise = savedAssetGroup ? saveAssetGroupAndLinkedData({\r\n assetGroup: { data: assetGroupToSave },\r\n originalAssetGroup: { data: initialAssetGroup },\r\n campaign: campaignToSave,\r\n }, {\r\n scenario: scenarioContext.name,\r\n i18n,\r\n activityLogger: scenarioContext.createActivity('updateAssetGroup'),\r\n serverContext,\r\n cid,\r\n aid,\r\n activity,\r\n }) : Promise.resolve({ assetGroup: { data: assetGroupToSave } });\r\n\r\n return Promise.props({\r\n campaign: saveCampaignPromise,\r\n assetGroup: saveAssetGroupPromise,\r\n }).then(({\r\n campaign: campaignResults,\r\n assetGroup: assetGroupResults,\r\n }) => {\r\n activity.trace('[PmaxNorthStarWizard] - campaign/assetgroup settings updated in product step');\r\n activity.signal('[PmaxNorthStarWizard] - campaign/assetgroup settings updated in product step');\r\n\r\n const {\r\n campaign,\r\n } = campaignResults;\r\n\r\n const {\r\n assetGroup,\r\n } = assetGroupResults;\r\n\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, {\r\n campaign: campaign.data,\r\n assetGroup: assetGroup.data,\r\n savedProductFilter: assetGroupToSave.productFilter,\r\n savedListingGroup: assetGroupToSave.listingGroup,\r\n });\r\n\r\n return {\r\n campaign: campaign.data,\r\n assetGroup: assetGroup.data,\r\n };\r\n }).catch((errorData) => {\r\n activity.trace('[PmaxNorthStarWizard] - campaign/assetgroup settings update failed in product step');\r\n\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n error: {\r\n ...errorData,\r\n },\r\n });\r\n });\r\n }, [activity, aid, cid, i18n, scenarioContext, send, serverContext, state.context.wizardData]);\r\n\r\n return {\r\n load,\r\n save,\r\n };\r\n};\r\n","import { useCallback, useContext } from 'react';\r\nimport Promise from 'bluebird';\r\nimport {\r\n loadBundleCountries,\r\n initialBrandExclusionsViewModel,\r\n saveCampaignAndLinkedData,\r\n saveAssetGroupAndLinkedData,\r\n loadCampaign,\r\n modelToViewModelForCampaign,\r\n} from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { useWizardService, WIZARD_EVENTS } from '@bingads-webui-react/wizard';\r\nimport { ScenarioContext, ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n readLocationCriterions,\r\n} from '@bingads-webui-campaign-react/perf-max-data';\r\n\r\nexport const useTargetingStepRepository = () => {\r\n const serverContext = useContext(ServerContext);\r\n const scenarioContext = useContext(ScenarioContext);\r\n const { scope } = useContext(ScopeContext) || {};\r\n\r\n const { cid, aid } = scope.values;\r\n\r\n const { state, send } = useWizardService();\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const i18n = useContext(I18nContext);\r\n\r\n const load = useCallback(() => {\r\n const savedCampaign = state.context.wizardData.campaign;\r\n const savedAssetGroup = state.context.wizardData.assetGroup;\r\n const { Id: campaignId } = savedCampaign || {};\r\n\r\n const loadPromises = {\r\n campaign: loadCampaign(cid, aid, campaignId),\r\n locationTargets: readLocationCriterions(cid, aid, campaignId),\r\n assetGroup: Promise.resolve(savedAssetGroup),\r\n bundleCountriesAndLocationCriterions: loadBundleCountries({\r\n cid,\r\n aid,\r\n serverContext,\r\n }),\r\n };\r\n\r\n return Promise.props(loadPromises).then(({\r\n bundleCountriesAndLocationCriterions,\r\n campaign,\r\n assetGroup,\r\n locationTargets,\r\n }) => {\r\n const campaignData = modelToViewModelForCampaign({\r\n campaignModel: { ...campaign, Status: savedCampaign.status }, // MT sends UserPaused, if we send this back they mark it as active. So we just use Paused from the saved ad model\r\n locationCriterionsModel: locationTargets ? locationTargets.value : [],\r\n bundleCountries: bundleCountriesAndLocationCriterions.bundleCountries,\r\n });\r\n\r\n return ({\r\n ...bundleCountriesAndLocationCriterions,\r\n campaign: campaignData.data,\r\n assetGroup,\r\n });\r\n });\r\n }, [aid, cid, serverContext, state.context.wizardData.assetGroup, state.context.wizardData.campaign]);\r\n\r\n const save = useCallback(({\r\n data,\r\n initialData,\r\n }) => {\r\n const {\r\n campaign: campaignToSave, assetGroup: assetGroupToSave, bundleCountries, bundleLocationCriterions,\r\n } = data;\r\n\r\n const { campaign: initialCampaign, assetGroup: initialAssetGroup } = initialData;\r\n\r\n const savePromises = {\r\n campaign: saveCampaignAndLinkedData({\r\n campaign: { data: campaignToSave },\r\n originalCampaign: { data: initialCampaign },\r\n brandExclusions: initialBrandExclusionsViewModel,\r\n bundleCountries,\r\n bundleLocationCriterions,\r\n }, {\r\n scenario: scenarioContext.name,\r\n i18n,\r\n activityLogger: scenarioContext.createActivity('updateCampaign'),\r\n }),\r\n assetGroup: saveAssetGroupAndLinkedData({\r\n assetGroup: { data: assetGroupToSave },\r\n originalAssetGroup: { data: initialAssetGroup },\r\n campaign: campaignToSave,\r\n }, {\r\n scenario: scenarioContext.name,\r\n i18n,\r\n activityLogger: scenarioContext.createActivity('updateAssetGroup'),\r\n serverContext,\r\n cid,\r\n aid,\r\n activity,\r\n }),\r\n };\r\n\r\n return Promise.props(savePromises).then(({\r\n campaign: campaignResults,\r\n assetGroup: assetGroupResults,\r\n }) => {\r\n activity.trace('[PmaxNorthStarWizard] - campaign/assetgroup settings updated in targeting step');\r\n activity.signal('[PmaxNorthStarWizard] - campaign/assetgroup settings updated in targeting step');\r\n\r\n const {\r\n campaign,\r\n } = campaignResults;\r\n\r\n const {\r\n assetGroup,\r\n } = assetGroupResults;\r\n\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { campaign: campaign.data });\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { assetGroup: assetGroup.data });\r\n\r\n return {\r\n campaign: campaign.data,\r\n assetGroup: assetGroup.data,\r\n };\r\n }).catch((errorData) => {\r\n activity.trace('[PmaxNorthStarWizard] - campaign/assetgroup settings update failed in targeting step');\r\n\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n error: {\r\n ...errorData,\r\n },\r\n });\r\n });\r\n }, [activity, aid, cid, i18n, scenarioContext, send, serverContext]);\r\n\r\n return {\r\n load,\r\n save,\r\n };\r\n};\r\n","import { useCallback, useContext } from 'react';\r\nimport Promise from 'bluebird';\r\nimport { useWizardService, WIZARD_EVENTS } from '@bingads-webui-react/wizard';\r\nimport {\r\n initialBrandExclusionsViewModel,\r\n loadCampaign,\r\n loadBundleCountries,\r\n saveCampaignAndLinkedData,\r\n modelToViewModelForCampaign,\r\n} from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport { ScenarioContext, ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n readLocationCriterions,\r\n readCampaignNegativeWebpages,\r\n readDayTimeCriterions,\r\n} from '@bingads-webui-campaign-react/perf-max-data';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { viewModelToBulkModelForDisclaimerAssociation } from '@bingads-webui-campaign-react/ads-campaign-disclaimers';\r\n\r\nexport const useCampaignDetailsStepRepository = () => {\r\n const { state, send } = useWizardService();\r\n const serverContext = useContext(ServerContext);\r\n const scenarioContext = useContext(ScenarioContext);\r\n const activity = useContext(ActivityContext);\r\n const i18n = useContext(I18nContext);\r\n const { scope } = useContext(ScopeContext) || {};\r\n const { cid, aid } = scope.values;\r\n\r\n const load = useCallback(() => {\r\n const savedCampaign = state.context.wizardData.campaign;\r\n const { Id: campaignId } = savedCampaign || {};\r\n\r\n const savedBrandExclusions = state.context.wizardData.brandExclusions;\r\n const BrandExclusionsViewModel = savedBrandExclusions\r\n ? { data: savedBrandExclusions, isDirty: false, isValid: true }\r\n : initialBrandExclusionsViewModel;\r\n\r\n const loadPromises = {\r\n campaign: loadCampaign(cid, aid, campaignId), // This is necessary to read ['Budget', 'CampaignConversionGoal/Goals'] from MT as the original model doesn't come with it\r\n locationTargets: readLocationCriterions(cid, aid, campaignId),\r\n bundleCountriesAndLocationCriterions: loadBundleCountries({\r\n cid,\r\n aid,\r\n serverContext,\r\n }),\r\n dayTimeCriterions: readDayTimeCriterions(cid, aid, campaignId),\r\n campaignNegativeWebpages: readCampaignNegativeWebpages(cid, aid, campaignId),\r\n brandExclusions: Promise.resolve(BrandExclusionsViewModel),\r\n };\r\n\r\n return Promise.props(loadPromises).then(({\r\n campaign,\r\n locationTargets,\r\n bundleCountriesAndLocationCriterions,\r\n dayTimeCriterions,\r\n campaignNegativeWebpages,\r\n brandExclusions,\r\n }) => {\r\n const campaignData = modelToViewModelForCampaign({\r\n campaignModel: { ...campaign, Status: savedCampaign.status }, // MT sends UserPaused, if we send this back they mark it as active. So we just use Paused from the saved ad model\r\n locationCriterionsModel: locationTargets ? locationTargets.value : [],\r\n dayTimeCriterionsModel: dayTimeCriterions ? dayTimeCriterions.value : [],\r\n campaignNegativeWebpagesModel: campaignNegativeWebpages ? campaignNegativeWebpages.value : [],\r\n bundleCountries: bundleCountriesAndLocationCriterions.bundleCountries,\r\n });\r\n\r\n return {\r\n campaign: campaignData.data,\r\n brandExclusions: brandExclusions.data,\r\n ...bundleCountriesAndLocationCriterions,\r\n };\r\n }).catch((errorData) => {\r\n activity.trace(`[PmaxNorthStarWizard] loadData failed. Error: ${errorData}`);\r\n\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n error: {\r\n ...errorData,\r\n },\r\n });\r\n });\r\n }, [activity, aid, cid, serverContext, state.context.wizardData.brandExclusions, state.context.wizardData.campaign]);\r\n\r\n const save = useCallback(({\r\n data,\r\n initialData,\r\n }) => {\r\n const {\r\n campaign: campaignToSave,\r\n bundleCountries,\r\n bundleLocationCriterions,\r\n brandExclusions: brandExclusionsToSave,\r\n } = data;\r\n\r\n const { campaign: initialCampaign } = initialData;\r\n\r\n const { locationTargets: savedLocationTargets } = campaignToSave;\r\n\r\n const savePromises = {\r\n campaign: saveCampaignAndLinkedData({\r\n campaign: { data: campaignToSave },\r\n originalCampaign: { data: initialCampaign },\r\n brandExclusions: { data: brandExclusionsToSave },\r\n bundleCountries,\r\n bundleLocationCriterions,\r\n viewModelToBulkModelForDisclaimerAssociation, // Pass in the disclaimer association model\r\n }, {\r\n scenario: scenarioContext.name,\r\n i18n,\r\n activityLogger: scenarioContext.createActivity('updateCampaign'),\r\n }),\r\n };\r\n\r\n return Promise.props(savePromises).then(({\r\n campaign: campaignResults,\r\n }) => {\r\n activity.trace('[PmaxNorthStarWizard] - campaign settings updated in campaign details step');\r\n activity.signal('[PmaxNorthStarWizard] - campaign settings updated in campaign details step');\r\n\r\n const { campaign, brandExclusions } = campaignResults;\r\n\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { campaign: { ...campaign.data, locationTargets: savedLocationTargets }, brandExclusions: brandExclusions.data });\r\n\r\n return {\r\n campaign: { ...campaign.data, locationTargets: savedLocationTargets },\r\n brandExclusions: brandExclusions.data,\r\n bundleLocationCriterions,\r\n bundleCountries,\r\n };\r\n }).catch((errorData) => {\r\n activity.trace('[PmaxNorthStarWizard] - campaign settings update failed in campaign details step');\r\n\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n error: {\r\n ...errorData,\r\n },\r\n });\r\n });\r\n }, [activity, i18n, scenarioContext, send]);\r\n\r\n return {\r\n load,\r\n save,\r\n };\r\n};\r\n","import { useCallback, useContext, useMemo, useRef } from 'react';\r\nimport Promise from 'bluebird';\r\nimport { extend } from 'underscore';\r\nimport { useWizardService } from '@bingads-webui-react/wizard';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport {\r\n readCampaignNegativeWebpages,\r\n readDayTimeCriterions,\r\n readLocationCriterions,\r\n readNewCustomerAcquisitionGoals,\r\n} from '@bingads-webui-campaign-react/perf-max-data';\r\nimport {\r\n loadCampaign,\r\n modelToViewModelForCampaign,\r\n loadBundleCountries,\r\n loadAssetGroupWithVideos,\r\n} from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { createVideoRepository } from '@bingads-webui-campaign-react/asset-library-services';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport Repository from '@bingads-webui-campaign-legacy/adextension-shared/service/repository';\r\nimport { DisclaimerAdExtension } from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport {\r\n getAssociatedDisclaimer,\r\n} from '@bingads-webui-campaign-react/display-plus-campaigns';\r\nimport { updateAssetGroupAndCampaignStatus } from '../../shared/model/update-entity-status';\r\nimport { useDiagnosticsData } from './diagnostics/use-diagnostics-data';\r\nimport { convertDiagnosticsDataToTrackingLog } from './diagnostics/utils';\r\nimport { getODataConfig } from '../../shared/components/odata-config';\r\n\r\nexport const useSummaryStepRepository = () => {\r\n const { state } = useWizardService();\r\n\r\n const { scope } = useContext(ScopeContext) || {};\r\n\r\n const serverContext = useContext(ServerContext);\r\n const activity = useContext(ActivityContext);\r\n const isSearchThemeEnabled = serverContext.DynamicPermissions.SearchThemes;\r\n const isUrlRulesEnabled = serverContext.DynamicPermissions.AssetGroupUrlRules;\r\n const isPMaxCreationDiagnosticEnabled = serverContext.DynamicPermissions.PMaxCreationDiagnostic;\r\n const isBudgetSuggestionEnabled = serverContext.DynamicPermissions.EnableBudgetSuggestion;\r\n const isNewCustomerAcquisitionEnabled = serverContext.DynamicPermissions.NewCustomerAcquisition;\r\n const { AdvertiserCustomerID: advertiserCustomerId } = serverContext.CurrentAccount || {};\r\n const isPMaxDisclaimersEnabled = !serverContext.Permissions.IsDomesticSimplifiedChineseEnabled && serverContext.DynamicPermissions.PMaxDisclaimers && serverContext.Permissions.IsMSANDisclaimerEnabled;\r\n console.log('PMaxDisclaimersEnabled:', isPMaxDisclaimersEnabled);\r\n\r\n const i18n = useContext(I18nContext);\r\n\r\n const oDataConfig = useMemo(() => getODataConfig(serverContext), [serverContext]);\r\n const { cid, aid } = scope.values;\r\n\r\n const videoRepository = createVideoRepository({\r\n oDataConfig,\r\n aid,\r\n cid,\r\n });\r\n\r\n const disclaimerRepositoryRef = useRef(new Repository({\r\n schema: DisclaimerAdExtension,\r\n skipExtensionCache: true,\r\n }));\r\n\r\n\r\n const {\r\n campaign: savedCampaign,\r\n assetGroup: savedAssetGroup,\r\n diagnostics: savedDiagnostics,\r\n isPublishing,\r\n } = state.context.wizardData;\r\n\r\n const { fetchDiagnosticData, patchDiagnosticsData } = useDiagnosticsData({\r\n advertiserCustomerId,\r\n aid,\r\n campaignId: savedCampaign.Id,\r\n serverContext,\r\n });\r\n\r\n const load = useCallback(() => {\r\n const { Id: campaignId } = savedCampaign || {};\r\n\r\n const { Id: assetGroupId } = savedAssetGroup || {};\r\n\r\n const loadPromises = {\r\n campaign: loadCampaign(cid, aid, campaignId),\r\n locationTargets: readLocationCriterions(cid, aid, campaignId),\r\n bundleCountriesAndLocationCriterions: loadBundleCountries({\r\n cid,\r\n aid,\r\n serverContext,\r\n }),\r\n dayTimeCriterions: readDayTimeCriterions(cid, aid, campaignId),\r\n campaignNegativeWebpages: readCampaignNegativeWebpages(cid, aid, campaignId),\r\n assetGroup: loadAssetGroupWithVideos(cid, aid, campaignId, assetGroupId, i18n, isSearchThemeEnabled, isUrlRulesEnabled, videoRepository),\r\n ...(isPMaxCreationDiagnosticEnabled && { diagnostics: fetchDiagnosticData() }),\r\n ...(isNewCustomerAcquisitionEnabled && { newCustomerAcquisitionGoals: readNewCustomerAcquisitionGoals(cid, aid) }),\r\n ...(isPMaxDisclaimersEnabled && {\r\n disclaimer: getAssociatedDisclaimer(campaignId, disclaimerRepositoryRef.current),\r\n }),\r\n };\r\n\r\n return Promise.props(loadPromises).then(({\r\n campaign,\r\n locationTargets,\r\n bundleCountriesAndLocationCriterions,\r\n dayTimeCriterions,\r\n campaignNegativeWebpages,\r\n assetGroup,\r\n diagnostics,\r\n newCustomerAcquisitionGoals,\r\n disclaimer,\r\n }) => {\r\n const campaignData = modelToViewModelForCampaign({\r\n campaignModel: campaign,\r\n locationCriterionsModel: locationTargets ? locationTargets.value : [],\r\n dayTimeCriterionsModel: dayTimeCriterions ? dayTimeCriterions.value : [],\r\n campaignNegativeWebpagesModel: campaignNegativeWebpages ? campaignNegativeWebpages.value : [],\r\n bundleCountries: bundleCountriesAndLocationCriterions.bundleCountries,\r\n ...(isNewCustomerAcquisitionEnabled && { newCustomerAcquisitionGoalsModel: newCustomerAcquisitionGoals ? newCustomerAcquisitionGoals.value : [] }),\r\n });\r\n\r\n let data = {\r\n campaign: campaignData.data,\r\n assetGroup: assetGroup.data,\r\n };\r\n\r\n if (isPMaxCreationDiagnosticEnabled && diagnostics) {\r\n const budgetSuggestionData = isBudgetSuggestionEnabled ? savedDiagnostics.budgetSuggestionData : null;\r\n data = extend(data, {\r\n diagnosticsData: patchDiagnosticsData({\r\n diagnosticsData: diagnostics,\r\n campaignData: campaignData.data,\r\n budgetSuggestionData,\r\n }),\r\n });\r\n if (data.diagnosticsData.length > 0) {\r\n setClarityTag({ isPMaxDiagnostic: true });\r\n }\r\n activity.trace(`[PmaxNorthStarWizard][SummaryStep][Checks] ${convertDiagnosticsDataToTrackingLog(data.diagnosticsData)}`);\r\n }\r\n\r\n if (isPMaxDisclaimersEnabled && disclaimer) {\r\n data = extend(data, {\r\n disclaimer: {\r\n Name: disclaimer.Name,\r\n },\r\n });\r\n }\r\n\r\n return data;\r\n }).catch((errorData) => {\r\n activity.trace(`[PmaxNorthStarWizard][SummaryStep] loadData failed. Error: ${errorData}`);\r\n\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n error: {\r\n ...errorData,\r\n },\r\n });\r\n });\r\n }, [activity, aid, cid, fetchDiagnosticData, i18n, isBudgetSuggestionEnabled, isNewCustomerAcquisitionEnabled, isPMaxCreationDiagnosticEnabled, isSearchThemeEnabled, isUrlRulesEnabled, patchDiagnosticsData, savedAssetGroup, savedCampaign, savedDiagnostics.budgetSuggestionData, serverContext, isPMaxDisclaimersEnabled]);\r\n\r\n const save = useCallback(({ data }) => {\r\n const { Id: campaignId } = savedCampaign || {};\r\n const { Id: assetGroupId } = savedAssetGroup || {};\r\n\r\n if (isPublishing) {\r\n return updateAssetGroupAndCampaignStatus({ campaignId, assetGroupId }).then(() => ({\r\n campaign: data.campaign,\r\n assetGroup: data.assetGroup,\r\n })).catch(errorData => (\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n Promise.reject({ error: { ...errorData } })));\r\n }\r\n\r\n // no update necessary if not publishing.\r\n return Promise.resolve({\r\n campaign: data.campaign,\r\n assetGroup: data.assetGroup,\r\n });\r\n }, [isPublishing, savedAssetGroup, savedCampaign]);\r\n\r\n return {\r\n load,\r\n save,\r\n };\r\n};\r\n","import _ from 'underscore';\r\nimport React, { useMemo, useCallback, useContext } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Constants } from '@bingads-webui-theme-2018/theme-fluent';\r\nimport { ResponsiveStepList } from '@bingads-webui-react/step-progress-indicator';\r\nimport { useResponsiveSize } from '@bingads-webui-react/with-responsive-size';\r\nimport {\r\n useWizardService,\r\n getCurrentStepId,\r\n getCurrentFlow,\r\n WIZARD_EVENTS,\r\n} from '@bingads-webui-react/wizard';\r\n\r\nimport { getStepListConfig } from './step-config';\r\n\r\nexport const StepList = () => {\r\n const { state, send } = useWizardService();\r\n const i18n = useContext(I18nContext);\r\n\r\n const currentStepId = getCurrentStepId(state);\r\n const currentFlow = getCurrentFlow(state);\r\n const displayMode = useResponsiveSize(Constants.ResponsiveSizeBreakpoints);\r\n const { flow } = state.context.wizardData;\r\n\r\n const stepListConfig = useMemo(() => getStepListConfig({ i18n, flow, currentStepId }), [currentStepId, flow, i18n]);\r\n\r\n const getDefaultOnItemClickFn = useCallback((step) => {\r\n let toStep;\r\n if (currentFlow.includes(step.id)) {\r\n toStep = step;\r\n } else if (!_.isEmpty(step.steps)) {\r\n const firstSubStep = _.find(step.steps, s => currentFlow.includes(s.id));\r\n if (firstSubStep) {\r\n toStep = firstSubStep;\r\n }\r\n }\r\n if (toStep && toStep.isBehind) {\r\n return () => {\r\n send(WIZARD_EVENTS.NAVIGATE_TO, {\r\n stepId: toStep.id,\r\n });\r\n };\r\n }\r\n return undefined;\r\n }, [currentFlow, send]);\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\n","import React, { useContext, useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Stack, PrimaryButton, DefaultButton } from '@bingads-webui-react/fluent-controls';\r\nimport {\r\n useWizardService,\r\n getIsFirstStep,\r\n getIsLastStep,\r\n getCurrentStepId,\r\n matchStepState,\r\n STEP_STATES,\r\n WIZARD_EVENTS,\r\n} from '@bingads-webui-react/wizard';\r\nimport { CancelButton } from '@bingads-webui-react/wizard-ui-library';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { STEP_PATHS, FLOWS } from './step-constants';\r\n\r\nconst SaveAndPublish = ({ saveButtonText }) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const { state, send } = useWizardService();\r\n const isBlocking = matchStepState(state, STEP_STATES.FETCHING) || matchStepState(state, STEP_STATES.LOADING) || matchStepState(state, STEP_STATES.SAVING);\r\n\r\n const onNextClicked = useCallback(() => {\r\n if (activity) {\r\n activity.signal('onSaveAndPublishClicked');\r\n }\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { isPublishing: true });\r\n send(WIZARD_EVENTS.SAVE_AND_EXIT);\r\n }, [activity, send]);\r\n\r\n const buttonText = useMemo(() => {\r\n const currentStep = getCurrentStepId(state);\r\n\r\n if (currentStep === STEP_PATHS.SUMMARY) {\r\n return i18n.getString(_TL_('Go live'));\r\n }\r\n\r\n if (currentStep === STEP_PATHS.CAMPAIGNSETTING && saveButtonText) {\r\n return i18n.getString(saveButtonText);\r\n }\r\n\r\n if (currentStep === STEP_PATHS.ASSETGROUPSETTING) {\r\n return i18n.getString(_TL_('Save'));\r\n }\r\n return i18n.getString(_TL_('Save & go live'));\r\n }, [i18n, saveButtonText, state]);\r\n\r\n return (\r\n \r\n {buttonText}\r\n \r\n );\r\n};\r\nSaveAndPublish.propTypes = {\r\n saveButtonText: PropTypes.string,\r\n};\r\nSaveAndPublish.defaultProps = {\r\n saveButtonText: undefined,\r\n};\r\n\r\nconst SaveAsDraft = () => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const { state, send } = useWizardService();\r\n const isBlocking = matchStepState(state, STEP_STATES.FETCHING) || matchStepState(state, STEP_STATES.LOADING) || matchStepState(state, STEP_STATES.SAVING);\r\n\r\n const onNextClicked = useCallback(() => {\r\n if (activity) {\r\n activity.signal('onSaveAsDraftClicked');\r\n }\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { isPublishing: false });\r\n send(WIZARD_EVENTS.SAVE_AND_EXIT);\r\n }, [activity, send]);\r\n\r\n const buttonText = useMemo(() => {\r\n const currentStep = getCurrentStepId(state);\r\n\r\n if (currentStep === STEP_PATHS.SUMMARY) {\r\n return i18n.getString(_TL_('Don\\'t go live'));\r\n }\r\n\r\n return i18n.getString(_TL_('Save & don\\'t go live'));\r\n }, [i18n, state]);\r\n\r\n return (\r\n \r\n {buttonText}\r\n \r\n );\r\n};\r\n\r\nexport const NextButton = ({ buttonText, disabled }) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const { state, send } = useWizardService();\r\n const isBlocking = matchStepState(state, STEP_STATES.FETCHING) || matchStepState(state, STEP_STATES.LOADING) || matchStepState(state, STEP_STATES.SAVING);\r\n const currentStepId = getCurrentStepId(state);\r\n\r\n const onNextClicked = useCallback(() => {\r\n if (currentStepId === STEP_PATHS.MULTI_AD_MANAGER) {\r\n send(WIZARD_EVENTS.NAVIGATE_TO, { stepId: STEP_PATHS.AD_GROUP });\r\n } else {\r\n send(WIZARD_EVENTS.SAVE_AND_NEXT);\r\n }\r\n }, [currentStepId, send]);\r\n\r\n return (\r\n \r\n {buttonText ? i18n.getString(buttonText) : i18n.getString(_TL_('Next'))}\r\n \r\n );\r\n};\r\n\r\nexport const BackButton = ({ buttonText }) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const { state, send } = useWizardService();\r\n const isBlocking = matchStepState(state, STEP_STATES.FETCHING) || matchStepState(state, STEP_STATES.LOADING) || matchStepState(state, STEP_STATES.SAVING);\r\n const currentStepId = getCurrentStepId(state);\r\n\r\n const onBackClicked = useCallback(() => {\r\n if (currentStepId === STEP_PATHS.AD_GROUP && state.context.wizardData.flow === FLOWS.MULTI_AUDIENCE_CAMPAIGNS) {\r\n send(WIZARD_EVENTS.NAVIGATE_TO, { stepId: STEP_PATHS.MULTI_AD_MANAGER });\r\n } else {\r\n send(WIZARD_EVENTS.BACK);\r\n }\r\n }, [currentStepId, send, state.context.wizardData.flow]);\r\n\r\n return (\r\n \r\n {buttonText ? i18n.getString(buttonText) : i18n.getString(_TL_('Back'))}\r\n \r\n );\r\n};\r\nBackButton.propTypes = {\r\n buttonText: PropTypes.string,\r\n};\r\nBackButton.defaultProps = {\r\n buttonText: undefined,\r\n};\r\n\r\n\r\nNextButton.propTypes = {\r\n buttonText: PropTypes.string,\r\n disabled: PropTypes.bool,\r\n};\r\nNextButton.defaultProps = {\r\n buttonText: undefined,\r\n disabled: false,\r\n};\r\n\r\nexport const PerfMaxStepFooter = ({\r\n nextButtonText,\r\n nextDisabled,\r\n backButtonText,\r\n cancelButtonText,\r\n hideBackButton,\r\n}) => {\r\n const { state } = useWizardService();\r\n const isFirstStep = getIsFirstStep(state);\r\n const isLastStep = getIsLastStep(state);\r\n\r\n return (\r\n \r\n {(!isFirstStep && !hideBackButton) && }\r\n {(!isLastStep ? : )}\r\n {isLastStep && }\r\n {isFirstStep && }\r\n \r\n );\r\n};\r\nPerfMaxStepFooter.propTypes = {\r\n nextButtonText: PropTypes.string,\r\n nextDisabled: PropTypes.bool,\r\n backButtonText: PropTypes.string,\r\n cancelButtonText: PropTypes.string,\r\n hideBackButton: PropTypes.bool,\r\n};\r\nPerfMaxStepFooter.defaultProps = {\r\n nextButtonText: undefined,\r\n nextDisabled: false,\r\n backButtonText: undefined,\r\n cancelButtonText: undefined,\r\n hideBackButton: false,\r\n};\r\n\r\nexport const PerfMaxSettingStepFooter = ({\r\n cancelButtonText,\r\n}) => (\r\n \r\n \r\n \r\n \r\n);\r\nPerfMaxSettingStepFooter.propTypes = {\r\n cancelButtonText: PropTypes.string,\r\n};\r\nPerfMaxSettingStepFooter.defaultProps = {\r\n cancelButtonText: undefined,\r\n};\r\n","import { useContext, useEffect, useCallback, useRef } from 'react';\r\nimport _ from 'underscore';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { useWizardService, STEP_STATES } from '@bingads-webui-react/wizard';\r\nimport { STEP_PATHS } from '../../steps';\r\n\r\nconst STATES_TO_LOG = [\r\n STEP_STATES.LOADING,\r\n STEP_STATES.ACTIVE,\r\n STEP_STATES.SAVING,\r\n STEP_STATES.GOING_NEXT,\r\n STEP_STATES.GOING_BACK,\r\n STEP_STATES.DONE,\r\n];\r\n\r\nexport const WizardLogger = () => {\r\n const activity = useContext(ActivityContext) || _.noop;\r\n\r\n const stepTime = useRef({\r\n loadStart: 0,\r\n loadEnd: 0,\r\n saveStart: 0,\r\n saveEnd: 0,\r\n });\r\n\r\n const wizardTime = useRef({\r\n start: 0,\r\n end: 0,\r\n });\r\n\r\n const { state } = useWizardService();\r\n\r\n const currentStep = state.toStrings()[0];\r\n\r\n const logStepStates = useCallback(() => {\r\n // 0 index has the step name\r\n // 1 index has the step state.\r\n const stepState = state.toStrings()[1].split('.')[1];\r\n if (STATES_TO_LOG.includes(stepState)) {\r\n activity.trace(`[PmaxNorthStarWizard] - ${state.toStrings()[0]} ${state.toStrings()[1]}`);\r\n activity.signal(`[PmaxNorthStarWizard] - ${state.toStrings()[0]} ${state.toStrings()[1]}`);\r\n }\r\n\r\n if (stepState === STEP_STATES.LOADING) {\r\n stepTime.current.loadStart = Date.now();\r\n }\r\n\r\n if (stepState === STEP_STATES.ACTIVE) {\r\n stepTime.current.loadEnd = Date.now();\r\n stepTime.current.saveStart = Date.now();\r\n activity.signal(`[PmaxNorthStarWizard] - ${state.toStrings()[0]} loaded in ${stepTime.current.loadEnd - stepTime.current.loadStart}ms`);\r\n }\r\n\r\n if (stepState === STEP_STATES.SAVING) {\r\n stepTime.current.saveEnd = Date.now();\r\n activity.signal(`[PmaxNorthStarWizard] - ${state.toStrings()[0]} saved in ${stepTime.current.saveEnd - stepTime.current.saveStart}ms`);\r\n }\r\n }, [activity, state]);\r\n\r\n useEffect(() => {\r\n logStepStates();\r\n }, [logStepStates]);\r\n\r\n useEffect(() => {\r\n // mark wizard start time.\r\n if (wizardTime.current.start === 0) {\r\n wizardTime.current.start = Date.now();\r\n }\r\n\r\n return () => {\r\n // mark wizard end time.\r\n if (currentStep === STEP_PATHS.SUMMARY) {\r\n wizardTime.current.end = Date.now();\r\n activity.signal(`[PmaxNorthStarWizard] - Wizard exited in ${wizardTime.current.end - wizardTime.current.start}ms`);\r\n }\r\n };\r\n }, [activity, currentStep]);\r\n\r\n return null;\r\n};\r\n","import React, { useMemo, useContext, useEffect, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport Promise from 'bluebird';\r\nimport { isUndefined } from 'underscore';\r\nimport {\r\n Wizard,\r\n LayoutContainer,\r\n Layout,\r\n StepContainer,\r\n} from '@bingads-webui-react/wizard';\r\nimport {\r\n SaveBlocker,\r\n DefaultTemplate,\r\n CancelWizardDialog,\r\n} from '@bingads-webui-react/wizard-ui-library';\r\nimport { FluentSwitcherContext } from '@bingads-webui-react/fluent-version-switcher';\r\nimport { withTheme } from 'react-jss';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport { getLocalStorage } from '@bingads-webui/storage';\r\nimport { withProps } from '@bingads-webui-react/with-props';\r\nimport { WizardPerfMarker } from '@bingads-webui-campaign/wizard-performance-marker';\r\nimport { Scenario, Activity } from '@bingads-webui-react/hoc-with-signal';\r\nimport { InstrumentationContext } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { PerformanceMarkerProvider } from '@bingads-webui-campaign-react/performance-marker-provider';\r\nimport { withScope } from '@bingads-webui-react/scope-service';\r\nimport { withRecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { withPermissions } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport { withSiteMap, getRoutePathById } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { ProgressiveLoadingBlock } from '@bingads-webui-campaign-react/shell-ui-common';\r\n\r\nimport { StepConfig, FLOWS_TO_FIRST_STEP, FLOWS, getFlow, StepList, PerfMaxStepFooter } from './steps';\r\nimport { WizardLogger } from './shared/components/wizard-logger';\r\nimport { PMAX_WIZARD_ID_NAME } from './constants';\r\n\r\nconst getCampaignObjective = (localStorage) => {\r\n let campaignObjective = config.get('CampaignObjective');\r\n let providerId = null;\r\n let salesCountry = null;\r\n let localInventory = null;\r\n let isFeedFiltered = null;\r\n let feedLabel = null;\r\n\r\n if (isUndefined(campaignObjective)) {\r\n if (localStorage.supportsStorage()) {\r\n campaignObjective = localStorage.get('CampaignObjective');\r\n config.set('CampaignObjective', campaignObjective);\r\n }\r\n }\r\n\r\n if (localStorage.supportsStorage()) {\r\n providerId = config.get('ProviderId') || localStorage.get('ProviderId');\r\n salesCountry = config.get('SalesCountry') || localStorage.get('SalesCountry');\r\n localInventory = config.get('LocalInventoryAdsEnabled') || localStorage.get('LocalInventoryAdsEnabled');\r\n isFeedFiltered = config.get('IsFeedFiltered') || localStorage.get('IsFeedFiltered');\r\n feedLabel = config.get('FeedLabel') || localStorage.get('FeedLabel');\r\n }\r\n\r\n return {\r\n campaignObjective,\r\n providerId,\r\n salesCountry,\r\n localInventory,\r\n isFeedFiltered,\r\n feedLabel,\r\n };\r\n};\r\n\r\nconst PerfMaxNorthStarWizardImpl = ({\r\n perfMarker,\r\n scope,\r\n permissions,\r\n siteMap,\r\n dynamicOptions,\r\n}) => {\r\n const instrumentation = useContext(InstrumentationContext);\r\n\r\n const wizardPerfMarker = useMemo(() => (\r\n perfMarker.createChild('PerfMaxNorthStarWizard')\r\n ), [perfMarker]);\r\n\r\n const localStorage = useMemo(() => getLocalStorage(), []);\r\n\r\n const routeToNavigateToWhenDone = useMemo(() => getRoutePathById(siteMap, 'campaigns'), [siteMap]);\r\n\r\n const { dynamic: { AppsAdsPerfMaxFluentV2 } } = permissions;\r\n\r\n const {\r\n campaignObjective,\r\n providerId,\r\n salesCountry,\r\n localInventory,\r\n isFeedFiltered,\r\n feedLabel,\r\n } = useMemo(() => getCampaignObjective(localStorage), [localStorage]);\r\n\r\n const wizardFlow = useMemo(() => {\r\n if (providerId !== null && providerId !== '') {\r\n return FLOWS.RETAIL_PERF_MAX;\r\n }\r\n return FLOWS.PERFMAX_WIZARD;\r\n }, [providerId]);\r\n\r\n const initialStep = FLOWS_TO_FIRST_STEP[wizardFlow];\r\n\r\n const wizardConfig = useMemo(() => ({\r\n id: PMAX_WIZARD_ID_NAME.PMAX_NORTH_STAR_WIZARD,\r\n initialStep,\r\n steps: StepConfig,\r\n initialFlowFactors: { flow: wizardFlow },\r\n initialWizardData: {\r\n flow: wizardFlow,\r\n campaignObjective,\r\n providerId,\r\n salesCountry,\r\n localInventory,\r\n isFeedFiltered,\r\n feedLabel,\r\n ...dynamicOptions,\r\n },\r\n getFlow: ({ flow }) => getFlow({ flow, permissions }),\r\n actions: {\r\n onDone: () => scope.save(routeToNavigateToWhenDone),\r\n onExited: () => scope.save(routeToNavigateToWhenDone),\r\n },\r\n attachStepActivities: false,\r\n }), [initialStep, wizardFlow, campaignObjective, providerId, salesCountry, localInventory, isFeedFiltered, feedLabel, dynamicOptions, permissions, scope, routeToNavigateToWhenDone]);\r\n\r\n useEffect(() => {\r\n setClarityTag({ PerfMaxNorthStarWizard: FLOWS.PERFMAX_WIZARD });\r\n }, []);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nPerfMaxNorthStarWizardImpl.propTypes = {\r\n perfMarker: PropTypes.shape({\r\n createChild: PropTypes.func.isRequired,\r\n }).isRequired,\r\n scope: PropTypes.shape({\r\n save: PropTypes.func.isRequired,\r\n }).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n AppsAdsPerfMaxFluentV2: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n siteMap: PropTypes.shape({}).isRequired,\r\n dynamicOptions: PropTypes.shape({}).isRequired,\r\n};\r\n\r\nconst PerfMaxNorthStarWizardInternal = ({\r\n adExtensionsDynamicFeaturesLoader,\r\n permissions,\r\n theme,\r\n scope,\r\n instrumentation,\r\n i18n,\r\n ...rest\r\n}) => {\r\n const dynamicOptionsLoader = useCallback(\r\n () => Promise.props({\r\n adExtensionsDynamicFeatures: adExtensionsDynamicFeaturesLoader({\r\n permissions,\r\n theme,\r\n scope,\r\n instrumentation,\r\n i18n,\r\n }),\r\n adExtensionsAssociationsFactory:\r\n // eslint-disable-next-line import/no-unresolved\r\n import(/* webpackChunkName: \"perf-max-north-star-campaign-creation\" */'@bingads-webui-campaign-react/ad-extensions-associations-factory')\r\n .then(({ extensionsAssociationsFactory, getObjectiveExtensions }) => ({ extensionsAssociationsFactory, getObjectiveExtensions })),\r\n })\r\n .then(({ adExtensionsDynamicFeatures, adExtensionsAssociationsFactory }) => ({\r\n adExtensionsDynamicFeatures,\r\n adExtensionsAssociationsFactory,\r\n }))\r\n .then(dynamicOptions => ({\r\n default: withProps({ dynamicOptions }, PerfMaxNorthStarWizardImpl),\r\n })),\r\n [adExtensionsDynamicFeaturesLoader, permissions, theme, scope, instrumentation, i18n]\r\n );\r\n\r\n const LazyView = useMemo(() => React.lazy(dynamicOptionsLoader), [dynamicOptionsLoader]);\r\n\r\n // useEffect(() => {\r\n // if (!campaignObjective) {\r\n // props.scope.save('/campaign/vnext/createcampaign/objective');\r\n // }\r\n\r\n // return () => {\r\n // // eslint-disable-next-line no-console\r\n // console.log('[DWD] PerfMaxCampaignCreationPage unmounted');\r\n // // clear objective choice in local storage\r\n // if (localStorage.supportsStorage()) {\r\n // localStorage.invalidate('CampaignObjective');\r\n // }\r\n // };\r\n // }, [campaignObjective, props.scope]);\r\n\r\n return (\r\n <>\r\n }>\r\n \r\n \r\n {/* {!campaignObjective &&\r\n
\r\n } */}\r\n \r\n );\r\n};\r\n\r\nPerfMaxNorthStarWizardInternal.propTypes = {\r\n adExtensionsDynamicFeaturesLoader: PropTypes.func.isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n AppsAdsPerfMaxFluentV2: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n theme: PropTypes.shape({}).isRequired,\r\n scope: PropTypes.shape({\r\n save: PropTypes.func.isRequired,\r\n }).isRequired,\r\n instrumentation: PropTypes.shape({}).isRequired,\r\n i18n: PropTypes.shape({}).isRequired,\r\n};\r\n\r\nexport const PerfMaxNorthStarWizard = withSiteMap(withPermissions(withRecommendationContext(withScope(withTheme(PerfMaxNorthStarWizardInternal), undefined, undefined, false, true))));\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React, { useMemo, useContext, useCallback, useState, useEffect, useRef } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport _ from 'underscore';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { ValidationGroup, ErrorMessages } from '@bingads-webui-react/validation';\r\nimport Repository from '@bingads-webui-campaign-legacy/adextension-shared/service/repository';\r\nimport { AttentionBeaconGroup } from '@bingads-webui-campaign-react/attention-beacon';\r\nimport { ActuationGroup, FocusableActuator } from '@bingads-webui-campaign-react/actuator';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { DisclaimerAdExtension } from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport { DisclaimerStringMap } from '@bingads-webui-campaign-react/ads-campaign-disclaimers';\r\nimport {\r\n bidAdjustmentIcon,\r\n getAssociatedDisclaimer,\r\n getCampaignStyles,\r\n ValidatedDisclaimerExtension,\r\n} from '@bingads-webui-campaign-react/display-plus-campaigns';\r\nimport {\r\n getConversionGoalTitleDetails,\r\n CampaignNamePanel,\r\n AdSchedulePanel,\r\n UrlOptionsPanel,\r\n PANEL_KEYS,\r\n LanguageTargetPanel,\r\n BidStrategyPanel,\r\n getFinalUrlExpansionTitleDetails,\r\n getStoreTitleDetails,\r\n BudgetPanel,\r\n getDisclaimerTitleDetails,\r\n} from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport {\r\n Collapse,\r\n TextTitle,\r\n useCollapseState,\r\n collapseExpander,\r\n ValidatedPanel,\r\n getPanelErrorProps,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { useFormService } from '@bingads-webui-react/form';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ValidatedConversionGoals, ValidatedConversionGoalsScopeSelector, useIsMounted, LocationTargetingSettingPanel } from '@bingads-webui-campaign-react/step-wizard-controls';\r\nimport { buildLegacyI18n } from '@bingads-webui/build-legacy-i18n';\r\nimport {\r\n FormErrorGroup,\r\n UnmappedFormErrors as OriginalUnmappedFormErrors,\r\n entityIs,\r\n andComp,\r\n anyComp,\r\n notComp,\r\n propertyIs,\r\n StandardControlAdapter\r\n} from '@bingads-webui-campaign-react/form-error';\r\nimport { ValidationStringMap } from '@bingads-webui/validation-string-map';\r\nimport {\r\n apiErrorMapper,\r\n ERROR_ENTITY,\r\n getStepCampaignSettingsStyles,\r\n ConversionsImg,\r\n FinalUrlExpansionsImg,\r\n PageFeedsImg,\r\n AutoGenAssetsImg,\r\n BrandExclusionsImg,\r\n ShoppingImg,\r\n} from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport { Campaign } from '@bingads-webui/campaign-odata-schemas';\r\nimport { withControlErrorHandling, withUnvalidatedControlErrors, withContainerErrors, FormErrorBeaconAdapter } from '@bingads-webui-campaign-react/error-handling';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { Link, Stack, Label } from '@bingads-webui-react/fabric-control';\r\nimport { ValidatedLegacyFinalUrlExpansion } from '@bingads-webui-campaign-react/legacy-final-url-expansion';\r\nimport { FluentProvider, webLightTheme } from '@fluentui/react-components';\r\nimport { PageFeedSelectorSection } from '@bingads-webui-campaign-react/page-feed-selector';\r\nimport { BrandListsPicker } from '@bingads-webui-campaign-react/brand-lists-components';\r\nimport { ValidatedAutoGeneratedAssets } from '@bingads-webui-campaign-react/auto-generated-assets';\r\nimport { StoreSelectContainer } from '@bingads-webui-campaign-react/store-select';\r\nimport { MAX_CONVERSIONS, MAX_CONVERSIONS_VALUE } from '@bingads-webui-campaign-react/bid-strategy-component';\r\nimport { getMessageType } from '@bingads-webui-campaign-react/campaign-settings-utils';\r\nimport { useWizardService, WIZARD_EVENTS, getWizardData } from '@bingads-webui-react/wizard';\r\nimport { ValidatedNewCustomerAcquisition, ValidatedNewCustomerAcquisitionHeader, newCustomerAcquisitionServerErrorFilter } from '@bingads-webui-campaign-react/new-customer-acquisition';\r\n\r\nimport { RadioShimmer, StoreSelectorShimmer, SingleLineShimmer } from '../../shared/components/section-shimmer';\r\nimport { PMAX_WIZARD_ID_NAME } from '../../constants';\r\n\r\nconst getCampaignStylesNorthStar = () => ({\r\n header: {\r\n marginBottom: 20,\r\n },\r\n formContainer: {\r\n maxWidth: 800,\r\n '& .advanced-scheduling-grid': {\r\n width: 'unset !important',\r\n\r\n '& .ad-scheduling-grid': {\r\n minWidth: 'unset !important',\r\n },\r\n },\r\n '& .title-item': {\r\n width: 'unset !important',\r\n },\r\n '& .goal-selector-with-scope': {\r\n width: '100%',\r\n '& .ba-goal-selector': {\r\n width: '100%',\r\n ' & .multi-selector': {\r\n width: '100%',\r\n '& .multi-selector-content': {\r\n width: '100%',\r\n '& .ba-entity-selector': {\r\n minWidth: '50% !important',\r\n '& .list-selector-container': {\r\n width: 'unset !important',\r\n '& .ba-list-selector': {\r\n width: 'unset !important',\r\n },\r\n },\r\n },\r\n },\r\n },\r\n },\r\n },\r\n '& .bid-strategy-dropdown': {\r\n '& .ms-Dropdown': {\r\n maxWidth: 312,\r\n },\r\n },\r\n },\r\n});\r\n\r\nconst entityIsCampaign = entityIs(ERROR_ENTITY.Campaign);\r\n\r\nconst campaignUrlOptionsProperties = andComp(\r\n entityIsCampaign,\r\n anyComp(\r\n propertyIs('TrackingUrlTemplate'),\r\n propertyIs('FinalUrlSuffix'),\r\n propertyIs('UrlCustomParameters')\r\n )\r\n);\r\n\r\nconst notCampaignUrlOptionsProperties = notComp(campaignUrlOptionsProperties);\r\n\r\nconst UnmappedFormErrors = withControlErrorHandling(OriginalUnmappedFormErrors);\r\n\r\nconst feedAssociationsProp = andComp(entityIsCampaign, propertyIs('FeedAssociations'));\r\nconst campaignNegativeWebPages = entityIs(ERROR_ENTITY.CampaignNegativeWebpage);\r\nconst brandListAssociationEntity = entityIs(ERROR_ENTITY.BrandListAssociation);\r\n\r\nconst ServerValidatedLegacyFinalUrlExpansion = withControlErrorHandling(withUnvalidatedControlErrors(ValidatedLegacyFinalUrlExpansion, { filter: campaignNegativeWebPages }));\r\nconst ServerValidatedPageFeedSelectorSection = withControlErrorHandling(withContainerErrors(PageFeedSelectorSection, { filter: feedAssociationsProp, Adapter: StandardControlAdapter() }), [FocusableActuator], [FormErrorBeaconAdapter]);\r\nconst ServerValidatedBrandListsPicker = withControlErrorHandling(withContainerErrors(BrandListsPicker, { filter: brandListAssociationEntity, Adapter: StandardControlAdapter() }), [FocusableActuator], [FormErrorBeaconAdapter]);\r\nconst ServerValidatedAutoGeneratedAssets = withControlErrorHandling(withUnvalidatedControlErrors(ValidatedAutoGeneratedAssets, { filter: campaignNegativeWebPages }));\r\nconst ServerValidatedNewCustomerAcquisition = withControlErrorHandling(withUnvalidatedControlErrors(ValidatedNewCustomerAcquisition, { filter: newCustomerAcquisitionServerErrorFilter }));\r\n\r\nexport const CampaignSettingStepShell = ({\r\n data: campaignInfo,\r\n onDataChange,\r\n error,\r\n}) => {\r\n const isLoading = useMemo(() => _.isEmpty(campaignInfo), [campaignInfo]);\r\n\r\n const {\r\n campaign,\r\n brandExclusions,\r\n budgetAmount,\r\n currency,\r\n bidStrategy,\r\n } = campaignInfo || {};\r\n const {\r\n Id: campaignId,\r\n conversionGoals: conversionGoalsState,\r\n finalUrlExpansionOptOut,\r\n autoGeneratedTextOptOut,\r\n autoGeneratedImageOptOut,\r\n finalUrlExpansions,\r\n } = campaign || {};\r\n const {\r\n savedAddedBrandListIds,\r\n savedDeletedBrandListIds,\r\n } = brandExclusions || {};\r\n\r\n const { serverErrors, systemErrors } = error || {};\r\n\r\n const classes = useDefaultStyles(getStepCampaignSettingsStyles);\r\n const styles = useDefaultStyles(getCampaignStylesNorthStar);\r\n const campaignClasses = useDefaultStyles(getCampaignStyles);\r\n\r\n const { state } = useFormService();\r\n const { config: wizardConfig, state: wizardState, send } = useWizardService();\r\n const wizardData = getWizardData(wizardState);\r\n\r\n const { saveFailed } = state.context;\r\n const i18n = useContext(I18nContext);\r\n const isMounted = useIsMounted();\r\n const legacyI18n = useMemo(() => buildLegacyI18n(i18n, [ValidationStringMap, DisclaimerStringMap]), [i18n]);\r\n const { scope } = useContext(ScopeContext) || {};\r\n const serverContext = useContext(ServerContext);\r\n const {\r\n Permissions, DynamicPermissions, CurrentAccount,\r\n } = serverContext || {};\r\n const permissions = useMemo(() => ({ dynamic: { ...DynamicPermissions }, ...Permissions }), [DynamicPermissions, Permissions]);\r\n const { AdvertiserCustomerID: advertiserCustomerId } = CurrentAccount || {};\r\n const {\r\n PerformanceMaxCampaignsAutoGenAssetControl: IsPerformanceMaxCampaignsAutoGenAssetControlEnabled,\r\n PerformanceMaxCampaignsPageFeeds: IsPerformanceMaxCampaignsPageFeedsEnabled,\r\n BrandExclusion: IsBrandExclusionEnabled,\r\n PerformanceMaxInCnMarket: IsPerformanceMaxInCnMarketEnabled,\r\n EnableBudgetSuggestion: showBudgetSuggestion,\r\n ConversionAssociationWarningP2: IsConversionAssociationWarningP2Enabled,\r\n ConversionWarningImprovement: ConversionWarningImprovementEnabled,\r\n NewCustomerAcquisition: IsNewCustomerAcquisitionEnabled,\r\n PMaxDisclaimers,\r\n } = permissions.dynamic;\r\n\r\n const {\r\n IsDomesticSimplifiedChineseEnabled,\r\n IsMSANDisclaimerEnabled,\r\n } = permissions;\r\n const isFeatureBlockedForCnMarket = IsDomesticSimplifiedChineseEnabled && IsPerformanceMaxInCnMarketEnabled;\r\n const isPMaxDisclaimersEnabled = !IsDomesticSimplifiedChineseEnabled && PMaxDisclaimers && IsMSANDisclaimerEnabled;\r\n\r\n const conversionGoals = useMemo(() => ({ conversionGoals: conversionGoalsState }), [conversionGoalsState]);\r\n const conversionGoalsTitleDetails = useMemo(() => getConversionGoalTitleDetails(i18n, conversionGoals && conversionGoals.conversionGoals), [i18n, conversionGoals]);\r\n const [reportedSelectedPageFeeds, setReportedSelectedPageFeeds] = useState([]);\r\n const onSelectedPageFeedsUpdate = useCallback((selectedPageFeeds) => {\r\n if (!isMounted.current) return;\r\n setReportedSelectedPageFeeds(selectedPageFeeds);\r\n }, [isMounted]);\r\n const pageFeedsDetails = useMemo(\r\n () => {\r\n if (_.isEmpty(reportedSelectedPageFeeds)) {\r\n return i18n.getString(_TL_('Upload all the relevant URLs for your campaign by spreadsheet.'));\r\n }\r\n if (reportedSelectedPageFeeds.length === 1) {\r\n return i18n.getString(_TL_('You’ve successfully added 1 page feed.'));\r\n }\r\n return i18n.getString(_TL_('You’ve successfully added {{number}} page feeds.'), { number: reportedSelectedPageFeeds.length });\r\n },\r\n [i18n, reportedSelectedPageFeeds]\r\n );\r\n const onPageFeedsChange = useCallback((selectedPageFeeds) => {\r\n if (!isMounted.current) return;\r\n onDataChange({\r\n data: prevData => ({\r\n ...prevData,\r\n campaign: {\r\n ...prevData.campaign,\r\n pageFeeds: selectedPageFeeds,\r\n },\r\n }),\r\n isDirty: true,\r\n });\r\n }, [isMounted, onDataChange]);\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 const autoGenAssetsData = useMemo(() => ({\r\n finalUrlExpansions,\r\n options: {\r\n finalUrlExpansionOptOut,\r\n autoGeneratedTextOptOut,\r\n autoGeneratedImageOptOut,\r\n },\r\n }), [autoGeneratedImageOptOut, autoGeneratedTextOptOut, finalUrlExpansionOptOut, finalUrlExpansions]);\r\n\r\n const onBrandListsChange = useCallback((selectedBrandLists, [deletedBrandListIds, addedBrandListIds]) => {\r\n if (!isMounted.current) return;\r\n onDataChange({\r\n data: prevData => ({\r\n ...prevData,\r\n brandExclusions: {\r\n ...prevData.brandExclusions,\r\n deletedBrandListIds,\r\n addedBrandListIds,\r\n },\r\n }),\r\n isDirty: true,\r\n });\r\n }, [isMounted, onDataChange]);\r\n const [reportedSelectedBrandLists, setReportedSelectedBrandLists] = useState([]);\r\n const onSelectedBrandListsUpdate = useCallback((selectedBrandLists) => {\r\n if (!isMounted.current) return;\r\n setReportedSelectedBrandLists(selectedBrandLists);\r\n }, [isMounted]);\r\n const brandListsDetails = useMemo(\r\n () => {\r\n if (_.isEmpty(reportedSelectedBrandLists)) {\r\n return i18n.getString(_TL_('Add brand exclusions so that your ads won’t show on search queries that mention those brands.'));\r\n }\r\n if (reportedSelectedBrandLists.length === 1) {\r\n return i18n.getString(_TL_('You’ve added 1 brand list, which makes it so that your ads won’t show on search queries that mention those brands.'));\r\n }\r\n return i18n.getString(_TL_('You’ve added {{number}} brand lists, which makes it so that your ads won’t show on search queries that mention those brands.'), { number: reportedSelectedBrandLists.length });\r\n },\r\n [i18n, reportedSelectedBrandLists]\r\n );\r\n const [finalUrlExpansionsView, setFinalUrlExpansionsView] = useState(null);\r\n const setFinalUrlExpansionsViewCallback = useCallback((view) => {\r\n setFinalUrlExpansionsView(view);\r\n }, []);\r\n\r\n const DisclaimerAdsEnabled = useMemo(\r\n () =>\r\n _.result(_.find( // from campaign setting DB\r\n _.get(campaign, 'CampaignSettings', []),\r\n setting => setting['@odata.type'] === '#Model.DisclaimerSetting'\r\n ), 'DisclaimerAdsEnabled', false)\r\n , [campaign]\r\n );\r\n const disclaimerRepositoryRef = useRef(new Repository({\r\n schema: DisclaimerAdExtension,\r\n skipExtensionCache: true,\r\n }));\r\n\r\n const [associatedDisclaimer, setAssociatedDisclaimer] = useState(null);\r\n useEffect(() => {\r\n if (isPMaxDisclaimersEnabled && campaignId) {\r\n getAssociatedDisclaimer(campaignId, disclaimerRepositoryRef.current).then((disclaimer) => {\r\n if (!_.isEmpty(disclaimer)) {\r\n setAssociatedDisclaimer(disclaimer);\r\n }\r\n });\r\n }\r\n return null;\r\n }, [isPMaxDisclaimersEnabled, campaignId]);\r\n\r\n const disclaimersDetails = useMemo(() => getDisclaimerTitleDetails(i18n, { selectedDisclaimer: associatedDisclaimer }), [associatedDisclaimer, i18n]);\r\n const isCampaignShoppingType = useMemo(\r\n // check if the odata type is ShoppingSettings, return true if it is, false if not\r\n () => !!_.find(_.get(campaign, 'CampaignSettings', []), setting => setting['@odata.type'] === '#Model.ShoppingSettings')\r\n , [campaign]\r\n );\r\n\r\n const [\r\n allCampaignSettingsSections,\r\n campaignSettingsExpandedSections,\r\n setCampaignSettingsExpandedSections,\r\n ] = useCollapseState(\r\n ['campaign'] /* all sections */,\r\n ['campaign'] /* initially expanded sections */\r\n );\r\n\r\n const basicSettingsSection = useMemo(() => {\r\n const campaignNamePanel = (\r\n \r\n );\r\n\r\n const generalSettings = [\r\n campaignNamePanel,\r\n ];\r\n\r\n return (\r\n
\r\n \r\n { generalSettings }\r\n \r\n
\r\n );\r\n }, [isLoading, allCampaignSettingsSections, campaignSettingsExpandedSections, setCampaignSettingsExpandedSections]);\r\n\r\n const [\r\n allMoreSettingsSections,\r\n moreSettingsExpandedSections,\r\n setMoreSettingsExpandedSections,\r\n flipMoreSettingsExpandAllState,\r\n ] = useCollapseState(\r\n [PANEL_KEYS.AD_SCHEDULE, PANEL_KEYS.FINAL_URL_EXPANSION, PANEL_KEYS.AUTO_GEN_ASSETS, PANEL_KEYS.PAGE_FEEDS, PANEL_KEYS.URL_OPTIONS, PANEL_KEYS.CAMPAIGN_URL_OPTIONS, PANEL_KEYS.BRAND_EXCLUSIONS, PANEL_KEYS.DISCLAIMERS] /* all sections */,\r\n [] /* initially expanded sections */\r\n );\r\n const moreBasicSettingsExpand = useMemo(\r\n () => collapseExpander({ setActiveKeys: setMoreSettingsExpandedSections }),\r\n [setMoreSettingsExpandedSections]\r\n );\r\n\r\n const moreBasicSettingsSection = useMemo(() => (\r\n
\r\n \r\n \r\n {moreSettingsExpandedSections.length ? i18n.getString(_TL_('Collapse all')) : i18n.getString(_TL_('Expand all'))}\r\n \r\n \r\n \r\n {!IsPerformanceMaxCampaignsAutoGenAssetControlEnabled && !isFeatureBlockedForCnMarket &&\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: moreBasicSettingsExpand,\r\n expandKey: PANEL_KEYS.FINAL_URL_EXPANSION,\r\n }}\r\n >\r\n \r\n \r\n }\r\n {IsPerformanceMaxCampaignsAutoGenAssetControlEnabled && !isFeatureBlockedForCnMarket &&\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: moreBasicSettingsExpand,\r\n expandKey: PANEL_KEYS.AUTO_GEN_ASSETS,\r\n }}\r\n >\r\n \r\n \r\n \r\n \r\n }\r\n {IsPerformanceMaxCampaignsPageFeedsEnabled &&\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: moreBasicSettingsExpand,\r\n expandKey: 'page-feeds',\r\n }}\r\n >\r\n \r\n { isLoading ? :\r\n \r\n }\r\n \r\n \r\n }\r\n \r\n {IsBrandExclusionEnabled &&\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: moreBasicSettingsExpand,\r\n expandKey: PANEL_KEYS.BRAND_EXCLUSIONS,\r\n }}\r\n >\r\n \r\n {\r\n isLoading ? : (\r\n \r\n )\r\n }\r\n\r\n \r\n \r\n }\r\n {isPMaxDisclaimersEnabled && !isCampaignShoppingType && (\r\n \r\n }\r\n >\r\n {isLoading ? : (\r\n \r\n )}\r\n \r\n )}\r\n \r\n
\r\n ), [classes.moreBasicCampaignSection, i18n, flipMoreSettingsExpandAllState, moreSettingsExpandedSections, allMoreSettingsSections, setMoreSettingsExpandedSections, isLoading, moreBasicSettingsExpand, campaign, IsPerformanceMaxCampaignsAutoGenAssetControlEnabled, isFeatureBlockedForCnMarket, finalUrlExpansionsView, finalUrlExpansionOptOut, finalUrlExpansions, setFinalUrlExpansionsViewCallback, autoGenAssetsSummary, autoGenAssetsData, IsPerformanceMaxCampaignsPageFeedsEnabled, pageFeedsDetails, advertiserCustomerId, scope.values.aid, campaignId, onPageFeedsChange, onSelectedPageFeedsUpdate, IsBrandExclusionEnabled, brandListsDetails, onBrandListsChange, onSelectedBrandListsUpdate, savedAddedBrandListIds, savedDeletedBrandListIds, isPMaxDisclaimersEnabled, isCampaignShoppingType, disclaimersDetails, campaignClasses.disclaimerContainerWrapper, legacyI18n, DisclaimerAdsEnabled, associatedDisclaimer]);\r\n\r\n const onCampaignValidation = useCallback((results) => {\r\n if (!isMounted.current) return;\r\n\r\n onDataChange({\r\n data: (prevData) => {\r\n const patchedData = {\r\n ...prevData,\r\n campaign: {\r\n ...prevData.campaign,\r\n ...results.data,\r\n },\r\n };\r\n if (IsConversionAssociationWarningP2Enabled && wizardConfig && wizardConfig.id === PMAX_WIZARD_ID_NAME.PMAX_NORTH_STAR_SETTING_WIZARD) {\r\n const message = getMessageType(prevData, patchedData);\r\n\r\n if (message) {\r\n const updatedData = {\r\n wizardData: {\r\n ...wizardData,\r\n customConfirmMessages: [message],\r\n },\r\n };\r\n\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, updatedData.wizardData);\r\n }\r\n }\r\n return ({\r\n ...patchedData,\r\n });\r\n },\r\n isValid: results.isValid,\r\n isDirty: results.isDirty,\r\n });\r\n }, [IsConversionAssociationWarningP2Enabled, isMounted, onDataChange, send, wizardConfig, wizardData]);\r\n\r\n const [\r\n allSections,\r\n allExpandedSections,\r\n setExpandedSections,\r\n ] = useCollapseState(\r\n [PANEL_KEYS.BID_STRATEGY, PANEL_KEYS.BUDGET, PANEL_KEYS.LOCATIONS, PANEL_KEYS.LANGUAGE_TARGET, PANEL_KEYS.AD_SCHEDULE, PANEL_KEYS.URL_OPTIONS, PANEL_KEYS.COST_PER_SALE, PANEL_KEYS.SHOPPING, PANEL_KEYS.CONVERSIONS, PANEL_KEYS.NEW_CUSTOMER_ACQUISITION],\r\n [PANEL_KEYS.BID_STRATEGY, PANEL_KEYS.BUDGET, PANEL_KEYS.LOCATIONS, PANEL_KEYS.LANGUAGE_TARGET, PANEL_KEYS.AD_SCHEDULE, PANEL_KEYS.URL_OPTIONS, PANEL_KEYS.CONVERSIONS, PANEL_KEYS.NEW_CUSTOMER_ACQUISITION]\r\n );\r\n\r\n const expandSections = useMemo(() =>\r\n collapseExpander({ setActiveKeys: setExpandedSections }), [setExpandedSections]);\r\n\r\n const {\r\n bundleCountries,\r\n bundleLocationCriterions,\r\n } = campaignInfo || {};\r\n\r\n const {\r\n ProviderId,\r\n IsFeedFiltered,\r\n SalesCountry,\r\n FeedLabel,\r\n LocalInventoryAdsEnabled,\r\n newCustomerAcquisition,\r\n newCustomerAcquisitionOptOut,\r\n } = campaign || {};\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 const [storesData, setStoresData] = useState({ error: undefined, stores: {}, countries: {} });\r\n const storeTitleDetails = useMemo(() => storesData && getStoreTitleDetails(i18n, storesData, storeContainerData), [i18n, storesData, storeContainerData]);\r\n // eslint-disable-next-line @typescript-eslint/no-shadow\r\n const onStoreDataLoaded = useCallback(({ error, stores = {}, countries = {} }) => {\r\n if (isMounted.current) {\r\n setStoresData({ error, stores, countries });\r\n }\r\n }, [isMounted]);\r\n\r\n return (\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n { basicSettingsSection }\r\n \r\n \r\n \r\n { IsNewCustomerAcquisitionEnabled && (\r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: PANEL_KEYS.NEW_CUSTOMER_ACQUISITION,\r\n expandKey: expandSections,\r\n }}\r\n >\r\n {\r\n isLoading ? : (\r\n \r\n )\r\n }\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: { expandSections },\r\n expandKey: 'conversions',\r\n }}\r\n >\r\n {!ConversionWarningImprovementEnabled && (isLoading ? : (\r\n \r\n ))}\r\n {ConversionWarningImprovementEnabled && (isLoading ? : (\r\n \r\n ))}\r\n \r\n\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: expandSections,\r\n expandKey: PANEL_KEYS.SHOPPING,\r\n }}\r\n >\r\n {isLoading ? : (\r\n }\r\n />\r\n )}\r\n \r\n \r\n { moreBasicSettingsSection }\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nCampaignSettingStepShell.propTypes = {\r\n data: PropTypes.shape({\r\n campaign: PropTypes.shape({}),\r\n adSchedules: PropTypes.shape({}),\r\n conversionGoalsState: PropTypes.shape({}),\r\n }).isRequired,\r\n error: PropTypes.shape({\r\n serverErrors: PropTypes.arrayOf(PropTypes.shape({})),\r\n systemErrors: PropTypes.arrayOf(PropTypes.shape({})),\r\n }).isRequired,\r\n onDataChange: PropTypes.func.isRequired,\r\n};\r\n","import { useCallback, useContext } from 'react';\r\nimport Promise from 'bluebird';\r\nimport _ from 'underscore';\r\nimport { useWizardService, WIZARD_EVENTS } from '@bingads-webui-react/wizard';\r\nimport {\r\n initialBrandExclusionsViewModel,\r\n loadCampaign,\r\n loadBundleCountries,\r\n saveCampaignAndLinkedData,\r\n modelToViewModelForCampaign,\r\n loadConversionGoalDetails,\r\n} from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport { ScenarioContext, ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n readLocationCriterions,\r\n readCampaignNegativeWebpages,\r\n readDayTimeCriterions,\r\n readNewCustomerAcquisitionGoals\r\n} from '@bingads-webui-campaign-react/perf-max-data';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { usePreference, preferenceNames } from '@bingads-webui-campaign-react/pmax-lite-data';\r\nimport { MAX_CONVERSIONS } from '@bingads-webui-campaign-react/bid-strategy-component';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport { LogTargetCpaCheckOnSave } from '@bingads-webui-campaign-react/target-cpa-warning-banner';\r\nimport { showBudgetBidCampaignNotifications } from '@bingads-webui-campaign/import-shared-utils';\r\nimport instrumentation from '@bingads-webui-campaign-legacy/instrumentation/index';\r\nimport { viewModelToBulkModelForDisclaimerAssociation } from '@bingads-webui-campaign-react/ads-campaign-disclaimers';\r\nimport { useLocalizeBudget } from '../budget/utils/use-budget-localized';\r\n\r\nexport const roasMtToUI = roas => (_.isNumber(roas) ? roas * 100 : null);\r\nexport const roasUiToMt = roas => (_.isNumber(roas) ? (roas / 100).toFixed(4) : null);\r\n\r\nexport const useCampaignSettingStepRepository = () => {\r\n const { localizeBudget } = useLocalizeBudget();\r\n const [{ value: currencyPreference }] = usePreference(preferenceNames.SelectedCurrency);\r\n const { state, send } = useWizardService();\r\n const serverContext = useContext(ServerContext);\r\n const scenarioContext = useContext(ScenarioContext);\r\n const activity = useContext(ActivityContext);\r\n const i18n = useContext(I18nContext);\r\n const { scope } = useContext(ScopeContext) || {};\r\n const { cid, aid, campaignId } = scope.values;\r\n\r\n const modelToViewModel = useCallback((campaign) => {\r\n const budgetAmount = _.get(campaign, ['Budget', 'Amount']);\r\n const bidStrategy = _.get(campaign, ['BiddingScheme', 'Type']);\r\n const cpa = _.get(campaign, ['BiddingScheme', 'TargetCpa']);\r\n const roas = parseFloat(_.get(campaign, ['BiddingScheme', 'TargetRoas'])) || null;\r\n const language = _.get(campaign, ['Languages', 0]);\r\n const isInitialAdditionalDetailsChecked = _.isNumber(cpa) || _.isNumber(roas);\r\n\r\n return {\r\n budgetAmount: localizeBudget(budgetAmount, 'USD'),\r\n bidStrategy,\r\n currency: currencyPreference,\r\n cpa,\r\n roas: roasMtToUI(roas),\r\n language,\r\n isInitialAdditionalDetailsChecked,\r\n isMarketingMetricValid: true,\r\n };\r\n }, [currencyPreference, localizeBudget]);\r\n\r\n const load = useCallback(() => {\r\n activity.trace('[PmaxNorthStarSettingWizard] - loadData started in campaign settings step');\r\n const savedBrandExclusions = state.context.wizardData.brandExclusions;\r\n const BrandExclusionsViewModel = savedBrandExclusions\r\n ? { data: savedBrandExclusions, isDirty: false, isValid: true }\r\n : initialBrandExclusionsViewModel;\r\n const { Permissions, DynamicPermissions } = serverContext || {};\r\n const permissions = { dynamic: { ...DynamicPermissions }, ...Permissions };\r\n const {\r\n NewCustomerAcquisition: isNewCustomerAcquisitionEnabled,\r\n } = permissions.dynamic;\r\n\r\n\r\n const loadPromises = {\r\n campaign: loadCampaign(cid, aid, campaignId), // This is necessary to read ['Budget', 'CampaignConversionGoal/Goals'] from MT as the original model doesn't come with it\r\n locationTargets: readLocationCriterions(cid, aid, campaignId),\r\n bundleCountriesAndLocationCriterions: loadBundleCountries({\r\n cid,\r\n aid,\r\n serverContext,\r\n }),\r\n dayTimeCriterions: readDayTimeCriterions(cid, aid, campaignId),\r\n campaignNegativeWebpages: readCampaignNegativeWebpages(cid, aid, campaignId),\r\n brandExclusions: Promise.resolve(BrandExclusionsViewModel),\r\n conversionGoalDetails: loadConversionGoalDetails({ cid, aid }),\r\n ...(isNewCustomerAcquisitionEnabled && { newCustomerAcquisitionGoals: readNewCustomerAcquisitionGoals(cid, aid) }),\r\n };\r\n\r\n return Promise.props(loadPromises).then(({\r\n campaign,\r\n locationTargets,\r\n bundleCountriesAndLocationCriterions,\r\n dayTimeCriterions,\r\n campaignNegativeWebpages,\r\n brandExclusions,\r\n newCustomerAcquisitionGoals,\r\n conversionGoalDetails,\r\n }) => {\r\n const campaignData = modelToViewModelForCampaign({\r\n campaignModel: { ...campaign }, // MT sends UserPaused, if we send this back they mark it as active. So we just use Paused from the saved ad model\r\n locationCriterionsModel: locationTargets ? locationTargets.value : [],\r\n dayTimeCriterionsModel: dayTimeCriterions ? dayTimeCriterions.value : [],\r\n campaignNegativeWebpagesModel: campaignNegativeWebpages ? campaignNegativeWebpages.value : [],\r\n bundleCountries: bundleCountriesAndLocationCriterions.bundleCountries,\r\n budgetAmount: campaign.Budget.Amount,\r\n ...(isNewCustomerAcquisitionEnabled && { newCustomerAcquisitionGoalsModel: newCustomerAcquisitionGoals ? newCustomerAcquisitionGoals.value : [] }),\r\n });\r\n\r\n activity.trace('[PmaxNorthStarSettingWizard] - loadData succeeded in campaign settings step');\r\n activity.signal('[PmaxNorthStaSettingrWizard] - loadData succeeded in campaign settings step');\r\n\r\n return {\r\n campaign: campaignData.data,\r\n brandExclusions: brandExclusions.data,\r\n conversionGoalDetails,\r\n ...modelToViewModel(campaign),\r\n ...bundleCountriesAndLocationCriterions,\r\n };\r\n }).catch((errorData) => {\r\n activity.trace(`[PmaxNorthStaSettingrWizard] loadData failed. Error: ${JSON.stringify(errorData)}`);\r\n setClarityTag({ IsPmaxNorthStarSettingFailure: 'true' });\r\n\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n error: {\r\n ...errorData,\r\n },\r\n });\r\n });\r\n }, [activity, aid, campaignId, cid, modelToViewModel, serverContext, state.context.wizardData.brandExclusions]);\r\n\r\n const save = useCallback(({\r\n data,\r\n initialData,\r\n }) => {\r\n const {\r\n campaign: campaignToSave,\r\n bundleCountries,\r\n bundleLocationCriterions,\r\n brandExclusions: brandExclusionsToSave,\r\n budgetAmount,\r\n bidStrategy,\r\n cpa,\r\n roas,\r\n isBudgetValid,\r\n isMarketingMetricValid,\r\n } = data;\r\n\r\n const { Permissions, DynamicPermissions } = serverContext || {};\r\n const permissions = { dynamic: { ...DynamicPermissions }, ...Permissions };\r\n\r\n if (!isBudgetValid || !isMarketingMetricValid) {\r\n return Promise.reject();\r\n }\r\n\r\n const { campaign: initialCampaign } = initialData;\r\n\r\n const { locationTargets: savedLocationTargets } = campaignToSave;\r\n\r\n const newCampaign = {\r\n ...campaignToSave,\r\n BiddingScheme: {\r\n Type: bidStrategy,\r\n ...(\r\n bidStrategy === MAX_CONVERSIONS.type\r\n ? { TargetCpa: cpa }\r\n : { TargetRoas: roasUiToMt(roas) }\r\n ),\r\n },\r\n Budget: {\r\n Amount: i18n.parseDecimal(budgetAmount),\r\n Type: 'DailyStandard',\r\n },\r\n };\r\n\r\n const savePromises = {\r\n campaign: saveCampaignAndLinkedData({\r\n campaign: { data: newCampaign },\r\n originalCampaign: { data: initialCampaign },\r\n brandExclusions: { data: brandExclusionsToSave },\r\n bundleCountries,\r\n bundleLocationCriterions,\r\n viewModelToBulkModelForDisclaimerAssociation,\r\n }, {\r\n scenario: scenarioContext.name,\r\n i18n,\r\n activityLogger: scenarioContext.createActivity('updateCampaign'),\r\n }),\r\n };\r\n\r\n return Promise.props(savePromises).then(({\r\n campaign: campaignResults,\r\n }) => {\r\n activity.trace('[PmaxNorthStarSettingWizard] - campaign settings updated');\r\n activity.signal('[PmaxNorthStaSettingrWizard] - campaign settings updated');\r\n\r\n const { activity: BudgetBidCampaignImportNotificationActivity } = instrumentation.createScenarioAndActivity({\r\n scenarioName: 'BudgetBidCampaignImportNotification',\r\n activityName: 'PmaxCampaignSettingPage',\r\n });\r\n\r\n showBudgetBidCampaignNotifications({\r\n campaignItemList: [initialCampaign],\r\n oldBudget: initialCampaign.Budget,\r\n newBudget: newCampaign.Budget,\r\n oldBidStrategy: initialCampaign.BiddingScheme,\r\n newBidStrategy: newCampaign.BiddingScheme,\r\n activity: BudgetBidCampaignImportNotificationActivity,\r\n });\r\n\r\n const { campaign, brandExclusions } = campaignResults;\r\n\r\n LogTargetCpaCheckOnSave(i18n, permissions, campaign?.data?.Budget?.Amount, campaign?.data?.BiddingScheme.TargetCpa, activity, 'PmaxNorthStarSettingWizard');\r\n\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { campaign: { ...campaign.data, locationTargets: savedLocationTargets }, brandExclusions: brandExclusions.data });\r\n\r\n return {\r\n campaign: { ...campaign.data, locationTargets: savedLocationTargets },\r\n brandExclusions: brandExclusions.data,\r\n bundleLocationCriterions,\r\n bundleCountries,\r\n };\r\n }).catch((errorData) => {\r\n activity.trace('[PmaxNorthStarSettingWizard] - campaign settings update failed');\r\n setClarityTag({ IsPmaxNorthStarSettingFailure: 'true' });\r\n\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n error: {\r\n ...errorData,\r\n },\r\n });\r\n });\r\n }, [activity, i18n, scenarioContext, send, serverContext]);\r\n\r\n return {\r\n load,\r\n save,\r\n };\r\n};\r\n","import _ from 'underscore';\r\nimport React, { useMemo, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n Wizard,\r\n LayoutContainer,\r\n Layout,\r\n StepContainer,\r\n} from '@bingads-webui-react/wizard';\r\nimport {\r\n SaveBlocker,\r\n DefaultTemplate,\r\n CancelWizardDialog,\r\n ConfirmWizardDialog,\r\n} from '@bingads-webui-react/wizard-ui-library';\r\nimport { FluentSwitcherContext } from '@bingads-webui-react/fluent-version-switcher';\r\nimport { withTheme } from 'react-jss';\r\nimport { WizardPerfMarker } from '@bingads-webui-campaign/wizard-performance-marker';\r\nimport { Scenario, Activity } from '@bingads-webui-react/hoc-with-signal';\r\nimport { InstrumentationContext } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { PerformanceMarkerProvider } from '@bingads-webui-campaign-react/performance-marker-provider';\r\nimport { withScope } from '@bingads-webui-react/scope-service';\r\nimport { withRecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { withPermissions } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { withSiteMap } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { useConfirmDialogConfigWithLogger } from '@bingads-webui-campaign-react/campaign-settings-wizard-v1-utils';\r\nimport { getNeedConfirming } from '@bingads-webui-campaign-react/campaign-settings-utils';\r\n\r\nimport { STEP_PATHS } from './steps/step-constants';\r\nimport { CampaignSettingStepShell, useCampaignSettingStepRepository } from './steps/campaign-setting';\r\nimport { PerfMaxSettingStepFooter } from './steps';\r\nimport { WizardLogger } from './shared/components/wizard-logger';\r\nimport { PMAX_WIZARD_ID_NAME } from './constants';\r\n\r\nconst StepConfig = [\r\n {\r\n id: STEP_PATHS.CAMPAIGNSETTING,\r\n view: props => ,\r\n repository: useCampaignSettingStepRepository,\r\n },\r\n];\r\n\r\nexport const getStepConfig = permissions => StepConfig.map((step) => {\r\n if (_.get(permissions, ['dynamic', 'ConversionAssociationWarningP2']) && step.id === STEP_PATHS.CAMPAIGNSETTING) {\r\n const mapStep = {\r\n ...step,\r\n machineOptions: {\r\n ...step.machineOptions,\r\n guards: {\r\n needsConfirming: context => getNeedConfirming(permissions, context),\r\n },\r\n },\r\n };\r\n return mapStep;\r\n }\r\n return step;\r\n});\r\n\r\nconst PerfMaxNorthStarSettingWizardImpl = ({\r\n perfMarker,\r\n scope,\r\n permissions,\r\n}) => {\r\n const instrumentation = useContext(InstrumentationContext);\r\n\r\n const wizardPerfMarker = useMemo(() => (\r\n perfMarker.createChild('PerfMaxNorthStarWizard')\r\n ), [perfMarker]);\r\n\r\n const routeToNavigateToWhenDone = '/campaign/vnext/assetgroups';\r\n\r\n const { dynamic: { AppsAdsPerfMaxFluentV2, ConversionAssociationWarningP2 } } = permissions;\r\n\r\n const wizardConfig = useMemo(() => ({\r\n id: PMAX_WIZARD_ID_NAME.PMAX_NORTH_STAR_SETTING_WIZARD,\r\n initialStep: STEP_PATHS.CAMPAIGNSETTING,\r\n steps: getStepConfig(permissions),\r\n initialFlowFactors: { flow: STEP_PATHS.CAMPAIGNSETTING },\r\n initialWizardData: {\r\n flow: STEP_PATHS.CAMPAIGNSETTING,\r\n },\r\n getFlow: [STEP_PATHS.CAMPAIGNSETTING],\r\n actions: {\r\n onDone: () => scope.save(routeToNavigateToWhenDone),\r\n onExited: () => scope.save(routeToNavigateToWhenDone),\r\n },\r\n attachStepActivities: false,\r\n }), [permissions, scope]);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {ConversionAssociationWarningP2 && }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nPerfMaxNorthStarSettingWizardImpl.propTypes = {\r\n perfMarker: PropTypes.shape({\r\n createChild: PropTypes.func.isRequired,\r\n }).isRequired,\r\n scope: PropTypes.shape({\r\n save: PropTypes.func.isRequired,\r\n }).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n AppsAdsPerfMaxFluentV2: PropTypes.bool,\r\n ConversionAssociationWarningP2: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n siteMap: PropTypes.shape({}).isRequired,\r\n dynamicOptions: PropTypes.shape({}).isRequired,\r\n};\r\n\r\nexport const PerfMaxNorthStarSettingWizard = withSiteMap(withPermissions(withRecommendationContext(withScope(withTheme(PerfMaxNorthStarSettingWizardImpl, undefined, undefined, false, true)))));\r\n","import _ from 'underscore';\r\nimport React, { useMemo, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n Wizard,\r\n LayoutContainer,\r\n Layout,\r\n StepContainer,\r\n} from '@bingads-webui-react/wizard';\r\nimport {\r\n SaveBlocker,\r\n DefaultTemplate,\r\n CancelWizardDialog,\r\n} from '@bingads-webui-react/wizard-ui-library';\r\nimport { FluentSwitcherContext } from '@bingads-webui-react/fluent-version-switcher';\r\nimport { withTheme } from 'react-jss';\r\nimport { WizardPerfMarker } from '@bingads-webui-campaign/wizard-performance-marker';\r\nimport { Scenario, Activity } from '@bingads-webui-react/hoc-with-signal';\r\nimport { InstrumentationContext } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { PerformanceMarkerProvider } from '@bingads-webui-campaign-react/performance-marker-provider';\r\nimport { withScope } from '@bingads-webui-react/scope-service';\r\nimport { withRecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { withPermissions } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { withSiteMap } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { getNeedConfirming } from '@bingads-webui-campaign-react/campaign-settings-utils';\r\n\r\nimport { STEP_PATHS } from './steps/step-constants';\r\nimport { useAssetGroupSettingStepRepository } from './steps/asset-group-setting';\r\nimport { AssetsStepShell } from './steps/assets';\r\nimport { PerfMaxSettingStepFooter } from './steps';\r\nimport { WizardLogger } from './shared/components/wizard-logger';\r\nimport { PMAX_WIZARD_ID_NAME } from './constants';\r\nimport { ProductsStepShell } from './steps/products';\r\n\r\nconst StepConfig = [\r\n {\r\n id: STEP_PATHS.ASSETGROUPSETTING,\r\n view: props => (\r\n \r\n \r\n {props?.data?.campaign?.ProviderId && }\r\n ),\r\n repository: useAssetGroupSettingStepRepository,\r\n },\r\n];\r\n\r\nexport const getAssetStepConfig = permissions => StepConfig.map((step) => {\r\n if (_.get(permissions, ['dynamic', 'ConversionAssociationWarningP2']) && step.id === STEP_PATHS.ASSETGROUPSETTING) {\r\n const mapStep = {\r\n ...step,\r\n machineOptions: {\r\n ...step.machineOptions,\r\n guards: {\r\n needsConfirming: context => getNeedConfirming(permissions, context),\r\n },\r\n },\r\n };\r\n return mapStep;\r\n }\r\n return step;\r\n});\r\n\r\nconst PerfMaxNorthStarAssetGroupSettingWizardInternal = ({\r\n perfMarker,\r\n scope,\r\n permissions,\r\n}) => {\r\n const instrumentation = useContext(InstrumentationContext);\r\n\r\n const wizardPerfMarker = useMemo(() => (\r\n perfMarker.createChild('PerfMaxNorthStarWizardAssetGroupSetting')\r\n ), [perfMarker]);\r\n\r\n const routeToNavigateToWhenDone = '/campaign/vnext/assetgroups';\r\n const wizardName = 'PerfMaxNorthStarWizard-asset-group-setting';\r\n\r\n const { dynamic: { AppsAdsPerfMaxFluentV2 } } = permissions;\r\n\r\n const wizardConfig = useMemo(() => ({\r\n id: PMAX_WIZARD_ID_NAME.PMAX_NORTH_STAR_SETTING_WIZARD,\r\n initialStep: STEP_PATHS.ASSETGROUPSETTING,\r\n steps: getAssetStepConfig(permissions),\r\n initialFlowFactors: { flow: STEP_PATHS.ASSETGROUPSETTING },\r\n initialWizardData: {\r\n flow: STEP_PATHS.ASSETGROUPSETTING,\r\n },\r\n getFlow: [STEP_PATHS.ASSETGROUPSETTING],\r\n actions: {\r\n onDone: () => scope.save(routeToNavigateToWhenDone),\r\n onExited: () => scope.save(routeToNavigateToWhenDone),\r\n },\r\n attachStepActivities: false,\r\n }), [permissions, scope]);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nPerfMaxNorthStarAssetGroupSettingWizardInternal.propTypes = {\r\n perfMarker: PropTypes.shape({\r\n createChild: PropTypes.func.isRequired,\r\n }).isRequired,\r\n scope: PropTypes.shape({\r\n save: PropTypes.func.isRequired,\r\n }).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n AppsAdsPerfMaxFluentV2: PropTypes.bool,\r\n ConversionAssociationWarningP2: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n siteMap: PropTypes.shape({}).isRequired,\r\n dynamicOptions: PropTypes.shape({}).isRequired,\r\n};\r\n\r\nexport const PerfMaxNorthStarAssetGroupSettingWizard = withSiteMap(withPermissions(withRecommendationContext(withScope(withTheme(PerfMaxNorthStarAssetGroupSettingWizardInternal, undefined, undefined, false, true)))));\r\n","import { useCallback, useContext, useMemo } from 'react';\r\nimport Promise from 'bluebird';\r\nimport _ from 'underscore';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { useWizardService } from '@bingads-webui-react/wizard';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { ActivityContext, ScenarioContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport {\r\n readCampaignNegativeWebpages,\r\n readDayTimeCriterions,\r\n readLocationCriterions,\r\n readNewCustomerAcquisitionGoals,\r\n // createOrUpdateAssetGroup,\r\n} from '@bingads-webui-campaign-react/perf-max-data';\r\nimport {\r\n loadCampaign,\r\n modelToViewModelForCampaign,\r\n loadBundleCountries,\r\n loadAssetGroupWithVideos,\r\n saveAssetGroupAndLinkedData,\r\n} from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport {\r\n getLoggerWithoutPageInfo,\r\n createVideoRepository,\r\n createImageRepository,\r\n createFolderRepository,\r\n uploadVideoMetadata,\r\n} from '@bingads-webui-campaign-react/asset-library-services';\r\nimport { PermissionsContext } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { getLogVersion } from '@bingads-webui-campaign-react/asset-library-model';\r\nimport { newVideoFromMTObject } from '@bingads-webui-campaign-react/image-experience-video-part';\r\nimport cacheManager from '@bingads-webui-campaign-legacy/cache-manager/index';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport { getODataConfig } from '../../shared/components/odata-config';\r\n\r\nexport const useAssetGroupSettingStepRepository = () => {\r\n const { state } = useWizardService();\r\n const { scope } = useContext(ScopeContext) || {};\r\n\r\n const serverContext = useContext(ServerContext);\r\n const activity = useContext(ActivityContext);\r\n const permissions = useContext(PermissionsContext);\r\n const scenarioContext = useContext(ScenarioContext);\r\n const isSearchThemeEnabled = serverContext.DynamicPermissions.SearchThemes;\r\n const isUrlRulesEnabled = serverContext.DynamicPermissions.AssetGroupUrlRules;\r\n const isNewCustomerAcquisitionEnabled = serverContext.DynamicPermissions.NewCustomerAcquisition;\r\n\r\n const i18n = useContext(I18nContext);\r\n\r\n const {\r\n cid, aid, campaignId, assetGroupId,\r\n } = scope.values;\r\n\r\n const oDataConfig = useMemo(() => getODataConfig(serverContext), [serverContext]);\r\n\r\n const {\r\n PMaxNewAspectRatios: isPMaxNewAspectRatiosEnabled,\r\n PMaxExcludeNewAspectRatios: isPMaxNewAspectRatiosExcluded,\r\n } = serverContext.DynamicPermissions || {};\r\n\r\n const isPMaxNewAspectRatios = isPMaxNewAspectRatiosEnabled && !isPMaxNewAspectRatiosExcluded;\r\n\r\n const versionForLog = getLogVersion(permissions);\r\n\r\n const logger = getLoggerWithoutPageInfo(activity, versionForLog, 'PMaxAdsStep');\r\n\r\n const videoRepository = createVideoRepository({\r\n oDataConfig,\r\n aid,\r\n cid,\r\n });\r\n\r\n const folderRepository = createFolderRepository({\r\n i18n,\r\n logger,\r\n oDataConfig,\r\n aid,\r\n cid,\r\n });\r\n\r\n const imageRepository = createImageRepository({\r\n oDataConfig,\r\n aid,\r\n cid,\r\n logger,\r\n i18n,\r\n activity,\r\n });\r\n\r\n const {\r\n isPublishing,\r\n } = state.context.wizardData;\r\n\r\n const uploadVideoIfNeeded = useCallback(({ assetGroup }) => {\r\n const videoPromises = [];\r\n\r\n if (!assetGroup.videos) {\r\n return Promise.resolve(assetGroup);\r\n }\r\n\r\n // check for videos in the assetGroup that dont have an id.\r\n assetGroup.videos.forEach((video) => {\r\n if (!video.id) {\r\n videoPromises.push(uploadVideoMetadata({\r\n videoMetadata: video,\r\n newVideoFromMTObject,\r\n folderRepository,\r\n imageRepository,\r\n videoRepository,\r\n }).then((newVideo) => {\r\n _.extend(video, newVideo);\r\n }));\r\n }\r\n });\r\n\r\n if (_.isEmpty(videoPromises)) {\r\n return Promise.resolve(assetGroup);\r\n }\r\n\r\n return Promise.all(videoPromises).then(() => assetGroup);\r\n }, [folderRepository, imageRepository, videoRepository]);\r\n\r\n const stepName = useMemo(() => (assetGroupId ? 'settings' : 'creation'), [assetGroupId]);\r\n\r\n const load = useCallback(() => {\r\n activity.trace(`[PmaxNorthStarAssetGroup${stepName}Wizard] - loadData started in asset group ${stepName} step`);\r\n const loadPromises = {\r\n campaign: loadCampaign(cid, aid, campaignId),\r\n locationTargets: readLocationCriterions(cid, aid, campaignId),\r\n bundleCountriesAndLocationCriterions: loadBundleCountries({\r\n cid,\r\n aid,\r\n serverContext,\r\n }),\r\n dayTimeCriterions: readDayTimeCriterions(cid, aid, campaignId),\r\n campaignNegativeWebpages: readCampaignNegativeWebpages(cid, aid, campaignId),\r\n assetGroup: assetGroupId ? loadAssetGroupWithVideos(cid, aid, campaignId, assetGroupId, i18n, isSearchThemeEnabled, isUrlRulesEnabled, videoRepository) : {},\r\n ...(isNewCustomerAcquisitionEnabled && { newCustomerAcquisitionGoals: readNewCustomerAcquisitionGoals(cid, aid) }),\r\n };\r\n\r\n if (isPMaxNewAspectRatios) {\r\n activity.trace('[PmaxNorthStarAssetGroupSettingWizard] - New Aspect Ratios is enabled');\r\n }\r\n\r\n return Promise.props(loadPromises).then(({\r\n campaign,\r\n locationTargets,\r\n bundleCountriesAndLocationCriterions,\r\n dayTimeCriterions,\r\n campaignNegativeWebpages,\r\n assetGroup,\r\n newCustomerAcquisitionGoals,\r\n }) => {\r\n const campaignData = modelToViewModelForCampaign({\r\n campaignModel: campaign,\r\n locationCriterionsModel: locationTargets ? locationTargets.value : [],\r\n dayTimeCriterionsModel: dayTimeCriterions ? dayTimeCriterions.value : [],\r\n campaignNegativeWebpagesModel: campaignNegativeWebpages ? campaignNegativeWebpages.value : [],\r\n bundleCountries: bundleCountriesAndLocationCriterions.bundleCountries,\r\n ...(isNewCustomerAcquisitionEnabled && { newCustomerAcquisitionGoalsModel: newCustomerAcquisitionGoals ? newCustomerAcquisitionGoals.value : [] }),\r\n });\r\n\r\n const data = {\r\n campaign: campaignData.data,\r\n assetGroup: assetGroup.data,\r\n };\r\n activity.trace(`[PmaxNorthStarAssetGroup${stepName}Wizard] - loadData succeeded in asset group ${stepName} step`);\r\n activity.signal(`[PmaxNorthStarAssetGroup${stepName}Wizard] - loadData succeeded in asset group ${stepName} step`);\r\n\r\n return data;\r\n }).catch((errorData) => {\r\n activity.trace(`[PmaxNorthStarAssetGroup${stepName}Wizard] loadData failed in asset group ${stepName} step. Error: ${JSON.stringify(errorData)}`);\r\n\r\n if (assetGroupId) {\r\n setClarityTag({ IsPmaxNorthStarAssetGroupSettingFailure: 'true' });\r\n } else {\r\n setClarityTag({ IsPmaxNorthStarAssetGroupCreationFailure: 'true' });\r\n }\r\n\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n error: {\r\n ...errorData,\r\n },\r\n });\r\n });\r\n }, [activity, stepName, cid, aid, campaignId, serverContext, assetGroupId, i18n, isSearchThemeEnabled, isUrlRulesEnabled, videoRepository, isNewCustomerAcquisitionEnabled, isPMaxNewAspectRatios]);\r\n\r\n const save = useCallback(({ data, initialData }) => {\r\n if (isPMaxNewAspectRatios) {\r\n activity.trace('[PmaxNorthStarAssetGroupSettingWizard] - New Aspect Ratios is enabled');\r\n }\r\n\r\n if (isPublishing) {\r\n return uploadVideoIfNeeded({ assetGroup: data.assetGroup }).then(() => saveAssetGroupAndLinkedData({\r\n assetGroup: { data: data.assetGroup },\r\n originalAssetGroup: { data: initialData.assetGroup },\r\n campaign: data.campaign,\r\n }, {\r\n scenario: scenarioContext.name,\r\n i18n,\r\n activityLogger: scenarioContext.createActivity('updateAssetGroup'),\r\n serverContext,\r\n cid,\r\n aid,\r\n activity,\r\n }).then(() => {\r\n activity.trace('[PmaxNorthStarAssetGroupSettingWizard] - asset group settings updated');\r\n activity.signal('[PmaxNorthStarAssetGroupSettingWizard] - asset group settings updated');\r\n\r\n cacheManager.invalidate('AssetGroup');\r\n }).catch((errorData) => {\r\n activity.trace('[PmaxNorthStarAssetGroupSettingWizard] - asset group settings update failed');\r\n setClarityTag({ IsPmaxNorthStarAssetGroupSettingFailure: 'true' });\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({ error: { ...errorData } });\r\n }));\r\n }\r\n\r\n // no update necessary if not publishing.\r\n return Promise.resolve({\r\n assetGroup: data.assetGroup,\r\n });\r\n }, [activity, aid, cid, i18n, isPMaxNewAspectRatios, isPublishing, scenarioContext, serverContext, uploadVideoIfNeeded]);\r\n\r\n return {\r\n load,\r\n save,\r\n };\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Alert } from '@bingads-webui-react/alert';\r\n\r\nexport const DuplicateWordAlert = () => {\r\n const i18n = useContext(I18nContext);\r\n return (\r\n )}\r\n dismissible\r\n />\r\n );\r\n};\r\n\r\nexport const TooLongWordAlert = () => {\r\n const i18n = useContext(I18nContext);\r\n return (\r\n )}\r\n dismissible\r\n />\r\n );\r\n};\r\n\r\nexport const MaxSelectionAlert = ({ selectedOptionsLimit }) => {\r\n const i18n = useContext(I18nContext);\r\n return (\r\n )}\r\n dismissible\r\n />\r\n\r\n );\r\n};\r\n\r\nMaxSelectionAlert.propTypes = {\r\n selectedOptionsLimit: PropTypes.number.isRequired,\r\n};\r\n","import _ from 'underscore';\r\nimport React, { useCallback, useContext, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n makeStyles,\r\n mergeClasses,\r\n shorthands,\r\n tokens,\r\n} from '@fluentui/react-components';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { SelectedItem } from '@bingads-webui-campaign-react/pill-item-components';\r\nimport { SearchBox } from '@fluentui/react';\r\nimport {\r\n MaxSelectionAlert,\r\n DuplicateWordAlert,\r\n} from './alerts';\r\n\r\n\r\nconst useSearchThemeSelectorStyles = makeStyles({\r\n root: {\r\n position: 'relative',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n ...shorthands.gap('10px'),\r\n },\r\n description: {\r\n marginBottom: tokens.spacingVerticalS,\r\n },\r\n tagsList: {\r\n marginBottom: tokens.spacingVerticalXS,\r\n marginTop: 0,\r\n paddingLeft: 0,\r\n display: 'flex',\r\n gridGap: tokens.spacingHorizontalXS,\r\n flexWrap: 'wrap',\r\n },\r\n searchBox: {\r\n flexDirection: 'row',\r\n columnGap: tokens.spacingHorizontalM,\r\n width: '100%',\r\n maxWidth: '600px',\r\n },\r\n alertMes: {\r\n marginTop: '10px',\r\n },\r\n});\r\n\r\nexport const SearchThemeSelectorImpl = ({ onUpdateSearchThemes: onChangeFromProp, searchThemes }) => {\r\n const i18n = useContext(I18nContext);\r\n const styles = useSearchThemeSelectorStyles();\r\n const [selectedOptions, setSelectedOptions] = useState(searchThemes);\r\n const [isLimitReached, setIsLimitReached] = useState(false);\r\n const [isDuplicate, seIsDuplicate] = useState(false);\r\n\r\n const maxOptionsLen = 25;\r\n const maxWordLen = 80;\r\n\r\n const onDeleteItem = useCallback((item) => {\r\n const newSelectedOptions = _.clone(selectedOptions);\r\n const indexSelected = newSelectedOptions.findIndex(option => option.SearchTheme === item.SearchTheme && !option.Status);\r\n const draftItem = newSelectedOptions[indexSelected];\r\n if (draftItem.Id) {\r\n newSelectedOptions[indexSelected].Status = 'Deleted';\r\n } else {\r\n newSelectedOptions.splice(indexSelected, 1);\r\n }\r\n if (_.isFunction(onChangeFromProp)) {\r\n onChangeFromProp(newSelectedOptions);\r\n }\r\n if (isLimitReached) {\r\n setIsLimitReached(false);\r\n }\r\n setSelectedOptions(newSelectedOptions);\r\n }, [selectedOptions, onChangeFromProp, isLimitReached]);\r\n\r\n const [searchValue, updateSearchValue] = useState('');\r\n\r\n return (\r\n
\r\n {i18n.getString(_TL_('Words or phrases that people search for on Bing (up to 25)'))}\r\n\r\n
\r\n {selectedOptions.filter(item => item.Status !== 'Deleted').map((item, index) => (\r\n onDeleteItem(item)}\r\n />\r\n ))}\r\n
\r\n\r\n
\r\n {\r\n const newVal = newValue.replace(/\\/|\\\\/g, '');\r\n const draftSelectedOptions = selectedOptions.filter(item => item.Status !== 'Deleted');\r\n if (!newVal) {\r\n updateSearchValue('');\r\n } else if (draftSelectedOptions.length >= maxOptionsLen) {\r\n setIsLimitReached(true);\r\n } else if (draftSelectedOptions.find(item => item.SearchTheme === newVal)) {\r\n seIsDuplicate(true);\r\n } else {\r\n setIsLimitReached(false);\r\n seIsDuplicate(false);\r\n selectedOptions.push({ SearchTheme: newVal });\r\n\r\n if (_.isFunction(onChangeFromProp)) {\r\n onChangeFromProp(selectedOptions);\r\n }\r\n\r\n updateSearchValue('');\r\n }\r\n }}\r\n onClear={() => {\r\n updateSearchValue('');\r\n seIsDuplicate(false);\r\n setIsLimitReached(false);\r\n }}\r\n onChange={(e, newValue) => {\r\n const newVal = newValue.replace(/\\/|\\\\/g, '');\r\n updateSearchValue(newVal);\r\n seIsDuplicate(false);\r\n }}\r\n />\r\n\r\n
\r\n {isLimitReached && }\r\n {isDuplicate && }\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nSearchThemeSelectorImpl.propTypes = {\r\n onUpdateSearchThemes: PropTypes.func,\r\n searchThemes: PropTypes.arrayOf(PropTypes.shape({})),\r\n};\r\n\r\nSearchThemeSelectorImpl.defaultProps = {\r\n onUpdateSearchThemes: undefined,\r\n searchThemes: [],\r\n};\r\n","import React, { useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { withCustomValidation } from '@bingads-webui-react/validation';\r\nimport { SearchThemeSelectorImpl } from './search-theme-selector-section-impl';\r\n\r\nexport const SearchThemeSelector = ({\r\n searchThemes, onUpdateSearchThemes,\r\n}) => (\r\n \r\n);\r\n\r\nSearchThemeSelector.propTypes = {\r\n searchThemes: PropTypes.arrayOf(PropTypes.shape({})),\r\n onUpdateSearchThemes: PropTypes.func.isRequired,\r\n};\r\nSearchThemeSelector.defaultProps = {\r\n searchThemes: [],\r\n};\r\n\r\nexport const ValidationSearchThemeSelectorInternal = ({\r\n searchThemes, updateValidation,\r\n}) => {\r\n const onUpdateSearchThemes = useCallback((newsearchThemes) => {\r\n updateValidation([], { AssetGroupSearchThemes: [...newsearchThemes] });\r\n }, [updateValidation]);\r\n return ;\r\n};\r\nValidationSearchThemeSelectorInternal.propTypes = {\r\n searchThemes: PropTypes.arrayOf(PropTypes.shape({})),\r\n updateValidation: PropTypes.func.isRequired,\r\n};\r\nValidationSearchThemeSelectorInternal.defaultProps = {\r\n searchThemes: [],\r\n};\r\nexport const ValidationSearchThemeSelector = withCustomValidation(ValidationSearchThemeSelectorInternal);\r\n","import { useEffect, useState } from 'react';\r\n\r\nexport const useImpulse = (activate) => {\r\n const [isActive, setIsActive] = useState(false);\r\n const [isRestarting, setIsRestarting] = useState(false);\r\n\r\n if (activate) {\r\n if (isActive && !isRestarting) {\r\n setIsRestarting(true);\r\n setIsActive(false);\r\n } else if (!isActive) {\r\n setIsActive(true);\r\n }\r\n }\r\n useEffect(() => {\r\n if (isRestarting && !isActive) {\r\n setIsActive(true);\r\n setIsRestarting(false);\r\n }\r\n }, [isActive, isRestarting]);\r\n\r\n return isActive;\r\n};\r\n","import { useEffect, useRef } from 'react';\r\n\r\nexport const useIsMounted = () => {\r\n const isMountedRef = useRef(false);\r\n useEffect(() => {\r\n isMountedRef.current = true;\r\n return () => {\r\n isMountedRef.current = false;\r\n };\r\n }, []);\r\n\r\n return isMountedRef;\r\n};\r\n","import { mergeStyles } from '@bingads-webui-campaign-react/common-styles';\r\n\r\nexport const getStyles = (theme, palette = {}) => ({\r\n budgetContainer: {\r\n ...mergeStyles(\r\n { theme },\r\n {\r\n '& .container-budget': {\r\n '& span': {\r\n color: palette.neutralPrimary,\r\n },\r\n '& .form-control-static': {\r\n padding: '9px 0px',\r\n lineHeight: '14px',\r\n minHeight: 'auto',\r\n },\r\n '& .input-group': {\r\n marginLeft: 15,\r\n '& .input-group-addon': {\r\n color: '#323130',\r\n border: 0,\r\n padding: '6px',\r\n background: '#ffffff',\r\n },\r\n },\r\n '& .col-sm-3': {\r\n display: 'table',\r\n paddingRight: 0,\r\n paddingLeft: 0,\r\n },\r\n '& .margin-rt-five': {\r\n paddingLeft: 28,\r\n },\r\n\r\n },\r\n '& span.bold': {\r\n fontWeight: 1000,\r\n },\r\n '& .alert-budget-button': {\r\n marginLeft: '10px',\r\n paddingTop: '5px',\r\n '& button': {\r\n color: 'black',\r\n fontSize: '13px',\r\n fontWeight: 500,\r\n borderColor: '#edebe9',\r\n },\r\n },\r\n }\r\n ),\r\n },\r\n});\r\n","/* eslint-disable react-hooks/exhaustive-deps */\r\nimport React, { useEffect, useRef, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { clone } from 'underscore';\r\nimport classnames from 'classnames';\r\nimport Backbone from 'backbone';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport BudgetView from '@bingads-webui-campaign-legacy/budget/view/budget';\r\nimport '@bingads-webui-campaign/ko-stop-binding';\r\nimport PageContext from '@bingads-webui-static-legacy/page-context';\r\nimport { getStyles } from './style';\r\n\r\nexport const LegacyBudget = React.memo(({\r\n id, className, campaignId, budget, onChange, i18n, validationDailyMinBudget, hideBudgetMinRecommendation,\r\n}) => {\r\n const view = useRef();\r\n const viewListener = useMemo(() => clone(Backbone.Events), []);\r\n let container;\r\n\r\n useEffect(() => {\r\n view.current = new BudgetView({\r\n withRealTimeUpdates: true,\r\n model: budget,\r\n campaignId,\r\n isForVNext: true,\r\n hideDailyBudgetOptions: true,\r\n showBudgetMinRecommend: PageContext.Permissions.dynamic.BCCBudgetImprovementEnabled &&\r\n campaignId !== undefined &&\r\n !hideBudgetMinRecommendation,\r\n currencySymbol: i18n.getCurrencySymbol(PageContext.AccountCurrencyCode),\r\n minimumBudget: budget ? budget.Amount * 0.5 : undefined,\r\n validationDailyMinBudget,\r\n });\r\n\r\n view.current.render();\r\n view.current.$el.appendTo(container);\r\n\r\n return () => {\r\n view.current.remove();\r\n };\r\n }, []);\r\n\r\n useEffect(() => {\r\n viewListener.listenTo(view.current, 'change', onChange);\r\n\r\n return () => viewListener.stopListening(view.current);\r\n }, [onChange, viewListener]);\r\n\r\n useEffect(() => {\r\n view.current.update(budget);\r\n }, [budget]);\r\n\r\n const classes = useDefaultStyles(getStyles);\r\n\r\n return (\r\n \r\n
{ container = ref; }} />\r\n
\r\n );\r\n});\r\n\r\nLegacyBudget.propTypes = {\r\n id: PropTypes.string,\r\n className: PropTypes.string,\r\n campaignId: PropTypes.string,\r\n budget: PropTypes.shape({\r\n Amount: PropTypes.number,\r\n }),\r\n onChange: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({ getCurrencySymbol: PropTypes.func.isRequired }).isRequired,\r\n validationDailyMinBudget: PropTypes.number,\r\n hideBudgetMinRecommendation: PropTypes.bool,\r\n};\r\n\r\nLegacyBudget.defaultProps = {\r\n id: undefined,\r\n className: undefined,\r\n budget: undefined,\r\n campaignId: undefined,\r\n validationDailyMinBudget: undefined,\r\n hideBudgetMinRecommendation: false,\r\n};\r\n","import _ from 'underscore';\r\nimport React, { useCallback, useContext, useState, useEffect, useMemo } from 'react';\r\nimport { Text } from '@fluentui/react';\r\nimport { HelpPopup } from '@bingads-webui-react/help-popup';\r\nimport PropTypes from 'prop-types';\r\nimport { withCustomValidation } from '@bingads-webui-react/validation';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { LegacyBudget } from '@bingads-webui-campaign-react/legacy-budget';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { BudgetSuggestionDialog, useBudgetSuggestionRepository, MODE } from '@bingads-webui-campaign-react/budget-suggestion-v2';\r\nimport { CampaignTypes } from '@bingads-webui-campaign-react/constants';\r\n// eslint-disable-next-line\r\nimport _bingads_webui_static_legacy_page_context from '@bingads-webui-static-legacy/page-context';\r\n// eslint-disable-next-line\r\nconst { BudgetRange } = _bingads_webui_static_legacy_page_context;\r\n\r\nconst LegacyBudgetWithCustomValidation = ({\r\n campaignId, showBudgetSuggestion, isCampaignSetting, currency, validationProps, updateValidation, campaign, isPremiumStreaming, ...restProps\r\n}) => {\r\n const { data } = validationProps;\r\n const i18n = useContext(I18nContext);\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const { DailyRange } = BudgetRange || {};\r\n\r\n const budgetSuggestion = useMemo(() => ({\r\n Currency: currency,\r\n GlobalMaximumBudget: { DailyBudget: DailyRange.CeilingValue ? DailyRange.CeilingValue : 3000000 },\r\n GlobalMinimumBudget: { DailyBudget: DailyRange.FloorValue ? DailyRange.FloorValue : 0.05 },\r\n }), [currency, DailyRange.CeilingValue, DailyRange.FloorValue]);\r\n\r\n const onChange = useCallback((newData, newIsValid) => {\r\n updateValidation(newIsValid ? [] : [i18n.getString(_TL_('Legacy Budget has validation errors'))], { Budget: newData });\r\n if (activity) {\r\n // signal activity to parent\r\n activity.signal(`onLegacyBudgetChange - ${JSON.stringify(newData.Amount)} - isValid: ${newIsValid}}`);\r\n }\r\n }, [i18n, updateValidation, activity]);\r\n\r\n const [budgetSuggestionData, setBudgetSuggestionData] = useState(null);\r\n const {\r\n loadBudget,\r\n } = useBudgetSuggestionRepository({\r\n campaignId,\r\n mode: MODE.EDITING,\r\n campaignType: CampaignTypes.PerformanceMax,\r\n currency,\r\n });\r\n\r\n\r\n useEffect(() => {\r\n if (showBudgetSuggestion && isCampaignSetting) {\r\n loadBudget({ campaign: {}, assetGroup: {} }).then((datas) => {\r\n setBudgetSuggestionData(datas);\r\n }).finally(() => {\r\n });\r\n }\r\n }, [isCampaignSetting, loadBudget, showBudgetSuggestion]);\r\n\r\n return (\r\n
\r\n
\r\n {i18n.getString(_TL_('Daily budget'))}\r\n \r\n
\r\n \r\n\r\n {/* will check Delivery Status in campaign when MT added */}\r\n {/* {showBudgetSuggestion && (data.DeliveryStatus === 'BudgetSuggestions' || 'BudgetSuggestions' in data.DeliveryStatusDetails) && isCampaignSetting && */}\r\n {showBudgetSuggestion &&\r\n isCampaignSetting &&\r\n !_.isEmpty(budgetSuggestionData) &&\r\n \r\n }\r\n
\r\n\r\n );\r\n};\r\n\r\nLegacyBudgetWithCustomValidation.propTypes = {\r\n campaignId: PropTypes.string.isRequired,\r\n validationProps: PropTypes.shape({\r\n data: PropTypes.shape({\r\n Budget: PropTypes.shape({\r\n Amount: PropTypes.number,\r\n }),\r\n DeliveryStatus: PropTypes.string,\r\n DeliveryStatusDetails: PropTypes.arrayOf(PropTypes.string),\r\n }),\r\n }).isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n showBudgetSuggestion: PropTypes.bool,\r\n isCampaignSetting: PropTypes.bool,\r\n isPremiumStreaming: PropTypes.bool,\r\n currency: PropTypes.string,\r\n campaign: PropTypes.shape({\r\n data: PropTypes.shape({\r\n }),\r\n }),\r\n};\r\n\r\nLegacyBudgetWithCustomValidation.defaultProps = {\r\n showBudgetSuggestion: false,\r\n isCampaignSetting: false,\r\n isPremiumStreaming: false,\r\n currency: 'USD',\r\n campaign: {\r\n data: {},\r\n },\r\n};\r\n\r\nexport const ValidatedLegacyBudget = withCustomValidation(LegacyBudgetWithCustomValidation);\r\n\r\n","import { isEqual } from 'underscore';\r\nimport React, { useCallback, useContext, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Text } from '@fluentui/react';\r\nimport { buildLegacyI18n } from '@bingads-webui/build-legacy-i18n';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { withCustomValidation } from '@bingads-webui-react/validation';\r\nimport { useP$DaterangeDefault, ConversionGoalKeyToStringMapping } from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport {\r\n ConversionGoalSelector,\r\n} from '@bingads-webui-campaign-react/goal-selector';\r\nimport { LearnMoreLink } from '@bingads-webui-campaign-react/help';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { paginationStyle } from '@bingads-webui-campaign-react/common-styles';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\n\r\nexport const getConversionGoalStyles = (_, theme) => ({\r\n ConversionGoalSelectorContainer: {\r\n ...paginationStyle(theme),\r\n '& .list-selector-container': {\r\n width: 468,\r\n },\r\n },\r\n});\r\n\r\nconst ConversionGoalsWithCustomValidation = ({ validationProps, updateValidation, ...restProps }) => {\r\n const { data: conversionGoalsData } = validationProps;\r\n const { conversionGoals = {} } = conversionGoalsData;\r\n const i18n = useContext(I18nContext);\r\n\r\n const classes = useDefaultStyles(getConversionGoalStyles);\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const legacyI18n = useMemo(() => buildLegacyI18n(\r\n i18n,\r\n [ConversionGoalKeyToStringMapping]\r\n ), [i18n]);\r\n const $dataRange = useP$DaterangeDefault();\r\n\r\n const onChange = useCallback((changedData) => {\r\n const newData = {\r\n conversionGoals: {\r\n ...conversionGoalsData.conversionGoals,\r\n ...changedData,\r\n },\r\n };\r\n\r\n updateValidation([], isEqual(newData, conversionGoalsData) ? conversionGoalsData : newData);\r\n\r\n if (activity) {\r\n activity.signal(`onConversionGoalsChange - ${JSON.stringify(newData)}`);\r\n }\r\n }, [conversionGoalsData, updateValidation, activity]);\r\n const campaignConversionGoal = useMemo(() => ({\r\n Goals: conversionGoals.originalConversionGoals,\r\n }), [conversionGoals.originalConversionGoals]);\r\n\r\n return (conversionGoals && conversionGoals.goalScopeSelection ?\r\n
\r\n
\r\n {i18n.getString(_TL_('Select which conversions are included in the Conversion columns for this campaign and used for optimizing your bid strategy. Updating this setting will override the “Include in conversions” setting made at the account level.'))}\r\n \r\n
\r\n \r\n
: null\r\n );\r\n};\r\n\r\nConversionGoalsWithCustomValidation.propTypes = {\r\n validationProps: PropTypes.shape({\r\n data: PropTypes.shape({\r\n conversionGoals: PropTypes.shape({\r\n goalSelection: PropTypes.arrayOf(PropTypes.shape({})),\r\n goalScopeSelection: PropTypes.string,\r\n originalConversionGoals: PropTypes.arrayOf(PropTypes.shape({})),\r\n }),\r\n }),\r\n }).isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n showTrackingStatusIcon: PropTypes.bool, // included in restProps\r\n};\r\n\r\nConversionGoalsWithCustomValidation.defaultProps = {\r\n showTrackingStatusIcon: false,\r\n};\r\n\r\nexport const ValidatedConversionGoals = withCustomValidation(ConversionGoalsWithCustomValidation);\r\n","import { isEqual } 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 { withCustomValidation } from '@bingads-webui-react/validation';\r\nimport { GoalSelector } from '@bingads-webui-campaign-react/goal-selector-v3';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\n\r\nimport { getConversionGoalStyles } from './validated-conversion-goals';\r\n\r\nconst ConversionGoalsWithCustomValidation = ({\r\n validationProps, updateValidation, cid, aid, ...restProps\r\n}) => {\r\n const { data: conversionGoalsData } = validationProps;\r\n const { conversionGoals = {} } = conversionGoalsData;\r\n const i18n = useContext(I18nContext);\r\n const classes = useDefaultStyles(getConversionGoalStyles);\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const onChange = useCallback((changedData) => {\r\n const newData = {\r\n conversionGoals: {\r\n ...conversionGoalsData.conversionGoals,\r\n ...changedData,\r\n },\r\n };\r\n\r\n updateValidation([], isEqual(newData, conversionGoalsData) ? conversionGoalsData : newData);\r\n\r\n if (activity) {\r\n activity.signal(`onConversionGoalsChange - ${JSON.stringify(newData)}`);\r\n }\r\n }, [conversionGoalsData, updateValidation, activity]);\r\n\r\n const campaignConversionGoal = useMemo(() => ({\r\n Goals: conversionGoals.originalConversionGoals,\r\n }), [conversionGoals.originalConversionGoals]);\r\n\r\n return (conversionGoals && conversionGoals.goalScopeSelection ?\r\n
\r\n \r\n
: null\r\n );\r\n};\r\n\r\nConversionGoalsWithCustomValidation.propTypes = {\r\n validationProps: PropTypes.shape({\r\n data: PropTypes.shape({\r\n conversionGoals: PropTypes.shape({\r\n goalSelection: PropTypes.arrayOf(PropTypes.shape({})),\r\n goalScopeSelection: PropTypes.string,\r\n originalConversionGoals: PropTypes.arrayOf(PropTypes.shape({})),\r\n }),\r\n }),\r\n }).isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n isCreationWorkflow: PropTypes.bool,\r\n cid: PropTypes.number.isRequired,\r\n aid: PropTypes.number.isRequired,\r\n};\r\n\r\nConversionGoalsWithCustomValidation.defaultProps = {\r\n isCreationWorkflow: false,\r\n};\r\n\r\nexport const ValidatedConversionGoalsScopeSelector = withCustomValidation(ConversionGoalsWithCustomValidation);\r\n","import { withValidation, withError } from '@bingads-webui-react/validation';\r\nimport { TextField } from '@bingads-webui-react/fabric-control';\r\n\r\nexport const ValidatedTextField = withError(withValidation(TextField));\r\n","import { identity, pluck } from 'underscore';\r\nimport React, { useCallback, useMemo, useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { DefaultButton, ChoiceGroup, Text, Stack } from '@fluentui/react';\r\nimport { withScope } from '@bingads-webui-react/scope-service';\r\nimport { Glyphicon } from '@bingads-webui-react/primitive';\r\nimport { withCustomValidation } from '@bingads-webui-react/validation';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { getRoutePathById, withCampaignSiteMap } from '@bingads-webui-react/with-site-map';\r\nimport { PanelSelector, useTreeViewPanelSelector, fillDataToBulkAddedItem, useAPIsOfListingGroup } from '@bingads-webui-campaign-react/listing-groups-page';\r\nimport { SelectedItem } from '@bingads-webui-campaign-react/pill-item-components';\r\nimport { withStoreFromProviderId } from '@bingads-webui-campaign-react/with-store-details';\r\nimport { useDateRange } from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport { siteMapPropType } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { HelpPopup } from '@bingads-webui-react/help-popup';\r\n\r\nexport const getStyles = (_, { palette = {} }) => ({\r\n productOptions: {\r\n '& label': {\r\n padding: 0,\r\n fontWeight: 'normal',\r\n },\r\n },\r\n buttonContainer: {\r\n marginTop: 10,\r\n '& .iconba': {\r\n fontSize: '16px',\r\n color: palette.themePrimary,\r\n marginRight: '8px',\r\n paddingBottom: '5px', // align to link\r\n },\r\n },\r\n merchantCenterAccountContainer: {\r\n marginBottom: 12,\r\n },\r\n productFilterEditContainer: {\r\n marginBottom: 12,\r\n },\r\n});\r\n\r\nconst stackContainerToken = {\r\n childrenGap: 8,\r\n};\r\n\r\nconst ListingGroupsWithCustomValidation = (props) => {\r\n const {\r\n scope, campaignId, i18n, updateValidation, campaignSettings, siteMap, listingGroup, storeDetails, assetGroupId, onClickNavigateToListingGroups,\r\n } = props;\r\n const classes = useDefaultStyles(getStyles);\r\n const {\r\n isTreeViewSelectorOpen,\r\n setIsTreeViewSelectorOpen,\r\n treeViewSelectorColumns,\r\n treeViewSelectorDimensions,\r\n treeViewSelectorInitialSelectedItems,\r\n treeViewSelectorItems,\r\n treeViewSelectorHeaderText,\r\n onTreeViewCancel,\r\n onTreeViewSelectedDimensionChangeWithoutStatistics,\r\n isTreeViewShimmerEnabled,\r\n onFilterProduct,\r\n } = useTreeViewPanelSelector({\r\n i18n,\r\n setAllRowRawData: identity,\r\n scope,\r\n currentCampaign: {\r\n Id: campaignId,\r\n CampaignSettings: [campaignSettings],\r\n },\r\n refreshGridData: identity,\r\n getArguemntsOfUpdateGridDataByCurrentState: identity,\r\n });\r\n const { listingGroupGridData } = useAPIsOfListingGroup();\r\n const options = useMemo(() => [\r\n {\r\n key: 'all-products',\r\n text: i18n.getString(_TL_('All products')),\r\n },\r\n {\r\n key: 'filter-products',\r\n text: (\r\n
\r\n {i18n.getString(_TL_('Filtered products'))}\r\n \r\n
\r\n ),\r\n },\r\n ], [i18n]);\r\n const isEditing = useMemo(() => !!scope.values.assetGroupId || assetGroupId, [assetGroupId, scope.values.assetGroupId]);\r\n const [selectedOption, setSelectedOption] = useState(listingGroup && listingGroup.items && listingGroup.items.length > 0 ? options[1] : options[0]);\r\n const [selectedProducts, setSelectedProducts] = useState(listingGroup && listingGroup.items);\r\n const [selectedOperand, setSelectedOperand] = useState(listingGroup && listingGroup.operand);\r\n const [productFilter, setProductFilter] = useState(null);\r\n\r\n const onChange = useCallback((newData, selectedDimension) => {\r\n newData.forEach((selectedItem) => {\r\n fillDataToBulkAddedItem(selectedItem);\r\n });\r\n setSelectedProducts(newData);\r\n setSelectedOperand(selectedDimension);\r\n setIsTreeViewSelectorOpen(false);\r\n updateValidation([], {\r\n listingGroup: {\r\n items: newData,\r\n operand: selectedDimension.data.operand,\r\n },\r\n });\r\n }, [setIsTreeViewSelectorOpen, updateValidation]);\r\n const onOpenPanel = useCallback(() => {\r\n onFilterProduct();\r\n }, [onFilterProduct]);\r\n const onDeleteProduct = useCallback((index) => {\r\n selectedProducts.splice(index, 1);\r\n setSelectedProducts([...selectedProducts]);\r\n updateValidation([], {\r\n listingGroup: {\r\n items: [...selectedProducts],\r\n operand: selectedOperand.data.operand,\r\n },\r\n });\r\n }, [selectedOperand, selectedProducts, updateValidation]);\r\n const navigateToListingGroupPage = useCallback(() => {\r\n if (onClickNavigateToListingGroups) {\r\n onClickNavigateToListingGroups();\r\n } else {\r\n scope.save(getRoutePathById(siteMap, 'listing-groups'));\r\n }\r\n }, [onClickNavigateToListingGroups, scope, siteMap]);\r\n const onChangeOptions = useCallback((_, option) => {\r\n setSelectedOption(option);\r\n\r\n const hasSelectedProducts = selectedProducts && selectedProducts.length > 0;\r\n const hasSelectedOperand = selectedOperand && selectedOperand.data && selectedOperand.data.operand;\r\n\r\n const updatedListingGroup = option.key === 'all-products' || !hasSelectedProducts || !hasSelectedOperand ?\r\n null : { items: selectedProducts, operand: selectedOperand.data.operand };\r\n\r\n updateValidation([], { listingGroup: updatedListingGroup });\r\n }, [selectedOperand, selectedProducts, updateValidation]);\r\n\r\n const dataRange = useDateRange();\r\n\r\n useEffect(() => {\r\n if (isEditing) {\r\n listingGroupGridData({\r\n queryOptions: {\r\n $top: 2,\r\n },\r\n entityPath: {\r\n accountId: scope.values.aid,\r\n campaignId: scope.values.campaignId || campaignId,\r\n customerId: scope.values.cid,\r\n assetGroupId: scope.values.assetGroupId || assetGroupId,\r\n },\r\n payload: {\r\n gridDataParameters: {\r\n DateRange: {\r\n StartDate: dataRange.StartDate,\r\n EndDate: dataRange.EndDate,\r\n },\r\n },\r\n },\r\n }).then(({ value }) => {\r\n if (value.length === 1) {\r\n setProductFilter(i18n.getString('ProductsGrid_Column_All'));\r\n updateValidation([], {\r\n productFilter: i18n.getString('ProductsGrid_Column_All'),\r\n });\r\n } else if (value.length === 2) {\r\n setProductFilter(i18n.getString(`ProductsGrid_Column_${value[1].Condition.Operand}`));\r\n updateValidation([], {\r\n productFilter: i18n.getString(`ProductsGrid_Column_${value[1].Condition.Operand}`),\r\n });\r\n }\r\n });\r\n }\r\n // Remove the functions from dependency to reduce duplicate calls\r\n }, [scope.values.cid, scope.values.aid, scope.values.uid, dataRange.StartDate, dataRange.EndDate, scope.values.campaignId, scope.values.assetGroupId, isEditing, campaignId, assetGroupId]);\r\n\r\n return (\r\n
\r\n {storeDetails && storeDetails.text &&\r\n
\r\n \r\n {i18n.getString(_TL_('Merchant Center account: '))}\r\n \r\n \r\n {storeDetails.text}\r\n \r\n
\r\n }\r\n {isEditing && productFilter &&\r\n
\r\n
\r\n \r\n {i18n.getString(_TL_('Products:'))}\r\n \r\n \r\n {`${i18n.getString(_TL_(' Filtered by '))}${productFilter}`}\r\n \r\n
\r\n
\r\n \r\n {i18n.getString(_TL_('Go to listing groups'))}\r\n \r\n
\r\n
\r\n }\r\n {\r\n !isEditing &&\r\n \r\n }\r\n {!isEditing && selectedOption.key === 'filter-products' &&\r\n
\r\n
\r\n \r\n {pluck(selectedProducts, 'primary').map((item, index) => (\r\n \r\n ))}\r\n \r\n
\r\n
\r\n \r\n \r\n {i18n.getString(_TL_('Add filter'))}\r\n \r\n
\r\n
\r\n }\r\n {isTreeViewSelectorOpen && []}// TO DO SIMXU update to real error handling\r\n isOpen={isTreeViewSelectorOpen}\r\n columns={treeViewSelectorColumns}\r\n dimensions={treeViewSelectorDimensions}\r\n headerText={treeViewSelectorHeaderText}\r\n initialSelectedItems={treeViewSelectorInitialSelectedItems}\r\n items={treeViewSelectorItems}\r\n onCancel={onTreeViewCancel}\r\n onSave={onChange}\r\n onSelectedDimensionChange={onTreeViewSelectedDimensionChangeWithoutStatistics}\r\n enableShimmer={isTreeViewShimmerEnabled}\r\n keyOfItem={item => item.key}\r\n isBulkAddEnabledForDimension={d => d.data.isBulkAddEnabled}\r\n />}\r\n
\r\n );\r\n};\r\n\r\nListingGroupsWithCustomValidation.propTypes = {\r\n validationProps: PropTypes.shape({\r\n data: PropTypes.shape({\r\n locationTargets: PropTypes.shape({}),\r\n }),\r\n }).isRequired,\r\n scope: PropTypes.shape({\r\n values: PropTypes.shape({\r\n cid: PropTypes.number.isRequired,\r\n aid: PropTypes.number.isRequired,\r\n uid: PropTypes.number.isRequired,\r\n campaignId: PropTypes.number.isRequired,\r\n assetGroupId: PropTypes.number,\r\n }).isRequired,\r\n save: PropTypes.func.isRequired,\r\n }).isRequired,\r\n campaignId: PropTypes.number.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n campaignSettings: PropTypes.arrayOf(PropTypes.shape({})),\r\n siteMap: siteMapPropType.isRequired,\r\n listingGroup: PropTypes.shape({\r\n items: PropTypes.arrayOf(PropTypes.shape({\r\n key: PropTypes.string,\r\n })),\r\n operand: PropTypes.string,\r\n }),\r\n storeDetails: PropTypes.shape({\r\n text: PropTypes.string,\r\n }),\r\n assetGroupId: PropTypes.number,\r\n onClickNavigateToListingGroups: PropTypes.func,\r\n};\r\n\r\nListingGroupsWithCustomValidation.defaultProps = {\r\n campaignSettings: [],\r\n listingGroup: {},\r\n storeDetails: undefined,\r\n assetGroupId: undefined,\r\n onClickNavigateToListingGroups: undefined,\r\n};\r\n\r\nexport const ValidatedListingGroups = withCampaignSiteMap(withScope(withCustomValidation(withStoreFromProviderId(ListingGroupsWithCustomValidation))));\r\n","import React, { useCallback, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { withCustomValidation } from '@bingads-webui-react/validation';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n LocationTargetSetting,\r\n isLocationValid,\r\n} from '@bingads-webui-campaign/hotel-common-targets';\r\n\r\nconst LocationTargetSettingWithCustomValidation = ({\r\n validationProps, updateValidation, skipValidation, allowBidAdjustment, dealInfo, ...restProps\r\n}) => {\r\n const { data: locationTargets } = validationProps;\r\n const i18n = useContext(I18nContext);\r\n const activity = useContext(ActivityContext);\r\n\r\n const onChange = useCallback((newData) => {\r\n let errors = [];\r\n\r\n if (!skipValidation) {\r\n errors = isLocationValid(newData) ? [] : [i18n.getString(_TL_('Location target has validation errors'))];\r\n }\r\n\r\n const isForDeal = _.get(dealInfo, 'isForDeal', false);\r\n if (isForDeal) {\r\n errors = isLocationValid(newData, 'placeholder', dealInfo) ? [] : [i18n.getString(_TL_('Location target has validation errors.'))];\r\n }\r\n\r\n updateValidation(errors, { locationTargets: newData });\r\n\r\n if (activity) {\r\n // signal activity to parent\r\n activity.signal(`onLocationTargettingChange - ${JSON.stringify(newData)}`);\r\n }\r\n }, [skipValidation, updateValidation, activity, i18n, dealInfo]);\r\n\r\n return (locationTargets ?\r\n :
\r\n );\r\n};\r\n\r\nLocationTargetSettingWithCustomValidation.propTypes = {\r\n validationProps: PropTypes.shape({\r\n data: PropTypes.shape({\r\n locationTargets: PropTypes.shape({}),\r\n }),\r\n }).isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n skipValidation: PropTypes.bool,\r\n allowBidAdjustment: PropTypes.bool,\r\n dealInfo: PropTypes.shape({\r\n isForDeal: PropTypes.bool,\r\n dealCountryCode: PropTypes.string,\r\n dealSupportedLocationType: PropTypes.arrayOf(PropTypes.string),\r\n }),\r\n};\r\n\r\nLocationTargetSettingWithCustomValidation.defaultProps = {\r\n skipValidation: true,\r\n allowBidAdjustment: false,\r\n dealInfo: {},\r\n};\r\n\r\nexport const ValidatedLocationTargetSetting = withCustomValidation(LocationTargetSettingWithCustomValidation);\r\n","import React, { useContext, } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { withUnvalidatedControlErrors, withControlErrorHandling } from '@bingads-webui-campaign-react/error-handling';\r\nimport {\r\n entityIs,\r\n anyComp,\r\n} from '@bingads-webui-campaign-react/form-error';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { getLocationTargetingStyles } from '@bingads-webui-campaign-react/location-targeting';\r\nimport {\r\n TextTitle,\r\n ValidatedPanel,\r\n getPanelErrorProps\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { SectionShimmer, getLocationTargetTitleDetails, ERROR_ENTITY } from '@bingads-webui-campaign-react/wizard-shared-components';\r\n\r\nimport { LocationImg } from './media';\r\nimport { ValidatedLocationTargetSetting } from './validated-location-target-setting';\r\n\r\nconst getTargetingStyles = () => ({\r\n container: {\r\n maxWidth: 680,\r\n '& .title-item': {\r\n width: 'unset !important',\r\n },\r\n '& .specific-location-targets-editor': {\r\n marginLeft: '-25px !important',\r\n },\r\n '& .intent-target ul': {\r\n paddingLeft: '20px',\r\n },\r\n },\r\n header: {\r\n marginBottom: 20,\r\n },\r\n ...getLocationTargetingStyles(),\r\n});\r\n\r\nconst campaignLocationCriterions = anyComp(\r\n entityIs(ERROR_ENTITY.CampaignLocation),\r\n entityIs(ERROR_ENTITY.CampaignRadius),\r\n entityIs(ERROR_ENTITY.CampaignNegativeLocation),\r\n entityIs(ERROR_ENTITY.CampaignLocationIntent)\r\n);\r\n\r\nconst ServerValidatedLocationTargetSetting = withControlErrorHandling(withUnvalidatedControlErrors(\r\n ValidatedLocationTargetSetting,\r\n { filter: campaignLocationCriterions }\r\n));\r\n\r\nexport const LocationTargetingSettingPanel = (props) => {\r\n const { scope } = useContext(ScopeContext) || {};\r\n const i18n = useContext(I18nContext);\r\n const classes = useDefaultStyles(getTargetingStyles);\r\n\r\n const {\r\n key,\r\n isLoading,\r\n options,\r\n expand,\r\n data = {},\r\n topicKey,\r\n ...rest\r\n } = props;\r\n\r\n\r\n return (\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand,\r\n expandKey: key,\r\n }}\r\n {...rest}\r\n >\r\n {\r\n isLoading ?\r\n :\r\n
\r\n \r\n
\r\n }\r\n \r\n );\r\n};\r\n\r\nLocationTargetingSettingPanel.propTypes = {\r\n key: PropTypes.string.isRequired,\r\n isLoading: PropTypes.bool,\r\n options: PropTypes.shape({\r\n bundleCountries: PropTypes.arrayOf(PropTypes.shape({})),\r\n bundleLocationCriterions: PropTypes.arrayOf(PropTypes.shape({})),\r\n }),\r\n expand: PropTypes.func.isRequired,\r\n data: PropTypes.shape({}),\r\n topicKey: PropTypes.string,\r\n};\r\n\r\nLocationTargetingSettingPanel.defaultProps = {\r\n isLoading: false,\r\n options: {},\r\n data: {},\r\n topicKey: null,\r\n};\r\n","import React, { useContext, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { AudienceWizard } from '@bingads-webui-campaign-react/audience-signals';\r\nimport {\r\n TextTitle,\r\n getPanelErrorProps,\r\n ValidatedFixedPanel,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\n\r\nimport { AudienceSignalShimmer, withShimmer } from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport { AudienceImg } from './media';\r\n\r\nconst AudienceWizardWithShimmer = withShimmer(AudienceWizard, AudienceSignalShimmer);\r\n\r\nexport const AudienceSignalPanel = (props) => {\r\n const i18n = useContext(I18nContext);\r\n const { scope } = useContext(ScopeContext) || {};\r\n const serverContext = useContext(ServerContext);\r\n\r\n const {\r\n DynamicPermissions,\r\n Permissions,\r\n } = serverContext;\r\n\r\n const { aid, cid } = scope.values;\r\n\r\n const permissions = useMemo(\r\n () => ({ dynamic: { ...DynamicPermissions }, ...Permissions }),\r\n [DynamicPermissions, Permissions]\r\n );\r\n\r\n const isReadOnlyUser = useMemo(\r\n () => permissions.IsReadOnlyUser || serverContext.CurrentAccount.Status === 32, // 32 is InActive\r\n [permissions.IsReadOnlyUser, serverContext.CurrentAccount.Status]\r\n );\r\n\r\n const {\r\n key,\r\n isLoading,\r\n options,\r\n expand,\r\n data = {},\r\n ...rest\r\n } = props;\r\n\r\n const {\r\n AudienceGroup,\r\n OriginalAudienceGroup,\r\n } = data;\r\n\r\n return (\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand,\r\n expandKey: key,\r\n }}\r\n {...rest}\r\n >\r\n \r\n \r\n );\r\n};\r\n\r\nAudienceSignalPanel.propTypes = {\r\n key: PropTypes.string.isRequired,\r\n isLoading: PropTypes.bool,\r\n options: PropTypes.shape({\r\n wizardPerfMarker: PropTypes.shape({}),\r\n }),\r\n expand: PropTypes.func,\r\n wizardPerfMarker: PropTypes.shape({}).isRequired,\r\n data: PropTypes.shape({}),\r\n};\r\n\r\nAudienceSignalPanel.defaultProps = {\r\n isLoading: false,\r\n options: {},\r\n data: {},\r\n expand: () => {},\r\n};\r\n","import _, { compose, partial } from 'underscore';\r\nimport { withProps } from '@bingads-webui-react/with-props';\r\nimport { withControlErrorHandling, withUnvalidatedControlErrors } from '@bingads-webui-campaign-react/error-handling';\r\nimport { propertyIs, StandardControlAdapter } from '@bingads-webui-campaign-react/form-error';\r\nimport { ValidatedUrlOptionsParameters } from '@bingads-webui-campaign-react/url-options';\r\n\r\nconst campaignTrackingUrlTemplate = propertyIs('TrackingUrlTemplate');\r\nconst campaignFinalUrlSuffix = propertyIs('FinalUrlSuffix');\r\nconst campaignUrlCustomParameters = propertyIs('UrlCustomParameters');\r\nconst trackingUrlTemplateControlsWrapper = compose(\r\n withControlErrorHandling,\r\n partial(withUnvalidatedControlErrors, _, { filter: campaignTrackingUrlTemplate, Adapter: StandardControlAdapter() })\r\n);\r\nconst finalUrlSuffixControlsWrapper = compose(\r\n withControlErrorHandling,\r\n partial(withUnvalidatedControlErrors, _, { filter: campaignFinalUrlSuffix, Adapter: StandardControlAdapter() })\r\n);\r\nconst urlCustomParametersControlsWrapper = compose(\r\n withControlErrorHandling,\r\n partial(withUnvalidatedControlErrors, _, { filter: campaignUrlCustomParameters, Adapter: StandardControlAdapter({ functionsToInject: ['onCustomParameterKeyChange', 'onCustomParameterValueChange', 'onRemoveUrlParameter', 'onAddUrlParameter'] }) })\r\n);\r\n\r\nexport const ServerValidatedUrlOptionsParameters = withControlErrorHandling(withProps({\r\n trackingUrlTemplateControlsWrapper,\r\n finalUrlSuffixControlsWrapper,\r\n urlCustomParametersControlsWrapper,\r\n}, ValidatedUrlOptionsParameters));\r\n","import React, { useMemo, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { noop } from 'underscore';\r\nimport {\r\n TextTitle,\r\n ValidatedPanel,\r\n getPanelErrorProps,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ValidatedVideoExperience, getODataConfig } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { PermissionsContext } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport {\r\n ImageListSummaryCardDetails,\r\n} from '@bingads-webui-campaign-react/pmax-image-experience';\r\n\r\nimport { PANEL_KEYS } from '@bingads-webui-campaign-react/wizard-shared-components';\r\n\r\nconst DisplayPlusMaxVideoCount = 5;\r\n\r\nexport const VideoPanel = ({\r\n perfMarker,\r\n mergedI18n,\r\n videos,\r\n setSelectedVideoId = noop,\r\n selectedVideoId,\r\n icon,\r\n allAssetsExpand,\r\n isVideoRequired,\r\n topicKey,\r\n skipQualityValidation,\r\n loadClipchampPlayer,\r\n ...rest\r\n}) => {\r\n const permissions = useContext(PermissionsContext);\r\n\r\n const serverContext = useContext(ServerContext);\r\n\r\n const i18n = useContext(I18nContext);\r\n\r\n const oDataConfig = useMemo(() => getODataConfig(serverContext), [serverContext]);\r\n\r\n const { scope } = useContext(ScopeContext);\r\n\r\n const { cid, aid } = scope.values;\r\n\r\n const videoTypesWithOrder = useMemo(() => (['VideoMedia16X9']), []);\r\n\r\n const videosContainer = useMemo(() => {\r\n const videoAd = { videos: videos || [] };\r\n\r\n return (\r\n \r\n );\r\n }, [videos, mergedI18n, perfMarker, permissions, videoTypesWithOrder, selectedVideoId, oDataConfig, cid, aid, setSelectedVideoId, isVideoRequired, skipQualityValidation, loadClipchampPlayer]);\r\n\r\n return (\r\n }\r\n />}\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: allAssetsExpand,\r\n expandKey: PANEL_KEYS.VIDEOS,\r\n }}\r\n {...rest}\r\n >\r\n {i18n.getString(_TL_('You can add up to {{limit}} videos to your ad.'), { limit: DisplayPlusMaxVideoCount })}\r\n
\r\n {videosContainer}\r\n
\r\n \r\n );\r\n};\r\n\r\nVideoPanel.propTypes = {\r\n perfMarker: PropTypes.string.isRequired,\r\n mergedI18n: PropTypes.shape({}).isRequired,\r\n videos: PropTypes.shape([]).isRequired,\r\n setSelectedVideoId: PropTypes.func,\r\n selectedVideoId: PropTypes.number.isRequired,\r\n skipQualityValidation: PropTypes.bool,\r\n icon: PropTypes.node.isRequired,\r\n allAssetsExpand: PropTypes.func.isRequired,\r\n isVideoRequired: PropTypes.bool,\r\n topicKey: PropTypes.string,\r\n loadClipchampPlayer: PropTypes.func,\r\n};\r\n\r\nVideoPanel.defaultProps = {\r\n isVideoRequired: false,\r\n topicKey: null,\r\n skipQualityValidation: false,\r\n loadClipchampPlayer: () => {},\r\n};\r\n","export const WizardEvents = {\r\n STEP_LOADING: 'STEP_LOADING',\r\n STEP_SAVING: 'STEP_SAVING',\r\n STEP_DONE_LOADING: 'STEP_DONE_LOADING',\r\n STEP_DONE_SAVING: 'STEP_DONE_SAVING',\r\n STEP_DONE_CANCELING: 'STEP_DONE_CANCELING',\r\n STEP_FAILED_LOADING: 'STEP_FAILED_LOADING',\r\n STEP_ABORTED_SAVING: 'STEP_ABORTED_SAVING',\r\n STEP_ABORTED_CANCELING: 'STEP_ABORTED_CANCELING',\r\n STEP_STOPPED: 'STEP_STOPPED',\r\n\r\n\r\n NAVIGATE_BACK: 'NAVIGATE_BACK',\r\n NAVIGATE_NEXT: 'NAVIGATE_NEXT',\r\n CANCEL: 'CANCEL',\r\n EXIT: 'EXIT',\r\n};\r\n","export const StepEvents = {\r\n SAVE: 'SAVE',\r\n DONE_SAVING: 'DONE_SAVING',\r\n FAILED_SAVING: 'DAILED_SAVING',\r\n DONE_LOADING: 'DONE_LOADING',\r\n FAILED_LOADING: 'FAILED_LOADING',\r\n CANCEL: 'CANCEL',\r\n ACTIVATE: 'ACTIVATE',\r\n DEACTIVATE: 'DEACTIVATE',\r\n UPDATE_VALIDATION: 'UPDATE_VALIDATION',\r\n STOP: 'STOP',\r\n DONE_STOPPING: 'DONE_STOPPING',\r\n\r\n OVERRIDE_ACTIONS: 'OVERRIDE_ACTIONS',\r\n OVERRIDE_GUARDS: 'OVERRIDE_GUARDS',\r\n};\r\n","import { noop } from 'underscore';\r\n\r\nconst isDebugLoggingEnabled = true;\r\n\r\nconst jsonArgsSerializer = (...args) => args.map(JSON.stringify);\r\nconst identityArgsSerializer = (...args) => args;\r\n\r\nconst logF = argsSerializer => (isDebugLoggingEnabled ?\r\n (msg, ...args) => {\r\n // eslint-disable-next-line\r\n console.log(`[DWD] ${msg}`, ...(argsSerializer(...args)));\r\n } :\r\n noop\r\n);\r\n\r\nexport const log = logF(identityArgsSerializer);\r\nexport const logJson = logF(jsonArgsSerializer);\r\n\r\nexport const logWrapper = (tag, func, toJson) => {\r\n const logg = toJson ? logJson : log;\r\n\r\n return (...args) => {\r\n logg(`${tag}.ENTER: args=_`, ...args);\r\n let ret;\r\n try {\r\n ret = func(...args);\r\n return ret;\r\n } finally {\r\n // logg(`${tag}.EXIT: ret=_`, ret);\r\n }\r\n };\r\n};\r\n\r\nexport const logAction = (msg, ...args) =>\r\n (context, event) =>\r\n log(`${(context && context.id) || 'UNKNOWN'}: ${msg}`, ...args, context, event);\r\n\r\nexport const stateLoggingListener = (state) => {\r\n // subscribes to state changes\r\n log(`${state && state.machine && state.machine.id}: state=_`, state);\r\n};\r\n","import { isFunction, isNumber, noop } from 'underscore';\r\nimport { createMachine, assign, spawn, send } from 'xstate';\r\nimport { logAction } from './debug';\r\nimport { StepEvents } from './step-events';\r\nimport { WizardEvents } from './wizard-events';\r\n\r\nconst WizardStates = {\r\n INIT: 'INIT',\r\n STEP_ACTIVE: 'STEP_ACTIVE',\r\n STEP_LOADING: 'STEP_LOADING',\r\n STEP_SAVING: 'STEP_SAVING',\r\n STEP_FAILED: 'STEP_FAILED',\r\n STEP_CANCELING: 'STEP_CANCELING',\r\n DONE: 'DONE',\r\n FIN: 'FIN',\r\n};\r\n\r\n// Public state selectors\r\nexport const stepListSelector = state => state.context.stepList;\r\nexport const stepIndexSelector = state => state.context.stepIndex;\r\nexport const stepServicesCacheSelector = state => state.context.stepServicesCache;\r\nexport const isBusySelector = state => state.matches(WizardStates.STEP_LOADING) || state.matches(WizardStates.STEP_SAVING) || state.matches(WizardStates.STEP_CANCELING) || state.matches(WizardStates.DONE) || state.matches(WizardStates.FIN);\r\nexport const wasSavingSelector = state => state.matches(WizardStates.STEP_SAVING);\r\nexport const wasWaitingForConfirmationSelector = state => state.matches(WizardStates.STEP_CANCELING);\r\nexport const wasStoppingSelector = state => state.matches(WizardStates.DONE) || state.matches(WizardStates.FIN);\r\n\r\n\r\n// Derived state accessors\r\nconst getStepInfo = context => context.stepList[context.stepIndex];\r\nconst getStepServiceRef = context => context.stepServicesCache[getStepInfo(context).id];\r\n\r\n// Guards\r\nconst doesServiceNeedActivation = context => context.stepServiceNeedsActivation;\r\nconst isNotNavigating = context => !isNumber(context.navigatingTo) && !context.isExiting;\r\nconst isExiting = context => context.isExiting || (isNumber(context.navigatingTo) && context.navigatingTo >= context.stepList.length);\r\nconst isFirstStep = context => context.stepIndex - 1 < 0;\r\nconst canNavigateBackWithoutSaving = context => getStepInfo(context).canNavigateBackWithoutSaving;\r\n\r\n// Actions\r\nconst acquireStepService = assign((context) => {\r\n const stepInfo = getStepInfo(context);\r\n let stepService = getStepServiceRef(context);\r\n if (stepService) {\r\n return {\r\n ...context,\r\n stepService,\r\n stepServiceNeedsActivation: true,\r\n };\r\n }\r\n\r\n const extendedStepMachine = stepInfo\r\n .StepMachine(stepInfo.StepMachineOptions(stepInfo, context.stepsData));\r\n stepService = spawn(extendedStepMachine);\r\n\r\n return {\r\n ...context,\r\n stepServicesCache: {\r\n ...context.stepServicesCache,\r\n [stepInfo.id]: stepService,\r\n },\r\n stepService,\r\n stepServiceNeedsActivation: false,\r\n };\r\n});\r\n\r\nconst stopStep = send(StepEvents.STOP, { to: getStepServiceRef });\r\n\r\nconst activateStep = send(\r\n context => ({\r\n type: StepEvents.ACTIVATE,\r\n stepsData: context.stepsData,\r\n }),\r\n { to: getStepServiceRef }\r\n);\r\nconst deactivateStep = send(StepEvents.DEACTIVATE, { to: getStepServiceRef });\r\nconst notifyStepToSave = send(StepEvents.SAVE, { to: getStepServiceRef });\r\nconst notifyStepToCancel = send(StepEvents.CANCEL, { to: getStepServiceRef });\r\nconst setNavigatingForward = assign({\r\n navigatingTo: context => context.stepIndex + 1,\r\n});\r\nconst setNavigatingBack = assign({\r\n navigatingTo: context => context.stepIndex - 1,\r\n});\r\nconst setExiting = assign({\r\n isExiting: () => true,\r\n});\r\nconst applyNavigation = assign({\r\n stepIndex: context => context.navigatingTo,\r\n navigatingTo: () => null,\r\n});\r\nconst resetNavigation = assign({\r\n navigatingTo: () => null,\r\n isExiting: () => false,\r\n});\r\nconst notifyDone = (context) => {\r\n if (isFunction(context.onDone)) {\r\n context.onDone(context.stepsData);\r\n }\r\n};\r\nconst patchStepsData = assign({\r\n stepsData: (context, event) => ({\r\n ...context.stepsData,\r\n ...event.stepsData,\r\n }),\r\n});\r\n\r\nconst defaultActions = {\r\n acquireStepService,\r\n stopStep,\r\n activateStep,\r\n deactivateStep,\r\n notifyStepToSave,\r\n notifyStepToCancel,\r\n setNavigatingForward,\r\n setNavigatingBack,\r\n setExiting,\r\n applyNavigation,\r\n resetNavigation,\r\n notifyDone,\r\n patchStepsData,\r\n};\r\n\r\nconst defaultServices = {\r\n};\r\n\r\nconst defaultGuards = {\r\n isFirstStep,\r\n isNotNavigating,\r\n isExiting,\r\n doesServiceNeedActivation,\r\n canNavigateBackWithoutSaving,\r\n};\r\n\r\nconst getStartingState = (machineId, wizardOptions) => {\r\n const {\r\n stepList, stepsData, onDone = noop,\r\n } = wizardOptions;\r\n const stepIndex = 0;\r\n return {\r\n id: machineId,\r\n stepList,\r\n stepIndex,\r\n stepServicesCache: {},\r\n\r\n stepsData,\r\n\r\n navigatingTo: null, // pending navigation direction\r\n isExiting: false, // pending exit\r\n\r\n onDone,\r\n };\r\n};\r\n\r\n/**\r\n * Creates a new instance of the wizard state machine.\r\n * The xstate-based wizard state machine must be created only once per the lifetime of the hosting React component.\r\n * If props' changes need to be reflected in the state machine, the state machine must provide\r\n * event-based API to communicate such changes.\r\n * @param {object} options - wizard options\r\n * @returns {object} xstate machine\r\n */\r\nexport const wizardStateMachine = ({\r\n machineId = 'WizardStateMachine',\r\n wizardOptions,\r\n actions = defaultActions,\r\n services = defaultServices,\r\n guards = defaultGuards,\r\n} = {}) => createMachine({\r\n preserveActionOrder: true,\r\n predictableActionArguments: true,\r\n strict: true,\r\n\r\n id: machineId,\r\n context: getStartingState(machineId, wizardOptions),\r\n initial: WizardStates.INIT,\r\n states: {\r\n [WizardStates.INIT]: {\r\n entry: ['acquireStepService'],\r\n always: [\r\n {\r\n target: WizardStates.STEP_ACTIVE,\r\n cond: 'doesServiceNeedActivation',\r\n actions: 'activateStep',\r\n },\r\n {\r\n target: WizardStates.STEP_ACTIVE,\r\n },\r\n ],\r\n },\r\n [WizardStates.STEP_ACTIVE]: {\r\n on: {\r\n [WizardEvents.STEP_LOADING]: [WizardStates.STEP_LOADING],\r\n [WizardEvents.CANCEL]: [\r\n {\r\n target: WizardStates.STEP_CANCELING,\r\n actions: ['setExiting', 'notifyStepToCancel'],\r\n },\r\n ],\r\n [WizardEvents.EXIT]: [\r\n {\r\n target: WizardStates.STEP_SAVING,\r\n actions: ['setExiting', 'notifyStepToSave'],\r\n },\r\n ],\r\n [WizardEvents.NAVIGATE_NEXT]: [\r\n {\r\n target: WizardStates.STEP_SAVING,\r\n actions: ['setNavigatingForward', 'notifyStepToSave'],\r\n },\r\n ],\r\n [WizardEvents.NAVIGATE_BACK]: [\r\n {\r\n // Gracefully handling of navigating back at 1st step\r\n cond: 'isFirstStep',\r\n },\r\n {\r\n target: WizardStates.INIT,\r\n cond: 'canNavigateBackWithoutSaving',\r\n actions: ['deactivateStep', 'setNavigatingBack', 'applyNavigation'],\r\n },\r\n {\r\n target: WizardStates.STEP_SAVING,\r\n actions: ['setNavigatingBack', 'notifyStepToSave'],\r\n },\r\n ],\r\n },\r\n },\r\n [WizardStates.STEP_LOADING]: {\r\n on: {\r\n [WizardEvents.STEP_DONE_LOADING]: [\r\n {\r\n target: WizardStates.STEP_ACTIVE,\r\n },\r\n ],\r\n [WizardEvents.STEP_FAILED_LOADING]: [\r\n {\r\n target: WizardStates.STEP_FAILED,\r\n },\r\n ],\r\n },\r\n },\r\n [WizardStates.STEP_SAVING]: {\r\n on: {\r\n [WizardEvents.STEP_DONE_SAVING]: [\r\n // Save and stay on the same step\r\n {\r\n target: WizardStates.STEP_ACTIVE,\r\n cond: 'isNotNavigating',\r\n actions: [logAction('STEP_SAVING: STEP_DONE_SAVING -> STEP_ACTIVE'), 'patchStepsData'],\r\n },\r\n // Save and exit\r\n {\r\n target: WizardStates.DONE,\r\n cond: 'isExiting',\r\n actions: [logAction('STEP_SAVING: STEP_DONE_SAVING -> done'), 'patchStepsData'],\r\n },\r\n // Save and navigate\r\n {\r\n target: WizardStates.INIT,\r\n actions: [logAction('STEP_SAVING: STEP_DONE_SAVING -> INIT'), 'patchStepsData', 'deactivateStep', 'applyNavigation'],\r\n },\r\n ],\r\n [WizardEvents.STEP_ABORTED_SAVING]: [\r\n {\r\n target: WizardStates.STEP_ACTIVE,\r\n actions: [logAction('STEP_SAVING: STEP_ABORTED_SAVING -> STEP_ACTIVE'), 'resetNavigation'],\r\n },\r\n ],\r\n },\r\n },\r\n [WizardStates.STEP_CANCELING]: {\r\n on: {\r\n [WizardEvents.STEP_SAVING]: [WizardStates.STEP_SAVING],\r\n [WizardEvents.STEP_ABORTED_CANCELING]: [\r\n {\r\n target: WizardStates.STEP_ACTIVE,\r\n actions: ['resetNavigation'],\r\n },\r\n ],\r\n [WizardEvents.STEP_DONE_CANCELING]: [WizardStates.DONE],\r\n },\r\n },\r\n [WizardStates.STEP_FAILED]: {},\r\n\r\n [WizardStates.DONE]: {\r\n entry: ['stopStep'],\r\n on: {\r\n [WizardEvents.STEP_STOPPED]: [\r\n { target: WizardStates.FIN, actions: [logAction('DONE: STEP_STOPPED -> FIN')] },\r\n ],\r\n },\r\n },\r\n\r\n [WizardStates.FIN]: { entry: [logAction('calling notifyDone'), 'notifyDone'] },\r\n },\r\n}, {\r\n actions: {\r\n ...defaultActions,\r\n ...actions,\r\n },\r\n services: {\r\n ...defaultServices,\r\n ...services,\r\n },\r\n guards: {\r\n ...defaultGuards,\r\n ...guards,\r\n },\r\n});\r\n","import { isFunction, delay } from 'underscore';\r\nimport { createMachine, assign, sendParent } from 'xstate';\r\nimport { StepEvents } from './step-events';\r\nimport { WizardEvents } from './wizard-events';\r\n\r\nconst StepStates = {\r\n INIT: 'INIT',\r\n FAILED_INIT: 'FAILED_INIT',\r\n LOADING: 'LOADING',\r\n SAVING: 'SAVING',\r\n CANCELING: 'CANCELING',\r\n VALIDATING: 'VALIDATING',\r\n VALID: 'VALID',\r\n INVALID: 'INVALID',\r\n INACTIVE: 'INACTIVE',\r\n STOPPING: 'STOPPING',\r\n FIN: 'FIN',\r\n};\r\n\r\n// Public state selectors\r\nexport const isCanceling = state => state.matches(StepStates.CANCELING);\r\nexport const isStopping = state => state.matches(StepStates.STOPPING);\r\nexport const isFin = state => state.matches(StepStates.FIN);\r\nexport const isFailedInit = state => state.matches(StepStates.FAILED_INIT);\r\nexport const isActive = state => state.matches(StepStates.VALID) || state.matches(StepStates.INVALID);\r\nexport const isLoading = state => state.matches(StepStates.LOADING);\r\nexport const isSaving = state => state.matches(StepStates.SAVING);\r\n\r\nexport const contextSelector = state => state.context;\r\n\r\nconst defaultInitialContext = {\r\n stepsData: {},\r\n actionsOverride: {},\r\n guardsOverride: {},\r\n data: {\r\n data: {},\r\n isValid: true,\r\n isDirty: false,\r\n },\r\n invalidSaveAttempt: 0,\r\n};\r\n\r\n// Derived state accessors\r\nconst needsLoading = () => false;\r\nconst hasIncomingSystemError = () => false;\r\nconst isValid = context => context.data.isValid;\r\nconst isDirty = context => context.data.isDirty;\r\nconst needsSaving = isDirty;\r\nconst needsStopping = (context) => {\r\n if (isFunction(context.guardsOverride.needsStopping)) {\r\n return context.guardsOverride.needsStopping(context);\r\n }\r\n return false;\r\n};\r\n// State \"assigners\"\r\nconst replaceData = assign({\r\n data: (_, event) => event.data,\r\n});\r\nconst patchStepsData = assign({\r\n stepsData: (context, event) => ({\r\n ...context.stepsData,\r\n ...event.stepsData,\r\n }),\r\n});\r\nconst replaceStepsData = assign({\r\n stepsData: (_, event) => event.stepsData,\r\n});\r\nconst patchData = assign({\r\n data: (context, event) => ({\r\n ...context.data,\r\n ...event.data,\r\n }),\r\n});\r\nconst clearErrors = () => { };\r\nconst onInvalidSaveAttempt = assign({\r\n // eslint-disable-next-line no-bitwise\r\n invalidSaveAttempt: context => (context.invalidSaveAttempt | 0) + 1,\r\n});\r\nconst overrideActions = assign({\r\n actionsOverride: (context, event) => ({\r\n ...context.actionsOverride,\r\n ...event.data,\r\n }),\r\n});\r\nconst overrideGuards = assign({\r\n guardsOverride: (context, event) => ({\r\n ...context.guardsOverride,\r\n ...event.data,\r\n }),\r\n});\r\n\r\nconst notifyLoading = sendParent(WizardEvents.STEP_LOADING);\r\nconst notifyDoneLoading = sendParent(WizardEvents.STEP_DONE_LOADING);\r\n// non-recoverable step failure\r\nconst notifyFailedLoading = sendParent(WizardEvents.STEP_FAILED_LOADING);\r\n\r\nconst notifySaving = sendParent(WizardEvents.STEP_SAVING);\r\nconst notifyDoneSaving = sendParent((context/* , event */) => ({\r\n type: WizardEvents.STEP_DONE_SAVING,\r\n stepsData: context.stepsData,\r\n}));\r\nconst notifyDoneCanceling = sendParent({ type: WizardEvents.STEP_DONE_CANCELING });\r\nconst notifyAbortedSaving = sendParent(WizardEvents.STEP_ABORTED_SAVING);\r\nconst notifyAbortedCanceling = sendParent(WizardEvents.STEP_ABORTED_CANCELING);\r\nconst notifyStopped = sendParent({ type: WizardEvents.STEP_STOPPED });\r\nconst requestConfirmation = context => new Promise((resolve, reject) => {\r\n delay(() => {\r\n const response = { aborted: false };\r\n if (isFunction(context.actionsOverride.confirmCancel)) {\r\n if (!context.actionsOverride.confirmCancel()) {\r\n response.aborted = true;\r\n }\r\n }\r\n if (response.aborted) {\r\n reject();\r\n } else {\r\n resolve();\r\n }\r\n }, 200);\r\n});\r\n\r\n\r\nconst defaultActions = {\r\n notifyLoading,\r\n notifySaving,\r\n notifyAbortedSaving,\r\n notifyAbortedCanceling,\r\n notifyFailedLoading,\r\n notifyDoneLoading,\r\n notifyDoneSaving,\r\n notifyDoneCanceling,\r\n notifyStopped,\r\n\r\n replaceData,\r\n patchData,\r\n replaceStepsData,\r\n patchStepsData,\r\n\r\n clearErrors,\r\n onInvalidSaveAttempt,\r\n\r\n overrideActions,\r\n overrideGuards,\r\n};\r\n\r\nconst defaultServices = {\r\n requestConfirmation,\r\n};\r\n\r\nconst defaultGuards = {\r\n needsLoading,\r\n isValid,\r\n needsSaving,\r\n needsStopping,\r\n};\r\n\r\n\r\nexport const stepStateMachine = ({\r\n machineId = 'StepStateMachine',\r\n initialContext = defaultInitialContext,\r\n actions = defaultActions,\r\n services = defaultServices,\r\n guards = defaultGuards,\r\n} = {}) => createMachine({\r\n preserveActionOrder: true,\r\n predictableActionArguments: true,\r\n strict: true,\r\n\r\n id: machineId,\r\n context: {\r\n ...defaultInitialContext,\r\n ...initialContext,\r\n },\r\n initial: StepStates.INIT,\r\n on: {\r\n [StepEvents.OVERRIDE_ACTIONS]: [\r\n { actions: 'overrideActions' },\r\n ],\r\n [StepEvents.OVERRIDE_GUARDS]: [\r\n { actions: 'overrideGuards' },\r\n ],\r\n [StepEvents.STOP]: [\r\n { target: StepStates.STOPPING, cond: 'needsStopping' },\r\n StepStates.FIN,\r\n ],\r\n },\r\n states: {\r\n [StepStates.INIT]: {\r\n always: [\r\n { target: StepStates.LOADING, cond: 'needsLoading' },\r\n { target: StepStates.VALIDATING },\r\n ],\r\n },\r\n [StepStates.LOADING]: {\r\n entry: ['notifyLoading'],\r\n on: {\r\n [StepEvents.DONE_LOADING]: {\r\n target: StepStates.VALIDATING,\r\n actions: [\r\n 'replaceData',\r\n 'patchStepsData',\r\n 'notifyDoneLoading',\r\n ],\r\n },\r\n [StepEvents.FAILED_LOADING]: [\r\n {\r\n target: StepStates.FAILED_INIT,\r\n cond: hasIncomingSystemError,\r\n actions: [\r\n 'replaceData',\r\n 'patchStepsData',\r\n 'notifyFailedLoading',\r\n ],\r\n },\r\n {\r\n target: StepStates.VALIDATING,\r\n actions: [\r\n 'replaceData',\r\n 'patchStepsData',\r\n 'notifyDoneLoading',\r\n ],\r\n },\r\n ],\r\n },\r\n },\r\n [StepStates.FAILED_INIT]: {},\r\n [StepStates.SAVING]: {\r\n entry: ['clearErrors', 'notifySaving'],\r\n on: {\r\n [StepEvents.DONE_SAVING]: {\r\n target: StepStates.VALIDATING,\r\n actions: [\r\n 'replaceData',\r\n 'patchStepsData',\r\n 'notifyDoneSaving',\r\n ],\r\n },\r\n [StepEvents.FAILED_SAVING]: {\r\n target: StepStates.VALIDATING,\r\n actions: [\r\n 'replaceData',\r\n 'patchStepsData',\r\n 'onInvalidSaveAttempt',\r\n 'notifyAbortedSaving',\r\n ],\r\n },\r\n },\r\n },\r\n [StepStates.CANCELING]: {\r\n invoke: {\r\n id: 'requestConfirmationCallback',\r\n src: 'requestConfirmation',\r\n onDone: {\r\n target: StepStates.VALIDATING,\r\n actions: ['notifyDoneCanceling'],\r\n },\r\n onError: {\r\n target: StepStates.VALIDATING,\r\n actions: ['notifyAbortedCanceling'],\r\n },\r\n },\r\n },\r\n [StepStates.STOPPING]: {\r\n on: {\r\n [StepEvents.DONE_STOPPING]: [StepStates.FIN],\r\n },\r\n },\r\n [StepStates.VALIDATING]: {\r\n always: [\r\n { target: StepStates.VALID, cond: 'isValid' },\r\n { target: StepStates.INVALID },\r\n ],\r\n },\r\n [StepStates.VALID]: {\r\n on: {\r\n [StepEvents.UPDATE_VALIDATION]: [\r\n {\r\n target: StepStates.VALIDATING,\r\n actions: ['patchData'],\r\n },\r\n ],\r\n [StepEvents.CANCEL]: [\r\n { target: StepStates.CANCELING, cond: 'needsSaving' },\r\n { actions: ['notifyDoneCanceling'] },\r\n ],\r\n [StepEvents.SAVE]: [\r\n { target: StepStates.SAVING, cond: 'needsSaving' },\r\n { actions: ['notifyDoneSaving'] },\r\n ],\r\n [StepEvents.DEACTIVATE]: StepStates.INACTIVE,\r\n },\r\n },\r\n [StepStates.INVALID]: {\r\n on: {\r\n [StepEvents.UPDATE_VALIDATION]: [\r\n {\r\n target: StepStates.VALIDATING,\r\n actions: ['patchData'],\r\n },\r\n ],\r\n [StepEvents.CANCEL]: [\r\n { target: StepStates.CANCELING, cond: 'needsSaving' },\r\n { actions: ['notifyDoneCanceling'] },\r\n ],\r\n [StepEvents.SAVE]: {\r\n actions: ['onInvalidSaveAttempt', 'notifyAbortedSaving'],\r\n },\r\n [StepEvents.DEACTIVATE]: StepStates.INACTIVE,\r\n },\r\n },\r\n [StepStates.INACTIVE]: {\r\n on: {\r\n [StepEvents.ACTIVATE]: [\r\n { target: StepStates.LOADING, cond: 'needsLoading', actions: ['replaceStepsData'] },\r\n { target: StepStates.VALIDATING, actions: ['replaceStepsData'] },\r\n ],\r\n },\r\n },\r\n [StepStates.FIN]: {\r\n entry: ['notifyStopped'],\r\n },\r\n },\r\n}, {\r\n actions: {\r\n ...defaultActions,\r\n ...actions,\r\n },\r\n services: {\r\n ...defaultServices,\r\n ...services,\r\n },\r\n guards: {\r\n ...defaultGuards,\r\n ...guards,\r\n },\r\n});\r\n","import PropTypes from 'prop-types';\r\n\r\nexport const xstateStateMachine = PropTypes.oneOfType([\r\n PropTypes.shape({}),\r\n PropTypes.func,\r\n]);\r\n\r\nexport const stepListProp = PropTypes.arrayOf(PropTypes.shape({\r\n id: PropTypes.string.isRequired,\r\n title: PropTypes.string.isRequired,\r\n StepMachine: xstateStateMachine.isRequired,\r\n StepMachineOptions: PropTypes.func.isRequired,\r\n StepComponent: PropTypes.elementType.isRequired,\r\n}));\r\n","import { mergeStyles, convertToLocalStyle, glyphIconStyle }\r\n from '@bingads-webui-campaign-react/common-styles';\r\n\r\nconst borderWidth = '2px';\r\n\r\nconst formStyle = ({ palette = {} }) => ({\r\n '.error': {\r\n color: '#A80000',\r\n },\r\n\r\n 'input.error, select.error, textarea.error, input.campaign-error-row, select.campaign-error-row, textarea.campaign-error-row': {\r\n border: '1px solid @input-error-border !important',\r\n color: palette.neutralPrimary,\r\n },\r\n});\r\n\r\nexport const getWizardStyles = (components, theme = {}) => ({\r\n '@global': {\r\n ...components.spinnerKeyframe, // FIXME: UINext must load this, or '@bingads-webui-react/ui-blocker' must properly style itself\r\n },\r\n hidden: {\r\n display: 'none',\r\n },\r\n show: {\r\n display: 'flex',\r\n },\r\n uiBlockerAdapter: {\r\n ...mergeStyles(\r\n { theme },\r\n components.reactUIBlockerStyle(theme.palette, 'rgba(255, 255, 255, 0.4)'),\r\n {\r\n '& .react-block-ui-none, & .react-block-ui': {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n flexGrow: 1,\r\n overflowY: 'hidden', // to not extend to the content, but shrink to flex-parent\r\n },\r\n },\r\n {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n flexGrow: 1,\r\n overflowY: 'hidden',\r\n }\r\n ),\r\n },\r\n wizardContainer: {\r\n ...mergeStyles(\r\n { theme },\r\n convertToLocalStyle(components.helpbuttonStyle(theme)),\r\n convertToLocalStyle(glyphIconStyle(theme)),\r\n {\r\n display: 'flex',\r\n flexGrow: 1,\r\n overflowY: 'hidden',\r\n }\r\n ),\r\n },\r\n // StepProgressList on left side\r\n wizardListContainer: {\r\n width: '228px',\r\n minWidth: '228px',\r\n borderRight: `1px solid ${theme.palette.neutralQuaternaryAlt}`,\r\n paddingLeft: '32px',\r\n paddingTop: '32px',\r\n paddingBottom: '32px',\r\n overflow: 'hidden auto',\r\n\r\n '& ol': {\r\n margin: 0,\r\n padding: 0,\r\n listStyle: 'none',\r\n },\r\n\r\n // Styles for drawing the vertical line\r\n '& .step-progress-list-item': {\r\n borderLeft: `${borderWidth} solid ${theme.palette.blue}`,\r\n '&.step-progress-list-item-ahead': { borderLeftColor: '#ebebeb' },\r\n },\r\n\r\n '& .step-progress-list-item-title': {\r\n position: 'absolute',\r\n float: 'right',\r\n maxWidth: 165,\r\n },\r\n\r\n // top level list items\r\n '& ol.step-progress-list>.step-progress-list-item': {\r\n paddingTop: 39,\r\n position: 'relative',\r\n\r\n '&:first-child': { borderLeftColor: theme.palette.white, paddingTop: 0 },\r\n\r\n '&>.step-progress-list-item-glyphicon': {\r\n marginLeft: '-8px',\r\n marginRight: '8px',\r\n background: theme.palette.white,\r\n paddingTop: '5px',\r\n paddingBottom: '4px',\r\n },\r\n\r\n '&>.step-progress-list-item-glyphicon.iconba-RadioBullet2': {\r\n paddingTop: 0,\r\n paddingBottom: 0,\r\n transform: 'scale(1.52)',\r\n },\r\n },\r\n\r\n // nested list items\r\n '& ol.step-progress-list-item-list>.step-progress-list-item': {\r\n fontSize: '12px',\r\n lineHeight: '16px',\r\n paddingTop: '24px',\r\n marginLeft: `-${borderWidth}`,\r\n\r\n '&>.step-progress-list-item-glyphicon': {\r\n marginLeft: '-8px',\r\n marginRight: '12px',\r\n white: theme.palette.white,\r\n paddingBottom: '1px',\r\n },\r\n },\r\n\r\n '& .step-progress-list-item-selected, & .step-progress-list-item-contains-selected': { fontWeight: '600' },\r\n\r\n // glyphicon colors\r\n '& .step-progress-list-item-behind .step-progress-list-item-glyphicon': {\r\n color: theme.palette.blue,\r\n },\r\n '& .step-progress-list-item-selected .step-progress-list-item-glyphicon, & .step-progress-list-item-contains-selected>.step-progress-list-item-glyphicon': {\r\n color: '#c0def6',\r\n },\r\n '& .step-progress-list-item-ahead .step-progress-list-item-glyphicon': {\r\n color: theme.palette.neutralLight,\r\n },\r\n },\r\n wizardMainContainer: {\r\n backgroundColor: theme.palette.neutralLighterAlt,\r\n display: 'flex',\r\n flexDirection: 'column',\r\n flexGrow: 1,\r\n },\r\n wizardStepContainer: {\r\n display: 'flex',\r\n overflowY: 'auto',\r\n },\r\n wizardSingleStepLayoutStepScrollingContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n overflowY: 'auto',\r\n },\r\n wizardSingleStepLayoutCenteredStepContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n marginLeft: 'auto',\r\n marginRight: 'auto',\r\n },\r\n wizardSingleStepLayoutStepContainer: {\r\n display: 'flex',\r\n },\r\n wizardStep: {\r\n ...mergeStyles(\r\n { theme },\r\n convertToLocalStyle(formStyle(theme)),\r\n {\r\n display: 'flex',\r\n flexBasis: '1px',\r\n flexDirection: 'column',\r\n paddingLeft: 32,\r\n paddingRight: 32,\r\n }\r\n ),\r\n },\r\n wizardFooter: {\r\n marginTop: 'auto', // to expand as flex-item\r\n backgroundColor: theme.palette.white,\r\n },\r\n mobileNavContainer: {\r\n position: 'fixed',\r\n display: 'none',\r\n height: 60,\r\n width: '100%',\r\n background: theme.palette.white,\r\n zIndex: 2,\r\n boxShadow: '0px 3.2px 7.2px rgba(0, 0, 0, 0.132), 0px 0.6px 1.8px rgba(0, 0, 0, 0.108)',\r\n },\r\n});\r\n","import { useEffect, useRef } from 'react';\r\n\r\nexport const useIsMounted = () => {\r\n const isMountedRef = useRef(false);\r\n useEffect(() => {\r\n isMountedRef.current = true;\r\n return () => {\r\n isMountedRef.current = false;\r\n };\r\n }, []);\r\n\r\n return isMountedRef;\r\n};\r\n","import { useEffect, useRef } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { useSelector } from '@xstate/react';\r\nimport { createAsyncToken } from '@bingads-webui-universal/primitive-utilities';\r\nimport {\r\n isLoading as isLoadingSelector,\r\n isSaving as isSavingSelector, contextSelector,\r\n StepEvents,\r\n log,\r\n} from '@bingads-webui-campaign-react/step-wizard-machine';\r\nimport { useIsMounted } from './use-is-mounted';\r\n\r\n/**\r\n * Loads step's data asynchronously. The returned promise must resolve\r\n * into a single object, opaque to the step, which will be saved\r\n * in the context under the `data` property, completely replacing\r\n * the current value.\r\n *\r\n * The function is called when the wizard enters the step.\r\n * The wizard and the step will be blocked until the promise resolves.\r\n *\r\n * If promise is rejected, the step will:\r\n * - transition to `FAILED_INIT` state if `hasIncomingSystemError` returns true;\r\n * - transition through `VALIDATING -> (VALID | INVALID)`.\r\n * @callback loadData\r\n * @param {Object} context - the current context\r\n * @returns {Promise} a promise that must resolve\r\n * into a single object, opaque to the step, which will be saved\r\n * in the context under the `data` property, completely replacing\r\n * the current value.\r\n */\r\n\r\n/**\r\n * Saves step's data asynchronously. The returned promise must resolve\r\n * into a single object, opaque to the step, which will be saved\r\n * in the context under the `data` property, completely replacing\r\n * the current value.\r\n *\r\n * The function is called when the wizard attempts to leave the step.\r\n * The wizard and the step will be blocked until the promise resolves.\r\n *\r\n * If promise is rejected, the step will transition through `VALIDATING -> (VALID | INVALID)`.\r\n * @callback saveData\r\n * @param {Object} context - the current context\r\n * @returns {Promise} a promise that must resolve\r\n * into a single object, opaque to the step, which will be saved\r\n * in the context under the `data` property, completely replacing\r\n * the current value.\r\n */\r\n\r\n\r\n/**\r\n * Default step repository React component.\r\n * @param {Object} props the component's props\r\n * @param {Object} props.stepService an instance of the step's state machine\r\n * @param {loadData} props.loadData a callback which loads data\r\n * @param {saveData} props.saveData a callback which saves data\r\n * @returns {Element} an empty VDOM\r\n */\r\nexport const StepRepository = ({\r\n stepService,\r\n loadData,\r\n saveData,\r\n}) => {\r\n const isMountedRef = useIsMounted();\r\n\r\n const isLoading = useSelector(stepService, isLoadingSelector);\r\n const isSaving = useSelector(stepService, isSavingSelector);\r\n const context = useSelector(stepService, contextSelector);\r\n const contextRef = useRef(context);\r\n contextRef.current = context;\r\n const asyncTokenRef = useRef();\r\n\r\n useEffect(() => {\r\n if (isLoading) {\r\n log('StepRepository loading data with loadData');\r\n if (asyncTokenRef.current) {\r\n asyncTokenRef.current.cancel();\r\n asyncTokenRef.current = null;\r\n }\r\n asyncTokenRef.current = createAsyncToken(loadData(contextRef.current))\r\n .on({\r\n onSuccess: (arg0) => {\r\n if (isMountedRef.current) {\r\n log('StepRepository sending DONE_LOADING');\r\n stepService.send({ type: StepEvents.DONE_LOADING, data: arg0 });\r\n } else {\r\n log('StepRepository ignoring sending DONE_LOADING due to unmount');\r\n }\r\n },\r\n onError: (arg0) => {\r\n if (isMountedRef.current) {\r\n log('StepRepository sending FAILED_LOADING');\r\n stepService.send({ type: StepEvents.FAILED_LOADING, data: arg0 });\r\n } else {\r\n log('StepRepository ignoring sending FAILED_LOADING due to unmount');\r\n }\r\n },\r\n });\r\n } else if (isSaving) {\r\n log('StepRepository saving data with saveData');\r\n if (asyncTokenRef.current) {\r\n asyncTokenRef.current.cancel();\r\n asyncTokenRef.current = null;\r\n }\r\n asyncTokenRef.current = createAsyncToken(saveData(contextRef.current))\r\n .on({\r\n onSuccess: (arg0) => {\r\n if (isMountedRef.current) {\r\n log('StepRepository sending DONE_SAVING');\r\n stepService.send({ type: StepEvents.DONE_SAVING, data: arg0 });\r\n } else {\r\n log('StepRepository ignoring sending DONE_SAVING due to unmount');\r\n }\r\n },\r\n onError: (arg0) => {\r\n if (isMountedRef.current) {\r\n log('StepRepository sending FAILED_SAVING');\r\n stepService.send({ type: StepEvents.FAILED_SAVING, data: arg0 });\r\n } else {\r\n log('StepRepository ignoring sending FAILED_SAVING due to unmount');\r\n }\r\n },\r\n });\r\n }\r\n }, [stepService, loadData, saveData, isLoading, isSaving, isMountedRef]);\r\n\r\n log('StepRepository.render: isLoading=_, isSaving=_', isLoading, isSaving);\r\n\r\n return null;\r\n};\r\n\r\nStepRepository.propTypes = {\r\n stepService: PropTypes.shape({\r\n subscribe: PropTypes.func.isRequired,\r\n send: PropTypes.func,\r\n }).isRequired,\r\n loadData: PropTypes.func.isRequired,\r\n saveData: PropTypes.func.isRequired,\r\n};\r\n","import { isEmpty } from 'underscore';\r\nimport { useCallback, useContext, useMemo, useRef, useEffect } from 'react';\r\nimport { useInterpret, useSelector } from '@xstate/react';\r\nimport { withProps } from '@bingads-webui-react/with-props';\r\nimport { useRefInit } from '@bingads-webui-campaign-react/common-generic-hooks';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport {\r\n wizardStateMachine, WizardEvents,\r\n isBusySelector, stepIndexSelector, stepServicesCacheSelector,\r\n wasSavingSelector, wasWaitingForConfirmationSelector, wasStoppingSelector, stateLoggingListener,\r\n} from '@bingads-webui-campaign-react/step-wizard-machine';\r\nimport { StepRepository } from '../shared/step-repository';\r\n\r\nconst getStepRepository = stepInfo => (!stepInfo.stepRepositoryConfig && !stepInfo.StepRepository ?\r\n undefined :\r\n withProps(\r\n stepInfo.stepRepositoryConfig || {},\r\n stepInfo.StepRepository || StepRepository\r\n ));\r\n\r\nexport const useWizardState = (props) => {\r\n const {\r\n routeToNavigateToWhenDone,\r\n scopeToRemoveWhenDone,\r\n scope,\r\n instrumentation,\r\n permissions,\r\n extraStepsData = {},\r\n wizardScenario: {\r\n scenarioName, isCenteredLayout, isEditing, stepList, withContentFooter,\r\n },\r\n machineId = 'StepWizard',\r\n } = props;\r\n const { scenario, activity } = useMemo(() => instrumentation.createScenarioAndActivity({\r\n scenarioName, // TODO: consider '...ForRetail' and '...ForSearch\r\n activityName: isEditing ? 'Settings' : 'Creation',\r\n }), [instrumentation, isEditing, scenarioName]);\r\n\r\n useEffect(() => {\r\n setClarityTag({ StepWizardScenario: scenarioName });\r\n }, [scenarioName]);\r\n\r\n const i18n = useContext(I18nContext);\r\n const serverContext = useContext(ServerContext);\r\n\r\n const scopeRef = useRef(scope);\r\n scopeRef.current = scope;\r\n const onDone = useCallback(() => {\r\n if (!isEmpty(scopeToRemoveWhenDone)) {\r\n scopeRef.current.remove(scopeToRemoveWhenDone);\r\n }\r\n scopeRef.current.save(routeToNavigateToWhenDone);\r\n }, [routeToNavigateToWhenDone, scopeToRemoveWhenDone]);\r\n\r\n // The xstate-based wizard state machine must be created only once per the lifetime of the component.\r\n // If props' changes need to be reflected in the state machine, the state machine must provide\r\n // event-based API to communicate such changes.\r\n const wizardMachineRef = useRefInit(() => wizardStateMachine({\r\n machineId,\r\n wizardOptions: {\r\n stepList,\r\n onDone,\r\n stepsData: {\r\n permissions,\r\n isEditing,\r\n scenarioName,\r\n scenario,\r\n activity,\r\n i18n,\r\n serverContext,\r\n scope,\r\n ...scope.values,\r\n ...extraStepsData,\r\n },\r\n },\r\n }));\r\n const wizardMachine = wizardMachineRef.current;\r\n const service = useInterpret(wizardMachine, undefined, stateLoggingListener);\r\n const { send } = service;\r\n\r\n const stepServicesCache = useSelector(service, stepServicesCacheSelector);\r\n const stepListWithServiceInfo = useMemo(() => stepList.map(stepInfo2 => ({\r\n stepInfo: stepInfo2,\r\n stepService: stepServicesCache[stepInfo2.id],\r\n StepRepository: getStepRepository(stepInfo2),\r\n })), [stepList, stepServicesCache]);\r\n\r\n const stepIndex = useSelector(service, stepIndexSelector);\r\n const isBusy = useSelector(service, isBusySelector);\r\n const wasSaving = useSelector(service, wasSavingSelector);\r\n const wasWaitingForConfirmation = useSelector(service, wasWaitingForConfirmationSelector);\r\n const wasStopping = useSelector(service, wasStoppingSelector);\r\n\r\n const stepInfo = useMemo(() => stepList[stepIndex], [stepIndex, stepList]);\r\n\r\n const isReadOnlyUser = useMemo(() => permissions.IsReadOnlyUser || serverContext.CurrentAccount.Status === 32, [permissions.IsReadOnlyUser, serverContext.CurrentAccount.Status]); // 32 is InActive\r\n\r\n const state = {\r\n isReadOnlyUser,\r\n isCenteredLayout,\r\n withContentFooter,\r\n i18n,\r\n scenarioName,\r\n scenario,\r\n activity,\r\n\r\n stepListWithServiceInfo,\r\n stepIndex,\r\n stepInfo,\r\n isBusy,\r\n wasSaving,\r\n wasWaitingForConfirmation,\r\n wasStopping,\r\n };\r\n\r\n\r\n const saveAndNavigateNext = useCallback(() => {\r\n send(WizardEvents.NAVIGATE_NEXT);\r\n }, [send]);\r\n const saveAndNavigateBack = useCallback(() => {\r\n send(WizardEvents.NAVIGATE_BACK);\r\n }, [send]);\r\n const cancelAndExit = useCallback(() => {\r\n send(WizardEvents.CANCEL);\r\n }, [send]);\r\n const saveAndExit = useCallback(() => {\r\n send(WizardEvents.EXIT);\r\n }, [send]);\r\n\r\n useEffect(() => {\r\n window.addEventListener('popstate', cancelAndExit);\r\n\r\n return () => {\r\n window.removeEventListener('popstate', cancelAndExit);\r\n };\r\n }, [cancelAndExit]);\r\n\r\n const api = {\r\n saveAndNavigateNext, saveAndNavigateBack, cancelAndExit, saveAndExit,\r\n };\r\n\r\n return [state, api];\r\n};\r\n","export const getStepProgressItemGlyphicon = (step) => {\r\n // sub steps\r\n if (step.path.indexOf('.') >= 0) {\r\n return 'ba-RadioBullet';\r\n }\r\n\r\n if (step.isSelected || step.containsSelected) {\r\n return 'ba-RadioBullet2'; // current step\r\n } else if (step.isBehind) {\r\n return 'ba-CompletedSolid';\r\n }\r\n\r\n // default\r\n return 'ba-RadioBtnOff';\r\n};\r\n","export const footerStyleOverrides = {\r\n skippingLink: {\r\n marginLeft: 28,\r\n },\r\n cancelButton: {\r\n marginLeft: 12,\r\n },\r\n};\r\n","import { last } from 'underscore';\r\nimport React, { useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { VerticalSeparatedLayout } from '@bingads-webui-react/steps';\r\nimport { StepFooter } from '@bingads-webui-campaign-react/step-wizard-layout';\r\nimport { getStepProgressItemGlyphicon } from '../styles/get-step-progress-item-glyphicon';\r\nimport { footerStyleOverrides } from '../styles/footer-style-overrides';\r\n\r\nconst {\r\n StepsContextProvider,\r\n StepContainer,\r\n StepProgressList,\r\n} = VerticalSeparatedLayout;\r\n\r\n// Navigation buttons scenarios:\r\n// - 1st step:\r\n// - Before campaign is created:\r\n// - Next button: \"Save & go to the next step\"\r\n// - Cancel button: \"Cancel\"\r\n// - After campaign is created:\r\n// - Next button: \"Save & go to the next step\"\r\n// - Exit button: \"Save & exit\"\r\n// - [2nd..last) steps:\r\n// - Next button: \"Save & go to the next step\"\r\n// - Back button: \"Back\"\r\n// - Exit button: \"Save & exit\"\r\n// - last step (with data entry):\r\n// - Next/Exit button: \"Save\"\r\n// - Back button: \"Back\"\r\n// - last step (read-only):\r\n// - Next/Exit button: \"Done\"\r\n// - Back button: \"Back\"\r\n\r\nexport const MultiStepLayout = React.memo(({\r\n children,\r\n wizardState: {\r\n i18n, stepInfo, isBusy, stepIndex, stepListWithServiceInfo,\r\n },\r\n wizardActions: {\r\n saveAndNavigateNext, saveAndNavigateBack, cancelAndExit, saveAndExit,\r\n },\r\n classes,\r\n}) => {\r\n const stepFooter = useMemo(() => {\r\n const beforeLastStepNextButtonText = i18n.getString(_TL_('Save & go to next step'));\r\n const saveAndExitButtonText = i18n.getString(_TL_('Save & exit'));\r\n const previousButtonText = i18n.getString(_TL_('Back'));\r\n if (stepIndex === 0) {\r\n // 1st step\r\n // will use the presence of 2nd step's stepService\r\n // as the fact that campaign has been saved\r\n if (stepListWithServiceInfo[1].stepService) {\r\n // After campaign is created\r\n return (\r\n \r\n );\r\n }\r\n // Before campaign is created\r\n return (\r\n \r\n );\r\n }\r\n if (stepIndex < stepListWithServiceInfo.length - 1) {\r\n // [2nd..last) steps\r\n return (\r\n \r\n );\r\n }\r\n // last step\r\n const lastStepInfo = last(stepListWithServiceInfo);\r\n if (lastStepInfo.isReadOnly) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n );\r\n }, [\r\n stepIndex, classes.wizardFooter, i18n, stepListWithServiceInfo,\r\n saveAndNavigateNext, saveAndNavigateBack, saveAndExit, cancelAndExit, isBusy,\r\n ]);\r\n\r\n return (\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n {children}\r\n \r\n {stepFooter}\r\n
\r\n
\r\n
\r\n );\r\n});\r\n\r\nMultiStepLayout.propTypes = {\r\n children: PropTypes.oneOfType([\r\n PropTypes.arrayOf(PropTypes.node),\r\n PropTypes.node,\r\n ]).isRequired,\r\n wizardState: PropTypes.shape({\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n stepInfo: PropTypes.shape({\r\n id: PropTypes.string.isRequired,\r\n }),\r\n stepIndex: PropTypes.number.isRequired,\r\n stepListWithServiceInfo: PropTypes.arrayOf(PropTypes.shape({\r\n stepService: PropTypes.shape({}),\r\n })).isRequired,\r\n isBusy: PropTypes.bool.isRequired,\r\n }).isRequired,\r\n wizardActions: PropTypes.shape({\r\n saveAndNavigateNext: PropTypes.func.isRequired,\r\n saveAndNavigateBack: PropTypes.func.isRequired,\r\n cancelAndExit: PropTypes.func.isRequired,\r\n saveAndExit: PropTypes.func.isRequired,\r\n }).isRequired,\r\n classes: PropTypes.shape({\r\n wizardContainer: PropTypes.string.isRequired,\r\n wizardListContainer: PropTypes.string.isRequired,\r\n wizardMainContainer: PropTypes.string.isRequired,\r\n wizardStepContainer: PropTypes.string.isRequired,\r\n wizardFooter: PropTypes.string.isRequired,\r\n }).isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { VerticalSeparatedLayout } from '@bingads-webui-react/steps';\r\nimport { StepFooter } from '@bingads-webui-campaign-react/step-wizard-layout';\r\nimport { footerStyleOverrides } from '../styles/footer-style-overrides';\r\n\r\nconst {\r\n StepsContextProvider,\r\n StepContainer,\r\n} = VerticalSeparatedLayout;\r\n\r\nexport const SingleStepLayout = React.memo(({\r\n children,\r\n wizardState: {\r\n i18n,\r\n stepInfo,\r\n isBusy,\r\n isReadOnlyUser,\r\n },\r\n wizardActions: {\r\n saveAndNavigateNext,\r\n cancelAndExit,\r\n },\r\n isCenteredLayout, classes,\r\n}) => (\r\n \r\n
\r\n
\r\n \r\n {children}\r\n \r\n
\r\n \r\n
\r\n
\r\n));\r\n\r\nSingleStepLayout.propTypes = {\r\n children: PropTypes.oneOfType([\r\n PropTypes.arrayOf(PropTypes.node),\r\n PropTypes.node,\r\n ]).isRequired,\r\n wizardState: PropTypes.shape({\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n stepInfo: PropTypes.shape({\r\n id: PropTypes.string.isRequired,\r\n }),\r\n isBusy: PropTypes.bool.isRequired,\r\n isReadOnlyUser: PropTypes.bool.isRequired,\r\n }).isRequired,\r\n wizardActions: PropTypes.shape({\r\n saveAndNavigateNext: PropTypes.func.isRequired,\r\n cancelAndExit: PropTypes.func.isRequired,\r\n }).isRequired,\r\n isCenteredLayout: PropTypes.bool,\r\n classes: PropTypes.shape({\r\n wizardContainer: PropTypes.string.isRequired,\r\n wizardMainContainer: PropTypes.string.isRequired,\r\n wizardSingleStepLayoutStepScrollingContainer: PropTypes.string.isRequired,\r\n wizardSingleStepLayoutCenteredStepContainer: PropTypes.string.isRequired,\r\n wizardSingleStepLayoutStepContainer: PropTypes.string.isRequired,\r\n wizardFooter: PropTypes.string.isRequired,\r\n }).isRequired,\r\n};\r\n\r\nSingleStepLayout.defaultProps = {\r\n isCenteredLayout: false,\r\n};\r\n","import React, { useEffect, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { withScope } from '@bingads-webui-react/scope-service';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { ContentFooter } from '@bingads-webui-campaign-react/content-footer';\r\nimport { UiBlocker } from '@bingads-webui-react/ui-blocker';\r\nimport { InstrumentationContext, withInstrumentation } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { Scenario, Activity } from '@bingads-webui-react/hoc-with-signal';\r\nimport { log } from '@bingads-webui-campaign-react/step-wizard-machine';\r\nimport { stepListProp } from '@bingads-webui-campaign-react/step-wizard-machine-capi';\r\nimport { VerticalSeparatedLayout } from '@bingads-webui-react/steps';\r\nimport { getWizardStyles } from '../styles/wizard-styles';\r\nimport { useWizardState } from './use-wizard-state';\r\nimport { MultiStepLayout } from './multi-step-layout';\r\nimport { SingleStepLayout } from './single-step-layout';\r\n\r\nconst { Step } = VerticalSeparatedLayout;\r\n\r\nconst StepWizardImpl = ({\r\n wizardScenario, instrumentation, extraStepsData, permissions, scope, routeToNavigateToWhenDone, scopeToRemoveWhenDone, perfMarker,\r\n}) => {\r\n useEffect(() => {\r\n log('StepWizard mounted');\r\n return () => {\r\n log('StepWizard unmounted');\r\n };\r\n }, []);\r\n\r\n const classes = useDefaultStyles(getWizardStyles);\r\n\r\n const [wizardState, wizardActions] = useWizardState({\r\n permissions,\r\n wizardScenario,\r\n scope,\r\n routeToNavigateToWhenDone,\r\n scopeToRemoveWhenDone,\r\n instrumentation,\r\n extraStepsData,\r\n perfMarker,\r\n });\r\n\r\n const {\r\n isCenteredLayout,\r\n withContentFooter = true,\r\n i18n,\r\n scenarioName,\r\n scenario,\r\n stepListWithServiceInfo,\r\n isBusy,\r\n wasSaving,\r\n wasWaitingForConfirmation,\r\n wasStopping,\r\n } = wizardState;\r\n\r\n const Layout = useMemo(\r\n () => (wizardScenario.stepList.length > 1 ? MultiStepLayout : SingleStepLayout),\r\n [wizardScenario.stepList.length]\r\n );\r\n\r\n const loadingText = useMemo(\r\n () => {\r\n if (wasWaitingForConfirmation) {\r\n return i18n.getString(_TL_('Waiting for confirmation...'));\r\n }\r\n if (wasStopping) {\r\n return i18n.getString(_TL_('Finishing...'));\r\n }\r\n return wasSaving ? i18n.getString(_TL_('Saving...')) : i18n.getString(_TL_('Loading...'));\r\n },\r\n [wasWaitingForConfirmation, wasSaving, wasStopping, i18n]\r\n );\r\n\r\n const steps = useMemo(() => stepListWithServiceInfo\r\n .map(({ stepInfo: stepInfo2, stepService, StepRepository }) => (\r\n \r\n \r\n {stepService && stepService.initialized &&\r\n <>\r\n {StepRepository &&\r\n \r\n }\r\n \r\n \r\n }\r\n {/* the below element is there because StepContainer complains if Step.children is null,\r\n even though it is not going to render them. It is a bug in Step component. It scans the React VDOM tree to\r\n extract meta-information about steps, nested steps and so on. */}\r\n {!stepService &&\r\n

Loading...

\r\n }\r\n
\r\n \r\n )), [stepListWithServiceInfo, classes.wizardStep, i18n, wizardActions, perfMarker]);\r\n\r\n return (\r\n \r\n \r\n \r\n
\r\n \r\n \r\n {steps}\r\n \r\n {withContentFooter && }\r\n \r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nStepWizardImpl.propTypes = {\r\n permissions: PropTypes.shape({}).isRequired,\r\n wizardScenario: PropTypes.shape({\r\n scenarioName: PropTypes.string.isRequired,\r\n stepList: stepListProp.isRequired,\r\n }).isRequired,\r\n scope: PropTypes.shape({\r\n values: PropTypes.shape({\r\n cid: PropTypes.number.isRequired,\r\n aid: PropTypes.number.isRequired,\r\n }).isRequired,\r\n }).isRequired,\r\n routeToNavigateToWhenDone: PropTypes.string.isRequired,\r\n scopeToRemoveWhenDone: PropTypes.arrayOf(PropTypes.string),\r\n instrumentation: PropTypes.shape({}).isRequired,\r\n extraStepsData: PropTypes.shape({}),\r\n perfMarker: PropTypes.shape({}).isRequired,\r\n};\r\n\r\nStepWizardImpl.defaultProps = {\r\n extraStepsData: {},\r\n scopeToRemoveWhenDone: [],\r\n};\r\n\r\nexport const StepWizard = withInstrumentation(withScope(StepWizardImpl));\r\n","import { isFunction } from 'underscore';\r\nimport React, { useCallback, useEffect, useMemo } from 'react';\r\nimport { Prompt } from 'react-router-dom';\r\n\r\nexport const useNavigationConfirmationPrompt = (needsConfirmation, confirmationMessage) => {\r\n const onUserNavigation = useCallback((location, action) => {\r\n if ((isFunction(needsConfirmation) && needsConfirmation(location, action)) || needsConfirmation) {\r\n return confirmationMessage;\r\n }\r\n return true;\r\n }, [needsConfirmation, confirmationMessage]);\r\n\r\n const navigationConfirmationPrompt = useMemo(() => (\r\n \r\n ), [onUserNavigation]);\r\n\r\n const beforeUnloadListener = useCallback((event) => {\r\n event.preventDefault();\r\n // eslint-disable-next-line no-param-reassign\r\n event.returnValue = confirmationMessage;\r\n return confirmationMessage;\r\n }, [confirmationMessage]);\r\n useEffect(() => {\r\n if (needsConfirmation) {\r\n addEventListener('beforeunload', beforeUnloadListener, { capture: true });\r\n } else {\r\n removeEventListener('beforeunload', beforeUnloadListener, { capture: true });\r\n }\r\n\r\n return () => {\r\n removeEventListener('beforeunload', beforeUnloadListener, { capture: true });\r\n };\r\n }, [needsConfirmation, beforeUnloadListener]);\r\n\r\n return navigationConfirmationPrompt;\r\n};\r\n","import { useEffect, useMemo } from 'react';\r\nimport { StepEvents } from '@bingads-webui-campaign-react/step-wizard-machine';\r\nimport { useNavigationConfirmationPrompt } from './use-navigation-confirmation-prompt';\r\nimport { useWindowConfirm } from './use-window-confirm';\r\n\r\nconst EXIT_WITHOUT_SAVING_MESSAGE_KEY = _TL_('Your latest changes have not been saved. Do you want to continue without saving changes?');\r\n\r\nexport const useExitWithoutSavingConfirmation = (needsConfirmation, stepService, i18n, confirmationMessage = undefined) => {\r\n // Browser and router navigation cancelation must be synchronous, so cannot be handled by wizard-state-machine\r\n // because wizard-state-machine doesn't have enough information on whether an individual step can\r\n // navigate away or not, and would need to delegate this to the step-state-machine.\r\n // Wizard's navigation button based existing/canceling can be asynchronous and, again, will be\r\n // delegated to the current step as the step has necessary information.\r\n const exitConfirmationMessage = useMemo(() => confirmationMessage || i18n.getString(EXIT_WITHOUT_SAVING_MESSAGE_KEY), [i18n, confirmationMessage]);\r\n const navigationConfirmationPrompt = useNavigationConfirmationPrompt(needsConfirmation, exitConfirmationMessage);\r\n const confirmCancel = useWindowConfirm(exitConfirmationMessage);\r\n useEffect(() => {\r\n stepService.send({ type: StepEvents.OVERRIDE_ACTIONS, data: { confirmCancel } });\r\n }, [stepService, confirmCancel]);\r\n\r\n return [navigationConfirmationPrompt];\r\n};\r\n","import { useCallback } from 'react';\r\n\r\nexport const useWindowConfirm = message =>\r\n // eslint-disable-next-line no-alert\r\n useCallback(() => window.confirm(message), [message]);\r\n","import { constant } from 'underscore';\r\nimport React, { useEffect, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { useSelector } from '@xstate/react';\r\nimport hoistNonReactStatics from 'hoist-non-react-statics';\r\nimport { getDisplayName } from '@bingads-webui-react/hoc-utils';\r\nimport { ProgressiveLoadingBlock } from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport {\r\n StepEvents,\r\n isLoading as isLoadingSelector,\r\n isFailedInit as isFailedInitSelector,\r\n isFin as isFinSelector,\r\n isStopping as sharedIsStoppingSelector,\r\n log,\r\n stateLoggingListener,\r\n} from '@bingads-webui-campaign-react/step-wizard-machine';\r\nimport { useUpdateChildPerfMarker } from '@bingads-webui-campaign-react/performance-marker-provider';\r\n\r\nexport const StepLoadingStatus = {\r\n loading: 'loading',\r\n ready: 'ready',\r\n failed: 'failed',\r\n};\r\n\r\nexport const defaultLoadingStatusSelector = (state) => {\r\n if (isFailedInitSelector(state)) {\r\n return StepLoadingStatus.failed;\r\n }\r\n\r\n if (isLoadingSelector(state)) {\r\n return StepLoadingStatus.loading;\r\n }\r\n\r\n return StepLoadingStatus.ready;\r\n};\r\n\r\nexport const defaultIsStoppingSelector = state => sharedIsStoppingSelector(state) || isFinSelector(state);\r\n\r\nexport const defaultFallback = () => ();\r\n\r\n/**\r\n * The step state machine-aware higher-order React component for wrapping an actual step UI component.\r\n * The HOC will render the provided fallback UI until the step has loaded initial data\r\n * required for it to render.\r\n */\r\nconst StepLoadingShell = React.memo(({\r\n stepService,\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n loadingStatusSelector,\r\n isStoppingSelector,\r\n stepComponent: StepComponent,\r\n fallback: Fallback,\r\n wizardPerfMarker,\r\n stepPerfMarkerName,\r\n ...restProps\r\n}) => {\r\n useEffect(() => {\r\n const subscription = stepService.subscribe(stateLoggingListener);\r\n log('StepLoadingShell mounted');\r\n return () => {\r\n log('StepLoadingShell unmounted');\r\n subscription.unsubscribe();\r\n };\r\n }, [stepService]);\r\n\r\n const isLoading = useSelector(stepService, isLoadingSelector);\r\n const isStopping = useSelector(stepService, isStoppingSelector);\r\n const perfmarker = useMemo(\r\n () => {\r\n const child = wizardPerfMarker.createChild(stepPerfMarkerName, { autoEnd: false });\r\n child.willInit();\r\n return child;\r\n },\r\n [wizardPerfMarker, stepPerfMarkerName]\r\n );\r\n\r\n useUpdateChildPerfMarker(perfmarker, isLoading);\r\n\r\n useEffect(() => {\r\n stepService.send({ type: StepEvents.OVERRIDE_GUARDS, data: { needsStopping: constant(true) } });\r\n }, [stepService]);\r\n\r\n useEffect(() => {\r\n if (isStopping) {\r\n log('StepLoadingShell sending DONE_STOPPING');\r\n stepService.send({ type: StepEvents.DONE_STOPPING });\r\n }\r\n }, [stepService, isStopping]);\r\n\r\n log('StepLoadingShell.render: isLoading, isStopping', isLoading, isStopping);\r\n\r\n if (isLoading) {\r\n return ;\r\n } else if (!isStopping) {\r\n return ;\r\n }\r\n return null;\r\n});\r\n\r\nStepLoadingShell.propTypes = {\r\n stepService: PropTypes.shape({\r\n subscribe: PropTypes.func.isRequired,\r\n send: PropTypes.func,\r\n }).isRequired,\r\n stepComponent: PropTypes.elementType.isRequired,\r\n loadingStatusSelector: PropTypes.func,\r\n isStoppingSelector: PropTypes.func,\r\n fallback: PropTypes.elementType,\r\n wizardPerfMarker: PropTypes.shape({\r\n createChild: PropTypes.func.isRequired,\r\n }).isRequired,\r\n stepPerfMarkerName: PropTypes.string.isRequired,\r\n};\r\n\r\nStepLoadingShell.defaultProps = {\r\n loadingStatusSelector: defaultLoadingStatusSelector,\r\n isStoppingSelector: defaultIsStoppingSelector,\r\n fallback: defaultFallback,\r\n};\r\n\r\nexport const withStepLoadingShell = (\r\n StepComponent,\r\n {\r\n loadingStatusSelector: staticLoadingStatusSelector,\r\n isStoppingSelector: staticIsStoppingSelector,\r\n fallback: staticFallback,\r\n } = {}\r\n) => {\r\n const HOC = ({\r\n stepService, loadingStatusSelector, isStoppingSelector, fallback, wizardPerfMarker, stepPerfMarkerName, ...restProps\r\n }) => (\r\n \r\n );\r\n\r\n HOC.propTypes = {\r\n stepService: PropTypes.shape({}).isRequired,\r\n loadingStatusSelector: PropTypes.func,\r\n isStoppingSelector: PropTypes.func,\r\n fallback: PropTypes.elementType,\r\n wizardPerfMarker: PropTypes.shape({\r\n createChild: PropTypes.func.isRequired,\r\n }).isRequired,\r\n stepPerfMarkerName: PropTypes.string.isRequired,\r\n };\r\n\r\n HOC.defaultProps = {\r\n loadingStatusSelector: undefined,\r\n isStoppingSelector: undefined,\r\n fallback: undefined,\r\n };\r\n\r\n HOC.displayName = `withStepLoadingShell(${getDisplayName(StepComponent)})`;\r\n hoistNonReactStatics(HOC, StepComponent);\r\n\r\n return HOC;\r\n};\r\n","import { useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { useSelector } from '@xstate/react';\r\nimport {\r\n isLoading as isLoadingSelector,\r\n isSaving as isSavingSelector,\r\n StepEvents,\r\n log,\r\n} from '@bingads-webui-campaign-react/step-wizard-machine';\r\nimport { useIsMounted } from './use-is-mounted';\r\n\r\n/**\r\n * A step repository React component for steps that neither load, nor save any data.\r\n * @param {Object} props the component's props\r\n * @param {Object} props.stepService an instance of the step's state machine\r\n * @returns {Element} an empty VDOM\r\n */\r\nexport const NoDataStepRepository = ({ stepService }) => {\r\n const isMountedRef = useIsMounted();\r\n\r\n const isLoading = useSelector(stepService, isLoadingSelector);\r\n const isSaving = useSelector(stepService, isSavingSelector);\r\n\r\n useEffect(() => {\r\n if (isLoading) {\r\n log('NoDataStepRepository loading data with loadData');\r\n if (isMountedRef.current) {\r\n log('NoDataStepRepository sending DONE_LOADING');\r\n stepService.send({ type: StepEvents.DONE_LOADING, data: {} });\r\n }\r\n } else if (isSaving) {\r\n log('NoDataStepRepository saving data with saveData');\r\n if (isMountedRef.current) {\r\n log('NoDataStepRepository sending DONE_SAVING');\r\n stepService.send({ type: StepEvents.DONE_SAVING, data: {} });\r\n }\r\n }\r\n }, [stepService, isLoading, isSaving, isMountedRef]);\r\n\r\n log('NoDataStepRepository.render: isLoading=_, isSaving=_', isLoading, isSaving);\r\n\r\n return null;\r\n};\r\n\r\nNoDataStepRepository.propTypes = {\r\n stepService: PropTypes.shape({\r\n subscribe: PropTypes.func.isRequired,\r\n send: PropTypes.func,\r\n }).isRequired,\r\n};\r\n","import { ComponentSettings } from '@bingads-webui-theme-2018/theme-fluent';\r\nimport CircleSolid from '../media/CircleSolid.svg';\r\nimport CircleDotted from '../media/CircleDotted.svg';\r\nimport DiamondSolid from '../media/DiamondSolid.svg';\r\nimport DiamondDotted from '../media/DiamondDotted.svg';\r\nimport Waterdrop from '../media/Waterdrop.svg';\r\n\r\nconst { getBlockerStyle } = ComponentSettings;\r\n\r\nexport const inlineChartContainerStyle = palette => ({\r\n flexShrink: 0,\r\n zIndex: 400,\r\n boxShadow: 'inset 0px 0.6px 1.8px rgba(0, 0, 0, 0.108), inset 0px 3.2px 7.2px rgba(0, 0, 0, 0.132)',\r\n '& .top-grid-form': {\r\n minWidth: 'initial',\r\n maxWidth: 'initial',\r\n },\r\n '& .chart-area-wrapper': {\r\n display: 'flex',\r\n\r\n '& .react-block-ui-none, .react-block-ui': {\r\n flexGrow: 1,\r\n },\r\n\r\n '& .inline-chart-container': {\r\n flexGrow: 1,\r\n paddingTop: 16,\r\n paddingLeft: 32,\r\n paddingRight: 32,\r\n paddingBottom: 22,\r\n display: 'flex',\r\n flexDirection: 'column',\r\n width: 'auto !important',\r\n '& .highcharts-label-box.highcharts-tooltip-box': {\r\n opacity: '0 !important',\r\n },\r\n '& .tool-tip-value': {\r\n fontSize: 16,\r\n paddingLeft: 20,\r\n paddingTop: 2,\r\n },\r\n '& .primary-daterange': {\r\n color: palette.neutralPrimary,\r\n fontSize: 11,\r\n fallbacks: [\r\n {\r\n color: '#323130',\r\n },\r\n ],\r\n },\r\n '& .primary-start-date, & .comparison-start-date': {\r\n paddingLeft: 20,\r\n display: 'inline-block',\r\n fallbacks: [\r\n {\r\n paddingLeft: 20,\r\n },\r\n ],\r\n },\r\n '& .primary-end-date, & .comparison-end-date': {\r\n position: 'absolute',\r\n display: 'inline-block',\r\n right: '0',\r\n fallbacks: [\r\n {\r\n right: '0',\r\n },\r\n {\r\n position: 'absolute',\r\n },\r\n ],\r\n },\r\n '& .comparison-daterange': {\r\n color: palette.neutralSecondary,\r\n fontSize: 11,\r\n fallbacks: [\r\n {\r\n color: '#605E5C',\r\n },\r\n ],\r\n },\r\n '& .flex-chart-panel': {\r\n display: 'flex',\r\n paddingBottom: '16px',\r\n alignSelf: 'flex-end',\r\n },\r\n '& .chart-panel-left': {\r\n alignItems: 'flex-start',\r\n lineHeight: '19px',\r\n paddingTop: '6px',\r\n height: 38,\r\n },\r\n '& .chart-panel-right': {\r\n display: 'flex',\r\n flex: '1 1 auto',\r\n justifyContent: 'flex-end',\r\n alignItems: 'flex-start',\r\n '& .glyphicon-triangle-bottom': {\r\n fontSize: 12,\r\n marginLeft: 5,\r\n fontFamily: 'MsAds MDL2 Assets !important',\r\n float: 'right',\r\n marginRight: '0',\r\n height: '12px !important',\r\n width: '12px !important',\r\n },\r\n '& .glyphicon-triangle-bottom:before': {\r\n content: '\"\\\\E70D\" !important',\r\n },\r\n },\r\n '& .metrics-pickers': {\r\n display: 'flex',\r\n\r\n '& .metric-colors': {\r\n display: 'flex',\r\n },\r\n '& .metrics-vs': {\r\n margin: '0px 16px 0px 16px',\r\n paddingLeft: 0,\r\n paddingRight: 0,\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent: 'center',\r\n },\r\n '& .metric-color-line': {\r\n width: 12,\r\n height: 42,\r\n backgroundRepeat: 'no-repeat',\r\n },\r\n '& .show-comparison-line': {\r\n display: 'inline-block',\r\n },\r\n '& .hide-comparison-line': {\r\n display: 'none',\r\n },\r\n '& .comparison-color': {\r\n marginLeft: '4px',\r\n },\r\n '& .primary-metric .metric-color': {\r\n backgroundImage: `url(\"${CircleSolid}\")`,\r\n },\r\n '& .primary-metric .comparison-color': {\r\n backgroundImage: `url(\"${CircleDotted}\")`,\r\n },\r\n '& .secondary-metric .metric-color': {\r\n backgroundImage: `url(\"${DiamondSolid}\")`,\r\n },\r\n '& .secondary-metric .comparison-color': {\r\n backgroundImage: `url(\"${DiamondDotted}\")`,\r\n },\r\n '& .list-selector-container': {\r\n maxHeight: 400,\r\n overflow: 'auto',\r\n },\r\n },\r\n '& .granularity-picker, & .primary-metric, & .secondary-metric': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n alignSelf: 'center',\r\n height: '100%',\r\n '& .btn': {\r\n fontSize: 14,\r\n },\r\n '& .btn-default': {\r\n fontWeight: 'normal',\r\n },\r\n '& .dropdown-menu': {\r\n top: 'auto',\r\n position: 'absolute',\r\n minWidth: 110,\r\n whiteSpace: 'nowrap',\r\n\r\n '& .container': {\r\n padding: 0,\r\n },\r\n },\r\n '& .dropdown-toggle.btn': {\r\n border: 'none',\r\n width: '100%',\r\n height: '100%',\r\n paddingLeft: 8,\r\n paddingRight: 8,\r\n borderRadius: 2,\r\n },\r\n\r\n '& .ba-dropdown-selector': {\r\n position: 'relative',\r\n border: `1px solid ${palette.neutralSecondary}`,\r\n minWidth: 132,\r\n verticalAlign: 'baseline',\r\n marginLeft: 8,\r\n height: 30,\r\n borderRadius: 2,\r\n '& > button': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n },\r\n\r\n '& .selectedItem-data': {\r\n display: 'inline-block',\r\n marginRight: 5,\r\n },\r\n\r\n '& .comparison-container': {\r\n display: 'inline-block',\r\n },\r\n\r\n '& .show-selectedItem-percentage': {\r\n paddingLeft: 5,\r\n display: 'inline-block',\r\n },\r\n\r\n '& .hide-selectedItem-percentage': {\r\n padding: 0,\r\n margin: 0,\r\n display: 'none',\r\n },\r\n\r\n '& .ba-list-selector': {\r\n border: 'none',\r\n '& .empty-message': {\r\n position: 'absolute',\r\n padding: '5px 10px',\r\n },\r\n '& .list-selector-item': {\r\n padding: '5px 10px',\r\n margin: '0',\r\n '&:hover': {\r\n cursor: 'pointer',\r\n backgroundColor: '#f5f5f5',\r\n },\r\n '&.selected': {\r\n background: '#E7F0F6',\r\n },\r\n '& .item-actions': {\r\n float: 'right',\r\n },\r\n '& .inline-recommendation-grid-icon:before': {\r\n fontFamily: 'MsAds MDL2 Assets',\r\n content: '\"\\\\EA80\"',\r\n display: 'inline-block',\r\n fontWeight: 'normal',\r\n fontStyle: 'normal',\r\n textDecoration: 'inherit',\r\n speak: 'none',\r\n fontVariant: 'normal',\r\n textTransform: 'none',\r\n lineHeight: 1,\r\n WebkitFontSmoothing: 'antialiased',\r\n MozOsxFontSmoothing: 'grayscale',\r\n fontSize: 14,\r\n verticalAlign: 'middle',\r\n color: '#0078D4',\r\n paddingBottom: 2,\r\n },\r\n '& .inline-recommendation-grid-icon:hover': {\r\n cursor: 'pointer',\r\n },\r\n '& .inline-chart-option': {\r\n marginLeft: 5,\r\n },\r\n },\r\n },\r\n },\r\n\r\n '& .granularity-picker, & .secondary-metric': {\r\n '& .dropdown-menu': {\r\n left: 'auto',\r\n right: '0',\r\n },\r\n },\r\n\r\n '& .moving-average': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n height: '100%',\r\n fontStyle: 'normal',\r\n fontSize: 14,\r\n fontWeight: 'normal',\r\n marginLeft: 16,\r\n whiteSpace: 'nowrap',\r\n '& input[type=checkbox]': {\r\n height: 20,\r\n width: 20,\r\n },\r\n '& label': {\r\n display: 'inline-block',\r\n fontWeight: 'normal',\r\n '& input': {\r\n margin: '0px 5px 0 5px',\r\n lineHeight: 'normal',\r\n verticalAlign: 'middle',\r\n },\r\n },\r\n },\r\n '& .react-highchart-wrapper': {\r\n '& > div[role=\"region\"]': {\r\n overflow: 'visible !important',\r\n },\r\n },\r\n '& .highcharts-container': {\r\n overflow: 'visible !important',\r\n },\r\n '& .chart-container': {\r\n padding: '0',\r\n position: 'relative',\r\n },\r\n\r\n '& .balloon, & .balloonYellow, & .balloonUnknown': {\r\n position: 'absolute',\r\n top: -20,\r\n },\r\n '& .balloon, & .balloonYellow, & .balloonUnknown:hover': {\r\n cursor: 'pointer',\r\n },\r\n\r\n '& .fluc-image': {\r\n backgroundImage: `url(\"${Waterdrop}\")`,\r\n backgroundRepeat: 'no-repeat',\r\n backgroundPositionX: 'left',\r\n backgroundPositionY: 'center',\r\n width: '28px',\r\n height: '38px',\r\n textAlign: 'center',\r\n paddingLeft: '1px !important',\r\n paddingTop: '11px !important',\r\n\r\n '&:before': {\r\n fontFamily: 'MsAds MDL2 Assets',\r\n content: '\"\\\\EA80\"',\r\n color: 'white',\r\n fontSize: 16,\r\n },\r\n },\r\n\r\n '& .fluc-lightbulb': {\r\n '&:before': {\r\n fontFamily: 'MsAds MDL2 Assets',\r\n content: '\"\\\\EA80\"',\r\n color: '#0078D4',\r\n fontSize: 16,\r\n },\r\n },\r\n\r\n '& .chart-no-data-container': {\r\n textAlign: 'center',\r\n borderLeft: '0 !important',\r\n borderRight: '0 !important',\r\n height: '120px',\r\n lineHeight: 'initial',\r\n paddingTop: 22,\r\n paddingBottom: 60,\r\n border: `solid 1px ${palette.neutralQuaternaryAlt}`,\r\n marginRight: 0,\r\n marginTop: 19,\r\n '& .chart-no-data-label': {\r\n marginLeft: 0,\r\n borderBottom: `solid 1px ${palette.neutralQuaternaryAlt}`,\r\n display: 'inline-block',\r\n height: '100%',\r\n width: '100%',\r\n },\r\n },\r\n '& .spinner': {\r\n paddingTop: 50,\r\n paddingBottom: 59,\r\n '& .spinner-icon': Object.assign(getBlockerStyle(30, palette), {\r\n marginLeft: 'auto',\r\n marginRight: 'auto',\r\n }),\r\n },\r\n '& .highcharts-label.highcharts-tooltip': {\r\n margin: '0 !important',\r\n width: 'auto !important',\r\n minWidth: '150px !important',\r\n height: 'auto !important',\r\n minHeight: '100px !important',\r\n '& > span:nth-of-type(1)': {\r\n fontFamily: 'Segoe UI !important',\r\n border: 'none',\r\n },\r\n },\r\n '& .perf-graph-tool-tip': {\r\n display: 'flex',\r\n boxShadow: '0 3.2px 7.2px 0 rgba(0,0,0,.132), 0 0.6px 1.8px 0 rgba(0,0,0,.108)',\r\n backgroundColor: 'rgba(255, 255, 255, 0.95)',\r\n padding: '11px 15px',\r\n '@supports (backdrop-filter: blur(60px))': {\r\n backdropFilter: 'blur(60px)',\r\n backgroundColor: 'rgba(255, 255, 255, 0.25)',\r\n },\r\n '& .charts-tooltip': {\r\n color: palette.neutralPrimary,\r\n fontSize: '12px',\r\n fontFamily: 'Segoe UI',\r\n display: 'inline-block',\r\n\r\n '& .primary, & .primary-comparison, & .movingaverage, & .movingaverage-comparison': {\r\n backgroundRepeat: 'no-repeat',\r\n backgroundSize: '12px 40px',\r\n height: '40px',\r\n '& .toolTipMetric': {\r\n height: 12,\r\n marginRight: 8,\r\n marginTop: 8,\r\n paddingLeft: 20,\r\n },\r\n },\r\n '& b': {\r\n fontWeight: 'normal',\r\n },\r\n '& .primary': {\r\n backgroundImage: `url(\"${CircleSolid}\")`,\r\n },\r\n '& .primary-comparison': {\r\n backgroundImage: `url(\"${DiamondSolid}\")`,\r\n },\r\n '& .movingaverage': {\r\n backgroundImage: `url(\"${CircleDotted}\")`,\r\n },\r\n '& .movingaverage-comparison': {\r\n backgroundImage: `url(\"${DiamondDotted}\")`,\r\n },\r\n },\r\n '& .charts-tooltip:nth-of-type(2)': {\r\n marginLeft: '16px !important',\r\n },\r\n },\r\n },\r\n },\r\n '& .bingads-popover': {\r\n zIndex: '100',\r\n },\r\n});\r\n","export const EntityName = {\r\n AccountEntity: 'Account',\r\n AdGroupEntity: 'AdGroup',\r\n AdEntity: 'Ad',\r\n AuctionInsightEntity: 'AuctionInsight',\r\n AudiencesAssociationEntity: 'AdGroupAudienceAssociation',\r\n AssetGroupEntity: 'AssetGroup',\r\n CampaignEntity: 'Campaign',\r\n KeywordEntity: 'Keyword',\r\n SearchTermEntity: 'SearchTerm',\r\n DsaTargetEntity: 'DsaTarget',\r\n PortfolioBidStrategyEntity: 'PortfolioBidStrategy',\r\n};\r\n\r\nexport const EdmEntityName = {\r\n AccountEdmEntity: 'Accounts',\r\n AdEdmEntity: 'Ads',\r\n AdGroupEdmEntity: 'AdGroups',\r\n AdGroupCriterionEdmEntity: 'AdGroupCriterions',\r\n AssetGroupEdmEntity: 'AssetGroups',\r\n CampaignEdmEntity: 'Campaigns',\r\n CampaignCriterionEdmEntity: 'CampaignCriterions',\r\n KeywordEdmEntity: 'Keywords',\r\n AudienceCriterionWithBIEdmEntity: 'AudienceCriterionWithBIs',\r\n DsaTargetEdmEntity: 'DsaTargets',\r\n PortfolioBidStrategyEdmEntity: 'PortfolioBidStrategies',\r\n};\r\n\r\n// For entities like DsaTarget, they should escape the logic of quering\r\n// on their parent entities even if no filter is applied\r\nexport const PersistentEntity = [\r\n EntityName.DsaTargetEntity,\r\n EntityName.PortfolioBidStrategyEntity,\r\n // Accounts Summary should always query on the Account entity, regardless of filter.\r\n EntityName.AccountEntity,\r\n];\r\n","// Start your code from here for component inlinechart-query-builder\r\nimport _ from 'underscore';\r\nimport * as Constants from './constants';\r\n\r\nexport class InlineChartRequest {\r\n constructor(options) {\r\n this.edm = options.edm;\r\n this.state = options.state;\r\n this.pageContext = options.pageContext;\r\n }\r\n\r\n getParentLevels = () => {\r\n const currentCampaign = this.pageContext.CurrentCampaign;\r\n const currentAdGroup = this.pageContext.CurrentAdGroup;\r\n const parentLevels = [];\r\n\r\n if (currentCampaign) {\r\n parentLevels.push({\r\n name: Constants.EdmEntityName.CampaignEdmEntity,\r\n id: currentCampaign.Id,\r\n });\r\n }\r\n\r\n if (currentAdGroup) {\r\n parentLevels.push({\r\n name: Constants.EdmEntityName.AdGroupEdmEntity,\r\n id: currentAdGroup.Id,\r\n });\r\n }\r\n\r\n return parentLevels;\r\n };\r\n\r\n getDefaultEntityBaseOnParentLevels = (parentLevels) => {\r\n let entity = Constants.EntityName.CampaignEntity;\r\n const currentCampaign = this.pageContext.CurrentCampaign;\r\n const isPerfMaxCampaign = _.findWhere(currentCampaign?.CampaignSettings, { '@odata.type': '#Model.PerformanceMaxSetting' });\r\n const isAppCampaign = _.findWhere(currentCampaign?.CampaignSettings, { '@odata.type': '#Model.AppSetting' });\r\n\r\n if (parentLevels && parentLevels.constructor === Array && parentLevels.length > 0) {\r\n if (parentLevels[parentLevels.length - 1].name ===\r\n Constants.EdmEntityName.AdGroupEdmEntity) {\r\n entity = Constants.EntityName.AdEntity;\r\n } else if (parentLevels[parentLevels.length - 1].name ===\r\n Constants.EdmEntityName.CampaignEdmEntity) {\r\n if (isPerfMaxCampaign || isAppCampaign) {\r\n entity = Constants.EntityName.AssetGroupEntity;\r\n } else {\r\n entity = Constants.EntityName.AdGroupEntity;\r\n }\r\n }\r\n }\r\n\r\n return entity;\r\n };\r\n\r\n isFilterActive = (filter) => {\r\n const filterString = filter && filter.odataV4 ?\r\n filter.odataV4({ ignoreCase: false }) : '';\r\n return (!!filterString);\r\n };\r\n\r\n getCurrentEntity = (entity, filter) => {\r\n if (_.contains(Constants.PersistentEntity, entity)) {\r\n return entity;\r\n }\r\n\r\n // When there is no filter applied, PerformanceTimeSerieis request for all entities\r\n // (Adsgroup, Ads, Kewords) needs to query on Campaign entity inorder to improve\r\n // MT performance.\r\n // the PerformanceData fetched is for Account or Campaign based on the parent level.\r\n // Always use default parent entity if current entity is SearchTerm\r\n if (!this.isFilterActive(filter) || entity === Constants.EntityName.SearchTermEntity) {\r\n // No filters or SearchTerm use default parent entity\r\n return this.getDefaultEntityBaseOnParentLevels(this.getParentLevels());\r\n }\r\n return entity || this.getDefaultEntityBaseOnParentLevels(this.getParentLevels());\r\n };\r\n\r\n formatDateString = (dateStr) => {\r\n const leftPadding = s => ((s.length === 1) ? `0${s}` : s);\r\n const dt = new Date(Date.parse(dateStr));\r\n const year = `${dt.getFullYear()}`;\r\n const month = `${dt.getMonth() + 1}`;\r\n const day = `${dt.getDate()}`;\r\n\r\n return `${year}-${leftPadding(month)}-${leftPadding(day)}`;\r\n };\r\n\r\n getEntityCollectionName = (name) => {\r\n const nameMapping = {\r\n Campaign: Constants.EdmEntityName.CampaignEdmEntity,\r\n Keyword: Constants.EdmEntityName.KeywordEdmEntity,\r\n Account: Constants.EdmEntityName.AccountEdmEntity,\r\n // Negative keywords also show keyword performance trend\r\n NegativeKeyword: Constants.EdmEntityName.KeywordEdmEntity,\r\n // Negative keyword lists also show keyword performance trend\r\n NegativeKeywordList: Constants.EdmEntityName.KeywordEdmEntity,\r\n AdGroup: Constants.EdmEntityName.AdGroupEdmEntity,\r\n AssetGroup: Constants.EdmEntityName.AssetGroupEdmEntity,\r\n Ad: Constants.EdmEntityName.AdEdmEntity,\r\n CampaignCriterion: Constants.EdmEntityName.CampaignCriterionEdmEntity,\r\n AdGroupCriterion: Constants.EdmEntityName.AdGroupCriterionEdmEntity,\r\n AudienceCriterionWithBI: Constants.EdmEntityName.AudienceCriterionWithBIEdmEntity,\r\n DsaTarget: Constants.EdmEntityName.DsaTargetEdmEntity,\r\n PortfolioBidStrategy: Constants.EdmEntityName.PortfolioBidStrategyEdmEntity,\r\n };\r\n\r\n if (nameMapping[name]) {\r\n return nameMapping[name];\r\n }\r\n return name;\r\n };\r\n\r\n generateRequest = (context, metric) => {\r\n const request = {};\r\n const entity = context.currentEntity\r\n ? this.getCurrentEntity(context.currentEntity, context.filter)\r\n : Constants.EntityName.CampaignEntity;\r\n\r\n let accountModes = null;\r\n if (entity === Constants.EntityName.AccountEntity\r\n && this.pageContext.CurrentTabId === 'Performance') {\r\n if (this.pageContext.CurrentGridName === 'SmartPerformanceGrid') {\r\n accountModes = 'Smart';\r\n } else if (this.pageContext.CurrentGridName === 'PerformanceGrid') {\r\n accountModes = 'Expert';\r\n }\r\n }\r\n\r\n if (entity === Constants.EntityName.CampaignEntity ||\r\n entity === Constants.EntityName.AdGroupEntity ||\r\n entity === Constants.EntityName.AdEntity ||\r\n entity === Constants.EntityName.KeywordEntity) {\r\n request.currentCustomerId = this.pageContext.CurrentCustomer.Id;\r\n }\r\n\r\n _.extend(request, {\r\n parentLevels: this.getParentLevels(),\r\n edmEntity: this.getEntityCollectionName(entity),\r\n entity,\r\n startDate: context.period\r\n ? this.formatDateString(context.period.start)\r\n : null,\r\n endDate: context.period\r\n ? this.formatDateString(context.period.end)\r\n : null,\r\n compareStartDate: context.period && context.period.compared\r\n ? this.formatDateString(context.period.compared.start)\r\n : null,\r\n compareEndDate: context.period && context.period.compared\r\n ? this.formatDateString(context.period.compared.end)\r\n : null,\r\n granularity: context.granularity,\r\n metrics: context.metric || metric,\r\n filters: context.currentEntity === Constants.EntityName.SearchTermEntity\r\n ? null // Ignore filters on SearchTerm\r\n : context.filter,\r\n movingAverage: context.isMovingAverageOn,\r\n });\r\n if (accountModes) {\r\n _.extend(request, {\r\n accountModes,\r\n });\r\n }\r\n return request;\r\n };\r\n\r\n getQuery = context => this.generateRequest(context, 'All');\r\n}\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport * as Constants from './constants';\r\nimport { InlineChartRequest } from './inline-chart-request';\r\n\r\nexport class InlineChartService {\r\n constructor(options) {\r\n this.request = new InlineChartRequest(options);\r\n this.jsdata = options.jsdata;\r\n this.edm = options.edm;\r\n }\r\n\r\n findAll = context => (new Promise((resolve, reject) => {\r\n const filterObj = context.filter;\r\n // Ignore filter string for SearchTerm\r\n const filterString = filterObj && filterObj.odataV4\r\n && context.currentEntity !== Constants.EntityName.SearchTermEntity ?\r\n filterObj.odataV4({ ignoreCase: false }) :\r\n '';\r\n\r\n const request = this.request.getQuery(context);\r\n if (!this.jsdata.PerformanceTimeSeries || !this.jsdata.PerformanceTimeSeries.findAll) {\r\n return;\r\n }\r\n\r\n // eslint-disable-next-line consistent-return\r\n return this.jsdata.PerformanceTimeSeries.findAll(\r\n {\r\n where: filterString,\r\n entitySet: this.getScope(request).toJSON(),\r\n },\r\n {\r\n // bypass cache, as inline chart needs data aligned with grid, we need always\r\n // update to date here use bypassCache instead of cacheResponse as elsewhere\r\n // (performance card) may cache the response\r\n bypassCache: true,\r\n }\r\n ).then((rawData) => {\r\n resolve(rawData);\r\n }, reject);\r\n }));\r\n\r\n getScope = (request) => {\r\n let navigation = null;\r\n\r\n navigation = this.getNavigation(request.edmEntity);\r\n\r\n _.each(request.parentLevels, (nav) => {\r\n const navLocal = nav;\r\n if (navLocal && _.isString(navLocal.id)) {\r\n navLocal.id = parseInt(nav.id, 10);\r\n }\r\n navigation = navigation[navLocal.name].$withKey(navLocal.id);\r\n });\r\n\r\n if (request && request.edmEntity) {\r\n navigation = navigation[request.edmEntity];\r\n }\r\n\r\n const entitySetArgs = {\r\n granularity: `Enum.Granularity'${request.granularity}'`,\r\n startDate: request.startDate,\r\n endDate: request.endDate,\r\n comparisonStartDate: request.compareStartDate ? request.compareStartDate : null,\r\n comparisonEndDate: request.compareEndDate ? request.compareEndDate : null,\r\n metrics: `'${request.metrics}'`,\r\n movingAverage: request.movingAverage,\r\n };\r\n\r\n if (request.currentCustomerId) {\r\n entitySetArgs.currentCustomerId = request.currentCustomerId;\r\n }\r\n\r\n const isHierarchical = request.edmEntity === Constants.EdmEntityName.AccountEdmEntity;\r\n if (isHierarchical && request.accountModes) {\r\n entitySetArgs.accountModes = `'${request.accountModes}'`;\r\n }\r\n\r\n const entitySet = navigation[isHierarchical ? 'Default.HierarchicalPerformanceTimeSeries' : 'Default.PerformanceTimeSeries'].$call(entitySetArgs);\r\n return entitySet;\r\n };\r\n\r\n getNavigation = (entityType) => {\r\n switch (entityType) {\r\n case Constants.EdmEntityName.AccountEdmEntity:\r\n return this.edm.currentCustomer;\r\n case Constants.EdmEntityName.CampaignEdmEntity:\r\n return this.edm.currentAccount;\r\n default:\r\n return this.edm.currentAccount;\r\n }\r\n };\r\n}\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { noop } from 'underscore';\r\nimport { InlineChart } from '@bingads-webui-campaign-react/inline-chart';\r\nimport { InlineChartService } from '@bingads-webui-campaign/inline-chart-service';\r\nimport { InlineChartPreferences } from '@bingads-webui-campaign/inline-chart-preferences';\r\nimport { FluctuationService } from '@bingads-webui-campaign/fluctuation-service';\r\nimport { perfMarkerPropTypes } from '@bingads-webui/performance-marker';\r\n\r\n/**\r\n * Creates an inline chart with an accompanying data source and set of chart options.\r\n */\r\nexport class InlineChartWrapper extends React.PureComponent {\r\n static propTypes = {\r\n /**\r\n * grid-preferences adapter.\r\n */\r\n adapter: PropTypes.shape({\r\n registerSubadapter: PropTypes.func,\r\n }).isRequired,\r\n /**\r\n * Used for adding a date change listener.\r\n */\r\n addDateChangeListener: PropTypes.func.isRequired,\r\n /**\r\n * Entity data model.\r\n */\r\n edm: PropTypes.shape({\r\n currentAccount: PropTypes.any,\r\n currentCustomer: PropTypes.any,\r\n }).isRequired,\r\n\r\n /**\r\n * New data range as props for inline-chart whenever there is a date range update\r\n */\r\n dateRange: PropTypes.shape({}),\r\n /**\r\n * Type of entity to fetch chart data for.\r\n */\r\n entityType: PropTypes.string,\r\n /**\r\n * Filter object.\r\n */\r\n filter: PropTypes.shape({\r\n odataV4: PropTypes.func,\r\n }),\r\n /**\r\n * i18n\r\n * */\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n formatDate: PropTypes.func,\r\n }).isRequired,\r\n /**\r\n * Path to use for inline images like fluctuation-bulb.png.\r\n */\r\n imagePath: PropTypes.string,\r\n /**\r\n * instrumentation component.\r\n */\r\n instrumentation: PropTypes.shape({\r\n addScenario: PropTypes.func,\r\n inlineChart: PropTypes.shape({\r\n create: PropTypes.func,\r\n }),\r\n }).isRequired,\r\n /**\r\n * True if Fluctuations feature is enabled.\r\n */\r\n isFluctuationsEnabled: PropTypes.bool,\r\n IsFluctuationExperimentEnabled: PropTypes.bool,\r\n /**\r\n * True if chart should be visible.\r\n */\r\n isShowChart: PropTypes.bool.isRequired,\r\n\r\n /**\r\n * True if chart panel should be hidden.\r\n */\r\n hideChartPanel: PropTypes.bool,\r\n\r\n /**\r\n * jsdata resource used for fetching chart data.\r\n */\r\n jsdata: PropTypes.shape({\r\n PerformanceTimeSeries: PropTypes.shape({\r\n findAll: PropTypes.func,\r\n }),\r\n }).isRequired,\r\n /**\r\n * PageContext component.\r\n */\r\n pageContext: PropTypes.shape({\r\n CurrentCustomer: PropTypes.shape({\r\n Id: PropTypes.number,\r\n }),\r\n CurrentCampaign: PropTypes.shape({\r\n Id: PropTypes.number,\r\n }),\r\n CurrentAccount: PropTypes.shape({\r\n Id: PropTypes.number,\r\n }),\r\n CurrentUser: PropTypes.shape({\r\n Id: PropTypes.number,\r\n }),\r\n CurrentTabId: PropTypes.string,\r\n }).isRequired,\r\n /**\r\n * config component.\r\n */\r\n pathConfig: PropTypes.shape({\r\n get: PropTypes.func,\r\n }).isRequired,\r\n /**\r\n * preferenceService component.\r\n */\r\n preferenceService: PropTypes.shape({}).isRequired,\r\n /**\r\n * Resize window change listener to set highchart container width.\r\n */\r\n resizeChartListener: PropTypes.func.isRequired,\r\n resizeEventHandler: PropTypes.func,\r\n /**\r\n * state component.\r\n */\r\n state: PropTypes.shape({}).isRequired,\r\n /**\r\n * grid-preferences store.\r\n */\r\n store: PropTypes.shape({}).isRequired,\r\n /**\r\n * Auth token used by Fluctuation service.\r\n */\r\n token: PropTypes.string,\r\n /**\r\n * Theme colors, can be null\r\n */\r\n seriesColors: PropTypes.shape({\r\n primary: PropTypes.shape({\r\n original: PropTypes.string,\r\n comparative: PropTypes.string,\r\n }),\r\n secondary: PropTypes.shape({\r\n original: PropTypes.string,\r\n comparative: PropTypes.string,\r\n }),\r\n }),\r\n\r\n /**\r\n * Current gridCriterion Type\r\n */\r\n gridCriterionType: PropTypes.string,\r\n\r\n perfMarker: perfMarkerPropTypes,\r\n\r\n serverContext: PropTypes.shape({}),\r\n\r\n gridDataSource: PropTypes.shape({}),\r\n\r\n defaultPrimaryMetric: PropTypes.number,\r\n scope: PropTypes.shape({}),\r\n };\r\n\r\n static defaultProps = {\r\n entityType: null,\r\n filter: null,\r\n imagePath: null,\r\n isFluctuationsEnabled: false,\r\n IsFluctuationExperimentEnabled: false,\r\n hideChartPanel: false,\r\n resizeEventHandler: noop,\r\n token: null,\r\n seriesColors: null,\r\n gridCriterionType: '',\r\n dateRange: null,\r\n perfMarker: null,\r\n serverContext: null,\r\n gridDataSource: null,\r\n defaultPrimaryMetric: null,\r\n scope: {},\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = {};\r\n\r\n // dataSource and chartOptions are created only once during construction\r\n this.dataSource = this.getDataSource();\r\n this.chartOptions = this.getChartOptions();\r\n }\r\n\r\n getDataSource() {\r\n const {\r\n edm,\r\n jsdata,\r\n pageContext,\r\n state,\r\n } = this.props;\r\n\r\n return new InlineChartService({\r\n edm,\r\n jsdata,\r\n pageContext,\r\n state,\r\n });\r\n }\r\n\r\n /**\r\n * Creates the chartOptions object used for dependency injection of legacy components.\r\n * @param {Object} options - Dictionary of legacy components.\r\n * @returns {Object} chartOptions object to be passed in as an InlineChart prop.\r\n */\r\n getChartOptions() {\r\n const {\r\n adapter,\r\n addDateChangeListener,\r\n entityType,\r\n imagePath,\r\n instrumentation,\r\n isFluctuationsEnabled,\r\n IsFluctuationExperimentEnabled,\r\n pageContext,\r\n pathConfig,\r\n preferenceService,\r\n resizeChartListener,\r\n resizeEventHandler,\r\n state,\r\n store,\r\n token,\r\n seriesColors,\r\n gridCriterionType,\r\n hideChartPanel,\r\n defaultPrimaryMetric,\r\n } = this.props;\r\n\r\n const preferences = new InlineChartPreferences(\r\n store,\r\n pathConfig,\r\n adapter,\r\n preferenceService\r\n );\r\n\r\n return {\r\n isFluctuationsEnabled,\r\n isFluctuationsExperiementEnabled: IsFluctuationExperimentEnabled,\r\n hideChartPanel,\r\n defaultPrimaryMetric,\r\n fluctuationService: FluctuationService,\r\n entityType,\r\n preference: preferences,\r\n pageContext,\r\n instrumentation,\r\n token,\r\n pageState: state,\r\n addDateChangeListener,\r\n resizeChartListener,\r\n resizeEventHandler,\r\n imagePath,\r\n seriesColors,\r\n gridCriterionType,\r\n };\r\n }\r\n\r\n render() {\r\n const {\r\n i18n,\r\n filter,\r\n isShowChart,\r\n dateRange,\r\n perfMarker,\r\n serverContext,\r\n gridDataSource,\r\n scope,\r\n } = this.props;\r\n\r\n return ();\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport Backbone from 'backbone';\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\n\r\nimport { InlineChartWrapper } from './inline-chart-wrapper';\r\n\r\nexport class InlineChartView extends Backbone.View {\r\n constructor(options) {\r\n super(options);\r\n\r\n this.filter = options.filter;\r\n this.isShowChart = true;\r\n this.options = _.omit(options, 'filter', 'isShowChart', 'resizeChartListener');\r\n }\r\n\r\n toggleView() {\r\n this.isShowChart = !this.isShowChart;\r\n this.render();\r\n }\r\n\r\n filterUpdated = (filter) => {\r\n this.filter = filter;\r\n this.render();\r\n };\r\n\r\n resizeChartListener = (handler) => {\r\n this.resizeListener = handler;\r\n };\r\n\r\n resizeChart = (width) => {\r\n if (this.resizeListener && width) {\r\n // Invoke the resize chart listener\r\n this.resizeListener(width);\r\n }\r\n };\r\n\r\n render() {\r\n ReactDOM.render(, this.el);\r\n return this;\r\n }\r\n\r\n remove() {\r\n if (this.resizeListener) {\r\n // Invoke the resize chart listener\r\n this.resizeListener = null;\r\n }\r\n ReactDOM.unmountComponentAtNode(this.el);\r\n return super.remove();\r\n }\r\n}\r\n","import { Constants } from '@bingads-webui-theme-2018/theme-fluent';\r\n\r\nconst paddingLeft = Constants.PagePadding.smallMainSectionLeftPadding;\r\n\r\nexport const gridPaddingStyle = () => ({\r\n '.small-padding-left.bingadsgrid': {\r\n paddingLeft: 0,\r\n '& .table-container': {\r\n '& table.table': {\r\n '& tbody tr td:first-child': {\r\n paddingLeft,\r\n },\r\n '& thead.header tr th:first-child': {\r\n paddingLeft,\r\n },\r\n '& tfoot.footer tr td': {\r\n paddingLeft,\r\n },\r\n '& colgroup.column-group col.col-Status': {\r\n minWidth: 50,\r\n width: 50,\r\n },\r\n },\r\n },\r\n '& .flex-layout': {\r\n '& .flex-column-group': {\r\n '& .flex-cell[data-column=selection]': {\r\n paddingLeft,\r\n },\r\n '& .flex-cell[data-column=Status]': {\r\n minWidth: 50,\r\n width: 50,\r\n },\r\n },\r\n '& .tfoot.footer .pagination-row': {\r\n paddingLeft,\r\n },\r\n },\r\n },\r\n});\r\n\r\nexport const pagePaddingStyle = () => ({\r\n '.small-padding-left .disclaimer-banner': {\r\n paddingLeft,\r\n },\r\n ...gridPaddingStyle(),\r\n '.small-padding-left .navbar .container-fluid': {\r\n paddingLeft,\r\n },\r\n});\r\n"],"names":["TurnOnAllAlert","i18n","useContext","I18nContext","_jsx","Alert","message","_jsxs","_Fragment","children","getString","_TL_","level","icon","className","dismissible","FullyOptimizedAlert","extractExclusionRules","finalUrlExpansions","urlEquals","urlContains","customLabels","each","target","conditions","get","isEmpty","Operand","Operator","push","ArgumentOperand","rules","condition","withHttpsPrefix","url","startsWith","concat","keywordsToCriterionName","keywords","forEach","keyword","join","OverflowPlaceholder","_useOverflowMenu","useOverflowMenu","ref","isOverflowing","FinalUrlExpansionPreview","withDefaultStyles","_ref","classes","setToggleFinalURLsEditor","onChange","_useMemo","useMemo","_useMemo2","_slicedToArray","urls","labels","onEditClick","useCallback","onDismissClick","renderUrlsRow","previewRow","UrlsImage","src","alt","length","Overflow","overflowContainer","map","OverflowItem","id","classnames","renderRulesRow","RulesImage","rule","tag","renderLabelsRow","LabelsImage","label","previewContainer","previewHeader","Button","appearance","onClick","EditImage","DismissImage","display","flexDirection","background","boxShadow","padding","margin","borderRadius","gap","maxWidth","justifyContent","minWidth","flexWrap","textWrap","flexGrow","overflowX","flexShrink","textOverflow","whiteSpace","EXCLUSTION_TYPE","UrlInput","memo","validationProps","updateValidation","placeholder","input","validateAndUpdateUrl","value","finalUrlValidatorErrors","fullUrl","indexOf","isValidUrl","lengthLimit","onTextChange","ev","TextField","prevProps","nextProps","data","defaultProps","ValidatedUrlInput","withCustomValidation","TagWithTooltip","content","_useState","useState","_useState2","isOverflow","setIsOverflow","_useState3","_useState4","isTooltipVisible","setIsTooltipVisible","tagRef","useRef","useEffect","current","clientWidth","scrollWidth","Tooltip","relationship","withArrow","visible","onVisibleChange","ValidatedInput","withValidation","ValidationSchema","name","type","properties","maxLength","getFinalURLSectionStyle","_","_ref$palette","palette","inputContainer","dropdown","height","marginRight","dropdownOption","iconStyles","textField","width","addButton","float","sectionsContainer","fontSize","marginLeft","marginTop","marginBottom","borderBottom","alignItems","backgroundColor","fontWeight","color","neutralSecondary","overflow","errorContainer","FinalURLsEditor","props","isOpen","onClose","useDefaultStyles","newFinalUrlExpansions","setNewFinalUrlExpansions","selectedOption","setSelectedOption","_useState5","_useState6","setInput","_useState7","_useState8","validationErrors","setValidationErrors","onAddTag","newUrl","includes","_toConsumableArray","Criterion","WebPage","Type","Parameter","Conditions","CriterionName","filter","flat","onRemovetag","seletedGroup","exclusion","onSave","options","key","text","renderInputField","field","renderUrlTags","Label","index","IconButton","iconProps","iconName","renderRuleTags","renderCustomLabelTags","renderDropdownOptions","option","Icon","title","renderPanelFooter","PrimaryButton","DefaultButton","renderValidationErrors","onValidate","result","messages","newInput","Panel","headerText","closeButtonAriaLabel","onDismiss","onRenderFooterContent","isFooterAtBottom","PanelType","medium","ValidationGroup","schema","Dropdown","onRenderOption","selectedKey","event","selected","allowDisabledFocus","disabled","getAutoGeneratedAssetsStyles","root","position","OptionContainer","assetsOption","paddingLeft","boxSizing","cursor","opacity","top","AutoGeneratedAssetsImpl","textAssetChecked","autoGeneratedTextOptOut","imageAssetChecked","autoGeneratedImageOptOut","finalUrlChecked","finalUrlExpansionOptOut","styles","toggleFinalURLsEditor","onOpenFinalUrlEditor","renderAlert","renderFinalUrlExpansionPreview","classNames","Checkbox","size","checked","ValidatedAutoGeneratedAssets","activity","ActivityContext","_validationProps$data","newData","signal","JSON","stringify","getCPSStyles","cpsOptions","ValidatedCostPerSale","costPerSaleOptOut","_ev","isChecked","onRenderLabel","withVerticalAlignCenterSpan","HelpPopup","topic","LearnMoreLink","dangerouslySetInnerHTML","__html","linkText","href","linkType","AppealBase","_createClass","_classCallCheck","this","AppealByIDsForParentEntity","_AppealBase","parentId","ids","_this","_callSuper","Error","isArray","_inherits","AppealAllForParentEntity","_AppealBase2","_this2","resolveAppealParams","appealParams","getEditorialReasons","appealParamsPromise","_appealParams$options","getEditorialReasonsByIDsForParentEntity","getAllEntitiesForParentEntity","then","createAppealParamsWithIDs","bind","Promise","getAppealRejections","_appealParams$options2","permissions","controller","odataResponse","Errors","utilities","processRejectReasonsFromOdata","editorialAppealAggregator","obj","toString","call","substring","assertInputs","requestAppeal","appealData","appealIds","requestAppealFunc","_appealParams$options3","requestAppealAllForParentEntity","requestAppealByIDsForParentEntity","getRequestFormStyle","requestFormContainer","border","lineHeight","listStyle","paddingRight","textAlign","LegacyEditorialAppealRequestForm","React","container","appealTitle","infoMsg","view","viewListener","clone","Backbone","EditorView","hideAppealCheckBox","isForVNext","withRealTimeUpdates","listenTo","render","$el","appendTo","toBulk","stopListening","remove","undefined","LegacyInlineErrorView","InlineErrorView","rowId","useKwCss","panelStylesProp","footer","_objectSpread","fabricPanelFixStyle","commands","zIndex","getStyles","components","theme","arguments","uiBlockerAdapter","mergeStyles","reactUIBlockerStyle","overflowY","EditorialAppealRequestPanel","onCancel","appealDataPromise","setAppealData","setAppealIds","isBusy","setIsBusy","hasError","setHasError","handleAppealData","aggregatedRejectReasons","first","handleAppealDataError","catch","finally","_useState9","_useState10","editorialAppealFormData","setEditorialAppealFormData","_useState11","_useState12","isEditorialAppealFormDataValid","setIsEditorialAppealFormDataValid","onEditorialAppealChange","isValid","onSaveClick","onCancelClick","Stack","horizontal","tokens","childrenGap","Item","custom","customWidth","UiBlocker","blocking","loadingText","LegacyFinalUrlExpansionUnStyled","_React$Component","isFinalUrlExpansionEnabled","state","operatorMap","Equals","Contains","operandMap","Url","setViewAndUpdateViewModel","isEqual","AutoTargetView","finalUrlExpansionsBulkUpsert","isNegativeAutoTarget","isShowUrlOnly","selectedItem","hideViewSelection","hideWebsiteLabel","isExclude","setFinalUrlExpansionsView","toAddToViewModel","updateViewModels","cloneDeep","isExactMatch","results","DisplayOperator","DisplayOperand","ko","shouldCheckArgumentOperandFormat","selectedTargetsView","viewmodel","addBatch","_this3","finalUrlContainer","Toggle","onText","offText","setState","clear","role","Text","i8n","LegacyFinalUrlExpansion","Object","assign","creationCommonStyle","dsaCampaignStyles","campaignSettingsStyles","adgroupsKeywordsStyles","ValidatedLegacyFinalUrlExpansion","restProps","_objectWithoutProperties","_excluded","LISTING_GROUP_TREE_ROUTING","LISTING_GROUP_LIST_ROUTING","GridType","GRID_NAME","columnChooserId","ScopeLevel","nameColumnOdataPath","treeViewButtonId","listViewButtonId","paginatorStyleClassName","Paginator","currentPage","onPageIndexChange","onPageSizeChange","pageSize","totalCount","pageSizeLabel","pageSizeOptions","assert","pageCount","Math","ceil","pageSizeSelectorId","useId","pageSizeSelectorOptions","selectedPageSize","buildPageSizeOptions","pageIndexSelectorOptions","selectedPageIndex","pageIndexOptions","Array","from","i","pageIndex","PREVIOUS_BUTTON","NEXT_BUTTON","pageIndexChangeHandler","newPageIndex","htmlFor","newPageSize","newMaxPageNum","bulkAddEditorStyleClassName","BulkAddEditor","onSubmit","setValue","multiline","rows","newValue","finalValues","values","split","str","trim","unqiue","Set","res","v","has","toLowerCase","add","formatRawString","panelStyles","main","footerInner","borderTop","overlayProps","panelSelectorStyleClassName","flex","minHeight","onRenderSquareCheckbox","addIcon","PanelSelector","enableShimmer","columns","items","dimensions","onSelectedDimensionChange","initialSelectedItems","keyOfItem","isBulkAddEnabledForDimension","getErrors","preItems","usePrevious","preColumns","preDimensions","preInitialSelectedItems","finalItems","setFinalItemsImpl","setFinalItems","param","finalValue","pre","defaultSelectedDimension","getDefaultSelectedDimension","selectedDimension","isSelectedDimensionChanged","previousSelectedDimension","isCurrentAllSelected","selection","isAllSelected","isNextAllSelect","isEventSupressed","setChangeEvents","setItems","setSelectedItemKeys","selectedItemKeys","setKeySelected","finalColumns","setFinalColumns","Selection","onSelectionChanged","newSelectedItemKeysCandidate","getSelection","getKey","dimension","setSelectedDimension","c","finalColumn","onColumnClick","column","isSortedDescending","isSorted","columnKey","slice","sort","a","b","aValue","bValue","copyAndSort","fieldName","preColumn","dimensionSelectorId","currentPageSize","setCurrentPageSize","currentPageIndex","setCurrentPageIndex","groups","fill","startIndex","count","isCollapsed","selectedItems","item","isLoading","isBulkAddEditorOpened","setIsBulkAddEditorOpened","errors","customCounter","onClickBulkAddValues","onBulkAddEditorCancel","onBulkAddEditorCommit","newValues","newItems","s","__bulk","newSelectedItemKeys","find","isVisible","CommandBarButton","MessageBar","dismissButtonAriaLabel","selectionClearedOnSurfaceClick","ShimmeredDetailsList","setKey","onRenderCheckbox","checkboxVisibility","always","groupProps","onRenderHeader","collapseAllVisibility","hidden","disableSelectionZone","error","ListingGroupColumn","AssetGroupNameColumn","ListingColumn","IncludeExcludeColumn","getColumnChooserCategories","parameters","gridType","scopeLevel","cpsColumnsEnabled","dynamic","SupportCPSForPmax","getAttributeColumnKeys","o","buildCategoryOptionFromColumnRawData","getPerfColumnKeys","getConvColumnKeys","selectOption","lockColumns","locked","optional","isNotNullOrUndefined","Campaign","colmuns","legacyI18nOfListingGroup","Schema_PerformanceMetrics_Property_Impressions","Schema_PerformanceMetrics_Property_Clicks","Schema_PerformanceMetrics_Property_CTR","Schema_PerformanceMetrics_Property_Spend","Schema_PerformanceMetrics_Property_AverageCPC","Schema_PerformanceMetrics_Property_AverageCPM","Schema_PerformanceMetrics_Property_Conversions","Schema_PerformanceMetrics_Property_ConversionRate","Schema_PerformanceMetrics_Property_RevenueOnAdSpend","Schema_PerformanceMetrics_Property_AdvertiserReportedRevenue","Schema_PerformanceMetrics_Property_CPA","Schema_PerformanceMetrics_Property_AllConversions","Schema_PerformanceMetrics_Property_AllConversionRate","Schema_PerformanceMetrics_Property_AllConversionRevenueOnAdSpend","Schema_PerformanceMetrics_Property_AllConversionAdvertiserReportedRevenue","Schema_PerformanceMetrics_Property_AllConversionCPA","Schema_PerformanceMetrics_Property_AverageCPS","Schema_PerformanceMetrics_Property_SalesCount","Schema_PerformanceMetrics_Property_ViewThroughConversions","Schema_PerformanceMetrics_Property_ViewThroughConversionsRevenue","Schema_PerformanceMetrics_Property_ViewThroughConversionsCPA","Schema_PerformanceMetrics_Property_ViewThroughConversionsReturnOnAdSpend","Schema_PerformanceMetrics_Property_ViewThroughConversionsRate","ProductsGrid_Column_All","ProductsGrid_Column_Brand","ProductsGrid_Column_Category1","ProductsGrid_Column_Category2","ProductsGrid_Column_Category3","ProductsGrid_Column_Category4","ProductsGrid_Column_Category5","ProductsGrid_Column_CategoryL1","ProductsGrid_Column_CategoryL2","ProductsGrid_Column_CategoryL3","ProductsGrid_Column_CategoryL4","ProductsGrid_Column_CategoryL5","ProductsGrid_Column_Channel","ProductsGrid_Column_ChannelExclusivity","ProductsGrid_Column_Condition","ProductsGrid_Column_CountryOfSale","ProductsGrid_Column_CustomLabel0","ProductsGrid_Column_CustomLabel1","ProductsGrid_Column_CustomLabel2","ProductsGrid_Column_CustomLabel3","ProductsGrid_Column_CustomLabel4","ProductsGrid_Column_GTIN","ProductsGrid_Column_Id","ProductsGrid_Column_Language","ProductsGrid_Column_MerchantId","ProductsGrid_Column_MPN","ProductsGrid_Column_Price","ProductsGrid_Column_ProductBought","ProductsGrid_Column_ProductType1","ProductsGrid_Column_ProductType2","ProductsGrid_Column_ProductType3","ProductsGrid_Column_ProductType4","ProductsGrid_Column_ProductType5","ProductsGrid_Column_Title","getFullUrlOfAdsOdata","baseUrl","path","adsOdataParams","queryOptions","entityPath","customerId","accountId","campaignId","assetGroupId","scopeLevelPath","queryString","entries","reduce","cur","set","URLSearchParams","NonSplittableConditions","filterOutUsedDimensions","listingConditions","pathsToParent","every","p","filterReachableDimensions","reservedIds","currentOperand","currentId","Id","ParentId","getValidListingConditions","response","isFromEverythingElse","Condition","Attribute","ParentConditions","parentConditionOperands","allItemOperands","filterNonSplittableDimensions","async","updateListingTree","payload","ListingGroupsToAdd","ListingGroupsToDelete","AssetGroupId","itemsToAdd","itemsToDelete","Status","e","createRootListingTree","IsLeaf","IsExcluded","useAPIsOfListingGroup","fetch","fetchImpl","listingGroupGridData","params","responsePromise","json","listingGroupGridDataResponseHandler","method","headers","body","listingGroupGridDataRequest","productAttributeStatistics","p$response","productAttrubuteStatisticsResponseHandler","productListingGroupId","productAttrubuteStatisticsRequest","getListingGroupConditions","getListingGroupConditionsResponseHandler","getListingGroupConditionsRequest","getProductOffers","productOfferResponseHandler","productOfferRequest","mergeStyleSets","errorColor","core","helpButtonStyle","convertToLocalStyle","helpbuttonStyle","merge","statusStyle","themePrimary","white","transitionDuration","themeDark","getGridToolbarConfig","onBidChangeClick","serverContext","toolbarUnselectedConfig","candidates","AssetGroup","iconLeftGlyphName","ariaLabel","attrs","Map","toolbarItem","toolbarItemsWithoutSelection","toolbarSelectedConfig","toolbarItemsWithSelection","columnKeyRawDataMap","cpsColumnKeys","odataPathOfCommonColumnsIterable","odataPathOfListingGroupColumnIterable","odataMapOfListingGroupResponse","anchorHrefPlaceholder","IsCurrentAccountInactive","CurrentAccountInActive","IsReadOnlyMode","ReadOnlyMode","getPropertyFromItem","itemData","odataPathOfProperty","getPropertyByPath","getPropertyFromItemByColumnKey","propertyPath","callout","partitionTrail","currentAttribute","productSampleDescription","productSampleId","link","ProductOffersCallout","fullPath","scope","commonEntityPath","aid","cid","currentCondition","trail","offerCount","setOfferCount","sampleOffers","setSampleOffers","setIsLoading","showOfferLimitExceededError","setShowOfferLimitExceededError","$top","offerLimitExceededContent","offerLimitExceededWarning","Callout","gapSpace","setInitialFocus","block","ReactTemplate","model","offerCountModel","template","sampleOffer","Title","Link","save","messageBarType","warning","ConditionTemplate","total","depth","hasChildren","showSelectorIcon","attributeText","isExpanded","onToggleCollapse","onAddOrEditTrigger","partitionFullPath","updatedScope","attributeRef","showCallout","setShowCallout","hideCalloutTimer","textPadding","toggleIconMargin","fontFamily","onCollpaseToggleKeyDown","stopPropagation","onCollapseClick","Fragment","style","onKeyDown","tabIndex","onMouseEnter","clearTimeout","onMouseLeave","window","setTimeout","onMouseOver","onFocus","closeTooltip","onBlur","FlattenConditionTemplate","NameTemplate","append","fromViewModelToBulkModel","bold","includeExcludeStatusContainer","includeExcludeCallout","neutralLight","IncludeExcludeTemplate","styleClassNames","setTarget","statusIcon","FontIcon","dismiss","show","cellEl","closest","getBoundingClientRect","isInclude","itemToAdd","itemToDelete","refreshGridData","onInclude","onExclude","coverTarget","directionalHint","isBeakVisible","isEverythingElse","isAllProduct","getDisplayName","parentConditions","parentCondition","getNearestParentCondition","replace","getFullPath","getAttributeTextOfConditionTemplate","treeViewInfo","parentItem","parent","parentAttribute","onListingGroupColumnListViewRender","attribute","getPath","onListingGroupColumnTreeViewRender","enable","shouldEnableEdit","eventHandlers","onTreeViewColumnAddOrEdit","onTreeViewColumnToggleCollapse","columnRenderMap","AssetGroupName","currentCampaign","CurrentCampaign","cmpid","CampaignId","assetGroupName","defaultRender","format","getFormatOfColumn","formatter","tryGetFormatString","isColumnSortEnabledMap","listingGroupActivityName","scenario","useLogger","instrumentation","InstrumentationContext","addScenario","ListingGroup","create","getActivity","logger","getLogger","getKeyOfHotelListingGroupItem","getAttributeValueOfPanelSelectorItem","getKeyOfPanelSelectorItem","diemnsionKey","getAddAndDeleteItem","treeItem","childrenOfEidtItem","currentOperandOfChildren","operand","dummyEveryThingElse","finalSelectedItems","oldItemKeys","child","newItemKeys","deleteItemIds","addedItems","productsFiledName","dataColumnWidth","buildTreeViewSelectorItems","selectedDimensionGridData","childrenOfNode","selectedDimensionGridDataMap","AttributeName","domainDataItems","DomainData","curItemDataitem","Value","PerformanceMetrics","Clicks","Conversions","Impressions","ProductCount","apiDataItems","OfferCount","candidateItems","hasDomainData","overrideMergeByValue","x","arr","newItem","fillDataFromAPI","mergeTreeViewSelectorItems","buildTreeViewSelectorItemsByChildrenOfNode","HasDomainData","buildTreeViewSelectorItemsWithoutStatistics","valuePicker","callback","appendNewItems","comparator","findIndex","y","overrideMergeByComparator","xValue","yValue","isString","oldItems","additionalItems","fillDataToBulkAddedItem","primaryColumnRender","Number","isInteger","defaultValue","buildTreeViewSelectorColumns","primaryColumnId","primaryColumnName","includeDataColumns","primaryColumn","isRowHeader","onRender","filedName","useTreeViewPanelSelector","allRowRawData","setAllRowRawData","getArguemntsOfUpdateGridDataByCurrentState","dataRange","expandedItemIds","setExpandedItemIds","isTreeViewSelectorOpen","setIsTreeViewSelectorOpen","treeViewSelectorDimensions","setTreeViewSelectorDimensions","treeViewSelectorHeaderText","setTreeViewSelectorHeaderText","treeViewSelectorInitialSelectedItems","setTreeViewSelectorInitialSelectedItems","treeViewSelectorItems","setTreeViewSelectorItems","treeViewSelectorColumns","setTreeViewSelectorColumns","isTreeViewShimmerEnabled","setIsTreeViewShimmerEnabled","getAccount","ccJsData","useJsDataContext","Account","useAccountData","onGenericError","showError","offerLimitExceededWarningForListingGroup","showWarning","currentSelectedDimensionGridDataTask","updateTreeViewGridByEditTreeItemAndSelectedDimension","task","gridDataParameters","DateRange","StartDate","EndDate","productAttributeStatisticsHelper","productAttrubuteStatisticsResponse","updateTreeViewGridByEditTreeItemAndSelectedDimensionWithoutStatistics","currentValidListingConditions","currentEditTreeItem","getSupportedCountries","isOdataGetProductScopeEnabled","callStartTime","Date","now","pData","dataName","bypassCache","cacheResponse","getSalesCountryCollection","noBMCAccounts","getProductScopeData","getProductDataWithCache","getProductScopeFromOData","uid","queryify","Product","adapter","getProductData","mergeData","SalesCountryCollection","toUpperCase","getCountryCode","shoppingSettings","countryCode","SalesCountry","account","CountryCode","accountCountry","supportedCountries","onTreeViewCancel","onTreeViewSave","callbackWhenSkipUpdate","callbackWhenUpdate","prevOperandOfChildren","negativeId","editItemId","wasEditingNodeLeaf","isEditingNodeLeaf","inheritNode","parentIdOfChildren","listingGroupsToAdd","buildListingGroupToAdd","isLeaf","isDeleteAll","listingGroupsToDelete","metaInfo","treeViewSaveWorker","onTreeViewSelectedDimensionChange","onTreeViewSelectedDimensionChangeWithoutStatistics","getErrorsForTreeViewSelector","totalItemsCount","number","CampaignSettings","setting","getListingGroupConditionsResponseBody","validListingConditions","dimensionsOfItem","DimensionProperties","selectedDimensionName","operands","diemnsion","findResult","getInitialSelectedDimension","currentDimension","currentAttributeId","domainData","isBulkAddEnabled","console","onFilterProduct","getValidListingConditionsForWithoutPreselectedTreeNode","isEveryThingElseRow","ToolbarShownItem","InitializationState","metaColumnOdataPaths","buildColumns","selectedColumnKeys","sortOrder","bindSortFunction","ListingGroupsAllColumnsSortSupport","sortable","contains","columnRawData","isResizable","getColumnRenderByColumnKey","StyledListingGroupsPage","compose","withI18nConsumer","WrappedComponent","preferenceService","perfMarker","listingGroupPerfMarker","marker","createChild","willInit","defaultColumns","i18nWithTL","buildLegacyI18n","toolbarShownItem","setToolbarShownItem","Toolbar","latestGridDataRequestId","toolbarEditor","toolbarConfig","updateToolbar","overrideWith","filterConfig","featureName","entitySchema","ProductListingGroup","legacyGlobalI18n","globalLegacyI18n","schemaI18nCampaign","preferenceStoreFactory","filterPreferences","getCommonFilterConfig","updatePilot","sessionStore","globalConfig","appConfig","cacheService","dataContextManager","jsdata","jsData","editor","enableCampaignWaterfall","enableAdGroupWaterfall","searchbox","searchProperty","searchOperator","getFilterConfig","filterService","FilterService","setPageIndex","setPageSize","sortColumnOdataPath","setSortColumnOdataPath","setSortOrder","pageItemsTotal","setPageItemsTotal","pager","pageNumber","availablePageSizes","onPageChange","getOdataSkipAndTop","changeToListView","changeActiveViewButton","List","changeToTreeView","Tree","update","registerEventHandlersForTreeView","delete","isOrderByEnabled","isSelectEnabled","isFilterEnabled","dataRangeCacheKey","getOdataOrderby","$orderby","$skip","$select","selectedColumnKey","columnOdataPath","getOdataSelect","trickySelectedColumnKeys","$filter","$filterContainer","currentGridType","initializationState","Done","requestId","willFetchData","$count","gridData","willRender","document","getElementsByClassName","gridIndex","parentElement","setAttribute","forceUpdate","useForceUpdate","NotStart","onFilterStateChanged","isRefreshReady","setIsRefreshReady","off","filterString","filterEntity","FilterEntity","toOdata","query","odataOptions","convertFilterEntity2$filter","getEditableFilter","Running","initialColumns","initial","on","ColumnChooserTrivia","ColumnChooser","gridName","toolbarOptions","openColumnChooser","toolbar","categories","legacyI18n","onApply","newColumnKeys","forceHideToolbar","showToolbarSelected","showToolbarUnselected","k","listingGroupColumnIndex","splice","filteredRowData","sortedItems","valueA","valueB","v1","v2","reverse","rawData","raw","listingGroupGridItemsData","getParentKeyOfItem","getPrimaryKeyOfItem","buildItemData","creatingRootNode","setCreatingRootNode","createFirstListingGroupLink","d","CampaignShimmeredDetailsList","onSort","newSortOrder","newSortColumnOdataPath","sortedColumn","sortColumn","getSortedColumn","selectionMode","SelectionMode","multiple","freezingColumnCount","didUpdate","prev","done","onRenderRow","detailsRowProps","focusZoneProps","preventFocusRestoration","timezone","CurrentAccount","TimeZone","ListingGroupsRouterShell","changeLayout","tab","disableCompare","Switch","Route","exact","_createElement","Redirect","to","ListingGroupsShell","withInstrumentation","withCurrentExpandedScope","createOrUpdateCampaign","campaignResource","edmCampaign","types","resolve","ResourceIdentifier","bulkUpdate","bulkCreate","deleteCampaign","bulkDestroy","deleteCall","readCampaign","Customers","$withKey","Accounts","Campaigns","select","toPromise","readCampaigns","where","readCampaignCriterions","CampaignCriterions","$cast","readLocationCriterions","readDayTimeCriterions","createOrUpdateAssetGroup","assetGroupResource","createOrUpdateListingGroup","listingGroupResource","readAssetGroup","isSearchThemeEnabled","isUrlRulesEnabled","toSelect","AssetGroups","readCampaignNegativeWebpages","CampaignNegativeWebpages","skip","readConversionGoalDetails","$makeCall","readExtensionAssociations","AdExtensionAssociations","readNewCustomerAcquisitionGoals","NewCustomerAcquisitionGoals","STEP_PATHS","CAMPAIGN_SETTINGS","ASSET_GROUP","ScenarioName","PerformanceMaxCampaignCreation","PerformanceMaxAssetGroupCreation","PerformanceMaxCampaignSettings","PerformanceMaxAssetGroupSettings","initialCampaignData","Name","Budget","Amount","Languages","BiddingScheme","TargetCpa","TargetRoas","CampaignType","FinalUrlSuffix","TrackingUrlTemplate","UrlCustomParameters","locationTargets","bidMode","currentLevelSettings","initLocations","peopleInLocation","peopleSearchingForLocation","targetOption","parentLevelSettings","useParentLevel","adSchedules","adScheduleUseSearcherTimeZone","dayTimeRanges","timeZone","conversionGoals","originalConversionGoals","goalSelection","goalScopeSelection","Scopes","ACCOUNT","ProviderId","IsFeedFiltered","FeedLabel","LocalInventoryAdsEnabled","initialBrandExclusionsData","addedBrandListIds","deletedBrandListIds","savedAddedBrandListIds","savedDeletedBrandListIds","minuteMap","initialAssetGroupData","campaignLanguageStrings","Albanian","Arabic","Bosnian","Bulgarian","Croatian","Czech","Danish","Dutch","English","Estonian","Finnish","French","German","Greek","Hungarian","Icelandic","Italian","Japanese","Latvian","Lithuanian","Macedonian","Maltese","Norwegian","Polish","Portuguese","Romanian","Russian","Serbian","SimplifiedChinese","Slovak","Slovenian","Spanish","Swedish","TraditionalChinese","Turkish","Hebrew","Hindi","Malay","Thai","Indonesian","Tagalog","Vietnamese","CampaignNegativeReferenceId","AssetGroupNegativeReferenceId","SupportedExtensionPreviewTypes","Sitelink","StructuredSnippet","Promotion","Price","isBulkWrappedResponse","bulkResult","getBulkUploadErrorType","getBulkUploadEntityType","modelToViewModelForBulkErrors","bulkUpsertEntityErrorMap","activityLogger","errorProcessor","identity","getBulkApiErrors","errorType","mappedErrorType","mapBulkUpsertErrors","removeErrors","bulkErrors","negate","isAudienceAssociationDoesntExistError","ReferencedEntityInvalidIdErrors","isReferencedEntityInvalidIdError","_ref2","removeReferencedEntityInvalidIdErrors","hasBulkErrorsForEntityType","entityType","constant","chain","some","_ref3","unexpectedBulkErrorToString","bulkOrSystemError","stack","status","statusText","ERROR_ENTITY","CampaignLocation","CampaignRadius","CampaignNegativeLocation","CampaignLocationIntent","CampaignDayTimeCriterion","CampaignNegativeWebpage","AudienceGroupAssetGroupAssociation","BrandListAssociation","apiErrorMapper","campaignApiError","isHtmlMessage","DangerousHtmlMessage","code","genericApiError","CampaignApiError","bulkUpsertAssetGroupSettingsEntityErrorMap","_defineProperty","initialAssetGroupViewModel","isDirty","whitelistedSchemaPropertyKeysForBulkModel","whitelistedSchemaPropertyKeysForModel","whitelistedSchemaPropertyKeys","modelToViewModelForTextAssets","assetGroupModel","propertyName","propertyPrefix","assetsArray","viewModelOverride","assetObject","asset","assetText","assetsArrayToObject","viewModelToBulkModelForUrlRules","assetGroupViewModel","originalAssetGroupViewModel","_serverContext$Dynami","isAssetGroupUrlRulesV2Enabled","DynamicPermissions","AssetGroupUrlRulesV2","newAssetGroupUrlTargets","AssetGroupUrlTargets","_assetGroupViewModel$2","UrlRulesOption","URL_RULES_OPTIONS","All","AssetGroupUrlTargetId","newTargetIds","pluck","deletedTargets","originalAssetGroupUrlTargets","originalTargetIds","difference","findWhere","newTargets","bulkModel","Condition1","TargetCondition1","Operator1","TargetConditionOperator1","Value1","TargetValue1","extend","mapTargetFields","parseLoadDate","dateString","parseDate","modelToViewModelForDateSetting","modelToViewModelForAssetGroup","isUrlRulesV2Enabled","pick","Images","ImageAssets","prepareViewModelForImageFetch","assetGroupUrlTargets","getUrlRulesOption","modelToViewModelForURLRules","formatDateToAPIFormat","date","formatDate","parseDateFromAPIFormat","textAssetPropertyNameRegEx","parseAssetPropertyName","matches","match","parseInt","NaN","assetToModel","_ref9","Asset","viewModelToBulkModelForTextAssets","vmPropertyPrefix","assetsObject","pairs","_ref5","_ref6","_ref7","_ref8$","isNumber","isAudienceSignalAssetGroupAssociationCreateOrUpdateScenario","AudienceGroup","isAudienceSignalAssetGroupAssociationDeleteScenario","viewModelToBulkModelForAssetGroup","originalAssetGroup","campaign","_originalAssetGroup$d","_originalAssetGroup$d2","_originalAssetGroup$d3","listingGroups","hasProductFilters","finalListingGroups","listingGroup","viewModelToBulkModelForListingGroup","ProductListingGroups","createBulkModelForListingGroup","viewModelToBulkModelForDateSetting","_assetGroupViewModel$4","AudienceGroupAssetGroupAssociations","AudienceGroupId","OriginalAudienceGroup","viewModelToBulkModelForAudienceGroup","isEmptyUrl","FinalUrls","viewModelToBulkModelForFinalUrls","isCreation","MobileFinalUrls","viewModelToBulkModelForMobileFinalUrls","AssetGroupSearchThemes","_assetGroupViewModel$","searchThemesresult","SearchTheme","AssetGroupSearchThemeId","viewModelToBulkModelForSearchThemes","videos","video","idString","subType","Videos","_assetGroupViewModel$3","ImageList","ImageSPOTLIGHT","apply","ImagePRONG","TransparentLogo","processImageListViewModelToModel","viewModelToBulkModelForImages","imagesModel","viewModelToModelForAssetGroup","modelToViewModelForWindowsAssetGroup","imageProngModel","AssociationType","imageSpotLightModel","transparentLogoModel","imageProngVMPromise","getImagesFromMTAssetsAsync","odata","imageSpotLightVMPromise","transparentLogoVMPromise","imageProngVM","imageSpotLightVM","transparentLogoVM","prepareViewModelForWindowsImageFetch","image","loadAssetGroup","loadAssetGroupForWindowsStore","loadAssetGroupWithVideos","videoRepository","assetGroup","getVideo","videoObjects","videoMT","newVideoFromMTObject","associationType","ThumbnailUrl","thumbnailUrl","bulkModelToViewModelForAssetGroup","_ref13","newOriginalAssetGroupViewModel","_ref13$errors","hasAssetGroupErrors","hasAudienceSignalAssetGroupAssociationErrors","bulkModelToViewModelForDateSetting","associatedIds","association","audienceGroup","associatedAudienceGroup","modelToViewModelForAudienceGroup","searchThemes","newResult","element","modelToViewModelForSearchThemes","_serverContext$Dynami2","assetGroupBulkModel","urlTargets","bulkResponse","targetItem","Condition2","TargetCondition2","Condition3","TargetCondition3","Value2","TargetValue2","Value3","TargetValue3","bulkModelToViewModelForUrlRulesV2","resultsWithIds","bulkModelToViewModelForUrlRules","newAssetGroupViewModel","filteredErrors","isUndefined","serverErrors","saveAssetGroupAndLinkedData","_ref14","_ref15","modelToSave","_bulkModelToViewModel","systemErrors","entity","_bulkModelToViewModel2","warn","initialCampaignCriterionsViewModel","keys","CampaignCriterion","viewModelToModelForCampaignCriterions","campaignCriterionsViewModel","modelToViewModelForCampaignCriterions","campaignCriterionsModel","viewModelToBulkModelForCampaignCriterions","campaignModel","campaignCriterionModel","modelToViewModelForLocationTargets","bundleCountries","_parseLocationTargets","parseLocationTargets","locations","intentId","intentOption","locationTargetsOptionKeys","specific","everywhere","shouldSelectBundleOption","bundleOrDefaultMarket","currentLocations","modelToViewModelForDayTimeTargets","modelToViewModelDayTimeTargets","bulkModelToViewModelForDayTimeTargets","criterions","schedulingRows","criterion","CriterionType","Day","DayTimeCriterion","StartHour","FromHour","StartMinute","FromMinute","EndHour","ToHour","EndMinute","ToMinute","modelToViewModelForCampaignNegativeWebpages","_ref4","campaignNegativeWebpage","bulkModelToViewModelForCampaignNegativeWebpages","bulkModelToViewModelForLocationTargets","locationTargetsModel","intent","getLocationIntent","LocationIntentCriterion","IntentOption","viewModelToBulkModelForLocationTargets","campaignViewModel","bundleLocationCriterions","convertLocationStateToLocationSchemaCampaign","bidStrategy","viewModelToBulkModelForAdSchedules","adSchedulesBulkUpsert","CampaignName","viewModelToBulkModelFoFinalUrlExpansions","autoTargets","viewModelToBulkModelForFinalUrlExpansions","originalCampaignViewModel","originalFinalUrlExpansions","transformObject","baseObject","newIds","originalIds","addedTargets","loadBundleCountries","lcid","CurrentUser","LocaleID","market","Market","getBundleCountriesAndBundleLocationCriterions","initialCampaignViewModel","initialBrandExclusionsViewModel","modelToViewModelForConversionGoals","hasCampaignLevelGoals","CampaignConversionGoal","Goals","CAMPAIGN","modelToViewModelForNewCustomerAcquisitionGoals","accountSettings","campaignSettings","campaignSettingsModel","goalId","bidOnlyMode","additionalConversionValue","campaignGoal","NewCustomerAcquisitionGoalId","NewCustomerAcquisitionBidOnlyMode","AdditionalConversionValue","newCustomerAcquisitionOptOut","newCustomerAcquisition","AdditionalValue","audiences","Audiences","modelToViewModelForCampaign","locationCriterionsModel","dayTimeCriterionsModel","campaignNegativeWebpagesModel","newCustomerAcquisitionGoalsModel","perfMaxCampaignSetting","FinalUrlExpansionOptOut","AutoGeneratedTextOptOut","AutoGeneratedImageOptOut","CostPerSaleOptOut","bulkModelToViewModelForConversionGoals","_ref3$errors","conversionGoalsBulkModel","CampaignConversionGoalAssociations","errorKey","originalGoalSelection","goal","Action","GoalId","and","predicate1","predicate2","not","predicate","errorIs","errorCode","bulkModelToViewModelForBrandExclusions","_ref4$errors","_campaignModel$BrandL","BrandListsAssociations","_extractAndRestoreFai","_reduce","acc","brandListAssociation","clientId","brandListAssociationClientId","brandListAssociationErrors","SharedEntityId","campaignServiceSharedEntityAssociationDoesNotExistError","extractAndRestoreFailedBrandListAssociations","brandExclusions","bulkModelToViewModelForCampaign","bulkModelToViewModelForNewCustomerAcquisitionGoals","pageFeeds","viewModelToBulkModelForNewCustomerAcquisitionGoals","_campaignViewModel$da","viewModelToBulkModelForCampaign","brandExclusionsViewModel","Key","Priority","PageFeedIds","pageFeed","brandListId","EntityId","viewModelToModelForCampaign","viewModelToBulkModelForConversionGoals","convertToMTFormat","loadCampaign","loadCampaignAsViewModel","promotionFormatter","promotion","promotionTypeI18nKey","promotionTypeI18nData","_getPromotionDataForm","getPromotionDataFormatConfig","OccasionI18nKeys","ItemPreviewI18nKeys","getPromotionTypeForModel","getPromotionDetailTypeForModel","Occasion","PromotionItem","monetaryDiscount","formatCurrency","MoneyAmountOff","CurrencyCode","percentDiscount","formatPercent","PercentOff","promotionDetailI18nData","promotionTypeFormatted","promotionDetail","promotionDetailI18nKey","promotionDetailFormatted","hasPromotionDetail","amount","OrdersOverAmount","promotionCode","PromotionCode","dateRangeI18nData","dateRangeI18nKey","startDateFormatted","endDateFormatted","formatISODateString","isoDatetimeString","dateToUse","skeleton","dateRangeFormatted","hasDateRange","PromotionStartDate","PromotionEndDate","startDate","endDate","PromotionType","PromotionDetail","hasOccasion","getExtensionFormatters","EAdExtensionType","price","Currency","convertCurrencyCode","priceExtensionFormatter","getExtensionsFromResponse","AdExtension","loadAdExtensionData","all","adExtensionTypes","sitelinkExtensions","calloutExtensions","promotionExtensions","structuredSnippetExtensions","priceExtensions","SiteLink","hasCampaignData","context","Boolean","needsLoading","clearErrors","needsSaving","hasServerErrors","patchStepsData","stepsData","serverErrorsCompare","curr","ServerValidatedRemainingCharsValidatedTextField","RemainingCharsValidatedTextField","hideStepHeaderSelector","stepInfo","hideStepHeader","scenarioNameSelector","scenarioName","permissionsSelector","doesNeedSavingSelector","isStateMachineCanceling","currentLocaleSelector","CurrentLocale","campaignObjectiveSelector","campaignObjective","campaignIdSelector","campaignNameSelector","campaignTimeZoneSelector","campaignSettingsSelector","assetGroupSelector","headlinesSelector","Headlines","longHeadlinesSelector","LongHeadlines","descriptionsSelector","Descriptions","path1Selector","Path1","path2Selector","Path2","finalMobileUrlsSelector","imagesSelector","businessNameSelector","BusinessName","finalUrlsSelector","finalUrlForRecommendationSelector","FinalUrlForRecommendation","adExtensionsDynamicFeaturesSelector","adExtensionsDynamicFeatures","adExtensionsAssociationsFactorySelector","adExtensionsAssociationsFactory","extensionsAssociationsSelector","extensionsAssociations","assetGroupURLRulesSelector","assetGroupURLRulesOptionSelector","audienceGroupSelector","originalAudienceGroupSelector","listingGroupSelector","productFilterSelector","productFilter","searchThemesSelector","aidSelector","cidSelector","serverErrorsSelector","systemErrorsSelector","invalidSaveAttemptSelector","invalidSaveAttempt","isEditingSelector","isEditing","isSavingSelector","isStateMachineSaving","isCancelingSelector","assetGroupControlsContainer","getAssetGroupStepStyles","collapsiblePanel","themeDarker","textDecoration","transform","h3LabelOptional","audienceSignalDescription","gridTemplateColumns","columnGap","gridRow","assetGroupSettingsContentContainer","audienceWizard","textAssetFields","entityIsAssetGroup","entityIs","assetGroupNameProp","andComp","propertyIs","assetGroupBusinessNameProp","assetGroupFinalUrlsProp","assetGroupPath1AndPath2Props","orComp","assetGroupMobileFinalUrlsProp","assetGroupSearchThemesProp","assetGroupImageAssetsProp","ValidatedFinalUrlWithStoreURL","withError","withFinalUrlRecommendationUpdate","withStoreFromProviderId","withStoreUrl","ValidatedFinalUrlWithRecommendations","ServerValidatedFinalUrl","withControlErrorHandling","withUnvalidatedControlErrors","ServerValidatedUrlPath","ValidatedUrlPath","ServerValidatedMobileUrl","ValidatedMobileUrl","ServerValidatedSearchThemeSelector","withContainerErrors","SearchThemeSelector","Adapter","StandardControlAdapter","FocusableActuator","ServerValidatedImageListPortalContainer","ImageListPortalContainerWithControlErrorHandling","UnmappedFormErrors","OriginalUnmappedFormErrors","StepAssetGroupShell","withStepLoadingShell","withServerContext","withScope","stepService","wizardPerfMarker","_useStepAssetGroupSta","isMounted","useIsMounted","ValidationStringMap","useSelector","locale","finalUrls","finalUrlForRecommendation","headlines","longHeadlines","descriptions","campaignName","campaignTimeZone","urlPath1","urlPath2","finalMobileUrls","urlRules","urlRulesOption","images","businessName","originalAudienceGroup","isSaving","isCanceling","doesNeedSaving","getObjectiveExtensions","campaignType","_useMemo$suggestedObj","suggestedObjectiveExtensions","_useMemo$otherObjecti","otherObjectiveExtensions","_useExitWithoutSaving","useExitWithoutSavingConfirmation","navigationConfirmationPrompt","onAssetGroupValidation","newAssetGroupData","restResults","dataPatch","send","StepEvents","UPDATE_VALIDATION","onUpdateExtensionsAssociations","extensionType","associations","onUpdateRecommendationsContext","recommendationContext","_useContext","RecommendationContext","onUpdateFinalUrls","newFinalUrls","onUpdateSearchThemes","newSearchThemes","onUpdateImageList","imageList","onClearAssets","Headline0","Headline1","Headline2","LongHeadline0","Description0","Description1","_usePrevProp","usePrevProp","hasInvalidSaveAttemptChanged","_usePrevProp3","hasServerErrorsChanged","areBeaconsActive","useImpulse","showAllValidationErrors","setShowAllValidationErrors","useStepAssetGroupState","_useStepAssetGroupSta2","stepState","stepApi","_stepState$adExtensio","_permissions$dynamic","UAPLPMaxLogoPreviewEnabled","CopilotCTALogoGeneration","PmaxExtensionPreview","isAssetGroupUrlRulesEnabled","AssetGroupUrlRules","IsPerformanceMaxInCnMarketEnabled","PerformanceMaxInCnMarket","isPMaxNewAspectRatiosEnabled","PMaxNewAspectRatios","isPMaxNewAspectRatiosExcluded","PMaxExcludeNewAspectRatios","isAdPreviewRefreshEnabled","AdPreviewRefresh","isPMaxAspectRatiosV2Enabled","isFeatureBlockedForCnMarket","IsDomesticSimplifiedChineseEnabled","sendCopilotBannerNotification","useBannerService","finalUrlForCopilotRecommendations","setFinalUrlForCopilotRecommendations","_useRecommendations","useRecommendations","finalUrl","handleCopilotBannerFetch","handleCopilotBannerFetchSucceeded","handleCopilotBannerFetchFailed","suggestionPoller","_useContext2","setRecommendationContext","themes","imageAssets","copilotTracking","_recommendationContex","postAssetEventLog","noop","logo","cta","isCustomerIdInExclusionList","finalUrlRecommendations","_useEventLog","useEventLog","logEnterFlow","logFinalUrlRecommendations","logBannerRefresh","logBannerRefreshCompleted","logFetch","logFetchSucceeded","logFetchAssetsSucceeded","logApplyThemes","logSuggestionsViewed","logPrefillAssets","logRemoveAssets","_useCopilotRecommenda","useCopilotRecommendationSurvey","AssetEventFeature","PMAX","triggerSurveyOnSubmit","triggerSurveyOnCancel","trace","setClarityTag","PMaxCampaignsCopilotRecommendations","trackReturnedFinalUrlAssets","_getCopilotRecommenda","getCopilotRecommendationIdsFromThemes","descriptionRecommendationIds","headlineRecommendationIds","longHeadlineRecommendationIds","displayedDescriptions","MAX_INLINE_RECOMMENDATIONS_PER_PAGE","displayedHeadlines","displayedLongHeadlines","viewedTextSuggestionIds","getUntrackedViewedSuggestionIds","flatten","displayedImages","SuggestionViewImageCount","viewedImageSuggestionIds","trackViewedSuggestionIds","_useCollapseState","useCollapseState","_useCollapseState2","allAssetsSections","assetsExpandedSections","setAssetsExpandedSections","providerId","finalUrlExpansion","finalUrlValidationProps","initialValue","debounce","allAssetsExpand","collapseExpander","setActiveKeys","onRenderAdGroupNameLabel","TextTitle","titleKey","topicKey","onRenderDescription","variant","showCopilotDialog","setShowCopilotDialog","imageExperiencePortalContainerState","setImageExperiencePortalContainerState","imageExperienceAddNewImageCallback","setImageExperienceAddNewImageCallback","addNewDescriptionCallback","setAddNewDescriptionCallback","addNewShortHeadlinesCallback","setAddNewShortHeadlinesCallback","_useState13","_useState14","addNewLongHeadlinesCallback","setAddNewLongHeadlinesCallback","_useState15","_useState16","newCTACallback","setNewCTACallback","handleRefresh","handleReset","removeAllInitialSuggestions","handleCopilotDialogClose","maxUploadNum","imageListLength","PMaxImageExperienceMaxImageCount","_useState17","_useState18","shouldPrefill","setShouldPrefill","j","hasAssetsInAssetGroup","newHeadlines","getUniqueAssetsFromThemes","trackInitialSuggestions","AssetPropertyName","HEADLINE","newLongHeadlines","LONG_HEADLINE","newDescriptions","DESCRIPTION","newImages","ImageassetsConstants","imageOptionKeys","Image","processedImages","newImagesAssets","IMAGE","errorMessage","CallToAction","suggestionId","Logo","onApplyCopilotRecommendation","selectedThemes","selectedThemesAndAssets","formattedThemesAndAssets","getFormattedThemeForApplying","uniqAssetRecommendationsInThemes","availableNewImages","suggestionIds","logCopilotViewedImageSuggestions","trackSelectedImageAssets","imageId","onFinalURLFocusOut","onFinalUrlEnter","finalUrlAdditionalProps","onKeyUp","handleFetchThemes","handleFetchThemesSucceeded","themesList","handleFetchAssetsSucceeded","assetsRecommendationData","trackReturnedTextAssets","RecommendedAssets","_useState19","_useState20","isRegionRestricted","setIsRegionRestricted","isCopilotRegionRestricted","feature","validateSpecialCharacters","PerformanceMaxCampaignsFinalURLValidation","PMaxAndDSAFinalURLValidation","assetGroupNameSection","Collapse","allPanelItems","checkItems","skipItemsTypeCheck","activeKeys","ValidatedFixedPanel","GroupInfoImg","attentionBeaconProps","getExtraProps","getPanelErrorProps","formErrorProps","validateOnRender","additionalProperties","enableSpecialCharactersValidation","FluentProvider","webLightTheme","CopilotRecommendationBanner","isToastEnabled","onRefresh","onReset","toastOffset","vertical","onBannerRefreshCompleted","shouldFetchRecommendations","onFetch","onFetchFailed","onFetchSucceeded","CopilotThemesRecommendationDialog","open","onClosed","onFetchAssetsSucceeded","_useCollapseState3","_useCollapseState4","allListingGroupsSections","listingGroupsExpandedSections","setListingGroupsExpandedSections","listingGroupExpand","mergedI18n","mergeI18n","listingGroupDetails","getListingGroupDetails","listingGroupsSection","ValidatedPanel","details","ListingGroupImg","actuationProps","expand","expandKey","ValidatedListingGroups","imagesContainerRef","logosContainerRef","collectionsSummary","collection","displayText","textCardSummaryDetails","getTextCardSummaryDetails","headlinesCardSummaryDetails","getHeadlinesCardSummaryDetails","longHeadlinesCardSummaryDetails","getLongHeadlinesCardSummaryDetails","descriptionsCardSummaryDetails","getDescriptionsCardSummaryDetails","textAndImageAssetsOptional","hasImages","hasTextAssets","assetsSection","ImageAssetsImg","iconAltText","ImageListSummaryCardDetails","isLogos","containerRef","containerState","PerfMaxImageSuggestionCarousel","addImageCallback","LogoAssetsImg","LogoListPortalContainerWithControlErrorHandling","TextAssetsImg","HeadlineAssetCollection","isOptional","showDeleteButton","LongHeadlineAssetCollection","DescriptionAssetCollection","BusinessNameImg","ValidatedStoreBackedBusinessName","CallToActionImg","noOverflowHidden","relativePosition","ValidatedLegacyCallToAction","isPmaxAd","IsPerformanceMaxAutomatedCTAEnabled","getAdExtensionsSections","extensionTypes","extensionsAssociationsFactory","AssociationPanel","sectionKey","panel","panels","sectionsInfo","allSections","suggestedAdExtensionsSections","otherAdExtensionsSections","_useCollapseState5","_useCollapseState6","allEnhanceYourAdsSections","enhanceYourAdsExpandedSections","setEnhanceYourAdsExpandedSections","enhanceYourAdsSection","_useCollapseState7","_useCollapseState8","allMoreAssetsSections","moreAssetsExpandedSections","setMoreAssetsExpandedSections","moreAssetsSection","ValidatedBootstrapPanel","defaultExpanded","BootstrapPanel","Heading","toggle","Body","_useCollapseState9","_useCollapseState10","allMoreOptionsSections","moreOptionsExpandedSections","setMoreOptionsExpandedSections","moreOptionsExpand","_useState21","_useState22","moreOptionsSectionExpanded","setNameAndTitleExpanded","onMoreOptionsSectionToggle","expanded","moreOptionsSection","onToggle","AttentionBeaconGroup","UrlOptionsDetailsWithRulesV2","path1","path2","mobileFinalUrls","UrlOptionsDetailsWithRules","getAdvancedUrlOptionsCardSummaryDetails","Separator","ValidatedUrlRules","ValidatedUrlRulesV2","isReadOnlyUser","IsReadOnlyUser","audienceSignalSection","SparkleImg","AudienceWizard","_useCollapseState11","SearchThemes","_useCollapseState12","allMoreSettingsSections","moreSettingsExpandedSections","setMoreSettingsExpandedSections","moreSettingsExpand","searchThemesSection","getSearchThemeDetails","SearchThemesImg","moreSettingsSection","getDateSettingDetails","StartEndDateImg","ValidatedLegacyDateSetting","isCreate","_useState23","previewImageId","previewLogoId","cropImageObj","editingPlacementType","_useState24","previewImagesSharedState","setPreviewImagesSharedState","imageExperienceComponents","ValidatedImageExperienceWrapper","imagesContaineRef","logosContaineRef","imageAssetsOptional","updateFinalUrlCallback","updatePortalContainerState","UAPLPMaxIntegration","showCopilotOptionForImage","IsBackgroundSceneEnabled","displayUrl","getFinalUrlWithPath","adPreview","previewProps","updateImageList","shortHeadline","longHeadline","description","callToAction","PerfMaxAdPreviewUAPL","logoPreviewEnabled","extensionFormatters","isAdExtensionPreviewEnabled","ActuationGroup","isActive","FormErrorGroup","CopilotRepositoryProvider","getLocale","recommendationType","enableLogoAndCTA","ErrorMessages","stepAssetGroupWizardConfig","StepMachine","stepStateMachine","StepMachineOptions","initialStepsData","machineId","initialContext","actions","guards","StepComponent","withBannerService","withRecommendationContext","canNavigateBackWithoutSaving","stepRepositoryConfig","saveData","assetGroupChanges","saveContext","createActivity","_permissions$dynamic2","_context$stepsData2","_context$data","logRecommendations","logCopilotRecommendations","logRecommendationsFromContext","errorData","loadData","_context$stepsData","getCampaignId","getAssetGroupId","isLoadExtensionFromAPI","log","loadPromises","bulkUpsertCampaignSettingsEntityErrorMap","getErrorsPlaceholders","saveCampaignAndLinkedData","originalCampaign","_ref$viewModelToBulkM","viewModelToBulkModelForDisclaimerAssociation","adSchedulesModel","finalUrlExpansionsModel","conversionGoalsAssociations","newCustomerAcquisitionGoal","adExtensionAssociations","reject","modelToViewModelForConversionGoalDetails","loadConversionGoalDetails","hasIncomingSystemError","serverContextSelector","campaignSelector","locationTargetsSelector","adSchedulesSelector","adSchedulesBulkUpsertModelSelector","finalUrlExpansionsSelector","finalUrlExpansionOptOutSelector","finalUrlExpansionsBulkUpsertModelSelector","bundleCountriesSelector","bundleLocationCriterionsSelector","urlCustomParametersSelector","trackingUrlTemplateSelector","finalUrlSuffixSelector","conversionGoalsSelector","advertiserCustomerIdSelector","AdvertiserCustomerID","conversionGoalsDetailsSelector","conversionGoalDetails","autoGeneratedTextOptOutSelector","autoGeneratedImageOptOutSelector","savedAddedBrandListIdsSelector","savedDeletedBrandListIdsSelector","costPerSaleOptOutSelector","currencySelector","newCustomerAcquisitionSelector","newCustomerAcquisitionOptOutSelector","getStepCampaignSettingsStyles","urlOptionsContainer","moreBasicCampaignSection","outline","advancedBidStrategyContent","visibility","header","entityIsCampaign","campaignNameProp","campaignBudgetProp","campaignBiddingSchemeProp","campaignLanguagesProp","feedAssociationsProp","campaignCPSOptOutProp","campaignLocationCriterions","anyComp","campaignDayTimeCriterions","campaignNegativeWebPages","campaignUrlOptionsProperties","brandListAssociationEntity","notCampaignUrlOptionsProperties","notComp","ServerValidatedLegacyBudget","ValidatedLegacyBudget","ServerValidatedLegacyBidStrategy","ValidatedLegacyBidStrategy","ServerValidatedLanguageTarget","ValidatedLanguageTarget","ServerValidatedLocationTargetSetting","ValidatedLocationTargetSetting","ServerValidatedLegacyAdSchedule","ValidatedLegacyAdSchedule","ServerValidatedLegacyFinalUrlExpansion","ServerValidatedPageFeedSelectorSection","PageFeedSelectorSection","FormErrorBeaconAdapter","ServerValidatedBrandListsPicker","BrandListsPicker","ServerValidatedAutoGeneratedAssets","ServerValidatedCostPerSale","ServerValidatedNewCustomerAcquisition","ValidatedNewCustomerAcquisition","newCustomerAcquisitionServerErrorFilter","StepCampaignSettingsShell","_useStepCampaignSetti","urlCustomParameters","trackingUrlTemplate","finalUrlSuffix","conversionGoalsState","conversionGoalsDetails","advertiserCustomerId","currency","conversionGoalsTitleDetails","getConversionGoalTitleDetails","urlOptions","urlOptionsDetails","getUrlOptionsDetails","biddingScheme","bidBudgetTitleDetails","getBidBudgetTitleDetails","storeContainerData","stores","countries","storesData","setStoresData","onStoreDataLoaded","_ref$stores","_ref$countries","storeTitleDetails","getStoreTitleDetails","onCampaignValidation","newCampaignData","onPageFeedsChange","selectedPageFeeds","reportedSelectedPageFeeds","setReportedSelectedPageFeeds","onSelectedPageFeedsUpdate","pageFeedsDetails","onBrandListsChange","selectedBrandLists","reportedSelectedBrandLists","setReportedSelectedBrandLists","onSelectedBrandListsUpdate","brandListsDetails","autoGenAssetsSummary","autoGenAssetsData","useStepCampaignSettingsState","_useStepCampaignSetti2","adScheduleView","setAdScheduleView","setAdScheduleViewCallback","finalUrlExpansionsView","setFinalUrlExpansionsViewCallback","IsPerformanceMaxCampaignsPageFeedsEnabled","PerformanceMaxCampaignsPageFeeds","IsPerformanceMaxCampaignsAutoGenAssetControlEnabled","PerformanceMaxCampaignsAutoGenAssetControl","IsBrandExclusionEnabled","BrandExclusion","IsSupportCPSForPmaxEnabled","showBudgetSuggestion","EnableBudgetSuggestion","IsNewCustomerAcquisitionEnabled","NewCustomerAcquisition","IsConversionAssociationWarningEnabled","ConversionAssociationWarning","effectiveCampaignId","allCampaignSettingsSections","campaignSettingsExpandedSections","setCampaignSettingsExpandedSections","flipCampaignSettingsExpandAllState","basicSettingsExpand","flipMoreSettingsExpandAllState","moreBasicSettingsExpand","basicSettingsSection","campaignPanel","bidBudgetPanel","BudgetBidImg","isCampaignSetting","ConversionBasedBiddingBanner","isCampaignCreation","newCustomerAcquisitionPanel","ValidatedNewCustomerAcquisitionHeader","optOut","advancedBidStrategy","CostPerSaleImg","locationPanel","LocationImg","getLocationTargetTitleDetails","bidStrategyType","DisplayBiddingStrategyType","languagePanel","lang","LanguageImg","validator","LanguageTargetValidatorFactory","conversionPanel","ConversionsImg","ValidatedConversionGoals","showTrackingStatusIcon","shoppingAdsPanel","ShoppingImg","StoreSelectContainer","generalSettings","sellFromCatalogSettings","without","horizontalAlign","moreBasicSettingsSection","getAdScheduleDetails","AdScheduleImg","getFinalUrlExpansionTitleDetails","FinalUrlExpansionsImg","PageFeedsImg","onSelectedOptionsUpdate","AutoGenAssetsImg","BrandExclusionsImg","isConfirmDialogOn","savedAddedSelectedOptionsKeys","savedDeletedSelectedOptionsKeys","descriptionTextTemplate","UrlOptionsImg","ValidatedUrlOptionsParameter","errorMapper","stepCampaignSettingsWizardConfig","campaignCriterions","_context$data$activit2","BudgetBidCampaignImportNotificationActivity","createScenarioAndActivity","activityName","initialCampaign","newCampaign","showBudgetBidCampaignNotifications","campaignItemList","oldBudget","newBudget","oldBidStrategy","newBidStrategy","_context$data$activit","Permissions","isNewCustomerAcquisitionEnabled","bundleCountriesAndLocationCriterions","newCustomerAcquisitionGoals","locationCriterions","dayTimeCriterions","campaignNegativeWebpages","campaignData","STEP_INFOS","applyCommonSettingsPageSettings","PERF_MAX_CAMPAIGN_CRUD_SCENARIOS","PERF_MAX_CAMPAIGN_CREATION","stepList","PERF_MAX_ASSET_GROUP_CREATION","isCenteredLayout","PERF_MAX_CAMPAIGN_SETTINGS","PERF_MAX_ASSET_GROUP_SETTINGS","PerfMaxAssetGroupCreationPage","StepWizard","wizardScenario","routeToNavigateToWhenDone","PerfMaxAssetGroupSettingsPage","PerformanceMarkerProvider","immediateDone","scopeToRemoveWhenDone","StepWizardWithDynamicOptions","dynamicOptions","extraStepsData","PerfMaxCampaignCreationPage","withSiteMap","withCreationHeader","withTheme","config","localStorage","supportsStorage","getCampaignObjective","getRoutePathById","siteMap","adExtensionsDynamicFeaturesLoader","dynamicOptionsLoader","default","withProps","LazyView","invalidate","fallback","ProgressiveLoadingBlock","PerfMaxCampaignSettingsPage","PMAX_WIZARD_ID_NAME","PMAX_NORTH_STAR_SETTING_WIZARD","PMAX_NORTH_STAR_WIZARD","PRODUCTS","ASSETS","TARGETING","CAMPAIGNDETAILS","BUDGET","SUMMARY","CAMPAIGNSETTING","ASSETGROUPSETTING","FLOWS","PERFMAX_WIZARD","RETAIL_PERF_MAX","FLOWS_TO_FIRST_STEP","AssetGroupNameSection","useStyles","makeStyles","socialRecommendationContainer","paddingTop","paddingBottom","SocialSiteRecommendationSection","isSocialSitesLoading","socialSites","onSocialSiteCheckboxChange","prefillAssetRecommendation","onCheckboxChange","onGenerateButtonClick","recommendation","_evt","primary","AssetGroupNameSectionWithSocialSiteRecommendation","_scope$values","ScopeContext","setSocialSites","setIsSocialSitesLoading","GetSocialSitesRecommendationRequest","FinalURL","readSocialSiteRecommendation","Data","SocialSites","socialSitesRecommendations","additionalSocialSites","socialSite","getAssetsStyles","borderColor","AssetsSection","setSelectedVideoId","selectedVideoId","allPanels","PMaxVideo","PmaxNorthStarAssetGroupSetting","getAssetsPanels","useVideoAdsCopilot","copilotFetchTaskManager","TaskManager","VideoCopilotGeneration","VideoPanel","urlOptionStyles","urlContainer","MoreOptionsSection","urlClasses","_ref$adExtensionsDyna","EnhanceYourAdsSection","MoreAssetsSection","MoreSettingsSection","_assetGroup$data5","_assetGroup$data6","_assetGroup$data","_assetGroup$data2","_assetGroup$data3","_assetGroup$data4","wrapperClass","selectors","radiusShimmerElement","ShimmerElementType","line","SectionShimmer","Shimmer","shimmerElements","shimmerWithElementFirstRow","shimmerWithElementSecondRow","circle","singleLineShimmer","SingleLineShimmer","AdScheduleShimmer","RadioShimmer","StoreSelectorShimmer","SignalSection","PerformanceMarkerContext","audienceSignalSections","audienceSignalExpandedSections","setaudienceSignalSettingsExpandedSections","searchThemeSection","ValidationSearchThemeSelector","AudienceSignalSection","AudienceSignalPanel","PANEL_KEYS","AUDIENCE_SIGNAL","getAssetsStepStyles","imageExperience","formContainer","right","previewerContainer","formHeader","AssetsStepFormInternal","onDataChangeProp","onDataChange","useResponsiveStyles","_ref2$serverErrors","_ref2$systemErrors","ServerContext","useWizardService","wizardData","mergedTempI18n","flow","saveFailed","useFormService","matchStepState","STEP_STATES","SAVING","CANCELING","_ref4$videos","_ref4$Headlines","_ref4$LongHeadlines","_ref4$Descriptions","_ref4$extensionsAssoc","prevData","_useCopilot","useCopilot","currentCTA","enableCopilotRecommendations","assetScenario","AssetScenario","CREATE_WORK_FLOW","copilotBanner","SocialSitesRecommendation","updateExtensionsAssociations","newImageList","PerfMaxResponsiveAdPreviewUAPL","isSettingPage","signalSection","onAssetGroupValidate","AssetsStepForm","AssetsStepShell","AdAssetsFormShimmer","AdAssetsPreviewerShimmer","getODataConfig","odataPath","hostname","location","isLocal","odataToken","Token","oDataToken","ServicesEndpoints","CampaignAPI","oDataPath","getDefaultCampaignData","salesCountry","localInventory","isFeedFiltered","feedLabel","cnMarketAccount","generateNameSuggestionSuffix","floor","random","timeZoneMapper","getAccountTimeZone","getBudgetRange","Daily","Default","getDefaultLanguagesViewModel","MAX_CONVERSIONS_VALUE","getDefaultLocationTargetsViewModel","getDefaultAssetGroup","_ref2$storeFinalUrl","storeFinalUrl","IsOptional","createDefaultCampaign","scenarioContext","_ref$providerId","_ref$salesCountry","_ref$localInventory","_ref$isFeedFiltered","_ref$feedLabel","handleDefaultCampaignCreationError","_ref3$serverErrors","errorMessages","notificationApi","campaignsPagePath","allSiteMap","searchParams","history","pathname","search","BudgetStepSection","AllBudgetStepSections","useLocalizeBudget","localizeBudget","budget","withSymbol","maximumFractionDigits","getBudgetFormStyles","budgetPerformanceTile","budgetTitle","BudgetRange","BingAdsWebUIStaticLegacyPageContext","budgetProp","bidStrategyProp","ServerValidatedBudgetComponent","BudgetComponent","ServerValidatedBidStrategyComponent","BidStrategyComponent","BID_STRATEGY_OPTIONS","MAX_CONVERSIONS","BudgetStepShell","budgetInfo","budgetAmount","cpa","roas","isInitialAdditionalDetailsChecked","budgetSuggestionData","fetchCustomBudgetPerformanceData","budgetTier","loadBudgetPartial","FORM_STATES","LOADING","isDataLoading","bidRange","KeywordBidRange","_ref5$CurrentAccount","wizardState","getFlowFactors","shouldShowBudgetSuggestion","expandedSections","setExpandedSections","expandSections","_useBudgetSuggestionD","isBudgetSuggestionLoading","setIsBudgetSuggestionLoading","setBudgetSuggestionData","customPerformanceData","setCustomPerformanceData","budgetSuggestions","useBudgetSuggestionData","updatedBudgetSuggestionData","DailyRange","budgetSuggestion","GlobalMaximumBudget","DailyBudget","CeilingValue","GlobalMinimumBudget","FloorValue","budgetTitleDetails","bidStrategyTitleDetails","targetValue","TargetCpaWarningBanner","onFieldChange","updatedData","onBidStrategyChange","onBudgetChange","budgetAmountValue","onBudgetValidate","_ref8","isBudgetValid","budgetErrors","onBudgetSuggestionValidate","_ref9$data","onMarketingMetricChange","_ref10","newMarketingMetric","isMarketingMetricValid","marketingMetricErrors","BudgetIcon","as","headingClassName","BudgetSuggestionContainer","mode","MODE","CREATION","CampaignTypes","PerformanceMax","defaultBudget","bidType","minBudget","maxBudget","showDropdown","onNotifyValidation","withSlider","BidStrategyIcon","selectedBidStrategy","defaultChecked","marketingMetricsValue","inputUnit","hideMessage","roasMtToUI","roasUiToMt","toFixed","getTargetingStyles","getLocationTargetingStyles","TargetingStepShell","_ref$data","targetingInfo","_ref3$campaign","_ref3$assetGroup","allAssetGroupSections","assetGroupExpandedSections","setAssetGroupExpandedSections","campaignSettingsExpand","LocationTargeting","onAssetGroupSettingsValidate","onCampaignSettingsValidate","getProductStepStyles","getProductSettingStyles","ProductsStepShellInternal","_useWizardService","_ref4$campaign","_ref4$assetGroup","allProductsSections","productsSectionsExpandedSections","setProdutsSectionExpandedSections","allListingGroupSections","lisitngGroupSectionsExpandedSections","setListingGroupExpandedSections","apiError","_ref6$stores","_ref6$countries","WIZARD_EVENTS","UPDATE_WIZARD_DATA","loadedStoresData","onRenderCustomLoadingComponent","onNavigateToListingGroups","queryParam","QueryParam","onClickNavigateToListingGroups","stopPropogation","ProductsStepShell","getCampaignStylesNorthStar","CampaignDetailsStepShell","campaignInfo","campaignClasses","getCampaignStyles","DisclaimerStringMap","ConversionWarningImprovementEnabled","ConversionWarningImprovement","PMaxDisclaimers","IsMSANDisclaimerEnabled","isPMaxDisclaimersEnabled","DisclaimerAdsEnabled","disclaimerRepositoryRef","Repository","DisclaimerAdExtension","skipExtensionCache","associatedDisclaimer","setAssociatedDisclaimer","getAssociatedDisclaimer","disclaimer","disclaimersDetails","getDisclaimerTitleDetails","selectedDisclaimer","isCampaignShoppingType","ValidatedConversionGoalsScopeSelector","isCreationWorkflow","bidAdjustmentIcon","ValidatedDisclaimerExtension","disclaimerContainerWrapper","repository","AllowDisclaimerEnabled","showOnlyPopupLayout","usePanel","useSummarySchemaData","timeDisplayType","setTimeDisplayType","_state$context$wizard","savedProductFilter","savedListingGroup","preferencesService","_preferencesService","initialize","isTwelveHourDisplay","findByName","loc","SelectionStatus","IsSearchThemesEnabled","autoGeneratedAssets","isRendered","currencyCode","bidTarget","costPerSale","locationTargeting","languages","audienceSignal","shouldFetchFromMT","logos","isLogo","getActionText","Language","ActionType","adScheduleCampaign","useSearcherTimeZone","AdScheduleUseSearcherTimeZone","productsPanel","storeInfo","buildSchemaData","PANEL_CONFIGS","rowCount","getPanel","ShimmerElementsGroup","isLastRow","getSummaryImageRowElement","customElementsGroup","SummaryShimmer","_ref2$currentSteps","currentSteps","_ref2$panelConfigs","panelConfigs","step","panelConfig","Areas","ActionTypes","AuditPoints","getDefaultConversionsWarning","locator","DiagnosticsTypes","Issue","stepId","getNoConversionGoalsWarning","ScenarioMap","LowerThanSuggestion","EstimatedIncreaseInBudget","InvalidCpa","TargetCpaHigherThanBudget","NoAutoGeneratedAssets","EnableAutoGeneratedAssets","Recommendation","NotSetUpGoal","HasNoValidCampaignLevelGoal","HasNoValidAccountLevelGoal","NoConversionGoal","HasNoValidGoalAtCampaignOrAccountLevel","HasNoValidGoalAtCampaignOrAccountLevel_NoAccountGoal","HasNoValidGoalAtCampaignOrAccountLevel_ChangeToMainGoal","NoRecentConversion","TrackingStatusNoConversions_NotUploadOfflineConversion","TrackingStatusNoConversions_EventGoalInvalidParameter","TrackingStatusNoConversions_UrlGoalInvalidParameter","TrackingStatusNoConversions_UETMismatch","TrackingStatusNoConversions_UETActiveMissingConversionEvent","TrackingStatusNoConversions_ChangeToMainGoal","TrackingStatusNoConversions","Unverified","TrackingStatusUnverified_UETMismatch","TrackingStatusUnverified_ChangeToMainGoal","TrackingStatusUnverified","TagInactive","TrackingStatusTagInactive_UETMismatch","TrackingStatusTagInactive_ChangeToMainGoal","TrackingStatusTagInactive","InactiveDueToTagUnavailable","TrackingStatusInactiveDueToTagUnavailable_UETMismatch","TrackingStatusInactiveDueToTagUnavailable_ChangeToMainGoal","TrackingStatusInactiveDueToTagUnavailable","MissGoalWithRevenueValue","SummaryStepShell","dataArray","issueList","recommendList","auditPoint","auditDetails","extractAuditPoints","onActionClick","action","NAVIGATE_TO","useActionCallback","schemaData","currentFlow","getCurrentFlow","isPMaxCreationDiagnosticEnabled","PMaxCreationDiagnostic","onAssetsHeaderActionClick","onTargetingHeaderActionClick","onCampaignSettingsHeaderActionClick","onBudgetSettingsHeaderActionClick","onProductsHeaderActionClick","separatorStyles","products","actionButton","dynamicProps","hd1","assets","buildDefaultDataProperty","hd3","hd2","hd4","hd5","targeting","buildSchema","SummaryDiagnostic","issues","recommendations","GeneratedUI","customComponentTypes","summaryPageComponentTypes","updateAssetGroupAndCampaignStatus","assetGroupData","useDiagnosticsData","_ref$areas","areas","timeZoneId","oDataConfig","AdInsightAPI","oDataOptions","contentType","fetchDiagnosticData","Diagnostic","CampaignDiagnosticDetail","areasStr","area","baseURL","patchDiagnosticsData","diagnosticsData","patchedDiagnosticsData","_ref4$Budget","_ref4$Budget2","BudgetAmount","BudgetType","BudgetStatus","_ref4$BiddingScheme","_ref4$BiddingScheme2","BiddingSchemeType","currentDailyBudget","suggestedDailyBudget","StepConfig","Activity","ScenarioContext","PermissionsContext","versionForLog","getLogVersion","getLoggerWithoutPageInfo","isPMaxNewAspectRatios","createVideoRepository","folderRepository","createFolderRepository","imageRepository","createImageRepository","uploadVideoIfNeeded","videoPromises","uploadVideoMetadata","videoMetadata","newVideo","err","load","savedAssetGroup","savedCampaign","saveCampaignsPromise","savedAssetGroupPromise","initialData","assetGroupToSave","initialAssetGroup","storeQueries","getStoreQueriesWithLocalMock","getStoreInfoPromise","getStore","promises","DestinationUrl","campaignToSave","saveCampaignPromise","saveAssetGroupPromise","campaignResults","assetGroupResults","savePromises","savedBrandExclusions","BrandExclusionsViewModel","brandExclusionsToSave","savedLocationTargets","_usePreference","usePreference","preferenceNames","SelectedCurrency","currencyPreference","diagnostics","_useBudgetSuggestionR","useBudgetSuggestionRepository","loadBudget","saveBudget","modelToViewModel","parseFloat","language","updatedCampaign","parseDecimal","_campaign$data","_campaign$data$Budget","_campaign$data2","budgetSuggestionResults","LogTargetCpaCheckOnSave","isBudgetSuggestionEnabled","savedDiagnostics","isPublishing","_useDiagnosticsData","isPMaxDiagnostic","msg","auditCheckList","convertDiagnosticsDataToTrackingLog","StepList","currentStepId","getCurrentStepId","displayMode","useResponsiveSize","Constants","ResponsiveSizeBreakpoints","stepListConfig","unshift","getStepListConfig","getDefaultOnItemClickFn","toStep","steps","firstSubStep","isBehind","ResponsiveStepList","getOnItemClickFn","SaveAndPublish","saveButtonText","isBlocking","FETCHING","onNextClicked","SAVE_AND_EXIT","buttonText","currentStep","SaveAsDraft","_useWizardService2","NextButton","_useWizardService3","MULTI_AD_MANAGER","AD_GROUP","SAVE_AND_NEXT","BackButton","_useWizardService4","onBackClicked","MULTI_AUDIENCE_CAMPAIGNS","BACK","PerfMaxStepFooter","nextButtonText","nextDisabled","backButtonText","cancelButtonText","hideBackButton","isFirstStep","getIsFirstStep","isLastStep","getIsLastStep","CancelButton","PerfMaxSettingStepFooter","STATES_TO_LOG","ACTIVE","GOING_NEXT","GOING_BACK","DONE","WizardLogger","stepTime","loadStart","loadEnd","saveStart","saveEnd","wizardTime","start","end","toStrings","logStepStates","PerfMaxNorthStarWizardImpl","getLocalStorage","AppsAdsPerfMaxFluentV2","wizardFlow","initialStep","wizardConfig","initialFlowFactors","initialWizardData","getFlow","onDone","onExited","attachStepActivities","PerfMaxNorthStarWizard","FluentSwitcherContext","Provider","Scenario","Wizard","WizardPerfMarker","wizardName","wizardMarker","LayoutContainer","DefaultTemplate","Layout","component","StepContainer","SaveBlocker","CancelWizardDialog","withPermissions","rest","CampaignSettingStepShell","getWizardData","IsConversionAssociationWarningP2Enabled","ConversionAssociationWarningP2","CampaignNamePanel","CAMPAIGN_NAME","AD_SCHEDULE","FINAL_URL_EXPANSION","AUTO_GEN_ASSETS","PAGE_FEEDS","URL_OPTIONS","CAMPAIGN_URL_OPTIONS","BRAND_EXCLUSIONS","DISCLAIMERS","AdSchedulePanel","UrlOptionsPanel","patchedData","getMessageType","customConfirmMessages","BID_STRATEGY","LOCATIONS","LANGUAGE_TARGET","COST_PER_SALE","SHOPPING","CONVERSIONS","NEW_CUSTOMER_ACQUISITION","allExpandedSections","_ref11","_ref12","_ref13$stores","_ref13$countries","BudgetPanel","BidStrategyPanel","bidStrategyComponentOptions","bidStrategyOptions","biddingBannerOptions","LocationTargetingSettingPanel","LanguageTargetPanel","IsPmaxNorthStarSettingFailure","getStepConfig","machineOptions","needsConfirming","getNeedConfirming","PerfMaxNorthStarSettingWizard","ConfirmWizardDialog","useConfirmDialogConfigWithLogger","_props$data","_props$data$campaign","stepName","IsPmaxNorthStarAssetGroupSettingFailure","IsPmaxNorthStarAssetGroupCreationFailure","cacheManager","getAssetStepConfig","PerfMaxNorthStarAssetGroupSettingWizard","DuplicateWordAlert","MaxSelectionAlert","selectedOptionsLimit","useSearchThemeSelectorStyles","shorthands","spacingVerticalS","tagsList","spacingVerticalXS","gridGap","spacingHorizontalXS","searchBox","spacingHorizontalM","alertMes","SearchThemeSelectorImpl","onChangeFromProp","selectedOptions","setSelectedOptions","isLimitReached","setIsLimitReached","isDuplicate","seIsDuplicate","onDeleteItem","newSelectedOptions","indexSelected","searchValue","updateSearchValue","mergeClasses","SelectedItem","itemText","itemIndex","onDelete","SearchBox","onSearch","newVal","draftSelectedOptions","onClear","ValidationSearchThemeSelectorInternal","newsearchThemes","activate","setIsActive","isRestarting","setIsRestarting","isMountedRef","budgetContainer","neutralPrimary","LegacyBudget","validationDailyMinBudget","hideBudgetMinRecommendation","BudgetView","hideDailyBudgetOptions","showBudgetMinRecommend","PageContext","BCCBudgetImprovementEnabled","currencySymbol","getCurrencySymbol","AccountCurrencyCode","minimumBudget","_bingads_webui_static_legacy_page_context","LegacyBudgetWithCustomValidation","isPremiumStreaming","newIsValid","EDITING","datas","BudgetSuggestionDialog","getConversionGoalStyles","ConversionGoalSelectorContainer","paginationStyle","ConversionGoalsWithCustomValidation","conversionGoalsData","_conversionGoalsData$","ConversionGoalKeyToStringMapping","$dataRange","useP$DaterangeDefault","changedData","campaignConversionGoal","ConversionGoalSelector","isSelectorEnabled","isMultiMode","isHideSaveBar","GoalSelector","productOptions","buttonContainer","merchantCenterAccountContainer","productFilterEditContainer","stackContainerToken","ListingGroupsWithCustomValidation","storeDetails","_useTreeViewPanelSele","selectedProducts","setSelectedProducts","selectedOperand","setSelectedOperand","setProductFilter","onOpenPanel","onDeleteProduct","navigateToListingGroupPage","onChangeOptions","hasSelectedProducts","hasSelectedOperand","updatedListingGroup","useDateRange","ChoiceGroup","filterProductsPreview","wrap","disableShrink","Glyphicon","glyph","withCampaignSiteMap","LocationTargetSettingWithCustomValidation","skipValidation","allowBidAdjustment","dealInfo","isLocationValid","LocationTargetSetting","setData","AudienceWizardWithShimmer","withShimmer","AudienceSignalShimmer","AudienceImg","showShimmer","campaignTrackingUrlTemplate","campaignFinalUrlSuffix","campaignUrlCustomParameters","trackingUrlTemplateControlsWrapper","partial","finalUrlSuffixControlsWrapper","urlCustomParametersControlsWrapper","functionsToInject","ValidatedUrlOptionsParameters","_ref$setSelectedVideo","isVideoRequired","skipQualityValidation","loadClipchampPlayer","videoTypesWithOrder","videosContainer","videoAd","ValidatedVideoExperience","multiVideoMode","allowedVideoSizes","disableRemoveAll","hideRatioLabel","videoExperienceCircleUploadType","disableUploadTextField","videoPickerContainerHeight","setSelectedVideoIdx","selectedVideoIdx","copilotEnabled","isVideos","VIDEOS","limit","WizardEvents","STEP_LOADING","STEP_SAVING","STEP_DONE_LOADING","STEP_DONE_SAVING","STEP_DONE_CANCELING","STEP_FAILED_LOADING","STEP_ABORTED_SAVING","STEP_ABORTED_CANCELING","STEP_STOPPED","NAVIGATE_BACK","NAVIGATE_NEXT","CANCEL","EXIT","SAVE","DONE_SAVING","FAILED_SAVING","DONE_LOADING","FAILED_LOADING","ACTIVATE","DEACTIVATE","STOP","DONE_STOPPING","OVERRIDE_ACTIONS","OVERRIDE_GUARDS","logF","argsSerializer","_console","_len3","args","_key3","_len2","_key2","logAction","_len","_key","_len5","_key5","stateLoggingListener","machine","WizardStates","stepIndexSelector","stepIndex","stepServicesCacheSelector","stepServicesCache","isBusySelector","wasSavingSelector","wasWaitingForConfirmationSelector","wasStoppingSelector","getStepInfo","getStepServiceRef","defaultActions","acquireStepService","stepServiceNeedsActivation","extendedStepMachine","spawn","stopStep","activateStep","deactivateStep","notifyStepToSave","notifyStepToCancel","setNavigatingForward","navigatingTo","setNavigatingBack","setExiting","isExiting","applyNavigation","resetNavigation","notifyDone","isFunction","defaultServices","defaultGuards","isNotNavigating","doesServiceNeedActivation","getStartingState","wizardOptions","_wizardOptions$onDone","wizardStateMachine","_ref$machineId","_ref$actions","_ref$services","services","_ref$guards","createMachine","preserveActionOrder","predictableActionArguments","strict","states","entry","cond","StepStates","isStopping","isFin","isFailedInit","contextSelector","defaultInitialContext","actionsOverride","guardsOverride","replaceData","replaceStepsData","patchData","onInvalidSaveAttempt","overrideActions","overrideGuards","notifyLoading","sendParent","notifyDoneLoading","notifyFailedLoading","notifySaving","notifyDoneSaving","notifyDoneCanceling","notifyAbortedSaving","notifyAbortedCanceling","notifyStopped","requestConfirmation","delay","aborted","confirmCancel","needsStopping","_states","_ref$initialContext","invoke","onError","xstateStateMachine","PropTypes","isRequired","formStyle","getWizardStyles","spinnerKeyframe","wizardContainer","glyphIconStyle","wizardListContainer","borderRight","neutralQuaternaryAlt","borderLeft","blue","borderLeftColor","wizardMainContainer","neutralLighterAlt","wizardStepContainer","wizardSingleStepLayoutStepScrollingContainer","wizardSingleStepLayoutCenteredStepContainer","wizardSingleStepLayoutStepContainer","wizardStep","flexBasis","wizardFooter","mobileNavContainer","StepRepository","isLoadingSelector","contextRef","asyncTokenRef","cancel","createAsyncToken","onSuccess","arg0","propTypes","subscribe","getStepRepository","getStepProgressItemGlyphicon","isSelected","containsSelected","footerStyleOverrides","skippingLink","cancelButton","StepsContextProvider","VerticalSeparatedLayout","StepProgressList","MultiStepLayout","_ref$wizardState","stepListWithServiceInfo","_ref$wizardActions","wizardActions","saveAndNavigateNext","saveAndNavigateBack","cancelAndExit","saveAndExit","stepFooter","beforeLastStepNextButtonText","saveAndExitButtonText","previousButtonText","StepFooter","styleOverrides","onNextClick","isNextClickDisabled","onSkippingLinkClick","skippingLinkTitle","previousButtonAfterNext","onPreviousClick","isPreviousClickDisabled","last","isReadOnly","currentPath","getItemGlyphicon","SingleStepLayout","Step","StepWizardImpl","_useWizardState","_props$extraStepsData","_props$wizardScenario","withContentFooter","_props$machineId","StepWizardScenario","scopeRef","wizardMachine","useRefInit","service","useInterpret","stepInfo2","wasSaving","wasWaitingForConfirmation","wasStopping","addEventListener","removeEventListener","useWizardState","_useWizardState2","_wizardState$withCont","enabled","enableRenderingLog","initialized","stepPerfMarkerName","ContentFooter","useNavigationConfirmationPrompt","needsConfirmation","confirmationMessage","onUserNavigation","Prompt","beforeUnloadListener","preventDefault","returnValue","capture","exitConfirmationMessage","confirm","StepLoadingStatus","StepLoadingShell","isStoppingSelector","loadingStatusSelector","stepComponent","Fallback","subscription","unsubscribe","perfmarker","autoEnd","useUpdateChildPerfMarker","isFailedInitSelector","sharedIsStoppingSelector","isFinSelector","staticLoadingStatusSelector","staticIsStoppingSelector","staticFallback","HOC","_excluded2","displayName","hoistNonReactStatics","getBlockerStyle","ComponentSettings","inlineChartContainerStyle","fallbacks","alignSelf","backgroundRepeat","backgroundImage","CircleSolid","CircleDotted","DiamondSolid","DiamondDotted","maxHeight","verticalAlign","fontStyle","speak","fontVariant","textTransform","WebkitFontSmoothing","MozOsxFontSmoothing","left","Waterdrop","backgroundPositionX","backgroundPositionY","backdropFilter","backgroundSize","EntityName","EdmEntityName","PersistentEntity","InlineChartRequest","getParentLevels","pageContext","currentAdGroup","CurrentAdGroup","parentLevels","getDefaultEntityBaseOnParentLevels","isPerfMaxCampaign","isAppCampaign","constructor","isFilterActive","odataV4","ignoreCase","getCurrentEntity","formatDateString","dateStr","leftPadding","dt","parse","year","getFullYear","month","getMonth","day","getDate","getEntityCollectionName","nameMapping","Keyword","NegativeKeyword","NegativeKeywordList","AdGroup","Ad","AdGroupCriterion","AudienceCriterionWithBI","DsaTarget","PortfolioBidStrategy","generateRequest","metric","request","currentEntity","accountModes","CurrentTabId","CurrentGridName","currentCustomerId","CurrentCustomer","edmEntity","period","compareStartDate","compared","compareEndDate","granularity","metrics","filters","movingAverage","isMovingAverageOn","getQuery","edm","InlineChartService","findAll","filterObj","PerformanceTimeSeries","entitySet","getScope","toJSON","navigation","getNavigation","nav","navLocal","entitySetArgs","comparisonStartDate","comparisonEndDate","isHierarchical","$call","currentCustomer","currentAccount","InlineChartWrapper","_React$PureComponent","dataSource","getDataSource","chartOptions","getChartOptions","_this$props","_this$props2","addDateChangeListener","imagePath","isFluctuationsEnabled","IsFluctuationExperimentEnabled","pathConfig","resizeChartListener","resizeEventHandler","store","token","seriesColors","gridCriterionType","hideChartPanel","defaultPrimaryMetric","preferences","InlineChartPreferences","isFluctuationsExperiementEnabled","fluctuationService","FluctuationService","preference","pageState","_this$props3","isShowChart","dateRange","gridDataSource","InlineChart","InlineChartView","_Backbone$View","filterUpdated","handler","resizeListener","resizeChart","ReactDOM","el","_superPropGet","PagePadding","smallMainSectionLeftPadding","pagePaddingStyle"],"sourceRoot":""}