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KAAMnE,iBACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,WACN0gD,YAAajI,IAEf,CACE72C,GAAI,EACJuC,KAAMnE,sBACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,UACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,QACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,aACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,UACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,UACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,aACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,WACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,SACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,UACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,WACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,yBACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,SACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,iBACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,2BACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,mBACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,0BACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,eACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,WACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,WACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,QACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,WACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,UACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,gBACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,OACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,UACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,YACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,SACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,YACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,UACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,OACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,gBACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,SACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,QACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,YACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,OACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,UACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,QACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,UACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,aACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,UACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,QACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,SACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,WACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,WACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,mBACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,YACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,WACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,UACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,aACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,UACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,QACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,QACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,cACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,cACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,UACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,OACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,iBACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,2BACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,OACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,WACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,QACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,mBACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,cACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,mBACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,QACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,SACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,wBACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,cACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,mCACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,QACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,aACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,eACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,YACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,UACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,eACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,QACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,YACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,WACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,SACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,cACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,aACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,WACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,WACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,aACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,UACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,QACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,sBACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,2BACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,SACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,SACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,uBACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,+BACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,UACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,UACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,SACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,WACN0gD,YAAajI,MAEhBvD,EAAwB,CAAC,CACxBtzC,GAAI,EACJuC,KAAMnE,UACN0gD,YAAajI,IAEf,CACE72C,GAAI,EACJuC,KAAMnE,UACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,UACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,QACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,eACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,WACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,2BACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,UACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,gBACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,mCACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,WACN0gD,YAAajI,IAEf,CACE72C,GAAI,KACJuC,KAAMnE,gBACN0gD,YAAajI,IAEf,CACE72C,GAAI,KACJuC,KAAMnE,mBACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,QACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,aACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,SACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,QACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,aACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,aACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,aACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,aACN0gD,YAAajI,IAEf,CACE72C,GAAI,KACJuC,KAAMnE,UACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,SACN0gD,YAAajI,IAEf,CACE72C,GAAI,KACJuC,KAAMnE,gBACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,QACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,oBACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,UACN0gD,YAAajI,IAEf,CACE72C,GAAI,KACJuC,KAAMnE,4BACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,UACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,cACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,OACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,UACN0gD,YAAajI,IAEf,CACE72C,GAAI,KACJuC,KAAMnE,oBACN0gD,YAAajI,MAEdvD,EAAwB,CAAC,CACxBtzC,GAAI,GACJuC,KAAMnE,UACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,gBACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,aACN0gD,YAAajI,IAEf,CACE72C,GAAI,IACJuC,KAAMnE,cACN0gD,YAAajI,MAEdvD,EAAyB,CAAC,CACzBtzC,GAAI,IACJuC,KAAMnE,QACN0gD,YAAajI,IAEf,CACE72C,GAAI,EACJuC,KAAMnE,YACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,UACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,QACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,WACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,aACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,qBACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,UACN0gD,YAAajI,IAEf,CACE72C,GAAI,GACJuC,KAAMnE,cACN0gD,YAAajI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AAUyqH,EAAaD,EAAMG,YAMnI,CAEAiH,GAAwBz6G,aAAe,CACrCwc,WAAOxG,E","sources":["../../../../component-react-fluent-v2/packages/ad-status/src/style.js","../../../../component-react-fluent-v2/packages/ad-status/src/index.js","../../../../component-react-fluent-v2/packages/ad-status/src/ad-status-with-validation.js","../../../../component-react-fluent-v2/packages/ad-status/src/ad-status-section.js","../../../../component-react-fluent-v2/packages/app-store-selector/src/constants/countries.js","../../../../component-react-fluent-v2/packages/app-store-selector/src/constants/index.js","../../../../component-react-fluent-v2/packages/app-store-selector/src/use-app-store-repository.js","../../../../component-react-fluent-v2/packages/app-store-selector/src/components/app-panel.js","../../../../component-react-fluent-v2/packages/app-store-selector/src/components/app-item.js","../../../../component-react-fluent-v2/packages/app-store-selector/src/app-store-selector.js","../../../../component-react-fluent-v2/packages/budget-suggestion-v2/src/model/api-parser.js","../../../../component-react-fluent-v2/packages/budget-suggestion-v2/src/model/constants.js","../../../../component-react-fluent-v2/packages/budget-suggestion-v2/src/components/budget-item.js","../../../../component-react-fluent-v2/packages/budget-suggestion-v2/src/components/budget-suggestion-container.js","../../../../component-react-fluent-v2/packages/budget-suggestion-v2/src/components/budget-suggestion-offline-container.js","../../../../component-react-fluent-v2/packages/budget-suggestion-v2/src/components/use-budget-metrics-logger.js","../../../../component-react-fluent-v2/packages/budget-suggestion-v2/src/use-budget-suggestion-repository.js","../../../../component-react-fluent-v2/packages/budget-suggestion-v2/src/budget-suggestion.js","../../../../component-react-fluent-v2/packages/budget-suggestion-v2/src/budget-suggestion-dialog.js","../../../../component-react-fluent-v2/packages/confirmation-dialog-v2/src/use-confirm-dialog.js","../../../../component-react-fluent-v2/packages/confirmation-dialog-v2/src/styles.js","../../../../component-react-fluent-v2/packages/confirmation-dialog-v2/src/use-confirm-dialog-with-image.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/constants/tab-list.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/constants/search-input.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/style/tab-list-style.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/tab.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/util/get-search-range.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/util/grid-columns.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/grid-data-source.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/style/no-recommendation-warning-style.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/no-recommendation-warning.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/style/grid-style.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/keyword-ranking.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/style/search-input-style.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/search-input.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/search-input-stack.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/util/location-util.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/demo/default/example-data.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/util/use-keyword-suggestion.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/util/use-location-check.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/util/language-util.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/search-input-stack-container.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/style/keyword-groups-style.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/style/keyword-group-style.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/style/viewall-panel-style.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/style/action-bar-style.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/action-bar.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/style/panel-header-style.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/panel-header.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/keyword-group-view-all-panel.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/keyword-group.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/util/use-circular-buffer-view.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/keyword-groups.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/style/keyword-planner-style.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/no-data.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/keyword-planner.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/style/panel-style.js","../../../../component-react-fluent-v2/packages/copilot-keyword-planner/src/keyword-planner-panel.js","../../../../component-react-fluent-v2/packages/diagnostic-card/src/styles/status-section-styles.js","../../../../component-react-fluent-v2/packages/diagnostic-card/src/components/status-section/status-section.js","../../../../component-react-fluent-v2/packages/carousel/src/styles.js","../../../../component-react-fluent-v2/packages/carousel/src/index.js","../../../../component-react-fluent-v2/packages/carousel/src/utils.js","../../../../component-react-fluent-v2/packages/carousel/src/simple-carousel.js","../../../../component-react-fluent-v2/packages/diagnostic-card/src/styles/action-cards-styles.js","../../../../component-react-fluent-v2/packages/diagnostic-card/src/components/action-cards/action-card.js","../../../../component-react-fluent-v2/packages/diagnostic-card/src/components/action-cards/action-cards.js","../../../../component-react-fluent-v2/packages/diagnostic-card/src/styles/diagnostic-card-styles.js","../../../../component-react-fluent-v2/packages/diagnostic-card/src/diagnostic-card.js","../../../../component-react-fluent-v2/packages/fonts-selector/src/assets/index.js","../../../../component-react-fluent-v2/packages/fonts-selector/src/constants/font-families.js","../../../../component-react-fluent-v2/packages/fonts-selector/src/constants/font-weights.js","../../../../component-react-fluent-v2/packages/fonts-selector/src/components/fonts-family-selector.js","../../../../component-react-fluent-v2/packages/fonts-selector/src/components/fonts-weight-selector.js","../../../../component-react-fluent-v2/packages/keyword-planner-shared/src/consts.js","../../../../component-react-fluent-v2/packages/keyword-planner-shared/src/config.js","../../../../component-react-fluent-v2/packages/keyword-planner-shared/src/util.js","../../../../component-react-fluent-v2/packages/keyword-planner-shared/src/settings-config.js","../../../../component-react-fluent-v2/packages/keyword-planner-shared/mock/mock-data.js","../../../../component-react-fluent-v2/packages/keyword-planner-shared/src/use-keyword-planner-service.js","../../../../component-react-fluent-v2/packages/keyword-planner-shared/src/KRT-locations.js","../../../../component-react-fluent-v2/packages/multi-selector/src/with-multi-select-combobox.js","../../../../component-react-fluent-v2/packages/multi-selector/src/multi-selector-context.js","../../../../component-react-fluent-v2/packages/multi-selector/src/multi-selector-context-provider.js","../../../../component-react-fluent-v2/packages/multi-selector/src/use-options-async-datasource.js","../../../../component-react-fluent-v2/packages/multi-selector/src/use-options-async-datasource-with-client-filter.js","../../../../component-react-fluent-v2/packages/multi-selector/src/use-selected-options-async-datasource.js","../../../../component-react-fluent-v2/packages/multi-selector/src/use-fluent-v1-styles.js","../../../../component-react-fluent-v2/packages/multimedia-ad-adjustment/src/style.js","../../../../component-react-fluent-v2/packages/multimedia-ad-adjustment/src/util.js","../../../../component-react-fluent-v2/packages/multimedia-ad-adjustment/src/multimedia-ad-bid-adjustment.js","../../../../component-react-fluent-v2/packages/multimedia-ad-adjustment/src/automated-cta.js","../../../../component-react-fluent-v2/packages/multimedia-ad-adjustment/src/switch-use-campaign-setting.js","../../../../component-react-fluent-v2/packages/multimedia-ad-adjustment/src/multimedia-ad-bid-adjustment-setting.js","../../../../component-react-fluent-v2/packages/multimedia-ad-adjustment/src/multimedia-ad-bid-adjustment-section.js","../../../../component-react-fluent-v2/packages/new-customer-acquisition/src/side-panel/additional-conversion-input-pure.js","../../../../component-react-fluent-v2/packages/new-customer-acquisition/src/constants.js","../../../../component-react-fluent-v2/packages/new-customer-acquisition/src/side-panel/additional-conversion-input-section.js","../../../../component-react-fluent-v2/packages/new-customer-acquisition/src/side-panel/audience-list-section.js","../../../../component-react-fluent-v2/packages/new-customer-acquisition/src/data-source.js","../../../../component-react-fluent-v2/packages/new-customer-acquisition/src/side-panel/customer-acquisition-setup.js","../../../../component-react-fluent-v2/packages/new-customer-acquisition/src/message-bars.js","../../../../component-react-fluent-v2/packages/new-customer-acquisition/src/new-customer-acquisition-impl.js","../../../../component-react-fluent-v2/packages/new-customer-acquisition/src/new-customer-acquisition.js","../../../../component-react-fluent-v2/packages/new-customer-acquisition/src/new-customer-acquisition-header.js","../../../../component-react-fluent-v2/packages/performance-insights/src/constants/consts.js","../../../../component-react-fluent-v2/packages/performance-insights/src/style/style.js","../../../../component-react-fluent-v2/packages/performance-insights/src/performance-insights-panel.js","../../../../component-react-fluent-v2/packages/performance-insights/src/performance-insights-tooltip-card.js","../../../../component-react-fluent-v2/packages/performance-insights/src/util/service.js","../../../../component-react-fluent-v2/packages/performance-insights/src/util/util.js","../../../../component-react-fluent-v2/packages/sparkle-icon/src/index.js","../../../../component-react-fluent-v2/packages/status-popover/src/const.js","../../../../component-react-fluent-v2/packages/status-popover/src/styles/icon-styles.js","../../../../component-react-fluent-v2/packages/status-popover/src/components/status-icon.js","../../../../component-react-fluent-v2/packages/status-popover/src/styles/status-popover-styles.js","../../../../component-react-fluent-v2/packages/status-popover/src/components/status-popover-item.js","../../../../component-react-fluent-v2/packages/url-input-fluent-v2/src/validation.js","../../../../component-react-fluent-v2/packages/url-input-fluent-v2/src/styles.js","../../../../component-react-fluent-v2/packages/url-input-fluent-v2/src/url-path-fluent.js","../../../../component-react-fluent-v2/packages/url-input-fluent-v2/src/utils.js","../../../../component-react-fluent-v2/packages/url-input-fluent-v2/src/url-input-fluent.js","../../../../component-react-fluent-v2/packages/url-input-fluent-v2/src/with-no-protocol.js","../../../../component-react-fluent-v2/packages/validated-url-input-fluent-v2/src/validated-final-url.tsx","../../../../component-react-fluent-v2/packages/wizard-shared-components-v2/src/shimmers/section-shimmer.js","../../../../component-react-fluent-v2/packages/wizard-shared-components-v2/src/panels/placement-target-panel.js","../../../../component-react-fluent-v2/packages/wizard-shared-components-v2/src/panels/panel-keys.js","../../../../component-react-fluent-v2/packages/performance-card/src/chart-data/formatter/tooltip-template-ui-next.pug","../../../../component-react-fluent-v2/packages/top-locations-card/src/components/map-tooltip.pug","../../../../component-react-fluent-v2/packages/asset-performance-card/src/card/shimmer-card.tsx","../../../../component-react-fluent-v2/packages/asset-performance-card/src/styles/no-asset-card-styles.ts","../../../../component-react-fluent-v2/packages/asset-performance-card/src/card/no-assets-card.tsx","../../../../component-react-fluent-v2/packages/asset-performance-card/src/card/columns.ts","../../../../component-react-fluent-v2/packages/asset-performance-card/src/styles/asset-preview-styles.ts","../../../../component-react-fluent-v2/packages/asset-performance-card/src/utils/get-localized-call-to-action-string.ts","../../../../component-react-fluent-v2/packages/asset-performance-card/src/card/asset-preview.tsx","../../../../component-react-fluent-v2/packages/asset-performance-card/src/styles/performance-tag-styles.ts","../../../../component-react-fluent-v2/packages/asset-performance-card/src/utils/use-get-performance-tag.tsx","../../../../component-react-fluent-v2/packages/asset-performance-card/src/styles/asset-status-styles.ts","../../../../component-react-fluent-v2/packages/asset-performance-card/src/utils/use-get-styled-asset-status.tsx","../../../../component-react-fluent-v2/packages/asset-performance-card/src/utils/get-page-assets.ts","../../../../component-react-fluent-v2/packages/asset-performance-card/src/popover/consts.ts","../../../../component-react-fluent-v2/packages/asset-performance-card/src/styles/popover-styles.ts","../../../../component-react-fluent-v2/packages/asset-performance-card/src/popover/asset-performance-popover.tsx","../../../../component-react-fluent-v2/packages/asset-performance-card/src/styles/asset-table-styles.ts","../../../../component-react-fluent-v2/packages/asset-performance-card/src/card/asset-table.tsx","../../../../component-react-fluent-v2/packages/asset-performance-card/src/popover/asset-performance-popover-with-conversions.tsx","../../../../component-react-fluent-v2/packages/asset-performance-card/src/card/asset-table-with-conversions.tsx","../../../../component-react-fluent-v2/packages/asset-performance-card/src/utils/use-get-styled-asset-conversions.tsx","../../../../component-react-fluent-v2/packages/asset-performance-card/src/card/use-pagination-config.ts","../../../../component-react-fluent-v2/packages/asset-performance-card/src/utils/format-date.ts","../../../../component-react-fluent-v2/packages/asset-performance-card/src/filter/const.ts","../../../../component-react-fluent-v2/packages/asset-performance-card/src/card/use-filtered-asset-data.ts","../../../../component-react-fluent-v2/packages/asset-performance-card/src/styles/card-styles.ts","../../../../component-react-fluent-v2/packages/asset-performance-card/src/card/asset-performance-card.tsx","../../../../component-react-fluent-v2/packages/asset-performance-card/src/card/with-filtered-asset-data.tsx","../../../../component-react-fluent-v2/packages/asset-performance-card/src/utils/get-asset-container-with-status.tsx","../../../../component-react-fluent-v2/packages/asset-performance-card/src/filter/with-asset-groups.tsx","../../../../component-react-fluent-v2/packages/asset-performance-card/src/styles/filter-styles.ts","../../../../component-react-fluent-v2/packages/asset-performance-card/src/filter/asset-performance-filter.tsx","../../../../component-react-fluent-v2/packages/audience-interests/src/audience-estimation/use-targeting-estimation-caller.js","../../../../component-react-fluent-v2/packages/audience-interests/src/utils.js","../../../../component-react-fluent-v2/packages/audience-interests/src/audience-estimation/ima-audience-estimation.js","../../../../component-react-fluent-v2/packages/audience-interests/src/interests-selector/estimation.js","../../../../component-react-fluent-v2/packages/audience-interests/src/interests-selector/interests-selector.js","../../../../component-react-fluent-v2/packages/audience-interests/src/audience-interest.js","../../../../component-react-fluent-v2/packages/budget-component-v2/src/use-budget-range.ts","../../../../component-react-fluent-v2/packages/budget-component-v2/src/styles/budget-input-styles.ts","../../../../component-react-fluent-v2/packages/budget-component-v2/src/budget-input-pure.tsx","../../../../component-react-fluent-v2/packages/budget-component-v2/src/styles/validated-budget-input-styles.ts","../../../../component-react-fluent-v2/packages/budget-component-v2/src/validated-budget-input.tsx","../../../../component-react-fluent-v2/packages/status-summary-card/src/components/use-is-read-only-user.ts","../../../../component-react-fluent-v2/packages/status-summary-card/src/components/dropdown-menu-button.tsx","../../../../component-react-fluent-v2/packages/status-summary-card/src/components/dialog-edit-button.tsx","../../../../component-react-fluent-v2/packages/status-summary-card/src/styles/styles.ts","../../../../component-react-fluent-v2/packages/status-summary-card/src/components/icon.tsx","../../../../component-react-fluent-v2/packages/status-summary-card/src/status-summary-card.tsx","../../../../component-react-fluent-v2/packages/campaign-status-summary-cards/src/styles/footer-styles.ts","../../../../component-react-fluent-v2/packages/campaign-status-summary-cards/src/components/with-footer.tsx","../../../../component-react-fluent-v2/packages/campaign-status-summary-cards/src/components/use-read-campaign.ts","../../../../component-react-fluent-v2/packages/campaign-status-summary-cards/src/utils/create-or-update-campaign.ts","../../../../component-react-fluent-v2/packages/campaign-status-summary-cards/src/components/use-repository.ts","../../../../component-react-fluent-v2/packages/campaign-status-summary-cards/src/utils/api-error-mapper.ts","../../../../component-react-fluent-v2/packages/campaign-status-summary-cards/src/styles/budget-card-styles.ts","../../../../component-react-fluent-v2/packages/campaign-status-summary-cards/src/components/budget-card.tsx","../../../../component-react-fluent-v2/packages/campaign-status-summary-cards/src/utils/linkedin-campaign-utils.ts","../../../../component-react-fluent-v2/packages/campaign-status-summary-cards/src/styles/bid-strategy-card-styles.ts","../../../../component-react-fluent-v2/packages/campaign-status-summary-cards/src/components/bid-strategy-card.tsx","../../../../component-react-fluent-v2/packages/campaign-status-summary-cards/src/components/campaign-status-card.tsx","../../../../component-react-fluent-v2/packages/campaign-status-summary-cards/src/styles/styles.ts","../../../../component-react-fluent-v2/packages/campaign-status-summary-cards/src/campaign-status-summary-cards.tsx","../../../../component-react-fluent-v2/packages/card-selector/src/card-config.ts","../../../../component-react-fluent-v2/packages/card-selector/src/styles/card-styles.ts","../../../../component-react-fluent-v2/packages/card-selector/src/card.tsx","../../../../component-react-fluent-v2/packages/card-selector/src/styles/card-selector-styles.ts","../../../../component-react-fluent-v2/packages/card-selector/src/card-selector.tsx","../../../../component-react-fluent-v2/packages/dropdown-tree-select/src/utils.ts","../../../../component-react-fluent-v2/packages/dropdown-tree-select/src/styles.ts","../../../../component-react-fluent-v2/packages/dropdown-tree-select/src/index.tsx","../../../../component-react-fluent-v2/packages/goal-selector-v3/src/data.ts","../../../../component-react-fluent-v2/packages/goal-selector-v3/src/table-view-section-styles.ts","../../../../component-react-fluent-v2/packages/goal-selector-v3/src/constants.ts","../../../../component-react-fluent-v2/packages/goal-selector-v3/src/components/tracking-status-popover-styles.ts","../../../../component-react-fluent-v2/packages/protected-link/src/protected-link.tsx","../../../../component-react-fluent-v2/packages/goal-selector-v3/src/components/navigation-popup.tsx","../../../../component-react-fluent-v2/packages/goal-selector-v3/src/components/tracking-status-popover.tsx","../../../../component-react-fluent-v2/packages/goal-selector-v3/src/utils.ts","../../../../component-react-fluent-v2/packages/goal-selector-v3/src/components/empty-state-result-styles.ts","../../../../component-react-fluent-v2/packages/goal-selector-v3/src/components/empty-state-result.tsx","../../../../component-react-fluent-v2/packages/goal-selector-v3/src/components/header-control-styles.ts","../../../../component-react-fluent-v2/packages/goal-selector-v3/src/components/header-control.tsx","../../../../component-react-fluent-v2/packages/goal-selector-v3/src/table-view-section.tsx","../../../../component-react-fluent-v2/packages/goal-selector-v3/src/goal-selector.tsx","../../../../component-react-fluent-v2/packages/goal-selector-v3/src/use-goal-selector-state.ts","../../../../component-react-fluent-v2/packages/overview-card-footer/src/overview-card-footer.tsx","../../../../component-react-fluent-v2/packages/overview-card-footer/src/use-pagination-config.tsx","../../../../component-react-fluent-v2/packages/overview-grid-entity-name/src/status-icon.tsx","../../../../component-react-fluent-v2/packages/overview-grid-entity-name/src/search-term-actions.tsx","../../../../component-react-fluent-v2/packages/overview-grid-entity-name/src/entity-name.tsx","../../../../component-react-fluent-v2/packages/overview-performance-table/src/table-cell/metric-cell.tsx","../../../../component-react-fluent-v2/packages/overview-performance-table/src/table-cell/metric-picker-menu-button.tsx","../../../../component-react-fluent-v2/packages/overview-performance-table/src/table-cell/metric-header-cell.tsx","../../../../component-react-fluent-v2/packages/overview-performance-table/src/const.ts","../../../../component-react-fluent-v2/packages/overview-performance-table/src/table-shimmer.tsx","../../../../component-react-fluent-v2/packages/overview-performance-table/src/overview-performance-table.tsx","../../../../component-react-fluent-v2/packages/overview-performance-table/src/columns.tsx","../../../../component-react-fluent-v2/packages/overview-top-changes/src/metric-picker.tsx","../../../../component-react-fluent-v2/packages/overview-top-changes/src/table-cell/text-cell.tsx","../../../../component-react-fluent-v2/packages/overview-top-changes/src/table-cell/change-bar-cell.tsx","../../../../component-react-fluent-v2/packages/overview-top-changes/src/table-cell/insight-cell.tsx","../../../../component-react-fluent-v2/packages/overview-top-changes/src/popover-info.tsx","../../../../component-react-fluent-v2/packages/overview-top-changes/src/const.ts","../../../../component-react-fluent-v2/packages/overview-top-changes/src/columns.tsx","../../../../component-react-fluent-v2/packages/overview-top-changes/src/table-shimmer.tsx","../../../../component-react-fluent-v2/packages/overview-top-changes/src/overview-top-changes.tsx","../../../../component-react-fluent-v2/packages/overview-top-changes/src/get-comparison-text.ts","../../../../component-react-fluent-v2/packages/overview-welcome-tips/src/load-shimmer.tsx","../../../../component-react-fluent-v2/packages/overview-welcome-tips/src/consts.ts","../../../../component-react-fluent-v2/packages/overview-welcome-tips/src/use-tips-config.tsx","../../../../component-react-fluent-v2/packages/overview-welcome-tips/src/tip.tsx","../../../../component-react-fluent-v2/packages/overview-welcome-tips/src/use-action-buttons.ts","../../../../component-react-fluent-v2/packages/overview-welcome-tips/src/overview-welcome-tips.tsx","../../../../component-react-fluent-v2/packages/performance-card/src/styles/metric-picker-item.ts","../../../../component-react-fluent-v2/packages/performance-card/src/components/metric-picker-item.tsx","../../../../component-react-fluent-v2/packages/performance-card/src/components/metric-picker-shimmer.tsx","../../../../component-react-fluent-v2/packages/performance-card/src/styles/metric-picker.ts","../../../../component-react-fluent-v2/packages/performance-card/src/components/metric-picker.tsx","../../../../component-react-fluent-v2/packages/performance-card/src/styles/no-data.ts","../../../../component-react-fluent-v2/packages/performance-card/src/components/no-data.tsx","../../../../component-react-fluent-v2/packages/performance-card/src/styles/performance-card.ts","../../../../component-react-fluent-v2/packages/performance-card/src/chart-data/formatter/format-tooltip.js","../../../../component-react-fluent-v2/packages/performance-card/src/styles/color.ts","../../../../component-react-fluent-v2/packages/performance-card/src/styles/line.ts","../../../../component-react-fluent-v2/packages/performance-card/src/chart-data/use-chart-data.ts","../../../../component-react-fluent-v2/packages/performance-card/src/chart-data/static-options.ts","../../../../component-react-fluent-v2/packages/performance-card/src/chart-data/chart-view-options.ts","../../../../component-react-fluent-v2/packages/performance-card/src/styles/chart.ts","../../../../component-react-fluent-v2/packages/performance-card/src/chart-data/fluent-chart-view-options.ts","../../../../component-react-fluent-v2/packages/performance-card/src/components/with-chart.tsx","../../../../component-react-fluent-v2/packages/performance-card/src/performance-card.tsx","../../../../component-react-fluent-v2/packages/pmax-overview-responsive-utils/src/utils.ts","../../../../component-react-fluent-v2/packages/searchable-multi-selector-input/src/components/styles.ts","../../../../component-react-fluent-v2/packages/searchable-multi-selector-input/src/components/combobox.tsx","../../../../component-react-fluent-v2/packages/searchable-multi-selector-input/src/searchable-multi-selector-input.tsx","../../../../component-react-fluent-v2/packages/searchable-multi-selector-input/src/hooks/use-paginated-fetching-state.ts","../../../../component-react-fluent-v2/packages/searchable-multi-selector-input/src/hooks/use-fetching-state.ts","../../../../component-react-fluent-v2/packages/searchable-multi-selector-input/src/hooks/use-filter-on-client.ts","../../../../component-react-fluent-v2/packages/summary-diagnostic/src/constants.ts","../../../../component-react-fluent-v2/packages/summary-diagnostic/src/diagnostic-bar.tsx","../../../../component-react-fluent-v2/packages/summary-diagnostic/src/summary-diagnostic.tsx","../../../../component-react-fluent-v2/packages/target-cpa-warning-banner/src/utils.ts","../../../../component-react-fluent-v2/packages/target-cpa-warning-banner/src/log-target-cpa-check-on-save.tsx","../../../../component-react-fluent-v2/packages/target-cpa-warning-banner/src/target-cpa-warning-banner.tsx","../../../../component-react-fluent-v2/packages/top-locations-card/src/utils/filter-location-data.ts","../../../../component-react-fluent-v2/packages/top-locations-card/src/utils/const.ts","../../../../component-react-fluent-v2/packages/top-locations-card/src/utils/format-location-data.ts","../../../../component-react-fluent-v2/packages/top-locations-card/src/components/use-top-locations-data.ts","../../../../component-react-fluent-v2/packages/top-locations-card/src/components/fetch-location-data.ts","../../../../component-react-fluent-v2/packages/top-locations-card/src/utils/is-us-or-canada.ts","../../../../component-react-fluent-v2/packages/top-locations-card/src/styles/metric-selector-styles.ts","../../../../component-react-fluent-v2/packages/top-locations-card/src/components/metric-selector.tsx","../../../../component-react-fluent-v2/packages/top-locations-card/src/styles/footer-styles.ts","../../../../component-react-fluent-v2/packages/top-locations-card/src/components/footer.tsx","../../../../component-react-fluent-v2/packages/top-locations-card/src/styles/no-locations-styles.ts","../../../../component-react-fluent-v2/packages/top-locations-card/src/components/no-data.tsx","../../../../component-react-fluent-v2/packages/top-locations-card/src/components/shimmer.tsx","../../../../component-react-fluent-v2/packages/top-locations-card/src/styles/table-styles.ts","../../../../component-react-fluent-v2/packages/top-locations-card/src/components/top-locations-table.tsx","../../../../component-react-fluent-v2/packages/top-locations-card/src/utils/get-page-locations.ts","../../../../component-react-fluent-v2/packages/top-locations-card/src/styles/map-styles.ts","../../../../component-react-fluent-v2/packages/top-locations-card/src/components/top-locations-map.tsx","../../../../component-react-fluent-v2/packages/top-locations-card/src/components/use-pagination-config.ts","../../../../component-react-fluent-v2/packages/top-locations-card/src/components/with-preferences-metric.tsx","../../../../component-react-fluent-v2/packages/top-locations-card/src/styles/card-styles.ts","../../../../component-react-fluent-v2/packages/top-locations-card/src/components/top-locations-card.tsx","../../../../component-react-fluent-v2/packages/top-locations-card/src/components/with-bing-maps-context.tsx","../../../../component-react-fluent-v2/packages/top-locations-card/src/styles/view-selector-styles.ts","../../../../component-react-fluent-v2/packages/top-locations-card/src/components/view-selector.tsx"],"sourcesContent":["export const getAdStatuStyles = () => ({\r\n dropdown: {\r\n '&.fui-Dropdown': {\r\n borderColor: '#605e5c',\r\n '&:hover': {\r\n borderColor: '#605e5c',\r\n },\r\n },\r\n '&:after': {\r\n display: 'none',\r\n },\r\n },\r\n selectedOption: {\r\n backgroundColor: '#f3f2f1',\r\n },\r\n option: {\r\n '& span': {\r\n display: 'none',\r\n },\r\n },\r\n});\r\n\r\n","import React, { useCallback, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport classNames from 'classnames';\r\nimport {\r\n Dropdown,\r\n Option,\r\n Label,\r\n FluentProvider,\r\n webLightTheme,\r\n} from '@fluentui/react-components';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { getAdStatuStyles } from './style';\r\n\r\nconst adStatusOptions = [\r\n {\r\n textKey: _TL_('Active'),\r\n value: 'Active',\r\n },\r\n {\r\n textKey: _TL_('Paused'),\r\n value: 'Paused',\r\n },\r\n];\r\n\r\nconst dropdownId = 'responsiveAdStatusLabel';\r\n\r\nexport const AdStatus = ({ onAdStatusChange, data: value }) => {\r\n const i18n = useContext(I18nContext);\r\n const classes = useDefaultStyles(getAdStatuStyles);\r\n\r\n const handleStatusChange = useCallback(\r\n (e, data) => {\r\n onAdStatusChange(data.optionValue);\r\n },\r\n [onAdStatusChange]\r\n );\r\n\r\n const currentValue = value || 'Active';\r\n const currentText = i18n.getString(_.find(adStatusOptions, option => option.value === currentValue).textKey);\r\n\r\n return (\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n {adStatusOptions.map(option => (\r\n \r\n ))}\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nAdStatus.propTypes = {\r\n onAdStatusChange: PropTypes.func.isRequired,\r\n data: PropTypes.string.isRequired,\r\n};\r\n","import React, { useCallback, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { withCustomValidation } from '@bingads-webui-react/validation';\r\nimport { AdStatus } from './index';\r\n\r\nexport const AdStatusWithCustomValidation = ({\r\n validationProps, updateValidation,\r\n}) => {\r\n const { data } = validationProps;\r\n const status = data && data.AdStatus;\r\n\r\n const handleStatusChange = useCallback((newData) => {\r\n updateValidation([], { AdStatus: newData });\r\n }, [updateValidation]);\r\n\r\n useEffect(() => {\r\n updateValidation([], { AdStatus: status || 'Active' });\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, []); // only run onece\r\n\r\n return ;\r\n};\r\n\r\nAdStatusWithCustomValidation.propTypes = {\r\n validationProps: PropTypes.shape({\r\n data: PropTypes.shape({\r\n AdStatus: PropTypes.string,\r\n }),\r\n }).isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n};\r\n\r\nexport const ValidatedAdStatus = withCustomValidation(AdStatusWithCustomValidation);\r\n","import React, { useContext, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n getPanelErrorProps,\r\n TextTitle,\r\n ValidatedPanel,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { ValidatedAdStatus } from './ad-status-with-validation';\r\n\r\nconst getStatusSummary = (i18n, status) => (status === 'Active' ? i18n.getString(_TL_('Ad status: Active')) : i18n.getString(_TL_('Ad status: Paused')));\r\n\r\nexport const AdStatusSection = React.memo((props) => {\r\n const {\r\n status, expand, ...rest\r\n } = props;\r\n const i18n = useContext(I18nContext);\r\n const descriptionsCardSummaryDetails = useMemo(() => getStatusSummary(i18n, status), [status, i18n]);\r\n const validationProps = useMemo(() => ({\r\n data: {\r\n AdStatus: status,\r\n },\r\n }), [status]);\r\n\r\n return (\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand,\r\n expandKey: 'descriptions',\r\n }}\r\n {...rest}\r\n >\r\n \r\n \r\n );\r\n});\r\n\r\nAdStatusSection.propTypes = {\r\n status: PropTypes.string.isRequired,\r\n onAdStatusChange: PropTypes.func.isRequired,\r\n expand: PropTypes.func.isRequired,\r\n};\r\n","export const countries = {\r\n AE: {\r\n code: 'AE',\r\n name: _TL_('United Arab Emirates'),\r\n },\r\n AF: {\r\n code: 'AF',\r\n name: _TL_('Afghanistan'),\r\n },\r\n AD: {\r\n code: 'AD',\r\n name: _TL_('Andorra'),\r\n },\r\n AI: {\r\n code: 'AI',\r\n name: _TL_('Anguilla'),\r\n },\r\n AG: {\r\n code: 'AG',\r\n name: _TL_('Antigua & Barbuda'),\r\n },\r\n AL: {\r\n code: 'AL',\r\n name: _TL_('Albania'),\r\n },\r\n AM: {\r\n code: 'AM',\r\n name: _TL_('Armenia'),\r\n },\r\n AO: {\r\n code: 'AO',\r\n name: _TL_('Angola'),\r\n },\r\n AQ: {\r\n code: 'AQ',\r\n name: _TL_('Antarctica'),\r\n },\r\n AR: {\r\n code: 'AR',\r\n name: _TL_('Argentina'),\r\n },\r\n AT: {\r\n code: 'AT',\r\n name: _TL_('Austria'),\r\n },\r\n AU: {\r\n code: 'AU',\r\n name: _TL_('Australia'),\r\n },\r\n AW: {\r\n code: 'AW',\r\n name: _TL_('Aruba'),\r\n },\r\n BB: {\r\n code: 'BB',\r\n name: _TL_('Barbados'),\r\n },\r\n BD: {\r\n code: 'BD',\r\n name: _TL_('Bangladesh'),\r\n },\r\n BF: {\r\n code: 'BF',\r\n name: _TL_('Burkina Faso'),\r\n },\r\n BG: {\r\n code: 'BG',\r\n name: _TL_('Bulgaria'),\r\n },\r\n BH: {\r\n code: 'BH',\r\n name: _TL_('Bahrain'),\r\n },\r\n BI: {\r\n code: 'BI',\r\n name: _TL_('Burundi'),\r\n },\r\n BJ: {\r\n code: 'BJ',\r\n name: _TL_('Benin'),\r\n },\r\n BM: {\r\n code: 'BM',\r\n name: _TL_('Bermuda'),\r\n },\r\n BN: {\r\n code: 'BN',\r\n name: _TL_('Brunei'),\r\n },\r\n BO: {\r\n code: 'BO',\r\n name: _TL_('Bolivia'),\r\n },\r\n BR: {\r\n code: 'BR',\r\n name: _TL_('Brazil'),\r\n },\r\n BS: {\r\n code: 'BS',\r\n name: _TL_('Bahamas'),\r\n },\r\n BT: {\r\n code: 'BT',\r\n name: _TL_('Bhutan'),\r\n },\r\n BV: {\r\n code: 'BV',\r\n name: _TL_('Bouvet Island'),\r\n },\r\n BY: {\r\n code: 'BY',\r\n name: _TL_('Belarus'),\r\n },\r\n CA: {\r\n code: 'CA',\r\n name: _TL_('Canada'),\r\n },\r\n CC: {\r\n code: 'CC',\r\n name: _TL_('Cocos (Keeling) Islands'),\r\n },\r\n CD: {\r\n code: 'CD',\r\n name: _TL_('Congo – Kinshasa'),\r\n },\r\n CF: {\r\n code: 'CF',\r\n name: _TL_('Central African Republic'),\r\n },\r\n CG: {\r\n code: 'CG',\r\n name: _TL_('Congo – Brazzaville'),\r\n },\r\n CH: {\r\n code: 'CH',\r\n name: _TL_('Switzerland'),\r\n },\r\n CI: {\r\n code: 'CI',\r\n name: _TL_('Côte d’Ivoire'),\r\n },\r\n CK: {\r\n code: 'CK',\r\n name: _TL_('Cook Islands'),\r\n },\r\n CL: {\r\n code: 'CL',\r\n name: _TL_('Chile'),\r\n },\r\n CM: {\r\n code: 'CM',\r\n name: _TL_('Cameroon'),\r\n },\r\n CN: {\r\n code: 'CN',\r\n name: _TL_('China'),\r\n },\r\n CO: {\r\n code: 'CO',\r\n name: _TL_('Colombia'),\r\n },\r\n CR: {\r\n code: 'CR',\r\n name: _TL_('Costa Rica'),\r\n },\r\n CU: {\r\n code: 'CU',\r\n name: _TL_('Cuba'),\r\n },\r\n CV: {\r\n code: 'CV',\r\n name: _TL_('Cape Verde'),\r\n },\r\n CW: {\r\n code: 'CW',\r\n name: _TL_('Curaçao'),\r\n },\r\n CX: {\r\n code: 'CX',\r\n name: _TL_('Christmas Island'),\r\n },\r\n CY: {\r\n code: 'CY',\r\n name: _TL_('Cyprus'),\r\n },\r\n CZ: {\r\n code: 'CZ',\r\n name: _TL_('Czechia'),\r\n },\r\n DE: {\r\n code: 'DE',\r\n name: _TL_('Germany'),\r\n },\r\n DJ: {\r\n code: 'DJ',\r\n name: _TL_('Djibouti'),\r\n },\r\n DK: {\r\n code: 'DK',\r\n name: _TL_('Denmark'),\r\n },\r\n DM: {\r\n code: 'DM',\r\n name: _TL_('Dominica'),\r\n },\r\n DO: {\r\n code: 'DO',\r\n name: _TL_('Dominican Republic'),\r\n },\r\n DZ: {\r\n code: 'DZ',\r\n name: _TL_('Algeria'),\r\n },\r\n EC: {\r\n code: 'EC',\r\n name: _TL_('Ecuador'),\r\n },\r\n EE: {\r\n code: 'EE',\r\n name: _TL_('Estonia'),\r\n },\r\n EG: {\r\n code: 'EG',\r\n name: _TL_('Egypt'),\r\n },\r\n EH: {\r\n code: 'EH',\r\n name: _TL_('Western Sahara'),\r\n },\r\n ER: {\r\n code: 'ER',\r\n name: _TL_('Eritrea'),\r\n },\r\n ES: {\r\n code: 'ES',\r\n name: _TL_('Spain'),\r\n },\r\n ET: {\r\n code: 'ET',\r\n name: _TL_('Ethiopia'),\r\n },\r\n FI: {\r\n code: 'FI',\r\n name: _TL_('Finland'),\r\n },\r\n FJ: {\r\n code: 'FJ',\r\n name: _TL_('Fiji'),\r\n },\r\n FM: {\r\n code: 'FM',\r\n name: _TL_('Federated States of Micronesia'),\r\n },\r\n FR: {\r\n code: 'FR',\r\n name: _TL_('France'),\r\n },\r\n GA: {\r\n code: 'GA',\r\n name: _TL_('Gabon'),\r\n },\r\n GB: {\r\n code: 'GB',\r\n name: _TL_('United Kingdom'),\r\n },\r\n GD: {\r\n code: 'GD',\r\n name: _TL_('Grenada'),\r\n },\r\n GE: {\r\n code: 'GE',\r\n name: _TL_('Georgia'),\r\n },\r\n GG: {\r\n code: 'GG',\r\n name: _TL_('Guernsey'),\r\n },\r\n GH: {\r\n code: 'GH',\r\n name: _TL_('Ghana'),\r\n },\r\n GI: {\r\n code: 'GI',\r\n name: _TL_('Gibraltar'),\r\n },\r\n GR: {\r\n code: 'GR',\r\n name: _TL_('Greece'),\r\n },\r\n GT: {\r\n code: 'GT',\r\n name: _TL_('Guatemala'),\r\n },\r\n GW: {\r\n code: 'GW',\r\n name: _TL_('Guinea-Bissau'),\r\n },\r\n GY: {\r\n code: 'GY',\r\n name: _TL_('Guyana'),\r\n },\r\n HK: {\r\n code: 'HK',\r\n name: _TL_('Hong Kong'),\r\n },\r\n HN: {\r\n code: 'HN',\r\n name: _TL_('Honduras'),\r\n },\r\n HR: {\r\n code: 'HR',\r\n name: _TL_('Croatia'),\r\n },\r\n HT: {\r\n code: 'HT',\r\n name: _TL_('Haiti'),\r\n },\r\n HU: {\r\n code: 'HU',\r\n name: _TL_('Hungary'),\r\n },\r\n ID: {\r\n code: 'ID',\r\n name: _TL_('Indonesia'),\r\n },\r\n IE: {\r\n code: 'IE',\r\n name: _TL_('Ireland'),\r\n },\r\n IL: {\r\n code: 'IL',\r\n name: _TL_('Israel'),\r\n },\r\n IN: {\r\n code: 'IN',\r\n name: _TL_('India'),\r\n },\r\n IQ: {\r\n code: 'IQ',\r\n name: _TL_('Iraq'),\r\n },\r\n IR: {\r\n code: 'IR',\r\n name: _TL_('Iran'),\r\n },\r\n IS: {\r\n code: 'IS',\r\n name: _TL_('Iceland'),\r\n },\r\n IT: {\r\n code: 'IT',\r\n name: _TL_('Italy'),\r\n },\r\n JE: {\r\n code: 'JE',\r\n name: _TL_('Jersey'),\r\n },\r\n JM: {\r\n code: 'JM',\r\n name: _TL_('Jamaica'),\r\n },\r\n JO: {\r\n code: 'JO',\r\n name: _TL_('Jordan'),\r\n },\r\n JP: {\r\n code: 'JP',\r\n name: _TL_('Japan'),\r\n },\r\n KE: {\r\n code: 'KE',\r\n name: _TL_('Kenya'),\r\n },\r\n KG: {\r\n code: 'KG',\r\n name: _TL_('Kyrgyzstan'),\r\n },\r\n KH: {\r\n code: 'KH',\r\n name: _TL_('Cambodia'),\r\n },\r\n KI: {\r\n code: 'KI',\r\n name: _TL_('Kiribati'),\r\n },\r\n KM: {\r\n code: 'KM',\r\n name: _TL_('Comoros'),\r\n },\r\n KN: {\r\n code: 'KN',\r\n name: _TL_('St. Kitts & Nevis'),\r\n },\r\n KR: {\r\n code: 'KR',\r\n name: _TL_('South Korea'),\r\n },\r\n KW: {\r\n code: 'KW',\r\n name: _TL_('Kuwait'),\r\n },\r\n KY: {\r\n code: 'KY',\r\n name: _TL_('Cayman Islands'),\r\n },\r\n KZ: {\r\n code: 'KZ',\r\n name: _TL_('Kazakhstan'),\r\n },\r\n LA: {\r\n code: 'LA',\r\n name: _TL_('Laos'),\r\n },\r\n LB: {\r\n code: 'LB',\r\n name: _TL_('Lebanon'),\r\n },\r\n LC: {\r\n code: 'LC',\r\n name: _TL_('St. Lucia'),\r\n },\r\n LI: {\r\n code: 'LI',\r\n name: _TL_('Liechtenstein'),\r\n },\r\n LK: {\r\n code: 'LK',\r\n name: _TL_('Sri Lanka'),\r\n },\r\n LR: {\r\n code: 'LR',\r\n name: _TL_('Liberia'),\r\n },\r\n LS: {\r\n code: 'LS',\r\n name: _TL_('Lesotho'),\r\n },\r\n LT: {\r\n code: 'LT',\r\n name: _TL_('Lithuania'),\r\n },\r\n LU: {\r\n code: 'LU',\r\n name: _TL_('Luxembourg'),\r\n },\r\n LV: {\r\n code: 'LV',\r\n name: _TL_('Latvia'),\r\n },\r\n LY: {\r\n code: 'LY',\r\n name: _TL_('Libya'),\r\n },\r\n MA: {\r\n code: 'MA',\r\n name: _TL_('Morocco'),\r\n },\r\n MC: {\r\n code: 'MC',\r\n name: _TL_('Monaco'),\r\n },\r\n MD: {\r\n code: 'MD',\r\n name: _TL_('Moldova'),\r\n },\r\n ME: {\r\n code: 'ME',\r\n name: _TL_('Montenegro'),\r\n },\r\n MG: {\r\n code: 'MG',\r\n name: _TL_('Madagascar'),\r\n },\r\n MK: {\r\n code: 'MK',\r\n name: _TL_('North Macedonia'),\r\n },\r\n ML: {\r\n code: 'ML',\r\n name: _TL_('Mali'),\r\n },\r\n MM: {\r\n code: 'MM',\r\n name: _TL_('Myanmar'),\r\n },\r\n MN: {\r\n code: 'MN',\r\n name: _TL_('Mongolia'),\r\n },\r\n MO: {\r\n code: 'MO',\r\n name: _TL_('Macao'),\r\n },\r\n MR: {\r\n code: 'MR',\r\n name: _TL_('Mauritania'),\r\n },\r\n MS: {\r\n code: 'MS',\r\n name: _TL_('Montserrat'),\r\n },\r\n MT: {\r\n code: 'MT',\r\n name: _TL_('Malta'),\r\n },\r\n MU: {\r\n code: 'MU',\r\n name: _TL_('Mauritius'),\r\n },\r\n MV: {\r\n code: 'MV',\r\n name: _TL_('Maldives'),\r\n },\r\n MW: {\r\n code: 'MW',\r\n name: _TL_('Malawi'),\r\n },\r\n MX: {\r\n code: 'MX',\r\n name: _TL_('Mexico'),\r\n },\r\n MY: {\r\n code: 'MY',\r\n name: _TL_('Malaysia'),\r\n },\r\n MZ: {\r\n code: 'MZ',\r\n name: _TL_('Mozambique'),\r\n },\r\n NA: {\r\n code: 'NA',\r\n name: _TL_('Namibia'),\r\n },\r\n NE: {\r\n code: 'NE',\r\n name: _TL_('Niger'),\r\n },\r\n NF: {\r\n code: 'NF',\r\n name: _TL_('Norfolk Island'),\r\n },\r\n NG: {\r\n code: 'NG',\r\n name: _TL_('Nigeria'),\r\n },\r\n NI: {\r\n code: 'NI',\r\n name: _TL_('Nicaragua'),\r\n },\r\n NL: {\r\n code: 'NL',\r\n name: _TL_('Netherlands'),\r\n },\r\n NO: {\r\n code: 'NO',\r\n name: _TL_('Norway'),\r\n },\r\n NP: {\r\n code: 'NP',\r\n name: _TL_('Nepal'),\r\n },\r\n NR: {\r\n code: 'NR',\r\n name: _TL_('Nauru'),\r\n },\r\n NU: {\r\n code: 'NU',\r\n name: _TL_('Niue'),\r\n },\r\n NZ: {\r\n code: 'NZ',\r\n name: _TL_('New Zealand'),\r\n },\r\n OM: {\r\n code: 'OM',\r\n name: _TL_('Oman'),\r\n },\r\n PA: {\r\n code: 'PA',\r\n name: _TL_('Panama'),\r\n },\r\n PE: {\r\n code: 'PE',\r\n name: _TL_('Peru'),\r\n },\r\n PG: {\r\n code: 'PG',\r\n name: _TL_('Papua New Guinea'),\r\n },\r\n PH: {\r\n code: 'PH',\r\n name: _TL_('Philippines'),\r\n },\r\n PK: {\r\n code: 'PK',\r\n name: _TL_('Pakistan'),\r\n },\r\n PL: {\r\n code: 'PL',\r\n name: _TL_('Poland'),\r\n },\r\n PT: {\r\n code: 'PT',\r\n name: _TL_('Portugal'),\r\n },\r\n PS: {\r\n code: 'PS',\r\n name: _TL_('Palestinian Territory'),\r\n },\r\n QA: {\r\n code: 'QA',\r\n name: _TL_('Qatar'),\r\n },\r\n RO: {\r\n code: 'RO',\r\n name: _TL_('Romania'),\r\n },\r\n RS: {\r\n code: 'RS',\r\n name: _TL_('Serbia'),\r\n },\r\n RU: {\r\n code: 'RU',\r\n name: _TL_('Russia'),\r\n },\r\n RW: {\r\n code: 'RW',\r\n name: _TL_('Rwanda'),\r\n },\r\n SA: {\r\n code: 'SA',\r\n name: _TL_('Saudi Arabia'),\r\n },\r\n SB: {\r\n code: 'SB',\r\n name: _TL_('Solomon Islands'),\r\n },\r\n SC: {\r\n code: 'SC',\r\n name: _TL_('Seychelles'),\r\n },\r\n SD: {\r\n code: 'SD',\r\n name: _TL_('Sudan'),\r\n },\r\n SE: {\r\n code: 'SE',\r\n name: _TL_('Sweden'),\r\n },\r\n SG: {\r\n code: 'SG',\r\n name: _TL_('Singapore'),\r\n },\r\n SH: {\r\n code: 'SH',\r\n name: _TL_('Saint Helena'),\r\n },\r\n SI: {\r\n code: 'SI',\r\n name: _TL_('Slovenia'),\r\n },\r\n SK: {\r\n code: 'SK',\r\n name: _TL_('Slovakia'),\r\n },\r\n SM: {\r\n code: 'SM',\r\n name: _TL_('San Marino'),\r\n },\r\n SN: {\r\n code: 'SN',\r\n name: _TL_('Senegal'),\r\n },\r\n SO: {\r\n code: 'SO',\r\n name: _TL_('Somalia'),\r\n },\r\n SR: {\r\n code: 'SR',\r\n name: _TL_('Suriname'),\r\n },\r\n ST: {\r\n code: 'ST',\r\n name: _TL_('São Tomé & Príncipe'),\r\n },\r\n SV: {\r\n code: 'SV',\r\n name: _TL_('El Salvador'),\r\n },\r\n SZ: {\r\n code: 'SZ',\r\n name: _TL_('Eswatini'),\r\n },\r\n TC: {\r\n code: 'TC',\r\n name: _TL_('Turks & Caicos Islands'),\r\n },\r\n TD: {\r\n code: 'TD',\r\n name: _TL_('Chad'),\r\n },\r\n TF: {\r\n code: 'TF',\r\n name: _TL_('French Southern Territories'),\r\n },\r\n TG: {\r\n code: 'TG',\r\n name: _TL_('Togo'),\r\n },\r\n TH: {\r\n code: 'TH',\r\n name: _TL_('Thailand'),\r\n },\r\n TJ: {\r\n code: 'TJ',\r\n name: _TL_('Tajikistan'),\r\n },\r\n TK: {\r\n code: 'TK',\r\n name: _TL_('Tokelau'),\r\n },\r\n TL: {\r\n code: 'TL',\r\n name: _TL_('East Timor'),\r\n },\r\n TM: {\r\n code: 'TM',\r\n name: _TL_('Turkmenistan'),\r\n },\r\n TN: {\r\n code: 'TN',\r\n name: _TL_('Tunisia'),\r\n },\r\n TR: {\r\n code: 'TR',\r\n name: _TL_('Türkiye'),\r\n },\r\n TT: {\r\n code: 'TT',\r\n name: _TL_('Trinidad & Tobago'),\r\n },\r\n TV: {\r\n code: 'TV',\r\n name: _TL_('Tuvalu'),\r\n },\r\n TW: {\r\n code: 'TW',\r\n name: _TL_('Taiwan'),\r\n },\r\n TZ: {\r\n code: 'TZ',\r\n name: _TL_('Tanzania'),\r\n },\r\n UA: {\r\n code: 'UA',\r\n name: _TL_('Ukraine'),\r\n },\r\n UG: {\r\n code: 'UG',\r\n name: _TL_('Uganda'),\r\n },\r\n UM: {\r\n code: 'UM',\r\n name: _TL_('US Minor Outlying Islands'),\r\n },\r\n US: {\r\n code: 'US',\r\n name: _TL_('United States'),\r\n },\r\n UY: {\r\n code: 'UY',\r\n name: _TL_('Uruguay'),\r\n },\r\n UZ: {\r\n code: 'UZ',\r\n name: _TL_('Uzbekistan'),\r\n },\r\n VA: {\r\n code: 'VA',\r\n name: _TL_('Vatican City'),\r\n },\r\n VC: {\r\n code: 'VC',\r\n name: _TL_('St. Vincent & Grenadines'),\r\n },\r\n VE: {\r\n code: 'VE',\r\n name: _TL_('Venezuela'),\r\n },\r\n VG: {\r\n code: 'VG',\r\n name: _TL_('British Virgin Islands'),\r\n },\r\n VN: {\r\n code: 'VN',\r\n name: _TL_('Vietnam'),\r\n },\r\n VU: {\r\n code: 'VU',\r\n name: _TL_('Vanuatu'),\r\n },\r\n WS: {\r\n code: 'WS',\r\n name: _TL_('Samoa'),\r\n },\r\n YE: {\r\n code: 'YE',\r\n name: _TL_('Yemen'),\r\n },\r\n ZM: {\r\n code: 'ZM',\r\n name: _TL_('Zambia'),\r\n },\r\n ZW: {\r\n code: 'ZW',\r\n name: _TL_('Zimbabwe'),\r\n },\r\n IO: {\r\n code: 'IO',\r\n name: _TL_('British Indian Ocean Territory'),\r\n },\r\n XK: {\r\n code: 'XK',\r\n name: _TL_('Kosovo'),\r\n },\r\n BQ: {\r\n code: 'BQ',\r\n name: _TL_('Saba'),\r\n },\r\n GS: {\r\n code: 'GS',\r\n name: _TL_('South Georgia & South Sandwich Islands'),\r\n },\r\n WF: {\r\n code: 'WF',\r\n name: _TL_('Wallis and Futuna'),\r\n },\r\n};\r\n","export const platforms = {\r\n IOS: 'iOS',\r\n ANDROID: 'android',\r\n WINDOWS: 'windows',\r\n};\r\n\r\nexport * from './countries';\r\n","import { useMemo, useContext, useCallback } from 'react';\r\nimport { queryify } from '@bingads-webui/url-util';\r\nimport { odata } from '@bingads-webui/http-util';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { publisherQueries } from '@bingads-webui-campaign-react/merchant-shared';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { platforms } from './constants';\r\n\r\nconst getODataConfig = (serverContext) => {\r\n const isLocal = () => {\r\n const hostname = document.location.hostname.toLowerCase();\r\n return hostname.indexOf('ads.microsoft.com') === -1 &&\r\n hostname.indexOf('ads-int.microsoft.com') === -1;\r\n };\r\n\r\n const odataPath = isLocal() ? 'Advertiser/V2' : 'Campaign/V2';\r\n\r\n const oDataConfig = {\r\n odataToken: serverContext.Token,\r\n oDataToken: serverContext.Token,\r\n odataPath: `${serverContext.ServicesEndpoints.CampaignAPI}${odataPath}`,\r\n oDataPath: `${serverContext.ServicesEndpoints.CampaignAPI}${odataPath}`,\r\n };\r\n\r\n return oDataConfig;\r\n};\r\n\r\nconst attachIdsToResults = results => results.map(result => ({\r\n ...result,\r\n id: result.AppStoreId,\r\n name: result.AppTitle,\r\n}));\r\n\r\nexport const useAppStoreRepository = ({\r\n platform,\r\n}) => {\r\n const serverContext = useContext(ServerContext);\r\n const acid = serverContext.CurrentAccount.AdvertiserCustomerID;\r\n\r\n const { scope } = useContext(ScopeContext) || {};\r\n\r\n const { aid, cid } = scope.values;\r\n\r\n const oDataConfig = useMemo(() => getODataConfig(serverContext), [serverContext]);\r\n\r\n const searchAppManual = useCallback((searchQuery, country) => {\r\n const baseURL = `${oDataConfig.odataPath}/Customers(${cid})/Accounts(${aid})/SearchApp`;\r\n\r\n const url = queryify(baseURL, {\r\n $top: 15,\r\n $skip: 0,\r\n $search: searchQuery,\r\n $filter: `AppPlatform eq '${platform}'`,\r\n countryCode: country,\r\n });\r\n\r\n return odata.get(url, oDataConfig)\r\n .then(response => attachIdsToResults(response.value));\r\n }, [aid, cid, oDataConfig, platform]);\r\n\r\n const searchApp = useCallback((searchQuery) => {\r\n if (platform !== platforms.WINDOWS) {\r\n const baseURL = `${oDataConfig.odataPath}/Customers(${cid})/Accounts(${aid})/Apps`;\r\n\r\n const url = queryify(baseURL, {\r\n $top: 15,\r\n $skip: 0,\r\n $search: searchQuery,\r\n $filter: `AppPlatform eq '${platform}'`,\r\n });\r\n\r\n return odata.get(url, oDataConfig)\r\n .then(response => attachIdsToResults(response.value));\r\n }\r\n\r\n return publisherQueries.getMatchedPublishers(acid, searchQuery, 'Application')\r\n .then((response) => {\r\n const items = response.MatchingAppications;\r\n\r\n const newMenuItems = items.map(app => ({\r\n AppId: app.AppId,\r\n AppStoreId: app.AppId,\r\n AppTitle: app.AppTitle,\r\n IconUrl: app.ImageLink,\r\n DeveloperName: app.PublisherName,\r\n AppPlatform: 'Windows',\r\n }));\r\n\r\n return attachIdsToResults(newMenuItems);\r\n });\r\n }, [aid, cid, acid, oDataConfig, platform]);\r\n\r\n const searchAppById = useCallback(id => searchApp(id).then(results => results[0]), [searchApp]);\r\n\r\n return {\r\n searchApp,\r\n searchAppManual,\r\n searchAppById,\r\n oDataConfig,\r\n };\r\n};\r\n","import React from 'react';\r\nimport { Image, makeStyles, Link, Button } from '@fluentui/react-components';\r\nimport { Dismiss16Filled } from '@fluentui/react-icons';\r\n\r\nconst useStyles = makeStyles({\r\n appPanel: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n marginTop: 10,\r\n marginBottom: 10,\r\n padding: '10px',\r\n columnGap: '10px',\r\n '&__icon': {\r\n marginRight: '10px',\r\n },\r\n '&__content': {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n },\r\n '&__title': {\r\n fontSize: '16px',\r\n fontWeight: 'bold',\r\n },\r\n '&__description': {\r\n fontSize: '14px',\r\n },\r\n },\r\n});\r\n\r\nexport const AppPanel = ({\r\n selectedApp,\r\n readOnly,\r\n onRemoveApp,\r\n}) => {\r\n const {\r\n AppTitle,\r\n IconUrl,\r\n DeveloperName,\r\n AppUrl,\r\n AppStoreId,\r\n } = selectedApp;\r\n\r\n const classes = useStyles();\r\n const FinalAppUrl = AppUrl || `https://apps.microsoft.com/detail/${AppStoreId}`;\r\n\r\n return (\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n {AppTitle}\r\n
\r\n
\r\n {AppStoreId} - {DeveloperName}\r\n
\r\n
\r\n
\r\n { !readOnly && }\r\n appearance=\"transparent\"\r\n onClick={onRemoveApp}\r\n /> }\r\n
\r\n );\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n Text,\r\n Image,\r\n mergeClasses,\r\n makeStyles,\r\n tokens,\r\n} from '@fluentui/react-components';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\n\r\nconst useAppItemStyles = makeStyles({\r\n appItem: {\r\n display: 'flex',\r\n },\r\n image: {\r\n width: '40px',\r\n height: '40px',\r\n },\r\n details: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'flex-start',\r\n justifyContent: 'center',\r\n marginLeft: '8px',\r\n },\r\n name: {\r\n fontWeight: 'bold',\r\n lineHeight: '20px',\r\n color: tokens.colorNeutralForeground1,\r\n },\r\n});\r\n\r\nexport const AppItem = (props) => {\r\n const {\r\n appTitle,\r\n appLogoUrl,\r\n appCountryCode,\r\n } = props;\r\n\r\n const i18n = useContext(I18nContext);\r\n\r\n const classes = useAppItemStyles();\r\n const country = appCountryCode ? `Country: ${appCountryCode}` : i18n.getString(_TL_('United States'));\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n {appTitle}\r\n \r\n \r\n {country}\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nAppItem.propTypes = {\r\n appTitle: PropTypes.string.isRequired,\r\n appLogoUrl: PropTypes.string,\r\n appCountryCode: PropTypes.string,\r\n};\r\n\r\nAppItem.defaultProps = {\r\n appLogoUrl: '',\r\n appCountryCode: '',\r\n};\r\n","import classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport React, { useContext, useState, useCallback, useMemo, useEffect } from 'react';\r\nimport { Checkbox, makeStyles, Dropdown, Option } from '@fluentui/react-components';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { SearchableMultiSelectorInput } from '@bingads-webui-campaign-react/searchable-multi-selector-input';\r\nimport { withCustomValidation, withError } from '@bingads-webui-react/validation';\r\n\r\nimport { useAppStoreRepository } from './use-app-store-repository';\r\nimport { AppPanel } from './components/app-panel';\r\nimport { AppItem } from './components/app-item';\r\nimport { countries } from './constants/countries';\r\n\r\nconst useStyles = makeStyles({\r\n appStoreSelector: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n rowGap: 10,\r\n '& .fui-Combobox': {\r\n maxWidth: 'unset !important',\r\n },\r\n },\r\n});\r\n\r\nconst UnvalidatedStoreAppSelector = ({\r\n platform,\r\n onChange,\r\n defaultSelected,\r\n placeholderText,\r\n readOnly,\r\n isCountryRefinementEnabled,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const [selectedOption, setSelectedOption] = useState(defaultSelected ? [defaultSelected] : []);\r\n const [advancedSearchMode, setAdvancedSearchMode] = useState(false);\r\n const [selectedCountry, setSelectedCountry] = useState([]);\r\n\r\n const { searchApp, searchAppManual } = useAppStoreRepository({\r\n platform,\r\n });\r\n\r\n const classes = useStyles();\r\n\r\n const placeholder = useMemo(\r\n () => {\r\n if (placeholderText) {\r\n return i18n.getString(placeholderText);\r\n }\r\n return advancedSearchMode ? i18n.getString(_TL_('Search for an app using app ID or app URL')) : i18n.getString(_TL_('Search for an app using name or app ID'));\r\n }\r\n , [advancedSearchMode, i18n, placeholderText]\r\n );\r\n\r\n const onInputChange = useCallback((searchValue) => {\r\n setSelectedOption(searchValue);\r\n }, []);\r\n\r\n const customRender = useCallback(option => (\r\n \r\n ), []);\r\n\r\n const onCountrySelect = useCallback((data) => {\r\n setSelectedCountry(data.selectedOptions);\r\n }, []);\r\n\r\n const manualSearch = useCallback((searchQuery) => {\r\n const countryCode = selectedCountry && selectedCountry[0];\r\n return searchAppManual(searchQuery, countryCode);\r\n }, [selectedCountry, searchAppManual]);\r\n\r\n const onRemoveApp = useCallback(() => {\r\n setSelectedOption([]);\r\n setSelectedCountry([]);\r\n }, []);\r\n\r\n useEffect(() => {\r\n onChange(selectedOption[0]);\r\n }, [onChange, selectedOption]);\r\n\r\n useEffect(() => {\r\n setSelectedOption(defaultSelected ? [defaultSelected] : []);\r\n }, [defaultSelected]);\r\n\r\n return (\r\n
\r\n {\r\n selectedOption.length > 0 ? (\r\n \r\n ) : (\r\n
\r\n \r\n {isCountryRefinementEnabled && (\r\n \r\n {i18n.getString(_TL_('Note: '))}\r\n {i18n.getString(_TL_('If you’re unable to find your app, refine your search by selecting a country/region where the app is available.'))}\r\n \r\n }\r\n labelPosition=\"after\"\r\n value={advancedSearchMode}\r\n onChange={(e, data) => setAdvancedSearchMode(data.checked)}\r\n />\r\n )}\r\n {\r\n advancedSearchMode && (\r\n onCountrySelect(data)}\r\n selectedOptions={selectedCountry}\r\n >\r\n {\r\n _.map(_.sortBy(countries, 'name'), country => (\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\nUnvalidatedStoreAppSelector.propTypes = {\r\n platform: PropTypes.string.isRequired,\r\n defaultSelected: PropTypes.shape({}),\r\n onChange: PropTypes.func,\r\n placeholderText: PropTypes.string,\r\n readOnly: PropTypes.bool,\r\n isCountryRefinementEnabled: PropTypes.bool.isRequired,\r\n};\r\n\r\nUnvalidatedStoreAppSelector.defaultProps = {\r\n defaultSelected: null,\r\n onChange: () => {},\r\n placeholderText: null,\r\n readOnly: false,\r\n};\r\n\r\nconst StoreAppSelectorInternal = ({\r\n updateValidation,\r\n isMounted,\r\n validationProps,\r\n isCountryRefinementEnabled,\r\n ...rest\r\n}) => {\r\n const {\r\n data,\r\n } = validationProps;\r\n\r\n const onChange = useCallback((value) => {\r\n if (!_.isNull(value) && !_.isUndefined(value) && data && value !== data.AppSetting) {\r\n updateValidation([], { AppSetting: value });\r\n }\r\n }, [data, updateValidation]);\r\n\r\n useEffect(() => {\r\n if (isMounted && data && !data.AppSetting) {\r\n updateValidation([_TL_('Please select an app.')], null, false);\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [isMounted, updateValidation]);\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nStoreAppSelectorInternal.propTypes = {\r\n updateValidation: PropTypes.func.isRequired,\r\n validationProps: PropTypes.shape({\r\n data: PropTypes.shape({\r\n AppSetting: PropTypes.shape({}),\r\n }),\r\n }).isRequired,\r\n isCountryRefinementEnabled: PropTypes.bool,\r\n};\r\n\r\nStoreAppSelectorInternal.defaultProps = {\r\n isCountryRefinementEnabled: true,\r\n};\r\n\r\nexport const StoreAppSelector = withError(withCustomValidation(StoreAppSelectorInternal));\r\n\r\n","import _ from 'underscore';\r\nimport { biddingStrategyTypeId } from '@bingads-webui-campaign-react/constants';\r\nimport {\r\n BudgetSuggestionTiers,\r\n ApiKeysBudgetSuggestion,\r\n BudgetDetailKeys,\r\n formatNumber,\r\n CampaignTypeToAdvertiserChannelTypeId,\r\n} from './constants';\r\n\r\nconst parseBudgetDetails = (data, i18n, currency) => {\r\n const BudgetDetails = _.mapObject(BudgetDetailKeys, (key) => {\r\n const detail = {\r\n Low: data[`${key}Low`],\r\n Mid: data[`${key}Mid`],\r\n High: data[`${key}High`],\r\n Range: `${formatNumber(data[`${key}Low`])} - ${formatNumber(data[`${key}High`])}`,\r\n };\r\n\r\n if (key === BudgetDetailKeys.CostPerConversion || key === BudgetDetailKeys.CostPerClick) {\r\n detail.Low = data[`${key}Low`];\r\n detail.Mid = data[`${key}Mid`];\r\n detail.High = data[`${key}High`];\r\n\r\n if (data[`${key}Low`] === 'INF' || data[`${key}High`] === 'INF') {\r\n detail.Range = '-';\r\n } else {\r\n detail.Range = `${i18n.formatCurrency(Math.round((data[`${key}Low`]) * 100) / 100, currency)} - ${i18n.formatCurrency(Math.round((data[`${key}High`]) * 100) / 100, currency)}`;\r\n }\r\n }\r\n\r\n if (key === BudgetDetailKeys.CTR) {\r\n detail.Low = data[`${key}LowPercent`];\r\n detail.Mid = data[`${key}MidPercent`];\r\n detail.High = data[`${key}HighPercent`];\r\n detail.Range = `${Math.round(detail.Low * 1000) / 1000}% - ${Math.round(detail.High * 1000) / 1000}%`;\r\n }\r\n\r\n return detail;\r\n });\r\n\r\n return BudgetDetails;\r\n};\r\n\r\nexport const parseBudgetSuggestionAPI = (data, i18n, currency) => {\r\n// three budget suggestion tiers\r\n// 1. Advanced (high) 2. Balanced (medium) 3. Starter (low)\r\n\r\n const suffix = 'Details';\r\n\r\n const budgetSuggestions = {};\r\n\r\n _.each(BudgetSuggestionTiers, (tier, key) => {\r\n const budgetKey = `Budget${ApiKeysBudgetSuggestion[key]}30Day`;\r\n const budgetDailyKey = `Budget${ApiKeysBudgetSuggestion[key]}Daily`;\r\n const budgetDetailsKey = `Budget${ApiKeysBudgetSuggestion[key]}${suffix}`;\r\n\r\n const BudgetDetails = parseBudgetDetails(data[budgetDetailsKey], i18n, currency);\r\n\r\n budgetSuggestions[tier] = {\r\n BudgetAmountMonthly: data[budgetKey],\r\n BudgetAmountDaily: data[budgetDailyKey] ? Math.round(data[budgetDailyKey] * 100) / 100 : Math.round(data[budgetKey] / 30.43),\r\n BudgetDetails: { ...BudgetDetails },\r\n };\r\n });\r\n return budgetSuggestions;\r\n};\r\n\r\nexport const getSuggestedBudgetAmounts = parsedBudgetSuggestionResponse =>\r\n _.map(parsedBudgetSuggestionResponse, value => value.BudgetAmountMonthly);\r\n\r\nexport const parsePerformanceEstimateAPI = (data, i18n, currency) => {\r\n const performanceEstimate = {};\r\n\r\n performanceEstimate.BudgetAmountMonthly = data.BudgetAdvertiser30Day;\r\n performanceEstimate.BudgetDetails = parseBudgetDetails(data.AdvertiserBudgetDetails, i18n, currency);\r\n\r\n return performanceEstimate;\r\n};\r\n\r\nexport const parseBudgetLandscapeAPI = (data, i18n, currency) => {\r\n const result = {};\r\n\r\n if (data && data.value && data.value.length === 0) {\r\n return result;\r\n }\r\n\r\n const budgetLandscapeData = data.value && data.value[0];\r\n\r\n result.Current = {\r\n BudgetAmountMonthly: budgetLandscapeData.BudgetCurrent,\r\n BudgetAmountDaily: budgetLandscapeData.BudgetCurrentDaily ? Math.round(budgetLandscapeData.BudgetCurrentDaily * 100) / 100 : Math.round(budgetLandscapeData.BudgetCurrent / 30.43),\r\n BudgetDetails: { ...parseBudgetDetails(budgetLandscapeData.BudgetCurrentDetails, i18n, currency) },\r\n };\r\n result.Suggested = {\r\n\r\n BudgetAmountMonthly: budgetLandscapeData.BudgetSuggested,\r\n BudgetAmountDaily: budgetLandscapeData.BudgetSuggestedDaily ? Math.round(budgetLandscapeData.BudgetSuggestedDaily * 100) / 100 : Math.round(budgetLandscapeData.BudgetSuggested / 30.43),\r\n BudgetDetails: { ...parseBudgetDetails(budgetLandscapeData.BudgetSuggestedDetails, i18n, currency) },\r\n };\r\n return result;\r\n};\r\n\r\nexport const parseViewModelToMTModelForPMax = ({\r\n campaign,\r\n assetGroup,\r\n currency,\r\n latestSuggestedBudget,\r\n isPerformanceEstimation,\r\n}) => {\r\n const {\r\n Budget,\r\n BiddingScheme,\r\n CampaignType,\r\n Languages,\r\n conversionGoals,\r\n locationTargets,\r\n } = campaign || {};\r\n\r\n const {\r\n BusinessName,\r\n Descriptions,\r\n Headlines,\r\n LongHeadlines,\r\n } = assetGroup || {};\r\n\r\n const {\r\n Amount: CurrentBudgetAmount,\r\n } = Budget || {};\r\n\r\n const {\r\n Type,\r\n TargetCpa,\r\n TargetRoas,\r\n TargetImpressionShare,\r\n MaxCpc,\r\n } = BiddingScheme || {};\r\n\r\n const {\r\n Amount: MaxCpcAmount,\r\n } = MaxCpc || {};\r\n\r\n const { goalSelection, goalScopeSelection } = conversionGoals || [];\r\n\r\n const { currentLevelSettings } = locationTargets || {};\r\n\r\n const { currentLocations } = currentLevelSettings || [];\r\n\r\n const LocationTargets = _.map(_.filter(currentLocations, location => location.CriterionType === 'Location'), location => location.Criterion.LocationCriterion.LocationId);\r\n\r\n const RadiusTargets = _.map(_.filter(currentLocations, location => location.CriterionType === 'Radius'), location => ({\r\n Radius: location.Criterion.RadiusCriterion.Radius,\r\n Latitude: location.Criterion.RadiusCriterion.Latitude,\r\n Longitude: location.Criterion.RadiusCriterion.Longitude,\r\n }));\r\n\r\n const BiddingSchemeId = biddingStrategyTypeId[Type] || biddingStrategyTypeId.MaxConversions;\r\n\r\n const GoalCategory = goalScopeSelection === 'campaign-scope' ? _.map(goalSelection, goal => goal.GoalCategory) : [];\r\n\r\n return {\r\n CampaignTypeId: CampaignTypeToAdvertiserChannelTypeId[CampaignType],\r\n BiddingSchemeId,\r\n TargetCpa: TargetCpa || null,\r\n MaxCpc: MaxCpcAmount || null,\r\n Languages,\r\n BusinessName: [BusinessName],\r\n Descriptions: _.values(Descriptions),\r\n Headlines: _.values(Headlines),\r\n LongHeadlines: _.values(LongHeadlines),\r\n GoalCategory,\r\n RadiusTargets,\r\n LocationIds: LocationTargets,\r\n CurrencyCode: currency,\r\n GetBudget: isPerformanceEstimation ? 0 : 1,\r\n RecommendedBudget: isPerformanceEstimation ? latestSuggestedBudget : null,\r\n AdvertiserBudget: isPerformanceEstimation ? Math.floor(CurrentBudgetAmount * 30.43) : null,\r\n TargetRoas: TargetRoas || null,\r\n TargetImpressionShare: TargetImpressionShare || null,\r\n Keywords: [],\r\n Age: [],\r\n };\r\n};\r\n\r\n","import _ from 'underscore';\r\nimport { CampaignTypes, biddingStrategyTypeId } from '@bingads-webui-campaign-react/constants';\r\nimport { parseViewModelToMTModelForPMax } from './api-parser';\r\n\r\nexport const MODE = {\r\n CREATION: 'CREATION',\r\n EDITING: 'EDITING',\r\n};\r\n\r\nexport const BudgetSuggestionTiers = {\r\n Advanced: 'Advanced',\r\n Balanced: 'Balanced',\r\n Starter: 'Starter',\r\n};\r\n\r\nexport const CustomBudget = 'CustomBudget';\r\n\r\nexport const BudgetSuggestionOfflineTiers = {\r\n Suggested: 'Suggested',\r\n Current: 'Current',\r\n};\r\n\r\nexport const RecommendedBudgetSuggestionTier = 'Suggested';\r\n\r\nexport const ApiKeysBudgetSuggestion = {\r\n Advanced: 'High',\r\n Balanced: 'Mid',\r\n Starter: 'Low',\r\n};\r\n\r\nexport const BudgetTierTitles = {\r\n Advanced: _TL_('Accelerated'),\r\n Balanced: _TL_('Recommended'),\r\n Starter: _TL_('Basic'),\r\n Suggested: _TL_('Recommended'),\r\n Current: _TL_('Current budget'),\r\n};\r\n\r\nexport const BudgetDetailKeys = {\r\n Impressions: 'Impressions',\r\n Clicks: 'Clicks',\r\n CTR: 'CTR',\r\n CostPerClick: 'CostPerClick',\r\n Conversions: 'Conversions',\r\n CostPerConversion: 'CostPerConversion',\r\n};\r\n\r\nexport const BudgetDetailKeysByBidType = {\r\n [biddingStrategyTypeId.MaxConversions]: [\r\n BudgetDetailKeys.Clicks,\r\n BudgetDetailKeys.Impressions,\r\n BudgetDetailKeys.Conversions,\r\n BudgetDetailKeys.CostPerConversion,\r\n ],\r\n [biddingStrategyTypeId.MaxConversionValue]: [\r\n BudgetDetailKeys.Clicks,\r\n BudgetDetailKeys.Impressions,\r\n BudgetDetailKeys.Conversions,\r\n BudgetDetailKeys.CostPerConversion,\r\n ],\r\n [biddingStrategyTypeId.MaxClicks]: [\r\n BudgetDetailKeys.Clicks,\r\n BudgetDetailKeys.Impressions,\r\n BudgetDetailKeys.CTR,\r\n BudgetDetailKeys.CostPerClick,\r\n ],\r\n [biddingStrategyTypeId.TargetImpressionShare]: [\r\n BudgetDetailKeys.Clicks,\r\n BudgetDetailKeys.Impressions,\r\n BudgetDetailKeys.CTR,\r\n BudgetDetailKeys.CostPerClick,\r\n ],\r\n [biddingStrategyTypeId.TargetCpa]: [\r\n BudgetDetailKeys.Clicks,\r\n BudgetDetailKeys.Impressions,\r\n BudgetDetailKeys.Conversions,\r\n BudgetDetailKeys.CostPerConversion,\r\n ],\r\n [biddingStrategyTypeId.TargetRoas]: [\r\n BudgetDetailKeys.Clicks,\r\n BudgetDetailKeys.Impressions,\r\n BudgetDetailKeys.Conversions,\r\n BudgetDetailKeys.CostPerConversion,\r\n ],\r\n [biddingStrategyTypeId.EnhancedCpc]: [\r\n BudgetDetailKeys.Clicks,\r\n BudgetDetailKeys.Impressions,\r\n BudgetDetailKeys.CTR,\r\n BudgetDetailKeys.CostPerClick,\r\n ],\r\n [biddingStrategyTypeId.CostPerSale]: [\r\n BudgetDetailKeys.Clicks,\r\n BudgetDetailKeys.Impressions,\r\n BudgetDetailKeys.CTR,\r\n BudgetDetailKeys.CostPerClick,\r\n ],\r\n Default: [],\r\n};\r\n\r\n\r\nexport const BudgetDetailKeysByCampaignType = {\r\n [CampaignTypes.PerformanceMax]: [\r\n BudgetDetailKeys.Clicks,\r\n BudgetDetailKeys.Impressions,\r\n BudgetDetailKeys.Conversions,\r\n BudgetDetailKeys.CostPerConversion,\r\n ],\r\n Default: [\r\n BudgetDetailKeys.Conversions,\r\n BudgetDetailKeys.CTR,\r\n BudgetDetailKeys.Impressions,\r\n BudgetDetailKeys.Clicks,\r\n ],\r\n};\r\n\r\nexport const BudgetDetailsKeysText = {\r\n [BudgetDetailKeys.Impressions]: {\r\n title: _TL_('Monthly impr.'),\r\n popupId: 'pop_BA_MonthlyImpr',\r\n },\r\n [BudgetDetailKeys.Clicks]: {\r\n title: _TL_('Monthly clicks'),\r\n popupId: 'pop_BA_MonthlyClicks',\r\n },\r\n [BudgetDetailKeys.CTR]: {\r\n title: _TL_('Avg. CTR'),\r\n popupId: 'pop_BA_AvgCTR',\r\n },\r\n [BudgetDetailKeys.CostPerClick]: {\r\n title: _TL_('Avg. CPC'),\r\n popupId: 'pop_BA_AvgCostPerClick',\r\n },\r\n [BudgetDetailKeys.Conversions]: {\r\n title: _TL_('Monthly conv.'),\r\n popupId: 'pop_BA_MonthlyConv',\r\n },\r\n [BudgetDetailKeys.CostPerConversion]: {\r\n title: _TL_('Avg. CPA'),\r\n popupId: 'pop_BA_AverageCPC',\r\n },\r\n};\r\n\r\n\r\nexport const getMatchingBudgetTierBasedOnBudget = (budgetSuggestionData, budgetAmount, mode) => {\r\n if (!budgetAmount) {\r\n return mode === MODE.CREATION ? BudgetSuggestionTiers.Balanced : BudgetSuggestionOfflineTiers.Suggested;\r\n }\r\n\r\n let matchingBudgetTier = mode === MODE.CREATION ? CustomBudget : BudgetSuggestionOfflineTiers.Suggested;\r\n\r\n if (mode === MODE.CREATION) {\r\n _.each(budgetSuggestionData, (budget, key) => {\r\n if (budget.BudgetAmountDaily === parseFloat(budgetAmount)) {\r\n matchingBudgetTier = key;\r\n }\r\n });\r\n } else {\r\n _.each(budgetSuggestionData, (budget, key) => {\r\n if (budget.BudgetAmountMonthly === parseFloat(budgetAmount)) {\r\n matchingBudgetTier = key;\r\n }\r\n });\r\n }\r\n\r\n return matchingBudgetTier;\r\n};\r\n\r\nconst parserByCampaignType = {\r\n [CampaignTypes.PerformanceMax]: parseViewModelToMTModelForPMax,\r\n Default: parseViewModelToMTModelForPMax,\r\n};\r\n\r\n\r\nexport const getParserByCampaignType = campaignType => parserByCampaignType[campaignType] || parserByCampaignType.Default;\r\n\r\nexport const formatNumber = (num) => {\r\n if (num >= 1e9) {\r\n return `${(num / 1e9).toFixed(1)}B`;\r\n } else if (num >= 1e6) {\r\n return `${(num / 1e6).toFixed(1)}M`;\r\n } else if (num >= 1e3) {\r\n return `${(num / 1e3).toFixed(1)}K`;\r\n } else if (num === 0) {\r\n return '0';\r\n }\r\n return num ? num.toString() : '';\r\n};\r\n\r\nexport const CampaignTypeToAdvertiserChannelTypeId = {\r\n [CampaignTypes.Default]: 1,\r\n [CampaignTypes.Product]: 2,\r\n [CampaignTypes.Shopping]: 3,\r\n [CampaignTypes.DynamicSearchAds]: 4,\r\n [CampaignTypes.Hotel]: 5,\r\n [CampaignTypes.Audience]: 6,\r\n [CampaignTypes.Smart]: 7,\r\n [CampaignTypes.Hotel]: 8,\r\n [CampaignTypes.PerformanceMax]: 9,\r\n};\r\n","import React, { useContext } from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { Skeleton, SkeletonItem } from '@fluentui/react-components';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { useResponsiveStyles } from '@bingads-webui-campaign-react/common-hooks';\r\nimport { ValidatedBudgetInput } from '@bingads-webui-campaign-react/budget-component-v2';\r\nimport { HelpIcon } from '@bingads-webui-campaign-react/help';\r\nimport { biddingStrategyTypeId } from '@bingads-webui-campaign-react/constants';\r\nimport {\r\n BudgetTierTitles,\r\n BudgetDetailKeysByBidType,\r\n BudgetDetailsKeysText,\r\n BudgetDetailKeysByCampaignType,\r\n} from '../model/constants';\r\n\r\nconst getRadioStyles = () => ({\r\n root: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n width: '100%',\r\n },\r\n radioTitle: {\r\n fontSize: '16px',\r\n fontWeight: '600',\r\n },\r\n flexBox: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n justifyContent: 'space-between',\r\n flexWrap: 'wrap',\r\n },\r\n leftBox: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n rowGap: '5px',\r\n },\r\n budgetDay: {\r\n fontSize: '14px',\r\n fontWeight: '600',\r\n borderRight: '1px solid rgba(224, 224, 224, 1)',\r\n verticalAlign: 'middle',\r\n paddingRight: '5px',\r\n height: 20,\r\n width: 'auto',\r\n display: 'inline-block',\r\n },\r\n budgetMonth: {\r\n fontSize: '14px',\r\n fontWeight: '600',\r\n height: 20,\r\n width: 'auto',\r\n display: 'inline-block',\r\n verticalAlign: 'middle',\r\n },\r\n column: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n },\r\n metric: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n },\r\n rightBox: {\r\n display: 'grid',\r\n 'grid-template-columns': 'repeat(2, 1fr)',\r\n width: '250px',\r\n columnGap: '10px',\r\n },\r\n badge: {\r\n borderRadius: '999px',\r\n textAlign: 'center',\r\n width: 81,\r\n height: 20,\r\n border: '1px solid rgba(159, 216, 159, 1)',\r\n color: 'rgba(14, 112, 14, 1)',\r\n fontSize: '10px',\r\n fontWeight: '600',\r\n background: 'rgba(241, 250, 241, 1)',\r\n },\r\n metricTitle: {\r\n fontSize: '10px',\r\n fontWeight: '400',\r\n color: 'rgba(97, 97, 97, 1)',\r\n },\r\n metricValue: {\r\n fontWeight: '600',\r\n fontSize: '14px',\r\n },\r\n budgetDisclaimer: {\r\n width: 'auto',\r\n fontSize: '10px',\r\n color: 'rgba(112, 112, 112, 1)',\r\n marginTop: '10px',\r\n },\r\n skeletionStyle: {\r\n height: 20,\r\n width: 60,\r\n display: 'inline-block',\r\n marginRight: '5px',\r\n },\r\n});\r\n\r\nexport const Metrics = ({\r\n budgetDetails,\r\n isLoading,\r\n bidType,\r\n campaignType,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const getStyles = useResponsiveStyles(getRadioStyles);\r\n\r\n const budgetDetailsKeys = BudgetDetailKeysByBidType[biddingStrategyTypeId[bidType]] || BudgetDetailKeysByCampaignType[campaignType] || BudgetDetailKeysByBidType.Default;\r\n\r\n return budgetDetailsKeys.map(key => (\r\n
\r\n
\r\n \r\n {\r\n isLoading ?\r\n \r\n \r\n \r\n :\r\n <>\r\n {i18n.getString(BudgetDetailsKeysText[key].title)} \r\n \r\n \r\n }\r\n \r\n \r\n {\r\n isLoading ?\r\n \r\n \r\n \r\n : budgetDetails && budgetDetails[key].Range\r\n }\r\n \r\n
\r\n
\r\n ));\r\n};\r\n\r\nexport const BudgetItemLabel = ({\r\n tier,\r\n data,\r\n isLoading,\r\n currency,\r\n campaignType,\r\n bidType,\r\n}) => {\r\n const getStyles = useResponsiveStyles(getRadioStyles);\r\n\r\n const i18n = useContext(I18nContext);\r\n\r\n const {\r\n BudgetAmountDaily,\r\n BudgetAmountMonthly,\r\n BudgetDetails,\r\n } = data || {};\r\n\r\n return (\r\n
\r\n
\r\n
\r\n \r\n {i18n.getString(BudgetTierTitles[tier])}\r\n \r\n
\r\n \r\n {isLoading ?\r\n \r\n \r\n \r\n : `${i18n.formatCurrency(BudgetAmountDaily, currency)} /${i18n.getString(_TL_('day'))}`\r\n }\r\n \r\n  \r\n \r\n {\r\n isLoading ?\r\n \r\n \r\n \r\n : `${i18n.formatCurrency(BudgetAmountMonthly, currency)}/${i18n.getString(_TL_('month'))}`\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\nBudgetItemLabel.propTypes = {\r\n tier: PropTypes.string.isRequired,\r\n data: PropTypes.shape({}).isRequired,\r\n isLoading: PropTypes.bool.isRequired,\r\n bidType: PropTypes.string.isRequired,\r\n campaignType: PropTypes.string.isRequired,\r\n currency: PropTypes.string,\r\n};\r\n\r\nBudgetItemLabel.defaultProps = {\r\n currency: 'USD',\r\n};\r\n\r\nexport const CustomBudgetLabel = ({\r\n isSelected,\r\n currency,\r\n onUpdateCustomBudget,\r\n customPerformanceData,\r\n hidePerformanceData,\r\n customBudgetResult,\r\n bidType,\r\n defaultBudget,\r\n minBudget,\r\n campaignType,\r\n maxBudget,\r\n showDropdown,\r\n onSelectCurrency,\r\n currencies,\r\n}) => {\r\n const getStyles = useResponsiveStyles(getRadioStyles);\r\n\r\n const i18n = useContext(I18nContext);\r\n\r\n const {\r\n BudgetDetails,\r\n isLoading,\r\n } = customPerformanceData || {};\r\n\r\n return (\r\n
\r\n
\r\n
\r\n {i18n.getString(_TL_('Set your own budget'))} \r\n {\r\n isSelected && (\r\n <>\r\n \r\n \r\n )\r\n }\r\n
\r\n
\r\n {\r\n // show two metrics in a column\r\n !hidePerformanceData && isSelected &&\r\n \r\n }\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\n\r\nCustomBudgetLabel.propTypes = {\r\n isSelected: PropTypes.bool.isRequired,\r\n currency: PropTypes.string.isRequired,\r\n bidType: PropTypes.string.isRequired,\r\n onUpdateCustomBudget: PropTypes.func.isRequired,\r\n customPerformanceData: PropTypes.shape({\r\n BudgetDetails: PropTypes.shape({}),\r\n isLoading: PropTypes.bool,\r\n }),\r\n hidePerformanceData: PropTypes.bool,\r\n defaultBudget: PropTypes.number.isRequired,\r\n campaignType: PropTypes.string.isRequired,\r\n showDropdown: PropTypes.bool,\r\n onSelectCurrency: PropTypes.func,\r\n currencies: PropTypes.arrayOf(PropTypes.shape({})),\r\n};\r\n\r\nCustomBudgetLabel.defaultProps = {\r\n hidePerformanceData: false,\r\n customPerformanceData: {\r\n BudgetDetails: {},\r\n isLoading: false,\r\n },\r\n showDropdown: false,\r\n onSelectCurrency: _.noop,\r\n currencies: [],\r\n};\r\n","import React, { useState, useEffect, useContext } from 'react';\r\nimport _ from 'underscore';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport {\r\n FluentProvider,\r\n webLightTheme,\r\n RadioGroup,\r\n Radio,\r\n} from '@fluentui/react-components';\r\nimport { ValidatedBudgetInput } from '@bingads-webui-campaign-react/budget-component-v2';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { BudgetItemLabel, CustomBudgetLabel } from './budget-item';\r\nimport { BudgetSuggestionTiers, getMatchingBudgetTierBasedOnBudget, CustomBudget } from '../model/constants';\r\n\r\nconst getStyles = () => ({\r\n selectedRadio: {\r\n border: '1px solid rgba(15, 108, 189, 1)',\r\n padding: '12px, 16px, 12px, 8px',\r\n borderRadius: '4px',\r\n },\r\n radio: {\r\n width: '100%',\r\n '& .fui-Label': {\r\n width: '100%',\r\n },\r\n },\r\n radioGroup: {\r\n width: '100%',\r\n },\r\n});\r\n\r\nexport const BudgetSuggestionContainer = ({\r\n data,\r\n isLoading,\r\n mode,\r\n campaignType,\r\n currency,\r\n onBudgetValidate,\r\n customPerformanceData,\r\n defaultBudget,\r\n bidType,\r\n minBudget,\r\n maxBudget,\r\n showDropdown,\r\n onSelectCurrency,\r\n currencies,\r\n}) => {\r\n const classes = useDefaultStyles(getStyles);\r\n\r\n const [selectedBudget, setSelectedBudget] = useState(null);\r\n\r\n const [customBudgetResult, setCustomBudgetResult] = useState(null);\r\n\r\n const i18n = useContext(I18nContext);\r\n\r\n const hasError = !isLoading && _.isEmpty(data);\r\n\r\n useEffect(() => {\r\n if (!isLoading && !hasError) {\r\n if (selectedBudget && selectedBudget !== CustomBudget) {\r\n const BudgetAmount = data && data[selectedBudget] && data[selectedBudget].BudgetAmountDaily;\r\n\r\n onBudgetValidate({ data: { budget: BudgetAmount, budgetTier: selectedBudget }, isValid: true, messages: [] });\r\n } else if (customBudgetResult) {\r\n onBudgetValidate({ data: { ...customBudgetResult.data, budgetTier: selectedBudget }, isValid: customBudgetResult.isValid, messages: customBudgetResult.messages });\r\n }\r\n }\r\n\r\n if (hasError && customBudgetResult) {\r\n onBudgetValidate({ data: { ...customBudgetResult.data, budgetTier: selectedBudget }, isValid: customBudgetResult.isValid, messages: customBudgetResult.messages });\r\n }\r\n }, [customBudgetResult, hasError, data, isLoading, onBudgetValidate, selectedBudget]);\r\n\r\n\r\n useEffect(() => {\r\n const matchingTier = getMatchingBudgetTierBasedOnBudget(data, defaultBudget, mode);\r\n\r\n if (selectedBudget === null && !_.isEmpty(data) && defaultBudget) {\r\n setSelectedBudget(matchingTier);\r\n }\r\n }, [defaultBudget, data, selectedBudget, mode]);\r\n\r\n if (hasError) {\r\n return (\r\n <>\r\n \r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n
\r\n {i18n.getString(_TL_('The following budget options are based on performance estimates from businesses with similar campaigns, ad settings, and budgets.'))}\r\n
\r\n setSelectedBudget(val.value)}>\r\n {(\r\n Object.keys(BudgetSuggestionTiers).map(tier => (\r\n }\r\n checked={selectedBudget === tier}\r\n className={selectedBudget === tier ?\r\n classNames(classes.selectedRadio, classes.radio, `budget-radio-${tier}`, 'selected')\r\n : classNames(`budget-radio-${tier}`, classes.radio)}\r\n />\r\n ))\r\n )\r\n }\r\n }\r\n checked={selectedBudget === CustomBudget}\r\n className={selectedBudget === CustomBudget ?\r\n classNames(classes.selectedRadio, classes.radio, `budget-radio-${CustomBudget}`, 'selected')\r\n : classNames(`budget-radio-${CustomBudget}`, classes.radio)}\r\n />\r\n \r\n
\r\n );\r\n};\r\n\r\nBudgetSuggestionContainer.propTypes = {\r\n data: PropTypes.shape({}).isRequired,\r\n isLoading: PropTypes.bool.isRequired,\r\n mode: PropTypes.string.isRequired,\r\n campaignType: PropTypes.string.isRequired,\r\n currency: PropTypes.string.isRequired,\r\n onBudgetValidate: PropTypes.func.isRequired,\r\n customPerformanceData: PropTypes.shape({}),\r\n defaultBudget: PropTypes.number.isRequired,\r\n showDropdown: PropTypes.bool,\r\n onSelectCurrency: PropTypes.func,\r\n currencies: PropTypes.arrayOf(PropTypes.shape({})),\r\n};\r\n\r\nBudgetSuggestionContainer.defaultProps = {\r\n customPerformanceData: null,\r\n showDropdown: false,\r\n onSelectCurrency: _.noop,\r\n currencies: [],\r\n};\r\n","import React, { useState, useContext, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport _ from 'underscore';\r\nimport {\r\n FluentProvider,\r\n webLightTheme,\r\n RadioGroup,\r\n Radio,\r\n} from '@fluentui/react-components';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { BudgetItemLabel, CustomBudgetLabel } from './budget-item';\r\nimport { RecommendedBudgetSuggestionTier, getMatchingBudgetTierBasedOnBudget, CustomBudget } from '../model/constants';\r\n\r\nconst getStyles = () => ({\r\n selectedRadio: {\r\n border: '1px solid rgba(15, 108, 189, 1)',\r\n padding: '12px, 16px, 12px, 8px',\r\n borderRadius: '4px',\r\n },\r\n radioGroupContainer: {\r\n gap: '16px',\r\n width: '100%',\r\n },\r\n currentBudget: {\r\n paddingLeft: '32px',\r\n gap: '16px',\r\n borderBottom: '1px solid var(--Neutral-Stroke-2-Rest, #E0E0E0)',\r\n },\r\n budgetTitle: {\r\n fontSize: '16px',\r\n fontWeight: '600',\r\n },\r\n radio: {\r\n width: '100%',\r\n '& .fui-Label': {\r\n width: '100%',\r\n },\r\n },\r\n});\r\n\r\nexport const BudgetSuggestionOfflineContainer = ({\r\n data,\r\n isLoading,\r\n mode,\r\n campaignType,\r\n currency,\r\n onBudgetValidate,\r\n defaultBudget,\r\n bidType,\r\n minBudget,\r\n maxBudget,\r\n}) => {\r\n const classes = useDefaultStyles(getStyles);\r\n const i18n = useContext(I18nContext);\r\n\r\n const [selectedBudget, setSelectedBudget] = useState(null);\r\n\r\n const [customBudgetResult, setCustomBudgetResult] = useState(null);\r\n\r\n useEffect(() => {\r\n if (!isLoading) {\r\n if (selectedBudget !== CustomBudget) {\r\n const BudgetAmount = data && data[selectedBudget] && data[selectedBudget].BudgetAmountDaily;\r\n\r\n onBudgetValidate({ data: { budget: BudgetAmount, budgetTier: selectedBudget }, isValid: true });\r\n } else if (customBudgetResult) {\r\n onBudgetValidate({ data: { ...customBudgetResult.data, budgetTier: selectedBudget }, isValid: customBudgetResult.isValid, messages: customBudgetResult.messages });\r\n }\r\n }\r\n }, [customBudgetResult, data, isLoading, onBudgetValidate, selectedBudget]);\r\n\r\n useEffect(() => {\r\n const matchingTier = getMatchingBudgetTierBasedOnBudget(data, defaultBudget, mode);\r\n\r\n if (selectedBudget === null && data && defaultBudget) {\r\n setSelectedBudget(matchingTier);\r\n } else if (selectedBudget === null && data) {\r\n setSelectedBudget(RecommendedBudgetSuggestionTier);\r\n }\r\n }, [defaultBudget, data, selectedBudget, mode]);\r\n\r\n if (!isLoading && _.isEmpty(data)) {\r\n return (\r\n
\r\n {i18n.getString(_TL_('There are no budget suggestions available for this campaign.'))}\r\n
\r\n );\r\n }\r\n\r\n return (\r\n \r\n
\r\n
\r\n \r\n
\r\n setSelectedBudget(val.value)} className={classNames(classes.radioGroupContainer, isLoading ? 'budget-loading' : '')}>\r\n \r\n {i18n.getString(_TL_('Select new budget'))}\r\n \r\n }\r\n checked={selectedBudget === RecommendedBudgetSuggestionTier}\r\n className={\r\n selectedBudget === RecommendedBudgetSuggestionTier ?\r\n classNames(classes.selectedRadio, classes.radio, 'budget-radio-Suggested')\r\n : classNames('budget-radio-Suggested', classes.radio)}\r\n />\r\n }\r\n checked={selectedBudget === CustomBudget}\r\n className={selectedBudget === CustomBudget ?\r\n classNames(classes.selectedRadio, classes.radio, 'budget-radio-CustomBudget')\r\n : classNames('budget-radio-CustomBudget', classes.radio)}\r\n />\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nBudgetSuggestionOfflineContainer.propTypes = {\r\n data: PropTypes.shape({\r\n Current: PropTypes.shape({\r\n BudgetAmountDaily: PropTypes.number,\r\n BudgetAmountMonthly: PropTypes.number,\r\n }),\r\n Suggested: PropTypes.shape({\r\n BudgetAmountDaily: PropTypes.number,\r\n BudgetAmountMonthly: PropTypes.number,\r\n }),\r\n }).isRequired,\r\n isLoading: PropTypes.bool.isRequired,\r\n mode: PropTypes.string.isRequired,\r\n campaignType: PropTypes.string.isRequired,\r\n onBudgetValidate: PropTypes.func.isRequired,\r\n defaultBudget: PropTypes.number.isRequired,\r\n};\r\n","import { useContext, useCallback } from 'react';\r\nimport _ from 'underscore';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { BudgetSuggestionTiers } from '../model/constants';\r\n\r\nconst formatCustomBudgetPerformanceMetrics = ({ performanceMetricsResponse }) => {\r\n const template = {};\r\n\r\n template.CustomBudgetPerformance = JSON.stringify(performanceMetricsResponse);\r\n\r\n return template;\r\n};\r\n\r\nconst formatBudgetSuggestionResponse = ({ budgetResponse }) => {\r\n const template = {};\r\n\r\n _.each(budgetResponse, (value, tier) => {\r\n const { BudgetAmountMonthly, BudgetAmountDaily, BudgetDetails } = value;\r\n\r\n template[`${tier}BudgetAmountMonthly`] = BudgetAmountMonthly;\r\n template[`${tier}BudgetAmountDaily`] = BudgetAmountDaily;\r\n template[`${tier}BudgetPerformance`] = JSON.stringify(BudgetDetails);\r\n });\r\n\r\n return template;\r\n};\r\n\r\nconst formatBudgetTemplate = ({\r\n campaign,\r\n budgetResponse,\r\n appliedBudget,\r\n budgetTier,\r\n}) => {\r\n const { Id, Budget, BiddingScheme } = campaign;\r\n\r\n const formattedBudgetResponse = formatBudgetSuggestionResponse({ budgetResponse });\r\n\r\n let tier = BudgetSuggestionTiers[budgetTier];\r\n\r\n if (budgetTier === 'CustomBudget') {\r\n tier = 'CustomBudget';\r\n }\r\n\r\n return {\r\n CampaignID: Id,\r\n CurrentBudget: Budget,\r\n BiddingStrategy: BiddingScheme,\r\n ...formattedBudgetResponse,\r\n BudgetApplied: appliedBudget,\r\n BudgetTier: tier,\r\n };\r\n};\r\n\r\nconst formatBudgetLandscapeTemplate = ({ campaign, budgetLandscapeResponse }) => {\r\n const { Id } = campaign;\r\n\r\n const template = formatBudgetSuggestionResponse({ budgetResponse: budgetLandscapeResponse });\r\n\r\n return {\r\n CampaignID: Id,\r\n ...template,\r\n };\r\n};\r\n\r\nexport const useBudgetMetricsLogger = () => {\r\n const activity = useContext(ActivityContext);\r\n\r\n const logBudgetFetchMetrics = useCallback(({\r\n campaign,\r\n budgetResponse,\r\n }) => {\r\n if (activity) {\r\n activity.trace(`[BudgetSuggestionV2][BudgetSuggestion] - ${JSON.stringify(formatBudgetTemplate({ campaign, budgetResponse }))}`);\r\n }\r\n }, [activity]);\r\n\r\n const logCustomBudgetPerformanceMetrics = useCallback(({\r\n campaign,\r\n performanceMetricsResponse,\r\n }) => {\r\n if (activity) {\r\n activity.trace(`[BudgetSuggestionV2][PerformanceMetrics] - ${JSON.stringify(formatCustomBudgetPerformanceMetrics({ campaign, performanceMetricsResponse }))}`);\r\n }\r\n }, [activity]);\r\n\r\n const logBudgetLandscapeMetrics = useCallback(({\r\n campaign,\r\n budgetLandscapeResponse,\r\n }) => {\r\n if (activity) {\r\n activity.trace(`[BudgetSuggestionV2][BudgetLandscape] - ${JSON.stringify(formatBudgetLandscapeTemplate({ campaign, budgetLandscapeResponse }))}`);\r\n }\r\n }, [activity]);\r\n\r\n const saveBudgetSuggestionMetrics = useCallback(({\r\n campaign,\r\n budgetResponse,\r\n appliedBudget,\r\n budgetTier,\r\n }) => {\r\n if (budgetTier === null && activity) {\r\n activity.trace(`[BudgetSuggestionV2][BudgetApplied][ManualInput] - ${JSON.stringify(formatBudgetTemplate({\r\n campaign,\r\n budgetResponse,\r\n appliedBudget,\r\n budgetTier,\r\n }))}`);\r\n } else if (activity) {\r\n activity.trace(`[BudgetSuggestionV2][BudgetApplied] - ${JSON.stringify(formatBudgetTemplate({\r\n campaign,\r\n budgetResponse,\r\n appliedBudget,\r\n budgetTier,\r\n }))}`);\r\n }\r\n }, [activity]);\r\n\r\n return {\r\n logBudgetFetchMetrics,\r\n logCustomBudgetPerformanceMetrics,\r\n logBudgetLandscapeMetrics,\r\n saveBudgetSuggestionMetrics,\r\n };\r\n};\r\n","import { useCallback, useContext, useRef, useMemo } from 'react';\r\nimport _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { odata } from '@bingads-webui/http-util';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { edmCampaign } from '@bingads-webui/edm-campaign';\r\n\r\nimport {\r\n parsePerformanceEstimateAPI,\r\n parseBudgetSuggestionAPI,\r\n parseBudgetLandscapeAPI,\r\n getSuggestedBudgetAmounts,\r\n} from './model/api-parser';\r\nimport { MODE, getParserByCampaignType } from './model/constants';\r\nimport { useBudgetMetricsLogger } from './components/use-budget-metrics-logger';\r\n\r\nexport const createOrUpdateCampaign = (data) => {\r\n const campaignEDM = edmCampaign.types.resolve('Model.ShoppingCampaign');\r\n const campaignResource = new campaignEDM.ResourceIdentifier();\r\n const createOrUpdateCall = data && data.Id ?\r\n campaignResource.bulkUpdate.bind(campaignResource) :\r\n campaignResource.bulkCreate.bind(campaignResource);\r\n return createOrUpdateCall(data);\r\n};\r\n\r\nexport const getODataConfig = (serverContext) => {\r\n const isLocal = () => {\r\n const hostname = document.location.hostname.toLowerCase();\r\n return hostname.indexOf('ads.microsoft.com') === -1 &&\r\n hostname.indexOf('ads-int.microsoft.com') === -1;\r\n };\r\n\r\n const odataPath = isLocal() ? 'AdInsight/V2' : 'AdInsight/V2';\r\n\r\n const oDataConfig = {\r\n odataToken: serverContext.Token,\r\n oDataToken: serverContext.Token,\r\n odataPath: `${serverContext.ServicesEndpoints.AdInsightAPI}${odataPath}`,\r\n oDataPath: `${serverContext.ServicesEndpoints.AdInsightAPI}${odataPath}`,\r\n };\r\n\r\n return oDataConfig;\r\n};\r\n\r\nexport const useBudgetSuggestionRepository = ({\r\n mode,\r\n campaignId,\r\n campaignType,\r\n currency,\r\n campaign,\r\n assetGroup,\r\n}) => {\r\n const serverContext = useContext(ServerContext);\r\n\r\n const { scope } = useContext(ScopeContext) || {};\r\n\r\n const i18n = useContext(I18nContext);\r\n\r\n const { aid, cid, campaignId: campaignIdFromScope } = scope.values;\r\n const currentCampaignId = campaignId || campaignIdFromScope;\r\n\r\n const { CurrentAccount: { CurrencyCode } } = serverContext;\r\n\r\n const {\r\n logBudgetFetchMetrics,\r\n logBudgetLandscapeMetrics,\r\n logCustomBudgetPerformanceMetrics,\r\n saveBudgetSuggestionMetrics,\r\n } = useBudgetMetricsLogger();\r\n\r\n const oDataConfig = useMemo(() => getODataConfig(serverContext), [serverContext]);\r\n\r\n const oDataOptions = useMemo(() => ({\r\n contentType: 'application/json',\r\n path: oDataConfig.odataPath,\r\n oDataToken: oDataConfig.odataToken,\r\n }), [oDataConfig]);\r\n\r\n const latestSuggestedBudget = useRef([]);\r\n\r\n const fetchBudgetSuggestionData = useCallback((payload) => {\r\n const baseURL = `${oDataConfig.odataPath}/Customers(${cid})/Accounts(${aid})/BudgetSuggestion.GetBudgetSuggestion`;\r\n\r\n const options = _.extend(\r\n {},\r\n oDataOptions,\r\n {\r\n url: baseURL,\r\n data: payload,\r\n }\r\n );\r\n\r\n const promise = odata.post(options);\r\n\r\n return promise.then((data) => {\r\n if (data) {\r\n const parsedBudgetSuggestion = parseBudgetSuggestionAPI(data, i18n, currency);\r\n\r\n logBudgetFetchMetrics({ campaign, budgetResponse: parsedBudgetSuggestion });\r\n latestSuggestedBudget.current = parsedBudgetSuggestion;\r\n return parsedBudgetSuggestion;\r\n }\r\n\r\n return null;\r\n });\r\n }, [aid, campaign, cid, logBudgetFetchMetrics, oDataConfig.odataPath, oDataOptions, i18n, currency]);\r\n\r\n const fetchInitialBudgetSuggestionData = useCallback(() => {\r\n const parser = getParserByCampaignType(campaignType);\r\n\r\n const payload = parser({\r\n assetGroup, campaign, campaignType, currency: currency || CurrencyCode,\r\n });\r\n\r\n return fetchBudgetSuggestionData(payload);\r\n }, [CurrencyCode, assetGroup, campaign, campaignType, currency, fetchBudgetSuggestionData]);\r\n\r\n const saveBudget = useCallback(({\r\n budgetAmount,\r\n budgetTier,\r\n biddingScheme,\r\n }) => {\r\n const modelToSave = {\r\n Id: campaignId,\r\n Budget: {\r\n Amount: i18n.parseDecimal(budgetAmount),\r\n Type: 'DailyStandard',\r\n },\r\n ...(\r\n _.isEmpty(biddingScheme) ? {} : { BiddingScheme: biddingScheme }\r\n ),\r\n };\r\n\r\n return createOrUpdateCampaign(modelToSave).then((res) => {\r\n saveBudgetSuggestionMetrics({\r\n campaign, budgetResponse: latestSuggestedBudget.current, appliedBudget: budgetAmount, budgetTier,\r\n });\r\n\r\n return res;\r\n }).catch(error =>\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n Promise.reject({ error }));\r\n }, [campaign, campaignId, i18n, saveBudgetSuggestionMetrics]);\r\n\r\n const fetchBudgetLandscapeData = useCallback(() => {\r\n const baseURL = `${oDataConfig.odataPath}/Customers(${cid})/Accounts(${aid})/Campaigns(${currentCampaignId})/Opportunity.GetUpdatedBudgetLandscape`;\r\n\r\n const promise = odata.get(baseURL, oDataConfig);\r\n\r\n return promise.then((data) => {\r\n const parsedBudgetLandscape = parseBudgetLandscapeAPI(data, i18n, currency);\r\n\r\n logBudgetLandscapeMetrics({ campaign: { Id: currentCampaignId }, budgetLandscapeResponse: parsedBudgetLandscape });\r\n\r\n return parsedBudgetLandscape;\r\n });\r\n }, [oDataConfig, cid, aid, currentCampaignId, i18n, currency, logBudgetLandscapeMetrics]);\r\n\r\n const loadBudget = useCallback(() => {\r\n if (mode === MODE.CREATION) {\r\n return fetchInitialBudgetSuggestionData();\r\n }\r\n\r\n return fetchBudgetLandscapeData();\r\n }, [fetchBudgetLandscapeData, fetchInitialBudgetSuggestionData, mode]);\r\n\r\n const fetchCustomBudgetPerformanceData = useCallback(({ budgetAmount }) => {\r\n const baseURL = `${oDataConfig.odataPath}/Customers(${cid})/Accounts(${aid})/BudgetSuggestion.GetPerformanceEstimation`;\r\n\r\n const updatedCampaign = {\r\n ...campaign,\r\n Budget: {\r\n Amount: i18n.parseDecimal(budgetAmount),\r\n },\r\n };\r\n\r\n const parser = getParserByCampaignType(campaignType);\r\n\r\n const payload = parser({\r\n assetGroup,\r\n campaign: updatedCampaign,\r\n currency: currency || CurrencyCode,\r\n latestSuggestedBudget: getSuggestedBudgetAmounts(latestSuggestedBudget.current).sort((a, b) => a - b),\r\n isPerformanceEstimation: true,\r\n });\r\n\r\n const options = _.extend(\r\n {},\r\n oDataOptions,\r\n {\r\n url: baseURL,\r\n data: payload,\r\n }\r\n );\r\n\r\n const promise = odata.post(options);\r\n\r\n return promise.then((data) => {\r\n const parsedPerformanceEstimate = parsePerformanceEstimateAPI(data, i18n, currency);\r\n\r\n logCustomBudgetPerformanceMetrics({ performanceMetricsResponse: parsedPerformanceEstimate });\r\n\r\n return parsedPerformanceEstimate;\r\n });\r\n }, [CurrencyCode, aid, assetGroup, campaign, campaignType, cid, currency, i18n, logCustomBudgetPerformanceMetrics, oDataConfig.odataPath, oDataOptions]);\r\n\r\n // only for online model.\r\n // load budget but only updating few fields in campaign object.\r\n const loadBudgetPartial = useCallback((args) => {\r\n const updatedCampaign = {\r\n ...campaign,\r\n ...args,\r\n };\r\n\r\n const parser = getParserByCampaignType(campaignType);\r\n\r\n const payload = parser({\r\n assetGroup,\r\n campaign: updatedCampaign,\r\n campaignType,\r\n currency: currency || CurrencyCode,\r\n });\r\n\r\n return fetchBudgetSuggestionData(payload);\r\n }, [CurrencyCode, assetGroup, campaign, campaignType, currency, fetchBudgetSuggestionData]);\r\n\r\n return {\r\n loadBudget,\r\n loadBudgetPartial,\r\n saveBudget,\r\n fetchCustomBudgetPerformanceData,\r\n };\r\n};\r\n","import React, { useEffect, useState, useCallback } from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { BudgetSuggestionContainer } from './components/budget-suggestion-container';\r\nimport { BudgetSuggestionOfflineContainer } from './components/budget-suggestion-offline-container';\r\nimport { useBudgetSuggestionRepository } from './use-budget-suggestion-repository';\r\nimport { MODE, CustomBudget } from './model/constants';\r\n\r\nexport const BudgetSuggestion = ({\r\n mode,\r\n campaignId,\r\n campaign,\r\n assetGroup,\r\n campaignType,\r\n currency,\r\n onBudgetValidate,\r\n bidType,\r\n ...rest\r\n}) => {\r\n const { loadBudget, fetchCustomBudgetPerformanceData } = useBudgetSuggestionRepository({\r\n mode,\r\n campaignId,\r\n campaignType,\r\n currency,\r\n campaign,\r\n assetGroup,\r\n });\r\n\r\n const [isLoading, setIsLoading] = useState(true);\r\n\r\n const [budgetSuggestionData, setBudgetSuggestionData] = useState(null);\r\n\r\n const [customPerformanceData, setCustomPerformanceData] = useState(null);\r\n\r\n useEffect(() => {\r\n setIsLoading(true);\r\n loadBudget().then((data) => {\r\n setBudgetSuggestionData(data);\r\n }).finally(() => {\r\n setIsLoading(false);\r\n });\r\n }, [loadBudget]);\r\n\r\n const onBudgetSuggestionChange = useCallback((result) => {\r\n const { data } = result;\r\n\r\n const { budgetTier, budgetAmount } = data;\r\n\r\n if (budgetTier === CustomBudget) {\r\n setCustomPerformanceData({ isLoading: true });\r\n fetchCustomBudgetPerformanceData({ budgetAmount })\r\n .then((customBudgetResult) => {\r\n setCustomPerformanceData({ isLoading: false, ...customBudgetResult });\r\n })\r\n .catch((err) => {\r\n setCustomPerformanceData({ isLoading: false, err });\r\n });\r\n }\r\n onBudgetValidate(result);\r\n }, [fetchCustomBudgetPerformanceData, onBudgetValidate]);\r\n\r\n return (\r\n mode === MODE.CREATION ?\r\n \r\n :\r\n \r\n );\r\n};\r\n\r\nBudgetSuggestion.propTypes = {\r\n mode: PropTypes.string,\r\n campaignId: PropTypes.string,\r\n campaignType: PropTypes.string,\r\n currency: PropTypes.string,\r\n onBudgetValidate: PropTypes.func,\r\n campaign: PropTypes.shape({}),\r\n assetGroup: PropTypes.shape({}),\r\n bidType: PropTypes.string.isRequired,\r\n};\r\n\r\nBudgetSuggestion.defaultProps = {\r\n mode: MODE.EDITING,\r\n campaignId: undefined,\r\n campaignType: undefined,\r\n currency: undefined,\r\n onBudgetValidate: _.noop,\r\n campaign: undefined,\r\n assetGroup: undefined,\r\n};\r\n","import _ from 'underscore';\r\nimport React, { useCallback, useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport {\r\n Dialog,\r\n DialogSurface,\r\n DialogTitle,\r\n DialogBody,\r\n DialogActions,\r\n DialogContent,\r\n Button,\r\n} from '@fluentui/react-components';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { LearnMoreLink } from '@bingads-webui-campaign-react/help';\r\nimport { MODE } from './model/constants';\r\nimport { BudgetSuggestionOfflineContainer } from './components/budget-suggestion-offline-container';\r\nimport { useBudgetSuggestionRepository } from './use-budget-suggestion-repository';\r\n\r\nconst getStyles = () => ({\r\n editBudgetSuggestionButton: {\r\n color: 'rgb(0, 120, 212) !important',\r\n border: 'none !important',\r\n padding: '0px !important',\r\n fontWeight: '400!important',\r\n '&:active, &:focus, &:hover': {\r\n color: 'rgb(0, 120, 212) !important',\r\n backgroundColor: '#ffffff !important',\r\n },\r\n },\r\n learnMoreContent: {\r\n '& a.HelpTopic:focus': {\r\n outline: 'none !important',\r\n },\r\n },\r\n\r\n});\r\n\r\nexport const BudgetSuggestionDialog = ({\r\n onBudgetChange,\r\n i18n,\r\n campaignId,\r\n campaignType,\r\n currency,\r\n enableSaving,\r\n campaign,\r\n onGridRefresh,\r\n showDialog,\r\n onTriggerDialog,\r\n minBudget,\r\n maxBudget,\r\n defaultBudget,\r\n}) => {\r\n const classes = useDefaultStyles(getStyles);\r\n const [isOpen, setIsOpen] = useState(false);\r\n const [customBudgetResult, setCustomBudgetResult] = useState({ data: { budget: 20 }, isValid: true, messages: [] });\r\n\r\n const { loadBudget, fetchCustomBudgetPerformanceData, saveBudget } = useBudgetSuggestionRepository({\r\n campaignId,\r\n campaignType,\r\n currency,\r\n campaign,\r\n });\r\n\r\n const [isLoading, setIsLoading] = useState(true);\r\n\r\n const [budgetSuggestionData, setBudgetSuggestionData] = useState(null);\r\n\r\n useEffect(() => {\r\n setIsLoading(true);\r\n loadBudget().then((data) => {\r\n setBudgetSuggestionData(data);\r\n }).finally(() => {\r\n setIsLoading(false);\r\n });\r\n }, [loadBudget]);\r\n\r\n const triggerDialog = useCallback((isDialogOpen) => {\r\n if (onTriggerDialog) {\r\n onTriggerDialog(isDialogOpen);\r\n } else {\r\n setIsOpen(isDialogOpen);\r\n }\r\n }, [onTriggerDialog]);\r\n\r\n const onChange = useCallback(() => {\r\n onBudgetChange({ Amount: customBudgetResult.data.budget, Type: 'DailyStandard' }, customBudgetResult.isValid);\r\n triggerDialog(false);\r\n }, [customBudgetResult, onBudgetChange, triggerDialog]);\r\n\r\n return (\r\n
\r\n {\r\n !onTriggerDialog && (\r\n triggerDialog(true)}\r\n >\r\n { i18n.getString(_TL_('View budget recommendations'))}\r\n \r\n )\r\n }\r\n \r\n \r\n \r\n \r\n {i18n.getString(_TL_('Budget recommendations'))}\r\n \r\n \r\n
\r\n {i18n.getString(_TL_('Your ads could be shown more often. You can increase your budget to ensure more ad exposure.'))}\r\n \r\n
\r\n \r\n
\r\n \r\n {\r\n if (enableSaving) {\r\n saveBudget({\r\n campaign: { campaign },\r\n budgetAmount: `${customBudgetResult.data.budget}`,\r\n budgetTier: customBudgetResult.data.budgetTier,\r\n }).then(() => {\r\n onGridRefresh();\r\n });\r\n triggerDialog(false);\r\n } else {\r\n onChange();\r\n }\r\n }\r\n }\r\n >\r\n {i18n.getString(_TL_('Apply'))}\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nBudgetSuggestionDialog.propTypes = {\r\n budget: PropTypes.shape({\r\n Amount: PropTypes.number,\r\n }).isRequired,\r\n onBudgetChange: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n campaignId: PropTypes.string.isRequired,\r\n campaignType: PropTypes.string,\r\n currency: PropTypes.string,\r\n enableSaving: PropTypes.bool,\r\n onGridRefresh: PropTypes.func,\r\n campaign: PropTypes.shape({}),\r\n showDialog: PropTypes.bool,\r\n onTriggerDialog: PropTypes.func,\r\n};\r\n\r\nBudgetSuggestionDialog.defaultProps = {\r\n campaignType: 'performanceMax',\r\n currency: 'USD',\r\n enableSaving: false,\r\n onGridRefresh: _.noop,\r\n campaign: null,\r\n showDialog: false,\r\n onTriggerDialog: null,\r\n};\r\n","import _ from 'underscore';\r\nimport classNames from 'classnames';\r\nimport React, { useCallback, useContext, useState } from 'react';\r\nimport {\r\n Dialog,\r\n DialogSurface,\r\n DialogTitle,\r\n DialogContent,\r\n DialogBody,\r\n DialogActions,\r\n Button,\r\n} from '@fluentui/react-components';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\n\r\nexport function useConfirmDialog(defaultProps, instrumentationInfo = {}) {\r\n const [additionalProps, setAdditionalProps] = useState({ hidden: true });\r\n const {\r\n content,\r\n className,\r\n hideCancel = false,\r\n hideConfirm = false,\r\n onConfirm,\r\n onCancel: originalOnCancel,\r\n secondaryButtons = [],\r\n onDisplay,\r\n modalType = 'modal',\r\n ...passThroughProps\r\n } = {\r\n ...defaultProps,\r\n ...additionalProps,\r\n };\r\n\r\n const {\r\n activity,\r\n dialogName,\r\n } = instrumentationInfo;\r\n const i18n = useContext(I18nContext);\r\n\r\n const showDialog = useCallback((periodProps = {}) => {\r\n if (activity) {\r\n activity.trace(`Showing dialog \"${dialogName}\".`);\r\n }\r\n\r\n setAdditionalProps({\r\n ...periodProps,\r\n hidden: false,\r\n });\r\n\r\n if (onDisplay && _.isFunction(onDisplay)) {\r\n onDisplay();\r\n }\r\n }, [setAdditionalProps, activity, dialogName, onDisplay]);\r\n\r\n const dismissDialog = useCallback((buttonKey) => {\r\n if (activity) {\r\n activity.trace(`Dialog \"${dialogName}\" dismissed with button \"${buttonKey}\".`);\r\n }\r\n\r\n // Keep additionalProps here to avoid the dialog renders again\r\n // without additionalProps before hidding.\r\n setAdditionalProps({\r\n ...additionalProps,\r\n hidden: true,\r\n });\r\n }, [additionalProps, setAdditionalProps, activity, dialogName]);\r\n\r\n const internalOnCancel = useCallback(() => {\r\n dismissDialog('cancel');\r\n\r\n if (originalOnCancel) {\r\n originalOnCancel();\r\n }\r\n }, [dismissDialog, originalOnCancel]);\r\n\r\n const onConfirmClicked = useCallback(() => {\r\n dismissDialog('confirm');\r\n\r\n onConfirm();\r\n }, [onConfirm, dismissDialog]);\r\n\r\n return [\r\n (\r\n \r\n \r\n \r\n {passThroughProps.title}\r\n \r\n {content}\r\n \r\n \r\n {!hideConfirm &&\r\n \r\n {passThroughProps.confirmText || i18n.getString(_TL_('Confirm'))}\r\n }\r\n {secondaryButtons.map(buttonProps => (\r\n ))\r\n }\r\n {!hideCancel &&\r\n \r\n {passThroughProps.cancelText || i18n.getString(_TL_('Cancel'))}\r\n }\r\n \r\n \r\n \r\n \r\n ),\r\n showDialog,\r\n !passThroughProps.hidden,\r\n ];\r\n}\r\n","import { makeStyles } from '@fluentui/react-components';\r\n\r\nexport const useStyles = makeStyles({\r\n imageWrapper: {\r\n width: '100%',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n },\r\n\r\n image: {\r\n width: '192px',\r\n marginBottom: '20px',\r\n },\r\n});\r\n","import React, { Fragment } from 'react';\r\nimport { useConfirmDialog } from './use-confirm-dialog';\r\nimport { useStyles } from './styles';\r\n\r\nexport const useConfirmDialogWithImage = (props) => {\r\n const classes = useStyles();\r\n\r\n const newContent = (\r\n \r\n {props.content}\r\n
\r\n \"\"\r\n
\r\n
\r\n );\r\n\r\n const [dialog, showDialog, visible] = useConfirmDialog({\r\n ...props,\r\n content: newContent,\r\n });\r\n return [dialog, showDialog, visible];\r\n};\r\n","export const TABLIST = {\r\n GROUP: 'group',\r\n RANK: 'rank',\r\n};\r\n","export const SEARCH_INPUT_TYPES = {\r\n WEBSITE: 'website',\r\n KEYWORD: 'keyword',\r\n};\r\n\r\nexport const SEARCH_INPUT_TITLES = {\r\n [SEARCH_INPUT_TYPES.WEBSITE]: _TL_('Scan your website for keywords'),\r\n [SEARCH_INPUT_TYPES.KEYWORD]: _TL_('Add your products or services'),\r\n};\r\n\r\nexport const SEARCH_INPUT_PLACEHOLDERS = {\r\n [SEARCH_INPUT_TYPES.WEBSITE]: _TL_(\"Enter your website's URL\"),\r\n [SEARCH_INPUT_TYPES.KEYWORD]: _TL_('Enter your products or services'),\r\n};\r\n","export const getTabListStyles = () => ({\r\n root: {\r\n marginTop: 4,\r\n '& button + button': {\r\n marginLeft: 24,\r\n },\r\n },\r\n divider: {\r\n marginTop: 5,\r\n },\r\n});\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Tab, TabList, Divider } from '@fluentui/react-components';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { TABLIST } from './constants/index';\r\nimport { getTabListStyles } from './style/tab-list-style';\r\n\r\nexport const KeywordTab = ({\r\n selectedTab,\r\n onTabSelect,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n const classes = useDefaultStyles(getTabListStyles);\r\n\r\n return (\r\n
\r\n \r\n {i18n.getString(_TL_('Keyword grouping'))}\r\n {i18n.getString(_TL_('Keyword ranking'))}\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nKeywordTab.propTypes = {\r\n selectedTab: PropTypes.string.isRequired,\r\n onTabSelect: PropTypes.func.isRequired,\r\n};\r\n","const options = {\r\n compact: 'short',\r\n minimumFractionDigits: 0,\r\n maximumFractionDigits: 0,\r\n};\r\n\r\nexport function getSearchRange(value) {\r\n const base = 10 ** Math.floor(Math.log10(value));\r\n\r\n return {\r\n ceil: base * 10,\r\n floor: base < 10 ? 0 : base,\r\n };\r\n}\r\n\r\nexport function getSearchRangeString(value, i18n) {\r\n const range = getSearchRange(value);\r\n\r\n if (range.ceil === 0) {\r\n return '-';\r\n }\r\n return `${i18n.formatDecimal(range.floor, options)} - ${i18n.formatDecimal(range.ceil, options)}`;\r\n}\r\n","import React, { useContext } from 'react';\r\nimport { HelpPopup } from '@bingads-webui-react/help-popup';\r\nimport { GridContext } from '@bingads-webui-grid/grid-context';\r\nimport { getSearchRangeString } from './get-search-range';\r\n\r\nexport const onRenderHeader = (title, topicId, i18n) => (\r\n
\r\n \r\n {title}\r\n \r\n {\r\n topicId && (\r\n \r\n \r\n \r\n )\r\n }\r\n
\r\n);\r\n\r\nexport const columnOrder = i18n => ({\r\n key: 'ColumnOrder',\r\n name: i18n.getString(_TL_('#')),\r\n fieldName: 'Order',\r\n minWidth: 30,\r\n maxWidth: 60,\r\n // isResizable: true,\r\n sortable: false,\r\n onRender: (_item, index) => {\r\n // eslint-disable-next-line react-hooks/rules-of-hooks\r\n const { state } = useContext(GridContext);\r\n const { pagination } = state;\r\n const { pageNumber, pageSize } = pagination;\r\n return `#${i18n.formatDecimal(((pageNumber - 1) * pageSize) + index + 1, {\r\n minimumFractionDigits: 0,\r\n maximumFractionDigits: 0,\r\n })}`;\r\n },\r\n});\r\n\r\nexport const columnKeyword = i18n => ({\r\n key: 'Keyword',\r\n name: i18n.getString(_TL_('Keyword')),\r\n fieldName: 'Keyword',\r\n minWidth: 100,\r\n maxWidth: 200,\r\n isResizable: true,\r\n sortable: false,\r\n});\r\n\r\nexport const columnSearches = i18n => ({\r\n key: 'ColumnSearches',\r\n name: 'ColumnSearches',\r\n fieldName: 'AggregateMetric/AverageSearchVolume',\r\n minWidth: 100,\r\n maxWidth: 120,\r\n isResizable: true,\r\n sortable: true,\r\n onRender: item => getSearchRangeString(item.AggregateMetric.AverageSearchVolume, i18n),\r\n onRenderHeader: () => onRenderHeader(i18n.getString(_TL_('Searches')), 'pop_BA_CampaignCreate_Keywords_MonthlySearches', i18n),\r\n});\r\n\r\nexport const columns = i18n => [\r\n columnOrder(i18n),\r\n columnKeyword(i18n),\r\n columnSearches(i18n),\r\n];\r\n","import { useContext, useEffect, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { GridContext, useClientSortingPaging, usePreservedSelection } from '@bingads-webui-grid/grid-context';\r\n\r\nexport const GridDataSource = ({ onSelectChange }) => {\r\n const { state, dispatch } = useContext(GridContext);\r\n const {\r\n sortedColumn, pagination, sourceItemsInAllPages, selectedItemsInAllPages,\r\n } = state;\r\n const { pageNumber, pageSize } = pagination;\r\n const sort = useCallback((a, b) => {\r\n const isSortedDescending = sortedColumn.isSortedDescending ? -1 : 1;\r\n switch (sortedColumn.fieldName) {\r\n case 'AggregateMetric/AverageSearchVolume':\r\n return isSortedDescending * (a.AggregateMetric.AverageSearchVolume - b.AggregateMetric.AverageSearchVolume);\r\n default:\r\n return 0;\r\n }\r\n }, [sortedColumn]);\r\n\r\n useClientSortingPaging({\r\n sortFunction: sort,\r\n });\r\n usePreservedSelection();\r\n\r\n useEffect(() => {\r\n dispatch({ type: 'FINISH_LOAD_DATA', payload: { items: sourceItemsInAllPages.slice((pageNumber - 1) * pageSize, (pageNumber) * pageSize), totalCount: sourceItemsInAllPages.length } });\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, []);\r\n\r\n useEffect(() => {\r\n onSelectChange(selectedItemsInAllPages);\r\n }, [onSelectChange, selectedItemsInAllPages]);\r\n\r\n return null;\r\n};\r\n\r\nGridDataSource.propTypes = {\r\n onSelectChange: PropTypes.func.isRequired,\r\n};\r\n","export const getNoDataWarningStyles = () => ({\r\n root: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n height: '100%',\r\n },\r\n imageContainer: {\r\n height: 200,\r\n width: 200,\r\n borderRadius: 160,\r\n border: '0.64px #F0F0F0',\r\n background: '#FAF9F8',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n },\r\n image: {\r\n height: 128,\r\n width: 128,\r\n },\r\n keyHint: {\r\n fontWeight: 600,\r\n fontSize: 20,\r\n width: 300,\r\n marginTop: 18,\r\n textAlign: 'center',\r\n },\r\n description: {\r\n width: 300,\r\n textAlign: 'center',\r\n marginTop: 8,\r\n },\r\n});\r\n","import React, { useContext } from 'react';\r\nimport classNames from 'classnames';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport searchImage from './media/search.png';\r\nimport { getNoDataWarningStyles } from './style/no-recommendation-warning-style';\r\n\r\nexport const NoRecommendationWarning = () => {\r\n const i18n = useContext(I18nContext);\r\n const classes = useDefaultStyles(getNoDataWarningStyles);\r\n return (\r\n
\r\n
\r\n {i18n.getString(_TL_('colorful\r\n
\r\n
\r\n {i18n.getString(_TL_('No keywords found'))}\r\n
\r\n
\r\n {i18n.getString(_TL_('We were unable to suggest any keywords based on the URL provided. Please try entering a different URL, product, or service.'))}\r\n
\r\n
\r\n );\r\n};\r\n","export const getGridStyles = () => ({\r\n root: {\r\n marginTop: 16,\r\n '& .ms-DetailsHeader': {\r\n borderTop: 'none',\r\n },\r\n '& .ms-DetailsRow-cell:nth-child(1)': {\r\n borderRight: 'none',\r\n },\r\n '& .ms-DetailsHeader-cell:nth-child(3)': {\r\n borderRight: 'none',\r\n },\r\n },\r\n});\r\n","import React, { useMemo, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { SelectionMode, CheckboxVisibility } from '@fluentui/react';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { ContextualDetailsList, GridContextProvider } from '@bingads-webui-grid/grid-context';\r\nimport { columns } from './util/grid-columns';\r\nimport { GridDataSource } from './grid-data-source';\r\nimport { NoRecommendationWarning } from './no-recommendation-warning';\r\nimport { getGridStyles } from './style/grid-style';\r\n\r\nexport const KeywordRanking = ({\r\n allData,\r\n selectedData,\r\n onSelectChange,\r\n}) => {\r\n const classes = useDefaultStyles(getGridStyles);\r\n const i18n = useContext(I18nContext);\r\n const gridColumns = useMemo(() => columns(i18n), [i18n]);\r\n const initialGridContext = useMemo(() => ({\r\n sortedColumn: {}, // [todo] initial sort column\r\n selectionMode: SelectionMode.multiple,\r\n allColumns: gridColumns,\r\n selectedColumns: gridColumns,\r\n initAllItems: allData,\r\n initSelectedItems: selectedData,\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }), []);\r\n\r\n return (\r\n
\r\n \r\n \r\n }\r\n stickyHeader\r\n checkboxVisibility={CheckboxVisibility.always}\r\n />\r\n \r\n
\r\n );\r\n};\r\n\r\nKeywordRanking.propTypes = {\r\n allData: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n selectedData: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n onSelectChange: PropTypes.func,\r\n};\r\n\r\nKeywordRanking.defaultProps = {\r\n onSelectChange: () => {},\r\n};\r\n","export const getSearchInputStyles = () => ({\r\n searchInputContainer: {\r\n width: 268,\r\n },\r\n searchBox: {\r\n marginTop: 4,\r\n },\r\n});\r\n\r\nexport const searchInputTitleStyles = {\r\n fontWeight: 600,\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Text } from '@fluentui/react-components';\r\nimport { SearchBox } from '@fluentui/react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { getSearchInputStyles, searchInputTitleStyles } from './style/search-input-style';\r\nimport { SEARCH_INPUT_TITLES, SEARCH_INPUT_PLACEHOLDERS } from './constants';\r\n\r\nexport const SearchInput = (props) => {\r\n const classes = useDefaultStyles(getSearchInputStyles);\r\n const i18n = useContext(I18nContext);\r\n const {\r\n onSearch,\r\n onChange,\r\n type,\r\n value,\r\n enabled,\r\n } = props;\r\n\r\n return (\r\n
\r\n
\r\n \r\n {i18n.getString(SEARCH_INPUT_TITLES[type])}\r\n \r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nSearchInput.propTypes = {\r\n onChange: PropTypes.func.isRequired,\r\n onSearch: PropTypes.func.isRequired,\r\n type: PropTypes.string.isRequired,\r\n value: PropTypes.string.isRequired,\r\n enabled: PropTypes.bool.isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Stack } from '@fluentui/react';\r\nimport { SearchInput } from './search-input';\r\nimport { SEARCH_INPUT_TYPES } from './constants';\r\n\r\nexport const SearchInputStack = ({\r\n url,\r\n keywords,\r\n inputStatus,\r\n onUrlChange,\r\n onKeywordsChange,\r\n onSearch,\r\n}) => (\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n);\r\n\r\nSearchInputStack.propTypes = {\r\n onSearch: PropTypes.func.isRequired,\r\n onKeywordsChange: PropTypes.func.isRequired,\r\n onUrlChange: PropTypes.func.isRequired,\r\n url: PropTypes.string.isRequired,\r\n keywords: PropTypes.string.isRequired,\r\n inputStatus: PropTypes.shape({\r\n url: PropTypes.bool,\r\n keywords: PropTypes.bool,\r\n }).isRequired,\r\n};\r\n","import _ from 'underscore';\r\nimport { isSelectedLanguagesOnlyTire2ForKeywordPlanner, getKeywordPlannerSupportedLanguagesByLocationIds } from '@bingads-webui-campaign-legacy/location-targets/util/constants';\r\n\r\nexport const isAllLocationsUnsupported = targetedLocationInfo => targetedLocationInfo.locations.length === 0 && targetedLocationInfo.numLocationsTargeted > 0;\r\n\r\nexport const getLanguagesSupportedByLocations = (locations, languages, useTireTwoMarkets = false) => {\r\n const locationSupportedLanguages =\r\n getKeywordPlannerSupportedLanguagesByLocationIds(locations, useTireTwoMarkets);\r\n\r\n return _.intersection(languages, locationSupportedLanguages);\r\n};\r\n\r\nexport const onlyTire2LangaugesSelected = (locations, languages, crossCheckWithTargets = false) => {\r\n const languagesCanUse = crossCheckWithTargets ?\r\n getLanguagesSupportedByLocations(locations, languages, true) :\r\n languages;\r\n\r\n return !_.isEmpty(languagesCanUse) && isSelectedLanguagesOnlyTire2ForKeywordPlanner(languagesCanUse);\r\n};\r\n","export const exampleData = [\r\n {\r\n Name: 'Used Car',\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 4550,\r\n AverageCPC: 1000,\r\n CompetitionLevel: 'Low',\r\n },\r\n Suggestions: [\r\n {\r\n Keyword: 'carvana used cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: true,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 308,\r\n AverageCPC: 1000,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'carvana used cars inventory',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: true,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 50,\r\n AverageCPC: 230,\r\n CompetitionLevel: 'High',\r\n },\r\n },\r\n {\r\n Keyword: 'edmunds used cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 50,\r\n AverageCPC: 30,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'truecar used cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 40,\r\n AverageCPC: 40,\r\n CompetitionLevel: 'High',\r\n },\r\n },\r\n {\r\n Keyword: 'used cars near me',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 80,\r\n AverageCPC: 0,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'used cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 40,\r\n AverageCPC: 860,\r\n CompetitionLevel: 'High',\r\n },\r\n },\r\n {\r\n Keyword: 'autotrader used cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 80,\r\n AverageCPC: 901,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'certified used cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 60,\r\n AverageCPC: 3330,\r\n CompetitionLevel: 'High',\r\n },\r\n },\r\n {\r\n Keyword: 'cargurus used cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 990,\r\n AverageCPC: 2220,\r\n CompetitionLevel: 'High',\r\n },\r\n },\r\n {\r\n Keyword: 'cars com used cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 880,\r\n AverageCPC: 1110,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'buy used cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 770,\r\n AverageCPC: 340,\r\n CompetitionLevel: 'High',\r\n },\r\n },\r\n {\r\n Keyword: 'kelley blue book used cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 550,\r\n AverageCPC: 10,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'carmax used cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 660,\r\n AverageCPC: 20,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'carfax used cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 440,\r\n AverageCPC: 30,\r\n CompetitionLevel: 'High',\r\n },\r\n },\r\n {\r\n Keyword: 'bmw used cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 580,\r\n AverageCPC: 900,\r\n CompetitionLevel: 'Medium',\r\n },\r\n },\r\n {\r\n Keyword: 'blue book value used cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 320,\r\n AverageCPC: 102,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'evans halshaw used cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 120,\r\n AverageCPC: 320,\r\n CompetitionLevel: 'Medium',\r\n },\r\n },\r\n {\r\n Keyword: 'used cars ni',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 350,\r\n AverageCPC: 30,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'arnold clark used cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 230,\r\n AverageCPC: 40,\r\n CompetitionLevel: 'Medium',\r\n },\r\n },\r\n ],\r\n },\r\n {\r\n Name: 'Car',\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 450,\r\n AverageCPC: 330,\r\n CompetitionLevel: 'Low',\r\n },\r\n Suggestions: [\r\n {\r\n Keyword: 'new cars 2020',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: true,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 1230,\r\n AverageCPC: 130,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'honda cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: true,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 850,\r\n AverageCPC: 530,\r\n CompetitionLevel: 'Medium',\r\n },\r\n },\r\n {\r\n Keyword: 'pre owned cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 150,\r\n AverageCPC: 630,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'suv cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 9814,\r\n AverageCPC: 220,\r\n CompetitionLevel: 'Medium',\r\n },\r\n },\r\n {\r\n Keyword: 'jaguar cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 465,\r\n AverageCPC: 330,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'disney cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 123,\r\n AverageCPC: 440,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'cazoo cars uk',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 342,\r\n AverageCPC: 770,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'model cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 220,\r\n AverageCPC: 60,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'volvo cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 330,\r\n AverageCPC: 10,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'cars trucks',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 230,\r\n AverageCPC: 10,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'tesla 1 million cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 980,\r\n AverageCPC: 50,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'electric cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 608,\r\n AverageCPC: 60,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'mclaren cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 6850,\r\n AverageCPC: 90,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'cars film 2006',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 5550,\r\n AverageCPC: 100,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'lowrider cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 6660,\r\n AverageCPC: 960,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'sports cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 60,\r\n AverageCPC: 9690,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'japan gas powered cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 70,\r\n AverageCPC: 567890,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'gateway classic cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 30,\r\n AverageCPC: 3333,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'motability cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 50,\r\n AverageCPC: 456,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: '2020 new cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 1230,\r\n AverageCPC: 9999,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'luxury cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 77770,\r\n AverageCPC: 11100,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n ],\r\n },\r\n {\r\n Name: 'Used Car Sale',\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 9990,\r\n AverageCPC: 8850,\r\n CompetitionLevel: 'Low',\r\n },\r\n Suggestions: [\r\n {\r\n Keyword: 'used cars sale near me',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car Sale',\r\n Existing: true,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 88880,\r\n AverageCPC: 9620,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'used cars sale',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car Sale',\r\n Existing: true,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 808,\r\n AverageCPC: 4210,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'cheap used cars sale',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car Sale',\r\n Existing: true,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 90,\r\n AverageCPC: 6250,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'used cars sale my area',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car Sale',\r\n Existing: true,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 30,\r\n AverageCPC: 8550,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'used cars sale owner',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car Sale',\r\n Existing: true,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 502,\r\n AverageCPC: 6230,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'used cars sales',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car Sale',\r\n Existing: true,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 560,\r\n AverageCPC: 10000,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'all used cars sale',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car Sale',\r\n Existing: true,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 230,\r\n AverageCPC: 60,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n ],\r\n },\r\n {\r\n Name: 'Car Sale',\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 3890,\r\n AverageCPC: 3330,\r\n CompetitionLevel: 'Low',\r\n },\r\n Suggestions: [\r\n {\r\n Keyword: 'cars sale near me',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car Sale',\r\n Existing: true,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 40,\r\n AverageCPC: 10,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'cars sale',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car Sale',\r\n Existing: true,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 30,\r\n AverageCPC: 20,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'cars sale my area',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car Sale',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 20,\r\n AverageCPC: 30,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'new cars sale',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car Sale',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 120,\r\n AverageCPC: 40,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'cars sale owner',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car Sale',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 120,\r\n AverageCPC: 560,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n ],\r\n },\r\n];\r\n\r\nexport const searchIdeaExampleData = [{\r\n Aggregations: [{\r\n Keywords: [{\r\n Type: 'Idea',\r\n Index: 0,\r\n Keyword: {\r\n Text: 'abcdefghi',\r\n MatchType: 'Broad',\r\n },\r\n }],\r\n }],\r\n}];\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport odata from '@bingads-webui-component-legacy/http/channel/odata';\r\nimport { getKeywordPlannerSupportedLanguagesByLocationIds, getKeywordPlannerSupportedLocationIdsByLangauges } from '@bingads-webui-campaign-legacy/location-targets/util/constants';\r\nimport {\r\n CONTROL_TYPES,\r\n URL_OPTION_TYPES,\r\n KEYWORD_FILTER_WITH_RANGE_TYPES,\r\n OPERATOR_TYPES,\r\n NETWORK_TYPES,\r\n LOCATION_TARGET_LIMIT,\r\n} from '@bingads-webui-campaign-react/keyword-planner-shared';\r\nimport { isAllLocationsUnsupported } from './location-util';\r\nimport { exampleData } from '../../demo/default/example-data';\r\n\r\nconst odataLimits = {\r\n url: 2000,\r\n location: 100,\r\n keywordLength: 100,\r\n};\r\n\r\nconst uri = 'Customers(:advertisercustomer_id)/Accounts(:account_id)/Default.AdGroupSuggestions?$expand=Suggestions';\r\n\r\nconst requestData = ({\r\n url,\r\n keywords,\r\n targetedLocationInfo,\r\n languages,\r\n}) => {\r\n const req = {\r\n criteria: [],\r\n };\r\n\r\n let hasOnlyKeyword = true;\r\n\r\n if (url) {\r\n hasOnlyKeyword = false;\r\n // KeywordPlanner has a url length limit\r\n // This url is solely for keyword suggestion purpose and\r\n // not saved or used by other feature\r\n const requestUrl = url.substr(0, odataLimits.url);\r\n\r\n req.criteria.push({\r\n '@odata.type': '#Model.Suggestions.UrlSuggestionCriterion',\r\n Url: requestUrl,\r\n });\r\n }\r\n\r\n if (keywords) {\r\n const keywordsArray = _.isArray(keywords) ? keywords : [keywords];\r\n\r\n _.each(keywordsArray, (keyword) => {\r\n req.criteria.push({\r\n '@odata.type': '#Model.Suggestions.SeedKeywordSuggestionCriterion',\r\n Keyword: keyword.substr(0, odataLimits.keywordLength),\r\n });\r\n });\r\n }\r\n\r\n let languagesToUse = getKeywordPlannerSupportedLanguagesByLocationIds(_.pluck(targetedLocationInfo.countryLocationInfo, 'countryLocationId'), !hasOnlyKeyword);\r\n // add parameter when keyword planner support more than one language in multi-language pilot\r\n\r\n if (!_.isEmpty(languages)) {\r\n // keyword only mode only support one langue for now, will update this after they fix the bug\r\n if (hasOnlyKeyword && languagesToUse.length > 1) {\r\n languagesToUse = [_.first(languagesToUse)];\r\n } else if (!hasOnlyKeyword && languagesToUse.length > 3) {\r\n // url only support 3 for now, will udpate this after they fix the bug\r\n languagesToUse = _.first(languagesToUse, 3);\r\n }\r\n _.each(languagesToUse, (language) => {\r\n if (language) {\r\n req.criteria.push({\r\n '@odata.type': '#Model.Suggestions.LanguageSuggestionCriterion',\r\n Language: language,\r\n });\r\n }\r\n });\r\n }\r\n\r\n if (_.isArray(targetedLocationInfo.locations)) {\r\n // KeywordPlanner OData has a location count limit\r\n const languageSupportedLoations = _.isEmpty(languagesToUse) ?\r\n targetedLocationInfo.locations :\r\n getKeywordPlannerSupportedLocationIdsByLangauges(languagesToUse, !hasOnlyKeyword);\r\n\r\n const locationIdsSupportedByLanguage = _.compact(_.map(targetedLocationInfo.countryLocationInfo, (item) => {\r\n if (_.contains(languageSupportedLoations, item.countryLocationId)) {\r\n return item.locationId;\r\n }\r\n return 0;\r\n }));\r\n\r\n const requestLocations = _.first(\r\n locationIdsSupportedByLanguage,\r\n odataLimits.location\r\n );\r\n\r\n _.each(requestLocations, (locationId) => {\r\n if (locationId) {\r\n req.criteria.push({\r\n '@odata.type': '#Model.Suggestions.LocationSuggestionCriterion',\r\n LocationId: locationId,\r\n });\r\n }\r\n });\r\n }\r\n\r\n return req;\r\n};\r\n\r\nexport const useKeywordSuggestion = () => ({\r\n keywords,\r\n url,\r\n targetedLocationInfo,\r\n languages,\r\n scenario = 'campaign creation',\r\n}) => {\r\n if (window.e2eTestEnvironment) {\r\n return Promise.resolve({ value: exampleData });\r\n }\r\n\r\n if (isAllLocationsUnsupported(targetedLocationInfo)) {\r\n return Promise.resolve(null);\r\n }\r\n\r\n if (!keywords && !url) {\r\n return Promise.resolve(null);\r\n }\r\n\r\n const requestDataObj = requestData({\r\n keywords, url, targetedLocationInfo, languages,\r\n });\r\n\r\n if (_.isEmpty(requestDataObj.criteria)) {\r\n return Promise.resolve(null);\r\n }\r\n\r\n return odata.post(uri, {\r\n path: 'AdInsight/V2/',\r\n data: requestDataObj,\r\n customHeader: {\r\n name: 'scenario',\r\n value: scenario,\r\n },\r\n }, (dummy, response, textStatus, xhr) => {\r\n const currentSourceReqId = (xhr && xhr.getResponseHeader('x-ms-requestid')) || '';\r\n if (response && response.value) {\r\n _.each(response.value, (suggestions) => {\r\n if (suggestions && suggestions.Suggestions) {\r\n _.each(suggestions.Suggestions, (suggestion) => {\r\n // eslint-disable-next-line no-param-reassign\r\n suggestion.RequestId = currentSourceReqId;\r\n });\r\n }\r\n });\r\n }\r\n });\r\n};\r\n\r\nexport const getSearchIdeaModel = ({\r\n keywords = '',\r\n url = '',\r\n targetedLocationInfo,\r\n languages,\r\n}) => ({\r\n isIdeas: true,\r\n [CONTROL_TYPES.SEARCH_IDEA_PRODUCTS]: {\r\n isValid: true,\r\n rawKeywords: '',\r\n parsedKeywords: [keywords],\r\n },\r\n [CONTROL_TYPES.LANDING_PAGE]: {\r\n url,\r\n isValid: true,\r\n option: URL_OPTION_TYPES.PAGE,\r\n },\r\n [CONTROL_TYPES.LANGUAGE]: _.first(languages),\r\n [CONTROL_TYPES.LOCATION_LD]: _.first(targetedLocationInfo, LOCATION_TARGET_LIMIT),\r\n [CONTROL_TYPES.NETWORK]: NETWORK_TYPES.ALL,\r\n [CONTROL_TYPES.KEYWORD_FILTERS_GROUP]: {\r\n ..._.object(_.map(KEYWORD_FILTER_WITH_RANGE_TYPES, rangeKeywordFilterType =>\r\n [rangeKeywordFilterType, { operator: OPERATOR_TYPES.START, value: null, isValid: true }])),\r\n [CONTROL_TYPES.COMPETITION]: [],\r\n },\r\n [CONTROL_TYPES.INCLUDED_KEYWORD]: {\r\n rawKeywords: '',\r\n parsedKeywords: [],\r\n },\r\n [CONTROL_TYPES.NEGATIVE_KEYWORD]: {\r\n rawKeywords: '',\r\n parsedKeywords: [],\r\n },\r\n [CONTROL_TYPES.ACCOUNT_KEYWORD_DEDUPE]: true,\r\n [CONTROL_TYPES.CATEGORY]: {\r\n categoryId: '',\r\n isValid: true,\r\n },\r\n [CONTROL_TYPES.DATE_RANGE]: {},\r\n});\r\n","import * as locationFilters from '@bingads-webui-campaign-legacy/location-targets/util/filters';\r\nimport _ from 'underscore';\r\nimport {\r\n KPLocations,\r\n LOCATION_COUNTRYCODE_WHITE_LIST,\r\n LOCATION_TYPE,\r\n} from '@bingads-webui-campaign-react/keyword-planner-shared';\r\nimport * as LocationTargetTypes from '@bingads-webui-campaign-legacy/location-targets/util/locationTargetTypes';\r\n// import jsdata from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport { isAllLocationsUnsupported, onlyTire2LangaugesSelected } from './location-util';\r\n\r\n// jsdata.Intermediate.getAll('CampaignCriterion')\r\nexport const getTargetedLocationInfo = (criterions, permissions) => {\r\n if (permissions && permissions.dynamic && permissions.dynamic.KeywordPlannerLiteRefactorPhase1) {\r\n if (_.isEmpty(criterions)) {\r\n return _.map(KPLocations, location => ({ id: location.id }));\r\n }\r\n\r\n const includedCriterions = _.where(criterions, {\r\n Status: 'Active',\r\n SelectionStatus: LocationTargetTypes.Included,\r\n });\r\n\r\n const locations = _.map(includedCriterions, (criterion) => {\r\n const target = criterion.Criterion.LocationCriterion || criterion.Criterion.RadiusCriterion || {};\r\n return { id: target.LocationId, countryCode: target.CountryCode, locationType: target.LocationType };\r\n });\r\n\r\n return _.filter(locations, location => !_.isUndefined(location.id) && (_.contains(LOCATION_COUNTRYCODE_WHITE_LIST, location.countryCode)\r\n || (location.locationType === LOCATION_TYPE.COUNTRY && _.contains(_.map(KPLocations, country => country.id), location.id))));\r\n }\r\n\r\n const locationsObj = locationFilters.getSupportedLocationIds(criterions, true);\r\n\r\n return {\r\n locations: locationsObj.items,\r\n numLocationsTargeted: locationsObj.totalCount,\r\n countryLocationInfo: locationsObj.countryLocationInfo,\r\n };\r\n};\r\n\r\nexport const useSearchBoxStatus = (targetedLocationInfo, languages, permissions) => {\r\n const status = {\r\n url: true,\r\n keywords: true,\r\n };\r\n\r\n if (permissions && permissions.dynamic && permissions.dynamic.KeywordPlannerLiteRefactorPhase1) {\r\n return status;\r\n }\r\n\r\n const allLocationsUnsupported = isAllLocationsUnsupported(targetedLocationInfo);\r\n if (allLocationsUnsupported) {\r\n status.url = false;\r\n status.keywords = false;\r\n } else if (onlyTire2LangaugesSelected(targetedLocationInfo.locations, languages, true)) {\r\n status.keywords = false;\r\n }\r\n\r\n return status;\r\n};\r\n\r\n","import _ from 'underscore';\r\nimport { keywordPlannerSupportedLanguages } from '@bingads-webui-campaign-legacy/location-targets/util/constants';\r\nimport {\r\n languageOptions,\r\n} from '@bingads-webui-campaign-react/keyword-planner-shared';\r\n\r\nconst languagesAllNumber = 1000;\r\n\r\nconst keywordPlannerSupportedLanguagesIdValueMap = _.invert(keywordPlannerSupportedLanguages);\r\nconst supportedLanguages = _.keys(keywordPlannerSupportedLanguages);\r\n\r\nexport const getSupportedLanguages = (languages, permissions) => {\r\n if (permissions && permissions.dynamic && permissions.dynamic.KeywordPlannerLiteRefactorPhase1) {\r\n return _.contains(languages, 'All') ? _.map(languageOptions, language => language.id) : languages;\r\n }\r\n if (_.contains(languages, 'All') || _.contains(languages, languagesAllNumber)) {\r\n return supportedLanguages;\r\n }\r\n // convert numbers to string\r\n const languages2Use = _.chain(languages)\r\n .map((lang) => {\r\n if (_.isNumber(lang)) {\r\n return keywordPlannerSupportedLanguagesIdValueMap[lang]; // undefined if not supported\r\n }\r\n return lang;\r\n }).compact().value();\r\n\r\n return _.intersection(languages2Use, supportedLanguages);\r\n};\r\n","import React, { useState, useCallback, useContext, useMemo } from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport {\r\n useKeywordPlannerService,\r\n CHANNEL_TYPES,\r\n} from '@bingads-webui-campaign-react/keyword-planner-shared';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\n\r\nimport { SearchInputStack } from './search-input-stack';\r\nimport { useKeywordSuggestion, useSearchBoxStatus, getSearchIdeaModel } from './util/index';\r\n\r\nexport const SearchInputStackContainer = ({\r\n targetedLocationInfo,\r\n supportedLanguages,\r\n beforeSearch,\r\n onSearchSuccess,\r\n onSearchFinally,\r\n}) => {\r\n const activity = useContext(ActivityContext);\r\n const [url, setUrl] = useState('');\r\n const [keywords, setKeywords] = useState('');\r\n const recommendateRequest = useKeywordSuggestion();\r\n const {\r\n Permissions,\r\n DynamicPermissions,\r\n } = useContext(ServerContext);\r\n const permissions = useMemo(() => ({ dynamic: { ...DynamicPermissions }, ...Permissions }), [DynamicPermissions, Permissions]);\r\n const inputStatus = useSearchBoxStatus(targetedLocationInfo, supportedLanguages, permissions);\r\n const { getSearchIdea } = useKeywordPlannerService();\r\n const onSearch = useCallback(() => {\r\n if (!_.isEmpty(url) || !_.isEmpty(keywords)) {\r\n beforeSearch();\r\n // eslint-disable-next-line no-unused-expressions\r\n activity && activity.signal(`onSearchSidePanelKeywordsSuggestion - ${JSON.stringify({\r\n Url: url,\r\n Keywords: keywords,\r\n })}`);\r\n if (permissions && permissions.dynamic && permissions.dynamic.KeywordPlannerLiteRefactorPhase1) {\r\n getSearchIdea({\r\n model: getSearchIdeaModel({\r\n keywords,\r\n url,\r\n targetedLocationInfo,\r\n languages: supportedLanguages,\r\n }),\r\n isLanguageDecoupling: true,\r\n channel: CHANNEL_TYPES.CAMPAIGN_CREATION,\r\n })\r\n .then(data => onSearchSuccess(data))\r\n .catch((error) => {\r\n // eslint-disable-next-line no-unused-expressions\r\n activity && activity.signal(`onFetchRecommendationInSetting - has error - ${JSON.stringify({\r\n ErrorStatus: error && error.status,\r\n })}`);\r\n })\r\n .finally(onSearchFinally);\r\n } else {\r\n recommendateRequest({\r\n keywords,\r\n url,\r\n targetedLocationInfo,\r\n languages: supportedLanguages,\r\n activity,\r\n })\r\n .then(data => onSearchSuccess({ data }))\r\n .catch((error) => {\r\n // eslint-disable-next-line no-unused-expressions\r\n activity && activity.signal(`onFetchRecommendationInSetting - has error - ${JSON.stringify({\r\n ErrorStatus: error && error.status,\r\n })}`);\r\n })\r\n .finally(onSearchFinally);\r\n }\r\n }\r\n }, [\r\n beforeSearch,\r\n keywords,\r\n onSearchFinally,\r\n onSearchSuccess,\r\n recommendateRequest,\r\n supportedLanguages,\r\n targetedLocationInfo,\r\n url,\r\n activity,\r\n getSearchIdea,\r\n permissions,\r\n ]);\r\n\r\n const onUrlChange = useCallback((e, value) => {\r\n setUrl(value === undefined ? '' : value);\r\n }, []);\r\n const onKeywordsChange = useCallback((e, value) => {\r\n setKeywords(value === undefined ? '' : value);\r\n }, []);\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nSearchInputStackContainer.propTypes = {\r\n beforeSearch: PropTypes.func.isRequired,\r\n onSearchSuccess: PropTypes.func.isRequired,\r\n onSearchFinally: PropTypes.func.isRequired,\r\n targetedLocationInfo: PropTypes.shape({}).isRequired,\r\n supportedLanguages: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n};\r\n","export const getKeywordGroupsStyles = () => ({\r\n container: {\r\n marginTop: 20,\r\n },\r\n divider: {\r\n marginTop: 16,\r\n marginBottom: 8,\r\n },\r\n});\r\n","export const getKeywordGroupStyles = () => ({\r\n container: {\r\n marginTop: 4,\r\n },\r\n title: {\r\n marginTop: 4,\r\n marginBottom: 12,\r\n fontWeight: 600,\r\n },\r\n checkAllLink: {\r\n marginLeft: 8,\r\n },\r\n addAllLink: {\r\n marginTop: 16,\r\n },\r\n});\r\n","export const getViewAllPanelStyles = () => ({\r\n '@global': {\r\n '.side-panel-keyword-planner-view-all.panel-right .panel-content': {\r\n '& .panel-body': {\r\n width: 600,\r\n paddingLeft: 24,\r\n paddingRight: 24,\r\n display: 'flex',\r\n marginBottom: 65,\r\n '& .fui-FluentProvider': {\r\n width: '100%',\r\n },\r\n },\r\n '& .panel-header': {\r\n paddingLeft: 24,\r\n },\r\n },\r\n },\r\n});\r\n","export const getActionBarStyles = () => ({\r\n root: {\r\n width: '100%',\r\n bottom: 0,\r\n position: 'fixed',\r\n borderTop: '1px solid #EDEBE9',\r\n padding: 16,\r\n margin: '0 -24px',\r\n },\r\n});\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Stack } from '@fluentui/react';\r\nimport { Button } from '@fluentui/react-components';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { getActionBarStyles } from './style/action-bar-style';\r\n\r\nexport const ActionBar = ({\r\n onAdd,\r\n onCancel,\r\n}) => {\r\n const classes = useDefaultStyles(getActionBarStyles);\r\n const i18n = useContext(I18nContext);\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nActionBar.propTypes = {\r\n onAdd: PropTypes.func.isRequired,\r\n onCancel: PropTypes.func.isRequired,\r\n};\r\n","export const getPanelHeaderStyles = () => ({\r\n root: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n image: {\r\n marginRight: 8,\r\n marginBottom: 4,\r\n },\r\n});\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { HelpPopup } from '@bingads-webui-react/help-popup';\r\nimport { SparkleIcon } from '@bingads-webui-campaign-react/sparkle-icon';\r\nimport { getPanelHeaderStyles } from './style/panel-header-style';\r\n\r\nexport const PanelHeader = ({ i18n }) => {\r\n const classes = useDefaultStyles(getPanelHeaderStyles);\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n
\r\n {i18n.getString(_TL_('Explore keywords'))}\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nPanelHeader.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n};\r\n","import React, { useCallback, useState, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FluentProvider, webLightTheme } from '@fluentui/react-components';\r\nimport { Panel } from '@bingads-webui-campaign-react/panel';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\n\r\nimport { KeywordRanking } from './keyword-ranking';\r\nimport { getViewAllPanelStyles } from './style/viewall-panel-style';\r\nimport { ActionBar } from './action-bar';\r\nimport { PanelHeader } from './panel-header';\r\n\r\nexport const KeywordGroupViewAllPanel = ({\r\n allData,\r\n selectedData,\r\n isOpen,\r\n onClose,\r\n i18n,\r\n}) => {\r\n const activity = useContext(ActivityContext);\r\n const classes = useDefaultStyles(getViewAllPanelStyles);\r\n const [selection, setSelection] = useState(selectedData);\r\n const onSelectionChange = useCallback((data) => {\r\n setSelection(data);\r\n }, []);\r\n const onAdd = useCallback(() => {\r\n onClose(selection);\r\n // eslint-disable-next-line no-unused-expressions\r\n activity && activity.signal(`onAddSidePanelGroupDetailsGridKeywords - ${JSON.stringify({\r\n GridKeywords: selection,\r\n })}`);\r\n }, [onClose, selection, activity]);\r\n const onCancel = useCallback(() => {\r\n onClose();\r\n }, [onClose]);\r\n\r\n return (\r\n }\r\n className={classes}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nKeywordGroupViewAllPanel.propTypes = {\r\n isOpen: PropTypes.bool.isRequired,\r\n onClose: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n allData: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n selectedData: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n};\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React, { useCallback, useMemo, useContext, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { differenceBy } from 'lodash';\r\nimport classNames from 'classnames';\r\nimport { Stack } from '@fluentui/react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Link } from '@bingads-webui-react/fabric-with-signal';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { SuggestedItemsMultiSelect, SelectableSuggestedItem, MoreSuggestionsInlineButton } from '@bingads-webui-campaign-react/pill-item-components';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\n\r\nimport { getKeywordGroupStyles } from './style/keyword-group-style';\r\nimport { useCircularBufferViewWithSelected, MAX_INLINE_RECOMMENDATIONS_PER_PAGE } from './util/use-circular-buffer-view';\r\nimport { KeywordGroupViewAllPanel } from './keyword-group-view-all-panel';\r\n\r\nconst SelectableSuggestedItemInternal = ({\r\n item, index, onItemToggle, selectedItems,\r\n}) => {\r\n const activity = useContext(ActivityContext);\r\n const onKeywordToggle = useCallback((itemIndex, itemText) => {\r\n onItemToggle(item, itemIndex, itemText);\r\n // eslint-disable-next-line no-unused-expressions\r\n activity && activity.signal(`onAddSidePanelGroupKeyword - ${JSON.stringify({\r\n GroupKeyword: item,\r\n })}`);\r\n }, [item, onItemToggle, activity]);\r\n\r\n return (\r\n s.key === item.key)}\r\n />\r\n );\r\n};\r\n\r\nSelectableSuggestedItemInternal.propTypes = {\r\n item: PropTypes.shape({\r\n Keyword: PropTypes.string.isRequired,\r\n key: PropTypes.string.isRequired,\r\n }).isRequired,\r\n index: PropTypes.number.isRequired,\r\n onItemToggle: PropTypes.func.isRequired,\r\n selectedItems: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n};\r\n\r\nexport const KeywordGroup = ({\r\n groupName,\r\n groupItems,\r\n selectedItems,\r\n onToggle,\r\n onAddAll,\r\n onBulkChange,\r\n}) => {\r\n const activity = useContext(ActivityContext);\r\n const [isPanelOpen, setIsPanelOpen] = useState(false);\r\n const i18n = useContext(I18nContext);\r\n const classes = useDefaultStyles(getKeywordGroupStyles);\r\n const currentSelectedItems = useMemo(() => _.filter(selectedItems, s => _.some(groupItems, item => item.key === s.key)), [selectedItems, groupItems]);\r\n const sortedGroupItems = useMemo(() => _.sortBy(groupItems, g => !_.some(currentSelectedItems, item => item.key === g.key)), [groupItems, currentSelectedItems]);\r\n const unSelectedItems = useMemo(() => _.last(sortedGroupItems, sortedGroupItems.length - currentSelectedItems.length), [sortedGroupItems, currentSelectedItems]);\r\n const [availableInlineRecommendations, canMoveNext, moveNext] = useCircularBufferViewWithSelected(unSelectedItems, currentSelectedItems);\r\n const onClickRefresh = useCallback(() => {\r\n if (activity) {\r\n activity.signal(`onRefreshSidePanelGroupKeywords - ${groupName} - ${JSON.stringify({\r\n GroupKeywordsSize: groupItems.length,\r\n })}`);\r\n }\r\n moveNext();\r\n }, [moveNext, activity, groupName, groupItems.length]);\r\n const onPanelOpen = useCallback(() => {\r\n setIsPanelOpen(true);\r\n if (activity) {\r\n activity.signal(`onOpenSidePanelGroupDetailsGrid - ${groupName}`);\r\n }\r\n }, [setIsPanelOpen, activity, groupName]);\r\n const onAddAllClick = useCallback(() => {\r\n onAddAll(groupItems);\r\n // eslint-disable-next-line no-unused-expressions\r\n activity && activity.signal(`onAddAllSidePanelGroupKeywords - ${JSON.stringify({\r\n GroupKeywords: groupItems,\r\n })}`);\r\n }, [groupItems, onAddAll, activity]);\r\n const onSelectionChange = useCallback((newSelectedItems) => {\r\n if (newSelectedItems) {\r\n onBulkChange(differenceBy(currentSelectedItems, newSelectedItems, 'key'), differenceBy(newSelectedItems, currentSelectedItems, 'key'));\r\n }\r\n setIsPanelOpen(false);\r\n }, [currentSelectedItems, onBulkChange]);\r\n const onRemoveAllClick = useCallback(() => {\r\n onBulkChange(groupItems, []);\r\n if (activity) {\r\n activity.signal(`onRemoveAllSidePanelGroupKeywords - ${groupName} - ${JSON.stringify({\r\n GroupKeywords: currentSelectedItems,\r\n })}`);\r\n }\r\n }, [groupItems, onBulkChange, activity, currentSelectedItems, groupName]);\r\n\r\n const renderSelectableSuggestedItem = useCallback((item, index, onItemToggle) => (\r\n ), [selectedItems]);\r\n const renderButtons = useCallback(() => {\r\n if (groupItems.length > MAX_INLINE_RECOMMENDATIONS_PER_PAGE) {\r\n return (\r\n <>\r\n \r\n {i18n.getString(_TL_('+{{count}} keywords'), { count: groupItems.length - MAX_INLINE_RECOMMENDATIONS_PER_PAGE })}\r\n \r\n );\r\n }\r\n return null;\r\n }, [canMoveNext, classes.checkAllLink, groupItems.length, i18n, onClickRefresh, onPanelOpen]);\r\n\r\n return (\r\n
\r\n
{groupName}
\r\n \r\n \r\n \r\n {i18n.getString(_TL_('Add all'))}\r\n \r\n {\r\n currentSelectedItems.length > 0 && unSelectedItems.length > 0 && (\r\n \r\n \r\n {currentSelectedItems.length === 1 ? i18n.getString(_TL_('Remove (1 keyword)')) : i18n.getString(_TL_('Remove ({{count}} keywords)'), { count: currentSelectedItems.length })}\r\n \r\n \r\n )\r\n }\r\n {\r\n currentSelectedItems.length > 0 && unSelectedItems.length === 0 && (\r\n \r\n \r\n {currentSelectedItems.length === 1 ? i18n.getString(_TL_('Remove (1 keyword)')) : i18n.getString(_TL_('Remove all ({{count}} keywords)'), { count: currentSelectedItems.length })}\r\n \r\n \r\n )}\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nKeywordGroup.propTypes = {\r\n groupItems: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n selectedItems: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n onToggle: PropTypes.func.isRequired,\r\n groupName: PropTypes.string.isRequired,\r\n onAddAll: PropTypes.func.isRequired,\r\n onBulkChange: PropTypes.func.isRequired,\r\n};\r\n","import _ from 'underscore';\r\nimport { useCallback, useEffect, useState } from 'react';\r\n\r\nexport const MAX_INLINE_RECOMMENDATIONS_PER_PAGE = 5;\r\n\r\nexport const useCircularBufferViewWithSelected = (unselectedCollection, selectedCollection, pageSize = MAX_INLINE_RECOMMENDATIONS_PER_PAGE) => {\r\n const [page, setPage] = useState([]);\r\n const [currentIndex, setCurrentIndex] = useState(0);\r\n\r\n const selectedCount = selectedCollection.length;\r\n const unselectedCount = unselectedCollection.length;\r\n\r\n useEffect(() => {\r\n if (unselectedCount === 0 && selectedCount === 0) {\r\n setPage([]);\r\n return;\r\n }\r\n\r\n const newPage = _.first(selectedCollection, pageSize);\r\n let index = currentIndex % unselectedCount;\r\n let count = newPage.length;\r\n while (count < pageSize && count < unselectedCount + selectedCount) {\r\n newPage.push(unselectedCollection[index]);\r\n index = (index + 1) % unselectedCount;\r\n count += 1;\r\n }\r\n setPage(newPage);\r\n }, [unselectedCollection, currentIndex, pageSize, selectedCollection, unselectedCount, selectedCount]);\r\n\r\n const canMoveNext = selectedCount < pageSize && unselectedCount > (pageSize - selectedCount);\r\n\r\n const moveNext = useCallback(() => {\r\n setCurrentIndex(((currentIndex + pageSize) - selectedCount) % unselectedCount);\r\n }, [currentIndex, pageSize, selectedCount, unselectedCount]);\r\n\r\n return [page, canMoveNext, moveNext];\r\n};\r\n","import React, { useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { unionBy, differenceBy } from 'lodash';\r\nimport { Stack } from '@fluentui/react';\r\nimport { Divider } from '@fluentui/react-components';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { getKeywordGroupsStyles } from './style/keyword-groups-style';\r\nimport { KeywordGroup } from './keyword-group';\r\n\r\nexport const KeywordGroups = ({\r\n allData,\r\n selectedData,\r\n onSelectChange,\r\n}) => {\r\n const classes = useDefaultStyles(getKeywordGroupsStyles);\r\n const onToggle = useCallback((item) => {\r\n const selectedItem = selectedData.find(s => s.key === item.key);\r\n if (selectedItem) {\r\n onSelectChange(selectedData.filter(s => s.key !== item.key));\r\n } else {\r\n onSelectChange([...selectedData, item]);\r\n }\r\n }, [onSelectChange, selectedData]);\r\n const onAddAll = useCallback((groupItems) => {\r\n onSelectChange(unionBy(selectedData, groupItems, 'key'));\r\n }, [onSelectChange, selectedData]);\r\n const onBulkChange = useCallback((deselectItems, newSelectedItems) => {\r\n const selectedResult = differenceBy(selectedData, deselectItems, 'key');\r\n onSelectChange([...selectedResult, ...newSelectedItems]);\r\n }, [onSelectChange, selectedData]);\r\n\r\n return (\r\n
\r\n \r\n {allData.map((item, index) => (\r\n \r\n \r\n { index < (allData.length - 1) && }\r\n \r\n ))}\r\n \r\n
\r\n );\r\n};\r\n\r\nKeywordGroups.propTypes = {\r\n allData: PropTypes.arrayOf(PropTypes.shape({\r\n Suggestions: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n })).isRequired,\r\n selectedData: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n onSelectChange: PropTypes.func.isRequired,\r\n};\r\n","export const getKeywordPlannerStyles = () => ({\r\n dataContainer: {\r\n overflowY: 'auto',\r\n overflowX: 'hidden',\r\n height: '100%',\r\n },\r\n flexContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n height: '100%',\r\n },\r\n});\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { NoRecommendationWarning } from './no-recommendation-warning';\r\n\r\nexport const NoData = ({ data }) => {\r\n if (_.isArray(data) && _.isEmpty(data)) {\r\n return ;\r\n }\r\n\r\n return null;\r\n};\r\n\r\nNoData.propTypes = {\r\n data: PropTypes.arrayOf(PropTypes.shape({})),\r\n};\r\n\r\nNoData.defaultProps = {\r\n data: null,\r\n};\r\n","import React, { useState, useCallback, useContext, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { UiBlocker } from '@bingads-webui-react/ui-blocker';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { KeywordTab } from './tab';\r\nimport { TABLIST } from './constants/index';\r\nimport { KeywordRanking } from './keyword-ranking';\r\nimport { SearchInputStackContainer } from './search-input-stack-container';\r\nimport { KeywordGroups } from './keyword-groups';\r\nimport { getKeywordPlannerStyles } from './style/keyword-planner-style';\r\nimport { ActionBar } from './action-bar';\r\nimport { NoData } from './no-data';\r\n\r\nexport const KeywordPlanner = ({\r\n targetedLocationInfo,\r\n supportedLanguages,\r\n onClose,\r\n}) => {\r\n const activity = useContext(ActivityContext);\r\n const classes = useDefaultStyles(getKeywordPlannerStyles);\r\n const i18n = useContext(I18nContext);\r\n const [selectedTab, setSelectedTab] = useState(TABLIST.GROUP);\r\n const [blocking, setBlocking] = useState(false);\r\n // allData:\r\n // null: no input, no search result; doesn't show anything\r\n // []: empty search result, show warning message\r\n // [{...}]: search result, show keyword grouping and ranking\r\n const [allData, setAllData] = useState(null);\r\n const [selectedData, setSelectedData] = useState([]);\r\n const [refreshKey, setRefreshKey] = useState(0);\r\n const {\r\n Permissions,\r\n DynamicPermissions,\r\n } = useContext(ServerContext);\r\n const permissions = useMemo(() => ({ dynamic: { ...DynamicPermissions }, ...Permissions }), [DynamicPermissions, Permissions]);\r\n\r\n const onTabSelect = useCallback((_e, tabData) => {\r\n setSelectedTab(tabData.value);\r\n activity.signal(`onSwitchSidePanelTab - ${JSON.stringify({\r\n Tab: tabData.value,\r\n })}`);\r\n }, [activity]);\r\n const onRecommendationSuccess = useCallback(({ data, traceInfo }) => {\r\n if (data === null) { // data null means no request sent\r\n return;\r\n }\r\n\r\n let dataWithKey = [];\r\n if (permissions && permissions.dynamic && permissions.dynamic.KeywordPlannerLiteRefactorPhase1 && data && _.first(data.value)) {\r\n const keywordAggregations = _.first(data.value).Aggregations || [];\r\n dataWithKey = _.map(keywordAggregations, group => ({\r\n ...group,\r\n Suggestions: _.map(group.Keywords, (keyword) => {\r\n const keywordText = keyword.Keyword ? keyword.Keyword.Text : '';\r\n return {\r\n ...keyword,\r\n AggregateMetric: {\r\n AverageSearchVolume: _.property(['Idea', 'AvgSearchs'])(_.find(_.first(data.value).Keywords, item => item.Keyword && item.Keyword.Text === keywordText)) || 0,\r\n },\r\n Keyword: keywordText,\r\n key: group.Name + keywordText,\r\n RequestId: traceInfo && traceInfo.requestId,\r\n };\r\n }),\r\n }));\r\n } else {\r\n dataWithKey = _.map(data.value, group => ({\r\n ...group,\r\n Suggestions: _.map(group.Suggestions, keyword => ({\r\n ...keyword,\r\n key: keyword.Tag + keyword.Keyword,\r\n })),\r\n }));\r\n }\r\n activity.signal(`onFetchRecommendationInSidePanel - ${_.isEmpty(dataWithKey) ? 'no data' : 'has data'}`);\r\n setAllData(dataWithKey);\r\n setSelectedData([]);\r\n setRefreshKey(refreshKey + 1);\r\n }, [refreshKey, activity, permissions]);\r\n const unblockPanel = useCallback(() => {\r\n setBlocking(false);\r\n }, []);\r\n const blockPanel = useCallback(() => {\r\n setBlocking(true);\r\n }, []);\r\n const onSelectChange = useCallback((data) => {\r\n setSelectedData(data);\r\n }, []);\r\n const onAdd = useCallback(() => {\r\n onClose(selectedData, selectedTab, activity);\r\n }, [onClose, selectedData, selectedTab, activity]);\r\n const onCancel = useCallback(() => {\r\n onClose();\r\n }, [onClose]);\r\n\r\n const allRankingData = useMemo(() => _.flatten(_.pluck(allData, 'Suggestions')), [allData]);\r\n\r\n return (\r\n \r\n
\r\n \r\n \r\n {\r\n !_.isEmpty(allData) && (\r\n <>\r\n \r\n
\r\n {\r\n selectedTab === TABLIST.GROUP &&\r\n \r\n }\r\n {\r\n selectedTab === TABLIST.RANK &&\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\nKeywordPlanner.propTypes = {\r\n targetedLocationInfo: PropTypes.shape({}).isRequired,\r\n supportedLanguages: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n onClose: PropTypes.func.isRequired,\r\n};\r\n","export const getPanelStyles = () => ({\r\n '@global': {\r\n '.side-panel-keyword-planner.panel-right .panel-content': {\r\n '& .panel-body': {\r\n width: 600,\r\n paddingLeft: 24,\r\n paddingRight: 24,\r\n display: 'flex',\r\n height: 'calc(100% - 56px)',\r\n overflow: 'hidden',\r\n marginBottom: 65,\r\n },\r\n '& .panel-header': {\r\n paddingLeft: 24,\r\n },\r\n '& .react-block-ui-none, .react-block-ui': {\r\n display: 'flex',\r\n height: '100%',\r\n },\r\n },\r\n },\r\n flexContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n },\r\n});\r\n","import React, { useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { ThemeProvider } from 'react-jss';\r\nimport { FluentProvider, webLightTheme } from '@fluentui/react-components';\r\nimport { ComponentSettings, ThemeFluent } from '@bingads-webui-theme-2018/theme-fluent';\r\nimport { Panel } from '@bingads-webui-campaign-react/panel';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { KeywordPlanner } from './keyword-planner';\r\nimport { getPanelStyles } from './style/panel-style';\r\nimport { PanelHeader } from './panel-header';\r\n\r\nexport const KeywordPlannerPanel = ({\r\n isOpen,\r\n onClose,\r\n i18n,\r\n targetedLocationInfo,\r\n supportedLanguages,\r\n}) => {\r\n const classes = useDefaultStyles(getPanelStyles);\r\n const onCancel = useCallback(() => {\r\n onClose();\r\n }, [onClose]);\r\n\r\n return (\r\n }\r\n className={classes}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nKeywordPlannerPanel.propTypes = {\r\n isOpen: PropTypes.bool.isRequired,\r\n onClose: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n targetedLocationInfo: PropTypes.shape({}).isRequired,\r\n supportedLanguages: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n};\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useStyles = makeStyles({\r\n statusList: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n ...shorthands.gap('60px', '8px'),\r\n marginTop: '12px',\r\n flexWrap: 'wrap',\r\n alignContent: 'flex-start',\r\n },\r\n progressBar: {\r\n marginTop: '16px',\r\n },\r\n});\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport {\r\n ProgressBar,\r\n} from '@fluentui/react-components';\r\n\r\nimport { StatusPopoverItem, Status } from '@bingads-webui-campaign-react/status-popover';\r\nimport { useStyles } from '../../styles/status-section-styles';\r\n\r\nexport function StatusSection({\r\n details,\r\n i18n,\r\n}) {\r\n const classes = useStyles();\r\n\r\n const denominator = details.length;\r\n const numerator = details.filter(item => item.status === Status.Active).length;\r\n const value = Math.max(0.05, numerator / denominator);\r\n\r\n const items = details.map(item => );\r\n\r\n return (\r\n
\r\n \r\n
\r\n {items}\r\n
\r\n
\r\n );\r\n}\r\n\r\nStatusSection.propTypes = {\r\n details: PropTypes.arrayOf(PropTypes.shape({\r\n name: PropTypes.string.isRequired,\r\n status: PropTypes.oneOf(Object.values(Status)).isRequired,\r\n statusLabelMsg: PropTypes.string.isRequired,\r\n })).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n};\r\n","import { makeStyles } from '@fluentui/react-components';\r\n\r\nexport const HINT_WIDTH = 20;\r\nexport const useStyles = makeStyles({\r\n carouselParent: {\r\n position: 'relative',\r\n display: 'inline-flex',\r\n width: '100%',\r\n alignItems: 'end',\r\n },\r\n\r\n container: {\r\n height: '100%',\r\n overflowX: 'hidden',\r\n overflowY: 'hidden',\r\n display: 'inline-block',\r\n flexGrow: 1,\r\n alignSelf: 'center',\r\n },\r\n parentContainer: {\r\n position: 'relative',\r\n transitionProperty: 'left',\r\n transitionDuration: '0.5s',\r\n transitionTimingFunction: 'ease-out',\r\n display: 'flex',\r\n flexDirection: 'row',\r\n height: '100%',\r\n alignItems: 'center',\r\n },\r\n chevronButton: {\r\n alignSelf: 'center',\r\n position: 'inherit',\r\n boxShadow: '0px 4px 8px 0px #00000024',\r\n backgroundColor: '#FFFFFF',\r\n\r\n borderTopLeftRadius: '32px',\r\n borderTopRightRadius: '32px',\r\n borderBottomLeftRadius: '32px',\r\n borderBottomRightRadius: '32px',\r\n\r\n borderLeftStyle: 'solid',\r\n borderRightStyle: 'solid',\r\n borderTopStyle: 'solid',\r\n borderBottomStyle: 'solid',\r\n\r\n borderLeftWidth: '1px',\r\n borderRightWidth: '1px',\r\n borderTopWidth: '1px',\r\n borderBottomWidth: '1px',\r\n\r\n borderLeftColor: '#D1D1D1',\r\n borderRightColor: '#D1D1D1',\r\n borderTopColor: '#D1D1D1',\r\n borderBottomColor: '#D1D1D1',\r\n\r\n ':focus-visible': {\r\n borderLeftColor: '#000',\r\n borderRightColor: '#000',\r\n borderTopColor: '#000',\r\n borderBottomColor: '#000',\r\n backgroundColor: '#FFFFFF',\r\n borderLeftWidth: '2px',\r\n borderRightWidth: '2px',\r\n borderTopWidth: '2px',\r\n borderBottomWidth: '2px',\r\n height: '32px',\r\n },\r\n ':active:hover': {\r\n backgroundColor: '#FFFFFF',\r\n },\r\n ':hover': {\r\n backgroundColor: '#FFFFFF',\r\n },\r\n },\r\n chevronButtonLeft: {\r\n zIndex: 1,\r\n marginRight: '2px',\r\n left: '20px',\r\n },\r\n chevronButtonRight: {\r\n right: '20px',\r\n },\r\n hintRight: {\r\n display: 'inline-block',\r\n position: 'absolute',\r\n backgroundImage: 'linear-gradient(270deg, #FFFFFF 0%, rgba(255, 255, 255, 0.927755) 18.23%, rgba(255, 255, 255, 0.776042) 48.44%, rgba(250, 249, 255, 0.5) 78.24%, rgba(255, 255, 255, 0) 100%)',\r\n width: `${HINT_WIDTH}px`,\r\n height: '100%',\r\n right: '32px',\r\n },\r\n hintLeft: {\r\n display: 'inline-block',\r\n position: 'absolute',\r\n backgroundImage: 'linear-gradient(270deg, #FFFFFF 0%, rgba(255, 255, 255, 0.927755) 18.23%, rgba(255, 255, 255, 0.776042) 48.44%, rgba(250, 249, 255, 0.5) 78.24%, rgba(255, 255, 255, 0) 100%)',\r\n width: `${HINT_WIDTH}px`,\r\n height: '100%',\r\n left: '34px',\r\n transform: 'rotate(-180deg)',\r\n },\r\n});\r\n\r\nexport const useSimpleCarouselStyles = makeStyles({\r\n container: {\r\n overflowX: 'auto',\r\n paddingBottom: '12px',\r\n },\r\n cardContents: {\r\n display: 'flex',\r\n },\r\n});\r\n","import React, { useState, useEffect, useRef, useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { Button, mergeClasses } from '@fluentui/react-components';\r\nimport { ChevronLeft12Regular, ChevronRight12Regular } from '@fluentui/react-icons';\r\n\r\nimport { getFullyShownContentsCount } from './utils';\r\nimport { useStyles, HINT_WIDTH } from './styles';\r\n\r\nexport const Carousel = ({\r\n contents,\r\n contentWidth,\r\n i18n,\r\n}) => {\r\n const [offset, setOffset] = useState(0);\r\n const classes = useStyles();\r\n const [contentContainerWidth, setContentContainerWidth] = useState(0);\r\n const contentContainerNode = useRef(null);\r\n\r\n useEffect(() => {\r\n const handleResize = () => {\r\n if (contentContainerNode.current) {\r\n setContentContainerWidth(contentContainerNode.current.offsetWidth);\r\n }\r\n };\r\n\r\n window.addEventListener('resize', handleResize);\r\n\r\n return () => {\r\n window.removeEventListener('resize', handleResize);\r\n };\r\n }, []);\r\n\r\n const measuredRef = useCallback((node) => {\r\n if (node) {\r\n contentContainerNode.current = node;\r\n setContentContainerWidth(contentContainerNode.current.offsetWidth);\r\n }\r\n }, []);\r\n\r\n const displayedContentCount = getFullyShownContentsCount(contentContainerWidth, contentWidth);\r\n const noMoreResult = offset + displayedContentCount + 1 > contents.length;\r\n\r\n const leftIconButton = useMemo(() => (\r\n }\r\n onClick={() => setOffset(offset - 1)}\r\n onKeyDown={(event) => {\r\n if ((event.code === 'Enter' || event.code === 'Space') && offset <= 1) {\r\n document.querySelector('.paddle-right').focus();\r\n setOffset(offset - 1);\r\n event.preventDefault();\r\n }\r\n }}\r\n aria-label={i18n.getString(_TL_('click to see previous'))}\r\n />\r\n ), [i18n, offset, classes]);\r\n\r\n const rightIconButton = useMemo(() => (\r\n }\r\n className={mergeClasses('paddle-right', classes.chevronButton, classes.chevronButtonRight)}\r\n onClick={() => {\r\n const newOffset = offset + 1;\r\n if (newOffset + displayedContentCount <= contents.length) {\r\n setOffset(offset + 1);\r\n }\r\n }}\r\n onKeyDown={(event) => {\r\n if ((event.code === 'Enter' || event.code === 'Space') && offset + displayedContentCount >= contents.length - 1) {\r\n document.querySelector('.paddle-left').focus();\r\n setOffset(offset + 1);\r\n event.preventDefault();\r\n }\r\n }}\r\n aria-label={i18n.getString(_TL_('click to see next'))}\r\n />\r\n ), [displayedContentCount, i18n, contents, offset, classes]);\r\n\r\n const parentContainer = useMemo(() => {\r\n const left = offset > 0 ? ((-1 * contentWidth * offset) + HINT_WIDTH) : 0;\r\n return (\r\n \r\n {displayedContentCount > 0 &&\r\n index + offset + 1).join(), current2: offset + displayedContentCount, total: contents.length })\r\n }\r\n />\r\n }\r\n {\r\n contents.map((content, index) => (\r\n \r\n {content}\r\n \r\n ))\r\n }\r\n \r\n );\r\n }, [classes.parentContainer, contentWidth, contents, offset, i18n, displayedContentCount]);\r\n\r\n if (contents.length === 0) {\r\n return null;\r\n }\r\n\r\n const showRightIconButton = contents.length > displayedContentCount && !noMoreResult;\r\n\r\n return (\r\n
\r\n {offset > 0 && leftIconButton}\r\n 0 ? { width: contentContainerWidth } : {}}\r\n >\r\n {displayedContentCount > 0 && parentContainer}\r\n
\r\n {\r\n offset > 0 &&\r\n
\r\n }\r\n {showRightIconButton &&\r\n \r\n
\r\n {rightIconButton}\r\n \r\n }\r\n
\r\n );\r\n};\r\n\r\nCarousel.propTypes = {\r\n contents: PropTypes.arrayOf(PropTypes.node).isRequired,\r\n contentWidth: PropTypes.number.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n};\r\n","import _ from 'underscore';\r\n\r\nexport const getFullyShownContentsCount = (width, contentWidth) => {\r\n if (!_.isNumber(width) || width <= 0 || !_.isNumber(contentWidth) || contentWidth <= 0) {\r\n return 0;\r\n }\r\n return Math.floor(width / contentWidth);\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { mergeClasses } from '@fluentui/react-components';\r\n\r\nimport { useSimpleCarouselStyles } from './styles';\r\n\r\nexport const SimpleCarousel = ({\r\n contents,\r\n}) => {\r\n const classes = useSimpleCarouselStyles();\r\n\r\n return (\r\n
\r\n
\r\n {contents}\r\n
\r\n
\r\n );\r\n};\r\n\r\nSimpleCarousel.propTypes = {\r\n contents: PropTypes.arrayOf(PropTypes.node).isRequired,\r\n};\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useStyles = makeStyles({\r\n actionCardsList: {\r\n marginTop: '16px',\r\n },\r\n card: {\r\n height: '165px',\r\n width: '360px',\r\n minWidth: '360px',\r\n ...shorthands.border('1px', 'solid', '#d1d1d1'),\r\n ...shorthands.padding('12px'),\r\n ...shorthands.borderRadius('4px'),\r\n // we are using carousel component to wrap cards, so we cannot use flex to set gap\r\n marginRight: '12px',\r\n },\r\n iconArea: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n alignItems: 'center',\r\n ...shorthands.gap('4px'),\r\n },\r\n divider: {\r\n marginTop: '16px',\r\n },\r\n cardsMessage: {\r\n marginTop: '16px',\r\n },\r\n cardTitle: {\r\n ...shorthands.overflow('hidden'),\r\n textOverflow: 'ellipsis',\r\n fontWeight: 'bold',\r\n marginTop: '10px',\r\n textWrap: 'nowrap',\r\n },\r\n cardMessage: {\r\n ...shorthands.overflow('hidden'),\r\n textOverflow: 'ellipsis',\r\n display: '-webkit-box',\r\n '-webkit-line-clamp': '2',\r\n '-webkit-box-orient': 'vertical',\r\n height: '40px',\r\n },\r\n cardButton: {\r\n },\r\n nameText: {\r\n color: '#605E5C',\r\n },\r\n footer: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n alignItems: 'center',\r\n justifyContent: 'space-between',\r\n marginTop: '16px',\r\n },\r\n});\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { Body1, Body2, Button, Tooltip, Link } from '@fluentui/react-components';\r\nimport { Status, StatusIcon } from '@bingads-webui-campaign-react/status-popover';\r\n\r\nimport { useStyles } from '../../styles/action-cards-styles';\r\n\r\nexport function ActionCard({\r\n name,\r\n status,\r\n cardTitle,\r\n cardMsg,\r\n onCardButtonClicked,\r\n cardButtonText,\r\n learnMoreLink,\r\n i18n,\r\n}) {\r\n const classes = useStyles();\r\n\r\n return (\r\n
\r\n
\r\n \r\n {name}\r\n
\r\n \r\n {cardTitle}\r\n \r\n \r\n {cardMsg}\r\n \r\n \r\n { onCardButtonClicked && cardButtonText &&\r\n \r\n {cardButtonText}\r\n \r\n }\r\n {learnMoreLink &&\r\n {i18n.getString(_TL_('Learn more'))}\r\n }\r\n \r\n
\r\n );\r\n}\r\n\r\nActionCard.propTypes = {\r\n name: PropTypes.string.isRequired,\r\n status: PropTypes.oneOf(Object.values(Status)).isRequired,\r\n cardTitle: PropTypes.string.isRequired,\r\n cardMsg: PropTypes.string.isRequired,\r\n onCardButtonClicked: PropTypes.func,\r\n cardButtonText: PropTypes.string,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n learnMoreLink: PropTypes.string,\r\n};\r\n\r\nActionCard.defaultProps = {\r\n learnMoreLink: undefined,\r\n onCardButtonClicked: undefined,\r\n cardButtonText: undefined,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { Divider, Caption1 } from '@fluentui/react-components';\r\nimport { Carousel, SimpleCarousel } from '@bingads-webui-campaign-react/carousel';\r\n\r\nimport { Status } from '@bingads-webui-campaign-react/status-popover';\r\nimport { ActionCard } from './action-card';\r\nimport { useStyles } from '../../styles/action-cards-styles';\r\n\r\nexport function ActionCards({\r\n details,\r\n i18n,\r\n isSmallScreen,\r\n}) {\r\n const classes = useStyles();\r\n\r\n const contents = details.map(item => );\r\n\r\n return (\r\n
\r\n \r\n \r\n {i18n.getString(_TL_('Improve your campaign setup ({{count}})'), { count: details.length })}\r\n \r\n
\r\n {/* contentWidth is cardWidth + margin */}\r\n {isSmallScreen ? : }\r\n
\r\n
\r\n );\r\n}\r\n\r\nActionCards.propTypes = {\r\n details: PropTypes.arrayOf(PropTypes.shape({\r\n name: PropTypes.string.isRequired,\r\n status: PropTypes.oneOf(Object.values(Status)).isRequired,\r\n cardTitle: PropTypes.string,\r\n cardMsg: PropTypes.string,\r\n onCardButtonClicked: PropTypes.func,\r\n cardButtonText: PropTypes.string,\r\n })).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n isSmallScreen: PropTypes.bool,\r\n};\r\n\r\nActionCards.defaultProps = {\r\n isSmallScreen: false,\r\n};\r\n","import { makeStyles } from '@fluentui/react-components';\r\n\r\nexport const useStyles = makeStyles({\r\n campaignTitle: {\r\n color: '#242424',\r\n },\r\n campaignMsg: {\r\n color: '#323130',\r\n },\r\n});\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport {\r\n Title2,\r\n Caption1,\r\n} from '@fluentui/react-components';\r\nimport { Status } from '@bingads-webui-campaign-react/status-popover';\r\n\r\nimport { ActionCards, StatusSection } from './components/index';\r\nimport { useStyles } from './styles/diagnostic-card-styles';\r\n\r\nexport function DiagnosticCard({\r\n campaignStatusTitle,\r\n campaignStatusMsg,\r\n details,\r\n i18n,\r\n responsiveSize,\r\n}) {\r\n const detailsToFix = details.filter(item => item.status !== Status.Active && item.cardTitle && (item.onCardButtonClicked || item.learnMoreLink));\r\n const classes = useStyles();\r\n\r\n return (\r\n
\r\n {campaignStatusTitle}\r\n {campaignStatusMsg}\r\n \r\n {detailsToFix.length > 0 && }\r\n
\r\n );\r\n}\r\n\r\nDiagnosticCard.propTypes = {\r\n campaignStatusTitle: PropTypes.string.isRequired,\r\n campaignStatusMsg: PropTypes.string.isRequired,\r\n details: PropTypes.arrayOf(PropTypes.shape({\r\n name: PropTypes.string.isRequired,\r\n status: PropTypes.oneOf(Object.values(Status)).isRequired,\r\n statusLabelMsg: PropTypes.string.isRequired,\r\n cardTitle: PropTypes.string,\r\n cardMsg: PropTypes.string,\r\n onCardButtonClicked: PropTypes.func,\r\n cardButtonText: PropTypes.string,\r\n })).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n responsiveSize: PropTypes.string.isRequired,\r\n};\r\n","import ArialSVGIcon from './arial-icon.svg';\r\nimport BahnschriftSVGIcon from './bahnschrift-icon.svg';\r\nimport CalibriSVGIcon from './calibri-icon.svg';\r\nimport CenturyGothicSVGIcon from './century-gothic-icon.svg';\r\nimport ComicSansMSSVGIcon from './comic-sans-ms-icon.svg';\r\nimport ConsolasSVGIcon from './consolas-icon.svg';\r\nimport GaramondSVGIcon from './garamond-icon.svg';\r\nimport GeorgiaSVGIcon from './georgia-icon.svg';\r\nimport GillSansMTSVGIcon from './gill-sans-mt-icon.svg';\r\nimport ImpactSVGIcon from './impact-icon.svg';\r\nimport LucidaSansSVGIcon from './lucida-sans-icon.svg';\r\nimport SegoeUISVGIcon from './segoe-ui-icon.svg';\r\nimport TahomaSVGIcon from './tahoma-icon.svg';\r\nimport TimesNewRomanSVGIcon from './times-new-roman-icon.svg';\r\nimport TrebuchetMSSVGIcon from './trebuchet-ms-icon.svg';\r\nimport VerdanaSVGIcon from './verdana-icon.svg';\r\n\r\nexport const SupportedFontsSVGIcons = {\r\n Arial: ArialSVGIcon,\r\n Bahnschrift: BahnschriftSVGIcon,\r\n Calibri: CalibriSVGIcon,\r\n 'Century Gothic': CenturyGothicSVGIcon,\r\n 'Comic Sans MS': ComicSansMSSVGIcon,\r\n Consolas: ConsolasSVGIcon,\r\n Garamond: GaramondSVGIcon,\r\n Georgia: GeorgiaSVGIcon,\r\n 'Gill Sans MT': GillSansMTSVGIcon,\r\n Impact: ImpactSVGIcon,\r\n 'Lucida Sans': LucidaSansSVGIcon,\r\n 'Segoe UI': SegoeUISVGIcon,\r\n Tahoma: TahomaSVGIcon,\r\n 'Times New Roman': TimesNewRomanSVGIcon,\r\n 'Trebuchet MS': TrebuchetMSSVGIcon,\r\n Verdana: VerdanaSVGIcon,\r\n};\r\n","import { SupportedFontsSVGIcons } from '../assets';\r\n\r\nexport const fontFamilies = [\r\n { key: 'Arial', text: 'Arial', svg: SupportedFontsSVGIcons.Arial },\r\n {\r\n key: 'Bahnschrift',\r\n text: 'Bahnschrift',\r\n svg: SupportedFontsSVGIcons.Bahnschrift,\r\n },\r\n { key: 'Calibri', text: 'Calibri', svg: SupportedFontsSVGIcons.Calibri },\r\n {\r\n key: 'Century Gothic',\r\n text: 'Century Gothic',\r\n svg: SupportedFontsSVGIcons['Century Gothic'],\r\n },\r\n {\r\n key: 'Comic Sans MS',\r\n text: 'Comic Sans MS',\r\n svg: SupportedFontsSVGIcons['Comic Sans MS'],\r\n },\r\n { key: 'Consolas', text: 'Consolas', svg: SupportedFontsSVGIcons.Consolas },\r\n { key: 'Garamond', text: 'Garamond', svg: SupportedFontsSVGIcons.Garamond },\r\n { key: 'Georgia', text: 'Georgia', svg: SupportedFontsSVGIcons.Georgia },\r\n {\r\n key: 'Gill Sans MT',\r\n text: 'Gill Sans MT',\r\n svg: SupportedFontsSVGIcons['Gill Sans MT'],\r\n },\r\n { key: 'Impact', text: 'Impact', svg: SupportedFontsSVGIcons.Impact },\r\n {\r\n key: 'Lucida Sans',\r\n text: 'Lucida Sans',\r\n svg: SupportedFontsSVGIcons['Lucida Sans'],\r\n },\r\n {\r\n key: 'Segoe UI',\r\n text: 'Segoe UI',\r\n svg: SupportedFontsSVGIcons['Segoe UI'],\r\n },\r\n { key: 'Tahoma', text: 'Tahoma', svg: SupportedFontsSVGIcons.Tahoma },\r\n {\r\n key: 'Times New Roman',\r\n text: 'Times New Roman',\r\n svg: SupportedFontsSVGIcons['Times New Roman'],\r\n },\r\n {\r\n key: 'Trebuchet MS',\r\n text: 'Trebuchet MS',\r\n svg: SupportedFontsSVGIcons['Trebuchet MS'],\r\n },\r\n { key: 'Verdana', text: 'Verdana', svg: SupportedFontsSVGIcons.Verdana },\r\n];\r\n","export const fontWeights = [\r\n { key: 'Thin', text: _TL_('Thin') },\r\n { key: 'ExtraLight', text: _TL_('Extra light') },\r\n { key: 'Light', text: _TL_('Light') },\r\n { key: 'Normal', text: _TL_('Normal') },\r\n { key: 'Medium', text: _TL_('Medium') },\r\n { key: 'SemiBold', text: _TL_('Semi-bold') },\r\n { key: 'Bold', text: _TL_('Bold') },\r\n { key: 'ExtraBold', text: _TL_('Extra-bold') },\r\n { key: 'Black', text: _TL_('Black') },\r\n];\r\n","import React, { useMemo } from 'react';\r\nimport PropTypes, { func } from 'prop-types';\r\nimport {\r\n Body1Stronger,\r\n Combobox,\r\n makeStyles,\r\n mergeClasses,\r\n Option,\r\n tokens,\r\n} from '@fluentui/react-components';\r\n\r\nimport { fontFamilies } from '../constants';\r\n\r\nconst useFontsSelectorStyles = makeStyles({\r\n fontSelectWrapper: {\r\n position: 'relative',\r\n marginTop: tokens.spacingVerticalS,\r\n },\r\n fontSelect: {\r\n minWidth: '280px',\r\n width: '100%',\r\n '& > input::selection': {\r\n backgroundColor: 'transparent',\r\n },\r\n },\r\n fontSelectValue: {\r\n position: 'absolute',\r\n top: '50%',\r\n left: '12px',\r\n width: 'auto',\r\n height: '20px',\r\n zIndex: 1,\r\n transform: 'translateY(-50%)',\r\n pointerEvents: 'none',\r\n },\r\n fontSelectInputVisible: {\r\n '& > input': {\r\n color: 'inherit',\r\n },\r\n },\r\n fontSelectInputTransparent: {\r\n '& > input': {\r\n fontSize: '0',\r\n color: 'transparent',\r\n },\r\n },\r\n});\r\n\r\nexport const FontsFamilySelector = ({\r\n id,\r\n i18n,\r\n label,\r\n value,\r\n onChange,\r\n className,\r\n inlinePopup,\r\n placeholder,\r\n selectClassName,\r\n overrideFontFamilies,\r\n}) => {\r\n const classes = useFontsSelectorStyles();\r\n const fontSelectId = `${label}-font-select`;\r\n\r\n const fontFamilyOptions = overrideFontFamilies || fontFamilies;\r\n\r\n const selectedFontSvg = useMemo(() => {\r\n const selectedFont =\r\n fontFamilyOptions.find(family => family.key === value) || null;\r\n return selectedFont ? selectedFont.svg : null;\r\n }, [value, fontFamilyOptions]);\r\n\r\n const handleFontChange = (_ev, data) => {\r\n if (data && data.optionValue) {\r\n onChange(data.optionValue);\r\n }\r\n };\r\n\r\n return (\r\n
\r\n {label && {label}}\r\n
\r\n {selectedFontSvg ? (\r\n \r\n ) : null}\r\n \r\n {fontFamilyOptions.map(family => (\r\n \r\n {family.text}\r\n \r\n ))}\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nFontsFamilySelector.propTypes = {\r\n i18n: PropTypes.shape({ getString: func }).isRequired,\r\n id: PropTypes.string.isRequired,\r\n label: PropTypes.string,\r\n className: PropTypes.string,\r\n value: PropTypes.string.isRequired,\r\n selectClassName: PropTypes.string,\r\n onChange: PropTypes.func.isRequired,\r\n overrideFontFamilies: PropTypes.arrayOf({\r\n key: PropTypes.string.isRequired,\r\n text: PropTypes.string.isRequired,\r\n svg: PropTypes.string.isRequired,\r\n }),\r\n inlinePopup: PropTypes.bool,\r\n placeholder: PropTypes.string,\r\n};\r\n\r\nFontsFamilySelector.defaultProps = {\r\n label: '',\r\n className: '',\r\n selectClassName: '',\r\n overrideFontFamilies: null,\r\n inlinePopup: false,\r\n placeholder: null,\r\n};\r\n","import React, { useMemo } from 'react';\r\nimport PropTypes, { func } from 'prop-types';\r\nimport {\r\n Body1Stronger,\r\n Combobox,\r\n makeStyles,\r\n mergeClasses,\r\n Option,\r\n tokens,\r\n} from '@fluentui/react-components';\r\n\r\nimport { fontWeights } from '../constants';\r\n\r\nconst useFontsSelectorStyles = makeStyles({\r\n fontWeightSelectWrapper: {\r\n position: 'relative',\r\n },\r\n fontWeightSelect: {\r\n minWidth: '160px',\r\n width: '100%',\r\n marginTop: tokens.spacingVerticalS,\r\n '& > input::selection': {\r\n backgroundColor: 'transparent',\r\n },\r\n },\r\n});\r\n\r\nexport const FontsWeightSelector = ({\r\n id,\r\n i18n,\r\n label,\r\n value,\r\n onChange,\r\n className,\r\n inlinePopup,\r\n placeholder,\r\n selectClassName,\r\n overrideFontWeights,\r\n}) => {\r\n const classes = useFontsSelectorStyles();\r\n const fontWeightSelectId = `${label}-font-weight-select`;\r\n\r\n const fontWeightOptions = overrideFontWeights || fontWeights;\r\n\r\n const selectedFontWeightText = useMemo(() => {\r\n const selectedFontWeight =\r\n fontWeightOptions.find(weight => weight.key === value) || null;\r\n return selectedFontWeight ? selectedFontWeight.text : '';\r\n }, [value, fontWeightOptions]);\r\n\r\n const handleWeightChange = (_ev, data) => {\r\n if (data && data.optionValue) {\r\n onChange(data.optionValue);\r\n }\r\n };\r\n\r\n return (\r\n
\r\n {label && {label}}\r\n
\r\n \r\n {fontWeightOptions.map(weight => (\r\n \r\n {i18n.getString(weight.text)}\r\n \r\n ))}\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nFontsWeightSelector.propTypes = {\r\n i18n: PropTypes.shape({ getString: func }).isRequired,\r\n id: PropTypes.string.isRequired,\r\n label: PropTypes.string,\r\n value: PropTypes.string.isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n overrideFontWeights: PropTypes.arrayOf({\r\n key: PropTypes.string.isRequired,\r\n text: PropTypes.string.isRequired,\r\n }),\r\n className: PropTypes.string,\r\n selectClassName: PropTypes.string,\r\n inlinePopup: PropTypes.bool,\r\n placeholder: PropTypes.string,\r\n};\r\n\r\nFontsWeightSelector.defaultProps = {\r\n label: '',\r\n className: '',\r\n placeholder: null,\r\n selectClassName: '',\r\n inlinePopup: false,\r\n overrideFontWeights: null,\r\n};\r\n","export const PAGE_TYPES = {\r\n ENTRY_PAGE: 'EntryPage',\r\n SEARCH_PAGE: 'SearchIdeaPage',\r\n ESTIMATE_PAGE: 'TrafficEstimatePage',\r\n};\r\n\r\nexport const PAGE_URL_HASH = {\r\n [PAGE_TYPES.ENTRY_PAGE]: '#start',\r\n [PAGE_TYPES.SEARCH_PAGE]: '#search',\r\n [PAGE_TYPES.ESTIMATE_PAGE]: '#estimate',\r\n};\r\n\r\n/*\r\n controlId for input, picker, etc.\r\n GROUP: group of inputs in one control (picker)\r\n e.g. KEYWORD_FILTERS_GROUP contains AVERAGE_MONTHLY_SEARCH, SUGGESTED_BID, ...\r\n*/\r\nexport const CONTROL_TYPES = {\r\n SEARCH_IDEA_PRODUCTS: 'SearchIdeaProducts',\r\n SEARCH_VOLUME_PRODUCTS: 'SearchVolumeProducts',\r\n SEARCH_VOLUME_UPLOAD_PRODUCTS: 'SearchVolumeUploadProducts',\r\n TRAFFIC_ESTIMATE_KEYWORDS: 'TrafficEstimateKeywords',\r\n TRAFFIC_ESTIMATE_UPLOAD_KEYWORDS: 'TrafficEstimateUploadKeywords',\r\n TRAFFIC_ESTIMATE_ADGROUP_KEYWORDS: 'TrafficEstimateAdgroupKeywords',\r\n TRAFFIC_ESTIMATE_BID: 'TrafficEstimateBid',\r\n TRAFFIC_ESTIMATE_BUDGET: 'TrafficEstimateBudget',\r\n LANDING_PAGE: 'LandingPage',\r\n CATEGORY: 'Category',\r\n DATE_RANGE: 'DateRange',\r\n NETWORK: 'Network',\r\n LANGUAGE: 'Language',\r\n LOCATION: 'Location',\r\n LOCATION_LD: 'LocationLanguageDecoupling',\r\n LOCATION_LEVEL: 'LocationLevel',\r\n SEARCH_VOLUME_CHART_TYPE: 'SearchVolumeChartType',\r\n KEYWORD_FILTERS_GROUP: 'KeywordFilters',\r\n AVERAGE_MONTHLY_SEARCH: 'AverageSearchVolume',\r\n SUGGESTED_BID: 'SuggestedBid',\r\n AD_IMPRESSION_SHARE: 'AdImpressionShare',\r\n COMPETITION: 'Competition',\r\n ACCOUNT_KEYWORD_DEDUPE: 'EnableAccountKeywordDedupe',\r\n INCLUDED_KEYWORD: 'IncludedKeyword',\r\n NEGATIVE_KEYWORD: 'NegativeKeyword',\r\n};\r\n\r\nexport const MONITORED_CONTROL_TYPES = [\r\n CONTROL_TYPES.DATE_RANGE,\r\n CONTROL_TYPES.NETWORK,\r\n CONTROL_TYPES.LANGUAGE,\r\n CONTROL_TYPES.LOCATION,\r\n CONTROL_TYPES.LOCATION_LD,\r\n CONTROL_TYPES.KEYWORD_FILTERS_GROUP,\r\n CONTROL_TYPES.ACCOUNT_KEYWORD_DEDUPE,\r\n CONTROL_TYPES.INCLUDED_KEYWORD,\r\n CONTROL_TYPES.NEGATIVE_KEYWORD,\r\n CONTROL_TYPES.TRAFFIC_ESTIMATE_ADGROUP_KEYWORDS,\r\n];\r\n\r\nexport const IDEA_DATE_RANGE_DATA_TYPE = {\r\n SEARCH_VOLUME: 'SearchVolumeData',\r\n};\r\n\r\nexport const URL_OPTION_TYPES = {\r\n DOMAIN: 'Domain',\r\n PAGE: 'PageContent',\r\n};\r\n\r\nexport const LANGUAGE_TYPES = {\r\n ENGLISH: 'English',\r\n FRENCH: 'French',\r\n GERMAN: 'German',\r\n SPANISH: 'Spanish',\r\n TRADITIONAL_CHINESE: 'Chinese',\r\n DUTCH: 'Dutch',\r\n DANISH: 'Danish',\r\n SWEDISH: 'Swedish',\r\n NORWEGIAN: 'Norwegian',\r\n FINNISH: 'Finnish',\r\n ITALIAN: 'Italian',\r\n PORTUGUESE: 'Portuguese',\r\n POLISH: 'Polish',\r\n GREEK: 'Greek',\r\n CZECH: 'Czech',\r\n ROMANIAN: 'Romanian',\r\n HUNGARIAN: 'Hungarian',\r\n SLOVAK: 'Slovak',\r\n MALTESE: 'Maltese',\r\n BULGARIAN: 'Bulgarian',\r\n CROATIAN: 'Croatian',\r\n LITHUANIAN: 'Lithuanian',\r\n SLOVENIAN: 'Slovenian',\r\n ESTONIAN: 'Estonian',\r\n LATVIAN: 'Latvian',\r\n ALBANIAN: 'Albanian',\r\n BOSNIAN: 'Bosnian',\r\n ICELANDIC: 'Icelandic',\r\n MACEDONIAN: 'Macedonian',\r\n SERBIAN: 'Serbian',\r\n TURKISH: 'Turkish',\r\n JAPANESE: 'Japanese',\r\n ARABIC: 'Arabic',\r\n HEBREW: 'Hebrew',\r\n RUSSIAN: 'Russian',\r\n SIMPLIFIED_CHINESE: 'SimplifiedChinese',\r\n TAGALOG: 'Tagalog',\r\n VIETNAMESE: 'Vietnamese',\r\n THAI: 'Thai',\r\n MALAY: 'Malay',\r\n INDONESIAN: 'Indonesian',\r\n HINDI: 'Hindi',\r\n};\r\n\r\nexport const NETWORK_TYPES = {\r\n ALL: 'All', // OWNED_AND_OPERATED + SYNDICATION\r\n OWNED_AND_OPERATED: 'OwnedAndOperated',\r\n SYNDICATION: 'Syndication',\r\n};\r\n\r\nexport const OPERATOR_TYPES = {\r\n START: 'Start',\r\n END: 'End',\r\n};\r\n\r\nexport const KEYWORD_FILTER_TEXT = {\r\n [CONTROL_TYPES.AVERAGE_MONTHLY_SEARCH]: _TL_('Average monthly searches'),\r\n [CONTROL_TYPES.SUGGESTED_BID]: _TL_('Suggested bid'),\r\n [CONTROL_TYPES.AD_IMPRESSION_SHARE]: _TL_('Ad impression share'),\r\n [CONTROL_TYPES.COMPETITION]: _TL_('Competition'),\r\n};\r\n\r\nexport const KEYWORD_FILTER_WITH_RANGE_TYPES = [\r\n CONTROL_TYPES.AVERAGE_MONTHLY_SEARCH,\r\n CONTROL_TYPES.SUGGESTED_BID,\r\n CONTROL_TYPES.AD_IMPRESSION_SHARE,\r\n];\r\n\r\nexport const COMPETITION_LEVEL_TYPES = {\r\n HIGH: 'High',\r\n MEDIUM: 'Medium',\r\n LOW: 'Low',\r\n};\r\n\r\nexport const GRID_TYPES = {\r\n ADGROUP_IDEA: 'AdgroupIdeaGrid',\r\n SEARCH_TERM: 'SearchTermGrid',\r\n KEYWORD_IDEA_OUTER: 'KeywordIdeaOuterGrid',\r\n KEYWORD_IDEA_INNER: 'KeywordIdeaInnerGrid',\r\n ADGROUP_ESTIMATE: 'AdgroupEstimateGrid',\r\n KEYWORD_ESTIMATE_OUTER: 'KeywordEstimateOuterGrid',\r\n KEYWORD_ESTIMATE_INNER: 'KeywordEstimateInnerGrid',\r\n DEVICE_ESTIMATE: 'DeviceEstimateGrid',\r\n LOCATION_ESTIMATE: 'LocationEstimateGrid',\r\n};\r\n\r\nexport const GRID_LEVELS = {\r\n ADGROUP: 'Adgroup',\r\n KEYWORD: 'Keyword',\r\n INNER_KEYWORD: 'InnerKeyword',\r\n ADGROUP_ESTIMATE: 'AdGroupTrafficEstimate',\r\n KEYWORD_ESTIMATE: 'KeywordTrafficEstimate',\r\n INNER_KEYWORD_ESTIMATE: 'InnerKeywordEstimate',\r\n DEVICE_ESTIMATE: 'DeviceTrafficEstimate',\r\n LOCATION_ESTIMATE: 'LocationTrafficEstimate',\r\n};\r\n\r\nexport const GRID_LEVEL_TYPE_MAPPING = {\r\n [GRID_LEVELS.ADGROUP]: GRID_TYPES.ADGROUP_IDEA,\r\n [GRID_LEVELS.ADGROUP_ESTIMATE]: GRID_TYPES.ADGROUP_ESTIMATE,\r\n [GRID_LEVELS.KEYWORD_ESTIMATE]: GRID_TYPES.KEYWORD_ESTIMATE_OUTER,\r\n [GRID_LEVELS.DEVICE_ESTIMATE]: GRID_TYPES.DEVICE_ESTIMATE,\r\n [GRID_LEVELS.LOCATION_ESTIMATE]: GRID_TYPES.LOCATION_ESTIMATE,\r\n};\r\n\r\nexport const INNER_GRID_LEVEL_TYPE_MAPPING = {\r\n [GRID_LEVELS.ADGROUP]: GRID_TYPES.KEYWORD_IDEA_INNER,\r\n [GRID_LEVELS.ADGROUP_ESTIMATE]: GRID_TYPES.KEYWORD_ESTIMATE_INNER,\r\n};\r\n\r\nexport const ADGROUP_ESTIMATE_COLUMNS = {\r\n AVERAGE_CPC: 'AdGroupEstimatedTraffic/AverageCPC',\r\n AVERAGE_POSITION: 'AdGroupEstimatedTraffic/AveragePosition',\r\n CLICK: 'AdGroupEstimatedTraffic/Clicks',\r\n COST: 'AdGroupEstimatedTraffic/TotalCost',\r\n CTR: 'AdGroupEstimatedTraffic/CTR',\r\n IMPRESSION: 'AdGroupEstimatedTraffic/Impressions',\r\n};\r\n\r\nexport const KEYWORD_ESTIMATE_COLUMNS = {\r\n AVERAGE_CPC: 'KeywordEstimatedTraffic/AverageCPC',\r\n AVERAGE_POSITION: 'KeywordEstimatedTraffic/AveragePosition',\r\n CLICK: 'KeywordEstimatedTraffic/Clicks',\r\n COST: 'KeywordEstimatedTraffic/TotalCost',\r\n CTR: 'KeywordEstimatedTraffic/CTR',\r\n IMPRESSION: 'KeywordEstimatedTraffic/Impressions',\r\n};\r\n\r\nexport const DEVICE_ESTIMATE_COLUMNS = {\r\n AVERAGE_CPC: 'Traffic/AverageCPC',\r\n AVERAGE_POSITION: 'Traffic/AveragePosition',\r\n CLICK: 'Traffic/Clicks',\r\n COST: 'Traffic/TotalCost',\r\n CTR: 'Traffic/CTR',\r\n IMPRESSION: 'Traffic/Impressions',\r\n};\r\n\r\nexport const LOCATION_ESTIMATE_COLUMNS = {\r\n AVERAGE_CPC: 'Traffic/AverageCPC',\r\n AVERAGE_POSITION: 'Traffic/AveragePosition',\r\n CLICK: 'Traffic/Clicks',\r\n COST: 'Traffic/TotalCost',\r\n CTR: 'Traffic/CTR',\r\n IMPRESSION: 'Traffic/Impressions',\r\n};\r\n\r\nexport const GRID_COLUMN_MAPPING = {\r\n [GRID_TYPES.ADGROUP_ESTIMATE]: ADGROUP_ESTIMATE_COLUMNS,\r\n [GRID_TYPES.KEYWORD_ESTIMATE_OUTER]: KEYWORD_ESTIMATE_COLUMNS,\r\n [GRID_TYPES.KEYWORD_ESTIMATE_INNER]: KEYWORD_ESTIMATE_COLUMNS,\r\n [GRID_TYPES.DEVICE_ESTIMATE]: DEVICE_ESTIMATE_COLUMNS,\r\n [GRID_TYPES.LOCATION_ESTIMATE]: LOCATION_ESTIMATE_COLUMNS,\r\n};\r\n\r\n// MT consts start\r\nexport const IDEA_ATTRIBUTE_TYPES = {\r\n UNKNOWN: 'Unknown',\r\n KEYWORD: 'Keyword',\r\n KEYWORDS: 'Keywords',\r\n GROUP_INFO: 'GroupInfo',\r\n LANDING_PAGE: 'LandingPage',\r\n CATEGORY: 'Category',\r\n SOURCE: 'Source',\r\n DUPLICATE_SOURCE: 'DuplicateSource',\r\n RELEVANCE: 'Relevance',\r\n AVERAGE_SEARCH_VOLUME: 'AverageSearchVolume',\r\n SEARCH_VOLUME_TREND: 'SearchVolumeTrend',\r\n SUGGESTED_BID: 'SuggestedBid',\r\n COMPETITION: 'Competition',\r\n DEVICE: 'Device',\r\n LOCATION: 'Location',\r\n AD_IMPRESSION_SHARE: 'AdImpressionShare',\r\n MARKET_LEADER_AD_IMPRESSION_SHARE: 'MarketLeaderAdImpressionShare',\r\n COMPETITOR_AD_IMPRESSION_SHARE: 'CompetitorAdImpressionShare',\r\n};\r\n\r\nexport const LANDSCAPE_TYPES = {\r\n BID: 'Bid',\r\n SCALE: 'Scale',\r\n};\r\n// MT consts end\r\n\r\nexport const SECTION_TYPES = {\r\n SEARCH_IDEA: 'searchIdea',\r\n SEARCH_IDEA_NEW: 'searchIdeaNew',\r\n SEARCH_IDEA_LD: 'searchIdeaLD',\r\n SEARCH_VOLUME: 'searchVolume',\r\n SEARCH_VOLUME_LD: 'searchVolumeLD',\r\n TRAFFIC_ESTIMATE: 'trafficEstimate',\r\n};\r\n\r\nexport const SECTION_TEXT = {\r\n [SECTION_TYPES.SEARCH_IDEA]: _TL_('Search for new keywords using a phrase or website'),\r\n [SECTION_TYPES.SEARCH_IDEA_LD]: _TL_('Search for new keywords using a phrase or website'),\r\n [SECTION_TYPES.SEARCH_VOLUME]: _TL_('Get search volume data and trends'),\r\n [SECTION_TYPES.SEARCH_VOLUME_LD]: _TL_('Get search volume data and trends'),\r\n [SECTION_TYPES.TRAFFIC_ESTIMATE]: _TL_('Get performance and cost estimates'),\r\n};\r\n\r\nexport const SECTION_INPUT_ERROR_TEXT = {\r\n [SECTION_TYPES.SEARCH_IDEA]: _TL_('You must enter at least one keyword or website.'),\r\n [SECTION_TYPES.SEARCH_IDEA_LD]: _TL_('You must enter at least one keyword or website.'),\r\n [SECTION_TYPES.SEARCH_VOLUME]: _TL_('You must enter at least one keyword.'),\r\n [SECTION_TYPES.SEARCH_VOLUME_LD]: _TL_('You must enter at least one keyword.'),\r\n [SECTION_TYPES.TRAFFIC_ESTIMATE]: _TL_('You must enter at least one keyword.'),\r\n};\r\n\r\nexport const SECTION_EXTRA_INPUT_ERROR_TEXT = {\r\n [SECTION_TYPES.SEARCH_VOLUME]: _TL_('Please choose only one option.'),\r\n [SECTION_TYPES.SEARCH_VOLUME_LD]: _TL_('Please choose only one option.'),\r\n [SECTION_TYPES.TRAFFIC_ESTIMATE]: _TL_('Please choose only one option.'),\r\n};\r\n\r\nexport const SECTION_BUTTON_TEXT = {\r\n [SECTION_TYPES.SEARCH_IDEA]: _TL_('Get suggestions'),\r\n [SECTION_TYPES.SEARCH_IDEA_LD]: _TL_('Get suggestions'),\r\n [SECTION_TYPES.SEARCH_VOLUME]: _TL_('Get search volume'),\r\n [SECTION_TYPES.SEARCH_VOLUME_LD]: _TL_('Get search volume'),\r\n [SECTION_TYPES.TRAFFIC_ESTIMATE]: _TL_('Get estimates'),\r\n};\r\n\r\nexport const GROUP_POSITION = {\r\n FIRST: 'first',\r\n SECOND: 'second',\r\n};\r\n\r\nexport const GROUP_PANEL_TITLE = {\r\n [GROUP_POSITION.FIRST]: _TL_('Find new keywords'),\r\n [GROUP_POSITION.SECOND]: _TL_('Plan your budget and get insights for keywords'),\r\n};\r\n\r\nexport const GROUP_PANEL_TITLE_BETA = {\r\n [GROUP_POSITION.FIRST]: _TL_('Keyword Planner'),\r\n};\r\n\r\nexport const PLACE_HOLDER_TEXT = {\r\n PRODUCT_SERVICE: _TL_('Enter products or services, separated by commas (for example, Seattle, Seattle bakery, bakery).'),\r\n KEYWORD: _TL_('Enter keywords, separated by commas (for example, Seattle, Seattle bakery, bakery).'),\r\n URL: _TL_('www.example.com'),\r\n CATEGORY: _TL_('Enter or select a product category'),\r\n};\r\n\r\nexport const PLACE_HOLDER_KEYWORD_EXAMPLE = _TL_('Red roses');\r\n\r\nexport const PLACE_HOLDER_KEYWORD_MATCH_TYPES = {\r\n BROAD_MATCH: _TL_('For broad match: '),\r\n PHRASE_MATCH: _TL_('For phrase match: '),\r\n EXACT_MATCH: _TL_('For exact match: '),\r\n};\r\n\r\nexport const COMPONENT_TITLE = {\r\n PRODUCT_SERVICE_INPUT: _TL_('Product or service'),\r\n SECTION_KEYWORD_INPUT: _TL_('Option 1: Enter keywords'),\r\n KEYWORD_INPUT: _TL_('Keywords'),\r\n URL_INPUT: _TL_('Your landing page'),\r\n CATEGORY_DROPDOWN: _TL_('Your product category'),\r\n KEYWORD_UPLOAD: _TL_('Option 2: Upload file with keywords'),\r\n};\r\n\r\nexport const TAXONOMY = {\r\n NO_RESULT: _TL_('There are no results available'),\r\n ALL_CATEGORY: _TL_('All Categories'),\r\n};\r\n\r\nexport const PERIOD_TYPE = {\r\n UNKNOWN: 'Unknown',\r\n DAILY: 'Daily',\r\n WEEKLY: 'Weekly',\r\n MONTHLY: 'Monthly',\r\n};\r\n\r\nexport const ADGROUP_GRID_KEYWORDS_COLUMN_KEYOWRDS_MAX_COUNT = 12;\r\nexport const SEARCH_IDEA_KEYWORD_MAX_COUNT = 200;\r\nexport const SEARCH_VOLUME_KEYWORD_MAX_COUNT = 1000;\r\nexport const SEARCH_VOLUME_KEYWORD_MAX_COUNT_10K = 10000;\r\nexport const TRAFFIC_ESTIMATE_KEYWORD_MAX_COUNT = 1000;\r\nexport const KEYWORD_MAX_LENGTH = 100;\r\nexport const FILTERED_KEYWORD_MAX_COUNT = 100;\r\n\r\nexport const SEARCH_VOLUME_CHART_TYPE = {\r\n SEARCH_VOLUME_TRENDS: 'TotalTrends',\r\n MOBILE_TRENDS: 'MobileTrends',\r\n BREAKDOWN_BY_DEVICE: 'BreakdownByDevice',\r\n BREAKDOWN_BY_LOCATION: 'BreakdownByLocation',\r\n COMPARE_TO_COMPETITOR_DOMAINS: 'CompareToCompetitorDomains',\r\n COMPARE_TO_MARKET_LEADER_DOMAINS: 'CompareToMarketLeaderDomains',\r\n};\r\n\r\nexport const SEARCH_VOLUME_TRENDS_INLINE_CHART_TYPE = 'inlineChart';\r\n\r\nexport const TRAFFIC_EST_CHART_TYPE = {\r\n LINE_CHART: 'LineChart',\r\n DEVICE_PIE_CHART: 'DevicePieChart',\r\n LOCATION_PIE_CHART: 'LocationPieChart',\r\n};\r\n\r\nexport const LOCATION_TYPE = {\r\n COUNTRY: 'Country',\r\n STATE: 'State',\r\n SUBGEOGRAPHY: 'SubGeoGraphy',\r\n METROAREA: 'MetroArea',\r\n CITY: 'City',\r\n POSTALCODE: 'PostalCode',\r\n COUNTY: 'County',\r\n DMA: 'DMA',\r\n TARGETED: 'Targeted',\r\n};\r\n\r\nexport const LOCATION_MT_MAP = { // this const map location type from Campaign MT to Adinsight MT\r\n SubGeography: LOCATION_TYPE.SUBGEOGRAPHY,\r\n};\r\n\r\nexport const LOCATION_TYPE_LEVEL = {\r\n [LOCATION_TYPE.COUNTRY]: 1,\r\n [LOCATION_TYPE.STATE]: 2,\r\n [LOCATION_TYPE.SUBGEOGRAPHY]: 2,\r\n [LOCATION_TYPE.METROAREA]: 3,\r\n [LOCATION_TYPE.DMA]: 3,\r\n [LOCATION_TYPE.CITY]: 4,\r\n [LOCATION_TYPE.POSTALCODE]: 5,\r\n [LOCATION_TYPE.COUNTY]: 6,\r\n};\r\n\r\nexport const SEARCH_VOLUME_LOCATION_LEVEL = {\r\n STATE: LOCATION_TYPE.SUBGEOGRAPHY,\r\n DMA: LOCATION_TYPE.METROAREA,\r\n CITY: LOCATION_TYPE.CITY,\r\n TARGETED: LOCATION_TYPE.TARGETED,\r\n};\r\n\r\nexport const KEYWORD_PLANNER_PREFERENCE_PREFIX = 'keywordplanner.';\r\n// use new preference id to separate with old UI\r\nexport const KEYWORD_PLANNER_PREFERENCES = {\r\n [CONTROL_TYPES.LOCATION]: `${KEYWORD_PLANNER_PREFERENCE_PREFIX}targeting.locations`,\r\n [CONTROL_TYPES.LOCATION_LD]: `${KEYWORD_PLANNER_PREFERENCE_PREFIX}targeting.locationsLanguageDecoupling`,\r\n [CONTROL_TYPES.LANGUAGE]: `${KEYWORD_PLANNER_PREFERENCE_PREFIX}targeting.language`,\r\n [CONTROL_TYPES.NETWORK]: `${KEYWORD_PLANNER_PREFERENCE_PREFIX}targeting.network`,\r\n [CONTROL_TYPES.NEGATIVE_KEYWORD]: `${KEYWORD_PLANNER_PREFERENCE_PREFIX}targeting.negativeKeywords`,\r\n};\r\n\r\nexport const LOCATION_TYPE_WHITE_LIST = [\r\n LOCATION_TYPE.COUNTRY,\r\n LOCATION_TYPE.STATE,\r\n LOCATION_TYPE.SUBGEOGRAPHY,\r\n LOCATION_TYPE.METROAREA,\r\n LOCATION_TYPE.CITY,\r\n LOCATION_TYPE.COUNTY,\r\n];\r\n\r\nexport const LOCATION_COUNTRYID_WHITE_LIST = [190, 188, 32, 9, 66, 72];\r\n\r\nexport const LOCATION_COUNTRYCODE_WHITE_LIST = ['AU', 'CA', 'DE', 'FR', 'GB', 'US'];\r\n\r\nexport const LANGUAGE_LOCAGTIONS = {\r\n [LANGUAGE_TYPES.FRENCH]: 'Mixed',\r\n [LANGUAGE_TYPES.ENGLISH]: 'Mixed',\r\n [LANGUAGE_TYPES.GERMAN]: 'Mixed',\r\n};\r\n\r\nexport const locationTags = {\r\n [LOCATION_TYPE.COUNTRY]: _TL_('country/region'),\r\n [LOCATION_TYPE.STATE]: _TL_('state/province'),\r\n [LOCATION_TYPE.SUBGEOGRAPHY]: _TL_('SubGeography'),\r\n [LOCATION_TYPE.METROAREA]: _TL_('metro area'),\r\n [LOCATION_TYPE.CITY]: _TL_('city'),\r\n [LOCATION_TYPE.COUNTY]: _TL_('county'),\r\n [LOCATION_TYPE.DMA]: _TL_('Nielsen DMA'),\r\n};\r\n\r\nexport const locationOptions = {\r\n WITHIN: { id: 0, text: _TL_('Within Australia, Canada, France, Germany, United Kingdom, or United States'), isKRT: false },\r\n NOT_WITHIN: { id: 1, text: _TL_('All available countries/regions'), isKRT: true },\r\n};\r\n\r\nexport const DEFUALT_LOCATION = {\r\n [LANGUAGE_TYPES.FRENCH]: {\r\n id: 66,\r\n type: 1,\r\n countryId: 66,\r\n name: _TL_('France'),\r\n title: _TL_('France (country/region)'),\r\n },\r\n [LANGUAGE_TYPES.ENGLISH]: {\r\n id: 190,\r\n type: 1,\r\n countryId: 190,\r\n name: _TL_('United States'),\r\n title: _TL_('United States (country/region)'),\r\n },\r\n [LANGUAGE_TYPES.GERMAN]: {\r\n id: 72,\r\n type: 1,\r\n countryId: 72,\r\n name: _TL_('Germany'),\r\n title: _TL_('Germany (country/region)'),\r\n },\r\n};\r\n\r\nexport const mktToCountryMap = {\r\n US: {\r\n id: 190,\r\n type: 1,\r\n countryId: 190,\r\n parentIds: null,\r\n name: _TL_('United States'),\r\n title: _TL_('United States (country/region)'),\r\n },\r\n UK: {\r\n id: 188,\r\n type: 1,\r\n countryId: 188,\r\n parentIds: null,\r\n name: _TL_('United Kingdom'),\r\n title: _TL_('United Kingdom (country/region)'),\r\n },\r\n AU: {\r\n id: 9,\r\n type: 1,\r\n countryId: 9,\r\n parentIds: null,\r\n name: _TL_('Australia'),\r\n title: _TL_('Australia (country/region)'),\r\n },\r\n CA: {\r\n id: 32,\r\n type: 1,\r\n countryId: 32,\r\n parentIds: null,\r\n name: _TL_('Canada'),\r\n title: _TL_('Canada (country/region)'),\r\n },\r\n FR: {\r\n id: 66,\r\n type: 1,\r\n countryId: 66,\r\n parentIds: null,\r\n name: _TL_('France'),\r\n title: _TL_('France (country/region)'),\r\n },\r\n DE: {\r\n id: 72,\r\n type: 1,\r\n countryId: 72,\r\n parentIds: null,\r\n name: _TL_('Germany'),\r\n title: _TL_('Germany (country/region)'),\r\n },\r\n};\r\n\r\nexport const mktToLanguageMap = {\r\n US: LANGUAGE_TYPES.ENGLISH,\r\n UK: LANGUAGE_TYPES.ENGLISH,\r\n CA: LANGUAGE_TYPES.ENGLISH,\r\n AU: LANGUAGE_TYPES.ENGLISH,\r\n FR: LANGUAGE_TYPES.FRENCH,\r\n DE: LANGUAGE_TYPES.GERMAN,\r\n};\r\n\r\nexport const REQUEST_SUPPORTED_LANGUAGES = {\r\n [LANGUAGE_TYPES.ITALIAN]: {\r\n prefix: 'it',\r\n lcid: 1040,\r\n },\r\n [LANGUAGE_TYPES.SPANISH]: {\r\n prefix: 'es',\r\n lcid: 3082,\r\n },\r\n [LANGUAGE_TYPES.PORTUGUESE]: {\r\n prefix: 'pt',\r\n lcid: 1046,\r\n },\r\n [LANGUAGE_TYPES.TRADITIONAL_CHINESE]: {\r\n prefix: 'zh',\r\n lcid: 24,\r\n },\r\n [LANGUAGE_TYPES.ENGLISH]: {\r\n prefix: 'en',\r\n lcid: 1033,\r\n },\r\n};\r\n\r\nexport const LAYOUT_MODE = {\r\n Expanded: 'expanded',\r\n Collapsed: 'collapsed',\r\n Hidden: 'hidden',\r\n};\r\n\r\nexport const DeviceTypes = {\r\n Desktop: 'Desktop',\r\n Mobile: 'Mobile',\r\n Tablet: 'Tablet',\r\n};\r\n\r\nexport const MATCH_TYPE = {\r\n EXACT: 'Exact',\r\n PHRASE: 'Phrase',\r\n BROAD: 'Broad',\r\n};\r\n\r\nexport const DATE_RANGE_LAST12MONTH = 11;\r\n\r\nexport const CsvHeader = {\r\n Campaign: _TL_('Campaign'),\r\n AdGroup: _TL_('Ad group'),\r\n AdGroupByRelevance: _TL_('Ad group (by relevance)'),\r\n Keyword: _TL_('Keyword'),\r\n AverageMonthlySearches: _TL_('Average monthly searches'),\r\n Competition: _TL_('Competition'),\r\n SuggestedBid: _TL_('Suggested Bid'),\r\n ImprShare: _TL_('Ad impr. share'),\r\n MatchType: _TL_('Match Type'),\r\n Bid: _TL_('Bid'),\r\n EstimatedClicks: _TL_('Estimated Clicks'),\r\n EstimatedImpr: _TL_('Estimated Impr.'),\r\n EstimatedSpend: _TL_('Estimated Spend'),\r\n EstimatedCTR: _TL_('Estimated CTR'),\r\n EstimatedAvgCPC: _TL_('Estimated Avg. CPC'),\r\n EstimatedAvgPosition: _TL_('Estimated Avg. Position'),\r\n MonthlySearch: [_TL_('Jan'),\r\n _TL_('Feb'),\r\n _TL_('Mar'),\r\n _TL_('Apr'),\r\n _TL_('May'),\r\n _TL_('Jun'),\r\n _TL_('Jul'),\r\n _TL_('Aug'),\r\n _TL_('Sep'),\r\n _TL_('Oct'),\r\n _TL_('Nov'),\r\n _TL_('Dec')],\r\n};\r\n\r\nexport const EST_BUTTON_TYPE = {\r\n CLICKS: 'ClickRange',\r\n IMPRESSONS: 'ImpressionRange',\r\n SPEND: 'CostRange',\r\n};\r\n\r\nexport const EST_DATA_TYPE = {\r\n CLICKS: 'Clicks',\r\n IMPRESSONS: 'Impressions',\r\n SPEND: 'TotalCost',\r\n MAXCPC: 'Point',\r\n SCALED_BID: 'ScalePoint',\r\n};\r\n\r\nexport const EST_DATA_TYPE_MAP = {\r\n [EST_BUTTON_TYPE.CLICKS]: EST_DATA_TYPE.CLICKS,\r\n [EST_BUTTON_TYPE.IMPRESSONS]: EST_DATA_TYPE.IMPRESSONS,\r\n [EST_BUTTON_TYPE.SPEND]: EST_DATA_TYPE.SPEND,\r\n};\r\n\r\nexport const EST_DEVICE_DROPDOWN_TYPE = {\r\n BID: 'Bid',\r\n DEVICE: 'Device',\r\n};\r\n\r\nexport const LOG_TYPES = {\r\n VIEW_LOG: 'keywordplanner/viewlog',\r\n CHART_VIEW_LOG: 'keywordplanner/chartviewlog',\r\n EXPLICIT_ADOPTION_LOG: 'keywordplanner/explicitadoptionlog',\r\n ESTIMATES_CLICK_LOG: 'keywordplanner/estimatesclicklog',\r\n EXPORT_LOG: 'keywordplanner/exportlog',\r\n ERROR_LOG: 'keywordplanner/errorlog',\r\n};\r\n\r\nexport const LOG_ERROR_TYPES = {\r\n ADOPTION_ERROR: 'adoption error',\r\n};\r\n\r\nexport const LOG_ACTION_TYPES = {\r\n VIEW: 'View',\r\n ACCEPT: 'Acept',\r\n CLICK: 'Click',\r\n EXPORT: 'Export',\r\n ERROR: 'Error',\r\n};\r\n\r\nexport const LOG_TYPE_ACTION_TYPE_MAPPING = {\r\n [LOG_TYPES.VIEW_LOG]: LOG_ACTION_TYPES.VIEW,\r\n [LOG_TYPES.CHART_VIEW_LOG]: LOG_ACTION_TYPES.VIEW,\r\n [LOG_TYPES.EXPLICIT_ADOPTION_LOG]: LOG_ACTION_TYPES.ACCEPT,\r\n [LOG_TYPES.ESTIMATES_CLICK_LOG]: LOG_ACTION_TYPES.CLICK,\r\n [LOG_TYPES.EXPORT_LOG]: LOG_ACTION_TYPES.EXPORT,\r\n [LOG_TYPES.ERROR_LOG]: LOG_ACTION_TYPES.ERROR,\r\n};\r\n\r\nexport const LOG_SCENARIOS = {\r\n [SECTION_TYPES.SEARCH_IDEA]: 'new keywords',\r\n [SECTION_TYPES.SEARCH_IDEA_LD]: 'new keywords',\r\n [SECTION_TYPES.SEARCH_VOLUME]: 'search volume',\r\n [SECTION_TYPES.SEARCH_VOLUME_LD]: 'search volume',\r\n [SECTION_TYPES.TRAFFIC_ESTIMATE]: 'perf estimation',\r\n};\r\n\r\nexport const LOG_TAB_OPTIONS = {\r\n ADGROUP: 'ad group',\r\n KEYWORD: 'keyword',\r\n DETAIL: 'detail: ',\r\n};\r\n\r\nexport const LOG_SORT_BY_OPTIONS = {\r\n DEFAULT: 'default',\r\n ADGROUP_RELEVANCE: 'ad group (relevance)',\r\n SEARCH: 'search',\r\n COMPETITION: 'competition',\r\n BID: 'bid',\r\n IS: 'is',\r\n ADGROUP: 'ad group',\r\n MAX_CPC: 'max cpc',\r\n CLICKS: 'clicks',\r\n IMPRESSIONS: 'impressions',\r\n SPEND: 'spend',\r\n CTR: 'ctr',\r\n AVG_CPC: 'avg cpc',\r\n};\r\n\r\nexport const SORTABLE_COLUMN_KEY_LOG_SORT_BY_OPTION_MAPPING = {\r\n 'Idea/Relevance': LOG_SORT_BY_OPTIONS.ADGROUP_RELEVANCE,\r\n 'Idea/AvgSearchs': LOG_SORT_BY_OPTIONS.SEARCH,\r\n 'Idea/Competition': LOG_SORT_BY_OPTIONS.COMPETITION,\r\n 'Idea/SuggestedBid': LOG_SORT_BY_OPTIONS.BID,\r\n 'Idea/AdImprShare': LOG_SORT_BY_OPTIONS.IS,\r\n AdGroupName: LOG_SORT_BY_OPTIONS.ADGROUP,\r\n MaxCPC: LOG_SORT_BY_OPTIONS.MAX_CPC,\r\n [ADGROUP_ESTIMATE_COLUMNS.CLICK]: LOG_SORT_BY_OPTIONS.CLICKS,\r\n [ADGROUP_ESTIMATE_COLUMNS.IMPRESSION]: LOG_SORT_BY_OPTIONS.IMPRESSIONS,\r\n [ADGROUP_ESTIMATE_COLUMNS.COST]: LOG_SORT_BY_OPTIONS.SPEND,\r\n [ADGROUP_ESTIMATE_COLUMNS.CTR]: LOG_SORT_BY_OPTIONS.CTR,\r\n [ADGROUP_ESTIMATE_COLUMNS.AVERAGE_CPC]: LOG_SORT_BY_OPTIONS.AVG_CPC,\r\n [KEYWORD_ESTIMATE_COLUMNS.CLICK]: LOG_SORT_BY_OPTIONS.CLICKS,\r\n [KEYWORD_ESTIMATE_COLUMNS.IMPRESSION]: LOG_SORT_BY_OPTIONS.IMPRESSIONS,\r\n [KEYWORD_ESTIMATE_COLUMNS.COST]: LOG_SORT_BY_OPTIONS.SPEND,\r\n [KEYWORD_ESTIMATE_COLUMNS.CTR]: LOG_SORT_BY_OPTIONS.CTR,\r\n [KEYWORD_ESTIMATE_COLUMNS.AVERAGE_CPC]: LOG_SORT_BY_OPTIONS.AVG_CPC,\r\n};\r\n\r\nexport const GRID_LEVELS_LOG_TAB_OPTION_MAPPING = {\r\n [GRID_LEVELS.ADGROUP]: LOG_TAB_OPTIONS.ADGROUP,\r\n [GRID_LEVELS.KEYWORD]: LOG_TAB_OPTIONS.KEYWORD,\r\n [GRID_LEVELS.KEYWORD_IDEA_INNER]: LOG_TAB_OPTIONS.DETAIL,\r\n [GRID_LEVELS.ADGROUP_ESTIMATE]: LOG_TAB_OPTIONS.ADGROUP,\r\n [GRID_LEVELS.KEYWORD_ESTIMATE]: LOG_TAB_OPTIONS.KEYWORD,\r\n};\r\n\r\nexport const LOG_TRACKING_ACTIONS = {\r\n ADD_TO_ESTIMATE: 'add to estimate',\r\n BACK_TO_ESTIMATE: 'back to estimate',\r\n};\r\n\r\nexport const LOG_TRACKING_ACTION_TYPE_MAPPING = {\r\n [LOG_TRACKING_ACTIONS.ADD_TO_ESTIMATE]: LOG_TYPES.ESTIMATES_CLICK_LOG,\r\n [LOG_TRACKING_ACTIONS.BACK_TO_ESTIMATE]: LOG_TYPES.VIEW_LOG,\r\n};\r\n\r\nexport const LANDING_PAGE_OPTIONS = {\r\n K2K: 'K2K',\r\n D2K: 'D2K',\r\n U2K: 'U2K',\r\n All: 'All',\r\n};\r\n\r\nexport const URL_LENGTH_LIMIT = 2000;\r\n\r\nexport const CHANNEL_TYPES = {\r\n KEYWORD_PLANNER_TOOL: 'keyword planner tool',\r\n CAMPAIGN_CREATION: 'campaign creation',\r\n ADGROUP_CREATION: 'ad group creation',\r\n KEYWORD_CREATION: 'keyword creation',\r\n REPAIR_KEYWORD_CREATION: 'repair keyword creation',\r\n};\r\n\r\nexport const CHANNEL_TYPES_MAPPING = {\r\n [CHANNEL_TYPES.KEYWORD_PLANNER_TOOL]: 'KeywordPlannerUI',\r\n [CHANNEL_TYPES.CAMPAIGN_CREATION]: 'KeywordPlannerLite',\r\n [CHANNEL_TYPES.ADGROUP_CREATION]: 'KeywordPlannerLite',\r\n [CHANNEL_TYPES.KEYWORD_CREATION]: 'KeywordPlannerLite',\r\n [CHANNEL_TYPES.REPAIR_KEYWORD_CREATION]: 'KeywordPlannerLite',\r\n};\r\n\r\nexport const LOCATION_TARGET_LIMIT = 200;\r\n","import { IDEA_ATTRIBUTE_TYPES, DeviceTypes } from './consts';\r\n\r\nexport const defaultIdeaAttributes = [\r\n IDEA_ATTRIBUTE_TYPES.SOURCE,\r\n IDEA_ATTRIBUTE_TYPES.KEYWORD,\r\n IDEA_ATTRIBUTE_TYPES.AVERAGE_SEARCH_VOLUME,\r\n IDEA_ATTRIBUTE_TYPES.SEARCH_VOLUME_TREND,\r\n IDEA_ATTRIBUTE_TYPES.SUGGESTED_BID,\r\n IDEA_ATTRIBUTE_TYPES.COMPETITION,\r\n IDEA_ATTRIBUTE_TYPES.RELEVANCE,\r\n IDEA_ATTRIBUTE_TYPES.AD_IMPRESSION_SHARE,\r\n];\r\n\r\nexport const defaultIdeaAggregations = [{\r\n AggregationKey: 'GroupInfo',\r\n AggregationValues: [\r\n {\r\n IdeaAttribute: 'Keywords',\r\n AggregationType: 'Merge',\r\n },\r\n {\r\n IdeaAttribute: 'AverageSearchVolume',\r\n AggregationType: 'Sum',\r\n },\r\n {\r\n IdeaAttribute: 'SearchVolumeTrend',\r\n AggregationType: 'Sum',\r\n },\r\n {\r\n IdeaAttribute: 'SuggestedBid',\r\n AggregationType: 'Average',\r\n },\r\n {\r\n IdeaAttribute: 'Relevance',\r\n AggregationType: 'Average',\r\n },\r\n {\r\n IdeaAttribute: 'AdImpressionShare',\r\n AggregationType: 'Average',\r\n },\r\n {\r\n IdeaAttribute: 'Competition',\r\n AggregationType: 'Average',\r\n },\r\n ],\r\n}];\r\n\r\nexport const defaultDevicesTypeIds = [\r\n DeviceTypes.Desktop,\r\n DeviceTypes.Mobile,\r\n DeviceTypes.Tablet,\r\n];\r\n\r\nexport const defaultIdeaOverview = [\r\n {\r\n IdeaAttribute: 'SearchVolumeTrend',\r\n },\r\n {\r\n IdeaAttribute: 'CompetitorAdImpressionShare',\r\n },\r\n {\r\n IdeaAttribute: 'MarketLeaderAdImpressionShare',\r\n },\r\n {\r\n IdeaAttribute: 'AverageSearchVolume',\r\n Segment:\r\n {\r\n '@odata.type': '#Model.Suggestions.DeviceSegment',\r\n Devices: defaultDevicesTypeIds,\r\n },\r\n },\r\n {\r\n IdeaAttribute: 'SearchVolumeTrend',\r\n Segment:\r\n {\r\n '@odata.type': '#Model.Suggestions.DeviceSegment',\r\n Devices: ['Mobile'],\r\n },\r\n },\r\n];\r\n","import _ from 'underscore';\r\nimport { cloneDeep } from '@bingads-webui-universal/primitive-utilities';\r\nimport { stringifySync } from '@bingads-webui/safe-json';\r\nimport {\r\n CONTROL_TYPES,\r\n URL_OPTION_TYPES,\r\n NETWORK_TYPES,\r\n PERIOD_TYPE,\r\n LANGUAGE_TYPES,\r\n REQUEST_SUPPORTED_LANGUAGES,\r\n DeviceTypes,\r\n MATCH_TYPE,\r\n CHANNEL_TYPES,\r\n CHANNEL_TYPES_MAPPING,\r\n} from './consts';\r\nimport { defaultIdeaOverview, defaultDevicesTypeIds } from './config';\r\n\r\nexport const getURLDomain = url =>\r\n (url.replace('http://', '').replace('https://', '').split(/[/?#]/)[0]);\r\n\r\nexport const isJsonEqual = (v1, v2) => (JSON.stringify(v1) === JSON.stringify(v2));\r\n\r\nexport const formatUrl = ({ url, scopeValues }) => url\r\n .replace('{aid}', scopeValues.aid)\r\n .replace('{cid}', scopeValues.cid);\r\n\r\nexport const getOptions = ({\r\n token,\r\n lcid,\r\n data = {},\r\n channel = CHANNEL_TYPES.KEYWORD_PLANNER_TOOL,\r\n}) => ({\r\n contentType: 'application/json',\r\n type: _.isEmpty(data) ? 'GET' : 'POST',\r\n headers: {\r\n authorization: `CCMTSmallToken ${token}`,\r\n 'x-ms-lcid': `${lcid}`,\r\n 'x-ms-scenarioname': CHANNEL_TYPES_MAPPING[channel],\r\n scenario: channel,\r\n },\r\n data: _.isEmpty(data) ? null : stringifySync(data),\r\n});\r\n\r\nexport const getRequestSupportedLocaleId = ({ localeString }) => {\r\n // Check prefix of localeString to determine language\r\n let parsedLanguage = _.find(REQUEST_SUPPORTED_LANGUAGES, (supportedLanguage) => {\r\n const languageRegex = new RegExp(`^${supportedLanguage.prefix}(-.+)?$`);\r\n return languageRegex.test(localeString);\r\n });\r\n\r\n // Add switch case here if special cases needed\r\n // Fall back to use English\r\n if (_.isUndefined(parsedLanguage)) {\r\n parsedLanguage = REQUEST_SUPPORTED_LANGUAGES[LANGUAGE_TYPES.ENGLISH];\r\n }\r\n return parsedLanguage.lcid;\r\n};\r\n\r\nexport const redirectToLogin = () => {\r\n window.location.href = `${window.location.protocol}//${window.location.host}/default.aspx?reason=1&msg=sessionexpired`;\r\n};\r\n\r\nexport const formatProducts = (model) => {\r\n let productsModel;\r\n if (model.isIdeas) {\r\n productsModel = model[CONTROL_TYPES.SEARCH_IDEA_PRODUCTS];\r\n } else {\r\n productsModel = !_.isEmpty(model[CONTROL_TYPES.SEARCH_VOLUME_PRODUCTS].parsedKeywords) ?\r\n model[CONTROL_TYPES.SEARCH_VOLUME_PRODUCTS] :\r\n model[CONTROL_TYPES.SEARCH_VOLUME_UPLOAD_PRODUCTS];\r\n }\r\n return !_.isEmpty(productsModel.parsedKeywords) ?\r\n productsModel.parsedKeywords : undefined;\r\n};\r\n\r\nexport const formatLandingPageURL = landingPage =>\r\n (landingPage.option === URL_OPTION_TYPES.DOMAIN ?\r\n getURLDomain(landingPage.url) : landingPage.url);\r\n\r\nexport const formatTargetings = (model, isLanguageDecoupling = false, isLanguageSkipped = false) => {\r\n const targetings = [];\r\n // Device\r\n _.each(defaultDevicesTypeIds, deviceType => targetings.push({\r\n '@odata.type': '#Model.TrafficEstimate.DeviceTargeting',\r\n DeviceType: deviceType,\r\n AdjustmentPercantage: 0,\r\n }));\r\n\r\n // URL Option\r\n if (model.isIdeas && !_.isEmpty(model[CONTROL_TYPES.LANDING_PAGE].url)) {\r\n targetings.push({\r\n '@odata.type': `#Model.Suggestions.${CONTROL_TYPES.LANDING_PAGE}Targeting`,\r\n SuggestionType: model[CONTROL_TYPES.LANDING_PAGE].option,\r\n });\r\n }\r\n\r\n // Language\r\n if (!isLanguageSkipped && !_.isEmpty(model[CONTROL_TYPES.LANGUAGE])) {\r\n targetings.push({\r\n '@odata.type': `#Model.TrafficEstimate.${CONTROL_TYPES.LANGUAGE}Targeting`,\r\n Language: model[CONTROL_TYPES.LANGUAGE],\r\n });\r\n }\r\n\r\n // Location\r\n if (!_.isEmpty(model[isLanguageDecoupling ? CONTROL_TYPES.LOCATION_LD : CONTROL_TYPES.LOCATION])) {\r\n const locations = _.uniq(model[isLanguageDecoupling ? CONTROL_TYPES.LOCATION_LD : CONTROL_TYPES.LOCATION], false, item => item.id);\r\n _.each(locations, (item) => {\r\n targetings.push({\r\n '@odata.type': `#Model.TrafficEstimate.${CONTROL_TYPES.LOCATION}Targeting`,\r\n LocationId: item.id,\r\n });\r\n });\r\n }\r\n // Network\r\n if (!_.isEmpty(model[CONTROL_TYPES.NETWORK])) {\r\n if (model[CONTROL_TYPES.NETWORK] === NETWORK_TYPES.ALL) {\r\n _.each(NETWORK_TYPES, (networkType) => { // list all network types for targeting\r\n if (networkType !== NETWORK_TYPES.ALL) {\r\n targetings.push({\r\n '@odata.type': `#Model.TrafficEstimate.${CONTROL_TYPES.NETWORK}Targeting`,\r\n NetworkType: networkType,\r\n });\r\n }\r\n });\r\n } else {\r\n targetings.push({\r\n '@odata.type': `#Model.TrafficEstimate.${CONTROL_TYPES.NETWORK}Targeting`,\r\n NetworkType: model[CONTROL_TYPES.NETWORK],\r\n });\r\n }\r\n }\r\n return targetings;\r\n};\r\n\r\nexport const formatFilters = ({ model, scopeValues, isCategoryFilter }) => {\r\n const filters = [];\r\n // Average Search Volume Range\r\n if (model[CONTROL_TYPES.KEYWORD_FILTERS_GROUP][CONTROL_TYPES.AVERAGE_MONTHLY_SEARCH].value) {\r\n const range = model[CONTROL_TYPES.KEYWORD_FILTERS_GROUP][CONTROL_TYPES.AVERAGE_MONTHLY_SEARCH];\r\n filters.push({\r\n '@odata.type': `#Model.Suggestions.${CONTROL_TYPES.AVERAGE_MONTHLY_SEARCH}Filter`,\r\n AverageSearchVolumeRange: {\r\n [range.operator]: range.value,\r\n },\r\n });\r\n }\r\n // Suggested Bid Range\r\n if (model[CONTROL_TYPES.KEYWORD_FILTERS_GROUP][CONTROL_TYPES.SUGGESTED_BID].value) {\r\n const range = model[CONTROL_TYPES.KEYWORD_FILTERS_GROUP][CONTROL_TYPES.SUGGESTED_BID];\r\n filters.push({\r\n '@odata.type': `#Model.Suggestions.${CONTROL_TYPES.SUGGESTED_BID}Filter`,\r\n SuggestedBidRange: {\r\n [range.operator]: {\r\n Amount: range.value,\r\n },\r\n },\r\n });\r\n }\r\n // Ad Impression Share Range\r\n if (model[CONTROL_TYPES.KEYWORD_FILTERS_GROUP][CONTROL_TYPES.AD_IMPRESSION_SHARE].value) {\r\n const range = model[CONTROL_TYPES.KEYWORD_FILTERS_GROUP][CONTROL_TYPES.AD_IMPRESSION_SHARE];\r\n filters.push({\r\n '@odata.type': `#Model.Suggestions.${CONTROL_TYPES.AD_IMPRESSION_SHARE}Filter`,\r\n AdImpressionShareRange: {\r\n [range.operator]: range.value,\r\n },\r\n });\r\n }\r\n // Competition\r\n if (!_.isEmpty(model[CONTROL_TYPES.KEYWORD_FILTERS_GROUP][CONTROL_TYPES.COMPETITION])) {\r\n filters.push({\r\n '@odata.type': `#Model.Suggestions.${CONTROL_TYPES.COMPETITION}Filter`,\r\n CompetitionLevels: model[CONTROL_TYPES.KEYWORD_FILTERS_GROUP][CONTROL_TYPES.COMPETITION],\r\n });\r\n }\r\n\r\n // Included and excluded keywords\r\n if (!_.isEmpty(model[CONTROL_TYPES.INCLUDED_KEYWORD].parsedKeywords) ||\r\n !_.isEmpty(model[CONTROL_TYPES.NEGATIVE_KEYWORD].parsedKeywords)) {\r\n filters.push({\r\n '@odata.type': '#Model.Suggestions.IncludedAndExcludedFilter',\r\n Included: model[CONTROL_TYPES.INCLUDED_KEYWORD].parsedKeywords,\r\n Excluded: model[CONTROL_TYPES.NEGATIVE_KEYWORD].parsedKeywords,\r\n });\r\n }\r\n\r\n // Advertiser\r\n if (!model[CONTROL_TYPES.ACCOUNT_KEYWORD_DEDUPE]) {\r\n filters.push({\r\n '@odata.type': '#Model.Suggestions.AdvertiserFilter',\r\n AdvertiserId: scopeValues.aid,\r\n AdvertiserLevel: 'Account',\r\n });\r\n }\r\n\r\n // Category\r\n if (model[CONTROL_TYPES.CATEGORY].categoryId && isCategoryFilter) {\r\n filters.push({\r\n '@odata.type': '#Model.Suggestions.CategoryFilter',\r\n Category: Number(model[CONTROL_TYPES.CATEGORY].categoryId),\r\n });\r\n }\r\n\r\n return filters;\r\n};\r\n\r\nexport const formatPeriod = (model) => {\r\n const periodSetting = {};\r\n // date range\r\n if (!_.isEmpty(model[CONTROL_TYPES.DATE_RANGE])) {\r\n periodSetting.PeriodType = PERIOD_TYPE.MONTHLY;\r\n\r\n const start = new Date(model[CONTROL_TYPES.DATE_RANGE].start);\r\n const end = new Date(model[CONTROL_TYPES.DATE_RANGE].end);\r\n\r\n periodSetting.DateRange = {\r\n Start: start.toISOString(),\r\n End: end.toISOString(),\r\n };\r\n }\r\n return periodSetting;\r\n};\r\n\r\nexport const formatTrafficEstimateNegatieKeywords = model =>\r\n _.map(\r\n model[CONTROL_TYPES.NEGATIVE_KEYWORD].parsedKeywords,\r\n keyword => ({\r\n Text: keyword,\r\n MatchType: MATCH_TYPE.PHRASE, // hard code for MT\r\n })\r\n );\r\n\r\nexport const formatIdeaOverviews = (model, mergeLocation) => {\r\n const ideaOverviews = mergeLocation ? [] : _.clone(defaultIdeaOverview);\r\n if (!_.isEmpty(model[CONTROL_TYPES.LOCATION_LEVEL])) {\r\n ideaOverviews.push({\r\n IdeaAttribute: 'AverageSearchVolume',\r\n Segment: {\r\n '@odata.type': `#Model.Suggestions.${CONTROL_TYPES.LOCATION}Segment`,\r\n LocationLevel: model[CONTROL_TYPES.LOCATION_LEVEL],\r\n },\r\n });\r\n }\r\n return ideaOverviews;\r\n};\r\n\r\nexport const cleanTrafficEstKeyword = (adgroups) => {\r\n const newAdgroups =\r\n _.map(adgroups, adGroupTrafficEstimateParameter => (\r\n _.extend(\r\n adGroupTrafficEstimateParameter,\r\n {\r\n KeywordTrafficEstimateParameters: _.map(\r\n adGroupTrafficEstimateParameter.KeywordTrafficEstimateParameters,\r\n keyword => ({\r\n ..._.pick(keyword, 'MatchType', 'Text', 'MaxCPC'),\r\n })\r\n ),\r\n }\r\n )));\r\n return newAdgroups;\r\n};\r\n\r\nexport const formatAdGroupTrafficEstimateParameters = (model) => {\r\n let AdGroupTrafficEstimateParameters =\r\n _.toArray(cloneDeep(model[CONTROL_TYPES.TRAFFIC_ESTIMATE_ADGROUP_KEYWORDS]));\r\n AdGroupTrafficEstimateParameters = cleanTrafficEstKeyword(AdGroupTrafficEstimateParameters);\r\n const hasBid = !!model[CONTROL_TYPES.TRAFFIC_ESTIMATE_BID];\r\n const hasInlineCustomBid = model.isTrafficEstScale;\r\n\r\n if (hasBid || hasInlineCustomBid) {\r\n AdGroupTrafficEstimateParameters =\r\n _.map(AdGroupTrafficEstimateParameters, adGroupTrafficEstimateParameter => (\r\n _.extend(\r\n adGroupTrafficEstimateParameter,\r\n {\r\n MaxCPC: model.trafficEstLandscapeScale *\r\n (adGroupTrafficEstimateParameter.MaxCPC || model[CONTROL_TYPES.TRAFFIC_ESTIMATE_BID])\r\n || undefined,\r\n KeywordTrafficEstimateParameters: _.map(\r\n adGroupTrafficEstimateParameter.KeywordTrafficEstimateParameters,\r\n keyword => ({\r\n ...keyword,\r\n MaxCPC: model.trafficEstLandscapeScale * keyword.MaxCPC || undefined,\r\n })\r\n ),\r\n }\r\n )));\r\n }\r\n\r\n return {\r\n AdGroupTrafficEstimateParameters,\r\n scaleLandScape: hasInlineCustomBid,\r\n // TODO: if bid change && scale mode, request landscape, else do not request landscape\r\n requestLandscape: true,\r\n };\r\n};\r\n\r\nexport const formatLocationLevels = model => (!_.isEmpty(model[CONTROL_TYPES.LOCATION_LEVEL]) ?\r\n [model[CONTROL_TYPES.LOCATION_LEVEL]] : []);\r\n\r\nexport const formatAdGroupEstimatedTraffics = (model) => {\r\n const adGroupEstimatedTraffics =\r\n _.map(\r\n _.toArray(model[CONTROL_TYPES.TRAFFIC_ESTIMATE_ADGROUP_KEYWORDS]),\r\n adgroupKeywords => ({\r\n AdGroupName: adgroupKeywords.AdGroupName,\r\n KeywordEstimatedTraffics: adgroupKeywords.KeywordTrafficEstimateParameters,\r\n MaxCPC: adgroupKeywords.MaxCPC && adgroupKeywords.MaxCPC * model.trafficEstLandscapeScale,\r\n HasOwnMaxCPC: !!adgroupKeywords.MaxCPC,\r\n })\r\n );\r\n\r\n return adGroupEstimatedTraffics;\r\n};\r\n\r\nexport const formatAdGroupEstimatedTrafficsForMaxCPC = (model, adGroupEstimatedTraffics) => {\r\n const adgroups = model[CONTROL_TYPES.TRAFFIC_ESTIMATE_ADGROUP_KEYWORDS];\r\n const emptyTrafficTemplate = {\r\n Clicks: 0.0,\r\n Impressions: 0.0,\r\n TotalCost: 0.0,\r\n };\r\n const values = _.map(adGroupEstimatedTraffics, entity => ({\r\n AdGroupName: entity.AdGroupName,\r\n MaxCPC: model.trafficEstLandscapeScale *\r\n ((adgroups[entity.AdGroupName] && adgroups[entity.AdGroupName].MaxCPC) ||\r\n model[CONTROL_TYPES.TRAFFIC_ESTIMATE_BID]),\r\n HasOwnMaxCPC: adgroups[entity.AdGroupName] && adgroups[entity.AdGroupName].MaxCPC,\r\n // Check if the traffics are actually empty\r\n AdGroupEstimatedTraffic: _.isMatch(entity.AdGroupEstimatedTraffic, emptyTrafficTemplate) ?\r\n _.clone(emptyTrafficTemplate) : entity.AdGroupEstimatedTraffic,\r\n KeywordEstimatedTraffics: _.map(entity.KeywordEstimatedTraffics, traffic =>\r\n (_.isMatch(traffic.KeywordEstimatedTraffic, emptyTrafficTemplate) ?\r\n _.extend(traffic, { KeywordEstimatedTraffic: _.clone(emptyTrafficTemplate) }) : traffic)),\r\n }));\r\n return values;\r\n};\r\n\r\nexport const formatDeviceTraffics = () => {\r\n const deviceList = [DeviceTypes.Desktop, DeviceTypes.Mobile, DeviceTypes.Tablet];\r\n const devices = _.map(deviceList, deviceName => ({\r\n Device: { DeviceName: deviceName },\r\n }));\r\n return devices;\r\n};\r\n\r\nexport const formatDeviceTrafficsWithBid = (deviceTraffics) => {\r\n const deviceList = [DeviceTypes.Desktop, DeviceTypes.Mobile, DeviceTypes.Tablet];\r\n return !_.isEmpty(deviceTraffics) ?\r\n deviceTraffics :\r\n _.map(deviceList, deviceName => ({\r\n Device: { DeviceName: deviceName },\r\n Traffic: {\r\n Clicks: 0.0,\r\n Impressions: 0.0,\r\n TotalCost: 0.0,\r\n },\r\n }));\r\n};\r\n\r\nexport const formatLocationTraffics = (model) => {\r\n const locationList = model.Location;\r\n const locations = _.map(locationList, location => ({\r\n Location: { LocationName: location.name },\r\n }));\r\n return [{ LocationTraffics: locations }];\r\n};\r\n\r\nexport const formatLocationTrafficsWithBid = (model, locationTraffics) => {\r\n const locationList = model.Location;\r\n return !_.isEmpty(locationTraffics) && !_.isEmpty(locationTraffics[0].LocationTraffics) ?\r\n locationTraffics :\r\n [{\r\n LocationTraffics: _.map(locationList, location => ({\r\n Location: { LocationName: location.name },\r\n Traffic: {\r\n Clicks: 0.0,\r\n Impressions: 0.0,\r\n TotalCost: 0.0,\r\n },\r\n })),\r\n }];\r\n};\r\n\r\nexport const formatKeywordEstimatedTraffics = (adGroupEstimatedTraffics, model) => {\r\n const values = [];\r\n const adgroups = model[CONTROL_TYPES.TRAFFIC_ESTIMATE_ADGROUP_KEYWORDS];\r\n _.each(adGroupEstimatedTraffics, (adGroupItem) => {\r\n _.each(adGroupItem.KeywordEstimatedTraffics, (keywordItem) => {\r\n const modelAdgroup = adgroups[adGroupItem.AdGroupName];\r\n const modelKeyword = _.find(\r\n modelAdgroup && modelAdgroup.KeywordTrafficEstimateParameters,\r\n item => item.Text === keywordItem.Text\r\n ) || {};\r\n values.push({\r\n AdGroupName: adGroupItem.AdGroupName,\r\n Text: keywordItem.Text,\r\n MatchType: keywordItem.MatchType,\r\n KeywordEstimatedTraffic: keywordItem.KeywordEstimatedTraffic,\r\n MaxCPC: model.trafficEstLandscapeScale *\r\n (modelKeyword.MaxCPC || (modelAdgroup && modelAdgroup.MaxCPC)\r\n || model[CONTROL_TYPES.TRAFFIC_ESTIMATE_BID]) || undefined,\r\n HasOwnMaxCPC: !!modelKeyword.MaxCPC,\r\n });\r\n });\r\n });\r\n return values;\r\n};\r\n\r\nexport const normalizeTrafficEstimate = ({ model, rawData, i18n }) => {\r\n // Backfill the default value from input when bid value or keyword is empty\r\n const isBackfilled = !model[CONTROL_TYPES.TRAFFIC_ESTIMATE_BID] ||\r\n _.isEmpty(model[CONTROL_TYPES.TRAFFIC_ESTIMATE_ADGROUP_KEYWORDS]);\r\n const value = _.first(rawData.value);\r\n const backfilledValues = {\r\n value: [{\r\n Identifier: value.Identifier,\r\n AdGroupEstimatedTrafficRanges: value.AdGroupEstimatedTrafficRanges,\r\n AdGroupEstimatedTraffics: isBackfilled ?\r\n formatAdGroupEstimatedTraffics(model) :\r\n formatAdGroupEstimatedTrafficsForMaxCPC(\r\n model,\r\n value.AdGroupEstimatedTraffics\r\n ),\r\n DeviceTraffics: isBackfilled ?\r\n formatDeviceTraffics(i18n) :\r\n formatDeviceTrafficsWithBid(value.DeviceTraffics),\r\n LocationTraffics: isBackfilled ?\r\n formatLocationTraffics(model) :\r\n formatLocationTrafficsWithBid(model, value.LocationTraffics),\r\n LandscapesEstimate: value.LandscapesEstimate,\r\n KeywordEstimatedTraffics: isBackfilled ?\r\n formatKeywordEstimatedTraffics(formatAdGroupEstimatedTraffics(model), model) :\r\n formatKeywordEstimatedTraffics(value.AdGroupEstimatedTraffics, model),\r\n }],\r\n };\r\n const normalizedData = _.extend({}, rawData, backfilledValues);\r\n\r\n return normalizedData;\r\n};\r\n","import {\r\n COMPETITION_LEVEL_TYPES,\r\n URL_OPTION_TYPES,\r\n LANGUAGE_TYPES,\r\n NETWORK_TYPES,\r\n CONTROL_TYPES,\r\n SEARCH_VOLUME_CHART_TYPE,\r\n SEARCH_VOLUME_LOCATION_LEVEL,\r\n GRID_TYPES,\r\n GRID_LEVELS,\r\n LAYOUT_MODE,\r\n DeviceTypes,\r\n EST_BUTTON_TYPE,\r\n EST_DEVICE_DROPDOWN_TYPE,\r\n TRAFFIC_EST_CHART_TYPE,\r\n EST_DATA_TYPE,\r\n PAGE_TYPES,\r\n LANDING_PAGE_OPTIONS,\r\n} from './consts';\r\n\r\nexport const settingsConfig = {\r\n [CONTROL_TYPES.LANGUAGE]: {\r\n controlId: CONTROL_TYPES.LANGUAGE,\r\n title: _TL_('Language'),\r\n description: _TL_('The location view varies based on the language input'),\r\n },\r\n [CONTROL_TYPES.LOCATION]: {\r\n controlId: CONTROL_TYPES.LOCATION,\r\n title: _TL_('Location'),\r\n description: _TL_('Locations may vary depending on the language you selected previously. For broader location targeting, please select a different language. Which location would you like to target?'),\r\n },\r\n [CONTROL_TYPES.NETWORK]: {\r\n controlId: CONTROL_TYPES.NETWORK,\r\n },\r\n [CONTROL_TYPES.NETWORK]: {\r\n controlId: CONTROL_TYPES.NETWORK,\r\n title: _TL_('Microsoft Advertising Network'),\r\n description: _TL_('Choose your network:'),\r\n },\r\n [CONTROL_TYPES.NEGATIVE_KEYWORD]: {\r\n controlId: CONTROL_TYPES.NEGATIVE_KEYWORD,\r\n title: _TL_('Negative keywords'),\r\n description: _TL_('Enter your negative keywords:'),\r\n },\r\n [CONTROL_TYPES.DATE_RANGE]: {\r\n controlId: CONTROL_TYPES.DATE_RANGE,\r\n title: _TL_('Date range'),\r\n description: _TL_('Show average monthly searches for:'),\r\n },\r\n [CONTROL_TYPES.KEYWORD_FILTERS_GROUP]: {\r\n controlId: CONTROL_TYPES.KEYWORD_FILTERS_GROUP,\r\n title: _TL_('Keyword Filters'),\r\n },\r\n [CONTROL_TYPES.ACCOUNT_KEYWORD_DEDUPE]: {\r\n controlId: CONTROL_TYPES.ACCOUNT_KEYWORD_DEDUPE,\r\n title: _TL_('Keyword Options'),\r\n },\r\n [CONTROL_TYPES.INCLUDED_KEYWORD]: {\r\n controlId: CONTROL_TYPES.INCLUDED_KEYWORD,\r\n title: _TL_('Keywords to include'),\r\n description: _TL_('Only include keywords containing the following terms'),\r\n },\r\n};\r\n\r\nexport const urlOptions = {\r\n [URL_OPTION_TYPES.DOMAIN]: {\r\n id: URL_OPTION_TYPES.DOMAIN,\r\n text: _TL_('Use the entire site'),\r\n },\r\n [URL_OPTION_TYPES.PAGE]: {\r\n id: URL_OPTION_TYPES.PAGE,\r\n text: _TL_('Use only this page'),\r\n },\r\n};\r\n\r\nexport const languageOptions = {\r\n [LANGUAGE_TYPES.ENGLISH]: {\r\n id: LANGUAGE_TYPES.ENGLISH,\r\n text: _TL_('English'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.GERMAN]: {\r\n id: LANGUAGE_TYPES.GERMAN,\r\n text: _TL_('German'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.FRENCH]: {\r\n id: LANGUAGE_TYPES.FRENCH,\r\n text: _TL_('French'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.DUTCH]: {\r\n id: LANGUAGE_TYPES.DUTCH,\r\n text: _TL_('Dutch'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.SPANISH]: {\r\n id: LANGUAGE_TYPES.SPANISH,\r\n text: _TL_('Spanish'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.ALBANIAN]: {\r\n id: LANGUAGE_TYPES.ALBANIAN,\r\n text: _TL_('Albanian'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.ARABIC]: {\r\n id: LANGUAGE_TYPES.ARABIC,\r\n text: _TL_('Arabic'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.BOSNIAN]: {\r\n id: LANGUAGE_TYPES.BOSNIAN,\r\n text: _TL_('Bosnian'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.BULGARIAN]: {\r\n id: LANGUAGE_TYPES.BULGARIAN,\r\n text: _TL_('Bulgarian'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.CROATIAN]: {\r\n id: LANGUAGE_TYPES.CROATIAN,\r\n text: _TL_('Croatian'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.CZECH]: {\r\n id: LANGUAGE_TYPES.CZECH,\r\n text: _TL_('Czech'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.DANISH]: {\r\n id: LANGUAGE_TYPES.DANISH,\r\n text: _TL_('Danish'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.ESTONIAN]: {\r\n id: LANGUAGE_TYPES.ESTONIAN,\r\n text: _TL_('Estonian'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.FINNISH]: {\r\n id: LANGUAGE_TYPES.FINNISH,\r\n text: _TL_('Finnish'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.GREEK]: {\r\n id: LANGUAGE_TYPES.GREEK,\r\n text: _TL_('Greek'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.HEBREW]: {\r\n id: LANGUAGE_TYPES.HEBREW,\r\n text: _TL_('Hebrew'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.HINDI]: {\r\n id: LANGUAGE_TYPES.HINDI,\r\n text: _TL_('Hindi'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.HUNGARIAN]: {\r\n id: LANGUAGE_TYPES.HUNGARIAN,\r\n text: _TL_('Hungarian'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.ICELANDIC]: {\r\n id: LANGUAGE_TYPES.ICELANDIC,\r\n text: _TL_('Icelandic'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.INDONESIAN]: {\r\n id: LANGUAGE_TYPES.INDONESIAN,\r\n text: _TL_('Indonesian'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.ITALIAN]: {\r\n id: LANGUAGE_TYPES.ITALIAN,\r\n text: _TL_('Italian'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.JAPANESE]: {\r\n id: LANGUAGE_TYPES.JAPANESE,\r\n text: _TL_('Japanese'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.LATVIAN]: {\r\n id: LANGUAGE_TYPES.LATVIAN,\r\n text: _TL_('Latvian'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.LITHUANIAN]: {\r\n id: LANGUAGE_TYPES.LITHUANIAN,\r\n text: _TL_('Lithuanian'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.MACEDONIAN]: {\r\n id: LANGUAGE_TYPES.MACEDONIAN,\r\n text: _TL_('Macedonian'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.MALTESE]: {\r\n id: LANGUAGE_TYPES.MALTESE,\r\n text: _TL_('Maltese'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.MALAY]: {\r\n id: LANGUAGE_TYPES.MALAY,\r\n text: _TL_('Malay'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.NORWEGIAN]: {\r\n id: LANGUAGE_TYPES.NORWEGIAN,\r\n text: _TL_('Norwegian'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.POLISH]: {\r\n id: LANGUAGE_TYPES.POLISH,\r\n text: _TL_('Polish'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.PORTUGUESE]: {\r\n id: LANGUAGE_TYPES.PORTUGUESE,\r\n text: _TL_('Portuguese'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.ROMANIAN]: {\r\n id: LANGUAGE_TYPES.ROMANIAN,\r\n text: _TL_('Romanian'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.RUSSIAN]: {\r\n id: LANGUAGE_TYPES.RUSSIAN,\r\n text: _TL_('Russian'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.SERBIAN]: {\r\n id: LANGUAGE_TYPES.SERBIAN,\r\n text: _TL_('Serbian'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.SLOVAK]: {\r\n id: LANGUAGE_TYPES.SLOVAK,\r\n text: _TL_('Slovak'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.SLOVENIAN]: {\r\n id: LANGUAGE_TYPES.SLOVENIAN,\r\n text: _TL_('Slovenian'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.SWEDISH]: {\r\n id: LANGUAGE_TYPES.SWEDISH,\r\n text: _TL_('Swedish'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.TAGALOG]: {\r\n id: LANGUAGE_TYPES.TAGALOG,\r\n text: _TL_('Tagalog'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.THAI]: {\r\n id: LANGUAGE_TYPES.THAI,\r\n text: _TL_('Thai'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.TURKISH]: {\r\n id: LANGUAGE_TYPES.TURKISH,\r\n text: _TL_('Turkish'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.TRADITIONAL_CHINESE]: {\r\n id: LANGUAGE_TYPES.TRADITIONAL_CHINESE,\r\n text: _TL_('Traditional Chinese'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n [LANGUAGE_TYPES.VIETNAMESE]: {\r\n id: LANGUAGE_TYPES.VIETNAMESE,\r\n text: _TL_('Vietnamese'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n};\r\n\r\nexport const languageOptionsCN = {\r\n [LANGUAGE_TYPES.SIMPLIFIED_CHINESE]: {\r\n id: LANGUAGE_TYPES.SIMPLIFIED_CHINESE,\r\n text: _TL_('Simplified Chinese'),\r\n },\r\n};\r\n\r\nexport const networkOptions = {\r\n [NETWORK_TYPES.ALL]: {\r\n id: NETWORK_TYPES.ALL,\r\n text: _TL_('The entire Microsoft Advertising Network (recommended)'),\r\n description: _TL_('This option includes Microsoft sites and additional partner traffic for extended reach and lower cost-per-click.'),\r\n },\r\n [NETWORK_TYPES.OWNED_AND_OPERATED]: {\r\n id: NETWORK_TYPES.OWNED_AND_OPERATED,\r\n text: _TL_('Microsoft sites and select traffic'),\r\n description: _TL_('This option includes Microsoft sites and select partner traffic with performance and conversion rates similar to Microsoft Bing\\'s.'),\r\n },\r\n};\r\n\r\nexport const rangeOptions = {\r\n Start: {\r\n id: 'Start',\r\n text: _TL_('≥'),\r\n },\r\n End: {\r\n id: 'End',\r\n text: _TL_('≤'),\r\n },\r\n};\r\n\r\nexport const competitionOptions = {\r\n [COMPETITION_LEVEL_TYPES.HIGH]: {\r\n id: COMPETITION_LEVEL_TYPES.HIGH,\r\n text: _TL_('High'),\r\n },\r\n [COMPETITION_LEVEL_TYPES.MEDIUM]: {\r\n id: COMPETITION_LEVEL_TYPES.MEDIUM,\r\n text: _TL_('Medium ', { comment: 'Here means competition level(like low, mid, high), not means media' }),\r\n },\r\n [COMPETITION_LEVEL_TYPES.LOW]: {\r\n id: COMPETITION_LEVEL_TYPES.LOW,\r\n text: _TL_('Low'),\r\n },\r\n};\r\n\r\nexport const searchVolumeTypeOptions = {\r\n [SEARCH_VOLUME_CHART_TYPE.SEARCH_VOLUME_TRENDS]: {\r\n id: SEARCH_VOLUME_CHART_TYPE.SEARCH_VOLUME_TRENDS,\r\n text: _TL_('Search volume trends'),\r\n chartType: 'column',\r\n subTitle: _TL_('Average monthly searches'),\r\n emptyMsg: [\r\n _TL_('There is not enough data yet to display search volume charts.'),\r\n _TL_('Please try searching for different keywords.'),\r\n ],\r\n },\r\n [SEARCH_VOLUME_CHART_TYPE.MOBILE_TRENDS]: {\r\n id: SEARCH_VOLUME_CHART_TYPE.MOBILE_TRENDS,\r\n text: _TL_('Smartphone trends'),\r\n chartType: 'column',\r\n subTitle: _TL_('Average monthly searches'),\r\n series: {\r\n mobile: _TL_('Smartphone'),\r\n total: _TL_('Total'),\r\n },\r\n emptyMsg: [\r\n _TL_('There is not enough data yet to display search volume charts.'),\r\n _TL_('Please try searching for different keywords.'),\r\n ],\r\n },\r\n [SEARCH_VOLUME_CHART_TYPE.BREAKDOWN_BY_DEVICE]: {\r\n id: SEARCH_VOLUME_CHART_TYPE.BREAKDOWN_BY_DEVICE,\r\n text: _TL_('Breakdown by device'),\r\n chartType: 'pie',\r\n subTitle: '',\r\n emptyMsg: [],\r\n },\r\n [SEARCH_VOLUME_CHART_TYPE.BREAKDOWN_BY_LOCATION]: {\r\n id: SEARCH_VOLUME_CHART_TYPE.BREAKDOWN_BY_LOCATION,\r\n text: _TL_('Breakdown by location'),\r\n chartType: 'pie',\r\n subTitle: '',\r\n emptyMsg: [],\r\n },\r\n [SEARCH_VOLUME_CHART_TYPE.COMPARE_TO_COMPETITOR_DOMAINS]: {\r\n id: SEARCH_VOLUME_CHART_TYPE.COMPARE_TO_COMPETITOR_DOMAINS,\r\n text: _TL_('Compare to competitor domains'),\r\n chartType: 'column',\r\n subTitle: _TL_('Ad impression share'),\r\n emptyMsg: [_TL_('Try a different search. We only show competitor domains when there are enough keyword ideas.')],\r\n },\r\n [SEARCH_VOLUME_CHART_TYPE.COMPARE_TO_MARKET_LEADER_DOMAINS]: {\r\n id: SEARCH_VOLUME_CHART_TYPE.COMPARE_TO_MARKET_LEADER_DOMAINS,\r\n text: _TL_('Compare to market leader domains'),\r\n chartType: 'column',\r\n subTitle: _TL_('Ad impression share'),\r\n emptyMsg: [_TL_('Try a different search. We only show market leaders when there are enough keyword ideas.')],\r\n },\r\n};\r\n\r\nexport const trafficEstChartTypeOptions = {\r\n [TRAFFIC_EST_CHART_TYPE.LINE_CHART]: {\r\n id: TRAFFIC_EST_CHART_TYPE.LINE_CHART,\r\n text: null,\r\n chartType: 'line',\r\n subTitle: _TL_('Weekly estimates'),\r\n emptyMsg: [],\r\n },\r\n [TRAFFIC_EST_CHART_TYPE.DEVICE_PIE_CHART]: {\r\n id: TRAFFIC_EST_CHART_TYPE.DEVICE_PIE_CHART,\r\n text: null,\r\n chartType: 'pie',\r\n subTitle: _TL_('Weekly estimates'),\r\n emptyMsg: [_TL_('Please enter a bid between {{min}} and {{max}} in the text box above.')],\r\n },\r\n [TRAFFIC_EST_CHART_TYPE.LOCATION_PIE_CHART]: {\r\n id: TRAFFIC_EST_CHART_TYPE.LOCATION_PIE_CHART,\r\n text: null,\r\n chartType: 'pie',\r\n subTitle: _TL_('Weekly estimates'),\r\n emptyMsg: [_TL_('Please enter a bid between {{min}} and {{max}} in the text box above.')],\r\n },\r\n};\r\n\r\nexport const locationLevelOptions = {\r\n [SEARCH_VOLUME_LOCATION_LEVEL.STATE]: {\r\n id: SEARCH_VOLUME_LOCATION_LEVEL.STATE,\r\n text: _TL_('State/province'),\r\n },\r\n [SEARCH_VOLUME_LOCATION_LEVEL.DMA]: {\r\n id: SEARCH_VOLUME_LOCATION_LEVEL.DMA,\r\n text: _TL_('DMA/metro area'),\r\n },\r\n [SEARCH_VOLUME_LOCATION_LEVEL.CITY]: {\r\n id: SEARCH_VOLUME_LOCATION_LEVEL.CITY,\r\n text: _TL_('City'),\r\n },\r\n [SEARCH_VOLUME_LOCATION_LEVEL.TARGETED]: {\r\n id: SEARCH_VOLUME_LOCATION_LEVEL.TARGETED,\r\n text: _TL_('Targeted locations'),\r\n },\r\n};\r\n\r\nexport const keywordGridOptions = {\r\n [GRID_TYPES.SEARCH_TERM]: {\r\n id: GRID_TYPES.SEARCH_TERM,\r\n text: _TL_('Search terms'),\r\n },\r\n [GRID_TYPES.KEYWORD_IDEA_OUTER]: {\r\n id: GRID_TYPES.KEYWORD_IDEA_OUTER,\r\n text: _TL_('Keyword (by relevance)'),\r\n },\r\n};\r\n\r\nexport const layoutConfig = {\r\n nav: {\r\n mode: LAYOUT_MODE.Hidden,\r\n },\r\n menu: {\r\n mode: LAYOUT_MODE.Hidden,\r\n },\r\n tab: {\r\n mode: LAYOUT_MODE.Hidden,\r\n },\r\n};\r\n\r\nexport const layoutConfigNavRefresh = {\r\n tab: {\r\n mode: LAYOUT_MODE.Collapsed,\r\n singleTabMode: true,\r\n showDatePicker: false,\r\n },\r\n};\r\n\r\nexport const layoutPageConfig = {\r\n [PAGE_TYPES.SEARCH_PAGE]: {\r\n key: 'Results',\r\n text: _TL_('Results'),\r\n defaultGridLevel: GRID_LEVELS.ADGROUP,\r\n },\r\n [PAGE_TYPES.ESTIMATE_PAGE]: {\r\n key: 'Estimates',\r\n text: _TL_('Estimates'),\r\n defaultGridLevel: GRID_LEVELS.ADGROUP_ESTIMATE,\r\n },\r\n};\r\n\r\nexport const deviceTypeConfig = {\r\n [DeviceTypes.Desktop]: _TL_('Computer'),\r\n [DeviceTypes.Mobile]: _TL_('Smartphone'),\r\n [DeviceTypes.Tablet]: _TL_('Tablet'),\r\n};\r\n\r\nconst impreAndClicksOptions = {\r\n compact: 'short',\r\n minimumFractionDigits: 0,\r\n maximumFractionDigits: 2,\r\n};\r\n\r\nconst monetaryOptions = {\r\n compact: 'short',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2,\r\n};\r\n\r\nexport const estButtonOptions = {\r\n [EST_BUTTON_TYPE.CLICKS]: {\r\n id: EST_BUTTON_TYPE.CLICKS,\r\n text: _TL_('Clicks'),\r\n formatOptions: impreAndClicksOptions,\r\n },\r\n [EST_BUTTON_TYPE.IMPRESSONS]: {\r\n id: EST_BUTTON_TYPE.IMPRESSONS,\r\n text: _TL_('Impressions'),\r\n formatOptions: impreAndClicksOptions,\r\n },\r\n [EST_BUTTON_TYPE.SPEND]: {\r\n id: EST_BUTTON_TYPE.SPEND,\r\n text: _TL_('Spend({{currencyCode}})'),\r\n formatOptions: monetaryOptions,\r\n },\r\n};\r\n\r\nexport const estDeviceDropdownOptions = {\r\n [EST_DEVICE_DROPDOWN_TYPE.BID]: {\r\n id: EST_DEVICE_DROPDOWN_TYPE.BID,\r\n text: _TL_('Bid'),\r\n },\r\n [EST_DEVICE_DROPDOWN_TYPE.DEVICE]: {\r\n id: EST_DEVICE_DROPDOWN_TYPE.DEVICE,\r\n text: _TL_('Device'),\r\n },\r\n};\r\n\r\nexport const estDataOptions = {\r\n [EST_DATA_TYPE.CLICKS]: {\r\n id: EST_DATA_TYPE.CLICKS,\r\n text: _TL_('Clicks'),\r\n formatShortOptions: impreAndClicksOptions,\r\n },\r\n [EST_DATA_TYPE.IMPRESSONS]: {\r\n id: EST_DATA_TYPE.IMPRESSONS,\r\n text: _TL_('Impressions'),\r\n formatShortOptions: impreAndClicksOptions,\r\n },\r\n [EST_DATA_TYPE.SPEND]: {\r\n id: EST_DATA_TYPE.SPEND,\r\n text: _TL_('Spend'),\r\n formatShortOptions: monetaryOptions,\r\n },\r\n [EST_DATA_TYPE.MAXCPC]: {\r\n id: EST_DATA_TYPE.MAXCPC,\r\n text: _TL_('Max. CPC'),\r\n },\r\n [EST_DATA_TYPE.SCALED_BID]: {\r\n id: EST_DATA_TYPE.SCALED_BID,\r\n text: _TL_('Scaled bids'),\r\n },\r\n};\r\n\r\n","export const exampleData = [\r\n {\r\n Name: 'Used Car',\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 4550,\r\n AverageCPC: 1000,\r\n CompetitionLevel: 'Low',\r\n },\r\n Suggestions: [\r\n {\r\n Keyword: 'carvana used cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: true,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 308,\r\n AverageCPC: 1000,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'carvana used cars inventory',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: true,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 50,\r\n AverageCPC: 230,\r\n CompetitionLevel: 'High',\r\n },\r\n },\r\n {\r\n Keyword: 'edmunds used cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 50,\r\n AverageCPC: 30,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'truecar used cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 40,\r\n AverageCPC: 40,\r\n CompetitionLevel: 'High',\r\n },\r\n },\r\n {\r\n Keyword: 'used cars near me',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 80,\r\n AverageCPC: 0,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'used cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 40,\r\n AverageCPC: 860,\r\n CompetitionLevel: 'High',\r\n },\r\n },\r\n {\r\n Keyword: 'autotrader used cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 80,\r\n AverageCPC: 901,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'certified used cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 60,\r\n AverageCPC: 3330,\r\n CompetitionLevel: 'High',\r\n },\r\n },\r\n {\r\n Keyword: 'cargurus used cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 990,\r\n AverageCPC: 2220,\r\n CompetitionLevel: 'High',\r\n },\r\n },\r\n {\r\n Keyword: 'cars com used cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 880,\r\n AverageCPC: 1110,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'buy used cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 770,\r\n AverageCPC: 340,\r\n CompetitionLevel: 'High',\r\n },\r\n },\r\n {\r\n Keyword: 'kelley blue book used cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 550,\r\n AverageCPC: 10,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'carmax used cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 660,\r\n AverageCPC: 20,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'carfax used cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 440,\r\n AverageCPC: 30,\r\n CompetitionLevel: 'High',\r\n },\r\n },\r\n {\r\n Keyword: 'bmw used cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 580,\r\n AverageCPC: 900,\r\n CompetitionLevel: 'Medium',\r\n },\r\n },\r\n {\r\n Keyword: 'blue book value used cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 320,\r\n AverageCPC: 102,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'evans halshaw used cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 120,\r\n AverageCPC: 320,\r\n CompetitionLevel: 'Medium',\r\n },\r\n },\r\n {\r\n Keyword: 'used cars ni',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 350,\r\n AverageCPC: 30,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'arnold clark used cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 230,\r\n AverageCPC: 40,\r\n CompetitionLevel: 'Medium',\r\n },\r\n },\r\n ],\r\n },\r\n {\r\n Name: 'Car',\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 450,\r\n AverageCPC: 330,\r\n CompetitionLevel: 'Low',\r\n },\r\n Suggestions: [\r\n {\r\n Keyword: 'new cars 2020',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: true,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 1230,\r\n AverageCPC: 130,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'honda cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: true,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 850,\r\n AverageCPC: 530,\r\n CompetitionLevel: 'Medium',\r\n },\r\n },\r\n {\r\n Keyword: 'pre owned cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 150,\r\n AverageCPC: 630,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'suv cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 9814,\r\n AverageCPC: 220,\r\n CompetitionLevel: 'Medium',\r\n },\r\n },\r\n {\r\n Keyword: 'jaguar cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 465,\r\n AverageCPC: 330,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'disney cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 123,\r\n AverageCPC: 440,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'cazoo cars uk',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 342,\r\n AverageCPC: 770,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'model cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 220,\r\n AverageCPC: 60,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'volvo cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 330,\r\n AverageCPC: 10,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'cars trucks',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 230,\r\n AverageCPC: 10,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'tesla 1 million cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 980,\r\n AverageCPC: 50,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'electric cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 608,\r\n AverageCPC: 60,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'mclaren cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 6850,\r\n AverageCPC: 90,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'cars film 2006',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 5550,\r\n AverageCPC: 100,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'lowrider cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 6660,\r\n AverageCPC: 960,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'sports cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 60,\r\n AverageCPC: 9690,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'japan gas powered cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 70,\r\n AverageCPC: 567890,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'gateway classic cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 30,\r\n AverageCPC: 3333,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'motability cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 50,\r\n AverageCPC: 456,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: '2020 new cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 1230,\r\n AverageCPC: 9999,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'luxury cars',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 77770,\r\n AverageCPC: 11100,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n ],\r\n },\r\n {\r\n Name: 'Used Car Sale',\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 9990,\r\n AverageCPC: 8850,\r\n CompetitionLevel: 'Low',\r\n },\r\n Suggestions: [\r\n {\r\n Keyword: 'used cars sale near me',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car Sale',\r\n Existing: true,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 88880,\r\n AverageCPC: 9620,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'used cars sale',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car Sale',\r\n Existing: true,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 808,\r\n AverageCPC: 4210,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'cheap used cars sale',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car Sale',\r\n Existing: true,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 90,\r\n AverageCPC: 6250,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'used cars sale my area',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car Sale',\r\n Existing: true,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 30,\r\n AverageCPC: 8550,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'used cars sale owner',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car Sale',\r\n Existing: true,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 502,\r\n AverageCPC: 6230,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'used cars sales',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car Sale',\r\n Existing: true,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 560,\r\n AverageCPC: 10000,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'all used cars sale',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Used Car Sale',\r\n Existing: true,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 230,\r\n AverageCPC: 60,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n ],\r\n },\r\n {\r\n Name: 'Car Sale',\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 3890,\r\n AverageCPC: 3330,\r\n CompetitionLevel: 'Low',\r\n },\r\n Suggestions: [\r\n {\r\n Keyword: 'cars sale near me',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car Sale',\r\n Existing: true,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 40,\r\n AverageCPC: 10,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'cars sale',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car Sale',\r\n Existing: true,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 30,\r\n AverageCPC: 20,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'cars sale my area',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car Sale',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 20,\r\n AverageCPC: 30,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'new cars sale',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car Sale',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 120,\r\n AverageCPC: 40,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n {\r\n Keyword: 'cars sale owner',\r\n SourceType: 'SuggestionFromKeyword',\r\n Tag: 'Car Sale',\r\n Existing: false,\r\n AggregateMetric: {\r\n TimePeriod: 'Last12Months',\r\n AverageSearchVolume: 120,\r\n AverageCPC: 560,\r\n CompetitionLevel: 'Low',\r\n },\r\n },\r\n ],\r\n },\r\n];\r\n\r\nexport const searchIdeaExampleData = [{\r\n Aggregations: [{\r\n Keywords: [{\r\n Type: 'Idea',\r\n Index: 0,\r\n Keyword: {\r\n Text: 'carvana used cars',\r\n MatchType: 'Broad',\r\n },\r\n }],\r\n }],\r\n Keywords: [{\r\n Keyword: {\r\n Text: 'carvana used cars',\r\n },\r\n }, {\r\n Keyword: {\r\n Text: 'carvana used cars inventory',\r\n },\r\n }, {\r\n Keyword: {\r\n Text: 'edmunds used cars',\r\n },\r\n }, {\r\n Keyword: {\r\n Text: 'truecar used cars',\r\n },\r\n }, {\r\n Keyword: {\r\n Text: 'used cars near me',\r\n },\r\n }, {\r\n Keyword: {\r\n Text: 'used cars',\r\n },\r\n }, {\r\n Keyword: {\r\n Text: 'autotrader used cars',\r\n },\r\n }, {\r\n Keyword: {\r\n Text: 'certified used cars',\r\n },\r\n }, {\r\n Keyword: {\r\n Text: 'cargurus used cars',\r\n },\r\n }, {\r\n Keyword: {\r\n Text: 'cars com used cars',\r\n },\r\n }, {\r\n Keyword: {\r\n Text: 'buy used cars',\r\n },\r\n }, {\r\n Keyword: {\r\n Text: 'kelley blue book used cars',\r\n },\r\n }, {\r\n Keyword: {\r\n Text: 'carmax used cars',\r\n },\r\n }],\r\n}];\r\n","import _ from 'underscore';\r\nimport $ from 'jquery';\r\nimport Promise from 'bluebird';\r\nimport queryString from 'query-string';\r\nimport { useContext } from 'react';\r\nimport { notificationApi } from '@bingads-webui-react/notification-center';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { PermissionsContext } from '@bingads-webui-react/hoc-with-permissions';\r\n\r\nimport {\r\n isJsonEqual,\r\n formatFilters,\r\n formatLandingPageURL,\r\n formatTargetings,\r\n formatProducts,\r\n formatUrl,\r\n formatPeriod,\r\n formatTrafficEstimateNegatieKeywords,\r\n getOptions,\r\n getRequestSupportedLocaleId,\r\n redirectToLogin,\r\n formatIdeaOverviews,\r\n formatAdGroupTrafficEstimateParameters,\r\n formatLocationLevels,\r\n normalizeTrafficEstimate,\r\n} from './util';\r\nimport { defaultIdeaAttributes, defaultIdeaAggregations, defaultDevicesTypeIds } from './config';\r\nimport {\r\n CONTROL_TYPES,\r\n IDEA_DATE_RANGE_DATA_TYPE,\r\n LANDSCAPE_TYPES\r\n} from './consts';\r\nimport { searchIdeaExampleData } from '../mock/mock-data';\r\n\r\nconst urlPrefix = 'AdInsight/V2/Customers({cid})/Accounts({aid})';\r\nconst urlPrefixLocation = 'Advertiser/V2/Customers({cid})/Accounts({aid})';\r\nconst getAvailableDateRangeAPI = `${urlPrefix}/Default.IdeaDataRanges`;\r\nconst getIdeaCategoryDataAPI = `${urlPrefix}/Default.IdeaCategories?$expand=SubCategories($levels=max)`;\r\nconst getSearchIdeaAPI = `${urlPrefix}/Default.SuggestionPerformanceIdeas`;\r\nconst getTrafficEstimateAPI = `${urlPrefix}/Default.CampaignTrafficEstimateMultifunction?$expand=AdGroupEstimatedTraffics($expand=KeywordEstimatedTraffics)`;\r\nconst getLocationsAPI = `${urlPrefixLocation}/Locations`;\r\n\r\nexport const useKeywordPlannerService = () => {\r\n const i18n = useContext(I18nContext);\r\n const serverContext = useContext(ServerContext);\r\n const { scope: { values: scopeValues } } = useContext(ScopeContext);\r\n const permissions = useContext(PermissionsContext);\r\n const {\r\n CurrentUser: { LocaleID: lcid },\r\n CurrentLocale: locale,\r\n ServicesEndpoints: { AdInsightAPI: odataPath, CampaignAPI: odataCampaignPath },\r\n Token: token,\r\n } = serverContext;\r\n let lastSearchIdeaRequestBody = null; // memorize last input to compare with the new one\r\n let lastTrafficEstimateRequestBody = null; // memorize last input to compare with the new on\r\n\r\n const handleAjaxError = (err) => {\r\n // TODO: log\r\n if (err.status === 401) {\r\n redirectToLogin(err);\r\n }\r\n notificationApi.showWarning(i18n.getString(_TL_('We\\'ve encountered an error and can\\'t continue. Please contact support for further assistance.')));\r\n };\r\n\r\n const generateGetAvailableDateRangeRequest = () => {\r\n const data = {\r\n datatype: IDEA_DATE_RANGE_DATA_TYPE.SEARCH_VOLUME,\r\n };\r\n const option = getOptions({\r\n token,\r\n lcid,\r\n data,\r\n });\r\n\r\n option.url = formatUrl({ url: `${odataPath}${getAvailableDateRangeAPI}`, scopeValues });\r\n return option;\r\n };\r\n\r\n const getAvailableDateRange = () => {\r\n const option = generateGetAvailableDateRangeRequest();\r\n if (!option) {\r\n return Promise.resolve({ data: [] });\r\n }\r\n const fetchDataPromise = new Promise((resolve, reject) => {\r\n $.ajax(option).then((rawData) => {\r\n resolve(rawData);\r\n }, reject);\r\n });\r\n\r\n return fetchDataPromise.then(\r\n rawData => ({ data: rawData }),\r\n (err) => {\r\n handleAjaxError(err);\r\n return {};\r\n }\r\n );\r\n };\r\n\r\n const generateGetIdeaCategoryDataRequest = () => {\r\n const option = getOptions({\r\n token,\r\n lcid,\r\n });\r\n\r\n option.url = formatUrl({ url: `${odataPath}${getIdeaCategoryDataAPI}`, scopeValues });\r\n return option;\r\n };\r\n\r\n const getIdeaCategoryData = () => {\r\n const option = generateGetIdeaCategoryDataRequest();\r\n if (!option) {\r\n return Promise.resolve({ data: [] });\r\n }\r\n const fetchDataPromise = new Promise((resolve, reject) => {\r\n $.ajax(option).then((rawData) => {\r\n resolve(rawData);\r\n }, reject);\r\n });\r\n\r\n return fetchDataPromise.then(\r\n rawData => ({ data: rawData }),\r\n (err) => {\r\n handleAjaxError(err);\r\n return {};\r\n }\r\n );\r\n };\r\n\r\n const generateGetSearchIdeaRequestRequest = ({\r\n model, mergeLocation = false, useCategoryFilter = false, isLanguageDecoupling = false, channel,\r\n }) => {\r\n // undefined property will be removed by stringify\r\n const products = formatProducts(model);\r\n const isCategoryFilter =\r\n !_.isEmpty(products) || !_.isEmpty(model[CONTROL_TYPES.LANDING_PAGE].url);\r\n // When language decoupling is enabled in search volumne, we don't need to send language in the request body.\r\n const isLanguageSkipped = isLanguageDecoupling && !model.isIdeas;\r\n const data = {\r\n SearchIdeaParameter: {\r\n IsIdeas: model.isIdeas,\r\n Products: products,\r\n LandingPage: model[CONTROL_TYPES.LANDING_PAGE].url ?\r\n formatLandingPageURL(model[CONTROL_TYPES.LANDING_PAGE]) : undefined,\r\n CategoryId: model[CONTROL_TYPES.CATEGORY].categoryId && !isCategoryFilter ?\r\n Number(model[CONTROL_TYPES.CATEGORY].categoryId) : undefined,\r\n Targetings: formatTargetings(model, isLanguageDecoupling, isLanguageSkipped),\r\n Filters: formatFilters({\r\n model,\r\n scopeValues,\r\n isCategoryFilter: useCategoryFilter && isCategoryFilter,\r\n }),\r\n PeriodSetting: formatPeriod(model),\r\n IdeaOverviews: formatIdeaOverviews(model, mergeLocation),\r\n IdeaAttributes: mergeLocation ? undefined : defaultIdeaAttributes,\r\n IdeaAggregations: mergeLocation ? undefined : defaultIdeaAggregations,\r\n Locale: getRequestSupportedLocaleId({ localeString: locale }),\r\n },\r\n };\r\n const option = getOptions({\r\n token,\r\n lcid,\r\n data,\r\n channel,\r\n });\r\n\r\n option.url = formatUrl({ url: `${odataPath}${getSearchIdeaAPI}`, scopeValues });\r\n return option;\r\n };\r\n\r\n const getSearchIdea = ({\r\n model, mergeLocation, useCategoryFilter = true, isLanguageDecoupling = false, channel,\r\n }) => {\r\n const option = generateGetSearchIdeaRequestRequest({\r\n model,\r\n mergeLocation,\r\n useCategoryFilter,\r\n isLanguageDecoupling,\r\n channel,\r\n });\r\n\r\n // if request body is the same, don't send duplicated MT request\r\n if (isJsonEqual(lastSearchIdeaRequestBody, option.data)) {\r\n return Promise.resolve({ isDirty: false });\r\n }\r\n lastSearchIdeaRequestBody = option.data;\r\n\r\n let fetchDataPromise = null;\r\n if (window.e2eTestEnvironment) {\r\n fetchDataPromise = Promise.resolve({\r\n rawData: { value: searchIdeaExampleData },\r\n jqXHR: { getResponseHeader: () => '' },\r\n });\r\n } else {\r\n fetchDataPromise = new Promise((resolve, reject) => {\r\n $.ajax(option).then((rawData, _textStatus, jqXHR) => {\r\n resolve({ rawData, jqXHR });\r\n }, reject);\r\n });\r\n }\r\n\r\n return fetchDataPromise.then(\r\n ({ rawData, jqXHR }) => ({\r\n data: rawData,\r\n isDirty: true,\r\n traceInfo: {\r\n requestId: jqXHR ? jqXHR.getResponseHeader('x-ms-requestid') : '',\r\n trackId: jqXHR ? jqXHR.getResponseHeader('x-ms-trackingid') : '',\r\n locationId: _.pluck(model[CONTROL_TYPES.LOCATION], 'id'),\r\n },\r\n }),\r\n (err) => {\r\n handleAjaxError(err);\r\n throw (err);\r\n }\r\n );\r\n };\r\n\r\n const generateGetSearchLocationsRequest = (search) => {\r\n const data = {\r\n $search: search,\r\n $top: 20,\r\n $count: true,\r\n $expand: 'ParentLocations',\r\n };\r\n const option = getOptions({\r\n token,\r\n lcid,\r\n });\r\n\r\n const url = formatUrl({ url: `${odataCampaignPath}${getLocationsAPI}`, scopeValues });\r\n option.url = `${url}?${queryString.stringify(data)}`;\r\n return option;\r\n };\r\n\r\n const getSearchLocations = (text) => {\r\n const option = generateGetSearchLocationsRequest(text);\r\n if (!option) {\r\n return Promise.resolve({ data: [] });\r\n }\r\n\r\n const fetchDataPromise = new Promise((resolve, reject) => {\r\n $.ajax(option).then((rawData) => {\r\n resolve(rawData);\r\n }, reject);\r\n });\r\n\r\n return fetchDataPromise.then(\r\n rawData => ({ data: rawData }),\r\n (err) => {\r\n handleAjaxError(err);\r\n return {};\r\n }\r\n );\r\n };\r\n\r\n const generateGetTrafficEstimateRequest = (model) => {\r\n const {\r\n AdGroupTrafficEstimateParameters,\r\n scaleLandScape,\r\n requestLandscape,\r\n } = formatAdGroupTrafficEstimateParameters(model);\r\n const isLanguageDecoupling = !permissions.IsDomesticSimplifiedChineseEnabled;\r\n const isLanguageSkipped = isLanguageDecoupling;\r\n const data = {\r\n CampaignTrafficEstimate: {\r\n Locale: getRequestSupportedLocaleId({ localeString: locale }),\r\n Budget: model[CONTROL_TYPES.TRAFFIC_ESTIMATE_BUDGET] ?\r\n model[CONTROL_TYPES.TRAFFIC_ESTIMATE_BUDGET] : undefined,\r\n NegativeKeywords: formatTrafficEstimateNegatieKeywords(model),\r\n Targetings: formatTargetings(model, isLanguageDecoupling, isLanguageSkipped),\r\n DevicesTypeIds: model[CONTROL_TYPES.TRAFFIC_ESTIMATE_BID] ?\r\n defaultDevicesTypeIds : undefined,\r\n LocationLevels: model[CONTROL_TYPES.TRAFFIC_ESTIMATE_BID] ?\r\n formatLocationLevels(model) : undefined,\r\n LandscapeEstimateParameters: requestLandscape ?\r\n [{ LandscapeType: (scaleLandScape && LANDSCAPE_TYPES.SCALE) || LANDSCAPE_TYPES.BID }] :\r\n undefined,\r\n AdGroupTrafficEstimateParameters,\r\n },\r\n };\r\n const option = getOptions({\r\n token,\r\n lcid,\r\n data,\r\n });\r\n\r\n option.url = formatUrl({ url: `${odataPath}${getTrafficEstimateAPI}`, scopeValues });\r\n return option;\r\n };\r\n\r\n const getTrafficEstimate = ({ model, mergeLocation }) => {\r\n const option = generateGetTrafficEstimateRequest(model, mergeLocation);\r\n if (!option) {\r\n return Promise.resolve({ data: [] });\r\n }\r\n\r\n // if keyword is empty, don't send request\r\n if (_.isEmpty(model[CONTROL_TYPES.TRAFFIC_ESTIMATE_ADGROUP_KEYWORDS])) {\r\n lastTrafficEstimateRequestBody = null;\r\n return Promise.resolve({\r\n data: normalizeTrafficEstimate({\r\n model,\r\n rawData: { value: [{}] },\r\n i18n,\r\n }),\r\n isDirty: true,\r\n });\r\n }\r\n // if request body is the same, don't send duplicated MT request\r\n if (isJsonEqual(lastTrafficEstimateRequestBody, option.data)) {\r\n return Promise.resolve({ isDirty: false });\r\n }\r\n lastTrafficEstimateRequestBody = option.data;\r\n\r\n const fetchDataPromise = new Promise((resolve, reject) => {\r\n $.ajax(option).then((rawData, _textStatus, jqXHR) => {\r\n resolve({ rawData, jqXHR });\r\n }, reject);\r\n });\r\n\r\n return fetchDataPromise.then(\r\n ({ rawData, jqXHR }) => ({\r\n data: normalizeTrafficEstimate({\r\n model,\r\n rawData,\r\n i18n,\r\n }),\r\n isDirty: true,\r\n traceInfo: {\r\n requestId: jqXHR.getResponseHeader('x-ms-requestid'),\r\n trackId: jqXHR.getResponseHeader('x-ms-trackingid'),\r\n locationId: _.pluck(model[CONTROL_TYPES.LOCATION], 'id'),\r\n },\r\n }),\r\n (err) => {\r\n handleAjaxError(err);\r\n return {};\r\n }\r\n );\r\n };\r\n\r\n return {\r\n getAvailableDateRange,\r\n getIdeaCategoryData,\r\n getSearchIdea,\r\n getSearchLocations,\r\n getTrafficEstimate,\r\n };\r\n};\r\n","import {\r\n LANGUAGE_TYPES,\r\n LANDING_PAGE_OPTIONS,\r\n} from './consts';\r\n\r\nexport const KRTLocations = {\r\n [LANGUAGE_TYPES.ENGLISH]: [\r\n {\r\n id: 4,\r\n name: _TL_('American Samoa'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 158,\r\n name: _TL_('Anguilla'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 7,\r\n name: _TL_('Antigua and Barbuda'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 205,\r\n name: _TL_('Armenia'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 131,\r\n name: _TL_('Aruba'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 203,\r\n name: _TL_('Azerbaijan'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 11,\r\n name: _TL_('Bahamas'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 204,\r\n name: _TL_('Bahrain'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 12,\r\n name: _TL_('Bangladesh'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 13,\r\n name: _TL_('Barbados'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 21,\r\n name: _TL_('Belize'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 15,\r\n name: _TL_('Bermuda'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 18,\r\n name: _TL_('Botswana'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 24,\r\n name: _TL_('British Virgin Islands'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 25,\r\n name: _TL_('Brunei'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 34,\r\n name: _TL_('Cayman Islands'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 35,\r\n name: _TL_('Central African Republic'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 41,\r\n name: _TL_('Christmas Island'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 42,\r\n name: _TL_('Cocos (Keeling) Islands'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 47,\r\n name: _TL_('Cook Islands'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 69,\r\n name: _TL_('Djibouti'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 54,\r\n name: _TL_('Dominica'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 187,\r\n name: _TL_('Egypt'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 59,\r\n name: _TL_('Ethiopia'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 60,\r\n name: _TL_('Eritrea'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 62,\r\n name: _TL_('Faroe Islands'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 199,\r\n name: _TL_('Fiji'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 208,\r\n name: _TL_('Georgia'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 74,\r\n name: _TL_('Gibraltar'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 76,\r\n name: _TL_('Greece'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 77,\r\n name: _TL_('Greenland'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 78,\r\n name: _TL_('Grenada'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 80,\r\n name: _TL_('Guam'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 153,\r\n name: _TL_('Guinea-Bissau'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 83,\r\n name: _TL_('Guyana'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 90,\r\n name: _TL_('India'),\r\n landingPage: LANDING_PAGE_OPTIONS.All,\r\n },\r\n {\r\n id: 91,\r\n name: _TL_('Indonesia'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 228,\r\n name: _TL_('Iraq'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 92,\r\n name: _TL_('Ireland'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 93,\r\n name: _TL_('Italy'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 95,\r\n name: _TL_('Jamaica'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 101,\r\n name: _TL_('Kyrgyzstan'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 103,\r\n name: _TL_('Lesotho'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 106,\r\n name: _TL_('Libya'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 111,\r\n name: _TL_('Malawi'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 112,\r\n name: _TL_('Malaysia'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 113,\r\n name: _TL_('Maldives'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 142,\r\n name: _TL_('Marshall Islands'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 118,\r\n name: _TL_('Mauritius'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 121,\r\n name: _TL_('Mongolia'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 122,\r\n name: _TL_('Moldova'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 123,\r\n name: _TL_('Montserrat'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 126,\r\n name: _TL_('Namibia'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 127,\r\n name: _TL_('Nauru'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 128,\r\n name: _TL_('Nepal'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 129,\r\n name: _TL_('Netherlands'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 134,\r\n name: _TL_('New Zealand'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 137,\r\n name: _TL_('Nigeria'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 223,\r\n name: _TL_('Niue'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 138,\r\n name: _TL_('Norfolk Island'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 140,\r\n name: _TL_('Northern Mariana Islands'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 214,\r\n name: _TL_('Oman'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 144,\r\n name: _TL_('Pakistan'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 143,\r\n name: _TL_('Palau'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 146,\r\n name: _TL_('Papua New Guinea'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 149,\r\n name: _TL_('Philippines'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 150,\r\n name: _TL_('Pitcairn Islands'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 215,\r\n name: _TL_('Qatar'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 157,\r\n name: _TL_('Rwanda'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 230,\r\n name: _TL_('Saint Kitts and Nevis'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 231,\r\n name: _TL_('Saint Lucia'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 233,\r\n name: _TL_('Saint Vincent and the Grenadines'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 195,\r\n name: _TL_('Samoa'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 162,\r\n name: _TL_('Seychelles'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 163,\r\n name: _TL_('Sierra Leone'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 164,\r\n name: _TL_('Singapore'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 225,\r\n name: _TL_('Somalia'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 168,\r\n name: _TL_('South Africa'),\r\n landingPage: LANDING_PAGE_OPTIONS.All,\r\n },\r\n {\r\n id: 170,\r\n name: _TL_('Spain'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 36,\r\n name: _TL_('Sri Lanka'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 172,\r\n name: _TL_('Suriname'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 174,\r\n name: _TL_('Sweden'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 175,\r\n name: _TL_('Switzerland'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 176,\r\n name: _TL_('Tajikistan'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 189,\r\n name: _TL_('Tanzania'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 177,\r\n name: _TL_('Thailand'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 71,\r\n name: _TL_('The Gambia'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 179,\r\n name: _TL_('Tokelau'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 180,\r\n name: _TL_('Tonga'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 181,\r\n name: _TL_('Trinidad and Tobago'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 184,\r\n name: _TL_('Turks and Caicos Islands'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 234,\r\n name: _TL_('Tuvalu'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 185,\r\n name: _TL_('Uganda'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 218,\r\n name: _TL_('United Arab Emirates'),\r\n landingPage: LANDING_PAGE_OPTIONS.All,\r\n },\r\n {\r\n id: 237,\r\n name: _TL_('United States Virgin Islands'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 133,\r\n name: _TL_('Vanuatu'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 166,\r\n name: _TL_('Vietnam'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 196,\r\n name: _TL_('Zambia'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 169,\r\n name: _TL_('Zimbabwe'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n }],\r\n [LANGUAGE_TYPES.FRENCH]: [{\r\n id: 3,\r\n name: _TL_('Algeria'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 5,\r\n name: _TL_('Andorra'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 14,\r\n name: _TL_('Belgium'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 52,\r\n name: _TL_('Benin'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 191,\r\n name: _TL_('Burkina Faso'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 31,\r\n name: _TL_('Cameroon'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 35,\r\n name: _TL_('Central African Republic'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 226,\r\n name: _TL_('Comoros'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 94,\r\n name: _TL_('Cote d\\'Ivoire'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 46,\r\n name: _TL_('Democratic Republic of the Congo'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 69,\r\n name: _TL_('Djibouti'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 1279,\r\n name: _TL_('French Guiana'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 1292,\r\n name: _TL_('French Polynesia'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 70,\r\n name: _TL_('Gabon'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 79,\r\n name: _TL_('Guadeloupe'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 82,\r\n name: _TL_('Guinea'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 84,\r\n name: _TL_('Haiti'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 109,\r\n name: _TL_('Luxembourg'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 110,\r\n name: _TL_('Madagascar'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 116,\r\n name: _TL_('Martinique'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 117,\r\n name: _TL_('Mauritania'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 1303,\r\n name: _TL_('Mayotte'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 120,\r\n name: _TL_('Monaco'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 1289,\r\n name: _TL_('New Caledonia'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 136,\r\n name: _TL_('Niger'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 45,\r\n name: _TL_('Republic of Congo'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 155,\r\n name: _TL_('Reunion'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 1293,\r\n name: _TL_('Saint Pierre and Miquelon'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 161,\r\n name: _TL_('Senegal'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 175,\r\n name: _TL_('Switzerland'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 178,\r\n name: _TL_('Togo'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 227,\r\n name: _TL_('Tunisia'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 1302,\r\n name: _TL_('Wallis and Futuna'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n }],\r\n [LANGUAGE_TYPES.GERMAN]: [{\r\n id: 10,\r\n name: _TL_('Austria'),\r\n landingPage: LANDING_PAGE_OPTIONS.All,\r\n },\r\n {\r\n id: 107,\r\n name: _TL_('Liechtenstein'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 109,\r\n name: _TL_('Luxembourg'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 175,\r\n name: _TL_('Switzerland'),\r\n landingPage: LANDING_PAGE_OPTIONS.All,\r\n }],\r\n [LANGUAGE_TYPES.SPANISH]: [{\r\n id: 170,\r\n name: _TL_('Spain'),\r\n landingPage: LANDING_PAGE_OPTIONS.All,\r\n },\r\n {\r\n id: 8,\r\n name: _TL_('Argentina'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 17,\r\n name: _TL_('Bolivia'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 38,\r\n name: _TL_('Chile'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 43,\r\n name: _TL_('Colombia'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 48,\r\n name: _TL_('Costa Rica'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 55,\r\n name: _TL_('Dominican Republic'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 56,\r\n name: _TL_('Ecuador'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 57,\r\n name: _TL_('El Salvador'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 81,\r\n name: _TL_('Guatemala'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 87,\r\n name: _TL_('Honduras'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 119,\r\n name: _TL_('Mexico'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 145,\r\n name: _TL_('Panama'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 147,\r\n name: _TL_('Paraguay'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 148,\r\n name: _TL_('Peru'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 154,\r\n name: _TL_('Puerto Rico'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 190,\r\n name: _TL_('United States'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 192,\r\n name: _TL_('Uruguay'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 202,\r\n name: _TL_('Venezuela'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n }],\r\n [LANGUAGE_TYPES.TRADITIONAL_CHINESE]: [{\r\n id: 40,\r\n name: _TL_('Taiwan'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 200,\r\n name: _TL_('Hong Kong SAR'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 201,\r\n name: _TL_('Macao SAR'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n }],\r\n [LANGUAGE_TYPES.DUTCH]: [{\r\n id: 129,\r\n name: _TL_('Netherlands'),\r\n landingPage: LANDING_PAGE_OPTIONS.All,\r\n },\r\n {\r\n id: 14,\r\n name: _TL_('Belgium'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n }],\r\n [LANGUAGE_TYPES.DANISH]: [{\r\n id: 53,\r\n name: _TL_('Denmark'),\r\n landingPage: LANDING_PAGE_OPTIONS.All,\r\n }],\r\n [LANGUAGE_TYPES.SWEDISH]: [{\r\n id: 174,\r\n name: _TL_('Sweden'),\r\n landingPage: LANDING_PAGE_OPTIONS.All,\r\n }],\r\n [LANGUAGE_TYPES.NORWEGIAN]: [{\r\n id: 139,\r\n name: _TL_('Norway'),\r\n landingPage: LANDING_PAGE_OPTIONS.All,\r\n }],\r\n [LANGUAGE_TYPES.FINNISH]: [{\r\n id: 65,\r\n name: _TL_('Finland'),\r\n landingPage: LANDING_PAGE_OPTIONS.All,\r\n }],\r\n [LANGUAGE_TYPES.ITALIAN]: [{\r\n id: 93,\r\n name: _TL_('Italy'),\r\n landingPage: LANDING_PAGE_OPTIONS.All,\r\n },\r\n {\r\n id: 159,\r\n name: _TL_('San Marino'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 86,\r\n name: _TL_('Vatican City'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n }],\r\n [LANGUAGE_TYPES.PORTUGUESE]: [{\r\n id: 152,\r\n name: _TL_('Portugal'),\r\n landingPage: LANDING_PAGE_OPTIONS.All,\r\n },\r\n {\r\n id: 20,\r\n name: _TL_('Brazil'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 153,\r\n name: _TL_('Guinea-Bissau'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n }],\r\n [LANGUAGE_TYPES.CZECH]: [{\r\n id: 51,\r\n name: _TL_('Czech Republic'),\r\n landingPage: LANDING_PAGE_OPTIONS.All,\r\n }],\r\n [LANGUAGE_TYPES.POLISH]: [{\r\n id: 151,\r\n name: _TL_('Poland'),\r\n landingPage: LANDING_PAGE_OPTIONS.All,\r\n }],\r\n [LANGUAGE_TYPES.ROMANIAN]: [{\r\n id: 224,\r\n name: _TL_('Romania'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n }],\r\n [LANGUAGE_TYPES.HUNGARIAN]: [{\r\n id: 88,\r\n name: _TL_('Hungary'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n }],\r\n [LANGUAGE_TYPES.GREEK]: [{\r\n id: 76,\r\n name: _TL_('Greece'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 206,\r\n name: _TL_('Cyprus'),\r\n landingPage: LANDING_PAGE_OPTIONS.K2K,\r\n }],\r\n [LANGUAGE_TYPES.SLOVAK]: [{\r\n id: 165,\r\n name: _TL_('Slovakia'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n }],\r\n [LANGUAGE_TYPES.MALTESE]: [{\r\n id: 115,\r\n name: _TL_('Malta'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n }],\r\n [LANGUAGE_TYPES.BULGARIAN]: [{\r\n id: 26,\r\n name: _TL_('Bulgaria'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n }],\r\n [LANGUAGE_TYPES.CROATIAN]: [{\r\n id: 49,\r\n name: _TL_('Croatia'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n }],\r\n [LANGUAGE_TYPES.LITHUANIAN]: [{\r\n id: 108,\r\n name: _TL_('Lithuania'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n }],\r\n [LANGUAGE_TYPES.SLOVENIAN]: [{\r\n id: 167,\r\n name: _TL_('Slovenia'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n }],\r\n [LANGUAGE_TYPES.ESTONIAN]: [{\r\n id: 61,\r\n name: _TL_('Estonia'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n }],\r\n [LANGUAGE_TYPES.LATVIAN]: [{\r\n id: 104,\r\n name: _TL_('Latvia'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n }],\r\n [LANGUAGE_TYPES.ALBANIAN]: [{\r\n id: 1,\r\n name: _TL_('Albania'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n }],\r\n [LANGUAGE_TYPES.BOSNIAN]: [{\r\n id: 198,\r\n name: _TL_('Bosnia and Herzegovina'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n }],\r\n [LANGUAGE_TYPES.ICELANDIC]: [{\r\n id: 89,\r\n name: _TL_('Iceland'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n }],\r\n [LANGUAGE_TYPES.MACEDONIAN]: [{\r\n id: 186,\r\n name: _TL_('Republic of North Macedonia'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n }],\r\n [LANGUAGE_TYPES.RUSSIAN]: [{\r\n id: 101,\r\n name: _TL_('Kyrgyzstan'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n }],\r\n [LANGUAGE_TYPES.SERBIAN]: [{\r\n id: 4993,\r\n name: _TL_('Serbia'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 4994,\r\n name: _TL_('Montenegro'),\r\n landingPage: LANDING_PAGE_OPTIONS.K2K,\r\n }],\r\n [LANGUAGE_TYPES.TURKISH]: [{\r\n id: 182,\r\n name: _TL_('Turkey'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n }],\r\n [LANGUAGE_TYPES.JAPANESE]: [{\r\n id: 96,\r\n name: _TL_('Japan'),\r\n landingPage: LANDING_PAGE_OPTIONS.All,\r\n }],\r\n [LANGUAGE_TYPES.ARABIC]: [{\r\n id: 216,\r\n name: _TL_('Saudi Arabia'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n },\r\n {\r\n id: 69,\r\n name: _TL_('Djibouti'),\r\n landingPage: LANDING_PAGE_OPTIONS.K2K,\r\n },\r\n {\r\n id: 226,\r\n name: _TL_('Comoros'),\r\n landingPage: LANDING_PAGE_OPTIONS.K2K,\r\n }, {\r\n id: 219,\r\n name: _TL_('Yemen'),\r\n landingPage: LANDING_PAGE_OPTIONS.K2K,\r\n }],\r\n [LANGUAGE_TYPES.HEBREW]: [{\r\n id: 210,\r\n name: _TL_('Israel'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n }],\r\n [LANGUAGE_TYPES.TAGALOG]: [{\r\n id: 149,\r\n name: _TL_('Philippines'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n }],\r\n [LANGUAGE_TYPES.HINDI]: [{\r\n id: 90,\r\n name: _TL_('India'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n }],\r\n [LANGUAGE_TYPES.MALAY]: [{\r\n id: 112,\r\n name: _TL_('Malaysia'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n }],\r\n [LANGUAGE_TYPES.INDONESIAN]: [{\r\n id: 91,\r\n name: _TL_('Indonesia'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n }],\r\n [LANGUAGE_TYPES.VIETNAMESE]: [{\r\n id: 166,\r\n name: _TL_('Vietnam'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n }],\r\n [LANGUAGE_TYPES.THAI]: [{\r\n id: 177,\r\n name: _TL_('Thailand'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n }],\r\n};\r\n\r\nexport const KRTLocationsCN = {\r\n [LANGUAGE_TYPES.SIMPLIFIED_CHINESE]: [{\r\n id: 39,\r\n name: _TL_('China'),\r\n landingPage: LANDING_PAGE_OPTIONS.U2K,\r\n }],\r\n};\r\n\r\nexport const KPLocations = [\r\n {\r\n id: 1,\r\n name: _TL_('Albania'),\r\n },\r\n {\r\n id: 3,\r\n name: _TL_('Algeria'),\r\n },\r\n {\r\n id: 4,\r\n name: _TL_('American Samoa'),\r\n },\r\n {\r\n id: 5,\r\n name: _TL_('Andorra'),\r\n },\r\n {\r\n id: 158,\r\n name: _TL_('Anguilla'),\r\n },\r\n {\r\n id: 7,\r\n name: _TL_('Antigua and Barbuda'),\r\n },\r\n {\r\n id: 8,\r\n name: _TL_('Argentina'),\r\n },\r\n {\r\n id: 205,\r\n name: _TL_('Armenia'),\r\n },\r\n {\r\n id: 131,\r\n name: _TL_('Aruba'),\r\n },\r\n {\r\n id: 9,\r\n name: _TL_('Australia'),\r\n landingPageAll: [LANGUAGE_TYPES.ENGLISH, LANGUAGE_TYPES.GERMAN, LANGUAGE_TYPES.FRENCH],\r\n },\r\n {\r\n id: 10,\r\n name: _TL_('Austria'),\r\n landingPageAll: [LANGUAGE_TYPES.GERMAN],\r\n },\r\n {\r\n id: 203,\r\n name: _TL_('Azerbaijan'),\r\n },\r\n {\r\n id: 11,\r\n name: _TL_('Bahamas'),\r\n },\r\n {\r\n id: 204,\r\n name: _TL_('Bahrain'),\r\n },\r\n {\r\n id: 12,\r\n name: _TL_('Bangladesh'),\r\n },\r\n {\r\n id: 13,\r\n name: _TL_('Barbados'),\r\n },\r\n {\r\n id: 14,\r\n name: _TL_('Belgium'),\r\n },\r\n {\r\n id: 21,\r\n name: _TL_('Belize'),\r\n },\r\n {\r\n id: 52,\r\n name: _TL_('Benin'),\r\n },\r\n {\r\n id: 15,\r\n name: _TL_('Bermuda'),\r\n },\r\n {\r\n id: 17,\r\n name: _TL_('Bolivia'),\r\n },\r\n {\r\n id: 198,\r\n name: _TL_('Bosnia and Herzegovina'),\r\n },\r\n {\r\n id: 18,\r\n name: _TL_('Botswana'),\r\n },\r\n {\r\n id: 20,\r\n name: _TL_('Brazil'),\r\n },\r\n {\r\n id: 24,\r\n name: _TL_('British Virgin Islands'),\r\n },\r\n {\r\n id: 25,\r\n name: _TL_('Brunei'),\r\n },\r\n {\r\n id: 26,\r\n name: _TL_('Bulgaria'),\r\n },\r\n {\r\n id: 191,\r\n name: _TL_('Burkina Faso'),\r\n },\r\n {\r\n id: 31,\r\n name: _TL_('Cameroon'),\r\n },\r\n {\r\n id: 32,\r\n name: _TL_('Canada'),\r\n landingPageAll: [LANGUAGE_TYPES.ENGLISH, LANGUAGE_TYPES.GERMAN, LANGUAGE_TYPES.FRENCH],\r\n },\r\n {\r\n id: 34,\r\n name: _TL_('Cayman Islands'),\r\n },\r\n {\r\n id: 35,\r\n name: _TL_('Central African Republic'),\r\n },\r\n {\r\n id: 38,\r\n name: _TL_('Chile'),\r\n },\r\n {\r\n id: 41,\r\n name: _TL_('Christmas Island'),\r\n },\r\n {\r\n id: 42,\r\n name: _TL_('Cocos (Keeling) Islands'),\r\n },\r\n {\r\n id: 43,\r\n name: _TL_('Colombia'),\r\n },\r\n {\r\n id: 226,\r\n name: _TL_('Comoros'),\r\n },\r\n {\r\n id: 47,\r\n name: _TL_('Cook Islands'),\r\n },\r\n {\r\n id: 48,\r\n name: _TL_('Costa Rica'),\r\n },\r\n {\r\n id: 94,\r\n name: _TL_('Cote d\\'Ivoire'),\r\n },\r\n {\r\n id: 49,\r\n name: _TL_('Croatia'),\r\n },\r\n {\r\n id: 206,\r\n name: _TL_('Cyprus'),\r\n },\r\n {\r\n id: 51,\r\n name: _TL_('Czech Republic'),\r\n landingPageAll: [LANGUAGE_TYPES.CZECH],\r\n },\r\n {\r\n id: 46,\r\n name: _TL_('Democratic Republic of the Congo'),\r\n },\r\n {\r\n id: 53,\r\n name: _TL_('Denmark'),\r\n landingPageAll: [LANGUAGE_TYPES.DANISH],\r\n },\r\n {\r\n id: 69,\r\n name: _TL_('Djibouti'),\r\n },\r\n {\r\n id: 54,\r\n name: _TL_('Dominica'),\r\n },\r\n {\r\n id: 55,\r\n name: _TL_('Dominican Republic'),\r\n },\r\n {\r\n id: 56,\r\n name: _TL_('Ecuador'),\r\n },\r\n {\r\n id: 187,\r\n name: _TL_('Egypt'),\r\n },\r\n {\r\n id: 57,\r\n name: _TL_('El Salvador'),\r\n },\r\n {\r\n id: 61,\r\n name: _TL_('Estonia'),\r\n },\r\n {\r\n id: 59,\r\n name: _TL_('Ethiopia'),\r\n },\r\n {\r\n id: 60,\r\n name: _TL_('Eritrea'),\r\n },\r\n {\r\n id: 62,\r\n name: _TL_('Faroe Islands'),\r\n },\r\n {\r\n id: 199,\r\n name: _TL_('Fiji'),\r\n },\r\n {\r\n id: 65,\r\n name: _TL_('Finland'),\r\n landingPageAll: [LANGUAGE_TYPES.FINNISH],\r\n },\r\n {\r\n id: 66,\r\n name: _TL_('France'),\r\n landingPageAll: [LANGUAGE_TYPES.ENGLISH, LANGUAGE_TYPES.GERMAN, LANGUAGE_TYPES.FRENCH],\r\n },\r\n {\r\n id: 1279,\r\n name: _TL_('French Guiana'),\r\n },\r\n {\r\n id: 1292,\r\n name: _TL_('French Polynesia'),\r\n },\r\n {\r\n id: 70,\r\n name: _TL_('Gabon'),\r\n },\r\n {\r\n id: 72,\r\n name: _TL_('Germany'),\r\n landingPageAll: [LANGUAGE_TYPES.ENGLISH, LANGUAGE_TYPES.GERMAN, LANGUAGE_TYPES.FRENCH],\r\n },\r\n {\r\n id: 208,\r\n name: _TL_('Georgia'),\r\n },\r\n {\r\n id: 74,\r\n name: _TL_('Gibraltar'),\r\n },\r\n {\r\n id: 76,\r\n name: _TL_('Greece'),\r\n },\r\n {\r\n id: 77,\r\n name: _TL_('Greenland'),\r\n },\r\n {\r\n id: 78,\r\n name: _TL_('Grenada'),\r\n },\r\n {\r\n id: 79,\r\n name: _TL_('Guadeloupe'),\r\n },\r\n {\r\n id: 80,\r\n name: _TL_('Guam'),\r\n },\r\n {\r\n id: 81,\r\n name: _TL_('Guatemala'),\r\n },\r\n {\r\n id: 82,\r\n name: _TL_('Guinea'),\r\n },\r\n {\r\n id: 153,\r\n name: _TL_('Guinea-Bissau'),\r\n },\r\n {\r\n id: 83,\r\n name: _TL_('Guyana'),\r\n },\r\n {\r\n id: 84,\r\n name: _TL_('Haiti'),\r\n },\r\n {\r\n id: 87,\r\n name: _TL_('Honduras'),\r\n },\r\n {\r\n id: 200,\r\n name: _TL_('Hong Kong SAR'),\r\n },\r\n {\r\n id: 88,\r\n name: _TL_('Hungary'),\r\n },\r\n {\r\n id: 89,\r\n name: _TL_('Iceland'),\r\n },\r\n {\r\n id: 90,\r\n name: _TL_('India'),\r\n landingPageAll: [LANGUAGE_TYPES.ENGLISH],\r\n },\r\n {\r\n id: 91,\r\n name: _TL_('Indonesia'),\r\n },\r\n {\r\n id: 228,\r\n name: _TL_('Iraq'),\r\n },\r\n {\r\n id: 92,\r\n name: _TL_('Ireland'),\r\n },\r\n {\r\n id: 210,\r\n name: _TL_('Israel'),\r\n },\r\n {\r\n id: 93,\r\n name: _TL_('Italy'),\r\n landingPageAll: [LANGUAGE_TYPES.ITALIAN],\r\n },\r\n {\r\n id: 95,\r\n name: _TL_('Jamaica'),\r\n },\r\n {\r\n id: 96,\r\n name: _TL_('Japan'),\r\n landingPageAll: [LANGUAGE_TYPES.JAPANESE],\r\n },\r\n {\r\n id: 101,\r\n name: _TL_('Kyrgyzstan'),\r\n },\r\n {\r\n id: 104,\r\n name: _TL_('Latvia'),\r\n },\r\n {\r\n id: 103,\r\n name: _TL_('Lesotho'),\r\n },\r\n {\r\n id: 106,\r\n name: _TL_('Libya'),\r\n },\r\n {\r\n id: 107,\r\n name: _TL_('Liechtenstein'),\r\n },\r\n {\r\n id: 108,\r\n name: _TL_('Lithuania'),\r\n },\r\n {\r\n id: 109,\r\n name: _TL_('Luxembourg'),\r\n },\r\n {\r\n id: 201,\r\n name: _TL_('Macao SAR'),\r\n },\r\n {\r\n id: 110,\r\n name: _TL_('Madagascar'),\r\n },\r\n {\r\n id: 111,\r\n name: _TL_('Malawi'),\r\n },\r\n {\r\n id: 112,\r\n name: _TL_('Malaysia'),\r\n },\r\n {\r\n id: 113,\r\n name: _TL_('Maldives'),\r\n },\r\n {\r\n id: 115,\r\n name: _TL_('Malta'),\r\n },\r\n {\r\n id: 142,\r\n name: _TL_('Marshall Islands'),\r\n },\r\n {\r\n id: 116,\r\n name: _TL_('Martinique'),\r\n },\r\n {\r\n id: 117,\r\n name: _TL_('Mauritania'),\r\n },\r\n {\r\n id: 118,\r\n name: _TL_('Mauritius'),\r\n },\r\n {\r\n id: 1303,\r\n name: _TL_('Mayotte'),\r\n },\r\n {\r\n id: 119,\r\n name: _TL_('Mexico'),\r\n },\r\n {\r\n id: 120,\r\n name: _TL_('Monaco'),\r\n },\r\n {\r\n id: 121,\r\n name: _TL_('Mongolia'),\r\n },\r\n {\r\n id: 122,\r\n name: _TL_('Moldova'),\r\n },\r\n {\r\n id: 4994,\r\n name: _TL_('Montenegro'),\r\n },\r\n {\r\n id: 123,\r\n name: _TL_('Montserrat'),\r\n },\r\n {\r\n id: 126,\r\n name: _TL_('Namibia'),\r\n },\r\n {\r\n id: 127,\r\n name: _TL_('Nauru'),\r\n },\r\n {\r\n id: 128,\r\n name: _TL_('Nepal'),\r\n },\r\n {\r\n id: 129,\r\n name: _TL_('Netherlands'),\r\n landingPageAll: [LANGUAGE_TYPES.DUTCH],\r\n },\r\n {\r\n id: 1289,\r\n name: _TL_('New Caledonia'),\r\n },\r\n {\r\n id: 134,\r\n name: _TL_('New Zealand'),\r\n },\r\n {\r\n id: 136,\r\n name: _TL_('Niger'),\r\n },\r\n {\r\n id: 137,\r\n name: _TL_('Nigeria'),\r\n },\r\n {\r\n id: 223,\r\n name: _TL_('Niue'),\r\n },\r\n {\r\n id: 138,\r\n name: _TL_('Norfolk Island'),\r\n },\r\n {\r\n id: 140,\r\n name: _TL_('Northern Mariana Islands'),\r\n },\r\n {\r\n id: 139,\r\n name: _TL_('Norway'),\r\n landingPageAll: [LANGUAGE_TYPES.NORWEGIAN],\r\n },\r\n {\r\n id: 214,\r\n name: _TL_('Oman'),\r\n },\r\n {\r\n id: 144,\r\n name: _TL_('Pakistan'),\r\n },\r\n {\r\n id: 143,\r\n name: _TL_('Palau'),\r\n },\r\n {\r\n id: 145,\r\n name: _TL_('Panama'),\r\n },\r\n {\r\n id: 146,\r\n name: _TL_('Papua New Guinea'),\r\n },\r\n {\r\n id: 147,\r\n name: _TL_('Paraguay'),\r\n },\r\n {\r\n id: 148,\r\n name: _TL_('Peru'),\r\n },\r\n {\r\n id: 149,\r\n name: _TL_('Philippines'),\r\n },\r\n {\r\n id: 150,\r\n name: _TL_('Pitcairn Islands'),\r\n },\r\n {\r\n id: 151,\r\n name: _TL_('Poland'),\r\n landingPageAll: [LANGUAGE_TYPES.POLISH],\r\n },\r\n {\r\n id: 152,\r\n name: _TL_('Portugal'),\r\n landingPageAll: [LANGUAGE_TYPES.PORTUGUESE],\r\n },\r\n {\r\n id: 154,\r\n name: _TL_('Puerto Rico'),\r\n },\r\n {\r\n id: 215,\r\n name: _TL_('Qatar'),\r\n },\r\n {\r\n id: 157,\r\n name: _TL_('Rwanda'),\r\n },\r\n {\r\n id: 45,\r\n name: _TL_('Republic of Congo'),\r\n },\r\n {\r\n id: 186,\r\n name: _TL_('Republic of North Macedonia'),\r\n },\r\n {\r\n id: 155,\r\n name: _TL_('Reunion'),\r\n },\r\n {\r\n id: 224,\r\n name: _TL_('Romania'),\r\n },\r\n {\r\n id: 230,\r\n name: _TL_('Saint Kitts and Nevis'),\r\n },\r\n {\r\n id: 231,\r\n name: _TL_('Saint Lucia'),\r\n\r\n },\r\n {\r\n id: 1293,\r\n name: _TL_('Saint Pierre and Miquelon'),\r\n },\r\n {\r\n id: 233,\r\n name: _TL_('Saint Vincent and the Grenadines'),\r\n },\r\n {\r\n id: 195,\r\n name: _TL_('Samoa'),\r\n },\r\n {\r\n id: 159,\r\n name: _TL_('San Marino'),\r\n },\r\n {\r\n id: 216,\r\n name: _TL_('Saudi Arabia'),\r\n },\r\n {\r\n id: 161,\r\n name: _TL_('Senegal'),\r\n },\r\n {\r\n id: 4993,\r\n name: _TL_('Serbia'),\r\n },\r\n {\r\n id: 162,\r\n name: _TL_('Seychelles'),\r\n },\r\n {\r\n id: 163,\r\n name: _TL_('Sierra Leone'),\r\n },\r\n {\r\n id: 164,\r\n name: _TL_('Singapore'),\r\n },\r\n {\r\n id: 165,\r\n name: _TL_('Slovakia'),\r\n },\r\n {\r\n id: 167,\r\n name: _TL_('Slovenia'),\r\n },\r\n {\r\n id: 225,\r\n name: _TL_('Somalia'),\r\n },\r\n {\r\n id: 168,\r\n name: _TL_('South Africa'),\r\n landingPageAll: [LANGUAGE_TYPES.ENGLISH],\r\n },\r\n {\r\n id: 170,\r\n name: _TL_('Spain'),\r\n landingPageAll: [LANGUAGE_TYPES.SPANISH],\r\n },\r\n {\r\n id: 36,\r\n name: _TL_('Sri Lanka'),\r\n },\r\n {\r\n id: 172,\r\n name: _TL_('Suriname'),\r\n },\r\n {\r\n id: 174,\r\n name: _TL_('Sweden'),\r\n landingPageAll: [LANGUAGE_TYPES.SWEDISH],\r\n },\r\n {\r\n id: 175,\r\n name: _TL_('Switzerland'),\r\n landingPageAll: [LANGUAGE_TYPES.GERMAN],\r\n },\r\n {\r\n id: 40,\r\n name: _TL_('Taiwan'),\r\n },\r\n {\r\n id: 176,\r\n name: _TL_('Tajikistan'),\r\n },\r\n {\r\n id: 189,\r\n name: _TL_('Tanzania'),\r\n },\r\n {\r\n id: 177,\r\n name: _TL_('Thailand'),\r\n },\r\n {\r\n id: 178,\r\n name: _TL_('Togo'),\r\n },\r\n {\r\n id: 71,\r\n name: _TL_('The Gambia'),\r\n },\r\n {\r\n id: 179,\r\n name: _TL_('Tokelau'),\r\n },\r\n {\r\n id: 180,\r\n name: _TL_('Tonga'),\r\n },\r\n {\r\n id: 181,\r\n name: _TL_('Trinidad and Tobago'),\r\n },\r\n {\r\n id: 227,\r\n name: _TL_('Tunisia'),\r\n },\r\n {\r\n id: 182,\r\n name: _TL_('Turkey'),\r\n },\r\n {\r\n id: 184,\r\n name: _TL_('Turks and Caicos Islands'),\r\n },\r\n {\r\n id: 234,\r\n name: _TL_('Tuvalu'),\r\n },\r\n {\r\n id: 185,\r\n name: _TL_('Uganda'),\r\n },\r\n {\r\n id: 218,\r\n name: _TL_('United Arab Emirates'),\r\n landingPageAll: [LANGUAGE_TYPES.ENGLISH],\r\n },\r\n {\r\n id: 188,\r\n name: _TL_('United Kingdom'),\r\n landingPageAll: [LANGUAGE_TYPES.ENGLISH, LANGUAGE_TYPES.GERMAN, LANGUAGE_TYPES.FRENCH],\r\n },\r\n {\r\n id: 190,\r\n name: _TL_('United States'),\r\n landingPageAll: [LANGUAGE_TYPES.ENGLISH, LANGUAGE_TYPES.GERMAN, LANGUAGE_TYPES.FRENCH],\r\n },\r\n {\r\n id: 237,\r\n name: _TL_('United States Virgin Islands'),\r\n },\r\n {\r\n id: 192,\r\n name: _TL_('Uruguay'),\r\n },\r\n {\r\n id: 133,\r\n name: _TL_('Vanuatu'),\r\n },\r\n {\r\n id: 86,\r\n name: _TL_('Vatican City'),\r\n },\r\n {\r\n id: 202,\r\n name: _TL_('Venezuela'),\r\n },\r\n {\r\n id: 166,\r\n name: _TL_('Vietnam'),\r\n },\r\n {\r\n id: 1302,\r\n name: _TL_('Wallis and Futuna'),\r\n },\r\n {\r\n id: 219,\r\n name: _TL_('Yemen'),\r\n },\r\n {\r\n id: 196,\r\n name: _TL_('Zambia'),\r\n },\r\n {\r\n id: 169,\r\n name: _TL_('Zimbabwe'),\r\n },\r\n];\r\n","import { pluck, contains, uniq, property } from 'underscore';\r\nimport React, { useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport hoistNonReactStatics from 'hoist-non-react-statics';\r\nimport { getDisplayName } from '@bingads-webui-react/hoc-utils';\r\nimport { Combobox as ComboboxOriginal } from '@fluentui/react-components';\r\n\r\nexport const withMultiSelectCombobox = (Combobox = ComboboxOriginal) => {\r\n const MultiSelectCombobox = ({\r\n onOptionSelect: onOptionSelectProp,\r\n options,\r\n selectedOptions,\r\n ...restProps\r\n }) => {\r\n const onOptionSelect = useCallback((event, data) => {\r\n const isInNewSelectedOptionIds = option => contains(data.selectedOptions, option.key);\r\n // data.selectedOptions is the list of selected options' ids.\r\n // We need to resolve the newly selected option to add it to the list of selected options,\r\n // and we need to find the newly unselected option to remove it from the list of selected options.\r\n const newSelectedOptions = uniq(\r\n [\r\n ...selectedOptions.filter(isInNewSelectedOptionIds),\r\n ...options.filter(isInNewSelectedOptionIds),\r\n ],\r\n property('key')\r\n );\r\n onOptionSelectProp(event, {\r\n ...data,\r\n resolvedSelectedOptions: newSelectedOptions,\r\n });\r\n }, [onOptionSelectProp, options, selectedOptions]);\r\n\r\n const selectedOptionKeys = useMemo(() => pluck(selectedOptions, 'key'), [selectedOptions]);\r\n\r\n // Rendering\r\n return (\r\n \r\n );\r\n };\r\n\r\n MultiSelectCombobox.propTypes = {\r\n onOptionSelect: PropTypes.func.isRequired,\r\n options: PropTypes.arrayOf(PropTypes.shape({\r\n key: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\r\n })).isRequired,\r\n selectedOptions: PropTypes.arrayOf(PropTypes.shape({\r\n key: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\r\n })).isRequired,\r\n };\r\n\r\n MultiSelectCombobox.displayName = `WithMultiSelectComboboxOver(${getDisplayName(Combobox)})`;\r\n hoistNonReactStatics(MultiSelectCombobox, Combobox);\r\n\r\n return MultiSelectCombobox;\r\n};\r\n","import React from 'react';\r\n\r\nexport const MultiSelectorContext = React.createContext({});\r\n\r\nexport const MultiSelectorContextConsumer = MultiSelectorContext.Consumer;\r\n\r\nexport const useMultiSelectContext = () => {\r\n const context = React.useContext(MultiSelectorContext);\r\n return context;\r\n};\r\n","import { isFunction } from 'underscore';\r\nimport React, { useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { MultiSelectorContext } from './multi-selector-context';\r\n\r\nexport const MultiSelectorContextProvider = ({\r\n children,\r\n useOptions,\r\n useSelectedOptions,\r\n selectedOptionsLimit,\r\n optionsDisplayLimit,\r\n onSelectedOptionsUpdate,\r\n onChange,\r\n savedAddedSelectedOptionsKeys,\r\n savedDeletedSelectedOptionsKeys,\r\n}) => {\r\n const [searchFilter, setSearchFilter] = React.useState('');\r\n const [isLoadingOptions, isFirstOptionsLoad, isNoOptionsAfterFirstLoad, isMoreOptionsThanLimit, options, optionsLoadError, lastLoadedSearchFilter, triggerLoadOptions] =\r\n useOptions(searchFilter, optionsDisplayLimit);\r\n\r\n const [isLoadingSelectedOptions, selectedOptions, initialSelectedOptions, selectedOptionsLoadError, setSelectedOptions, isSelectedOptionsLimitReached] =\r\n useSelectedOptions(selectedOptionsLimit, onChange, savedAddedSelectedOptionsKeys, savedDeletedSelectedOptionsKeys);\r\n\r\n useEffect(() => {\r\n if (isFunction(onSelectedOptionsUpdate)) {\r\n onSelectedOptionsUpdate(selectedOptions);\r\n }\r\n }, [onSelectedOptionsUpdate, selectedOptions]);\r\n\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n};\r\n\r\nMultiSelectorContextProvider.propTypes = {\r\n children: PropTypes.oneOfType([\r\n PropTypes.arrayOf(PropTypes.node),\r\n PropTypes.node,\r\n ]),\r\n useOptions: PropTypes.func.isRequired,\r\n useSelectedOptions: PropTypes.func.isRequired,\r\n selectedOptionsLimit: PropTypes.number,\r\n optionsDisplayLimit: PropTypes.number,\r\n onChange: PropTypes.func,\r\n onSelectedOptionsUpdate: PropTypes.func,\r\n savedAddedSelectedOptionsKeys: PropTypes.arrayOf(PropTypes.number),\r\n savedDeletedSelectedOptionsKeys: PropTypes.arrayOf(PropTypes.number),\r\n};\r\n\r\nMultiSelectorContextProvider.defaultProps = {\r\n children: null,\r\n selectedOptionsLimit: 25,\r\n optionsDisplayLimit: 50,\r\n onChange: null,\r\n onSelectedOptionsUpdate: null,\r\n savedAddedSelectedOptionsKeys: [],\r\n savedDeletedSelectedOptionsKeys: [],\r\n};\r\n","import { first, isEmpty } from 'underscore';\r\nimport { useCallback, useEffect, useRef, useState } from 'react';\r\nimport { createAsyncToken } from '@bingads-webui-universal/primitive-utilities';\r\n\r\nexport const makeUseOptionsAsyncDataSource = (loadOptions) => {\r\n const useOptionsAsyncDataSource = (searchFilter, optionsLimit = Number.MAX_SAFE_INTEGER) => {\r\n const isFirstLoad = useRef(true);\r\n const [isLoading, setIsLoading] = useState(true);\r\n const noDataAfterFirstLoad = useRef(false);\r\n const asyncTokenRef = useRef();\r\n\r\n const [isMoreOptionsThanLimit, setIsMoreOptionsThanLimit] = useState(false);\r\n const [options, setOptions] = useState([]);\r\n const [lastLoadedSearchFilter, setLastLoadedSearchFilter] = useState();\r\n const [loadError, setLoadError] = useState();\r\n\r\n const onDoneLoading = useCallback((loadedSearchFilter, newOptions) => {\r\n setIsLoading(false);\r\n noDataAfterFirstLoad.current = isFirstLoad.current && isEmpty(newOptions);\r\n isFirstLoad.current = false;\r\n setIsMoreOptionsThanLimit(newOptions.length > optionsLimit);\r\n setOptions(first(newOptions, optionsLimit));\r\n setLastLoadedSearchFilter(loadedSearchFilter);\r\n setLoadError(undefined);\r\n asyncTokenRef.current = null;\r\n }, [optionsLimit]);\r\n const onErrorLoading = useCallback((error) => {\r\n setIsLoading(false);\r\n setLoadError(error);\r\n asyncTokenRef.current = null;\r\n }, []);\r\n const onCancelLoading = useCallback(() => {\r\n setIsLoading(false);\r\n asyncTokenRef.current = null;\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (asyncTokenRef.current) {\r\n asyncTokenRef.current.cancel();\r\n }\r\n setIsLoading(true);\r\n asyncTokenRef.current = createAsyncToken(loadOptions({\r\n searchFilter,\r\n top: optionsLimit + 1,\r\n })).on({\r\n onSuccess: (...args) => onDoneLoading(searchFilter, ...args),\r\n onError: onErrorLoading,\r\n onCancel: onCancelLoading,\r\n });\r\n\r\n return () => {\r\n if (asyncTokenRef.current) {\r\n asyncTokenRef.current.cancel();\r\n }\r\n };\r\n }, [searchFilter, optionsLimit, onDoneLoading, onErrorLoading, onCancelLoading]);\r\n\r\n return [isLoading, isFirstLoad.current, noDataAfterFirstLoad.current, isMoreOptionsThanLimit, options, loadError, lastLoadedSearchFilter];\r\n };\r\n\r\n return useOptionsAsyncDataSource;\r\n};\r\n","import { first, isEmpty, isFunction, noop } from 'underscore';\r\nimport { useCallback, useEffect, useRef, useState } from 'react';\r\nimport { createAsyncToken } from '@bingads-webui-universal/primitive-utilities';\r\n\r\n// The hook handles the searchFilter by client-side filtering instead of server-side filtering.\r\nexport const makeUseOptionsAsyncDataSourceWithClientFilter = (loadOptions, filterPredicate, onDoneCallback = noop) => {\r\n const useOptionsAsyncDataSource = (searchFilter, optionsLimit = Number.MAX_SAFE_INTEGER) => {\r\n const isFirstLoad = useRef(true);\r\n const [isLoading, setIsLoading] = useState(true);\r\n const noDataAfterFirstLoad = useRef(false);\r\n const asyncTokenRef = useRef();\r\n\r\n const [isMoreOptionsThanLimit, setIsMoreOptionsThanLimit] = useState(false);\r\n const [srcOptions, setSrcOptions] = useState([]);\r\n const [options, setOptions] = useState([]);\r\n const [lastLoadedSearchFilter, setLastLoadedSearchFilter] = useState();\r\n const [loadError, setLoadError] = useState();\r\n\r\n const onDoneLoading = useCallback((newOptions) => {\r\n setIsLoading(false);\r\n noDataAfterFirstLoad.current = isFirstLoad.current && isEmpty(newOptions);\r\n isFirstLoad.current = false;\r\n setIsMoreOptionsThanLimit(newOptions.length > optionsLimit);\r\n setSrcOptions(newOptions);\r\n setLoadError(undefined);\r\n asyncTokenRef.current = null;\r\n\r\n if (isFunction(onDoneCallback)) {\r\n onDoneCallback(newOptions);\r\n }\r\n }, [optionsLimit]);\r\n const onErrorLoading = useCallback((error) => {\r\n setIsLoading(false);\r\n setLoadError(error);\r\n asyncTokenRef.current = null;\r\n }, []);\r\n const onCancelLoading = useCallback(() => {\r\n setIsLoading(false);\r\n asyncTokenRef.current = null;\r\n }, []);\r\n\r\n useEffect(() => {\r\n setLastLoadedSearchFilter(searchFilter);\r\n const filteredOptions = srcOptions.filter(filterPredicate(searchFilter));\r\n setIsMoreOptionsThanLimit(filteredOptions.length > optionsLimit);\r\n setOptions(first(filteredOptions, optionsLimit));\r\n }, [optionsLimit, searchFilter, srcOptions]);\r\n\r\n const triggerLoadOptions = useCallback(() => {\r\n if (asyncTokenRef.current) {\r\n asyncTokenRef.current.cancel();\r\n }\r\n setIsLoading(true);\r\n asyncTokenRef.current = createAsyncToken(loadOptions({\r\n top: optionsLimit + 1,\r\n })).on({\r\n onSuccess: onDoneLoading,\r\n onError: onErrorLoading,\r\n onCancel: onCancelLoading,\r\n });\r\n }, [optionsLimit, onDoneLoading, onErrorLoading, onCancelLoading]);\r\n\r\n useEffect(() => {\r\n triggerLoadOptions();\r\n\r\n return () => {\r\n if (asyncTokenRef.current) {\r\n asyncTokenRef.current.cancel();\r\n }\r\n };\r\n }, [optionsLimit, onDoneLoading, onErrorLoading, onCancelLoading, triggerLoadOptions]);\r\n\r\n return [isLoading, isFirstLoad.current, noDataAfterFirstLoad.current, isMoreOptionsThanLimit, options, loadError, lastLoadedSearchFilter, triggerLoadOptions];\r\n };\r\n\r\n return useOptionsAsyncDataSource;\r\n};\r\n","import { map, difference, isFunction, isEmpty } from 'underscore';\r\nimport { useCallback, useEffect, useRef, useState, useMemo } from 'react';\r\nimport { createAsyncToken } from '@bingads-webui-universal/primitive-utilities';\r\n\r\nconst getSelectionStats = (initialOptions, currentOptions) => {\r\n const initialOptionKeys = map(initialOptions, option => option.key);\r\n const currentOptionKeys = map(currentOptions, option => option.key);\r\n\r\n const addedOptionKeys = difference(currentOptionKeys, initialOptionKeys);\r\n const deletedOptionKeys = difference(initialOptionKeys, currentOptionKeys);\r\n\r\n return [deletedOptionKeys, addedOptionKeys];\r\n};\r\n\r\nexport const makeUseSelectedOptionsAsyncDataSource = (loadSelectedOptions) => {\r\n const useSelectedOptionsAsyncDataSource = (selectedOptionsLimit, onChange, savedAddedOptionKeys, savedDeletedOptionKeys) => {\r\n const [isLoading, setIsLoading] = useState(true);\r\n const asyncTokenRef = useRef();\r\n\r\n const [options, setOptions] = useState([]);\r\n const initialOptions = useRef([]);\r\n const [loadError, setLoadError] = useState();\r\n\r\n const onDoneLoading = useCallback((newOptions) => {\r\n setIsLoading(false);\r\n asyncTokenRef.current = null;\r\n setOptions(newOptions);\r\n initialOptions.current = newOptions;\r\n }, []);\r\n const onErrorLoading = useCallback((error) => {\r\n setIsLoading(false);\r\n asyncTokenRef.current = null;\r\n setLoadError(error);\r\n }, []);\r\n const onCancelLoading = useCallback(() => {\r\n setIsLoading(false);\r\n asyncTokenRef.current = null;\r\n }, []);\r\n const handleOptionsChangeByUser = useCallback((newOptions) => {\r\n if (isFunction(onChange)) {\r\n const [deletedOptionKeys, addedOptionKeys] = getSelectionStats(initialOptions.current, newOptions);\r\n onChange(newOptions, [deletedOptionKeys, addedOptionKeys]);\r\n }\r\n }, [onChange]);\r\n const setOptionsByUser = useCallback((newOptions) => {\r\n setOptions(newOptions);\r\n handleOptionsChangeByUser(newOptions);\r\n }, [handleOptionsChangeByUser]);\r\n\r\n useEffect(() => {\r\n setIsLoading(true);\r\n if (asyncTokenRef.current) {\r\n asyncTokenRef.current.cancel();\r\n }\r\n asyncTokenRef.current = createAsyncToken(loadSelectedOptions())\r\n .on({\r\n onSuccess: onDoneLoading,\r\n onError: onErrorLoading,\r\n onCancel: onCancelLoading,\r\n });\r\n }, [onDoneLoading, onErrorLoading, onCancelLoading]);\r\n\r\n useEffect(() => {\r\n // After we loaded and we receive updates from the parent about some changes saved, we need to update the initial options so that future user changes are compared against the new base line of selected options\r\n // We also notify the parent/subscriber via onChange about the new diff\r\n if (!isLoading && (!isEmpty(savedAddedOptionKeys) || !isEmpty(savedDeletedOptionKeys))) {\r\n const newInitialOptions = [\r\n ...initialOptions.current.filter(option => !savedDeletedOptionKeys.includes(option.key)),\r\n ...options.filter(option => savedAddedOptionKeys.includes(option.key)),\r\n ];\r\n\r\n initialOptions.current = newInitialOptions;\r\n if (isFunction(onChange)) {\r\n const [deletedOptionKeys, addedOptionKeys] = getSelectionStats(newInitialOptions, options);\r\n onChange(options, [deletedOptionKeys, addedOptionKeys]);\r\n }\r\n }\r\n }, [isLoading, options, savedAddedOptionKeys, savedDeletedOptionKeys, onChange]);\r\n\r\n const isSelectedOptionsLimitReached = useMemo(() => options.length >= selectedOptionsLimit, [options, selectedOptionsLimit]);\r\n\r\n return [isLoading, options, initialOptions.current, loadError, setOptionsByUser, isSelectedOptionsLimitReached];\r\n };\r\n\r\n return useSelectedOptionsAsyncDataSource;\r\n};\r\n","import { shorthands, makeStyles } from '@fluentui/react-components';\r\n\r\nexport const useFluentV1Styles = makeStyles({\r\n root: {\r\n ...shorthands.border('1px', 'solid', 'rgb(96, 94, 92)'),\r\n ':focus-within': {\r\n ...shorthands.border('1px', 'solid', 'rgb(0, 120, 212)'),\r\n },\r\n ':focus-within:hover': {\r\n ...shorthands.border('1px', 'solid', 'rgb(0, 120, 212)'),\r\n },\r\n ':hover': {\r\n ...shorthands.border('1px', 'solid', 'rgb(50, 49, 48)'),\r\n },\r\n '::after': {\r\n display: 'none',\r\n },\r\n ...shorthands.borderRadius('2px'),\r\n },\r\n});\r\n","export const getGridStyles = () => ({\r\n root: {\r\n '& .table-container .criterion-target-table .ms-DetailsHeader [role=columnheader] .ms-DetailsHeader-cellName': {\r\n fontWeight: 600,\r\n },\r\n },\r\n image: {\r\n width: 16,\r\n height: 16,\r\n marginRight: 8,\r\n },\r\n name: {\r\n fontWeight: 600,\r\n },\r\n switch: {\r\n '& input:after': {\r\n content: 'none',\r\n },\r\n '& input': {\r\n width: 56,\r\n },\r\n },\r\n});\r\n\r\n","import { ScopeLevel } from '@bingads-webui-campaign-react/constants';\r\n\r\nexport const getSummary = (level, data, i18n) => {\r\n let parentToggleDescription = '';\r\n if (!data) return '';\r\n\r\n if (level === ScopeLevel.AdGroup) {\r\n parentToggleDescription = data.useParentLevel ? i18n.getString(_TL_('Use campaign settings: ')) : '';\r\n }\r\n\r\n const bidAdjustment = data.useParentLevel ? data.parentLevelData.bidAdjustmentInput : data.currentLevelData.bidAdjustmentInput;\r\n return parentToggleDescription + i18n.getString(_TL_('Increase bids by {{bidAdjustment}}%'), { bidAdjustment });\r\n};\r\n\r\nexport const RANGE = {\r\n min: 20,\r\n max: 900,\r\n};\r\n","import React, { useContext, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { GridTargetsBase } from '@bingads-webui-campaign/hotel-common-targets';\r\nimport { ScopeLevel } from '@bingads-webui-campaign-react/constants';\r\nimport { getGridStyles } from './style';\r\nimport image from './multimedia-ad.svg';\r\nimport { RANGE } from './util';\r\n\r\nexport const MultimediaAdBidAdjustment = ({ onDataChange, data, level }) => {\r\n const i18n = useContext(I18nContext);\r\n const classes = useDefaultStyles(getGridStyles);\r\n const { multimediaAds } = data;\r\n const nameColumn = (\r\n
\r\n {i18n.getString(_TL_('Multimedia\r\n {i18n.getString(_TL_('Multimedia ads Bids'))}\r\n
\r\n );\r\n const currentLevelSettings = [{\r\n ...multimediaAds.currentLevelData,\r\n name: nameColumn,\r\n }];\r\n const parentLevelSettings = level === ScopeLevel.AdGroup ? [{\r\n ...multimediaAds.parentLevelData,\r\n name: nameColumn,\r\n }] : undefined;\r\n const columns = [{\r\n key: 'meultimedia', name: i18n.getString(_TL_('Multimedia ads')), fieldName: 'name', minWidth: 100, maxWidth: 333, type: 'plainString', headerClassName: 'target-custom-header',\r\n }];\r\n\r\n const onChange = useCallback((newData) => {\r\n onDataChange({\r\n multimediaAds: {\r\n currentLevelData: newData.currentLevelSettings[0],\r\n parentLevelData: level === ScopeLevel.AdGroup ? newData.parentLevelSettings[0] : undefined,\r\n useParentLevel: newData.useParentLevel,\r\n },\r\n });\r\n }, [level, onDataChange]);\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nMultimediaAdBidAdjustment.propTypes = {\r\n onDataChange: PropTypes.func.isRequired,\r\n data: PropTypes.shape({\r\n multimediaAds: PropTypes.shape({\r\n currentLevelData: PropTypes.shape({\r\n bidAdjustmentDropdown: PropTypes.string,\r\n bidAdjustmentInput: PropTypes.number,\r\n }),\r\n parentLevelData: PropTypes.shape({\r\n bidAdjustmentDropdown: PropTypes.string,\r\n bidAdjustmentInput: PropTypes.number,\r\n }),\r\n useParentLevel: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n level: PropTypes.string.isRequired,\r\n};\r\n","import React, { useCallback, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Checkbox } from '@fluentui/react-components';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { HelpPopup } from '@bingads-webui-react/help-popup';\r\nimport { ScopeLevel } from '@bingads-webui-campaign-react/constants';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { getGridStyles } from './style';\r\n\r\nexport const AutomatedCallToActionOptOut = ({ onDataChange, data, level }) => {\r\n const i18n = useContext(I18nContext);\r\n const classes = useDefaultStyles(getGridStyles);\r\n const onChange = useCallback((ev, newData) => {\r\n onDataChange({\r\n ...data,\r\n AutomatedCallToActionOptOut: !newData.checked,\r\n });\r\n }, [data, onDataChange]);\r\n\r\n if (level === ScopeLevel.AdGroup) {\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\r\nAutomatedCallToActionOptOut.propTypes = {\r\n onDataChange: PropTypes.func.isRequired,\r\n data: PropTypes.shape({\r\n AutomatedCallToActionOptOut: PropTypes.bool,\r\n }).isRequired,\r\n level: PropTypes.string.isRequired,\r\n};\r\n","import React, { useContext, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Switch } from '@fluentui/react-components';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ScopeLevel } from '@bingads-webui-campaign-react/constants';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { getGridStyles } from './style';\r\n\r\nexport const SwitchUseCampaignSetting = ({ data, onDataChange, level }) => {\r\n const i18n = useContext(I18nContext);\r\n const classes = useDefaultStyles(getGridStyles);\r\n const onChange = useCallback(\r\n (ev, { checked }) => {\r\n onDataChange({\r\n ...data,\r\n useParentLevel: checked,\r\n });\r\n },\r\n [data, onDataChange]\r\n );\r\n\r\n if (level === ScopeLevel.Campaign) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nSwitchUseCampaignSetting.propTypes = {\r\n onDataChange: PropTypes.func.isRequired,\r\n data: PropTypes.shape({\r\n useParentLevel: PropTypes.bool,\r\n }).isRequired,\r\n level: PropTypes.string.isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { MultimediaAdBidAdjustment } from './multimedia-ad-bid-adjustment';\r\nimport { AutomatedCallToActionOptOut } from './automated-cta';\r\nimport { SwitchUseCampaignSetting } from './switch-use-campaign-setting';\r\n\r\nexport const MultimediaAdBidAdjustmentSettings = ({\r\n onDataChange, data, level,\r\n}) => {\r\n const { multimediaAds } = data;\r\n const onUseParentLevelChange = (newData) => {\r\n let { currentLevelData } = newData;\r\n if (!newData.useParentLevel && currentLevelData.bidAdjustmentInput === null) {\r\n currentLevelData = newData.parentLevelData;\r\n }\r\n\r\n onDataChange({\r\n multimediaAds: {\r\n ...newData,\r\n currentLevelData,\r\n },\r\n });\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nMultimediaAdBidAdjustmentSettings.propTypes = {\r\n onDataChange: PropTypes.func.isRequired,\r\n data: PropTypes.shape({\r\n multimediaAds: PropTypes.shape({\r\n currentLevelData: PropTypes.shape({\r\n bidAdjustmentDropdown: PropTypes.string,\r\n bidAdjustmentInput: PropTypes.number,\r\n }),\r\n parentLevelData: PropTypes.shape({\r\n bidAdjustmentDropdown: PropTypes.string,\r\n bidAdjustmentInput: PropTypes.number,\r\n }),\r\n useParentLevel: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n level: PropTypes.string.isRequired,\r\n};\r\n","import React, { useCallback, useState, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n TextTitle,\r\n ValidatedPanel,\r\n getPanelErrorProps,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { validateBidAdjustment } from '@bingads-webui-campaign/hotel-common-targets';\r\nimport { MultimediaAdBidAdjustmentSettings } from './multimedia-ad-bid-adjustment-setting';\r\nimport image from './multimedia-ad.svg';\r\nimport { getSummary, RANGE } from './util';\r\n\r\nconst isBidAdjustmentValid = data => validateBidAdjustment({\r\n value: data.bidAdjustmentInput,\r\n min: RANGE.min,\r\n max: RANGE.max,\r\n}) === null;\r\n\r\nexport const MultimediaAdBidAdjustmentSection = ({\r\n onDataChange, data, level, expand, permissions, ...rest\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n const [isValid, setIsValid] = useState(true);\r\n const onChange = useCallback((newData) => {\r\n const isDataValid = newData.multimediaAds.useParentLevel ? true : isBidAdjustmentValid(newData.multimediaAds.currentLevelData);\r\n onDataChange({ data: newData, isValid: isDataValid });\r\n setIsValid(isDataValid);\r\n }, [onDataChange]);\r\n\r\n if (!data || (permissions.IsDomesticSimplifiedChineseEnabled && !permissions.dynamic.MMAForCN)) {\r\n return null;\r\n }\r\n\r\n return (\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand,\r\n expandKey: 'multimedia-ad',\r\n }}\r\n error={isValid ? null : _TL_(\"* Something's wrong\")}\r\n {...rest}\r\n >\r\n \r\n \r\n );\r\n};\r\n\r\nMultimediaAdBidAdjustmentSection.propTypes = {\r\n onDataChange: PropTypes.func.isRequired,\r\n data: PropTypes.shape({\r\n multimediaAds: PropTypes.shape({}),\r\n }),\r\n level: PropTypes.string.isRequired,\r\n expand: PropTypes.func.isRequired,\r\n permissions: PropTypes.shape({\r\n IsDomesticSimplifiedChineseEnabled: PropTypes.bool,\r\n dynamic: PropTypes.shape({\r\n MMAForCN: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n};\r\n\r\nMultimediaAdBidAdjustmentSection.defaultProps = {\r\n data: null,\r\n};\r\n","import React, { useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Input, Text, useId } from '@fluentui/react-components';\r\n\r\nexport const AdditionalConversionInputPure = (props) => {\r\n const {\r\n value, onChange, size, currencySymbol, className,\r\n } = props;\r\n const id = useId('additional-conversion-value-input');\r\n const onInputChange = useCallback((_e, data) => {\r\n if (data) onChange(data.value);\r\n }, [onChange]);\r\n\r\n return (\r\n {currencySymbol}}\r\n />\r\n );\r\n};\r\n\r\nAdditionalConversionInputPure.propTypes = {\r\n className: PropTypes.string,\r\n value: PropTypes.string.isRequired,\r\n i18n: PropTypes.shape({\r\n getCurrencySymbol: PropTypes.func,\r\n }).isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n size: PropTypes.string,\r\n currencySymbol: PropTypes.string,\r\n};\r\n\r\nAdditionalConversionInputPure.defaultProps = {\r\n className: '',\r\n size: 'medium',\r\n currencySymbol: '$',\r\n};\r\n","import { andComp, anyComp, codeIs, entityIs } from '@bingads-webui-campaign-react/form-error';\r\n\r\nexport const NCA_STRATEGY_OPTIONS = {\r\n BID_HIGHER: 'BidHigher',\r\n BID_ONLY: 'BidOnly',\r\n};\r\n\r\nexport const ADDITIONAL_CONVERSION_VALUE_TYPES = {\r\n CAMPAIGN: 'Campaign',\r\n ACCOUNT: 'Account',\r\n};\r\n\r\nconst ERROR_ENTITY = {\r\n Campaign: 'campaign',\r\n};\r\n\r\nexport const newCustomerAcquisitionServerErrorFilter = andComp(\r\n entityIs(ERROR_ENTITY.Campaign),\r\n anyComp(\r\n codeIs('InvalidBidStrategyForNewCustomerAcquisitionBidHigherMode'),\r\n codeIs('InvalidNewCustomerAcquisitionGoalId'),\r\n codeIs('PurchaseCampaignConversionGoalOnlyForNcaEnabledCampaign'),\r\n codeIs('InvalidAdditionalConversionValue'),\r\n codeIs('AudienceAssociationRequiredForNewCustomerAcquisitionGoal'),\r\n codeIs('CampaignLevelAdditionalValueNotSupportedForBidOnlyMode')\r\n )\r\n);\r\n","import React, { useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { map } from 'underscore';\r\nimport { withErrorField } from '@bingads-webui-react/primitive-validation-fluent';\r\nimport { withValidation, GenericAdapter } from '@bingads-webui-react/validation';\r\nimport { useBudgetRange } from '@bingads-webui-campaign-react/budget-component-v2';\r\nimport { Radio, RadioGroup, Text, makeStyles, shorthands } from '@fluentui/react-components';\r\nimport { AdditionalConversionInputPure } from './additional-conversion-input-pure';\r\nimport { ADDITIONAL_CONVERSION_VALUE_TYPES } from '../constants';\r\n\r\nconst AdditionalConversionInput = withErrorField(withValidation(AdditionalConversionInputPure, GenericAdapter));\r\n\r\nconst useAdditionalConversionInputStyle = makeStyles({\r\n additionalValueInputSection: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n ...shorthands.gap('16px'),\r\n '& .fui-Input': {\r\n maxWidth: '136px',\r\n },\r\n },\r\n radioGroupContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n ...shorthands.gap('8px'),\r\n '& input[type=\"radio\"]': {\r\n height: '20px',\r\n width: '20px',\r\n ...shorthands.margin('0px'),\r\n },\r\n '& .fui-Radio__indicator': {\r\n height: '20px',\r\n width: '20px',\r\n ...shorthands.margin('0px'),\r\n },\r\n '& label': {\r\n ...shorthands.padding('0px', '0px', '0px', '8px'),\r\n },\r\n },\r\n radioOption: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n ...shorthands.gap('8px'),\r\n '& .fui-Field': {\r\n marginLeft: '28px',\r\n },\r\n },\r\n});\r\n\r\nexport const ValidatedAdditionalConversionInput = (props) => {\r\n const {\r\n i18n, isAccountLevel, accountAdditionalConversionValue,\r\n conversionValueOption, setConversionValueOption,\r\n validationProps, ...rest\r\n } = props;\r\n const styles = useAdditionalConversionInputStyle();\r\n const {\r\n currencyCode,\r\n minDailyBudget,\r\n maxDailyBudget,\r\n } = useBudgetRange();\r\n\r\n const budgetSchema = useMemo(() => ({\r\n name: 'Budget schema',\r\n type: 'object',\r\n properties: {\r\n 'account-setting': {\r\n type: 'number',\r\n required: true,\r\n maximum: maxDailyBudget,\r\n minimum: minDailyBudget,\r\n },\r\n 'campaign-setting': {\r\n type: 'number',\r\n required: true,\r\n maximum: maxDailyBudget,\r\n minimum: minDailyBudget,\r\n },\r\n },\r\n }), [maxDailyBudget, minDailyBudget]);\r\n\r\n const customErrorProcessor = useCallback(errors => map(\r\n errors,\r\n (oldError, key) => {\r\n const customErrors = {\r\n decimalLength: i18n.getString(_TL_('Budget needs to be set to 2 decimal lengths')),\r\n range: i18n.getString(_TL_('Your budget should be greater than {{accountCurrencyCode}} {{dailyRangeFloorValue}} and less than your daily maximum. 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: minDailyBudget,\r\n }),\r\n required: i18n.getString(_TL_('This field is required')),\r\n type: i18n.getString(_TL_('Field requires numeric value')),\r\n };\r\n return customErrors[key] || oldError;\r\n }\r\n ), [i18n, currencyCode, minDailyBudget]);\r\n\r\n const renderAccountLevelSettings = useCallback(() => (\r\n <>\r\n \r\n {i18n.getString(_TL_('Enter the target amount you want to pay for a new customer’s purchase of your product or service.'))}\r\n {i18n.getString(_TL_(' Note: '))}\r\n {i18n.getString(_TL_('The final value will be based on the target amount you enter here plus the default purchase value set in your '))}\r\n {i18n.getString(_TL_('Purchase'))}\r\n {i18n.getString(_TL_(' conversion goal.'))}\r\n \r\n \r\n \r\n ), [budgetSchema, currencyCode, customErrorProcessor, i18n, rest, validationProps]);\r\n\r\n const onConversionValueOptionChange = useCallback((_, data) => {\r\n if (data) {\r\n setConversionValueOption(data.value);\r\n }\r\n }, [setConversionValueOption]);\r\n\r\n const renderCampaignLevelSettings = useCallback(() => (\r\n <>\r\n \r\n \r\n {i18n.getString(_TL_('Use account-level settings'))} {`(${i18n.formatCurrency(Number(accountAdditionalConversionValue), currencyCode)})`}\r\n \r\n }\r\n />\r\n
\r\n \r\n {i18n.getString(_TL_('Use a different value for this campaign'))}\r\n \r\n }\r\n />\r\n { conversionValueOption === ADDITIONAL_CONVERSION_VALUE_TYPES.CAMPAIGN && (\r\n \r\n )}\r\n
\r\n \r\n \r\n ), [styles.radioGroupContainer, styles.radioOption, conversionValueOption, onConversionValueOptionChange, i18n, accountAdditionalConversionValue, currencyCode, budgetSchema, customErrorProcessor, validationProps, rest]);\r\n\r\n return (\r\n
\r\n {i18n.getString(_TL_('Conversion value for new customers'))}\r\n { isAccountLevel ? renderAccountLevelSettings() : renderCampaignLevelSettings() }\r\n
\r\n );\r\n};\r\n\r\nValidatedAdditionalConversionInput.propTypes = {\r\n accountAdditionalConversionValue: PropTypes.number.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n formatCurrency: PropTypes.func,\r\n getCurrencySymbol: PropTypes.func,\r\n }).isRequired,\r\n isAccountLevel: PropTypes.bool.isRequired,\r\n conversionValueOption: PropTypes.string.isRequired,\r\n setConversionValueOption: PropTypes.func.isRequired,\r\n setBudgetInput: PropTypes.func.isRequired,\r\n validationProps: PropTypes.shape({}),\r\n};\r\n\r\nValidatedAdditionalConversionInput.defaultProps = {\r\n validationProps: {},\r\n};\r\n","import React, { useCallback, useEffect, useMemo, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { clone, isEmpty, pluck } from 'underscore';\r\nimport {\r\n Button, Combobox, Link, Option, Text,\r\n TableBody, TableCell, TableRow, Table, TableHeader, TableHeaderCell, TableCellLayout,\r\n makeStyles, shorthands, tokens, useId,\r\n} from '@fluentui/react-components';\r\nimport { DeleteRegular } from '@fluentui/react-icons';\r\nimport { useMultiSelectContext, withMultiSelectCombobox } from '@bingads-webui-campaign-react/multi-selector';\r\nimport { useDebouncedState } from '@bingads-webui-campaign-react/common-generic-hooks';\r\nimport { InlineLoading, LoadingOverlay } from '@bingads-webui-campaign-react/loading';\r\nimport { getRoutePathById, allSiteMap } from '@bingads-webui-campaign-react/with-site-map';\r\n\r\nconst SEARCH_START_DELAY_MS = 500;\r\nconst TABLE_COLUMNS = [\r\n { key: 'audience_name', label: 'Audience list' },\r\n { key: 'audience_type', label: 'Audience type' },\r\n];\r\nconst MultiSelectCombobox = withMultiSelectCombobox(Combobox);\r\n\r\nconst getAudiencesLibraryUrl = (cid, aid) => {\r\n const audiencesLibraryPath = getRoutePathById(allSiteMap, 'audiences-library');\r\n const searchParams = `?cid=${cid}&aid=${aid}`;\r\n return `${audiencesLibraryPath}${searchParams}`;\r\n};\r\n\r\nexport const useAudienceListSectionStyle = makeStyles({\r\n audienceListSection: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n ...shorthands.gap('8px'),\r\n '& .list-number-text': {\r\n color: tokens.colorNeutralForeground2Link,\r\n },\r\n },\r\n combobox: {\r\n width: '100%',\r\n },\r\n listbox: {\r\n maxHeight: '345px',\r\n },\r\n TypeInContent: {\r\n ...shorthands.margin('12px'),\r\n fontSize: '14px',\r\n lineHeight: '20px',\r\n },\r\n NonOptionContent: {\r\n ...shorthands.margin('12px'),\r\n '& .audience-empty-header': {\r\n fontSize: '14px',\r\n lineHeight: '20px',\r\n },\r\n },\r\n audienceTable: {\r\n marginTop: '12px',\r\n '& .delete-button': {\r\n justifyContent: 'flex-end',\r\n },\r\n },\r\n});\r\n\r\nexport const AudienceListSection = (props) => {\r\n const {\r\n i18n, isAccountLevel, cid, aid,\r\n } = props;\r\n const styles = useAudienceListSectionStyle();\r\n const comboboxId = useId('combobox');\r\n const {\r\n isLoadingOptions,\r\n isFirstOptionsLoad,\r\n options,\r\n optionsLoadError,\r\n lastLoadedSearchFilter,\r\n\r\n isLoadingSelectedOptions,\r\n isSelectedOptionsLimitReached,\r\n selectedOptions,\r\n selectedOptionsLoadError,\r\n setSelectedOptions,\r\n\r\n setSearchFilter: setSearchFilterFromContext,\r\n } = useMultiSelectContext();\r\n\r\n const isAnyLoading = isLoadingOptions || isLoadingSelectedOptions;\r\n const hasLoadErrors = optionsLoadError || selectedOptionsLoadError;\r\n const showInitialLoading = (isFirstOptionsLoad && !hasLoadErrors) || isLoadingSelectedOptions;\r\n const canUserStartOperating = !showInitialLoading && !selectedOptionsLoadError;\r\n const selectedOptionKeys = useMemo(() => pluck(selectedOptions, 'key'), [selectedOptions]);\r\n const selectedOptionsSet = useMemo(() => new Set(selectedOptionKeys), [selectedOptionKeys]);\r\n const shouldDisableSelection = useCallback(option => isSelectedOptionsLimitReached && !selectedOptionsSet.has(option.key), [isSelectedOptionsLimitReached, selectedOptionsSet]);\r\n\r\n const [debouncedSearchFilter, setSearchFilter, searchFilter] = useDebouncedState('', SEARCH_START_DELAY_MS);\r\n useEffect(() => {\r\n setSearchFilterFromContext(debouncedSearchFilter);\r\n }, [debouncedSearchFilter, setSearchFilterFromContext]);\r\n const onSearchInputChange = useCallback((event) => {\r\n const { value: rawValue } = event.target;\r\n setSearchFilter(rawValue);\r\n }, [setSearchFilter]);\r\n const isSearchFilterEmpty = !lastLoadedSearchFilter;\r\n\r\n const [isComboboxOpen, setIsComboboxOpen] = useState(false);\r\n const onOpenChange = useCallback((event, data) => {\r\n setIsComboboxOpen(data.open);\r\n }, []);\r\n const onOptionSelect = useCallback((event, data) => {\r\n setSelectedOptions(data.resolvedSelectedOptions);\r\n }, [setSelectedOptions]);\r\n const onDeleteItem = useCallback((index) => {\r\n const newSelectedOptions = clone(selectedOptions);\r\n newSelectedOptions.splice(index, 1);\r\n setSelectedOptions(newSelectedOptions);\r\n }, [selectedOptions, setSelectedOptions]);\r\n\r\n const renderMultiSelectCombobox = useCallback(() => (\r\n \r\n \r\n <>\r\n {isSearchFilterEmpty && isEmpty(options) && (\r\n
\r\n {i18n.getString(_TL_('Start typing to search for audiences'))}\r\n
\r\n )}\r\n {!isSearchFilterEmpty && isEmpty(options) && (\r\n
\r\n
\r\n {i18n.getString(_TL_('No audience found'))}\r\n
\r\n
\r\n )}\r\n {!isEmpty(options) && options.map(option => (\r\n \r\n ))}\r\n \r\n
\r\n \r\n ), [canUserStartOperating, comboboxId, i18n, isLoadingOptions, isComboboxOpen, isSearchFilterEmpty, onOpenChange, onOptionSelect, onSearchInputChange, options, searchFilter, selectedOptions, shouldDisableSelection, styles.NonOptionContent, styles.TypeInContent, styles.combobox, styles.listbox]);\r\n\r\n const renderTable = useCallback(() => (\r\n \r\n \r\n \r\n { TABLE_COLUMNS.map(column => (\r\n \r\n {i18n.getString(_TL_('{{label}}'), { label: column.label })}\r\n \r\n ))}\r\n \r\n \r\n \r\n { selectedOptions.map((option, index) => {\r\n const audienceName = option.text;\r\n let audienceType = option.type;\r\n if (!audienceType) {\r\n const found = options.find(o => o.key === option.key);\r\n audienceType = found ? found.type : ''; // Temporary fix for the case where the selected option is not included in the options list\r\n }\r\n return (\r\n \r\n {audienceName}\r\n {audienceType}\r\n { isAccountLevel && (\r\n \r\n \r\n }\r\n onClick={() => onDeleteItem(index)}\r\n />\r\n \r\n \r\n )}\r\n \r\n );\r\n })\r\n }\r\n \r\n
\r\n ), [i18n, isAccountLevel, onDeleteItem, options, selectedOptions, styles.audienceTable]);\r\n\r\n return (\r\n
\r\n {i18n.getString(_TL_('Existing audience lists'))}\r\n \r\n {i18n.getString(_TL_('Add an audience list to help us identify potential new customers.'))}\r\n {i18n.getString(_TL_(' Note: '))}\r\n {i18n.getString(_TL_('You can update your audience lists in '))}\r\n {i18n.getString(_TL_('Audiences'))}.\r\n \r\n { isAnyLoading && isFirstOptionsLoad && }\r\n { isAccountLevel && canUserStartOperating && renderMultiSelectCombobox() }\r\n { selectedOptions.length > 0 && renderTable() }\r\n {selectedOptions.length} {i18n.getString(_TL_('segment'))}\r\n
\r\n );\r\n};\r\n\r\nAudienceListSection.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n isAccountLevel: PropTypes.bool.isRequired,\r\n cid: PropTypes.number.isRequired,\r\n aid: PropTypes.number.isRequired,\r\n};\r\n","import { edmCampaign } from '@bingads-webui/edm-campaign';\r\nimport { isEmpty } from 'underscore';\r\n\r\nexport const loadAudiencesFactory = (cid, aid) => ({ searchFilter, top }) => {\r\n const payload = {\r\n top,\r\n count: true,\r\n audienceType: 'Remessaging,Product,Custom,CustomerList',\r\n deliverychannel: 'BingAds,AIM',\r\n filter: !isEmpty(searchFilter) ? { where: `contains(tolower(Name), '${searchFilter.toLocaleLowerCase().replace(/'/g, \"''\")}')` } : {},\r\n };\r\n\r\n return edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .Audiences\r\n .get(payload)\r\n .toPromise()\r\n .then(({ value }) => value.map(audience => ({\r\n key: audience.Id,\r\n text: audience.Name,\r\n type: audience.Type,\r\n })));\r\n};\r\n\r\nexport const loadAssociatedAudiencesFactory = (cid, aid) => () =>\r\n edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .NewCustomerAcquisitionGoals\r\n .get()\r\n .toPromise()\r\n .then(({ value }) => {\r\n if (value && value.length > 0 && value[0].Audiences) {\r\n return value[0].Audiences.map(audience => ({\r\n key: audience.Id,\r\n text: audience.Name,\r\n }));\r\n }\r\n return [];\r\n });\r\n\r\nexport const createOrUpdateNewCustomerAcquisitionGoal = ({ cid, aid }) => (payload) => {\r\n const edmEntityAccount = edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid);\r\n\r\n const createOrUpdateCall = payload && payload.NewCustomerAcquisitionGoals && payload.NewCustomerAcquisitionGoals.Id === -1\r\n ? edmEntityAccount.bulkCreate.bind(edmEntityAccount)\r\n : edmEntityAccount.bulkUpdate.bind(edmEntityAccount);\r\n\r\n return createOrUpdateCall(payload, {\r\n entityName: 'Model.NewCustomerAcquisitionGoal',\r\n });\r\n};\r\n","import React, { useCallback, useEffect, useMemo, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { pluck } from 'underscore';\r\nimport { Button, Divider, Text, makeStyles, mergeClasses, shorthands, tokens } from '@fluentui/react-components';\r\nimport { Drawer, DrawerBody, DrawerHeader, DrawerHeaderTitle, DrawerFooter } from '@fluentui/react-drawer';\r\nimport { MessageBar, MessageBarBody, MessageBarTitle } from '@fluentui/react-message-bar';\r\nimport { DismissRegular } from '@fluentui/react-icons';\r\nimport { UiBlocker } from '@bingads-webui-react/ui-blocker';\r\nimport { getBulkApiErrors } from '@bingads-webui-campaign/api-errors';\r\nimport { useMultiSelectContext } from '@bingads-webui-campaign-react/multi-selector';\r\nimport { ValidatedAdditionalConversionInput } from './additional-conversion-input-section';\r\nimport { AudienceListSection } from './audience-list-section';\r\nimport { createOrUpdateNewCustomerAcquisitionGoal } from '../data-source';\r\nimport { ADDITIONAL_CONVERSION_VALUE_TYPES } from '../constants';\r\n\r\nexport const useCustomerAcquisitionSetupStyle = makeStyles({\r\n rootContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n },\r\n bodyContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n ...shorthands.gap('16px'),\r\n '& .error-text': {\r\n color: tokens.colorPaletteRedForeground1,\r\n },\r\n },\r\n footerContainer: {\r\n position: 'absolute',\r\n bottom: '0px',\r\n left: '0px',\r\n },\r\n messageBar: {\r\n '& .fui-MessageBar__icon': {\r\n marginRight: '12px',\r\n },\r\n '& .fui-MessageBarBody': {\r\n whiteSpace: 'normal',\r\n paddingTop: '8px',\r\n paddingBottom: '8px',\r\n },\r\n },\r\n});\r\n\r\nconst getConversionValueOption = (CampaignSettings) => {\r\n if (CampaignSettings && CampaignSettings.additionalConversionValue) {\r\n return ADDITIONAL_CONVERSION_VALUE_TYPES.CAMPAIGN;\r\n }\r\n return ADDITIONAL_CONVERSION_VALUE_TYPES.ACCOUNT;\r\n};\r\n\r\nexport const CustomerAcquisitionSetup = (props) => {\r\n const {\r\n newCustomerAcquisition, isCampaignCreation, isAccountLevel, cid, aid, i18n,\r\n onChange: onChangeFromProp, isEditorOpen, onClose,\r\n } = props;\r\n const { accountSettings, campaignSettings } = newCustomerAcquisition || {};\r\n const styles = useCustomerAcquisitionSetupStyle();\r\n const { options, selectedOptions } = useMultiSelectContext();\r\n const selectedOptionKeys = useMemo(() => pluck(selectedOptions, 'key'), [selectedOptions]);\r\n const [accountBudgetInput, setAccountBudgetInput] = useState(accountSettings ? accountSettings.additionalConversionValue : null);\r\n const [campaignBudgetInput, setCampaignBudgetInput] = useState(campaignSettings ? campaignSettings.additionalConversionValue : null);\r\n const [conversionValueOption, setConversionValueOption] = useState(getConversionValueOption(campaignSettings));\r\n const [isUpdating, setIsUpdating] = useState(false);\r\n const [userErrors, setUserErrors] = useState([]);\r\n const [serverErrors, setServerErrors] = useState([]);\r\n const [shouldDisableSave, setShouldDisableSave] = useState(false);\r\n\r\n // Effect to determine if the save button should be disabled based on\r\n // the current option and validation errors\r\n useEffect(() => {\r\n if (selectedOptionKeys.length === 0) {\r\n // Always disable if no audience is selected\r\n setShouldDisableSave(true);\r\n return;\r\n }\r\n\r\n if (isAccountLevel) {\r\n const hasAccountBudgetError = !accountBudgetInput || userErrors.length > 0;\r\n setShouldDisableSave(hasAccountBudgetError);\r\n } else if (conversionValueOption === ADDITIONAL_CONVERSION_VALUE_TYPES.ACCOUNT) {\r\n // Campaign panel - use account-level option\r\n // No validation needed for account-level option in campaign context\r\n setShouldDisableSave(false);\r\n } else {\r\n // Campaign panel - use campaign override option\r\n // For campaign-level option, validate campaign budget\r\n const hasCampaignBudgetError = !campaignBudgetInput || userErrors.length > 0;\r\n setShouldDisableSave(hasCampaignBudgetError);\r\n }\r\n }, [isAccountLevel, conversionValueOption, userErrors, accountBudgetInput, campaignBudgetInput, selectedOptionKeys.length]);\r\n\r\n\r\n const onValidateBudgetInput = useCallback((result) => {\r\n const { data, messages } = result;\r\n const newAccountBudget = data ? data['account-setting'] : null;\r\n setAccountBudgetInput(newAccountBudget);\r\n const newCampaignBudget = data ? data['campaign-setting'] : null;\r\n setCampaignBudgetInput(newCampaignBudget);\r\n setUserErrors(messages);\r\n }, []);\r\n\r\n const onSave = useCallback(() => {\r\n if (!isAccountLevel) {\r\n onChangeFromProp({\r\n newCustomerAcquisition: {\r\n ...newCustomerAcquisition,\r\n campaignSettings: {\r\n ...newCustomerAcquisition.campaignSettings,\r\n additionalConversionValue: conversionValueOption === ADDITIONAL_CONVERSION_VALUE_TYPES.CAMPAIGN && campaignBudgetInput !== null ? parseFloat(campaignBudgetInput) : null,\r\n },\r\n },\r\n });\r\n onClose();\r\n return;\r\n }\r\n\r\n const payload = {\r\n NewCustomerAcquisitionGoals: [\r\n {\r\n Id: accountSettings && accountSettings.goalId ? accountSettings.goalId : -1,\r\n AudienceIds: selectedOptionKeys.join(';'),\r\n AdditionalConversionValue: parseFloat(accountBudgetInput),\r\n },\r\n ],\r\n };\r\n const saveCallPromise = createOrUpdateNewCustomerAcquisitionGoal({ cid, aid });\r\n setIsUpdating(true);\r\n saveCallPromise(payload)\r\n .then((result) => {\r\n if (result && result.NewCustomerAcquisitionGoals && result.NewCustomerAcquisitionGoals.length > 0) {\r\n const audienceIdList = result.NewCustomerAcquisitionGoals[0].AudienceIds.split(';');\r\n const newAccountSettings = {\r\n goalId: result.NewCustomerAcquisitionGoals[0].Id,\r\n additionalConversionValue: result.NewCustomerAcquisitionGoals[0].AdditionalConversionValue,\r\n audiences: options.filter(option => audienceIdList.includes(option.key.toString())).map(option => ({\r\n Id: option.key,\r\n Name: option.text,\r\n Type: option.type,\r\n })),\r\n };\r\n onChangeFromProp({\r\n newCustomerAcquisition: {\r\n ...newCustomerAcquisition,\r\n accountSettings: newAccountSettings,\r\n },\r\n });\r\n setServerErrors([]);\r\n }\r\n onClose();\r\n })\r\n .catch((e) => {\r\n if (e && e.errors && e.errors.length > 0) {\r\n setServerErrors(getBulkApiErrors(e.errors, 'New Customer Acquisition Goal', i18n));\r\n }\r\n })\r\n .finally(() => {\r\n setIsUpdating(false);\r\n });\r\n }, [accountBudgetInput, accountSettings, aid, campaignBudgetInput, cid, conversionValueOption, i18n, isAccountLevel, newCustomerAcquisition, onChangeFromProp, onClose, options, selectedOptionKeys]);\r\n\r\n return (\r\n \r\n \r\n \r\n }\r\n onClick={onClose}\r\n />\r\n }\r\n >\r\n {i18n.getString(_TL_('Set up new customer acquisition'))}\r\n \r\n \r\n \r\n { serverErrors.map(error => (\r\n { error.message }\r\n )) }\r\n { isCampaignCreation && isAccountLevel && (\r\n \r\n \r\n { i18n.getString(_TL_('Account-level settings: '))}\r\n {i18n.getString(_TL_('The additional conversion value and existing customer lists you set will be automatically saved at the account level. To make changes after saving, manage them on the Conversion Goals page.'))}\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\nCustomerAcquisitionSetup.propTypes = {\r\n newCustomerAcquisition: PropTypes.shape({\r\n isEnabled: PropTypes.bool,\r\n campaignSettings: PropTypes.shape({\r\n additionalConversionValue: PropTypes.number,\r\n bidOnlyMode: PropTypes.bool,\r\n goalId: PropTypes.number,\r\n }),\r\n accountSettings: PropTypes.shape({\r\n goalId: PropTypes.number,\r\n additionalConversionValue: PropTypes.number,\r\n audiences: PropTypes.arrayOf({\r\n Id: PropTypes.string,\r\n Name: PropTypes.string,\r\n }),\r\n }),\r\n }).isRequired,\r\n isCampaignCreation: PropTypes.bool.isRequired,\r\n isAccountLevel: PropTypes.bool.isRequired,\r\n cid: PropTypes.number.isRequired,\r\n aid: PropTypes.number.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n onClose: PropTypes.func.isRequired,\r\n isEditorOpen: PropTypes.bool.isRequired,\r\n};\r\n\r\n","/* eslint-disable react/prop-types */\r\nimport React from 'react';\r\nimport { Text, Link } from '@fluentui/react-components';\r\nimport { MessageBar, MessageBarBody } from '@fluentui/react-message-bar';\r\n\r\nexport const BiddingStrategyWarning = ({ style, i18n }) => (\r\n \r\n \r\n {i18n.getString(_TL_('To use this option, change bidding strategy to '))}\r\n {i18n.getString(_TL_('Maximize conversion value. '))}\r\n {i18n.getString(_TL_('Learn more'))}\r\n \r\n \r\n);\r\n\r\nexport const AccountLevelRequiredWarning = ({ style, i18n }) => (\r\n \r\n \r\n {i18n.getString(_TL_('You need to set up your customer acquisition settings at the account level.'))}\r\n \r\n \r\n);\r\n","import React, { useCallback, useState, useContext, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { MAX_CONVERSIONS_VALUE } from '@bingads-webui-campaign-react/bid-strategy-component';\r\nimport {\r\n Button, Label, Radio, RadioGroup, Text,\r\n makeStyles, mergeClasses, shorthands,\r\n} from '@fluentui/react-components';\r\nimport { Edit16Regular } from '@fluentui/react-icons';\r\nimport { TagGroup, Tag } from '@fluentui/react-tags';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { CustomerAcquisitionSetup } from './side-panel/customer-acquisition-setup';\r\nimport { NCA_STRATEGY_OPTIONS } from './constants';\r\nimport { AccountLevelRequiredWarning, BiddingStrategyWarning } from './message-bars';\r\n\r\nconst useNewCustomerAcquisitionStyle = makeStyles({\r\n radioGroupContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n ...shorthands.gap('8px'),\r\n '& input[type=\"radio\"]': {\r\n height: '20px',\r\n width: '20px',\r\n ...shorthands.margin('0px'),\r\n },\r\n '& .fui-Radio__indicator': {\r\n height: '20px',\r\n width: '20px',\r\n ...shorthands.margin('0px'),\r\n },\r\n '& label': {\r\n ...shorthands.padding('0px', '0px', '0px', '8px'),\r\n },\r\n },\r\n radioOption: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n ...shorthands.gap('8px'),\r\n '& .edit-button': {\r\n width: 'fit-content',\r\n ...shorthands.padding('4px', '6px'),\r\n },\r\n },\r\n additionalConversionValueContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n '& .info-row': {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n ...shorthands.gap('8px'),\r\n alignItems: 'center',\r\n },\r\n },\r\n existingAudiencesContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n '& .info-row': {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n flexWrap: 'wrap',\r\n ...shorthands.gap('6px'),\r\n marginTop: '2px',\r\n alignItems: 'center',\r\n },\r\n },\r\n messageBar: {\r\n '& .fui-MessageBar__icon': {\r\n marginRight: '12px',\r\n },\r\n '& .fui-MessageBarBody': {\r\n whiteSpace: 'normal',\r\n paddingTop: '8px',\r\n paddingBottom: '8px',\r\n fontSize: '12px',\r\n },\r\n },\r\n});\r\n\r\nexport const NewCustomerAcquisitionImpl = (props) => {\r\n const {\r\n newCustomerAcquisition, cid, aid, bidStrategy, optOut, i18n, onChange,\r\n } = props;\r\n const serverContext = useContext(ServerContext);\r\n const { CurrentAccount: { CurrencyCode } } = serverContext || {};\r\n const { campaignSettings, accountSettings } = newCustomerAcquisition || {};\r\n const { bidOnlyMode } = campaignSettings || {};\r\n\r\n const styles = useNewCustomerAcquisitionStyle();\r\n\r\n const [isSetupEditorOpen, setIsSetupEditorOpen] = useState(false);\r\n const onOpenSetupEditor = useCallback(() => setIsSetupEditorOpen(true), []);\r\n const onCloseSetupEditor = useCallback(() => setIsSetupEditorOpen(false), []);\r\n const hasValidationError = useMemo(() => !optOut && bidStrategy !== MAX_CONVERSIONS_VALUE.type && bidOnlyMode !== NCA_STRATEGY_OPTIONS.BID_ONLY, [optOut, bidStrategy, bidOnlyMode]);\r\n\r\n const onRadioChange = useCallback((_, data) => {\r\n onChange({\r\n newCustomerAcquisition: {\r\n ...newCustomerAcquisition,\r\n campaignSettings: {\r\n ...campaignSettings,\r\n bidOnlyMode: data.value === NCA_STRATEGY_OPTIONS.BID_ONLY,\r\n },\r\n },\r\n }, hasValidationError ? [i18n.getString(_TL_('To use this option, change bidding strategy to Maximize conversion value.'))] : []);\r\n }, [campaignSettings, newCustomerAcquisition, onChange, hasValidationError, i18n]);\r\n\r\n const renderSettings = useCallback(() => (\r\n <>\r\n { !bidOnlyMode && accountSettings && accountSettings.additionalConversionValue &&\r\n (\r\n
\r\n \r\n {i18n.getString(_TL_('Conversion value for new customers'))}\r\n \r\n
\r\n { campaignSettings && campaignSettings.additionalConversionValue !== null\r\n ? (\r\n {i18n.formatCurrency(Number(campaignSettings.additionalConversionValue.toFixed(2)), CurrencyCode)}\r\n )\r\n : (\r\n <>\r\n {i18n.formatCurrency(Number(accountSettings.additionalConversionValue.toFixed(2)), CurrencyCode)}\r\n {i18n.getString(_TL_('(Account-level setting)'))}\r\n \r\n )\r\n }\r\n
\r\n
\r\n )\r\n }\r\n { accountSettings && accountSettings.audiences && accountSettings.audiences.length > 0 &&\r\n (\r\n
\r\n \r\n {i18n.getString(_TL_('Existing audience lists'))}\r\n \r\n \r\n { accountSettings.audiences.map(audience => (\r\n {audience.Name}\r\n )) }\r\n \r\n
\r\n )\r\n }\r\n \r\n ), [CurrencyCode, accountSettings, bidOnlyMode, campaignSettings, i18n, onOpenSetupEditor, optOut, styles.additionalConversionValueContainer, styles.existingAudiencesContainer]);\r\n\r\n const renderEditorButton = useCallback(() => (\r\n \r\n \r\n {i18n.getString(_TL_('Set up new customer acquisition'))}\r\n \r\n \r\n ), [i18n, onOpenSetupEditor, optOut]);\r\n\r\n const renderBidHigher = useCallback(() => (\r\n \r\n \r\n {i18n.getString(_TL_('Increase bids for new customers '))}\r\n \r\n <>\r\n { hasValidationError && }\r\n { !bidOnlyMode && !optOut && !accountSettings && }\r\n { !bidOnlyMode && accountSettings ? renderSettings() : renderEditorButton() }\r\n \r\n
\r\n }\r\n />\r\n ), [optOut, styles.radioOption, styles.messageBar, i18n, bidOnlyMode, hasValidationError, accountSettings, renderSettings, renderEditorButton]);\r\n\r\n const renderBidOnly = useCallback(() => (\r\n \r\n \r\n {i18n.getString(_TL_('Bid only for new customers'))}\r\n \r\n { bidOnlyMode && (\r\n <>\r\n { !optOut && !accountSettings && }\r\n { accountSettings ? renderSettings() : renderEditorButton() }\r\n \r\n )}\r\n \r\n }\r\n />\r\n ), [optOut, styles.radioOption, styles.messageBar, i18n, bidOnlyMode, accountSettings, renderSettings, renderEditorButton]);\r\n\r\n const renderEditor = useCallback(() => (\r\n \r\n ), [newCustomerAcquisition, accountSettings, cid, aid, i18n, onChange, isSetupEditorOpen, onCloseSetupEditor]);\r\n\r\n return (\r\n
\r\n \r\n \r\n {renderBidHigher()}\r\n {renderBidOnly()}\r\n {renderEditor()}\r\n \r\n
\r\n );\r\n};\r\n\r\nNewCustomerAcquisitionImpl.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n formatCurrency: PropTypes.func,\r\n }).isRequired,\r\n newCustomerAcquisition: PropTypes.shape({\r\n campaignSettings: PropTypes.shape({\r\n additionalConversionValue: PropTypes.number,\r\n bidOnlyMode: PropTypes.bool,\r\n goalId: PropTypes.number,\r\n }),\r\n accountSettings: PropTypes.shape({\r\n additionalConversionValue: PropTypes.number,\r\n audiences: PropTypes.arrayOf({\r\n Id: PropTypes.number,\r\n Name: PropTypes.string,\r\n }),\r\n goalId: PropTypes.number,\r\n }),\r\n }).isRequired,\r\n cid: PropTypes.number.isRequired,\r\n aid: PropTypes.number.isRequired,\r\n bidStrategy: PropTypes.string.isRequired,\r\n optOut: PropTypes.bool.isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n};\r\n","import React, { useCallback, useContext, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { withCustomValidation } from '@bingads-webui-react/validation';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport {\r\n MultiSelectorContextProvider,\r\n makeUseOptionsAsyncDataSource,\r\n makeUseSelectedOptionsAsyncDataSource,\r\n} from '@bingads-webui-campaign-react/multi-selector';\r\nimport { NewCustomerAcquisitionImpl } from './new-customer-acquisition-impl';\r\nimport { loadAudiencesFactory, loadAssociatedAudiencesFactory } from './data-source';\r\n\r\nconst DEFAULT_OPTION_DISPLAY_LIMIT = 20;\r\nconst DEFAULT_SELECTED_OPTIONS_LIMIT = 5;\r\n\r\nconst NewCustomerAcquisition = ({\r\n cid,\r\n aid,\r\n bidStrategy,\r\n optOut,\r\n validationProps,\r\n updateValidation,\r\n}) => {\r\n const activity = useContext(ActivityContext);\r\n const i18n = useContext(I18nContext);\r\n const { data: { newCustomerAcquisition } } = validationProps;\r\n\r\n const loadAudiences = useMemo(() => loadAudiencesFactory(cid, aid), [cid, aid]);\r\n const useOptions = useMemo(() => makeUseOptionsAsyncDataSource(loadAudiences), [loadAudiences]);\r\n\r\n const loadAssociatedAudiences = useMemo(() => loadAssociatedAudiencesFactory(cid, aid), [cid, aid]);\r\n const useSelectedOptions = useMemo(() => makeUseSelectedOptionsAsyncDataSource(loadAssociatedAudiences), [loadAssociatedAudiences]);\r\n\r\n const onChange = useCallback((newData, errorMessages) => {\r\n updateValidation(errorMessages, newData);\r\n if (activity) {\r\n activity.signal(`onNewCustomerAcquisitionChange - ${JSON.stringify(newData)}`);\r\n }\r\n }, [updateValidation, activity]);\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nNewCustomerAcquisition.propTypes = {\r\n cid: PropTypes.number.isRequired,\r\n aid: PropTypes.number.isRequired,\r\n bidStrategy: PropTypes.string.isRequired,\r\n optOut: PropTypes.bool.isRequired,\r\n validationProps: PropTypes.shape({\r\n data: PropTypes.shape({\r\n newCustomerAcquisition: PropTypes.shape({\r\n campaignSettings: PropTypes.shape({\r\n additionalConversionValue: PropTypes.number,\r\n bidOnlyMode: PropTypes.bool,\r\n goalId: PropTypes.number,\r\n }),\r\n accountSettings: PropTypes.shape({\r\n additionalConversionValue: PropTypes.number,\r\n audiences: PropTypes.arrayOf({\r\n Id: PropTypes.number,\r\n Name: PropTypes.string,\r\n }),\r\n goalId: PropTypes.number,\r\n }),\r\n }),\r\n }),\r\n }).isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n};\r\n\r\nexport const ValidatedNewCustomerAcquisition = withCustomValidation(NewCustomerAcquisition);\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { TextTitle } from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { Label, Stack, Toggle } from '@bingads-webui-react/fabric-control';\r\nimport { withCustomValidation } from '@bingads-webui-react/validation';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\n\r\nconst Title = ({ titleKey }) => {\r\n const i18n = useContext(I18nContext);\r\n const titleText = i18n.getString(titleKey);\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nTitle.propTypes = {\r\n titleKey: PropTypes.string.isRequired,\r\n};\r\n\r\nconst NewCustomerAcquisitionHeader = ({ validationProps, updateValidation }) => {\r\n const { data: { newCustomerAcquisitionOptOut } } = validationProps;\r\n const activity = useContext(ActivityContext);\r\n\r\n const onToggleChange = (e, checked) => {\r\n updateValidation([], { newCustomerAcquisitionOptOut: !checked });\r\n if (activity) {\r\n activity.signal(`onNewCustomerAcquisitionChanged - isNewCustomerAcquisitionEnabled: ${checked}`);\r\n }\r\n e.stopPropagation();\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nNewCustomerAcquisitionHeader.propTypes = {\r\n validationProps: PropTypes.shape({\r\n data: PropTypes.shape({\r\n newCustomerAcquisitionOptOut: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n};\r\n\r\n\r\nexport const ValidatedNewCustomerAcquisitionHeader = withCustomValidation(NewCustomerAcquisitionHeader);\r\n","export const PERFORMANCE_INSIGHTS_TYPE = {\r\n ISSUE: 'issue',\r\n RECOMMENDATION: 'recommendation',\r\n};\r\nexport const PERFORMANCE_INSIGHTS_ISSUE = {\r\n BUDGET: 'BudgetConstraint',\r\n BID: 'LimitedByAutoBidTargetPerf',\r\n};\r\nexport const PERFORMANCE_INSIGHTS_ACTION = {\r\n VIEW_ALL_ISSUES: _TL_('View all issues'),\r\n SAVE_CHANGES: _TL_('Save changes'),\r\n VIEW_RECOMMENDATIONS: _TL_('View recommendations'),\r\n VIEW_RECOMMENDATION: _TL_('View recommendation'),\r\n APPLY_RECOMMENDATION: _TL_('Apply recommendation'),\r\n CLOSE: _TL_('Close'),\r\n};\r\nexport const PERFORMANCE_INSIGHTS_POPUP_CONFIG = {\r\n [PERFORMANCE_INSIGHTS_TYPE.ISSUE]: {\r\n [PERFORMANCE_INSIGHTS_ISSUE.BUDGET]: {\r\n title: _TL_('Campaign performance is limited by budget'),\r\n chartTitle: _TL_('Impressions between {{startDate}} and {{endDate}}'),\r\n description: _TL_('Your campaign is estimated to miss {{missedImpressions}} impressions on {{endDate}} due to this issue.'),\r\n pitching: _TL_('It is expected that your ads would be shown more with a new campaign budget in next several weeks.'),\r\n actionDetails: [\r\n _TL_('Increase your campaign budget from {{actualBudget}} to {{recommendedBudget}}'),\r\n ],\r\n action: PERFORMANCE_INSIGHTS_ACTION.VIEW_ALL_ISSUES,\r\n },\r\n [PERFORMANCE_INSIGHTS_ISSUE.BID]: {\r\n title: _TL_('Campaign performance is limited by target CPA'),\r\n chartTitle: _TL_('Conversions between {{startDate}} and {{endDate}}'),\r\n description: _TL_('Your campaign is estimated to miss out {{missedConversions}} conversions between {{startDate}} and {{endDate}} due to this issue.'),\r\n pitching: _TL_('It is expected that your ads will show more with a new CPA target value in next several weeks.'),\r\n actionDetails: [\r\n _TL_('Set target CPA from {{latestActualTarget}} to {{latestSuggestTarget}} to remove the constraint'),\r\n _TL_('Set target CPA from {{latestActualTarget}} to {{verticalTarget}}, as {{verticalPercentage}}% of competing campaigns do'),\r\n ],\r\n action: PERFORMANCE_INSIGHTS_ACTION.VIEW_ALL_ISSUES,\r\n },\r\n },\r\n};\r\n\r\nexport const PERFORMANCE_INSIGHTS_PANEL_CONTAINER = '.performance-insights-popover-container';\r\n","import { mergeStyleSets } from '@fluentui/react';\r\n\r\nexport const calloutStyles = mergeStyleSets({\r\n callout: {\r\n width: '325px',\r\n minHeight: '134px',\r\n height: 'fit-content',\r\n padding: '16px 24px 16px 24px',\r\n fontSize: '12px',\r\n '& .block-ui': {\r\n marginTop: '45px',\r\n },\r\n '& button': {\r\n color: '#ffffff',\r\n height: '24px',\r\n padding: '2px 8px 2px 8px',\r\n borderRadius: '4px',\r\n backgroundColor: '#0078d4',\r\n },\r\n '& .fui-Caption1Stronger': {\r\n fontWeight: '600',\r\n },\r\n '& .ms-Stack': {\r\n marginTop: '8px',\r\n marginBottom: '8px',\r\n },\r\n },\r\n container: {},\r\n});\r\n\r\nexport const getPanelStyles = () => ({\r\n '@global': {\r\n '.side-panel-performance-insights.panel-right .panel-content': {\r\n '& .panel-body': {\r\n width: 840,\r\n paddingLeft: 24,\r\n paddingRight: 24,\r\n display: 'flex',\r\n height: 'calc(100% - 56px)',\r\n overflow: 'hidden',\r\n marginBottom: 0,\r\n },\r\n '& .panel-header': {\r\n paddingLeft: 24,\r\n },\r\n '& .react-block-ui-none, .react-block-ui': {\r\n display: 'flex',\r\n height: '100%',\r\n },\r\n },\r\n },\r\n flexContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n },\r\n});\r\n","/* eslint-disable import/extensions */\r\n/* eslint-disable import/no-unresolved */\r\nimport React, { useState, useCallback } from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { Stack } from '@fluentui/react';\r\nimport {\r\n Button,\r\n Caption1Stronger,\r\n Caption1,\r\n makeStyles,\r\n FluentProvider,\r\n webLightTheme,\r\n mergeClasses,\r\n Divider,\r\n Radio,\r\n RadioGroup,\r\n} from '@fluentui/react-components';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { Panel } from '@bingads-webui-campaign-react/panel';\r\nimport { ComponentSettings, ThemeFluent } from '@bingads-webui-theme-2018/theme-fluent';\r\nimport { ThemeProvider } from 'react-jss';\r\nimport { Surface } from '@bingads-webui-fluent-component/surface';\r\nimport {\r\n LineChart,\r\n} from '@fluentui/react-charting';\r\nimport { LearnMoreLink } from '@bingads-webui-campaign-react/help';\r\nimport ReactDOM from 'react-dom';\r\n\r\nimport { getPanelStyles } from './style/style';\r\nimport {\r\n PERFORMANCE_INSIGHTS_ISSUE,\r\n PERFORMANCE_INSIGHTS_TYPE,\r\n PERFORMANCE_INSIGHTS_POPUP_CONFIG,\r\n PERFORMANCE_INSIGHTS_PANEL_CONTAINER,\r\n} from './constants/consts';\r\n\r\nconst useStyles = makeStyles({\r\n inlineChart: {\r\n width: '500px',\r\n height: '290px',\r\n },\r\n});\r\n\r\nexport const PerformanceInsightsPanel = (props) => {\r\n const { allData, newI18n, entity } = props;\r\n const [isPanelOpen, setIsPanelOpen] = useState(true);\r\n const onCancel = useCallback(() => {\r\n ReactDOM.unmountComponentAtNode(document.querySelector(PERFORMANCE_INSIGHTS_PANEL_CONTAINER));\r\n setIsPanelOpen(false);\r\n }, []);\r\n const classes = useDefaultStyles(getPanelStyles);\r\n const getColor = useCallback((metricName) => {\r\n if (metricName === 'Actual') {\r\n return 'rgba(227, 0, 140, 1)';\r\n } else if (metricName === 'CTR') {\r\n return 'rgba(99, 124, 239, 1)';\r\n } else if (metricName === 'Impressions') {\r\n return 'rgba(42, 160, 164, 1)';\r\n }\r\n return 'gray';\r\n }, []);\r\n\r\n const budgetResult = [];\r\n budgetResult.push({\r\n legend: 'Actual',\r\n data: allData[PERFORMANCE_INSIGHTS_ISSUE.BUDGET].actualBudgetPoints,\r\n color: getColor('Actual'),\r\n lineOptions: {\r\n strokeWidth: '2px',\r\n },\r\n });\r\n budgetResult.push({\r\n legend: 'Estimation',\r\n legendShape: 'dottedLine',\r\n data: allData[PERFORMANCE_INSIGHTS_ISSUE.BUDGET].estimatedBudgetPoints,\r\n color: 'gray',\r\n lineOptions: {\r\n strokeDasharray: '2px',\r\n strokeDashoffset: '-1',\r\n strokeLinecap: 'butt',\r\n strokeWidth: '2px',\r\n },\r\n });\r\n const bidResult = [];\r\n bidResult.push({\r\n legend: 'Actual',\r\n data: allData[PERFORMANCE_INSIGHTS_ISSUE.BID].actualBidPoints,\r\n color: getColor('Actual'),\r\n lineOptions: {\r\n strokeWidth: '2px',\r\n },\r\n });\r\n bidResult.push({\r\n legend: 'Estimation',\r\n legendShape: 'dottedLine',\r\n data: allData[PERFORMANCE_INSIGHTS_ISSUE.BID].estimatedBidPoints,\r\n color: 'gray',\r\n lineOptions: {\r\n strokeDasharray: '2px',\r\n strokeDashoffset: '-1',\r\n strokeLinecap: 'butt',\r\n strokeWidth: '2px',\r\n },\r\n });\r\n const budgetChartData = {\r\n chartTitle: newI18n.getString(\r\n PERFORMANCE_INSIGHTS_POPUP_CONFIG[PERFORMANCE_INSIGHTS_TYPE.ISSUE][PERFORMANCE_INSIGHTS_ISSUE.BUDGET].chartTitle,\r\n allData[PERFORMANCE_INSIGHTS_ISSUE.BUDGET]\r\n ),\r\n lineChartData: budgetResult,\r\n };\r\n const bidChartData = {\r\n chartTitle: newI18n.getString(\r\n PERFORMANCE_INSIGHTS_POPUP_CONFIG[PERFORMANCE_INSIGHTS_TYPE.ISSUE][PERFORMANCE_INSIGHTS_ISSUE.BID].chartTitle,\r\n allData[PERFORMANCE_INSIGHTS_ISSUE.BID]\r\n ),\r\n lineChartData: bidResult,\r\n };\r\n const chartClasses = useStyles();\r\n const colorFillBarData = [\r\n {\r\n legend: 'Time range 1',\r\n color: '#EEACB2',\r\n data: [\r\n {\r\n startX: allData[PERFORMANCE_INSIGHTS_ISSUE.BUDGET].actualBudgetPoints[5].x,\r\n endX: allData[PERFORMANCE_INSIGHTS_ISSUE.BUDGET].actualBudgetPoints[6].x,\r\n },\r\n ],\r\n },\r\n ];\r\n return (\r\n {newI18n.getString(_TL_('Insights of {{campaignName}}'), { campaignName: entity.Name })}}\r\n className={classes}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n {\r\n newI18n.getString(_TL_('{{campaignName}}\\'s clicks are dropping. To revert the negative trend, you\\'re highly recommended to fix all health check issues to unblock campaign performance. You can follow below instructions to fix it now.'), { campaignName: entity.Name })\r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n newI18n.getString(PERFORMANCE_INSIGHTS_POPUP_CONFIG[PERFORMANCE_INSIGHTS_TYPE.ISSUE][PERFORMANCE_INSIGHTS_ISSUE.BUDGET].title)\r\n }\r\n \r\n \r\n \r\n \r\n \r\n point.x)}\r\n colorFillBars={colorFillBarData}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n newI18n.getString(PERFORMANCE_INSIGHTS_POPUP_CONFIG[PERFORMANCE_INSIGHTS_TYPE.ISSUE][PERFORMANCE_INSIGHTS_ISSUE.BUDGET].description, allData[PERFORMANCE_INSIGHTS_ISSUE.BUDGET])\r\n }\r\n \r\n \r\n \r\n \r\n {\r\n newI18n.getString(PERFORMANCE_INSIGHTS_POPUP_CONFIG[PERFORMANCE_INSIGHTS_TYPE.ISSUE][PERFORMANCE_INSIGHTS_ISSUE.BUDGET].pitching)\r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n {newI18n.getString(_TL_('What you can do next:'))}\r\n \r\n \r\n \r\n {\r\n newI18n.getString(PERFORMANCE_INSIGHTS_POPUP_CONFIG[PERFORMANCE_INSIGHTS_TYPE.ISSUE][PERFORMANCE_INSIGHTS_ISSUE.BUDGET].actionDetails[0], allData[PERFORMANCE_INSIGHTS_ISSUE.BUDGET])\r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {newI18n.getString(PERFORMANCE_INSIGHTS_POPUP_CONFIG[PERFORMANCE_INSIGHTS_TYPE.ISSUE][PERFORMANCE_INSIGHTS_ISSUE.BID].title)}\r\n \r\n \r\n point.x)}\r\n />\r\n \r\n \r\n \r\n \r\n {newI18n.getString(PERFORMANCE_INSIGHTS_POPUP_CONFIG[PERFORMANCE_INSIGHTS_TYPE.ISSUE][PERFORMANCE_INSIGHTS_ISSUE.BID].description, allData[PERFORMANCE_INSIGHTS_ISSUE.BID])}\r\n {newI18n.getString(PERFORMANCE_INSIGHTS_POPUP_CONFIG[PERFORMANCE_INSIGHTS_TYPE.ISSUE][PERFORMANCE_INSIGHTS_ISSUE.BID].pitching)}\r\n \r\n {newI18n.getString(_TL_('What you can do next:'))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\nPerformanceInsightsPanel.propTypes = {\r\n allData: PropTypes.shape({}).isRequired,\r\n newI18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n entity: PropTypes.shape({\r\n Name: PropTypes.string,\r\n }).isRequired,\r\n};\r\n","/* eslint-disable react-hooks/exhaustive-deps */\r\nimport React, { useEffect, useState } from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport ReactDOM from 'react-dom';\r\nimport { DirectionalHint, Callout, Stack, Spinner } from '@fluentui/react';\r\nimport BlockUi from 'react-block-ui';\r\nimport {\r\n Button,\r\n Caption1Stronger,\r\n Caption1,\r\n} from '@fluentui/react-components';\r\n\r\nimport { fetchPerformanceInsightsData } from './util/service';\r\nimport { normalizeData } from './util/util';\r\nimport {\r\n PERFORMANCE_INSIGHTS_TYPE,\r\n PERFORMANCE_INSIGHTS_ISSUE,\r\n PERFORMANCE_INSIGHTS_POPUP_CONFIG,\r\n PERFORMANCE_INSIGHTS_PANEL_CONTAINER,\r\n} from './constants/consts';\r\nimport { calloutStyles } from './style/style';\r\nimport { PerformanceInsightsPanel } from './performance-insights-panel';\r\n\r\nexport const PerformanceInsightsToolTipCard = (props) => {\r\n const {\r\n event,\r\n closePerformanceInsightsPopup,\r\n i18n,\r\n newI18n,\r\n entity,\r\n serverContext,\r\n } = props;\r\n const [isBlocking, setIsBlocking] = useState(true);\r\n const [allData, setAllData] = useState(null);\r\n const onClick = () => {\r\n closePerformanceInsightsPopup();\r\n ReactDOM.render(\r\n (),\r\n document.querySelector(PERFORMANCE_INSIGHTS_PANEL_CONTAINER)\r\n );\r\n };\r\n useEffect(() => {\r\n fetchPerformanceInsightsData({ serverContext }).then((value) => {\r\n let result = {};\r\n if (value && !_.isEmpty(value.CheckpointResults)) {\r\n value.CheckpointResults.push({\r\n CheckpointDataMap: [\r\n {\r\n CheckpointDataJsonString: '[{\"AccountId\":334,\"CampaignId\":614007743,\"MaxDate\":\"2/27/2025 4:00:00 PM\",\"minDate\":\"2/21/2025 4:00:00 PM\",\"OriginalBudget\":100,\"RecommendedBudget\":121,\"MissingImpressions\":386,\"MissingClicks\":31.87280701754385964912280701,\"BudgetPoints\":[{\"Date\":\"2025-03-06T00:00:00\",\"Impressions\":2522,\"Clicks\":208,\"ProjectedImpressionsRecommendedBudget\":2908,\"ProjectedClicksRecommendedBudget\":240},{\"Date\":\"2025-03-05T00:00:00\",\"Impressions\":2610,\"Clicks\":237,\"ProjectedImpressionsRecommendedBudget\":2912,\"ProjectedClicksRecommendedBudget\":264},{\"Date\":\"2025-03-04T00:00:00\",\"Impressions\":3038,\"Clicks\":229,\"ProjectedImpressionsRecommendedBudget\":3428,\"ProjectedClicksRecommendedBudget\":258},{\"Date\":\"2025-03-03T00:00:00\",\"Impressions\":2587,\"Clicks\":193,\"ProjectedImpressionsRecommendedBudget\":3031,\"ProjectedClicksRecommendedBudget\":226},{\"Date\":\"2025-03-02T00:00:00\",\"Impressions\":2312,\"Clicks\":192,\"ProjectedImpressionsRecommendedBudget\":2653,\"ProjectedClicksRecommendedBudget\":220},{\"Date\":\"2025-03-01T00:00:00\",\"Impressions\":2448,\"Clicks\":183,\"ProjectedImpressionsRecommendedBudget\":2539,\"ProjectedClicksRecommendedBudget\":190},{\"Date\":\"2025-02-28T00:00:00\",\"Impressions\":1893,\"Clicks\":136,\"ProjectedImpressionsRecommendedBudget\":2113,\"ProjectedClicksRecommendedBudget\":152}]}]',\r\n },\r\n ],\r\n CheckpointKey: 'BudgetConstraint',\r\n });\r\n result = normalizeData({ checkpointResults: value.CheckpointResults, i18n, serverContext });\r\n }\r\n setAllData(result);\r\n setIsBlocking(false);\r\n });\r\n }, []);\r\n // TODO: get type and subType from real api\r\n const type = PERFORMANCE_INSIGHTS_TYPE.ISSUE;\r\n const subType = PERFORMANCE_INSIGHTS_ISSUE.BUDGET;\r\n return (\r\n
\r\n \r\n }>\r\n {!isBlocking &&\r\n \r\n {newI18n.getString(PERFORMANCE_INSIGHTS_POPUP_CONFIG[type][subType].title)}\r\n \r\n {newI18n.getString(PERFORMANCE_INSIGHTS_POPUP_CONFIG[type][subType].description, allData[subType])}\r\n {newI18n.getString(PERFORMANCE_INSIGHTS_POPUP_CONFIG[type][subType].pitching)}\r\n \r\n \r\n \r\n }\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nPerformanceInsightsToolTipCard.propTypes = {\r\n event: PropTypes.shape({\r\n target: PropTypes.shape({}).isRequired,\r\n }).isRequired,\r\n closePerformanceInsightsPopup: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n formatDate: PropTypes.func.isRequired,\r\n }).isRequired,\r\n newI18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n entity: PropTypes.shape({}).isRequired,\r\n serverContext: PropTypes.shape({\r\n CurrentAccount: PropTypes.shape({\r\n TimeZone: PropTypes.string.isRequired,\r\n }).isRequired,\r\n }).isRequired,\r\n};\r\n","import { odata } from '@bingads-webui/http-util';\r\nimport _ from 'underscore';\r\n\r\nexport const fetchPerformanceInsightsData = ({ serverContext }) => {\r\n const odataPath = 'AdInsight/V2';\r\n const oDataConfig = {\r\n odataToken: serverContext.Token,\r\n odataPath: `${serverContext.ServicesEndpoints.AdInsightAPI}${odataPath}`,\r\n };\r\n const oDataOptions = {\r\n contentType: 'application/json',\r\n path: oDataConfig.odataPath,\r\n oDataToken: oDataConfig.odataToken,\r\n };\r\n const baseURL = `${oDataConfig.odataPath}/CheckPointEntities/HealthCheck.GetHealthCheckDataV2`;\r\n const payload = {\r\n CheckpointEntities: [\r\n {\r\n CheckpointEntityId: 20358,\r\n CheckpointEntityLevel: 'Campaign',\r\n },\r\n ],\r\n CheckpointIdentifiers: [\r\n {\r\n CheckpointKey: 'LimitedByAutoBidTargetPerf',\r\n CheckpointDataTypes: ['SummaryView'],\r\n },\r\n {\r\n CheckpointKey: 'BudgetConstraint',\r\n CheckpointDataTypes: ['SummaryView'],\r\n },\r\n ],\r\n };\r\n const options = _.extend(\r\n {},\r\n oDataOptions,\r\n {\r\n url: baseURL,\r\n data: payload,\r\n }\r\n );\r\n return odata.post(options);\r\n};\r\n","import _ from 'underscore';\r\nimport { parseSync } from '@bingads-webui/safe-json';\r\nimport { fromLegacyTimeZone, toIANATimeZone } from '@bingads-webui-universal/time-zone-converter';\r\n\r\nexport const getColor = (metricName) => {\r\n if (metricName === 'Actual') {\r\n return 'rgba(227, 0, 140, 1)';\r\n } else if (metricName === 'CTR') {\r\n return 'rgba(99, 124, 239, 1)';\r\n } else if (metricName === 'Impressions') {\r\n return 'rgba(42, 160, 164, 1)';\r\n }\r\n return 'gray';\r\n};\r\n\r\nexport const normalizeData = ({ checkpointResults, i18n, serverContext }) => {\r\n const result = {};\r\n _.each(checkpointResults, (checkpointResult) => {\r\n const { CheckpointDataMap, CheckpointKey } = checkpointResult;\r\n const { CheckpointDataJsonString } = CheckpointDataMap[0];\r\n const CheckpointData = parseSync(CheckpointDataJsonString);\r\n let normalizedData = {};\r\n if (CheckpointKey === 'LimitedByAutoBidTargetPerf') {\r\n const { BidPoints } = CheckpointData[0];\r\n const reversedBidPoints = BidPoints.reverse();\r\n normalizedData = {\r\n startDate: i18n.formatDate(new Date(_.first(reversedBidPoints).Date), {\r\n skeleton: 'yMd',\r\n timeZone: toIANATimeZone(fromLegacyTimeZone(_.get(serverContext, ['CurrentAccount', 'TimeZone']))),\r\n }),\r\n endDate: i18n.formatDate(new Date(_.last(reversedBidPoints).Date), {\r\n skeleton: 'yMd',\r\n timeZone: toIANATimeZone(fromLegacyTimeZone(_.get(serverContext, ['CurrentAccount', 'TimeZone']))),\r\n }),\r\n missedConversions: CheckpointData[0].MissingConversion,\r\n latestActualTarget: CheckpointData[0].LatestActualTarget,\r\n latestSuggestTarget: CheckpointData[0].LatestSuggestTarget,\r\n verticalTarget: CheckpointData[0].VerticalTarget,\r\n verticalPercentage: CheckpointData[0].VerticalPercentage,\r\n actualBidPoints: _.map(reversedBidPoints, point => ({\r\n x: new Date(i18n.formatDate(new Date(point.Date), {\r\n raw: 'yyyy-MM-dd',\r\n timeZone: toIANATimeZone(fromLegacyTimeZone(_.get(serverContext, ['CurrentAccount', 'TimeZone']))),\r\n })),\r\n y: point.Actual_Conversion,\r\n })),\r\n estimatedBidPoints: _.map(reversedBidPoints, point => ({\r\n x: new Date(i18n.formatDate(new Date(point.Date), {\r\n raw: 'yyyy-MM-dd',\r\n timeZone: toIANATimeZone(fromLegacyTimeZone(_.get(serverContext, ['CurrentAccount', 'TimeZone']))),\r\n })),\r\n y: point.Estimate_Conversion,\r\n })),\r\n };\r\n } else if (CheckpointKey === 'BudgetConstraint') {\r\n const { BudgetPoints } = CheckpointData[0];\r\n const reversedBudgetPoints = BudgetPoints.reverse();\r\n normalizedData = {\r\n startDate: i18n.formatDate(new Date(_.first(reversedBudgetPoints).Date), {\r\n skeleton: 'yMd',\r\n timeZone: toIANATimeZone(fromLegacyTimeZone(_.get(serverContext, ['CurrentAccount', 'TimeZone']))),\r\n }),\r\n endDate: i18n.formatDate(new Date(_.last(reversedBudgetPoints).Date), {\r\n skeleton: 'yMd',\r\n timeZone: toIANATimeZone(fromLegacyTimeZone(_.get(serverContext, ['CurrentAccount', 'TimeZone']))),\r\n }),\r\n missedImpressions: CheckpointData[0].MissingImpressions,\r\n actualBudget: CheckpointData[0].OriginalBudget,\r\n recommendedBudget: CheckpointData[0].RecommendedBudget,\r\n actualBudgetPoints: _.map(reversedBudgetPoints, point => ({\r\n x: new Date(i18n.formatDate(new Date(point.Date), {\r\n raw: 'yyyy-MM-dd',\r\n timeZone: toIANATimeZone(fromLegacyTimeZone(_.get(serverContext, ['CurrentAccount', 'TimeZone']))),\r\n })),\r\n y: point.Impressions,\r\n })),\r\n estimatedBudgetPoints: _.map(reversedBudgetPoints, point => ({\r\n x: new Date(i18n.formatDate(new Date(point.Date), {\r\n raw: 'yyyy-MM-dd',\r\n timeZone: toIANATimeZone(fromLegacyTimeZone(_.get(serverContext, ['CurrentAccount', 'TimeZone']))),\r\n })),\r\n y: point.ProjectedImpressionsRecommendedBudget,\r\n })),\r\n };\r\n }\r\n result[CheckpointKey] = normalizedData;\r\n });\r\n return result;\r\n};\r\n","import React, { useContext } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { registerIcons } from '@fluentui/style-utilities';\r\nimport SparkleImg from './sparkle.svg';\r\n\r\nexport const SparkleIcon = () => {\r\n const i18n = useContext(I18nContext);\r\n return (\r\n {i18n.getString(_TL_('sparkle\r\n );\r\n};\r\n\r\nregisterIcons({\r\n icons: {\r\n 'sparkle-svg': ,\r\n },\r\n});\r\n\r\nexport const SparkleImgSVGIcon = 'sparkle-svg';\r\nexport const SparkleImgIcon = SparkleImg;\r\n","export const Status = {\r\n Active: 'Active',\r\n Pending: 'Pending',\r\n Warning: 'Warning',\r\n Error: 'Error',\r\n};\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nconst parentShared = {\r\n height: '20px',\r\n width: '20px',\r\n ...shorthands.borderRadius('50%'),\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n};\r\n\r\nexport const useStyles = makeStyles({\r\n parentActive: {\r\n ...parentShared,\r\n backgroundColor: '#dff6dd',\r\n },\r\n parentPending: {\r\n ...parentShared,\r\n backgroundColor: '#EFF6FC',\r\n },\r\n parentWarning: {\r\n ...parentShared,\r\n backgroundColor: '#FFF4CE',\r\n },\r\n parentError: {\r\n ...parentShared,\r\n backgroundColor: '#FDE7E9',\r\n },\r\n childActive: {\r\n color: '#107C10',\r\n },\r\n childPending: {\r\n color: '#004578',\r\n },\r\n childWarning: {\r\n color: '#D83B01',\r\n },\r\n childError: {\r\n color: '#A80000',\r\n },\r\n});\r\n","import React, { useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\n\r\nimport {\r\n CheckmarkCircleRegular,\r\n CircleRegular,\r\n WarningRegular,\r\n ErrorCircleRegular,\r\n} from '@fluentui/react-icons';\r\n\r\nimport { Status } from '../const';\r\nimport { useStyles } from '../styles/icon-styles';\r\n\r\nexport function StatusIcon({\r\n status,\r\n}) {\r\n const classes = useStyles();\r\n const {\r\n IconElement,\r\n parentClass,\r\n childClass,\r\n } = useMemo(() => {\r\n if (status === Status.Active) {\r\n return {\r\n IconElement: CheckmarkCircleRegular,\r\n parentClass: classes.parentActive,\r\n childClass: classes.childActive,\r\n };\r\n } else if (status === Status.Pending) {\r\n return {\r\n IconElement: CircleRegular,\r\n parentClass: classes.parentPending,\r\n childClass: classes.childPending,\r\n };\r\n } else if (status === Status.Warning) {\r\n return {\r\n IconElement: WarningRegular,\r\n parentClass: classes.parentWarning,\r\n childClass: classes.childWarning,\r\n };\r\n }\r\n\r\n return {\r\n IconElement: ErrorCircleRegular,\r\n parentClass: classes.parentError,\r\n childClass: classes.childError,\r\n };\r\n }, [classes, status]);\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n}\r\n\r\nStatusIcon.propTypes = {\r\n status: PropTypes.oneOf(Object.values(Status)).isRequired,\r\n};\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useStyles = makeStyles({\r\n statusItem: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n alignItems: 'center',\r\n ...shorthands.gap('4px'),\r\n },\r\n nameText: {\r\n color: '#605E5C',\r\n },\r\n statusLabelMsg: {\r\n fontWeight: 'bold',\r\n color: '#707070',\r\n },\r\n statusLabelMsgWithPopover: {\r\n fontWeight: 'bold',\r\n color: '#707070',\r\n '&:hover': {\r\n cursor: 'pointer',\r\n },\r\n },\r\n popover: {\r\n width: '240px',\r\n },\r\n popoverTitle: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n alignItems: 'center',\r\n ...shorthands.gap('4px'),\r\n color: '#323130',\r\n },\r\n popoverTitleText: {\r\n fontWeight: 'bold',\r\n },\r\n popoverMsg: {\r\n marginTop: '16px',\r\n color: '#323130',\r\n },\r\n footer: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n alignItems: 'center',\r\n justifyContent: 'space-between',\r\n marginTop: '12px',\r\n },\r\n});\r\n","import _ from 'underscore';\r\nimport React, { useMemo, useRef, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\n\r\nimport {\r\n Body1,\r\n Body2,\r\n Button,\r\n Popover,\r\n PopoverTrigger,\r\n PopoverSurface,\r\n useId,\r\n Link,\r\n} from '@fluentui/react-components';\r\n\r\nimport { Status } from '../const';\r\nimport { StatusIcon } from './status-icon';\r\nimport { useStyles } from '../styles/status-popover-styles';\r\n\r\nexport function StatusPopoverItem({\r\n name,\r\n status,\r\n statusLabelMsg,\r\n cardMsg,\r\n cardButtonText,\r\n onCardButtonClicked,\r\n customPopoverProps,\r\n learnMoreLink,\r\n i18n,\r\n}) {\r\n const classes = useStyles();\r\n const id = useId();\r\n const triggerRef = useRef(null);\r\n\r\n // TODO: This is a workaround to focus on the trigger element when the popover is opened.\r\n // We should remove this workaround once the issue is fixed in the Fluent UI.\r\n const setFocus = useCallback(() => {\r\n if (triggerRef && triggerRef.current) {\r\n triggerRef.current.focus();\r\n }\r\n }, [triggerRef]);\r\n\r\n const labelMsgPart = useMemo(() => {\r\n if (_.isEmpty(statusLabelMsg)) {\r\n return null;\r\n }\r\n\r\n if (cardMsg) {\r\n return (\r\n \r\n \r\n {statusLabelMsg}\r\n \r\n \r\n
\r\n
\r\n {`${name}: ${statusLabelMsg}`}\r\n
\r\n {cardMsg}\r\n \r\n {\r\n onCardButtonClicked &&\r\n \r\n {cardButtonText}\r\n \r\n }\r\n {learnMoreLink &&\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 return (\r\n {statusLabelMsg}\r\n );\r\n }, [cardMsg, classes.statusLabelMsg, classes.statusLabelMsgWithPopover, classes.popover, classes.popoverTitle, classes.popoverTitleName, classes.popoverTitleValue, classes.popoverMsg, classes.popoverButton, customPopoverProps, statusLabelMsg, setFocus, id, name, onCardButtonClicked, cardButtonText]);\r\n\r\n const className = name && name.replaceAll(' ', '-').toLowerCase();\r\n return (\r\n
\r\n \r\n {`${name}:`}\r\n {labelMsgPart}\r\n
\r\n );\r\n}\r\n\r\nStatusPopoverItem.propTypes = {\r\n name: PropTypes.string.isRequired,\r\n status: PropTypes.oneOf(Object.values(Status)).isRequired,\r\n statusLabelMsg: PropTypes.string.isRequired,\r\n cardMsg: PropTypes.string,\r\n onCardButtonClicked: PropTypes.func,\r\n cardButtonText: PropTypes.string,\r\n customPopoverProps: PropTypes.object,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n learnMoreLink: PropTypes.string,\r\n};\r\n\r\nStatusPopoverItem.defaultProps = {\r\n cardMsg: '',\r\n onCardButtonClicked: null,\r\n cardButtonText: '',\r\n customPopoverProps: {},\r\n learnMoreLink: undefined,\r\n};\r\n","\r\nimport _ from 'underscore';\r\nimport { isValidUrl, getUrlProtocolAndDomain } from '@bingads-webui/url-util';\r\n\r\nconst isValidCustomUrlProtocol = (url) => {\r\n const uriRegex = /^(\\S+:(\\/\\/)?)(\\S+)/;\r\n return uriRegex.test(url);\r\n};\r\n\r\nconst doesUrlContainUnsafeCharacters = (url) => {\r\n const specialCharactersRegex = /[\\s<>{}]/;\r\n return specialCharactersRegex.test(url);\r\n};\r\n\r\nexport const UrlLengthLimit = 2048;\r\n/**\r\n * Validate a URL.\r\n * @param {String} url - Fully qualified ad HTTP/S URL, including the prefix.\r\n * @param {String} requiredUrlProtocolAndDomain - Protocol and domain name that the ad URL must use.\r\n * @param {Object} [i18n] - i18n library.\r\n * @param {Number} [urlLengthLimit] - Maximum number of characters allowed in the URL.\r\n * @param {Boolean} [customUrlProtocol] - Whether the URL can have a custom protocol.\r\n * @param {Boolean} [enableSpecialCharactersValidation] - Whether to validate special characters in the URL.\r\n * @returns {String} - Null if URL is valid. Otherwise an error message.\r\n */\r\nexport function validateAdUrl(url, requiredUrlProtocolAndDomain, i18n = { getString: _.identity }, urlLengthLimit = UrlLengthLimit, customUrlProtocol = false, enableSpecialCharactersValidation = false) {\r\n if (!url) {\r\n return i18n.getString(_TL_('Please enter a valid URL'));\r\n }\r\n\r\n if (enableSpecialCharactersValidation && doesUrlContainUnsafeCharacters(url)) {\r\n return i18n.getString(_TL_('The URL contains invalid characters.'));\r\n }\r\n\r\n if (_.size(url) > urlLengthLimit) {\r\n return i18n.getString(_TL_('The number of characters in this field cannot exceed {{lengthLimit}}'), { lengthLimit: urlLengthLimit });\r\n }\r\n\r\n if ((customUrlProtocol && !isValidCustomUrlProtocol(url)) || (!customUrlProtocol && !isValidUrl(url))) {\r\n return i18n.getString(_TL_('Please enter a valid URL'));\r\n }\r\n\r\n if (!_.isEmpty(requiredUrlProtocolAndDomain)) {\r\n // Google requires search ads in the same ad group have the same display URL domain\r\n // See: https://support.google.com/adspolicy/answer/6088505?hl=en-GB\r\n const adUrlProtocolAndDomain = getUrlProtocolAndDomain(url);\r\n if (requiredUrlProtocolAndDomain !== adUrlProtocolAndDomain) {\r\n return i18n.getString(_TL_('This ad\\'s final URL must have the same domain as the other ads in this campaign.'));\r\n }\r\n }\r\n\r\n return null;\r\n}\r\n\r\nconst pathLengthLimitErrorMessages = [\r\n _TL_('Path 1 cannot exceed 15 characters.'),\r\n _TL_('Path 2 cannot exceed 15 characters.'),\r\n];\r\nconst pathLengthLimit = 15;\r\n\r\nexport function validatePath(values, i18n) {\r\n const errors = [];\r\n const path1 = _.isEmpty(values[0]) ? '' : values[0].trim();\r\n const path2 = _.isEmpty(values[1]) ? '' : values[1].trim();\r\n if (_.isEmpty(path1) && !_.isEmpty(path2)) {\r\n errors.push(i18n.getString(_TL_('In order to use path 2, path 1 must also be used.')));\r\n }\r\n\r\n _.each(values, (field, index) => {\r\n if (field && _.size(field) > pathLengthLimit) {\r\n errors.push(i18n.getString(pathLengthLimitErrorMessages[index]));\r\n }\r\n });\r\n\r\n return errors;\r\n}\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useStyles = makeStyles({\r\n urlInputContainer: {\r\n display: 'flex',\r\n flexWrap: 'nowrap',\r\n width: 'auto',\r\n height: 'auto',\r\n boxSizing: 'border-box',\r\n '> *': {\r\n textOverflow: 'ellipsis',\r\n },\r\n ...shorthands.gap('16px'),\r\n },\r\n urlInput: {\r\n height: 'auto',\r\n width: 'auto',\r\n flexGrow: 1,\r\n },\r\n urlProtocol: {\r\n minWidth: 'unset',\r\n },\r\n customUrlProtocol: {\r\n width: '100px',\r\n },\r\n urlPath: {\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n wordBreak: 'break-all',\r\n alignItems: 'baseline',\r\n ...shorthands.gap('6px'),\r\n },\r\n});\r\n","import { noop, isString } from 'underscore';\r\nimport React, { useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Input, mergeClasses } from '@fluentui/react-components';\r\nimport { getDomain } from '@bingads-webui/url-util';\r\n\r\nimport { validatePath } from './validation';\r\nimport { useStyles } from './styles';\r\n\r\nexport function UrlPathFluent({\r\n value,\r\n url,\r\n i18n,\r\n onChange,\r\n}) {\r\n const [Path1, Path2] = value;\r\n const urlDomain = useMemo(() => getDomain(url), [url]);\r\n const onPathChange = useCallback((path, { value: newValue }) => {\r\n const errors = validatePath([path === 'Path1' ? newValue : Path1, path === 'Path2' ? newValue : Path2], i18n);\r\n onChange(errors, { [path]: newValue });\r\n }, [Path1, Path2, i18n, onChange]);\r\n\r\n const onPath1Change = useCallback((event, newValue) => {\r\n onPathChange('Path1', newValue);\r\n }, [onPathChange]);\r\n\r\n const onPath2Change = useCallback((event, newValue) => {\r\n onPathChange('Path2', newValue);\r\n }, [onPathChange]);\r\n\r\n const styles = useStyles();\r\n\r\n return (\r\n
\r\n
\r\n {isString(urlDomain) && urlDomain.length > 0 ?\r\n urlDomain :\r\n 'www.example.com'\r\n }\r\n
\r\n
/
\r\n \r\n
/
\r\n \r\n
\r\n );\r\n}\r\n\r\nUrlPathFluent.propTypes = {\r\n config: PropTypes.shape({\r\n }).isRequired,\r\n value: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n url: PropTypes.string.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n onChange: PropTypes.func,\r\n};\r\n\r\nUrlPathFluent.defaultProps = {\r\n onChange: noop,\r\n};\r\n","import _ from 'underscore';\r\n\r\nexport const URL_COLON_SLASH_SLASH = '://';\r\nexport const DEFAULT_URL_PREFIX = 'https';\r\n\r\nexport function getUrlPrefixAndDestination(finalUrl, defaultUrlPrefix = DEFAULT_URL_PREFIX) {\r\n const index = _.isString(finalUrl) ? finalUrl.indexOf(URL_COLON_SLASH_SLASH) : -1;\r\n if (index >= 0) {\r\n const prefix = finalUrl.substring(0, index).toLowerCase();\r\n const destination = finalUrl.substring(index + URL_COLON_SLASH_SLASH.length).trim();\r\n\r\n return [prefix, destination];\r\n }\r\n\r\n return [defaultUrlPrefix, ''];\r\n}\r\n\r\nexport const getUpdatedFullUrlOnPrefixUpdate =\r\n (urlWithoutPrefix, newPrefix) => {\r\n let slash = '';\r\n if (!newPrefix.includes(URL_COLON_SLASH_SLASH)) {\r\n slash = URL_COLON_SLASH_SLASH;\r\n }\r\n\r\n return `${newPrefix}${slash}${urlWithoutPrefix}`;\r\n };\r\n\r\nexport const getUpdatedFullUrlOnTextUpdate = (urlPrefix, newValue) => {\r\n if (newValue.includes(URL_COLON_SLASH_SLASH)) {\r\n // detect if the user is entering a URL and update the URL prefix\r\n const [prefix, destination] = getUrlPrefixAndDestination(newValue);\r\n\r\n if (prefix === 'http' || prefix === 'https') {\r\n return `${prefix}${URL_COLON_SLASH_SLASH}${destination}`;\r\n }\r\n }\r\n\r\n return `${urlPrefix}${URL_COLON_SLASH_SLASH}${newValue.trim()}`;\r\n};\r\n\r\nexport const isEmptyUrl = (finalUrls) => {\r\n // FinalUrlWithCustomValidation contol always specifies prefix. If destination is empty\r\n // then treat this as empty final URL. This is needed for when final URL is optional and\r\n // we want to avoid specifying prefixed empty URL.\r\n const [, dest] = getUrlPrefixAndDestination(_.first(finalUrls));\r\n return _.isEmpty(dest);\r\n};\r\n","import { noop } from 'underscore';\r\nimport React, { useCallback, useMemo, useContext, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Dropdown, Option, Input, mergeClasses } from '@fluentui/react-components';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\n\r\nimport {\r\n getUrlPrefixAndDestination,\r\n getUpdatedFullUrlOnPrefixUpdate,\r\n getUpdatedFullUrlOnTextUpdate,\r\n} from './utils';\r\nimport { validateAdUrl, UrlLengthLimit } from './validation';\r\nimport { useStyles } from './styles';\r\n\r\nconst urlPrefixOptions = [\r\n { key: 'https', text: 'https://', title: 'https://' },\r\n { key: 'http', text: 'http://', title: 'http://' },\r\n];\r\n\r\nexport function UrlInputFluent({\r\n url,\r\n i18n,\r\n onChange,\r\n containerClassName,\r\n additionalValidation,\r\n prepopulateUrl,\r\n dropdownOptionAriaLabel,\r\n propertyKey,\r\n validateOnRender,\r\n additionalProperties,\r\n textFieldAriaLabel,\r\n customUrlProtocol,\r\n enableSpecialCharactersValidation,\r\n hideProtocol,\r\n}) {\r\n const activity = useContext(ActivityContext);\r\n\r\n const [urlPrefix, urlWithoutPrefix] = useMemo(\r\n () => getUrlPrefixAndDestination(url),\r\n [url]\r\n );\r\n\r\n const selectedOptionText = useMemo(() => {\r\n const selectedOption = urlPrefixOptions.filter(option => option.key === urlPrefix)[0] || urlPrefixOptions[0];\r\n return selectedOption.text;\r\n }, [urlPrefix]);\r\n\r\n const validateAndUpdateUrl = useCallback((currentURL) => {\r\n // first check URL validity. If valid then validate domain by need.\r\n let finalUrlValidatorError = validateAdUrl(currentURL, '', i18n, UrlLengthLimit, customUrlProtocol, enableSpecialCharactersValidation);\r\n if (!finalUrlValidatorError && additionalValidation) {\r\n finalUrlValidatorError = additionalValidation(currentURL);\r\n }\r\n\r\n onChange(finalUrlValidatorError ? [finalUrlValidatorError] : [], currentURL);\r\n if (activity) {\r\n activity.signal(`on${propertyKey}Change - ${JSON.stringify(currentURL)} - isValid: ${!finalUrlValidatorError}}`);\r\n }\r\n }, [activity, additionalValidation, customUrlProtocol, i18n, onChange, propertyKey]);\r\n\r\n const onUrlPrefixChanged = useCallback(\r\n (event, newItem) =>\r\n validateAndUpdateUrl(getUpdatedFullUrlOnPrefixUpdate(urlWithoutPrefix, newItem.optionValue)),\r\n [urlWithoutPrefix, validateAndUpdateUrl]\r\n );\r\n\r\n const onCustomUrlProtocolChanged = useCallback(\r\n (event, { value }) =>\r\n validateAndUpdateUrl(getUpdatedFullUrlOnPrefixUpdate(urlWithoutPrefix, value)),\r\n [urlWithoutPrefix, validateAndUpdateUrl]\r\n );\r\n\r\n const onTextChange = useCallback((event, { value }) => {\r\n const newValue = getUpdatedFullUrlOnTextUpdate(urlPrefix, value);\r\n\r\n if (newValue) {\r\n validateAndUpdateUrl(getUpdatedFullUrlOnTextUpdate(urlPrefix, value));\r\n }\r\n }, [validateAndUpdateUrl, urlPrefix]);\r\n\r\n useEffect(() => {\r\n if (!url && prepopulateUrl) {\r\n // Prepopulate final url with prepopulate on load if no value is provided.\r\n validateAndUpdateUrl(getUpdatedFullUrlOnTextUpdate(urlPrefix, prepopulateUrl));\r\n } else if (validateOnRender) {\r\n validateAndUpdateUrl(url);\r\n }\r\n // only validate on render and prepopulate on load\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [url]);\r\n\r\n const styles = useStyles();\r\n\r\n return (\r\n
\r\n {\r\n !hideProtocol && customUrlProtocol &&\r\n \r\n }\r\n {\r\n !hideProtocol && !customUrlProtocol && (\r\n \r\n {urlPrefixOptions.map(option => (\r\n \r\n ))}\r\n \r\n )\r\n }\r\n \r\n
\r\n );\r\n}\r\n\r\nUrlInputFluent.propTypes = {\r\n containerClassName: PropTypes.string,\r\n url: PropTypes.string.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n onChange: PropTypes.func,\r\n onClick: PropTypes.func,\r\n additionalValidation: PropTypes.func,\r\n prepopulateUrl: PropTypes.string,\r\n dropdownOptionAriaLabel: PropTypes.string,\r\n propertyKey: PropTypes.string,\r\n validateOnRender: PropTypes.bool,\r\n additionalProperties: PropTypes.shape({}),\r\n textFieldAriaLabel: PropTypes.string.isRequired,\r\n customUrlProtocol: PropTypes.bool,\r\n enableSpecialCharactersValidation: PropTypes.bool,\r\n hideProtocol: PropTypes.bool,\r\n};\r\n\r\nUrlInputFluent.defaultProps = {\r\n onChange: noop,\r\n onClick: noop,\r\n containerClassName: '',\r\n additionalValidation: noop,\r\n prepopulateUrl: '',\r\n dropdownOptionAriaLabel: '',\r\n propertyKey: '',\r\n validateOnRender: false,\r\n additionalProperties: {},\r\n customUrlProtocol: false,\r\n enableSpecialCharactersValidation: false,\r\n hideProtocol: false,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { getUrlPrefixAndDestination } from './utils';\r\n\r\nexport const withNoProtocol = (WrappedComponent) => {\r\n const URLInputWithNoProtocol = (props) => {\r\n const { url, onChange, ...rest } = props;\r\n\r\n const urlWithProtocol = url ? `https://${url}` : url;\r\n\r\n const onChangeWithProtocol = (errors, currentURL) => {\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n const [urlPrefix, urlWithoutPrefix] = getUrlPrefixAndDestination(currentURL);\r\n return onChange(errors, urlWithoutPrefix);\r\n };\r\n\r\n return ;\r\n };\r\n\r\n URLInputWithNoProtocol.propTypes = {\r\n url: PropTypes.string.isRequired,\r\n onChange: PropTypes.func.isRequired.isRequired,\r\n };\r\n\r\n return URLInputWithNoProtocol;\r\n};\r\n","import React, { useCallback, useContext } from 'react';\r\nimport { first, result, noop, isEmpty } from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { Label } from '@fluentui/react-components';\r\nimport { HelpPopupInline } from '@bingads-webui-react/help-popup';\r\nimport { UrlInputFluent } from '@bingads-webui-campaign-react/url-input-fluent-v2';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\n\r\nconst FinalURlKey = 'FinalUrls';\r\n\r\nexport const ValidatedFinalUrl = ({\r\n i18n,\r\n validationOnUrlChange,\r\n updateValidation,\r\n prepopulateUrl,\r\n validationProps,\r\n validateOnRender,\r\n helpTopicId,\r\n hideLabel,\r\n additionalProperties,\r\n customUrlProtocol,\r\n}) => {\r\n const { data } = validationProps;\r\n const finalUrls = result(data, FinalURlKey, undefined);\r\n const finalUrl = first(finalUrls);\r\n const createFinalUrlsViewModel = urls => ({ [FinalURlKey]: urls });\r\n\r\n const activity: any = useContext(ActivityContext);\r\n\r\n const onChange = useCallback((errors, value) => {\r\n updateValidation(errors, createFinalUrlsViewModel([value]), (!isEmpty(errors) && !!finalUrl));\r\n\r\n if (activity) {\r\n activity.signal(`onFinalUrlChanged - ${JSON.stringify(createFinalUrlsViewModel([value]))}`);\r\n }\r\n }, [activity, finalUrl, updateValidation]);\r\n\r\n return (\r\n \r\n {!hideLabel &&\r\n \r\n }\r\n \r\n \r\n );\r\n};\r\n\r\nValidatedFinalUrl.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n validationOnUrlChange: PropTypes.func,\r\n prepopulateUrl: PropTypes.string,\r\n hideLabel: PropTypes.bool,\r\n validationProps: PropTypes.shape({\r\n data: PropTypes.shape({\r\n FinalUrls: PropTypes.arrayOf(PropTypes.string),\r\n }),\r\n updateOnMount: PropTypes.bool,\r\n }).isRequired,\r\n validateOnRender: PropTypes.bool,\r\n helpTopicId: PropTypes.string,\r\n additionalProperties: PropTypes.shape({}),\r\n customUrlProtocol: PropTypes.bool,\r\n};\r\n\r\nValidatedFinalUrl.defaultProps = {\r\n validationOnUrlChange: noop,\r\n prepopulateUrl: '',\r\n hideLabel: false,\r\n validateOnRender: false,\r\n helpTopicId: 'pop_BA_NewAdCreate_FinalURL',\r\n additionalProperties: {},\r\n customUrlProtocol: false,\r\n};\r\n","import React from 'react';\r\nimport { Shimmer, ShimmerElementType } from '@fluentui/react';\r\n\r\nexport const radiusShimmerElement = [\r\n { type: ShimmerElementType.line, width: 20, height: 20 },\r\n { type: ShimmerElementType.gap, width: 5 },\r\n { type: ShimmerElementType.line, height: 16, width: 300 },\r\n { type: ShimmerElementType.gap, height: 20, width: '100%' },\r\n];\r\n\r\nexport const SectionShimmer = () => (\r\n
\r\n \r\n \r\n \r\n
\r\n);\r\n","import React, { useContext, useMemo, useEffect, useCallback, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n TextTitle,\r\n ValidatedPanel,\r\n getPanelErrorProps\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { RadioGroup } from '@bingads-webui-react/radio';\r\nimport { Label } from '@bingads-webui-react/fabric-control';\r\nimport { advancedSettingsSectionStyle, toggleButtonStyle } from '@bingads-webui-campaign-react/common-styles';\r\nimport { creationCommonStyle } from '@bingads-webui-campaign-react/campaign-adgroup-settings-shared-styles';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { withCustomValidation } from '@bingads-webui-react/validation';\r\n\r\nimport classNames from 'classnames';\r\nimport _ from 'underscore';\r\n\r\nimport { PlacementImg } from '../media';\r\nimport { SectionShimmer } from '../shimmers';\r\n\r\nconst getStyles = (__, core) =>\r\n ({\r\n placementTargetSettingContainer: {\r\n ...creationCommonStyle(core),\r\n ...advancedSettingsSectionStyle(core),\r\n ...toggleButtonStyle(core),\r\n '& .title': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n marginBottom: '8px',\r\n },\r\n '& .intent-target-options': {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n '& ul': {\r\n listStyle: 'none',\r\n padding: 0,\r\n margin: 0,\r\n '& .radio': {\r\n marginBottom: '15px',\r\n },\r\n },\r\n },\r\n '& .radio-group-option': {\r\n position: 'absolute',\r\n top: '3px',\r\n '&-description-text': {\r\n fontSize: '12px',\r\n },\r\n },\r\n },\r\n });\r\n\r\nconst RadioGroupOption = ({ titleString, descriptionString, updateSelection }) => {\r\n const [isSelected, setIsSelected] = useState(false);\r\n const titleStyle = {\r\n color: isSelected ? '#242424' : '#616161',\r\n fontSize: '16px',\r\n };\r\n\r\n useEffect(() => {\r\n const result = updateSelection();\r\n setIsSelected(result);\r\n }, [updateSelection]);\r\n\r\n return (\r\n \r\n \r\n \r\n {titleString}\r\n \r\n
\r\n {descriptionString}\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nRadioGroupOption.propTypes = {\r\n titleString: PropTypes.string.isRequired,\r\n descriptionString: PropTypes.string.isRequired,\r\n updateSelection: PropTypes.func.isRequired,\r\n};\r\n\r\nconst PlacementTargetingSettingsInternal = (props) => {\r\n const i18n = useContext(I18nContext);\r\n const mobilePlacementsTitleString = i18n.getString(_TL_('All Microsoft mobile placements'));\r\n const mobilePlacementsDescriptionString = i18n.getString(_TL_('This option includes mobile Microsoft sites and additional partner traffic for extended reach and lower cost per click.'));\r\n const gamingPlacementsTitleString = i18n.getString(_TL_('Microsoft owned and operated mobile placements'));\r\n const gamingPlacementsDescriptionString = i18n.getString(_TL_('This option includes all Microsoft sites and select partner traffic with performance and conversion rates similar to that of Microsoft Bing.'));\r\n const classes = useDefaultStyles(getStyles);\r\n\r\n const { validationProps, updateValidation, setActiveKey } = props;\r\n const intentOptions = {\r\n Gaming: 'Gaming',\r\n Mobile: 'Mobile',\r\n };\r\n const activeKey = validationProps.data.placementTarget || intentOptions.Mobile;\r\n\r\n if (!validationProps.data.placementTarget) {\r\n updateValidation([], { placementTarget: activeKey });\r\n }\r\n\r\n\r\n const intentOptionsKeys = useMemo(() => (_.compact([\r\n intentOptions.Mobile,\r\n intentOptions.Gaming,\r\n ])), [intentOptions.Gaming, intentOptions.Mobile]);\r\n\r\n const updateSelection = useCallback(option => activeKey === option, [activeKey]);\r\n\r\n const intentOptionsKeysMap = useMemo(() => ({\r\n [intentOptions.Mobile]: (\r\n updateSelection(intentOptions.Mobile)}\r\n />\r\n ),\r\n [intentOptions.Gaming]: (\r\n updateSelection(intentOptions.Gaming)}\r\n />\r\n ),\r\n }), [intentOptions.Mobile, intentOptions.Gaming, mobilePlacementsTitleString, mobilePlacementsDescriptionString, gamingPlacementsTitleString, gamingPlacementsDescriptionString, updateSelection]);\r\n\r\n const onIntentOptionChanged = useCallback((key) => {\r\n setActiveKey(key);\r\n updateValidation([], { placementTarget: key });\r\n }, [setActiveKey, updateValidation]);\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n
\r\n
    \r\n intentOptionsKeysMap[key]}\r\n onChange={onIntentOptionChanged}\r\n checked={activeKey}\r\n getItemId={_.identity}\r\n />\r\n
\r\n
\r\n
);\r\n};\r\n\r\nPlacementTargetingSettingsInternal.propTypes = {\r\n setActiveKey: PropTypes.func.isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n validationProps: PropTypes.shape({\r\n data: PropTypes.shape({\r\n placementTarget: PropTypes.string,\r\n }),\r\n }),\r\n};\r\n\r\nPlacementTargetingSettingsInternal.defaultProps = {\r\n validationProps: {\r\n data: {\r\n placementTarget: 'Mobile',\r\n },\r\n },\r\n};\r\n\r\nconst PlacementTargetSettings = withCustomValidation(PlacementTargetingSettingsInternal);\r\n\r\nexport const PlacementTargetPanel = (props) => {\r\n const classes = useDefaultStyles(getStyles);\r\n const [activeKey, setActiveKey] = useState('Mobile');\r\n\r\n const {\r\n isLoading,\r\n expand,\r\n ...rest\r\n } = props;\r\n return (\r\n
\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand,\r\n expandKey: 'placement-target',\r\n }}\r\n {...rest}\r\n >\r\n {\r\n isLoading ?\r\n :\r\n \r\n }\r\n \r\n
\r\n );\r\n};\r\n\r\nPlacementTargetPanel.propTypes = {\r\n isLoading: PropTypes.bool,\r\n expand: PropTypes.func.isRequired,\r\n data: PropTypes.string,\r\n};\r\n\r\nPlacementTargetPanel.defaultProps = {\r\n isLoading: false,\r\n data: 'Mobile',\r\n};\r\n","export const PANEL_KEYS = {\r\n PLACEMENT_TARGET: 'placement-target',\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 (formatOption, formatPoint, points, title) {pug_html = pug_html + \"\\u003Cdiv class=\\\"charts-tooltip\\\"\\u003E\\u003Cdiv class=\\\"tool-tip-title\\\"\\u003E\" + (pug.escape(null == (pug_interp = title) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"tool-tip-properties\\\"\\u003E\";\n// iterate points\n;(function(){\n var $$obj = points;\n if ('number' == typeof $$obj.length) {\n for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) {\n var point = $$obj[pug_index0];\nvar className = point.series.options.marker.symbol + \"-\" + point.series.options.dashStyle;\npug_html = pug_html + \"\\u003Cdiv class=\\\"tool-tip-property\\\"\\u003E\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"tool-tip-icon\",className.toLowerCase()], [false,true]), false, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"tool-tip-details\\\"\\u003E\\u003Cdiv class=\\\"tool-tip-name\\\"\\u003E\" + (pug.escape(null == (pug_interp = point.series.name) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (\" class=\\\"tool-tip-value\\\"\"+pug.attr(\"style\", pug.style(\"color: \" + point.color + \";\"), true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = formatPoint(point, formatOption)) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index0 in $$obj) {\n $$l++;\n var point = $$obj[pug_index0];\nvar className = point.series.options.marker.symbol + \"-\" + point.series.options.dashStyle;\npug_html = pug_html + \"\\u003Cdiv class=\\\"tool-tip-property\\\"\\u003E\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"tool-tip-icon\",className.toLowerCase()], [false,true]), false, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"tool-tip-details\\\"\\u003E\\u003Cdiv class=\\\"tool-tip-name\\\"\\u003E\" + (pug.escape(null == (pug_interp = point.series.name) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (\" class=\\\"tool-tip-value\\\"\"+pug.attr(\"style\", pug.style(\"color: \" + point.color + \";\"), true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = formatPoint(point, formatOption)) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"formatOption\" in locals_for_with?locals_for_with.formatOption:typeof formatOption!==\"undefined\"?formatOption:undefined,\"formatPoint\" in locals_for_with?locals_for_with.formatPoint:typeof formatPoint!==\"undefined\"?formatPoint:undefined,\"points\" in locals_for_with?locals_for_with.points:typeof points!==\"undefined\"?points: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 (date, formattedValue, metricName, name) {pug_html = pug_html + \"\\u003Cdiv class=\\\"tool-tip-container\\\"\\u003E\\u003Cdiv class=\\\"location-name\\\"\\u003E\" + (pug.escape(null == (pug_interp = name) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"date-range\\\"\\u003E\" + (pug.escape(null == (pug_interp = date) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"metric-container\\\"\\u003E\\u003Cdiv class=\\\"bubble-icon\\\"\\u003E\\u003Cdiv class=\\\"dot\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"metric-name\\\"\\u003E\" + (pug.escape(null == (pug_interp = metricName) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"metric-value\\\"\\u003E\" + (pug.escape(null == (pug_interp = formattedValue) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"date\" in locals_for_with?locals_for_with.date:typeof date!==\"undefined\"?date:undefined,\"formattedValue\" in locals_for_with?locals_for_with.formattedValue:typeof formattedValue!==\"undefined\"?formattedValue:undefined,\"metricName\" in locals_for_with?locals_for_with.metricName:typeof metricName!==\"undefined\"?metricName:undefined,\"name\" in locals_for_with?locals_for_with.name:typeof name!==\"undefined\"?name:undefined));;return pug_html;};\nmodule.exports = template;","import React from 'react';\r\nimport { Shimmer, ShimmerElementType } from '@fluentui/react';\r\n\r\nconst rowElement = [{ type: ShimmerElementType.line, height: 50 }];\r\nconst buttonElement = [\r\n { type: ShimmerElementType.line, height: 32, width: '25%' },\r\n { type: ShimmerElementType.gap, width: '60%' },\r\n { type: ShimmerElementType.line, height: 12, width: '15%' },\r\n];\r\n\r\nexport function ShimmerCard() {\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","import { makeStyles, tokens } from '@fluentui/react-components';\r\n\r\nexport const useNoAssetCardStyles = makeStyles({\r\n container: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n flexGrow: 1,\r\n },\r\n imageContainer: {\r\n flexGrow: 1,\r\n flexBasis: 0,\r\n maxHeight: '210px',\r\n width: '100%',\r\n overflowY: 'hidden',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n display: 'flex',\r\n backgroundColor: tokens.colorNeutralBackground2,\r\n },\r\n gradient: {\r\n backgroundImage: 'linear-gradient(90deg, #D6E6F0 0%, #F0F3F6 46.5%)',\r\n },\r\n image: {\r\n maxHeight: '148px',\r\n },\r\n title: {\r\n marginTop: '16px',\r\n },\r\n});\r\n\r\n","import classNames from 'classnames';\r\nimport React from 'react';\r\nimport { Image, Subtitle2, Body1 } from '@fluentui/react-components';\r\n\r\nimport { useNoAssetCardStyles } from '../styles/no-asset-card-styles';\r\nimport NoAssetsImage from '../../media/no-assets-image.png';\r\nimport NoAssetsFilteredImage from '../../media/no-assets-filtered-image.png';\r\n\r\nexport enum NO_ASSETS_STATE {\r\n NO_ASSETS = 'NO_ASSETS',\r\n NO_ASSETS_FILTERED = 'NO_ASSETS_FILTERED',\r\n}\r\n\r\nconst config = {\r\n [NO_ASSETS_STATE.NO_ASSETS]: {\r\n image: (styles, i18n) => {i18n.getString(_TL_('No,\r\n title: _TL_('Your campaign can\\'t run without assets'),\r\n text: _TL_('Your performance max campaign needs assets to run. Our AI tools will help you to create your assets including text and images.'),\r\n },\r\n [NO_ASSETS_STATE.NO_ASSETS_FILTERED]: {\r\n image: (styles, i18n) => {i18n.getString(_TL_('No,\r\n title: _TL_('No assets available'),\r\n text: _TL_('Select a different filter and try again.'),\r\n },\r\n};\r\n\r\nexport function NoAssetsCard({ i18n, state }: { i18n: any, state: NO_ASSETS_STATE.NO_ASSETS | NO_ASSETS_STATE.NO_ASSETS_FILTERED }) {\r\n const styles = useNoAssetCardStyles();\r\n return (\r\n
\r\n
\r\n {config[state].image(styles, i18n)}\r\n
\r\n {i18n.getString(config[state].title)}\r\n {i18n.getString(config[state].text)}\r\n
\r\n );\r\n}\r\n","import { createTableColumn, TableColumnDefinition } from '@fluentui/react-components';\r\nimport { Asset } from '../utils/types';\r\n\r\nconst performanceOrder = ['Best', 'Good', 'Low', 'Learning', 'Unrated'];\r\nconst policyStatusOrder = ['Approved', 'ApprovedLimited', 'Rejected', 'Pending'];\r\n\r\nexport const columns: TableColumnDefinition[] = [\r\n createTableColumn({\r\n columnId: 'performance',\r\n compare: (a, b) => performanceOrder.indexOf(b.PerformanceLabel ?? '') - performanceOrder.indexOf(a.PerformanceLabel ?? ''),\r\n }),\r\n createTableColumn({\r\n columnId: 'policy-status',\r\n compare: (a, b) => policyStatusOrder.indexOf(b.EditorialStatus) - policyStatusOrder.indexOf(a.EditorialStatus),\r\n }),\r\n];\r\n\r\nexport const columnsWithConversions: TableColumnDefinition[] = [\r\n createTableColumn({\r\n columnId: 'conversions',\r\n compare: (a, b) => (b.PerformanceMetrics.ConversionsCredit || 0) - (a.PerformanceMetrics.ConversionsCredit || 0),\r\n }),\r\n createTableColumn({\r\n columnId: 'policy-status',\r\n compare: (a, b) => policyStatusOrder.indexOf(b.EditorialStatus) - policyStatusOrder.indexOf(a.EditorialStatus),\r\n }),\r\n];\r\n","import { makeStyles } from '@fluentui/react-components';\r\n\r\nexport const useAssetPreviewStyles = makeStyles({\r\n container: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n height: '42px',\r\n marginTop: '5px',\r\n marginBottom: '5px',\r\n },\r\n imagePreviewContainer: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n width: '100%',\r\n '& .cropped-image-view': {\r\n boxShadow: '0px 1.600000023841858px 3.5999999046325684px 0px #00000021',\r\n borderTopLeftRadius: '3px',\r\n borderTopRightRadius: '3px',\r\n borderBottomLeftRadius: '3px',\r\n borderBottomRightRadius: '3px',\r\n height: 'auto !important',\r\n maxHeight: '48px',\r\n backgroundColor: 'white',\r\n '& img': {\r\n height: '100%',\r\n width: '100% !important',\r\n objectFit: 'contain',\r\n },\r\n },\r\n },\r\n aspectRatio: {\r\n marginLeft: '8px',\r\n },\r\n text: {\r\n display: '-webkit-box',\r\n '-webkit-line-clamp': '3',\r\n '-webkit-box-orient': 'vertical',\r\n overflowY: 'hidden',\r\n },\r\n});\r\n\r\n","const callToActionStrings = {\r\n ActNow: _TL_('Act Now'),\r\n ApplyNow: _TL_('Apply Now'),\r\n BetNow: _TL_('Bet Now'),\r\n BidNow: _TL_('Bid Now'),\r\n BookACar: _TL_('Book A Car'),\r\n BookHotel: _TL_('Book Hotel'),\r\n BookNow: _TL_('Book Now'),\r\n BuildNow: _TL_('Build Now'),\r\n BuyNow: _TL_('Buy Now'),\r\n ChatNow: _TL_('Chat Now'),\r\n Compare: _TL_('Compare'),\r\n ContactUs: _TL_('Contact Us'),\r\n Dealers: _TL_('Dealers'),\r\n Directions: _TL_('Directions'),\r\n Donate: _TL_('Donate'),\r\n Download: _TL_('Download'),\r\n EmailNow: _TL_('Email Now'),\r\n EnrollNow: _TL_('Enroll Now'),\r\n FileNow: _TL_('File Now'),\r\n FindJob: _TL_('Find Job'),\r\n FindStore: _TL_('Find Store'),\r\n FreePlay: _TL_('Free Play'),\r\n FreeQuote: _TL_('Free Quote'),\r\n FreeTrial: _TL_('Free Trial'),\r\n Coupon: _TL_('Get Coupon'),\r\n GetDeals: _TL_('Get Deals'),\r\n GetDemo: _TL_('Get Demo'),\r\n GetNow: _TL_('Get Now'),\r\n GetOffer: _TL_('Get Offer'),\r\n GetQuote: _TL_('Get Quote'),\r\n GoToDemo: _TL_('Go To Demo'),\r\n JoinNow: _TL_('Join Now'),\r\n LearnMore: _TL_('Learn More'),\r\n ListenNow: _TL_('Listen Now'),\r\n LogIn: _TL_('Log In'),\r\n OrderNow: _TL_('Order Now'),\r\n PlayGame: _TL_('Play Game'),\r\n PlayNow: _TL_('Play Now'),\r\n PostJob: _TL_('Post Job'),\r\n Register: _TL_('Register'),\r\n RenewNow: _TL_('Renew Now'),\r\n RentACar: _TL_('Rent A Car'),\r\n RentNow: _TL_('Rent Now'),\r\n Reorder: _TL_('Reorder'),\r\n Reserve: _TL_('Reserve'),\r\n SaveNow: _TL_('Save Now'),\r\n Schedule: _TL_('Schedule'),\r\n SeeDemo: _TL_('See Demo'),\r\n SeeMenu: _TL_('See Menu'),\r\n SeeModels: _TL_('See Models'),\r\n SeeOffer: _TL_('See Offer'),\r\n SeeOffers: _TL_('See Offers'),\r\n Sale: _TL_('See Sale'),\r\n SellNow: _TL_('Sell Now'),\r\n ShopNow: _TL_('Shop Now'),\r\n Showtimes: _TL_('Showtimes'),\r\n SignIn: _TL_('Sign In'),\r\n SignUp: _TL_('Sign Up'),\r\n StartNow: _TL_('Start Now'),\r\n Subscribe: _TL_('Subscribe'),\r\n SwitchNow: _TL_('Switch Now'),\r\n TestDrive: _TL_('Test Drive'),\r\n TryNow: _TL_('Try Now'),\r\n ViewCars: _TL_('View Cars'),\r\n ViewDemo: _TL_('View Demo'),\r\n ViewPlans: _TL_('View Plans'),\r\n VisitStore: _TL_('Visit Store'),\r\n VoteNow: _TL_('Vote Now'),\r\n Watch: _TL_('Watch'),\r\n WatchMore: _TL_('Watch More'),\r\n WatchNow: _TL_('Watch Now'),\r\n};\r\n\r\nexport const getLocalizedCallToActionString = (callToAction: string, i18n: any): string => {\r\n const mappedCallToAction = callToActionStrings[callToAction];\r\n if (mappedCallToAction) {\r\n return i18n.getString(mappedCallToAction);\r\n }\r\n return callToAction;\r\n};\r\n","import React, { useMemo } from 'react';\r\nimport classNames from 'classnames';\r\nimport { Caption1 as Text } from '@fluentui/react-components';\r\n\r\nimport { CroppedImageView } from '@bingads-webui-campaign-react/cropped-image-view';\r\n\r\nimport { Asset } from '../utils/types';\r\nimport { useAssetPreviewStyles } from '../styles/asset-preview-styles';\r\nimport { getLocalizedCallToActionString } from '../utils/get-localized-call-to-action-string';\r\n\r\nexport function AssetPreview({\r\n i18n,\r\n asset,\r\n withAspectRatio,\r\n}: { i18n: any, asset: Asset, withAspectRatio: boolean }) {\r\n const styles = useAssetPreviewStyles();\r\n const preview = useMemo(() => {\r\n const assetType = asset.Asset.AssetType;\r\n if (assetType === 'Image') {\r\n return (\r\n
\r\n \r\n {withAspectRatio &&\r\n {`${asset.Asset.CropWidth} x ${asset.Asset.CropHeight}`}\r\n }\r\n
\r\n );\r\n } else if (assetType === 'CallToAction') {\r\n return (\r\n \r\n {getLocalizedCallToActionString(asset.Asset.CallToAction, i18n)}\r\n \r\n );\r\n } else if (assetType === 'Video') {\r\n return (\r\n
\r\n \r\n {withAspectRatio &&\r\n {`${asset.Asset.Width} x ${asset.Asset.Height}`}\r\n }\r\n
\r\n );\r\n }\r\n return ({asset.Asset.Text || i18n.getString(_TL_('-'))});\r\n }, [asset, i18n, styles, withAspectRatio]);\r\n return (\r\n
\r\n {preview}\r\n
\r\n );\r\n}\r\n","import { makeStyles, tokens, shorthands } from '@fluentui/react-components';\r\n\r\nexport const usePerformanceTagStyles = makeStyles({\r\n low: {\r\n color: tokens.colorStatusDangerForeground1,\r\n backgroundColor: tokens.colorStatusDangerBackground1,\r\n ...shorthands.borderColor(tokens.colorStatusDangerBorder1),\r\n },\r\n neutral: {\r\n color: tokens.colorNeutralForeground3,\r\n backgroundColor: tokens.colorNeutralBackground4,\r\n ...shorthands.borderColor(tokens.colorNeutralStroke2),\r\n },\r\n high: {\r\n color: tokens.colorStatusSuccessForeground1,\r\n backgroundColor: tokens.colorStatusSuccessBackground1,\r\n ...shorthands.borderColor(tokens.colorStatusSuccessBorder1),\r\n },\r\n});\r\n","\r\nimport classNames from 'classnames';\r\nimport React, { JSX, useCallback } from 'react';\r\nimport { Badge } from '@fluentui/react-components';\r\nimport { Star16Regular, Warning16Regular } from '@fluentui/react-icons';\r\n\r\nimport { usePerformanceTagStyles } from '../styles/performance-tag-styles';\r\nimport { Asset } from './types';\r\n\r\nconst LABEL_STRING = {\r\n Low: _TL_('Low'),\r\n Good: _TL_('Good'),\r\n Best: _TL_('Best'),\r\n Learning: _TL_('Learning'),\r\n Unrated: _TL_('Unrated'),\r\n};\r\n\r\nfunction getStyle(label: string, styles: Record<'low' | 'neutral' | 'high', string>): string {\r\n switch (label) {\r\n case 'Low':\r\n return styles.low;\r\n case 'Learning':\r\n case 'Unrated':\r\n return styles.neutral;\r\n case 'Good':\r\n case 'Best':\r\n return styles.high;\r\n default:\r\n return styles.neutral;\r\n }\r\n}\r\n\r\nfunction getIcon(label: string): JSX.Element | undefined {\r\n if (label === 'Best') {\r\n return ;\r\n }\r\n if (label === 'Low') {\r\n return ;\r\n }\r\n return undefined;\r\n}\r\n\r\nexport function useGetPerformanceTag(i18n: any) {\r\n const styles = usePerformanceTagStyles();\r\n return useCallback((asset: Asset): JSX.Element => (\r\n \r\n {i18n.getString(LABEL_STRING[asset.PerformanceLabel])}\r\n ), [i18n, styles]);\r\n}\r\n","import { makeStyles } from '@fluentui/react-components';\r\n\r\nexport const useAssetStatusStyles = makeStyles({\r\n rejected: {\r\n color: '#A80000',\r\n },\r\n});\r\n","import classNames from 'classnames';\r\nimport React, { JSX } from 'react';\r\nimport { Asset } from './types';\r\nimport { useAssetStatusStyles } from '../styles/asset-status-styles';\r\n\r\nconst STATUS_STRING = {\r\n Approved: _TL_('Approved'),\r\n ApprovedLimited: _TL_('Approved limited'),\r\n Rejected: _TL_('Rejected'),\r\n Pending: _TL_('Pending'),\r\n};\r\n\r\nexport function useGetStyledAssetStatus(i18n: any) {\r\n const styles = useAssetStatusStyles();\r\n return (asset: Asset): JSX.Element => (\r\n

\r\n {i18n.getString(STATUS_STRING[asset.EditorialStatus])}\r\n

\r\n );\r\n}\r\n","import { PaginationConfigProps } from './types';\r\n\r\nexport function getPageAssets(assets: any[], paginationConfig: PaginationConfigProps, assetsPerPage: number) {\r\n return assets.slice((paginationConfig.current - 1) * assetsPerPage, paginationConfig.current * assetsPerPage);\r\n}\r\n","export const DESCRIPTION_STRING = {\r\n Best: _TL_('The asset has the highest-rated performance. We recommend you keep using it. You may want to add similar assets.'),\r\n Good: _TL_('The asset is performing well. We recommend you keep using it. You may want to add similar assets to continue improving ad performance.'),\r\n Low: _TL_('The asset has the lowest-rated performance. We recommend you replace it to improve ad performance.'),\r\n Unrated: _TL_('We don\\'t have any performance rating for this asset. This can be due to the asset being inactive, not having enough information to determine its performance, or if there aren\\'t enough similar assets to compare against it.'),\r\n Learning: _TL_('The asset\\'s performance is being actively evaluated. Once the evaluation is complete, the asset rating will be Low, Good, Best, or Unrated'),\r\n};\r\n","import { makeStyles } from '@fluentui/react-components';\r\n\r\nconst row = {\r\n display: 'flex',\r\n flow: 'row',\r\n justifyContent: 'space-between',\r\n alignItems: 'center',\r\n height: '24px',\r\n marginBottom: '5px',\r\n};\r\n\r\nexport const usePopoverStyles = makeStyles({\r\n container: {\r\n width: '174px',\r\n color: '#323130',\r\n },\r\n title: {\r\n marginBottom: '5px',\r\n },\r\n row,\r\n perfEditorialRow: {\r\n ...row,\r\n height: 'auto',\r\n flexWrap: 'wrap',\r\n },\r\n description: {\r\n display: 'flex',\r\n marginTop: '8px',\r\n marginBottom: '8px',\r\n },\r\n});\r\n","import _ from 'underscore';\r\nimport React from 'react';\r\nimport classNames from 'classnames';\r\nimport {\r\n Body1Strong as BoldText,\r\n Caption2 as SmallText,\r\n Divider,\r\n} from '@fluentui/react-components';\r\n\r\nimport { DESCRIPTION_STRING } from './consts';\r\nimport { useGetStyledAssetStatus } from '../utils/use-get-styled-asset-status';\r\nimport { useGetPerformanceTag } from '../utils/use-get-performance-tag';\r\nimport { Asset } from '../utils/types';\r\nimport { usePopoverStyles } from '../styles/popover-styles';\r\n\r\ninterface AssetPerformancePopoverProps {\r\n i18n: any;\r\n asset: Asset;\r\n}\r\n\r\nexport function AssetPerformancePopover({ i18n, asset }: AssetPerformancePopoverProps) {\r\n const styles = usePopoverStyles();\r\n const getPerformanceTag = useGetPerformanceTag(i18n);\r\n const getStyledAssetStatus = useGetStyledAssetStatus(i18n);\r\n\r\n return (\r\n
\r\n
\r\n {i18n.getString(_TL_('Asset details'))}\r\n
\r\n
\r\n {getPerformanceTag(asset)}\r\n {getStyledAssetStatus(asset)}\r\n
\r\n
\r\n

{i18n.getString(_TL_('Impressions'))}

\r\n {_.isNumber(asset.PerformanceMetrics.Impressions) ? asset.PerformanceMetrics.Impressions : '--'}\r\n
\r\n
\r\n

{i18n.getString(_TL_('Clicks'))}

\r\n {_.isNumber(asset.PerformanceMetrics.Clicks) ? asset.PerformanceMetrics.Clicks : '--'}\r\n
\r\n \r\n {i18n.getString(DESCRIPTION_STRING[asset.PerformanceLabel ?? ''])}\r\n
\r\n );\r\n}\r\n","import { makeStyles } from '@fluentui/react-components';\r\n\r\nexport const useAssetTableStyles = makeStyles({\r\n headerRow: {\r\n borderBottomStyle: 'none',\r\n },\r\n conversionsHeader: {\r\n width: '137px',\r\n },\r\n performanceHeader: {\r\n width: '137px',\r\n },\r\n policyStatusHeader: {\r\n width: '109px',\r\n },\r\n headerText: {\r\n overflowX: 'hidden',\r\n textOverflow: 'ellipsis',\r\n whiteSpace: 'nowrap',\r\n },\r\n performanceCell: {\r\n borderRightStyle: 'solid',\r\n borderRightWidth: '1px',\r\n borderRightColor: '#E0E0E0',\r\n borderLeftStyle: 'solid',\r\n borderLeftWidth: '1px',\r\n borderLeftColor: '#E0E0E0',\r\n },\r\n});\r\n","import classNames from 'classnames';\r\nimport React, { useCallback, useState } from 'react';\r\nimport {\r\n Table, TableHeader, TableHeaderCell, TableCell, TableRow, TableBody,\r\n Popover, PopoverTrigger, PopoverSurface,\r\n useTableFeatures, useTableSort, TableColumnId,\r\n Tooltip,\r\n} from '@fluentui/react-components';\r\n\r\nimport { columns } from './columns';\r\nimport { AssetPreview } from './asset-preview';\r\nimport { useGetPerformanceTag } from '../utils/use-get-performance-tag';\r\nimport { useGetStyledAssetStatus } from '../utils/use-get-styled-asset-status';\r\nimport { getPageAssets } from '../utils/get-page-assets';\r\nimport { AssetPerformancePopover } from '../popover/asset-performance-popover';\r\nimport { useAssetTableStyles } from '../styles/asset-table-styles';\r\nimport { AssetTableProps } from '../utils/types';\r\n\r\nconst MIN_WITH_ASPECT_RATIO_WIDTH = 240;\r\n\r\n\r\nexport function AssetTable({\r\n i18n,\r\n assets,\r\n paginationConfig,\r\n assetsPerPage,\r\n resetToFirstPage,\r\n isSmallScreen,\r\n}: AssetTableProps) {\r\n const styles = useAssetTableStyles();\r\n\r\n const getPerformanceTag = useGetPerformanceTag(i18n);\r\n const getStyledAssetStatus = useGetStyledAssetStatus(i18n);\r\n\r\n const [withAspectRatio, setWithAspectRatio] = useState(false);\r\n const setWithAspectRatioValue = useCallback((e: any) => {\r\n if (e?.offsetWidth) {\r\n setWithAspectRatio(e.offsetWidth > MIN_WITH_ASPECT_RATIO_WIDTH);\r\n }\r\n }, []);\r\n\r\n const {\r\n getRows,\r\n sort: { getSortDirection, toggleColumnSort, sort },\r\n } = useTableFeatures(\r\n {\r\n columns,\r\n items: assets,\r\n },\r\n [\r\n useTableSort({}),\r\n ]\r\n );\r\n\r\n const headerSortProps = (columnId: TableColumnId) => ({\r\n onClick: (e: React.MouseEvent) => {\r\n resetToFirstPage();\r\n toggleColumnSort(e, columnId);\r\n },\r\n sortDirection: getSortDirection(columnId),\r\n });\r\n\r\n const rows = sort(getRows());\r\n\r\n const rowsToDisplay = getPageAssets(rows, paginationConfig, assetsPerPage);\r\n return (\r\n \r\n \r\n \r\n setWithAspectRatioValue(e)} key=\"asset\">\r\n {i18n.getString(_TL_('Asset'))}\r\n \r\n {!isSmallScreen &&\r\n \r\n \r\n \r\n \r\n {i18n.getString(_TL_('Performance'))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {i18n.getString(_TL_('Policy status'))}\r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n {rowsToDisplay.map(({ item }) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {!isSmallScreen &&\r\n \r\n {getPerformanceTag(item)}\r\n {getStyledAssetStatus(item)}\r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n
\r\n );\r\n}\r\n","import _ from 'underscore';\r\nimport React from 'react';\r\nimport classNames from 'classnames';\r\nimport {\r\n Body1Strong as BoldText,\r\n} from '@fluentui/react-components';\r\n\r\nimport { useGetStyledAssetStatus } from '../utils/use-get-styled-asset-status';\r\nimport { Asset } from '../utils/types';\r\nimport { usePopoverStyles } from '../styles/popover-styles';\r\n\r\ninterface AssetPerformancePopoverProps {\r\n i18n: any;\r\n asset: Asset;\r\n}\r\n\r\nexport function AssetPerformancePopoverWithConversions({ i18n, asset }: AssetPerformancePopoverProps) {\r\n const styles = usePopoverStyles();\r\n const getStyledAssetStatus = useGetStyledAssetStatus(i18n);\r\n\r\n return (\r\n
\r\n
\r\n {i18n.getString(_TL_('Asset details'))}\r\n
\r\n
\r\n {getStyledAssetStatus(asset)}\r\n
\r\n
\r\n

{i18n.getString(_TL_('Conversions'))}

\r\n {_.isNumber(asset.PerformanceMetrics.ConversionsCredit) ? asset.PerformanceMetrics.ConversionsCredit : '--'}\r\n
\r\n
\r\n

{i18n.getString(_TL_('Revenue'))}

\r\n {_.isNumber(asset.PerformanceMetrics.AdvertiserReportedRevenue) ? asset.PerformanceMetrics.AdvertiserReportedRevenue : '--'}\r\n
\r\n
\r\n

{i18n.getString(_TL_('Impressions'))}

\r\n {_.isNumber(asset.PerformanceMetrics.Impressions) ? asset.PerformanceMetrics.Impressions : '--'}\r\n
\r\n
\r\n

{i18n.getString(_TL_('Clicks'))}

\r\n {_.isNumber(asset.PerformanceMetrics.Clicks) ? asset.PerformanceMetrics.Clicks : '--'}\r\n
\r\n
\r\n );\r\n}\r\n","import classNames from 'classnames';\r\nimport React, { useCallback, useState } from 'react';\r\nimport {\r\n Table, TableHeader, TableHeaderCell, TableCell, TableRow, TableBody,\r\n Popover, PopoverTrigger, PopoverSurface,\r\n useTableFeatures, useTableSort, TableColumnId,\r\n Tooltip,\r\n} from '@fluentui/react-components';\r\n\r\nimport { columnsWithConversions } from './columns';\r\nimport { AssetPreview } from './asset-preview';\r\nimport { useGetStyledAssetStatus } from '../utils/use-get-styled-asset-status';\r\nimport { useGetStyledAssetConversions } from '../utils/use-get-styled-asset-conversions';\r\nimport { getPageAssets } from '../utils/get-page-assets';\r\nimport { AssetPerformancePopoverWithConversions } from '../popover/asset-performance-popover-with-conversions';\r\nimport { useAssetTableStyles } from '../styles/asset-table-styles';\r\nimport { AssetTableProps } from '../utils/types';\r\n\r\nconst MIN_WITH_ASPECT_RATIO_WIDTH = 240;\r\n\r\nexport function AssetTableWithConversions({\r\n i18n,\r\n assets,\r\n paginationConfig,\r\n assetsPerPage,\r\n resetToFirstPage,\r\n isSmallScreen,\r\n}: AssetTableProps) {\r\n const styles = useAssetTableStyles();\r\n\r\n const getStyledAssetStatus = useGetStyledAssetStatus(i18n);\r\n const getStyledAssetConversions = useGetStyledAssetConversions();\r\n\r\n const [withAspectRatio, setWithAspectRatio] = useState(false);\r\n const setWithAspectRatioValue = useCallback((e: any) => {\r\n if (e?.offsetWidth) {\r\n setWithAspectRatio(e.offsetWidth > MIN_WITH_ASPECT_RATIO_WIDTH);\r\n }\r\n }, []);\r\n\r\n const {\r\n getRows,\r\n sort: { getSortDirection, toggleColumnSort, sort },\r\n } = useTableFeatures(\r\n {\r\n columns: columnsWithConversions,\r\n items: assets,\r\n },\r\n [\r\n useTableSort({}),\r\n ]\r\n );\r\n\r\n const headerSortProps = (columnId: TableColumnId) => ({\r\n onClick: (e: React.MouseEvent) => {\r\n resetToFirstPage();\r\n toggleColumnSort(e, columnId);\r\n },\r\n sortDirection: getSortDirection(columnId),\r\n });\r\n\r\n const rows = sort(getRows());\r\n\r\n const rowsToDisplay = getPageAssets(rows, paginationConfig, assetsPerPage);\r\n return (\r\n \r\n \r\n \r\n setWithAspectRatioValue(e)} key=\"asset\">\r\n {i18n.getString(_TL_('Asset'))}\r\n \r\n {!isSmallScreen &&\r\n \r\n \r\n \r\n \r\n {i18n.getString(_TL_('Conversions'))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {i18n.getString(_TL_('Policy status'))}\r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n {rowsToDisplay.map(({ item }) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {!isSmallScreen &&\r\n \r\n {getStyledAssetConversions(item)}\r\n {getStyledAssetStatus(item)}\r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n
\r\n );\r\n}\r\n","import classNames from 'classnames';\r\nimport React, { JSX } from 'react';\r\nimport { Asset } from './types';\r\n\r\nexport function useGetStyledAssetConversions() {\r\n return (asset: Asset): JSX.Element => (\r\n

\r\n {asset.PerformanceMetrics.ConversionsCredit}\r\n

\r\n );\r\n}\r\n\r\n","import _ from 'underscore';\r\nimport { useState, useEffect, useMemo } from 'react';\r\n\r\nimport { Asset } from '../utils/types';\r\n\r\nexport const usePaginationConfig = (assets: Array, assetsPerPage) => {\r\n const [state, setState] = useState({ current: 0, total: 0 });\r\n\r\n useEffect(() => {\r\n if (!_.isEmpty(assets)) {\r\n setState({\r\n current: 1,\r\n total: Math.ceil(assets.length / assetsPerPage),\r\n });\r\n }\r\n }, [assets, assetsPerPage]);\r\n\r\n return useMemo(() => {\r\n const next = state.current + 1;\r\n let onNext = _.noop;\r\n if (next <= state.total) {\r\n onNext = () => setState({ ...state, current: next });\r\n }\r\n\r\n const previous = state.current - 1;\r\n let onPrevious = _.noop;\r\n if (previous > 0) {\r\n onPrevious = () => setState({ ...state, current: previous });\r\n }\r\n\r\n return ({\r\n current: state.current,\r\n total: state.total,\r\n onNext,\r\n onPrevious,\r\n resetToFirstPage: () => setState({ ...state, current: 1 }),\r\n });\r\n }, [state]);\r\n};\r\n","export function formatDate(date: Date): string {\r\n const year = date.getFullYear();\r\n const month = (date.getMonth() + 1).toString().padStart(2, '0');\r\n const day = date.getDate().toString().padStart(2, '0');\r\n return `${year}-${month}-${day}`;\r\n}\r\n","export const AssetType = {\r\n All: 'all',\r\n LongHeadline: 'long-headline',\r\n ShortHeadline: 'short-headline',\r\n Description: 'description',\r\n Image: 'image',\r\n Logo: 'logo',\r\n CallToAction: 'call-to-action',\r\n Video: 'video',\r\n} as const;\r\n\r\nexport const AssetTypeString = {\r\n [AssetType.All]: _TL_('All'),\r\n [AssetType.LongHeadline]: _TL_('Long headline'),\r\n [AssetType.ShortHeadline]: _TL_('Short headline'),\r\n [AssetType.Description]: _TL_('Description'),\r\n [AssetType.Image]: _TL_('Image'),\r\n [AssetType.Logo]: _TL_('Logo'),\r\n [AssetType.CallToAction]: _TL_('Call to action'),\r\n [AssetType.Video]: _TL_('Video'),\r\n} as const;\r\n\r\nexport const MAX_ASSET_CONTAINERS_IN_FILTER = 5;\r\n","import _ from 'underscore';\r\nimport { useContext, useEffect, useState } from 'react';\r\n\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { edmCampaign } from '@bingads-webui/edm-campaign';\r\n\r\nimport { formatDate } from '../utils/format-date';\r\nimport { Asset, IScopeContext } from '../utils/types';\r\nimport { AssetType } from '../filter/const';\r\n\r\nfunction filterByAssetType(assets, assetType) {\r\n if (assetType === AssetType.All) {\r\n return assets;\r\n }\r\n if (assetType === AssetType.Logo) {\r\n return assets.filter(asset => asset.AssociationType === 'SquareLogoMedia');\r\n }\r\n if (assetType === AssetType.Image) {\r\n return assets.filter(asset => asset.Asset.AssetType === 'Image' && asset.AssociationType !== 'SquareLogoMedia');\r\n }\r\n if (assetType === AssetType.LongHeadline) {\r\n return assets.filter(asset => asset.AssociationType === 'LongHeadlines');\r\n }\r\n if (assetType === AssetType.ShortHeadline) {\r\n return assets.filter(asset => asset.AssociationType === 'Headlines');\r\n }\r\n if (assetType === AssetType.Description) {\r\n return assets.filter(asset => asset.AssociationType === 'Descriptions');\r\n }\r\n if (assetType === AssetType.CallToAction) {\r\n return assets.filter(asset => asset.AssociationType === 'CallToAction');\r\n }\r\n if (assetType === AssetType.Video) {\r\n return assets.filter(asset => asset.AssociationType === 'VideoMedia16X9');\r\n }\r\n\r\n return assets;\r\n}\r\n\r\nexport const useFilteredAssetData = (headerState, dateRange) => {\r\n const { scope } = useContext(ScopeContext) as IScopeContext;\r\n const {\r\n values: {\r\n cid,\r\n aid,\r\n campaignId,\r\n },\r\n } = scope;\r\n\r\n const [assets, setAssets] = useState>();\r\n const [isLoading, setIsLoading] = useState(true);\r\n\r\n useEffect(() => {\r\n if (_.isNumber(headerState?.assetContainer?.Id)) {\r\n setIsLoading(true);\r\n edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .Campaigns.$withKey(campaignId)\r\n .AssetGroups.$withKey(headerState?.assetContainer?.Id)['Default.GetAssetLinks']\r\n .$makeCall({\r\n query: {\r\n skip: 0,\r\n top: 50,\r\n filter: { where: 'Asset/AssetSource eq Enum.AssetSource\\'AdvertiserProvided\\'' },\r\n },\r\n payload: {\r\n gridDataParameters: {\r\n DateRange: {\r\n StartDate: formatDate(dateRange.start),\r\n EndDate: formatDate(dateRange.end),\r\n },\r\n },\r\n },\r\n })\r\n .subscribe({\r\n next: (data) => {\r\n setAssets(filterByAssetType(data?.value, headerState?.assetType));\r\n setIsLoading(false);\r\n },\r\n });\r\n } else if (!_.isEmpty(headerState)) {\r\n setAssets(undefined);\r\n setIsLoading(false);\r\n }\r\n }, [aid, campaignId, cid, headerState, dateRange]);\r\n\r\n return { isLoading, assets };\r\n};\r\n","import { makeStyles } from '@fluentui/react-components';\r\n\r\nexport const useCardStyles = makeStyles({\r\n container: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent: 'space-between',\r\n height: '100%',\r\n },\r\n footer: {\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n marginTop: '12px',\r\n },\r\n});\r\n\r\n","import { isFunction } from 'underscore';\r\nimport classNames from 'classnames';\r\nimport React, { useCallback, useContext, useMemo } from 'react';\r\nimport { Button } from '@fluentui/react-components';\r\nimport { ChevronLeftRegular, ChevronRightRegular } from '@fluentui/react-icons';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { isSizeInList } from '@bingads-webui-campaign-react/pmax-overview-responsive-utils';\r\nimport { withSiteMap, getRoutePathById } from '@bingads-webui-react/with-site-map';\r\nimport { withPermissions } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { InstrumentationContext } from '@bingads-webui-react/hoc-with-instrumentation';\r\n\r\nimport { ShimmerCard } from './shimmer-card';\r\nimport { NoAssetsCard, NO_ASSETS_STATE } from './no-assets-card';\r\nimport { AssetTable as AssetTableWithPerfLabel } from './asset-table';\r\nimport { AssetTableWithConversions } from './asset-table-with-conversions';\r\nimport { usePaginationConfig } from './use-pagination-config';\r\nimport { withFilteredAssetData } from './with-filtered-asset-data';\r\nimport { useCardStyles } from '../styles/card-styles';\r\nimport { AssetPerformanceCardProps, IScopeContext } from '../utils/types';\r\n\r\nconst ASSETS_PER_PAGE = 4;\r\n\r\nexport function AssetPerformanceCard({\r\n assets,\r\n isLoading,\r\n i18n,\r\n onActionButtonClick,\r\n perfMarkerUtils,\r\n responsiveSize,\r\n siteMap,\r\n isSDK,\r\n campaignType,\r\n permissions,\r\n}: AssetPerformanceCardProps) {\r\n const styles = useCardStyles();\r\n\r\n const { scope } = useContext(ScopeContext) as IScopeContext;\r\n const instrumentationContextValue = useContext(InstrumentationContext) as any;\r\n\r\n const activityAndScenario = useMemo(() => (\r\n isFunction(instrumentationContextValue.createScenarioAndActivity) &&\r\n instrumentationContextValue.createScenarioAndActivity({\r\n scenarioName: 'Fluent2OverviewPage',\r\n activityName: 'AssetPerformanceCard',\r\n })), [instrumentationContextValue]);\r\n\r\n const AssetTable = useMemo(() => {\r\n const isConversionsEnabled = (permissions && permissions.dynamic && permissions.dynamic.AssetPerformanceTileWithConversions) || false;\r\n activityAndScenario?.activity?.trace(`Conversion metrics enabled: ${isConversionsEnabled}`);\r\n return isConversionsEnabled ? AssetTableWithConversions : AssetTableWithPerfLabel;\r\n }, [activityAndScenario, permissions]);\r\n\r\n const paginationConfig = usePaginationConfig(assets ?? [], ASSETS_PER_PAGE);\r\n const {\r\n current, total, onNext, onPrevious, resetToFirstPage,\r\n } = paginationConfig;\r\n\r\n const isSmallScreen = isSizeInList(responsiveSize, ['s', 'm']);\r\n const isCampaignTypeApp = (campaignType && campaignType === 'App') ?? false;\r\n\r\n const hasAssets = (assets ?? []).length > 0;\r\n const onClick = useCallback(() => {\r\n if (onActionButtonClick != null) {\r\n onActionButtonClick(hasAssets);\r\n } else if (isSDK) {\r\n if (scope?.values?.assetGroupId != null) {\r\n const route = getRoutePathById(siteMap, 'sdk-assets-settings');\r\n scope.save(route);\r\n } else {\r\n const {\r\n campaignId, aid, cid, uid,\r\n } = scope.values;\r\n const route = getRoutePathById(siteMap, 'asset-groups');\r\n const search = `cid=${cid}&uid=${uid}&aid=${aid}&campaignId=${campaignId}`;\r\n const url = `${route}?${search}`;\r\n window.open(url);\r\n }\r\n } else {\r\n const assetsRoute = isCampaignTypeApp ? getRoutePathById(siteMap, 'appads-asset-groups') : getRoutePathById(siteMap, 'asset-groups');\r\n const createAssetsRoute = isCampaignTypeApp ? getRoutePathById(siteMap, 'unified-appads-asset-group-create') : getRoutePathById(siteMap, 'asset-group-create');\r\n scope.save(assets ? assetsRoute : createAssetsRoute);\r\n }\r\n }, [hasAssets, assets, onActionButtonClick, scope, siteMap, isSDK, isCampaignTypeApp]);\r\n\r\n if (isLoading) {\r\n return ();\r\n }\r\n\r\n perfMarkerUtils.done();\r\n\r\n return (\r\n
\r\n {hasAssets ?\r\n \r\n : \r\n }\r\n
\r\n \r\n {hasAssets &&\r\n
\r\n
\r\n }\r\n
\r\n
\r\n );\r\n}\r\n\r\nexport const AssetPerformanceCardWithAssetData = withSiteMap(withPermissions(withFilteredAssetData(AssetPerformanceCard)));\r\n","import React, { ComponentType } from 'react';\r\n\r\nimport { withHeaderState } from '@bingads-webui-campaign-react/overview-card';\r\n\r\n\r\nimport { AssetPerformanceCardProps } from '../utils/types';\r\nimport { useFilteredAssetData } from './use-filtered-asset-data';\r\nimport { State } from '../filter/types';\r\n\r\ntype ChildProps = AssetPerformanceCardProps & { headerState?: State, dateRange: { start: Date, end: Date } };\r\nexport function withFilteredAssetData

(WrappedComponent: ComponentType

): ComponentType> {\r\n const HoC = (props: ChildProps) => {\r\n const { headerState, dateRange } = props;\r\n const { assets, isLoading } = useFilteredAssetData(headerState, dateRange);\r\n return ();\r\n };\r\n HoC.defaultProps = {\r\n headerState: undefined,\r\n };\r\n return withHeaderState(HoC);\r\n}\r\n","import React from 'react';\r\n\r\nimport { CircleFilled, PauseFilled } from '@fluentui/react-icons';\r\n\r\nimport { AssetContainer } from './types';\r\n\r\nexport const getAssetContainerNameWithStatus = (assetContainer: AssetContainer, styles: any): any => (\r\n \r\n

\r\n {assetContainer.Status === 'Active' ? : }\r\n
\r\n {assetContainer.Name}\r\n \r\n);\r\n\r\n","import React, { ComponentType, useState, useContext, useEffect } from 'react';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { edmCampaign } from '@bingads-webui/edm-campaign';\r\n\r\nimport { AssetContainer, IScopeContext } from '../utils/types';\r\nimport { AssetPerformanceFilterProps } from './types';\r\nimport { MAX_ASSET_CONTAINERS_IN_FILTER } from './const';\r\n\r\nexport const select = [\r\n 'Id',\r\n 'Status',\r\n 'Name',\r\n 'DeliveryStatus',\r\n 'DeliveryStatusDetails',\r\n];\r\n\r\nexport function useAssetGroupsData() {\r\n const { scope } = useContext(ScopeContext) as IScopeContext;\r\n const {\r\n values: {\r\n cid,\r\n aid,\r\n campaignId,\r\n },\r\n } = scope;\r\n\r\n const [assetContainers, setAssetContainers] = useState([]);\r\n const [isLoading, setIsLoading] = useState(true);\r\n\r\n useEffect(() => {\r\n setIsLoading(true);\r\n edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .Campaigns.$withKey(campaignId)\r\n .AssetGroups['Default.GridData']\r\n .$makeCall({\r\n query: {\r\n count: true,\r\n select,\r\n skip: 0,\r\n top: MAX_ASSET_CONTAINERS_IN_FILTER + 1,\r\n },\r\n })\r\n .subscribe({\r\n next: (assetGroups) => {\r\n setAssetContainers(assetGroups?.value);\r\n setIsLoading(false);\r\n },\r\n });\r\n }, [cid, aid, campaignId]);\r\n\r\n return { isLoading, assetContainers };\r\n}\r\n\r\n\r\nexport function withAssetGroupsData

(WrappedComponent: ComponentType

): ComponentType> {\r\n return (props) => {\r\n const { assetContainers, isLoading } = useAssetGroupsData();\r\n return (\r\n \r\n );\r\n };\r\n}\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useFilterStyles = makeStyles({\r\n container: {\r\n width: '100%',\r\n flexBasis: '0%',\r\n display: 'flex',\r\n flexGrow: '0',\r\n justifyContent: 'flex-end',\r\n ...shorthands.gap('5px'),\r\n },\r\n button: {\r\n width: 'fit-content',\r\n justifyContent: 'flex-end',\r\n minWidth: '35px',\r\n ...shorthands.padding('0px'),\r\n },\r\n assetContainerFilterButton: {\r\n flexBasis: '0%',\r\n flexGrow: 1,\r\n },\r\n buttonText: {\r\n ...shorthands.overflow('hidden'),\r\n lineBreak: 'anywhere',\r\n textOverflow: 'ellipsis',\r\n whiteSpace: 'nowrap',\r\n },\r\n assetGroup: {\r\n alignItems: 'center',\r\n display: 'flex',\r\n },\r\n\r\n assetContainerText: {\r\n overflowX: 'hidden',\r\n textOverflow: 'ellipsis',\r\n whiteSpace: 'nowrap',\r\n marginLeft: '3px',\r\n },\r\n icon: {\r\n width: '14px',\r\n height: '14px',\r\n },\r\n assetContainer: {\r\n '& span:first-child': {\r\n width: '100%',\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n },\r\n viewAll: {\r\n color: '#115EA3',\r\n },\r\n});\r\n","import _ from 'underscore';\r\nimport React, { useCallback, useEffect, useContext } from 'react';\r\nimport {\r\n mergeClasses,\r\n Menu,\r\n MenuButton,\r\n MenuPopover,\r\n MenuList,\r\n MenuItem,\r\n MenuTrigger,\r\n Tooltip,\r\n Caption1 as Text\r\n} from '@fluentui/react-components';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { withSiteMap, getRoutePathById } from '@bingads-webui-react/with-site-map';\r\n\r\nimport { getAssetContainerNameWithStatus } from '../utils/get-asset-container-with-status';\r\nimport { AssetType, AssetTypeString, MAX_ASSET_CONTAINERS_IN_FILTER } from './const';\r\nimport { AssetPerformanceFilterProps } from './types';\r\nimport { withAssetGroupsData } from './with-asset-groups';\r\nimport { AssetContainer, IScopeContext } from '../utils/types';\r\nimport { useFilterStyles } from '../styles/filter-styles';\r\n\r\nexport function AssetPerformanceFilter({\r\n i18n,\r\n isLoading,\r\n state,\r\n setState,\r\n assetContainers,\r\n onViewAllButtonClick,\r\n siteMap,\r\n isSDK,\r\n}: AssetPerformanceFilterProps) {\r\n const styles = useFilterStyles();\r\n const { scope } = useContext(ScopeContext) as IScopeContext;\r\n\r\n useEffect(() => {\r\n if (!state && !isLoading && _.isArray(assetContainers)) {\r\n setState({\r\n assetType: AssetType.All,\r\n assetContainer: _.find(assetContainers, container => container.Status === 'Active') || assetContainers[0],\r\n });\r\n }\r\n }, [assetContainers, isLoading, state, setState]);\r\n\r\n const onAssetTypeClick = useCallback((assetType: string) => {\r\n setState(s => ({\r\n ...s,\r\n assetType,\r\n }));\r\n }, [setState]);\r\n\r\n const onAssetContainerClick = useCallback((selectedAssetContainer?: AssetContainer) => {\r\n setState(s => ({\r\n ...s,\r\n assetContainer: selectedAssetContainer,\r\n }));\r\n }, [setState]);\r\n\r\n const onViewAllAssetGroupsClick = useCallback(() => {\r\n if (onViewAllButtonClick) {\r\n onViewAllButtonClick();\r\n } else {\r\n scope.save(isSDK ? getRoutePathById(siteMap, 'sdk-assets-settings') : getRoutePathById(siteMap, 'asset-groups'));\r\n }\r\n }, [isSDK, onViewAllButtonClick, scope, siteMap]);\r\n\r\n if (!state || _.isEmpty(assetContainers)) {\r\n return <>;\r\n }\r\n\r\n return (\r\n

\r\n \r\n \r\n \r\n \r\n {state?.assetContainer?.Name}\r\n \r\n \r\n \r\n \r\n \r\n {_.map(assetContainers, (assetGroup: AssetContainer) => (\r\n onAssetContainerClick(assetGroup)} key={assetGroup.Id}>{getAssetContainerNameWithStatus(assetGroup, styles)}\r\n ))}\r\n {assetContainers.length > MAX_ASSET_CONTAINERS_IN_FILTER && {i18n.getString(_TL_('View all asset groups'))}}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {i18n.getString(AssetTypeString[state?.assetType])}\r\n \r\n \r\n \r\n \r\n \r\n {\r\n _.values(AssetType).map((assetType: string) =>\r\n onAssetTypeClick(assetType)} key={assetType}>{i18n.getString(AssetTypeString[assetType])})\r\n }\r\n \r\n \r\n \r\n
\r\n );\r\n}\r\n\r\nAssetPerformanceFilter.defaultProps = {\r\n state: undefined,\r\n};\r\n\r\nexport const AssetPerformanceFilterWithAssetGroupsData = withSiteMap(withAssetGroupsData(AssetPerformanceFilter));\r\n","import Promise from 'bluebird';\r\nimport { useState, useCallback, useEffect, useContext } from 'react';\r\nimport { odata } from '@bingads-webui/http-util';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\n\r\n\r\nconst oDataParams = {\r\n contentType: 'application/json',\r\n path: 'AdInsight/V2/',\r\n customHeader: {\r\n name: 'x-ms-scenarioname',\r\n value: 'DisplayPlusCampaign',\r\n },\r\n};\r\n\r\nconst FetchType = { total: 'total', included: 'included', all: 'all' };\r\n\r\nexport const useIMATargetingEstimationCaller = (targetsForTotalAudienceSizeEstimation, targetsForIncludedAudienceSizeEstimation, targetsForFullTargetedAudienceSizeEstimation) => {\r\n const { scope } = useContext(ScopeContext) || {};\r\n const serverContext = useContext(ServerContext);\r\n const { cid, aid } = scope.values;\r\n const {\r\n ServicesEndpoints: { CampaignAPI: host },\r\n Token: token,\r\n Urls: { SignOutUrl = null } = {},\r\n } = serverContext;\r\n const urlBase = `Customers(${cid})/Accounts(${aid})/`;\r\n const audienceSizeEstimationUrl = `${urlBase}Default.AudienceEstimationV2`;\r\n\r\n const [isLoading, setIsLoading] = useState(false);\r\n const [totalPotentialData, setTotalPotentialData] = useState(null);\r\n const [includedOnlyData, setIncludedOnlyData] = useState(null);\r\n const [allTargetedData, setAllTargetedData] = useState(null);\r\n const [isImpressionTooSpecific, setIsImpressionTooSpecific] = useState(false);\r\n\r\n const getAudienceReachEstimation = useCallback((fetchType, targets) => {\r\n setIsLoading(true);\r\n\r\n return Promise.props({\r\n audienceSizeEstimation: odata.post({\r\n url: audienceSizeEstimationUrl,\r\n SignOutUrl,\r\n host,\r\n oDataToken: token,\r\n data: { request: targets },\r\n ...oDataParams,\r\n }),\r\n })\r\n .then(({ audienceSizeEstimation }) => {\r\n if (audienceSizeEstimation) {\r\n switch (fetchType) {\r\n case FetchType.total:\r\n setTotalPotentialData(audienceSizeEstimation);\r\n break;\r\n case FetchType.included:\r\n setIncludedOnlyData(audienceSizeEstimation);\r\n break;\r\n case FetchType.all:\r\n setAllTargetedData(audienceSizeEstimation);\r\n break;\r\n default:\r\n break;\r\n }\r\n setIsImpressionTooSpecific(audienceSizeEstimation.IsImpressionTooSpecific);\r\n }\r\n })\r\n .catch(err => Promise.reject(err))\r\n .finally(() => {\r\n setIsLoading(false);\r\n });\r\n }, [audienceSizeEstimationUrl, setTotalPotentialData, setIncludedOnlyData, setAllTargetedData]);\r\n\r\n useEffect(() => {\r\n getAudienceReachEstimation(FetchType.total, targetsForTotalAudienceSizeEstimation);\r\n }, [targetsForTotalAudienceSizeEstimation, getAudienceReachEstimation]);\r\n\r\n useEffect(() => {\r\n getAudienceReachEstimation(FetchType.included, targetsForIncludedAudienceSizeEstimation);\r\n }, [getAudienceReachEstimation, targetsForIncludedAudienceSizeEstimation]);\r\n\r\n useEffect(() => {\r\n getAudienceReachEstimation(FetchType.all, targetsForFullTargetedAudienceSizeEstimation);\r\n }, [getAudienceReachEstimation, targetsForFullTargetedAudienceSizeEstimation]);\r\n\r\n return [isLoading, totalPotentialData, includedOnlyData, allTargetedData, isImpressionTooSpecific];\r\n};\r\n","import { extend } from 'underscore';\r\nimport { jsonTreeParse } from '@bingads-webui/json-tree-parser';\r\n\r\n\r\nexport const formatIMATree = (imaList) => {\r\n const IMATree = jsonTreeParse(imaList, {\r\n field: 'Name',\r\n delimeter: '/',\r\n });\r\n\r\n // flatten the tree to a list\r\n const IMATreeItems = [];\r\n const IMATreeItemIdxMap = {};\r\n const IdMap = {};\r\n let idx = 0;\r\n const flattenTree = (tree, parentValue) => {\r\n tree.forEach((node) => {\r\n const {\r\n id, name, children, data,\r\n } = node;\r\n const item = {};\r\n\r\n if (data && data.Id) {\r\n item.allowedCheck = true;\r\n IdMap[data.Id] = item;\r\n }\r\n if (!IMATreeItemIdxMap[id]) {\r\n IMATreeItemIdxMap[id] = idx;\r\n extend(item, {\r\n value: id,\r\n name,\r\n data,\r\n childIds: children && children.map(child => child.id),\r\n });\r\n if (parentValue) {\r\n item.parentValue = parentValue;\r\n }\r\n IMATreeItems.push(item);\r\n idx += 1;\r\n }\r\n if (children) {\r\n flattenTree(children, id);\r\n }\r\n });\r\n };\r\n\r\n flattenTree(IMATree, null);\r\n\r\n return {\r\n IMATreeItems, IMATreeItemIdxMap, IdMap,\r\n };\r\n};\r\n\r\n/**\r\n * For impressions and clicks, 0-2 decimal places\r\n */\r\nexport const impreAndClicksOptions = {\r\n compact: 'short',\r\n minimumFractionDigits: 0,\r\n maximumFractionDigits: 2,\r\n};\r\n\r\n/**\r\n * For no decimals, 0 decimal places\r\n */\r\nexport const noDecimalOptions = {\r\n minimumFractionDigits: 0,\r\n maximumFractionDigits: 0,\r\n};\r\n\r\nexport const formatBigDecimal = (value, i18n) => {\r\n if (value > 999999) {\r\n return i18n.formatDecimal(value, impreAndClicksOptions);\r\n }\r\n return i18n.formatDecimal(value, noDecimalOptions);\r\n};\r\n","import React, { useMemo, useEffect, useState } from 'react';\r\nimport _ from 'underscore';\r\nimport { PropTypes } from 'prop-types';\r\nimport { MessageBar, MessageBarTitle, MessageBarBody } from '@fluentui/react-message-bar';\r\nimport { StackedBarChart } from '@fluentui/react-charting';\r\nimport { Stack } from '@fluentui/react';\r\nimport { Divider, makeStyles, tokens } from '@fluentui/react-components';\r\nimport { isXandrCampaign, CampaignSubTypeMapping } from '@bingads-webui-campaign-react/constants';\r\nimport { unitValueMap } from '@bingads-webui-campaign/reach-estimate-control';\r\n\r\nimport { useIMATargetingEstimationCaller } from './use-targeting-estimation-caller';\r\nimport { formatBigDecimal } from '../utils';\r\n\r\nconst useStackStyles = makeStyles({\r\n estimationBody: {\r\n marginBottom: tokens.spacingVerticalMNudge,\r\n },\r\n firstDivider: {\r\n marginBottom: tokens.spacingVerticalMNudge,\r\n },\r\n});\r\n\r\nconst estimation = (data) => {\r\n const estimationAudienceUnit = _.get(data, ['EstAudienceSize', 'Unit']) || 'None';\r\n return unitValueMap[estimationAudienceUnit].value * (_.get(data, ['EstAudienceSize', 'Value']) || 0);\r\n};\r\n\r\nexport const IMAAudienceEstimation = ({\r\n targetedInterests = [], excludedInterests = [], i18n, autoTargeting, campaignBiddingStrategy, campaignSubType,\r\n}) => {\r\n const stackStyles = useStackStyles();\r\n const [errorMessage, setErrorMessage] = useState('');\r\n const otherProps = useMemo(() => ({\r\n AutoTargeting: autoTargeting,\r\n CampaignBiddingStrategy: campaignBiddingStrategy,\r\n CampaignSubType: CampaignSubTypeMapping[campaignSubType],\r\n }), [autoTargeting, campaignBiddingStrategy, campaignSubType]);\r\n\r\n const includesAudiences = useMemo(() => (targetedInterests ? targetedInterests.map(({ Criterion }) => Criterion.AudienceId) : []), [targetedInterests]);\r\n const excludesAudiences = useMemo(() => (excludedInterests ? excludedInterests.map(({ Criterion }) => Criterion.AudienceId) : []), [excludedInterests]);\r\n\r\n const IMATotal = useMemo(() => ({ Audience: { Includes: [], Excludes: [] }, ...otherProps }), [otherProps]);\r\n const IMAIncluded = useMemo(() => ({ Audience: { Includes: includesAudiences, Excludes: [] }, ...otherProps }), [includesAudiences, otherProps]);\r\n const IMAAll = useMemo(() => ({ Audience: { Includes: includesAudiences, Excludes: excludesAudiences }, ...otherProps }), [includesAudiences, excludesAudiences, otherProps]);\r\n\r\n const [\r\n isAudienceEstimationLoading,\r\n totalPotentialData,\r\n includedOnlyData,\r\n allTargetedData,\r\n isImpressionTooSpecific,\r\n ] = useIMATargetingEstimationCaller(IMATotal, IMAIncluded, IMAAll);\r\n\r\n let selectedData;\r\n let excludedData;\r\n let potentialdata;\r\n\r\n const includedAudiencesOnly = useMemo(() => targetedInterests.length > 0 && !excludedInterests.length, [targetedInterests, excludedInterests]);\r\n const excludedAudiencesOnly = useMemo(() => !targetedInterests.length && excludedInterests.length > 0, [targetedInterests, excludedInterests]);\r\n\r\n const estimatedIncludedOnlyData = estimation(includedOnlyData) || 0;\r\n const estimatedAllTargetedData = estimation(allTargetedData) || 0;\r\n const estimatedPotentialData = estimation(totalPotentialData) || 0;\r\n\r\n if (targetedInterests.length === 0 && excludedInterests.length === 0) {\r\n selectedData = 0;\r\n excludedData = 0;\r\n potentialdata = estimatedPotentialData;\r\n } else if (includedAudiencesOnly) {\r\n selectedData = estimatedIncludedOnlyData;\r\n excludedData = 0;\r\n potentialdata = estimatedPotentialData - estimatedIncludedOnlyData;\r\n } else if (excludedAudiencesOnly) {\r\n selectedData = estimatedAllTargetedData;\r\n excludedData = estimatedPotentialData - estimatedAllTargetedData;\r\n potentialdata = 0;\r\n } else {\r\n selectedData = estimatedAllTargetedData;\r\n excludedData = estimatedIncludedOnlyData - estimatedAllTargetedData;\r\n potentialdata = estimatedPotentialData - estimatedIncludedOnlyData;\r\n }\r\n\r\n const points = [\r\n {\r\n legend: i18n.getString(_TL_('Selected audience size')), data: selectedData, color: '#637CEF', xAxisCalloutData: i18n.getString(_TL_('Selected audience size')), yAxisCalloutData: formatBigDecimal(selectedData, i18n),\r\n },\r\n {\r\n legend: i18n.getString(_TL_('Excluded')), data: excludedData, color: '#F1511B', xAxisCalloutData: i18n.getString(_TL_('Excluded')), yAxisCalloutData: formatBigDecimal(excludedData, i18n),\r\n },\r\n {\r\n legend: i18n.getString(_TL_('Potential available reach')), data: potentialdata, color: '#D9D9D9', xAxisCalloutData: i18n.getString(_TL_('Potential available reach')), yAxisCalloutData: formatBigDecimal(potentialdata, i18n),\r\n },\r\n ];\r\n\r\n const data = {\r\n chartTitle: i18n.getString(_TL_('Audience size')),\r\n chartData: points,\r\n };\r\n\r\n useEffect(() => {\r\n if (!isAudienceEstimationLoading) {\r\n if (isImpressionTooSpecific) {\r\n setErrorMessage(i18n.getString(_TL_('Very narrow.')));\r\n } else {\r\n setErrorMessage('');\r\n }\r\n }\r\n }, [isAudienceEstimationLoading, i18n, isImpressionTooSpecific]);\r\n\r\n if (isXandrCampaign(campaignSubType)) {\r\n // ad insight estimation API does not support Xandr campaigns\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n {errorMessage &&\r\n \r\n \r\n Warning\r\n {errorMessage}\r\n \r\n \r\n }\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nIMAAudienceEstimation.propTypes = {\r\n targetedInterests: PropTypes.arrayOf(PropTypes.shape({})),\r\n excludedInterests: PropTypes.arrayOf(PropTypes.shape({})),\r\n i18n: PropTypes.shape({ getString: PropTypes.func }).isRequired,\r\n autoTargeting: PropTypes.string.isRequired,\r\n campaignBiddingStrategy: PropTypes.string.isRequired,\r\n campaignSubType: PropTypes.string.isRequired,\r\n};\r\n\r\nIMAAudienceEstimation.defaultProps = {\r\n targetedInterests: [],\r\n excludedInterests: [],\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Tooltip, makeStyles, tokens, shorthands } from '@fluentui/react-components';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\n\r\nconst useStyles = makeStyles({\r\n searchBox: {\r\n maxWidth: '100%',\r\n '& input[type=\"search\"]': {\r\n paddingLeft: tokens.spacingHorizontalSNudge,\r\n backgroundImage: 'none',\r\n },\r\n },\r\n item: {\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n marginRight: '5px',\r\n },\r\n estimatedReach: {\r\n marginLeft: '10px',\r\n alignContent: 'center',\r\n },\r\n toolTip: {\r\n maxWidth: '350px',\r\n },\r\n toolTipContentWithSpace: {\r\n marginBottom: tokens.spacingVerticalS,\r\n },\r\n toolTipContent: {\r\n maxHeight: '400px',\r\n overflowY: 'auto',\r\n wordWrap: 'break-word',\r\n\r\n '&::-webkit-scrollbar': {\r\n backgroundColor: 'transparent',\r\n width: tokens.spacingHorizontalS,\r\n },\r\n '&::-webkit-scrollbar-track': {\r\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\r\n backgroundColor: tokens.colorNeutralBackground3,\r\n },\r\n '&::-webkit-scrollbar-thumb': {\r\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\r\n backgroundColor: tokens.colorNeutralForeground3,\r\n },\r\n '&::-webkit-scrollbar-thumb:hover': {\r\n backgroundColor: tokens.colorNeutralForeground3Hover,\r\n },\r\n },\r\n});\r\n\r\n\r\nconst ToolTipContent = ({ i18n, list, styles }) => (\r\n
\r\n
{i18n.getString(_TL_('Locations where this audience serves'))}
\r\n
{list.length > 0 ? list.join(', ') : i18n.getString(_TL_('None'))}
\r\n
{i18n.getString(_TL_('Note: '))}{i18n.getString(_TL_('These locations are based on your campaign settings.'))}
\r\n
);\r\n\r\nToolTipContent.propTypes = {\r\n i18n: PropTypes.shape({ getString: PropTypes.func }).isRequired,\r\n list: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n styles: PropTypes.shape({\r\n toolTipContentWithSpace: PropTypes.string,\r\n toolTipContent: PropTypes.string,\r\n }).isRequired,\r\n};\r\n\r\nexport const Estimation = ({\r\n estimation, localizedMarkets,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n const styles = useStyles();\r\n const [toolTipVisible, setToolTipVisible] = React.useState(false);\r\n\r\n return (\r\n setToolTipVisible(data.visible)}\r\n content={{ children: , className: styles.toolTip }}\r\n relationship=\"description\"\r\n >\r\n
\r\n {estimation}\r\n
\r\n \r\n );\r\n};\r\n\r\nEstimation.propTypes = {\r\n estimation: PropTypes.string.isRequired,\r\n localizedMarkets: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n};\r\n","/* eslint-disable no-param-reassign */\r\nimport _, { groupBy, isString, compact, difference, forEach } from 'underscore';\r\nimport React, { useContext, useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { cloneDeep } from '@bingads-webui-universal/primitive-utilities';\r\nimport { makeStyles, tokens, Checkbox, mergeClasses } from '@fluentui/react-components';\r\nimport { ContextualClientSelectionTree } from '@bingads-webui-fluent-component/selection-tree';\r\nimport { Tags } from '@bingads-webui-fluent-component/tags';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { extendListSizeItem, extendInternalizationReach, getLocalizedMarkets, formatReachEstimation } from '@bingads-webui-campaign-react/ima-reach-representation';\r\n\r\nimport { Estimation } from './estimation';\r\n\r\nconst useStyles = makeStyles({\r\n searchBox: {\r\n maxWidth: '100%',\r\n '& input[type=\"search\"]': {\r\n paddingLeft: tokens.spacingHorizontalSNudge,\r\n backgroundImage: 'none',\r\n },\r\n },\r\n item: {\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n marginRight: '5px',\r\n cursor: 'default',\r\n },\r\n checkboxCursor: {\r\n cursor: 'pointer',\r\n },\r\n});\r\n\r\nexport const InterestsSelector = ({\r\n locationTargets,\r\n treeItems,\r\n treeItemIdxMap,\r\n isAIMCampaignEnabled,\r\n campaignType,\r\n selectedItems,\r\n disabledItems,\r\n onChange,\r\n containerClassName,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n const styles = useStyles();\r\n\r\n const treeItemsWithReach = useMemo(() => {\r\n if (!treeItems) {\r\n return undefined;\r\n }\r\n\r\n const { Included = [], Excluded = [] } = groupBy(locationTargets.currentLocations, 'SelectionStatus');\r\n const targetedLocationCriterions = Included.map((location) => {\r\n const criterion = location.Criterion.Type === 'Location' ? location.Criterion.LocationCriterion : location.Criterion.RadiusCriterion;\r\n return criterion.CountryCode.toUpperCase();\r\n });\r\n const excludedLocationCriterions = Excluded.map((location) => {\r\n const criterion = location.Criterion.Type === 'Location' ? location.Criterion.LocationCriterion : location.Criterion.RadiusCriterion;\r\n return criterion.CountryCode.toUpperCase();\r\n });\r\n\r\n const processedList = treeItems.map((item) => {\r\n const result = cloneDeep(item);\r\n\r\n if (result.data) {\r\n if (result.data.InternalizationReach) {\r\n result.data = extendInternalizationReach({\r\n item: result.data,\r\n peopleInLocation: locationTargets.peopleInLocation,\r\n targetedLocationCriterions,\r\n excludedLocationCriterions,\r\n i18n,\r\n });\r\n }\r\n result.data = extendListSizeItem({\r\n item: result.data,\r\n isAIMCampaignEnabled,\r\n campaignType,\r\n i18n,\r\n });\r\n }\r\n return result;\r\n });\r\n\r\n return processedList;\r\n }, [locationTargets, campaignType, i18n, isAIMCampaignEnabled, treeItems]);\r\n\r\n const ineligibleItems = useMemo(() => compact(treeItemsWithReach.map((item) => {\r\n if (item.data && item.data.isInEligibleIMA) {\r\n return item.value;\r\n }\r\n return null;\r\n })), [treeItemsWithReach]);\r\n\r\n // process disabled items\r\n const processedTreeItems = useMemo(() => {\r\n forEach(treeItemsWithReach, (item) => {\r\n item.disabled = false;\r\n });\r\n\r\n const queue = [...difference(ineligibleItems, selectedItems), ...disabledItems];\r\n while (queue.length > 0) {\r\n const item = queue.shift();\r\n const idx = treeItemIdxMap[item];\r\n const node = treeItemsWithReach[idx];\r\n node.disabled = true;\r\n }\r\n\r\n return treeItemsWithReach;\r\n }, [disabledItems, treeItemsWithReach, treeItemIdxMap, ineligibleItems, selectedItems]);\r\n\r\n const checkedItems = useMemo(() => {\r\n const checked = new Map();\r\n selectedItems.forEach(item => checked.set(item, true));\r\n\r\n return checked;\r\n }, [selectedItems]);\r\n\r\n const onTargetSelect = useCallback(({ item, data }) => {\r\n const isAddingTarget = data.checked;\r\n\r\n if (isAddingTarget) {\r\n onChange([...selectedItems, item.value]);\r\n } else {\r\n const removedTarget = selectedItems && selectedItems.filter(selected => selected !== item.value);\r\n onChange([...removedTarget]);\r\n }\r\n }, [onChange, selectedItems]);\r\n\r\n const onRenderFlatTreeItem = useCallback((item) => {\r\n const {\r\n name, data: itemData, value, disabled, index,\r\n } = item;\r\n\r\n const isItemChecked = checkedItems && checkedItems.has(value);\r\n const isDisabled = !isItemChecked && disabled;\r\n\r\n if (!itemData) {\r\n return (\r\n
{name}
\r\n );\r\n }\r\n\r\n const localizedMarkets = itemData.listSize === '-' ? [] : getLocalizedMarkets({\r\n item: itemData,\r\n i18n,\r\n campaignType,\r\n });\r\n const estimation = isString(itemData.listSize) ? itemData.listSize : formatReachEstimation(itemData.listSize, i18n);\r\n\r\n return (\r\n
\r\n
onTargetSelect({ item, data })} />{name}
\r\n \r\n
\r\n );\r\n }, [styles, i18n, campaignType, checkedItems, processedTreeItems]);\r\n\r\n const onRenderTagContent = useCallback((item) => {\r\n const idx = treeItemIdxMap[item];\r\n const node = treeItemsWithReach[idx];\r\n\r\n const { name } = node;\r\n return (
{name}
\r\n );\r\n }, [treeItemIdxMap, treeItemsWithReach]);\r\n\r\n const flatTreeItemFilter = useCallback((item, searchQuery) => {\r\n const name = item.name || '';\r\n return name.toLowerCase().includes(searchQuery.toLowerCase());\r\n }, []);\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nInterestsSelector.propTypes = {\r\n locationTargets: PropTypes.shape({\r\n currentLocations: PropTypes.arrayOf(PropTypes.shape({})),\r\n peopleInLocation: PropTypes.number,\r\n }).isRequired,\r\n treeItems: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n treeItemIdxMap: PropTypes.shape({}).isRequired,\r\n isAIMCampaignEnabled: PropTypes.bool.isRequired,\r\n campaignType: PropTypes.string.isRequired,\r\n selectedItems: PropTypes.arrayOf(PropTypes.string),\r\n disabledItems: PropTypes.arrayOf(PropTypes.string),\r\n onChange: PropTypes.func.isRequired,\r\n containerClassName: PropTypes.string,\r\n};\r\n\r\nInterestsSelector.defaultProps = {\r\n selectedItems: [],\r\n disabledItems: [],\r\n containerClassName: '',\r\n};\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport { groupBy } from 'underscore';\r\nimport React, { useContext, useCallback, useState, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Link, Divider, makeStyles, tokens, mergeClasses } from '@fluentui/react-components';\r\nimport { withCustomValidation } from '@bingads-webui-react/validation';\r\n\r\nimport { IMAAudienceEstimation } from './audience-estimation/ima-audience-estimation';\r\nimport { InterestsSelector } from './interests-selector/interests-selector';\r\nimport { formatIMATree } from './utils';\r\n\r\nconst groupInterests = (interests) => {\r\n const groupedInterests = groupBy(interests, 'Status');\r\n return {\r\n targetedInterests: groupedInterests.Active || [],\r\n excludedInterests: groupedInterests.Excluded || [],\r\n };\r\n};\r\n\r\nexport const formatInterests = ({ interests, i18n }) => {\r\n if (!interests || !interests.length) {\r\n return i18n.getString(_TL_('Targeting: No interests selected.'));\r\n }\r\n\r\n const { targetedInterests, excludedInterests } = groupInterests(interests);\r\n let targetedInterestDetails = '';\r\n let excludedInterestDetails = '';\r\n\r\n if (targetedInterests.length === 1) {\r\n targetedInterestDetails = i18n.getString(_TL_('Targeted: 1 interest'));\r\n } else if (targetedInterests.length > 1) {\r\n targetedInterestDetails = i18n.getString(_TL_('Targeted: {{count}} interests'), { count: (targetedInterests.length) });\r\n }\r\n\r\n if (excludedInterests.length === 1) {\r\n excludedInterestDetails = i18n.getString(_TL_('Excluded: 1 interest'));\r\n } else if (excludedInterests.length > 1) {\r\n excludedInterestDetails = i18n.getString(_TL_('Excluded: {{count}} interests'), { count: (excludedInterests.length) });\r\n }\r\n\r\n return `${targetedInterestDetails}${targetedInterestDetails && excludedInterestDetails && i18n.getString(_TL_('. '))}${excludedInterestDetails}`;\r\n};\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n marginBottom: tokens.spacingVerticalM,\r\n },\r\n interestsHeader: {\r\n marginBottom: tokens.spacingVerticalM,\r\n },\r\n divider: {\r\n marginTop: tokens.spacingVerticalL,\r\n marginBottom: tokens.spacingVerticalL,\r\n },\r\n});\r\n\r\nconst AudienceInterests = React.memo(({\r\n supportExclusion,\r\n isAIMCampaignEnabled,\r\n locationTargets,\r\n audienceList,\r\n campaignType,\r\n validationProps,\r\n updateValidation,\r\n autoTargeting,\r\n campaignBiddingStrategy,\r\n campaignSubType,\r\n}) => {\r\n const classes = useStyles();\r\n\r\n const {\r\n data: { interests },\r\n } = validationProps;\r\n const i18n = useContext(I18nContext);\r\n const { IMATreeItems: treeItems, IMATreeItemIdxMap: treeItemIdxMap, IdMap: audienceIdMap } = useMemo(() => {\r\n if (!audienceList) {\r\n return {};\r\n }\r\n return formatIMATree(audienceList);\r\n }, [audienceList]);\r\n const { targetedInterests, excludedInterests } = useMemo(() => groupInterests(interests), [interests]);\r\n const { targetedItems, excludedItems } = useMemo(() => {\r\n if (!audienceIdMap) {\r\n return {\r\n targetedItems: [],\r\n excludedItems: [],\r\n };\r\n }\r\n const targeted = targetedInterests.map(({ Criterion }) => audienceIdMap[Criterion.AudienceId].value);\r\n const excluded = excludedInterests.map(({ Criterion }) => audienceIdMap[Criterion.AudienceId].value);\r\n return { targetedItems: targeted, excludedItems: excluded };\r\n }, [targetedInterests, excludedInterests, audienceIdMap]);\r\n\r\n const [expandExclusions, setExpandExclusions] = useState(excludedItems.length > 0);\r\n\r\n const onTarget = useCallback((newTargeted) => {\r\n const newInterests = newTargeted.map((interest) => {\r\n const interestData = treeItems[treeItemIdxMap[interest]].data;\r\n return {\r\n Status: 'Active',\r\n Criterion: {\r\n AudienceId: interestData.Id,\r\n AudienceName: interestData.Name,\r\n AudienceType: 'InMarket',\r\n BidMultiplier: 0,\r\n Type: 'Audience',\r\n },\r\n BidType: 'TargetAndBid',\r\n };\r\n });\r\n const remainingSelected = targetedInterests.filter(interest => newInterests.some(newInterest => newInterest.Criterion.AudienceId === interest.Criterion.AudienceId));\r\n const newlySelected = newInterests.filter(newInterest => !targetedInterests.some(interest => interest.Criterion.AudienceId === newInterest.Criterion.AudienceId));\r\n updateValidation([], { interests: [...excludedInterests, ...remainingSelected, ...newlySelected] });\r\n }, [treeItemIdxMap, updateValidation, targetedInterests, excludedInterests, treeItems]);\r\n\r\n const onExclude = useCallback((newExcluded) => {\r\n const newInterests = newExcluded.map((interest) => {\r\n const interestData = treeItems[treeItemIdxMap[interest]].data;\r\n return {\r\n Status: 'Excluded',\r\n Criterion: {\r\n AudienceId: interestData.Id,\r\n AudienceName: interestData.Name,\r\n AudienceType: 'InMarket',\r\n BidMultiplier: 0,\r\n Type: 'Audience',\r\n },\r\n BidType: 'Exclude',\r\n };\r\n });\r\n const remainingSelected = excludedInterests.filter(interest => newInterests.some(newInterest => newInterest.Criterion.AudienceId === interest.Criterion.AudienceId));\r\n const newlySelected = newInterests.filter(newInterest => !excludedInterests.some(interest => interest.Criterion.AudienceId === newInterest.Criterion.AudienceId));\r\n updateValidation([], { interests: [...targetedInterests, ...remainingSelected, ...newlySelected] });\r\n }, [treeItemIdxMap, updateValidation, excludedInterests, targetedInterests, treeItems]);\r\n\r\n const onExpandExclusions = useCallback(() => {\r\n setExpandExclusions(true);\r\n }, []);\r\n\r\n if (!treeItems || !treeItemIdxMap) {\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n
{i18n.getString(_TL_('Reach people who are ready to buy or interested in:'))}
\r\n
\r\n \r\n {supportExclusion && !expandExclusions && (\r\n {i18n.getString(_TL_('Add exclusions'))}\r\n )}\r\n {supportExclusion && expandExclusions && (\r\n <>\r\n \r\n
\r\n {i18n.getString(_TL_('Exclude people who are looking to buy:'))}\r\n
\r\n \r\n \r\n )}\r\n
\r\n );\r\n});\r\n\r\nAudienceInterests.propTypes = {\r\n supportExclusion: PropTypes.bool,\r\n isAIMCampaignEnabled: PropTypes.bool.isRequired,\r\n campaignType: PropTypes.string.isRequired,\r\n locationTargets: PropTypes.shape({\r\n useParentLevel: PropTypes.bool.isRequired,\r\n parentLevelSettings: PropTypes.shape({}),\r\n currentLevelSettings: PropTypes.shape({}),\r\n peopleInLocation: PropTypes.number,\r\n }).isRequired,\r\n audienceList: PropTypes.arrayOf(PropTypes.shape({})),\r\n classes: PropTypes.shape({\r\n interestsHeader: PropTypes.string.isRequired,\r\n tooltip: PropTypes.string.isRequired,\r\n }).isRequired,\r\n validationProps: PropTypes.shape({\r\n data: PropTypes.shape({\r\n interests: PropTypes.arrayOf(PropTypes.shape({})),\r\n }),\r\n audienceListInFlatTree: PropTypes.arrayOf(PropTypes.shape({})),\r\n valueToFlatItem: PropTypes.shape({}),\r\n valueToAudience: PropTypes.shape({}),\r\n interests: PropTypes.arrayOf(PropTypes.string),\r\n }).isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n autoTargeting: PropTypes.string.isRequired,\r\n campaignBiddingStrategy: PropTypes.string.isRequired,\r\n campaignSubType: PropTypes.string.isRequired,\r\n};\r\n\r\nAudienceInterests.defaultProps = {\r\n supportExclusion: true,\r\n audienceList: undefined,\r\n};\r\n\r\nexport const ValidatedAudienceInterests = withCustomValidation(AudienceInterests);\r\n","import { useContext } from 'react';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\n\r\nexport const useBudgetRange = () => {\r\n const serverContext = useContext(ServerContext) as any;\r\n const currencyCode = serverContext?.CurrentAccount?.CurrencyCode || 'USD';\r\n\r\n const minDailyBudget = serverContext?.BudgetRange?.DailyRange?.FloorValue;\r\n\r\n // Currently the max daily budget returned by server context is the same as max monthly budget https://msasg.visualstudio.com/Bing_Ads/_git/AdsAppUI?path=/private/UI/OpportunityUI/Microsoft.AdCenter.UI.Web.Opportunity/Repository/StaticEntityRepository.cs&version=GBmaster&line=86&lineEnd=86&lineStartColumn=13&lineEndColumn=122&lineStyle=plain&_a=contents\r\n // Because of that we use the same logic as on MT where maxDailyBudget = maxMonthlyBudget / 28 https://msasg.visualstudio.com/DefaultCollection/Bing_Ads/_git/AdsAppsMT?path=/private/Common/BusinessRules/CampaignValidators/BudgetLimitHelper.cs&version=GBmaster&line=10&lineEnd=12&lineStartColumn=1&lineEndColumn=35&lineStyle=plain&_a=contents\r\n const maxDailyBudget = serverContext?.BudgetRange?.MonthlyRange?.CeilingValue\r\n ? Number((serverContext.BudgetRange.MonthlyRange.CeilingValue / 28).toFixed(2))\r\n : serverContext?.BudgetRange?.DailyRange?.CeilingValue;\r\n\r\n return {\r\n currencyCode,\r\n minDailyBudget,\r\n maxDailyBudget,\r\n };\r\n};\r\n","import { makeStyles, tokens, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useBudgetInputStyles = makeStyles({\r\n row: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n label: {\r\n marginBottom: tokens.spacingVerticalXS,\r\n },\r\n input: {\r\n maxWidth: '280px',\r\n ...shorthands.flex(1),\r\n },\r\n dropdown: {\r\n minWidth: '150px',\r\n marginLeft: tokens.spacingHorizontalXS,\r\n },\r\n currency: {\r\n ...shorthands.margin('0', '0', '0', tokens.spacingHorizontalS),\r\n },\r\n});\r\n","import React, { useCallback, useContext, useMemo } from 'react';\r\nimport _ from 'underscore';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n Input,\r\n InputProps,\r\n Label,\r\n mergeClasses,\r\n useId,\r\n Dropdown,\r\n Option,\r\n} from '@fluentui/react-components';\r\nimport { HelpPopupInline } from '@bingads-webui-react/help-popup';\r\n\r\nimport { useBudgetInputStyles } from './styles/budget-input-styles';\r\n\r\ndeclare function _TL_(arg0: string): string;\r\n\r\ninterface BudgetInputPureProps {\r\n className?: string;\r\n value?: string;\r\n onChange: (value: string) => void;\r\n currency: string;\r\n label?: string;\r\n helpTopic?: string;\r\n helpLabel?: string;\r\n showDropdown?: boolean;\r\n onSelectCurrency?: (event: any, data: any) => void;\r\n currencies?: { code: string; text: string }[];\r\n}\r\n\r\nexport const BudgetInputPure: React.FC = (props) => {\r\n const {\r\n className,\r\n value,\r\n onChange,\r\n currency,\r\n label,\r\n helpTopic,\r\n helpLabel,\r\n showDropdown,\r\n onSelectCurrency,\r\n currencies = [],\r\n } = props;\r\n const id = useId('budget-input');\r\n const classes = useBudgetInputStyles();\r\n const i18n = useContext(I18nContext) as any;\r\n\r\n const onInputChange: InputProps['onChange'] = useCallback(\r\n (_e, data) => {\r\n onChange(data?.value);\r\n },\r\n [onChange]\r\n );\r\n\r\n const selectedOption = useMemo(() => {\r\n if (!showDropdown || !currency) {\r\n return { code: '', text: '' };\r\n }\r\n return (\r\n _.find(currencies, c => c.code === currency) || { code: '', text: '' }\r\n );\r\n }, [showDropdown, currency, currencies]);\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n {showDropdown ? (\r\n \r\n {_.map(currencies, c => (\r\n \r\n ))}\r\n \r\n ) : (\r\n \r\n {currency}\r\n \r\n )}\r\n
\r\n
\r\n );\r\n};\r\n\r\nBudgetInputPure.defaultProps = {\r\n className: '',\r\n value: undefined,\r\n label: undefined,\r\n helpTopic: undefined,\r\n helpLabel: undefined,\r\n showDropdown: false,\r\n onSelectCurrency: _.noop,\r\n currencies: [],\r\n};\r\n","import { makeStyles, tokens } from '@fluentui/react-components';\r\n\r\nexport const useValidatedBudgetInputStyles = makeStyles({\r\n root: {\r\n marginBottom: tokens.spacingVerticalMNudge,\r\n },\r\n});\r\n","import _ from 'underscore';\r\nimport React, { useCallback, useMemo, useContext } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { withValidation, GenericAdapter } from '@bingads-webui-react/validation';\r\nimport { withErrorField } from '@bingads-webui-react/primitive-validation-fluent';\r\nimport { mergeClasses } from '@fluentui/react-components';\r\n\r\nimport { BudgetInputPure } from './budget-input-pure';\r\nimport { useBudgetRange } from './use-budget-range';\r\nimport { useValidatedBudgetInputStyles } from './styles/validated-budget-input-styles';\r\n\r\nconst BudgetInput = withErrorField(withValidation(BudgetInputPure, GenericAdapter));\r\n\r\ndeclare function _TL_(arg0: string): string;\r\n\r\ninterface ValidatedBudgetInputProps {\r\n budgetKey?: string;\r\n maxBudget?: number;\r\n minBudget?: number;\r\n currency?: string;\r\n validationProps: {},\r\n}\r\n\r\nexport const ValidatedBudgetInput: React.FC = (props) => {\r\n const {\r\n currency,\r\n budgetKey,\r\n maxBudget,\r\n minBudget,\r\n validationProps,\r\n ...rest\r\n } = props;\r\n\r\n const classes = useValidatedBudgetInputStyles();\r\n const i18n = useContext(I18nContext) as any;\r\n\r\n const {\r\n currencyCode,\r\n minDailyBudget,\r\n maxDailyBudget,\r\n } = useBudgetRange();\r\n\r\n const finalMaxBudget = maxBudget || maxDailyBudget;\r\n const finalMinBudget = minBudget || minDailyBudget;\r\n const finalCurrency = currency || currencyCode;\r\n\r\n const budgetSchema = useMemo(() => ({\r\n name: 'Budget schema',\r\n type: 'object',\r\n properties: {\r\n [String(budgetKey)]: {\r\n type: 'number',\r\n required: true,\r\n maximum: finalMaxBudget,\r\n minimum: finalMinBudget,\r\n },\r\n },\r\n }), [budgetKey, finalMaxBudget, finalMinBudget]);\r\n\r\n const customErrorProcessor = useCallback(errors => _.map(\r\n errors,\r\n (oldError, key) => {\r\n const customErrors = {\r\n decimalLength: i18n.getString(_TL_('Budget needs to be set to 2 decimal lengths')),\r\n range: i18n.getString(_TL_('Your budget should be greater than {{accountCurrencyCode}} {{dailyRangeFloorValue}} and less than your daily maximum. The daily max. is your monthly budget averaged out over the number of days left in the month.'), {\r\n accountCurrencyCode: finalCurrency,\r\n dailyRangeFloorValue: finalMinBudget,\r\n }),\r\n required: i18n.getString(_TL_('This field is required')),\r\n type: i18n.getString(_TL_('Field requires numeric value')),\r\n };\r\n return customErrors[key] || oldError;\r\n }\r\n ), [finalCurrency, finalMinBudget, i18n]);\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nValidatedBudgetInput.defaultProps = {\r\n budgetKey: 'Budget',\r\n maxBudget: undefined,\r\n minBudget: undefined,\r\n currency: undefined,\r\n};\r\n","import { useContext, useMemo } from 'react';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\n\r\nexport const useIsReadOnlyUser = (): boolean => {\r\n const serverContext = useContext(ServerContext) as any;\r\n return useMemo(() => (serverContext?.CurrentAccountInActive || serverContext?.Permissions?.IsReadOnlyUser), [serverContext]);\r\n};\r\n","import React, { useMemo } from 'react';\r\nimport {\r\n Menu,\r\n MenuButton,\r\n MenuItemRadio,\r\n MenuList,\r\n MenuPopover,\r\n MenuTrigger,\r\n MenuProps,\r\n tokens,\r\n} from '@fluentui/react-components';\r\nimport {\r\n ChevronDown16Regular,\r\n FluentIcon,\r\n} from '@fluentui/react-icons';\r\n\r\nimport { useIsReadOnlyUser } from './use-is-read-only-user';\r\n\r\ninterface IMenuItemConfig {\r\n icon?: FluentIcon;\r\n iconColor?: string;\r\n text: string;\r\n value: string;\r\n}\r\n\r\nexport interface IDropdownMenuButtonProps {\r\n checkedValue: string;\r\n onChange: MenuProps['onCheckedValueChange'];\r\n menuItemConfigs: IMenuItemConfig[];\r\n buttonAriaLabel: string;\r\n}\r\n\r\nexport const DropdownMenuButton: React.FunctionComponent = ({\r\n checkedValue,\r\n onChange,\r\n menuItemConfigs,\r\n buttonAriaLabel,\r\n}: IDropdownMenuButtonProps) => {\r\n const isReadOnly = useIsReadOnlyUser();\r\n\r\n const checkedValues = useMemo<\r\n Record\r\n >(() => ({\r\n key: [checkedValue],\r\n }), [checkedValue]);\r\n\r\n const menuItems = useMemo(() => menuItemConfigs.map(menuItemConfig => (\r\n : null\r\n }\r\n value={menuItemConfig.value}\r\n name=\"key\"\r\n key={menuItemConfig.value}\r\n className=\"ba-status-summary-card-menu-list-item\"\r\n >\r\n {menuItemConfig.text}\r\n \r\n )), [menuItemConfigs]);\r\n\r\n return (\r\n \r\n \r\n }\r\n className=\"ba-status-summary-card-menu-button\"\r\n aria-label={buttonAriaLabel}\r\n disabled={isReadOnly}\r\n />\r\n \r\n\r\n \r\n \r\n {menuItems}\r\n \r\n \r\n \r\n );\r\n};\r\n","import React, { useState, useCallback } from 'react';\r\nimport {\r\n MenuButton,\r\n Dialog,\r\n DialogTrigger,\r\n DialogSurface,\r\n DialogBody,\r\n DialogTitle,\r\n DialogContent,\r\n} from '@fluentui/react-components';\r\nimport { Edit16Filled } from '@fluentui/react-icons';\r\n\r\nimport { useIsReadOnlyUser } from './use-is-read-only-user';\r\n\r\nexport interface IDialogEditButtonProps {\r\n title: string;\r\n ChildComponent: React.FunctionComponent<{ closeDialog: () => void; }>;\r\n buttonAriaLabel: string;\r\n}\r\n\r\nexport const DialogEditButton: React.FunctionComponent = ({\r\n title,\r\n ChildComponent,\r\n buttonAriaLabel,\r\n}: IDialogEditButtonProps) => {\r\n const [isOpen, setIsOpen] = useState(false);\r\n\r\n const isReadOnly = useIsReadOnlyUser();\r\n\r\n const closeDialog = useCallback(() => setIsOpen(false), [setIsOpen]);\r\n\r\n const onOpenChange = useCallback((_e, data) => {\r\n setIsOpen(data.open);\r\n }, [setIsOpen]);\r\n\r\n return (\r\n \r\n \r\n }\r\n className=\"ba-status-summary-card-menu-button\"\r\n aria-label={buttonAriaLabel}\r\n disabled={isReadOnly}\r\n />\r\n \r\n \r\n \r\n {title}\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import { makeStyles, shorthands, tokens } from '@fluentui/react-components';\r\n\r\nconst colors = {\r\n green: {\r\n backgroundColor: tokens.colorPaletteDarkGreenBackground2,\r\n color: tokens.colorPaletteDarkGreenForeground2,\r\n },\r\n gray: {\r\n backgroundColor: tokens.colorNeutralBackground1Hover,\r\n color: tokens.colorNeutralForeground2,\r\n },\r\n purple: {\r\n backgroundColor: tokens.colorPalettePurpleBackground2,\r\n color: tokens.colorPalettePurpleForeground2,\r\n },\r\n brown: {\r\n backgroundColor: tokens.colorPaletteBrownBackground2,\r\n color: tokens.colorPaletteBrownForeground2,\r\n },\r\n blue: {\r\n backgroundColor: tokens.colorPaletteBlueBackground2,\r\n color: tokens.colorPaletteBlueForeground2,\r\n },\r\n};\r\n\r\nexport type TColorKey = keyof typeof colors;\r\n\r\nexport const useStyles = makeStyles({\r\n cardContainer: {\r\n flexGrow: 1,\r\n height: '68px',\r\n },\r\n card: {\r\n height: '68px',\r\n ...shorthands.padding('12px'),\r\n },\r\n cardText: {\r\n ...shorthands.overflow('hidden'),\r\n maxWidth: '180px',\r\n display: 'block',\r\n },\r\n cardDescription: {\r\n ...shorthands.overflow('hidden'),\r\n maxWidth: '180px',\r\n display: 'block',\r\n },\r\n cardWarning: {\r\n display: 'inline',\r\n color: 'var(--Status-Warning-Foreground-1-Rest, #BC4B09)',\r\n textDecorationStyle: 'dashed',\r\n textDecorationLine: 'underline',\r\n },\r\n iconWarning: {\r\n color: 'var(--Status-Warning-Foreground-1-Rest, #BC4B09)',\r\n cursor: 'pointer',\r\n },\r\n});\r\n\r\nexport const useIconStyles = makeStyles({\r\n iconContainer: {\r\n height: '44px',\r\n width: '44px',\r\n boxSizing: 'border-box',\r\n backgroundColor: '#9AD29A',\r\n color: '#063B06',\r\n ...shorthands.borderRadius('4px'),\r\n ...shorthands.padding('12px'),\r\n },\r\n icon: {\r\n height: '20px',\r\n width: '20px',\r\n },\r\n});\r\n\r\nexport const useIconColorStyles = makeStyles({\r\n ...colors,\r\n});\r\n","import React, { memo } from 'react';\r\nimport classNames from 'classnames';\r\nimport {\r\n FluentIcon,\r\n} from '@fluentui/react-icons';\r\nimport { TColorKey, useIconStyles, useIconColorStyles } from '../styles/styles';\r\n\r\nexport interface IIconProps {\r\n IconComponent: FluentIcon;\r\n color: TColorKey;\r\n}\r\n\r\nexport const StatusSummaryCardIcon: React.FunctionComponent = memo(({\r\n IconComponent,\r\n color,\r\n}: IIconProps) => {\r\n const classes = useIconStyles();\r\n const colorClasses = useIconColorStyles();\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n
\r\n );\r\n});\r\n","import React, { memo, useMemo } from 'react';\r\nimport classNames from 'classnames';\r\nimport {\r\n Card,\r\n CardHeader,\r\n Text,\r\n Caption1,\r\n Tooltip,\r\n Button,\r\n} from '@fluentui/react-components';\r\nimport { Shimmer } from '@fluentui/react';\r\nimport {\r\n Warning16Regular,\r\n} from '@fluentui/react-icons';\r\n\r\nimport { DropdownMenuButton, IDropdownMenuButtonProps } from './components/dropdown-menu-button';\r\nimport { DialogEditButton, IDialogEditButtonProps } from './components/dialog-edit-button';\r\nimport { StatusSummaryCardIcon, IIconProps } from './components/icon';\r\nimport { useStyles } from './styles/styles';\r\n\r\nexport interface IStatusSummaryCardProps extends IIconProps {\r\n header: string;\r\n description: string;\r\n dropdownMenuProps?: IDropdownMenuButtonProps;\r\n dialogEditProps?: IDialogEditButtonProps;\r\n isLoading: boolean;\r\n className?: string;\r\n warningMessage?: string;\r\n}\r\n\r\nexport const StatusSummaryCard: React.FunctionComponent = memo(({\r\n header,\r\n description,\r\n IconComponent,\r\n color,\r\n dropdownMenuProps,\r\n dialogEditProps,\r\n isLoading,\r\n className,\r\n warningMessage,\r\n}: IStatusSummaryCardProps) => {\r\n const classes = useStyles();\r\n\r\n const action = useMemo(() => {\r\n if (dropdownMenuProps) {\r\n return ();\r\n }\r\n\r\n if (dialogEditProps) {\r\n return ();\r\n }\r\n\r\n return null;\r\n }, [dialogEditProps, dropdownMenuProps]);\r\n\r\n return (\r\n
\r\n \r\n {isLoading ?\r\n }\r\n header={}\r\n description={}\r\n /> :\r\n \r\n }\r\n header={\r\n \r\n \r\n {header}\r\n \r\n \r\n }\r\n description={\r\n \r\n \r\n {description}\r\n {warningMessage &&\r\n
\r\n }\r\n />\r\n {warningMessage}\r\n
\r\n }\r\n \r\n
\r\n }\r\n action={action}\r\n />}\r\n
\r\n
\r\n );\r\n});\r\n\r\nStatusSummaryCard.defaultProps = {\r\n dropdownMenuProps: undefined,\r\n dialogEditProps: undefined,\r\n className: '',\r\n warningMessage: undefined,\r\n};\r\n","import { makeStyles } from '@fluentui/react-components';\r\n\r\nexport const useFooterStyles = makeStyles({\r\n container: {\r\n marginTop: '8px',\r\n display: 'flex',\r\n justifyContent: 'flex-end',\r\n },\r\n saveButton: {\r\n marginRight: '8px',\r\n },\r\n containerLeft: {\r\n marginTop: '8px',\r\n display: 'flex',\r\n },\r\n});\r\n","import React, { useContext, useCallback } from 'react';\r\nimport classNames from 'classnames';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { FORM_STATES, FORM_EVENTS, useFormService } from '@bingads-webui-react/form';\r\nimport { Button } from '@fluentui/react-components';\r\n\r\nimport { useFooterStyles } from '../styles/footer-styles';\r\n\r\nexport function withFooter(WrappedComponent, showBudgetSuggestion?) {\r\n const HoC = (props) => {\r\n const i18n = useContext(I18nContext) as any;\r\n const styles = useFooterStyles();\r\n const { state, send } = useFormService();\r\n const isLoading = state.matches(FORM_STATES.LOADING);\r\n\r\n const onSave = useCallback(() => send(FORM_EVENTS.SAVE), [send]);\r\n const onCancel = useCallback(() => send(FORM_EVENTS.CANCEL), [send]);\r\n return (\r\n <>\r\n \r\n {!showBudgetSuggestion &&\r\n
\r\n \r\n \r\n
\r\n }\r\n\r\n {showBudgetSuggestion &&\r\n
\r\n \r\n \r\n
}\r\n \r\n );\r\n };\r\n HoC.defaultProps = {\r\n headerState: undefined,\r\n };\r\n return HoC;\r\n}\r\n","import { useContext, useCallback } from 'react';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { getCampaignStatus, getCampaignStatusPromise } from '@bingads-webui-campaign-react/pmax-overview-data';\r\n\r\nexport const useReadCampaign = ({ set }) => {\r\n const { scope } = useContext(ScopeContext) as any;\r\n const {\r\n cid, aid, campaignId,\r\n } = scope.values;\r\n\r\n return useCallback(() => getCampaignStatus({\r\n cid, aid, campaignId, set,\r\n }), [aid, campaignId, cid, set]);\r\n};\r\n\r\nexport const useReadCampaignPromise = () => {\r\n const { scope } = useContext(ScopeContext) as any;\r\n const {\r\n cid, aid, campaignId,\r\n } = scope.values;\r\n\r\n return useCallback(() => getCampaignStatusPromise({ cid, aid, campaignId }), [aid, campaignId, cid]);\r\n};\r\n","import { edmCampaign } from '@bingads-webui/edm-campaign';\r\n\r\nexport const createOrUpdateCampaign = (data) => {\r\n const campaignEDM = edmCampaign.types.resolve('Model.ShoppingCampaign');\r\n const campaignResource = new campaignEDM.ResourceIdentifier();\r\n const createOrUpdateCall = data && data.Id ?\r\n campaignResource.bulkUpdate.bind(campaignResource) :\r\n campaignResource.bulkCreate.bind(campaignResource);\r\n return createOrUpdateCall(data);\r\n};\r\n","import { useState, useCallback, useContext, useMemo } from 'react';\r\nimport _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { MAX_CONVERSIONS } from '@bingads-webui-campaign-react/bid-strategy-component';\r\nimport { InstrumentationContext } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { showBudgetBidCampaignNotifications } from '@bingads-webui-campaign/import-shared-utils';\r\nimport { LogTargetCpaCheckOnSave } from '@bingads-webui-campaign-react/target-cpa-warning-banner';\r\n\r\nimport { useReadCampaignPromise } from './use-read-campaign';\r\nimport { createOrUpdateCampaign } from '../utils/create-or-update-campaign';\r\n\r\nexport const useRepository = (isBudget: Boolean) => {\r\n const { scope } = useContext(ScopeContext) as any;\r\n const { campaignId } = scope.values;\r\n const instrumentation = useContext(InstrumentationContext) as any;\r\n const readCampaign = useReadCampaignPromise();\r\n const [initialCampaign, setInitialCampaign] = useState({});\r\n\r\n const log = useMemo(() => {\r\n if (instrumentation && instrumentation.campaignOverviewEdit) {\r\n const scenario = instrumentation.campaignOverviewEdit.create();\r\n return isBudget ? scenario.budgetEdit.create() : scenario.bidStrategyEdit.create();\r\n }\r\n return {\r\n trace: _.noop,\r\n error: _.noop,\r\n };\r\n }, [instrumentation, isBudget]);\r\n const i18n = useContext(I18nContext) as any;\r\n const serverContext = useContext(ServerContext) as any;\r\n const currencyCode = serverContext?.CurrentAccount?.CurrencyCode;\r\n\r\n const localizeBudget = useCallback((budget, currency) => i18n.formatCurrency(\r\n Number(budget), currency.toUpperCase(),\r\n { withSymbol: false }\r\n ), [i18n]);\r\n\r\n const loadCampaign = useCallback(() => {\r\n if (!campaignId) {\r\n return Promise.resolve({\r\n initialBudget: null,\r\n bidStrategy: null,\r\n cpa: null,\r\n });\r\n }\r\n\r\n return readCampaign().then((campaign) => {\r\n log.trace(`Load campaign succeed: ${JSON.stringify(campaign)}`);\r\n setInitialCampaign(campaign);\r\n const campaignType = campaign?.CampaignType;\r\n const campaignGoal = campaign?.CampaignSettings?.[0]?.Goal;\r\n const budgetAmount = campaign?.Budget?.Amount;\r\n const bidStrategy = campaign?.BiddingScheme?.Type;\r\n const cpa = campaign?.BiddingScheme?.TargetCpa;\r\n const roas = campaign?.BiddingScheme?.TargetRoas;\r\n const language = _.first(campaign?.Languages);\r\n const isInitialAdditionalDetailsChecked = _.isNumber(cpa) || _.isNumber(roas);\r\n const deliveryStatus = campaign?.DeliveryStatus;\r\n const deliveryStatusDetails = campaign?.DeliveryStatusDetails;\r\n\r\n return {\r\n campaignType,\r\n campaignGoal,\r\n budgetAmount,\r\n bidStrategy,\r\n cpa,\r\n roas: (_.isNumber(roas) ? roas * 100 : null),\r\n language,\r\n isInitialAdditionalDetailsChecked,\r\n deliveryStatus,\r\n deliveryStatusDetails,\r\n };\r\n }).catch((error) => {\r\n log.error(`Load campaign fail: ${JSON.stringify(error)}`);\r\n\r\n return Promise.reject(error);\r\n });\r\n }, [log, campaignId, readCampaign]);\r\n\r\n const load = useCallback(() => loadCampaign().then((campaignData) => {\r\n const currency = currencyCode;\r\n\r\n return ({\r\n ...campaignData,\r\n currency,\r\n budgetAmount: localizeBudget(campaignData.budgetAmount, currency),\r\n isBudgetValid: true,\r\n isMarketingMetricValid: true,\r\n });\r\n }).catch((error) => {\r\n log.error(`Load campaign requests fail: ${JSON.stringify(error)}`);\r\n return Promise.reject(error);\r\n }), [loadCampaign, localizeBudget, log, currencyCode]);\r\n\r\n const save = ({ data }) => {\r\n const {\r\n campaignType,\r\n budgetAmount,\r\n bidStrategy,\r\n cpa,\r\n roas,\r\n isBudgetValid,\r\n isMarketingMetricValid,\r\n } = data || {};\r\n\r\n if (!isBudgetValid || !isMarketingMetricValid) {\r\n return Promise.reject(new Error(`use-repository - isBudget ${isBudget}: invalid data to save isBudgetValid: ${isBudgetValid} isMarketingMetricValid: ${isMarketingMetricValid}`));\r\n }\r\n\r\n let marketingMetric = {};\r\n if (campaignType === 'PerformanceMax') {\r\n marketingMetric = bidStrategy === MAX_CONVERSIONS.type\r\n ? { TargetCpa: cpa }\r\n : { TargetRoas: (_.isNumber(roas) ? (roas / 100).toFixed(4) : null) };\r\n }\r\n\r\n const updateCampaign = () => {\r\n const modelToSave = {\r\n Id: campaignId,\r\n BiddingScheme: {\r\n Type: bidStrategy,\r\n ...marketingMetric,\r\n },\r\n Budget: {\r\n Amount: i18n.parseDecimal(budgetAmount),\r\n Type: 'DailyStandard',\r\n },\r\n };\r\n\r\n return createOrUpdateCampaign(modelToSave).then((res) => {\r\n log.trace(`Update ${isBudget ? 'budget' : 'bid strategy'} succeed`);\r\n const { activity: BudgetBidCampaignImportNotificationActivity } = instrumentation.createScenarioAndActivity({\r\n scenarioName: 'BudgetBidCampaignImportNotification',\r\n activityName: 'PmaxCampaignStatusCard',\r\n });\r\n\r\n\r\n showBudgetBidCampaignNotifications({\r\n campaignItemList: [initialCampaign],\r\n oldBudget: initialCampaign?.Budget,\r\n newBudget: modelToSave.Budget,\r\n oldBidStrategy: initialCampaign?.BiddingScheme,\r\n newBidStrategy: modelToSave.BiddingScheme,\r\n activity: BudgetBidCampaignImportNotificationActivity,\r\n });\r\n return res;\r\n }).catch((error) => {\r\n log.error(`Update ${isBudget ? 'budget' : 'bid strategy'} fails: ${JSON.stringify(error)}`);\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({ error });\r\n });\r\n };\r\n\r\n return updateCampaign().then(() => {\r\n log.trace(`Save ${isBudget ? 'budget' : 'bid strategy'} succeed`);\r\n if (!isBudget) {\r\n LogTargetCpaCheckOnSave(i18n, { dynamic: { TargetCpaValueCheck: true } }, budgetAmount, cpa, log, 'campaign-status-summary-card');\r\n }\r\n return data;\r\n }).catch((error) => {\r\n log.error(`Save ${isBudget ? 'budget' : 'bid strategy'} fails: ${JSON.stringify(error)}`);\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({ error });\r\n });\r\n };\r\n\r\n return {\r\n load,\r\n save,\r\n };\r\n};\r\n\r\nexport const useBudgetRepository = () => useRepository(true);\r\nexport const useBidStrategyRepository = () => useRepository(false);\r\n","export function getApiErrorMapper(i18n: any): Function {\r\n return (function apiErrorMapper(error: any): string {\r\n switch (error?.Error) {\r\n case 'CampaignServiceInvalidDailyBudget': {\r\n return i18n.getString(_TL_('Invalid daily budget'));\r\n }\r\n case 'UnsupportedBiddingScheme': {\r\n return i18n.getString(_TL_('Unsupported bidding scheme'));\r\n }\r\n case 'InvalidTargetRoasValue': {\r\n return i18n.getString(_TL_('Invalid target ROAS value'));\r\n }\r\n default: {\r\n return i18n.getString(_TL_('An error occurred, please try again later'));\r\n }\r\n }\r\n });\r\n}\r\n","import { makeStyles, tokens } from '@fluentui/react-components';\r\n\r\nexport const useBudgetCardStyles = makeStyles({\r\n container: {\r\n '& .error': {\r\n color: tokens.colorPaletteCranberryBorderActive,\r\n },\r\n },\r\n});\r\n","import _ from 'underscore';\r\nimport React, { useState, useContext, useCallback, useMemo, useEffect } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { WalletCreditCard20Regular } from '@fluentui/react-icons';\r\nimport { StatusSummaryCard } from '@bingads-webui-campaign-react/status-summary-card';\r\nimport { BudgetComponent } from '@bingads-webui-campaign-react/budget-component';\r\nimport { FORM_STATES, Form, useFormService } from '@bingads-webui-react/form';\r\nimport { ValidationGroup } from '@bingads-webui-react/validation';\r\nimport { Budget } from '@bingads-webui/campaign-odata-schemas';\r\nimport { FormErrorGroup, UnmappedFormErrors as OriginalUnmappedFormErrors } from '@bingads-webui-campaign-react/form-error';\r\nimport { withControlErrorHandling } from '@bingads-webui-campaign-react/error-handling';\r\nimport { InstrumentationContext } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { BudgetSuggestion, MODE, useBudgetSuggestionRepository } from '@bingads-webui-campaign-react/budget-suggestion-v2';\r\nimport { LearnMoreLink } from '@bingads-webui-campaign-react/help';\r\nimport { mergeI18n } from '@bingads-webui-campaign-react/i18n-merger';\r\nimport { buildLegacyI18n } from '@bingads-webui/build-legacy-i18n';\r\nimport { ValidationStringMap } from '@bingads-webui/validation-string-map';\r\nimport { LinkedInBudgetRangePerCurrency } from '@bingads-webui-campaign-legacy/common-grid-config/budget/get-budget-range';\r\n\r\nimport { withFooter } from './with-footer';\r\nimport { useBudgetRepository } from './use-repository';\r\nimport { useReadCampaign } from './use-read-campaign';\r\nimport { getApiErrorMapper } from '../utils/api-error-mapper';\r\nimport { useBudgetCardStyles } from '../styles/budget-card-styles';\r\n\r\nconst UnmappedFormErrors = withControlErrorHandling(OriginalUnmappedFormErrors);\r\n\r\nconst FormViewWrapper = ({\r\n data,\r\n onDataChange,\r\n logger,\r\n error,\r\n}: { data: any; onDataChange: Function; logger: Function; error: any; }) => {\r\n const {\r\n campaignType,\r\n budgetAmount,\r\n currency,\r\n bidStrategy,\r\n // deliveryStatus,\r\n // deliveryStatusDetails,\r\n } = data || {};\r\n const errors = error?.error?.errors || [];\r\n const i18n = useContext(I18nContext) as any;\r\n const serverContext = useContext(ServerContext) as any;\r\n\r\n const { scope } = useContext(ScopeContext) as any;\r\n const { campaignId } = scope.values;\r\n const classes = useBudgetCardStyles();\r\n const { state } = useFormService();\r\n const showBudgetSuggestion = serverContext?.DynamicPermissions?.EnableBudgetSuggestion && campaignType === 'PerformanceMax';\r\n const isLoading = state.matches(FORM_STATES.LOADING);\r\n const [isBSLoading, setIsBSLoading] = useState(true);\r\n const [isBSCalled, setIsBSCalled] = useState(false);\r\n\r\n const apiErrorMapper = getApiErrorMapper(i18n);\r\n\r\n const legacyI18n = useMemo(() => buildLegacyI18n(i18n, [ValidationStringMap]), [i18n]);\r\n\r\n const mergedI18n = useMemo(() => mergeI18n(\r\n legacyI18n,\r\n i18n\r\n ), [i18n, legacyI18n]);\r\n\r\n const schema = useMemo(() => {\r\n if (campaignType === 'LinkedIn' && LinkedInBudgetRangePerCurrency[currency]) {\r\n return ({\r\n Currency: currency,\r\n GlobalMaximumBudget: { DailyBudget: LinkedInBudgetRangePerCurrency[currency].Max },\r\n GlobalMinimumBudget: { DailyBudget: LinkedInBudgetRangePerCurrency[currency].Min },\r\n MaximumBudget: { DailyBudget: LinkedInBudgetRangePerCurrency[currency].Max }, // we need to pass this as a max for the slider\r\n });\r\n }\r\n\r\n // Currently the max daily budget returned by server context is the same as max monthly budget https://msasg.visualstudio.com/Bing_Ads/_git/AdsAppUI?path=/private/UI/OpportunityUI/Microsoft.AdCenter.UI.Web.Opportunity/Repository/StaticEntityRepository.cs&version=GBmaster&line=86&lineEnd=86&lineStartColumn=13&lineEndColumn=122&lineStyle=plain&_a=contents\r\n // Because of that we use the same logic as on MT where maxDailyBudget = maxMonthlyBudget / 28 https://msasg.visualstudio.com/DefaultCollection/Bing_Ads/_git/AdsAppsMT?path=/private/Common/BusinessRules/CampaignValidators/BudgetLimitHelper.cs&version=GBmaster&line=10&lineEnd=12&lineStartColumn=1&lineEndColumn=35&lineStyle=plain&_a=contents\r\n const maxDailyBudget = serverContext?.BudgetRange?.MonthlyRange?.CeilingValue ? Number((serverContext?.BudgetRange?.MonthlyRange?.CeilingValue / 28).toFixed(2)) : serverContext?.BudgetRange?.DailyRange?.CeilingValue;\r\n return ({\r\n Currency: currency,\r\n GlobalMaximumBudget: { DailyBudget: maxDailyBudget },\r\n GlobalMinimumBudget: { DailyBudget: serverContext?.BudgetRange?.DailyRange?.FloorValue },\r\n MaximumBudget: { DailyBudget: maxDailyBudget }, // we need to pass this as a max for the slider\r\n });\r\n }, [currency, serverContext, campaignType]);\r\n\r\n const onFieldChange = useCallback((updatedData) => {\r\n onDataChange({\r\n data: prevData => ({\r\n ...prevData,\r\n ...updatedData,\r\n }),\r\n });\r\n }, [onDataChange]);\r\n\r\n const localizeBudget = useCallback((budget, shouldLocalize) => (\r\n shouldLocalize ? i18n.formatCurrency(\r\n Number(budget), currency.toUpperCase(),\r\n { withSymbol: false }\r\n ) : budget), [currency, i18n]);\r\n\r\n const onBudgetChange = useCallback((newBudget, shouldLocalize = false) => {\r\n const budgetAmountValue = localizeBudget(newBudget, shouldLocalize);\r\n onFieldChange({ budgetAmount: budgetAmountValue });\r\n }, [onFieldChange, localizeBudget]);\r\n\r\n const onChange = useCallback((newBudget, shouldLocalize = false) => {\r\n if (newBudget?.data?.budget && newBudget.isValid) {\r\n const budgetVal = localizeBudget(String(newBudget.data.budget), shouldLocalize);\r\n onFieldChange({ budgetAmount: budgetVal, isBudgetValid: newBudget.isValid, budgetErrors: newBudget.messages });\r\n }\r\n if (newBudget && !newBudget.isValid) {\r\n onFieldChange({ isBudgetValid: newBudget.isValid, budgetErrors: newBudget.messages });\r\n }\r\n }, [onFieldChange, localizeBudget]);\r\n\r\n const onBudgetValidate = useCallback(({ isValid, messages }) => {\r\n onFieldChange({ isBudgetValid: isValid, budgetErrors: messages });\r\n }, [onFieldChange]);\r\n\r\n const [budgetSuggestionData, setBudgetSuggestionData] = useState(null);\r\n\r\n const { loadBudget } = useBudgetSuggestionRepository({\r\n campaignId,\r\n campaignType,\r\n currency,\r\n campaign: data,\r\n });\r\n\r\n useEffect(() => {\r\n if (showBudgetSuggestion) {\r\n if (_.isEmpty(budgetSuggestionData) && data && campaignId && !isBSCalled) {\r\n loadBudget().then((datas) => {\r\n setBudgetSuggestionData(datas);\r\n }).finally(() => {\r\n setIsBSLoading(false);\r\n setIsBSCalled(true);\r\n });\r\n }\r\n } else {\r\n setIsBSLoading(isLoading);\r\n }\r\n }, [loadBudget, budgetSuggestionData, campaignId, data, isLoading, showBudgetSuggestion, isBSCalled]);\r\n\r\n // const showBudgetSuggestion = serverContext?.DynamicPermissions?.EnableBudgetSuggestion &&\r\n // (deliveryStatus === 'BudgetSuggestions' || _.includes(deliveryStatusDetails, 'BudgetSuggestions'));\r\n const showBudgetSuggestionData = showBudgetSuggestion && !_.isEmpty(budgetSuggestionData);\r\n\r\n return (\r\n
\r\n \r\n { },\r\n }}\r\n >{\r\n !isBSLoading &&\r\n
\r\n {!showBudgetSuggestionData &&\r\n \r\n }\r\n {showBudgetSuggestionData &&\r\n
\r\n {i18n.getString(_TL_('Your ads could be shown more often. You can increase your budget to ensure more ad exposure.'))}\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 BudgetForm = ({ closeDialog, log, showBudgetSuggestion }: { closeDialog: Function, log: { trace: Function }, showBudgetSuggestion: Boolean}) => {\r\n const onDoneSaving = useCallback((...params) => {\r\n log.trace('Budget form popover closed: saved');\r\n closeDialog(...params);\r\n }, [log, closeDialog]);\r\n\r\n const onCanceled = useCallback((...params) => {\r\n log.trace('Budget form popover closed: canceled');\r\n closeDialog(...params);\r\n }, [log, closeDialog]);\r\n\r\n useEffect(() => {\r\n log.trace('Budget card popover rendered');\r\n }, [log]);\r\n\r\n const config = useMemo(() => ({\r\n id: 'budget-form',\r\n view: withFooter(FormViewWrapper, showBudgetSuggestion),\r\n repository: useBudgetRepository,\r\n machineOptions: {\r\n actions: {\r\n onDoneSaving,\r\n onCanceled,\r\n },\r\n },\r\n }), [onCanceled, onDoneSaving, showBudgetSuggestion]);\r\n return (
);\r\n};\r\n\r\nexport const BudgetCard: React.FunctionComponent<{ contentReady: Function }> = ({ contentReady }: { contentReady: Function }) => {\r\n const i18n = useContext(I18nContext) as any;\r\n const instrumentation = useContext(InstrumentationContext) as any;\r\n const serverContext = useContext(ServerContext) as any;\r\n const currency = serverContext?.CurrentAccount?.CurrencyCode;\r\n\r\n const log = useMemo(() => {\r\n if (instrumentation && instrumentation.campaignOverviewEdit) {\r\n const scenario = instrumentation.campaignOverviewEdit.create();\r\n return scenario.budgetEdit.create();\r\n }\r\n return {\r\n trace: _.noop,\r\n error: _.noop,\r\n };\r\n }, [instrumentation]);\r\n\r\n const [budgetText, setBudgetText] = useState('');\r\n const [isLoading, setIsLoading] = useState(true);\r\n const [budgetTitle, setBudgetTitle] = useState(i18n.getString(_TL_('Set campaign budget')));\r\n const [isBSCalled, setIsBSCalled] = useState(false);\r\n\r\n const [campaignInfo, setCampaignInfo] = useState(null);\r\n\r\n const [budgetSuggestionData, setBudgetSuggestionData] = useState(null);\r\n const { loadBudget } = useBudgetSuggestionRepository({\r\n campaignId: campaignInfo?.Id,\r\n campaignType: campaignInfo?.campaignType,\r\n currency,\r\n campaignInfo,\r\n });\r\n\r\n\r\n useEffect(() => {\r\n if (serverContext?.DynamicPermissions?.EnableBudgetSuggestion &&\r\n !isBSCalled &&\r\n _.isEmpty(budgetSuggestionData) && campaignInfo && campaignInfo?.Id) {\r\n loadBudget().then((dataBs) => {\r\n setBudgetSuggestionData(dataBs);\r\n setBudgetTitle(i18n.getString(_TL_('Budget recommendations')));\r\n }).finally(() => {\r\n setIsLoading(false);\r\n setIsBSCalled(true);\r\n });\r\n }\r\n }, [loadBudget, campaignInfo, budgetSuggestionData, serverContext?.DynamicPermissions?.EnableBudgetSuggestion, isBSCalled, i18n]);\r\n\r\n const set = useCallback((campaign) => {\r\n const localizedBudget = i18n.formatCurrency(\r\n Number(campaign?.Budget?.Amount), currency.toUpperCase(),\r\n { withSymbol: false }\r\n );\r\n setCampaignInfo(campaign);\r\n setBudgetText(i18n.getString(_TL_('{{budget}} {{currency}}/Day'), { currency: currency.toUpperCase(), budget: localizedBudget }));\r\n if (!serverContext?.DynamicPermissions?.EnableBudgetSuggestion) {\r\n setIsLoading(false);\r\n }\r\n contentReady();\r\n }, [contentReady, currency, i18n, serverContext?.DynamicPermissions?.EnableBudgetSuggestion]);\r\n\r\n\r\n const readCampaign = useReadCampaign({ set });\r\n useEffect(() => {\r\n setIsLoading(true);\r\n readCampaign();\r\n }, [currency, i18n, readCampaign, contentReady]);\r\n\r\n useEffect(() => {\r\n log.trace('Budget card rendered');\r\n }, [log]);\r\n\r\n const ChildComponent = useMemo(() => (props => ), [log, budgetSuggestionData]);\r\n\r\n return (\r\n \r\n );\r\n};\r\n","export const LINKEDIN_CAMPAIGN_GOALS = {\r\n MoreWebsiteActions: 'MoreWebsiteActions',\r\n MoreBrandAwareness: 'MoreBrandAwareness',\r\n};\r\n\r\nexport const getLinkedInBidStrategyOptions = (campaignGoal) => {\r\n if (campaignGoal === LINKEDIN_CAMPAIGN_GOALS.MoreBrandAwareness) {\r\n return [{\r\n key: 'MaxReach',\r\n text: _TL_('Maximize reach'),\r\n type: 'MaxReach',\r\n }, {\r\n key: 'MaxImpressions',\r\n text: _TL_('Maximize impressions'),\r\n type: 'MaxImpressions',\r\n }];\r\n }\r\n\r\n return [{\r\n key: 'MaxClicks',\r\n text: _TL_('Maximize clicks'),\r\n type: 'MaxClicks',\r\n }];\r\n};\r\n\r\nexport const getLinkedInBidStrategyText = (campaign, i18n) => {\r\n const bidStrategy = campaign?.BiddingScheme?.Type;\r\n if (bidStrategy === 'MaxReach') {\r\n return i18n.getString(_TL_('Maximize reach'));\r\n }\r\n if (bidStrategy === 'MaxImpressions') {\r\n return i18n.getString(_TL_('Maximize impressions'));\r\n }\r\n return i18n.getString(_TL_('Maximize clicks'));\r\n};\r\n","import { makeStyles, tokens } from '@fluentui/react-components';\r\n\r\nexport const useBidStrategyCardStyles = makeStyles({\r\n container: {\r\n '& .error': {\r\n color: tokens.colorPaletteCranberryBorderActive,\r\n },\r\n },\r\n});\r\n","import _ from 'underscore';\r\nimport React, { useState, useContext, useCallback, useMemo, useEffect } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Gavel20Regular } from '@fluentui/react-icons';\r\nimport { StatusSummaryCard } from '@bingads-webui-campaign-react/status-summary-card';\r\nimport { BidStrategyComponent, MAX_CONVERSIONS, MAX_CONVERSIONS_VALUE } from '@bingads-webui-campaign-react/bid-strategy-component';\r\nimport { FORM_STATES, Form, useFormService } from '@bingads-webui-react/form';\r\nimport { FormErrorGroup, UnmappedFormErrors as OriginalUnmappedFormErrors } from '@bingads-webui-campaign-react/form-error';\r\nimport { withControlErrorHandling } from '@bingads-webui-campaign-react/error-handling';\r\nimport { InstrumentationContext } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\n\r\nimport { withFooter } from './with-footer';\r\nimport { useBidStrategyRepository } from './use-repository';\r\nimport { useReadCampaign } from './use-read-campaign';\r\nimport { getApiErrorMapper } from '../utils/api-error-mapper';\r\nimport { getLinkedInBidStrategyText, getLinkedInBidStrategyOptions } from '../utils/linkedin-campaign-utils';\r\nimport { useBidStrategyCardStyles } from '../styles/bid-strategy-card-styles';\r\n\r\nconst UnmappedFormErrors = withControlErrorHandling(OriginalUnmappedFormErrors);\r\n\r\nconst FormViewWrapper = ({\r\n data,\r\n onDataChange,\r\n error,\r\n}: { data: any; onDataChange: Function; error: any; }) => {\r\n const errors = error?.error?.errors || [];\r\n const {\r\n campaignType,\r\n campaignGoal,\r\n bidStrategy,\r\n cpa,\r\n roas,\r\n isInitialAdditionalDetailsChecked,\r\n currency,\r\n budgetAmount,\r\n } = data || {};\r\n const { state } = useFormService();\r\n const isLoading = state.matches(FORM_STATES.LOADING);\r\n const classes = useBidStrategyCardStyles();\r\n\r\n const i18n = useContext(I18nContext) as any;\r\n const apiErrorMapper = getApiErrorMapper(i18n);\r\n\r\n const serverContext = useContext(ServerContext) as any;\r\n const bidRange = (serverContext && serverContext.KeywordBidRange) || null;\r\n\r\n const options = useMemo(() => {\r\n if (campaignType === 'PerformanceMax') {\r\n return [MAX_CONVERSIONS, MAX_CONVERSIONS_VALUE];\r\n }\r\n if (campaignType === 'LinkedIn') {\r\n return getLinkedInBidStrategyOptions(campaignGoal);\r\n }\r\n return [];\r\n }, [campaignGoal, campaignType]);\r\n\r\n const onFieldChange = useCallback((updatedData) => {\r\n onDataChange({\r\n data: prevData => ({\r\n ...prevData,\r\n ...updatedData,\r\n }),\r\n });\r\n }, [onDataChange]);\r\n\r\n const onBidStrategyChange = useCallback((e, newBidStrategy) => {\r\n const bidStrategyType = newBidStrategy?.type;\r\n onFieldChange({ bidStrategy: bidStrategyType });\r\n }, [onFieldChange]);\r\n\r\n const onMarketingMetricChange = useCallback(({\r\n data: newMarketingMetric,\r\n isValid,\r\n messages,\r\n }) => {\r\n onFieldChange({\r\n ...newMarketingMetric,\r\n isMarketingMetricValid: isValid,\r\n marketingMetricErrors: messages,\r\n });\r\n }, [onFieldChange]);\r\n\r\n return (\r\n
\r\n \r\n \r\n\r\n \r\n \r\n
);\r\n};\r\n\r\nconst BidStrategyForm = ({ closeDialog, log }: { closeDialog: Function, log: { trace: Function } }) => {\r\n const onDoneSaving = useCallback((...params) => {\r\n log.trace('Bid strategy form popover closed: saved');\r\n closeDialog(...params);\r\n }, [log, closeDialog]);\r\n\r\n const onCanceled = useCallback((...params) => {\r\n log.trace('Bid strategy form popover closed: canceled');\r\n closeDialog(...params);\r\n }, [log, closeDialog]);\r\n\r\n useEffect(() => {\r\n log.trace('Bid strategy card popover rendered');\r\n }, [log]);\r\n\r\n const config = useMemo(() => ({\r\n id: 'bid-strategy-form',\r\n view: withFooter(FormViewWrapper),\r\n repository: useBidStrategyRepository,\r\n machineOptions: {\r\n actions: {\r\n onDoneSaving,\r\n onCanceled,\r\n },\r\n },\r\n }), [onCanceled, onDoneSaving]);\r\n return ();\r\n};\r\n\r\nconst getBidStrategyText = (campaign, i18n) => {\r\n if (campaign.CampaignType === 'PerformanceMax') {\r\n return campaign?.BiddingScheme?.Type === MAX_CONVERSIONS.type ? i18n.getString(MAX_CONVERSIONS.text) : i18n.getString(MAX_CONVERSIONS_VALUE.text);\r\n }\r\n if (campaign.CampaignType === 'LinkedIn') {\r\n return getLinkedInBidStrategyText(campaign, i18n);\r\n }\r\n return '';\r\n};\r\n\r\nexport const BidStrategyCard: React.FunctionComponent<{ contentReady: Function }> = ({ contentReady }: { contentReady: Function }) => {\r\n const i18n = useContext(I18nContext) as any;\r\n const instrumentation = useContext(InstrumentationContext) as any;\r\n\r\n const [bidStrategyText, setBidStrategyText] = useState('');\r\n const [isLoading, setIsLoading] = useState(true);\r\n\r\n const log = useMemo(() => {\r\n if (instrumentation && instrumentation.campaignOverviewEdit) {\r\n const scenario = instrumentation.campaignOverviewEdit.create();\r\n return scenario.bidStrategyEdit.create();\r\n }\r\n return {\r\n trace: _.noop,\r\n error: _.noop,\r\n };\r\n }, [instrumentation]);\r\n\r\n const set = useCallback((campaign) => {\r\n setBidStrategyText(getBidStrategyText(campaign, i18n));\r\n setIsLoading(false);\r\n contentReady();\r\n }, [contentReady, i18n]);\r\n const readCampaign = useReadCampaign({ set });\r\n useEffect(() => {\r\n setIsLoading(true);\r\n readCampaign();\r\n }, [i18n, readCampaign, contentReady]);\r\n\r\n useEffect(() => {\r\n log.trace('Bid strategy card rendered');\r\n }, [log]);\r\n\r\n const ChildComponent = useMemo(() => (props => ), [log]);\r\n\r\n return (\r\n \r\n );\r\n};\r\n","import _ from 'underscore';\r\nimport React, { useState, useCallback, useContext, useMemo, useEffect } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { tokens } from '@fluentui/react-components';\r\nimport {\r\n CheckmarkCircle20Regular,\r\n Pause20Regular,\r\n Circle12Filled,\r\n Pause12Filled,\r\n} from '@fluentui/react-icons';\r\nimport { showPausedCampaignNotifications } from '@bingads-webui-campaign/import-shared-utils';\r\nimport { StatusSummaryCard } from '@bingads-webui-campaign-react/status-summary-card';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { edmCampaign } from '@bingads-webui/edm-campaign';\r\nimport { InstrumentationContext } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { useReadCampaign } from './use-read-campaign';\r\n\r\nexport const CampaignStatusCard: React.FunctionComponent<{ contentReady: Function }> = React.memo(({ contentReady }: { contentReady: Function }) => {\r\n const i18n = useContext(I18nContext) as any;\r\n const instrumentation = useContext(InstrumentationContext) as any;\r\n const { scope } = useContext(ScopeContext) as any;\r\n const {\r\n cid, aid, campaignId,\r\n } = scope.values;\r\n\r\n const log = useMemo(() => {\r\n if (instrumentation && instrumentation.campaignOverviewEdit) {\r\n const scenario = instrumentation.campaignOverviewEdit.create();\r\n return scenario.campaignStatusEdit.create();\r\n }\r\n return {\r\n trace: _.noop,\r\n error: _.noop,\r\n };\r\n }, [instrumentation]);\r\n\r\n const pausedCampaignImportNotificationActivity = useMemo(() => {\r\n const { activity } = instrumentation.createScenarioAndActivity({\r\n scenarioName: 'PausedCampaignImportNotification',\r\n activityName: 'OverviewCampaignStatusCard',\r\n });\r\n return activity;\r\n }, [instrumentation]);\r\n\r\n const menuItemConfigs = useMemo(() => ([\r\n {\r\n text: i18n.getString(_TL_('Enabled')),\r\n value: 'Active',\r\n icon: Circle12Filled,\r\n iconColor: tokens.colorPaletteGreenForeground1,\r\n },\r\n {\r\n text: i18n.getString(_TL_('Paused')),\r\n value: 'Paused',\r\n icon: Pause12Filled,\r\n },\r\n ]), [i18n]);\r\n\r\n const [checkedValue, setCheckedValue] = useState('Active');\r\n const [campaignItemData, seCampaignItemData] = useState({});\r\n const [isLoading, setIsLoading] = useState(true);\r\n\r\n const set = useCallback((campaign) => {\r\n setCheckedValue(campaign?.Status === 'Active' ? 'Active' : 'Paused');\r\n\r\n // set campaign item data\r\n seCampaignItemData(campaign);\r\n\r\n setIsLoading(false);\r\n contentReady();\r\n }, [contentReady]);\r\n const readCampaign = useReadCampaign({ set });\r\n useEffect(() => {\r\n setIsLoading(true);\r\n readCampaign();\r\n }, [readCampaign, contentReady]);\r\n\r\n const onChange = useCallback((\r\n e,\r\n { checkedItems }\r\n ) => {\r\n setIsLoading(true);\r\n edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .Campaigns.$withKey(campaignId)\r\n .bulkUpdate({\r\n Id: campaignId,\r\n Status: checkedItems[0],\r\n }).then(() => {\r\n log.trace(`Campaign status updated to ${checkedItems[0]}`);\r\n setCheckedValue(checkedItems[0]);\r\n\r\n // show paused campaign notifications based on specific conditions\r\n showPausedCampaignNotifications({\r\n campaignItemList: [campaignItemData],\r\n updateStatus: checkedItems[0] === 'Paused' ? 'UserPaused' : checkedItems[0], // convert the paused status text to be consistent with other scenarios\r\n activity: pausedCampaignImportNotificationActivity,\r\n });\r\n }, (error) => {\r\n log.error(`Campaign status update failed with error: ${JSON.stringify(error)}`);\r\n })\r\n .finally(() => setIsLoading(false));\r\n }, [cid, aid, campaignId, log, campaignItemData, pausedCampaignImportNotificationActivity]);\r\n\r\n const isActive = checkedValue === 'Active';\r\n\r\n useEffect(() => {\r\n log.trace('Campaign status card rendered');\r\n }, [log]);\r\n\r\n return (\r\n \r\n );\r\n});\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nimport { ResponsiveSize, isSizeInList } from '@bingads-webui-campaign-react/pmax-overview-responsive-utils';\r\n\r\nexport const useCampaignStatusSummaryCardsStyles = makeStyles({\r\n container: {\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n justifyContent: 'space-between',\r\n ...shorthands.padding('6px'),\r\n ...shorthands.gap('12px'),\r\n },\r\n fullWidthCards: {\r\n flexDirection: 'column',\r\n },\r\n});\r\n\r\nexport const shouldUseFullWidthCards = (responsiveSize: ResponsiveSize) => !isSizeInList(responsiveSize, ['xl', 'xxl']);\r\n","import React, { memo } from 'react';\r\nimport classNames from 'classnames';\r\n\r\nimport { ResponsiveSize } from '@bingads-webui-campaign-react/pmax-overview-responsive-utils';\r\n\r\nimport { BudgetCard } from './components/budget-card';\r\nimport { BidStrategyCard } from './components/bid-strategy-card';\r\nimport { CampaignStatusCard } from './components/campaign-status-card';\r\nimport { shouldUseFullWidthCards, useCampaignStatusSummaryCardsStyles } from './styles/styles';\r\n\r\ntype CampaignStatusSummaryCardsProps = {\r\n campaignStatusContentReady: Function;\r\n budgetContentReady: Function;\r\n bidStrategyContentReady: Function;\r\n responsiveSize: ResponsiveSize;\r\n};\r\n\r\nexport const CampaignStatusSummaryCards: React.FunctionComponent =\r\n memo(({\r\n campaignStatusContentReady, budgetContentReady, bidStrategyContentReady, responsiveSize,\r\n }: CampaignStatusSummaryCardsProps) => {\r\n const classes = useCampaignStatusSummaryCardsStyles();\r\n return (\r\n
\r\n \r\n \r\n \r\n
\r\n );\r\n });\r\n","import performanceImage from '../media/performance.svg';\r\nimport recommendationsImage from '../media/recommendations.svg';\r\nimport campaignsImage from '../media/campaigns.svg';\r\nimport topChangesImage from '../media/top-changes.svg';\r\nimport conversionTrackingImage from '../media/conversion-tracking.svg';\r\nimport keywordsImage from '../media/keywords.svg';\r\nimport searchTermsImage from '../media/search-terms.svg';\r\nimport devicesImage from '../media/devices.svg';\r\nimport competitionImage from '../media/competition.svg';\r\nimport adGroupsImage from '../media/ad-groups.svg';\r\nimport accountsImage from '../media/accounts.svg';\r\nimport topLocationsImage from '../media/top-locations.svg';\r\n\r\nexport const CARD_CONFIG = {\r\n 'CardType-Performance': {\r\n icon: performanceImage,\r\n title: _TL_('Performance'),\r\n description: _TL_('View your campaigns\\' key performance data all in one place'),\r\n },\r\n 'CardType-Recommendations': {\r\n icon: recommendationsImage,\r\n title: _TL_('Recommendations'),\r\n description: _TL_('View key untapped strategies to ensure that you are getting the most out of your Microsoft advertising experience.'),\r\n },\r\n 'CardType-TopCampaigns': {\r\n icon: campaignsImage,\r\n title: _TL_('Campaigns'),\r\n description: _TL_('View your top campaigns of interest based on their performance data.'),\r\n },\r\n 'CardType-TopChanges-Campaign': {\r\n icon: topChangesImage,\r\n title: _TL_('Top changes'),\r\n description: _TL_('Identify which campaigns and ad groups are responsible for the biggest changes to your account.'),\r\n },\r\n 'CardType-TopChanges-Account': {\r\n icon: topChangesImage,\r\n title: _TL_('Top changes'),\r\n description: _TL_('Identify which accounts are responsible for the biggest changes.'),\r\n },\r\n 'CardType-TopChanges-AdGroup': {\r\n icon: topChangesImage,\r\n title: _TL_('Top changes'),\r\n description: _TL_('Identify which campaigns and ad groups are responsible for the biggest changes to your account.'),\r\n },\r\n 'CardType-Conversion-Tracking': {\r\n icon: conversionTrackingImage,\r\n title: _TL_('Conversion tracking'),\r\n description: _TL_('Conversions track website actions to measure campaign performance.'),\r\n },\r\n 'CardType-TopKeyword': {\r\n icon: keywordsImage,\r\n title: _TL_('Keywords'),\r\n description: _TL_('View your top keywords of interest based on their performance data.'),\r\n },\r\n 'CardType-TopSearchTerms': {\r\n icon: searchTermsImage,\r\n title: _TL_('What people searched'),\r\n description: _TL_('Get a quick glance into what queries potential customers are searching for to trigger your ads.'),\r\n },\r\n 'CardType-Device': {\r\n icon: devicesImage,\r\n title: _TL_('Devices'),\r\n description: _TL_('Get insights on how your campaigns perform by device type.'),\r\n },\r\n 'CardType-Competition': {\r\n icon: competitionImage,\r\n title: _TL_('Competition'),\r\n description: _TL_('View your campaign\\'s key performance data all in one place.'),\r\n },\r\n 'CardType-TopLocations': {\r\n icon: topLocationsImage,\r\n title: _TL_('Top locations'),\r\n description: _TL_('Highlights the top 10 best performing locations within the location targets you initially set.'),\r\n },\r\n 'CardType-TopAdGroup': {\r\n icon: adGroupsImage,\r\n title: _TL_('Ad groups'),\r\n description: _TL_('View your top ad groups of interest based on their performance data.'),\r\n },\r\n 'CardType-TopAccounts': {\r\n icon: accountsImage,\r\n title: _TL_('Accounts'),\r\n description: _TL_('View your top accounts of interest based on their performance data.'),\r\n },\r\n};\r\n","import { makeStyles, tokens, shorthands } from '@fluentui/react-components';\r\n\r\nconst cardStyle = {\r\n width: '280px',\r\n height: '185px',\r\n};\r\nexport const useCardStyles = makeStyles({\r\n card: cardStyle,\r\n cardSelected: {\r\n ...cardStyle,\r\n ...shorthands.border('1px', 'solid', tokens.colorNeutralForeground2BrandHover),\r\n },\r\n checkmark: {\r\n position: 'absolute',\r\n top: '0',\r\n right: '0',\r\n width: '16px',\r\n height: '16px',\r\n marginTop: '16px',\r\n marginRight: '16px',\r\n color: tokens.colorNeutralForeground2BrandHover,\r\n },\r\n image: {\r\n ...shorthands.margin('8px'),\r\n height: '45px',\r\n width: '45px',\r\n },\r\n header: {\r\n maxHeight: '52px',\r\n },\r\n textArea: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n },\r\n title: {\r\n marginTop: '16px',\r\n marginBottom: '4px',\r\n },\r\n});\r\n","import React, { useCallback } from 'react';\r\nimport classNames from 'classnames';\r\nimport {\r\n Card as FluentCard,\r\n Caption1,\r\n Text,\r\n Image,\r\n} from '@fluentui/react-components';\r\nimport { CheckmarkCircleFilled } from '@fluentui/react-icons';\r\n\r\nimport { CARD_CONFIG } from './card-config';\r\nimport { CardProps } from './types';\r\nimport { useCardStyles } from './styles/card-styles';\r\n\r\nexport function Card({\r\n i18n,\r\n cardId,\r\n isSelected,\r\n onCardSelectionChange,\r\n}: CardProps) {\r\n const styles = useCardStyles() as any;\r\n const onCardClicked = useCallback(() => onCardSelectionChange(cardId, !isSelected), [cardId, isSelected, onCardSelectionChange]);\r\n const handleSpace = useCallback((e) => {\r\n if (e.key === ' ') {\r\n onCardClicked();\r\n }\r\n }, [onCardClicked]);\r\n if (!CARD_CONFIG[cardId]) return null;\r\n return (\r\n \r\n
\r\n {i18n.getString(CARD_CONFIG[cardId].title)}\r\n {isSelected && }\r\n
\r\n
\r\n \r\n {i18n.getString(CARD_CONFIG[cardId].title)}\r\n \r\n {i18n.getString(CARD_CONFIG[cardId].description)}\r\n
\r\n
\r\n );\r\n}\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useCardSelectorStyles = makeStyles({\r\n cardsContainer: {\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n ...shorthands.gap('16px'),\r\n marginTop: '24px',\r\n marginBottom: '24px',\r\n },\r\n divider: {\r\n maxHeight: '1px',\r\n },\r\n});\r\n","import _ from 'underscore';\r\nimport classNames from 'classnames';\r\nimport React, { useState, useContext, useMemo, useCallback } from 'react';\r\nimport {\r\n Body1,\r\n Button,\r\n Divider,\r\n useRestoreFocusSource,\r\n useRestoreFocusTarget,\r\n} from '@fluentui/react-components';\r\nimport {\r\n DrawerBody,\r\n DrawerHeader,\r\n DrawerHeaderTitle,\r\n DrawerFooter,\r\n Drawer,\r\n} from '@fluentui/react-drawer';\r\nimport { Dismiss24Regular, AppsAddIn16Regular } from '@fluentui/react-icons';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\n\r\nimport { Card } from './card';\r\nimport { useCardSelectorStyles } from './styles/card-selector-styles';\r\nimport { CardSelectorProps, CardConfigProps } from './types';\r\n\r\nexport function CardSelector({\r\n cards,\r\n onSave,\r\n}: CardSelectorProps) {\r\n const styles = useCardSelectorStyles() as any;\r\n const i18n = useContext(I18nContext) as any;\r\n\r\n const [open, setOpen] = useState(false);\r\n const onOpenDrawer = () => setOpen(true);\r\n const [localCardsState, setLocalCardsState] = useState(cards);\r\n const onCardSelectionChange = useCallback((cardId, isSelected) => {\r\n const index = _.findIndex(localCardsState, { id: cardId });\r\n if (index >= 0) {\r\n const newCards = [...localCardsState];\r\n newCards[index] = { ...newCards[index], hidden: !isSelected };\r\n setLocalCardsState(newCards);\r\n }\r\n }, [localCardsState]);\r\n\r\n const onSaveClicked = useCallback(() => {\r\n onSave(localCardsState);\r\n setOpen(false);\r\n }, [localCardsState, onSave]);\r\n\r\n const onCancel = useCallback(() => {\r\n setOpen(false);\r\n setLocalCardsState(cards);\r\n }, [cards]);\r\n\r\n const selectedCount = useMemo(() => _.reject(localCardsState, (card: CardConfigProps) => card.hidden)?.length || 0, [localCardsState]);\r\n\r\n // Overlay Drawer will handle focus by default, but inline Drawers need manual focus restoration attributes, if applicable\r\n const restoreFocusTargetAttributes = useRestoreFocusTarget();\r\n const restoreFocusSourceAttributes = useRestoreFocusSource();\r\n const tileLabel = selectedCount === 1\r\n ? _TL_('{{count}} tile selected')\r\n : _TL_('{{count}} tiles selected');\r\n\r\n return (\r\n
\r\n }\r\n onClick={onOpenDrawer}\r\n >\r\n {i18n.getString(_TL_('Add or remove tiles'))}\r\n \r\n \r\n \r\n }\r\n onClick={onCancel}\r\n />\r\n }\r\n >\r\n {i18n.getString(_TL_('Add or remove tiles'))}\r\n \r\n \r\n\r\n \r\n <>{i18n.getString(_TL_('Select what tiles you would like to see in this overview.'))}\r\n
\r\n {_.map(\r\n localCardsState,\r\n (card: CardConfigProps) => ()\r\n )}\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n {i18n.getString(tileLabel, { count: selectedCount })}\r\n \r\n \r\n \r\n
\r\n );\r\n}\r\n","import { ITreeItem, ITreeIndexes } from './types';\r\n\r\nexport function buildMap(flatTreeItems: Array): Map {\r\n const map = new Map();\r\n\r\n flatTreeItems.forEach((item, index, array) => {\r\n const { value, parentValue } = item;\r\n\r\n const ancestor: number[] = [];\r\n // if parent appears before child, then parent will in map already\r\n if (map.has(parentValue)) {\r\n const parent: ITreeIndexes = map.get(parentValue);\r\n ancestor.push(...parent.ancestor);\r\n ancestor.push(parent.index);\r\n\r\n parent.children = [...parent.children, index];\r\n } else if (parentValue) {\r\n // if parent appears after child, then set up parent in map with initial value\r\n map.set(parentValue, { index: null, ancestor: [], children: [index] });\r\n }\r\n\r\n // current value is already in map, then it must be some child's parent\r\n if (map.has(value)) {\r\n const myself: ITreeIndexes = map.get(value);\r\n myself.index = index;\r\n myself.children.forEach((child: number) => {\r\n const childMapValue = map.get(array[child]?.value);\r\n childMapValue?.ancestor.push(index);\r\n });\r\n } else {\r\n // ancestors has been fullfilled when searching for parent\r\n map.set(value, { index, ancestor, children: [] });\r\n }\r\n });\r\n\r\n return map;\r\n}\r\n\r\nfunction defaultFilter(item: ITreeItem, searchQuery: string) {\r\n const { content } = item;\r\n return content.toLowerCase().includes(searchQuery.toLowerCase());\r\n}\r\n\r\nfunction collectChildren(\r\n map: Map,\r\n flatTreeItems: Array,\r\n value: string\r\n): Array {\r\n const children: Array = [];\r\n const entry: ITreeIndexes = map.get(value);\r\n if (entry) {\r\n entry.children.forEach((child: number) => {\r\n children.push(child);\r\n\r\n const childValue = flatTreeItems[child]?.value;\r\n children.push(...collectChildren(map, flatTreeItems, childValue));\r\n });\r\n }\r\n return children;\r\n}\r\n\r\nexport function filterTreeItems(\r\n flatTreeItems: Array,\r\n map: Map,\r\n searchQuery: string,\r\n filter: (item: ITreeItem, searchQuery: string) => boolean = defaultFilter\r\n): Array {\r\n const filteredTreeItemIndexes: Array = [];\r\n\r\n flatTreeItems.forEach((item) => {\r\n const isMatched = filter(item, searchQuery);\r\n\r\n if (isMatched) {\r\n const { value } = item;\r\n const entry: ITreeIndexes = map.get(value);\r\n filteredTreeItemIndexes.push(entry.index);\r\n filteredTreeItemIndexes.push(...entry.ancestor);\r\n filteredTreeItemIndexes.push(...collectChildren(map, flatTreeItems, value));\r\n }\r\n });\r\n\r\n const set = new Set(filteredTreeItemIndexes);\r\n const orderedFilteredIndexes = Array.from(set).sort((a, b) => a - b);\r\n\r\n const filteredTreeItems = [];\r\n orderedFilteredIndexes.forEach((index) => {\r\n filteredTreeItems.push(flatTreeItems[index]);\r\n });\r\n\r\n return filteredTreeItems;\r\n}\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useDropdownTreeStyles = makeStyles({\r\n root: {\r\n position: 'relative',\r\n // 'max-width': '400px',\r\n },\r\n dropdownContent: {\r\n position: 'absolute',\r\n width: '100%',\r\n display: 'block',\r\n zIndex: 1,\r\n maxHeight: '500px',\r\n 'box-sizing': 'border-box',\r\n 'background-color': 'white',\r\n 'border-radius': '4px',\r\n 'box-shadow': '0 0 2px rgba(0,0,0,0.12), 0 8px 16px rgba(0,0,0,0.14)',\r\n ...shorthands.padding('4px'),\r\n ...shorthands.overflow('auto'),\r\n },\r\n branch: {\r\n fontWeight: 600,\r\n },\r\n hideContent: {\r\n display: 'none',\r\n },\r\n noResults: {\r\n ...shorthands.padding('8px'),\r\n 'font-size': '14px',\r\n 'font-weight': '400',\r\n 'line-height': '20px',\r\n color: '#323130',\r\n },\r\n treeItemLayout: {\r\n '& .fui-TreeItemLayout__main': {\r\n ...shorthands.flex(1),\r\n },\r\n },\r\n});\r\n","import _ from 'underscore';\r\nimport classNames from 'classnames';\r\nimport React, { useCallback, useState, useMemo, useRef, useEffect } from 'react';\r\nimport {\r\n FlatTree,\r\n TreeItem,\r\n TreeItemLayout,\r\n // eslint-disable-next-line camelcase\r\n useHeadlessFlatTree_unstable,\r\n mergeClasses,\r\n Tooltip,\r\n Spinner,\r\n} from '@fluentui/react-components';\r\nimport { ChevronRightRegular, ChevronDownRegular } from '@fluentui/react-icons';\r\nimport { SearchBox, Checkbox } from '@fluentui/react';\r\n\r\nimport { buildMap, filterTreeItems } from './utils';\r\nimport { IDropdownTreeSelectProps, CustomTreeItemProps } from './types';\r\nimport { useDropdownTreeStyles } from './styles';\r\n\r\nconst CustomTreeItem = React.memo(({\r\n flatTreeItem,\r\n checked,\r\n onCheckedChange,\r\n onRenderContent,\r\n styles,\r\n isOpen,\r\n isLoading,\r\n lazyLoadingEnabled,\r\n} : CustomTreeItemProps) => {\r\n const treeItemsProps = flatTreeItem.getTreeItemProps();\r\n const {\r\n content,\r\n allowedCheck,\r\n parentValue,\r\n ...treeItemProps\r\n } = treeItemsProps;\r\n\r\n const itemType = useMemo(() => {\r\n if (lazyLoadingEnabled && treeItemsProps['aria-level'] === 1) {\r\n return 'branch';\r\n }\r\n return treeItemProps.itemType;\r\n }, [lazyLoadingEnabled, treeItemProps.itemType, treeItemsProps]);\r\n\r\n // we have a very weird issue here that the dropdown will close when we click on the icon\r\n // so we need to stop the propagation of the event for some elements\r\n const stopPropagation = useCallback((e) => {\r\n e.stopPropagation();\r\n }, []);\r\n const expandIcon = useMemo(() => {\r\n if (lazyLoadingEnabled && treeItemsProps['aria-level'] === 1) {\r\n if (isLoading) {\r\n return ();\r\n } else if (isOpen) {\r\n return ();\r\n }\r\n return ();\r\n }\r\n\r\n return undefined;\r\n }, [isLoading, isOpen, lazyLoadingEnabled, stopPropagation, treeItemsProps]);\r\n const onChange = useCallback((e, isChecked) => {\r\n onCheckedChange({\r\n key: flatTreeItem.value,\r\n value: isChecked,\r\n content,\r\n parentValue,\r\n });\r\n }, [content, flatTreeItem.value, onCheckedChange, parentValue]);\r\n\r\n return (\r\n \r\n \r\n {\r\n allowedCheck\r\n ? (\r\n onRenderContent(flatTreeItem) } : {})}\r\n />\r\n )\r\n :
{_.isFunction(onRenderContent) ? onRenderContent(flatTreeItem) : content}
\r\n }\r\n \r\n
\r\n );\r\n});\r\n\r\nexport const DropdownTreeSelect = ({\r\n placeholder,\r\n items,\r\n checkedItems,\r\n onChange,\r\n openItems,\r\n onOpenChange,\r\n onRenderContent,\r\n onRenderTooltip,\r\n customFilter,\r\n lazyLoad,\r\n isMultiSelect,\r\n ...restProps\r\n}: IDropdownTreeSelectProps) => {\r\n const containerRef = useRef(null);\r\n const styles = useDropdownTreeStyles();\r\n\r\n const [searchValue, setSearchValue] = useState('');\r\n const [isResultOpen, setIsResultOpen] = useState(false);\r\n const lazyLoadingEnabled = !!lazyLoad;\r\n const [lazyLoadedData, setLazyLoadedData] = useState([]);\r\n const [lazyLoadedParents, setLazyLoadedParents] = useState([]);\r\n\r\n const onChangeSearchValue = useCallback((e, newValue = '') => {\r\n const trimmedValue = newValue.trim();\r\n setSearchValue(trimmedValue);\r\n }, []);\r\n\r\n const itemsToUse = useMemo(() => ([...items, ...lazyLoadedData]), [items, lazyLoadedData]);\r\n const map = useMemo(() => buildMap(itemsToUse), [itemsToUse]);\r\n const filteredTreeItems = useMemo(() => filterTreeItems(itemsToUse, map, searchValue, customFilter), [map, searchValue, itemsToUse, customFilter]);\r\n\r\n const parentsWithChild = useMemo(() => {\r\n if (!lazyLoad) {\r\n return [];\r\n }\r\n return _.chain(itemsToUse)\r\n .map(item => item.parentValue)\r\n .compact()\r\n .uniq()\r\n .value();\r\n }, [itemsToUse, lazyLoad]);\r\n const parentsWithChildOrLoaded = useMemo(() => _.uniq([...parentsWithChild, ...lazyLoadedParents]), [parentsWithChild, lazyLoadedParents]);\r\n const onOpenChangeInternal = useCallback((e, data) => {\r\n onOpenChange(Array.from(data.openItems));\r\n\r\n if (_.isFunction(lazyLoad)) {\r\n const [openedItem] = _.difference([...data.openItems], openItems);\r\n if (openedItem && !_.includes(parentsWithChildOrLoaded, openedItem)) {\r\n lazyLoad(openedItem)\r\n .then((itemChildData) => {\r\n setLazyLoadedData([...lazyLoadedData, ...itemChildData]);\r\n })\r\n .finally(() => {\r\n setLazyLoadedParents([...lazyLoadedParents, openedItem]);\r\n });\r\n }\r\n }\r\n }, [lazyLoad, lazyLoadedData, lazyLoadedParents, onOpenChange, openItems, parentsWithChildOrLoaded]);\r\n\r\n const onItemChecked = useCallback(({\r\n key,\r\n value,\r\n content,\r\n parentValue,\r\n }) => {\r\n if (!isMultiSelect) {\r\n onChange([{\r\n value: key,\r\n parentValue,\r\n content,\r\n }]);\r\n return;\r\n }\r\n\r\n if (value) {\r\n onChange([...checkedItems, key]);\r\n } else {\r\n onChange(checkedItems.filter(item => item !== key));\r\n }\r\n }, [checkedItems, isMultiSelect, onChange]);\r\n\r\n const flatTree = useHeadlessFlatTree_unstable(filteredTreeItems, { openItems, onOpenChange: onOpenChangeInternal });\r\n\r\n useEffect(() => {\r\n const handleBlur = (e: MouseEvent) => {\r\n if (containerRef.current && !containerRef.current.contains(e.target as Node)) {\r\n setTimeout(() => {\r\n setIsResultOpen(false);\r\n }, 10);\r\n }\r\n };\r\n document.addEventListener('click', handleBlur);\r\n return () => {\r\n document.removeEventListener('click', handleBlur);\r\n };\r\n }, []);\r\n\r\n const showResults = useCallback(() => {\r\n setIsResultOpen(true);\r\n }, []);\r\n\r\n return (\r\n
\r\n \r\n
\r\n {\r\n filteredTreeItems.length\r\n ? (\r\n \r\n {\r\n Array.from(flatTree.items(), (flatTreeItem : any) => {\r\n const treeItemsProps = flatTreeItem.getTreeItemProps();\r\n const isOpen = _.includes(openItems, flatTreeItem.value);\r\n const isLoading = isOpen && lazyLoadingEnabled && !_.includes(parentsWithChildOrLoaded, flatTreeItem.value);\r\n\r\n if (treeItemsProps.showTips) {\r\n return (\r\n \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\n }\r\n
\r\n )\r\n : (
no results
)\r\n }\r\n
\r\n
\r\n );\r\n};\r\n\r\nDropdownTreeSelect.defaultProps = {\r\n placeholder: '',\r\n items: [],\r\n checkedItems: [],\r\n onChange: _.noop,\r\n openItems: [],\r\n onOpenChange: _.noop,\r\n onRenderContent: null,\r\n onRenderTooltip: null,\r\n customFilter: undefined,\r\n isMultiSelect: true,\r\n};\r\n","import Promise from 'bluebird';\r\nimport { edmCampaign } from '@bingads-webui/edm-campaign';\r\nimport { FetchDataResponseType } from '@bingads-webui-fluent-component/entity-selector';\r\n\r\nimport { FetchDataResponseTypeExtend, FetchGoalFactoryParams } from './types';\r\n\r\nexport const getPaginationData = (page: number, pageSize: number) => ({\r\n top: pageSize,\r\n skip: (page - 1) * pageSize,\r\n count: true,\r\n});\r\n\r\nexport const mapGoalsToItems = goals => goals.map(goal => ({\r\n value: String(goal.Id),\r\n content: goal.Name,\r\n data: goal,\r\n}));\r\n\r\nconst fetchConversionGoals = (cid : string, aid : string, dataQuery: any) => edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .Goals['Default.GetConversionGoals']\r\n .$makeCall({\r\n query: {\r\n ...dataQuery,\r\n },\r\n })\r\n .toPromise();\r\n\r\nexport const fetchConversionGoalFactory =\r\n ({\r\n cid, aid, options = {},\r\n }: FetchGoalFactoryParams) => ({\r\n page, pageSize, search, sortState,\r\n }): Promise<(FetchDataResponseType & FetchDataResponseTypeExtend)> => {\r\n const select = ['Id', 'Name', 'GoalCategory', 'Status', 'TrackingStatus', 'Type', 'IsMainConversionGoal', 'GoalDiagnosticsInfo'];\r\n\r\n let filter = '(Status eq Enum.GoalStatus\\'Active\\') and ((GoalCategory eq Enum.GoalCategory\\'InStoreVisit\\') eq false)';\r\n\r\n if (options.filter) {\r\n filter += options.filter;\r\n }\r\n\r\n if (search && search !== '') {\r\n filter += ` and (contains(tolower(Name), '${search.toLowerCase()}'))`;\r\n }\r\n\r\n const defaultOrder = { IsMainConversionGoal: 0 };\r\n const orderby = (sortState && sortState.sortColumn) ? { [sortState.sortColumn]: sortState.sortDirection === 'ascending' ? 0 : 1 } : defaultOrder;\r\n const dataQuery = {\r\n top: pageSize,\r\n skip: (page - 1) * pageSize,\r\n filter: { where: filter },\r\n orderby,\r\n count: true,\r\n select,\r\n };\r\n\r\n return fetchConversionGoals(cid, aid, dataQuery).then(({ '@odata.count': count, value: goals }) => ({\r\n items: mapGoalsToItems(goals),\r\n currentPage: page,\r\n count,\r\n totalPages: Math.ceil(count / pageSize),\r\n }));\r\n };\r\n","import {\r\n makeStyles,\r\n shorthands,\r\n tokens,\r\n typographyStyles,\r\n} from '@fluentui/react-components';\r\n\r\nexport const useTableStyles = makeStyles({\r\n dataGridWrapper: {\r\n width: '100%',\r\n ...shorthands.padding('10px', '5px'),\r\n ...shorthands.borderRadius('5px'),\r\n ...shorthands.border('2px', 'solid', tokens.colorNeutralBackground1Pressed),\r\n '& thead th:nth-child(2)': {\r\n width: '280px',\r\n },\r\n '& thead th:nth-child(3)': {\r\n width: '130px',\r\n },\r\n },\r\n accountCheckbox: {\r\n '& thead th:nth-child(1)': {\r\n width: '40px',\r\n },\r\n '& thead th:nth-child(2)': {\r\n width: '280px',\r\n },\r\n '& thead th:nth-child(3)': {\r\n width: '130px',\r\n },\r\n },\r\n dataGridContainer: {\r\n maxHeight: '350px',\r\n overflowY: 'auto',\r\n '& .loading-goal': {\r\n height: '100px',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n },\r\n },\r\n dataGrid: {\r\n width: '100%',\r\n marginTop: '15px',\r\n },\r\n mainConversionCheckbox: {\r\n width: '20px',\r\n },\r\n searchbox: {\r\n minWidth: '400px',\r\n marginLeft: '20px',\r\n },\r\n headerBar: {\r\n width: '100%',\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n ...shorthands.borderBottom('2px', 'solid', tokens.colorNeutralBackground1Pressed),\r\n paddingTop: '10px',\r\n paddingBottom: '15px',\r\n '& .show-select-control input[type=\"checkbox\"]': {\r\n width: '100%',\r\n height: '100%',\r\n },\r\n },\r\n footer: {\r\n display: 'flex',\r\n ...shorthands.padding('10px', '10px'),\r\n '& .page-selector': {\r\n marginRight: '20px',\r\n maxWidth: 'max-content',\r\n '& label': {\r\n fontWeight: tokens.fontWeightRegular,\r\n },\r\n },\r\n },\r\n clearAllBtn: {\r\n width: '100px', // ui-next\r\n '& div': {\r\n justifyContent: 'center',\r\n },\r\n },\r\n headerTitle: {\r\n ...typographyStyles.caption1Strong,\r\n fontSize: tokens.fontSizeBase200,\r\n },\r\n});\r\n","import ContactIcon from '../media/contact.svg';\r\nimport AddToCartIcon from '../media/addToCart.svg';\r\nimport BookAppointmentIcon from '../media/bookAppointment.svg';\r\nimport DownloadIcon from '../media/download.svg';\r\nimport GetDirectionIcon from '../media/getDirection.svg';\r\nimport LeadFormIcon from '../media/leadForm.svg';\r\nimport OtherIcon from '../media/other.svg';\r\nimport OutboundClickIcon from '../media/outboundClick.svg';\r\nimport PageViewIcon from '../media/pageView.svg';\r\nimport PurchaseIcon from '../media/purchase.svg';\r\nimport RequestQuoteIcon from '../media/requestQuote.svg';\r\nimport SignupIcon from '../media/signup.svg';\r\nimport SubscribeIcon from '../media/subscribe.svg';\r\nimport CheckoutIcon from '../media/checkout.svg';\r\n\r\nimport { ErrorCodeMapping } from './types';\r\n\r\nexport const Scopes = Object.freeze({\r\n ACCOUNT: 'account-scope',\r\n CAMPAIGN: 'campaign-scope',\r\n});\r\n\r\nexport const trackingStatusMapping = {\r\n Unverified: _TL_('Unverified'),\r\n NoRecentConversion: _TL_('No recent conversions'),\r\n RecordingConversions: _TL_('Recording conversions'),\r\n TagInactive: _TL_('Tag inactive'),\r\n InactiveDueToTagUnavailable: _TL_('Unavailable UET'),\r\n};\r\n\r\nexport const GoalDiagnosticsInfoErrorCode = {\r\n UETMismatch: 'UETMismatch',\r\n UrlGoalInvalidParameter: 'UrlGoalInvalidParameter',\r\n EventGoalInvalidParameter: 'EventGoalInvalidParameter',\r\n UETActiveMissingConversionEvent: 'UETActiveMissingConversionEvent',\r\n NotUploadOfflineConversion: 'NotUploadOfflineConversion',\r\n\r\n // tracking status\r\n Unverified: 'Unverified',\r\n NoRecentConversion: 'NoRecentConversion',\r\n RecordingConversions: 'RecordingConversions',\r\n TagInactive: 'TagInactive',\r\n InactiveDueToTagUnavailable: 'InactiveDueToTagUnavailable',\r\n};\r\n\r\nexport const EXTERNAL_LINK = {\r\n CONVERSION_GOAL: 'conversion-goals',\r\n UET_TAG_PAGE: 'uet-tag',\r\n OFFLINE_GOALS: 'offline-conversions',\r\n};\r\n\r\nexport const warningPopupLocalizedMessage = {\r\n title: _TL_(\"You're leaving?\"),\r\n subtitle: _TL_(\"All changes will be discarded if you leave this page. You can still modify your campaign after it's created.\"),\r\n};\r\n\r\nexport const localizedParameters = {\r\n NoExpression: _TL_('no Expression'),\r\n NoValue: _TL_('no Value'), // ValueOperatorEnum\r\n EqualsTo: _TL_('equals to'),\r\n BeginsWith: _TL_('begins with'),\r\n Contains: _TL_('contains'),\r\n RegularExpression: _TL_('regular expression'),\r\n LessThan: _TL_('less than'),\r\n GreaterThan: _TL_('greater than'),\r\n};\r\n\r\nexport const needLocalizedPropName = {\r\n CurrentDestinationUrlOperatorName: 'CurrentDestinationUrlOperatorName',\r\n SuggestedDestinationUrlOperatorName: 'SuggestedDestinationUrlOperatorName',\r\n CurrentEventActionOperator: 'CurrentEventActionOperator',\r\n CurrentEventCategoryOperator: 'CurrentEventCategoryOperator',\r\n CurrentEventValueOperator: 'CurrentEventValueOperator',\r\n SuggestedEventActionOperator: 'SuggestedEventActionOperator',\r\n SuggestedEventCategoryOperator: 'SuggestedEventCategoryOperator',\r\n SuggestedEventValueOperator: 'SuggestedEventValueOperator',\r\n};\r\n\r\nexport const errorcodeMapping: { [key: string]: ErrorCodeMapping } = {\r\n [GoalDiagnosticsInfoErrorCode.UETMismatch]: {\r\n parameterPropertyName: 'UETMismatch',\r\n actionLink: EXTERNAL_LINK.CONVERSION_GOAL,\r\n actionTitle: _TL_('Troubleshoot Conversions Goals page'),\r\n helpText: _TL_('UET tags'),\r\n helpId: 'app51207',\r\n title: _TL_('Incorrectly matched UET tags'),\r\n description: _TL_('You are recording conversion events from a different UET tag.'),\r\n description2: _TL_('The Tag used by the goal is {{ CurrentTagName }} ({{ CurrentTagId }}), actual tag is {{ SuggestedTagName }} ({{ SuggestedTagId }}).'),\r\n requiredParameters: ['CurrentTagName', 'CurrentTagId', 'SuggestedTagName', 'SuggestedTagId'],\r\n },\r\n [GoalDiagnosticsInfoErrorCode.UrlGoalInvalidParameter]: {\r\n parameterPropertyName: 'FixDestinationUrlGoal',\r\n actionLink: EXTERNAL_LINK.CONVERSION_GOAL,\r\n actionTitle: _TL_('Troubleshoot conversion goals'),\r\n helpText: _TL_('conversion goals'),\r\n helpId: 'app54813',\r\n title: _TL_('Invalid Destination URL'),\r\n description: _TL_('We identified a potential error in your conversion goal setting, which might have resulted in missed tracking of conversions.'),\r\n description2: _TL_('The current URL setting is {{CurrentDestinationUrlOperatorName}} {{CurrentDestinationUrl}}. We recommend changing this to {{SuggestedDestinationUrlOperatorName}} {{SuggestedDestinationUrl}}.'),\r\n requiredParameters: ['CurrentDestinationUrlOperatorName', 'CurrentDestinationUrl', 'SuggestedDestinationUrlOperatorName', 'SuggestedDestinationUrl'],\r\n },\r\n [GoalDiagnosticsInfoErrorCode.EventGoalInvalidParameter]: {\r\n parameterPropertyName: 'FixEventGoal',\r\n actionLink: EXTERNAL_LINK.CONVERSION_GOAL,\r\n actionTitle: _TL_('Troubleshoot conversion goals'),\r\n helpText: _TL_('conversion goals.'),\r\n helpId: 'app54813',\r\n title: _TL_('Invalid conversion events'),\r\n description: _TL_('We identified a potential error in your conversion goal setting, which might have resulted in missed tracking of conversions.'),\r\n description2: _TL_('The current setting is {{current}}. We recommend changing this setting to {{suggested}}.'),\r\n requiredParameters: ['current', 'suggested'],\r\n },\r\n [GoalDiagnosticsInfoErrorCode.UETActiveMissingConversionEvent]: {\r\n actionLink: EXTERNAL_LINK.UET_TAG_PAGE,\r\n actionTitle: _TL_('Troubleshoot UET tag'),\r\n helpText: _TL_('conversion goals.'),\r\n helpId: 'app54813',\r\n title: _TL_('No events matched the goal definition'),\r\n description: _TL_('We\\'ve detected the UET tag on your website, but there have been no conversion events matching your definition in the last seven days. Check that the goal has the correct event definition.'),\r\n },\r\n [GoalDiagnosticsInfoErrorCode.NotUploadOfflineConversion]: {\r\n actionLink: EXTERNAL_LINK.OFFLINE_GOALS,\r\n actionTitle: _TL_('Go to offline conversion page'),\r\n helpText: _TL_('offline conversions'),\r\n helpId: 'app54554',\r\n title: _TL_('No offline conversions'),\r\n description: _TL_('No offline conversions were uploaded recently. Go to your offline goals to upload conversions that may be associated to this campaign.'),\r\n },\r\n\r\n // Default tracking status\r\n [GoalDiagnosticsInfoErrorCode.Unverified]: {\r\n actionLink: EXTERNAL_LINK.UET_TAG_PAGE,\r\n actionTitle: _TL_('Troubleshoot UET tag'),\r\n helpText: _TL_('using UET tags.'),\r\n helpId: 'app54867',\r\n title: _TL_('UET Unverified'),\r\n description: _TL_('The UET tag associated with your website has no activity in the past 24 hours.'),\r\n },\r\n [GoalDiagnosticsInfoErrorCode.NoRecentConversion]: {\r\n actionLink: EXTERNAL_LINK.CONVERSION_GOAL,\r\n actionTitle: _TL_('Troubleshoot Conversions Goals'),\r\n helpText: _TL_('conversion goals'),\r\n helpId: 'app54867',\r\n title: _TL_('No Recent Conversion'),\r\n description: _TL_('We\\'ve seen your UET tag but haven\\'t recorded any conversions in the last seven days.'),\r\n },\r\n [GoalDiagnosticsInfoErrorCode.TagInactive]: {\r\n actionLink: EXTERNAL_LINK.UET_TAG_PAGE,\r\n actionTitle: _TL_('Troubleshoot UET tag'),\r\n helpText: _TL_('using UET tags.'),\r\n helpId: 'app54867',\r\n title: _TL_('Inactive UET tag'),\r\n description: _TL_('Your UET tag has not recorded any conversions in the past seven days.'),\r\n },\r\n [GoalDiagnosticsInfoErrorCode.InactiveDueToTagUnavailable]: {\r\n actionLink: EXTERNAL_LINK.UET_TAG_PAGE,\r\n actionTitle: _TL_('Go to UET tag page'),\r\n helpText: _TL_('UET tags.'),\r\n helpId: 'app54813',\r\n title: _TL_('Unavailable UET'),\r\n description: _TL_('The account no longer has access to the UET tag. Permissions to a UET tag in another manager account may have been removed, or this account was transferred and lost permission to a UET tag in a previous manager account.'),\r\n },\r\n};\r\n\r\nexport const EMPTY_STATE = {\r\n NoGoalInitial: 'NoGoalInitial',\r\n SearchEmpty: 'SearchEmpty',\r\n};\r\n\r\nexport const healthyTrackingStatus = 'RecordingConversions';\r\n\r\nexport const categoryMapping = {\r\n Purchase: { text: _TL_('Purchase'), icon: PurchaseIcon },\r\n AddToCart: { text: _TL_('Add to cart'), icon: AddToCartIcon },\r\n BeginCheckout: { text: _TL_('Begin checkout'), icon: CheckoutIcon },\r\n Subcribe: { text: _TL_('Subscribe'), icon: SubscribeIcon },\r\n SubmitLeadForm: { text: _TL_('Submit lead form'), icon: LeadFormIcon },\r\n BookAppointment: { text: _TL_('Book appointment'), icon: BookAppointmentIcon },\r\n Signup: { text: _TL_('Sign - up'), icon: SignupIcon },\r\n RequestQuote: { text: _TL_('Request quote'), icon: RequestQuoteIcon },\r\n GetDirections: { text: _TL_('Get directions'), icon: GetDirectionIcon },\r\n OutboundClick: { text: _TL_('Outbound click'), icon: OutboundClickIcon },\r\n Contact: { text: _TL_('Contact'), icon: ContactIcon },\r\n PageView: { text: _TL_('Page view'), icon: PageViewIcon },\r\n Other: { text: _TL_('Other'), icon: OtherIcon },\r\n Download: { text: _TL_('Download'), icon: DownloadIcon },\r\n};\r\n","import { makeStyles, shorthands, tokens, typographyStyles, } from '@fluentui/react-components';\r\n\r\nexport const useTrackingStatusPopoverStyles = makeStyles({\r\n root: {\r\n color: tokens.colorStatusSuccessForeground1,\r\n backgroundColor: tokens.colorStatusSuccessBackground1,\r\n ...shorthands.borderColor(tokens.colorStatusSuccessBorder1),\r\n },\r\n warningState: {\r\n color: tokens.colorStatusWarningForeground2,\r\n backgroundColor: tokens.colorStatusWarningBackground1,\r\n ...shorthands.borderColor(tokens.colorStatusWarningBorder1),\r\n },\r\n popover: {\r\n maxWidth: 'fit-content',\r\n paddingRight: '30px',\r\n '& .tracking-status-col': {\r\n paddingRight: '10px',\r\n },\r\n },\r\n popoverLearnMore: {\r\n color: tokens.colorNeutralForeground3,\r\n },\r\n popoverContent: {\r\n maxWidth: '350px',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n ...shorthands.gap('10px'),\r\n alignItems: 'flex-start',\r\n },\r\n title: {\r\n ...typographyStyles.title3,\r\n },\r\n});\r\n","// @ts-nocheck\r\nimport React from 'react';\r\nimport { useConfirmDialog } from '@bingads-webui-campaign-react/confirmation-dialog-v2';\r\n\r\nexport interface I18n {\r\n getString: (key: string, params?: any) => string\r\n}\r\n\r\nexport interface ProtectedLinkProps {\r\n i18n: I18n;\r\n onNavigation: () => void;\r\n dialogProps: any;\r\n enabled?: boolean;\r\n children: React.ReactNode;\r\n className: string | undefined;\r\n}\r\n\r\nexport const ProtectedLink: React.FC = ({\r\n i18n, onNavigation, children, dialogProps = {}, enabled, className,\r\n}) => {\r\n const [\r\n dialogView,\r\n showDialog,\r\n shouldShow,\r\n ] = useConfirmDialog({\r\n ...dialogProps,\r\n onConfirm: onNavigation,\r\n className: 'external-dialog',\r\n i18n,\r\n });\r\n\r\n const onClick = (e) => {\r\n e.stopPropagation();\r\n if (enabled) {\r\n showDialog();\r\n } else {\r\n onNavigation();\r\n }\r\n };\r\n\r\n return (\r\n
\r\n {children && React.Children.map(children, child =>\r\n React.cloneElement((child), {\r\n onClick,\r\n }))}\r\n {shouldShow && dialogView}\r\n
\r\n );\r\n};\r\n\r\nProtectedLink.defaultProps = {\r\n enabled: false,\r\n};\r\n","import React from 'react';\r\nimport { Button, ButtonProps, mergeClasses } from '@fluentui/react-components';\r\nimport { ProtectedLink } from '@bingads-webui-campaign-react/protected-link';\r\n\r\nimport { I18n } from '../types';\r\nimport { warningPopupLocalizedMessage } from '../constants';\r\n\r\ninterface NavigationPopupProps {\r\n i18n: I18n;\r\n onNavigation: () => void;\r\n enabled?: boolean;\r\n confirmButtonText: string;\r\n appearance?: ButtonProps['appearance'];\r\n className?: string;\r\n}\r\n\r\nexport const NavigationPopup: React.FC = ({\r\n i18n, onNavigation, enabled, confirmButtonText, appearance, className,\r\n}) => {\r\n const dialogContent = (\r\n
\r\n

{i18n.getString(warningPopupLocalizedMessage.subtitle)}

\r\n
);\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nNavigationPopup.defaultProps = {\r\n appearance: undefined,\r\n className: undefined,\r\n enabled: false,\r\n};\r\n","import _ from 'underscore';\r\nimport React, { useContext, useMemo } from 'react';\r\nimport { Popover,\r\n PopoverTrigger,\r\n PopoverSurface,\r\n mergeClasses,\r\n Badge, } from '@fluentui/react-components';\r\nimport { WarningRegular } from '@fluentui/react-icons';\r\nimport { LearnMoreLink } from '@bingads-webui-campaign-react/help';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\n\r\nimport { getRoutePathById, allSiteMap } from '@bingads-webui-react/with-site-map';\r\n\r\nimport { ErrorCodeMapping, TrackingStatusComponentProps, I18n, GoalType } from '../types';\r\nimport { useTrackingStatusPopoverStyles } from './tracking-status-popover-styles';\r\nimport { errorcodeMapping, GoalDiagnosticsInfoErrorCode, healthyTrackingStatus, localizedParameters, needLocalizedPropName, trackingStatusMapping } from '../constants';\r\nimport { generateEventGoalFixMessage } from '../utils';\r\nimport { NavigationPopup } from './navigation-popup';\r\n\r\nconst TrackingStatusComponent = React.forwardRef<\r\nHTMLDivElement,\r\nPartial\r\n>((props, ref) => {\r\n const { name = '', i18n } = props;\r\n const classes = useTrackingStatusPopoverStyles();\r\n const warningState = name !== healthyTrackingStatus;\r\n const displayName = trackingStatusMapping[name] ? i18n.getString(trackingStatusMapping[name]) : i18n.getString('not applicable');\r\n\r\n return (\r\n \r\n \r\n {warningState && }\r\n {displayName}\r\n \r\n \r\n );\r\n});\r\n\r\ninterface LearnMoreComponentProps {\r\n i18n: I18n;\r\n config: ErrorCodeMapping;\r\n isCreationWorkflow: boolean;\r\n activityLogger?: {\r\n trace: (data: any) => void;\r\n };\r\n goalFixType: string\r\n}\r\n\r\nconst LearnMoreComponent: React.FC = ({\r\n i18n, config, activityLogger, goalFixType, isCreationWorkflow,\r\n}) => {\r\n const { scope } = useContext(ScopeContext) as any;\r\n\r\n const onNavigation = () => {\r\n if (activityLogger && activityLogger.trace) {\r\n activityLogger.trace(`[GoalSelectorV3] navigate to: ${config.actionLink} based on ${goalFixType || config.title}`);\r\n }\r\n scope.history.push({\r\n pathname: getRoutePathById(allSiteMap, config.actionLink),\r\n search: scope.history.location.search,\r\n });\r\n };\r\n const confirmButtonText = (config && config.actionTitle) ? i18n.getString(config.actionTitle) : i18n.getString(_TL_('Confirm'));\r\n\r\n return (\r\n <>\r\n \r\n
\r\n \r\n
\r\n \r\n );\r\n};\r\n\r\nLearnMoreComponent.defaultProps = {\r\n activityLogger: undefined,\r\n};\r\n\r\ninterface TrackingStatusPopoverProps {\r\n i18n: I18n;\r\n goal: GoalType;\r\n isCreationWorkflow: boolean;\r\n activityLogger?: {\r\n trace: (data: any) => void;\r\n };\r\n}\r\n\r\nexport const TrackingStatusPopover: React.FC = ({\r\n i18n, goal, isCreationWorkflow, activityLogger,\r\n}) => {\r\n const goalFixType = _.get(goal, ['GoalDiagnosticsInfo', 'GoalFixType'], '');\r\n const config = (goalFixType ? errorcodeMapping[goalFixType] : null) as ErrorCodeMapping;\r\n const trackingStatusConfig = (goal.TrackingStatus ? errorcodeMapping[goal.TrackingStatus] : null) as ErrorCodeMapping;\r\n const isOfflineGoal = goal.Type === 'OfflineConversionGoal';\r\n\r\n const params = useMemo(() => {\r\n const parameterPropertyName = errorcodeMapping[goalFixType] && errorcodeMapping[goalFixType].parameterPropertyName;\r\n // @ts-ignore\r\n let rawParams = _.get(goal, ['GoalDiagnosticsInfo', parameterPropertyName], {});\r\n Object.keys(rawParams).forEach((key) => {\r\n if (needLocalizedPropName[key] && localizedParameters[rawParams[key]]) {\r\n rawParams[key] = i18n.getString(localizedParameters[rawParams[key]]);\r\n }\r\n });\r\n if (goalFixType === GoalDiagnosticsInfoErrorCode.EventGoalInvalidParameter) {\r\n rawParams = generateEventGoalFixMessage(i18n, rawParams);\r\n }\r\n return rawParams;\r\n }, [goal, goalFixType, i18n]);\r\n\r\n const classes = useTrackingStatusPopoverStyles();\r\n const trackingStatusHelp =\r\n trackingStatusConfig && isOfflineGoal ? i18n.getString(_TL_('We recommend reviewing your offline goals and uploading conversions associated to this campaign.')) :\r\n trackingStatusConfig && i18n.getString(trackingStatusConfig.description);\r\n const defaultParameters = config && config.requiredParameters && config.requiredParameters.reduce((obj, param) => {\r\n const newObj = { ...obj };\r\n newObj[param] = 'N/A';\r\n return newObj;\r\n }, {});\r\n\r\n return (config || trackingStatusConfig) ? (\r\n
\r\n \r\n \r\n \r\n \r\n\r\n \r\n
\r\n \r\n {config ? i18n.getString(config.title) : trackingStatusConfig && (i18n.getString(trackingStatusConfig.title))}\r\n \r\n\r\n
\r\n {config ? (\r\n <>\r\n

{trackingStatusHelp}

\r\n

\r\n {i18n.getString(_TL_('Recommendation: '))}\r\n {i18n.getString(config.description)}\r\n {config.description2 && {i18n.getString(config.description2, { ...defaultParameters, ...params }) }}\r\n

\r\n \r\n ) : (\r\n

{trackingStatusHelp}

\r\n )}\r\n
\r\n {(config && config.helpId) ?\r\n ()\r\n :\r\n trackingStatusConfig && ()\r\n }\r\n
\r\n
\r\n \r\n
\r\n ) : ;\r\n};\r\n\r\nTrackingStatusPopover.defaultProps = {\r\n activityLogger: undefined,\r\n};\r\n","import { getRoutePathById, allSiteMap } from '@bingads-webui-react/with-site-map';\r\nimport _ from 'underscore';\r\n\r\nexport function buildQueryString(params, scope) {\r\n return params.reduce((result, param) => {\r\n const value = _.get(scope, ['values', param]);\r\n if (value != null) {\r\n return result.concat(`${param}=${value}`);\r\n }\r\n return result;\r\n }, []).join('&');\r\n}\r\n\r\nexport function getFullProductUrl(routeName, scope, extraParams = []) {\r\n const baseParams = ['aid', 'cid', 'uid'];\r\n const params = baseParams.concat(extraParams);\r\n const pathname = getRoutePathById(allSiteMap, routeName);\r\n const search = buildQueryString(params, scope);\r\n\r\n return `${pathname}?${search}`;\r\n}\r\n\r\ninterface messageType {\r\n currentMessages: string[]\r\n suggestedMessages: string[]\r\n}\r\nexport const generateEventGoalFixMessage = (i18n, parmas) => {\r\n const outputMessage: messageType = { currentMessages: [], suggestedMessages: [] };\r\n if (parmas.CurrentEventCategory && parmas.CurrentEventCategoryOperator) {\r\n outputMessage.currentMessages.push(i18n.getString(_TL_('\"category {{CurrentEventCategoryOperator}} {{CurrentEventCategory}}\"'), parmas));\r\n }\r\n if (parmas.CurrentEventAction && parmas.CurrentEventActionOperator) {\r\n outputMessage.currentMessages.push(i18n.getString(_TL_('\"action {{CurrentEventActionOperator}} {{CurrentEventAction}}\"'), parmas));\r\n }\r\n if (parmas.CurrentEventLabel && parmas.CurrentEventLabelOperator) {\r\n outputMessage.currentMessages.push(i18n.getString(_TL_('\"label {{CurrentEventLabelOperator}} {{CurrentEventLabel}}\"'), parmas));\r\n }\r\n if (parmas.CurrentEventValue && parmas.CurrentEventValueOperator) {\r\n outputMessage.currentMessages.push(i18n.getString(_TL_('\"value {{CurrentEventValueOperator}} {{CurrentEventValue}}\"'), parmas));\r\n }\r\n\r\n // populate for suggested\r\n if (parmas.SuggestedEventCategory && parmas.SuggestedEventCategoryOperator) {\r\n outputMessage.suggestedMessages.push(i18n.getString(_TL_('\"category {{SuggestedEventCategoryOperator}} {{SuggestedEventCategory}}\"'), parmas));\r\n }\r\n if (parmas.SuggestedEventAction && parmas.SuggestedEventActionOperator) {\r\n outputMessage.suggestedMessages.push(i18n.getString(_TL_('\"action {{SuggestedEventActionOperator}} {{SuggestedEventAction}}\"'), parmas));\r\n }\r\n if (parmas.SuggestedEventLabel && parmas.SuggestedEventLabelOperator) {\r\n outputMessage.suggestedMessages.push(i18n.getString(_TL_('\"label {{SuggestedEventLabelOperator}} {{SuggestedEventLabel}}\"'), parmas));\r\n }\r\n if (parmas.SuggestedEventValue && parmas.SuggestedEventValueOperator) {\r\n outputMessage.suggestedMessages.push(i18n.getString(_TL_('\"value {{SuggestedEventValueOperator}} {{SuggestedEventValue}}\"'), parmas));\r\n }\r\n return { current: outputMessage.currentMessages.join(', '), suggested: outputMessage.suggestedMessages.join(', ') };\r\n};\r\n","import { makeStyles, } from '@fluentui/react-components';\r\n\r\nexport const useEmptyStateStyle = makeStyles({\r\n emptyStateWrap: {\r\n '& .content-subtext': {\r\n marginTop: '10px',\r\n },\r\n },\r\n emptyStateLink: {\r\n display: 'flex',\r\n justifyContent: 'center',\r\n marginTop: '10px',\r\n },\r\n});\r\n","import React, { useContext } from 'react';\r\nimport { Image, } from '@fluentui/react-components';\r\nimport { EmptyState, EmptyStateContent, EmptyStateSize, EmptyStateSurfaceIcon } from '@bingads-webui-fluent-component/empty-state';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { allSiteMap, getRoutePathById } from '@bingads-webui-react/with-site-map';\r\n\r\nimport { EMPTY_STATE, EXTERNAL_LINK } from '../constants';\r\nimport { useEmptyStateStyle } from './empty-state-result-styles';\r\nimport SearchImageIcon from '../../media/search.jpg';\r\nimport SetupImageIcon from '../../media/setup.jpg';\r\nimport { I18n } from '../types';\r\nimport { NavigationPopup } from './navigation-popup';\r\n\r\nexport const emptyStateMapping = {\r\n [EMPTY_STATE.NoGoalInitial]: {\r\n title: _TL_('No conversion goals'),\r\n subtext1: _TL_('You can create a new conversion goal for this account on the conversion goals page.'),\r\n actionButton: true,\r\n actionButtonTitle: _TL_('Create conversion goals'),\r\n siteMapId: EXTERNAL_LINK.CONVERSION_GOAL,\r\n image: SetupImageIcon,\r\n },\r\n [EMPTY_STATE.SearchEmpty]: {\r\n title: _TL_('No results found'),\r\n subtext1: _TL_('Please search again using a conversion goal name.'),\r\n actionButton: false,\r\n actionButtonTitle: '',\r\n image: SearchImageIcon,\r\n },\r\n};\r\n\r\ninterface EmptyStateResultComponentProps {\r\n i18n: I18n;\r\n isCreationWorkflow: boolean | undefined;\r\n emptyState: typeof EMPTY_STATE[keyof typeof EMPTY_STATE];\r\n activityLogger: {\r\n trace: (data: any) => void;\r\n };\r\n}\r\n\r\nexport const EmptyStateResultComponent: React.FC = ({\r\n i18n, emptyState, isCreationWorkflow, activityLogger,\r\n}) => {\r\n const classes = useEmptyStateStyle();\r\n const config = emptyStateMapping[emptyState];\r\n const { scope } = useContext(ScopeContext) as any;\r\n\r\n const defaultOnClick = (siteMapId) => {\r\n if (activityLogger && activityLogger.trace) {\r\n activityLogger.trace(`[GoalSelectorV3] navigate to: ${siteMapId} based on ${config.title}`);\r\n }\r\n scope.history.push({\r\n pathname: getRoutePathById(allSiteMap, siteMapId),\r\n search: scope.history.location.search,\r\n });\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n {i18n.getString(_TL_('empty\r\n \r\n\r\n \r\n {config.actionButton ?\r\n defaultOnClick(config.siteMapId)} enabled={isCreationWorkflow} confirmButtonText={i18n.getString(config.actionButtonTitle)} />\r\n : null }\r\n \r\n
\r\n );\r\n};\r\n","import { makeStyles, shorthands, tokens, typographyStyles, } from '@fluentui/react-components';\r\n\r\nexport const useHeaderControlStyles = makeStyles({\r\n title: { ...typographyStyles.body1Strong },\r\n required: {\r\n color: tokens.colorStatusDangerForeground1,\r\n },\r\n resetButton: {\r\n ...shorthands.border('none'),\r\n backgroundColor: 'transparent',\r\n },\r\n wrapper: {\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n alignContent: 'center',\r\n ...shorthands.padding('10px', 0),\r\n },\r\n header: {\r\n marginBottom: '10px',\r\n '& .helpbutton ': {\r\n paddingLeft: '5px',\r\n display: 'inline-block',\r\n },\r\n },\r\n});\r\n","import React from 'react';\r\nimport { Field, mergeClasses, Radio, RadioGroup } from '@fluentui/react-components';\r\nimport { MessageBar, MessageBarBody, MessageBarTitle } from '@fluentui/react-message-bar';\r\n\r\nimport { HelpButton } from '@bingads-webui-react/help-popup';\r\nimport { useDataSource } from '@bingads-webui-react/data-source';\r\n\r\nimport { useHeaderControlStyles } from './header-control-styles';\r\nimport { Scopes } from '../constants';\r\nimport { I18n } from '../types';\r\n\r\nconst scopeOptions = {\r\n [Scopes.ACCOUNT]: _TL_('Use the account \"Include in conversions\" setting'),\r\n [Scopes.CAMPAIGN]: _TL_('Choose conversion goals for this campaign'),\r\n};\r\n\r\ninterface HeaderControlComponentProps {\r\n i18n: I18n;\r\n scope: string | undefined;\r\n setScope: (value)=> void;\r\n showNoMainGoalWarning: boolean;\r\n}\r\n\r\nexport const HeaderControlComponent: React.FC = ({\r\n i18n, scope, setScope, showNoMainGoalWarning,\r\n}) => {\r\n const {\r\n refetch, search,\r\n } = useDataSource();\r\n\r\n const classes = useHeaderControlStyles();\r\n const onChangeInternal = (_, data) => {\r\n setScope(data.value);\r\n search('');\r\n // @ts-ignore\r\n refetch();\r\n };\r\n\r\n return (\r\n
\r\n {i18n.getString(_TL_('Select conversion goals for this campaign'))}\r\n *\r\n \r\n
\r\n }\r\n >\r\n \r\n {Object.keys(scopeOptions).map((key, idx) =>\r\n )}\r\n \r\n {showNoMainGoalWarning && (\r\n \r\n \r\n {i18n.getString(_TL_('No account level conversion goals'))}\r\n {i18n.getString(_TL_('If there is no account-level conversion goal, you need to choose a specific conversion goal for this campaign.'))}\r\n \r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n","import React, { useEffect, useState } from 'react';\r\nimport {\r\n TableColumnDefinition,\r\n createTableColumn,\r\n Divider,\r\n TableCellLayout,\r\n Checkbox,\r\n mergeClasses,\r\n Image,\r\n Spinner,\r\n} from '@fluentui/react-components';\r\nimport {\r\n PageSizeSelector,\r\n Paginator, SearchBox, TableGridView,\r\n useRenderingData,\r\n} from '@bingads-webui-fluent-component/entity-selector';\r\nimport { SortDefinition, useDataSource } from '@bingads-webui-react/data-source';\r\n\r\nimport { ItemGoalType } from './types';\r\nimport { useTableStyles } from './table-view-section-styles';\r\nimport { categoryMapping, EMPTY_STATE, Scopes } from './constants';\r\nimport { TrackingStatusPopover } from './components/tracking-status-popover';\r\nimport { EmptyStateResultComponent } from './components/empty-state-result';\r\nimport { HeaderControlComponent } from './components/header-control';\r\nimport OtherIcon from '../media/other.svg';\r\n\r\nexport const TableViewSection: React.FC = ({\r\n i18n, childrenProps, customFilter, scope, isCreationWorkflow, activityLogger, setScope, ...resetProps\r\n}) => {\r\n const {\r\n sort, searchTerm, isLoading, count,\r\n } = useDataSource();\r\n const showSelectedOnly = false;\r\n const classes = useTableStyles();\r\n const [showNoMainGoalWarning, setShowNoMainGoalWarning] = useState(false);\r\n const [sortState, setSortState] = useState(undefined);\r\n const isAccountLevelScope = scope === Scopes.ACCOUNT;\r\n\r\n useEffect(() => {\r\n if (count === 0 && searchTerm === '' && !isLoading && isAccountLevelScope) {\r\n setShowNoMainGoalWarning(true);\r\n } else {\r\n setShowNoMainGoalWarning(false);\r\n }\r\n }, [count, isLoading, isAccountLevelScope, searchTerm]);\r\n\r\n const columns: TableColumnDefinition[] = [\r\n createTableColumn({\r\n columnId: 'Name',\r\n renderHeaderCell: () => {i18n.getString(_TL_('Conversion goal'))},\r\n renderCell: item => (\r\n }>\r\n {`${item.data.Name} ${item.data.IsMainConversionGoal ? i18n.getString(_TL_('(Account default)')) : ''}`}\r\n \r\n ),\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n compare: (a, b) => 1, // enable sorting\r\n }),\r\n createTableColumn({\r\n columnId: 'GoalCategory',\r\n renderHeaderCell: () => {i18n.getString(_TL_('Category'))},\r\n renderCell: item => (categoryMapping[item.data.GoalCategory] ? categoryMapping[item.data.GoalCategory].text : i18n.getString(_TL_('Unassigned'))),\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n compare: (a, b) => 1, // enable sorting\r\n }),\r\n createTableColumn({\r\n columnId: 'TrackingStatus',\r\n renderHeaderCell: () => {i18n.getString(_TL_('Tracking Status'))},\r\n renderCell: item => (\r\n \r\n ),\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n compare: (a, b) => 1, // enable sorting\r\n }),\r\n ];\r\n const {\r\n items,\r\n } = useRenderingData({\r\n mode: 'page',\r\n showSelectedOnly,\r\n customFilter,\r\n });\r\n\r\n const isSearchEmptyState = items && items.length === 0 && searchTerm;\r\n const renderingColumns = isAccountLevelScope ? [createTableColumn({\r\n columnId: 'IsMainConversionGoal',\r\n renderHeaderCell: () =>
,\r\n renderCell: item => (\r\n \r\n ),\r\n }), ...columns] : columns;\r\n\r\n const onHandleSort = (_ev, val) => {\r\n setSortState(val);\r\n if (activityLogger && activityLogger.trace && val) {\r\n activityLogger.trace(`[GoalSelectorV3] sort: ${JSON.stringify(val)}`);\r\n }\r\n sort((val as SortDefinition));\r\n };\r\n\r\n return (\r\n <>\r\n \r\n {!showNoMainGoalWarning && (\r\n
\r\n
\r\n \r\n
\r\n
\r\n {isLoading && (\r\n
\r\n )\r\n }\r\n {!isLoading && }\r\n
\r\n { isSearchEmptyState && !isLoading &&\r\n \r\n }\r\n { isSearchEmptyState && !isLoading ? <> :\r\n <>\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n }\r\n
\r\n )}\r\n \r\n );\r\n};\r\n","import React, { useEffect, useState } from 'react';\r\nimport { ServerEntitySelectorEmbedded } from '@bingads-webui-fluent-component/entity-selector';\r\n\r\nimport { useGoalSelectorState } from './use-goal-selector-state';\r\nimport { GoalSelectorConfigProps } from './types';\r\nimport { fetchConversionGoalFactory } from './data';\r\nimport { TableViewSection } from './table-view-section';\r\nimport { EMPTY_STATE, Scopes } from './constants';\r\nimport { EmptyStateResultComponent } from './components/empty-state-result';\r\n\r\nexport const GoalSelector: React.FC<(GoalSelectorConfigProps)> = ({\r\n i18n,\r\n cid,\r\n aid,\r\n value: valueFromProps,\r\n onChange: onChangeFromProps,\r\n goalScopeSelection,\r\n isCreationWorkflow,\r\n activityLogger,\r\n ...props\r\n}) => {\r\n const [scope, setScope] = useState(goalScopeSelection);\r\n const [emptyStateNoGoal, setEmptyStateNoGoal] = useState(false);\r\n\r\n const fetchData = fetchConversionGoalFactory({\r\n options: scope === Scopes.ACCOUNT ? { filter: ' and (IsMainConversionGoal eq true)' } : {},\r\n cid,\r\n aid,\r\n });\r\n\r\n const onSetScope = (newScope) => {\r\n if (activityLogger && activityLogger.trace) {\r\n activityLogger.trace(`[GoalSelectorV3] goal scope change: ${newScope}`);\r\n }\r\n onChangeFromProps({\r\n goalScopeSelection: newScope,\r\n });\r\n\r\n setScope(newScope);\r\n };\r\n\r\n const onChangeGoalSelector = (items) => {\r\n onChangeFromProps({\r\n goalSelection: items,\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n fetchConversionGoalFactory({ cid, aid })({\r\n page: 1, pageSize: 5, search: '', sortState: null,\r\n }).then((response) => {\r\n if (response && response.count === 0) {\r\n setEmptyStateNoGoal(true);\r\n }\r\n });\r\n }, [aid, cid]);\r\n\r\n const { value, onChange } = useGoalSelectorState({ value: valueFromProps, onChange: onChangeGoalSelector });\r\n if (emptyStateNoGoal) {\r\n return
;\r\n }\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import { useCallback, useEffect, useRef, useState } from 'react';\r\n\r\nexport const useGoalSelectorState = ({\r\n value: valueFromProps,\r\n onChange: onChangeFromProps,\r\n}) => {\r\n const prevValueRef = useRef(null);\r\n const [value, setValue] = useState(valueFromProps.map(cmp => ({ value: String(cmp.Id), content: cmp.Name, data: cmp })));\r\n\r\n const onChange = useCallback((newSelectedGoal) => {\r\n setValue(newSelectedGoal);\r\n\r\n onChangeFromProps(newSelectedGoal.map(({ data }) => data));\r\n }, [onChangeFromProps]);\r\n\r\n useEffect(() => {\r\n if (prevValueRef.current !== valueFromProps) {\r\n setValue(valueFromProps.map(cmp => ({ value: String(cmp.Id), content: cmp.Name, data: cmp })));\r\n\r\n prevValueRef.current = valueFromProps;\r\n }\r\n }, [valueFromProps]);\r\n\r\n return {\r\n value,\r\n onChange,\r\n };\r\n};\r\n","/* eslint-disable react-hooks/rules-of-hooks */\r\nimport React, { memo, FC, useCallback, useRef } from 'react';\r\nimport classNames from 'classnames';\r\nimport {\r\n Button,\r\n CardFooter,\r\n makeStyles,\r\n shorthands,\r\n} from '@fluentui/react-components';\r\n\r\nexport interface IFooterButtonConfig {\r\n text: string;\r\n onClick: () => void;\r\n appearance?: undefined | 'subtle';\r\n analyticsId?: string;\r\n helpId?: string;\r\n className?: string;\r\n}\r\n\r\n\r\nexport interface IFooterProps {\r\n footerButtonConfigs?: IFooterButtonConfig[];\r\n renderPagination?: () => React.ReactNode;\r\n}\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n ...shorthands.padding('12px', '0px', '0px'),\r\n },\r\n buttons: {\r\n display: 'flex',\r\n justifyContent: 'flex-start',\r\n ...shorthands.gap('12px'),\r\n },\r\n});\r\n\r\nexport const OverviewCardFooter: FC = memo((props: IFooterProps) => {\r\n const {\r\n footerButtonConfigs,\r\n renderPagination,\r\n } = props;\r\n const classes = useStyles();\r\n\r\n return (\r\n \r\n
\r\n {footerButtonConfigs?.map((config) => {\r\n const hiddenButton = useRef(null);\r\n const onClick = useCallback(() => {\r\n config.onClick();\r\n hiddenButton?.current?.click();\r\n }, [config, hiddenButton]);\r\n return (\r\n \r\n \r\n {config.text}\r\n \r\n {config.helpId &&
\r\n {renderPagination && renderPagination()}\r\n
\r\n );\r\n});\r\n\r\nOverviewCardFooter.displayName = 'OverviewCardFooter';\r\nOverviewCardFooter.defaultProps = {\r\n footerButtonConfigs: [],\r\n renderPagination: undefined,\r\n};\r\n","import React, { useCallback, useState, useEffect, useMemo } from 'react';\r\nimport _ from 'underscore';\r\nimport { Button } from '@fluentui/react-components';\r\nimport { ChevronLeftRegular, ChevronRightRegular } from '@fluentui/react-icons';\r\n\r\nexport const usePaginationConfig = ({\r\n data,\r\n pageSize = 5,\r\n isLoading = false,\r\n i18n,\r\n}: {\r\n data: Array,\r\n pageSize?: number,\r\n isLoading?: boolean,\r\n i18n: any,\r\n}) => {\r\n const [state, setState] = useState({ current: 0, total: 0, initialized: false });\r\n\r\n useEffect(() => {\r\n if (!isLoading) {\r\n if (!_.isEmpty(data)) {\r\n setState({\r\n current: 1,\r\n total: Math.ceil(data.length / pageSize),\r\n initialized: true,\r\n });\r\n } else {\r\n setState(s => ({ ...s, initialized: true }));\r\n }\r\n }\r\n }, [data, pageSize, isLoading]);\r\n\r\n const getDataToDisplayFromSortedData = useCallback(sortedData => sortedData.slice((state.current - 1) * pageSize, state.current * pageSize), [\r\n pageSize,\r\n state,\r\n ]);\r\n\r\n const onNext = useMemo(() => {\r\n const next = state.current + 1;\r\n return next <= state.total ? () => setState({ ...state, current: next }) : _.noop;\r\n }, [state]);\r\n\r\n const onPrevious = useMemo(() => {\r\n const previous = state.current - 1;\r\n return previous > 0 ? () => setState({ ...state, current: previous }) : _.noop;\r\n }, [state]);\r\n\r\n const renderPagination = useCallback(() => {\r\n if (data?.length > 0) {\r\n return (\r\n
\r\n \r\n {i18n.getString(_TL_('{{current}} of {{total}}'), { current: state.current, total: state.total })}\r\n \r\n }\r\n disabled={state.current <= 1}\r\n icon={}\r\n appearance=\"transparent\"\r\n aria-label={i18n.getString('Previous')}\r\n />\r\n }\r\n disabled={state.current >= state.total}\r\n icon={}\r\n appearance=\"transparent\"\r\n aria-label={i18n.getString('Next')}\r\n />\r\n
\r\n );\r\n }\r\n return null;\r\n }, [data, i18n, onNext, onPrevious, state]);\r\n\r\n return {\r\n state,\r\n getDataToDisplayFromSortedData,\r\n resetToFirstPage: () => setState({ ...state, current: 1 }),\r\n renderPagination,\r\n };\r\n};\r\n","import React from 'react';\r\nimport classNames from 'classnames';\r\nimport {\r\n PauseFilled,\r\n BeakerRegular,\r\n BeakerFilled,\r\n CircleFilled,\r\n SubtractRegular,\r\n ErrorCircleRegular,\r\n SubtractCircleRegular,\r\n CheckmarkCircleRegular,\r\n} from '@fluentui/react-icons';\r\nimport { makeStyles, tokens } from '@fluentui/react-components';\r\n\r\nconst dimensions = {\r\n width: '14px',\r\n minWidth: '14px',\r\n height: '20px',\r\n marginRight: '4px',\r\n};\r\n\r\nconst useStyles = makeStyles({\r\n inactive: {\r\n color: tokens.colorNeutralForeground1,\r\n ...dimensions,\r\n },\r\n active: {\r\n color: tokens.colorPaletteGreenBackground3,\r\n ...dimensions,\r\n },\r\n error: {\r\n color: tokens.colorPaletteRedBackground3,\r\n ...dimensions,\r\n },\r\n deleted: {\r\n color: tokens.colorNeutralForeground4,\r\n ...dimensions,\r\n },\r\n enabled: {\r\n color: tokens.colorPaletteGreenBackground3,\r\n ...dimensions,\r\n },\r\n});\r\n\r\nexport const StatusIcon = ({ status, isExperiment, entityType }: { status?: string; isExperiment: boolean; entityType: string; }) => {\r\n const styles = useStyles();\r\n\r\n if (!status || entityType === 'SearchTerm') {\r\n return null;\r\n }\r\n\r\n if (entityType === 'Account') {\r\n if (status === 'Errors') {\r\n return ;\r\n }\r\n if (status === 'Deleted') {\r\n return ;\r\n }\r\n if (status === 'Enabled') {\r\n return ;\r\n }\r\n return null;\r\n }\r\n\r\n switch (status) {\r\n case 'Paused':\r\n case 'UserPaused':\r\n case 'BudgetUserPaused':\r\n case 'Draft':\r\n return isExperiment ? : ;\r\n case 'Deleted':\r\n return isExperiment ? : ;\r\n case 'Suspended':\r\n return isExperiment ? : null;\r\n case 'Expired':\r\n return ;\r\n default:\r\n return isExperiment ? : ;\r\n }\r\n};\r\n\r\nStatusIcon.defaultProps = {\r\n status: undefined,\r\n};\r\n","import React, { memo, FC, useCallback, useMemo } from 'react';\r\nimport classNames from 'classnames';\r\nimport {\r\n makeStyles,\r\n shorthands,\r\n Button,\r\n Text,\r\n tokens,\r\n} from '@fluentui/react-components';\r\nimport {\r\n Add16Regular,\r\n Subtract16Regular,\r\n} from '@fluentui/react-icons';\r\n\r\nexport const useStyles = makeStyles({\r\n searchTermActionRow: {\r\n // cannot find better way, use this hack to align the button with the text\r\n display: 'inline-block',\r\n '& .search-term-added + .search-term-exclude': {\r\n left: '0',\r\n },\r\n },\r\n searchTermButton: {\r\n fontSize: tokens.fontSizeBase200,\r\n fontWeight: 'normal',\r\n ...shorthands.padding('0px'),\r\n position: 'relative',\r\n // cannot find better way, use this hack to align the button with the text\r\n left: '-12px',\r\n top: '-2px',\r\n },\r\n leftSide: {\r\n ...shorthands.margin('0px', '8px', '0px', '0px'),\r\n },\r\n});\r\n\r\nexport interface ISearchTermActionsProps {\r\n triggerSearchTermDrawer?: Function;\r\n searchTermStatus: string;\r\n i18n?: any;\r\n rowRawItem?: any;\r\n}\r\n\r\nexport const SearchTermActions: FC = memo(({\r\n triggerSearchTermDrawer,\r\n i18n,\r\n searchTermStatus,\r\n rowRawItem,\r\n}: ISearchTermActionsProps) => {\r\n const classes = useStyles();\r\n const searchTermAdded = searchTermStatus.indexOf('Added') > -1;\r\n const searchTermExcluded = searchTermStatus.indexOf('Excluded') > -1;\r\n\r\n const onClickAdd = useCallback(() => {\r\n triggerSearchTermDrawer({\r\n isNegative: false,\r\n campaign: rowRawItem.Campaign,\r\n adGroup: rowRawItem.AdGroup,\r\n keywordText: rowRawItem.Text,\r\n });\r\n }, [rowRawItem, triggerSearchTermDrawer]);\r\n const onClickExclude = useCallback(() => {\r\n triggerSearchTermDrawer({\r\n isNegative: true,\r\n campaign: rowRawItem.Campaign,\r\n adGroup: rowRawItem.AdGroup,\r\n keywordText: rowRawItem.Text,\r\n });\r\n }, [rowRawItem, triggerSearchTermDrawer]);\r\n const addAction = useMemo(() => {\r\n if (!rowRawItem || !rowRawItem.Keyword || !rowRawItem.Keyword.Text) {\r\n return null;\r\n }\r\n\r\n if (searchTermAdded) {\r\n return (\r\n {i18n.getString(_TL_('Added'))}\r\n );\r\n }\r\n\r\n return (\r\n }\r\n onClick={onClickAdd}\r\n >\r\n {i18n.getString(_TL_('Add'))}\r\n \r\n );\r\n }, [classes.leftSide, classes.searchTermButton, i18n, onClickAdd, rowRawItem, searchTermAdded]);\r\n\r\n return (\r\n
\r\n {addAction}\r\n {\r\n searchTermExcluded ? (\r\n {i18n.getString(_TL_('Excluded'))}\r\n ) : (\r\n }\r\n onClick={onClickExclude}\r\n >\r\n {i18n.getString(_TL_('Exclude'))}\r\n \r\n )\r\n }\r\n
\r\n );\r\n});\r\n\r\nSearchTermActions.defaultProps = {\r\n i18n: null,\r\n triggerSearchTermDrawer: undefined,\r\n rowRawItem: null,\r\n};\r\n","import React, { memo, FC, useMemo } from 'react';\r\nimport classNames from 'classnames';\r\nimport { Link } from 'react-router-dom';\r\nimport {\r\n makeStyles,\r\n shorthands,\r\n TableCellLayout,\r\n Tooltip,\r\n Popover,\r\n PopoverTrigger,\r\n PopoverSurface,\r\n tokens,\r\n} from '@fluentui/react-components';\r\n\r\nimport { StatusIcon } from './status-icon';\r\nimport { SearchTermActions } from './search-term-actions';\r\n\r\nexport const useStyles = makeStyles({\r\n entityNameLink: {\r\n whiteSpace: 'nowrap',\r\n textOverflow: 'ellipsis',\r\n ...shorthands.overflow('hidden'),\r\n width: '100%',\r\n },\r\n container: {\r\n display: 'flex',\r\n alignItems: 'flex-start',\r\n flexDirection: 'column',\r\n },\r\n entityNameRow: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'flex-start',\r\n width: '100%',\r\n },\r\n searchTermActionRow: {\r\n // cannot find better way, use this hack to align the button with the text\r\n display: 'inline-block',\r\n '& .search-term-added + .search-term-exclude': {\r\n left: '0',\r\n },\r\n },\r\n searchTermButton: {\r\n fontSize: tokens.fontSizeBase200,\r\n fontWeight: 'normal',\r\n ...shorthands.padding('0px'),\r\n position: 'relative',\r\n // cannot find better way, use this hack to align the button with the text\r\n left: '-12px',\r\n top: '-2px',\r\n },\r\n leftSide: {\r\n ...shorthands.margin('0px', '8px', '0px', '0px'),\r\n },\r\n});\r\n\r\nexport interface IEntityNameProps {\r\n entityType: string;\r\n href?: string;\r\n name: string;\r\n status?: string;\r\n isExperiment: boolean;\r\n popoverContent?: React.ReactNode;\r\n triggerSearchTermDrawer?: Function;\r\n className?: string;\r\n searchTermStatus?: string;\r\n i18n?: any;\r\n rowRawItem?: any;\r\n}\r\n\r\nexport const EntityName: FC = memo(({\r\n entityType,\r\n href,\r\n name,\r\n status,\r\n isExperiment,\r\n popoverContent,\r\n triggerSearchTermDrawer,\r\n className,\r\n i18n,\r\n searchTermStatus,\r\n rowRawItem,\r\n}: IEntityNameProps) => {\r\n const classes = useStyles();\r\n\r\n const content = useMemo(() => (\r\n
\r\n
\r\n \r\n {\r\n href ?\r\n {name}\r\n :
{name}
\r\n }\r\n
\r\n {\r\n entityType === 'SearchTerm' &&\r\n \r\n }\r\n
\r\n ), [className, classes, status, isExperiment, entityType, href, name,\r\n triggerSearchTermDrawer, i18n, searchTermStatus, rowRawItem]);\r\n\r\n if (popoverContent) {\r\n return (\r\n \r\n \r\n \r\n {content}\r\n \r\n \r\n {popoverContent}\r\n \r\n \r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n \r\n {content}\r\n \r\n \r\n );\r\n});\r\n\r\nEntityName.defaultProps = {\r\n popoverContent: null,\r\n href: null,\r\n className: 'entity-name',\r\n i18n: null,\r\n searchTermStatus: null,\r\n status: null,\r\n triggerSearchTermDrawer: undefined,\r\n rowRawItem: null,\r\n};\r\n","import React, { memo, FC, useMemo } from 'react';\r\nimport classNames from 'classnames';\r\nimport {\r\n makeStyles,\r\n shorthands,\r\n TableCellLayout,\r\n Text,\r\n} from '@fluentui/react-components';\r\n\r\nimport { IColumnData, IMetricFormatter, TMajorMetric } from '../types';\r\n\r\nexport const useStyles = makeStyles({\r\n metricCell: {\r\n display: 'flex',\r\n justifyContent: 'flex-end',\r\n },\r\n metricCellContent: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n ...shorthands.gap('8px'),\r\n },\r\n metricCellComparison: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n },\r\n});\r\n\r\nconst comparisonValuePositionMap = {\r\n PerformanceMetrics: {\r\n value: 'value',\r\n sup: 'changePercentValue',\r\n sub: 'changeValue',\r\n },\r\n PerformanceMetricsChangePercentage: {\r\n value: 'changePercentValue',\r\n sup: 'value',\r\n sub: 'changeValue',\r\n },\r\n PerformanceMetricsChange: {\r\n value: 'changeValue',\r\n sup: 'value',\r\n sub: 'changePercentValue',\r\n },\r\n};\r\n\r\nexport interface IMetricCellProps {\r\n columnData: IColumnData;\r\n metricFormatter: IMetricFormatter;\r\n comparisonMajorMetric: TMajorMetric;\r\n}\r\n\r\nexport const MetricCell: FC = memo(({\r\n columnData,\r\n metricFormatter,\r\n comparisonMajorMetric,\r\n}: IMetricCellProps) => {\r\n const classes = useStyles();\r\n const {\r\n formatMetric,\r\n formatMetricWithSign,\r\n formatChangePercentageWithSign,\r\n } = metricFormatter;\r\n const {\r\n columnConfig: {\r\n columnId,\r\n },\r\n } = columnData;\r\n const shouldShowComparison = useMemo(() => columnData.columnConfig.isSorted && columnData.PerformanceMetricsChange && columnData.PerformanceMetricsChangePercentage, [columnData]);\r\n const values = useMemo(() => {\r\n const value = formatMetric(columnId, columnData.PerformanceMetrics[columnId], {\r\n currency: columnData.Currency,\r\n });\r\n if (!shouldShowComparison) {\r\n return {\r\n value,\r\n };\r\n }\r\n\r\n const changePercentValue = formatChangePercentageWithSign(columnData.PerformanceMetricsChangePercentage[columnId]);\r\n const changeValue = formatMetricWithSign(columnId, columnData.PerformanceMetricsChange[columnId]);\r\n\r\n return {\r\n value,\r\n changePercentValue,\r\n changeValue,\r\n };\r\n }, [columnData.PerformanceMetrics, columnData.PerformanceMetricsChange, columnData.PerformanceMetricsChangePercentage, columnId, formatChangePercentageWithSign, formatMetric, formatMetricWithSign, shouldShowComparison]);\r\n\r\n const positionMap = comparisonValuePositionMap[comparisonMajorMetric];\r\n const comparisonContent = useMemo(() => {\r\n if (!shouldShowComparison) {\r\n return null;\r\n }\r\n\r\n const supValue = values[positionMap.sup];\r\n const subValue = values[positionMap.sub];\r\n\r\n return (\r\n
\r\n {supValue}\r\n {subValue}\r\n
\r\n );\r\n }, [classes, positionMap, shouldShowComparison, values]);\r\n\r\n const major = shouldShowComparison ? values[positionMap.value] : values.value;\r\n\r\n return (\r\n \r\n
\r\n {major}\r\n {comparisonContent}\r\n
\r\n
\r\n );\r\n});\r\n\r\nMetricCell.defaultProps = {\r\n};\r\n","import React, { memo, FC, useMemo, useCallback } from 'react';\r\nimport classNames from 'classnames';\r\nimport {\r\n Button,\r\n Menu,\r\n MenuTrigger,\r\n MenuPopover,\r\n MenuList,\r\n MenuItem,\r\n makeStyles,\r\n shorthands,\r\n tokens,\r\n} from '@fluentui/react-components';\r\nimport { ChevronDown20Regular } from '@fluentui/react-icons';\r\n\r\nexport const useStyles = makeStyles({\r\n dropdown: {\r\n ...shorthands.flex(0, 0, 'auto'),\r\n alignSelf: 'start',\r\n },\r\n dropdownTriggerButton: {\r\n ...shorthands.padding('0px', '0px', '3px', '0px'),\r\n width: '20px',\r\n height: '20px',\r\n minWidth: '20px',\r\n ':active': { backgroundColor: tokens.colorNeutralStroke1Hover },\r\n ':hover': { backgroundColor: tokens.colorNeutralStroke1Hover },\r\n },\r\n});\r\n\r\nexport interface IMetricPickerMenuButtonProps {\r\n dropdownMetrics: Array<{\r\n key: string,\r\n displayName: string,\r\n }>;\r\n onMetricDropdownSelect: (key: string) => void;\r\n}\r\n\r\nexport const MetricPickerMenuButton: FC\r\n = memo(({ dropdownMetrics, onMetricDropdownSelect }: IMetricPickerMenuButtonProps) => {\r\n const classes = useStyles();\r\n\r\n const dropdownItems = useMemo(() => dropdownMetrics.map((metric) => {\r\n const handleDropdownSelect = (e) => {\r\n onMetricDropdownSelect(metric.key);\r\n e.stopPropagation();\r\n };\r\n return (\r\n \r\n {metric.displayName}\r\n \r\n );\r\n }), [dropdownMetrics, onMetricDropdownSelect]);\r\n\r\n // we have to do this because the parent element is the table header cell, which will re-order table when clicked\r\n const onMenuClick = useCallback((e) => {\r\n e.stopPropagation();\r\n }, []);\r\n\r\n return (\r\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions\r\n
\r\n \r\n \r\n \r\n
\r\n );\r\n });\r\n","import React, { memo, FC } from 'react';\r\nimport classNames from 'classnames';\r\nimport { makeStyles,\r\n tokens,\r\n shorthands,\r\n TableCellLayout,\r\n Tooltip,\r\n Text, } from '@fluentui/react-components';\r\n\r\nimport { MetricPickerMenuButton } from './metric-picker-menu-button';\r\nimport { ISelectedMetric } from '../types';\r\n\r\nexport const useStyles = makeStyles({\r\n metricCell: {\r\n display: 'flex',\r\n justifyContent: 'flex-end',\r\n },\r\n metricCellContent: {\r\n display: 'flex',\r\n },\r\n metricCellHeaderText: {\r\n whiteSpace: 'nowrap',\r\n textOverflow: 'ellipsis',\r\n ...shorthands.overflow('hidden'),\r\n },\r\n sorted: {\r\n backgroundColor: tokens.colorSubtleBackgroundHover,\r\n },\r\n});\r\n\r\nexport interface IMetricHeaderCellProps {\r\n metricDisplayName: string;\r\n dropdownMetrics?: ISelectedMetric[];\r\n onMetricDropdownSelect?: (key: string) => void;\r\n}\r\n\r\nexport const MetricHeaderCell: FC = memo(({\r\n metricDisplayName,\r\n dropdownMetrics,\r\n onMetricDropdownSelect,\r\n}: IMetricHeaderCellProps) => {\r\n const classes = useStyles();\r\n return (\r\n \r\n
\r\n \r\n {metricDisplayName}\r\n \r\n { dropdownMetrics?.length > 0 &&\r\n \r\n }\r\n
\r\n
\r\n );\r\n});\r\n\r\nMetricHeaderCell.defaultProps = {\r\n dropdownMetrics: null,\r\n onMetricDropdownSelect: null,\r\n};\r\n","export const EntityNameColumnId = 'entityDisplayName';\r\n","import React from 'react';\r\nimport { Shimmer, ShimmerElementType } from '@fluentui/react';\r\n\r\nconst headerElement = [\r\n { type: ShimmerElementType.line, height: 16, width: '10%' },\r\n { type: ShimmerElementType.gap, width: '40%' },\r\n { type: ShimmerElementType.line, height: 16, width: '10%' },\r\n { type: ShimmerElementType.gap, width: '10%' },\r\n { type: ShimmerElementType.line, height: 16, width: '10%' },\r\n { type: ShimmerElementType.gap, width: '10%' },\r\n { type: ShimmerElementType.line, height: 16, width: '10%' },\r\n];\r\nconst rowElement = [{ type: ShimmerElementType.line, height: 32 }];\r\nconst buttonElement = [\r\n { type: ShimmerElementType.line, height: 32, width: '25%' },\r\n { type: ShimmerElementType.gap, width: '60%' },\r\n { type: ShimmerElementType.line, height: 16, width: '15%' },\r\n];\r\n\r\nexport function TableShimmer() {\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","import React, { memo, FC, useCallback, useMemo } from 'react';\r\nimport _ from 'underscore';\r\nimport {\r\n Caption1,\r\n Caption1Stronger,\r\n DataGridBody,\r\n DataGridRow,\r\n DataGrid,\r\n DataGridHeader,\r\n DataGridHeaderCell,\r\n DataGridCell,\r\n Image,\r\n useTableSort,\r\n useTableFeatures,\r\n tokens,\r\n makeStyles,\r\n} from '@fluentui/react-components';\r\nimport classNames from 'classnames';\r\nimport { OverviewCardFooter, usePaginationConfig, IFooterButtonConfig } from '@bingads-webui-campaign-react/overview-card-footer';\r\n\r\nimport { IPerformanceData, ISelectedMetric, ISortState, IColumnData, IMetricFormatter, TMajorMetric } from './types';\r\nimport { getColumns } from './columns';\r\nimport { TableShimmer } from './table-shimmer';\r\nimport { EntityNameColumnId } from './const';\r\nimport SearchExclamationImage from '../media/search-exclamation-image.png';\r\n\r\nexport const useStyles = makeStyles({\r\n container: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n height: '100%',\r\n },\r\n grid: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n flexGrow: 1,\r\n },\r\n sorted: {\r\n backgroundColor: tokens.colorSubtleBackgroundHover,\r\n flexGrow: 1.5,\r\n },\r\n entityNameColumn: {\r\n flexGrow: 1.8,\r\n },\r\n noDataContainer: {\r\n flexGrow: 1,\r\n textAlign: 'center',\r\n alignContent: 'center',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n },\r\n});\r\n\r\nexport interface IOverviewPerformanceTableProps {\r\n isLoading?: boolean;\r\n entityDisPlayName: string;\r\n selectedMetrics?: ISelectedMetric[];\r\n allMetrics: ISelectedMetric[];\r\n sortState?: ISortState;\r\n data?: IPerformanceData[];\r\n onChange: ({\r\n newSelectedMetrics,\r\n newSortState,\r\n }: {\r\n newSelectedMetrics?: ISelectedMetric[],\r\n newSortState?: ISortState,\r\n }) => void;\r\n i18n: any;\r\n metricFormatter: IMetricFormatter;\r\n comparisonMajorMetric: TMajorMetric;\r\n footerButtonConfigs?: IFooterButtonConfig[];\r\n getHref: Function;\r\n getPopoverContent?: Function;\r\n triggerSearchTermDrawer?: Function;\r\n entityType: string;\r\n}\r\n\r\nexport const OverviewPerformanceTable: FC = memo((props: IOverviewPerformanceTableProps) => {\r\n const {\r\n isLoading,\r\n entityDisPlayName,\r\n selectedMetrics,\r\n allMetrics,\r\n sortState,\r\n data,\r\n onChange,\r\n i18n,\r\n metricFormatter,\r\n comparisonMajorMetric,\r\n footerButtonConfigs,\r\n getHref,\r\n getPopoverContent,\r\n triggerSearchTermDrawer,\r\n entityType,\r\n } = props;\r\n const classes = useStyles();\r\n\r\n const onColumnChange = useCallback(({ newSelectedMetrics }: {\r\n newSelectedMetrics: ISelectedMetric[],\r\n }) => {\r\n if (!newSelectedMetrics.some(m => m.key === sortState.sortColumn)) {\r\n const changedMetric = newSelectedMetrics.find(m => selectedMetrics.every(sm => sm.key !== m.key));\r\n const newSortState = {\r\n sortColumn: changedMetric.key,\r\n sortDirection: sortState.sortDirection,\r\n };\r\n onChange({\r\n newSelectedMetrics,\r\n newSortState,\r\n });\r\n return;\r\n }\r\n onChange({\r\n newSelectedMetrics,\r\n });\r\n }, [onChange, selectedMetrics, sortState]);\r\n\r\n const columns = getColumns({\r\n entityDisPlayName,\r\n selectedMetrics,\r\n allMetrics,\r\n onColumnChange,\r\n metricFormatter,\r\n comparisonMajorMetric,\r\n i18n,\r\n });\r\n\r\n const {\r\n getDataToDisplayFromSortedData,\r\n renderPagination,\r\n resetToFirstPage,\r\n } = usePaginationConfig({\r\n data,\r\n i18n,\r\n });\r\n\r\n const onSortChange = useCallback((e, nextSortState) => {\r\n if (sortState.sortColumn === nextSortState.sortColumn) {\r\n onChange({\r\n newSortState: nextSortState,\r\n });\r\n } else {\r\n // For performance metrics, we reset sort direction to descending when sort column changes\r\n onChange({\r\n newSortState: {\r\n sortColumn: nextSortState.sortColumn,\r\n sortDirection: 'descending',\r\n },\r\n });\r\n }\r\n resetToFirstPage();\r\n }, [onChange, resetToFirstPage, sortState]);\r\n\r\n const {\r\n getRows,\r\n sort: { sort },\r\n } = useTableFeatures(\r\n {\r\n columns,\r\n items: data,\r\n },\r\n [\r\n useTableSort({\r\n sortState,\r\n }),\r\n ]\r\n );\r\n\r\n const dataToDisplay = useMemo(() => {\r\n const sortedData = _.map(sort(getRows()), row => row.item);\r\n return getDataToDisplayFromSortedData(sortedData);\r\n }, [getDataToDisplayFromSortedData, getRows, sort]);\r\n const isSortColumn = useCallback((columnId: string | number) => columnId === sortState.sortColumn, [sortState]);\r\n const sortClassObj = useCallback((columnId: string | number) => ({\r\n [classes.sorted]: isSortColumn(columnId),\r\n }), [classes.sorted, isSortColumn]);\r\n\r\n if (isLoading) {\r\n return ;\r\n }\r\n\r\n return (\r\n
\r\n item.Id}\r\n className={classNames('ba-performance-table', classes.grid)}\r\n >\r\n \r\n \r\n {({ renderHeaderCell, columnId }) => (\r\n \r\n {renderHeaderCell()}\r\n \r\n )}\r\n \r\n \r\n >\r\n {({ item, rowId }) => (\r\n key={rowId}>\r\n {({ renderCell, columnId }) => {\r\n const columnData = {\r\n ...item,\r\n href: getHref(`${item.Id}`, item.CampaignType),\r\n columnConfig: {\r\n isSorted: isSortColumn(columnId),\r\n columnId,\r\n },\r\n getPopoverContent,\r\n triggerSearchTermDrawer,\r\n entityType,\r\n currency: item.Currency,\r\n };\r\n return (\r\n \r\n {renderCell(columnData)}\r\n \r\n );\r\n }}\r\n \r\n )}\r\n \r\n \r\n {_.isEmpty(dataToDisplay) &&\r\n
\r\n
\r\n
\r\n
\r\n {i18n.getString(_TL_('No data available. '))}
\r\n
\r\n \r\n {i18n.getString(_TL_('To update the tile, select a different date range.'))}\r\n \r\n \r\n {i18n.getString(_TL_('If the tile remains blank, your account might have no data.'))}\r\n \r\n
\r\n
\r\n }\r\n \r\n
\r\n );\r\n});\r\n\r\nOverviewPerformanceTable.defaultProps = {\r\n isLoading: false,\r\n selectedMetrics: undefined,\r\n sortState: undefined,\r\n data: [],\r\n footerButtonConfigs: null,\r\n getPopoverContent: undefined,\r\n triggerSearchTermDrawer: undefined,\r\n};\r\n","import React from 'react';\r\nimport _ from 'underscore';\r\nimport {\r\n TableColumnDefinition,\r\n TableCellLayout,\r\n createTableColumn,\r\n} from '@fluentui/react-components';\r\nimport { EntityName } from '@bingads-webui-campaign-react/overview-grid-entity-name';\r\n\r\nimport { IColumnData, ISelectedMetric, TMajorMetric, IMetricFormatter } from './types';\r\nimport { MetricCell } from './table-cell/metric-cell';\r\nimport { MetricHeaderCell } from './table-cell/metric-header-cell';\r\nimport { EntityNameColumnId } from './const';\r\n\r\ninterface IGetColumnsProps {\r\n entityDisPlayName: string;\r\n selectedMetrics: ISelectedMetric[];\r\n allMetrics: ISelectedMetric[];\r\n onColumnChange: ({\r\n newSelectedMetrics,\r\n }: {\r\n newSelectedMetrics: ISelectedMetric[],\r\n }) => void;\r\n metricFormatter: IMetricFormatter;\r\n comparisonMajorMetric: TMajorMetric;\r\n i18n: any;\r\n}\r\n\r\n// TODO: [yaoyao] Do we show less columns in small screen? Designer should provide the design.\r\n// https://msasg.visualstudio.com/Bing_Ads/_workitems/edit/7235904\r\nexport function getColumns({\r\n entityDisPlayName,\r\n selectedMetrics,\r\n allMetrics,\r\n onColumnChange,\r\n metricFormatter,\r\n comparisonMajorMetric,\r\n i18n,\r\n}: IGetColumnsProps): TableColumnDefinition[] {\r\n const dropdownMetrics = _.filter(allMetrics, metric => !selectedMetrics.some(m => m.key === metric.key));\r\n const metricColumns = _.map(selectedMetrics, (metric, index) => {\r\n const onMetricDropdownSelect = (key: string) => {\r\n const newSelectedMetrics = [...selectedMetrics];\r\n const selectedMetric = allMetrics.find(m => m.key === key);\r\n newSelectedMetrics.splice(index, 1, selectedMetric);\r\n onColumnChange({\r\n newSelectedMetrics,\r\n });\r\n };\r\n return createTableColumn({\r\n columnId: metric.key,\r\n compare: (a, b) => a[comparisonMajorMetric][metric.key] - b[comparisonMajorMetric][metric.key],\r\n renderHeaderCell: () => (\r\n \r\n ),\r\n renderCell: item => (\r\n \r\n ),\r\n });\r\n });\r\n\r\n return [\r\n createTableColumn({\r\n columnId: EntityNameColumnId,\r\n renderHeaderCell: () => (\r\n \r\n {entityDisPlayName}\r\n \r\n ),\r\n renderCell: (item) => {\r\n let popoverContent = null;\r\n if (item.getPopoverContent) {\r\n popoverContent = item.getPopoverContent(item);\r\n }\r\n return ();\r\n },\r\n }),\r\n ...metricColumns,\r\n ];\r\n}\r\n","import React, { memo, FC, useMemo } from 'react';\r\nimport classNames from 'classnames';\r\nimport {\r\n Button,\r\n Menu,\r\n MenuTrigger,\r\n MenuPopover,\r\n MenuList,\r\n MenuItem,\r\n Caption1Strong,\r\n makeStyles,\r\n shorthands,\r\n tokens,\r\n} from '@fluentui/react-components';\r\nimport { ChevronDown20Regular } from '@fluentui/react-icons';\r\n\r\nexport const useStyles = makeStyles({\r\n dropdown: {\r\n ...shorthands.flex(0, 0, 'auto'),\r\n alignSelf: 'start',\r\n },\r\n dropdownTriggerButton: {\r\n ...shorthands.padding('0px', '0px', '3px', '0px'),\r\n ':active': { backgroundColor: tokens.colorNeutralStroke1Hover },\r\n ':hover': { backgroundColor: tokens.colorNeutralStroke1Hover },\r\n },\r\n});\r\n\r\nexport interface IMetricPickerProps {\r\n metrics: Array<{\r\n key: string,\r\n displayName: string,\r\n }>;\r\n onMetricSelect: (key: string) => void;\r\n selectedMetricKey: string;\r\n}\r\n\r\nexport const MetricPicker: FC\r\n = memo(({ metrics, onMetricSelect, selectedMetricKey }: IMetricPickerProps) => {\r\n const classes = useStyles();\r\n\r\n const dropdownItems = useMemo(() => metrics.map((metric) => {\r\n const handleDropdownSelect = () => {\r\n onMetricSelect(metric.key);\r\n };\r\n return (\r\n \r\n {metric.displayName}\r\n \r\n );\r\n }), [metrics, onMetricSelect]);\r\n\r\n return (\r\n
\r\n \r\n \r\n }\r\n iconPosition=\"after\"\r\n size=\"medium\"\r\n >\r\n {metrics?.find(m => m?.key === selectedMetricKey)?.displayName}\r\n \r\n \r\n \r\n \r\n {dropdownItems}\r\n \r\n \r\n \r\n
\r\n );\r\n });\r\n","import React, { memo, FC } from 'react';\r\nimport classNames from 'classnames';\r\nimport {\r\n makeStyles,\r\n shorthands,\r\n TableCellLayout,\r\n Text,\r\n} from '@fluentui/react-components';\r\n\r\nexport const useStyles = makeStyles({\r\n textCell: {\r\n display: 'flex',\r\n justifyContent: 'flex-end',\r\n },\r\n textCellContent: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n ...shorthands.gap('8px'),\r\n },\r\n});\r\n\r\nexport interface ITextCellProps {\r\n value: string;\r\n cellName: string;\r\n}\r\n\r\nexport const TextCell: FC = memo(({\r\n value,\r\n cellName,\r\n}: ITextCellProps) => {\r\n const classes = useStyles();\r\n return (\r\n \r\n
\r\n {value}\r\n
\r\n
\r\n );\r\n});\r\n","import React from 'react';\r\nimport classNames from 'classnames';\r\nimport {\r\n makeStyles,\r\n tokens,\r\n} from '@fluentui/react-components';\r\n\r\nexport const useStyles = makeStyles({\r\n cell: {\r\n position: 'absolute',\r\n height: '100%',\r\n borderLeftColor: tokens.colorNeutralBackground1Hover,\r\n borderLeftWidth: '5px',\r\n borderLeftStyle: 'solid',\r\n borderRightColor: tokens.colorNeutralBackground1Hover,\r\n borderRightWidth: '5px',\r\n borderRightStyle: 'solid',\r\n left: '5px',\r\n right: '5px',\r\n backgroundColor: tokens.colorNeutralBackground1Hover,\r\n },\r\n container: {\r\n // backgroundColor: tokens.colorNeutralBackground1Hover,\r\n left: '0px',\r\n width: '100%',\r\n height: '100%',\r\n display: 'flex',\r\n position: 'absolute',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n },\r\n negative: {\r\n height: '24px',\r\n position: 'absolute',\r\n backgroundColor: tokens.colorPaletteLilacForeground2,\r\n right: '50%',\r\n },\r\n middleMark: {\r\n position: 'absolute',\r\n height: '100%',\r\n width: '1px',\r\n backgroundColor: tokens.colorNeutralBackground1Pressed,\r\n },\r\n positive: {\r\n height: '24px',\r\n position: 'absolute',\r\n backgroundColor: tokens.colorPaletteBlueBorderActive,\r\n left: '50%',\r\n },\r\n});\r\n\r\n// Divide percentages by 2 because the width each section (positive and negative) should be half of the total width of the cell\r\nfunction getBarWidth(change: number, maxChange: number) {\r\n return Math.abs((maxChange > 0 ? (change / maxChange) * 100 : 0) / 2);\r\n}\r\n\r\nexport const ChangeBarCell = React.memo(({ change, maxChange }: { change: number, maxChange: number }) => {\r\n const classes = useStyles();\r\n\r\n const negativeBarWidth = change < 0 ? getBarWidth(change, maxChange) : 0;\r\n const positiveBarWidth = change > 0 ? getBarWidth(change, maxChange) : 0;\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","import React, { useState, useRef, useCallback } from 'react';\r\nimport classNames from 'classnames';\r\nimport {\r\n Button,\r\n makeStyles,\r\n tokens,\r\n shorthands,\r\n Tooltip,\r\n Popover,\r\n PopoverTrigger,\r\n PopoverSurface,\r\n} from '@fluentui/react-components';\r\nimport { LightbulbFilamentRegular } from '@fluentui/react-icons';\r\nimport { getFluctuationContentStyle } from '@bingads-webui-campaign-react/common-styles';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { IColumnData } from '../types';\r\n\r\nexport const useStyles = makeStyles({\r\n button: {\r\n color: tokens.colorNeutralForeground2BrandHover,\r\n },\r\n popover: {\r\n '& .bingads-fluctuation-wrapper': {\r\n width: '500px',\r\n '& .fluc-description': {\r\n fontSize: '12px',\r\n },\r\n '& .cause-container-wrapper': {\r\n paddingLeft: '31px',\r\n marginLeft: '-16px',\r\n paddingRight: '31px',\r\n marginRight: '-16px',\r\n },\r\n },\r\n '& .loading-dialog': {\r\n position: 'static',\r\n boxShadow: 'none',\r\n ...shorthands.borderStyle('none'),\r\n },\r\n },\r\n});\r\n\r\nconst backupPalette = { themePrimary: tokens.colorPaletteBlueBorderActive };\r\nconst getStyles = ({ palette = backupPalette, iconFontFamily }) => ({ popover: { ...getFluctuationContentStyle({ palette, iconFontFamily }) } });\r\n\r\ninterface InsightCellProps {\r\n i18n: any;\r\n fluctuationTypeIds: Array;\r\n renderFluctuationPopup: Function;\r\n entity: IColumnData;\r\n metric: { name: string; value: string; };\r\n}\r\n\r\nexport function InsightCell({\r\n i18n, fluctuationTypeIds, renderFluctuationPopup, entity, metric,\r\n}: InsightCellProps) {\r\n const classes = useStyles();\r\n\r\n const [isOpen, setIsOpen] = useState(false);\r\n const buttonRef = useRef(null);\r\n const styles = useDefaultStyles(getStyles);\r\n\r\n const onOpenChange = useCallback(((e, data) => {\r\n if (data.open) {\r\n setIsOpen(true);\r\n } else {\r\n setIsOpen(false);\r\n }\r\n }), []);\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n }\r\n size=\"medium\"\r\n onClick={() => setIsOpen(true)}\r\n ref={buttonRef}\r\n />\r\n \r\n \r\n\r\n \r\n
\r\n {renderFluctuationPopup({\r\n fluctuationTypeIds, isOpen, setIsOpen, entity, metric,\r\n })}\r\n
\r\n
\r\n
\r\n
\r\n );\r\n}\r\n","import classNames from 'classnames';\r\nimport React, { useMemo } from 'react';\r\nimport {\r\n makeStyles,\r\n Popover,\r\n PopoverSurface,\r\n PopoverTrigger,\r\n tokens,\r\n} from '@fluentui/react-components';\r\n\r\nimport { IMetricFormatter } from './types';\r\n\r\nconst useStyles = makeStyles({\r\n trigger: {\r\n display: 'flex',\r\n height: '44px',\r\n justifyContent: 'center',\r\n },\r\n metricContainer: {\r\n display: 'flex',\r\n columnGap: '12px',\r\n marginTop: '8px',\r\n marginBottom: '8px',\r\n },\r\n metric: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n rowGap: '6px',\r\n },\r\n separator: {\r\n borderRightStyle: 'solid',\r\n borderRightWidth: '1px',\r\n borderRightColor: tokens.colorNeutralStroke1Selected,\r\n },\r\n box: {\r\n width: '12px',\r\n height: '12px',\r\n marginRight: '5px',\r\n },\r\n positiveBox: {\r\n backgroundColor: tokens.colorPaletteBlueBorderActive,\r\n },\r\n negativeBox: {\r\n backgroundColor: tokens.colorPaletteLilacForeground2,\r\n },\r\n changeContainer: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n});\r\n\r\nfunction formatDate(i18n: any, date: { start: Date, end: Date }) {\r\n const formattedStart = i18n.formatDate(date.start);\r\n const formattedEnd = i18n.formatDate(date.end);\r\n\r\n if (formattedStart === formattedEnd) {\r\n return formattedStart;\r\n }\r\n return `${formattedStart} - ${formattedEnd}`;\r\n}\r\n\r\ninterface IPopoverInfoProps {\r\n i18n: any;\r\n change: number;\r\n percentageChange: string;\r\n metricName: string;\r\n localizedMetricName: string;\r\n currentMetric: string;\r\n periodMetric: string;\r\n entityName: string;\r\n currentDateRange: {\r\n end: Date;\r\n start: Date;\r\n };\r\n comparisonDateRange: {\r\n end: Date;\r\n start: Date;\r\n };\r\n metricFormatter: IMetricFormatter;\r\n currency: string;\r\n}\r\nexport const PopoverInfo: React.FC = ({\r\n i18n, children, entityName, metricName, localizedMetricName,\r\n currentMetric, periodMetric, change, metricFormatter,\r\n percentageChange, currentDateRange, comparisonDateRange, currency,\r\n}) => {\r\n const styles = useStyles();\r\n const formattedChange = useMemo(() => metricFormatter.formatMetricWithSign(metricName, change, { currency }), [metricFormatter, metricName, change]);\r\n const formattedPercentageChange = useMemo(() => metricFormatter.formatChangePercentageWithSign(percentageChange), [metricFormatter, percentageChange]);\r\n\r\n const formattedCurrentMetric = useMemo(() => metricFormatter.formatMetric(metricName, currentMetric, { currency }), [metricFormatter, metricName, currentMetric]);\r\n const formattedPeriodMetric = useMemo(() => metricFormatter.formatMetric(metricName, periodMetric, { currency }), [metricFormatter, metricName, periodMetric]);\r\n\r\n return (\r\n \r\n \r\n \r\n {children}\r\n \r\n \r\n\r\n \r\n
\r\n
{entityName}
\r\n
\r\n
\r\n
{formatDate(i18n, currentDateRange)}
\r\n
{`${localizedMetricName}: ${formattedCurrentMetric}`}
\r\n
\r\n
\r\n
\r\n
{formatDate(i18n, comparisonDateRange)}
\r\n
{`${localizedMetricName}: ${formattedPeriodMetric}`}
\r\n
\r\n
\r\n
\r\n {change !== 0 &&
0 ? styles.positiveBox : styles.negativeBox)} />}\r\n {i18n.getString(_TL_('Change: {{changeValue}} ({{changePercentage}})'), { changeValue: formattedChange, changePercentage: formattedPercentageChange })}\r\n
\r\n
\r\n \r\n \r\n );\r\n};\r\n","export const EntityNameColumnId = 'entityDisplayName';\r\nexport const ChangeBarColumnId = 'changeBar';\r\nexport const InsightColumnId = 'insight';\r\n","import React from 'react';\r\nimport _ from 'underscore';\r\nimport {\r\n TableColumnDefinition,\r\n createTableColumn,\r\n} from '@fluentui/react-components';\r\nimport { EntityName } from '@bingads-webui-campaign-react/overview-grid-entity-name';\r\n\r\nimport { IColumnData, IMetricFormatter } from './types';\r\nimport { TextCell } from './table-cell/text-cell';\r\nimport { ChangeBarCell } from './table-cell/change-bar-cell';\r\nimport { InsightCell } from './table-cell/insight-cell';\r\nimport { PopoverInfo } from './popover-info';\r\nimport { EntityNameColumnId, ChangeBarColumnId, InsightColumnId } from './const';\r\n\r\ninterface IGetColumnsProps {\r\n selectedMetric: string;\r\n metricFormatter: IMetricFormatter;\r\n currentDateRange: {\r\n end: Date;\r\n start: Date;\r\n };\r\n comparisonDateRange: {\r\n end: Date;\r\n start: Date;\r\n };\r\n i18n: any;\r\n renderFluctuationPopup: Function;\r\n metrics: Array<{\r\n key: string,\r\n displayName: string,\r\n }>;\r\n}\r\n\r\nconst FluctuationTypeMap = {\r\n Clicks: 'Click',\r\n Impressions: 'Impression',\r\n Spend: 'Spend',\r\n Conversions: 'Conversion',\r\n};\r\n\r\nfunction hasFluctuation(availableInsights, selectedMetric) {\r\n const current = FluctuationTypeMap[selectedMetric];\r\n return current && _.contains(availableInsights, current);\r\n}\r\n\r\nexport function getColumns({\r\n selectedMetric,\r\n metricFormatter,\r\n currentDateRange,\r\n comparisonDateRange,\r\n i18n,\r\n metrics,\r\n renderFluctuationPopup,\r\n}: IGetColumnsProps): TableColumnDefinition[] {\r\n const localizedMetricName = metrics?.find(m => m?.key === selectedMetric)?.displayName;\r\n return [\r\n createTableColumn({\r\n columnId: EntityNameColumnId,\r\n renderCell: (item) => {\r\n let popoverContent = null;\r\n if (item.getPopoverContent) {\r\n popoverContent = item.getPopoverContent(item);\r\n }\r\n return ();\r\n },\r\n }),\r\n createTableColumn({\r\n columnId: ChangeBarColumnId,\r\n renderCell: item => (\r\n \r\n \r\n \r\n ),\r\n }),\r\n createTableColumn({\r\n columnId: InsightColumnId,\r\n renderCell: (item) => {\r\n if (hasFluctuation(item.AvailableInsightTypeIds, selectedMetric)) {\r\n const fluctuationTypeIds = _.filter(item.AvailableInsightTypeIds, MTMetric => MTMetric === FluctuationTypeMap[selectedMetric]);\r\n const metric = {\r\n name: localizedMetricName,\r\n value: metricFormatter.formatMetricWithSign(selectedMetric, item.PerformanceMetricsChange[selectedMetric], {\r\n currency: item.Currency,\r\n }),\r\n };\r\n return (\r\n \r\n );\r\n }\r\n return (<>);\r\n },\r\n }),\r\n createTableColumn({\r\n columnId: `${selectedMetric}-change-value`,\r\n renderCell: (item) => {\r\n const value = metricFormatter.formatMetricWithSign(selectedMetric, item.PerformanceMetricsChange[selectedMetric], {\r\n currency: item.Currency,\r\n });\r\n return (\r\n \r\n \r\n \r\n );\r\n },\r\n }),\r\n createTableColumn({\r\n columnId: `${selectedMetric}-change-percentage`,\r\n renderCell: (item) => {\r\n const value = metricFormatter.formatChangePercentageWithSign(item.PerformanceMetricsChangePercentage[selectedMetric]);\r\n return (\r\n \r\n \r\n \r\n );\r\n },\r\n }),\r\n ];\r\n}\r\n","import React from 'react';\r\nimport { Shimmer, ShimmerElementType } from '@fluentui/react';\r\n\r\nconst headerElement = [\r\n { type: ShimmerElementType.line, height: 16, width: '10%' },\r\n { type: ShimmerElementType.gap, width: '40%' },\r\n { type: ShimmerElementType.line, height: 16, width: '10%' },\r\n { type: ShimmerElementType.gap, width: '10%' },\r\n { type: ShimmerElementType.line, height: 16, width: '10%' },\r\n { type: ShimmerElementType.gap, width: '10%' },\r\n { type: ShimmerElementType.line, height: 16, width: '10%' },\r\n];\r\nconst rowElement = [{ type: ShimmerElementType.line, height: 32 }];\r\nconst buttonElement = [\r\n { type: ShimmerElementType.line, height: 32, width: '25%' },\r\n { type: ShimmerElementType.gap, width: '60%' },\r\n { type: ShimmerElementType.line, height: 16, width: '15%' },\r\n];\r\n\r\nexport function TableShimmer() {\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","import React, { memo, FC, useMemo } from 'react';\r\nimport _ from 'underscore';\r\nimport {\r\n Button,\r\n Caption1,\r\n Caption1Stronger,\r\n Caption2,\r\n DataGridBody,\r\n DataGridRow,\r\n DataGrid,\r\n DataGridCell,\r\n DataGridHeader,\r\n Image,\r\n Popover,\r\n PopoverTrigger,\r\n PopoverSurface,\r\n makeStyles,\r\n} from '@fluentui/react-components';\r\nimport { Info16Regular } from '@fluentui/react-icons';\r\nimport classNames from 'classnames';\r\nimport { OverviewCardFooter, usePaginationConfig, IFooterButtonConfig } from '@bingads-webui-campaign-react/overview-card-footer';\r\n\r\nimport { IPerformanceData, IColumnData, IMetricFormatter } from './types';\r\nimport { MetricPicker } from './metric-picker';\r\nimport { getColumns } from './columns';\r\nimport { TableShimmer } from './table-shimmer';\r\nimport { EntityNameColumnId, InsightColumnId, ChangeBarColumnId } from './const';\r\nimport { getComparisonText } from './get-comparison-text';\r\nimport SearchExclamationImage from '../media/search-exclamation-image.png';\r\n\r\nexport const useStyles = makeStyles({\r\n container: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n height: '100%',\r\n },\r\n grid: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n flexGrow: 1,\r\n },\r\n entityNameColumn: {\r\n flexGrow: 1.8,\r\n },\r\n insightColumn: {\r\n flexGrow: 0.3,\r\n },\r\n barColumn: {\r\n flexGrow: 2,\r\n },\r\n contentHeaderContainer: {\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n },\r\n popover: {\r\n width: '300px',\r\n },\r\n noDataContainer: {\r\n flexGrow: 1,\r\n textAlign: 'center',\r\n alignContent: 'center',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n },\r\n dateContainer: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n});\r\n\r\nexport interface IOverviewTopChangesProps {\r\n isLoading?: boolean;\r\n selectedMetric: string;\r\n data?: IPerformanceData[];\r\n i18n: any;\r\n metricFormatter: IMetricFormatter;\r\n footerButtonConfigs?: IFooterButtonConfig[];\r\n getHref: Function;\r\n getPopoverContent?: Function;\r\n entityType: string;\r\n metrics: Array<{\r\n key: string,\r\n displayName: string,\r\n }>;\r\n onMetricSelect: (key: string) => void;\r\n currentDateRange: {\r\n end: Date;\r\n start: Date;\r\n };\r\n comparisonDateRange: {\r\n end: Date;\r\n start: Date;\r\n };\r\n renderFluctuationPopup: Function;\r\n}\r\n\r\nexport const OverviewTopChanges: FC = memo((props: IOverviewTopChangesProps) => {\r\n const {\r\n isLoading,\r\n selectedMetric,\r\n data,\r\n i18n,\r\n metricFormatter,\r\n footerButtonConfigs,\r\n getHref,\r\n getPopoverContent,\r\n entityType,\r\n metrics,\r\n onMetricSelect,\r\n currentDateRange,\r\n comparisonDateRange,\r\n renderFluctuationPopup,\r\n } = props;\r\n const classes = useStyles();\r\n\r\n const columns = getColumns({\r\n selectedMetric,\r\n metricFormatter,\r\n currentDateRange,\r\n comparisonDateRange,\r\n renderFluctuationPopup,\r\n metrics,\r\n i18n,\r\n });\r\n\r\n const {\r\n getDataToDisplayFromSortedData,\r\n renderPagination,\r\n state: paginationState,\r\n } = usePaginationConfig({\r\n data,\r\n i18n,\r\n isLoading,\r\n });\r\n\r\n const dataToDisplay = useMemo(() => getDataToDisplayFromSortedData(data), [getDataToDisplayFromSortedData, data]);\r\n\r\n const maxChange = useMemo(() => _.max(_.map(data, item => Math.abs(item.PerformanceMetricsChange[selectedMetric]))) || 0, [data, selectedMetric]);\r\n\r\n if (isLoading || !paginationState?.initialized) {\r\n return ;\r\n }\r\n\r\n const comparisonText = getComparisonText(i18n, comparisonDateRange);\r\n\r\n return (\r\n
\r\n
\r\n \r\n \r\n {comparisonText}\r\n \r\n \r\n \r\n
\r\n {_.isEmpty(dataToDisplay) &&\r\n
\r\n
\r\n
\r\n
\r\n {i18n.getString(_TL_('No data available. '))}
\r\n
\r\n \r\n {i18n.getString(_TL_('To update the tile, select a different date range.'))}\r\n \r\n \r\n {i18n.getString(_TL_('If the tile remains blank, your account might have no data.'))}\r\n \r\n
\r\n
\r\n }\r\n {!_.isEmpty(dataToDisplay) &&\r\n item.Id}\r\n className={classNames('ba-top-changes-table', classes.grid)}\r\n >\r\n \r\n >\r\n {({ item, rowId }) => (\r\n key={rowId}>\r\n {({ renderCell, columnId }) => {\r\n const columnData = {\r\n ...item,\r\n href: getHref(`${item.Id}`, item.CampaignType),\r\n columnConfig: { columnId },\r\n getPopoverContent,\r\n entityType,\r\n maxChange,\r\n };\r\n return (\r\n \r\n {renderCell(columnData)}\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\nOverviewTopChanges.defaultProps = {\r\n isLoading: false,\r\n data: [],\r\n footerButtonConfigs: null,\r\n getPopoverContent: undefined,\r\n};\r\n","export const getComparisonText = (i18n, comparisonDateRange) => {\r\n let comparisonDateRangeDateRangeText;\r\n let comparisonText;\r\n\r\n if (comparisonDateRange.rangeInDays <= 7) {\r\n comparisonText = i18n.getString(_TL_('last week'));\r\n } else {\r\n comparisonText = i18n.getString(_TL_('previous period'));\r\n }\r\n\r\n const formattedStart = i18n.formatDate(comparisonDateRange.start);\r\n const formattedEnd = i18n.formatDate(comparisonDateRange.end);\r\n\r\n if (formattedStart === formattedEnd) {\r\n comparisonDateRangeDateRangeText = `(${formattedStart})`;\r\n } else {\r\n comparisonDateRangeDateRangeText = `(${formattedStart} - ${formattedEnd})`;\r\n }\r\n\r\n if (comparisonDateRange.key === 'customPeriod') {\r\n comparisonText = '';\r\n }\r\n\r\n return `${i18n.getString(_TL_('Compared to '))}${comparisonText} ${comparisonDateRangeDateRangeText}`;\r\n};\r\n","import classNames from 'classnames';\r\nimport React from 'react';\r\nimport { Shimmer, ShimmerElementType } from '@fluentui/react';\r\nimport { makeStyles } from '@fluentui/react-components';\r\n\r\nconst rowElement = [{ type: ShimmerElementType.line, height: 32 }];\r\nconst buttonElement = [\r\n { type: ShimmerElementType.line, height: 32, width: '25%' },\r\n { type: ShimmerElementType.gap, width: '60%' },\r\n { type: ShimmerElementType.line, height: 16, width: '15%' },\r\n];\r\n\r\nconst useShimmerStyles = makeStyles({\r\n container: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n height: '100%',\r\n justifyContent: 'space-between',\r\n },\r\n});\r\n\r\nexport function LoadShimmer() {\r\n const styles = useShimmerStyles();\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","export const TIP_ID = {\r\n PROMO: 'promotion',\r\n ADD_PAYMENT: 'add_payment',\r\n CREATE_CAMPAIGN: 'create_campaign',\r\n COACHING: 'coaching',\r\n HELP: 'help',\r\n};\r\n","import React, { useMemo } from 'react';\r\nimport { Link } from 'react-router-dom';\r\nimport { Image } from '@fluentui/react-components';\r\nimport classNames from 'classnames';\r\nimport { ReactTemplate } from '@bingads-webui-react/react-template';\r\nimport { getRoutePathById, allSiteMap } from '@bingads-webui-react/with-site-map';\r\n\r\nimport { TIP_ID } from './consts';\r\n\r\nimport createCampaignImage from '../media/create-campaign.png';\r\nimport promoImage from '../media/promo.png';\r\nimport paymentImage from '../media/payment.png';\r\nimport coachingImage from '../media/coaching.png';\r\nimport helpImage from '../media/help.png';\r\n\r\nfunction getCreateCampaignText({ i18n, hasCoupon, scope }) {\r\n const href = `${getRoutePathById(allSiteMap, 'import-google')}?${scope.stringify()}`;\r\n const template = hasCoupon ? _TL_('Reach millions on the Microsoft Advertising Network. Start now by building your first campaign or {{importLink}}importing them directly from Google Ads{{/importLink}}. Once you do, you\\'ll unlock our promotional offer for new customers!') : _TL_('Reach millions on the Microsoft Advertising Network. Start now by building your first campaign or {{importLink}}importing them directly from Google Ads{{/importLink}}.');\r\n\r\n return (\r\n ({text}),\r\n }}\r\n template={i18n.getString(template)}\r\n />\r\n );\r\n}\r\n\r\nexport const useTipsConfig = ({\r\n showWelcomeMsg, isPaymentFirstTile, hasCoupon, name, i18n, styles, scope,\r\n}) => useMemo(() => ({\r\n [TIP_ID.PROMO]: {\r\n image: {i18n.getString(_TL_('Welcome,\r\n title: showWelcomeMsg ? i18n.getString(_TL_('Welcome to Microsoft Advertising, {{name}}!'), { name }) : i18n.getString(_TL_('{{name}}, you\\'re all set!'), { name }),\r\n text: i18n.getString(_TL_('Thanks for setting up your first campaign and your payment method! You\\'ve unlocked your promotional offer and are now closer to advertising credits. Visit the promotions page to see the status.')),\r\n },\r\n [TIP_ID.CREATE_CAMPAIGN]: {\r\n image: {i18n.getString(_TL_('Welcome,\r\n title: i18n.getString(_TL_('Welcome to Microsoft Advertising, {{name}}!'), { name }),\r\n text: getCreateCampaignText({ i18n, hasCoupon, scope }),\r\n },\r\n [TIP_ID.ADD_PAYMENT]: {\r\n image: {i18n.getString(_TL_('Add,\r\n title: showWelcomeMsg && isPaymentFirstTile ? i18n.getString(_TL_('Welcome to Microsoft Advertising, {{name}}!'), { name }) : i18n.getString(_TL_('Add a payment method')),\r\n text: i18n.getString(hasCoupon && isPaymentFirstTile ? _TL_('Be seen by millions on the Microsoft Advertising Network. But first, you\\'ll need to add a payment method for your advertising charges. Once you do, you\\'ll unlock our promotional offer for new customers!') : _TL_('Be seen by millions on the Microsoft Advertising Network. But first, you\\'ll need to add a payment method for your advertising charges.')),\r\n },\r\n [TIP_ID.COACHING]: {\r\n image: {i18n.getString(_TL_('Coaching'))},\r\n title: i18n.getString(_TL_('In it to win it')),\r\n text: i18n.getString(_TL_('Master the marketplace with a Microsoft Advertising coach who will help you plan, create, and improve your ad campaigns.')),\r\n },\r\n [TIP_ID.HELP]: {\r\n image: {i18n.getString(_TL_('Help'))},\r\n title: i18n.getString(_TL_('Need a lifeline?')),\r\n text: i18n.getString(_TL_('Find useful info in a flash on Microsoft Advertising Help. Support agents are also a call, a chat, and a tweet away to serve you.')),\r\n },\r\n}), [showWelcomeMsg, hasCoupon, i18n, isPaymentFirstTile, name, styles]);\r\n","import classNames from 'classnames';\r\nimport React, { useContext } from 'react';\r\nimport { Subtitle2, Body1, makeStyles } from '@fluentui/react-components';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\n\r\nimport { useTipsConfig } from './use-tips-config';\r\n\r\nconst useTipStyles = makeStyles({\r\n container: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n flexGrow: 1,\r\n },\r\n imageContainer: {\r\n flexGrow: 1,\r\n flexBasis: 0,\r\n maxHeight: '210px',\r\n width: '100%',\r\n overflowY: 'hidden',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n display: 'flex',\r\n backgroundImage: 'linear-gradient(to right, #E4E2F3, #E3EDF3)',\r\n },\r\n image: {\r\n maxHeight: '148px',\r\n },\r\n title: {\r\n marginTop: '16px',\r\n },\r\n});\r\n\r\nexport const Tip = ({\r\n tipId, showWelcomeMsg, isPaymentFirstTile, hasCoupon, name, i18n,\r\n}: { tipId: string, showWelcomeMsg: boolean, isPaymentFirstTile: boolean, hasCoupon: boolean, name: string, i18n: any }) => {\r\n const styles = useTipStyles();\r\n const { scope } = useContext(ScopeContext) as any;\r\n\r\n const config = useTipsConfig({\r\n showWelcomeMsg, isPaymentFirstTile, hasCoupon, name, i18n, styles, scope,\r\n });\r\n\r\n return (\r\n
\r\n
\r\n {config[tipId].image}\r\n
\r\n {config[tipId].title}\r\n {config[tipId].text}\r\n
\r\n );\r\n};\r\n","import _ from 'underscore';\r\nimport { useMemo, useContext } from 'react';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { getRoutePathById, allSiteMap } from '@bingads-webui-react/with-site-map';\r\n\r\nimport { TIP_ID } from './consts';\r\n\r\nexport const useActionButtons = ({\r\n serverContext, getLocalizedSupportLink, i18n, hasPaymentPermission, isPaymentFirstTile, hasCoupon, showWelcomeMsg,\r\n}) => {\r\n const { scope } = useContext(ScopeContext) as any;\r\n\r\n return useMemo(() => {\r\n const ccBaseUrlNoTrailingSlash = _.get(serverContext, ['Urls', 'ClientCenterBaseUrl'], '').replace(/\\/$/, '');\r\n return ({\r\n [TIP_ID.PROMO]: [{\r\n text: i18n.getString(_TL_('See promotional offers')),\r\n onClick: () => scope.save(`${ccBaseUrlNoTrailingSlash}${getRoutePathById(allSiteMap, 'coupon')}`),\r\n analyticsId: 'welcome-coupon-status',\r\n }],\r\n [TIP_ID.CREATE_CAMPAIGN]: [{\r\n text: i18n.getString(_TL_('Create campaign')),\r\n onClick: () => scope.save(getRoutePathById(allSiteMap, 'campaign-create-objective')),\r\n analyticsId: hasCoupon ? 'welcome-create-campaign-coupon' : 'welcome-create-campaign',\r\n }],\r\n [TIP_ID.ADD_PAYMENT]: [{\r\n text: i18n.getString(_TL_('Do this now')),\r\n onClick: () => {\r\n if (!hasPaymentPermission) {\r\n return;\r\n }\r\n scope.set({ ...scope.values, showTaxForm: false });\r\n scope.save(`${ccBaseUrlNoTrailingSlash}${getRoutePathById(allSiteMap, 'paymentMethods')}`);\r\n },\r\n analyticsId: showWelcomeMsg && isPaymentFirstTile ? 'welcome-add-payment-first' : 'welcome-add-payment-second',\r\n }],\r\n [TIP_ID.COACHING]: [{\r\n text: i18n.getString(_TL_('Learn more')),\r\n onClick: () => scope.save(getLocalizedSupportLink({\r\n Culture: serverContext.CurrentLocale,\r\n }).coachingLink),\r\n analyticsId: 'welcome-onboarding-consultation',\r\n }],\r\n [TIP_ID.HELP]: [{\r\n text: i18n.getString(_TL_('Learn more')),\r\n onClick: () => { },\r\n analyticsId: 'welcome-help',\r\n helpId: 'ext51022',\r\n }],\r\n });\r\n }, [i18n, hasCoupon, showWelcomeMsg, isPaymentFirstTile, scope, hasPaymentPermission, getLocalizedSupportLink, serverContext]);\r\n};\r\n","import React, { memo, FC, useMemo } from 'react';\r\nimport {\r\n makeStyles,\r\n} from '@fluentui/react-components';\r\nimport classNames from 'classnames';\r\nimport { OverviewCardFooter, usePaginationConfig } from '@bingads-webui-campaign-react/overview-card-footer';\r\n\r\nimport { LoadShimmer } from './load-shimmer';\r\nimport { Tip } from './tip';\r\nimport { useActionButtons } from './use-action-buttons';\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n height: '100%',\r\n },\r\n});\r\n\r\ninterface IOverviewWelcomeTipsProps {\r\n isLoading?: boolean;\r\n pages: string[];\r\n hasPaymentPermission: boolean;\r\n showWelcomeMsg: boolean;\r\n isPaymentFirstTile: boolean;\r\n hasCoupon: boolean\r\n name: string;\r\n serverContext: any;\r\n getLocalizedSupportLink: Function;\r\n i18n: any;\r\n}\r\n\r\nexport const OverviewWelcomeTips: FC = memo((props: IOverviewWelcomeTipsProps) => {\r\n const {\r\n isLoading,\r\n pages,\r\n hasPaymentPermission,\r\n showWelcomeMsg,\r\n isPaymentFirstTile,\r\n hasCoupon,\r\n name,\r\n serverContext,\r\n getLocalizedSupportLink,\r\n i18n,\r\n } = props;\r\n const classes = useStyles();\r\n\r\n const {\r\n state,\r\n renderPagination,\r\n } = usePaginationConfig({\r\n data: pages,\r\n pageSize: 1,\r\n i18n,\r\n });\r\n\r\n const actionButtons = useActionButtons({\r\n i18n, getLocalizedSupportLink, serverContext, hasPaymentPermission, isPaymentFirstTile, hasCoupon, showWelcomeMsg,\r\n });\r\n const footerButtonConfigs = useMemo(() => (actionButtons[pages[state.current - 1]]), [actionButtons, pages, state]);\r\n\r\n if (isLoading || state.current < 1) {\r\n return ;\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n );\r\n});\r\n\r\nOverviewWelcomeTips.defaultProps = {\r\n isLoading: false,\r\n};\r\n","import { makeStyles, shorthands, tokens } from '@fluentui/react-components';\r\nimport circleSolid from '../../media/chart/CircleSolid.svg';\r\nimport circleDotted from '../../media/chart/CircleDotted.svg';\r\nimport diamondSolid from '../../media/chart/DiamondSolid.svg';\r\nimport diamondDotted from '../../media/chart/DiamondDotted.svg';\r\nimport triangleDownSolid from '../../media/chart/TriangleDownSolid.svg';\r\nimport triangleDownDotted from '../../media/chart/TriangleDownDotted.svg';\r\nimport triangleUpSolid from '../../media/chart/TriangleUpSolid.svg';\r\nimport triangleUpDotted from '../../media/chart/TriangleUpDotted.svg';\r\n\r\nconst metricPickerBorderColor = [\r\n '#2e76bc',\r\n '#022F22',\r\n '#e2068c',\r\n '#4a0b3f',\r\n];\r\n\r\nconst getMetricPickerBorderStyle = column => ({\r\n ...shorthands.border('1px', 'solid', metricPickerBorderColor[column]),\r\n});\r\n\r\nexport const useStyles = makeStyles({\r\n metricPickerItem: {\r\n display: 'flex',\r\n flexGrow: 1,\r\n flexBasis: 0,\r\n flexDirection: 'column',\r\n ...shorthands.borderRadius('4px'),\r\n ...shorthands.border('1px', 'solid', tokens.colorNeutralStroke1),\r\n minWidth: '1px',\r\n alignItems: 'stretch',\r\n justifyContent: 'flex-start',\r\n height: '70px',\r\n maxWidth: '160px',\r\n boxSizing: 'border-box',\r\n '&.ba-pc-metric-picker-item-size-s': {\r\n width: '100%',\r\n maxWidth: 'unset',\r\n flexBasis: 'unset',\r\n },\r\n '&.ba-pc-metric-picker-item-size-m': {\r\n width: 'calc((100% - 12px) / 2)',\r\n maxWidth: 'unset',\r\n flexBasis: 'unset',\r\n },\r\n '&.ba-pc-metric-picker-item-index-0': {\r\n '& .original-marker': {\r\n backgroundImage: `url(\"${circleSolid}\")`,\r\n },\r\n '& .comparison-marker': {\r\n backgroundImage: `url(\"${circleDotted}\")`,\r\n },\r\n ...getMetricPickerBorderStyle(0),\r\n },\r\n '&.ba-pc-metric-picker-item-index-1': {\r\n '& .original-marker': {\r\n backgroundImage: `url(\"${diamondSolid}\")`,\r\n },\r\n '& .comparison-marker': {\r\n backgroundImage: `url(\"${diamondDotted}\")`,\r\n },\r\n ...getMetricPickerBorderStyle(1),\r\n },\r\n '&.ba-pc-metric-picker-item-index-2': {\r\n '& .original-marker': {\r\n backgroundImage: `url(\"${triangleDownSolid}\")`,\r\n },\r\n '& .comparison-marker': {\r\n backgroundImage: `url(\"${triangleDownDotted}\")`,\r\n },\r\n ...getMetricPickerBorderStyle(2),\r\n },\r\n '&.ba-pc-metric-picker-item-index-3': {\r\n '& .original-marker': {\r\n backgroundImage: `url(\"${triangleUpSolid}\")`,\r\n },\r\n '& .comparison-marker': {\r\n backgroundImage: `url(\"${triangleUpDotted}\")`,\r\n },\r\n ...getMetricPickerBorderStyle(3),\r\n },\r\n },\r\n dropdown: {\r\n ...shorthands.flex(0, 0, 'auto'),\r\n alignSelf: 'stretch',\r\n },\r\n pickerName: {\r\n ...shorthands.overflow('hidden'),\r\n fontSize: '14px',\r\n height: '19px',\r\n whiteSpace: 'nowrap',\r\n textOverflow: 'ellipsis',\r\n },\r\n dropdownTriggerButton: {\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n width: '100%',\r\n ...shorthands.padding('2px', '12px'),\r\n },\r\n\r\n toggleButton: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'flex-start',\r\n ...shorthands.padding('0px', '8px', '8px', '8px'),\r\n },\r\n pickerValue: {\r\n display: 'block',\r\n alignItems: 'center',\r\n ...shorthands.overflow('hidden'),\r\n whiteSpace: 'nowrap',\r\n textOverflow: 'ellipsis',\r\n color: '#797775',\r\n fontSize: '24px',\r\n fontWeight: '600',\r\n },\r\n imageIndicator: {\r\n ...shorthands.flex(0, 0, 'auto'),\r\n display: 'flex',\r\n minWidth: '14px',\r\n height: '27px',\r\n },\r\n marker: {\r\n backgroundRepeat: 'no-repeat',\r\n width: '14px',\r\n height: '27px',\r\n backgroundPositionX: 'center',\r\n backgroundPositionY: 'center',\r\n backgroundSize: 'contain',\r\n ...shorthands.flex(0, 0, 'auto'),\r\n },\r\n});\r\n","import React, { useMemo } from 'react';\r\nimport classNames from 'classnames';\r\nimport {\r\n Tooltip,\r\n Button,\r\n Menu,\r\n MenuTrigger,\r\n MenuPopover,\r\n MenuList,\r\n MenuItem,\r\n Text,\r\n} from '@fluentui/react-components';\r\nimport { ChevronDown20Regular } from '@fluentui/react-icons';\r\nimport { TooltipHost } from '@fluentui/react';\r\nimport { Glyphicon } from '@bingads-webui-react/primitive-unthemed';\r\nimport { ResponsiveSize } from '@bingads-webui-campaign-react/pmax-overview-responsive-utils';\r\n\r\nimport { useStyles } from '../styles/metric-picker-item';\r\n\r\nexport interface IMetricPickerItemProps {\r\n isSelected: boolean;\r\n index: number;\r\n displayName: string;\r\n total: string;\r\n i18n: any;\r\n hideCurrency: boolean;\r\n dropdownMetrics: Array<{\r\n key: string,\r\n displayName: string,\r\n }>;\r\n isComparisonEnabled: boolean;\r\n responsiveSize: ResponsiveSize;\r\n onMetricToggle: () => void;\r\n onMetricDropdownSelect: (key: string) => void;\r\n}\r\n\r\nexport function MetricPickerItem(props: IMetricPickerItemProps) {\r\n const {\r\n isSelected,\r\n index,\r\n displayName,\r\n total,\r\n i18n,\r\n hideCurrency,\r\n dropdownMetrics,\r\n isComparisonEnabled = false,\r\n responsiveSize,\r\n onMetricToggle,\r\n onMetricDropdownSelect,\r\n } = props;\r\n const classes = useStyles();\r\n const dropdownItems = useMemo(() => dropdownMetrics.map((metric) => {\r\n const handleDropdownSelect = () => onMetricDropdownSelect(metric.key);\r\n return (\r\n \r\n {metric.displayName}\r\n \r\n );\r\n }), [dropdownMetrics, onMetricDropdownSelect]);\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 {dropdownItems}\r\n \r\n \r\n \r\n
\r\n \r\n {(['Spend', 'Revenue', 'Avg. CPC', 'CPA'].includes(displayName) && hideCurrency) && (\r\n \r\n \r\n \r\n )}\r\n\r\n
\r\n {isSelected &&\r\n <>\r\n
\r\n {isComparisonEnabled &&
}\r\n \r\n }\r\n
\r\n \r\n \r\n {total}\r\n \r\n \r\n \r\n
\r\n );\r\n}\r\n","import React from 'react';\r\nimport { Shimmer, ShimmerElementType, ThemeProvider, mergeStyles } from '@fluentui/react';\r\n\r\nconst wrapperClass = mergeStyles({\r\n padding: 2,\r\n selectors: {\r\n '& > .ms-Shimmer-container': {\r\n margin: '10px 0',\r\n },\r\n },\r\n});\r\n\r\nconst shimmerWithElement = [\r\n { type: ShimmerElementType.line, height: 80, width: 160 },\r\n { type: ShimmerElementType.gap, width: 12 },\r\n { type: ShimmerElementType.line, height: 80, width: 160 },\r\n { type: ShimmerElementType.gap, width: 12 },\r\n { type: ShimmerElementType.line, height: 80, width: 160 },\r\n { type: ShimmerElementType.gap, width: 12 },\r\n { type: ShimmerElementType.line, height: 80, width: 160 },\r\n];\r\n\r\nexport function MetricPickerShimmer() {\r\n return (\r\n \r\n \r\n \r\n );\r\n}\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useStyles = makeStyles({\r\n metricPicker: {\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n ...shorthands.gap('12px'),\r\n },\r\n});\r\n","import React, { useMemo } from 'react';\r\nimport classNames from 'classnames';\r\nimport _ from 'underscore';\r\n\r\nimport { ResponsiveSize } from '@bingads-webui-campaign-react/pmax-overview-responsive-utils';\r\n\r\nimport { MetricPickerItem } from './metric-picker-item';\r\nimport { MetricPickerShimmer } from './metric-picker-shimmer';\r\nimport { useStyles } from '../styles/metric-picker';\r\n\r\nexport interface IMetricPickerProps {\r\n selectedMetricIndexes: number[];\r\n visibleMetrics: string[];\r\n allMetrics: Array<{\r\n key: string,\r\n displayName: string,\r\n total: string,\r\n }>;\r\n isComparisonEnabled: boolean;\r\n responsiveSize: ResponsiveSize;\r\n i18n: any;\r\n hideCurrency: boolean;\r\n onMetricUpdate: (selectedMetricIndexes: number[], visibleMetrics: string[]) => void;\r\n}\r\n\r\nexport function MetricPicker(props: IMetricPickerProps) {\r\n const {\r\n visibleMetrics,\r\n selectedMetricIndexes,\r\n allMetrics = [],\r\n isComparisonEnabled = false,\r\n responsiveSize,\r\n i18n,\r\n hideCurrency,\r\n onMetricUpdate,\r\n } = props;\r\n\r\n const dropdownMetrics = allMetrics.filter(metric => !visibleMetrics.includes(metric.key));\r\n const classes = useStyles();\r\n\r\n const items = useMemo(() => visibleMetrics.map((metric, index) => {\r\n const isSelected = selectedMetricIndexes.includes(index);\r\n const onMetricToggle = () => {\r\n const newSelectedMetricIndexes = isSelected\r\n ? selectedMetricIndexes.filter(i => i !== index)\r\n : [...selectedMetricIndexes, index].sort((a, b) => a - b);\r\n onMetricUpdate(newSelectedMetricIndexes, visibleMetrics);\r\n };\r\n const onMetricDropdownSelect = (key: string) => {\r\n const newVisibleMetrics = [...visibleMetrics];\r\n newVisibleMetrics[index] = key;\r\n onMetricUpdate(selectedMetricIndexes, newVisibleMetrics);\r\n };\r\n const displayName = allMetrics.find(m => m.key === metric)?.displayName;\r\n const total = allMetrics.find(m => m.key === metric)?.total;\r\n\r\n return (\r\n \r\n );\r\n }), [allMetrics, dropdownMetrics, isComparisonEnabled, onMetricUpdate, selectedMetricIndexes, visibleMetrics, responsiveSize]);\r\n\r\n if (_.isEmpty(allMetrics)) {\r\n return ;\r\n }\r\n\r\n return (\r\n
\r\n {items}\r\n
\r\n );\r\n}\r\n\r\n","import { makeStyles, shorthands, tokens } from '@fluentui/react-components';\r\n\r\nexport const useStyles = makeStyles({\r\n container: {\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n height: '100%',\r\n ...shorthands.borderTop('1px', 'solid', tokens.colorNeutralStroke1),\r\n ...shorthands.margin('0', '23px'),\r\n },\r\n});\r\n","import React from 'react';\r\nimport classNames from 'classnames';\r\nimport {\r\n Text,\r\n} from '@fluentui/react-components';\r\n\r\nimport { useStyles } from '../styles/no-data';\r\n\r\nexport function NoData({ i18n, showErrorText } : {\r\n i18n: { getString: (key: string) => string },\r\n showErrorText?: boolean,\r\n}) {\r\n const classes = useStyles();\r\n return (\r\n
\r\n
\r\n {showErrorText &&\r\n {i18n.getString(_TL_('There has been an error retrieving data for this chart. Try refreshing the page.'))}\r\n }\r\n {!showErrorText &&\r\n <>\r\n {i18n.getString(_TL_('No data available.'))}\r\n {i18n.getString(_TL_('To update the graph, select a different date range. If the graph remains blank, your account might have no data.'))}\r\n \r\n }\r\n
\r\n
\r\n );\r\n}\r\n\r\nNoData.defaultProps = {\r\n showErrorText: false,\r\n};\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nimport circleSolid from '../../media/chart/CircleSolid.svg';\r\nimport circleDotted from '../../media/chart/CircleDotted.svg';\r\nimport diamondSolid from '../../media/chart/DiamondSolid.svg';\r\nimport diamondDotted from '../../media/chart/DiamondDotted.svg';\r\nimport triangleDownSolid from '../../media/chart/TriangleDownSolid.svg';\r\nimport triangleDownDotted from '../../media/chart/TriangleDownDotted.svg';\r\nimport triangleUpSolid from '../../media/chart/TriangleUpSolid.svg';\r\nimport triangleUpDotted from '../../media/chart/TriangleUpDotted.svg';\r\n\r\nexport const useStyles = makeStyles({\r\n cardContent: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n ...shorthands.gap('12px'),\r\n\r\n '& .highcharts-tooltip': {\r\n '& .highcharts-label-box.highcharts-tooltip-box': {\r\n opacity: 0,\r\n },\r\n '& > span': {\r\n zIndex: 1,\r\n },\r\n '& .perf-graph-tool-tip': {\r\n display: 'flex',\r\n boxShadow: '0 3.2px 7.2px 0 rgba(0,0,0,.132), 0 0.6px 1.8px 0 rgba(0,0,0,.108)',\r\n backgroundColor: 'rgba(255, 255, 255, 0.95)',\r\n '@supports (backdrop-filter: blur(60px))': {\r\n backdropFilter: 'blur(60px)',\r\n },\r\n '& .charts-tooltip': {\r\n ...shorthands.margin('15px'),\r\n\r\n '& .tool-tip-title': {\r\n marginBottom: '10px',\r\n },\r\n '& .tool-tip-properties': {\r\n display: 'grid',\r\n '& .tool-tip-property:nth-child(1)': {\r\n '-ms-grid-row': '1',\r\n gridRowStartStart: '1',\r\n '-ms-grid-column': '1',\r\n gridColumnStartStart: '1',\r\n marginRight: '30px',\r\n },\r\n '& .tool-tip-property:nth-child(2)': {\r\n '-ms-grid-row': '1',\r\n gridRowStart: '1',\r\n '-ms-grid-column': '2',\r\n gridColumnStart: '2',\r\n },\r\n '& .tool-tip-property:nth-child(3)': {\r\n '-ms-grid-row': '2',\r\n gridRowStart: '2',\r\n '-ms-grid-column': '1',\r\n gridColumnStart: '1',\r\n marginRight: '30px',\r\n marginTop: '10px',\r\n },\r\n '& .tool-tip-property:nth-child(4)': {\r\n '-ms-grid-row': '2',\r\n gridRowStart: '2',\r\n '-ms-grid-column': '2',\r\n gridColumnStart: '2',\r\n marginTop: '10px',\r\n },\r\n '& .tool-tip-property': {\r\n display: 'flex',\r\n\r\n '& .tool-tip-icon': {\r\n backgroundRepeat: 'no-repeat',\r\n width: '14px',\r\n height: '40px',\r\n backgroundPositionX: 'center',\r\n backgroundPositionY: 'center',\r\n backgroundSize: 'contain',\r\n marginRight: '15px',\r\n },\r\n '& .circle-solid': {\r\n backgroundImage: `url(\"${circleSolid}\")`,\r\n },\r\n '& .circle-shortdash': {\r\n backgroundImage: `url(\"${circleDotted}\")`,\r\n },\r\n '& .diamond-solid': {\r\n backgroundImage: `url(\"${diamondSolid}\")`,\r\n },\r\n '& .diamond-shortdash': {\r\n backgroundImage: `url(\"${diamondDotted}\")`,\r\n },\r\n '& .triangle-down-solid': {\r\n backgroundImage: `url(\"${triangleDownSolid}\")`,\r\n },\r\n '& .triangle-down-shortdash': {\r\n backgroundImage: `url(\"${triangleDownDotted}\")`,\r\n },\r\n '& .triangle-solid': {\r\n backgroundImage: `url(\"${triangleUpSolid}\")`,\r\n },\r\n '& .triangle-shortdash': {\r\n backgroundImage: `url(\"${triangleUpDotted}\")`,\r\n },\r\n\r\n '& .tool-tip-details': {\r\n\r\n '& .tool-tip-value': {\r\n fontSize: '16px',\r\n },\r\n },\r\n },\r\n },\r\n },\r\n },\r\n\r\n '& .perf-graph-tool-tip.pop': {\r\n '& .charts-tooltip': {\r\n ...shorthands.margin('15px'),\r\n\r\n '& .tool-tip-properties': {\r\n display: 'block',\r\n\r\n '& .tool-tip-property + .tool-tip-property': {\r\n marginTop: '20px',\r\n },\r\n\r\n '& .tool-tip-property': {\r\n display: 'flex',\r\n marginRight: '0px !important',\r\n },\r\n },\r\n },\r\n },\r\n },\r\n\r\n '& .highcharts-xaxis-labels+.highcharts-xaxis-labels': {\r\n marginTop: '-22px',\r\n },\r\n },\r\n chartContainer: {\r\n height: '225px',\r\n fontSize: '12px',\r\n '& [data-highcharts-chart]': {\r\n ...shorthands.overflow('visible !important'),\r\n '& .highcharts-container': {\r\n ...shorthands.overflow('visible !important'),\r\n zIndex: 'auto !important', // Fix for the tooltip hidden behind the tile below\r\n '& .highcharts-root': {\r\n ...shorthands.overflow('visible'),\r\n },\r\n },\r\n },\r\n },\r\n spinner: {\r\n marginTop: '70px',\r\n },\r\n});\r\n","import _ from 'underscore';\r\nimport { formatMetric } from '@bingads-webui-campaign-legacy/performance-metric-formatter/index';\r\n\r\nimport tooltipTemplateVNext from './tooltip-template-ui-next.pug';\r\n\r\nfunction formatPoint(point, options) {\r\n return formatMetric(point.series.options.category, point.y, options);\r\n}\r\n\r\nexport function formatTooltip({\r\n points,\r\n hideCurrency,\r\n}) {\r\n const originalPoints = [];\r\n const comparativePoints = [];\r\n\r\n _.each(points, (point) => {\r\n if (point.series.options.isOriginal) {\r\n originalPoints.push(point);\r\n } else if (point.series.options.isComparison) {\r\n comparativePoints.push(point);\r\n }\r\n });\r\n\r\n const tooltip = tooltipTemplateVNext;\r\n const originalPointsTooltip = _.isEmpty(originalPoints) ?\r\n '' :\r\n tooltip({\r\n title: originalPoints[0].key,\r\n points: originalPoints,\r\n formatPoint,\r\n formatOption: { hideCurrency },\r\n });\r\n\r\n const comparativePointsTooltip = _.isEmpty(comparativePoints) ?\r\n '' :\r\n tooltip({\r\n // we don't have moving average config for overview performance card\r\n title: comparativePoints[0].key,\r\n points: comparativePoints,\r\n formatPoint,\r\n formatOption: { hideCurrency },\r\n });\r\n\r\n const havePop = !_.isEmpty(comparativePoints);\r\n const className = havePop ? 'perf-graph-tool-tip pop' : 'perf-graph-tool-tip';\r\n\r\n return `
${originalPointsTooltip}${comparativePointsTooltip}
`;\r\n}\r\n","const originalPrimary = '#01188F';\r\nconst comparativePrimary = '#808CC7'; // 50% mix of originalPrimary and white\r\nconst originalSecondary = '#B40091';\r\nconst comparativeSecondary = '#D980C8'; // 50% mix of originalSecondary and white\r\nconst originalTertiary = '#006D21';\r\nconst comparativeTertiary = '#80B690'; // 50% mix of originalTertiary and white\r\nconst originalQuaternary = '#0078D7';\r\nconst comparativeQuaternary = '#8CC2ED'; // 50% mix of originalQuaternary and white\r\n\r\nexport const colors = [\r\n {\r\n original: originalPrimary,\r\n comparative: comparativePrimary,\r\n },\r\n {\r\n original: originalSecondary,\r\n comparative: comparativeSecondary,\r\n },\r\n {\r\n original: originalTertiary,\r\n comparative: comparativeTertiary,\r\n },\r\n {\r\n original: originalQuaternary,\r\n comparative: comparativeQuaternary,\r\n },\r\n];\r\n\r\nexport const primary = colors[0];\r\n\r\nexport const secondary = colors[1];\r\n\r\nexport const original = {\r\n primary: originalPrimary,\r\n secondary: originalSecondary,\r\n tertiary: originalTertiary,\r\n quaternary: originalQuaternary,\r\n};\r\n\r\nexport const comparative = {\r\n primary: comparativePrimary,\r\n secondary: comparativeSecondary,\r\n tertiary: comparativeTertiary,\r\n quaternary: comparativeQuaternary,\r\n};\r\n\r\nexport const uiNextColors = [\r\n {\r\n original: '#0078D4',\r\n comparative: '#0078D4',\r\n },\r\n {\r\n original: '#022F22',\r\n comparative: '#022F22',\r\n },\r\n {\r\n original: '#E3008C',\r\n comparative: '#E3008C',\r\n },\r\n {\r\n original: '#4B003F',\r\n comparative: '#4B003F',\r\n },\r\n];\r\n\r\nexport const uiNextOriginal = '#484644';\r\n\r\nexport const uiNextComparative = '#605e5c';\r\n","import { TAxisOptions } from '../types/types';\r\n\r\nexport const symbols = [\r\n 'circle',\r\n 'diamond',\r\n 'triangle-down',\r\n 'triangle',\r\n];\r\n\r\nexport const gridLineStyle: TAxisOptions = {\r\n gridLineDashStyle: 'Solid',\r\n gridLineColor: '#E1DFDD',\r\n tickPixelInterval: 150,\r\n};\r\n","import _ from 'underscore';\r\nimport { get } from 'lodash';\r\nimport { useMemo } from 'react';\r\nimport { fromLegacyTimeZone, toIANATimeZone } from '@bingads-webui-universal/time-zone-converter';\r\n\r\nimport { uiNextColors } from '../styles/color';\r\nimport { symbols } from '../styles/line';\r\n\r\nexport interface IDataPoint {\r\n DateTime: string;\r\n Value: number;\r\n}\r\nexport interface IDataPointWithDate {\r\n DateTime: Date;\r\n Value: number;\r\n}\r\nexport interface IPerformanceTimeSeries {\r\n UniqueId: string;\r\n MetricName: string;\r\n PrimaryDataPoints: IDataPoint[];\r\n ComparisonDataPoints: IDataPoint[];\r\n}\r\n\r\ninterface ISeriesWithDate {\r\n MetricName: string;\r\n PrimaryDataPoints: Array;\r\n ComparisonDataPoints: Array;\r\n}\r\n\r\nfunction parseAPIDate(date, i18n, ianaTimeZone) {\r\n const parser = i18n.dateParser({\r\n raw: 'yyyy-MM-ddTHH:mm:ss',\r\n timeZone: ianaTimeZone,\r\n });\r\n\r\n return parser(date.substr(0, 19));\r\n}\r\n\r\n\r\nfunction transformPoints(points, i18n, ianaTimeZone): IDataPointWithDate[] {\r\n return points.map(({ DateTime, Value }) => {\r\n const parsedDate = parseAPIDate(DateTime, i18n, ianaTimeZone);\r\n return {\r\n DateTime: parsedDate,\r\n Value,\r\n };\r\n });\r\n}\r\n\r\nfunction getSeriesWithDate(performanceTimeSeries: IPerformanceTimeSeries[], i18n, ianaTimeZone): ISeriesWithDate[] {\r\n return performanceTimeSeries.map(({ MetricName, PrimaryDataPoints, ComparisonDataPoints }) => ({\r\n MetricName,\r\n PrimaryDataPoints: transformPoints(PrimaryDataPoints, i18n, ianaTimeZone),\r\n ComparisonDataPoints: transformPoints(ComparisonDataPoints, i18n, ianaTimeZone),\r\n }));\r\n}\r\n\r\nconst mismatches = {\r\n Spend: 'Spent',\r\n CTR: 'ClickThruRate',\r\n};\r\n\r\nfunction coerceMetric(metric) {\r\n return get(mismatches, metric, metric);\r\n}\r\n\r\nconst granularityOptions = {\r\n Hour: { datetime: 'short' },\r\n Day: { skeleton: 'yMEd' },\r\n // Week: { skeleton: 'MMMMW' },\r\n Week: { skeleton: 'yMMMd' }, // temporal fix for CLDR breaking change\r\n Month: { skeleton: 'yMMM' },\r\n Quarter: { skeleton: 'yQQQ' },\r\n};\r\n\r\n\r\nfunction formatDate(timestamp, granularity, i18n, TimeZone): string {\r\n const options = granularityOptions[granularity];\r\n\r\n if (timestamp && options) {\r\n const formattedDate = i18n.formatDate(new Date(timestamp), _.extend({\r\n timeZone: toIANATimeZone(fromLegacyTimeZone(TimeZone)),\r\n }, granularityOptions[granularity]));\r\n\r\n return granularity === 'Week' ? i18n.getString(_TL_('Week of {{date}}'), {\r\n date: formattedDate,\r\n }) : formattedDate;\r\n }\r\n\r\n return '';\r\n}\r\n\r\nfunction highchartsPoints(points: Array<{ DateTime: Date, Value: number }>, granularity: string, i18n, TimeZone: number): Array<[string, number]> {\r\n return points.map(point => [formatDate(point.DateTime.getTime(), granularity, i18n, TimeZone), point.Value]);\r\n}\r\n\r\n\r\nexport interface ISeries {\r\n category: string;\r\n name: string;\r\n isOriginal?: boolean;\r\n isComparison?: boolean;\r\n color: string;\r\n data: Array<[string, number]>;\r\n lineWidth: number;\r\n dashStyle: string;\r\n marker: {\r\n enabled: boolean;\r\n fillColor: string;\r\n lineColor: string;\r\n lineWidth: number;\r\n radius: number;\r\n symbol: string;\r\n };\r\n yAxis: number;\r\n xAxis?: number;\r\n}\r\n\r\nfunction highchartsSeries(series: ISeriesWithDate[], metric, metricDisplayName, colors, symbol, granularity, i18n, TimeZone) : ISeries[] {\r\n if (_.isEmpty(metric) || metric === 'None') {\r\n return [];\r\n }\r\n\r\n const { PrimaryDataPoints, ComparisonDataPoints } = _.find(series, ({ MetricName }) => MetricName === coerceMetric(metric)) || {};\r\n const category = metric;\r\n\r\n const marker = {\r\n enabled: true,\r\n fillColor: colors.original,\r\n lineColor: '#FFFFFF',\r\n lineWidth: 2,\r\n radius: 6,\r\n symbol,\r\n };\r\n\r\n return [\r\n ..._.isEmpty(PrimaryDataPoints) ? [] : [{\r\n category,\r\n name: metricDisplayName,\r\n isOriginal: true,\r\n color: colors.original,\r\n data: highchartsPoints(PrimaryDataPoints, granularity, i18n, TimeZone),\r\n lineWidth: 2,\r\n dashStyle: 'Solid',\r\n marker,\r\n yAxis: 0,\r\n }],\r\n ..._.isEmpty(ComparisonDataPoints) ? [] : [{\r\n category,\r\n name: metricDisplayName,\r\n isComparison: true,\r\n color: colors.comparative,\r\n data: highchartsPoints(ComparisonDataPoints, granularity, i18n, TimeZone),\r\n lineWidth: 2,\r\n dashStyle: 'ShortDash',\r\n marker,\r\n xAxis: 1,\r\n yAxis: 0,\r\n }],\r\n ];\r\n}\r\n\r\nexport function useChartData({\r\n performanceTimeSeries,\r\n i18n,\r\n selectedMetricIndexes,\r\n visibleMetrics,\r\n visibleMetricsDisplayNames,\r\n granularity,\r\n TimeZone,\r\n}: {\r\n performanceTimeSeries: IPerformanceTimeSeries[];\r\n i18n: any;\r\n selectedMetricIndexes: number[];\r\n visibleMetrics: string[];\r\n visibleMetricsDisplayNames: string[];\r\n granularity: string;\r\n TimeZone: number;\r\n}) : ISeries[] {\r\n const result = useMemo(() => {\r\n const ianaTimeZone = toIANATimeZone(fromLegacyTimeZone(TimeZone));\r\n const seriesWithDate = getSeriesWithDate(performanceTimeSeries, i18n, ianaTimeZone);\r\n\r\n const chartSeries = _.map(selectedMetricIndexes, (metricIndex, index) => {\r\n const colors = uiNextColors;\r\n const symbol = symbols[metricIndex];\r\n const series = highchartsSeries(seriesWithDate, visibleMetrics[metricIndex], visibleMetricsDisplayNames[metricIndex], colors[metricIndex], symbol, granularity, i18n, TimeZone);\r\n\r\n _.each(series, (data) => {\r\n // eslint-disable-next-line no-param-reassign\r\n data.yAxis = index;\r\n });\r\n return series;\r\n });\r\n\r\n return _.flatten(chartSeries);\r\n }, [performanceTimeSeries, i18n, selectedMetricIndexes, visibleMetrics, visibleMetricsDisplayNames, granularity, TimeZone]);\r\n\r\n return result;\r\n}\r\n","import { TAxisOptions } from '../types/types';\r\n\r\nconst xAxis: TAxisOptions[] = [\r\n {\r\n title: {\r\n text: '',\r\n },\r\n visible: true,\r\n type: 'datetime',\r\n lineWidth: 1,\r\n lineColor: '#DEE0E3',\r\n labels: {\r\n enabled: false,\r\n },\r\n showFirstLabel: true,\r\n showLastLabel: false,\r\n tickLength: 0,\r\n plotBands: [],\r\n },\r\n {\r\n title: {\r\n text: '',\r\n },\r\n showFirstLabel: false,\r\n showLastLabel: false,\r\n visible: true,\r\n type: 'datetime',\r\n lineWidth: 1,\r\n labels: {\r\n enabled: false,\r\n },\r\n tickLength: 0,\r\n },\r\n];\r\n\r\nconst yAxis: TAxisOptions[] = [\r\n {\r\n title: {\r\n text: '',\r\n },\r\n tickPixelInterval: 30,\r\n gridLineDashStyle: 'Dash',\r\n visible: true,\r\n showFirstLabel: false,\r\n showLastLabel: false,\r\n opposite: false,\r\n min: undefined,\r\n max: undefined,\r\n tickInterval: undefined,\r\n },\r\n {\r\n title: {\r\n text: '',\r\n },\r\n tickPixelInterval: 30,\r\n gridLineDashStyle: 'Dash',\r\n visible: true,\r\n showFirstLabel: false,\r\n showLastLabel: false,\r\n opposite: true,\r\n },\r\n];\r\n\r\nexport const staticChartStyleOption = {\r\n title: {\r\n text: null,\r\n },\r\n xAxis,\r\n yAxis,\r\n tooltip: {\r\n crosshairs: [{\r\n width: 1,\r\n color: '#FF8C00',\r\n dashStyle: 'Dash',\r\n }],\r\n backgroundColor: '#ffffff',\r\n borderRadius: 0,\r\n borderColor: '#AAAAAA',\r\n borderWidth: 2,\r\n useHTML: true,\r\n shared: true,\r\n shadow: false,\r\n valueDecimals: 2,\r\n },\r\n\r\n chart: {\r\n // Do we need this for react highcharts?\r\n // renderTo: this.el,\r\n spacingTop: 0,\r\n spacingLeft: 0,\r\n spacingRight: 0,\r\n spacingBottom: 5,\r\n height: 235,\r\n },\r\n\r\n legend: {\r\n enabled: false,\r\n },\r\n\r\n credits: {\r\n enabled: false,\r\n },\r\n};\r\n","/* eslint-disable no-param-reassign */\r\nimport { useMemo } from 'react';\r\nimport _ from 'underscore';\r\nimport * as Highcharts from 'highcharts';\r\nimport { merge } from 'lodash';\r\nimport { formatMetric } from '@bingads-webui-campaign-legacy/performance-metric-formatter/index';\r\n\r\nimport { formatTooltip } from './formatter/format-tooltip';\r\nimport { useChartData, ISeries } from './use-chart-data';\r\nimport { staticChartStyleOption } from './static-options';\r\nimport { gridLineStyle } from '../styles/line';\r\nimport { style } from '../styles/chart';\r\nimport { uiNextComparative, uiNextOriginal } from '../styles/color';\r\nimport { TAxisLabelsFormatterContextObject, TAxisOptions } from '../types/types';\r\n\r\nexport function formatTickValue(metric, tickValue, tickInterval) {\r\n const interval = Math.abs(tickInterval);\r\n\r\n if (interval >= 1000) {\r\n // When tick interval is >= 1000, treat all y-axis values as whole numbers\r\n return formatMetric(metric, tickValue, {\r\n compact: 'short',\r\n maximumFractionDigits: metric === 'Spend' ? 0 : null,\r\n minimumFractionDigits: metric === 'Spend' ? 0 : null,\r\n });\r\n }\r\n\r\n if (Math.floor(interval) < interval) {\r\n // When tick interval is factional value, show the factional digits.\r\n return formatMetric(metric, tickValue, {\r\n maximumFractionDigits: 2,\r\n minimumFractionDigits: 2,\r\n });\r\n }\r\n\r\n return formatMetric(metric, tickValue, {\r\n maximumFractionDigits: metric === 'Spend' ? 0 : 2,\r\n minimumFractionDigits: 0,\r\n });\r\n}\r\n\r\nfunction getLabel(value, series: ISeries[], isOriginal) {\r\n const seriesLine: ISeries = _.find(series, line => line.isOriginal === isOriginal);\r\n\r\n return seriesLine.data[value][0];\r\n}\r\n\r\nfunction formatXAxisLabel({\r\n value,\r\n isFirst,\r\n isLast,\r\n chart,\r\n axis,\r\n series,\r\n}) {\r\n let clsModifier = 'normal';\r\n\r\n if (isFirst) {\r\n clsModifier = 'first';\r\n } else if (isLast && chart.yAxis[1]) {\r\n // only if second yAxis shows, right margin will be added for last label to align with the graph\r\n clsModifier = 'last';\r\n }\r\n\r\n const label = getLabel(value, series, axis.series[0].userOptions.isOriginal);\r\n return `${label}`;\r\n}\r\n\r\nfunction tickPositioner({\r\n dataMin,\r\n dataMax,\r\n}) {\r\n return [dataMin, Math.floor((dataMin + dataMax) / 2), dataMax];\r\n}\r\n\r\nconst chart = {\r\n style,\r\n};\r\n\r\nconst isAllLineValuesZero = line => _.every(line.data, point => point[1] === 0);\r\n\r\nexport function useChartViewOptions({\r\n i18n,\r\n selectedMetricIndexes,\r\n visibleMetrics,\r\n visibleMetricsDisplayNames,\r\n performanceTimeSeries,\r\n granularity,\r\n hideCurrency,\r\n TimeZone,\r\n}) {\r\n const chartSeries: ISeries[] = useChartData({\r\n performanceTimeSeries,\r\n i18n,\r\n selectedMetricIndexes,\r\n visibleMetrics,\r\n visibleMetricsDisplayNames,\r\n granularity,\r\n TimeZone,\r\n });\r\n\r\n const isAllValuesZero = useMemo(() => _.every(chartSeries, line => isAllLineValuesZero(line)), [chartSeries]);\r\n\r\n const hasMultipleXAxis = _.some(chartSeries, line => line.xAxis === 1);\r\n const hasMultipleYAxis = _.some(chartSeries, line => line.yAxis === 1);\r\n\r\n const xAxis: TAxisOptions[] = useMemo(() => ([{\r\n endOnTick: true,\r\n labels: {\r\n enabled: true,\r\n formatter(this: TAxisLabelsFormatterContextObject) {\r\n return formatXAxisLabel({\r\n value: this.value,\r\n isFirst: this.isFirst,\r\n isLast: this.isLast,\r\n chart: this.chart,\r\n axis: this.axis,\r\n series: chartSeries,\r\n });\r\n },\r\n style: {\r\n color: uiNextOriginal,\r\n },\r\n useHTML: true,\r\n },\r\n showFirstLabel: true,\r\n showLastLabel: true,\r\n startOnTick: true,\r\n tickPositioner(this: { dataMin: number, dataMax: number }) {\r\n return tickPositioner({\r\n dataMin: this.dataMin,\r\n dataMax: this.dataMax,\r\n });\r\n },\r\n }, {\r\n endOnTick: true,\r\n labels: {\r\n enabled: true,\r\n formatter(this: TAxisLabelsFormatterContextObject) {\r\n return formatXAxisLabel({\r\n value: this.value,\r\n isFirst: this.isFirst,\r\n isLast: this.isLast,\r\n chart: this.chart,\r\n axis: this.axis,\r\n series: chartSeries,\r\n });\r\n },\r\n style: {\r\n color: uiNextComparative,\r\n },\r\n reserveSpace: false,\r\n useHTML: true,\r\n },\r\n lineWidth: 0,\r\n showFirstLabel: true,\r\n showLastLabel: true,\r\n startOnTick: true,\r\n tickPositioner(this: { dataMin: number, dataMax: number }) {\r\n return tickPositioner({\r\n dataMin: this.dataMin,\r\n dataMax: this.dataMax,\r\n });\r\n },\r\n }]), [chartSeries]);\r\n\r\n const hideYAxisLabels = selectedMetricIndexes.length > 2;\r\n const yAxis: TAxisOptions[] = useMemo(() => ([{\r\n // Need to show the first y axis to show the grid lines.\r\n // Instead just set labels empty when we need to hide it.\r\n labels: {\r\n formatter(this: TAxisLabelsFormatterContextObject) {\r\n if (hideYAxisLabels) {\r\n return '';\r\n }\r\n\r\n return formatTickValue(visibleMetrics[selectedMetricIndexes[0]], this.value, this.axis.tickInterval);\r\n },\r\n },\r\n ...gridLineStyle,\r\n }, {\r\n labels: {\r\n formatter(this: TAxisLabelsFormatterContextObject) {\r\n return formatTickValue(visibleMetrics[selectedMetricIndexes[1]], this.value, this.axis.tickInterval);\r\n },\r\n },\r\n visible: !hideYAxisLabels,\r\n ...gridLineStyle,\r\n }, {\r\n visible: false,\r\n }, {\r\n visible: false,\r\n }]), [hideYAxisLabels, visibleMetrics, selectedMetricIndexes]);\r\n\r\n const tooltip = useMemo(() => ({\r\n formatter(this: { points: any[] }) {\r\n return formatTooltip({\r\n points: this.points,\r\n hideCurrency,\r\n });\r\n },\r\n borderWidth: 1,\r\n outside: false,\r\n crosshairs: [{\r\n color: 'rgba(0,0,0,0.1)',\r\n }],\r\n }), [hideCurrency]);\r\n\r\n const chartStyleOption = useMemo(() => {\r\n const x = hasMultipleXAxis\r\n ? staticChartStyleOption.xAxis\r\n : _.first(staticChartStyleOption.xAxis, 1);\r\n let y = hasMultipleYAxis\r\n ? staticChartStyleOption.yAxis\r\n : _.first(staticChartStyleOption.yAxis, 1);\r\n if (isAllValuesZero) {\r\n y = _.map(y, axis => ({\r\n ...axis,\r\n min: 0,\r\n max: 1,\r\n tickInterval: 0.5,\r\n }));\r\n }\r\n return {\r\n ...staticChartStyleOption,\r\n xAxis: x,\r\n yAxis: y,\r\n };\r\n }, [hasMultipleXAxis, hasMultipleYAxis, isAllValuesZero]);\r\n\r\n const highchartsOptions = useMemo(() => ({\r\n series: chartSeries,\r\n tooltip,\r\n xAxis: hasMultipleXAxis ? xAxis : _.first(xAxis, 1) || staticChartStyleOption.xAxis,\r\n yAxis: hasMultipleYAxis ? yAxis : _.first(yAxis, 1) || staticChartStyleOption.yAxis,\r\n chart,\r\n }), [chartSeries, hasMultipleXAxis, hasMultipleYAxis, tooltip, xAxis, yAxis]);\r\n\r\n const result = useMemo(() => ({\r\n highcharts: Highcharts,\r\n options: merge({}, chartStyleOption, highchartsOptions),\r\n hasChartData: highchartsOptions?.series?.length > 0,\r\n }), [chartStyleOption, highchartsOptions]);\r\n\r\n return result;\r\n}\r\n","export const style = {\r\n fontFamily: '\"Segoe UI\", Tahoma, Geneva, Verdana, sans-serif',\r\n};\r\n","export const useFluentChartViewOptions = () => ({ hasChartData: true }); // TODO: Implement useFluentChartViewOptions\r\n","import React, { ComponentType } from 'react';\r\nimport HighchartsReact from 'highcharts-react-official';\r\nimport { useChartViewOptions } from '../chart-data/chart-view-options';\r\nimport { useFluentChartViewOptions } from '../chart-data/fluent-chart-view-options';\r\nimport { IPerformanceCardProps } from '../types/types';\r\n\r\n\r\nexport function withHighchartsChart

(WrappedComponent: ComponentType

): ComponentType> {\r\n const HoC = props => ();\r\n\r\n return HoC;\r\n}\r\n\r\n// *********** DELETE THIS WHEN FLUENT CHART IS ADDED ***********************\r\nconst MockFluentChart = () => (

Mock Fluent Chart
);\r\n// *********** DELETE THIS WHEN FLUENT CHART IS ADDED ***********************\r\nexport function withFluentChart

(WrappedComponent: ComponentType

): ComponentType> {\r\n const HoC = props => ();\r\n\r\n return HoC;\r\n}\r\n","import React, { useMemo, useRef, useLayoutEffect, useCallback } from 'react';\r\nimport _ from 'underscore';\r\nimport classNames from 'classnames';\r\nimport { Spinner } from '@fluentui/react-components';\r\n\r\n\r\nimport { MetricPicker } from './components/index';\r\nimport { NoData } from './components/no-data';\r\nimport { useStyles } from './styles/performance-card';\r\nimport { withHighchartsChart, withFluentChart } from './components/with-chart';\r\nimport { IPerformanceCardProps } from './types/types';\r\n\r\n\r\nconst ChartView = React.memo(({\r\n classes, hasError, isLoading,\r\n chartProps, Chart, i18n, shellContentElement,\r\n}: {\r\n classes: any,\r\n hasError: boolean,\r\n isLoading: boolean,\r\n chartProps: any,\r\n i18n: any,\r\n Chart: any,\r\n shellContentElement: Element,\r\n}) => {\r\n const ref = useRef(null);\r\n const reflow = useCallback(_.debounce(() => {\r\n setTimeout(() => {\r\n if (ref.current) {\r\n ref.current.chart.reflow();\r\n }\r\n }, 0);\r\n }, 10), []);\r\n useLayoutEffect(() => {\r\n const resizeObserver = new ResizeObserver(reflow);\r\n resizeObserver.observe(shellContentElement);\r\n\r\n return () => resizeObserver.disconnect();\r\n }, [reflow, shellContentElement]);\r\n\r\n\r\n if (hasError) {\r\n return ;\r\n }\r\n if (isLoading) {\r\n return (\r\n \r\n );\r\n }\r\n if (chartProps?.hasChartData) {\r\n return ;\r\n }\r\n\r\n return ;\r\n});\r\n\r\nexport function PerformanceCardInternal(props: IPerformanceCardProps) {\r\n const classes = useStyles();\r\n const {\r\n selectedMetricIndexes,\r\n visibleMetrics,\r\n aggregatedMetricPickerData,\r\n granularity,\r\n hideCurrency,\r\n TimeZone,\r\n performanceTimeSeries,\r\n isComparisonEnabled,\r\n onMetricUpdate,\r\n isLoading,\r\n hasError,\r\n i18n,\r\n activity,\r\n responsiveSize,\r\n Chart,\r\n useChartProps,\r\n shellContentElement,\r\n } = props;\r\n\r\n const visibleMetricsDisplayNames = useMemo(() => {\r\n if (_.isEmpty(aggregatedMetricPickerData)) {\r\n return visibleMetrics;\r\n }\r\n return visibleMetrics.map((metric) => {\r\n const displayName = aggregatedMetricPickerData.find(item => item.key === metric)?.displayName;\r\n\r\n if (!displayName) {\r\n activity.error(`Missing aggregatedMetricPickerData for ${metric} in fluent perf chart. This may be bug or polluted preference?`);\r\n }\r\n\r\n return displayName || metric;\r\n });\r\n }, [activity, aggregatedMetricPickerData, visibleMetrics]);\r\n\r\n const chartProps = useChartProps({\r\n i18n,\r\n selectedMetricIndexes,\r\n visibleMetrics,\r\n visibleMetricsDisplayNames,\r\n performanceTimeSeries,\r\n granularity,\r\n hideCurrency,\r\n TimeZone,\r\n });\r\n\r\n // TODO: old chart creates new instance every time when redraw, so it has different animation. Do we need to follow this practice in React?\r\n return (\r\n

\r\n \r\n
\r\n \r\n
\r\n
\r\n );\r\n}\r\n\r\nPerformanceCardInternal.defaultProps = {\r\n isLoading: false,\r\n hasError: false,\r\n hideCurrency: false,\r\n};\r\n\r\nexport const PerformanceCard = withHighchartsChart(PerformanceCardInternal);\r\nexport const PerformanceCardFluent = withFluentChart(PerformanceCardInternal);\r\n","import { ResponsiveSize } from './types';\r\n\r\nexport const SortedResponsiveSizes: ResponsiveSize[] = ['s', 'm', 'l', 'xl', 'xxl'];\r\n\r\nexport const isSizeInList = (size: ResponsiveSize, list: ResponsiveSize[]) => list.includes(size);\r\n\r\nexport const isSizeLargerThan = (size: ResponsiveSize, reference: ResponsiveSize) => SortedResponsiveSizes.indexOf(size) > SortedResponsiveSizes.indexOf(reference);\r\n\r\nexport const isSizeSmallerThan = (size: ResponsiveSize, reference: ResponsiveSize) => SortedResponsiveSizes.indexOf(size) < SortedResponsiveSizes.indexOf(reference);\r\n","import { makeStyles, shorthands, tokens } from '@fluentui/react-components';\r\n\r\nexport const useSearchableMultiSelectorComboboxStyles = makeStyles({\r\n root: {\r\n maxWidth: '400px',\r\n minWidth: 'auto',\r\n\r\n // '&::after': {\r\n // content: 'none', // Removes the line\r\n // borderBottom: 'none',\r\n // },\r\n },\r\n resultsTitleContainer: {\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n },\r\n selectAllButton: {\r\n display: 'flex',\r\n color: '#115EA3',\r\n fontFamily: 'var(--FamilyBase)',\r\n fontSize: 'var(--Size300)',\r\n fontWeight: 400,\r\n lineHeight: 'var(--Lineheight300)',\r\n textAlign: 'left',\r\n textUnderlinePosition: 'from-font',\r\n },\r\n});\r\n\r\nexport const useSearchableMultiSelectorTagsStyles = makeStyles({\r\n root: {\r\n marginBottom: '8px',\r\n },\r\n group: {\r\n flexWrap: 'wrap',\r\n ...shorthands.gap('8px'),\r\n },\r\n});\r\n\r\nexport const useSearchableMultiSelectorStyles = makeStyles({\r\n labelContainer: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n marginBottom: tokens.spacingVerticalXS,\r\n justifyContent: 'space-between',\r\n },\r\n labelContent: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n marginBottom: tokens.spacingVerticalXS,\r\n },\r\n removeAllButton: {\r\n display: 'flex',\r\n fontFamily: 'Segoe UI',\r\n fontSize: '12px',\r\n fontWeight: 400,\r\n },\r\n});\r\n","import _ from 'underscore';\r\nimport React, { useCallback, useContext, useMemo, useState } from 'react';\r\nimport { Button, Combobox, mergeClasses, Option, OptionGroup, Tooltip } from '@fluentui/react-components';\r\nimport { SearchRegular } from '@fluentui/react-icons';\r\n\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\n\r\nimport { useSearchableMultiSelectorComboboxStyles } from './styles';\r\nimport { FetchingStatus } from '../hooks/use-fetching-state';\r\nimport { BaseResultType } from '../types';\r\n\r\ndeclare function _TL_(arg0: string): string;\r\n\r\nconst InvalidOptionValues = ['empty-option', 'loading-option', 'no-more-option', undefined];\r\n\r\nexport interface SearchableMultiSelectorComboboxProps {\r\n selected: ResultType[];\r\n results: ResultType[];\r\n status: FetchingStatus;\r\n hasMore?: boolean;\r\n disabled?: boolean;\r\n multiSelect?: boolean;\r\n allowSelectAll?: boolean;\r\n loadingText?: string;\r\n placeholderText?: string;\r\n noResultsText?: string;\r\n tooltipText?: string;\r\n resultsTitle?: string;\r\n onChangeQuery: (query: string) => void;\r\n onSelectOption: (option: ResultType) => void;\r\n onRenderOption?: (option: ResultType) => React.ReactNode;\r\n onCleanUp: () => void;\r\n onSelectAll: () => void;\r\n onFetchMore: (query: string) => void;\r\n}\r\n\r\nexport const SearchableMultiSelectorCombobox = ({\r\n selected,\r\n results,\r\n status,\r\n hasMore,\r\n disabled,\r\n multiSelect,\r\n allowSelectAll,\r\n loadingText,\r\n placeholderText,\r\n noResultsText,\r\n tooltipText,\r\n resultsTitle,\r\n onChangeQuery,\r\n onSelectOption,\r\n onRenderOption,\r\n onCleanUp,\r\n onSelectAll,\r\n onFetchMore,\r\n}: SearchableMultiSelectorComboboxProps) => {\r\n const i18n = useContext(I18nContext) as any;\r\n const classes = useSearchableMultiSelectorComboboxStyles();\r\n\r\n const [query, setQuery] = useState('');\r\n\r\n const loadingOption = useMemo(() => (\r\n \r\n ), [i18n, loadingText]);\r\n\r\n const emptyOption = useMemo(() => (\r\n \r\n ), [i18n, noResultsText]);\r\n\r\n const noMoreOption = useMemo(() => (\r\n \r\n ), [i18n, noResultsText]);\r\n\r\n const selectedOptions = useMemo(() => {\r\n const selectedIds = selected.map(({ id }) => id);\r\n const resultIds = results.map(({ id }) => id);\r\n\r\n return _.intersection(selectedIds, resultIds);\r\n }, [selected, results]);\r\n\r\n const TooltipWrapper = useCallback(({ children }) => {\r\n if (!tooltipText) { return children; }\r\n\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n }, [tooltipText]);\r\n\r\n const updateQuery = useCallback((newQuery) => {\r\n setQuery(newQuery);\r\n onChangeQuery(newQuery);\r\n }, [onChangeQuery]);\r\n\r\n const handleBlur = useCallback(() => {\r\n setQuery('');\r\n onCleanUp();\r\n }, [onCleanUp]);\r\n\r\n const handleChange = useCallback(e => updateQuery(e.target.value), [updateQuery]);\r\n\r\n const handleOptionSelect = useCallback((_e, { optionValue }) => {\r\n if (InvalidOptionValues.includes(optionValue)) {\r\n return;\r\n }\r\n\r\n onSelectOption(results.find(({ id }) => id === optionValue)!);\r\n }, [onSelectOption, results]);\r\n\r\n const handleSearchBoxClick = useCallback(() => {\r\n if (!query) {\r\n onChangeQuery('');\r\n }\r\n }, [query, onChangeQuery]);\r\n\r\n const handleKeyDown = useCallback((e) => {\r\n if (e.key === 'Enter' && results.length === 0) {\r\n setQuery('');\r\n onCleanUp();\r\n }\r\n }, [results.length, setQuery, onCleanUp]);\r\n\r\n const handleScroll = useCallback((event: React.UIEvent) => {\r\n const target = event.currentTarget;\r\n if (hasMore && target.scrollTop + target.clientHeight >= target.scrollHeight - 10) {\r\n onFetchMore(query);\r\n }\r\n }, [onFetchMore, query, hasMore]);\r\n\r\n const renderLabel = useMemo(() =>\r\n resultsTitle && (\r\n
\r\n {resultsTitle}\r\n {allowSelectAll && (\r\n \r\n {i18n.getString(_TL_('Select all'))}\r\n \r\n )}\r\n
\r\n ), [i18n, classes, resultsTitle, allowSelectAll, onSelectAll]);\r\n\r\n return (\r\n \r\n }\r\n selectedOptions={selectedOptions}\r\n placeholder={placeholderText ?? i18n.getString(_TL_('Search'))}\r\n disabled={disabled}\r\n value={query}\r\n open={status !== 'idle'}\r\n onBlur={handleBlur}\r\n onChange={handleChange}\r\n onOptionSelect={handleOptionSelect}\r\n onClick={handleSearchBoxClick}\r\n onKeyDown={handleKeyDown}\r\n listbox={{\r\n onScroll: handleScroll,\r\n className: 'listbox',\r\n // TODO:\r\n // 1. make the high configurable, the inline style is not supported here, need consider another way\r\n // 2. accessibliity support for the scroll action\r\n }}\r\n >\r\n {/**\r\n * Result options cannot be extracted onto a useMemo hook due to onRenderOption could have hook calls inside.\r\n * This will cause React to complain about hook calls inside a hook.\r\n */}\r\n {results.length > 0 && (\r\n \r\n {results.map(result => (\r\n \r\n ))}\r\n \r\n )}\r\n {status === 'loading' && loadingOption}\r\n {results.length === 0 && status === 'loaded' && emptyOption}\r\n {results.length > 0 && status === 'loaded' && hasMore === false && noMoreOption}\r\n \r\n \r\n );\r\n};\r\n\r\nSearchableMultiSelectorCombobox.defaultProps = {\r\n disabled: false,\r\n hasMore: undefined,\r\n multiSelect: true,\r\n allowSelectAll: false,\r\n loadingText: undefined,\r\n placeholderText: undefined,\r\n noResultsText: undefined,\r\n tooltipText: undefined,\r\n onRenderOption: undefined,\r\n resultsTitle: undefined,\r\n};\r\n","import React, { useCallback, useContext } from 'react';\r\nimport Promise from 'bluebird';\r\nimport { Body1Strong, Field, mergeClasses, Button } from '@fluentui/react-components';\r\nimport { DeleteRegular } from '@fluentui/react-icons';\r\n\r\n\r\nimport { HelpPopup } from '@bingads-webui-react/help-popup';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Tags } from '@bingads-webui-fluent-component/tags';\r\n\r\nimport { useFetchingState } from './hooks/use-fetching-state';\r\nimport { usePaginatedFetchingState } from './hooks/use-paginated-fetching-state';\r\nimport { SearchableMultiSelectorCombobox } from './components/combobox';\r\nimport { BaseResultType } from './types';\r\nimport { useSearchableMultiSelectorStyles } from './components/styles';\r\n\r\nexport interface SearchableMultiSelectorInputProps {\r\n className?: string;\r\n label: string;\r\n helpTopic?: string;\r\n helpLabel?: string;\r\n disabled?: boolean;\r\n multiSelect?: boolean;\r\n disableTags?: boolean;\r\n fetchOnEmptyInput?: boolean;\r\n allowSelectAll?: boolean;\r\n allowRemoveAll?: boolean;\r\n loadingText?: string;\r\n tooltipText?: string;\r\n placeholderText?: string;\r\n noResultsText?: string;\r\n resultsTitle?: string;\r\n tagViewLimit?: number;\r\n fetchFn: (query: string, pageNumber?: number, pageSize?: number) => Promise<{ results: ResultType[], totalCount: number } | ResultType[]>;\r\n value: ResultType[];\r\n pageSize?: number;\r\n onChange: (value: (ResultType)[]) => void;\r\n onRenderOption?: (option: ResultType) => React.ReactNode;\r\n onRenderLabel?: () => React.ReactNode;\r\n}\r\n\r\n\r\nexport const SearchableMultiSelectorInput = ({\r\n className,\r\n label,\r\n helpTopic,\r\n helpLabel,\r\n disabled,\r\n multiSelect,\r\n disableTags,\r\n fetchOnEmptyInput,\r\n allowSelectAll,\r\n allowRemoveAll,\r\n loadingText,\r\n placeholderText,\r\n tooltipText,\r\n noResultsText,\r\n resultsTitle,\r\n tagViewLimit,\r\n fetchFn,\r\n value,\r\n pageSize,\r\n onChange,\r\n onRenderOption,\r\n onRenderLabel,\r\n}: SearchableMultiSelectorInputProps) => {\r\n const classes = useSearchableMultiSelectorStyles();\r\n const i18n = useContext(I18nContext) as any;\r\n const paginatedFetchingState = usePaginatedFetchingState({ fetchFn, fetchOnEmptyInput, pageSize });\r\n const fetchingState = useFetchingState({ fetchFn, fetchOnEmptyInput });\r\n\r\n const {\r\n status,\r\n results,\r\n fetch,\r\n onCleanUp,\r\n hasMore,\r\n fetchNextPage,\r\n } = pageSize ? paginatedFetchingState : { ...fetchingState, hasMore: undefined, fetchNextPage: () => {} };\r\n\r\n const tagItems = value.map(({ id }) => id);\r\n\r\n const onRenderTagContent = useCallback((id) => {\r\n const result = value.find(({ id: resultId }) => resultId === id);\r\n return (
{result?.name}
\r\n );\r\n }, [value]);\r\n\r\n const onChangeTagItems = useCallback((newTagItems) => {\r\n const newSelected = value.filter(({ id }) => newTagItems.includes(id));\r\n onChange(newSelected);\r\n }, [onChange, value]);\r\n\r\n const addItem = useCallback(newItem =>\r\n onChange(value.concat(newItem)), [onChange, value]);\r\n\r\n const removeItem = useCallback(removedId =>\r\n onChange(value.filter(({ id }) => id !== removedId)), [onChange, value]);\r\n\r\n const toggleOption = useCallback((newSelected) => {\r\n const isAlreadySelected = value.some(({ id }) => id === newSelected.id);\r\n\r\n if (isAlreadySelected) {\r\n removeItem(newSelected.id);\r\n } else {\r\n addItem(newSelected);\r\n }\r\n }, [addItem, removeItem, value]);\r\n\r\n const selectAllOptions = useCallback(() => {\r\n const newSelected = results.filter(({ id }) => !value.some(({ id: selectedId }) => id === selectedId));\r\n onChange(value.concat(newSelected));\r\n }, [value, results, onChange]);\r\n\r\n const removeAllSelected = useCallback(() => {\r\n onChange([]);\r\n }, [onChange]);\r\n\r\n const renderLabelWithHelpButton = useCallback(() => (\r\n
\r\n {label}\r\n {helpTopic && }\r\n
\r\n ), [label, helpTopic, helpLabel, classes.labelContent]);\r\n\r\n const renderLabel = useCallback(() => (\r\n
\r\n {onRenderLabel ? onRenderLabel() : renderLabelWithHelpButton()}\r\n\r\n {allowRemoveAll && tagItems.length > 0 && (\r\n }\r\n >\r\n {i18n.getString(_TL_('Remove all'))}\r\n \r\n )}\r\n
\r\n ), [classes.labelContainer, classes.removeAllButton, onRenderLabel, renderLabelWithHelpButton, allowRemoveAll, removeAllSelected, i18n, tagItems.length]);\r\n\r\n return (\r\n
\r\n \r\n {\r\n !disableTags &&\r\n ()\r\n }\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nSearchableMultiSelectorInput.defaultProps = {\r\n className: undefined,\r\n helpTopic: undefined,\r\n helpLabel: undefined,\r\n loadingText: undefined,\r\n placeholderText: undefined,\r\n noResultsText: undefined,\r\n tooltipText: undefined,\r\n disabled: false,\r\n disableTags: false,\r\n fetchOnEmptyInput: false,\r\n multiSelect: true,\r\n onRenderOption: undefined,\r\n allowSelectAll: false,\r\n allowRemoveAll: false,\r\n resultsTitle: undefined,\r\n tagViewLimit: undefined,\r\n onRenderLabel: undefined,\r\n pageSize: undefined,\r\n};\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport { useCallback, useState } from 'react';\r\n\r\nimport { BaseResultType } from '../types';\r\n\r\nconst DEBOUNCE_DELAY = 300;\r\n\r\nexport interface UsePaginatedFetchingStateProps {\r\n fetchFn: (query: string, pageNumber: number, pageSize: number) => Promise<{ results: ResultType[], totalCount: number } | ResultType[]>;\r\n fetchOnEmptyInput: boolean;\r\n pageSize: number;\r\n}\r\n\r\nexport type FetchingStatus = 'idle' | 'loading' | 'loaded';\r\n\r\nexport interface PaginatedFetchingState {\r\n status: FetchingStatus;\r\n results: ResultType[];\r\n currentPage: number;\r\n totalPages: number;\r\n hasMore: boolean;\r\n}\r\n\r\nexport const usePaginatedFetchingState = ({\r\n fetchFn,\r\n fetchOnEmptyInput,\r\n pageSize,\r\n}: UsePaginatedFetchingStateProps) => {\r\n const [state, setState] = useState>({\r\n status: 'idle',\r\n results: [],\r\n currentPage: 1,\r\n totalPages: 1,\r\n hasMore: false,\r\n });\r\n\r\n const fetch = useCallback((query, page = 1) => {\r\n if (state.status === 'loading') {\r\n return;\r\n }\r\n\r\n if (!query && !fetchOnEmptyInput) {\r\n setState({\r\n status: 'idle', results: [], currentPage: 1, totalPages: 1, hasMore: false,\r\n });\r\n return;\r\n }\r\n\r\n setState(prevState => ({ ...prevState, status: 'loading' }));\r\n\r\n fetchFn(query, page, pageSize).then((response) => {\r\n const { results, totalCount } = Array.isArray(response) ? { results: response, totalCount: response.length } : response;\r\n const totalPages = Math.ceil(totalCount / pageSize);\r\n setState(preState => ({\r\n ...preState,\r\n status: 'loaded',\r\n results: page === 1 ? results : [...preState.results, ...results],\r\n currentPage: page,\r\n totalPages,\r\n hasMore: page < totalPages,\r\n }));\r\n }).catch(() => {\r\n setState(prevState => ({ ...prevState, status: 'loaded' }));\r\n });\r\n }, [fetchFn, fetchOnEmptyInput, pageSize, state]);\r\n\r\n const fetchNextPage = useCallback((query) => {\r\n if (state.currentPage < state.totalPages) {\r\n fetch(query, state.currentPage + 1);\r\n }\r\n }, [fetch, state]);\r\n\r\n\r\n const onCleanUp = useCallback(() => {\r\n setState({\r\n status: 'idle', results: [], currentPage: 1, totalPages: 1, hasMore: true,\r\n });\r\n }, []);\r\n\r\n const debouncedFetch = _.debounce(fetch, DEBOUNCE_DELAY);\r\n\r\n return {\r\n status: state.status,\r\n results: state.results,\r\n hasMore: state.hasMore,\r\n fetch: debouncedFetch,\r\n fetchNextPage,\r\n onCleanUp,\r\n };\r\n};\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport { useCallback, useState } from 'react';\r\n\r\nimport { BaseResultType } from '../types';\r\n\r\nconst DEBOUNCE_DELAY = 300;\r\n\r\nexport interface UseFetchingStateProps {\r\n fetchFn: (query: string) => Promise<{ results: ResultType[], totalCount: number } | ResultType[]>;\r\n fetchOnEmptyInput: boolean;\r\n}\r\n\r\nexport type FetchingStatus = 'idle' | 'loading' | 'loaded';\r\n\r\nexport interface FetchingState {\r\n status: FetchingStatus;\r\n results: ResultType[];\r\n}\r\n\r\nexport const useFetchingState = ({\r\n fetchFn,\r\n fetchOnEmptyInput,\r\n}: UseFetchingStateProps) => {\r\n const [state, setState] = useState>({ status: 'idle', results: [] });\r\n\r\n const fetch = useCallback((query) => {\r\n if (!query && !fetchOnEmptyInput) {\r\n setState({ status: 'idle', results: [] });\r\n return;\r\n }\r\n\r\n setState({ status: 'loading', results: [] });\r\n\r\n fetchFn(query)\r\n .then((response) => {\r\n const results = Array.isArray(response) ? response : response.results;\r\n setState({ status: 'loaded', results });\r\n })\r\n .catch(() => {\r\n setState({ status: 'loaded', results: [] });\r\n });\r\n }, [fetchFn, fetchOnEmptyInput, state.status]);\r\n\r\n const onCleanUp = useCallback(() => {\r\n setState({ status: 'idle', results: [] });\r\n }, []);\r\n\r\n const debouncedFetch = _.debounce(fetch, DEBOUNCE_DELAY);\r\n\r\n return {\r\n status: state.status,\r\n results: state.results,\r\n fetch: debouncedFetch,\r\n onCleanUp,\r\n };\r\n};\r\n","import Promise from 'bluebird';\r\nimport { useCallback, useState } from 'react';\r\n\r\nimport { BaseResultType } from '../types';\r\n\r\nexport const filterPredicateFactory = (query: string) => ((result: ResultType) => result.name.toLowerCase().includes(query.toLowerCase()));\r\n\r\nexport const useFilterOnClient = (originalFn: (query: string) => Promise) => {\r\n const [cachedResults, setCachedResults] = useState();\r\n\r\n return useCallback((query: string) => {\r\n const fetchResults = cachedResults\r\n ? Promise.resolve(cachedResults)\r\n : originalFn('');\r\n\r\n const filterPredicate = filterPredicateFactory(query);\r\n\r\n return fetchResults.then((results) => {\r\n setCachedResults(results);\r\n\r\n const filteredResults = results.filter(filterPredicate);\r\n\r\n return filteredResults;\r\n });\r\n }, [cachedResults, originalFn]);\r\n};\r\n","export const DiagnosticsTypes = {\r\n Issue: 'Issue',\r\n Recommendation: 'Recommendation',\r\n};\r\n","import React, { useCallback, useContext } from 'react';\r\nimport {\r\n Button,\r\n Link,\r\n Text,\r\n makeStyles,\r\n mergeClasses,\r\n tokens,\r\n shorthands,\r\n} from '@fluentui/react-components';\r\nimport { MessageBar, MessageBarActions, MessageBarBody, MessageBarTitle } from '@fluentui/react-message-bar';\r\nimport { LightbulbFilamentFilled, WarningFilled } from '@fluentui/react-icons';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\n\r\nimport { DiagnosticsTypes } from './constants';\r\nimport { DiagnosticBarProps } from './types';\r\n\r\nconst useDiagnosticsBarStyles = makeStyles({\r\n messageBar: {\r\n marginTop: '8px',\r\n '&.recommendation-bar': {\r\n backgroundColor: tokens.colorBrandBackground2,\r\n ...shorthands.borderColor(tokens.colorBrandBackground2Pressed),\r\n },\r\n },\r\n messageBarBody: {\r\n whiteSpace: 'normal',\r\n paddingTop: '8px',\r\n paddingBottom: '8px',\r\n '& > span': {\r\n marginRight: '8px',\r\n },\r\n },\r\n messageBarAction: {\r\n alignSelf: 'center',\r\n },\r\n iconIssue: {\r\n color: tokens.colorStatusWarningForeground1,\r\n },\r\n iconRecommendation: {\r\n color: tokens.colorNeutralForeground2BrandHover,\r\n },\r\n});\r\n\r\nexport function DiagnosticBar({ itemList, type, onActionClick }: DiagnosticBarProps) {\r\n const classes = useDiagnosticsBarStyles();\r\n const i18n = useContext(I18nContext) as any;\r\n\r\n const renderActions = useCallback((item) => {\r\n if (!item.actions) return null;\r\n const actionButtons = item.actions.map((action) => {\r\n const onButtonClick = () => onActionClick({ action, item });\r\n return (\r\n \r\n );\r\n });\r\n return actionButtons;\r\n }, [onActionClick, i18n]);\r\n\r\n return (\r\n <>\r\n {itemList.map(item => (\r\n \r\n : \r\n }\r\n intent={type === DiagnosticsTypes.Recommendation ? 'info' : 'warning'}\r\n layout=\"singleline\"\r\n >\r\n \r\n {i18n.getString(item.title)}\r\n {i18n.getString(item.description)}\r\n {item.link && {i18n.getString(item.link.text)}}\r\n \r\n \r\n {renderActions(item)}\r\n \r\n \r\n ))}\r\n \r\n );\r\n}\r\n\r\nDiagnosticBar.defaultProps = {\r\n itemList: [],\r\n type: DiagnosticsTypes.Issue,\r\n};\r\n","import _ from 'underscore';\r\nimport React, { useContext, useMemo } from 'react';\r\nimport { Badge, Text, makeStyles, shorthands, mergeClasses } from '@fluentui/react-components';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Collapse, ValidatedPanel, collapseExpander, getPanelErrorProps, useCollapseState } from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { DiagnosticsTypes } from './constants';\r\nimport { DiagnosticBar } from './diagnostic-bar';\r\nimport { SummaryDiagnosticProps } from './types';\r\n\r\nconst useDiagnosticsSectionStyles = makeStyles({\r\n diagnosticsSection: {\r\n maxWidth: '928px',\r\n '& .collapse-panel': {\r\n ...shorthands.borderRadius('6px'),\r\n },\r\n '& .collapse-title-bar': {\r\n minHeight: 'fit-content',\r\n ...shorthands.padding('12px', '0px'),\r\n },\r\n },\r\n header: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n ...shorthands.gap('8px'),\r\n alignItems: 'center',\r\n },\r\n});\r\n\r\nexport function SummaryDiagnostic({ issues, recommendations, onActionClick }: SummaryDiagnosticProps) {\r\n const classes = useDiagnosticsSectionStyles();\r\n const i18n = useContext(I18nContext) as any;\r\n\r\n const [\r\n diagnosticsSection,\r\n diagnosticsExpandedSection,\r\n setDiagnosticsExpandedSection,\r\n ] = useCollapseState(\r\n ['issues', 'recommendations'] /* all sections */,\r\n ['issues', 'recommendations'] /* initially expanded sections */\r\n );\r\n const diagnosticsSectionExpand = useMemo(\r\n () => collapseExpander({ setActiveKeys: setDiagnosticsExpandedSection }),\r\n [setDiagnosticsExpandedSection]\r\n );\r\n\r\n return (\r\n \r\n {issues.length > 0 && (\r\n \r\n {i18n.getString(_TL_('Campaign issues'))}\r\n \r\n {issues.length === 1 ? i18n.getString(_TL_('1 issue')) : i18n.getString(_TL_('{{count}} issues'), { count: `${issues.length}` })}\r\n \r\n
\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: diagnosticsSectionExpand,\r\n expandKey: 'issues',\r\n }}\r\n >\r\n {i18n.getString(_TL_('Fix the issues that are preventing your campaign from running smoothly.'))}\r\n \r\n \r\n )}\r\n {recommendations.length > 0 && (\r\n \r\n {i18n.getString(_TL_('Recommendations'))}\r\n \r\n {recommendations.length === 1 ? i18n.getString(_TL_('1 recommendation')) : i18n.getString(_TL_('{{count}} recommendations'), { count: `${recommendations.length}` })}\r\n \r\n
\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: diagnosticsSectionExpand,\r\n expandKey: 'recommendations',\r\n }}\r\n >\r\n {i18n.getString(_TL_(\"Improve your campaign's performance by adopting these recommendations.\"))}\r\n \r\n \r\n )}\r\n \r\n );\r\n}\r\n\r\nSummaryDiagnostic.defaultProps = {\r\n issues: [],\r\n recommendations: [],\r\n onActionClick: _.noop,\r\n};\r\n","export const isTagetCpaHigherThanBudget = (i18n, budgetAmount, cpa) => cpa && budgetAmount && i18n && i18n.parseDecimal(String(budgetAmount)) < cpa;\r\n\r\nexport const getLogString = (checkValue, budgetAmount, cpa, scenario, onSave) => `[TargetCpaValueCheck][${scenario}] TargetCpaValue warning, flow: ${onSave ? 'OnSave' : 'OnEdit'} checkValue: ${checkValue}, budget: ${budgetAmount}, cpa: ${cpa}`;\r\n","import { isTagetCpaHigherThanBudget, getLogString } from './utils';\r\n\r\nexport const LogTargetCpaCheckOnSave = (i18n, permissions, budgetAmount, cpa, activity, scenario) => {\r\n if (permissions?.dynamic?.TargetCpaValueCheck) {\r\n const checkValue = isTagetCpaHigherThanBudget(i18n, budgetAmount, cpa);\r\n activity.trace(getLogString(checkValue, budgetAmount, cpa, scenario, true));\r\n }\r\n};\r\n","import React, { useContext, useMemo } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { withPermissions } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { MessageBar, MessageBarBody } from '@fluentui/react-message-bar';\r\n\r\nimport { isTagetCpaHigherThanBudget, getLogString } from './utils';\r\n\r\nexport const TargetCpaWarningBannerInternal = ({\r\n budgetAmount,\r\n cpa,\r\n activity,\r\n scenario,\r\n permissions,\r\n isSignup, // Remove this prop once TargetCpaValueCheck pilot check is cleaned up\r\n}: {\r\n budgetAmount: number,\r\n cpa: number,\r\n activity: { trace: Function },\r\n scenario: string,\r\n permissions: { dynamic: { TargetCpaValueCheck: boolean } },\r\n isSignup?: boolean,\r\n}) => {\r\n const i18n: any = useContext(I18nContext);\r\n\r\n const tcpaCheckEnabled = permissions?.dynamic?.TargetCpaValueCheck || isSignup;\r\n\r\n const shouldShowBanner = useMemo(() => {\r\n const checkValue = isTagetCpaHigherThanBudget(i18n, budgetAmount, cpa);\r\n activity.trace(getLogString(checkValue, budgetAmount, cpa, scenario, false));\r\n return checkValue;\r\n }, [activity, budgetAmount, cpa, i18n, scenario]);\r\n\r\n return (\r\n tcpaCheckEnabled && shouldShowBanner ? (\r\n \r\n \r\n {i18n.getString(_TL_('Your campaign\\'s total cost per acquisition is higher than the daily budget, which could prevent you from receiving any conversions. Please consider lowering your total cost per acquisition or raising your daily budget.'))}\r\n \r\n \r\n ) : null\r\n );\r\n};\r\n\r\nTargetCpaWarningBannerInternal.defaultProps = {\r\n isSignup: false,\r\n};\r\n\r\nexport const TargetCpaWarningBanner = withPermissions(TargetCpaWarningBannerInternal);\r\n","import _ from 'underscore';\r\n\r\nexport function filterLocationData({ data, granularity, metric }) {\r\n return _.filter(data, item => item[granularity.name] && item[granularity.latitude] && item[granularity.longitude] && item[metric]);\r\n}\r\n","export enum VIEWS {\r\n MAP = 'map-view',\r\n TABLE = 'table-view',\r\n}\r\n\r\nexport const VIEW_STRINGS = {\r\n [VIEWS.MAP]: _TL_('Map'),\r\n [VIEWS.TABLE]: _TL_('List'),\r\n};\r\n\r\nexport const LOCATIONS_PER_PAGE = 5;\r\n\r\nexport const BUBBLE_MAX_RADIUS = 25;\r\nexport const BUBBLE_MIN_RADIUS = 6;\r\n\r\nexport const locationGranularity = {\r\n country: {\r\n name: 'CountryName',\r\n longitude: 'CountryLongitude',\r\n latitude: 'CountryLatitude',\r\n },\r\n county: {\r\n name: 'CountyName',\r\n longitude: 'CountyLongitude',\r\n latitude: 'CountyLatitude',\r\n },\r\n stateOrProvince: {\r\n name: 'StateOrProvince',\r\n longitude: 'SubGeographyLongitude',\r\n latitude: 'SubGeographyLatitude',\r\n },\r\n city: {\r\n name: 'City',\r\n longitude: 'CityLongitude',\r\n latitude: 'CityLatitude',\r\n },\r\n postalCode: {\r\n name: 'PostalCode',\r\n longitude: 'PostalCodeLongitude',\r\n latitude: 'PostalCodeLatitude',\r\n },\r\n};\r\n\r\nexport const METRIC_STRINGS = {\r\n Clicks: _TL_('Clicks'),\r\n Impressions: _TL_('Impr.'),\r\n CTR: _TL_('CTR'),\r\n AverageCPC: _TL_('Avg. CPC'),\r\n Spend: _TL_('Spend'),\r\n TopImpressionRatePercent: _TL_('Top impr. rate'),\r\n AbsoluteTopImpressionRatePercent: _TL_('Abs. top impr. rate'),\r\n ConversionsCredit: _TL_('Conv.'),\r\n PartialConversionRate: _TL_('Conv. rate'),\r\n PartialConversionCPA: _TL_('CPA'),\r\n AdvertiserReportedRevenue: _TL_('Revenue'),\r\n RevenueOnAdSpend: _TL_('Revenue on ad spend'),\r\n};\r\n\r\nexport const METRIC_FULL_STRINGS = {\r\n Clicks: _TL_('Clicks'),\r\n Impressions: _TL_('Impressions'),\r\n CTR: _TL_('CTR'),\r\n AverageCPC: _TL_('Average CPC'),\r\n Spend: _TL_('Spend'),\r\n TopImpressionRatePercent: _TL_('Top impression rate'),\r\n AbsoluteTopImpressionRatePercent: _TL_('Absolute top impression rate'),\r\n ConversionsCredit: _TL_('Conversions'),\r\n PartialConversionRate: _TL_('Conversion rate'),\r\n PartialConversionCPA: _TL_('CPA'),\r\n AdvertiserReportedRevenue: _TL_('Revenue'),\r\n RevenueOnAdSpend: _TL_('Revenue on ad spend'),\r\n};\r\n","import _ from 'underscore';\r\nimport { formatMetric } from '@bingads-webui-campaign-legacy/performance-metric-formatter/index';\r\n\r\nimport { LocationData } from './types';\r\nimport { BUBBLE_MAX_RADIUS, BUBBLE_MIN_RADIUS, METRIC_STRINGS } from './const';\r\n\r\nconst bubbleColorForVNext = '#107C10';\r\nconst bubbleStrokeWidth = 1;\r\nconst fillOpacityRegular = 0.5;\r\n// const fillOpacityHighlight = 1;\r\n\r\nfunction getPushPinIcon({\r\n radius,\r\n fillOpacity,\r\n}) {\r\n const strokeColor = bubbleColorForVNext;\r\n const fillColor = bubbleColorForVNext;\r\n const strokeWidth = bubbleStrokeWidth;\r\n\r\n return `\r\n \r\n \r\n `;\r\n}\r\n\r\nfunction createPushpinOption({ locationInfo }) {\r\n const {\r\n location, radius,\r\n } = locationInfo;\r\n\r\n const svg = getPushPinIcon({\r\n radius,\r\n fillOpacity: fillOpacityRegular,\r\n });\r\n // TODO: we will need this when we hook up with table view\r\n // const svgHighlight = getPushPinIcon({\r\n // radius,\r\n // fillOpacity: fillOpacityHighlight,\r\n // });\r\n\r\n return {\r\n location,\r\n // svgHighlight,\r\n svg,\r\n options: {\r\n anchor: { x: radius, y: radius },\r\n roundClickableArea: true,\r\n },\r\n };\r\n}\r\n\r\nconst customPushpinBuilder = pinOption => ({\r\n Maps,\r\n}) => {\r\n const location = new Maps.Location(pinOption.location.Latitude, pinOption.location.Longitude);\r\n const pin = new Maps.Pushpin(location, _.extend(pinOption.options, {\r\n anchor: new Maps.Point(pinOption.options.anchor.x, pinOption.options.anchor.y),\r\n }, { icon: pinOption.svg }));\r\n\r\n return pin;\r\n};\r\n\r\nexport function formatLocationData({\r\n locationData, granularity, metric, dateRange, i18n,\r\n}): LocationData[] {\r\n const maxValue = Math.abs(_.max(locationData, item => Math.abs(item[metric]))[metric]);\r\n return _.chain(locationData).sortBy(item => -item[metric]).map((item) => {\r\n const formattedValue: string = formatMetric(metric, item[metric]);\r\n const metricName: string = i18n.getString(METRIC_STRINGS[metric]);\r\n const location: { Latitude: string, Longitude: string } = { Latitude: item[granularity.latitude], Longitude: item[granularity.longitude] };\r\n const name: string = item[granularity.name];\r\n const radius: number = Math.max((item[metric] * BUBBLE_MAX_RADIUS) / maxValue, BUBBLE_MIN_RADIUS);\r\n\r\n const pushpinOption = createPushpinOption({\r\n locationInfo: {\r\n location,\r\n radius,\r\n },\r\n });\r\n const getCustomPushpin = customPushpinBuilder(pushpinOption);\r\n\r\n return {\r\n location,\r\n radius: Math.max((item[metric] * BUBBLE_MAX_RADIUS) / maxValue, BUBBLE_MIN_RADIUS),\r\n value: item[metric] as number,\r\n metricName,\r\n date: `${i18n.formatDate(dateRange.start)} - ${i18n.formatDate(dateRange.end)}`,\r\n name,\r\n formattedValue,\r\n getCustomPushpin,\r\n };\r\n })\r\n .first(10)\r\n .value();\r\n}\r\n","import _ from 'underscore';\r\nimport { useContext, useEffect, useState, useCallback } from 'react';\r\n\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\n\r\nimport { fetchLocationData } from './fetch-location-data';\r\nimport { isUSorCanada } from '../utils/is-us-or-canada';\r\nimport { filterLocationData } from '../utils/filter-location-data';\r\nimport { formatLocationData } from '../utils/format-location-data';\r\nimport { IScopeContext, LocationData } from '../utils/types';\r\nimport { locationGranularity } from '../utils/const';\r\n\r\nexport const useTopLocationsData = ({\r\n metric,\r\n dateRange,\r\n i18n,\r\n willFetchData,\r\n willRender,\r\n}) => {\r\n const { scope } = useContext(ScopeContext) as IScopeContext;\r\n const {\r\n values: {\r\n cid,\r\n aid,\r\n campaignId,\r\n },\r\n } = scope;\r\n\r\n const [locations, setLocations] = useState();\r\n const [isLoading, setIsLoading] = useState(true);\r\n\r\n const setTopLocationValues = useCallback((locationData, granularity) => {\r\n setLocations(formatLocationData({\r\n locationData, granularity, metric, dateRange, i18n,\r\n }));\r\n setIsLoading(false);\r\n willRender();\r\n }, [dateRange, i18n, metric, willRender]);\r\n\r\n useEffect(() => {\r\n setIsLoading(true);\r\n const {\r\n fetchCountryData,\r\n fetchStateOrProvinceData,\r\n fetchCountyData,\r\n fetchCityData,\r\n fetchPostalCodeData,\r\n } = fetchLocationData({\r\n cid, aid, campaignId, dateRange, metric,\r\n });\r\n willFetchData();\r\n fetchCountryData.then((countryData) => {\r\n const countryLocationData = filterLocationData({ data: countryData?.value, granularity: locationGranularity.country, metric });\r\n if (_.isEmpty(countryLocationData)) {\r\n setTopLocationValues([], locationGranularity.country);\r\n return;\r\n }\r\n if (_.size(countryLocationData) > 1 && !isUSorCanada(countryLocationData)) {\r\n setTopLocationValues(countryLocationData, locationGranularity.country);\r\n return;\r\n }\r\n\r\n fetchStateOrProvinceData.then((stateOrProvinceData) => {\r\n const stateOrProvinceLocationData = filterLocationData({ data: stateOrProvinceData?.value, granularity: locationGranularity.stateOrProvince, metric });\r\n if (_.size(stateOrProvinceLocationData) > 1) {\r\n setTopLocationValues(stateOrProvinceLocationData, locationGranularity.stateOrProvince);\r\n return;\r\n }\r\n fetchCountyData.then((countyData) => {\r\n const countyLocationData = filterLocationData({ data: countyData?.value, granularity: locationGranularity.county, metric });\r\n if (_.size(countyLocationData) > 1) {\r\n setTopLocationValues(countyLocationData, locationGranularity.county);\r\n return;\r\n }\r\n fetchCityData.then((cityData) => {\r\n const cityLocationData = filterLocationData({ data: cityData?.value, granularity: locationGranularity.city, metric });\r\n\r\n if (_.size(cityLocationData) > 1) {\r\n setTopLocationValues(cityLocationData, locationGranularity.city);\r\n return;\r\n }\r\n fetchPostalCodeData.then((postalCodeData) => {\r\n const postalCodeLocationData = filterLocationData({ data: postalCodeData?.value, granularity: locationGranularity.postalCode, metric });\r\n if (_.isEmpty(postalCodeLocationData)) {\r\n // We can have less data when we drill down the granularity, since we might not have enough granularity for particular data.\r\n // In this case, we just go upper granularities until we find one with data.\r\n if (!_.isEmpty(cityLocationData)) {\r\n setTopLocationValues(cityLocationData, locationGranularity.city);\r\n return;\r\n }\r\n if (!_.isEmpty(countyLocationData)) {\r\n setTopLocationValues(countyLocationData, locationGranularity.county);\r\n return;\r\n }\r\n if (!_.isEmpty(stateOrProvinceLocationData)) {\r\n setTopLocationValues(stateOrProvinceLocationData, locationGranularity.stateOrProvince);\r\n return;\r\n }\r\n setTopLocationValues(countryLocationData, locationGranularity.country);\r\n return;\r\n }\r\n setTopLocationValues(postalCodeLocationData, locationGranularity.postalCode);\r\n });\r\n });\r\n });\r\n });\r\n });\r\n }, [aid, campaignId, cid, dateRange, metric, setTopLocationValues, willFetchData]);\r\n\r\n return { isLoading, locations };\r\n};\r\n","import {\r\n fetchCountryData,\r\n fetchStateOrProvinceData,\r\n fetchCountyData,\r\n fetchCityData,\r\n fetchPostalCodeData,\r\n} from '@bingads-webui-campaign/overview-cards-common';\r\n\r\nexport function fetchLocationData({\r\n cid, aid, campaignId, dateRange, metric,\r\n}) {\r\n const countryData = fetchCountryData({\r\n cid, aid, campaignId, dateRange, metric,\r\n });\r\n\r\n const stateOrProvinceData = fetchStateOrProvinceData({\r\n cid, aid, campaignId, dateRange, metric,\r\n });\r\n\r\n const countyData = fetchCountyData({\r\n cid, aid, campaignId, dateRange, metric,\r\n });\r\n\r\n const cityData = fetchCityData({\r\n cid, aid, campaignId, dateRange, metric,\r\n });\r\n\r\n const postalCodeData = fetchPostalCodeData({\r\n cid, aid, campaignId, dateRange, metric,\r\n });\r\n\r\n return {\r\n fetchCountryData: countryData,\r\n fetchStateOrProvinceData: stateOrProvinceData,\r\n fetchCountyData: countyData,\r\n fetchCityData: cityData,\r\n fetchPostalCodeData: postalCodeData,\r\n };\r\n}\r\n","import _ from 'underscore';\r\n\r\nexport function isUSorCanada(countryLocationData) {\r\n if (_.size(countryLocationData) !== 2) {\r\n return false;\r\n }\r\n\r\n return _.every(countryLocationData, (country: any) =>\r\n (country.CountryLatitude > 62 && country.CountryLatitude < 64 && country.CountryLongitude > -97 && country.CountryLongitude < -95) ||// Canada\r\n (country.CountryLatitude > 39 && country.CountryLatitude < 41 && country.CountryLongitude > -100 && country.CountryLongitude < -98));// US\r\n}\r\n","import { makeStyles, tokens, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useMetricSelectorStyles = makeStyles({\r\n container: {\r\n alignSelf: 'flex-end',\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n iconContainer: {\r\n width: '12px',\r\n height: '12px',\r\n display: 'flex',\r\n alignItems: 'center',\r\n ...shorthands.borderRadius('6px'),\r\n ...shorthands.borderStyle('solid'),\r\n ...shorthands.borderWidth('1px'),\r\n ...shorthands.borderColor(tokens.colorPaletteGreenBackground2),\r\n marginRight: '5px',\r\n justifyContent: 'center',\r\n },\r\n icon: {\r\n width: '4px',\r\n height: '4px',\r\n ...shorthands.borderRadius('4px'),\r\n ...shorthands.borderStyle('solid'),\r\n ...shorthands.borderWidth('2px'),\r\n ...shorthands.borderColor(tokens.colorStatusSuccessForeground1),\r\n backgroundColor: tokens.colorStatusSuccessForeground1,\r\n },\r\n button: {\r\n paddingTop: 0,\r\n paddingLeft: '5px',\r\n paddingRight: '0px',\r\n paddingBottom: '0px',\r\n width: 'fit-content',\r\n },\r\n buttonText: {\r\n ...shorthands.overflow('hidden'),\r\n lineBreak: 'anywhere',\r\n textOverflow: 'ellipsis',\r\n whiteSpace: 'nowrap',\r\n },\r\n});\r\n\r\n","import React from 'react';\r\nimport classNames from 'classnames';\r\nimport {\r\n Menu,\r\n MenuButton,\r\n MenuPopover,\r\n MenuList,\r\n MenuItem,\r\n MenuTrigger,\r\n Body1 as Text,\r\n Tooltip,\r\n} from '@fluentui/react-components';\r\nimport { METRIC_OPTIONS } from '@bingads-webui-campaign-react/top-locations-card-const';\r\n\r\nimport { useMetricSelectorStyles } from '../styles/metric-selector-styles';\r\nimport { MetricSelectorProps } from '../utils/types';\r\nimport { METRIC_STRINGS, METRIC_FULL_STRINGS } from '../utils/const';\r\n\r\nexport function MetricSelector({\r\n metric,\r\n onMetricChange,\r\n i18n,\r\n}: MetricSelectorProps) {\r\n const styles = useMetricSelectorStyles();\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n {i18n.getString(METRIC_STRINGS[metric])}\r\n \r\n \r\n \r\n \r\n \r\n {METRIC_OPTIONS.map(option => ( onMetricChange(option)}>{i18n.getString(METRIC_STRINGS[option])}))}\r\n \r\n \r\n
\r\n
\r\n );\r\n}\r\n","import { makeStyles } from '@fluentui/react-components';\r\n\r\nexport const useFooterStyles = makeStyles({\r\n footer: {\r\n marginTop: '12px',\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n },\r\n});\r\n\r\n","import classNames from 'classnames';\r\nimport React, { useCallback, useContext } from 'react';\r\nimport { Button } from '@fluentui/react-components';\r\nimport { ChevronLeftRegular, ChevronRightRegular } from '@fluentui/react-icons';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\n\r\nimport { useFooterStyles } from '../styles/footer-styles';\r\nimport { IScopeContext, FooterProps } from '../utils/types';\r\n\r\nexport function Footer({\r\n showPagination,\r\n paginationConfig,\r\n i18n,\r\n campaignType,\r\n}: FooterProps) {\r\n const styles = useFooterStyles();\r\n const { scope } = useContext(ScopeContext) as IScopeContext;\r\n const {\r\n current, total, onNext, onPrevious,\r\n } = paginationConfig;\r\n\r\n const onClick = useCallback(() => {\r\n let path = '/campaign/vnext/locations/campaign';\r\n // LinkedIn campaigns don't support campaign locations grid so far, so route user to campaign settings page\r\n if (campaignType === 'LinkedIn') {\r\n path = '/campaign/vnext/settings';\r\n }\r\n scope.save(path);\r\n }, [campaignType, scope]);\r\n\r\n return (\r\n
\r\n \r\n {showPagination &&\r\n
\r\n
\r\n }\r\n
\r\n );\r\n}\r\n","import { makeStyles } from '@fluentui/react-components';\r\n\r\nexport const useNoLocationsStyles = makeStyles({\r\n container: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n flexGrow: 1,\r\n },\r\n imageContainer: {\r\n flexGrow: 1,\r\n flexBasis: '0',\r\n maxHeight: '210px',\r\n width: '100%',\r\n overflowY: 'hidden',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n display: 'flex',\r\n backgroundColor: '#FAFAFA',\r\n },\r\n image: {\r\n maxHeight: '148px',\r\n },\r\n title: {\r\n marginTop: '16px',\r\n },\r\n});\r\n\r\n","import classNames from 'classnames';\r\nimport React from 'react';\r\nimport { Image, Subtitle2, Body1 } from '@fluentui/react-components';\r\n\r\nimport { useNoLocationsStyles } from '../styles/no-locations-styles';\r\nimport { i18nProps } from '../utils/types';\r\nimport noDataImage from '../../media/no-data-image.png';\r\n\r\nexport function NoData({ i18n }: { i18n: i18nProps }) {\r\n const styles = useNoLocationsStyles();\r\n return (\r\n
\r\n
\r\n {i18n.getString(_TL_('No\r\n
\r\n {i18n.getString(_TL_('No data available'))}\r\n {i18n.getString(_TL_('To update the tile, select a different date range. If the tile remains blank, your account might have no data.'))}\r\n
\r\n );\r\n}\r\n","import React from 'react';\r\nimport { Shimmer, ShimmerElementType } from '@fluentui/react';\r\n\r\nconst rowElement = [{ type: ShimmerElementType.line, height: 43 }];\r\nconst mapElement = [{ type: ShimmerElementType.line, height: 240 }];\r\n\r\nexport function TableShimmer() {\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n}\r\n\r\nexport function MapShimmer() {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n}\r\n","import { makeStyles } from '@fluentui/react-components';\r\n\r\nexport const useTableStyles = makeStyles({\r\n value: {\r\n display: 'flex',\r\n justifyContent: 'flex-end',\r\n },\r\n});\r\n\r\n","import React from 'react';\r\nimport classNames from 'classnames';\r\nimport {\r\n Table, TableCell, TableRow, TableBody, Body1 as Text\r\n} from '@fluentui/react-components';\r\n\r\nimport { TableShimmer } from './shimmer';\r\nimport { LOCATIONS_PER_PAGE } from '../utils/const';\r\nimport { getPageLocations } from '../utils/get-page-locations';\r\nimport { TopLocationsTableProps } from '../utils/types';\r\nimport { useTableStyles } from '../styles/table-styles';\r\n\r\nexport function TopLocationsTable({\r\n i18n,\r\n isLoading,\r\n locations,\r\n paginationConfig,\r\n}: TopLocationsTableProps) {\r\n const styles = useTableStyles();\r\n if (isLoading) {\r\n return ;\r\n }\r\n const rowsToDisplay = getPageLocations(locations, paginationConfig, LOCATIONS_PER_PAGE);\r\n return (\r\n \r\n \r\n {rowsToDisplay.map(({ name, formattedValue }) => (\r\n \r\n \r\n {name}\r\n \r\n \r\n {formattedValue}\r\n \r\n \r\n ))}\r\n \r\n
\r\n );\r\n}\r\n","import { PaginationConfigProps, LocationData } from './types';\r\n\r\nexport function getPageLocations(locations: LocationData[], paginationConfig: PaginationConfigProps, locationsPerPage: number) {\r\n return locations.slice((paginationConfig.current - 1) * locationsPerPage, paginationConfig.current * locationsPerPage);\r\n}\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useMapStyles = makeStyles({\r\n container: {\r\n height: '240px',\r\n width: '100%',\r\n '& .tool-tip-container': {\r\n ...shorthands.padding('15px'),\r\n boxShadow: '0 3.2px 7.2px 0 rgba(0,0,0,.132), 0 0.6px 1.8px 0 rgba(0,0,0,.108)',\r\n backgroundColor: 'rgba(255, 255, 255, 0.95)',\r\n '@supports (backdrop-filter: blur(60px))': {\r\n backdropFilter: 'blur(60px)',\r\n backgroundColor: 'rgba(255, 255, 255, 0.25)',\r\n },\r\n\r\n '& .date-range': {\r\n whiteSpace: 'nowrap',\r\n ...shorthands.margin('10px 0'),\r\n },\r\n '& .metric-container': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '& .metric-container .metric-name': {\r\n marginRight: '5px',\r\n },\r\n '& .metric-container .metric-value': {\r\n fontWeight: 'bold',\r\n },\r\n '& .bubble-icon': {\r\n width: '12px',\r\n height: '12px',\r\n ...shorthands.borderStyle('solid'),\r\n ...shorthands.borderWidth('1px'),\r\n ...shorthands.borderColor('#107C10'),\r\n ...shorthands.borderRadius('6px'),\r\n marginRight: '5px',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n },\r\n '& .bubble-icon .dot': {\r\n width: '4px',\r\n height: '4px',\r\n ...shorthands.borderStyle('solid'),\r\n ...shorthands.borderWidth('2px'),\r\n ...shorthands.borderColor('#107C10'),\r\n ...shorthands.borderRadius('4px'),\r\n backgroundColor: '#107C10',\r\n },\r\n },\r\n },\r\n});\r\n\r\n","import React, { useRef, useMemo, useCallback } from 'react';\r\nimport { BingMapsView, LocationTarget, TARGETING_TYPE } from '@bingads-webui-react/bing-maps';\r\n\r\n// @ts-ignore\r\nimport tooltip from './map-tooltip.pug';\r\nimport { MapShimmer } from './shimmer';\r\nimport { TopLocationsMapProps, LocationData } from '../utils/types';\r\nimport { useMapStyles } from '../styles/map-styles';\r\n\r\nclass TopLocationTarget extends LocationTarget {\r\n topLocation: LocationData;\r\n\r\n constructor(topLocation: LocationData) {\r\n const location = {\r\n GeoPoint: topLocation.location,\r\n ExpandedName: topLocation.name,\r\n };\r\n super(location, TARGETING_TYPE.Top, topLocation.radius, 'mi');\r\n this.topLocation = topLocation;\r\n }\r\n}\r\n\r\nexport function TopLocationsMap({\r\n isLoading,\r\n locations,\r\n}: TopLocationsMapProps) {\r\n const styles = useMapStyles();\r\n const mapRef = useRef();\r\n\r\n const locationTargets = useMemo(() => {\r\n if (locations) {\r\n return locations.map(l => new TopLocationTarget(l));\r\n }\r\n return [];\r\n }, [locations]);\r\n\r\n const onGetTooltipHtmlContent = useCallback((event, locationTarget) => tooltip({\r\n name: locationTarget.topLocation.name,\r\n metricName: `${locationTarget.topLocation.metricName}:`,\r\n formattedValue: locationTarget.topLocation.formattedValue,\r\n date: locationTarget.topLocation.date,\r\n }), []);\r\n\r\n if (isLoading) {\r\n return ;\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n}\r\n","import _ from 'underscore';\r\nimport { useState, useEffect, useMemo } from 'react';\r\n\r\nimport { LOCATIONS_PER_PAGE } from '../utils/const';\r\nimport { LocationData, paginationConfigProps } from '../utils/types';\r\n\r\nexport const usePaginationConfig = (locations: Array): paginationConfigProps => {\r\n const [state, setState] = useState({ current: 0, total: 0 });\r\n\r\n useEffect(() => {\r\n if (!_.isEmpty(locations)) {\r\n setState({\r\n current: 1,\r\n total: Math.ceil(locations.length / LOCATIONS_PER_PAGE),\r\n });\r\n }\r\n }, [locations]);\r\n\r\n return useMemo(() => {\r\n const next = state.current + 1;\r\n let onNext: () => void = _.noop;\r\n if (next <= state.total) {\r\n onNext = () => setState({ ...state, current: next });\r\n }\r\n\r\n const previous = state.current - 1;\r\n let onPrevious: () => void = _.noop;\r\n if (previous > 0) {\r\n onPrevious = () => setState({ ...state, current: previous });\r\n }\r\n\r\n return ({\r\n current: state.current,\r\n total: state.total,\r\n onNext,\r\n onPrevious,\r\n });\r\n }, [state]);\r\n};\r\n","import _ from 'underscore';\r\nimport React, { ComponentType, useState, useCallback, useContext } from 'react';\r\nimport { PreferenceContext } from '@bingads-webui-react/preference-context';\r\n\r\nimport { TopLocationsCardProps } from '../utils/types';\r\n\r\nconst cardId = 'CardType-TopLocations';\r\n\r\ntype WithMetricProps = {\r\n preferenceFromServer?: string;\r\n patchPreference?: Function;\r\n} & TopLocationsCardProps;\r\n\r\nexport function withPMaxPreferencesMetric

(WrappedComponent: ComponentType

): ComponentType> {\r\n const HoC = (props) => {\r\n const {\r\n preferenceFromServer,\r\n patchPreference,\r\n } = props;\r\n const preferenceService = useContext(PreferenceContext) as any;\r\n const preferences = preferenceService.findByName('dashboard/preferences');\r\n const cardPreferences = preferences?.Data?.['default-campaign-performancemax']?.cards || [];\r\n const currentCardPreferences: any = _.find(cardPreferences, (card: any) => card.id === cardId);\r\n const initMetric = currentCardPreferences?.options?.metric ?? 'Clicks';\r\n const [metric, setMetric] = useState(preferenceFromServer || initMetric);\r\n\r\n const onMetricChange = useCallback((newMetric: string) => {\r\n setMetric(newMetric);\r\n\r\n if (patchPreference) {\r\n patchPreference({ metric: newMetric });\r\n return;\r\n }\r\n\r\n let cards;\r\n if (!_.find(cardPreferences, (card: any) => card.id === cardId)) {\r\n cards = [...cardPreferences, { id: cardId, options: { metric: newMetric } }];\r\n } else {\r\n cards = cardPreferences.map((card) => {\r\n if (card.id === cardId) {\r\n return {\r\n ...card,\r\n options: {\r\n ...card.options,\r\n metric: newMetric,\r\n },\r\n };\r\n }\r\n return card;\r\n });\r\n }\r\n const preferencesData = preferences?.Data || {};\r\n preferenceService.set({\r\n Name: 'dashboard/preferences',\r\n ...preferences,\r\n Data: {\r\n ...preferencesData,\r\n 'default-campaign-performancemax': {\r\n ...preferencesData['default-campaign-performancemax'],\r\n cards,\r\n },\r\n },\r\n });\r\n }, [cardPreferences, patchPreference, preferenceService, preferences]);\r\n\r\n return ();\r\n };\r\n\r\n return HoC;\r\n}\r\n","import { makeStyles } from '@fluentui/react-components';\r\n\r\nexport const useCardStyles = makeStyles({\r\n container: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent: 'space-between',\r\n height: '100%',\r\n },\r\n wideContainer: {\r\n display: 'flex',\r\n },\r\n wideContentWrapper: {\r\n width: '50%',\r\n },\r\n footer: {\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n },\r\n});\r\n\r\n","import classNames from 'classnames';\r\nimport React, { useMemo, useEffect } from 'react';\r\nimport { withHeaderState } from '@bingads-webui-campaign-react/overview-card';\r\n\r\nimport { useTopLocationsData } from './use-top-locations-data';\r\nimport { MetricSelector } from './metric-selector';\r\nimport { Footer } from './footer';\r\nimport { NoData } from './no-data';\r\nimport { TopLocationsTable } from './top-locations-table';\r\nimport { TopLocationsMap } from './top-locations-map';\r\nimport { usePaginationConfig } from './use-pagination-config';\r\nimport { withPMaxPreferencesMetric } from './with-preferences-metric';\r\nimport { withBingMapsContext } from './with-bing-maps-context';\r\nimport { useCardStyles } from '../styles/card-styles';\r\nimport { VIEWS } from '../utils/const';\r\nimport { TopLocationsCardProps } from '../utils/types';\r\n\r\n\r\nexport function TopLocationsCardInternal({\r\n headerState,\r\n i18n,\r\n dateRange,\r\n metric,\r\n onMetricChange,\r\n perfMarkerUtils,\r\n campaignType,\r\n}: TopLocationsCardProps) {\r\n const styles = useCardStyles();\r\n const {\r\n willFetchData,\r\n willRender,\r\n done,\r\n } = perfMarkerUtils;\r\n const { isLoading, locations } = useTopLocationsData({\r\n metric,\r\n dateRange,\r\n i18n,\r\n willFetchData,\r\n willRender,\r\n });\r\n const paginationConfig = usePaginationConfig(locations);\r\n const hasLocations = locations?.length > 0;\r\n\r\n useEffect(() => {\r\n if (!isLoading) {\r\n done();\r\n }\r\n }, [done, isLoading, willRender]);\r\n\r\n const contentArea = useMemo(() => {\r\n if (!hasLocations && !isLoading) {\r\n return ;\r\n }\r\n if (headerState?.isWideMode) {\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 if (headerState?.viewOption === VIEWS.MAP) {\r\n return ;\r\n }\r\n return ;\r\n }, [hasLocations, isLoading, headerState, i18n, locations, paginationConfig, styles]);\r\n\r\n\r\n const showPagination = hasLocations && !isLoading && (headerState?.isWideMode || headerState?.viewOption === VIEWS.TABLE);\r\n\r\n return (\r\n
\r\n \r\n {contentArea}\r\n \r\n
\r\n );\r\n}\r\n\r\nexport const TopLocationsCard = withPMaxPreferencesMetric(withBingMapsContext(withHeaderState(TopLocationsCardInternal)));\r\n","import React, { useContext } from 'react';\r\nimport hoistNonReactStatics from 'hoist-non-react-statics';\r\n\r\nimport { getDisplayName } from '@bingads-webui-react/hoc-utils';\r\nimport { BingMapsContextProvider } from '@bingads-webui-react/bing-maps';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\n\r\n// TODO: Send this in serverContext\r\nconst BING_MAPS_API_KEY = 'AgRuCtepgsuuCYV9J6S6w1j8ay2JJwnu8f5EPgv4kkoJoIuka8yui-NzKrvlESTQ';\r\n\r\nexport function withBingMapsContext(WrappedComponent) {\r\n const HOC = (props) => {\r\n const serverContext = useContext(ServerContext) as any;\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n };\r\n\r\n HOC.displayName = `withBingMapsContext(${getDisplayName(WrappedComponent)})`;\r\n\r\n hoistNonReactStatics(HOC, WrappedComponent);\r\n\r\n return HOC;\r\n}\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useViewSelectorStyles = makeStyles({\r\n container: {\r\n maxWidth: '300px',\r\n display: 'flex',\r\n flexGrow: '0',\r\n justifyContent: 'flex-end',\r\n ...shorthands.gap('5px'),\r\n },\r\n button: {\r\n width: 'fit-content',\r\n minWidth: 'auto',\r\n ...shorthands.padding('0px'),\r\n },\r\n buttonText: {\r\n ...shorthands.overflow('hidden'),\r\n lineBreak: 'anywhere',\r\n textOverflow: 'ellipsis',\r\n whiteSpace: 'nowrap',\r\n },\r\n});\r\n","import React, { useCallback, useEffect } from 'react';\r\nimport classNames from 'classnames';\r\nimport {\r\n Menu,\r\n MenuButton,\r\n MenuPopover,\r\n MenuList,\r\n MenuItem,\r\n MenuTrigger,\r\n Caption1 as Text\r\n} from '@fluentui/react-components';\r\n\r\nimport { useViewSelectorStyles } from '../styles/view-selector-styles';\r\nimport { VIEWS, VIEW_STRINGS } from '../utils/const';\r\nimport { TopLocationViewSelectorProps } from '../utils/types';\r\n\r\nconst WIDE_MODE_WIDTH = 500;\r\n\r\nexport function TopLocationViewSelector({\r\n i18n,\r\n state,\r\n setState,\r\n dimensions,\r\n}: TopLocationViewSelectorProps) {\r\n const styles = useViewSelectorStyles();\r\n\r\n useEffect(() => {\r\n if (!state) {\r\n setState({\r\n viewOption: VIEWS.MAP,\r\n });\r\n }\r\n }, [state, setState]);\r\n\r\n useEffect(() => {\r\n const isWideMode = dimensions?.width > WIDE_MODE_WIDTH;\r\n if (state?.isWideMode !== isWideMode) {\r\n setState(s => ({\r\n ...s,\r\n isWideMode,\r\n }));\r\n }\r\n }, [setState, state, dimensions]);\r\n\r\n const onViewSelected = useCallback((viewOption: VIEWS) => {\r\n setState(s => ({\r\n ...s,\r\n viewOption,\r\n }));\r\n }, [setState]);\r\n\r\n if (!state || state?.isWideMode) {\r\n return <>;\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n {i18n.getString(_TL_('View:'))} {i18n.getString(VIEW_STRINGS[state.viewOption] ?? _TL_(''))}\r\n \r\n \r\n \r\n \r\n onViewSelected(VIEWS.MAP)}>{i18n.getString(VIEW_STRINGS[VIEWS.MAP])}\r\n onViewSelected(VIEWS.TABLE)}>{i18n.getString(VIEW_STRINGS[VIEWS.TABLE])}\r\n \r\n \r\n \r\n
\r\n );\r\n}\r\n\r\nTopLocationViewSelector.defaultProps = {\r\n state: undefined,\r\n};\r\n"],"names":["getAdStatuStyles","dropdown","borderColor","display","selectedOption","backgroundColor","option","adStatusOptions","textKey","_TL_","value","dropdownId","AdStatus","_ref","onAdStatusChange","data","i18n","useContext","I18nContext","classes","useDefaultStyles","handleStatusChange","useCallback","e","optionValue","currentValue","currentText","getString","_","_jsx","FluentProvider","theme","webLightTheme","children","_jsxs","className","Label","id","Dropdown","onOptionSelect","selectedOptions","map","Option","classNames","ValidatedAdStatus","withCustomValidation","validationProps","updateValidation","status","newData","useEffect","AdStatusSection","React","props","expand","rest","_objectWithoutProperties","_excluded","descriptionsCardSummaryDetails","useMemo","getStatusSummary","ValidatedPanel","_objectSpread","title","TextTitle","titleKey","iconAltText","details","attentionBeaconProps","getExtraProps","getPanelErrorProps","actuationProps","expandKey","countries","AE","code","name","AF","AD","AI","AG","AL","AM","AO","AQ","AR","AT","AU","AW","BB","BD","BF","BG","BH","BI","BJ","BM","BN","BO","BR","BS","BT","BV","BY","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FM","FR","GA","GB","GD","GE","GG","GH","GI","GR","GT","GW","GY","HK","HN","HR","HT","HU","ID","IE","IL","IN","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MG","MK","ML","MM","MN","MO","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PG","PH","PK","PL","PT","PS","QA","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SK","SM","SN","SO","SR","ST","SV","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VN","VU","WS","YE","ZM","ZW","IO","XK","BQ","GS","WF","platforms","IOS","ANDROID","WINDOWS","attachIdsToResults","results","result","AppStoreId","AppTitle","useAppStoreRepository","platform","serverContext","ServerContext","acid","CurrentAccount","AdvertiserCustomerID","_scope$values","ScopeContext","scope","values","aid","cid","oDataConfig","odataPath","hostname","document","location","toLowerCase","indexOf","isLocal","odataToken","Token","oDataToken","concat","ServicesEndpoints","CampaignAPI","oDataPath","getODataConfig","searchAppManual","searchQuery","country","baseURL","url","queryify","$top","$skip","$search","$filter","countryCode","odata","get","then","response","searchApp","publisherQueries","getMatchedPublishers","newMenuItems","MatchingAppications","app","AppId","IconUrl","ImageLink","DeveloperName","PublisherName","AppPlatform","searchAppById","useStyles","makeStyles","appPanel","alignItems","marginTop","marginBottom","padding","columnGap","marginRight","flexDirection","fontSize","fontWeight","AppPanel","selectedApp","readOnly","onRemoveApp","AppUrl","FinalAppUrl","style","justifyContent","Image","height","width","src","Link","href","inine","target","Button","icon","Dismiss16Filled","appearance","onClick","useAppItemStyles","appItem","image","marginLeft","lineHeight","color","tokens","colorNeutralForeground1","AppItem","appTitle","appLogoUrl","appCountryCode","mergeClasses","Text","defaultProps","appStoreSelector","rowGap","maxWidth","UnvalidatedStoreAppSelector","onChange","defaultSelected","placeholderText","isCountryRefinementEnabled","_useState","useState","_useState2","_slicedToArray","setSelectedOption","_useState3","_useState4","advancedSearchMode","setAdvancedSearchMode","_useState5","_useState6","selectedCountry","setSelectedCountry","_useAppStoreRepositor","placeholder","onInputChange","searchValue","customRender","CountryCode","onCountrySelect","manualSearch","length","appStoreContainer","SearchableMultiSelectorInput","fetchFn","multiSelect","disableTags","onRenderOption","Checkbox","label","labelPosition","checked","StoreAppSelectorInternal","_ref2","isMounted","AppSetting","StoreAppSelector","withError","parseBudgetDetails","currency","BudgetDetailKeys","key","detail","Low","Mid","High","Range","formatNumber","CostPerConversion","CostPerClick","formatCurrency","Math","round","CTR","parseViewModelToMTModelForPMax","campaign","assetGroup","latestSuggestedBudget","isPerformanceEstimation","Budget","BiddingScheme","CampaignType","Languages","conversionGoals","locationTargets","_ref3","BusinessName","Descriptions","Headlines","LongHeadlines","CurrentBudgetAmount","Amount","_ref5","Type","TargetCpa","TargetRoas","TargetImpressionShare","MaxCpcAmount","MaxCpc","_ref7","goalSelection","goalScopeSelection","currentLocations","currentLevelSettings","LocationTargets","CriterionType","Criterion","LocationCriterion","LocationId","RadiusTargets","Radius","RadiusCriterion","Latitude","Longitude","BiddingSchemeId","biddingStrategyTypeId","MaxConversions","GoalCategory","goal","CampaignTypeId","CampaignTypeToAdvertiserChannelTypeId","LocationIds","CurrencyCode","GetBudget","RecommendedBudget","AdvertiserBudget","floor","Keywords","Age","MODE","CREATION","EDITING","BudgetSuggestionTiers","Advanced","Balanced","Starter","CustomBudget","BudgetSuggestionOfflineTiers","RecommendedBudgetSuggestionTier","ApiKeysBudgetSuggestion","BudgetTierTitles","Suggested","Current","Impressions","Clicks","Conversions","BudgetDetailKeysByBidType","_defineProperty","MaxConversionValue","MaxClicks","EnhancedCpc","CostPerSale","BudgetDetailKeysByCampaignType","CampaignTypes","PerformanceMax","BudgetDetailsKeysText","popupId","getMatchingBudgetTierBasedOnBudget","budgetSuggestionData","budgetAmount","mode","matchingBudgetTier","budget","BudgetAmountDaily","parseFloat","BudgetAmountMonthly","parserByCampaignType","getParserByCampaignType","campaignType","Default","num","toFixed","toString","Product","Shopping","DynamicSearchAds","Hotel","Audience","Smart","getRadioStyles","root","radioTitle","flexBox","flexWrap","leftBox","budgetDay","borderRight","verticalAlign","paddingRight","budgetMonth","column","metric","rightBox","badge","borderRadius","textAlign","border","background","metricTitle","metricValue","budgetDisclaimer","skeletionStyle","Metrics","budgetDetails","isLoading","bidType","getStyles","useResponsiveStyles","Skeleton","animation","SkeletonItem","_Fragment","HelpIcon","topic","BudgetItemLabel","tier","BudgetDetails","as","size","CustomBudgetLabel","_ref4","isSelected","onUpdateCustomBudget","customPerformanceData","hidePerformanceData","customBudgetResult","defaultBudget","minBudget","maxBudget","showDropdown","onSelectCurrency","currencies","ValidatedBudgetInput","onValidate","initialValue","alwaysShowError","isValid","budgetKey","selectedRadio","radio","radioGroup","BudgetSuggestionContainer","onBudgetValidate","selectedBudget","setSelectedBudget","setCustomBudgetResult","hasError","BudgetAmount","budgetTier","messages","matchingTier","RadioGroup","defaultValue","val","Object","keys","Radio","radioGroupContainer","gap","currentBudget","paddingLeft","borderBottom","budgetTitle","BudgetSuggestionOfflineContainer","formatBudgetSuggestionResponse","budgetResponse","template","JSON","stringify","formatBudgetTemplate","appliedBudget","Id","formattedBudgetResponse","CampaignID","CurrentBudget","BiddingStrategy","BudgetApplied","BudgetTier","useBudgetMetricsLogger","activity","ActivityContext","logBudgetFetchMetrics","trace","logCustomBudgetPerformanceMetrics","_ref6","performanceMetricsResponse","CustomBudgetPerformance","formatCustomBudgetPerformanceMetrics","logBudgetLandscapeMetrics","budgetLandscapeResponse","formatBudgetLandscapeTemplate","saveBudgetSuggestionMetrics","_ref8","useBudgetSuggestionRepository","campaignId","campaignIdFromScope","currentCampaignId","_useBudgetMetricsLogg","AdInsightAPI","oDataOptions","contentType","path","useRef","fetchBudgetSuggestionData","payload","options","post","parsedBudgetSuggestion","budgetSuggestions","budgetDailyKey","budgetDetailsKey","parseBudgetSuggestionAPI","current","fetchInitialBudgetSuggestionData","parser","saveBudget","biddingScheme","campaignResource","edmCampaign","types","resolve","ResourceIdentifier","bulkUpdate","bind","bulkCreate","createOrUpdateCampaign","parseDecimal","res","catch","error","Promise","fetchBudgetLandscapeData","parsedBudgetLandscape","budgetLandscapeData","BudgetCurrent","BudgetCurrentDaily","BudgetCurrentDetails","BudgetSuggested","BudgetSuggestedDaily","BudgetSuggestedDetails","parseBudgetLandscapeAPI","loadBudget","fetchCustomBudgetPerformanceData","parsedBudgetSuggestionResponse","updatedCampaign","sort","a","b","parsedPerformanceEstimate","performanceEstimate","BudgetAdvertiser30Day","AdvertiserBudgetDetails","parsePerformanceEstimateAPI","loadBudgetPartial","args","BudgetSuggestion","_useBudgetSuggestionR","setIsLoading","setBudgetSuggestionData","setCustomPerformanceData","finally","onBudgetSuggestionChange","err","undefined","editBudgetSuggestionButton","learnMoreContent","outline","BudgetSuggestionDialog","onBudgetChange","enableSaving","onGridRefresh","showDialog","onTriggerDialog","isOpen","setIsOpen","_useState7","_useState8","triggerDialog","isDialogOpen","Dialog","modalType","open","dialog","DialogSurface","DialogBody","DialogTitle","DialogContent","LearnMoreLink","linkText","DialogActions","position","buttonGroup","applyButton","useConfirmDialog","instrumentationInfo","arguments","hidden","additionalProps","setAdditionalProps","_defaultProps$additio","content","_defaultProps$additio2","hideCancel","_defaultProps$additio3","hideConfirm","onConfirm","originalOnCancel","onCancel","_defaultProps$additio4","secondaryButtons","onDisplay","_defaultProps$additio5","passThroughProps","dialogName","periodProps","dismissDialog","buttonKey","internalOnCancel","onConfirmClicked","onOpenChange","fluid","disabled","isConfirmButtonDisabled","confirmText","buttonProps","cancelText","imageWrapper","useConfirmDialogWithImage","newContent","Fragment","imageSrc","alt","_useConfirmDialog","_useConfirmDialog2","TABLIST","SEARCH_INPUT_TYPES","SEARCH_INPUT_TITLES","SEARCH_INPUT_PLACEHOLDERS","getTabListStyles","divider","KeywordTab","selectedTab","onTabSelect","TabList","selectedValue","Tab","Divider","compact","minimumFractionDigits","maximumFractionDigits","getSearchRangeString","range","base","pow","log10","ceil","getSearchRange","formatDecimal","columnOrder","fieldName","minWidth","sortable","onRender","_item","index","pagination","GridContext","state","pageNumber","pageSize","columnKeyword","isResizable","columnSearches","item","AggregateMetric","AverageSearchVolume","onRenderHeader","topicId","HelpPopup","GridDataSource","onSelectChange","_useContext","dispatch","sortedColumn","sourceItemsInAllPages","selectedItemsInAllPages","isSortedDescending","useClientSortingPaging","sortFunction","usePreservedSelection","type","items","slice","totalCount","propTypes","PropTypes","isRequired","getNoDataWarningStyles","imageContainer","keyHint","description","NoRecommendationWarning","searchImage","getGridStyles","borderTop","KeywordRanking","allData","selectedData","gridColumns","columns","initialGridContext","selectionMode","SelectionMode","multiple","allColumns","selectedColumns","initAllItems","initSelectedItems","GridContextProvider","ContextualDetailsList","stickyHeader","checkboxVisibility","CheckboxVisibility","always","getSearchInputStyles","searchInputContainer","searchBox","searchInputTitleStyles","SearchInput","onSearch","enabled","SearchBox","ariaLabel","iconProps","iconName","pointerEvents","cursor","showIcon","SearchInputStack","keywords","inputStatus","onUrlChange","onKeywordsChange","Stack","childrenGap","horizontal","isAllLocationsUnsupported","targetedLocationInfo","locations","numLocationsTargeted","onlyTire2LangaugesSelected","languages","languagesCanUse","useTireTwoMarkets","locationSupportedLanguages","getKeywordPlannerSupportedLanguagesByLocationIds","getLanguagesSupportedByLocations","isSelectedLanguagesOnlyTire2ForKeywordPlanner","exampleData","Name","TimePeriod","AverageCPC","CompetitionLevel","Suggestions","Keyword","SourceType","Tag","Existing","odataLimits","useKeywordSuggestion","_ref2$scenario","scenario","window","e2eTestEnvironment","requestDataObj","req","criteria","hasOnlyKeyword","requestUrl","substr","push","Url","keywordsArray","keyword","languagesToUse","countryLocationInfo","language","Language","languageSupportedLoations","getKeywordPlannerSupportedLocationIdsByLangauges","locationIdsSupportedByLanguage","countryLocationId","locationId","requestLocations","requestData","customHeader","dummy","textStatus","xhr","currentSourceReqId","getResponseHeader","suggestions","suggestion","RequestId","getSearchIdeaModel","_ref3$keywords","_ref3$url","isIdeas","CONTROL_TYPES","SEARCH_IDEA_PRODUCTS","rawKeywords","parsedKeywords","LANDING_PAGE","URL_OPTION_TYPES","PAGE","LANGUAGE","LOCATION_LD","LOCATION_TARGET_LIMIT","NETWORK","NETWORK_TYPES","ALL","KEYWORD_FILTERS_GROUP","KEYWORD_FILTER_WITH_RANGE_TYPES","rangeKeywordFilterType","operator","OPERATOR_TYPES","START","COMPETITION","INCLUDED_KEYWORD","NEGATIVE_KEYWORD","ACCOUNT_KEYWORD_DEDUPE","CATEGORY","categoryId","DATE_RANGE","getTargetedLocationInfo","criterions","permissions","dynamic","KeywordPlannerLiteRefactorPhase1","KPLocations","includedCriterions","Status","SelectionStatus","LocationTargetTypes","criterion","locationType","LocationType","LOCATION_COUNTRYCODE_WHITE_LIST","LOCATION_TYPE","COUNTRY","locationsObj","locationFilters","keywordPlannerSupportedLanguagesIdValueMap","keywordPlannerSupportedLanguages","supportedLanguages","getSupportedLanguages","languageOptions","languages2Use","lang","SearchInputStackContainer","beforeSearch","onSearchSuccess","onSearchFinally","setUrl","setKeywords","recommendateRequest","Permissions","DynamicPermissions","useSearchBoxStatus","getSearchIdea","useKeywordPlannerService","signal","model","isLanguageDecoupling","channel","CHANNEL_TYPES","CAMPAIGN_CREATION","ErrorStatus","getKeywordGroupsStyles","container","getKeywordGroupStyles","checkAllLink","addAllLink","getViewAllPanelStyles","getActionBarStyles","bottom","margin","ActionBar","onAdd","Item","getPanelHeaderStyles","PanelHeader","SparkleIcon","KeywordGroupViewAllPanel","onClose","selection","setSelection","onSelectionChange","GridKeywords","Panel","panelClassName","flexContainer","SelectableSuggestedItemInternal","onItemToggle","selectedItems","onKeywordToggle","itemIndex","itemText","GroupKeyword","SelectableSuggestedItem","onToggle","some","s","KeywordGroup","groupName","groupItems","onAddAll","onBulkChange","isPanelOpen","setIsPanelOpen","currentSelectedItems","sortedGroupItems","g","unSelectedItems","_useCircularBufferVie","unselectedCollection","selectedCollection","page","setPage","currentIndex","setCurrentIndex","selectedCount","unselectedCount","newPage","count","useCircularBufferViewWithSelected","_useCircularBufferVie2","availableInlineRecommendations","canMoveNext","moveNext","onClickRefresh","GroupKeywordsSize","onPanelOpen","onAddAllClick","GroupKeywords","newSelectedItems","differenceBy","onRemoveAllClick","renderSelectableSuggestedItem","renderButtons","MoreSuggestionsInlineButton","useStyleFluent2","SuggestedItemsMultiSelect","suggestedItems","onSuggestedItemToggle","wrap","KeywordGroups","selectedItem","find","filter","_toConsumableArray","unionBy","deselectItems","selectedResult","disableShrink","getKeywordPlannerStyles","dataContainer","overflowY","overflowX","NoData","KeywordPlanner","setSelectedTab","blocking","setBlocking","setAllData","setSelectedData","_useState9","_useState10","refreshKey","setRefreshKey","_e","tabData","onRecommendationSuccess","traceInfo","dataWithKey","keywordAggregations","Aggregations","group","keywordText","requestId","unblockPanel","blockPanel","allRankingData","UiBlocker","loadingText","getPanelStyles","overflow","KeywordPlannerPanel","ThemeProvider","components","ComponentSettings","core","ThemeFluent","statusList","shorthands","alignContent","progressBar","StatusSection","denominator","numerator","Active","max","StatusPopoverItem","ProgressBar","thickness","carouselParent","flexGrow","alignSelf","parentContainer","transitionProperty","transitionDuration","transitionTimingFunction","chevronButton","boxShadow","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","borderLeftStyle","borderRightStyle","borderTopStyle","borderBottomStyle","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth","borderLeftColor","borderRightColor","borderTopColor","borderBottomColor","chevronButtonLeft","zIndex","left","chevronButtonRight","right","hintRight","backgroundImage","hintLeft","transform","useSimpleCarouselStyles","paddingBottom","cardContents","Carousel","contents","contentWidth","offset","setOffset","contentContainerWidth","setContentContainerWidth","contentContainerNode","handleResize","offsetWidth","addEventListener","removeEventListener","measuredRef","node","displayedContentCount","getFullyShownContentsCount","noMoreResult","leftIconButton","shape","ChevronLeft12Regular","onKeyDown","event","querySelector","focus","preventDefault","rightIconButton","ChevronRight12Regular","role","total","current1","Array","join","current2","tabIndex","showRightIconButton","ref","SimpleCarousel","actionCardsList","card","iconArea","cardsMessage","cardTitle","textOverflow","textWrap","cardMessage","cardButton","nameText","footer","ActionCard","cardMsg","onCardButtonClicked","cardButtonText","learnMoreLink","StatusIcon","Body2","Tooltip","relationship","Body1","block","rel","ActionCards","isSmallScreen","inset","Caption1","campaignTitle","campaignMsg","DiagnosticCard","campaignStatusTitle","campaignStatusMsg","responsiveSize","detailsToFix","Title2","SupportedFontsSVGIcons","Arial","Bahnschrift","Calibri","Consolas","Garamond","Georgia","Impact","Tahoma","Verdana","fontFamilies","text","svg","fontWeights","useFontsSelectorStyles","fontSelectWrapper","spacingVerticalS","fontSelect","fontSelectValue","top","fontSelectInputVisible","fontSelectInputTransparent","FontsFamilySelector","inlinePopup","selectClassName","overrideFontFamilies","fontSelectId","fontFamilyOptions","selectedFontSvg","selectedFont","family","Body1Stronger","Combobox","freeform","_ev","fontWeightSelectWrapper","fontWeightSelect","FontsWeightSelector","overrideFontWeights","fontWeightSelectId","fontWeightOptions","selectedFontWeightText","selectedFontWeight","weight","PAGE_TYPES","SEARCH_VOLUME_PRODUCTS","SEARCH_VOLUME_UPLOAD_PRODUCTS","TRAFFIC_ESTIMATE_KEYWORDS","TRAFFIC_ESTIMATE_UPLOAD_KEYWORDS","TRAFFIC_ESTIMATE_ADGROUP_KEYWORDS","TRAFFIC_ESTIMATE_BID","TRAFFIC_ESTIMATE_BUDGET","LOCATION","LOCATION_LEVEL","SEARCH_VOLUME_CHART_TYPE","AVERAGE_MONTHLY_SEARCH","SUGGESTED_BID","AD_IMPRESSION_SHARE","IDEA_DATE_RANGE_DATA_TYPE","DOMAIN","LANGUAGE_TYPES","OWNED_AND_OPERATED","SYNDICATION","END","COMPETITION_LEVEL_TYPES","GRID_TYPES","GRID_LEVELS","ADGROUP","KEYWORD","INNER_KEYWORD","ADGROUP_ESTIMATE","KEYWORD_ESTIMATE","INNER_KEYWORD_ESTIMATE","DEVICE_ESTIMATE","LOCATION_ESTIMATE","ADGROUP_ESTIMATE_COLUMNS","AVERAGE_CPC","AVERAGE_POSITION","CLICK","COST","IMPRESSION","KEYWORD_ESTIMATE_COLUMNS","IDEA_ATTRIBUTE_TYPES","LANDSCAPE_TYPES","SECTION_TYPES","GROUP_POSITION","PERIOD_TYPE","TRAFFIC_EST_CHART_TYPE","STATE","SUBGEOGRAPHY","METROAREA","CITY","POSTALCODE","COUNTY","DMA","TARGETED","SEARCH_VOLUME_LOCATION_LEVEL","KEYWORD_PLANNER_PREFERENCE_PREFIX","REQUEST_SUPPORTED_LANGUAGES","countryId","prefix","lcid","DeviceTypes","MATCH_TYPE","EST_BUTTON_TYPE","EST_DATA_TYPE","EST_DEVICE_DROPDOWN_TYPE","LOG_TYPES","LOG_ACTION_TYPES","LOG_TAB_OPTIONS","LOG_SORT_BY_OPTIONS","LOG_TRACKING_ACTIONS","AdGroupName","MaxCPC","KEYWORD_IDEA_INNER","LANDING_PAGE_OPTIONS","KEYWORD_PLANNER_TOOL","ADGROUP_CREATION","KEYWORD_CREATION","REPAIR_KEYWORD_CREATION","CHANNEL_TYPES_MAPPING","defaultIdeaAttributes","defaultIdeaAggregations","AggregationKey","AggregationValues","IdeaAttribute","AggregationType","defaultDevicesTypeIds","defaultIdeaOverview","Segment","Devices","isJsonEqual","v1","v2","formatUrl","scopeValues","replace","getOptions","token","_ref2$data","_ref2$channel","headers","authorization","stringifySync","getRequestSupportedLocaleId","localeString","parsedLanguage","supportedLanguage","RegExp","test","formatTargetings","isLanguageSkipped","targetings","deviceType","DeviceType","AdjustmentPercantage","SuggestionType","networkType","NetworkType","formatFilters","isCategoryFilter","filters","AverageSearchVolumeRange","SuggestedBidRange","AdImpressionShareRange","CompetitionLevels","Included","Excluded","AdvertiserId","AdvertiserLevel","Category","Number","formatPeriod","periodSetting","PeriodType","start","Date","end","DateRange","Start","toISOString","End","formatTrafficEstimateNegatieKeywords","MatchType","formatIdeaOverviews","mergeLocation","ideaOverviews","LocationLevel","formatAdGroupTrafficEstimateParameters","adgroups","AdGroupTrafficEstimateParameters","cloneDeep","adGroupTrafficEstimateParameter","KeywordTrafficEstimateParameters","hasBid","hasInlineCustomBid","isTrafficEstScale","trafficEstLandscapeScale","scaleLandScape","requestLandscape","formatLocationLevels","formatAdGroupEstimatedTraffics","adgroupKeywords","KeywordEstimatedTraffics","HasOwnMaxCPC","formatAdGroupEstimatedTrafficsForMaxCPC","adGroupEstimatedTraffics","emptyTrafficTemplate","TotalCost","entity","AdGroupEstimatedTraffic","traffic","KeywordEstimatedTraffic","formatDeviceTraffics","deviceList","deviceName","Device","DeviceName","formatDeviceTrafficsWithBid","deviceTraffics","Traffic","formatLocationTraffics","locationList","Location","LocationTraffics","LocationName","formatLocationTrafficsWithBid","locationTraffics","formatKeywordEstimatedTraffics","adGroupItem","keywordItem","modelAdgroup","modelKeyword","normalizeTrafficEstimate","rawData","isBackfilled","backfilledValues","Identifier","AdGroupEstimatedTrafficRanges","AdGroupEstimatedTraffics","DeviceTraffics","LandscapesEstimate","controlId","_languageOptions","landingPage","impreAndClicksOptions","chartType","subTitle","emptyMsg","series","mobile","defaultGridLevel","monetaryOptions","formatOptions","formatShortOptions","searchIdeaExampleData","Index","urlPrefix","getAvailableDateRangeAPI","getIdeaCategoryDataAPI","getSearchIdeaAPI","getTrafficEstimateAPI","getLocationsAPI","PermissionsContext","CurrentUser","LocaleID","locale","CurrentLocale","_serverContext$Servic","odataCampaignPath","lastSearchIdeaRequestBody","lastTrafficEstimateRequestBody","handleAjaxError","protocol","host","notificationApi","showWarning","generateGetSearchIdeaRequestRequest","_ref$mergeLocation","_ref$useCategoryFilte","useCategoryFilter","_ref$isLanguageDecoup","products","productsModel","formatProducts","SearchIdeaParameter","IsIdeas","Products","LandingPage","split","CategoryId","Targetings","Filters","PeriodSetting","IdeaOverviews","IdeaAttributes","IdeaAggregations","Locale","getAvailableDateRange","datatype","generateGetAvailableDateRangeRequest","reject","$","getIdeaCategoryData","generateGetIdeaCategoryDataRequest","_ref2$useCategoryFilt","_ref2$isLanguageDecou","isDirty","jqXHR","_textStatus","trackId","getSearchLocations","search","$count","$expand","queryString","generateGetSearchLocationsRequest","getTrafficEstimate","_formatAdGroupTraffic","IsDomesticSimplifiedChineseEnabled","CampaignTrafficEstimate","NegativeKeywords","DevicesTypeIds","LocationLevels","LandscapeEstimateParameters","LandscapeType","generateGetTrafficEstimateRequest","_KRTLocations","landingPageAll","withMultiSelectCombobox","ComboboxOriginal","MultiSelectCombobox","onOptionSelectProp","restProps","isInNewSelectedOptionIds","contains","newSelectedOptions","uniq","property","resolvedSelectedOptions","selectedOptionKeys","pluck","multiselect","displayName","getDisplayName","hoistNonReactStatics","MultiSelectorContext","useMultiSelectContext","Consumer","MultiSelectorContextProvider","useOptions","useSelectedOptions","selectedOptionsLimit","optionsDisplayLimit","onSelectedOptionsUpdate","savedAddedSelectedOptionsKeys","savedDeletedSelectedOptionsKeys","_React$useState","_React$useState2","searchFilter","setSearchFilter","_useOptions","_useOptions2","isLoadingOptions","isFirstOptionsLoad","isNoOptionsAfterFirstLoad","isMoreOptionsThanLimit","optionsLoadError","lastLoadedSearchFilter","triggerLoadOptions","_useSelectedOptions","_useSelectedOptions2","isLoadingSelectedOptions","initialSelectedOptions","selectedOptionsLoadError","setSelectedOptions","isSelectedOptionsLimitReached","isFunction","Provider","makeUseOptionsAsyncDataSource","loadOptions","optionsLimit","MAX_SAFE_INTEGER","isFirstLoad","noDataAfterFirstLoad","asyncTokenRef","setIsMoreOptionsThanLimit","setOptions","setLastLoadedSearchFilter","loadError","setLoadError","onDoneLoading","loadedSearchFilter","newOptions","isEmpty","first","onErrorLoading","onCancelLoading","cancel","createAsyncToken","on","onSuccess","_len","_key","apply","onError","makeUseOptionsAsyncDataSourceWithClientFilter","filterPredicate","onDoneCallback","noop","srcOptions","setSrcOptions","_useState11","_useState12","filteredOptions","getSelectionStats","initialOptions","currentOptions","initialOptionKeys","currentOptionKeys","addedOptionKeys","difference","makeUseSelectedOptionsAsyncDataSource","loadSelectedOptions","savedAddedOptionKeys","savedDeletedOptionKeys","handleOptionsChangeByUser","_getSelectionStats","_getSelectionStats2","deletedOptionKeys","setOptionsByUser","newInitialOptions","includes","_getSelectionStats3","_getSelectionStats4","useFluentV1Styles","switch","getSummary","level","parentToggleDescription","ScopeLevel","AdGroup","useParentLevel","bidAdjustment","parentLevelData","bidAdjustmentInput","currentLevelData","RANGE","MultimediaAdBidAdjustment","onDataChange","multimediaAds","nameColumn","parentLevelSettings","headerClassName","GridTargetsBase","setData","basicConfig","minBid","maxBid","disableDecrease","AutomatedCallToActionOptOut","ev","SwitchUseCampaignSetting","Campaign","Switch","MultimediaAdBidAdjustmentSettings","MultimediaAdBidAdjustmentSection","setIsValid","isDataValid","validateBidAdjustment","min","isBidAdjustmentValid","MMAForCN","topicKey","AdditionalConversionInputPure","currencySymbol","useId","Input","contentBefore","NCA_STRATEGY_OPTIONS","ADDITIONAL_CONVERSION_VALUE_TYPES","newCustomerAcquisitionServerErrorFilter","andComp","entityIs","anyComp","codeIs","AdditionalConversionInput","withErrorField","withValidation","GenericAdapter","useAdditionalConversionInputStyle","additionalValueInputSection","radioOption","ValidatedAdditionalConversionInput","isAccountLevel","accountAdditionalConversionValue","conversionValueOption","setConversionValueOption","styles","_useBudgetRange","useBudgetRange","currencyCode","minDailyBudget","maxDailyBudget","budgetSchema","properties","required","maximum","minimum","customErrorProcessor","errors","oldError","decimalLength","accountCurrencyCode","dailyRangeFloorValue","renderAccountLevelSettings","italic","getCurrencySymbol","schema","field","errorProcessor","onConversionValueOptionChange","renderCampaignLevelSettings","TABLE_COLUMNS","getAudiencesLibraryUrl","audiencesLibraryPath","getRoutePathById","allSiteMap","searchParams","useAudienceListSectionStyle","audienceListSection","colorNeutralForeground2Link","combobox","listbox","maxHeight","TypeInContent","NonOptionContent","audienceTable","AudienceListSection","comboboxId","_useMultiSelectContex","setSearchFilterFromContext","isAnyLoading","canUserStartOperating","selectedOptionsSet","Set","shouldDisableSelection","has","_useDebouncedState","useDebouncedState","_useDebouncedState2","debouncedSearchFilter","onSearchInputChange","rawValue","isSearchFilterEmpty","isComboboxOpen","setIsComboboxOpen","onDeleteItem","clone","splice","renderMultiSelectCombobox","LoadingOverlay","isVisible","renderTable","Table","TableHeader","TableRow","TableHeaderCell","TableBody","audienceName","audienceType","found","o","TableCell","TableCellLayout","DeleteRegular","InlineLoading","loadAudiencesFactory","deliverychannel","where","toLocaleLowerCase","Customers","$withKey","Accounts","Audiences","toPromise","audience","loadAssociatedAudiencesFactory","NewCustomerAcquisitionGoals","useCustomerAcquisitionSetupStyle","rootContainer","bodyContainer","colorPaletteRedForeground1","footerContainer","messageBar","whiteSpace","paddingTop","CustomerAcquisitionSetup","CampaignSettings","newCustomerAcquisition","isCampaignCreation","onChangeFromProp","isEditorOpen","accountSettings","campaignSettings","additionalConversionValue","accountBudgetInput","setAccountBudgetInput","campaignBudgetInput","setCampaignBudgetInput","isUpdating","setIsUpdating","userErrors","setUserErrors","serverErrors","setServerErrors","_useState13","_useState14","shouldDisableSave","setShouldDisableSave","hasAccountBudgetError","hasCampaignBudgetError","onValidateBudgetInput","newAccountBudget","newCampaignBudget","onSave","goalId","AudienceIds","AdditionalConversionValue","saveCallPromise","edmEntityAccount","entityName","createOrUpdateNewCustomerAcquisitionGoal","audienceIdList","newAccountSettings","audiences","getBulkApiErrors","Drawer","DrawerHeader","DrawerHeaderTitle","action","DismissRegular","DrawerBody","message","MessageBar","intent","layout","MessageBarBody","MessageBarTitle","DrawerFooter","BiddingStrategyWarning","inline","AccountLevelRequiredWarning","useNewCustomerAcquisitionStyle","additionalConversionValueContainer","existingAudiencesContainer","NewCustomerAcquisitionImpl","bidStrategy","optOut","bidOnlyMode","isSetupEditorOpen","setIsSetupEditorOpen","onOpenSetupEditor","onCloseSetupEditor","hasValidationError","MAX_CONVERSIONS_VALUE","onRadioChange","renderSettings","Edit16Regular","TagGroup","renderEditorButton","renderBidHigher","renderBidOnly","renderEditor","ValidatedNewCustomerAcquisition","loadAudiences","loadAssociatedAudiences","errorMessages","ValidatedNewCustomerAcquisitionHeader","newCustomerAcquisitionOptOut","Toggle","inlineLabel","stopPropagation","PERFORMANCE_INSIGHTS_TYPE","PERFORMANCE_INSIGHTS_ISSUE","PERFORMANCE_INSIGHTS_ACTION","PERFORMANCE_INSIGHTS_POPUP_CONFIG","chartTitle","pitching","actionDetails","PERFORMANCE_INSIGHTS_PANEL_CONTAINER","calloutStyles","mergeStyleSets","callout","minHeight","inlineChart","PerformanceInsightsPanel","newI18n","ReactDOM","getColor","metricName","budgetResult","legend","actualBudgetPoints","lineOptions","strokeWidth","legendShape","estimatedBudgetPoints","strokeDasharray","strokeDashoffset","strokeLinecap","bidResult","actualBidPoints","estimatedBidPoints","budgetChartData","lineChartData","bidChartData","chartClasses","colorFillBarData","startX","x","endX","Caption1Stronger","campaignName","Surface","LineChart","legendsOverflowText","allowMultipleShapesForPoints","tickFormat","tickValues","point","colorFillBars","PerformanceInsightsToolTipCard","closePerformanceInsightsPopup","isBlocking","setIsBlocking","CheckpointEntities","CheckpointEntityId","CheckpointEntityLevel","CheckpointIdentifiers","CheckpointKey","CheckpointDataTypes","fetchPerformanceInsightsData","CheckpointResults","CheckpointDataMap","CheckpointDataJsonString","checkpointResults","checkpointResult","CheckpointData","parseSync","normalizedData","reversedBidPoints","BidPoints","reverse","startDate","formatDate","skeleton","timeZone","toIANATimeZone","fromLegacyTimeZone","endDate","missedConversions","MissingConversion","latestActualTarget","LatestActualTarget","latestSuggestTarget","LatestSuggestTarget","verticalTarget","VerticalTarget","verticalPercentage","VerticalPercentage","raw","y","Actual_Conversion","Estimate_Conversion","reversedBudgetPoints","BudgetPoints","missedImpressions","MissingImpressions","actualBudget","OriginalBudget","recommendedBudget","ProjectedImpressionsRecommendedBudget","normalizeData","subType","onMouseLeave","Callout","directionalHint","DirectionalHint","rightCenter","BlockUi","loader","Spinner","SparkleImg","registerIcons","icons","SparkleImgSVGIcon","SparkleImgIcon","Pending","Warning","Error","parentShared","parentActive","parentPending","parentWarning","parentError","childActive","childPending","childWarning","childError","_useMemo","IconElement","CheckmarkCircleRegular","parentClass","childClass","CircleRegular","WarningRegular","ErrorCircleRegular","statusItem","statusLabelMsg","statusLabelMsgWithPopover","popover","popoverTitle","popoverTitleText","popoverMsg","customPopoverProps","triggerRef","setFocus","labelMsgPart","Popover","trapFocus","withArrow","openOnHover","PopoverTrigger","underline","onMouseOver","PopoverSurface","popoverButton","autoFocus","learnMore","popoverTitleName","popoverTitleValue","replaceAll","isValidCustomUrlProtocol","doesUrlContainUnsafeCharacters","UrlLengthLimit","pathLengthLimitErrorMessages","pathLengthLimit","urlInputContainer","boxSizing","urlInput","urlProtocol","customUrlProtocol","urlPath","wordBreak","UrlPathFluent","_value","Path1","Path2","urlDomain","getDomain","onPathChange","newValue","path1","trim","path2","validatePath","onPath1Change","onPath2Change","isString","URL_COLON_SLASH_SLASH","DEFAULT_URL_PREFIX","getUrlPrefixAndDestination","finalUrl","defaultUrlPrefix","substring","getUpdatedFullUrlOnPrefixUpdate","urlWithoutPrefix","newPrefix","slash","getUpdatedFullUrlOnTextUpdate","_getUrlPrefixAndDesti","_getUrlPrefixAndDesti2","destination","urlPrefixOptions","UrlInputFluent","containerClassName","additionalValidation","prepopulateUrl","dropdownOptionAriaLabel","propertyKey","validateOnRender","additionalProperties","textFieldAriaLabel","enableSpecialCharactersValidation","hideProtocol","_useMemo2","selectedOptionText","validateAndUpdateUrl","currentURL","finalUrlValidatorError","requiredUrlProtocolAndDomain","urlLengthLimit","lengthLimit","isValidUrl","getUrlProtocolAndDomain","validateAdUrl","onUrlPrefixChanged","newItem","onCustomUrlProtocolChanged","onTextChange","contentAfter","withNoProtocol","WrappedComponent","urlWithProtocol","FinalURlKey","ValidatedFinalUrl","validationOnUrlChange","helpTopicId","hideLabel","finalUrls","createFinalUrlsViewModel","urls","HelpPopupInline","FinalUrls","updateOnMount","radiusShimmerElement","ShimmerElementType","line","SectionShimmer","Shimmer","shimmerElements","__","placementTargetSettingContainer","creationCommonStyle","advancedSettingsSectionStyle","toggleButtonStyle","listStyle","RadioGroupOption","titleString","descriptionString","updateSelection","setIsSelected","titleStyle","PlacementTargetingSettingsInternal","mobilePlacementsTitleString","mobilePlacementsDescriptionString","gamingPlacementsTitleString","gamingPlacementsDescriptionString","setActiveKey","intentOptions","activeKey","placementTarget","intentOptionsKeys","intentOptionsKeysMap","onIntentOptionChanged","renderItem","getItemId","PlacementTargetSettings","PlacementTargetPanel","PlacementImg","PANEL_KEYS","PLACEMENT_TARGET","pug","module","exports","locals","pug_interp","pug_html","locals_for_with","formatOption","formatPoint","points","escape","$$obj","pug_index0","$$l","marker","symbol","dashStyle","attr","call","this","date","formattedValue","rowElement","buttonElement","ShimmerCard","useNoAssetCardStyles","flexBasis","colorNeutralBackground2","gradient","NO_ASSETS_STATE","config","NO_ASSETS","fit","NO_ASSETS_FILTERED","NoAssetsCard","Subtitle2","performanceOrder","policyStatusOrder","columnId","compare","PerformanceLabel","EditorialStatus","columnsWithConversions","PerformanceMetrics","ConversionsCredit","useAssetPreviewStyles","imagePreviewContainer","objectFit","aspectRatio","callToActionStrings","ActNow","ApplyNow","BetNow","BidNow","BookACar","BookHotel","BookNow","BuildNow","BuyNow","ChatNow","Compare","ContactUs","Dealers","Directions","Donate","Download","EmailNow","EnrollNow","FileNow","FindJob","FindStore","FreePlay","FreeQuote","FreeTrial","Coupon","GetDeals","GetDemo","GetNow","GetOffer","GetQuote","GoToDemo","JoinNow","LearnMore","ListenNow","LogIn","OrderNow","PlayGame","PlayNow","PostJob","Register","RenewNow","RentACar","RentNow","Reorder","Reserve","SaveNow","Schedule","SeeDemo","SeeMenu","SeeModels","SeeOffer","SeeOffers","Sale","SellNow","ShopNow","Showtimes","SignIn","SignUp","StartNow","Subscribe","SwitchNow","TestDrive","TryNow","ViewCars","ViewDemo","ViewPlans","VisitStore","VoteNow","Watch","WatchMore","WatchNow","getLocalizedCallToActionString","callToAction","mappedCallToAction","AssetPreview","asset","withAspectRatio","preview","assetType","Asset","AssetType","resizeImageHeight","ImageUrl","originalWidth","CropWidth","originalHeight","CropHeight","CallToAction","ThumbnailUrl","Width","Height","usePerformanceTagStyles","low","colorStatusDangerForeground1","colorStatusDangerBackground1","colorStatusDangerBorder1","neutral","colorNeutralForeground3","colorNeutralBackground4","colorNeutralStroke2","high","colorStatusSuccessForeground1","colorStatusSuccessBackground1","colorStatusSuccessBorder1","LABEL_STRING","Good","Best","Learning","Unrated","getStyle","useGetPerformanceTag","Badge","iconPosition","useAssetStatusStyles","rejected","STATUS_STRING","Approved","ApprovedLimited","Rejected","useGetStyledAssetStatus","getPageAssets","assets","paginationConfig","assetsPerPage","DESCRIPTION_STRING","row","flow","usePopoverStyles","perfEditorialRow","AssetPerformancePopover","getPerformanceTag","getStyledAssetStatus","align","useAssetTableStyles","headerRow","conversionsHeader","performanceHeader","policyStatusHeader","headerText","performanceCell","MIN_WITH_ASPECT_RATIO_WIDTH","resetToFirstPage","setWithAspectRatio","setWithAspectRatioValue","getRows","getSortDirection","toggleColumnSort","useTableFeatures","useTableSort","headerSortProps","sortDirection","rowsToDisplay","mouseLeaveDelay","AssociationType","AssetPerformancePopoverWithConversions","AdvertiserReportedRevenue","AssetTableWithConversions","getStyledAssetConversions","usePaginationConfig","setState","next","onNext","previous","onPrevious","getFullYear","getMonth","padStart","getDate","All","LongHeadline","ShortHeadline","Description","Logo","Video","AssetTypeString","MAX_ASSET_CONTAINERS_IN_FILTER","useFilteredAssetData","headerState","dateRange","setAssets","assetContainer","Campaigns","AssetGroups","$makeCall","query","skip","gridDataParameters","StartDate","EndDate","subscribe","filterByAssetType","useCardStyles","ASSETS_PER_PAGE","AssetPerformanceCard","onActionButtonClick","perfMarkerUtils","siteMap","isSDK","instrumentationContextValue","InstrumentationContext","activityAndScenario","createScenarioAndActivity","scenarioName","activityName","AssetTable","isConversionsEnabled","AssetPerformanceTileWithConversions","isCampaignTypeApp","hasAssets","assetGroupId","route","save","uid","assetsRoute","createAssetsRoute","done","AssetPerformanceCardWithAssetData","withSiteMap","withPermissions","HoC","withFilteredAssetData","getAssetContainerNameWithStatus","primaryFill","assetContainerText","useAssetGroupsData","assetContainers","setAssetContainers","select","assetGroups","withAssetGroupsData","useFilterStyles","button","assetContainerFilterButton","buttonText","lineBreak","viewAll","AssetPerformanceFilter","onViewAllButtonClick","onAssetTypeClick","onAssetContainerClick","selectedAssetContainer","onViewAllAssetGroupsClick","Menu","MenuTrigger","disableButtonEnhancement","MenuButton","MenuPopover","MenuList","MenuItem","AssetPerformanceFilterWithAssetGroupsData","oDataParams","FetchType","noDecimalOptions","formatBigDecimal","useStackStyles","estimationBody","spacingVerticalMNudge","firstDivider","estimation","estimationAudienceUnit","unitValueMap","IMAAudienceEstimation","excludedData","potentialdata","_ref$targetedInterest","targetedInterests","_ref$excludedInterest","excludedInterests","autoTargeting","campaignBiddingStrategy","campaignSubType","stackStyles","errorMessage","setErrorMessage","otherProps","AutoTargeting","CampaignBiddingStrategy","CampaignSubType","CampaignSubTypeMapping","includesAudiences","AudienceId","excludesAudiences","_useIMATargetingEstim","targetsForTotalAudienceSizeEstimation","targetsForIncludedAudienceSizeEstimation","targetsForFullTargetedAudienceSizeEstimation","_serverContext$Urls","Urls","_serverContext$Urls2$","SignOutUrl","urlBase","audienceSizeEstimationUrl","totalPotentialData","setTotalPotentialData","includedOnlyData","setIncludedOnlyData","allTargetedData","setAllTargetedData","isImpressionTooSpecific","setIsImpressionTooSpecific","getAudienceReachEstimation","fetchType","targets","audienceSizeEstimation","request","IsImpressionTooSpecific","useIMATargetingEstimationCaller","Includes","Excludes","_useIMATargetingEstim2","isAudienceEstimationLoading","includedAudiencesOnly","excludedAudiencesOnly","estimatedIncludedOnlyData","estimatedAllTargetedData","estimatedPotentialData","xAxisCalloutData","yAxisCalloutData","chartData","isXandrCampaign","StackedBarChart","ignoreFixStyle","spacingHorizontalSNudge","estimatedReach","toolTip","toolTipContentWithSpace","toolTipContent","wordWrap","spacingHorizontalS","borderRadiusMedium","colorNeutralBackground3","colorNeutralForeground3Hover","ToolTipContent","list","Estimation","localizedMarkets","toolTipVisible","setToolTipVisible","visible","onVisibleChange","checkboxCursor","InterestsSelector","treeItems","treeItemIdxMap","isAIMCampaignEnabled","disabledItems","treeItemsWithReach","_groupBy","groupBy","_groupBy$Included","_groupBy$Excluded","targetedLocationCriterions","toUpperCase","excludedLocationCriterions","InternalizationReach","extendInternalizationReach","peopleInLocation","extendListSizeItem","ineligibleItems","isInEligibleIMA","processedTreeItems","forEach","queue","shift","idx","checkedItems","Map","set","onTargetSelect","removedTarget","selected","onRenderFlatTreeItem","itemData","isItemChecked","isDisabled","listSize","getLocalizedMarkets","formatReachEstimation","onRenderTagContent","flatTreeItemFilter","Tags","tagItems","tagViewLimit","ContextualClientSelectionTree","onRenderContent","customFilter","searchBoxClassName","showTags","groupInterests","interests","groupedInterests","formatInterests","_groupInterests","targetedInterestDetails","excludedInterestDetails","spacingVerticalM","interestsHeader","spacingVerticalL","AudienceInterests","supportExclusion","audienceList","imaList","IMATree","jsonTreeParse","delimeter","IMATreeItems","IMATreeItemIdxMap","IdMap","flattenTree","tree","parentValue","allowedCheck","extend","childIds","child","formatIMATree","audienceIdMap","_useMemo3","targetedItems","excludedItems","expandExclusions","setExpandExclusions","onTarget","newTargeted","newInterests","interest","interestData","AudienceName","AudienceType","BidMultiplier","BidType","remainingSelected","newInterest","newlySelected","onExclude","newExcluded","onExpandExclusions","ValidatedAudienceInterests","BudgetRange","DailyRange","FloorValue","MonthlyRange","CeilingValue","useBudgetInputStyles","spacingVerticalXS","input","flex","spacingHorizontalXS","BudgetInputPure","helpTopic","helpLabel","c","htmlFor","useValidatedBudgetInputStyles","BudgetInput","finalMaxBudget","finalMinBudget","finalCurrency","String","useIsReadOnlyUser","CurrentAccountInActive","IsReadOnlyUser","DropdownMenuButton","checkedValue","menuItemConfigs","buttonAriaLabel","isReadOnly","checkedValues","menuItems","menuItemConfig","MenuItemRadio","iconColor","onCheckedValueChange","DialogEditButton","ChildComponent","closeDialog","DialogTrigger","colors","green","colorPaletteDarkGreenBackground2","colorPaletteDarkGreenForeground2","gray","colorNeutralBackground1Hover","colorNeutralForeground2","purple","colorPalettePurpleBackground2","colorPalettePurpleForeground2","brown","colorPaletteBrownBackground2","colorPaletteBrownForeground2","blue","colorPaletteBlueBackground2","colorPaletteBlueForeground2","cardContainer","cardText","cardDescription","cardWarning","textDecorationStyle","textDecorationLine","iconWarning","useIconStyles","iconContainer","useIconColorStyles","StatusSummaryCardIcon","memo","IconComponent","colorClasses","StatusSummaryCard","header","dropdownMenuProps","dialogEditProps","warningMessage","Card","CardHeader","shimmerWrapper","truncate","useFooterStyles","saveButton","containerLeft","withFooter","showBudgetSuggestion","send","useFormService","matches","FORM_STATES","LOADING","FORM_EVENTS","SAVE","CANCEL","useReadCampaign","useRepository","isBudget","instrumentation","readCampaign","useReadCampaignPromise","initialCampaign","setInitialCampaign","log","campaignOverviewEdit","create","budgetEdit","bidStrategyEdit","localizeBudget","withSymbol","loadCampaign","campaignGoal","Goal","cpa","roas","isInitialAdditionalDetailsChecked","deliveryStatus","DeliveryStatus","deliveryStatusDetails","DeliveryStatusDetails","initialBudget","load","campaignData","isBudgetValid","isMarketingMetricValid","marketingMetric","modelToSave","BudgetBidCampaignImportNotificationActivity","campaignItemList","oldBudget","newBudget","oldBidStrategy","newBidStrategy","updateCampaign","TargetCpaValueCheck","useBudgetRepository","useBidStrategyRepository","getApiErrorMapper","useBudgetCardStyles","colorPaletteCranberryBorderActive","UnmappedFormErrors","FormViewWrapper","logger","EnableBudgetSuggestion","isBSLoading","setIsBSLoading","isBSCalled","setIsBSCalled","apiErrorMapper","legacyI18n","buildLegacyI18n","ValidationStringMap","mergedI18n","Currency","GlobalMaximumBudget","DailyBudget","Max","GlobalMinimumBudget","Min","MaximumBudget","onFieldChange","updatedData","prevData","shouldLocalize","budgetAmountValue","budgetVal","budgetErrors","datas","showBudgetSuggestionData","formErrorProps","errorMapper","ValidationGroup","onNotifyValidation","budgetSuggestion","withSlider","isUnderlineLink","isGreyBackground","BudgetForm","onDoneSaving","params","onCanceled","view","repository","machineOptions","actions","Form","BudgetCard","contentReady","budgetText","setBudgetText","setBudgetTitle","campaignInfo","setCampaignInfo","dataBs","localizedBudget","LINKEDIN_CAMPAIGN_GOALS","useBidStrategyCardStyles","bidRange","KeywordBidRange","getLinkedInBidStrategyOptions","onBidStrategyChange","bidStrategyType","onMarketingMetricChange","newMarketingMetric","marketingMetricErrors","selectedBidStrategy","marketingMetricsValue","defaultChecked","inputUnit","hideMessage","hideAdditionalDetails","withTargetCpaWarning","BidStrategyForm","BidStrategyCard","bidStrategyText","setBidStrategyText","getLinkedInBidStrategyText","getBidStrategyText","CampaignStatusCard","campaignStatusEdit","pausedCampaignImportNotificationActivity","colorPaletteGreenForeground1","setCheckedValue","campaignItemData","seCampaignItemData","updateStatus","isActive","useCampaignStatusSummaryCardsStyles","fullWidthCards","shouldUseFullWidthCards","CampaignStatusSummaryCards","campaignStatusContentReady","budgetContentReady","bidStrategyContentReady","CARD_CONFIG","cardStyle","cardSelected","colorNeutralForeground2BrandHover","checkmark","textArea","cardId","onCardSelectionChange","onCardClicked","handleSpace","useCardSelectorStyles","cardsContainer","CardSelector","cards","setOpen","localCardsState","setLocalCardsState","newCards","onSaveClicked","restoreFocusTargetAttributes","useRestoreFocus","restoreFocusSourceAttributes","tileLabel","defaultFilter","collectChildren","flatTreeItems","entry","childValue","filterTreeItems","filteredTreeItemIndexes","ancestor","orderedFilteredIndexes","from","filteredTreeItems","useDropdownTreeStyles","dropdownContent","branch","hideContent","noResults","treeItemLayout","CustomTreeItem","flatTreeItem","onCheckedChange","lazyLoadingEnabled","treeItemsProps","getTreeItemProps","treeItemProps","itemType","expandIcon","isChecked","TreeItem","TreeItemLayout","onRenderLabel","DropdownTreeSelect","openItems","onRenderTooltip","lazyLoad","isMultiSelect","containerRef","setSearchValue","isResultOpen","setIsResultOpen","lazyLoadedData","setLazyLoadedData","lazyLoadedParents","setLazyLoadedParents","onChangeSearchValue","trimmedValue","itemsToUse","array","parent","myself","childMapValue","buildMap","parentsWithChild","parentsWithChildOrLoaded","onOpenChangeInternal","openedItem","itemChildData","onItemChecked","flatTree","useHeadlessFlatTree","handleBlur","setTimeout","showResults","onFocus","FlatTree","getTreeProps","showTips","positioning","mapGoalsToItems","goals","fetchConversionGoalFactory","sortState","orderby","sortColumn","IsMainConversionGoal","dataQuery","Goals","fetchConversionGoals","currentPage","totalPages","useTableStyles","dataGridWrapper","colorNeutralBackground1Pressed","accountCheckbox","dataGridContainer","dataGrid","mainConversionCheckbox","searchbox","headerBar","fontWeightRegular","clearAllBtn","headerTitle","typographyStyles","caption1Strong","fontSizeBase200","Scopes","freeze","ACCOUNT","CAMPAIGN","trackingStatusMapping","Unverified","NoRecentConversion","RecordingConversions","TagInactive","InactiveDueToTagUnavailable","GoalDiagnosticsInfoErrorCode","EXTERNAL_LINK","warningPopupLocalizedMessage","localizedParameters","NoExpression","NoValue","EqualsTo","BeginsWith","Contains","RegularExpression","LessThan","GreaterThan","needLocalizedPropName","CurrentDestinationUrlOperatorName","SuggestedDestinationUrlOperatorName","CurrentEventActionOperator","CurrentEventCategoryOperator","CurrentEventValueOperator","SuggestedEventActionOperator","SuggestedEventCategoryOperator","SuggestedEventValueOperator","errorcodeMapping","parameterPropertyName","actionLink","actionTitle","helpText","helpId","description2","requiredParameters","EMPTY_STATE","categoryMapping","Purchase","AddToCart","BeginCheckout","Subcribe","SubmitLeadForm","BookAppointment","Signup","RequestQuote","GetDirections","OutboundClick","Contact","PageView","Other","useTrackingStatusPopoverStyles","warningState","colorStatusWarningForeground2","colorStatusWarningBackground1","colorStatusWarningBorder1","popoverLearnMore","popoverContent","title3","ProtectedLink","onNavigation","dialogProps","dialogView","shouldShow","NavigationPopup","confirmButtonText","dialogContent","TrackingStatusComponent","LearnMoreComponent","activityLogger","goalFixType","isCreationWorkflow","history","pathname","TrackingStatusPopover","trackingStatusConfig","TrackingStatus","isOfflineGoal","rawParams","parmas","outputMessage","currentMessages","suggestedMessages","CurrentEventCategory","CurrentEventAction","CurrentEventLabel","CurrentEventLabelOperator","CurrentEventValue","SuggestedEventCategory","SuggestedEventAction","SuggestedEventLabel","SuggestedEventLabelOperator","SuggestedEventValue","suggested","generateEventGoalFixMessage","trackingStatusHelp","defaultParameters","reduce","obj","param","newObj","useEmptyStateStyle","emptyStateWrap","emptyStateLink","emptyStateMapping","subtext1","actionButton","actionButtonTitle","siteMapId","EmptyStateResultComponent","emptyState","EmptyState","EmptyStateSize","largeSurface","EmptyStateContent","subtext","EmptyStateSurfaceIcon","defaultOnClick","useHeaderControlStyles","body1Strong","resetButton","wrapper","scopeOptions","HeaderControlComponent","setScope","showNoMainGoalWarning","refetch","useDataSource","Field","HelpButton","TableViewSection","childrenProps","resetProps","searchTerm","showSelectedOnly","setShowNoMainGoalWarning","setSortState","isAccountLevelScope","renderHeaderCell","renderCell","media","useRenderingData","isSearchEmptyState","renderingColumns","TableGridView","aggregateMode","showClearAllHeader","disabledToggleWholeRow","disableClientSort","showDefaultSelectionHeader","appearanceRow","additionalDataGridProps","onSortChange","PageSizeSelector","pageSizeOptions","Paginator","GoalSelector","valueFromProps","onChangeFromProps","emptyStateNoGoal","setEmptyStateNoGoal","fetchData","prevValueRef","setValue","cmp","newSelectedGoal","useGoalSelectorState","ServerEntitySelectorEmbedded","newScope","buttons","OverviewCardFooter","footerButtonConfigs","renderPagination","CardFooter","hiddenButton","click","analyticsId","initialized","getDataToDisplayFromSortedData","sortedData","dimensions","inactive","active","colorPaletteGreenBackground3","colorPaletteRedBackground3","deleted","colorNeutralForeground4","isExperiment","entityType","searchTermActionRow","searchTermButton","leftSide","SearchTermActions","triggerSearchTermDrawer","searchTermStatus","rowRawItem","searchTermAdded","searchTermExcluded","onClickAdd","isNegative","adGroup","onClickExclude","addAction","entityNameLink","entityNameRow","EntityName","to","metricCell","metricCellContent","metricCellComparison","comparisonValuePositionMap","sup","sub","PerformanceMetricsChangePercentage","PerformanceMetricsChange","MetricCell","columnData","metricFormatter","comparisonMajorMetric","formatMetric","formatMetricWithSign","formatChangePercentageWithSign","columnConfig","shouldShowComparison","isSorted","changePercentValue","changeValue","positionMap","comparisonContent","supValue","subValue","major","dropdownTriggerButton","colorNeutralStroke1Hover","MetricPickerMenuButton","dropdownMetrics","onMetricDropdownSelect","dropdownItems","onMenuClick","metricCellHeaderText","sorted","colorSubtleBackgroundHover","MetricHeaderCell","metricDisplayName","EntityNameColumnId","headerElement","TableShimmer","grid","entityNameColumn","noDataContainer","OverviewPerformanceTable","entityDisPlayName","selectedMetrics","allMetrics","getHref","getPopoverContent","onColumnChange","newSelectedMetrics","m","newSortState","every","sm","metricColumns","selectedMetric","ExperimentId","SearchTermStatus","getColumns","u","nextSortState","dataToDisplay","isSortColumn","sortClassObj","DataGrid","getRowId","DataGridHeader","DataGridRow","DataGridHeaderCell","DataGridBody","rowId","DataGridCell","MetricPicker","metrics","onMetricSelect","selectedMetricKey","Caption1Strong","textCell","textCellContent","TextCell","cellName","cell","negative","colorPaletteLilacForeground2","middleMark","positive","colorPaletteBlueBorderActive","getBarWidth","change","maxChange","abs","ChangeBarCell","negativeBarWidth","positiveBarWidth","borderStyle","backupPalette","themePrimary","palette","iconFontFamily","getFluctuationContentStyle","InsightCell","fluctuationTypeIds","renderFluctuationPopup","buttonRef","trigger","metricContainer","separator","colorNeutralStroke1Selected","box","positiveBox","negativeBox","changeContainer","formattedStart","formattedEnd","PopoverInfo","localizedMetricName","currentMetric","periodMetric","percentageChange","currentDateRange","comparisonDateRange","formattedChange","formattedPercentageChange","formattedCurrentMetric","formattedPeriodMetric","changePercentage","ChangeBarColumnId","InsightColumnId","FluctuationTypeMap","Spend","PeriodPerformanceMetrics","availableInsights","hasFluctuation","AvailableInsightTypeIds","MTMetric","insightColumn","barColumn","contentHeaderContainer","dateContainer","OverviewTopChanges","paginationState","comparisonText","comparisonDateRangeDateRangeText","rangeInDays","getComparisonText","Caption2","useShimmerStyles","LoadShimmer","TIP_ID","PROMO","ADD_PAYMENT","CREATE_CAMPAIGN","COACHING","HELP","getCreateCampaignText","hasCoupon","ReactTemplate","importLink","useTipStyles","Tip","tipId","showWelcomeMsg","isPaymentFirstTile","useTipsConfig","OverviewWelcomeTips","pages","hasPaymentPermission","getLocalizedSupportLink","actionButtons","ccBaseUrlNoTrailingSlash","showTaxForm","Culture","coachingLink","useActionButtons","metricPickerBorderColor","getMetricPickerBorderStyle","metricPickerItem","colorNeutralStroke1","pickerName","toggleButton","pickerValue","imageIndicator","backgroundRepeat","backgroundPositionX","backgroundPositionY","backgroundSize","MetricPickerItem","hideCurrency","isComparisonEnabled","onMetricToggle","TooltipHost","Glyphicon","glyph","wrapperClass","mergeStyles","selectors","shimmerWithElement","MetricPickerShimmer","metricPicker","visibleMetrics","selectedMetricIndexes","onMetricUpdate","newSelectedMetricIndexes","i","newVisibleMetrics","showErrorText","cardContent","opacity","backdropFilter","gridRowStartStart","gridColumnStartStart","gridRowStart","gridColumnStart","chartContainer","spinner","category","uiNextColors","original","comparative","symbols","gridLineStyle","gridLineDashStyle","gridLineColor","tickPixelInterval","transformPoints","ianaTimeZone","DateTime","Value","parsedDate","dateParser","parseAPIDate","mismatches","granularityOptions","Hour","datetime","Day","Week","Month","Quarter","timestamp","granularity","TimeZone","formattedDate","highchartsPoints","getTime","highchartsSeries","PrimaryDataPoints","ComparisonDataPoints","MetricName","coerceMetric","fillColor","lineColor","lineWidth","radius","isOriginal","yAxis","isComparison","xAxis","useChartData","performanceTimeSeries","visibleMetricsDisplayNames","seriesWithDate","getSeriesWithDate","chartSeries","metricIndex","staticChartStyleOption","labels","showFirstLabel","showLastLabel","tickLength","plotBands","opposite","tickInterval","tooltip","crosshairs","borderWidth","useHTML","shared","shadow","valueDecimals","chart","spacingTop","spacingLeft","spacingRight","spacingBottom","credits","formatTickValue","tickValue","interval","formatXAxisLabel","isFirst","isLast","axis","clsModifier","getLabel","userOptions","tickPositioner","dataMin","dataMax","fontFamily","useChartViewOptions","isAllValuesZero","isAllLineValuesZero","hasMultipleXAxis","hasMultipleYAxis","endOnTick","formatter","startOnTick","reserveSpace","hideYAxisLabels","originalPoints","comparativePoints","tooltipTemplateVNext","originalPointsTooltip","comparativePointsTooltip","havePop","formatTooltip","outside","chartStyleOption","highchartsOptions","highcharts","merge","hasChartData","useFluentChartViewOptions","MockFluentChart","ChartView","chartProps","Chart","shellContentElement","reflow","useLayoutEffect","resizeObserver","ResizeObserver","observe","disconnect","PerformanceCardInternal","aggregatedMetricPickerData","useChartProps","PerformanceCard","PerformanceCardFluent","withFluentChart","isSizeInList","useSearchableMultiSelectorComboboxStyles","resultsTitleContainer","selectAllButton","textUnderlinePosition","useSearchableMultiSelectorStyles","labelContainer","labelContent","removeAllButton","InvalidOptionValues","SearchableMultiSelectorCombobox","hasMore","allowSelectAll","noResultsText","tooltipText","resultsTitle","onChangeQuery","onSelectOption","onCleanUp","onSelectAll","onFetchMore","setQuery","loadingOption","checkIcon","emptyOption","noMoreOption","selectedIds","resultIds","TooltipWrapper","updateQuery","newQuery","handleChange","handleOptionSelect","handleSearchBoxClick","handleKeyDown","handleScroll","currentTarget","scrollTop","clientHeight","scrollHeight","renderLabel","onBlur","onScroll","OptionGroup","fetchOnEmptyInput","allowRemoveAll","paginatedFetchingState","fetch","prevState","isArray","preState","fetchNextPage","debouncedFetch","usePaginatedFetchingState","fetchingState","useFetchingState","resultId","onChangeTagItems","newTagItems","newSelected","addItem","removeItem","removedId","toggleOption","selectAllOptions","selectedId","removeAllSelected","renderLabelWithHelpButton","Body1Strong","useFilterOnClient","originalFn","cachedResults","setCachedResults","fetchResults","filterPredicateFactory","DiagnosticsTypes","Issue","Recommendation","useDiagnosticsBarStyles","colorBrandBackground2","colorBrandBackground2Pressed","messageBarBody","messageBarAction","iconIssue","colorStatusWarningForeground1","iconRecommendation","DiagnosticBar","itemList","onActionClick","renderActions","locator","link","MessageBarActions","useDiagnosticsSectionStyles","diagnosticsSection","SummaryDiagnostic","issues","recommendations","diagnosticsExpandedSection","setDiagnosticsExpandedSection","diagnosticsSectionExpand","setActiveKeys","allPanelItems","checkItems","skipItemsTypeCheck","activeKeys","isTagetCpaHigherThanBudget","getLogString","checkValue","LogTargetCpaCheckOnSave","TargetCpaWarningBannerInternal","isSignup","tcpaCheckEnabled","shouldShowBanner","TargetCpaWarningBanner","filterLocationData","latitude","longitude","VIEWS","VIEW_STRINGS","MAP","TABLE","LOCATIONS_PER_PAGE","locationGranularity","county","stateOrProvince","city","postalCode","METRIC_STRINGS","TopImpressionRatePercent","AbsoluteTopImpressionRatePercent","PartialConversionRate","PartialConversionCPA","RevenueOnAdSpend","METRIC_FULL_STRINGS","bubbleColorForVNext","createPushpinOption","locationInfo","fillOpacity","getPushPinIcon","anchor","roundClickableArea","formatLocationData","locationData","maxValue","sortBy","pushpinOption","getCustomPushpin","pinOption","Maps","Pushpin","Point","useTopLocationsData","willFetchData","willRender","setLocations","setTopLocationValues","fetchCountryData","fetchStateOrProvinceData","fetchCountyData","fetchCityData","fetchPostalCodeData","fetchLocationData","countryData","countryLocationData","CountryLatitude","CountryLongitude","isUSorCanada","stateOrProvinceData","stateOrProvinceLocationData","countyData","countyLocationData","cityData","cityLocationData","postalCodeData","postalCodeLocationData","useMetricSelectorStyles","colorPaletteGreenBackground2","MetricSelector","onMetricChange","Footer","showPagination","useNoLocationsStyles","mapElement","MapShimmer","TopLocationsTable","locationsPerPage","getPageLocations","useMapStyles","TopLocationTarget","LocationTarget","constructor","topLocation","super","GeoPoint","ExpandedName","TARGETING_TYPE","Top","TopLocationsMap","mapRef","l","onGetTooltipHtmlContent","locationTarget","BingMapsView","wideContainer","wideContentWrapper","TopLocationsCardInternal","hasLocations","contentArea","isWideMode","viewOption","TopLocationsCard","HOC","BingMapsContextProvider","campaignApiServiceRoot","CampaignAPIPath","campaignApiToken","bingMapsApiKey","withBingMapsContext","preferenceFromServer","patchPreference","preferenceService","PreferenceContext","preferences","findByName","cardPreferences","Data","currentCardPreferences","initMetric","setMetric","newMetric","preferencesData","useViewSelectorStyles","WIDE_MODE_WIDTH","TopLocationViewSelector","onViewSelected"],"sourceRoot":""}