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qC,aAAhBlG,EAAMqF,MAAuB,kBAAoB,wBAAyB,EAAC,KAAQ,GAAO,GAAS,oFAAuHglG,EAAIO,OAAO,OAASH,EAAazqG,EAAMkC,MAAQ,GAAKuoG,GAAe,eAA8C,EAAE1oC,KAAKlkE,KAAK,UAAW8sG,EAAgBA,EAAgB3qG,MAAqB,qBAARA,MAAoBA,WAAMnG,GAAoB6wG,CAAS,C,yBCFzsB,IAAIL,EAAM,EAAQ,QAGlBC,EAAOC,QADP,SAAkBC,GAAS,IAAIE,EAAW,GAAqCC,EAAmBH,GAAU,CAAC,EAAi1B,OAA70B,SAAU9pG,GAAOgqG,EAAWA,+JAA0PL,EAAIjrG,KAAK,QAASsB,EAAKC,UAAU,SAAS,GAAM,GAA1S+pG,uFAAiaL,EAAIjrG,KAAK,QAASsB,EAAKC,UAAU,WAAW,GAAM,GAAS,wIAA8O,EAAEohE,KAAKlkE,KAAK,SAAU8sG,EAAgBA,EAAgBjqG,KAAmB,qBAAPA,KAAmBA,UAAK7G,GAAoB6wG,CAAS,C,yBCFp8B,EAAQ,QAWlBJ,EAAOC,QATP,SAAkBC,GAAS,IAAoCC,EAAhCC,EAAW,GAAqCC,EAAmBH,GAAU,CAAC,EAQsM,OARlM,SAAUe,EAAWC,GAAOd,GAAsB,wCAC/Ja,EAAY,EAChBb,GAAsB,sEAGlBa,EAAY,IAChBb,GAAsB,qEAEtBA,EAAWA,GAAY,OAASD,EAAae,GAAQ,GAAKf,GAAc,QAAwB,EAAE1oC,KAAKlkE,KAAK,cAAe8sG,EAAgBA,EAAgBY,UAA6B,qBAAZA,UAAwBA,eAAU1xG,EAAU,SAAU8wG,EAAgBA,EAAgBa,KAAmB,qBAAPA,KAAmBA,UAAK3xG,GAAoB6wG,CAAS,C","sources":["../../../../summary-tabs/packages/ad-groups-grid/src/columns/dynamic-column-config-utils.js","../../../../summary-tabs/packages/campaigns-date-picker/src/campaigns-date-picker-view.js","../../../../summary-tabs/packages/labels/src/column/labels-column.js","../../../../summary-tabs/packages/labels/src/popup/content-view.js","../../../../summary-tabs/packages/labels/src/popup/label-filter-util.js","../../../../summary-tabs/packages/labels/src/popup/index.js","../../../../summary-tabs/packages/labels/src/util/get-entity-set.js","../../../../summary-tabs/packages/labels/src/util/labels-data-source.js","../../../../summary-tabs/packages/labels/src/selector/selector-viewmodel.js","../../../../summary-tabs/packages/labels/src/selector/label-selector-view.js","../../../../summary-tabs/packages/labels/src/selector/create-label-view.js","../../../../summary-tabs/packages/labels/src/util/create.js","../../../../summary-tabs/packages/pgrid-factory/src/pgrid-factory.js","../../../../summary-tabs/packages/summary-grid-helper/src/columns-config-builder.js","../../../../summary-tabs/packages/summary-grid-helper/src/query-util.js","../../../../summary-tabs/packages/summary-grid-helper/src/initializers/filter-agent.js","../../../../summary-tabs/packages/summary-grid-helper/src/preferences.js","../../../../summary-tabs/packages/summary-grid-helper/src/inline-edit-save.js","../../../../summary-tabs/packages/summary-grid-helper/src/inline-edit-prompt.js","../../../../summary-tabs/packages/summary-grid-helper/src/grid-util.js","../../../../summary-tabs/packages/summary-grid-helper/src/grid-data-params.js","../../../../summary-tabs/packages/summary-grid-helper/src/error-handler.js","../../../../summary-tabs/packages/summary-grid-helper/src/rsa-preview.js","../../../../summary-tabs/packages/summary-grid-helper/src/hovering-helper.js","../../../../summary-tabs/packages/summary-grid-helper/src/url-filter.js","../../../../summary-tabs/packages/summary-grid-helper/src/date-utils.js","../../../../summary-tabs/packages/summary-grid-helper/src/preference-validator.js","../../../../survey/packages/survey-core/src/survey-status.js","../../../../survey/packages/survey-core/src/survey-preference-service.js","../../../../survey/packages/survey-core/src/base-survey.js","../../../../survey/packages/survey-factory-tools/src/survey.types.ts","../../../../survey/packages/survey-factory-tools/src/survey-construction/validator/validator.ts","../../../../survey/packages/survey-factory-tools/src/survey-construction/configurator/question.tsx","../../../../survey/packages/survey-context/src/survey-context.ts","../../../../survey/packages/survey-factory-tools/src/styles.ts","../../../../survey/packages/survey-factory-tools/src/survey-construction/view/page/header.tsx","../../../../survey/packages/survey-factory-tools/src/survey-construction/view/page/footer.tsx","../../../../survey/packages/survey-factory-tools/src/survey-construction/view/page/page.tsx","../../../../survey/packages/survey-factory-tools/src/survey-construction/view/question/common.tsx","../../../../survey/packages/survey-factory-tools/src/survey-construction/view/question/option.tsx","../../../../survey/packages/survey-factory-tools/src/utility.ts","../../../../survey/packages/survey-factory-tools/src/survey-construction/view/question/title.tsx","../../../../survey/packages/survey-factory-tools/src/survey-construction/view/question/single-selection.tsx","../../../../survey/packages/survey-factory-tools/src/survey-construction/view/question/multiple-selection.tsx","../../../../survey/packages/survey-factory-tools/src/survey-construction/view/question/rating.tsx","../../../../survey/packages/survey-factory-tools/src/survey-construction/view/question/email.tsx","../../../../survey/packages/survey-factory-tools/src/survey-construction/view/question/comment.tsx","../../../../survey/packages/survey-factory-tools/src/survey-construction/validator/comment.ts","../../../../survey/packages/survey-factory-tools/src/survey-construction/configurator/comment.tsx","../../../../survey/packages/survey-factory-tools/src/survey-construction/validator/single-selection.ts","../../../../survey/packages/survey-factory-tools/src/survey-construction/validator/email.ts","../../../../survey/packages/survey-factory-tools/src/survey-construction/configurator/email.tsx","../../../../survey/packages/survey-factory-tools/src/survey-construction/validator/multiple-selection.ts","../../../../survey/packages/survey-factory-tools/src/survey-construction/configurator/multiple-selection.tsx","../../../../survey/packages/survey-factory-tools/src/survey-construction/configurator/single-selection.tsx","../../../../survey/packages/survey-factory-tools/src/survey-construction/configurator/rating.tsx","../../../../survey/packages/survey-factory-tools/src/survey-construction/configurator/page.tsx","../../../../survey/packages/survey-factory-tools/src/survey-construction/configurator/survey.tsx","../../../../survey/packages/survey-factory-tools/src/survey-construction/view/survey.tsx","../../../../survey/packages/survey-factory-tools/src/survey-factory.tsx","../../../../survey/packages/survey-core/src/webui-user-survey/factory-view.js","../../../../survey/packages/survey-core/src/webui-user-survey/styles.js","../../../../survey/packages/survey-core/src/webui-user-survey/view.js","../../../../survey/packages/survey-core/src/webui-user-survey/index.js","../../../../survey/packages/survey-core/src/copilot-asset-recommendation-satisfaction-survey/factory-view.js","../../../../survey/packages/survey-core/src/copilot-asset-recommendation-satisfaction-survey/view.js","../../../../survey/packages/survey-core/src/utils.js","../../../../survey/packages/survey-core/src/copilot-asset-recommendation-satisfaction-survey/index.js","../../../../survey/packages/survey-core/src/esc-webui-user-survey/factory-view.js","../../../../survey/packages/survey-core/src/esc-webui-user-survey/view.js","../../../../survey/packages/survey-core/src/esc-webui-user-survey/index.js","../../../../survey/packages/survey-core/src/esc-webui-user-pause-campaign-survey/factory-view.js","../../../../survey/packages/survey-core/src/esc-webui-user-pause-campaign-survey/view.js","../../../../survey/packages/survey-core/src/esc-webui-user-pause-campaign-survey/index.js","../../../../survey/packages/survey-core/src/esc-webui-campaign-feedback-survey/factory-view.js","../../../../survey/packages/survey-core/src/esc-webui-campaign-feedback-survey/view.js","../../../../survey/packages/survey-core/src/esc-webui-campaign-feedback-survey/index.js","../../../../survey/packages/survey-core/src/esc-webui-automated-ad-deletion-survey/factory-view.js","../../../../survey/packages/survey-core/src/esc-webui-automated-ad-deletion-survey/view.js","../../../../survey/packages/survey-core/src/esc-webui-automated-ad-deletion-survey/index.js","../../../../survey/packages/survey-core/src/adinsight-recommendation-survey/factory-view.js","../../../../survey/packages/survey-core/src/adinsight-recommendation-survey/index.js","../../../../survey/packages/survey-core/src/adinsight-recommendation-mcc-survey/factory-view.js","../../../../survey/packages/survey-core/src/adinsight-recommendation-mcc-survey/index.js","../../../../survey/packages/survey-core/src/esc-webui-user-cancel-signup-survey/factory-view.js","../../../../survey/packages/survey-core/src/esc-webui-user-cancel-signup-survey/view.js","../../../../survey/packages/survey-core/src/esc-webui-user-cancel-signup-survey/index.js","../../../../survey/packages/survey-core/src/mcm-webui-opt-out-survey/factory-view.js","../../../../survey/packages/survey-core/src/mcm-webui-opt-out-survey/view.js","../../../../survey/packages/survey-core/src/mcm-webui-opt-out-survey/index.js","../../../../survey/packages/survey-core/src/mcm-webui-mandatory-opt-out-survey/factory-view.js","../../../../survey/packages/survey-core/src/mcm-webui-mandatory-opt-out-survey/view.js","../../../../survey/packages/survey-core/src/mcm-webui-mandatory-opt-out-survey/index.js","../../../../survey/packages/survey-core/src/asset-library-app-survey/factory-view.js","../../../../survey/packages/survey-core/src/asset-library-app-survey/view.js","../../../../survey/packages/survey-core/src/asset-library-app-survey/index.js","../../../../survey/packages/survey-core/src/asset-library-picker-survey/factory-view.js","../../../../survey/packages/survey-core/src/asset-library-picker-survey/view.js","../../../../survey/packages/survey-core/src/asset-library-picker-survey/index.js","../../../../survey/packages/survey-core/src/asset-library-aigc-survey/factory-view.js","../../../../survey/packages/survey-core/src/asset-library-aigc-survey/view.js","../../../../survey/packages/survey-core/src/asset-library-aigc-survey/index.js","../../../../survey/packages/survey-core/src/reporting-webui-user-survey/factory-view.js","../../../../survey/packages/survey-core/src/reporting-webui-user-survey/view.js","../../../../survey/packages/survey-core/src/reporting-webui-user-survey/index.js","../../../../survey/packages/survey-core/src/rsa-llm-overall-survey/factory-view.js","../../../../survey/packages/survey-core/src/rsa-llm-overall-survey/index.js","../../../../survey/packages/survey-core/src/rsa-llm-most-wanted-survey/factory-view.js","../../../../survey/packages/survey-core/src/rsa-llm-most-wanted-survey/index.js","../../../../survey/packages/survey-core/src/campaign-onboarding-survey/factory-view.js","../../../../survey/packages/survey-core/src/campaign-onboarding-survey/view.js","../../../../survey/packages/survey-core/src/campaign-onboarding-survey/index.js","../../../../survey/packages/survey-core/src/transparent-image-annotation-survey/factory-view.js","../../../../survey/packages/survey-core/src/transparent-image-annotation-survey/view.js","../../../../survey/packages/survey-core/src/transparent-image-annotation-survey/index.js","../../../../survey/packages/survey-core/src/budget-center-overall-satisfaction-survey/factory-view.js","../../../../survey/packages/survey-core/src/budget-center-overall-satisfaction-survey/view.js","../../../../survey/packages/survey-core/src/budget-center-overall-satisfaction-survey/index.js","../../../../survey/packages/survey-core/src/constants.js","../../../../survey/packages/survey-core/src/budget-center-one-time-user-survey/factory-view.js","../../../../survey/packages/survey-core/src/budget-center-one-time-user-survey/view.js","../../../../survey/packages/survey-core/src/budget-center-one-time-user-survey/index.js","../../../../survey/packages/survey-core/src/ads-studio-app-survey/factory-view.js","../../../../survey/packages/survey-core/src/ads-studio-app-survey/view.js","../../../../survey/packages/survey-core/src/ads-studio-app-survey/index.js","../../../../survey/packages/survey-manager/src/survey-list.js","../../../../survey/packages/survey-data-service/src/survey-data-source.js","../../../../survey/packages/survey-data-service/src/survey-data-service.js","../../../../survey/packages/survey-manager/src/survey-container.js","../../../../survey/packages/survey-manager/src/util.js","../../../../survey/packages/survey-manager/src/survey-manager.js","../../../../survey/packages/survey-manager/src/setup.js","../../../../target-recommendation/packages/recommendation-repository/src/util/locationRecommendationConverter.js","../../../../target-recommendation/packages/recommendation-repository/src/get.js","../../../../target-recommendation/packages/recommendation-repository/src/util/adoptRecommendations.js","../../../../target-recommendation/packages/recommendation-repository/src/apply.js","../../../../target-recommendation/packages/recommendation-repository/src/dismiss.js","../../sub-page-menu-container/src/default-sub-page-menu-loader.js","../../sub-page-menu-container/src/experiment-sub-page-menu-loader.js","../../sub-page-menu-container/src/hotel-center-sub-page-menu-loader.js","../../sub-page-menu-container/src/hotel-center-v2-sub-page-menu-loader.js","../../sub-page-menu-container/src/mmc-sub-page-menu-loader.js","../../sub-page-menu-container/src/recommendation-sub-page-menu-loader.js","../../sub-page-menu-container/src/uet-tag-sub-page-menu.js","../../sub-page-menu-container/src/budget-center-sub-page-menu-loader.js","../../sub-page-menu-container/src/sub-page-menu-container.js","../../sub-page-menu-container/src/budget-center-sub-page-menu.js","../../sub-page-menu-container/src/styles/budget-center-sub-page-style.js","../../sub-page-menu-container/src/experiment-sub-page-menu.js","../../sub-page-menu-container/src/recommendation-sub-page-menu.js","../../sub-page-menu/src/components/disabled-date-picker.js","../../sub-page-menu/src/styles/tab-bar-styles.js","../../sub-page-menu/src/components/tab-bar.js","../../sub-page-menu/src/components/date-picker.js","../../sub-page-menu/src/components/history-button.js","../../sub-page-menu/src/styles/history-button-styles.js","../../sub-page-menu/src/components/auto-apply-button.js","../../sub-page-menu/src/styles/auto-apply-button-styles.js","../../sub-page-menu/src/sub-page-menu.js","../../sub-page-menu/src/common/router-helper.js","../../sub-page-menu/src/styles/sub-page-menu-styles.js","../../sub-tab-container/src/default-sub-tab-loader.js","../../sub-tab-container/src/utils.js","../../sub-tab-container/src/sub-tab-container.js","../../summary-bar-container/src/campaign-summary-bar-loader.js","../../summary-bar-container/src/shared-budget-summary-bar-loader.js","../../summary-bar-container/src/accounts-summary-bar-loader.js","../../summary-bar-container/src/simple-summary-bar-loader.js","../../summary-bar-container/src/general-summary-bar-loader.js","../../summary-bar-container/src/site-exclusion-list-linked-page-loader.js","../../summary-bar-container/src/negative-keywords-list-details-summary-bar-loader.js","../../summary-bar-container/src/portfolio-details-summary-bar-loader.js","../../summary-bar-container/src/merchant-center-summary-bar-loader.js","../../summary-bar-container/src/query-insights-summary-bar-loader.js","../../summary-bar-container/src/web-insights-editor.js","../../summary-bar-container/src/uet-dashboard-summary-bar-loader.js","../../summary-bar-container/styles/summary-bar-style.js","../../summary-bar-container/src/asset-library-summary-bar-loader.js","../../summary-bar-container/src/ad-studio-summary-bar-loader.js","../../summary-bar-container/src/pmax-asset-details-summary-bar-loader.js","../../summary-bar-container/src/budget-center-summary-bar-loader.js","../../summary-bar-container/src/hotel-center-v2-summary-bar-loader.js","../../summary-bar-container/src/ad-editor-summary-bar-loader.js","../../summary-bar-container/src/general-summary-bar-configs/bulk-edit-detail.js","../../summary-bar-container/src/general-summary-bar-configs/rule-detail.js","../../summary-bar-container/src/general-summary-bar-configs/scripts-detail.js","../../summary-bar-container/src/general-summary-bar-configs/bulk-uploads-build-spreadsheet.js","../../summary-bar-container/src/brand-lists-details-page-loader.js","../../summary-bar-container/src/summary-bar-container.js","../../summary-bar/src/ad-summary-bar.js","../../summary-bar/src/ad-group-summary-bar.js","../../summary-bar/src/campaign-summary-bar.js","../../summary-bar/src/experiment-ad-group-summary-bar.js","../../summary-bar/src/experiment-campaign-summary-bar.js","../../summary-bar/src/summary-bar.js","../../summary-bar/src/summary-bar-with-scope.js","../../summary-bar/src/components/simple-breadcrumb.js","../../summary-bar/src/accounts-summary-bar.js","../../summary-bar/src/simple-summary-bar.js","../../summary-bar/src/shared-budget-summary-bar.js","../../summary-bar/src/helpers/merchant-center-config.js","../../summary-bar/src/merchant-center-summary-bar.js","../../summary-bar/src/query-insights-summary-bar.js","../../summary-bar/src/global-menu-entity-bar.js","../../summary-bar/src/asset-library-summary-bar.js","../../summary-bar/src/styles/asset-library-summary-bar-style.js","../../summary-bar/src/ad-studio-summary-bar.js","../../summary-bar/src/styles/ad-studio-summary-bar-style.js","../../summary-bar/src/pmax-asset-details-summary-bar.js","../../summary-bar/src/budget-center-summary-bar.js","../../summary-bar/src/components/summary-bar-breadcrumb.js","../../summary-bar/src/components/editable-item.js","../../summary-bar/src/components/summary-bar-factory.js","../../summary-bar/src/components/overflow-entity-item.js","../../summary-bar/src/components/summary-bar-items-resize-group.js","../../summary-bar/src/components/overflow-sub-menu.js","../../summary-bar/src/components/summary-bar-items.js","../../summary-bar/src/helpers/entity-converter.js","../../summary-bar/src/helpers/campaign-types.js","../../summary-bar/src/helpers/router-helper.js","../../summary-bar/src/helpers/summary-bar-scopes.js","../../summary-bar/src/helpers/settings-item.js","../../summary-bar/src/helpers/criteria-items-content.js","../../summary-bar/src/helpers/repository-consumer.js","../../summary-bar/src/editors/campaign-budget/budget-not-editable.js","../../summary-bar/src/editors/campaign-budget/budget-landscape-legacy-strings.js","../../summary-bar/src/editors/campaign-budget/budget-landscape-table.js","../../summary-bar/src/editors/campaign-budget/budget-landscape.js","../../summary-bar/src/editors/base-editor.js","../../summary-bar/src/editors/budget-base-component.js","../../summary-bar/src/editors/campaign-budget/inline-budget-editor.js","../../summary-bar/src/editors/shared-budget-editor.js","../../summary-bar/src/editors/campaign-budget/shared-budget-editor.js","../../summary-bar/src/editors/campaign-budget/index.js","../../summary-bar/src/editors/adgroup-bid-editor.js","../../summary-bar/src/editors/experiment-campaign/base-date-editor.js","../../summary-bar/src/editors/experiment-campaign/start-date.js","../../summary-bar/src/editors/experiment-campaign/end-date.js","../../summary-bar/src/components/optimization-score-item.js","../../summary-bar/src/components/navigation-item.js","../../summary-bar/src/helpers/entity-items-config.js","../../summary-bar/src/helpers/repository-error-handler.js","../../summary-bar/src/helpers/server-error-mapping.js","../../summary-bar/src/helpers/breadcrumb-item-converter.js","../../summary-bar/src/helpers/shared-budget-consumer.js","../../summary-bar/src/repository/campaign-repository.js","../../summary-bar/src/repository/ad-group-repository.js","../../summary-bar/src/repository/experiment-repository.js","../../summary-bar/src/repository/shared-budget-repository.js","../../summary-bar/src/repository/campaign-criterion-repository.js","../../summary-bar/src/repository/ad-group-criterion-repository.js","../../summary-bar/src/repository/campaign-audience-repository.js","../../summary-bar/src/repository/ad-group-audience-repository.js","../../summary-bar/src/repository/bulk-update-repository.js","../../summary-bar/src/repository/patch-experiment-repository.js","../../summary-bar/src/repository/optimization-score-repository.js","../../summary-bar/src/styles/base-editor-style.js","../../summary-bar/src/styles/summary-bar-style.js","../../summary-bar/src/styles/budget-editor-style.js","../../summary-bar/src/styles/bid-editor-style.js","../../summary-bar/src/styles/date-editor-style.js","../../summary-bar/src/styles/simple-summary-bar-style.js","../../summary-bar/src/styles/budget-center-summary-bar-style.js","../../toolbar-container/src/with-toggle-chart.js","../../toolbar-container/src/label-style.js","../../toolbar-container/src/toolbar-container.js","../../toolbar-container/src/global-styles.js","../../../../summary-tabs/packages/campaigns-date-picker/src/template.pug","../../../../summary-tabs/packages/labels/src/column/labels-column-header-template.pug","../../../../summary-tabs/packages/labels/src/column/labels-column-template.pug","../../../../summary-tabs/packages/labels/src/popup/template.pug","../../../../summary-tabs/packages/labels/src/selector/create-template.pug","../../../../summary-tabs/packages/labels/src/selector/row.checked.pug","../../../../summary-tabs/packages/labels/src/selector/template.pug","../../../../summary-tabs/packages/labels/src/shared/label-name-template.pug","../../../../summary-tabs/packages/summary-grid-helper/template/customized-inline-edit-template.pug","../../../../summary-tabs/packages/summary-grid-helper/template/sortableHeader.pug"],"sourcesContent":["import _ from 'underscore';\r\nimport { CampaignType } from '@bingads-webui-campaign/campaign-ui-common';\r\n\r\nlet biddingSchemeInLastBuilder;\r\n\r\nexport const BidColumnId = {\r\n CPC: 0,\r\n CPV: 1,\r\n CPM: 2,\r\n PercentCpc: 3,\r\n CommissionRate: 4,\r\n ManualCPA: 5,\r\n};\r\n\r\nconst allBidColumnIds = _.values(BidColumnId);\r\n\r\nexport const getBiddingSchemeType = ({ currentCampaign }) => {\r\n if (currentCampaign && currentCampaign.BiddingScheme && currentCampaign.BiddingScheme.Type) {\r\n return currentCampaign.BiddingScheme.Type;\r\n }\r\n return null;\r\n};\r\n\r\nconst getBidColumnIdByBidStrategyType = ({ bidStrategyType }) => {\r\n const bidStrategyAndColumnMap = {\r\n ManualCpc: BidColumnId.CPC,\r\n ManualCpa: BidColumnId.ManualCPA,\r\n ManualCpv: BidColumnId.CPV,\r\n ManualCpm: BidColumnId.CPM,\r\n EnhancedCpc: BidColumnId.CPC,\r\n MaxClicks: BidColumnId.CPC,\r\n MaxConversions: BidColumnId.CPC,\r\n TargetCpa: BidColumnId.CPC,\r\n TargetRoas: BidColumnId.CPC,\r\n MaxConversionValue: BidColumnId.CPC,\r\n TargetImpressionShare: BidColumnId.CPC,\r\n Commission: BidColumnId.CommissionRate,\r\n PercentCpc: BidColumnId.PercentCpc,\r\n };\r\n\r\n return bidStrategyAndColumnMap[bidStrategyType];\r\n};\r\n\r\nexport const isBiddingSchemeUpdated = ({\r\n campaignId,\r\n currentCampaign,\r\n}) => {\r\n if (!campaignId) { return false; }\r\n const biddingSchemeInCurrentBuilder = getBiddingSchemeType({ currentCampaign });\r\n if (biddingSchemeInCurrentBuilder !== biddingSchemeInLastBuilder) {\r\n biddingSchemeInLastBuilder = biddingSchemeInCurrentBuilder;\r\n return true;\r\n }\r\n return false;\r\n};\r\n\r\nexport const getCurrentCampaignType = ({\r\n currentCampaign,\r\n campaignId,\r\n config,\r\n}) => {\r\n if (campaignId) {\r\n return _.result(currentCampaign || config.get('CurrentCampaign'), 'CampaignType', null);\r\n }\r\n return null;\r\n};\r\n\r\nexport const getWhitelist = ({\r\n currentCampaign,\r\n campaignId,\r\n IsVideoAdsForCampaignEnabled,\r\n IsManualCpmEnabled,\r\n IsHotelCampaignEnabled,\r\n config,\r\n getCurrentCampaignType: _getCurrentCampaignType,\r\n globalCampaignTypeFilter,\r\n}) => {\r\n const currentCampaignType = _getCurrentCampaignType({\r\n currentCampaign,\r\n campaignId,\r\n config,\r\n });\r\n const isAccountOrAudience = !campaignId &&\r\n (\r\n globalCampaignTypeFilter === CampaignType.Audience ||\r\n globalCampaignTypeFilter === CampaignType.All\r\n );\r\n const isAccountOrHotel = !campaignId &&\r\n (\r\n globalCampaignTypeFilter === CampaignType.Hotel ||\r\n globalCampaignTypeFilter === CampaignType.All\r\n );\r\n\r\n return _.intersection([\r\n (currentCampaignType !== CampaignType.Shopping && currentCampaignType !== 'Shopping') && BidColumnId.CPC,\r\n (currentCampaignType === CampaignType.Audience || currentCampaignType === 'Audience' || isAccountOrAudience) && IsVideoAdsForCampaignEnabled && BidColumnId.CPV,\r\n (currentCampaignType === CampaignType.Audience || currentCampaignType === 'Audience' || isAccountOrAudience) && IsManualCpmEnabled && BidColumnId.CPM,\r\n (currentCampaignType === CampaignType.Hotel || currentCampaignType === 'Hotel' || isAccountOrHotel) && IsHotelCampaignEnabled && BidColumnId.PercentCpc,\r\n (currentCampaignType === CampaignType.Hotel || currentCampaignType === 'Hotel' || isAccountOrHotel) && IsHotelCampaignEnabled && BidColumnId.CommissionRate,\r\n ], allBidColumnIds);\r\n};\r\n\r\n/**\r\n * Processor getter.\r\n * @param {string[]} lockedColumns\r\n * columns we should not add to preference proactively.\r\n * if those columns can be found in the old column set, we won't remove them neither.\r\n * @returns {Function} - colums processer.\r\n */\r\nexport const columnProcessorBeforeSetRecordGetter = lockedColumns =>\r\n /**\r\n * For Adgroup grid in all level, we'll ignore any changes in lockedColumns.\r\n * Like SearchBid, CpvBid, etc.\r\n * We'll pass this as config to plugin and do the process right before every record saving.\r\n * @param {string[]} allBidColumns - columns user selected for save.\r\n * @param {string[]} oldColumns - columns saved in old record if existed.\r\n * @returns {Array} - colums processed.\r\n */\r\n (newColumns, oldColumns = []) => {\r\n if (oldColumns.length === 0) {\r\n return _.without(newColumns, ...lockedColumns);\r\n }\r\n const oldExistColumns = _.intersection(oldColumns, lockedColumns);\r\n const columnsToRemove = _.without(lockedColumns, ...oldExistColumns);\r\n return _.without(newColumns, ...columnsToRemove);\r\n };\r\n\r\nexport const filterInvisibleBidColumns = ({\r\n bidColumns,\r\n currentCampaign,\r\n campaignId,\r\n IsVideoAdsForCampaignEnabled,\r\n IsManualCpmEnabled,\r\n IsHotelCampaignEnabled,\r\n config,\r\n globalCampaignTypeFilter,\r\n}) => {\r\n const whitelist = getWhitelist({\r\n currentCampaign,\r\n campaignId,\r\n IsVideoAdsForCampaignEnabled,\r\n IsManualCpmEnabled,\r\n IsHotelCampaignEnabled,\r\n config,\r\n getCurrentCampaignType,\r\n globalCampaignTypeFilter,\r\n });\r\n\r\n return _.intersection(bidColumns, whitelist);\r\n};\r\n\r\nexport const getLockedBidColumnIds = ({\r\n campaignId,\r\n currentCampaign,\r\n IsVideoAdsForCampaignEnabled,\r\n IsManualCpmEnabled,\r\n IsHotelCampaignEnabled,\r\n config,\r\n globalCampaignTypeFilter,\r\n}) => {\r\n let result = [];\r\n if (IsVideoAdsForCampaignEnabled || IsManualCpmEnabled || IsHotelCampaignEnabled) {\r\n if (!campaignId) { // account level\r\n result = result.concat(allBidColumnIds);\r\n } else {\r\n const bidStrategyType = getBiddingSchemeType({ currentCampaign });\r\n result.push(getBidColumnIdByBidStrategyType({\r\n bidStrategyType,\r\n }));\r\n }\r\n }\r\n\r\n const filteredResult = filterInvisibleBidColumns({\r\n bidColumns: result,\r\n campaignId,\r\n currentCampaign,\r\n IsVideoAdsForCampaignEnabled,\r\n IsManualCpmEnabled,\r\n IsHotelCampaignEnabled,\r\n config,\r\n globalCampaignTypeFilter,\r\n });\r\n\r\n return filteredResult;\r\n};\r\n\r\nexport const getUnlockedBidColumnIds = ({\r\n campaignId,\r\n currentCampaign,\r\n IsVideoAdsForCampaignEnabled,\r\n IsManualCpmEnabled,\r\n IsHotelCampaignEnabled,\r\n config,\r\n globalCampaignTypeFilter,\r\n}) => {\r\n const lockedBidColumns = getLockedBidColumnIds({\r\n campaignId,\r\n currentCampaign,\r\n IsVideoAdsForCampaignEnabled,\r\n IsManualCpmEnabled,\r\n IsHotelCampaignEnabled,\r\n config,\r\n globalCampaignTypeFilter,\r\n });\r\n\r\n const filteredResult = filterInvisibleBidColumns({\r\n bidColumns: _.without(allBidColumnIds, ...lockedBidColumns),\r\n campaignId,\r\n currentCampaign,\r\n IsVideoAdsForCampaignEnabled,\r\n IsManualCpmEnabled,\r\n IsHotelCampaignEnabled,\r\n config,\r\n globalCampaignTypeFilter,\r\n });\r\n\r\n return filteredResult;\r\n};\r\n\r\nexport const getLockedBidColumns = ({\r\n campaignId,\r\n currentCampaign,\r\n allBidColumns,\r\n IsVideoAdsForCampaignEnabled,\r\n IsManualCpmEnabled,\r\n IsHotelCampaignEnabled,\r\n config,\r\n globalCampaignTypeFilter,\r\n}) => {\r\n const ids = getLockedBidColumnIds({\r\n campaignId,\r\n currentCampaign,\r\n IsVideoAdsForCampaignEnabled,\r\n IsManualCpmEnabled,\r\n IsHotelCampaignEnabled,\r\n config,\r\n globalCampaignTypeFilter,\r\n });\r\n\r\n return _.map(ids, value => allBidColumns[value]);\r\n};\r\n\r\nexport const getUnlockedBidColumns = ({\r\n campaignId,\r\n currentCampaign,\r\n allBidColumns,\r\n IsVideoAdsForCampaignEnabled,\r\n IsManualCpmEnabled,\r\n config,\r\n globalCampaignTypeFilter,\r\n}) => {\r\n const ids = getUnlockedBidColumnIds({\r\n campaignId,\r\n currentCampaign,\r\n IsVideoAdsForCampaignEnabled,\r\n IsManualCpmEnabled,\r\n config,\r\n globalCampaignTypeFilter,\r\n });\r\n\r\n return _.map(ids, value => allBidColumns[value]);\r\n};\r\n\r\nexport const getSelectedBidColumns = ({\r\n allBidColumns,\r\n IsVideoAdsForCampaignEnabled,\r\n IsManualCpmEnabled,\r\n}) => {\r\n if (!IsVideoAdsForCampaignEnabled && !IsManualCpmEnabled) {\r\n return [allBidColumns[BidColumnId.CPC]];\r\n }\r\n return [];\r\n};\r\n","import _ from 'underscore';\r\nimport { DeterministicView } from '@bingads-webui/deterministic-view';\r\nimport { DatePicker } from '@bingads-webui/date-picker';\r\nimport CampaignsDatePickerTemplate from './template.pug';\r\n\r\nclass ExtendedDatePicker extends DatePicker {\r\n renderTrunk() {\r\n super.renderTrunk();\r\n\r\n const { isNodateSelected } = this.getState();\r\n\r\n if (isNodateSelected) {\r\n this.datePicker.enable(false);\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * @typedef {Object} CampaignsDatePickerState\r\n * @property {Date} selectedDate current selected date.\r\n * @property {Boolean} allowNoDate allow empty value.\r\n * If true radio buttons are added to choose if no date is selected.\r\n * @property {String} noDateLabel label for no date option.\r\n * @property {String} dateLabel label for the date option.\r\n */\r\n\r\n/**\r\n * dateChanged event - When date is changed, it fires with the new date object.\r\n *\r\n * @event CampaignsDatePicker#dateChanged\r\n * @type {Date}\r\n */\r\n\r\n/**\r\n * Date picker control used to select dates.\r\n * This has optional radio buttons to select no date.\r\n *\r\n * @fires CampaignsDatePicker#dateChanged\r\n */\r\nexport class CampaignsDatePicker extends DeterministicView {\r\n /**\r\n * Initialize the view.\r\n * @param {Date} minDate- The minimum date that can be selected.\r\n * @param {Date} maxDate - The maximum date that can be selected.\r\n * @param {Date} selectedDate initial selected date.\r\n * @param {Boolean} allowNoDate allow empty value.\r\n * @param {String} noDateLabel label for no date option.\r\n * @param {String} dateLabel label for the date option.\r\n * @param {String} noDateGroupAriaLabel aria-label for no date group.\r\n * @param {String} datePickerAriaLabel aria-label for the date option.\r\n * @returns {undefined}\r\n */\r\n initialize({\r\n minDate,\r\n maxDate,\r\n selectedDate,\r\n allowNoDate,\r\n noDateLabel,\r\n dateLabel,\r\n noDateGroupAriaLabel,\r\n datePickerAriaLabel,\r\n }) {\r\n const isDateValid = !isNaN(new Date(selectedDate)); // eslint-disable-line\r\n // If we have no date radio option and initial date is not set,\r\n // we default to choose no date option\r\n const isNodateSelected = !isDateValid && allowNoDate;\r\n const datePicker = new ExtendedDatePicker({\r\n minDate, maxDate, selectedDate, ariaLabel: datePickerAriaLabel,\r\n });\r\n const datePickerInput = datePicker.$('.date-picker-component.k-input');\r\n datePickerInput.addClass('clickable');\r\n datePickerInput.attr('aria-label', datePickerAriaLabel);\r\n\r\n this.setChild('date-picker', datePicker);\r\n this.setState({\r\n selectedDate,\r\n allowNoDate,\r\n noDateLabel,\r\n dateLabel,\r\n isNodateSelected,\r\n noDateGroupAriaLabel,\r\n datePickerAriaLabel,\r\n });\r\n this.listenTo(datePicker, 'dateChanged', () => {\r\n this.trigger('dateChanged', this.getSelectedDate());\r\n });\r\n }\r\n\r\n /**\r\n * The event hash for the CampaignsDatePicker\r\n * @type {Object}\r\n * @override\r\n */\r\n get events() {\r\n return {\r\n 'click .nodate': () => this.selectNoDateOption(),\r\n 'click .date': () => this.selectDateOption(),\r\n };\r\n }\r\n\r\n /**\r\n * Class name of the root element\r\n * @type {string}\r\n * @override\r\n */\r\n get className() { return 'campaigns-date-picker'; }\r\n\r\n /**\r\n * Template of the CampaignsDatePicker\r\n * @type {TemplateCallback}\r\n * @override\r\n */\r\n get template() { return CampaignsDatePickerTemplate; }\r\n\r\n /**\r\n * Propagate the state to model and children view.\r\n * @param {CampaignsDatePickerState} state - The new state\r\n * @override\r\n * @returns {CampaignsDatePicker} - The view itself\r\n */\r\n setState(state) {\r\n const { selectedDate, isNodateSelected } = state;\r\n this.getChild('date-picker').setState({ selectedDate, isNodateSelected });\r\n this.model.set(state);\r\n return this;\r\n }\r\n\r\n /**\r\n * Collect the state from model and children views.\r\n * @override\r\n * @returns {CampaignsDatePickerState} - The state of the view.\r\n */\r\n getState() {\r\n const state = this.model.attributes;\r\n const { selectedDate } = this.getChild('date-picker').getState();\r\n return _.extend(state, { selectedDate });\r\n }\r\n\r\n /**\r\n * Get selected date.\r\n * @returns {Date} - Selected date.\r\n */\r\n getSelectedDate() {\r\n return this.getChild('date-picker').getDate();\r\n }\r\n\r\n /**\r\n * No date radio button is selected.\r\n * Clear the date input. And disable the date picker.\r\n * @returns {undefined}\r\n */\r\n selectNoDateOption() {\r\n const originalDate = this.getSelectedDate();\r\n this.setState({ selectedDate: undefined, isNodateSelected: true });\r\n if (originalDate) {\r\n this.trigger('dateChanged', this.getSelectedDate());\r\n }\r\n }\r\n\r\n /**\r\n * Date radio button is selected.\r\n * Enable date picker.\r\n * @returns {undefined}\r\n */\r\n selectDateOption() {\r\n this.setState({ selectedDate: undefined, isNodateSelected: false });\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { CampaignuiBaseColumn } from '@bingads-webui-campaign/campaignui-base-column';\r\nimport { toHex, contrastColor } from '@bingads-webui-universal/primitive-utilities';\r\nimport template from './labels-column-template.pug';\r\nimport headerTemplate from './labels-column-header-template.pug';\r\n\r\nexport class LabelsColumn extends CampaignuiBaseColumn {\r\n constructor(options) {\r\n const title = options.i18n.getString('ColumnName_Labels');\r\n const isMCCLabelEnabled = options.permissions ?\r\n options.permissions.IsAccountLabelsEnabled : false;\r\n\r\n super({\r\n name: 'Labels',\r\n property: 'Labels',\r\n title,\r\n type: 'array',\r\n helpId: 'pop_BA_CampaignGrids_Labels',\r\n helpAriaLabel: options.i18n.getString('Click to learn more about {{item}}', { item: title }),\r\n headerTemplate: isMCCLabelEnabled ?\r\n (args => headerTemplate({ i18n: options.i18n, ...args })) : undefined,\r\n });\r\n this.i18n = options.i18n;\r\n this.isMCCLabelEnabled = isMCCLabelEnabled;\r\n }\r\n\r\n pickProperty(item) {\r\n const { $total, Labels } = item;\r\n return {\r\n isAggregateRow: !_.isUndefined($total),\r\n labels: Labels,\r\n };\r\n }\r\n\r\n template({ value }) {\r\n const { isAggregateRow, labels } = value;\r\n const maxLabelsToShow = 2;\r\n const labelsLength = _.isEmpty(labels) ? 0 : labels.length;\r\n const labelsCountToShow = _.min([labelsLength, maxLabelsToShow]);\r\n const labelsToUse = [];\r\n\r\n for (let i = 0; i < labelsCountToShow; i += 1) {\r\n const label = labels[i];\r\n const title = _.isEmpty(label.Description) ?\r\n label.Name :\r\n this.i18n.getString('label_tooltip_format').replace('{0}', label.Name).replace('{1}', label.Description);\r\n\r\n labelsToUse.push(_.extend(\r\n _.pick(label, 'Id', 'Name', 'Scope'),\r\n {\r\n labelColor: toHex(label.ColorCode),\r\n contractColor: toHex(contrastColor(label.ColorCode)),\r\n title,\r\n }\r\n ));\r\n }\r\n\r\n return template({\r\n Labels: labelsToUse,\r\n ShowViewMoreLink: labelsLength > maxLabelsToShow,\r\n TotalLength: labelsLength,\r\n IsAggregateRow: isAggregateRow,\r\n i18n: this.i18n,\r\n isMCCLabelEnabled: this.isMCCLabelEnabled,\r\n });\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { DeterministicView } from '@bingads-webui/deterministic-view';\r\nimport { toHex, contrastColor } from '@bingads-webui-universal/primitive-utilities';\r\n\r\nimport template from './template.pug';\r\n\r\nexport class LabelsPopupContentView extends DeterministicView {\r\n/**\r\n *\r\n * @param {object} options the option.\r\n * @param {object} target the target that the popover will show for.\r\n * @param {Object} position the position that popover view will show besides the target.\r\n * @param {String} containerClassName the class name for popover view.\r\n *\r\n * @return {Void} void\r\n */\r\n initialize({\r\n labels = [],\r\n i18n,\r\n entityType,\r\n entityName,\r\n isMCCLabelEnabled,\r\n }) {\r\n this.options = {\r\n labels,\r\n i18n,\r\n entityType,\r\n entityName,\r\n isMCCLabelEnabled,\r\n };\r\n\r\n super.initialize(this.options);\r\n }\r\n\r\n getAction(event) {\r\n const action = {\r\n name: event.currentTarget.attributes['data-action'].value,\r\n };\r\n return action;\r\n }\r\n\r\n onAction(event) {\r\n this.trigger('remove', this.getAction(event));\r\n }\r\n\r\n onLabelCellItemClicked(event) {\r\n const action = {\r\n event,\r\n ...this.getAction(event),\r\n };\r\n this.trigger('remove', action);\r\n }\r\n\r\n tooltip(i18n, label) {\r\n return _.isEmpty(label.Description) ?\r\n label.Name :\r\n i18n.getString('label_tooltip_format').replace('{0}', label.Name).replace('{1}', label.Description);\r\n }\r\n\r\n backgroundColor(label) {\r\n return `#${toHex(label.ColorCode)}`;\r\n }\r\n\r\n textColor(label) {\r\n return `#${toHex(contrastColor(label.ColorCode))}`;\r\n }\r\n\r\n get template() {\r\n return () => template(_.extendOwn({\r\n backgroundColor: this.backgroundColor,\r\n textColor: this.textColor,\r\n tooltip: this.tooltip,\r\n }, this.options));\r\n }\r\n\r\n events() {\r\n return {\r\n 'click .action': this.onAction,\r\n 'click .labels-cell-item': this.onLabelCellItemClicked,\r\n };\r\n }\r\n}\r\n\r\n","import _ from 'underscore';\r\n\r\nfunction createFilterQuery(labels, containsAll, isMCCLabelEnabled) {\r\n const labelIds = isMCCLabelEnabled ? _.map(labels, label => JSON.stringify(_.pick(label, 'Id', 'Scope'))) : _.pluck(labels, 'Id');\r\n const query = containsAll ?\r\n {\r\n Labels: {\r\n $containsall: labelIds,\r\n },\r\n } :\r\n {\r\n Labels: {\r\n $containsany: labelIds,\r\n },\r\n };\r\n\r\n return query;\r\n}\r\n\r\nexport function triggerFilter(labels, grid, containsAll, filterService, isMCCLabelEnabled = false) {\r\n // currently in new adgroup grid the filterState is mock\r\n if (filterService) {\r\n const filterQuery = createFilterQuery(labels, containsAll, isMCCLabelEnabled);\r\n return filterService.setEditableFilter(filterQuery);\r\n }\r\n\r\n if (grid && grid.filterState) {\r\n const newFilter = grid.filterState.createFilter({\r\n query: createFilterQuery(labels, containsAll, isMCCLabelEnabled),\r\n });\r\n\r\n return grid.filterState.setFilter(newFilter);\r\n }\r\n\r\n return undefined;\r\n}\r\n\r\n\r\nexport function filterOnLabelClick(event, labels, gridView, filterService, isMCCLabelEnabled) {\r\n if (!isMCCLabelEnabled) {\r\n return undefined;\r\n }\r\n\r\n const dataIdAttr = 'data-id';\r\n const dataScopeAttr = 'data-scope';\r\n const { currentTarget } = event;\r\n const labelId = parseInt(currentTarget.getAttribute(dataIdAttr), 10);\r\n const scope = currentTarget.getAttribute(dataScopeAttr);\r\n const label = labels.find(l => l.Id === labelId && l.Scope === scope);\r\n\r\n if (label) {\r\n return triggerFilter([label], gridView, true, filterService, isMCCLabelEnabled);\r\n }\r\n return undefined;\r\n}\r\n\r\nexport function navigateToManagePage(router) {\r\n router.navigateToRoute('label_manage', {});\r\n}\r\n\r\n","import $ from 'jquery';\r\nimport { showPopup } from '@bingads-webui/automatic-positioning-popover';\r\nimport { LabelsPopupContentView } from './content-view';\r\nimport { triggerFilter, navigateToManagePage, filterOnLabelClick } from './label-filter-util';\r\n\r\n/**\r\n * Show labels content in popup format, and handle the labels click event\r\n *\r\n * @param {Object} param - An object containing these default options for view:\r\n * @param {Object} param.i18n - the localization settings, by default return the provided key\r\n * @param {String} param.entityType - entity type, such as 'campaign'\r\n * @param {String} param.entityName the name of entity to show labels popup\r\n * @param {jQuery} param.anchor - the element as position base for popup position\r\n * @param {Object[]} param.labels - the labels content, in the format of\r\n * {Id, Name, Description}\r\n * @param {Object} param.grid - the projection grid\r\n * @param {Object} param.router - the router\r\n * @param {Object} param.router.navigateToRoute - the route navigate function\r\n * @return {Promise} promise\r\n */\r\nexport function showLabelsPopup({\r\n labels,\r\n entityType,\r\n entityName,\r\n container = $('.grid-and-disclaim-container'),\r\n event,\r\n i18n,\r\n grid,\r\n router,\r\n filterService,\r\n isMCCLabelEnabled,\r\n groupClass = 'grid-group-other',\r\n}) {\r\n const contentView = new LabelsPopupContentView({\r\n i18n,\r\n labels,\r\n entityType,\r\n entityName,\r\n isMCCLabelEnabled,\r\n });\r\n\r\n const popupOptions = {\r\n positioningMethod: 'fit',\r\n positioningOptions: {\r\n threshold: 0.5,\r\n },\r\n classes: ['popup--labels', groupClass],\r\n contentView,\r\n entityType,\r\n entityName,\r\n container,\r\n };\r\n\r\n const {\r\n top, left, height, width,\r\n } = $(event.target)[0].getBoundingClientRect();\r\n\r\n const uiNextVirtualOffset = container.offset();\r\n\r\n popupOptions.positioningOptions.anchorPosition = {\r\n height,\r\n width,\r\n left: left - uiNextVirtualOffset.left,\r\n top: top - uiNextVirtualOffset.top,\r\n };\r\n\r\n\r\n return showPopup(popupOptions).then((action) => {\r\n if (action.name === 'manage') {\r\n return navigateToManagePage(router);\r\n } else if (action.name === 'filter') {\r\n return triggerFilter(labels, grid, true, filterService, isMCCLabelEnabled);\r\n } else if (action.name === 'filterLabel') {\r\n return filterOnLabelClick(action.event, labels, grid, filterService, isMCCLabelEnabled);\r\n }\r\n\r\n return undefined;\r\n });\r\n}\r\n","export const isMCCLevel = scope => !scope || !scope.values || !scope.values.aid;\r\n\r\nexport function getCurrentCustomerLabels($, edmCampaign) {\r\n if (!$ || !$.advertiser || !edmCampaign) {\r\n return undefined;\r\n }\r\n\r\n const cid = $.advertiser.getUrlParameter('cid');\r\n const customer = edmCampaign\r\n .Customers\r\n .$withKey(cid);\r\n\r\n return customer.Labels;\r\n}\r\n\r\nexport function getEntitySet(scope, edm, $, edmCampaign) {\r\n if (isMCCLevel(scope)) {\r\n return getCurrentCustomerLabels($, edmCampaign);\r\n }\r\n\r\n return edm && edm.currentAccount ? edm.currentAccount.Labels : undefined;\r\n}\r\n","/**\r\n * @file This file contains the data management logic of labels selector\r\n */\r\nimport _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport $ from 'jquery';\r\nimport { edmCampaign } from '@bingads-webui/edm-campaign';\r\nimport { Selector } from '@bingads-webui/selector';\r\nimport { getEntitySet, isMCCLevel, getCurrentCustomerLabels } from './get-entity-set';\r\n\r\nconst selectorLoadAction = 'labelsselector/load?';\r\n\r\nclass RequestError extends Error {\r\n constructor(message, responseData) {\r\n super(message);\r\n this.responseData = responseData;\r\n }\r\n}\r\n\r\n// TODO: Remove the workaround after jsdata-odata is fixed\r\n// and no longer translate rejections to a success promise\r\nfunction requestErrorToRejection(result) {\r\n if (result &&\r\n ((result.status && result.status >= 300) ||\r\n (result.statusText && result.statusText === 'error'))) {\r\n throw new RequestError('Request failed', result);\r\n }\r\n return result;\r\n}\r\n\r\nexport function hasCustomerLabel(ids) {\r\n if (!ids) {\r\n return false;\r\n }\r\n return ids.some((id) => {\r\n const parsed = JSON.parse(id);\r\n if (parsed && typeof parsed !== 'object') {\r\n return false;\r\n }\r\n return JSON.parse(id).Scope === 'Customer';\r\n });\r\n}\r\n\r\nfunction getIsCombinedScopeRequest(customerLevelLabelEnabled, scope, ids) {\r\n return (customerLevelLabelEnabled && !isMCCLevel(scope)) || hasCustomerLabel(ids);\r\n}\r\n\r\nfunction load(params, jsdata, edm, scope, isCombinedScopeRequest) {\r\n const result = [];\r\n const cacheResponse = false;\r\n const bypassCache = true;\r\n const headers = {\r\n 'x-ms-refreshcampaigncache': true,\r\n };\r\n\r\n const currentScopeLabels = jsdata.Label\r\n .findAll(params, {\r\n cacheResponse,\r\n bypassCache,\r\n headers,\r\n entitySet: getEntitySet(scope, edm, $, edmCampaign),\r\n }).then(requestErrorToRejection);\r\n\r\n result.push(currentScopeLabels);\r\n\r\n if (isCombinedScopeRequest) {\r\n const customerLabels = jsdata.Label\r\n .findAll({ top: 0, ...params }, {\r\n cacheResponse,\r\n bypassCache,\r\n headers,\r\n entitySet: getCurrentCustomerLabels($, edmCampaign),\r\n }).then(requestErrorToRejection);\r\n result.push(customerLabels);\r\n }\r\n\r\n return result;\r\n}\r\n\r\nexport function getLabelsResult(newData, isCombinedScopeRequest) {\r\n const accountLabels = newData[0];\r\n if (!isCombinedScopeRequest) {\r\n return accountLabels;\r\n }\r\n\r\n const mccLabels = newData[1];\r\n // Selector component shows a max of 50, 51 will trigger message indicating this.\r\n const maxLabelsToShow = 51;\r\n\r\n return accountLabels.concat(mccLabels).slice(0, maxLabelsToShow);\r\n}\r\n\r\nfunction getLabels({\r\n jsdata,\r\n itemsDisplayLimit,\r\n searchFilter,\r\n ids = [],\r\n cacheService,\r\n dataContextManager,\r\n edm,\r\n scope,\r\n customerLevelLabelEnabled,\r\n}) {\r\n const params = {\r\n limit: itemsDisplayLimit + 1,\r\n filterOptions: {\r\n ignoreCase: true, // will take care of applying tolower to all textual\r\n // fields in the query and toLowerCase() to the values\r\n },\r\n };\r\n\r\n if (searchFilter) {\r\n params.where = {\r\n Name: {\r\n $contains: searchFilter,\r\n },\r\n };\r\n }\r\n\r\n if (ids.length > 0) {\r\n const idQuery = {\r\n $or: ids.map(id => ({\r\n Id: {\r\n $eq: (JSON.parse(id).Id ? JSON.parse(id).Id : id),\r\n },\r\n })),\r\n };\r\n const endQueries = [idQuery].concat(params.where || []);\r\n\r\n params.where = { $and: endQueries };\r\n }\r\n\r\n return new Promise((resolve) => {\r\n let cachedData;\r\n\r\n dataContextManager.getContext(selectorLoadAction, false, 'GET');\r\n const pseudoRequest = {\r\n url: selectorLoadAction,\r\n data: params,\r\n success: (data) => {\r\n _.each(data.labels, (label) => {\r\n if (label && typeof JSON.parse(label.Id) !== 'object' && label.Scope) {\r\n // eslint-disable-next-line no-param-reassign\r\n label.Id = JSON.stringify({ Id: label.Id, Scope: label.Scope });\r\n }\r\n });\r\n cachedData = data.labels;\r\n },\r\n };\r\n\r\n cacheService.cache(pseudoRequest);\r\n if (pseudoRequest.skipRequest) {\r\n resolve(cachedData);\r\n } else {\r\n const isCombinedScopeRequest =\r\n getIsCombinedScopeRequest(customerLevelLabelEnabled, scope, ids);\r\n const loadResult = load(params, jsdata, edm, scope, isCombinedScopeRequest);\r\n resolve(Promise.all(loadResult)\r\n .then((newData) => {\r\n const labels = getLabelsResult(newData, isCombinedScopeRequest);\r\n pseudoRequest.success({ labels });\r\n return labels;\r\n }));\r\n }\r\n });\r\n}\r\n\r\n/**\r\n * LabelsDataSource: provides labels fetch functions\r\n */\r\nexport class LabelsDataSource {\r\n /**\r\n * Initilize class settings\r\n *\r\n * @param {Object} param - An object containing these default options\r\n * @param {Object} param.jsdata - jsdata which will be used in labelsDatasource\r\n * @param {Object} param.dataContextManager - dataContextManager\r\n * @param {Function} param.dataContextManager.getContext - getContext for request\r\n * @param {Object} param.cacheService - cacheService\r\n * @param {Function} param.cacheService.cache - cache function\r\n * @returns {void} void\r\n */\r\n constructor({\r\n dataContextManager,\r\n cacheService,\r\n jsdata,\r\n scope,\r\n edm,\r\n customerLevelLabelEnabled,\r\n }) {\r\n this.options = {\r\n dataContextManager,\r\n cacheService,\r\n jsdata,\r\n scope,\r\n edm,\r\n customerLevelLabelEnabled,\r\n };\r\n }\r\n\r\n get itemsDisplayLimit() {\r\n return 50;\r\n }\r\n\r\n /**\r\n * get labels\r\n *\r\n * @param {String} viewFilter - view filter\r\n * can specify to be selected or changed, or empty (means fetch everything)\r\n * @param {String} searchFilter - search filter\r\n * @param {Object} stats - selector status\r\n * @returns {Promise} result promise\r\n */\r\n get(viewFilter, searchFilter, stats) {\r\n let ids = this.lastIds || [];\r\n\r\n if (this.lastViewFilter !== viewFilter) {\r\n if (viewFilter === Selector.ViewFilter.selected) {\r\n ids = stats.checked.concat(stats.indeterminate).map(({ id }) => id);\r\n } else if (viewFilter === Selector.ViewFilter.changed) {\r\n ids = _.map(\r\n _.keys(_.extend({}, stats.changed, stats.added)),\r\n id => Number.parseInt(id, 10)\r\n );\r\n } else {\r\n ids = [];\r\n }\r\n this.lastIds = ids;\r\n this.lastViewFilter = viewFilter;\r\n }\r\n\r\n return getLabels(_.extend(\r\n {}, this.options,\r\n { itemsDisplayLimit: this.itemsDisplayLimit + 1, searchFilter, ids }\r\n ));\r\n }\r\n\r\n /**\r\n * get label by ids\r\n *\r\n * @param {Array[]} ids - ids to fetch, when empty, will return empty result\r\n * @returns {Promise} result promise\r\n */\r\n getByIds(ids) {\r\n if (ids && ids.length > 0) {\r\n return getLabels(_.extend(\r\n {}, this.options,\r\n { itemsDisplayLimit: this.itemsDisplayLimit + 1, searchFilter: undefined, ids }\r\n ));\r\n }\r\n\r\n return Promise.resolve([]);\r\n }\r\n}\r\n","import ko from 'knockout';\r\n\r\nexport default class ViewModel {\r\n constructor() {\r\n this.hasData = ko.observable(false);\r\n this.loaded = ko.observable(false);\r\n this.hasChanges = ko.observable(false);\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport { PureKnockoutView } from '@bingads-webui/knockout-view';\r\nimport { DeterministicViewForBackBoneView } from '@bingads-webui/deterministic-wrapper-view';\r\nimport { Selector } from '@bingads-webui/selector';\r\nimport template from './template.pug';\r\nimport { LabelsDataSource } from '../util/labels-data-source';\r\nimport ViewModel from './selector-viewmodel';\r\nimport labelNameTemplate from '../shared/label-name-template.pug';\r\nimport checkboxTemplate from './row.checked.pug';\r\n\r\n/**\r\n * create event - When create menu clicked, it fires with current status.\r\n *\r\n * @event LabelsSelectorView#create\r\n * @type {void}\r\n */\r\n\r\n/**\r\n * cancel event - When cancel button clicked, it fires cancel event.\r\n *\r\n * @event LabelsSelectorView#cancel\r\n * @type {void}\r\n */\r\n\r\n/**\r\n * cancel event - When apply menu clicked, it fires apply event.\r\n *\r\n * @event LabelsSelectorView#apply\r\n * @type {void}\r\n */\r\n\r\n/**\r\n * cancel event - When apply menu clicked, it fires apply event.\r\n *\r\n * @event LabelsSelectorView#apply\r\n * @type {void}\r\n */\r\n\r\n/**\r\n * load:data event - after data loaded, it fires the event.\r\n *\r\n * @event LabelsSelectorView#load:data\r\n * @type {void}\r\n */\r\n\r\n/**\r\n * change:selection event - after data loaded, it fires the event.\r\n *\r\n * @event LabelsSelectorView#change:selection\r\n * @type {void}\r\n */\r\n\r\n/**\r\n * LabelsSelectorView: label selector view created based on selector\r\n * Trigger event LabelsSelectorView#create\r\n * Trigger event LabelsSelectorView#cancel\r\n * Trigger event LabelsSelectorView#apply\r\n * Trigger event LabelsSelectorView# change:selection\r\n * Trigger event LabelsSelectorView#load:data\r\n */\r\nexport class LabelsSelectorView extends PureKnockoutView {\r\n /**\r\n * Initilize labels selector view settings\r\n *\r\n * @param {Object} param - An object containing these default options for view:\r\n * @param {Object} param.dataSource - the datasource for fetching labels, nullable\r\n * @param {Function} param.dataSource.get - the function that will trigger labels retrival\r\n * @param {Object} param.checkAll - whether to mark all as selected\r\n * @param {Object} param.i18n - the localization settings\r\n * @param {Function} param.i18n.getString - localization settings function\r\n * @param {String} param.jsdata - jsdata which will be used in labelsDatasource\r\n * @param {Object} param.dataContextManager - dataContextManager\r\n * @param {Function} param.dataContextManager.getContext - getContext for request\r\n * @param {Object} param.cacheService - cacheService\r\n * @param {Function} param.cacheService.cache - cache function\r\n * @param {boolean} param.customerLevelLabelEnabled\r\n * - true if the customer level label feature is enabled\r\n * @returns {void} void\r\n */\r\n initialize({\r\n dataSource = null,\r\n checkAll = false,\r\n checkMap = {},\r\n i18n = { getString: _.Identity },\r\n jsdata,\r\n dataContextManager,\r\n cacheService,\r\n edm,\r\n scope,\r\n isForVNext = false,\r\n customerLevelLabelEnabled = false,\r\n useSubMenu = false,\r\n }) {\r\n this.options = {\r\n dataSource: dataSource == null ?\r\n new LabelsDataSource({\r\n jsdata,\r\n dataContextManager,\r\n cacheService,\r\n edm,\r\n scope,\r\n customerLevelLabelEnabled,\r\n }) :\r\n dataSource,\r\n checkAll,\r\n checkMap,\r\n i18n,\r\n customerLevelLabelEnabled,\r\n useSubMenu,\r\n };\r\n\r\n this.isForVNext = isForVNext;\r\n\r\n super.initialize(this.options);\r\n\r\n this.initializeSelector();\r\n }\r\n\r\n get ViewModel() {\r\n return ViewModel;\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click .action': this.onAction,\r\n };\r\n }\r\n\r\n get template() {\r\n return ({ model }) => template(_.extend({ useSubMenu: this.options.useSubMenu }, model, { i18n: this.options.i18n }));\r\n }\r\n\r\n get className() {\r\n return 'labels-selector dropdown-menu';\r\n }\r\n\r\n initializeSelector() {\r\n this.selector = new Selector({\r\n checkboxTemplate,\r\n isForVNext: this.isForVNext,\r\n busyIndicator: {\r\n enabled: true,\r\n showAfterMs: 0,\r\n showForMs: 200,\r\n },\r\n data: {\r\n checkAll: this.options.checkAll,\r\n checkMap: this.options.checkMap,\r\n itemsDisplayLimit: this.options.dataSource.itemsDisplayLimit,\r\n },\r\n filter: {\r\n showSelected: false,\r\n showChanged: false,\r\n },\r\n i18n: this.options.i18n,\r\n styles: {\r\n searchIcon: this.isForVNext ?\r\n ['iconba', 'iconba-Search'] :\r\n ['glyphicon', 'filter_search_icon_small'],\r\n ariaLabel: this.options.i18n.getString('Label dropdown selector'),\r\n searchBoxAriaLabel: this.options.i18n.getString('Search by label name'),\r\n list: ['table--fixed-layout', 'table--no-border', 'table--no-header'],\r\n listAttributes: { role: 'presentation' },\r\n checkboxColumn: ['table__cell--menu-item-style', 'table__cell--icon', 'legacy-label-selector-checkbox', 'clickable'],\r\n checkboxAttributes: { role: 'checkbox', tabindex: 0 },\r\n nameColumn: ['table__cell--menu-item-style', 'table__cell--ellipsis-overflow'],\r\n },\r\n templates: this.getSelectorTemplates(),\r\n });\r\n\r\n const thiss = this;\r\n\r\n this.selector.on('request:data', ({ viewFilter, searchFilter, stats }) => {\r\n thiss.trigger('request:data:beginning');\r\n\r\n const itemsOrPromise = thiss.options.dataSource.get(viewFilter, searchFilter, stats);\r\n\r\n Promise.resolve(itemsOrPromise).finally(() => thiss.trigger('request:data:finished'));\r\n\r\n thiss.selector.setData(itemsOrPromise);\r\n });\r\n\r\n this.selector.on('load:data', (data) => {\r\n if (!this.viewModel.loaded()) {\r\n this.viewModel.hasData(data.hasData);\r\n }\r\n this.viewModel.loaded(true);\r\n this.trigger('load:data', data);\r\n });\r\n\r\n this.selector.on('change:selection', (stats) => {\r\n this.viewModel.hasChanges(stats.hasChanges());\r\n this.trigger('change:selection', stats);\r\n });\r\n\r\n const selectorViewDeterministic = new DeterministicViewForBackBoneView({ view: this.selector });\r\n this.setChild('selectorView', selectorViewDeterministic);\r\n }\r\n\r\n setCheckMap(checkMap) {\r\n this.selector.setCheckMap(checkMap);\r\n }\r\n\r\n rerender() {\r\n this.selector.rerender();\r\n }\r\n\r\n onAction(event) {\r\n const action = event.currentTarget.attributes['data-action'].value;\r\n const stats = this.selector.getStats();\r\n\r\n this.trigger(action, action, stats);\r\n }\r\n\r\n remove() {\r\n if (this.selector) {\r\n this.selector.remove();\r\n this.selector = null;\r\n }\r\n super.remove();\r\n }\r\n\r\n getSelectorTemplates() {\r\n return this.options.customerLevelLabelEnabled ? { nameTemplate: labelNameTemplate } : undefined;\r\n }\r\n}\r\n\r\nLabelsSelectorView.ViewFilter = Selector.ViewFilter;\r\nLabelsSelectorView.CheckState = Selector.CheckState;\r\nLabelsSelectorView.CheckTransition = Selector.CheckTransition;\r\nLabelsSelectorView.statCheckMap = Selector.statCheckMap;\r\n","import _ from 'underscore';\r\nimport ko from 'knockout';\r\nimport { PureKnockoutView } from '@bingads-webui/knockout-view';\r\nimport { KoSchema } from '@bingads-webui/ko-schema';\r\nimport { toDec } from '@bingads-webui-universal/primitive-utilities';\r\nimport template from './create-template.pug';\r\n\r\n/**\r\n * create event - When save button clicked, it fires with the new label settings\r\n *\r\n * @event CreateLabelView#create\r\n * @type {void}\r\n*/\r\n\r\n/**\r\n * cancel event - When cancel button clicked, it fires cancel event.\r\n *\r\n * @event CreateLabelView#cancel\r\n * @type {void}\r\n */\r\n\r\n/**\r\n * CreateLabelView: label create view\r\n * Trigger event CreateLabelView#create\r\n * Trigger event CreateLabelView#cancel\r\n*/\r\nexport class CreateLabelView extends PureKnockoutView {\r\n /**\r\n * Initialize view settings\r\n *\r\n * @param {Object} param - An object containing these default options for view:\r\n * @param {Object} param.i18n - the localization settings\r\n * @param {Object} param.i18n.getString - localization settings function\r\n * @param {Object} param.s$label - schema for label\r\n * @param {Object} param.i18nErrors - odata error settings\r\n * @param {Object} param.i18nErrors.getODataErrors - function to convert odataerrors\r\n * @returns {void} void\r\n */\r\n initialize({\r\n s$label,\r\n i18n,\r\n i18nErrors,\r\n isForVNext = false,\r\n }) {\r\n this.options = {\r\n s$label,\r\n i18n,\r\n i18nErrors,\r\n isForVNext,\r\n };\r\n\r\n super.initialize(this.options);\r\n\r\n const {\r\n instance, schema, keys, model, customValidators,\r\n } = {\r\n instance: this.viewModel,\r\n schema: s$label,\r\n keys: ['Name'],\r\n model: {},\r\n };\r\n\r\n KoSchema(instance, schema, keys, model, customValidators, i18n);\r\n }\r\n\r\n get className() {\r\n return 'create-label';\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click .create-label__action[data-action=\"create\"]': this.onCreate,\r\n 'click .create-label__action[data-action=\"cancel\"]': this.onCancel,\r\n };\r\n }\r\n\r\n get template() {\r\n return ({ model }) => template(_.extend({}, model, {\r\n i18n: this.options.i18n,\r\n isForVNext: this.options.isForVNext,\r\n }));\r\n }\r\n\r\n /**\r\n * Set errors for create view, view will update the message accordingly\r\n *\r\n * @param {Array[]} errors - errors for the view\r\n * @returns {void}\r\n */\r\n setErrors(errors) {\r\n this.viewModel.errors.add(this.options.i18nErrors.getODataErrors(errors));\r\n }\r\n\r\n\r\n /**\r\n * Fires create event after click apply button\r\n *\r\n * @fires CreateLabelView#create\r\n * @returns {void}\r\n */\r\n onCreate() {\r\n const isValid = this.viewModel.Name.validate();\r\n\r\n if (isValid) {\r\n const dto = ko.toJS(this.viewModel);\r\n\r\n this.trigger('create', {\r\n Name: dto.Name,\r\n Description: '',\r\n ColorCode: toDec(`#${Math.random().toString(16).slice(-6)}`),\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Fires cancel event after click cancel button\r\n *\r\n * @fires CreateLabelView#cancel\r\n * @returns {void}\r\n */\r\n onCancel() {\r\n this.trigger('cancel');\r\n }\r\n}\r\n","import $ from 'jquery';\r\nimport { edmCampaign } from '@bingads-webui/edm-campaign';\r\nimport { getEntitySet } from './get-entity-set';\r\n\r\nfunction initCreateInstrumentationActivity(instrumentation) {\r\n const senario = instrumentation.label.create();\r\n const createActivity = senario.createLabel.create();\r\n\r\n return createActivity;\r\n}\r\n\r\n/**\r\n* Create label\r\n *\r\n * @param {Object} param - An object containing these default options\r\n * @param {Object} param.jsdata - jsdata which will be used in labelsDatasource\r\n * @param {Object} param.label - the label to be created\r\n * @param {String} param.instrumentation - instrumentation that already intilized\r\n * and which should contains the senario of label and activity of createLabel\r\n * @param {Object} param.edm - the edm reference\r\n * @param {Object} param.scope - the scope reference\r\n * @returns {Promise} result promise\r\n*/\r\nexport function create({\r\n jsdata,\r\n label,\r\n instrumentation,\r\n edm,\r\n scope,\r\n}) {\r\n const createActivity = initCreateInstrumentationActivity(instrumentation);\r\n const entitySet = getEntitySet(scope, edm, $, edmCampaign);\r\n return createActivity.monitorAsync(jsdata.Label.create(label, {\r\n cacheResponse: false,\r\n entitySet,\r\n }));\r\n}\r\n","/* eslint-disable no-param-reassign */\r\nimport _ from 'underscore';\r\nimport pgrid from 'projection-grid';\r\n\r\nimport { merge } from '@bingads-webui-universal/primitive-utilities';\r\n\r\nfunction visit(node, graph, permVisited, tempVisited, sortedList) {\r\n if (permVisited[node]) {\r\n return;\r\n }\r\n\r\n if (tempVisited[node]) {\r\n throw new Error(`Circular plugin dependency detected: ${node}`);\r\n }\r\n\r\n tempVisited[node] = true;\r\n _.each(graph[node], dep => visit(dep, graph, permVisited, tempVisited, sortedList));\r\n tempVisited[node] = false;\r\n permVisited[node] = true;\r\n sortedList.unshift(node);\r\n}\r\n\r\nfunction topoSort(graph) {\r\n const permVisited = {};\r\n const tempVisited = {};\r\n const notVisited = _.keys(graph);\r\n const sortedList = [];\r\n\r\n while (notVisited.length > 0) {\r\n const currNode = notVisited.pop();\r\n visit(currNode, graph, permVisited, tempVisited, sortedList);\r\n }\r\n\r\n return sortedList;\r\n}\r\n\r\nfunction generateDepGraph(map) {\r\n const graph = {};\r\n\r\n _.map(_.uniq(_.flatten(_.values(map))), (dep) => {\r\n graph[dep] = [];\r\n });\r\n\r\n _.each(map, (deps, name) => {\r\n _.each(deps, (dep) => {\r\n graph[dep].push(name);\r\n });\r\n });\r\n\r\n return graph;\r\n}\r\n\r\nfunction processDeps(map) {\r\n return _.mapObject(map, deps => _.without(deps, 'gridView', 'config', 'dataSource'));\r\n}\r\n\r\nfunction getOrderToInitializePlugin(nameToDepsMap) {\r\n const sortedList = topoSort(generateDepGraph(processDeps(nameToDepsMap)));\r\n\r\n return sortedList.concat(_.difference(_.keys(nameToDepsMap), sortedList));\r\n}\r\n\r\nfunction generatePluginNameMaps(plugins) {\r\n const nameToPluginRefMap = {};\r\n const nameToDepsMap = {};\r\n const softDependenciesMap = {};\r\n _.each(plugins, ({ plugin }) => plugin((name, deps) => {\r\n nameToDepsMap[name] = deps;\r\n nameToPluginRefMap[name] = plugin;\r\n if (_.isArray(plugin.softDependencies)) {\r\n softDependenciesMap[name] = plugin.softDependencies;\r\n }\r\n }));\r\n\r\n // softDependencies is not required dependency.\r\n // PluginA or PluginB doesn't depend each other. Grid can use the PluginA or PluginB directly.\r\n // But, if grid use them together, sometimes, we must use one firstly, use another one secondly.\r\n // An example is SegmentPlugin, and AggregatedRowPlugin, must use AggregatedRowPlugin fristly.\r\n _.each(softDependenciesMap, (softDependencies, name) => {\r\n _.each(softDependencies, (softDependency) => {\r\n if (_.has(nameToDepsMap, softDependency)) {\r\n nameToDepsMap[name].push(softDependency);\r\n }\r\n });\r\n });\r\n\r\n return {\r\n nameToPluginRefMap,\r\n nameToDepsMap,\r\n };\r\n}\r\n\r\nfunction addPluginConfigToGridConfig(gridConfig, plugins, preferenceConfig) {\r\n gridConfig.plugins = {};\r\n\r\n _.each(plugins, ({ plugin, config }) => {\r\n if (config) {\r\n plugin((name) => {\r\n if (name === 'performance-log') {\r\n gridConfig.plugins.performanceLog = config;\r\n } else {\r\n gridConfig.plugins[name] = config;\r\n }\r\n });\r\n }\r\n });\r\n\r\n // merge here as preferenceConfig contains modifications for both gridConfig and plugin config\r\n merge(gridConfig, preferenceConfig);\r\n\r\n return gridConfig;\r\n}\r\n\r\nexport function pgridFactory({ plugins = [], gridConfig, preferenceConfig }, grid = pgrid) {\r\n const { nameToPluginRefMap, nameToDepsMap } = generatePluginNameMaps(plugins);\r\n // add customDepsMap to allow customize for the depsMap to solve below scenario\r\n // Plugin A depend on Plugin B when Plugin B exist.\r\n // In this scenario, we couldn't add plugin B in plugin A's dependency directly\r\n // as plugin B is not required by plugin A\r\n if (gridConfig && _.isFunction(gridConfig.customDepsMap)) {\r\n gridConfig.customDepsMap(nameToDepsMap);\r\n }\r\n const sortedOrder = getOrderToInitializePlugin(nameToDepsMap);\r\n\r\n let gridFactory = grid.factory({ vnext: true });\r\n\r\n _.each(sortedOrder, (pluginName) => {\r\n gridFactory = gridFactory.use(nameToPluginRefMap[pluginName]);\r\n });\r\n\r\n return gridFactory.create(addPluginConfigToGridConfig(gridConfig, plugins, preferenceConfig));\r\n}\r\n","import _ from 'underscore';\r\nimport {\r\n getPerformanceColumns,\r\n conversionsColumns,\r\n conversionsColumnsWithFluctuation,\r\n getConversionColumns,\r\n competitiveColumns,\r\n callDetailsColumns,\r\n ColumnAveragePosition,\r\n ColumnCallForwarding,\r\n ColumnClickSharePercent,\r\n ColumnTotalSpend,\r\n ColumnTopImpressionRate,\r\n ColumnAbsoluteTopImpressionRate,\r\n ColumnAuctionLostToAdQualityPercent,\r\n ColumnAuctionLostToLandingPercent,\r\n ColumnAuctionLostToBidPercent,\r\n ColumnExactMatchImpressionSharePercent,\r\n ColumnTopImpressionSharePercent,\r\n ColumnTopImpressionShareLostToBudget,\r\n ColumnTopImpressionShareLostToRank,\r\n ColumnAbsoluteTopImpressionSharePercent,\r\n ColumnAbsoluteTopImpressionShareLostToBudget,\r\n ColumnAbsoluteTopImpressionShareLostToRank,\r\n ColumnViewThroughConversions,\r\n ColumnViewThroughConversionsCredit,\r\n ColumnAudienceAuctionWonPercent,\r\n ColumnAudienceTopISLostToBudgetPercent,\r\n ColumnAudienceTopISLostToRankPercent,\r\n ColumnRelativeCTR,\r\n ColumnViewThroughConversionsRevenue,\r\n ColumnViewThroughConversionsCPA,\r\n ColumnViewThroughPartialConversionsCPA,\r\n ColumnViewThroughConversionsReturnOnAdSpend,\r\n ColumnViewThroughConversionsRate,\r\n ColumnViewThroughPartialConversionsRate,\r\n ColumnNewCustomerConversions,\r\n ColumnNewCustomerRevenue,\r\n ColumnNewCustomerConversionRate,\r\n ColumnNewCustomerCPA,\r\n ColumnNewCustomerRevenueOnAdSpend,\r\n} from '@bingads-webui-campaign/campaignui-common-columns';\r\nimport { getColumnConversions } from '@bingads-webui-campaign/column-conversions';\r\n\r\nclass CategoryConfigBuilder {\r\n /**\r\n * Builder class helps to generate a category config for projection-grid\r\n * column chooser plugin\r\n * @param {Object} options -\r\n * @param {ColumnsConfigBuilder} options.columnsBuilder - The parent columns builder\r\n * @param {string} options.name - Name of the category\r\n */\r\n constructor({ columnsBuilder, name }) {\r\n this.columnsBuilder = columnsBuilder;\r\n this.name = name;\r\n this.columns = [];\r\n }\r\n\r\n /**\r\n * Add a single column to the category\r\n * @param {Class} Column - The column class to Add\r\n * @returns {CategoryConfigBuilder} - The builder itself\r\n */\r\n addColumn(Column) {\r\n this.columns.push(Column);\r\n return this;\r\n }\r\n\r\n /**\r\n * Add a list of columns to the category\r\n * @param {Class[]} columns - The column classes\r\n * @returns {CategoryConfigBuilder} - The builder itself\r\n */\r\n addColumns(columns) {\r\n _.each(columns, Column => this.addColumn(Column));\r\n return this;\r\n }\r\n\r\n /**\r\n * Get the category config\r\n * @param {Object} options -\r\n * @param {I18n} options.i18n - I18n provider\r\n * @param {permissions} options.permissions - the permissions\r\n * @returns {Object} - The category config\r\n */\r\n getCategoryConfig({ i18n, permissions }) {\r\n return {\r\n name: i18n.getString(this.name),\r\n options: _.map(this.columns, (Column) => {\r\n const { name, title } = new Column({ i18n, permissions });\r\n return {\r\n key: name,\r\n name: title,\r\n selectOption: this.columnsBuilder.isColumnLocked(Column) ? 'locked' : 'optional',\r\n };\r\n }),\r\n };\r\n }\r\n}\r\n\r\nexport class ColumnsConfigBuilder {\r\n /**\r\n * Builder class helps to generate columns config and column chooser plugin\r\n * config for projection-grid\r\n * @param {Object} options -\r\n * @param {Object} options.Permissions - Permissions\r\n */\r\n constructor(options) {\r\n this.categories = [];\r\n this.locked = [];\r\n this.helpIds = {};\r\n\r\n let IsVideoAdsPerfMetricsEnabled = false; //eslint-disable-line\r\n let isCPSEnabled = false; //eslint-disable-line\r\n let isInstallPerformanceColumnsEnabled = false; //eslint-disable-line\r\n let isAppCampaignNewCampaignGridColumnsEnabled = false;\r\n let isNewCustomerAcquisitionColumnsEnabled = false; //eslint-disable-line\r\n try {\r\n IsVideoAdsPerfMetricsEnabled = options.Permissions.IsVideoAdsPerfMetricsEnabled; //eslint-disable-line\r\n isCPSEnabled = options.Permissions.dynamic && options.Permissions.dynamic.CPSReporting; //eslint-disable-line\r\n isInstallPerformanceColumnsEnabled = options.Permissions.dynamic && options.Permissions.dynamic.InstallPerformanceColumns; //eslint-disable-line\r\n isAppCampaignNewCampaignGridColumnsEnabled = options.Permissions.dynamic && options.Permissions.dynamic.AppCampaignNewCampaignGridColumns; //eslint-disable-line\r\n isNewCustomerAcquisitionColumnsEnabled = options.Permissions.dynamic && options.Permissions.dynamic.NewCustomerAcquisition; //eslint-disable-line\r\n } catch (e) { } //eslint-disable-line\r\n\r\n this.isVideoAdsPerfMetricsEnabled = IsVideoAdsPerfMetricsEnabled;\r\n this.isCPSEnabled = isCPSEnabled;\r\n this.isInstallPerformanceColumnsEnabled = isInstallPerformanceColumnsEnabled;\r\n this.isAppCampaignNewCampaignGridColumnsEnabled = isAppCampaignNewCampaignGridColumnsEnabled;\r\n this.isNewCustomerAcquisitionColumnsEnabled = isNewCustomerAcquisitionColumnsEnabled;\r\n\r\n this.performanceColumns = getPerformanceColumns({\r\n IsVideoAdsPerfMetricsEnabled,\r\n });\r\n }\r\n\r\n /**\r\n * Add a column category\r\n * @param {string} name - Name of the category\r\n * @param {CategoryDirectorCallback} director - A callback to direct the category buidler\r\n * @returns {ColumnsConfigBuilder} - The builder itself\r\n */\r\n addCategory(name, director) {\r\n const categoryBuilder = new CategoryConfigBuilder({ columnsBuilder: this, name });\r\n\r\n this.categories.push(categoryBuilder);\r\n /**\r\n * @callback ColumnsConfigBuilder\r\n * @param {CategoryConfigBuilder} categoryBuilder - The builder to create a column category\r\n * @returns {void}\r\n */\r\n director(categoryBuilder);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Set the locked columns\r\n * @param {Class[]} columns - The classes of the locked columns\r\n * @returns {ColumnsConfigBuilder} - The builder itself\r\n */\r\n setLockedColumns(columns) {\r\n this.locked.push(...columns);\r\n return this;\r\n }\r\n\r\n /**\r\n * Check if a clumn is locked\r\n * @param {Class} column - The column to check\r\n * @returns {boolean} - True if the column is locked\r\n */\r\n isColumnLocked(column) {\r\n return _.contains(this.locked, column);\r\n }\r\n\r\n /**\r\n * Set the selected columns\r\n * @param {Class[]} columns - The classes of the selected columns\r\n * @returns {ColumnsConfigBuilder} - The builder itself\r\n */\r\n setSelectedColumns(columns) {\r\n this.selected = columns;\r\n return this;\r\n }\r\n\r\n /**\r\n * Create the columns config\r\n * @param {Object} options - The column constructor options\r\n * @returns {Object[]} - A list of column config\r\n */\r\n getColumnsConfig(options) {\r\n return _.chain(this.categories)\r\n .map(_.property('columns'))\r\n .concat(this.locked)\r\n .flatten()\r\n .uniq()\r\n .map(Column => new Column(options).toJSON())\r\n .value();\r\n }\r\n\r\n /**\r\n * Create the columns config for column conversion\r\n * which compensate for legacy shared column oject\r\n * @param {Object} options - The column constructor options\r\n * @returns {Object[]} - A list of column config\r\n */\r\n getAllColumns(options) {\r\n return _.chain(this.categories)\r\n .map(_.property('columns'))\r\n .concat(this.locked)\r\n .flatten()\r\n .uniq()\r\n .map(Column => new Column(options))\r\n .value();\r\n }\r\n\r\n /**\r\n * Create the column chooser config\r\n * @param {Object} options -\r\n * @param {I18n} options.i18n - The i18n provider\r\n * @param {boolean} options.patchQuery -\r\n * True if the column chooser will patch the query with $select option\r\n * @param {Object} options.Columns -\r\n * The preference JSData resource to get saved columns\r\n * @param {Object} options.SelectedColumns -\r\n * The preference JSData resource to get current selected columns\r\n * @param {Object} options.LegacyColumns -\r\n * The preference JSData resource to get legacy saved columns\r\n * @param {Object} options.SelectedColumns -\r\n * The preference JSData resource to get current selected columns\r\n * @param {Object} options.LegacyGridFlag\r\n * The preference JSData resource to get the migration flag of legacy grid\r\n * @param {Object} options.nameFromLegacy\r\n * The hash object to map legacy column name to new grid column name\r\n * @param {Object} options.mandatoryProperties -\r\n * A property array which is not appear in column chooser but in $select option\r\n * @param {Object} options.CustomColumns -\r\n * The preference JSData resource to get custom columns\r\n * @param {Object} options.customColumnConfig -\r\n * A hash containing column chooser configuration for custom columns\r\n * @param {Object} options.permissions -\r\n * The permissions, may be null.\r\n * @returns {Object} - The column chooser config object\r\n */\r\n getColumnChooserConfig({\r\n i18n,\r\n patchQuery,\r\n Columns,\r\n SelectedColumns,\r\n LegacyColumns,\r\n LegacySelectedColumns,\r\n LegacyGridFlag,\r\n nameFromLegacy,\r\n mandatoryProperties = [],\r\n CustomColumns,\r\n customColumnConfig,\r\n permissions = {},\r\n }) {\r\n const { dynamic = {} } = permissions;\r\n const {\r\n ColumnConversion: IsColumnConversionEnabled,\r\n } = dynamic;\r\n\r\n return {\r\n categories: _.map(\r\n this.categories,\r\n category => category.getCategoryConfig({ i18n, permissions })\r\n ),\r\n selected: _.map(this.selected, Column => new Column({ i18n }).name),\r\n locked: _.map(this.locked, Column => new Column({ i18n }).name),\r\n\r\n ...IsColumnConversionEnabled ? {\r\n columnConversions: getColumnConversions(this.getAllColumns({ i18n })),\r\n } : {},\r\n\r\n patchQuery: Boolean(patchQuery),\r\n Columns,\r\n SelectedColumns,\r\n LegacyColumns,\r\n LegacySelectedColumns,\r\n LegacyGridFlag,\r\n nameFromLegacy,\r\n i18n,\r\n mandatoryProperties,\r\n CustomColumns,\r\n customColumnConfig,\r\n };\r\n }\r\n\r\n // Helper function\r\n addCategoryWithoutSomeColumns(unfilteredColumns, categoryName, blacklist) {\r\n const filteredColumns =\r\n _.reject(unfilteredColumns, column => _.contains(blacklist, column));\r\n return this.addCategory(categoryName, category => category.addColumns(filteredColumns));\r\n }\r\n\r\n /**\r\n * Add the performance category for ad groups\r\n * @returns {ColumnsConfigBuilder} - The builder itself\r\n */\r\n addPerformanceCategoryForAdGroups({\r\n IsAvgPositionDeprecationPhase2Enabled,\r\n }) {\r\n const perfColumns = getPerformanceColumns({\r\n IsVideoAdsPerfMetricsEnabled: this.isVideoAdsPerfMetricsEnabled,\r\n isCPSEnabled: this.isCPSEnabled,\r\n });\r\n const columns = _.chain(perfColumns)\r\n .union([\r\n ColumnTopImpressionRate,\r\n ColumnAbsoluteTopImpressionRate,\r\n ])\r\n .value();\r\n\r\n return this.addCategoryWithoutSomeColumns(columns, 'Performance', _.compact([\r\n IsAvgPositionDeprecationPhase2Enabled && ColumnAveragePosition,\r\n ]));\r\n }\r\n\r\n /**\r\n * Add the performance category for campaign\r\n * @returns {ColumnsConfigBuilder} - The builder itself\r\n */\r\n addPerformanceCategoryForCampaign({\r\n withFluctuations,\r\n IsAvgPositionDeprecationPhase2Enabled,\r\n getCampaignTypeGlobalFilter,\r\n } = {}) {\r\n const campaignTypeGloabalFilter = _.isFunction(getCampaignTypeGlobalFilter) && getCampaignTypeGlobalFilter();\r\n\r\n // app campaign related perf columns to be included when global gilter is set to App campaign (128) or All (65535)\r\n const includeAppCampaignColumns = campaignTypeGloabalFilter === 128 || campaignTypeGloabalFilter === 65535;\r\n\r\n const perfColumns = getPerformanceColumns({\r\n withFluctuations,\r\n IsVideoAdsPerfMetricsEnabled: this.isVideoAdsPerfMetricsEnabled,\r\n isCPSEnabled: this.isCPSEnabled,\r\n isAppCampaignNewCampaignGridColumnsEnabled: this.isAppCampaignNewCampaignGridColumnsEnabled && includeAppCampaignColumns,\r\n });\r\n\r\n const columns = _.union(perfColumns, [\r\n ColumnTopImpressionRate,\r\n ColumnAbsoluteTopImpressionRate,\r\n ]);\r\n\r\n return this.addCategoryWithoutSomeColumns(columns, 'Performance', _.compact([\r\n IsAvgPositionDeprecationPhase2Enabled && ColumnAveragePosition,\r\n ]));\r\n }\r\n\r\n /**\r\n * Add the performance category for ads\r\n * @returns {ColumnsConfigBuilder} - The builder itself\r\n */\r\n addPerformanceCategoryForAd({\r\n IsAvgPositionDeprecationPhase2Enabled,\r\n IsAvgPositionDeprecationPhase1Enabled,\r\n }) {\r\n const withProminence = _.union(\r\n this.performanceColumns,\r\n IsAvgPositionDeprecationPhase1Enabled ? [\r\n ColumnTopImpressionRate,\r\n ColumnAbsoluteTopImpressionRate,\r\n ] : []\r\n );\r\n return this.addCategoryWithoutSomeColumns(withProminence, 'Performance', _.compact([\r\n ColumnTotalSpend,\r\n IsAvgPositionDeprecationPhase2Enabled && ColumnAveragePosition,\r\n ]));\r\n }\r\n\r\n /**\r\n * Add the performance category for positive keywords grid\r\n * @returns {ColumnsConfigBuilder} - The builder itself\r\n */\r\n addPerformanceCategoryForKeywords({\r\n IsAvgPositionDeprecationPhase2Enabled,\r\n }) {\r\n const columns = _.chain(this.performanceColumns)\r\n .union([\r\n ColumnTopImpressionRate,\r\n ColumnAbsoluteTopImpressionRate,\r\n ])\r\n .difference([\r\n ColumnTotalSpend,\r\n ])\r\n .value();\r\n\r\n return this.addCategoryWithoutSomeColumns(columns, 'Performance', _.compact([\r\n IsAvgPositionDeprecationPhase2Enabled && ColumnAveragePosition,\r\n ]));\r\n }\r\n\r\n /**\r\n * Add the performance category for demographics grids\r\n * @returns {ColumnsConfigBuilder} - The builder itself\r\n */\r\n addPerformanceCategoryForDemographics({\r\n IsAvgPositionDeprecationPhase2Enabled,\r\n IsAvgPositionDeprecationPhase1Enabled,\r\n }) {\r\n const withProminence = _.union(\r\n this.performanceColumns,\r\n IsAvgPositionDeprecationPhase1Enabled ? [\r\n ColumnTopImpressionRate,\r\n ColumnAbsoluteTopImpressionRate,\r\n ] : []\r\n );\r\n\r\n return this.addCategoryWithoutSomeColumns(withProminence, 'Performance', _.compact([\r\n ColumnTotalSpend,\r\n IsAvgPositionDeprecationPhase2Enabled && ColumnAveragePosition,\r\n ]));\r\n }\r\n\r\n /**\r\n * Add the conversions category (add all conversion metrics when pilot is enabled)\r\n * @returns {ColumnsConfigBuilder} - The builder itself\r\n */\r\n addConversionsCategory({\r\n withFluctuations,\r\n withPartialConversions,\r\n IsViewThroughConversionEnabled,\r\n IsViewThroughConversionsRevenueEnabled,\r\n IsColumnConversionEnabled,\r\n ColumnFilter,\r\n isCPSEnabled,\r\n isInstallColumnsEnabled,\r\n isConversionValueRuleColumnsEnabled,\r\n } =\r\n {\r\n withFluctuations: false,\r\n IsViewThroughConversionEnabled: false,\r\n IsViewThroughConversionsRevenueEnabled: false,\r\n ColumnFilter: null,\r\n isCPSEnabled: false,\r\n isInstallColumnsEnabled: false,\r\n isConversionValueRuleColumnsEnabled: false,\r\n }) {\r\n let columnsToUse;\r\n if (IsColumnConversionEnabled) {\r\n const baseConversionColumns =\r\n getConversionColumns({\r\n withFluctuations,\r\n withPartialConversions,\r\n isCPSEnabled,\r\n isInstallColumnsEnabled,\r\n isConversionValueRuleColumnsEnabled,\r\n isNewCustomerAcquisitionColumnsEnabled: this.isNewCustomerAcquisitionColumnsEnabled,\r\n });\r\n columnsToUse = [\r\n ...baseConversionColumns,\r\n\r\n ...(IsViewThroughConversionEnabled && withPartialConversions ?\r\n [ColumnViewThroughConversionsCredit] : []),\r\n\r\n ...(IsViewThroughConversionEnabled && !withPartialConversions ?\r\n [ColumnViewThroughConversions] : []),\r\n\r\n ...(IsViewThroughConversionsRevenueEnabled && withPartialConversions ? [\r\n ColumnViewThroughConversionsRevenue,\r\n ColumnViewThroughPartialConversionsCPA,\r\n ColumnViewThroughConversionsReturnOnAdSpend,\r\n ColumnViewThroughPartialConversionsRate,\r\n ] : []),\r\n\r\n ...(IsViewThroughConversionsRevenueEnabled && !withPartialConversions ? [\r\n ColumnViewThroughConversionsRevenue,\r\n ColumnViewThroughConversionsCPA,\r\n ColumnViewThroughConversionsReturnOnAdSpend,\r\n ColumnViewThroughConversionsRate,\r\n ] : []),\r\n\r\n ...(this.isNewCustomerAcquisitionColumnsEnabled ? [\r\n ColumnNewCustomerConversions,\r\n ColumnNewCustomerRevenue,\r\n ColumnNewCustomerConversionRate,\r\n ColumnNewCustomerCPA,\r\n ColumnNewCustomerRevenueOnAdSpend,\r\n ] : []),\r\n ];\r\n } else {\r\n columnsToUse = [\r\n ...(withFluctuations ? conversionsColumnsWithFluctuation : conversionsColumns),\r\n ...(IsViewThroughConversionEnabled ? [ColumnViewThroughConversions] : []),\r\n ...(IsViewThroughConversionsRevenueEnabled ? [\r\n ColumnViewThroughConversionsRevenue,\r\n ColumnViewThroughConversionsCPA,\r\n ColumnViewThroughConversionsReturnOnAdSpend,\r\n ColumnViewThroughConversionsRate,\r\n ] : []),\r\n ];\r\n }\r\n\r\n if (typeof (ColumnFilter) === 'function') {\r\n columnsToUse = _.filter(columnsToUse, (value, key, index) =>\r\n ColumnFilter(conversionsColumns, value, key, index));\r\n }\r\n\r\n return this.addCategory('Conversions', category => category.addColumns(columnsToUse));\r\n }\r\n\r\n /**\r\n * Add the competitive category\r\n * @returns {ColumnsConfigBuilder} - The builder itself\r\n */\r\n addCompetitiveCategoryForKeywords() {\r\n const columns = _.chain(competitiveColumns)\r\n .union([\r\n ColumnExactMatchImpressionSharePercent,\r\n ColumnTopImpressionSharePercent,\r\n ColumnTopImpressionShareLostToBudget,\r\n ColumnTopImpressionShareLostToRank,\r\n ColumnAbsoluteTopImpressionSharePercent,\r\n ColumnAbsoluteTopImpressionShareLostToBudget,\r\n ColumnAbsoluteTopImpressionShareLostToRank,\r\n ])\r\n .difference([\r\n ColumnAuctionLostToAdQualityPercent,\r\n ColumnAuctionLostToLandingPercent,\r\n ColumnAuctionLostToBidPercent,\r\n ])\r\n .value();\r\n\r\n return this.addCategory('Competitive', category => category.addColumns(columns));\r\n }\r\n\r\n /**\r\n * Add the competitive category for campaign or ad groups grid\r\n * @returns {ColumnsConfigBuilder} - The builder itself\r\n */\r\n addCompetitiveCategoryForCampaignOrAdGroups({\r\n IsAudienceSOVEnabled,\r\n }) {\r\n const columns = _.chain(competitiveColumns)\r\n .union([\r\n ColumnExactMatchImpressionSharePercent,\r\n ColumnTopImpressionSharePercent,\r\n ColumnTopImpressionShareLostToBudget,\r\n ColumnTopImpressionShareLostToRank,\r\n ColumnAbsoluteTopImpressionSharePercent,\r\n ColumnAbsoluteTopImpressionShareLostToBudget,\r\n ColumnAbsoluteTopImpressionShareLostToRank,\r\n ])\r\n .union(IsAudienceSOVEnabled ? [\r\n ColumnAudienceAuctionWonPercent,\r\n ColumnAudienceTopISLostToBudgetPercent,\r\n ColumnAudienceTopISLostToRankPercent,\r\n ColumnRelativeCTR,\r\n ] : [])\r\n .difference([\r\n ColumnAuctionLostToAdQualityPercent,\r\n ColumnAuctionLostToLandingPercent,\r\n ColumnAuctionLostToBidPercent,\r\n ])\r\n .value();\r\n\r\n return this.addCategory('Competitive', category => category.addColumns(columns));\r\n }\r\n\r\n /**\r\n * Add the competitive category for performance targets\r\n * @returns {ColumnsConfigBuilder} - The builder itself\r\n */\r\n addCompetitiveCategoryForPerformanceTargets() {\r\n return this.addCategoryWithoutSomeColumns(competitiveColumns, 'Competitive', [ColumnClickSharePercent]);\r\n }\r\n\r\n /**\r\n * Add the call details category\r\n * @returns {ColumnsConfigBuilder} - The builder itself\r\n */\r\n addCallDetailsCategory() {\r\n return this.addCategory('CallDetails', category => category.addColumns(callDetailsColumns));\r\n }\r\n\r\n /**\r\n * Add the call details category for campaigns\r\n * @returns {ColumnsConfigBuilder} - The builder itself\r\n */\r\n addCallDetailsCategoryForCampaigns() {\r\n return this.addCategoryWithoutSomeColumns(callDetailsColumns, 'CallDetails', [ColumnCallForwarding]);\r\n }\r\n\r\n /**\r\n * Add the call details category for performance targets\r\n * @returns {ColumnsConfigBuilder} - The builder itself\r\n */\r\n addCallDetailsCategoryForPerformanceTargets() {\r\n return this.addCategoryWithoutSomeColumns(callDetailsColumns, 'CallDetails', [ColumnCallForwarding]);\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\nexport function updateGridQuery(gridView, filter, refresh = true, skipFilterOptions = false) {\r\n const currentQuery = gridView.get('query');\r\n let newQuery = null;\r\n\r\n if (filter && filter.query && !_.isEmpty(filter.query)) {\r\n newQuery = _.defaults({\r\n filter: filter.query,\r\n options: _.defaults({\r\n filterOptions: skipFilterOptions ? undefined : _.extend(filter.odataOptions, _.pick(filter, 'schema')),\r\n }, currentQuery.options),\r\n }, currentQuery);\r\n } else {\r\n newQuery = _.omit(currentQuery, 'filter');\r\n }\r\n\r\n gridView.set({\r\n query: newQuery,\r\n });\r\n\r\n if (refresh) {\r\n gridView.refresh(true);\r\n }\r\n}\r\n","/* eslint-disable no-param-reassign */\r\n\r\nimport Promise from 'bluebird';\r\nimport _ from 'underscore';\r\n\r\nimport { FilterAgent } from '@bingads-webui/filter-agent';\r\nimport { fromFilterEntityToLegacyFilter } from '@bingads-webui-campaign/filter-converter';\r\nimport { updateGridQuery } from '../query-util';\r\n\r\nfunction propagateWaterfallFilterToLegacyGrids({\r\n filter,\r\n waterfallEvent,\r\n legacyGridName,\r\n legacyDeps: {\r\n config,\r\n stateManager,\r\n preferences,\r\n },\r\n}) {\r\n const legacyWaterfall = filter && !_.isEmpty(filter.query) ?\r\n fromFilterEntityToLegacyFilter(filter) : null;\r\n const usePreferencesService = _.result(config.get('Permissions'), 'IsUsePreferencesServiceEnabled');\r\n\r\n // set stateManager for legacy grid that need waterfall filter value\r\n const setPromise = [];\r\n const data = {\r\n FilterExpressions: legacyWaterfall,\r\n Id: '',\r\n Name: `${legacyGridName}Filter`,\r\n };\r\n\r\n if (usePreferencesService === true) {\r\n const prefix = config.get('StateManagerKeyPrefix');\r\n const preferenceData = {\r\n Name: `${prefix}${legacyGridName}_quickfilter`,\r\n Data: data,\r\n };\r\n\r\n setPromise.push(preferences.setAtUserLevel(preferenceData));\r\n }\r\n\r\n setPromise.push(stateManager.setItem('permanent', `${legacyGridName}_quickfilter`, data));\r\n\r\n Promise.all(setPromise).then(() => {\r\n window.App.trigger(waterfallEvent);\r\n });\r\n}\r\n\r\nfunction showExceededSaveLimitError(i18n, filterConfig, tabView) {\r\n const errMsg = i18n.getString('Error_Campaign_API_FiltersExceedsMaxCount')\r\n .replace('{0}', filterConfig.maxSavedFilterLimit);\r\n tabView.alertHelper.showAlert(errMsg);\r\n}\r\n\r\nexport function initializeFilterAgent({\r\n tabView,\r\n gridView,\r\n toolbar,\r\n legacyDeps,\r\n customFilterUIChangeListener,\r\n gridToolbarGroup,\r\n legacyGridName,\r\n}) {\r\n const { filterConfig } = tabView;\r\n const { i18n } = filterConfig;\r\n const isLabelEnabled = _.isObject(filterConfig.entitySchema.properties.Labels);\r\n\r\n filterConfig.menu = _.defaults({\r\n customItems: isLabelEnabled ? [\r\n {\r\n type: 'dropdown-divider',\r\n },\r\n {\r\n text: i18n.getString('Filter_By_Label'),\r\n onClick: () => {\r\n tabView.filterAgent.showFilterEditor({\r\n Labels: {\r\n $containsall: undefined,\r\n },\r\n });\r\n },\r\n },\r\n ] : [],\r\n }, filterConfig.menu);\r\n\r\n tabView.filterAgent = new FilterAgent(_.extend(filterConfig, {\r\n toolbarView: toolbar,\r\n filterService: tabView.filterService,\r\n }));\r\n\r\n tabView.listenTo(tabView.filterAgent, 'filter-ui-change', (state) => {\r\n if (customFilterUIChangeListener) {\r\n customFilterUIChangeListener(state);\r\n } else {\r\n tabView.setState(_.extend(tabView.getState(), state));\r\n tabView.viewModel.showToolBar(state.showToolBar);\r\n\r\n // do the hide/show toolbar operation\r\n if (state.showToolBar && gridToolbarGroup) {\r\n gridToolbarGroup.showAllToolbars();\r\n } else if (!state.showToolBar && gridToolbarGroup) {\r\n gridToolbarGroup.hideAllToolbars();\r\n }\r\n if (state.showFilterBar) {\r\n tabView.setChild('filter-bar', tabView.filterAgent.getFilterBar());\r\n }\r\n if (state.showFilterEditor) {\r\n tabView.setChild('filter-editor', tabView.filterAgent.getFilterEditor());\r\n }\r\n }\r\n gridView.refresh();\r\n });\r\n\r\n // TODO: switch this to use filter service, so that we don't rely on the UI\r\n // elements of the FilterAgent to be ready before apply filter to the gridView\r\n tabView.listenTo(tabView.filterAgent, 'filter-state-changed', ({ filter, quickFilter }, subStatus) => {\r\n updateGridQuery(gridView, filter);\r\n\r\n if (subStatus === 'quick-filter-applied' && quickFilter && filterConfig.waterfallEvent) {\r\n propagateWaterfallFilterToLegacyGrids({\r\n filter: quickFilter,\r\n waterfallEvent: filterConfig.waterfallEvent,\r\n legacyGridName: legacyGridName || tabView.getChild('grid').grid.config.legacyGridName,\r\n legacyDeps,\r\n });\r\n }\r\n });\r\n\r\n tabView.listenTo(tabView.filterAgent, 'filter-operation-failed', (errorData) => {\r\n if (errorData.message === 'ExceededSaveLimit') {\r\n showExceededSaveLimitError(i18n, filterConfig, tabView);\r\n } else {\r\n tabView.alertHelper.showUnknownError();\r\n }\r\n });\r\n\r\n tabView.listenTo(tabView.filterAgent, 'filter-max-reached', () => {\r\n showExceededSaveLimitError(i18n, filterConfig, tabView);\r\n });\r\n}\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\n\r\nexport default ({\r\n gridName,\r\n dateUtil,\r\n state,\r\n getSegPreference,\r\n getSegType,\r\n segmentTimeChecker,\r\n fetchPaginationConfig,\r\n customColumnPreference,\r\n}) => {\r\n const formatDate = date => dateUtil.format(date, 'M/d/yyyy');\r\n const services = [state.getPromise('$daterange'), fetchPaginationConfig(gridName, 50)];\r\n if (getSegPreference && _.isFunction(getSegPreference)) {\r\n services.push(getSegPreference(gridName));\r\n }\r\n if (customColumnPreference) {\r\n services.push(customColumnPreference.getCustomColumnsPreference(gridName));\r\n }\r\n\r\n return Promise\r\n .all(services)\r\n .spread(((dateRange, { pageSize, orderbyInfo, sortableHeader }) => {\r\n const result = {\r\n dataSource: {\r\n query: {},\r\n options: {},\r\n },\r\n pageable: {},\r\n plugins: {\r\n pagination: {},\r\n },\r\n };\r\n\r\n result.pageable.pageSize = pageSize;\r\n result.plugins.pagination.pageSize = pageSize;\r\n\r\n result.dataSource.query.endDate = formatDate(dateRange.end);\r\n result.dataSource.query.startDate = formatDate(dateRange.start);\r\n\r\n if (dateRange.compared) {\r\n result.dataSource.query.comparisonEndDate = formatDate(dateRange.compared.end);\r\n result.dataSource.query.comparisonStartDate = formatDate(dateRange.compared.start);\r\n }\r\n\r\n if (getSegType && _.isFunction(getSegType)) {\r\n const segType = getSegType(gridName);\r\n if (segType && segType.segmentationType !== 'None' && segmentTimeChecker.isTimeRangeValid(segType.segmentationType)) {\r\n result.dataSource.query.SegmentationTypes = segType.segmentationType;\r\n }\r\n }\r\n\r\n if (orderbyInfo && orderbyInfo.length > 0) {\r\n result.dataSource.orderby = orderbyInfo;\r\n result.sortableHeader = _.pick(sortableHeader, 'name', 'directionIndex');\r\n }\r\n\r\n return result;\r\n }));\r\n};\r\n","/* istanbul ignore file */\r\nimport $ from 'jquery';\r\nimport _ from 'underscore';\r\nimport { AlertHelper } from '@bingads-webui-campaign/alert-helper';\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\n\r\n// complex fields will impact value of other fields\r\nconst complexFields = ['EndDate', 'Status'];\r\n\r\nfunction normalizeDate(i18n, value) {\r\n return value ? i18n.formatDate(new Date(value), { raw: 'MM/dd/yyyy', timeZone: 'UTC' }) : null;\r\n}\r\n\r\nexport function inlineEditSave({\r\n id,\r\n fieldName,\r\n updatedItem,\r\n additionalPayload = {},\r\n disableBulk = false,\r\n refreshGrid = false,\r\n}, {\r\n view,\r\n gridView,\r\n resource,\r\n scenario,\r\n i18n,\r\n i18nErrors,\r\n editorView,\r\n editorViewCallbackAfterUpdate,\r\n importNotificationCallback,\r\n isDateType = false,\r\n customBlockerTarget = null,\r\n}) {\r\n const payload = _.clone(additionalPayload);\r\n // grid load will get date with ISO format: 2018-04-05T00:00:00.000Z,\r\n // we use bulk upsert api to do inline update, but bulk upsert cannot use the ISO format\r\n // as MT seems doing some sepcial transformation with this format\r\n // to fix this, we upsert with a MM/dd/yyyy format, but update grid with ISO format\r\n const $el = gridView ? gridView.$el : view.grid.gridView.$el;\r\n const uiBlockerTarget = customBlockerTarget ? $(customBlockerTarget) : $el;\r\n\r\n if (updatedItem) {\r\n payload[fieldName] = isDateType ? normalizeDate(i18n, updatedItem[fieldName]) : updatedItem[fieldName];\r\n } else {\r\n payload[fieldName] = null;\r\n }\r\n\r\n resource\r\n .update(id, payload, disableBulk ? undefined : { adapter: 'bulk' })\r\n .finally(withUiBlock(uiBlockerTarget))\r\n .then(() => {\r\n if (editorViewCallbackAfterUpdate && _.isFunction(editorViewCallbackAfterUpdate)) {\r\n editorViewCallbackAfterUpdate();\r\n }\r\n\r\n // show import related notifications if any\r\n if (importNotificationCallback && _.isFunction(importNotificationCallback)) {\r\n importNotificationCallback();\r\n }\r\n\r\n if (refreshGrid || _.contains(complexFields, fieldName)) {\r\n view.grid.gridView.refresh(true);\r\n } else if (updatedItem) {\r\n view.grid.gridView.trigger('didEdit', updatedItem);\r\n }\r\n })\r\n .catch((response) => {\r\n const errorMapping = {};\r\n const unexpectedError = i18n.getString('ErrorNumber_-1');\r\n\r\n if (!response || !response.errors) {\r\n errorMapping[fieldName] = unexpectedError;\r\n } else {\r\n const errors = i18nErrors.getBulkApiErrors(response.errors, scenario);\r\n\r\n if (!errors || !errors[0] || !errors[0].message) {\r\n errorMapping[fieldName] = unexpectedError;\r\n } else {\r\n errorMapping[fieldName] = errors[0].message;\r\n }\r\n }\r\n\r\n if (editorView && _.isFunction(editorView.setErrors)) {\r\n editorView.setErrors(errorMapping);\r\n } else {\r\n const alertHelper = new AlertHelper({ i18n });\r\n alertHelper.showError(errorMapping[fieldName]);\r\n }\r\n });\r\n}\r\n\r\n","import * as PopupEditor from '@bingads-webui/popup-editor';\r\n\r\nexport function InlineEditableColumnPrompt({\r\n position, item, i18n, fieldName, customValidators = null, schema, saveModel,\r\n}) {\r\n PopupEditor.prompt({\r\n position,\r\n i18n,\r\n schema,\r\n model: item,\r\n fields: [fieldName],\r\n hasLabels: false,\r\n template: 'inline',\r\n customValidators,\r\n saveModel,\r\n parentContainerSelector: '.grid-and-disclaim-container',\r\n });\r\n}\r\n","import { parseIntBase64 } from '@bingads-webui-universal/primitive-utilities';\r\n\r\nexport function parseCompactedKeywords(selectedKeywordIds, matchTypes) {\r\n const matchTypeValues = {\r\n Exact: 1,\r\n Phrase: 2,\r\n Broad: 3,\r\n Content: 5,\r\n Predictive: 9,\r\n };\r\n const keywords = [];\r\n\r\n if (selectedKeywordIds && selectedKeywordIds.length > 0) {\r\n const keywordGroups = selectedKeywordIds.split(';');\r\n\r\n keywordGroups.forEach((group, index) => {\r\n if (group.length > 0) {\r\n const biddedMatchType = matchTypeValues[matchTypes[index]];\r\n group.split(',').forEach((item) => {\r\n keywords.push({\r\n KeywordId: parseIntBase64(item),\r\n BiddedMatchType: biddedMatchType,\r\n });\r\n });\r\n }\r\n });\r\n }\r\n\r\n return keywords;\r\n}\r\n\r\nexport const getTargetEntity = (event, view) => {\r\n const key = view.keyOfElement(event.target);\r\n\r\n return view.itemWithKey(key);\r\n};\r\n","\r\nexport function getGridDataParams(appConfig) {\r\n const currentCustomer = appConfig.get('CurrentCustomer');\r\n const currentCustomerId = currentCustomer ? currentCustomer.Id : undefined;\r\n const gridDataParameters = {};\r\n\r\n if (currentCustomerId) {\r\n gridDataParameters.CurrentCustomerId = currentCustomerId;\r\n }\r\n\r\n return gridDataParameters;\r\n}\r\n","import _ from 'underscore';\r\n\r\nfunction onAfterFindAll(options, data = {}) {\r\n if (_.any(data.errors, err => err.Code === 'TooMuchDataToDownload')) {\r\n this.showTooMuchDataError = true;\r\n }\r\n return data;\r\n}\r\n\r\nexport function setUpErrorHandling({\r\n gridView,\r\n dataSource,\r\n i18n,\r\n scope,\r\n}) {\r\n const view = gridView;\r\n // eslint-disable-next-line no-param-reassign\r\n dataSource.options.afterFindAll = _.bind(onAfterFindAll, view);\r\n view.showTooMuchDataError = false;\r\n view.tooMuchDataErrorText = (scope && scope.campaignId ?\r\n i18n.getString('Grid_SearchTerm_TooMuchDataError_CmpLvl') :\r\n i18n.getString('Grid_SearchTerm_TooMuchDataError'));\r\n}\r\n\r\n","import _ from 'underscore';\r\nimport { parseSync } from '@bingads-webui/safe-json';\r\n\r\nconst headlinePositionKey = ['Headline1', 'Headline2', 'Headline3', 'None'];\r\nconst descriptionPositionKey = ['Description1', 'Description2', 'None'];\r\n\r\nfunction endWithPeriod(text) {\r\n if ('.?!'.indexOf(text.slice(-1)) === -1) {\r\n return `${text}.`;\r\n }\r\n\r\n return text;\r\n}\r\n\r\nexport function combineDescriptions(textPart1, textPart2) {\r\n if (_.isEmpty(textPart1) && _.isEmpty(textPart2)) {\r\n return '';\r\n }\r\n\r\n if (_.isEmpty(textPart1)) {\r\n return endWithPeriod(textPart2);\r\n }\r\n\r\n if (_.isEmpty(textPart2)) {\r\n return endWithPeriod(textPart1);\r\n }\r\n\r\n let combinedText;\r\n\r\n if ('.?!'.indexOf(textPart1.slice(-1)) > -1) {\r\n combinedText = `${textPart1} ${textPart2}`;\r\n } else {\r\n combinedText = `${textPart1}. ${textPart2}`;\r\n }\r\n\r\n return endWithPeriod(combinedText);\r\n}\r\n\r\nexport function combineDescriptionArray(desArray) {\r\n if (!_.isArray(desArray)) {\r\n return '';\r\n }\r\n\r\n if (desArray.length < 2) {\r\n return desArray[0];\r\n }\r\n\r\n return combineDescriptions(desArray[0], desArray[1]);\r\n}\r\n\r\nexport function getPreviewList(data, positionKey) {\r\n if (!_.isArray(data)) {\r\n return [];\r\n }\r\n\r\n const list = _.mapObject(_.invert(positionKey), () => []);\r\n _.each(data, (item) => {\r\n if (!_.isEmpty(_.result(item, 'Text')) && _.has(list, item.PinnedField)) {\r\n list[item.PinnedField].push(item.Text);\r\n }\r\n });\r\n\r\n const dist = _.map(\r\n _.reject(positionKey, i => i === 'None'),\r\n (key) => {\r\n if (_.size(list[key]) > 0) {\r\n return _.first(list[key]);\r\n }\r\n return list.None.shift();\r\n }\r\n );\r\n\r\n return _.compact(dist);\r\n}\r\n\r\nexport function getTitlePreview(headlines) {\r\n return getPreviewList(headlines, headlinePositionKey).join(' | ');\r\n}\r\n\r\nexport function getDescPreview(descriptions) {\r\n return combineDescriptionArray(getPreviewList(descriptions, descriptionPositionKey));\r\n}\r\n\r\nfunction getMoreHint(assets, property, i18n) {\r\n const list = getPreviewList(assets, property === 'Headlines' ? headlinePositionKey : descriptionPositionKey);\r\n return assets.length > list.length ?\r\n i18n.getString('RSA_Count_More').replace('{{count}}', assets.length - list.length) : '';\r\n}\r\n\r\nexport function getMoreTitleHint(headlines, i18n) {\r\n return getMoreHint(headlines, 'Headlines', i18n);\r\n}\r\n\r\nexport function getMoreDescHint(descriptions, i18n) {\r\n return getMoreHint(descriptions, 'Descriptions', i18n);\r\n}\r\n\r\nfunction getMoreHintFromJson(jsonString, property, i18n) {\r\n let values = parseSync(jsonString);\r\n if (!_.isEmpty(values)) {\r\n values = _.map(values, value => parseSync(value));\r\n return getMoreHint(values, property, i18n);\r\n }\r\n return '';\r\n}\r\n\r\nexport function getMoreTitleHintFromJson(jsonString, i18n) {\r\n return getMoreHintFromJson(jsonString, 'Headlines', i18n);\r\n}\r\n\r\nexport function getMoreDescHintFromJson(jsonString, i18n) {\r\n return getMoreHintFromJson(jsonString, 'Descriptions', i18n);\r\n}\r\n\r\nfunction getPreviewFromJson(jsonString, property) {\r\n let values = parseSync(jsonString);\r\n let preview;\r\n\r\n if (!_.isEmpty(values)) {\r\n values = _.map(values, value => parseSync(value));\r\n preview = (property === 'Headlines') ? getTitlePreview(values) : getDescPreview(values);\r\n } else {\r\n preview = jsonString;\r\n }\r\n\r\n return preview;\r\n}\r\n\r\nexport function getTitlePreviewFromJson(headlineValue) {\r\n return getPreviewFromJson(headlineValue, 'Headlines');\r\n}\r\n\r\nexport function getDescPreviewFromJson(descriptionValue) {\r\n return getPreviewFromJson(descriptionValue, 'Descriptions');\r\n}\r\n","let hoverTimeout;\r\nconst hoverDelay = 500;\r\n\r\nexport function handleShowRejectionReasonEnter(thisArg, callback, event) {\r\n const callbackBinded = callback.bind(thisArg, event);\r\n hoverTimeout = setTimeout(() => {\r\n callbackBinded();\r\n }, hoverDelay);\r\n}\r\n\r\nexport function handleShowRejectionReasonLeave(thisArg, callback, event) {\r\n clearTimeout(hoverTimeout);\r\n const callbackBinded = callback.bind(thisArg, event);\r\n callbackBinded();\r\n}\r\n","import _ from 'underscore';\r\nimport { FilterEntity } from '@bingads-webui/filter-entity';\r\nimport { getParameter } from '@bingads-webui/url-util';\r\n\r\n// 2 special urls used by the UCM.\r\n// https://ads.microsoft.com/campaign/Ads.m?filterDisapprovedAds=True&aid=123&cid=1234\r\n// https://ads.microsoft.com/campaign/Keyword.m?filterDisapprovedKeywords=True&aid=123&cid=1234\r\n\r\n// In the feature, may use the '&find=filterKey'in the url.\r\nfunction getFilterKeyFromUrl() {\r\n if (getParameter('filterDisapprovedAds') === 'True') {\r\n return 'filterDisapprovedAds';\r\n }\r\n if (getParameter('filterDisapprovedKeywords') === 'True') {\r\n return 'filterDisapprovedKeywords';\r\n }\r\n\r\n return getParameter('find');\r\n}\r\n\r\nexport function applyFilterFromUrl(filterService, urlFilterMap) {\r\n const filterExpression = getFilterKeyFromUrl();\r\n if (_.isEmpty(filterExpression)) {\r\n return;\r\n }\r\n\r\n let filterObject = null;\r\n\r\n if (_.isUndefined(urlFilterMap)) {\r\n filterObject = JSON.parse(filterExpression);\r\n } else if (_.has(urlFilterMap, filterExpression)) {\r\n filterObject = urlFilterMap[filterExpression];\r\n } else return;\r\n\r\n const urlFilterEntity = FilterEntity.fromLegacy(filterObject, {\r\n entitySchema: filterService.entitySchema,\r\n odata: filterService.odataOptions,\r\n });\r\n\r\n filterService.setEditableFilter(urlFilterEntity.query);\r\n}\r\n\r\nexport function appendScopeParameter(uri, scope) {\r\n if (scope.values.uid) {\r\n uri.addQuery('uid', scope.values.uid);\r\n }\r\n if (scope.values.cid) {\r\n uri.addQuery('cid', scope.values.cid);\r\n }\r\n if (scope.values.aid) {\r\n uri.addQuery('aid', scope.values.aid);\r\n }\r\n}\r\n","function convertDateBetweenTimeZones(date, i18n, {\r\n from,\r\n to,\r\n}) {\r\n const dateString = i18n.formatDate(date, {\r\n timeZone: from,\r\n });\r\n\r\n return i18n.parseDate(dateString, {\r\n timeZone: to,\r\n });\r\n}\r\n\r\nexport function convertMachineDateToUTCDate(date, i18n) {\r\n return convertDateBetweenTimeZones(date, i18n, { from: null, to: 'UTC' });\r\n}\r\n\r\nexport function convertUTCDateToMachineDate(date, i18n) {\r\n return convertDateBetweenTimeZones(date, i18n, { from: 'UTC', to: null });\r\n}\r\n\r\nexport function formatDate(date, i18n) {\r\n return i18n.dateFormatter({ timeZone: 'UTC' })(new Date(date));\r\n}\r\n\r\nexport function displayDate(date, noDateMessage, i18n) {\r\n if (date) {\r\n return formatDate(date, i18n);\r\n }\r\n\r\n return i18n.getString(noDateMessage);\r\n}\r\n\r\nexport function getCurrentDate() {\r\n const now = new Date();\r\n return new Date(now.getFullYear(), now.getMonth(), now.getDate());\r\n}\r\n","import _ from 'underscore';\r\nimport { getColumnConversions, buildSortingConversions } from '@bingads-webui-campaign/column-conversions';\r\n\r\nconst ColumnConversionEnabledFeatures = {\r\n summary_tab_campaign: true,\r\n summary_tab_ad_group: true,\r\n summary_tab_ad: true,\r\n summary_tab_keyword: true,\r\n summary_tab_demographics: true,\r\n settings_locations: true,\r\n settings_ad_schedule: true,\r\n settings_devices: true,\r\n DsaTarget: true,\r\n DsaSearchTerm: true,\r\n AutomatedExtension: true,\r\n AdExtensionAssociation: true,\r\n DimensionsGrid: true,\r\n feed_items: true,\r\n audience_associations_level: true,\r\n ConversionGoalsGrid: true,\r\n SharedBudgetSummaryGrid: true,\r\n SharedBudgetEditGrid: true,\r\n summary_tab_search_term: true,\r\n target_devices_grid: true,\r\n PerformanceGrid: true,\r\n newProductGroupsGrid: true,\r\n PortfolioBidStrategyGrid: true,\r\n};\r\n\r\nexport function validateOrder(preferenceConfig, columns, featureName, permissions) {\r\n const { dynamic = {} } = permissions || {};\r\n const {\r\n ColumnConversion: IsColumnConversionEnabled,\r\n } = dynamic;\r\n const preference = preferenceConfig;\r\n const sourceOrderbyInfo = preference &&\r\n ((preference.dataSource && preference.dataSource.orderby) || preference.orderbyInfo);\r\n if (IsColumnConversionEnabled && ColumnConversionEnabledFeatures[featureName]) {\r\n let patchedOrderbyInfo = sourceOrderbyInfo;\r\n if (preference.sortableHeader) {\r\n const columnConversions = getColumnConversions(columns);\r\n const { applySortingInfoConversion } = buildSortingConversions(columnConversions);\r\n const { sortableHeader, orderbyInfo } = applySortingInfoConversion({\r\n sortableHeader: preference.sortableHeader,\r\n orderbyInfo: sourceOrderbyInfo,\r\n });\r\n preference.sortableHeader = sortableHeader;\r\n patchedOrderbyInfo = orderbyInfo;\r\n }\r\n\r\n if (patchedOrderbyInfo) {\r\n const sortableColumns = _.chain(columns)\r\n .filter(column => column.sortable)\r\n .map(column => column.sortable.key)\r\n .value();\r\n\r\n const updatedOrder = [];\r\n _.each(patchedOrderbyInfo, (order) => {\r\n if (_.contains(sortableColumns, order.key)) {\r\n updatedOrder.push(order);\r\n }\r\n });\r\n\r\n if (preference && preference.dataSource && preference.dataSource.orderby) {\r\n preference.dataSource.orderby = updatedOrder;\r\n } else if (preference.orderbyInfo) {\r\n preference.orderbyInfo = updatedOrder;\r\n }\r\n }\r\n } else if (sourceOrderbyInfo) {\r\n const sortableColumns = _.chain(columns)\r\n .filter(column => column.sortable)\r\n .map(column => column.sortable.key)\r\n .value();\r\n\r\n const updatedOrder = [];\r\n _.each(sourceOrderbyInfo, (order) => {\r\n if (_.contains(sortableColumns, order.key)) {\r\n updatedOrder.push(order);\r\n }\r\n });\r\n\r\n if (preference.dataSource && preference.dataSource.orderby) {\r\n preference.dataSource.orderby = updatedOrder;\r\n if (_.isEmpty(preference.dataSource.orderby)) {\r\n delete preference.sortableHeader;\r\n }\r\n } else if (preference.orderbyInfo) {\r\n preference.orderbyInfo = updatedOrder;\r\n }\r\n }\r\n}\r\n","export const surveyStatus = {\r\n INIT: 'init',\r\n SUBMIT: 'submit',\r\n FIRST_DISMISS: 'first-dismiss',\r\n SECOND_DISMISS: 'second-dismiss',\r\n THIRD_DISMISS: 'third-dismiss',\r\n FOURTH_DISMISS: 'fourth-dismiss',\r\n};\r\n","import { result, chain, isEmpty } from 'underscore';\r\n\r\nexport class SurveyPreferenceService {\r\n constructor(props) {\r\n this.surveyPreferenceKey = 'SurveyPreference';\r\n this.PreferenceService = result(props, 'PreferenceService');\r\n\r\n this.initializeSurveyPreference();\r\n }\r\n\r\n initializeSurveyPreference = () => {\r\n if (isEmpty(this.PreferenceService)) {\r\n throw new Error('PreferenceService does not exist');\r\n }\r\n\r\n let surveyPreference = this.getSurveyPreference();\r\n // initialize survey preference if it does not exist\r\n if (isEmpty(surveyPreference)) {\r\n surveyPreference = {\r\n Name: this.surveyPreferenceKey,\r\n Data: {},\r\n Type: 'string',\r\n Version: 1,\r\n };\r\n this.PreferenceService.setAtUserLevel(surveyPreference);\r\n }\r\n };\r\n\r\n getDaysAgo = (days) => {\r\n const now = new Date();\r\n now.setTime(Date.now() - (86400000 * days));\r\n return now;\r\n };\r\n\r\n getDaysAfter = (days, startDate) => {\r\n const date = startDate ? new Date(startDate) : new Date();\r\n date.setTime(date.getTime() + (86400000 * days));\r\n return date;\r\n };\r\n\r\n getSurveyPreference = () => this.PreferenceService.findByNameAtUserLevel(this.surveyPreferenceKey);\r\n getAtUserLevel = key => this.PreferenceService.findByNameAtUserLevel(key);\r\n\r\n getSurveyState = ({ surveyName }) => {\r\n const surveyPreference = this.getSurveyPreference();\r\n return chain(surveyPreference)\r\n .result('Data')\r\n .result(surveyName)\r\n .value();\r\n };\r\n\r\n setSurveyState = ({ surveyName, surveyState }) => {\r\n const surveyPreference = this.getSurveyPreference();\r\n surveyPreference.Data[surveyName] = surveyState;\r\n this.PreferenceService.setAtUserLevel(surveyPreference);\r\n };\r\n}\r\n","import { isEmpty, result } from 'underscore';\r\nimport { surveyStatus } from './survey-status';\r\nimport { SurveyPreferenceService } from './survey-preference-service';\r\n\r\nexport class BaseSurvey {\r\n /*\r\n * @param {props} all context needed for the survey. E.g. serverContext, preferenceService\r\n */\r\n constructor(props) {\r\n this.serverContext = props.serverContext;\r\n this.SurveyPreferenceService = new SurveyPreferenceService({\r\n PreferenceService: props.PreferenceService,\r\n });\r\n this.logActivity = props.logActivity;\r\n\r\n this.isTestEnv = !result(this.serverContext, 'IsProdEnv') && !window.location.href.toLowerCase().includes('ads.microsoft.com');\r\n }\r\n\r\n /*\r\n * @return {React.Component} React component of the survey view\r\n */\r\n getSurveyComponent = () => {\r\n throw new Error('Method not implemented');\r\n };\r\n\r\n /*\r\n * @param {isTestEnv} indicate if a survey is in the test environment\r\n * @return {string} the OCV survey Id where the feedback sent to\r\n */\r\n getSurveyId = (/* isTestEnv */) => {\r\n throw new Error('Method not implemented');\r\n };\r\n\r\n /*\r\n * @return {string} name of the survey. This is used for logging\r\n */\r\n getSurveyName = () => {\r\n throw new Error('Method not implemented');\r\n };\r\n\r\n /*\r\n * Survey should not change their priority without an exception\r\n * @return {number} priority of the survey. The larger the number, the higher the priority\r\n */\r\n getSurveyPriority = () => 100;\r\n\r\n /*\r\n * validate the trigger conditions of the survey\r\n * @return {bool} indicate if the survey is enabled to trigger\r\n */\r\n validateTriggerCondition = () => {\r\n throw new Error('Method not implemented');\r\n };\r\n\r\n /*\r\n * Return the custom params of the survey. E.g. { event: xxx, sku: xxx }\r\n * The params will be sent to the OCV. You can find it in the App Data Fields along with the feedback.\r\n * @return {object} custom params (key-value pairs) of the survey to be sent to the OCV survey\r\n */\r\n getSurveyCustomParams = () => ({});\r\n\r\n /*\r\n * Return the initializationConfig of the survey. This is used to initialize the survey preference\r\n * @return {object} initializationConfig of the survey\r\n * @return {string} initializationConfig.initGroup the group count to split with\r\n * @return {string} initializationConfig.initStartDate the start date of the initialization\r\n * @return {string} initializationConfig.initEndDate the end date of the initialization\r\n */\r\n getInitializationConfig = () => ({});\r\n\r\n /*\r\n * validate the user governance of the survey, e.g. whether the user passes the cooldown period\r\n * @return {bool} indicate if the survey is enabled to trigger\r\n */\r\n validateUserGovernance = () => {\r\n if (this.isTestEnv) {\r\n this.logActivity(`User Governance | survey: ${this.getSurveyName()}, isTestEnv: ${this.isTestEnv}`);\r\n return true;\r\n }\r\n\r\n const checkSurveyState = (surveyState) => {\r\n // check whether current time exceeds the survey next shown date, show the survey if it is\r\n const isSurveyShown = Date.now() > new Date(surveyState.nextShownDate);\r\n this.logActivity(`User Governance | survey: ${this.getSurveyName()}, isSurveyShown: ${isSurveyShown}, Now: ${Date()}, NextShownDate: ${surveyState.nextShownDate}, Status: ${surveyState.status}`);\r\n return isSurveyShown;\r\n };\r\n\r\n const surveyState = this.SurveyPreferenceService.getSurveyState({\r\n surveyName: this.getSurveyName(),\r\n });\r\n\r\n if (!isEmpty(surveyState) && surveyState.nextShownDate != null) {\r\n return checkSurveyState(surveyState);\r\n }\r\n\r\n // not setup the survey preference for this survey yet, initialize the survey preference\r\n const initializationConfig = this.getInitializationConfig();\r\n if (!isEmpty(initializationConfig)) {\r\n // get initializationConfig, initialize the survey preference\r\n if (initializationConfig.initGroup && initializationConfig.initStartDate && initializationConfig.initEndDate) {\r\n const { initGroup } = initializationConfig;\r\n const userGroup = result(this.serverContext, ['CurrentUser', 'Id']) % initGroup;\r\n const initStartDate = new Date(initializationConfig.initStartDate);\r\n const initEndDate = new Date(initializationConfig.initEndDate);\r\n const initUnit = ((initEndDate - initStartDate) / 86400000) / initGroup;\r\n\r\n const newSurveyState = {\r\n status: surveyStatus.INIT,\r\n nextShownDate: this.SurveyPreferenceService.getDaysAfter(Math.floor(userGroup * initUnit), initializationConfig.initStartDate),\r\n };\r\n this.SurveyPreferenceService.setSurveyState({\r\n surveyName: this.getSurveyName(),\r\n surveyState: newSurveyState,\r\n });\r\n this.logActivity(`User Governance | survey: ${this.getSurveyName()}, Initialization success, NextShownDate: ${newSurveyState.nextShownDate}, Status: ${newSurveyState.status}`);\r\n\r\n return checkSurveyState(newSurveyState);\r\n }\r\n\r\n this.logActivity(`User Governance | survey: ${this.getSurveyName()}, Initialization failed, initGroup: ${initializationConfig.initGroup}, initStartDate: ${initializationConfig.initStartDate}, initEndDate: ${initializationConfig.initEndDate}`);\r\n throw new Error(`Initialization failed, initGroup: ${initializationConfig.initGroup}, initStartDate: ${initializationConfig.initStartDate}, initEndDate: ${initializationConfig.initEndDate}`);\r\n } else {\r\n // bypass the initialization, show the survey\r\n this.logActivity(`User Governance | survey: ${this.getSurveyName()}, Bypass initialization`);\r\n return true;\r\n }\r\n };\r\n\r\n /*\r\n * Callback called when rending a survey, update the survey trigger condition / user governance\r\n */\r\n onSurveyRender = () => {\r\n /* not implemented */\r\n };\r\n\r\n /*\r\n * Callback called when submitting a survey, update the survey trigger condition / user governance\r\n */\r\n onSurveySubmit() {\r\n const newSurveyState = {\r\n status: surveyStatus.SUBMIT,\r\n nextShownDate: this.SurveyPreferenceService.getDaysAfter(180),\r\n };\r\n this.SurveyPreferenceService.setSurveyState({\r\n surveyName: this.getSurveyName(),\r\n surveyState: newSurveyState,\r\n });\r\n }\r\n\r\n /*\r\n * Callback called when dismissing a survey, update the survey trigger condition / user governance\r\n */\r\n onSurveyDismiss() {\r\n const surveyState = this.SurveyPreferenceService.getSurveyState({\r\n surveyName: this.getSurveyName(),\r\n });\r\n\r\n let newSurveyState = {};\r\n if (!isEmpty(surveyState)) {\r\n const { status } = surveyState;\r\n switch (status) {\r\n case surveyStatus.FIRST_DISMISS:\r\n // set new state to second-dismiss and next shown date to 14 days\r\n newSurveyState = {\r\n status: surveyStatus.SECOND_DISMISS,\r\n nextShownDate: this.SurveyPreferenceService.getDaysAfter(14),\r\n };\r\n break;\r\n case surveyStatus.SECOND_DISMISS:\r\n // set new state to third-dismiss and next shown date to 30 days\r\n newSurveyState = {\r\n status: surveyStatus.THIRD_DISMISS,\r\n nextShownDate: this.SurveyPreferenceService.getDaysAfter(30),\r\n };\r\n break;\r\n case surveyStatus.THIRD_DISMISS:\r\n // set new state to fourth-dismiss and next shown date to 180 days\r\n newSurveyState = {\r\n status: surveyStatus.FOURTH_DISMISS,\r\n nextShownDate: this.SurveyPreferenceService.getDaysAfter(180),\r\n };\r\n break;\r\n case surveyStatus.INIT:\r\n case surveyStatus.SUBMIT:\r\n case surveyStatus.FOURTH_DISMISS:\r\n default:\r\n // new cycle, set new state to first-dismiss and next shown date to 7 days\r\n newSurveyState = {\r\n status: surveyStatus.FIRST_DISMISS,\r\n nextShownDate: this.SurveyPreferenceService.getDaysAfter(7),\r\n };\r\n break;\r\n }\r\n } else {\r\n // new cycle, set new state to first-dismiss and next shown date to 7 days\r\n newSurveyState = {\r\n status: surveyStatus.FIRST_DISMISS,\r\n nextShownDate: this.SurveyPreferenceService.getDaysAfter(7),\r\n };\r\n }\r\n\r\n this.SurveyPreferenceService.setSurveyState({\r\n surveyName: this.getSurveyName(),\r\n surveyState: newSurveyState,\r\n });\r\n }\r\n\r\n /*\r\n * @return {bool} whether the survey is onboarded to the CSAT reporting pipeline.\r\n * See the details of the pipeline here:\r\n * https://msasg.visualstudio.com/Bing_Ads/_wiki/wikis/Bing_Ads.wiki/122337/CSAT-Reporting\r\n */\r\n isReportingPipelineEnabled = () => false;\r\n\r\n /*\r\n * @return {string} product of the survey. This is used for the CSAT reporting pipeline.\r\n * Only works when isReportingPipelineEnabled is true.\r\n */\r\n getSurveyProduct = () => {\r\n if (this.isReportingPipelineEnabled()) {\r\n throw new Error('Method not implemented');\r\n }\r\n };\r\n\r\n /*\r\n * @return {string} interface of the survey. This is used for the CSAT reporting pipeline.\r\n * Only works when isReportingPipelineEnabled is true.\r\n */\r\n getSurveyInterface = () => {\r\n if (this.isReportingPipelineEnabled()) {\r\n throw new Error('Method not implemented');\r\n }\r\n };\r\n}\r\n","import './global.types';\r\n\r\nexport class IQuestionConfigurator {\r\n surveyConfigurator: any;\r\n position: number;\r\n key: string;\r\n optionKeyToRating: {};\r\n optionKeyToText: {};\r\n serverContext: any;\r\n data: any;\r\n configuration: any;\r\n i18n: any;\r\n validator: any;\r\n\r\n // eslint-disable-next-line no-useless-constructor, no-empty-function\r\n constructor(props: any) {\r\n }\r\n\r\n isValid(answers: any): boolean {\r\n throw new Error('Not implemented');\r\n }\r\n\r\n isVisible(answers: any): boolean {\r\n throw new Error('Not implemented');\r\n }\r\n\r\n getDefaultData(): Object {\r\n throw new Error('Not implemented');\r\n }\r\n\r\n getDefaultDirtyState(bool: boolean): Object {\r\n throw new Error('Not implemented');\r\n }\r\n\r\n isEmail(): boolean {\r\n throw new Error('Not implemented');\r\n }\r\n\r\n isRating(): boolean {\r\n throw new Error('Not implemented');\r\n }\r\n\r\n isComment(): boolean {\r\n throw new Error('Not implemented');\r\n }\r\n\r\n getFeedbackData(answers: any): any {\r\n throw new Error('Not implemented');\r\n }\r\n\r\n getView(): (props: any) => JSX.Element {\r\n throw new Error('Method not implemented.');\r\n }\r\n}\r\n\r\nexport interface I18n {\r\n getString(key, options?: any): string;\r\n}\r\n\r\nexport interface Question {\r\n isRequired: boolean;\r\n Type: typeof IQuestionConfigurator;\r\n key: string;\r\n page: number;\r\n position: number;\r\n // The title of the question may be dependent on the answers to other questions.\r\n getTitle?: (answers: any, surveyConfigurator: any) => string;\r\n // The visibility of a question may dependent on the answers to other questions.\r\n isVisible?: (answers: any) => boolean;\r\n // The description of the question may be dependent on the answers to other questions.\r\n getDescription?: (answers: any, surveyConfigurator: any) => string;\r\n href?: string,\r\n linkText?: string,\r\n}\r\n\r\ninterface SelectionOption {\r\n key: string;\r\n text: string;\r\n hasInput?: boolean;\r\n href?: string;\r\n linkText?: string;\r\n placeholder?: string;\r\n maxLength?: number;\r\n}\r\n\r\nexport interface RatingOption extends SelectionOption {\r\n key: '1' | '2' | '3' | '4' | '5';\r\n rating: 0.2 | 0.4 | 0.6 | 0.8 | 1.0;\r\n hasInput?: false;\r\n}\r\n\r\nexport interface RatingData {\r\n selectedOption: string;\r\n}\r\n\r\ninterface RatingQuestion extends Question {\r\n key: 'rating';\r\n options: RatingOption[];\r\n // if data is set, it will be used to prefill the question\r\n data?: RatingData;\r\n}\r\n\r\nexport interface SingleSelectionData {\r\n selectedOption: string;\r\n [key: string]: string;\r\n}\r\n\r\ninterface SingleSelectionQuestion extends Question {\r\n options: SelectionOption[];\r\n // if data is set, it will be used to prefill the question\r\n data?: SingleSelectionData;\r\n}\r\n\r\nexport interface MultipleSelectionData {\r\n [key: string]: {\r\n input: string,\r\n selected: boolean,\r\n },\r\n}\r\n\r\ninterface MultipleSelectionQuestion extends Question {\r\n options: SelectionOption[];\r\n // if data is set, it will be used to prefill the question\r\n data?: MultipleSelectionData;\r\n}\r\n\r\nexport interface CommentData {\r\n input: string,\r\n}\r\n\r\ninterface CommentQuestion extends Question {\r\n maxLength?: number;\r\n placeholder?: string;\r\n // if data is set, it will be used to prefill the question\r\n data?: CommentData;\r\n}\r\n\r\ninterface EmailOption extends SelectionOption {\r\n key: 'yes' | 'no';\r\n}\r\n\r\nexport interface EmailData {\r\n selectedOption: 'yes' | 'no';\r\n yes?: string,\r\n}\r\n\r\ninterface EmailQuestion extends Question {\r\n key: 'email';\r\n options: EmailOption[];\r\n // if data is set, it will be used to prefill the question\r\n data?: EmailData;\r\n}\r\n\r\nexport type QuestionConfiguration = RatingQuestion | SingleSelectionQuestion | MultipleSelectionQuestion | CommentQuestion | EmailQuestion;\r\n\r\nexport interface PageConfiguration {\r\n}\r\n\r\nexport type Others = {\r\n shouldHideInputWhenNotSelected?: boolean;\r\n isThankYouPageEnabled?: boolean;\r\n isGlobalModalStyleEnabled?: boolean;\r\n userActionAnalysisEnabled?: boolean;\r\n combineTextInputToComment?: boolean;\r\n // survey which triggered by user's action\r\n // e.g. click on a button, is considered as user initiated survey\r\n isUserInitiatedSurvey?: boolean;\r\n shouldAutoClose?: boolean;\r\n isInPageMiddle?: boolean;\r\n isModeless?: boolean;\r\n isBlocking?: boolean;\r\n}\r\n\r\nexport interface SurveyConfiguration {\r\n // feature area is used to classify the feedback. You can find and create feature areas at\r\n // https://ocv.microsoft.com/#/manage/?aid=a9bfe3b9-40d8-443d-9d80-ba3369aa1463\r\n featureArea: string;\r\n // up to one rating question per survey\r\n rating?: RatingQuestion;\r\n // up to one email question per survey\r\n email?: EmailQuestion;\r\n // no restriction on the number of selection/comment questions per survey\r\n questions?: QuestionConfiguration[];\r\n // style json object is used to customize the look and feel of the survey.\r\n style?: any;\r\n // other configuration flags\r\n others?: Others;\r\n // properties for over writing the modal properties\r\n modalSettings?: any;\r\n}\r\n","export class Validator {\r\n validate({ data, configuration }) : boolean {\r\n return true;\r\n }\r\n\r\n // errors for the body except the title\r\n getError({ data, configuration, i18n }) : Object {\r\n return {};\r\n }\r\n\r\n isAnswered({ data, configuration, i18n }) : string | undefined {\r\n return undefined;\r\n }\r\n}\r\n","import React from 'react';\r\nimport { IQuestionConfigurator } from '../../survey.types';\r\nimport { Validator } from '../validator';\r\n\r\nexport class QuestionConfigurator extends IQuestionConfigurator {\r\n constructor({\r\n serverContext, configuration, i18n, surveyConfigurator,\r\n }) {\r\n super({});\r\n this.serverContext = serverContext;\r\n const {\r\n data,\r\n key,\r\n position,\r\n } = configuration;\r\n this.key = key;\r\n this.position = position;\r\n this.data = data;\r\n this.configuration = configuration;\r\n this.i18n = i18n;\r\n this.surveyConfigurator = surveyConfigurator;\r\n this.initValidator();\r\n }\r\n\r\n // polymorphism of the view\r\n get view(): (props: any) => JSX.Element {\r\n throw new Error('Not implemented');\r\n }\r\n\r\n // polymorphism of the validator\r\n initValidator() {\r\n this.validator = new Validator();\r\n }\r\n\r\n // determine if question is valid, delegating to validator\r\n isValid(answers: Object) {\r\n const isVisible = this.isVisible(answers);\r\n if (isVisible) {\r\n const data = answers[this.key];\r\n return this.validator.validate({ data, configuration: this.configuration });\r\n }\r\n return true;\r\n }\r\n\r\n // determine if question is valid, delegating to validator\r\n getError(data: Object) {\r\n return this.validator.getError({\r\n data,\r\n configuration: this.configuration,\r\n i18n: this.i18n,\r\n });\r\n }\r\n\r\n // determine if question is answered, delegating to validator\r\n isAnswered(data: Object) {\r\n return this.validator.isAnswered({\r\n data,\r\n configuration: this.configuration,\r\n i18n: this.i18n,\r\n });\r\n }\r\n\r\n // determine if question is valid, delegating to configuration\r\n isVisible(answers: Object) {\r\n if (typeof this.configuration.isVisible === 'function') {\r\n return this.configuration.isVisible(answers, this.surveyConfigurator);\r\n }\r\n return true;\r\n }\r\n\r\n // get the title of the question, delegating to configuration\r\n getTitle(answers: Object) {\r\n return this.configuration.getTitle(answers, this.surveyConfigurator);\r\n }\r\n\r\n // get the description of the question, delegating to configuration\r\n getDescription(answers: Object) {\r\n if (this.configuration.getDescription === undefined) {\r\n return null;\r\n }\r\n return this.configuration.getDescription(answers, this.surveyConfigurator);\r\n }\r\n\r\n // get the original configuration for customized purposes\r\n getConfiguration() {\r\n return this.configuration;\r\n }\r\n\r\n // get the default data for the question\r\n getDefaultData(): Object {\r\n return {};\r\n }\r\n\r\n getDefaultDirtyState(bool: boolean): Object {\r\n return bool;\r\n }\r\n\r\n // get the functional polymorphism of the view\r\n getView(): (props: any) => JSX.Element {\r\n const View = this.view;\r\n return props =>\r\n ();\r\n }\r\n\r\n // email is a special case of question and has a specific entry for OCV service\r\n isEmail() {\r\n return this.key === 'email';\r\n }\r\n\r\n // rating is a special case of question and has a specific entry for OCV service\r\n isRating() {\r\n return this.key === 'rating';\r\n }\r\n\r\n isComment() {\r\n return false;\r\n }\r\n\r\n // get the feedback data for sending to the OCV service\r\n getFeedbackData(answers: any): any {\r\n const data = answers[this.key];\r\n return data;\r\n }\r\n}\r\n","import { createContext } from 'react';\r\n\r\nexport const SurveyContext = createContext({});\r\n","import { getTheme } from '@fluentui/react';\r\n\r\nexport const theme = getTheme();\r\n\r\nexport const surveyMaxWidth = 480;\r\n\r\nexport const iconButtonStyles = {\r\n root: {\r\n color: theme.palette.neutralPrimary,\r\n marginLeft: 'auto',\r\n marginTop: '4px',\r\n marginRight: '2px',\r\n },\r\n rootHovered: {\r\n color: theme.palette.neutralDark,\r\n },\r\n};\r\n\r\nexport const closeButtonStyles = {\r\n ...iconButtonStyles,\r\n root: {\r\n ...iconButtonStyles.root,\r\n '&:focus::after': {\r\n width: '22px',\r\n transform: 'translateX(-1px)',\r\n },\r\n },\r\n};\r\n\r\nexport const backButtonStyles = {\r\n ...iconButtonStyles,\r\n root: {\r\n ...iconButtonStyles.root,\r\n '&:focus::after': {\r\n width: '22px',\r\n transform: 'translateX(-5px)',\r\n },\r\n },\r\n};\r\n\r\nexport const modalStyles = ({\r\n modalView: {\r\n zIndex: 1000001,\r\n },\r\n});\r\n\r\nexport const surveyStyles = ({\r\n container: {\r\n padding: 24,\r\n maxWidth: surveyMaxWidth,\r\n },\r\n body: {\r\n color: theme.palette.neutralPrimary,\r\n '& .question-block ~ .question-block': {\r\n marginTop: '16px',\r\n },\r\n '& .question-block': {\r\n '& .customized-option label, .checkbox-group label': {\r\n padding: 'unset',\r\n fontWeight: 'unset',\r\n },\r\n },\r\n },\r\n});\r\n","import React, { useMemo, useContext, Fragment, forwardRef } from 'react';\r\nimport classNames from 'classnames';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n IconButton,\r\n Text,\r\n} from '@fluentui/react';\r\nimport { SurveyContext } from '@bingads-webui-campaign-react/survey-context';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { SurveyContextType } from '../../../survey-context';\r\nimport { closeButtonStyles, backButtonStyles, theme } from '../../../styles';\r\nimport { I18n } from '../../../survey.types';\r\n\r\nconst EndingPageHeader = forwardRef((props: {\r\n onDone: any,\r\n classes: any,\r\n}, ref: any): JSX.Element => {\r\n const {\r\n onDone,\r\n classes,\r\n } = props;\r\n\r\n const i18n: I18n = useContext(I18nContext);\r\n\r\n // @ts-ignore\r\n const surveyContext : SurveyContextType = useContext(SurveyContext);\r\n const {\r\n logActivity,\r\n getPageIndex,\r\n } = surveyContext;\r\n\r\n return (\r\n \r\n \r\n {i18n.getString(_TL_('Thank you for your feedback'))}\r\n \r\n
\r\n {\r\n onDone();\r\n logActivity(`page: ${getPageIndex()}, crossOutButton: done`);\r\n }}\r\n componentRef={ref}\r\n />\r\n
\r\n
\r\n );\r\n});\r\n\r\nconst QuestionHeader = forwardRef((props: {\r\n onBack: any,\r\n onDismiss: any,\r\n isMiddlePage: boolean,\r\n classes: any,\r\n}, ref: any): JSX.Element => {\r\n const {\r\n onBack,\r\n onDismiss,\r\n isMiddlePage,\r\n classes,\r\n } = props;\r\n\r\n const i18n: I18n = useContext(I18nContext);\r\n\r\n // @ts-ignore\r\n const surveyContext : SurveyContextType = useContext(SurveyContext);\r\n const {\r\n logActivity,\r\n getPageIndex,\r\n } = surveyContext;\r\n\r\n return (\r\n \r\n
\r\n {isMiddlePage &&\r\n { onBack(); logActivity(`page: ${getPageIndex()}, backButton: back`); }}\r\n componentRef={ref}\r\n />\r\n }\r\n \r\n {i18n.getString(_TL_('Feedback to Microsoft'))}\r\n \r\n
\r\n
\r\n { onDismiss('icon'); logActivity(`page: ${getPageIndex()}, crossOutButton: dismiss`); }}\r\n componentRef={isMiddlePage ? undefined : ref}\r\n />\r\n
\r\n
\r\n );\r\n});\r\n\r\ninterface HeaderProps {\r\n isFirstPage: boolean;\r\n isEndingPage: boolean;\r\n classes: any;\r\n onDismiss: any;\r\n onBack: any;\r\n onDone: any;\r\n}\r\n\r\nexport const Header = forwardRef((props: HeaderProps, ref): JSX.Element => {\r\n const {\r\n isFirstPage,\r\n isEndingPage,\r\n } = props;\r\n\r\n const classes: any = useDefaultStyles(() => ({\r\n title: {\r\n fontSize: '16px',\r\n color: theme.palette.black,\r\n fontWeight: 600,\r\n },\r\n header: {\r\n flex: '1 1 auto',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'space-between',\r\n '& button': {\r\n padding: 'unset',\r\n marginTop: 'unset',\r\n },\r\n marginBottom: '8px',\r\n },\r\n backIconButton: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n '& button.ms-Button': {\r\n paddingLeft: 0,\r\n marginLeft: 0,\r\n width: 'unset',\r\n },\r\n '& button.ms-Button:hover': {\r\n color: 'unset',\r\n backgroundColor: 'unset',\r\n },\r\n '& button.ms-Button i': {\r\n paddingLeft: 0,\r\n marginLeft: 0,\r\n },\r\n },\r\n closeIconButton: {\r\n '& button.ms-Button': {\r\n paddingRight: 0,\r\n marginRight: 0,\r\n width: 'unset',\r\n },\r\n '& button.ms-Button i': {\r\n paddingRight: 0,\r\n marginRight: 0,\r\n },\r\n '& button.ms-Button:hover': {\r\n color: 'unset',\r\n backgroundColor: 'unset',\r\n },\r\n },\r\n doneIconButton: {\r\n '& button.ms-Button': {\r\n paddingRight: 0,\r\n marginRight: 0,\r\n width: 'unset',\r\n },\r\n '& button.ms-Button i': {\r\n paddingRight: 0,\r\n marginRight: 0,\r\n },\r\n '& button.ms-Button:hover': {\r\n color: 'unset',\r\n backgroundColor: 'unset',\r\n },\r\n },\r\n }));\r\n\r\n const isMiddlePage = useMemo(() =>\r\n !isFirstPage && !isEndingPage, [isFirstPage, isEndingPage]);\r\n\r\n return (\r\n
\r\n {isEndingPage ?\r\n :\r\n }\r\n
\r\n );\r\n});\r\n","import React, { useContext, Fragment, forwardRef } from 'react';\r\nimport classNames from 'classnames';\r\nimport {\r\n Link,\r\n PrimaryButton,\r\n DefaultButton,\r\n} from '@fluentui/react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { SurveyContext } from '@bingads-webui-campaign-react/survey-context';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { ReactTemplate } from '@bingads-webui-react/react-template';\r\nimport { Glyphicon } from '@bingads-webui-react/primitive';\r\nimport { theme } from '../../../styles';\r\nimport { I18n } from '../../../survey.types';\r\nimport { SurveyContextType } from '../../../survey-context';\r\n\r\nfunction PrivacyStatement(props: { classes: any }): JSX.Element {\r\n const {\r\n classes,\r\n } = props;\r\n\r\n const i18n: I18n = useContext(I18nContext);\r\n\r\n return (\r\n
\r\n (\r\n \r\n {`${text} `}\r\n \r\n \r\n ),\r\n }}\r\n template={\r\n i18n.getString(_TL_('By pressing submit, your feedback will be used to improve Microsoft products and services. {{a}}Privacy statement{{/a}}'))\r\n }\r\n />\r\n
\r\n );\r\n}\r\n\r\nconst EndingPageFooter = forwardRef((props: { onDone: any; classes: any }, ref: any): JSX.Element => {\r\n const {\r\n onDone,\r\n classes,\r\n } = props;\r\n\r\n const i18n: I18n = useContext(I18nContext);\r\n // @ts-ignore\r\n const surveyContext : SurveyContextType = useContext(SurveyContext);\r\n const {\r\n logActivity,\r\n getPageIndex,\r\n } = surveyContext;\r\n\r\n return (\r\n
\r\n {\r\n onDone();\r\n logActivity(`page: ${getPageIndex()}, doneButton: done`);\r\n }}\r\n componentRef={ref}\r\n />\r\n
\r\n );\r\n});\r\n\r\nconst QuestionPageFooter = forwardRef((props: {\r\n classes: any;\r\n isLastPage: boolean;\r\n onSubmit: any;\r\n onNext: any;\r\n onDismiss: any;\r\n isSubmitButtonDisabled: boolean;\r\n}, ref: any): JSX.Element => {\r\n const {\r\n classes,\r\n isLastPage,\r\n onSubmit,\r\n onNext,\r\n onDismiss,\r\n isSubmitButtonDisabled,\r\n } = props;\r\n\r\n const i18n: I18n = useContext(I18nContext);\r\n // @ts-ignore\r\n const surveyContext : SurveyContextType = useContext(SurveyContext);\r\n const {\r\n logActivity,\r\n getPageIndex,\r\n } = surveyContext;\r\n\r\n return (\r\n \r\n {isLastPage ? :
}\r\n
\r\n {isLastPage ?\r\n ( { onSubmit(); logActivity(`page: ${getPageIndex()}, submitButton: submit`); }}\r\n disabled={isSubmitButtonDisabled}\r\n componentRef={ref}\r\n />) :\r\n ( { onNext(); logActivity(`page: ${getPageIndex()}, nextButton: next`); }}\r\n disabled={isSubmitButtonDisabled}\r\n componentRef={ref}\r\n />)\r\n }\r\n { onDismiss('button'); logActivity(`page: ${getPageIndex()}, cancelButton: dismiss`); }}\r\n />\r\n
\r\n \r\n );\r\n});\r\n\r\ninterface FooterProps {\r\n isLastPage: boolean;\r\n isEndingPage: boolean;\r\n onSubmit: any;\r\n onNext: any;\r\n onDone: any;\r\n onDismiss: any;\r\n isSubmitButtonDisabled: boolean;\r\n}\r\n\r\nexport const Footer = forwardRef((props: FooterProps, ref): JSX.Element => {\r\n const {\r\n isEndingPage,\r\n isLastPage,\r\n } = props;\r\n\r\n const classes: any = useDefaultStyles(() => ({\r\n footer: {\r\n fontSize: 14,\r\n paddingTop: 12,\r\n color: theme.palette.black,\r\n },\r\n emptyBottomDiv: {\r\n marginBottom: 16,\r\n },\r\n privacyStatement: {\r\n marginBottom: 20,\r\n color: theme.palette.neutralSecondary,\r\n fontSize: '12px',\r\n },\r\n infoText: {\r\n fontWeight: 600,\r\n textDecoration: 'underline',\r\n },\r\n submitButton: {\r\n marginRight: 8,\r\n },\r\n nextButton: {\r\n marginRight: 8,\r\n },\r\n buttons: {\r\n display: 'flex',\r\n justifyContent: 'flex-end',\r\n '& button': {\r\n width: '80px',\r\n },\r\n },\r\n }));\r\n\r\n return (\r\n
\r\n {isEndingPage ?\r\n :\r\n }\r\n
\r\n );\r\n});\r\n","/* eslint-disable react-hooks/rules-of-hooks */\r\nimport React, { useContext, useEffect, useMemo, useRef } from 'react';\r\nimport classNames from 'classnames';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { SurveyContext } from '@bingads-webui-campaign-react/survey-context';\r\nimport { Header } from './header';\r\nimport { Footer } from './footer';\r\nimport { PageConfigurator } from '../../configurator/page';\r\nimport { I18n } from '../../../survey.types';\r\nimport { SurveyContextType } from '../../../survey-context';\r\n\r\ninterface PageViewProps {\r\n isFirstPage: boolean,\r\n isLastPage: boolean,\r\n isEndingPage: boolean,\r\n onSubmit: any,\r\n onDone: any,\r\n onNext: any,\r\n onDismiss: any,\r\n onBack: any,\r\n classes: any,\r\n configurator: PageConfigurator,\r\n answers: any,\r\n setAnswers: any,\r\n}\r\n\r\nconst SurveyQuestionComponents = React.memo((props: {\r\n configurator: PageConfigurator,\r\n classes: any,\r\n}) => {\r\n const {\r\n classes,\r\n configurator,\r\n } = props;\r\n // @ts-ignore\r\n const surveyContext : SurveyContextType = useContext(SurveyContext);\r\n\r\n const {\r\n getAnswersByKey,\r\n setAnswersByKey,\r\n getSurveyAnswers,\r\n getSurveyDirtyStateByKey,\r\n setSurveyDirtyStateByKey,\r\n } = surveyContext;\r\n\r\n const answers = getSurveyAnswers();\r\n\r\n return (\r\n
\r\n {configurator.questions.map((question) => {\r\n const isVisible = question.isVisible(answers);\r\n const Question = useMemo(() => question.getView(), [question]);\r\n const { key } = question;\r\n return (\r\n
\r\n setAnswersByKey(key, data)}\r\n dirtyState={getSurveyDirtyStateByKey(key)}\r\n setDirtyState={isDirty => setSurveyDirtyStateByKey(key, isDirty)}\r\n />\r\n
\r\n );\r\n })}\r\n
\r\n );\r\n});\r\n\r\nexport const PageView = React.memo((props: PageViewProps) => {\r\n const {\r\n classes,\r\n } = props;\r\n\r\n const i18n: I18n = useContext(I18nContext);\r\n\r\n // @ts-ignore\r\n const surveyContext : SurveyContextType = useContext(SurveyContext);\r\n const {\r\n getIsFirstPage,\r\n getIsEndingPage,\r\n getIsLastPage,\r\n onDismiss,\r\n onBack,\r\n onDone,\r\n onSubmit,\r\n onNext,\r\n getIsSubmitButtonDisabled,\r\n getIsFromBack,\r\n } = surveyContext;\r\n\r\n const isFirstPage = getIsFirstPage();\r\n const isEndingPage = getIsEndingPage();\r\n const isLastPage = getIsLastPage();\r\n const isSubmitButtonDisabled = getIsSubmitButtonDisabled();\r\n const firstFocusableElement: any = useRef(null);\r\n const lastFocusableElement: any = useRef(null);\r\n const isFromBack = getIsFromBack();\r\n\r\n useEffect(() => {\r\n if (isFromBack) {\r\n lastFocusableElement?.current?.focus?.();\r\n return;\r\n }\r\n firstFocusableElement?.current?.focus?.();\r\n }, []);\r\n\r\n return (\r\n
\r\n \r\n {isEndingPage ?\r\n \r\n {i18n.getString(_TL_('Thank you so much for the response. We will continue improve our products and services.'))}\r\n : \r\n }\r\n \r\n
\r\n );\r\n});\r\n","import { Text } from '@fluentui/react';\r\nimport React, { Fragment } from 'react';\r\n\r\nexport const ErrorString = ({ error } : { error: string }) => (\r\n \r\n \r\n {error}\r\n \r\n \r\n);\r\n\r\nexport const getDescription = (input, maxLength, i18n) => {\r\n if (input == null || input.length === 0) {\r\n return undefined;\r\n }\r\n const { length } = input;\r\n const diff = maxLength - length;\r\n if (diff >= 0) {\r\n return i18n.getString(_TL_('{{number}} characters remaining'), { number: diff });\r\n }\r\n return i18n.getString(_TL_('Exceeded by {{number}} characters'), { number: Math.abs(diff) });\r\n};\r\n","import React, { useContext, useRef } from 'react';\r\nimport { Link, TextField } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { SurveyContext } from '@bingads-webui-campaign-react/survey-context';\r\nimport { I18n } from '../../../survey.types';\r\nimport { ErrorString, getDescription } from './common';\r\nimport { SurveyContextType } from '../../../survey-context';\r\n\r\ninterface OptionWithTextProps {\r\n children: React.ReactNode,\r\n error: string,\r\n option: any,\r\n data: string,\r\n setData: (key: string, value: string | undefined) => void,\r\n dirtyState: any,\r\n isSelected: boolean,\r\n setDirtyState: (key: string, dirtyState: boolean) => void,\r\n logActivity: (string) => void,\r\n}\r\n\r\nexport const Option = (props: OptionWithTextProps) => {\r\n const {\r\n children,\r\n error,\r\n option,\r\n data,\r\n setData,\r\n dirtyState,\r\n setDirtyState,\r\n isSelected,\r\n logActivity,\r\n } = props;\r\n\r\n // @ts-ignore\r\n const surveyContext : SurveyContextType = useContext(SurveyContext);\r\n\r\n const {\r\n hasInput,\r\n href,\r\n linkText,\r\n text,\r\n key,\r\n maxLength,\r\n placeholder,\r\n } = option;\r\n\r\n const i18n: I18n = useContext(I18nContext);\r\n const {\r\n getSurveyConfiguration,\r\n } = surveyContext;\r\n\r\n const {\r\n others: {\r\n shouldHideInputWhenNotSelected = false,\r\n } = {},\r\n } = getSurveyConfiguration();\r\n const logged = useRef(false);\r\n\r\n return (\r\n
\r\n {children}\r\n {href && linkText &&\r\n <>\r\n {' '}\r\n {linkText}\r\n \r\n \r\n }\r\n {hasInput && (shouldHideInputWhenNotSelected ? isSelected : true) &&\r\n
\r\n {\r\n setData(key, value);\r\n setDirtyState(key, true);\r\n if (logged.current === false) {\r\n logActivity(`Component: ${key}, action: input`);\r\n logged.current = true;\r\n }\r\n }}\r\n tabIndex={isSelected ? 0 : -1}\r\n description={maxLength != null && isSelected ? getDescription(data, maxLength, i18n) : undefined}\r\n />\r\n {dirtyState && isSelected && error && }\r\n
\r\n }\r\n
\r\n );\r\n};\r\n","import { parseSync } from '@bingads-webui/safe-json';\r\nimport { QuestionConfiguration, SurveyConfiguration } from './survey.types';\r\nimport {\r\n SingleSelectionConfigurator,\r\n MultipleSelectionConfigurator,\r\n EmailConfigurator,\r\n CommentConfigurator,\r\n RatingConfigurator,\r\n} from './survey-construction';\r\nimport { JsonQuestion } from './json-survey.types';\r\n\r\nconst questionTypes = {\r\n Rating: 'Rating',\r\n Email: 'Email',\r\n SingleSelection: 'SingleSelection',\r\n MultipleSelection: 'MultipleSelection',\r\n Comment: 'Comment',\r\n};\r\n\r\nfunction jsonConfigurationToQuestionConfiguration(jsonConfiguration: JsonQuestion) {\r\n const {\r\n key,\r\n options,\r\n isRequired,\r\n page,\r\n data,\r\n position,\r\n title,\r\n isVisible,\r\n maxLength,\r\n placeholder,\r\n description,\r\n linkText,\r\n href,\r\n } = jsonConfiguration;\r\n\r\n // @ts-ignore\r\n const questionConfiguration: QuestionConfiguration = {\r\n key,\r\n options,\r\n isRequired,\r\n page,\r\n position,\r\n data,\r\n getTitle: () => title,\r\n isVisible: () => isVisible,\r\n getDescription: description ? () => description : undefined,\r\n maxLength,\r\n linkText,\r\n href,\r\n placeholder,\r\n };\r\n\r\n switch (jsonConfiguration.Type) {\r\n case questionTypes.Rating:\r\n questionConfiguration.Type = RatingConfigurator;\r\n break;\r\n case questionTypes.Email:\r\n questionConfiguration.Type = EmailConfigurator;\r\n break;\r\n case questionTypes.SingleSelection:\r\n questionConfiguration.Type = SingleSelectionConfigurator;\r\n break;\r\n case questionTypes.MultipleSelection:\r\n questionConfiguration.Type = MultipleSelectionConfigurator;\r\n break;\r\n case questionTypes.Comment:\r\n questionConfiguration.Type = CommentConfigurator;\r\n break;\r\n default:\r\n throw new Error('Out of control!');\r\n }\r\n\r\n return questionConfiguration;\r\n}\r\n\r\nexport function jsonConfigurationToSurveyConfiguration(jsonConfiguration: string):\r\n (options: { i18n: any, serverContext: any }) => SurveyConfiguration {\r\n const parsedJsonConfiguration = parseSync(jsonConfiguration);\r\n return () => {\r\n const {\r\n style,\r\n others,\r\n featureArea,\r\n } = parsedJsonConfiguration;\r\n\r\n const surveyConfiguration: SurveyConfiguration = {\r\n featureArea,\r\n style,\r\n others,\r\n };\r\n\r\n // @ts-ignore\r\n surveyConfiguration.rating = jsonConfigurationToQuestionConfiguration(parsedJsonConfiguration.rating);\r\n // @ts-ignore\r\n surveyConfiguration.email = jsonConfigurationToQuestionConfiguration(parsedJsonConfiguration.email);\r\n surveyConfiguration.questions = parsedJsonConfiguration.questions.map(jsonConfigurationToQuestionConfiguration);\r\n\r\n return surveyConfiguration;\r\n };\r\n}\r\n\r\nfunction hashFunc(str) {\r\n let hash = 0;\r\n if (str.length === 0) {\r\n return hash;\r\n }\r\n for (let i = 0; i < str.length; i += 1) {\r\n const char = str.charCodeAt(i);\r\n // eslint-disable-next-line no-bitwise\r\n hash = ((hash << 5) - hash) + char;\r\n // eslint-disable-next-line no-bitwise\r\n hash &= hash;\r\n }\r\n return hash;\r\n}\r\n\r\nexport function generateLabelId(str) {\r\n const hashValue = hashFunc(str).toString();\r\n const labelId = `survey-factory-label-${str}-${hashValue}`;\r\n return labelId;\r\n}\r\n\r\nexport const returnFocus = (element) => {\r\n if (element) {\r\n element.focus();\r\n return;\r\n }\r\n /* istanbul ignore next */\r\n const body = document.getElementsByTagName('body')[0];\r\n /* istanbul ignore if */\r\n if (body) {\r\n body.focus();\r\n }\r\n};\r\n","import React, { Fragment, useMemo, useContext } from 'react';\r\nimport classNames from 'classnames';\r\nimport { Label, Link } from '@bingads-webui-react/fabric-control';\r\nimport { SurveyContext } from '@bingads-webui-campaign-react/survey-context';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { SurveyContextType } from '../../../survey-context';\r\nimport { theme } from '../../../styles';\r\nimport { QuestionConfigurator } from '../../configurator/question';\r\nimport { ErrorString } from './common';\r\nimport { generateLabelId } from '../../../utility';\r\n\r\ninterface QuestionTitleProps {\r\n title: string,\r\n description: string,\r\n error: string,\r\n isRequired: boolean,\r\n isDirty: boolean,\r\n href: string | undefined,\r\n linkText: string | undefined,\r\n labelKey: string,\r\n}\r\n\r\nconst Title = React.memo((props: QuestionTitleProps) => {\r\n const {\r\n title,\r\n isRequired,\r\n description,\r\n isDirty,\r\n error,\r\n href,\r\n linkText,\r\n labelKey,\r\n } = props;\r\n\r\n const classes: any = useDefaultStyles(() => ({\r\n requiredMark: {\r\n color: '#A80000',\r\n },\r\n questionTitle: {\r\n '& .ms-Label': {\r\n marginBottom: '8px',\r\n padding: 'unset',\r\n },\r\n },\r\n description: {\r\n fontSize: '12px',\r\n color: theme.palette.neutralSecondary,\r\n },\r\n }));\r\n\r\n const key = useMemo(() => generateLabelId(labelKey), [labelKey]);\r\n\r\n return (\r\n
\r\n \r\n {description &&\r\n
\r\n {description}\r\n {href && linkText &&\r\n <>\r\n {' '}\r\n {linkText}\r\n \r\n \r\n }\r\n
\r\n }\r\n {isDirty && error && }\r\n
\r\n );\r\n});\r\n\r\nexport const QuestionTitle = (props: {\r\n configurator: QuestionConfigurator,\r\n isDirty: boolean,\r\n error: string,\r\n children: React.ReactNode,\r\n}) => {\r\n const {\r\n configurator,\r\n error,\r\n isDirty,\r\n children,\r\n } = props;\r\n\r\n const {\r\n isRequired,\r\n href,\r\n linkText,\r\n key,\r\n } = configurator.getConfiguration();\r\n\r\n // @ts-ignore\r\n const surveyContext: SurveyContextType = useContext(SurveyContext);\r\n\r\n const {\r\n getSurveyAnswers,\r\n } = surveyContext;\r\n\r\n const answers = getSurveyAnswers();\r\n\r\n const title = useMemo(() => configurator.getTitle(answers), [answers, configurator]);\r\n const description = useMemo(() => configurator.getDescription(answers), [answers, configurator]);\r\n\r\n return (\r\n \r\n \r\n {children}\r\n \r\n );\r\n};\r\n","import React, { useCallback, useContext, useMemo } from 'react';\r\nimport { SurveyContext } from '@bingads-webui-campaign-react/survey-context';\r\nimport { ChoiceGroup } from '@fluentui/react';\r\nimport { Option } from './option';\r\nimport { QuestionTitle } from './title';\r\nimport { SurveyContextType } from '../../../survey-context';\r\nimport { generateLabelId } from '../../../utility';\r\n\r\nfunction optionComponentFactory(option, dynamicOption) {\r\n const {\r\n error,\r\n data,\r\n setData,\r\n mySetDirtyState,\r\n dirtyState,\r\n isSelected,\r\n logActivity,\r\n } = dynamicOption;\r\n\r\n return {\r\n onRenderField: (props, render) => (\r\n \r\n {render(props)}\r\n \r\n ),\r\n };\r\n}\r\n\r\nfunction buildSingleSelectionOptions(options, dynamicOption) {\r\n const {\r\n setOptionData,\r\n data,\r\n error,\r\n mySetDirtyState,\r\n dirtyState,\r\n logActivity,\r\n } = dynamicOption;\r\n\r\n return options.map((option) => {\r\n const {\r\n key,\r\n text,\r\n } = option;\r\n\r\n return {\r\n key,\r\n text,\r\n ariaLabel: text,\r\n ...optionComponentFactory(option, {\r\n setData: setOptionData,\r\n data: data[key],\r\n error: error[key],\r\n dirtyState: dirtyState[key],\r\n mySetDirtyState,\r\n isSelected: data.selectedOption === key,\r\n logActivity,\r\n }),\r\n };\r\n });\r\n}\r\n\r\nexport const ChoiceGroupView = React.memo((props: {\r\n configurator: any,\r\n data: any,\r\n setData: any,\r\n dirtyState: any,\r\n setDirtyState: any,\r\n}) => {\r\n const {\r\n configurator,\r\n data,\r\n setData,\r\n dirtyState,\r\n setDirtyState,\r\n } = props;\r\n\r\n const {\r\n options,\r\n key: questionKey,\r\n } = configurator.getConfiguration();\r\n\r\n const {\r\n selectedOption,\r\n } = data;\r\n\r\n const error = useMemo(() => configurator.getError(data), [configurator, data]);\r\n\r\n const setOptionData = useCallback((optionKey, value) => {\r\n const newData = {\r\n ...data,\r\n [optionKey]: value,\r\n selectedOption: value.length > 0 ? optionKey : selectedOption,\r\n };\r\n setData(newData);\r\n }, [data, selectedOption, setData]);\r\n\r\n const mySetDirtyState = useCallback((key, value) => {\r\n const newDirtyState = {\r\n ...dirtyState,\r\n [key]: value,\r\n };\r\n setDirtyState(newDirtyState);\r\n }, [dirtyState, setDirtyState]);\r\n\r\n // @ts-ignore\r\n const surveyContext : SurveyContextType = useContext(SurveyContext);\r\n const {\r\n logActivity,\r\n getSurveyAnswers,\r\n } = surveyContext;\r\n\r\n const myLogActivity = useCallback((log: string) => {\r\n logActivity(`Question: ${configurator.key}, type: single-selection, ${log}`);\r\n }, [configurator.key, logActivity]);\r\n\r\n const singleSelectionOptions = useMemo(() => buildSingleSelectionOptions(\r\n options,\r\n {\r\n setOptionData,\r\n data,\r\n error,\r\n mySetDirtyState,\r\n dirtyState,\r\n logActivity: myLogActivity,\r\n }\r\n ), [options, setOptionData, data, error, mySetDirtyState, dirtyState, myLogActivity]);\r\n\r\n const answers = getSurveyAnswers();\r\n\r\n const title = useMemo(() => configurator.getTitle(answers), [answers, configurator]);\r\n const labelKey = useMemo(() => generateLabelId(questionKey), [questionKey]);\r\n\r\n return (\r\n {\r\n mySetDirtyState('isDirty', true);\r\n setData({\r\n ...data,\r\n selectedOption: option?.key,\r\n });\r\n myLogActivity(`action: select option, key: ${option?.key}`);\r\n }}\r\n />);\r\n});\r\n\r\ninterface SingleSelectionViewProps {\r\n configurator: any,\r\n data: {\r\n selectedOption: string,\r\n [key: string]: string | undefined,\r\n },\r\n setData: any,\r\n rootClassName: string | undefined,\r\n dirtyState: any,\r\n setDirtyState: any,\r\n}\r\n\r\nexport const SingleSelectionView = (props: SingleSelectionViewProps) => {\r\n const {\r\n configurator,\r\n data,\r\n setData,\r\n dirtyState,\r\n setDirtyState,\r\n rootClassName,\r\n } = props;\r\n\r\n const error = useMemo(() => configurator.isAnswered(data), [configurator, data]);\r\n const {\r\n isDirty,\r\n } = dirtyState;\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n","import React, { useMemo, useContext, useCallback } from 'react';\r\nimport { Checkbox } from '@fluentui/react';\r\nimport classNames from 'classnames';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { SurveyContext } from '@bingads-webui-campaign-react/survey-context';\r\nimport { SurveyContextType } from '../../../survey-context';\r\nimport { MultipleSelectionData } from '../../../survey.types';\r\nimport { Option } from './option';\r\nimport { QuestionTitle } from './title';\r\nimport { generateLabelId } from '../../../utility';\r\n\r\nexport const CheckboxGroupView = React.memo((props: {\r\n configurator: any,\r\n data: any,\r\n setData: any,\r\n dirtyState: any,\r\n setDirtyState: any,\r\n}) => {\r\n const {\r\n configurator,\r\n data,\r\n setData,\r\n dirtyState,\r\n setDirtyState,\r\n } = props;\r\n\r\n const classes: any = useDefaultStyles(() => ({\r\n checkboxGroup: {\r\n '& .ms-Checkbox ~ .ms-Checkbox': {\r\n marginTop: '9px',\r\n },\r\n marginTop: '4px',\r\n },\r\n }));\r\n\r\n const {\r\n options,\r\n key: questionKey,\r\n } = configurator.getConfiguration();\r\n\r\n const error = useMemo(() => configurator.getError(data), [configurator, data]);\r\n\r\n const setOptionData = useCallback((optionKey, value) => {\r\n const newData = {\r\n ...data,\r\n [optionKey]: {\r\n ...data[optionKey],\r\n ...value,\r\n },\r\n };\r\n setData(newData);\r\n }, [data, setData]);\r\n\r\n const mySetDirtyState = useCallback((key, value) => {\r\n const newDirtyState = {\r\n ...dirtyState,\r\n [key]: value,\r\n };\r\n setDirtyState(newDirtyState);\r\n }, [dirtyState, setDirtyState]);\r\n\r\n // @ts-ignore\r\n const surveyContext : SurveyContextType = useContext(SurveyContext);\r\n const {\r\n logActivity,\r\n getSurveyAnswers,\r\n } = surveyContext;\r\n\r\n const myLogActivity = useCallback((log: string) => {\r\n logActivity(`Question: ${configurator.key}, type: multiple-selection, ${log}`);\r\n }, [configurator.key, logActivity]);\r\n\r\n const answers = getSurveyAnswers();\r\n\r\n const title = useMemo(() => configurator.getTitle(answers), [answers, configurator]);\r\n const labelKey = useMemo(() => generateLabelId(questionKey), [questionKey]);\r\n\r\n return (\r\n \r\n {options.map((option) => {\r\n const {\r\n key,\r\n text,\r\n } = option;\r\n\r\n const {\r\n selected,\r\n input,\r\n } = data[key] ?? {};\r\n\r\n return ( {\r\n mySetDirtyState('isDirty', true);\r\n setOptionData(option.key, { selected: checked });\r\n myLogActivity(`action: select checkbox, key: ${option.key}, state: ${checked}`);\r\n }}\r\n onRenderLabel={() => (\r\n setOptionData(dataKey, { input: stringInput })}\r\n dirtyState={dirtyState[key]}\r\n setDirtyState={(dataKey, value) => mySetDirtyState(dataKey, value)}\r\n isSelected={selected}\r\n logActivity={myLogActivity}\r\n >\r\n {text}\r\n \r\n )}\r\n />);\r\n })}\r\n
\r\n );\r\n});\r\n\r\n\r\ninterface MultipleSelectionViewProps {\r\n configurator: any;\r\n data: MultipleSelectionData;\r\n setData: any;\r\n rootClassName: string | undefined;\r\n setDirtyState: any;\r\n dirtyState: any;\r\n}\r\n\r\nexport const MultipleSelectionView = (props: MultipleSelectionViewProps) => {\r\n const {\r\n configurator,\r\n data,\r\n setData,\r\n rootClassName,\r\n setDirtyState,\r\n dirtyState,\r\n } = props;\r\n\r\n const error = useMemo(() => configurator.isAnswered(data), [configurator, data]);\r\n const { isDirty } = dirtyState;\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n","import React from 'react';\r\nimport { SingleSelectionView } from './single-selection';\r\n\r\nexport const RatingView = props => (\r\n \r\n);\r\n","import React from 'react';\r\nimport { SingleSelectionView } from './single-selection';\r\n\r\nexport const EmailView = props => (\r\n \r\n);\r\n","import React, { useMemo, useContext, useRef } from 'react';\r\nimport { SurveyContext } from '@bingads-webui-campaign-react/survey-context';\r\nimport { TextField } from '@fluentui/react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { CommentData, I18n } from '../../../survey.types';\r\nimport { QuestionTitle } from './title';\r\nimport { SurveyContextType } from '../../../survey-context';\r\nimport { getDescription, ErrorString } from './common';\r\n\r\ninterface CommentViewProps {\r\n data: CommentData;\r\n configurator: any;\r\n setData: any;\r\n dirtyState: any;\r\n setDirtyState: any;\r\n}\r\n\r\nexport const CommentView = (props: CommentViewProps) => {\r\n const {\r\n configurator,\r\n data,\r\n setData,\r\n dirtyState,\r\n setDirtyState,\r\n } = props;\r\n\r\n // @ts-ignore\r\n const surveyContext: SurveyContextType = useContext(SurveyContext);\r\n\r\n const {\r\n getSurveyAnswers,\r\n logActivity,\r\n } = surveyContext;\r\n\r\n const answers = getSurveyAnswers();\r\n\r\n const title = useMemo(() => configurator.getTitle(answers), [answers, configurator]);\r\n const i18n: I18n = useContext(I18nContext);\r\n\r\n const {\r\n input,\r\n } = data;\r\n\r\n const titleError = useMemo(() => configurator.isAnswered(data), [configurator, data]);\r\n const commentError = useMemo(() => configurator.getError(data), [configurator, data]);\r\n const {\r\n maxLength,\r\n placeholder,\r\n } = configurator.getConfiguration();\r\n\r\n const isDirty = dirtyState;\r\n const logged = useRef(false);\r\n\r\n return (\r\n
\r\n \r\n {\r\n setDirtyState(true);\r\n setData({ input: value });\r\n if (logged.current === false) {\r\n logActivity(`Question: ${configurator.key}, type: comment, action: input`);\r\n logged.current = true;\r\n }\r\n }}\r\n description={maxLength != null ? getDescription(input, maxLength, i18n) : undefined}\r\n />\r\n {isDirty && commentError && }\r\n \r\n
\r\n );\r\n};\r\n","import { Validator } from './validator';\r\n\r\nexport class CommentValidator extends Validator {\r\n validateHelper({ data, configuration }) {\r\n const {\r\n input,\r\n } = data;\r\n\r\n const { maxLength, isRequired } = configuration;\r\n\r\n if ((input == null || input.length === 0) && isRequired) {\r\n return 'InputIsEmpty';\r\n }\r\n if (input && maxLength && input.length > maxLength) {\r\n return 'InputTooLong';\r\n }\r\n return null;\r\n }\r\n\r\n validate({ data, configuration }) {\r\n return this.validateHelper({ data, configuration }) == null;\r\n }\r\n\r\n getError({ data, configuration, i18n }) {\r\n const { maxLength } = configuration;\r\n\r\n const check = this.validateHelper({ data, configuration });\r\n\r\n if (check === 'InputTooLong') {\r\n return i18n.getString(_TL_('Field should not exceed {{maxLength}} characters'), { maxLength });\r\n }\r\n return undefined;\r\n }\r\n\r\n isAnswered({ data, configuration, i18n }) {\r\n const check = this.validateHelper({ data, configuration });\r\n if (check === 'InputIsEmpty') {\r\n return i18n.getString(_TL_('Please answer this question'));\r\n }\r\n return undefined;\r\n }\r\n}\r\n","import { QuestionConfigurator } from './question';\r\nimport { CommentView } from '../view';\r\nimport { CommentValidator } from '../validator';\r\n\r\nexport class CommentConfigurator extends QuestionConfigurator {\r\n get view() {\r\n return CommentView;\r\n }\r\n\r\n initValidator() {\r\n this.validator = new CommentValidator();\r\n }\r\n\r\n getDefaultData(): Object {\r\n return {\r\n input: undefined,\r\n ...this.data,\r\n };\r\n }\r\n\r\n isComment() {\r\n return true;\r\n }\r\n\r\n getFeedbackData(answers: any): any {\r\n const data = answers[this.key];\r\n const { input } = data;\r\n return {\r\n key: this.key,\r\n type: 'comment',\r\n title: this.getTitle(answers),\r\n answer: input,\r\n };\r\n }\r\n}\r\n","import { Validator } from './validator';\r\n\r\nexport class SingleSelectionValidator extends Validator {\r\n validateHelper({ data, configuration }) : string | null {\r\n const {\r\n selectedOption,\r\n } = data;\r\n\r\n const { options, isRequired } = configuration;\r\n\r\n if (selectedOption == null && isRequired) {\r\n return 'NoOptionSelected';\r\n }\r\n for (let i = 0; i < options.length; i += 1) {\r\n const {\r\n hasInput,\r\n key,\r\n maxLength,\r\n } = options[i];\r\n if (hasInput && key === selectedOption) {\r\n if ((data[key] == null || data[key].length === 0) && isRequired) {\r\n return 'InputIsEmpty';\r\n } else if (maxLength && data[key] && data[key].length > maxLength) {\r\n return 'InputTooLong';\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n validate({ data, configuration }) {\r\n return this.validateHelper({ data, configuration }) == null;\r\n }\r\n\r\n getError({ data, configuration, i18n }) {\r\n let error = {};\r\n const { options, isRequired } = configuration;\r\n\r\n for (let i = 0; i < options.length; i += 1) {\r\n const {\r\n hasInput,\r\n key,\r\n maxLength,\r\n } = options[i];\r\n if (hasInput) {\r\n if ((data[key] == null || data[key].length === 0) && isRequired) {\r\n error = {\r\n ...error,\r\n [key]: i18n.getString(_TL_('Please fill in this field')),\r\n };\r\n } else if (maxLength && data[key] && data[key].length > maxLength) {\r\n error = {\r\n ...error,\r\n [key]: i18n.getString(_TL_('Field should not exceed {{maxLength}} characters'), { maxLength }),\r\n };\r\n }\r\n }\r\n }\r\n return error;\r\n }\r\n\r\n isAnswered({ data, configuration, i18n }) {\r\n let error;\r\n const {\r\n selectedOption,\r\n } = data;\r\n const { isRequired } = configuration;\r\n\r\n if (selectedOption == null && isRequired) {\r\n error = i18n.getString(_TL_('Please answer this question'));\r\n }\r\n return error;\r\n }\r\n}\r\n","import { SingleSelectionValidator } from './single-selection';\r\n\r\nexport class EmailValidator extends SingleSelectionValidator {\r\n validateHelper({ data, configuration }) {\r\n const {\r\n selectedOption,\r\n } = data;\r\n\r\n const { options, isRequired } = configuration;\r\n\r\n if (selectedOption == null && isRequired) {\r\n return 'NoOptionSelected';\r\n }\r\n for (let i = 0; i < options.length; i += 1) {\r\n const {\r\n hasInput,\r\n key,\r\n maxLength,\r\n } = options[i];\r\n if (hasInput && key === selectedOption) {\r\n if (data[key] == null || data[key].length === 0) {\r\n return 'InputIsEmpty';\r\n } else if (key === 'yes') {\r\n if (!this.isEmail(data[key])) {\r\n return 'InvalidEmail';\r\n }\r\n } else if (maxLength && data[key] && data[key].length > maxLength) {\r\n return 'InputTooLong';\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n isEmail(email) {\r\n const re = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n return re.test(email);\r\n }\r\n\r\n validate({ data, configuration }) {\r\n return this.validateHelper({ data, configuration }) == null;\r\n }\r\n\r\n getError({ data, configuration, i18n }) {\r\n let error = {};\r\n const { options } = configuration;\r\n\r\n for (let i = 0; i < options.length; i += 1) {\r\n const {\r\n hasInput,\r\n key,\r\n maxLength,\r\n } = options[i];\r\n if (hasInput) {\r\n if (data[key] == null || data[key].length === 0) {\r\n error = {\r\n ...error,\r\n [key]: i18n.getString(_TL_('Please enter an email address')),\r\n };\r\n } else if (key === 'yes' && !this.isEmail(data[key])) {\r\n error = {\r\n ...error,\r\n [key]: i18n.getString(_TL_('Invalid email address')),\r\n };\r\n } else if (maxLength && data[key] && data[key].length > maxLength) {\r\n error = {\r\n ...error,\r\n [key]: i18n.getString(_TL_('Field should not exceed {{maxLength}} characters'), { maxLength }),\r\n };\r\n }\r\n }\r\n }\r\n return error;\r\n }\r\n\r\n isAnswered({ data, configuration, i18n }) {\r\n let error;\r\n const {\r\n selectedOption,\r\n } = data;\r\n const { isRequired } = configuration;\r\n\r\n if (selectedOption == null && isRequired) {\r\n error = i18n.getString(_TL_('Please answer this question'));\r\n }\r\n return error;\r\n }\r\n}\r\n","import { QuestionConfigurator } from './question';\r\nimport { EmailView } from '../view';\r\nimport { EmailValidator } from '../validator';\r\n\r\nexport class EmailConfigurator extends QuestionConfigurator {\r\n get view() {\r\n return EmailView;\r\n }\r\n\r\n initValidator() {\r\n this.validator = new EmailValidator();\r\n }\r\n\r\n getDefaultData(): Object {\r\n return {\r\n selectedOption: undefined,\r\n yes: this.serverContext.CurrentUser.Email,\r\n ...this.data,\r\n };\r\n }\r\n\r\n getDefaultDirtyState(bool): Object {\r\n const state = {\r\n isDirty: bool,\r\n };\r\n const { options } = this.configuration;\r\n options.forEach((option) => {\r\n const { key } = option;\r\n state[key] = bool;\r\n });\r\n return state;\r\n }\r\n\r\n getFeedbackData(answers: any): any {\r\n const data = answers[this.key];\r\n if (data.selectedOption === 'yes') { return data.yes; }\r\n return null;\r\n }\r\n}\r\n","import { Validator } from './validator';\r\n\r\nexport class MultipleSelectionValidator extends Validator {\r\n validateHelper({ data, configuration }) {\r\n const { options, isRequired } = configuration;\r\n\r\n const NoOptionSelected = options.find(option => data[option.key] && data[option.key].selected) === undefined;\r\n\r\n if (NoOptionSelected && isRequired) {\r\n return 'NoOptionSelected';\r\n }\r\n\r\n for (let i = 0; i < options.length; i += 1) {\r\n const {\r\n hasInput,\r\n key,\r\n maxLength,\r\n } = options[i];\r\n if (hasInput && data[key] && data[key].selected) {\r\n if ((data[key].input == null || data[key].input.length === 0) && isRequired) {\r\n return 'InputIsEmpty';\r\n } else if (maxLength && data[key].input && data[key].input.length > maxLength) {\r\n return 'InputTooLong';\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n validate({ data, configuration }) {\r\n return this.validateHelper({ data, configuration }) == null;\r\n }\r\n\r\n getError({ data, configuration, i18n }) {\r\n let error = {};\r\n const { options, isRequired } = configuration;\r\n\r\n for (let i = 0; i < options.length; i += 1) {\r\n const {\r\n hasInput,\r\n key,\r\n maxLength,\r\n } = options[i];\r\n if (hasInput && data[key]) {\r\n if ((data[key].input == null || data[key].input.length === 0) && isRequired) {\r\n error = {\r\n ...error,\r\n [key]: i18n.getString(_TL_('Please fill in this field')),\r\n };\r\n } else if (maxLength && data[key].input && data[key].input.length > maxLength) {\r\n error = {\r\n ...error,\r\n [key]: i18n.getString(_TL_('Field should not exceed {{maxLength}} characters'), { maxLength }),\r\n };\r\n }\r\n }\r\n }\r\n return error;\r\n }\r\n\r\n isAnswered({ data, configuration, i18n }) {\r\n const result = this.validateHelper({ data, configuration });\r\n const { isRequired } = configuration;\r\n let error;\r\n\r\n if (result === 'NoOptionSelected' && isRequired) {\r\n error = i18n.getString(_TL_('Please answer this question'));\r\n }\r\n return error;\r\n }\r\n}\r\n","import { QuestionConfigurator } from './question';\r\nimport { MultipleSelectionView } from '../view';\r\nimport { MultipleSelectionValidator } from '../validator';\r\n\r\nexport class MultipleSelectionConfigurator extends QuestionConfigurator {\r\n constructor({\r\n serverContext, configuration, i18n, surveyConfigurator,\r\n }) {\r\n super({\r\n serverContext, configuration, i18n, surveyConfigurator,\r\n });\r\n this.setOptionKeyToText();\r\n }\r\n\r\n get view() {\r\n return MultipleSelectionView;\r\n }\r\n\r\n getDefaultData(): Object {\r\n return {\r\n ...this.data,\r\n };\r\n }\r\n\r\n initValidator() {\r\n this.validator = new MultipleSelectionValidator();\r\n }\r\n\r\n setOptionKeyToText() {\r\n const { options } = this.configuration;\r\n this.optionKeyToText = {};\r\n options.forEach((option) => {\r\n this.optionKeyToText[option.key] = option.text;\r\n });\r\n }\r\n\r\n getDefaultDirtyState(bool): Object {\r\n const state = {\r\n isDirty: bool,\r\n };\r\n const { options } = this.configuration;\r\n options.forEach((option) => {\r\n const { key } = option;\r\n state[key] = bool;\r\n });\r\n return state;\r\n }\r\n\r\n // get the feedback data for sending to the OCV service\r\n getFeedbackData(answers: any): any {\r\n const { options } = this.configuration;\r\n const data = answers[this.key];\r\n const selectedOptions =\r\n options.filter(option => data[option.key]?.selected)\r\n .map(option => ({\r\n text: this.optionKeyToText[option.key],\r\n input: data[option.key].input,\r\n }));\r\n return {\r\n key: this.key,\r\n type: 'multiple-selection',\r\n title: this.getTitle(answers),\r\n answer: selectedOptions,\r\n };\r\n }\r\n}\r\n","import { QuestionConfigurator } from './question';\r\nimport { SingleSelectionView } from '../view';\r\nimport { SingleSelectionValidator } from '../validator';\r\n\r\nexport class SingleSelectionConfigurator extends QuestionConfigurator {\r\n constructor({\r\n serverContext, configuration, i18n, surveyConfigurator,\r\n }) {\r\n super({\r\n serverContext, configuration, i18n, surveyConfigurator,\r\n });\r\n this.setOptionKeyToText();\r\n }\r\n\r\n get view() : (props: any) => JSX.Element {\r\n return SingleSelectionView;\r\n }\r\n\r\n initValidator() {\r\n this.validator = new SingleSelectionValidator();\r\n }\r\n\r\n setOptionKeyToText() {\r\n const { options } = this.configuration;\r\n this.optionKeyToText = {};\r\n options.forEach((option) => {\r\n this.optionKeyToText[option.key] = option.text;\r\n });\r\n }\r\n\r\n getDefaultData(): Object {\r\n return {\r\n selectedOption: undefined,\r\n ...this.data,\r\n };\r\n }\r\n\r\n getDefaultDirtyState(bool: boolean): Object {\r\n const state = {\r\n isDirty: bool,\r\n };\r\n const { options } = this.configuration;\r\n options.forEach((option) => {\r\n const { key } = option;\r\n state[key] = bool;\r\n });\r\n return state;\r\n }\r\n\r\n getFeedbackData(answers: any): any {\r\n const data = answers[this.key];\r\n const { selectedOption } = data;\r\n return {\r\n key: this.key,\r\n type: 'single-selection',\r\n title: this.getTitle(answers),\r\n answer: {\r\n text: selectedOption ? this.optionKeyToText[selectedOption] : null,\r\n input: selectedOption ? data[selectedOption] : null,\r\n },\r\n };\r\n }\r\n}\r\n","import { SingleSelectionValidator } from '../validator';\r\nimport { RatingView } from '../view';\r\nimport { SingleSelectionConfigurator } from './single-selection';\r\n\r\nexport class RatingConfigurator extends SingleSelectionConfigurator {\r\n constructor({\r\n serverContext, configuration, i18n, surveyConfigurator,\r\n }) {\r\n super({\r\n serverContext, configuration, i18n, surveyConfigurator,\r\n });\r\n this.setOptionKeyToRating();\r\n }\r\n\r\n get view() {\r\n return RatingView;\r\n }\r\n\r\n initValidator() {\r\n this.validator = new SingleSelectionValidator();\r\n }\r\n\r\n setOptionKeyToRating() {\r\n const { options } = this.configuration;\r\n this.optionKeyToRating = {};\r\n options.forEach((option) => {\r\n this.optionKeyToRating[option.key] = option.rating;\r\n });\r\n }\r\n\r\n getDefaultData(): Object {\r\n return {\r\n selectedOption: undefined,\r\n ...this.data,\r\n };\r\n }\r\n\r\n getDefaultDirtyState(bool): Object {\r\n const state = {\r\n isDirty: bool,\r\n };\r\n const { options } = this.configuration;\r\n options.forEach((option) => {\r\n const { key } = option;\r\n state[key] = bool;\r\n });\r\n return state;\r\n }\r\n\r\n getFeedbackData(answers: any): any {\r\n const data = answers[this.key];\r\n const { options } = this.configuration;\r\n if (data.selectedOption) {\r\n return {\r\n rating: parseFloat(this.optionKeyToRating[data.selectedOption]),\r\n ratingOptionsCount: options.length,\r\n };\r\n }\r\n return null;\r\n }\r\n}\r\n","import React from 'react';\r\nimport { PageView } from '../view';\r\nimport { QuestionConfiguration, IQuestionConfigurator } from '../../survey.types';\r\n\r\nexport class PageConfigurator {\r\n questions: IQuestionConfigurator[];\r\n style: any;\r\n serverContext: any;\r\n i18n: any;\r\n surveyConfigurator: any;\r\n\r\n constructor({ serverContext, i18n, surveyConfigurator }) {\r\n this.questions = [];\r\n this.serverContext = serverContext;\r\n this.i18n = i18n;\r\n this.surveyConfigurator = surveyConfigurator;\r\n }\r\n\r\n // sort questions by position\r\n sortQuestions(): void {\r\n this.questions.sort((a, b) => a.position - b.position);\r\n }\r\n\r\n // add question to page\r\n addQuestion(questionConfiguration: QuestionConfiguration): IQuestionConfigurator {\r\n const {\r\n Type,\r\n } = questionConfiguration;\r\n const question = new Type({\r\n configuration: questionConfiguration,\r\n serverContext: this.serverContext,\r\n i18n: this.i18n,\r\n surveyConfigurator: this.surveyConfigurator,\r\n });\r\n this.questions.push(question);\r\n return question;\r\n }\r\n\r\n isVisible(answers: Object): boolean {\r\n for (let i = 0; i < this.questions.length; i += 1) {\r\n if (this.questions[i].isVisible(answers)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n // determine if page is valid, delegating to questions\r\n isValid(answers: Object): boolean {\r\n for (let i = 0; i < this.questions.length; i += 1) {\r\n if (!this.questions[i].isValid(answers)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n // get the feedback data for sending to the OCV service\r\n getFeedbackData(answers: Object): any {\r\n const remaining: Array = [];\r\n const comments: Array = [];\r\n let email = null;\r\n let rating = null;\r\n\r\n this.questions.forEach((question) => {\r\n if (question.isVisible(answers)) {\r\n if (question.isEmail()) {\r\n email = question.getFeedbackData(answers);\r\n } else if (question.isRating()) {\r\n rating = question.getFeedbackData(answers);\r\n } else if (question.isComment()) {\r\n comments.push(question.getFeedbackData(answers));\r\n } else {\r\n // single-selection, multiple-selection\r\n remaining.push(question.getFeedbackData(answers));\r\n }\r\n }\r\n });\r\n\r\n return {\r\n rating,\r\n email,\r\n remaining,\r\n comments,\r\n };\r\n }\r\n\r\n // get the view for the page\r\n getView(): (props: any) => JSX.Element {\r\n return props =>\r\n ();\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { stringifySync } from '@bingads-webui/safe-json';\r\nimport { IQuestionConfigurator, SurveyConfiguration, Others } from '../../survey.types';\r\nimport { PageConfigurator } from './page';\r\n\r\nexport class SurveyConfigurator {\r\n featureArea: string;\r\n pages: PageConfigurator[];\r\n serverContext: any;\r\n i18n: any;\r\n endingPage: PageConfigurator;\r\n questions: Map = new Map();\r\n configuration: SurveyConfiguration;\r\n\r\n constructor({\r\n featureArea, serverContext, i18n, configuration,\r\n }) {\r\n this.featureArea = featureArea;\r\n this.pages = [];\r\n this.serverContext = serverContext;\r\n this.i18n = i18n;\r\n this.endingPage = new PageConfigurator({\r\n serverContext: this.serverContext, i18n: this.i18n, surveyConfigurator: this,\r\n });\r\n this.configuration = configuration;\r\n }\r\n\r\n // feature area is used to classify the feedback. You can find and create feature areas at\r\n // https://ocv.microsoft.com/#/manage/?aid=a9bfe3b9-40d8-443d-9d80-ba3369aa1463\r\n getFeatureArea() {\r\n return this.featureArea;\r\n }\r\n\r\n // sort the questions by page and question position\r\n sortPages(): void {\r\n this.pages.forEach(page => page.sortQuestions());\r\n }\r\n\r\n // get the page at index, or create it if it doesn't exist\r\n getPageIfNoneCreateIt(pageIndex: number): PageConfigurator {\r\n let page = this.pages[pageIndex];\r\n if (page == null) {\r\n this.pages[pageIndex] = new PageConfigurator({\r\n serverContext: this.serverContext, i18n: this.i18n, surveyConfigurator: this,\r\n });\r\n page = this.pages[pageIndex];\r\n }\r\n return page;\r\n }\r\n\r\n hasPageAtIndex(pageIndex: number, answers: any): boolean {\r\n const page = this.pages[pageIndex];\r\n if (page == null || !page.isVisible(answers)) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n // get the page at index\r\n getPage(pageIndex: number): PageConfigurator {\r\n return this.pages[pageIndex];\r\n }\r\n\r\n // get the ending page, the page after submitting the survey\r\n getEndingPage(): PageConfigurator {\r\n return this.endingPage;\r\n }\r\n\r\n // add a question to the survey\r\n addQuestion(questionConfiguration): void {\r\n const { page: pageIndex, key } = questionConfiguration;\r\n const page = this.getPageIfNoneCreateIt(pageIndex);\r\n const question = page.addQuestion(questionConfiguration);\r\n this.questions.set(key, question);\r\n }\r\n\r\n // get question by key for question with question integration\r\n getQuestionByKey(key: string) {\r\n return this.questions.get(key);\r\n }\r\n\r\n // add questions to the survey\r\n addQuestions(questionConfigurations): void {\r\n questionConfigurations.forEach(questionConfiguration => this.addQuestion(questionConfiguration));\r\n }\r\n\r\n // get all the default answers for the survey\r\n getDefaultAnswers(): Object {\r\n const answers = {};\r\n this.pages.forEach((page) => {\r\n page.questions.forEach((question) => {\r\n answers[question.key] = question.getDefaultData();\r\n });\r\n });\r\n return answers;\r\n }\r\n\r\n // get all the default dirty state for the survey\r\n getDefaultDirtyState(bool: boolean): Object {\r\n const state = {};\r\n this.pages.forEach((page) => {\r\n page.questions.forEach((question) => {\r\n state[question.key] = question.getDefaultDirtyState(bool);\r\n });\r\n });\r\n return state;\r\n }\r\n\r\n getDefaultDirtyStatePerPage(bool: boolean, pageIndex: number): Object {\r\n const state = {};\r\n this.pages[pageIndex].questions.forEach((question) => {\r\n state[question.key] = question.getDefaultDirtyState(bool);\r\n });\r\n return state;\r\n }\r\n\r\n setConfiguration(configuration: SurveyConfiguration) {\r\n this.configuration = configuration;\r\n }\r\n\r\n getConfiguration(): SurveyConfiguration {\r\n return this.configuration;\r\n }\r\n\r\n getOtherFlags(): Others {\r\n const {\r\n others = {},\r\n } = this.getConfiguration();\r\n\r\n return others;\r\n }\r\n\r\n // get the feedback data for sending to the OCV service\r\n getFeedbackData(answers: Object): { feedback, extendedManifestData } {\r\n let remaining: Array = [];\r\n let comments: Array = [];\r\n let email = null;\r\n let ratingObject: any = null;\r\n\r\n this.pages.forEach((page) => {\r\n if (page.isVisible(answers)) {\r\n const {\r\n email: emailData,\r\n rating: ratingData,\r\n remaining: remainingData,\r\n comments: commentsData,\r\n } = page.getFeedbackData(answers);\r\n\r\n if (emailData != null) {\r\n email = emailData;\r\n }\r\n if (ratingData != null) {\r\n ratingObject = ratingData;\r\n }\r\n\r\n comments = comments.concat(commentsData);\r\n remaining = remaining.concat(remainingData);\r\n }\r\n });\r\n\r\n let comment;\r\n\r\n if (comments.length > 0) {\r\n // only one comment could show in the OCV,\r\n // the remaining comments will be put inside remaining\r\n comment = comments.shift();\r\n remaining = remaining.concat(comments);\r\n }\r\n\r\n const { combineTextInputToComment } = this.getOtherFlags();\r\n\r\n if (combineTextInputToComment) {\r\n if (_.isEmpty(comment)) {\r\n comment = {\r\n answer: '',\r\n type: 'comment',\r\n };\r\n } else if (_.isEmpty(comment.answer)) {\r\n comment.answer = '';\r\n }\r\n remaining.forEach((question: any) => {\r\n if (question.type === 'single-selection') {\r\n if (!_.isEmpty(question.answer.input)) {\r\n comment.answer = comment.answer.concat(` ${question.answer.input}`);\r\n }\r\n } else if (question.type === 'multiple-selection') {\r\n question.answer.forEach((optionAnswer) => {\r\n if (!_.isEmpty(optionAnswer.input)) {\r\n comment.answer = comment.answer.concat(` ${optionAnswer.input}`);\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n const {\r\n rating = null,\r\n ratingOptionsCount,\r\n } = ratingObject || {};\r\n\r\n const feedback = {\r\n rating: rating == null ? -1 : rating,\r\n email,\r\n comment: comment?.answer,\r\n };\r\n\r\n const questions = {};\r\n for (let q = 0; q < remaining.length; q += 1) {\r\n questions[`question${q}`] = stringifySync(remaining[q]);\r\n }\r\n questions['questionCount'] = remaining.length;\r\n\r\n const extendedManifestData = {\r\n surveySpecificData: {\r\n comment: feedback.comment ? [feedback.comment] : [],\r\n rating: feedback.rating !== -1 ? [{ selectedRating: `${Math.round(feedback.rating * ratingOptionsCount) - 1}` }] : [],\r\n questions,\r\n hasEmail: !_.isNull(email),\r\n },\r\n };\r\n\r\n return {\r\n feedback,\r\n extendedManifestData,\r\n };\r\n }\r\n}\r\n","import React, { useContext, useMemo } from 'react';\r\nimport classNames from 'classnames';\r\nimport {\r\n Stack,\r\n} from '@fluentui/react';\r\nimport { SurveyContext } from '@bingads-webui-campaign-react/survey-context';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { surveyStyles } from '../../styles';\r\nimport { SurveyContextType } from '../../survey-context';\r\n\r\nexport const SurveyView = React.memo((props) => {\r\n const classes:any = useDefaultStyles(() => surveyStyles);\r\n\r\n // @ts-ignore\r\n const surveyContext : SurveyContextType = useContext(SurveyContext);\r\n\r\n const {\r\n surveyConfigurator,\r\n getIsEndingPage,\r\n getPageIndex,\r\n } = surveyContext;\r\n\r\n const isEndingPage = getIsEndingPage();\r\n const pageIndex = getPageIndex();\r\n\r\n const page = useMemo(() => (isEndingPage ?\r\n surveyConfigurator.getEndingPage() :\r\n surveyConfigurator.getPage(pageIndex)), [surveyConfigurator, isEndingPage, pageIndex]);\r\n const PageView = useMemo(() => page.getView(), [page]);\r\n\r\n const {\r\n style,\r\n } = surveyConfigurator.getConfiguration();\r\n\r\n const customizedClasses: any = useDefaultStyles(() => style);\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n});\r\n","import React, { useState, useMemo, useCallback, useContext, useEffect } from 'react';\r\nimport classNames from 'classnames';\r\nimport { isUndefined, result, isEmpty } from 'underscore';\r\nimport { Modal } from '@fluentui/react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { useLock, keyVault, priorityLevel } from '@bingads-webui-react/popup-manager';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { SurveyContext } from '@bingads-webui-campaign-react/survey-context';\r\nimport { stringifySync } from '@bingads-webui/safe-json';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { SurveyConfigurator } from './survey-construction/configurator/survey';\r\nimport { SurveyConfiguration } from './survey.types';\r\nimport { SurveyView } from './survey-construction/view/survey';\r\nimport { modalStyles } from './styles';\r\nimport { returnFocus } from './utility';\r\n\r\ninterface SurveyFactoryProps {\r\n getSurveyConfiguration: (options: any) => SurveyConfiguration;\r\n onSurveySubmit: (options: any) => void;\r\n onSurveyDismiss: (options: any) => void;\r\n onSurveyRender: (options: any) => void;\r\n surveyDataService: {\r\n sendFeedback: any;\r\n };\r\n logActivity?: (string) => void;\r\n surveyName?: string;\r\n // eslint-disable-next-line react/require-default-props\r\n lastActiveElement?: HTMLElement;\r\n customParams?: any;\r\n}\r\n\r\nfunction usePage(surveyConfigurator: SurveyConfigurator, surveyAnswers: any, { setCurrentPageDirty, logActivity, analysisActivity }) {\r\n const [pageIndex, setPageIndex] = useState(0);\r\n const [fromBack, setFromBack] = useState(false);\r\n const [isEndingPage, setIsEndingPage] = useState(false);\r\n\r\n const onNext = useCallback(() => {\r\n const currentPage = surveyConfigurator.getPage(pageIndex);\r\n if (currentPage.isValid(surveyAnswers)) {\r\n logActivity('action: next page');\r\n setPageIndex(pageIndex + 1);\r\n analysisActivity('onNext');\r\n setFromBack(false);\r\n } else {\r\n setCurrentPageDirty(pageIndex);\r\n analysisActivity('onNext - invalid');\r\n }\r\n }, [surveyConfigurator, pageIndex, surveyAnswers, logActivity, analysisActivity, setCurrentPageDirty]);\r\n\r\n const onBack = useCallback(() => {\r\n setPageIndex(pageIndex - 1);\r\n logActivity('action: previous page');\r\n analysisActivity('onBack');\r\n setFromBack(true);\r\n }, [pageIndex, logActivity, analysisActivity]);\r\n\r\n\r\n const getIsFirstPage = useCallback(() => pageIndex === 0, [pageIndex]);\r\n const getIsLastPage = useCallback(\r\n () =>\r\n !surveyConfigurator.hasPageAtIndex(pageIndex + 1, surveyAnswers),\r\n [pageIndex, surveyAnswers, surveyConfigurator]\r\n );\r\n\r\n const getPageIndex = useCallback(() => pageIndex, [pageIndex]);\r\n const getIsEndingPage = useCallback(() => isEndingPage, [isEndingPage]);\r\n const getIsFromBack = useCallback(() => fromBack, [fromBack]);\r\n\r\n return {\r\n getPageIndex,\r\n getIsEndingPage,\r\n getIsFromBack,\r\n setIsEndingPage,\r\n onNext,\r\n onBack,\r\n getIsFirstPage,\r\n getIsLastPage,\r\n };\r\n}\r\n\r\nfunction useQuestionState(surveyConfigurator: SurveyConfigurator) {\r\n const [surveyAnswers, setSurveyAnswers] = useState(surveyConfigurator.getDefaultAnswers());\r\n const [surveyDirtyState, setSurveyDirtyState] = useState(surveyConfigurator.getDefaultDirtyState(false));\r\n\r\n const setAnswersByKey = useCallback((key, data) => {\r\n const newAnswers = { ...surveyAnswers };\r\n newAnswers[key] = data;\r\n setSurveyAnswers(newAnswers);\r\n }, [setSurveyAnswers, surveyAnswers]);\r\n\r\n const setSurveyDirtyStateByKey = useCallback((key, data) => {\r\n const newDirtyState = { ...surveyDirtyState };\r\n newDirtyState[key] = data;\r\n setSurveyDirtyState(newDirtyState);\r\n }, [surveyDirtyState, setSurveyDirtyState]);\r\n\r\n const getAnswersByKey = useCallback(key => surveyAnswers[key], [surveyAnswers]);\r\n const getSurveyAnswers = useCallback(() => surveyAnswers, [surveyAnswers]);\r\n const getSurveyDirtyStateByKey = useCallback(key => surveyDirtyState[key], [surveyDirtyState]);\r\n const getSurveyDirtyState = useCallback(() => surveyDirtyState, [surveyDirtyState]);\r\n\r\n const setCurrentPageDirty = useCallback((pageIndex) => {\r\n const newState = surveyConfigurator.getDefaultDirtyStatePerPage(true, pageIndex);\r\n setSurveyDirtyState({ ...surveyDirtyState, ...newState });\r\n }, [surveyConfigurator, surveyDirtyState]);\r\n\r\n return {\r\n getSurveyAnswers,\r\n setAnswersByKey,\r\n getAnswersByKey,\r\n getSurveyDirtyState,\r\n setSurveyDirtyStateByKey,\r\n getSurveyDirtyStateByKey,\r\n setCurrentPageDirty,\r\n };\r\n}\r\n\r\nfunction parseSurveyConfiguration({ getSurveyConfiguration, serverContext, i18n }): SurveyConfigurator {\r\n const surveyConfiguration = getSurveyConfiguration({\r\n i18n,\r\n serverContext,\r\n });\r\n const {\r\n rating,\r\n email,\r\n questions,\r\n featureArea,\r\n } = surveyConfiguration;\r\n\r\n const surveyConfigurator = new SurveyConfigurator({\r\n featureArea,\r\n serverContext,\r\n i18n,\r\n configuration: surveyConfiguration,\r\n });\r\n\r\n if (rating) {\r\n surveyConfigurator.addQuestion(rating);\r\n }\r\n if (email) {\r\n surveyConfigurator.addQuestion(email);\r\n }\r\n surveyConfigurator.addQuestions(questions);\r\n\r\n surveyConfigurator.sortPages();\r\n return surveyConfigurator;\r\n}\r\n\r\nexport const SurveyFactory = (props: SurveyFactoryProps) => {\r\n const {\r\n getSurveyConfiguration,\r\n surveyDataService,\r\n onSurveySubmit,\r\n onSurveyDismiss,\r\n onSurveyRender,\r\n logActivity,\r\n surveyName,\r\n lastActiveElement,\r\n customParams,\r\n } = props;\r\n\r\n const classes: any = useDefaultStyles(() => modalStyles);\r\n\r\n // @ts-ignore\r\n const serverContext = useContext(ServerContext);\r\n const i18n = useContext(I18nContext) as any;\r\n // @ts-ignore\r\n const isPopupOutsideDismissEnabled = result(serverContext, ['DynamicPermissions', 'PopupOutsideDismiss'], false) || result(serverContext, ['CCUIPilots', 'dynamic', 'PopupOutsideDismiss'], false);\r\n\r\n const surveyConfigurator = useMemo(\r\n () => parseSurveyConfiguration({ getSurveyConfiguration, serverContext, i18n }),\r\n [getSurveyConfiguration, serverContext, i18n]\r\n );\r\n\r\n const [isModalOpen, setIsModalOpen] = useState(true);\r\n\r\n const {\r\n getSurveyAnswers,\r\n getAnswersByKey,\r\n setAnswersByKey,\r\n getSurveyDirtyState,\r\n setSurveyDirtyStateByKey,\r\n getSurveyDirtyStateByKey,\r\n setCurrentPageDirty,\r\n } = useQuestionState(surveyConfigurator);\r\n\r\n const surveyAnswers = getSurveyAnswers();\r\n const surveyDirtyState = getSurveyDirtyState();\r\n\r\n const {\r\n modalSettings = {},\r\n others = {},\r\n } = surveyConfigurator.getConfiguration();\r\n\r\n const {\r\n isGlobalModalStyleEnabled,\r\n userActionAnalysisEnabled,\r\n isUserInitiatedSurvey,\r\n isThankYouPageEnabled = true,\r\n shouldAutoClose = true,\r\n isInPageMiddle = false,\r\n isModeless: isOriginalModeless,\r\n isBlocking = false,\r\n } = others;\r\n\r\n const myLogActivity = useCallback((string: string) => {\r\n if (logActivity && surveyName) {\r\n logActivity(`SurveyFactory | survey: ${surveyName}, ${string}`);\r\n }\r\n }, [logActivity, surveyName]);\r\n\r\n const analysisActivity = useCallback((action: string) => {\r\n if (!userActionAnalysisEnabled) {\r\n return;\r\n }\r\n\r\n function flattenKeys(obj: object, prefix = '') {\r\n return Object.keys(obj).reduce((acc, key) => {\r\n const newKey = prefix ? `${prefix}.${key}` : key;\r\n if (typeof obj[key] === 'object') {\r\n Object.assign(acc, flattenKeys(obj[key], newKey));\r\n } else {\r\n acc[newKey] = obj[key];\r\n }\r\n return acc;\r\n }, {});\r\n }\r\n\r\n if (surveyName) {\r\n setClarityTag({ SurveyFactory: `${surveyName}, ${action}` });\r\n\r\n if (logActivity) {\r\n // @ts-ignore\r\n logActivity(`SurveyFactory | survey: ${surveyName}, action: ${action}, surveyAnswers: ${JSON.stringify(flattenKeys(surveyAnswers)).replaceAll('\"', '')}`);\r\n // @ts-ignore\r\n logActivity(`SurveyFactory | survey: ${surveyName}, action: ${action}, surveyDirtyState: ${JSON.stringify(flattenKeys(surveyDirtyState)).replaceAll('\"', '')}`);\r\n }\r\n }\r\n }, [userActionAnalysisEnabled, surveyName, logActivity, surveyAnswers, surveyDirtyState]);\r\n\r\n const additionalLogData = useMemo(() => {\r\n // @ts-ignore\r\n const userCreatedDateTime = result(serverContext, ['CurrentUser', 'FetchedCreatedDateTime']) || result(serverContext, ['CurrentUser', 'CreatedDateTime']);\r\n const localizedUserCreatedDateTime = new Date(userCreatedDateTime);\r\n const now = new Date();\r\n const deltaTime = now.getTime() - localizedUserCreatedDateTime.getTime();\r\n const deltaDay = Math.ceil(deltaTime / (1 * 24 * 60 * 60 * 1000));\r\n\r\n return {\r\n userCreatedDateTime,\r\n userActiveDay: deltaDay,\r\n };\r\n }, [serverContext]);\r\n\r\n const { lock, releaseLock } = useLock({\r\n key: `${keyVault.survey}-${surveyName}`,\r\n // Increase the WebuiUserSurvey priority to let it not be affected by teaching bubble\r\n priority: surveyName === 'WebuiUserSurvey' ? priorityLevel.systemLevelAnnouncement : priorityLevel.survey,\r\n force: isUserInitiatedSurvey,\r\n // @ts-ignore\r\n autoClose: shouldAutoClose && result(serverContext, ['Permissions', 'IsCentralizedPopupManagementEnabled']),\r\n });\r\n\r\n useEffect(() => {\r\n if (lock) {\r\n onSurveyRender?.(additionalLogData);\r\n }\r\n }, [lock, onSurveyRender, additionalLogData]);\r\n\r\n const {\r\n getPageIndex,\r\n onNext,\r\n onBack,\r\n getIsEndingPage,\r\n getIsLastPage,\r\n getIsFirstPage,\r\n setIsEndingPage,\r\n getIsFromBack,\r\n } = usePage(surveyConfigurator, surveyAnswers, { setCurrentPageDirty, logActivity: myLogActivity, analysisActivity });\r\n\r\n const onCloseModal = useCallback(() => {\r\n setIsModalOpen(false);\r\n returnFocus(lastActiveElement);\r\n releaseLock();\r\n }, [lastActiveElement, releaseLock]);\r\n\r\n const onSubmit = useCallback(() => {\r\n const pageIndex = getPageIndex();\r\n const currentPage = surveyConfigurator.getPage(pageIndex);\r\n\r\n if (currentPage.isValid(surveyAnswers)) {\r\n const { feedback, extendedManifestData } = surveyConfigurator.getFeedbackData(surveyAnswers);\r\n const telemetry = {\r\n featureArea: surveyConfigurator.getFeatureArea(),\r\n };\r\n\r\n surveyDataService.sendFeedback({\r\n feedback,\r\n extendedManifestData,\r\n telemetry,\r\n onFinishSendRequest: () => {\r\n myLogActivity('action: submit');\r\n myLogActivity(`trace: feedback, ${stringifySync(feedback)}`);\r\n if (customParams) {\r\n myLogActivity(`trace: customParams, ${stringifySync(customParams)} | trace: extendedManifestData, ${stringifySync(extendedManifestData)}`);\r\n } else {\r\n myLogActivity(`trace: extendedManifestData, ${stringifySync(extendedManifestData)}`);\r\n }\r\n // @ts-ignore\r\n const hasComment = !isEmpty(result(feedback, ['comment'], ''));\r\n onSurveySubmit({\r\n hasComment,\r\n ...additionalLogData,\r\n });\r\n },\r\n });\r\n\r\n setIsEndingPage(true);\r\n\r\n if (!isThankYouPageEnabled) {\r\n onCloseModal();\r\n }\r\n\r\n analysisActivity('onSubmit');\r\n } else {\r\n setCurrentPageDirty(pageIndex);\r\n analysisActivity('onSubmit - invalid');\r\n }\r\n }, [getPageIndex, surveyConfigurator, surveyAnswers, surveyDataService, setIsEndingPage, isThankYouPageEnabled, analysisActivity, myLogActivity, customParams, onSurveySubmit, onCloseModal, setCurrentPageDirty, additionalLogData]);\r\n\r\n const onDismiss = useCallback((dismissType: string) => {\r\n onCloseModal();\r\n onSurveyDismiss(additionalLogData);\r\n myLogActivity(`action: dismiss, dismissType: ${dismissType}`);\r\n analysisActivity(`onDismiss - ${dismissType}`);\r\n }, [onCloseModal, onSurveyDismiss, myLogActivity, analysisActivity, additionalLogData]);\r\n\r\n const onDone = useCallback(() => {\r\n onCloseModal();\r\n myLogActivity('action: done');\r\n }, [onCloseModal, myLogActivity]);\r\n\r\n const onModalDismiss = useCallback((event) => {\r\n if (event && event.keyCode === 27) { // Escape\r\n onDismiss('keyboard - ESC');\r\n } else {\r\n onCloseModal();\r\n myLogActivity('action: lightDismiss');\r\n }\r\n }, [onDismiss, onCloseModal, myLogActivity]);\r\n\r\n const modalSpecificStyles = useMemo(() => {\r\n if (isInPageMiddle) {\r\n return {\r\n position: 'absolute',\r\n };\r\n }\r\n\r\n return {\r\n main: {\r\n position: 'absolute',\r\n right: '40px',\r\n bottom: '0',\r\n minHeight: '0',\r\n zIndex: 10000000,\r\n },\r\n };\r\n }, [isInPageMiddle]);\r\n\r\n const isModeless = useMemo(() => {\r\n if (!isUndefined(isOriginalModeless)) {\r\n return isOriginalModeless;\r\n }\r\n\r\n return !isPopupOutsideDismissEnabled;\r\n }, [isOriginalModeless, isPopupOutsideDismissEnabled]);\r\n\r\n useEffect(() => {\r\n myLogActivity('action: mount');\r\n }, [myLogActivity]);\r\n\r\n return lock && (\r\n surveyConfigurator.getConfiguration(),\r\n getIsSubmitButtonDisabled: () => false,\r\n setSurveyDirtyStateByKey,\r\n getSurveyDirtyStateByKey,\r\n getSurveyAnswers,\r\n getAnswersByKey,\r\n setAnswersByKey,\r\n onNext,\r\n onBack,\r\n getPageIndex,\r\n getIsFirstPage,\r\n getIsLastPage,\r\n getIsEndingPage,\r\n setIsEndingPage,\r\n getIsFromBack,\r\n onDismiss,\r\n onSubmit,\r\n onDone,\r\n logActivity: myLogActivity,\r\n }}\r\n >\r\n \r\n {isModalOpen && }\r\n \r\n \r\n );\r\n};\r\n\r\nSurveyFactory.defaultProps = {\r\n logActivity: undefined,\r\n surveyName: undefined,\r\n customParams: undefined,\r\n};\r\n","import React from 'react';\r\nimport {\r\n RatingConfigurator,\r\n MultipleSelectionConfigurator,\r\n CommentConfigurator,\r\n EmailConfigurator,\r\n SurveyFactory,\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\n\r\nconst exampleSurveyConfig = (options) => {\r\n const {\r\n i18n,\r\n } = options;\r\n\r\n return {\r\n featureArea: 'WebUIUserCSAT',\r\n style: {\r\n root: {\r\n maxWidth: 480,\r\n },\r\n },\r\n others: {\r\n shouldHideInputWhenNotSelected: true,\r\n userActionAnalysisEnabled: true,\r\n combineTextInputToComment: true,\r\n },\r\n rating: {\r\n isRequired: true,\r\n Type: RatingConfigurator,\r\n key: 'rating',\r\n page: 0,\r\n position: 0,\r\n getTitle: () => i18n.getString(_TL_('Please rate your overall satisfaction with Microsoft Advertising\\'s interface.')),\r\n isVisible: () => true,\r\n options: [\r\n {\r\n key: '5',\r\n text: i18n.getString(_TL_('Very satisfied')),\r\n rating: 1.0,\r\n },\r\n {\r\n key: '4',\r\n text: i18n.getString(_TL_('Moderately satisfied')),\r\n rating: 0.8,\r\n },\r\n {\r\n key: '3',\r\n text: i18n.getString(_TL_('Neither satisfied nor dissatisfied')),\r\n rating: 0.6,\r\n },\r\n {\r\n key: '2',\r\n text: i18n.getString(_TL_('Moderately dissatisfied')),\r\n rating: 0.4,\r\n },\r\n {\r\n key: '1',\r\n text: i18n.getString(_TL_('Very dissatisfied')),\r\n rating: 0.2,\r\n },\r\n ],\r\n },\r\n email: {\r\n Type: EmailConfigurator,\r\n key: 'email',\r\n page: 1,\r\n position: 2,\r\n getTitle: () => i18n.getString(_TL_('Can we follow up with you about your responses?')),\r\n isVisible: answers => ['3', '2', '1'].includes(answers.rating.selectedOption),\r\n options: [\r\n {\r\n key: 'yes',\r\n text: i18n.getString(_TL_('Yes - specify the contact email below')),\r\n placeholder: i18n.getString(_TL_('Enter your email')),\r\n hasInput: true,\r\n },\r\n {\r\n key: 'no',\r\n text: i18n.getString(_TL_('No')),\r\n },\r\n ],\r\n },\r\n questions: [\r\n {\r\n Type: MultipleSelectionConfigurator,\r\n key: 'q1',\r\n page: 1,\r\n position: 0,\r\n getTitle: (answers, surveyConfigurator) => {\r\n const questionConfigurator = surveyConfigurator.getQuestionByKey('rating');\r\n const optionKey = answers.rating.selectedOption;\r\n // option to text\r\n return i18n.getString(\r\n _TL_('Can you tell us more about where you are {{option}} with our interface?'),\r\n { option: questionConfigurator.optionKeyToText[optionKey] }\r\n );\r\n },\r\n isVisible: answers => ['3', '2', '1'].includes(answers.rating.selectedOption),\r\n options: [\r\n {\r\n key: 'q1o1',\r\n text: i18n.getString(_TL_('Campaign creation and editing')),\r\n },\r\n {\r\n key: 'q1o2',\r\n text: i18n.getString(_TL_('Interface navigation')),\r\n },\r\n {\r\n key: 'q1o3',\r\n text: i18n.getString(_TL_('Search and filtering')),\r\n },\r\n {\r\n key: 'q1o4',\r\n text: i18n.getString(_TL_('The overview page')),\r\n },\r\n {\r\n key: 'q1o5',\r\n text: i18n.getString(_TL_('Others - Please feel free to elaborate below')),\r\n placeholder: i18n.getString(_TL_('Please feel free to elaborate')),\r\n hasInput: true,\r\n maxLength: 2000,\r\n },\r\n ],\r\n data: {\r\n },\r\n },\r\n {\r\n Type: CommentConfigurator,\r\n key: 'q2',\r\n page: 1,\r\n position: 1,\r\n getTitle: () => i18n.getString(_TL_('How can we continue to improve?')),\r\n isVisible: answers => ['3', '2', '1'].includes(answers.rating.selectedOption),\r\n maxLength: 2000,\r\n data: {\r\n },\r\n },\r\n ],\r\n };\r\n};\r\n\r\nexport const FactorySurveyView = props => (\r\n );\r\n","import { getTheme } from '@fluentui/react';\r\n\r\nconst theme = getTheme();\r\n\r\nexport const iconButtonStyles = {\r\n root: {\r\n color: theme.palette.neutralPrimary,\r\n marginLeft: 'auto',\r\n marginTop: '4px',\r\n marginRight: '2px',\r\n },\r\n rootHovered: {\r\n color: theme.palette.neutralDark,\r\n },\r\n};\r\n\r\nexport const surveyStyles = surveyMaxWidth => ({\r\n container: {\r\n padding: 24,\r\n maxWidth: surveyMaxWidth,\r\n fontFamily: 'Segoe UI',\r\n lineHeight: '20px',\r\n },\r\n header: {\r\n flex: '1 1 auto',\r\n display: 'flex',\r\n alignItems: 'center',\r\n marginBottom: 12,\r\n '& .survey-close-button': {\r\n marginTop: 0,\r\n },\r\n },\r\n title: {\r\n fontSize: 16,\r\n fontWeight: 600,\r\n },\r\n body: {\r\n fontSIze: 14,\r\n color: '#000000',\r\n '& .asterisk': {\r\n color: '#A80000',\r\n },\r\n },\r\n ratingDescription: {\r\n fontWeight: 600,\r\n },\r\n rating: {\r\n '& label': {\r\n padding: 0,\r\n fontWewight: 'normal',\r\n },\r\n '& input': {\r\n visibility: 'hidden',\r\n },\r\n },\r\n ratingOption: {\r\n '& span.ms-ChoiceFieldLabel': {\r\n fontWeight: 400,\r\n },\r\n },\r\n area: {\r\n marginTop: 16,\r\n },\r\n areaDescription: {\r\n fontWeight: 600,\r\n marginBottom: 7,\r\n },\r\n areaCheckbox: {\r\n\r\n },\r\n areaComment: {\r\n marginTop: 6,\r\n marginLeft: 27,\r\n },\r\n comment: {\r\n marginTop: 16,\r\n },\r\n commentDescription: {\r\n fontWeight: 600,\r\n },\r\n commentInput: {\r\n marginTop: 8,\r\n },\r\n email: {\r\n marginTop: 16,\r\n },\r\n emailDescription: {\r\n fontWeight: 600,\r\n },\r\n emailOptions: {\r\n '& .ms-ChoiceField-wrapper': {\r\n width: '100%',\r\n },\r\n },\r\n emailOption: {\r\n '& span.ms-ChoiceFieldLabel': {\r\n fontWeight: 400,\r\n },\r\n '& label': {\r\n padding: 0,\r\n },\r\n },\r\n emailInput: {\r\n marginTop: 6,\r\n marginLeft: 26,\r\n marginBottom: 4,\r\n },\r\n emailError: {\r\n marginLeft: 26,\r\n color: '#A80000',\r\n lineHeight: '16px',\r\n fontSize: 12,\r\n fontWeight: 400,\r\n marginTop: 2,\r\n },\r\n footer: {\r\n fontSIze: 14,\r\n marginTop: 16,\r\n color: '#000000',\r\n },\r\n privacyStatement: {\r\n lineHeight: '16px',\r\n marginTop: 20,\r\n marginBottom: 20,\r\n fontSize: 12,\r\n color: '#605E5C',\r\n },\r\n infoText: {\r\n fontWeight: 600,\r\n textDecoration: 'underline',\r\n },\r\n validationError: {\r\n color: '#A80000',\r\n lineHeight: '16px',\r\n fontSize: 12,\r\n fontWeight: 400,\r\n marginTop: 2,\r\n },\r\n buttonBar: {\r\n float: 'right',\r\n },\r\n submitButton: {\r\n marginRight: 12,\r\n },\r\n cancelButton: {\r\n\r\n },\r\n closeButton: {\r\n\r\n },\r\n});\r\n","import React, { useState, useMemo, useCallback, useRef } from 'react';\r\nimport { reduce, map, filter, keys, noop, compose, partial } from 'underscore'; // eslint-disable-line max-len\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport {\r\n Modal,\r\n Stack,\r\n IconButton,\r\n Text,\r\n ChoiceGroup,\r\n Link,\r\n TextField,\r\n Checkbox,\r\n PrimaryButton,\r\n DefaultButton,\r\n} from '@fluentui/react';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport { Glyphicon } from '@bingads-webui-react/primitive';\r\nimport { ReactTemplate } from '@bingads-webui-react/react-template';\r\nimport { withServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport {\r\n surveyStyles,\r\n iconButtonStyles,\r\n} from './styles';\r\n\r\nconst surveyMaxWidth = 480;\r\nconst commentMaxLength = 2000;\r\n\r\nfunction SurveyViewInternal(props) {\r\n const {\r\n classes,\r\n i18n,\r\n serverContext,\r\n surveyDataService,\r\n onSurveySubmit,\r\n onSurveyDismiss,\r\n } = props;\r\n\r\n const surveyRef = useRef(null);\r\n\r\n const [isModalOpen, setIsModalOpen] = useState(true);\r\n\r\n const [selectedOption, setSelectedOption] = useState(null);\r\n\r\n const [validationError, setValidationError] = useState(true);\r\n\r\n const validate = useCallback((option) => {\r\n if (option) {\r\n setValidationError('');\r\n } else {\r\n setValidationError(i18n.getString(_TL_('Please answer this question')));\r\n }\r\n }, [i18n]);\r\n\r\n const onChangeRating = useCallback((_, option) => {\r\n setSelectedOption(option);\r\n validate(option);\r\n }, [validate]);\r\n\r\n const ratingOptions = useMemo(() => {\r\n const options = [\r\n {\r\n key: 'very-satisfied',\r\n text: i18n.getString(_TL_('Very satisfied')),\r\n rating: 1.0,\r\n isAdditionalContentVisible: false,\r\n },\r\n {\r\n key: 'moderately-satisfied',\r\n text: i18n.getString(_TL_('Moderately satisfied')),\r\n rating: 0.8,\r\n isAdditionalContentVisible: false,\r\n },\r\n {\r\n key: 'neither-satisfied-nor-dissatisfied',\r\n text: i18n.getString(_TL_('Neither satisfied or dissatisfied')),\r\n rating: 0.6,\r\n isAdditionalContentVisible: true,\r\n },\r\n {\r\n key: 'moderately-dissatisfied',\r\n text: i18n.getString(_TL_('Moderately dissatisfied')),\r\n rating: 0.4,\r\n isAdditionalContentVisible: true,\r\n },\r\n {\r\n key: 'very-dissatisfied',\r\n text: i18n.getString(_TL_('Very dissatisfied')),\r\n rating: 0.2,\r\n isAdditionalContentVisible: true,\r\n },\r\n ];\r\n\r\n return options.map(value => ({\r\n ariaLabel: value.text,\r\n onRenderField: (_props, render) => (\r\n
\r\n {render(_props)}\r\n
\r\n ),\r\n ...value,\r\n }));\r\n }, [i18n, classes.ratingOption]);\r\n\r\n const areaOptions = useMemo(() => [\r\n {\r\n key: 'campaignCreationAndEditing',\r\n label: i18n.getString(_TL_('Campaign creation and editing')),\r\n withComment: false,\r\n }, {\r\n key: 'interfaceNavigation',\r\n label: i18n.getString(_TL_('Interface navigation')),\r\n withComment: false,\r\n }, {\r\n key: 'searchAndFiltering',\r\n label: i18n.getString(_TL_('Search and filtering')),\r\n withComment: false,\r\n }, {\r\n key: 'theOverviewPage',\r\n label: i18n.getString(_TL_('The overview page')),\r\n withComment: false,\r\n }, {\r\n key: 'others',\r\n label: i18n.getString(_TL_('Others - Please feel free to elaborate below')),\r\n withComment: true,\r\n },\r\n ], [i18n]);\r\n\r\n const initialAreaState = useMemo(() => reduce(areaOptions, (memo, { key }) => ({\r\n ...memo,\r\n [key]: false,\r\n }), {}), [areaOptions]);\r\n\r\n const [areaState, setAreaState] = useState(initialAreaState);\r\n\r\n const [areaComment, setAreaComment] = useState('');\r\n const [areaCommentDescription, setAreaCommentDescription] = useState('');\r\n const [areaCommentError, setAreaCommentError] = useState('');\r\n\r\n const onChangeAreaComment = useCallback((_, val) => {\r\n setAreaComment(val);\r\n if (val.length > commentMaxLength) {\r\n setAreaCommentDescription('');\r\n setAreaCommentError('Field should not exceed 2000 characters');\r\n } else {\r\n setAreaCommentDescription(`${commentMaxLength - val.length} characters remaining`);\r\n setAreaCommentError('');\r\n }\r\n }, []);\r\n\r\n const [comment, setComment] = useState('');\r\n const [commentDescription, setCommentDescription] = useState('');\r\n const [commentError, setCommentError] = useState('');\r\n\r\n const onChangeComment = useCallback((_, val) => {\r\n setComment(val);\r\n if (val.length > commentMaxLength) {\r\n setCommentDescription('');\r\n setCommentError('Field should not exceed 2000 characters');\r\n } else {\r\n setCommentDescription(`${commentMaxLength - val.length} characters remaining`);\r\n setCommentError('');\r\n }\r\n }, []);\r\n\r\n const [emailOption, setEmailOption] = useState(false);\r\n const [email, setEmail] = useState(serverContext.CurrentUser.Email);\r\n const [emailError, setEmailError] = useState('');\r\n\r\n const onChangeEmailOption = useCallback((_, option) => {\r\n setEmailOption(option);\r\n }, []);\r\n\r\n const validateEmailAddress = useCallback((emailAddress) => {\r\n const re = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n return re.test(emailAddress);\r\n }, []);\r\n\r\n const onChangeEmail = useCallback((_, val) => {\r\n setEmail(val);\r\n if (validateEmailAddress(val)) {\r\n setEmailError('');\r\n } else {\r\n setEmailError(i18n.getString(_TL_('Invalid email address')));\r\n }\r\n }, [validateEmailAddress, i18n]);\r\n\r\n const emailOptions = useMemo(() => {\r\n const options = [\r\n {\r\n key: 'yes',\r\n text: i18n.getString(_TL_('Yes - specify the contact email below')),\r\n },\r\n {\r\n key: 'no',\r\n text: i18n.getString(_TL_('No')),\r\n },\r\n ];\r\n\r\n return options.map(value => ({\r\n ariaLabel: value.text,\r\n onRenderField: (_props, render) => (\r\n
\r\n {render(_props)}\r\n {emailOption && emailOption.key === 'yes' && value.key === 'yes' &&\r\n \r\n \r\n
\r\n {emailError}\r\n
\r\n
\r\n }\r\n
\r\n ),\r\n ...value,\r\n }));\r\n }, [i18n, classes.emailOption, emailOption, classes.emailInput, email, onChangeEmail, classes.emailError, emailError]);\r\n\r\n const [disableSubmitButton, setDisableSubmitButton] = useState(false);\r\n\r\n const onSubmit = useCallback(() => {\r\n validate(selectedOption);\r\n\r\n if (validationError) {\r\n return;\r\n }\r\n\r\n const selectedAreas = filter(keys(areaState), key => areaState[key] === true);\r\n const additionalAreas = areaState.others ? `,${areaComment}` : '';\r\n const feedback = {\r\n comment: `Areas:${selectedAreas.toString()}${additionalAreas} | Comment:${comment}`,\r\n rating: selectedOption.rating,\r\n };\r\n if (emailOption && emailOption.key === 'yes') {\r\n feedback.email = email;\r\n }\r\n const telemetry = {\r\n featureArea: 'WebUIUserCSAT',\r\n };\r\n surveyDataService.sendFeedback({\r\n feedback,\r\n telemetry,\r\n onFinishSendRequest: () => {\r\n setIsModalOpen(false);\r\n onSurveySubmit();\r\n },\r\n });\r\n\r\n setDisableSubmitButton(true);\r\n }, [validate, validationError, selectedOption, areaState, areaComment, comment, emailOption, email, surveyDataService, onSurveySubmit]);\r\n\r\n const onDismiss = useCallback(() => {\r\n setIsModalOpen(false);\r\n onSurveyDismiss();\r\n }, [onSurveyDismiss]);\r\n\r\n const cancelIcon = useMemo(() => ({\r\n iconName: 'Cancel',\r\n }), []);\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n \r\n {i18n.getString(_TL_('Feedback to Microsoft'))}\r\n \r\n \r\n
\r\n
\r\n \r\n {i18n.getString(_TL_('Please rate your overall satisfaction with Microsoft Advertising\\'s interface. '))}\r\n *\r\n \r\n
\r\n {validationError}\r\n
\r\n \r\n {selectedOption && selectedOption.isAdditionalContentVisible &&\r\n \r\n
\r\n
\r\n (`${selectedOption.text}`),\r\n }}\r\n template={\r\n i18n.getString(_TL_('Can you tell us more about where you are {{b}}{{/b}} with our interface?'))\r\n }\r\n />\r\n
\r\n {map(areaOptions, ({ key, label, withComment }) => {\r\n const checkbox =\r\n ( {\r\n setAreaState(prev => ({\r\n ...prev,\r\n [key]: checked,\r\n }));\r\n }}\r\n />);\r\n if (withComment && areaState[key]) {\r\n return (\r\n \r\n {checkbox}\r\n \r\n \r\n );\r\n }\r\n return checkbox;\r\n })}\r\n
\r\n
\r\n \r\n {i18n.getString(_TL_('How can we continue to improve?'))}\r\n \r\n \r\n
\r\n
\r\n \r\n {i18n.getString(_TL_('Can we follow up with you about yor responses?'))}\r\n \r\n \r\n
\r\n
\r\n }\r\n
\r\n
\r\n
\r\n (\r\n \r\n {`${text} `}\r\n \r\n \r\n ),\r\n }}\r\n template={\r\n i18n.getString(_TL_('By pressing submit, your feedback will be used to improve Microsoft products and services. {{a}}Privacy statement{{/a}}'))\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\nSurveyViewInternal.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n serverContext: PropTypes.shape({\r\n CurrentUser: PropTypes.shape({\r\n Email: PropTypes.string.isRequired,\r\n }),\r\n }).isRequired,\r\n classes: PropTypes.shape({\r\n container: PropTypes.string,\r\n header: PropTypes.string,\r\n title: PropTypes.string,\r\n body: PropTypes.string,\r\n rating: PropTypes.string,\r\n ratingDescription: PropTypes.string,\r\n ratingOption: PropTypes.string,\r\n area: PropTypes.string,\r\n areaDescription: PropTypes.string,\r\n areaCheckbox: PropTypes.string,\r\n areaComment: PropTypes.string,\r\n comment: PropTypes.string,\r\n commentDescription: PropTypes.string,\r\n commentInput: PropTypes.string,\r\n email: PropTypes.string,\r\n emailDescription: PropTypes.string,\r\n emailOptions: PropTypes.string,\r\n emailOption: PropTypes.string,\r\n emailInput: PropTypes.string,\r\n footer: PropTypes.string,\r\n privacyStatement: PropTypes.string,\r\n infoText: PropTypes.string,\r\n validationError: PropTypes.string,\r\n emailError: PropTypes.string,\r\n buttonBar: PropTypes.string,\r\n submitButton: PropTypes.string,\r\n cancelButton: PropTypes.string,\r\n closeButton: PropTypes.string,\r\n }).isRequired,\r\n onSurveySubmit: PropTypes.func,\r\n onSurveyDismiss: PropTypes.func,\r\n surveyDataService: PropTypes.shape({\r\n sendFeedback: PropTypes.func.isRequired,\r\n }).isRequired,\r\n};\r\n\r\nSurveyViewInternal.defaultProps = {\r\n onSurveySubmit: noop,\r\n onSurveyDismiss: noop,\r\n};\r\n\r\nexport const SurveyView = compose(\r\n WrappedComponent => withDefaultStyles(WrappedComponent, partial(surveyStyles, surveyMaxWidth)),\r\n withI18nConsumer,\r\n withServerContext\r\n)(SurveyViewInternal);\r\n","import { result } from 'underscore';\r\nimport { BaseSurvey } from '../base-survey';\r\nimport { FactorySurveyView } from './factory-view';\r\nimport { SurveyView } from './view';\r\n\r\nexport class WebuiUserSurvey extends BaseSurvey {\r\n getSurveyName = () => 'WebuiUserSurvey';\r\n\r\n getSurveyProduct = () => 'Expert';\r\n\r\n getSurveyInterface = () => 'Web';\r\n\r\n getSurveyId = isTestEnv => isTestEnv ? // eslint-disable-line no-confusing-arrow\r\n '65ad291c-e0ee-4f45-958f-42497060ea28' : '94d8fa3e-cc2f-4adf-a04f-abe716426178';\r\n\r\n getInitializationConfig = () => ({\r\n initGroup: 100,\r\n initStartDate: '2022-12-09',\r\n initEndDate: '2023-06-09',\r\n });\r\n\r\n isWebUIUserCSATSurveyByFactoryEnabled = () => // should enable the pilot (pilot by percentage of user Id)\r\n result(this.serverContext, ['Permissions', 'IsWebUIUserCSATSurveyByFactoryEnabled']);\r\n\r\n checkUserCreatedDateTime = (userCreatedDateTime, offset) => {\r\n const localizedUserCreatedDateTime = new Date(userCreatedDateTime);\r\n const surveyPreferenceSeveralDaysAgo = this.SurveyPreferenceService.getDaysAgo(offset);\r\n const isUserActive = localizedUserCreatedDateTime <= surveyPreferenceSeveralDaysAgo;\r\n return isUserActive;\r\n };\r\n\r\n getUserActiveDay = () => {\r\n const userCreatedDateTime = result(this.serverContext, ['CurrentUser', 'FetchedCreatedDateTime']) || result(this.serverContext, ['CurrentUser', 'CreatedDateTime']);\r\n const localizedUserCreatedDateTime = new Date(userCreatedDateTime);\r\n const now = new Date();\r\n const deltaTime = now.getTime() - localizedUserCreatedDateTime.getTime();\r\n const deltaDay = Math.ceil(deltaTime / (1 * 24 * 60 * 60 * 1000));\r\n return deltaDay;\r\n };\r\n\r\n validateTriggerCondition = () => {\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, Start`);\r\n\r\n // should enable the pilot (pilot by percentage of user Id)\r\n const isPilotEnabled = result(this.serverContext, ['Permissions', 'IsWebUIUserCSATSurveyEnabled']) || this.isWebUIUserCSATSurveyByFactoryEnabled();\r\n\r\n if (!isPilotEnabled) {\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, isPilotEnabled: ${isPilotEnabled}`);\r\n return false;\r\n }\r\n\r\n // should not be AAD users, AAD users can be included in the future after OCPS integration\r\n const isNonAADUser = !result(this.serverContext, 'IsAADUser');\r\n\r\n if (!isNonAADUser) {\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, isNonAADUser: ${isNonAADUser}`);\r\n return false;\r\n }\r\n\r\n // should be active user more than 30 days\r\n const userCreatedDateTime = result(this.serverContext, ['CurrentUser', 'CreatedDateTime']);\r\n const isUserActiveOneMonth = this.checkUserCreatedDateTime(userCreatedDateTime, 30);\r\n\r\n if (!this.isTestEnv && !isUserActiveOneMonth) {\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, isTestEnv: ${this.isTestEnv}, isUserActiveOneMonth: ${isUserActiveOneMonth}, userCreatedDateTime: ${userCreatedDateTime}`);\r\n return false;\r\n }\r\n\r\n // should have campaign in the account (ignore this condition for broader audience)\r\n // const isAccountHasCampaign = result(window, ['survey', 'hasCampaign']);\r\n\r\n // if (!this.isTestEnv && !isAccountHasCampaign) {\r\n // this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, isAccountHasCampaign: ${isAccountHasCampaign}`);\r\n // return false;\r\n // }\r\n\r\n // conditions copied from Qualtrics\r\n const isEnglishUser = result(this.serverContext, ['CurrentUser', 'Language']) === 'EN';\r\n const isBrowserLanguageEnglish = result(this.serverContext, ['CurrentLocale'], '').startsWith('en');\r\n const isNotInternalUser = result(this.serverContext, ['CurrentUser', 'IsInternal']) !== true;\r\n const isNotSupportUser = !result(this.serverContext, ['CurrentUser', 'Name']).includes('@microsoftsupport.com');\r\n const isNotExcludedUser = result(this.serverContext, ['CurrentUser', 'Id']) !== 102004780;\r\n const isDisabledInBVT = window.location.href.includes('Permissions.CSATSurveyInBVTDisabled=true');\r\n const isProdUrl = window.location.href.toLocaleLowerCase().includes('https://ui.ads.microsoft.com/');\r\n const isNotMcaUrl = !window.location.href.toLocaleLowerCase().includes('campaign/mca');\r\n\r\n const qualtricsConditions =\r\n this.isTestEnv || // should be test env\r\n (isEnglishUser && // should be English user\r\n isBrowserLanguageEnglish && // should browser language be English\r\n isNotInternalUser && // not internal users\r\n isNotSupportUser && // not support team users\r\n isNotExcludedUser && // not excluded users\r\n !isDisabledInBVT && // should not be disabled in BVT\r\n isProdUrl && // should be Prod URL\r\n isNotMcaUrl); // should not be MCA URL\r\n\r\n if (!qualtricsConditions) {\r\n if (!isEnglishUser) {\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, qualtricsConditions: ${qualtricsConditions}, isEnglishUser: ${isEnglishUser}`);\r\n return false;\r\n }\r\n\r\n if (!isBrowserLanguageEnglish) {\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, qualtricsConditions: ${qualtricsConditions}, isBrowserLanguageEnglish: ${isBrowserLanguageEnglish}`);\r\n return false;\r\n }\r\n\r\n if (!isNotInternalUser) {\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, qualtricsConditions: ${qualtricsConditions}, isNotInternalUser: ${isNotInternalUser}`);\r\n return false;\r\n }\r\n\r\n if (!isNotSupportUser) {\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, qualtricsConditions: ${qualtricsConditions}, isNotSupportUser: ${isNotSupportUser}`);\r\n return false;\r\n }\r\n\r\n if (!isNotExcludedUser) {\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, qualtricsConditions: ${qualtricsConditions}, isNotExcludedUser: ${isNotExcludedUser}`);\r\n return false;\r\n }\r\n\r\n if (!isProdUrl) {\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, qualtricsConditions: ${qualtricsConditions}, isProdUrl: ${isProdUrl}`);\r\n return false;\r\n }\r\n\r\n if (!isNotMcaUrl) {\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, qualtricsConditions: ${qualtricsConditions}, isNotMcaUrl: ${isNotMcaUrl}`);\r\n return false;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, Pass. userCreatedDateTime: ${userCreatedDateTime}`);\r\n\r\n return true;\r\n };\r\n\r\n getSurveyComponent = () => (this.isWebUIUserCSATSurveyByFactoryEnabled() ? FactorySurveyView : SurveyView);\r\n\r\n isReportingPipelineEnabled = () => true;\r\n\r\n getSurveyCustomParams = () => ({\r\n IsLeftNavigationHideButtonEnabled: result(this.serverContext, ['Permissions', 'IsLeftNavigationHideButtonEnabled']),\r\n IsHideCampaignListButtonEnabled: result(this.serverContext, ['Permissions', 'IsHideCampaignListButtonEnabled']),\r\n IsLongCampaignAndAdgroupNameEnabled: result(this.serverContext, ['Permissions', 'IsLongCampaignAndAdgroupNameEnabled']),\r\n IsImprovedDateFilterEnabled: result(this.serverContext, ['DynamicPermissions', 'ImprovedDateFilter']),\r\n AdsCopilot: true,\r\n NavigationRefresh: result(this.serverContext, ['DynamicPermissions', 'NavigationRefresh']),\r\n PopupOutsideDismiss: result(this.serverContext, ['DynamicPermissions', 'PopupOutsideDismiss']),\r\n EnhancedSurveyTriggerCondition: result(this.serverContext, ['DynamicPermissions', 'EnhancedSurveyTriggerCondition']),\r\n isUserActive10Days: this.checkUserCreatedDateTime(result(this.serverContext, ['CurrentUser', 'FetchedCreatedDateTime']) || result(this.serverContext, ['CurrentUser', 'CreatedDateTime']), 10),\r\n isUserActiveOneMonth: this.checkUserCreatedDateTime(result(this.serverContext, ['CurrentUser', 'FetchedCreatedDateTime']) || result(this.serverContext, ['CurrentUser', 'CreatedDateTime']), 30),\r\n userActiveDay: this.getUserActiveDay(),\r\n });\r\n}\r\n","import {\r\n RatingConfigurator,\r\n MultipleSelectionConfigurator,\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\n\r\nexport const CopilotAssetRecommendationSatisfactionSurveyConfig = (options) => {\r\n const { i18n } = options;\r\n\r\n return {\r\n featureArea: 'CopilotAssetRecommendationSatisfactionSurvey',\r\n style: {\r\n root: {\r\n maxWidth: 600,\r\n },\r\n },\r\n others: {\r\n isThankYouPageEnabled: false,\r\n isUserInitiatedSurvey: true,\r\n shouldAutoClose: false,\r\n },\r\n rating: {\r\n isRequired: true,\r\n Type: RatingConfigurator,\r\n key: 'rating',\r\n page: 0,\r\n position: 0,\r\n getTitle: () => i18n.getString(_TL_('How satisfied are you with the recommended assets for your campaign?')),\r\n isVisible: () => true,\r\n options: [\r\n {\r\n key: '5',\r\n text: i18n.getString(_TL_('Very satisfied')),\r\n rating: 1.0,\r\n },\r\n {\r\n key: '4',\r\n text: i18n.getString(_TL_('Moderately satisfied')),\r\n rating: 0.8,\r\n },\r\n {\r\n key: '3',\r\n text: i18n.getString(_TL_('Neutral')),\r\n rating: 0.6,\r\n },\r\n {\r\n key: '2',\r\n text: i18n.getString(_TL_('Moderately dissatisfied')),\r\n rating: 0.4,\r\n },\r\n {\r\n key: '1',\r\n text: i18n.getString(_TL_('Very dissatisfied')),\r\n rating: 0.2,\r\n },\r\n ],\r\n },\r\n questions: [\r\n {\r\n isRequired: true,\r\n Type: MultipleSelectionConfigurator,\r\n key: 'q1',\r\n page: 0,\r\n position: 1,\r\n getTitle: () => i18n.getString(_TL_('Please tell us more about why you\\'re dissatisfied with recommendations. Select all that apply.')),\r\n isVisible: answers => ['2', '1'].includes(answers.rating.selectedOption),\r\n options: [\r\n {\r\n key: 'q1o1',\r\n text: i18n.getString(_TL_('I\\'ll need permission from my business or company to use recommended assets.')),\r\n },\r\n {\r\n key: 'q1o2',\r\n text: i18n.getString(_TL_('The recommendations aren\\'t relevant.')),\r\n },\r\n {\r\n key: 'q1o3',\r\n text: i18n.getString(_TL_('The recommendations aren\\'t accurate or up to date. ')),\r\n },\r\n {\r\n key: 'q1o4',\r\n text: i18n.getString(_TL_('The recommended assets don\\'t match the descriptions that I\\'ve provided. ')),\r\n },\r\n {\r\n key: 'q1o5',\r\n text: i18n.getString(_TL_('Other')),\r\n hasInput: true,\r\n placeholder: i18n.getString(_TL_('Other')),\r\n },\r\n ],\r\n data: {\r\n },\r\n },\r\n ],\r\n };\r\n};\r\n","import React from 'react';\r\nimport { SurveyFactory } from '@bingads-webui-campaign-react/survey-factory-tools';\r\nimport { CopilotAssetRecommendationSatisfactionSurveyConfig } from './factory-view';\r\n\r\nexport const CopilotAssetRecommendationSatisfactionSurveyView = props => (\r\n \r\n);\r\n","import _, { result } from 'underscore';\r\nimport { surveyStatus } from './survey-status';\r\n\r\nconst IS_SELENIUM = 'isselenium';\r\n\r\nexport const validateESCTriggerCondition = (survey, surveyTriggerName) => {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, Start`);\r\n\r\n const isEnglishUser = result(survey.serverContext, ['CurrentUser', 'Language']) === 'EN';\r\n const isNotInternalUser = result(survey.serverContext, ['CurrentUser', 'IsInternal']) !== true;\r\n const isNotSupportUser = !result(survey.serverContext, ['CurrentUser', 'Name']).includes('@microsoftsupport.com');\r\n const isNotE2EMode = !window.navigator.webdriver;\r\n const isProdUrl = window.location.href.toLowerCase().includes('https://ui.ads.microsoft.com/');\r\n const isMcaUrl = window.location.href.toLowerCase().includes('campaign/mca');\r\n const isESCSurveyEnabled = window.location.href.includes('isESCSurveyEnabled=true');\r\n\r\n const qualtricsConditions =\r\n (survey.isTestEnv &&\r\n isESCSurveyEnabled) || // should be test env\r\n (isEnglishUser && // should be English user\r\n isNotInternalUser && // not internal users\r\n isNotSupportUser && // not support team users\r\n isNotE2EMode && // not test mode\r\n isProdUrl && // should be Prod URL\r\n isMcaUrl); // should be MCA URL\r\n\r\n if (!qualtricsConditions) {\r\n if (!isEnglishUser) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, qualtricsConditions: ${qualtricsConditions}, isEnglishUser: ${isEnglishUser}`);\r\n return false;\r\n }\r\n\r\n if (!isNotInternalUser) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, qualtricsConditions: ${qualtricsConditions}, isNotInternalUser: ${isNotInternalUser}`);\r\n return false;\r\n }\r\n\r\n if (!isNotSupportUser) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, qualtricsConditions: ${qualtricsConditions}, isNotSupportUser: ${isNotSupportUser}`);\r\n return false;\r\n }\r\n\r\n if (!isNotE2EMode) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, qualtricsConditions: ${qualtricsConditions}, isNotE2EMode: ${isNotE2EMode}`);\r\n return false;\r\n }\r\n\r\n if (!isProdUrl) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, qualtricsConditions: ${qualtricsConditions}, isProdUrl: ${isProdUrl}`);\r\n return false;\r\n }\r\n\r\n if (!isMcaUrl) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, qualtricsConditions: ${qualtricsConditions}, isMcaUrl: ${isMcaUrl}`);\r\n return false;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n const isSurveyTriggerValid = result(window, ['survey', surveyTriggerName]);\r\n\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, ${isSurveyTriggerValid ? 'Pass' : 'Fail'}`);\r\n return isSurveyTriggerValid;\r\n};\r\n\r\nexport const validateESCSignupTriggerCondition = (survey, surveyTriggerName) => {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, Start`);\r\n\r\n const currentUser = result(survey.serverContext, ['CurrentUser']);\r\n const currentLocale = result(survey.serverContext, ['CurrentLocale']);\r\n let currentUserLanguage = result(survey.serverContext, ['CurrentUser', 'Language']);\r\n if (!currentUserLanguage && currentLocale.toLowerCase().indexOf('en') === 0) {\r\n currentUserLanguage = 'EN';\r\n }\r\n const isEnglishUser = currentUserLanguage === 'EN';\r\n const isNotInternalUser = result(survey.serverContext, ['CurrentUser', 'IsInternal']) !== true;\r\n const currentUserName = result(survey.serverContext, ['CurrentUser', 'Name']);\r\n const isNotSupportUser = currentUserName && !currentUserName.includes('@microsoftsupport.com');\r\n const isNotE2EMode = !window.navigator.webdriver;\r\n const isProdSignupUrl = window.location.href.toLowerCase().search(/ads\\.microsoft\\.com.*signup/) !== -1;\r\n const isESCSignupSurveyEnabled = window.location.href.includes('isESCSignupSurveyEnabled=true');\r\n\r\n const qualtricsConditions =\r\n (survey.isTestEnv &&\r\n isESCSignupSurveyEnabled) || // should be test env\r\n (currentUser &&\r\n isEnglishUser && // should be English user\r\n isNotInternalUser && // not internal users\r\n isNotSupportUser && // not support team users\r\n isNotE2EMode && // not test mode\r\n isProdSignupUrl) || // should be MCA sign up URL\r\n (!currentUser && // current user is not defined for new signups\r\n isEnglishUser && // should be English user\r\n isNotE2EMode && // not in E2E mode\r\n isProdSignupUrl); // should be MCA URL\r\n\r\n if (!qualtricsConditions) {\r\n if (!isEnglishUser) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, qualtricsConditions: ${qualtricsConditions}, isEnglishUser: ${isEnglishUser}`);\r\n return false;\r\n }\r\n\r\n if (!isNotInternalUser) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, qualtricsConditions: ${qualtricsConditions}, isNotInternalUser: ${isNotInternalUser}`);\r\n return false;\r\n }\r\n\r\n if (!isNotSupportUser) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, qualtricsConditions: ${qualtricsConditions}, isNotSupportUser: ${isNotSupportUser}`);\r\n return false;\r\n }\r\n\r\n if (!isNotE2EMode) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, qualtricsConditions: ${qualtricsConditions}, isNotE2EMode: ${isNotE2EMode}`);\r\n return false;\r\n }\r\n\r\n if (!isProdSignupUrl) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, qualtricsConditions: ${qualtricsConditions}, isMcaUrl: ${isProdSignupUrl}`);\r\n return false;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n const isSurveyTriggerValid = result(window, ['survey', surveyTriggerName]);\r\n\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, ${isSurveyTriggerValid ? 'Pass' : 'Fail'}`);\r\n return isSurveyTriggerValid;\r\n};\r\n\r\nexport const validateAdinsightRecommendationTriggerCondition = (survey, recommendationUrl, surveyPermission) => {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, Start`);\r\n\r\n // should enable the pilot (pilot by percentage of user Id)\r\n const isPilotEnabled = result(survey.serverContext, ['Permissions', surveyPermission]);\r\n\r\n if (!isPilotEnabled) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, isPilotEnabled: ${isPilotEnabled}`);\r\n return false;\r\n }\r\n\r\n // should not be AAD users, AAD users can be included in the future after OCPS integration\r\n const isNonAADUser = !result(survey.serverContext, 'IsAADUser');\r\n\r\n if (!isNonAADUser) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, isNonAADUser: ${isNonAADUser}`);\r\n return false;\r\n }\r\n\r\n // should be active user more than 30 days\r\n const isUserActiveOneMonth =\r\n new Date(result(survey.serverContext, ['CurrentUser', 'CreatedDateTime'])) <= survey.SurveyPreferenceService.getDaysAgo(30);\r\n\r\n if (!survey.isTestEnv && !isUserActiveOneMonth) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, isTestEnv: ${survey.isTestEnv}, isUserActiveOneMonth: ${isUserActiveOneMonth}`);\r\n return false;\r\n }\r\n\r\n // trigger conditions\r\n const isEnglishUser = result(survey.serverContext, ['CurrentUser', 'Language']) === 'EN';\r\n const isNotInternalUser = result(survey.serverContext, ['CurrentUser', 'IsInternal']) !== true;\r\n const isNotSupportUser = !result(survey.serverContext, ['CurrentUser', 'Name']).includes('@microsoftsupport.com');\r\n const isNotE2EMode = !window.location.href.includes(IS_SELENIUM);\r\n const isDisabledInBVT = window.location.href.includes('Permissions.CSATSurveyInBVTDisabled=true');\r\n const isProdUrl = window.location.href.includes('https://ui.ads.microsoft.com/');\r\n const isRecommendationUrl = window.location.href.includes(recommendationUrl);\r\n\r\n const surveyConditions =\r\n (survey.isTestEnv && isRecommendationUrl && isNotE2EMode) || // should be test env\r\n (isEnglishUser && // should be English user\r\n isNotInternalUser && // not internal users\r\n isNotSupportUser && // not support team users\r\n !isDisabledInBVT && // should not be disabled in BVT\r\n isProdUrl && // should be Prod URL\r\n isRecommendationUrl); // should not be URL\r\n\r\n if (!surveyConditions) {\r\n if (!isEnglishUser) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, surveyConditions: ${surveyConditions}, isEnglishUser: ${isEnglishUser}`);\r\n return false;\r\n }\r\n\r\n if (!isNotInternalUser) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, surveyConditions: ${surveyConditions}, isNotInternalUser: ${isNotInternalUser}`);\r\n return false;\r\n }\r\n\r\n if (!isNotSupportUser) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, surveyConditions: ${surveyConditions}, isNotSupportUser: ${isNotSupportUser}`);\r\n return false;\r\n }\r\n\r\n if (!isProdUrl) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, surveyConditions: ${surveyConditions}, isProdUrl: ${isProdUrl}`);\r\n return false;\r\n }\r\n\r\n if (!isRecommendationUrl) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, surveyConditions: ${surveyConditions}, isRecommendationUrl: ${isRecommendationUrl}`);\r\n return false;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, Pass`);\r\n\r\n return true;\r\n};\r\n\r\nexport const validateAccountSettingsTriggerCondition = (survey, accountSettingUrl, surveyTriggerName) => {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, Start`);\r\n\r\n // should not be AAD users, AAD users can be included in the future after OCPS integration\r\n const isNonAADUser = !result(survey.serverContext, 'IsAADUser');\r\n const isNotSupportUser = !result(survey.serverContext, ['CurrentUser', 'Name']).includes('@microsoftsupport.com');\r\n const isNotMicrosoftInternalUser = !result(survey.serverContext, ['CurrentUser', 'Name']).includes('@microsoft.com');\r\n\r\n // We let pass the case that the user is an AAD user and a support user\r\n if (!isNonAADUser && isNotSupportUser && isNotMicrosoftInternalUser) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, isNonAADUser: ${isNonAADUser}`);\r\n return false;\r\n }\r\n\r\n // trigger conditions\r\n const isNotE2EMode = !window.location.href.includes(IS_SELENIUM);\r\n const isProdUrl = window.location.href.includes('https://ui.ads.microsoft.com/');\r\n const isBetaProdUrl = window.location.href.includes('https://ui.beta.ads.microsoft.com/');\r\n const isAccountSettingUrl = window.location.href.includes(accountSettingUrl);\r\n\r\n const surveyConditions =\r\n (survey.isTestEnv && isAccountSettingUrl && isNotE2EMode) || // should be test env\r\n ((isProdUrl || isBetaProdUrl) && // should be Prod URL or Beta prod URL\r\n isAccountSettingUrl); // should be account setting URL\r\n\r\n if (!surveyConditions) {\r\n if (!(isProdUrl || isBetaProdUrl)) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, surveyConditions: ${surveyConditions}, isProdUrl: ${(isProdUrl || isBetaProdUrl)}`);\r\n return false;\r\n }\r\n\r\n if (!isAccountSettingUrl) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, surveyConditions: ${surveyConditions}, isAccountSettingUrl: ${isAccountSettingUrl}`);\r\n return false;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n const isSurveyTriggerValid = result(window, ['survey', surveyTriggerName]);\r\n\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, ${isSurveyTriggerValid ? 'Pass' : 'Fail'}`);\r\n return isSurveyTriggerValid;\r\n};\r\n\r\nexport const validateAssetLibraryTriggerCondition = (survey, surveyTriggerName, { checkPilot } = {}) => {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, Start`);\r\n\r\n // pilot enabled\r\n const isPilotEnabled = checkPilot ? checkPilot() : result(survey.serverContext, ['Permissions', 'IsAssetLibrarySurveyEnabled']);\r\n\r\n if (!isPilotEnabled) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, isPilotEnabled: ${isPilotEnabled}`);\r\n return false;\r\n }\r\n\r\n // have added trigger flag in asset library page\r\n const isSurveyTriggerValid = result(window, ['survey', surveyTriggerName]);\r\n\r\n if (!isSurveyTriggerValid) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, isSurveyTriggerValid: ${isSurveyTriggerValid}`);\r\n return false;\r\n }\r\n\r\n // trigger conditions\r\n const isEnglishUser = result(survey.serverContext, ['CurrentUser', 'Language']) === 'EN';\r\n const isNotInternalUser = result(survey.serverContext, ['CurrentUser', 'IsInternal']) !== true;\r\n const isNotSupportUser = !result(survey.serverContext, ['CurrentUser', 'Name']).includes('@microsoftsupport.com');\r\n const isNotE2EMode = !window.location.href.includes(IS_SELENIUM);\r\n const isDisabledInBVT = window.location.href.includes('Permissions.CSATSurveyInBVTDisabled=true');\r\n const isProdUrl = window.location.href.includes('https://ui.ads.microsoft.com/');\r\n const isAssetLibrarySurveyEnabled = window.location.href.includes('isAssetLibrarySurveyEnabled=true');\r\n\r\n const surveyConditions =\r\n (survey.isTestEnv && isNotE2EMode && isAssetLibrarySurveyEnabled) || // should be test env\r\n (isEnglishUser && // English users\r\n isNotInternalUser && // not internal users\r\n isNotSupportUser && // not support team users\r\n !isDisabledInBVT && // should not be disabled in BVT\r\n isProdUrl); // should be Prod URL\r\n\r\n if (!surveyConditions) {\r\n if (!isEnglishUser) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, surveyConditions: ${surveyConditions}, isEnglishUser: ${isEnglishUser}`);\r\n return false;\r\n }\r\n\r\n if (!isNotInternalUser) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, surveyConditions: ${surveyConditions}, isNotInternalUser: ${isNotInternalUser}`);\r\n return false;\r\n }\r\n\r\n if (!isNotSupportUser) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, surveyConditions: ${surveyConditions}, isNotSupportUser: ${isNotSupportUser}`);\r\n return false;\r\n }\r\n\r\n if (!isProdUrl) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, surveyConditions: ${surveyConditions}, isProdUrl: ${isProdUrl}`);\r\n return false;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, Pass`);\r\n\r\n return true;\r\n};\r\n\r\nexport const validateCopilotAssetRecommendationSatisfactionTriggerCondition = (survey, surveyTriggerName) => {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, Start`);\r\n\r\n // have added trigger flag\r\n const isSurveyTriggerValid = result(window, ['survey', surveyTriggerName]);\r\n\r\n if (!isSurveyTriggerValid) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, isSurveyTriggerValid: ${isSurveyTriggerValid}`);\r\n return false;\r\n }\r\n\r\n // trigger conditions\r\n const isEnglishUser = result(survey.serverContext, ['CurrentUser', 'Language']) === 'EN';\r\n const isNotInternalUser = result(survey.serverContext, ['CurrentUser', 'IsInternal']) !== true;\r\n const isNotSupportUser = !result(survey.serverContext, ['CurrentUser', 'Name']).includes('@microsoftsupport.com');\r\n const isNotE2EMode = !window.location.href.includes('isselenium');\r\n const isDisabledInBVT = window.location.href.includes('Permissions.CSATSurveyInBVTDisabled=true');\r\n const isProdUrl = window.location.href.includes('https://ui.ads.microsoft.com/');\r\n\r\n const surveyConditions =\r\n (survey.isTestEnv && isNotE2EMode) || // should be test env\r\n (isEnglishUser && // English users\r\n isNotInternalUser && // not internal users\r\n isNotSupportUser && // not support team users\r\n !isDisabledInBVT && // should not be disabled in BVT\r\n isProdUrl); // should be Prod URL\r\n\r\n if (!surveyConditions) {\r\n window.survey.CopilotAssetRecommendationSatisfactionTrigger = false;\r\n if (!isEnglishUser) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, surveyConditions: ${surveyConditions}, isEnglishUser: ${isEnglishUser}`);\r\n return false;\r\n }\r\n\r\n if (!isNotInternalUser) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, surveyConditions: ${surveyConditions}, isNotInternalUser: ${isNotInternalUser}`);\r\n return false;\r\n }\r\n\r\n if (!isNotSupportUser) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, surveyConditions: ${surveyConditions}, isNotSupportUser: ${isNotSupportUser}`);\r\n return false;\r\n }\r\n\r\n if (!isProdUrl) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, surveyConditions: ${surveyConditions}, isProdUrl: ${isProdUrl}`);\r\n return false;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n const surveyState = survey.SurveyPreferenceService.getSurveyState({ surveyName: survey.getSurveyName() });\r\n const { requiredModifyNumber = 10 } = surveyState || {};\r\n const currentRequiredModifyNumber = requiredModifyNumber - 1;\r\n\r\n survey.SurveyPreferenceService.setSurveyState({\r\n surveyName: survey.getSurveyName(),\r\n surveyState: {\r\n ...surveyState,\r\n requiredModifyNumber: currentRequiredModifyNumber,\r\n },\r\n });\r\n\r\n if (currentRequiredModifyNumber > 0) {\r\n window.survey.CopilotAssetRecommendationSatisfactionTrigger = false;\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, currentRequiredModifyNumber: ${currentRequiredModifyNumber}`);\r\n return false;\r\n }\r\n\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, Pass`);\r\n\r\n return true;\r\n};\r\n\r\nexport const validateRSALLMOverallCallingAPI = (surveyName, apiCallingTime, status) => {\r\n const OVERALL_SURVEY_THRESHOLD = {\r\n [surveyStatus.INIT]: 10,\r\n [surveyStatus.FIRST_DISMISS]: 50,\r\n [surveyStatus.SECOND_DISMISS]: 100,\r\n [surveyStatus.THIRD_DISMISS]: 200,\r\n [surveyStatus.FOURTH_DISMISS]: 500,\r\n [surveyStatus.SUBMIT]: 500,\r\n };\r\n const MOSTWANTED_SURVEY_THRESHOLD = {\r\n [surveyStatus.INIT]: 50,\r\n [surveyStatus.FIRST_DISMISS]: 50,\r\n [surveyStatus.SECOND_DISMISS]: 100,\r\n [surveyStatus.THIRD_DISMISS]: 200,\r\n [surveyStatus.FOURTH_DISMISS]: 500,\r\n [surveyStatus.SUBMIT]: Number.MAX_VALUE, // Currently most wanted survey is never triggered when users submit the survey\r\n };\r\n const OVERALL_SURVEY_THRESHOLD_FAST_TRACK = {\r\n [surveyStatus.INIT]: 1,\r\n [surveyStatus.FIRST_DISMISS]: 1,\r\n [surveyStatus.SECOND_DISMISS]: 2,\r\n [surveyStatus.THIRD_DISMISS]: 3,\r\n [surveyStatus.FOURTH_DISMISS]: 4,\r\n [surveyStatus.SUBMIT]: 4,\r\n };\r\n const MOSTWANTED_SURVEY_THRESHOLD_FAST_TRACK = {\r\n [surveyStatus.INIT]: 1,\r\n [surveyStatus.FIRST_DISMISS]: 1,\r\n [surveyStatus.SECOND_DISMISS]: 2,\r\n [surveyStatus.THIRD_DISMISS]: 3,\r\n [surveyStatus.FOURTH_DISMISS]: 4,\r\n [surveyStatus.SUBMIT]: 4,\r\n };\r\n if (new URLSearchParams(window.location.search).get('IsFastTrackSurvey') === 'true') {\r\n const threshold = surveyName === 'RSALLMSuggestionOverallSurvey' ? OVERALL_SURVEY_THRESHOLD_FAST_TRACK : MOSTWANTED_SURVEY_THRESHOLD_FAST_TRACK;\r\n return !_.isUndefined(threshold[status]) ? apiCallingTime >= threshold[status] : false;\r\n }\r\n const threshold = surveyName === 'RSALLMSuggestionOverallSurvey' ? OVERALL_SURVEY_THRESHOLD : MOSTWANTED_SURVEY_THRESHOLD;\r\n return !_.isUndefined(threshold[status]) ? apiCallingTime >= threshold[status] : false;\r\n};\r\n\r\nexport const validateRSALLMTriggerCondition = (survey) => {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, Start`);\r\n\r\n // should be active user more than 30 days\r\n const isUserActiveOneMonth =\r\n new Date(result(survey.serverContext, ['CurrentUser', 'CreatedDateTime'])) <= survey.SurveyPreferenceService.getDaysAgo(30);\r\n\r\n if (!survey.isTestEnv && !isUserActiveOneMonth) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, isTestEnv: ${survey.isTestEnv}, isUserActiveOneMonth: ${isUserActiveOneMonth}`);\r\n return false;\r\n }\r\n\r\n // customize conditions for LLM OCV survey\r\n const surveyState = survey.SurveyPreferenceService.getSurveyState({ surveyName: survey.getSurveyName() });\r\n // if survey state is empty, usevalidateUserGovernance to get the default survey state\r\n if (_.isEmpty(surveyState)) {\r\n survey.validateUserGovernance();\r\n }\r\n const status = result(surveyState, 'status') || surveyStatus.INIT;\r\n\r\n const apiCallingTime = survey.getCallCountOfRSASuggestionAPI();\r\n const triggerCondition = validateRSALLMOverallCallingAPI(survey.getSurveyName(), apiCallingTime, status);\r\n\r\n // conditions\r\n const isNotSupportUser = !result(survey.serverContext, ['CurrentUser', 'Name']).includes('@microsoftsupport.com');\r\n const isNotE2EMode = !window.location.href.includes('isselenium');\r\n const isDisabledInBVT = window.location.href.includes('Permissions.CSATSurveyInBVTDisabled=true');\r\n const isProdUrl = window.location.href.includes('ads.microsoft.com');\r\n const isAdUrl = window.location.href.includes('campaign/vnext/ads');\r\n\r\n const qualtricsConditions =\r\n (survey.isTestEnv && isAdUrl && triggerCondition) || // should be test env\r\n (isNotSupportUser && // not support team users\r\n isNotE2EMode && // not E2E mode\r\n !isDisabledInBVT && // should not be disabled in BVT\r\n isProdUrl && // should be Prod URL\r\n isAdUrl && // should be Ad URL\r\n triggerCondition);\r\n\r\n if (!qualtricsConditions) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, qualtricsConditions: ${qualtricsConditions}, isTestEnv: ${survey.isTestEnv}, isNotSupportUser: ${isNotSupportUser}, isNotE2EMode: ${isNotE2EMode}, isProdUrl: ${isProdUrl}, isAdUrl: ${isAdUrl}`);\r\n return false;\r\n }\r\n\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, Pass`);\r\n return true;\r\n};\r\n\r\nexport const validateAdsStudioTriggerCondition = (survey, surveyTriggerName, { checkPilot } = {}) => {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, Start`);\r\n\r\n // pilot enabled\r\n const isPilotEnabled = checkPilot ? checkPilot() : result(survey.serverContext, ['Permissions', 'IsAdsStudioSurveyEnabled']);\r\n\r\n if (!isPilotEnabled) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, isPilotEnabled: ${isPilotEnabled}`);\r\n return false;\r\n }\r\n\r\n // have added trigger flag in ad studio page\r\n const isSurveyTriggerValid = result(window, ['survey', surveyTriggerName]);\r\n\r\n if (!isSurveyTriggerValid) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, isSurveyTriggerValid: ${isSurveyTriggerValid}`);\r\n return false;\r\n }\r\n\r\n // trigger conditions\r\n const isEnglishUser = result(survey.serverContext, ['CurrentUser', 'Language']) === 'EN';\r\n const isNotInternalUser = result(survey.serverContext, ['CurrentUser', 'IsInternal']) !== true;\r\n const isNotSupportUser = !result(survey.serverContext, ['CurrentUser', 'Name']).includes('@microsoftsupport.com');\r\n const isNotE2EMode = !window.location.href.includes(IS_SELENIUM);\r\n const isDisabledInBVT = window.location.href.includes('Permissions.CSATSurveyInBVTDisabled=true');\r\n const isProdUrl = window.location.href.includes('https://ui.ads.microsoft.com/');\r\n const isAdStudioSurveyEnabled = window.location.href.includes('isAdStudioSurveyEnabled=true');\r\n\r\n const surveyConditions =\r\n (survey.isTestEnv && isNotE2EMode && isAdStudioSurveyEnabled) || // should be test env\r\n (isEnglishUser && // English users\r\n isNotInternalUser && // not internal users\r\n isNotSupportUser && // not support team users\r\n !isDisabledInBVT && // should not be disabled in BVT\r\n isProdUrl); // should be Prod URL\r\n\r\n if (!surveyConditions) {\r\n if (!isEnglishUser) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, surveyConditions: ${surveyConditions}, isEnglishUser: ${isEnglishUser}`);\r\n return false;\r\n }\r\n\r\n if (!isNotInternalUser) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, surveyConditions: ${surveyConditions}, isNotInternalUser: ${isNotInternalUser}`);\r\n return false;\r\n }\r\n\r\n if (!isNotSupportUser) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, surveyConditions: ${surveyConditions}, isNotSupportUser: ${isNotSupportUser}`);\r\n return false;\r\n }\r\n\r\n if (!isProdUrl) {\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, surveyConditions: ${surveyConditions}, isProdUrl: ${isProdUrl}`);\r\n return false;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n survey.logActivity(`validateTriggerCondition | survey: ${survey.getSurveyName()}, Pass`);\r\n\r\n return true;\r\n};\r\n","import { isEmpty } from 'underscore';\r\n\r\nimport { BaseSurvey } from '../base-survey';\r\nimport { surveyStatus } from '../survey-status';\r\nimport { CopilotAssetRecommendationSatisfactionSurveyView } from './view';\r\nimport { validateCopilotAssetRecommendationSatisfactionTriggerCondition } from '../utils';\r\n\r\nexport class CopilotAssetRecommendationSatisfactionSurvey extends BaseSurvey {\r\n getSurveyName = () => 'CopilotAssetRecommendationSatisfactionSurvey';\r\n\r\n getSurveyId = () => 'ea62ec33-5c98-4894-86eb-b012a6e7e92d';\r\n\r\n validateTriggerCondition = () => validateCopilotAssetRecommendationSatisfactionTriggerCondition(this, 'CopilotAssetRecommendationSatisfactionTrigger');\r\n\r\n onSurveySubmit = () => {\r\n const newSurveyState = {\r\n status: surveyStatus.SUBMIT,\r\n nextShownDate: this.SurveyPreferenceService.getDaysAfter(180),\r\n requiredModifyNumber: 500,\r\n };\r\n\r\n this.SurveyPreferenceService.setSurveyState({\r\n surveyName: this.getSurveyName(),\r\n surveyState: newSurveyState,\r\n });\r\n\r\n window.survey.CopilotAssetRecommendationSatisfactionTrigger = false;\r\n delete window.survey.CopilotRecommendationsSurveyCustomParams;\r\n };\r\n\r\n onSurveyDismiss = () => {\r\n window.survey.CopilotAssetRecommendationSatisfactionTrigger = false;\r\n delete window.survey.CopilotRecommendationsSurveyCustomParams;\r\n\r\n const surveyState = this.SurveyPreferenceService.getSurveyState({\r\n surveyName: this.getSurveyName(),\r\n });\r\n\r\n let newSurveyState = {};\r\n if (!isEmpty(surveyState)) {\r\n const { status } = surveyState;\r\n switch (status) {\r\n case surveyStatus.FIRST_DISMISS:\r\n // set new state to second-dismiss and next shown date to 30 days\r\n newSurveyState = {\r\n status: surveyStatus.SECOND_DISMISS,\r\n nextShownDate: this.SurveyPreferenceService.getDaysAfter(30),\r\n requiredModifyNumber: 100,\r\n };\r\n break;\r\n case surveyStatus.SECOND_DISMISS:\r\n // set new state to third-dismiss and next shown date to 60 days\r\n newSurveyState = {\r\n status: surveyStatus.THIRD_DISMISS,\r\n nextShownDate: this.SurveyPreferenceService.getDaysAfter(60),\r\n requiredModifyNumber: 300,\r\n };\r\n break;\r\n case surveyStatus.THIRD_DISMISS:\r\n // set new state to third-dismiss and next shown date to 180 days\r\n newSurveyState = {\r\n status: surveyStatus.THIRD_DISMISS,\r\n nextShownDate: this.SurveyPreferenceService.getDaysAfter(180),\r\n requiredModifyNumber: 500,\r\n };\r\n break;\r\n case surveyStatus.FOURTH_DISMISS:\r\n case surveyStatus.INIT:\r\n case surveyStatus.SUBMIT:\r\n default:\r\n // for all others, set new state to init and next shown date to 7 days\r\n newSurveyState = {\r\n status: surveyStatus.FIRST_DISMISS,\r\n nextShownDate: this.SurveyPreferenceService.getDaysAfter(7),\r\n requiredModifyNumber: 50,\r\n };\r\n break;\r\n }\r\n } else {\r\n // new cycle, set new state to first-dismiss and next shown date to 7 days\r\n newSurveyState = {\r\n status: surveyStatus.FIRST_DISMISS,\r\n nextShownDate: this.SurveyPreferenceService.getDaysAfter(7),\r\n requiredModifyNumber: 50,\r\n };\r\n }\r\n\r\n this.SurveyPreferenceService.setSurveyState({\r\n surveyName: this.getSurveyName(),\r\n surveyState: newSurveyState,\r\n });\r\n };\r\n\r\n getSurveyComponent = () => CopilotAssetRecommendationSatisfactionSurveyView;\r\n\r\n getSurveyCustomParams = () => window.survey.CopilotRecommendationsSurveyCustomParams;\r\n}\r\n","import {\r\n RatingConfigurator,\r\n CommentConfigurator,\r\n EmailConfigurator\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\n\r\nexport const escWebuiUserSurveyConfig = (options) => {\r\n const {\r\n i18n,\r\n } = options;\r\n\r\n return {\r\n featureArea: 'EscWebuiUserSurvey',\r\n style: {\r\n root: {\r\n maxWidth: 480,\r\n },\r\n },\r\n others: {\r\n combineTextInputToComment: true,\r\n },\r\n rating: {\r\n isRequired: true,\r\n Type: RatingConfigurator,\r\n key: 'rating',\r\n page: 0,\r\n position: 0,\r\n getTitle: () => i18n.getString(_TL_('How satisfied are you with Microsoft Advertising\\'s web user interface?')),\r\n isVisible: () => true,\r\n options: [\r\n {\r\n key: '5',\r\n text: i18n.getString(_TL_('Very satisfied')),\r\n rating: 1.0,\r\n },\r\n {\r\n key: '4',\r\n text: i18n.getString(_TL_('Moderately satisfied')),\r\n rating: 0.8,\r\n },\r\n {\r\n key: '3',\r\n text: i18n.getString(_TL_('Neither satisfied nor dissatisfied')),\r\n rating: 0.6,\r\n },\r\n {\r\n key: '2',\r\n text: i18n.getString(_TL_('Moderately dissatisfied')),\r\n rating: 0.4,\r\n },\r\n {\r\n key: '1',\r\n text: i18n.getString(_TL_('Very dissatisfied')),\r\n rating: 0.2,\r\n },\r\n ],\r\n },\r\n email: {\r\n isRequired: false,\r\n Type: EmailConfigurator,\r\n key: 'email',\r\n page: 1,\r\n position: 1,\r\n getTitle: () => i18n.getString(_TL_('Can we follow up with you about your responses?')),\r\n isVisible: answers => ['3', '2', '1'].includes(answers.rating.selectedOption),\r\n options: [\r\n {\r\n key: 'yes',\r\n text: i18n.getString(_TL_('Yes')),\r\n hasInput: false,\r\n },\r\n {\r\n key: 'no',\r\n text: i18n.getString(_TL_('No')),\r\n hasInput: false,\r\n },\r\n ],\r\n },\r\n questions: [\r\n {\r\n isRequired: false,\r\n Type: CommentConfigurator,\r\n key: 'q3',\r\n page: 1,\r\n position: 0,\r\n getTitle: () => i18n.getString(_TL_('How can we continue to improve?')),\r\n isVisible: answers => ['3', '2', '1'].includes(answers.rating.selectedOption),\r\n },\r\n ],\r\n };\r\n};\r\n","import React from 'react';\r\nimport {\r\n SurveyFactory,\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\nimport { escWebuiUserSurveyConfig } from './factory-view';\r\n\r\nexport const ESCWebUISurveyView = props => (\r\n \r\n);\r\n\r\n","import { result } from 'underscore';\r\nimport { BaseSurvey } from '../base-survey';\r\nimport { ESCWebUISurveyView } from './view';\r\n\r\nexport class EscWebuiUserSurvey extends BaseSurvey {\r\n getSurveyName = () => 'EscWebuiUserSurvey';\r\n\r\n getSurveyId = () => '0530745d-b26b-4b96-8ab5-95369835872c';\r\n\r\n getSurveyProduct = () => 'ESC';\r\n\r\n getSurveyInterface = () => 'Web';\r\n\r\n getInitializationConfig = () => ({\r\n initGroup: 100,\r\n initStartDate: '2023-02-03',\r\n initEndDate: '2023-08-02',\r\n });\r\n\r\n validateTriggerCondition = () => {\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, Start`);\r\n\r\n // should not be AAD users, AAD users can be included in the future after OCPS integration\r\n const isNonAADUser = !result(this.serverContext, 'IsAADUser');\r\n\r\n if (!isNonAADUser) {\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, isNonAADUser: ${isNonAADUser}`);\r\n return false;\r\n }\r\n\r\n // should be active user more than 30 days\r\n const userCreatedDateTime = new Date(result(this.serverContext, ['CurrentUser', 'CreatedDateTime']));\r\n const surveyPreference30DaysAgo = this.SurveyPreferenceService.getDaysAgo(30);\r\n const isUserActiveOneMonth = userCreatedDateTime <= surveyPreference30DaysAgo;\r\n\r\n if (!this.isTestEnv && !isUserActiveOneMonth) {\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, isTestEnv: ${this.isTestEnv}, isUserActiveOneMonth: ${isUserActiveOneMonth}, userCreatedDateTime: ${userCreatedDateTime}, surveyPreference30DaysAgo: ${surveyPreference30DaysAgo}`);\r\n return false;\r\n }\r\n\r\n // conditions copied from Qualtrics\r\n const isEnglishUser = result(this.serverContext, ['CurrentUser', 'Language']) === 'EN';\r\n const isNotInternalUser = result(this.serverContext, ['CurrentUser', 'IsInternal']) !== true;\r\n const isNotSupportUser = !result(this.serverContext, ['CurrentUser', 'Name']).includes('@microsoftsupport.com');\r\n const isNotE2EMode = !window.navigator.webdriver;\r\n const isProdUrl = window.location.href.toLocaleLowerCase().includes('https://ui.ads.microsoft.com/');\r\n const isMcaUrl = window.location.href.toLocaleLowerCase().includes('campaign/mca');\r\n const isWebUICSATSurveyEnabled = window.location.href.includes('isWebUICSATSurveyEnabled=true');\r\n\r\n const qualtricsConditions =\r\n (this.isTestEnv &&\r\n isWebUICSATSurveyEnabled) || // should be test env\r\n (isEnglishUser && // should be English user\r\n isNotInternalUser && // not internal users\r\n isNotSupportUser && // not support team users\r\n isNotE2EMode && // not test mode\r\n isProdUrl && // should be Prod URL\r\n isMcaUrl); // should be MCA URL\r\n\r\n if (!qualtricsConditions) {\r\n if (!isEnglishUser) {\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, qualtricsConditions: ${qualtricsConditions}, isEnglishUser: ${isEnglishUser}`);\r\n return false;\r\n }\r\n\r\n if (!isNotInternalUser) {\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, qualtricsConditions: ${qualtricsConditions}, isNotInternalUser: ${isNotInternalUser}`);\r\n return false;\r\n }\r\n\r\n if (!isNotSupportUser) {\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, qualtricsConditions: ${qualtricsConditions}, isNotSupportUser: ${isNotSupportUser}`);\r\n return false;\r\n }\r\n\r\n if (!isNotE2EMode) {\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, qualtricsConditions: ${qualtricsConditions}, isNotE2EMode: ${isNotE2EMode}`);\r\n return false;\r\n }\r\n\r\n if (!isProdUrl) {\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, qualtricsConditions: ${qualtricsConditions}, isProdUrl: ${isProdUrl}`);\r\n return false;\r\n }\r\n\r\n if (!isMcaUrl) {\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, qualtricsConditions: ${qualtricsConditions}, isMcaUrl: ${isMcaUrl}`);\r\n return false;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, Pass. userCreatedDateTime: ${userCreatedDateTime}, surveyPreference30DaysAgo: ${surveyPreference30DaysAgo}`);\r\n\r\n return true;\r\n };\r\n\r\n getSurveyComponent = () => ESCWebUISurveyView;\r\n\r\n isReportingPipelineEnabled = () => true;\r\n}\r\n","import {\r\n CommentConfigurator,\r\n SingleSelectionConfigurator,\r\n MultipleSelectionConfigurator,\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\n\r\nexport const EscWebuiUserPauseCampaignSurveyConfig = (options) => {\r\n const {\r\n i18n,\r\n } = options;\r\n\r\n return {\r\n featureArea: 'EscWebuiUserPauseCampaignSurvey',\r\n style: {\r\n root: {\r\n minWidth: 600,\r\n '@media (max-width: 600px)': {\r\n minHeight: 320,\r\n minWidth: 340,\r\n },\r\n },\r\n },\r\n others: {\r\n isGlobalModalStyleEnabled: true,\r\n isThankYouPageEnabled: false,\r\n isUserInitiatedSurvey: true,\r\n combineTextInputToComment: true,\r\n isInPageMiddle: true,\r\n },\r\n questions: [\r\n {\r\n isRequired: false,\r\n Type: SingleSelectionConfigurator,\r\n key: 'q1',\r\n page: 0,\r\n position: 0,\r\n getTitle: () => i18n.getString(_TL_('Hi there! We have two questions for you. Please tell us the main reason you\\'re pausing or deleting this ad campaign.')),\r\n isVisible: () => true,\r\n options: [\r\n {\r\n key: 'q1o1',\r\n text: i18n.getString(_TL_('I was just trying it out')),\r\n },\r\n {\r\n key: 'q1o2',\r\n text: i18n.getString(_TL_('I ran out of budget')),\r\n },\r\n {\r\n key: 'q1o3',\r\n text: i18n.getString(_TL_('I\\'m moving my advertising budget elsewhere')),\r\n },\r\n {\r\n key: 'q1o4',\r\n text: i18n.getString(_TL_('My ad campaign is too expensive')),\r\n },\r\n {\r\n key: 'q1o5',\r\n text: i18n.getString(_TL_('I\\'m not getting enough return on investment (ROI)')),\r\n },\r\n {\r\n key: 'q1o6',\r\n text: i18n.getString(_TL_('When I search for my ads in Google or Bing, they don\\'t show')),\r\n },\r\n {\r\n key: 'q1o7',\r\n text: i18n.getString(_TL_('I want more control over my ad campaigns')),\r\n },\r\n {\r\n key: 'q1o8',\r\n text: i18n.getString(_TL_('It\\'s difficult to use the product')),\r\n },\r\n {\r\n key: 'q1o9',\r\n hasInput: true,\r\n text: i18n.getString(_TL_('Other')),\r\n placeholder: i18n.getString(_TL_('Other')),\r\n },\r\n ],\r\n },\r\n {\r\n isRequired: false,\r\n Type: SingleSelectionConfigurator,\r\n key: 'q2',\r\n page: 1,\r\n position: 2,\r\n getTitle: () => i18n.getString(_TL_('Will you advertise with us again in the future?')),\r\n options: [\r\n {\r\n key: 'q2o1',\r\n text: i18n.getString(_TL_('Yes')),\r\n },\r\n {\r\n key: 'q2o2',\r\n text: i18n.getString(_TL_('No')),\r\n },\r\n ],\r\n isVisible: answers => (answers.q1.selectedOption === 'q1o1') || (answers.q1.selectedOption === 'q1o2'),\r\n },\r\n {\r\n isRequired: false,\r\n Type: MultipleSelectionConfigurator,\r\n key: 'q3',\r\n page: 1,\r\n position: 2,\r\n getTitle: () => i18n.getString(_TL_('What will you use for advertising? Choose all that apply:')),\r\n options: [\r\n {\r\n key: 'q3o1',\r\n text: i18n.getString(_TL_('Ad advertising agency')),\r\n },\r\n {\r\n key: 'q3o2',\r\n text: i18n.getString(_TL_('Advertising directly on Google Ads, Microsoft Advertising, or Meta Ads')),\r\n },\r\n {\r\n key: 'q3o3',\r\n text: i18n.getString(_TL_('Other social media ads like Twitter, LinkedIn, Pinterest')),\r\n },\r\n {\r\n key: 'q3o4',\r\n text: i18n.getString(_TL_('Review sites like Yelp or Angie\\'s List')),\r\n },\r\n {\r\n key: 'q3o5',\r\n text: i18n.getString(_TL_('TV or radio ads')),\r\n },\r\n {\r\n key: 'q3o6',\r\n text: i18n.getString(_TL_('Offline ads in publications like magazines or newspapers')),\r\n },\r\n {\r\n key: 'q3o7',\r\n hasInput: true,\r\n text: i18n.getString(_TL_('Other')),\r\n placeholder: i18n.getString(_TL_('Other')),\r\n },\r\n ],\r\n isVisible: answers => answers.q1.selectedOption === 'q1o3',\r\n },\r\n {\r\n isRequired: false,\r\n Type: MultipleSelectionConfigurator,\r\n key: 'q4',\r\n page: 1,\r\n position: 2,\r\n getTitle: () => i18n.getString(_TL_('What makes your campaign seem too expensive? (Select all that apply.)')),\r\n options: [\r\n {\r\n key: 'q4o1',\r\n text: i18n.getString(_TL_('I am not getting quality leads.')),\r\n },\r\n {\r\n key: 'q4o2',\r\n text: i18n.getString(_TL_('I get calls and clicks outside my business hours.')),\r\n },\r\n {\r\n key: 'q4o3',\r\n text: i18n.getString(_TL_('I\\'m not sure if my ads were running.')),\r\n },\r\n {\r\n key: 'q4o4',\r\n text: i18n.getString(_TL_('The cost-per-click is too high.')),\r\n },\r\n {\r\n key: 'q4o5',\r\n hasInput: true,\r\n text: i18n.getString(_TL_('Other')),\r\n placeholder: i18n.getString(_TL_('Other')),\r\n },\r\n ],\r\n isVisible: answers => answers.q1.selectedOption === 'q1o4',\r\n },\r\n {\r\n isRequired: false,\r\n Type: MultipleSelectionConfigurator,\r\n key: 'q5',\r\n page: 1,\r\n position: 2,\r\n getTitle: () => i18n.getString(_TL_('What were you hoping to get more of? Choose all that apply:')),\r\n options: [\r\n {\r\n key: 'q5o1',\r\n text: i18n.getString(_TL_('Clicks')),\r\n },\r\n {\r\n key: 'q5o2',\r\n text: i18n.getString(_TL_('Calls')),\r\n },\r\n {\r\n key: 'q5o3',\r\n text: i18n.getString(_TL_('Visits to your physical business location')),\r\n },\r\n {\r\n key: 'q5o4',\r\n text: i18n.getString(_TL_('Sales')),\r\n },\r\n {\r\n key: 'q5o5',\r\n hasInput: true,\r\n text: i18n.getString(_TL_('Other')),\r\n placeholder: i18n.getString(_TL_('Other')),\r\n },\r\n ],\r\n isVisible: answers => answers.q1.selectedOption === 'q1o5',\r\n },\r\n {\r\n isRequired: false,\r\n Type: MultipleSelectionConfigurator,\r\n key: 'q6',\r\n page: 1,\r\n position: 2,\r\n getTitle: () => i18n.getString(_TL_('Please tell us more. Choose all that apply.')),\r\n options: [\r\n {\r\n key: 'q6o1',\r\n text: i18n.getString(_TL_('I only find automated ads when I search for my ads on Google or Bing.')),\r\n },\r\n {\r\n key: 'q6o2',\r\n text: i18n.getString(_TL_('I don\\'t find any ads for my business when I search for it on Google or Bing.')),\r\n },\r\n {\r\n key: 'q6o3',\r\n hasInput: true,\r\n text: i18n.getString(_TL_('Other')),\r\n placeholder: i18n.getString(_TL_('Other')),\r\n },\r\n ],\r\n isVisible: answers => answers.q1.selectedOption === 'q1o6',\r\n },\r\n {\r\n isRequired: false,\r\n Type: MultipleSelectionConfigurator,\r\n key: 'q7',\r\n page: 1,\r\n position: 2,\r\n getTitle: () => i18n.getString(_TL_('What would you like to do? Choose all that apply:')),\r\n options: [\r\n {\r\n key: 'q7o1',\r\n text: i18n.getString(_TL_('I want to set a budget for specific ad channels, such as Microsoft Advertising, Google Ads, or Meta Ads.')),\r\n },\r\n {\r\n key: 'q7o2',\r\n text: i18n.getString(_TL_('I want to turn off automated text ads.')),\r\n },\r\n {\r\n key: 'q7o3',\r\n text: i18n.getString(_TL_('I want my ads to show only for certain demographics (for example, age or income).')),\r\n },\r\n {\r\n key: 'q7o4',\r\n text: i18n.getString(_TL_('I want my ads to show for people with certain interests or behaviors.')),\r\n },\r\n {\r\n key: 'q7o5',\r\n text: i18n.getString(_TL_('I want my ads to show for search phrases I identify.')),\r\n },\r\n {\r\n key: 'q7o6',\r\n text: i18n.getString(_TL_('I want more detailed reports.')),\r\n },\r\n {\r\n key: 'q7o7',\r\n hasInput: true,\r\n text: i18n.getString(_TL_('Other')),\r\n placeholder: i18n.getString(_TL_('Other')),\r\n },\r\n ],\r\n isVisible: answers => answers.q1.selectedOption === 'q1o7',\r\n },\r\n {\r\n isRequired: false,\r\n Type: MultipleSelectionConfigurator,\r\n key: 'q8',\r\n page: 1,\r\n position: 2,\r\n getTitle: () => i18n.getString(_TL_('Which aspect is difficult to use?')),\r\n options: [\r\n {\r\n key: 'q8o1',\r\n text: i18n.getString(_TL_('Automated text ads')),\r\n },\r\n {\r\n key: 'q8o2',\r\n text: i18n.getString(_TL_('Setting up the budget')),\r\n },\r\n {\r\n key: 'q8o3',\r\n text: i18n.getString(_TL_('Payments for advertising')),\r\n },\r\n {\r\n key: 'q8o4',\r\n text: i18n.getString(_TL_('Understanding the impact of search vs. social advertising')),\r\n },\r\n {\r\n key: 'q8o5',\r\n text: i18n.getString(_TL_('Understanding the impact of paid advertising vs. organic social engagement')),\r\n },\r\n {\r\n key: 'q8o6',\r\n text: i18n.getString(_TL_('Connecting to my social networks')),\r\n },\r\n {\r\n key: 'q8o7',\r\n text: i18n.getString(_TL_('I don\\'t know where my money is being spent')),\r\n },\r\n {\r\n key: 'q8o8',\r\n hasInput: true,\r\n text: i18n.getString(_TL_('Other')),\r\n placeholder: i18n.getString(_TL_('Other')),\r\n },\r\n ],\r\n isVisible: answers => answers.q1.selectedOption === 'q1o8',\r\n },\r\n {\r\n isRequired: false,\r\n Type: CommentConfigurator,\r\n key: 'q9',\r\n page: 1,\r\n position: 3,\r\n getTitle: () => i18n.getString(_TL_('Do you have any other feedback you\\'d like to give us about Microsoft Advertising?')),\r\n placeholder: i18n.getString(_TL_('Please don\\'t include any confidential or personal information.')),\r\n isVisible: () => true,\r\n },\r\n ],\r\n };\r\n};\r\n","import React from 'react';\r\nimport {\r\n SurveyFactory,\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\nimport { EscWebuiUserPauseCampaignSurveyConfig } from './factory-view';\r\n\r\nexport const EscWebuiUserPauseCampaignSurveyView = props => (\r\n \r\n);\r\n","import { BaseSurvey } from '../base-survey';\r\nimport { validateESCTriggerCondition } from '../utils';\r\nimport { EscWebuiUserPauseCampaignSurveyView } from './view';\r\n\r\nexport class EscWebuiUserPauseCampaignSurvey extends BaseSurvey {\r\n getSurveyName = () => 'EscWebuiUserPauseCampaignSurvey';\r\n\r\n getSurveyId = () => '7f329cc3-a70f-4477-8ecd-31751102880c';\r\n\r\n validateTriggerCondition = () => validateESCTriggerCondition(this, 'ESCUserPauseCampaign');\r\n\r\n onSurveySubmit = () => {\r\n window.survey.ESCUserPauseCampaign = false;\r\n delete window.survey.ESCUserPauseCampaignCustomParams;\r\n };\r\n\r\n onSurveyDismiss = () => {\r\n window.survey.ESCUserPauseCampaign = false;\r\n delete window.survey.ESCUserPauseCampaignCustomParams;\r\n };\r\n\r\n getSurveyComponent = () => EscWebuiUserPauseCampaignSurveyView;\r\n\r\n getSurveyCustomParams = () => window.survey.ESCUserPauseCampaignCustomParams;\r\n}\r\n","import {\r\n RatingConfigurator,\r\n CommentConfigurator\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\n\r\nexport const EscWebuiUPCampaignFeedbackSurveyConfig = (options) => {\r\n const {\r\n i18n,\r\n } = options;\r\n\r\n return {\r\n featureArea: 'EscWebuiUPCampaignFeedbackSurvey',\r\n style: {\r\n root: {\r\n minWidth: 600,\r\n '@media (max-width: 600px)': {\r\n minHeight: 320,\r\n minWidth: 340,\r\n },\r\n },\r\n },\r\n others: {\r\n isGlobalModalStyleEnabled: true,\r\n isThankYouPageEnabled: false,\r\n isUserInitiatedSurvey: true,\r\n combineTextInputToComment: true,\r\n isInPageMiddle: true,\r\n },\r\n rating: {\r\n isRequired: true,\r\n Type: RatingConfigurator,\r\n key: 'rating',\r\n page: 0,\r\n position: 0,\r\n getTitle: () => i18n.getString(_TL_('Congratulations on successfully publishing your first campaign! Please rate your experience.')),\r\n isVisible: () => true,\r\n options: [\r\n {\r\n key: '5',\r\n text: i18n.getString(_TL_('Extremely easy')),\r\n rating: 1.0,\r\n },\r\n {\r\n key: '4',\r\n text: i18n.getString(_TL_('Somewhat easy')),\r\n rating: 0.8,\r\n },\r\n {\r\n key: '3',\r\n text: i18n.getString(_TL_('Neither easy nor difficult')),\r\n rating: 0.6,\r\n },\r\n {\r\n key: '2',\r\n text: i18n.getString(_TL_('Somewhat difficult')),\r\n rating: 0.4,\r\n },\r\n {\r\n key: '1',\r\n text: i18n.getString(_TL_('Extremely difficult')),\r\n rating: 0.2,\r\n },\r\n ],\r\n },\r\n questions: [\r\n {\r\n isRequired: false,\r\n Type: CommentConfigurator,\r\n key: 'q0',\r\n page: 0,\r\n position: 1,\r\n getTitle: () => i18n.getString(_TL_('Additional feedback (optional)')),\r\n placeholder: i18n.getString(_TL_('Please don\\'t include any confidential or personal information.')),\r\n isVisible: () => true,\r\n },\r\n ],\r\n };\r\n};\r\n","import React from 'react';\r\nimport {\r\n SurveyFactory,\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\nimport { EscWebuiUPCampaignFeedbackSurveyConfig } from './factory-view';\r\n\r\nexport const EscWebuiUPCampaignFeedbackView = props => (\r\n \r\n);\r\n\r\n","import { BaseSurvey } from '../base-survey';\r\nimport { EscWebuiUPCampaignFeedbackView } from './view';\r\nimport { validateESCTriggerCondition } from '../utils';\r\n\r\nexport class EscWebuiCampaignFeedbackSurvey extends BaseSurvey {\r\n getSurveyName = () => 'EscWebuiCampaignFeedbackSurvey';\r\n\r\n getSurveyId = () => '4f304731-345b-47a2-b366-589ad0bba8aa';\r\n\r\n validateTriggerCondition = () => validateESCTriggerCondition(this, 'ESCUserPublishesFirstCampaign');\r\n\r\n onSurveySubmit = () => {\r\n window.survey.ESCUserPublishesFirstCampaign = false;\r\n };\r\n\r\n onSurveyDismiss = () => {\r\n window.survey.ESCUserPublishesFirstCampaign = false;\r\n };\r\n\r\n getSurveyComponent = () => EscWebuiUPCampaignFeedbackView;\r\n}\r\n","import {\r\n MultipleSelectionConfigurator\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\n\r\nexport const EscWebuiAutomatedAdDeletionSurveyConfig = (options) => {\r\n const {\r\n i18n,\r\n } = options;\r\n\r\n return {\r\n featureArea: 'EscWebuiAutomatedAdDeletionSurvey',\r\n style: {\r\n root: {\r\n minWidth: 600,\r\n '@media (max-width: 600px)': {\r\n minHeight: 320,\r\n minWidth: 340,\r\n },\r\n },\r\n },\r\n others: {\r\n isGlobalModalStyleEnabled: true,\r\n isThankYouPageEnabled: false,\r\n isUserInitiatedSurvey: true,\r\n combineTextInputToComment: true,\r\n isInPageMiddle: true,\r\n },\r\n questions: [\r\n {\r\n isRequired: false,\r\n Type: MultipleSelectionConfigurator,\r\n key: 'q1',\r\n page: 0,\r\n position: 0,\r\n getTitle: () => i18n.getString(_TL_('Please let us know why are you deleting this ad')),\r\n isVisible: () => true,\r\n options: [\r\n {\r\n key: 'q1o1',\r\n text: i18n.getString(_TL_('Ad is not relevant to my business')),\r\n },\r\n {\r\n key: 'q1o2',\r\n text: i18n.getString(_TL_('Ad has messaging that I don\\'t like')),\r\n },\r\n {\r\n key: 'q1o3',\r\n text: i18n.getString(_TL_('Ad has offensive content')),\r\n },\r\n {\r\n key: 'q1o4',\r\n text: i18n.getString(_TL_('Ad has incorrect information')),\r\n },\r\n {\r\n key: 'q1o5',\r\n text: i18n.getString(_TL_('Ad has specific words that I don\\'t like')),\r\n },\r\n {\r\n key: 'q1o6',\r\n text: i18n.getString(_TL_('Other')),\r\n placeholder: i18n.getString(_TL_('Other')),\r\n hasInput: true,\r\n maxLength: 2000,\r\n },\r\n ],\r\n data: {\r\n },\r\n },\r\n ],\r\n };\r\n};\r\n","import React from 'react';\r\nimport {\r\n SurveyFactory,\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\nimport { EscWebuiAutomatedAdDeletionSurveyConfig } from './factory-view';\r\n\r\nexport const ESCWebUIAutomatedDeletionSurveyView = props => (\r\n \r\n);\r\n\r\n","import { BaseSurvey } from '../base-survey';\r\nimport { validateESCTriggerCondition } from '../utils';\r\nimport { ESCWebUIAutomatedDeletionSurveyView } from './view';\r\n\r\nexport class EscWebuiAutomatedAdDeletionSurvey extends BaseSurvey {\r\n getSurveyName = () => 'EscWebuiAutomatedAdDeletionSurvey';\r\n\r\n getSurveyId = () => 'e6579f37-b3f8-41d8-9aa4-63b6f875c9f3';\r\n\r\n validateTriggerCondition = () => validateESCTriggerCondition(this, 'ESCAutomatedAdDeletion');\r\n\r\n onSurveySubmit = () => {\r\n window.survey.ESCAutomatedAdDeletion = false;\r\n delete window.survey.ESCAutomatedAdDeletionCustomParams;\r\n };\r\n\r\n onSurveyDismiss = () => {\r\n window.survey.ESCAutomatedAdDeletion = false;\r\n delete window.survey.ESCAutomatedAdDeletionCustomParams;\r\n };\r\n\r\n getSurveyComponent = () => ESCWebUIAutomatedDeletionSurveyView;\r\n\r\n getSurveyCustomParams = () => window.survey.ESCAutomatedAdDeletionCustomParams;\r\n}\r\n","import React from 'react';\r\nimport {\r\n RatingConfigurator,\r\n SingleSelectionConfigurator,\r\n CommentConfigurator,\r\n EmailConfigurator,\r\n SurveyFactory,\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\n\r\nexport const recommendationSurveyConfig = (options) => {\r\n const {\r\n i18n,\r\n } = options;\r\n\r\n return {\r\n featureArea: 'AdInsightRecommendationSurvey',\r\n style: {\r\n root: {\r\n maxWidth: 480,\r\n },\r\n },\r\n others: {\r\n shouldHideInputWhenNotSelected: true,\r\n },\r\n rating: {\r\n isRequired: true,\r\n Type: RatingConfigurator,\r\n key: 'rating',\r\n page: 0,\r\n position: 0,\r\n getTitle: () => i18n.getString(_TL_('How satisfied are you with Microsoft Advertising\\'s Recommendations page?')),\r\n isVisible: () => true,\r\n options: [\r\n {\r\n key: '5',\r\n text: i18n.getString(_TL_('Very satisfied')),\r\n rating: 1.0,\r\n },\r\n {\r\n key: '4',\r\n text: i18n.getString(_TL_('Moderately satisfied')),\r\n rating: 0.8,\r\n },\r\n {\r\n key: '3',\r\n text: i18n.getString(_TL_('Neither satisfied nor dissatisfied')),\r\n rating: 0.6,\r\n },\r\n {\r\n key: '2',\r\n text: i18n.getString(_TL_('Moderately dissatisfied')),\r\n rating: 0.4,\r\n },\r\n {\r\n key: '1',\r\n text: i18n.getString(_TL_('Very dissatisfied')),\r\n rating: 0.2,\r\n },\r\n ],\r\n },\r\n email: {\r\n isRequired: true,\r\n Type: EmailConfigurator,\r\n key: 'email',\r\n page: 4,\r\n position: 1,\r\n getTitle: () => i18n.getString(_TL_('Can we follow up with you about your responses?')),\r\n isVisible: answers => ['5', '4', '3', '2', '1'].includes(answers.rating.selectedOption),\r\n options: [\r\n {\r\n key: 'yes',\r\n text: i18n.getString(_TL_('Yes - specify the contact email below')),\r\n placeholder: i18n.getString(_TL_('Enter your email')),\r\n hasInput: true,\r\n },\r\n {\r\n key: 'no',\r\n text: i18n.getString(_TL_('No')),\r\n },\r\n ],\r\n },\r\n questions: [\r\n {\r\n Type: CommentConfigurator,\r\n key: 'q1',\r\n page: 1,\r\n position: 0,\r\n getTitle: (answers, surveyConfigurator) => {\r\n const questionConfigurator = surveyConfigurator.getQuestionByKey('rating');\r\n const optionKey = answers.rating.selectedOption;\r\n // option to text\r\n return i18n.getString(\r\n _TL_('Can you tell us more about where you are {{option}} with Microsoft Adertising\\'s Recommendations?'),\r\n { option: questionConfigurator.optionKeyToText[optionKey].toLowerCase() }\r\n );\r\n },\r\n data: {\r\n },\r\n },\r\n {\r\n isRequired: true,\r\n Type: SingleSelectionConfigurator,\r\n key: 'q2',\r\n page: 2,\r\n position: 0,\r\n getTitle: () => i18n.getString(_TL_('How often do you check out Recommendations page?')),\r\n options: [\r\n {\r\n key: 'q2o1',\r\n text: i18n.getString(_TL_('Once every 2-3 months')),\r\n },\r\n {\r\n key: 'q2o2',\r\n text: i18n.getString(_TL_('Once per month')),\r\n },\r\n {\r\n key: 'q2o3',\r\n text: i18n.getString(_TL_('2-3 times per month')),\r\n },\r\n {\r\n key: 'q2o4',\r\n text: i18n.getString(_TL_('Once per week')),\r\n },\r\n {\r\n key: 'q2o5',\r\n text: i18n.getString(_TL_('2-3 times per week')),\r\n },\r\n {\r\n key: 'q2o6',\r\n text: i18n.getString(_TL_('Everyday')),\r\n },\r\n {\r\n key: 'q2o7',\r\n text: i18n.getString(_TL_('Others')),\r\n placeholder: i18n.getString(_TL_('Please feel free to elaborate')),\r\n hasInput: true,\r\n maxLength: 2000,\r\n },\r\n ],\r\n data: {\r\n },\r\n },\r\n {\r\n isRequired: true,\r\n Type: SingleSelectionConfigurator,\r\n key: 'q3',\r\n page: 3,\r\n position: 0,\r\n getTitle: () => i18n.getString(_TL_('Is Optimization Score helpful when you act on Recommendations?')),\r\n options: [\r\n {\r\n key: 'q3o1',\r\n text: i18n.getString(_TL_('Very helpful')),\r\n },\r\n {\r\n key: 'q3o2',\r\n text: i18n.getString(_TL_('Moderately helpful')),\r\n },\r\n {\r\n key: 'q3o3',\r\n text: i18n.getString(_TL_('Neither helpful nor unhelpful')),\r\n },\r\n {\r\n key: 'q3o4',\r\n text: i18n.getString(_TL_('Somewhat unhelpful')),\r\n },\r\n {\r\n key: 'q3o5',\r\n text: i18n.getString(_TL_('Not at helpful')),\r\n },\r\n ],\r\n },\r\n {\r\n Type: CommentConfigurator,\r\n key: 'q4',\r\n page: 4,\r\n position: 0,\r\n getTitle: () => i18n.getString(_TL_('If you could change one thing to improve Optimization Score, what would it be?')),\r\n data: {\r\n },\r\n },\r\n ],\r\n };\r\n};\r\n\r\nexport const FactorySurveyView = props => (\r\n );\r\n","import { BaseSurvey } from '../base-survey';\r\nimport { FactorySurveyView } from './factory-view';\r\nimport { validateAdinsightRecommendationTriggerCondition } from '../utils';\r\n\r\nexport class AdInsightRecommendationSurvey extends BaseSurvey {\r\n getSurveyName = () => 'AdInsightRecommendationSurvey';\r\n\r\n getSurveyId = isTestEnv => isTestEnv ? // eslint-disable-line no-confusing-arrow\r\n '78f8a552-767c-4247-915b-899bdd00bd06' : 'cc5db067-561d-4f60-a048-12767782666c';\r\n\r\n getInitializationConfig = () => ({\r\n initGroup: 100,\r\n initStartDate: '2023-03-02',\r\n initEndDate: '2023-06-09',\r\n });\r\n\r\n validateTriggerCondition = () => validateAdinsightRecommendationTriggerCondition(this, 'campaign/vnext/recommendations', 'IsRecommendationPageCsatPilotEnabled');\r\n\r\n getSurveyComponent = () => FactorySurveyView;\r\n}\r\n","import React from 'react';\r\nimport {\r\n RatingConfigurator,\r\n SingleSelectionConfigurator,\r\n CommentConfigurator,\r\n EmailConfigurator,\r\n SurveyFactory,\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\n\r\nexport const recommendationMccSurveyConfig = (options) => {\r\n const {\r\n i18n,\r\n } = options;\r\n\r\n return {\r\n featureArea: 'AdInsightRecommendationMccSurvey',\r\n style: {\r\n root: {\r\n maxWidth: 480,\r\n },\r\n },\r\n others: {\r\n shouldHideInputWhenNotSelected: true,\r\n },\r\n rating: {\r\n isRequired: true,\r\n Type: RatingConfigurator,\r\n key: 'rating',\r\n page: 0,\r\n position: 0,\r\n getTitle: () => i18n.getString(_TL_('How satisfied are you with Microsoft Advertising\\'s Recommendations page in your manager account?')),\r\n isVisible: () => true,\r\n options: [\r\n {\r\n key: '5',\r\n text: i18n.getString(_TL_('Very satisfied')),\r\n rating: 1.0,\r\n },\r\n {\r\n key: '4',\r\n text: i18n.getString(_TL_('Moderately satisfied')),\r\n rating: 0.8,\r\n },\r\n {\r\n key: '3',\r\n text: i18n.getString(_TL_('Neither satisfied nor dissatisfied')),\r\n rating: 0.6,\r\n },\r\n {\r\n key: '2',\r\n text: i18n.getString(_TL_('Moderately dissatisfied')),\r\n rating: 0.4,\r\n },\r\n {\r\n key: '1',\r\n text: i18n.getString(_TL_('Very dissatisfied')),\r\n rating: 0.2,\r\n },\r\n ],\r\n },\r\n email: {\r\n isRequired: true,\r\n Type: EmailConfigurator,\r\n key: 'email',\r\n page: 3,\r\n position: 1,\r\n getTitle: () => i18n.getString(_TL_('Can we follow up with you about your responses?')),\r\n isVisible: answers => ['5', '4', '3', '2', '1'].includes(answers.rating.selectedOption),\r\n options: [\r\n {\r\n key: 'yes',\r\n text: i18n.getString(_TL_('Yes - specify the contact email below')),\r\n placeholder: i18n.getString(_TL_('Enter your email')),\r\n hasInput: true,\r\n },\r\n {\r\n key: 'no',\r\n text: i18n.getString(_TL_('No')),\r\n },\r\n ],\r\n },\r\n questions: [\r\n {\r\n Type: CommentConfigurator,\r\n key: 'q1',\r\n page: 1,\r\n position: 0,\r\n getTitle: (answers, surveyConfigurator) => {\r\n const questionConfigurator = surveyConfigurator.getQuestionByKey('rating');\r\n const optionKey = answers.rating.selectedOption;\r\n // option to text\r\n return i18n.getString(\r\n _TL_('Can you tell us more about where you are {{option}} with Microsoft Adertising\\'s Recommendations?'),\r\n { option: questionConfigurator.optionKeyToText[optionKey].toLowerCase() }\r\n );\r\n },\r\n data: {\r\n },\r\n },\r\n {\r\n isRequired: true,\r\n Type: SingleSelectionConfigurator,\r\n key: 'q2',\r\n page: 2,\r\n position: 0,\r\n getTitle: () => i18n.getString(_TL_('How often do you check out Recommendations page in your account?')),\r\n options: [\r\n {\r\n key: 'q2o1',\r\n text: i18n.getString(_TL_('Once every 2-3 months')),\r\n },\r\n {\r\n key: 'q2o2',\r\n text: i18n.getString(_TL_('Once per month')),\r\n },\r\n {\r\n key: 'q2o3',\r\n text: i18n.getString(_TL_('2-3 times per month')),\r\n },\r\n {\r\n key: 'q2o4',\r\n text: i18n.getString(_TL_('Once per week')),\r\n },\r\n {\r\n key: 'q2o5',\r\n text: i18n.getString(_TL_('2-3 times per week')),\r\n },\r\n {\r\n key: 'q2o6',\r\n text: i18n.getString(_TL_('Everyday')),\r\n },\r\n {\r\n key: 'q2o7',\r\n text: i18n.getString(_TL_('Others')),\r\n placeholder: i18n.getString(_TL_('Please feel free to elaborate')),\r\n hasInput: true,\r\n maxLength: 2000,\r\n },\r\n ],\r\n data: {\r\n },\r\n },\r\n ],\r\n };\r\n};\r\n\r\nexport const FactorySurveyView = props => (\r\n );\r\n","import { BaseSurvey } from '../base-survey';\r\nimport { FactorySurveyView } from './factory-view';\r\nimport { validateAdinsightRecommendationTriggerCondition } from '../utils';\r\n\r\nexport class AdInsightRecommendationMccSurvey extends BaseSurvey {\r\n getSurveyName = () => 'AdInsightRecommendationMccSurvey';\r\n\r\n getSurveyId = isTestEnv => isTestEnv ? // eslint-disable-line no-confusing-arrow\r\n '9c362445-37e0-46b2-9389-c70570320aff' : '557a4b31-a852-4ef8-8b79-73680df161a9';\r\n\r\n getInitializationConfig = () => ({\r\n initGroup: 100,\r\n initStartDate: '2023-03-02',\r\n initEndDate: '2023-06-09',\r\n });\r\n\r\n validateTriggerCondition = () => validateAdinsightRecommendationTriggerCondition(this, 'campaign/vnext/accounts/recommendations', 'IsRecommendationMccPageCsatPilotEnabled');\r\n\r\n getSurveyComponent = () => FactorySurveyView;\r\n}\r\n","import {\r\n SingleSelectionConfigurator,\r\n MultipleSelectionConfigurator,\r\n CommentConfigurator,\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\n\r\nexport const escWebuiUserCancelSignupSurveyConfig = (options) => {\r\n const {\r\n i18n,\r\n } = options;\r\n\r\n return {\r\n featureArea: 'EscWebuiUserCancelSignupSurvey',\r\n style: {\r\n root: {\r\n minHeight: 420,\r\n '@media (min-width: 600px)': {\r\n minWidth: 600,\r\n minHeight: 320,\r\n },\r\n },\r\n },\r\n others: {\r\n isGlobalModalStyleEnabled: true,\r\n isThankYouPageEnabled: false,\r\n isUserInitiatedSurvey: true,\r\n combineTextInputToComment: true,\r\n isInPageMiddle: true,\r\n },\r\n questions: [\r\n {\r\n isRequired: false,\r\n Type: SingleSelectionConfigurator,\r\n key: 'q1',\r\n page: 0,\r\n position: 0,\r\n getTitle: () => i18n.getString(_TL_('Please let us know why you decided not to sign up')),\r\n isVisible: () => true,\r\n options: [\r\n {\r\n key: 'q1o1',\r\n text: i18n.getString(_TL_('I don\\'t know what I\\'m signing up for')),\r\n },\r\n {\r\n key: 'q1o2',\r\n text: i18n.getString(_TL_('The sign up process is too long and/or confusing')),\r\n },\r\n {\r\n key: 'q1o3',\r\n text: i18n.getString(_TL_('I don\\'t want to share my business details too soon')),\r\n },\r\n {\r\n key: 'q1o4',\r\n text: i18n.getString(_TL_('The product doesn\\'t provide what I need for my business')),\r\n },\r\n {\r\n key: 'q1o5',\r\n text: i18n.getString(_TL_('I plan to sign up later')),\r\n },\r\n {\r\n key: 'q1o6',\r\n text: i18n.getString(_TL_('The coupon I used isn\\'t being applied')),\r\n },\r\n {\r\n key: 'q1o7',\r\n hasInput: true,\r\n text: 'Other',\r\n },\r\n ],\r\n data: {\r\n },\r\n },\r\n {\r\n isRequired: false,\r\n Type: MultipleSelectionConfigurator,\r\n key: 'q2',\r\n page: 1,\r\n position: 0,\r\n getTitle: () => i18n.getString(_TL_('What in the setup process is confusing? Choose all that apply:')),\r\n isVisible: answers => answers.q1.selectedOption === 'q1o2',\r\n options: [\r\n {\r\n key: 'q2o1',\r\n text: i18n.getString(_TL_('I don\\'t understand why I need so many steps')),\r\n },\r\n {\r\n key: 'q2o2',\r\n text: i18n.getString(_TL_('I need more help to understand the sign up process')),\r\n },\r\n {\r\n key: 'q2o3',\r\n text: i18n.getString(_TL_('The UI is very complicated')),\r\n },\r\n {\r\n key: 'q2o4',\r\n text: i18n.getString(_TL_('Account creation is very complicated')),\r\n },\r\n {\r\n key: 'q2o5',\r\n text: i18n.getString(_TL_('Campaign creation process is tedious')),\r\n },\r\n {\r\n key: 'q2o6',\r\n hasInput: true,\r\n placeholder: i18n.getString(_TL_('Other')),\r\n },\r\n ],\r\n data: {\r\n },\r\n },\r\n {\r\n isRequired: false,\r\n Type: CommentConfigurator,\r\n key: 'q3',\r\n page: 1,\r\n position: 1,\r\n getTitle: () => i18n.getString(_TL_('Can you elaborate more why the product doesn\\'t meet your business expectations?')),\r\n placeholder: i18n.getString(_TL_('Please don\\'t include any confidential or personal information.')),\r\n isVisible: answers => answers.q1.selectedOption === 'q1o4',\r\n },\r\n {\r\n isRequired: false,\r\n Type: MultipleSelectionConfigurator,\r\n key: 'q4',\r\n page: 1,\r\n position: 2,\r\n getTitle: () => i18n.getString(_TL_('Reasons to sign up later')),\r\n isVisible: answers => answers.q1.selectedOption === 'q1o5',\r\n options: [\r\n {\r\n key: 'q4o1',\r\n text: i18n.getString(_TL_('Would like more time to think about it')),\r\n },\r\n {\r\n key: 'q4o2',\r\n text: i18n.getString(_TL_('My agent will finish up the process for me')),\r\n },\r\n {\r\n key: 'q4o3',\r\n text: i18n.getString(_TL_('Not sure if I am ready to start a campaign yet')),\r\n },\r\n {\r\n key: 'q4o4',\r\n text: i18n.getString(_TL_('Don\\'t have the budget to run a campaign now')),\r\n },\r\n {\r\n key: 'q4o5',\r\n text: i18n.getString(_TL_('Don\\'t understand the benefits of signing up if not ready to run a campaign')),\r\n },\r\n {\r\n key: 'q4o6',\r\n hasInput: true,\r\n placeholder: i18n.getString(_TL_('Other')),\r\n },\r\n ],\r\n data: {\r\n },\r\n },\r\n {\r\n isRequired: false,\r\n Type: CommentConfigurator,\r\n key: 'q5',\r\n page: 1,\r\n position: 3,\r\n getTitle: () => i18n.getString(_TL_('Do you have any other feedback you\\'d like to give us about Microsoft Advertising?')),\r\n placeholder: i18n.getString(_TL_('Please don\\'t include any confidential or personal information.')),\r\n isVisible: () => true,\r\n },\r\n ],\r\n };\r\n};\r\n","import React from 'react';\r\nimport {\r\n SurveyFactory,\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\nimport { escWebuiUserCancelSignupSurveyConfig } from './factory-view';\r\n\r\nexport const ESCWebUIUserCancelSignupSurveyView = props => (\r\n \r\n);\r\n\r\n","import { BaseSurvey } from '../base-survey';\r\nimport { validateESCSignupTriggerCondition } from '../utils';\r\nimport { ESCWebUIUserCancelSignupSurveyView } from './view';\r\n\r\nexport class EscWebuiUserCancelSignupSurvey extends BaseSurvey {\r\n getSurveyName = () => 'EscWebuiUserCancelSignupSurvey';\r\n\r\n getSurveyId = () => 'ec6cdc61-9e98-4e85-a5f0-065cce464ce2';\r\n\r\n validateTriggerCondition = () => validateESCSignupTriggerCondition(this, 'EscUserCancelSignup');\r\n\r\n getSurveyComponent = () => ESCWebUIUserCancelSignupSurveyView;\r\n\r\n onSurveySubmit = () => {\r\n window.survey.EscUserCancelSignup = false;\r\n delete window.survey.EscUserCancelSignupCustomParams;\r\n };\r\n\r\n onSurveyDismiss = () => {\r\n window.survey.EscUserCancelSignup = false;\r\n delete window.survey.EscUserCancelSignupCustomParams;\r\n };\r\n\r\n getSurveyCustomParams = () => window.survey.EscUserCancelSignupCustomParams;\r\n}\r\n","import {\r\n MultipleSelectionConfigurator\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\n\r\nexport const McmWebuiOptOutFeedbackSurveyConfig = (options) => {\r\n const {\r\n i18n,\r\n } = options;\r\n\r\n return {\r\n featureArea: 'ESCWeb\\\\MultiChannelOptOut',\r\n style: {\r\n root: {\r\n minWidth: 600,\r\n },\r\n },\r\n others: {\r\n isUserInitiatedSurvey: true,\r\n },\r\n questions: [\r\n {\r\n Type: MultipleSelectionConfigurator,\r\n isRequired: true,\r\n key: 'q1',\r\n page: 0,\r\n position: 0,\r\n getTitle: () => i18n.getString(_TL_('Why did you opt out of multi-channel management?')),\r\n isVisible: () => true,\r\n options: [\r\n {\r\n key: 'q1o1',\r\n text: i18n.getString(_TL_('Advertiser policy don\\'t allow Audience Spend')),\r\n },\r\n {\r\n key: 'q1o2',\r\n text: i18n.getString(_TL_('Poor Performance or Traffic Spike')),\r\n },\r\n {\r\n key: 'q1o3',\r\n text: i18n.getString(_TL_('Other Reason')),\r\n placeholder: i18n.getString(_TL_('Please feel free to elaborate')),\r\n hasInput: true,\r\n maxLength: 2000,\r\n },\r\n ],\r\n data: {\r\n },\r\n },\r\n ],\r\n };\r\n};\r\n","import React from 'react';\r\nimport {\r\n SurveyFactory,\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\nimport { McmWebuiOptOutFeedbackSurveyConfig } from './factory-view';\r\n\r\nexport const McmWebuiOptOutFeedbackView = props => (\r\n \r\n);\r\n","import { BaseSurvey } from '../base-survey';\r\nimport { McmWebuiOptOutFeedbackView } from './view';\r\nimport { validateAccountSettingsTriggerCondition } from '../utils';\r\n\r\nexport class McmWebuiOptOutFeedbackSurvey extends BaseSurvey {\r\n getSurveyName = () => 'McmWebuiOptOutFeedbackSurvey';\r\n\r\n getSurveyId = isTestEnv => isTestEnv ? // eslint-disable-line no-confusing-arrow\r\n '455be049-493a-49f1-a076-8145a70ffa19' : '33bd3730-b4c6-4df8-8af2-b9662b83a64e';\r\n\r\n getSurveyProduct = () => 'ESC';\r\n\r\n getSurveyInterface = () => 'Web';\r\n\r\n validateTriggerCondition = () => validateAccountSettingsTriggerCondition(this, '/campaign/vnext/accountsettings', 'McmUserOptOut');\r\n\r\n onSurveySubmit = () => {\r\n window.survey.McmUserOptOut = false;\r\n };\r\n\r\n onSurveyDismiss = () => {\r\n window.survey.McmUserOptOut = false;\r\n };\r\n\r\n getSurveyComponent = () => McmWebuiOptOutFeedbackView;\r\n}\r\n","import {\r\n SingleSelectionConfigurator\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\n\r\nexport const MCMMandatoryOptOutSurveyConfig = (options) => {\r\n const {\r\n i18n,\r\n } = options;\r\n\r\n return {\r\n featureArea: 'ESCWeb\\\\MultiChannelOptOut',\r\n style: {\r\n root: {\r\n minWidth: 600,\r\n },\r\n },\r\n others: {\r\n isUserInitiatedSurvey: true,\r\n },\r\n questions: [\r\n {\r\n Type: SingleSelectionConfigurator,\r\n isRequired: true,\r\n key: 'q1',\r\n page: 0,\r\n position: 0,\r\n getTitle: () => i18n.getString(_TL_('Why are you opting out your campaign(s)?')),\r\n isVisible: () => true,\r\n options: [\r\n {\r\n key: 'q1o1',\r\n text: i18n.getString(_TL_('The advertiser has separate budgets for search and audience campaigns.')),\r\n },\r\n {\r\n key: 'q1o2',\r\n text: i18n.getString(_TL_('The advertiser\\'s policies restrict ads from serving.')),\r\n },\r\n {\r\n key: 'q1o3',\r\n text: i18n.getString(_TL_('The ads are restricted from serving on the Microsoft Advertising Network per Microsoft Advertising\\'s policies.')),\r\n },\r\n {\r\n key: 'q1o4',\r\n text: i18n.getString(_TL_('Other (please elaborate below).')),\r\n placeholder: i18n.getString(_TL_('Please don\\'t include any confidential or personal information in your response.')),\r\n hasInput: true,\r\n maxLength: 90,\r\n },\r\n ],\r\n data: {\r\n },\r\n },\r\n ],\r\n };\r\n};\r\n","import React from 'react';\r\nimport {\r\n SurveyFactory,\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\nimport { MCMMandatoryOptOutSurveyConfig } from './factory-view';\r\n\r\nexport const MCMMandatoryOptOutSurveyView = props => (\r\n \r\n);\r\n","import { BaseSurvey } from '../base-survey';\r\nimport { MCMMandatoryOptOutSurveyView } from './view';\r\nimport { validateAccountSettingsTriggerCondition } from '../utils';\r\n\r\nexport class MCMMandatoryOptOutSurvey extends BaseSurvey {\r\n getSurveyName = () => 'MCMMandatoryOptOutSurvey';\r\n\r\n getSurveyId = isTestEnv => isTestEnv ? // eslint-disable-line no-confusing-arrow\r\n 'ac5d4a61-4f23-49f0-a2c8-84fa6cbdceed' : '8c853ce2-96e9-4fd9-a760-5c2b62838927';\r\n\r\n getSurveyProduct = () => 'ESC';\r\n\r\n getSurveyInterface = () => 'Web';\r\n\r\n validateTriggerCondition = () => validateAccountSettingsTriggerCondition(this, '/campaign/vnext/accountsettings', 'MCMMandatoryOptOutSurvey');\r\n\r\n onSurveySubmit = () => {\r\n window.survey.MCMMandatoryOptOutSurvey = false;\r\n window.survey.onSubmitHideWarningCallback();\r\n };\r\n\r\n onSurveyDismiss = () => {\r\n window.survey.MCMMandatoryOptOutSurvey = false;\r\n window.survey.onDismissReOptInCallback();\r\n };\r\n\r\n getSurveyComponent = () => MCMMandatoryOptOutSurveyView;\r\n}\r\n","import {\r\n RatingConfigurator,\r\n MultipleSelectionConfigurator,\r\n CommentConfigurator,\r\n EmailConfigurator,\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\n\r\nexport const AssetLibraryAppSurveyConfig = (options) => {\r\n const { i18n } = options;\r\n\r\n return {\r\n featureArea: 'AssetLibraryAppSurvey',\r\n style: {\r\n root: {\r\n maxWidth: 600,\r\n },\r\n },\r\n others: {\r\n },\r\n rating: {\r\n isRequired: true,\r\n Type: RatingConfigurator,\r\n key: 'rating',\r\n page: 0,\r\n position: 0,\r\n getTitle: () => i18n.getString(_TL_('How satisfied are you with Microsoft Advertising\\'s Asset library?')),\r\n isVisible: () => true,\r\n options: [\r\n {\r\n key: '5',\r\n text: i18n.getString(_TL_('Very satisfied')),\r\n rating: 1.0,\r\n },\r\n {\r\n key: '4',\r\n text: i18n.getString(_TL_('Moderately satisfied')),\r\n rating: 0.8,\r\n },\r\n {\r\n key: '3',\r\n text: i18n.getString(_TL_('Neutral')),\r\n rating: 0.6,\r\n },\r\n {\r\n key: '2',\r\n text: i18n.getString(_TL_('Moderately dissatisfied')),\r\n rating: 0.4,\r\n },\r\n {\r\n key: '1',\r\n text: i18n.getString(_TL_('Very dissatisfied')),\r\n rating: 0.2,\r\n },\r\n ],\r\n },\r\n email: {\r\n Type: EmailConfigurator,\r\n key: 'email',\r\n page: 0,\r\n position: 3,\r\n getTitle: () => i18n.getString(_TL_('Can we follow up with you about your responses?')),\r\n isVisible: answers => ['2', '1'].includes(answers.rating.selectedOption),\r\n options: [\r\n {\r\n key: 'yes',\r\n text: i18n.getString(_TL_('Yes - specify the contact email below')),\r\n placeholder: i18n.getString(_TL_('Enter your email')),\r\n hasInput: true,\r\n },\r\n {\r\n key: 'no',\r\n text: i18n.getString(_TL_('No')),\r\n },\r\n ],\r\n },\r\n questions: [\r\n {\r\n isRequired: true,\r\n Type: MultipleSelectionConfigurator,\r\n key: 'q1',\r\n page: 0,\r\n position: 1,\r\n getTitle: (answers, surveyConfigurator) => {\r\n const questionConfigurator = surveyConfigurator.getQuestionByKey('rating');\r\n const optionKey = answers.rating.selectedOption;\r\n // option to text\r\n return i18n.getString(\r\n _TL_('Please tell us more about why you\\'re {{option}} with Asset library. Select all that apply.'),\r\n { option: questionConfigurator.optionKeyToText[optionKey] }\r\n );\r\n },\r\n isVisible: answers => ['2', '1'].includes(answers.rating.selectedOption),\r\n options: [\r\n {\r\n key: 'q1o1',\r\n text: i18n.getString(_TL_('Uploading assets could be improved.')),\r\n },\r\n {\r\n key: 'q1o2',\r\n text: i18n.getString(_TL_('Editing assets could be improved.')),\r\n },\r\n {\r\n key: 'q1o3',\r\n text: i18n.getString(_TL_('I want more asset types.')),\r\n },\r\n {\r\n key: 'q1o4',\r\n text: i18n.getString(_TL_('The navigation and interface could be improved.')),\r\n },\r\n {\r\n key: 'q1o5',\r\n text: i18n.getString(_TL_('Searching for and filtering assets could be improved.')),\r\n },\r\n {\r\n key: 'q1o6',\r\n text: i18n.getString(_TL_('Asset library takes too long to load.')),\r\n },\r\n {\r\n key: 'q1o7',\r\n text: i18n.getString(_TL_('Other (please elaborate below).')),\r\n },\r\n ],\r\n data: {\r\n },\r\n },\r\n {\r\n isRequired: false,\r\n Type: CommentConfigurator,\r\n key: 'q2',\r\n page: 0,\r\n position: 2,\r\n getTitle: () => i18n.getString(_TL_('How can we continue to improve?')),\r\n isVisible: answers => ['2', '1'].includes(answers.rating.selectedOption),\r\n maxLength: 1024,\r\n data: {\r\n },\r\n },\r\n ],\r\n };\r\n};\r\n","import React from 'react';\r\nimport {\r\n SurveyFactory,\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\nimport { AssetLibraryAppSurveyConfig } from './factory-view';\r\n\r\nexport const AssetLibraryAppSurveyView = props => (\r\n \r\n);\r\n","import { BaseSurvey } from '../base-survey';\r\nimport { AssetLibraryAppSurveyView } from './view';\r\nimport { validateAssetLibraryTriggerCondition } from '../utils';\r\n\r\nexport class AssetLibraryAppSurvey extends BaseSurvey {\r\n getSurveyName = () => 'AssetLibraryAppSurvey';\r\n\r\n getSurveyId = isTestEnv => (isTestEnv ? 'b4db6685-adec-4ecf-a7d5-288eaccb13f1' : '958137e5-13be-4f08-8a07-0afe1974cbff');\r\n\r\n validateTriggerCondition = () => validateAssetLibraryTriggerCondition(this, 'AssetLibraryAppSurveyTrigger');\r\n\r\n onSurveySubmit() {\r\n window.survey.AssetLibraryAppSurveyTrigger = false;\r\n\r\n super.onSurveySubmit();\r\n }\r\n\r\n onSurveyDismiss() {\r\n window.survey.AssetLibraryAppSurveyTrigger = false;\r\n\r\n super.onSurveyDismiss();\r\n }\r\n\r\n getSurveyComponent = () => AssetLibraryAppSurveyView;\r\n}\r\n","import {\r\n RatingConfigurator,\r\n MultipleSelectionConfigurator,\r\n CommentConfigurator,\r\n EmailConfigurator,\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\n\r\nexport const AssetLibraryPickerSurveyConfig = (options) => {\r\n const { i18n } = options;\r\n\r\n return {\r\n featureArea: 'AssetLibraryPickerSurvey',\r\n style: {\r\n root: {\r\n maxWidth: 600,\r\n },\r\n },\r\n others: {\r\n },\r\n rating: {\r\n isRequired: true,\r\n Type: RatingConfigurator,\r\n key: 'rating',\r\n page: 0,\r\n position: 0,\r\n getTitle: () => i18n.getString(_TL_('How satisfied are you with Microsoft Advertising\\'s Asset library?')),\r\n isVisible: () => true,\r\n options: [\r\n {\r\n key: '5',\r\n text: i18n.getString(_TL_('Very satisfied')),\r\n rating: 1.0,\r\n },\r\n {\r\n key: '4',\r\n text: i18n.getString(_TL_('Moderately satisfied')),\r\n rating: 0.8,\r\n },\r\n {\r\n key: '3',\r\n text: i18n.getString(_TL_('Neutral')),\r\n rating: 0.6,\r\n },\r\n {\r\n key: '2',\r\n text: i18n.getString(_TL_('Moderately dissatisfied')),\r\n rating: 0.4,\r\n },\r\n {\r\n key: '1',\r\n text: i18n.getString(_TL_('Very dissatisfied')),\r\n rating: 0.2,\r\n },\r\n ],\r\n },\r\n email: {\r\n Type: EmailConfigurator,\r\n key: 'email',\r\n page: 0,\r\n position: 3,\r\n getTitle: () => i18n.getString(_TL_('Can we follow up with you about your responses?')),\r\n isVisible: answers => ['2', '1'].includes(answers.rating.selectedOption),\r\n options: [\r\n {\r\n key: 'yes',\r\n text: i18n.getString(_TL_('Yes - specify the contact email below')),\r\n placeholder: i18n.getString(_TL_('Enter your email')),\r\n hasInput: true,\r\n },\r\n {\r\n key: 'no',\r\n text: i18n.getString(_TL_('No')),\r\n },\r\n ],\r\n },\r\n questions: [\r\n {\r\n isRequired: true,\r\n Type: MultipleSelectionConfigurator,\r\n key: 'q1',\r\n page: 0,\r\n position: 1,\r\n getTitle: (answers, surveyConfigurator) => {\r\n const questionConfigurator = surveyConfigurator.getQuestionByKey('rating');\r\n const optionKey = answers.rating.selectedOption;\r\n // option to text\r\n return i18n.getString(\r\n _TL_('Please tell us more about why you\\'re {{option}} with Asset library. Select all that apply.'),\r\n { option: questionConfigurator.optionKeyToText[optionKey] }\r\n );\r\n },\r\n isVisible: answers => ['2', '1'].includes(answers.rating.selectedOption),\r\n options: [\r\n {\r\n key: 'q1o1',\r\n text: i18n.getString(_TL_('Uploading assets could be improved.')),\r\n },\r\n {\r\n key: 'q1o2',\r\n text: i18n.getString(_TL_('I want more asset types.')),\r\n },\r\n {\r\n key: 'q1o3',\r\n text: i18n.getString(_TL_('Searching for and filtering assets could be improved.')),\r\n },\r\n {\r\n key: 'q1o4',\r\n text: i18n.getString(_TL_('Asset library takes too long to load.')),\r\n },\r\n {\r\n key: 'q1o5',\r\n text: i18n.getString(_TL_('The interface could be improved.')),\r\n },\r\n {\r\n key: 'q1o6',\r\n text: i18n.getString(_TL_('Other (please elaborate below).')),\r\n },\r\n ],\r\n data: {\r\n },\r\n },\r\n {\r\n isRequired: false,\r\n Type: CommentConfigurator,\r\n key: 'q2',\r\n page: 0,\r\n position: 2,\r\n getTitle: () => i18n.getString(_TL_('How can we continue to improve?')),\r\n isVisible: answers => ['2', '1'].includes(answers.rating.selectedOption),\r\n maxLength: 1024,\r\n data: {\r\n },\r\n },\r\n ],\r\n };\r\n};\r\n","import React from 'react';\r\nimport {\r\n SurveyFactory,\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\nimport { AssetLibraryPickerSurveyConfig } from './factory-view';\r\n\r\nexport const AssetLibraryPickerSurveyView = props => (\r\n \r\n);\r\n","import { BaseSurvey } from '../base-survey';\r\nimport { AssetLibraryPickerSurveyView } from './view';\r\nimport { validateAssetLibraryTriggerCondition } from '../utils';\r\n\r\nexport class AssetLibraryPickerSurvey extends BaseSurvey {\r\n getSurveyName = () => 'AssetLibraryPickerSurvey';\r\n\r\n getSurveyId = isTestEnv => (isTestEnv ? 'cfa725ec-eec1-4333-a7b3-d6b208ac2358' : 'ec9fe9b2-2ffe-4b60-80ff-e3f553b3d85f');\r\n\r\n validateTriggerCondition = () => validateAssetLibraryTriggerCondition(this, 'AssetLibraryPickerSurveyTrigger');\r\n\r\n onSurveySubmit() {\r\n window.survey.AssetLibraryPickerSurveyTrigger = false;\r\n\r\n super.onSurveySubmit();\r\n }\r\n\r\n onSurveyDismiss() {\r\n window.survey.AssetLibraryPickerSurveyTrigger = false;\r\n\r\n super.onSurveyDismiss();\r\n }\r\n\r\n getSurveyComponent = () => AssetLibraryPickerSurveyView;\r\n}\r\n","import {\r\n RatingConfigurator,\r\n MultipleSelectionConfigurator,\r\n EmailConfigurator,\r\n CommentConfigurator,\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\n\r\nexport const AssetLibraryAIGCMVPSurveyConfig = (options) => {\r\n const { i18n } = options;\r\n\r\n return {\r\n featureArea: 'AssetLibraryAIGCSurvey',\r\n style: {\r\n root: {\r\n minWidth: 600,\r\n maxWidth: 600,\r\n },\r\n },\r\n others: {\r\n },\r\n rating: {\r\n isRequired: true,\r\n Type: RatingConfigurator,\r\n key: 'rating',\r\n page: 0,\r\n position: 0,\r\n getTitle: () => i18n.getString(_TL_('How satisfied are you with the feature of generating images through AI?')),\r\n isVisible: () => true,\r\n options: [\r\n {\r\n key: '5',\r\n text: i18n.getString(_TL_('Very satisfied')),\r\n rating: 1.0,\r\n },\r\n {\r\n key: '4',\r\n text: i18n.getString(_TL_('Moderately satisfied')),\r\n rating: 0.8,\r\n },\r\n {\r\n key: '3',\r\n text: i18n.getString(_TL_('Neutral')),\r\n rating: 0.6,\r\n },\r\n {\r\n key: '2',\r\n text: i18n.getString(_TL_('Moderately dissatisfied')),\r\n rating: 0.4,\r\n },\r\n {\r\n key: '1',\r\n text: i18n.getString(_TL_('Very dissatisfied')),\r\n rating: 0.2,\r\n },\r\n ],\r\n },\r\n email: {\r\n Type: EmailConfigurator,\r\n key: 'email',\r\n page: 1,\r\n position: 2,\r\n getTitle: () => i18n.getString(_TL_('Can we follow up with you about your responses?')),\r\n isVisible: answers => ['3', '2', '1'].includes(answers.rating.selectedOption),\r\n options: [\r\n {\r\n key: 'yes',\r\n text: i18n.getString(_TL_('Yes - specify the contact email below')),\r\n placeholder: i18n.getString(_TL_('Enter your email')),\r\n hasInput: true,\r\n },\r\n {\r\n key: 'no',\r\n text: i18n.getString(_TL_('No')),\r\n },\r\n ],\r\n },\r\n questions: [\r\n {\r\n isRequired: true,\r\n Type: MultipleSelectionConfigurator,\r\n key: 'q1',\r\n page: 1,\r\n position: 0,\r\n getTitle: () => i18n.getString(_TL_('Would you tell us more about why you are not so satisfied with the AI-generated image feature?')),\r\n isVisible: answers => ['3', '2', '1'].includes(answers.rating.selectedOption),\r\n options: [\r\n {\r\n key: 'q1o1',\r\n text: i18n.getString(_TL_('Generated images are not attractive enough')),\r\n },\r\n {\r\n key: 'q1o2',\r\n text: i18n.getString(_TL_('Generated images contain sensitive information')),\r\n },\r\n {\r\n key: 'q1o3',\r\n text: i18n.getString(_TL_('Generated images are not relevant to my business')),\r\n },\r\n {\r\n key: 'q1o4',\r\n text: i18n.getString(_TL_('I have a hard time describing the images I want')),\r\n },\r\n {\r\n key: 'q1o5',\r\n text: i18n.getString(_TL_('Others - please specify')),\r\n placeholder: i18n.getString(_TL_('Please feel free to elaborate')),\r\n hasInput: true,\r\n maxLength: 1024,\r\n },\r\n ],\r\n data: {\r\n },\r\n },\r\n {\r\n isRequired: false,\r\n Type: CommentConfigurator,\r\n key: 'q2',\r\n page: 1,\r\n position: 1,\r\n getTitle: () => i18n.getString(_TL_('How can we continue to improve?')),\r\n isVisible: answers => ['3', '2', '1'].includes(answers.rating.selectedOption),\r\n maxLength: 1024,\r\n data: {\r\n },\r\n },\r\n ],\r\n };\r\n};\r\n","import React from 'react';\r\nimport {\r\n SurveyFactory,\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\nimport { AssetLibraryAIGCMVPSurveyConfig } from './factory-view';\r\n\r\nexport const AssetLibraryAIGCMVPSurveyView = props => (\r\n \r\n);\r\n","import { BaseSurvey } from '../base-survey';\r\nimport { AssetLibraryAIGCMVPSurveyView } from './view';\r\nimport { validateAssetLibraryTriggerCondition } from '../utils';\r\n\r\nexport class AssetLibraryAIGCMVPSurvey extends BaseSurvey {\r\n getSurveyName = () => 'AssetLibraryAIGCMVPSurvey';\r\n\r\n getSurveyId = isTestEnv => (isTestEnv ? '63819467-5b7d-4902-bc32-e52b8f70fd3b' : '86295b65-c73d-4c79-962c-571635031414');\r\n\r\n validateTriggerCondition = () => validateAssetLibraryTriggerCondition(this, 'AssetLibraryAIGCMVPSurveyTrigger');\r\n\r\n onSurveySubmit() {\r\n window.survey.AssetLibraryAIGCMVPSurveyTrigger = false;\r\n\r\n super.onSurveySubmit();\r\n }\r\n\r\n onSurveyDismiss() {\r\n window.survey.AssetLibraryAIGCMVPSurveyTrigger = false;\r\n\r\n super.onSurveyDismiss();\r\n }\r\n\r\n getSurveyComponent = () => AssetLibraryAIGCMVPSurveyView;\r\n}\r\n","import {\r\n RatingConfigurator,\r\n CommentConfigurator,\r\n MultipleSelectionConfigurator\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\n\r\nexport const reportingWebuiUserSurveyConfig = (options) => {\r\n const {\r\n i18n,\r\n } = options;\r\n return {\r\n featureArea: 'ReportingWebuiUserSurvey',\r\n style: {\r\n root: {\r\n maxWidth: 480,\r\n },\r\n },\r\n others: {\r\n combineTextInputToComment: true,\r\n },\r\n questions: [\r\n {\r\n isRequired: true,\r\n Type: RatingConfigurator,\r\n key: 'q1',\r\n page: 0,\r\n position: 0,\r\n getTitle: () => i18n.getString(_TL_('How satisfied are you with the reporting features in Microsoft Advertising?')),\r\n isVisible: () => true,\r\n options: [\r\n {\r\n key: '5',\r\n text: i18n.getString(_TL_('Very satisfied')),\r\n rating: 1.0,\r\n },\r\n {\r\n key: '4',\r\n text: i18n.getString(_TL_('Moderately satisfied')),\r\n rating: 0.8,\r\n },\r\n {\r\n key: '3',\r\n text: i18n.getString(_TL_('Neutral')),\r\n rating: 0.6,\r\n },\r\n {\r\n key: '2',\r\n text: i18n.getString(_TL_('Moderately dissatisfied')),\r\n rating: 0.4,\r\n },\r\n {\r\n key: '1',\r\n text: i18n.getString(_TL_('Very dissatisfied')),\r\n rating: 0.2,\r\n },\r\n ],\r\n },\r\n {\r\n isRequired: false,\r\n Type: CommentConfigurator,\r\n key: 'q2',\r\n page: 0,\r\n position: 1,\r\n getTitle: () => i18n.getString(_TL_('Please elaborate on your experience:')),\r\n isVisible: answers => ['3', '2', '1'].includes(answers.q1.selectedOption),\r\n maxLength: 2000,\r\n data: {\r\n },\r\n },\r\n {\r\n isRequired: false,\r\n Type: MultipleSelectionConfigurator,\r\n key: 'q3',\r\n page: 1,\r\n position: 0,\r\n getTitle: () => i18n.getString(_TL_('Which features do you primarily use to track your campaign performance?')),\r\n isVisible: true,\r\n options: [\r\n {\r\n key: '8',\r\n text: i18n.getString(_TL_('Overview page')),\r\n },\r\n {\r\n key: '7',\r\n text: i18n.getString(_TL_('Performance grids (e.g., campaign grid, ad group grid, etc.)')),\r\n },\r\n {\r\n key: '6',\r\n text: i18n.getString(_TL_('Reports from the Reporting tab ')),\r\n },\r\n ],\r\n },\r\n {\r\n Type: CommentConfigurator,\r\n isRequired: false,\r\n key: 'q4',\r\n page: 1,\r\n position: 1,\r\n getTitle: () => i18n.getString(_TL_('What additional features or enhancements would you like to see in Microsoft Advertising reporting? Please elaborate below.')),\r\n maxLength: 2000,\r\n data: {\r\n },\r\n },\r\n ],\r\n };\r\n};\r\n","import React from 'react';\r\nimport { SurveyFactory } from '@bingads-webui-campaign-react/survey-factory-tools';\r\nimport { reportingWebuiUserSurveyConfig } from './factory-view';\r\n\r\nexport const ReportingWebuiUserSurveyView = props => (\r\n \r\n);\r\n\r\n","import _, { result } from 'underscore';\r\nimport { BaseSurvey } from '../base-survey';\r\nimport { ReportingWebuiUserSurveyView } from './view';\r\n\r\nconst reportingLastTimeVisited = 'ReportingLastTimeVisited';\r\n\r\nexport class ReportingWebuiUserSurvey extends BaseSurvey {\r\n getSurveyName = () => 'ReportingSurvey';\r\n\r\n getSurveyId = isTestEnv => isTestEnv ? // eslint-disable-line no-confusing-arrow\r\n '5db23eb6-b692-46fa-b86e-96547e020e4d' : '08144017-cf15-45b3-be82-36a6842144ae';\r\n\r\n getSurveyProduct = () => 'Reporting';\r\n\r\n getSurveyInterface = () => 'Web';\r\n\r\n getInitializationConfig = () => ({\r\n initGroup: 100,\r\n initStartDate: '2024-07-15',\r\n initEndDate: '2025-07-15',\r\n });\r\n\r\n validateTriggerCondition = () => {\r\n const reportingLastTimeVisitedObj = this.SurveyPreferenceService.getAtUserLevel(reportingLastTimeVisited);\r\n const lastTimeVisited = _.get(reportingLastTimeVisitedObj, 'Data');\r\n\r\n if (_.isUndefined(lastTimeVisited)) {\r\n return false;\r\n }\r\n\r\n // Check to see if the user has visited reporting in the last 30 days\r\n if ((Date.now() - lastTimeVisited) > (30 * 24 * 60 * 60 * 1000)) {\r\n return false;\r\n }\r\n\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, Start`);\r\n\r\n // should not be AAD users, AAD users can be included in the future after OCPS integration\r\n const isNonAADUser = !result(this.serverContext, 'IsAADUser');\r\n\r\n if (!isNonAADUser) {\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, isNonAADUser: ${isNonAADUser}`);\r\n return false;\r\n }\r\n\r\n // should be active user more than 30 days\r\n const userCreatedDateTime = new Date(result(this.serverContext, ['CurrentUser', 'CreatedDateTime']));\r\n const surveyPreference30DaysAgo = this.SurveyPreferenceService.getDaysAgo(30);\r\n const isUserActiveOneMonth = userCreatedDateTime <= surveyPreference30DaysAgo;\r\n\r\n if (!this.isTestEnv && !isUserActiveOneMonth) {\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, isTestEnv: ${this.isTestEnv}, isUserActiveOneMonth: ${isUserActiveOneMonth}, userCreatedDateTime: ${userCreatedDateTime}, surveyPreference30DaysAgo: ${surveyPreference30DaysAgo}`);\r\n return false;\r\n }\r\n const surveyHasCooledDown = this.validateUserGovernance();\r\n\r\n if (!surveyHasCooledDown) {\r\n return false;\r\n }\r\n\r\n // conditions copied from Qualtrics\r\n const isEnglishUser = result(this.serverContext, ['CurrentUser', 'Language']) === 'EN';\r\n const isNotInternalUser = result(this.serverContext, ['CurrentUser', 'IsInternal']) !== true;\r\n const isNotSupportUser = !result(this.serverContext, ['CurrentUser', 'Name']).includes('@microsoftsupport.com');\r\n const isNotE2EMode = !window.navigator.webdriver;\r\n const isProdUrl = window.location.href.toLocaleLowerCase().includes('https://ui.ads.microsoft.com/');\r\n const isReportingUrl = window.location.href.includes('campaign/vnext/reports-v4');\r\n const isWebUICSATSurveyEnabled = window.location.href.includes('isWebUICSATSurveyEnabled=true');\r\n\r\n const qualtricsConditions =\r\n (this.isTestEnv && isReportingUrl && isWebUICSATSurveyEnabled) || // should be test env\r\n (isEnglishUser && // should be English user\r\n isNotInternalUser && // not internal users\r\n isNotSupportUser && // not support team users\r\n isNotE2EMode && // not test mode\r\n isProdUrl && // should be Prod URL\r\n isReportingUrl // should be Reporitng URL\r\n );\r\n\r\n if (!qualtricsConditions) {\r\n if (!isEnglishUser) {\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, qualtricsConditions: ${qualtricsConditions}, isEnglishUser: ${isEnglishUser}`);\r\n return false;\r\n }\r\n\r\n if (!isNotInternalUser) {\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, qualtricsConditions: ${qualtricsConditions}, isNotInternalUser: ${isNotInternalUser}`);\r\n return false;\r\n }\r\n\r\n if (!isNotSupportUser) {\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, qualtricsConditions: ${qualtricsConditions}, isNotSupportUser: ${isNotSupportUser}`);\r\n return false;\r\n }\r\n\r\n if (!isNotE2EMode) {\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, qualtricsConditions: ${qualtricsConditions}, isNotE2EMode: ${isNotE2EMode}`);\r\n return false;\r\n }\r\n\r\n if (!isProdUrl) {\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, qualtricsConditions: ${qualtricsConditions}, isProdUrl: ${isProdUrl}`);\r\n return false;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, Pass. userCreatedDateTime: ${userCreatedDateTime}, surveyPreference30DaysAgo: ${surveyPreference30DaysAgo}`);\r\n\r\n return true;\r\n };\r\n\r\n getSurveyComponent = () => ReportingWebuiUserSurveyView;\r\n\r\n isReportingPipelineEnabled = () => true;\r\n}\r\n","import React from 'react';\r\nimport {\r\n RatingConfigurator,\r\n MultipleSelectionConfigurator,\r\n CommentConfigurator,\r\n EmailConfigurator,\r\n SurveyFactory,\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\n\r\nexport const RSALLMSuggestionOverallSurveyConfig = (options) => {\r\n const {\r\n i18n,\r\n } = options;\r\n\r\n return {\r\n featureArea: 'RecommendationRSALLMOverallSurvey',\r\n style: {\r\n root: {\r\n maxWidth: 500,\r\n },\r\n },\r\n others: {\r\n shouldHideInputWhenNotSelected: true,\r\n userActionAnalysisEnabled: true,\r\n combineTextInputToComment: true,\r\n isUserInitiatedSurvey: true,\r\n },\r\n rating: {\r\n isRequired: true,\r\n Type: RatingConfigurator,\r\n key: 'rating',\r\n page: 0,\r\n position: 0,\r\n getTitle: () => i18n.getString(_TL_('How satisfied are you with the recommended headlines and descriptions for your responsive search ads?')),\r\n isVisible: () => true,\r\n options: [\r\n {\r\n key: '5',\r\n text: i18n.getString(_TL_('Very satisfied')),\r\n rating: 1.0,\r\n },\r\n {\r\n key: '4',\r\n text: i18n.getString(_TL_('Moderately satisfied')),\r\n rating: 0.8,\r\n },\r\n {\r\n key: '3',\r\n text: i18n.getString(_TL_('Neutral')),\r\n rating: 0.6,\r\n },\r\n {\r\n key: '2',\r\n text: i18n.getString(_TL_('Moderately dissatisfied ')),\r\n rating: 0.4,\r\n },\r\n {\r\n key: '1',\r\n text: i18n.getString(_TL_('Very dissatisfied')),\r\n rating: 0.2,\r\n },\r\n ],\r\n },\r\n email: {\r\n Type: EmailConfigurator,\r\n key: 'email',\r\n page: 1,\r\n position: 2,\r\n getTitle: () => i18n.getString(_TL_('Can we follow up with you?')),\r\n isVisible: answers => ['3', '2', '1'].includes(answers.rating.selectedOption),\r\n options: [\r\n {\r\n key: 'yes',\r\n text: i18n.getString(_TL_('Yes')),\r\n placeholder: i18n.getString(_TL_('Email address')),\r\n hasInput: true,\r\n },\r\n {\r\n key: 'no',\r\n text: i18n.getString(_TL_('No')),\r\n },\r\n ],\r\n },\r\n questions: [\r\n {\r\n isRequired: true,\r\n Type: MultipleSelectionConfigurator,\r\n key: 'q1',\r\n page: 1,\r\n position: 0,\r\n getTitle: () => i18n.getString(_TL_('Please tell us more about why you\\'re dissatisfied with recommendations. Select all that apply.')),\r\n isVisible: answers => ['3', '2', '1'].includes(answers.rating.selectedOption),\r\n options: [\r\n {\r\n key: 'q1o1',\r\n text: i18n.getString(_TL_('The recommendations are not relevant.')),\r\n },\r\n {\r\n key: 'q1o2',\r\n text: i18n.getString(_TL_('The information isn\\'t accurate or up to date.')),\r\n },\r\n {\r\n key: 'q1o3',\r\n text: i18n.getString(_TL_('I\\'ll need permission from my business or company to use recommended assets.')),\r\n },\r\n {\r\n key: 'q1o4',\r\n text: i18n.getString(_TL_('Others (please elaborate below)')),\r\n placeholder: i18n.getString(_TL_('Please feel free to elaborate')),\r\n hasInput: true,\r\n maxLength: 2000,\r\n },\r\n ],\r\n data: {\r\n },\r\n },\r\n {\r\n Type: CommentConfigurator,\r\n key: 'q2',\r\n page: 1,\r\n position: 1,\r\n getTitle: () => i18n.getString(_TL_('How can we continue to improve?')),\r\n isVisible: answers => ['3', '2', '1'].includes(answers.rating.selectedOption),\r\n maxLength: 2000,\r\n placeholder: i18n.getString(_TL_('Please don\\'t include any confidential or personal information in your response.')),\r\n data: {\r\n },\r\n },\r\n ],\r\n };\r\n};\r\n\r\nexport const FactorySurveyView = props => (\r\n );\r\n","import _ from 'underscore';\r\nimport { BaseSurvey } from '../base-survey';\r\nimport { surveyStatus } from '../survey-status';\r\nimport { FactorySurveyView } from './factory-view';\r\nimport { validateRSALLMTriggerCondition } from '../utils';\r\n\r\nexport class RSALLMSuggestionOverallSurvey extends BaseSurvey {\r\n getSurveyName = () => 'RSALLMSuggestionOverallSurvey';\r\n\r\n getSurveyId = isTestEnv => isTestEnv ? // eslint-disable-line no-confusing-arrow\r\n '6dda6be5-98c4-4508-86c4-6d052e996b74' : 'fa173476-ceb8-4097-8eb7-1b0663c3fdc6';\r\n\r\n getInitializationConfig = () => ({\r\n initGroup: 1,\r\n initStartDate: '2023-02-20',\r\n initEndDate: '2023-05-31',\r\n });\r\n\r\n validateTriggerCondition = () => validateRSALLMTriggerCondition(this);\r\n\r\n getCallCountOfRSASuggestionAPI = () => {\r\n const surveyState = this.SurveyPreferenceService.getSurveyState({\r\n surveyName: this.getSurveyName(),\r\n });\r\n if (!_.isEmpty(surveyState)) {\r\n const { callCountOfRSASuggestionAPI } = surveyState;\r\n return !_.isUndefined(callCountOfRSASuggestionAPI) ? callCountOfRSASuggestionAPI : 0;\r\n }\r\n return 0;\r\n };\r\n\r\n onSurveySubmit = () => {\r\n const newSurveyState = {\r\n status: surveyStatus.SUBMIT,\r\n nextShownDate: this.SurveyPreferenceService.getDaysAfter(90),\r\n callCountOfRSASuggestionAPI: 0,\r\n };\r\n this.SurveyPreferenceService.setSurveyState({\r\n surveyName: this.getSurveyName(),\r\n surveyState: newSurveyState,\r\n });\r\n };\r\n\r\n /*\r\n * Callback called when dismissing a survey, update the survey trigger condition / user governance\r\n */\r\n onSurveyDismiss = () => {\r\n const surveyState = this.SurveyPreferenceService.getSurveyState({\r\n surveyName: this.getSurveyName(),\r\n });\r\n\r\n let newSurveyState = {};\r\n if (!_.isEmpty(surveyState)) {\r\n const { status } = surveyState;\r\n switch (status) {\r\n case surveyStatus.FIRST_DISMISS:\r\n // set new state to second-dismiss and next shown date to 14 days\r\n newSurveyState = {\r\n status: surveyStatus.SECOND_DISMISS,\r\n nextShownDate: this.SurveyPreferenceService.getDaysAfter(14),\r\n };\r\n break;\r\n case surveyStatus.SECOND_DISMISS:\r\n // set new state to third-dismiss and next shown date to 30 days\r\n newSurveyState = {\r\n status: surveyStatus.THIRD_DISMISS,\r\n nextShownDate: this.SurveyPreferenceService.getDaysAfter(30),\r\n };\r\n break;\r\n case surveyStatus.THIRD_DISMISS:\r\n // set new state to fourth-dismiss and next shown date to 180 days\r\n newSurveyState = {\r\n status: surveyStatus.FOURTH_DISMISS,\r\n nextShownDate: this.SurveyPreferenceService.getDaysAfter(180),\r\n };\r\n break;\r\n case surveyStatus.FOURTH_DISMISS:\r\n // set new state to fourth-dismiss and next shown date to 180 days\r\n newSurveyState = {\r\n status: surveyStatus.FOURTH_DISMISS,\r\n nextShownDate: this.SurveyPreferenceService.getDaysAfter(180),\r\n };\r\n break;\r\n case surveyStatus.INIT:\r\n case surveyStatus.SUBMIT:\r\n default:\r\n // new cycle, set new state to first-dismiss and next shown date to 7 days\r\n newSurveyState = {\r\n status: surveyStatus.FIRST_DISMISS,\r\n nextShownDate: this.SurveyPreferenceService.getDaysAfter(7),\r\n };\r\n break;\r\n }\r\n } else {\r\n // new cycle, set new state to first-dismiss and next shown date to 7 days\r\n newSurveyState = {\r\n status: surveyStatus.FIRST_DISMISS,\r\n nextShownDate: this.SurveyPreferenceService.getDaysAfter(7),\r\n };\r\n }\r\n\r\n this.SurveyPreferenceService.setSurveyState({\r\n surveyName: this.getSurveyName(),\r\n surveyState: _.defaults(newSurveyState, { callCountOfRSASuggestionAPI: 0 }),\r\n });\r\n };\r\n\r\n getSurveyComponent = () => FactorySurveyView;\r\n\r\n getSurveyCustomParams = () => window.survey.RSALLMSuggestionCustomParams;\r\n}\r\n","import React from 'react';\r\nimport {\r\n SingleSelectionConfigurator,\r\n SurveyFactory,\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\n\r\nexport const RSALLMSuggestionMostWantedSurveyConfig = (options) => {\r\n const {\r\n i18n,\r\n } = options;\r\n\r\n return {\r\n featureArea: 'RecommendationRSALLMMostWantedSurvey',\r\n style: {\r\n root: {\r\n maxWidth: 500,\r\n },\r\n },\r\n others: {\r\n shouldHideInputWhenNotSelected: true,\r\n userActionAnalysisEnabled: true,\r\n combineTextInputToComment: true,\r\n isUserInitiatedSurvey: true,\r\n },\r\n questions: [\r\n {\r\n isRequired: true,\r\n Type: SingleSelectionConfigurator,\r\n key: 'q1',\r\n page: 0,\r\n position: 0,\r\n getTitle: () => i18n.getString(_TL_('We\\'ll prioritize the features of recommending assets for responsive search ads. Please tell us about the features you\\'d like us to include.')),\r\n isVisible: true,\r\n options: [\r\n {\r\n key: 'q1o1',\r\n text: i18n.getString(_TL_('I want to customize headlines or descriptions recommendations.')),\r\n },\r\n {\r\n key: 'q1o2',\r\n text: i18n.getString(_TL_('I want to create responsive search ads in bulk.')),\r\n },\r\n {\r\n key: 'q1o3',\r\n text: i18n.getString(_TL_('I want to customize the recommended asset language.')),\r\n },\r\n {\r\n key: 'q1o4',\r\n text: i18n.getString(_TL_('Other (please elaborate below)')),\r\n placeholder: i18n.getString(_TL_('Please feel free to elaborate')),\r\n hasInput: true,\r\n maxLength: 2000,\r\n },\r\n ],\r\n data: {\r\n },\r\n },\r\n ],\r\n };\r\n};\r\n\r\nexport const FactorySurveyView = props => (\r\n );\r\n","import _ from 'underscore';\r\nimport { BaseSurvey } from '../base-survey';\r\nimport { surveyStatus } from '../survey-status';\r\nimport { FactorySurveyView } from './factory-view';\r\nimport { validateRSALLMTriggerCondition } from '../utils';\r\n\r\nexport class RSALLMSuggestionMostWantedSurvey extends BaseSurvey {\r\n getSurveyName = () => 'RSALLMSuggestionMostWantedSurvey';\r\n\r\n getSurveyId = isTestEnv => isTestEnv ? // eslint-disable-line no-confusing-arrow\r\n 'd68eb6ff-553d-4416-8463-d81dd1006b42' : 'b13b0f87-d533-4915-a6b2-5301c31d0fb1';\r\n\r\n getInitializationConfig = () => ({\r\n initGroup: 1,\r\n initStartDate: '2023-02-20',\r\n initEndDate: '2023-05-31',\r\n });\r\n\r\n validateTriggerCondition = () => validateRSALLMTriggerCondition(this);\r\n\r\n onSurveySubmit = () => {\r\n const newSurveyState = {\r\n status: surveyStatus.SUBMIT,\r\n nextShownDate: this.SurveyPreferenceService.getDaysAfter(90),\r\n allCountOfRSASuggestionAPI: 0,\r\n };\r\n this.SurveyPreferenceService.setSurveyState({\r\n surveyName: this.getSurveyName(),\r\n surveyState: newSurveyState,\r\n });\r\n };\r\n\r\n getCallCountOfRSASuggestionAPI = () => {\r\n const surveyState = this.SurveyPreferenceService.getSurveyState({\r\n surveyName: this.getSurveyName(),\r\n });\r\n if (!_.isEmpty(surveyState)) {\r\n const { callCountOfRSASuggestionAPI } = surveyState;\r\n return !_.isUndefined(callCountOfRSASuggestionAPI) ? callCountOfRSASuggestionAPI : 0;\r\n }\r\n return 0;\r\n };\r\n\r\n /*\r\n * Callback called when dismissing a survey, update the survey trigger condition / user governance\r\n */\r\n onSurveyDismiss = () => {\r\n const surveyState = this.SurveyPreferenceService.getSurveyState({\r\n surveyName: this.getSurveyName(),\r\n });\r\n\r\n let newSurveyState = {};\r\n if (!_.isEmpty(surveyState)) {\r\n const { status } = surveyState;\r\n switch (status) {\r\n case surveyStatus.FIRST_DISMISS:\r\n // set new state to second-dismiss and next shown date to 14 days\r\n newSurveyState = {\r\n status: surveyStatus.SECOND_DISMISS,\r\n nextShownDate: this.SurveyPreferenceService.getDaysAfter(14),\r\n };\r\n break;\r\n case surveyStatus.SECOND_DISMISS:\r\n // set new state to third-dismiss and next shown date to 30 days\r\n newSurveyState = {\r\n status: surveyStatus.THIRD_DISMISS,\r\n nextShownDate: this.SurveyPreferenceService.getDaysAfter(30),\r\n };\r\n break;\r\n case surveyStatus.THIRD_DISMISS:\r\n // set new state to fourth-dismiss and next shown date to 180 days\r\n newSurveyState = {\r\n status: surveyStatus.FOURTH_DISMISS,\r\n nextShownDate: this.SurveyPreferenceService.getDaysAfter(180),\r\n };\r\n break;\r\n case surveyStatus.FOURTH_DISMISS:\r\n // set new state to fourth-dismiss and next shown date to 180 days\r\n newSurveyState = {\r\n status: surveyStatus.FOURTH_DISMISS,\r\n nextShownDate: this.SurveyPreferenceService.getDaysAfter(180),\r\n };\r\n break;\r\n case surveyStatus.INIT:\r\n case surveyStatus.SUBMIT:\r\n default:\r\n // new cycle, set new state to first-dismiss and next shown date to 7 days\r\n newSurveyState = {\r\n status: surveyStatus.FIRST_DISMISS,\r\n nextShownDate: this.SurveyPreferenceService.getDaysAfter(7),\r\n };\r\n break;\r\n }\r\n } else {\r\n // new cycle, set new state to first-dismiss and next shown date to 7 days\r\n newSurveyState = {\r\n status: surveyStatus.FIRST_DISMISS,\r\n nextShownDate: this.SurveyPreferenceService.getDaysAfter(7),\r\n };\r\n }\r\n\r\n this.SurveyPreferenceService.setSurveyState({\r\n surveyName: this.getSurveyName(),\r\n surveyState: _.defaults(newSurveyState, { callCountOfRSASuggestionAPI: 0 }),\r\n });\r\n };\r\n\r\n getSurveyComponent = () => FactorySurveyView;\r\n\r\n getSurveyCustomParams = () => window.survey.RSALLMSuggestionCustomParams;\r\n}\r\n\r\n","import {\r\n RatingConfigurator,\r\n CommentConfigurator,\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\n\r\nexport const CampaignOnboardingSurveyConfig = (options) => {\r\n const { i18n } = options;\r\n\r\n return {\r\n featureArea: 'CampaignOnboardingSurvey',\r\n style: {\r\n root: {\r\n maxWidth: 600,\r\n },\r\n },\r\n others: {\r\n isGlobalModalStyleEnabled: true,\r\n isThankYouPageEnabled: false,\r\n isUserInitiatedSurvey: true,\r\n isInPageMiddle: true,\r\n isModeless: false,\r\n isBlocking: true,\r\n },\r\n rating: {\r\n isRequired: true,\r\n Type: RatingConfigurator,\r\n key: 'rating',\r\n page: 0,\r\n position: 0,\r\n getTitle: () =>\r\n // option to text\r\n i18n.getString(_TL_('Why don\\'t you want to use the new campaign creation experience?')),\r\n isVisible: () => true,\r\n options: [\r\n {\r\n key: '1',\r\n text: i18n.getString(_TL_('I can\\'t find what I need.')),\r\n rating: 0.3,\r\n },\r\n {\r\n key: '2',\r\n text: i18n.getString(_TL_('I want more time to adapt to the new layout.')),\r\n rating: 0.6,\r\n },\r\n {\r\n key: '3',\r\n text: i18n.getString(_TL_('Other')),\r\n rating: 1.0,\r\n },\r\n ],\r\n data: {\r\n },\r\n },\r\n questions: [\r\n {\r\n isRequired: true,\r\n Type: CommentConfigurator,\r\n key: 'q1',\r\n page: 0,\r\n position: 1,\r\n getTitle: () => i18n.getString(_TL_('Tell us more')),\r\n isVisible: true,\r\n maxLength: 1024,\r\n data: {\r\n },\r\n },\r\n ],\r\n };\r\n};\r\n","import React from 'react';\r\nimport { SurveyFactory } from '@bingads-webui-campaign-react/survey-factory-tools';\r\nimport { CampaignOnboardingSurveyConfig } from './factory-view';\r\n\r\nexport const CampaignOnboardingSurveyView = props => (\r\n \r\n);\r\n","import { result } from 'underscore';\r\nimport { isNewOnboardingVisibleStore, ONBOARDING_PREFERENCE } from '@bingads-webui-campaign-react/onboarding-toggle';\r\nimport { BaseSurvey } from '../base-survey';\r\nimport { CampaignOnboardingSurveyView } from './view';\r\n\r\nexport class CampaignOnboardingSurvey extends BaseSurvey {\r\n getSurveyName = () => 'CampaignOnboardingSurvey';\r\n\r\n getSurveyId = isTestEnv => (isTestEnv ? '5a4a0bae-22f4-446e-bf18-4045ecabf835' : '23e8efd4-39cf-4a81-a261-cd90db48e714');\r\n\r\n validateTriggerCondition = () => result(window, ['survey', 'switchBackToOldCampaignOnboarding']);\r\n\r\n onSurveySubmit = () => {\r\n window.survey.onSwitchBackToOldSurveySubmit = true;\r\n\r\n this.SurveyPreferenceService.PreferenceService.setAtUserLevel({\r\n Name: ONBOARDING_PREFERENCE,\r\n Data: false,\r\n });\r\n\r\n isNewOnboardingVisibleStore.setState({\r\n isNewOnboardingVisible: false,\r\n });\r\n\r\n window.survey.switchBackToOldCampaignOnboarding = false;\r\n };\r\n\r\n onSurveyDismiss = () => {\r\n window.survey.onSwitchBackToOldSurveyDismiss = true;\r\n window.survey.switchBackToOldCampaignOnboarding = false;\r\n };\r\n\r\n getSurveyComponent = () => CampaignOnboardingSurveyView;\r\n}\r\n","import {\r\n SingleSelectionConfigurator,\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\n\r\nexport const TransparentImageAnnotationSurveyConfig = (options) => {\r\n const { i18n } = options;\r\n\r\n return {\r\n featureArea: 'TransparentImageAnnotationSurvey',\r\n style: {\r\n root: {\r\n minWidth: 600,\r\n maxWidth: 600,\r\n },\r\n },\r\n others: {\r\n isUserInitiatedSurvey: true,\r\n },\r\n questions: [\r\n {\r\n isRequired: true,\r\n Type: SingleSelectionConfigurator,\r\n key: 'q1',\r\n page: 0,\r\n position: 0,\r\n getTitle: () => i18n.getString(_TL_('Why do you want to delete the image?')),\r\n isVisible: () => true,\r\n options: [\r\n {\r\n key: 'q1o1',\r\n text: i18n.getString(_TL_('The image isn\\'t relevant to my ad.')),\r\n },\r\n {\r\n key: 'q1o2',\r\n text: i18n.getString(_TL_('The image contains sensitive or inappropriate content.')),\r\n },\r\n {\r\n key: 'q1o3',\r\n text: i18n.getString(_TL_('The image is not specific to my brand.')),\r\n },\r\n {\r\n key: 'q1o4',\r\n text: i18n.getString(_TL_('The image is low quality.')),\r\n },\r\n {\r\n key: 'q1o5',\r\n text: i18n.getString(_TL_('I don\\'t want to add images to my ad.')),\r\n },\r\n {\r\n key: 'q1o6',\r\n hasInput: true,\r\n text: i18n.getString(_TL_('Other (please elaborate below).')),\r\n },\r\n ],\r\n data: {\r\n },\r\n },\r\n ],\r\n };\r\n};\r\n","import React from 'react';\r\nimport {\r\n SurveyFactory,\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\nimport { TransparentImageAnnotationSurveyConfig } from './factory-view';\r\n\r\nexport const TransparentImageAnnotationSurveyView = props => (\r\n \r\n);\r\n","import _ from 'underscore';\r\nimport { BaseSurvey } from '../base-survey';\r\nimport { TransparentImageAnnotationSurveyView } from './view';\r\n\r\nconst surveyTriggerName = 'TransparentImageAnnotationSurveyTrigger';\r\nconst surveyCustomParamsName = 'TransparentImageAnnotationCustomParams';\r\n\r\nexport class TransparentImageAnnotationSurvey extends BaseSurvey {\r\n getSurveyName = () => 'TransparentImageAnnotationSurvey';\r\n\r\n getSurveyId = isTestEnv => (isTestEnv ? 'eedaadb1-f55b-40c7-af92-0fddb9ab6ebf' : '4a17eef2-85be-49b9-8be6-b6f87916a9c0');\r\n\r\n validateTriggerCondition = () => {\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, Start`);\r\n\r\n const isPilotEnabled = _.result(this.serverContext, ['Permissions', 'IsTransparentImageAnnotationEnabled']);\r\n\r\n if (!isPilotEnabled) {\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, isPilotEnabled: ${isPilotEnabled}`);\r\n return false;\r\n }\r\n\r\n const isSurveyTriggerValid = _.result(window, ['survey', surveyTriggerName]);\r\n\r\n if (!isSurveyTriggerValid) {\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, isSurveyTriggerValid: ${isSurveyTriggerValid}`);\r\n return false;\r\n }\r\n\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, Pass`);\r\n return true;\r\n };\r\n\r\n onSurveySubmit() {\r\n delete window.survey[surveyTriggerName];\r\n delete window.survey[surveyCustomParamsName];\r\n }\r\n\r\n onSurveyDismiss() {\r\n delete window.survey[surveyTriggerName];\r\n delete window.survey[surveyCustomParamsName];\r\n }\r\n\r\n getSurveyComponent = () => TransparentImageAnnotationSurveyView;\r\n\r\n getSurveyCustomParams = () => window.survey[surveyCustomParamsName];\r\n}\r\n","import {\r\n RatingConfigurator,\r\n EmailConfigurator,\r\n CommentConfigurator,\r\n SingleSelectionConfigurator,\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\n\r\nexport const BudgetCenterOverallSatisfactionSurveyConfig = (options) => {\r\n const { i18n } = options;\r\n\r\n return {\r\n featureArea: 'BudgetCenterOverallSatisfactionSurvey',\r\n style: {\r\n root: {\r\n minWidth: 600,\r\n maxWidth: 600,\r\n },\r\n },\r\n others: {\r\n shouldHideInputWhenNotSelected: true,\r\n },\r\n rating: {\r\n isRequired: true,\r\n Type: RatingConfigurator,\r\n key: 'rating',\r\n page: 0,\r\n position: 0,\r\n getTitle: () => i18n.getString(_TL_('How satisfied are you with Budget Center overall?')),\r\n isVisible: () => true,\r\n options: [\r\n {\r\n key: '5',\r\n text: i18n.getString(_TL_('Very satisfied')),\r\n rating: 1.0,\r\n },\r\n {\r\n key: '4',\r\n text: i18n.getString(_TL_('Moderately satisfied')),\r\n rating: 0.8,\r\n },\r\n {\r\n key: '3',\r\n text: i18n.getString(_TL_('Neutral')),\r\n rating: 0.6,\r\n },\r\n {\r\n key: '2',\r\n text: i18n.getString(_TL_('Moderately dissatisfied')),\r\n rating: 0.4,\r\n },\r\n {\r\n key: '1',\r\n text: i18n.getString(_TL_('Very dissatisfied')),\r\n rating: 0.2,\r\n },\r\n ],\r\n },\r\n questions: [\r\n {\r\n isRequired: true,\r\n Type: SingleSelectionConfigurator,\r\n key: 'q1',\r\n page: 1,\r\n position: 0,\r\n getTitle: () => i18n.getString(_TL_('What feature or aspect of Budget Center do you find the most valuable?')),\r\n isVisible: () => true,\r\n options: [\r\n {\r\n key: 'q1o1',\r\n text: i18n.getString(_TL_('Budget settings')),\r\n },\r\n {\r\n key: 'q1o2',\r\n text: i18n.getString(_TL_('Constraints and alerts')),\r\n },\r\n {\r\n key: 'q1o3',\r\n text: i18n.getString(_TL_('Budget changes and corresponding performance')),\r\n },\r\n {\r\n key: 'q1o4',\r\n text: i18n.getString(_TL_('Spending trend')),\r\n },\r\n {\r\n key: 'q1o5',\r\n text: i18n.getString(_TL_('Recommendations')),\r\n },\r\n {\r\n key: 'q1o6',\r\n text: i18n.getString(_TL_('Others - please specify')),\r\n placeholder: i18n.getString(_TL_('Please feel free to elaborate')),\r\n hasInput: true,\r\n maxLength: 1024,\r\n },\r\n ],\r\n data: {\r\n },\r\n },\r\n {\r\n isRequired: false,\r\n Type: CommentConfigurator,\r\n key: 'q2',\r\n page: 2,\r\n position: 0,\r\n getTitle: () => i18n.getString(_TL_('Do you have any suggestions for improving Budget Center?')),\r\n isVisible: () => true,\r\n maxLength: 1024,\r\n data: {\r\n },\r\n },\r\n ],\r\n email: {\r\n isRequired: true,\r\n Type: EmailConfigurator,\r\n key: 'email',\r\n page: 2,\r\n position: 1,\r\n getTitle: () => i18n.getString(_TL_('Can we follow up with you about your responses?')),\r\n isVisible: () => true,\r\n options: [\r\n {\r\n key: 'yes',\r\n text: i18n.getString(_TL_('Yes - specify the contact email below')),\r\n placeholder: i18n.getString(_TL_('Enter your email')),\r\n hasInput: true,\r\n },\r\n {\r\n key: 'no',\r\n text: i18n.getString(_TL_('No')),\r\n },\r\n ],\r\n },\r\n };\r\n};\r\n","import React from 'react';\r\nimport {\r\n SurveyFactory,\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\nimport { BudgetCenterOverallSatisfactionSurveyConfig } from './factory-view';\r\n\r\nexport const BudgetCenterOverallSatisfactionSurveyView = props => (\r\n \r\n);\r\n","import _ from 'underscore';\r\nimport { BaseSurvey } from '../base-survey';\r\nimport { BudgetCenterOverallSatisfactionSurveyView } from './view';\r\nimport { BudgetCenterUrl } from '../constants';\r\n\r\nconst userPrefName = 'BudgetCenterPageLastVisitDate';\r\n\r\nexport class BudgetCenterOverallSatisfactionSurvey extends BaseSurvey {\r\n getSurveyName = () => 'BudgetCenterOverallSatisfactionSurvey';\r\n\r\n getSurveyId = isTestEnv => (isTestEnv ? '43d24b1d-d6b8-46ed-8ec7-901c7cbd147b' : 'df7e1834-e2eb-4675-aff2-9d01d60ee2d0');\r\n\r\n validateTriggerCondition = () => {\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, Start`);\r\n const isPiloted = _.get(this.serverContext, ['DynamicPermissions', 'SpendSurveyBudgetCenterPageOverall']);\r\n const isVisitBudgetCenterPage = _.get(window, ['survey', 'VisitBudgetCenter']);\r\n const isBudgetCenterUrl = window.location.pathname.startsWith(BudgetCenterUrl);\r\n const lastVisitDateString = _.get(this.SurveyPreferenceService.PreferenceService.findByNameAtUserLevel(userPrefName), 'Data');\r\n\r\n const shouldTrigger = !!(isPiloted && isVisitBudgetCenterPage && lastVisitDateString && isBudgetCenterUrl);\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, shouldTrigger: ${shouldTrigger}, isPiloted: ${isPiloted}, isVisitBudgetCenterPage: ${isVisitBudgetCenterPage}, isBudgetCenterUrl: ${isBudgetCenterUrl}, lastVisitDateString: ${lastVisitDateString}`);\r\n\r\n window.survey.VisitBudgetCenter = false;\r\n return shouldTrigger;\r\n };\r\n\r\n getSurveyComponent = () => BudgetCenterOverallSatisfactionSurveyView;\r\n}\r\n","export const BudgetCenterUrl = '/campaign/vnext/budgetcenter';\r\n","import {\r\n EmailConfigurator,\r\n SingleSelectionConfigurator,\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\n\r\nexport const BudgetCenterOneTimeUserSurveyConfig = (options) => {\r\n const { i18n } = options;\r\n\r\n return {\r\n featureArea: 'BudgetCenterOneTimeUserSurvey',\r\n style: {\r\n root: {\r\n minWidth: 600,\r\n maxWidth: 600,\r\n },\r\n },\r\n others: {\r\n shouldHideInputWhenNotSelected: true,\r\n },\r\n questions: [\r\n {\r\n isRequired: true,\r\n Type: SingleSelectionConfigurator,\r\n key: 'q1',\r\n page: 0,\r\n position: 0,\r\n getTitle: () => i18n.getString(_TL_('Why didn’t you return to Budget Center after your first visit? Please select one.')),\r\n isVisible: () => true,\r\n options: [\r\n {\r\n key: 'q1o1',\r\n text: i18n.getString(_TL_('I didn\\'t find the information I was looking for.')),\r\n },\r\n {\r\n key: 'q1o2',\r\n text: i18n.getString(_TL_('The page was difficult to navigate.')),\r\n },\r\n {\r\n key: 'q1o3',\r\n text: i18n.getString(_TL_('The features weren’t useful.')),\r\n },\r\n {\r\n key: 'q1o4',\r\n text: i18n.getString(_TL_('I prefer to use other tools for budget and spend management.')),\r\n },\r\n {\r\n key: 'q1o5',\r\n text: i18n.getString(_TL_('Others - please specify')),\r\n placeholder: i18n.getString(_TL_('Please feel free to elaborate')),\r\n hasInput: true,\r\n maxLength: 1024,\r\n },\r\n ],\r\n data: {\r\n },\r\n },\r\n {\r\n isRequired: true,\r\n Type: SingleSelectionConfigurator,\r\n key: 'q2',\r\n page: 1,\r\n position: 0,\r\n getTitle: () => i18n.getString(_TL_('What would encourage you to use Budget Center more frequently?')),\r\n isVisible: () => true,\r\n options: [\r\n {\r\n key: 'q2o1',\r\n text: i18n.getString(_TL_('Clearer navigation and ease of use')),\r\n },\r\n {\r\n key: 'q2o2',\r\n text: i18n.getString(_TL_('More relevant and useful features, such as forecasting')),\r\n },\r\n {\r\n key: 'q2o3',\r\n text: i18n.getString(_TL_('More detailed information and instructions')),\r\n },\r\n {\r\n key: 'q2o4',\r\n text: i18n.getString(_TL_('Others - please specify')),\r\n placeholder: i18n.getString(_TL_('Please feel free to elaborate')),\r\n hasInput: true,\r\n maxLength: 1024,\r\n },\r\n ],\r\n data: {\r\n },\r\n },\r\n ],\r\n email: {\r\n isRequired: true,\r\n Type: EmailConfigurator,\r\n key: 'email',\r\n page: 1,\r\n position: 1,\r\n getTitle: () => i18n.getString(_TL_('Can we follow up with you about your responses?')),\r\n isVisible: () => true,\r\n options: [\r\n {\r\n key: 'yes',\r\n text: i18n.getString(_TL_('Yes - specify the contact email below')),\r\n placeholder: i18n.getString(_TL_('Enter your email')),\r\n hasInput: true,\r\n },\r\n {\r\n key: 'no',\r\n text: i18n.getString(_TL_('No')),\r\n },\r\n ],\r\n },\r\n };\r\n};\r\n","import React from 'react';\r\nimport {\r\n SurveyFactory,\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\nimport { BudgetCenterOneTimeUserSurveyConfig } from './factory-view';\r\n\r\nexport const BudgetCenteOneTimeUserSurveyView = props => (\r\n \r\n);\r\n","import _ from 'underscore';\r\nimport { BaseSurvey } from '../base-survey';\r\nimport { BudgetCenteOneTimeUserSurveyView } from './view';\r\n\r\nconst userPrefName = 'BudgetCenterPageLastVisitDate';\r\n\r\nexport class BudgetCenterOneTimeUserSurvey extends BaseSurvey {\r\n getSurveyName = () => 'BudgetCenterOneTimeUserSurvey';\r\n\r\n getSurveyId = isTestEnv => (isTestEnv ? '2da1d764-6e4d-4328-9e65-1790deee62b7' : '97e79400-390e-45d3-8a88-d6a1f8e04e41');\r\n\r\n validateTriggerCondition = () => {\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, Start`);\r\n const isPiloted = _.get(this.serverContext, ['DynamicPermissions', 'SpendSurveyBudgetCenterOneTimeUser'], false);\r\n const lastVisitDateString = _.get(this.SurveyPreferenceService.PreferenceService.findByNameAtUserLevel(userPrefName), 'Data');\r\n const isEvaluatorEnabled = _.get(this.serverContext, ['DynamicPermissions', 'BudgetCenterOneTimeUser'], false);\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, isPiloted: ${isPiloted}, lastVisitDateString: ${lastVisitDateString}, isEvaluatorEnabled: ${isEvaluatorEnabled}`);\r\n\r\n if (!isPiloted) {\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, shouldTrigger: false, isPiloted: ${isPiloted}`);\r\n return false;\r\n }\r\n\r\n if (!_.isEmpty(lastVisitDateString)) {\r\n const lastVisitDate = new Date(lastVisitDateString);\r\n const Days30Ago = this.SurveyPreferenceService.getDaysAgo(30);\r\n const isUserActiveOneMonth = lastVisitDate >= Days30Ago;\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, shouldTrigger: ${!isUserActiveOneMonth}, lastVisitDateString: ${lastVisitDateString}, isUserActiveOneMonth: ${isUserActiveOneMonth}`);\r\n return !isUserActiveOneMonth;\r\n }\r\n\r\n this.logActivity(`validateTriggerCondition | survey: ${this.getSurveyName()}, shouldTrigger: ${isEvaluatorEnabled}, isEvaluatorEnabled: ${isEvaluatorEnabled}`);\r\n return isEvaluatorEnabled;\r\n };\r\n\r\n getSurveyComponent = () => BudgetCenteOneTimeUserSurveyView;\r\n}\r\n","import {\r\n RatingConfigurator,\r\n MultipleSelectionConfigurator,\r\n CommentConfigurator,\r\n EmailConfigurator,\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\n\r\nexport const AdsStudioAppSurveyConfig = (options) => {\r\n const { i18n } = options;\r\n\r\n return {\r\n featureArea: 'AdsStudioAppSurvey',\r\n style: {\r\n root: {\r\n maxWidth: 600,\r\n },\r\n },\r\n others: {\r\n },\r\n rating: {\r\n isRequired: true,\r\n Type: RatingConfigurator,\r\n key: 'rating',\r\n page: 0,\r\n position: 0,\r\n getTitle: () => i18n.getString(_TL_('How satisfied are you with Microsoft Advertising\\'s Ads Studio?')),\r\n isVisible: () => true,\r\n options: [\r\n {\r\n key: '5',\r\n text: i18n.getString(_TL_('Very satisfied')),\r\n rating: 1.0,\r\n },\r\n {\r\n key: '4',\r\n text: i18n.getString(_TL_('Moderately satisfied')),\r\n rating: 0.8,\r\n },\r\n {\r\n key: '3',\r\n text: i18n.getString(_TL_('Neutral')),\r\n rating: 0.6,\r\n },\r\n {\r\n key: '2',\r\n text: i18n.getString(_TL_('Moderately dissatisfied')),\r\n rating: 0.4,\r\n },\r\n {\r\n key: '1',\r\n text: i18n.getString(_TL_('Very dissatisfied')),\r\n rating: 0.2,\r\n },\r\n ],\r\n },\r\n email: {\r\n Type: EmailConfigurator,\r\n key: 'email',\r\n page: 1,\r\n position: 2,\r\n getTitle: () => i18n.getString(_TL_('Can we follow up with you about your responses?')),\r\n isVisible: answers => ['2', '1'].includes(answers.rating.selectedOption),\r\n options: [\r\n {\r\n key: 'yes',\r\n text: i18n.getString(_TL_('Yes - specify the contact email below')),\r\n placeholder: i18n.getString(_TL_('Enter your email')),\r\n hasInput: true,\r\n },\r\n {\r\n key: 'no',\r\n text: i18n.getString(_TL_('No')),\r\n },\r\n ],\r\n },\r\n questions: [\r\n {\r\n isRequired: true,\r\n Type: MultipleSelectionConfigurator,\r\n key: 'q1',\r\n page: 0,\r\n position: 1,\r\n getTitle: () => i18n.getString(_TL_('Please tell us more about your satisfactory experience with Ads Studio. Select all that apply.')),\r\n isVisible: () => true,\r\n options: [\r\n {\r\n key: 'q1o1',\r\n text: i18n.getString(_TL_('The interface is easy to navigate.')),\r\n },\r\n {\r\n key: 'q1o2',\r\n text: i18n.getString(_TL_('The features and tools are easy to use.')),\r\n },\r\n {\r\n key: 'q1o3',\r\n text: i18n.getString(_TL_('Editing and managing assets is more efficient.')),\r\n },\r\n {\r\n key: 'q1o4',\r\n text: i18n.getString(_TL_('Searching for and filtering assets is more effective.')),\r\n },\r\n {\r\n key: 'q1o5',\r\n text: i18n.getString(_TL_('The loading speed is fast.')),\r\n },\r\n {\r\n key: 'q1o6',\r\n text: i18n.getString(_TL_('I prefer the Asset Library experience over Ads Studio.')),\r\n },\r\n {\r\n key: 'q1o7',\r\n text: i18n.getString(_TL_('Other (please elaborate below).')),\r\n },\r\n ],\r\n data: {\r\n },\r\n },\r\n {\r\n isRequired: true,\r\n Type: MultipleSelectionConfigurator,\r\n key: 'q2',\r\n page: 1,\r\n position: 0,\r\n getTitle: () => i18n.getString(_TL_('Please tell us more about why you\\'re dissatisfied with Ads Studio. Select all that apply.')),\r\n isVisible: answers => ['2', '1'].includes(answers.rating.selectedOption),\r\n options: [\r\n {\r\n key: 'q1o1',\r\n text: i18n.getString(_TL_('Uploading assets could be improved.')),\r\n },\r\n {\r\n key: 'q1o2',\r\n text: i18n.getString(_TL_('Editing assets could be improved.')),\r\n },\r\n {\r\n key: 'q1o3',\r\n text: i18n.getString(_TL_('I want more asset types.')),\r\n },\r\n {\r\n key: 'q1o4',\r\n text: i18n.getString(_TL_('The navigation and interface could be improved.')),\r\n },\r\n {\r\n key: 'q1o5',\r\n text: i18n.getString(_TL_('Searching for and filtering assets could be improved.')),\r\n },\r\n {\r\n key: 'q1o6',\r\n text: i18n.getString(_TL_('Ads Studio takes too long to load.')),\r\n },\r\n {\r\n key: 'q1o7',\r\n text: i18n.getString(_TL_('Other (please elaborate below).')),\r\n },\r\n ],\r\n data: {\r\n },\r\n },\r\n {\r\n isRequired: false,\r\n Type: CommentConfigurator,\r\n key: 'q3',\r\n page: 1,\r\n position: 1,\r\n getTitle: () => i18n.getString(_TL_('How can we continue to improve?')),\r\n isVisible: answers => ['2', '1'].includes(answers.rating.selectedOption),\r\n maxLength: 1024,\r\n data: {\r\n },\r\n },\r\n ],\r\n };\r\n};\r\n","import React from 'react';\r\nimport {\r\n SurveyFactory,\r\n} from '@bingads-webui-campaign-react/survey-factory-tools';\r\nimport { AdsStudioAppSurveyConfig } from './factory-view';\r\n\r\nexport const AdsStudioAppSurveyView = props => (\r\n \r\n);\r\n","import { BaseSurvey } from '../base-survey';\r\nimport { AdsStudioAppSurveyView } from './view';\r\nimport { validateAdsStudioTriggerCondition } from '../utils';\r\n\r\nexport class AdsStudioAppSurvey extends BaseSurvey {\r\n getSurveyName = () => 'Ad Studio Survey';\r\n\r\n getSurveyId = isTestEnv => (isTestEnv ? '97d6a9e7-c207-48dc-b484-40598c277598' : '267818ed-0fbc-4998-8ef1-3045fd1e867b');\r\n\r\n validateTriggerCondition = () => validateAdsStudioTriggerCondition(this, 'AdsStudioAppSurveyTrigger');\r\n\r\n onSurveySubmit() {\r\n window.survey.AdsStudioAppSurveyTrigger = false;\r\n\r\n super.onSurveySubmit();\r\n }\r\n\r\n onSurveyDismiss() {\r\n window.survey.AdsStudioAppSurveyTrigger = false;\r\n\r\n super.onSurveyDismiss();\r\n }\r\n\r\n getSurveyComponent = () => AdsStudioAppSurveyView;\r\n}\r\n","import { filter, map } from 'underscore';\r\nimport {\r\n BaseSurvey,\r\n WebuiUserSurvey,\r\n EscWebuiUserSurvey,\r\n EscWebuiUserPauseCampaignSurvey,\r\n EscWebuiAutomatedAdDeletionSurvey,\r\n EscWebuiCampaignFeedbackSurvey,\r\n AdInsightRecommendationSurvey,\r\n AdInsightRecommendationMccSurvey,\r\n EscWebuiUserCancelSignupSurvey,\r\n McmWebuiOptOutFeedbackSurvey,\r\n MCMMandatoryOptOutSurvey,\r\n AssetLibraryAIGCMVPSurvey,\r\n AssetLibraryAppSurvey,\r\n AssetLibraryPickerSurvey,\r\n CopilotAssetRecommendationSatisfactionSurvey,\r\n ReportingWebuiUserSurvey,\r\n RSALLMSuggestionOverallSurvey,\r\n RSALLMSuggestionMostWantedSurvey,\r\n CampaignOnboardingSurvey,\r\n TransparentImageAnnotationSurvey,\r\n BudgetCenterOverallSatisfactionSurvey,\r\n BudgetCenterOneTimeUserSurvey,\r\n AdsStudioAppSurvey,\r\n} from '@bingads-webui-campaign-react/survey-core';\r\n\r\n// register the surveys\r\nconst webuiSurveyList = [\r\n BudgetCenterOneTimeUserSurvey, // The lowest priority\r\n WebuiUserSurvey,\r\n EscWebuiUserSurvey,\r\n EscWebuiUserPauseCampaignSurvey,\r\n EscWebuiAutomatedAdDeletionSurvey,\r\n EscWebuiCampaignFeedbackSurvey,\r\n AdInsightRecommendationSurvey,\r\n AdInsightRecommendationMccSurvey,\r\n EscWebuiUserCancelSignupSurvey,\r\n McmWebuiOptOutFeedbackSurvey,\r\n MCMMandatoryOptOutSurvey,\r\n AssetLibraryAIGCMVPSurvey,\r\n AssetLibraryAppSurvey,\r\n AssetLibraryPickerSurvey,\r\n CopilotAssetRecommendationSatisfactionSurvey,\r\n ReportingWebuiUserSurvey,\r\n RSALLMSuggestionOverallSurvey,\r\n RSALLMSuggestionMostWantedSurvey,\r\n CampaignOnboardingSurvey,\r\n TransparentImageAnnotationSurvey,\r\n BudgetCenterOverallSatisfactionSurvey,\r\n AdsStudioAppSurvey,\r\n];\r\n\r\nconst getImplementedSurveyList = surveyList =>\r\n filter(surveyList, survey => survey.prototype instanceof BaseSurvey);\r\n\r\nexport const getWebuiSurveyList = (props) => {\r\n const implementedSurveyList = getImplementedSurveyList(webuiSurveyList);\r\n return map(implementedSurveyList, Survey => new Survey(props));\r\n};\r\n","import $ from 'jquery';\r\nimport { stringifySync } from '@bingads-webui/safe-json';\r\nimport { OCVDataService } from '@bingads-webui-react/feedback-panel';\r\n\r\nexport class SurveyDataSource extends OCVDataService {\r\n // eslint-disable-next-line no-useless-constructor\r\n constructor() {\r\n super();\r\n }\r\n\r\n checkCompliance() {\r\n return true;\r\n }\r\n\r\n getScope() {\r\n const searchParams = new URLSearchParams(window.location.search);\r\n const cid = searchParams.get('cid');\r\n const aid = searchParams.get('aid') || 0;\r\n const uid = searchParams.get('uid');\r\n\r\n return {\r\n cid,\r\n aid,\r\n uid,\r\n };\r\n }\r\n\r\n sendEventToReportingPipeline({ // eslint-disable-line consistent-return\r\n surveyName,\r\n feedback,\r\n telemetry,\r\n clientFeedbackId,\r\n serverContext,\r\n Interface,\r\n Product,\r\n logActivity,\r\n }) {\r\n const { cid, aid } = this.getScope();\r\n\r\n const option = {\r\n contentType: 'application/json',\r\n type: 'POST',\r\n data: stringifySync({\r\n data: {\r\n EventName: 'CSATSurvey',\r\n UniqueId: clientFeedbackId,\r\n EventValue: stringifySync({\r\n Rating: feedback.rating * 5, // convert to 5 star rating\r\n AID: aid,\r\n CID: cid,\r\n Interface,\r\n Product,\r\n SubProduct: null,\r\n Context: {\r\n DeviceType: telemetry.deviceType,\r\n FeatureArea: telemetry.featureArea,\r\n },\r\n }),\r\n },\r\n }),\r\n url: `${serverContext.ServicesEndpoints.CampaignAPI}Campaign/V2/Customers(${cid})/Accounts(${aid})/Default.PostABTestingEventLog`,\r\n success: /* istanbul ignore next */ () => {\r\n logActivity(`SurveyDataSource | survey: ${surveyName}, action: send CSAT reporting pipeline success`);\r\n },\r\n error: /* istanbul ignore next */ () => {\r\n logActivity(`SurveyDataSource | survey: ${surveyName}, action: send CSAT reporting pipeline failed`);\r\n },\r\n };\r\n\r\n return $.ajax(option);\r\n }\r\n}\r\n","import { isEmpty, extend, noop, chain } from 'underscore';\r\nimport { v4 as uuidv4 } from 'uuid';\r\nimport { stringifySync } from '@bingads-webui/safe-json';\r\nimport { SurveyDataSource } from './survey-data-source';\r\n\r\nconst defaultTestAppId = 50025;\r\nconst defaultAppId = 2482;\r\n\r\nexport function SurveyDataService({\r\n isTestEnv = true,\r\n surveyId,\r\n surveyName,\r\n Interface,\r\n Product,\r\n customParams,\r\n dataSource,\r\n serverContext,\r\n tokenInfo,\r\n isReportingPipelineEnabled = false,\r\n logActivity = noop,\r\n sendSourcePageURI = true,\r\n}) {\r\n const appId = isTestEnv ? defaultTestAppId : defaultAppId;\r\n\r\n if (isEmpty(dataSource)) {\r\n dataSource = new SurveyDataSource(); // eslint-disable-line no-param-reassign\r\n }\r\n\r\n const { cid, aid, uid } = dataSource.getScope();\r\n\r\n const defaultFeedback = {\r\n type: 'Survey',\r\n manifestType: 'Fps',\r\n survey: {\r\n surveyId,\r\n },\r\n comment: '',\r\n rating: 1,\r\n email: '',\r\n web: {\r\n sourcePageURI: sendSourcePageURI ? chain(window).result('location').result('href').value() || '' : '',\r\n },\r\n application: {\r\n appData: stringifySync({\r\n ...customParams,\r\n }),\r\n },\r\n complianceChecks: {\r\n authenticationType: 'MSA',\r\n ageGroup: 'Adult',\r\n },\r\n sdkVersion: 'AdsWeb 1.0.0',\r\n };\r\n\r\n const defaultTelemetry = {\r\n tenantId: tokenInfo ? String(tokenInfo.TenantId) : null, // MSA/AAD tenant Id\r\n loggableUserId: tokenInfo ? String(tokenInfo.UserId) : null, // MSA/AAD user Id\r\n featureArea: '',\r\n deviceType: '',\r\n processSessionId: chain(serverContext).result('Omniture').result('SessionId').value() || undefined,\r\n };\r\n\r\n return {\r\n sendFeedback: ({\r\n feedback,\r\n telemetry,\r\n extendedManifestData,\r\n onFinishSendRequest = noop,\r\n }) => {\r\n const clientFeedbackId = uuidv4();\r\n\r\n let surveySpecificData = {\r\n cid,\r\n aid,\r\n uid,\r\n };\r\n\r\n if (extendedManifestData != null) {\r\n surveySpecificData = {\r\n ...(extendedManifestData.surveySpecificData || {}),\r\n ...surveySpecificData,\r\n };\r\n }\r\n\r\n defaultFeedback.application.extendedManifestData = stringifySync({\r\n surveySpecificData: stringifySync(surveySpecificData),\r\n });\r\n\r\n const feedbackWithDefaults = extend(defaultFeedback, feedback);\r\n\r\n const telemetryWithDefaults = extend(defaultTelemetry, telemetry);\r\n\r\n if (!isTestEnv && isReportingPipelineEnabled) {\r\n const originalCallback = onFinishSendRequest;\r\n onFinishSendRequest = (...args) => { // eslint-disable-line no-param-reassign\r\n originalCallback.apply(this, args);\r\n dataSource.sendEventToReportingPipeline({\r\n surveyName,\r\n Interface,\r\n Product,\r\n feedback: feedbackWithDefaults,\r\n telemetry: telemetryWithDefaults,\r\n clientFeedbackId,\r\n serverContext,\r\n logActivity,\r\n });\r\n };\r\n }\r\n\r\n dataSource.sendFeedback({\r\n appId,\r\n clientFeedbackId,\r\n isTestEnv,\r\n feedback: feedbackWithDefaults,\r\n telemetry: telemetryWithDefaults,\r\n onSuccess: () => {\r\n onFinishSendRequest();\r\n logActivity(`SurveyDataService | survey: ${surveyName}, action: send OCV feedback success`);\r\n },\r\n onError: () => {\r\n onFinishSendRequest();\r\n logActivity(`SurveyDataService | survey: ${surveyName}, action: send OCV feedback failed`);\r\n },\r\n });\r\n },\r\n };\r\n}\r\n","import PropTypes from 'prop-types';\r\nimport React, { useMemo } from 'react';\r\nimport { stringifySync } from '@bingads-webui/safe-json';\r\nimport { SurveyDataService } from '@bingads-webui-campaign-react/survey-data-service';\r\n\r\nexport const SurveyContainer = (props) => {\r\n const {\r\n survey,\r\n logActivity,\r\n isTestEnv,\r\n onSurveyRender,\r\n serverContext,\r\n tokenInfo,\r\n lastActiveElement,\r\n resetActiveElement,\r\n } = props;\r\n\r\n const Component = useMemo(() => {\r\n const SurveyComponent = survey.getSurveyComponent();\r\n\r\n return (\r\n {\r\n survey.onSurveySubmit();\r\n resetActiveElement();\r\n logActivity(`SurveyManager | survey: ${survey.getSurveyName()}, action: submit, additionalLogData: ${stringifySync(additionalLogData)}`);\r\n }}\r\n onSurveyDismiss={(additionalLogData = {}) => {\r\n survey.onSurveyDismiss();\r\n resetActiveElement();\r\n logActivity(`SurveyManager | survey: ${survey.getSurveyName()}, action: dismiss, additionalLogData: ${stringifySync(additionalLogData)}`);\r\n }}\r\n onSurveyRender={onSurveyRender}\r\n lastActiveElement={lastActiveElement}\r\n customParams={survey.getSurveyCustomParams()}\r\n />\r\n );\r\n }, [survey, isTestEnv, serverContext, tokenInfo, logActivity, onSurveyRender, lastActiveElement, resetActiveElement]);\r\n\r\n return Component;\r\n};\r\n\r\nSurveyContainer.propTypes = {\r\n survey: PropTypes.shape({\r\n getSurveyName: PropTypes.func.isRequired,\r\n getSurveyId: PropTypes.func.isRequired,\r\n getSurveyComponent: PropTypes.func.isRequired,\r\n getSurveyInterface: PropTypes.func.isRequired,\r\n getSurveyProduct: PropTypes.func.isRequired,\r\n getSurveyCustomParams: PropTypes.func.isRequired,\r\n isReportingPipelineEnabled: PropTypes.func.isRequired,\r\n onSurveyRender: PropTypes.func.isRequired,\r\n onSurveySubmit: PropTypes.func.isRequired,\r\n onSurveyDismiss: PropTypes.func.isRequired,\r\n }).isRequired,\r\n logActivity: PropTypes.func.isRequired,\r\n isTestEnv: PropTypes.bool.isRequired,\r\n onSurveyRender: PropTypes.func.isRequired,\r\n serverContext: PropTypes.shape({}).isRequired,\r\n tokenInfo: PropTypes.shape({}),\r\n lastActiveElement: PropTypes.shape({}).isRequired,\r\n resetActiveElement: PropTypes.func.isRequired,\r\n};\r\n\r\nSurveyContainer.defaultProps = {\r\n tokenInfo: {},\r\n};\r\n","export const setSurveyHasCampaign = () => {\r\n if (window.survey && window.survey.surveyManager && window.survey.hasCampaign === false) {\r\n window.survey.hasCampaign = true;\r\n window.survey.surveyManager.trigger();\r\n }\r\n};\r\n\r\nexport const createDOMContainer = () => {\r\n let DOMContainer;\r\n if (document.getElementById('survey-container')) {\r\n DOMContainer = document.getElementById('survey-container');\r\n } else {\r\n DOMContainer = document.createElement('div');\r\n DOMContainer.setAttribute('id', 'survey-container');\r\n }\r\n return DOMContainer;\r\n};\r\n","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport { sortBy, find, isEmpty, result } from 'underscore';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { PopupContextProvider } from '@bingads-webui-react/popup-manager';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { stringifySync } from '@bingads-webui/safe-json';\r\nimport { getWebuiSurveyList } from './survey-list';\r\nimport { SurveyContainer } from './survey-container';\r\nimport { createDOMContainer } from './util';\r\n\r\nlet lastActiveElement;\r\n\r\nexport const SurveyManager = (props) => {\r\n const {\r\n i18n,\r\n serverContext,\r\n PreferenceService,\r\n tokenInfo,\r\n appActivity,\r\n activityName,\r\n appPerfMarker,\r\n } = props;\r\n\r\n const logActivity = (message) => {\r\n if (appActivity) {\r\n appActivity.signal(message, activityName);\r\n }\r\n };\r\n\r\n const {\r\n surveyList = getWebuiSurveyList({\r\n serverContext,\r\n PreferenceService,\r\n logActivity,\r\n }),\r\n } = props;\r\n\r\n const isTestEnv = !result(serverContext, 'IsProdEnv') && !window.location.href.toLowerCase().includes('ads.microsoft.com');\r\n\r\n const isTokenInfoInvalid = () => !isTestEnv &&\r\n (isEmpty(tokenInfo) || !tokenInfo.UserId || !tokenInfo.TenantId);\r\n\r\n const renderSurveyToDom = (survey) => {\r\n if (isTokenInfoInvalid()) {\r\n logActivity(`SurveyManager | tokenInfo is invalid, tokenInfo: ${tokenInfo}`);\r\n return;\r\n }\r\n\r\n const renderSurveyPerfMarker = appPerfMarker.createChild('Render_Survey');\r\n renderSurveyPerfMarker.willInit();\r\n lastActiveElement = document && document.activeElement;\r\n ReactDOM.render(\r\n \r\n \r\n {/* enable centralized popup management for survey */}\r\n \r\n {\r\n survey.onSurveyRender();\r\n logActivity(`SurveyManager | survey: ${survey.getSurveyName()}, action: render, additionalLogData: ${stringifySync(additionalLogData)}`);\r\n renderSurveyPerfMarker.done();\r\n }}\r\n lastActiveElement={lastActiveElement}\r\n resetActiveElement={() => {\r\n lastActiveElement = undefined;\r\n }}\r\n {...props}\r\n />\r\n \r\n \r\n ,\r\n createDOMContainer()\r\n );\r\n };\r\n\r\n const selectSurvey = () => {\r\n // get the available survey with the highest priority\r\n const sortedSurveyList = sortBy(surveyList, survey => survey.getSurveyPriority()).reverse();\r\n const selectedSurvey = find(sortedSurveyList, survey =>\r\n survey.validateTriggerCondition() && survey.validateUserGovernance());\r\n\r\n return selectedSurvey;\r\n };\r\n\r\n let survey;\r\n\r\n return {\r\n getSurvey: () => survey,\r\n setSurvey: () => {\r\n survey = selectSurvey();\r\n },\r\n render: () => {\r\n if (survey) {\r\n renderSurveyToDom(survey);\r\n }\r\n },\r\n trigger: ({\r\n checkIfSurveyIsOpen,\r\n } = {}) => {\r\n if (checkIfSurveyIsOpen) {\r\n const elements = document.getElementsByClassName('webui-user-survey');\r\n if (elements.length) {\r\n return;\r\n }\r\n }\r\n const newSurvey = selectSurvey();\r\n if (!newSurvey) {\r\n // do nothing if no available survey\r\n } else {\r\n survey = newSurvey;\r\n renderSurveyToDom(survey);\r\n }\r\n },\r\n };\r\n};\r\n","import { SurveyManager } from './survey-manager';\r\nimport { setSurveyHasCampaign } from './util';\r\n\r\nexport const setupSurveyManager = (({\r\n i18n,\r\n serverContext,\r\n PreferenceService,\r\n tokenInfo,\r\n surveyList,\r\n appActivity,\r\n activityName,\r\n appPerfMarker,\r\n}) => {\r\n // set up global variables\r\n window.survey = {\r\n hasCampaign: false,\r\n setSurveyHasCampaign,\r\n };\r\n\r\n window.survey.surveyManager = SurveyManager({\r\n i18n,\r\n serverContext,\r\n PreferenceService,\r\n tokenInfo,\r\n surveyList,\r\n appActivity,\r\n activityName,\r\n appPerfMarker,\r\n });\r\n});\r\n","import _ from 'underscore';\r\n\r\nexport function locationRecommendationConverter({ data }) {\r\n const convertLocation = (location) => {\r\n let Type = 'Location';\r\n let CriterionKey = 'LocationCriterion';\r\n if (!_.isFinite(location.LocationId)) {\r\n Type = 'Radius';\r\n CriterionKey = 'RadiusCriterion';\r\n }\r\n return {\r\n Criterion: {\r\n [CriterionKey]: {\r\n Name: location.ExpandedName,\r\n NameTypeCombo: location.ExpandedName,\r\n ...location,\r\n },\r\n Type,\r\n BidAdjustment: 0,\r\n Status: 'Active',\r\n },\r\n CriterionType: Type,\r\n };\r\n };\r\n return {\r\n ...data,\r\n value: _.map(data.value, item => ({\r\n ...item,\r\n Id: -parseInt(_.uniqueId(), 10),\r\n isRecommendedLocation: true,\r\n Campaign: {\r\n Id: item.Target.CampaignId,\r\n Name: item.Target.CampaignName,\r\n },\r\n ...convertLocation(item.Location),\r\n })),\r\n };\r\n}\r\n","import { include } from 'underscore.string';\r\nimport Promise from 'bluebird';\r\nimport { locationRecommendationConverter } from './util/locationRecommendationConverter';\r\n\r\nexport const getOdataPath = (originalHost) => {\r\n if (include(window.location.host, 'ads')) {\r\n return '/ODataApi/';\r\n } else if (originalHost && include(originalHost, '823')) {\r\n // add this condition to not change any logic for old ui\r\n // since this package is shared both in old ui and new ui.\r\n return originalHost;\r\n }\r\n const hostReg = /(.*:)(\\d+)(\\/.*)/g;\r\n return originalHost ? originalHost.replace(hostReg, '$1823$3') : originalHost;\r\n};\r\n\r\nexport function getRecommendations({\r\n deps,\r\n scope,\r\n oppType,\r\n channel,\r\n top,\r\n skip,\r\n}) {\r\n if (oppType === 'NewLocationTargetOpportunity') return new Promise(resolve => resolve({ value: [] }));\r\n const baseUrl = `/AdInsight/V2/Customers(${scope.customerId})/Accounts(${scope.accountId})`;\r\n const actionUrl = `Opportunity.GetDetails(oppTypes=['${oppType}'],channel='${channel}')?$top=${top}&$skip=${skip}`;\r\n const url = scope.campaignId ? `${baseUrl}/Campaigns(${scope.campaignId})/${actionUrl}` : `${baseUrl}/${actionUrl}`;\r\n return deps.httpUtils.odata.get({\r\n url,\r\n ...deps.odataOptions,\r\n host: getOdataPath(deps.odataOptions && deps.odataOptions.host),\r\n }).then(data => locationRecommendationConverter({ data }));\r\n}\r\n","import _ from 'underscore';\r\nimport { getOdataPath } from '../get';\r\n\r\nfunction getTrackPayload({\r\n isAll,\r\n recommendations,\r\n recommendationType,\r\n channel,\r\n UserAction,\r\n}) {\r\n const odataType = isAll ? 'ApplyAllOpportunitiesRequest' : 'ApplyBulkOpportunitiesRequest';\r\n const inputKey = isAll ? 'UserInput' : 'UserInputs';\r\n const inputValue = isAll ? null : _.map(recommendations, recommend => ({\r\n OpportunityId: recommend.OpportunityId,\r\n }));\r\n\r\n return {\r\n Request: _.extend({}, {\r\n '@odata.type': `#Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.${odataType}`,\r\n 'OpportunityType@odata.type': '#Microsoft.Advertiser.AdInsight.Opportunity.Schema.OpportunityType',\r\n OpportunityType: recommendationType,\r\n 'UserAction@odata.type': '#Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.UserActionCode',\r\n UserAction,\r\n Settings: {\r\n '@odata.type': '#Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.ApplySettings',\r\n },\r\n [inputKey]: inputValue,\r\n Channel: channel,\r\n }, isAll ? null : {\r\n 'UserInputs@odata.type': '#Collection(Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.ApplyUserInput)',\r\n }),\r\n };\r\n}\r\n\r\nexport function adoptRecommendations({\r\n deps,\r\n isAll,\r\n recommendations,\r\n recommendationType,\r\n scope,\r\n channel,\r\n UserAction,\r\n}) {\r\n const action = isAll ? 'TrackAll' : 'Track';\r\n const uri = `/AdInsight/V2/Customers(${scope.customerId})/Accounts(${scope.accountId})/Opportunity.${action}`;\r\n return deps.httpUtils.odata.post({\r\n uri,\r\n data: getTrackPayload({\r\n isAll,\r\n recommendations,\r\n channel,\r\n UserAction,\r\n recommendationType,\r\n }),\r\n ...deps.odataOptions,\r\n host: getOdataPath(deps.odataOptions && deps.odataOptions.host),\r\n });\r\n}\r\n","import { adoptRecommendations } from './util/adoptRecommendations';\r\n\r\nexport function applyRecommendations({\r\n deps,\r\n scope,\r\n recommendationType,\r\n recommendations,\r\n isAll,\r\n channel,\r\n}) {\r\n return adoptRecommendations({\r\n deps,\r\n scope,\r\n recommendations,\r\n isAll,\r\n UserAction: '1',\r\n recommendationType,\r\n channel,\r\n });\r\n}\r\n","import { adoptRecommendations } from './util/adoptRecommendations';\r\n\r\nexport function dismissRecommendations({\r\n deps,\r\n scope,\r\n recommendationType,\r\n recommendations,\r\n isAll,\r\n channel,\r\n}) {\r\n return adoptRecommendations({\r\n deps,\r\n scope,\r\n recommendations,\r\n isAll,\r\n UserAction: '2',\r\n recommendationType,\r\n channel,\r\n });\r\n}\r\n","import _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useEffect } from 'react';\r\nimport { siteMapPropType } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { StyledSubPageMenu } from '@bingads-webui-campaign-react/sub-page-menu';\r\nimport { Activity, Scenario } from '@bingads-webui-react/hoc-with-signal';\r\n\r\nexport const Loader = (props) => {\r\n const { siteMap, updateAvailability } = props;\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n const available = !_.isEmpty(selectedParent);\r\n useEffect(() => {\r\n updateAvailability(available);\r\n });\r\n\r\n return props.isVisible ? (\r\n \r\n \r\n \r\n \r\n \r\n ) : null;\r\n};\r\n\r\nLoader.propTypes = {\r\n siteMap: siteMapPropType.isRequired,\r\n updateAvailability: PropTypes.func,\r\n isVisible: PropTypes.bool.isRequired,\r\n changeLayout: PropTypes.func.isRequired,\r\n};\r\n\r\nLoader.defaultProps = {\r\n updateAvailability: _.noop,\r\n};\r\n\r\nexport const DefaultSubPageMenuLoader = React.memo(Loader);\r\n","import _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useEffect } from 'react';\r\nimport {\r\n withCampaignSiteMap,\r\n siteMapPropType,\r\n processor,\r\n} from '@bingads-webui-campaign-react/with-site-map';\r\nimport { useCurrentCampaign, useCurrentAdGroup } from '@bingads-webui-campaign-react/use-current-scope-entity';\r\nimport { withLayoutContext } from '@bingads-webui-react/app-layout-container';\r\n\r\n\r\nconst isExperimentCampaign = (campaign, adGroup) => !!(campaign && campaign.ExperimentId > 0 && !adGroup);\r\nconst ExperimentSubPageMenu = React.lazy(() => import(/* webpackMode: 'eager' */ './experiment-sub-page-menu').then(({ StyledExperimentSubPageMenu }) => ({ default: StyledExperimentSubPageMenu })));\r\n\r\nexport const Loader = (props) => {\r\n const { siteMap, updateAvailability, layoutConfig } = props;\r\n const campaign = useCurrentCampaign();\r\n const adGroup = useCurrentAdGroup();\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n // add judgement to fix the experiment part is blank when the score card hidden.\r\n const showCard = layoutConfig.tab.mode && layoutConfig.tab.mode === 'hidden';\r\n const available = isExperimentCampaign(campaign, adGroup) && !_.isEmpty(selectedParent) && !showCard;\r\n useEffect(() => {\r\n updateAvailability(available);\r\n });\r\n\r\n return props.isVisible ? (\r\n \r\n \r\n \r\n ) : null;\r\n};\r\n\r\nLoader.propTypes = {\r\n siteMap: siteMapPropType.isRequired,\r\n isVisible: PropTypes.bool.isRequired,\r\n updateAvailability: PropTypes.func,\r\n layoutConfig: PropTypes.shape({\r\n header: PropTypes.object.isRequired,\r\n nav: PropTypes.object.isRequired,\r\n menu: PropTypes.object.isRequired,\r\n status: PropTypes.object.isRequired,\r\n tab: PropTypes.object.isRequired,\r\n subTab: PropTypes.object.isRequired,\r\n content: PropTypes.object.isRequired,\r\n }).isRequired,\r\n};\r\n\r\nLoader.defaultProps = {\r\n updateAvailability: _.noop,\r\n};\r\n\r\nexport const ExperimentSubPageMenuLoader = withLayoutContext(withCampaignSiteMap(\r\n React.memo(Loader),\r\n [processor.processPermissions, processor.processPath]\r\n));\r\n","/* eslint-disable no-param-reassign */\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useEffect } from 'react';\r\nimport {\r\n withHotelCenterSiteMap,\r\n siteMapPropType,\r\n processorSet,\r\n} from '@bingads-webui-campaign-react/with-site-map';\r\nimport { StyledSubPageMenu } from '@bingads-webui-campaign-react/sub-page-menu';\r\nimport { Activity, Scenario } from '@bingads-webui-react/hoc-with-signal';\r\n\r\nconst hotelCenterPageCategory = {\r\n 'hotel-center-overview': true,\r\n 'hotel-center-assignment': true,\r\n 'hotel-center-intelligence': true,\r\n 'hotel-center-setup': true,\r\n feedupload: true,\r\n report: true,\r\n adExtensions: true,\r\n reconciliationreport: true,\r\n};\r\n\r\nconst idsToHideChildren = ['hotel-center-overview'];\r\n\r\nconst locateSiteMap = (siteMap, category) => {\r\n const dfsSearch = (target, options) => {\r\n const { getChildren, predicate, onFound } = options;\r\n\r\n if (predicate(target)) {\r\n onFound(target);\r\n\r\n const children = getChildren(target);\r\n _.each(children, x => dfsSearch(x, options));\r\n }\r\n };\r\n\r\n const virtualRoot = { children: siteMap, selected: true };\r\n const selectedRoad = [];\r\n const searchOptions = {\r\n getChildren: x => x.children || [],\r\n predicate: x => x.selected === true,\r\n onFound: x => selectedRoad.push(x),\r\n };\r\n\r\n dfsSearch(virtualRoot, searchOptions);\r\n\r\n const deepestNodeWithCategory = _.chain(selectedRoad)\r\n .map(x => (category[x.id] ? x : null))\r\n .compact()\r\n .last()\r\n .value();\r\n\r\n // No mapped category found, the sub page menu will be blank\r\n if (!deepestNodeWithCategory) {\r\n return [];\r\n }\r\n\r\n\r\n if (_.indexOf(idsToHideChildren, deepestNodeWithCategory.id) !== -1) {\r\n deepestNodeWithCategory.children = [];\r\n }\r\n\r\n // Normal category with children\r\n if (deepestNodeWithCategory.children && deepestNodeWithCategory.children.length > 0) {\r\n return [deepestNodeWithCategory];\r\n }\r\n\r\n // Category with no children, will create a vertual node to contain it\r\n const nodeWrapper = _.clone(deepestNodeWithCategory);\r\n nodeWrapper.children = [deepestNodeWithCategory];\r\n\r\n return [nodeWrapper];\r\n};\r\n\r\nexport const Loader = (props) => {\r\n const { siteMap, updateAvailability } = props;\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n const available = !_.isEmpty(selectedParent);\r\n useEffect(() => {\r\n updateAvailability(available);\r\n });\r\n\r\n const relocatedSiteMap = locateSiteMap(siteMap, hotelCenterPageCategory);\r\n return props.isVisible ? (\r\n \r\n \r\n \r\n \r\n ) : null;\r\n};\r\n\r\nLoader.propTypes = {\r\n siteMap: siteMapPropType.isRequired,\r\n updateAvailability: PropTypes.func,\r\n isVisible: PropTypes.bool.isRequired,\r\n changeLayout: PropTypes.func.isRequired,\r\n};\r\n\r\nLoader.defaultProps = {\r\n updateAvailability: _.noop,\r\n};\r\n\r\nexport const HotelCenterSubPageMenuLoader = withHotelCenterSiteMap(\r\n React.memo(Loader),\r\n processorSet.all\r\n);\r\n","/* eslint-disable no-param-reassign */\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useEffect } from 'react';\r\nimport {\r\n withHotelCenterV2SiteMap,\r\n siteMapPropType,\r\n processorSet,\r\n} from '@bingads-webui-campaign-react/with-site-map';\r\nimport { StyledSubPageMenu } from '@bingads-webui-campaign-react/sub-page-menu';\r\nimport { Activity, Scenario } from '@bingads-webui-react/hoc-with-signal';\r\n\r\nconst hotelCenterPageCategory = {\r\n 'property-center-overview': true,\r\n 'property-center-logos': true,\r\n 'property-center-properties': true,\r\n 'property-center-landingpage': true,\r\n 'property-center-pricing': true,\r\n 'property-center-shareofvoice': true,\r\n 'property-center-bookingreport': true,\r\n 'property-center-reconciliationreport': true,\r\n};\r\n\r\nconst idsToHideChildren = [\r\n 'property-center-properties',\r\n 'property-center-landingpage-detail',\r\n];\r\n\r\nconst locateSiteMap = (siteMap, category) => {\r\n const dfsSearch = (target, options) => {\r\n const { getChildren, predicate, onFound } = options;\r\n\r\n if (predicate(target)) {\r\n onFound(target);\r\n\r\n const children = getChildren(target);\r\n _.each(children, x => dfsSearch(x, options));\r\n }\r\n };\r\n\r\n const virtualRoot = { children: siteMap, selected: true };\r\n const selectedRoad = [];\r\n const searchOptions = {\r\n getChildren: x => x.children || [],\r\n predicate: x => x.selected === true,\r\n onFound: x => selectedRoad.push(x),\r\n };\r\n\r\n dfsSearch(virtualRoot, searchOptions);\r\n\r\n const deepestNodeWithCategory = _.chain(selectedRoad)\r\n .map(x => (category[x.id] ? x : null))\r\n .compact()\r\n .last()\r\n .value();\r\n\r\n // No mapped category found, the sub page menu will be blank\r\n if (!deepestNodeWithCategory) {\r\n return [];\r\n }\r\n\r\n\r\n if (_.indexOf(idsToHideChildren, deepestNodeWithCategory.id) !== -1) {\r\n deepestNodeWithCategory.children = [];\r\n }\r\n\r\n // Normal category with children\r\n if (deepestNodeWithCategory.children && deepestNodeWithCategory.children.length > 0) {\r\n return [deepestNodeWithCategory];\r\n }\r\n\r\n // Category with no children, will create a vertual node to contain it\r\n const nodeWrapper = _.clone(deepestNodeWithCategory);\r\n nodeWrapper.children = [deepestNodeWithCategory];\r\n\r\n return [nodeWrapper];\r\n};\r\n\r\nexport const Loader = (props) => {\r\n const { siteMap, updateAvailability } = props;\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n const available = !_.isEmpty(selectedParent);\r\n useEffect(() => {\r\n updateAvailability(available);\r\n });\r\n\r\n const relocatedSiteMap = locateSiteMap(siteMap, hotelCenterPageCategory);\r\n return props.isVisible ? (\r\n \r\n \r\n \r\n \r\n ) : null;\r\n};\r\n\r\nLoader.propTypes = {\r\n siteMap: siteMapPropType.isRequired,\r\n updateAvailability: PropTypes.func,\r\n isVisible: PropTypes.bool.isRequired,\r\n changeLayout: PropTypes.func.isRequired,\r\n location: PropTypes.shape({\r\n pathname: PropTypes.string.isRequired,\r\n }).isRequired,\r\n};\r\n\r\nLoader.defaultProps = {\r\n updateAvailability: _.noop,\r\n};\r\n\r\nexport const HotelCenterV2SubPageMenuLoader = withHotelCenterV2SiteMap(\r\n React.memo(Loader),\r\n processorSet.all\r\n);\r\n","import _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useEffect, useState } from 'react';\r\nimport { QueryParam } from '@bingads-webui-react/scope-service';\r\nimport { storeQueries, MmcDataSourceInitializer } from '@bingads-webui-campaign-react/merchant-shared';\r\nimport { siteMapPropType, withToolsSiteMap, processorSet } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { StyledSubPageMenu } from '@bingads-webui-campaign-react/sub-page-menu';\r\nimport { Activity, Scenario } from '@bingads-webui-react/hoc-with-signal';\r\nimport { MmcNotificationTopBanner } from '@bingads-webui-campaign-react/merchant-center-notification';\r\n\r\nconst StyledIssuesCount = (props) => {\r\n const { issuesCount } = props;\r\n\r\n return (\r\n \r\n {issuesCount}\r\n \r\n );\r\n};\r\n\r\nStyledIssuesCount.propTypes = {\r\n issuesCount: PropTypes.number.isRequired,\r\n};\r\n\r\nconst MmcStoreSummarySubPageMenu = (props) => {\r\n const {\r\n scope: {\r\n values: {\r\n storeId,\r\n },\r\n },\r\n } = props;\r\n const [issuesCounts, setIssuesCounts] = useState({});\r\n\r\n useEffect(() => {\r\n if (storeId) {\r\n storeQueries.getIssuesCount(storeId)\r\n .then(mtResponse => setIssuesCounts({\r\n productIssues: mtResponse.ProductIssues,\r\n feedIssues: mtResponse.FeedIssues,\r\n storeIssues: mtResponse.StoreIssues,\r\n }));\r\n }\r\n }, [storeId]);\r\n\r\n const onTabItemRender = (item) => {\r\n const {\r\n productIssues, feedIssues, storeIssues,\r\n } = issuesCounts;\r\n\r\n if ((productIssues || productIssues === 0) && item.id === 'mmc-store-summary-productissues') {\r\n return ();\r\n } else if ((feedIssues || feedIssues === 0) && item.id === 'mmc-store-summary-feedissues') {\r\n return ();\r\n } else if ((storeIssues || storeIssues === 0) && item.id === 'mmc-store-summary-storeissues') {\r\n return ();\r\n }\r\n\r\n return null;\r\n };\r\n\r\n const {\r\n productIssues, feedIssues, storeIssues,\r\n } = issuesCounts;\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nMmcStoreSummarySubPageMenu.propTypes = {\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n};\r\n\r\nexport const Loader = (props) => {\r\n const {\r\n siteMap,\r\n updateAvailability,\r\n permissions,\r\n } = props;\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n const available = !_.isEmpty(selectedParent);\r\n\r\n useEffect(() => {\r\n updateAvailability(available);\r\n });\r\n\r\n return (\r\n \r\n \r\n { props.isVisible ?\r\n \r\n \r\n {permissions.dynamic.FeedLabelGmcMigration && !permissions.dynamic.FeedLabelBlockList && }\r\n {selectedParent && selectedParent.id === 'mmc-store-summary' ? (\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n : null }\r\n \r\n );\r\n};\r\n\r\nLoader.propTypes = {\r\n siteMap: siteMapPropType.isRequired,\r\n updateAvailability: PropTypes.func,\r\n isVisible: PropTypes.bool.isRequired,\r\n changeLayout: PropTypes.func.isRequired,\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n FeedLabelGmcMigration: PropTypes.bool,\r\n FeedLabelBlockList: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n};\r\n\r\nLoader.defaultProps = {\r\n updateAvailability: _.noop,\r\n};\r\n\r\nexport const MmcStoreSubPageMenuLoader = withToolsSiteMap(\r\n React.memo(Loader),\r\n processorSet.all,\r\n [\r\n 'mmc-store-summary/mmc-store-summary',\r\n 'mmc-stores',\r\n 'mmc-feeds',\r\n 'mmc-promotions',\r\n 'mmc-import/mmc-import',\r\n 'mmc-settings/mmc-settings',\r\n 'mmc-products',\r\n ]\r\n);\r\n","import _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useEffect } from 'react';\r\nimport {\r\n withSiteMap,\r\n siteMapPropType,\r\n processorSet,\r\n allSiteMap,\r\n} from '@bingads-webui-campaign-react/with-site-map';\r\n\r\nconst RecommendationSubPageMenu = React.lazy(() => import(/* webpackMode: 'eager' */ './recommendation-sub-page-menu').then(({ StyledRecommendationSubPageMenu }) => ({ default: StyledRecommendationSubPageMenu })));\r\n\r\nexport const Loader = (props) => {\r\n const { siteMap, updateAvailability } = props;\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n const available = !_.isEmpty(selectedParent)\r\n && selectedParent.id === 'recommendations';\r\n useEffect(() => {\r\n updateAvailability(available);\r\n });\r\n\r\n return props.isVisible ? (\r\n \r\n \r\n \r\n ) : null;\r\n};\r\n\r\nLoader.propTypes = {\r\n siteMap: siteMapPropType.isRequired,\r\n isVisible: PropTypes.bool.isRequired,\r\n updateAvailability: PropTypes.func,\r\n};\r\n\r\nLoader.defaultProps = {\r\n updateAvailability: _.noop,\r\n};\r\n\r\nexport const RecommendationSubPageMenuLoader = withSiteMap(React.memo(Loader), processorSet.all, allSiteMap, 'recommendations');\r\n","import _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useCallback, useEffect, useContext } from 'react';\r\nimport { siteMapPropType } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { StyledSubPageMenu } from '@bingads-webui-campaign-react/sub-page-menu';\r\nimport { Activity, Scenario } from '@bingads-webui-react/hoc-with-signal';\r\nimport { StyledMenuItemTag } from '@bingads-webui-react/menu-item-tag';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\n\r\nexport const Loader = (props) => {\r\n const { siteMap, updateAvailability } = props;\r\n const i18n = useContext(I18nContext);\r\n\r\n const onTabItemRender = useCallback((item) => {\r\n if (item.id === 'uet-tag-insights') {\r\n const pillStyle = { marginLeft: 5, verticalAlign: 'top', display: 'inline-block' };\r\n\r\n return (\r\n
\r\n \r\n
);\r\n }\r\n return null;\r\n }, [i18n]);\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n const available = !_.isEmpty(selectedParent);\r\n useEffect(() => {\r\n updateAvailability(available);\r\n });\r\n\r\n return props.isVisible ? (\r\n \r\n \r\n \r\n \r\n \r\n ) : null;\r\n};\r\n\r\nLoader.propTypes = {\r\n siteMap: siteMapPropType.isRequired,\r\n updateAvailability: PropTypes.func,\r\n isVisible: PropTypes.bool.isRequired,\r\n changeLayout: PropTypes.func.isRequired,\r\n};\r\n\r\nLoader.defaultProps = {\r\n updateAvailability: _.noop,\r\n};\r\n\r\nexport const UetTagSubPageMenu = React.memo(Loader);\r\n","import _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useEffect } from 'react';\r\nimport {\r\n withToolsSiteMap,\r\n siteMapPropType,\r\n processorSet,\r\n} from '@bingads-webui-campaign-react/with-site-map';\r\n\r\nconst BudgetCenterSubPageMenu = React.lazy(() => import(/* webpackMode: 'eager' */ './budget-center-sub-page-menu').then(({ StyledBudgetCenterSubPageMenu }) => ({ default: StyledBudgetCenterSubPageMenu })));\r\n\r\nexport const Loader = (props) => {\r\n const { siteMap, updateAvailability } = props;\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n const available = !_.isEmpty(selectedParent)\r\n && selectedParent.id === 'budget-center';\r\n useEffect(() => {\r\n updateAvailability(available);\r\n });\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nLoader.propTypes = {\r\n siteMap: siteMapPropType.isRequired,\r\n isVisible: PropTypes.bool.isRequired,\r\n updateAvailability: PropTypes.func,\r\n};\r\n\r\nLoader.defaultProps = {\r\n updateAvailability: _.noop,\r\n};\r\n\r\nexport const BudgetCenterSubPageMenuLoader = withToolsSiteMap(React.memo(Loader), processorSet.all, 'budget-center');\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { ElementSelector } from '@bingads-webui-campaign-react/element-selector';\r\nimport { withSiteMap, withToolsSiteMap, processorSet, withImportSiteMap } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { withPermissions } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { isNavigationRefreshOn } from '@bingads-webui-react/preference-utility';\r\n\r\nimport { DefaultSubPageMenuLoader } from './default-sub-page-menu-loader';\r\nimport { ExperimentSubPageMenuLoader } from './experiment-sub-page-menu-loader';\r\nimport { HotelCenterSubPageMenuLoader } from './hotel-center-sub-page-menu-loader';\r\nimport { HotelCenterV2SubPageMenuLoader } from './hotel-center-v2-sub-page-menu-loader';\r\nimport { MmcStoreSubPageMenuLoader } from './mmc-sub-page-menu-loader';\r\nimport { RecommendationSubPageMenuLoader } from './recommendation-sub-page-menu-loader';\r\nimport { UetTagSubPageMenu } from './uet-tag-sub-page-menu';\r\nimport { BudgetCenterSubPageMenuLoader } from './budget-center-sub-page-menu-loader';\r\n\r\nconst BusinessDataSubPageMenuLoader = withToolsSiteMap(\r\n DefaultSubPageMenuLoader,\r\n processorSet.all,\r\n 'business-data/business-data/*'\r\n);\r\n\r\nconst ImportCenterSubPageMenuLoader = withImportSiteMap(\r\n DefaultSubPageMenuLoader,\r\n processorSet.all,\r\n 'import-center/import-center/*'\r\n);\r\n\r\nconst AutomatedRuleSubPageMenuLoader = withToolsSiteMap(DefaultSubPageMenuLoader, processorSet.all, 'rules');\r\nconst BulkEditSubPageMenuLoader = withToolsSiteMap(DefaultSubPageMenuLoader, processorSet.all, 'bulk-edits');\r\nconst ScriptsSubPageMenuLoader = withToolsSiteMap(DefaultSubPageMenuLoader, processorSet.all, 'scripts');\r\nconst BulkUploadsSubPageMenuLoader = withToolsSiteMap(DefaultSubPageMenuLoader, processorSet.all, 'bulk-uploads');\r\nconst OfflineConversionsSubPageMenuLoader = withToolsSiteMap(DefaultSubPageMenuLoader, processorSet.all, 'offline-conversions');\r\nconst UetTagSubPageMenuLoader = withToolsSiteMap(UetTagSubPageMenu, processorSet.all, 'uet-tag');\r\n\r\nconst CampaignSubPageMenuLoader = withSiteMap(DefaultSubPageMenuLoader, processorSet.all);\r\n\r\nconst SubpageMenuContainerInternal = React.memo((props) => {\r\n const isNavigationRefreshBudgetCenterOn = isNavigationRefreshOn(props.permissions) && props.permissions.dynamic.NavigationRefreshBudgetCenter;\r\n return (\r\n \r\n {isNavigationRefreshBudgetCenterOn && }\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\nSubpageMenuContainerInternal.propTypes = {\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n NavigationRefresh: PropTypes.bool,\r\n NavigationRefreshBudgetCenter: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n};\r\n\r\nexport const SubpageMenuContainer = withPermissions(SubpageMenuContainerInternal);\r\n","import React from 'react';\r\nimport classnames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport { Activity, Scenario } from '@bingads-webui-react/hoc-with-signal';\r\nimport { MonthPicker } from '@bingads-webui-campaign-react/budget-center-component';\r\nimport { withComponentErrorLogging } from '@bingads-webui-campaign-react/global-error-options';\r\nimport { SecondaryNavigationExpandButton } from '@bingads-webui-campaign-react/secondary-navigation-expand-button';\r\nimport { navRefreshSiteMap, withSiteMap } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { ScopeBarLeftContent } from '@bingads-webui-fluent-component/scope-selector-menu';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { processorSet } from '@bingads-webui-react/with-site-map';\r\n\r\nimport { getBudgetCenterSubPageMenuStyles } from './styles/budget-center-sub-page-style';\r\n\r\nconst ExpandButton = withComponentErrorLogging(withSiteMap(SecondaryNavigationExpandButton, processorSet.navRefresh, navRefreshSiteMap), 'NavigationRefreshSecondaryNavigationExpandButton');\r\n\r\nclass BudgetCenterSubPageMenu extends React.Component {\r\n static defaultProps = {};\r\n\r\n componentDidMount() {\r\n }\r\n\r\n componentWillUnmount() {\r\n }\r\n\r\n render() {\r\n const { i18n, classes } = this.props;\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\nexport const StyledBudgetCenterSubPageMenu = withI18nConsumer(withDefaultStyles(BudgetCenterSubPageMenu, getBudgetCenterSubPageMenuStyles));\r\n\r\nBudgetCenterSubPageMenu.propTypes = {\r\n i18n: PropTypes.shape({}).isRequired,\r\n classes: PropTypes.shape({\r\n BudgetCenterMenuBar: PropTypes.shape({}),\r\n LeftContent: PropTypes.shape({}),\r\n }).isRequired,\r\n};\r\n","export const getBudgetCenterSubPageMenuStyles = (_components, { palette }) => ({\r\n BudgetCenterMenuBar: {\r\n fontSize: 20,\r\n fontWeight: 600,\r\n lineHeight: '28px',\r\n paddingLeft: 32,\r\n paddingTop: 14,\r\n paddingBottom: 14,\r\n borderBottom: `1px solid ${palette.neutralLight}`,\r\n display: 'flex',\r\n flexDirection: 'row',\r\n },\r\n LeftContent: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n alignItems: 'center',\r\n },\r\n});\r\n","/* eslint-disable no-param-reassign */\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { ExperimentScoreCard2, parseDateRangeToQuery } from '@bingads-webui-campaign/experiment-score-card';\r\nimport { withScope } from '@bingads-webui-react/scope-service';\r\nimport { withPermissions } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport { withGlobalFilter } from '@bingads-webui-campaign-react/global-filter-context';\r\nimport { withServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { WaterfallFilterStorage, WaterfallFilterType, waterfallDateFilterProcessor } from '@bingads-webui-campaign/filter-storage';\r\nimport { StyledSubPageMenu } from '@bingads-webui-campaign-react/sub-page-menu';\r\nimport { getEntityFromScope } from '@bingads-webui/edm-campaign';\r\nimport {\r\n withSiteMap,\r\n processorSet,\r\n} from '@bingads-webui-campaign-react/with-site-map';\r\nimport { odata } from '@bingads-webui/http-util';\r\nimport { Activity, Scenario } from '@bingads-webui-react/hoc-with-signal';\r\n\r\nconst withContexts = _.compose(withI18nConsumer, withServerContext, withPermissions, withScope);\r\nconst ExpScorecard = withContexts(ExperimentScoreCard2);\r\nconst WithSiteMapSubPageMenu = withSiteMap(\r\n React.memo(StyledSubPageMenu),\r\n processorSet.all\r\n);\r\n\r\nclass ExperimentSubPageMenu extends React.Component {\r\n static defaultProps = {\r\n showDatePicker: true,\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n this.waterfallFilterStorage = new WaterfallFilterStorage({\r\n preferenceService: this.props.preferenceService,\r\n });\r\n this.forceResetLayout = true;\r\n }\r\n\r\n componentDidMount() {\r\n this.props.changeLayout({ tab: { showExperimentScoreCard: true } });\r\n }\r\n\r\n componentWillUnmount() {\r\n this.props.changeLayout({ tab: { showExperimentScoreCard: false } });\r\n }\r\n\r\n renderScorecard() {\r\n const dateFilter = waterfallDateFilterProcessor(\r\n this.waterfallFilterStorage.getFilters([WaterfallFilterType.DateFilter]),\r\n this.props.serverContext\r\n );\r\n const { currentAccount } = getEntityFromScope(this.props.scope);\r\n\r\n if (currentAccount && this.props.experimentId) {\r\n const expItemFromEdm = currentAccount.Experiments.$withKey(this.props.experimentId);\r\n\r\n const ExpScorecardLazy = React.lazy(() =>\r\n odata.get(expItemFromEdm.odataURL, {\r\n data: parseDateRangeToQuery(dateFilter),\r\n oDataToken: this.props.serverContext.Token,\r\n }).then(experimentFromOData => ({\r\n default: () => ,\r\n })).catch(() => ({\r\n default: () => null,\r\n })));\r\n\r\n return ;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n render() {\r\n return (\r\n \r\n {this.renderScorecard()}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport const StyledExperimentSubPageMenu = withScope(withGlobalFilter(ExperimentSubPageMenu));\r\n\r\nExperimentSubPageMenu.propTypes = {\r\n changeLayout: PropTypes.func.isRequired,\r\n available: PropTypes.bool.isRequired,\r\n isVisible: PropTypes.bool.isRequired,\r\n serverContext: PropTypes.shape({\r\n CurrentAccount: PropTypes.object.isRequired,\r\n CurrentCustomer: PropTypes.object.isRequired,\r\n CurrentUser: PropTypes.object.isRequired,\r\n DecimalFormatter: PropTypes.object.isRequired,\r\n Token: PropTypes.string.isRequired,\r\n }).isRequired,\r\n showDatePicker: PropTypes.bool,\r\n siteMap: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n scope: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n preferenceService: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n experimentId: PropTypes.number.isRequired,\r\n};\r\n","/* eslint-disable no-param-reassign */\r\nimport _ from 'underscore';\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { StateStore } from '@bingads-webui/state-store';\r\nimport { withStateStore } from '@bingads-webui/with-state-store';\r\nimport { withScope } from '@bingads-webui-react/scope-service';\r\nimport { withGlobalFilter } from '@bingads-webui-campaign-react/global-filter-context';\r\nimport { StyledSubPageMenu, HistoryButton, AutoApplyButton } from '@bingads-webui-campaign-react/sub-page-menu';\r\nimport {\r\n withSiteMap,\r\n processorSet,\r\n} from '@bingads-webui-campaign-react/with-site-map';\r\nimport { formatPercentOneDecimal } from '@bingads-webui-campaign/recommendation-core';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport { StyledRecOptimizationOverallScore } from '@bingads-webui-campaign-react/recommendation-os-overall';\r\nimport { Activity, Scenario } from '@bingads-webui-react/hoc-with-signal';\r\n\r\nexport const recommendationDataStore = new StateStore({});\r\n\r\nconst WithSiteMapSubPageMenu = withSiteMap(\r\n React.memo(StyledSubPageMenu),\r\n processorSet.all\r\n);\r\n\r\nclass RecommendationSubPageMenu extends React.Component {\r\n static defaultProps = {\r\n showDatePicker: false,\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n this.renderCategoryOptimizationScore = this.renderCategoryOptimizationScore.bind(this);\r\n this.getTabItems = this.getTabItems.bind(this);\r\n }\r\n\r\n getTabItems(tabItems) {\r\n const categoryScoreUpLifts = this.props.store.state.categoryScoreUpLifts &&\r\n _.map(this.props.store.state.categoryScoreUpLifts, e =>\r\n ({ ScoreUpLift: e.ScoreUpLift, Category: e.Category.split(' ')[0] }));\r\n return _.map(tabItems, (item) => {\r\n const categoryScoreUpLift = _.findWhere(categoryScoreUpLifts, { Category: item.id });\r\n return _.extend(\r\n {},\r\n item,\r\n { scoreUpLift: categoryScoreUpLift && categoryScoreUpLift.ScoreUpLift }\r\n );\r\n });\r\n }\r\n\r\n changeLayout = (params) => {\r\n const { overallOptimizationScoreBar } = this.props.store.state;\r\n\r\n if (params.tab && params.tab.mode && !_.isEmpty(overallOptimizationScoreBar)) {\r\n params.tab.mode = 'optimizationScore';\r\n }\r\n\r\n this.props.changeLayout(params);\r\n }\r\n\r\n renderMainOptScore() {\r\n const {\r\n overallOptimizationScoreBar,\r\n renderDownloadButton,\r\n isAutoApplyRecommendationEnabled,\r\n } = this.props.store.state;\r\n\r\n return (\r\n }\r\n renderDownloadButton={renderDownloadButton}\r\n renderHistoryButton={() => }\r\n i18n={this.props.i18n}\r\n scope={this.props.scope}\r\n isAsyncApplyEnabled={this.props.permissions.IsBAARecommendationsAsyncApplyEnabled}\r\n isAutoApplyRecommendationEnabled={isAutoApplyRecommendationEnabled}\r\n showDownloadButton={!this.props.scope.values.recommendationType}\r\n />\r\n );\r\n }\r\n\r\n renderCategoryOptimizationScore(categoryItem) {\r\n let categoryScore = '';\r\n\r\n if (categoryItem.scoreUpLift && categoryItem.scoreUpLift !== 0) {\r\n categoryScore = `+${formatPercentOneDecimal(categoryItem.scoreUpLift, this.props.i18n)}`;\r\n }\r\n\r\n return !_.isUndefined(categoryItem.scoreUpLift) && (\r\n
{categoryScore}
\r\n );\r\n }\r\n\r\n render() {\r\n const { permissions, scope } = this.props;\r\n const {\r\n overallOptimizationScoreBar,\r\n categoryScoreUpLifts,\r\n renderDownloadButton,\r\n isAutoApplyRecommendationEnabled,\r\n } = this.props.store.state;\r\n\r\n return (\r\n \r\n {!_.isEmpty(overallOptimizationScoreBar) && renderDownloadButton && this.renderMainOptScore()}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport const StyledRecommendationSubPageMenu =\r\n withStateStore(withScope(withGlobalFilter(withI18nConsumer(RecommendationSubPageMenu))), recommendationDataStore);\r\n\r\nRecommendationSubPageMenu.propTypes = {\r\n changeLayout: PropTypes.func.isRequired,\r\n available: PropTypes.bool.isRequired,\r\n isVisible: PropTypes.bool.isRequired,\r\n serverContext: PropTypes.shape({\r\n CurrentAccount: PropTypes.object.isRequired,\r\n CurrentCustomer: PropTypes.object.isRequired,\r\n CurrentUser: PropTypes.object.isRequired,\r\n DecimalFormatter: PropTypes.object.isRequired,\r\n Token: PropTypes.string.isRequired,\r\n }).isRequired,\r\n showDatePicker: PropTypes.bool,\r\n siteMap: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n scope: PropTypes.shape({\r\n values: PropTypes.shape({\r\n recommendationType: PropTypes.string,\r\n }).isRequired,\r\n }).isRequired,\r\n preferenceService: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n store: PropTypes.instanceOf(StateStore).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n permissions: PropTypes.shape({\r\n IsBAARecommendationsAsyncApplyEnabled: PropTypes.bool.isRequired,\r\n }).isRequired,\r\n};\r\n","import React, { useContext } from 'react';\r\nimport { Glyphicon, Button } from '@bingads-webui-react/primitive';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\n\r\nfunction DisabledDatePicker() {\r\n const today = new Date();\r\n const fourteenDaysAgo = new Date(\r\n today.getFullYear(),\r\n today.getMonth(),\r\n today.getDate() - 13,\r\n today.getHours(),\r\n today.getMinutes()\r\n );\r\n const i18n = useContext(I18nContext);\r\n const formattedToday = today.toLocaleDateString();\r\n const formattedStartDate = fourteenDaysAgo.toLocaleDateString();\r\n const buttonText = `${i18n.getString(_TL_('Last 14 days: '))}${formattedStartDate} - ${formattedToday}`;\r\n\r\n return (\r\n {buttonText}\r\n \r\n \r\n );\r\n}\r\n\r\nexport default DisabledDatePicker;\r\n","import { Constants } from '@bingads-webui-theme-2018/theme-fluent';\r\n\r\nconst paddingLeft = Constants.PagePadding.smallMainSectionLeftPadding;\r\n\r\nexport const getTabBarStyles = (_, { palette = {} }) => ({\r\n menuContainer: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n alignItems: 'stretch',\r\n marginLeft: '23px',\r\n '& .ms-Pivot': {\r\n height: '100%',\r\n overflow: 'hidden',\r\n '& .ms-Button': {\r\n height: '100%',\r\n outlineOffset: '-1px',\r\n '& a': {\r\n textDecoration: 'none',\r\n },\r\n '& .category-score-upLift': {\r\n display: 'inline',\r\n marginLeft: 8,\r\n fontWeight: 600,\r\n fontSize: 18,\r\n color: palette.themePrimary,\r\n },\r\n },\r\n },\r\n '&.campaigns, &.adgroups, &.ads-and-extensions, &.keywords, &.audiences': {\r\n marginLeft: paddingLeft - 8, // 8 is internal tab button padding\r\n },\r\n '& #bingads-campaign-react-sub-page-menu-tabs-tab-Dismissed:before': {\r\n backgroundColor: palette.neutralQuaternaryAlt,\r\n bottom: 14,\r\n width: 1,\r\n content: '\\'\\'',\r\n height: 30,\r\n left: -4,\r\n position: 'absolute',\r\n },\r\n '& button.ms-Pivot-link:active #bingads-campaign-react-sub-page-menu-tabs-tab-Dismissed:before': {\r\n left: -12,\r\n },\r\n },\r\n onlyOneTabItem: {\r\n '& .nav-tabs>li.active': {\r\n '&:hover': {\r\n backgroundColor: palette.white,\r\n },\r\n\r\n '& a': {\r\n fontSize: '26px !important',\r\n '&:before': {\r\n border: 'none',\r\n },\r\n '&:hover': {\r\n backgroundColor: palette.white,\r\n },\r\n },\r\n },\r\n },\r\n notAvailableTextContainer: {\r\n color: palette.white,\r\n '&:hover': {\r\n color: palette.themePrimary,\r\n textDecoration: 'none',\r\n '& .iconba-OpenInNewWindow': {\r\n opacity: 1,\r\n },\r\n },\r\n '&:active': {\r\n color: palette.themePrimary,\r\n textDecoration: 'none',\r\n '& .iconba-OpenInNewWindow': {\r\n opacity: 1,\r\n },\r\n },\r\n '&:focus': {\r\n color: palette.themePrimary,\r\n textDecoration: 'none',\r\n '& .iconba-OpenInNewWindow': {\r\n opacity: 1,\r\n },\r\n },\r\n textDecoration: 'none',\r\n },\r\n availableTextContainer: {\r\n color: palette.white,\r\n textDecoration: 'none',\r\n },\r\n selectedTextContainer: {\r\n color: palette.white,\r\n },\r\n fallBackTextContainer: {\r\n color: palette.themePrimary,\r\n '& .iconba-OpenInNewWindow': {\r\n opacity: 1,\r\n },\r\n },\r\n text: {\r\n color: palette.neutralPrimary,\r\n },\r\n fallbackGlyph: {\r\n fontSize: 16,\r\n paddingLeft: '3px',\r\n color: 'inherit',\r\n opacity: 0,\r\n },\r\n singleItem: {\r\n fontSize: 26,\r\n fontWeight: 800,\r\n paddingTop: 0,\r\n paddingBottom: 0,\r\n paddingLeft: 8,\r\n paddingRight: 8,\r\n marginRight: 8,\r\n justifyContent: 'center',\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n expandButtonContainer: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n },\r\n});\r\n","import React from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { withScope } from '@bingads-webui-react/scope-service';\r\nimport { CampaignType } from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { Glyphicon } from '@bingads-webui-react/primitive';\r\nimport { Pivot, PivotItem, PivotLinkSize, FocusZone, IconButton } from '@fluentui/react';\r\nimport { FallbackCallout } from '@bingads-webui-react/fallback-feature';\r\nimport { SecondaryNavigationExpandButton } from '@bingads-webui-campaign-react/secondary-navigation-expand-button';\r\nimport { withPermissions } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { isNavigationRefreshOn } from '@bingads-webui-react/preference-utility';\r\nimport {\r\n siteMapPropType,\r\n withSiteMap,\r\n processor,\r\n navRefreshSiteMap\r\n} from '@bingads-webui-campaign-react/with-site-map';\r\nimport { processorSet } from '@bingads-webui-react/with-site-map';\r\nimport { withComponentErrorLogging } from '@bingads-webui-campaign-react/global-error-options';\r\n\r\nimport { getTabBarStyles } from '../styles/tab-bar-styles';\r\n\r\nconst DROP_DOWN_PIVOT_ITEM = 'dropdown-pivot';\r\n\r\nconst navRefreshProcessorSet = [\r\n processor.processImportCenterMode,\r\n processor.processMixedModeAdGroup,\r\n processor.processGlobalFilter,\r\n processor.processCampaignType,\r\n processor.processCampaignId,\r\n processor.processSmartCampaign,\r\n processor.processSmartShoppingCampaign,\r\n processor.processHotelCampaign,\r\n processor.processPmaxCampaignPageMenu,\r\n processor.processPmaxRetailCampaignPageMenu,\r\n ...processorSet.navRefresh,\r\n];\r\n\r\nconst ExpandButton = withComponentErrorLogging(withSiteMap(SecondaryNavigationExpandButton, navRefreshProcessorSet, navRefreshSiteMap), 'NavigationRefreshSecondaryNavigationExpandButton');\r\n\r\nclass TabBar extends React.PureComponent {\r\n static defaultProps = { fallBackTabItem: null };\r\n\r\n constructor(props) {\r\n super(props);\r\n const {\r\n classes,\r\n className,\r\n tabItems,\r\n responsiveSize,\r\n } = props;\r\n\r\n const subMenuClassNamePrefix = 'bingads-campaign-react-tab-bar';\r\n this.menuContainerPartClassName = classNames([\r\n classes.menuContainer,\r\n subMenuClassNamePrefix,\r\n className,\r\n 'large-links',\r\n `maxTabSize${responsiveSize}`]);\r\n if (tabItems.length === 1) {\r\n this.menuContainerPartClassName = classNames([this.menuContainerPartClassName, this.props.classes.onlyOneTabItem]);\r\n }\r\n this.moreButtonRef = React.createRef();\r\n }\r\n\r\n onSelectPivotItem = (item) => {\r\n if (item.props.itemKey !== DROP_DOWN_PIVOT_ITEM) {\r\n this.props.onSelect(item.props.itemKey);\r\n } else {\r\n this.moreButtonRef.current.openMenu();\r\n }\r\n };\r\n\r\n genereateOverflowMenuItemProps = (leftOverItems) => {\r\n const { i18n } = this.props;\r\n const menuProps = {};\r\n menuProps.items = [];\r\n _.each(leftOverItems, (item, index) => {\r\n menuProps.items[index] = {};\r\n const menuItem = menuProps.items[index];\r\n menuItem.key = item.id;\r\n menuItem.text = i18n.getString(item.name);\r\n menuItem.onClick = () => this.props.onSelect(item.id);\r\n });\r\n return menuProps;\r\n };\r\n\r\n generateTabItemsFragment = (items) => {\r\n const tabItemsFragement = items.map(item => ((\r\n this.title(item)}\r\n />\r\n )));\r\n\r\n return tabItemsFragement;\r\n };\r\n\r\n title = (item) => {\r\n const {\r\n classes,\r\n i18n,\r\n fallBackTabItem,\r\n handleClose,\r\n availableTabItems,\r\n onTabItemRender,\r\n renderExtraContent,\r\n selectedTabItem,\r\n } = this.props;\r\n const classNameArray = [classes.textContainer];\r\n\r\n const localizedName = i18n.getString(item.name);\r\n if (_.find(availableTabItems, tabItem => tabItem.id === item.id)) {\r\n const isSelected = selectedTabItem.id === item.id;\r\n return ((\r\n \r\n \r\n \r\n {localizedName}\r\n \r\n {onTabItemRender && onTabItemRender(item)}\r\n \r\n {renderExtraContent(item)}\r\n \r\n ));\r\n }\r\n\r\n classNameArray.push(classes.notAvailableTextContainer);\r\n if (fallBackTabItem === item) {\r\n classNameArray.push(classes.fallBackTextContainer);\r\n }\r\n\r\n return ((\r\n \r\n
\r\n {localizedName}\r\n \r\n
\r\n \r\n ));\r\n };\r\n\r\n renderExpandButton = () => {\r\n const { classes, permissions } = this.props;\r\n if (!isNavigationRefreshOn(permissions)) {\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n };\r\n\r\n render() {\r\n const {\r\n selectedTabItem,\r\n tabItems,\r\n responsiveSize,\r\n i18n,\r\n classes,\r\n className,\r\n } = this.props;\r\n\r\n let orderedTabItems = [];\r\n let tabItemsFragement = null;\r\n\r\n // tab bar must not be present when there's no selected item. Happens in rare scenarios such as when\r\n // user switches from an account which has lot of campaings to an account which has none. If the current\r\n // page is not part of the scope, tab bar will throw an error and crash the page since selectedTabItem is\r\n // empty.\r\n if (_.isEmpty(selectedTabItem)) {\r\n return null;\r\n }\r\n\r\n const selectedIndex = _.findIndex(tabItems, item => item.id === selectedTabItem.id);\r\n\r\n // rearranging logic.\r\n // responsive size 0 is show all tabs.\r\n // responsibe size 1,2,3 corresponds to number of tabs we can show.\r\n // if responsize size is 0 we show all the tabs.\r\n // if responsive size is either 1,2,3 and the selectedTab's Index is not within responsive size range, we replace the last item in the tabs with the selected item\r\n // and fill in the other items.\r\n // for responsive size = 3 and tabItems = 5 selectedIndex = 3 well have\r\n // firstSetOfTabs = [0, 1]\r\n // selectedIndex = [3]\r\n // restOfTheTabs = [2, 4]\r\n // after rearranging [0,1,3,2,4]\r\n\r\n if (responsiveSize === 0) {\r\n // this is when we have space to show all the elements.\r\n tabItemsFragement = this.generateTabItemsFragment(tabItems);\r\n } else {\r\n if (selectedIndex >= responsiveSize) {\r\n const firstSetOfTabs = tabItems.slice(0, responsiveSize - 1);\r\n const restOfTheTabs = _.filter(tabItems.slice(responsiveSize - 1, tabItems.length), item => item.id !== selectedTabItem.id);\r\n orderedTabItems = [...firstSetOfTabs, selectedTabItem, ...restOfTheTabs];\r\n } else {\r\n orderedTabItems = tabItems;\r\n }\r\n\r\n tabItemsFragement = this.generateTabItemsFragment(orderedTabItems);\r\n }\r\n\r\n let newItems = tabItemsFragement;\r\n let leftOverItems = [];\r\n\r\n if (responsiveSize > 0) {\r\n newItems = newItems.slice(0, responsiveSize);\r\n leftOverItems = orderedTabItems.slice(responsiveSize, orderedTabItems.length);\r\n }\r\n\r\n if (leftOverItems.length > 0) {\r\n const moreIcon = {\r\n iconName: 'More',\r\n };\r\n\r\n const contextualMenu = (\r\n null}\r\n />\r\n );\r\n\r\n const pivotOverflowItem = (\r\n contextualMenu}\r\n itemKey={DROP_DOWN_PIVOT_ITEM}\r\n key={DROP_DOWN_PIVOT_ITEM}\r\n />\r\n );\r\n newItems.push(pivotOverflowItem);\r\n }\r\n if (tabItems.length === 1) {\r\n return (\r\n
\r\n {this.renderExpandButton()}\r\n \r\n {i18n.getString(tabItems[0].name)}\r\n \r\n
\r\n );\r\n }\r\n\r\n return (\r\n <>\r\n {this.renderExpandButton()}\r\n \r\n {newItems}\r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nTabBar.propTypes = {\r\n classes: PropTypes.shape(_.mapObject(\r\n getTabBarStyles({}, {}),\r\n _.constant(PropTypes.string.isRequired)\r\n )).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n className: PropTypes.string.isRequired,\r\n responsiveSize: PropTypes.number,\r\n onSelect: PropTypes.func.isRequired,\r\n handleClose: PropTypes.func.isRequired,\r\n tabItems: siteMapPropType.isRequired,\r\n availableTabItems: PropTypes.arrayOf(PropTypes.shape({\r\n id: PropTypes.string,\r\n name: PropTypes.string,\r\n route: PropTypes.string,\r\n selected: PropTypes.bool,\r\n campaignTypes: PropTypes.arrayOf(PropTypes.oneOf([\r\n CampaignType.None,\r\n CampaignType.Default,\r\n CampaignType.Shopping,\r\n CampaignType.DynamicSearchAds,\r\n CampaignType.Audience,\r\n CampaignType.Smart,\r\n CampaignType.Hotel,\r\n CampaignType.All,\r\n ])),\r\n available: PropTypes.bool,\r\n })).isRequired,\r\n selectedTabItem: PropTypes.shape({\r\n id: PropTypes.string,\r\n name: PropTypes.string,\r\n route: PropTypes.string,\r\n selected: PropTypes.bool,\r\n campaignTypes: PropTypes.arrayOf(PropTypes.oneOf([\r\n CampaignType.None,\r\n CampaignType.Default,\r\n CampaignType.Shopping,\r\n CampaignType.DynamicSearchAds,\r\n CampaignType.Audience,\r\n CampaignType.Smart,\r\n CampaignType.Hotel,\r\n CampaignType.All,\r\n ])),\r\n available: PropTypes.bool,\r\n }).isRequired,\r\n fallBackTabItem: PropTypes.shape({\r\n id: PropTypes.string,\r\n name: PropTypes.string,\r\n route: PropTypes.string,\r\n selected: PropTypes.bool,\r\n campaignTypes: PropTypes.arrayOf(PropTypes.oneOf([\r\n CampaignType.None,\r\n CampaignType.Default,\r\n CampaignType.Shopping,\r\n CampaignType.DynamicSearchAds,\r\n CampaignType.Audience,\r\n CampaignType.Smart,\r\n CampaignType.Hotel,\r\n CampaignType.All,\r\n ])),\r\n available: PropTypes.bool,\r\n }),\r\n onTabItemRender: PropTypes.func,\r\n renderExtraContent: PropTypes.func,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n NavigationRefresh: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n};\r\n\r\nTabBar.defaultProps = {\r\n responsiveSize: 0,\r\n onTabItemRender: null,\r\n renderExtraContent: () => null,\r\n};\r\nexport const StyledTabBar =\r\n withPermissions(withScope(withDefaultStyles(TabBar, getTabBarStyles)));\r\n","/* eslint-disable react-hooks/rules-of-hooks */\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { CivilDate } from 'tc39-proposal-temporal';\r\nimport { ComparedDateRangePicker } from '@bingads-webui-react/compared-date-range-picker';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { withScope } from '@bingads-webui-react/scope-service';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport { withInstrumentation } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { generateDateData, getRangesFromData, translateLegacyToIANATimezone } from '@bingads-webui-universal/temporal-utitlities';\r\n\r\nconst updateToWaterfallFilter = (props, dateFromDatePicker) => {\r\n const data = generateDateData(\r\n props.i18n,\r\n dateFromDatePicker,\r\n props.dateFormat,\r\n props.lcid,\r\n translateLegacyToIANATimezone(props.timeZone)\r\n );\r\n props.updateWaterfallFilter(data);\r\n};\r\n\r\nconst DatePicker = React.memo((props) => {\r\n const {\r\n i18n,\r\n dateFilter,\r\n dateFormat,\r\n lcid,\r\n timeZone,\r\n onSwitchCompare,\r\n instrumentation,\r\n disableCompare,\r\n minDate,\r\n serverContext,\r\n rangeIds,\r\n } = props;\r\n const { selectedRange, selectedComparedRange } =\r\n getRangesFromData(i18n, dateFilter, dateFormat, lcid);\r\n\r\n const dateRangePickedLogger = instrumentation.datePicker.create().dateRangePicked.create();\r\n\r\n const dateRangeLogger = (dateRange) => {\r\n dateRangePickedLogger.trace({\r\n dateRange,\r\n });\r\n if (dateRange != null && dateRange.method === 'onApply') {\r\n setClarityTag({ DatePickerOnApply: 'true' });\r\n }\r\n if (dateRange != null && dateRange.method === 'onQuickApply') {\r\n setClarityTag({ DatePickerOnQuickApply: 'true' });\r\n }\r\n };\r\n\r\n const isImprovedDateRangePickerEnabled = serverContext.DynamicPermissions && serverContext.DynamicPermissions.ImprovedDateFilter;\r\n\r\n if (isImprovedDateRangePickerEnabled) {\r\n useDefaultStyles(() => ({\r\n '@global': {\r\n 'main .app-shell-tab .compared-date-range-picker': {\r\n minWidth: '375px',\r\n '& .compared-date-range-picker-input': {\r\n minWidth: '375px',\r\n textAlign: 'right',\r\n },\r\n },\r\n },\r\n }));\r\n }\r\n\r\n return (\r\n updateToWaterfallFilter(props, dateFromDatePicker)}\r\n onSwitchCompare={onSwitchCompare}\r\n dateRangeLogger={dateRangeLogger}\r\n disableCompare={disableCompare}\r\n rangeIds={rangeIds}\r\n minDate={minDate}\r\n />);\r\n});\r\n\r\nDatePicker.propTypes = {\r\n dateFilter: PropTypes.shape({\r\n RangeStartDate: PropTypes.string,\r\n RangeEndDate: PropTypes.string,\r\n RangeId: PropTypes.number,\r\n Rangelcid: PropTypes.number,\r\n RangeIndex: PropTypes.number,\r\n RangeDays: PropTypes.number,\r\n compared: PropTypes.shape({\r\n start: PropTypes.instanceOf(Date),\r\n end: PropTypes.instanceOf(Date),\r\n formattedStart: PropTypes.string,\r\n formattedEnd: PropTypes.string,\r\n key: PropTypes.string,\r\n text: PropTypes.string,\r\n }),\r\n }),\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n // eslint-disable-next-line\r\n lcid: PropTypes.number.isRequired,\r\n timeZone: PropTypes.number.isRequired,\r\n dateFormat: PropTypes.string.isRequired,\r\n onSwitchCompare: PropTypes.func.isRequired,\r\n // eslint-disable-next-line react/forbid-prop-types\r\n instrumentation: PropTypes.object.isRequired,\r\n disableCompare: PropTypes.bool,\r\n serverContext: PropTypes.shape({\r\n DynamicPermissions: PropTypes.shape({\r\n ImprovedDateFilter: PropTypes.bool,\r\n }),\r\n }),\r\n rangeIds: PropTypes.object,\r\n minDate: PropTypes.instanceOf(CivilDate),\r\n};\r\n\r\nDatePicker.defaultProps = {\r\n dateFilter: {},\r\n disableCompare: false,\r\n minDate: null,\r\n serverContext: {},\r\n rangeIds: {},\r\n};\r\n\r\nexport const DatePickerWithScope = withInstrumentation(withScope(DatePicker));\r\n","import React from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { Glyphicon } from '@bingads-webui-react/primitive';\r\nimport { withSiteMap, getRoutePathById } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport { QueryParam, withScope } from '@bingads-webui-react/scope-service';\r\nimport { Callout } from '@bingads-webui-react/callout';\r\n\r\nimport { getHistoryButtonStyles } from '../styles/history-button-styles';\r\n\r\nfunction historyClickHandler(siteMap, scope, accountId) {\r\n scope.save(getRoutePathById(\r\n siteMap,\r\n _.isUndefined(accountId) ?\r\n 'mcc-recommendation-history' :\r\n 'baa-recommendation-history'\r\n ));\r\n}\r\n\r\nclass historyButton extends React.Component {\r\n state = { showPopover: false };\r\n\r\n toggle = () => {\r\n this.setState(state => ({ showPopover: !state.showPopover }));\r\n }\r\n\r\n render() {\r\n const {\r\n i18n, scope, siteMap, classes,\r\n } = this.props;\r\n const { aid: accountId } = scope.values;\r\n\r\n return (\r\n
\r\n {i18n.getString(_TL_('My applied recommendation history'))}\r\n }\r\n placement=\"bottom\"\r\n closeButton={false}\r\n >\r\n historyClickHandler(siteMap, scope, accountId)}\r\n onFocus={this.toggle}\r\n onBlur={this.toggle}\r\n onMouseOver={this.toggle}\r\n onMouseOut={this.toggle}\r\n className={classes.entityContentRecommendationHistory}\r\n aria-label={i18n.getString(_TL_('My Applied Recommendation History'))}\r\n >\r\n \r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nhistoryButton.propTypes = {\r\n classes: PropTypes.shape(_.mapObject(\r\n getHistoryButtonStyles({}, {}),\r\n _.constant(PropTypes.string.isRequired)\r\n )).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n siteMap: PropTypes.arrayOf(PropTypes.any).isRequired,\r\n};\r\n\r\nconst HistoryButton = withI18nConsumer(withSiteMap(withScope(withDefaultStyles(historyButton, getHistoryButtonStyles))));\r\n\r\nexport {\r\n HistoryButton,\r\n};\r\n","export const getHistoryButtonStyles = (_, { palette = {} }) => ({\r\n recommendationHistoryItem: {\r\n position: 'relative',\r\n top: '5px',\r\n marginRight: '19px',\r\n textAlign: 'right',\r\n },\r\n entityContentRecommendationHistory: {\r\n border: 'none',\r\n cursor: 'pointer',\r\n overflow: 'hidden',\r\n outline: 'none',\r\n backgroundColor: 'Transparent',\r\n backgroundRepeat: 'no-repeat',\r\n },\r\n entityIcon: {\r\n position: 'relative',\r\n lineHeight: '16px',\r\n fontSize: '16px',\r\n color: palette.themePrimary,\r\n },\r\n entityContent: {\r\n lineHeight: '16px',\r\n fontSize: '12px',\r\n color: palette.neutralPrimary,\r\n whiteSpace: 'nowrap',\r\n },\r\n recommendationHistoryPopover: {\r\n '& .popover-content': {\r\n padding: '11px 18px',\r\n },\r\n },\r\n});\r\n","import React from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { Glyphicon } from '@bingads-webui-react/primitive';\r\nimport { withSiteMap, getRoutePathById } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport { QueryParam, withScope } from '@bingads-webui-react/scope-service';\r\nimport { Callout } from '@bingads-webui-react/callout';\r\nimport { StyledMenuItemTag } from '@bingads-webui-react/menu-item-tag';\r\n\r\nimport { getAutoApplyItemButtonStyles } from '../styles/auto-apply-button-styles';\r\n\r\nfunction autoApplyClickHandler(siteMap, scope) {\r\n scope.save(getRoutePathById(\r\n siteMap,\r\n 'recommendation-auto-apply-settings'\r\n ));\r\n}\r\n\r\nclass autoApplyButton extends React.Component {\r\n state = { showPopover: false };\r\n\r\n toggle = () => {\r\n this.setState(state => ({ showPopover: !state.showPopover }));\r\n }\r\n\r\n render() {\r\n const showTag = {\r\n text: _TL_('BETA'),\r\n expDate: new Date('2023/03/31'),\r\n };\r\n const {\r\n i18n, scope, siteMap, classes,\r\n } = this.props;\r\n\r\n return (\r\n
\r\n {i18n.getString(_TL_('Auto-apply setting'))}\r\n }\r\n placement=\"bottom\"\r\n closeButton={false}\r\n >\r\n autoApplyClickHandler(siteMap, scope)}\r\n onFocus={this.toggle}\r\n onBlur={this.toggle}\r\n onMouseOver={this.toggle}\r\n onMouseOut={this.toggle}\r\n className={classes.entityContentRecommendationAutoApply}\r\n aria-label={i18n.getString(_TL_('Auto-apply setting'))}\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\nautoApplyButton.propTypes = {\r\n classes: PropTypes.shape(_.mapObject(\r\n getAutoApplyItemButtonStyles({}, {}),\r\n _.constant(PropTypes.string.isRequired)\r\n )).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n siteMap: PropTypes.arrayOf(PropTypes.any).isRequired,\r\n};\r\n\r\nconst AutoApplyButton = withI18nConsumer(withSiteMap(withScope(withDefaultStyles(autoApplyButton, getAutoApplyItemButtonStyles))));\r\n\r\nexport {\r\n AutoApplyButton,\r\n};\r\n","export const getAutoApplyItemButtonStyles = (_, { palette = {} }) => ({\r\n entityContentRecommendationAutoApply: {\r\n border: 'none',\r\n cursor: 'pointer',\r\n overflow: 'hidden',\r\n outline: 'none',\r\n backgroundColor: 'Transparent',\r\n backgroundRepeat: 'no-repeat',\r\n },\r\n entityIcon: {\r\n position: 'relative',\r\n lineHeight: '16px',\r\n fontSize: '16px',\r\n color: palette.themePrimary,\r\n },\r\n entityContent: {\r\n lineHeight: '16px',\r\n fontSize: '12px',\r\n color: palette.neutralPrimary,\r\n whiteSpace: 'nowrap',\r\n },\r\n recommendationAutoApplyPopover: {\r\n '& .popover-content': {\r\n padding: '11px 18px',\r\n },\r\n },\r\n betaTagContainer: {\r\n top: -16,\r\n right: -32,\r\n position: 'absolute',\r\n },\r\n});\r\n","import React from 'react';\r\nimport $ from 'jquery';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport _ from 'underscore';\r\nimport queryString from 'query-string';\r\nimport { CivilDate } from 'tc39-proposal-temporal';\r\nimport { findSelectedNode } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { components, LayoutContext } from '@bingads-webui-react/app-layout-container';\r\nimport { COPILOT_WIDTH } from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport { withGlobalFilter } from '@bingads-webui-campaign-react/global-filter-context';\r\nimport { WaterfallFilterType } from '@bingads-webui-campaign/filter-storage';\r\nimport { QueryParam, withScope } from '@bingads-webui-react/scope-service';\r\nimport { RANGES } from '@bingads-webui-react/compared-date-range-picker';\r\nimport { withResponsiveSize } from '@bingads-webui-react/with-responsive-size';\r\nimport { withPageReady } from '@bingads-webui-react/with-page-ready';\r\nimport { withActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport DisabledDatePicker from './components/disabled-date-picker';\r\nimport { StyledTabBar } from './components/tab-bar';\r\nimport { getSubPageMenuStyles } from './styles/sub-page-menu-styles';\r\nimport { DatePickerWithScope } from './components/date-picker';\r\nimport { HistoryButton } from './components/history-button';\r\nimport { AutoApplyButton } from './components/auto-apply-button';\r\nimport { getPathNameOfSubPageItem } from './common/router-helper';\r\n\r\nconst getSelectedItemsFromMap = items => _.find(items, item => item.selected);\r\nconst getAvailableItemsFromMap = items => _.filter(items, item => item.available);\r\nconst subPageMenuTabFont = '600 18px Segoe UI';\r\nconst paddingLeft = 8;\r\nconst paddingRight = 8;\r\nconst marginRight = 8;\r\nconst subPageMenuTabSpaceBetween = paddingLeft + paddingRight + marginRight;\r\n\r\nclass SubPageMenuInternal extends React.Component {\r\n static defaultProps = {\r\n showDatePicker: true,\r\n showDisabledDatePicker: false,\r\n singleTabMode: false,\r\n initialResetLayout: true,\r\n forceResetLayout: false,\r\n showHistoryButton: false,\r\n showDownloadButton: false,\r\n showAutoApplyButton: false,\r\n getTabItems: _.identity,\r\n disableCompare: false,\r\n onTabItemRender: null,\r\n renderExtraContent: () => null,\r\n renderDownloadButton: () => null,\r\n minDate: null,\r\n selectedParent: '',\r\n activity: { signal: _.noop },\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n fallBackTabItem: null,\r\n SubPageMenuResponsiveSizes: [],\r\n subMenuClassName: '',\r\n pickerContainerPartClassName: '',\r\n tabBarPreFixClassName: '',\r\n datePickerWidth: 0,\r\n };\r\n if (props.initialResetLayout) {\r\n this.resetLayout(true);\r\n }\r\n this.ResponsiveTabBar = StyledTabBar;\r\n this.canvas = document.createElement('canvas');\r\n }\r\n\r\n componentDidMount() {\r\n this.getResponsiveTabBar();\r\n }\r\n\r\n shouldComponentUpdate(nextProps, nextState) {\r\n if (this.props.siteMap !== nextProps.siteMap) {\r\n this.ResponsiveTabBar = StyledTabBar;\r\n }\r\n\r\n if (nextProps.scope !== this.props.scope\r\n || nextProps.serverContext !== this.props.serverContext\r\n || nextProps.showDatePicker !== this.props.showDatePicker\r\n || nextProps.showDisabledDatePicker !== this.props.showDisabledDatePicker\r\n || nextProps.disableCompare !== this.props.disableCompare\r\n || nextProps.showHistoryButton !== this.props.showHistoryButton\r\n || nextProps.showAutoApplyButton !== this.props.showAutoApplyButton\r\n || nextProps.showDownloadButton !== this.props.showDownloadButton\r\n || nextProps.siteMap !== this.props.siteMap\r\n || nextState.SubPageMenuResponsiveSizes !== this.state.SubPageMenuResponsiveSizes\r\n || nextState.fallBackTabItem !== this.state.fallBackTabItem\r\n || nextProps.mode !== this.props.mode\r\n || nextState.subMenuClassName !== this.state.subMenuClassName\r\n || nextState.pickerContainerPartClassName !== this.state.pickerContainerPartClassName\r\n || nextState.tabBarPreFixClassName !== this.state.tabBarPreFixClassName\r\n || nextState.datePickerWidth !== this.state.datePickerWidth\r\n || nextProps.singleTabMode !== this.props.singleTabMode\r\n || this.getIsCopilotExpanded(nextProps) !== this.getIsCopilotExpanded(this.props)\r\n ) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n componentDidUpdate(prevProps) {\r\n if (this.props.siteMap !== prevProps.siteMap || this.getIsCopilotExpanded(prevProps) !== this.getIsCopilotExpanded(this.props) || this.props.singleTabMode !== prevProps.singleTabMode) {\r\n this.getResponsiveTabBar();\r\n }\r\n\r\n if (prevProps.showDisabledDatePicker !== this.props.showDisabledDatePicker\r\n || prevProps.showDatePicker !== this.props.showDatePicker\r\n || prevProps.disableCompare !== this.props.disableCompare\r\n || prevProps.mode !== this.props.mode\r\n || this.props.forceResetLayout) {\r\n this.resetLayout();\r\n }\r\n }\r\n\r\n onSelect = (selectedKey) => {\r\n const { activity } = this.props;\r\n activity.signal(`sub page menu item clicked, name: ${selectedKey}`);\r\n\r\n if (!this.selectedTabItem || selectedKey !== this.selectedTabItem.id) {\r\n const [clickedTabItem] = _.filter(this.tabItems, item => item.id === selectedKey);\r\n if (clickedTabItem.available) {\r\n this.setState({ fallBackTabItem: null });\r\n const pathname = getPathNameOfSubPageItem(clickedTabItem);\r\n let { search } = this.props.scope.history.location;\r\n if (pathname.includes('vnext/recommendations')) {\r\n search = queryString.parse(search);\r\n search = _.omit(search, 'recommendationType');\r\n search = queryString.stringify(search);\r\n }\r\n this.props.scope.history.push({\r\n pathname,\r\n search,\r\n });\r\n } else {\r\n this.setState({ fallBackTabItem: clickedTabItem });\r\n }\r\n } else {\r\n this.setState({ fallBackTabItem: null });\r\n }\r\n };\r\n\r\n onSwitchCompare = ({ isChecked }) => {\r\n if (isChecked) {\r\n this.props.changeLayout({ tab: { mode: 'expanded' } });\r\n this.setClassName('expanded');\r\n } else {\r\n this.props.changeLayout({ tab: { mode: 'collapsed' } });\r\n this.setClassName('collapsed');\r\n }\r\n };\r\n\r\n getTextWidth = (text) => {\r\n const context = this.canvas.getContext('2d');\r\n context.font = subPageMenuTabFont;\r\n const metrics = context.measureText(text);\r\n return metrics.width;\r\n };\r\n\r\n getIsCopilotExpanded(props) {\r\n const isCopilotExpanded = _.chain(props).result('layoutConfig').result('copilot').result('mode')\r\n .value() === 'expanded';\r\n return isCopilotExpanded;\r\n }\r\n\r\n getResponsiveTabBar() {\r\n const isCopilotExpanded = this.getIsCopilotExpanded(this.props);\r\n const SubPageMenuResponsiveSizes = [];\r\n let currentMinWidth = 100;\r\n for (let i = 0; i < this.tabItems.length; i += 1) {\r\n const currentItemWidth = this.getTextWidth(this.props.i18n.getString(this.tabItems[i].name));\r\n SubPageMenuResponsiveSizes.push({\r\n name: i + 1,\r\n minWidth: currentMinWidth + currentItemWidth + subPageMenuTabSpaceBetween + (isCopilotExpanded ? COPILOT_WIDTH : 0),\r\n });\r\n currentMinWidth += (currentItemWidth + subPageMenuTabSpaceBetween);\r\n }\r\n this.setState({ SubPageMenuResponsiveSizes }); //eslint-disable-line\r\n this.ResponsiveTabBar = this.tabItems.length > 0 && SubPageMenuResponsiveSizes.length > 0 ?\r\n withResponsiveSize(StyledTabBar, SubPageMenuResponsiveSizes) : StyledTabBar;\r\n }\r\n\r\n setClassName = (mode, init) => {\r\n let subMenuClassNamePrefix;\r\n if (mode === 'expanded') {\r\n subMenuClassNamePrefix = classNames('bingads-campaign-react-sub-page-menu', 'expanded');\r\n } else {\r\n subMenuClassNamePrefix = classNames('bingads-campaign-react-sub-page-menu', 'collapsed');\r\n }\r\n const subMenuClassName = classNames([this.props.classes.container, subMenuClassNamePrefix]);\r\n const pickerContainerPartClassName = classNames([this.props.classes.pickerContainer, subMenuClassNamePrefix]\r\n .concat(this.isImprovedDateRangePickerEnabled() ? [this.props.classes.pickerQuickContainer] : []));\r\n const tabBarPreFixClassName = mode;\r\n if (init) {\r\n this.state.subMenuClassName = subMenuClassName;\r\n this.state.pickerContainerPartClassName = pickerContainerPartClassName;\r\n this.state.tabBarPreFixClassName = tabBarPreFixClassName;\r\n } else {\r\n this.setState({\r\n subMenuClassName,\r\n pickerContainerPartClassName,\r\n tabBarPreFixClassName,\r\n });\r\n }\r\n };\r\n\r\n getOffset = (navMode, menuMode) => (components.nav[navMode].width || 0) + (components.menu[menuMode].width || 0);\r\n\r\n isImprovedDateRangePickerEnabled() {\r\n return this.props.serverContext.DynamicPermissions && this.props.serverContext.DynamicPermissions.ImprovedDateFilter;\r\n }\r\n\r\n handleClose = () => {\r\n this.setState({ fallBackTabItem: null });\r\n };\r\n\r\n updateDatePickerWidth = (newWidth) => {\r\n if (this.state.datePickerWidth !== newWidth && newWidth > 0) {\r\n this.setState({ datePickerWidth: newWidth });\r\n }\r\n };\r\n\r\n resetLayout = (init) => {\r\n if (this.props.mode !== 'hidden') {\r\n if (this.props.showDatePicker\r\n && this.props[WaterfallFilterType.DateFilter]\r\n && this.props[WaterfallFilterType.DateFilter].compared\r\n && !this.props.disableCompare\r\n ) {\r\n this.props.changeLayout({ tab: { mode: 'expanded' } });\r\n this.setClassName('expanded', init);\r\n } else {\r\n this.props.changeLayout({ tab: { mode: 'collapsed' } });\r\n this.setClassName('collapsed', init);\r\n }\r\n }\r\n };\r\n\r\n // Date picker need some initialization from parent components, which is not available for lazy load async\r\n renderDatePicker = () => {\r\n const {\r\n minDate,\r\n } = this.props;\r\n const civilMinDate = minDate ? new CivilDate(minDate.year, minDate.month, minDate.day) : minDate;\r\n\r\n const DatePickerWithPageReady = withPageReady(() => (\r\n
\r\n this.props.updateWaterfallFilter({\r\n filterType: WaterfallFilterType.DateFilter,\r\n filter: data,\r\n })}\r\n serverContext={this.props.serverContext}\r\n {...(this.props.location.pathname === '/campaign/vnext/uettag' || this.props.location.pathname === '/campaign/vnext/uettaginsights' ? {\r\n rangeIds: [\r\n RANGES.Custom,\r\n RANGES.Today,\r\n RANGES.Yesterday,\r\n RANGES.ThisWeek,\r\n RANGES.ThisWeekMon,\r\n RANGES.Last7Days,\r\n RANGES.LastWeek,\r\n RANGES.LastWeekMon,\r\n RANGES.Last14Days,\r\n RANGES.ThisMonth,\r\n RANGES.LastMonth,\r\n RANGES.Last30Days,\r\n RANGES.Last3Months,\r\n RANGES.Last6Months,\r\n RANGES.EntireTime,\r\n ],\r\n } : {})}\r\n minDate={civilMinDate}\r\n />\r\n
\r\n ), null);\r\n\r\n return ();\r\n };\r\n\r\n renderDisabledDatePicker = () => {\r\n const DisabledDatePickerWithPageReady = withPageReady(() => (\r\n
\r\n \r\n
\r\n ), null);\r\n\r\n return ();\r\n };\r\n\r\n renderHistoryButton = () => (\r\n \r\n \r\n \r\n );\r\n\r\n renderDownloadButton = () => (\r\n
\r\n {this.props.renderDownloadButton(true)}\r\n
\r\n );\r\n\r\n renderAutoApplyButton = () => (\r\n
\r\n \r\n
\r\n );\r\n\r\n render() {\r\n this.tabItems = [];\r\n if (this.props.singleTabMode) {\r\n const selectedleafItem = findSelectedNode(this.props.siteMap);\r\n if (selectedleafItem) {\r\n this.tabItems = [selectedleafItem];\r\n }\r\n } else {\r\n this.selectedPageMenu = getSelectedItemsFromMap(this.props.siteMap);\r\n if (this.selectedPageMenu) {\r\n this.tabItems = this.selectedPageMenu.children;\r\n }\r\n }\r\n\r\n const { getTabItems } = this.props;\r\n this.tabItems = getTabItems(this.tabItems);\r\n\r\n // in the case singleTabMode is set\r\n // both selectedTabItem and availableTabItems would be the selected leaf item\r\n this.selectedTabItem = getSelectedItemsFromMap(this.tabItems);\r\n this.availableTabItems = getAvailableItemsFromMap(this.tabItems);\r\n const datePickerShowOrHideClass = this.props.showDatePicker ? 'datePickerShow' : 'datePickerHide';\r\n const disabledDatePickerShowOrHideClass = this.props.showDisabledDatePicker ? 'disabledDatePickerShow' : 'disabledDatePickerHide';\r\n const currDatePickerWidth = $('.compared-date-range-picker button')[0] ? $('.compared-date-range-picker button')[0].clientWidth + 10 : 0;\r\n this.updateDatePickerWidth(currDatePickerWidth);\r\n const datePickerOffset = this.props.showDatePicker ? this.state.datePickerWidth : 0;\r\n const disabledDatePickerOffset = this.props.showDisabledDatePicker ? this.state.datePickerWidth : 0;\r\n const AutoApplyButtonWidth = this.props.showAutoApplyButton && $('.recommendation-auto-apply-item')[0] ?\r\n $('.recommendation-auto-apply-item')[0].clientWidth + 10 : 0;\r\n const AutoApplyButtonOffset = this.props.showAutoApplyButton ? AutoApplyButtonWidth : 0;\r\n const historyButtonWidth = this.props.showHistoryButton && $('.recommendation-history-item')[0] ?\r\n $('.recommendation-history-item')[0].clientWidth + 10 : 0;\r\n const historyButtonOffset = this.props.showHistoryButton ? historyButtonWidth : 0;\r\n const downloadButtonWidth = this.props.showDownloadButton && $('.recommendation-download-button')[0] ?\r\n $('.recommendation-download-button')[0].clientWidth + 10 : 0;\r\n const downloadButtonOffset = this.props.showDownloadButton ? downloadButtonWidth : 0;\r\n const layout = { config: this.props.layoutConfig };\r\n\r\n return (\r\n \r\n \r\n
\r\n \r\n );\r\n }\r\n}\r\n\r\nSubPageMenuInternal.propTypes = {\r\n classes: PropTypes.shape(_.mapObject(\r\n getSubPageMenuStyles({}, {}),\r\n _.constant(PropTypes.string.isRequired)\r\n )).isRequired,\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n updateWaterfallFilter: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n changeLayout: PropTypes.func.isRequired,\r\n serverContext: PropTypes.shape({\r\n CurrentAccount: PropTypes.object.isRequired,\r\n CurrentCustomer: PropTypes.object.isRequired,\r\n CurrentUser: PropTypes.object.isRequired,\r\n DynamicPermissions: PropTypes.object.isRequired,\r\n }).isRequired,\r\n showDatePicker: PropTypes.bool,\r\n showDisabledDatePicker: PropTypes.bool,\r\n showHistoryButton: PropTypes.bool,\r\n showAutoApplyButton: PropTypes.bool,\r\n showDownloadButton: PropTypes.bool,\r\n siteMap: PropTypes.arrayOf(PropTypes.shape({\r\n id: PropTypes.string,\r\n })).isRequired,\r\n mode: PropTypes.string.isRequired,\r\n singleTabMode: PropTypes.bool,\r\n initialResetLayout: PropTypes.bool,\r\n forceResetLayout: PropTypes.bool,\r\n getTabItems: PropTypes.func,\r\n disableCompare: PropTypes.bool,\r\n onTabItemRender: PropTypes.func,\r\n renderExtraContent: PropTypes.func,\r\n renderDownloadButton: PropTypes.func,\r\n minDate: PropTypes.shape({\r\n year: PropTypes.number,\r\n month: PropTypes.number,\r\n day: PropTypes.number,\r\n }),\r\n selectedParent: PropTypes.string,\r\n activity: PropTypes.shape({\r\n signal: PropTypes.func.isRequired,\r\n trace: PropTypes.func.isRequired,\r\n }),\r\n layoutConfig: PropTypes.shape({\r\n copilot: PropTypes.shape({\r\n mode: PropTypes.string,\r\n }),\r\n }).isRequired,\r\n permissions: PropTypes.shape({ dynamic: PropTypes.shape({}) }).isRequired,\r\n};\r\n\r\nconst SubpageMenuInternalWithStyle = withDefaultStyles(SubPageMenuInternal, getSubPageMenuStyles);\r\n\r\nconst SubPageMenu = props => (\r\n \r\n {({ config, change }) => ()}\r\n \r\n);\r\n\r\nexport const StyledSubPageMenu =\r\n withActivityContext(withGlobalFilter(withScope(withI18nConsumer(SubPageMenu))));\r\n","const pathNamePrefix = '/campaign/vnext/';\r\n\r\nexport const getPathNameOfSubPageItem = subPageItem =>\r\n `${pathNamePrefix}${subPageItem.route}`;\r\n","import {\r\n comparedPickerSharedStyle,\r\n} from '@bingads-webui-react/quick-date-left-right-picker';\r\n\r\nexport const getSubPageMenuStyles = (subPageMenu, { palette = {} }) => ({\r\n container: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n marginLeft: 0,\r\n height: 58,\r\n overflow: 'auto',\r\n whiteSpace: 'nowrap',\r\n alignItems: 'stretch',\r\n backgroundColor: palette.white,\r\n '& .overflow-tab-bar-items': {\r\n paddingTop: 10,\r\n '& .icon-button': {\r\n backgroundColor: palette.white,\r\n },\r\n },\r\n '&.expanded': {\r\n height: 72,\r\n },\r\n },\r\n pickerContainer: {\r\n marginTop: '13px',\r\n marginBottom: '12px',\r\n marginRight: '16px',\r\n marginLeft: 'auto',\r\n '&.expanded': {\r\n marginTop: '8px',\r\n },\r\n '&.with-left-margin': {\r\n marginLeft: 8,\r\n },\r\n '& .history-item': {\r\n fontSize: '18px',\r\n\r\n '& button.history': {\r\n border: 'none',\r\n backgroundColor: 'transparent',\r\n '& .iconba-History': {\r\n marginRight: '10px',\r\n fontSize: '18px',\r\n color: palette.blue,\r\n },\r\n },\r\n },\r\n '& .recommendation-download-button': {\r\n top: 2,\r\n backgroundColor: 'transparent',\r\n border: 'none',\r\n fontSize: 18,\r\n padding: 'unset',\r\n minWidth: 'unset',\r\n height: 'fit-content',\r\n color: palette.themeDarkAlt,\r\n },\r\n '& .recommendation-auto-apply-item': {\r\n top: 5,\r\n position: 'relative',\r\n },\r\n },\r\n pickerQuickContainer: {\r\n ...(comparedPickerSharedStyle || {}),\r\n },\r\n subMenuSeperator: {\r\n height: '1px',\r\n marginLeft: '0px',\r\n border: 'none',\r\n backgroundColor: palette.neutralLighter,\r\n },\r\n summaryButton: {\r\n display: 'inline',\r\n verticalAlign: 'top !important',\r\n marginTop: '4px !important',\r\n marginBottom: '4px !important',\r\n },\r\n});\r\n","/* eslint-disable no-param-reassign */\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useEffect } from 'react';\r\nimport { siteMapPropType } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { ScopeSelector } from '@bingads-webui-react/scope-selector';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport { findParentNodeByLevel } from './utils';\r\n\r\nexport const Loader = (props) => {\r\n const { siteMap, updateAvailability, level } = props;\r\n\r\n const selectedParent = findParentNodeByLevel(siteMap, level); // level index 0 for PageMenu, 1 for SubPageMenu and 2 for subTab\r\n const available = !_.isEmpty(selectedParent);\r\n\r\n useEffect(() => {\r\n updateAvailability(available);\r\n });\r\n\r\n if (available) {\r\n const levelItems = selectedParent.children.map(child => ({\r\n name: props.i18n.getString(child.name),\r\n href: `/campaign/vnext/${child.route}`,\r\n ariaDescription: child.ariaDescription ? props.i18n.getString(child.ariaDescription) : '',\r\n }));\r\n\r\n const currentPath = props.location.pathname;\r\n const currentIndex = levelItems.findIndex(item => item.href === currentPath);\r\n\r\n const onItemChange = ({ index }) => {\r\n props.scope.save(levelItems[index].href);\r\n };\r\n\r\n const pillControlParams = { levelIndex: currentIndex, onItemChange, levelItems };\r\n return ;\r\n }\r\n\r\n return null;\r\n};\r\n\r\nLoader.propTypes = {\r\n siteMap: siteMapPropType.isRequired,\r\n level: PropTypes.number,\r\n updateAvailability: PropTypes.func,\r\n scope: PropTypes.shape({\r\n save: PropTypes.func.isRequired,\r\n }),\r\n location: PropTypes.shape({\r\n pathname: PropTypes.string.isRequired,\r\n }),\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n};\r\n\r\nLoader.defaultProps = {\r\n updateAvailability: _.noop,\r\n level: 2,\r\n scope: {\r\n save: _.noop,\r\n },\r\n location: {\r\n pathname: '/campaign/vnext/labelscampaign',\r\n },\r\n};\r\n\r\nexport const DefaultSubTabLoader = React.memo(withI18nConsumer(Loader));\r\n","import _ from 'underscore';\r\n\r\n/**\r\n * findParentNodeByLevel(map, index)\r\n * Will return parent node who has children selected with certain level index\r\n * @param {map} map a site map\r\n * @param {number} index level index starting from 0\r\n * @returns {object} node || undefinded if not found\r\n */\r\nexport function findParentNodeByLevel(map, index) {\r\n let level = 0;\r\n let currentNode = _.findWhere(map, { selected: true });\r\n if (index <= 0) {\r\n return undefined;\r\n }\r\n\r\n while (level !== index) {\r\n if (!currentNode || !currentNode.children) {\r\n return undefined;\r\n }\r\n\r\n const selectedChild = _.find(currentNode.children, node => node.selected === true);\r\n if (selectedChild && level === index - 1) {\r\n return currentNode;\r\n }\r\n currentNode = selectedChild;\r\n level += 1;\r\n }\r\n\r\n return undefined;\r\n}\r\n","import React from 'react';\r\nimport { ElementSelector } from '@bingads-webui-campaign-react/element-selector';\r\nimport {\r\n withSiteMap,\r\n processorSet,\r\n} from '@bingads-webui-campaign-react/with-site-map';\r\n\r\nimport { DefaultSubTabLoader } from './default-sub-tab-loader';\r\n\r\nconst CampaignSubTabLoader = withSiteMap(DefaultSubTabLoader, processorSet.all);\r\n\r\nexport const SubTabContainer = React.memo(props => (\r\n \r\n \r\n \r\n));\r\n","import _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useEffect, useMemo } from 'react';\r\nimport {\r\n withCampaignSiteMap,\r\n siteMapPropType,\r\n processorSet,\r\n} from '@bingads-webui-campaign-react/with-site-map';\r\nimport { withScope } from '@bingads-webui-react/scope-service';\r\nimport { withLayoutContext, Mode } from '@bingads-webui-react/app-layout-container';\r\nimport { SummaryBar } from '@bingads-webui-campaign-react/summary-bar';\r\n\r\nconst isInCampaignAdGroupCreationPage = () => (\r\n window.location.href.indexOf('createcampaign') > -1 ||\r\n window.location.href.indexOf('createadgroup') > -1 ||\r\n window.location.href.indexOf('conversiongoals/create') > -1 ||\r\n window.location.href.indexOf('conversiongoals/autocreate') > -1 ||\r\n window.location.href.indexOf('conversiongoals/edit') > -1 ||\r\n window.location.href.indexOf('conversionvaluerules/create') > -1 ||\r\n window.location.href.indexOf('conversionvaluerules/edit') > -1 ||\r\n window.location.href.indexOf('uettags/create') > -1 ||\r\n window.location.href.indexOf('uettags/edit') > -1 ||\r\n window.location.href.indexOf('audience/create') > -1 ||\r\n window.location.href.indexOf('audience/edit') > -1 ||\r\n window.location.href.indexOf('createassociation') > -1 ||\r\n window.location.href.indexOf('recommendations/history') > -1 ||\r\n window.location.href.indexOf('recommendations/AutoApplySettings') > -1 ||\r\n window.location.href.indexOf('reports-v4') > -1\r\n);\r\n\r\nexport const Loader = (props) => {\r\n const {\r\n siteMap, updateAvailability, changeLayout, scope, layoutConfig, ...others\r\n } = props;\r\n\r\n const FullScreenWithTabConfig = {\r\n header: {\r\n mode: Mode.Hidden,\r\n },\r\n nav: {\r\n mode: Mode.Hidden,\r\n },\r\n status: {\r\n mode: Mode.Hidden,\r\n },\r\n menu: {\r\n mode: Mode.Hidden,\r\n },\r\n subTab: {\r\n mode: Mode.Hidden,\r\n },\r\n };\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n\r\n const getConfigComponents = config => ({\r\n ..._.pick(config, 'header', 'nav', 'status', 'menu', 'subTab'),\r\n menu: {\r\n mode: config.menu && config.menu.mode,\r\n },\r\n });\r\n\r\n const isTableExpanded = useMemo(\r\n () => (\r\n _.isEqual(\r\n getConfigComponents(layoutConfig),\r\n FullScreenWithTabConfig\r\n )),\r\n [FullScreenWithTabConfig, layoutConfig]\r\n );\r\n useEffect(() => {\r\n updateAvailability(!_.isEmpty(selectedParent));\r\n });\r\n\r\n if (selectedParent && scope && !scope.values.campaignId) {\r\n changeLayout({ status: { mode: Mode.Hidden } });\r\n return null;\r\n }\r\n if (!isTableExpanded &&\r\n layoutConfig && layoutConfig.status.mode !== Mode.Expanded &&\r\n !isInCampaignAdGroupCreationPage(siteMap)) {\r\n changeLayout({ status: { mode: Mode.Expanded } });\r\n }\r\n\r\n return selectedParent ? () : null;\r\n};\r\n\r\nLoader.propTypes = {\r\n siteMap: siteMapPropType.isRequired,\r\n updateAvailability: PropTypes.func,\r\n scope: PropTypes.shape({\r\n values: PropTypes.object.isRequired,\r\n }).isRequired,\r\n changeLayout: PropTypes.func.isRequired,\r\n layoutConfig: PropTypes.shape({\r\n status: PropTypes.string.isRequired,\r\n }).isRequired,\r\n};\r\n\r\nLoader.defaultProps = {\r\n updateAvailability: _.noop,\r\n};\r\n\r\nexport const CampaignSummaryBarLoader = withLayoutContext(withScope((withCampaignSiteMap(\r\n React.memo(Loader),\r\n processorSet.all\r\n))));\r\n","import _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useEffect } from 'react';\r\nimport { QueryParam } from '@bingads-webui-react/scope-service';\r\nimport {\r\n withStandaloneSiteMap,\r\n siteMapPropType,\r\n processorSet,\r\n} from '@bingads-webui-campaign-react/with-site-map';\r\nimport { SharedBudgetSummaryBar } from '@bingads-webui-campaign-react/summary-bar';\r\n\r\nexport const Loader = (props) => {\r\n const { siteMap, updateAvailability, ...others } = props;\r\n const { scope } = props;\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n\r\n useEffect(() => {\r\n updateAvailability(!_.isEmpty(selectedParent));\r\n });\r\n\r\n if (_.has(scope.values, 'budgetId')) {\r\n return ();\r\n }\r\n\r\n return selectedParent ? () : null;\r\n};\r\n\r\nLoader.propTypes = {\r\n siteMap: siteMapPropType.isRequired,\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n updateAvailability: PropTypes.func,\r\n};\r\n\r\nLoader.defaultProps = {\r\n updateAvailability: _.noop,\r\n};\r\n\r\nexport const SharedBudgetSummaryBarLoader = withStandaloneSiteMap(\r\n React.memo(Loader),\r\n processorSet.all,\r\n 'shared-budgets-edit'\r\n);\r\n","import _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useEffect } from 'react';\r\nimport {\r\n withAccountsSiteMap,\r\n siteMapPropType,\r\n processor,\r\n} from '@bingads-webui-campaign-react/with-site-map';\r\nimport { AccountsSummaryBar } from '@bingads-webui-campaign-react/summary-bar';\r\n\r\nexport const Loader = (props) => {\r\n const { siteMap, updateAvailability, ...others } = props;\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n\r\n useEffect(() => {\r\n updateAvailability(!_.isEmpty(selectedParent));\r\n });\r\n\r\n return selectedParent\r\n ? ()\r\n : null;\r\n};\r\n\r\nLoader.propTypes = {\r\n siteMap: siteMapPropType.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n updateAvailability: PropTypes.func,\r\n};\r\n\r\nLoader.defaultProps = {\r\n updateAvailability: _.noop,\r\n};\r\n\r\nconst processors = [processor.processPermissions, processor.processPath];\r\n\r\nexport const AccountsSummaryBarLoader = withAccountsSiteMap(\r\n React.memo(Loader),\r\n processors\r\n);\r\n","import _ from 'underscore';\r\nimport React, { useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { siteMapPropType } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { SimpleSummaryBar } from '@bingads-webui-campaign-react/summary-bar';\r\n\r\nconst Loader = (props) => {\r\n const {\r\n siteMap,\r\n breadCrumbText,\r\n backButtonText,\r\n backButtonUrl,\r\n updateAvailability,\r\n isVisible,\r\n ...others\r\n } = props;\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n\r\n useEffect(() => {\r\n updateAvailability(!_.isEmpty(selectedParent));\r\n });\r\n\r\n return isVisible\r\n ? (\r\n )\r\n : null;\r\n};\r\n\r\nLoader.propTypes = {\r\n siteMap: siteMapPropType.isRequired,\r\n breadCrumbText: PropTypes.string,\r\n backButtonText: PropTypes.string,\r\n backButtonUrl: PropTypes.string,\r\n updateAvailability: PropTypes.func,\r\n isVisible: PropTypes.bool,\r\n};\r\n\r\nLoader.defaultProps = {\r\n breadCrumbText: null,\r\n backButtonText: null,\r\n backButtonUrl: null,\r\n updateAvailability: _.noop,\r\n isVisible: false,\r\n};\r\n\r\nexport const SimpleSummaryBarLoader = React.memo(Loader);\r\n","import _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useEffect } from 'react';\r\nimport {\r\n siteMapPropType,\r\n} from '@bingads-webui-campaign-react/with-site-map';\r\nimport { SummaryBarFactory } from '@bingads-webui-campaign-react/summary-bar';\r\n\r\nexport const GeneralSummaryBarLoader = (props) => {\r\n const {\r\n siteMap,\r\n updateAvailability,\r\n backButtonText,\r\n backButtonUrl,\r\n backButtonProps,\r\n ...others\r\n } = props;\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n\r\n useEffect(() => {\r\n updateAvailability(!_.isEmpty(selectedParent));\r\n });\r\n // empty backbutton props mean we fill in with the LASTURL hoc.\r\n // null backbutton props means we dont show the backbutton at all.\r\n\r\n if (selectedParent) {\r\n if (_.isNull(backButtonProps) || backButtonUrl === null) {\r\n const modifiedBackButtonProps = {\r\n url: backButtonUrl,\r\n buttonText: backButtonText,\r\n };\r\n return (\r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n return null;\r\n};\r\n\r\nGeneralSummaryBarLoader.propTypes = {\r\n siteMap: siteMapPropType.isRequired,\r\n updateAvailability: PropTypes.func,\r\n backButtonProps: PropTypes.shape({}),\r\n backButtonUrl: PropTypes.string,\r\n backButtonText: PropTypes.string,\r\n};\r\n\r\nGeneralSummaryBarLoader.defaultProps = {\r\n updateAvailability: _.noop,\r\n backButtonProps: null,\r\n backButtonUrl: null,\r\n backButtonText: null,\r\n};\r\n\r\n","import _ from 'underscore';\r\nimport React, { useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { withRouter } from '@bingads-webui-campaign-react/router';\r\nimport { siteMapPropType } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { SimpleSummaryBar } from '@bingads-webui-campaign-react/summary-bar';\r\nimport { CampaignOData } from '@bingads-webui-react/campaign-odata';\r\nimport { withScope } from '@bingads-webui-react/scope-service';\r\n\r\nconst CampaignODataCallForCustomerLevel = (props) => {\r\n const {\r\n selSummaryBarFallback,\r\n scope,\r\n selectedParent,\r\n breadCrumbText,\r\n backButtonText,\r\n backButtonUrl,\r\n breadcrumbUrl,\r\n ...others\r\n } = props;\r\n\r\n return (\r\n {\r\n // TODO: if custom list limit > 100, we will need to write code to fix this.\r\n // Known issue: if > 20 lists, $top:20 query param will break this functionality.\r\n // Workaround: supply top param with a value > 20.\r\n return currentCustomer.PlacementExclusionLists.get({ top: 100 });\r\n }\r\n }\r\n fallback={selSummaryBarFallback}\r\n // If the list name call fails, show empty string.\r\n onError={() => selSummaryBarFallback}\r\n >\r\n {\r\n (response) => {\r\n const predicate = item => item.Id === scope.values.selListId;\r\n\r\n if (response.value && _.find(response.value, predicate)) {\r\n const list = _.find(response.value, predicate);\r\n const additionalItems = [];\r\n additionalItems.push({\r\n key: `navigate-selListId-${list.Id}`,\r\n text: list.Name,\r\n });\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n return selSummaryBarFallback;\r\n }\r\n }\r\n \r\n );\r\n};\r\n\r\nCampaignODataCallForCustomerLevel.propTypes = {\r\n selSummaryBarFallback: PropTypes.element.isRequired,\r\n scope: PropTypes.shape({\r\n values: PropTypes.shape({\r\n selListId: PropTypes.number,\r\n }).isRequired,\r\n }).isRequired,\r\n selectedParent: PropTypes.shape({\r\n id: PropTypes.string,\r\n name: PropTypes.string,\r\n url: PropTypes.string,\r\n }).isRequired,\r\n breadCrumbText: PropTypes.string,\r\n backButtonText: PropTypes.string,\r\n backButtonUrl: PropTypes.string,\r\n breadcrumbUrl: PropTypes.string.isRequired,\r\n};\r\n\r\nCampaignODataCallForCustomerLevel.defaultProps = {\r\n breadCrumbText: null,\r\n backButtonText: null,\r\n backButtonUrl: null,\r\n};\r\n\r\nconst CampaignODataCallForAccountLevel = (props) => {\r\n const {\r\n selSummaryBarFallback,\r\n scope,\r\n selectedParent,\r\n breadCrumbText,\r\n backButtonText,\r\n backButtonUrl,\r\n breadcrumbUrl,\r\n ...others\r\n } = props;\r\n\r\n return (\r\n {\r\n // Get the association between this account and this list to display the list name.\r\n // This is to verify the account is associated before showing the list name.\r\n return currentAccount.PlacementExclusionLists.$withKey(scope.values.selListId)['Default.GetAccountAssociation'].$makeCall({\r\n payload: {},\r\n });\r\n }\r\n }\r\n fallback={selSummaryBarFallback}\r\n // If the list name call fails, show empty string.\r\n onError={() => selSummaryBarFallback}\r\n >\r\n {\r\n (response) => {\r\n if (response.value && response.value.length === 1) {\r\n const association = response.value[0];\r\n const additionalItems = [];\r\n additionalItems.push({\r\n key: `navigate-selListId-${association.SharedEntityId}`,\r\n text: association.SharedEntityName,\r\n });\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n return selSummaryBarFallback;\r\n }\r\n }\r\n \r\n );\r\n};\r\n\r\nCampaignODataCallForAccountLevel.propTypes = {\r\n selSummaryBarFallback: PropTypes.element.isRequired,\r\n scope: PropTypes.shape({\r\n values: PropTypes.shape({\r\n selListId: PropTypes.number,\r\n }).isRequired,\r\n }).isRequired,\r\n selectedParent: PropTypes.shape({\r\n id: PropTypes.string,\r\n name: PropTypes.string,\r\n url: PropTypes.string,\r\n }).isRequired,\r\n breadCrumbText: PropTypes.string,\r\n backButtonText: PropTypes.string,\r\n backButtonUrl: PropTypes.string,\r\n breadcrumbUrl: PropTypes.string.isRequired,\r\n};\r\n\r\nCampaignODataCallForAccountLevel.defaultProps = {\r\n breadCrumbText: null,\r\n backButtonText: null,\r\n backButtonUrl: null,\r\n};\r\n\r\nexport const Loader = (props) => {\r\n const {\r\n siteMap,\r\n breadCrumbText,\r\n backButtonText,\r\n backButtonUrl,\r\n updateAvailability,\r\n scope,\r\n ...others\r\n } = props;\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n\r\n useEffect(() => {\r\n updateAvailability(!_.isEmpty(selectedParent));\r\n });\r\n\r\n const selSummaryBarFallback = (\r\n \r\n );\r\n\r\n // Add Site Exclusion List breadcrumb.\r\n // The parent ID is shared by the account-level and customer-level entrypoints in the sitemap.\r\n if (scope.values.selListId && selectedParent && selectedParent.id === 'site-exclusion-lists-entrypoint') {\r\n let queryString = '';\r\n let breadcrumbUrl = '';\r\n\r\n // Navigated to page via account-level entrypoint\r\n if (scope.values.aid) {\r\n queryString = `?uid=${scope.values.uid}&cid=${scope.values.cid}&aid=${scope.values.aid}`;\r\n breadcrumbUrl = `/campaign/vnext/${selectedParent.route}${queryString}`;\r\n\r\n return CampaignODataCallForAccountLevel({\r\n selSummaryBarFallback, scope, selectedParent, breadCrumbText, backButtonText, backButtonUrl, breadcrumbUrl, ...others,\r\n });\r\n }\r\n\r\n // Otherwise navigated to page via customer-level entrypoint\r\n queryString = `?uid=${scope.values.uid}&cid=${scope.values.cid}`;\r\n breadcrumbUrl = `/campaign/vnext/${selectedParent.route}${queryString}`;\r\n\r\n return CampaignODataCallForCustomerLevel({\r\n selSummaryBarFallback, scope, selectedParent, breadCrumbText, backButtonText, backButtonUrl, breadcrumbUrl, ...others,\r\n });\r\n }\r\n\r\n return selectedParent ? selSummaryBarFallback : null;\r\n};\r\n\r\nLoader.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n siteMap: siteMapPropType.isRequired,\r\n breadCrumbText: PropTypes.string,\r\n backButtonText: PropTypes.string,\r\n backButtonUrl: PropTypes.string,\r\n updateAvailability: PropTypes.func,\r\n scope: PropTypes.shape({\r\n values: PropTypes.shape({\r\n selListId: PropTypes.number,\r\n }).isRequired,\r\n }).isRequired,\r\n};\r\n\r\nLoader.defaultProps = {\r\n breadCrumbText: null,\r\n backButtonText: null,\r\n backButtonUrl: null,\r\n updateAvailability: _.noop,\r\n};\r\n\r\n// This is the loader for the summary bar used by the linked pages in the SEL feature.\r\n// The linked pages are the \"page 2s\" of the customer-level and account-level scopes.\r\n// Those include the customer-level list-edit page and the account-level view-exclusions page.\r\nexport const SiteExclusionListLinkedPageLoader = withScope(withRouter(React.memo(Loader)));\r\n","/* eslint-disable @typescript-eslint/no-unused-vars */\r\nimport _ from 'underscore';\r\nimport React, { useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { withRouter } from '@bingads-webui-campaign-react/router';\r\nimport { siteMapPropType } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { SimpleSummaryBar } from '@bingads-webui-campaign-react/summary-bar';\r\nimport { CampaignOData } from '@bingads-webui-react/campaign-odata';\r\nimport { withScope } from '@bingads-webui-react/scope-service';\r\n\r\nexport const Loader = (props) => {\r\n const {\r\n siteMap,\r\n backButtonText,\r\n backButtonUrl,\r\n updateAvailability,\r\n scope,\r\n i18n,\r\n isVisible,\r\n ...others\r\n } = props;\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n const pathname = `/campaign/vnext/negativekeywordlistslibrary?uid=${scope.values.uid}&cid=${scope.values.cid}&aid=${scope.values.aid}`;\r\n\r\n useEffect(() => {\r\n updateAvailability(!_.isEmpty(selectedParent));\r\n });\r\n\r\n if (selectedParent) {\r\n const defaultSummaryBarFallback = (\r\n \r\n );\r\n\r\n if (scope.values.nkl && isVisible) {\r\n return (\r\n currentAccount.NegativeKeywordLists.get()}\r\n escapeHatch={({ currentAccount }) => (currentAccount ? undefined : { value: defaultSummaryBarFallback })}\r\n fallback={defaultSummaryBarFallback}\r\n // If the list name call fails, show empty string.\r\n onError={() => defaultSummaryBarFallback}\r\n >\r\n {\r\n (response) => {\r\n const predicate = item => item.Id === scope.values.nkl;\r\n\r\n if (response.value && _.find(response.value, predicate)) {\r\n const list = _.find(response.value, predicate);\r\n const additionalItems = [];\r\n additionalItems.push({\r\n key: 'item',\r\n text: list.Name,\r\n 'aria-label': i18n.getString(_TL_('Negative Keyword List Name')),\r\n });\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n return defaultSummaryBarFallback;\r\n }\r\n }\r\n \r\n );\r\n }\r\n\r\n return defaultSummaryBarFallback;\r\n }\r\n\r\n return null;\r\n};\r\n\r\nLoader.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n siteMap: siteMapPropType.isRequired,\r\n backButtonText: PropTypes.string,\r\n backButtonUrl: PropTypes.string,\r\n updateAvailability: PropTypes.func,\r\n scope: PropTypes.shape({\r\n values: PropTypes.shape({\r\n selListId: PropTypes.number,\r\n }).isRequired,\r\n }).isRequired,\r\n isVisible: PropTypes.bool.isRequired,\r\n};\r\n\r\nLoader.defaultProps = {\r\n backButtonText: null,\r\n backButtonUrl: null,\r\n updateAvailability: _.noop,\r\n};\r\n\r\nexport const NegativeKeywordsListDetailsLoader = withScope(withRouter(React.memo(Loader)));\r\n","import _ from 'underscore';\r\nimport React, { useEffect, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { withRouter } from '@bingads-webui-campaign-react/router';\r\nimport { siteMapPropType } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { SummaryBarFactory } from '@bingads-webui-campaign-react/summary-bar';\r\nimport { CampaignOData } from '@bingads-webui-react/campaign-odata';\r\nimport { withScope } from '@bingads-webui-react/scope-service';\r\nimport { PermissionsContext } from '@bingads-webui-react/hoc-with-permissions';\r\n\r\nfunction getConfig(props) {\r\n const {\r\n i18n, scope, portfolioName, permissions,\r\n } = props;\r\n\r\n let pathname = '/campaign/vnext/portfoliobidstrategy';\r\n\r\n const isDataExclusionEnabled = (permissions.IsDataExclusionEnabled || permissions.dynamic.DataExclusions);\r\n // If data exclusion is enabled, the routing of portfoliobidstrategy is also changed\r\n if (isDataExclusionEnabled) {\r\n pathname = '/campaign/vnext/bidstrategies/portfoliobidstrategy';\r\n }\r\n const search = scope.stringify(_.omit(scope.values, 'portfolioId'));\r\n\r\n return {\r\n backButtonProps: {\r\n url: `${pathname}?${search}`,\r\n buttonText: i18n.getString(_TL_('Back to portfolio bid strategies')),\r\n },\r\n breadcrumbsGeneralConfigs: {\r\n items: [\r\n {\r\n key: 'portfolio-bid-strategies',\r\n text: i18n.getString(_TL_('Portfolio bid strategies')),\r\n 'aria-label': i18n.getString(_TL_('Portfolio bid strategies')),\r\n onClick: () => {\r\n scope.history.push({ pathname, search });\r\n },\r\n }, {\r\n key: 'portfolio-bid-strategy-details',\r\n text: portfolioName || i18n.getString(_TL_('Details')),\r\n 'aria-label': i18n.getString(_TL_('Details')),\r\n isCurrentItem: true,\r\n },\r\n ],\r\n maxDisplayedItems: 2,\r\n },\r\n };\r\n}\r\n\r\n\r\nconst Loader = (props) => {\r\n const { updateAvailability, isVisible, ...others } = props;\r\n const { i18n, siteMap, scope } = others;\r\n const permissions = useContext(PermissionsContext);\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n\r\n useEffect(() => {\r\n updateAvailability(!_.isEmpty(selectedParent));\r\n });\r\n\r\n if (selectedParent) {\r\n const summaryBarFallback = ;\r\n\r\n const { portfolioId } = scope.values;\r\n\r\n if (portfolioId && isVisible) {\r\n return (\r\n currentAccount.PortfolioBidStrategies.$withKey(portfolioId).get()}\r\n escapeHatch={({ currentAccount }) => (currentAccount ? undefined : { value: summaryBarFallback })}\r\n fallback={summaryBarFallback}\r\n onError={() => summaryBarFallback}\r\n >\r\n {(response) => {\r\n const portfolioName = response.Name;\r\n\r\n return portfolioName ?\r\n :\r\n summaryBarFallback;\r\n }}\r\n \r\n );\r\n }\r\n\r\n return summaryBarFallback;\r\n }\r\n\r\n return null;\r\n};\r\n\r\nLoader.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n siteMap: siteMapPropType.isRequired,\r\n updateAvailability: PropTypes.func,\r\n scope: PropTypes.shape({\r\n values: PropTypes.shape({\r\n selListId: PropTypes.number,\r\n }).isRequired,\r\n }).isRequired,\r\n isVisible: PropTypes.bool.isRequired,\r\n};\r\n\r\nLoader.defaultProps = {\r\n updateAvailability: _.noop,\r\n};\r\n\r\nexport const PortfolioDetailsLoader = withScope(withRouter(React.memo(Loader)));\r\n","import _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useEffect } from 'react';\r\nimport {\r\n withToolsSiteMap,\r\n siteMapPropType,\r\n processorSet,\r\n} from '@bingads-webui-campaign-react/with-site-map';\r\nimport { MerchantCenterSummaryBar } from '@bingads-webui-campaign-react/summary-bar';\r\n\r\nexport const Loader = (props) => {\r\n const { siteMap, updateAvailability, ...others } = props;\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n\r\n useEffect(() => {\r\n updateAvailability(!_.isEmpty(selectedParent));\r\n });\r\n\r\n return ();\r\n};\r\n\r\nLoader.propTypes = {\r\n siteMap: siteMapPropType.isRequired,\r\n updateAvailability: PropTypes.func,\r\n};\r\n\r\nLoader.defaultProps = {\r\n updateAvailability: _.noop,\r\n};\r\n\r\nexport const MerchantCenterSummaryBarLoader = withToolsSiteMap(\r\n React.memo(Loader),\r\n processorSet.all,\r\n ['mmc-stores/*', 'mmc-store-summary/*', 'mmc-feeds/*', 'mmc-promotions/*', 'mmc-import/*', 'mmc-settings/*']\r\n);\r\n","import _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useEffect } from 'react';\r\nimport { QueryParam } from '@bingads-webui-react/scope-service';\r\nimport {\r\n withStandaloneSiteMap,\r\n siteMapPropType,\r\n processorSet,\r\n} from '@bingads-webui-campaign-react/with-site-map';\r\nimport { QueryInsightsSummaryBar } from '@bingads-webui-campaign-react/summary-bar';\r\n\r\nexport const Loader = (props) => {\r\n const {\r\n isVisible,\r\n siteMap,\r\n updateAvailability,\r\n ...others\r\n } = props;\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n\r\n useEffect(() => {\r\n updateAvailability(!_.isEmpty(selectedParent));\r\n });\r\n\r\n return isVisible ? : null;\r\n};\r\n\r\nLoader.propTypes = {\r\n isVisible: PropTypes.bool,\r\n siteMap: siteMapPropType.isRequired,\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n updateAvailability: PropTypes.func,\r\n};\r\n\r\nLoader.defaultProps = {\r\n isVisible: false,\r\n updateAvailability: _.noop,\r\n};\r\n\r\nexport const QueryInsightsSummaryBarLoader = withStandaloneSiteMap(\r\n React.memo(Loader),\r\n processorSet.default,\r\n 'query-insights-details/*'\r\n);\r\n","import React, { useState, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { DefaultButton, PrimaryButton } from '@fluentui/react';\r\nimport { edmCampaign } from '@bingads-webui/edm-campaign';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport { Toggle } from '@fluentui/react/lib/Toggle';\r\n\r\nexport function WebInsightsEditor(props) {\r\n const {\r\n i18n, scope, onCancel, isInsightOn, onSave,\r\n } = props;\r\n const { tagId } = scope.values;\r\n const [isToggleOn, setIsToggleOn] = useState(isInsightOn);\r\n\r\n const triggerDocumentEvent = useCallback(() => {\r\n const event = new CustomEvent('toggleWebInsight', { detail: { tagId, isToggleOn } });\r\n document.dispatchEvent(event);\r\n }, [isToggleOn, tagId]);\r\n\r\n const onToggleClick = (event, checked) => {\r\n setIsToggleOn(checked);\r\n };\r\n\r\n const onSaveClick = useCallback(() => {\r\n const value = {\r\n Id: tagId,\r\n IsWebInsightsEnabled: isToggleOn,\r\n };\r\n const { Id: cid } = config.get('CurrentCustomer');\r\n const { Id: aid, AdvertiserCustomerID: acid } = config.get('CurrentAccount');\r\n const isAgencyScenario = acid && (acid !== cid) && scope.values.aid;\r\n const edmHolder = isAgencyScenario ? edmCampaign.Customers.$withKey(acid).Accounts.$withKey(aid) : edmCampaign.Customers.$withKey(cid);\r\n\r\n edmHolder\r\n .Tags['Default.UpdateTagsWebInsightsSetting']\r\n .$makeCall({ payload: { Tags: [value] } })\r\n .toPromise().then(() => {\r\n onSave(isToggleOn);\r\n triggerDocumentEvent();\r\n });\r\n }, [isToggleOn, onSave, scope, tagId, triggerDocumentEvent]);\r\n\r\n const onCancelClick = useCallback(() => {\r\n onCancel();\r\n }, [onCancel]);\r\n\r\n return (\r\n
\r\n
\r\n {i18n.getString(_TL_('Click the toggle to enable or disable UET Insights. You can edit this setting at anytime.'))}\r\n
\r\n \r\n {i18n.getString(_TL_('Learn More'))}\r\n

\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n );\r\n}\r\n\r\nWebInsightsEditor.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n scope: PropTypes.shape({\r\n aid: PropTypes.number,\r\n values: PropTypes.shape({\r\n cid: PropTypes.number,\r\n uid: PropTypes.number,\r\n aid: PropTypes.number,\r\n tagId: PropTypes.number,\r\n }).isRequired,\r\n }).isRequired,\r\n onSave: PropTypes.func.isRequired,\r\n onCancel: PropTypes.func.isRequired,\r\n isInsightOn: PropTypes.bool.isRequired,\r\n tag: PropTypes.shape({\r\n Id: PropTypes.string.isRequired,\r\n }).isRequired,\r\n};\r\n","import _ from 'underscore';\r\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { withRouter } from '@bingads-webui-campaign-react/router';\r\nimport { Callout } from '@bingads-webui-react/callout';\r\nimport { siteMapPropType } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { withServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { SummaryBarContainer } from '@bingads-webui-react/summary-bar';\r\nimport { SummaryBarItemsResizeGroup } from '@bingads-webui-campaign-react/summary-bar/src/components/summary-bar-items-resize-group';\r\nimport { SimpleSummaryBar } from '@bingads-webui-campaign-react/summary-bar';\r\nimport { Breadcrumb } from '@bingads-webui-react/breadcrumb';\r\nimport { CampaignOData } from '@bingads-webui-react/campaign-odata';\r\nimport { withScope } from '@bingads-webui-react/scope-service';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { getUetDashboardSummaryBarStyle } from '../styles/summary-bar-style';\r\nimport { WebInsightsEditor } from './web-insights-editor';\r\n\r\nexport const Loader = (props) => {\r\n const {\r\n siteMap,\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n backButtonText,\r\n backButtonUrl,\r\n updateAvailability,\r\n scope,\r\n i18n,\r\n isVisible,\r\n permissions,\r\n canEdit,\r\n ...others\r\n } = props;\r\n const uetDashboardPilotEnabled = permissions.dynamic.UETDashboard;\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n const trackingStatusMap = useMemo(() => ({\r\n Inactive: i18n.getString(_TL_('Inactive')),\r\n Unverified: i18n.getString(_TL_('Unverified')),\r\n Active: i18n.getString(_TL_('Active')),\r\n }), [i18n]);\r\n\r\n const [insightSettingOverride, setInsightSettingOverride] = useState({});\r\n const updateInsightSettingOverride = useCallback((tagIds, isInsightOn) => {\r\n setInsightSettingOverride(insight => ({\r\n ...insight,\r\n ..._.object(_.map(tagIds, tagId => [tagId, isInsightOn])),\r\n }));\r\n }, [setInsightSettingOverride]);\r\n\r\n useEffect(() => {\r\n const updateInsightSetting = event => updateInsightSettingOverride(event.detail.tagIds, true);\r\n\r\n document.addEventListener('turnOnInsightSummaryBar', updateInsightSetting);\r\n return () => {\r\n document.removeEventListener('turnOnInsightSummaryBar', updateInsightSetting);\r\n };\r\n }, [updateInsightSettingOverride]);\r\n\r\n useEffect(() => {\r\n updateAvailability(!_.isEmpty(selectedParent) && uetDashboardPilotEnabled);\r\n });\r\n\r\n if (selectedParent && uetDashboardPilotEnabled) {\r\n const defaultSummaryBarFallback = (\r\n \r\n );\r\n\r\n if (scope.values.aid) {\r\n scope.acid = props.serverContext.CurrentAccount.AdvertiserCustomerID;\r\n }\r\n if (scope.values.tagId && isVisible && permissions.dynamic.UETDashboard) {\r\n return (\r\n (scope.values.aid ? currentAccount.Tags.get({ top: 200 }) : currentCustomer.Tags.get({ top: 200 }))}\r\n escapeHatch={({ currentAccount, currentCustomer }) => (currentAccount || currentCustomer ? undefined : { value: defaultSummaryBarFallback })}\r\n fallback={defaultSummaryBarFallback}\r\n // If the list name call fails, show empty string.\r\n onError={() => defaultSummaryBarFallback}\r\n >\r\n {\r\n (response) => {\r\n const predicate = item => item.Id === scope.values.tagId;\r\n\r\n const backButtonProps = {\r\n url: `/campaign/vnext/uettag?uid=${scope.values.uid}&cid=${scope.values.cid}&aid=${scope.values.aid}`,\r\n buttonText: i18n.getString(_TL_('Back to All tags')),\r\n };\r\n\r\n if (response.value && _.find(response.value, predicate)) {\r\n const list = _.find(response.value, predicate);\r\n const renderBreadCrumb = () => {\r\n const items = [{\r\n key: 'uet-dashboard-tag',\r\n text: i18n.getString(_TL_('UET tag')),\r\n }, {\r\n key: 'uet-dashboard-tag-name',\r\n text: list.Name,\r\n }];\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n };\r\n\r\n const resizeGroup = [{\r\n label: i18n.getString(_TL_('Tag ID')),\r\n className: 'summary-bar-tag-id',\r\n renderContent: () => list.Id,\r\n ariaLabel: i18n.getString(_TL_('Tag ID')),\r\n canEdit: false,\r\n }, {\r\n label: i18n.getString(_TL_('Tracking Status')),\r\n className: 'summary-bar-tracking-status',\r\n renderContent: () => (!list.IsReadOnly ? (trackingStatusMap[list.TrackingStatus] || list.TrackingStatus) : trackingStatusMap.Active),\r\n ariaLabel: i18n.getString(_TL_('Tracking Status')),\r\n canEdit: false,\r\n }, {\r\n label: i18n.getString(_TL_('Goals')),\r\n className: 'summary-bar-goals',\r\n renderContent: () => list.GoalsCount,\r\n ariaLabel: i18n.getString(_TL_('Goals')),\r\n canEdit: false,\r\n }, {\r\n label: i18n.getString(_TL_('Audiences')),\r\n className: 'summary-bar-audiences',\r\n renderContent: () => list.AudiencesCount,\r\n ariaLabel: i18n.getString(_TL_('Audiences')),\r\n canEdit: false,\r\n }];\r\n\r\n if (permissions.dynamic.UETTagInsights) {\r\n resizeGroup.push({\r\n label: i18n.getString(_TL_('Insights')),\r\n className: 'summary-bar-insights',\r\n renderContent: () => {\r\n const isInsightOn = !_.isUndefined(insightSettingOverride[list.Id]) ? insightSettingOverride[list.Id] : list.IsWebInsightsEnabled;\r\n return (\r\n
\r\n {isInsightOn ? i18n.getString(_TL_('Enabled')) : i18n.getString(_TL_('Disabled'))}\r\n \r\n
\r\n );\r\n },\r\n ariaLabel: i18n.getString(_TL_('Insights')),\r\n canEdit,\r\n Editor: Callout,\r\n getEditorProps: (show, closeEditor) => ({\r\n title: i18n.getString(_TL_('Edit your Insights setting')),\r\n content: (\r\n {\r\n // eslint-disable-next-line no-param-reassign\r\n list.IsWebInsightsEnabled = newIsInsightOn;\r\n updateInsightSettingOverride([list.Id], newIsInsightOn);\r\n closeEditor();\r\n }}\r\n onCancel={() => {\r\n closeEditor();\r\n }}\r\n />\r\n ),\r\n show,\r\n onClose: closeEditor,\r\n closeButton: true,\r\n target: null,\r\n placement: 'bottom',\r\n popoverId: 'summary-bar-insights-editor',\r\n popoverClassName: 'summary-bar-insights-editor',\r\n closeButtonAriaLabel: i18n.getString(_TL_('Close')),\r\n focusLockContent: true,\r\n }),\r\n });\r\n }\r\n\r\n return (\r\n }\r\n />\r\n );\r\n }\r\n\r\n return defaultSummaryBarFallback;\r\n }\r\n }\r\n \r\n );\r\n }\r\n\r\n return defaultSummaryBarFallback;\r\n }\r\n\r\n return null;\r\n};\r\n\r\nLoader.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n serverContext: PropTypes.shape({\r\n CurrentAccount: PropTypes.isRequired,\r\n }).isRequired,\r\n siteMap: siteMapPropType.isRequired,\r\n backButtonText: PropTypes.string,\r\n backButtonUrl: PropTypes.string,\r\n updateAvailability: PropTypes.func,\r\n scope: PropTypes.shape({\r\n acid: PropTypes.number,\r\n values: PropTypes.shape({\r\n cid: PropTypes.number,\r\n uid: PropTypes.number,\r\n aid: PropTypes.number,\r\n tagId: PropTypes.number,\r\n }).isRequired,\r\n }).isRequired,\r\n isVisible: PropTypes.bool.isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n UETDashboard: PropTypes.bool.isRequired,\r\n UETTagInsights: PropTypes.bool.isRequired,\r\n }),\r\n }).isRequired,\r\n};\r\n\r\nLoader.defaultProps = {\r\n backButtonText: null,\r\n backButtonUrl: null,\r\n updateAvailability: _.noop,\r\n};\r\n\r\nexport const UetDashboardLoader = withDefaultStyles(withServerContext(withScope(withRouter(React.memo(Loader)))), getUetDashboardSummaryBarStyle);\r\n","export const getUetDashboardSummaryBarStyle = () => ({\r\n '@global': {\r\n '.summary-bar-items > div': {\r\n '& > div:nth-child(2)': {\r\n minHeight: '0px !important',\r\n },\r\n '& .edit-icon': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '& .entity-label': {\r\n padding: '0px !important',\r\n },\r\n '& .edit-icon .web-insights': {\r\n marginRight: '8px',\r\n },\r\n '& .edit-icon .glyphicon-pencil': {\r\n fontSize: '16px',\r\n opacity: 0,\r\n transition: 'opacity 0.3s ease',\r\n },\r\n '&:hover, &:active, &:focus': {\r\n background: 'transparent !important',\r\n '& .edit-icon .glyphicon-pencil': {\r\n opacity: 1,\r\n },\r\n },\r\n },\r\n },\r\n});\r\n","import _ from 'underscore';\r\nimport React, { useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { findSiteMap, siteMapPropType } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { AssetLibrarySummaryBar } from '@bingads-webui-campaign-react/summary-bar';\r\n\r\nconst isLeafNode = item => item && item.children.length === 0 && item.selected === true;\r\n\r\nconst Loader = (props) => {\r\n const {\r\n siteMap,\r\n updateAvailability,\r\n isVisible,\r\n i18n,\r\n history,\r\n location,\r\n permissions,\r\n } = props;\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n const selectedChild = selectedParent && findSiteMap([selectedParent], isLeafNode);\r\n\r\n useEffect(() => {\r\n updateAvailability(!_.isEmpty(selectedParent));\r\n });\r\n\r\n return isVisible ? (\r\n \r\n ) : null;\r\n};\r\n\r\nLoader.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n siteMap: siteMapPropType.isRequired,\r\n updateAvailability: PropTypes.func,\r\n isVisible: PropTypes.bool,\r\n history: PropTypes.shape({\r\n replace: PropTypes.func,\r\n }).isRequired,\r\n location: PropTypes.shape({\r\n search: PropTypes.string,\r\n }).isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n};\r\n\r\nLoader.defaultProps = {\r\n updateAvailability: _.noop,\r\n isVisible: false,\r\n};\r\n\r\nexport const AssetLibrarySummaryBarLoader = React.memo(Loader);\r\n","import _ from 'underscore';\r\nimport React, { useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { findSiteMap, siteMapPropType } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { AdStudioSummaryBar } from '@bingads-webui-campaign-react/summary-bar';\r\n\r\nconst isLeafNode = item => item && item.children.length === 0 && item.selected === true;\r\n\r\nconst Loader = (props) => {\r\n const {\r\n siteMap,\r\n updateAvailability,\r\n isVisible,\r\n i18n,\r\n history,\r\n location,\r\n permissions,\r\n } = props;\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n const selectedChild = selectedParent && findSiteMap([selectedParent], isLeafNode);\r\n\r\n useEffect(() => {\r\n updateAvailability(!_.isEmpty(selectedParent));\r\n });\r\n\r\n return isVisible ? (\r\n \r\n ) : null;\r\n};\r\n\r\nLoader.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n siteMap: siteMapPropType.isRequired,\r\n updateAvailability: PropTypes.func,\r\n isVisible: PropTypes.bool,\r\n history: PropTypes.shape({\r\n replace: PropTypes.func,\r\n }).isRequired,\r\n location: PropTypes.shape({\r\n search: PropTypes.string,\r\n }).isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n};\r\n\r\nLoader.defaultProps = {\r\n updateAvailability: _.noop,\r\n isVisible: false,\r\n};\r\n\r\nexport const AdStudioSummaryBarLoader = React.memo(Loader);\r\n","import _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useEffect } from 'react';\r\nimport { QueryParam } from '@bingads-webui-react/scope-service';\r\nimport {\r\n siteMapPropType,\r\n findSiteMap,\r\n} from '@bingads-webui-campaign-react/with-site-map';\r\nimport { PmaxAssetDetailsSummaryBar } from '@bingads-webui-campaign-react/summary-bar';\r\n\r\nconst isLeafNode = item => item && item.children.length === 0 && item.selected === true;\r\n\r\nexport const Loader = (props) => {\r\n const {\r\n isVisible,\r\n siteMap,\r\n updateAvailability,\r\n scope,\r\n ...others\r\n } = props;\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n const selectedChild = selectedParent && findSiteMap([selectedParent], isLeafNode);\r\n\r\n useEffect(() => {\r\n updateAvailability(!_.isEmpty(selectedParent) && !_.isEmpty(selectedParent.id) && scope.values.assetGroupId);\r\n });\r\n\r\n return isVisible ? (\r\n \r\n ) : null;\r\n};\r\n\r\nLoader.propTypes = {\r\n isVisible: PropTypes.bool,\r\n siteMap: siteMapPropType.isRequired,\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n updateAvailability: PropTypes.func,\r\n};\r\n\r\nLoader.defaultProps = {\r\n isVisible: false,\r\n updateAvailability: _.noop,\r\n};\r\n\r\nexport const PmaxAssetDetailsSummaryBarLoader = React.memo(Loader);\r\n","import React, { useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\n\r\nimport { siteMapPropType } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { BudgetCenterSummaryBar } from '@bingads-webui-campaign-react/summary-bar';\r\n\r\nconst Loader = ({\r\n updateAvailability,\r\n siteMap,\r\n isVisible,\r\n}) => {\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n\r\n useEffect(() => {\r\n updateAvailability(!_.isEmpty(selectedParent));\r\n });\r\n\r\n return isVisible ? () : null;\r\n};\r\n\r\nLoader.propTypes = {\r\n updateAvailability: PropTypes.func,\r\n siteMap: siteMapPropType.isRequired,\r\n isVisible: PropTypes.bool,\r\n};\r\n\r\nLoader.defaultProps = {\r\n updateAvailability: _.noop,\r\n isVisible: false,\r\n};\r\n\r\nexport const BudgetCenterSummaryBarLoader = React.memo(Loader);\r\n","import _ from 'underscore';\r\nimport React, { useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { siteMapPropType } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { SimpleSummaryBar } from '@bingads-webui-campaign-react/summary-bar';\r\n\r\nconst Loader = (props) => {\r\n const {\r\n i18n,\r\n siteMap,\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n breadCrumbText,\r\n backButtonText,\r\n backButtonUrl,\r\n updateAvailability,\r\n isVisible,\r\n ...others\r\n } = props;\r\n\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n\r\n useEffect(() => {\r\n updateAvailability(!_.isEmpty(selectedParent));\r\n });\r\n\r\n if (!isVisible) {\r\n return null;\r\n }\r\n\r\n return ();\r\n};\r\n\r\nLoader.propTypes = {\r\n siteMap: siteMapPropType.isRequired,\r\n breadCrumbText: PropTypes.string,\r\n backButtonText: PropTypes.string,\r\n backButtonUrl: PropTypes.string,\r\n updateAvailability: PropTypes.func,\r\n isVisible: PropTypes.bool,\r\n location: PropTypes.shape({\r\n pathname: PropTypes.string.isRequired,\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n};\r\n\r\nLoader.defaultProps = {\r\n breadCrumbText: null,\r\n backButtonText: null,\r\n backButtonUrl: null,\r\n updateAvailability: _.noop,\r\n isVisible: false,\r\n};\r\n\r\nexport const HotelCenterV2SummaryBarLoader = React.memo(Loader);\r\n","import _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useEffect, useMemo } from 'react';\r\n\r\nimport { QueryParam } from '@bingads-webui-react/scope-service';\r\nimport { siteMapPropType } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { SimpleSummaryBar } from '@bingads-webui-campaign-react/summary-bar';\r\n\r\n// TODO: Mave logic shared\r\nconst getBackButtonProps = (scope) => {\r\n const previousRoute = _.get(scope, 'location.state.previousRoute');\r\n\r\n if (previousRoute && previousRoute.includes('campaign/vnext')) {\r\n const url = new URL(previousRoute);\r\n\r\n return {\r\n text: undefined,\r\n pathname: url.pathname,\r\n search: url.search,\r\n };\r\n }\r\n\r\n return {\r\n text: _TL_('Back to overview'),\r\n pathname: '/campaign/vnext/overview',\r\n search: `?uid=${scope.values.uid}&cid=${scope.values.cid}&aid=${scope.values.aid}`,\r\n };\r\n};\r\n\r\nconst Loader = (props) => {\r\n const {\r\n i18n,\r\n siteMap,\r\n scope,\r\n updateAvailability,\r\n isVisible,\r\n ...others\r\n } = props;\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n const { text, pathname, search } = useMemo(() => getBackButtonProps(scope), [scope]);\r\n\r\n const url = `${pathname}${search}`;\r\n const title = i18n.getString(scope.values.adId ? _TL_('Edit ad') : _TL_('Create ad'));\r\n\r\n useEffect(() => { updateAvailability(!_.isEmpty(selectedParent)); });\r\n\r\n return isVisible\r\n ? (\r\n )\r\n : null;\r\n};\r\n\r\nLoader.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n siteMap: siteMapPropType.isRequired,\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n updateAvailability: PropTypes.func,\r\n isVisible: PropTypes.bool,\r\n};\r\n\r\nLoader.defaultProps = {\r\n updateAvailability: _.noop,\r\n isVisible: false,\r\n};\r\n\r\nexport const AdEditorSummaryBarLoader = React.memo(Loader);\r\n","import { omit } from 'underscore';\r\nimport { getRoutePathById } from '@bingads-webui-campaign-react/with-site-map';\r\n\r\nexport function getBulkDetailConfig(props) {\r\n const { i18n, scope, siteMap } = props;\r\n const pathname = getRoutePathById(siteMap, 'bulk-edits');\r\n const search = scope.stringify(omit(scope.values, 'bulkEditSessionId'));\r\n\r\n return {\r\n backButtonProps: {\r\n url: `${pathname}?${search}`,\r\n buttonText: i18n.getString(_TL_('Back to Bulk edits')),\r\n },\r\n breadcrumbsGeneralConfigs: {\r\n items: [\r\n {\r\n key: 'bulkedits',\r\n text: i18n.getString(_TL_('Bulk edits')),\r\n onClick: () => {\r\n scope.history.push({\r\n pathname,\r\n search,\r\n });\r\n },\r\n 'aria-label': 'Bulk edits',\r\n }, {\r\n key: 'details',\r\n text: i18n.getString(_TL_('Details')),\r\n 'aria-label': 'Details',\r\n isCurrentItem: true,\r\n },\r\n ],\r\n maxDisplayedItems: 2,\r\n },\r\n };\r\n}\r\n","import { omit } from 'underscore';\r\nimport { getRoutePathById } from '@bingads-webui-campaign-react/with-site-map';\r\n\r\nexport function getRuleDetailConfig(props) {\r\n const { i18n, scope, siteMap } = props;\r\n const pathname = getRoutePathById(siteMap, 'rules');\r\n const search = scope.stringify(omit(scope.values, 'executionId'));\r\n\r\n return {\r\n backButtonProps: {\r\n url: `${pathname}?${search}`,\r\n buttonText: i18n.getString(_TL_('Back to rules')),\r\n },\r\n breadcrumbsGeneralConfigs: {\r\n items: [\r\n {\r\n key: 'automatedrules',\r\n text: i18n.getString(_TL_('Automated rules')),\r\n onClick: () => {\r\n scope.history.push({\r\n pathname,\r\n search,\r\n });\r\n },\r\n 'aria-label': 'Automated rules',\r\n }, {\r\n key: 'details',\r\n text: i18n.getString(_TL_('Details')),\r\n 'aria-label': 'Details',\r\n isCurrentItem: true,\r\n },\r\n ],\r\n maxDisplayedItems: 2,\r\n },\r\n };\r\n}\r\n","import { getRoutePathById } from '@bingads-webui-campaign-react/with-site-map';\r\n\r\nexport function getScriptsDetailConfig(props) {\r\n // eslint-disable-next-line\r\n const { i18n, scope, siteMap, location } = props;\r\n const pageLocation = location.pathname.split('/')[location.pathname.split('/').length - 1];\r\n let pageName = '';\r\n let buttonContext = i18n.getString(_TL_('Back to scripts'));\r\n let pathname = getRoutePathById(siteMap, 'scripts');\r\n\r\n if (pageLocation === 'scriptslogs') {\r\n pageName = i18n.getString(_TL_('Details'));\r\n pathname = getRoutePathById(siteMap, 'scripts-history');\r\n buttonContext = i18n.getString(_TL_('Back to scripts history'));\r\n } else if (pageLocation === 'scriptsedit') {\r\n pageName = i18n.getString(_TL_('Edit Script'));\r\n pathname = getRoutePathById(siteMap, 'scripts-page');\r\n } else if (pageLocation === 'scriptscreate') {\r\n pageName = i18n.getString(_TL_('Create Script'));\r\n pathname = getRoutePathById(siteMap, 'scripts-page');\r\n }\r\n\r\n pathname += `?uid=${scope.values.uid}&cid=${scope.values.cid}`;\r\n\r\n if (scope.values.aid) {\r\n pathname += `&aid=${scope.values.aid}`;\r\n }\r\n\r\n return {\r\n backButtonProps: {\r\n url: pathname,\r\n buttonText: buttonContext,\r\n },\r\n breadcrumbsGeneralConfigs: {\r\n items: [\r\n {\r\n key: 'bulkActions',\r\n text: i18n.getString(_TL_('Bulk actions')),\r\n 'aria-label': 'Bulk actions',\r\n },\r\n {\r\n key: 'scripts',\r\n text: i18n.getString(_TL_('Scripts')),\r\n onClick: () => {\r\n window.location.href = pathname;\r\n },\r\n 'aria-label': 'Scripts',\r\n }, {\r\n key: 'details',\r\n text: pageName,\r\n 'aria-label': pageName,\r\n isCurrentItem: true,\r\n },\r\n ],\r\n maxDisplayedItems: 3,\r\n },\r\n };\r\n}\r\n","import { getRoutePathById } from '@bingads-webui-campaign-react/with-site-map';\r\n\r\nexport function getBulkUploadsBuildSpreadsheetConfig(props) {\r\n const { i18n, scope, siteMap } = props;\r\n const pathname = getRoutePathById(siteMap, 'bulk-download-history');\r\n const search = scope.stringify(scope.values);\r\n\r\n return {\r\n backButtonProps: {\r\n url: `${pathname}?${search}`,\r\n buttonText: i18n.getString(_TL_('Back to bulk uploads')),\r\n },\r\n breadcrumbsGeneralConfigs: {\r\n items: [\r\n {\r\n key: 'bulkActions',\r\n text: i18n.getString(_TL_('Bulk actions')),\r\n 'aria-label': 'Bulk actions',\r\n },\r\n {\r\n key: 'bulkUploads',\r\n text: i18n.getString(_TL_('Bulk uploads')),\r\n onClick: () => {\r\n scope.history.push({\r\n pathname,\r\n search,\r\n });\r\n },\r\n 'aria-label': 'Bulk uploads',\r\n }, {\r\n key: 'buildSpreadsheet',\r\n text: i18n.getString(_TL_('Build spreadsheet')),\r\n 'aria-label': 'Build spreadsheet',\r\n isCurrentItem: true,\r\n },\r\n ],\r\n maxDisplayedItems: 3,\r\n },\r\n };\r\n}\r\n","import _ from 'underscore';\r\nimport URI from 'urijs';\r\nimport React, { useEffect, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { withRouter } from '@bingads-webui-campaign-react/router';\r\nimport { siteMapPropType, getRoutePathById } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { SimpleSummaryBar } from '@bingads-webui-campaign-react/summary-bar';\r\nimport { withScope } from '@bingads-webui-react/scope-service';\r\nimport { getBrandListById } from '@bingads-webui-campaign-react/brand-lists-data';\r\n\r\nconst SITE_MAP_ID = 'brand-lists';\r\n\r\nexport const Loader = (props) => {\r\n const {\r\n siteMap,\r\n breadCrumbText,\r\n backButtonText,\r\n backButtonUrl,\r\n updateAvailability,\r\n scope,\r\n ...others\r\n } = props;\r\n\r\n const selectedParent = _.findWhere(siteMap, { selected: true });\r\n\r\n const {\r\n values: {\r\n uid,\r\n cid,\r\n aid,\r\n brandListId,\r\n },\r\n } = scope;\r\n const [listName, setListName] = useState('');\r\n\r\n useEffect(() => {\r\n updateAvailability(!_.isEmpty(selectedParent));\r\n });\r\n\r\n useEffect(() => {\r\n async function fetchData() {\r\n try {\r\n const brandList = await getBrandListById({ cid, aid, brandListId });\r\n setListName(brandList ? brandList.Name : '');\r\n } catch (error) {\r\n // No error notification here since it's summary bar, which won't block the normal workflow.\r\n setListName('');\r\n }\r\n }\r\n\r\n if (brandListId) {\r\n fetchData();\r\n }\r\n }, [aid, brandListId, cid]);\r\n\r\n // Add Brand List breadcrumb.\r\n // The parent ID is shared by the account-level entrypoints in the sitemap.\r\n if (scope.values.brandListId && selectedParent && selectedParent.id === SITE_MAP_ID && scope.location.pathname.includes('details')) {\r\n const path = getRoutePathById(siteMap, SITE_MAP_ID);\r\n const breadcrumbUrl = new URI(path)\r\n .addQuery({ uid, cid, aid })\r\n .toString();\r\n\r\n const additionalItems = [];\r\n additionalItems.push({\r\n key: `navigate-brandListId-${brandListId}`,\r\n text: listName,\r\n });\r\n\r\n return (\r\n \r\n );\r\n }\r\n return selectedParent ? (\r\n \r\n ) : null;\r\n};\r\n\r\nLoader.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n siteMap: siteMapPropType.isRequired,\r\n breadCrumbText: PropTypes.string,\r\n backButtonText: PropTypes.string,\r\n backButtonUrl: PropTypes.string,\r\n updateAvailability: PropTypes.func,\r\n scope: PropTypes.shape({\r\n values: PropTypes.shape({\r\n brandListId: PropTypes.number,\r\n uid: PropTypes.string,\r\n cid: PropTypes.string,\r\n aid: PropTypes.string,\r\n }).isRequired,\r\n location: PropTypes.shape({\r\n pathname: PropTypes.string.isRequired,\r\n }).isRequired,\r\n }).isRequired,\r\n};\r\n\r\nLoader.defaultProps = {\r\n breadCrumbText: null,\r\n backButtonText: null,\r\n backButtonUrl: null,\r\n updateAvailability: _.noop,\r\n};\r\n\r\nexport const BrandListsDetailsPageLoader = withScope(withRouter(React.memo(Loader)));\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n getRoutePathById,\r\n withStandaloneSiteMap,\r\n withToolsSiteMap,\r\n withImportSiteMap,\r\n withHotelCenterSiteMap,\r\n withHotelCenterV2SiteMap,\r\n withAdInsightSiteMap,\r\n withBidStrategiesSiteMap,\r\n withSiteMap,\r\n processor,\r\n} from '@bingads-webui-campaign-react/with-site-map';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport { ElementSelector } from '@bingads-webui-campaign-react/element-selector';\r\nimport { withLastURL } from '@bingads-webui-campaign-react/with-last-url';\r\nimport { withScope } from '@bingads-webui-react/scope-service';\r\nimport { withPermissions } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { isNavigationRefreshOn } from '@bingads-webui-react/preference-utility';\r\nimport { SummaryBarPlaceholder } from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport { CampaignScopeBarLoader } from '@bingads-webui-campaign-react/scope-bar';\r\nimport { CampaignSummaryBarLoader } from './campaign-summary-bar-loader';\r\nimport { SharedBudgetSummaryBarLoader } from './shared-budget-summary-bar-loader';\r\nimport { AccountsSummaryBarLoader } from './accounts-summary-bar-loader';\r\nimport { SimpleSummaryBarLoader } from './simple-summary-bar-loader';\r\nimport { GeneralSummaryBarLoader } from './general-summary-bar-loader';\r\nimport { SiteExclusionListLinkedPageLoader } from './site-exclusion-list-linked-page-loader';\r\nimport { NegativeKeywordsListDetailsLoader } from './negative-keywords-list-details-summary-bar-loader';\r\nimport { PortfolioDetailsLoader } from './portfolio-details-summary-bar-loader';\r\nimport { MerchantCenterSummaryBarLoader } from './merchant-center-summary-bar-loader';\r\nimport { QueryInsightsSummaryBarLoader } from './query-insights-summary-bar-loader';\r\nimport { UetDashboardLoader } from './uet-dashboard-summary-bar-loader';\r\nimport { AssetLibrarySummaryBarLoader as AssetLibrarySummaryBarLoaderInternal } from './asset-library-summary-bar-loader';\r\nimport { AdStudioSummaryBarLoader as AdStudioSummaryBarLoaderInternal } from './ad-studio-summary-bar-loader';\r\nimport { PmaxAssetDetailsSummaryBarLoader } from './pmax-asset-details-summary-bar-loader';\r\nimport { BudgetCenterSummaryBarLoader as BudgetCenterSummaryBarLoaderInternal } from './budget-center-summary-bar-loader';\r\nimport { HotelCenterV2SummaryBarLoader as HotelCenterV2SummaryBarLoaderInternal } from './hotel-center-v2-summary-bar-loader';\r\nimport { AdEditorSummaryBarLoader as AdEditorSummaryBarLoaderInternal } from './ad-editor-summary-bar-loader';\r\n\r\nimport {\r\n getBulkDetailConfig,\r\n getRuleDetailConfig,\r\n getScriptsDetailConfig,\r\n getBulkUploadsBuildSpreadsheetConfig,\r\n} from './general-summary-bar-configs/index';\r\nimport { BrandListsDetailsPageLoader } from './brand-lists-details-page-loader';\r\n\r\nconst summaryBarProcessors = [processor.processPermissions, processor.processPath];\r\n\r\nconst RuleDetailSummaryBarLoader = withLastURL(withStandaloneSiteMap(React.memo(GeneralSummaryBarLoader), summaryBarProcessors, 'rule-detail'));\r\nconst BulkDetailSummaryBarLoader = withLastURL(withStandaloneSiteMap(React.memo(GeneralSummaryBarLoader), summaryBarProcessors, 'bulk-edits-detail'));\r\nconst ScriptsDetailSummaryBarLoader = withLastURL(withStandaloneSiteMap(React.memo(GeneralSummaryBarLoader), summaryBarProcessors, 'scripts-detail'));\r\nconst BulkUploadsBuildSpreadsheetSummaryBarLoader = withLastURL(withStandaloneSiteMap(React.memo(GeneralSummaryBarLoader), summaryBarProcessors, 'bulk-uploads-build-spreadsheet'));\r\nconst NegativeKeywordsListDetailsSummaryBarLoader = withStandaloneSiteMap(React.memo(NegativeKeywordsListDetailsLoader), summaryBarProcessors, 'negative-keywords-lists-detail');\r\nconst PortfolioDetailsSummaryBarLoader = withStandaloneSiteMap(React.memo(PortfolioDetailsLoader), summaryBarProcessors, 'portfolio-bid-strategy-details');\r\nconst CampaignSummaryBarWithLastUrl = withLastURL(CampaignSummaryBarLoader);\r\nconst QueryInsightsSummaryBarWithLastUrl = withLastURL(QueryInsightsSummaryBarLoader);\r\nconst UetDashboardSummaryBarWithLastUrl = withLastURL(withToolsSiteMap(UetDashboardLoader, summaryBarProcessors, 'uet-tag'));\r\nconst SharedBudgetSummaryBarWithLastUrl = withLastURL(SharedBudgetSummaryBarLoader);\r\nconst StandaloneSummaryBarLoader = withLastURL(withStandaloneSiteMap(SimpleSummaryBarLoader, summaryBarProcessors));\r\nconst SiteExclusionListLinkedPageSummaryBarLoader = withLastURL(withToolsSiteMap(SiteExclusionListLinkedPageLoader, summaryBarProcessors));\r\nconst ToolsPageSummaryBarLoader = withLastURL(withToolsSiteMap(SimpleSummaryBarLoader, summaryBarProcessors));\r\nconst AudiencePlannerSummaryBarLoader = withLastURL(withToolsSiteMap(SimpleSummaryBarLoader, summaryBarProcessors, 'audience-planner'));\r\nconst FeedItemsPageSummaryBarLoader = withStandaloneSiteMap(\r\n SimpleSummaryBarLoader,\r\n summaryBarProcessors,\r\n ['ad-customizer-feeds-items', 'dynamic-data-feeds-items', 'page-feed-item']\r\n);\r\nconst AdEditorSummaryBarLoader = withStandaloneSiteMap(\r\n AdEditorSummaryBarLoaderInternal,\r\n summaryBarProcessors,\r\n ['ad-editor']\r\n);\r\nconst PerformanceTargetsPageSummaryBarLoader = withStandaloneSiteMap(\r\n SimpleSummaryBarLoader,\r\n summaryBarProcessors,\r\n ['performance-targets-create', 'performance-targets-overview']\r\n);\r\nconst StandaloneAccountsSummaryBarLoader = withStandaloneSiteMap(\r\n SimpleSummaryBarLoader,\r\n summaryBarProcessors,\r\n ['account-create', 'account-linking', 'accounts-unlinking', 'accounts-transfer', 'pending-transfer-request']\r\n);\r\nconst ImportPageSummaryBarLoader = withLastURL(withImportSiteMap(SimpleSummaryBarLoader, summaryBarProcessors));\r\nconst HotelCenterSummaryBarLoader = withLastURL(withHotelCenterSiteMap(SimpleSummaryBarLoader, summaryBarProcessors));\r\nconst HotelCenterV2SummaryBarLoader = withLastURL(withHotelCenterV2SiteMap(HotelCenterV2SummaryBarLoaderInternal, summaryBarProcessors));\r\nconst AdInsightSummaryBarLoader = withLastURL(withAdInsightSiteMap(SimpleSummaryBarLoader, summaryBarProcessors));\r\nconst AssetLibrarySummaryBarLoader = withLastURL(withToolsSiteMap(AssetLibrarySummaryBarLoaderInternal, summaryBarProcessors, 'creative-studio-asset-library'));\r\nconst AdStudioSummaryBarLoader = withLastURL(withToolsSiteMap(AdStudioSummaryBarLoaderInternal, summaryBarProcessors, 'ad-studio-app-entry'));\r\nconst BidStrategiesSummaryBarLoader = withLastURL(withBidStrategiesSiteMap(SimpleSummaryBarLoader, summaryBarProcessors));\r\nconst AssetGroupCreateAndEditSummaryBarWithLastUrl = withLastURL(withStandaloneSiteMap(\r\n SimpleSummaryBarLoader,\r\n summaryBarProcessors,\r\n ['asset-group-create', 'asset-group-edit']\r\n));\r\nconst BudgetCenterSummaryBarLoader = withToolsSiteMap(BudgetCenterSummaryBarLoaderInternal, summaryBarProcessors, 'budget-center');\r\nconst BrandListsDetailsPageSummaryBarLoader = withLastURL(withToolsSiteMap(BrandListsDetailsPageLoader, summaryBarProcessors, 'brand-lists'));\r\n\r\nexport const SummaryBarContainerInternal = React.memo((props) => {\r\n const isNavRefresh = isNavigationRefreshOn(props.permissions);\r\n const isNavigationRefreshBudgetCenterOn = isNavRefresh && props.permissions.dynamic.NavigationRefreshBudgetCenter;\r\n return (\r\n )}>\r\n \r\n \r\n {\r\n props.scope.remove(['assetGroupId']);\r\n props.scope.save(getRoutePathById(props.siteMap, 'asset-groups'));\r\n },\r\n }]}\r\n />\r\n \r\n {\r\n isNavRefresh\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 {!isNavigationRefreshBudgetCenterOn && }\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\nSummaryBarContainerInternal.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n scope: PropTypes.shape({\r\n remove: PropTypes.func.isRequired,\r\n save: PropTypes.func.isRequired,\r\n }).isRequired,\r\n siteMap: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n NavigationRefresh: PropTypes.bool,\r\n NavigationRefreshBudgetCenter: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n};\r\n\r\nexport const SummaryBarContainer = withSiteMap(withScope(withI18nConsumer(withPermissions(SummaryBarContainerInternal))));\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { values, result } from 'underscore';\r\nimport { CampaignType } from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport { siteMapPropType } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { QueryParam } from '@bingads-webui-react/scope-service';\r\nimport { SummaryBarFactory } from './components';\r\n\r\nexport const AdSummaryBar = ({\r\n adGroup,\r\n i18n,\r\n scope,\r\n siteMap,\r\n summaryBarActivityLogger,\r\n permissions,\r\n}) => {\r\n const {\r\n id,\r\n name,\r\n campaignType,\r\n campaignId,\r\n campaignName,\r\n } = adGroup;\r\n\r\n const queryParam = new QueryParam(scope.history.location, scope.history);\r\n const { adType } = queryParam.values;\r\n queryParam.remove(['adId']);\r\n if (adType) {\r\n queryParam.remove(['adType']);\r\n }\r\n\r\n const backButtonUrl = `/campaign/vnext/ads?${queryParam.stringify()}`;\r\n const adName = {\r\n Responsive: i18n.getString(_TL_('Responsive ad')),\r\n ResponsiveSearch: i18n.getString(_TL_('Responsive search ad')),\r\n DynamicSearch: i18n.getString(_TL_('Dynamic search ad')),\r\n DynamicResponsive: i18n.getString(_TL_('Responsive ad')),\r\n };\r\n\r\n const summaryBarProps = {\r\n backButtonProps: {\r\n url: backButtonUrl,\r\n buttonText: i18n.getString(_TL_('Back to ads')),\r\n },\r\n breadcrumbsProps: {\r\n campaignName,\r\n campaignId,\r\n // Fallback to 'All campaigns' if campaign type filter is not 'Search campaigns'\r\n campaignType: campaignType === CampaignType.Default ? campaignType : CampaignType.All,\r\n adGroupId: id,\r\n adGroupName: name,\r\n adName: adName[adType],\r\n maxDisplayedItems: 4,\r\n },\r\n i18n,\r\n summaryBarActivityLogger,\r\n scope,\r\n siteMap,\r\n };\r\n\r\n const isAppBarBreadcrumbEnabled = result(permissions.dynamic, 'AppBarBreadcrumb', false);\r\n return ();\r\n};\r\n\r\nAdSummaryBar.propTypes = {\r\n adGroup: PropTypes.shape({\r\n id: PropTypes.number.isRequired,\r\n name: PropTypes.string.isRequired,\r\n campaignId: PropTypes.number.isRequired,\r\n campaignName: PropTypes.string.isRequired,\r\n status: PropTypes.string.isRequired,\r\n campaignType: PropTypes.oneOf(values(CampaignType)).isRequired,\r\n bid: PropTypes.number.isRequired,\r\n bidStrategy: PropTypes.string.isRequired,\r\n locations: PropTypes.array,\r\n audiences: PropTypes.array,\r\n devices: PropTypes.array,\r\n }).isRequired,\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n siteMap: siteMapPropType.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n summaryBarActivityLogger: PropTypes.shape({\r\n changeScopeActivity: PropTypes.any,\r\n }).isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { values, result } from 'underscore';\r\nimport { CampaignType } from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport { QueryParam } from '@bingads-webui-react/scope-service';\r\nimport { siteMapPropType } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { SummaryBarFactory } from './components';\r\nimport { adGroupEntityItems, showErrorWithAlertCenter } from './helpers';\r\nimport { convertToSummaryBarStatusPatch } from './helpers/entity-converter';\r\n\r\nexport const AdGroupSummaryBar = ({\r\n adGroup,\r\n i18n,\r\n updateAdGroup,\r\n canEdit,\r\n scope,\r\n siteMap,\r\n summaryBarActivityLogger,\r\n permissions,\r\n excludedLocationOnly,\r\n}) => {\r\n const changeStatus = selectedStatus => updateAdGroup({\r\n adGroup,\r\n patch: { status: selectedStatus.id },\r\n converter: convertToSummaryBarStatusPatch,\r\n }).catch((response) => {\r\n showErrorWithAlertCenter(response, i18n);\r\n });\r\n\r\n const updateBid = patch => updateAdGroup({\r\n adGroup,\r\n patch,\r\n });\r\n\r\n const adGroupSummaryBarItems = adGroupEntityItems({\r\n changeStatus, scope, siteMap, i18n, ...adGroup, canEdit, updateBid, permissions, summaryBarActivityLogger, excludedLocationOnly,\r\n });\r\n\r\n const {\r\n id,\r\n name,\r\n campaignType,\r\n campaignId,\r\n campaignName,\r\n } = adGroup;\r\n\r\n const isAppBarBreadcrumbEnabled = result(permissions.dynamic, 'AppBarBreadcrumb', false);\r\n const summaryBarProps = {\r\n breadcrumbsProps: {\r\n campaignName,\r\n campaignId,\r\n campaignType,\r\n adGroupId: id,\r\n adGroupName: name,\r\n },\r\n summaryBarItems: adGroupSummaryBarItems,\r\n i18n,\r\n summaryBarActivityLogger,\r\n scope,\r\n siteMap,\r\n };\r\n\r\n return ();\r\n};\r\n\r\nAdGroupSummaryBar.propTypes = {\r\n adGroup: PropTypes.shape({\r\n id: PropTypes.number.isRequired,\r\n name: PropTypes.string.isRequired,\r\n campaignId: PropTypes.number.isRequired,\r\n campaignName: PropTypes.string.isRequired,\r\n status: PropTypes.string.isRequired,\r\n campaignType: PropTypes.oneOf(values(CampaignType)).isRequired, // campaignType is for breadscrumb\r\n currentCampaignType: PropTypes.oneOf(values(CampaignType)).isRequired,\r\n campaignSubType: PropTypes.string,\r\n displayBiddingStrategyType: PropTypes.string.isRequired,\r\n bid: PropTypes.number.isRequired,\r\n bidStrategy: PropTypes.string.isRequired,\r\n locations: PropTypes.array,\r\n audiences: PropTypes.array,\r\n devices: PropTypes.array,\r\n }).isRequired,\r\n excludedLocationOnly: PropTypes.bool.isRequired,\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n siteMap: siteMapPropType.isRequired,\r\n updateAdGroup: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n canEdit: PropTypes.bool.isRequired,\r\n summaryBarActivityLogger: PropTypes.shape({\r\n changeScopeActivity: PropTypes.any,\r\n }).isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { values, result } from 'underscore';\r\nimport { CampaignType } from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport { QueryParam } from '@bingads-webui-react/scope-service';\r\nimport { siteMapPropType } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { sharedComponentFunctionStateStore } from '@bingads-webui-campaign/recommendation-core';\r\nimport campaignCacheManager from '@bingads-webui-campaign-legacy/cache-manager/index';\r\nimport { SummaryBarFactory } from './components';\r\nimport { campaignEntityItems, showErrorWithAlertCenter } from './helpers';\r\nimport { convertToSummaryBarStatusPatch } from './helpers/entity-converter';\r\n\r\nexport const CampaignSummaryBar = ({\r\n campaign,\r\n osData,\r\n i18n,\r\n updateCampaign,\r\n canEdit,\r\n scope,\r\n siteMap,\r\n permissions,\r\n skipInvalidateCache,\r\n summaryBarActivityLogger,\r\n excludedLocationOnly,\r\n}) => {\r\n const changeStatus = selectedStatus => updateCampaign({\r\n campaign,\r\n patch: ({ status: selectedStatus.id }),\r\n converter: convertToSummaryBarStatusPatch,\r\n }).catch((response) => {\r\n showErrorWithAlertCenter(response, i18n);\r\n });\r\n const updateInlineBudget = patch => updateCampaign({\r\n campaign,\r\n patch,\r\n converter: item => ({ Budget: item.budget }),\r\n });\r\n const updateSharedBudget = patch => updateCampaign({\r\n campaign,\r\n patch,\r\n updateLevel: 'Budget',\r\n budgetId: campaign.budget.Id,\r\n }).then(() => {\r\n // update shared budget can't be detected by campaign odata cache manager\r\n // need to do it manually\r\n // skipInvalidateCache is for the test\r\n if (!skipInvalidateCache) {\r\n campaignCacheManager.invalidate('Campaign');\r\n }\r\n });\r\n\r\n const campaignSummaryBarItems = campaignEntityItems({\r\n changeStatus, scope, siteMap, permissions, i18n, ...campaign, osData, canEdit, updateInlineBudget, updateSharedBudget, summaryBarActivityLogger, excludedLocationOnly,\r\n });\r\n\r\n sharedComponentFunctionStateStore.setState({ updateCampaignStatus: changeStatus });\r\n\r\n const { id, name, campaignType } = campaign;\r\n\r\n const summaryBarProps = {\r\n breadcrumbsProps: { campaignName: name, campaignId: id, campaignType },\r\n summaryBarItems: campaignSummaryBarItems,\r\n i18n,\r\n summaryBarActivityLogger,\r\n scope,\r\n siteMap,\r\n };\r\n\r\n const isAppBarBreadcrumbEnabled = result(permissions.dynamic, 'AppBarBreadcrumb', false);\r\n return ();\r\n};\r\n\r\nCampaignSummaryBar.propTypes = {\r\n campaign: PropTypes.shape({\r\n id: PropTypes.number.isRequired,\r\n name: PropTypes.string.isRequired,\r\n status: PropTypes.string.isRequired,\r\n campaignType: PropTypes.oneOf(values(CampaignType)).isRequired,\r\n currentCampaignType: PropTypes.oneOf(values(CampaignType)).isRequired,\r\n campaignSubType: PropTypes.string,\r\n budget: PropTypes.shape({}).isRequired,\r\n bidStrategy: PropTypes.string.isRequired,\r\n locations: PropTypes.array,\r\n audiences: PropTypes.array,\r\n devices: PropTypes.array,\r\n hasBudgetLandscape: PropTypes.bool,\r\n }).isRequired,\r\n osData: PropTypes.shape({\r\n OverallOptimizationScoreBar: PropTypes.exact({\r\n Available: PropTypes.number,\r\n Dismissed: PropTypes.number,\r\n Gained: PropTypes.number,\r\n }),\r\n }).isRequired,\r\n excludedLocationOnly: PropTypes.bool.isRequired,\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n siteMap: siteMapPropType.isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n updateCampaign: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n canEdit: PropTypes.bool.isRequired,\r\n summaryBarActivityLogger: PropTypes.shape({\r\n changeScopeActivity: PropTypes.any,\r\n }).isRequired,\r\n skipInvalidateCache: PropTypes.bool.isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { values, result } from 'underscore';\r\nimport { CampaignType } from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport { QueryParam } from '@bingads-webui-react/scope-service';\r\nimport { siteMapPropType } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { SummaryBarFactory } from './components';\r\nimport { experimentAdGroupEntityItems, showErrorWithAlertCenter } from './helpers';\r\nimport { convertToSummaryBarStatusPatch } from './helpers/entity-converter';\r\n\r\nexport const ExperimentAdGroupSummaryBar = ({\r\n adGroup,\r\n i18n,\r\n scope,\r\n siteMap,\r\n updateAdGroup,\r\n canEdit,\r\n summaryBarActivityLogger,\r\n permissions,\r\n excludedLocationOnly,\r\n}) => {\r\n const changeStatus = selectedStatus => updateAdGroup({\r\n adGroup,\r\n patch: { status: selectedStatus.id },\r\n converter: convertToSummaryBarStatusPatch,\r\n }).catch((response) => {\r\n showErrorWithAlertCenter(response, i18n);\r\n });\r\n\r\n const updateBid = patch => updateAdGroup({\r\n adGroup,\r\n patch,\r\n });\r\n\r\n const adGroupSummaryBarItems = experimentAdGroupEntityItems({\r\n changeStatus, scope, siteMap, i18n, ...adGroup, canEdit, updateBid, permissions, summaryBarActivityLogger, excludedLocationOnly,\r\n });\r\n\r\n const {\r\n id,\r\n name,\r\n campaignType,\r\n campaignId,\r\n campaignName,\r\n } = adGroup;\r\n\r\n const summaryBarProps = {\r\n breadcrumbsProps: {\r\n campaignName,\r\n campaignId,\r\n campaignType,\r\n adGroupId: id,\r\n adGroupName: name,\r\n },\r\n summaryBarItems: adGroupSummaryBarItems,\r\n i18n,\r\n summaryBarActivityLogger,\r\n scope,\r\n siteMap,\r\n };\r\n\r\n const isAppBarBreadcrumbEnabled = result(permissions.dynamic, 'AppBarBreadcrumb', false);\r\n return ();\r\n};\r\n\r\nExperimentAdGroupSummaryBar.propTypes = {\r\n adGroup: PropTypes.shape({\r\n id: PropTypes.number.isRequired,\r\n name: PropTypes.string.isRequired,\r\n campaignId: PropTypes.number.isRequired,\r\n campaignName: PropTypes.string.isRequired,\r\n status: PropTypes.string.isRequired,\r\n campaignType: PropTypes.oneOf(values(CampaignType)).isRequired, // campaignType is for breadscrumb\r\n currentCampaignType: PropTypes.oneOf(values(CampaignType)).isRequired,\r\n campaignSubType: PropTypes.string,\r\n bid: PropTypes.number.isRequired,\r\n displayBiddingStrategyType: PropTypes.string.isRequired,\r\n bidStrategy: PropTypes.string.isRequired,\r\n locations: PropTypes.array,\r\n audiences: PropTypes.array,\r\n devices: PropTypes.array,\r\n }).isRequired,\r\n excludedLocationOnly: PropTypes.bool.isRequired,\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n siteMap: siteMapPropType.isRequired,\r\n updateAdGroup: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n canEdit: PropTypes.bool.isRequired,\r\n summaryBarActivityLogger: PropTypes.shape({\r\n changeScopeActivity: PropTypes.any,\r\n }).isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { values, result } from 'underscore';\r\nimport { QueryParam } from '@bingads-webui-react/scope-service';\r\nimport { siteMapPropType } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { CampaignType } from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport { SummaryBarFactory } from './components';\r\nimport { experimentCampaignEntityItems } from './helpers';\r\n\r\nexport const ExperimentCampaignSummaryBar = ({\r\n campaign,\r\n i18n,\r\n scope,\r\n siteMap,\r\n permissions,\r\n canEdit,\r\n summaryBarActivityLogger,\r\n updateExperimentCampaign,\r\n excludedLocationOnly,\r\n}) => {\r\n const changeStartDate = patch => updateExperimentCampaign({\r\n campaign,\r\n patch,\r\n converter: item => ({ StartDate: item.startDate }),\r\n });\r\n\r\n const changeEndDate = patch => updateExperimentCampaign({\r\n campaign,\r\n patch,\r\n converter: item => ({ EndDate: item.endDate }),\r\n });\r\n\r\n const campaignSummaryBarItems = experimentCampaignEntityItems({\r\n i18n, scope, permissions, siteMap, ...campaign, canEdit, summaryBarActivityLogger, changeStartDate, changeEndDate, excludedLocationOnly,\r\n });\r\n\r\n const { id, name, campaignType } = campaign;\r\n\r\n const summaryBarProps = {\r\n breadcrumbsProps: { campaignName: name, campaignId: id, campaignType },\r\n summaryBarItems: campaignSummaryBarItems,\r\n i18n,\r\n summaryBarActivityLogger,\r\n scope,\r\n siteMap,\r\n };\r\n\r\n const isAppBarBreadcrumbEnabled = result(permissions.dynamic, 'AppBarBreadcrumb', false);\r\n return ();\r\n};\r\n\r\nExperimentCampaignSummaryBar.propTypes = {\r\n campaign: PropTypes.shape({\r\n id: PropTypes.number.isRequired,\r\n name: PropTypes.string.isRequired,\r\n status: PropTypes.string.isRequired,\r\n startDate: PropTypes.string.isRequired,\r\n endDate: PropTypes.string.isRequired,\r\n originalCampaignName: PropTypes.string.isRequired,\r\n originalCampaignId: PropTypes.number.isRequired,\r\n campaignType: PropTypes.oneOf(values(CampaignType)).isRequired,\r\n currentCampaignType: PropTypes.oneOf(values(CampaignType)).isRequired,\r\n campaignSubType: PropTypes.string,\r\n budget: PropTypes.shape({}).isRequired,\r\n experimentId: PropTypes.number,\r\n bidStrategy: PropTypes.string.isRequired,\r\n locations: PropTypes.array,\r\n audiences: PropTypes.array,\r\n devices: PropTypes.array,\r\n }).isRequired,\r\n excludedLocationOnly: PropTypes.bool.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n siteMap: siteMapPropType.isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n canEdit: PropTypes.bool.isRequired,\r\n summaryBarActivityLogger: PropTypes.shape({\r\n changeScopeActivity: PropTypes.any,\r\n }).isRequired,\r\n updateExperimentCampaign: PropTypes.func.isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { defaults, has, values, chain } from 'underscore';\r\nimport { CampaignType } from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport { QueryParam } from '@bingads-webui-react/scope-service';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { siteMapPropType } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { AdSummaryBar } from './ad-summary-bar';\r\nimport { AdGroupSummaryBar } from './ad-group-summary-bar';\r\nimport { CampaignSummaryBar } from './campaign-summary-bar';\r\nimport { ExperimentAdGroupSummaryBar } from './experiment-ad-group-summary-bar';\r\nimport { ExperimentCampaignSummaryBar } from './experiment-campaign-summary-bar';\r\nimport { SummaryBarFactory } from './components';\r\nimport { getSummaryBarStyle } from './styles';\r\n\r\nexport class SummaryBarInternal extends React.PureComponent {\r\n componentDidMount() {\r\n if (this.props.perfMarker) {\r\n this.props.perfMarker.done();\r\n }\r\n }\r\n\r\n render() {\r\n const {\r\n adGroup,\r\n updateAdGroup,\r\n campaign,\r\n osData,\r\n updateCampaign,\r\n campaignType,\r\n summaryBarActivityLogger,\r\n scope,\r\n siteMap,\r\n permissions,\r\n canEdit,\r\n skipInvalidateCache,\r\n updateExperimentCampaign,\r\n } = this.props;\r\n\r\n const summaryBarSharedProps = {\r\n summaryBarActivityLogger,\r\n scope,\r\n siteMap,\r\n permissions,\r\n canEdit,\r\n skipInvalidateCache,\r\n excludedLocationOnly: chain(campaign).result('bidStrategy').value() === 'Commission',\r\n };\r\n let currentSummaryBar = i18n => (\r\n \r\n );\r\n\r\n if (adGroup) {\r\n if (has(scope.values, 'adId')) {\r\n currentSummaryBar = i18n => (\r\n \r\n );\r\n } else {\r\n currentSummaryBar = i18n => (adGroup.isExperiment ?\r\n () :\r\n ());\r\n }\r\n } else if (campaign) {\r\n currentSummaryBar = i18n => (campaign.isExperiment ?\r\n () :\r\n ());\r\n }\r\n\r\n return (\r\n \r\n {i18n => currentSummaryBar(i18n)}\r\n \r\n );\r\n }\r\n}\r\n\r\nSummaryBarInternal.propTypes = {\r\n adGroup: PropTypes.shape({\r\n isExperiment: PropTypes.bool,\r\n id: PropTypes.number.isRequired,\r\n name: PropTypes.string.isRequired,\r\n campaignId: PropTypes.number.isRequired,\r\n campaignName: PropTypes.string.isRequired,\r\n currentCampaignType: PropTypes.oneOf(values(CampaignType)).isRequired,\r\n campaignSubType: PropTypes.string,\r\n status: PropTypes.string,\r\n bid: PropTypes.number.isRequired,\r\n bidStrategy: PropTypes.string.isRequired,\r\n locations: PropTypes.array,\r\n audiences: PropTypes.array,\r\n devices: PropTypes.array,\r\n }),\r\n updateAdGroup: PropTypes.func,\r\n campaign: PropTypes.shape({\r\n isExperiment: PropTypes.bool,\r\n id: PropTypes.number.isRequired,\r\n name: PropTypes.string.isRequired,\r\n status: PropTypes.string,\r\n currentCampaignType: PropTypes.oneOf(values(CampaignType)).isRequired,\r\n campaignSubType: PropTypes.string,\r\n startDate: PropTypes.string,\r\n endDate: PropTypes.string,\r\n originalCampaignName: PropTypes.string,\r\n originalCampaignId: PropTypes.number,\r\n budget: PropTypes.shape({}).isRequired,\r\n bidStrategy: PropTypes.string.isRequired,\r\n locations: PropTypes.array,\r\n audiences: PropTypes.array,\r\n devices: PropTypes.array,\r\n experimentId: PropTypes.number,\r\n hasBudgetLandscape: PropTypes.bool,\r\n }),\r\n osData: PropTypes.shape({\r\n OverallOptimizationScoreBar: PropTypes.exact({\r\n Available: PropTypes.number,\r\n Dismissed: PropTypes.number,\r\n Gained: PropTypes.number,\r\n }),\r\n }),\r\n updateCampaign: PropTypes.func,\r\n updateExperimentCampaign: PropTypes.func,\r\n campaignType: PropTypes.oneOf(values(CampaignType)).isRequired,\r\n canEdit: PropTypes.bool,\r\n perfMarker: PropTypes.shape({\r\n done: PropTypes.func.isRequired,\r\n }),\r\n summaryBarActivityLogger: PropTypes.shape({\r\n changeScopeActivity: PropTypes.any,\r\n }).isRequired,\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n siteMap: siteMapPropType.isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n skipInvalidateCache: PropTypes.bool,\r\n};\r\n\r\nSummaryBarInternal.defaultProps = {\r\n adGroup: null,\r\n updateAdGroup: null,\r\n campaign: null,\r\n osData: null,\r\n updateCampaign: null,\r\n updateExperimentCampaign: null,\r\n canEdit: false,\r\n perfMarker: null,\r\n skipInvalidateCache: false,\r\n};\r\n\r\nexport const SummaryBar = withDefaultStyles(\r\n SummaryBarInternal,\r\n getSummaryBarStyle\r\n);\r\n","/* istanbul ignore file */ // ignore this file for component test as we cover it in selenium test\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'lodash';\r\nimport { compose, defaults, omit } from 'underscore';\r\nimport { withInstrumentation } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { withScope, QueryParam } from '@bingads-webui-react/scope-service';\r\nimport { withSiteMap, siteMapPropType } from '@bingads-webui-campaign-react/with-site-map';\r\nimport {\r\n getFilteredCampaignTypeFromRawFilter,\r\n} from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport { withGlobalFilter } from '@bingads-webui-campaign-react/global-filter-context';\r\nimport { WaterfallFilterType } from '@bingads-webui-campaign/filter-storage';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport { edmCampaign } from '@bingads-webui/edm-campaign';\r\nimport { SummaryBar } from './summary-bar';\r\nimport {\r\n convertToSummaryBarCampaign,\r\n convertToSummaryBarAdGroup,\r\n convertToSummaryBarExperimentCampaign,\r\n} from './helpers/entity-converter';\r\nimport {\r\n WithCampaignRepository,\r\n WithAdGroupRepository,\r\n WithExperimentRepository,\r\n WithBulkUpdateRepository,\r\n WithPatchExperimentRepository,\r\n WithOptimizationScoreRepository,\r\n} from './repository';\r\n\r\nclass UpdatableSummaryBar extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.campaignSummarybarPerfMarker = props.appPerfMarker.createChild('Campaigns_Summary_Bar');\r\n this.markAction('willInit');\r\n\r\n this.summaryBarActivityLogger = props.instrumentation.summaryBarScenario.create();\r\n\r\n this.previousCampaign = null;\r\n this.previousAdGroup = null;\r\n }\r\n\r\n state = {\r\n patchAdGroup: null,\r\n patchCampaign: null,\r\n };\r\n\r\n shouldComponentUpdate(nextProps, nextState) {\r\n const skipUpdateAdGroup = nextState.patchAdGroup !== this.state.patchAdGroup && nextState.patchAdGroup === null;\r\n const skipUpdateCampaign = nextState.patchCampaign !== this.state.patchCampaign && nextState.patchCampaign === null;\r\n\r\n if (skipUpdateAdGroup || skipUpdateCampaign) {\r\n return false;\r\n }\r\n return !(_.isEqual(nextState, this.state) && _.isEqual(nextProps, this.props));\r\n }\r\n\r\n get getFinalProps() {\r\n const campaignType\r\n = getFilteredCampaignTypeFromRawFilter(this.props[WaterfallFilterType.CampaignType]);\r\n const props = {\r\n ...this.props,\r\n updateAdGroup: this.updateAdGroup,\r\n updateCampaign: this.updateCampaign,\r\n updateExperimentCampaign: this.updateExperimentCampaign,\r\n campaignType,\r\n };\r\n\r\n return props;\r\n }\r\n\r\n get getCampaignLoadFallback() {\r\n return (\r\n \r\n );\r\n }\r\n\r\n markAction = (action) => {\r\n if (this.campaignSummarybarPerfMarker && action) {\r\n this.campaignSummarybarPerfMarker[action]();\r\n }\r\n };\r\n\r\n updateAdGroup = ({ adGroup, patch, converter = null }) => WithBulkUpdateRepository({\r\n patch: converter ? converter(patch) : patch,\r\n scope: this.props.scope,\r\n edmCampaign,\r\n updateLevel: 'AdGroup',\r\n }).then(() => {\r\n let newAdGroup = adGroup;\r\n\r\n if (patch.SearchBid || patch.CpmBid || patch.CpvBid) { // only one column will have value in one data row\r\n newAdGroup.bid = patch.SearchBid || patch.CpmBid || patch.CpvBid;\r\n } else {\r\n newAdGroup = defaults({}, patch, adGroup);\r\n }\r\n this.previousAdGroup = newAdGroup;\r\n\r\n // update finished means no error\r\n // show update result in advance for summary bar performance\r\n this.setState({\r\n patchAdGroup: newAdGroup,\r\n });\r\n });\r\n\r\n updateCampaign = ({\r\n campaign, patch, converter, ...others\r\n }) => WithBulkUpdateRepository({\r\n patch: converter ? converter(patch) : patch,\r\n scope: this.props.scope,\r\n edmCampaign,\r\n updateLevel: 'Campaign',\r\n ...others,\r\n }).then(() => {\r\n const { updateLevel: finalUpdateLevel } = others;\r\n const newCampaign = _.merge({}, campaign, finalUpdateLevel === 'Budget' ? { budget: patch } : patch);\r\n this.previousCampaign = newCampaign;\r\n\r\n // update finished means no error\r\n // show update result in advance for summary bar performance\r\n this.setState({\r\n patchCampaign: newCampaign,\r\n });\r\n });\r\n\r\n updateExperimentCampaign = ({\r\n campaign, patch, converter,\r\n }) => WithPatchExperimentRepository({\r\n patch: converter ? converter(patch) : patch,\r\n scope: this.props.scope,\r\n edmCampaign,\r\n experimentId: campaign.experimentId,\r\n });\r\n\r\n consumeOdataResults = RenderSummaryBar => ({\r\n adGroupFromOData,\r\n campaignFromOData,\r\n osData,\r\n }) => {\r\n this.markAction('willRender');\r\n\r\n const campaign = campaignFromOData\r\n ? convertToSummaryBarCampaign(campaignFromOData)\r\n : null;\r\n\r\n const adGroup = adGroupFromOData\r\n ? convertToSummaryBarAdGroup({\r\n ...adGroupFromOData,\r\n Status: adGroupFromOData.EntityStatus,\r\n Campaign: campaignFromOData,\r\n })\r\n : null;\r\n\r\n if (campaignFromOData && campaignFromOData.ExperimentId) {\r\n const experimentId = campaignFromOData.ExperimentId;\r\n const extendedCampaign = { experimentId, ...campaign };\r\n\r\n return ();\r\n }\r\n\r\n return ();\r\n };\r\n\r\n consumeAdGroupRepository = SummaryBarWithAdGroupCriterionResults => passThroughProps => (\r\n (\r\n \r\n )\r\n );\r\n\r\n consumeCampaignRepository = SummaryBarWithCampaignCriterionResults => (\r\n (\r\n \r\n )\r\n );\r\n\r\n consumeOptimizationScoreRepository = SummaryBarWithCampaignAdGroupCriterionResults => passThroughProps => (\r\n (\r\n \r\n )\r\n );\r\n\r\n renderSummaryBar = () => ({\r\n experimentFromOData,\r\n campaign,\r\n adGroup: summaryBarAdGroup,\r\n osData,\r\n }) => {\r\n const props = this.getFinalProps;\r\n const summaryBarCampaign = experimentFromOData ?\r\n convertToSummaryBarExperimentCampaign(experimentFromOData, campaign)\r\n : campaign;\r\n const omitCampaignType = item => omit(item, 'campaignType');\r\n const willUpdate = (item, comparableItem) => item && !_.isEqual(omitCampaignType(comparableItem), omitCampaignType(item));\r\n const didUpdate = (item, comparableItem) => item && _.isEqual(omitCampaignType(comparableItem), omitCampaignType(item));\r\n\r\n const { patchAdGroup, patchCampaign } = this.state;\r\n const willAdGroupUpdated = willUpdate(patchAdGroup, summaryBarAdGroup);\r\n const willCampaignUpdated = willUpdate(patchCampaign, summaryBarCampaign);\r\n const didAdGroupUpdated = didUpdate(patchAdGroup, summaryBarAdGroup);\r\n const didCampaignUpdated = didUpdate(patchCampaign, summaryBarCampaign);\r\n\r\n // reset patchAdGroup\r\n if (didAdGroupUpdated && patchAdGroup) {\r\n this.setState({\r\n patchAdGroup: null,\r\n });\r\n }\r\n\r\n if (didCampaignUpdated && patchCampaign) {\r\n this.setState({\r\n patchCampaign: null,\r\n });\r\n }\r\n\r\n const finalCampaign = willCampaignUpdated ? patchCampaign : summaryBarCampaign;\r\n const finalAdGroup = willAdGroupUpdated ? patchAdGroup : summaryBarAdGroup;\r\n\r\n this.previousCampaign = finalCampaign;\r\n this.previousAdGroup = finalAdGroup;\r\n\r\n return (\r\n \r\n );\r\n };\r\n\r\n render() {\r\n this.markAction('willFetchData');\r\n\r\n const { permissions } = this.props;\r\n const isOptimizationScoreOn = permissions.dynamic.OptimizationScore;\r\n\r\n const renderSummaryBarWithData = isOptimizationScoreOn ? compose(\r\n this.consumeCampaignRepository,\r\n this.consumeAdGroupRepository,\r\n this.consumeOptimizationScoreRepository,\r\n this.consumeOdataResults,\r\n this.renderSummaryBar\r\n ) : compose(\r\n this.consumeCampaignRepository,\r\n this.consumeAdGroupRepository,\r\n this.consumeOdataResults,\r\n this.renderSummaryBar\r\n );\r\n\r\n return renderSummaryBarWithData();\r\n }\r\n}\r\n\r\nUpdatableSummaryBar.propTypes = {\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n siteMap: siteMapPropType.isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n appPerfMarker: PropTypes.shape({\r\n createChild: PropTypes.func.isRequired,\r\n }),\r\n instrumentation: PropTypes.shape({\r\n summaryBarScenario: PropTypes.any,\r\n }).isRequired,\r\n};\r\n\r\nUpdatableSummaryBar.defaultProps = {\r\n appPerfMarker: null,\r\n};\r\n\r\nexport const SummaryBarWithScope\r\n = withInstrumentation(withSiteMap(withGlobalFilter(withScope(withI18nConsumer(UpdatableSummaryBar)))));\r\n","import PropTypes from 'prop-types';\r\nimport React from 'react';\r\nimport { findSiteMap } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { Breadcrumb } from '@bingads-webui-react/breadcrumb';\r\nimport { StyledMenuItemTag } from '@bingads-webui-react/menu-item-tag';\r\n\r\nconst isLeafNode = item => item && item.children.length === 0 && item.selected === true;\r\nexport class SimpleBreadcrumb extends React.PureComponent {\r\n render() {\r\n const {\r\n maxDisplayedItems,\r\n selectedItem,\r\n breadCrumbText,\r\n i18n,\r\n breadcrumbUrl,\r\n additionalPrefixItems, // shown before the main breadcrumb item\r\n additionalItems,\r\n onClick,\r\n showTag,\r\n tagClass,\r\n } = this.props;\r\n\r\n let selectedChild;\r\n if (selectedItem) {\r\n selectedChild = findSiteMap([selectedItem], isLeafNode);\r\n }\r\n const standardItems = (breadCrumbText !== null || selectedChild != null) ? [\r\n {\r\n key: breadCrumbText !== null ? breadCrumbText : selectedChild.id,\r\n text: breadCrumbText !== null ? breadCrumbText : i18n.getString(selectedChild.name),\r\n isCurrentItem: true,\r\n url: breadcrumbUrl,\r\n onClick,\r\n },\r\n ] : [];\r\n\r\n const items = (additionalPrefixItems || []).concat(standardItems).concat(additionalItems || []);\r\n\r\n return (\r\n
\r\n \r\n {\r\n showTag && (\r\n \r\n \r\n \r\n )\r\n }\r\n
\r\n );\r\n }\r\n}\r\n\r\nSimpleBreadcrumb.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n maxDisplayedItems: PropTypes.number.isRequired,\r\n selectedItem: PropTypes.shape({\r\n id: PropTypes.string.isRequired,\r\n name: PropTypes.string.isRequired,\r\n url: PropTypes.string,\r\n }),\r\n breadCrumbText: PropTypes.string,\r\n breadcrumbUrl: PropTypes.string,\r\n additionalItems: PropTypes.arrayOf(PropTypes.shape({\r\n key: PropTypes.string,\r\n text: PropTypes.string,\r\n })),\r\n additionalPrefixItems: PropTypes.arrayOf(PropTypes.shape({\r\n key: PropTypes.string,\r\n text: PropTypes.string,\r\n })),\r\n onClick: PropTypes.func,\r\n showTag: PropTypes.string,\r\n tagClass: PropTypes.string,\r\n};\r\n\r\nSimpleBreadcrumb.defaultProps = {\r\n breadCrumbText: null,\r\n selectedItem: null,\r\n breadcrumbUrl: null,\r\n additionalItems: [],\r\n additionalPrefixItems: [],\r\n onClick: null,\r\n showTag: '',\r\n tagClass: '',\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport { SummaryBarContainer } from '@bingads-webui-react/summary-bar';\r\nimport { withPermissions } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { isNavigationRefreshOn } from '@bingads-webui-react/preference-utility';\r\nimport { SimpleBreadcrumb } from './components/simple-breadcrumb';\r\n\r\nclass AccountsSummaryBarInternal extends React.PureComponent {\r\n render() {\r\n const {\r\n i18n,\r\n selectedParent,\r\n breadCrumbText,\r\n permissions,\r\n } = this.props;\r\n\r\n return (\r\n }\r\n showScopeBackButton={isNavigationRefreshOn(permissions)}\r\n i18n={i18n}\r\n />\r\n );\r\n }\r\n}\r\n\r\nAccountsSummaryBarInternal.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n selectedParent: PropTypes.shape({\r\n id: PropTypes.string,\r\n name: PropTypes.string,\r\n url: PropTypes.string,\r\n }),\r\n breadCrumbText: PropTypes.string,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n NavigationRefresh: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n};\r\n\r\nAccountsSummaryBarInternal.defaultProps = {\r\n breadCrumbText: null,\r\n selectedParent: null,\r\n};\r\n\r\nexport const AccountsSummaryBar = withPermissions(withI18nConsumer(AccountsSummaryBarInternal));\r\n\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { isEmpty, isFunction, each } from 'underscore';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { SummaryBarContainer } from '@bingads-webui-react/summary-bar';\r\nimport { withPermissions } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { isNavigationRefreshOn } from '@bingads-webui-react/preference-utility';\r\nimport { SimpleBreadcrumb } from './components/simple-breadcrumb';\r\nimport { getSimpleSummaryBarStyle } from './styles';\r\n\r\nconst isHideBreadCrumbBack = (backButtonText, i18n) => backButtonText !== i18n.getString(_TL_('Back to campaigns'))\r\n&& backButtonText !== i18n.getString(_TL_('Back to accounts'));\r\n\r\nclass SimpleSummaryBarInternal extends React.PureComponent {\r\n constructor(props) {\r\n super(props);\r\n this.customSummaryBarItemsRef = React.createRef();\r\n }\r\n\r\n componentDidUpdate() {\r\n if (this.customSummaryBarItemsRef && this.customSummaryBarItemsRef.current) {\r\n this.customSummaryBarItemsRef.current.innerText = '';\r\n }\r\n }\r\n\r\n render() {\r\n const {\r\n i18n,\r\n selectedParent,\r\n breadCrumbText,\r\n backButtonText,\r\n backButtonUrl,\r\n onClickBackButton,\r\n customSummaryBarItemsId,\r\n isVisible,\r\n additionalPrefixItems,\r\n additionalItems,\r\n onClick,\r\n showTag,\r\n tagClass,\r\n permissions,\r\n } = this.props;\r\n const buttonText = backButtonText === null ? i18n.getString(_TL_('Back')) : backButtonText;\r\n const backButtonProps = isHideBreadCrumbBack(backButtonText, i18n) ? Object.assign({\r\n url: backButtonUrl,\r\n buttonText,\r\n }, onClickBackButton ? {\r\n onClick: onClickBackButton,\r\n } : {}) : null;\r\n each(additionalItems, (additionalItem, index) => {\r\n if (!isFunction(additionalItem.onClick)) {\r\n additionalItems[index].onClick = null;\r\n }\r\n });\r\n const breadcrumb = (!isEmpty(breadCrumbText) || selectedParent) ? (\r\n \r\n ) : null;\r\n const summaryBar = customSummaryBarItemsId ? (\r\n
\r\n ) : null;\r\n\r\n return isVisible ? (\r\n \r\n ) : null;\r\n }\r\n}\r\n\r\nSimpleSummaryBarInternal.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n selectedParent: PropTypes.shape({\r\n id: PropTypes.string,\r\n name: PropTypes.string,\r\n url: PropTypes.string,\r\n }),\r\n breadCrumbText: PropTypes.string,\r\n backButtonText: PropTypes.string,\r\n backButtonUrl: PropTypes.string,\r\n onClickBackButton: PropTypes.func,\r\n breadcrumbUrl: PropTypes.string,\r\n additionalPrefixItems: PropTypes.arrayOf(PropTypes.shape({\r\n key: PropTypes.string,\r\n text: PropTypes.string,\r\n })),\r\n additionalItems: PropTypes.arrayOf(PropTypes.shape({\r\n key: PropTypes.string,\r\n text: PropTypes.string,\r\n })),\r\n customSummaryBarItemsId: PropTypes.string,\r\n isVisible: PropTypes.bool,\r\n onClick: PropTypes.func,\r\n showTag: PropTypes.string,\r\n tagClass: PropTypes.string,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n NavigationRefresh: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n};\r\n\r\nSimpleSummaryBarInternal.defaultProps = {\r\n breadCrumbText: null,\r\n backButtonText: null,\r\n backButtonUrl: null,\r\n onClickBackButton: null,\r\n selectedParent: null,\r\n breadcrumbUrl: null,\r\n additionalPrefixItems: [],\r\n additionalItems: [],\r\n customSummaryBarItemsId: null,\r\n isVisible: true,\r\n onClick: null,\r\n showTag: '',\r\n tagClass: '',\r\n};\r\n\r\nexport const SimpleSummaryBar = withPermissions(withI18nConsumer(withDefaultStyles(\r\n SimpleSummaryBarInternal,\r\n getSimpleSummaryBarStyle\r\n)));\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { values, compose } from 'underscore';\r\nimport { withInstrumentation } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { CampaignType } from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport { withSiteMap, siteMapPropType } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { QueryParam } from '@bingads-webui-react/scope-service';\r\nimport { SummaryBarContainer } from '@bingads-webui-react/summary-bar';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { edmCampaign } from '@bingads-webui/edm-campaign';\r\nimport { withPermissions } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { isNavigationRefreshOn } from '@bingads-webui-react/preference-utility';\r\nimport { SharedBudgetConsumer } from './helpers/shared-budget-consumer';\r\nimport { sharedBudgetItems } from './helpers';\r\nimport { SummaryBarItemsResizeGroup } from './components/summary-bar-items-resize-group';\r\nimport { getSummaryBarStyle } from './styles';\r\nimport { WithBulkUpdateRepository, WithSharedBudgetRepository } from './repository';\r\n\r\nconst SharedBudgetSummaryBarInternal = ({\r\n i18n,\r\n scope,\r\n siteMap,\r\n canEdit,\r\n instrumentation,\r\n permissions,\r\n}) => {\r\n const consumeSharedBudgetRepository = SummaryBarWithBudgetCriterionResults => (\r\n (\r\n \r\n )\r\n );\r\n\r\n // eslint-disable-next-line react/prop-types\r\n const renderSharedBudgetSummaryBar = () => ({ sharedBudgetFromOData: budget }) => {\r\n const updateSharedBudget = patch => WithBulkUpdateRepository({\r\n patch,\r\n scope,\r\n edmCampaign,\r\n updateLevel: 'Budget',\r\n });\r\n\r\n const summaryBarActivityLogger = instrumentation.summaryBarScenario.create();\r\n\r\n const sharedBudgetBarItems = sharedBudgetItems({\r\n scope, i18n, canEdit, updateSharedBudget, summaryBarActivityLogger, budget,\r\n });\r\n\r\n const repositoryConsumer = new SharedBudgetConsumer({ scope, i18n, budget });\r\n const { renderSharedBudgetBreadCrumb } = repositoryConsumer.criteriaRenderer;\r\n const { uid, cid, aid } = scope.values;\r\n\r\n const backButtonProps = {\r\n url: `/campaign/vnext/sharedbudgets?uid=${uid}&cid=${cid}&aid=${aid}`,\r\n buttonText: i18n.getString(_TL_('Back to shared budgets')),\r\n };\r\n\r\n return (\r\n }\r\n showScopeBackButton={isNavigationRefreshOn(permissions)}\r\n i18n={i18n}\r\n />\r\n );\r\n };\r\n\r\n return compose(consumeSharedBudgetRepository, renderSharedBudgetSummaryBar)();\r\n};\r\n\r\nSharedBudgetSummaryBarInternal.propTypes = {\r\n campaign: PropTypes.shape({\r\n id: PropTypes.number.isRequired,\r\n name: PropTypes.string.isRequired,\r\n status: PropTypes.string.isRequired,\r\n campaignType: PropTypes.oneOf(values(CampaignType)).isRequired,\r\n budget: PropTypes.number.isRequired,\r\n bidStrategy: PropTypes.string.isRequired,\r\n locations: PropTypes.array,\r\n audiences: PropTypes.array,\r\n devices: PropTypes.array,\r\n }).isRequired,\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n siteMap: siteMapPropType.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n canEdit: PropTypes.bool,\r\n instrumentation: PropTypes.shape({\r\n summaryBarScenario: PropTypes.any,\r\n }).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n NavigationRefresh: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n};\r\n\r\nSharedBudgetSummaryBarInternal.defaultProps = {\r\n canEdit: false,\r\n};\r\n\r\nexport const SharedBudgetSummaryBar = withPermissions(withInstrumentation(withSiteMap(withDefaultStyles(\r\n SharedBudgetSummaryBarInternal,\r\n getSummaryBarStyle\r\n))));\r\n","import { findSelectedNode, trimScope, Scope } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { getRouterDep } from '@bingads-webui-campaign-react/legacy-router-dep';\r\nimport { i18nMap, safeGetString } from '@bingads-webui-campaign-react/merchant-shared';\r\n\r\nconst storeNameBreadcrumbItem = (scope, storeName) => {\r\n const { storeId } = scope.values;\r\n return {\r\n key: storeName,\r\n text: storeName,\r\n onClick: () => {\r\n getRouterDep(scope).navigateToRoute('merchant_product_issues', { storeId });\r\n },\r\n 'aria-label': storeName,\r\n };\r\n};\r\n\r\nconst allStoresBreadcrumbItemWithoughtClick = (i18n) => {\r\n const allStoresText = i18n.getString(_TL_('Merchant Center'));\r\n\r\n return {\r\n key: 'stores',\r\n text: allStoresText,\r\n 'aria-label': allStoresText,\r\n };\r\n};\r\n\r\nconst allStoresBreadcrumbItem = (scope, i18n) => {\r\n const allStoresText = i18n.getString(_TL_('Merchant Center'));\r\n\r\n return {\r\n key: 'stores',\r\n text: allStoresText,\r\n onClick: () => {\r\n scope.remove('storeId');\r\n getRouterDep(scope).navigateToRoute('merchant_stores');\r\n },\r\n 'aria-label': allStoresText,\r\n };\r\n};\r\n\r\nconst summaryBreadcrumbItem = (scope, i18n) => {\r\n const { storeId } = scope.values;\r\n const summaryText = i18n.getString(_TL_('Summary'));\r\n\r\n return {\r\n key: 'summary',\r\n text: summaryText,\r\n onClick: () => {\r\n getRouterDep(scope).navigateToRoute('merchant_product_issues', { storeId });\r\n },\r\n 'aria-label': summaryText,\r\n };\r\n};\r\n\r\nconst feedDetailsItems = (props) => {\r\n const {\r\n i18n,\r\n scope,\r\n storeName,\r\n feedName,\r\n } = props;\r\n const { storeId } = scope.values;\r\n const feedsText = i18n.getString(_TL_('Feeds'));\r\n\r\n return [\r\n allStoresBreadcrumbItem(scope, i18n),\r\n storeNameBreadcrumbItem(scope, storeName),\r\n {\r\n key: 'feeds',\r\n text: feedsText,\r\n onClick: () => {\r\n getRouterDep(scope).navigateToRoute('merchant_feeds', { storeId });\r\n },\r\n 'aria-label': feedsText,\r\n }, {\r\n key: 'feedName',\r\n text: feedName,\r\n 'aria-label': feedName,\r\n }];\r\n};\r\n\r\nconst createStoreItems = (props) => {\r\n const {\r\n i18n,\r\n scope,\r\n } = props;\r\n const merchantCenterText = i18n.getString(_TL_('Merchant Center'));\r\n const createStoreText = i18n.getString(_TL_('Create store'));\r\n\r\n return [{\r\n key: 'merchantcenter',\r\n text: merchantCenterText,\r\n onClick: () => {\r\n getRouterDep(scope).navigateToRoute('merchant_stores');\r\n },\r\n 'aria-label': merchantCenterText,\r\n }, {\r\n key: 'mmc-create-store',\r\n text: createStoreText,\r\n 'aria-label': createStoreText,\r\n }];\r\n};\r\n\r\nconst importStepsItems = (props) => {\r\n const {\r\n i18n,\r\n scope: {\r\n values: {\r\n editMode,\r\n },\r\n },\r\n } = props;\r\n const importsText = i18n.getString(_TL_('Imports'));\r\n const createImportText = i18n.getString(_TL_('Create new import'));\r\n const updateImportText = i18n.getString(_TL_('Update import'));\r\n\r\n return editMode !== 'true' ? [{\r\n key: 'imports',\r\n text: importsText,\r\n 'aria-label': importsText,\r\n }, {\r\n key: 'mmc-create-import',\r\n text: createImportText,\r\n isCurrentItem: true,\r\n 'aria-label': createImportText,\r\n }] : [{\r\n key: 'imports',\r\n text: importsText,\r\n 'aria-label': importsText,\r\n }, {\r\n key: 'mmc-update-import',\r\n text: updateImportText,\r\n isCurrentItem: true,\r\n 'aria-label': updateImportText,\r\n }];\r\n};\r\n\r\nconst placeholderStoresItems = (props) => {\r\n const {\r\n i18n,\r\n scope,\r\n } = props;\r\n const merchantCenterText = i18n.getString(_TL_('Merchant Center'));\r\n const placeholderStoresText = i18n.getString(_TL_('Draft stores'));\r\n\r\n return [{\r\n key: 'merchantcenter',\r\n text: merchantCenterText,\r\n onClick: () => {\r\n getRouterDep(scope).navigateToRoute('merchant_stores');\r\n },\r\n 'aria-label': merchantCenterText,\r\n }, {\r\n key: 'mmc-placeholder-stores',\r\n text: placeholderStoresText,\r\n 'aria-label': placeholderStoresText,\r\n }];\r\n};\r\n\r\nconst editorialProductIssuesItems = (props) => {\r\n const {\r\n i18n,\r\n scope,\r\n storeName,\r\n } = props;\r\n const editorialProductIssuesText = i18n.getString(_TL_('Policy violation details'));\r\n\r\n return [\r\n allStoresBreadcrumbItem(scope, i18n),\r\n storeNameBreadcrumbItem(scope, storeName),\r\n summaryBreadcrumbItem(scope, i18n),\r\n {\r\n key: 'editorial-product-issues',\r\n text: editorialProductIssuesText,\r\n 'aria-label': editorialProductIssuesText,\r\n },\r\n ];\r\n};\r\n\r\nconst reviewRejectionsItems = (props) => {\r\n const {\r\n i18n,\r\n scope,\r\n storeName,\r\n } = props;\r\n const { storeId, flagAreaIdCode } = scope.values;\r\n const editorialProductIssuesText = i18n.getString(_TL_('Policy violation details'));\r\n const editorialProductIssueTitleText = safeGetString(i18n, i18nMap.IssueCodes, flagAreaIdCode);\r\n const params = { storeId };\r\n\r\n return [\r\n allStoresBreadcrumbItem(scope, i18n),\r\n storeNameBreadcrumbItem(scope, storeName),\r\n summaryBreadcrumbItem(scope, i18n),\r\n {\r\n key: 'editorial-product-issues',\r\n text: editorialProductIssuesText,\r\n onClick: () => {\r\n getRouterDep(scope).navigateToRoute('merchant_policy_violation_details', params);\r\n },\r\n 'aria-label': editorialProductIssuesText,\r\n },\r\n {\r\n key: 'editorial-product-issue-title',\r\n text: editorialProductIssueTitleText,\r\n 'aria-label': editorialProductIssueTitleText,\r\n },\r\n ];\r\n};\r\n\r\nexport function getMerchantCenterConfig(props) {\r\n const {\r\n i18n,\r\n scope,\r\n storeName,\r\n siteMap,\r\n } = props;\r\n const { storeId } = scope.values;\r\n\r\n const maxDisplayedItems = 5;\r\n\r\n const currentPage = findSelectedNode(siteMap);\r\n const defaultBackButtonProps = {\r\n buttonText: i18n.getString(_TL_('Back')),\r\n onClick: (e) => {\r\n e.preventDefault();\r\n window.history.back();\r\n },\r\n };\r\n const defaultBreadcrumbsGeneralConfigs = {\r\n maxDisplayedItems,\r\n items: [\r\n allStoresBreadcrumbItem(scope, i18n),\r\n {\r\n key: storeName,\r\n text: storeName,\r\n onClick: () => {\r\n getRouterDep(scope).navigateToRoute('merchant_product_issues', { storeId });\r\n },\r\n 'aria-label': storeName,\r\n }, {\r\n key: currentPage.id,\r\n text: i18n.getString(currentPage.name),\r\n 'aria-label': i18n.getString(currentPage.name),\r\n }],\r\n };\r\n\r\n const defaultBreadcrumbsManageConfigs = {\r\n maxDisplayedItems,\r\n items: [\r\n allStoresBreadcrumbItem(scope, i18n)],\r\n };\r\n\r\n switch (currentPage.id) {\r\n case 'mmc-feed-details':\r\n return {\r\n backButtonProps: defaultBackButtonProps,\r\n breadcrumbsGeneralConfigs: {\r\n maxDisplayedItems,\r\n items: feedDetailsItems(props),\r\n },\r\n };\r\n case 'mmc-stores':\r\n return {\r\n backButtonProps: null,\r\n breadcrumbsGeneralConfigs: {\r\n maxDisplayedItems,\r\n items: [allStoresBreadcrumbItemWithoughtClick(i18n)],\r\n },\r\n };\r\n case 'mmc-create-store':\r\n return {\r\n backButtonProps: null,\r\n breadcrumbsGeneralConfigs: {\r\n maxDisplayedItems,\r\n items: createStoreItems(props),\r\n },\r\n };\r\n case 'mmc_placeholder_stores':\r\n return {\r\n backButtonProps: defaultBackButtonProps,\r\n breadcrumbsGeneralConfigs: {\r\n maxDisplayedItems,\r\n items: placeholderStoresItems(props),\r\n },\r\n };\r\n case 'mmc-import-steps':\r\n return {\r\n backButtonProps: {\r\n url: `/campaign/vnext/merchantcenter/import${trimScope([Scope.Store], scope)}`,\r\n buttonText: i18n.getString(_TL_('Back')),\r\n },\r\n breadcrumbsGeneralConfigs: {\r\n maxDisplayedItems,\r\n items: importStepsItems(props),\r\n },\r\n };\r\n case 'mmc-store-summary-productissuedetails':\r\n return {\r\n backButtonProps: defaultBackButtonProps,\r\n breadcrumbsGeneralConfigs: defaultBreadcrumbsGeneralConfigs,\r\n };\r\n case 'mmc-store-summary-policyviolationdetails':\r\n return {\r\n backButtonProps: defaultBackButtonProps,\r\n breadcrumbsGeneralConfigs: {\r\n maxDisplayedItems,\r\n items: editorialProductIssuesItems(props),\r\n },\r\n };\r\n case 'mmc-store-summary-reviewrejections':\r\n return {\r\n backButtonProps: defaultBackButtonProps,\r\n breadcrumbsGeneralConfigs: {\r\n maxDisplayedItems,\r\n items: reviewRejectionsItems(props),\r\n },\r\n };\r\n default:\r\n return {\r\n breadcrumbsGeneralConfigs: storeId ? defaultBreadcrumbsGeneralConfigs : defaultBreadcrumbsManageConfigs,\r\n };\r\n }\r\n}\r\n","import React, { useState, useRef, useEffect, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { compose } from 'underscore';\r\nimport { withScope, QueryParam } from '@bingads-webui-react/scope-service';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport { siteMapPropType, findSelectedNode } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { withServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport {\r\n storeQueries as defaultStoreQueries,\r\n feedQueries as defaultFeedQueries,\r\n MmcDataSourceInitializer\r\n} from '@bingads-webui-campaign-react/merchant-shared';\r\nimport { SummaryBarFactory } from './components';\r\nimport { getMerchantCenterConfig } from './helpers/merchant-center-config';\r\n\r\nconst MerchantCenterSummaryBar = (props) => {\r\n const customSummaryBarItemsRef = useRef();\r\n const [storeName, setStoreName] = useState(null);\r\n const [feedName, setFeedName] = useState(null);\r\n\r\n const getStateFromProps = useCallback(() => {\r\n const {\r\n scope,\r\n storeQueries,\r\n feedQueries,\r\n } = props;\r\n const { storeId, feedId } = scope.values;\r\n\r\n if (storeId) {\r\n storeQueries.getStore(storeId, true).then((store) => {\r\n setStoreName(store.Name);\r\n });\r\n }\r\n\r\n if (storeId && feedId) {\r\n feedQueries.getFeedDetails(storeId, feedId).then((feed) => {\r\n setFeedName(feed.Name);\r\n });\r\n }\r\n }, [props]);\r\n\r\n useEffect(() => {\r\n if (customSummaryBarItemsRef && customSummaryBarItemsRef.current) {\r\n customSummaryBarItemsRef.current.innerText = '';\r\n }\r\n getStateFromProps();\r\n }, [getStateFromProps]);\r\n\r\n const {\r\n i18n,\r\n siteMap,\r\n scope,\r\n } = props;\r\n\r\n return findSelectedNode(siteMap) ? (\r\n \r\n \r\n \r\n \r\n ) : ;\r\n};\r\n\r\nMerchantCenterSummaryBar.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n serverContext: PropTypes.shape({\r\n Token: PropTypes.string.isRequired,\r\n }).isRequired,\r\n feedQueries: PropTypes.shape({}),\r\n storeQueries: PropTypes.shape({}),\r\n siteMap: siteMapPropType.isRequired,\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n};\r\n\r\nMerchantCenterSummaryBar.defaultProps = {\r\n storeQueries: defaultStoreQueries,\r\n feedQueries: defaultFeedQueries,\r\n};\r\n\r\nconst StyledMerchantCenterSummaryBar = compose(\r\n withServerContext,\r\n withI18nConsumer,\r\n withScope\r\n)(MerchantCenterSummaryBar);\r\n\r\nexport { StyledMerchantCenterSummaryBar as MerchantCenterSummaryBar };\r\n","import $ from 'jquery';\r\nimport { result } from 'underscore';\r\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { QueryParam } from '@bingads-webui-react/scope-service';\r\nimport { InsightType, Metrics, formatInsightDetails } from '@bingads-webui-campaign-react/query-insights-common';\r\nimport { SummaryBarMetricsPicker } from '@bingads-webui-campaign-react/query-insights-summary-bar-metrics-picker';\r\nimport { siteMapPropType } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\n\r\nimport { SummaryBarFactory } from './components';\r\nimport { getSummaryBarStyle } from './styles';\r\n\r\nconst QueryInsightsSummaryBarUnstyled = ({\r\n i18n,\r\n scope,\r\n siteMap,\r\n summaryBarActivityLogger,\r\n backButtonUrl,\r\n}) => {\r\n const [summaryDetails, setSummaryDetails] = useState(null);\r\n\r\n const formattedSummary = useMemo(() => formatInsightDetails(i18n, summaryDetails), [i18n, summaryDetails]);\r\n\r\n const summaryBarProps = useMemo(() => ({\r\n i18n,\r\n scope,\r\n siteMap,\r\n summaryBarActivityLogger,\r\n backButtonProps: {\r\n buttonText: i18n.getString(_TL_('Back')),\r\n url: backButtonUrl,\r\n },\r\n breadcrumbsGeneralConfigs: {\r\n maxDisplayedItems: 3,\r\n items: [{\r\n key: 'query-insights',\r\n text: i18n.getString(_TL_('Search insights')),\r\n isLongText: true,\r\n 'aria-label': i18n.getString(_TL_('Search insights')),\r\n onClick: () => {\r\n scope.remove(['trendPeriod', 'country', 'vertical']);\r\n scope.save(scope.location.pathname.replace(/\\/details$/, ''));\r\n },\r\n }, ...formattedSummary ? [{\r\n key: 'query-insights-details',\r\n text: formattedSummary,\r\n isCurrentItem: true,\r\n isLongText: true,\r\n 'aria-label': formattedSummary,\r\n }] : []],\r\n },\r\n summaryBarItems: result(summaryDetails, 'InsightType') === InsightType.AccountOptimization ? [{\r\n className: 'summary-bar-metrics',\r\n canEdit: true,\r\n noOverflow: true,\r\n renderEntityItem: () => (\r\n \r\n ),\r\n }] : [],\r\n }), [backButtonUrl, formattedSummary, i18n, scope, siteMap, summaryBarActivityLogger, summaryDetails]);\r\n\r\n const onDetailsUpdated = useCallback((e, details) => {\r\n setSummaryDetails(details);\r\n }, []);\r\n\r\n useEffect(() => {\r\n $(document).on('qiDetailsUpdated', onDetailsUpdated);\r\n\r\n return () => {\r\n $(document).off('qiDetailsUpdated', onDetailsUpdated);\r\n };\r\n }, [onDetailsUpdated]);\r\n\r\n return ();\r\n};\r\n\r\nQueryInsightsSummaryBarUnstyled.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n siteMap: siteMapPropType.isRequired,\r\n summaryBarActivityLogger: PropTypes.shape({\r\n changeScopeActivity: PropTypes.any,\r\n }).isRequired,\r\n backButtonUrl: PropTypes.string.isRequired,\r\n};\r\n\r\nexport const QueryInsightsSummaryBar = withDefaultStyles(QueryInsightsSummaryBarUnstyled, getSummaryBarStyle);\r\n","/* istanbul ignore file */ // ignore this file for component test as we cover it in selenium test\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { compose, findWhere, result, defaults, has } from 'underscore';\r\nimport { withInstrumentation } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { withScope, QueryParam } from '@bingads-webui-react/scope-service';\r\nimport { withSiteMap, siteMapPropType } from '@bingads-webui-campaign-react/with-site-map';\r\nimport {\r\n getFilteredCampaignTypeFromRawFilter,\r\n CampaignType,\r\n} from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport { withGlobalFilter } from '@bingads-webui-campaign-react/global-filter-context';\r\nimport { WaterfallFilterType } from '@bingads-webui-campaign/filter-storage';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport { EntityBreadcrumb } from '@bingads-webui-react/global-menu';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport {\r\n convertToSummaryBarCampaign,\r\n convertToSummaryBarAdGroup,\r\n convertToSummaryBarExperimentCampaign,\r\n} from './helpers/entity-converter';\r\nimport {\r\n campaignTypes,\r\n convertToBreadCrumbItems,\r\n} from './helpers';\r\nimport {\r\n WithCampaignRepository,\r\n WithAdGroupRepository,\r\n WithExperimentRepository,\r\n} from './repository';\r\n\r\nclass GlobalMenuEntityBarInternal extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.campaignSummarybarPerfMarker = props.appPerfMarker.createChild('GlobalMenu_Entity_Bar');\r\n this.markAction('willInit');\r\n this.summaryBarActivityLogger = props.instrumentation.globalMenuEntityBarScenario.create();\r\n }\r\n\r\n componentDidMount() {\r\n this.markAction('done');\r\n }\r\n\r\n get getCampaignType() {\r\n return getFilteredCampaignTypeFromRawFilter(this.props[WaterfallFilterType.CampaignType]);\r\n }\r\n\r\n get getFinalProps() {\r\n const campaignType = this.getCampaignType;\r\n const props = {\r\n ...this.props,\r\n campaignType,\r\n summaryBarActivityLogger: this.summaryBarActivityLogger,\r\n setClarityTag: this.setClarityTag,\r\n };\r\n\r\n return props;\r\n }\r\n\r\n get getCampaignLoadFallback() {\r\n const props = this.getFinalProps;\r\n\r\n const items = convertToBreadCrumbItems(props);\r\n const currentCampaignType = findWhere(campaignTypes, { id: props.campaignType });\r\n const overflowAriaLabel = props.i18n.getString(result(currentCampaignType, 'i18nKey'));\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n setClarityTag = () => {\r\n setClarityTag({ GlobalMenuEntityBar: 'true' });\r\n }\r\n\r\n markAction = (action) => {\r\n if (this.campaignSummarybarPerfMarker && action) {\r\n this.campaignSummarybarPerfMarker[action]();\r\n }\r\n }\r\n\r\n consumeOdataResults = RenderSummaryBar => ({\r\n adGroupFromOData,\r\n campaignFromOData,\r\n osData,\r\n }) => {\r\n this.markAction('willRender');\r\n\r\n const campaign = campaignFromOData\r\n ? convertToSummaryBarCampaign(campaignFromOData)\r\n : null;\r\n\r\n const adGroup = adGroupFromOData\r\n ? convertToSummaryBarAdGroup({\r\n ...adGroupFromOData,\r\n Status: adGroupFromOData.EntityStatus,\r\n Campaign: campaignFromOData,\r\n })\r\n : null;\r\n\r\n if (campaignFromOData && campaignFromOData.ExperimentId) {\r\n const experimentId = campaignFromOData.ExperimentId;\r\n const extendedCampaign = { experimentId, ...campaign };\r\n\r\n return ();\r\n }\r\n\r\n return ();\r\n };\r\n\r\n consumeAdGroupRepository = SummaryBarWithAdGroupCriterionResults => passThroughProps => (\r\n (\r\n \r\n )\r\n );\r\n\r\n consumeCampaignRepository = SummaryBarWithCampaignCriterionResults => (\r\n (\r\n \r\n )\r\n );\r\n\r\n renderSummaryBar = () => ({\r\n experimentFromOData,\r\n campaign,\r\n adGroup: summaryBarAdGroup,\r\n }) => {\r\n const { i18n, scope, siteMap } = this.props;\r\n const summaryBarCampaign = experimentFromOData ?\r\n convertToSummaryBarExperimentCampaign(experimentFromOData, campaign)\r\n : campaign;\r\n\r\n const campaignType = this.getCampaignType;\r\n let breadcrumbsProps = { campaignType };\r\n if (summaryBarAdGroup) {\r\n const {\r\n id,\r\n name,\r\n campaignId,\r\n campaignName,\r\n } = summaryBarAdGroup;\r\n if (has(scope.values, 'adId')) {\r\n breadcrumbsProps = {\r\n campaignName,\r\n campaignId,\r\n campaignType: campaignType === CampaignType.Default ? campaignType : CampaignType.All,\r\n adGroupId: id,\r\n adGroupName: name,\r\n adName: i18n.getString(_TL_('Responsive search ad')),\r\n };\r\n } else {\r\n breadcrumbsProps = {\r\n campaignName,\r\n campaignId,\r\n campaignType,\r\n adGroupId: id,\r\n adGroupName: name,\r\n };\r\n }\r\n } else if (summaryBarCampaign) {\r\n const { id, name } = summaryBarCampaign;\r\n breadcrumbsProps = { campaignName: name, campaignId: id, campaignType };\r\n }\r\n\r\n const items = convertToBreadCrumbItems(defaults({\r\n i18n,\r\n scope,\r\n siteMap,\r\n summaryBarActivityLogger: this.summaryBarActivityLogger,\r\n setClarityTag: this.setClarityTag,\r\n }, breadcrumbsProps));\r\n const currentCampaignType = findWhere(campaignTypes, { id: campaignType });\r\n const overflowAriaLabel = i18n.getString(result(currentCampaignType, 'i18nKey'));\r\n\r\n return (\r\n \r\n );\r\n };\r\n\r\n render() {\r\n this.markAction('willFetchData');\r\n const renderSummaryBarWithData = compose(\r\n this.consumeCampaignRepository,\r\n this.consumeAdGroupRepository,\r\n this.consumeOdataResults,\r\n this.renderSummaryBar\r\n );\r\n\r\n return renderSummaryBarWithData();\r\n }\r\n}\r\n\r\nGlobalMenuEntityBarInternal.propTypes = {\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n siteMap: siteMapPropType.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n appPerfMarker: PropTypes.shape({\r\n createChild: PropTypes.func.isRequired,\r\n }),\r\n instrumentation: PropTypes.shape({\r\n globalMenuEntityBarScenario: PropTypes.any,\r\n }).isRequired,\r\n};\r\n\r\nGlobalMenuEntityBarInternal.defaultProps = {\r\n appPerfMarker: null,\r\n};\r\n\r\nexport const GlobalMenuEntityBar\r\n = withInstrumentation(withSiteMap(withGlobalFilter(withScope(withI18nConsumer(GlobalMenuEntityBarInternal)))));\r\n","import classNames from 'classnames';\r\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { SummaryBarContainer } from '@bingads-webui-react/summary-bar';\r\nimport { ActionButton } from '@bingads-webui-react/fabric-control';\r\nimport { getSessionStorage } from '@bingads-webui/storage';\r\nimport { withPermissions } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { isNavigationRefreshOn } from '@bingads-webui-react/preference-utility';\r\nimport { getAssetLibrarySummaryBarStyle } from './styles/asset-library-summary-bar-style';\r\n\r\nconst SessionStorage = getSessionStorage();\r\nconst SESSION_KEY = 'ASSET_LIBRARY_STORAGE';\r\nconst QUERY_INTERVAL = 1 * 1000;\r\nconst MAX_QUERY_COUNT = (30 * 1000) / QUERY_INTERVAL; // query few more seconds after count is 0\r\n\r\nconst AssetLibrarySummaryBarInternal = ({\r\n selectedParent,\r\n selectedChild,\r\n location,\r\n permissions,\r\n i18n,\r\n classes,\r\n} = {}) => {\r\n //\r\n const [inProgressTaskCount, setInProgressTaskCount] = useState(0);\r\n\r\n // query in progress tasks count\r\n useEffect(() => {\r\n if (!selectedChild || selectedChild.id !== 'creative-studio-asset-library') {\r\n return null;\r\n }\r\n let counter = 0;\r\n let timerId = setInterval(() => {\r\n let { inProgressTaskCount: val } = SessionStorage.get(SESSION_KEY) || {};\r\n val = val || 0;\r\n setInProgressTaskCount(val);\r\n\r\n // stop query after task count becomes 0 for a while\r\n counter = val > 0 ? 0 : counter + 1;\r\n if (!val && counter > MAX_QUERY_COUNT) {\r\n clearInterval(timerId);\r\n timerId = undefined;\r\n }\r\n }, QUERY_INTERVAL);\r\n return () => {\r\n if (timerId !== undefined) {\r\n clearInterval(timerId);\r\n }\r\n };\r\n }, [selectedChild]);\r\n\r\n const backButtonProps = useMemo(() => {\r\n if (location && selectedParent && selectedChild\r\n && selectedChild.id === 'creative-studio-asset-library-image-edit') {\r\n return {\r\n url: `${selectedParent.routePrefix}${selectedParent.route}${location.search}`,\r\n buttonText: i18n.getString(_TL_('Back')),\r\n };\r\n }\r\n return null;\r\n }, [i18n, location, selectedChild, selectedParent]);\r\n\r\n const renderInProgressContent = useCallback(() => {\r\n // only show when there are in progress tasks\r\n if (inProgressTaskCount) {\r\n return (\r\n
\r\n {\r\n // history.push(`${selectedParent.routePrefix}assetlibrary/taskprogress${location.search}`);\r\n }}\r\n >\r\n {inProgressTaskCount > 1\r\n ? i18n.getString(_TL_('Updating {{count}} items'), { count: inProgressTaskCount })\r\n : i18n.getString(_TL_('Updating 1 item'))}\r\n \r\n
\r\n );\r\n }\r\n return null;\r\n }, [classes, i18n, inProgressTaskCount]);\r\n\r\n const summaryBar = useMemo(() => (\r\n
\r\n
\r\n {/* render breadcrumb here using React.createPortal */}\r\n
\r\n {\r\n renderInProgressContent()\r\n }\r\n
\r\n ), [classes, renderInProgressContent]);\r\n\r\n const ariaLabel = useMemo(() => ({\r\n ariaLabel: i18n.getString(_TL_('Summary bar')),\r\n }), [i18n]);\r\n\r\n return selectedParent && selectedChild ? (\r\n \r\n ) : null;\r\n};\r\n\r\nAssetLibrarySummaryBarInternal.propTypes = {\r\n classes: PropTypes.shape({\r\n assetLibrarySummaryBar: PropTypes.string,\r\n inProgressContent: PropTypes.string,\r\n }).isRequired,\r\n selectedParent: PropTypes.shape({\r\n id: PropTypes.string,\r\n name: PropTypes.string,\r\n url: PropTypes.string,\r\n }).isRequired,\r\n selectedChild: PropTypes.shape({\r\n id: PropTypes.string,\r\n name: PropTypes.string,\r\n url: PropTypes.string,\r\n }).isRequired,\r\n history: PropTypes.shape({\r\n replace: PropTypes.func,\r\n }).isRequired,\r\n location: PropTypes.shape({\r\n search: PropTypes.string,\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n NavigationRefresh: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n};\r\n\r\nAssetLibrarySummaryBarInternal.defaultProps = {\r\n};\r\n\r\nexport const AssetLibrarySummaryBar = withPermissions(withDefaultStyles(\r\n AssetLibrarySummaryBarInternal,\r\n getAssetLibrarySummaryBarStyle\r\n));\r\n","export const getAssetLibrarySummaryBarStyle = () => ({\r\n '@keyframes inProgressSpin': {\r\n from: { transform: 'rotate(0deg)' },\r\n to: { transform: 'rotate(360deg)' },\r\n },\r\n\r\n assetLibrarySummaryBar: {\r\n width: '100%',\r\n position: 'relative',\r\n '& .breadcrumb-wrapper': {\r\n width: '100%',\r\n paddingLeft: '6px',\r\n },\r\n },\r\n\r\n inProgressContent: {\r\n position: 'absolute',\r\n right: 40,\r\n top: 0,\r\n '& .in-progress-button': {\r\n '& i': {\r\n animationName: '$inProgressSpin',\r\n animationDuration: '1.5s',\r\n animationIterationCount: 'infinite',\r\n animationTimingFunction: 'linear',\r\n },\r\n },\r\n },\r\n});\r\n","import React, { useMemo, useState, useEffect, useCallback } from 'react';\r\nimport {\r\n Dialog,\r\n DialogSurface,\r\n DialogTitle,\r\n DialogContent,\r\n DialogActions,\r\n DialogTrigger,\r\n DialogBody,\r\n Button,\r\n} from '@fluentui/react-components';\r\n\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { getSessionStorage } from '@bingads-webui/storage';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { SummaryBarContainer } from '@bingads-webui-react/summary-bar';\r\nimport { withPermissions } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { isNavigationRefreshOn } from '@bingads-webui-react/preference-utility';\r\nimport { ActionButton } from '@bingads-webui-react/fabric-control';\r\nimport { withScope, QueryParam } from '@bingads-webui-react/scope-service';\r\nimport { getAdStudioSummaryBarStyle } from './styles/ad-studio-summary-bar-style';\r\nimport { SimpleBreadcrumb } from './components/simple-breadcrumb';\r\n\r\nconst SessionStorage = getSessionStorage();\r\nconst SESSION_KEY = 'ASSET_LIBRARY_STORAGE';\r\nconst QUERY_INTERVAL = 1 * 1000;\r\nconst MAX_QUERY_COUNT = (30 * 1000) / QUERY_INTERVAL; // query few more seconds after count is 0\r\n\r\nconst AdStudioSummaryBarInternal = ({\r\n selectedParent,\r\n selectedChild,\r\n location,\r\n permissions,\r\n i18n,\r\n classes,\r\n scope,\r\n} = {}) => {\r\n const [inProgressTaskCount, setInProgressTaskCount] = useState(0);\r\n const [dialogOpen, setDialogOpen] = useState(false);\r\n\r\n // query in progress tasks count\r\n useEffect(() => {\r\n if (!selectedParent || selectedParent.id !== 'ad-studio-app-entry') {\r\n return null;\r\n }\r\n let counter = 0;\r\n let timerId = setInterval(() => {\r\n let { inProgressTaskCount: val } = SessionStorage.get(SESSION_KEY) || {};\r\n val = val || 0;\r\n setInProgressTaskCount(val);\r\n\r\n // stop query after task count becomes 0 for a while\r\n counter = val > 0 ? 0 : counter + 1;\r\n if (!val && counter > MAX_QUERY_COUNT) {\r\n clearInterval(timerId);\r\n timerId = undefined;\r\n }\r\n }, QUERY_INTERVAL);\r\n return () => {\r\n if (timerId !== undefined) {\r\n clearInterval(timerId);\r\n }\r\n };\r\n }, [selectedParent]);\r\n\r\n const onExit = useCallback(() => {\r\n setDialogOpen(false);\r\n const previousRoute = location.state && location.state.previousRoute;\r\n const url = previousRoute ? `${new URL(previousRoute).pathname}` : `${selectedParent.routePrefix}${selectedParent.route}`;\r\n scope.remove(['templateGroupId', 'templateId']);\r\n scope.save(url);\r\n }, [scope, selectedParent, location]);\r\n\r\n const onCancelDialog = useCallback(() => {\r\n document.querySelector('.ui-next-summary-bar .back-button').focus();\r\n }, []);\r\n\r\n const backButtonProps = useMemo(() => {\r\n if (location && selectedParent && selectedChild\r\n && (selectedChild.id === 'ad-studio-generate-image-page' ||\r\n selectedChild.id === 'ad-studio-edit-image-page' ||\r\n selectedChild.id === 'ad-studio-display-template-create-page' ||\r\n selectedChild.id === 'ad-studio-display-template-edit-page' ||\r\n selectedChild.id === 'ad-studio-video-template-page' ||\r\n selectedChild.id === 'ad-studio-video-create-page' ||\r\n selectedChild.id === 'ad-studio-video-edit-page'\r\n )) {\r\n let previousRoute = location.state && location.state.previousRoute;\r\n\r\n let onClick;\r\n const isTemplateCreationEditPage = selectedChild.id === 'ad-studio-display-template-create-page' ||\r\n selectedChild.id === 'ad-studio-display-template-edit-page' ||\r\n selectedChild.id === 'ad-studio-video-edit-page' ||\r\n selectedChild.id === 'ad-studio-video-create-page';\r\n if (isTemplateCreationEditPage) {\r\n onClick = (event) => {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n setDialogOpen(true);\r\n };\r\n }\r\n\r\n if (selectedChild.id === 'ad-studio-video-template-page' && previousRoute && previousRoute.indexOf('/video/create?') > -1) {\r\n previousRoute = previousRoute.replace('/video/create?', '/videos?');\r\n }\r\n\r\n return {\r\n url: previousRoute ? `${new URL(previousRoute).pathname}${location.search}` : `${selectedParent.routePrefix}${selectedParent.route}${location.search}`,\r\n buttonText: i18n.getString(_TL_('Back')),\r\n ...(onClick ? { onClick } : {}),\r\n };\r\n }\r\n return null;\r\n }, [i18n, location, selectedChild, selectedParent, setDialogOpen]);\r\n\r\n // MAE needs the ability to hide back buttons that lead outside of Ads Studio\r\n // This will prevent users from navigating to the campaign/account pages\r\n const hideBackButton = useMemo(() => {\r\n if (location) {\r\n const urlParams = new URLSearchParams(location.search);\r\n return urlParams.get('applicationName') === 'BingAdsEditor' && backButtonProps === null;\r\n }\r\n return false;\r\n }, [location, backButtonProps]);\r\n\r\n const renderInProgressContent = useCallback(() => {\r\n // only show when there are in progress tasks\r\n if (inProgressTaskCount) {\r\n return (\r\n
\r\n {\r\n // history.push(`${selectedParent.routePrefix}assetlibrary/taskprogress${location.search}`);\r\n }}\r\n >\r\n {inProgressTaskCount > 1\r\n ? i18n.getString(_TL_('Updating {{count}} items'), { count: inProgressTaskCount })\r\n : i18n.getString(_TL_('Updating 1 item'))}\r\n \r\n
\r\n );\r\n }\r\n return null;\r\n }, [classes, i18n, inProgressTaskCount]);\r\n\r\n const summaryBar = useMemo(() => (\r\n
\r\n
\r\n \r\n
\r\n
\r\n {/* render customized content here using React.createPortal */}\r\n
\r\n {\r\n renderInProgressContent()\r\n }\r\n
\r\n ), [classes.adStudioSummaryBar, i18n, renderInProgressContent, selectedParent]);\r\n\r\n const ariaLabel = useMemo(() => ({\r\n ariaLabel: i18n.getString(_TL_('Summary bar')),\r\n }), [i18n]);\r\n\r\n return selectedParent && selectedChild ? (\r\n
\r\n \r\n {\r\n setDialogOpen(data.open);\r\n }}\r\n >\r\n \r\n \r\n {i18n.getString(_TL_('Are you sure you want to exit?'))}\r\n \r\n {i18n.getString(_TL_('If you exit now, your changes may not be saved.'))}\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 ) : null;\r\n};\r\n\r\nAdStudioSummaryBarInternal.propTypes = {\r\n classes: PropTypes.shape({\r\n adStudioSummaryBar: PropTypes.string,\r\n inProgressContent: PropTypes.string,\r\n summaryBar: PropTypes.string,\r\n }).isRequired,\r\n selectedParent: PropTypes.shape({\r\n id: PropTypes.string,\r\n name: PropTypes.string,\r\n url: PropTypes.string,\r\n }).isRequired,\r\n selectedChild: PropTypes.shape({\r\n id: PropTypes.string,\r\n name: PropTypes.string,\r\n url: PropTypes.string,\r\n }).isRequired,\r\n history: PropTypes.shape({\r\n replace: PropTypes.func,\r\n }).isRequired,\r\n location: PropTypes.shape({\r\n search: PropTypes.string,\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n NavigationRefresh: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n};\r\n\r\nAdStudioSummaryBarInternal.defaultProps = {\r\n};\r\n\r\nexport const AdStudioSummaryBar = withScope(withPermissions(withDefaultStyles(\r\n AdStudioSummaryBarInternal,\r\n getAdStudioSummaryBarStyle\r\n)));\r\n","export const getAdStudioSummaryBarStyle = () => ({\r\n '@keyframes inProgressSpin': {\r\n from: { transform: 'rotate(0deg)' },\r\n to: { transform: 'rotate(360deg)' },\r\n },\r\n\r\n adStudioSummaryBar: {\r\n display: 'flex',\r\n width: '100%',\r\n position: 'relative',\r\n '& .breadcrumb-wrapper': {\r\n width: '100%',\r\n paddingLeft: '6px',\r\n },\r\n },\r\n\r\n summaryBar: {\r\n '& .back-button:focus': {\r\n border: '1px solid black',\r\n },\r\n },\r\n\r\n inProgressContent: {\r\n position: 'absolute',\r\n right: 40,\r\n top: 0,\r\n '& .in-progress-button': {\r\n '& i': {\r\n animationName: '$inProgressSpin',\r\n animationDuration: '1.5s',\r\n animationIterationCount: 'infinite',\r\n animationTimingFunction: 'linear',\r\n },\r\n },\r\n },\r\n});\r\n","import _ from 'underscore';\r\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { QueryParam } from '@bingads-webui-react/scope-service';\r\nimport { siteMapPropType } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { getRoutePathById, withCampaignSiteMap } from '@bingads-webui-react/with-site-map';\r\nimport { edmCampaign } from '@bingads-webui/edm-campaign';\r\n\r\nimport { SummaryBarFactory } from './components';\r\nimport { getSummaryBarStyle } from './styles';\r\n\r\nconst PmaxAssetDetailsSummaryBarUnstyled = ({\r\n selectedParent,\r\n selectedChild,\r\n siteMap,\r\n i18n,\r\n scope,\r\n summaryBarActivityLogger,\r\n}) => {\r\n const {\r\n aid, campaignId, cid, assetGroupId,\r\n } = scope.values;\r\n\r\n const readCampaign = useCallback(() => edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .Campaigns.$withKey(campaignId)\r\n .get()\r\n .toPromise(), [aid, campaignId, cid]);\r\n\r\n const readAssetGroup = useCallback(() => edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .Campaigns.$withKey(campaignId)\r\n .AssetGroups.$withKey(assetGroupId)\r\n .get()\r\n .toPromise(), [aid, assetGroupId, campaignId, cid]);\r\n\r\n const isListingGroup = useMemo(() => scope.location.pathname.includes('listinggroups'), [scope.location.pathname]);\r\n\r\n const [campaignName, setCampaignName] = useState();\r\n const [assetGroupName, setAssetGroupName] = useState();\r\n\r\n useEffect(() => {\r\n readCampaign().then((response) => {\r\n setCampaignName(response.Name);\r\n });\r\n }, [readCampaign]);\r\n\r\n useEffect(() => {\r\n if (!_.isUndefined(assetGroupId)) {\r\n readAssetGroup().then((response) => {\r\n setAssetGroupName(response.Name);\r\n });\r\n }\r\n }, [assetGroupId, readAssetGroup]);\r\n\r\n const breadcrumbsGeneralConfigs = useMemo(() => ({\r\n maxDisplayedItems: 3,\r\n items: [{\r\n key: 'all-campaigns',\r\n text: i18n.getString(_TL_('All campaigns')),\r\n isLongText: true,\r\n 'aria-label': i18n.getString(_TL_('All campaigns')),\r\n onClick: () => {\r\n scope.remove(['campaignId', 'assetGroupId']);\r\n scope.save(getRoutePathById(siteMap, 'campaigns'));\r\n },\r\n }, {\r\n key: 'asset-groups',\r\n text: campaignName,\r\n isLongText: true,\r\n 'aria-label': campaignName,\r\n onClick: () => {\r\n scope.remove(['assetGroupId']);\r\n scope.save(getRoutePathById(siteMap, isListingGroup ? 'listing-groups' : 'asset-groups'));\r\n },\r\n }, (selectedChild ?\r\n {\r\n key: selectedChild.id,\r\n text: assetGroupName,\r\n isCurrentItem: true,\r\n isLongText: true,\r\n 'aria-label': assetGroupName,\r\n } : {}\r\n )],\r\n }), [assetGroupName, campaignName, i18n, isListingGroup, scope, selectedChild, siteMap]);\r\n\r\n const summaryBarProps = useMemo(() => ({\r\n i18n,\r\n scope,\r\n siteMap,\r\n summaryBarActivityLogger,\r\n }), [i18n, scope, siteMap, summaryBarActivityLogger]);\r\n\r\n return selectedParent && selectedChild ? (\r\n \r\n ) : null;\r\n};\r\n\r\nPmaxAssetDetailsSummaryBarUnstyled.propTypes = {\r\n selectedParent: PropTypes.shape({\r\n id: PropTypes.string,\r\n name: PropTypes.string,\r\n url: PropTypes.string,\r\n }).isRequired,\r\n selectedChild: PropTypes.shape({\r\n id: PropTypes.string,\r\n name: PropTypes.string,\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n siteMap: siteMapPropType.isRequired,\r\n summaryBarActivityLogger: PropTypes.shape().isRequired,\r\n};\r\n\r\nexport const PmaxAssetDetailsSummaryBar = withCampaignSiteMap(withDefaultStyles(PmaxAssetDetailsSummaryBarUnstyled, getSummaryBarStyle));\r\n","import React, { useState, useMemo, useEffect, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classnames from 'classnames';\r\nimport _ from 'underscore';\r\n\r\nimport { DefaultButton, Callout, DirectionalHint } from '@fluentui/react';\r\nimport { Glyphicon } from '@bingads-webui-react/primitive';\r\nimport { SingleMonthCalendar } from '@bingads-webui-react/single-month-calendar';\r\nimport { translateLegacyToIANATimezone, parseCivilDate, compareCivilMonth } from '@bingads-webui-universal/temporal-utitlities';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport { withServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { SummaryBarContainer } from '@bingads-webui-react/summary-bar';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { withGlobalFilter } from '@bingads-webui-campaign-react/global-filter-context';\r\nimport { WaterfallFilterType } from '@bingads-webui-campaign/filter-storage';\r\nimport { Scenario, Activity, ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { withPermissions } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { isNavigationRefreshOn } from '@bingads-webui-react/preference-utility';\r\n\r\nimport { getBudgetCenterSummaryBarStyle } from './styles';\r\nimport { SimpleBreadcrumb } from './components/simple-breadcrumb';\r\n\r\nconst isoDateFormat = 'yyyy-MM-dd';\r\n\r\nconst BudgetCenterSummaryBarInternal = ({\r\n i18n,\r\n serverContext,\r\n selectedParent,\r\n [WaterfallFilterType.BudgetCenterMonthFilter]: monthFilter,\r\n updateWaterfallFilter,\r\n permissions,\r\n}) => {\r\n const classes = useDefaultStyles(getBudgetCenterSummaryBarStyle);\r\n const buttonClass = 'budget-center-summary-bar-month-picker-button';\r\n const timeZone = _.get(serverContext, ['CurrentAccount', 'TimeZone']);\r\n const activity = useContext(ActivityContext);\r\n const civilDateToday = useMemo(() => {\r\n const isoDateString = i18n.formatDate(new Date(), {\r\n timeZone: translateLegacyToIANATimezone(timeZone),\r\n raw: isoDateFormat,\r\n });\r\n return parseCivilDate({\r\n i18n,\r\n dateString: isoDateString,\r\n dateFormat: isoDateFormat,\r\n });\r\n }, [i18n, timeZone]);\r\n const earliestDate = _.get(monthFilter, 'earliestDate');\r\n const selectedDate = _.get(monthFilter, 'selectedDate', civilDateToday);\r\n const minDate = useMemo(() => earliestDate, [earliestDate]);\r\n const maxDate = useMemo(() => civilDateToday, [civilDateToday]);\r\n\r\n useEffect(() => {\r\n updateWaterfallFilter({\r\n filterType: WaterfallFilterType.BudgetCenterMonthFilter,\r\n filter: { civilDateToday, selectedDate: civilDateToday },\r\n });\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, []);\r\n const [navigatedDate, setNavigatedDate] = useState(civilDateToday);\r\n const [isCalloutVisible, setIsCalloutVisible] = useState(false);\r\n const monthText = useMemo(() => i18n.formatCivilDate(selectedDate, { skeleton: 'MMMM' }), [i18n, selectedDate]);\r\n const isMonthPickerButtonDisabled = useMemo(() => !minDate, [minDate]);\r\n const isPrevMonthButtonDisabled = useMemo(() => !minDate || compareCivilMonth(selectedDate, minDate) === 0, [minDate, selectedDate]);\r\n const isNextMonthButtonDisabled = useMemo(() => !minDate || compareCivilMonth(selectedDate, maxDate) === 0, [minDate, maxDate, selectedDate]);\r\n const toggleIsCalloutVisible = () => setIsCalloutVisible(visible => !visible);\r\n const updateSelectedDate = (date) => {\r\n updateWaterfallFilter({\r\n filterType: WaterfallFilterType.BudgetCenterMonthFilter,\r\n filter: {\r\n ...monthFilter,\r\n selectedDate: date,\r\n },\r\n });\r\n };\r\n const logTrace = ({ date, api }) => {\r\n if (activity) {\r\n activity.trace(date.toString(), api);\r\n }\r\n };\r\n const onSelectDate = (date) => {\r\n logTrace({ date, api: 'onSelectDate' });\r\n updateSelectedDate(date);\r\n setIsCalloutVisible(false);\r\n };\r\n const onPrevMonthClick = () => {\r\n const newDate = selectedDate.plus({ months: -1 });\r\n if (compareCivilMonth(newDate, minDate) >= 0) {\r\n logTrace({ date: newDate, api: 'onPrevMonthClick' });\r\n updateSelectedDate(newDate);\r\n setNavigatedDate(newDate);\r\n }\r\n };\r\n const onNextMonthClick = () => {\r\n const newDate = selectedDate.plus({ months: 1 });\r\n if (compareCivilMonth(newDate, maxDate) <= 0) {\r\n logTrace({ date: newDate, api: 'onNextMonthClick' });\r\n updateSelectedDate(newDate);\r\n setNavigatedDate(newDate);\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (selectedDate.year !== navigatedDate.year) {\r\n setNavigatedDate(selectedDate);\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [selectedDate]);\r\n\r\n const summaryBar = (\r\n
\r\n
\r\n
\r\n \r\n \r\n {`${monthText} ${selectedDate.year}`}\r\n \r\n \r\n
\r\n }\r\n className={classnames(buttonClass, classes.monthPickerButton, isCalloutVisible ? 'dialog-visible' : 'dialog-invisible')}\r\n onClick={toggleIsCalloutVisible}\r\n disabled={isMonthPickerButtonDisabled}\r\n />\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n {isCalloutVisible ? (\r\n \r\n \r\n \r\n ) : null}\r\n
\r\n );\r\n const breadcrumb = (\r\n \r\n );\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nBudgetCenterSummaryBarInternal.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n formatDate: PropTypes.func,\r\n formatCivilDate: PropTypes.func,\r\n }).isRequired,\r\n serverContext: PropTypes.shape({\r\n CurrentAccount: PropTypes.shape({\r\n TimeZone: PropTypes.number,\r\n }),\r\n }).isRequired,\r\n selectedParent: PropTypes.shape({\r\n id: PropTypes.string,\r\n name: PropTypes.string,\r\n url: PropTypes.string,\r\n }).isRequired,\r\n updateWaterfallFilter: PropTypes.func,\r\n};\r\n\r\nBudgetCenterSummaryBarInternal.defaultProps = {\r\n updateWaterfallFilter: _.noop,\r\n};\r\n\r\nexport const BudgetCenterSummaryBar = _.compose(\r\n withServerContext,\r\n withI18nConsumer,\r\n withGlobalFilter,\r\n withPermissions\r\n)(props => (\r\n \r\n \r\n \r\n \r\n \r\n));\r\n","import { findWhere, result, values } from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport React from 'react';\r\nimport { Breadcrumb } from '@bingads-webui-react/breadcrumb';\r\nimport { CampaignType } from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport {\r\n campaignTypes,\r\n convertToBreadCrumbItems,\r\n} from '../helpers';\r\n\r\nexport class SummaryBarBreadcrumb extends React.PureComponent {\r\n render() {\r\n const {\r\n campaignType,\r\n classes,\r\n i18n,\r\n maxDisplayedItems,\r\n } = this.props;\r\n\r\n const items = convertToBreadCrumbItems(this.props);\r\n const currentCampaignType = findWhere(campaignTypes, { id: campaignType });\r\n const campaignTypeI18nText = i18n.getString(result(currentCampaignType, 'i18nKey'));\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nSummaryBarBreadcrumb.propTypes = {\r\n classes: PropTypes.shape({\r\n summaryBarBreadcrumb: PropTypes.string,\r\n }),\r\n campaignType: PropTypes.oneOf(values(CampaignType)).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n maxDisplayedItems: PropTypes.number,\r\n summaryBarActivityLogger: PropTypes.shape({\r\n changeScopeActivity: PropTypes.any,\r\n }),\r\n};\r\n\r\nSummaryBarBreadcrumb.defaultProps = {\r\n classes: {\r\n summaryBarBreadcrumb: 'summary-bar-breadcrumb',\r\n },\r\n maxDisplayedItems: 3,\r\n summaryBarActivityLogger: null,\r\n};\r\n","import React, { Fragment } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nexport class EditableItem extends React.PureComponent {\r\n state = {\r\n isOpen: false,\r\n itemProps: {},\r\n };\r\n\r\n closeEditor = () => this.setState({ isOpen: false });\r\n\r\n showEditor = ({ itemProps }) => {\r\n this.setState({\r\n isOpen: true, itemProps,\r\n });\r\n };\r\n\r\n render() {\r\n const {\r\n renderEditableItem,\r\n renderEditor,\r\n } = this.props;\r\n const { itemProps } = this.state;\r\n\r\n return (\r\n \r\n {renderEditableItem(this.showEditor)}\r\n {renderEditor(this.state.isOpen, this.closeEditor, { itemProps })}\r\n \r\n );\r\n }\r\n}\r\n\r\nEditableItem.propTypes = {\r\n renderEditableItem: PropTypes.func.isRequired,\r\n renderEditor: PropTypes.func.isRequired,\r\n};\r\n","import React, { Fragment } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { values } from 'underscore';\r\nimport { QueryParam } from '@bingads-webui-react/scope-service';\r\nimport { siteMapPropType } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { CampaignType } from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport { Breadcrumb } from '@bingads-webui-react/breadcrumb';\r\nimport { SummaryBarContainer } from '@bingads-webui-react/summary-bar';\r\nimport { withPermissions } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { isNavigationRefreshOn } from '@bingads-webui-react/preference-utility';\r\nimport { SummaryBarBreadcrumb } from './index';\r\nimport { SummaryBarItemsResizeGroup } from './summary-bar-items-resize-group';\r\n\r\nclass SummaryBarFactory extends React.PureComponent {\r\n render() {\r\n const {\r\n backButtonProps,\r\n breadcrumbsProps,\r\n breadcrumbsGeneralConfigs,\r\n summaryBarItems,\r\n i18n,\r\n summaryBarActivityLogger,\r\n scope,\r\n siteMap,\r\n hideBreadcrumb,\r\n permissions,\r\n } = this.props;\r\n const summaryBarProps = {\r\n summaryBarItems,\r\n overflowAriaLabel: i18n.getString(_TL_('More options')),\r\n scope,\r\n siteMap,\r\n };\r\n\r\n let breadcrumb = null;\r\n if (breadcrumbsGeneralConfigs) {\r\n breadcrumb = (\r\n
\r\n \r\n
\r\n );\r\n } else {\r\n breadcrumb = (\r\n );\r\n }\r\n\r\n let summaryBar = null;\r\n if (summaryBarItems.length > 0) {\r\n summaryBar = (\r\n \r\n
\r\n \r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n );\r\n }\r\n}\r\n\r\nSummaryBarFactory.propTypes = {\r\n backButtonProps: PropTypes.shape({\r\n url: PropTypes.string,\r\n buttonText: PropTypes.string.isRequired,\r\n onClick: PropTypes.func,\r\n }),\r\n breadcrumbsProps: PropTypes.shape({\r\n campaignId: PropTypes.number,\r\n campaignName: PropTypes.string,\r\n adgroupId: PropTypes.number,\r\n adgroupName: PropTypes.string,\r\n campaignType: PropTypes.oneOf(values(CampaignType)),\r\n }),\r\n // eslint-disable-next-line react/forbid-prop-types\r\n breadcrumbsGeneralConfigs: PropTypes.object,\r\n summaryBarItems: PropTypes.arrayOf(PropTypes.shape({\r\n label: PropTypes.string,\r\n className: PropTypes.string,\r\n text: PropTypes.string,\r\n canEdit: PropTypes.bool,\r\n renderContent: PropTypes.func,\r\n onClick: PropTypes.func,\r\n })),\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n siteMap: siteMapPropType.isRequired,\r\n isAccountsSummary: PropTypes.bool,\r\n summaryBarActivityLogger: PropTypes.shape({\r\n changeScopeActivity: PropTypes.any,\r\n }),\r\n hideBreadcrumb: PropTypes.bool,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n NavigationRefresh: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n};\r\n\r\nSummaryBarFactory.defaultProps = {\r\n summaryBarItems: [],\r\n breadcrumbsProps: {},\r\n breadcrumbsGeneralConfigs: null,\r\n backButtonProps: null,\r\n isAccountsSummary: false,\r\n summaryBarActivityLogger: null,\r\n hideBreadcrumb: false,\r\n};\r\n\r\nconst wrapped = withPermissions(SummaryBarFactory);\r\n\r\nexport { wrapped as SummaryBarFactory };\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { Glyphicon, OverlayTrigger, Tooltip } from '@bingads-webui-react/primitive';\r\nimport { siteMapPropType } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { withOverflowProp } from '@bingads-webui-react/with-overflow-prop';\r\n\r\nexport const OverflowContent = withOverflowProp(({\r\n text,\r\n isTextOverflow,\r\n forwardedRef,\r\n tooltipPlacement,\r\n entityClassName = 'entity-text',\r\n href = null,\r\n ...passBy\r\n}) => (\r\n \r\n {text}\r\n \r\n }\r\n >\r\n { href ? ({text}) :\r\n ({text}) }\r\n ));\r\n\r\nexport const OverflowEntityItem = ({\r\n canEdit,\r\n label,\r\n text,\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n onClick,\r\n ariaLabel,\r\n tooltipPlacement,\r\n renderContent,\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n siteMap,\r\n className,\r\n ...others\r\n}) => (\r\n \r\n \r\n \r\n {renderContent ? renderContent({ canEdit: false, ...others }) : ()}\r\n
);\r\n\r\nOverflowEntityItem.propTypes = {\r\n label: PropTypes.string.isRequired,\r\n text: PropTypes.string,\r\n onClick: PropTypes.func,\r\n canEdit: PropTypes.bool,\r\n ariaLabel: PropTypes.string,\r\n tooltipPlacement: PropTypes.string,\r\n renderContent: PropTypes.func,\r\n className: PropTypes.string,\r\n siteMap: siteMapPropType.isRequired,\r\n};\r\n\r\nOverflowEntityItem.defaultProps = {\r\n onClick: null,\r\n canEdit: true,\r\n ariaLabel: '',\r\n text: '',\r\n tooltipPlacement: 'top',\r\n renderContent: null,\r\n className: '',\r\n};\r\n","import _ from 'underscore';\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport Media from 'react-media';\r\nimport { ResizeGroup } from '@fluentui/react';\r\nimport { QueryParam } from '@bingads-webui-react/scope-service';\r\nimport { siteMapPropType } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { LayoutContext } from '@bingads-webui-react/app-layout-container';\r\nimport { SummaryBarItems, SummaryBarItemPropType } from './summary-bar-items';\r\n\r\nexport class SummaryBarItemsResizeGroup extends React.PureComponent {\r\n constructor(props) {\r\n super(props);\r\n\r\n // Resize group naturally works when dragging the window size, but does not seem to work correctly for\r\n // larger window size changes. To work around this, we are using a Media query to detect a larger screen\r\n // change, and then using this resizeGroupKey to force ResizeGroup to update.\r\n this.state = {\r\n resizeGroupKey: 0,\r\n };\r\n }\r\n\r\n onReduceData = (currentData) => {\r\n const newOverflowIndex = this.getNextOverflow(currentData);\r\n if (newOverflowIndex === -1) {\r\n return undefined;\r\n }\r\n\r\n return {\r\n summaryBarItems: currentData.summaryBarItems,\r\n overflowIndex: newOverflowIndex,\r\n };\r\n };\r\n\r\n onGrowData = (currentData) => {\r\n const { overflowIndex, summaryBarItems } = currentData;\r\n if (overflowIndex === summaryBarItems.length) {\r\n return undefined;\r\n }\r\n\r\n let newOverflowIndex = _.findIndex(summaryBarItems.slice(overflowIndex + 1), item => !item.noOverflow);\r\n if (newOverflowIndex === -1) {\r\n newOverflowIndex = summaryBarItems.length; // Set to length so no items overflow\r\n } else {\r\n // Since we sliced, we need to add back the index\r\n newOverflowIndex += (overflowIndex + 1);\r\n }\r\n\r\n return {\r\n summaryBarItems: currentData.summaryBarItems,\r\n overflowIndex: newOverflowIndex,\r\n };\r\n };\r\n\r\n getNextOverflow = (data) => {\r\n const { summaryBarItems, overflowIndex } = data;\r\n return _.findLastIndex(summaryBarItems.slice(0, overflowIndex), item => !item.noOverflow);\r\n }\r\n\r\n getWindowWidth = () => {\r\n const body = document.getElementsByTagName('body')[0];\r\n return window.innerWidth || document.documentElement.clientWidth || body.clientWidth;\r\n }\r\n\r\n handleMediaChange = (matches) => {\r\n if (matches) {\r\n this.setState(state => ({ resizeGroupKey: state.resizeGroupKey + 1 }));\r\n }\r\n }\r\n\r\n render() {\r\n const { resizeGroupKey } = this.state;\r\n const {\r\n summaryBarItems, overflowAriaLabel, scope, siteMap,\r\n } = this.props;\r\n\r\n const startingData = {\r\n summaryBarItems,\r\n overflowIndex: summaryBarItems.length,\r\n };\r\n\r\n return (\r\n
\r\n {/* Use a media query to trigger an event when we see a large window size change.\r\n This will allow us to force ResizeGroup to update by changing the key */}\r\n \r\n\r\n \r\n {layout => (\r\n (\r\n \r\n )}\r\n />)}\r\n \r\n\r\n
);\r\n }\r\n}\r\n\r\nSummaryBarItemsResizeGroup.propTypes = {\r\n overflowAriaLabel: PropTypes.string,\r\n summaryBarItems: PropTypes.arrayOf(SummaryBarItemPropType).isRequired,\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n siteMap: siteMapPropType.isRequired,\r\n};\r\n\r\nSummaryBarItemsResizeGroup.defaultProps = {\r\n overflowAriaLabel: '',\r\n};\r\n","import React from 'react';\r\nimport { Glyphicon } from '@bingads-webui-react/primitive';\r\nimport { Callout } from '@bingads-webui-react/callout';\r\n\r\nconst renderCalloutSubMenu = (content, item) => (\r\n
\r\n

{item.title}

\r\n
\r\n {content}\r\n \r\n \r\n \r\n
\r\n
);\r\n\r\nexport const getOverflowSubMenuProps = (item) => {\r\n if (item.canEdit && item.Editor === Callout) {\r\n return {\r\n subMenuProps: {\r\n items: [{\r\n key: `${item.className}-editor`,\r\n onRender: (_, onDismiss) => {\r\n const editorProps = item.getEditorProps(true, onDismiss, true, { itemProps: item });\r\n\r\n return renderCalloutSubMenu(editorProps.content, editorProps);\r\n },\r\n }],\r\n calloutProps: {\r\n preventDismissOnLostFocus: true,\r\n },\r\n },\r\n };\r\n } else if (item.canEdit) {\r\n let onClick = null;\r\n\r\n if (item.onClick) {\r\n // eslint-disable-next-line prefer-destructuring\r\n onClick = item.onClick;\r\n } else if (item.getEditorProps) {\r\n const editorProps = item.getEditorProps(true);\r\n\r\n if (editorProps.shouldNavigate && item.onNavigate) {\r\n onClick = item.onNavigate;\r\n }\r\n }\r\n\r\n return {\r\n onClick,\r\n };\r\n }\r\n return {};\r\n};\r\n","import _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport React from 'react';\r\nimport classNames from 'classnames';\r\nimport { siteMapPropType } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { DirectionalHint } from '@fluentui/react';\r\nimport { ContextualMenuIconButton } from '@bingads-webui-campaign-react/contextual-menu-icon-button';\r\nimport { EntityItem } from '@bingads-webui-campaign-react/entity-item';\r\nimport { EditableItem, OverflowEntityItem } from './index';\r\nimport { getOverflowSubMenuProps } from './overflow-sub-menu';\r\n\r\nexport class SummaryBarItems extends React.PureComponent {\r\n renderSummryBarItem = (item, ItemComponent) => {\r\n const {\r\n Editor,\r\n getEditorProps,\r\n onClick: onItemClick,\r\n ...other\r\n } = item;\r\n\r\n if (Editor) {\r\n const renderEditor = (isOpen, closeEditor, passThroughData) => {\r\n const editorProps = getEditorProps(isOpen, closeEditor, passThroughData);\r\n const { getChildren, ...rest } = editorProps;\r\n return (\r\n \r\n {getChildren && getChildren()}\r\n \r\n );\r\n };\r\n\r\n const renderEditableItem = (showEditor) => {\r\n const onClick = (event) => {\r\n if (event) {\r\n event.preventDefault();\r\n }\r\n showEditor({ itemProps: other });\r\n if (onItemClick) {\r\n onItemClick();\r\n }\r\n };\r\n\r\n return (\r\n \r\n );\r\n };\r\n\r\n return ();\r\n }\r\n\r\n return ();\r\n }\r\n\r\n renderOverflowDropdown = (overflowItems) => {\r\n if (!overflowItems || overflowItems.length === 0) {\r\n return null;\r\n }\r\n\r\n const {\r\n overflowAriaLabel,\r\n } = this.props;\r\n const overflowDropdownProps = {\r\n items: overflowItems.reduce((memo, item) => memo.concat({\r\n itemProps: { siteMap: this.props.siteMap, ...item },\r\n disabled: !item.canEdit,\r\n ...getOverflowSubMenuProps(item),\r\n }), []),\r\n iconName: 'More',\r\n 'aria-label': overflowAriaLabel,\r\n contextualMenuProps: {\r\n doNotLayer: true,\r\n DirectionalHint: DirectionalHint.bottomRightEdge,\r\n contextualMenuItemAs: OverflowEntityItem,\r\n onDismiss: (event) => {\r\n const target = event && event.target;\r\n\r\n if (target) {\r\n const isInsideDatePicker = target && _.isFunction(target.closest) && target.closest('.k-calendar');\r\n\r\n if (isInsideDatePicker) {\r\n event.preventDefault();\r\n }\r\n }\r\n },\r\n },\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n\r\n render() {\r\n const {\r\n summaryBarItems,\r\n overflowIndex,\r\n } = this.props;\r\n const overflowItems = _.reject(summaryBarItems.slice(overflowIndex), item => item.noOverflow);\r\n const isEditable = item => item.canEdit;\r\n let entityItems = [];\r\n\r\n if (summaryBarItems.length > 0) {\r\n entityItems = summaryBarItems.map((item) => {\r\n if (_.contains(overflowItems, item)) {\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n {item.className === 'overflow-entity-items'\r\n ? this.renderOverflowDropdown(overflowItems)\r\n : this.renderSummryBarItem(item, EntityItem)\r\n }\r\n
\r\n );\r\n });\r\n }\r\n\r\n const overflowLabel = overflowItems.length === 0 ? 'none' : overflowIndex;\r\n return (\r\n
\r\n {entityItems}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport const SummaryBarItemPropType = PropTypes.shape({\r\n label: PropTypes.string,\r\n className: PropTypes.string,\r\n text: PropTypes.string,\r\n canEdit: PropTypes.bool,\r\n renderContent: PropTypes.func,\r\n onClick: PropTypes.func,\r\n renderEntityItem: PropTypes.func,\r\n});\r\n\r\nSummaryBarItems.propTypes = {\r\n overflowAriaLabel: PropTypes.string,\r\n summaryBarItems: PropTypes.arrayOf(SummaryBarItemPropType.isRequired).isRequired,\r\n overflowIndex: PropTypes.number.isRequired,\r\n siteMap: siteMapPropType.isRequired,\r\n};\r\n\r\nSummaryBarItems.defaultProps = {\r\n overflowAriaLabel: '',\r\n};\r\n","import { chain, pick, isEmpty, omit, contains } from 'underscore';\r\nimport { include } from 'underscore.string';\r\nimport { convertToCampaign, convertToAdGroup, CampaignTypeByODataValue } from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport { curlyTemplate } from '@bingads-webui-universal/primitive-utilities';\r\nimport { isXandrCampaign } from '@bingads-webui-campaign-react/constants';\r\n\r\nconst BUDGET_SUGGESTION = 'BudgetSuggestions';\r\nconst devicesMap = i18n => ({\r\n Smartphones: i18n.getString(_TL_('Smartphone')),\r\n Computers: i18n.getString(_TL_('Computer')),\r\n Tablets: i18n.getString(_TL_('Tablet')),\r\n ConnectedTVs: i18n.getString(_TL_('CTV')),\r\n});\r\n\r\nconst statusMap = {\r\n active: 'Active',\r\n paused: 'Paused',\r\n};\r\n\r\nexport const convertToSummaryBarCampaign = (campaignFromOData) => {\r\n const campaign = omit(convertToCampaign(campaignFromOData), 'rawStatus');\r\n campaign.status = campaign.status.toLowerCase();\r\n const {\r\n Budget, BiddingScheme, ExperimentId, CampaignSubType, DeliveryStatus, DeliveryStatusDetails,\r\n } = campaignFromOData;\r\n\r\n return {\r\n ...campaign,\r\n currentCampaignType: campaign.campaignType,\r\n budget: Budget,\r\n hasBudgetLandscape: contains(DeliveryStatusDetails, BUDGET_SUGGESTION) ||\r\n DeliveryStatus === BUDGET_SUGGESTION,\r\n bidStrategy: BiddingScheme.Type,\r\n isExperiment: ExperimentId !== null,\r\n campaignSubType: CampaignSubType,\r\n };\r\n};\r\n\r\nexport const getAdGroupDisplayBiddingStrategyType = (adGroupFromOData) => {\r\n if (adGroupFromOData.DisplayBiddingStrategyType === 'InheritFromParent') {\r\n return adGroupFromOData.Campaign.BiddingScheme && adGroupFromOData.Campaign.BiddingScheme.Type;\r\n }\r\n return adGroupFromOData.DisplayBiddingStrategyType;\r\n};\r\n\r\nexport const convertToSummaryBarAdGroup = (adGroupFromOData) => {\r\n const adGroup = convertToAdGroup(adGroupFromOData);\r\n adGroup.status = adGroup.status.toLowerCase();\r\n const bidMapping = {\r\n ManualCpc: 'SearchBid',\r\n ManualCpv: 'CpvBid',\r\n ManualCpm: 'CpmBid',\r\n };\r\n const bidKey = (adGroupFromOData.Campaign.BiddingScheme.Type && bidMapping[adGroupFromOData.Campaign.BiddingScheme.Type]) || 'SearchBid';\r\n\r\n return {\r\n ...adGroup,\r\n displayBiddingStrategyType: getAdGroupDisplayBiddingStrategyType(adGroupFromOData),\r\n currentCampaignType: CampaignTypeByODataValue[adGroupFromOData.Campaign.CampaignType],\r\n campaignId: adGroupFromOData.Campaign.Id,\r\n campaignName: adGroupFromOData.Campaign.Name,\r\n bid: adGroupFromOData[bidKey],\r\n bidStrategy: adGroupFromOData.Campaign.BiddingScheme.Type,\r\n isExperiment: adGroupFromOData.Campaign.ExperimentId !== null,\r\n campaignSubType: adGroupFromOData.Campaign.CampaignSubType,\r\n };\r\n};\r\n\r\nexport const convertToSummaryBarExperimentCampaign = (experimentFromOData, campaign) => ({\r\n ...campaign,\r\n startDate: experimentFromOData.StartDate,\r\n endDate: experimentFromOData.EndDate,\r\n originalCampaignName: experimentFromOData.BaseCampaignName,\r\n originalCampaignId: experimentFromOData.BaseCampaignId,\r\n status: experimentFromOData.Status,\r\n experimentType: experimentFromOData.ExperimentType,\r\n});\r\n\r\nconst getNameForRadiusLocation = (i18n, lat, long) => {\r\n const latComputed = Math.round(lat * 100) / 100;\r\n const longComputed = Math.round(long * 100) / 100;\r\n\r\n return curlyTemplate(i18n.getString(_TL_('Lat: {{Latitude}} Long: {{Longitude}}')))({\r\n Latitude: latComputed,\r\n Longitude: longComputed,\r\n });\r\n};\r\n\r\nconst getCriterion = (criterionType, criterionFromOData) => chain(criterionFromOData)\r\n .filter(item => item && item['@odata.type'] && !include(item['@odata.type'], 'Negative'))\r\n .map(item => pick(item, 'Criterion'))\r\n .filter(item => item && item.Criterion && item.Criterion['@odata.type'] === `#Model.${criterionType}Criterion`);\r\n\r\nexport const convertToSummaryBarLocationsAndDevices = (criterionFromOData, i18n, parentResults = null, campaignSubType = null) => {\r\n let results = {\r\n locations: [],\r\n devices: i18n.getString(_TL_('None')),\r\n };\r\n\r\n if (!criterionFromOData && !parentResults) {\r\n return results;\r\n }\r\n\r\n if (criterionFromOData && criterionFromOData.dataNotReady) {\r\n return {\r\n locations: ['-'],\r\n devices: ['-'],\r\n };\r\n }\r\n\r\n if (criterionFromOData) {\r\n const locationCriterion = getCriterion('Location', criterionFromOData.value)\r\n .map(item => pick(item.Criterion, 'Name', 'LocationType'))\r\n .sortBy('Name')\r\n .sortBy('LocationType')\r\n .map(item => item.Name)\r\n .value();\r\n\r\n const radiusCriterion = getCriterion('Radius', criterionFromOData.value)\r\n .map(item => pick(item.Criterion, 'RadiusUnit', 'Name', 'Latitude', 'Longitude', 'Radius'))\r\n .map((item) => {\r\n const unit = item.RadiusUnit.toLowerCase() === 'miles' ? i18n.getString(_TL_('miles'))\r\n : i18n.getString(_TL_('kilometers'));\r\n const location = isEmpty(item.Name) ? getNameForRadiusLocation(i18n, item.Latitude, item.Longitude) : item.Name;\r\n\r\n return curlyTemplate(i18n.getString(_TL_('{{radius}} {{unit}} around {{location}}')))({\r\n radius: item.Radius,\r\n unit,\r\n location,\r\n });\r\n })\r\n .value();\r\n\r\n const devicesI18nMap = devicesMap(i18n);\r\n const deviceCriterion = chain(criterionFromOData.value)\r\n .map(item => pick(item, 'Criterion', 'CriterionBid'))\r\n .filter(item => item && item.Criterion &&\r\n item.Criterion['@odata.type'] === '#Model.DeviceCriterion' &&\r\n item.CriterionBid &&\r\n ((isXandrCampaign(campaignSubType) && item.CriterionBid.Multiplier !== -100) || (!isXandrCampaign(campaignSubType) && item.CriterionBid.Multiplier !== 0)))\r\n .map(item => devicesI18nMap[item.Criterion.DeviceName])\r\n .value();\r\n\r\n results = {\r\n locations: locationCriterion.concat(radiusCriterion),\r\n devices: deviceCriterion.length ? [deviceCriterion.join(',')] : [],\r\n };\r\n }\r\n\r\n if (parentResults) {\r\n results = {\r\n locations: results.locations.length ? results.locations : parentResults.locations,\r\n devices: results.devices.length ? results.devices : parentResults.devices,\r\n };\r\n }\r\n\r\n return results;\r\n};\r\n\r\nexport const convertToSummaryBarAudiences = (audienceFromOData) => {\r\n let result = [];\r\n\r\n if (audienceFromOData && audienceFromOData.value) {\r\n result = chain(audienceFromOData.value).map(item => item && item.AudienceCriterion)\r\n .map(item => item && item.AudienceName)\r\n .sortBy('AudienceName')\r\n .value();\r\n result.totalCount = audienceFromOData['@odata.count'];\r\n } else if (audienceFromOData && audienceFromOData.dataNotReady) {\r\n result.totalCount = 1;\r\n result = ['-'];\r\n }\r\n return result;\r\n};\r\n\r\nexport const convertToSummaryBarStatusPatch = patch => ({\r\n Status: statusMap[patch.status],\r\n});\r\n","// use object here in case we may need to extend other fields in the future\r\nimport _ from 'underscore';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport { CampaignType } from '@bingads-webui-campaign-react/shell-ui-common';\r\n\r\nconst dynamicPermissions = _.result(config.get('permissions'), 'dynamic', {});\r\nconst { IsRenameHotelToLodgingEnabled } = dynamicPermissions;\r\n\r\nexport const campaignTypes = [\r\n {\r\n id: CampaignType.All,\r\n i18nKey: _TL_('All campaigns'),\r\n }, {\r\n id: CampaignType.Default,\r\n i18nKey: _TL_('Search campaigns'),\r\n }, {\r\n id: CampaignType.Shopping,\r\n i18nKey: _TL_('Shopping campaigns'),\r\n }, {\r\n id: CampaignType.Audience,\r\n i18nKey: _TL_('Audience campaigns'),\r\n }, {\r\n id: CampaignType.Smart,\r\n i18nKey: _TL_('Smart campaigns'),\r\n },\r\n {\r\n id: CampaignType.Hotel,\r\n i18nKey: IsRenameHotelToLodgingEnabled ? _TL_('Lodging campaigns') : _TL_('Hotel campaigns'),\r\n },\r\n {\r\n id: CampaignType.PerformanceMax,\r\n i18nKey: _TL_('Performance Max campaigns'),\r\n },\r\n {\r\n id: CampaignType.App,\r\n i18nKey: _TL_('App campaigns'),\r\n },\r\n];\r\n","import { has } from 'underscore';\r\nimport { $current } from '@bingads-webui-react/scope-service';\r\nimport { getRoutePathById, Configs } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { Scope } from '@bingads-webui-campaign-react/shell-ui-common';\r\n\r\nexport function breadcrumbClickHandler(breadcrumbScope, routerScope, siteMap) {\r\n switch (breadcrumbScope) {\r\n case Scope.Account:\r\n routerScope.remove(['campaignId', 'adGroupId']);\r\n break;\r\n case Scope.Campaign:\r\n routerScope.remove(['adGroupId']);\r\n break;\r\n default: break;\r\n }\r\n\r\n // align with google, click account scope link will show campaigns grid\r\n const route = breadcrumbScope === Scope.Account\r\n ? getRoutePathById(Configs.campaignSiteMap, 'campaigns')\r\n : getRoutePathById(siteMap, 'ads');\r\n if (has(routerScope.values, 'adId')) {\r\n routerScope.remove(['adId']);\r\n routerScope.save(route);\r\n } else if (breadcrumbScope === Scope.Account) {\r\n routerScope.save(route);\r\n } else {\r\n routerScope.save();\r\n }\r\n}\r\n\r\nexport function campaignClickHandler(event, campaignId, scope) {\r\n if (event) {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n }\r\n\r\n scope.set({\r\n cid: $current,\r\n aid: $current,\r\n uid: $current,\r\n campaignId,\r\n });\r\n\r\n scope.save();\r\n return false;\r\n}\r\n\r\nexport function getCampaignUrl(campaignId, scope) {\r\n const { cid, aid, uid } = scope.values;\r\n return `${scope.location.pathname}?uid=${uid}&cid=${cid}&aid=${aid}&campaignId=${campaignId}`;\r\n}\r\n\r\nexport function pageClickHandler(siteMap, scope, targetPage) {\r\n scope.save(getRoutePathById(siteMap, targetPage));\r\n}\r\n","export const summaryBarScopes = {\r\n campaignType: {\r\n id: 'campaign-type',\r\n },\r\n campaign: {\r\n id: 'campaign',\r\n },\r\n adGroup: {\r\n id: 'ad-group',\r\n },\r\n accounts: {\r\n id: 'accounts',\r\n },\r\n ad: {\r\n id: 'ad',\r\n },\r\n};\r\n","import React from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { submitEvent } from '@bingads-webui-universal/accessibility-helper';\r\nimport { Glyphicon } from '@bingads-webui-react/primitive';\r\nimport { QueryParam } from '@bingads-webui-react/scope-service';\r\nimport { pageClickHandler } from './router-helper';\r\n\r\nexport const SettingsItem = ({ i18n, scope, siteMap }) => {\r\n const { adGroupId, campaignId } = scope.values;\r\n const isSettingsTab = _.result(_.find(siteMap, i => i.selected), 'id') === 'settings';\r\n if (isSettingsTab && (adGroupId || campaignId)) {\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n
\r\n pageClickHandler(siteMap, scope, 'settings')}\r\n onKeyDown={submitEvent(() => pageClickHandler(siteMap, scope, 'settings'))}\r\n className=\"entity-content-settings\"\r\n aria-label={i18n.getString(_TL_('Go to settings'))}\r\n type=\"button\"\r\n >\r\n \r\n {i18n.getString(_TL_('Go to settings'))}\r\n \r\n
);\r\n};\r\n\r\nSettingsItem.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n siteMap: PropTypes.arrayOf(PropTypes.any).isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { OverlayTrigger, Tooltip, Glyphicon } from '@bingads-webui-react/primitive';\r\nimport { withOverflowProp } from '@bingads-webui-react/with-overflow-prop';\r\nimport { curlyTemplate } from '@bingads-webui-universal/primitive-utilities';\r\n\r\nconst OverflowCriteriaItemsContent = withOverflowProp(({\r\n targets, isTextOverflow, forwardedRef, i18n, renderEditIcon,\r\n}) => (\r\n
\r\n \r\n {targets[0]}\r\n \r\n }\r\n >\r\n {targets[0]}\r\n \r\n {targets.length > 1 && (\r\n \r\n {curlyTemplate(i18n.getString(_TL_('and {{restNumber}} More...')))({\r\n restNumber: targets.totalCount && targets.totalCount > 1 ? targets.totalCount - 1 : targets.length - 1,\r\n })}\r\n )\r\n }\r\n {renderEditIcon()}\r\n
\r\n));\r\n\r\nconst CriteriaItemsInternal = ({\r\n targets, emptyValue, i18n, canEdit,\r\n}) => {\r\n const renderEditIcon = () => (canEdit ? (\r\n \r\n ) : null);\r\n\r\n if (!(targets && targets.length)) {\r\n return (\r\n
\r\n {emptyValue}\r\n {renderEditIcon()}\r\n
\r\n );\r\n }\r\n\r\n return ();\r\n};\r\n\r\nCriteriaItemsInternal.propTypes = {\r\n /* eslint-disable react/forbid-prop-types */\r\n targets: PropTypes.array,\r\n emptyValue: PropTypes.string.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n canEdit: PropTypes.bool,\r\n};\r\n\r\nCriteriaItemsInternal.defaultProps = {\r\n targets: [],\r\n canEdit: false,\r\n};\r\n\r\nexport const CriteriaItems = CriteriaItemsInternal;\r\n","import React from 'react';\r\nimport { compose } from 'underscore';\r\nimport {\r\n WithCampaignAudienceRepository,\r\n WithAdGroupAudienceRepository,\r\n WithAdGroupCriterionRepository,\r\n WithCampaignCriterionRepository,\r\n} from '../repository';\r\nimport {\r\n convertToSummaryBarAudiences,\r\n convertToSummaryBarLocationsAndDevices,\r\n} from './entity-converter';\r\nimport { CriteriaItems } from './criteria-items-content';\r\n\r\nexport class RepositoryConsumer {\r\n constructor({ scope, i18n }) {\r\n this.scope = scope;\r\n this.i18n = i18n;\r\n }\r\n\r\n get criteriaRenderer() {\r\n return {\r\n renderCamapignAudience: compose(this.consumeCampaignAudienceRepository, this.renderAudienceContent),\r\n renderAdGroupAudience: compose(this.consumeAdGroupAudienceRepository, this.renderAudienceContent),\r\n renderCampaignLocationDevice: isLocation => compose(this.consumeCampaignCriterionRepository, this.renderCampaignLocationDevicesContent(isLocation)),\r\n renderAdGroupLocationDevice: (isLocation, campaignSubType) => compose(this.consumeCampaignCriterionRepository, this.consumeAdGroupCriterionRepository, this.renderAgGroupLocationDeviceContent(isLocation, campaignSubType)),\r\n };\r\n }\r\n // audience\r\n renderAudienceContent = ({\r\n canEdit, ariaLabel, onClick,\r\n } = {}) => ({\r\n audienceFromOData,\r\n }) => {\r\n const audiences = audienceFromOData ? convertToSummaryBarAudiences(audienceFromOData)\r\n : null;\r\n\r\n return ();\r\n };\r\n\r\n consumeCampaignAudienceRepository = CampaignAudience => (\r\n (\r\n \r\n )\r\n );\r\n\r\n consumeAdGroupAudienceRepository = AdGroupAudience => (\r\n (\r\n \r\n )\r\n );\r\n\r\n // locations and devices\r\n renderLocationDeviceContent = (isLocation, locations, devices, {\r\n canEdit, ariaLabel, onClick, excludedLocationOnly,\r\n }) => (isLocation ?\r\n () : ());\r\n\r\n renderCampaignLocationDevicesContent = isLocation => ({\r\n canEdit, ariaLabel, onClick, excludedLocationOnly,\r\n } = {}) => ({\r\n campaignCriterionFromOData,\r\n }) => {\r\n const campaignLocationsAndDevices = convertToSummaryBarLocationsAndDevices(campaignCriterionFromOData, this.i18n);\r\n const { locations, devices } = campaignLocationsAndDevices;\r\n\r\n return this.renderLocationDeviceContent(isLocation, locations, devices, {\r\n canEdit, ariaLabel, onClick, excludedLocationOnly,\r\n });\r\n };\r\n\r\n renderAgGroupLocationDeviceContent = (isLocation, campaignSubType) => ({\r\n canEdit, ariaLabel, onClick, excludedLocationOnly,\r\n } = {}) => ({\r\n adGroupCriterionFromOData,\r\n campaignCriterionFromOData,\r\n }) => {\r\n const campaignLocationsAndDevices = convertToSummaryBarLocationsAndDevices(campaignCriterionFromOData, this.i18n);\r\n const adGroupLocationsAndDevices = convertToSummaryBarLocationsAndDevices(adGroupCriterionFromOData, this.i18n, campaignLocationsAndDevices, campaignSubType);\r\n const { locations, devices } = adGroupLocationsAndDevices;\r\n\r\n return this.renderLocationDeviceContent(isLocation, locations, devices, {\r\n canEdit, ariaLabel, onClick, excludedLocationOnly,\r\n });\r\n };\r\n\r\n consumeCampaignCriterionRepository = CampaignCriterion => (\r\n (\r\n \r\n )\r\n );\r\n\r\n consumeAdGroupCriterionRepository = AdGroupCriterion => passThroughProps => (\r\n (\r\n \r\n )\r\n );\r\n}\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\n\r\nconst BudgetNotEditableInternal = ({ i18n }) => (\r\n
\r\n {i18n.getString(_TL_('To change an experiment’s budget, you’ll need to change the budget of its original campaign.'))}\r\n
\r\n);\r\n\r\nBudgetNotEditableInternal.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n};\r\n\r\nexport const BudgetNotEditable = withI18nConsumer(BudgetNotEditableInternal);\r\n","export const budgetLandscapeLegacyStrings = [{\r\n ColumnName_EstimatedSharedBudget: _TL_('Shared budget'),\r\n ColumnName_SharedBudgetAmount: _TL_('Shared budget'),\r\n ColumnName_BudgetAmount: _TL_('Budget'),\r\n ColumnName_EstimatedBudget: _TL_('Budget'),\r\n ColumnName_EstimatedImpressions: _TL_('Weekly est. impr.'),\r\n ColumnName_EstimatedClicks: _TL_('Estimated clicks'),\r\n ColumnName_EstimatedConversions: _TL_('Estimated conversions'),\r\n ColumnName_EstimatedCost: _TL_('Weekly est. spend'),\r\n BudgetLandscape_Table_Budget_Tip_Forecasting: _TL_('Your campaign may be limited by budget in the coming weeks if you select an amount less than {0}.'),\r\n BudgetLandscape_Table_Budget_Tip_Recovery: _TL_('Your campaign may be limited by budget if you select an amount less than {0}.'),\r\n BudgetLandscape_Table_Budget_Tip: _TL_('Your campaign might still be limited by its budget if you select an amount less than {0}.'),\r\n ErrorMessage_InputNumericValue: _TL_('Please enter a numeric value, such as 100.'),\r\n BudgetSuggestionsValidationMsg: _TL_('The budget amount must be between {0} {1} and {2} {3}.'),\r\n BudgetLandscape_Comment_Recommended: _TL_('(Recommended)'),\r\n BudgetLandscape_Comment_Current: _TL_('(Current)'),\r\n BudgetLandscape_Table_CustomInput: _TL_('Other budget'),\r\n BudgetLandscape_Comment_Suggested: _TL_('(Suggested)'),\r\n Apply: _TL_('Apply'),\r\n Cancel: _TL_('Cancel'),\r\n BudgetLandscape_ConversionStatus_0_linkText: _TL_('UET/Conversion tracking'),\r\n BudgetLandscape_ConversionStatus_0_line1: _TL_('Budget opportunity support conversion estimation now.'),\r\n BudgetLandscape_ConversionStatus_0_line2: _TL_('Go to set {0} in order to see conversion information.'),\r\n BudgetLandscape_ConversionStatus_1: _TL_('Conversion data is not enough.'),\r\n Validation_Base_Field_Not_Valid: _TL_('Field is not valid'),\r\n Validation_NotEmpty_Required_Field: _TL_('Required field'),\r\n Validation_String_Max_Length: _TL_('Field should not exceed {{maxlength}} characters'),\r\n Validation_String_Min_Length: _TL_('Field should exceed {{minlength}} characters'),\r\n Validation_String_Invalid_Characters: _TL_('Field contains invalid characters'),\r\n Validation_Number_Require_Numeric: _TL_('Field requires numeric value'),\r\n Validation_Number_Max_Length: _TL_('Number should not exceed max length'),\r\n Validation_Number_Range_Min: _TL_('Number should be larger than {{min}}'),\r\n Validation_Number_Range_Max: _TL_('Number should be smaller than {{max}}'),\r\n Validation_Number_Range_Between: _TL_('Number should be between {{min}} and {{max}}'),\r\n Validation_Array_Size_Max: _TL_('List should have at most {{max}} items'),\r\n Validation_Array_Size_Between: _TL_('List should have at least {{min}} and at most {{max}} items'),\r\n Validation_Array_Items_Invalid: _TL_('Some of items in list are invalid'),\r\n Validation_Array_Items_Duplicate: _TL_('List has duplicate items'),\r\n Validation_NegativeKeywords_ListName_Required: _TL_('The list name is required.'),\r\n Validation_NegativeKeywords_Max_Count: _TL_('Maximum of 5,000 negative keywords'),\r\n Validation_NegativeKeywords_Invalid_Keywords: _TL_('Some of the keyword(s) are invalid: {{invalidKeywords}}'),\r\n Validation_NegativeKeywords_Required: _TL_('At least 1 negative keyword is required.'),\r\n 'Click to learn more about {{item}}': _TL_('Click to learn more about {{item}}'),\r\n 'Click to scope to campaign {{campaignName}}': _TL_('Click to scope to campaign {{campaignName}}'),\r\n}];\r\n","import $ from 'jquery';\r\nimport _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport { buildLegacyI18n } from '@bingads-webui/build-legacy-i18n';\r\nimport { BudgetLandScapeTable } from '@bingads-webui-campaign/recommendation-inline-budget-view';\r\nimport { budgetLandscapeLegacyStrings } from './budget-landscape-legacy-strings';\r\n\r\nconst getBudgetLandscapeUrl = ({\r\n adInsightApi,\r\n customerId,\r\n accountId,\r\n campaignId,\r\n isSharedBudget,\r\n budgetId,\r\n}) => {\r\n if (isSharedBudget) {\r\n return `${adInsightApi}AdInsight/V2/Customers(${customerId})/Accounts(${accountId})/Recommendation.GetSharedBudgetLandscape(SharedBudgetId=${budgetId})`;\r\n }\r\n\r\n return `${adInsightApi}AdInsight/V2/Customers(${customerId})/Accounts(${accountId})/Campaigns(${campaignId})/Opportunity.GetBudgetLandscape`;\r\n};\r\n\r\nconst fetchBudgetLandscape = ({\r\n serverContext,\r\n scope,\r\n isSharedBudget,\r\n budgetId,\r\n}) => new Promise((resolve, reject) => {\r\n const {\r\n Token,\r\n ServicesEndpoints,\r\n } = serverContext;\r\n const {\r\n AdInsightAPI: adInsightApi,\r\n } = ServicesEndpoints;\r\n const { aid: accountId, cid: customerId, campaignId } = scope.values;\r\n const url = getBudgetLandscapeUrl({\r\n adInsightApi,\r\n customerId,\r\n accountId,\r\n campaignId,\r\n isSharedBudget,\r\n budgetId,\r\n });\r\n\r\n return $.ajax({\r\n url,\r\n type: 'GET',\r\n headers: {\r\n Authorization: `CCMTSmallToken ${Token}`,\r\n },\r\n }).then(results => resolve(results), reject);\r\n});\r\n\r\nexport const getBudgetLandscapeTableView = ({\r\n serverContext,\r\n scope,\r\n currentBudgetAmount,\r\n isSharedBudget,\r\n budgetId,\r\n i18n,\r\n activityLogger,\r\n}) => fetchBudgetLandscape({\r\n serverContext,\r\n scope,\r\n isSharedBudget,\r\n budgetId,\r\n}).then((res) => {\r\n const rawData = _.chain(res).result('value').first().value();\r\n const {\r\n BudgetRange,\r\n CurrentAccount,\r\n } = serverContext;\r\n let tableView = null;\r\n\r\n const budgetRange = {\r\n CeilingValue: BudgetRange.DailyRange.CeilingValue,\r\n FloorValue: BudgetRange.DailyRange.FloorValue,\r\n };\r\n\r\n if (rawData) {\r\n tableView = new BudgetLandScapeTable({\r\n opportunityData: rawData,\r\n i18n: buildLegacyI18n(i18n, budgetLandscapeLegacyStrings, {\r\n currency: CurrentAccount.CurrencyCode,\r\n timeZone: CurrentAccount.TimeZone,\r\n }),\r\n conversionSummaryStatus: rawData.ConversionStatus,\r\n budgetRange,\r\n currentBudget: currentBudgetAmount,\r\n fromBudgetColumn: true,\r\n fromCampaignTab: true,\r\n isSharedBudget,\r\n });\r\n\r\n tableView.render();\r\n\r\n const { campaignId } = scope.values;\r\n\r\n activityLogger.trace(\r\n {\r\n campaignId,\r\n budgetId,\r\n component: 'campaign summary bar fetch budget landscape',\r\n opportunityId: rawData.OpportunityId,\r\n opportunityData: rawData,\r\n currency: tableView.i18n.currency,\r\n ActionName: 'View',\r\n Channel: 'ClientName:bingadsweb[SummaryBarEditing]',\r\n },\r\n 'AdInsight.Budget'\r\n );\r\n }\r\n\r\n return tableView;\r\n});\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { withServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { QueryParam } from '@bingads-webui-react/scope-service';\r\nimport { BackboneInstanceWrapper } from '@bingads-webui-react/backbone-instance-wrapper';\r\nimport { getBudgetLandscapeTableView } from './budget-landscape-table';\r\n\r\nclass BudgetEditorWithLandscapeInternal extends React.PureComponent {\r\n constructor(props) {\r\n super(props);\r\n\r\n const {\r\n serverContext,\r\n scope,\r\n budgetAmount,\r\n i18n,\r\n activityLogger,\r\n isSharedBudget,\r\n budgetId,\r\n } = this.props;\r\n\r\n this.budgetLandscapeTable = React.lazy(() => getBudgetLandscapeTableView({\r\n serverContext,\r\n scope,\r\n currentBudgetAmount: budgetAmount,\r\n i18n,\r\n activityLogger,\r\n isSharedBudget,\r\n budgetId,\r\n }).then((tableView) => {\r\n this.props.setTableView(tableView);\r\n\r\n return {\r\n default: () => (\r\n
\r\n \r\n
),\r\n };\r\n }));\r\n }\r\n\r\n render() {\r\n const BudgetLandscapeTable = this.budgetLandscapeTable;\r\n\r\n return (\r\n {this.props.i18n.getString(_TL_('Loading...'))}
}>\r\n \r\n );\r\n }\r\n}\r\n\r\nBudgetEditorWithLandscapeInternal.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n serverContext: PropTypes.shape({\r\n BudgetRange: PropTypes.shape({}).isRequired,\r\n CurrentAccount: PropTypes.shape({}).isRequired,\r\n }).isRequired,\r\n budgetAmount: PropTypes.number,\r\n setTableView: PropTypes.func.isRequired,\r\n activityLogger: PropTypes.shape({\r\n trace: PropTypes.func.isRequired,\r\n }).isRequired,\r\n isSharedBudget: PropTypes.bool,\r\n budgetId: PropTypes.number,\r\n};\r\n\r\nBudgetEditorWithLandscapeInternal.defaultProps = {\r\n budgetAmount: null,\r\n isSharedBudget: false,\r\n budgetId: 0,\r\n};\r\n\r\nconst Wrapped = withServerContext(BudgetEditorWithLandscapeInternal);\r\n\r\nexport { Wrapped as BudgetEditorWithLandscape };\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { UiBlocker } from '@bingads-webui-react/ui-blocker';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { Button } from '@bingads-webui-react/primitive';\r\nimport classNames from 'classnames';\r\nimport { getBaseEditorStyle } from '../styles';\r\n\r\n// TODO: this is a shared editor footer, migrigated it to shared component later.\r\nclass BaseEditorInternal extends React.Component {\r\n static propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n classes: PropTypes.shape({}).isRequired,\r\n onSave: PropTypes.func.isRequired,\r\n onCancel: PropTypes.func.isRequired,\r\n children: PropTypes.node.isRequired,\r\n isValid: PropTypes.bool.isRequired,\r\n isLoading: PropTypes.bool.isRequired,\r\n };\r\n\r\n onSave() {\r\n this.props.onSave();\r\n }\r\n\r\n onCancel() {\r\n this.props.onCancel();\r\n }\r\n\r\n render() {\r\n const {\r\n i18n, classes, children, isValid, isLoading,\r\n } = this.props;\r\n\r\n return (\r\n \r\n
\r\n {children}\r\n
\r\n
\r\n this.onSave()}\r\n >{i18n.getString(_TL_('Save'))}\r\n \r\n this.onCancel()}\r\n >{i18n.getString(_TL_('Cancel'))}\r\n \r\n
\r\n \r\n );\r\n }\r\n}\r\n\r\nconst wrappers = [\r\n withI18nConsumer,\r\n _.partial(withDefaultStyles, _, getBaseEditorStyle),\r\n];\r\n\r\nconst Wrapped = _.compose(...wrappers)(BaseEditorInternal);\r\n\r\nexport const KEYSENTER = 13;\r\nexport { Wrapped as BaseEditor };\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { HelpIcon } from '@bingads-webui-campaign-react/help';\r\nimport { Input, Select } from '@bingads-webui-react/primitive-validation';\r\nimport { Button } from '@bingads-webui-react/primitive';\r\nimport PageContext from '@bingads-webui-static-legacy/page-context';\r\n\r\nexport const BudgetAmountEditor = ({\r\n i18n, errorProcessor, showPerDay, inputClassName, onKeyDown, helpId,\r\n}) => (\r\n
\r\n
\r\n {i18n.getString(_TL_('Budget'))}\r\n \r\n
\r\n
\r\n {showPerDay && (\r\n \r\n {i18n.getString(_TL_('per day'))}\r\n \r\n )}\r\n \r\n
\r\n
);\r\n\r\nBudgetAmountEditor.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n errorProcessor: PropTypes.func,\r\n showPerDay: PropTypes.bool,\r\n inputClassName: PropTypes.string,\r\n onKeyDown: PropTypes.func.isRequired,\r\n helpId: PropTypes.string.isRequired,\r\n};\r\n\r\nBudgetAmountEditor.defaultProps = {\r\n errorProcessor: null,\r\n showPerDay: true,\r\n inputClassName: 'inline-budget-edit-value',\r\n};\r\n\r\nexport const BudgetMinRecommend = ({\r\n i18n, applyRecommend, minBudget,\r\n}) => {\r\n const currencySymbol = i18n.getCurrencySymbol(PageContext.AccountCurrencyCode);\r\n return (\r\n
\r\n
\r\n
\r\n {i18n.getString(_TL_('To best optimize your campaigns, we recommend a minimum budget of '))}\r\n {currencySymbol + minBudget}\r\n {i18n.getString(_TL_('.'))}\r\n
\r\n
\r\n \r\n {i18n.getString(_TL_('Apply recommendation'))}\r\n \r\n
\r\n\r\n
\r\n );\r\n};\r\n\r\nBudgetMinRecommend.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n getCurrencySymbol: PropTypes.func,\r\n }).isRequired,\r\n applyRecommend: PropTypes.func.isRequired,\r\n minBudget: PropTypes.number.isRequired,\r\n};\r\n\r\n\r\nexport const getBudgetTypes = (isDeprecateAcceleratedBudgetEnabled, selectedBudgetType) => ([\r\n ...(isDeprecateAcceleratedBudgetEnabled && selectedBudgetType === 'DailyStandard' ? [] : [{\r\n text: _TL_('Daily accelerated'),\r\n value: 'DailyAccelerated',\r\n }]), {\r\n text: _TL_('Daily standard'),\r\n value: 'DailyStandard',\r\n }]);\r\n\r\nexport const BudgetTypeEditor = ({\r\n permissions, i18n, selectedBudgetType, isDisabled, onSelect,\r\n}) => {\r\n const isDeprecateAcceleratedBudgetEnabled = permissions.IsDeprecateAcceleratedBudgetEnabled;\r\n const budgetTypes = getBudgetTypes(isDeprecateAcceleratedBudgetEnabled, selectedBudgetType);\r\n\r\n return (\r\n
\r\n {i18n.getString(_TL_('Budget type'))}\r\n \r\n {budgetTypes.map(item => (\r\n \r\n ))}\r\n \r\n
);\r\n};\r\n\r\nBudgetTypeEditor.propTypes = {\r\n permissions: PropTypes.shape({\r\n IsDeprecateAcceleratedBudgetEnabled: PropTypes.bool.isRequired,\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n selectedBudgetType: PropTypes.PropTypes.oneOf([\r\n 'DailyStandard',\r\n 'DailyAccelerated',\r\n ]).isRequired,\r\n onSelect: PropTypes.func.isRequired,\r\n isDisabled: PropTypes.bool,\r\n};\r\n\r\nBudgetTypeEditor.defaultProps = {\r\n isDisabled: false,\r\n};\r\n","/* eslint-disable react/jsx-no-target-blank */\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { Budget } from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport { CampaignType } from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { QueryParam } from '@bingads-webui-react/scope-service';\r\nimport { Form } from '@bingads-webui-react/primitive';\r\nimport { ErrorMessages } from '@bingads-webui-react/validation';\r\nimport { curlyTemplate } from '@bingads-webui-universal/primitive-utilities';\r\nimport { ValidationGroup } from '@bingads-webui-react/primitive-validation';\r\nimport { withServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { MinXandrDailyBudgetRangePerCurrency } from '@bingads-webui-campaign-legacy/common-grid-config/budget/get-budget-range';\r\nimport { isXandrCampaign } from '@bingads-webui-campaign-react/constants';\r\nimport { BudgetEditorWithLandscape } from './budget-landscape';\r\nimport { getBudgetEditorStyle } from '../../styles';\r\nimport { BaseEditor, KEYSENTER } from '../base-editor';\r\nimport { getBulkEditResponseErrors } from '../../helpers';\r\nimport { BudgetAmountEditor, BudgetTypeEditor, BudgetMinRecommend } from '../budget-base-component';\r\n\r\nconst budgetSchema = {\r\n ...Budget,\r\n properties: {\r\n ...Budget.properties,\r\n Amount: {\r\n ...Budget.properties.Amount,\r\n nullable: false,\r\n type: 'number',\r\n maxLength: 15,\r\n },\r\n },\r\n};\r\n\r\nclass CampaignInlineBudgetEditorInternal extends React.Component {\r\n static propTypes = {\r\n permissions: PropTypes.shape({\r\n IsDeprecateAcceleratedBudgetEnabled: PropTypes.bool.isRequired,\r\n IsDeprecateAcceleratedBudgetOptoutEnabled: PropTypes.bool.isRequired,\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n serverContext: PropTypes.shape({\r\n BudgetRange: PropTypes.shape({\r\n DailyRange: PropTypes.shape({\r\n FloorValue: PropTypes.number.isRequired,\r\n CeilingValue: PropTypes.number.isRequired,\r\n }).isRequired,\r\n }).isRequired,\r\n CurrentAccount: PropTypes.shape({ CurrencyCode: PropTypes.string }).isRequired,\r\n }).isRequired,\r\n data: PropTypes.shape({\r\n Amount: PropTypes.number,\r\n Type: PropTypes.string.isRequired,\r\n }).isRequired,\r\n hasBudgetLandscape: PropTypes.bool.isRequired,\r\n campaignType: PropTypes.number.isRequired,\r\n budget: PropTypes.shape({\r\n Type: PropTypes.string.isRequired,\r\n }).isRequired,\r\n classes: PropTypes.shape({}).isRequired,\r\n onSave: PropTypes.func.isRequired,\r\n onCancel: PropTypes.func.isRequired,\r\n updateInlineBudget: PropTypes.func.isRequired,\r\n summaryBarActivityLogger: PropTypes.shape({\r\n summaryBarBudgetActivity: PropTypes.shape({ create: PropTypes.func }).isRequired,\r\n }).isRequired,\r\n campaignSubType: PropTypes.string.isRequired,\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n this.activityLogger = props.summaryBarActivityLogger\r\n && props.summaryBarActivityLogger.summaryBarBudgetActivity.create();\r\n\r\n const { serverContext, campaignSubType } = props;\r\n\r\n const { BudgetRange } = serverContext;\r\n\r\n this.minimumBudget = BudgetRange.DailyRange.FloorValue;\r\n this.maximumBudget = BudgetRange.DailyRange.CeilingValue;\r\n\r\n if (isXandrCampaign(campaignSubType) && MinXandrDailyBudgetRangePerCurrency[serverContext.CurrentAccount.CurrencyCode]) {\r\n this.minimumBudget = MinXandrDailyBudgetRangePerCurrency[serverContext.CurrentAccount.CurrencyCode];\r\n }\r\n }\r\n\r\n state = {\r\n isValid: false,\r\n data: this.props.data,\r\n serverErrors: [],\r\n };\r\n\r\n onKeyDown = (e) => {\r\n if (e && e.which === KEYSENTER) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.onSave();\r\n }\r\n };\r\n\r\n onValidate = (result) => {\r\n if (result.data.Amount !== this.state.data.Amount) {\r\n this.setState({\r\n isValid: result.isValid,\r\n data: { ...this.state.data, Amount: result.data.Amount },\r\n });\r\n }\r\n };\r\n\r\n onSave = () => {\r\n if (this.state.isValid) {\r\n const updateBudget = (hasBudgetLandscape = false) => this.props.updateInlineBudget({ budget: this.state.data })\r\n .then((response) => {\r\n this.props.onSave(response);\r\n if (this.activityLogger) {\r\n if (this.props.data.Amount && this.props.data.Amount >= 0.1 && this.state.data && this.state.data.Amount < ((this.props.data.Amount)) * 0.5.toFixed(2)) {\r\n this.activityLogger.trace(`Bid${this.state.data.Amount} Less than 50% of current budget${this.props.data.Amount}`);\r\n }\r\n this.activityLogger.trace(\r\n {\r\n updateStatus: 'successful',\r\n value: this.state.data,\r\n component: 'campaign summary bar',\r\n budgetType: 'inline budget',\r\n hasBudgetLandscape,\r\n ...(hasBudgetLandscape ? {\r\n ActionName: 'Accept',\r\n Channel: 'ClientName:bingadsweb[SummaryBarEditing]',\r\n campaignId: this.tableView.campaignId,\r\n opportunityId: this.tableView.opportunityId,\r\n suggestedBudget: this.tableView.ko_model.rawSuggestedBudget,\r\n currency: this.tableView.i18n.currency,\r\n } : {}),\r\n },\r\n 'AdInsight.Budget'\r\n );\r\n }\r\n })\r\n .catch((response) => {\r\n const serverErrors = getBulkEditResponseErrors(response, this.props.i18n);\r\n this.setState({ serverErrors });\r\n\r\n // server error is reported to user trace here as well\r\n if (this.activityLogger) {\r\n this.activityLogger.trace({\r\n updateStatus: 'failed',\r\n serverErrors,\r\n component: 'campaign summary bar',\r\n budgetType: 'inline budget',\r\n hasBudgetLandscape,\r\n });\r\n }\r\n });\r\n\r\n if (this.tableView) {\r\n if (this.tableView.getSelectedNewBudget() === '') {\r\n this.props.onCancel();\r\n } else {\r\n this.setState({ data: { ...this.state.data, Amount: this.tableView.getSelectedNewBudget() } }, () => updateBudget(true));\r\n }\r\n } else {\r\n updateBudget();\r\n }\r\n }\r\n };\r\n\r\n onSelect = (value) => {\r\n this.setState({ data: { ...this.state.data, Type: value } });\r\n };\r\n\r\n setTableView = (tableView) => {\r\n this.tableView = tableView;\r\n\r\n this.tableView.on('saveCustomValueWithKeyboard', () => {\r\n this.onSave();\r\n });\r\n };\r\n\r\n updateBudgetSchemaRange = () => {\r\n budgetSchema.properties.Amount.minimum = this.minimumBudget;\r\n budgetSchema.properties.Amount.maximum = this.maximumBudget;\r\n };\r\n\r\n errorProcessor = (errors) => {\r\n const { serverContext, i18n } = this.props;\r\n const { CurrentAccount } = serverContext;\r\n const { CurrencyCode } = CurrentAccount;\r\n\r\n const customErrors = {\r\n range: curlyTemplate(i18n.getString(_TL_('Your budget should be greater than {{accountCurrencyCode}} {{dailyRangeFloorValue}} and less than your daily max. The daily max. is your monthly budget averaged out over the number of days left in the month.')))({\r\n accountCurrencyCode: CurrencyCode,\r\n dailyRangeFloorValue: this.minimumBudget.toFixed(2),\r\n }),\r\n };\r\n return _.map(\r\n errors,\r\n (oldError, key) => customErrors[key] || oldError\r\n );\r\n };\r\n\r\n applyRecommend = () => {\r\n if (this.activityLogger) {\r\n this.activityLogger.trace('BCCForBudgetMinimumRecommendation: apply');\r\n }\r\n this.setState({\r\n data: { ...this.state.data, Amount: (this.props.data.Amount * 0.5).toFixed(2) },\r\n });\r\n };\r\n\r\n renderInlineBudget = (i18n, data, permissions, isDisabled, showBudgetMinRecommend) => (\r\n
\r\n \r\n {showBudgetMinRecommend ? : null}\r\n \r\n
);\r\n\r\n renderInlineBudgetWithLandscape = (i18n, data, permissions, isDisabled, scope) => (\r\n
\r\n \r\n \r\n
);\r\n\r\n render() {\r\n const {\r\n i18n, classes, onCancel, campaignType, permissions, hasBudgetLandscape, scope, campaignSubType,\r\n } = this.props;\r\n const {\r\n data,\r\n serverErrors,\r\n isValid,\r\n } = this.state;\r\n const isDisabled = campaignType === CampaignType.Smart;\r\n this.showBudgetLandscape = hasBudgetLandscape && permissions.IsBudgetInlineSuggestionEnabled;\r\n\r\n this.updateBudgetSchemaRange(budgetSchema);\r\n this.showBudgetMinRecommend = permissions.dynamic && permissions.dynamic.BCCBudgetImprovementEnabled && this.props.data.Amount && this.props.data.Amount >= 0.1 && data.Amount && (data.Amount < (this.props.data.Amount * 0.5).toFixed(2)) && !isXandrCampaign(campaignSubType);\r\n\r\n if (this.activityLogger && this.showBudgetMinRecommend) {\r\n this.activityLogger.trace('BCCForBudgetMinimumRecommendation: show');\r\n }\r\n\r\n return (\r\n \r\n \r\n
\r\n {this.showBudgetLandscape ? this.renderInlineBudgetWithLandscape(i18n, data, permissions, isDisabled, scope) : this.renderInlineBudget(i18n, data, permissions, isDisabled, this.showBudgetMinRecommend)}\r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst wrappers = [\r\n withServerContext,\r\n _.partial(withDefaultStyles, _, getBudgetEditorStyle),\r\n];\r\n\r\nconst Wrapped = _.compose(...wrappers)(CampaignInlineBudgetEditorInternal);\r\n\r\nexport { Wrapped as CampaignInlineBudgetEditor };\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { Budget } from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { Form } from '@bingads-webui-react/primitive';\r\nimport { ErrorMessages } from '@bingads-webui-react/validation';\r\nimport { ValidationGroup } from '@bingads-webui-react/primitive-validation';\r\nimport { QueryParam } from '@bingads-webui-react/scope-service';\r\nimport { getBudgetEditorStyle } from '../styles';\r\nimport { BaseEditor, KEYSENTER } from './base-editor';\r\nimport { getBulkEditResponseErrors } from '../helpers';\r\nimport { BudgetAmountEditor } from './budget-base-component';\r\nimport { BudgetEditorWithLandscape } from './campaign-budget/budget-landscape';\r\n\r\nconst budgetSchema = {\r\n ...Budget,\r\n properties: {\r\n ...Budget.properties,\r\n Amount: {\r\n ...Budget.properties.Amount,\r\n nullable: false,\r\n type: 'number',\r\n maxLength: 15,\r\n },\r\n },\r\n};\r\n\r\nclass SharedBudgetEditorInternal extends React.Component {\r\n static propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n data: PropTypes.shape({\r\n Amount: PropTypes.number,\r\n }).isRequired,\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n classes: PropTypes.shape({}).isRequired,\r\n onSave: PropTypes.func.isRequired,\r\n onCancel: PropTypes.func.isRequired,\r\n renderCustomContent: PropTypes.func,\r\n updateSharedBudget: PropTypes.func.isRequired,\r\n summaryBarActivityLogger: PropTypes.shape({\r\n summaryBarBudgetActivity: PropTypes.any,\r\n }).isRequired,\r\n helpId: PropTypes.isRequired,\r\n showBudgetLandscape: PropTypes.bool,\r\n budgetId: PropTypes.isRequired,\r\n };\r\n\r\n static defaultProps = {\r\n renderCustomContent: null,\r\n showBudgetLandscape: false,\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n this.activityLogger = props.summaryBarActivityLogger\r\n && props.summaryBarActivityLogger.summaryBarBudgetActivity.create();\r\n }\r\n\r\n state = {\r\n isValid: false,\r\n data: this.props.data,\r\n serverErrors: [],\r\n }\r\n\r\n onValidate = (result) => {\r\n if (result.data.Amount !== this.state.data.Amount) {\r\n this.setState({\r\n isValid: result.isValid,\r\n data: { Amount: result.data.Amount },\r\n });\r\n }\r\n }\r\n\r\n onKeyDown = (e) => {\r\n if (e && e.which === KEYSENTER) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.onSave();\r\n }\r\n }\r\n\r\n onSave = () => {\r\n if (this.state.isValid) {\r\n const updateSharedBudget = (hasBudgetLandscape = false) => this.props.updateSharedBudget(this.state.data)\r\n .then((response) => {\r\n this.props.onSave(response);\r\n if (this.activityLogger) {\r\n this.activityLogger.trace(\r\n {\r\n updateStatus: 'successful',\r\n value: this.state.data,\r\n component: 'campaign summary bar',\r\n budgetType: 'inline shared budget',\r\n hasBudgetLandscape,\r\n ...(hasBudgetLandscape ? {\r\n ActionName: 'Accept',\r\n budgetId: this.props.budgetId,\r\n Channel: 'ClientName:bingadsweb[SummaryBarEditing]',\r\n campaignId: this.tableView.campaignId,\r\n opportunityId: this.tableView.opportunityId,\r\n suggestedBudget: this.tableView.ko_model.rawSuggestedBudget,\r\n currency: this.tableView.i18n.currency,\r\n } : {}),\r\n },\r\n 'AdInsight.Budget'\r\n );\r\n }\r\n })\r\n .catch((response) => {\r\n const serverErrors = getBulkEditResponseErrors(response, this.props.i18n);\r\n this.setState({ serverErrors });\r\n\r\n // server error is reported to user trace here as well\r\n if (this.activityLogger) {\r\n this.activityLogger.trace({\r\n updateStatus: 'failed',\r\n serverErrors,\r\n component: 'campaign summary bar',\r\n budgetType: 'inline shared budget',\r\n hasBudgetLandscape,\r\n });\r\n }\r\n });\r\n\r\n if (this.tableView) {\r\n if (this.tableView.getSelectedNewBudget() === '') {\r\n // User did nothing on on the table.\r\n this.props.onCancel();\r\n } else {\r\n this.setState({ data: { ...this.state.data, Amount: this.tableView.getSelectedNewBudget() } }, () => updateSharedBudget(true));\r\n }\r\n } else {\r\n updateSharedBudget();\r\n }\r\n }\r\n }\r\n\r\n setTableView = (tableView) => {\r\n if (tableView) {\r\n this.tableView = tableView;\r\n this.tableView.on('saveCustomValueWithKeyboard', () => {\r\n this.onSave();\r\n });\r\n }\r\n }\r\n\r\n render() {\r\n const {\r\n i18n,\r\n classes,\r\n onCancel,\r\n renderCustomContent,\r\n helpId,\r\n showBudgetLandscape,\r\n scope,\r\n budgetId,\r\n } = this.props;\r\n const {\r\n data,\r\n serverErrors,\r\n isValid,\r\n } = this.state;\r\n\r\n return (\r\n \r\n \r\n
{\r\n showBudgetLandscape ? (\r\n
\r\n \r\n
) : (\r\n \r\n )}\r\n {renderCustomContent && renderCustomContent()}\r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst wrappers = [\r\n withI18nConsumer,\r\n _.partial(withDefaultStyles, _, getBudgetEditorStyle),\r\n];\r\n\r\nconst Wrapped = _.compose(...wrappers)(SharedBudgetEditorInternal);\r\n\r\nexport { Wrapped as SharedBudgetEditor };\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { QueryParam } from '@bingads-webui-react/scope-service';\r\nimport { siteMapPropType } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { getRouterDep } from '@bingads-webui-campaign-react/legacy-router-dep';\r\nimport { SharedBudgetEditor } from '../shared-budget-editor';\r\n\r\nexport class CampaignSharedBudgetEditor extends React.Component {\r\n static propTypes = {\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n siteMap: siteMapPropType.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n data: PropTypes.shape({\r\n Amount: PropTypes.number,\r\n }).isRequired,\r\n budgetId: PropTypes.number.isRequired,\r\n updateSharedBudget: PropTypes.func.isRequired,\r\n campaignId: PropTypes.number.isRequired,\r\n onSave: PropTypes.func.isRequired,\r\n onCancel: PropTypes.func.isRequired,\r\n summaryBarActivityLogger: PropTypes.shape({\r\n summaryBarBudgetActivity: PropTypes.any,\r\n }).isRequired,\r\n hasBudgetLandscape: PropTypes.bool.isRequired,\r\n };\r\n\r\n\r\n getRouteUrl(routeName, params) {\r\n const { scope, siteMap } = this.props;\r\n\r\n const { getRouteUrl } = getRouterDep(scope, siteMap);\r\n\r\n return getRouteUrl(routeName, params);\r\n }\r\n\r\n getBudgetLink(budgetId) {\r\n return this.getRouteUrl('shared_budget_edit', { budget_id: budgetId });\r\n }\r\n\r\n getCampaignSettingsLink(campaignId) {\r\n return this.getRouteUrl('campaign_edit', { campaign_id: campaignId });\r\n }\r\n\r\n renderBudgetMessage = () => {\r\n const {\r\n i18n, budgetId, campaignId,\r\n } = this.props;\r\n const budgetLink = this.getBudgetLink(budgetId);\r\n const campaignSettingsLink = this.getCampaignSettingsLink(campaignId);\r\n\r\n return (\r\n );\r\n };\r\n\r\n render() {\r\n const {\r\n onSave,\r\n onCancel,\r\n data,\r\n updateSharedBudget,\r\n summaryBarActivityLogger,\r\n hasBudgetLandscape,\r\n scope,\r\n budgetId,\r\n } = this.props;\r\n\r\n return (\r\n \r\n );\r\n }\r\n}\r\n","import React from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { QueryParam } from '@bingads-webui-react/scope-service';\r\nimport { siteMapPropType } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { BudgetNotEditable } from './budget-not-editable';\r\nimport { CampaignInlineBudgetEditor } from './inline-budget-editor';\r\nimport { CampaignSharedBudgetEditor } from './shared-budget-editor';\r\n\r\nexport const CampaignBudgetEditor = ({\r\n experimentId, budget, campaignType, campaignId, onSave, onCancel, updateInlineBudget, updateSharedBudget, hasBudgetLandscape, summaryBarActivityLogger, scope, siteMap, i18n, permissions, campaignSubType,\r\n}) => {\r\n if (experimentId > 0) {\r\n return ();\r\n }\r\n\r\n if (budget && budget.Id) {\r\n const data = _.pick(budget, 'Amount');\r\n\r\n return ();\r\n }\r\n\r\n if (budget && budget.Amount) {\r\n const data = _.pick(budget, 'Amount', 'Type');\r\n\r\n return ();\r\n }\r\n return null;\r\n};\r\n\r\nCampaignBudgetEditor.propTypes = {\r\n campaignType: PropTypes.number.isRequired,\r\n campaignId: PropTypes.number.isRequired,\r\n experimentId: PropTypes.number,\r\n budget: PropTypes.shape({}),\r\n onSave: PropTypes.func,\r\n onCancel: PropTypes.func,\r\n updateSharedBudget: PropTypes.func,\r\n updateInlineBudget: PropTypes.func,\r\n hasBudgetLandscape: PropTypes.bool.isRequired,\r\n summaryBarActivityLogger: PropTypes.shape({\r\n summaryBarBudgetActivity: PropTypes.any,\r\n }).isRequired,\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n siteMap: siteMapPropType.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n campaignSubType: PropTypes.string.isRequired,\r\n};\r\n\r\nCampaignBudgetEditor.defaultProps = {\r\n experimentId: null,\r\n budget: null,\r\n onSave: _.noop,\r\n onCancel: _.noop,\r\n updateInlineBudget: _.noop,\r\n updateSharedBudget: _.noop,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { ceil } from 'lodash';\r\nimport { AdGroup } from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport { HelpIcon } from '@bingads-webui-campaign-react/help';\r\nimport { isMSStoreAdsCampaign } from '@bingads-webui-campaign-react/ms-store-ads-common';\r\nimport { CampaignType } from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport { withServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { ReactTemplate } from '@bingads-webui-react/react-template';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { Form } from '@bingads-webui-react/primitive';\r\nimport { BiddingStrategyToRangeKey, BiddingStrategyToBidParam } from '@bingads-webui-campaign/audience-campaign-shared';\r\nimport { defaultMSStoreMinSuggestionBid } from '@bingads-webui-campaign-legacy/budget/shared/defaultBid';\r\nimport { ErrorMessages } from '@bingads-webui-react/validation';\r\nimport { ValidationGroup, Input } from '@bingads-webui-react/primitive-validation';\r\nimport { isXandrCampaign, isXandrVideoAdsCampaign } from '@bingads-webui-campaign-react/constants';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nimport { getBidEditorStyle } from '../styles';\r\nimport { BaseEditor, KEYSENTER } from './base-editor';\r\nimport { getBulkEditResponseErrors } from '../helpers';\r\n\r\nconst adGroupSchema = {\r\n ...AdGroup,\r\n properties: {\r\n ...AdGroup.properties,\r\n SearchBid: {\r\n ...AdGroup.properties.SearchBid,\r\n nullable: false,\r\n },\r\n CpmBid: {\r\n ...AdGroup.properties.CpmBid,\r\n nullable: false,\r\n },\r\n CpvBid: {\r\n ...AdGroup.properties.CpvBid,\r\n nullable: false,\r\n },\r\n },\r\n};\r\n\r\nconst topicMapping = {\r\n ManualCpc: 'pop_BA_AdGroup_SearchBid',\r\n ManualCpv: 'Page_CampaignGrids_CpvBid',\r\n ManualCpm: 'Page_CampaignGrids_CpmBid',\r\n};\r\n\r\nclass AdGroupBidEditorInternal extends React.Component {\r\n static propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n data: PropTypes.shape({\r\n SearchBid: PropTypes.number,\r\n CpvBid: PropTypes.number,\r\n CpmBid: PropTypes.number,\r\n }).isRequired,\r\n classes: PropTypes.shape({}).isRequired,\r\n onSave: PropTypes.func.isRequired,\r\n onCancel: PropTypes.func.isRequired,\r\n updateBid: PropTypes.func.isRequired,\r\n serverContext: PropTypes.shape({\r\n CurrentAccount: PropTypes.shape({}).isRequired,\r\n }).isRequired,\r\n campaignType: PropTypes.number.isRequired,\r\n bidStrategy: PropTypes.string.isRequired,\r\n campaignSubType: PropTypes.string.isRequired,\r\n permissions: PropTypes.shape({\r\n IsBidLessThan5CentsInShoppingCampaignEnabled: PropTypes.bool.isRequired,\r\n }).isRequired,\r\n summaryBarActivityLogger: PropTypes.shape({\r\n summaryBarBidActivity: PropTypes.any,\r\n }).isRequired,\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n this.activityLogger = props.summaryBarActivityLogger\r\n && props.summaryBarActivityLogger.summaryBarBidActivity.create();\r\n this.isMSStoreAdsCampaign = isMSStoreAdsCampaign(pageContext.CurrentCampaign);\r\n this.defaultMSStoreMinSuggestionBid = defaultMSStoreMinSuggestionBid();\r\n }\r\n\r\n state = {\r\n isValid: false,\r\n data: this.props.data,\r\n serverErrors: [],\r\n isLowerThanMinBidSuggestion: this.props.data.SearchBid < defaultMSStoreMinSuggestionBid(),\r\n };\r\n\r\n onValidate = (result) => {\r\n const bidType = BiddingStrategyToBidParam[this.props.bidStrategy] || 'SearchBid';\r\n const newBid = result.data[bidType];\r\n if (newBid !== this.state.data[bidType]) {\r\n this.setState({\r\n isValid: result.isValid,\r\n data: { [bidType]: newBid },\r\n isLowerThanMinBidSuggestion: newBid < this.defaultMSStoreMinSuggestionBid,\r\n });\r\n }\r\n };\r\n\r\n onSave = () => {\r\n if (this.state.isValid) {\r\n this.props.updateBid(this.state.data)\r\n .then((response) => {\r\n this.props.onSave(response);\r\n if (this.activityLogger) {\r\n this.activityLogger.trace({\r\n updateStatus: 'successful',\r\n value: this.state.data,\r\n component: 'ad group summary bar',\r\n });\r\n }\r\n })\r\n .catch((response) => {\r\n const serverErrors = getBulkEditResponseErrors(response, this.props.i18n, 'newadgroup');\r\n this.setState({ serverErrors });\r\n\r\n // server error is reported to user trace here as well\r\n if (this.activityLogger) {\r\n this.activityLogger.trace({\r\n updateStatus: 'failed',\r\n serverErrors,\r\n component: 'ad group summary bar',\r\n });\r\n }\r\n });\r\n }\r\n };\r\n\r\n onKeyDown = (e) => {\r\n if (e && e.which === KEYSENTER) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.onSave();\r\n }\r\n };\r\n\r\n updateBidSchemaRange = () => {\r\n const {\r\n serverContext, campaignType, permissions, bidStrategy, campaignSubType, dealMinimumBid,\r\n } = this.props;\r\n const useProductGroupBidRange = permissions.IsBidLessThan5CentsInShoppingCampaignEnabled && campaignType === CampaignType.Shopping;\r\n let bidRangeKey = useProductGroupBidRange ? 'ProductGroupBidRange' : (BiddingStrategyToRangeKey[bidStrategy] || 'KeywordBidRange');\r\n if (this.isMSStoreAdsCampaign) {\r\n bidRangeKey = 'WindowsStoreAdsBidRange';\r\n } else if (isXandrVideoAdsCampaign(campaignSubType)) {\r\n if (bidStrategy === 'ManualCpv') {\r\n bidRangeKey = 'VideoViewsCPVBidRange';\r\n } else if (bidStrategy === 'ManualCpm') {\r\n bidRangeKey = 'VideoViewsCPMBidRange';\r\n }\r\n }\r\n const bidRange = _.result(serverContext, bidRangeKey);\r\n let min = _.result(bidRange, 'FloorValue');\r\n const max = _.result(bidRange, 'CeilingValue');\r\n\r\n if (isXandrCampaign(campaignSubType)\r\n && permissions.IsDealEnabledForMsAds\r\n && dealMinimumBid && dealMinimumBid < max) {\r\n min = _.max([min, ceil(dealMinimumBid, 2)]);\r\n }\r\n\r\n const bidType = BiddingStrategyToBidParam[bidStrategy] || 'SearchBid';\r\n adGroupSchema.properties[bidType].minimum = min;\r\n adGroupSchema.properties[bidType].maximum = max;\r\n };\r\n\r\n errorProcessor = (errors) => {\r\n const { i18n } = this.props;\r\n const customErrors = {\r\n required: i18n.getString(_TL_('Bid is required.')),\r\n };\r\n\r\n return _.map(\r\n errors,\r\n (oldError, key) => customErrors[key] || oldError\r\n );\r\n };\r\n\r\n render() {\r\n const {\r\n i18n, classes, onCancel, serverContext, bidStrategy,\r\n } = this.props;\r\n const {\r\n data,\r\n serverErrors,\r\n isValid,\r\n isLowerThanMinBidSuggestion,\r\n } = this.state;\r\n const { CurrentAccount } = serverContext;\r\n const { CurrencyCode } = CurrentAccount;\r\n\r\n this.updateBidSchemaRange(adGroupSchema);\r\n\r\n return (\r\n \r\n \r\n
\r\n
\r\n
\r\n {i18n.getString(_TL_('Default bid'))}\r\n \r\n
\r\n
\r\n {CurrencyCode}\r\n \r\n
\r\n { this.isMSStoreAdsCampaign && isLowerThanMinBidSuggestion &&\r\n
\r\n
\r\n
\r\n
\r\n {text},\r\n minSuggestionBid: this.defaultMSStoreMinSuggestionBid\r\n }}\r\n template={i18n.getString(_TL_('We recommend raising your bid to over {{minSuggestionBid}} for optimal results, because a bid set any lower risks a lack of impressions. {{link}}Learn more{{/link}}'))}\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\nconst wrappers = [\r\n withServerContext,\r\n _.partial(withDefaultStyles, _, getBidEditorStyle),\r\n];\r\n\r\nconst Wrapped = _.compose(...wrappers)(AdGroupBidEditorInternal);\r\n\r\nexport { Wrapped as AdGroupBidEditor };\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { BackboneInstanceWrapper } from '@bingads-webui-react/backbone-instance-wrapper';\r\nimport { CampaignsDatePicker } from '@bingads-webui-campaign/campaigns-date-picker';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\n\r\nclass BaseDateEditorInternal extends React.PureComponent {\r\n render() {\r\n const {\r\n minDate,\r\n maxDate,\r\n selectedDate,\r\n allowNoDate,\r\n i18n,\r\n editorName,\r\n setDatePicker,\r\n } = this.props;\r\n\r\n this.datePicker = new CampaignsDatePicker({\r\n minDate,\r\n maxDate,\r\n selectedDate,\r\n allowNoDate,\r\n noDateLabel: i18n.getString(_TL_('No end date')),\r\n dateLabel: i18n.getString(_TL_('End by')),\r\n datePickerAriaLabel: editorName === 'end-date' ? i18n.getString(_TL_('End date picker')) : i18n.getString(_TL_('Start date picker')),\r\n noDateGroupAriaLabel: i18n.getString(_TL_('No end date')),\r\n });\r\n\r\n setDatePicker(this.datePicker);\r\n\r\n return (\r\n
\r\n \r\n
);\r\n }\r\n}\r\n\r\nBaseDateEditorInternal.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n editorName: PropTypes.string.isRequired,\r\n minDate: PropTypes.instanceOf(Date),\r\n maxDate: PropTypes.instanceOf(Date),\r\n selectedDate: PropTypes.instanceOf(Date),\r\n allowNoDate: PropTypes.bool,\r\n setDatePicker: PropTypes.func.isRequired,\r\n};\r\n\r\nBaseDateEditorInternal.defaultProps = {\r\n minDate: null,\r\n maxDate: null,\r\n selectedDate: null,\r\n allowNoDate: false,\r\n};\r\n\r\nexport const BaseDateEditor = withI18nConsumer(BaseDateEditorInternal);\r\n\r\nexport const parseDate = (datetime) => {\r\n if (!datetime) {\r\n return null;\r\n }\r\n\r\n const date = datetime.substr(0, 10).replace(/-/g, '/');\r\n\r\n return new Date(date);\r\n};\r\n\r\nexport const dateFormatter = i18n => i18n.dateFormatter({\r\n timeZone: null, raw: 'yyyy-MM-dd',\r\n});\r\n","/* istanbul ignore file */ // ignore this file for component test as we will cover it in selenium test\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport { Form } from '@bingads-webui-react/primitive';\r\nimport { ErrorMessages } from '@bingads-webui-react/validation';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { BaseDateEditor, parseDate, dateFormatter } from './base-date-editor';\r\nimport { BaseEditor } from '../base-editor';\r\nimport { getOdataResponseErrors } from '../../helpers';\r\nimport { getDateEditorStyle } from '../../styles';\r\n\r\nclass StartDateEditorInternal extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.activityLogger = props.summaryBarActivityLogger\r\n && props.summaryBarActivityLogger.summaryBarExperimentCampaignActivity.create();\r\n }\r\n\r\n state = {\r\n serverErrors: [],\r\n }\r\n\r\n onSave = () => {\r\n if (this.datePicker) {\r\n const {\r\n i18n, changeDate,\r\n } = this.props;\r\n const newSelectedDate = this.datePicker.getSelectedDate();\r\n const startDate = dateFormatter(i18n)(newSelectedDate);\r\n\r\n changeDate({ startDate })\r\n .then((response) => {\r\n this.props.onSave(response);\r\n if (this.activityLogger) {\r\n this.activityLogger.trace({\r\n updateStatus: 'successful',\r\n value: { startDate },\r\n component: 'experiment campaign summary bar',\r\n });\r\n }\r\n })\r\n .catch((response) => {\r\n const serverErrors = getOdataResponseErrors(response, this.props.i18n);\r\n this.setState({ serverErrors });\r\n\r\n // server error is reported to user trace here as well\r\n if (this.activityLogger) {\r\n this.activityLogger.trace({\r\n updateStatus: 'failed',\r\n serverErrors,\r\n component: 'experiment campaign summary bar',\r\n });\r\n }\r\n });\r\n }\r\n }\r\n\r\n setDatePicker = (datePicker) => {\r\n this.datePicker = datePicker;\r\n }\r\n\r\n render() {\r\n const {\r\n data, classes, onCancel,\r\n } = this.props;\r\n const minDate = new Date();\r\n const maxDate = parseDate(data.endDate);\r\n const selectedDate = parseDate(data.startDate);\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\nStartDateEditorInternal.propTypes = {\r\n data: PropTypes.shape({\r\n startDate: PropTypes.string,\r\n endDate: PropTypes.string,\r\n }).isRequired,\r\n classes: PropTypes.shape({}).isRequired,\r\n onSave: PropTypes.func.isRequired,\r\n onCancel: PropTypes.func.isRequired,\r\n changeDate: PropTypes.func.isRequired,\r\n summaryBarActivityLogger: PropTypes.shape({\r\n summaryBarExperimentCampaignActivity: PropTypes.any,\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n dateFormatter: PropTypes.func,\r\n }).isRequired,\r\n};\r\n\r\nconst wrappers = [\r\n withI18nConsumer,\r\n _.partial(withDefaultStyles, _, getDateEditorStyle),\r\n];\r\n\r\nconst Wrapped = _.compose(...wrappers)(StartDateEditorInternal);\r\n\r\nexport { Wrapped as StartDateEditor };\r\n","/* istanbul ignore file */ // ignore this file for component test as we will cover it in selenium test\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { withI18nConsumer } from '@bingads-webui-react/i18n-context';\r\nimport { Form } from '@bingads-webui-react/primitive';\r\nimport { ErrorMessages } from '@bingads-webui-react/validation';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { BaseDateEditor, parseDate, dateFormatter } from './base-date-editor';\r\nimport { BaseEditor } from '../base-editor';\r\nimport { getOdataResponseErrors } from '../../helpers';\r\nimport { getDateEditorStyle } from '../../styles';\r\n\r\nclass EndDateEditorInternal extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.activityLogger = props.summaryBarActivityLogger\r\n && props.summaryBarActivityLogger.summaryBarExperimentCampaignActivity.create();\r\n }\r\n\r\n state = {\r\n serverErrors: [],\r\n }\r\n\r\n onSave = () => {\r\n if (this.datePicker) {\r\n const {\r\n i18n, changeDate,\r\n } = this.props;\r\n const newSelectedDate = this.datePicker.getSelectedDate();\r\n const endDate = newSelectedDate ? dateFormatter(i18n)(newSelectedDate) : null;\r\n changeDate({ endDate })\r\n .then((response) => {\r\n this.props.onSave(response);\r\n if (this.activityLogger) {\r\n this.activityLogger.trace({\r\n updateStatus: 'successful',\r\n value: { endDate },\r\n component: 'experiment campaign summary bar',\r\n });\r\n }\r\n })\r\n .catch((response) => {\r\n const serverErrors = getOdataResponseErrors(response, this.props.i18n);\r\n this.setState({ serverErrors });\r\n\r\n // server error is reported to user trace here as well\r\n if (this.activityLogger) {\r\n this.activityLogger.trace({\r\n updateStatus: 'failed',\r\n serverErrors,\r\n component: 'experiment campaign summary bar',\r\n });\r\n }\r\n });\r\n }\r\n }\r\n\r\n setDatePicker = (datePicker) => {\r\n this.datePicker = datePicker;\r\n }\r\n\r\n render() {\r\n const {\r\n data, classes, onCancel,\r\n } = this.props;\r\n const minDate = parseDate(data.startDate);\r\n const selectedDate = parseDate(data.endDate);\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\nEndDateEditorInternal.propTypes = {\r\n data: PropTypes.shape({\r\n startDate: PropTypes.string,\r\n endDate: PropTypes.string,\r\n }).isRequired,\r\n classes: PropTypes.shape({}).isRequired,\r\n onSave: PropTypes.func.isRequired,\r\n onCancel: PropTypes.func.isRequired,\r\n changeDate: PropTypes.func.isRequired,\r\n summaryBarActivityLogger: PropTypes.shape({\r\n summaryBarExperimentCampaignActivity: PropTypes.any,\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n dateFormatter: PropTypes.func,\r\n }).isRequired,\r\n};\r\n\r\nconst wrappers = [\r\n withI18nConsumer,\r\n _.partial(withDefaultStyles, _, getDateEditorStyle),\r\n];\r\n\r\nconst Wrapped = _.compose(...wrappers)(EndDateEditorInternal);\r\n\r\nexport { Wrapped as EndDateEditor };\r\n","import _ from 'underscore';\r\nimport React, { useContext, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { formatPercentOneDecimal, CHANNEL_TYPES } from '@bingads-webui-campaign/recommendation-core';\r\nimport { HighchartReactWrapper } from '@bingads-webui-react/highchart-react-wrapper';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { TooltipHost, DirectionalHint, TooltipDelay, Link } from '@fluentui/react';\r\n\r\nconst getChartOptions = (Available, Gained, Dismissed) => ({\r\n chart: {\r\n width: 50,\r\n height: 17,\r\n margin: [0, 0, 0, 0],\r\n type: 'bar',\r\n },\r\n title: {\r\n text: null,\r\n },\r\n xAxis: {\r\n visible: false,\r\n },\r\n yAxis: {\r\n visible: false,\r\n tickPositions: [-2, 102],\r\n },\r\n legend: {\r\n enabled: false,\r\n },\r\n credits: {\r\n enabled: false,\r\n },\r\n tooltip: {\r\n enabled: false,\r\n formatter: null,\r\n },\r\n plotOptions: {\r\n bar: {\r\n animation: false,\r\n pointWidth: 16,\r\n borderColor: '#0078D4',\r\n },\r\n series: {\r\n cursor: 'pointer',\r\n point: {\r\n events: {\r\n click: null,\r\n },\r\n },\r\n stacking: 'normal',\r\n states: {\r\n hover: {\r\n enabled: false,\r\n },\r\n inactive: {\r\n enabled: false,\r\n },\r\n },\r\n },\r\n },\r\n series: [\r\n {\r\n data: [Available * 100],\r\n color: '#FFFFFF',\r\n },\r\n {\r\n data: [Dismissed * 100],\r\n color: '#ABDBFF',\r\n },\r\n {\r\n data: [Gained * 100],\r\n color: '#0078D4',\r\n },\r\n ],\r\n});\r\n\r\nconst hostStyles = {\r\n root: {\r\n display: 'inline-block',\r\n },\r\n};\r\nconst calloutProps = { gapSpace: 7 };\r\nconst tooltipProps = {\r\n maxWidth: '231px',\r\n styles: {\r\n root: {\r\n padding: '8px 10px',\r\n },\r\n },\r\n delay: TooltipDelay.long,\r\n};\r\nconst viewRecommendationStyle = { marginTop: '10px' };\r\n\r\nexport function OptimizationScoreItem(props) {\r\n const { scope } = useContext(ScopeContext);\r\n const { osData, i18n } = props;\r\n\r\n const navigate = useCallback((event) => {\r\n if (event && (event.button !== 0 ||\r\n event.ctrlKey ||\r\n event.shiftKey ||\r\n event.altKey ||\r\n event.metaKey)) {\r\n return true;\r\n }\r\n\r\n event.preventDefault();\r\n scope.set(_.extend({ recsrc: CHANNEL_TYPES.CAMPAIGN_SUMMARY_BAR }, scope.values));\r\n scope.save('/campaign/vnext/recommendations/All');\r\n return false;\r\n }, [scope]);\r\n\r\n const calloutContent = useCallback(() => {\r\n const url = `/campaign/vnext/recommendations/All?${\r\n scope.stringify(_.extend(\r\n {\r\n recsrc: CHANNEL_TYPES.CAMPAIGN_SUMMARY_BAR,\r\n },\r\n scope.values\r\n ))}`;\r\n\r\n return (\r\n
\r\n {i18n.getString(_TL_('View relevant recommendations to improve your optimization score'))}\r\n
\r\n \r\n {i18n.getString(_TL_('View recommendations'))}\r\n \r\n
\r\n
\r\n );\r\n }, [i18n, navigate, scope]);\r\n\r\n const getScore = useCallback(() => {\r\n if (osData && osData.OverallOptimizationScoreBar) {\r\n const { OverallOptimizationScoreBar } = osData;\r\n const { Available, Gained, Dismissed } = OverallOptimizationScoreBar;\r\n return (\r\n \r\n
{formatPercentOneDecimal(Gained + Dismissed, i18n)}
\r\n
\r\n
\r\n );\r\n }\r\n return (\r\n
-
\r\n );\r\n }, [i18n, osData]);\r\n\r\n return (\r\n
\r\n \r\n {i18n.getString(_TL_('Optimization score'))}\r\n
{getScore()}
\r\n \r\n
\r\n );\r\n}\r\n\r\nOptimizationScoreItem.propTypes = {\r\n osData: PropTypes.shape({\r\n OverallOptimizationScoreBar: PropTypes.shape({\r\n Available: PropTypes.number,\r\n Gained: PropTypes.number,\r\n Dismissed: PropTypes.number,\r\n }).isRequired,\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n};\r\n","import { pageClickHandler } from '../helpers/router-helper';\r\n\r\nexport const NavigationItem = ({\r\n scope, siteMap, shouldNavigate, targetPage,\r\n}) => {\r\n if (shouldNavigate) {\r\n pageClickHandler(siteMap, scope, targetPage);\r\n }\r\n\r\n return null;\r\n};\r\n\r\nNavigationItem.defaultProps = {\r\n targetPage: 'settings',\r\n};\r\n","import {\r\n compact, noop, contains, isNumber,\r\n} from 'underscore';\r\nimport { endsWith } from 'underscore.string';\r\nimport PropTypes from 'prop-types';\r\nimport $ from 'jquery';\r\nimport { StatusDropdown } from '@bingads-webui-campaign-react/status-dropdown';\r\nimport React from 'react';\r\nimport { Callout } from '@bingads-webui-react/callout';\r\nimport { curlyTemplate } from '@bingads-webui-universal/primitive-utilities';\r\nimport { BiddingStrategyToBidParam } from '@bingads-webui-campaign/audience-campaign-shared';\r\nimport { CampaignType } from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport { HelpPopup } from '@bingads-webui-react/help-popup';\r\nimport { formatPercentOneDecimal } from '@bingads-webui-campaign/recommendation-core';\r\nimport { isXandrCampaign, isXandrVideoAdsCampaign } from '@bingads-webui-campaign-react/constants';\r\nimport { SettingsItem } from './settings-item';\r\nimport { campaignClickHandler, getCampaignUrl, pageClickHandler } from './router-helper';\r\nimport { RepositoryConsumer } from './repository-consumer';\r\nimport { SharedBudgetConsumer } from './shared-budget-consumer';\r\nimport { CriteriaItems } from './criteria-items-content';\r\nimport { OverflowContent } from '../components/overflow-entity-item';\r\nimport { CampaignBudgetEditor } from '../editors/campaign-budget';\r\nimport { SharedBudgetEditor } from '../editors/shared-budget-editor';\r\nimport { AdGroupBidEditor } from '../editors/adgroup-bid-editor';\r\nimport { StartDateEditor } from '../editors/experiment-campaign/start-date';\r\nimport { EndDateEditor } from '../editors/experiment-campaign/end-date';\r\nimport { OptimizationScoreItem } from '../components/optimization-score-item';\r\nimport { NavigationItem } from '../components/navigation-item';\r\n\r\nconst getCpmText = (i18n, campaignSubType) => {\r\n if (isXandrCampaign(campaignSubType)) {\r\n return i18n.getString(_TL_('CPM for maximizing reach'));\r\n }\r\n\r\n return i18n.getString(_TL_('Manual CPM'));\r\n};\r\n\r\nconst getBidStrategyMap = (i18n, campaignSubType, currentCampaignType) => ({\r\n ManualCpa: currentCampaignType === CampaignType.App ? i18n.getString(_TL_('Manual CPI')) : i18n.getString(_TL_('Manual CPA')),\r\n ManualCpc: i18n.getString(_TL_('Manual CPC')),\r\n ManualCpm: getCpmText(i18n, campaignSubType),\r\n ManualCpv: isXandrVideoAdsCampaign(campaignSubType) ? i18n.getString(_TL_('CPCV')) : i18n.getString(_TL_('Manual CPV')),\r\n EnhancedCpc: i18n.getString(_TL_('Enhanced CPC')),\r\n MaxClicks: i18n.getString(_TL_('Maximize Clicks')),\r\n MaxConversions: i18n.getString(_TL_('Maximize Conversions')),\r\n TargetCpa: i18n.getString(_TL_('Target CPA')),\r\n TargetRoas: i18n.getString(_TL_('Target ROAS')),\r\n MaxConversionValue: i18n.getString(_TL_('Maximize Conversion Value')),\r\n TargetImpressionShare: i18n.getString(_TL_('Target Impression Share')),\r\n Commission: i18n.getString(_TL_('Commission')),\r\n PercentCpc: i18n.getString(_TL_('Percent CPC')),\r\n CostPerSale: i18n.getString(_TL_('Cost per Sale')),\r\n});\r\n\r\nconst getExperimentStatusMap = i18n => ({\r\n Active: i18n.getString(_TL_('Active')),\r\n Paused: i18n.getString(_TL_('Paused')),\r\n Creating: i18n.getString(_TL_('Creating')),\r\n CreationFailed: i18n.getString(_TL_('Creation Failed')),\r\n Ended: i18n.getString(_TL_('Completed')),\r\n Scheduled: i18n.getString(_TL_('Scheduled')),\r\n Graduating: i18n.getString(_TL_('Applying')),\r\n Promoting: i18n.getString(_TL_('Applying')),\r\n Graduated: i18n.getString(_TL_('Applied')),\r\n Promoted: i18n.getString(_TL_('Applied')),\r\n GraduateFailed: i18n.getString(_TL_('Apply Failed')),\r\n PromoteFailed: i18n.getString(_TL_('Apply Failed')),\r\n});\r\n\r\nconst getExperimentTypeMap = i18n => ({\r\n TrafficBased: i18n.getString(_TL_('Search-based')),\r\n CookieBased: i18n.getString(_TL_('Cookie-based')),\r\n});\r\n\r\nconst statusEntityItem = (i18n, { changeStatus, status }, isExperiment, ariaLabel) => ({\r\n className: 'summary-bar-status',\r\n renderEntityItem: () => (),\r\n noOverflow: true,\r\n canEdit: true,\r\n});\r\n\r\nconst experimentStatusEntityItem = (i18n, { status }) => ({\r\n label: i18n.getString(_TL_('Experiment status')),\r\n className: 'summary-bar-experiment-status',\r\n canEdit: false,\r\n renderContent: () => ({getExperimentStatusMap(i18n)[status]}),\r\n});\r\n\r\nconst experimentSplitOptionEntityItem = (i18n, { experimentType }) => ({\r\n label: i18n.getString(_TL_('Split option')),\r\n className: 'summary-bar-experiment-split-option',\r\n renderContent: () => (\r\n \r\n {getExperimentTypeMap(i18n)[experimentType]}\r\n \r\n ),\r\n canEdit: false,\r\n});\r\n\r\nconst originalCampaignEntityItem = (i18n, { originalCampaignId, originalCampaignName, scope }) => ({\r\n label: i18n.getString(_TL_('Original campaign')),\r\n className: 'summary-bar-original-campaign',\r\n ariaLabel: i18n.getString(_TL_('Go to original campaign')),\r\n canEdit: true,\r\n onClick: event => campaignClickHandler(event, originalCampaignId, scope),\r\n renderContent: () => (\r\n
\r\n \r\n
\r\n ),\r\n});\r\n\r\n// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars\r\nconst getPanelProps = ({ title, onClose, ...other }) => (isOpen, closePanel) => ({\r\n title,\r\n isOpen,\r\n onClose: () => {\r\n closePanel();\r\n if (onClose) {\r\n onClose();\r\n }\r\n },\r\n getChildren: () => (\r\n
\r\n

{`The ${title} is not implemented yet`}

\r\n
\r\n ),\r\n ...other,\r\n});\r\n\r\nconst getCampaignBudgetEditorName = (experimentId, budget) => {\r\n if (experimentId) {\r\n return 'experiment-budget';\r\n }\r\n\r\n if (budget && budget.Id) {\r\n return 'shared-budget';\r\n }\r\n\r\n if (budget && budget.Amount) {\r\n return 'inline-budget';\r\n }\r\n return '';\r\n};\r\n\r\nconst getTargetContainer = (cssSelector) => {\r\n const item = $(cssSelector);\r\n if (item.length > 0) {\r\n return item[0];\r\n }\r\n return null;\r\n};\r\n\r\nconst getFocusLockProps = parentContainer => ({\r\n getAnchor: () => getTargetContainer(`${parentContainer} > div`),\r\n});\r\n\r\nconst budgetEntityItem = ({\r\n i18n,\r\n budget,\r\n hasBudgetLandscape = false,\r\n canEdit,\r\n campaignType,\r\n campaignSubType,\r\n campaignId,\r\n summaryBarActivityLogger,\r\n experimentId = null,\r\n updateInlineBudget = noop,\r\n updateSharedBudget = noop,\r\n scope,\r\n permissions,\r\n siteMap,\r\n}) => (\r\n {\r\n label: i18n.getString(_TL_('Budget')),\r\n className: 'summary-bar-budget',\r\n text: curlyTemplate(i18n.getString(_TL_('{{budget}}/day')))({ budget: budget.Amount.toFixed(2) }),\r\n ariaLabel: i18n.getString(_TL_('Campaign budget')),\r\n Editor: Callout,\r\n getEditorProps: (show, closeEditor) => ({\r\n title: budget && budget.Id ?\r\n curlyTemplate(i18n.getString(_TL_('Set shared budget: {{budgetName}}')))({\r\n budgetName: budget.Name,\r\n }) : i18n.getString(_TL_('Set campaign budget')),\r\n content: (),\r\n show,\r\n onClose: closeEditor,\r\n closeButton: true,\r\n target: null,\r\n placement: 'bottom',\r\n popoverId: `summary-bar-campaign-${getCampaignBudgetEditorName(experimentId, budget)}-editor`,\r\n popoverClassName: `summary-bar-campaign-${getCampaignBudgetEditorName(experimentId, budget)}-editor`,\r\n closeButtonAriaLabel: i18n.getString(_TL_('Close')),\r\n experimentId,\r\n focusLockContent: true,\r\n focusLockProps: getFocusLockProps('.summary-bar-budget'),\r\n }),\r\n canEdit,\r\n }\r\n);\r\n\r\nconst optimizationScoreEntityItem = (i18n, osData, permissions) => ({\r\n className: 'summary-bar-optimization-score',\r\n text: osData && osData.OverallOptimizationScoreBar ?\r\n formatPercentOneDecimal(osData.OverallOptimizationScoreBar.Gained + osData.OverallOptimizationScoreBar.Dismissed, i18n) : '-',\r\n label: i18n.getString(_TL_('Optimization score')),\r\n ariaLabel: i18n.getString(_TL_('Optimization score')),\r\n renderEntityItem: () => (),\r\n canEdit: false,\r\n});\r\n\r\nconst autoBidStrategyList = ['MaxClicks', 'MaxConversions', 'TargetCpa', 'TargetRoas', 'MaxConversionValue', 'TargetImpressionShare', 'CostPerSale'];\r\nconst bidEntityItem = ({\r\n i18n,\r\n bid,\r\n bidStrategy,\r\n displayBiddingStrategyType,\r\n canEdit,\r\n campaignType,\r\n updateBid,\r\n campaignSubType,\r\n summaryBarActivityLogger,\r\n permissions,\r\n dealMinimumBid,\r\n}) => {\r\n let bidText;\r\n if (bidStrategy === 'CostPerSale') {\r\n bidText = i18n.getString(_TL_('Automatic'));\r\n } else if (contains(autoBidStrategyList, displayBiddingStrategyType)) {\r\n bidText = i18n.getString(_TL_('Auto'));\r\n } else {\r\n bidText = isNumber(bid) ? bid.toFixed(2) : '-';\r\n }\r\n\r\n return {\r\n label: i18n.getString(_TL_('Bid')),\r\n className: 'summary-bar-bid',\r\n text: bidText,\r\n ariaLabel: i18n.getString(_TL_('Bid')),\r\n Editor: Callout,\r\n getEditorProps: (show, closeEditor) => ({\r\n title: i18n.getString(_TL_('Set ad group bid')),\r\n content: (),\r\n show,\r\n onClose: closeEditor,\r\n closeButton: true,\r\n target: null,\r\n placement: 'bottom',\r\n popoverId: 'summary-bar-adgroup-bid-editor',\r\n popoverClassName: 'summary-bar-adgroup-bid-editor',\r\n closeButtonAriaLabel: i18n.getString(_TL_('Close')),\r\n focusLockContent: true,\r\n focusLockProps: getFocusLockProps('.summary-bar-bid'),\r\n }),\r\n canEdit: canEdit && !contains(autoBidStrategyList, displayBiddingStrategyType),\r\n };\r\n};\r\n\r\nconst isDateEditable = (isStartDate, { startDate }) => {\r\n if (isStartDate) {\r\n const isNotStarted = new Date(startDate) > new Date();\r\n\r\n return isNotStarted;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nconst parseDate = (datetime) => {\r\n if (!datetime) {\r\n return null;\r\n }\r\n\r\n const date = datetime.substr(0, 10).replace(/-/g, '/');\r\n\r\n return new Date(date);\r\n};\r\n\r\nconst reformatDate = (datetime, i18n) => {\r\n const date = parseDate(datetime);\r\n\r\n if (!date) {\r\n return i18n.getString(_TL_('None'));\r\n }\r\n\r\n return i18n.formatDate(date, { timeZone: null, skeleton: 'yMd' });\r\n};\r\n\r\nconst getDateText = (isStartDate, { startDate, endDate }, i18n) => {\r\n const datetime = isStartDate ? startDate : endDate;\r\n\r\n return reformatDate(datetime, i18n);\r\n};\r\n\r\nconst startEndDate = (i18n, { startDate, endDate }, canEdit, changeDate, summaryBarActivityLogger, isStartDate = true) => ({\r\n label: isStartDate ? i18n.getString(_TL_('Start date')) : i18n.getString(_TL_('End date')),\r\n className: `summary-bar-${isStartDate ? 'start-date' : 'end-date'}`,\r\n text: getDateText(isStartDate, { startDate, endDate }, i18n),\r\n ariaLabel: isStartDate ? i18n.getString(_TL_('Start date')) : i18n.getString(_TL_('End date')),\r\n Editor: Callout,\r\n getEditorProps: (show, closeEditor) => ({\r\n title: isStartDate ? i18n.getString(_TL_('Set experiment campaign start date')) : i18n.getString(_TL_('Set experiment campaign end date')),\r\n content: isStartDate ? () : (),\r\n show,\r\n onClose: closeEditor,\r\n closeButton: true,\r\n target: null,\r\n placement: 'bottom',\r\n popoverId: `summary-bar-experiment-campaign-${isStartDate ? 'start' : 'end'}-editor`,\r\n popoverClassName: `summary-bar-experiment-campaign-${isStartDate ? 'start' : 'end'}-editor`,\r\n closeButtonAriaLabel: i18n.getString(_TL_('Close')),\r\n focusLockContent: true,\r\n focusLockProps: getFocusLockProps(`.summary-bar-${isStartDate ? 'start-date' : 'end-date'}`),\r\n }),\r\n canEdit: canEdit && isDateEditable(isStartDate, { startDate }),\r\n});\r\n\r\nconst isNoSettingsPage = (campaignSubType, isAdGroup) => campaignSubType === 'ShoppingSmartAds' && isAdGroup;\r\nconst isSettingsPage = scope => scope && scope.location && scope.location.pathname && endsWith(scope.location.pathname, 'settings');\r\nconst isAudiencesPage = scope => scope && scope.location && scope.location.pathname && endsWith(scope.location.pathname, 'audiences');\r\n\r\nconst criteriaItems = ({\r\n i18n,\r\n scope,\r\n canEdit,\r\n isAdGroup,\r\n siteMap,\r\n campaignSubType,\r\n currentCampaignType,\r\n // these are only for tests\r\n locations,\r\n audiences,\r\n devices,\r\n excludedLocationOnly,\r\n}) => {\r\n const repositoryConsumer = new RepositoryConsumer({ scope, i18n });\r\n const {\r\n renderAdGroupAudience,\r\n renderCamapignAudience,\r\n renderCampaignLocationDevice,\r\n renderAdGroupLocationDevice,\r\n } = repositoryConsumer.criteriaRenderer;\r\n\r\n const renderCriteriaItem = ({\r\n targets,\r\n adGroupCriteriaRenderer,\r\n campaignCriteriaRenderer,\r\n isLocation = false,\r\n }) => {\r\n if (targets) {\r\n const RenderCriteriaItem = ({\r\n onClick, canEdit: canCriteriaItemEdit, ariaLabel,\r\n } = {}) => ();\r\n\r\n RenderCriteriaItem.propTypes = {\r\n onClick: PropTypes.func.isRequired,\r\n canEdit: PropTypes.bool.isRequired,\r\n ariaLabel: PropTypes.string.isRequired,\r\n };\r\n\r\n return RenderCriteriaItem;\r\n } else if (isAdGroup) {\r\n return adGroupCriteriaRenderer();\r\n }\r\n return campaignCriteriaRenderer();\r\n };\r\n\r\n return [\r\n ...(isXandrCampaign(campaignSubType) && !isAdGroup) ? [] : [{\r\n label: i18n.getString(_TL_('Locations')),\r\n className: 'summary-bar-locations',\r\n renderContent: renderCriteriaItem({\r\n targets: locations,\r\n adGroupCriteriaRenderer: () => renderAdGroupLocationDevice(true),\r\n campaignCriteriaRenderer: () => renderCampaignLocationDevice(true),\r\n isLocation: true,\r\n }),\r\n canEdit: canEdit && !isSettingsPage(scope) && !isNoSettingsPage(campaignSubType, isAdGroup),\r\n ariaLabel: i18n.getString(_TL_('Edit Locations')),\r\n overflowItemText: i18n.getString(_TL_('Go to settings page')),\r\n Editor: NavigationItem,\r\n onNavigate: () => pageClickHandler(siteMap, scope, 'settings'),\r\n getEditorProps: shouldNavigate => ({ shouldNavigate, scope, siteMap }),\r\n excludedLocationOnly,\r\n }],\r\n ...((currentCampaignType === CampaignType.PerformanceMax || campaignSubType === 'ShoppingSmartAds' || (isXandrCampaign(campaignSubType) && !isAdGroup)) ? [] :\r\n [{\r\n label: i18n.getString(_TL_('Audiences')),\r\n className: 'summary-bar-audiences',\r\n renderContent: renderCriteriaItem({\r\n targets: audiences,\r\n adGroupCriteriaRenderer: () => renderAdGroupAudience,\r\n campaignCriteriaRenderer: () => renderCamapignAudience,\r\n }),\r\n ariaLabel: i18n.getString(_TL_('Edit Audiences')),\r\n canEdit: canEdit && !isAudiencesPage(scope),\r\n overflowItemText: i18n.getString(_TL_('Go to audiences page')),\r\n Editor: NavigationItem,\r\n onNavigate: () => pageClickHandler(siteMap, scope, 'audiences'),\r\n getEditorProps: shouldNavigate => ({\r\n shouldNavigate,\r\n targetPage: 'audiences',\r\n scope,\r\n siteMap,\r\n }),\r\n }, {\r\n label: i18n.getString(_TL_('Device')),\r\n className: 'summary-bar-devices',\r\n renderContent: renderCriteriaItem({\r\n targets: devices,\r\n adGroupCriteriaRenderer: () => renderAdGroupLocationDevice(false, campaignSubType),\r\n campaignCriteriaRenderer: () => renderCampaignLocationDevice(false),\r\n }),\r\n ariaLabel: i18n.getString(_TL_('Edit Devices')),\r\n overflowItemText: i18n.getString(_TL_('Go to settings page')),\r\n Editor: NavigationItem,\r\n onNavigate: () => pageClickHandler(siteMap, scope, 'settings'),\r\n getEditorProps: shouldNavigate => ({ shouldNavigate, scope, siteMap }),\r\n canEdit: canEdit && !isSettingsPage(scope),\r\n }]),\r\n ];\r\n};\r\n\r\n\r\nconst isBidStrategyEditable = ({\r\n isAdGroup,\r\n currentCampaignType,\r\n scope,\r\n campaignSubType,\r\n bidStrategy,\r\n}) => {\r\n if (currentCampaignType === CampaignType.App) {\r\n return false;\r\n }\r\n if (bidStrategy === 'CostPerSale') {\r\n return false;\r\n }\r\n if (isAdGroup) {\r\n return !isSettingsPage(scope) && !isNoSettingsPage(campaignSubType, isAdGroup) && (currentCampaignType === CampaignType.Default || currentCampaignType === CampaignType.Audience ||\r\n (currentCampaignType === CampaignType.Shopping)) && campaignSubType !== 'ShoppingSponsoredProductAd';\r\n }\r\n return !isSettingsPage(scope) &&\r\n currentCampaignType !== CampaignType.Audience &&\r\n campaignSubType !== 'ShoppingSponsoredProductAd' &&\r\n (currentCampaignType !== CampaignType.Shopping || campaignSubType !== 'ShoppingSmartAds');\r\n};\r\n\r\nconst isAudienceFeedBasedCampaign = ({ currentCampaignType, campaignSubType }) => (\r\n currentCampaignType === CampaignType.Audience && campaignSubType === 'AudienceFeedBased'\r\n);\r\n\r\nconst isOptimizedTargetingEnabled = ({ currentCampaignType, isAdGroup }) => isAdGroup\r\n && currentCampaignType === CampaignType.Audience;\r\n\r\nconst isOptimizedTargetingEditable = ({\r\n isAdGroup,\r\n scope,\r\n campaignSubType,\r\n}) => !isSettingsPage(scope) && !isNoSettingsPage(campaignSubType, isAdGroup);\r\n\r\nconst autoTargetingEntityItem = ({\r\n isAdGroup,\r\n siteMap,\r\n canEdit,\r\n scope,\r\n i18n,\r\n campaignSubType,\r\n predictiveTargeting,\r\n}) => ({\r\n label: i18n.getString(_TL_('Predictive targeting')),\r\n className: 'summary-bar-predictive-targeting',\r\n text: predictiveTargeting ? i18n.getString(_TL_('On')) : i18n.getString(_TL_('Off')),\r\n ariaLabel: i18n.getString(_TL_('Predictive targeting')),\r\n Editor: NavigationItem,\r\n overflowItemText: i18n.getString(_TL_('Go to settings page')),\r\n getEditorProps: shouldNavigate => ({ shouldNavigate, scope, siteMap }),\r\n onNavigate: () => pageClickHandler(siteMap, scope, 'settings'),\r\n canEdit: canEdit && isOptimizedTargetingEditable({ isAdGroup, scope, campaignSubType }),\r\n});\r\n\r\nexport const sharedEntityItems = ({\r\n bidStrategy,\r\n scope,\r\n campaignSubType,\r\n permissions,\r\n siteMap,\r\n canEdit,\r\n currentCampaignType,\r\n isAdGroup = false,\r\n i18n,\r\n predictiveTargeting,\r\n ...rest\r\n}) => [\r\n ...(isXandrCampaign(campaignSubType) && isAdGroup) ? [] : [{\r\n label: i18n.getString(_TL_('Bid strategy')),\r\n className: 'summary-bar-bid-strategy',\r\n text: getBidStrategyMap(i18n, campaignSubType, currentCampaignType)[bidStrategy],\r\n ariaLabel: i18n.getString(_TL_('Bid strategy')),\r\n Editor: NavigationItem,\r\n overflowItemText: i18n.getString(_TL_('Go to settings page')),\r\n getEditorProps: shouldNavigate => ({ shouldNavigate, scope, siteMap }),\r\n onNavigate: () => pageClickHandler(siteMap, scope, 'settings'),\r\n canEdit: canEdit && isBidStrategyEditable({\r\n isAdGroup,\r\n permissions,\r\n currentCampaignType,\r\n scope,\r\n campaignSubType,\r\n bidStrategy,\r\n }),\r\n }],\r\n ...compact(criteriaItems({\r\n i18n,\r\n scope,\r\n canEdit,\r\n isAdGroup,\r\n siteMap,\r\n campaignSubType,\r\n currentCampaignType,\r\n ...rest,\r\n })),\r\n !isAudienceFeedBasedCampaign({ currentCampaignType, campaignSubType }) &&\r\n isOptimizedTargetingEnabled({ isAdGroup, currentCampaignType }) ? autoTargetingEntityItem({\r\n isAdGroup, siteMap, canEdit, scope, i18n, predictiveTargeting, campaignSubType,\r\n }) : null,\r\n {\r\n className: 'overflow-entity-items',\r\n noOverflow: true,\r\n },\r\n campaignSubType !== 'ShoppingSmartAds' || !isAdGroup ? {\r\n className: 'summary-bar-settings',\r\n noOverflow: true,\r\n canEdit: true,\r\n renderEntityItem: () => (\r\n \r\n ),\r\n } : null,\r\n].filter(item => item != null);\r\n\r\nexport const sharedBudgetItems = ({\r\n scope,\r\n i18n,\r\n canEdit,\r\n updateSharedBudget,\r\n summaryBarActivityLogger,\r\n budget,\r\n}) => {\r\n const repositoryConsumer = new SharedBudgetConsumer({ scope, i18n, budget });\r\n const {\r\n renderSharedBudgetAmount,\r\n renderSharedBudgetType,\r\n } = repositoryConsumer.criteriaRenderer;\r\n\r\n return [{\r\n label: i18n.getString(_TL_('Budget')),\r\n className: 'summary-bar-budget',\r\n renderContent: renderSharedBudgetAmount,\r\n ariaLabel: i18n.getString(_TL_('Budget')),\r\n canEdit,\r\n Editor: Callout,\r\n getEditorProps: (show, closeEditor) => ({\r\n title: i18n.getString(_TL_('Set shared budget')),\r\n content: (),\r\n show,\r\n onClose: closeEditor,\r\n closeButton: true,\r\n target: null,\r\n placement: 'bottom',\r\n popoverId: 'summary-bar-shared-budget-editor',\r\n popoverClassName: 'summary-bar-shared-budget-editor',\r\n closeButtonAriaLabel: i18n.getString(_TL_('Close')),\r\n focusLockContent: true,\r\n focusLockProps: getFocusLockProps('.summary-bar-budget'),\r\n }),\r\n }, {\r\n label: i18n.getString(_TL_('Budget type')),\r\n className: 'summary-bar-budget-type',\r\n renderContent: renderSharedBudgetType,\r\n ariaLabel: i18n.getString(_TL_('Budget type')),\r\n canEdit: false,\r\n }];\r\n};\r\n\r\nexport const campaignEntityItems = ({\r\n status,\r\n budget,\r\n i18n,\r\n changeStatus,\r\n canEdit,\r\n currentCampaignType,\r\n campaignSubType,\r\n id,\r\n updateInlineBudget,\r\n updateSharedBudget,\r\n hasBudgetLandscape,\r\n summaryBarActivityLogger,\r\n scope,\r\n permissions,\r\n siteMap,\r\n osData,\r\n ...other\r\n}) => {\r\n const entityItems = [\r\n statusEntityItem(i18n, { changeStatus, status }, false, i18n.getString(_TL_('Campaign status'))),\r\n budgetEntityItem({\r\n i18n,\r\n budget,\r\n hasBudgetLandscape,\r\n canEdit,\r\n campaignType: currentCampaignType,\r\n campaignSubType,\r\n campaignId: id,\r\n summaryBarActivityLogger,\r\n experimentId: null,\r\n updateInlineBudget,\r\n updateSharedBudget,\r\n scope,\r\n permissions,\r\n siteMap,\r\n }),\r\n ];\r\n const isOptimizationScoreOn = permissions.dynamic.OptimizationScore && currentCampaignType !== CampaignType.PerformanceMax;\r\n if (isOptimizationScoreOn) {\r\n entityItems.push(optimizationScoreEntityItem(i18n, osData, permissions));\r\n }\r\n entityItems.push(...sharedEntityItems({\r\n i18n, ...other, canEdit, currentCampaignType, scope, permissions, siteMap, campaignSubType,\r\n }));\r\n\r\n return entityItems;\r\n};\r\n\r\nexport const experimentCampaignEntityItems = ({\r\n status,\r\n startDate,\r\n endDate,\r\n originalCampaignName,\r\n originalCampaignId,\r\n scope,\r\n permissions,\r\n siteMap,\r\n budget,\r\n i18n,\r\n experimentType,\r\n canEdit,\r\n currentCampaignType,\r\n campaignSubType,\r\n id,\r\n experimentId,\r\n summaryBarActivityLogger,\r\n changeStartDate,\r\n changeEndDate,\r\n ...other\r\n}) => [\r\n experimentStatusEntityItem(i18n, { status }),\r\n startEndDate(i18n, { startDate, endDate }, canEdit, changeStartDate, summaryBarActivityLogger),\r\n startEndDate(i18n, { startDate, endDate }, canEdit, changeEndDate, summaryBarActivityLogger, false),\r\n experimentSplitOptionEntityItem(i18n, { experimentType }),\r\n originalCampaignEntityItem(i18n, { originalCampaignId, originalCampaignName, scope }),\r\n budgetEntityItem({\r\n i18n,\r\n budget,\r\n canEdit,\r\n campaignType: currentCampaignType,\r\n campaignSubType,\r\n campaignId: id,\r\n summaryBarActivityLogger,\r\n experimentId,\r\n scope,\r\n permissions,\r\n siteMap,\r\n }),\r\n ...sharedEntityItems({\r\n i18n, ...other, canEdit, currentCampaignType, scope, permissions, siteMap, campaignSubType,\r\n }),\r\n];\r\n\r\nexport const adGroupEntityItems = ({\r\n status,\r\n bid,\r\n bidStrategy,\r\n displayBiddingStrategyType,\r\n i18n,\r\n changeStatus,\r\n canEdit,\r\n updateBid,\r\n currentCampaignType,\r\n permissions,\r\n scope,\r\n siteMap,\r\n summaryBarActivityLogger,\r\n predictiveTargeting,\r\n dealMinimumBid,\r\n ...other\r\n}) => [\r\n statusEntityItem(i18n, { changeStatus, status }, false, i18n.getString(_TL_('Ad group status'))),\r\n bidEntityItem({\r\n i18n,\r\n bid,\r\n bidStrategy,\r\n displayBiddingStrategyType,\r\n canEdit,\r\n campaignType: currentCampaignType,\r\n campaignSubType: other.campaignSubType,\r\n updateBid,\r\n summaryBarActivityLogger,\r\n permissions,\r\n dealMinimumBid,\r\n }),\r\n ...sharedEntityItems({\r\n i18n, ...other, canEdit, currentCampaignType, scope, permissions, siteMap, isAdGroup: true, bidStrategy, predictiveTargeting,\r\n }),\r\n];\r\n\r\nexport const experimentAdGroupEntityItems = ({\r\n status,\r\n bid,\r\n bidStrategy,\r\n displayBiddingStrategyType,\r\n i18n,\r\n changeStatus,\r\n canEdit,\r\n updateBid,\r\n currentCampaignType,\r\n permissions,\r\n scope,\r\n siteMap,\r\n summaryBarActivityLogger,\r\n ...other\r\n}) => [\r\n statusEntityItem(i18n, { changeStatus, status }, true, i18n.getString(_TL_('Ad group status'))),\r\n bidEntityItem({\r\n i18n,\r\n bid,\r\n bidStrategy,\r\n displayBiddingStrategyType,\r\n canEdit,\r\n campaignType: currentCampaignType,\r\n updateBid,\r\n summaryBarActivityLogger,\r\n permissions,\r\n }),\r\n ...sharedEntityItems({\r\n i18n, ...other, canEdit, currentCampaignType, scope, permissions, siteMap, isAdGroup: true, bidStrategy,\r\n }),\r\n];\r\n","import React from 'react';\r\nimport { notificationApi } from '@bingads-webui-campaign/notification-center';\r\nimport { shellTips } from '@bingads-webui-campaign-react/shell-ui-common';\r\n\r\nexport const audienceErrorHandler = (WrappedComponent, i18n) => (err) => {\r\n const errorCode = err.errors && err.errors[0].Code;\r\n const isUserError = (errorCode === 'TooMuchDataToDownload');\r\n if (!isUserError) {\r\n notificationApi.showWarning(i18n.getString(shellTips.shellDataError));\r\n }\r\n\r\n return ();\r\n};\r\n","import _ from 'underscore';\r\nimport { notificationApi } from '@bingads-webui-campaign/notification-center';\r\nimport { getBulkApiErrors, getODataErrors } from '@bingads-webui-campaign/api-errors';\r\n\r\nconst getUnexpectedError = i18n => ([{\r\n message: i18n.getString(_TL_(\"We've encountered an error and could not finish this task. Please try again or contact support.\")),\r\n}]);\r\n\r\nexport const getBulkEditResponseErrors = (response, i18n, scenario) => {\r\n if (!response || !response.errors) {\r\n return getUnexpectedError(i18n);\r\n }\r\n\r\n const errors = getBulkApiErrors(response.errors, scenario, i18n);\r\n\r\n if (!errors || !errors[0] || !errors[0].message) {\r\n return getUnexpectedError(i18n);\r\n }\r\n\r\n // error is a api error class\r\n return _.map(errors, error => ({ message: error.message }));\r\n};\r\n\r\nexport const getOdataResponseErrors = (response, i18n) => {\r\n if (!response || !response.errors) {\r\n return getUnexpectedError(i18n);\r\n }\r\n\r\n const errors = getODataErrors(response.errors, i18n);\r\n\r\n if (!errors || !errors[0] || !errors[0].message) {\r\n return getUnexpectedError(i18n);\r\n }\r\n\r\n // error is a api error class\r\n return _.map(errors, error => ({ message: error.message }));\r\n};\r\n\r\n// we need this for some edit function without editor, like status change\r\nexport const showErrorWithAlertCenter = (response, i18n) => {\r\n const serverErrors = getBulkEditResponseErrors(response, i18n);\r\n const error = serverErrors.length && serverErrors[0] && serverErrors[0].message;\r\n // use alert center to show status ;change error\r\n if (error) {\r\n notificationApi.showWarning(error);\r\n }\r\n};\r\n","import { findWhere, result, extend } from 'underscore';\r\nimport { Scope } from '@bingads-webui-campaign-react/shell-ui-common';\r\nimport {\r\n breadcrumbClickHandler,\r\n campaignTypes,\r\n summaryBarScopes,\r\n} from './index';\r\n\r\nexport const convertToBreadCrumbItems = ({\r\n campaignName = '',\r\n campaignId = null,\r\n adGroupName = '',\r\n adGroupId = null,\r\n adName = '',\r\n campaignType,\r\n scope,\r\n siteMap,\r\n i18n,\r\n summaryBarActivityLogger,\r\n setClarityTag = null,\r\n}) => {\r\n const items = [];\r\n\r\n let currentScope = Scope.Account;\r\n const changeScopeActivity = summaryBarActivityLogger\r\n && summaryBarActivityLogger.changeScopeActivity.create();\r\n\r\n if (adName) {\r\n currentScope = Scope.Ad;\r\n } else if (adGroupId && adGroupName) {\r\n currentScope = Scope.AdGroup;\r\n } else if (campaignId && campaignName) {\r\n currentScope = Scope.Campaign;\r\n }\r\n\r\n const onBreadcrumbClick = (breadcrumbScope) => {\r\n if (breadcrumbScope === currentScope && currentScope !== Scope.Account) {\r\n return null;\r\n }\r\n\r\n return () => {\r\n if (setClarityTag) {\r\n setClarityTag();\r\n }\r\n breadcrumbClickHandler(breadcrumbScope, scope, siteMap);\r\n if (changeScopeActivity) {\r\n changeScopeActivity.trace({\r\n scope: breadcrumbScope, // Summary bar has no way to change scope to AdGroup.\r\n component: 'Summary Bar',\r\n campaignType,\r\n });\r\n }\r\n };\r\n };\r\n\r\n // add campaign type breadcrumb item\r\n const currentCampaignType = findWhere(campaignTypes, { id: campaignType });\r\n const campaignTypeI18nText = i18n.getString(result(currentCampaignType, 'i18nKey'));\r\n\r\n let currentBreadcrumb = `navigate-${summaryBarScopes.campaignType.id}`;\r\n\r\n items.push({\r\n key: currentBreadcrumb,\r\n text: campaignTypeI18nText,\r\n onClick: onBreadcrumbClick(Scope.Account),\r\n 'aria-label': campaignTypeI18nText,\r\n });\r\n\r\n // add campaign breadcrumb item\r\n if (campaignId && campaignName) {\r\n currentBreadcrumb = `navigate-${summaryBarScopes.campaign.id}`;\r\n items.push({\r\n key: currentBreadcrumb,\r\n text: campaignName,\r\n onClick: onBreadcrumbClick(Scope.Campaign),\r\n 'aria-label': campaignName,\r\n });\r\n }\r\n\r\n // add ad group breadcrumb item\r\n if (adGroupId && adGroupName) {\r\n if (!(campaignId && campaignName)) {\r\n // TODO: discuss with raymond, how we handle throw in new UX\r\n throw new Error('Ad group parent node(campaign) information is missing');\r\n }\r\n currentBreadcrumb = `navigate-${summaryBarScopes.adGroup.id}`;\r\n items.push({\r\n key: currentBreadcrumb,\r\n text: adGroupName,\r\n onClick: onBreadcrumbClick(Scope.AdGroup),\r\n 'aria-label': adGroupName,\r\n });\r\n }\r\n\r\n // add ad name breadcrumb item\r\n if (adName) {\r\n if (!(adGroupId && adGroupName)) {\r\n // TODO: discuss with raymond, how we handle throw in new UX\r\n throw new Error('Ad parent node (ad group) information is missing');\r\n }\r\n currentBreadcrumb = `navigate-${summaryBarScopes.ad.id}`;\r\n items.push({\r\n key: currentBreadcrumb,\r\n text: adName,\r\n 'aria-label': adName,\r\n });\r\n }\r\n\r\n extend(\r\n findWhere(items, { key: currentBreadcrumb }),\r\n { isCurrentItem: true }\r\n );\r\n\r\n return items;\r\n};\r\n\r\n","import React from 'react';\r\nimport { result } from 'underscore';\r\nimport { curlyTemplate } from '@bingads-webui-universal/primitive-utilities';\r\nimport { Breadcrumb } from '@bingads-webui-react/breadcrumb';\r\nimport { Glyphicon } from '@bingads-webui-react/primitive';\r\n\r\n\r\nexport class SharedBudgetConsumer {\r\n constructor({ scope, i18n, budget }) {\r\n this.scope = scope;\r\n this.i18n = i18n;\r\n this.budget = budget;\r\n }\r\n\r\n get criteriaRenderer() {\r\n return {\r\n renderSharedBudgetAmount: this.renderSharedBudgetAmount,\r\n renderSharedBudgetType: this.renderSharedBudgetType,\r\n renderSharedBudgetBreadCrumb: this.renderSharedBudgetBreadCrumb,\r\n };\r\n }\r\n\r\n renderSharedBudgetAmount = ({ canEdit } = {}) => {\r\n const amount = this.budget.Amount;\r\n return (\r\n
\r\n {curlyTemplate(this.i18n.getString(_TL_('{{budget}}/day')))({ budget: amount.toFixed(2) })}\r\n {canEdit ? (\r\n \r\n ) : null}\r\n
\r\n );\r\n };\r\n\r\n renderSharedBudgetType = () => {\r\n const typeLocalize = result({\r\n Accelerated: this.i18n.getString(_TL_('Accelerated')),\r\n DailyStandard: this.i18n.getString(_TL_('Standard')),\r\n }, this.budget.Type);\r\n\r\n return (
{typeLocalize}
);\r\n }\r\n\r\n renderSharedBudgetBreadCrumb = () => {\r\n const items = [{\r\n key: 'shared-library',\r\n text: this.i18n.getString(_TL_('Shared library')),\r\n }, {\r\n key: 'shared-budgets',\r\n text: this.i18n.getString(_TL_('Shared budgets')),\r\n onClick: () => {\r\n this.scope.remove('budgetId');\r\n this.scope.save('/campaign/vnext/sharedbudgets');\r\n },\r\n }, {\r\n key: 'shared-budget-name',\r\n text: this.budget.Name,\r\n isCurrentItem: true,\r\n }];\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n };\r\n}\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { CampaignOData } from '@bingads-webui-react/campaign-odata';\r\nimport { notificationApi } from '@bingads-webui-campaign/notification-center';\r\nimport { shellTips } from '@bingads-webui-campaign-react/shell-ui-common';\r\n\r\n// campaign by id api don't return delivery status information\r\nexport const WithCampaignRepository = ({\r\n campaignLoadFallback, WrappedComponent, i18n,\r\n}) => (\r\n currentAccount.Campaigns.get({\r\n // finally this would become $expand=Budget&$select=Id,Name,Status,CampaignType,BiddingScheme,ExperimentId,CampaignSubType\r\n top: 1,\r\n filter: { where: `Id eq ${currentCampaign.navigation.key}` },\r\n select: [\r\n 'Id',\r\n 'Name',\r\n 'Status',\r\n 'CampaignType',\r\n 'DeliveryStatus',\r\n 'DeliveryStatusDetails',\r\n 'Budget',\r\n 'BiddingScheme',\r\n 'ExperimentId',\r\n 'CampaignSubType',\r\n ],\r\n })\r\n }\r\n escapeHatch={({ currentCampaign }) => (currentCampaign ? undefined : null)}\r\n fallback={campaignLoadFallback}\r\n onError={() => {\r\n notificationApi.showWarning(i18n.getString(shellTips.shellDataError));\r\n return campaignLoadFallback;\r\n }}\r\n >\r\n { campaignFromOData =>\r\n ( 0 ? campaignFromOData.value[0] : null} />) }\r\n \r\n);\r\n\r\nWithCampaignRepository.propTypes = {\r\n campaignLoadFallback: PropTypes.element.isRequired,\r\n WrappedComponent: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { CampaignOData } from '@bingads-webui-react/campaign-odata';\r\nimport { notificationApi } from '@bingads-webui-campaign/notification-center';\r\nimport { shellTips } from '@bingads-webui-campaign-react/shell-ui-common';\r\n\r\nexport const WithAdGroupRepository = ({\r\n campaignLoadFallback, WrappedComponent, i18n, ...passThroughProps\r\n}) => (\r\n currentAdGroup.get({\r\n // finally this would become $expand=Campaign&$select=Id,Name,EntityStatus,SearchBid,BiddingSchema,DisplayBiddingStrategyType,Medium\r\n select: ['Id', 'Name', 'EntityStatus', 'SearchBid', 'CpvBid', 'CpmBid', 'CpcBid', 'BiddingScheme', 'DisplayBiddingStrategyType', 'Medium', 'UseOptimizedTargeting', 'DealMinimumBid'],\r\n })\r\n }\r\n escapeHatch={({ currentAdGroup }) => (currentAdGroup ? undefined : null)}\r\n fallback={campaignLoadFallback}\r\n onError={() => {\r\n notificationApi.showWarning(i18n.getString(shellTips.shellDataError));\r\n return campaignLoadFallback;\r\n }}\r\n >\r\n {adGroupFromOData =>\r\n ()}\r\n \r\n);\r\n\r\nWithAdGroupRepository.propTypes = {\r\n campaignLoadFallback: PropTypes.element.isRequired,\r\n WrappedComponent: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { CampaignOData } from '@bingads-webui-react/campaign-odata';\r\nimport { notificationApi } from '@bingads-webui-campaign/notification-center';\r\nimport { shellTips } from '@bingads-webui-campaign-react/shell-ui-common';\r\n\r\nexport const WithExperimentRepository = ({\r\n campaignLoadFallback, experimentId, WrappedComponent, i18n, ...passThroughProps\r\n}) => (\r\n currentAccount.Experiments.$withKey(experimentId).get({\r\n select: [\r\n 'Id',\r\n 'EndDate',\r\n 'StartDate',\r\n 'ExperimentType',\r\n 'ExperimentName',\r\n 'ExperimentCampaignId',\r\n 'BaseCampaignId',\r\n 'BaseCampaignName',\r\n 'Status',\r\n 'TrafficSplitPercent',\r\n ],\r\n })}\r\n escapeHatch={() => (experimentId ? undefined : null)}\r\n fallback={campaignLoadFallback}\r\n onError={() => {\r\n notificationApi.showWarning(i18n.getString(shellTips.shellDataError));\r\n return campaignLoadFallback;\r\n }}\r\n >\r\n { experimentFromOData =>\r\n () }\r\n \r\n);\r\n\r\nWithExperimentRepository.propTypes = {\r\n campaignLoadFallback: PropTypes.element.isRequired,\r\n experimentId: PropTypes.number.isRequired,\r\n WrappedComponent: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { CampaignOData } from '@bingads-webui-react/campaign-odata';\r\nimport { notificationApi } from '@bingads-webui-campaign/notification-center';\r\nimport { shellTips } from '@bingads-webui-campaign-react/shell-ui-common';\r\n\r\nexport const WithSharedBudgetRepository = ({\r\n campaignLoadFallback, budgetId, WrappedComponent, i18n, ...passThroughProps\r\n}) => (\r\n {\r\n const currentBudget = currentAccount.Budgets.$withKey(budgetId);\r\n return currentBudget.get();\r\n }}\r\n fallback={campaignLoadFallback}\r\n onError={() => {\r\n notificationApi.showWarning(i18n.getString(shellTips.shellDataError));\r\n return campaignLoadFallback;\r\n }}\r\n >\r\n { sharedBudgetFromOData =>\r\n () }\r\n \r\n);\r\n\r\nWithSharedBudgetRepository.propTypes = {\r\n campaignLoadFallback: PropTypes.element.isRequired,\r\n budgetId: PropTypes.number.isRequired,\r\n WrappedComponent: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { CampaignOData } from '@bingads-webui-react/campaign-odata';\r\nimport { notificationApi } from '@bingads-webui-campaign/notification-center';\r\nimport { shellTips } from '@bingads-webui-campaign-react/shell-ui-common';\r\n\r\nexport const WithCampaignCriterionRepository = ({\r\n WrappedComponent, i18n,\r\n}) => (\r\n currentCampaign.CampaignCriterions.$cast('Model.CampaignCriterion').get({\r\n filter: { where: \"isof(Criterion,'Model.LocationCriterion') or isof(Criterion,'Model.RadiusCriterion') or isof(Criterion,'Model.DeviceCriterion')\" },\r\n })\r\n }\r\n escapeHatch={({ currentCampaign }) => (currentCampaign ? undefined : null)}\r\n fallback={()}\r\n onError={() => {\r\n notificationApi.showWarning(i18n.getString(shellTips.shellDataError));\r\n return ();\r\n }}\r\n >\r\n { campaignCriterionFromOData =>\r\n () }\r\n \r\n);\r\n\r\nWithCampaignCriterionRepository.propTypes = {\r\n WrappedComponent: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { CampaignOData } from '@bingads-webui-react/campaign-odata';\r\nimport { notificationApi } from '@bingads-webui-campaign/notification-center';\r\nimport { shellTips } from '@bingads-webui-campaign-react/shell-ui-common';\r\n\r\nexport const WithAdGroupCriterionRepository = ({\r\n WrappedComponent, i18n, ...passThroughProps\r\n}) => (\r\n currentAdGroup.AdGroupCriterions.$cast('Model.AdGroupCriterion').get({\r\n filter: { where: \"isof(Criterion,'Model.LocationCriterion') or isof(Criterion,'Model.RadiusCriterion') or isof(Criterion,'Model.DeviceCriterion')\" },\r\n })\r\n }\r\n escapeHatch={({ currentAdGroup }) => (currentAdGroup ? undefined : null)}\r\n fallback={()}\r\n onError={() => {\r\n notificationApi.showWarning(i18n.getString(shellTips.shellDataError));\r\n return ();\r\n }}\r\n >\r\n { adGroupCriterionFromOData =>\r\n () }\r\n \r\n);\r\n\r\nWithAdGroupCriterionRepository.propTypes = {\r\n WrappedComponent: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { CampaignOData } from '@bingads-webui-react/campaign-odata';\r\nimport { audienceErrorHandler } from '../helpers';\r\n\r\nexport const WithCampaignAudienceRepository = ({\r\n WrappedComponent, i18n,\r\n}) => (\r\n currentCampaign.AudienceAssociations['Default.GridData'].$makeCall({\r\n query: {\r\n top: 3,\r\n select: ['AudienceCriterion', 'Level'],\r\n orderby: { 'AudienceCriterion/AudienceName': -1 },\r\n },\r\n payload: {\r\n gridDataParameters: {\r\n DateRange: {\r\n StartDate: i18n.formatDate(new Date(), {\r\n raw: 'yyyy-MM-dd',\r\n }),\r\n EndDate: i18n.formatDate(new Date(), {\r\n raw: 'yyyy-MM-dd',\r\n }),\r\n },\r\n },\r\n },\r\n })\r\n }\r\n escapeHatch={({ currentCampaign }) => (currentCampaign ? undefined : null)}\r\n fallback={()}\r\n onError={audienceErrorHandler(WrappedComponent, i18n)}\r\n >\r\n { audienceFromOData =>\r\n () }\r\n \r\n);\r\n\r\nWithCampaignAudienceRepository.propTypes = {\r\n WrappedComponent: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { CampaignOData } from '@bingads-webui-react/campaign-odata';\r\nimport { audienceErrorHandler } from '../helpers';\r\n\r\nexport const WithAdGroupAudienceRepository = ({\r\n WrappedComponent, i18n,\r\n}) => (\r\n currentAdGroup.AudienceAssociations['Default.GridData'].$makeCall({\r\n query: {\r\n top: 3,\r\n select: ['AudienceCriterion', 'Level'],\r\n orderby: { 'AudienceCriterion/AudienceName': -1 },\r\n },\r\n payload: {\r\n gridDataParameters: {\r\n DateRange: {\r\n StartDate: i18n.formatDate(new Date(), {\r\n raw: 'yyyy-MM-dd',\r\n }),\r\n EndDate: i18n.formatDate(new Date(), {\r\n raw: 'yyyy-MM-dd',\r\n }),\r\n },\r\n },\r\n },\r\n })\r\n }\r\n escapeHatch={({ currentAdGroup }) => (currentAdGroup ? undefined : null)}\r\n fallback={()}\r\n onError={audienceErrorHandler(WrappedComponent, i18n)}\r\n >\r\n { audienceFromOData =>\r\n () }\r\n \r\n);\r\n\r\nWithAdGroupAudienceRepository.propTypes = {\r\n WrappedComponent: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n};\r\n","export const WithBulkUpdateRepository = ({\r\n patch, scope, edmCampaign, updateLevel, budgetId,\r\n}) => {\r\n const {\r\n values: {\r\n cid, aid, adGroupId, campaignId, budgetId: budgetIdFromScope,\r\n },\r\n } = scope;\r\n\r\n const currentEntity = edmCampaign\r\n .Customers\r\n .$withKey(cid)\r\n .Accounts\r\n .$withKey(aid);\r\n\r\n if (updateLevel === 'Budget') {\r\n const updatedBudgetId = budgetId || budgetIdFromScope;\r\n\r\n return currentEntity.Budgets\r\n .$withKey(updatedBudgetId)\r\n .bulkUpdate({\r\n Id: updatedBudgetId,\r\n ...patch,\r\n });\r\n } else if (updateLevel === 'Campaign') {\r\n return currentEntity.Campaigns\r\n .$withKey(campaignId)\r\n .bulkUpdate({\r\n Id: campaignId,\r\n ...patch,\r\n });\r\n }\r\n\r\n return currentEntity.AdGroups\r\n .$withKey(adGroupId)\r\n .bulkUpdate({\r\n Id: adGroupId,\r\n Campaign: { Id: campaignId },\r\n ...patch,\r\n });\r\n};\r\n","export const WithPatchExperimentRepository = ({\r\n patch, experimentId, scope, edmCampaign,\r\n}) => {\r\n const {\r\n values: {\r\n cid, aid,\r\n },\r\n } = scope;\r\n\r\n const currentEntity = edmCampaign\r\n .Customers\r\n .$withKey(cid)\r\n .Accounts\r\n .$withKey(aid);\r\n\r\n return currentEntity.Experiments\r\n .update(experimentId, patch);\r\n};\r\n","import _ from 'underscore';\r\nimport React, { useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n RecommendationService,\r\n CHANNEL_TYPES,\r\n} from '@bingads-webui-campaign/recommendation-core';\r\nimport featureInstrumentation from '@bingads-webui-campaign-legacy/instrumentation/index';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport { QueryParam } from '@bingads-webui-react/scope-service';\r\nimport { levelAtConstant } from '@bingads-webui-campaign/scope-constants';\r\n\r\nconst RECOMMENDATION_SUMMARY_TOP_NUMBER = 5;\r\nconst permissions = config.get('Permissions') || {};\r\nconst schema = {\r\n scenario: [\r\n {\r\n name: 'loadRecommendationTile',\r\n value: 'LoadRecommendationTab',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'loadRecommendationTile',\r\n value: 'LoadRecommendationTile',\r\n },\r\n {\r\n name: 'getSummary',\r\n value: 'getSummary',\r\n },\r\n {\r\n name: 'getCoupons',\r\n value: 'getCoupons',\r\n },\r\n ],\r\n },\r\n ],\r\n};\r\n\r\nexport const WithOptimizationScoreRepository = ({\r\n WrappedComponent, scope, ...passThroughProps\r\n}) => {\r\n const [osData, setOsData] = useState({});\r\n const {\r\n aid, campaignId, cid, adGroupId,\r\n } = scope.values;\r\n const { campaignFromOData } = passThroughProps;\r\n const campaignType = campaignFromOData ? campaignFromOData.CampaignType : 'Default';\r\n\r\n useEffect(() => {\r\n if (!campaignId || adGroupId) {\r\n return;\r\n }\r\n\r\n featureInstrumentation.addScenario(schema);\r\n const currentScenario = featureInstrumentation.loadRecommendationTile.create();\r\n const currentActivity = currentScenario.loadRecommendationTile.create();\r\n\r\n const dataService = new RecommendationService({\r\n scope: {\r\n customerId: cid,\r\n accountId: aid,\r\n campaignId,\r\n campaignName: _.result(config.get('CurrentCampaign'), 'Name'),\r\n token: config.get('Token'),\r\n levelAt: levelAtConstant.CAMPAIGN,\r\n entityIds: [campaignId],\r\n },\r\n currentScenario,\r\n currentActivity,\r\n odataPath: config.get('adinsight.odata.url'),\r\n permissions,\r\n lcid: pageContext.CultureLcid,\r\n isNoExpand: true,\r\n channel: CHANNEL_TYPES.CAMPAIGN_SUMMARY_BAR,\r\n });\r\n\r\n dataService.getSummary({\r\n channel: CHANNEL_TYPES.CAMPAIGN_SUMMARY_BAR,\r\n campaignType,\r\n top: RECOMMENDATION_SUMMARY_TOP_NUMBER,\r\n ignoreCoupons: true,\r\n }).then((response) => {\r\n const { data } = response;\r\n\r\n setOsData(data);\r\n });\r\n }, [adGroupId, aid, campaignId, campaignType, cid]);\r\n\r\n return ();\r\n};\r\n\r\nWithOptimizationScoreRepository.propTypes = {\r\n WrappedComponent: PropTypes.func.isRequired,\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n};\r\n","export const getBaseEditorStyle = () => ({\r\n content: {\r\n flex: 1,\r\n overflowY: 'auto',\r\n overflowX: 'hidden',\r\n height: '100%',\r\n },\r\n formFooter: {\r\n paddingTop: '15px',\r\n },\r\n cancelButton: {\r\n marginLeft: '8px',\r\n },\r\n saveButton: {\r\n '&.btn-default': {\r\n color: '#ffffff',\r\n backgroundColor: '#0078d4',\r\n },\r\n '&.btn-default[disabled]': {\r\n backgroundColor: '#f3f2f1',\r\n color: '#323130',\r\n },\r\n },\r\n});\r\n","import { datePickerStyle } from '@bingads-webui-campaign-react/common-styles';\r\n\r\nconst calloutCloseButtonStyle = {\r\n top: 9,\r\n right: 8,\r\n width: 12,\r\n border: 0,\r\n height: 13,\r\n padding: 0,\r\n position: 'absolute',\r\n background: 'inherit',\r\n minWidth: 12,\r\n};\r\n\r\nexport const getSummaryBarStyle = (_, { palette = {} }) => ({\r\n '@global': {\r\n ...datePickerStyle({ palette }),\r\n '.summary-bar-items > div': {\r\n '& > div:nth-child(2)': {\r\n minHeight: '0px !important',\r\n },\r\n '& .iconba-Edit': {\r\n opacity: 0,\r\n },\r\n '& .entity-multi-content': {\r\n maxWidth: '180px !important',\r\n '& .entity-first-item': {\r\n minWidth: '20px',\r\n },\r\n },\r\n '&:hover, &:active, &:focus': {\r\n background: 'transparent !important',\r\n },\r\n '&.editable': {\r\n '& > div:focus': {\r\n '& .iconba-Edit': {\r\n opacity: 1,\r\n },\r\n },\r\n '&:hover, &:active, &:focus': {\r\n backgroundColor: '#e1dfdd !important',\r\n '& .iconba-Edit': {\r\n opacity: 1,\r\n },\r\n },\r\n cursor: 'pointer',\r\n '& .entity-content-settings': {\r\n paddingTop: '11px',\r\n paddingBottom: '10px',\r\n },\r\n },\r\n },\r\n '#summary-bar-campaign-inline-budget-editor': {\r\n minWidth: '500px',\r\n '& .bingads-webui-react-callout-close-button': calloutCloseButtonStyle,\r\n },\r\n '#summary-bar-shared-budget-editor, #summary-bar-campaign-shared-budget-editor': {\r\n minWidth: '280px',\r\n maxWidth: '500px',\r\n '& .bingads-webui-react-callout-close-button': calloutCloseButtonStyle,\r\n '& .popover-title': {\r\n wordBreak: 'break-word',\r\n },\r\n },\r\n '#summary-bar-campaign-experiment-budget-editor': {\r\n width: '280px',\r\n '& .bingads-webui-react-callout-close-button': calloutCloseButtonStyle,\r\n },\r\n '#summary-bar-adgroup-bid-editor': {\r\n minWidth: '255px',\r\n },\r\n '#summary-bar-experiment-campaign-end-editor, #summary-bar-experiment-campaign-start-editor': {\r\n minWidth: '400px',\r\n },\r\n '.summary-bar-experiment-split-option span.entity-label': {\r\n marginTop: '3px',\r\n },\r\n '.summary-bar-original-campaign .entity-link': {\r\n '&:hover, &:active, &:focus': {\r\n '& .entity-text': {\r\n color: '#0078d4 !important',\r\n },\r\n },\r\n },\r\n '.alert-info-inline': {\r\n '& a': {\r\n color: '#106ebe',\r\n },\r\n },\r\n '.summary-bar-contextual-menu-popover-close-button': {\r\n top: '9px',\r\n width: '12px',\r\n right: '8px',\r\n border: '0',\r\n height: '13px',\r\n padding: '0',\r\n position: 'absolute',\r\n maxWidth: '12px',\r\n minWidth: '12px',\r\n background: 'inherit',\r\n maxHeight: '13px',\r\n minHeight: '13px',\r\n },\r\n '.summary-bar-contextual-menu-popover-button': {\r\n background: 'transparent',\r\n border: 'none',\r\n width: '100%',\r\n padding: '7px 10px',\r\n },\r\n '.overflow-entity-items': {\r\n '& .ms-ContextualMenu-Callout': {\r\n maxWidth: '250px',\r\n '& > .ms-Callout-main': {\r\n overflow: 'visible',\r\n },\r\n '& .ms-ContextualMenu-link': {\r\n '&:focus': {\r\n '& .overflow-item.editable': {\r\n backgroundColor: '#f3f2f1',\r\n '& .iconba-Edit': {\r\n opacity: 1,\r\n },\r\n },\r\n },\r\n padding: '0px',\r\n '& .overflow-item': {\r\n '&.editable': {\r\n '&:hover, &:active, &:focus': {\r\n textDecoration: 'none',\r\n backgroundColor: '#f3f2f1',\r\n '& .iconba-Edit': {\r\n opacity: 1,\r\n },\r\n cursor: 'pointer',\r\n },\r\n },\r\n '& .entity-icon': {\r\n fontSize: '16px',\r\n color: '#106EBE',\r\n display: 'inline-block',\r\n },\r\n width: '100%',\r\n color: '#323130',\r\n padding: '0px 10px',\r\n minWidth: '170px',\r\n alignItems: 'center',\r\n '& .entity-label': {\r\n whiteSpace: 'nowrap',\r\n overflow: 'hidden',\r\n textOverflow: 'ellipsis',\r\n },\r\n },\r\n },\r\n },\r\n },\r\n '.summary-bar-status': {\r\n '& .status-dropdown': {\r\n paddingTop: '2px',\r\n paddingBottom: '2px',\r\n },\r\n },\r\n '.summary-bar-overall-score': {\r\n display: 'flex',\r\n '& .summary-bar-overall-score-value': {\r\n marginLeft: '3px',\r\n marginRight: '10px',\r\n fontWeight: 600,\r\n fontSize: 12,\r\n color: palette.themePrimary,\r\n },\r\n '& .summary-bar-overall-score-chart': {\r\n marginTop: '2px',\r\n },\r\n '& .summary-bar-overall-score-none': {\r\n paddingLeft: '4px',\r\n },\r\n },\r\n },\r\n});\r\n","export const getBudgetEditorStyle = () => ({\r\n form: {\r\n fontSize: '14px !important',\r\n '& .error': {\r\n color: '#a80000',\r\n },\r\n '& .budget-amount-editor': {\r\n '& .budget-input': {\r\n '& input': {\r\n width: 'auto',\r\n display: 'inline-block',\r\n marginRight: '10px',\r\n verticalAlign: 'top',\r\n },\r\n '& div[role=\"alert\"]': {\r\n marginTop: 5,\r\n },\r\n },\r\n '& .shared-budget-edit-budget-message-per-day': {\r\n position: 'absolute',\r\n left: 205,\r\n whiteSpace: 'nowrap',\r\n margin: '6px 12px',\r\n },\r\n },\r\n '& .budget-type-container': {\r\n paddingTop: '16px',\r\n marginRight: '32px',\r\n marginBottom: '5px',\r\n },\r\n '& .budget-editor-with-landscape': {\r\n marginRight: '24px',\r\n\r\n '& .budget-type-container': {\r\n borderTop: '1px solid #CCCCCC',\r\n marginTop: '10px',\r\n },\r\n '& .landscape-table': {\r\n '& .tip-message, & .error-message': {\r\n '& span.iconba-Warning': {\r\n marginRight: '5px',\r\n color: '#D83B01',\r\n },\r\n marginBottom: '16px',\r\n marginTop: '16px',\r\n marginLeft: '8px',\r\n },\r\n '& table': {\r\n width: '100%',\r\n '& input': {\r\n marginRight: '8px',\r\n },\r\n '& input[type=\\'radio\\']': {\r\n position: 'relative',\r\n marginLeft: '4px',\r\n },\r\n '& th, & td': {\r\n '&.selected': {\r\n background: 'rgba(237, 237, 237, 0.5)',\r\n },\r\n },\r\n '& td.user-input-cell': {\r\n paddingLeft: '1px',\r\n },\r\n '& tr': {\r\n height: '32px',\r\n },\r\n '& th': {\r\n '&.selected': {\r\n color: '#333',\r\n fontWeight: '500',\r\n },\r\n },\r\n '& td:last-child': {\r\n paddingRight: '5px',\r\n },\r\n '& .user-input': {\r\n display: 'inline',\r\n position: 'relative',\r\n '& .currency-symbol': {\r\n position: 'absolute',\r\n top: '-1px',\r\n left: '6px',\r\n color: '#666666',\r\n },\r\n '& input': {\r\n paddingLeft: '16px',\r\n borderWidth: '1px',\r\n borderColor: '#BBB',\r\n },\r\n '& .symbol-size-2 + input': {\r\n paddingLeft: '25px',\r\n },\r\n '& .symbol-size-3 + input': {\r\n paddingLeft: '35px',\r\n },\r\n '& .error': {\r\n color: '#A80000 !important',\r\n fontSize: 'inherit',\r\n },\r\n },\r\n '& tbody': {\r\n '& tr.selected': {\r\n backgroundColor: '#F3F2F1',\r\n },\r\n },\r\n '& thead': {\r\n '& span': {\r\n fontWeight: '500',\r\n },\r\n },\r\n },\r\n },\r\n },\r\n '& .inline-budget-edit-type': {\r\n marginTop: '5px',\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","export const getBidEditorStyle = () => ({\r\n form: {\r\n fontSize: '14px !important',\r\n '& .error': {\r\n color: '#a80000',\r\n },\r\n '& .search-bid-editor': {\r\n '& .bid-input': {\r\n '& input': {\r\n width: 'auto',\r\n display: 'inline-block',\r\n marginRight: '10px',\r\n verticalAlign: 'top',\r\n },\r\n '& div[role=\"alert\"]': {\r\n marginTop: 5,\r\n },\r\n '& .input-addon': {\r\n position: 'absolute',\r\n left: 195,\r\n whiteSpace: 'nowrap',\r\n margin: '6px 12px',\r\n },\r\n },\r\n '& .bidWarning': {\r\n marginTop: 6,\r\n },\r\n },\r\n },\r\n});\r\n","export const getDateEditorStyle = () => ({\r\n form: {\r\n fontSize: '14px !important',\r\n '& .error': {\r\n color: '#a80000',\r\n },\r\n '& .campaigns-date-picker': {\r\n '& .radioInput': {\r\n width: 'auto',\r\n '& .date + div': {\r\n width: '8em',\r\n },\r\n '& input[type=\"radio\"]': {\r\n marginRight: '7.5px',\r\n outline: 'none !important',\r\n position: 'relative',\r\n marginLeft: '2px',\r\n '&:focus': {\r\n outline: '1px solid #605e5c !important',\r\n },\r\n },\r\n '& label': {\r\n display: 'inline-block',\r\n top: '-5px',\r\n position: 'relative',\r\n margin: '0 2px',\r\n fontWeight: '400',\r\n },\r\n },\r\n },\r\n },\r\n});\r\n","export const getSimpleSummaryBarStyle = () => ({\r\n '@global': {\r\n '.summary-bar-breadcrumb': {\r\n position: 'relative',\r\n '& .summary-bar-tag': {\r\n position: 'absolute',\r\n display: 'block',\r\n top: '6px',\r\n right: '-40px',\r\n },\r\n },\r\n },\r\n});\r\n","import { NeutralColors } from '@fluentui/react';\r\n\r\nexport const getBudgetCenterSummaryBarStyle = (_components, { palette }) => ({\r\n '@global': {\r\n '& .summary-bar-divider': {\r\n display: 'none',\r\n },\r\n },\r\n summaryBarContainer: {\r\n marginLeft: 'auto',\r\n marginRight: 95,\r\n },\r\n monthPickerSection: {\r\n height: '100%',\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n monthPickerButton: {\r\n width: 172,\r\n padding: '0px 4px',\r\n borderColor: NeutralColors.gray80,\r\n },\r\n monthPickerButtonText: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n color: palette.neutralSecondary,\r\n fontWeight: 400,\r\n },\r\n monthText: {\r\n fontSize: 14,\r\n lineHeight: '20px',\r\n whiteSpace: 'nowrap',\r\n overflow: 'hidden',\r\n textOverflow: 'ellipsis',\r\n maxWidth: 130,\r\n },\r\n calendarIcon: {\r\n fontSize: 16,\r\n lineHeight: '16px',\r\n marginLeft: 'auto',\r\n top: 0,\r\n },\r\n navigationIcons: {\r\n fontSize: 12,\r\n lineHeight: '12px',\r\n color: palette.neutralSecondary,\r\n '& button:not([disabled]):hover': {\r\n backgroundColor: palette.neutralLight,\r\n },\r\n '& button[disabled]': {\r\n color: palette.neutralTertiaryAlt,\r\n },\r\n },\r\n navigationIconButtonWrapper: {\r\n border: 'none',\r\n padding: 0,\r\n },\r\n navigationIcon: {\r\n padding: 8,\r\n top: 0,\r\n },\r\n monthPickerCallout: {\r\n paddingLeft: 20,\r\n paddingRight: 20,\r\n paddingTop: 20,\r\n backgroundColor: palette.white,\r\n '& .year-components .navContainer': {\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n alignItems: 'center',\r\n marginBottom: 12,\r\n },\r\n '& .isSelected': {\r\n backgroundColor: `${palette.themePrimary} !important`,\r\n color: palette.white,\r\n },\r\n },\r\n});\r\n","import $ from 'jquery';\r\nimport React from 'react';\r\n\r\nconst hideChartButtonLocator = '.app-shell-content ul.navbar-nav a.button-hide-graph';\r\nconst showChartButtonLocator = '.app-shell-content ul.navbar-nav a.button-show-graph';\r\n\r\nfunction hideChart() {\r\n /* istanbul ignore next */\r\n if ($(hideChartButtonLocator)[0]) {\r\n $(hideChartButtonLocator)[0].click();\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\nfunction restoreChart(isChartOpen) {\r\n /* istanbul ignore next */\r\n if (isChartOpen && $(showChartButtonLocator)[0]) {\r\n $(showChartButtonLocator)[0].click();\r\n } else if (!isChartOpen && $(hideChartButtonLocator)[0]) {\r\n $(hideChartButtonLocator)[0].click();\r\n }\r\n}\r\n\r\nexport function withToggleChart(Component) {\r\n return props => (\r\n \r\n );\r\n}\r\n","/* istanbul ignore file */\r\nimport { predicateValueEditorStyle, labelsCellItemStyle, labelsCellScopeStyle } from '@bingads-webui-campaign-react/common-styles';\r\nimport { Constants } from '@bingads-webui-theme-2018/theme-fluent';\r\n\r\nexport const getLabelStyle = ({ palette, semanticColors }) => ({\r\n '.labels-selector .column-tri-state-checkbox': {\r\n '& span:hover:before': {\r\n fontFamily: 'MsAds MDL2 Assets !important',\r\n paddingLeft: '1px',\r\n fontSize: 16,\r\n lineHeight: '16px',\r\n },\r\n },\r\n '.labels-selector.two-state-selector .column-tri-state-checkbox': {\r\n '& span:hover:before': {\r\n content: '\"\\\\E73E\"',\r\n },\r\n },\r\n '.labels-selector.tri-state-selector .column-tri-state-checkbox': {\r\n '& span:hover:before': {\r\n content: '\"\\\\E73C\"',\r\n },\r\n },\r\n '.dropdown.open .labels-selector': predicateValueEditorStyle.selector({ palette }),\r\n '.labels-selector .nameTemplate': {\r\n display: 'flex',\r\n transform: 'translateY(-1px)',\r\n ...labelsCellScopeStyle('16px', -1),\r\n },\r\n '.k-overlay': {\r\n position: 'fixed',\r\n top: '0',\r\n left: '0',\r\n zIndex: '800',\r\n width: '100%',\r\n height: '100%',\r\n backgroundColor: '#fff',\r\n opacity: '.4',\r\n filter: 'alpha(opacity=40)',\r\n },\r\n 'div.k-window': {\r\n width: '450px',\r\n display: 'block',\r\n position: 'absolute',\r\n zIndex: '999',\r\n background: semanticColors.bodyBackground,\r\n border: '1px solid #d9d9d9',\r\n boxShadow: '0 6.4px 14.4px 0 rgba(0,0,0,.132), 0 1.2px 3.6px 0 rgba(0,0,0,.108)',\r\n padding: '22px 24px 15px 24px',\r\n boxSizing: 'content-box',\r\n },\r\n 'div.k-window-content': {\r\n height: '100%',\r\n overflow: 'auto',\r\n },\r\n '.k-i-close:before': {\r\n content: '\"\\\\E711\"',\r\n },\r\n '.k-i-close': {\r\n fontFamily: '\"MsAds MDL2 Assets\"',\r\n fontSize: 14,\r\n fontStyle: 'normal',\r\n W: 'antialiased',\r\n M: 'grayscale',\r\n fontWeight: 'normal',\r\n lineHeight: '1',\r\n position: 'relative',\r\n },\r\n '.k-window-actions': {\r\n float: 'right',\r\n\r\n '& a.k-window-action.k-link.clickable:focus': {\r\n outline: 'auto',\r\n },\r\n },\r\n '.k-window-content.k-content': {\r\n '& a.HelpTopic:focus': {\r\n outline: 'auto',\r\n },\r\n '& .save-bar.segment-alert-ok': {\r\n '& input.btn-default:focus': {\r\n outline: 'auto',\r\n },\r\n },\r\n },\r\n 'span.k-window-title': {\r\n fontSize: 20,\r\n display: 'inline-block',\r\n },\r\n '.create-label': {\r\n paddingTop: 26,\r\n marginBottom: '0',\r\n\r\n '& .create-label__name-field': {\r\n boxSizing: 'border-box',\r\n },\r\n '& .create-label__actions': {\r\n marginTop: 20,\r\n marginBottom: 14,\r\n padding: 0,\r\n\r\n '& .create-label__action': {\r\n borderRadius: 2,\r\n },\r\n '& .create-label__action.btn-default': {\r\n marginLeft: 8,\r\n },\r\n },\r\n },\r\n '.k-window-titlebar.k-header': {\r\n paddingTop: 15,\r\n },\r\n '.popover-view': {\r\n background: '#ffffff',\r\n border: 'solid 1px #606060',\r\n },\r\n '.popover-view__content': {\r\n fontSize: 12,\r\n },\r\n '.popover-view.popup--labels': {\r\n width: 394,\r\n padding: '17px 28px 20px 24px',\r\n backgroundColor: '#FFFFFF',\r\n boxShadow: '0px 0px 6px rgba(0, 0, 0, 0.2)',\r\n border: 'none',\r\n position: 'relative',\r\n zIndex: Constants.ZIndexContentComponents.StatusPopup,\r\n },\r\n '.popup--labels .popup__close': {\r\n padding: 0,\r\n marginTop: -5,\r\n marginRight: -5,\r\n },\r\n\r\n '.popup--labels__entity-type': {\r\n fontWeight: 'bold',\r\n fontSize: 20,\r\n lineHeight: '28px',\r\n },\r\n '.popup--labels__entity-type + span': {\r\n fontWeight: 'bold',\r\n fontSize: 20,\r\n lineHeight: '28px',\r\n overflowWrap: 'break-word',\r\n },\r\n '.popup--labels__container': {\r\n marginTop: 10,\r\n ...labelsCellItemStyle(),\r\n },\r\n '.popup--labels__actions': {\r\n marginTop: 10,\r\n fontSize: 14,\r\n },\r\n});\r\n","/* eslint-disable max-len */\r\nimport React from 'react';\r\nimport { extend, pick, noop, defaults, isMatch, isEqual } from 'underscore';\r\nimport { withLayoutContext, Mode } from '@bingads-webui-react/app-layout-container';\r\nimport { notificationApi } from '@bingads-webui-campaign/notification-center';\r\nimport { withHotKeys, ShortcutType } from '@bingads-webui-react/hot-keys';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport PropTypes from 'prop-types';\r\nimport { ToolbarContainer as ToolbarContainerBase } from '@bingads-webui-grid/toolbar-container';\r\nimport { withToggleChart } from './with-toggle-chart';\r\nimport { getGlobalStyles } from './global-styles';\r\n\r\n\r\nconst getStyles = (_, { palette = {}, semanticColors = {}, spacing = {} }) => extend({\r\n}, getGlobalStyles({ palette, semanticColors, spacing }));\r\n\r\nexport const FullScreenWithTabConfig = {\r\n header: {\r\n mode: Mode.Hidden,\r\n },\r\n nav: {\r\n mode: Mode.Hidden,\r\n },\r\n status: {\r\n mode: Mode.Hidden,\r\n },\r\n menu: {\r\n mode: Mode.Hidden,\r\n },\r\n subTab: {\r\n mode: Mode.Hidden,\r\n },\r\n scopePanel: {\r\n mode: Mode.Hidden,\r\n },\r\n};\r\n\r\nconst CopilotFullScreenWithTabConfig = {\r\n header: {\r\n mode: Mode.Hidden,\r\n },\r\n nav: {\r\n mode: Mode.Hidden,\r\n },\r\n status: {\r\n mode: Mode.Expanded,\r\n showCopilot: {\r\n right: 320,\r\n },\r\n },\r\n menu: {\r\n mode: Mode.Hidden,\r\n },\r\n subTab: {\r\n mode: Mode.Hidden,\r\n showCopilot: {\r\n right: 320,\r\n },\r\n },\r\n};\r\n\r\nexport const isTableExpanded = (layoutConfig) => {\r\n const entries = Object.entries(layoutConfig);\r\n for (let i = 0; i < entries.length; i += 1) {\r\n const [key, config] = entries[i];\r\n\r\n if ((FullScreenWithTabConfig[key] != null && !isMatch(config, FullScreenWithTabConfig[key]))\r\n && (CopilotFullScreenWithTabConfig[key] != null && !isEqual(config, CopilotFullScreenWithTabConfig[key]))) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n};\r\n\r\nexport const getConfigComponents = config => ({\r\n ...pick(config, 'header', 'nav', 'status', 'menu', 'subTab', 'scopePanel'),\r\n menu: {\r\n mode: config.menu && config.menu.mode,\r\n },\r\n});\r\n\r\nclass ToolbarContainerUINext extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.floatingBannerId = '';\r\n this.originalChartState = false;\r\n this.originalConfig = this.getConfigComponents();\r\n }\r\n /* istanbul ignore next */\r\n componentDidUpdate(prevProps) {\r\n if (this.props.hotKey === 'escape' && prevProps.count !== this.props.count && this.isTableExpanded()) {\r\n this.toggleExpandTable();\r\n }\r\n }\r\n /* istanbul ignore next */\r\n componentWillUnmount() {\r\n if (this.isTableExpanded()) {\r\n notificationApi.dismiss(this.floatingBannerId);\r\n }\r\n }\r\n getConfigComponents = () => getConfigComponents(this.props.layoutConfig);\r\n\r\n isTableExpanded = () => isTableExpanded(this.getConfigComponents());\r\n\r\n toggleExpandTable = () => {\r\n if (this.isTableExpanded()) {\r\n /* istanbul ignore next */\r\n this.props.changeLayout(defaults({}, this.originalConfig, { topBanner: { mode: Mode.Collapsed } }, this.props.layoutConfig), true);\r\n /* istanbul ignore next */\r\n\r\n this.props.restoreChart(this.originalChartState);\r\n /* istanbul ignore next */\r\n\r\n notificationApi.dismiss(this.floatingBannerId);\r\n } else {\r\n this.originalConfig = this.getConfigComponents();\r\n this.props.changeLayout(defaults({}, FullScreenWithTabConfig, { topBanner: { mode: Mode.Hidden } }, this.props.layoutConfig), true);\r\n\r\n this.originalChartState = this.props.hideChart();\r\n\r\n this.floatingBannerId = notificationApi.showInfo(this.props.i18n.getString(_TL_('Press Esc key to exit full screen')));\r\n }\r\n };\r\n\r\n\r\n render() {\r\n return (\r\n this.toggleExpandTable()} isTableExpandedFlag={this.isTableExpanded()} />\r\n );\r\n }\r\n}\r\n\r\nToolbarContainerUINext.propTypes = {\r\n forceHideToolbar: PropTypes.bool.isRequired,\r\n showToolbarSelected: PropTypes.bool.isRequired,\r\n showToolbarUnselected: PropTypes.bool.isRequired,\r\n toolbarSelectedConfig: PropTypes.objectOf(PropTypes.shape({\r\n id: PropTypes.string.isRequired,\r\n })),\r\n toolbarUnselectedConfig: PropTypes.objectOf(PropTypes.shape({\r\n id: PropTypes.string.isRequired,\r\n })),\r\n onClear: PropTypes.func.isRequired,\r\n selectionCount: PropTypes.number,\r\n totalCount: PropTypes.number,\r\n isCrossPageAllSelected: PropTypes.bool,\r\n isSinglePageAllSelected: PropTypes.bool,\r\n isMultiPage: PropTypes.bool,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }),\r\n onDataDidRender: PropTypes.func,\r\n layoutConfig: PropTypes.shape({}).isRequired,\r\n changeLayout: PropTypes.func.isRequired,\r\n hideChart: PropTypes.func.isRequired,\r\n restoreChart: PropTypes.func.isRequired,\r\n hotKey: PropTypes.string.isRequired,\r\n count: PropTypes.number.isRequired,\r\n};\r\n\r\nToolbarContainerUINext.defaultProps = {\r\n selectionCount: 0,\r\n totalCount: 0,\r\n isCrossPageAllSelected: false,\r\n isSinglePageAllSelected: false,\r\n isMultiPage: false,\r\n i18n: null,\r\n onDataDidRender: noop,\r\n toolbarSelectedConfig: new Map(),\r\n toolbarUnselectedConfig: undefined,\r\n};\r\n\r\n// TODO: merge theme with styles in the callback\r\nexport const ToolbarContainer = withHotKeys(withToggleChart(withLayoutContext(withDefaultStyles(ToolbarContainerUINext, getStyles))), ShortcutType.CollapseTable);\r\n","/* istanbul ignore file */\r\nimport { getLabelStyle } from './label-style';\r\n\r\nexport const getGlobalStyles = ({ palette = {}, semanticColors = {}, spacing = {} }) => ({\r\n '@global': Object.assign(getLabelStyle({ palette, semanticColors, spacing })),\r\n});\r\n","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (model) {if ((model.allowNoDate)) {\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"radioInput\\\"\"+\" role=\\\"radiogroup\\\"\"+pug.attr(\"aria-label\", model.noDateGroupAriaLabel, true, true)) + \"\\u003E\\u003Cdiv class=\\\"nodate\\\"\\u003E\\u003Cinput\" + (\" type=\\\"radio\\\" name=\\\"date\\\" value=\\\"False\\\"\"+pug.attr(\"checked\", model.isNodateSelected, true, true)+pug.attr(\"aria-label\", model.noDateLabel, true, true)) + \"\\u003E\\u003Clabel\\u003E\" + (pug.escape(null == (pug_interp = model.noDateLabel) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"radioInput\\\"\\u003E\\u003Cdiv class=\\\"date\\\"\\u003E\\u003Cinput\" + (\" type=\\\"radio\\\" name=\\\"date\\\" value=\\\"True\\\"\"+pug.attr(\"checked\", !model.isNodateSelected, true, true)+pug.attr(\"aria-label\", model.dateLabel || model.datePickerAriaLabel, true, true)) + \"\\u003E\\u003Clabel\" + (pug.attr(\"aria-label\", model.dateLabel, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = model.dateLabel) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv data-ref=\\\"date-picker\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv data-ref=\\\"date-picker\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}}.call(this,\"model\" in locals_for_with?locals_for_with.model:typeof model!==\"undefined\"?model:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (ariaLabel, customHelpContent, helpId, i18n, title) {pug_html = pug_html + \"\\u003Cspan class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = title) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\nif (helpId) {\npug_html = pug_html + \"\\u003Cspan class=\\\"grid-header-helpId\\\"\\u003E\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" tabindex=\\\"0\\\"\"+pug.attr(\"topic\", helpId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\" role=\\\"button\\\"\"+pug.attr(\"aria-label\", ariaLabel, true, true)+pug.attr(\"content\", customHelpContent, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"label-header-divider\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Ca\" + (\" class=\\\"manage-labels-button\\\"\"+pug.attr(\"title\", i18n.getString('label_selector_action_manage'), true, true)+\" href=\\\"javascript:void(0);\\\" role=\\\"button\\\" tabindex=\\\"0\\\"\"+pug.attr(\"aria-label\", i18n.getString('label_selector_action_manage'), true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";}.call(this,\"ariaLabel\" in locals_for_with?locals_for_with.ariaLabel:typeof ariaLabel!==\"undefined\"?ariaLabel:undefined,\"customHelpContent\" in locals_for_with?locals_for_with.customHelpContent:typeof customHelpContent!==\"undefined\"?customHelpContent:undefined,\"helpId\" in locals_for_with?locals_for_with.helpId:typeof helpId!==\"undefined\"?helpId:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"title\" in locals_for_with?locals_for_with.title:typeof title!==\"undefined\"?title:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (IsAggregateRow, Labels, ShowViewMoreLink, TotalLength, i18n, isMCCLabelEnabled) {pug_mixins[\"labelCellItem\"] = pug_interp = function(label, isMCCLabelEnabled, backgroundColor, color, title){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"labels-cell-item\\\"\"+pug.attr(\"style\", pug.style(`background-color: ${backgroundColor}; color: ${color}; cursor: ${isMCCLabelEnabled ? 'pointer' : 'initial'}`), true, true)+pug.attr(\"title\", title, true, true)+\" data-action=\\\"filterLabel\\\"\"+pug.attr(\"data-id\", label.Id, true, true)+pug.attr(\"data-scope\", label.Scope, true, true)) + \"\\u003E\";\nif (isMCCLabelEnabled) {\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([['labels-cell-scope', label.Scope !== 'Account' ? 'labels-cell-mcc' : 'labels-cell-account']], [true]), false, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = label.Name) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\nif (IsAggregateRow) {\npug_html = pug_html + (pug.escape(null == (pug_interp = ' ') ? \"\" : pug_interp));\n}\nelse {\nif (Labels.length > 0) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"labels-cell-container\\\"\\u003E\";\n// iterate Labels\n;(function(){\n var $$obj = Labels;\n if ('number' == typeof $$obj.length) {\n for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) {\n var label = $$obj[pug_index0];\npug_mixins[\"labelCellItem\"](label, isMCCLabelEnabled, `#${label.labelColor}`, `#${label.contractColor}`, label.title);\n }\n } else {\n var $$l = 0;\n for (var pug_index0 in $$obj) {\n $$l++;\n var label = $$obj[pug_index0];\npug_mixins[\"labelCellItem\"](label, isMCCLabelEnabled, `#${label.labelColor}`, `#${label.contractColor}`, label.title);\n }\n }\n}).call(this);\n\nif (ShowViewMoreLink) {\npug_html = pug_html + \"\\u003Cbr\\u003E\\u003Ca href=\\\"javascript:void(0)\\\" id=\\\"see-all\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Label_Column_See_All').replace('{0}', TotalLength)) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\nvar noWrapText = '-'\npug_html = pug_html + \"\\u003Cspan class=\\\"no-wrap\\\"\\u003E\" + (pug.escape(null == (pug_interp = noWrapText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\n}}.call(this,\"IsAggregateRow\" in locals_for_with?locals_for_with.IsAggregateRow:typeof IsAggregateRow!==\"undefined\"?IsAggregateRow:undefined,\"Labels\" in locals_for_with?locals_for_with.Labels:typeof Labels!==\"undefined\"?Labels:undefined,\"ShowViewMoreLink\" in locals_for_with?locals_for_with.ShowViewMoreLink:typeof ShowViewMoreLink!==\"undefined\"?ShowViewMoreLink:undefined,\"TotalLength\" in locals_for_with?locals_for_with.TotalLength:typeof TotalLength!==\"undefined\"?TotalLength:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"isMCCLabelEnabled\" in locals_for_with?locals_for_with.isMCCLabelEnabled:typeof isMCCLabelEnabled!==\"undefined\"?isMCCLabelEnabled:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (backgroundColor, entityName, entityType, i18n, isMCCLabelEnabled, labels, textColor, tooltip) {pug_mixins[\"labelCellItem\"] = pug_interp = function(label, isMCCLabelEnabled, backgroundColor, color, title){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"labels-cell-item\\\"\"+pug.attr(\"style\", pug.style(`background-color: ${backgroundColor}; color: ${color}; cursor: ${isMCCLabelEnabled ? 'pointer' : 'initial'}`), true, true)+pug.attr(\"title\", title, true, true)+\" data-action=\\\"filterLabel\\\"\"+pug.attr(\"data-id\", label.Id, true, true)+pug.attr(\"data-scope\", label.Scope, true, true)) + \"\\u003E\";\nif (isMCCLabelEnabled) {\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([['labels-cell-scope', label.Scope !== 'Account' ? 'labels-cell-mcc' : 'labels-cell-account']], [true]), false, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = label.Name) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_html = pug_html + \"\\u003Cdiv\\u003E\";\nvar entityTypeLocalized = i18n.getString(`EntityType_${entityType}_Singular`);\nvar entityTypeFormatted = i18n.getString('label_popup_entity_type_format').replace('{0}', entityTypeLocalized);\npug_html = pug_html + \"\\u003Cspan class=\\\"popup--labels__entity-type\\\"\\u003E\" + (pug.escape(null == (pug_interp = entityTypeFormatted) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = entityName) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"popup--labels__container\\\"\\u003E\";\n// iterate labels\n;(function(){\n var $$obj = labels;\n if ('number' == typeof $$obj.length) {\n for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) {\n var label = $$obj[pug_index0];\npug_mixins[\"labelCellItem\"](label, isMCCLabelEnabled, backgroundColor(label), textColor(label), tooltip(i18n, label));\n }\n } else {\n var $$l = 0;\n for (var pug_index0 in $$obj) {\n $$l++;\n var label = $$obj[pug_index0];\npug_mixins[\"labelCellItem\"](label, isMCCLabelEnabled, backgroundColor(label), textColor(label), tooltip(i18n, label));\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\nif (!isMCCLabelEnabled) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"popup--labels__actions\\\"\\u003E\\u003Ca class=\\\"action\\\" data-action=\\\"filter\\\" role=\\\"menuitem\\\" href=\\\"javascript:void(0)\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('label_popup_action_filter')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = ' | ') ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Ca class=\\\"action\\\" data-action=\\\"manage\\\" role=\\\"menuitem\\\" href=\\\"javascript:void(0)\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('label_selector_action_manage')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\";\n}}.call(this,\"backgroundColor\" in locals_for_with?locals_for_with.backgroundColor:typeof backgroundColor!==\"undefined\"?backgroundColor:undefined,\"entityName\" in locals_for_with?locals_for_with.entityName:typeof entityName!==\"undefined\"?entityName:undefined,\"entityType\" in locals_for_with?locals_for_with.entityType:typeof entityType!==\"undefined\"?entityType:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"isMCCLabelEnabled\" in locals_for_with?locals_for_with.isMCCLabelEnabled:typeof isMCCLabelEnabled!==\"undefined\"?isMCCLabelEnabled:undefined,\"labels\" in locals_for_with?locals_for_with.labels:typeof labels!==\"undefined\"?labels:undefined,\"textColor\" in locals_for_with?locals_for_with.textColor:typeof textColor!==\"undefined\"?textColor:undefined,\"tooltip\" in locals_for_with?locals_for_with.tooltip:typeof tooltip!==\"undefined\"?tooltip:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (cssClass, i18n, id, isForVNext) {pug_html = pug_html + \"\\u003Cul\" + (pug.attr(\"class\", pug.classes([cssClass ? cssClass : 'alert alert-danger'], [true]), false, true)+\" data-bind=\\\"visible: errors().length > 0, foreach: errors, attr: {"aria-hidden": errors().length == 0}\\\"\"+pug.attr(\"id\", id ? id : 'KoErrors', true, true)+\" role=\\\"alert\\\"\") + \"\\u003E\\u003Cli data-bind=\\\"html: $data\\\"\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\";\nif (!isForVNext) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"create-label__name-field-label\\\" id=\\\"CreateLabelName\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('create_label_dialog_field_label_name')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cinput class=\\\"create-label__name-field form-control\\\" type=\\\"text\\\" size=\\\"50\\\" maxlength=\\\"80\\\" data-bind=\\\"value: Name\\\" autofocus=\\\"true\\\" aria-required=\\\"true\\\" aria-labelledby=\\\"CreateLabelName\\\"\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cinput\" + (\" class=\\\"create-label__name-field form-control\\\"\"+\" type=\\\"text\\\" size=\\\"50\\\"\"+pug.attr(\"placeholder\", i18n.getString('create_label_dialog_field_label_name'), true, true)+\" maxlength=\\\"80\\\" data-bind=\\\"value: Name\\\" autofocus=\\\"true\\\" aria-required=\\\"true\\\"\") + \"\\u003E\";\n}\npug_html = pug_html + \"\\u003Cul\" + (\" data-bind=\\\"visible: !Name.isValid(), foreach: Name.errors, attr: {"aria-hidden": Name.isValid()}\\\"\"+pug.attr(\"id\", id ? id : 'NameValidationError', true, true)+\" role=\\\"alert\\\"\") + \"\\u003E\\u003Cli\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: $data\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\\u003Cdiv class=\\\"create-label__actions\\\"\\u003E\\u003Cbutton class=\\\"btn btn-primary create-label__action\\\" data-action=\\\"create\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Create')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\\u003Cbutton class=\\\"btn btn-default create-label__action\\\" data-action=\\\"cancel\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Cancel')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"cssClass\" in locals_for_with?locals_for_with.cssClass:typeof cssClass!==\"undefined\"?cssClass:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"id\" in locals_for_with?locals_for_with.id:typeof id!==\"undefined\"?id:undefined,\"isForVNext\" in locals_for_with?locals_for_with.isForVNext:typeof isForVNext!==\"undefined\"?isForVNext:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (checkState) {var ariaCheckedStatus = checkState === 'indeterminate' ? 'mixed' : checkState === 'checked' ? 'true' : 'false'\nvar classes = [].concat(checkState === 'indeterminate' ? ['glyphicon', 'glyphicon-minus'] : checkState === 'checked' ? ['glyphicon', 'glyphicon-ok'] : [])\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"column-tri-state-checkbox\\\"\"+pug.attr(\"aria-checked\", ariaCheckedStatus, true, true)+\" role=\\\"checkbox\\\"\") + \"\\u003E\\u003Cspan\" + (pug.attr(\"class\", pug.classes([classes], [true]), false, true)) + \"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"checkState\" in locals_for_with?locals_for_with.checkState:typeof checkState!==\"undefined\"?checkState:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, useSubMenu) {pug_html = pug_html + \"\\u003Cdiv class=\\\"menu-grid-selector\\\" data-ref=\\\"selectorView\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"divider\\\" data-bind=\\\"visible: !loaded() || hasData()\\\" role=\\\"separator\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (useSubMenu) {\npug_html = pug_html + \"\\u003Cdiv role=\\\"menu\\\"\\u003E\\u003Cli class=\\\"action\\\" data-bind=\\\"visible: hasChanges()\\\" data-action=\\\"apply\\\" role=\\\"presentation\\\"\\u003E\\u003Ca class=\\\"clickable\\\" href=\\\"javascript:void(0)\\\" role=\\\"menuitem\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Apply')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E\\u003Cli class=\\\"action\\\" data-bind=\\\"visible: !hasChanges()\\\" data-action=\\\"create\\\" role=\\\"presentation\\\"\\u003E\\u003Ca class=\\\"clickable\\\" href=\\\"javascript:void(0)\\\" role=\\\"menuitem\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('CreateNew')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E\\u003Cli class=\\\"action\\\" data-bind=\\\"visible: !hasChanges()\\\" data-action=\\\"manage\\\" role=\\\"presentation\\\"\\u003E\\u003Ca class=\\\"clickable\\\" href=\\\"javascript:void(0)\\\" role=\\\"menuitem\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('label_selector_action_manage')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cli class=\\\"action\\\" data-bind=\\\"visible: hasChanges()\\\" data-action=\\\"apply\\\" role=\\\"presentation\\\"\\u003E\\u003Ca class=\\\"clickable\\\" href=\\\"javascript:void(0)\\\" role=\\\"menuitem\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Apply')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E\\u003Cli class=\\\"action\\\" data-bind=\\\"visible: !hasChanges()\\\" data-action=\\\"create\\\" role=\\\"presentation\\\"\\u003E\\u003Ca class=\\\"clickable\\\" href=\\\"javascript:void(0)\\\" role=\\\"menuitem\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('CreateNew')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E\\u003Cli class=\\\"action\\\" data-bind=\\\"visible: !hasChanges()\\\" data-action=\\\"manage\\\" role=\\\"presentation\\\"\\u003E\\u003Ca class=\\\"clickable\\\" href=\\\"javascript:void(0)\\\" role=\\\"menuitem\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('label_selector_action_manage')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E\";\n}}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"useSubMenu\" in locals_for_with?locals_for_with.useSubMenu:typeof useSubMenu!==\"undefined\"?useSubMenu:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (model) {pug_html = pug_html + \"\\u003Cdiv class=\\\"nameTemplate\\\"\\u003E\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([['labels-cell-scope', model.Scope === 'Customer' ? 'labels-cell-mcc' : 'labels-cell-account']], [true]), false, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cspan class=\\\"table__cell--menu-item-style table__cell--ellipsis-overflow\\\"\\u003E\" + (pug.escape(null == (pug_interp = model.Name) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"model\" in locals_for_with?locals_for_with.model:typeof model!==\"undefined\"?model:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n) {pug_html = pug_html + \"\\u003Cdiv\\u003E\\u003Cdiv class=\\\"custom-content\\\"\\u003E\\u003Cdiv data-ref=\\\"subEditView\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cinput\" + (\" class=\\\"grid-edit-menu grid-popupeditor-save btn btn-primary\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", i18n.getString('Save'), true, true)) + \"\\u003E\\u003Cinput\" + (\" class=\\\"grid-popupeditor-cancel btn btn-default grid-edit-menu\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", i18n.getString('Cancel'), true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cul class=\\\"grid-error-list hide\\\"\\u003E\\u003Cdiv class=\\\"grid-error spritedimage\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cspan class=\\\"error grid-error-message\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Ful\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (direction, html) {pug_html = pug_html + \"\\u003Cdiv class=\\\"column-header-container\\\"\\u003E\";\nif (direction < 0) {\npug_html = pug_html + \"\\u003Cspan class=\\\"sort-indicator glyphicon glyphicon-arrow-down\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\nelse\nif (direction > 0) {\npug_html = pug_html + \"\\u003Cspan class=\\\"sort-indicator glyphicon glyphicon-arrow-up\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + (null == (pug_interp = html) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"direction\" in locals_for_with?locals_for_with.direction:typeof direction!==\"undefined\"?direction:undefined,\"html\" in locals_for_with?locals_for_with.html:typeof html!==\"undefined\"?html:undefined));;return pug_html;};\nmodule.exports = template;"],"names":["biddingSchemeInLastBuilder","BidColumnId","CPC","CPV","CPM","PercentCpc","CommissionRate","ManualCPA","allBidColumnIds","_","getBiddingSchemeType","_ref","currentCampaign","BiddingScheme","Type","isBiddingSchemeUpdated","_ref3","campaignId","biddingSchemeInCurrentBuilder","getCurrentCampaignType","_ref4","config","get","columnProcessorBeforeSetRecordGetter","lockedColumns","newColumns","oldColumns","arguments","length","undefined","apply","concat","_toConsumableArray","oldExistColumns","columnsToRemove","filterInvisibleBidColumns","_ref6","bidColumns","IsVideoAdsForCampaignEnabled","IsManualCpmEnabled","IsHotelCampaignEnabled","globalCampaignTypeFilter","whitelist","_ref5","_getCurrentCampaignType","currentCampaignType","isAccountOrAudience","CampaignType","Audience","All","isAccountOrHotel","Hotel","Shopping","getWhitelist","getLockedBidColumnIds","_ref7","result","bidStrategyType","push","_ref2","ManualCpc","ManualCpa","ManualCpv","ManualCpm","EnhancedCpc","MaxClicks","MaxConversions","TargetCpa","TargetRoas","MaxConversionValue","TargetImpressionShare","Commission","getBidColumnIdByBidStrategyType","getLockedBidColumns","_ref9","allBidColumns","ids","value","getUnlockedBidColumns","_ref10","_ref8","lockedBidColumns","getUnlockedBidColumnIds","getSelectedBidColumns","_ref11","ExtendedDatePicker","_DatePicker","_classCallCheck","_callSuper","_inherits","_createClass","key","_superPropGet","this","getState","isNodateSelected","datePicker","enable","DatePicker","CampaignsDatePicker","_DeterministicView","_this","minDate","maxDate","selectedDate","allowNoDate","noDateLabel","dateLabel","noDateGroupAriaLabel","datePickerAriaLabel","isNaN","Date","ariaLabel","datePickerInput","$","addClass","attr","setChild","setState","listenTo","trigger","getSelectedDate","_this2","selectNoDateOption","selectDateOption","CampaignsDatePickerTemplate","state","getChild","model","set","attributes","getDate","originalDate","DeterministicView","LabelsColumn","_CampaignuiBaseColumn","options","title","i18n","getString","isMCCLabelEnabled","permissions","IsAccountLabelsEnabled","name","property","type","helpId","helpAriaLabel","item","headerTemplate","args","_objectSpread","$total","Labels","isAggregateRow","labels","labelsLength","labelsCountToShow","labelsToUse","i","label","Description","Name","replace","labelColor","toHex","ColorCode","contractColor","contrastColor","template","ShowViewMoreLink","TotalLength","IsAggregateRow","CampaignuiBaseColumn","LabelsPopupContentView","_ref$labels","entityType","entityName","event","currentTarget","getAction","action","backgroundColor","textColor","tooltip","onAction","onLabelCellItemClicked","createFilterQuery","containsAll","labelIds","JSON","stringify","$containsall","$containsany","triggerFilter","grid","filterService","filterQuery","setEditableFilter","filterState","newFilter","createFilter","query","setFilter","filterOnLabelClick","gridView","labelId","parseInt","getAttribute","scope","find","l","Id","Scope","navigateToManagePage","router","navigateToRoute","showLabelsPopup","_ref$container","container","_ref$groupClass","groupClass","popupOptions","positioningMethod","positioningOptions","threshold","classes","contentView","_$$0$getBoundingClien","target","getBoundingClientRect","top","left","height","width","uiNextVirtualOffset","offset","anchorPosition","showPopup","then","isMCCLevel","values","aid","getCurrentCustomerLabels","edmCampaign","advertiser","cid","getUrlParameter","Customers","$withKey","getEntitySet","edm","currentAccount","selectorLoadAction","RequestError","_Error","message","responseData","_wrapNativeSuper","Error","requestErrorToRejection","status","statusText","getIsCombinedScopeRequest","customerLevelLabelEnabled","some","id","parsed","parse","hasCustomerLabel","getLabels","jsdata","itemsDisplayLimit","searchFilter","_ref$ids","cacheService","dataContextManager","params","limit","filterOptions","ignoreCase","where","$contains","endQueries","$or","map","$eq","$and","Promise","resolve","cachedData","getContext","pseudoRequest","url","data","success","cache","skipRequest","isCombinedScopeRequest","loadResult","cacheResponse","bypassCache","headers","currentScopeLabels","Label","findAll","entitySet","customerLabels","load","newData","accountLabels","mccLabels","slice","getLabelsResult","LabelsDataSource","viewFilter","stats","lastIds","lastViewFilter","Selector","ViewFilter","selected","checked","indeterminate","changed","added","Number","ViewModel","hasData","ko","loaded","hasChanges","LabelsSelectorView","_PureKnockoutView","_ref$dataSource","dataSource","_ref$checkAll","checkAll","_ref$checkMap","checkMap","_ref$i18n","_ref$isForVNext","isForVNext","_ref$customerLevelLab","_ref$useSubMenu","useSubMenu","initializeSelector","selector","checkboxTemplate","busyIndicator","enabled","showAfterMs","showForMs","filter","showSelected","showChanged","styles","searchIcon","searchBoxAriaLabel","list","listAttributes","role","checkboxColumn","checkboxAttributes","tabindex","nameColumn","templates","getSelectorTemplates","thiss","on","itemsOrPromise","finally","setData","viewModel","selectorViewDeterministic","DeterministicViewForBackBoneView","view","setCheckMap","rerender","getStats","remove","nameTemplate","labelNameTemplate","PureKnockoutView","CheckState","CheckTransition","statCheckMap","CreateLabelView","s$label","i18nErrors","_instance$schema$keys","instance","schema","keys","customValidators","KoSchema","onCreate","onCancel","errors","add","getODataErrors","validate","dto","toDec","Math","random","toString","create","instrumentation","createActivity","createLabel","initCreateInstrumentationActivity","monitorAsync","visit","node","graph","permVisited","tempVisited","sortedList","dep","unshift","getOrderToInitializePlugin","nameToDepsMap","notVisited","pop","topoSort","deps","generateDepGraph","pgridFactory","_ref3$plugins","plugins","gridConfig","preferenceConfig","pgrid","_generatePluginNameMa","nameToPluginRefMap","softDependenciesMap","plugin","softDependencies","softDependency","generatePluginNameMaps","customDepsMap","sortedOrder","gridFactory","factory","vnext","pluginName","use","performanceLog","merge","addPluginConfigToGridConfig","CategoryConfigBuilder","columnsBuilder","columns","Column","addColumn","_Column","selectOption","isColumnLocked","ColumnsConfigBuilder","categories","locked","helpIds","IsVideoAdsPerfMetricsEnabled","isCPSEnabled","isInstallPerformanceColumnsEnabled","isAppCampaignNewCampaignGridColumnsEnabled","isNewCustomerAcquisitionColumnsEnabled","Permissions","dynamic","CPSReporting","InstallPerformanceColumns","AppCampaignNewCampaignGridColumns","NewCustomerAcquisition","e","isVideoAdsPerfMetricsEnabled","performanceColumns","getPerformanceColumns","director","categoryBuilder","_this$locked","column","flatten","uniq","toJSON","patchQuery","Columns","SelectedColumns","LegacyColumns","LegacySelectedColumns","LegacyGridFlag","nameFromLegacy","_ref3$mandatoryProper","mandatoryProperties","CustomColumns","customColumnConfig","_ref3$permissions","_permissions$dynamic","IsColumnConversionEnabled","ColumnConversion","category","getCategoryConfig","columnConversions","getColumnConversions","getAllColumns","Boolean","unfilteredColumns","categoryName","blacklist","filteredColumns","addCategory","addColumns","IsAvgPositionDeprecationPhase2Enabled","perfColumns","union","ColumnTopImpressionRate","ColumnAbsoluteTopImpressionRate","addCategoryWithoutSomeColumns","ColumnAveragePosition","withFluctuations","getCampaignTypeGlobalFilter","campaignTypeGloabalFilter","includeAppCampaignColumns","IsAvgPositionDeprecationPhase1Enabled","withProminence","ColumnTotalSpend","difference","columnsToUse","IsViewThroughConversionEnabled","IsViewThroughConversionsRevenueEnabled","ColumnFilter","isInstallColumnsEnabled","isConversionValueRuleColumnsEnabled","withPartialConversions","baseConversionColumns","getConversionColumns","ColumnViewThroughConversionsCredit","ColumnViewThroughConversions","ColumnViewThroughConversionsRevenue","ColumnViewThroughPartialConversionsCPA","ColumnViewThroughConversionsReturnOnAdSpend","ColumnViewThroughPartialConversionsRate","ColumnViewThroughConversionsCPA","ColumnViewThroughConversionsRate","ColumnNewCustomerConversions","ColumnNewCustomerRevenue","ColumnNewCustomerConversionRate","ColumnNewCustomerCPA","ColumnNewCustomerRevenueOnAdSpend","conversionsColumnsWithFluctuation","conversionsColumns","index","competitiveColumns","ColumnExactMatchImpressionSharePercent","ColumnTopImpressionSharePercent","ColumnTopImpressionShareLostToBudget","ColumnTopImpressionShareLostToRank","ColumnAbsoluteTopImpressionSharePercent","ColumnAbsoluteTopImpressionShareLostToBudget","ColumnAbsoluteTopImpressionShareLostToRank","ColumnAuctionLostToAdQualityPercent","ColumnAuctionLostToLandingPercent","ColumnAuctionLostToBidPercent","IsAudienceSOVEnabled","ColumnAudienceAuctionWonPercent","ColumnAudienceTopISLostToBudgetPercent","ColumnAudienceTopISLostToRankPercent","ColumnRelativeCTR","ColumnClickSharePercent","callDetailsColumns","ColumnCallForwarding","updateGridQuery","refresh","skipFilterOptions","currentQuery","newQuery","odataOptions","showExceededSaveLimitError","filterConfig","tabView","errMsg","maxSavedFilterLimit","alertHelper","showAlert","initializeFilterAgent","toolbar","legacyDeps","customFilterUIChangeListener","gridToolbarGroup","legacyGridName","isLabelEnabled","entitySchema","properties","menu","customItems","text","onClick","filterAgent","showFilterEditor","FilterAgent","toolbarView","showToolBar","showAllToolbars","hideAllToolbars","showFilterBar","getFilterBar","getFilterEditor","subStatus","quickFilter","waterfallEvent","_ref$legacyDeps","stateManager","preferences","legacyWaterfall","fromFilterEntityToLegacyFilter","usePreferencesService","setPromise","FilterExpressions","prefix","preferenceData","Data","setAtUserLevel","setItem","window","App","propagateWaterfallFilterToLegacyGrids","errorData","showUnknownError","gridName","dateUtil","getSegPreference","getSegType","segmentTimeChecker","fetchPaginationConfig","customColumnPreference","formatDate","date","format","services","getPromise","getCustomColumnsPreference","spread","dateRange","pageSize","orderbyInfo","sortableHeader","pageable","pagination","endDate","end","startDate","start","compared","comparisonEndDate","comparisonStartDate","segType","segmentationType","isTimeRangeValid","SegmentationTypes","orderby","complexFields","inlineEditSave","fieldName","updatedItem","_ref$additionalPayloa","additionalPayload","_ref$disableBulk","disableBulk","_ref$refreshGrid","refreshGrid","resource","scenario","editorView","editorViewCallbackAfterUpdate","importNotificationCallback","_ref2$isDateType","isDateType","_ref2$customBlockerTa","customBlockerTarget","payload","$el","uiBlockerTarget","raw","timeZone","normalizeDate","update","adapter","withUiBlock","catch","response","errorMapping","unexpectedError","getBulkApiErrors","setErrors","AlertHelper","showError","InlineEditableColumnPrompt","position","_ref$customValidators","saveModel","PopupEditor","fields","hasLabels","parentContainerSelector","parseCompactedKeywords","selectedKeywordIds","matchTypes","matchTypeValues","Exact","Phrase","Broad","Content","Predictive","keywords","split","forEach","group","biddedMatchType","KeywordId","parseIntBase64","BiddedMatchType","getTargetEntity","keyOfElement","itemWithKey","getGridDataParams","appConfig","currentCustomer","currentCustomerId","gridDataParameters","CurrentCustomerId","onAfterFindAll","err","Code","showTooMuchDataError","setUpErrorHandling","afterFindAll","tooMuchDataErrorText","headlinePositionKey","descriptionPositionKey","endWithPeriod","indexOf","combineDescriptions","textPart1","textPart2","combineDescriptionArray","desArray","getPreviewList","positionKey","PinnedField","Text","dist","None","shift","getTitlePreview","headlines","join","getDescPreview","descriptions","getMoreHint","assets","getMoreTitleHint","getMoreDescHint","getMoreHintFromJson","jsonString","parseSync","getMoreTitleHintFromJson","getPreviewFromJson","preview","getTitlePreviewFromJson","headlineValue","getDescPreviewFromJson","descriptionValue","hoverTimeout","appendScopeParameter","uri","uid","addQuery","hoverDelay","handleShowRejectionReasonEnter","thisArg","callback","callbackBinded","bind","setTimeout","handleShowRejectionReasonLeave","clearTimeout","convertDateBetweenTimeZones","from","to","dateString","parseDate","convertMachineDateToUTCDate","convertUTCDateToMachineDate","dateFormatter","displayDate","noDateMessage","getCurrentDate","now","getFullYear","getMonth","ColumnConversionEnabledFeatures","summary_tab_campaign","summary_tab_ad_group","summary_tab_ad","summary_tab_keyword","summary_tab_demographics","settings_locations","settings_ad_schedule","settings_devices","DsaTarget","DsaSearchTerm","AutomatedExtension","AdExtensionAssociation","DimensionsGrid","feed_items","audience_associations_level","ConversionGoalsGrid","SharedBudgetSummaryGrid","SharedBudgetEditGrid","summary_tab_search_term","target_devices_grid","PerformanceGrid","newProductGroupsGrid","PortfolioBidStrategyGrid","validateOrder","featureName","_ref$dynamic","preference","sourceOrderbyInfo","patchedOrderbyInfo","_applySortingInfoConv","applySortingInfoConversion","buildSortingConversions","sortableColumns","sortable","updatedOrder","order","surveyStatus","SurveyPreferenceService","props","initializeSurveyPreference","isEmpty","PreferenceService","surveyPreference","getSurveyPreference","surveyPreferenceKey","Version","getDaysAgo","days","setTime","getDaysAfter","getTime","findByNameAtUserLevel","getAtUserLevel","getSurveyState","surveyName","chain","setSurveyState","surveyState","BaseSurvey","getSurveyComponent","getSurveyId","getSurveyName","getSurveyPriority","validateTriggerCondition","getSurveyCustomParams","getInitializationConfig","validateUserGovernance","isTestEnv","logActivity","checkSurveyState","isSurveyShown","nextShownDate","initializationConfig","initGroup","initStartDate","initEndDate","userGroup","serverContext","initUnit","newSurveyState","floor","onSurveyRender","isReportingPipelineEnabled","getSurveyProduct","getSurveyInterface","location","href","toLowerCase","includes","IQuestionConfigurator","constructor","isValid","answers","isVisible","getDefaultData","getDefaultDirtyState","bool","isEmail","isRating","isComment","getFeedbackData","getView","Validator","configuration","getError","isAnswered","QuestionConfigurator","surveyConfigurator","super","initValidator","validator","getTitle","getDescription","getConfiguration","View","configurator","SurveyContext","createContext","theme","getTheme","iconButtonStyles","root","color","palette","neutralPrimary","marginLeft","marginTop","marginRight","rootHovered","neutralDark","closeButtonStyles","transform","backButtonStyles","modalStyles","modalView","zIndex","surveyStyles","padding","maxWidth","body","fontWeight","EndingPageHeader","forwardRef","ref","onDone","useContext","I18nContext","surveyContext","getPageIndex","Fragment","className","doneIconButton","IconButton","iconProps","iconName","componentRef","QuestionHeader","onBack","onDismiss","isMiddlePage","backIconButton","closeIconButton","Header","isFirstPage","isEndingPage","useDefaultStyles","fontSize","black","header","flex","display","alignItems","justifyContent","marginBottom","paddingLeft","paddingRight","useMemo","PrivacyStatement","privacyStatement","ReactTemplate","a","Link","infoText","Glyphicon","glyph","EndingPageFooter","buttons","PrimaryButton","QuestionPageFooter","isLastPage","onSubmit","onNext","isSubmitButtonDisabled","emptyBottomDiv","submitButton","disabled","nextButton","DefaultButton","Footer","footer","paddingTop","neutralSecondary","textDecoration","SurveyQuestionComponents","getAnswersByKey","setAnswersByKey","getSurveyAnswers","getSurveyDirtyStateByKey","setSurveyDirtyStateByKey","questions","question","Question","style","dirtyState","setDirtyState","isDirty","PageView","getIsFirstPage","getIsEndingPage","getIsLastPage","getIsSubmitButtonDisabled","getIsFromBack","firstFocusableElement","useRef","lastFocusableElement","isFromBack","useEffect","current","focus","ErrorString","error","variant","block","nowrap","input","maxLength","diff","number","abs","Option","children","option","isSelected","hasInput","linkText","placeholder","getSurveyConfiguration","others","shouldHideInputWhenNotSelected","logged","TextField","textAlign","paddingBottom","borderColor","optionText","onChange","tabIndex","description","generateLabelId","str","hashValue","hash","charCodeAt","hashFunc","Title","isRequired","labelKey","requiredMark","questionTitle","QuestionTitle","buildSingleSelectionOptions","dynamicOption","setOptionData","mySetDirtyState","onRenderField","render","optionComponentFactory","selectedOption","ChoiceGroupView","questionKey","useCallback","optionKey","newDirtyState","myLogActivity","log","singleSelectionOptions","ChoiceGroup","ariaLabelledBy","selectedKey","ev","SingleSelectionView","rootClassName","CheckboxGroupView","checkboxGroup","Checkbox","margin","onRenderLabel","dataKey","stringInput","MultipleSelectionView","RatingView","EmailView","CommentView","titleError","commentError","multiline","rows","resizable","CommentValidator","validateHelper","answer","SingleSelectionValidator","EmailValidator","email","test","yes","CurrentUser","Email","MultipleSelectionValidator","setOptionKeyToText","optionKeyToText","selectedOptions","setOptionKeyToRating","optionKeyToRating","rating","parseFloat","ratingOptionsCount","PageConfigurator","sortQuestions","sort","b","addQuestion","questionConfiguration","remaining","comments","SurveyConfigurator","featureArea","Map","pages","endingPage","getFeatureArea","sortPages","page","getPageIfNoneCreateIt","pageIndex","hasPageAtIndex","getPage","getEndingPage","getQuestionByKey","addQuestions","questionConfigurations","getDefaultAnswers","getDefaultDirtyStatePerPage","setConfiguration","getOtherFlags","comment","ratingObject","emailData","ratingData","remainingData","commentsData","combineTextInputToComment","optionAnswer","feedback","q","stringifySync","extendedManifestData","surveySpecificData","selectedRating","round","hasEmail","SurveyView","customizedClasses","Stack","surveyDataService","onSurveySubmit","onSurveyDismiss","lastActiveElement","customParams","isPopupOutsideDismissEnabled","surveyConfiguration","parseSurveyConfiguration","isModalOpen","setIsModalOpen","useState","getSurveyDirtyState","setCurrentPageDirty","surveyAnswers","setSurveyAnswers","surveyDirtyState","setSurveyDirtyState","newAnswers","newState","useQuestionState","modalSettings","isGlobalModalStyleEnabled","userActionAnalysisEnabled","isUserInitiatedSurvey","isThankYouPageEnabled","shouldAutoClose","isInPageMiddle","isModeless","isOriginalModeless","isBlocking","string","analysisActivity","flattenKeys","obj","Object","reduce","acc","newKey","assign","setClarityTag","SurveyFactory","replaceAll","additionalLogData","userCreatedDateTime","localizedUserCreatedDateTime","deltaTime","userActiveDay","ceil","lock","releaseLock","useLock","keyVault","survey","priority","priorityLevel","systemLevelAnnouncement","force","autoClose","setIsEndingPage","setPageIndex","fromBack","setFromBack","usePage","onCloseModal","element","document","getElementsByTagName","returnFocus","telemetry","sendFeedback","onFinishSendRequest","hasComment","dismissType","onModalDismiss","keyCode","modalSpecificStyles","main","right","bottom","minHeight","isUndefined","Provider","Modal","isOpen","titleAriaId","focusTrapZoneProps","forceFocusInsideTrap","layer","defaultProps","exampleSurveyConfig","RatingConfigurator","_TL_","EmailConfigurator","MultipleSelectionConfigurator","questionConfigurator","CommentConfigurator","FactorySurveyView","_jsx","surveyMaxWidth","fontFamily","lineHeight","fontSIze","ratingDescription","fontWewight","visibility","ratingOption","area","areaDescription","areaCheckbox","areaComment","commentDescription","commentInput","emailDescription","emailOptions","emailOption","emailInput","emailError","validationError","buttonBar","float","cancelButton","closeButton","commentMaxLength","SurveyViewInternal","surveyRef","_useState","_useState2","_slicedToArray","_useState3","_useState4","setSelectedOption","_useState5","_useState6","setValidationError","onChangeRating","ratingOptions","isAdditionalContentVisible","_props","classNames","areaOptions","withComment","initialAreaState","memo","_defineProperty","_useState7","_useState8","areaState","setAreaState","_useState9","_useState10","setAreaComment","_useState11","_useState12","areaCommentDescription","setAreaCommentDescription","_useState13","_useState14","areaCommentError","setAreaCommentError","onChangeAreaComment","val","_useState15","_useState16","setComment","_useState17","_useState18","setCommentDescription","_useState19","_useState20","setCommentError","onChangeComment","_useState21","_useState22","setEmailOption","_useState23","_useState24","setEmail","_useState25","_useState26","setEmailError","onChangeEmailOption","validateEmailAddress","emailAddress","onChangeEmail","_jsxs","React","_useState27","_useState28","disableSubmitButton","setDisableSubmitButton","selectedAreas","additionalAreas","cancelIcon","checkbox","prev","errorMessage","noop","compose","WrappedComponent","withDefaultStyles","partial","withI18nConsumer","withServerContext","WebuiUserSurvey","_BaseSurvey","_len","Array","_key","isWebUIUserCSATSurveyByFactoryEnabled","checkUserCreatedDateTime","getUserActiveDay","isPilotEnabled","isNonAADUser","isUserActiveOneMonth","isEnglishUser","isBrowserLanguageEnglish","startsWith","isNotInternalUser","isNotSupportUser","isNotExcludedUser","isDisabledInBVT","isProdUrl","toLocaleLowerCase","isNotMcaUrl","qualtricsConditions","IsLeftNavigationHideButtonEnabled","IsHideCampaignListButtonEnabled","IsLongCampaignAndAdgroupNameEnabled","IsImprovedDateFilterEnabled","AdsCopilot","NavigationRefresh","PopupOutsideDismiss","EnhancedSurveyTriggerCondition","isUserActive10Days","CopilotAssetRecommendationSatisfactionSurveyConfig","CopilotAssetRecommendationSatisfactionSurveyView","IS_SELENIUM","validateESCTriggerCondition","surveyTriggerName","isNotE2EMode","navigator","webdriver","isMcaUrl","isESCSurveyEnabled","isSurveyTriggerValid","validateAdinsightRecommendationTriggerCondition","recommendationUrl","surveyPermission","isRecommendationUrl","surveyConditions","validateAccountSettingsTriggerCondition","accountSettingUrl","isNotMicrosoftInternalUser","isBetaProdUrl","isAccountSettingUrl","validateAssetLibraryTriggerCondition","checkPilot","isAssetLibrarySurveyEnabled","validateRSALLMTriggerCondition","apiCallingTime","getCallCountOfRSASuggestionAPI","triggerCondition","OVERALL_SURVEY_THRESHOLD","MOSTWANTED_SURVEY_THRESHOLD","MAX_VALUE","OVERALL_SURVEY_THRESHOLD_FAST_TRACK","MOSTWANTED_SURVEY_THRESHOLD_FAST_TRACK","URLSearchParams","search","validateRSALLMOverallCallingAPI","isAdUrl","CopilotAssetRecommendationSatisfactionSurvey","CopilotAssetRecommendationSatisfactionTrigger","_ref2$requiredModifyN","requiredModifyNumber","currentRequiredModifyNumber","validateCopilotAssetRecommendationSatisfactionTriggerCondition","CopilotRecommendationsSurveyCustomParams","escWebuiUserSurveyConfig","ESCWebUISurveyView","EscWebuiUserSurvey","surveyPreference30DaysAgo","isWebUICSATSurveyEnabled","EscWebuiUserPauseCampaignSurveyConfig","minWidth","SingleSelectionConfigurator","q1","EscWebuiUserPauseCampaignSurveyView","EscWebuiUserPauseCampaignSurvey","ESCUserPauseCampaign","ESCUserPauseCampaignCustomParams","EscWebuiUPCampaignFeedbackSurveyConfig","EscWebuiUPCampaignFeedbackView","EscWebuiCampaignFeedbackSurvey","ESCUserPublishesFirstCampaign","EscWebuiAutomatedAdDeletionSurveyConfig","ESCWebUIAutomatedDeletionSurveyView","EscWebuiAutomatedAdDeletionSurvey","ESCAutomatedAdDeletion","ESCAutomatedAdDeletionCustomParams","recommendationSurveyConfig","AdInsightRecommendationSurvey","recommendationMccSurveyConfig","AdInsightRecommendationMccSurvey","escWebuiUserCancelSignupSurveyConfig","ESCWebUIUserCancelSignupSurveyView","EscWebuiUserCancelSignupSurvey","currentUser","currentLocale","currentUserLanguage","currentUserName","isProdSignupUrl","isESCSignupSurveyEnabled","validateESCSignupTriggerCondition","EscUserCancelSignup","EscUserCancelSignupCustomParams","McmWebuiOptOutFeedbackSurveyConfig","McmWebuiOptOutFeedbackView","McmWebuiOptOutFeedbackSurvey","McmUserOptOut","MCMMandatoryOptOutSurveyConfig","MCMMandatoryOptOutSurveyView","MCMMandatoryOptOutSurvey","onSubmitHideWarningCallback","onDismissReOptInCallback","AssetLibraryAppSurveyConfig","AssetLibraryAppSurveyView","AssetLibraryAppSurvey","AssetLibraryAppSurveyTrigger","AssetLibraryPickerSurveyConfig","AssetLibraryPickerSurveyView","AssetLibraryPickerSurvey","AssetLibraryPickerSurveyTrigger","AssetLibraryAIGCMVPSurveyConfig","AssetLibraryAIGCMVPSurveyView","AssetLibraryAIGCMVPSurvey","AssetLibraryAIGCMVPSurveyTrigger","reportingWebuiUserSurveyConfig","ReportingWebuiUserSurveyView","ReportingWebuiUserSurvey","reportingLastTimeVisitedObj","lastTimeVisited","isReportingUrl","RSALLMSuggestionOverallSurveyConfig","RSALLMSuggestionOverallSurvey","callCountOfRSASuggestionAPI","RSALLMSuggestionCustomParams","RSALLMSuggestionMostWantedSurveyConfig","RSALLMSuggestionMostWantedSurvey","allCountOfRSASuggestionAPI","CampaignOnboardingSurveyConfig","CampaignOnboardingSurveyView","CampaignOnboardingSurvey","onSwitchBackToOldSurveySubmit","ONBOARDING_PREFERENCE","isNewOnboardingVisibleStore","isNewOnboardingVisible","switchBackToOldCampaignOnboarding","onSwitchBackToOldSurveyDismiss","TransparentImageAnnotationSurveyConfig","TransparentImageAnnotationSurveyView","surveyCustomParamsName","TransparentImageAnnotationSurvey","BudgetCenterOverallSatisfactionSurveyConfig","BudgetCenterOverallSatisfactionSurveyView","BudgetCenterOverallSatisfactionSurvey","isPiloted","isVisitBudgetCenterPage","isBudgetCenterUrl","pathname","lastVisitDateString","shouldTrigger","VisitBudgetCenter","BudgetCenterOneTimeUserSurveyConfig","BudgetCenteOneTimeUserSurveyView","BudgetCenterOneTimeUserSurvey","isEvaluatorEnabled","AdsStudioAppSurveyConfig","AdsStudioAppSurveyView","AdsStudioAppSurvey","isAdStudioSurveyEnabled","validateAdsStudioTriggerCondition","AdsStudioAppSurveyTrigger","webuiSurveyList","getWebuiSurveyList","surveyList","implementedSurveyList","prototype","Survey","SurveyDataSource","_OCVDataService","searchParams","clientFeedbackId","Interface","Product","_this$getScope","getScope","contentType","EventName","UniqueId","EventValue","Rating","AID","CID","SubProduct","Context","DeviceType","deviceType","FeatureArea","ServicesEndpoints","CampaignAPI","OCVDataService","SurveyDataService","_ref$isTestEnv","surveyId","tokenInfo","_ref$isReportingPipel","_ref$logActivity","_ref$sendSourcePageUR","sendSourcePageURI","appId","_dataSource$getScope","defaultFeedback","manifestType","web","sourcePageURI","application","appData","complianceChecks","authenticationType","ageGroup","sdkVersion","defaultTelemetry","tenantId","String","TenantId","loggableUserId","UserId","processSessionId","_ref2$onFinishSendReq","uuidv4","feedbackWithDefaults","extend","telemetryWithDefaults","originalCallback","sendEventToReportingPipeline","onSuccess","onError","SurveyContainer","resetActiveElement","Component","SurveyComponent","setSurveyHasCampaign","surveyManager","hasCampaign","SurveyManager","appActivity","activityName","appPerfMarker","signal","_props$surveyList","renderSurveyToDom","renderSurveyPerfMarker","createChild","willInit","activeElement","ReactDOM","ServerContext","PopupContextProvider","done","DOMContainer","getElementById","createElement","setAttribute","createDOMContainer","selectSurvey","sortedSurveyList","sortBy","reverse","selectedSurvey","getSurvey","setSurvey","checkIfSurveyIsOpen","getElementsByClassName","newSurvey","setupSurveyManager","locationRecommendationConverter","isRecommendedLocation","Campaign","Target","CampaignId","CampaignName","CriterionKey","LocationId","Criterion","ExpandedName","NameTypeCombo","CriterionType","convertLocation","Location","getOdataPath","originalHost","include","host","getRecommendations","oppType","channel","skip","baseUrl","customerId","accountId","actionUrl","httpUtils","odata","getTrackPayload","isAll","recommendations","recommendationType","UserAction","odataType","inputKey","inputValue","recommend","OpportunityId","Request","OpportunityType","Settings","adoptRecommendations","post","applyRecommendations","dismissRecommendations","Loader","siteMap","updateAvailability","selectedParent","available","Scenario","Activity","StyledSubPageMenu","DefaultSubPageMenuLoader","ExperimentSubPageMenu","default","StyledExperimentSubPageMenu","layoutConfig","campaign","useCurrentCampaign","adGroup","useCurrentAdGroup","showCard","tab","mode","ExperimentId","isExperimentCampaign","fallback","experimentId","ExperimentSubPageMenuLoader","withLayoutContext","withCampaignSiteMap","processor","processPermissions","processPath","hotelCenterPageCategory","feedupload","report","adExtensions","reconciliationreport","idsToHideChildren","relocatedSiteMap","dfsSearch","getChildren","predicate","onFound","x","selectedRoad","deepestNodeWithCategory","compact","last","nodeWrapper","locateSiteMap","HotelCenterSubPageMenuLoader","withHotelCenterSiteMap","processorSet","all","HotelCenterV2SubPageMenuLoader","withHotelCenterV2SiteMap","StyledIssuesCount","issuesCount","background","borderRadius","MmcStoreSummarySubPageMenu","storeId","issuesCounts","setIssuesCounts","storeQueries","getIssuesCount","mtResponse","productIssues","ProductIssues","feedIssues","FeedIssues","storeIssues","StoreIssues","onTabItemRender","MmcDataSourceInitializer","FeedLabelGmcMigration","FeedLabelBlockList","MmcNotificationTopBanner","MmcStoreSubPageMenuLoader","withToolsSiteMap","RecommendationSubPageMenu","StyledRecommendationSubPageMenu","RecommendationSubPageMenuLoader","withSiteMap","allSiteMap","verticalAlign","StyledMenuItemTag","tagClass","tagContent","UetTagSubPageMenu","BudgetCenterSubPageMenu","StyledBudgetCenterSubPageMenu","BudgetCenterSubPageMenuLoader","BusinessDataSubPageMenuLoader","ImportCenterSubPageMenuLoader","withImportSiteMap","AutomatedRuleSubPageMenuLoader","BulkEditSubPageMenuLoader","ScriptsSubPageMenuLoader","BulkUploadsSubPageMenuLoader","OfflineConversionsSubPageMenuLoader","UetTagSubPageMenuLoader","CampaignSubPageMenuLoader","SubpageMenuContainerInternal","isNavigationRefreshBudgetCenterOn","isNavigationRefreshOn","NavigationRefreshBudgetCenter","ElementSelector","SubpageMenuContainer","withPermissions","ExpandButton","withComponentErrorLogging","SecondaryNavigationExpandButton","navRefresh","navRefreshSiteMap","_React$Component","_this$props","classnames","BudgetCenterMenuBar","ScopeBarLeftContent","LeftContent","MonthPicker","_components","borderBottom","neutralLight","flexDirection","ExpScorecard","withScope","withContexts","ExperimentScoreCard2","WithSiteMapSubPageMenu","waterfallFilterStorage","WaterfallFilterStorage","preferenceService","forceResetLayout","changeLayout","showExperimentScoreCard","dateFilter","waterfallDateFilterProcessor","getFilters","WaterfallFilterType","DateFilter","getEntityFromScope","expItemFromEdm","Experiments","ExpScorecardLazy","odataURL","parseDateRangeToQuery","oDataToken","Token","experimentFromOData","experimentData","renderScorecard","showDatePicker","withGlobalFilter","recommendationDataStore","StateStore","overallOptimizationScoreBar","store","renderCategoryOptimizationScore","getTabItems","tabItems","categoryScoreUpLifts","ScoreUpLift","Category","categoryScoreUpLift","scoreUpLift","_this$props$store$sta","renderDownloadButton","isAutoApplyRecommendationEnabled","StyledRecOptimizationOverallScore","renderAutoApplyButton","AutoApplyButton","renderHistoryButton","HistoryButton","isAsyncApplyEnabled","IsBAARecommendationsAsyncApplyEnabled","showDownloadButton","categoryItem","categoryScore","formatPercentOneDecimal","_this$props$store$sta2","renderMainOptScore","renderExtraContent","showHistoryButton","showAutoApplyButton","withStateStore","today","fourteenDaysAgo","getHours","getMinutes","formattedToday","toLocaleDateString","formattedStartDate","buttonText","Button","Constants","PagePadding","smallMainSectionLeftPadding","DROP_DOWN_PIVOT_ITEM","navRefreshProcessorSet","processImportCenterMode","processMixedModeAdGroup","processGlobalFilter","processCampaignType","processCampaignId","processSmartCampaign","processSmartShoppingCampaign","processHotelCampaign","processPmaxCampaignPageMenu","processPmaxRetailCampaignPageMenu","TabBar","_React$PureComponent","onSelectPivotItem","itemKey","onSelect","moreButtonRef","openMenu","genereateOverflowMenuItemProps","leftOverItems","menuProps","items","menuItem","generateTabItemsFragment","PivotItem","onRenderItemLink","fallBackTabItem","handleClose","availableTabItems","selectedTabItem","classNameArray","textContainer","localizedName","tabItem","FocusZone","notAvailableTextContainer","fallBackTextContainer","FallbackCallout","show","placement","siteMapId","fallbackGlyph","renderExpandButton","_this$props2","expandButtonContainer","responsiveSize","menuContainerPartClassName","menuContainer","onlyOneTabItem","_this$props3","orderedTabItems","tabItemsFragement","selectedIndex","firstSetOfTabs","restOfTheTabs","newItems","contextualMenu","onRenderMenuIcon","pivotOverflowItem","singleItem","_Fragment","Pivot","defaultSelectedIndex","linkSize","PivotLinkSize","large","onLinkClick","StyledTabBar","_ref$palette","overflow","outlineOffset","themePrimary","neutralQuaternaryAlt","content","white","border","opacity","availableTextContainer","selectedTextContainer","dateFormat","lcid","onSwitchCompare","disableCompare","rangeIds","_getRangesFromData","getRangesFromData","selectedRange","selectedComparedRange","dateRangePickedLogger","dateRangePicked","isImprovedDateRangePickerEnabled","DynamicPermissions","ImprovedDateFilter","ComparedDateRangePicker","isMainDatePicker","shouldShowQuickLeftRightPicker","translateLegacyToIANATimezone","rangeId","RangeId","rangeIndex","RangeIndex","rangeDays","RangeDays","comparedTypeKey","onPickDateRanges","dateFromDatePicker","generateDateData","updateWaterfallFilter","updateToWaterfallFilter","dateRangeLogger","trace","method","DatePickerOnApply","DatePickerOnQuickApply","DatePickerWithScope","withInstrumentation","historyButton","showPopover","toggle","recommendationHistoryItem","Callout","popoverId","popoverClassName","recommendationHistoryPopover","onClose","entityContent","save","getRoutePathById","historyClickHandler","onFocus","onBlur","onMouseOver","onMouseOut","entityContentRecommendationHistory","entityIcon","cursor","outline","backgroundRepeat","whiteSpace","autoApplyButton","showTag","expDate","recommendationAutoApplyItem","recommendationAutoApplyPopover","autoApplyClickHandler","entityContentRecommendationAutoApply","betaTagContainer","getSelectedItemsFromMap","SubPageMenuInternal","subPageItem","activity","_$filter","clickedTabItem","route","history","queryString","isChecked","setClassName","getTextWidth","context","canvas","font","measureText","init","subMenuClassNamePrefix","subMenuClassName","pickerContainerPartClassName","pickerContainer","pickerQuickContainer","tabBarPreFixClassName","getOffset","navMode","menuMode","components","nav","updateDatePickerWidth","newWidth","datePickerWidth","resetLayout","renderDatePicker","civilMinDate","CivilDate","year","month","day","DatePickerWithPageReady","withPageReady","LocaleID","CurrentAccount","TimeZone","CultureDateTimeFormat","ShortDatePattern","filterType","RANGES","Custom","Today","Yesterday","ThisWeek","ThisWeekMon","Last7Days","LastWeek","LastWeekMon","Last14Days","ThisMonth","LastMonth","Last30Days","Last3Months","Last6Months","EntireTime","renderDisabledDatePicker","DisabledDatePickerWithPageReady","DisabledDatePicker","SubPageMenuResponsiveSizes","initialResetLayout","ResponsiveTabBar","getResponsiveTabBar","nextProps","nextState","showDisabledDatePicker","singleTabMode","getIsCopilotExpanded","prevProps","isCopilotExpanded","currentMinWidth","currentItemWidth","COPILOT_WIDTH","withResponsiveSize","selectedleafItem","findSelectedNode","selectedPageMenu","datePickerShowOrHideClass","disabledDatePickerShowOrHideClass","currDatePickerWidth","clientWidth","datePickerOffset","disabledDatePickerOffset","AutoApplyButtonWidth","AutoApplyButtonOffset","historyButtonWidth","historyButtonOffset","downloadButtonWidth","downloadButtonOffset","layout","subMenuSeperator","SubpageMenuInternalWithStyle","subPageMenu","blue","themeDarkAlt","comparedPickerSharedStyle","neutralLighter","summaryButton","withActivityContext","LayoutContext","Consumer","change","level","currentNode","selectedChild","findParentNodeByLevel","levelItems","child","ariaDescription","currentPath","pillControlParams","levelIndex","findIndex","onItemChange","ScopeSelector","DefaultSubTabLoader","CampaignSubTabLoader","SubTabContainer","_objectWithoutProperties","_excluded","FullScreenWithTabConfig","Mode","Hidden","subTab","isTableExpanded","getConfigComponents","Expanded","SummaryBar","canEdit","CampaignSummaryBarLoader","SharedBudgetSummaryBar","SharedBudgetSummaryBarLoader","withStandaloneSiteMap","AccountsSummaryBar","breadCrumbText","processors","AccountsSummaryBarLoader","withAccountsSiteMap","backButtonText","backButtonUrl","SimpleSummaryBar","SimpleSummaryBarLoader","GeneralSummaryBarLoader","backButtonProps","modifiedBackButtonProps","SummaryBarFactory","CampaignODataCallForCustomerLevel","selSummaryBarFallback","breadcrumbUrl","CampaignOData","call","PlacementExclusionLists","selListId","additionalItems","CampaignODataCallForAccountLevel","_excluded2","$makeCall","association","SharedEntityId","SharedEntityName","_excluded3","SiteExclusionListLinkedPageLoader","withRouter","defaultSummaryBarFallback","nkl","NegativeKeywordLists","escapeHatch","NegativeKeywordsListDetailsLoader","getConfig","portfolioName","IsDataExclusionEnabled","DataExclusions","breadcrumbsGeneralConfigs","isCurrentItem","maxDisplayedItems","PermissionsContext","summaryBarFallback","portfolioId","PortfolioBidStrategies","PortfolioDetailsLoader","MerchantCenterSummaryBar","MerchantCenterSummaryBarLoader","QueryInsightsSummaryBar","QueryInsightsSummaryBarLoader","WebInsightsEditor","isInsightOn","onSave","tagId","isToggleOn","setIsToggleOn","triggerDocumentEvent","CustomEvent","detail","dispatchEvent","onSaveClick","IsWebInsightsEnabled","_config$get2","acid","AdvertiserCustomerID","Accounts","Tags","toPromise","onCancelClick","rel","Toggle","onText","offText","gap","uetDashboardPilotEnabled","UETDashboard","trackingStatusMap","Inactive","Unverified","Active","insightSettingOverride","setInsightSettingOverride","updateInsightSettingOverride","tagIds","insight","updateInsightSetting","addEventListener","removeEventListener","resizeGroup","renderContent","IsReadOnly","TrackingStatus","GoalsCount","AudiencesCount","UETTagInsights","Editor","getEditorProps","closeEditor","tag","newIsInsightOn","closeButtonAriaLabel","focusLockContent","SummaryBarContainer","texts","breadcrumb","Breadcrumb","renderBreadCrumb","summaryBar","SummaryBarItemsResizeGroup","summaryBarItems","UetDashboardLoader","transition","isLeafNode","findSiteMap","AssetLibrarySummaryBar","AssetLibrarySummaryBarLoader","AdStudioSummaryBar","AdStudioSummaryBarLoader","assetGroupId","PmaxAssetDetailsSummaryBar","PmaxAssetDetailsSummaryBarLoader","BudgetCenterSummaryBar","BudgetCenterSummaryBarLoader","HotelCenterV2SummaryBarLoader","_useMemo","previousRoute","URL","getBackButtonProps","adId","AdEditorSummaryBarLoader","getBulkDetailConfig","omit","getRuleDetailConfig","getScriptsDetailConfig","pageLocation","pageName","buttonContext","getBulkUploadsBuildSpreadsheetConfig","SITE_MAP_ID","_scope$values","brandListId","listName","setListName","_fetchData","_asyncToGenerator","_regeneratorRuntime","mark","_callee","brandList","wrap","_context","next","getBrandListById","sent","t0","stop","fetchData","path","URI","BrandListsDetailsPageLoader","summaryBarProcessors","RuleDetailSummaryBarLoader","withLastURL","BulkDetailSummaryBarLoader","ScriptsDetailSummaryBarLoader","BulkUploadsBuildSpreadsheetSummaryBarLoader","NegativeKeywordsListDetailsSummaryBarLoader","PortfolioDetailsSummaryBarLoader","CampaignSummaryBarWithLastUrl","QueryInsightsSummaryBarWithLastUrl","UetDashboardSummaryBarWithLastUrl","SharedBudgetSummaryBarWithLastUrl","StandaloneSummaryBarLoader","SiteExclusionListLinkedPageSummaryBarLoader","ToolsPageSummaryBarLoader","AudiencePlannerSummaryBarLoader","FeedItemsPageSummaryBarLoader","AdEditorSummaryBarLoaderInternal","PerformanceTargetsPageSummaryBarLoader","StandaloneAccountsSummaryBarLoader","ImportPageSummaryBarLoader","HotelCenterSummaryBarLoader","HotelCenterV2SummaryBarLoaderInternal","AdInsightSummaryBarLoader","withAdInsightSiteMap","AssetLibrarySummaryBarLoaderInternal","AdStudioSummaryBarLoaderInternal","BidStrategiesSummaryBarLoader","withBidStrategiesSiteMap","AssetGroupCreateAndEditSummaryBarWithLastUrl","BudgetCenterSummaryBarLoaderInternal","BrandListsDetailsPageSummaryBarLoader","SummaryBarContainerInternal","isNavRefresh","SummaryBarPlaceholder","additionalPrefixItems","CampaignScopeBarLoader","allowBackToSmartCampaign","customSummaryBarItemsId","as","AdSummaryBar","summaryBarActivityLogger","campaignType","campaignName","queryParam","QueryParam","adType","adName","Responsive","ResponsiveSearch","DynamicSearch","DynamicResponsive","summaryBarProps","breadcrumbsProps","Default","adGroupId","adGroupName","isAppBarBreadcrumbEnabled","hideBreadcrumb","AdGroupSummaryBar","updateAdGroup","excludedLocationOnly","adGroupSummaryBarItems","adGroupEntityItems","changeStatus","selectedStatus","patch","converter","convertToSummaryBarStatusPatch","showErrorWithAlertCenter","updateBid","CampaignSummaryBar","osData","updateCampaign","skipInvalidateCache","campaignSummaryBarItems","campaignEntityItems","updateInlineBudget","Budget","budget","updateSharedBudget","updateLevel","budgetId","campaignCacheManager","invalidate","sharedComponentFunctionStateStore","updateCampaignStatus","ExperimentAdGroupSummaryBar","experimentAdGroupEntityItems","ExperimentCampaignSummaryBar","updateExperimentCampaign","experimentCampaignEntityItems","changeStartDate","StartDate","changeEndDate","EndDate","SummaryBarInternal","perfMarker","summaryBarSharedProps","currentSummaryBar","has","defaults","isExperiment","getSummaryBarStyle","UpdatableSummaryBar","patchAdGroup","patchCampaign","markAction","campaignSummarybarPerfMarker","_ref$converter","WithBulkUpdateRepository","newAdGroup","SearchBid","CpmBid","CpvBid","bid","previousAdGroup","finalUpdateLevel","newCampaign","previousCampaign","WithPatchExperimentRepository","consumeOdataResults","RenderSummaryBar","adGroupFromOData","campaignFromOData","convertToSummaryBarCampaign","convertToSummaryBarAdGroup","Status","EntityStatus","extendedCampaign","WithExperimentRepository","campaignLoadFallback","getCampaignLoadFallback","consumeAdGroupRepository","SummaryBarWithAdGroupCriterionResults","passThroughProps","WithAdGroupRepository","consumeCampaignRepository","SummaryBarWithCampaignCriterionResults","WithCampaignRepository","consumeOptimizationScoreRepository","SummaryBarWithCampaignAdGroupCriterionResults","WithOptimizationScoreRepository","renderSummaryBar","summaryBarAdGroup","getFinalProps","summaryBarCampaign","convertToSummaryBarExperimentCampaign","omitCampaignType","willUpdate","comparableItem","didUpdate","_this$state","willAdGroupUpdated","willCampaignUpdated","didAdGroupUpdated","didCampaignUpdated","finalCampaign","finalAdGroup","summaryBarScenario","skipUpdateAdGroup","skipUpdateCampaign","getFilteredCampaignTypeFromRawFilter","OptimizationScore","SummaryBarWithScope","SimpleBreadcrumb","selectedItem","standardItems","AccountsSummaryBarInternal","showScopeBackButton","SimpleSummaryBarInternal","customSummaryBarItemsRef","innerText","onClickBackButton","isHideBreadCrumbBack","each","additionalItem","isFunction","getSimpleSummaryBarStyle","SharedBudgetSummaryBarInternal","SummaryBarWithBudgetCriterionResults","WithSharedBudgetRepository","sharedBudgetFromOData","sharedBudgetBarItems","sharedBudgetItems","renderSharedBudgetBreadCrumb","SharedBudgetConsumer","criteriaRenderer","storeNameBreadcrumbItem","storeName","getRouterDep","allStoresBreadcrumbItemWithoughtClick","allStoresText","allStoresBreadcrumbItem","summaryBreadcrumbItem","summaryText","feedDetailsItems","feedName","feedsText","createStoreItems","merchantCenterText","createStoreText","importStepsItems","editMode","importsText","createImportText","updateImportText","placeholderStoresItems","placeholderStoresText","editorialProductIssuesItems","editorialProductIssuesText","reviewRejectionsItems","flagAreaIdCode","editorialProductIssueTitleText","safeGetString","i18nMap","IssueCodes","getMerchantCenterConfig","currentPage","defaultBackButtonProps","preventDefault","back","defaultBreadcrumbsGeneralConfigs","defaultBreadcrumbsManageConfigs","trimScope","Store","setStoreName","setFeedName","getStateFromProps","feedQueries","feedId","getStore","getFeedDetails","feed","defaultStoreQueries","defaultFeedQueries","StyledMerchantCenterSummaryBar","summaryDetails","setSummaryDetails","formattedSummary","formatInsightDetails","isLongText","InsightType","AccountOptimization","noOverflow","renderEntityItem","SummaryBarMetricsPicker","metrics","Metrics","onDetailsUpdated","details","off","GlobalMenuEntityBarInternal","GlobalMenuEntityBar","getCampaignType","convertToBreadCrumbItems","findWhere","campaignTypes","overflowAriaLabel","EntityBreadcrumb","globalMenuEntityBarScenario","renderSummaryBarWithData","SessionStorage","getSessionStorage","AssetLibrarySummaryBarInternal","inProgressTaskCount","setInProgressTaskCount","counter","timerId","setInterval","clearInterval","routePrefix","renderInProgressContent","inProgressContent","ActionButton","count","assetLibrarySummaryBar","animationName","animationDuration","animationIterationCount","animationTimingFunction","AdStudioSummaryBarInternal","dialogOpen","setDialogOpen","onExit","onCancelDialog","querySelector","stopPropagation","hideBackButton","adStudioSummaryBar","Dialog","open","modalType","onOpenChange","DialogSurface","DialogBody","DialogTitle","DialogContent","DialogActions","appearance","DialogTrigger","disableButtonEnhancement","readCampaign","Campaigns","readAssetGroup","AssetGroups","isListingGroup","setCampaignName","assetGroupName","setAssetGroupName","isoDateFormat","BudgetCenterSummaryBarInternal","monthFilter","BudgetCenterMonthFilter","getBudgetCenterSummaryBarStyle","buttonClass","ActivityContext","civilDateToday","isoDateString","parseCivilDate","earliestDate","navigatedDate","setNavigatedDate","isCalloutVisible","setIsCalloutVisible","monthText","formatCivilDate","skeleton","isMonthPickerButtonDisabled","isPrevMonthButtonDisabled","compareCivilMonth","isNextMonthButtonDisabled","toggleIsCalloutVisible","visible","updateSelectedDate","logTrace","api","summaryBarContainer","monthPickerSection","monthPickerButtonText","calendarIcon","monthPickerButton","navigationIcons","newDate","plus","months","navigationIconButtonWrapper","navigationIcon","isBeakVisible","directionalHint","DirectionalHint","bottomCenter","monthPickerCallout","SingleMonthCalendar","onSelectDate","onNavigateDate","isMonthRangePicker","SummaryBarBreadcrumb","campaignTypeI18nText","summaryBarBreadcrumb","tooltipPlacement","EditableItem","itemProps","showEditor","renderEditableItem","renderEditor","isAccountsSummary","wrapped","OverflowContent","withOverflowProp","isTextOverflow","forwardedRef","_ref$entityClassName","entityClassName","_ref$href","passBy","OverlayTrigger","overlay","Tooltip","OverflowEntityItem","onReduceData","currentData","newOverflowIndex","getNextOverflow","overflowIndex","onGrowData","getWindowWidth","innerWidth","documentElement","handleMediaChange","matches","resizeGroupKey","startingData","Media","ResizeGroup","onRenderData","SummaryBarItems","getOverflowSubMenuProps","subMenuProps","onRender","editorProps","renderCalloutSubMenu","calloutProps","preventDismissOnLostFocus","shouldNavigate","onNavigate","renderSummryBarItem","ItemComponent","onItemClick","other","passThroughData","rest","renderOverflowDropdown","overflowItems","overflowDropdownProps","contextualMenuProps","doNotLayer","bottomRightEdge","contextualMenuItemAs","closest","ContextualMenuIconButton","isEditable","entityItems","EntityItem","overflowLabel","PropTypes","BUDGET_SUGGESTION","statusMap","active","paused","convertToCampaign","CampaignSubType","DeliveryStatus","DeliveryStatusDetails","hasBudgetLandscape","contains","bidStrategy","campaignSubType","getAdGroupDisplayBiddingStrategyType","DisplayBiddingStrategyType","convertToAdGroup","bidKey","displayBiddingStrategyType","CampaignTypeByODataValue","originalCampaignName","BaseCampaignName","originalCampaignId","BaseCampaignId","experimentType","ExperimentType","getCriterion","criterionType","criterionFromOData","pick","convertToSummaryBarLocationsAndDevices","parentResults","results","locations","devices","dataNotReady","locationCriterion","radiusCriterion","unit","RadiusUnit","lat","long","latComputed","longComputed","curlyTemplate","Latitude","Longitude","getNameForRadiusLocation","radius","Radius","devicesI18nMap","Smartphones","Computers","Tablets","ConnectedTVs","devicesMap","deviceCriterion","CriterionBid","isXandrCampaign","Multiplier","DeviceName","convertToSummaryBarAudiences","audienceFromOData","AudienceCriterion","AudienceName","totalCount","IsRenameHotelToLodgingEnabled","i18nKey","Smart","PerformanceMax","breadcrumbClickHandler","breadcrumbScope","routerScope","Account","Configs","campaignSiteMap","getCampaignUrl","pageClickHandler","targetPage","summaryBarScopes","accounts","ad","SettingsItem","onKeyDown","submitEvent","OverflowCriteriaItemsContent","targets","renderEditIcon","restNumber","CriteriaItemsInternal","emptyValue","CriteriaItems","RepositoryConsumer","renderAudienceContent","audiences","consumeCampaignAudienceRepository","CampaignAudience","WithCampaignAudienceRepository","consumeAdGroupAudienceRepository","AdGroupAudience","WithAdGroupAudienceRepository","renderLocationDeviceContent","isLocation","renderCampaignLocationDevicesContent","campaignCriterionFromOData","campaignLocationsAndDevices","renderAgGroupLocationDeviceContent","adGroupCriterionFromOData","adGroupLocationsAndDevices","consumeCampaignCriterionRepository","CampaignCriterion","WithCampaignCriterionRepository","consumeAdGroupCriterionRepository","AdGroupCriterion","WithAdGroupCriterionRepository","renderCamapignAudience","renderAdGroupAudience","renderCampaignLocationDevice","renderAdGroupLocationDevice","BudgetNotEditable","budgetLandscapeLegacyStrings","ColumnName_EstimatedSharedBudget","ColumnName_SharedBudgetAmount","ColumnName_BudgetAmount","ColumnName_EstimatedBudget","ColumnName_EstimatedImpressions","ColumnName_EstimatedClicks","ColumnName_EstimatedConversions","ColumnName_EstimatedCost","BudgetLandscape_Table_Budget_Tip_Forecasting","BudgetLandscape_Table_Budget_Tip_Recovery","BudgetLandscape_Table_Budget_Tip","ErrorMessage_InputNumericValue","BudgetSuggestionsValidationMsg","BudgetLandscape_Comment_Recommended","BudgetLandscape_Comment_Current","BudgetLandscape_Table_CustomInput","BudgetLandscape_Comment_Suggested","Apply","Cancel","BudgetLandscape_ConversionStatus_0_linkText","BudgetLandscape_ConversionStatus_0_line1","BudgetLandscape_ConversionStatus_0_line2","BudgetLandscape_ConversionStatus_1","Validation_Base_Field_Not_Valid","Validation_NotEmpty_Required_Field","Validation_String_Max_Length","Validation_String_Min_Length","Validation_String_Invalid_Characters","Validation_Number_Require_Numeric","Validation_Number_Max_Length","Validation_Number_Range_Min","Validation_Number_Range_Max","Validation_Number_Range_Between","Validation_Array_Size_Max","Validation_Array_Size_Between","Validation_Array_Items_Invalid","Validation_Array_Items_Duplicate","Validation_NegativeKeywords_ListName_Required","Validation_NegativeKeywords_Max_Count","Validation_NegativeKeywords_Invalid_Keywords","Validation_NegativeKeywords_Required","getBudgetLandscapeTableView","currentBudgetAmount","isSharedBudget","activityLogger","reject","adInsightApi","AdInsightAPI","getBudgetLandscapeUrl","Authorization","fetchBudgetLandscape","res","rawData","first","BudgetRange","tableView","budgetRange","CeilingValue","DailyRange","FloorValue","BudgetLandScapeTable","opportunityData","buildLegacyI18n","currency","CurrencyCode","conversionSummaryStatus","ConversionStatus","currentBudget","fromBudgetColumn","fromCampaignTab","component","opportunityId","ActionName","Channel","BudgetEditorWithLandscapeInternal","budgetAmount","budgetLandscapeTable","setTableView","BackboneInstanceWrapper","BudgetLandscapeTable","Wrapped","BaseEditorInternal","isLoading","UiBlocker","flexFlow","blocking","loadingText","formFooter","saveButton","wrappers","getBaseEditorStyle","BudgetAmountEditor","errorProcessor","showPerDay","inputClassName","HelpIcon","topic","Input","validationProps","field","BudgetMinRecommend","applyRecommend","minBudget","currencySymbol","getCurrencySymbol","PageContext","AccountCurrencyCode","BudgetTypeEditor","selectedBudgetType","isDisabled","budgetTypes","isDeprecateAcceleratedBudgetEnabled","getBudgetTypes","IsDeprecateAcceleratedBudgetEnabled","Select","budgetSchema","Amount","nullable","CampaignInlineBudgetEditorInternal","serverErrors","which","onValidate","updateBudget","toFixed","updateStatus","budgetType","suggestedBudget","ko_model","rawSuggestedBudget","getBulkEditResponseErrors","getSelectedNewBudget","updateBudgetSchemaRange","minimum","minimumBudget","maximum","maximumBudget","customErrors","range","accountCurrencyCode","dailyRangeFloorValue","oldError","renderInlineBudget","showBudgetMinRecommend","renderInlineBudgetWithLandscape","BudgetEditorWithLandscape","summaryBarBudgetActivity","MinXandrDailyBudgetRangePerCurrency","showBudgetLandscape","IsBudgetInlineSuggestionEnabled","BCCBudgetImprovementEnabled","BaseEditor","ValidationGroup","Form","form","ErrorMessages","messages","getBudgetEditorStyle","SharedBudgetEditorInternal","renderCustomContent","CampaignSharedBudgetEditor","renderBudgetMessage","budgetLink","getBudgetLink","campaignSettingsLink","getCampaignSettingsLink","routeName","getRouteUrl","budget_id","campaign_id","SharedBudgetEditor","CampaignBudgetEditor","CampaignInlineBudgetEditor","adGroupSchema","AdGroup","topicMapping","AdGroupBidEditorInternal","isLowerThanMinBidSuggestion","defaultMSStoreMinSuggestionBid","bidType","BiddingStrategyToBidParam","newBid","updateBidSchemaRange","dealMinimumBid","bidRangeKey","IsBidLessThan5CentsInShoppingCampaignEnabled","BiddingStrategyToRangeKey","isMSStoreAdsCampaign","isXandrVideoAdsCampaign","bidRange","min","max","IsDealEnabledForMsAds","required","summaryBarBidActivity","pageContext","CurrentCampaign","link","minSuggestionBid","getBidEditorStyle","BaseDateEditorInternal","editorName","setDatePicker","BaseDateEditor","datetime","substr","StartDateEditorInternal","changeDate","newSelectedDate","getOdataResponseErrors","summaryBarExperimentCampaignActivity","getDateEditorStyle","EndDateEditorInternal","getChartOptions","Available","Gained","Dismissed","chart","xAxis","yAxis","tickPositions","legend","credits","formatter","plotOptions","bar","animation","pointWidth","series","point","events","click","stacking","states","hover","inactive","hostStyles","gapSpace","tooltipProps","delay","TooltipDelay","viewRecommendationStyle","OptimizationScoreItem","ScopeContext","navigate","button","ctrlKey","shiftKey","altKey","metaKey","recsrc","CHANNEL_TYPES","CAMPAIGN_SUMMARY_BAR","calloutContent","getScore","OverallOptimizationScoreBar","HighchartReactWrapper","TooltipHost","NavigationItem","getCpmText","getBidStrategyMap","CostPerSale","getExperimentStatusMap","Paused","Creating","CreationFailed","Ended","Scheduled","Graduating","Promoting","Graduated","Promoted","GraduateFailed","PromoteFailed","getExperimentTypeMap","TrafficBased","CookieBased","statusEntityItem","StatusDropdown","experimentStatusEntityItem","experimentSplitOptionEntityItem","HelpPopup","originalCampaignEntityItem","$current","campaignClickHandler","getCampaignBudgetEditorName","getFocusLockProps","parentContainer","getAnchor","cssSelector","getTargetContainer","budgetEntityItem","_ref6$hasBudgetLandsc","_ref6$experimentId","_ref6$updateInlineBud","_ref6$updateSharedBud","budgetName","focusLockProps","autoBidStrategyList","bidEntityItem","bidText","isNumber","AdGroupBidEditor","isDateEditable","isStartDate","reformatDate","getDateText","startEndDate","StartDateEditor","EndDateEditor","isNoSettingsPage","isAdGroup","isSettingsPage","endsWith","isAudiencesPage","isBidStrategyEditable","_ref15","isAudienceFeedBasedCampaign","_ref16","isOptimizedTargetingEnabled","_ref17","isOptimizedTargetingEditable","_ref18","autoTargetingEntityItem","_ref19","predictiveTargeting","overflowItemText","sharedEntityItems","_ref20","_ref20$isAdGroup","_ref12","_repositoryConsumer$c","renderCriteriaItem","_ref13","adGroupCriteriaRenderer","campaignCriteriaRenderer","_ref13$isLocation","_ref14","canCriteriaItemEdit","criteriaItems","_ref21","_repositoryConsumer$c2","renderSharedBudgetAmount","renderSharedBudgetType","_ref22","optimizationScoreEntityItem","_ref23","_excluded4","_ref24","_excluded5","_ref25","_excluded6","audienceErrorHandler","notificationApi","showWarning","shellTips","shellDataError","getUnexpectedError","_ref$campaignName","_ref$campaignId","_ref$adGroupName","_ref$adGroupId","_ref$adName","_ref$setClarityTag","currentScope","changeScopeActivity","Ad","onBreadcrumbClick","currentBreadcrumb","amount","typeLocalize","Accelerated","DailyStandard","navigation","select","currentAdGroup","Budgets","CampaignCriterions","$cast","AdGroupCriterions","AudienceAssociations","DateRange","budgetIdFromScope","currentEntity","updatedBudgetId","bulkUpdate","AdGroups","setting","setOsData","featureInstrumentation","addScenario","currentScenario","loadRecommendationTile","currentActivity","RecommendationService","token","levelAt","levelAtConstant","CAMPAIGN","entityIds","odataPath","CultureLcid","isNoExpand","getSummary","ignoreCoupons","overflowY","overflowX","calloutCloseButtonStyle","datePickerStyle","wordBreak","maxHeight","textOverflow","borderTop","borderWidth","NeutralColors","gray80","neutralTertiaryAlt","hideChartButtonLocator","showChartButtonLocator","hideChart","restoreChart","isChartOpen","getLabelStyle","semanticColors","predicateValueEditorStyle","labelsCellScopeStyle","bodyBackground","boxShadow","boxSizing","fontStyle","W","M","ZIndexContentComponents","StatusPopup","overflowWrap","labelsCellItemStyle","scopePanel","CopilotFullScreenWithTabConfig","showCopilot","entries","_entries$i","isMatch","isEqual","ToolbarContainerUINext","toggleExpandTable","originalConfig","topBanner","Collapsed","originalChartState","dismiss","floatingBannerId","showInfo","hotKey","ToolbarContainerBase","isTableExpandedFlag","selectionCount","isCrossPageAllSelected","isSinglePageAllSelected","isMultiPage","onDataDidRender","toolbarSelectedConfig","toolbarUnselectedConfig","ToolbarContainer","withHotKeys","_ref$semanticColors","_ref$spacing","spacing","getGlobalStyles","ShortcutType","CollapseTable","pug","module","exports","locals","pug_interp","pug_html","locals_for_with","escape","customHelpContent","pug_mixins","$$obj","pug_index0","$$l","entityTypeLocalized","entityTypeFormatted","cssClass","checkState","ariaCheckedStatus","direction","html"],"sourceRoot":""}