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CACNpE,MAAO,wCAET,CACEoE,KAAM,6CACNpE,MAAO,gDAIb,CACEoE,KAAM,yBACNpE,MAAO,4BACPwwE,QAAS,CAAC,EACVlrD,SAAU,CACR,CACElhB,KAAM,gBACNpE,MAAO,oBAIb,CACEoE,KAAM,qCACNpE,MAAO,qCACPwwE,QAAS,CAAC,EACVlrD,SAAU,CACR,CACElhB,KAAM,+BACNpE,MAAO,gCAET,CACEoE,KAAM,kCACNpE,MAAO,qCAIb,CACEoE,KAAM,oBACNpE,MAAO,oBACPwwE,QAAS,CAAC,EACVlrD,SAAU,CACR,CACElhB,KAAM,2BACNpE,MAAO,4BAET,CACEoE,KAAM,6BACNpE,MAAO,8BAET,CACEoE,KAAM,sBACNpE,MAAO,uBAET,CACEoE,KAAM,sBACNpE,MAAO,uBAET,CACEoE,KAAM,sBACNpE,MAAO,yBAIb,CACEoE,KAAM,6BACNpE,MAAO,6BACPwwE,QAAS,CAAC,EACVlrD,SAAU,CACR,CACElhB,KAAM,oCACNpE,MAAO,qCAET,CACEoE,KAAM,6BACNpE,MAAO,8BAET,CACEoE,KAAM,sBACNpE,MAAO,uBAET,CACEoE,KAAM,+BACNpE,MAAO,gCAET,CACEoE,KAAM,sBACNpE,MAAO,uBAET,yBACA,gBAGA,sBACA,eAGA,0BACA,kBACA,cACA,8BACA,4BACA,iCACA,sBACA,gBAGA,mBACA,2BACA,qBACA,sBACA,qBACA,mBACA,iBAGA,yBACA,8BACA,wBACA,sBACA,gBACA,mBAGA,oBACA,mBACA,qBAGJ,CACEoE,KAAM,sBACNpE,MAAO,sBACPwwE,QAAS,CAAC,EACVlrD,SAAU,CACR,CACElhB,KAAM,6BACNpE,MAAO,8BAET,CACEoE,KAAM,4BACNpE,MAAO,6BAET,CACEoE,KAAM,sBACNpE,MAAO,uBAET,CACEoE,KAAM,8BACNpE,MAAO,+BAET,CACEoE,KAAM,sBACNpE,MAAO,uBAET,yBACA,gBAGA,sBACA,eAGA,0BACA,kBACA,cACA,8BACA,4BACA,iCACA,sBACA,gBAGA,mBACA,2BACA,qBACA,sBACA,qBACA,mBACA,iBAGA,yBACA,8BACA,wBACA,sBACA,gBACA,mBAGA,oBACA,mBACA,qBAGJ,CACEoE,KAAM,yBACNpE,MAAO,yBACPwwE,QAAS,CAAC,EACVlrD,SAAU,CACR,CACElhB,KAAM,gCACNpE,MAAO,mCAIb,CACEoE,KAAM,wBACNpE,MAAO,wBACPwwE,QAAS,CAAC,EACVlrD,SAAU,CACR,CACElhB,KAAM,+BACNpE,MAAO,gCAET,CACEoE,KAAM,6BACNpE,MAAO,8BAET,CACEoE,KAAM,sBACNpE,MAAO,uBAET,CACEoE,KAAM,+BACNpE,MAAO,gCAET,CACEoE,KAAM,sBACNpE,MAAO,uBAET,yBACA,gBAGA,sBACA,eAGA,0BACA,kBACA,cACA,8BACA,4BACA,iCACA,sBACA,gBAGA,mBACA,2BACA,qBACA,sBACA,qBACA,mBACA,iBAGA,yBACA,8BACA,wBACA,sBACA,gBACA,mBAGA,oBACA,mBACA,qBAGJ,CACEoE,KAAM,oBACNpE,MAAO,oBACPwwE,QAAS,CAAC,EACVlrD,SAAU,CACR,CACElhB,KAAM,wBACNpE,MAAO,2BAIb,CACEoE,KAAM,QACNpE,MAAO,QACPwwE,QAAS,CAAC,EACVlrD,SAAU,CACR,CACElhB,KAAM,cACNpE,MAAO,iBAIb,CACEoE,KAAM,sBACNpE,MAAO,sBACPwwE,QAAS,CAAC,EACVlrD,SAAU,CACR,CACElhB,KAAM,QACNpE,MAAO,SAET,CACEoE,KAAM,QACNpE,MAAO,SAET,CACEoE,KAAM,wCACNpE,MAAO,yCAET,CACEoE,KAAM,qCACNpE,MAAO,wCAIb,CACEoE,KAAM,sBACNpE,MAAO,sBACPwwE,QAAS,CAAC,EACVlrD,SAAU,CACR,CACElhB,KAAM,QACNpE,MAAO,SAET,CACEoE,KAAM,QACNpE,MAAO,SAET,CACEoE,KAAM,SACNpE,MAAO,UAET,CACEoE,KAAM,QACNpE,MAAO,W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O,4BAET,CACEoE,KAAM,aACNpE,MAAO,cAET,CACEoE,KAAM,cACNpE,MAAO,eAET,CACEoE,KAAM,wBACNpE,MAAO,2BAIb,CACEoE,KAAM,+BACNpE,MAAO,+BACPwwE,QAAS,CAAC,EACVlrD,SAAU,CACR,CACElhB,KAAM,mBACNpE,MAAO,oBAET,CACEoE,KAAM,kBACNpE,MAAO,mBAET,CACEoE,KAAM,kBACNpE,MAAO,qBAIb,CACEoE,KAAM,cACNpE,MAAO,cACPwwE,QAAS,CAAC,EACVlrD,SAAU,CACR,CACElhB,KAAM,WACNpE,MAAO,cAIb,CACEoE,KAAM,cACNpE,MAAO,cACPwwE,QAAS,CAAC,EACVlrD,SAAU,CACR,CACElhB,KAAM,kBACNpE,MAAO,qBAIb,CACEoE,KAAM,qBACNpE,MAAO,qBACPwwE,QAAS,CAAC,EACVlrD,SAAU,CACR,CACElhB,KAAM,wBACNpE,MAAO,2BAIb,CACEoE,KAAM,eACNpE,MAAO,eACPwwE,QAAS,CAAC,EACVlrD,SAAU,CACR,CACElhB,KAAM,mBACNpE,MAAO,sBAIb,CACEoE,KAAM,iCACNpE,MAAO,iCACPslB,SAAU,CACR,gBAGJ,CACElhB,KAAM,gCACNpE,MAAO,gCACPslB,SAAU,CACR,CACElhB,KAAM,sBACNpE,MAAO,uBAET,CACEoE,KAAM,sBACNpE,MAAO,uBAET,CACEoE,KAAM,sBACNpE,MAAO,yBAIb,CACEoE,KAAM,8BACNpE,MAAO,8BACPslB,SAAU,CACR,CACElhB,KAAM,QACNpE,MAAO,WAIb,CACEoE,KAAM,sBACNpE,MAAO,sBACPslB,SAAU,CACR,CACElhB,KAAM,mBACNpE,MAAO,sBAIb,CACEoE,KAAM,wBACNpE,MAAO,wBACPwwE,QAAS,CAAC,EACVlrD,SAAU,CACR,CACElhB,KAAM,wBACNpE,MAAO,yBAET,CACEoE,KAAM,WACNpE,MAAO,cAIb,CACEoE,KAAM,wBACNpE,MAAO,wBACPwwE,QAAS,CAAC,E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DACA,gDACA,gCACA,6DACA,qCACA,sCACA,qBACA,gCACA,2BACA,6BACA,8BACA,+BACA,6BACA,wBACA,gCACA,wCACA,yBACA,wCACA,oCACA,+CACA,kCACA,gCACA,yCACA,6BACA,sBACA,wBACA,yBACA,kBACA,6BACA,2BACA,oBACA,uBACA,sBACA,iBACA,0BACA,2BACA,0BACA,4BACA,wBACA,iBACA,kBACA,8BACA,kCACA,sDACA,4CACA,6CACA,uCACA,qDACA,uCACA,iBACA,8BACA,yCACA,+BACA,oDACA,gCACA,qDACA,iCACA,sBACA,qCACA,8CACA,yCACA,2CACA,4CACA,6CACA,2CACA,sCACA,uDACA,iDACA,wCACA,sCACA,sCACA,iDACA,6BACA,6BACA,iCACA,iCACA,iCACA,iCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,gCACA,oCACA,iCACA,sBACA,yCACA,8CACA,kCACA,+CACA,mCACA,0BACA,kBACA,+BACA,sCACA,gDACA,+BACA,2BACA,4BACA,gCACA,yBACA,mBACA,mEACA,kBACA,sBACA,4BACA,wBACA,uCACA,6BACA,8BACA,gCACA,qCACA,8CACA,qCACA,oCACA,0CACA,oDACA,qCACA,wCACA,qCACA,yCACA,qCACA,wCACA,qCACA,yCACA,wCACA,yCACA,8CACA,4BACA,2BACA,8BACA,2CACA,gCACA,iCACA,wBACA,2CACA,+BACA,+BACA,4BACA,0BACA,8BACA,wCACA,0CACA,2CACA,wCACA,gCACA,4BACA,oCACA,6BACA,uDACA,0BACA,4BACA,sBACA,2BACA,6BACA,oBACA,gCACA,sBACA,6BACA,yBACA,2BACA,kBACA,wCACA,kBACA,yBACA,+BACA,uBACA,sCACA,yBACA,gCACA,kBACA,qBACA,wBACA,iCACA,oBACA,wBACA,0CACA,gBACA,4BACA,YACA,qCACA,uBACA,qBACA,qCACA,yBACA,iCACA,6BACA,aACA,wBACA,iBACA,qCACA,wCACA,sCACA,yCACA,aACA,mCACA,eACA,8BACA,uCACA,8CACA,mBACA,kCACA,qBACA,yBACA,2BACA,oCACA,sBACA,8CACA,qCACA,sCACA,yBACA,qDACA,kCACA,iCACA,iCACA,0BACA,mCACA,2BACA,qDACA,6CACA,oCACA,wCACA,gBACA,2BACA,iCACA,yBACA,0CACA,yCACA,qCACA,yBACA,yBACA,+CACA,mDACA,8CACA,sDACA,wDACA,oDACA,gDACA,gDACA,iDACA,kDACA,qCACA,sCACA,mCACA,iDACA,0CACA,gDACA,sCACA,6BACA,uBACA,gCACA,sDACA,yCACA,yBACA,gBACA,mBACA,2DACA,oDACA,0CACA,iDACA,iCACA,qDACA,qDACA,wCACA,kDACA,4BACA,mBACA,6CACA,8CACA,6BACA,sDACA,sCACA,6CACA,4BACA,0BACA,sBACA,mCACA,iCACA,0BACA,yCACA,8BACA,8BACA,8BACA,8BACA,oCACA,6BACA,6BACA,0CACA,+BACA,8BACA,yBACA,4BACA,mCACA,oCACA,6BACA,qCACA,uBACA,mBACA,iCACA,4CACA,0BACA,wBACA,eACA,8BACA,gCACA,6BACA,wBACA,gBACA,+BACA,wBACA,6BACA,kBACA,mBACA,eACA,mCACA,mCACA,qCACA,+BACA,kCACA,sCACA,8BACA,kBACA,gCACA,8BACA,4CACA,oCACA,mCACA,gDACA,+CACA,kCACA,oCACA,6BACA,yCACA,uBACA,4BACA,sCACA,0CAIIC,EAAwB,CAC5B,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,MACA,OAIIC,GAAiB,CACrB,2BACA,qBACA,sBACA,uB,sECxaF,IAAMC,EAAY,CAAC,oBAAqB,yBAClCC,EAAa,SAAH7kF,GAAA,IAAM+9E,EAAQ/9E,EAAR+9E,SAAkB,OAAmD,IAAnD/9E,EAAR2oE,SAAwBpxC,cAAc2D,QAAQ,UAC9E0pD,EAAUE,MAAK,SAAAz+C,GAAG,OAAI03C,EAASxmD,cAAc2D,QAAQmL,IAAQ,CAAC,GAAE,EAMzD,SAAS0+C,IACd,MAAO,CACLC,WANyBr7E,EAMDq9C,OAAOr9C,SAL1Bk7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GACvBZ,EAAWA,iGAAqIL,EAAIr7F,KAAK,QAASvb,EAAKN,OAAO,GAAM,GAAMk3G,EAAIr7F,KAAK,aAAcvb,EAAK9O,OAAO,GAAM,GAAM,gCAAoC0lH,EAAIr7F,KAAK,aAAcvb,EAAKgU,WAAW,GAAM,GAAS,SAAsB4iG,EAAIr7F,KAAK,QAASq7F,EAAIz/B,QAAQ,CAAC,oBAAoBn3E,EAAKmb,WAAY,EAAC,GAAM,KAAQ,GAAO,GAAS,WAE5b87F,EADIh8F,IAAkBjb,EAAK9O,MAChB+lH,EAAW,UAAkBL,EAAIr7F,KAAK,QAASq7F,EAAIz/B,QAAQ,CAACn3E,EAAKk1G,WAAY,EAAC,KAAQ,GAAO,GAAS,IAAY0B,EAAIO,OAAO,OAASH,EAAah3G,EAAK42E,MAAQ,GAAKogC,GAAe,YAGpLC,EAAW,QAAgBL,EAAIr7F,KAAK,QAASq7F,EAAIz/B,QAAQ,CAACn3E,EAAKk1G,WAAY,EAAC,KAAQ,GAAO,GAAS,IAAY0B,EAAIO,OAAO,OAASH,EAAah3G,EAAK42E,MAAQ,GAAKogC,GAAe,UAE7LC,GAAsB,cAClB,CACF,CACD,EAAEpoD,KAAK79D,MAERimH,GAAsB,OAAuB,EAAEpoD,KAAK79D,KAAK,kBAAmBkmH,EAAgBA,EAAgBj8F,cAAqC,qBAAhBA,cAA4BA,mBAAcpZ,EAAU,UAAWq1G,EAAgBA,EAAgBvhF,MAAqB,qBAARA,MAAoBA,WAAM9zB,GAAoBo1G,CAAS,C","sources":["../../../../components/packages/campaign-cache-manager/src/decorated-odata-adapter.js","../../../../components/packages/campaign-cache-manager/src/context-manager-bridge.js","../../../../components/packages/campaign-cache-manager/src/index.js","../../../../components/packages/campaign-ui-common/src/enums/campaign-type.js","../../../../components/packages/campaign-ui-common/src/enums/status-filter-options.js","../../../../components/packages/campaign-ui-common/src/enums/scope.js","../../../../components/packages/campaign-ui-common/src/enums/account-mode.js","../../../../components/packages/campaign-ui-common/src/enums/temp-account-name-prefix.js","../../../../components/packages/campaign-ui-common/src/waterfall-filter/waterfall-filter-helper.js","../../../../components/packages/campaign-ui-common/src/utils/account-utils.js","../../../../components/packages/campaign-ui-common/src/utils/get-environment.js","../../../../components/packages/campaignui-base-column/src/column.js","../../../../components/packages/campaignui-common-columns/src/fluctuations/fluctuation-type-enum.js","../../../../components/packages/campaignui-common-columns/src/fluctuations/fluctuation-base-column.js","../../../../components/packages/campaignui-common-columns/src/fluctuations/performance-columns-with-fluctuation.js","../../../../components/packages/campaignui-common-columns/src/utils.js","../../../../components/packages/campaignui-common-columns/src/performance-metric-base-column.js","../../../../components/packages/campaignui-common-columns/src/performance-columns.js","../../../../components/packages/campaignui-common-columns/src/conversions-columns.js","../../../../components/packages/campaignui-common-columns/src/bid-landscape-utils.js","../../../../components/packages/campaignui-common-columns/src/competitive-columns.js","../../../../components/packages/campaignui-common-columns/src/call-details-columns.js","../../../../components/packages/campaignui-common-columns/src/attributes/bid-strategy-type.js","../../../../components/packages/campaignui-common-columns/src/attributes/campaign.js","../../../../components/packages/campaignui-common-columns/src/attributes/delivery.js","../../../../components/packages/campaignui-common-columns/src/attributes/quality-score.js","../../../../components/packages/campaignui-common-columns/src/attributes/quality-score-click-handler.js","../../../../components/packages/campaignui-common-columns/src/attributes/status-icon.js","../../../../components/packages/campaignui-common-columns/src/attributes/budget.js","../../../../components/packages/campaignui-common-columns/src/attributes/budget-column.js","../../../../components/packages/campaignui-common-columns/src/attributes/bid-strategy-name-column.js","../../../../components/packages/campaignui-common-columns/src/attributes/campaign-bid-strategy.js","../../../../components/packages/campaignui-common-columns/src/attributes/lifetime-budget-column.js","../../../../components/packages/column-conversions/src/column-conversion.js","../../../../components/packages/column-conversions/src/partial-conversions.js","../../../../components/packages/common-grid-config/src/filter/util/update-entity-schema-for-sov.js","../../../../components/packages/common-grid-config/src/filter/util/update-entity-schema-for-custom-column.js","../../../../components/packages/common-grid-config/src/filter/util/update-entity-schema-for-removed-performance-metrics.js","../../../../components/packages/common-grid-config/src/filter/util/update-entity-schema-for-audiencesov.js","../../../../components/packages/common-grid-config/src/filter/util/update-entity-schema-for-pilot-features.js","../../../../components/packages/common-grid-config/src/filter/util/update-pop-property-for-filter.js","../../../../components/packages/common-grid-config/src/filter/util/update-campaign-type-property-for-filter.js","../../../../components/packages/common-grid-config/src/filter/util/update-delivery-status-property-for-filter.js","../../../../components/packages/common-grid-config/src/filter/util/update-ad-extension-association-source-property-for-filter.js","../../../../components/packages/common-grid-config/src/filter/util/update-label-property-for-filter.js","../../../../components/packages/common-grid-config/src/filter/util/update-auction-insight-property-for-filter.js","../../../../components/packages/common-grid-config/src/filter/util/update-experiment-property-for-filter.js","../../../../components/packages/common-grid-config/src/filter/util/update-adsbybing-property-for-filter.js","../../../../components/packages/common-grid-config/src/filter/util/update-mutiplied-property-for-filter.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/base-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/util/update-odata-options-for-array-type.js","../../../../components/packages/common-grid-config/src/filter/util/update-campaign-languages-property-for-filter.js","../../../../components/packages/common-grid-config/src/filter/util/update-available-insight-type-ids-property-for-filter.js","../../../../components/packages/common-grid-config/src/filter/util/update-status-property-for-filter.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/campaign-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/adgroup-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/util/update-tracking-template-property-for-filter.js","../../../../components/packages/common-grid-config/src/filter/util/update-final-url-property-for-filter.js","../../../../components/packages/common-grid-config/src/filter/util/update-final-url-suffix-property-for-filter.js","../../../../components/packages/common-grid-config/src/filter/util/update-editorial-rejection-reason-for-filter.js","../../../../components/packages/common-grid-config/src/filter/util/update-is-appeal-pending-property-for-filter.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/keyword-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/util/update-asset-id-for-filter.js","../../../../components/packages/common-grid-config/src/filter/util/update-asset-library-asset-id-for-filter.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/ad-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/util/update-ad-strength-property-for-filter.js","../../../../components/packages/common-grid-config/src/filter/util/update-ad-resource-status-for-filter.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/negative-keyword-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/adgroupcriterion-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/experiment-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/asset-link-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/asset-with-bi-data-processor.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/responsive-search-ad-instance-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/base-criterion-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/util/update-criterion-property-for-filter.js","../../../../components/packages/common-grid-config/src/filter/util/update-level-property-for-filter.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/daytime-criterion-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/device-criterion-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/location-criterion-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/audiencecriterionwithbi-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/product-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/audience-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/gmbimport-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/search-term-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/util/update-account-inactive-reason-property-for-filter.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/base-accounts-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/performance-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/smart-performance-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/management-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/account-import-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/tag-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/linked-store-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/goal-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/seasonality-adjustment-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/shared-budget-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/shared-budget-campaign-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/site-exclusion-list-account-level-lists-grid-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/site-exclusion-list-customer-level-associations-grid-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/hotel-center-overview-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/portfolio-bid-strategy-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/asset-group-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/pmax-asset-link-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/unified-asset-link-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/schema-processors/app-ads-asset-group-schema-processor.js","../../../../components/packages/common-grid-config/src/filter/filter-config.js","../../../../components/packages/custom-column-backbone-wrapper/src/view.js","../../../../components/packages/data-source-store/src/index.js","../../../../components/packages/delivery-status-popup-factory/src/rejection/popup-callout.js","../../../../components/packages/delivery-status-popup-factory/src/rejection/constants.js","../../../../components/packages/delivery-status-popup-factory/src/rejection/show-rejection-reasons.js","../../../../components/packages/delivery-status-popup-factory/src/factory.js","../../../../components/packages/delivery-status-popup-factory/src/rejection/location-Enum-To-String-Mapping.js","../../../../components/packages/delivery-status-popup-factory/src/rejection/show-editorial-reasons.js","../../../../components/packages/delivery-status-popup-factory/src/rejection/register-event.js","../../../../components/packages/dqb-grid-datasource-connector/src/grid-chart-datasource.js","../../../../components/packages/dqb-grid-datasource-connector/src/index.js","../../../../components/packages/dqb-grid-datasource-error-handler/src/index.js","../../../../components/packages/filter-converter/src/index.js","../../../../components/packages/filter-storage/src/session-filter-storage.js","../../../../components/packages/filter-storage/src/legacy-quick-filter-storage.js","../../../../components/packages/filter-storage/src/deserializer.js","../../../../components/packages/filter-storage/src/task-queue-mixin.js","../../../../components/packages/filter-storage/src/editable-filter-storage.js","../../../../components/packages/filter-storage/src/permanent-filter-storage.js","../../../../components/packages/filter-storage/src/editable-filter-permanent-storage.js","../../../../components/packages/filter-storage/src/saved-filter-storage.js","../../../../components/packages/filter-storage/src/recent-filter-storage.js","../../../../components/packages/filter-storage/src/quick-filter-storage.js","../../../../components/packages/filter-storage/src/quick-filter-permanent-storage.js","../../../../components/packages/filter-storage/src/waterfall-filter-permanent-storage.js","../../../../components/packages/filter-storage/src/filter-session-storage.js","../../../../components/packages/filter-storage/src/quick-filter-session-storage.js","../../../../components/packages/filter-storage/src/filter-storage-factory.js","../../../../components/packages/filter-storage/src/waterfall-filter-storage.js","../../../../components/packages/global-app-init/src/constants.js","../../../../components/packages/global-app-init/src/omniture.js","../../../../components/packages/global-app-init/src/query-param-checker.js","../../../../components/packages/global-app-init/src/global-init.js","../../../../components/packages/grid-customized-popup-editor/src/get-position.js","../../../../components/packages/grid-customized-popup-editor/src/view.js","../../../../components/packages/injection-context/src/context.js","../../../../components/packages/injection-context/index.js","../../../../components/packages/instrumentation-schema/index.js","../../../../components/packages/instrumentation-setup/src/listeners.js","../../../../components/packages/instrumentation-setup/src/processors.js","../../../../components/packages/instrumentation-setup/src/expected-unhandled-promise-errors.js","../../../../components/packages/instrumentation-setup/src/perf-timing-config.js","../../../../components/packages/instrumentation-setup/src/instrumentation.js","../../../../components/packages/instrumentation-setup/src/set-stub.js","../../../../components/packages/instrumentation-setup/src/instrumentation-schema.js","../../../../components/packages/instrumentation/src/ariaConfig.js","../../../../components/packages/instrumentation/src/log-table-configs/campaign.js","../../../../components/packages/instrumentation/src/log-table-configs/adinsight.js","../../../../components/packages/instrumentation/src/log-processors/context-processor.js","../../../../components/packages/instrumentation/src/log-processors/debug-processor.js","../../../../components/packages/instrumentation/src/log-processors/perf-timing-processor.js","../../../../components/packages/instrumentation/src/log-formatters/format-utilities.js","../../../../components/packages/instrumentation/src/log-formatters/basic-formatter.js","../../../../components/packages/instrumentation/src/log-formatters/api-formatter.js","../../../../components/packages/instrumentation/src/log-formatters/adinsight-opportunity-log-formatter.js","../../../../components/packages/instrumentation/src/log-formatters/reporting-api-formatter.js","../../../../components/packages/instrumentation/src/log-formatters/uettaghelper-formatter.js","../../../../components/packages/instrumentation/src/log-formatters/import-api-formatter.js","../../../../components/packages/instrumentation/src/log-formatters/console-formatter.js","../../../../components/packages/instrumentation/src/log-formatters/perf-timing-formatter.js","../../../../components/packages/instrumentation/src/log-filters/log-level-filter.js","../../../../components/packages/instrumentation/src/log-filters/api-filter.js","../../../../components/packages/instrumentation/src/log-filters/adinsight-opportunity-api-filter.js","../../../../components/packages/instrumentation/src/log-filters/console-filter.js","../../../../components/packages/instrumentation/src/log-filters/unload-log-filter.js","../../../../components/packages/instrumentation/src/log-filters/perf-timing-filter.js","../../../../components/packages/instrumentation/src/ajax-error-mappers/odata-error-mapper.js","../../../../components/packages/instrumentation/src/ajax-error-mappers/campaignapi-error-mapper.js","../../../../components/packages/instrumentation/src/ajax-error-mappers/url-error-mapper.js","../../../../components/packages/instrumentation/src/utilities/environment-helper.js","../../../../components/packages/instrumentation/src/utilities/default-error-codes.js","../../../../components/packages/odata-config/src/odata-config.js","../../../../components/packages/pgrid-aggregated-rows/src/plugin.js","../../../../components/packages/pgrid-performance-log/src/plugin.js","../../../../components/packages/pgrid-performance-log/src/pluginv2.js","../../../../components/packages/preferences-subadapter/src/preferences-subadapter.js","../../../../components/packages/projection-grid-column-chooser/src/update-filter-for-custom-column.js","../../../../components/packages/projection-grid-column-chooser/src/prompt-text-view.js","../../../../components/packages/projection-grid-column-chooser/src/plugin.js","../../../../components/packages/projection-grid-column-chooser/src/config.js","../../../../components/packages/projection-grid-date-filter/src/plugin.js","../../../../components/packages/projection-grid-inline-download/src/generic-plugin.js","../../../../components/packages/projection-grid-inline-download/src/set-filter-by-report-email-rule.js","../../../../components/packages/projection-grid-inline-download/src/campaign-odata-plugin.js","../../../../components/packages/projection-grid-inline-download/src/without-dependencies.js","../../../../components/packages/projection-grid-inline-download/src/campaign-odata-plugin-without-dependencies.js","../../../../components/packages/projection-grid-labels/src/create-label-selector-view.js","../../../../components/packages/projection-grid-labels/src/plugin.js","../../../../components/packages/projection-grid-period-over-period/src/projection/period-over-period-columns.js","../../../../components/packages/projection-grid-period-over-period/src/projection/period-over-period-header.js","../../../../components/packages/projection-grid-period-over-period/src/plugin.js","../../../../components/packages/projection-grid-segment/src/projection/segment.js","../../../../components/packages/projection-grid-segment/src/projection/segment-cell-style.js","../../../../components/packages/projection-grid-segment/src/segment-alert.js","../../../../components/packages/projection-grid-segment/src/plugin.js","../../../../components/packages/query-builder/src/utils/js-data-query-generator.js","../../../../components/packages/query-builder/src/query-builder.js","../../../../components/packages/query-builder/src/decorators/decorator.js","../../../../components/packages/query-builder/src/utils/deps-check.js","../../../../components/packages/query-builder/src/decorators/column-chooser-decorator.js","../../../../components/packages/query-builder/src/decorators/date-filter-decorator.js","../../../../components/packages/query-builder/src/decorators/filter-decorator.js","../../../../components/packages/query-builder/src/decorators/grid-data-parameters-decorator.js","../../../../components/packages/query-builder/src/decorators/pagination-decorator.js","../../../../components/packages/query-builder/src/decorators/segmentation-decorator.js","../../../../components/packages/query-builder/src/decorators/sorting-decorator.js","../../../../components/packages/query-builder/src/decorators/chart-parameters-decorator.js","../../../../components/packages/query-builder/src/decorators/data-exclusion-filter-processor-decorator.js","../../../../components/packages/query-builder/src/decorators/target-roas-filter-processor-decorator.js","../../../../components/packages/query-builder/src/factory.js","../../../../components/packages/scope-constants/src/index.js","../../../../components/packages/seasonality-id-name-utils/src/utils.js","../../../../components/packages/segmentation-utilities/src/segmentation-type.js","../../../../components/packages/segmentation-utilities/src/segmentation-type-enum.js","../../../../components/packages/segmentation-utilities/src/time-range-checker.js","../../../../components/packages/segmentation-utilities/src/segmentation-tree.js","../../../../components/packages/segmentation-utilities/src/localize.js","../../../../components/packages/segmentation-utilities/src/is-supported.js","../../../../components/packages/segmentation-utilities/src/get-supported-tree.js","../../../../components/packages/status-popup-editor/src/status-popup-view.js","../../../../components/packages/status-popup-editor/src/render-status-popup-editor.js","../../../../components/packages/ui-next-style/src/uinext-welcome-style.js","../../../../components/packages/campaignui-common-columns/src/attributes/bid-strategy-type.pug","../../../../components/packages/campaignui-common-columns/src/attributes/budget-not-editable.pug","../../../../components/packages/campaignui-common-columns/src/attributes/budget-split.pug","../../../../components/packages/campaignui-common-columns/src/attributes/budget-template.pug","../../../../components/packages/campaignui-common-columns/src/attributes/campaign-bid-strategy-template.pug","../../../../components/packages/campaignui-common-columns/src/attributes/campaign.pug","../../../../components/packages/campaignui-common-columns/src/attributes/clickable-value.pug","../../../../components/packages/campaignui-common-columns/src/attributes/delivery.pug","../../../../components/packages/campaignui-common-columns/src/attributes/lifetime-budget-template.pug","../../../../components/packages/campaignui-common-columns/src/attributes/quality-score.pug","../../../../components/packages/campaignui-common-columns/src/attributes/status-icon-header-template.pug","../../../../components/packages/campaignui-common-columns/src/attributes/status-icon.pug","../../../../components/packages/campaignui-common-columns/src/attributes/unpurposed-budget-template.pug","../../../../components/packages/campaignui-common-columns/src/call-forwarding.pug","../../../../components/packages/campaignui-common-columns/src/fluctuations/performance-metric-with-fluctuation.pug","../../../../components/packages/common-grid-config/src/filter/shared/label-name-template.pug","../../../../components/packages/delivery-status-popup-factory/src/rejection/editorial-category-template.pug","../../../../components/packages/delivery-status-popup-factory/src/rejection/editorial-reason.pug","../../../../components/packages/delivery-status-popup-factory/src/rejection/experiment-info.pug","../../../../components/packages/delivery-status-popup-factory/src/rejection/no-reason-found-template.pug","../../../../components/packages/delivery-status-popup-factory/src/rejection/reason-disabled-template.pug","../../../../components/packages/delivery-status-popup-factory/src/rejection/reason-template.pug","../../../../components/packages/delivery-status-popup-factory/src/rejection/template.pug","../../../../components/packages/projection-grid-column-chooser/src/prompt-text-view.pug","../../../../components/packages/projection-grid-period-over-period/src/projection/cell.pug","../../../../components/packages/projection-grid-period-over-period/src/projection/header.pug","../../../../components/packages/projection-grid-period-over-period/src/projection/period-over-period-header.pug","../../../../components/packages/projection-grid-segment/src/projection/segment-value-cell-default.pug","../../../../components/packages/projection-grid-segment/src/segment-alert.pug","../../../../components/packages/status-popup-editor/src/template.pug"],"sourcesContent":["import _ from 'underscore';\r\n\r\nexport class DecoratedODataAdapter {\r\n constructor({\r\n adapter,\r\n getTTL,\r\n }) {\r\n this.adapter = adapter;\r\n this.getTTL = getTTL;\r\n }\r\n\r\n findAll(definition, query, options) {\r\n const ttl = this.getTTL(definition, query, options);\r\n const { entitySet, headers, successCallback } = options;\r\n const path = _.result(entitySet, 'path', null);\r\n const params = _.chain(entitySet)\r\n .result('navigation')\r\n .result('parameters', null)\r\n .value();\r\n const key = [_.omit(query, 'cacheBusterFlag'), path, params];\r\n let cacheHit = true;\r\n\r\n const cachedResult = options.cacheResult(key, () => {\r\n cacheHit = false;\r\n return this.adapter.findAll(definition, query, _.defaults({\r\n headers: _.defaults({\r\n 'x-ms-lastwritetime': options.getCacheHint() || 'Max',\r\n }, headers),\r\n successCallback: (...args) => {\r\n const [res] = args;\r\n const cacheCreationTime = _.result(res, '@ns.objectcachecreationtime', null);\r\n\r\n if (cacheCreationTime) {\r\n options.setCacheHint(cacheCreationTime, ttl);\r\n }\r\n if (_.isFunction(successCallback)) {\r\n successCallback(...args);\r\n }\r\n },\r\n }, options)).then((result) => {\r\n if (result.errors) {\r\n options.delResult(key);\r\n }\r\n return result;\r\n });\r\n }, ttl);\r\n\r\n if (_.isFunction(options.cacheStateCallback)) {\r\n options.cacheStateCallback(cacheHit);\r\n }\r\n\r\n return cachedResult;\r\n }\r\n}\r\n","const actionMap = {\r\n Campaign: ['campaigns/update', 'CampaignsGrid'],\r\n AdGroup: ['adgroup/update', 'AdGroupGrid'],\r\n Ad: ['ads/update', 'AdGrid'],\r\n Keyword: ['keyword/update', 'KeywordGrid'],\r\n NegativeKeywordList: ['NegativeKeywordLibraryCampaignAssociationsGrid'],\r\n CampaignCriterion: ['campaignssettings/update', 'CampaignSettingsGrid'],\r\n AdGroupCriterion: ['campaignssettings/update', 'AdGroupSettingsGrid'],\r\n};\r\nconst resourceMap = {\r\n CampaignsGrid: 'Campaign',\r\n AdGroupGrid: 'AdGroup',\r\n AdGrid: 'Ad',\r\n KeywordGrid: 'Keyword',\r\n NegativeKeywordLibraryCampaignAssociationsGrid: 'NegativeKeywordList',\r\n CampaignSettingsGrid: 'CampaignCriterion',\r\n AdGroupSettingsGrid: 'AdGroupCriterion',\r\n PerformanceTargetsSummaryGrid: 'PerformanceTarget',\r\n SearchTermGrid: 'SearchTerm',\r\n DsaTargetGrid: 'DsaTarget',\r\n NegativeAdGroupDsaTargetGrid: 'NegativeAdGroupDsaTarget',\r\n NegativeCampaignDsaTargetGrid: 'NegativeCampaignDsaTarget',\r\n};\r\n\r\nexport class ContextManagerBridge {\r\n constructor({\r\n cacheManager,\r\n contextManager,\r\n }) {\r\n // Use the dirty flags to prevent duplicated invalidation\r\n const cacheManagerDirty = {};\r\n const contextManagerDirty = {};\r\n\r\n // Hook up cache manager, subscribe the notifications\r\n cacheManager.subscribe({\r\n\r\n // Clear the context manager after invalidate\r\n afterInvalidate(cm, resource) {\r\n const gridIds = actionMap[resource];\r\n\r\n delete cacheManagerDirty[resource];\r\n\r\n if (gridIds && contextManagerDirty[resource]) {\r\n contextManager.updateContext(gridIds);\r\n }\r\n },\r\n\r\n // Mark the dirty flags before execution of 'findAll'\r\n beforeExecute(cm, { action, parameters }) {\r\n if (action === 'findAll') {\r\n const { name: resource } = parameters[0];\r\n cacheManagerDirty[resource] = true;\r\n contextManagerDirty[resource] = true;\r\n }\r\n },\r\n });\r\n\r\n // Hook up context manager, patch the updateContext method\r\n const { emitter } = contextManager;\r\n\r\n emitter.on('invalidate', (gridId) => {\r\n const resource = resourceMap[gridId];\r\n\r\n if (resource) {\r\n delete contextManagerDirty[resource];\r\n if (cacheManagerDirty[resource]) {\r\n cacheManager.invalidate(resource, true);\r\n }\r\n }\r\n });\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport {\r\n JSDataCacheManager,\r\n CascadeInvalidateStrategy,\r\n WriteActionInvalidateStrategy,\r\n PartitionStrategy,\r\n} from '@bingads-webui-universal/js-data-cache-manager';\r\n\r\nimport {\r\n TimeAwareCache,\r\n LRUReplacementStrategy,\r\n} from '@bingads-webui-universal/time-aware-cache';\r\nimport { dependants } from '@bingads-webui/campaign-entity-dependants';\r\n\r\nimport { DecoratedODataAdapter } from './decorated-odata-adapter';\r\nimport { ContextManagerBridge } from './context-manager-bridge';\r\n\r\nconst ADDITIONAL_WRITE_ACTIONS = ['createMany', 'updateMany'];\r\nconst RESOURCE_WHITE_LIST = [\r\n 'Account',\r\n 'Ad',\r\n 'AdGroup',\r\n 'AdGroupCriterion',\r\n 'AssetLink',\r\n 'Campaign',\r\n 'CampaignCriterion',\r\n 'CustomColumn',\r\n 'DimensionRow',\r\n 'FeedItem',\r\n 'Keyword',\r\n 'NegativeKeyword',\r\n 'PerformanceTarget',\r\n 'PerformanceTargetInstance',\r\n 'PerformanceTimeSeries',\r\n 'SearchTerm',\r\n 'Tip',\r\n 'DsaSearchTerm',\r\n 'DsaTarget',\r\n 'NegativeAdGroupDsaTarget',\r\n 'NegativeCampaignDsaTarget',\r\n 'AdCustomizerAttribute',\r\n 'AssetGroup',\r\n];\r\n\r\nexport class CampaignCacheManager extends JSDataCacheManager {\r\n /**\r\n * JSDataCacheManager for Campaign UI\r\n * @param {Object} options -\r\n * @param {JSDataStore} options.store - The JSData store\r\n * @param {ContextManager} options.contextManager - The campaign context manager\r\n * @param {function} options.getTTL - Callback to get TTL for cache items\r\n */\r\n constructor({ store, contextManager, getTTL }) {\r\n super({\r\n store,\r\n actions: ADDITIONAL_WRITE_ACTIONS,\r\n invalidateStrategies: [\r\n new WriteActionInvalidateStrategy({\r\n writeActions: ADDITIONAL_WRITE_ACTIONS,\r\n }),\r\n\r\n new CascadeInvalidateStrategy({ dependants }),\r\n ],\r\n partitionStrategies: [\r\n new PartitionStrategy({\r\n cache: new TimeAwareCache({\r\n // Default TTL 2 hours\r\n ttl: 2 * 60 * 60 * 1000,\r\n\r\n // Default limit 200 items\r\n strategy: new LRUReplacementStrategy({ limit: 200 }),\r\n }),\r\n condition(cache, { resource }) {\r\n return _.contains(RESOURCE_WHITE_LIST, resource);\r\n },\r\n }),\r\n ],\r\n });\r\n\r\n this.enableCacheOnAdapter('odata', adapter => new DecoratedODataAdapter({\r\n adapter,\r\n getTTL,\r\n }));\r\n this.contextManagerBridge = new ContextManagerBridge({\r\n cacheManager: this,\r\n contextManager,\r\n });\r\n }\r\n}\r\n","export const CampaignType = {\r\n None: 0,\r\n Default: 0b1,\r\n Shopping: 0b10,\r\n DynamicSearchAds: 0b100,\r\n Audience: 0b1000,\r\n Smart: 0b10000,\r\n Hotel: 0b100000,\r\n PerformanceMax: 0b1000000,\r\n App: 0b10000000,\r\n LinkedIn: 0b100000000,\r\n All: 0xFFFF,\r\n};\r\n\r\nexport const CampaignTypeByEnumValue = {\r\n \"Enum.CampaignType'Default'\": CampaignType.Default,\r\n \"Enum.CampaignType'Shopping'\": CampaignType.Shopping,\r\n \"Enum.CampaignType'DynamicSearchAds'\": CampaignType.DynamicSearchAds,\r\n \"Enum.CampaignType'Audience'\": CampaignType.Audience,\r\n \"Enum.CampaignType'Smart'\": CampaignType.Smart,\r\n \"Enum.CampaignType'Hotel'\": CampaignType.Hotel,\r\n \"Enum.CampaignType'PerformanceMax'\": CampaignType.PerformanceMax,\r\n \"Enum.CampaignType'App'\": CampaignType.App,\r\n \"Enum.CampaignType'LinkedIn'\": CampaignType.LinkedIn,\r\n};\r\n\r\nexport const CampaignTypeToStringMap = {\r\n [CampaignType.Default]: 'Default',\r\n [CampaignType.Shopping]: 'Shopping',\r\n [CampaignType.DynamicSearchAds]: 'DynamicSearchAds',\r\n [CampaignType.Audience]: 'Audience',\r\n [CampaignType.Smart]: 'Smart',\r\n [CampaignType.Hotel]: 'Hotel',\r\n [CampaignType.PerformanceMax]: 'PerformanceMax',\r\n [CampaignType.App]: 'App',\r\n [CampaignType.LinkedIn]: 'LinkedIn',\r\n [CampaignType.All]: 'All',\r\n};\r\n\r\nexport const CampaignTypeByODataValue = {\r\n Default: CampaignType.Default,\r\n Shopping: CampaignType.Shopping,\r\n DynamicSearchAds: CampaignType.DynamicSearchAds,\r\n Audience: CampaignType.Audience,\r\n Smart: CampaignType.Smart,\r\n Hotel: CampaignType.Hotel,\r\n PerformanceMax: CampaignType.PerformanceMax,\r\n App: CampaignType.App,\r\n LinkedIn: CampaignType.LinkedIn,\r\n};\r\n","export const StatusWaterfallFilterOptions = {\r\n All: 1,\r\n AllEnabled: 2,\r\n};\r\n","import _ from 'underscore';\r\nimport urijs from 'urijs';\r\n\r\nexport const Scope = {\r\n Customer: 0,\r\n Account: 1,\r\n Campaign: 2,\r\n AdGroup: 3,\r\n Ad: 4,\r\n PerformanceTarget: 5,\r\n};\r\n\r\nexport const getCurrentScope = (currentCampaignId, currentAdGroupId, currentAccountId) => {\r\n if (currentAdGroupId) {\r\n return Scope.AdGroup;\r\n }\r\n\r\n if (currentCampaignId) {\r\n return Scope.Campaign;\r\n }\r\n\r\n if (currentAccountId) {\r\n return Scope.Account;\r\n }\r\n\r\n return Scope.Customer;\r\n};\r\n\r\nexport const getCurrentScopeFromService = (scope) => {\r\n const values = (scope && scope.values) || {};\r\n const { aid, campaignId, adGroupId } = values;\r\n return getCurrentScope(campaignId, adGroupId, aid);\r\n};\r\n\r\nconst SCOPE_TO_KEY = {\r\n [Scope.Account]: 'aid',\r\n [Scope.Campaign]: 'campaignId',\r\n [Scope.AdGroup]: 'adGroupId',\r\n};\r\n\r\nfunction trimScopeInternal({\r\n urlQuery,\r\n currentScope,\r\n leastSupportedScope,\r\n}) {\r\n // i.e. currentScope = 1 = account scope\r\n // leastSupportedScope = 0 = customer scope\r\n if (currentScope > leastSupportedScope) {\r\n const queryToRemove = _.range(leastSupportedScope + 1, currentScope + 1)\r\n .map(scopeNumber => SCOPE_TO_KEY[scopeNumber]);\r\n\r\n return urijs(urlQuery).removeQuery(queryToRemove).toString();\r\n }\r\n\r\n // No need to trim scope, return url query as it is\r\n return urlQuery;\r\n}\r\n\r\nexport function trimScope(supportedScopes, scopeService, siteMapId) {\r\n /* eslint-disable object-curly-newline */\r\n const { history, values: { uid, cid, aid, campaignId, adGroupId } } = scopeService;\r\n if (siteMapId === 'import-google' || siteMapId === 'import-file') {\r\n return scopeService.stringify(_.omit({\r\n uid,\r\n cid,\r\n aid,\r\n }, value => !value));\r\n }\r\n\r\n const currentScope = getCurrentScope(campaignId, adGroupId, aid);\r\n const leastSupportedScope = _.isEmpty(supportedScopes) ? Scope.Account : _.max(supportedScopes);\r\n\r\n return trimScopeInternal({\r\n urlQuery: history.location.search,\r\n currentScope,\r\n leastSupportedScope,\r\n });\r\n}\r\n","export const ACCOUNT_MODE = {\r\n DEFAULT: null,\r\n EXPERT: 0,\r\n SMART: 1,\r\n UNIFIED_SMART: 2,\r\n UNIFIED_EXPERT: 3,\r\n};\r\n","// used for temp account name prefix when crate account\r\nexport const TEMP_NAME_PREFIX = '_DMC_TEMP_';\r\nexport const UP_TEMP_NAME_PREFIX = '_UP_TEMP_';\r\nexport const PMAX_TEMP_NAME_PREFIX = '_PMAX_TEMP_';\r\n","import _ from 'underscore';\r\nimport 'jquery';\r\nimport { WaterfallFilterType } from '@bingads-webui-campaign/filter-storage';\r\nimport { CampaignType, CampaignTypeByEnumValue, CampaignTypeToStringMap } from '../enums/campaign-type';\r\nimport { StatusWaterfallFilterOptions } from '../enums/status-filter-options';\r\n\r\nconst CampaignTypeEnumValuePrefix = 'Enum.CampaignType';\r\nconst CampaignStatusEnumValuePrefix = 'Enum.CampaignStatus';\r\nconst AdGroupStatusEnumValuePrefix = 'Enum.AdGroupStatus';\r\n\r\nfunction addPrefixToEnumValue(prefix, enumValue) {\r\n return `${prefix}'${enumValue}'`;\r\n}\r\n\r\nexport function getFilteredCampaignTypeFromRawFilter(rawFilter) {\r\n const filteredCampainTypes = rawFilter\r\n && rawFilter.value\r\n && rawFilter.value.query\r\n && rawFilter.value.query.CampaignType\r\n && rawFilter.value.query.CampaignType.$in;\r\n\r\n if (_.isEmpty(filteredCampainTypes)) {\r\n return CampaignType.All;\r\n }\r\n\r\n return CampaignTypeByEnumValue[filteredCampainTypes[0]];\r\n}\r\n\r\nexport function getFilteredCampaignTypeFromWaterfallFilter(waterfallFilters) {\r\n const campaignType = _.chain(waterfallFilters).compact().map((waterfallFilter) => {\r\n if (waterfallFilter.filter && waterfallFilter.filter.key === WaterfallFilterType.CampaignType) {\r\n return getFilteredCampaignTypeFromRawFilter(waterfallFilter.filter);\r\n }\r\n return undefined;\r\n }).first()\r\n .value();\r\n\r\n return campaignType;\r\n}\r\n\r\nexport function getFilteredCampaignStatusFromRawFilter(rawFilter) {\r\n const filteredCampaignStatuses = rawFilter\r\n && rawFilter.value\r\n && rawFilter.value.query\r\n && rawFilter.value.query.CampaignStatus\r\n && rawFilter.value.query.CampaignStatus.$in;\r\n\r\n if (_.size(filteredCampaignStatuses) === 2\r\n && filteredCampaignStatuses[0] === addPrefixToEnumValue(CampaignStatusEnumValuePrefix, 'Active')\r\n && filteredCampaignStatuses[1] === addPrefixToEnumValue(CampaignStatusEnumValuePrefix, 'BudgetPaused')) {\r\n return StatusWaterfallFilterOptions.AllEnabled;\r\n }\r\n\r\n return StatusWaterfallFilterOptions.All;\r\n}\r\n\r\nexport function getFilteredAdGroupStatusFromRawFilter(rawFilter) {\r\n const filteredAdGroupStatuses = rawFilter\r\n && rawFilter.value\r\n && rawFilter.value.query\r\n && rawFilter.value.query.AdGroupStatus\r\n && rawFilter.value.query.AdGroupStatus.$in;\r\n\r\n if (_.size(filteredAdGroupStatuses) === 2\r\n && filteredAdGroupStatuses[0] === addPrefixToEnumValue(AdGroupStatusEnumValuePrefix, 'Active')\r\n && filteredAdGroupStatuses[1] === addPrefixToEnumValue(AdGroupStatusEnumValuePrefix, 'CampaignBudgetPaused')) {\r\n return StatusWaterfallFilterOptions.AllEnabled;\r\n }\r\n\r\n return StatusWaterfallFilterOptions.All;\r\n}\r\n\r\nexport function convertFilteredCampaignTypeToFilter(campaignType) {\r\n if (campaignType === CampaignType.All) {\r\n return { key: WaterfallFilterType.CampaignType, value: { query: null } };\r\n }\r\n\r\n return {\r\n key: WaterfallFilterType.CampaignType,\r\n value: {\r\n query: {\r\n CampaignType: {\r\n $in:\r\n [addPrefixToEnumValue(\r\n CampaignTypeEnumValuePrefix,\r\n [CampaignTypeToStringMap[campaignType]]\r\n )],\r\n },\r\n },\r\n },\r\n };\r\n}\r\n\r\nexport function convertFilteredCampaignStatusToFilter(campaignStatus) {\r\n if (campaignStatus === StatusWaterfallFilterOptions.All\r\n || campaignStatus !== StatusWaterfallFilterOptions.AllEnabled) {\r\n return { key: WaterfallFilterType.CampaignStatus, value: { query: null } };\r\n }\r\n\r\n return {\r\n key: WaterfallFilterType.CampaignStatus,\r\n value: {\r\n query: {\r\n CampaignStatus: {\r\n $in:\r\n [\r\n addPrefixToEnumValue(CampaignStatusEnumValuePrefix, 'Active'),\r\n addPrefixToEnumValue(CampaignStatusEnumValuePrefix, 'BudgetPaused'),\r\n ],\r\n },\r\n },\r\n },\r\n };\r\n}\r\n\r\nexport function convertFilteredAdGroupStatusToFilter(adGroupStatus) {\r\n if (adGroupStatus === StatusWaterfallFilterOptions.All\r\n || adGroupStatus !== StatusWaterfallFilterOptions.AllEnabled) {\r\n return { key: WaterfallFilterType.AdGroupStatus, value: { query: null } };\r\n }\r\n\r\n return {\r\n key: WaterfallFilterType.AdGroupStatus,\r\n value: {\r\n query: {\r\n AdGroupStatus: {\r\n $in:\r\n [\r\n addPrefixToEnumValue(AdGroupStatusEnumValuePrefix, 'Active'),\r\n addPrefixToEnumValue(AdGroupStatusEnumValuePrefix, 'CampaignBudgetPaused'),\r\n ],\r\n },\r\n },\r\n },\r\n };\r\n}\r\n\r\n","import { ACCOUNT_MODE } from '../enums/account-mode';\r\n\r\nexport const isAccountExpert = accountMode =>\r\n `${accountMode}` === `${ACCOUNT_MODE.EXPERT}` ||\r\n `${accountMode}` === `${ACCOUNT_MODE.DEFAULT}` ||\r\n `${accountMode}` === '';\r\n","export const Environment = {\r\n PROD: 'PROD',\r\n BETAPROD: 'BETAPROD',\r\n TIP: 'TIP',\r\n SI: 'SI',\r\n BETASI: 'BETASI',\r\n CI: 'CI',\r\n};\r\n\r\n// domains with 'ui.' are for main bundle\r\n// domains without 'ui.' are for signup bundle\r\nexport const Domains = {\r\n PROD: {\r\n UI: {\r\n ADS: 'ui.ads.microsoft.com',\r\n BINGADS: 'ui.bingads.microsoft.com',\r\n BETA: {\r\n ADS: 'ui.beta.ads.microsoft.com',\r\n BINGADS: 'ui.beta.bingads.microsoft.com',\r\n },\r\n TIP: {\r\n ADS: 'ui.tip.ads.microsoft.com',\r\n BINGADS: 'ui.tip.bingads.microsoft.com',\r\n },\r\n },\r\n ADS: 'ads.microsoft.com',\r\n BINGADS: 'bingads.microsoft.com',\r\n BETA: {\r\n ADS: 'beta.ads.microsoft.com',\r\n BINGADS: 'beta.bingads.microsoft.com',\r\n },\r\n TIP: {\r\n ADS: 'tip.ads.microsoft.com',\r\n BINGADS: 'tip.bingads.microsoft.com',\r\n },\r\n SDK: {\r\n ADS: 'sdk.ads.microsoft.com',\r\n TIP: 'sdktip.ads.microsoft.com',\r\n BETA: 'sdkbeta.ads.microsoft.com',\r\n },\r\n },\r\n TEST: {\r\n UI: {\r\n ADSINT: 'ui.ads-int.microsoft.com',\r\n SI_PROXY: 'app1.ui.ads-int.microsoft.com:12000',\r\n SI: 'ui.si.bingads.microsoft.com',\r\n BETA: {\r\n ADSINT: 'ui.beta.ads-int.microsoft.com',\r\n SI: 'ui.beta.si.bingads.microsoft.com',\r\n },\r\n },\r\n ADSINT: 'ads-int.microsoft.com',\r\n SI_PROXY: 'app1.ads-int.microsoft.com:12000',\r\n SI: 'si.bingads.microsoft.com',\r\n BETA: {\r\n ADSINT: 'beta.ads-int.microsoft.com',\r\n SI: 'beta.si.bingads.microsoft.com',\r\n },\r\n LOCAL: 'localhost',\r\n CI: 'ci.ads.microsoft.com',\r\n SDK: {\r\n ADSINT: 'sdk.ads-int.microsoft.com',\r\n BETA: 'sdkbeta.ads-int.microsoft.com',\r\n },\r\n },\r\n};\r\n\r\n/**\r\n * Determines what environment the site is running in, based on the domain.\r\n * @param {string} domain - Current domain.\r\n * @returns {string} - Environment the site is running in.\r\n */\r\nexport function getEnvironment(domain) {\r\n const prodBingAdsPattern = /^(ui\\.)?bingads\\.microsoft\\.com$/;\r\n const prodMicrosoftAdsPattern = /^(ui\\.)?ads\\.microsoft\\.com$/;\r\n if (domain.match(prodMicrosoftAdsPattern) || domain.match(prodBingAdsPattern)) {\r\n return Environment.PROD;\r\n }\r\n\r\n const betaprodBingAdsPattern = /^(ui\\.)?beta\\.bingads\\.microsoft\\.com$/;\r\n const betaprodMicrosoftAdsPattern = /^(ui\\.)?beta\\.ads\\.microsoft\\.com$/;\r\n if (domain.match(betaprodMicrosoftAdsPattern) || domain.match(betaprodBingAdsPattern)) {\r\n return Environment.BETAPROD;\r\n }\r\n\r\n const tipBingAdsPattern = /^(ui\\.)?tip\\.bingads\\.microsoft\\.com$/;\r\n const tipMicrosoftAdsPattern = /^(ui\\.)?tip\\.?ads\\.microsoft\\.com$/;\r\n if (domain.match(tipBingAdsPattern) || domain.match(tipMicrosoftAdsPattern)) {\r\n return Environment.TIP;\r\n }\r\n\r\n const siBingAdsPattern = /^(ui\\.)?si\\.bingads\\.microsoft\\.com$/;\r\n const siMicrosoftAdsPattern = /^(app1\\.)?(ui\\.)?ads-int\\.microsoft\\.com(:12000)?$/;\r\n if (domain.match(siMicrosoftAdsPattern) || domain.match(siBingAdsPattern)) {\r\n return Environment.SI;\r\n }\r\n\r\n const betasiBingAdsPattern = /^(ui\\.)?beta\\.si\\.bingads\\.microsoft\\.com$/;\r\n const betasiMicrosoftAdsPattern = /^(ui\\.)?beta\\.ads-int\\.microsoft\\.com$/;\r\n if (domain.match(betasiMicrosoftAdsPattern) || domain.match(betasiBingAdsPattern)) {\r\n return Environment.BETASI;\r\n }\r\n\r\n return Environment.CI;\r\n}\r\n\r\n/**\r\n * Checks if domain is Prod or TIP domain.\r\n * @param {string} domain - Current domain.\r\n * @returns {bool} - True if Prod or TIP.\r\n */\r\nexport function isProdEnvironment(domain) {\r\n const env = getEnvironment(domain);\r\n return env === Environment.PROD || env === Environment.BETAPROD || env === Environment.TIP;\r\n}\r\n\r\n/**\r\n * Checks if domain is an internal environment like SI or CI or local.\r\n * @param {string} domain - Current domain.\r\n * @returns {bool} - True if not Prod or TIP.\r\n */\r\nexport function isInternalEnvironment(domain) {\r\n return !isProdEnvironment(domain);\r\n}\r\n\r\nexport function isSiEnvironment(domain) {\r\n const env = getEnvironment(domain);\r\n return env === Environment.SI || env === Environment.BETASI;\r\n}\r\n\r\nexport function getIsSignUpBundle(pathName) {\r\n return !!pathName.match(/signup/);\r\n}\r\n\r\nexport function getRootUrl(domain) {\r\n const env = getEnvironment(domain);\r\n switch (env) {\r\n case Environment.PROD:\r\n return `https://${Domains.PROD.ADS}`;\r\n case Environment.BETAPROD:\r\n return `https://${Domains.PROD.BETA.ADS}`;\r\n case Environment.TIP:\r\n return `https://${Domains.PROD.TIP.ADS}`;\r\n case Environment.SI:\r\n return `https://${Domains.TEST.ADSINT}`;\r\n case Environment.BETASI:\r\n return `https://${Domains.TEST.BETA.ADSINT}`;\r\n default:\r\n return `https://${Domains.TEST.CI}`;\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { ProjectionGridBaseColumn, helpers } from '@bingads-webui/projection-grid-base-column';\r\n\r\nconst regexPerfMetrics = /^(Performance)?Metrics\\//;\r\nconst regexPhonePerfMetrics = /^PhonePerformanceMetrics\\//;\r\n\r\nfunction propertyMatch(regex, property) {\r\n const keyPath = _.isString(property) ? property : property.key;\r\n return _.isString(keyPath) && keyPath.match(regex);\r\n}\r\n\r\n/**\r\n * Determines if the input is a PerformanceMetrics property.\r\n *\r\n * @param {String} property the property to query\r\n * @returns {Boolean} whether the property is a PerformanceMetrics or not.\r\n */\r\nexport const isPerformanceMetrics = _.partial(propertyMatch, regexPerfMetrics);\r\n\r\n/**\r\n * Determines if the input is a PhonePerformanceMetrics property.\r\n *\r\n * @param {String} property the property to query\r\n * @returns {Boolean} whether the property is a PhonePerformanceMetrics or not.\r\n */\r\nexport const isPhonePerformanceMetrics = _.partial(propertyMatch, regexPhonePerfMetrics);\r\n\r\nexport class CampaignuiBaseColumn extends ProjectionGridBaseColumn {\r\n get colClasses() {\r\n let colClasses = super.colClasses;\r\n\r\n if (isPerformanceMetrics(this.config.property)) {\r\n colClasses = helpers.mergeClasses(colClasses, [\r\n 'performance-metrics',\r\n `performance-metrics-${this.name}`,\r\n ]);\r\n } else if (isPhonePerformanceMetrics(this.config.property)) {\r\n colClasses = helpers.mergeClasses(colClasses, [\r\n 'phone-performance-metrics',\r\n `phone-performance-metrics-${this.name}`,\r\n ]);\r\n }\r\n\r\n return colClasses;\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\nexport const FluctuationType = {\r\n Default: 0,\r\n Impression: 1,\r\n Click: 2,\r\n Spend: 3,\r\n Conversion: 4,\r\n Max: 500,\r\n};\r\n\r\nexport const FluctuationEnumToStringMap = (() => {\r\n const keyList = _.keys(FluctuationType);\r\n return _.object(keyList, keyList);\r\n})();\r\n\r\nexport const ColumnNameToFluctuationTypeEnum = {\r\n Clicks: FluctuationEnumToStringMap.Click,\r\n Impressions: FluctuationEnumToStringMap.Impression,\r\n Spend: FluctuationEnumToStringMap.Spend,\r\n Conversions: FluctuationEnumToStringMap.Conversion,\r\n};\r\n","import _ from 'underscore';\r\nimport { CampaignuiBaseColumn } from '@bingads-webui-campaign/campaignui-base-column';\r\nimport { helpers } from '@bingads-webui/projection-grid-base-column';\r\n\r\nimport { generateHelpId, hasFluctuations, formatMetricValue } from '../utils';\r\nimport performanceMetricWithFluctuationTemplate from './performance-metric-with-fluctuation.pug';\r\nimport { ColumnNameToFluctuationTypeEnum } from './fluctuation-type-enum';\r\n\r\nconst Scope = 'PerformanceMetrics';\r\nexport class FluctuationBaseColumn extends CampaignuiBaseColumn {\r\n /**\r\n * Returns sortable property for the column config.\r\n * @param {Object} config column config\r\n * @returns {string} sortable property\r\n */\r\n static columnSortableProperty = config => `${Scope}/${config.name}`;\r\n\r\n constructor(config) {\r\n const { name, i18n } = config;\r\n const helpId = generateHelpId(config);\r\n\r\n // This configuration for property is not taking effect now.\r\n // We should update getColumnsMap() in\r\n // ui-legacy\\Assets\\campaignui\\feature\\campaigns-tab\\campaigns\\grid\\columns-config-base.es\r\n // to make to column to property mapping correctly in odata request.\r\n const property = [`${Scope}/${name}`, 'AvailableInsightTypeIds'];\r\n const title = config.i18n.getString(`ColumnName_${name}`);\r\n\r\n super(_.defaults(\r\n { helpId, property, title },\r\n config,\r\n {\r\n type: 'number',\r\n sortable: FluctuationBaseColumn.columnSortableProperty(config),\r\n helpAriaLabel: helpId && i18n\r\n ? i18n.getString('Click to learn more about {{item}}', { item: name })\r\n : '',\r\n }\r\n ));\r\n }\r\n\r\n pickProperty(item) {\r\n const { PerformanceMetrics, AvailableInsightTypeIds, GoalStatusDetails } = item;\r\n const {\r\n name, format, i18n, title,\r\n } = this.config;\r\n const metricValue = _.result(PerformanceMetrics, name);\r\n\r\n // goal details is array\r\n // if goal delivery status is 'NoEligibleGoal', 'TagUnverified' or 'TagInactive' we show the warning\r\n const hasGoalLimits = GoalStatusDetails && _.find(GoalStatusDetails, goal => _.contains(['NoEligibleGoal', 'TagUnverified', 'TagInactive', 'NoRecentOfflineConversion'], goal.GoalDeliveryStatus));\r\n\r\n const propertys = {\r\n metricType: ColumnNameToFluctuationTypeEnum[name],\r\n metricName: title,\r\n metricValue: formatMetricValue({ i18n, format, metricValue }),\r\n hasFluctuation: hasFluctuations({\r\n propertyName: name,\r\n availableInsightTypeIds: AvailableInsightTypeIds,\r\n IsOverall: item.$total && item.$total.type === 'overall',\r\n }),\r\n hasConversionDeliveryStatus: hasGoalLimits && name === 'ConversionsCredit',\r\n };\r\n return propertys;\r\n }\r\n\r\n get template() { return performanceMetricWithFluctuationTemplate; }\r\n\r\n get title() {\r\n return this.config.title;\r\n }\r\n\r\n get colClasses() {\r\n let colClasses = super.colClasses;\r\n colClasses = helpers.mergeClasses(colClasses, [\r\n 'performance-metrics',\r\n `performance-metrics-${this.name}`,\r\n ]);\r\n\r\n return colClasses;\r\n }\r\n}\r\n\r\n","import { FluctuationBaseColumn } from './fluctuation-base-column';\r\n\r\n/**\r\n * Column Clicks with Fluctuation.\r\n * @extends FluctuationBaseColumn\r\n */\r\nexport class ColumnClicksWithFluctuation extends FluctuationBaseColumn {\r\n constructor({ i18n, helpId }) {\r\n super({\r\n name: 'Clicks',\r\n format: 'integer',\r\n i18n,\r\n helpId,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column Impressions with Fluctuation.\r\n * @extends FluctuationBaseColumn\r\n */\r\nexport class ColumnImpressionsWithFluctuation extends FluctuationBaseColumn {\r\n constructor({ i18n, helpId = 'Page_CampaignGrids_Impr' }) {\r\n super({\r\n name: 'Impressions',\r\n format: 'integer',\r\n i18n,\r\n helpId,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column Spend with Fluctuation.\r\n * @extends FluctuationBaseColumn\r\n */\r\nexport class ColumnSpendWithFluctuation extends FluctuationBaseColumn {\r\n constructor({ i18n, helpId }) {\r\n super({\r\n name: 'Spend',\r\n format: 'decimal',\r\n i18n,\r\n helpId,\r\n });\r\n }\r\n}\r\n\r\n\r\n/**\r\n * All performance metrics columns with fluctuation\r\n * @type Class[]\r\n */\r\nexport const fluctuationColumns = [\r\n ColumnClicksWithFluctuation,\r\n ColumnImpressionsWithFluctuation,\r\n ColumnSpendWithFluctuation,\r\n];\r\n\r\n","import _ from 'underscore';\r\nimport { ColumnNameToFluctuationTypeEnum } from './fluctuations/index';\r\n\r\n/** Generate help id for columns\r\n * @param {string} name column name\r\n * @param {function|string} helpId help id function or string\r\n * @returns {string} generated help id\r\n */\r\nexport const generateHelpId = ({ name, helpId }) => {\r\n if (_.isFunction(helpId)) {\r\n return helpId(name);\r\n }\r\n // String help ID\r\n if (_.isString(helpId)) {\r\n return helpId;\r\n }\r\n // No help ID\r\n if (_.isNull(helpId)) {\r\n return null;\r\n }\r\n // Default performance metrics help ID\r\n return `Page_CampaignGrids_${name}`;\r\n};\r\n\r\n/**\r\n * Check if performance metric has fluctuation insights or not\r\n * @param {string} propertyName The property name in column's config\r\n * @param {List} availableInsightTypeIds List of insight type enums for the account/campaign\r\n * @returns {bool} If there's insight for this metric or not\r\n */\r\nexport const hasFluctuations = ({\r\n propertyName,\r\n availableInsightTypeIds,\r\n} = {}) => {\r\n if (!_.isEmpty(propertyName) && availableInsightTypeIds) {\r\n return _.contains(\r\n availableInsightTypeIds,\r\n ColumnNameToFluctuationTypeEnum[propertyName]\r\n );\r\n }\r\n return false;\r\n};\r\n\r\n/**\r\n * Format metric value number to string in columns with fluctuation insights\r\n * @param {object} i18n i18n\r\n * @param {string} format The format of metric value\r\n * @param {number} metricValue Metric value\r\n * @returns {string} formated value\r\n */\r\nexport const formatMetricValue = ({ i18n, format, metricValue }) => {\r\n if (_.isUndefined(metricValue) || _.isNull(metricValue)) {\r\n return null;\r\n }\r\n const fractionDigits = format === 'decimal' ? 2 : 0;\r\n const formattedMetricValue = i18n.formatDecimal(\r\n metricValue,\r\n { maximumFractionDigits: fractionDigits, minimumFractionDigits: fractionDigits }\r\n );\r\n return formattedMetricValue;\r\n};\r\n","import _ from 'underscore';\r\nimport { CampaignuiBaseColumn } from '@bingads-webui-campaign/campaignui-base-column';\r\nimport { SchemaI18n } from '@bingads-webui-universal/schema-i18n';\r\nimport { generateHelpId } from './utils';\r\n\r\nfunction getBaseColumn({ scope }) {\r\n /**\r\n * Performance metrics base column.\r\n * @extends CampaignuiBaseColumn\r\n */\r\n return class PerformanceMetricBaseColumn extends CampaignuiBaseColumn {\r\n /**\r\n * Returns sortable property for the column config.\r\n * @param {Object} config column config\r\n * @returns {string} sortable property\r\n */\r\n static columnSortableProperty = config => config.property || `${scope}/${config.name}`;\r\n\r\n constructor(config) {\r\n const { i18n } = config;\r\n const helpId = generateHelpId(config);\r\n const property = config.property || `${scope}/${config.name}`;\r\n\r\n const schemaI18n = new SchemaI18n({ i18n });\r\n const title = config.title || schemaI18n.property(scope, _.last(property.split('/')));\r\n\r\n const localizedTitle = i18n && config.title ? i18n.getString(config.title) : title;\r\n\r\n super(_.defaults(\r\n { helpId, property, title },\r\n config,\r\n {\r\n type: 'number',\r\n sortable: PerformanceMetricBaseColumn.columnSortableProperty(config),\r\n helpAriaLabel: helpId && i18n\r\n ? i18n.getString('Click to learn more about {{item}}', { item: localizedTitle })\r\n : '',\r\n }\r\n ));\r\n }\r\n\r\n get title() {\r\n return this.config.title;\r\n }\r\n };\r\n}\r\n\r\nexport const PerformanceMetricBaseColumn = getBaseColumn({\r\n scope: 'PerformanceMetrics',\r\n});\r\n\r\nexport const PhonePerformanceMetricBaseColumn = getBaseColumn({\r\n scope: 'PhonePerformanceMetrics',\r\n});\r\n","import _ from 'underscore';\r\nimport { PerformanceMetricBaseColumn, PhonePerformanceMetricBaseColumn } from './performance-metric-base-column';\r\nimport { ColumnClicksWithFluctuation, ColumnImpressionsWithFluctuation, ColumnSpendWithFluctuation } from './fluctuations/performance-columns-with-fluctuation';\r\n/**\r\n * Column Clicks.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnClicks extends PerformanceMetricBaseColumn {\r\n constructor({ i18n, helpId }) {\r\n super({\r\n name: 'Clicks',\r\n format: 'integer',\r\n i18n,\r\n helpId,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column Impressions.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnImpressions extends PerformanceMetricBaseColumn {\r\n constructor({ i18n, helpId = 'Page_CampaignGrids_Impr' }) {\r\n super({\r\n name: 'Impressions',\r\n format: 'integer',\r\n i18n,\r\n helpId,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column CTR.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnCTR extends PerformanceMetricBaseColumn {\r\n constructor({ i18n, helpId }) {\r\n super({\r\n name: 'CTR',\r\n format: 'percentage-value',\r\n i18n,\r\n helpId,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column AverageCPC.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnAverageCPC extends PerformanceMetricBaseColumn {\r\n constructor({ i18n, helpId = 'Page_CampaignGrids_AvgCPC' }) {\r\n super({\r\n name: 'AverageCPC',\r\n format: 'decimal',\r\n i18n,\r\n helpId,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column AveragePosition.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnAveragePosition extends PerformanceMetricBaseColumn {\r\n constructor({ i18n, helpId = 'Page_CampaignGrids_AvgPosition' }) {\r\n super({\r\n name: 'AveragePosition',\r\n format: 'decimal',\r\n i18n,\r\n helpId,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column AverageCPM.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnAverageCPM extends PerformanceMetricBaseColumn {\r\n constructor({ i18n, helpId = 'Page_CampaignGrids_AvgCPM' }) {\r\n super({\r\n name: 'AverageCPM',\r\n format: 'decimal',\r\n i18n,\r\n helpId,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column VideoViews.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnVideoViews extends PerformanceMetricBaseColumn {\r\n constructor({ i18n, helpId = 'Page_CampaignGrids_VideoViews' }) {\r\n super({\r\n name: 'VideoViews',\r\n format: 'integer',\r\n i18n,\r\n helpId,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column ViewThroughRate.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnViewThroughRate extends PerformanceMetricBaseColumn {\r\n constructor({ i18n, helpId = 'Page_CampaignGrids_ViewThroughRate' }) {\r\n super({\r\n name: 'ViewThroughRate',\r\n format: 'percentage-value',\r\n i18n,\r\n helpId,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column AverageCPV.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnAverageCPV extends PerformanceMetricBaseColumn {\r\n constructor({ i18n, helpId = 'Page_CampaignGrids_AverageCPV' }) {\r\n super({\r\n name: 'AverageCPV',\r\n format: 'decimal',\r\n i18n,\r\n helpId,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column TotalWatchTimeInMS.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnTotalWatchTimeInMS extends PerformanceMetricBaseColumn {\r\n // This helpId is not used in adgroup grid, for adgroup grid,\r\n // see /private/summary-tabs/packages/ad-groups-grid/src/grid-config.js\r\n constructor({ i18n, helpId = 'Page_CampaignGrids_TotalWatchTime' }) {\r\n super({\r\n name: 'TotalWatchTimeInMS',\r\n format: 'thousandth',\r\n i18n,\r\n helpId,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column AverageWatchTimePerImpression.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnAverageWatchTimePerImpression extends PerformanceMetricBaseColumn {\r\n constructor({ i18n, helpId = 'Page_CampaignGrids_AverageWatchTimePerImpression' }) {\r\n super({\r\n name: 'AverageWatchTimePerImpression',\r\n format: 'decimal',\r\n i18n,\r\n helpId,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column AverageWatchTimePerVideoView.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnAverageWatchTimePerVideoView extends PerformanceMetricBaseColumn {\r\n constructor({ i18n, helpId = 'Page_CampaignGrids_AverageWatchTimePerVideoView' }) {\r\n super({\r\n name: 'AverageWatchTimePerVideoView',\r\n format: 'decimal',\r\n i18n,\r\n helpId,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column VideoViewsAt25Percent.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnVideoViewsAt25Percent extends PerformanceMetricBaseColumn {\r\n constructor({ i18n, helpId = 'Page_CampaignGrids_VideoViewsAt25Percent' }) {\r\n super({\r\n name: 'VideoViewsAt25Percent',\r\n format: 'integer',\r\n i18n,\r\n helpId,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column VideoViewsAt50Percent.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnVideoViewsAt50Percent extends PerformanceMetricBaseColumn {\r\n constructor({ i18n, helpId = 'Page_CampaignGrids_VideoViewsAt50Percent' }) {\r\n super({\r\n name: 'VideoViewsAt50Percent',\r\n format: 'integer',\r\n i18n,\r\n helpId,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column VideoViewsAt75Percent.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnVideoViewsAt75Percent extends PerformanceMetricBaseColumn {\r\n constructor({ i18n, helpId = 'Page_CampaignGrids_VideoViewsAt75Percent' }) {\r\n super({\r\n name: 'VideoViewsAt75Percent',\r\n format: 'integer',\r\n i18n,\r\n helpId,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column CompletedVideoViews.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnCompletedVideoViews extends PerformanceMetricBaseColumn {\r\n constructor({ i18n, helpId = 'Page_CampaignGrids_CompletedVideoViews' }) {\r\n super({\r\n name: 'CompletedVideoViews',\r\n format: 'integer',\r\n i18n,\r\n helpId,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column VideoCompletionRate.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnVideoCompletionRate extends PerformanceMetricBaseColumn {\r\n constructor({ i18n, helpId = 'Page_CampaignGrids_VideoCompletionRate' }) {\r\n super({\r\n name: 'VideoCompletionRate',\r\n format: 'percentage-value',\r\n i18n,\r\n helpId,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column Spend.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnSpend extends PerformanceMetricBaseColumn {\r\n constructor({ i18n, helpId }) {\r\n super({\r\n name: 'Spend',\r\n format: 'decimal',\r\n i18n,\r\n helpId,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column Total spend.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnTotalSpend extends PhonePerformanceMetricBaseColumn {\r\n // it's put in performance columns in UI, but in metadata, it is phone performance metrics.\r\n constructor({ i18n }) {\r\n super({\r\n name: 'ClickAndPhoneSpend',\r\n format: 'decimal',\r\n i18n,\r\n helpId: null,\r\n });\r\n }\r\n}\r\n\r\nexport class ColumnTopImpressionRate extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'TopImpressionRate',\r\n format: 'percentage-value',\r\n i18n,\r\n helpId: 'pop_BA_Reporting_Clarity_TopImpressionRate',\r\n });\r\n }\r\n}\r\n\r\nexport class ColumnAbsoluteTopImpressionRate extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'AbsoluteTopImpressionRate',\r\n format: 'percentage-value',\r\n i18n,\r\n helpId: 'pop_BA_Reporting_Clarity_AbsoluteTopImpressionRate',\r\n });\r\n }\r\n}\r\n\r\nexport class ColumnCPS extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'AverageCPS',\r\n format: 'decimal',\r\n i18n,\r\n helpId: 'pop_BA_CampaignGrids_CostPerSale',\r\n });\r\n }\r\n}\r\n\r\nexport class ColumnDownloads extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'Downloads',\r\n format: 'integer',\r\n i18n,\r\n helpId: 'pop_BA_AppAds_Downloads',\r\n });\r\n }\r\n}\r\n\r\nexport class ColumnFirstLaunches extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'FirstLaunches',\r\n format: 'integer',\r\n i18n,\r\n helpId: 'pop_BA_AppAds_Installs',\r\n });\r\n }\r\n}\r\n\r\nexport class ColumnPurchases extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'Purchases',\r\n format: 'integer',\r\n i18n,\r\n helpId: 'pop_BA_AppAds_InAppPurchase',\r\n });\r\n }\r\n}\r\n\r\nexport class ColumnSubscriptions extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'Subscriptions',\r\n format: 'integer',\r\n i18n,\r\n helpId: 'pop_BA_AppAds_InAppSubscription',\r\n });\r\n }\r\n}\r\n\r\nexport class ColumnPostClickDownloadRate extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'PostClickDownloadRate',\r\n format: 'percentage-value',\r\n i18n,\r\n helpId: 'pop_BA_AppAds_DownloadRate',\r\n });\r\n }\r\n}\r\n\r\nexport class ColumnCostPerDownload extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'CostPerDownload',\r\n format: 'decimal',\r\n i18n,\r\n helpId: 'pop_BA_AppAds_CostPerDownload',\r\n });\r\n }\r\n}\r\n\r\nexport class ColumnPostClickFirstLaunchRate extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'PostClickFirstLaunchRate',\r\n format: 'percentage-value',\r\n i18n,\r\n helpId: 'pop_BA_AppAds_InstallRate',\r\n });\r\n }\r\n}\r\n\r\nexport class ColumnCostPerFirstLaunch extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'CostPerFirstLaunch',\r\n format: 'decimal',\r\n i18n,\r\n helpId: 'pop_BA_AppAds_CostPerInstall',\r\n });\r\n }\r\n}\r\n\r\nexport class ColumnPostInstallPurchaseRate extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'PostInstallPurchaseRate',\r\n format: 'percentage-value',\r\n i18n,\r\n helpId: 'pop_BA_AppAds_PostInstallPurchase',\r\n });\r\n }\r\n}\r\n\r\nexport class ColumnCostPerPurchase extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'CostPerPurchase',\r\n format: 'decimal',\r\n i18n,\r\n helpId: null,\r\n });\r\n }\r\n}\r\n\r\nexport class ColumnPostInstallSubscriptionRate extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'PostInstallSubscriptionRate',\r\n format: 'percentage-value',\r\n i18n,\r\n helpId: 'pop_BA_AppAds_PostInstallSubscription',\r\n });\r\n }\r\n}\r\n\r\nexport class ColumnCostPerSubscription extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'CostPerSubscription',\r\n format: 'decimal',\r\n i18n,\r\n helpId: 'pop_BA_Reporting_Clarity_TopImpressionRate',\r\n });\r\n }\r\n}\r\n\r\nexport const getPerformanceColumns = ({\r\n withFluctuations,\r\n IsVideoAdsPerfMetricsEnabled,\r\n isCPSEnabled,\r\n isAppCampaignNewCampaignGridColumnsEnabled,\r\n} = {}) =>\r\n _.compact([\r\n withFluctuations ? ColumnClicksWithFluctuation : ColumnClicks,\r\n withFluctuations ? ColumnImpressionsWithFluctuation : ColumnImpressions,\r\n ColumnCTR,\r\n ColumnAverageCPC,\r\n withFluctuations ? ColumnSpendWithFluctuation : ColumnSpend,\r\n ColumnAveragePosition,\r\n ColumnAverageCPM,\r\n IsVideoAdsPerfMetricsEnabled && ColumnVideoViews,\r\n IsVideoAdsPerfMetricsEnabled && ColumnViewThroughRate,\r\n IsVideoAdsPerfMetricsEnabled && ColumnAverageCPV,\r\n IsVideoAdsPerfMetricsEnabled && ColumnTotalWatchTimeInMS,\r\n IsVideoAdsPerfMetricsEnabled && ColumnAverageWatchTimePerImpression,\r\n IsVideoAdsPerfMetricsEnabled && ColumnAverageWatchTimePerVideoView,\r\n IsVideoAdsPerfMetricsEnabled && ColumnVideoViewsAt25Percent,\r\n IsVideoAdsPerfMetricsEnabled && ColumnVideoViewsAt50Percent,\r\n IsVideoAdsPerfMetricsEnabled && ColumnVideoViewsAt75Percent,\r\n IsVideoAdsPerfMetricsEnabled && ColumnCompletedVideoViews,\r\n IsVideoAdsPerfMetricsEnabled && ColumnVideoCompletionRate,\r\n isAppCampaignNewCampaignGridColumnsEnabled && ColumnDownloads,\r\n isAppCampaignNewCampaignGridColumnsEnabled && ColumnFirstLaunches,\r\n isAppCampaignNewCampaignGridColumnsEnabled && ColumnPurchases,\r\n isAppCampaignNewCampaignGridColumnsEnabled && ColumnSubscriptions,\r\n isAppCampaignNewCampaignGridColumnsEnabled && ColumnPostClickDownloadRate,\r\n isAppCampaignNewCampaignGridColumnsEnabled && ColumnCostPerDownload,\r\n isAppCampaignNewCampaignGridColumnsEnabled && ColumnPostClickFirstLaunchRate,\r\n isAppCampaignNewCampaignGridColumnsEnabled && ColumnCostPerFirstLaunch,\r\n isAppCampaignNewCampaignGridColumnsEnabled && ColumnPostInstallPurchaseRate,\r\n isAppCampaignNewCampaignGridColumnsEnabled && ColumnCostPerPurchase,\r\n isAppCampaignNewCampaignGridColumnsEnabled && ColumnPostInstallSubscriptionRate,\r\n isAppCampaignNewCampaignGridColumnsEnabled && ColumnCostPerSubscription,\r\n isCPSEnabled && ColumnCPS,\r\n ColumnTotalSpend,\r\n ]);\r\n\r\n/**\r\n * All performance columns without performance fluctuation insights or video\r\n * @type Class[]\r\n */\r\nexport const performanceColumns = getPerformanceColumns();\r\n","/* eslint-disable no-use-before-define */\r\n\r\nimport _ from 'underscore';\r\nimport { PerformanceMetricBaseColumn } from './performance-metric-base-column';\r\nimport { FluctuationBaseColumn } from './fluctuations/fluctuation-base-column';\r\n\r\nconst perfMetricColumnConvertionDef = (targetColumnName, sourceColumnName) => ({\r\n sourceColumnName,\r\n sourceSortableProperty: `PerformanceMetrics/${sourceColumnName}`,\r\n targetSortableProperty: `PerformanceMetrics/${targetColumnName}`,\r\n});\r\n\r\n/**\r\n * Column CPA.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnCPA extends PerformanceMetricBaseColumn {\r\n static columnName = 'CPA';\r\n\r\n constructor({ i18n, helpId = 'Page_CampaignGrids_CPA' }) {\r\n super({\r\n name: ColumnCPA.columnName,\r\n format: 'decimal',\r\n helpId,\r\n i18n,\r\n columnConversion:\r\n perfMetricColumnConvertionDef(ColumnCPA.columnName, ColumnPartialConversionCPA.columnName),\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column PartialConversionCPA.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnPartialConversionCPA extends PerformanceMetricBaseColumn {\r\n static columnName = 'PartialConversionCPA';\r\n\r\n constructor({ i18n, helpId = 'Page_CampaignGrids_CPA' }) {\r\n super({\r\n name: ColumnPartialConversionCPA.columnName,\r\n format: 'decimal',\r\n helpId,\r\n i18n,\r\n columnConversion:\r\n perfMetricColumnConvertionDef(ColumnPartialConversionCPA.columnName, ColumnCPA.columnName),\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column Conversions.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnConversions extends PerformanceMetricBaseColumn {\r\n static columnName = 'Conversions';\r\n\r\n constructor({ i18n, helpId = 'Page_CampaignGrids_Conv' }) {\r\n super({\r\n name: ColumnConversions.columnName,\r\n format: 'integer',\r\n i18n,\r\n helpId,\r\n columnConversion: perfMetricColumnConvertionDef(\r\n ColumnConversions.columnName,\r\n ColumnConversionsCredit.columnName\r\n ),\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column ConversionsCredit (partial conversions).\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnConversionsCredit extends PerformanceMetricBaseColumn {\r\n static columnName = 'ConversionsCredit';\r\n\r\n constructor({ i18n, helpId = 'Page_CampaignGrids_Conv' }) {\r\n super({\r\n name: ColumnConversionsCredit.columnName,\r\n format: 'decimal',\r\n i18n,\r\n helpId,\r\n columnConversion: perfMetricColumnConvertionDef(\r\n ColumnConversionsCredit.columnName,\r\n ColumnConversions.columnName\r\n ),\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column RevenueOnAdSpend.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnRevenueOnAdSpend extends PerformanceMetricBaseColumn {\r\n constructor({ i18n, helpId = 'Page_CampaignGrids_ReturnAdSpend' }) {\r\n super({\r\n name: 'RevenueOnAdSpend',\r\n format: 'percentage-value',\r\n i18n,\r\n helpId,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column AdvertiserReportedRevenue.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnAdvertiserReportedRevenue extends PerformanceMetricBaseColumn {\r\n constructor({ i18n, helpId = 'Page_CampaignGrids_Revenue' }) {\r\n super({\r\n name: 'AdvertiserReportedRevenue',\r\n format: 'decimal',\r\n i18n,\r\n helpId,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column ConversionRate.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnConversionRate extends PerformanceMetricBaseColumn {\r\n static columnName = 'ConversionRate';\r\n\r\n constructor({ i18n, helpId = 'Page_CampaignGrids_ConvRate' }) {\r\n super({\r\n name: ColumnConversionRate.columnName,\r\n format: 'percentage-value',\r\n i18n,\r\n helpId,\r\n columnConversion: perfMetricColumnConvertionDef(\r\n ColumnConversionRate.columnName,\r\n ColumnPartialConversionRate.columnName\r\n ),\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column ColumnPartialConversionRate.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnPartialConversionRate extends PerformanceMetricBaseColumn {\r\n // TODO: investigate the need for this static field\r\n static columnName = 'PartialConversionRate';\r\n\r\n // FIXME: get the correct helpId\r\n constructor({ i18n, helpId = 'Page_CampaignGrids_ConvRate' }) {\r\n super({\r\n name: ColumnPartialConversionRate.columnName,\r\n format: 'percentage-value',\r\n i18n,\r\n helpId,\r\n columnConversion: perfMetricColumnConvertionDef(\r\n ColumnPartialConversionRate.columnName,\r\n ColumnConversionRate.columnName\r\n ),\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column AllConversionCPA.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnAllConversionCPA extends PerformanceMetricBaseColumn {\r\n static columnName = 'AllConversionCPA';\r\n\r\n constructor({ i18n, helpId = 'pop_BA_CampaignGrids_AllConvCPA' }) {\r\n super({\r\n name: ColumnAllConversionCPA.columnName,\r\n format: 'decimal',\r\n helpId,\r\n i18n,\r\n columnConversion: perfMetricColumnConvertionDef(\r\n ColumnAllConversionCPA.columnName,\r\n ColumnAllPartialConversionCPA.columnName\r\n ),\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column AllPartialConversionCPA.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnAllPartialConversionCPA extends PerformanceMetricBaseColumn {\r\n static columnName = 'AllPartialConversionCPA';\r\n\r\n constructor({ i18n, helpId = 'pop_BA_CampaignGrids_AllConvCPA' }) {\r\n super({\r\n name: ColumnAllPartialConversionCPA.columnName,\r\n format: 'decimal',\r\n helpId,\r\n i18n,\r\n columnConversion: perfMetricColumnConvertionDef(\r\n ColumnAllPartialConversionCPA.columnName,\r\n ColumnAllConversionCPA.columnName\r\n ),\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column AllConversions.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnAllConversions extends PerformanceMetricBaseColumn {\r\n static columnName = 'AllConversions';\r\n\r\n constructor({ i18n, helpId = 'pop_BA_CampaignGrids_AllConv' }) {\r\n super({\r\n name: ColumnAllConversions.columnName,\r\n format: 'integer',\r\n i18n,\r\n helpId,\r\n columnConversion: perfMetricColumnConvertionDef(\r\n ColumnAllConversions.columnName,\r\n ColumnAllConversionsCredit.columnName\r\n ),\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column AllConversionsCredit.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnAllConversionsCredit extends PerformanceMetricBaseColumn {\r\n static columnName = 'AllConversionsCredit';\r\n\r\n constructor({ i18n, helpId = 'pop_BA_CampaignGrids_AllConv' }) {\r\n super({\r\n name: ColumnAllConversionsCredit.columnName,\r\n format: 'decimal',\r\n i18n,\r\n helpId,\r\n columnConversion: perfMetricColumnConvertionDef(\r\n ColumnAllConversionsCredit.columnName,\r\n ColumnAllConversions.columnName\r\n ),\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column AllConversionRevenueOnAdSpend.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnAllConversionRevenueOnAdSpend extends PerformanceMetricBaseColumn {\r\n constructor({ i18n, helpId = 'pop_BA_CampaignGrids_AllConvROAS' }) {\r\n super({\r\n name: 'AllConversionRevenueOnAdSpend',\r\n format: 'percentage-value',\r\n i18n,\r\n helpId,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column AllConversionAdvertiserReportedRevenue.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnAllConversionAdvertiserReportedRevenue extends PerformanceMetricBaseColumn {\r\n constructor({ i18n, helpId = 'pop_BA_CampaignGrids_AllConvRevenue' }) {\r\n super({\r\n name: 'AllConversionAdvertiserReportedRevenue',\r\n format: 'decimal',\r\n i18n,\r\n helpId,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column AllConversionRate.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnAllConversionRate extends PerformanceMetricBaseColumn {\r\n static columnName = 'AllConversionRate';\r\n\r\n constructor({ i18n, helpId = 'pop_BA_CampaignGrids_AllConvRate' }) {\r\n super({\r\n name: ColumnAllConversionRate.columnName,\r\n format: 'percentage-value',\r\n i18n,\r\n helpId,\r\n columnConversion: perfMetricColumnConvertionDef(\r\n ColumnAllConversionRate.columnName,\r\n ColumnAllPartialConversionRate.columnName\r\n ),\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column AllPartialConversionRate.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnAllPartialConversionRate extends PerformanceMetricBaseColumn {\r\n static columnName = 'AllPartialConversionRate';\r\n\r\n constructor({ i18n, helpId = 'pop_BA_CampaignGrids_AllConvRate' }) {\r\n super({\r\n name: ColumnAllPartialConversionRate.columnName,\r\n format: 'percentage-value',\r\n i18n,\r\n helpId,\r\n columnConversion: perfMetricColumnConvertionDef(\r\n ColumnAllPartialConversionRate.columnName,\r\n ColumnAllConversionRate.columnName\r\n ),\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column ViewThroughConversions.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnViewThroughConversions extends PerformanceMetricBaseColumn {\r\n static columnName = 'ViewThroughConversions';\r\n\r\n constructor({ i18n, helpId = 'pop_BA_CampaignGrids_ViewThrough' }) {\r\n super({\r\n name: ColumnViewThroughConversions.columnName,\r\n format: 'integer',\r\n i18n,\r\n helpId,\r\n columnConversion: perfMetricColumnConvertionDef(\r\n ColumnViewThroughConversions.columnName,\r\n ColumnViewThroughConversionsCredit.columnName\r\n ),\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column ViewThroughConversionsCredit.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnViewThroughConversionsCredit extends PerformanceMetricBaseColumn {\r\n static columnName = 'ViewThroughConversionsCredit';\r\n\r\n constructor({ i18n, helpId = 'pop_BA_CampaignGrids_ViewThrough' }) {\r\n super({\r\n name: ColumnViewThroughConversionsCredit.columnName,\r\n format: 'decimal',\r\n i18n,\r\n helpId,\r\n columnConversion: perfMetricColumnConvertionDef(\r\n ColumnViewThroughConversionsCredit.columnName,\r\n ColumnViewThroughConversions.columnName\r\n ),\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column ViewThroughConversionsRevenue.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnViewThroughConversionsRevenue extends PerformanceMetricBaseColumn {\r\n constructor({ i18n, helpId = 'pop_BA_Reporting_Clarity_ViewThroughConvRevenue' }) {\r\n super({\r\n name: 'ViewThroughConversionsRevenue',\r\n format: 'decimal',\r\n i18n,\r\n helpId,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column ViewThroughConversionsCPA.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnViewThroughConversionsCPA extends PerformanceMetricBaseColumn {\r\n static columnName = 'ViewThroughConversionsCPA';\r\n\r\n constructor({ i18n, helpId = 'pop_BA_Reporting_Clarity_ViewThroughConvCPA' }) {\r\n super({\r\n name: ColumnViewThroughConversionsCPA.columnName,\r\n format: 'decimal',\r\n i18n,\r\n helpId,\r\n columnConversion: perfMetricColumnConvertionDef(\r\n ColumnViewThroughConversionsCPA.columnName,\r\n ColumnViewThroughPartialConversionsCPA.columnName\r\n ),\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column ViewThroughPartialConversionsCPA.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnViewThroughPartialConversionsCPA extends PerformanceMetricBaseColumn {\r\n static columnName = 'ViewThroughPartialConversionsCPA';\r\n\r\n constructor({ i18n, helpId = 'pop_BA_Reporting_Clarity_ViewThroughConvCPA' }) {\r\n super({\r\n name: ColumnViewThroughPartialConversionsCPA.columnName,\r\n format: 'decimal',\r\n i18n,\r\n helpId,\r\n columnConversion: perfMetricColumnConvertionDef(\r\n ColumnViewThroughPartialConversionsCPA.columnName,\r\n ColumnViewThroughConversionsCPA.columnName\r\n ),\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column ViewThroughConversionsReturnOnAdSpend.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnViewThroughConversionsReturnOnAdSpend extends PerformanceMetricBaseColumn {\r\n static columnName = 'ViewThroughConversionsReturnOnAdSpend';\r\n\r\n constructor({ i18n, helpId = 'pop_BA_Reporting_Clarity_ViewThroughConvReturnOnAdSpend' }) {\r\n super({\r\n name: 'ViewThroughConversionsReturnOnAdSpend',\r\n format: 'percentage-value',\r\n i18n,\r\n helpId,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column ViewThroughConversionsRate.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnViewThroughConversionsRate extends PerformanceMetricBaseColumn {\r\n static columnName = 'ViewThroughConversionsRate';\r\n\r\n constructor({ i18n, helpId = 'pop_BA_Reporting_Clarity_ViewThroughConvRate' }) {\r\n super({\r\n name: ColumnViewThroughConversionsRate.columnName,\r\n format: 'percentage-value',\r\n i18n,\r\n helpId,\r\n columnConversion: perfMetricColumnConvertionDef(\r\n ColumnViewThroughConversionsRate.columnName,\r\n ColumnViewThroughPartialConversionsRate.columnName\r\n ),\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column ViewThroughPartialConversionsRate.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnViewThroughPartialConversionsRate extends PerformanceMetricBaseColumn {\r\n static columnName = 'ViewThroughPartialConversionsRate';\r\n\r\n constructor({ i18n, helpId = 'pop_BA_Reporting_Clarity_ViewThroughConvRate' }) {\r\n super({\r\n name: ColumnViewThroughPartialConversionsRate.columnName,\r\n format: 'percentage-value',\r\n i18n,\r\n helpId,\r\n columnConversion: perfMetricColumnConvertionDef(\r\n ColumnViewThroughPartialConversionsRate.columnName,\r\n ColumnViewThroughConversionsRate.columnName\r\n ),\r\n });\r\n }\r\n}\r\n\r\n\r\n/**\r\n * Column Conversions with Fluctuation.\r\n * @extends FluctuationBaseColumn\r\n */\r\nexport class ColumnConversionsWithFluctuation extends FluctuationBaseColumn {\r\n static columnName = 'Conversions';\r\n\r\n constructor({ i18n, helpId = 'Page_CampaignGrids_Conv', permissions }) {\r\n super({\r\n name: ColumnConversionsWithFluctuation.columnName,\r\n format: 'integer',\r\n i18n,\r\n helpId,\r\n permissions,\r\n columnConversion: perfMetricColumnConvertionDef(\r\n ColumnConversionsWithFluctuation.columnName,\r\n ColumnConversionsCreditWithFluctuation.columnName\r\n ),\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column ConversionsCredit (partial conversions) with Fluctuation.\r\n * @extends FluctuationBaseColumn\r\n */\r\nexport class ColumnConversionsCreditWithFluctuation extends FluctuationBaseColumn {\r\n static columnName = 'ConversionsCredit';\r\n\r\n constructor({ i18n, helpId = 'Page_CampaignGrids_Conv', permissions }) {\r\n super({\r\n name: ColumnConversionsCreditWithFluctuation.columnName,\r\n format: 'decimal',\r\n i18n,\r\n helpId,\r\n permissions,\r\n columnConversion: perfMetricColumnConvertionDef(\r\n ColumnConversionsCreditWithFluctuation.columnName,\r\n ColumnConversionsWithFluctuation.columnName\r\n ),\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column SalesCount .\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnSalesCount extends PerformanceMetricBaseColumn {\r\n constructor({ i18n, helpId = 'pop_BA_CampaignGrids_Sale' }) {\r\n super({\r\n name: 'SalesCount',\r\n format: 'integer',\r\n i18n,\r\n helpId,\r\n });\r\n }\r\n}\r\n\r\nexport class ColumnInstalls extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'Installs',\r\n format: 'integer',\r\n i18n,\r\n helpId: 'pop_BA_StoreAds_Install',\r\n });\r\n }\r\n}\r\n\r\nexport class ColumnCostPerInstall extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'CostPerInstall',\r\n format: 'decimal',\r\n i18n,\r\n helpId: 'pop_BA_StoreAds_CostPerInstall',\r\n });\r\n }\r\n}\r\n\r\nexport class ColumnRevenuePerInstall extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'RevenuePerInstall',\r\n format: 'decimal',\r\n i18n,\r\n helpId: 'pop_BA_StoreAds_RevenuePerInstall',\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column AllConversionAdvertiserReportedRevenue.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnAdvertiserReportedRevenueAdjustment extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'AdvertiserReportedRevenueAdjustment',\r\n title: _TL_('Revenue adj.'),\r\n format: 'decimal',\r\n i18n,\r\n helpId: 'pop_BA_CampaignGrids_RevenueAdjustment',\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column AllConversionAdvertiserReportedRevenue.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnAllConversionAdvertiserReportedRevenueAdjustment extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'AllConversionAdvertiserReportedRevenueAdjustment',\r\n title: _TL_('All revenue adj.'),\r\n format: 'decimal',\r\n i18n,\r\n helpId: 'pop_BA_CampaignGrids_AllRevenueAdjustment',\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column ColumnViewThroughConversionsRevenueAdjustment.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnViewThroughConversionsRevenueAdjustment extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'ViewThroughConversionsRevenueAdjustment',\r\n title: _TL_('View-through revenue adj.'),\r\n format: 'decimal',\r\n i18n,\r\n helpId: 'pop_BA_CampaignGrids_ViewthroughRevenueAdjustment',\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column NewCustomerConversions.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnNewCustomerConversions extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'NewCustomerConversions',\r\n format: 'integer',\r\n i18n,\r\n // helpId: 'pop_BA_CampaignGrids_NewCustomerConversions',\r\n helpId: null,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column NewCustomerConversionsValue.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnNewCustomerRevenue extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'NewCustomerRevenue',\r\n format: 'decimal',\r\n i18n,\r\n // helpId: 'pop_BA_CampaignGrids_NewCustomerConversionsValue',\r\n helpId: null,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column NewCustomerConversionsRate.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnNewCustomerConversionRate extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'NewCustomerConversionRate',\r\n format: 'percentage-value',\r\n i18n,\r\n // helpId: 'pop_BA_CampaignGrids_NewCustomerConversionsRate',\r\n helpId: null,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column NewCustomerConversionsCPA.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnNewCustomerCPA extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'NewCustomerCPA',\r\n format: 'decimal',\r\n i18n,\r\n // helpId: 'pop_BA_CampaignGrids_NewCustomerConversionsCPA',\r\n helpId: null,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Column NewCustomerConversionsReturnOnAdSpend.\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnNewCustomerRevenueOnAdSpend extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'NewCustomerRevenueOnAdSpend',\r\n format: 'percentage-value',\r\n i18n,\r\n // helpId: 'pop_BA_CampaignGrids_NewCustomerConversionsReturnOnAdSpend',\r\n helpId: null,\r\n });\r\n }\r\n}\r\n\r\n\r\nexport const getConversionColumns = ({\r\n withFluctuations = false,\r\n withPartialConversions = false,\r\n isCPSEnabled = false,\r\n isInstallColumnsEnabled = false,\r\n isConversionValueRuleColumnsEnabled = false,\r\n isNewCustomerAcquisitionColumnsEnabled = false,\r\n} = {}) => _.compact([\r\n withPartialConversions ? ColumnPartialConversionCPA : ColumnCPA,\r\n withFluctuations && withPartialConversions && ColumnConversionsCreditWithFluctuation,\r\n withFluctuations && !withPartialConversions && ColumnConversionsWithFluctuation,\r\n !withFluctuations && withPartialConversions && ColumnConversionsCredit,\r\n !withFluctuations && !withPartialConversions && ColumnConversions,\r\n withPartialConversions ? ColumnPartialConversionRate : ColumnConversionRate,\r\n ColumnAdvertiserReportedRevenue,\r\n ColumnRevenueOnAdSpend,\r\n withPartialConversions ? ColumnAllPartialConversionCPA : ColumnAllConversionCPA,\r\n withPartialConversions ? ColumnAllConversionsCredit : ColumnAllConversions,\r\n withPartialConversions ? ColumnAllPartialConversionRate : ColumnAllConversionRate,\r\n ColumnAllConversionAdvertiserReportedRevenue,\r\n ColumnAllConversionRevenueOnAdSpend,\r\n isCPSEnabled && ColumnSalesCount,\r\n isInstallColumnsEnabled && ColumnInstalls,\r\n isInstallColumnsEnabled && ColumnCostPerInstall,\r\n isInstallColumnsEnabled && ColumnRevenuePerInstall,\r\n isConversionValueRuleColumnsEnabled && ColumnAdvertiserReportedRevenueAdjustment,\r\n isConversionValueRuleColumnsEnabled && ColumnAllConversionAdvertiserReportedRevenueAdjustment,\r\n isConversionValueRuleColumnsEnabled && ColumnViewThroughConversionsRevenueAdjustment,\r\n isNewCustomerAcquisitionColumnsEnabled && ColumnNewCustomerConversions,\r\n isNewCustomerAcquisitionColumnsEnabled && ColumnNewCustomerRevenue,\r\n isNewCustomerAcquisitionColumnsEnabled && ColumnNewCustomerConversionRate,\r\n isNewCustomerAcquisitionColumnsEnabled && ColumnNewCustomerCPA,\r\n isNewCustomerAcquisitionColumnsEnabled && ColumnNewCustomerRevenueOnAdSpend,\r\n]);\r\n\r\nexport const conversionsColumns = getConversionColumns();\r\nexport const conversionsColumnsWithFluctuation = getConversionColumns({ withFluctuations: true });\r\n\r\n","import _ from 'underscore';\r\n\r\nconst ELIGIBLE = 'Eligible';\r\nconst INLINE_OPPORTUNITY = 'InlineOpportunity';\r\nconst AUTO_BIDDING_LIMITED = 'AutoBiddingLimitedUnAttainableTarget';\r\nconst enabledStatuses = [ELIGIBLE, INLINE_OPPORTUNITY, AUTO_BIDDING_LIMITED];\r\nconst autoBiddingTargets = ['TargetCpa', 'TargetRoas'];\r\nconst maxConversionTargets = ['MaxConversionValue', 'MaxConversions'];\r\n\r\nexport const getEnabledBidLandscape = (value = {}) => {\r\n const enabledBidLandscapeForLimited = value.DeliveryStatus === AUTO_BIDDING_LIMITED\r\n && _.every(value.DeliveryStatusDetails, detail => _.contains(enabledStatuses, detail));\r\n return (\r\n value.DeliveryStatus === ELIGIBLE\r\n || value.DeliveryStatus === INLINE_OPPORTUNITY\r\n || enabledBidLandscapeForLimited\r\n ) && value.IsBidLandscapeAvailable;\r\n};\r\n\r\nconst getWhiteList = permissions => [\r\n 'ManualCpc',\r\n 'EnhancedCpc',\r\n ...permissions.dynamic && permissions.dynamic.SimulatorForCPAROAS\r\n ? autoBiddingTargets\r\n : [],\r\n ...permissions.IsPmaxBidLandscapeEnabled\r\n ? maxConversionTargets\r\n : [],\r\n];\r\n\r\nexport const getHasBidLandscapeIcon = ({\r\n biddingSchemeType,\r\n inWhiteList,\r\n permissions = {},\r\n value = {},\r\n}) => {\r\n let hasBidLandscapeIcon = !permissions.IsReadOnlyUser\r\n && inWhiteList\r\n && !value.BidStrategyName; // portfolio campaign has no support\r\n\r\n if (_.contains(autoBiddingTargets, biddingSchemeType)) {\r\n hasBidLandscapeIcon = hasBidLandscapeIcon && !value.Budget.Id;\r\n }\r\n\r\n if (_.contains(maxConversionTargets, biddingSchemeType)) {\r\n hasBidLandscapeIcon = hasBidLandscapeIcon && (\r\n !_.isNull(_.result(value.BiddingScheme, 'TargetCpa', null))\r\n || !_.isNull(_.result(value.BiddingScheme, 'TargetRoas', null))\r\n );\r\n }\r\n\r\n return hasBidLandscapeIcon;\r\n};\r\n\r\nexport const getBidLandscapeConfigs = ({\r\n permissions = {},\r\n value = {},\r\n}) => {\r\n if (!permissions.dynamic || !permissions.dynamic.NewBidLandscapeEntryPoints) {\r\n return {\r\n enabledBidLandscape: false,\r\n hasBidLandscapeIcon: false,\r\n };\r\n }\r\n\r\n const enabledBidLandscape = getEnabledBidLandscape(value);\r\n const whiteList = getWhiteList(permissions);\r\n const biddingSchemeType = _.result(value.BiddingScheme, 'Type', null);\r\n const inWhiteList = _.contains(whiteList, biddingSchemeType);\r\n const hasBidLandscapeIcon = getHasBidLandscapeIcon({\r\n biddingSchemeType,\r\n inWhiteList,\r\n permissions,\r\n value,\r\n });\r\n\r\n return {\r\n enabledBidLandscape,\r\n hasBidLandscapeIcon,\r\n };\r\n};\r\n","import { PerformanceMetricBaseColumn } from './performance-metric-base-column';\r\n\r\n/**\r\n * AuctionWonPercent\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnAuctionWonPercent extends PerformanceMetricBaseColumn {\r\n constructor({ i18n, helpId = 'pop_BA_CampaignGrids_IS' }) {\r\n super({\r\n name: 'AuctionWonPercent',\r\n format: 'percentage-value',\r\n helpId,\r\n i18n,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * AuctionLostToBudgetPercent\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnAuctionLostToBudgetPercent extends PerformanceMetricBaseColumn {\r\n constructor({ i18n, helpId = 'pop_BA_CampaignGrids_ISBudget' }) {\r\n super({\r\n name: 'AuctionLostToBudgetPercent',\r\n format: 'percentage-value',\r\n helpId,\r\n i18n,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * AuctionLostToRankPercent\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnAuctionLostToRankPercent extends PerformanceMetricBaseColumn {\r\n constructor({ i18n, helpId = 'pop_BA_CampaignGrids_ISRank' }) {\r\n super({\r\n name: 'AuctionLostToRankPercent',\r\n format: 'percentage-value',\r\n helpId,\r\n i18n,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * AuctionLostToAdQualityPercent\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnAuctionLostToAdQualityPercent extends PerformanceMetricBaseColumn {\r\n constructor({ i18n, helpId = 'pop_BA_CampaignGrids_ISctr' }) {\r\n super({\r\n name: 'AuctionLostToAdQualityPercent',\r\n format: 'percentage-value',\r\n helpId,\r\n i18n,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * AuctionLostToLandingPercent\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnAuctionLostToLandingPercent extends PerformanceMetricBaseColumn {\r\n constructor({ i18n, helpId = 'pop_BA_CampaignGrids_ISRelv' }) {\r\n super({\r\n name: 'AuctionLostToLandingPercent',\r\n format: 'percentage-value',\r\n helpId,\r\n i18n,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * AuctionLostToBidPercent\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnAuctionLostToBidPercent extends PerformanceMetricBaseColumn {\r\n constructor({ i18n, helpId = 'pop_BA_CampaignGrids_ISBid' }) {\r\n super({\r\n name: 'AuctionLostToBidPercent',\r\n format: 'percentage-value',\r\n helpId,\r\n i18n,\r\n });\r\n }\r\n}\r\n\r\nexport class ColumnExactMatchImpressionSharePercent extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'ExactMatchImpressionSharePercent',\r\n format: 'percentage-value',\r\n i18n,\r\n helpId: 'pop_BA_Reporting_Clarity_ExactMatchImpressionShare',\r\n });\r\n }\r\n}\r\n\r\nexport class ColumnTopImpressionSharePercent extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'TopImpressionSharePercent',\r\n format: 'percentage-value',\r\n i18n,\r\n helpId: 'pop_BA_Reporting_Clarity_TopImpressionShare',\r\n });\r\n }\r\n}\r\n\r\nexport class ColumnTopImpressionShareLostToBudget extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'TopImpressionShareLostToBudget',\r\n property: 'PerformanceMetrics/TopISLostToBudgetPercent',\r\n format: 'percentage-value',\r\n i18n,\r\n helpId: 'pop_BA_Reporting_Clarity_TopImpressionLosttoBudget',\r\n });\r\n }\r\n}\r\n\r\nexport class ColumnTopImpressionShareLostToRank extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'TopImpressionShareLostToRank',\r\n property: 'PerformanceMetrics/TopISLostToRankPercent',\r\n format: 'percentage-value',\r\n i18n,\r\n helpId: 'pop_BA_Reporting_Clarity_TopImpressionLosttoRank',\r\n });\r\n }\r\n}\r\n\r\nexport class ColumnAbsoluteTopImpressionSharePercent extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'AbsoluteTopImpressionSharePercent',\r\n format: 'percentage-value',\r\n i18n,\r\n helpId: 'pop_BA_Reporting_ProductAds_AbsoluteTopImpShare',\r\n });\r\n }\r\n}\r\n\r\nexport class ColumnAbsoluteTopImpressionShareLostToBudget extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'AbsoluteTopImpressionShareLostToBudget',\r\n property: 'PerformanceMetrics/AbsoluteTopISLostToBudgetPercent',\r\n format: 'percentage-value',\r\n i18n,\r\n helpId: 'pop_BA_Reporting_Clarity_AbsoluteTopISLosttoBudget',\r\n });\r\n }\r\n}\r\n\r\nexport class ColumnAbsoluteTopImpressionShareLostToRank extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'AbsoluteTopImpressionShareLostToRank',\r\n property: 'PerformanceMetrics/AbsoluteTopISLostToRankPercent',\r\n format: 'percentage-value',\r\n i18n,\r\n helpId: 'pop_BA_Reporting_Clarity_AbsoluteTopISLosttoRank',\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * ClickSharePercent\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnClickSharePercent extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'ClickSharePercent',\r\n format: 'percentage-value',\r\n helpId: 'pop_BA_Reporting_ProductAds_ClickSharePercent',\r\n i18n,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * AudienceAuctionWonPercent\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnAudienceAuctionWonPercent extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'AudienceImpressionShare',\r\n property: 'PerformanceMetrics/AudienceAuctionWonPercent',\r\n format: 'percentage-value',\r\n helpId: 'pop_BA_Reporting_Clarity_AudienceNetwork_ImpressionShare',\r\n i18n,\r\n });\r\n }\r\n\r\n template({ value }) {\r\n // eslint-disable-next-line no-extra-boolean-cast\r\n return super.template({ value: Boolean(value) ? value : null });\r\n }\r\n}\r\n\r\n/**\r\n * AudienceTopISLostToBudgetPercent\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnAudienceTopISLostToBudgetPercent extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'AudienceImpressionShareLostToBudget',\r\n property: 'PerformanceMetrics/AudienceTopISLostToBudgetPercent',\r\n format: 'percentage-value',\r\n helpId: 'pop_BA_Reporting_Clarity_AudienceNetwork_ImpressionShare_LostBudget',\r\n i18n,\r\n });\r\n }\r\n\r\n template({ value }) {\r\n // eslint-disable-next-line no-extra-boolean-cast\r\n return super.template({ value: Boolean(value) ? value : null });\r\n }\r\n}\r\n\r\n/**\r\n * AudienceTopISLostToRankPercent\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnAudienceTopISLostToRankPercent extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'AudienceImpressionShareLostToRank',\r\n property: 'PerformanceMetrics/AudienceTopISLostToRankPercent',\r\n format: 'percentage-value',\r\n helpId: 'pop_BA_Reporting_Clarity_AudienceNetwork_ImpressionShare_LostRank',\r\n i18n,\r\n });\r\n }\r\n\r\n template({ value }) {\r\n // eslint-disable-next-line no-extra-boolean-cast\r\n return super.template({ value: Boolean(value) ? value : null });\r\n }\r\n}\r\n\r\n/**\r\n * RelativeCTR\r\n * @extends PerformanceMetricBaseColumn\r\n */\r\nexport class ColumnRelativeCTR extends PerformanceMetricBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'RelativeCTR',\r\n format: 'percentage-value',\r\n helpId: 'pop_BA_Reporting_Clarity_RelativeCTR',\r\n i18n,\r\n });\r\n }\r\n\r\n template({ value }) {\r\n // eslint-disable-next-line no-extra-boolean-cast\r\n return super.template({ value: Boolean(value) ? value : null });\r\n }\r\n}\r\n\r\n/**\r\n * All competitive columns\r\n * @type Class[]\r\n */\r\nexport const competitiveColumns = [\r\n ColumnAuctionWonPercent,\r\n ColumnAuctionLostToBudgetPercent,\r\n ColumnAuctionLostToRankPercent,\r\n ColumnAuctionLostToAdQualityPercent,\r\n ColumnAuctionLostToLandingPercent,\r\n ColumnAuctionLostToBidPercent,\r\n ColumnClickSharePercent,\r\n];\r\n","import { CampaignuiBaseColumn } from '@bingads-webui-campaign/campaignui-base-column';\r\nimport { SchemaI18n } from '@bingads-webui-universal/schema-i18n';\r\nimport { PhonePerformanceMetricBaseColumn } from './performance-metric-base-column';\r\nimport callTrackingStatusTemplate from './call-forwarding.pug';\r\n\r\n/**\r\n * Call forwarding\r\n * @extends CampaignuiBaseColumn\r\n */\r\n\r\nexport class ColumnCallForwarding extends CampaignuiBaseColumn {\r\n constructor({ i18n }) {\r\n const title = i18n.getString('ColumnName_CallMeteringEligibility');\r\n\r\n super({\r\n name: 'CallForwarding',\r\n property: 'CallTrackingStatus',\r\n title,\r\n sortable: 'CallTrackingStatus',\r\n type: 'string',\r\n helpId: 'Page_AdExtensions_CallForward',\r\n helpAriaLabel: i18n.getString('Click to learn more about {{item}}', { item: title }),\r\n });\r\n this.schemaI18n = new SchemaI18n({ i18n });\r\n }\r\n\r\n template({ value }) {\r\n return callTrackingStatusTemplate({ value, schemaI18n: this.schemaI18n });\r\n }\r\n}\r\n\r\n\r\n/**\r\n * Manual calls\r\n * @extends PhonePerformanceMetricBaseColumn\r\n */\r\nexport class ColumnManualCalls extends PhonePerformanceMetricBaseColumn {\r\n constructor({ i18n, helpId = 'pop_BA_Reporting_Clarity_PhoneCalls' }) {\r\n super({\r\n name: 'ManualCalls',\r\n format: 'integer',\r\n i18n,\r\n helpId,\r\n });\r\n }\r\n}\r\n\r\n\r\n/**\r\n * Phone impressions\r\n * @extends PhonePerformanceMetricBaseColumn\r\n */\r\nexport class ColumnPhoneImpressions extends PhonePerformanceMetricBaseColumn {\r\n constructor({ i18n, helpId = 'Page_CampaignGrids_PhoneImpr' }) {\r\n super({\r\n name: 'PhoneImpressions',\r\n format: 'integer',\r\n i18n,\r\n helpId,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * PTR\r\n * @extends PhonePerformanceMetricBaseColumn\r\n */\r\nexport class ColumnPTR extends PhonePerformanceMetricBaseColumn {\r\n constructor({ i18n, helpId }) {\r\n super({\r\n name: 'PTR',\r\n format: 'percentage-value',\r\n i18n,\r\n helpId,\r\n });\r\n }\r\n}\r\n\r\n\r\n/**\r\n * All call details columns\r\n * @type Class[]\r\n */\r\nexport const callDetailsColumns = [\r\n ColumnCallForwarding,\r\n ColumnManualCalls,\r\n ColumnPhoneImpressions,\r\n ColumnPTR,\r\n];\r\n","import { CampaignuiBaseColumn } from '@bingads-webui-campaign/campaignui-base-column';\r\nimport { SchemaI18n } from '@bingads-webui-universal/schema-i18n';\r\n\r\nimport bidStrategyTypeTemplate from './bid-strategy-type.pug';\r\n\r\nexport class BidStrategyTypeColumn extends CampaignuiBaseColumn {\r\n constructor({ i18n, helpId = 'pop_BA_CampaignGrids_BidStrategy', isAllSettingsGrid }) {\r\n const title = i18n.getString('ColumnName_BidStrategyType');\r\n const property = isAllSettingsGrid ? 'BiddingScheme/Type' : 'DisplayBiddingStrategyType';\r\n\r\n super({\r\n name: 'BidStrategyType',\r\n property,\r\n title,\r\n sortable: 'DisplayBiddingStrategyType',\r\n type: 'string',\r\n helpId,\r\n helpAriaLabel: i18n.getString('Click to learn more about {{item}}', { item: title }),\r\n });\r\n this.schemaI18n = new SchemaI18n({ i18n });\r\n }\r\n\r\n template({ value }) {\r\n return bidStrategyTypeTemplate({ value, schemaI18n: this.schemaI18n });\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { CampaignuiBaseColumn } from '@bingads-webui-campaign/campaignui-base-column';\r\nimport campaignTemplate from './campaign.pug';\r\n\r\nexport class CampaignColumn extends CampaignuiBaseColumn {\r\n constructor({\r\n i18n,\r\n scope,\r\n routeTemplate,\r\n showExperiment,\r\n name,\r\n isForVNext,\r\n }) {\r\n super({\r\n name: _.isString(name) ? name : 'Campaign',\r\n property: _.compact([\r\n 'Campaign/Name',\r\n 'Campaign/Id',\r\n showExperiment && 'Campaign/BaseCampaignName',\r\n ]),\r\n title: i18n.getString('ColumnName_Campaign'),\r\n sortable: 'Campaign/Name',\r\n type: 'string',\r\n bodyClasses: ['grid-column-Campaign'],\r\n });\r\n\r\n this.i18n = i18n;\r\n this.scope = scope;\r\n this.routeTemplate = routeTemplate;\r\n this.isForVNext = isForVNext;\r\n }\r\n\r\n pickProperty(item) {\r\n const { customerId: cid, accountId: aid } = this.scope;\r\n const {\r\n Campaign: {\r\n Name: name,\r\n Id: cmpid,\r\n BaseCampaignName: baseCampaignName,\r\n } = {},\r\n } = item;\r\n\r\n let ariaLabel = this.i18n.getString('Click to scope to campaign {{campaignName}}', { campaignName: name });\r\n let className = '';\r\n\r\n if (this.isForVNext && baseCampaignName) {\r\n ariaLabel = this.i18n.getString('Click to scope to experiment {{experimentName}}', { experimentName: name });\r\n className = 'experiment-name';\r\n }\r\n\r\n return {\r\n name,\r\n href: this.routeTemplate({\r\n cid,\r\n aid,\r\n cmpid,\r\n }),\r\n cmpid,\r\n baseCampaignName,\r\n isForVNext: this.isForVNext,\r\n ariaLabel,\r\n className,\r\n };\r\n }\r\n\r\n get template() { return campaignTemplate; }\r\n}\r\n\r\nexport function createCustomCampaignColumnClass({ name }) {\r\n return class CustomCampaignColumn extends CampaignColumn {\r\n constructor({\r\n i18n,\r\n scope,\r\n routeTemplate,\r\n showExperiment,\r\n isForVNext,\r\n }) {\r\n super({\r\n i18n,\r\n scope,\r\n routeTemplate,\r\n showExperiment,\r\n name,\r\n isForVNext,\r\n });\r\n }\r\n };\r\n}\r\n","import _ from 'underscore';\r\nimport { CampaignuiBaseColumn } from '@bingads-webui-campaign/campaignui-base-column';\r\nimport { getViolationsFromCategoryFAIDMapping, shouldRepairGoogleImportVideoAd } from '@bingads-webui-campaign/delivery-status-popup-factory';\r\nimport template from './delivery.pug';\r\nimport { getBidLandscapeConfigs } from '../bid-landscape-utils';\r\n\r\nexport class DeliveryColumn extends CampaignuiBaseColumn {\r\n constructor({\r\n i18n,\r\n isForVNext,\r\n isCampaign,\r\n property,\r\n scope,\r\n permissions,\r\n view,\r\n }) {\r\n const isForCampaignPage = scope && scope.location && (scope.location.pathname === '/campaign/vnext/campaigns');\r\n const newHelpIdForMMAInDSA = permissions && permissions.IsMMAInDSAEnabled && isForCampaignPage;\r\n\r\n const isForAdsPage = scope && scope.location && (scope.location.pathname === '/campaign/vnext/ads');\r\n const isEditorialCategoryEnabled = permissions && permissions.IsEditorialCategoryEnabled;\r\n\r\n if (_.isUndefined(property)) {\r\n if (isCampaign) {\r\n // eslint-disable-next-line no-param-reassign\r\n property = ['Id', 'Name', 'DeliveryStatus', 'DeliveryStatusDetails', 'Budget', 'IsBidLandscapeAvailable', 'BiddingScheme'];\r\n } else if (isEditorialCategoryEnabled && isForAdsPage) {\r\n // EditorialCategories pilot\r\n // eslint-disable-next-line no-param-reassign\r\n property = ['DeliveryStatus', 'DeliveryStatusDetails', 'EditorialCategories', 'Budget', 'IsBidLandscapeAvailable', 'BiddingScheme'];\r\n } else {\r\n // eslint-disable-next-line no-param-reassign\r\n property = ['DeliveryStatus', 'DeliveryStatusDetails', 'Budget', 'IsBidLandscapeAvailable', 'BiddingScheme'];\r\n }\r\n\r\n if (isCampaign) {\r\n property.push('AssociatedExperiment');\r\n }\r\n }\r\n\r\n const title = i18n.getString('ColumnName_DeliveryStatus');\r\n\r\n super({\r\n name: 'Delivery',\r\n property,\r\n title,\r\n sortable: 'DeliveryStatus',\r\n type: 'string',\r\n helpId: newHelpIdForMMAInDSA ? 'pop_BA_CampaignGrids_Delivery' : 'Page_CampaignGrids_Delivery',\r\n bodyClasses: ['grid-column-Delivery'],\r\n helpAriaLabel: i18n.getString('Click to learn more about {{item}}', { item: title }),\r\n });\r\n\r\n this.i18n = i18n;\r\n this.isForVNext = isForVNext;\r\n this.isCampaign = isCampaign;\r\n this.isEditorialCategoryEnabled = isEditorialCategoryEnabled;\r\n this.isForAdsPage = isForAdsPage;\r\n this.instrumentation = view && view.instrumentation;\r\n this.IsGoogleImportVideoAdsEnabled = permissions && permissions.IsGoogleImportVideoAdsEnabled;\r\n this.showBudgetSuggestion = permissions && permissions.dynamic && permissions.dynamic.EnableBudgetSuggestion;\r\n this.permissions = permissions;\r\n }\r\n\r\n pickProperty(item) {\r\n const videoNeedsToBeConverted = this.IsGoogleImportVideoAdsEnabled && shouldRepairGoogleImportVideoAd(item);\r\n\r\n if (this.isCampaign) {\r\n return {\r\n Id: item.Id,\r\n DeliveryStatus: item.DeliveryStatus,\r\n Budget: item.Budget,\r\n IsAppealable: item.IsAppealable,\r\n AssociatedExperiment: item.AssociatedExperiment,\r\n ExperimentId: item.ExperimentId,\r\n DeliveryStatusDetails: item.DeliveryStatusDetails,\r\n BiddingScheme: item.BiddingScheme,\r\n IsBidLandscapeAvailable: item.IsBidLandscapeAvailable,\r\n };\r\n } else if (this.isEditorialCategoryEnabled && this.isForAdsPage) {\r\n // EditorialCategories pilot\r\n return {\r\n Id: item.Id,\r\n Budget: item.Budget,\r\n BiddingScheme: item.BiddingScheme,\r\n DeliveryStatus: item.DeliveryStatus,\r\n EditorialCategories: item.EditorialCategories,\r\n VideoNeedsToBeConverted: videoNeedsToBeConverted,\r\n DeliveryStatusDetails: item.DeliveryStatusDetails,\r\n IsBidLandscapeAvailable: item.IsBidLandscapeAvailable,\r\n };\r\n }\r\n return {\r\n Id: item.Id,\r\n Budget: item.Budget,\r\n BiddingScheme: item.BiddingScheme,\r\n DeliveryStatus: item.DeliveryStatus,\r\n DeliveryStatusDetails: item.DeliveryStatusDetails,\r\n IsBidLandscapeAvailable: item.IsBidLandscapeAvailable,\r\n };\r\n }\r\n\r\n template({ value }) {\r\n let { DeliveryStatus } = value;\r\n const { DeliveryStatusDetails } = value;\r\n let showEllipsisForExperiment = false;\r\n\r\n const isAutoBiddingLimited = DeliveryStatus === 'AutoBiddingLimitedUnAttainableTarget';\r\n let { enabledBidLandscape, hasBidLandscapeIcon } = getBidLandscapeConfigs({\r\n permissions: this.permissions,\r\n value,\r\n });\r\n if (!isAutoBiddingLimited) {\r\n enabledBidLandscape = false;\r\n hasBidLandscapeIcon = false;\r\n }\r\n\r\n if (this.isCampaign\r\n && value.ExperimentId\r\n && value.AssociatedExperiment) {\r\n showEllipsisForExperiment = true;\r\n DeliveryStatus = _.result({\r\n Promoted: 'ExperimentApplied',\r\n Graduated: 'ExperimentApplied',\r\n Ended: 'ExperimentEnded',\r\n }, value.AssociatedExperiment.Status, DeliveryStatus);\r\n }\r\n\r\n const errorStatusList = [\r\n 'AdGroupExpired',\r\n 'AudienceTooNarrow',\r\n 'CreditCardExpired',\r\n 'IOExceeded',\r\n 'PaymentInformationMissing',\r\n 'InvalidFinancialStatusOther',\r\n 'MigrationPaused',\r\n 'CampaignDeleted',\r\n 'CampaignBudgetPaused',\r\n 'AdGroupDeleted',\r\n 'CamAssetRejected',\r\n 'EditorialRejected',\r\n 'EditorialAppealRejected',\r\n 'CPSNonRetailDomain',\r\n 'LinkedInAccountServingHold',\r\n 'LinkedInCompanyPagePaidMediaRequired',\r\n 'DisclaimerInfoRejected',\r\n 'DisclaimerInfoRejectedAppealRejected',\r\n ];\r\n // these are not treated as warning or error\r\n const whiteList = [\r\n 'Eligible',\r\n 'EditorialApprovedLimited',\r\n 'EditorialApprovedLimitedAppealRejected',\r\n 'Incomplete',\r\n 'InlineOpportunity',\r\n 'AdGroupAudienceAssociationPaused',\r\n 'AdGroupAudienceAssociationExcluded',\r\n 'ExperimentApplied',\r\n 'ExperimentEnded',\r\n 'AutoBiddingLimitedUnAttainableTarget',\r\n 'CampaignInReview',\r\n 'DisclaimerInfoApprovedLimited',\r\n 'DisclaimerInfoApprovedLimitedAppealRejected',\r\n ];\r\n const inWhiteList = _.contains(whiteList, DeliveryStatus);\r\n const isErrorStatus = _.contains(errorStatusList, DeliveryStatus);\r\n const isWarningStatus = !inWhiteList && !isErrorStatus;\r\n\r\n const hasRejectReasonWhitelist = [\r\n 'Eligible',\r\n 'BudgetSuggestions',\r\n 'Incomplete',\r\n 'GeoCodingIncomplete',\r\n 'CampaignBudgetPaused',\r\n 'InlineOpportunity',\r\n ];\r\n\r\n const activity = this.instrumentation && this.instrumentation.autobiddingLimitedStatus &&\r\n this.instrumentation.autobiddingLimitedStatus.create().renderDeliveryStatus.create();\r\n\r\n if (activity && this.isCampaign && _.contains(['AutoBiddingLimitedInventoryLimit', 'AutoBiddingLimitedMaxCPCRestriction', 'AutoBiddingLimitedBudgetRestriction', 'AutoBiddingLimitedUnAttainableTarget', 'AutoBiddingPortfolioBidStrategyTrainingStatus'], DeliveryStatus)) {\r\n activity.trace(JSON.stringify({\r\n campaignId: value.Id,\r\n deliveryStatus: DeliveryStatus,\r\n }));\r\n }\r\n\r\n const adsActivity = this.instrumentation && this.instrumentation.logDeliveryStatus && this.instrumentation.logDeliveryStatus.create().logAdsDeliveryStatus.create();\r\n if (adsActivity && _.contains(['EditorialApprovedLimitedAppealRejected', 'EditorialAppealRejected'], DeliveryStatus)) {\r\n adsActivity.trace(JSON.stringify({\r\n adId: value.Id,\r\n deliveryStatus: DeliveryStatus,\r\n }));\r\n }\r\n\r\n // const showRejectPopup = !_.contains(hasRejectReasonWhitelist, DeliveryStatus);\r\n const showBudgetSuggestionWithDeliveryStatusDetails = this.showBudgetSuggestion && _.includes(DeliveryStatusDetails, 'BudgetSuggestions');\r\n const showRejectPopup = !_.contains(hasRejectReasonWhitelist, DeliveryStatus) && !showBudgetSuggestionWithDeliveryStatusDetails;\r\n\r\n // popup for 0) pilot and only for ads-page; 1) reject; or 2) mapped EditorialCategory is not empty\r\n let shouldEditorialCategoriesPopup = false;\r\n if (this.isEditorialCategoryEnabled && this.isForAdsPage) {\r\n const { EditorialCategories } = value;\r\n shouldEditorialCategoriesPopup = getViolationsFromCategoryFAIDMapping(EditorialCategories).length > 0;\r\n }\r\n\r\n // const showBudgetLandscape = (DeliveryStatus === 'BudgetSuggestions' || DeliveryStatus === 'CampaignBudgetPaused') && !!value.Budget;\r\n const showBudgetLandscape = (DeliveryStatus === 'BudgetSuggestions' || DeliveryStatus === 'CampaignBudgetPaused' || showBudgetSuggestionWithDeliveryStatusDetails) && !!value.Budget;\r\n const budgetLandscapeClassName = this.isCampaign\r\n ? 'iconba iconba-Financial bidlandscape_icon gridDetailsImage spritedimagealign clickable delivery_status_with_budget_suggestions'\r\n : ' status_icon gridDetailsImage spritedimagealign clickable delivery_status_with_budget_suggestions';\r\n\r\n const isCampaignBudgetLandScape = this.isCampaign && showBudgetLandscape;\r\n const containerClassName = isCampaignBudgetLandScape\r\n ? 'layout-marked-element status-row budget-landscape-row grid-editable-cell'\r\n : 'layout-marked-element status-row';\r\n\r\n const opportunityPopupHandlerClass = 'delivery_status_with_inline_opportunities';\r\n const inlineOpportunityClassname = `iconba iconba-CustomerInsightsShape inline-recommendation-grid-icon clickable ${opportunityPopupHandlerClass}`;\r\n const vnextInlineOpportunityClassname = 'iconba iconba-CustomerInsightsShape inline-recommendation-grid-icon clickable';\r\n\r\n // seems not in use, so not update this\r\n const withInlineAppeals = this.isCampaign\r\n && (DeliveryStatus === 'EditorialRejected' || DeliveryStatus === 'EditorialApprovedLimited') && value.IsAppealable === true;\r\n const showInlineOpportunityPopup = DeliveryStatus === 'InlineOpportunity';\r\n const shouldShowPopUpStyleInVnext = this.isForVNext\r\n && (showRejectPopup || showBudgetLandscape || showInlineOpportunityPopup);\r\n\r\n const vnextContainerClasses = [];\r\n if (isCampaignBudgetLandScape) {\r\n vnextContainerClasses.push('budget-landscape-row clickable');\r\n }\r\n if (showInlineOpportunityPopup) {\r\n vnextContainerClasses.push(opportunityPopupHandlerClass);\r\n vnextContainerClasses.push('clickable');\r\n }\r\n const vNextContainerClassName = vnextContainerClasses.join(' ');\r\n\r\n return template({\r\n Id: value.Id,\r\n isErrorStatus,\r\n isWarningStatus,\r\n showRejectPopup: showRejectPopup || shouldEditorialCategoriesPopup,\r\n showInlineOpportunityPopup,\r\n inlineOpportunityClassname,\r\n vnextInlineOpportunityClassname,\r\n DeliveryStatus,\r\n i18n: this.i18n,\r\n isForVNext: this.isForVNext,\r\n showBudgetLandscape,\r\n hasBidlandscapeIcon: hasBidLandscapeIcon,\r\n enabledBidlandscape: enabledBidLandscape,\r\n budgetType: value && value.Budget ? value.Budget.Type : null,\r\n budgetId: value && value.Budget ? value.Budget.Id : null,\r\n budgetLandscapeClassName,\r\n withInlineAppeals,\r\n showEllipsisForExperiment,\r\n containerClassName,\r\n vNextContainerClassName,\r\n shouldShowPopUpStyleInVnext,\r\n shouldShowSensitiveContentWarning: shouldEditorialCategoriesPopup,\r\n videoNeedsToBeConverted: value.VideoNeedsToBeConverted,\r\n });\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { CampaignuiBaseColumn } from '@bingads-webui-campaign/campaignui-base-column';\r\nimport qualityScoreTemplate from './quality-score.pug';\r\n\r\nexport class QualityScoreColumn extends CampaignuiBaseColumn {\r\n constructor({ i18n, helpId = 'Page_CampaignGrids_QualScore', isForVNext }) {\r\n const title = i18n.getString('ColumnName_QualityScore');\r\n\r\n super({\r\n name: 'QualityScore',\r\n property: 'QualityScore',\r\n title,\r\n sortable: 'QualityScore/OverallQualityScore',\r\n type: 'string',\r\n bodyClasses: ['grid-column-QualityScore'],\r\n helpId,\r\n helpAriaLabel: i18n.getString('Click to learn more about {{item}}', { item: title }),\r\n });\r\n\r\n this.titleDetail = i18n.getString('Page_Keywords_QualityScoreDetails');\r\n this.isForVNext = isForVNext;\r\n }\r\n\r\n pickProperty(item) {\r\n return _.defaults({\r\n score: item && item.QualityScore && item.QualityScore.OverallQualityScore,\r\n title: this.titleDetail,\r\n });\r\n }\r\n\r\n template(model) {\r\n return qualityScoreTemplate(_.extend({\r\n isForVNext: this.isForVNext,\r\n }, model));\r\n }\r\n}\r\n","import $ from 'jquery';\r\n\r\n/**\r\n * show the quality score detail in the dialog next to it\r\n *\r\n * @param {Object} event - The backbone click event from where the quality score cell was clicked.\r\n * @param {Object} qualityScore - The qualityscore detailed object.\r\n * @param {String} qsContainerId - The container id to show the quality score detail info.\r\n * @param {Object} legacyGlobalI18n - Legacy global i18n\r\n * @returns {undefined}.\r\n */\r\nexport function showQualityScoreDetail(event, qualityScore, qsContainerId, legacyGlobalI18n) {\r\n const {\r\n KeywordRelevance,\r\n LandingPageQuality,\r\n LandingPageRelevance,\r\n OverallQualityScore,\r\n } = qualityScore || {};\r\n\r\n $.gridPopup.clickEvent(\r\n event, () => {\r\n $.advertiser.controls.qualityscore.DisplayQsFlyout( // eslint-disable-line new-cap\r\n KeywordRelevance || 0,\r\n LandingPageQuality || 0,\r\n LandingPageRelevance || 0,\r\n OverallQualityScore || 0\r\n );\r\n },\r\n qsContainerId,\r\n `${legacyGlobalI18n.getString('QualityScoreFlyOut_TotalScoreHeading')} ${OverallQualityScore} ${legacyGlobalI18n.getString('QualityScoreFlyOut_TotalScore')}`\r\n );\r\n}\r\n","import _ from 'underscore';\r\nimport $ from 'jquery';\r\n\r\nimport { CampaignuiBaseColumn } from '@bingads-webui-campaign/campaignui-base-column';\r\nimport { renderStatusPopupEditor } from '@bingads-webui-campaign/status-popup-editor';\r\n\r\nimport statusIconTemplate from './status-icon.pug';\r\nimport headerTemplate from './status-icon-header-template.pug';\r\n\r\nexport class StatusIconColumn extends CampaignuiBaseColumn {\r\n constructor({\r\n i18n,\r\n view,\r\n showExperiment,\r\n enableEdit,\r\n statusOptions = [{ name: 'Enabled', value: 'Active' }, { name: 'Paused', value: 'Paused' }],\r\n isCampaign = false,\r\n isForVNext = false,\r\n sortable,\r\n group,\r\n title,\r\n enableGridFlexLayout = false,\r\n }) {\r\n super({\r\n name: 'Status',\r\n property: _.compact([\r\n 'Status',\r\n showExperiment && (isCampaign ? 'ExperimentId' : 'Campaign/ExperimentId'),\r\n isCampaign && 'ImportProperties',\r\n ]),\r\n title: title || 'Status',\r\n sortable: sortable || 'Status',\r\n isResizable: false,\r\n type: 'string',\r\n enableEdit,\r\n headerTemplate: () => headerTemplate({}),\r\n group,\r\n });\r\n\r\n this.i18n = i18n;\r\n this.view = view;\r\n this.statusOptions = statusOptions;\r\n this.isCampaign = isCampaign;\r\n this.isForVNext = isForVNext;\r\n this.enableGridFlexLayout = enableGridFlexLayout;\r\n }\r\n\r\n isExperiment(item) {\r\n return _.result(this.isCampaign ? item : item.Campaign, 'ExperimentId');\r\n }\r\n\r\n pickProperty(item) {\r\n const {\r\n Status,\r\n Id,\r\n } = item;\r\n\r\n return {\r\n Status,\r\n Id,\r\n isExperiment: this.isExperiment(item),\r\n };\r\n }\r\n\r\n template(model) {\r\n return statusIconTemplate(_.extend({}, model, {\r\n i18n: this.i18n, isForVNext: this.isForVNext, enableGridFlexLayout: this.enableGridFlexLayout,\r\n }));\r\n }\r\n\r\n onPrompt({\r\n event,\r\n item,\r\n position,\r\n newPosition,\r\n }) {\r\n if (item.CampaignType === 'Smart' && item.DeliveryStatus === 'CampaignInProgress') {\r\n return;\r\n }\r\n const statusEditor = renderStatusPopupEditor({\r\n position: this.isForVNext ? newPosition : position,\r\n i18n: this.i18n,\r\n currentStatus: item.Status,\r\n statusOptions: (() => {\r\n let options = this.statusOptions;\r\n\r\n if (this.isExperiment(item)) {\r\n options = _.map(options, (option) => {\r\n const iconClass = _.result({\r\n Enabled: 'experiment-active-icon',\r\n Paused: 'experiment-paused-icon',\r\n }, option.name);\r\n\r\n return _.defaults({ iconClass }, option);\r\n });\r\n }\r\n\r\n return options;\r\n })(),\r\n isForVNext: this.isForVNext,\r\n });\r\n\r\n $(event.target).attr('aria-expanded', 'true');\r\n\r\n statusEditor.then((status) => {\r\n $(event.target).attr('aria-expanded', 'false');\r\n\r\n if (status) {\r\n this.updateStatus({ status, item });\r\n }\r\n });\r\n }\r\n\r\n updateStatus() {\r\n throw new Error('updateStatus not implemented');\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport budgetSplitTmpl from './budget-split.pug';\r\nimport budgetNotEditableTmpl from './budget-not-editable.pug';\r\n\r\nexport class BudgetSplitView extends Backbone.View {\r\n initialize(options) {\r\n this.i18n = options.i18n;\r\n this.item = options.item;\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click .closeimage': 'onClose',\r\n };\r\n }\r\n\r\n onClose() {\r\n this.remove();\r\n }\r\n\r\n render() {\r\n this.$el.html(budgetSplitTmpl({\r\n i18n: this.i18n,\r\n item: this.item,\r\n }));\r\n\r\n return this;\r\n }\r\n}\r\n\r\nexport class BudgetNotEditableView extends Backbone.View {\r\n initialize(options) {\r\n this.i18n = options.i18n;\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click .closeimage': 'onClose',\r\n };\r\n }\r\n\r\n onClose() {\r\n this.remove();\r\n }\r\n\r\n render() {\r\n this.$el.html(budgetNotEditableTmpl({ i18n: this.i18n }));\r\n\r\n return this;\r\n }\r\n}\r\n","import $ from 'jquery';\r\nimport _ from 'underscore';\r\nimport { CampaignuiBaseColumn } from '@bingads-webui-campaign/campaignui-base-column';\r\nimport { GridCustomizedPopupEditor } from '@bingads-webui-campaign/grid-customized-popup-editor';\r\nimport { showBudgetBidCampaignNotifications } from '@bingads-webui-campaign/import-shared-utils';\r\nimport { BudgetNotEditableView } from './budget';\r\nimport budgetTemplate from './budget-template.pug';\r\nimport unpurposedBudgetTemplate from './unpurposed-budget-template.pug';\r\n\r\nexport class BudgetColumn extends CampaignuiBaseColumn {\r\n constructor(options) {\r\n const { dynamic } = options.permissions || {};\r\n const {\r\n CampaignLifetimeBudget,\r\n MaeLifetimeBudgetExclusion,\r\n } = dynamic || {};\r\n\r\n const isCampaignLifetimeBudgetEnabled = CampaignLifetimeBudget && !MaeLifetimeBudgetExclusion;\r\n\r\n const title = options.i18n.getString(isCampaignLifetimeBudgetEnabled ? 'ColumnName_DailyBudgetAmount' : 'ColumnName_BudgetAmount');\r\n\r\n super({\r\n name: 'Budget',\r\n property: ['Budget', 'DeliveryStatus', 'DeliveryStatusDetails', 'IsBidLandscapeAvailable', 'BiddingScheme', 'BidStrategyName', 'ImportProperties'],\r\n title,\r\n sortable: 'Budget/Amount',\r\n editable: true,\r\n enableEdit: item => item.Budget?.Type === 'DailyStandard',\r\n type: 'number',\r\n helpId: 'pop_BA_Campaigns_DailyBudget',\r\n helpAriaLabel: options.i18n.getString('Click to learn more about {{item}}', { item: title }),\r\n });\r\n\r\n this.delta = 0;\r\n this.resetDelta = null;\r\n this.view = options.view;\r\n this.i18n = options.i18n;\r\n this.schemaI18n = options.schemaI18n;\r\n this.numberFormatter = options.i18n.decimalToFixedFormatter(2);\r\n this.InlineSharedBudgetEditor = options.InlineSharedBudgetEditor;\r\n this.InlineBudgetEditor = options.InlineBudgetEditor;\r\n this.budgetTemplate = options.budgetTemplate || budgetTemplate;\r\n this.decimal = options.decimal;\r\n this.permissions = options.permissions;\r\n this.isForVNext = options.isForVNext;\r\n this.isCampaign = options.isCampaign;\r\n }\r\n\r\n pickProperty(item) {\r\n const propertys = {\r\n Budget: item.Budget,\r\n DeliveryStatus: item.DeliveryStatus,\r\n IsBidLandscapeAvailable: item.IsBidLandscapeAvailable,\r\n BiddingScheme: item.BiddingScheme,\r\n DeliveryStatusDetails: item.DeliveryStatusDetails,\r\n BidStrategyName: item.BidStrategyName,\r\n };\r\n propertys.AssociatedExperiment = item.AssociatedExperiment;\r\n return propertys;\r\n }\r\n\r\n onPrompt({\r\n position, item, event, newPosition,\r\n }) {\r\n if ($(event.target).hasClass('experiment-budget-ellipsis')) {\r\n // already handled in grid\r\n return null;\r\n }\r\n\r\n if ($(event.target).hasClass('bidlandscape_icon')) {\r\n // already handled in campaigns-grid.es\r\n return null;\r\n }\r\n const groupClass = `grid-group-${_.result(this.config, 'group', 'other')}`;\r\n if (item.ExperimentId > 0) {\r\n const budgetNotEditableView = new BudgetNotEditableView({ i18n: this.i18n }).render();\r\n\r\n return new GridCustomizedPopupEditor({\r\n editorView: budgetNotEditableView,\r\n cellPosition: position,\r\n renderBelow: false,\r\n className: `grid-popupeditor ${groupClass}`,\r\n }).render();\r\n }\r\n\r\n const { instrumentation } = this.view;\r\n let budgetBidCampaignImportNotificationActivity;\r\n if (instrumentation) {\r\n budgetBidCampaignImportNotificationActivity = instrumentation.createScenarioAndActivity({\r\n scenarioName: 'BudgetBidCampaignImportNotification',\r\n activityName: 'CampaignsGridBudgetColumn',\r\n }).activity;\r\n }\r\n\r\n\r\n if (item.Budget.Id) {\r\n // shared budget\r\n const sharedBudgetEditor = new this.InlineSharedBudgetEditor({\r\n model: {\r\n budgetAmount: item.Budget.Amount,\r\n budgetType: item.Budget.Type,\r\n budgetName: item.Budget.Name,\r\n budgetId: item.Budget.Id,\r\n campaignId: item.Id,\r\n permissions: this.permissions,\r\n DeliveryStatus: item.DeliveryStatus,\r\n DeliveryStatusDetails: item.DeliveryStatusDetails,\r\n },\r\n renderAsPopup: true,\r\n $elToBlock: this.view.grid.gridView.$el,\r\n isForVNext: this.isForVNext,\r\n importNotificationCallback: (newBudget) => {\r\n showBudgetBidCampaignNotifications({\r\n campaignItemList: [item], oldBudget: item.Budget, newBudget, activity: budgetBidCampaignImportNotificationActivity,\r\n });\r\n },\r\n });\r\n\r\n sharedBudgetEditor.on('close', () => {\r\n this.view.grid.gridView.refresh(true);\r\n });\r\n\r\n const editorView = new GridCustomizedPopupEditor({\r\n editorView: sharedBudgetEditor.render(),\r\n cellPosition: this.isForVNext ? newPosition : position,\r\n renderBelow: false,\r\n className: `grid-popupeditor ${groupClass}`,\r\n parentContainerSelector: this.isForVNext ? '.grid-and-disclaim-container' : null,\r\n });\r\n\r\n return editorView.render();\r\n } else if (item.Budget.Amount) {\r\n const editor = new this.InlineBudgetEditor({\r\n item,\r\n $elToBlock: this.view.grid.gridView.$el,\r\n isForVNext: this.isForVNext,\r\n permissions: this.permissions,\r\n showBudgetMinRecommend: this.permissions.dynamic && this.permissions.dynamic.BCCBudgetImprovementEnabled,\r\n currencySymbol: this.i18n.getCurrencySymbol(),\r\n clientName: this.isCampaign ? 'CampaignTabEditing' : 'AllCampaignSetting',\r\n perfMarker: this.view.campaignTabPerfMarker,\r\n importNotificationCallback: (newBudget) => {\r\n showBudgetBidCampaignNotifications({\r\n campaignItemList: [item], oldBudget: item.Budget, newBudget, activity: budgetBidCampaignImportNotificationActivity,\r\n });\r\n },\r\n });\r\n\r\n editor.on('close', (update) => {\r\n if (update) {\r\n this.view.grid.gridView.refresh(true);\r\n }\r\n });\r\n\r\n const editorView = new GridCustomizedPopupEditor({\r\n editorView: editor.render(),\r\n cellPosition: this.isForVNext ? newPosition : position,\r\n renderBelow: false,\r\n className: 'grid-popupeditor'.concat(` ${groupClass}`).concat(this.permissions.IsBudgetInlineSuggestionEnabled ? ' inline-budget-editor-popup' : ''),\r\n parentContainerSelector: this.isForVNext ? '.grid-and-disclaim-container' : null,\r\n });\r\n\r\n editorView.render();\r\n return editorView;\r\n }\r\n return _.noop;\r\n }\r\n\r\n template({ value }) {\r\n let params = null;\r\n const enabledStatus = ['Eligible', 'InlineOpportunity', 'AutoBiddingLimitedUnAttainableTarget'];\r\n const autoBiddingTarget = ['TargetCpa', 'TargetRoas'];\r\n const maxConversionTarget = ['MaxConversionValue', 'MaxConversions'];\r\n const whiteList = [\r\n 'ManualCpc',\r\n 'EnhancedCpc',\r\n ...this.permissions.dynamic && this.permissions.dynamic.SimulatorForCPAROAS ? autoBiddingTarget : [],\r\n ...this.permissions.IsPmaxBidLandscapeEnabled ? maxConversionTarget : [],\r\n ];\r\n const biddingSchemeType = _.result(value.BiddingScheme, 'Type', null);\r\n const inWhiteList = _.contains(whiteList, biddingSchemeType);\r\n const enabledBidlandscapeForLimited = value.DeliveryStatus === 'AutoBiddingLimitedUnAttainableTarget' && (_.every(value.DeliveryStatusDetails, detail => _.contains(enabledStatus, detail)));\r\n const enabledBidlandscape = (value.DeliveryStatus === 'Eligible' || value.DeliveryStatus === 'InlineOpportunity' || enabledBidlandscapeForLimited) && value.IsBidLandscapeAvailable;\r\n let hasBidlandscapeIcon = !this.permissions.IsReadOnlyUser && inWhiteList && !value.BidStrategyName; // portfolio campaign has no support\r\n if (_.contains(autoBiddingTarget, biddingSchemeType)) {\r\n hasBidlandscapeIcon = hasBidlandscapeIcon && !value.Budget.Id;\r\n }\r\n if (_.contains(maxConversionTarget, biddingSchemeType)) {\r\n hasBidlandscapeIcon = hasBidlandscapeIcon && (!_.isNull(_.result(value.BiddingScheme, 'TargetCpa', null)) || !_.isNull(_.result(value.BiddingScheme, 'TargetRoas', null)));\r\n }\r\n\r\n if (value.Budget) {\r\n if (value.Budget.Type === 'LifetimeBudgetStandard') {\r\n return unpurposedBudgetTemplate();\r\n }\r\n\r\n const isBudgetCenterEntryEnabled = this.permissions.dynamic && !this.permissions.dynamic.IsSmartPageStandalone && !this.permissions.IsUnifiedSmartMode && !this.permissions.IsSmartMode\r\n && _.isNumber(value.Budget.MonthlyAmount);\r\n // aggregated row budget\r\n if (_.isNumber(value.Budget.DailyBudget)) {\r\n params = {\r\n budgetAmount: this.decimal.fromFloatToString(value.Budget.DailyBudget + this.delta),\r\n budgetTypeText: this.schemaI18n.value('Budget', 'ShortType', 'DailyStandard'),\r\n budgetName: null,\r\n budgetId: 0,\r\n enabledBidlandscape,\r\n hasBidlandscapeIcon,\r\n isBudgetCenterEntryEnabled,\r\n i18n: this.i18n,\r\n };\r\n } else {\r\n params = {\r\n budgetAmount: this.decimal.fromFloatToString(value.Budget.Amount),\r\n budgetType: value.Budget.Type,\r\n budgetTypeText: this.schemaI18n.value('Budget', 'ShortType', value.Budget.Type),\r\n budgetName: value.Budget.Name,\r\n budgetId: value.Budget.Id,\r\n enabledBidlandscape,\r\n hasBidlandscapeIcon,\r\n isBudgetCenterEntryEnabled,\r\n i18n: this.i18n,\r\n };\r\n }\r\n\r\n params.AssociatedExperiment = value.AssociatedExperiment;\r\n }\r\n\r\n return this.budgetTemplate({\r\n model: params,\r\n });\r\n }\r\n}\r\n","import { CampaignuiBaseColumn } from '@bingads-webui-campaign/campaignui-base-column';\r\n\r\nexport class BidStrategyNameColumn extends CampaignuiBaseColumn {\r\n constructor({ i18n, isCampaign }) {\r\n const title = i18n.getString('ColumnName_BidStrategyName');\r\n const property = isCampaign ? 'BidStrategyName' : 'Campaign/BidStrategyName';\r\n\r\n super({\r\n name: 'BidStrategyName',\r\n property,\r\n title,\r\n sortable: property,\r\n type: 'string',\r\n bodyClasses: ['grid-column-BidStrategyName'],\r\n helpId: 'pop_BA_CampaignGrids_PortfolioBidStrat',\r\n helpAriaLabel: i18n.getString('Click to learn more about {{item}}', { item: title }),\r\n });\r\n }\r\n\r\n template({\r\n value: BidStrategyName,\r\n }) {\r\n // for aggregated rows\r\n if (BidStrategyName === undefined) {\r\n return ' ';\r\n }\r\n // for data rows\r\n return BidStrategyName || '-';\r\n }\r\n}\r\n","/* eslint-disable import/extensions */\r\n/* eslint-disable import/no-unresolved */\r\nimport _ from 'underscore';\r\nimport { CampaignuiBaseColumn } from '@bingads-webui-campaign/campaignui-base-column';\r\nimport { isXandrServing } from '@bingads-webui-campaign-react/constants';\r\nimport template from './campaign-bid-strategy-template.pug';\r\n\r\nexport class CampaignBidStrategyTypeColumn extends CampaignuiBaseColumn {\r\n constructor(options) {\r\n const {\r\n i18n,\r\n helpId = 'pop_BA_CampaignGrids_BidStrategy',\r\n } = options;\r\n const title = i18n.getString('ColumnName_BidStrategyType');\r\n const helpAriaLabel = i18n.getString('Click to learn more about {{item}}', { item: title });\r\n\r\n super({\r\n name: 'DisplayBiddingStrategyType',\r\n property: ['BiddingScheme', 'CampaignSubType'],\r\n title,\r\n sortable: 'DisplayBiddingStrategyType',\r\n type: 'string',\r\n bodyClasses: ['grid-column-BidStrategyType'],\r\n helpId,\r\n helpAriaLabel,\r\n });\r\n this.i18n = i18n;\r\n this.permissions = options.permissions;\r\n }\r\n\r\n pickProperty(item) {\r\n let type = _.result(item.BiddingScheme, 'Type', null);\r\n\r\n if (isXandrServing(item.CampaignSubType, item.CampaignSettings)) {\r\n if (type === 'ManualCpm') {\r\n type = 'ViewableCpm';\r\n } else if (type === 'ManualCpv') {\r\n type = 'Cpcv';\r\n }\r\n }\r\n\r\n this.CampaignType = item.CampaignType;\r\n this.BiddingScheme = item.BiddingScheme;\r\n\r\n return type;\r\n }\r\n\r\n template({ value }) {\r\n return template({\r\n DisplayBiddingStrategyType: value,\r\n CampaignType: this.CampaignType,\r\n BiddingScheme: this.BiddingScheme,\r\n i18n: this.i18n,\r\n });\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { CampaignuiBaseColumn } from '@bingads-webui-campaign/campaignui-base-column';\r\nimport { GridCustomizedPopupEditor } from '@bingads-webui-campaign/grid-customized-popup-editor';\r\nimport { showBudgetBidCampaignNotifications } from '@bingads-webui-campaign/import-shared-utils';\r\nimport unpurposedBudgetTemplate from './unpurposed-budget-template.pug';\r\nimport budgetTemplate from './lifetime-budget-template.pug';\r\n\r\nconst LifetimeBudgetType = 'LifetimeBudgetStandard';\r\n\r\nexport class LifetimeBudgetColumn extends CampaignuiBaseColumn {\r\n constructor(options) {\r\n const title = options.i18n.getString('ColumnName_LifetimeBudgetAmount');\r\n\r\n super({\r\n name: 'LifetimeBudget',\r\n property: ['Budget'],\r\n title,\r\n sortable: 'Budget/LifetimeBudgetAmount',\r\n editable: true,\r\n enableEdit: item => item.Budget?.Type === LifetimeBudgetType,\r\n type: 'number',\r\n helpId: 'pop_BA_Campaign_TotalCampaignBudgetColumn',\r\n helpAriaLabel: options.i18n.getString('Click to learn more about {{item}}', { item: title }),\r\n });\r\n\r\n this.view = options.view;\r\n this.i18n = options.i18n;\r\n this.InlineBudgetEditor = options.InlineBudgetEditor;\r\n this.budgetTemplate = budgetTemplate;\r\n this.decimal = options.decimal;\r\n this.permissions = options.permissions;\r\n this.isForVNext = options.isForVNext;\r\n this.isCampaign = options.isCampaign;\r\n }\r\n\r\n pickProperty(item) {\r\n const properties = {\r\n Budget: item.Budget,\r\n DeliveryStatus: item.DeliveryStatus,\r\n IsBidLandscapeAvailable: item.IsBidLandscapeAvailable,\r\n BiddingScheme: item.BiddingScheme,\r\n DeliveryStatusDetails: item.DeliveryStatusDetails,\r\n BidStrategyName: item.BidStrategyName,\r\n };\r\n properties.AssociatedExperiment = item.AssociatedExperiment;\r\n return properties;\r\n }\r\n\r\n onPrompt({\r\n position, item, newPosition,\r\n }) {\r\n const groupClass = `grid-group-${_.result(this.config, 'group', 'other')}`;\r\n const { instrumentation } = this.view;\r\n let budgetBidCampaignImportNotificationActivity;\r\n if (instrumentation) {\r\n budgetBidCampaignImportNotificationActivity = instrumentation.createScenarioAndActivity({\r\n scenarioName: 'BudgetBidCampaignImportNotification',\r\n activityName: 'CampaignsGridBudgetColumn',\r\n }).activity;\r\n }\r\n\r\n\r\n if (item.Budget.LifetimeBudgetAmount) {\r\n const editor = new this.InlineBudgetEditor({\r\n item,\r\n $elToBlock: this.view.grid.gridView.$el,\r\n isForVNext: this.isForVNext,\r\n permissions: this.permissions,\r\n showBudgetMinRecommend: this.permissions.dynamic && this.permissions.dynamic.BCCBudgetImprovementEnabled,\r\n currencySymbol: this.i18n.getCurrencySymbol(),\r\n clientName: this.isCampaign ? 'CampaignTabEditing' : 'AllCampaignSetting',\r\n perfMarker: this.view.campaignTabPerfMarker,\r\n importNotificationCallback: (newBudget) => {\r\n showBudgetBidCampaignNotifications({\r\n campaignItemList: [item], oldBudget: item.Budget, newBudget, activity: budgetBidCampaignImportNotificationActivity,\r\n });\r\n },\r\n });\r\n\r\n editor.on('close', (update) => {\r\n if (update) {\r\n this.view.grid.gridView.refresh(true);\r\n }\r\n });\r\n\r\n const editorView = new GridCustomizedPopupEditor({\r\n editorView: editor.render(),\r\n cellPosition: this.isForVNext ? newPosition : position,\r\n renderBelow: false,\r\n className: 'grid-popupeditor'.concat(` ${groupClass}`).concat(this.permissions.IsBudgetInlineSuggestionEnabled ? ' inline-budget-editor-popup' : ''),\r\n parentContainerSelector: this.isForVNext ? '.grid-and-disclaim-container' : null,\r\n });\r\n\r\n editorView.render();\r\n return editorView;\r\n }\r\n return _.noop;\r\n }\r\n\r\n template({ value }) {\r\n let params = null;\r\n if (value.Budget) {\r\n if (value.Budget.Type && value.Budget.Type !== LifetimeBudgetType) {\r\n return unpurposedBudgetTemplate();\r\n }\r\n\r\n // aggregated row budget\r\n if (_.isNumber(value.Budget.LifetimeBudget)) {\r\n params = {\r\n budgetAmount: this.decimal.fromFloatToString(value.Budget.LifetimeBudget),\r\n budgetType: LifetimeBudgetType,\r\n i18n: this.i18n,\r\n };\r\n } else {\r\n params = {\r\n budgetAmount: value.Budget.LifetimeBudgetAmount ? this.decimal.fromFloatToString(value.Budget.LifetimeBudgetAmount) : '',\r\n budgetType: value.Budget.Type,\r\n i18n: this.i18n,\r\n };\r\n }\r\n }\r\n\r\n return this.budgetTemplate({\r\n model: params,\r\n });\r\n }\r\n}\r\n","import { chain, each, map, result, isObject, isString, isArray, isEmpty } from 'underscore';\r\nimport { cloneDeep } from '@bingads-webui-universal/primitive-utilities';\r\n\r\nconst buildColumnConversionsMap = columnConversionsMetadata =>\r\n chain(columnConversionsMetadata)\r\n .pairs()\r\n .map(([targetColumnName, { sourceColumnName }]) =>\r\n (sourceColumnName ? [sourceColumnName, targetColumnName] : null))\r\n .compact()\r\n .object()\r\n .value();\r\n\r\nexport const getColumnConversions = columnConfigs =>\r\n chain(columnConfigs)\r\n .map(({ name: targetColumnName, columnConversion }) =>\r\n (columnConversion ? [targetColumnName, columnConversion] : null))\r\n .compact()\r\n .object()\r\n .value();\r\n\r\nexport const buildColumnConversions = (columnConversionsMetadata) => {\r\n const conversionsMap = buildColumnConversionsMap(columnConversionsMetadata);\r\n return {\r\n applyColumnConversions: columnNames =>\r\n map(columnNames, columnName => result(conversionsMap, columnName, columnName)),\r\n };\r\n};\r\n\r\nexport const buildSortingConversions = columnConversionsMetadata => ({\r\n applySortingInfoConversion: ({\r\n sortableHeader: savedSortableHeader,\r\n orderbyInfo: savedOrderbyInfo,\r\n }) => {\r\n const res = {\r\n ...savedSortableHeader ? { sortableHeader: savedSortableHeader } : {},\r\n ...savedOrderbyInfo ? { orderbyInfo: savedOrderbyInfo } : {},\r\n };\r\n\r\n if (isObject(savedSortableHeader) &&\r\n isString(savedSortableHeader.name) &&\r\n !isEmpty(savedSortableHeader.name)) {\r\n const sortableConversionInfo = chain(columnConversionsMetadata)\r\n .pairs()\r\n .find(([, columnConversion]) =>\r\n columnConversion.sourceColumnName === savedSortableHeader.name &&\r\n columnConversion.targetSortableProperty)\r\n .value();\r\n if (sortableConversionInfo) {\r\n const [targetColumnName, { targetSortableProperty, sourceSortableProperty }]\r\n = sortableConversionInfo;\r\n\r\n res.sortableHeader = {\r\n ...savedSortableHeader,\r\n name: targetColumnName,\r\n };\r\n\r\n if (savedOrderbyInfo && isArray(savedOrderbyInfo)) {\r\n const orderbyInfo = cloneDeep(savedOrderbyInfo);\r\n\r\n each(orderbyInfo, (orderByItem) => {\r\n if (orderByItem.key === sourceSortableProperty) {\r\n // eslint-disable-next-line no-param-reassign\r\n orderByItem.key = targetSortableProperty;\r\n }\r\n });\r\n res.orderbyInfo = orderbyInfo;\r\n }\r\n }\r\n }\r\n\r\n return res;\r\n },\r\n});\r\n\r\nexport const buildColumnAndSortingConversions = columnConversionsMetadata => ({\r\n ...buildColumnConversions(columnConversionsMetadata),\r\n ...buildSortingConversions(columnConversionsMetadata),\r\n});\r\n","import { isArray, map, pick, result } from 'underscore';\r\n\r\nexport const partialConversionPairs = {\r\n // Old Property : New Property\r\n Conversions: 'ConversionsCredit',\r\n CPA: 'PartialConversionCPA',\r\n ConversionRate: 'PartialConversionRate',\r\n AllConversionCPA: 'AllPartialConversionCPA',\r\n AllConversions: 'AllConversionsCredit',\r\n AllConversionRate: 'AllPartialConversionRate',\r\n ViewThroughConversionsCPA: 'ViewThroughPartialConversionsCPA',\r\n ViewThroughConversionsRate: 'ViewThroughPartialConversionsRate',\r\n ViewThroughConversions: 'ViewThroughConversionsCredit',\r\n RepeatRate: 'PartialConversionRepeatRate',\r\n};\r\n\r\n// This function is only used to replace the name above\r\n// Please do not use this function for anything else\r\n// And do not extend this function\r\nexport function applyPartialConversionColumnName(permission = {}, names) {\r\n const {\r\n dynamic = {},\r\n } = permission;\r\n\r\n const {\r\n // This function is only used for Partial Conversions and Column Conversion\r\n PartialConversions: IsPartialConversionsEnabled,\r\n ColumnConversion: IsColumnConversionEnabled,\r\n } = dynamic;\r\n\r\n const usePartialConversions =\r\n IsPartialConversionsEnabled && IsColumnConversionEnabled;\r\n\r\n if (usePartialConversions) {\r\n if (isArray(names)) {\r\n return map(names, name =>\r\n result(partialConversionPairs, name, name));\r\n }\r\n return result(partialConversionPairs, names, names);\r\n }\r\n return names;\r\n}\r\n\r\nconst ColumnConversionEnabledFeatures = {\r\n summary_tab_campaign: true,\r\n summary_tab_keyword: true,\r\n summary_tab_ad_group: true,\r\n summary_tab_ad: true,\r\n AdExtensionsGrid: true,\r\n DimensionsGrid: true,\r\n PerformanceGrid: true,\r\n};\r\n\r\nconst perfMetricColumnConvertionDef = (sourceColumnName, targetColumnName) => ({\r\n sourceColumnName,\r\n sourceSortableProperty: `PerformanceMetrics/${sourceColumnName}`,\r\n targetSortableProperty: `PerformanceMetrics/${targetColumnName}`,\r\n});\r\nconst perfMetricColumnConvertion = (sourceColumnName, targetColumnName) => ({\r\n [targetColumnName]: perfMetricColumnConvertionDef(sourceColumnName, targetColumnName),\r\n});\r\n\r\nfunction generateColumnConversionMetadataForColumns(columnNames) {\r\n return pick({\r\n ...perfMetricColumnConvertion('CPA', 'PartialConversionCPA'),\r\n ...perfMetricColumnConvertion('PartialConversionCPA', 'CPA'),\r\n ...perfMetricColumnConvertion('Conversions', 'ConversionsCredit'),\r\n ...perfMetricColumnConvertion('ConversionsCredit', 'Conversions'),\r\n ...perfMetricColumnConvertion('ConversionRate', 'PartialConversionRate'),\r\n ...perfMetricColumnConvertion('PartialConversionRate', 'ConversionRate'),\r\n ...perfMetricColumnConvertion('AllConversionCPA', 'AllPartialConversionCPA'),\r\n ...perfMetricColumnConvertion('AllPartialConversionCPA', 'AllConversionCPA'),\r\n ...perfMetricColumnConvertion('AllConversions', 'AllConversionsCredit'),\r\n ...perfMetricColumnConvertion('AllConversionsCredit', 'AllConversions'),\r\n ...perfMetricColumnConvertion('AllConversionRate', 'AllPartialConversionRate'),\r\n ...perfMetricColumnConvertion('AllPartialConversionRate', 'AllConversionRate'),\r\n ...perfMetricColumnConvertion('ViewThroughConversions', 'ViewThroughConversionsCredit'),\r\n ...perfMetricColumnConvertion('ViewThroughConversionsCredit', 'ViewThroughConversions'),\r\n ...perfMetricColumnConvertion('ViewThroughConversionsCPA', 'ViewThroughPartialConversionsCPA'),\r\n ...perfMetricColumnConvertion('ViewThroughPartialConversionsCPA', 'ViewThroughConversionsCPA'),\r\n ...perfMetricColumnConvertion('ViewThroughConversionsRate', 'ViewThroughPartialConversionsRate'),\r\n ...perfMetricColumnConvertion('ViewThroughPartialConversionsRate', 'ViewThroughConversionsRate'),\r\n }, columnNames);\r\n}\r\nfunction generateConversionColumns(permissions, featureName) {\r\n const {\r\n IsViewThroughConversionEnabled,\r\n IsViewThroughConversionsRevenueEnabled,\r\n dynamic = {},\r\n } = permissions;\r\n const {\r\n PartialConversions: IsPartialConversionsEnabled,\r\n } = dynamic;\r\n\r\n const usePartialConversions = IsPartialConversionsEnabled\r\n && ColumnConversionEnabledFeatures[featureName];\r\n\r\n const rawConversionColumns = [\r\n ...usePartialConversions ? [\r\n 'PartialConversionCPA',\r\n 'ConversionsCredit',\r\n 'PartialConversionRate',\r\n ] : [\r\n 'CPA',\r\n 'Conversions',\r\n 'ConversionRate',\r\n ],\r\n 'AdvertiserReportedRevenue',\r\n 'RevenueOnAdSpend',\r\n\r\n ...usePartialConversions ? [\r\n 'AllPartialConversionCPA',\r\n 'AllConversionsCredit',\r\n 'AllPartialConversionRate',\r\n ] : [\r\n 'AllConversionCPA',\r\n 'AllConversions',\r\n 'AllConversionRate',\r\n ],\r\n\r\n 'AllConversionAdvertiserReportedRevenue',\r\n 'AllConversionRevenueOnAdSpend',\r\n ];\r\n\r\n if (IsViewThroughConversionEnabled && usePartialConversions) {\r\n rawConversionColumns.push('ViewThroughConversionsCredit');\r\n } else if (IsViewThroughConversionEnabled && !usePartialConversions) {\r\n rawConversionColumns.push('ViewThroughConversions');\r\n }\r\n\r\n if (IsViewThroughConversionsRevenueEnabled && usePartialConversions) {\r\n rawConversionColumns.push('ViewThroughConversionsRevenue');\r\n rawConversionColumns.push('ViewThroughPartialConversionsCPA');\r\n rawConversionColumns.push('ViewThroughConversionsReturnOnAdSpend');\r\n rawConversionColumns.push('ViewThroughPartialConversionsRate');\r\n } else if (IsViewThroughConversionsRevenueEnabled && !usePartialConversions) {\r\n rawConversionColumns.push('ViewThroughConversionsRevenue');\r\n rawConversionColumns.push('ViewThroughConversionsCPA');\r\n rawConversionColumns.push('ViewThroughConversionsReturnOnAdSpend');\r\n rawConversionColumns.push('ViewThroughConversionsRate');\r\n }\r\n\r\n return rawConversionColumns;\r\n}\r\n\r\nexport function getColumnsConversionMap(featureName, permissions) {\r\n const biColumnNames = [\r\n ...generateConversionColumns(permissions, featureName),\r\n ];\r\n const columnConversionMetadata = {\r\n ...generateColumnConversionMetadataForColumns(biColumnNames),\r\n };\r\n\r\n return columnConversionMetadata;\r\n}\r\n","import _ from 'underscore';\r\nimport * as putil from '@bingads-webui-universal/primitive-utilities';\r\n\r\nlet Permissions;\r\n\r\nexport function initialize({\r\n globalConfig,\r\n}) {\r\n Permissions = globalConfig.get('Permissions');\r\n}\r\n\r\nexport function updateEntitySchemaForSOV(originalSchema, copy = true) {\r\n function isFilterable(schemaName, propName) {\r\n let schemaNameWhiteList = [\r\n 'Account',\r\n 'Campaign',\r\n 'AdGroup',\r\n 'Keyword',\r\n 'Time',\r\n // Comment out PortfolioBidStrategy until backend ready.\r\n // 'PortfolioBidStrategy',\r\n 'Budget',\r\n ];\r\n const propNameBlackList = _.compact([\r\n 'AuctionLostToLandingPercent',\r\n 'AuctionLostToAdQualityPercent',\r\n 'AuctionLostToBidPercent',\r\n schemaName === 'DimensionShopping' && 'TopImpressionRate',\r\n schemaName === 'ProductGroup' && 'TopImpressionRate',\r\n ]);\r\n\r\n if (Permissions.IsAvgPositionDeprecationPhase1Enabled\r\n && _.contains([\r\n 'TopImpressionRatePercent',\r\n 'TopImpressionRate',\r\n 'AbsoluteTopImpressionRatePercent',\r\n 'AbsoluteTopImpressionRate',\r\n ], propName)) {\r\n schemaNameWhiteList = schemaNameWhiteList.concat([\r\n 'Ad', 'SearchTerm', 'DsaSearchTerm',\r\n 'DsaTarget', 'BiddableAdGroupCriterion',\r\n 'BiddableCampaignCriterion', 'ProductGroup',\r\n 'DimensionLanding', 'DimensionSearchTerm', 'DimensionPublisher',\r\n 'Time', 'DimensionGeographic', 'DimensionLocation',\r\n 'DimensionShopping', 'AudienceCriterionWithBI',\r\n ]);\r\n }\r\n\r\n return _.contains(schemaNameWhiteList, schemaName) && !_.contains(propNameBlackList, propName);\r\n }\r\n\r\n const schema = (copy ? putil.cloneDeep : _.identity)(originalSchema);\r\n const performanceMetrics = putil.get(schema, 'properties.PerformanceMetrics');\r\n const performanceMetricsProperties = putil.get(performanceMetrics, 'schema.properties');\r\n\r\n if (performanceMetricsProperties) {\r\n const propsToAdd = _.chain(performanceMetricsProperties)\r\n .pairs()\r\n .filter(([propName, prop]) =>\r\n prop.sovcolumn && isFilterable(schema.name, propName))\r\n .map(_.first)\r\n .value();\r\n\r\n if (_.isArray(performanceMetrics.filterable)) {\r\n performanceMetrics.filterable = _.chain(performanceMetrics.filterable)\r\n .union(propsToAdd)\r\n .value();\r\n } else {\r\n _.each(performanceMetricsProperties, (prop, propName) => {\r\n if (_.contains(propsToAdd, propName)) {\r\n // eslint-disable-next-line no-param-reassign\r\n prop.filterable = true;\r\n }\r\n });\r\n }\r\n }\r\n\r\n return schema;\r\n}\r\n","import _ from 'underscore';\r\nimport * as putil from '@bingads-webui-universal/primitive-utilities';\r\nimport { getCustomColumnPreferenceName } from '@bingads-webui-universal/custom-column-utils';\r\nimport { CustomColumnServiceWrapper } from '@bingads-webui/custom-column-service-wrapper';\r\nimport { isValidForFeature } from '@bingads-webui/custom-columns-shared-config';\r\n\r\nlet Permissions;\r\nlet FeatureName;\r\nlet customColumnPreference;\r\n\r\nexport function initialize({\r\n globalConfig,\r\n featureName = '',\r\n customColumnPreference: customColumnPref,\r\n}) {\r\n Permissions = globalConfig.get('Permissions');\r\n FeatureName = featureName;\r\n customColumnPreference = customColumnPref;\r\n}\r\n\r\nconst pilotFlagMapping = {\r\n Account: 'IsCustomColumnsInAccountsSummarySupported',\r\n Campaign: 'IsCustomColumnsInCampaignsSupported',\r\n AdGroup: 'IsCustomColumnsInAdGroupsSupported',\r\n Ad: 'IsCustomColumnsInAdsSupported',\r\n AdExtensionAssociation: 'IsCustomColumnsInAdExtensionsSupported',\r\n Keyword: 'IsCustomColumnsInKeywordsSupported',\r\n SearchTerm: 'IsCustomColumnsInSearchTermsSupported',\r\n};\r\n\r\nconst summaryTabMapping = {\r\n Account: 'PerformanceGrid',\r\n Campaign: 'summary_tab_campaign',\r\n AdGroup: 'summary_tab_ad_group',\r\n Ad: 'summary_tab_ad',\r\n Keyword: 'summary_tab_keyword',\r\n SearchTerm: 'summary_tab_search_term',\r\n};\r\n\r\nconst excludedFeatures = [\r\n 'PerformanceTargetOverviewGrid', // Performance target page in new UI uses Campaign as the schema name\r\n];\r\n\r\nexport function updateEntitySchemaForCustomColumn(originalSchema, copy = true, filterExpressions = null) { // eslint-disable-line max-len\r\n const schema = (copy ? putil.cloneDeep : _.identity)(originalSchema);\r\n const schemaName = schema.name;\r\n const performanceMetrics = putil.get(schema, 'properties.PerformanceMetrics');\r\n const performanceMetricsProperties = putil.get(performanceMetrics, 'schema.properties');\r\n\r\n if (customColumnPreference &&\r\n performanceMetricsProperties &&\r\n Permissions[pilotFlagMapping[schemaName]] &&\r\n Permissions.IsCustomColumnFilterSupported && excludedFeatures.indexOf(FeatureName) < 0) {\r\n const summaryTab = schemaName !== 'AdExtensionAssociation' ? summaryTabMapping[schemaName] : FeatureName;\r\n const customColumnService = new CustomColumnServiceWrapper({\r\n name: getCustomColumnPreferenceName(summaryTab),\r\n CustomColumns: customColumnPreference.getCustomColumnPreferenceStore(summaryTab),\r\n });\r\n const customColumnData = customColumnService.getAll();\r\n\r\n if (customColumnData) {\r\n _.each(customColumnData, (customColumn) => {\r\n const key = `CustomColumn${customColumn.id}`;\r\n\r\n performanceMetricsProperties[key] = {\r\n isInvalidProperty: !isValidForFeature({\r\n schemaName,\r\n expression: customColumn.expression,\r\n permissions: Permissions,\r\n }),\r\n title: customColumn.name,\r\n id: customColumn.id,\r\n customColumn: true,\r\n format: customColumn.format,\r\n name: 'Double',\r\n type: 'number',\r\n filterable: true,\r\n nullable: true,\r\n };\r\n\r\n if (_.isArray(performanceMetrics.filterable) &&\r\n !_.contains(performanceMetrics.filterable, key)) {\r\n performanceMetrics.filterable.push(key);\r\n }\r\n });\r\n }\r\n\r\n if (filterExpressions) {\r\n _.each(filterExpressions, (filterExpression) => {\r\n const key = filterExpression.SelectedColumn;\r\n if (key.startsWith('CustomColumn') && key in performanceMetricsProperties === false) {\r\n performanceMetricsProperties[key] = {\r\n isDeletedProperty: true,\r\n id: key.split('CustomColumn')[1],\r\n customColumn: true,\r\n format: undefined,\r\n name: 'Double',\r\n type: 'number',\r\n filterable: true,\r\n nullable: true,\r\n };\r\n\r\n if (_.isArray(performanceMetrics.filterable)) {\r\n performanceMetrics.filterable.push(key);\r\n }\r\n }\r\n });\r\n }\r\n }\r\n\r\n return schema;\r\n}\r\n","import _ from 'underscore';\r\nimport * as putil from '@bingads-webui-universal/primitive-utilities';\r\n\r\nlet Permissions;\r\nlet propsToDelete;\r\n\r\nexport function initialize({\r\n globalConfig,\r\n}) {\r\n Permissions = globalConfig.get('Permissions');\r\n\r\n propsToDelete = _.compact([\r\n putil.get(Permissions, 'IsAvgPositionDeprecationPhase2Enabled') ?\r\n {\r\n key: 'AveragePosition',\r\n value: {\r\n alias: { legacy: 'AveragePosition' },\r\n isDeletedProperty: true,\r\n format: undefined,\r\n name: 'Double',\r\n type: 'number',\r\n filterable: true,\r\n nullable: true,\r\n },\r\n } : null,\r\n ]);\r\n}\r\n\r\nexport function updateEntitySchemaForRemovedPerformanceMetrics(\r\n originalSchema,\r\n copy = true,\r\n expression = null\r\n) {\r\n const schema = (copy ? putil.cloneDeep : _.identity)(originalSchema);\r\n const performanceMetrics = putil.get(schema, 'properties.PerformanceMetrics') || putil.get(schema, 'properties.Metrics') || putil.get(schema, 'properties');\r\n\r\n if (performanceMetrics) {\r\n const performanceMetricsProperties = putil.get(performanceMetrics, 'schema.properties');\r\n\r\n if (performanceMetricsProperties) {\r\n _.each(propsToDelete, (property) => {\r\n if (expression) {\r\n if (_.isArray(performanceMetrics.filterable)) {\r\n performanceMetrics.filterable.push(property.key);\r\n }\r\n performanceMetricsProperties[property.key] = property.value;\r\n } else {\r\n delete performanceMetricsProperties[property.key];\r\n }\r\n });\r\n }\r\n }\r\n\r\n return schema;\r\n}\r\n","import _ from 'underscore';\r\nimport * as putil from '@bingads-webui-universal/primitive-utilities';\r\n\r\nlet Permissions;\r\n\r\nexport function initialize({\r\n globalConfig,\r\n}) {\r\n Permissions = globalConfig.get('Permissions');\r\n}\r\n\r\n\r\nexport function enableForAudienceSOVFeatures(schema) {\r\n const schemaName = schema.name;\r\n const schemaNameWhiteList = ['Account', 'Campaign', 'AdGroup'];\r\n let propNameBlackList = [\r\n 'AudienceAuctionWonPercent',\r\n 'AudienceTopISLostToBudgetPercent',\r\n 'AudienceTopISLostToRankPercent',\r\n 'RelativeCTR',\r\n ];\r\n\r\n if (Permissions.IsAudienceSOVEnabled && _.contains(schemaNameWhiteList, schemaName)) {\r\n if (schemaName === 'Account') {\r\n propNameBlackList = [\r\n 'RelativeCTR',\r\n ];\r\n } else {\r\n propNameBlackList = [];\r\n }\r\n }\r\n\r\n const performanceMetrics = putil.get(schema, 'properties.PerformanceMetrics');\r\n const performanceMetricsProperties = putil.get(performanceMetrics, 'schema.properties');\r\n const audienceSOVMetrics = [\r\n 'AudienceAuctionWonPercent',\r\n 'AudienceTopISLostToBudgetPercent',\r\n 'AudienceTopISLostToRankPercent',\r\n 'RelativeCTR',\r\n ];\r\n\r\n if (performanceMetricsProperties) {\r\n // eslint-disable-next-line arrow-body-style\r\n const columnsToAdd = _.filter(audienceSOVMetrics, (audienceSOVMetric) => {\r\n return putil.get(performanceMetricsProperties, audienceSOVMetric) &&\r\n _.contains(schemaNameWhiteList, schemaName) &&\r\n !_.contains(propNameBlackList, audienceSOVMetric);\r\n });\r\n\r\n if (_.isArray(performanceMetrics.filterable)) {\r\n performanceMetrics.filterable = _.chain(performanceMetrics.filterable)\r\n .union(columnsToAdd)\r\n .value();\r\n } else {\r\n _.each(audienceSOVMetrics, (audienceSOVMetric) => {\r\n if (_.contains(columnsToAdd, audienceSOVMetric)) {\r\n // eslint-disable-next-line no-param-reassign\r\n schema.properties.PerformanceMetrics.schema.properties[audienceSOVMetric].filterable =\r\n true;\r\n }\r\n });\r\n }\r\n }\r\n\r\n return schema;\r\n}\r\n","import _, { each } from 'underscore';\r\nimport * as putil from '@bingads-webui-universal/primitive-utilities';\r\nimport { partialConversionPairs } from '@bingads-webui-campaign/column-conversions';\r\nimport { initialize as initializeSOV, updateEntitySchemaForSOV } from './update-entity-schema-for-sov';\r\nimport { initialize as initializeCustomColumn, updateEntitySchemaForCustomColumn } from './update-entity-schema-for-custom-column';\r\nimport { initialize as initializeAveragePosition, updateEntitySchemaForRemovedPerformanceMetrics } from './update-entity-schema-for-removed-performance-metrics';\r\nimport { initialize as initializeAudienceSOV, enableForAudienceSOVFeatures } from './update-entity-schema-for-audiencesov';\r\n\r\nexport {\r\n updateEntitySchemaForSOV,\r\n updateEntitySchemaForCustomColumn,\r\n updateEntitySchemaForRemovedPerformanceMetrics,\r\n enableForAudienceSOVFeatures,\r\n};\r\n\r\nlet globalConfig;\r\nlet Permissions = null;\r\n\r\nexport function initialize(options) {\r\n ({ globalConfig } = options);\r\n Permissions = globalConfig.get('Permissions');\r\n initializeSOV(options);\r\n initializeCustomColumn(options);\r\n initializeAveragePosition(options);\r\n initializeAudienceSOV(options);\r\n}\r\n\r\n// get whether feature is enabled by property name\r\nfunction getFeaturePermissionByPropertyName(propertyName) {\r\n switch (propertyName.toLowerCase()) {\r\n case 'campaigntype':\r\n return !Permissions.IsEnhancedShoppingCampaignAllowed &&\r\n !Permissions.IsDynamicSearchAdsV1Enabled &&\r\n !Permissions.IsAIMCampaignEnabled;\r\n\r\n case 'language':\r\n return Permissions.IsCampaignMultipleLanguageEnabled;\r\n\r\n case 'associationscount':\r\n case 'trackingstatus':\r\n return Permissions.IsAudienceGridNewColumnsSupported;\r\n\r\n case 'isexperiment':\r\n return Permissions.IsExperimentsEnabled;\r\n\r\n case 'adsbybing':\r\n return Permissions.IsAdsByBingEnabled;\r\n\r\n case 'allconv':\r\n return true; // [hagu1]todo: skip this method for 'allconv'\r\n\r\n case 'viewthrough':\r\n return Permissions.IsViewThroughConversionEnabled;\r\n\r\n case 'viewthroughrevenue':\r\n return Permissions.IsViewThroughConversionsRevenueEnabled;\r\n\r\n case 'avgpositiondeprecationphase1':\r\n return Permissions.IsAvgPositionDeprecationPhase1Enabled;\r\n\r\n case 'cpmbid':\r\n return Permissions.IsManualCpmEnabled;\r\n\r\n case 'cpvbid':\r\n return Permissions.IsVideoAdsForCampaignEnabled;\r\n\r\n case 'videoads':\r\n return Permissions.IsVideoAdsPerfMetricsEnabled;\r\n\r\n case 'appcampaign':\r\n return _.result(Permissions.dynamic, 'AppCampaignNewCampaignGridColumns');\r\n\r\n // Add BidStrategyName filter to campaign grid\r\n case 'bidstrategyname':\r\n return _.result(Permissions.dynamic, 'PortfolioBidStrategy');\r\n\r\n case 'cpsreporting':\r\n return _.result(Permissions.dynamic, 'CPSReporting');\r\n\r\n case 'installcolumns':\r\n return _.result(Permissions.dynamic, 'InstallPerformanceColumns');\r\n\r\n case 'campaignmigrationstatus':\r\n return true; // GA\r\n\r\n case 'conversionvaluerule':\r\n return _.result(Permissions.dynamic, 'ConvValueRules');\r\n\r\n default:\r\n return false;\r\n }\r\n}\r\n\r\nfunction removeEnumValuesFromProperty(schema, propertyName, removeEnumArray) {\r\n const schemaCopy = schema;\r\n if (!_.isEmpty(schema.properties[propertyName])) {\r\n schemaCopy.properties[propertyName].enum =\r\n _.difference(schema.properties[propertyName].enum, removeEnumArray);\r\n }\r\n\r\n return schemaCopy;\r\n}\r\n\r\nfunction updateEnumValueSets(schema) {\r\n const entityName = schema.name.toLowerCase();\r\n\r\n // Listing here all the enum valus to remove in different pilots (or always remove)\r\n const disabledTargets = [\r\n {\r\n disabled: !Permissions.IsDynamicSearchAdsV1Enabled && (entityName === 'ad'),\r\n property: 'Type',\r\n enumValueSets: ['DynamicSearch'], // this will not used in any where in filter options\r\n },\r\n {\r\n disabled: entityName === 'campaign',\r\n property: 'CampaignType',\r\n enumValueSets: ['DynamicSearchAds'], // DynamicSearchAds campaign type is deprecated, will not used in any where in filter options\r\n },\r\n {\r\n // Bug 1692445: BetaProd: [Campaigns] Some check box conditions\r\n // are not shown for filter of Campaign status/Campaign type/Bid strategy type on prod.\r\n // This should be controlled by pilot\r\n disabled: !Permissions.IsSmartCampaignPhase2Enabled,\r\n property: 'CampaignType',\r\n enumValueSets: ['Smart'],\r\n },\r\n {\r\n disabled: !(Permissions.dynamic && Permissions.dynamic.HotelCampaign),\r\n property: 'CampaignType',\r\n enumValueSets: ['Hotel'],\r\n },\r\n {\r\n disabled: !(Permissions.dynamic && Permissions.dynamic.PerformanceMaxCampaigns),\r\n property: 'CampaignType',\r\n enumValueSets: ['PerformanceMax'],\r\n },\r\n {\r\n disabled: entityName === 'campaign',\r\n property: 'Status',\r\n enumValueSets: ['InProgress'], // remove this when there are localized strings for this enum value\r\n },\r\n {\r\n disabled: true,\r\n property: 'Delivery',\r\n enumValueSets: ['CampaignInProgress'],\r\n },\r\n {\r\n disabled: true,\r\n property: 'DeliveryStatus',\r\n enumValueSets: ['CampaignInProgress'],\r\n },\r\n {\r\n disabled: true,\r\n property: 'Type',\r\n enumValueSets: ['HotelBookingGoal'],\r\n },\r\n {\r\n disabled: true,\r\n property: 'DisplayBiddingStrategyType',\r\n enumValueSets: ['ManualCpi'],\r\n },\r\n {\r\n disabled: true,\r\n property: 'DisplayBiddingStrategyType',\r\n enumValueSets: ['InheritFromParent', 'MaxRoas', 'TargetCostPerSale'],\r\n },\r\n {\r\n disabled: !(Permissions.IsCampaignTargetROASBidStrategyEnabled ||\r\n Permissions.IsNewCampaignTargetROASBidStrategyEnabled),\r\n property: 'DisplayBiddingStrategyType',\r\n enumValueSets: ['TargetRoas'],\r\n },\r\n {\r\n disabled: !Permissions.IsMaximizeConversionValueEnabled && !Permissions.IsSmartShoppingCampaignEnabled, // eslint-disable-line\r\n property: 'DisplayBiddingStrategyType',\r\n enumValueSets: ['MaxConversionValue'],\r\n },\r\n {\r\n disabled: !Permissions.IsTargetImpressionShareEnabled,\r\n property: 'DisplayBiddingStrategyType',\r\n enumValueSets: ['TargetImpressionShare'],\r\n },\r\n {\r\n disabled: !Permissions.IsCostPerSaleEnabled,\r\n property: 'DisplayBiddingStrategyType',\r\n enumValueSets: ['CostPerSale'],\r\n },\r\n {\r\n disabled: !(Permissions.dynamic && Permissions.dynamic.HotelCampaign),\r\n property: 'DisplayBiddingStrategyType',\r\n enumValueSets: ['PercentCpc', 'Commission'],\r\n },\r\n {\r\n disabled: !Permissions.IsAIMCampaignEnabled && (entityName === 'campaign'),\r\n property: 'CampaignType',\r\n enumValueSets: ['Audience'], // remove audience campaign from other entity\r\n },\r\n {\r\n disabled: !Permissions.IsAdsGlobalizationPhase1Enabled,\r\n property: 'Language',\r\n enumValueSets: ['Greek', 'Polish', 'Bulgarian', 'Croatian', 'Czech', 'Estonian', 'Hungarian', 'Latvian', 'Lithuanian', 'Maltese', 'Romanian', 'Slovak', 'Slovenian'],\r\n },\r\n {\r\n disabled: !Permissions.IsAdsGlobalizationPhase2Enabled,\r\n property: 'Language',\r\n enumValueSets: ['Turkish', 'Serbian', 'Bosnian', 'Albanian', 'Macedonian', 'Icelandic'],\r\n },\r\n {\r\n disabled: !Permissions.IsAdsGlobalizationPhase6Enabled,\r\n property: 'Language',\r\n enumValueSets: ['Hebrew', 'Arabic', 'Russian'],\r\n },\r\n {\r\n disabled: !Permissions.IsAdsGlobalizationPhase2JapanEnabled,\r\n property: 'Language',\r\n enumValueSets: ['Japanese'],\r\n },\r\n {\r\n disabled: !Permissions.IsAdsGlobalizationPhase9Enabled,\r\n property: 'Language',\r\n enumValueSets: ['Hindi', 'Malay', 'Thai', 'Indonesian', 'Tagalog'],\r\n },\r\n {\r\n disabled: !Permissions.IsAdsGlobalizationPhase9VIEnabled,\r\n property: 'Language',\r\n enumValueSets: ['Vietnamese'],\r\n },\r\n ];\r\n\r\n _.chain(disabledTargets)\r\n .filter({ disabled: true })\r\n .each((target) => {\r\n removeEnumValuesFromProperty(schema, target.property, target.enumValueSets);\r\n });\r\n}\r\n\r\n\r\nexport function enableForExperimentFeature(schema, scopeable) {\r\n const isInPilot = Permissions.IsExperimentsEnabled;\r\n const isAccountScope = !globalConfig.get('CurrentCampaign');\r\n const campaignProperty = schema.properties.Campaign;\r\n const isExperimentProperty = putil.get(campaignProperty, 'schema.properties.IsExperiment');\r\n\r\n if (isInPilot && (!scopeable || isAccountScope) && campaignProperty && isExperimentProperty) {\r\n if (campaignProperty.filterable) {\r\n campaignProperty.filterable = _.union(campaignProperty.filterable, ['IsExperiment']);\r\n }\r\n isExperimentProperty.filterable = true;\r\n }\r\n}\r\n\r\nfunction updateFilterableForExtraPerformanceMetrics(schema, metricNameArray, isEnabling) {\r\n const schemaCopy = schema;\r\n const performanceMetrics = putil.get(schemaCopy, 'properties.PerformanceMetrics');\r\n const performanceMetricsProperties = putil.get(performanceMetrics, 'schema.properties');\r\n if (performanceMetricsProperties) {\r\n if (_.isArray(performanceMetrics.filterable)) {\r\n performanceMetrics.filterable = isEnabling ?\r\n _.union(performanceMetrics.filterable, metricNameArray) :\r\n _.difference(performanceMetrics.filterable, metricNameArray);\r\n }\r\n _.each(performanceMetricsProperties, (prop, propName) => {\r\n if (_.contains(metricNameArray, propName)) {\r\n // eslint-disable-next-line no-param-reassign\r\n prop.filterable = isEnabling;\r\n }\r\n });\r\n }\r\n return schemaCopy;\r\n}\r\n\r\n// Add BidStrategyName filter to ad group grid and keyword grid\r\nfunction enableForPortfolioBidStrategyFeature(schema) {\r\n const isInPilot = _.result(Permissions.dynamic, 'PortfolioBidStrategy');\r\n const isAllowedEntity = _.contains(['AdGroup', 'Keyword'], schema.name);\r\n const campaignProperty = schema.properties.Campaign;\r\n const bidStrategyNameProperty = putil.get(campaignProperty, 'schema.properties.BidStrategyName');\r\n\r\n if (isInPilot && isAllowedEntity && campaignProperty && bidStrategyNameProperty) {\r\n if (campaignProperty.filterable) {\r\n campaignProperty.filterable = _.union(campaignProperty.filterable, ['BidStrategyName']);\r\n }\r\n bidStrategyNameProperty.filterable = true;\r\n }\r\n}\r\n\r\n\r\n// This is used in automated rule page. Add filter for \"Insights\".\r\n// Enum values should be different from those in performance/campaigns grid\r\nfunction enableAndUpdateFilterForAvailableInsightTypeIds(schema) {\r\n const isAllowedEntity = _.contains(['Campaign'], schema.name);\r\n const schemaCopy = schema;\r\n\r\n if (isAllowedEntity && schemaCopy.properties.AvailableInsightTypeIds) {\r\n schemaCopy.properties.AvailableInsightTypeIds = {\r\n $ref: 'Enum/FluctuationType',\r\n property: 'AvailableInsightTypeIds',\r\n type: 'string',\r\n filterable: true,\r\n enumType: 'FluctuationType',\r\n enum: ['Click', 'Impression', 'Spend'],\r\n chooseType: 'checkbox',\r\n operators: ['contains'],\r\n };\r\n }\r\n}\r\n\r\nexport function enableFilterForExtraPerformanceMetrics(schema, metricNameArray) {\r\n return updateFilterableForExtraPerformanceMetrics(schema, metricNameArray, true);\r\n}\r\n\r\nfunction enableFilterForPilotedPerformanceMetrics(schema, pilotName, metricNameArray) {\r\n const isInPilot = getFeaturePermissionByPropertyName(pilotName);\r\n return updateFilterableForExtraPerformanceMetrics(schema, metricNameArray, isInPilot);\r\n}\r\n\r\n\r\nfunction enableForViewThroughConversionsFeature(schema) {\r\n enableFilterForPilotedPerformanceMetrics(schema, 'viewthrough', ['ViewThroughConversions']);\r\n enableFilterForPilotedPerformanceMetrics(schema, 'viewthroughrevenue', [\r\n 'ViewThroughConversionsRevenue',\r\n 'ViewThroughConversionsCPA',\r\n 'ViewThroughConversionsReturnOnAdSpend',\r\n 'ViewThroughConversionsRate',\r\n ]);\r\n return schema;\r\n}\r\n\r\nfunction enableForConversionValueRuleFeature(schema) {\r\n enableFilterForPilotedPerformanceMetrics(\r\n schema, 'conversionvaluerule',\r\n ['AdvertiserReportedRevenueAdjustment', 'AllConversionAdvertiserReportedRevenueAdjustment', 'ViewThroughConversionsRevenueAdjustment']\r\n );\r\n return schema;\r\n}\r\n\r\nfunction updateEntitySchemaForMainGoalSelectionFeature(schema) {\r\n enableFilterForPilotedPerformanceMetrics(schema, 'allconv', [\r\n 'AllConversionCPA',\r\n 'AllConversions',\r\n 'AllConversionRate',\r\n 'AllConversionAdvertiserReportedRevenue',\r\n 'AllConversionRevenueOnAdSpend']);\r\n return schema;\r\n}\r\n\r\nfunction updateEntitySchemaForVideoAdsFeature(schema) {\r\n const pilotGridNameArray = ['Account', 'Campaign', 'AdGroup', 'Ad'];\r\n let pilotProperty = '';\r\n if (_.contains(pilotGridNameArray, schema.name)) { pilotProperty = 'videoads'; }\r\n\r\n enableFilterForPilotedPerformanceMetrics(schema, pilotProperty, [\r\n 'VideoViews',\r\n 'ViewThroughRate',\r\n 'AverageCPV',\r\n 'TotalWatchTimeInMS',\r\n 'AverageWatchTimePerImpression',\r\n 'AverageWatchTimePerVideoView',\r\n 'VideoViewsAt25Percent',\r\n 'VideoViewsAt50Percent',\r\n 'VideoViewsAt75Percent',\r\n 'CompletedVideoViews',\r\n 'VideoCompletionRate',\r\n ]);\r\n return schema;\r\n}\r\n\r\nfunction updateEntitySchemaForAppCampaign(schema) {\r\n const pilotGridNameArray = ['Campaign'];\r\n let pilotProperty = '';\r\n if (_.contains(pilotGridNameArray, schema.name)) { pilotProperty = 'appcampaign'; }\r\n\r\n enableFilterForPilotedPerformanceMetrics(schema, pilotProperty, [\r\n 'Downloads',\r\n 'FirstLaunches',\r\n 'Purchases',\r\n 'Subscriptions',\r\n 'PostClickDownloadRate',\r\n 'CostPerDownload',\r\n 'PostClickFirstLaunchRate',\r\n 'CostPerFirstLaunch',\r\n 'PostInstallPurchaseRate',\r\n 'CostPerPurchase',\r\n 'PostInstallSubscriptionRate',\r\n 'CostPerSubscription',\r\n ]);\r\n return schema;\r\n}\r\n\r\nfunction updateEntitySchemaForCPS(schema) {\r\n const pilotGridNameArray = ['Account', 'Campaign', 'AdGroup', 'ProductGroup'];\r\n let pilotProperty = '';\r\n if (_.contains(pilotGridNameArray, schema.name)) { pilotProperty = 'cpsreporting'; }\r\n\r\n enableFilterForPilotedPerformanceMetrics(schema, pilotProperty, [\r\n 'AverageCPS',\r\n 'SalesCount',\r\n ]);\r\n return schema;\r\n}\r\n\r\nfunction updateEntitySchemaForInstallColumns(schema) {\r\n const pilotGridNameArray = ['Account', 'Campaign', 'AdGroup', 'ProductGroup'];\r\n let pilotProperty = '';\r\n if (_.contains(pilotGridNameArray, schema.name)) { pilotProperty = 'installcolumns'; }\r\n enableFilterForPilotedPerformanceMetrics(schema, pilotProperty, [\r\n 'Installs',\r\n 'CostPerInstall',\r\n 'RevenuePerInstall',\r\n ]);\r\n return schema;\r\n}\r\n\r\nexport function enableForAvgPositionDeprecationPhase1Feature(schema) {\r\n enableFilterForPilotedPerformanceMetrics(schema, 'AvgPositionDeprecationPhase1', [\r\n 'AbsoluteTopImpressionRate',\r\n 'TopImpressionRate',\r\n ]);\r\n return schema;\r\n}\r\n\r\nfunction enableFilterForPilotProperties(schema, propertyNameArray) {\r\n const schemaCopy = schema;\r\n _.each(propertyNameArray, (propertyName) => {\r\n if (getFeaturePermissionByPropertyName(propertyName)\r\n && !_.isEmpty(schemaCopy.properties[propertyName])) {\r\n schemaCopy.properties[propertyName].filterable = true;\r\n }\r\n });\r\n\r\n return schema;\r\n}\r\n\r\n\r\nconst PARTIAL_CONVERSIONS_ENABLED_ENTITIES = [\r\n 'Campaign',\r\n 'AdGroup',\r\n 'Ad',\r\n 'Keyword',\r\n 'SearchTerm',\r\n 'CampaignCriterionGridData',\r\n 'FeedItem',\r\n 'DsaTarget',\r\n 'DsaSearchTerm',\r\n 'AdExtensionAssociation',\r\n 'PortfolioBidStrategy',\r\n 'BiddableCampaignCriterion',\r\n 'BiddableAdGroupCriterion',\r\n // Dimension Report\r\n 'DimensionLanding',\r\n 'DimensionAgeGender',\r\n 'DimensionSearchTerm',\r\n 'DimensionPublisher',\r\n 'DimensionCallForwarding',\r\n 'Time',\r\n 'KeywordLabelReport',\r\n 'AdLabelReport',\r\n 'AdGroupLabelReport',\r\n 'CampaignLabelReport',\r\n 'DimensionGeographic',\r\n 'DimensionLocation',\r\n 'DimensionShopping',\r\n // Audience Association Page\r\n 'AudienceCriterionWithBI',\r\n 'ProductOffer',\r\n // Conversion Goal Page\r\n 'Goal',\r\n // Shared Budget Page\r\n 'Budget',\r\n 'Account',\r\n 'ProductGroup',\r\n 'AssetWithBIData',\r\n];\r\n\r\nfunction updatePerformanceMetricsForPartialConversions(\r\n schema,\r\n useNewParameters\r\n) {\r\n const schemaCopy = schema;\r\n const performanceMetrics = putil.get(schemaCopy, 'properties.PerformanceMetrics');\r\n const performanceMetricsProperties = putil.get(performanceMetrics, 'schema.properties');\r\n if (performanceMetricsProperties) {\r\n const filterableArray = performanceMetrics.filterable;\r\n const hasFilterableArray = _.isArray(filterableArray);\r\n each(partialConversionPairs, (value, key) => {\r\n const propertyNameToDisable = useNewParameters ? key : value;\r\n const propertyNameToEnable = useNewParameters ? value : key;\r\n const propertyToDisable = performanceMetricsProperties[propertyNameToDisable];\r\n const propertyToEnable = performanceMetricsProperties[propertyNameToEnable];\r\n\r\n const isDisablePropFilterable = _.contains(filterableArray, propertyNameToDisable)\r\n || (propertyToDisable && propertyToDisable.filterable);\r\n const isEnablePropFilterable = _.contains(filterableArray, propertyNameToEnable)\r\n || (propertyToEnable && propertyToEnable.filterable);\r\n\r\n if (isDisablePropFilterable || isEnablePropFilterable) {\r\n if (hasFilterableArray) {\r\n performanceMetrics.filterable = _.chain(performanceMetrics.filterable)\r\n .difference([propertyNameToDisable])\r\n .union([propertyNameToEnable])\r\n .value();\r\n }\r\n if (propertyToDisable) {\r\n propertyToDisable.filterable = false;\r\n }\r\n if (propertyToEnable) {\r\n propertyToEnable.filterable = true;\r\n }\r\n }\r\n });\r\n }\r\n}\r\n// This function is a safe guard for grids in case\r\n// both old and new property were both enable by accident\r\nexport function updateEntitySchemaForPartialConversions(schema) {\r\n const isPartialConversionsEnbled = _.result(Permissions.dynamic, 'PartialConversions');\r\n const isColumnConversionEnabled = _.result(Permissions.dynamic, 'ColumnConversion');\r\n const enabledEntity = _.contains(PARTIAL_CONVERSIONS_ENABLED_ENTITIES, schema.name);\r\n const useNewParameters = isColumnConversionEnabled && enabledEntity && isPartialConversionsEnbled;\r\n\r\n updatePerformanceMetricsForPartialConversions(schema, useNewParameters);\r\n return schema;\r\n}\r\n\r\nexport function disableFilterForExtraPerformanceMetrics(schema, disabledPerformanceColumns) {\r\n return updateFilterableForExtraPerformanceMetrics(schema, disabledPerformanceColumns, false);\r\n}\r\n\r\nexport function updateEntitySchemaForPilotFeatures(originalSchema, isForVNext, filterExpressions = null, enableAvgPositionDeprecation) { // eslint-disable-line max-len\r\n const schema = putil.cloneDeep(originalSchema);\r\n\r\n // first enable properties (filter type) for features in pilot\r\n updateEntitySchemaForSOV(schema, false);\r\n if (isForVNext) {\r\n updateEntitySchemaForCustomColumn(schema, false, filterExpressions);\r\n enableAndUpdateFilterForAvailableInsightTypeIds(schema);\r\n }\r\n enableForAudienceSOVFeatures(schema);\r\n if (enableAvgPositionDeprecation) {\r\n updateEntitySchemaForRemovedPerformanceMetrics(schema, false, filterExpressions);\r\n }\r\n enableForExperimentFeature(schema);\r\n enableForPortfolioBidStrategyFeature(schema);\r\n enableForViewThroughConversionsFeature(schema);\r\n enableForConversionValueRuleFeature(schema);\r\n updateEntitySchemaForMainGoalSelectionFeature(schema);\r\n updateEntitySchemaForVideoAdsFeature(schema);\r\n updateEntitySchemaForAppCampaign(schema);\r\n updateEntitySchemaForCPS(schema);\r\n updateEntitySchemaForInstallColumns(schema);\r\n enableFilterForPilotProperties(schema, ['CampaignType', 'Language', 'AssociationsCount', 'TrackingStatus', 'IsExperiment', 'AdsByBing', 'CpmBid', 'CpvBid', 'BidStrategyName', 'CampaignMigrationStatus']);\r\n\r\n // enable enum values (filter value set) for features in pilot\r\n updateEnumValueSets(schema);\r\n\r\n return schema;\r\n}\r\n","import _ from 'underscore';\r\n\r\nlet i18n = null;\r\nexport function initialize(options) {\r\n ({\r\n i18n,\r\n } = options);\r\n}\r\n\r\n\r\nexport function appendPopProperties(entitySchema) {\r\n const popPrefix = 'PoP';\r\n const biPattern = /^(Phone)?PerformanceMetrics\\//;\r\n const biReplacePattern = /PerformanceMetrics\\//;\r\n const biChange = 'PerformanceMetricsChange/';\r\n const biChangePercent = 'PerformanceMetricsChangePercentage/';\r\n\r\n const biTitlePrefix = 'ColumnName_';\r\n const biTitleComparePostfix = '_Compare';\r\n const biTitleChangePostfix = '_Change';\r\n const biTitleChangePercentPostfix = '_Change_Percentage';\r\n const customColumnStr = 'CustomColumn';\r\n\r\n _.each(entitySchema.properties, (propObj) => {\r\n const { properties } = entitySchema;\r\n if (biPattern.test(propObj.property)) {\r\n const isCustomColumn = propObj.customColumn ||\r\n (propObj.originalProperty && propObj.originalProperty.indexOf(customColumnStr) === 0);\r\n const propName = isCustomColumn ? customColumnStr : propObj.property.split('/')[1];\r\n const propKey = isCustomColumn ? propObj.originalProperty : propObj.name;\r\n properties[`${popPrefix}${propKey}`] = _.defaults({\r\n name: `${popPrefix}${propObj.name}`,\r\n property: `${popPrefix}${propObj.property}`,\r\n title: biTitlePrefix + propName + biTitleComparePostfix,\r\n unlocalized: true,\r\n alias: null,\r\n originalProperty: `${popPrefix}${propObj.originalProperty}`,\r\n originalTitle: propObj.title,\r\n }, propObj);\r\n properties[`${popPrefix}${propKey}Change`] = _.defaults({\r\n name: `${popPrefix}${propObj.name}Change`,\r\n property: `${popPrefix}${propObj.property.replace(biReplacePattern, biChange)}`,\r\n title: biTitlePrefix + propName + biTitleChangePostfix,\r\n unlocalized: true,\r\n alias: null,\r\n originalProperty: `${popPrefix}${propObj.originalProperty}Change`,\r\n originalTitle: propObj.title,\r\n }, propObj);\r\n properties[`${popPrefix}${propKey}ChangePercent`] = _.defaults({\r\n name: `${popPrefix}${propObj.name}ChangePercent`,\r\n property: `${popPrefix}${propObj.property.replace(biReplacePattern, biChangePercent)}`,\r\n originalProperty: `${popPrefix}${propObj.originalProperty}ChangePercent`,\r\n title: biTitlePrefix + propName + biTitleChangePercentPostfix,\r\n type: 'number',\r\n isPercentValue: true,\r\n minimum: -9007199254740991, // Number.MIN_SAFE_INTEGER\r\n maximum: 9007199254740991, // Number.MAX_SAFE_INTEGER\r\n unlocalized: true,\r\n alias: null,\r\n originalTitle: propObj.title,\r\n }, propObj);\r\n }\r\n });\r\n}\r\n\r\nexport function appendPeriodOverPeriodProperties(entitySchema) {\r\n appendPopProperties(entitySchema);\r\n\r\n _.each(entitySchema.properties, (prop) => {\r\n const propCopy = prop;\r\n if (propCopy.unlocalized) {\r\n propCopy.title = propCopy.customColumn || (propCopy.originalProperty && propCopy.originalProperty.indexOf('CustomColumn') >= 0) ?\r\n i18n.getString(prop.title).replace('{0}', prop.originalTitle) :\r\n i18n.getString(prop.title);\r\n delete propCopy.unlocalized;\r\n delete propCopy.originalTitle;\r\n }\r\n });\r\n}\r\n","import _ from 'underscore';\r\n/**\r\n * Update schema to add CampaignType property that is used in waterfall filter for new UI\r\n *\r\n * @param {Object} entitySchema - the option to update the filter\r\n * @param {string} property - optional param to set field name of campaignType property\r\n * @param {array} campaignTypeNotSupported - specific unsupported campaign types in each filter.\r\n * @returns {void}\r\n*/\r\nexport function addCampaignTypePropertyForFilter({\r\n entitySchema, property = 'Campaign/CampaignType', permissions, campaignTypeNotSupported,\r\n}) {\r\n const isHotelCampaignEnabled = _.chain(permissions).result('dynamic').result('HotelCampaign').value();\r\n const isPerformanceMaxEnabled = _.chain(permissions).result('dynamic').result('PerformanceMaxCampaigns').value();\r\n const isLinkedInCampaignEnabled = _.chain(permissions).result('dynamic').result('LinkedInCampaigns').value();\r\n const IsRenameHotelToLodgingEnabled = _.chain(permissions).result('dynamic').result('IsRenameHotelToLodgingEnabled').value();\r\n const toExtended = {\r\n CampaignType: {\r\n filterable: true,\r\n name: 'CampaignType',\r\n originalProperty: 'CampaignType',\r\n property,\r\n type: 'string',\r\n enumType: 'CampaignType',\r\n enum: _.difference(_.compact([\r\n \"Enum.CampaignType'Default'\",\r\n \"Enum.CampaignType'Shopping'\",\r\n \"Enum.CampaignType'Audience'\",\r\n \"Enum.CampaignType'Smart'\",\r\n isHotelCampaignEnabled && \"Enum.CampaignType'Hotel'\",\r\n isPerformanceMaxEnabled && \"Enum.CampaignType'PerformanceMax'\",\r\n isLinkedInCampaignEnabled && \"Enum.CampaignType'LinkedIn'\",\r\n ]), campaignTypeNotSupported),\r\n enumValueMap: _.omit({\r\n \"Enum.CampaignType'Default'\": 'Default',\r\n \"Enum.CampaignType'Shopping'\": 'Shopping',\r\n \"Enum.CampaignType'Audience'\": 'Audience',\r\n \"Enum.CampaignType'Smart'\": 'Smart',\r\n ...isHotelCampaignEnabled ? { \"Enum.CampaignType'Hotel'\": IsRenameHotelToLodgingEnabled ? 'Lodging' : 'Hotel' } : {},\r\n ...isPerformanceMaxEnabled ? { \"Enum.CampaignType'PerformanceMax'\": 'PerformanceMax' } : {},\r\n ...isLinkedInCampaignEnabled ? { \"Enum.CampaignType'LinkedIn'\": 'LinkedIn' } : {},\r\n }, campaignTypeNotSupported),\r\n chooseType: 'checkbox',\r\n alias: {\r\n legacy: 'CampaignCampaignType',\r\n },\r\n },\r\n };\r\n _.extend(entitySchema.properties, toExtended);\r\n}\r\n\r\n","import _ from 'underscore';\r\n\r\nlet i18n = null;\r\n\r\nexport function initialize(options) {\r\n ({ i18n } = options);\r\n}\r\n\r\nexport function mapEnumValueForFilter(enumType, enumValue) {\r\n return `Enum.${enumType}'${enumValue}'`;\r\n}\r\n// this map convers all mapping for exsing delivery status enums\r\n// for each entity (adgroup/campaign/keyword/ad/else), it may only have several enum values\r\nconst DeliveryStatusToCategoryMap = {\r\n // Eligible\r\n Eligible: 0,\r\n New: 0,\r\n AdGroupAudienceAssociationPaused: 0,\r\n AdGroupAudienceAssociationExcluded: 0,\r\n AdGroupCriterionPaused: 0,\r\n AdGroupCriterionExcluded: 0,\r\n DSAAutoTargetProcessing: 0,\r\n\r\n // Eligible - Limited\r\n EditorialApprovedLimited: 1,\r\n EditorialApprovedLimitedAppealRejected: 1,\r\n LowSupply: 1,\r\n LowQuality: 1,\r\n NegativeKeywordConflicts: 1,\r\n PartialNegativeKeywordConflicts: 1,\r\n DSAAutoTargetNegativeTargetConflict: 1,\r\n DSAAutoTargetBelowFirstPageBid: 1,\r\n BidBelowFirstPageBid: 1,\r\n BudgetSuggestions: 1,\r\n AutoBiddingLimitedByNotEnoughRevenue: 1,\r\n AutoBiddingLimitedByNotEnoughConversions: 1,\r\n AutoBiddingLimitedInventoryLimit: 1,\r\n AutoBiddingLimitedMaxCPCRestriction: 1,\r\n AutoBiddingLimitedBudgetRestriction: 1,\r\n AutoBiddingLimitedUnAttainableTarget: 1,\r\n AutoBiddingPortfolioBidStrategyTrainingStatus: 1,\r\n AutoBiddingLearning: 1,\r\n CampaignInReview: 1,\r\n CPSInsufficientConversions: 1,\r\n CPSAttributionBroken: 1,\r\n\r\n // Critical issues\r\n CreditCardExpired: 2,\r\n IOExceeded: 2,\r\n PaymentInformationMissing: 2,\r\n InvalidFinancialStatusOther: 2,\r\n CampaignSuspended: 2,\r\n CampaignBudgetPaused: 2,\r\n DomainLanguageNotSupported: 2,\r\n AdGroupExpired: 2,\r\n AssetGroupExpired: 2,\r\n EditorialRejected: 2,\r\n EditorialAppealRejected: 2,\r\n CampaignDeleted: 2,\r\n StoreIdNotAssociated: 2,\r\n ShoppingCampaignStoreNotFound: 2,\r\n ShoppingCampaignNoOffersPresent: 2,\r\n AdGroupTargetingTooNarrow: 2,\r\n\r\n // Not Eligible\r\n CampaignInProgress: 3,\r\n CampaignUserPaused: 3,\r\n AssetGroupUserPaused: 3,\r\n AdGroupUserPaused: 3,\r\n AdGroupDraft: 3,\r\n AdUserPaused: 3,\r\n EditorialPending: 3,\r\n AdGroupPrivacyPending: 3,\r\n AssociationDeleted: 3,\r\n KeywordUserPaused: 3,\r\n EditorialUnderAppeal: 3,\r\n UrlInvalid: 3,\r\n ApplicationNotFound: 3,\r\n ApplicationDestinationUrlMismatch: 3,\r\n PendingMetadataSync: 3,\r\n ProductTargetUserPaused: 3,\r\n AdExtensionDeleted: 3,\r\n AdExtensionAssociationDeleted: 3,\r\n AdNotPresent: 3,\r\n AdNotActive: 3,\r\n NoEligibleAdGroups: 3,\r\n NoEligibleAds: 3,\r\n NoEligibleKeywords: 3,\r\n DSAAutoTargetUserPaused: 3,\r\n DSAAutoTargetNoMatchingLandingPage: 3,\r\n CPSNonRetailDomain: 3,\r\n AudienceTooNarrow: 3,\r\n LinkedInAccountServingHold: 3,\r\n LinkedInCompanyPagePaidMediaRequired: 3,\r\n};\r\n\r\n/**\r\n * Map delivery status input enum set to related category for the filter values to render\r\n *\r\n * @param {Array} enumSet - the enums that are valid for specific entity (like campaign)\r\n * @returns {Object} the configs(groupedItems, localized) needed by component/filter\r\n * to render in category type for delivery status.\r\n*/\r\nfunction getDeliveryStatusCategoryForFilter(enumSet) {\r\n const groupedItems = [];\r\n const enumSetToUse = _.uniq(enumSet);\r\n const localized = {};\r\n\r\n const categoryEnumValuesMap =\r\n _.groupBy(enumSetToUse, enumValue => DeliveryStatusToCategoryMap[enumValue]);\r\n\r\n _.each(categoryEnumValuesMap, (enumValues, category) => {\r\n const mappedValues = _.map(enumValues, value => ({\r\n value: mapEnumValueForFilter('DeliveryStatus', value),\r\n localized: i18n.getString(`Label_DeliveryStatus_${value}`),\r\n }));\r\n const categoryName = `FilterLocalization_DeliveryStatusCategories_${category}`;\r\n const itemLocalized = _.object(_.pluck(mappedValues, 'value'), _.pluck(mappedValues, 'localized'));\r\n\r\n groupedItems.push({\r\n items: _.pluck(mappedValues, 'value'),\r\n localized: itemLocalized,\r\n name: categoryName,\r\n });\r\n\r\n localized[categoryName] = i18n.getString(categoryName);\r\n _.extendOwn(localized, itemLocalized);\r\n });\r\n\r\n return {\r\n groupedItems,\r\n localized,\r\n };\r\n}\r\n\r\n/**\r\n * Update delivery status setting for render it in category type in filter\r\n *\r\n * @param {Object} entitySchema - the option to update for filter\r\n * @param {Array} enumSet - the enums that are valid for specific entity (like campaign)\r\n * @returns {void}\r\n*/\r\nexport function updateDeliveryStatusPropertyForFilter(entitySchema, enumSet) {\r\n const deliveryStatusProperty = entitySchema.properties.DeliveryStatus;\r\n\r\n // get configs needed for category type filter for delivery status\r\n // , using the allowed values for adgroup\r\n const { groupedItems, localized } = getDeliveryStatusCategoryForFilter(enumSet);\r\n\r\n // Delete enum properties to make delivery status not enum type anymore\r\n // (enum has more priority in component/filter than category)\r\n if (deliveryStatusProperty.enum && _.isArray(deliveryStatusProperty.enum)) {\r\n delete deliveryStatusProperty.enum;\r\n }\r\n _.extendOwn(deliveryStatusProperty, {\r\n groupedItems, localized, type: 'category', operators: ['in'],\r\n });\r\n return deliveryStatusProperty;\r\n}\r\n\r\n","import _ from 'underscore';\r\n\r\nexport function updateAdExtensionAssociationSourcePropertyForFilter({ entitySchema }) {\r\n const toExtended = {\r\n SourceType: {\r\n sortable: true,\r\n filterable: true,\r\n name: 'SourceType',\r\n originalProperty: 'SourceType',\r\n property: 'SourceType',\r\n type: 'string',\r\n enumType: 'AdExtensionAssociationSourceType',\r\n enum: [\r\n 'UserCreated',\r\n 'SystemGenerated',\r\n ],\r\n enumValueMap: {\r\n \"Enum.AdExtensionAssociationSourceType'UserCreated'\": 'UserCreated',\r\n \"Enum.AdExtensionAssociationSourceType'SystemGenerated'\": 'SystemGenerated',\r\n },\r\n chooseType: 'checkbox',\r\n alias: {\r\n legacy: 'SourceType',\r\n },\r\n },\r\n };\r\n\r\n _.extend(entitySchema.properties, toExtended);\r\n}\r\n\r\n","import _ from 'underscore';\r\nimport { LabelsDataSource } from '@bingads-webui-campaign/labels';\r\nimport labelNameTemplate from '../shared/label-name-template.pug';\r\n\r\nlet i18n = null;\r\nlet schemaI18nCampaign = null;\r\nlet cacheService = null;\r\nlet dataContextManager = null;\r\nlet jsdata = null;\r\nlet edm = null;\r\nlet scope = null;\r\n\r\nexport function initialize(options) {\r\n ({\r\n i18n,\r\n schemaI18nCampaign,\r\n cacheService,\r\n dataContextManager,\r\n jsdata,\r\n edm,\r\n scope,\r\n } = options);\r\n}\r\n\r\nfunction getLabel(value, customerLevelLabelEnabled) {\r\n const newValue = JSON.parse(value);\r\n return {\r\n Id: newValue.Id ? newValue.Id : value,\r\n Scope: customerLevelLabelEnabled && newValue.Scope ? newValue.Scope : undefined,\r\n };\r\n}\r\n\r\nfunction wrapFilterExpression(filterExpression, secondLogic) {\r\n const fieldPrefix = 'd:';\r\n return `Labels/${secondLogic}(${fieldPrefix}${filterExpression})`;\r\n}\r\n\r\nfunction buildLabelFilter(value, operator, secondLogic, wrapFilter, customerLevelLabelEnabled) {\r\n const label = getLabel(value, customerLevelLabelEnabled);\r\n const fieldId = 'd/Id';\r\n let secondaryOperator = 'and';\r\n if (operator === 'ne') {\r\n secondaryOperator = 'or';\r\n }\r\n\r\n let filter = `${fieldId} ${operator} ${label.Id}`;\r\n if (label.Scope) {\r\n const fieldScope = 'd/Scope';\r\n filter += ` ${secondaryOperator} ${fieldScope} ${operator} Enum.EntityScope'${label.Scope}'`;\r\n }\r\n\r\n if (wrapFilter) {\r\n filter = wrapFilterExpression(filter, secondLogic);\r\n }\r\n\r\n return filter;\r\n}\r\n\r\nfunction lambdaConvertForLabels(logic, secondLogic, operator, customerLevelLabelEnabled) {\r\n return (values) => {\r\n let url = '';\r\n const wrapInnerFilter = !(logic === 'or' && !customerLevelLabelEnabled);\r\n _.each(values, (value, index) => {\r\n if (index > 0) {\r\n url += ` ${logic} `;\r\n }\r\n url +=\r\n buildLabelFilter(value, operator, secondLogic, wrapInnerFilter, customerLevelLabelEnabled);\r\n });\r\n if (!wrapInnerFilter) {\r\n url = wrapFilterExpression(url, secondLogic);\r\n }\r\n if (logic === 'or') {\r\n url = `(${url})`;\r\n }\r\n return url;\r\n };\r\n}\r\n\r\nexport function updateEntitySchemaForLabels(entitySchema, customerLevelLabelEnabled = false) {\r\n const entitySchemaCopy = entitySchema;\r\n entitySchemaCopy.properties.Labels = {\r\n property: 'Labels',\r\n name: schemaI18nCampaign.property('Campaign', 'Labels'),\r\n title: schemaI18nCampaign.property('Campaign', 'Labels'),\r\n operatorDisplayNameMap: {\r\n containsall: i18n.getString('FilterOperator_ContainsAll'),\r\n containsany: i18n.getString('FilterOperator_ContainsAny'),\r\n containsnone: i18n.getString('FilterOperator_ContainsNone'),\r\n },\r\n operators: ['containsall', 'containsany', 'containsnone'],\r\n type: 'id',\r\n addtionalParams: {\r\n dataSource: new LabelsDataSource({\r\n cacheService,\r\n dataContextManager,\r\n jsdata,\r\n edm,\r\n scope,\r\n customerLevelLabelEnabled,\r\n }),\r\n templates: customerLevelLabelEnabled ? {\r\n nameTemplate: labelNameTemplate,\r\n } : undefined,\r\n },\r\n filterable: true,\r\n };\r\n return entitySchemaCopy;\r\n}\r\n\r\nexport function updateOdataOptionsForLabels(options, customerLevelLabelEnabled = false) {\r\n if (options) {\r\n const optionsCopy = options || { custom: {} };\r\n\r\n _.extendOwn(optionsCopy.custom, {\r\n Labels: {\r\n containsall: lambdaConvertForLabels('and', 'any', 'eq', customerLevelLabelEnabled),\r\n containsany: lambdaConvertForLabels('or', 'any', 'eq', customerLevelLabelEnabled),\r\n containsnone: lambdaConvertForLabels('and', 'all', 'ne', customerLevelLabelEnabled),\r\n },\r\n });\r\n return optionsCopy;\r\n }\r\n return options;\r\n}\r\n","import _ from 'underscore';\r\n\r\nlet i18n = null;\r\n\r\nexport function initialize(options) {\r\n ({ i18n } = options);\r\n}\r\n\r\n/**\r\n * Update delivery status setting for render it in category type in filter\r\n *\r\n * @param {Object} entitySchema - the option to update for filter\r\n * @returns {void}\r\n*/\r\nexport function updateAuctionInsightPropertyForFilter(entitySchema) {\r\n const hasAuctionInsightOption = _.find(entitySchema.properties, prop => prop.name === 'HasAuctionInsight');\r\n\r\n _.extend(hasAuctionInsightOption, {\r\n operatorDisplayNameMap: { eq: i18n.getString('FilterLocalization_FilterOperator_MatchesAny_Equal') },\r\n localized: {\r\n true: i18n.getString('FilterLocalization_BooleanFilter_Available_1'),\r\n false: i18n.getString('FilterLocalization_BooleanFilter_Available_0'),\r\n },\r\n chooseType: 'select',\r\n });\r\n}\r\n\r\n","import _ from 'underscore';\r\n\r\nlet Permissions = null;\r\n\r\nexport function initialize(options) {\r\n Permissions = options.globalConfig.get('Permissions');\r\n}\r\n\r\nexport function updateOdataOptionsForExperiment(options) {\r\n const isInPilot = _.result(Permissions, 'IsExperimentsEnabled');\r\n\r\n if (isInPilot && options) {\r\n // eslint-disable-next-line no-param-reassign\r\n options.custom = options.custom || {};\r\n\r\n _.extendOwn(options.custom, {\r\n 'Campaign/IsExperiment': {\r\n eq: (val) => {\r\n const operator = val ? 'gt' : 'le';\r\n\r\n return `Campaign/ExperimentId ${operator} 0`;\r\n },\r\n },\r\n });\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\nlet i18n = null;\r\n\r\nexport function initialize(options) {\r\n ({ i18n } = options);\r\n}\r\n\r\n/**\r\n * Update ads by bing to show the expected predicate and choices in the filter\r\n *\r\n * @param {Object} entitySchema - the option to update the filter\r\n * @returns {void}\r\n*/\r\nexport function updateAdsByBingPropertyForFilter(entitySchema) {\r\n const hasAdsByBingOption = _.find(entitySchema.properties, prop => prop.name === 'AdsByBing');\r\n\r\n _.extend(hasAdsByBingOption, {\r\n operatorDisplayNameMap: { eq: i18n.getString('FilterLocalization_FilterOperator_Equal') },\r\n localized: {\r\n true: i18n.getString('Filter_BooleanFilter_Yes'),\r\n false: i18n.getString('Filter_BooleanFilter_No'),\r\n },\r\n chooseType: 'select',\r\n });\r\n}\r\n\r\n","import _ from 'underscore';\r\n\r\nconst operators = ['eq', 'neq', 'gt', 'gte', 'lt', 'lte'];\r\n\r\n// For those columns which UI use its mutiplied value as display value,\r\n// we need to restore the value for MT to filter.\r\nexport function updateOdataOptionsForMultiplied(options) {\r\n const optionsCopy = options || { custom: {} };\r\n\r\n _.extendOwn(optionsCopy.custom, {\r\n // Value stored as millisecond in MT but displayed as second in UI.\r\n // We need to mutiply it by 1000 to make sure MT gets the correct value.\r\n 'PerformanceMetrics/TotalWatchTimeInMS': _.object(\r\n operators,\r\n operators.map(op => val => `PerformanceMetrics/TotalWatchTimeInMS ${op} ${val * 1000}`)\r\n ),\r\n });\r\n\r\n return optionsCopy;\r\n}\r\n","import { updateEntitySchemaForLabels, updateOdataOptionsForLabels, initialize as initializeLabels } from '../util/update-label-property-for-filter';\r\nimport { initialize as initializeDeliveryStatus } from '../util/update-delivery-status-property-for-filter';\r\nimport { initialize as initializePop, appendPeriodOverPeriodProperties } from '../util/update-pop-property-for-filter';\r\nimport { initialize as initializeAuctionInsight } from '../util/update-auction-insight-property-for-filter';\r\nimport { initialize as initializeExperiment, updateOdataOptionsForExperiment } from '../util/update-experiment-property-for-filter';\r\nimport { initialize as initializeAdsByBing } from '../util/update-adsbybing-property-for-filter';\r\nimport { updateOdataOptionsForMultiplied } from '../util/update-mutiplied-property-for-filter';\r\n\r\nexport class BaseSchemaProcessor {\r\n constructor(options) {\r\n initializeDeliveryStatus(options);\r\n initializeLabels(options);\r\n initializePop(options);\r\n initializeAuctionInsight(options);\r\n initializeExperiment(options);\r\n initializeAdsByBing(options);\r\n\r\n this.i18n = options.i18n;\r\n this.Permissions = options.globalConfig.get('Permissions');\r\n this.isForVNext = options.isForVNext;\r\n this.passedInI18n = options.passedInI18n;\r\n this.isAccountLabelsEnabled =\r\n this.Permissions && this.Permissions.IsAccountLabelsEnabled;\r\n }\r\n\r\n updateOdataOptions(odataOptions) {\r\n // For labels, as it is lambda expression, it need specific mapping from value to odata url\r\n updateOdataOptionsForLabels(odataOptions, this.isAccountLabelsEnabled);\r\n updateOdataOptionsForExperiment(odataOptions);\r\n updateOdataOptionsForMultiplied(odataOptions);\r\n\r\n return odataOptions;\r\n }\r\n\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n updateEntitySchemaForLabels(entitySchema, this.isAccountLabelsEnabled);\r\n appendPeriodOverPeriodProperties(entitySchema);\r\n return entitySchema;\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\nexport function lambdaConvertForArrayTypes(logic, secondLogic, operator, name, type) {\r\n return (values) => {\r\n const fieldId = 'd:d';\r\n let url = '';\r\n\r\n _.each(values, (value, index) => {\r\n if (index > 0) {\r\n url += ` ${logic} `;\r\n }\r\n url += `${name}/${secondLogic}(${fieldId} ${operator} Enum.${type}'${value}')`;\r\n });\r\n return url;\r\n };\r\n}\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport { lambdaConvertForArrayTypes } from './update-odata-options-for-array-type';\r\n\r\nlet i18n = null;\r\nlet schemaI18nCampaign = null;\r\nlet languageI18n = null;\r\nlet s$AdGroup = null;\r\nlet globalConfig = null;\r\n\r\nfunction getLanguagesItems() {\r\n let languages = _.without(s$AdGroup.properties.Language.enum, 'All', 'None');\r\n const Permissions = globalConfig.get('Permissions');\r\n\r\n languages.unshift('All'); // Make all language into header of array\r\n\r\n if (!Permissions.IsSimplifiedChineseLanguageEnabledInMultipleLanguage) {\r\n languages = _.without(languages, 'SimplifiedChinese');\r\n }\r\n\r\n if (!Permissions.IsAdsGlobalizationPhase1Enabled) {\r\n languages = _.without(languages, 'Greek', 'Polish', 'Bulgarian', 'Croatian', 'Czech', 'Estonian', 'Hungarian', 'Latvian', 'Lithuanian', 'Maltese', 'Romanian', 'Slovak', 'Slovenian');\r\n }\r\n\r\n if (!Permissions.IsAdsGlobalizationPhase2Enabled) {\r\n languages = _.without(languages, 'Turkish', 'Serbian', 'Bosnian', 'Albanian', 'Macedonian', 'Icelandic');\r\n }\r\n\r\n if (!Permissions.IsAdsGlobalizationPhase6Enabled) {\r\n languages = _.without(languages, 'Hebrew', 'Arabic', 'Russian');\r\n }\r\n\r\n if (!Permissions.IsAdsGlobalizationPhase2JapanEnabled) {\r\n languages = _.without(languages, 'Japanese');\r\n }\r\n\r\n if (!Permissions.IsAdsGlobalizationPhase9Enabled) {\r\n languages = _.without(languages, 'Hindi', 'Malay', 'Thai', 'Indonesian', 'Tagalog');\r\n }\r\n\r\n if (!Permissions.IsAdsGlobalizationPhase9VIEnabled) {\r\n languages = _.without(languages, 'Vietnamese');\r\n }\r\n\r\n if (Permissions.IsDomesticSimplifiedChineseEnabled) {\r\n languages = ['SimplifiedChinese'];\r\n }\r\n\r\n return _.map(languages, language => ({ Id: language, Name: languageI18n.getString(`Language_${language}`) }));\r\n}\r\n\r\nclass LanaguageDataSource {\r\n constructor() {\r\n this.languages = getLanguagesItems();\r\n }\r\n\r\n get(_viewFilter, searchFilter) {\r\n if (!searchFilter) {\r\n return Promise.resolve(this.languages);\r\n }\r\n\r\n const searchFilterLowerCase = searchFilter.toLowerCase();\r\n const languagesToReturn =\r\n _.select(\r\n this.languages,\r\n language => language.Name.toLowerCase().indexOf(searchFilterLowerCase) === 0\r\n );\r\n\r\n return Promise.resolve(languagesToReturn);\r\n }\r\n\r\n getByIds() {\r\n return Promise.resolve(this.languages);\r\n }\r\n}\r\n\r\nexport function initialize(options) {\r\n ({\r\n i18n,\r\n schemaI18nCampaign,\r\n languageI18n,\r\n s$AdGroup,\r\n globalConfig,\r\n } = options);\r\n}\r\n\r\nexport function updateEntitySchemaForCampaignLanguages(entitySchema) {\r\n const entitySchemaCopy = entitySchema;\r\n\r\n entitySchemaCopy.properties.Languages = {\r\n property: 'Languages',\r\n name: schemaI18nCampaign.property('Campaign', 'Languages'),\r\n title: schemaI18nCampaign.property('Campaign', 'Languages'),\r\n operatorDisplayNameMap: {\r\n containsall: i18n.getString('FilterOperator_ContainsAll'),\r\n containsany: i18n.getString('FilterOperator_ContainsAny'),\r\n containsnone: i18n.getString('FilterOperator_ContainsNone'),\r\n },\r\n operators: ['containsall', 'containsany', 'containsnone'],\r\n type: 'id',\r\n filterable: true,\r\n addtionalParams: {\r\n dataSource: new LanaguageDataSource(),\r\n selectorOptions: {\r\n keyMap: {\r\n // eslint-disable-next-line camelcase\r\n Selector_Filter_Placeholder: () => i18n.getString('LanguageLabelText'),\r\n },\r\n },\r\n },\r\n };\r\n return entitySchemaCopy;\r\n}\r\n\r\nexport function updateOdataOptionsForCampaignLanguages(options) {\r\n const optionsCopy = options || { custom: {} };\r\n\r\n _.extendOwn(optionsCopy.custom, {\r\n Languages: {\r\n containsall: lambdaConvertForArrayTypes('and', 'any', 'eq', 'Languages', 'Language'),\r\n containsany: lambdaConvertForArrayTypes('or', 'any', 'eq', 'Languages', 'Language'),\r\n containsnone: lambdaConvertForArrayTypes('and', 'all', 'ne', 'Languages', 'Language'),\r\n },\r\n });\r\n return optionsCopy;\r\n}\r\n","import _ from 'underscore';\r\n\r\nlet schemaI18nCampaign = null;\r\nlet i18n = null;\r\nexport function initialize(options) {\r\n ({\r\n schemaI18nCampaign,\r\n i18n,\r\n } = options);\r\n}\r\n\r\nexport function lambdaConvertForAvailableInsightTypeIds() {\r\n return (values) => {\r\n let url = '';\r\n\r\n _.each(values, (value, index) => {\r\n if (index > 0) {\r\n url += ' or ';\r\n }\r\n url += `d eq ${value}`;\r\n });\r\n url = `AvailableInsightTypeIds/any(d:${url})`;\r\n return url;\r\n };\r\n}\r\n\r\nexport const baseEntitySchemaForAvailableInsightTypeIds = {\r\n property: 'AvailableInsightTypeIds',\r\n type: 'string',\r\n filterable: true,\r\n enumType: 'FluctuationType',\r\n enum: [\r\n \"Enum.FluctuationType'Click'\",\r\n \"Enum.FluctuationType'Impression'\",\r\n \"Enum.FluctuationType'Spend'\",\r\n \"Enum.FluctuationType'Conversion'\",\r\n ],\r\n enumValueMap: {\r\n \"Enum.FluctuationType'Click'\": 'Click',\r\n \"Enum.FluctuationType'Impression'\": 'Impression',\r\n \"Enum.FluctuationType'Spend'\": 'Spend',\r\n \"Enum.FluctuationType'Conversion'\": 'Conversion',\r\n },\r\n chooseType: 'checkbox',\r\n operators: ['contains'],\r\n};\r\n\r\nexport function updateEntitySchemaForAvailableInsightTypeIds(entitySchema) {\r\n const entitySchemaCopy = entitySchema;\r\n entitySchemaCopy.properties.AvailableInsightTypeIds = {\r\n ...baseEntitySchemaForAvailableInsightTypeIds,\r\n name: schemaI18nCampaign.property('Campaign', 'AvailableInsightTypeIds'),\r\n title: schemaI18nCampaign.property('Campaign', 'AvailableInsightTypeIds'),\r\n localized: {\r\n \"Enum.FluctuationType'Click'\": schemaI18nCampaign.enum('FluctuationType', 'Click'),\r\n \"Enum.FluctuationType'Impression'\": schemaI18nCampaign.enum('FluctuationType', 'Impression'),\r\n \"Enum.FluctuationType'Spend'\": schemaI18nCampaign.enum('FluctuationType', 'Spend'),\r\n \"Enum.FluctuationType'Conversion'\": i18n.getString(_TL_('Conversions')),\r\n },\r\n };\r\n return entitySchemaCopy;\r\n}\r\n\r\nexport function updateOdataOptionsForAvailableInsightTypeIds(options) {\r\n if (options) {\r\n const optionsCopy = options;\r\n\r\n _.extendOwn(optionsCopy.custom, {\r\n AvailableInsightTypeIds: {\r\n contains: lambdaConvertForAvailableInsightTypeIds(),\r\n },\r\n });\r\n return optionsCopy;\r\n }\r\n return options;\r\n}\r\n","import _ from 'underscore';\r\n\r\n\r\n/**\r\n * Update status property for filter\r\n *\r\n * @param {Object} entitySchema - the option to update for filter\r\n * @returns {void}\r\n*/\r\nexport function updateStatusPropertyForFilter(entitySchema) {\r\n const statusProperty = entitySchema.properties.Status;\r\n let deleteIndex = -1;\r\n\r\n if (statusProperty && _.isArray(statusProperty.enum)) {\r\n _.each(statusProperty.enum, (value, index) => {\r\n if (value.indexOf('Delete') > -1) {\r\n deleteIndex = index;\r\n }\r\n });\r\n if (deleteIndex > 0) {\r\n statusProperty.enum.splice(deleteIndex, 1);\r\n }\r\n }\r\n return statusProperty;\r\n}\r\n\r\n","import _ from 'underscore';\r\n\r\nimport { BaseSchemaProcessor } from './base-schema-processor';\r\nimport { updateDeliveryStatusPropertyForFilter } from '../util/update-delivery-status-property-for-filter';\r\nimport { updateAuctionInsightPropertyForFilter } from '../util/update-auction-insight-property-for-filter';\r\nimport { initialize as initializeCampaignLanguages, updateEntitySchemaForCampaignLanguages, updateOdataOptionsForCampaignLanguages } from '../util/update-campaign-languages-property-for-filter';\r\nimport { initialize as initializeAvailableInsightTypeIds, updateEntitySchemaForAvailableInsightTypeIds, updateOdataOptionsForAvailableInsightTypeIds } from '../util/update-available-insight-type-ids-property-for-filter';\r\nimport { updateStatusPropertyForFilter } from '../util/update-status-property-for-filter';\r\n\r\nexport class CampaignSchemaProcessor extends BaseSchemaProcessor {\r\n /**\r\n * @param {Object} options - The options object that is used to configure schema processor\r\n * @param {Object} options.i18n - Legacy global i18n\r\n * @param {Object} options.schemaI18nCampaign - Campaign schema i18n\r\n * @param {Object} options.languageI18n - Multi language selector i18n\r\n * @param {Object} options.s$AdGroup - Adgroup schema\r\n * @param {Object} options.globalConfig - Global app config\r\n */\r\n constructor(options) {\r\n initializeCampaignLanguages(options);\r\n initializeAvailableInsightTypeIds(options);\r\n super(options);\r\n this.newI18n = options.newI18n;\r\n this.isFromCampaignGrid = options.isFromCampaignGrid;\r\n }\r\n\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n const updatedSchema = super.updateEntitySchemaForFeatures(entitySchema);\r\n\r\n let deliveryStatusEnumSet = ['InvalidFinancialStatusOther',\r\n 'CampaignSuspended',\r\n 'CampaignBudgetPaused',\r\n 'CampaignUserPaused',\r\n 'Eligible',\r\n 'BudgetSuggestions',\r\n 'AutoBiddingLimitedByNotEnoughConversions',\r\n 'AutoBiddingLearning',\r\n 'NoEligibleAdGroups',\r\n 'CampaignInReview',\r\n 'CPSNonRetailDomain',\r\n 'CPSInsufficientConversions',\r\n 'CPSAttributionBroken',\r\n ];\r\n\r\n // should remove old pilot after new pilot enabled\r\n if (this.Permissions.IsCampaignTargetROASBidStrategyEnabled || this.Permissions.IsNewCampaignTargetROASBidStrategyEnabled) { // eslint-disable-line\r\n const idx = deliveryStatusEnumSet.indexOf('AutoBiddingLimitedByNotEnoughConversions');\r\n\r\n deliveryStatusEnumSet = [...deliveryStatusEnumSet.slice(0, idx), 'AutoBiddingLimitedByNotEnoughRevenue', ...deliveryStatusEnumSet.slice(idx)];\r\n }\r\n\r\n if (this.Permissions && this.Permissions.dynamic && this.Permissions.dynamic.AutoBiddingStrategies) {\r\n deliveryStatusEnumSet.splice(deliveryStatusEnumSet.indexOf('AutoBiddingLimitedByNotEnoughConversions') + 1, 0, 'AutoBiddingLimitedInventoryLimit', 'AutoBiddingLimitedMaxCPCRestriction', 'AutoBiddingLimitedBudgetRestriction', 'AutoBiddingLimitedUnAttainableTarget', 'AutoBiddingPortfolioBidStrategyTrainingStatus');\r\n }\r\n\r\n if (this.Permissions && this.Permissions.dynamic && this.Permissions.dynamic.LinkedInCampaigns) {\r\n deliveryStatusEnumSet = [...deliveryStatusEnumSet, 'AdGroupExpired', 'AudienceTooNarrow', 'LinkedInAccountServingHold', 'LinkedInCompanyPagePaidMediaRequired'];\r\n }\r\n\r\n updateStatusPropertyForFilter(entitySchema);\r\n updateDeliveryStatusPropertyForFilter(updatedSchema, deliveryStatusEnumSet);\r\n\r\n updateEntitySchemaForCampaignLanguages(updatedSchema);\r\n updateAuctionInsightPropertyForFilter(updatedSchema);\r\n\r\n // update campaign title to 'campaign name', status title to 'Campaign Status'\r\n // for campaign grid filter\r\n const nameOption = _.find(updatedSchema.properties, item => item.name === 'Name');\r\n\r\n nameOption.title = this.i18n.getString('FilterLocalization_DataAttribute_CampaignName');\r\n\r\n const campaignStatusOption = _.find(updatedSchema.properties, item => item.name === 'Status');\r\n\r\n campaignStatusOption.title = this.i18n.getString('FilterLocalization_DataAttribute_CampaignStatus');\r\n\r\n // update title for seasonality adjustment id.\r\n // Spatial case, localize as \"Seasonality adjustment name\"\r\n const SeasonalityAdjustment = _.find(updatedSchema.properties, item => item.name === 'SeasonalityAdjustmentId');\r\n const DataExclusion = _.find(updatedSchema.properties, item => item.name === 'DataExclusionId');\r\n\r\n if (this.newI18n) {\r\n SeasonalityAdjustment.title = this.newI18n.getString(_TL_('Seasonality adjustment name'));\r\n DataExclusion.title = this.newI18n.getString(_TL_('Data exclusion name'));\r\n }\r\n\r\n // if there is SeasonalityAdjustment, there must be DataExclusion\r\n /* istanbul ignore next */\r\n if (SeasonalityAdjustment) {\r\n if (this.isFromCampaignGrid) {\r\n SeasonalityAdjustment.filterable = true;\r\n DataExclusion.filterable = true;\r\n } else {\r\n SeasonalityAdjustment.filterable = false;\r\n DataExclusion.filterable = false;\r\n }\r\n }\r\n\r\n // update title for campaign id\r\n const idOption = _.find(updatedSchema.properties, item => item.name === 'Id');\r\n\r\n idOption.title = this.i18n.getString('FilterLocalization_DataAttribute_CampaignId');\r\n\r\n if (this.isForVNext) {\r\n // These properties are not supported by google.\r\n // For first iteration, we will drop their support.\r\n delete updatedSchema.properties.Languages;\r\n\r\n updateEntitySchemaForAvailableInsightTypeIds(updatedSchema);\r\n }\r\n\r\n if (this.Permissions.dynamic && (this.Permissions.dynamic.XandrVideoCampaigns || this.Permissions.dynamic.XandrDisplayAdsCampaigns)) {\r\n const biddingStrategyType = updatedSchema.properties.DisplayBiddingStrategyType;\r\n if (!biddingStrategyType.localized) {\r\n biddingStrategyType.localized = {};\r\n }\r\n\r\n biddingStrategyType.localized[\"Enum.BiddingStrategyType'ManualCpm'\"] = this.i18n.getString('BidStrategy_ManualCpm_ViewableCpm');\r\n\r\n if (this.Permissions.dynamic.XandrVideoCampaigns) {\r\n biddingStrategyType.localized[\"Enum.BiddingStrategyType'ManualCpv'\"] = this.i18n.getString('BidStrategy_ManualCpv_Cpcv');\r\n }\r\n }\r\n\r\n updatedSchema.properties.DisplayBiddingStrategyTargetCpa = {\r\n filterable: true,\r\n type: 'number',\r\n property: 'DisplayBiddingStrategyTargetCpa',\r\n };\r\n updatedSchema.properties.DisplayBiddingStrategyTargetRoas = {\r\n filterable: true,\r\n type: 'number',\r\n maximum: 10000000,\r\n property: 'DisplayBiddingStrategyTargetRoas',\r\n isPercentValue: true,\r\n };\r\n updatedSchema.properties.DisplayBiddingStrategyTargetImpressionShare = {\r\n filterable: true,\r\n type: 'number',\r\n isPercentValue: true,\r\n property: 'DisplayBiddingStrategyTargetImpressionShare',\r\n };\r\n if (this.Permissions.dynamic.AppAdsCampaignPhaseOne) {\r\n updatedSchema.properties.DisplayBiddingStrategyManualCpi = {\r\n filterable: true,\r\n type: 'number',\r\n property: 'DisplayBiddingStrategyManualCpi',\r\n };\r\n }\r\n if (this.Permissions.dynamic.UnifiedAppAds) {\r\n updatedSchema.properties.DisplayBiddingStrategyManualCpc = {\r\n filterable: true,\r\n type: 'number',\r\n property: 'DisplayBiddingStrategyManualCpc',\r\n };\r\n }\r\n\r\n // automated rule will not work if wrap below in if (isVNext)\r\n if (this.Permissions.IsPersonalizedOffersEnabled) {\r\n updatedSchema.properties.CampaignCashbackPercent = {\r\n filterable: true,\r\n type: 'number',\r\n minimum: 0,\r\n maximum: 50,\r\n property: 'CampaignCashback/Percent',\r\n required: true,\r\n };\r\n if (!(this.Permissions.IsPersonalizedOffersV2Enabled ||\r\n this.Permissions.IsPersonalizedOffersV3Enabled)) {\r\n updatedSchema.properties.CampaignCashbackMonthlyBudget = {\r\n filterable: true,\r\n type: 'number',\r\n property: 'CampaignCashback/MonthlyBudget',\r\n required: true,\r\n };\r\n }\r\n updatedSchema.properties.CampaignCashbackScope = {\r\n filterable: true,\r\n type: 'string',\r\n property: 'CampaignCashback/Scope',\r\n chooseType: 'checkbox',\r\n operators: ['eq'],\r\n enum: [\"Enum.CashbackScope'None'\", \"Enum.CashbackScope'Store'\", \"Enum.CashbackScope'Product'\"],\r\n enumValueMap: {\r\n \"Enum.CashbackScope'None'\": 'None',\r\n \"Enum.CashbackScope'Store'\": 'Store',\r\n \"Enum.CashbackScope'Product'\": 'Product',\r\n },\r\n required: true,\r\n };\r\n if (this.Permissions.IsPersonalizedOffersV3Enabled) {\r\n updatedSchema.properties.Coupon = {\r\n filterable: true,\r\n type: 'string',\r\n property: 'CampaignCashback/CouponsEnabled',\r\n chooseType: 'checkbox',\r\n operators: ['in'],\r\n enum: [\"Enum.CouponsEnabled'Enabled'\", \"Enum.CouponsEnabled'Disabled'\"],\r\n enumValueMap: {\r\n \"Enum.CouponsEnabled'Enabled'\": 'Enabled',\r\n \"Enum.CouponsEnabled'Disabled'\": 'Disabled',\r\n },\r\n required: true,\r\n };\r\n }\r\n }\r\n if (!this.Permissions.IsOptimizationScoreInCampaignsGridEnabled) {\r\n delete updatedSchema.properties.OptimizationScore;\r\n }\r\n\r\n if ((!this.Permissions || !this.Permissions.dynamic || !this.Permissions.dynamic.LinkedInCampaigns)\r\n && updatedSchema.properties.CampaignType) {\r\n const campaignType = updatedSchema.properties.CampaignType;\r\n\r\n campaignType.enum = _.without(campaignType.enum, \"Enum.CampaignType'LinkedIn'\");\r\n campaignType.enumValueMap = _.omit(campaignType.enumValueMap, \"Enum.CampaignType'LinkedIn'\");\r\n }\r\n\r\n const isCampaignLifetimeBudgetEnabled = this.Permissions && this.Permissions.dynamic\r\n && this.Permissions.dynamic.CampaignLifetimeBudget\r\n && !this.Permissions.dynamic.MaeLifetimeBudgetExclusion;\r\n\r\n if (isCampaignLifetimeBudgetEnabled) {\r\n updatedSchema.properties.LifetimeBudget =\r\n {\r\n title: this.i18n.getString('FilterLocalization_DataAttribute_CampaignLifetimeBudgetAmount'),\r\n property: 'Budget/LifetimeBudgetAmount',\r\n type: 'number',\r\n minimum: 0,\r\n filterable: true,\r\n };\r\n\r\n updatedSchema.properties.BudgetAmount.title = this.i18n.getString('FilterLocalization_DataAttribute_CampaignDailyBudgetAmount');\r\n }\r\n\r\n return updatedSchema;\r\n }\r\n\r\n updateOdataOptions(odataOptions) {\r\n super.updateOdataOptions(odataOptions);\r\n updateOdataOptionsForCampaignLanguages(odataOptions);\r\n updateOdataOptionsForAvailableInsightTypeIds(odataOptions);\r\n\r\n _.extendOwn(odataOptions.custom, {\r\n DeliveryStatus: {\r\n eq: (value) => {\r\n let url = `DeliveryStatus eq ${value}`;\r\n\r\n if (value === \"Enum.DeliveryStatus'Eligible'\") {\r\n url += ' or DeliveryStatus eq Enum.DeliveryStatus\\'InlineOpportunity\\'';\r\n }\r\n\r\n return url;\r\n },\r\n },\r\n IsExperiment: {\r\n eq: (val) => {\r\n const operator = val ? 'gt' : 'le';\r\n\r\n return `ExperimentId ${operator} 0`;\r\n },\r\n },\r\n 'CampaignCashback/Scope': {\r\n eq: (filterValues) => {\r\n const queryStr = _.map(filterValues, value => `CampaignCashback/Scope eq ${value}`).join(' or ');\r\n\r\n return `(${queryStr})`;\r\n },\r\n },\r\n });\r\n return odataOptions;\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { BaseSchemaProcessor } from './base-schema-processor';\r\nimport { mapEnumValueForFilter, updateDeliveryStatusPropertyForFilter } from '../util/update-delivery-status-property-for-filter';\r\nimport { updateAuctionInsightPropertyForFilter } from '../util/update-auction-insight-property-for-filter';\r\nimport { addCampaignTypePropertyForFilter } from '../util/update-campaign-type-property-for-filter';\r\nimport { updateStatusPropertyForFilter } from '../util/update-status-property-for-filter';\r\n\r\nexport class AdGroupSchemaProcessor extends BaseSchemaProcessor {\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n const updatedSchema = super.updateEntitySchemaForFeatures(entitySchema);\r\n // update campaign title to 'campaign name' for adgroup filter, also\r\n // update the name to 'campaign' to avoid conflict with name for adgroup\r\n const campaignNameProperty = updatedSchema.properties.CampaignName;\r\n\r\n campaignNameProperty.title = this.i18n.getString('FilterLocalization_DataAttribute_CampaignName');\r\n\r\n // update enum mapping for status\r\n const statusProperty = updatedSchema.properties.Status;\r\n\r\n const statusEnumSet = [\r\n 'CampaignUserPaused',\r\n 'CampaignBudgetPaused',\r\n 'CampaignBudgetUserPaused',\r\n 'Draft',\r\n 'Active',\r\n 'Paused',\r\n 'Expired'];\r\n statusProperty.enum = _.map(statusEnumSet, value => mapEnumValueForFilter('AdGroupStatus', value));\r\n\r\n // leave only SearchBid or CpcBid\r\n const {\r\n IsManualCpmEnabled,\r\n IsVideoAdsForCampaignEnabled,\r\n } = this.Permissions;\r\n const cpcbid = updatedSchema.properties.CpcBid;\r\n if (cpcbid) {\r\n cpcbid.filterable = false;\r\n }\r\n if (IsManualCpmEnabled || IsVideoAdsForCampaignEnabled) {\r\n const searchBid = updatedSchema.properties.SearchBid;\r\n searchBid.title = this.i18n.getString('AdGroupSummary_ColumnName_CpcBid');\r\n }\r\n if (!IsManualCpmEnabled) {\r\n const cpmbid = updatedSchema.properties.CpmBid;\r\n if (cpmbid) {\r\n cpmbid.filterable = false;\r\n }\r\n }\r\n if (!IsVideoAdsForCampaignEnabled && !(this.Permissions.dynamic && this.Permissions.dynamic.XandrVideoCampaigns)) {\r\n const cpvbid = updatedSchema.properties.CpvBid;\r\n if (cpvbid) {\r\n cpvbid.filterable = false;\r\n }\r\n }\r\n\r\n if (this.Permissions.dynamic && (this.Permissions.dynamic.XandrVideoCampaigns || this.Permissions.dynamic.XandrDisplayAdsCampaigns)) {\r\n const biddingStrategyType = updatedSchema.properties.DisplayBiddingStrategyType;\r\n if (!biddingStrategyType.localized) {\r\n biddingStrategyType.localized = {};\r\n }\r\n\r\n biddingStrategyType.localized[\"Enum.BiddingStrategyType'ManualCpm'\"] = this.i18n.getString('BidStrategy_ManualCpm_ViewableCpm');\r\n\r\n if (this.Permissions.dynamic.XandrVideoCampaigns) {\r\n biddingStrategyType.localized[\"Enum.BiddingStrategyType'ManualCpv'\"] = this.i18n.getString('BidStrategy_ManualCpv_Cpcv');\r\n }\r\n }\r\n\r\n // update adgroup title to 'ad group name'\r\n const adgroupNameProperty = updatedSchema.properties.Name;\r\n\r\n adgroupNameProperty.title = this.i18n.getString('FilterLocalization_DataAttribute_AdGroupName');\r\n\r\n const adgroupLanguageProperty = updatedSchema.properties.Language;\r\n\r\n if (adgroupLanguageProperty && adgroupLanguageProperty.filterable) {\r\n adgroupLanguageProperty.enum = _.without(adgroupLanguageProperty.enum, \"Enum.Language'All'\");\r\n const {\r\n IsSimplifiedChineseLanguageEnabledInMultipleLanguage,\r\n IsAdsGlobalizationPhase1Enabled,\r\n IsAdsGlobalizationPhase2Enabled,\r\n IsAdsGlobalizationPhase2JapanEnabled,\r\n IsAdsGlobalizationPhase6Enabled,\r\n IsAdsGlobalizationPhase9Enabled,\r\n IsAdsGlobalizationPhase9VIEnabled,\r\n } = this.Permissions;\r\n\r\n if (!IsSimplifiedChineseLanguageEnabledInMultipleLanguage) {\r\n adgroupLanguageProperty.enum = _.without(adgroupLanguageProperty.enum, \"Enum.Language'TraditionalChinese'\");\r\n }\r\n\r\n if (!IsAdsGlobalizationPhase1Enabled) {\r\n adgroupLanguageProperty.enum = _.without(\r\n adgroupLanguageProperty.enum,\r\n \"Enum.Language'Greek'\",\r\n \"Enum.Language'Polish'\",\r\n \"Enum.Language'Bulgarian'\",\r\n \"Enum.Language'Croatian'\",\r\n \"Enum.Language'Czech'\",\r\n \"Enum.Language'Estonian'\",\r\n \"Enum.Language'Hungarian'\",\r\n \"Enum.Language'Latvian'\",\r\n \"Enum.Language'Lithuanian'\",\r\n \"Enum.Language'Maltese'\",\r\n \"Enum.Language'Romanian'\",\r\n \"Enum.Language'Slovak'\",\r\n \"Enum.Language'Slovenian'\",\r\n \"Enum.Language'Turkish'\",\r\n \"Enum.Language'Serbian'\",\r\n \"Enum.Language'Bosnian'\",\r\n \"Enum.Language'Albanian'\",\r\n \"Enum.Language'Macedonian'\",\r\n \"Enum.Language'Icelandic'\"\r\n );\r\n }\r\n\r\n if (!IsAdsGlobalizationPhase2Enabled) {\r\n adgroupLanguageProperty.enum = _.without(\r\n adgroupLanguageProperty.enum,\r\n \"Enum.Language'Turkish'\",\r\n \"Enum.Language'Serbian'\",\r\n \"Enum.Language'Bosnian'\",\r\n \"Enum.Language'Albanian'\",\r\n \"Enum.Language'Macedonian'\",\r\n \"Enum.Language'Icelandic'\"\r\n );\r\n }\r\n\r\n if (!IsAdsGlobalizationPhase2JapanEnabled) {\r\n adgroupLanguageProperty.enum = _.without(\r\n adgroupLanguageProperty.enum,\r\n \"Enum.Language'Japanese'\"\r\n );\r\n }\r\n\r\n if (!IsAdsGlobalizationPhase6Enabled) {\r\n adgroupLanguageProperty.enum = _.without(\r\n adgroupLanguageProperty.enum,\r\n \"Enum.Language'Hebrew'\",\r\n \"Enum.Language'Arabic'\",\r\n \"Enum.Language'Russian'\"\r\n );\r\n }\r\n\r\n if (!IsAdsGlobalizationPhase9Enabled) {\r\n adgroupLanguageProperty.enum = _.without(\r\n adgroupLanguageProperty.enum,\r\n \"Enum.Language'Hindi'\",\r\n \"Enum.Language'Malay'\",\r\n \"Enum.Language'Thai'\",\r\n \"Enum.Language'Indonesian'\",\r\n \"Enum.Language'Tagalog'\"\r\n );\r\n }\r\n\r\n if (!IsAdsGlobalizationPhase9VIEnabled) {\r\n adgroupLanguageProperty.enum = _.without(\r\n adgroupLanguageProperty.enum,\r\n \"Enum.Language'Vietnamese'\"\r\n );\r\n }\r\n\r\n adgroupLanguageProperty.enum.unshift(null);\r\n adgroupLanguageProperty.localized = {\r\n null: this.i18n.getString('Language_Inherit'),\r\n };\r\n }\r\n\r\n const deliveryStatusEnumSet = [\r\n 'InvalidFinancialStatusOther',\r\n 'CampaignSuspended',\r\n 'CampaignBudgetPaused',\r\n 'CampaignUserPaused',\r\n 'Eligible',\r\n 'AdGroupExpired',\r\n 'AdGroupDraft',\r\n 'AdGroupUserPaused',\r\n 'AdGroupPrivacyPending',\r\n 'AdGroupTargetingTooNarrow',\r\n 'NoEligibleAds',\r\n 'NoEligibleKeywords',\r\n ];\r\n\r\n updateStatusPropertyForFilter(entitySchema);\r\n updateDeliveryStatusPropertyForFilter(entitySchema, deliveryStatusEnumSet);\r\n updateAuctionInsightPropertyForFilter(entitySchema);\r\n\r\n // make campaignstatus not show in filter drop down\r\n const campaignStatusProperty = updatedSchema.properties.CampaignStatus;\r\n\r\n if (campaignStatusProperty) {\r\n campaignStatusProperty.filterable = false;\r\n }\r\n\r\n if (this.isForVNext) {\r\n const campaignTypeNotSupported = [\"Enum.CampaignType'PerformanceMax'\"];\r\n addCampaignTypePropertyForFilter({\r\n entitySchema: updatedSchema, permissions: this.Permissions,\r\n });\r\n updatedSchema.properties.CampaignType.enum =\r\n _.difference(updatedSchema.properties.CampaignType.enum, campaignTypeNotSupported);\r\n // These properties are not supported by google.\r\n // For first iteration, we will drop their support.\r\n delete updatedSchema.properties.StartDate;\r\n delete updatedSchema.properties.EndDate;\r\n delete updatedSchema.properties.Language;\r\n }\r\n\r\n // automated rule will not work if wrap below in if (isVNext)\r\n if (this.Permissions.IsPersonalizedOffersEnabled) {\r\n updatedSchema.properties.AdGroupCashbackPercent = {\r\n filterable: true,\r\n type: 'number',\r\n minimum: 0,\r\n maximum: 50,\r\n property: 'AdGroupCashback/Percent',\r\n required: true,\r\n };\r\n updatedSchema.properties.AdGroupCashbackScope = {\r\n filterable: true,\r\n type: 'string',\r\n property: 'AdGroupCashback/Scope',\r\n chooseType: 'checkbox',\r\n operators: ['eq'],\r\n enum: [\"Enum.CashbackScope'None'\", \"Enum.CashbackScope'Store'\", \"Enum.CashbackScope'Product'\"],\r\n enumValueMap: {\r\n \"Enum.CashbackScope'None'\": 'None',\r\n \"Enum.CashbackScope'Store'\": 'Store',\r\n \"Enum.CashbackScope'Product'\": 'Product',\r\n },\r\n required: true,\r\n };\r\n if (this.Permissions.IsPersonalizedOffersV3Enabled) {\r\n updatedSchema.properties.Coupon = {\r\n filterable: true,\r\n type: 'string',\r\n property: 'AdGroupCashback/CouponsEnabled',\r\n chooseType: 'checkbox',\r\n operators: ['in'],\r\n enum: [\"Enum.CouponsEnabled'None'\", \"Enum.CouponsEnabled'Enabled'\", \"Enum.CouponsEnabled'Disabled'\"],\r\n enumValueMap: {\r\n \"Enum.CouponsEnabled'None'\": 'None',\r\n \"Enum.CouponsEnabled'Enabled'\": 'Enabled',\r\n \"Enum.CouponsEnabled'Disabled'\": 'Disabled',\r\n },\r\n required: true,\r\n };\r\n }\r\n }\r\n\r\n if (!this.Permissions.IsDSAMixedModeCampaignEnabled) {\r\n delete updatedSchema.properties.AdGroupType;\r\n } else {\r\n const adGroupTypeProperty = updatedSchema.properties.AdGroupType;\r\n\r\n adGroupTypeProperty.chooseType = 'checkbox';\r\n adGroupTypeProperty.operators = ['eq'];\r\n adGroupTypeProperty.enum = _.without(adGroupTypeProperty.enum, \"Enum.AdGroupType'Unknown'\", \"Enum.AdGroupType'HotelAds'\");\r\n adGroupTypeProperty.enum.push(null);\r\n adGroupTypeProperty.localized = {\r\n null: '-',\r\n };\r\n }\r\n\r\n return updatedSchema;\r\n }\r\n\r\n updateOdataOptions(odataOptions) {\r\n super.updateOdataOptions(odataOptions);\r\n\r\n _.extendOwn(odataOptions.custom, {\r\n AdGroupType: {\r\n eq: (filterValues) => {\r\n let queryStr = _.map(filterValues, value => `AdGroupType eq ${value}`).join(' or ');\r\n\r\n if (this.Permissions.dynamic.HotelCampaign && filterValues.includes(null)) {\r\n queryStr += \" or AdGroupType eq Enum.AdGroupType'HotelAds'\";\r\n }\r\n\r\n return `(${queryStr})`;\r\n },\r\n },\r\n 'AdGroupCashback/Scope': {\r\n eq: (filterValues) => {\r\n const queryStr = _.map(filterValues, value => `AdGroupCashback/Scope eq ${value}`).join(' or ');\r\n\r\n return `(${queryStr})`;\r\n },\r\n },\r\n });\r\n\r\n return odataOptions;\r\n }\r\n}\r\n","export function updateEntitySchemaForTrackingUrlTemplate(entitySchema) {\r\n const entitySchemaCopy = entitySchema;\r\n\r\n entitySchemaCopy.properties.TrackingUrlTemplate.operators\r\n = ['contains', 'doesnotcontain', 'startswith', 'eq'];\r\n\r\n return entitySchemaCopy;\r\n}\r\n","import _ from 'underscore';\r\n\r\nfunction lambdaConvertForFinals(property, contain) {\r\n return (values = '') => {\r\n const formalizedValues = values.replace(/'/g, '\\'\\'');\r\n if (contain) {\r\n return `${property}/any(d:contains(d,'${formalizedValues}'))`;\r\n }\r\n\r\n return `${property}/any(d:contains(d,'${formalizedValues}') eq false)`;\r\n };\r\n}\r\n\r\nexport function updateEntitySchemaForFinalUrls(entitySchema) {\r\n const entitySchemaCopy = entitySchema;\r\n\r\n entitySchemaCopy.properties.FinalUrls = {\r\n name: 'FinalUrls',\r\n property: 'FinalUrls',\r\n operators: ['contains', 'doesnotcontain'],\r\n type: 'string',\r\n filterable: true,\r\n };\r\n\r\n entitySchemaCopy.properties.MobileFinalUrls = {\r\n name: 'MobileFinalUrls',\r\n property: 'MobileFinalUrls',\r\n operators: ['contains', 'doesnotcontain'],\r\n type: 'string',\r\n filterable: true,\r\n };\r\n\r\n return entitySchemaCopy;\r\n}\r\n\r\nexport function updateOdataOptionsForFinalUrl(options) {\r\n const optionsCopy = options || { custom: {} };\r\n\r\n _.extendOwn(optionsCopy.custom, {\r\n MobileFinalUrls: {\r\n contains: lambdaConvertForFinals('MobileFinalUrls', true),\r\n doesnotcontain: lambdaConvertForFinals('MobileFinalUrls', false),\r\n },\r\n FinalUrls: {\r\n contains: lambdaConvertForFinals('FinalUrls', true),\r\n doesnotcontain: lambdaConvertForFinals('FinalUrls', false),\r\n },\r\n });\r\n return optionsCopy;\r\n}\r\n","export function updateEntitySchemaForFinalURLSuffix(entitySchema) {\r\n const entitySchemaCopy = entitySchema;\r\n\r\n entitySchemaCopy.properties.FinalUrlSuffix.operators\r\n = ['contains', 'doesnotcontain', 'startswith', 'eq'];\r\n\r\n return entitySchemaCopy;\r\n}\r\n","export function updateEditorialRejectionReasonForFilter({\r\n entitySchema, enableEditorialRejectionFilter, i18n,\r\n}) {\r\n // update editorial rejection reason filter property\r\n const editorialRejectionFlagId = entitySchema.properties.EditorialRejectionFlagId;\r\n const editorialRejectionDate = entitySchema.properties.EditorialRejectionDate;\r\n\r\n if (editorialRejectionFlagId) {\r\n editorialRejectionFlagId.filterable = enableEditorialRejectionFilter;\r\n editorialRejectionFlagId.title = i18n && i18n.getString('Schema_Ad_Property_EditorialRejectionFlagId');\r\n }\r\n if (editorialRejectionDate) {\r\n editorialRejectionDate.filterable = enableEditorialRejectionFilter;\r\n editorialRejectionDate.title = i18n && i18n.getString('Schema_Ad_Property_EditorialRejectionDate');\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\nlet i18n = null;\r\n\r\nexport function initialize(options) {\r\n i18n = options.passedInI18n;\r\n}\r\n\r\nexport function updateEntitySchemaForIsAppealPending(entitySchema) {\r\n _.extend(entitySchema.properties, {\r\n IsAppealPending: {\r\n name: 'IsAppealPending',\r\n localized: {\r\n true: i18n.getString('Is_Appeal_Pending_True'),\r\n false: i18n.getString('Is_Appeal_Pending_False'),\r\n },\r\n chooseType: 'select',\r\n filterable: true,\r\n property: 'IsAppealPending',\r\n type: 'boolean',\r\n title: i18n.getString('IsAppealPending'),\r\n },\r\n });\r\n\r\n return entitySchema;\r\n}\r\n","import _ from 'underscore';\r\nimport { BaseSchemaProcessor } from './base-schema-processor';\r\nimport { updateDeliveryStatusPropertyForFilter } from '../util/update-delivery-status-property-for-filter';\r\nimport { updateAuctionInsightPropertyForFilter } from '../util/update-auction-insight-property-for-filter';\r\nimport { updateEntitySchemaForTrackingUrlTemplate } from '../util/update-tracking-template-property-for-filter';\r\nimport { updateOdataOptionsForFinalUrl, updateEntitySchemaForFinalUrls } from '../util/update-final-url-property-for-filter';\r\nimport { updateEntitySchemaForFinalURLSuffix } from '../util/update-final-url-suffix-property-for-filter';\r\nimport { addCampaignTypePropertyForFilter } from '../util/update-campaign-type-property-for-filter';\r\nimport { updateEditorialRejectionReasonForFilter } from '../util/update-editorial-rejection-reason-for-filter';\r\nimport { initialize as initializeIsAppealPending, updateEntitySchemaForIsAppealPending } from '../util/update-is-appeal-pending-property-for-filter';\r\nimport { updateStatusPropertyForFilter } from '../util/update-status-property-for-filter';\r\n\r\nexport class KeywordSchemaProcessor extends BaseSchemaProcessor {\r\n constructor(options) {\r\n super(options);\r\n initializeIsAppealPending(options);\r\n\r\n this.enableEditorialRejectionFilter = options.enableEditorialRejectionFilter;\r\n }\r\n\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n const updatedSchema = super.updateEntitySchemaForFeatures(entitySchema);\r\n\r\n const campaignNameProperty = updatedSchema.properties.CampaignName;\r\n campaignNameProperty.title = this.i18n.getString('FilterLocalization_DataAttribute_CampaignName');\r\n\r\n const adgroupNameProperty = updatedSchema.properties.AdGroupName;\r\n adgroupNameProperty.title = this.i18n.getString('FilterLocalization_DataAttribute_AdGroupName');\r\n\r\n const deliveryStatusEnumSet = ['NegativeKeywordConflicts',\r\n 'PartialNegativeKeywordConflicts',\r\n 'EditorialApprovedLimited',\r\n 'LowSupply',\r\n 'LowQuality',\r\n 'BidBelowFirstPageBid',\r\n 'CampaignBudgetPaused',\r\n 'CampaignUserPaused',\r\n 'AdGroupExpired',\r\n 'EditorialRejected',\r\n 'CampaignSuspended',\r\n 'AdGroupDraft',\r\n 'EditorialUnderAppeal',\r\n 'EditorialPending',\r\n 'AdGroupUserPaused',\r\n 'InvalidFinancialStatusOther',\r\n 'Eligible',\r\n ];\r\n\r\n if (this.Permissions && this.Permissions.dynamic && this.Permissions.dynamic.AppealUpheld) {\r\n deliveryStatusEnumSet.splice(deliveryStatusEnumSet.indexOf('EditorialApprovedLimited') + 1, 0, 'EditorialApprovedLimitedAppealRejected');\r\n deliveryStatusEnumSet.splice(deliveryStatusEnumSet.indexOf('EditorialRejected') + 1, 0, 'EditorialAppealRejected');\r\n }\r\n\r\n updateStatusPropertyForFilter(entitySchema);\r\n\r\n updateDeliveryStatusPropertyForFilter(entitySchema, deliveryStatusEnumSet);\r\n\r\n updateAuctionInsightPropertyForFilter(entitySchema);\r\n\r\n updateEntitySchemaForFinalUrls(entitySchema);\r\n\r\n updateEntitySchemaForTrackingUrlTemplate(entitySchema);\r\n\r\n updateEntitySchemaForFinalURLSuffix(entitySchema);\r\n\r\n // make campaignstatus and adgroupproperty not show in filter drop down\r\n const campaignStatusProperty = updatedSchema.properties.CampaignStatus;\r\n const adgroupStatusProperty = updatedSchema.properties.AdGroupStatus;\r\n\r\n if (campaignStatusProperty) {\r\n campaignStatusProperty.filterable = false;\r\n }\r\n\r\n if (adgroupStatusProperty) {\r\n adgroupStatusProperty.filterable = false;\r\n }\r\n\r\n updateEditorialRejectionReasonForFilter({\r\n entitySchema: updatedSchema,\r\n enableEditorialRejectionFilter: this.enableEditorialRejectionFilter,\r\n i18n: this.passedInI18n,\r\n });\r\n\r\n if (!this.isForVNext) {\r\n if (updatedSchema.properties.EditorialStatus) {\r\n updatedSchema.properties.EditorialStatus.filterable = false;\r\n }\r\n }\r\n // only enable it on new ui\r\n if (this.isForVNext) {\r\n updateEntitySchemaForIsAppealPending(updatedSchema);\r\n }\r\n\r\n if (this.isForVNext) {\r\n const campaignTypeNotSupported = [\"Enum.CampaignType'PerformanceMax'\", \"Enum.CampaignType'LinkedIn'\"];\r\n addCampaignTypePropertyForFilter({\r\n entitySchema: updatedSchema, permissions: this.Permissions, campaignTypeNotSupported,\r\n });\r\n }\r\n\r\n const matchTypesToExclude = [\"Enum.MatchType'Content'\"];\r\n const isPredictiveTargetingEnabled = this.Permissions && this.Permissions.dynamic && this.Permissions.dynamic.RSABidStrategyAutoTargeting;\r\n const isPredictiveMatchingEnabled = this.Permissions && this.Permissions.dynamic && this.Permissions.dynamic.PredictiveMatching;\r\n if (!isPredictiveTargetingEnabled && !isPredictiveMatchingEnabled) {\r\n matchTypesToExclude.push(\"Enum.MatchType'Predictive'\");\r\n }\r\n\r\n updatedSchema.properties.MatchType.enum = _.without(updatedSchema.properties.MatchType.enum, ...matchTypesToExclude);\r\n\r\n return updatedSchema;\r\n }\r\n\r\n updateOdataOptions(odataOptions) {\r\n super.updateOdataOptions(odataOptions);\r\n updateOdataOptionsForFinalUrl(odataOptions);\r\n\r\n return odataOptions;\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\nlet i18n = null;\r\n\r\n// The filter will be like this:\r\n// $filter=contains(HeadlinesAssetId, '12345;true;Headline1;Best;assettext')\r\nfunction getParameter(value) {\r\n const parameters = value.split(';');\r\n const isPinned = parameters[1];\r\n const pinnedPosition = parameters[2];\r\n const performanceRating = parameters[3];\r\n const assetText = parameters[4];\r\n\r\n return {\r\n isPinned,\r\n pinnedPosition,\r\n performanceRating,\r\n assetText,\r\n };\r\n}\r\n\r\nexport function initialize(options) {\r\n i18n = options.passedInI18n;\r\n}\r\n\r\nexport function updateEntitySchemaForHeadlinesAssetId(entitySchema) {\r\n _.extend(entitySchema.properties, {\r\n HeadlinesAssetId: {\r\n name: 'HeadlinesAssetId',\r\n localize: (value) => {\r\n const {\r\n isPinned,\r\n pinnedPosition,\r\n assetText,\r\n } = getParameter(value);\r\n\r\n if (isPinned || pinnedPosition !== '') {\r\n return i18n.getString('Asset_Filter_Headline_Pinned_Content_No_PerformanceRating', {\r\n assetText,\r\n pinnedPosition: isPinned ? i18n.getString('PinnedAnyPosition') : i18n.getString(pinnedPosition),\r\n });\r\n }\r\n return i18n.getString('Asset_Filter_Headline_Content_No_PerformanceRating', {\r\n assetText,\r\n });\r\n },\r\n operatorDisplayNameMap: {\r\n contains: ' ',\r\n },\r\n filterable: true,\r\n property: 'HeadlinesAssetId',\r\n type: 'string',\r\n title: i18n.getString('HeadlinesAssetId'),\r\n },\r\n });\r\n\r\n return entitySchema;\r\n}\r\n\r\nexport function updateEntitySchemaForDescriptionsAssetId(entitySchema) {\r\n _.extend(entitySchema.properties, {\r\n DescriptionsAssetId: {\r\n name: 'DescriptionsAssetId',\r\n localize: (value) => {\r\n const {\r\n isPinned,\r\n pinnedPosition,\r\n assetText,\r\n } = getParameter(value);\r\n\r\n if (isPinned || pinnedPosition !== '') {\r\n return i18n.getString('Asset_Filter_Description_Pinned_Content_No_PerformanceRating', {\r\n assetText,\r\n pinnedPosition: isPinned ? i18n.getString('PinnedAnyPosition') : i18n.getString(pinnedPosition),\r\n });\r\n }\r\n\r\n return i18n.getString('Asset_Filter_Description_Content_No_PerformanceRating', {\r\n assetText,\r\n });\r\n },\r\n operatorDisplayNameMap: {\r\n contains: ' ',\r\n },\r\n filterable: true,\r\n property: 'DescriptionsAssetId',\r\n type: 'string',\r\n title: i18n.getString('DescriptionsAssetId'),\r\n },\r\n });\r\n\r\n return entitySchema;\r\n}\r\n","import _ from 'underscore';\r\n\r\nfunction updateEntitySchemaForAssetId(entitySchema, name) {\r\n const entitySchemaCopy = entitySchema;\r\n\r\n entitySchemaCopy.properties[name] = {\r\n name,\r\n // originalProperty: ...\r\n property: name,\r\n operators: ['contains'],\r\n type: 'string',\r\n // required: true,\r\n filterable: true,\r\n };\r\n\r\n return entitySchemaCopy;\r\n}\r\n\r\nfunction updateOdataOptionsForAssetId(options, { propertyName, entityName, modelName }) {\r\n const optionsCopy = options || { custom: {} };\r\n\r\n _.extendOwn(optionsCopy.custom, {\r\n [propertyName]: {\r\n contains: values => `Model.ResponsiveAd/${entityName}/any(al:al/Asset/${modelName}/Id eq ${values})`,\r\n },\r\n });\r\n\r\n return optionsCopy;\r\n}\r\n\r\nexport const imageProcessors = {\r\n updateEntitySchema(entitySchema) {\r\n return updateEntitySchemaForAssetId(entitySchema, 'ResponsiveAdImageId');\r\n },\r\n\r\n updateOdataOptions(options) {\r\n return updateOdataOptionsForAssetId(options, {\r\n propertyName: 'ResponsiveAdImageId',\r\n entityName: 'Images',\r\n modelName: 'Model.ImageAsset',\r\n });\r\n },\r\n};\r\n\r\nexport const videoProcessors = {\r\n updateEntitySchema(entitySchema) {\r\n return updateEntitySchemaForAssetId(entitySchema, 'ResponsiveAdVideoId');\r\n },\r\n\r\n updateOdataOptions(options) {\r\n return updateOdataOptionsForAssetId(options, {\r\n propertyName: 'ResponsiveAdVideoId',\r\n entityName: 'Videos',\r\n modelName: 'Model.VideoAsset',\r\n });\r\n },\r\n};\r\n","import _ from 'underscore';\r\nimport { BaseSchemaProcessor } from './base-schema-processor';\r\nimport { updateOdataOptionsForFinalUrl, updateEntitySchemaForFinalUrls } from '../util/update-final-url-property-for-filter';\r\nimport { updateDeliveryStatusPropertyForFilter } from '../util/update-delivery-status-property-for-filter';\r\nimport { updateEntitySchemaForTrackingUrlTemplate } from '../util/update-tracking-template-property-for-filter';\r\nimport { updateAdsByBingPropertyForFilter } from '../util/update-adsbybing-property-for-filter';\r\nimport { addCampaignTypePropertyForFilter } from '../util/update-campaign-type-property-for-filter';\r\nimport { updateEntitySchemaForFinalURLSuffix } from '../util/update-final-url-suffix-property-for-filter';\r\nimport { updateEditorialRejectionReasonForFilter } from '../util/update-editorial-rejection-reason-for-filter';\r\nimport { initialize as initializeAssetId, updateEntitySchemaForHeadlinesAssetId, updateEntitySchemaForDescriptionsAssetId } from '../util/update-asset-id-for-filter';\r\nimport { initialize as initializeIsAppealPending, updateEntitySchemaForIsAppealPending } from '../util/update-is-appeal-pending-property-for-filter';\r\nimport { imageProcessors, videoProcessors } from '../util/update-asset-library-asset-id-for-filter';\r\nimport { updateStatusPropertyForFilter } from '../util/update-status-property-for-filter';\r\nimport { updateAdResourceStatusForFilter } from '../util/update-ad-resource-status-for-filter';\r\nimport { updateAdStrengthPropertyForFilter } from '../util/update-ad-strength-property-for-filter';\r\n\r\nexport class AdSchemaProcessor extends BaseSchemaProcessor {\r\n constructor(options) {\r\n super(options);\r\n initializeAssetId(options);\r\n initializeIsAppealPending(options);\r\n\r\n this.enableEditorialRejectionFilter = options.enableEditorialRejectionFilter;\r\n }\r\n\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n const updatedSchema = super.updateEntitySchemaForFeatures(entitySchema);\r\n\r\n const campaignNameProperty = updatedSchema.properties.CampaignName;\r\n campaignNameProperty.title = this.i18n.getString('FilterLocalization_DataAttribute_CampaignName');\r\n\r\n const adgroupNameProperty = updatedSchema.properties.AdGroupName;\r\n adgroupNameProperty.title = this.i18n.getString('FilterLocalization_DataAttribute_AdGroupName');\r\n\r\n const deliveryStatusEnumSet = ['EditorialApprovedLimited',\r\n 'InvalidFinancialStatusOther',\r\n 'CampaignBudgetPaused',\r\n 'AdGroupExpired',\r\n 'EditorialRejected',\r\n 'Eligible',\r\n 'CampaignSuspended',\r\n 'EditorialUnderAppeal',\r\n 'EditorialPending',\r\n 'CampaignUserPaused',\r\n 'AdGroupDraft',\r\n 'AdGroupUserPaused',\r\n 'AdGroupPrivacyPending',\r\n 'AdGroupTargetingTooNarrow',\r\n 'AdUserPaused',\r\n 'AdExtensionAssociationDeleted',\r\n 'ApplicationNotFound',\r\n 'UrlInvalid',\r\n 'ApplicationDestinationUrlMismatch',\r\n 'PendingMetadataSync',\r\n ];\r\n\r\n if (this.Permissions && this.Permissions.dynamic && this.Permissions.dynamic.AppealUpheld) {\r\n deliveryStatusEnumSet.splice(deliveryStatusEnumSet.indexOf('EditorialApprovedLimited') + 1, 0, 'EditorialApprovedLimitedAppealRejected');\r\n deliveryStatusEnumSet.splice(deliveryStatusEnumSet.indexOf('EditorialRejected') + 1, 0, 'EditorialAppealRejected');\r\n }\r\n updateAdStrengthPropertyForFilter(entitySchema, this.i18n);\r\n\r\n updateStatusPropertyForFilter(entitySchema);\r\n\r\n updateDeliveryStatusPropertyForFilter(entitySchema, deliveryStatusEnumSet);\r\n\r\n updateEntitySchemaForFinalUrls(entitySchema);\r\n\r\n updateEntitySchemaForTrackingUrlTemplate(entitySchema);\r\n\r\n updateEntitySchemaForFinalURLSuffix(entitySchema);\r\n\r\n const adTypeNotSupported = [\"Enum.AdType'Mobile'\"];\r\n if (!this.Permissions.IsUserAppInstallAdsAllowed) {\r\n adTypeNotSupported.push(\"Enum.AdType'AppInstall'\");\r\n }\r\n\r\n if (this.Permissions.IsMultiMediaAdsEnabled) {\r\n // When enable IsMultiMediaAdsEnabled, show text as \"Responsive ad / Multimedia ad\"\r\n updatedSchema.properties.Type.enumValueMap[\"Enum.AdType'Responsive'\"] = 'Multimedia';\r\n } else if (!this.Permissions.IsAIMCampaignEnabled) {\r\n adTypeNotSupported.push(\"Enum.AdType'Responsive'\");\r\n }\r\n\r\n updatedSchema.properties.Type.enum =\r\n _.difference(updatedSchema.properties.Type.enum, adTypeNotSupported);\r\n\r\n // make campaignstatus and adgroupproperty not show in filter drop down\r\n const campaignStatusProperty = updatedSchema.properties.CampaignStatus;\r\n const adgroupStatusProperty = updatedSchema.properties.AdGroupStatus;\r\n\r\n if (campaignStatusProperty) {\r\n campaignStatusProperty.filterable = false;\r\n }\r\n\r\n if (adgroupStatusProperty) {\r\n adgroupStatusProperty.filterable = false;\r\n }\r\n\r\n updateEditorialRejectionReasonForFilter({\r\n entitySchema: updatedSchema,\r\n enableEditorialRejectionFilter: this.enableEditorialRejectionFilter,\r\n i18n: this.passedInI18n,\r\n });\r\n\r\n updateEntitySchemaForHeadlinesAssetId(updatedSchema);\r\n\r\n updateEntitySchemaForDescriptionsAssetId(updatedSchema);\r\n\r\n if (this.Permissions.IsAdsByBingEnabled) {\r\n updateAdsByBingPropertyForFilter(entitySchema);\r\n }\r\n\r\n if ((!this.Permissions || !this.Permissions.dynamic || !this.Permissions.dynamic.LinkedInCampaigns) && updatedSchema.properties.Type) {\r\n const adType = updatedSchema.properties.Type;\r\n\r\n adType.enum = _.without(adType.enum, \"Enum.AdType'LinkedIn'\");\r\n adType.enumValueMap = _.omit(adType.enumValueMap, \"Enum.AdType'LinkedIn'\");\r\n }\r\n\r\n updateAdResourceStatusForFilter({\r\n i18n: this.passedInI18n,\r\n entitySchema: updatedSchema,\r\n IsGoogleImportVideoAdsEnabled: this.Permissions.IsGoogleImportVideoAdsEnabled,\r\n });\r\n\r\n updateEntitySchemaForIsAppealPending(updatedSchema);\r\n\r\n const campaignTypeNotSupported = [\"Enum.CampaignType'PerformanceMax'\"];\r\n addCampaignTypePropertyForFilter({\r\n entitySchema: updatedSchema, permissions: this.Permissions, campaignTypeNotSupported,\r\n });\r\n\r\n imageProcessors.updateEntitySchema(updatedSchema);\r\n\r\n videoProcessors.updateEntitySchema(updatedSchema);\r\n\r\n delete updatedSchema.properties.PerformanceMetricsAverageCPM;\r\n return updatedSchema;\r\n }\r\n\r\n updateOdataOptions(odataOptions) {\r\n super.updateOdataOptions(odataOptions);\r\n updateOdataOptionsForFinalUrl(odataOptions);\r\n\r\n imageProcessors.updateOdataOptions(odataOptions);\r\n\r\n videoProcessors.updateOdataOptions(odataOptions);\r\n\r\n return odataOptions;\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\nexport function updateAdStrengthPropertyForFilter(entitySchema, i18n) {\r\n const adStrengthProperty = entitySchema.properties.AdStrength;\r\n const localized = {};\r\n _.each(adStrengthProperty.enum, (prop) => {\r\n localized[prop] = i18n.getString(`Ad_Strength_Score_${adStrengthProperty.enumValueMap[prop]}`);\r\n });\r\n _.extendOwn(adStrengthProperty, {\r\n filterable: true,\r\n chooseType: 'checkbox',\r\n title: i18n.getString('FilterLocalization_DataAttribute_AdStrength'),\r\n localized,\r\n });\r\n return adStrengthProperty;\r\n}\r\n","export function updateAdResourceStatusForFilter({ entitySchema, i18n, IsGoogleImportVideoAdsEnabled }) {\r\n const adResourceStatusSchema = entitySchema.properties.AdResourceStatusId;\r\n\r\n if (IsGoogleImportVideoAdsEnabled) {\r\n adResourceStatusSchema.chooseType = 'select';\r\n adResourceStatusSchema.operators = ['eq'];\r\n adResourceStatusSchema.title = i18n && i18n.getString('Schema_Ad_Property_AdResourceStatusId');\r\n adResourceStatusSchema.enum = [\"Enum.AdResourceStatus'Invalid'\", \"Enum.AdResourceStatus'Valid'\", \"Enum.AdResourceStatus'Pending'\", \"Enum.AdResourceStatus'GoogleImportedVideoNeedRepair'\"];\r\n adResourceStatusSchema.enumValueMap = {\r\n \"Enum.AdResourceStatus'Invalid'\": 'Invalid',\r\n \"Enum.AdResourceStatus'Valid'\": 'Valid',\r\n \"Enum.AdResourceStatus'Pending'\": 'Pending',\r\n \"Enum.AdResourceStatus'GoogleImportedVideoNeedRepair'\": 'Online Video ad campaigns require videos to serve',\r\n };\r\n } else {\r\n adResourceStatusSchema.filterable = false;\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { BaseSchemaProcessor } from './base-schema-processor';\r\nimport { addCampaignTypePropertyForFilter } from '../util/update-campaign-type-property-for-filter';\r\n\r\nexport class NegativeKeywordSchemaProcessor extends BaseSchemaProcessor {\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n const updatedSchema = entitySchema;\r\n\r\n const campaignNameProperty = updatedSchema.properties.CampaignName;\r\n campaignNameProperty.title = this.i18n.getString('FilterLocalization_DataAttribute_CampaignName');\r\n\r\n if (updatedSchema.properties.AdGroupName) {\r\n const adgroupNameProperty = updatedSchema.properties.AdGroupName;\r\n adgroupNameProperty.title = this.i18n.getString('FilterLocalization_DataAttribute_AdGroupName');\r\n }\r\n\r\n const textProperty = updatedSchema.properties.Text;\r\n textProperty.title = this.i18n.getString('FilterLocalization_DataAttribute_NegativeKeyword');\r\n\r\n updatedSchema.properties.MatchType.enum = _.difference(\r\n updatedSchema.properties.MatchType.enum,\r\n [\r\n \"Enum.MatchType'Broad'\",\r\n \"Enum.MatchType'Content'\",\r\n \"Enum.MatchType'Predictive'\",\r\n ]\r\n );\r\n\r\n if (this.isForVNext) {\r\n const campaignTypeNotSupported = [\"Enum.CampaignType'PerformanceMax'\", \"Enum.CampaignType'LinkedIn'\"];\r\n addCampaignTypePropertyForFilter({\r\n entitySchema: updatedSchema, permissions: this.Permissions, property: 'CampaignType', campaignTypeNotSupported,\r\n });\r\n }\r\n\r\n return updatedSchema;\r\n }\r\n\r\n updateOdataOptions(odataOptions) {\r\n const isExperimentsEnabled = _.result(this.Permissions, 'IsExperimentsEnabled');\r\n\r\n if (isExperimentsEnabled) {\r\n _.extendOwn(odataOptions.custom, {\r\n CampaignIsExperiment: {\r\n eq: (val) => {\r\n const operator = val ? 'gt' : 'le';\r\n\r\n return `ExperimentId ${operator} 0`;\r\n },\r\n },\r\n });\r\n }\r\n\r\n return odataOptions;\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { BaseSchemaProcessor } from './base-schema-processor';\r\nimport { addCampaignTypePropertyForFilter } from '../util/update-campaign-type-property-for-filter';\r\nimport { updateDeliveryStatusPropertyForFilter } from '../util/update-delivery-status-property-for-filter';\r\n\r\n/* eslint-disable no-param-reassign */\r\n\r\nexport class AdGroupCriterionSchemaProcessor extends BaseSchemaProcessor {\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n const updatedSchema = super.updateEntitySchemaForFeatures(entitySchema);\r\n\r\n // update schema to remove labels property\r\n updatedSchema.properties = _.omit(updatedSchema.properties, 'Labels');\r\n\r\n updateDeliveryStatusPropertyForFilter(updatedSchema, ['InvalidFinancialStatusOther',\r\n 'CampaignSuspended',\r\n 'CampaignBudgetPaused',\r\n 'CampaignUserPaused',\r\n 'Eligible',\r\n 'AdGroupExpired',\r\n 'AdGroupDraft',\r\n 'AdGroupUserPaused',\r\n 'AdGroupPrivacyPending',\r\n 'AdGroupTargetingTooNarrow',\r\n 'AdGroupCriterionExcluded',\r\n ]);\r\n\r\n // make campaignstatus and adgroupproperty not show in filter drop down\r\n const campaignStatusProperty = updatedSchema.properties.CampaignStatus;\r\n if (campaignStatusProperty) {\r\n campaignStatusProperty.filterable = false;\r\n }\r\n\r\n const adgroupStatusProperty = updatedSchema.properties.AdGroupStatus;\r\n if (adgroupStatusProperty) {\r\n adgroupStatusProperty.filterable = false;\r\n }\r\n\r\n if (this.Permissions.IsPersonalizedOffersEnabled) {\r\n updatedSchema.properties.CriterionCashback = {\r\n filterable: true,\r\n type: 'number',\r\n minimum: 0,\r\n maximum: 50,\r\n required: true,\r\n };\r\n }\r\n\r\n // only add campaign type filter at account scope\r\n // eslint-disable-next-line max-len\r\n if (this.isForVNext) {\r\n const campaignTypeNotSupported = [\"Enum.CampaignType'Hotel'\", \"Enum.CampaignType'PerformanceMax'\", \"Enum.CampaignType'LinkedIn'\"];\r\n addCampaignTypePropertyForFilter({\r\n entitySchema: updatedSchema, permissions: this.Permissions,\r\n });\r\n updatedSchema.properties.CampaignType.enum =\r\n _.difference(updatedSchema.properties.CampaignType.enum, campaignTypeNotSupported);\r\n }\r\n return updatedSchema;\r\n }\r\n}\r\n","/* eslint-disable no-param-reassign */\r\n\r\nimport _ from 'underscore';\r\nimport { BaseSchemaProcessor } from './base-schema-processor';\r\n\r\nconst statusEnum = [\r\n \"Enum.Status'Active'\",\r\n \"Enum.Status'Paused'\",\r\n \"Enum.Status'Creating'\",\r\n \"Enum.Status'Scheduled'\",\r\n \"Enum.Status'Ended'\",\r\n \"Enum.Status'CreationFailed'\",\r\n \"Enum.Status'Applying'\",\r\n \"Enum.Status'Applied'\",\r\n \"Enum.Status'ApplyFailed'\",\r\n];\r\n\r\nconst statusEnumValueMap = {\r\n \"Enum.Status'Active'\": 'Active',\r\n \"Enum.Status'Applied'\": 'Applied',\r\n \"Enum.Status'ApplyFailed'\": 'ApplyFailed',\r\n \"Enum.Status'Applying'\": 'Applying',\r\n \"Enum.Status'Creating'\": 'Creating',\r\n \"Enum.Status'CreationFailed'\": 'CreationFailed',\r\n \"Enum.Status'Ended'\": 'Ended',\r\n \"Enum.Status'Paused'\": 'Paused',\r\n \"Enum.Status'Scheduled'\": 'Scheduled',\r\n};\r\n\r\nexport class ExperimentSchemaProcessor extends BaseSchemaProcessor {\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n entitySchema.properties.Status.enum = statusEnum;\r\n entitySchema.properties.Status.enumValueMap = statusEnumValueMap;\r\n\r\n // Hide CampaignStatus and CampaignIsExperiment from filter menu.\r\n const campaignStatusProperty = entitySchema.properties.CampaignStatus;\r\n const campaignIsExperimentProperty = entitySchema.properties.CampaignIsExperiment;\r\n\r\n if (campaignStatusProperty) {\r\n campaignStatusProperty.filterable = false;\r\n }\r\n if (campaignIsExperimentProperty) {\r\n campaignIsExperimentProperty.filterable = false;\r\n }\r\n\r\n return entitySchema;\r\n }\r\n\r\n updateOdataOptions(odataOptions) {\r\n _.extendOwn(odataOptions.custom, {\r\n Status: {\r\n eq: (value) => {\r\n let url = `Status eq ${value}`;\r\n\r\n if (value === 'Enum.Status\\'Applied\\'') {\r\n url = 'Status eq Enum.Status\\'Graduated\\' or Status eq Enum.Status\\'Promoted\\'';\r\n }\r\n if (value === 'Enum.Status\\'ApplyFailed\\'') {\r\n url = 'Status eq Enum.Status\\'GraduateFailed\\' or Status eq Enum.Status\\'PromoteFailed\\'';\r\n }\r\n if (value === 'Enum.Status\\'Applying\\'') {\r\n url = 'Status eq Enum.Status\\'Graduating\\' or Status eq Enum.Status\\'Promoting\\'';\r\n }\r\n\r\n return url.replace(/Enum.Status/g, 'Enum.ExperimentStatus');\r\n },\r\n },\r\n });\r\n\r\n return odataOptions;\r\n }\r\n}\r\n","import _, { pick } from 'underscore';\r\n\r\nexport class AssetLinkSchemaProcessor {\r\n constructor(options) {\r\n this.scope = options.scope;\r\n this.i18n = options.i18n;\r\n this.Permissions = options.globalConfig.get('Permissions');\r\n }\r\n\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n const updatedEntitySchema = entitySchema;\r\n\r\n const { adType, campaignType, adSubType } = this.scope.values;\r\n\r\n const EditorialStatusEnumMap = {\r\n \"Enum.EditorialStatus'Approved'\": 'Approved',\r\n \"Enum.EditorialStatus'ApprovedLimited'\": 'ApprovedLimited',\r\n \"Enum.EditorialStatus'Rejected'\": 'Rejected',\r\n \"Enum.EditorialStatus'Pending'\": 'Pending',\r\n \"Enum.EditorialStatus'ApprovedLimitedAppealRejected'\": 'ApprovedLimitedAppealRejected',\r\n \"Enum.EditorialStatus'RejectedAppealRejected'\": 'RejectedAppealRejected',\r\n \"Enum.EditorialStatus'AppealPending'\": 'AppealPending',\r\n };\r\n\r\n updatedEntitySchema.properties.EditorialStatus = _.defaults({\r\n enum: _.keys(EditorialStatusEnumMap),\r\n enumValueMap: EditorialStatusEnumMap,\r\n localized: _.mapObject(EditorialStatusEnumMap, value => this.i18n.getString(`Asset_EditorialStatus_${value}`)),\r\n }, updatedEntitySchema.properties.EditorialStatus);\r\n\r\n const showAssetBasedEditorial = this.Permissions && ((this.Permissions.dynamic.AssetBasedEditorialForRSA && adType === 'ResponsiveSearch') || (this.Permissions.dynamic.AssetBasedEditorialForAIM && adSubType === 'native'));\r\n updatedEntitySchema.properties = pick(updatedEntitySchema.properties, [\r\n 'UiDisplayStatus',\r\n 'AssetAssetSource',\r\n 'AssociationType',\r\n showAssetBasedEditorial ? 'EditorialStatus' : '',\r\n ]);\r\n\r\n // common part\r\n updatedEntitySchema.properties.UiDisplayStatus = _.defaults({\r\n enum: [\r\n \"Enum.UiDisplayStatus'Active'\",\r\n \"Enum.UiDisplayStatus'Deleted'\",\r\n ],\r\n enumValueMap: {\r\n \"Enum.UiDisplayStatus'Active'\": 'Active',\r\n \"Enum.UiDisplayStatus'Deleted'\": 'Deleted',\r\n },\r\n }, updatedEntitySchema.properties.UiDisplayStatus);\r\n\r\n updatedEntitySchema.properties.AssetAssetSource = _.defaults({\r\n chooseType: 'checkbox',\r\n enumType: 'AssetSource',\r\n enum: [\r\n \"Enum.AssetSource'AdvertiserProvided'\",\r\n \"Enum.AssetSource'AutoGenerated'\",\r\n ],\r\n enumValueMap: {\r\n \"Enum.AssetSource'AdvertiserProvided'\": 'AdvertiserProvided',\r\n \"Enum.AssetSource'AutoGenerated'\": 'AutoGenerated',\r\n },\r\n }, updatedEntitySchema.properties.AssetAssetSource);\r\n\r\n if (adType === 'Responsive') {\r\n updatedEntitySchema.properties.AssociationType = _.defaults({\r\n enum: [\r\n \"Enum.AssetAssociationType'ResponsiveAdHeadlines'\",\r\n \"Enum.AssetAssociationType'ResponsiveAdLongHeadlines'\",\r\n \"Enum.AssetAssociationType'ResponsiveAdDescriptions'\",\r\n \"Enum.AssetAssociationType'OriginalImage'\",\r\n \"Enum.AssetAssociationType'SquareLogoMedia'\",\r\n \"Enum.AssetAssociationType'LandscapeLogoMedia'\",\r\n \"Enum.AssetAssociationType'LandscapeImageMedia'\",\r\n \"Enum.AssetAssociationType'SquareImageMedia'\",\r\n \"Enum.AssetAssociationType'ImageMedia1X2'\",\r\n \"Enum.AssetAssociationType'ImageMedia133X100'\",\r\n \"Enum.AssetAssociationType'ImageMedia15X10'\",\r\n \"Enum.AssetAssociationType'ImageMedia178X100'\",\r\n \"Enum.AssetAssociationType'ImageMedia4X1'\",\r\n \"Enum.AssetAssociationType'ImageMedia93X100'\",\r\n \"Enum.AssetAssociationType'ImageMedia155X100'\",\r\n \"Enum.AssetAssociationType'ImageMedia169X100'\",\r\n \"Enum.AssetAssociationType'ImageMedia172X100'\",\r\n \"Enum.AssetAssociationType'ImageMedia201X100'\",\r\n \"Enum.AssetAssociationType'ImageMedia200X100'\",\r\n \"Enum.AssetAssociationType'ImageMedia153X100'\",\r\n \"Enum.AssetAssociationType'ImageMedia124X100'\",\r\n \"Enum.AssetAssociationType'ImageMedia120X100'\",\r\n \"Enum.AssetAssociationType'CallToAction'\",\r\n ],\r\n enumValueMap: {\r\n \"Enum.AssetAssociationType'ResponsiveAdHeadlines'\": 'ResponsiveAdHeadlines',\r\n \"Enum.AssetAssociationType'ResponsiveAdLongHeadlines'\": 'ResponsiveAdLongHeadlines',\r\n \"Enum.AssetAssociationType'ResponsiveAdDescriptions'\": 'ResponsiveAdDescriptions',\r\n \"Enum.AssetAssociationType'OriginalImage'\": 'OriginalImage',\r\n \"Enum.AssetAssociationType'SquareLogoMedia'\": 'SquareLogoMedia',\r\n \"Enum.AssetAssociationType'LandscapeLogoMedia'\": 'LandscapeLogoMedia',\r\n \"Enum.AssetAssociationType'LandscapeImageMedia'\": 'LandscapeImageMedia',\r\n \"Enum.AssetAssociationType'SquareImageMedia'\": 'SquareImageMedia',\r\n \"Enum.AssetAssociationType'ImageMedia1X2'\": 'ImageMedia1X2',\r\n \"Enum.AssetAssociationType'ImageMedia15X10'\": 'ImageMedia15X10',\r\n \"Enum.AssetAssociationType'ImageMedia133X100'\": 'ImageMedia133X100',\r\n \"Enum.AssetAssociationType'ImageMedia178X100'\": 'ImageMedia178X100',\r\n \"Enum.AssetAssociationType'ImageMedia4X1'\": 'ImageMedia4X1',\r\n \"Enum.AssetAssociationType'ImageMedia93X100'\": 'ImageMedia93X100',\r\n \"Enum.AssetAssociationType'ImageMedia155X100'\": 'ImageMedia155X100',\r\n \"Enum.AssetAssociationType'ImageMedia169X100'\": 'ImageMedia169X100',\r\n \"Enum.AssetAssociationType'ImageMedia172X100'\": 'ImageMedia172X100',\r\n \"Enum.AssetAssociationType'ImageMedia201X100'\": 'ImageMedia201X100',\r\n \"Enum.AssetAssociationType'ImageMedia200X100'\": 'ImageMedia200X100',\r\n \"Enum.AssetAssociationType'ImageMedia153X100'\": 'ImageMedia153X100',\r\n \"Enum.AssetAssociationType'ImageMedia124X100'\": 'ImageMedia124X100',\r\n \"Enum.AssetAssociationType'ImageMedia120X100'\": 'ImageMedia120X100',\r\n \"Enum.AssetAssociationType'CallToAction'\": 'CallToAction',\r\n },\r\n }, updatedEntitySchema.properties.AssociationType);\r\n\r\n if (this.Permissions && this.Permissions.dynamic.AudienceAssetReport && campaignType === 'Audience') {\r\n updatedEntitySchema.properties.AssociationType.enum.push(\"Enum.AssetAssociationType'VideoMedia16X9'\", \"Enum.AssetAssociationType'DisplayCreativeImage'\");\r\n updatedEntitySchema.properties.AssociationType.enumValueMap[\"Enum.AssetAssociationType'VideoMedia16X9'\"] = 'VideoMedia16X9';\r\n updatedEntitySchema.properties.AssociationType.enumValueMap[\"Enum.AssetAssociationType'DisplayCreativeImage'\"] = 'DisplayCreativeImage';\r\n }\r\n } else if (adType === 'DynamicResponsive') {\r\n updatedEntitySchema.properties.AssociationType = _.defaults({\r\n enum: [\r\n \"Enum.AssetAssociationType'Headlines'\",\r\n \"Enum.AssetAssociationType'Descriptions'\",\r\n \"Enum.AssetAssociationType'OriginalImage'\",\r\n \"Enum.AssetAssociationType'SquareLogoMedia'\",\r\n \"Enum.AssetAssociationType'LandscapeLogoMedia'\",\r\n \"Enum.AssetAssociationType'LandscapeImageMedia'\",\r\n \"Enum.AssetAssociationType'SquareImageMedia'\",\r\n \"Enum.AssetAssociationType'ImageMedia1X2'\",\r\n \"Enum.AssetAssociationType'ImageMedia133X100'\",\r\n \"Enum.AssetAssociationType'ImageMedia15X10'\",\r\n \"Enum.AssetAssociationType'ImageMedia178X100'\",\r\n \"Enum.AssetAssociationType'ImageMedia4X1'\",\r\n \"Enum.AssetAssociationType'ImageMedia93X100'\",\r\n \"Enum.AssetAssociationType'ImageMedia155X100'\",\r\n \"Enum.AssetAssociationType'ImageMedia169X100'\",\r\n \"Enum.AssetAssociationType'ImageMedia172X100'\",\r\n \"Enum.AssetAssociationType'ImageMedia201X100'\",\r\n \"Enum.AssetAssociationType'ImageMedia200X100'\",\r\n \"Enum.AssetAssociationType'ImageMedia153X100'\",\r\n \"Enum.AssetAssociationType'ImageMedia124X100'\",\r\n \"Enum.AssetAssociationType'ImageMedia120X100'\",\r\n \"Enum.AssetAssociationType'DisplayCreativeImage'\",\r\n \"Enum.AssetAssociationType'CallToAction'\",\r\n ],\r\n enumValueMap: {\r\n \"Enum.AssetAssociationType'Headlines'\": 'Headlines',\r\n \"Enum.AssetAssociationType'Descriptions'\": 'Descriptions',\r\n \"Enum.AssetAssociationType'OriginalImage'\": 'OriginalImage',\r\n \"Enum.AssetAssociationType'SquareLogoMedia'\": 'SquareLogoMedia',\r\n \"Enum.AssetAssociationType'LandscapeLogoMedia'\": 'LandscapeLogoMedia',\r\n \"Enum.AssetAssociationType'LandscapeImageMedia'\": 'LandscapeImageMedia',\r\n \"Enum.AssetAssociationType'SquareImageMedia'\": 'SquareImageMedia',\r\n \"Enum.AssetAssociationType'ImageMedia1X2'\": 'ImageMedia1X2',\r\n \"Enum.AssetAssociationType'ImageMedia15X10'\": 'ImageMedia15X10',\r\n \"Enum.AssetAssociationType'ImageMedia133X100'\": 'ImageMedia133X100',\r\n \"Enum.AssetAssociationType'ImageMedia178X100'\": 'ImageMedia178X100',\r\n \"Enum.AssetAssociationType'ImageMedia4X1'\": 'ImageMedia4X1',\r\n \"Enum.AssetAssociationType'ImageMedia93X100'\": 'ImageMedia93X100',\r\n \"Enum.AssetAssociationType'ImageMedia155X100'\": 'ImageMedia155X100',\r\n \"Enum.AssetAssociationType'ImageMedia169X100'\": 'ImageMedia169X100',\r\n \"Enum.AssetAssociationType'ImageMedia172X100'\": 'ImageMedia172X100',\r\n \"Enum.AssetAssociationType'ImageMedia201X100'\": 'ImageMedia201X100',\r\n \"Enum.AssetAssociationType'ImageMedia200X100'\": 'ImageMedia200X100',\r\n \"Enum.AssetAssociationType'ImageMedia153X100'\": 'ImageMedia153X100',\r\n \"Enum.AssetAssociationType'ImageMedia124X100'\": 'ImageMedia124X100',\r\n \"Enum.AssetAssociationType'ImageMedia120X100'\": 'ImageMedia120X100',\r\n \"Enum.AssetAssociationType'DisplayCreativeImage'\": 'DisplayCreativeImage',\r\n \"Enum.AssetAssociationType'CallToAction'\": 'CallToAction',\r\n },\r\n }, updatedEntitySchema.properties.AssociationType);\r\n } else {\r\n updatedEntitySchema.properties.AssociationType = _.defaults({\r\n enum: [\r\n \"Enum.AssetAssociationType'Headlines'\",\r\n \"Enum.AssetAssociationType'Descriptions'\",\r\n ],\r\n enumValueMap: {\r\n \"Enum.AssetAssociationType'Headlines'\": 'Headlines',\r\n \"Enum.AssetAssociationType'Descriptions'\": 'Descriptions',\r\n },\r\n }, updatedEntitySchema.properties.AssociationType);\r\n }\r\n\r\n return updatedEntitySchema;\r\n }\r\n\r\n updateOdataOptions(odataOptions) {\r\n _.extendOwn(odataOptions.custom, {\r\n EditorialStatus: {\r\n eq: (filterValues) => {\r\n const queryStr = `EditorialStatus eq ${filterValues.replace('Enum.EditorialStatus\\'AppealPending\\'', 'Enum.EditorialStatus\\'RejectedAppealPending\\' or EditorialStatus eq Enum.EditorialStatus\\'ApprovedLimitedAppealPending\\'')}`;\r\n return queryStr;\r\n },\r\n },\r\n });\r\n\r\n return odataOptions;\r\n }\r\n}\r\n\r\n","import _, { pick, defaults } from 'underscore';\r\nimport { cloneDeep } from '@bingads-webui-universal/primitive-utilities';\r\nimport { BaseSchemaProcessor } from './base-schema-processor';\r\n\r\nexport class AssetWithBIDataSchemaProcessor extends BaseSchemaProcessor {\r\n constructor(options) {\r\n super(options);\r\n this.scope = options.scope;\r\n this.state = options.state;\r\n this.i18n = options.i18n;\r\n }\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n const updatedSchema = cloneDeep(entitySchema);\r\n\r\n const { campaignId } = (this.scope && this.scope.values) || {};\r\n const { CampaignType } = this.state || {};\r\n\r\n const {\r\n MMAAssetReportAccountLevel,\r\n AudienceAssetReport,\r\n AssetGridForPmaxCampaign,\r\n SearchAssetConversionColumn,\r\n AssetBasedEditorialForRSA,\r\n AssetBasedEditorialForAIM,\r\n } = this.Permissions.dynamic;\r\n\r\n const EditorialStatusEnumMap = {\r\n \"Enum.EditorialStatus'Approved'\": 'Approved',\r\n \"Enum.EditorialStatus'ApprovedLimited'\": 'ApprovedLimited',\r\n \"Enum.EditorialStatus'Rejected'\": 'Rejected',\r\n \"Enum.EditorialStatus'Pending'\": 'Pending',\r\n \"Enum.EditorialStatus'ApprovedLimitedAppealRejected'\": 'ApprovedLimitedAppealRejected',\r\n \"Enum.EditorialStatus'RejectedAppealRejected'\": 'RejectedAppealRejected',\r\n \"Enum.EditorialStatus'AppealPending'\": 'AppealPending',\r\n };\r\n\r\n updatedSchema.properties.AssetEditorialStatus = _.defaults({\r\n chooseType: 'checkbox',\r\n enum: _.keys(EditorialStatusEnumMap),\r\n enumValueMap: EditorialStatusEnumMap,\r\n localized: _.mapObject(EditorialStatusEnumMap, value => this.i18n.getString(`Asset_EditorialStatus_${value}`)),\r\n }, updatedSchema.properties.AssetEditorialStatus);\r\n\r\n const showAssetBasedEditorial = campaignId && ((AssetBasedEditorialForRSA && CampaignType === 'Default') || (AssetBasedEditorialForAIM && CampaignType === 'Audience'));\r\n\r\n\r\n updatedSchema.properties = pick(\r\n updatedSchema.properties,\r\n [\r\n 'AssetIsBlocked',\r\n 'AssetText',\r\n 'AssetAssetSource',\r\n 'AssociationType',\r\n 'UsedByCount',\r\n AssetGridForPmaxCampaign ? 'UsedByAssetGroupCount' : '',\r\n 'PinnedBitmask',\r\n 'PerformanceMetricsImpressions',\r\n 'PerformanceMetricsClicks',\r\n 'PerformanceMetricsCTR',\r\n 'PerformanceMetricsSpend',\r\n SearchAssetConversionColumn ? 'PerformanceMetricsConversionsCredit' : '',\r\n SearchAssetConversionColumn ? 'PerformanceMetricsAdvertiserReportedRevenue' : '',\r\n showAssetBasedEditorial ? 'AssetEditorialStatus' : '',\r\n ]\r\n );\r\n\r\n\r\n updatedSchema.properties.AssetAssetSource = defaults({\r\n chooseType: 'checkbox',\r\n enumType: 'AssetSource',\r\n enum: [\r\n \"Enum.AssetSource'AdvertiserProvided'\",\r\n \"Enum.AssetSource'AutoGenerated'\",\r\n ],\r\n enumValueMap: {\r\n \"Enum.AssetSource'AdvertiserProvided'\": 'AdvertiserProvided',\r\n \"Enum.AssetSource'AutoGenerated'\": 'AutoGenerated',\r\n },\r\n }, updatedSchema.properties.AssetAssetSource);\r\n\r\n updatedSchema.properties.AssetIsBlocked = defaults({\r\n title: this.i18n.getString('Status'),\r\n localized: {\r\n false: this.i18n.getString('Active'),\r\n true: this.i18n.getString('Deleted'),\r\n },\r\n }, updatedSchema.properties.AssetIsBlocked);\r\n\r\n updatedSchema.properties.AssociationType = defaults((MMAAssetReportAccountLevel || AudienceAssetReport) ? {\r\n enum: [\r\n \"Enum.AssetAssociationType'Headlines'\",\r\n \"Enum.AssetAssociationType'Descriptions'\",\r\n \"Enum.AssetAssociationType'OriginalImage'\",\r\n \"Enum.AssetAssociationType'SquareLogoMedia'\",\r\n \"Enum.AssetAssociationType'LandscapeLogoMedia'\",\r\n \"Enum.AssetAssociationType'LandscapeImageMedia'\",\r\n \"Enum.AssetAssociationType'SquareImageMedia'\",\r\n \"Enum.AssetAssociationType'ImageMedia1X2'\",\r\n \"Enum.AssetAssociationType'ImageMedia133X100'\",\r\n \"Enum.AssetAssociationType'ImageMedia15X10'\",\r\n \"Enum.AssetAssociationType'ImageMedia178X100'\",\r\n \"Enum.AssetAssociationType'ImageMedia4X1'\",\r\n \"Enum.AssetAssociationType'ImageMedia93X100'\",\r\n \"Enum.AssetAssociationType'ImageMedia155X100'\",\r\n \"Enum.AssetAssociationType'ImageMedia169X100'\",\r\n \"Enum.AssetAssociationType'ImageMedia172X100'\",\r\n \"Enum.AssetAssociationType'ImageMedia201X100'\",\r\n \"Enum.AssetAssociationType'ImageMedia200X100'\",\r\n \"Enum.AssetAssociationType'ImageMedia153X100'\",\r\n \"Enum.AssetAssociationType'ImageMedia124X100'\",\r\n \"Enum.AssetAssociationType'ImageMedia120X100'\",\r\n \"Enum.AssetAssociationType'DisplayCreativeImage'\",\r\n \"Enum.AssetAssociationType'CallToAction'\",\r\n ],\r\n enumValueMap: {\r\n \"Enum.AssetAssociationType'Headlines'\": 'Headlines',\r\n \"Enum.AssetAssociationType'Descriptions'\": 'Descriptions',\r\n \"Enum.AssetAssociationType'OriginalImage'\": 'OriginalImage',\r\n \"Enum.AssetAssociationType'SquareLogoMedia'\": 'SquareLogoMedia',\r\n \"Enum.AssetAssociationType'LandscapeLogoMedia'\": 'LandscapeLogoMedia',\r\n \"Enum.AssetAssociationType'LandscapeImageMedia'\": 'LandscapeImageMedia',\r\n \"Enum.AssetAssociationType'SquareImageMedia'\": 'SquareImageMedia',\r\n \"Enum.AssetAssociationType'ImageMedia1X2'\": 'ImageMedia1X2',\r\n \"Enum.AssetAssociationType'ImageMedia15X10'\": 'ImageMedia15X10',\r\n \"Enum.AssetAssociationType'ImageMedia133X100'\": 'ImageMedia133X100',\r\n \"Enum.AssetAssociationType'ImageMedia178X100'\": 'ImageMedia178X100',\r\n \"Enum.AssetAssociationType'ImageMedia4X1'\": 'ImageMedia4X1',\r\n \"Enum.AssetAssociationType'ImageMedia93X100'\": 'ImageMedia93X100',\r\n \"Enum.AssetAssociationType'ImageMedia155X100'\": 'ImageMedia155X100',\r\n \"Enum.AssetAssociationType'ImageMedia169X100'\": 'ImageMedia169X100',\r\n \"Enum.AssetAssociationType'ImageMedia172X100'\": 'ImageMedia172X100',\r\n \"Enum.AssetAssociationType'ImageMedia201X100'\": 'ImageMedia201X100',\r\n \"Enum.AssetAssociationType'ImageMedia200X100'\": 'ImageMedia200X100',\r\n \"Enum.AssetAssociationType'ImageMedia153X100'\": 'ImageMedia153X100',\r\n \"Enum.AssetAssociationType'ImageMedia124X100'\": 'ImageMedia124X100',\r\n \"Enum.AssetAssociationType'ImageMedia120X100'\": 'ImageMedia120X100',\r\n \"Enum.AssetAssociationType'DisplayCreativeImage'\": 'DisplayCreativeImage',\r\n \"Enum.AssetAssociationType'CallToAction'\": 'CallToAction',\r\n },\r\n } : {\r\n enum: [\r\n \"Enum.AssetAssociationType'Headlines'\",\r\n \"Enum.AssetAssociationType'Descriptions'\",\r\n ],\r\n enumValueMap: {\r\n \"Enum.AssetAssociationType'Headlines'\": 'Headlines',\r\n \"Enum.AssetAssociationType'Descriptions'\": 'Descriptions',\r\n },\r\n }, updatedSchema.properties.AssociationType);\r\n\r\n if (AudienceAssetReport) {\r\n updatedSchema.properties.AssociationType.enum.push(\"Enum.AssetAssociationType'VideoMedia16X9'\");\r\n updatedSchema.properties.AssociationType.enumValueMap[\"Enum.AssetAssociationType'VideoMedia16X9'\"] = 'VideoMedia16X9';\r\n }\r\n\r\n updatedSchema.properties.PinnedBitmask = defaults({\r\n enum: [\r\n \"Enum.PinnedAssetPositionType'Position1'\",\r\n \"Enum.PinnedAssetPositionType'Position2'\",\r\n \"Enum.PinnedAssetPositionType'Position3'\",\r\n \"Enum.PinnedAssetPositionType'None'\",\r\n ],\r\n enumValueMap: {\r\n \"Enum.PinnedAssetPositionType'Position1'\": 'Position1',\r\n \"Enum.PinnedAssetPositionType'Position2'\": 'Position2',\r\n \"Enum.PinnedAssetPositionType'Position3'\": 'Position3',\r\n \"Enum.PinnedAssetPositionType'None'\": 'None',\r\n },\r\n }, updatedSchema.properties.PinnedBitmask);\r\n\r\n return updatedSchema;\r\n }\r\n\r\n updateOdataOptions(odataOptions) {\r\n _.extendOwn(odataOptions.custom, {\r\n 'Asset/EditorialStatus': {\r\n eq: (filterValues) => {\r\n const queryStr = `Asset/EditorialStatus eq ${filterValues.replace('Enum.EditorialStatus\\'AppealPending\\'', 'Enum.EditorialStatus\\'RejectedAppealPending\\' or Asset/EditorialStatus eq Enum.EditorialStatus\\'ApprovedLimitedAppealPending\\'')}`;\r\n return queryStr;\r\n },\r\n },\r\n });\r\n\r\n return odataOptions;\r\n }\r\n}\r\n","import { pick } from 'underscore';\r\nimport { cloneDeep } from '@bingads-webui-universal/primitive-utilities';\r\nimport { BaseSchemaProcessor } from './base-schema-processor';\r\n\r\nexport class ResponsiveSearchAdInstanceSchemaProcessor extends BaseSchemaProcessor {\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n const updatedSchema = cloneDeep(entitySchema);\r\n\r\n // Only pick supported properties, ignore any properties from any pilot\r\n updatedSchema.properties = pick(updatedSchema.properties, [\r\n 'Headlines',\r\n 'Descriptions',\r\n 'PerformanceMetricsImpressions',\r\n ], this.Permissions.IsResponsiveSearchAdCombGridEnabled ? [\r\n 'PerformanceMetricsClicks',\r\n 'PerformanceMetricsCTR',\r\n 'PerformanceMetricsConversions',\r\n 'PerformanceMetricsSpend',\r\n 'PerformanceMetricsAverageCPC',\r\n 'PerformanceMetricsAverageCPM',\r\n 'PerformanceMetricsCPA',\r\n 'PerformanceMetricsRevenueOnAdSpend',\r\n 'PerformanceMetricsAdvertiserReportedRevenue',\r\n 'PerformanceMetricsConversionRate',\r\n ] : [], [\r\n 'PerformanceMetricsClicks',\r\n 'PerformanceMetricsCTR',\r\n 'PerformanceMetricsConversions',\r\n 'PerformanceMetricsSpend',\r\n ]);\r\n\r\n return updatedSchema;\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { BaseSchemaProcessor } from './base-schema-processor';\r\nimport { addCampaignTypePropertyForFilter } from '../util/update-campaign-type-property-for-filter';\r\nimport { updateOdataOptionsForCriterionType } from '../util/update-criterion-property-for-filter';\r\nimport { updateOdataOptionsForLevel } from '../util/update-level-property-for-filter';\r\n\r\nexport class BaseCriterionSchemaProcessor extends BaseSchemaProcessor {\r\n constructor(options, filterProperties) {\r\n super(options);\r\n this.filterProperties = filterProperties;\r\n }\r\n\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n const updatedSchema = super.updateEntitySchemaForFeatures(entitySchema);\r\n\r\n // update schema to remove labels property\r\n updatedSchema.properties = _.omit(updatedSchema.properties, 'Labels');\r\n\r\n let filterList = ['Campaign/Id', 'Campaign/Name', 'Campaign/Status', 'AdGroup/Id', 'AdGroup/Name', 'AdGroup/Status', 'CriterionBid', 'LevelOfDetails'];\r\n if (this.Permissions.IsExperimentsEnabled) {\r\n filterList = filterList.concat(['Campaign/IsExperiment']);\r\n }\r\n filterList = filterList.concat(this.filterProperties);\r\n\r\n const biPattern = /^(PoP)?PerformanceMetrics/;\r\n updatedSchema.properties = _.pick(\r\n entitySchema.properties,\r\n prop => _.contains(filterList, prop.property) || biPattern.test(prop.property)\r\n );\r\n\r\n const campaignStatusProperty = updatedSchema.properties.CampaignStatus;\r\n if (campaignStatusProperty) {\r\n campaignStatusProperty.filterable = false;\r\n }\r\n\r\n const adgroupStatusProperty = updatedSchema.properties.AdGroupStatus;\r\n if (adgroupStatusProperty) {\r\n adgroupStatusProperty.filterable = false;\r\n }\r\n\r\n updatedSchema.properties = _.mapObject(updatedSchema.properties, prop => ({\r\n ...prop,\r\n title: prop.title || this.i18n.getString(`FilterLocalization_DataAttribute_${_.result(prop.alias, 'legacy') || prop.originalProperty}`),\r\n }));\r\n\r\n if (this.isForVNext) {\r\n const campaignTypeNotSupported = [\"Enum.CampaignType'LinkedIn'\"];\r\n addCampaignTypePropertyForFilter({\r\n entitySchema: updatedSchema, permissions: this.Permissions, campaignTypeNotSupported,\r\n });\r\n }\r\n\r\n return updatedSchema;\r\n }\r\n\r\n updateOdataOptions(odataOptions) {\r\n super.updateOdataOptions(odataOptions);\r\n updateOdataOptionsForCriterionType(odataOptions);\r\n updateOdataOptionsForLevel(odataOptions);\r\n\r\n return odataOptions;\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\nexport function updateOdataOptionsForCriterionType(options) {\r\n const optionsCopy = options || { custom: {} };\r\n\r\n _.extendOwn(optionsCopy.custom, {\r\n Criterion: {\r\n isof: value => `isof(Criterion, ${value})`,\r\n },\r\n });\r\n\r\n return optionsCopy;\r\n}\r\n\r\nexport function updateOdataOptionsForDayTimeCriterionDay(options) {\r\n const optionsCopy = options || { custom: {} };\r\n\r\n _.extendOwn(optionsCopy.custom, {\r\n 'Criterion/DayTimeCriterion/Day': {\r\n eq: (value) => {\r\n const enmu = value.replace('Enum.CriterionDayTimeCriterionDay', 'Enum.Day');\r\n return `Criterion/Model.DayTimeCriterion/Day eq ${enmu}`;\r\n },\r\n },\r\n });\r\n\r\n return optionsCopy;\r\n}\r\n\r\nexport function updateOdataOptionsForDeviceCriterionDeviceName(options) {\r\n const optionsCopy = options || { custom: {} };\r\n\r\n _.extendOwn(optionsCopy.custom, {\r\n 'Criterion/DeviceCriterion/DeviceName': {\r\n eq: (value) => {\r\n const enmu = value.replace('Enum.CriterionDeviceCriterionDeviceName', '');\r\n return `Criterion/Model.DeviceCriterion/DeviceName eq ${enmu}`;\r\n },\r\n },\r\n });\r\n\r\n return optionsCopy;\r\n}\r\n","import _ from 'underscore';\r\n\r\nexport function updateOdataOptionsForLevel(options) {\r\n const optionsCopy = options || { custom: {} };\r\n\r\n _.extendOwn(optionsCopy.custom, {\r\n LevelOfDetails: {\r\n eq: (val) => {\r\n const enmu = val.replace('Enum.LevelOfDetails', '');\r\n return `LevelOfDetails eq ${enmu}`;\r\n },\r\n },\r\n });\r\n\r\n return optionsCopy;\r\n}\r\n","import { BaseCriterionSchemaProcessor } from './base-criterion-schema-processor';\r\nimport { updateOdataOptionsForDayTimeCriterionDay } from '../util/update-criterion-property-for-filter';\r\n\r\nexport class DayTimeCriterionSchemaProcessor extends BaseCriterionSchemaProcessor {\r\n constructor(options) {\r\n super(options, ['Criterion/DayTimeCriterion/Day']);\r\n }\r\n\r\n updateOdataOptions(odataOptions) {\r\n super.updateOdataOptions(odataOptions);\r\n updateOdataOptionsForDayTimeCriterionDay(odataOptions);\r\n\r\n return odataOptions;\r\n }\r\n\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n const updatedSchema = super.updateEntitySchemaForFeatures(entitySchema);\r\n\r\n if (this.Permissions.IsPersonalizedOffersEnabled &&\r\n !this.Permissions.IsPersonalizedOffersV3Enabled) {\r\n updatedSchema.properties.CriterionCashback = {\r\n filterable: true,\r\n type: 'number',\r\n minimum: 0,\r\n maximum: 50,\r\n required: true,\r\n };\r\n }\r\n\r\n return updatedSchema;\r\n }\r\n}\r\n","import { BaseCriterionSchemaProcessor } from './base-criterion-schema-processor';\r\nimport { updateOdataOptionsForDeviceCriterionDeviceName } from '../util/update-criterion-property-for-filter';\r\n\r\nexport class DeviceCriterionSchemaProcessor extends BaseCriterionSchemaProcessor {\r\n constructor(options) {\r\n super(options, ['Criterion/DeviceCriterion/DeviceName']);\r\n }\r\n\r\n updateOdataOptions(odataOptions) {\r\n super.updateOdataOptions(odataOptions);\r\n updateOdataOptionsForDeviceCriterionDeviceName(odataOptions);\r\n\r\n return odataOptions;\r\n }\r\n\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n const updatedSchema = super.updateEntitySchemaForFeatures(entitySchema);\r\n\r\n if (this.Permissions.IsPersonalizedOffersEnabled &&\r\n !this.Permissions.IsPersonalizedOffersV3Enabled) {\r\n updatedSchema.properties.CriterionCashback = {\r\n filterable: true,\r\n type: 'number',\r\n minimum: 0,\r\n maximum: 50,\r\n required: true,\r\n };\r\n }\r\n\r\n return updatedSchema;\r\n }\r\n}\r\n","import { BaseCriterionSchemaProcessor } from './base-criterion-schema-processor';\r\n\r\nexport class LocationCriterionSchemaProcessor extends BaseCriterionSchemaProcessor {\r\n constructor(options) {\r\n super(options, ['Criterion/Webpage/Parameter/CriterionName']);\r\n }\r\n\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n const updatedSchema = super.updateEntitySchemaForFeatures(entitySchema);\r\n\r\n const locationNameOption = updatedSchema.properties.CriterionWebpageParameterCriterionName;\r\n if (locationNameOption) {\r\n locationNameOption.property = 'Criterion/Name';\r\n }\r\n\r\n if (this.Permissions.IsPersonalizedOffersEnabled &&\r\n !this.Permissions.IsPersonalizedOffersV3Enabled) {\r\n updatedSchema.properties.CriterionCashback = {\r\n filterable: true,\r\n type: 'number',\r\n minimum: 0,\r\n maximum: 50,\r\n required: true,\r\n };\r\n }\r\n\r\n return updatedSchema;\r\n }\r\n}\r\n","import { compact, contains, pick, mapObject, result } from 'underscore';\r\nimport { BaseSchemaProcessor } from './base-schema-processor';\r\nimport { updateOdataOptionsForFinalUrl } from '../util/update-final-url-property-for-filter';\r\nimport { updateDeliveryStatusPropertyForFilter } from '../util/update-delivery-status-property-for-filter';\r\nimport { addCampaignTypePropertyForFilter } from '../util/update-campaign-type-property-for-filter';\r\n\r\nexport class AudienceCriterionWithBISchemaProcessor extends BaseSchemaProcessor {\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n const updatedSchema = super.updateEntitySchemaForFeatures(entitySchema);\r\n const {\r\n IsAIMCampaignEnabled,\r\n IsProductAudienceForSearchEnabled,\r\n IsCustomAudienceAllowed,\r\n IsCombinedListAudienceAllowed,\r\n IsInMarketAudienceAllowed,\r\n IsRemarketingSimilarAudienceAllowed,\r\n IsCustomerListAudienceAllowed,\r\n IsExperimentsEnabled,\r\n IsPersonalizedOffersEnabled,\r\n IsPersonalizedOffersV3Enabled,\r\n } = this.Permissions;\r\n const propWhitelist = compact([\r\n 'AudienceCriterion/AudienceId',\r\n 'AudienceCriterion/AudienceName',\r\n 'AudienceCriterion/AudienceType',\r\n 'AudienceCriterion/BidMultiplier',\r\n 'AdGroup/Name',\r\n 'AdGroup/Status',\r\n 'Campaign/Name',\r\n 'Campaign/Status',\r\n IsExperimentsEnabled && 'Campaign/IsExperiment',\r\n 'BidType',\r\n 'DeliveryStatus',\r\n 'Level',\r\n 'Status',\r\n ]);\r\n const biPattern = /^PerformanceMetrics/;\r\n\r\n updatedSchema.properties = pick(\r\n updatedSchema.properties,\r\n prop => contains(propWhitelist, prop.property) || biPattern.test(prop.property)\r\n );\r\n\r\n updatedSchema.properties = mapObject(updatedSchema.properties, prop => ({\r\n ...prop,\r\n title: prop.title || this.i18n.getString(`FilterLocalization_DataAttribute_${result(prop.alias, 'legacy') || prop.originalProperty}`),\r\n }));\r\n\r\n const deliveryStatusEnumSet = [\r\n 'Eligible',\r\n 'CampaignDeleted',\r\n 'CampaignSuspended',\r\n 'CampaignBudgetPaused',\r\n 'AdGroupExpired',\r\n 'AdGroupDraft',\r\n 'AdGroupPrivacyPending',\r\n 'AdGroupTargetingTooNarrow',\r\n 'CampaignUserPaused',\r\n 'AdGroupUserPaused',\r\n 'AdGroupAudienceAssociationPaused',\r\n 'AdGroupAudienceAssociationExcluded',\r\n ];\r\n\r\n const EnableImpressionBasedList = this.Permissions.dynamic && this.Permissions.dynamic.EnableImpressionBasedList;\r\n updateDeliveryStatusPropertyForFilter(entitySchema, deliveryStatusEnumSet);\r\n\r\n const audienceIdProperty = updatedSchema.properties.AudienceCriterionAudienceId;\r\n audienceIdProperty.skipLocalization = true;\r\n\r\n const audienceTypeProperty = updatedSchema.properties.AudienceCriterionAudienceType;\r\n if (audienceTypeProperty) {\r\n // Reject the audience type if the pilot isn't enabled\r\n audienceTypeProperty.enum = compact([\r\n 'Enum.AudienceType\\'Remessaging\\'',\r\n (IsAIMCampaignEnabled || IsProductAudienceForSearchEnabled) && 'Enum.AudienceType\\'Product\\'',\r\n IsCustomAudienceAllowed && 'Enum.AudienceType\\'Custom\\'',\r\n IsInMarketAudienceAllowed && 'Enum.AudienceType\\'InMarket\\'',\r\n IsRemarketingSimilarAudienceAllowed && 'Enum.AudienceType\\'RemarketingSimilar\\'',\r\n IsCustomerListAudienceAllowed && 'Enum.AudienceType\\'CustomerList\\'',\r\n IsCombinedListAudienceAllowed && 'Enum.AudienceType\\'CombinedList\\'',\r\n EnableImpressionBasedList && 'Enum.AudienceType\\'ImpressionBasedRemarketing\\'',\r\n ]);\r\n }\r\n\r\n // make campaignstatus and adgroupproperty not show in filter drop down\r\n updatedSchema.properties.CampaignStatus.filterable = false;\r\n updatedSchema.properties.AdGroupStatus.filterable = false;\r\n\r\n if (this.isForVNext) {\r\n const campaignTypeNotSupported = [\"Enum.CampaignType'LinkedIn'\"];\r\n addCampaignTypePropertyForFilter({\r\n entitySchema: updatedSchema, permissions: this.Permissions, campaignTypeNotSupported,\r\n });\r\n }\r\n\r\n if (IsPersonalizedOffersEnabled && !IsPersonalizedOffersV3Enabled) {\r\n updatedSchema.properties.AudienceCriterionCashbackAdjustment = {\r\n filterable: true,\r\n minimum: 0,\r\n maximum: 50,\r\n type: 'number',\r\n name: 'CashbackAdjustment',\r\n property: 'AudienceCriterion/CashbackAdjustment',\r\n title: this.i18n.getString('FilterLocalization_DataAttribute_CashbackAdjustment'),\r\n required: true,\r\n };\r\n }\r\n\r\n return updatedSchema;\r\n }\r\n\r\n updateOdataOptions(odataOptions) {\r\n super.updateOdataOptions(odataOptions);\r\n updateOdataOptionsForFinalUrl(odataOptions);\r\n\r\n return odataOptions;\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { BaseSchemaProcessor } from './base-schema-processor';\r\n\r\nexport class ProductSchemaProcessor extends BaseSchemaProcessor {\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n const updatedSchema = super.updateEntitySchemaForFeatures(entitySchema);\r\n\r\n const MPNProperty = updatedSchema.properties.MPN;\r\n\r\n if (MPNProperty && MPNProperty.alias != null) {\r\n MPNProperty.title = MPNProperty.alias;\r\n }\r\n\r\n if (this.Permissions.IsProductsTabV2Enabled) {\r\n const titleProperty = updatedSchema.properties.Title;\r\n if (titleProperty) {\r\n titleProperty.operators.push('eq');\r\n }\r\n\r\n if (updatedSchema.properties.PerformanceMetricsViewThroughConversions) {\r\n updatedSchema.properties.PerformanceMetricsViewThroughConversions.filterable = false;\r\n }\r\n\r\n if (updatedSchema.properties.PerformanceMetricsViewThroughConversionsRevenue) {\r\n // eslint-disable-next-line max-len\r\n updatedSchema.properties.PerformanceMetricsViewThroughConversionsRevenue.filterable = false;\r\n }\r\n\r\n if (updatedSchema.properties.PerformanceMetricsViewThroughConversionsCPA) {\r\n updatedSchema.properties.PerformanceMetricsViewThroughConversionsCPA.filterable = false;\r\n }\r\n\r\n if (updatedSchema.properties.PerformanceMetricsViewThroughConversionsReturnOnAdSpend) {\r\n // eslint-disable-next-line max-len\r\n updatedSchema.properties.PerformanceMetricsViewThroughConversionsReturnOnAdSpend.filterable = false;\r\n }\r\n\r\n if (updatedSchema.properties.PerformanceMetricsViewThroughConversionsRate) {\r\n updatedSchema.properties.PerformanceMetricsViewThroughConversionsRate.filterable = false;\r\n }\r\n\r\n if (updatedSchema.properties.PerformanceMetricsQuantityBought) {\r\n updatedSchema.properties.PerformanceMetricsQuantityBought.filterable = false;\r\n }\r\n }\r\n\r\n const conditionProperty = updatedSchema.properties.Condition;\r\n if (conditionProperty) {\r\n conditionProperty.chooseType = 'radio';\r\n conditionProperty.operators = ['eq'];\r\n }\r\n\r\n const channelProperty = updatedSchema.properties.Channel;\r\n if (channelProperty) {\r\n channelProperty.chooseType = 'radio';\r\n channelProperty.operators = ['eq'];\r\n }\r\n\r\n const channelExclusivityProperty = updatedSchema.properties.ChannelExclusivity;\r\n\r\n if (channelExclusivityProperty) {\r\n channelExclusivityProperty.chooseType = 'radio';\r\n channelExclusivityProperty.operators = ['eq'];\r\n }\r\n\r\n const omitProperties = ['Language', 'Labels', 'SellerName', 'UniqueId'];\r\n updatedSchema.properties = _.omit(updatedSchema.properties, omitProperties);\r\n\r\n return updatedSchema;\r\n }\r\n\r\n formatFilterValue(value) {\r\n if (Array.isArray(value)) {\r\n return value[0];\r\n }\r\n return value;\r\n }\r\n\r\n updateOdataOptions(odataOptions) {\r\n super.updateOdataOptions(odataOptions);\r\n\r\n _.extendOwn(odataOptions.custom, {\r\n Condition: {\r\n eq: (value) => {\r\n const condition = this.formatFilterValue(value).split(\"'\")[1];\r\n const url = `Condition eq '${condition}'`;\r\n\r\n return url;\r\n },\r\n },\r\n Channel: {\r\n eq: (value) => {\r\n const channel = this.formatFilterValue(value).split(\"'\")[1];\r\n const url = `Channel eq '${channel}'`;\r\n\r\n return url;\r\n },\r\n },\r\n ChannelExclusivity: {\r\n eq: (value) => {\r\n const channelExclusivity = this.formatFilterValue(value).split(\"'\")[1];\r\n const url = `ChannelExclusivity eq '${channelExclusivity}'`;\r\n\r\n return url;\r\n },\r\n },\r\n });\r\n\r\n return odataOptions;\r\n }\r\n}\r\n","import { compact, any } from 'underscore';\r\nimport { BaseSchemaProcessor } from './base-schema-processor';\r\nimport { updateOdataOptionsForFinalUrl } from '../util/update-final-url-property-for-filter';\r\n\r\nexport class AudienceSchemaProcessor extends BaseSchemaProcessor {\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n const updatedSchema = super.updateEntitySchemaForFeatures(entitySchema);\r\n const {\r\n IsAIMCampaignEnabled,\r\n IsCombinedListAudienceAllowed,\r\n IsCustomAudienceAllowed,\r\n IsCustomerHierarchyEnabled,\r\n IsCustomerListAudienceAllowed,\r\n IsNewAudienceEnabled,\r\n IsProductAudienceForSearchEnabled,\r\n IsRemarketingSimilarAudienceAllowed,\r\n IsSharedLibraryPhase1Enabled,\r\n } = this.Permissions;\r\n\r\n const EnableImpressionBasedList = this.Permissions.dynamic && this.Permissions.dynamic.EnableImpressionBasedList;\r\n\r\n if (IsNewAudienceEnabled) {\r\n const typeField = updatedSchema.properties.Type;\r\n typeField.enum = compact([\r\n 'Enum.AudienceType\\'Remessaging\\'',\r\n (IsAIMCampaignEnabled || IsProductAudienceForSearchEnabled) && 'Enum.AudienceType\\'Product\\'',\r\n IsCustomAudienceAllowed && 'Enum.AudienceType\\'Custom\\'',\r\n IsRemarketingSimilarAudienceAllowed && 'Enum.AudienceType\\'RemarketingSimilar\\'',\r\n IsCustomerListAudienceAllowed && 'Enum.AudienceType\\'CustomerList\\'',\r\n IsCombinedListAudienceAllowed && 'Enum.AudienceType\\'CombinedList\\'',\r\n EnableImpressionBasedList && 'Enum.AudienceType\\'ImpressionBasedRemarketing\\'',\r\n ]);\r\n }\r\n\r\n const trackingStatusField = updatedSchema.properties.TrackingStatus;\r\n trackingStatusField.chooseType = 'checkbox';\r\n trackingStatusField.enum = [\r\n 'Enum.TagTrackingStatus\\'Unverified\\'',\r\n 'Enum.TagTrackingStatus\\'Active\\'',\r\n 'Enum.TagTrackingStatus\\'Inactive\\'',\r\n ];\r\n trackingStatusField.enumValueMap = {\r\n 'Enum.TagTrackingStatus\\'Unverified\\'': 'Unverified',\r\n 'Enum.TagTrackingStatus\\'Active\\'': 'Active',\r\n 'Enum.TagTrackingStatus\\'Inactive\\'': 'Inactive',\r\n };\r\n\r\n const isAudienceTrackingStatusColumnExist = any([\r\n IsAIMCampaignEnabled,\r\n IsRemarketingSimilarAudienceAllowed,\r\n (IsCustomerHierarchyEnabled && IsSharedLibraryPhase1Enabled),\r\n ]);\r\n\r\n if (!isAudienceTrackingStatusColumnExist) {\r\n delete updatedSchema.properties.AudienceTrackingStatus;\r\n }\r\n\r\n if (!(IsCustomerHierarchyEnabled && IsSharedLibraryPhase1Enabled)) {\r\n delete updatedSchema.properties.OwnerName;\r\n delete updatedSchema.properties.OwnerNumber;\r\n }\r\n\r\n delete updatedSchema.properties.Labels;\r\n\r\n return updatedSchema;\r\n }\r\n\r\n updateOdataOptions(odataOptions) {\r\n super.updateOdataOptions(odataOptions);\r\n updateOdataOptionsForFinalUrl(odataOptions);\r\n\r\n return odataOptions;\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { BaseSchemaProcessor } from './base-schema-processor';\r\nimport { mapEnumValueForFilter } from '../util/update-delivery-status-property-for-filter';\r\n\r\nexport class GMBImportSchemaProcessor extends BaseSchemaProcessor {\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n const updatedSchema = super.updateEntitySchemaForFeatures(entitySchema);\r\n\r\n const companyName = updatedSchema.properties.CompanyName;\r\n companyName.title = this.i18n.getString('LocationData_Grid_ColumnTitle_CompanyName');\r\n\r\n const statusProperty = updatedSchema.properties.Status;\r\n\r\n const statusEnumSet = ['Active', 'Deleted'];\r\n statusProperty.enum = _.map(statusEnumSet, value => mapEnumValueForFilter('AdExtensionStatus', value));\r\n\r\n const propWhitelist = _.compact(['CompanyName']);\r\n\r\n updatedSchema.properties = _.pick(\r\n updatedSchema.properties,\r\n prop => _.contains(propWhitelist, prop.property)\r\n );\r\n\r\n return updatedSchema;\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { cloneDeep } from '@bingads-webui-universal/primitive-utilities';\r\nimport { BaseSchemaProcessor } from './base-schema-processor';\r\nimport { addCampaignTypePropertyForFilter } from '../util/update-campaign-type-property-for-filter';\r\n\r\n// Most of the codes copied from private\\summary-tabs\\packages\\search-term\\src\\filter-config.es\r\nexport class SearchTermSchemaProcessor extends BaseSchemaProcessor {\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n const updatedSchema = cloneDeep(entitySchema);\r\n\r\n // Omit Added as it has been replaced by SearchTermStatus\r\n updatedSchema.properties = _.omit(entitySchema.properties, ['Added']);\r\n\r\n // Search term does not support ViewThroughConversions\r\n updatedSchema.properties = _.omit(updatedSchema.properties, [\r\n 'PerformanceMetricsViewThroughConversions',\r\n 'PerformanceMetricsViewThroughConversionsRevenue',\r\n 'PerformanceMetricsViewThroughConversionsCPA',\r\n 'PerformanceMetricsViewThroughConversionsReturnOnAdSpend',\r\n 'PerformanceMetricsViewThroughConversionsRate',\r\n ]);\r\n\r\n // make CampaignStatus and AdGroupStatus not show in filter menu.\r\n const campaignStatusProperty = updatedSchema.properties.CampaignStatus;\r\n const adgroupStatusProperty = updatedSchema.properties.AdGroupStatus;\r\n\r\n if (campaignStatusProperty) {\r\n campaignStatusProperty.filterable = false;\r\n }\r\n\r\n if (adgroupStatusProperty) {\r\n adgroupStatusProperty.filterable = false;\r\n }\r\n\r\n if (this.isForVNext) {\r\n updatedSchema.properties = _.omit(updatedSchema.properties, [\r\n 'CampaignCampaignType',\r\n ]);\r\n\r\n addCampaignTypePropertyForFilter({\r\n entitySchema: updatedSchema, permissions: this.Permissions,\r\n });\r\n\r\n // Search term campaign type filer not supported for Dynamic, Audience, and Smart\r\n const supportedTypes = [\"Enum.CampaignType'Default'\", \"Enum.CampaignType'Shopping'\"];\r\n updatedSchema.properties.CampaignType.enum\r\n = _.filter(\r\n updatedSchema.properties.CampaignType.enum,\r\n type => supportedTypes.indexOf(type) >= 0\r\n );\r\n } else {\r\n // Remove duplicated word 'Campaign' in enum values of CampaignCampaignType\r\n const duplicatedString = 'Campaign';\r\n updatedSchema.properties.CampaignCampaignType.enum =\r\n _.map(updatedSchema.properties.CampaignCampaignType.enum, item => item.replace(duplicatedString, ''));\r\n // Search term campaign type filer not supported for Dynamic, Audience, and Smart\r\n const supportedTypes = [\"Enum.CampaignType'Default'\", \"Enum.CampaignType'Shopping'\"];\r\n updatedSchema.properties.CampaignCampaignType.enum =\r\n _.filter(\r\n updatedSchema.properties.CampaignCampaignType.enum,\r\n type => supportedTypes.indexOf(type) >= 0\r\n );\r\n const updatedEnumValueMap = {};\r\n _.each(updatedSchema.properties.CampaignCampaignType.enumValueMap, (val, key) => {\r\n updatedEnumValueMap[key.replace(duplicatedString, '')] = val;\r\n });\r\n updatedSchema.properties.CampaignCampaignType.enumValueMap = updatedEnumValueMap;\r\n }\r\n\r\n if (this.Permissions.IsSearchTermCloseVariantMatchTypeEnabled) {\r\n // hide old enum 'DeliveredMatchType'\r\n updatedSchema.properties = _.omit(updatedSchema.properties, 'DeliveredMatchType');\r\n\r\n // Delete deprecated enum value 'Content' for DeliveredMatchTypeWithCloseVariant\r\n const deletingNewEnumItem = \"Enum.MatchTypeWithCloseVariant'Content'\";\r\n updatedSchema.properties.DeliveredMatchTypeWithCloseVariant.enum = _.without(\r\n updatedSchema.properties.DeliveredMatchTypeWithCloseVariant.enum,\r\n deletingNewEnumItem\r\n );\r\n updatedSchema.properties.DeliveredMatchTypeWithCloseVariant.enumValueMap = _.omit(\r\n updatedSchema.properties.DeliveredMatchTypeWithCloseVariant.enumValueMap,\r\n deletingNewEnumItem\r\n );\r\n\r\n // format filter appearance\r\n updatedSchema.properties.DeliveredMatchTypeWithCloseVariant.enumValueMap[\"Enum.MatchTypeWithCloseVariant'ExactCloseVariant'\"]\r\n = this.passedInI18n.getString('SearchTermMatchType_ExactCloseVariant');\r\n updatedSchema.properties.DeliveredMatchTypeWithCloseVariant.enumValueMap[\"Enum.MatchTypeWithCloseVariant'PhraseCloseVariant'\"]\r\n = this.passedInI18n.getString('SearchTermMatchType_PhraseCloseVariant');\r\n } else {\r\n // hide old enum 'DeliveredMatchTypeWithCloseVariant'\r\n updatedSchema.properties = _.omit(updatedSchema.properties, 'DeliveredMatchTypeWithCloseVariant');\r\n\r\n // Delete deprecated enum value 'Content' for DeliveredMatchType\r\n const deletingEnumItem = \"Enum.MatchType'Content'\";\r\n updatedSchema.properties.DeliveredMatchType.enum =\r\n _.without(updatedSchema.properties.DeliveredMatchType.enum, deletingEnumItem);\r\n updatedSchema.properties.DeliveredMatchType.enumValueMap =\r\n _.omit(updatedSchema.properties.DeliveredMatchType.enumValueMap, deletingEnumItem);\r\n }\r\n\r\n const isPredictiveTargetingEnabled = this.Permissions && this.Permissions.dynamic && this.Permissions.dynamic.RSABidStrategyAutoTargeting;\r\n const isPredictiveMatchingEnabled = this.Permissions && this.Permissions.dynamic && this.Permissions.dynamic.PredictiveMatching;\r\n if (!isPredictiveTargetingEnabled && !isPredictiveMatchingEnabled) {\r\n if (updatedSchema.properties.DeliveredMatchTypeWithCloseVariant) {\r\n updatedSchema.properties.DeliveredMatchTypeWithCloseVariant.enum = _.without(updatedSchema.properties.DeliveredMatchTypeWithCloseVariant.enum, \"Enum.MatchTypeWithCloseVariant'Predictive'\");\r\n }\r\n if (updatedSchema.properties.MatchType) {\r\n updatedSchema.properties.MatchType.enum = _.without(updatedSchema.properties.MatchType.enum, \"Enum.MatchType'Predictive'\");\r\n }\r\n }\r\n\r\n return updatedSchema;\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\nconst getAccountInactiveReasonsContainsQuery =\r\n valueArr => `AccountInactiveReasons/any(r:r/Reason eq Enum.AccountInactiveReasonCode'${valueArr[0]}')`;\r\nconst getAccountInactiveReasonsDoesNotContainQuery =\r\n valueArr => `AccountInactiveReasons/all(r:r/Reason ne Enum.AccountInactiveReasonCode'${valueArr[0]}')`;\r\n\r\nexport function updateEntitySchemaForAccountInactiveReasons(entitySchema, schemaI18nCampaign, permissions) {\r\n const enumValues = [\r\n 'PausedDueToSystemIssue',\r\n 'PausedZeroBalance',\r\n 'PausedNoValidIO',\r\n 'Processing',\r\n 'PendingPaymentMethod',\r\n 'PendingNewCustomer',\r\n 'Inactive',\r\n 'Hold',\r\n 'Deleted',\r\n 'AccountMissingVATId',\r\n 'AccountVerificationHold',\r\n ...permissions.dynamic && permissions.dynamic.TSTMasterDataMissingNotification ? [\r\n 'AccountTradeScreeningDataIssue',\r\n 'AccountTradeScreeningUnderReview',\r\n 'BillToCustomerTradeScreeningDataIssue',\r\n 'BillToCustomerTradeScreeningUnderReview',\r\n 'AccountTradeScreeningLicenseRequired',\r\n 'BillToCustomerTradeScreeningLicenseRequired',\r\n ] : [],\r\n ];\r\n\r\n _.extend(entitySchema.properties, {\r\n AccountInactiveReasons: {\r\n name: 'AccountInactiveReasons',\r\n title: schemaI18nCampaign.property('Account', 'AccountInactiveReasons'),\r\n localized: _.object(enumValues, _.map(enumValues, value => schemaI18nCampaign.value('AccountInactiveReason', 'Reason', value))),\r\n chooseType: 'select',\r\n operators: ['contains', 'doesnotcontain'],\r\n enum: enumValues,\r\n enumValueMap: {}, // just a placeholder so page will not break because of undefined.\r\n type: 'string',\r\n property: 'AccountInactiveReasons',\r\n originalProperty: 'AccountInactiveReasons',\r\n filterable: true,\r\n },\r\n });\r\n\r\n return entitySchema;\r\n}\r\n\r\nexport function updateOdataOptionsForAccountInactiveReasons(options = {}) {\r\n options.custom = options.custom || {}; // eslint-disable-line no-param-reassign\r\n\r\n _.extendOwn(options.custom, {\r\n AccountInactiveReasons: {\r\n contains: getAccountInactiveReasonsContainsQuery,\r\n doesnotcontain: getAccountInactiveReasonsDoesNotContainQuery,\r\n },\r\n });\r\n\r\n return options;\r\n}\r\n","import _ from 'underscore';\r\nimport { BaseSchemaProcessor } from './base-schema-processor';\r\nimport {\r\n updateEntitySchemaForAccountInactiveReasons,\r\n updateOdataOptionsForAccountInactiveReasons,\r\n} from '../util/update-account-inactive-reason-property-for-filter';\r\nimport { initialize as initializeLabels, updateEntitySchemaForLabels, updateOdataOptionsForLabels } from '../util/update-label-property-for-filter';\r\n\r\nexport class BaseAccountsSchemaProcessor extends BaseSchemaProcessor {\r\n constructor(options, { propWhitelist, allowBiPattern = false }) {\r\n super(options);\r\n this.propWhitelist = propWhitelist;\r\n this.allowBiPattern = allowBiPattern;\r\n this.schemaI18nCampaign = options.schemaI18nCampaign;\r\n if (this.Permissions.IsAccountLabelsEnabled) {\r\n initializeLabels(options);\r\n }\r\n }\r\n\r\n // Abstract function to use in child's Processor if needed\r\n getOverridenSchemaProperties() {\r\n return {};\r\n }\r\n\r\n getAdditionalSchemaProperties() {\r\n return {};\r\n }\r\n\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n const updatedSchema = super.updateEntitySchemaForFeatures(entitySchema);\r\n\r\n const biPattern = /^(PoP)?PerformanceMetrics/;\r\n\r\n updatedSchema.properties = _.pick(\r\n updatedSchema.properties,\r\n prop => _.contains(this.propWhitelist, prop.property) ||\r\n (this.allowBiPattern && biPattern.test(prop.property))\r\n );\r\n\r\n updatedSchema.properties = {\r\n ...updatedSchema.properties,\r\n ...this.getAdditionalSchemaProperties(),\r\n };\r\n\r\n const overridenProperties = {\r\n // Common properties to override\r\n ...{\r\n Name: { title: this.i18n.getString('FilterLocalization_DataAttribute_AccountName') },\r\n AccountType: {\r\n chooseType: 'radio',\r\n },\r\n },\r\n // child properties to override\r\n ...this.getOverridenSchemaProperties(),\r\n };\r\n\r\n updatedSchema.properties = _.mapObject(updatedSchema.properties, (prop) => {\r\n Object.assign(prop, overridenProperties[prop.name]);\r\n\r\n return {\r\n ...prop,\r\n title: prop.title || this.i18n.getString(`FilterLocalization_DataAttribute_${_.result(prop.alias, 'legacy') || prop.originalProperty}`),\r\n };\r\n });\r\n\r\n updateEntitySchemaForAccountInactiveReasons(updatedSchema, this.schemaI18nCampaign, this.Permissions);\r\n if (this.Permissions && this.Permissions.IsAccountLabelsEnabled) {\r\n updateEntitySchemaForLabels(updatedSchema, true);\r\n }\r\n\r\n return updatedSchema;\r\n }\r\n\r\n updateOdataOptions(odataOptions) {\r\n super.updateOdataOptions(odataOptions);\r\n\r\n updateOdataOptionsForAccountInactiveReasons(odataOptions);\r\n\r\n if (this.Permissions && this.Permissions.IsAccountLabelsEnabled) {\r\n updateOdataOptionsForLabels(odataOptions, true);\r\n }\r\n return odataOptions;\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { BaseAccountsSchemaProcessor } from './base-accounts-schema-processor';\r\nimport { initialize as initializeAvailableInsightTypeIds, updateEntitySchemaForAvailableInsightTypeIds, updateOdataOptionsForAvailableInsightTypeIds } from '../util/update-available-insight-type-ids-property-for-filter';\r\n\r\nexport class PerformanceSchemaProcessor extends BaseAccountsSchemaProcessor {\r\n constructor(options) {\r\n const propWhitelist = _.compact([\r\n 'Name',\r\n 'Currency',\r\n 'AccountType',\r\n 'Owner',\r\n 'BillToCustomerName',\r\n 'Budget/DailyBudget',\r\n 'InsertionOrderDetails/CurrentInsertionOrder/Budget',\r\n 'InsertionOrderDetails/CurrentInsertionOrder/RemainingBudget',\r\n 'InsertionOrderDetails/CurrentInsertionOrder/StartDate',\r\n 'InsertionOrderDetails/CurrentInsertionOrder/EndDate',\r\n 'InsertionOrderDetails/CurrentInsertionOrder/PurchaseOrder',\r\n 'AvailableInsightTypeIds',\r\n ]);\r\n\r\n initializeAvailableInsightTypeIds(options);\r\n super(options, { propWhitelist, allowBiPattern: true });\r\n }\r\n\r\n getOverridenSchemaProperties() {\r\n return {\r\n // TODO: Task 2242006 Date selection filter\r\n InsertionOrderDetailsCurrentInsertionOrderEndDate: { filterable: false },\r\n // TODO: Task 2242006 Date selection filter\r\n InsertionOrderDetailsCurrentInsertionOrderStartDate: { filterable: false },\r\n };\r\n }\r\n\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n const updatedSchema = super.updateEntitySchemaForFeatures(entitySchema);\r\n updateEntitySchemaForAvailableInsightTypeIds(updatedSchema);\r\n updatedSchema.properties = _.omit(\r\n updatedSchema.properties,\r\n 'PerformanceMetricsCostPerInstall',\r\n 'PerformanceMetricsRevenuePerInstall'\r\n );\r\n return updatedSchema;\r\n }\r\n\r\n updateOdataOptions(odataOptions) {\r\n super.updateOdataOptions(odataOptions);\r\n updateOdataOptionsForAvailableInsightTypeIds(odataOptions);\r\n return odataOptions;\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { BaseAccountsSchemaProcessor } from './base-accounts-schema-processor';\r\nimport { initialize as initializeAvailableInsightTypeIds, updateEntitySchemaForAvailableInsightTypeIds, updateOdataOptionsForAvailableInsightTypeIds } from '../util/update-available-insight-type-ids-property-for-filter';\r\n\r\nexport class SmartPerformanceSchemaProcessor extends BaseAccountsSchemaProcessor {\r\n constructor(options) {\r\n const propWhitelist = _.compact([\r\n 'Name',\r\n 'Currency',\r\n 'AccountType',\r\n 'Owner',\r\n 'BillToCustomerName',\r\n 'Budget/DailyBudget',\r\n ]);\r\n\r\n initializeAvailableInsightTypeIds(options);\r\n super(options, { propWhitelist, allowBiPattern: true });\r\n }\r\n\r\n getOverridenSchemaProperties() {\r\n return {\r\n PerformanceMetricsAverageCPC: { filterable: false },\r\n PerformanceMetricsAverageCPM: { filterable: false },\r\n PerformanceMetricsTopImpressionRate: { filterable: false },\r\n PerformanceMetricsAbsoluteTopImpressionRate: { filterable: false },\r\n PerformanceMetricsAuctionWonPercent: { filterable: false },\r\n PerformanceMetricsAuctionLostToBudgetPercent: { filterable: false },\r\n PerformanceMetricsAuctionLostToRankPercent: { filterable: false },\r\n PerformanceMetricsAudienceAuctionWonPercent: { filterable: false },\r\n PerformanceMetricsAudienceTopISLostToBudgetPercent: { filterable: false },\r\n PerformanceMetricsAudienceTopISLostToRankPercent: { filterable: false },\r\n PerformanceMetricsClickSharePercent: { filterable: false },\r\n PerformanceMetricsExactMatchImpressionSharePercent: { filterable: false },\r\n PerformanceMetricsAbsoluteTopImpressionSharePercent: { filterable: false },\r\n PerformanceMetricsTopImpressionSharePercent: { filterable: false },\r\n PerformanceMetricsTopISLostToBudgetPercent: { filterable: false },\r\n PerformanceMetricsTopISLostToRankPercent: { filterable: false },\r\n PerformanceMetricsAbsoluteTopISLostToBudgetPercent: { filterable: false },\r\n PerformanceMetricsAbsoluteTopISLostToRankPercent: { filterable: false },\r\n PerformanceMetricsAllConversions: { filterable: false },\r\n PerformanceMetricsViewThroughConversions: { filterable: false },\r\n PerformanceMetricsViewThroughConversionsRevenue: { filterable: false },\r\n PerformanceMetricsViewThroughConversionsCPA: { filterable: false },\r\n PerformanceMetricsViewThroughConversionsReturnOnAdSpend: { filterable: false },\r\n PerformanceMetricsViewThroughConversionsRate: { filterable: false },\r\n PerformanceMetricsAllConversionCPA: { filterable: false },\r\n PerformanceMetricsAllConversionRate: { filterable: false },\r\n PerformanceMetricsAllConversionAdvertiserReportedRevenue: { filterable: false },\r\n PerformanceMetricsAllConversionRevenueOnAdSpend: { filterable: false },\r\n PerformanceMetricsRevenueOnAdSpend: { filterable: false },\r\n PerformanceMetricsAdvertiserReportedRevenue: { filterable: false },\r\n };\r\n }\r\n\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n const updatedSchema = super.updateEntitySchemaForFeatures(entitySchema);\r\n updateEntitySchemaForAvailableInsightTypeIds(updatedSchema);\r\n return updatedSchema;\r\n }\r\n\r\n updateOdataOptions(odataOptions) {\r\n super.updateOdataOptions(odataOptions);\r\n updateOdataOptionsForAvailableInsightTypeIds(odataOptions);\r\n return odataOptions;\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { BaseAccountsSchemaProcessor } from './base-accounts-schema-processor';\r\n\r\nexport class ManagementSchemaProcessor extends BaseAccountsSchemaProcessor {\r\n constructor(options) {\r\n const propWhitelist = _.compact([\r\n 'Name',\r\n 'Currency',\r\n 'AccountType',\r\n 'Owner',\r\n 'BillToCustomerName',\r\n 'Budget/DailyBudget',\r\n 'Balance',\r\n 'PaymentInstrumentType',\r\n 'PreferredUserName',\r\n 'AccountVerificationStatus',\r\n 'BusinessLegalName',\r\n ]);\r\n super(options, { propWhitelist });\r\n const { dynamic } = this.Permissions;\r\n const IsChinaMarket = dynamic ? dynamic.CNMarketExpansion : false;\r\n this.isChinaMarket = IsChinaMarket;\r\n }\r\n\r\n getAdditionalSchemaProperties() {\r\n const additionalProperties = {};\r\n\r\n if (this.Permissions && this.Permissions.dynamic && this.Permissions.dynamic.CBTLifetimeBudget) {\r\n additionalProperties.LifetimeBudget = {\r\n title: this.passedInI18n.getString('ColumnName_CampaignLifetimeBudget'),\r\n property: 'Budget/LifetimeBudget',\r\n type: 'number',\r\n minimum: 0,\r\n filterable: true,\r\n };\r\n }\r\n\r\n return additionalProperties;\r\n }\r\n\r\n getOverridenSchemaProperties() {\r\n /* By design, filter fail or verified should also return overrideFailed and overrideVerified\r\n status from the query, so we filter the overrides status out here and add them in the query\r\n bellow, c.f. odataOptions.custom */\r\n // TODO: [jingl] comment this line to temporarily resolve build issue. Will fix later.\r\n // const aivStatusEnumValues =\r\n // _.values(_.omit(AccountVerificationStatus, 'OverrideFailed', 'OverrideVerified'));\r\n const aivStatusEnumValues = this.isChinaMarket ? [61, 62, 63, 64, 65, 66] : [1, 3, 4, 5, 6, 8, 9];\r\n\r\n return {\r\n PaymentInstrumentType: {\r\n // MT has type int, we need to override it is since all filters\r\n // value must be string for the type select\r\n type: 'string',\r\n // BUG 2245709: Override default [eq] operator because jsdata won't recognise it\r\n // due to the type select returns an array. In other words: jsdata predicate,\r\n // { where: $eq: [...values] } crash so we need to use $in: [...values] and\r\n // override the URL statement in odataOptions.custom)\r\n operators: ['in'],\r\n operatorDisplayNameMap: {\r\n in: this.passedInI18n.getString('Filter_Operator_EQ'),\r\n },\r\n },\r\n AccountVerificationStatus: {\r\n title: this.passedInI18n.getString('ColumnName_AccountVerificationStatus'),\r\n enum: aivStatusEnumValues,\r\n enumType: 'AccountVerificationStatus',\r\n enumValueMap: {},\r\n localized: _.object(aivStatusEnumValues, _.map(aivStatusEnumValues, value => this.i18n.getString(`AccountVerificationStatus_${value}`))),\r\n // Same as PaymentInstrumentType, we need to override it to string to make filter work\r\n type: 'string',\r\n operators: ['in'],\r\n chooseType: 'checkbox',\r\n filterable: true,\r\n },\r\n BusinessLegalName: {\r\n title: this.passedInI18n.getString('ColumnName_BusinessLegalName'),\r\n },\r\n };\r\n }\r\n\r\n updateOdataOptions(odataOptions) {\r\n super.updateOdataOptions(odataOptions);\r\n\r\n _.extendOwn(odataOptions.custom, {\r\n PaymentInstrumentType: {\r\n eq: (value) => {\r\n const intValue = value.split(\"'\")[1];\r\n const url = `PaymentInstrumentType eq ${intValue}`;\r\n return url;\r\n },\r\n },\r\n AccountVerificationStatus: {\r\n eq: (value) => {\r\n let url = `AccountVerificationStatus eq ${value}`;\r\n if (value === 1) { // AccountVerificationStatus.Failed\r\n url += ' or AccountVerificationStatus eq 2'; // AccountVerificationStatus.OverrideFailed\r\n }\r\n if (value === 6) { // AccountVerificationStatus.Verified\r\n url += ' or AccountVerificationStatus eq 7'; // AccountVerificationStatus.OverrideVerified\r\n }\r\n return url;\r\n },\r\n },\r\n });\r\n\r\n return odataOptions;\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { BaseAccountsSchemaProcessor } from './base-accounts-schema-processor';\r\n\r\nexport class AccountImportSchemaProcessor extends BaseAccountsSchemaProcessor {\r\n constructor(options) {\r\n const propWhitelist = _.compact([\r\n 'Name',\r\n 'LastImportInfo/ImportName',\r\n 'LastImportInfo/EntityIdsSpecified',\r\n ]);\r\n\r\n super(options, { propWhitelist });\r\n }\r\n\r\n getOverridenSchemaProperties() {\r\n return {\r\n LastImportInfoEntityIdsSpecified: {\r\n chooseType: 'radio-boolean',\r\n operators: ['eq'],\r\n },\r\n };\r\n }\r\n}\r\n","import { cloneDeep } from '@bingads-webui-universal/primitive-utilities';\r\nimport { BaseSchemaProcessor } from './base-schema-processor';\r\n\r\nexport class TagSchemaProcessor extends BaseSchemaProcessor {\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n const {\r\n IsCustomerHierarchyEnabled,\r\n IsSharedLibraryPhase1Enabled,\r\n } = this.Permissions;\r\n const isOwnerFilterable = IsCustomerHierarchyEnabled && IsSharedLibraryPhase1Enabled;\r\n const updatedSchema = cloneDeep(entitySchema);\r\n\r\n if (!isOwnerFilterable) {\r\n delete updatedSchema.properties.OwnerName;\r\n delete updatedSchema.properties.OwnerNumber;\r\n }\r\n\r\n return updatedSchema;\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { BaseSchemaProcessor } from './base-schema-processor';\r\n\r\nexport class LinkedStoreSchemaProcessor extends BaseSchemaProcessor {\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n const updatedSchema = super.updateEntitySchemaForFeatures(entitySchema);\r\n\r\n updatedSchema.properties = {\r\n Status: {\r\n filterable: true,\r\n title: 'Status',\r\n type: 'string',\r\n property: 'Status',\r\n originalProperty: 'Status',\r\n required: true,\r\n maximum: 1,\r\n enumValueMap: {\r\n 0: 'Pending',\r\n 1: 'Approved',\r\n 2: 'Rejected',\r\n 3: 'Expired',\r\n 4: 'Cancelled',\r\n },\r\n enum: [\r\n 0,\r\n 1,\r\n 2,\r\n 3,\r\n 4,\r\n ],\r\n operators: [\r\n 'eq',\r\n ],\r\n chooseType: 'radio',\r\n },\r\n };\r\n\r\n return updatedSchema;\r\n }\r\n\r\n updateOdataOptions(odataOptions) {\r\n super.updateOdataOptions(odataOptions);\r\n\r\n _.extendOwn(odataOptions.custom, {\r\n Status: {\r\n eq: (value) => {\r\n const status = value.split('\\'')[1];\r\n const url = `Status eq '${status}'`;\r\n\r\n return url;\r\n },\r\n },\r\n });\r\n\r\n return odataOptions;\r\n }\r\n}\r\n","import { extend } from 'underscore';\r\nimport { BaseSchemaProcessor } from './base-schema-processor';\r\nimport { updateOdataOptionsForFinalUrl } from '../util/update-final-url-property-for-filter';\r\n\r\nexport class GoalSchemaProcessor extends BaseSchemaProcessor {\r\n constructor(options) {\r\n super(options);\r\n this.goalsI18n = options.passedInI18n;\r\n }\r\n\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n const updatedSchema = super.updateEntitySchemaForFeatures(entitySchema);\r\n const {\r\n IsViewThroughConversionEnabled,\r\n dynamic = {},\r\n } = this.Permissions;\r\n const {\r\n PartialConversions: IsPartialConversionsEnabled,\r\n ColumnConversion: IsColumnConversionEnabled,\r\n } = dynamic;\r\n const usePartialConversions = IsPartialConversionsEnabled && IsColumnConversionEnabled;\r\n\r\n updatedSchema.properties.IsMainConversionGoal = {\r\n filterable: true,\r\n name: 'IsMainConversionGoal',\r\n chooseType: 'radio-boolean',\r\n type: 'boolean',\r\n property: 'IsMainConversionGoal',\r\n };\r\n\r\n if (IsViewThroughConversionEnabled) {\r\n if (usePartialConversions) {\r\n updatedSchema.properties.ViewThroughConversionsCredit = {\r\n filterable: true,\r\n name: 'ViewThroughConversionsCredit',\r\n type: 'number',\r\n property: 'GoalPerformanceMetrics/ViewThroughConversionsCredit',\r\n required: true,\r\n alias: {\r\n propertyConversion: {\r\n sourcePropertyType: 'number',\r\n sourcePropertyName: 'ViewThroughConversions',\r\n },\r\n },\r\n };\r\n } else {\r\n updatedSchema.properties.ViewThroughConversions = {\r\n filterable: true,\r\n name: 'ViewThroughConversions',\r\n type: 'number',\r\n property: 'GoalPerformanceMetrics/ViewThroughConversions',\r\n required: true,\r\n alias: {\r\n propertyConversion: {\r\n sourcePropertyType: 'number',\r\n sourcePropertyName: 'ViewThroughConversionsCredit',\r\n },\r\n },\r\n };\r\n }\r\n }\r\n\r\n delete updatedSchema.properties.Labels;\r\n\r\n if (this.goalsI18n) {\r\n extend(updatedSchema.properties.Status, {\r\n localized: {\r\n \"Enum.GoalStatus'Paused'\": this.goalsI18n.getString('EntityStatus_Paused'),\r\n },\r\n });\r\n }\r\n\r\n return updatedSchema;\r\n }\r\n\r\n updateOdataOptions(odataOptions) {\r\n super.updateOdataOptions(odataOptions);\r\n updateOdataOptionsForFinalUrl(odataOptions);\r\n\r\n return odataOptions;\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport { cloneDeep } from '@bingads-webui-universal/primitive-utilities';\r\nimport { BaseSchemaProcessor } from './base-schema-processor';\r\nimport { lambdaConvertForArrayTypes } from '../util/update-odata-options-for-array-type';\r\n\r\nclass CampaignTypesDataSource {\r\n constructor(i18n) {\r\n this.disableSearch = true;\r\n this.campaignTypes = [{\r\n Id: 'Default',\r\n Name: i18n.getString(_TL_('Search')),\r\n }, {\r\n Id: 'Shopping',\r\n Name: i18n.getString(_TL_('Shopping')),\r\n }];\r\n }\r\n\r\n get(_viewFilter, searchFilter) {\r\n if (!searchFilter) {\r\n return Promise.resolve(this.campaignTypes);\r\n }\r\n\r\n const searchFilterLowerCase = searchFilter.toLowerCase();\r\n const typesToReturn =\r\n _.select(\r\n this.campaignTypes,\r\n type => type.Name.toLowerCase().indexOf(searchFilterLowerCase) === 0\r\n );\r\n\r\n return Promise.resolve(typesToReturn);\r\n }\r\n\r\n getByIds() {\r\n return Promise.resolve(this.campaignTypes);\r\n }\r\n}\r\n\r\nclass DeviceTypesDataSource {\r\n constructor(i18n) {\r\n this.disableSearch = true;\r\n this.deviceTypes = [{\r\n Id: 'Smartphones',\r\n Name: i18n.getString(_TL_('Smartphones')),\r\n }, {\r\n Id: 'Tablets',\r\n Name: i18n.getString(_TL_('Tablets')),\r\n }, {\r\n Id: 'Computers',\r\n Name: i18n.getString(_TL_('Computers')),\r\n }];\r\n }\r\n\r\n get(_viewFilter, searchFilter) {\r\n if (!searchFilter) {\r\n return Promise.resolve(this.deviceTypes);\r\n }\r\n\r\n const searchFilterLowerCase = searchFilter.toLowerCase();\r\n const typesToReturn =\r\n _.select(\r\n this.deviceTypes,\r\n type => type.Name.toLowerCase().indexOf(searchFilterLowerCase) === 0\r\n );\r\n\r\n return Promise.resolve(typesToReturn);\r\n }\r\n\r\n getByIds() {\r\n return Promise.resolve(this.deviceTypes);\r\n }\r\n}\r\n\r\nexport class SeasonalityAdjustmentSchemaProcessor extends BaseSchemaProcessor {\r\n updateOdataOptions(options) {\r\n const optionsCopy = options || { custom: {} };\r\n\r\n _.extendOwn(optionsCopy.custom, {\r\n CampaignTypeFilter: {\r\n containsall: lambdaConvertForArrayTypes('and', 'any', 'eq', 'CampaignTypeFilter', 'CampaignType'),\r\n containsany: lambdaConvertForArrayTypes('or', 'any', 'eq', 'CampaignTypeFilter', 'CampaignType'),\r\n containsnone: lambdaConvertForArrayTypes('and', 'all', 'ne', 'CampaignTypeFilter', 'CampaignType'),\r\n },\r\n DeviceTypeFilter: {\r\n containsall: lambdaConvertForArrayTypes('and', 'any', 'eq', 'DeviceTypeFilter', 'DeviceType'),\r\n containsany: lambdaConvertForArrayTypes('or', 'any', 'eq', 'DeviceTypeFilter', 'DeviceType'),\r\n containsnone: lambdaConvertForArrayTypes('and', 'all', 'ne', 'DeviceTypeFilter', 'DeviceType'),\r\n },\r\n });\r\n return optionsCopy;\r\n }\r\n\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n const entitySchemaCopy = cloneDeep(entitySchema);\r\n const operatorDisplayNameMap = {\r\n containsall: this.passedInI18n.getString(_TL_('contains all')),\r\n containsany: this.passedInI18n.getString(_TL_('contains any')),\r\n containsnone: this.passedInI18n.getString(_TL_('contains none')),\r\n };\r\n const operators = ['containsall', 'containsany', 'containsnone'];\r\n\r\n entitySchemaCopy.properties.CampaignTypeFilter = {\r\n property: 'CampaignTypeFilter',\r\n name: this.passedInI18n.getString(_TL_('Campaign type')),\r\n title: this.passedInI18n.getString(_TL_('Campaign type')),\r\n operatorDisplayNameMap,\r\n operators,\r\n type: 'id',\r\n filterable: true,\r\n addtionalParams: {\r\n dataSource: new CampaignTypesDataSource(this.passedInI18n),\r\n selectorOptions: {\r\n keyMap: {\r\n Selector_Filter_Placeholder: () => this.passedInI18n.getString(_TL_('Campaign type')),\r\n },\r\n },\r\n },\r\n };\r\n\r\n entitySchemaCopy.properties.DeviceTypeFilter = {\r\n property: 'DeviceTypeFilter',\r\n name: this.passedInI18n.getString(_TL_('Device type')),\r\n title: this.passedInI18n.getString(_TL_('Device type')),\r\n operatorDisplayNameMap,\r\n operators,\r\n type: 'id',\r\n filterable: true,\r\n addtionalParams: {\r\n dataSource: new DeviceTypesDataSource(this.passedInI18n),\r\n selectorOptions: {\r\n keyMap: {\r\n Selector_Filter_Placeholder: () => this.passedInI18n.getString(_TL_('Device type')),\r\n },\r\n },\r\n },\r\n };\r\n\r\n return entitySchemaCopy;\r\n }\r\n}\r\n\r\n/**\r\n * In Odata model, DataExclusion is a special SeasonalityAdjustment.\r\n *\r\n * This is a string restriction. However, there are some difference, and we want to reuse most of the logic.\r\n *\r\n * So use inheritage from \"SeasonalityAdjustmentSchemaProcessor\" rather than \"BaseSchemaProcessor\"\r\n */\r\nexport class DataExclusionSchemaProcessor extends SeasonalityAdjustmentSchemaProcessor {\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n const entitySchemaCopy = super.updateEntitySchemaForFeatures(entitySchema);\r\n\r\n if (entitySchemaCopy.properties.AdjustmentPercentage) {\r\n entitySchemaCopy.properties.AdjustmentPercentage = {\r\n ...entitySchemaCopy.properties.AdjustmentPercentage,\r\n filterable: false,\r\n };\r\n }\r\n\r\n return entitySchemaCopy;\r\n }\r\n}\r\n","import { pick } from 'underscore';\r\nimport { cloneDeep } from '@bingads-webui-universal/primitive-utilities';\r\nimport { BaseSchemaProcessor } from './base-schema-processor';\r\n\r\n// shared budget summary page.\r\n// keep columns align with the old ui grid.\r\nexport class SharedBudgetSchemaProcessor extends BaseSchemaProcessor {\r\n constructor(options) {\r\n super(options);\r\n this.Permissions = options.globalConfig.get('Permissions');\r\n }\r\n\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n const updatedSchema = cloneDeep(entitySchema);\r\n const {\r\n IsViewThroughConversionsRevenueEnabled,\r\n IsViewThroughConversionEnabled,\r\n IsAvgPositionDeprecationPhase2Enabled,\r\n dynamic = {},\r\n } = this.Permissions;\r\n const {\r\n PartialConversions: IsPartialConversionsEnabled,\r\n ColumnConversion: IsColumnConversionEnabled,\r\n } = dynamic;\r\n const usePartialConversions = IsPartialConversionsEnabled && IsColumnConversionEnabled;\r\n\r\n\r\n const propertyList = [\r\n 'Name',\r\n 'PerformanceMetricsSpend',\r\n 'PerformanceMetricsClicks',\r\n 'PerformanceMetricsImpressions',\r\n 'PerformanceMetricsCTR',\r\n 'PerformanceMetricsAveragePosition',\r\n 'PerformanceMetricsAverageCPC',\r\n usePartialConversions ? 'PerformanceMetricsConversionsCredit' : 'PerformanceMetricsConversions',\r\n usePartialConversions ? 'PerformanceMetricsAllConversionsCredit' : 'PerformanceMetricsAllConversions',\r\n ];\r\n\r\n if (IsViewThroughConversionEnabled) {\r\n propertyList.push(usePartialConversions ? 'PerformanceMetricsViewThroughConversionsCredit' : 'PerformanceMetricsViewThroughConversions');\r\n }\r\n\r\n if (IsViewThroughConversionsRevenueEnabled) {\r\n propertyList.push('PerformanceMetricsViewThroughConversionsRevenue');\r\n propertyList.push(usePartialConversions ? 'PerformanceMetricsViewThroughPartialConversionsCPA' : 'PerformanceMetricsViewThroughConversionsCPA');\r\n propertyList.push('PerformanceMetricsViewThroughConversionsReturnOnAdSpend');\r\n propertyList.push(usePartialConversions ? 'PerformanceMetricsViewThroughPartialConversionsRate' : 'PerformanceMetricsViewThroughConversionsRate');\r\n }\r\n\r\n if (IsAvgPositionDeprecationPhase2Enabled) {\r\n propertyList.push('PerformanceMetricsTopImpressionRate');\r\n propertyList.push('PerformanceMetricsAbsoluteTopImpressionRate');\r\n }\r\n\r\n updatedSchema.properties = pick(updatedSchema.properties, propertyList);\r\n\r\n return updatedSchema;\r\n }\r\n}\r\n","import { pick } from 'underscore';\r\nimport { cloneDeep } from '@bingads-webui-universal/primitive-utilities';\r\nimport { BaseSchemaProcessor } from './base-schema-processor';\r\n\r\nexport class SharedBudgetCampaignSchemaProcessor extends BaseSchemaProcessor {\r\n constructor(options) {\r\n super(options);\r\n this.Permissions = options.globalConfig.get('Permissions');\r\n }\r\n\r\n // shared budget edit page.\r\n // keep columns align with the old ui grid.\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n const updatedSchema = cloneDeep(entitySchema);\r\n const {\r\n IsViewThroughConversionsRevenueEnabled,\r\n IsViewThroughConversionEnabled,\r\n IsAvgPositionDeprecationPhase2Enabled,\r\n dynamic = {},\r\n } = this.Permissions;\r\n const {\r\n PartialConversions: IsPartialConversionsEnabled,\r\n ColumnConversion: IsColumnConversionEnabled,\r\n } = dynamic;\r\n const usePartialConversions = IsPartialConversionsEnabled && IsColumnConversionEnabled;\r\n\r\n const propertyList = [\r\n 'Name',\r\n 'PerformanceMetricsClicks',\r\n 'PerformanceMetricsImpressions',\r\n 'PerformanceMetricsCTR',\r\n 'PerformanceMetricsAverageCPC',\r\n 'PerformanceMetricsSpend',\r\n 'PerformanceMetricsAveragePosition',\r\n usePartialConversions ? 'PerformanceMetricsConversionsCredit' : 'PerformanceMetricsConversions',\r\n usePartialConversions ? 'PerformanceMetricsPartialConversionRate' : 'PerformanceMetricsConversionRate',\r\n ];\r\n\r\n if (IsViewThroughConversionEnabled) {\r\n propertyList.push(usePartialConversions ? 'PerformanceMetricsViewThroughConversionsCredit' : 'PerformanceMetricsViewThroughConversions');\r\n }\r\n\r\n if (IsViewThroughConversionsRevenueEnabled) {\r\n propertyList.push('PerformanceMetricsViewThroughConversionsRevenue');\r\n propertyList.push(usePartialConversions ? 'PerformanceMetricsViewThroughPartialConversionsCPA' : 'PerformanceMetricsViewThroughConversionsCPA');\r\n propertyList.push('PerformanceMetricsViewThroughConversionsReturnOnAdSpend');\r\n propertyList.push(usePartialConversions ? 'PerformanceMetricsViewThroughPartialConversionsRate' : 'PerformanceMetricsViewThroughConversionsRate');\r\n }\r\n\r\n propertyList.push(usePartialConversions ? 'PerformanceMetricsAllConversionsCredit' : 'PerformanceMetricsAllConversions');\r\n\r\n if (IsAvgPositionDeprecationPhase2Enabled) {\r\n propertyList.push('PerformanceMetricsTopImpressionRate');\r\n propertyList.push('PerformanceMetricsAbsoluteTopImpressionRate');\r\n }\r\n\r\n updatedSchema.properties = pick(updatedSchema.properties, propertyList);\r\n\r\n return updatedSchema;\r\n }\r\n}\r\n","/* eslint-disable no-param-reassign */\r\nimport { BaseSchemaProcessor } from './base-schema-processor';\r\n\r\nexport class SelAccountLevelListsGridSchemaProcessor extends BaseSchemaProcessor {\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n // Hide filterable fields that are in the entitySchema but not in this grid.\r\n const entityNameProperty = entitySchema.properties.EntityName;\r\n const sharedEntityCustomerIdProperty = entitySchema.properties.SharedEntityCustomerId;\r\n\r\n if (entityNameProperty) {\r\n entityNameProperty.filterable = false;\r\n }\r\n\r\n if (sharedEntityCustomerIdProperty) {\r\n sharedEntityCustomerIdProperty.filterable = false;\r\n }\r\n\r\n return entitySchema;\r\n }\r\n}\r\n","/* eslint-disable no-param-reassign */\r\nimport { BaseSchemaProcessor } from './base-schema-processor';\r\n\r\nexport class SelCustomerLevelAssociationsGridSchemaProcessor extends BaseSchemaProcessor {\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n // Hide filterable fields that are in the entitySchema but not in this grid.\r\n const sharedEntityNameProperty = entitySchema.properties.SharedEntityName;\r\n const listItemCountProperty = entitySchema.properties.ListItemCount;\r\n const sharedEntityCustomerIdProperty = entitySchema.properties.SharedEntityCustomerId;\r\n const sharedEntityCustomerNameProperty = entitySchema.properties.SharedEntityCustomerName;\r\n\r\n if (sharedEntityNameProperty) {\r\n sharedEntityNameProperty.filterable = false;\r\n }\r\n\r\n if (listItemCountProperty) {\r\n listItemCountProperty.filterable = false;\r\n }\r\n\r\n if (sharedEntityCustomerIdProperty) {\r\n sharedEntityCustomerIdProperty.filterable = false;\r\n }\r\n\r\n if (sharedEntityCustomerNameProperty) {\r\n sharedEntityCustomerNameProperty.filterable = false;\r\n }\r\n\r\n return entitySchema;\r\n }\r\n}\r\n","/* eslint-disable default-case */\r\n/* eslint-disable no-param-reassign */\r\nimport _ from 'underscore';\r\nimport { BaseSchemaProcessor } from './base-schema-processor';\r\nimport { updateOdataOptionsForFinalUrl } from '../util/update-final-url-property-for-filter';\r\n\r\nconst DeviceTypeLocalizeMap = {\r\n \"Enum.DeviceType'Mobile'\": 'HotelCenter_Overview_Grid_DeviceType_Enum_Smartphones',\r\n \"Enum.DeviceType'Tablet'\": 'HotelCenter_Overview_Grid_DeviceType_Enum_Tablets',\r\n \"Enum.DeviceType'Desktop'\": 'HotelCenter_Overview_Grid_DeviceType_Enum_Computers',\r\n};\r\n\r\nexport class HotelCenterOverviewSchemaProcessor extends BaseSchemaProcessor {\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n const updatedSchema = super.updateEntitySchemaForFeatures(entitySchema);\r\n _.map(updatedSchema.properties, (item) => {\r\n if (item.property.indexOf('Metrics/') === 0) {\r\n item.property = `Performance${item.property}`;\r\n }\r\n });\r\n\r\n const {\r\n Id, BidAmount, DeviceType, PartnerHotelId, Status, Name,\r\n } = updatedSchema.properties;\r\n if (Id) {\r\n switch (updatedSchema.name) {\r\n case 'Hotel': {\r\n Id.title = this.passedInI18n.getString('HotelCenter_Overview_Grid_Hotel_ID_Label');\r\n break;\r\n }\r\n case 'HotelGroup': {\r\n Id.title = this.passedInI18n.getString('HotelCenter_Overview_Grid_Hotel_Group_ID_Label');\r\n break;\r\n }\r\n case 'SubAccount': {\r\n Id.title = this.passedInI18n.getString('HotelCenter_Overview_Grid_SubAccount_Id_Label');\r\n break;\r\n }\r\n }\r\n }\r\n if (BidAmount) {\r\n BidAmount.title = this.passedInI18n.getString('HotelCenter_Overview_Grid_Bid_Label');\r\n }\r\n if (DeviceType) {\r\n DeviceType.title = this.passedInI18n.getString('HotelCenter_Overview_Grid_DeviceType_Label');\r\n DeviceType.chooseType = 'checkbox';\r\n DeviceType.localized = _.mapObject(\r\n DeviceTypeLocalizeMap,\r\n EnumValue => this.passedInI18n.getString(EnumValue)\r\n );\r\n }\r\n if (PartnerHotelId) {\r\n PartnerHotelId.title = this.passedInI18n.getString('HotelCenter_Overview_Grid_Hotel_Advertiser_Hotel_ID_Label');\r\n }\r\n if (Status) {\r\n Status.chooseType = 'checkbox';\r\n Status.title = this.passedInI18n.getString('HotelCenter_Overview_Grid_SubAccount_Status_Label');\r\n Status.localized = _.mapObject(Status.enumValueMap, EnumValue => this.passedInI18n.getString(`HotelCenter_Overview_Grid_Status_Enum_${EnumValue}`));\r\n }\r\n if (Name) {\r\n Name.title = this.passedInI18n.getString('HotelCenter_Overview_Grid_SubAccount_Name_Label');\r\n }\r\n\r\n const propWhitelist = _.compact(['MaximumBidAmount', 'Labels']);\r\n\r\n // Add title for performance in other grids\r\n if (updatedSchema.name === 'HotelDimensionRow') {\r\n const {\r\n Clicks, Impressions, CTR, Spend, AverageCPC, AveragePosition,\r\n } = updatedSchema.properties;\r\n Clicks.title = this.passedInI18n.getString('HotelCenter_Overview_Grid_Clicks_Label');\r\n Impressions.title = this.passedInI18n.getString('HotelCenter_Overview_Grid_Impression_Label');\r\n CTR.title = this.passedInI18n.getString('HotelCenter_Overview_Grid_CTR_Label');\r\n Spend.title = this.passedInI18n.getString('HotelCenter_Overview_Grid_Spend_Label');\r\n AverageCPC.title = this.passedInI18n.getString('HotelCenter_Overview_Grid_AverageCPC_Label');\r\n AveragePosition.title = this.passedInI18n.getString('HotelCenter_Overview_Grid_AveragePosition_Label');\r\n\r\n propWhitelist.push('AverageCPM');\r\n }\r\n\r\n if (updatedSchema.name === 'HotelGroup') {\r\n propWhitelist.push('Status');\r\n }\r\n\r\n updatedSchema.properties = _.omit(\r\n updatedSchema.properties,\r\n propWhitelist\r\n );\r\n return updatedSchema;\r\n }\r\n\r\n updateOdataOptions(odataOptions) {\r\n super.updateOdataOptions(odataOptions);\r\n const { fieldMap } = odataOptions;\r\n _.map(fieldMap, (value, key) => {\r\n if (value.indexOf('PerformanceMetrics/') === 0) {\r\n fieldMap[key] = value.replace('PerformanceMetrics/', 'Metrics/');\r\n }\r\n });\r\n updateOdataOptionsForFinalUrl(odataOptions);\r\n _.extendOwn(odataOptions.custom, {\r\n DeviceType: {\r\n eq: (filterValues) => {\r\n const queryStr = `DeviceType eq ${filterValues.replace('Enum.DeviceType', '')}`;\r\n return queryStr;\r\n },\r\n },\r\n });\r\n return odataOptions;\r\n }\r\n}\r\n","import { initialize as initializePop, appendPeriodOverPeriodProperties } from '../util/update-pop-property-for-filter';\r\n\r\nexport class PortfolioBidStrategySchemaProcessor {\r\n constructor(options) {\r\n initializePop(options);\r\n }\r\n\r\n updateOdataOptions(odataOptions) {\r\n return odataOptions;\r\n }\r\n\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n appendPeriodOverPeriodProperties(entitySchema);\r\n return entitySchema;\r\n }\r\n}\r\n","import { map, pick } from 'underscore';\r\nimport { BaseSchemaProcessor } from './base-schema-processor';\r\nimport { mapEnumValueForFilter, updateDeliveryStatusPropertyForFilter } from '../util/update-delivery-status-property-for-filter';\r\n\r\nexport class AssetGroupSchemaProcessor extends BaseSchemaProcessor {\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n const updatedSchema = super.updateEntitySchemaForFeatures(entitySchema);\r\n\r\n updatedSchema.properties = pick(updatedSchema.properties, [\r\n 'Name',\r\n 'DeliveryStatus',\r\n 'Status',\r\n 'PerformanceMetricsImpressions',\r\n 'PerformanceMetricsClicks',\r\n 'PerformanceMetricsCTR',\r\n 'PerformanceMetricsConversionsCredit',\r\n 'PerformanceMetricsSpend',\r\n 'PerformanceMetricsAverageCPC',\r\n 'PerformanceMetricsAdvertiserReportedRevenue',\r\n 'PerformanceMetricsRevenueOnAdSpend',\r\n ], this.Permissions && this.Permissions.dynamic && this.Permissions.dynamic.SupportCPSForPmax ? [\r\n 'PerformanceMetricsAverageCPS',\r\n 'PerformanceMetricsSalesCount',\r\n ] : []);\r\n\r\n const statusProperty = updatedSchema.properties.Status;\r\n const statusEnumSet = ['Active', 'Paused', 'Expired'];\r\n statusProperty.enum = map(statusEnumSet, value => mapEnumValueForFilter('AssetGroupStatus', value));\r\n\r\n const deliveryStatusEnumSet = [\r\n 'Eligible',\r\n 'AssetGroupExpired',\r\n 'AssetGroupUserPaused',\r\n 'CampaignUserPaused',\r\n 'CampaignBudgetPaused',\r\n 'CampaignSuspended',\r\n 'CampaignInProgress',\r\n 'ShoppingCampaignStoreNotFound',\r\n 'ShoppingCampaignNoOffersPresent',\r\n 'InvalidFinancialStatusOther',\r\n 'EditorialApprovedLimited',\r\n 'EditorialRejected',\r\n 'EditorialUnderAppeal',\r\n 'EditorialPending',\r\n ];\r\n\r\n if (this.Permissions && this.Permissions.dynamic && this.Permissions.dynamic.AppealUpheld) {\r\n deliveryStatusEnumSet.splice(deliveryStatusEnumSet.indexOf('EditorialApprovedLimited') + 1, 0, 'EditorialApprovedLimitedAppealRejected');\r\n deliveryStatusEnumSet.splice(deliveryStatusEnumSet.indexOf('EditorialRejected') + 1, 0, 'EditorialAppealRejected');\r\n }\r\n\r\n updateDeliveryStatusPropertyForFilter(updatedSchema, deliveryStatusEnumSet);\r\n\r\n return updatedSchema;\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { BaseSchemaProcessor } from './base-schema-processor';\r\n\r\nexport class PmaxAssetLinkSchemaProcessor extends BaseSchemaProcessor {\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n const updatedSchema = super.updateEntitySchemaForFeatures(entitySchema);\r\n\r\n updatedSchema.properties.EditorialStatus = _.defaults({\r\n enum: [\r\n \"Enum.EditorialStatus'Approved'\",\r\n \"Enum.EditorialStatus'ApprovedLimited'\",\r\n \"Enum.EditorialStatus'Rejected'\",\r\n \"Enum.EditorialStatus'Pending'\",\r\n ],\r\n enumValueMap: {\r\n \"Enum.EditorialStatus'Approved'\": 'Approved',\r\n \"Enum.EditorialStatus'ApprovedLimited'\": 'ApprovedLimited',\r\n \"Enum.EditorialStatus'Rejected'\": 'Rejected',\r\n \"Enum.EditorialStatus'Pending'\": 'Pending',\r\n },\r\n }, updatedSchema.properties.EditorialStatus);\r\n\r\n updatedSchema.properties.AssociationType = _.defaults({\r\n enum: [\r\n \"Enum.AssetAssociationType'Headlines'\",\r\n \"Enum.AssetAssociationType'LongHeadlines'\",\r\n \"Enum.AssetAssociationType'Descriptions'\",\r\n \"Enum.AssetAssociationType'ImageMedia1X2'\",\r\n \"Enum.AssetAssociationType'SquareImageMedia'\",\r\n \"Enum.AssetAssociationType'ImageMedia133X100'\",\r\n \"Enum.AssetAssociationType'ImageMedia15X10'\",\r\n \"Enum.AssetAssociationType'ImageMedia178X100'\",\r\n \"Enum.AssetAssociationType'LandscapeImageMedia'\",\r\n \"Enum.AssetAssociationType'ImageMedia4X1'\",\r\n \"Enum.AssetAssociationType'SquareLogoMedia'\",\r\n \"Enum.AssetAssociationType'LandscapeLogoMedia'\",\r\n \"Enum.AssetAssociationType'CallToAction'\",\r\n ],\r\n enumValueMap: {\r\n \"Enum.AssetAssociationType'Headlines'\": 'Headlines',\r\n \"Enum.AssetAssociationType'LongHeadlines'\": 'LongHeadlines',\r\n \"Enum.AssetAssociationType'Descriptions'\": 'Descriptions',\r\n \"Enum.AssetAssociationType'ImageMedia1X2'\": 'ImageMedia1X2',\r\n \"Enum.AssetAssociationType'SquareImageMedia'\": 'SquareImageMedia',\r\n \"Enum.AssetAssociationType'ImageMedia15X10'\": 'ImageMedia15X10',\r\n \"Enum.AssetAssociationType'ImageMedia133X100'\": 'ImageMedia133X100',\r\n \"Enum.AssetAssociationType'ImageMedia178X100'\": 'ImageMedia178X100',\r\n \"Enum.AssetAssociationType'LandscapeImageMedia'\": 'LandscapeImageMedia',\r\n \"Enum.AssetAssociationType'ImageMedia4X1'\": 'ImageMedia4X1',\r\n \"Enum.AssetAssociationType'SquareLogoMedia'\": 'SquareLogoMedia',\r\n \"Enum.AssetAssociationType'LandscapeLogoMedia'\": 'LandscapeLogoMedia',\r\n \"Enum.AssetAssociationType'CallToAction'\": 'CallToAction',\r\n },\r\n }, updatedSchema.properties.AssociationType);\r\n\r\n updatedSchema.properties.AssetAssetSource = _.defaults({\r\n chooseType: 'checkbox',\r\n enumType: 'AssetSource',\r\n enum: [\r\n \"Enum.AssetSource'AdvertiserProvided'\",\r\n \"Enum.AssetSource'AutoGenerated'\",\r\n ],\r\n enumValueMap: {\r\n \"Enum.AssetSource'AdvertiserProvided'\": 'AdvertiserProvided',\r\n \"Enum.AssetSource'AutoGenerated'\": 'AutoGenerated',\r\n },\r\n }, updatedSchema.properties.AssetAssetSource);\r\n\r\n updatedSchema.properties = _.pick(updatedSchema.properties, 'AssetText', 'AssociationType', 'EditorialStatus', 'PerformanceMetricsImpressions', 'PerformanceMetricsAdvertiserReportedRevenue', 'PerformanceMetricsConversionsCredit', 'AssetId', 'AssetAssetSource');\r\n\r\n return updatedSchema;\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { BaseSchemaProcessor } from './base-schema-processor';\r\n\r\nexport class UnifiedAdsAssetLinkSchemaProcessor extends BaseSchemaProcessor {\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n const updatedSchema = super.updateEntitySchemaForFeatures(entitySchema);\r\n\r\n updatedSchema.properties.EditorialStatus = _.defaults({\r\n enum: [\r\n \"Enum.EditorialStatus'Approved'\",\r\n \"Enum.EditorialStatus'ApprovedLimited'\",\r\n \"Enum.EditorialStatus'Rejected'\",\r\n \"Enum.EditorialStatus'Pending'\",\r\n ],\r\n enumValueMap: {\r\n \"Enum.EditorialStatus'Approved'\": 'Approved',\r\n \"Enum.EditorialStatus'ApprovedLimited'\": 'ApprovedLimited',\r\n \"Enum.EditorialStatus'Rejected'\": 'Rejected',\r\n \"Enum.EditorialStatus'Pending'\": 'Pending',\r\n },\r\n }, updatedSchema.properties.EditorialStatus);\r\n\r\n updatedSchema.properties.AssociationType = _.defaults({\r\n enum: [\r\n \"Enum.AssetAssociationType'Headlines'\",\r\n \"Enum.AssetAssociationType'LongHeadlines'\",\r\n \"Enum.AssetAssociationType'Descriptions'\",\r\n \"Enum.AssetAssociationType'ImageMedia1X2'\",\r\n \"Enum.AssetAssociationType'SquareImageMedia'\",\r\n \"Enum.AssetAssociationType'ImageMedia133X100'\",\r\n \"Enum.AssetAssociationType'ImageMedia15X10'\",\r\n \"Enum.AssetAssociationType'ImageMedia178X100'\",\r\n \"Enum.AssetAssociationType'LandscapeImageMedia'\",\r\n \"Enum.AssetAssociationType'ImageMedia4X1'\",\r\n \"Enum.AssetAssociationType'SquareLogoMedia'\",\r\n \"Enum.AssetAssociationType'LandscapeLogoMedia'\",\r\n \"Enum.AssetAssociationType'CallToAction'\",\r\n ],\r\n enumValueMap: {\r\n \"Enum.AssetAssociationType'Headlines'\": 'Headlines',\r\n \"Enum.AssetAssociationType'LongHeadlines'\": 'LongHeadlines',\r\n \"Enum.AssetAssociationType'Descriptions'\": 'Descriptions',\r\n \"Enum.AssetAssociationType'ImageMedia1X2'\": 'ImageMedia1X2',\r\n \"Enum.AssetAssociationType'SquareImageMedia'\": 'SquareImageMedia',\r\n \"Enum.AssetAssociationType'ImageMedia15X10'\": 'ImageMedia15X10',\r\n \"Enum.AssetAssociationType'ImageMedia133X100'\": 'ImageMedia133X100',\r\n \"Enum.AssetAssociationType'ImageMedia178X100'\": 'ImageMedia178X100',\r\n \"Enum.AssetAssociationType'LandscapeImageMedia'\": 'LandscapeImageMedia',\r\n \"Enum.AssetAssociationType'ImageMedia4X1'\": 'ImageMedia4X1',\r\n \"Enum.AssetAssociationType'SquareLogoMedia'\": 'SquareLogoMedia',\r\n \"Enum.AssetAssociationType'LandscapeLogoMedia'\": 'LandscapeLogoMedia',\r\n \"Enum.AssetAssociationType'CallToAction'\": 'CallToAction',\r\n },\r\n }, updatedSchema.properties.AssociationType);\r\n\r\n updatedSchema.properties.AssetAssetSource = _.defaults({\r\n chooseType: 'checkbox',\r\n enumType: 'AssetSource',\r\n enum: [\r\n \"Enum.AssetSource'AdvertiserProvided'\",\r\n \"Enum.AssetSource'AutoGenerated'\",\r\n ],\r\n enumValueMap: {\r\n \"Enum.AssetSource'AdvertiserProvided'\": 'AdvertiserProvided',\r\n \"Enum.AssetSource'AutoGenerated'\": 'AutoGenerated',\r\n },\r\n }, updatedSchema.properties.AssetAssetSource);\r\n\r\n updatedSchema.properties = _.pick(\r\n updatedSchema.properties,\r\n 'AssetText',\r\n 'AssociationType',\r\n 'EditorialStatus',\r\n 'PerformanceMetricsImpressions',\r\n 'PerformanceMetricsAdvertiserReportedRevenue',\r\n 'PerformanceMetricsConversionsCredit',\r\n 'AssetId',\r\n 'AssetAssetSource'\r\n );\r\n\r\n return updatedSchema;\r\n }\r\n}\r\n","import { map, pick } from 'underscore';\r\nimport { BaseSchemaProcessor } from './base-schema-processor';\r\nimport { mapEnumValueForFilter, updateDeliveryStatusPropertyForFilter } from '../util/update-delivery-status-property-for-filter';\r\n\r\nexport class AppAdsAssetGroupSchemaProcessor extends BaseSchemaProcessor {\r\n updateEntitySchemaForFeatures(entitySchema) {\r\n const updatedSchema = super.updateEntitySchemaForFeatures(entitySchema);\r\n updatedSchema.properties = pick(updatedSchema.properties, [\r\n 'Name',\r\n 'DeliveryStatus',\r\n 'Status',\r\n 'PerformanceMetricsImpressions',\r\n 'PerformanceMetricsClicks',\r\n 'PerformanceMetricsCTR',\r\n 'PerformanceMetricsConversionsCredit',\r\n 'PerformanceMetricsSpend',\r\n 'PerformanceMetricsAverageCPC',\r\n 'PerformanceMetricsAdvertiserReportedRevenue',\r\n 'PerformanceMetricsRevenueOnAdSpend',\r\n 'PerformanceMetricsDownloads',\r\n 'PerformanceMetricsFirstLaunches',\r\n 'PerformanceMetricsPurchases',\r\n 'PerformanceMetricsPostClickDownloadRate',\r\n 'PerformanceMetricsCostPerDownload',\r\n 'PerformanceMetricsPostClickFirstLaunchRate',\r\n 'PerformanceMetricsCostPerFirstLaunch',\r\n 'PerformanceMetricsPostInstallPurchaseRate',\r\n 'PerformanceMetricsCostPerPurchase',\r\n 'PerformanceMetricsPostInstallSubscriptionRate',\r\n 'PerformanceMetricsCostPerSubscription',\r\n ], this.Permissions && this.Permissions.dynamic && this.Permissions.dynamic.SupportCPSForPmax ? [\r\n 'PerformanceMetricsAverageCPS',\r\n 'PerformanceMetricsSalesCount',\r\n ] : []);\r\n\r\n const statusProperty = updatedSchema.properties.Status;\r\n const statusEnumSet = ['Active', 'Paused', 'Expired'];\r\n statusProperty.enum = map(statusEnumSet, value => mapEnumValueForFilter('AssetGroupStatus', value));\r\n\r\n const deliveryStatusEnumSet = [\r\n 'Eligible',\r\n 'AssetGroupExpired',\r\n 'AssetGroupUserPaused',\r\n 'CampaignUserPaused',\r\n 'CampaignBudgetPaused',\r\n 'CampaignSuspended',\r\n 'CampaignInProgress',\r\n 'ShoppingCampaignStoreNotFound',\r\n 'ShoppingCampaignNoOffersPresent',\r\n 'InvalidFinancialStatusOther',\r\n 'EditorialApprovedLimited',\r\n 'EditorialRejected',\r\n 'EditorialUnderAppeal',\r\n 'EditorialPending',\r\n ];\r\n\r\n if (this.Permissions && this.Permissions.dynamic && this.Permissions.dynamic.AppealUpheld) {\r\n deliveryStatusEnumSet.splice(deliveryStatusEnumSet.indexOf('EditorialApprovedLimited') + 1, 0, 'EditorialApprovedLimitedAppealRejected');\r\n deliveryStatusEnumSet.splice(deliveryStatusEnumSet.indexOf('EditorialRejected') + 1, 0, 'EditorialAppealRejected');\r\n }\r\n\r\n updateDeliveryStatusPropertyForFilter(updatedSchema, deliveryStatusEnumSet);\r\n\r\n return updatedSchema;\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport { FilterStorageFactory, WaterfallFilterStorage, WaterfallFilterType } from '@bingads-webui-campaign/filter-storage';\r\nimport { SchemaI18n } from '@bingads-webui-universal/schema-i18n';\r\nimport {\r\n updateEntitySchemaForPilotFeatures,\r\n enableFilterForExtraPerformanceMetrics,\r\n updateEntitySchemaForPartialConversions,\r\n disableFilterForExtraPerformanceMetrics,\r\n initialize as initializeCommonFilterConfig,\r\n} from './util/update-entity-schema-for-pilot-features';\r\nimport {\r\n KeywordSchemaProcessor,\r\n AdGroupSchemaProcessor,\r\n AdSchemaProcessor,\r\n DayTimeCriterionSchemaProcessor,\r\n DeviceCriterionSchemaProcessor,\r\n LocationCriterionSchemaProcessor,\r\n NegativeKeywordSchemaProcessor,\r\n ExperimentSchemaProcessor,\r\n AssetLinkSchemaProcessor,\r\n AssetWithBIDataSchemaProcessor,\r\n ResponsiveSearchAdInstanceSchemaProcessor,\r\n BaseCriterionSchemaProcessor,\r\n AudienceCriterionWithBISchemaProcessor,\r\n AudienceSchemaProcessor,\r\n ProductSchemaProcessor,\r\n GMBImportSchemaProcessor,\r\n SearchTermSchemaProcessor,\r\n PerformanceSchemaProcessor,\r\n SmartPerformanceSchemaProcessor,\r\n ManagementSchemaProcessor,\r\n AccountImportSchemaProcessor,\r\n TagSchemaProcessor,\r\n LinkedStoreSchemaProcessor,\r\n GoalSchemaProcessor,\r\n SeasonalityAdjustmentSchemaProcessor,\r\n DataExclusionSchemaProcessor,\r\n SharedBudgetSchemaProcessor,\r\n SharedBudgetCampaignSchemaProcessor,\r\n SelAccountLevelListsGridSchemaProcessor,\r\n SelCustomerLevelAssociationsGridSchemaProcessor,\r\n HotelCenterOverviewSchemaProcessor,\r\n AssetGroupSchemaProcessor,\r\n PmaxAssetLinkSchemaProcessor,\r\n UnifiedAdsAssetLinkSchemaProcessor,\r\n AppAdsAssetGroupSchemaProcessor,\r\n} from './schema-processors/index';\r\n\r\nconst featureToSchemaProcessorMapping = {\r\n AutomatedRuleKeywordGrid: KeywordSchemaProcessor,\r\n AutomatedRuleAdgroupGrid: AdGroupSchemaProcessor,\r\n AutomatedRuleAdGrid: AdSchemaProcessor,\r\n KeywordGrid: KeywordSchemaProcessor,\r\n AdgroupGrid: AdGroupSchemaProcessor,\r\n AdGrid: AdSchemaProcessor,\r\n AdScheduleGrid: DayTimeCriterionSchemaProcessor,\r\n LocationsGrid: LocationCriterionSchemaProcessor,\r\n ExcludedLocationsGrid: BaseCriterionSchemaProcessor,\r\n DevicesGrid: DeviceCriterionSchemaProcessor,\r\n campaignNegativeKeywordGrid: NegativeKeywordSchemaProcessor,\r\n adgroupNegativeKeywordGrid: NegativeKeywordSchemaProcessor,\r\n ExperimentsGrid: ExperimentSchemaProcessor,\r\n RSAAssetsGrid: AssetLinkSchemaProcessor,\r\n AssetsReportGrid: AssetWithBIDataSchemaProcessor,\r\n RSACombinationsGrid: ResponsiveSearchAdInstanceSchemaProcessor,\r\n AudienceAssociationGrid: AudienceCriterionWithBISchemaProcessor,\r\n AudienceGrid: AudienceSchemaProcessor,\r\n ProductGrid: ProductSchemaProcessor,\r\n GmbImportV2: GMBImportSchemaProcessor,\r\n SearchTermGrid: SearchTermSchemaProcessor,\r\n PerformanceGrid: PerformanceSchemaProcessor,\r\n SmartPerformanceGrid: SmartPerformanceSchemaProcessor,\r\n ManagementGrid: ManagementSchemaProcessor,\r\n ImportGrid: AccountImportSchemaProcessor,\r\n UETTagsGrid: TagSchemaProcessor,\r\n LinkedStoreGrid: LinkedStoreSchemaProcessor,\r\n ConversionGoalsGrid: GoalSchemaProcessor,\r\n SharedBudgetSummaryGrid: SharedBudgetSchemaProcessor,\r\n SharedBudgetEditGrid: SharedBudgetCampaignSchemaProcessor,\r\n AccountLevelListGrid: SelAccountLevelListsGridSchemaProcessor,\r\n CustomerLevelEditAccountsGrid: SelCustomerLevelAssociationsGridSchemaProcessor,\r\n HotelCenterOverviewGridHotelSubAccountGrid: HotelCenterOverviewSchemaProcessor,\r\n HotelCenterOverviewGridHotelGroupGrid: HotelCenterOverviewSchemaProcessor,\r\n HotelCenterOverviewGridHotelIdGrid: HotelCenterOverviewSchemaProcessor,\r\n HotelCenterOverviewGridHotelDeviceTypeGrid: HotelCenterOverviewSchemaProcessor,\r\n HotelCenterOverviewGridHotelDateGrid: HotelCenterOverviewSchemaProcessor,\r\n HotelCenterOverviewGridHotelLengthOfStayGrid: HotelCenterOverviewSchemaProcessor,\r\n HotelCenterOverviewGridHotelUserCountryGrid: HotelCenterOverviewSchemaProcessor,\r\n HotelCenterOverviewGridHotelSlotTypeGrid: HotelCenterOverviewSchemaProcessor,\r\n HotelCenterOverviewGridHotelCountryGrid: HotelCenterOverviewSchemaProcessor,\r\n HotelCenterOverviewGridAdvancedBookingGrid: HotelCenterOverviewSchemaProcessor,\r\n HotelCenterOverviewGridCheckinDayGrid: HotelCenterOverviewSchemaProcessor,\r\n HotelCenterOverviewGridDateTypeGrid: HotelCenterOverviewSchemaProcessor,\r\n HotelCenterOverviewGridSiteTypeGrid: HotelCenterOverviewSchemaProcessor,\r\n SeasonalityAdjustmentGrid: SeasonalityAdjustmentSchemaProcessor,\r\n DataExclusionGrid: DataExclusionSchemaProcessor,\r\n AssetGroupGrid: AssetGroupSchemaProcessor,\r\n AppAdsAssetGroupGrid: AppAdsAssetGroupSchemaProcessor,\r\n PmaxAssetGrid: PmaxAssetLinkSchemaProcessor,\r\n UnifiedAdsAssetGrid: UnifiedAdsAssetLinkSchemaProcessor,\r\n};\r\n\r\nfunction mergeFilters(filters) {\r\n if (filters.length > 1) {\r\n return {\r\n filter: {\r\n key: filters[0].filter.key,\r\n value: {\r\n query: {\r\n $and: _.map(filters, filterObj => filterObj.filter.value.query),\r\n },\r\n },\r\n },\r\n };\r\n } else if (filters.length === 1) {\r\n return filters[0];\r\n }\r\n return null;\r\n}\r\n\r\nfunction getWaterfallFilterStoreVNext(filterKeys, preferenceService, featureName) {\r\n const waterfallFilterStorage = new WaterfallFilterStorage({\r\n preferenceService,\r\n });\r\n\r\n return {\r\n get: () => {\r\n const waterfallFilters = waterfallFilterStorage.getFilters(filterKeys);\r\n\r\n if (!_.isArray(waterfallFilters)) {\r\n return Promise.resolve(null);\r\n }\r\n\r\n const filters = [];\r\n\r\n _.each(filterKeys, (filterKey, i) => {\r\n if (!waterfallFilters[i] || !waterfallFilters[i].filter.value.query) {\r\n return;\r\n }\r\n\r\n if (featureName === 'campaignNegativeKeywordGrid' && filterKey === WaterfallFilterType.AdGroupStatus) {\r\n return;\r\n }\r\n\r\n // If current grid is on the same level as the waterfall filter, ex. filtering by\r\n // ad group status in ad group grid, need to change filter's property name from\r\n // AdGroupStatus to Status. Need to do the same for campaign grid.\r\n if (featureName === 'AdgroupGrid' && filterKey === WaterfallFilterType.AdGroupStatus) {\r\n filters.push({\r\n filter: {\r\n key: WaterfallFilterType.AdGroupStatus,\r\n value: {\r\n query: {\r\n Status: waterfallFilters[i].filter.value.query.AdGroupStatus,\r\n },\r\n },\r\n },\r\n });\r\n } else if ((featureName === 'AllSettingsGrid') && filterKey === WaterfallFilterType.CampaignStatus) {\r\n filters.push({\r\n filter: {\r\n key: WaterfallFilterType.CampaignStatus,\r\n value: {\r\n query: {\r\n Status: waterfallFilters[i].filter.value.query.CampaignStatus,\r\n },\r\n },\r\n },\r\n });\r\n } else {\r\n filters.push(waterfallFilters[i]);\r\n }\r\n });\r\n return Promise.resolve(mergeFilters(filters));\r\n },\r\n };\r\n}\r\n\r\nexport function getCommonFilterConfig({\r\n featureName,\r\n schemaProcessor,\r\n searchbox,\r\n editor,\r\n selector,\r\n enableCampaignWaterfall = false,\r\n enableAdGroupWaterfall = false,\r\n enableAvgPositionDeprecation = true,\r\n allowCampaignStatusWaterfall = true,\r\n allowCampaignTypeWaterfall = true,\r\n enableEditorialRejectionFilter = false,\r\n i18n,\r\n entitySchema,\r\n cachedEntitySchema,\r\n filterExpressions = null,\r\n sessionStore,\r\n preferenceStoreFactory,\r\n globalConfig,\r\n legacyGlobalI18n,\r\n schemaI18nCampaign,\r\n cacheService,\r\n dataContextManager,\r\n jsdata,\r\n getLegacySaved = true,\r\n updatePilot = true,\r\n preferenceService,\r\n customColumnPreference,\r\n odata = {\r\n ignoreCase: false,\r\n custom: {},\r\n },\r\n edm,\r\n state,\r\n extraPerformanceColumns,\r\n disabledPerformanceColumns,\r\n scope,\r\n}) {\r\n const schemaConfigOptions = {\r\n globalConfig,\r\n schemaI18nCampaign,\r\n i18n: legacyGlobalI18n,\r\n cacheService,\r\n dataContextManager,\r\n jsdata,\r\n isForVNext: true,\r\n passedInI18n: i18n,\r\n enableEditorialRejectionFilter,\r\n preferenceService,\r\n customColumnPreference,\r\n featureName,\r\n edm,\r\n state,\r\n scope,\r\n };\r\n\r\n let updatedEntitySchema = null;\r\n\r\n if (!cachedEntitySchema) {\r\n updatedEntitySchema = entitySchema;\r\n\r\n if (updatePilot) {\r\n initializeCommonFilterConfig(schemaConfigOptions);\r\n updatedEntitySchema = updateEntitySchemaForPilotFeatures(entitySchema, /* isForVNext */true, filterExpressions, enableAvgPositionDeprecation); // eslint-disable-line max-len\r\n }\r\n\r\n if (_.isArray(extraPerformanceColumns) && !_.isEmpty(extraPerformanceColumns)) {\r\n enableFilterForExtraPerformanceMetrics(updatedEntitySchema, extraPerformanceColumns);\r\n }\r\n\r\n if (_.isArray(disabledPerformanceColumns) && !_.isEmpty(disabledPerformanceColumns)) {\r\n disableFilterForExtraPerformanceMetrics(updatedEntitySchema, disabledPerformanceColumns);\r\n }\r\n\r\n if (updatePilot) {\r\n updateEntitySchemaForPartialConversions(updatedEntitySchema);\r\n }\r\n } else {\r\n updatedEntitySchema = cachedEntitySchema;\r\n }\r\n\r\n const maxSavedFilterLimit = 10;\r\n const enabled = [];\r\n let campaignGridFilterStore;\r\n let adgroupFilterStore;\r\n\r\n if (enableCampaignWaterfall) {\r\n const waterfallFilterTypes = [];\r\n if (allowCampaignTypeWaterfall) {\r\n waterfallFilterTypes.push(WaterfallFilterType.CampaignType);\r\n }\r\n // Campaign grid will treat status filter as quick filter\r\n if (allowCampaignStatusWaterfall && featureName !== 'CampaignsGrid') {\r\n waterfallFilterTypes.push(WaterfallFilterType.CampaignStatus);\r\n }\r\n campaignGridFilterStore = getWaterfallFilterStoreVNext(\r\n waterfallFilterTypes,\r\n preferenceService,\r\n featureName\r\n );\r\n }\r\n\r\n if (enableAdGroupWaterfall) {\r\n adgroupFilterStore = getWaterfallFilterStoreVNext(\r\n [WaterfallFilterType.AdGroupStatus],\r\n preferenceService,\r\n featureName\r\n );\r\n }\r\n\r\n\r\n let baseConfig = {\r\n getLegacySaved,\r\n entitySchema: updatedEntitySchema,\r\n schemaI18n: new SchemaI18n({ i18n }),\r\n i18n,\r\n // won't work for kendo datepicker\r\n // shortDateFormat: 'yMd',\r\n odata,\r\n maxSavedFilterLimit,\r\n storageFactory: new FilterStorageFactory({\r\n getLegacySaved,\r\n sessionStore,\r\n preferenceStoreFactory,\r\n featureName,\r\n maxSavedFilterLimit,\r\n preferenceService,\r\n }),\r\n featureName,\r\n edm,\r\n scope,\r\n };\r\n\r\n if (enableCampaignWaterfall && enableAdGroupWaterfall) {\r\n baseConfig = _.extend(baseConfig, {\r\n waterfallFilterStores: [campaignGridFilterStore, adgroupFilterStore],\r\n });\r\n } else if (enableCampaignWaterfall) {\r\n baseConfig = _.extend(baseConfig, {\r\n waterfallFilterStores: [campaignGridFilterStore],\r\n waterfallEvent: 'adGroupWaterfall',\r\n });\r\n }\r\n\r\n let schemaProcessorCopy = schemaProcessor;\r\n if (!_.isFunction(schemaProcessor) && featureToSchemaProcessorMapping[featureName]) {\r\n schemaProcessorCopy = new featureToSchemaProcessorMapping[featureName](schemaConfigOptions);\r\n }\r\n\r\n if (schemaProcessorCopy && _.isFunction(schemaProcessorCopy.updateEntitySchemaForFeatures)) {\r\n baseConfig = _.extend(baseConfig, {\r\n schemaProcessor:\r\n schemaProcessorCopy.updateEntitySchemaForFeatures.bind(schemaProcessorCopy),\r\n });\r\n }\r\n\r\n if (schemaProcessorCopy && _.isFunction(schemaProcessorCopy.updateOdataOptions)) {\r\n baseConfig = _.extend(baseConfig, {\r\n odataOptionsProcessor: schemaProcessorCopy.updateOdataOptions.bind(schemaProcessorCopy),\r\n });\r\n }\r\n\r\n if (searchbox) {\r\n baseConfig = _.extend(baseConfig, {\r\n searchbox,\r\n });\r\n enabled.push('searchbox');\r\n }\r\n\r\n if (editor) {\r\n baseConfig = _.extend(baseConfig, {\r\n editor: _.extend({\r\n isComparingEnabled: () => window.App && window.App.state && !!window.App.state.get('$daterange').compared,\r\n }, editor),\r\n });\r\n enabled.push('editor');\r\n }\r\n\r\n if (selector) {\r\n baseConfig = _.extend(baseConfig, {\r\n selector,\r\n });\r\n enabled.push('selector');\r\n }\r\n\r\n baseConfig = _.extend(baseConfig, { enabled });\r\n return baseConfig;\r\n}\r\n","import _ from 'underscore';\r\nimport Backbone from 'backbone';\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport { CustomColumnFormPanel } from '@bingads-webui-campaign-react/custom-column-form-panel';\r\n\r\nexport class CustomColumnBackboneWrapper extends Backbone.View {\r\n constructor(options) {\r\n super(options);\r\n this.props = _.defaults({\r\n onSave: (customColumn) => {\r\n if (_.result(options, 'props', {}).onSave) {\r\n options.props.onSave(customColumn);\r\n }\r\n this.remove();\r\n },\r\n onCancel: () => {\r\n if (_.result(options, 'props', {}).onCancel) {\r\n options.props.onCancel();\r\n }\r\n this.remove();\r\n },\r\n }, options.props);\r\n }\r\n\r\n render() {\r\n document.body.appendChild(this.el);\r\n ReactDOM.render(\r\n React.createElement(\r\n CustomColumnFormPanel,\r\n this.props\r\n ),\r\n this.el\r\n );\r\n return this;\r\n }\r\n\r\n remove() {\r\n ReactDOM.unmountComponentAtNode(this.el);\r\n return super.remove();\r\n }\r\n}\r\n","\r\nclass Store {\r\n constructor() {\r\n this.store = {};\r\n }\r\n\r\n set(key, dataSource) {\r\n this.store[key] = dataSource;\r\n }\r\n\r\n get(key) {\r\n return this.store[key];\r\n }\r\n}\r\n\r\nconst DataSourceStore = new Store();\r\n\r\nexport { DataSourceStore };\r\n","import React from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { Callout } from '@bingads-webui-react/callout';\r\n\r\nexport class PopupCallout extends React.PureComponent {\r\n constructor(props) {\r\n super(props);\r\n if (props.view) {\r\n props.view.on('closeDeliveryStatusPopup', this.close);\r\n }\r\n }\r\n\r\n close = () => {\r\n if (this.props.view) {\r\n this.props.view.off('closeDeliveryStatusPopup');\r\n }\r\n this.props.close();\r\n };\r\n\r\n render() {\r\n const { target } = this.props;\r\n const { right } = target.getBoundingClientRect();\r\n const calloutMaxWidth = 325; // this value is defined in global style\r\n const placement = right + calloutMaxWidth > window.innerWidth ? 'left' : 'right';\r\n const activeElement = document && document.activeElement;\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nPopupCallout.propTypes = {\r\n /**\r\n * the content element or text of the callout\r\n */\r\n content: PropTypes.oneOfType([\r\n PropTypes.element.isRequired,\r\n PropTypes.string.isRequired,\r\n ]).isRequired,\r\n /**\r\n * target of the callout, DOM element\r\n */\r\n target: PropTypes.instanceOf(Element).isRequired,\r\n /**\r\n * function called to remove callout\r\n */\r\n close: PropTypes.func.isRequired,\r\n /**\r\n * callout id\r\n */\r\n popoverId: PropTypes.string.isRequired,\r\n /**\r\n * view that has event triggered to close the popup\r\n */\r\n view: PropTypes.shape({\r\n on: PropTypes.func.isRequired,\r\n off: PropTypes.func.isRequired,\r\n }),\r\n};\r\n\r\nPopupCallout.defaultProps = {\r\n view: null,\r\n};\r\n","export const ENTITY = {\r\n AD: 'Ad',\r\n KEYWORD: 'Keyword',\r\n CUSTOMIZERFEED: 'CustomizerFeed',\r\n EXTENSION: 'Extension',\r\n ASSETGROUP: 'AssetGroup',\r\n ASSET: 'Asset',\r\n};\r\n\r\nexport const CategoryFAID = {\r\n 2: 'Adult_General',\r\n 3: 'Alcohol_General',\r\n 29: 'Pharmacy_General',\r\n 99: 'Adult_Porn_Adult_Entertainment',\r\n 100: 'Adult_Illegal_Adult_Content',\r\n 119: 'Political_Politicians',\r\n 180: 'Disallowed_Content_Abortion',\r\n 221: 'Mature_Content',\r\n 222: 'Mature_Content',\r\n 224: 'Mature_Content',\r\n 225: 'Mature_Content',\r\n 226: 'Mature_Content',\r\n 227: 'Mature_Content',\r\n 228: 'Mature_Content',\r\n 262: 'Cryptocurrency',\r\n 263: 'Cryptocurrency',\r\n 264: 'Cryptocurrency',\r\n 265: 'Cryptocurrency',\r\n 266: 'Cryptocurrency',\r\n 281: 'Birth_Control',\r\n 282: 'Dating',\r\n 283: 'Fertility_Treatment',\r\n 292: 'Background_Checks',\r\n 299: 'Payday_Loans',\r\n 308: 'Penny_Stocks',\r\n 311: 'Psychics',\r\n 315: 'Tobacco_Image',\r\n 316: 'Alcohol_Image',\r\n 317: 'Unsubstantiated_Claim_Image',\r\n 334: 'Tobacco_Category',\r\n 335: 'Lingerie_Explicit',\r\n 280: 'Sensitive_Health',\r\n 340: 'Sensitive_Health',\r\n 223: 'Sensitive_Health',\r\n 341: 'Misinformation',\r\n 342: 'Drug_Paraphanelia_Category',\r\n 364: 'Sexual_Health_And_Erotica',\r\n 365: 'Skin_Exposure',\r\n 521: 'Ad_Functionality',\r\n 522: 'Unbranded_Creative',\r\n 523: 'End_Of_Life_Services',\r\n 524: 'Tattoo_And_Piercings',\r\n 525: 'Weapon_Accessories_And_Concealed_Permits',\r\n 533: 'Spam',\r\n};\r\n\r\nexport const CategoryFALink = {\r\n Adult_General: 'https://go.microsoft.com/fwlink/?linkid=2207051',\r\n Alcohol_General: 'https://about.ads.microsoft.com/en-us/policies/restricted-categories/alcohol',\r\n Pharmacy_General: 'https://go.microsoft.com/fwlink/?linkid=2194266',\r\n Adult_Porn_Adult_Entertainment: 'https://go.microsoft.com/fwlink/?linkid=2207051',\r\n Adult_Illegal_Adult_Content: 'https://go.microsoft.com/fwlink/?linkid=2207051',\r\n Political_Politicians: 'http://advertise.bingads.microsoft.com/en-us/disallowed-content-policies',\r\n Disallowed_Content_Abortion: 'https://go.microsoft.com/fwlink/?linkid=2194368',\r\n Mature_Content: 'https://go.microsoft.com/fwlink/?linkid=2207051',\r\n Cryptocurrency: 'https://go.microsoft.com/fwlink/?linkid=2194432',\r\n Birth_Control: 'https://advertise.bingads.microsoft.com/en-us/resources/policies/microsoft-audience-ads',\r\n Dating: 'https://advertise.bingads.microsoft.com/en-us/resources/policies',\r\n Fertility_Treatment: 'https://advertise.bingads.microsoft.com/en-us/resources/policies',\r\n Background_Checks: 'https://go.microsoft.com/fwlink/?linkid=2206943',\r\n Payday_Loans: 'https://advertise.bingads.microsoft.com/en-us/resources/policies',\r\n Penny_Stocks: 'https://advertise.bingads.microsoft.com/en-us/resources/policies/microsoft-audience-ads',\r\n Psychics: 'https://go.microsoft.com/fwlink/?linkid=2194268',\r\n Tobacco_Image: 'https://about.ads.microsoft.com/en-us/policies/disallowed-content/tobacco-products',\r\n Alcohol_Image: 'https://about.ads.microsoft.com/en-us/policies/restricted-categories/alcohol',\r\n Unsubstantiated_Claim_Image: 'https://advertise.bingads.microsoft.com/en-us/resources/policies',\r\n Tobacco_Category: 'https://about.ads.microsoft.com/en-us/policies/disallowed-content/tobacco-products',\r\n Lingerie_Explicit: 'https://advertise.bingads.microsoft.com/en-us/resources/policies',\r\n Sensitive_Health: 'https://advertise.bingads.microsoft.com/en-us/resources/policies/microsoft-audience-ads',\r\n Misinformation: 'https://go.microsoft.com/fwlink/?linkid=2205489',\r\n Drug_Paraphanelia_Category: 'https://about.ads.microsoft.com/en-us/policies/disallowed-content/drugs-and-related-paraphernalia',\r\n Sexual_Health_And_Erotica: 'http://advertise.bingads.microsoft.com/en-us/adult-content-policies',\r\n Skin_Exposure: 'https://go.microsoft.com/fwlink/?linkid=2207051',\r\n Ad_Functionality: 'https://go.microsoft.com/fwlink/?linkid=2207237',\r\n Unbranded_Creative: 'https://about.ads.microsoft.com/en-us/policies/general-ad-requirements',\r\n End_Of_Life_Services: 'https://go.microsoft.com/fwlink/?linkid=2194519',\r\n Tattoo_And_Piercings: 'https://go.microsoft.com/fwlink/?linkid=2206948',\r\n Weapon_Accessories_And_Concealed_Permits: 'https://go.microsoft.com/fwlink/?linkid=2194366',\r\n Spam: 'https://help.ads.microsoft.com/#apex/ads/en/60215/0-500',\r\n};\r\n\r\nexport const ENTITYToI18 = {\r\n Ad: 'EditorialAppeal_Entity_Ad',\r\n Keyword: 'EditorialAppeal_Entity_Keyword',\r\n AssetGroup: 'EditorialAppeal_Entity_Assetgroup',\r\n Extension: 'EditorialAppeal_Entity_Extension',\r\n Asset: 'EditorialAppeal_Entity_Asset',\r\n};\r\nexport const ENTITYPluralToI18 = {\r\n Ad: 'EditorialAppeal_Entity_Ad_Plural',\r\n Keyword: 'EditorialAppeal_Entity_Keyword_Plural',\r\n AssetGroup: 'EditorialAppeal_Entity_Assetgroup_Plural',\r\n Extension: 'EditorialAppeal_Entity_Extension_Plural',\r\n Asset: 'EditorialAppeal_Entity_Asset_Plural',\r\n};\r\n\r\nexport const BLACKLIST = [\r\n 'Incomplete',\r\n 'GeoCodingIncomplete',\r\n 'InlineOpportunity',\r\n];\r\n","import $ from 'jquery';\r\nimport _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport ReactDOM from 'react-dom';\r\nimport React from 'react';\r\nimport { contents } from '@bingads-webui/popover';\r\nimport { BackboneInstanceWrapper } from '@bingads-webui-react/backbone-instance-wrapper';\r\nimport { keyVault } from '@bingads-webui-react/popup-manager';\r\nimport { PopupCallout } from './popup-callout';\r\nimport reasonTemplate from './reason-template.pug';\r\nimport noReasonFoundTemplate from './no-reason-found-template.pug';\r\nimport bidlandscapeDisalbedTemplate from './reason-disabled-template.pug';\r\nimport template from './template.pug';\r\nimport experimentTemplate from './experiment-info.pug';\r\nimport editorialCategoryTemplate from './editorial-category-template.pug';\r\nimport { CategoryFAID, BLACKLIST, CategoryFALink } from './constants';\r\n\r\nfunction getDateUtils({ i18n }) {\r\n return {\r\n reformatDate: (datetime) => {\r\n const date = datetime && datetime.substr(0, 10).replace(/-/g, '/');\r\n if (!date) {\r\n return i18n.getString('None');\r\n }\r\n return i18n.formatDate(new Date(datetime), { timeZone: null });\r\n },\r\n };\r\n}\r\n\r\nexport function mapCampaignSpecificDeliveryStatus(\r\n deliveryStatusUpdated,\r\n isSmartShoppingCampaignEnabled,\r\n entity\r\n) {\r\n let result = deliveryStatusUpdated;\r\n // special handling logic for smart shopping campaign and performance max campaign\r\n // as the only bidding strategy option is max conversion value\r\n // the second bullet-point of the rejection detail text is not needed\r\n if ((deliveryStatusUpdated === 'AutoBiddingLimitedByNotEnoughRevenue' ||\r\n deliveryStatusUpdated === 'AutoBiddingLimitedByNotEnoughConversions' ||\r\n deliveryStatusUpdated === 'NoEligibleAdGroups') &&\r\n (entity.CampaignType === 'PerformanceMax' ||\r\n (isSmartShoppingCampaignEnabled && entity.CampaignSubType === 'ShoppingSmartAds'))) {\r\n result = `${deliveryStatusUpdated}_For_SSC`;\r\n } else if (deliveryStatusUpdated === 'UrlInvalid' && entity.CampaignType === 'PerformanceMax') {\r\n result = `${deliveryStatusUpdated}_For_PMax`;\r\n }\r\n\r\n return result;\r\n}\r\n\r\nexport function mapDeliveryStatusForMMC(deliveryStatusUpdated) {\r\n let result = deliveryStatusUpdated;\r\n // special handling logic for merchant center related delivery status\r\n // use go to merchant center link\r\n if (deliveryStatusUpdated === 'ShoppingCampaignNoOffersPresent') {\r\n result = `${deliveryStatusUpdated}_With_Link`;\r\n }\r\n\r\n return result;\r\n}\r\n\r\nexport function shouldRepairGoogleImportVideoAd(item) {\r\n return item.Campaign\r\n && item.Campaign.CampaignSubType === 'BrandAwarenessVideoAds'\r\n && item.Campaign.CampaignType === 'Audience'\r\n && item.Campaign.DisplayBiddingStrategyType === 'ManualCpm'\r\n && _.isArray(item.Videos)\r\n && item.Videos.length === 1 // Brand Awareness video ad can only have one video\r\n && _.any(item.Videos, asset => asset.Asset && asset.Asset.SourceType === 'GoogleImported' && asset.Asset.Status === 'Failed');\r\n}\r\n\r\nexport function getViolationsFromCategoryFAIDMapping(editorialCategories) {\r\n if (editorialCategories && editorialCategories.length > 0) {\r\n return _.chain(editorialCategories).map(editorialCategorie => editorialCategorie.Categories)\r\n .flatten()\r\n .unique()\r\n .map(id => CategoryFAID[id])\r\n .filter(Boolean)\r\n .unique()\r\n .map(categoryName => (CategoryFALink[categoryName] &&\r\n { name: categoryName, link: CategoryFALink[categoryName] }))\r\n .value()\r\n .filter(Boolean);\r\n }\r\n return [];\r\n}\r\n\r\nexport function showRejectionReasons({\r\n deliveryStatusDetails = [],\r\n actionLinks = [],\r\n entity,\r\n event,\r\n i18n,\r\n useCustomTemplate = () => false,\r\n isContextualAttributeForRecommendation = false,\r\n isInlineDiagnosisForKeyword = false,\r\n getInlineDiagnosisForKeywordComponent,\r\n isSmartShoppingCampaignEnabled,\r\n getCustomTemplate,\r\n percentSymbol,\r\n containerSelector = '#rejectionContainer',\r\n popoverId = 'delivery-status-popup-callout',\r\n afterRender = () => { },\r\n view,\r\n config,\r\n instrumentation,\r\n inContextRepairRecommedationType,\r\n isForAdsPageOnly = false,\r\n isEditorialCategoryEnabled = false,\r\n}) {\r\n if ($(containerSelector).length === 0) {\r\n $(document.body).append(template({}));\r\n }\r\n\r\n const tableId = `rejection_reason_table_${_.uniqueId()}`;\r\n const popupContentKey = _.uniqueId(`${keyVault.hoveringPopup}-`);\r\n\r\n // add paged content for EditorialCategory violations\r\n const violations = getViolationsFromCategoryFAIDMapping(entity ? entity.EditorialCategories : undefined);\r\n\r\n const detailsToShow = _.difference(deliveryStatusDetails, BLACKLIST);\r\n\r\n const reasonCountToShow = Math.min(detailsToShow.length, 3);\r\n\r\n let promises = [];\r\n\r\n const activities = {};\r\n if (instrumentation) {\r\n activities.clickActivity =\r\n instrumentation.inContextRepairRecommendation.create().clickDeliveryStatus.create();\r\n activities.hoverActivity =\r\n instrumentation.inContextRepairRecommendation.create().hoverDeliveryStatus.create();\r\n activities.hoverPopupCalloutDurationActivity =\r\n instrumentation.popupManagement.create().hoverPopupCalloutDuration.create();\r\n }\r\n\r\n // get paged content for rejection reason\r\n if (event.bidlandscapeDisabled) {\r\n const { DeliveryStatus } = entity;\r\n promises.push(bidlandscapeDisalbedTemplate({\r\n deliveryStatus: DeliveryStatus,\r\n i18n,\r\n }));\r\n } else if (isForAdsPageOnly && isEditorialCategoryEnabled && violations.length > 0 && (_.contains(deliveryStatusDetails, 'Eligible') || _.contains(deliveryStatusDetails, 'Approved'))) {\r\n // for ads grid and Eligible status, only show this data\r\n promises = [editorialCategoryTemplate({\r\n violations,\r\n i18n,\r\n })];\r\n } else if (reasonCountToShow > 0) {\r\n if (isInlineDiagnosisForKeyword) {\r\n const inActiveReasons = _.result(config.get('CurrentAccount'), 'InactiveReasons') || [];\r\n const allowedList = [\r\n 'Eligible',\r\n ];\r\n promises.push(getInlineDiagnosisForKeywordComponent());\r\n if (\r\n // eslint-disable-next-line react-hooks/rules-of-hooks\r\n (inActiveReasons.length !== 0 && _.contains(allowedList, entity.DeliveryStatus)) ||\r\n (inActiveReasons.length === 0)\r\n ) {\r\n detailsToShow.shift();\r\n }\r\n }\r\n\r\n _.map(detailsToShow, (deliveryStatus, index) => {\r\n if (entity && entity.ExperimentId && entity.AssociatedExperiment) {\r\n promises.push(experimentTemplate({\r\n ...entity,\r\n deliveryStatus,\r\n i18n,\r\n percentSymbol,\r\n expDateUtils: getDateUtils({ i18n }),\r\n ...({ actionLink: actionLinks[deliveryStatus] }),\r\n }));\r\n } else if (useCustomTemplate(deliveryStatus)) {\r\n promises.push(getCustomTemplate(deliveryStatus, index));\r\n } else {\r\n let deliveryStatusUpdated = deliveryStatus;\r\n\r\n // special handling logic for smart shopping campaign\r\n // as the only bidding strategy option is max conversion value\r\n // the second bullet-point of the rejection detail text is not needed\r\n deliveryStatusUpdated = mapCampaignSpecificDeliveryStatus(\r\n deliveryStatusUpdated,\r\n isSmartShoppingCampaignEnabled,\r\n entity\r\n );\r\n\r\n // special handling logic for merchant center related delivery status\r\n deliveryStatusUpdated = mapDeliveryStatusForMMC(deliveryStatusUpdated);\r\n\r\n promises.push(reasonTemplate({\r\n deliveryStatus: deliveryStatusUpdated,\r\n reasonid: `${tableId}_${index}`,\r\n ...({ actionLink: actionLinks[deliveryStatus] }),\r\n i18n,\r\n }));\r\n }\r\n });\r\n } else if (isContextualAttributeForRecommendation) {\r\n promises.push(getCustomTemplate());\r\n } else {\r\n promises.push(noReasonFoundTemplate({ i18n }));\r\n }\r\n\r\n // for ads grid Non-Eligible status, append the editorial category page at last\r\n if (isForAdsPageOnly && isEditorialCategoryEnabled && violations.length > 0 && !_.contains(deliveryStatusDetails, 'Eligible') && !_.contains(deliveryStatusDetails, 'Approved')) {\r\n promises.push(editorialCategoryTemplate({\r\n violations,\r\n i18n,\r\n }));\r\n }\r\n\r\n\r\n function getLogForInContextRepairRecommedation(deliveryStatus) {\r\n let mes = {};\r\n if (inContextRepairRecommedationType === 'ad') {\r\n const adId = entity ? entity.Id : undefined;\r\n const adGroupId = entity && entity.AdGroup ? entity.AdGroup.Id : undefined;\r\n const campaignId = entity && entity.Campaign ? entity.Campaign.Id : undefined;\r\n mes = {\r\n CampaignId: campaignId,\r\n AdGroupId: adGroupId,\r\n AdId: adId,\r\n DeliveryStatusType: deliveryStatus,\r\n };\r\n } else if (inContextRepairRecommedationType === 'adGroup') {\r\n const adGroupId = entity ? entity.Id : undefined;\r\n const campaignId = entity && entity.Campaign ? entity.Campaign.Id : undefined;\r\n mes = {\r\n CampaignId: campaignId,\r\n AdGroupId: adGroupId,\r\n DeliveryStatusType: deliveryStatus,\r\n };\r\n } else if (inContextRepairRecommedationType === 'campaign') {\r\n const campaignId = entity ? entity.Id : undefined;\r\n mes = { CampaignId: campaignId, DeliveryStatusType: deliveryStatus };\r\n }\r\n\r\n return mes;\r\n }\r\n\r\n function getContentView(pages, page, container) {\r\n const contentView = new contents.PagedContent({\r\n pages,\r\n i18n,\r\n handlePaginationExternally: true,\r\n }).setPages(page);\r\n container.show();\r\n\r\n return contentView;\r\n }\r\n\r\n function hoverPopupDurationStart() {\r\n if (window.popupManager) {\r\n // force acquire lock for user-initiated popup\r\n window.popupManager.forceAcquireLock(popupContentKey);\r\n }\r\n if (activities.hoverPopupCalloutDurationActivity) {\r\n activities.hoverPopupCalloutDurationActivity.startSignal('onHover');\r\n }\r\n }\r\n\r\n function hoverPopupDurationStop() {\r\n if (window.popupManager) {\r\n // release lock for user-initiated popup\r\n window.popupManager.releaseLock(popupContentKey);\r\n }\r\n if (activities.hoverPopupCalloutDurationActivity) {\r\n activities.hoverPopupCalloutDurationActivity.stopSignal('onHoverEnd');\r\n }\r\n }\r\n\r\n function renderPages(pages, page, container) {\r\n const contentView = getContentView(pages, page, container);\r\n\r\n contentView.once('rendered', () => {\r\n const contentViewReactWrapper = ;\r\n const containerDOM = document.querySelector(containerSelector);\r\n\r\n if (containerDOM) {\r\n ReactDOM.render(\r\n {\r\n ReactDOM.unmountComponentAtNode(containerDOM);\r\n hoverPopupDurationStop();\r\n }}\r\n view={view}\r\n popoverId={popoverId}\r\n />,\r\n containerDOM,\r\n hoverPopupDurationStart\r\n );\r\n afterRender(contentView, event);\r\n }\r\n });\r\n contentView.once('willPageUpdate', (newPage) => {\r\n view.trigger('closeDeliveryStatusPopup');\r\n renderPages(pages, newPage, container);\r\n });\r\n\r\n contentView.$el.one('contentUpdated', (e, newPageContent) => {\r\n const newPages = [...pages];\r\n newPages[contentView.currentPage - 1] = newPageContent;\r\n renderPages(newPages, contentView.currentPage, container);\r\n });\r\n\r\n // Below code is used to log for measurement\r\n // Log as click event when user click on the delivery status link\r\n contentView.$el.on('click', 'a', (eventObject) => {\r\n if (activities.clickActivity) {\r\n const deliveryStatus = $(eventObject.target).parent().data('delivery-status');\r\n if (deliveryStatus) {\r\n const mes = getLogForInContextRepairRecommedation(deliveryStatus);\r\n activities.clickActivity.trace(JSON.stringify(mes));\r\n }\r\n }\r\n });\r\n\r\n // Below code is used to log for measurement\r\n // Log as hover event when user hover no rejection popup and turn to specific page\r\n // contains delivery status link\r\n const currentConent = pages[page - 1];\r\n\r\n if (activities.hoverActivity) {\r\n const deliveryStatus = _.find(\r\n ['NoEligibleAdGroups', 'NoEligibleAds', 'NoEligibleKeywords', 'ShoppingCampaignNoOffersPresent_With_Link'],\r\n status => currentConent.includes(status)\r\n );\r\n if (deliveryStatus) {\r\n const mes = getLogForInContextRepairRecommedation(deliveryStatus);\r\n activities.hoverActivity.trace(JSON.stringify(mes));\r\n }\r\n }\r\n\r\n return contentView;\r\n }\r\n\r\n return new Promise((resolve) => {\r\n Promise.all(promises).then((pages) => {\r\n const container = $(containerSelector);\r\n const contentView = renderPages(pages, 1, container);\r\n\r\n resolve(contentView);\r\n });\r\n });\r\n}\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport { showRejectionReasons } from './rejection/show-rejection-reasons';\r\n\r\n/**\r\n * Manages creation of delivery status column popups\r\n * This popup is based on the projection grid\r\n */\r\nexport class DeliveryStatusPopupFactory {\r\n /**\r\n * Constructs the factory, associating with a grid and rejection view handler\r\n * @param {Object} grid - The grid to which this factory will be associated\r\n * @param {Object} i18n - Localization function\r\n */\r\n constructor({\r\n grid,\r\n i18n,\r\n }) {\r\n this.grid = grid;\r\n this.i18n = i18n;\r\n }\r\n\r\n /**\r\n * Creates entity object from event target using the grid associated with the factory.\r\n *\r\n * @param {Object} event - The click event from where the quality score cell was clicked.\r\n * @returns {Object} entity - The entity object for the clicked row\r\n * it should contains at least { Name, DeliveryStatusDetails, Id } as property.\r\n */\r\n getEventTargetEntity(event) {\r\n const model = this.getEventTargetModel(event);\r\n\r\n return model;\r\n }\r\n\r\n /**\r\n * Gets model object from event target using the grid associated with the factory.\r\n *\r\n * @param {Object} event - The click event from where the quality score cell was clicked.\r\n * @returns {Object} entity - The entity object for the clicked row\r\n * it should contains at least { Name, DeliveryStatusDetails, Id } as property.\r\n */\r\n getEventTargetModel(event) {\r\n const key = this.grid.gridView.keyOfElement(event.target);\r\n\r\n return this.grid.gridView.itemWithKey(key);\r\n }\r\n\r\n /**\r\n * show campaign reject reasons\r\n *\r\n * @param {Object} event - The click event from where the quality score cell was clicked.\r\n * @param {Function} [getCustomeTemplate] - Method that returns whether to use custome template\r\n * @param {Function} [useCustomTemplate] - Methot that returns custom reason templates\r\n * @param {String} [containerSelector] - popup container selector\r\n * @param {String} [popoverId] - popup id\r\n * @param {Object} [view] - view that has event triggered to close the popup\r\n * @returns {undefined}.\r\n */\r\n showRejectionPopup({\r\n event,\r\n useCustomTemplate,\r\n getCustomTemplate,\r\n actionLinks,\r\n containerSelector,\r\n isContextualAttributeForRecommendation,\r\n isInlineDiagnosisForKeyword,\r\n IsExperimentsOpenBetaEnabled,\r\n isSmartShoppingCampaignEnabled,\r\n percentSymbol,\r\n getInlineDiagnosisForKeywordComponent,\r\n popoverId,\r\n view,\r\n afterRender,\r\n config,\r\n instrumentation,\r\n inContextRepairRecommedationType,\r\n isEditorialCategoryEnabled,\r\n }) {\r\n const entity = this.getEventTargetEntity(event);\r\n\r\n if (entity === null && !isContextualAttributeForRecommendation) {\r\n return Promise.resolve(false);\r\n }\r\n\r\n if (IsExperimentsOpenBetaEnabled && entity.ExperimentId && entity.AssociatedExperiment) {\r\n entity.statusForCombinedPopup = [\r\n 'CampaignUserPaused',\r\n 'InvalidFinancialStatusOther',\r\n 'CampaignSuspended',\r\n 'AutoBiddingLimitedByNotEnoughConversions',\r\n ];\r\n\r\n if (_.contains(['Promoted', 'Graduated', 'Ended'], entity.AssociatedExperiment.Status)) {\r\n // Show experiment info only\r\n entity.DeliveryStatusDetails = ['ExperimentInfo'];\r\n } else if (!_.contains(entity.statusForCombinedPopup, entity.DeliveryStatus)) {\r\n // Show original info and experiment info in different pages\r\n entity.DeliveryStatusDetails = _.union(entity.DeliveryStatusDetails, ['ExperimentInfo']);\r\n }\r\n // Otherwise show original info combined with experiment info within the same page\r\n }\r\n\r\n return showRejectionReasons({\r\n event,\r\n entity,\r\n getCustomTemplate,\r\n useCustomTemplate,\r\n deliveryStatusDetails: entity && entity.DeliveryStatusDetails,\r\n actionLinks,\r\n i18n: this.i18n,\r\n getInlineDiagnosisForKeywordComponent,\r\n isInlineDiagnosisForKeyword,\r\n isContextualAttributeForRecommendation,\r\n isSmartShoppingCampaignEnabled,\r\n containerSelector,\r\n percentSymbol,\r\n popoverId,\r\n view,\r\n afterRender,\r\n config,\r\n instrumentation,\r\n inContextRepairRecommedationType,\r\n isForAdsPageOnly: this.grid.config && this.grid.config.name === 'summary_tab_ad',\r\n isEditorialCategoryEnabled,\r\n });\r\n }\r\n}\r\n\r\n","/* eslint-disable no-bitwise */\r\nexport const EditorialComponent =\r\n {\r\n None: 0,\r\n Keyword: 1,\r\n KeywordParam1: 2,\r\n KeywordParam2: 4,\r\n KeywordParam3: 8,\r\n AdTitleDescription: 256,\r\n AdTitle: 512,\r\n AdDescription: 1024,\r\n DisplayUrl: 2048,\r\n DestinationUrl: 4096,\r\n LandingURL: 8192,\r\n SiteDomain: 16384,\r\n BusinessName: 32768,\r\n PhoneNumber: 65536,\r\n AltText: 262144,\r\n Audio: 524288,\r\n Video: 1048576,\r\n Flash: 2097152,\r\n CAsset: 4194304,\r\n Image: 8388608,\r\n Destination: 16777216,\r\n Asset: 33554432,\r\n Ad: 67108864,\r\n Order: 134217728,\r\n OrderItem: 268435456,\r\n Association: 536870912,\r\n Script: 1073741824,\r\n };\r\n\r\nexport function getLocationString({ location, commonI18n }) {\r\n const locations = [];\r\n if ((location & EditorialComponent.AdTitle) === EditorialComponent.AdTitle) {\r\n locations.push(commonI18n.getString('EdReason_AdTitle'));\r\n }\r\n\r\n if ((location & EditorialComponent.AdTitleDescription)\r\n === EditorialComponent.AdTitleDescription) {\r\n locations.push(commonI18n.getString('EdReason_AdTitleDesc'));\r\n }\r\n\r\n if ((location & EditorialComponent.AdDescription) === EditorialComponent.AdDescription) {\r\n locations.push(commonI18n.getString('EdReason_AdDesc'));\r\n }\r\n\r\n if ((location & EditorialComponent.DisplayUrl) === EditorialComponent.DisplayUrl) {\r\n locations.push(commonI18n.getString('EdReason_DisplayUrl'));\r\n }\r\n\r\n if ((location & EditorialComponent.DestinationUrl) === EditorialComponent.DestinationUrl) {\r\n locations.push(commonI18n.getString('EdReason_AdDestUrl'));\r\n }\r\n\r\n if ((location & EditorialComponent.BusinessName) === EditorialComponent.BusinessName) {\r\n locations.push(commonI18n.getString('EdReason_BusinessName'));\r\n }\r\n\r\n if ((location & EditorialComponent.PhoneNumber) === EditorialComponent.PhoneNumber) {\r\n locations.push(commonI18n.getString('EdReason_PhoneNumber'));\r\n }\r\n\r\n if ((location & EditorialComponent.Keyword) === EditorialComponent.Keyword) {\r\n locations.push(commonI18n.getString('EdReason_Keyword'));\r\n }\r\n\r\n if ((location & EditorialComponent.KeywordParam1) === EditorialComponent.KeywordParam1) {\r\n locations.push(commonI18n.getString('EdReason_Param1'));\r\n }\r\n\r\n if ((location & EditorialComponent.KeywordParam2) === EditorialComponent.KeywordParam2) {\r\n locations.push(commonI18n.getString('EdReason_Param2'));\r\n }\r\n\r\n if ((location & EditorialComponent.KeywordParam3) === EditorialComponent.KeywordParam3) {\r\n locations.push(commonI18n.getString('EdReason_Param3'));\r\n }\r\n\r\n if ((location & EditorialComponent.LandingURL) === EditorialComponent.LandingURL) {\r\n locations.push(commonI18n.getString('EdReason_LandingUrl'));\r\n }\r\n\r\n if ((location & EditorialComponent.SiteDomain) === EditorialComponent.SiteDomain) {\r\n locations.push(commonI18n.getString('EdReason_SiteDomain'));\r\n }\r\n\r\n if ((location & EditorialComponent.Image) === EditorialComponent.Image) {\r\n locations.push(commonI18n.getString('EdReason_Image'));\r\n }\r\n\r\n if ((location & EditorialComponent.AltText) === EditorialComponent.AltText) {\r\n locations.push(commonI18n.getString('EdReason_AltText'));\r\n }\r\n\r\n if ((location & EditorialComponent.Flash) === EditorialComponent.Flash) {\r\n locations.push(commonI18n.getString('EdReason_Flash'));\r\n }\r\n\r\n if ((location & EditorialComponent.Audio) === EditorialComponent.Audio) {\r\n locations.push(commonI18n.getString('EdReason_Audio'));\r\n }\r\n\r\n if ((location & EditorialComponent.Video) === EditorialComponent.Video) {\r\n locations.push(commonI18n.getString('EdReason_Video'));\r\n }\r\n\r\n if ((location & EditorialComponent.CAsset) === EditorialComponent.CAsset) {\r\n locations.push(commonI18n.getString('EdReason_CAsset'));\r\n }\r\n\r\n if ((location & EditorialComponent.Asset) === EditorialComponent.Asset) {\r\n locations.push(commonI18n.getString('EdReason_Asset'));\r\n }\r\n\r\n if ((location & EditorialComponent.Ad) === EditorialComponent.Ad) {\r\n locations.push(commonI18n.getString('EdReason_Ad'));\r\n }\r\n\r\n if ((location & EditorialComponent.Order) === EditorialComponent.Order) {\r\n locations.push(commonI18n.getString('EdReason_Order'));\r\n }\r\n\r\n if ((location & EditorialComponent.OrderItem) === EditorialComponent.OrderItem) {\r\n locations.push(commonI18n.getString('EdReason_OrderItem'));\r\n }\r\n\r\n if ((location & EditorialComponent.Destination) === EditorialComponent.Destination) {\r\n locations.push(commonI18n.getString('EdReason_AdDestUrl'));\r\n }\r\n\r\n if ((location & EditorialComponent.Association) === EditorialComponent.Association) {\r\n locations.push(commonI18n.getString('EdReason_Association'));\r\n }\r\n\r\n if ((location & EditorialComponent.Script) === EditorialComponent.Script) {\r\n locations.push(commonI18n.getString('EdReason_Script'));\r\n }\r\n\r\n // javascript has overflowing issue for big numbers such as Math.pow(2, 60)\r\n // use comparation instead\r\n // eslint-disable-next-line no-restricted-properties\r\n if (location && location > Math.pow(2, 59) && location <= Math.pow(2, 60)) {\r\n locations.push(commonI18n.getString('EdReason_DataFeedItem'));\r\n }\r\n\r\n return locations.join(', ');\r\n}\r\n","/* eslint-disable no-bitwise */\r\nimport _ from 'underscore';\r\nimport { isXandrServing, isLinkedInCampaign } from '@bingads-webui-campaign-react/constants';\r\n\r\nimport { getEditorialErrorMessage } from '@bingads-webui-campaign/api-errors';\r\nimport { getLocationString } from './location-Enum-To-String-Mapping';\r\nimport editorialTemplate from './editorial-reason.pug';\r\nimport { ENTITY, ENTITYToI18, ENTITYPluralToI18 } from './constants';\r\n\r\nfunction getRejectionFooterText(i18n, entity, isAppealable, isDisclaimerDisapproved, hideParentLevel) {\r\n const thisEntity = i18n.getString('EditorialAppeal_ThisEntity')\r\n .replace('{0}', i18n.getString(ENTITYToI18[entity]));\r\n const allEntitiesInThisAdGroup = i18n.getString('EditorialAppeal_AllEntitiesInThisAdGroup')\r\n .replace('{0}', i18n.getString(ENTITYPluralToI18[entity]));\r\n const allEntitiesInThisCampaign = i18n.getString('EditorialAppeal_AllEntitiesInThisCampaign')\r\n .replace('{0}', i18n.getString(ENTITYPluralToI18[entity]));\r\n const allEntitiesInThisAd = i18n.getString('EditorialAppeal_AllEntitiesInThisAd').replace('{0}', i18n.getString(ENTITYPluralToI18[entity]));\r\n const requestExceptionForThisEntity = i18n.getString('Request_Exception').replace('{0}', thisEntity);\r\n let requestExceptionLink = `${requestExceptionForThisEntity}`;\r\n const requestExceptionForThisParentEntity = i18n.getString('Request_Exception').replace('{0}', entity === ENTITY.ASSETGROUP ? allEntitiesInThisCampaign : allEntitiesInThisAdGroup);\r\n let requestParentLevelExceptionLink = hideParentLevel ? null : `${requestExceptionForThisParentEntity}`;\r\n const helpText = i18n.getString('Fix_Disapproved_Entity_Help').replace('{0}', isDisclaimerDisapproved ? i18n.getString('DisclaimerLabelText') : i18n.getString(ENTITYToI18[entity]));\r\n if (entity === ENTITY.EXTENSION) {\r\n requestExceptionLink = `${isDisclaimerDisapproved ? i18n.getString('Request_Exception').replace('{0}', i18n.getString('DisclaimerLabelText')) : requestExceptionForThisEntity}`;\r\n requestParentLevelExceptionLink = null;\r\n }\r\n if (entity === ENTITY.ASSET) {\r\n requestExceptionLink = `${i18n.getString('Request_Exception').replace('{0}', hideParentLevel ? allEntitiesInThisAd : allEntitiesInThisAdGroup)}`;\r\n requestParentLevelExceptionLink = null;\r\n }\r\n return {\r\n requestExceptionLink,\r\n requestParentLevelExceptionLink,\r\n helpText,\r\n };\r\n}\r\n\r\nfunction getRejectionStaticLinkFooterText(i18n) {\r\n const contactSupportLink = `${i18n.getString('Contact_Support')}`;\r\n return {\r\n contactSupportLink,\r\n requestReviewText: i18n.getString('Request_Another_Review'),\r\n };\r\n}\r\n\r\nexport function getEditorialTemplates({\r\n reasons,\r\n errI18n,\r\n i18n,\r\n locationI18n,\r\n commonI18n,\r\n entity,\r\n deliveryStatus,\r\n ad,\r\n keyword,\r\n isAppealable,\r\n permissions,\r\n isDetectionRejectionTypeEnabled,\r\n logActivity,\r\n hideParentLevel,\r\n hideLocation,\r\n scope,\r\n}) {\r\n const updatedReasons = [];\r\n const isXandrAd = ENTITY.AD === entity && isXandrServing(\r\n _.chain(ad).result('Campaign').result('CampaignSubType').value(),\r\n _.chain(ad).result('Campaign').result('CampaignSettings').value()\r\n );\r\n const { adGroupId } = (scope && scope.values) || {};\r\n const isAssetAppealEnable = permissions && permissions.dynamic.AssetBasedEditorialInlineAppeal && ENTITY.ASSET === entity && adGroupId;\r\n const isLinkedinAd = ENTITY.AD === entity && isLinkedInCampaign(_.chain(ad).result('Campaign').result('CampaignType').value());\r\n const isPmaxAppealEnable = ENTITY.ASSETGROUP === entity && permissions && permissions.dynamic && permissions.dynamic.PmaxAppealEnable;\r\n const isAdExtensionInlineAppeal = ENTITY.EXTENSION === entity && permissions && permissions.dynamic && permissions.dynamic.AdExtensionInlineAppeal;\r\n const showRequestExceptionLink = ((!isXandrAd && !isLinkedinAd) && _.contains([ENTITY.AD, ENTITY.KEYWORD], entity)) || isPmaxAppealEnable || isAdExtensionInlineAppeal || isAssetAppealEnable;\r\n const isCountryListEnabled = permissions && permissions.dynamic && permissions.dynamic.EditorialCountryList;\r\n\r\n if (logActivity && logActivity.signal) {\r\n logActivity.signal(`reject reasons of ${entity} - ${ad ? ad.Id : keyword && keyword.Id} : ${deliveryStatus} : ${JSON.stringify(reasons)}`);\r\n }\r\n\r\n _.each(reasons, (reason, i) => {\r\n const reasonCode = reason.ReasonCode;\r\n let endReason = true;\r\n\r\n if ((i !== reasons.length - 1) && (reasons[i + 1].ReasonCode === reasonCode)) {\r\n endReason = false;\r\n }\r\n\r\n if (endReason) {\r\n const violation = getEditorialErrorMessage(reason.ReasonCode, errI18n, null, permissions);\r\n let locations = '';\r\n let countries = '';\r\n\r\n const locationString = typeof (reason.Location) === 'string' ? reason.Location : getLocationString({\r\n location: reason.Location,\r\n i18n,\r\n commonI18n,\r\n });\r\n\r\n if (locationString && !hideLocation) {\r\n locations = i18n.getString('DeliveryStatus_Violcation_Location').replace('{0}', locationString);\r\n }\r\n\r\n countries =\r\n _.chain(reason.LanguageToCountries)\r\n .pluck('PublisherCountries')\r\n .flatten()\r\n .uniq()\r\n .map(country => (entity === ENTITY.EXTENSION ? country : locationI18n.getString(`PublisherCountry_${country}`)))\r\n .value();\r\n\r\n let violationCountry = null;\r\n if (countries.length === 1) {\r\n violationCountry = i18n.getString('DeliveryStatus_Violcation_One_Country').replace('{0}', countries[0]);\r\n } else {\r\n violationCountry = isCountryListEnabled ? i18n.getString('DeliveryStatus_Violcation_Country_WithLink', {\r\n number: countries.length,\r\n tag: '',\r\n endtag: '',\r\n }) :\r\n i18n.getString('DeliveryStatus_Violcation_Country').replace('{0}', countries.length);\r\n }\r\n\r\n updatedReasons.push({\r\n violation,\r\n locations,\r\n violationCountry,\r\n countries,\r\n detectionType: isDetectionRejectionTypeEnabled ? i18n.getString(`Editorial_Detection_Type_${reason.DetectionMode || 'Unknown'}`) : '',\r\n rejectionType: isDetectionRejectionTypeEnabled ? i18n.getString(`Editorial_Rejection_Type_${reason.RejectionMode || 'Unknown'}`) : '',\r\n });\r\n }\r\n });\r\n\r\n const isDisclaimerDisapproved = deliveryStatus === 'DisclaimerInfoRejected' || deliveryStatus === 'DisclaimerInfoApprovedLimited' || deliveryStatus === 'DisclaimerInfoRejectedAppealRejected' || deliveryStatus === 'DisclaimerInfoApprovedLimitedAppealRejected';\r\n const isDisapproved = deliveryStatus === 'EditorialRejected' || deliveryStatus === 'Rejected' || deliveryStatus === 'EditorialAppealRejected' || isDisclaimerDisapproved;\r\n let title = i18n.getString('EntityStatus_Rejected');\r\n switch (deliveryStatus) {\r\n // new string\r\n case 'AppealRejected':\r\n case 'RejectedAppealRejected':\r\n case 'EditorialAppealRejected':\r\n title = i18n.getString('Label_DeliveryStatus_EditorialAppealRejected');\r\n break;\r\n case 'ApprovedLimitedAppealRejected':\r\n case 'EditorialApprovedLimitedAppealRejected':\r\n title = i18n.getString('Label_DeliveryStatus_EditorialApprovedLimitedAppealRejected');\r\n break;\r\n case 'ApprovedLimited':\r\n case 'EditorialApprovedLimited':\r\n title = i18n.getString('EntityStatus_ApprovedLimited');\r\n break;\r\n case 'DisclaimerInfoRejected':\r\n title = i18n.getString('EntityStatus_DisclaimerInfoRejected');\r\n break;\r\n case 'DisclaimerInfoApprovedLimited':\r\n title = i18n.getString('EntityStatus_DisclaimerInfoApprovedLimited');\r\n break;\r\n case 'DisclaimerInfoRejectedAppealRejected':\r\n title = i18n.getString('Label_DeliveryStatus_DisclaimerInfoRejectedAppealRejected');\r\n break;\r\n case 'DisclaimerInfoApprovedLimitedAppealRejected':\r\n title = i18n.getString('Label_DeliveryStatus_DisclaimerInfoApprovedLimitedAppealRejected');\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n return editorialTemplate({\r\n title,\r\n reasons: updatedReasons,\r\n i18n,\r\n commonI18n,\r\n showRequestExceptionLink,\r\n footer: showRequestExceptionLink\r\n ? getRejectionFooterText(i18n, entity, isAppealable, isDisclaimerDisapproved, hideParentLevel)\r\n : getRejectionStaticLinkFooterText(i18n),\r\n isDisapproved,\r\n isDetectionRejectionTypeEnabled,\r\n isCountryListHidden: isLinkedinAd,\r\n isCountryListEnabled,\r\n countryListLabel: isCountryListEnabled ? i18n.getString('RejectionCountriesText') : '',\r\n });\r\n}\r\n\r\nexport function isDeliveryStatusDisapproved(deliveryStatusDetails) {\r\n const editorialStatus = ['EditorialRejected', 'EditorialApprovedLimited', 'EditorialAppealRejected', 'EditorialApprovedLimitedAppealRejected'];\r\n return _.contains(editorialStatus, deliveryStatusDetails);\r\n}\r\n\r\n","import $ from 'jquery';\r\n\r\nexport function registerCountryListEvent(popupView, logActivity, logContext) {\r\n popupView.find('.toggle-country-list').on('click', (e) => {\r\n const $target = $(e.target);\r\n const $parent = $target.hasClass('icon') ? $target.parent() : $target.parentsUntil('li').parent();\r\n const $icon = $parent.find('.icon');\r\n if ($icon.hasClass('iconba-ChevronDown')) {\r\n $icon.removeClass('iconba-ChevronDown').addClass('iconba-ChevronUp');\r\n } else {\r\n $icon.removeClass('iconba-ChevronUp').addClass('iconba-ChevronDown');\r\n }\r\n const $country = $parent.find('.country-list');\r\n $country.toggle();\r\n\r\n if (logActivity && logActivity.trace) {\r\n logActivity.trace(`toggle country list of ${logContext && logContext.entity}: ${logContext && logContext.id}`);\r\n }\r\n\r\n // reposition the popup\r\n popupView.trigger('contentUpdated', popupView.find('.new-editorial-popup')[0].outerHTML);\r\n });\r\n}\r\n","/* eslint-disable no-underscore-dangle */\r\nimport _ from 'underscore';\r\nimport { dataSource as GridDataSource } from 'projection-grid';\r\n\r\nexport const CHART_DATA_KEY = '@ns.performancetimeseries';\r\n\r\nfunction translateOrderBy(dataSource, orderByParams) {\r\n const orderBy = _.chain(dataSource.normalizeOrderBy(orderByParams))\r\n .map(([key, direction]) => [\r\n key,\r\n direction > 0 ? 'ASC' : 'DESC',\r\n ])\r\n .value();\r\n\r\n return _.isEmpty(orderBy) ? null : orderBy;\r\n}\r\n\r\nfunction translateParams(dataSource, params) {\r\n return _.chain(params)\r\n .omit('skip', 'take', 'filter', 'orderby')\r\n .extend(_.pick({\r\n offset: params.skip,\r\n limit: params.take,\r\n where: params.filter,\r\n orderBy: translateOrderBy(dataSource, params.orderby),\r\n }, Boolean))\r\n .value();\r\n}\r\n\r\nexport class JSGridChartDataSource extends GridDataSource.JSData {\r\n constructor(resource, options = {}) {\r\n super(resource, options);\r\n this.chartData = null;\r\n this.loadingCallback = null;\r\n this.successCallback = null;\r\n this.errorCallback = null;\r\n }\r\n query(params) {\r\n const options = _.defaults({}, params.options, this._options);\r\n if (this.loadingCallback) {\r\n this.loadingCallback();\r\n }\r\n return this._resource\r\n .findAll(translateParams(this, _.omit(params, 'options')), options)\r\n .then((data) => {\r\n if (_.isArray(data)) {\r\n try {\r\n this.updateChartData(JSON.parse(data.raw[CHART_DATA_KEY]));\r\n if (this.successCallback) {\r\n this.successCallback(this.chartData);\r\n }\r\n } catch (e) {\r\n if (this.errorCallback) {\r\n this.errorCallback(e);\r\n }\r\n }\r\n return ({\r\n items: data.slice(),\r\n totalCount: data.totalCount || 0,\r\n });\r\n }\r\n throw data;\r\n });\r\n }\r\n updateChartData(chartData) {\r\n this.chartData = chartData;\r\n }\r\n getChartData(successCallback, errorCallback) {\r\n this.successCallback = successCallback;\r\n this.errorCallback = errorCallback;\r\n if (this.successCallback && this.chartData) {\r\n this.successCallback(this.chartData);\r\n }\r\n }\r\n onLoading(loadingCallback) {\r\n this.loadingCallback = loadingCallback;\r\n }\r\n}\r\n","/* eslint-disable no-param-reassign */\r\nimport _ from 'underscore';\r\nimport { merge } from '@bingads-webui-universal/primitive-utilities';\r\nimport { dataSource as GridDataSource } from 'projection-grid';\r\nimport { JSGridChartDataSource } from './grid-chart-datasource';\r\n\r\nconst defaultAfterFindAll = ((__, attrs) => attrs);\r\nexport function connect(dataSourceConfig, dataQueryBuilder, featureName, logger = {\r\n logActivityMarker: _.noop,\r\n}, usingCacheManager, useJSGridChartDataSource = false, customDataSource, afterFindAllPromiseResolve) {\r\n if (dataSourceConfig.type !== 'jsdata') {\r\n throw new Error('Data source type not implemented');\r\n }\r\n\r\n let dataSource;\r\n if (useJSGridChartDataSource) {\r\n dataSource = new JSGridChartDataSource(dataSourceConfig.entity, dataSourceConfig.options);\r\n } else {\r\n dataSource = new GridDataSource.JSData(dataSourceConfig.entity, dataSourceConfig.options);\r\n }\r\n if (customDataSource) {\r\n dataSource = customDataSource;\r\n }\r\n\r\n const originalQuery = dataSource.query;\r\n\r\n let callCount = 1;\r\n\r\n function shouldBustCache() {\r\n return !usingCacheManager && callCount < 3;\r\n }\r\n\r\n // eslint-disable-next-line no-param-reassign\r\n dataSource.query = (\r\n queryParams = {},\r\n { queryTransform = _.identity } = {},\r\n onStartQuery = _.noop,\r\n isDFMCall\r\n ) => dataQueryBuilder.getQuery().then((params) => {\r\n logger.logActivityMarker(`DataFetchManager/DFMCall.${callCount}`, { FeatureName: featureName });\r\n if (isDFMCall) {\r\n /**\r\n * 1. Call afterFindAll in dataSourceConfig\r\n * 2. Cannot use _.result to get the afterFindAll property\r\n * because _.result invokes the function property\r\n */\r\n const {\r\n afterFindAll: originalAfterFindAllInParams = defaultAfterFindAll,\r\n } = params.options || {};\r\n const {\r\n afterFindAll: originalAfterFindAllInConfig = defaultAfterFindAll,\r\n } = dataSourceConfig.options || {};\r\n params.options = _.extend({}, params.options, {\r\n afterFindAll: (resources, attrs) => {\r\n dataSource.dfmData = attrs;\r\n dataSource.dfmRawData = _.property('raw')(attrs);\r\n const returnData = originalAfterFindAllInConfig(\r\n resources,\r\n originalAfterFindAllInParams(resources, attrs)\r\n );\r\n if (afterFindAllPromiseResolve) {\r\n if (dataSource.options && dataSource.options.afterFindAll) {\r\n return dataSource.options.afterFindAll(resources, attrs);\r\n }\r\n afterFindAllPromiseResolve(attrs);\r\n }\r\n\r\n return returnData;\r\n },\r\n });\r\n }\r\n\r\n const finalParams = params;\r\n\r\n // Do not merge schema as it may have circular references\r\n const querySchema = _.chain(queryParams)\r\n .result('options')\r\n .result('filterOptions')\r\n .result('schema')\r\n .value();\r\n\r\n const finalSchema = _.chain(finalParams)\r\n .result('options')\r\n .result('filterOptions')\r\n .result('schema')\r\n .value();\r\n\r\n const hasQuerySchema = _.isObject(querySchema);\r\n const hasFinalSchema = _.isObject(finalSchema);\r\n\r\n if (hasQuerySchema) {\r\n // eslint-disable-next-line no-param-reassign\r\n delete queryParams.options.filterOptions.schema;\r\n }\r\n\r\n if (hasFinalSchema) {\r\n delete finalParams.options.filterOptions.schema;\r\n }\r\n\r\n finalParams.options = merge({}, queryParams.options, finalParams.options);\r\n\r\n if (hasQuerySchema || hasFinalSchema) {\r\n finalParams.options.filterOptions.schema = finalSchema || querySchema;\r\n }\r\n\r\n\r\n if (shouldBustCache()) {\r\n finalParams.cacheBusterFlag = `call-number-${callCount}-cache-buster`;\r\n }\r\n\r\n const result = originalQuery.call(dataSource, queryTransform(finalParams, queryParams));\r\n onStartQuery();\r\n\r\n callCount += 1;\r\n\r\n return result;\r\n });\r\n\r\n dataSource.queryBuilder = dataQueryBuilder;\r\n\r\n return dataSource;\r\n}\r\n","import _ from 'underscore';\r\n\r\nconst defaultAfterFindAll = (options, data) => data;\r\n/**\r\n * Previously, we accessed the error through the grid instance,\r\n * but now we prefetch the grid odata call,\r\n * when we execute afterFindAll there is no grid instance constructed yet,\r\n * so we access the error through the dataSource instance\r\n */\r\nexport class QueryErrorFactory {\r\n static make(dataSourceConfig) {\r\n const errors = {\r\n tooMuchDataError: false,\r\n };\r\n const originalAfterFindAll = dataSourceConfig.options.afterFindAll || defaultAfterFindAll;\r\n // eslint-disable-next-line no-param-reassign\r\n dataSourceConfig.options.afterFindAll = (options, data = {}) => {\r\n _.mapObject(errors, (val, key) => {\r\n errors[key] = false;\r\n });\r\n if (_.any(data.errors, err => err.Code === 'TooMuchDataToDownload')) {\r\n errors.tooMuchDataError = true;\r\n }\r\n return originalAfterFindAll(options, data);\r\n };\r\n return errors;\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { convertEnumValuetoLegacy, convertEnumValuetoLegacyString } from '@bingads-webui/filter-entity';\r\n\r\nconst EnumPropertyToTypeMapping = {\r\n AudienceStatus: ['AdGroupCriterionStatus'],\r\n BidTarget: ['BidTargetType'],\r\n BidType: ['BidType'],\r\n CampaignType: ['CampaignType'],\r\n CallTrackingStatus: ['AdGroupCallTrackingStatus'],\r\n DeliveryStatus: ['DeliveryStatus'],\r\n DevicePreference: ['DevicePreference'],\r\n DisplayBiddingStrategyType: ['BiddingStrategyType'],\r\n Language: ['Language'],\r\n Medium: ['Medium'],\r\n Status: ['CampaignStatus', 'AdGroupStatus', 'AudienceStatus', 'AdStatus'],\r\n Type: ['AdType'],\r\n MatchType: ['MatchType'],\r\n AvailableInsightTypeIds: ['FluctuationType'],\r\n AdGroupType: ['SearchStandard', 'SearchDynamic', null],\r\n CampaignCashbackScope: ['None', 'Store', 'Product'],\r\n AdGroupCashbackScope: ['None', 'Store', 'Product'],\r\n Coupon: ['None', 'Enabled', 'Disabled'],\r\n};\r\nconst EnumPropertyToStringTypeMapping = [\r\n 'AudienceType',\r\n];\r\n\r\nfunction toLegacyEnum(value, property) {\r\n const types = EnumPropertyToTypeMapping[property];\r\n let legacyValue = null;\r\n\r\n if (_.size(types) > 0) {\r\n legacyValue = convertEnumValuetoLegacy(value);\r\n\r\n if (legacyValue) {\r\n return legacyValue;\r\n }\r\n }\r\n\r\n if (_.contains(EnumPropertyToStringTypeMapping, property)) {\r\n legacyValue = convertEnumValuetoLegacyString(value);\r\n }\r\n\r\n return legacyValue;\r\n}\r\n\r\nfunction toLegacyOperator(op, col, schema) {\r\n let ret = op || '$eq';\r\n\r\n switch (ret) {\r\n case '$contains':\r\n ret = 'Contains';\r\n break;\r\n case '$doesnotcontain':\r\n ret = 'DoesNotContain';\r\n break;\r\n case '$startswith':\r\n ret = 'BeginsWith';\r\n break;\r\n case '$endswith':\r\n ret = 'EndsWith';\r\n break;\r\n case '$eq':\r\n ret = 'Equal';\r\n break;\r\n case '$neq':\r\n ret = 'NotEqual';\r\n break;\r\n case '$gt':\r\n ret = 'Greater';\r\n break;\r\n case '$gte':\r\n ret = 'GreaterOrEqual';\r\n break;\r\n case '$lt':\r\n ret = 'Less';\r\n break;\r\n case '$lte':\r\n ret = 'LessOrEqual';\r\n break;\r\n case '$in':\r\n if (_.isEmpty(schema.properties[col].enum) &&\r\n _.isEmpty(schema.properties[col].groupedItems)) {\r\n ret = 'Equal';\r\n } else {\r\n ret = 'EnumSelection';\r\n }\r\n break;\r\n case '$containsall':\r\n ret = 'ContainsAll';\r\n break;\r\n case '$containsany':\r\n ret = 'ContainsAny';\r\n break;\r\n case '$containsnone':\r\n ret = 'ContainsNone';\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n return ret;\r\n}\r\n\r\nfunction toLegacyColumn(col, filterSchema) {\r\n return filterSchema ? filterSchema.toAlias(col, 'legacy') : col;\r\n}\r\n\r\nfunction toLegacyValue(values, col, schema, i18n) {\r\n if (schema.properties[col]) {\r\n if (!_.isEmpty(schema.properties[col].enum) ||\r\n !_.isEmpty(schema.properties[col].groupedItems)) {\r\n return _.map(values, value => toLegacyEnum(value, col));\r\n } else if (schema.properties[col].type === 'boolean') {\r\n return _.map(values, value => (value === true ? 1 : 0));\r\n } else if (schema.properties[col].type === 'datetime') {\r\n return _.map(values, value => (i18n.formatDate(value, { raw: 'MM/dd/yyyy' })));\r\n }\r\n }\r\n\r\n return values;\r\n}\r\n\r\n/**\r\n * Converting filterEntity to Legacy filter\r\n *\r\n * @param {Object} filterentity - an instance of FilterEntity from @webui/filter-entity\r\n * @param {Object} i18n - the localization settings with formatDate support\r\n * @param {Object} i18n.formatDate - format Date time\r\n * @returns {Object} legacy filter in format of {SelectedColumn, SelectedOperator, Values}\r\n */\r\nexport function fromFilterEntityToLegacyFilter(filterentity, i18n) {\r\n const translateToLegacyFormat = function (query) {\r\n const condition = _.pairs(query)[0][1];\r\n const operator = _.pairs(condition)[0][0];\r\n let value = _.pairs(condition)[0][1];\r\n\r\n if (!_.isArray(value)) {\r\n value = [value];\r\n }\r\n\r\n return {\r\n SelectedColumn: _.pairs(query)[0][0],\r\n SelectedOperator: operator,\r\n Values: value,\r\n };\r\n };\r\n\r\n let schema;\r\n let legacyFormats;\r\n\r\n\r\n if (filterentity && filterentity.query && !_.isEmpty(filterentity.query)) {\r\n schema = filterentity.options ?\r\n filterentity.options.entitySchema :\r\n filterentity.schema.entitySchema;\r\n\r\n if (filterentity.query.$and && filterentity.query.$and.length > 0) {\r\n legacyFormats = _.map(filterentity.query.$and, query => translateToLegacyFormat(query));\r\n } else {\r\n legacyFormats = [translateToLegacyFormat(filterentity.query)];\r\n }\r\n }\r\n\r\n if (!_.isArray(legacyFormats)) {\r\n return null;\r\n }\r\n\r\n return _.map(legacyFormats, (legacyFormat) => {\r\n const col = legacyFormat.SelectedColumn;\r\n\r\n return {\r\n SelectedColumn: toLegacyColumn(col, filterentity.schema),\r\n SelectedOperator: toLegacyOperator(legacyFormat.SelectedOperator, col, schema),\r\n Values: toLegacyValue(legacyFormat.Values, col, schema, i18n),\r\n };\r\n });\r\n}\r\n","export class SessionFilterStorage {\r\n /**\r\n * Session storage that is configured to save filter object\r\n */\r\n constructor({\r\n featureName = '',\r\n filterEntityOptions = {},\r\n sessionStore,\r\n resourceId,\r\n entryId,\r\n } = {}) {\r\n if (!sessionStore) {\r\n throw new Error('No session store is provided');\r\n }\r\n this.featureName = featureName;\r\n\r\n if (resourceId) {\r\n this.resourceId = resourceId;\r\n } else {\r\n this.resourceId = this.getSessionStorageId({\r\n featureName,\r\n entityName: filterEntityOptions.entitySchema.name,\r\n }).resourceId;\r\n }\r\n\r\n if (entryId) {\r\n this.entryId = entryId;\r\n } else {\r\n this.entryId = this.getSessionStorageId({\r\n featureName,\r\n entityName: filterEntityOptions.entitySchema.name,\r\n }).entryId;\r\n }\r\n\r\n if (!sessionStore.definitions[this.resourceId]) {\r\n sessionStore.defineResource(this.resourceId);\r\n }\r\n\r\n this.storage = sessionStore.definitions[this.resourceId];\r\n }\r\n\r\n getSessionStorageId() {\r\n throw new Error('Not implemented');\r\n }\r\n\r\n save() {\r\n throw new Error('Not implemented');\r\n }\r\n\r\n get() {\r\n throw new Error('Not implemented');\r\n }\r\n\r\n clean() {\r\n return this.storage.destroy(this.entryId);\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { SessionFilterStorage } from './session-filter-storage';\r\n\r\n// todo: this logic should really be in summary-tab. will make a query generating\r\n// interface and have the storage users pass in their own version of it.\r\nfunction mapFeatureNameToEnum(featureName) {\r\n switch (featureName) {\r\n case 'summary_tab_campaign':\r\n return 'Enum.CampaignStatus';\r\n case 'summary_tab_adgroup':\r\n return 'Enum.AdGroupStatus';\r\n default:\r\n return '';\r\n }\r\n}\r\n\r\nfunction mapFeatureNameToStatusKey(featureName) {\r\n switch (featureName) {\r\n case 'summary_tab_campaign':\r\n return 'Campaign/Status';\r\n case 'summary_tab_adgroup':\r\n return 'AdGroup/Status';\r\n default:\r\n return '';\r\n }\r\n}\r\n\r\nfunction mapFeatureNameToQuery(featureName) {\r\n switch (featureName) {\r\n case 'summary_tab_campaign':\r\n return {\r\n [mapFeatureNameToStatusKey(featureName)]: {\r\n $in: [\r\n `${mapFeatureNameToEnum(featureName)}'Active'`,\r\n `${mapFeatureNameToEnum(featureName)}'BudgetPaused'`,\r\n ],\r\n },\r\n };\r\n case 'summary_tab_adgroup':\r\n return {\r\n [mapFeatureNameToStatusKey(featureName)]: {\r\n $in: [\r\n `${mapFeatureNameToEnum(featureName)}'Active'`,\r\n `${mapFeatureNameToEnum(featureName)}'CampaignBudgetPaused'`,\r\n ],\r\n },\r\n };\r\n default:\r\n return {};\r\n }\r\n}\r\n\r\nexport class LegacyQuickFilterStorage extends SessionFilterStorage {\r\n constructor(options) {\r\n if (options.newCampaignsGridFilterEnabled) {\r\n super(_.extend({}, options, {\r\n resourceId: 'quick-filter-storage-campaignwebui-CampaignsGrid',\r\n entryId: 'Campaign/QuickFilter',\r\n }));\r\n } else {\r\n super(options);\r\n }\r\n }\r\n\r\n getSessionStorageId({\r\n featureName,\r\n }) {\r\n switch (featureName) {\r\n // quick filter saved using the new session filter storage\r\n case 'summary_tab_adgroup':\r\n return {\r\n resourceId: 'quick-filter-storage-campaignwebui-AdgroupGrid',\r\n entryId: 'AdGroup/QuickFilter',\r\n };\r\n default:\r\n return {\r\n resourceId: 'quick-filter-storage',\r\n entryId: `AdsApps(CampaignUI)/Grids(${featureName})/QuickFilter`,\r\n };\r\n }\r\n }\r\n\r\n /**\r\n * Get legacy quick filter object\r\n * @return {Object} - Quick filter object that contains\r\n * key and query\r\n */\r\n get() {\r\n // TODO: based on the scenario entity, decide if we want to also\r\n // get the waterfall filter.\r\n return this.storage.find(this.entryId)\r\n .then((filterEntity) => {\r\n let key = '';\r\n if (_.isUndefined(filterEntity.filter)) {\r\n key = filterEntity.selectedKey;\r\n } else {\r\n ({ key } = filterEntity.filter);\r\n }\r\n let query = null;\r\n\r\n if (key === 'active') {\r\n query = mapFeatureNameToQuery(this.featureName);\r\n }\r\n\r\n return {\r\n filter: {\r\n key,\r\n value: {\r\n query,\r\n },\r\n },\r\n };\r\n })\r\n .catch(() => null);\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { FilterSchema, flattenEntitySchema } from '@bingads-webui/filter-schema';\r\n\r\nconst DEPRECATED_PROPERTIES = [\r\n 'PhonePerformanceMetricsPhoneSpend',\r\n 'PhonePerformanceMetricsClickCalls',\r\n 'PhonePerformanceMetricsAverageCPP',\r\n 'PhoneSpend',\r\n 'ClickCalls',\r\n 'AverageCPP',\r\n];\r\n\r\nconst isExpressionDeprecated = () => expression => _.some(\r\n DEPRECATED_PROPERTIES,\r\n deprecatedColumn => _.has(expression, deprecatedColumn)\r\n);\r\n\r\nconst applyConversionsToMongoPredicate = filterSchema =>\r\n mongoPredicate => filterSchema.applyConversions(mongoPredicate);\r\n\r\n/**\r\n * When saving values into session, they got converted to string\r\n * This class is to deserialize the string value based on the value type\r\n * upon reading the value\r\n */\r\nexport class Deserializer {\r\n constructor(options = {\r\n parseIdAsInt: true,\r\n }) {\r\n const processedSchema = flattenEntitySchema(options.filterEntityOptions.entitySchema);\r\n this.filterSchema = new FilterSchema(processedSchema);\r\n this.parseIdAsInt = options.parseIdAsInt;\r\n }\r\n\r\n deserialize(filter) {\r\n const expressions = this.convert(filter.query ? filter.query : filter);\r\n\r\n let logicalOperator = null;\r\n\r\n if (filter.query) {\r\n if (filter.query.$or) {\r\n logicalOperator = '$or';\r\n } else if (filter.query.$and) {\r\n logicalOperator = '$and';\r\n }\r\n }\r\n\r\n return _.extend(filter, {\r\n query: this.parse(expressions, logicalOperator),\r\n });\r\n }\r\n\r\n convert(query) {\r\n if (!query) {\r\n throw new Error('query is not defined. Filter object is incorrect');\r\n }\r\n\r\n if (_.isEmpty(query)) {\r\n return [];\r\n }\r\n\r\n const mongoExpressions = (query.$and || query.$or) ?\r\n (query.$and || query.$or) : [query];\r\n return mongoExpressions;\r\n }\r\n\r\n parse(expressions, logicalOperator) {\r\n if (!_.isArray(expressions)) {\r\n throw new Error('First argument must be an array of legacy expressions');\r\n }\r\n if (_.isEmpty(expressions)) {\r\n return {};\r\n }\r\n\r\n const processedExpressions = _.chain(expressions)\r\n .filter(_.negate(isExpressionDeprecated()))\r\n .map(_.compose(\r\n applyConversionsToMongoPredicate(this.filterSchema),\r\n this.toMongoPredicate.bind(this, this.filterSchema)\r\n ))\r\n .value();\r\n\r\n if (processedExpressions.length === 1) {\r\n return processedExpressions[0];\r\n }\r\n return _.object(\r\n [logicalOperator || '$and'],\r\n [processedExpressions]\r\n );\r\n }\r\n\r\n toMongoPredicate(schema, expression) {\r\n const propName = _.pairs(expression)[0][0];\r\n const condition = _.pairs(expression)[0][1];\r\n const operator = _.pairs(condition)[0][0];\r\n let value = _.pairs(condition)[0][1];\r\n const props = schema.getFilterProperty(propName);\r\n if (props && props.type) {\r\n switch (props.type) {\r\n case 'datetime':\r\n value = new Date(value);\r\n break;\r\n case 'number':\r\n value = parseFloat(value);\r\n break;\r\n case 'integer':\r\n value = parseInt(value, 10);\r\n break;\r\n case 'boolean':\r\n value = Boolean(value);\r\n break;\r\n case 'id':\r\n if (this.parseIdAsInt) {\r\n value = _.map(value, item => parseInt(item, 10)); // labels have integer ids\r\n }\r\n break;\r\n // no default\r\n }\r\n }\r\n\r\n return _.object([propName], [_.object([operator], [value])]);\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\n\r\nfunction isPending(obj) {\r\n return (obj instanceof Promise) && obj.isPending();\r\n}\r\n\r\n/* eslint-disable no-param-reassign */\r\nexport function taskQueueMixin(classInstance, methodNames) {\r\n let asyncTaskQueue = null;\r\n\r\n _.each(methodNames, (methodName) => {\r\n const originalMethod = classInstance[methodName];\r\n\r\n const wrappedMethod = (...args) => {\r\n asyncTaskQueue = isPending(asyncTaskQueue) ?\r\n asyncTaskQueue.catch(_.noop).then(() => originalMethod.call(classInstance, ...args)) :\r\n originalMethod.call(classInstance, ...args);\r\n\r\n return asyncTaskQueue;\r\n };\r\n\r\n classInstance[methodName] = wrappedMethod;\r\n });\r\n}\r\n","import _ from 'underscore';\r\nimport { cloneDeep } from '@bingads-webui-universal/primitive-utilities';\r\n\r\nimport { Deserializer } from './deserializer';\r\nimport { SessionFilterStorage } from './session-filter-storage';\r\nimport { taskQueueMixin } from './task-queue-mixin';\r\n\r\nexport class EditableFilterStorage extends SessionFilterStorage {\r\n constructor(options = {}) {\r\n super(options);\r\n this.deserializer = new Deserializer(options);\r\n\r\n taskQueueMixin(this, ['get', 'save', 'clean']);\r\n }\r\n\r\n /**\r\n * @private\r\n * @return {Object} - resource and entry ids\r\n */\r\n getSessionStorageId({\r\n featureName,\r\n entityName,\r\n }) {\r\n // Resource id is for defining resource\r\n // Entry id is for defining each entry under the same resource\r\n return {\r\n resourceId: `editable-filter-storage-campaignwebui-${featureName}`,\r\n entryId: `${entityName}/EditableFilter`,\r\n };\r\n }\r\n\r\n /**\r\n * @returns {Object} Promise that resolve to Filter object that contains query,\r\n * name and id\r\n */\r\n get() {\r\n return this.storage.find(this.entryId)\r\n .then((result = {}) => {\r\n try {\r\n if (_.isObject(result) && result.filter) {\r\n const savedFilter = result.filter;\r\n\r\n const filter = _.isString(savedFilter) ?\r\n this.deserializer.deserialize(JSON.parse(savedFilter)) :\r\n this.deserializer.deserialize(cloneDeep(savedFilter));\r\n\r\n return !_.isEmpty(filter.query) ? { filter } : {};\r\n }\r\n return JSON.parse(result);\r\n } catch (err) {\r\n throw new Error('Invalid filter JSON string');\r\n }\r\n })\r\n .catch(() => ({}));\r\n }\r\n\r\n /**\r\n * Save quick filter key and query to session\r\n * @param {Object} filter - Filter object that contains query, name and id\r\n * @return {undefined}\r\n */\r\n save(filter) {\r\n return this.storage.create({\r\n id: this.entryId,\r\n filter: JSON.stringify(_.pick(filter, 'query', 'name', 'id')),\r\n });\r\n }\r\n}\r\n","\r\nimport Promise from 'bluebird';\r\n\r\nexport class PermanentFilterStorage {\r\n /**\r\n * Filter storage based on preference service\r\n */\r\n\r\n constructor({\r\n featureName = '',\r\n preferenceService,\r\n storageKey,\r\n isAccountLevel = false,\r\n } = {}) {\r\n if (!preferenceService) {\r\n throw new Error('No preference service is provided');\r\n }\r\n\r\n if (storageKey) {\r\n this.storageKey = storageKey;\r\n } else {\r\n this.storageKey = this.getStorageKey(featureName);\r\n }\r\n\r\n this.featureName = featureName;\r\n this.storage = preferenceService;\r\n this.isAccountLevel = isAccountLevel;\r\n }\r\n\r\n getStorageKey() {\r\n throw new Error('Not implemented');\r\n }\r\n\r\n save(filter) {\r\n const preferenceData = {\r\n Name: this.storageKey,\r\n Data: filter,\r\n };\r\n if (this.isAccountLevel) {\r\n return this.storage.setAtAccountLevel(preferenceData);\r\n }\r\n return this.storage.setAtUserLevel(preferenceData);\r\n }\r\n\r\n get() {\r\n return Promise.resolve(this.isAccountLevel ?\r\n this.storage.findByNameAtAccountLevel(this.storageKey)\r\n : this.storage.findByNameAtUserLevel(this.storageKey))\r\n .then(result => (result ? { filter: result.Data } : { query: null }));\r\n }\r\n\r\n getFilterInSync() {\r\n const result = this.isAccountLevel ?\r\n this.storage.findByNameAtAccountLevel(this.storageKey)\r\n : this.storage.findByNameAtUserLevel(this.storageKey);\r\n return result ? { filter: result.Data } : null;\r\n }\r\n\r\n delete() {\r\n const result = this.isAccountLevel ?\r\n this.storage.findByNameAtAccountLevel(this.storageKey)\r\n : this.storage.findByNameAtUserLevel(this.storageKey);\r\n if (result && result.Id) {\r\n return this.isAccountLevel ? this.storage.del(result.Id) :\r\n this.storage.delAtUserLevel(result.Id);\r\n }\r\n return null;\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { cloneDeep } from '@bingads-webui-universal/primitive-utilities';\r\n\r\nimport { Deserializer } from './deserializer';\r\nimport { PermanentFilterStorage } from './permanent-filter-storage';\r\nimport { taskQueueMixin } from './task-queue-mixin';\r\n\r\nexport class EditableFilterPermanentStorage {\r\n constructor(options = {}) {\r\n const {\r\n featureName,\r\n entityName,\r\n preferenceService,\r\n storageKey,\r\n } = options;\r\n\r\n this.permanentFilterStorage = new PermanentFilterStorage({\r\n featureName,\r\n preferenceService,\r\n storageKey: this.getStorageKey({\r\n featureName,\r\n entityName,\r\n storageKey,\r\n }),\r\n isAccountLevel: true,\r\n });\r\n this.deserializer = new Deserializer(options);\r\n\r\n taskQueueMixin(this, ['get', 'save', 'clean']);\r\n }\r\n\r\n /**\r\n * @private\r\n * @return {String} - resource and entry ids\r\n */\r\n getStorageKey({\r\n featureName,\r\n entityName,\r\n storageKey,\r\n }) {\r\n return storageKey || `editable-filter-storage-campaignwebui-${featureName}-${entityName}/EditableFilter`;\r\n }\r\n\r\n /**\r\n * @returns {Object} Promise that resolve to Filter object that contains query,\r\n * name and id\r\n */\r\n get() {\r\n return this.permanentFilterStorage.get()\r\n .then((result = {}) => {\r\n try {\r\n if (_.isObject(result) && result.filter) {\r\n const savedFilter = result.filter;\r\n\r\n const filter = _.isString(savedFilter) ?\r\n this.deserializer.deserialize(JSON.parse(savedFilter)) :\r\n this.deserializer.deserialize(cloneDeep(savedFilter));\r\n\r\n return !_.isEmpty(filter.query) ? { filter } : {};\r\n }\r\n return JSON.parse(result);\r\n } catch (err) {\r\n throw new Error('Invalid filter JSON string');\r\n }\r\n })\r\n .catch(() => ({}));\r\n }\r\n\r\n /**\r\n * Save quick filter key and query to session\r\n * @param {Object} filter - Filter object that contains query, name and id\r\n * @return {undefined}\r\n */\r\n save(filter) {\r\n const serializedValue = JSON.stringify(_.pick(filter, 'query', 'name', 'id'));\r\n return this.permanentFilterStorage.save(serializedValue);\r\n }\r\n\r\n clean() {\r\n return this.permanentFilterStorage.delete();\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport { Deserializer } from './deserializer';\r\n\r\nfunction getPreferenceFilter(name, preference, preferenceQuery) {\r\n return _.first(preference.filter({\r\n where: _.defaults({ name }, preferenceQuery),\r\n }));\r\n}\r\n\r\nfunction reject(actionName) {\r\n return () => Promise.reject({ // eslint-disable-line prefer-promise-reject-errors\r\n error: `FilterPreference${actionName}`,\r\n });\r\n}\r\n\r\nexport class SavedFilterStorage {\r\n /**\r\n *\r\n * @param {boolean} getLegacySaved - Whether to save filter through UI server\r\n * to legacy filter storage\r\n * @param {string} featureName - Name of feature used to construct resource key\r\n * @param {Object} filterEntityOptions - Options to create FilterEntity,\r\n * contains entity schema\r\n * @param {function} preferenceStoreFactory - A method to create an instance\r\n * of component/bingads-grid/service/grid-preferences\r\n * @param {Number} maxSavedFilterLimit - Limit to impose on the number of saved\r\n * filters (10 by default)\r\n */\r\n constructor({\r\n getLegacySaved = true,\r\n featureName = '',\r\n filterEntityOptions = {},\r\n preferenceStoreFactory,\r\n maxSavedFilterLimit = 10,\r\n parseIdAsInt,\r\n } = {}) {\r\n if (!preferenceStoreFactory) {\r\n throw new Error('No PreferenceStore factory is provided');\r\n }\r\n this.preference = preferenceStoreFactory({\r\n getLegacySaved,\r\n gridName: featureName,\r\n entitySchema: filterEntityOptions.entitySchema,\r\n });\r\n this.preferenceQuery = {\r\n project: 'CampaignUI',\r\n grid: featureName,\r\n };\r\n this.preferenceInitPromise = this.preference.findAll({ where: this.preferenceQuery });\r\n this.maxSavedFilterLimit = maxSavedFilterLimit;\r\n this.deserializer = new Deserializer({ filterEntityOptions, parseIdAsInt });\r\n }\r\n\r\n /**\r\n * @param {Object} query - Filter query object\r\n * @param {string} name - Filter name\r\n * @return {Object} A promise that resolve to object with id of saved filter\r\n */\r\n save({ query, name }) {\r\n const exist = getPreferenceFilter(name, this.preference, this.preferenceQuery);\r\n\r\n if (exist) {\r\n return this.preference.update(exist.id, { query })\r\n .then(result => ({ id: result.id }), reject('Update'));\r\n }\r\n\r\n return this.preference.create(_.defaults({\r\n query,\r\n name,\r\n }, this.preferenceQuery))\r\n .then(result => ({ id: result.id }), reject('Create'));\r\n }\r\n\r\n /**\r\n * @return {Object} A promise that resolve to object with id, name and query of saved filter\r\n */\r\n get() {\r\n return this.preferenceInitPromise\r\n .then(() => {\r\n let filters = this.preference.filter({ where: this.preferenceQuery });\r\n\r\n filters = _.map(\r\n filters,\r\n _.bind(this.deserializer.deserialize, this.deserializer)\r\n );\r\n\r\n filters = _.reject(filters, filter => _.isEmpty(filter.query));\r\n\r\n return filters;\r\n }, reject('Get'));\r\n }\r\n\r\n /**\r\n * @return {Object} A promise that resolve to object with id of deleted filter\r\n */\r\n delete({ name }) {\r\n const exist = getPreferenceFilter(name, this.preference, this.preferenceQuery);\r\n\r\n if (exist) {\r\n return this.preference.destroy(exist.id).then(id => ({\r\n id,\r\n }), reject('Delete'));\r\n }\r\n\r\n return Promise.reject({ // eslint-disable-line prefer-promise-reject-errors\r\n error: 'FilterPreferenceNotExist',\r\n });\r\n }\r\n}\r\n","import Promise from 'bluebird';\r\nimport _ from 'underscore';\r\n\r\nimport { EditableFilterPermanentStorage } from './editable-filter-permanent-storage';\r\n\r\nexport class RecentFilterPermanentStorage {\r\n constructor(options = {}) {\r\n const {\r\n featureName,\r\n entityName,\r\n } = options;\r\n this.recentFilterStorages = [\r\n new EditableFilterPermanentStorage({\r\n ...options,\r\n storageKey: `recent-filter-campaignwebui-${featureName}-${entityName}/0`,\r\n isAccountLevel: true,\r\n }),\r\n new EditableFilterPermanentStorage({\r\n ...options,\r\n storageKey: `recent-filter-campaignwebui-${featureName}-${entityName}/1`,\r\n isAccountLevel: true,\r\n }),\r\n new EditableFilterPermanentStorage({\r\n ...options,\r\n storageKey: `recent-filter-campaignwebui-${featureName}-${entityName}/2`,\r\n isAccountLevel: true,\r\n }),\r\n ];\r\n this.currentIndex = 0;\r\n }\r\n\r\n /**\r\n * @returns {Object} Promise that resolve to Filter object that contains query,\r\n * name and id\r\n */\r\n get() {\r\n const getAllRecentPromise = [];\r\n _.each(this.recentFilterStorages, (storage) => {\r\n getAllRecentPromise.push(storage.get());\r\n });\r\n return Promise.all(getAllRecentPromise).then((filters) => {\r\n const result = _.map(filters, (filter) => {\r\n if (filter && filter.filter) {\r\n return filter.filter;\r\n }\r\n return filter;\r\n });\r\n return result;\r\n });\r\n }\r\n\r\n /**\r\n * Save quick filter key and query to session\r\n * @param {Object} filter - Filter object that contains query, name and id\r\n * @return {undefined}\r\n */\r\n save(filter) {\r\n const saveFilterPromise = [];\r\n return this.get().then((filters) => {\r\n filters.pop();\r\n filters.unshift(filter);\r\n _.each(filters, (newFilter, index) => {\r\n saveFilterPromise.push(this.recentFilterStorages[index].save(newFilter));\r\n });\r\n return Promise.all(saveFilterPromise);\r\n });\r\n }\r\n\r\n clean() {\r\n const cleanFilterPromise = [];\r\n _.each(this.recentFilterStorages, (storage) => {\r\n cleanFilterPromise.push(storage.clean());\r\n });\r\n return Promise.all(cleanFilterPromise);\r\n }\r\n}\r\n","import { SessionFilterStorage } from './session-filter-storage';\r\n\r\nexport class QuickFilterStorage extends SessionFilterStorage {\r\n /**\r\n * @private\r\n * @return {Object} - resource and entry ids\r\n */\r\n getSessionStorageId({\r\n featureName,\r\n entityName,\r\n }) {\r\n // Resource id is for defining resource\r\n // Entry id is for defining each entry under the same resource\r\n return {\r\n resourceId: `quick-filter-storage-campaignwebui-${featureName}`,\r\n entryId: `${entityName}/QuickFilter`,\r\n };\r\n }\r\n\r\n /**\r\n * Save quick filter key and query to session\r\n * @param {string} key - Filter key\r\n * @param {Object} value - Filter query object\r\n * @return {undefined}\r\n */\r\n save(key, value) {\r\n this.storage.create({\r\n id: this.entryId,\r\n filter: {\r\n key,\r\n value,\r\n },\r\n });\r\n }\r\n\r\n /**\r\n * Get quick filter object\r\n * @return {Object} - Quick filter object that contains\r\n * key and query\r\n */\r\n get() {\r\n // TODO: based on the scenario entity, decide if we want to also\r\n // get the waterfall filter.\r\n return this.storage.find(this.entryId)\r\n .catch(() => null);\r\n }\r\n}\r\n","import { PermanentFilterStorage } from './permanent-filter-storage';\r\n\r\nexport class QuickFilterPermanentStorage {\r\n constructor(options = {}) {\r\n const {\r\n featureName,\r\n entityName,\r\n preferenceService,\r\n } = options;\r\n\r\n this.permanentFilterStorage = new PermanentFilterStorage({\r\n featureName,\r\n preferenceService,\r\n storageKey: this.getStorageKey({\r\n featureName,\r\n entityName,\r\n }),\r\n });\r\n }\r\n\r\n /**\r\n * @private\r\n * @return {String} - resource and entry ids\r\n */\r\n getStorageKey({\r\n featureName,\r\n entityName,\r\n }) {\r\n return `quick-filter-storage-campaignwebui-${featureName}-${entityName}/QuickFilter`;\r\n }\r\n\r\n /**\r\n * @returns {Object} Promise that resolve to Filter object that contains query,\r\n * name and id\r\n */\r\n get() {\r\n return this.permanentFilterStorage.get();\r\n }\r\n\r\n /**\r\n * Save quick filter key and query to session\r\n * @param {string} key - Filter key\r\n * @param {Object} value - Filter query object\r\n * @return {undefined}\r\n */\r\n save(key, value) {\r\n return this.permanentFilterStorage.save({\r\n key,\r\n value,\r\n });\r\n }\r\n\r\n clean() {\r\n return this.permanentFilterStorage.delete();\r\n }\r\n}\r\n","import { PermanentFilterStorage } from './permanent-filter-storage';\r\n\r\nexport class WaterfallFilterPermanentStorage extends PermanentFilterStorage {\r\n /**\r\n * @private\r\n * @param {string} featureName - feature name\r\n * @return {string} - return storage key\r\n */\r\n getStorageKey(featureName) {\r\n return `WebApp.CampaignUI.${featureName}`;\r\n }\r\n}\r\n","export class SessionFilterStorage {\r\n /**\r\n * Session storage that is configured to save filter object, sync version.\r\n */\r\n\r\n constructor({\r\n featureName = '',\r\n sessionStore,\r\n storageKey,\r\n } = {}) {\r\n if (!sessionStore) {\r\n throw new Error('No session store is provided');\r\n }\r\n\r\n if (storageKey) {\r\n this.storageKey = storageKey;\r\n } else {\r\n this.storageKey = this.getStorageKey(featureName);\r\n }\r\n\r\n this.featureName = featureName;\r\n this.storage = sessionStore;\r\n }\r\n\r\n getStorageKey() {\r\n throw new Error('Not implemented');\r\n }\r\n\r\n save(filter) {\r\n this.storage.set(this.storageKey, filter);\r\n }\r\n\r\n get() {\r\n const data = this.storage.get(this.storageKey);\r\n return data ? { filter: data } : null;\r\n }\r\n}\r\n","import { SessionFilterStorage } from './filter-session-storage';\r\n\r\nexport class QuickFilterSessionStorage extends SessionFilterStorage {\r\n /**\r\n * @private\r\n * @param {string} featureName - feature name\r\n * @return {string} - return storage key\r\n */\r\n getStorageKey(featureName) {\r\n return `WebApp.CampaignUI.${featureName}`;\r\n }\r\n\r\n /**\r\n * Get filter object, to keep compatible with permanent filter storage.\r\n * @return {Object} - Filter object that contains key and query\r\n */\r\n getFilterInSync() {\r\n return this.get();\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { LegacyQuickFilterStorage } from './legacy-quick-filter-storage';\r\nimport { EditableFilterStorage } from './editable-filter-storage';\r\nimport { EditableFilterPermanentStorage } from './editable-filter-permanent-storage';\r\nimport { SavedFilterStorage } from './saved-filter-storage';\r\nimport { RecentFilterPermanentStorage } from './recent-filter-storage';\r\nimport { QuickFilterStorage } from './quick-filter-storage';\r\nimport { QuickFilterPermanentStorage } from './quick-filter-permanent-storage';\r\nimport { WaterfallFilterPermanentStorage } from './waterfall-filter-permanent-storage';\r\nimport { QuickFilterSessionStorage } from './quick-filter-session-storage';\r\n\r\nconst storageTypeMapping = {\r\n quickFilter: QuickFilterStorage,\r\n editableFilter: EditableFilterStorage,\r\n editableFilterPermanent: EditableFilterPermanentStorage,\r\n savedFilter: SavedFilterStorage,\r\n recentFilter: RecentFilterPermanentStorage,\r\n legacyQuickFilter: LegacyQuickFilterStorage,\r\n permanentQuickFilter: QuickFilterPermanentStorage,\r\n permanentWaterfallFilter: WaterfallFilterPermanentStorage,\r\n sessionQuickFilter: QuickFilterSessionStorage,\r\n};\r\n\r\nexport class FilterStorageFactory {\r\n /**\r\n * Create wrapper of session and preference storage for storing filters\r\n * @param {Object} preferenceStoreFactory - A method to create an instance\r\n * of component/bingads-grid/service/grid-preferences\r\n * @param {Object} sessionStore - A instance of component/js-data-storage/session-storage\r\n * @param {Object} getLegacySaved - Whether to save filter through UI server\r\n * to legacy storage\r\n * @param {Object} featureName - Name of feature\r\n * @param {Number} maxSavedFilterLimit - Limit to impose on number of saved filters\r\n * @param {Boolean} parseIdAsInt - Flag indicating whether or not ids in\r\n * filter queries should be parsed as ints upon deserialization\r\n */\r\n constructor({\r\n preferenceStoreFactory,\r\n sessionStore,\r\n getLegacySaved,\r\n featureName,\r\n maxSavedFilterLimit,\r\n parseIdAsInt,\r\n preferenceService,\r\n }) {\r\n this.preferenceStoreFactory = preferenceStoreFactory;\r\n this.sessionStore = sessionStore;\r\n this.getLegacySaved = getLegacySaved;\r\n this.featureName = featureName;\r\n this.maxSavedFilterLimit = maxSavedFilterLimit;\r\n this.parseIdAsInt = parseIdAsInt;\r\n this.preferenceService = preferenceService;\r\n }\r\n\r\n /**\r\n *\r\n * @param {('quickFilter'|'editableFilter'|'savedFilter')} type - Storage type\r\n * @param {Object} options - Options for creating storage instance\r\n * @param {Object} options.filterEntityOptions - Options to create FilterEntity,\r\n * contains entity schema\r\n * @param {string} [options.resourceId] - Resource Id\r\n * @param {string} [options.entryId] - Entry Id\r\n * @param {Boolean} [options.newCampaignsGridFilterEnabled] --\r\n * Indicates whether campaigns grid is using filter-service (used for waterfall filters)\r\n * @return {Object} An instance of filter storage object of specific type\r\n */\r\n create(type, options = {}) {\r\n let Storage = storageTypeMapping[type];\r\n if (type === 'editableFilter' && this.preferenceService &&\r\n !_.isEmpty(this.preferenceService)) {\r\n Storage = EditableFilterPermanentStorage;\r\n }\r\n if (type === 'quickFilter' && this.preferenceService &&\r\n !_.isEmpty(this.preferenceService)) {\r\n Storage = QuickFilterPermanentStorage;\r\n }\r\n return new (Storage)(_.extend(options || {}, {\r\n preferenceStoreFactory: this.preferenceStoreFactory,\r\n sessionStore: this.sessionStore,\r\n getLegacySaved: this.getLegacySaved,\r\n featureName: options.featureName || this.featureName,\r\n maxSavedFilterLimit: this.maxSavedFilterLimit,\r\n parseIdAsInt: this.parseIdAsInt,\r\n preferenceService: this.preferenceService,\r\n }));\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport kendo from '@bingads-webui/kendo/kendo.core';\r\nimport { getSessionStorage } from '@bingads-webui/storage';\r\nimport { FilterStorageFactory } from './filter-storage-factory';\r\n\r\nexport const WaterfallFilterType = {\r\n CampaignType: 0,\r\n CampaignStatus: 1,\r\n AdGroupStatus: 2,\r\n DateFilter: 3,\r\n BudgetCenterMonthFilter: 4,\r\n};\r\n\r\nconst waterfallFilterTypeMapping = {\r\n [WaterfallFilterType.CampaignType]: 'permanentWaterfallFilter',\r\n [WaterfallFilterType.CampaignStatus]: 'permanentWaterfallFilter',\r\n [WaterfallFilterType.AdGroupStatus]: 'permanentWaterfallFilter',\r\n [WaterfallFilterType.DateFilter]: 'permanentWaterfallFilter',\r\n [WaterfallFilterType.BudgetCenterMonthFilter]: 'sessionQuickFilter',\r\n};\r\n\r\nconst waterfallFilterNames = {\r\n [WaterfallFilterType.CampaignType]: 'New.CampaignType',\r\n [WaterfallFilterType.CampaignStatus]: 'New.CampaignStatus',\r\n [WaterfallFilterType.AdGroupStatus]: 'New.AdGroupStatus',\r\n // Keep the same key for date filter, so we can carry over\r\n // date filter between previous and new UI.\r\n [WaterfallFilterType.DateFilter]: 'dateFilter',\r\n [WaterfallFilterType.BudgetCenterMonthFilter]: 'BudgetCenterMonthFilter',\r\n};\r\n\r\nexport class WaterfallFilterStorage {\r\n /**\r\n * Create wrapper of permanent storage for waterfall filters\r\n * @param {Object} preferenceService- Preference service instance\r\n */\r\n constructor({\r\n preferenceService,\r\n sessionStore,\r\n }) {\r\n this.waterfallFilterStorages = {};\r\n\r\n _.each(waterfallFilterNames, (value, key) => {\r\n const filterStorage = new FilterStorageFactory({\r\n sessionStore: sessionStore || getSessionStorage(),\r\n preferenceService,\r\n featureName: value,\r\n }).create(waterfallFilterTypeMapping[key]);\r\n\r\n this.waterfallFilterStorages = { ...this.waterfallFilterStorages, [key]: filterStorage };\r\n });\r\n }\r\n\r\n /**\r\n * Get waterfall filter object array\r\n * @param {Array.} filterTypes - Array of waterfall filter types\r\n * @return {Array.} - Array of Waterfall filter object\r\n */\r\n getFilters(filterTypes) {\r\n return filterTypes.map((type) => {\r\n const storage = this.waterfallFilterStorages[type];\r\n return storage.getFilterInSync();\r\n });\r\n }\r\n\r\n /**\r\n * Save a waterfall filter by its type\r\n * @param {WaterfallFilterType} filterType - Waterfall filter type\r\n * @param {Object} filter - Waterfall filter object\r\n * @return {void}\r\n */\r\n save(filterType, filter) {\r\n const storage = this.waterfallFilterStorages[filterType];\r\n storage.save(filter);\r\n }\r\n}\r\n\r\n/**\r\n * helper function to format waterfall date filte objct\r\n * @param {Object} dateFilter - date filter storage\r\n * @param {string} format - used to parse date\r\n * @return {Object} cooked value\r\n */\r\nexport const dateFilterProcessor = (dateFilter, format) => {\r\n if (!dateFilter) return null;\r\n const newFilter = dateFilter;\r\n if (newFilter.compared) {\r\n newFilter.compared.start = kendo.parseDate(\r\n newFilter.compared.formattedStart,\r\n format\r\n );\r\n newFilter.compared.end = kendo.parseDate(\r\n newFilter.compared.formattedEnd,\r\n format\r\n );\r\n }\r\n return _.defaults({}, newFilter, {\r\n start: newFilter.RangeStartDate && kendo.parseDate(\r\n newFilter.RangeStartDate,\r\n format\r\n ),\r\n end: newFilter.RangeEndDate && kendo.parseDate(\r\n newFilter.RangeEndDate,\r\n format\r\n ),\r\n grain: newFilter.RangeId,\r\n });\r\n};\r\n\r\n/**\r\n * helper function to format waterfall date filte objct\r\n * we need serverContext to get date format, and here after\r\n * parseDate we get a date that is using local timeZone to\r\n * keep consistent with old UI kendo.toString timezone\r\n * @param {Array} dateFilterStorage - date filter storage\r\n * @param {Object} serverContext - used to parse date\r\n * @return {Object} cooked value\r\n */\r\nexport function waterfallDateFilterProcessor(dateFilterStorage, serverContext) {\r\n const dateFilter = dateFilterStorage && dateFilterStorage[0] && dateFilterStorage[0].filter;\r\n const format = serverContext.CurrentUser.CultureDateTimeFormat.ShortDatePattern;\r\n return dateFilterProcessor(dateFilter, format);\r\n}\r\n","export function redirectToLogin(serverContext) {\r\n const { Urls: { SignOutUrl } = {} } = serverContext;\r\n\r\n window.location.href = SignOutUrl ||\r\n `${window.location.protocol}//${window.location.host}/default.aspx?reason=1&msg=sessionexpired`;\r\n}\r\n\r\nconst prodEnvs = [\r\n // CMUI\r\n 'ui.bingads.microsoft.com',\r\n 'ui.beta.bingads.microsoft.com',\r\n 'ui.ads.microsoft.com',\r\n 'ui.beta.ads.microsoft.com',\r\n // CCUI\r\n 'bingads.microsoft.com',\r\n 'beta.bingads.microsoft.com',\r\n 'ads.microsoft.com',\r\n 'beta.ads.microsoft.com',\r\n];\r\n\r\nexport function isTestEnvironment(envToCheck) {\r\n return prodEnvs.indexOf(envToCheck) === -1;\r\n}\r\n\r\nexport function isSignupRunningProxy() {\r\n return window.location.port === '12000' && window.location.host === 'ads-int.microsoft.com';\r\n}\r\n\r\nexport const PROJECTS = {\r\n DMC: 'DMC',\r\n UP: 'UP',\r\n CAMPAIGN_UI: 'CAMPAIGN_UI',\r\n SMART: 'SMART',\r\n SMART_PAGE: 'SMART_PAGE',\r\n UP_SUPPORT: 'UP_SUPPORT',\r\n SUB_ADS_LANDING: 'SUB_ADS_LANDING',\r\n DSP: 'DSP',\r\n SELLER_FORUM: 'SELLER_FORUM',\r\n STREAMLINED_SIGNUP: 'STREAMLINED_SIGNUP',\r\n PMAX_LITE_SIGNUP: 'PMAX_LITE_SIGNUP',\r\n PMAX_LITE_LANDING: 'PMAX_LITE_LANDING',\r\n OMS: 'OMS',\r\n};\r\n\r\n// All MS Ads products use the same clarity ID\r\nconst PROD_CLARITY_ID = '4jwlwd615c';\r\nconst TEST_CLARITY_ID = '6vo4jbalnn';\r\n\r\n// from clarity.microsoft.com\r\nexport const CLARITY_IDS = {\r\n [PROJECTS.DMC]: '4w966avnz2',\r\n [PROJECTS.CAMPAIGN_UI]: PROD_CLARITY_ID,\r\n [PROJECTS.UP]: PROD_CLARITY_ID,\r\n [PROJECTS.SMART]: PROD_CLARITY_ID,\r\n [PROJECTS.SMART_PAGE]: PROD_CLARITY_ID,\r\n [PROJECTS.UP_SUPPORT]: PROD_CLARITY_ID,\r\n [PROJECTS.SUB_ADS_LANDING]: PROD_CLARITY_ID,\r\n [PROJECTS.DSP]: 'az4m3zmuo0',\r\n [PROJECTS.SELLER_FORUM]: PROD_CLARITY_ID,\r\n [PROJECTS.STREAMLINED_SIGNUP]: PROD_CLARITY_ID,\r\n [PROJECTS.PMAX_LITE_SIGNUP]: PROD_CLARITY_ID,\r\n [PROJECTS.PMAX_LITE_LANDING]: PROD_CLARITY_ID,\r\n};\r\n\r\nexport const TEST_CLARITY_IDS = {\r\n [PROJECTS.DMC]: TEST_CLARITY_ID,\r\n [PROJECTS.CAMPAIGN_UI]: TEST_CLARITY_ID,\r\n [PROJECTS.UP]: TEST_CLARITY_ID,\r\n [PROJECTS.SMART]: TEST_CLARITY_ID,\r\n [PROJECTS.SMART_PAGE]: TEST_CLARITY_ID,\r\n [PROJECTS.UP_SUPPORT]: TEST_CLARITY_ID,\r\n [PROJECTS.SUB_ADS_LANDING]: TEST_CLARITY_ID,\r\n [PROJECTS.DSP]: 'az4mm7npsb',\r\n [PROJECTS.SELLER_FORUM]: TEST_CLARITY_ID,\r\n [PROJECTS.STREAMLINED_SIGNUP]: TEST_CLARITY_ID,\r\n [PROJECTS.PMAX_LITE_SIGNUP]: TEST_CLARITY_ID,\r\n [PROJECTS.PMAX_LITE_LANDING]: TEST_CLARITY_ID,\r\n};\r\n","/* eslint-disable no-underscore-dangle */\r\nimport _ from 'underscore';\r\nimport $ from 'jquery';\r\n// import { scopeStore } from '@bingads-webui-campaign/global-context-store';\r\n\r\n/* Note:\r\n * The events we fire to adobe omniture are used by the marketing team.\r\n * We should not break or change the events payload without confirming the changes with them.\r\n * Marketing Team: Galen Gerling, David Kline\r\n */\r\n\r\nfunction serializeList(list) {\r\n return _.chain(list)\r\n .pairs()\r\n .map(item => (item[1] ? item[0] : null))\r\n .compact()\r\n .value();\r\n}\r\n\r\nexport function triggerOmnitureEvent(payload) {\r\n $(document).trigger('pageview', payload);\r\n}\r\n\r\n// The marketing team uses adobe omniture to track\r\nexport function initPDL(serverContext) {\r\n // adobe tracking script will use window._PDL to provide info\r\n window._PDL = window._PDL || {};\r\n const omniture = serverContext.Omniture || {};\r\n\r\n window._PDL = window._PDL || {};\r\n window._PDL.market = omniture.Market;\r\n window._PDL.pageName = omniture.PageNamePDL;\r\n window._PDL.navLevel1 = omniture.NavLevel1;\r\n window._PDL.navLevel2 = omniture.NavLevel2;\r\n window._PDL.accountNumber = omniture.CurrentAccountNumber;\r\n window._PDL.accountMode = omniture.CurrentAccountMode || omniture.AccountMode;\r\n window._PDL.customerID = omniture.CustomerID;\r\n window._PDL.userID = omniture.UserID;\r\n window._PDL.serverName = omniture.ServerName;\r\n\r\n const permissions = serializeList(serverContext.Permissions);\r\n const dynamicPermissions = serializeList(serverContext.DynamicPermissions);\r\n const ccuiPermissions = serializeList(serverContext.CCUIPilots);\r\n\r\n window._PDL.permissions = _.union(\r\n permissions,\r\n dynamicPermissions,\r\n ccuiPermissions\r\n ).join(',');\r\n\r\n // TODO\r\n // scopeStore.subscribe(() => {\r\n // const { campaignId, adGroupId } = scopeStore.state.scope.values;\r\n // window._PDL.campaignID = campaignId;\r\n // window._PDL.adGroupID = adGroupId;\r\n // });\r\n\r\n // if navLevel3 was set before init, fire an event\r\n if (window._PDL.navLevel3) {\r\n triggerOmnitureEvent({\r\n campaignId: window._PDL.campaignID,\r\n adGroupId: window._PDL.adGroupID,\r\n navLevel3: window._PDL.navLevel3,\r\n navLevel3Title: window._PDL.navLevel3Title,\r\n });\r\n }\r\n}\r\n\r\nexport function updatePdlPage(payload) {\r\n const {\r\n campaignId,\r\n adGroupId,\r\n navLevel3,\r\n navLevel3Title,\r\n } = payload;\r\n\r\n window._PDL = window._PDL || {};\r\n window._PDL.campaignID = campaignId;\r\n window._PDL.adGroupID = adGroupId;\r\n window._PDL.navLevel3 = navLevel3;\r\n window._PDL.navLevel3Title = navLevel3Title;\r\n\r\n // Includes nav + campaign elements, plus any additional custom payload\r\n triggerOmnitureEvent(payload);\r\n}\r\n\r\nexport function updatePdlUser(serverContext) {\r\n const {\r\n CurrentAccount,\r\n CurrentUser,\r\n } = serverContext;\r\n\r\n window._PDL = window._PDL || {};\r\n window._PDL.accountNumber = CurrentAccount.AccountNumber;\r\n window._PDL.accountMode = CurrentAccount.AccountMode;\r\n window._PDL.customerID = CurrentAccount.AdvertiserCustomerID;\r\n window._PDL.userID = CurrentUser.Id;\r\n}\r\n","import _ from 'underscore';\r\nimport queryString from 'query-string';\r\n\r\nfunction isNullOrUndefined(value) {\r\n return _.isNull(value) || _.isUndefined(value);\r\n}\r\n\r\nfunction findMismatches(original, expected, force) {\r\n return _.reduce(expected, (result, value, key) => {\r\n if ((force || _.has(original, key)) &&\r\n !isNullOrUndefined(value) &&\r\n original[key] !== `${value}`) {\r\n _.extend(result, { [key]: `${value}` });\r\n }\r\n return result;\r\n }, {});\r\n}\r\n\r\n/**\r\n * Ensures that the params are present in the URL\r\n * @param {Object} params - The new query params\r\n * @param {Boolean} [force=false] - whether to update the URL even if the params aren't present\r\n * @returns {void}\r\n */\r\nexport function checkQueryParams(params, force = false) {\r\n const query = queryString.parse(window.location.search);\r\n\r\n const mismatches = findMismatches(query, params, force);\r\n\r\n if (!_.isEmpty(mismatches)) {\r\n const updatedQuery = _.extend(query, mismatches);\r\n // use replaceState as we just need to fix the url, no need to refresh page\r\n window.history.replaceState(\r\n {},\r\n document.title,\r\n `${window.location.pathname}?${queryString.stringify(updatedQuery, { sort: false })}${window.location.hash}`\r\n );\r\n }\r\n}\r\n\r\n// For fresh page load, in case user put wrong values for known query params (uid, cid, aid),\r\n// this component restores it per server context\r\nexport function checkUserQueryParams(serverContext, force = false) {\r\n const {\r\n CurrentUser: { Id: uid },\r\n CurrentCustomer: { Id: cid },\r\n CurrentAccount: { Id: aid },\r\n } = serverContext;\r\n\r\n const params = { uid, cid, aid };\r\n checkQueryParams(params, force);\r\n}\r\n\r\n// This function provides an easy way to trim unncessary params, e.g. skipcccache\r\nexport function deleteQueryParam(param) {\r\n const query = queryString.parse(window.location.search);\r\n delete query[param];\r\n window.history.replaceState(\r\n {},\r\n document.title,\r\n `${window.location.pathname}?${queryString.stringify(query, { sort: false })}${window.location.hash}`\r\n );\r\n}\r\n","import Promise from 'bluebird';\r\nimport _ from 'underscore';\r\nimport { useEffect, useState } from 'react';\r\nimport $ from 'jquery';\r\nimport { keepAliveInstance } from '@bingads-webui/keep-alive';\r\n// import { versionCheckInstance } from '@bingads-webui-campaign/version-check';\r\nimport { setupClarity } from '@bingads-webui-universal/clarity';\r\nimport { PageReady } from '@bingads-webui/page-ready';\r\nimport { setupQualtricsWithData } from '@bingads-webui-campaign/qualtrics';\r\nimport { PreferenceService } from '@bingads-webui/preference-service';\r\nimport { initPDL } from './omniture';\r\nimport { redirectToLogin, CLARITY_IDS, isTestEnvironment, TEST_CLARITY_IDS, isSignupRunningProxy } from './constants';\r\nimport { checkUserQueryParams, deleteQueryParam } from './query-param-checker';\r\n\r\nconst isTestEnv = isTestEnvironment(document.domain);\r\nconst CookieConsentActivityName = 'wcp-consent';\r\n\r\nexport function setupServiceRoots(serverContext) {\r\n // we check for proxy running so that we can properly route cc API calls in proxy\r\n if (isSignupRunningProxy()) {\r\n // eslint-disable-next-line no-param-reassign\r\n serverContext.ServicesEndpoints.ClientCenterUIAPI = 'https://app1.ads-int.microsoft.com:12000/cc/';\r\n }\r\n}\r\n\r\nfunction getCLarityID(feature) {\r\n return isTestEnv ? TEST_CLARITY_IDS[feature] : CLARITY_IDS[feature];\r\n}\r\n\r\n/**\r\n * Initialize global app services.\r\n * @param {any} {\r\n * featureName - Name of feature\r\n * serverContext - Context needed for initializing libraries\r\n * shouldLoadAdobe - Determines if Adobe tracking should load.\r\n * shouldStartKeepAlive - Determines if keep-alive polling should start.\r\n * shouldSetQueryParams - Determines if script to update url with query params will run\r\n * shouldSetupQualtrics - Determines if qualtrics initialization should run.\r\n * shouldEnableUnAuth - Determines if should not redirect when un auth\r\n * shouldLoadAmplifyTracking - Determines if Amplify tracking script should load.\r\n * }\r\n * @returns {void}\r\n */\r\nexport function initGlobalService({\r\n featureName,\r\n serverContext,\r\n shouldLoad1DS = true,\r\n shouldLoadAdobe = false,\r\n shouldStartKeepAlive = true,\r\n shouldSetQueryParams = false,\r\n shouldSetupQualtrics = false,\r\n shouldEnableUnAuth = false,\r\n shouldLoadAmplifyTracking = false,\r\n shouldSetupQualtricsWithData = false,\r\n setUpClarityBasedOnUserConsent = false,\r\n appActivity = {\r\n trace: _.noop,\r\n error: _.noop,\r\n },\r\n}) {\r\n try {\r\n // remove skipcccache from URL, this should only be used once to refresh sever cache\r\n deleteQueryParam('skipcccache');\r\n\r\n if (!shouldEnableUnAuth) {\r\n // create callback that will sign out if user's auth token is invalid or expired\r\n keepAliveInstance.unAuthCallBack = () => redirectToLogin(serverContext);\r\n }\r\n\r\n if (shouldStartKeepAlive) {\r\n // start keep alive\r\n keepAliveInstance.start();\r\n }\r\n\r\n /*\r\n TODO: implement\r\n // start version check\r\n versionCheckInstance.version = serverContext.Version;\r\n versionCheckInstance.start();\r\n */\r\n\r\n if (shouldSetQueryParams) {\r\n // if user put wrong values for known query params (uid, cid, aid)\r\n // restores it per server context\r\n checkUserQueryParams(serverContext);\r\n }\r\n\r\n // init an empty function to avoid customer click the help icon\r\n // before the apex loading is ready\r\n if (!window.PopupController) {\r\n window.PopupController = { PopupJsClick: () => { } };\r\n }\r\n PageReady.afterPageReady().then(() => {\r\n if (shouldSetupQualtricsWithData) {\r\n setupQualtricsWithData(serverContext, {\r\n PreferenceService,\r\n enableIframeCommunication: true,\r\n appActivity,\r\n });\r\n } else if (shouldSetupQualtrics) {\r\n setupQualtricsWithData(serverContext);\r\n }\r\n\r\n const init1DSAnalytics = () => {\r\n const scriptUrl = 'https://js.monitor.azure.com/scripts/c/ms.analytics-web-3.min.js';\r\n\r\n if (!_.isFunction($.ajax)) {\r\n return new Promise();\r\n }\r\n\r\n return new Promise((resolve) => {\r\n $.ajax({\r\n url: scriptUrl,\r\n dataType: 'script',\r\n crossOrigin: true,\r\n credentials: 'omit',\r\n }).always(() => resolve());\r\n });\r\n };\r\n\r\n const initAdobeTracking = () => {\r\n const trackingScriptUrl = _.chain(serverContext)\r\n .result('ThirdPartConfig')\r\n .result('AdobeTrackingScriptUrl', undefined)\r\n .value();\r\n if (!_.isUndefined(trackingScriptUrl) && _.isFunction($.getScript)) {\r\n $.ajax({\r\n url: trackingScriptUrl,\r\n dataType: 'script',\r\n crossOrigin: true,\r\n credentials: 'omit',\r\n success: () => initPDL(serverContext),\r\n });\r\n }\r\n };\r\n\r\n const initAmplifyTracking = () => {\r\n const amplifyTrackingScriptUrl = _.chain(serverContext)\r\n .result('AmplifyTrackingScriptUrl', undefined)\r\n .value();\r\n if (!_.isUndefined(amplifyTrackingScriptUrl) && _.isFunction($.getScript)) {\r\n $.ajax({\r\n url: amplifyTrackingScriptUrl,\r\n dataType: 'script',\r\n crossOrigin: true,\r\n credentials: 'omit',\r\n });\r\n }\r\n };\r\n\r\n const clarityId = getCLarityID(featureName);\r\n\r\n if (clarityId) {\r\n const currentUserId = (serverContext.CurrentUser &&\r\n serverContext.CurrentUser.Id &&\r\n serverContext.CurrentUser.Id.toString()) || '';\r\n const customerId = (serverContext.CurrentCustomer &&\r\n serverContext.CurrentCustomer.Id &&\r\n serverContext.CurrentCustomer.Id.toString()) || '';\r\n const accountId = (serverContext.CurrentAccount &&\r\n serverContext.CurrentAccount.Id &&\r\n serverContext.CurrentAccount.Id.toString()) || '';\r\n\r\n const initClarity = () => {\r\n setupClarity(\r\n clarityId,\r\n {\r\n customerId,\r\n accountId,\r\n SessionId: serverContext.Omniture.SessionId,\r\n PageTrackingId: serverContext.PageTrackingId,\r\n subFeature: featureName,\r\n },\r\n currentUserId,\r\n serverContext.Omniture.SessionId,\r\n serverContext.PageTrackingId\r\n );\r\n };\r\n\r\n const onConsentChanged = (categoryPreferences) => {\r\n appActivity.trace(`Consent: ${JSON.stringify(categoryPreferences)}`);\r\n window.dispatchEvent(new CustomEvent('ConsentChanged', {\r\n detail: categoryPreferences,\r\n }));\r\n };\r\n\r\n if (setUpClarityBasedOnUserConsent || shouldLoadAdobe || shouldLoadAmplifyTracking) {\r\n const script = document.createElement('script');\r\n script.src = 'https://wcpstatic.microsoft.com/mscc/lib/v2/wcp-consent.js';\r\n script.async = true;\r\n script.onload = () => {\r\n appActivity.trace('WcpConsent: script loaded', CookieConsentActivityName);\r\n // Init WcpConsent before in init clarity\r\n // cookie-banner will be hidden after user sign in, we only use this element to init WCP\r\n // we depend on CCUI page to show cookie banner to users\r\n if (window.WcpConsent) {\r\n appActivity.trace('WcpConsent: initialize start', CookieConsentActivityName);\r\n window.WcpConsent.init(serverContext.CurrentLocale, 'cookie-banner', (err, _siteConsent) => {\r\n appActivity.trace('WcpConsent: initialize complete', CookieConsentActivityName);\r\n if (!err) {\r\n window.siteConsent = _siteConsent;\r\n appActivity.trace('WcpConsent: initialize succeed', CookieConsentActivityName);\r\n if (!window.WcpConsent\r\n || !window.WcpConsent.siteConsent\r\n || !window.WcpConsent.siteConsent.onConsentChanged\r\n || !window.WcpConsent.siteConsent.getConsent\r\n ) {\r\n if (appActivity.error) {\r\n appActivity.error('WcpConsent: WcpConsent component is not initialized. Cannot read user cookie consent info');\r\n }\r\n return;\r\n }\r\n onConsentChanged(window.WcpConsent.siteConsent.getConsent());\r\n appActivity.trace('WcpConsent: read cookie consent value to see if we can init clarity', CookieConsentActivityName);\r\n\r\n const initAnalytics = ({ Analytics, Advertising }) => {\r\n if (Analytics) {\r\n const load1DS = shouldLoad1DS ? init1DSAnalytics : () => Promise.resolve();\r\n\r\n load1DS().then(() => {\r\n if (shouldLoadAdobe) {\r\n initAdobeTracking();\r\n }\r\n });\r\n\r\n if (shouldLoadAmplifyTracking) {\r\n initAmplifyTracking();\r\n }\r\n if (setUpClarityBasedOnUserConsent && Advertising) {\r\n initClarity();\r\n }\r\n }\r\n };\r\n\r\n const currentConsent = window.WcpConsent.siteConsent.getConsent();\r\n\r\n if (currentConsent.Analytics) {\r\n initAnalytics(currentConsent);\r\n } else {\r\n window.WcpConsent.siteConsent.onConsentChanged(initAnalytics);\r\n }\r\n } else if (appActivity.error) {\r\n appActivity.error(`WcpConsent: initialize error: ${err}`);\r\n }\r\n }, onConsentChanged);\r\n } else {\r\n appActivity.trace('WcpConsent: wcp-consent.js script has not been loaded yet', CookieConsentActivityName);\r\n }\r\n };\r\n script.onerror = () => {\r\n // ad blocker might block this script, so we only log trace here.\r\n appActivity.trace('WcpConsent: WcpConsent script didn\\'t load correctly.');\r\n };\r\n\r\n document.head.appendChild(script);\r\n } else {\r\n appActivity.trace('WcpConsent: WcpConsent logic skipped.');\r\n initClarity();\r\n }\r\n } else {\r\n appActivity.error('init global service error');\r\n }\r\n });\r\n\r\n setupServiceRoots(serverContext);\r\n } catch (e) {\r\n appActivity.error(`init global service raise exception ${e}`);\r\n }\r\n}\r\n\r\nexport const useWcpConstent = () => {\r\n const [wcpConsent, setWcpConsent] = useState({});\r\n const onConsentChanged = () => {\r\n const { siteConsent } = window;\r\n setWcpConsent(siteConsent);\r\n };\r\n useEffect(() => {\r\n window.addEventListener('ConsentChanged', () => {\r\n onConsentChanged();\r\n });\r\n return () => {\r\n window.removeEventListener('ConsentChanged', onConsentChanged);\r\n };\r\n });\r\n\r\n return wcpConsent;\r\n};\r\n","import $ from 'jquery';\r\n\r\nfunction getCellFromPoint(x, y) {\r\n // scrollTop takes into account a scrolled page\r\n const $cell = $(document.elementFromPoint(x, y - $(document).scrollTop())).closest('td');\r\n if ($cell.length > 0) {\r\n return $cell;\r\n }\r\n\r\n // td cell may not be found using elementFromPoint, use elementsFromPoint\r\n // to find all elements and filter by tag name\r\n if (document.elementsFromPoint) {\r\n const elements = document\r\n .elementsFromPoint(x, y - $(document).scrollTop())\r\n .filter(node => node.tagName.toUpperCase() === 'TD');\r\n\r\n return elements.length > 0 ? $(elements[0]) : $();\r\n } else if (document.msElementsFromPoint) {\r\n const nodeList = document.msElementsFromPoint(x, y - $(document).scrollTop());\r\n if (nodeList) {\r\n let $tdCell = $();\r\n\r\n Array.prototype.forEach.call(nodeList, (node) => {\r\n if (node.tagName.toUpperCase() === 'TD') {\r\n $tdCell = $(node);\r\n }\r\n });\r\n return $tdCell;\r\n }\r\n }\r\n\r\n return $();\r\n}\r\n\r\n/**\r\n* get popup editor positoin,\r\n* based on cellPosition & editor width & related position option setting\r\n*\r\n* @param {Object} cellPosition - position where popup editor event was triggered\r\n* @param {Object} $editor - editorView that will be host inside popup editor\r\n* @param {boolean} isRTL - whether culture is RTL, default false\r\n* @param {boolean} renderBelow - whether to render poup editor below cellPosition,\r\n* @param {boolean} parentContainerSelector - custom selector for parent container\r\n default false\r\n* @param {boolean} adjustTopPosition - whether to adjust top position,\r\n default true\r\n* @returns {void} void\r\n*/\r\nexport function getPosition(\r\n cellPosition,\r\n $editor,\r\n isRTL,\r\n renderBelow,\r\n parentContainerSelector = null,\r\n adjustTopPosition = true\r\n) {\r\n const cTop = cellPosition.top;\r\n const cLeft = cellPosition.left;\r\n const $cell = getCellFromPoint(cLeft, cTop);\r\n let left;\r\n let top = cTop;\r\n\r\n if (isRTL) {\r\n left = cLeft - $editor.width() + $cell.width() - 20; // eslint-disable-line no-mixed-operators\r\n } else {\r\n left = cLeft - 10;\r\n\r\n // eslint-disable-next-line no-mixed-operators\r\n let widthDiff = cLeft + $editor.outerWidth();\r\n\r\n if (parentContainerSelector) {\r\n const parentLeft = $(parentContainerSelector).offset() ?\r\n $(parentContainerSelector).offset().left : 0;\r\n widthDiff += parentLeft;\r\n const $table = $(`${parentContainerSelector} .table, ${parentContainerSelector} table`);\r\n const tableLeft = $table.offset() ? $table.offset().left : 0;\r\n widthDiff -= tableLeft + $table.width();\r\n } else {\r\n widthDiff -= document.body.clientWidth;\r\n }\r\n\r\n // adjust right edge if it extend past the grid's viewport\r\n if (widthDiff > 0) {\r\n left -= widthDiff;\r\n }\r\n }\r\n\r\n if (!adjustTopPosition) {\r\n return { top, left };\r\n }\r\n if (renderBelow) {\r\n if ($cell.length > 0) {\r\n // render below the content (assumes equal top/bottom padding)\r\n const height = $cell.children().length > 0 ? $cell.children().height() : $cell.height();\r\n const padding = ($cell.outerHeight() - height) / 2;\r\n\r\n // add offset of 5\r\n top += $cell.outerHeight() - padding + 2; // eslint-disable-line no-mixed-operators\r\n }\r\n } else {\r\n top -= 10;\r\n }\r\n\r\n return {\r\n top,\r\n left,\r\n };\r\n}\r\n\r\nexport function getEditorPositionAsideAnchor($anchor) {\r\n const space = 5;\r\n\r\n function getEditorPosition($editor) {\r\n const {\r\n top: anchorTop,\r\n left: anchorLeft,\r\n } = $anchor.offset();\r\n const anchorWidth = $anchor.outerWidth();\r\n const editorWidth = $editor.outerWidth();\r\n\r\n const editorTop = anchorTop - 10;\r\n\r\n // place at right side\r\n let editorLeft = anchorLeft + anchorWidth + space;\r\n\r\n if ((editorLeft + editorWidth) > document.body.clientWidth) {\r\n // place at left side\r\n editorLeft = anchorLeft - editorWidth - space;\r\n }\r\n\r\n return {\r\n top: editorTop,\r\n left: editorLeft,\r\n };\r\n }\r\n\r\n return getEditorPosition;\r\n}\r\n","import $ from 'jquery';\r\nimport _ from 'underscore';\r\nimport Backbone from 'backbone';\r\nimport { focusLockInstanceDecorator } from '@bingads-webui/focus-lock-decorator';\r\nimport { getTabbableNodes } from '@bingads-webui-react/focus-lock';\r\nimport { getPosition } from './get-position';\r\n\r\nconst editorClass = 'grid-popupeditor';\r\n\r\n/**\r\n* Provide grid popup editor function\r\n*\r\n*
It enabled functions:\r\n* render the editor view above or below,\r\n* close when editor view trigger close event,\r\n* close when usre click other part of document,\r\n*\r\n*
Triggered event close when it closes itself\r\n*/\r\nexport class GridCustomizedPopupEditor extends Backbone.View {\r\n get attributes() {\r\n return {\r\n role: 'dialog',\r\n };\r\n }\r\n\r\n constructor(options) {\r\n // set default class name for popup-editor to be 'grid-popupeditor'\r\n super(_.extend({ className: editorClass }, options));\r\n }\r\n\r\n /**\r\n * Initilize view settings\r\n *\r\n * @param {Object} param - An object containing these default options for view:\r\n * @param {Object} param.editorView - editorView that will be host inside popup editor\r\n * @param {Object} param.editorPositionFactory - a factory to generate position of editor,\r\n * which overrides default editor position\r\n * @param {Object} param.cellPosition - position where popup editor event was triggered\r\n * @param {boolean} param.renderBelow - whether to render poup editor below cellPosition,\r\n default false\r\n * @param {boolean} param.CultureIsRTL - whether culture is RTL, default false\r\n * @param {boolean} param.noDismiss - whether to not close editor when click outside of it,\r\n * default false (means close it by default)\r\n * @param {boolean} param.parentContainerSelector - custom parent container selector\r\n * (instead of body)\r\n * @param {boolean} adjustTopPosition - whether to adjust top position,\r\n default true\r\n * @returns {void} void\r\n */\r\n initialize({\r\n editorView,\r\n editorPositionFactory,\r\n cellPosition,\r\n renderBelow = false,\r\n CultureIsRTL = false,\r\n noDismiss = false,\r\n customDismissCondition = null,\r\n parentContainerSelector = null,\r\n lockRegionAriaLabel = '',\r\n adjustTopPosition = true,\r\n }) {\r\n this.editorView = editorView;\r\n this.editorPositionFactory = editorPositionFactory;\r\n this.cellPosition = cellPosition;\r\n this.renderBelow = renderBelow;\r\n this.CultureIsRTL = CultureIsRTL;\r\n this.parentContainerSelector = parentContainerSelector || 'body';\r\n this.hasCustomParentContainer = !!parentContainerSelector;\r\n this.adjustTopPosition = adjustTopPosition;\r\n\r\n this.dismiss = () => {\r\n this.trigger('close');\r\n this.remove();\r\n };\r\n\r\n const FocusLockEditorView = focusLockInstanceDecorator(this.editorView, {\r\n onExit: this.dismiss.bind(this),\r\n lockRegionAriaLabel,\r\n focusFirstItemOnMount: true,\r\n }, {\r\n managed: true,\r\n });\r\n\r\n this.focusLockEditorView = new FocusLockEditorView();\r\n\r\n this.clickToDismiss = (event) => {\r\n const defaultDismissCondition = e => $(e.target).closest(`.${this.className.replace(/ /g, '.')}`).length === 0;\r\n const dismissCondition = customDismissCondition || defaultDismissCondition;\r\n\r\n // Decide whether it is inside the popup editor\r\n if (dismissCondition(event)) {\r\n if (noDismiss) {\r\n return;\r\n }\r\n this.dismiss();\r\n }\r\n };\r\n }\r\n\r\n render() {\r\n this.$el.html(this.focusLockEditorView.render().el);\r\n\r\n this.editorView.on('close', (update) => {\r\n this.trigger('close', update);\r\n this.remove();\r\n });\r\n\r\n this.$el.hide();\r\n\r\n // position calculation need to be after the element appended to DOM, so defer it\r\n _.defer(() => {\r\n const position = _.isFunction(this.editorPositionFactory) ?\r\n this.editorPositionFactory(this.$el) :\r\n getPosition(\r\n this.cellPosition,\r\n this.$el,\r\n this.CultureIsRTL,\r\n this.renderBelow,\r\n this.hasCustomParentContainer && this.parentContainerSelector,\r\n this.adjustTopPosition\r\n );\r\n this.$el.css(position);\r\n this.$el.fadeIn();\r\n\r\n if (_.isFunction(this.editorView.setFocus)) {\r\n this.editorView.setFocus();\r\n } else if (this.editorView.el) {\r\n // filter the not visible element out which may due to parent display property\r\n const tabbableNode = _.filter(getTabbableNodes(this.editorView.el), item => $(item).is(':visible'));\r\n\r\n if (tabbableNode && tabbableNode.length > 0) {\r\n tabbableNode[0].focus({\r\n preventScroll: true,\r\n });\r\n }\r\n }\r\n // add data-focused flag to indicate the focus operation is done\r\n this.$el.attr('data-focused', '');\r\n\r\n $(window).on('click', this.clickToDismiss);\r\n $(window).on('hashchange', this.dismiss);\r\n });\r\n\r\n $(this.parentContainerSelector).append(this.el);\r\n\r\n return this;\r\n }\r\n\r\n remove() {\r\n this.focusLockEditorView.remove();\r\n this.editorView.remove();\r\n $(window).off('click', this.clickToDismiss);\r\n $(window).off('hashchange', this.dismiss);\r\n super.remove();\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\n\r\nexport class InjectionContext {\r\n /**\r\n * A dependency injection context\r\n */\r\n constructor({ disableDependencyCheck = true } = {}) {\r\n this.registry = {};\r\n this.punchCards = [];\r\n\r\n if (disableDependencyCheck) { // eslint-disable-line no-undef\r\n this.enableDependencyCheck = false;\r\n } else {\r\n this.enableDependencyCheck = true;\r\n }\r\n }\r\n\r\n /**\r\n * Get all exports from a dependency\r\n * @param {string} name - The name of the dependency\r\n * @returns {*} - The export object of the dependency\r\n */\r\n require(name) {\r\n if (!_.has(this.registry, name)) {\r\n throw new Error(`Dependency undefined: ${name}`);\r\n }\r\n _.each(this.punchCards, card => _.extend(card, { [name]: true }));\r\n\r\n return this.registry[name];\r\n }\r\n\r\n /**\r\n * Get the default export from a dependency\r\n * @param {string} name - The name of the dependency\r\n * @returns {*} - The default export of the dependency\r\n */\r\n requireDefault(name) {\r\n return this.require(name).default;\r\n }\r\n\r\n /**\r\n * Define a feature with dependency injection\r\n * @param {string[]} dependencies - The name of the dependencies\r\n * @param {FeatureFactoryCallback} factory -\r\n * A callback to fetch the feature exports when dependencies are ready\r\n * @return {DependencyInjectionCallback} -\r\n * A callback to inject dependencies and get the feature exports\r\n */\r\n define(dependencies, factory) {\r\n /**\r\n * @callback DependencyInjectionCallback\r\n * @param {Object} modules -\r\n * The dependency loader. It could be a LoaderCallback function in form\r\n * of an AMD loader (e.g. the `require` function of RequireJS), or a hash\r\n * of dependencies.\r\n * @returns {Promise} - A promise of the feature exports\r\n */\r\n return (modules = {}) => {\r\n const injectedDeps = _.keys(modules);\r\n const missingDeps = _.difference(dependencies, injectedDeps);\r\n\r\n if (!_.isEmpty(missingDeps) && this.enableDependencyCheck) {\r\n throw new Error(`Insufficient dependency injection: ${missingDeps.join(', ')}`);\r\n }\r\n\r\n const sparingDeps = _.difference(injectedDeps, dependencies);\r\n\r\n if (!_.isEmpty(sparingDeps) && this.enableDependencyCheck) {\r\n throw new Error(`Redundant dependency injection: ${sparingDeps.join(', ')}`);\r\n }\r\n\r\n const conflictDeps = _.filter(\r\n dependencies,\r\n dep => _.has(this.registry, dep) && this.registry[dep] !== modules[dep]\r\n );\r\n\r\n if (!_.isEmpty(conflictDeps) && this.enableDependencyCheck) {\r\n throw new Error(`Inconsistent dependency injection: ${conflictDeps.join(', ')}`);\r\n }\r\n\r\n _.extend(this.registry, modules);\r\n\r\n const card = {};\r\n\r\n this.punchCards.push(card);\r\n\r\n /**\r\n * @callback FeatureFactoryCallback\r\n * @param {InjectionContext} context - The dependency injection context\r\n * @returns {Promise} - A promise of the feature exports\r\n */\r\n return Promise.resolve(Promise)\r\n .then(factory)\r\n .then(null, (e) => {\r\n throw e;\r\n })\r\n .finally(() => {\r\n this.punchCards = _.without(this.punchCards, card);\r\n\r\n const unusedDeps = _.difference(dependencies, _.keys(card));\r\n\r\n if (!_.isEmpty(unusedDeps) && this.enableDependencyCheck) {\r\n throw new Error(`Unused dependency injection: ${unusedDeps.join(', ')}`);\r\n }\r\n });\r\n };\r\n }\r\n}\r\n","import { InjectionContext } from './src/context';\r\n\r\nconst isTestBuild = (typeof BINGADS_TEST_BUILD !== 'undefined') && BINGADS_TEST_BUILD; // eslint-disable-line no-undef\r\n\r\nexport const globalContext = new InjectionContext({ disableDependencyCheck: isTestBuild || false });\r\nexport const uncheckedInjectionContext = new InjectionContext({ disableDependencyCheck: true });\r\n","const authorRuleActivities = [\r\n {\r\n name: 'loadRuleAuthoringView',\r\n value: 'LoadRuleAuthoringView',\r\n },\r\n {\r\n name: 'loadExistingRule',\r\n value: 'LoadExistingRule',\r\n },\r\n {\r\n name: 'previewRuleResults',\r\n value: 'PreviewRuleResults',\r\n },\r\n {\r\n name: 'onScopeSelectionChange',\r\n value: 'OnScopeSelectionChange',\r\n },\r\n {\r\n name: 'onCampaignAdGroupSelectionDone',\r\n value: 'OnCampaignAdGroupSelectionDone',\r\n },\r\n {\r\n name: 'onCampaignAdGroupSelectionCancel',\r\n value: 'OnCampaignAdGroupSelectionCancel',\r\n },\r\n {\r\n name: 'initCampaignAdGroupSelector',\r\n value: 'InitCampaignAdGroupSelector',\r\n },\r\n {\r\n name: 'preSelectCampaignAdGroupSelector',\r\n value: 'PreSelectCampaignAdGroupSelector',\r\n },\r\n {\r\n name: 'createRule',\r\n value: 'CreateRule',\r\n },\r\n];\r\n\r\nconst campaignCreationActivities = [\r\n {\r\n name: 'campaignCreationStep1',\r\n value: 'CampaignCreationStep1',\r\n },\r\n {\r\n name: 'campaignCreationStep2',\r\n value: 'CampaignCreationStep2',\r\n },\r\n {\r\n name: 'campaignCreationStep3',\r\n value: 'CampaignCreationStep3',\r\n },\r\n {\r\n name: 'campaignCreationStep4',\r\n value: 'CampaignCreationStep4',\r\n },\r\n {\r\n name: 'campaignCreationFlowFinished',\r\n value: 'CampaignCreationFlowFinished',\r\n },\r\n];\r\n\r\nexport const schema = {\r\n scenario: [\r\n {\r\n name: 'campaignOverviewEdit',\r\n value: 'campaignOverviewEdit',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'budgetEdit',\r\n value: 'budgetEdit',\r\n },\r\n {\r\n name: 'bidStrategyEdit',\r\n value: 'bidStrategyEdit',\r\n },\r\n {\r\n name: 'campaignStatusEdit',\r\n value: 'campaignStatusEdit',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'autobiddingLimitedStatus',\r\n value: 'AutobiddingLimitedStatus',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'renderDeliveryStatus',\r\n value: 'renderDeliveryStatus',\r\n },\r\n {\r\n name: 'hoverDeliveryStatus',\r\n value: 'hoverDeliveryStatus',\r\n },\r\n {\r\n name: 'applyDeliveryStatus',\r\n value: 'ApplyDeliveryStatus',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'editorial',\r\n value: 'Editorial',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'toggleCountryList',\r\n value: 'toggleCountryList',\r\n },\r\n {\r\n name: 'clickRequestException',\r\n value: 'clickRequestException',\r\n },\r\n {\r\n name: 'submitRequestException',\r\n value: 'submitRequestException',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'datepicker',\r\n value: 'datepicker',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'inlineDateChange',\r\n value: 'inlineDateChange',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'changeTextAd',\r\n value: 'ChangeTextAd',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'changeTextAd',\r\n value: 'ChangeTextAd',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'autoApplyRecdSettingUpdate',\r\n value: 'autoApplyRecdSettingUpdate',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'autoApplyRecdSettingUpdate',\r\n value: 'autoApplyRecdSettingUpdate',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'multiMediaAdsAutoApplyAccountOption',\r\n value: 'multiMediaAdsAutoApplyAccountOption',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'multiMediaAdsAutoApplyAccountOption',\r\n value: 'multiMediaAdsAutoApplyAccountOption',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'responsiveSearchAdsAutoApplyAccountOption',\r\n value: 'responsiveSearchAdsAutoApplyAccountOption',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'responsiveSearchAdsAutoApplyAccountOption',\r\n value: 'responsiveSearchAdsAutoApplyAccountOption',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'enableMMAInDSAAccountOption',\r\n value: 'enableMMAInDSAAccountOption',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'enableMMAInDSAAccountOption',\r\n value: 'enableMMAInDSAAccountOption',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'bulkEditKeywordBid',\r\n value: 'BulkEditKeywordBid',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'bulkEditKeywordBid',\r\n value: 'BulkEditKeywordBid',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'bulkEditKeywordMatchType',\r\n value: 'BulkEditKeywordMatchType',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'bulkEditKeywordMatchType',\r\n value: 'BulkEditKeywordMatchType',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'bulkEditUrlOptionsKeyword',\r\n value: 'BulkEditUrlOptionsKeyword',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'bulkEditUrlOptionsKeyword',\r\n value: 'BulkEditUrlOptionsKeyword',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'bulkEditUrlOptionsCampaign',\r\n value: 'BulkEditUrlOptionsCampaign',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'bulkEditUrlOptionsCampaign',\r\n value: 'BulkEditUrlOptionsCampaign',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'bulkEditUrlOptionsAd',\r\n value: 'BulkEditUrlOptionsAd',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'bulkEditUrlOptionsAd',\r\n value: 'BulkEditUrlOptionsAd',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'bulkEditMMAConversionAd',\r\n value: 'BulkEditMMAConversionAd',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'bulkEditMMAConversionAd',\r\n value: 'BulkEditMMAConversionAd',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'bulkEditUrlOptionsAdGroup',\r\n value: 'BulkEditUrlOptionsAdGroup',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'bulkEditUrlOptionsAdGroup',\r\n value: 'BulkEditUrlOptionsAdGroup',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'bulkEditCampaignExclusions',\r\n value: 'BulkEditCampaignExclusions',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'bulkEditCampaignExclusions',\r\n value: 'BulkEditCampaignExclusions',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'bulkEditCampaignBudget',\r\n value: 'BulkEditCampaignBudget',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'bulkEditCampaignBudget',\r\n value: 'BulkEditCampaignBudget',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'bulkEditCampaignCashbackBudget',\r\n value: 'BulkEditCampaignCashbackBudget',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'bulkEditCampaignCashbackBudget',\r\n value: 'BulkEditCampaignCashbackBudget',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'viewAudiences',\r\n value: 'ViewAudiences',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'loadAudiences',\r\n value: 'LoadAudiences',\r\n },\r\n {\r\n name: 'loadAudiencesV2',\r\n value: 'LoadAudiencesV2',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'goToUetTagsPageViaLinkInAudiencePage',\r\n value: 'GoToUetTagsPageViaLinkInAudiencePage',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'clickOnPageLink',\r\n value: 'ClickOnPageLink',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'goToAudienceTabViaLinkInAudiencePage',\r\n value: 'GoToAudienceTabViaLinkInAudiencePage',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'clickOnPageLink',\r\n value: 'ClickOnPageLink',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'viewAudiencesAssociations',\r\n value: 'ViewAudiencesAssociations',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'loadAudiences',\r\n value: 'LoadAudiences',\r\n },\r\n {\r\n name: 'loadAudiencesV2',\r\n value: 'LoadAudiencesV2',\r\n },\r\n {\r\n name: 'audienceChangeBid',\r\n value: 'AudienceChangeBid',\r\n },\r\n {\r\n name: 'audienceBidRecommendation',\r\n value: 'AudienceBidRecommendation',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'loadAudienceAssociation',\r\n value: 'LoadAudienceAssociation',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'loadAudienceAssociation',\r\n value: 'LoadAudienceAssociation',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'loadAudienceAssociationByDmp',\r\n value: 'LoadAudienceAssociationByDmp',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'loadAudienceAssociationByDmp',\r\n value: 'LoadAudienceAssociationByDmp',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'inlineUpdateAudienceAssociation',\r\n value: 'InlineUpdateAudienceAssociation',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'inlineUpdateAudienceAssociation',\r\n value: 'InlineUpdateAudienceAssociation',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'loadAudienceAssociationBidAdjustment',\r\n value: 'LoadAudienceAssociationBidAdjustment',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'getBidSuggestion',\r\n value: 'GetBidSuggestion',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'applyAudienceAssociationBidAdjustment',\r\n value: 'ApplyAudienceAssociationBidAdjustment',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'applyManualSetting',\r\n value: 'ApplyManualSetting',\r\n },\r\n {\r\n name: 'applyBidSuggestion',\r\n value: 'ApplyBidSuggestion',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'loadAudienceNetworkPlanner',\r\n value: 'LoadAudienceNetworkPlanner',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'launch',\r\n value: 'Launch',\r\n },\r\n {\r\n name: 'chartView',\r\n value: 'ChartView',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'fetchAccountForAudienceNetworkPlanner',\r\n value: 'fetchAccountForAudienceNetworkPlanner',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'fetchAccount',\r\n value: 'FetchAccount',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'audienceBulkEditExclude',\r\n value: 'AudienceBulkEditExclude',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'audienceBulkEditExclude',\r\n value: 'AudienceBulkEditExclude',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'viewDimensionGrid',\r\n value: 'ViewDimensionGrid',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'loadDimensionGrid',\r\n value: 'LoadDimensionGrid',\r\n },\r\n {\r\n name: 'loadDimensionColumns',\r\n value: 'LoadDimensionColumns',\r\n },\r\n {\r\n name: 'filterDimensionGrid',\r\n value: 'FilterDimensionGrid',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'pageUnload',\r\n value: 'PageUnload',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'runAriaV2UnloadHandler',\r\n value: 'RunAriaV2UnloadHandler',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'createOrManageAudience',\r\n value: 'CreateOrManageAudience',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'clickOnManageTagLink',\r\n value: 'ClickOnManageTagLink',\r\n },\r\n {\r\n name: 'loadUETTagsList',\r\n value: 'LoadUETTagsList',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'testUetClarity',\r\n value: 'TestUetClarity',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'createTag',\r\n value: 'CreateTag',\r\n },\r\n {\r\n name: 'editTag',\r\n value: 'EditTag',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'testConversionGoals',\r\n value: 'TestConversionGoals',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'clickOnGoalBulbIcon',\r\n value: 'ClickOnGoalBulbIcon',\r\n },\r\n {\r\n name: 'clickOnTestThisGoalFromGoalBulbPopup',\r\n value: 'ClickOnTestThisGoalFromGoalBulbPopup',\r\n },\r\n {\r\n name: 'clickOnTestThisGoalFromTrackingStatusPopup',\r\n value: 'ClickOnTestThisGoalFromTrackingStatusPopup',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'smartGoalDialogActions',\r\n value: 'smart goal dialog actions',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'setPreference',\r\n value: 'set preference',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'testAudiencesWithConversionAdvisor',\r\n value: 'TestAudiencesWithConversionAdvisor',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'testFromAudienceStatusColumn',\r\n value: 'TestFromAudienceStatusColumn',\r\n },\r\n {\r\n name: 'testFromUetTrackingStatusColumn',\r\n value: 'TestFromUetTrackingStatusColumn',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'importFromFileSPA',\r\n value: 'ImportFromFileSPA',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'clickOnImportFromFileSPA',\r\n value: 'ClickOnImportFromFileSPA',\r\n },\r\n {\r\n name: 'renderImportColumnMatching',\r\n value: 'RenderImportColumnMatching',\r\n },\r\n {\r\n name: 'renderImportOptions',\r\n value: 'RenderImportOptions',\r\n },\r\n {\r\n name: 'renderImportPreview',\r\n value: 'RenderImportPreview',\r\n },\r\n {\r\n name: 'renderImportSummary',\r\n value: 'RenderImportSummary',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'importFromGoogleAdWordsSPA',\r\n value: 'ImportFromGoogleAdWordsSPA',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'clickOnImportFromGoogleAdWordsSPA',\r\n value: 'ClickOnImportFromGoogleAdWordsSPA',\r\n },\r\n {\r\n name: 'renderSelectAdWordsAccount',\r\n value: 'RenderSelectAdWordsAccount',\r\n },\r\n {\r\n name: 'renderImportOptions',\r\n value: 'RenderImportOptions',\r\n },\r\n {\r\n name: 'renderSelectAdWordsCampaigns',\r\n value: 'RenderSelectAdWordsCampaigns',\r\n },\r\n {\r\n name: 'renderImportSummary',\r\n value: 'RenderImportSummary',\r\n },\r\n 'requestCallFromSupport', // TO DO\r\n 'startLiveChat', // TO DO\r\n\r\n // log in\r\n 'clickOnSignInButton',\r\n 'logInAccount',\r\n\r\n // choose account\r\n 'accountSelectionSkipped',\r\n 'searchInAccount',\r\n 'accountList',\r\n 'currencyConversionDisplayed',\r\n 'currencyConversionChanged',\r\n 'accountWithoutCampaignSelected',\r\n 'tempSelectedAccount',\r\n 'selectAccount',\r\n\r\n // choose campaign\r\n 'searchInCampaign',\r\n 'campaignSelectionChanged',\r\n 'selectAllCampaigns',\r\n 'showPausedCampaigns',\r\n 'showPausedAdGroups',\r\n 'pageNumberChange',\r\n 'selectCampaign', // include total and selected, all or specific, per type count d\r\n\r\n // options\r\n 'newItemsOptionsClicked', // TO DO\r\n 'existingItemsOptionsClicked', // TO DO\r\n 'bidsAndBudgetsClicked', // TO DO\r\n 'otherOptionsClicked', // TO DO\r\n 'optionChanged',\r\n 'configureOptions',\r\n\r\n // schedule\r\n 'importNameChanged',\r\n 'frequencyChanged',\r\n 'completeSchedule',\r\n ],\r\n },\r\n {\r\n name: 'importFromAmazonSPA',\r\n value: 'importFromAmazonSPA',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'clickOnImportFromAmazonSPA',\r\n value: 'clickOnImportFromAmazonSPA',\r\n },\r\n {\r\n name: 'renderSelectAmazonAccount',\r\n value: 'renderSelectAmazonAccount',\r\n },\r\n {\r\n name: 'renderImportOptions',\r\n value: 'RenderImportOptions',\r\n },\r\n {\r\n name: 'renderSelectAmazonCampaigns',\r\n value: 'renderSelectAmazonCampaigns',\r\n },\r\n {\r\n name: 'renderImportSummary',\r\n value: 'RenderImportSummary',\r\n },\r\n 'requestCallFromSupport', // TO DO\r\n 'startLiveChat', // TO DO\r\n\r\n // log in\r\n 'clickOnSignInButton',\r\n 'logInAccount',\r\n\r\n // choose account\r\n 'accountSelectionSkipped',\r\n 'searchInAccount',\r\n 'accountList',\r\n 'currencyConversionDisplayed',\r\n 'currencyConversionChanged',\r\n 'accountWithoutCampaignSelected',\r\n 'tempSelectedAccount',\r\n 'selectAccount',\r\n\r\n // choose campaign\r\n 'searchInCampaign',\r\n 'campaignSelectionChanged',\r\n 'selectAllCampaigns',\r\n 'showPausedCampaigns',\r\n 'showPausedAdGroups',\r\n 'pageNumberChange',\r\n 'selectCampaign', // include total and selected, all or specific, per type count d\r\n\r\n // options\r\n 'newItemsOptionsClicked', // TO DO\r\n 'existingItemsOptionsClicked', // TO DO\r\n 'bidsAndBudgetsClicked', // TO DO\r\n 'otherOptionsClicked', // TO DO\r\n 'optionChanged',\r\n 'configureOptions',\r\n\r\n // schedule\r\n 'importNameChanged',\r\n 'frequencyChanged',\r\n 'completeSchedule',\r\n ],\r\n },\r\n {\r\n name: 'importFromPinterestSPA',\r\n value: 'importFromPinterestSPA',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'clickOnImportFromPinterestSPA',\r\n value: 'clickOnImportFromPinterestSPA',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'importFromFacebookSPA',\r\n value: 'ImportFromFacebookSPA',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'clickOnImportFromFacebookSPA',\r\n value: 'ClickOnImportFromFacebookSPA',\r\n },\r\n {\r\n name: 'renderSelectAdWordsAccount',\r\n value: 'RenderSelectAdWordsAccount',\r\n },\r\n {\r\n name: 'renderImportOptions',\r\n value: 'RenderImportOptions',\r\n },\r\n {\r\n name: 'renderSelectAdWordsCampaigns',\r\n value: 'RenderSelectAdWordsCampaigns',\r\n },\r\n {\r\n name: 'renderImportSummary',\r\n value: 'RenderImportSummary',\r\n },\r\n 'requestCallFromSupport', // TO DO\r\n 'startLiveChat', // TO DO\r\n\r\n // log in\r\n 'clickOnSignInButton',\r\n 'logInAccount',\r\n\r\n // choose account\r\n 'accountSelectionSkipped',\r\n 'searchInAccount',\r\n 'accountList',\r\n 'currencyConversionDisplayed',\r\n 'currencyConversionChanged',\r\n 'accountWithoutCampaignSelected',\r\n 'tempSelectedAccount',\r\n 'selectAccount',\r\n\r\n // choose campaign\r\n 'searchInCampaign',\r\n 'campaignSelectionChanged',\r\n 'selectAllCampaigns',\r\n 'showPausedCampaigns',\r\n 'showPausedAdGroups',\r\n 'pageNumberChange',\r\n 'selectCampaign', // include total and selected, all or specific, per type count d\r\n\r\n // options\r\n 'newItemsOptionsClicked', // TO DO\r\n 'existingItemsOptionsClicked', // TO DO\r\n 'bidsAndBudgetsClicked', // TO DO\r\n 'otherOptionsClicked', // TO DO\r\n 'optionChanged',\r\n 'configureOptions',\r\n\r\n // schedule\r\n 'importNameChanged',\r\n 'frequencyChanged',\r\n 'completeSchedule',\r\n ],\r\n },\r\n {\r\n name: 'continueImportSPA',\r\n value: 'ContinueImportSPA',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'loadContinueImportSPA',\r\n value: 'LoadContinueImportSPA',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'label',\r\n value: 'Label',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'createLabel',\r\n value: 'CreateLabel',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'adgroupBidlandscape',\r\n value: 'AdgroupBidlandscape',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'fetch',\r\n value: 'Fetch',\r\n },\r\n {\r\n name: 'apply',\r\n value: 'Apply',\r\n },\r\n {\r\n name: 'applyBidLandscapeWitoutClearCustomBid',\r\n value: 'ApplyBidLandscapeWitoutClearCustomBid',\r\n },\r\n {\r\n name: 'applyBidLandscapeAndClearCustomBid',\r\n value: 'ApplyBidLandscapeAndClearCustomBid',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'keywordBidlandscape',\r\n value: 'KeywordBidlandscape',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'fetch',\r\n value: 'Fetch',\r\n },\r\n {\r\n name: 'apply',\r\n value: 'Apply',\r\n },\r\n {\r\n name: 'update',\r\n value: 'Update',\r\n },\r\n {\r\n name: 'close',\r\n value: 'Close',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'logDeliveryStatus',\r\n value: 'LogDeliveryStatus',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'logAdsDeliveryStatus',\r\n value: 'LogAdsDeliveryStatus',\r\n },\r\n {\r\n name: 'logKeywordsDeliveryStatus',\r\n value: 'LogKeywordsDeliveryStatus',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'authorRuleKeyword',\r\n value: 'AuthorRuleKeyword',\r\n setting: {},\r\n activity: authorRuleActivities,\r\n },\r\n {\r\n name: 'authorRuleAd',\r\n value: 'AuthorRuleAd',\r\n setting: {},\r\n activity: authorRuleActivities,\r\n },\r\n {\r\n name: 'authorRuleAdGroup',\r\n value: 'AuthorRuleAdGroup',\r\n setting: {},\r\n activity: authorRuleActivities,\r\n },\r\n {\r\n name: 'authorRuleCampaign',\r\n value: 'AuthorRuleCampaign',\r\n setting: {},\r\n activity: authorRuleActivities,\r\n },\r\n {\r\n name: 'authorRuleAssetGroup',\r\n value: 'AuthorRuleAssetGroup',\r\n setting: {},\r\n activity: authorRuleActivities,\r\n },\r\n {\r\n name: 'searchAdGroupCreation',\r\n value: 'SearchAdGroupCreation',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'adGroupCreation',\r\n value: 'AdGroupCreation',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'shoppingAdGroupCreation',\r\n value: 'shoppingAdGroupCreation',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'adGroupCreation',\r\n value: 'AdGroupCreation',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'dynamicSearchAdGroupCreation',\r\n value: 'DynamicSearchAdGroupCreation',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'adGroupCreation',\r\n value: 'AdGroupCreation',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'searchAdGroupSettings',\r\n value: 'SearchAdGroupSettings',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'adGroupSettings',\r\n value: 'AdGroupSettings',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'shoppingAdGroupSettings',\r\n value: 'ShoppingAdGroupSettings',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'adGroupSettings',\r\n value: 'AdGroupSettings',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'dynamicSearchAdGroupSettings',\r\n value: 'DynamicSearchAdGroupSettings',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'adGroupSettings',\r\n value: 'AdGroupSettings',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'audienceAdGroupSettings',\r\n value: 'AudienceAdGroupSettings',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'adGroupSettings',\r\n value: 'AdGroupSettings',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'searchCampaignCreation',\r\n value: 'SearchCampaignCreation',\r\n setting: {},\r\n activity: campaignCreationActivities,\r\n },\r\n {\r\n name: 'dynamicSearchCampaignCreation',\r\n value: 'DynamicSearchCampaignCreation',\r\n setting: {},\r\n activity: campaignCreationActivities,\r\n },\r\n {\r\n name: 'signUpCampaignCreation',\r\n value: 'SignUpCampaignCreation',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'signUpCampaignCreation',\r\n value: 'SignUpCampaignCreation',\r\n },\r\n {\r\n name: 'duration',\r\n value: 'Duration',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'shoppingCampaignCreation',\r\n value: 'ShoppingCampaignCreation',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'shoppingCampaignCreation',\r\n value: 'ShoppingCampaignCreation',\r\n },\r\n {\r\n name: 'duration',\r\n value: 'Duration',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'searchCampaignEdit',\r\n value: 'SearchCampaignEdit',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'searchCampaignEdit',\r\n value: 'SearchCampaignEdit',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'dynamicSearchCampaignEdit',\r\n value: 'DynamicSearchCampaignEdit',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'dynamicSearchCampaignEdit',\r\n value: 'DynamicSearchCampaignEdit',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'shoppingCampaignEdit',\r\n value: 'ShoppingCampaignEdit',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'shoppingCampaignEdit',\r\n value: 'ShoppingCampaignEdit',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'audienceCampaignEdit',\r\n value: 'AudienceCampaignEdit',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'audienceCampaignEdit',\r\n value: 'AudienceCampaignEdit',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'oldUISmartShoppingCampaignCreationScenario',\r\n value: 'oldUISmartShoppingCampaignCreationScenario',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'SSCCreationActivity',\r\n value: 'SSCCreationActivity',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'newUISmartShoppingCampaignCreationScenario',\r\n value: 'newUISmartShoppingCampaignCreationScenario',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'SSCCreationActivity',\r\n value: 'SSCCreationActivity',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'adCreationExpandedText',\r\n value: 'AdCreationExpandedText',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'adCreation',\r\n value: 'AdCreation',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'adCreationText',\r\n value: 'AdCreationText',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'adCreation',\r\n value: 'AdCreation',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'adCreationDynamicSearch',\r\n value: 'AdCreationDynamicSearch',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'adCreation',\r\n value: 'AdCreation',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'adCreationAppInstall',\r\n value: 'AdCreationAppInstall',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'adCreation',\r\n value: 'AdCreation',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'adCreationProduct',\r\n value: 'AdCreationProduct',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'adCreation',\r\n value: 'AdCreation',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'adCreationResponsive',\r\n value: 'AdCreationResponsive',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'adCreation',\r\n value: 'AdCreation',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'adCreationResponsiveSearch',\r\n value: 'AdCreationResponsiveSearch',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'adCreation',\r\n value: 'AdCreation',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'adEditExpandedText',\r\n value: 'AdEditExpandedText',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'adEdit',\r\n value: 'AdEdit',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'adEditText',\r\n value: 'AdEditText',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'adEdit',\r\n value: 'AdEdit',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'adEditDynamicSearch',\r\n value: 'AdEditDynamicSearch',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'adEdit',\r\n value: 'AdEdit',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'adEditAppInstall',\r\n value: 'AdEditAppInstall',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'adEdit',\r\n value: 'AdEdit',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'adEditProduct',\r\n value: 'AdEditProduct',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'adEdit',\r\n value: 'AdEdit',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'adEditResponsive',\r\n value: 'AdEditResponsive',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'adEdit',\r\n value: 'AdEdit',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'adEditResponsiveSearch',\r\n value: 'AdEditResponsiveSearch',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'adEdit',\r\n value: 'AdEdit',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'imageAdExtension',\r\n value: 'Image Ad Extension',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'cropImage',\r\n value: 'Crop Image',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'leadFormAssociationEditorScenario',\r\n value: 'leadFormAssociationEditorScenario',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'leadFormAssociationEditorActivity',\r\n value: 'leadFormAssociationEditorActivity',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'businessInfoAssociationEditorScenario',\r\n value: 'businessInfoAssociationEditorScenario',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'businessInfoAssociationEditorActivity',\r\n value: 'businessInfoAssociationEditorActivity',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'segmentMenu',\r\n value: 'SegmentMenu',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'segmentMenu',\r\n value: 'SegmentMenu',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'fluctuation',\r\n value: 'Fluctuation',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'fluctuationInstr',\r\n value: 'FluctuationInstr',\r\n },\r\n {\r\n name: 'fluctuationFeedback',\r\n value: 'FluctuationFeedback',\r\n },\r\n {\r\n name: 'fluctuationDismiss',\r\n value: 'FluctuationDismiss',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'notificationTab',\r\n value: 'NotificationTab',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'bulkdismiss',\r\n value: 'Bulkdismiss',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'showInlineKeywordDiagnosisPanel',\r\n value: 'ShowInlineKeywordDiagnosisPanel',\r\n settings: {},\r\n activity: [\r\n {\r\n name: 'clickOnKeywordPlanner',\r\n value: 'ClickOnKeywordPlanner',\r\n },\r\n {\r\n name: 'clickOnADTLink',\r\n value: 'ClickOnADTLink',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'chooseNewCampaignObjective',\r\n value: 'ChooseNewCampaignObjective',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'chooseObjective',\r\n value: 'ChooseObjective',\r\n },\r\n {\r\n name: 'chooseTool',\r\n value: 'ChooseTool',\r\n },\r\n {\r\n name: 'objectivePage',\r\n value: 'ObjectivePage',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'adsGrid',\r\n value: 'Ads Grid',\r\n activity: [\r\n {\r\n name: 'fetchRejectionReason',\r\n value: 'Fetch Rejection Reason',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'productGroupGrid',\r\n value: 'ProductGroupGrid',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'recordBidChange',\r\n value: 'RecordBidChange',\r\n },\r\n {\r\n name: 'recordBidChangeInLandScape',\r\n value: 'RecordBidChangeInLandScape',\r\n },\r\n {\r\n name: 'recordFetchLandScapeData',\r\n value: 'RecordFetchLandScapeData',\r\n },\r\n {\r\n name: 'toggleGrid',\r\n value: 'ToggleGrid',\r\n },\r\n {\r\n name: 'applyFilter',\r\n value: 'ApplyFilter',\r\n },\r\n {\r\n name: 'changeSelectedColumns',\r\n value: 'ChangeSelectedColumns',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'suggestionInCreationWorkflow',\r\n value: 'SuggestionInCreationWorkflow',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'campaignCreation',\r\n value: 'CampaignCreation',\r\n },\r\n {\r\n name: 'adGroupCreation',\r\n value: 'AdGroupCreation',\r\n },\r\n {\r\n name: 'keywordCreation',\r\n value: 'KeywordCreation',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'productsTab',\r\n value: 'ProductsTab',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'gridView',\r\n value: 'GridView',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'campaignTab',\r\n value: 'CampaignTab',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'budgetLandscape',\r\n value: 'BudgetLandscape',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'inlineBudgetEditor',\r\n value: 'InlineBudgetEditor',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'recordBudgetLandscape',\r\n value: 'RecordBudgetLandscape',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'mainlineGrid',\r\n value: 'MainlineGrid',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'entityViewUpdate',\r\n value: 'EntityViewUpdate',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'newUIProductGroupsPageScenario',\r\n value: 'newUIProductGroupsPageScenario',\r\n activity: [\r\n 'PGGActivity',\r\n ],\r\n },\r\n {\r\n name: 'inContextRepairRecommendation',\r\n value: 'InContextRepairRecommendation',\r\n activity: [\r\n {\r\n name: 'clickDeliveryStatus',\r\n value: 'ClickDeliveryStatus',\r\n },\r\n {\r\n name: 'hoverDeliveryStatus',\r\n value: 'HoverDeliveryStatus',\r\n },\r\n {\r\n name: 'applyDeliveryStatus',\r\n value: 'ApplyDeliveryStatus',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'loadFixAdContentOpportunity',\r\n value: 'LoadFixAdContentOpportunity',\r\n activity: [\r\n {\r\n name: 'apply',\r\n value: 'Apply',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'loadBingMapScenario',\r\n value: 'loadBingMapScenario',\r\n activity: [\r\n {\r\n name: 'loadBingMapError',\r\n value: 'loadBingMapError',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'hotelCampaignCreation',\r\n value: 'HotelCampaignCreation',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'hotelCampaignCreation',\r\n value: 'HotelCampaignCreation',\r\n },\r\n {\r\n name: 'duration',\r\n value: 'Duration',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'hotelCampaignSettings',\r\n value: 'HotelCampaignSettings',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'hotelCampaignSettings',\r\n value: 'HotelCampaignSettings',\r\n },\r\n {\r\n name: 'duration',\r\n value: 'Duration',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'hotelAdGroupCreation',\r\n value: 'HotelAdGroupCreation',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'hotelAdGroupCreation',\r\n value: 'HotelAdGroupCreation',\r\n },\r\n {\r\n name: 'duration',\r\n value: 'Duration',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'hotelAdGroupSettings',\r\n value: 'HotelAdGroupSettings',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'hotelAdGroupSettings',\r\n value: 'HotelAdGroupSettings',\r\n },\r\n {\r\n name: 'duration',\r\n value: 'Duration',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'popupManagement',\r\n value: 'PopupManagement',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'popupManager',\r\n value: 'popupManager',\r\n },\r\n {\r\n name: 'multiStepTeachingBubble',\r\n value: 'multiStepTeachingBubble',\r\n },\r\n {\r\n name: 'hoverPopupCalloutDuration',\r\n value: 'HoverPopupCalloutDuration',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'notificationTopBanner',\r\n value: 'notificationTopBanner',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'actionLink',\r\n value: 'actionLink',\r\n },\r\n ],\r\n },\r\n ],\r\n};\r\n","import _ from 'underscore';\r\nimport { AriaListener } from '@bingads-webui/aria-listener';\r\nimport { OneDSListener } from '@bingads-webui/oneds-listener';\r\nimport { ConsoleListener } from '@bingads-webui/console-listener';\r\nimport { LocalStorageListener } from '@bingads-webui/local-storage-listener';\r\nimport { InMemoryListener, InMemorySink } from '@bingads-webui/in-memory-listener';\r\nimport {\r\n getAriaConfig,\r\n campaignLogTableConfig,\r\n adInsightLogTableConfig,\r\n BasicFormatter,\r\n ApiFormatter,\r\n AdInsightOpportunityLogFormatter,\r\n ReportingApiFormatter,\r\n ImportApiFormatter,\r\n ConsoleFormatter,\r\n LogLevelFilter,\r\n ApiFilter,\r\n AdInsightOpportunityApiFilter,\r\n ConsoleFilter,\r\n UnloadLogFilter,\r\n isTestEnvironment,\r\n} from '@bingads-webui-campaign/instrumentation';\r\n\r\nexport function getListeners({\r\n pageTrackingId,\r\n applicationName,\r\n ariaConfig: applicationAriaConfig = {},\r\n serverContext,\r\n}) {\r\n const isOneDSListenerEnabled = _.get(serverContext, ['DynamicPermissions', 'OneDSListener'], false);\r\n\r\n const currentEnv = document.domain;\r\n const ariaConfig = {\r\n ...getAriaConfig(currentEnv),\r\n ...applicationAriaConfig,\r\n };\r\n\r\n const applicationSystem = applicationName && applicationName.systemName ?\r\n applicationName.systemName : 'campaign';\r\n const applicationSubSystem = applicationName && applicationName.subSystemName ?\r\n applicationName.subSystemName : 'webui';\r\n\r\n // init log formatters\r\n const basicFormatter = new BasicFormatter({\r\n applicationSystem,\r\n applicationSubSystem,\r\n });\r\n const apiFormatter = new ApiFormatter();\r\n const reportingApiFormatter = new ReportingApiFormatter();\r\n const importApiFormatter = new ImportApiFormatter();\r\n const consoleFormatter = new ConsoleFormatter();\r\n // init log filters\r\n const logLevelFilter = new LogLevelFilter();\r\n const apiFilter = new ApiFilter();\r\n const consoleFilter = new ConsoleFilter();\r\n const unloadLogFilter = new UnloadLogFilter();\r\n\r\n const localStorageListener = new LocalStorageListener({\r\n formatters: {},\r\n filters: {\r\n unloadLogFilter,\r\n },\r\n uniquePageId: pageTrackingId,\r\n });\r\n\r\n localStorageListener.init();\r\n\r\n let campaignListener;\r\n if (isOneDSListenerEnabled) {\r\n campaignListener = new OneDSListener({\r\n tenantToken: ariaConfig.token,\r\n batchSize: ariaConfig.batchSize,\r\n logTableNames: campaignLogTableConfig.logTableNames,\r\n defaultLogCategory: campaignLogTableConfig.defaultLogCategory,\r\n formatters: {\r\n basicFormatter,\r\n apiFormatter,\r\n reportingApiFormatter,\r\n importApiFormatter,\r\n },\r\n filters: {\r\n logLevelFilter,\r\n apiFilter,\r\n },\r\n });\r\n\r\n campaignListener.init();\r\n } else {\r\n campaignListener = new AriaListener({\r\n tenantToken: ariaConfig.token,\r\n flushInterval: ariaConfig.flushInterval,\r\n batchSize: ariaConfig.batchSize,\r\n logTableNames: campaignLogTableConfig.logTableNames,\r\n defaultLogCategory: campaignLogTableConfig.defaultLogCategory,\r\n formatters: {\r\n basicFormatter,\r\n apiFormatter,\r\n reportingApiFormatter,\r\n importApiFormatter,\r\n },\r\n filters: {\r\n logLevelFilter,\r\n apiFilter,\r\n },\r\n });\r\n\r\n campaignListener.init();\r\n campaignListener.registerForTeardown();\r\n }\r\n\r\n const adInsightLogFormatter = new AdInsightOpportunityLogFormatter();\r\n const adInsightApiFilter = new AdInsightOpportunityApiFilter();\r\n\r\n let adInsightListener;\r\n if (isOneDSListenerEnabled) {\r\n adInsightListener = new OneDSListener({\r\n tenantToken: ariaConfig.tokens.adInsightOppTracking,\r\n batchSize: ariaConfig.batchSize,\r\n logTableNames: adInsightLogTableConfig.logTableNames,\r\n defaultLogCategory: adInsightLogTableConfig.defaultLogCategory,\r\n formatters: {\r\n adInsightLogFormatter,\r\n },\r\n filters: {\r\n adInsightApiFilter,\r\n },\r\n });\r\n\r\n adInsightListener.init();\r\n } else {\r\n adInsightListener = new AriaListener({\r\n tenantToken: ariaConfig.tokens.adInsightOppTracking,\r\n flushInterval: ariaConfig.flushInterval,\r\n batchSize: ariaConfig.batchSize,\r\n logTableNames: adInsightLogTableConfig.logTableNames,\r\n defaultLogCategory: adInsightLogTableConfig.defaultLogCategory,\r\n formatters: {\r\n adInsightLogFormatter,\r\n },\r\n filters: {\r\n adInsightApiFilter,\r\n },\r\n });\r\n\r\n adInsightListener.init();\r\n adInsightListener.registerForTeardown();\r\n }\r\n\r\n const consoleListener = new ConsoleListener({\r\n filters: {\r\n consoleFilter,\r\n },\r\n formatters: {\r\n consoleFormatter,\r\n },\r\n });\r\n\r\n consoleListener.init();\r\n\r\n const listeners = {\r\n localStorageListener,\r\n campaignListener,\r\n adInsightListener,\r\n consoleListener,\r\n };\r\n\r\n if (isTestEnvironment(currentEnv)) {\r\n window.seleniumLogsSink = new InMemorySink({ maxSize: 1000 });\r\n const inMemoryListener = new InMemoryListener({\r\n sink: window.seleniumLogsSink,\r\n formatters: {\r\n basicFormatter,\r\n apiFormatter,\r\n },\r\n filters: {\r\n logLevelFilter,\r\n apiFilter,\r\n },\r\n });\r\n\r\n inMemoryListener.init();\r\n\r\n _.extend(listeners, { inMemoryListener });\r\n }\r\n\r\n return listeners;\r\n}\r\n","import {\r\n ContextProcessor,\r\n DebugProcessor,\r\n PerfTimingProcessor\r\n} from '@bingads-webui-campaign/instrumentation';\r\n\r\nexport function getProcessors({\r\n isInDevelopmentMode,\r\n pageTrackingId,\r\n userContext,\r\n serverContext,\r\n}) {\r\n const pageContext = serverContext || Object.assign({}, userContext, {\r\n Version: '0.0.0',\r\n PageTrackingId: pageTrackingId,\r\n });\r\n const contextProcessor = new ContextProcessor({ pageContext });\r\n const debugProcessor = new DebugProcessor({\r\n isDebugMode: isInDevelopmentMode,\r\n });\r\n const perfTimingProcessor = new PerfTimingProcessor({\r\n landingPageUrl: window.location.href,\r\n });\r\n\r\n const processors = {\r\n contextProcessor,\r\n debugProcessor,\r\n perfTimingProcessor,\r\n };\r\n\r\n return processors;\r\n}\r\n","export const ExpectedUnhandledPromiseErrors = [\r\n 'chrome-extension://',\r\n 'getPrimitives (https://r.bing.com', // External Bing Maps JS error. Maximum call stack size exceeded; StackTrace: n.getPrimitives (https://r.bing.com/rp/aM22Q_c9IMk-AUe7HQJtiK1nLXk.br.js:1:113176)\r\n 'Message: Failed to fetch',\r\n '{\"readyState\":0,\"status\":0,\"statusText\":\"error\",\"headers\":{}}',\r\n 'Load failed at undefined',\r\n].map(error => error.toLowerCase());\r\n","import _ from 'underscore';\r\nimport { AriaListener } from '@bingads-webui/aria-listener';\r\nimport { OneDSListener } from '@bingads-webui/oneds-listener';\r\nimport {\r\n getAriaConfig,\r\n PerformanceLogsFormatter,\r\n PerformanceLogsFilter,\r\n} from '@bingads-webui-campaign/instrumentation';\r\n\r\nexport default function getPerfLogListeners(props) {\r\n const { ariaConfig: applicationAriaConfig = {}, serverContext = {} } = props || {};\r\n const isOneDSListenerEnabled = _.get(serverContext, ['DynamicPermissions', 'OneDSListener'], false);\r\n\r\n const currentEnv = document.domain;\r\n const ariaConfig = {\r\n ...getAriaConfig(currentEnv),\r\n ...applicationAriaConfig,\r\n };\r\n\r\n // init log formatters\r\n const performanceLogsFormatter = new PerformanceLogsFormatter();\r\n\r\n // init log filters\r\n const performanceLogsFilter = new PerformanceLogsFilter();\r\n\r\n let perfLogListener;\r\n if (isOneDSListenerEnabled) {\r\n perfLogListener = new OneDSListener({\r\n tenantToken: ariaConfig.token,\r\n batchSize: ariaConfig.batchSize,\r\n logTableNames: {\r\n resourcetiming: {\r\n name: 'resourcetiming',\r\n },\r\n },\r\n defaultLogCategory: 'resourcetiming',\r\n formatters: {\r\n performanceLogsFormatter,\r\n },\r\n filters: {\r\n performanceLogsFilter,\r\n },\r\n });\r\n\r\n perfLogListener.init();\r\n } else {\r\n perfLogListener = new AriaListener({\r\n tenantToken: ariaConfig.token,\r\n flushInterval: ariaConfig.flushInterval,\r\n batchSize: ariaConfig.batchSize,\r\n logTableNames: {\r\n resourcetiming: {\r\n name: 'resourcetiming',\r\n },\r\n },\r\n defaultLogCategory: 'resourcetiming',\r\n formatters: {\r\n performanceLogsFormatter,\r\n },\r\n filters: {\r\n performanceLogsFilter,\r\n },\r\n });\r\n\r\n perfLogListener.init();\r\n perfLogListener.registerForTeardown();\r\n }\r\n\r\n const listeners = {\r\n perfLogListener,\r\n };\r\n\r\n return listeners;\r\n}\r\n","import { Instrumentation } from '@bingads-webui/instrumentation';\r\n\r\nimport { PerformanceTimingLogger } from '@bingads-webui/performance-timing-logger';\r\nimport { PerfMarkerFactory } from '@bingads-webui/performance-marker';\r\nimport { getListeners } from './listeners';\r\nimport { getProcessors } from './processors';\r\nimport { setStub } from './set-stub';\r\nimport getPerfLogListeners from './perf-timing-config';\r\n\r\nexport function getInstrumentation({\r\n pageTrackingId,\r\n errorMappers,\r\n isInDevelopmentMode,\r\n userContext,\r\n applicationName,\r\n serverContext,\r\n ajaxStubOptions,\r\n ariaConfig = {},\r\n objectsToStub = [window.$],\r\n}) {\r\n const processors = getProcessors({\r\n isInDevelopmentMode,\r\n pageTrackingId,\r\n userContext,\r\n serverContext,\r\n });\r\n\r\n const instrumentationForPerfTiming = new Instrumentation({\r\n listeners: getPerfLogListeners({ ariaConfig, serverContext }),\r\n processors,\r\n });\r\n\r\n const perfTimingLogger = new PerformanceTimingLogger({\r\n instrumentation: instrumentationForPerfTiming,\r\n });\r\n perfTimingLogger.init();\r\n\r\n const instrumentation = new Instrumentation({\r\n listeners: getListeners({\r\n pageTrackingId, applicationName, ariaConfig, serverContext,\r\n }),\r\n processors: {\r\n contextProcessor: processors.contextProcessor,\r\n debugProcessor: processors.debugProcessor,\r\n },\r\n });\r\n\r\n setStub({\r\n instrumentation,\r\n pageTrackingId,\r\n errorMappers,\r\n objectsToStub,\r\n ajaxStubOptions,\r\n lcid: userContext.CurrentUser.Locale,\r\n serverContext,\r\n });\r\n\r\n // init Perf Marker Factory\r\n PerfMarkerFactory.init(instrumentation);\r\n\r\n window.vNextInstrumentation = instrumentation;\r\n\r\n return instrumentation;\r\n}\r\n","import { AjaxStub, ErrorStub, AjaxEventHandler } from '@bingads-webui/instrumentation-stubs';\r\nimport { isInternalUrl } from '@bingads-webui/url-util';\r\nimport _ from 'underscore';\r\nimport { ExpectedUnhandledPromiseErrors } from './expected-unhandled-promise-errors';\r\n\r\nexport function setStub({\r\n instrumentation,\r\n pageTrackingId,\r\n errorMappers,\r\n objectsToStub,\r\n ajaxStubOptions,\r\n lcid,\r\n serverContext,\r\n}) {\r\n // If the application pulls in jQuery, stub it for ajax call.\r\n const filteredObjectsToStub = _.compact(objectsToStub);\r\n if (!_.isEmpty(filteredObjectsToStub)) {\r\n const shouldAddHeaders = ajaxContext => isInternalUrl(ajaxContext.url);\r\n const eventHandler = new AjaxEventHandler({ errorMappers, shouldAddHeaders });\r\n const ajaxStub = new AjaxStub({\r\n stubOptions: {\r\n filteredObjectsToStub,\r\n pageTrackingId,\r\n lcid,\r\n ajaxStubOptions,\r\n },\r\n eventHandler,\r\n instrumentation,\r\n });\r\n\r\n ajaxStub.init();\r\n }\r\n\r\n const isExpectedUnhandledPromiseError = errorMessage => _.some(\r\n ExpectedUnhandledPromiseErrors,\r\n promiseError => errorMessage && errorMessage.toLowerCase().indexOf(promiseError) > -1\r\n );\r\n\r\n const logUnhandledPromiseRejections = serverContext && serverContext.DynamicPermissions &&\r\n serverContext.DynamicPermissions.EnableLoggingForUnhandledPromiseRejections;\r\n\r\n const errorStub = new ErrorStub({\r\n instrumentation,\r\n logUnhandledPromiseRejections,\r\n isExpectedUnhandledPromiseError,\r\n });\r\n errorStub.init();\r\n}\r\n","export const InstrumentationSchema = {\r\n scenario: [\r\n {\r\n name: 'appScenario',\r\n value: 'app scenario',\r\n activity: [\r\n {\r\n name: 'appActivity',\r\n value: 'app Activity',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'preInstrumentationInitializeScenario',\r\n value: 'pre instrumentation start',\r\n activity: [\r\n {\r\n name: 'perfActivity',\r\n value: 'perf activity',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'globalSearchScenario',\r\n value: 'global search scenario',\r\n activity: [\r\n {\r\n name: 'searchActivity',\r\n value: 'search Activity',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'datePicker',\r\n value: 'datePicker',\r\n activity: [\r\n {\r\n name: 'dateRangePicked',\r\n value: 'dateRangePicked',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'mainMenuScenario',\r\n value: 'main menu scenario',\r\n activity: [\r\n {\r\n name: 'changeScopeActivity',\r\n value: 'change scope Activity',\r\n },\r\n {\r\n name: 'toggleMainMenuActivity',\r\n value: 'toggle mainMenu Activity',\r\n },\r\n {\r\n name: 'leftNavigationActivity',\r\n value: 'left navigation Activity',\r\n },\r\n {\r\n name: 'hideCampaignListActivity',\r\n value: 'hide campaign list Activity',\r\n },\r\n {\r\n name: 'treeNodeActivity',\r\n value: 'tree node Activity',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'summaryBarScenario',\r\n value: 'summary bar scenario',\r\n activity: [\r\n {\r\n name: 'changeScopeActivity',\r\n value: 'change scope Activity',\r\n },\r\n {\r\n name: 'summaryBarBudgetActivity',\r\n value: 'update campaign summary bar budget Activity',\r\n },\r\n {\r\n name: 'summaryBarBidActivity',\r\n value: 'update ad group summary bar bid Activity',\r\n },\r\n {\r\n name: 'summaryBarExperimentCampaignActivity',\r\n value: 'update experiment campaign summary bar items Activity',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'globalMenuEntityBarScenario',\r\n value: 'global menu entity bar scenario',\r\n activity: [\r\n {\r\n name: 'changeScopeActivity',\r\n value: 'change scope Activity',\r\n },\r\n ],\r\n },\r\n {\r\n name: 'newUINavigation',\r\n value: 'new UI navigation',\r\n activity: [\r\n 'preferenceSet',\r\n ],\r\n },\r\n {\r\n name: 'urlChange',\r\n value: 'url change',\r\n activity: [\r\n 'routeChange',\r\n 'paramChange',\r\n ],\r\n },\r\n {\r\n name: 'feedbackScenario',\r\n value: 'feedback scenario',\r\n activity: [\r\n 'feedbackActivity',\r\n ],\r\n },\r\n {\r\n name: 'globalMenuScenario',\r\n value: 'global menu scenario',\r\n activity: [\r\n 'globalMenuActivity',\r\n ],\r\n },\r\n {\r\n name: 'newUIShortcuts',\r\n value: 'new UI shortcuts',\r\n activity: [\r\n 'shortcutSet',\r\n ],\r\n },\r\n {\r\n name: 'nkllPage',\r\n value: 'nkllPage',\r\n activity: [\r\n 'nkllPageLifeCycle',\r\n ],\r\n },\r\n {\r\n name: 'newUISmartShoppingCampaignCreationScenario',\r\n value: 'newUISmartShoppingCampaignCreationScenario',\r\n activity: [\r\n 'SSCCreationActivity',\r\n ],\r\n },\r\n {\r\n name: 'newUICreateCampaignImportIntegration',\r\n value: 'newUICreateCampaignImportIntegration',\r\n activity: [\r\n 'createCampaign',\r\n 'importIntegration',\r\n ],\r\n },\r\n {\r\n name: 'helpSearchBoxCopilotScenario',\r\n value: 'helpSearchBoxCopilotScenario',\r\n activity: [\r\n 'searchActivity',\r\n ],\r\n },\r\n {\r\n name: 'reportingInsightsScenario',\r\n value: 'reportingInsightsScenario',\r\n activity: [\r\n 'summaryButton',\r\n ],\r\n },\r\n {\r\n name: 'supportModalScenario',\r\n value: 'supportModalScenario',\r\n activity: [\r\n 'supportModal',\r\n ],\r\n },\r\n {\r\n name: 'creativeEditorScenario',\r\n value: 'creativeEditorScenario',\r\n activity: [\r\n 'imageSuggestionCarousel',\r\n ],\r\n },\r\n {\r\n name: 'copilotVideoEditorScenario',\r\n value: 'copilotVideoEditorScenario',\r\n activity: [\r\n 'imageSuggestion',\r\n ],\r\n },\r\n ],\r\n};\r\n","import { include } from 'underscore.string';\r\n\r\nconst TOKENS = {\r\n // NewTenantTest database for local debugging\r\n Local: 'c2048c8ee1c7466fa53ff77880fc797c-3d99112e-5e15-4022-b9a5-f53983937f76-6526',\r\n // Test: SI/TIP\r\n Aria3: 'f37eb78c41a442f4ba7e4d0b3660d938-954f8a2a-10e1-4c9b-b467-6a966e9994c9-7308',\r\n // PROD\r\n Aria07: '9cf7b68164b34e7e995562121503c72a-72856c17-5747-49e6-bd96-fde5bb08a4f4-7006',\r\n // AdInsight\r\n AdInsight: '2b2318c0ebbf44808a5e789256fab332-cd52b35b-3679-4c06-8958-fae3a1646c7c-7279',\r\n // Test CI\r\n ci: '3c7bf2457688429d8fdd4465c0305641-0e2fe06c-0289-482f-969c-c49a1eb7c1fe-7514',\r\n};\r\n\r\nconst allTokens = {\r\n // Local\r\n 'ccui.devdev.bingads.microsoft.com': TOKENS.Local,\r\n 'redmond.corp.microsoft.com': TOKENS.ci,\r\n\r\n // Test\r\n 'app1.ads-int.microsoft.com': TOKENS.Aria3,\r\n 'ui.si.bingads.microsoft.com': TOKENS.Aria3,\r\n 'ui.beta.si.bingads.microsoft.com': TOKENS.Aria3,\r\n 'ui.ads-int.microsoft.com': TOKENS.Aria3,\r\n 'ui.beta.ads-int.microsoft.com': TOKENS.Aria3,\r\n 'ui.aks2.ads-int.microsoft.com': TOKENS.Aria3,\r\n 'ui.aks3.ads-int.microsoft.com': TOKENS.Aria3,\r\n 'ui.tip.bingads.microsoft.com': TOKENS.Aria3,\r\n 'ui.tip.ads.microsoft.com': TOKENS.Aria3,\r\n 'ui.aks.tip.ads.microsoft.com': TOKENS.Aria3,\r\n 'si.bingads.microsoft.com': TOKENS.Aria3,\r\n 'beta.si.bingads.microsoft.com': TOKENS.Aria3,\r\n 'ads-int.microsoft.com': TOKENS.Aria3,\r\n 'beta.ads-int.microsoft.com': TOKENS.Aria3,\r\n 'tip.bingads.microsoft.com': TOKENS.Aria3,\r\n 'tip.ads.microsoft.com': TOKENS.Aria3,\r\n\r\n 'ui.sandbox.bingads.microsoft.com': TOKENS.Aria3,\r\n 'ui.sandbox.ads.microsoft.com': TOKENS.Aria3,\r\n\r\n // Prod\r\n 'ui.bingads.microsoft.com': TOKENS.Aria07,\r\n 'ui.beta.bingads.microsoft.com': TOKENS.Aria07,\r\n 'ui.ads.microsoft.com': TOKENS.Aria07,\r\n 'ui.aks.ads.microsoft.com': TOKENS.Aria07,\r\n 'ui.beta.ads.microsoft.com': TOKENS.Aria07,\r\n 'ui.aks.beta.ads.microsoft.com': TOKENS.Aria07,\r\n 'bingads.microsoft.com': TOKENS.Aria07,\r\n 'beta.bingads.microsoft.com': TOKENS.Aria07,\r\n 'ads.microsoft.com': TOKENS.Aria07,\r\n 'beta.ads.microsoft.com': TOKENS.Aria07,\r\n\r\n\r\n // AdLibrary\r\n 'adlibraryui-test.azureedge.net': TOKENS.Aria3,\r\n 'adlibrary.ads.microsoft.com': TOKENS.Aria07,\r\n\r\n // AdInsight\r\n // TODO: move out once adinsights use shared listener\r\n adInsightOppTracking: TOKENS.AdInsight,\r\n};\r\n\r\nconst defaultConfig = {\r\n // Note: keeping this for backward compatability\r\n tokens: {\r\n 'ui.si.bingads.microsoft.com': TOKENS.Aria3,\r\n 'ui.beta.si.bingads.microsoft.com': TOKENS.Aria3,\r\n 'ui.bingads.microsoft.com': TOKENS.Aria07,\r\n 'ui.beta.bingads.microsoft.com': TOKENS.Aria07,\r\n 'ui.tip.bingads.microsoft.com': TOKENS.Aria3,\r\n adInsightOppTracking: TOKENS.AdInsight, // TODO: move out once adinsights use shared listener\r\n 'redmond.corp.microsoft.com': TOKENS.ci,\r\n // Rebranded domain mappings\r\n 'ui.ads-int.microsoft.com': TOKENS.Aria3,\r\n 'ui.beta.ads-int.microsoft.com': TOKENS.Aria3,\r\n 'ui.aks2.ads-int.microsoft.com': TOKENS.Aria3,\r\n 'ui.ads.microsoft.com': TOKENS.Aria07,\r\n 'ui.beta.ads.microsoft.com': TOKENS.Aria07,\r\n 'ui.tip.ads.microsoft.com': TOKENS.Aria3,\r\n 'ui.sandbox.bingads.microsoft.com': TOKENS.Aria3,\r\n 'ui.sandbox.ads.microsoft.com': TOKENS.Aria3,\r\n // AdLibrary\r\n 'adlibraryui-test.azureedge.net': TOKENS.Aria3,\r\n 'adlibrary.ads.microsoft.com': TOKENS.Aria07,\r\n },\r\n flushInterval: 3000,\r\n batchSize: 40,\r\n};\r\n\r\nexport function getTokensForSmartPage(env, token) {\r\n let spToken = token;\r\n if (include(env, 'biz.site') || include(env, 'beta.smartpage.microsoft.com')) {\r\n spToken = TOKENS.Aria07;\r\n } else if (include(env, 'si.smartpage.microsoft.com')) {\r\n spToken = TOKENS.Aria3;\r\n } else if (include(env, 'ci.smartpage.microsoft.com')) {\r\n spToken = TOKENS.Local;\r\n }\r\n\r\n return spToken;\r\n}\r\n\r\nexport default function getAriaConfig(env = null) {\r\n let token = allTokens[env];\r\n if (include(env, 'redmond.corp.microsoft.com')) {\r\n token = TOKENS.ci;\r\n } else if (include(env, 'biz.site') || include(env, 'smartpage')) {\r\n token = getTokensForSmartPage(env, token);\r\n }\r\n\r\n return {\r\n token,\r\n ...defaultConfig,\r\n };\r\n}\r\n","import { constants } from '@bingads-webui/instrumentation';\r\n\r\nexport default {\r\n logTableNames: {\r\n [constants.LOGCATEGORY.ERROR]: {\r\n name: 'clienterr',\r\n priority: 1,\r\n },\r\n [constants.LOGCATEGORY.PERFORMANCE]: {\r\n name: 'clientperf',\r\n priority: 2,\r\n },\r\n [constants.LOGCATEGORY.TRACE]: {\r\n name: 'clienttrace',\r\n priority: 3,\r\n },\r\n [constants.LOGCATEGORY.SUBSTRATE]: {\r\n name: 'substrate1',\r\n priority: 3,\r\n },\r\n },\r\n defaultLogCategory: constants.LOGCATEGORY.TRACE,\r\n};\r\n","import { constants } from '@bingads-webui/instrumentation';\r\n\r\nexport default {\r\n logTableNames: {\r\n [constants.LOGCATEGORY.ERROR]: {\r\n name: 'OpportunityEvent',\r\n priority: 1,\r\n },\r\n [constants.LOGCATEGORY.PERFORMANCE]: {\r\n name: 'OpportunityEvent',\r\n priority: 2,\r\n },\r\n [constants.LOGCATEGORY.TRACE]: {\r\n name: 'OpportunityEvent',\r\n priority: 3,\r\n },\r\n },\r\n defaultLogCategory: constants.LOGCATEGORY.TRACE,\r\n};\r\n","import _ from 'underscore';\r\n\r\nexport class ContextProcessor {\r\n constructor(options) {\r\n this.pageContext = _.defaults(options.pageContext || {}, {\r\n CurrentCustomer: { Id: -1 },\r\n CurrentAccount: { Id: -1 },\r\n CurrentUser: {\r\n Id: -1, Locale: '', Market: '', UserRole: '', ManagedBy: '', LocaleID: '',\r\n },\r\n });\r\n }\r\n\r\n get CustomerId() {\r\n return this.pageContext.CurrentCustomer.Id;\r\n }\r\n\r\n get AccountId() {\r\n return _.result(this.pageContext.CurrentAccount, 'Id', -1);\r\n }\r\n\r\n get UserId() {\r\n return this.pageContext.CurrentUser.Id;\r\n }\r\n\r\n get Lcid() {\r\n return this.pageContext.CurrentUser.Locale || this.pageContext.CurrentUser.LocaleID;\r\n }\r\n\r\n get CustomerMarket() {\r\n return this.pageContext.CurrentUser.Market;\r\n }\r\n\r\n get UserRole() {\r\n const role = (this.pageContext &&\r\n this.pageContext.Permissions &&\r\n this.pageContext.Permissions.IsInternalUser) ? '(Internal)' : '';\r\n return `${this.pageContext.CurrentUser.UserRole}${role}`;\r\n }\r\n\r\n get CustomerManagedBy() {\r\n return this.pageContext.CurrentUser.ManagedBy;\r\n }\r\n\r\n get SessionId() {\r\n return (this.pageContext.Omniture || {}).SessionId || '';\r\n }\r\n\r\n get PageTrackingId() {\r\n return this.pageContext.PageTrackingId;\r\n }\r\n\r\n get PageVersion() {\r\n return this.pageContext.Version;\r\n }\r\n\r\n get Pilots() {\r\n return 'grid';\r\n }\r\n\r\n get IsAksService() {\r\n return this.pageContext.IsAksService;\r\n }\r\n\r\n process(rawLogs) {\r\n return _.extend(rawLogs, {\r\n customerId: this.CustomerId,\r\n accountId: this.AccountId,\r\n userId: this.UserId,\r\n lcid: this.Lcid,\r\n sessionId: this.SessionId,\r\n pageTrackingId: this.PageTrackingId,\r\n pageVersion: this.PageVersion,\r\n market: this.CustomerMarket,\r\n userRole: this.UserRole,\r\n managedBy: this.CustomerManagedBy,\r\n pilots: this.Pilots,\r\n IsAksService: this.IsAksService,\r\n });\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\nexport class DebugProcessor {\r\n constructor({ isDebugMode }) {\r\n this.isDebugMode = isDebugMode;\r\n }\r\n\r\n process(rawLogs) {\r\n return _.extend(rawLogs, {\r\n isDebugMode: this.isDebugMode,\r\n });\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\nexport class PerfTimingProcessor {\r\n constructor({ landingPageUrl = '' }) {\r\n this.landingPageUrl = landingPageUrl;\r\n }\r\n\r\n process(rawLogs) {\r\n return _.extend(rawLogs, {\r\n href: window.location.href,\r\n referrer: document.referrer,\r\n landingPg: this.landingPageUrl,\r\n });\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\nexport function safeParseInteger(number, defaultValue = 0) {\r\n const parsedNum = Number(number);\r\n\r\n if (_.isNaN(parsedNum) || parsedNum < 0) {\r\n return defaultValue;\r\n }\r\n return Math.round(parsedNum);\r\n}\r\n","import _ from 'underscore';\r\nimport { Formatter } from '@bingads-webui/listener';\r\nimport { getParameter, updateParameter } from '@bingads-webui/url-util';\r\nimport { getUtcTime } from '@bingads-webui-universal/primitive-utilities';\r\nimport { safeParseInteger } from './format-utilities';\r\n\r\nexport class BasicFormatter extends Formatter {\r\n constructor(options = {}) {\r\n super();\r\n this.applicationSystem = options.applicationSystem;\r\n this.applicationSubSystem = options.applicationSubSystem;\r\n }\r\n\r\n getPFlagsProps(rawLog) {\r\n let pflags = '';\r\n\r\n if (_.isString(rawLog.api)) {\r\n let apiString = rawLog.api.trim();\r\n // hide all token / code related values due to privacy issue.\r\n if (getParameter('authCode', apiString)) {\r\n apiString = updateParameter('authCode', 'authCodePlaceholder', apiString);\r\n } else if (getParameter('accessToken', apiString)) {\r\n apiString = updateParameter('accessToken', 'accessTokenPlaceholder', apiString);\r\n } else if (getParameter('refreshToken', apiString)) {\r\n apiString = updateParameter('refreshToken', 'refreshTokenPlaceholder', apiString);\r\n } else if (getParameter('LongLivedAccessToken', apiString)) {\r\n apiString = updateParameter('LongLivedAccessToken', 'LongLivedAccessTokenPlaceholder', apiString);\r\n }\r\n pflags += `rUrl:${apiString};`;\r\n }\r\n if (rawLog.parentScenarioName && rawLog.parentScenarioId) {\r\n pflags += `pScenario:${rawLog.parentScenarioName};pScenarioId:${rawLog.parentScenarioId};`;\r\n }\r\n if (rawLog.IsAksService) {\r\n pflags += 'IsAksService:true;';\r\n }\r\n return pflags;\r\n }\r\n\r\n getEventType(rawLog) {\r\n if (rawLog.message && JSON.stringify(rawLog.message).indexOf('perf-marker@') !== -1) {\r\n return 'perfmarker';\r\n }\r\n return rawLog.entryType;\r\n }\r\n\r\n format(rawLog) {\r\n const log = {\r\n Sn: rawLog.scenarioName || '',\r\n SceID: rawLog.scenarioId || '',\r\n RID: rawLog.requestId || '',\r\n Api: _.isString(rawLog.api) ? rawLog.api.trim().toLowerCase() : '',\r\n Pass: _.isUndefined(rawLog.pass) ? '' : rawLog.pass,\r\n Dur: safeParseInteger(rawLog.timeTaken),\r\n Ime: _.isUndefined(rawLog.isMethodEnter) ? '' : rawLog.isMethodEnter,\r\n Hm: rawLog.httpMethod || '',\r\n Timestamp: rawLog.timeStamp || getUtcTime(),\r\n SesID: rawLog.sessionId || '',\r\n Url: (window.location.pathname || '') + (window.location.search || '') + (window.location.hash || ''),\r\n UID: rawLog.userId || '',\r\n CID: rawLog.customerId || '',\r\n AID: rawLog.accountId || '',\r\n LCID: rawLog.lcid || '',\r\n Mes: JSON.stringify(rawLog.message),\r\n Lc: _.isArray(rawLog.logCategory) ?\r\n rawLog.logCategory.join(',') : rawLog.logCategory,\r\n Ll: rawLog.logLevel ? rawLog.logLevel.name : '',\r\n Env: window.location.hostname,\r\n As: this.applicationSystem || '',\r\n Asub: this.applicationSubSystem || '',\r\n An: rawLog.activityName || '',\r\n ActID: rawLog.activityId || '',\r\n Et: this.getEventType(rawLog) || '',\r\n Loc: rawLog.market || '',\r\n Role: rawLog.userRole || '',\r\n MgdBy: rawLog.managedBy || '',\r\n PFlags: this.getPFlagsProps(rawLog) || '',\r\n Iu: rawLog.impactUser || null,\r\n Ec: safeParseInteger(rawLog.entityCount),\r\n UserAgent: (window.navigator || {}).userAgent || '',\r\n PgID: rawLog.pageTrackingId || '',\r\n PgVer: rawLog.pageVersion || '',\r\n DbgMode: rawLog.isDebugMode || false,\r\n };\r\n\r\n return log;\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { Formatter } from '@bingads-webui/listener';\r\n\r\nconst bracketedParamsRegex = new RegExp(/\\([^)]*\\)/g);\r\n\r\nexport class ApiFormatter extends Formatter {\r\n /* eslint-disable no-param-reassign */\r\n convertAbsoluteToRelativePath(log) {\r\n const path = log.Api.toLowerCase();\r\n\r\n if ((path.indexOf('http://') !== 0) && (path.indexOf('https://') !== 0)) {\r\n return log;\r\n }\r\n\r\n const a = document.createElement('a');\r\n\r\n a.href = path;\r\n log.Api = a.pathname;\r\n if (log.Api.indexOf('/') === 0 && log.Api.length > 1) {\r\n log.Api = log.Api.substring(1);\r\n }\r\n\r\n return log;\r\n }\r\n\r\n removeQueryParameters(log) {\r\n [log.Api] = log.Api.split('?');\r\n return log;\r\n }\r\n\r\n removeDotMExtension(log) {\r\n log.Api = log.Api.replace('.m/', '/');\r\n if (log.Api.substr(-2) === '.m') {\r\n log.Api = log.Api.substr(0, log.Api.length - 2);\r\n }\r\n return log;\r\n }\r\n\r\n removeBracketedParameters(log) {\r\n log.Api = log.Api.replace(bracketedParamsRegex, '');\r\n return log;\r\n }\r\n\r\n removeApplicationNameFromApi(log) {\r\n const appName = `${log.As}/`.toLowerCase();\r\n\r\n if (log.Api.toLowerCase().indexOf(appName.toLowerCase()) === 0) {\r\n log.Api = log.Api.substring(appName.length);\r\n }\r\n return log;\r\n }\r\n\r\n format(log) {\r\n if (!_.isEmpty(log.Api)) {\r\n log = _.chain(log)\r\n .tap(this.removeQueryParameters)\r\n .tap(this.removeDotMExtension)\r\n .tap(this.convertAbsoluteToRelativePath)\r\n .tap(this.removeBracketedParameters)\r\n .tap(this.removeApplicationNameFromApi)\r\n .value();\r\n }\r\n return log;\r\n }\r\n}\r\n","/**\r\n * @file\r\n * AdInsight Opportunity Log Spec:\r\n * https://microsoft.sharepoint.com/:w:/r/teams/stcaadinsights/Shared%20Documents/AdvertiserIntelligence/Log%20Requirements.docx?d=w0e50147bfce943a6a1325bfb995c9902&csf=1&e=aZkNhs\r\n */\r\n\r\nimport _ from 'underscore';\r\nimport { Formatter } from '@bingads-webui/listener';\r\n\r\nexport class AdInsightOpportunityLogFormatter extends Formatter {\r\n format(rawLog) {\r\n let clientName = 'CampaignWebUI';\r\n let environment;\r\n let Action;\r\n const logApi = _.result(rawLog, 'api');\r\n const channel = _.result(rawLog.message, 'channel');\r\n const logApiClientNameMapper = {\r\n OverviewOpportunityTile: 'Opportunities[Overview]',\r\n MCCOverviewOpportunityTile: 'bingadsweb[mccoverviewpage]',\r\n };\r\n\r\n if (_.has(logApiClientNameMapper, logApi)) {\r\n clientName = _.result(logApiClientNameMapper, logApi);\r\n } else if (!_.isUndefined(channel)) {\r\n clientName = `bingadsweb[${channel}]`;\r\n }\r\n\r\n if (document.domain === 'ui.bingads.microsoft.com' || document.domain === 'ui.ads.microsoft.com') {\r\n environment = 'Production';\r\n } else if (document.domain === 'ui.si.bingads.microsoft.com' || document.domain === 'ui.ads-int.microsoft.com') {\r\n environment = 'SI';\r\n } else {\r\n environment = document.domain;\r\n }\r\n\r\n if (rawLog.message.action) {\r\n Action = rawLog.message.action;\r\n } else {\r\n Action = rawLog.message.isClick ? 'Click' : 'View';\r\n }\r\n\r\n const isMCC = clientName === 'bingadsweb[mccrecommendationpage]';\r\n\r\n return {\r\n RequestId: rawLog.requestId,\r\n OpportunityId: rawLog.message.id,\r\n OpportunityType: rawLog.message.type,\r\n OpportunityTypeId: rawLog.message.typeId,\r\n Action,\r\n UserId: rawLog.userId,\r\n CustomerId: rawLog.customerId,\r\n AccountId: isMCC\r\n ? rawLog.message.accountId || null\r\n : rawLog.accountId,\r\n CampaignId: rawLog.message.campaignId,\r\n ClientName: clientName,\r\n Environment: environment,\r\n Source: document.URL,\r\n GUID: rawLog.message.guid,\r\n Position: rawLog.message.position,\r\n UserFeedback: rawLog.message.input,\r\n Context: rawLog.message.context,\r\n };\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { Formatter } from '@bingads-webui/listener';\r\nimport { safeParseInteger } from './format-utilities';\r\n\r\nexport class ReportingApiFormatter extends Formatter {\r\n format(log) {\r\n if (log.As === 'campaign' && log.Api.indexOf('reporting/syncdata/') > -1) {\r\n /* eslint-disable no-param-reassign */\r\n log.As = 'reporting';\r\n const apiChunks = this.getValidatedApiChunks(log.Api.split('/'));\r\n\r\n if (apiChunks.length > 5) {\r\n const operationId = safeParseInteger(apiChunks[5], -1);\r\n\r\n if ((operationId >= 0 && operationId <= 4) || operationId === 23) {\r\n log.Api = 'sync/trendchart';\r\n } else if (operationId === 5) {\r\n log.Api = 'sync/kdg';\r\n } else if ((operationId >= 24 && operationId <= 26) || operationId === 6) {\r\n log.Api = 'sync/changehistorygrid';\r\n } else if (operationId !== -1) {\r\n log.Api = 'sync/dimensiongrid';\r\n }\r\n }\r\n }\r\n return log;\r\n }\r\n\r\n // make sure that the first element of the rawChunks is the string 'reporting'\r\n // if not we'll strip all the elements before the 'reporting' element\r\n getValidatedApiChunks(rawChunks) {\r\n if (_.isUndefined(rawChunks) || !_.isArray(rawChunks) || rawChunks.length === 0 || rawChunks[0] === 'reporting') {\r\n return rawChunks;\r\n }\r\n\r\n const index = _.indexOf(rawChunks, 'reporting');\r\n\r\n if (index > 0) {\r\n return rawChunks.slice(index);\r\n }\r\n\r\n return rawChunks;\r\n }\r\n}\r\n","/* eslint-disable no-param-reassign */\r\nimport { Formatter } from '@bingads-webui/listener';\r\n\r\nexport class UetTagHelperFormatter extends Formatter {\r\n format(log) {\r\n if (log.As === 'campaign' && log.Api.indexOf('campaignext/uettagassistant/') > -1) {\r\n log.As = 'campaignExt';\r\n log.Asub = 'UetTagAssistant';\r\n }\r\n return log;\r\n }\r\n}\r\n","/* eslint-disable no-param-reassign */\r\nimport { Formatter } from '@bingads-webui/listener';\r\n\r\nexport class ImportApiFormatter extends Formatter {\r\n format(log) {\r\n if (log.Api.indexOf('api/v1/bingads/hasplaceholderstores') !== -1) {\r\n // remove extra customer id appended after this api to reduce false alarm for api availability\r\n log.Api = log.Api.substring(0, log.Api.indexOf('hasplaceholderstores') + 20);\r\n }\r\n\r\n return log;\r\n }\r\n}\r\n","import { Formatter } from '@bingads-webui/listener';\r\n\r\nexport class ConsoleFormatter extends Formatter {\r\n format(log) {\r\n const logMessage = JSON.stringify(log.message);\r\n\r\n return logMessage;\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { Formatter } from '@bingads-webui/listener';\r\n\r\n// Values from window.performance.timing and firstPaintTime\r\nconst pageNavigationColumns = ['navigationStart', 'unloadEventStart', 'unloadEventEnd', 'redirectStart', 'redirectEnd',\r\n 'fetchStart', 'domainLookupStart', 'domainLookupEnd', 'connectStart', 'connectEnd', 'secureConnectionStart', 'requestStart',\r\n 'responseStart', 'responseEnd', 'domLoading', 'domInteractive', 'domContentLoadedEventStart', 'domContentLoadedEventEnd',\r\n 'domComplete', 'loadEventStart', 'loadEventEnd', 'navigationStart', 'unloadEventStart', 'unloadEventEnd', 'redirectStart',\r\n 'redirectEnd', 'redirectCount', 'fetchStart', 'firstPaintTime', 'domainLookupStart', 'domainLookupEnd', 'connectStart', 'connectEnd', 'secureConnectionStart',\r\n 'requestStart', 'responseStart', 'responseEnd', 'domLoading', 'domInteractive', 'domContentLoadedEventStart', 'domContentLoadedEventEnd',\r\n 'domComplete', 'loadEventStart', 'loadEventEnd', 'landingPg', 'inactiveTime'];\r\n\r\n// Values from window.perfromance.getEntries('resource')\r\nconst resourceTimingColumns = ['unloadEventStart', 'unloadEventEnd', 'domInteractive',\r\n 'domContentLoadedEventStart', 'domContentLoadedEventEnd', 'domComplete', 'loadEventStart',\r\n 'loadEventEnd', 'type', 'redirectCount', 'initiatorType', 'workerStart', 'redirectStart',\r\n 'redirectEnd', 'fetchStart', 'domainLookupStart', 'domainLookupEnd', 'connectStart', 'connectEnd',\r\n 'secureConnectionStart', 'requestStart', 'responseStart', 'responseEnd', 'transferSize', 'encodedBodySize',\r\n 'decodedBodySize', 'name', 'entryType', 'startTime', 'duration'];\r\n\r\nexport class PerformanceLogsFormatter extends Formatter {\r\n format(log) {\r\n const columns = log.isPageNavigationLog ? pageNavigationColumns : resourceTimingColumns;\r\n\r\n let formattedLogs = _.pick(log, columns);\r\n\r\n formattedLogs = _.extend(formattedLogs, {\r\n uid: log.userId,\r\n aid: log.accountId,\r\n cid: log.customerId,\r\n mkt: log.market,\r\n href: log.href,\r\n referrer: log.referrer,\r\n dbgMode: log.isDebugMode,\r\n pgId: log.pageTrackingId || null,\r\n pgVer: log.pageVersion || null,\r\n });\r\n\r\n return formattedLogs;\r\n }\r\n}\r\n","import { constants } from '@bingads-webui/instrumentation';\r\nimport { Filter } from '@bingads-webui/listener';\r\n\r\nexport class LogLevelFilter extends Filter {\r\n check(logMessage) {\r\n const appLogLevel = constants.LOGLEVEL.INFO;\r\n\r\n if (logMessage.logLevel) {\r\n return logMessage.logLevel.value > appLogLevel.value;\r\n }\r\n\r\n return false;\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { constants } from '@bingads-webui/instrumentation';\r\nimport { Filter } from '@bingads-webui/listener';\r\n\r\nconst ignoredApis = [\r\n 'http://help',\r\n 'https://help',\r\n 'g.bing.com/clientsdk',\r\n 'api/updates/get',\r\n];\r\n\r\nexport class ApiFilter extends Filter {\r\n check(logMessage) {\r\n let shouldFilter = false;\r\n\r\n // If API is in ignored API list, only log it if log category is error.\r\n if (_.isString(logMessage.api)) {\r\n const isErrorLog = logMessage.logCategory === constants.LOGCATEGORY.ERROR;\r\n const isIgnoreApi = _.any(\r\n ignoredApis,\r\n ignoredApi => logMessage.api.toLowerCase().indexOf(ignoredApi) > -1\r\n );\r\n\r\n shouldFilter = !isErrorLog && isIgnoreApi;\r\n }\r\n\r\n return shouldFilter;\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { Filter } from '@bingads-webui/listener';\r\n\r\nexport class AdInsightOpportunityApiFilter extends Filter {\r\n check(rawLog) {\r\n const allowedApiList = [\r\n 'competitionpage',\r\n 'recommendationpage',\r\n 'Recommendations',\r\n 'OverviewOpportunityTile',\r\n 'MCCOverviewOpportunityTile',\r\n 'incontextcard',\r\n 'searchinsight',\r\n ];\r\n const logApi = _.result(rawLog, 'api');\r\n\r\n return !(\r\n rawLog.entryType === 'Message' &&\r\n _.isObject(rawLog.message) &&\r\n _.isString(_.chain(rawLog).result('message').result('type').value()) &&\r\n ((logApi === 'ViewInlineOpportunity' &&\r\n _.chain(rawLog).result('message').result('id').value() &&\r\n _.isNumber(_.chain(rawLog).result('message').result('campaignId').value())\r\n ) || _.contains(allowedApiList, logApi)));\r\n }\r\n}\r\n","import { constants } from '@bingads-webui/instrumentation';\r\nimport { Filter } from '@bingads-webui/listener';\r\n\r\nexport class ConsoleFilter extends Filter {\r\n check(logMessage) {\r\n const category = logMessage.logCategory || '';\r\n const api = logMessage.api || '';\r\n\r\n // log only error logs from window.onerror\r\n if (api === 'onerror' && category === constants.LOGCATEGORY.ERROR) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n}\r\n","import { Filter } from '@bingads-webui/listener';\r\n\r\nexport class UnloadLogFilter extends Filter {\r\n check(log) {\r\n return !(log.activityName === 'RunAriaV2UnloadHandler' &&\r\n log.scenarioName === 'PageUnload' &&\r\n !log.excludeFromLocalStorage);\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { Filter } from '@bingads-webui/listener';\r\n\r\nconst campaignEnvs = [\r\n 'ui.bingads.microsoft.com',\r\n 'ui.tip.bingads.microsoft.com',\r\n 'ui.si.bingads.microsoft.com',\r\n 'ui.ads.microsoft.com',\r\n 'ui.tip.ads.microsoft.com',\r\n 'ui.ads-int.microsoft.com',\r\n 'adlibraryui-test.azureedge.net',\r\n 'adlibrary.ads.microsoft.com',\r\n];\r\n\r\nconst signupEnvs = [\r\n 'bingads.microsoft.com',\r\n 'tip.bingads.microsoft.com',\r\n 'si.bingads.microsoft.com',\r\n 'ads.microsoft.com',\r\n 'tip.ads.microsoft.com',\r\n 'ads-int.microsoft.com',\r\n];\r\n\r\nconst allowedEnvs = [...campaignEnvs, ...signupEnvs];\r\n\r\nconst exlcudeResources = [\r\n '/campaign/API/Updates/get',\r\n '/root/keepalive',\r\n 'aria.microsoft.com',\r\n 'liveperson.net',\r\n 'browser.events.data.microsoft.com',\r\n];\r\n\r\nexport class PerformanceLogsFilter extends Filter {\r\n check(log) {\r\n if (!_.contains(allowedEnvs, document.domain) || log.isDebugMode) {\r\n return true;\r\n }\r\n\r\n if (log.isPageNavigationLog) {\r\n return false;\r\n }\r\n\r\n const resourceName = log.name;\r\n\r\n return _.any(exlcudeResources, excludedResource => resourceName && resourceName.search(new RegExp(excludedResource, 'i')) > 0);\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\n/**\r\n * OdataErrorMapper - Maps ajax errors from odata calls to known user errors\r\n */\r\nexport class OdataErrorMapper {\r\n /**\r\n * @param {object} errorCodes - odata user error codes\r\n */\r\n constructor(errorCodes) {\r\n this.errorCodes = errorCodes || [];\r\n }\r\n\r\n /**\r\n * Checks if an ajax error is a known user error\r\n * @param {object} ajaxData - data related to the current ajax call\r\n * @returns {bool} - if the error maps to a known error or not\r\n */\r\n check(ajaxData) {\r\n const errorString = ajaxData.error;\r\n\r\n return _.any(this.errorCodes, errorCode => errorString.toUpperCase().indexOf(errorCode) >= 0);\r\n }\r\n}\r\n","/**\r\n * CampaignApiErrorMapper - Maps ajax errors from campaign/api to known user errors\r\n */\r\nexport class CampaignApiErrorMapper {\r\n /**\r\n * @param {object} errorCodes - campaign api user error codes\r\n */\r\n constructor(errorCodes) {\r\n this.knownUserErrorCodes = errorCodes || [];\r\n }\r\n\r\n /**\r\n * Checks if an ajax error is a known user error\r\n * @param {object} ajaxData - data related to the current ajax call\r\n * @param {object} jqXHR - jqXHR of the ajax call\r\n * @returns {bool} - if the error maps to a known error or not\r\n */\r\n check(ajaxData, jqXHR) {\r\n const urlString = ajaxData.url;\r\n const { responseText } = jqXHR;\r\n\r\n if (!urlString) {\r\n return false;\r\n }\r\n\r\n if (urlString.toUpperCase().indexOf('/CAMPAIGN/API/') >= 0) {\r\n try {\r\n const errorCode = JSON.parse(responseText).Errors[0].Code;\r\n\r\n if (this.knownUserErrorCodes.indexOf(errorCode) >= 0) {\r\n return true;\r\n }\r\n } catch (e) {\r\n // ignore any parse exceptions\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\n/**\r\n * UrlErrorMapper - Maps ajax errors from known invalid domains as user errors\r\n */\r\nexport class UrlErrorMapper {\r\n /**\r\n * @param {object} domains - known invalid domains\r\n */\r\n constructor(domains) {\r\n this.domains = domains || [];\r\n }\r\n\r\n /**\r\n * Checks if the url is of a known invalid domain\r\n * @param {object} ajaxData - data related to the current ajax call\r\n * @returns {bool} - if the url maps to a known invalid domain or not\r\n */\r\n check(ajaxData) {\r\n const ajaxUrlString = ajaxData.url;\r\n\r\n return _.isString(ajaxUrlString) &&\r\n _.any(this.domains, domain => ajaxUrlString.toUpperCase().indexOf(domain.toUpperCase()) >= 0);\r\n }\r\n}\r\n","\r\nconst prodEnvs = [\r\n // CMUI\r\n 'ui.bingads.microsoft.com',\r\n 'ui.beta.bingads.microsoft.com',\r\n 'ui.ads.microsoft.com',\r\n 'ui.beta.ads.microsoft.com',\r\n // CCUI\r\n 'bingads.microsoft.com',\r\n 'beta.bingads.microsoft.com',\r\n 'ads.microsoft.com',\r\n 'beta.ads.microsoft.com',\r\n // AdLibrary\r\n 'adlibrary.ads.microsoft.com',\r\n];\r\n\r\nexport function isTestEnvironment(envToCheck) {\r\n return prodEnvs.indexOf(envToCheck) === -1;\r\n}\r\n","// specify odata error codes that represent user errors\r\nconst odataErrorCodes = [\r\n 'ACCOUNTIDCOLUMNNOTFOUND',\r\n 'ACCOUNTIDINVALID',\r\n 'ACCOUNTNOTINPILOTFORPORTFOLIOBIDSTRATEGY',\r\n 'ACCOUNTNUMBERSMAXLIMITEXCEEDED',\r\n 'ADDESTINATIONURLINVALID',\r\n 'ADEXTENSIONASSOCIATIONSLIMITEXCEEDEDPERENTITYTYPE',\r\n 'ADEXTENSIONCITYNAMENULLOREMPTY',\r\n 'ADEXTENSIONPHONENUMBERINVALID',\r\n 'ADEXTENSIONPHONENUMBERTOOLONG',\r\n 'ADGROUPCRITERIONIDINVALID',\r\n 'ADGROUPCRITERIONSENTITYLIMITEXCEEDED',\r\n 'ADGROUPEXPIRED',\r\n 'ADGROUPIDINVALID',\r\n 'ADGROUPINEXPIREDSTATECANNOTBEUPDATED',\r\n 'ADGROUPISDELETED',\r\n 'ADIDINVALID',\r\n 'ADPREVIEWINAPPROPRIATECONTENTERROR',\r\n 'ADPREVIEWWEBSITECRAWLERROR',\r\n 'ADPREVIEWWEBSITEINSUFFICIENTCONTENTERROR',\r\n 'ADTEXTINVALID',\r\n 'ADTITLEINVALID',\r\n 'ADTYPEINVALIDFORCUSTOMER',\r\n 'ADTYPENOTSUPPORTEDFORDISCLAIMERCAMPAIGN', // Added from legacy error file\r\n 'ADULTADVERTISERERR',\r\n 'ALREADYHASPENDINGFEED',\r\n 'APPADEXTENSIONAPPSTOREIDINVALID',\r\n 'APPADEXTENSIONDESTINATIONURLINVALID',\r\n 'APPEALQUOTAEXCEEDED',\r\n 'ASSETDATAENCODINGINVALID',\r\n 'ASSETDATAINVALID',\r\n 'ASSETDATAINVALIDASPECT',\r\n 'ASSETDATAINVALIDHEIGHT',\r\n 'ASSETDATAINVALIDWIDTH',\r\n 'ASSETGROUPIDINVALID',\r\n 'ASSETISALREADYDELETED',\r\n 'ASSETISUSED',\r\n 'ASSOCIATIONSLIMITEXCEEDEDPERADEXTENSIONTYPE',\r\n 'ASSOCIATIONSLIMITEXCEEDEDPERADEXTENSIONTYPEFORENTITY',\r\n 'ATTRIBUTENAMELENGTHEXCEEDED',\r\n 'ATTRIBUTEVALUELENGTHEXCEEDED',\r\n 'ATTRIBUTEVALUESTRINGTOOLONG',\r\n 'AUDIENCESHOULDNOTBEACCOUNTLEVEL',\r\n 'BASECAMPAIGNBUDGETTYPEINVALID',\r\n 'BINGPLACESMSABUSINESSLISTINGFORSEARCHQUERYCOULDNOTBEFOUND', // BP Business not indexed scenario\r\n 'BOTHDESTINATIONURLANDFINALURLNOTALLOWED',\r\n 'BUDGETAMOUNTISABOVELIMIT',\r\n 'BUDGETAMOUNTISBELOWLIMIT',\r\n 'BUDGETIDINVALID',\r\n 'BULKFILEEXPIRED',\r\n 'BULKFILENOTPRESENT',\r\n 'BULKFILESCANNOTBEMULTIPLE',\r\n 'CAMPAIGNADGROUPNOTMATCHED',\r\n 'CAMPAIGNOREXPERIMENTWITHNAMEALREADYEXISTS',\r\n 'CAMPAIGNSERVICECANNOTADDCRITERIONTOCAMPAIGNWITHOUTDYNAMICSEARCHSETTINGS',\r\n 'CAMPAIGNSERVICEEXPANDEDTEXTADDEFAULTTEXTREQUIREDFORKEYWORD',\r\n 'CAMPAIGNSERVICEEXPERIMENTDOESNOTSUPPORTMIXEDMODECAMPAIGN',\r\n 'CAMPAIGNSERVICERESPONSIVESEARCHADDESCRIPTIONSLESSTHANMINREQUIRED',\r\n 'CAMPAIGNSERVICERESPONSIVESEARCHADHEADLINESNULLOREMPTY',\r\n 'CAMPAIGNSERVICERESPONSIVESEARCHADDESCRIPTIONSNULLOREMPTY',\r\n 'CAMPAIGNSERVICERESPONSIVESEARCHADHEADLINESLESSTHANMINREQUIRED',\r\n 'CAMPAIGNSERVICERESPONSIVESEARCHADPATH1INVALID',\r\n 'CAMPAIGNSERVICERESPONSIVESEARCHADPATH2INVALID',\r\n 'CAMPAIGNWITHNAMEALREADYEXISTS',\r\n 'CANNOTUPDATEACCOUNTPROPERTYBYCUSTOMERIDFORTHISPROPERTYNAME',\r\n 'CANNOTUSESTANDARDFEEDATTRIBUTENAME',\r\n 'CANNOTUSETARGETINGFEEDATTRIBUTENAME',\r\n 'COOPINVALIDCOOPERR',\r\n 'COUNTDOWNDAYSBEFOREOUTOFRANGE',\r\n 'COUNTDOWNINVALIDDATETIME',\r\n 'COUNTDOWNINVALIDDAYSBEFORE',\r\n 'COUNTDOWNINVALIDDEFAULTTEXT',\r\n 'COUNTDOWNINVALIDLANGUAGECODE',\r\n 'COUNTDOWNINVALIDPARAMETERS',\r\n 'COUNTDOWNPASTDATETIME',\r\n 'CREATESTOREWITHFRAUDDOMAINERR',\r\n 'CUSTOMERNOTELIGIBLEFORDYNAMICDATAFEED',\r\n 'CUSTOMERUNDERMIGRATION',\r\n 'CUSTOMIDATTRIBUTESHOULDBEOFSTRINGTYPE',\r\n 'DEFAULTHOTELGROUPUPDATENOTALLOWED',\r\n 'DESTINATIONGOALURLSTRINGHASINVALIDCHARACTERS',\r\n 'DESTINATIONGOALURLSTRINGTOOLONG',\r\n 'DESTINATIONURLPROTOCOLINVALID',\r\n 'DOWNLOADFILTEREXPRESSIONSCOUNTEXCEEDED',\r\n 'DUPLICATEASSETSUNDERFOLDER',\r\n 'DUPLICATEAUDIENCEID', // when trying to create audience with the same ID\r\n 'DUPLICATEAUDIENCENAME',\r\n 'DUPLICATEDOMAINNAMEERR',\r\n 'DUPLICATEENTITY', // duplicate folder created (user error)\r\n 'DUPLICATEFEEDATTRIBUTENAME',\r\n 'DUPLICATEFEEDFILENAMEERR',\r\n 'DUPLICATEFEEDNAME',\r\n 'DUPLICATEFEEDNAMEERR',\r\n 'DUPLICATEFOLDERNAME',\r\n 'DUPLICATEIMAGE',\r\n 'DUPLICATELISTITEMINLIST',\r\n 'DUPLICATEPRODUCTAUDIENCE', // when trying to create audience with same audience setting(tag, type)\r\n 'DUPLICATESHAREDLISTNAME',\r\n 'DUPLICATESOURCEPULLURLERR',\r\n 'DUPLICATESTORENAMEERR',\r\n 'DUPLICATETAGID', // when creating tag for the audience with same ID\r\n 'DUPLICATEVALUES', // when creating hotel center length of stay with same value in different stay length\r\n 'DYNAMICSEARCHADPATH1INVALID', // Added from legacy error file\r\n 'DYNAMICSEARCHADTEXTPART2INVALID',\r\n 'EDITORIALADDESTINATIONURLBLANKACROSSALLASSOCIATIONS',\r\n 'EDITORIALADTEXTBLANKACROSSALLASSOCIATIONS',\r\n 'EDITORIALADTITLEBLANKACROSSALLASSOCIATIONS',\r\n 'EDITORIALAPPEALCREATIONQUOTAEXCEEDED',\r\n 'EDITORIALAPPEALCREATIONQUOTAEXCEEDEDFORLAST24HOURS',\r\n 'EDITORIALAPPEALENTITYALREADYAPPEALED',\r\n 'EDITORIALERROR',\r\n 'EDITORIALSYNTAXERRORINTITLE',\r\n 'EDITORIALTOOMUCHADTEXTINDESTINATIONURL',\r\n 'EDITORIALTOOMUCHADTEXTINTEXT',\r\n 'EDITORIALTOOMUCHADTEXTINTEXTACROSSALLASSOCIATIONS',\r\n 'EDITORIALTOOMUCHADTEXTINTITLE',\r\n 'EDITORIALTOOMUCHADTEXTINTITLEACROSSALLASSOCIATIONS',\r\n 'ENDEDEXPERIMENTCANNOTBECHANGED',\r\n 'ENTITYALREADYEXISTS',\r\n 'EXPANDEDTEXTADCOMBINEDTITLETOOLONG',\r\n 'EXPANDEDTEXTADCOUNTDOWNDAYSBEFOREOUTOFRANGE',\r\n 'EXPANDEDTEXTADCOUNTDOWNINVALIDDATETIME',\r\n 'EXPANDEDTEXTADCOUNTDOWNINVALIDDAYSBEFORE',\r\n 'EXPANDEDTEXTADCOUNTDOWNINVALIDDEFAULTTEXT',\r\n 'EXPANDEDTEXTADCOUNTDOWNINVALIDLANGUAGECODE',\r\n 'EXPANDEDTEXTADCOUNTDOWNINVALIDPARAMETERS',\r\n 'EXPANDEDTEXTADCOUNTDOWNPASTDATETIME',\r\n 'EXPANDEDTEXTADDEFAULTTEXTREQUIREDFORKEYWORDPARAMETER',\r\n 'EXPANDEDTEXTADDISPLAYURLDOMAINEXTRACTIONFAILED',\r\n 'EXPANDEDTEXTADDISPLAYURLDOMAININVALID',\r\n 'EXPANDEDTEXTADFINALURLDOMAINTOOLONG',\r\n 'EXPANDEDTEXTADINVALIDFUNCTIONFORMAT',\r\n 'EXPANDEDTEXTADMISSINGDELIMITERBETWEENFUNCTIONS',\r\n 'EXPANDEDTEXTADPATH1INVALID',\r\n 'EXPANDEDTEXTADPATH2INVALID',\r\n 'EXPANDEDTEXTADTEXTPART1INVALID',\r\n 'EXPANDEDTEXTADTEXTPART1TOOLONG',\r\n 'EXPANDEDTEXTADTEXTPART2INVALID',\r\n 'EXPANDEDTEXTADTEXTPART2TOOLONG',\r\n 'EXPANDEDTEXTADTITLEPART1INVALID',\r\n 'EXPANDEDTEXTADTITLEPART1TOOLONG',\r\n 'EXPANDEDTEXTADTITLEPART2INVALID',\r\n 'EXPANDEDTEXTADTITLEPART2TOOLONG',\r\n 'EXPANDEDTEXTADTITLEPART3INVALID',\r\n 'EXPANDEDTEXTADTITLEPART3TOOLONG',\r\n 'EXPANDEDTEXTADUNKNOWNFUNCTION',\r\n 'EXPERIMENTCAMPAIGNCANNOTBEUPDATED',\r\n 'EXPERIMENTENDDATELESSTHANTODAY',\r\n 'EXPERIMENTIDINVALID',\r\n 'EXPERIMENTNAMEISSAMEASBASECAMPAIGNNAME',\r\n 'EXPERIMENTNOTSUPPORTEDFORDISCLAIMERCAMPAIGN',\r\n 'EXPERIMENTTIMEPERIODOVERLAPPING',\r\n 'EXPERIMENTTRAFFICSPLITPERCENTCANNOTBECHANGED',\r\n 'FEEDASSOCIATIONLIMITATIONREACHED',\r\n 'FEEDITEMMAXLIMITREACHED',\r\n 'FEEDNOTFOUNDERR',\r\n 'FEEDUPLOADSCHEDULEINVALIDURL',\r\n 'FEEDUPLOADSCHEDULEUNABLETOFETCHFILE',\r\n 'FEEDUPLOADSCHEDULEUSERNAMEREQUIREDFORPASSWORD',\r\n 'FILEFETCHAUTHENTICATIONERROR',\r\n 'FILEFETCHCONNECTIONERROR',\r\n 'FILEFETCHFILEPATHNOTFOUND',\r\n 'FILEFETCHPERMISSIONLEVELERROR',\r\n 'FILEFORMATNOTSUPPORTED',\r\n 'FILESIZEEXCEEDED',\r\n 'FINALURLREQUIREDWHENUSINGTRACKINGURLTEMPLATEORURLCUSTOMPARAMETER',\r\n 'FOLDERHASASSETS',\r\n 'FOLDERHASSUBFOLDERS',\r\n 'FORMATVERSIONNOTSUPPORTED',\r\n 'FORMATVERSIONREQUIRED',\r\n 'FTPSETTINGSUSERNAMEINVALIDCHARACTERS',\r\n 'FTPSETTINGSUSERNAMETOOLONG',\r\n 'FTPSETTINGSUSERNAMETOOSHORT',\r\n 'FTPSETTINGUSERNAMEALREADYUSED',\r\n 'GENERATEIMAGESAIGCNORECOMMENDATION',\r\n 'GENERATEIMAGESAIGCNORECOMMENDATIONWITHBRAND',\r\n 'GENERATEIMAGESPROMPTCONTENTINVALID',\r\n 'GENERATEIMAGESPROMPTLENGTHINVALID',\r\n 'GENERATEIMAGESREQUESTCOUNTLIMITEXCEEDED',\r\n 'GENERATEIMAGESREQUESTCOUNTLIMITEXCEEDEDPERACCOUNT',\r\n 'GenerateImagesAIGCInvalidImageSize',\r\n 'GenerateImagesAIGCInvalidImageContent',\r\n 'GenerateImageAIGCInvalidUserPrompt',\r\n 'GenerateImageAIGCInvalidGeneratedImage',\r\n 'GENERATEIMAGESAIGCINVALIDIMAGESIZE',\r\n 'GENERATEIMAGESAIGCINVALIDIMAGECONTENT',\r\n 'GENERATEIMAGEAIGCINVALIDUSERPROMPT',\r\n 'GENERATEIMAGEAIGCINVALIDGENERATEDIMAGE',\r\n 'GOALWITHSAMENAMEALREADYEXISTSUNDERTAG',\r\n 'GOOGLEIMPORTCANNOTRETRIEVEREFRESHTOKEN',\r\n 'GOOGLEIMPORTCONTENTAPIINSUFFICIENTAUTHSCOPE',\r\n 'GOOGLESYNCACCOUNTNOTSETUP',\r\n 'GOOGLESYNCNOTADWORDSUSER',\r\n 'GOOGLESYNCOAUTHTOKENREVOKED',\r\n 'GOOGLESYNCTWOSTEPVERIFICATIONNOTENROLLED',\r\n 'GOOGLESYNCUSERISNOTAUTHORIZED',\r\n 'GOOGLESYNCUSERPERMISSIONDENIED',\r\n 'HOTELCENTERDEPRECATED',\r\n 'IFFUNCTIONAUDIENCESEXCEEDSMAXFIELDLENGTH',\r\n 'IFFUNCTIONCUSTOMERNOTINPILOT',\r\n 'IFFUNCTIONDUPLICATEAUDIENCES',\r\n 'IFFUNCTIONINVALIDAUDIENCE',\r\n 'IFFUNCTIONINVALIDSYNTAX',\r\n 'IFFUNCTIONNESTINGNOTALLOWED',\r\n 'IFFUNCTIONNUMAUDIENCESEXCEEDSMAXFORAD',\r\n 'IFFUNCTIONSOMEHAVEDEFAULTVALUEBUTNOTALL',\r\n 'IFFUNCTIONSPECIALCHARACTERSARENOTESCAPED',\r\n 'IFFUNCTIONSPECIALCHARACTERSNOTALLOWED',\r\n 'IMAGESLIMITEXCEEDEDPERACCOUNT',\r\n 'IMAGEDOESNTFITASPECTRATIO',\r\n 'IMPORTEXCEEDGOOGLESTORECOUNTLIMIT',\r\n 'IMPORTFEEDTYPENOTSUPPORTED',\r\n 'IMPORTINVALIDEXCELFILEFORMATHAVINGMULTIPLEWORKSHEETS',\r\n 'IMPORTINVALIDFILEFORMAT',\r\n 'IMPORTMARKETALREADYEXISTS',\r\n 'IMPORTSTATUSINVALID',\r\n 'INVALIDADEXTENSIONSTATUS',\r\n 'INVALIDAUDIENCEDESCRIPTION',\r\n 'INVALIDAUDIENCEID',\r\n 'INVALIDAUDIENCELOOKBACKWINDOW',\r\n 'INVALIDAUDIENCENAME',\r\n 'INVALIDCATEGORYFORGOALTYPE',\r\n 'INVALIDCHARACTERSINKEY',\r\n 'INVALIDCHARACTERSINVALUE',\r\n 'INVALIDCURRENCY',\r\n 'INVALIDDATETIMEFEEDITEMATTRIBUTEVALUE',\r\n 'INVALIDDURATION',\r\n 'INVALIDEMAILADDRESSERR',\r\n 'INVALIDENDDATEATTRIBUTEVALUE',\r\n 'INVALIDFEEDATTRIBUTE',\r\n 'INVALIDFEEDATTRIBUTETYPEINCOUNTDOWN',\r\n 'INVALIDFEEDFILENAMEERR',\r\n 'INVALIDFEEDITEMATTRIBUTEVALUE',\r\n 'INVALIDFEEDNAME',\r\n 'INVALIDFEEDNAMEERR',\r\n 'INVALIDFEEDUPLOADFILE',\r\n 'INVALIDFILTERLINKTEXTCHARACTER',\r\n 'INVALIDFOLDERNAME',\r\n 'INVALIDFUNCTIONFORMAT',\r\n 'INVALIDGEOGRAPHICALLOCATIONSEARCHSTRING',\r\n 'INVALIDGOALID',\r\n 'INVALIDGRIDDATAPARAMETERS',\r\n 'INVALIDID',\r\n 'INVALIDINT64FEEDITEMATTRIBUTEVALUE',\r\n 'INVALIDPAGEFEEDLABEL',\r\n 'INVALIDPAGEFEEDURL',\r\n 'INVALIDPRICEFEEDITEMATTRIBUTEVALUE',\r\n 'INVALIDPULLUSERNAMEERR',\r\n 'INVALIDSTARTDATEATTRIBUTEVALUE',\r\n 'INVALIDSTOREDESCRIPTIONERR',\r\n 'INVALIDTAG',\r\n 'INVALIDTAGDESCRIPTION',\r\n 'INVALIDTAGNAME',\r\n 'INVALIDTARGETADGROUPATTRIBUTEVALUE',\r\n 'INVALIDTARGETAUDIENCEIDATTRIBUTEVALUE',\r\n 'INVALIDTARGETCAMPAIGNATTRIBUTEVALUE',\r\n 'INVALIDTARGETKEYWORDTEXTATTRIBUTEVALUE',\r\n 'INVALIDURL',\r\n 'INVALIDURLFEEDITEMATTRIBUTEVALUE',\r\n 'INVALIDVALUE',\r\n 'ISWEBINSIGHTSENABLEDMISSING',\r\n 'KEYFEEDITEMATTRIBUTEVALUECONFLICTION',\r\n 'KEYWORDANDMATCHTYPECOMBINATIONALREADYEXISTS',\r\n 'KEYWORDIDINVALID',\r\n 'KEYWORDSUBSTITUTIONNOTSUPPORTED',\r\n 'LABELNAMEDUPLICATE',\r\n 'LANGUAGEMISMATCHUSERAD',\r\n 'LISTINGADGROUPNOTMATCHED',\r\n 'LOCATIONFUNCTIONINVALIDPARAMETERS',\r\n 'MAXADSLIMITEXCEEDED',\r\n 'MAXAUDIENCECRITERIONSPERACCOUNTLIMITREACHED',\r\n 'MAXAUDIENCESPERACCOUNTLIMITREACHED',\r\n 'MAXAUDIENCESPERCUSTOMERLIMITREACHED',\r\n 'MAXFEEDLIMITREACHEDERR',\r\n 'MAXINMARKETAUDIENCEEXCLUSIONPERACCOUNTLIMITREACHED',\r\n 'MAXLISTITEMLIMITEXCEEDEDFORLIST',\r\n 'MAXMMAADSLIMITREACHEDINADGROUP',\r\n 'MAXRSAADSLIMITREACHEDINADGROUP',\r\n 'MEDIAFORMATNOTSUPPORTED',\r\n 'MISSINGDELIMITERBETWEENFUNCTIONS',\r\n 'MISSINGLANDINGPAGEURLTAG',\r\n 'MOBILEFINALURLNOTALLOWEDWITHMOBILEDEVICEPREFERENCE',\r\n 'MULTIACCOUNTBULKUPLOADACCOUNTCOUNTEXCEEDED',\r\n 'MULTIACCOUNTUPLOADMISSINGFILENAME',\r\n 'MULTIACCOUNTUPLOADUNSUPPORTEDFILETYPE',\r\n 'NAMECOLLISION',\r\n 'NEGATIVEKEYWORDDUPLICATE',\r\n 'NEGATIVEKEYWORDHASINVALIDCHARS',\r\n 'NEGATIVEKEYWORDTOOLONG',\r\n 'NEGATIVESITECANNOTBEOWNEDOROPERATEDSITE',\r\n 'NEGATIVESITEURLEXCEEDMAXSUBDIRECTORIES',\r\n 'NEGATIVESITEURLEXCEEDMAXSUBDOMAINS',\r\n 'NEGATIVESITEURLINVALID',\r\n 'NEGATIVESITEURLTOOLONG',\r\n 'NESTEDPARAMETERINCUSTOMATTRIBUTENOTSUPPORTED',\r\n 'NOENOUGHCONVERSIONFORMAXCONVERSIONSBIDDINGSCHEME',\r\n 'NOENOUGHCONVERSIONFORTARGETCPABIDDINGSCHEME',\r\n 'OFFLINECONVERSIONADDITIONCOLUMNSNOTEXPECTEDINHEADER',\r\n 'OFFLINECONVERSIONADJUSTMENTCOLUMNSNOTEXPECTEDINHEADER',\r\n 'OFFLINECONVERSIONCOLUMNCONVERSIONCURRENCYNOTFOUND',\r\n 'OFFLINECONVERSIONCOLUMNCONVERSIONNAMENOTFOUND',\r\n 'OFFLINECONVERSIONCOLUMNCONVERSIONTIMENOTFOUND',\r\n 'OFFLINECONVERSIONCOLUMNCONVERSIONVALUENOTFOUND',\r\n 'OFFLINECONVERSIONCOLUMNMICROSOFTCLICKIDNOTFOUND',\r\n 'OFFLINECONVERSIONFILEFORMATINVALID',\r\n 'OFFLINECONVERSIONHEADERSROWNOTFOUND',\r\n 'OFFLINECONVERSIONTIMEZONEINVALID',\r\n 'OFFLINECONVERSIONUPLOADACCOUNTIDCOLUMNNOTFOUND',\r\n 'OFFLINECONVERSIONUPLOADFILESIZEEXCEEDED',\r\n 'OFFLINECONVERSIONUPLOADMULTIPLEFILESINZIPFILE',\r\n 'OFFLINECONVERSIONUPLOADZIPFILEEMPTY',\r\n 'ONLYONEACTIVENODEISALLOWED',\r\n 'PAGEFEEDLABELTOOLONG',\r\n 'PORTFOLIOBIDSTRATEGYIDINVALID',\r\n 'PORTFOLIOBIDSTRATEGYISASSOCIATEDWITHACTIVECAMPAIGNS',\r\n 'PROMOTIONCANNOTBEUPDATEDATCURRENTSTATE',\r\n 'PROMOTIONIDALREADYUSED',\r\n 'REQUESTFAILED',\r\n 'REQUESTIDINVALID',\r\n 'RESPONSIVESEARCHADDEFAULTTEXTREQUIREDFORKEYWORDPARAMETER', // Added from legacy error file\r\n 'RESPONSIVESEARCHADDESCRIPTIONSLESSTHANMINREQUIRED',\r\n 'RESPONSIVESEARCHADFINALURLDOMAINTOOLONG',\r\n 'RESPONSIVESEARCHADHEADLINESLESSTHANMINREQUIRED',\r\n 'RESPONSIVESEARCHADPATH1INVALID',\r\n 'RESPONSIVESEARCHADSBOTHCOUNTDOWNANDGLOBALCOUNTDOWN',\r\n 'RESPONSIVESEARCHADSDESCRIPTIONSLESSTHANMINREQUIRED',\r\n 'RESPONSIVESEARCHADSDUPLICATEHEADLINES',\r\n 'RESPONSIVESEARCHADSHEADLINESLESSTHANMINREQUIRED',\r\n 'RETURNPOLICYINVALIDURLERR',\r\n 'ROWCOUNTEXCEEDED',\r\n 'RSAADCUSTOMIZERATTRIBUTECOUNTMORETHANLIMIT',\r\n 'RSAADCUSTOMIZERATTRIBUTETYPECHANGEDINUPDATE',\r\n 'SCHEDULEDAYSNOTINDATERANGE',\r\n 'SHAREDENTITIESWITHACTIVEASSOCIATIONSCANNOTBEDELETED',\r\n 'SHAREDENTITYASSOCIATIONDOESNOTEXIST',\r\n 'SHAREDENTITYASSOCIATIONSBATCHLIMITEXCEEDED',\r\n 'SHAREDENTITYLIMITEXCEEDED',\r\n 'SHAREDENTITYNAMEINVALID',\r\n 'SHAREDLISTIDINVALID',\r\n 'SHAREDLISTITEMBATCHLIMITEXCEEDED',\r\n 'SHAREDLISTITEMIDSLIMITEXCEEDED',\r\n 'SHAREDLISTITEMNOTINLIST',\r\n 'SHIPPINGSETTINGSDUPLICATELABELNAMEUSED',\r\n 'SITELINKDESCRIPTION1INVALID',\r\n 'SITELINKDESCRIPTION1TOOLONG',\r\n 'SITELINKDESCRIPTION2INVALID',\r\n 'SITELINKDESCRIPTION2TOOLONG',\r\n 'SITELINKDESTINATIONURLNULLOREMPTY',\r\n 'SITELINKDISPLAYTEXTINVALID',\r\n 'SITELINKDISPLAYTEXTTOOLONG',\r\n 'SMARTPAGECONCURRENTUPDATINGISNOTALLOWED',\r\n 'SMARTPAGEGETFBPAGEOAUTHERROR',\r\n 'SMARTPAGEGETFBPAGEUSERERROR',\r\n 'SMARTPAGEINVALIDSTATUS',\r\n 'SMARTPAGEINVALIDSUBDOMAIN',\r\n 'SMARTPAGESUBDOMAINISNOTAVAILABLE',\r\n 'SMARTPAGEURLISREJECTEDBYEDITORIAL',\r\n 'STARTDATECOMESAFTERENDDATE',\r\n 'STOCKIMAGELIMITEXCEEDEDPERCUSTOMER', // Added from legacy error file\r\n 'STORENOTCOMPLIANTERR',\r\n 'STORENOTFOUNDERR',\r\n 'SYSTEMGENERATEDASSETNOTALLOWED',\r\n 'TAGWITHSAMENAMEALREADYEXISTSUNDERCUSTOMER',\r\n 'TARGETFEEDSTATUSINVALID',\r\n 'TASKSCHEDULINGINVALID',\r\n 'TOKENEXPIRED',\r\n 'TOOMANAYCUSTOMBIDSINADGROUP',\r\n 'TOOMANYADEXTENSIONSPERACCOUNT',\r\n 'TOOMANYCUSTOMBIDSINADGROUP',\r\n 'TOOMANYPAGEFEEDLABELS',\r\n 'TOOMANYVALUES',\r\n 'TOOMUCHDATAFORINLINEDOWNLOAD',\r\n 'TOOMUCHDATATODOWNLOAD',\r\n 'TOOMUCHEXCELDATATODOWNLOAD',\r\n 'UNKNOWNFUNCTION',\r\n 'URLNOTACCESSIBLE',\r\n 'VALUETOOLONG',\r\n 'VIDEOEXTENSIONINVALIDASPECTRATIO',\r\n 'VIDEOEXTENSIONINVALIDIMAGEFORMAT',\r\n 'VIDEOEXTENSIONINVALIDVIDEODURATION',\r\n 'VIDEOEXTENSIONINVALIDVIDEOID',\r\n 'VIDEOEXTENSIONTHUMBNAILTOOSMALL',\r\n 'VIDEOEXTENSIONVIDEOPROCESSINGFAILED',\r\n 'VIDEOEXTENSIONVIDEOTOOSMALL', // Added from legacy error file\r\n 'VIDEOOVERWEIGHT',\r\n 'WEBPAGECRITERIONALREADYEXISTS',\r\n 'GOALLEVELCANNOTBEDOWNGRADED',\r\n 'CUSTOMERNOTELIGIBLEFORENHANCEDCONVERSIONS',\r\n 'CONVERSIONEMAILADDRESSISNOTHASHED', // The conversion email address value is not hashed.\r\n 'CONVERSIONPHONENUMBERISNOTHASHED', // The conversion phone number value is not hashed.\r\n 'ONLINECONVERSIONHASHEDEMAILADDRESSNOTEXPECTED', // Invalid column HashedEmailAddress in online conversion file\r\n 'ONLINECONVERSIONHASHEDPHONENUMBERNOTEXPECTED', // Invalid column HashedPhoneNumber in online conversion file\r\n 'GOOGLEMYBUSINESSIMPORTUSERERROR',\r\n 'SHAREDLIBRARYUSERPERMISSIONDENIED',\r\n 'LOGOEXTENSIONLOGONOTSQUARE',\r\n 'IMAGEADEXTENSIONALTERNATIVETEXTINVALID',\r\n 'LANGUAGENOTSUPPORTED',\r\n 'ADEXTENSIONINVALIDENDTIME',\r\n 'IMAGEDOESNTMEETMINPIXELREQUIREMENTS',\r\n 'PERFORMANCETARGETTEMPLATENAMEDUPLICATE',\r\n];\r\n\r\n// specify campaign api error codes that represent user errors\r\nconst campaignApiErrorCodes = [\r\n 276, // EditorialError\r\n 9028, // AssetIsUsed\r\n 2512, // AdGroupIdInvalid\r\n 9017, // AssetDataInvalid\r\n 9021, // AssetDataInvalidWidth\r\n 9022, // AssetDataInvalidHeight\r\n 9023, // AssetDataInvalidAspect\r\n 9045, // InvalidDuration\r\n 9046, // VideoOverweight\r\n 35305, // ImageAdExtensionAlternativeTextInvalid\r\n 35307, // ImageAdExtensionDestinationUrlInvalid\r\n 35310, // InvalidImageExtensionDescription\r\n];\r\n\r\n// specify unsupported domains that result in failed requests\r\nconst invalidDomains = [\r\n 'www.googletagmanager.com',\r\n 'cdn.optimizely.com',\r\n 'tracker.marinsm.com',\r\n 'lptag.liveperson.net',\r\n];\r\n\r\nexport { odataErrorCodes, campaignApiErrorCodes, invalidDomains };\r\n\r\n","const azureUrls = ['ads.microsoft.com', 'ads-int.microsoft.com'];\r\nconst isAzureEnv = ({ hostname, protocol }) => protocol.toLowerCase().indexOf('https') === 0 &&\r\nazureUrls.some(url => hostname.toLowerCase().indexOf(url) > -1);\r\n\r\nexport function getODataPath(location) {\r\n return isAzureEnv(location) ? 'Campaign/V2' : 'Advertiser/V2';\r\n}\r\n\r\nexport function getConfig() {\r\n return {\r\n odataPath: getODataPath(window.location),\r\n };\r\n}\r\n","import _ from 'underscore';\r\nimport { aggregatedRowsPlugin } from '@bingads-webui/projection-grid-aggregated-rows';\r\n\r\nconst maxRowsBeforeShowOverallTotalsOnTop = 10;\r\n\r\nconst getRawConfig = (i18n, permissions, {\r\n showSearchRow = true,\r\n showAudienceRow = true,\r\n showNativeRow = true,\r\n showDeletedRow = true,\r\n showPmaxRow = false,\r\n showLinkedInRow = false,\r\n} = {}) => [{\r\n type: 'filtered',\r\n dataKey: '@ns.filtered.totals',\r\n number: '@odata.count',\r\n}, {\r\n type: 'waterfallFilter',\r\n dataKey: '@ns.filtered.totals',\r\n number: '@odata.count',\r\n}, {\r\n type: 'search',\r\n dataKey: '@ns.search.non.deleted.totals',\r\n text: i18n.getString('Summary_SearchTotal'),\r\n helpId: 'pop_BA_CampaignGrids_SearchTotal',\r\n ignore: !showSearchRow,\r\n}, {\r\n type: 'audience',\r\n dataKey: '@ns.audience.non.deleted.totals',\r\n text: i18n.getString('Summary_AudienceTotal'),\r\n helpId: 'pop_BA_CampaignGrids_AudienceTotal',\r\n ignore: !showAudienceRow || !(permissions.IsAIMCampaignEnabled ||\r\n (permissions.IsNativeAdsAllowed && permissions.IsNativeAdsRebrandingEnabled)),\r\n}, {\r\n type: 'pmax',\r\n dataKey: '@ns.pmax.non.deleted.totals',\r\n text: i18n.getString('Summary_PMaxTotal'),\r\n // helpId: 'pop_BA_CampaignGrids_PMaxTotal', // TODO: waiting for help id\r\n ignore: !showPmaxRow || !(permissions.dynamic.PerformanceMaxCampaigns && permissions.dynamic.PerformanceMaxCampaignsPhaseTwoCrossNetwork),\r\n}, {\r\n type: 'native',\r\n dataKey: '@ns.native.non.deleted.totals',\r\n text: i18n.getString('Summary_NativeTotal'),\r\n ignore: !showNativeRow || !permissions.IsNativeAdsAllowed\r\n || permissions.IsNativeAdsRebrandingEnabled,\r\n}, {\r\n type: 'linkedin',\r\n dataKey: '@ns.linkedin.non.deleted.totals',\r\n text: i18n.getString('Summary_LinkedInTotal'),\r\n helpId: 'pop_BA_LinkedIn_AdsTotal',\r\n ignore: !showLinkedInRow || !_.get(permissions, 'dynamic.LinkedInCampaigns', false),\r\n}, {\r\n type: 'deleted',\r\n dataKey: '@ns.deleted.totals',\r\n text: i18n.getString('Summary_DeletedTotal'),\r\n helpId: 'pop_BA_CampaignGrids_DeletedTotal',\r\n ignore: !showDeletedRow,\r\n}, {\r\n type: 'unknownDevices',\r\n dataKey: '@ns.unknown.totals',\r\n}, {\r\n type: 'other',\r\n dataKey: '@ns.other.totals',\r\n}, {\r\n type: 'overall',\r\n dataKey: '@ns.unfiltered.totals',\r\n number: '@ns.unfiltered.count',\r\n}];\r\n\r\nfunction getTotalRow(rawData, {\r\n type, dataKey, text, helpId, ignore,\r\n}) {\r\n const data = rawData && rawData[dataKey];\r\n if (_.isUndefined(text)) {\r\n return null;\r\n }\r\n\r\n return !ignore ? {\r\n item: _.defaults({\r\n $total: { type, text, helpId },\r\n }, data),\r\n classes: `${type}-total-row`,\r\n type: `${type}-total-row`,\r\n } : null;\r\n}\r\n\r\nfunction cookRawConfig(config, rawData = {}, keys, i18n, helpIds) {\r\n return _.map(config, (cfg) => {\r\n const i18nKey = `${cfg.type}I18nKey`;\r\n const helpIdKey = `${cfg.type}HelpId`;\r\n if (cfg.number) {\r\n return _.defaults({\r\n text: (keys[i18nKey] && rawData[cfg.number] !== undefined) ? i18n.getString(keys[i18nKey], {\r\n number: i18n.formatDecimalToInteger(rawData[cfg.number]),\r\n }) : null,\r\n helpId: helpIds ? helpIds[helpIdKey] : cfg.helpId,\r\n }, cfg);\r\n }\r\n\r\n return _.has(keys, i18nKey)\r\n ? _.defaults({\r\n text: i18n.getString(keys[i18nKey]),\r\n helpId: helpIds ? helpIds[helpIdKey] : cfg.helpId,\r\n }, cfg)\r\n : cfg;\r\n });\r\n}\r\n\r\nfunction hasOnlyDataSourceFilters(filterService) {\r\n if (filterService &&\r\n _.isFunction(filterService.getCombinedFilter) &&\r\n _.isFunction(filterService.getDataSourceFilter)) {\r\n const combinedFilter = filterService.getCombinedFilter();\r\n const dataSourceFilter = _.result(filterService.getDataSourceFilter(), 'value', {});\r\n\r\n // All filter entities are data source filters\r\n if (!_.isNull(combinedFilter) && _.isEqual(combinedFilter.query, dataSourceFilter.query)) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n}\r\n\r\n// {query: {Status: {$in: null}}} means no quick filter applied. We need to get rid of it.\r\n// TODO: This is a tempory solution, Siming to remove this type of filter.\r\nfunction isEmptyFilter(combinedFilter) {\r\n if (!combinedFilter\r\n || !combinedFilter.depth\r\n || combinedFilter.depth === 0) {\r\n return true;\r\n }\r\n\r\n if (combinedFilter.depth === 1) {\r\n if (!combinedFilter.query) {\r\n return true;\r\n }\r\n\r\n if (!combinedFilter.query.Status\r\n || !_.isEmpty(combinedFilter.query.Status.$in)) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\nexport function aggregatedRowsPluginBuilder({\r\n keys,\r\n i18n,\r\n helpIds,\r\n permissions,\r\n filterService,\r\n customConfig,\r\n processBuilderConfig = cfg => cfg,\r\n processPluginConfig = cfg => cfg,\r\n}) {\r\n const rawConfig = processBuilderConfig(getRawConfig(i18n, permissions, customConfig));\r\n const getUIFilters = () => {\r\n if (hasOnlyDataSourceFilters(filterService)) {\r\n return null; // We do not show data source filter entities on UI\r\n }\r\n\r\n if (filterService && _.isFunction(filterService.getCombinedFilter)) {\r\n const combinedFilter = filterService.getCombinedFilter();\r\n return isEmptyFilter(combinedFilter) ? null : combinedFilter.query;\r\n }\r\n\r\n return null;\r\n };\r\n\r\n // we show waterfall filter when waterfall filter is the only filter applied\r\n const showWaterFallFilterTotal = () => {\r\n if (!filterService) {\r\n return false;\r\n }\r\n\r\n const qFilter = filterService.getQuickFilter();\r\n\r\n // if there is any other type of filter, we should not show waterfall filter total.\r\n const combinedFilter = filterService.getCombinedFilter();\r\n\r\n return !_.isNull(qFilter) && !_.isNull(combinedFilter)\r\n && !_.isEmpty(qFilter.value.query) && _.isEqual(\r\n qFilter.value.query,\r\n combinedFilter ? combinedFilter.query : null\r\n );\r\n };\r\n\r\n return aggregatedRowsPlugin(processPluginConfig({\r\n top: {\r\n getRows: (items, { view }) => {\r\n const { rawData } = view.dataSource;\r\n\r\n if (!rawData ||\r\n !_.isArray(rawData.value) ||\r\n rawData.value.length <= maxRowsBeforeShowOverallTotalsOnTop) {\r\n return null;\r\n }\r\n\r\n let type = 'overall';\r\n\r\n if (!_.isEmpty(getUIFilters())) {\r\n if (showWaterFallFilterTotal()) {\r\n type = 'waterfallFilter';\r\n } else {\r\n type = 'filtered';\r\n }\r\n }\r\n\r\n const topConfig = _.find(rawConfig, cfg => cfg.type === type);\r\n if (topConfig != null) {\r\n const cookedConfig = cookRawConfig([topConfig], rawData, keys, i18n, helpIds);\r\n\r\n return [getTotalRow(rawData, cookedConfig[0])];\r\n }\r\n return null;\r\n },\r\n appendToHeader: true,\r\n },\r\n bottom: {\r\n getRows: (items, { view }) => {\r\n const { rawData } = view.dataSource;\r\n if (_.isUndefined(rawData)) {\r\n return null;\r\n }\r\n let cookedConfig = cookRawConfig(rawConfig, rawData, keys, i18n, helpIds);\r\n\r\n if (!showWaterFallFilterTotal()) {\r\n cookedConfig = _.reject(cookedConfig, config => config.type === 'waterfallFilter');\r\n }\r\n\r\n if ((filterService && _.isEmpty(getUIFilters())) || showWaterFallFilterTotal()) {\r\n cookedConfig = _.reject(cookedConfig, config => config.type === 'filtered');\r\n }\r\n\r\n return _.chain(cookedConfig)\r\n .map(config => getTotalRow(rawData, config))\r\n .compact()\r\n .value();\r\n },\r\n },\r\n }));\r\n}\r\n","import pgrid from 'projection-grid';\r\nimport _ from 'underscore';\r\nimport { PageReady } from '@bingads-webui/page-ready';\r\n\r\nconst { version } = pgrid;\r\n\r\n// Only log the navigation timing info for first grid data load for Grid performance measurement\r\n// during page load.\r\nlet isInitialGridDataLoad = true;\r\nlet isPageReadyFulfilled = false;\r\n\r\nfunction logMessage({ api, message, logger }) {\r\n logger.logMessage(['ClientPerf'], {\r\n name: 'Info',\r\n value: 0,\r\n }, api, message);\r\n}\r\n\r\nPageReady.afterPageReady().then(() => {\r\n isPageReadyFulfilled = true;\r\n});\r\n\r\nfunction logPerformanceInfo({\r\n name,\r\n gridView,\r\n virtualized,\r\n logNavTiming = false,\r\n track,\r\n logger,\r\n appConfig,\r\n}) {\r\n const timeStarted = performance.now();\r\n const activeTimeBeforeStarted = _.result(performance, 'activeTime', NaN);\r\n const { id } = track;\r\n\r\n logger.logConsoleStamp(`Grid Start: ${name} - ${timeStarted}`);\r\n\r\n gridView.once('didReload', (isSuccess) => {\r\n if (isSuccess && id === track.id) {\r\n const timeFetched = performance.now();\r\n const activeTimeBeforeFetched = _.result(performance, 'activeTime', NaN);\r\n\r\n logger.logConsoleStamp(`Grid Data Fetched: ${name} - ${timeFetched}`);\r\n\r\n gridView.once('didRedraw', () => {\r\n if (id === track.id) {\r\n // In case the document is hidden, the redraw could be delayed by browser optimization.\r\n // Drop the log in this case.\r\n const timeRendered = performance.now();\r\n const activeTimeBeforeRendered = _.result(performance, 'activeTime', NaN);\r\n\r\n logger.logConsoleStamp(`Grid Rendered: ${name} - ${timeRendered}`);\r\n\r\n const landingPageUrl = appConfig.get('LandingPageUrl') || '';\r\n\r\n logMessage({\r\n api: name,\r\n message: JSON.stringify(_.defaults({\r\n Version: `projection-grid@${version}`,\r\n GridName: name,\r\n IsPageReadyFulfilled: isPageReadyFulfilled,\r\n IsVirtualized: virtualized,\r\n TotalRows: gridView.countRows,\r\n TotalServerSideRows: gridView.totalCountRows,\r\n // For the visible rows, do not count the tr.top-filler and tr.bottom-filler\r\n TotalVisibleRows: gridView.$('tbody > tr:visible').length - 2,\r\n TotalColumns: gridView.$('table').last().find('colgroup > col').length,\r\n DataFetchStartTime: timeStarted,\r\n DataFetchStartActiveTime: activeTimeBeforeStarted,\r\n DataFetchingTime: timeFetched - timeStarted,\r\n DataFetchingActiveTime: activeTimeBeforeFetched - activeTimeBeforeStarted,\r\n GridRenderingTime: timeRendered - timeFetched,\r\n GridRenderingActiveTime: activeTimeBeforeRendered - activeTimeBeforeFetched,\r\n }, logNavTiming ? { // Add navigation timing info to indicate this is first Grid load\r\n PageNavStartTime: performance.timing.navigationStart,\r\n PageFetchStartTime: performance.timing.fetchStart,\r\n LandingPageUrl: landingPageUrl,\r\n } : {})),\r\n logger,\r\n });\r\n }\r\n });\r\n }\r\n });\r\n}\r\n\r\nexport const performanceLogPlugin = definePlugin => definePlugin('performance-log', [\r\n 'config',\r\n 'gridView',\r\n], ({\r\n scrolling: {\r\n virtualized = false,\r\n } = {},\r\n name,\r\n plugins,\r\n}, gridView) => {\r\n const track = {};\r\n const { appConfig, logger } = plugins.performanceLog;\r\n\r\n gridView.on('willReload', () => {\r\n track.id = _.uniqueId('log-track-');\r\n\r\n logPerformanceInfo({\r\n name,\r\n virtualized,\r\n gridView,\r\n logNavTiming: isInitialGridDataLoad,\r\n track,\r\n appConfig,\r\n logger,\r\n });\r\n\r\n isInitialGridDataLoad = false;\r\n });\r\n});\r\n","import pgrid from 'projection-grid';\r\nimport _ from 'underscore';\r\nimport { PageReady } from '@bingads-webui/page-ready';\r\n\r\nconst { version } = pgrid;\r\n\r\n// Only log the navigation timing info for first grid data load for Grid performance measurement\r\n// during page load.\r\nlet isInitialGridDataLoad = true;\r\nlet isPageReadyFulfilled = false;\r\n\r\nPageReady.afterPageReady().then(() => {\r\n isPageReadyFulfilled = true;\r\n});\r\n\r\nfunction logPerformanceInfo({\r\n name,\r\n gridView,\r\n virtualized,\r\n logNavTiming = false,\r\n track,\r\n marker,\r\n appConfig,\r\n parentMarker,\r\n}) {\r\n const { id } = track;\r\n marker.willFetchData();\r\n if (parentMarker) {\r\n parentMarker.willFetchData();\r\n }\r\n\r\n gridView.once('didReload', (isSuccess) => {\r\n if (isSuccess && id === track.id) {\r\n marker.willRender();\r\n if (parentMarker) {\r\n parentMarker.willRender();\r\n }\r\n\r\n gridView.once('didRedraw', () => {\r\n if (id === track.id) {\r\n marker.done(JSON.stringify(_.defaults({\r\n Version: `projection-grid@${version}`,\r\n GridName: name,\r\n IsPageReadyFulfilled: isPageReadyFulfilled,\r\n IsVirtualized: virtualized,\r\n TotalRows: gridView.countRows,\r\n TotalServerSideRows: gridView.totalCountRows,\r\n // For the visible rows, do not count the tr.top-filler and tr.bottom-filler\r\n TotalVisibleRows: gridView.$('tbody > tr:visible').length - 2,\r\n TotalColumns: gridView.$('table').last().find('colgroup > col').length,\r\n }, logNavTiming ? { // Add navigation timing info to indicate this is first Grid load\r\n PageNavStartTime: performance.timing.navigationStart,\r\n PageFetchStartTime: performance.timing.fetchStart,\r\n LandingPageUrl: appConfig.get('LandingPageUrl') || '',\r\n } : {})));\r\n }\r\n });\r\n }\r\n });\r\n}\r\n\r\nexport const perfMarkerPlugin = definePlugin => definePlugin('perfMarker', [\r\n 'config',\r\n 'gridView',\r\n], ({\r\n scrolling: {\r\n virtualized = false,\r\n } = {},\r\n name,\r\n plugins,\r\n} = {}, gridView) => {\r\n const track = {};\r\n const { appConfig, marker, gridMarker } = plugins.perfMarker;\r\n\r\n if (!marker && !gridMarker) {\r\n return;\r\n }\r\n\r\n let pgridMarker = null;\r\n\r\n // If grid has passed a marker then use it.\r\n // Grid component has to call 'willInit'.\r\n if (gridMarker) {\r\n pgridMarker = gridMarker;\r\n } else {\r\n pgridMarker = marker.createChild(`pgrid-${name}-load`);\r\n pgridMarker.willInit();\r\n }\r\n\r\n gridView.on('willReload', () => {\r\n track.id = _.uniqueId('log-track-');\r\n\r\n // If grid marker is already marked done\r\n // then it means this grid load is from some action on grid\r\n // actions like, sort, filter, column selection etc.\r\n // Create a new marker under parent in that case to capture user action.\r\n if (pgridMarker && pgridMarker.isDone === true && pgridMarker.parentMarker) {\r\n pgridMarker = pgridMarker.parentMarker.createChild(`pgrid-${name}-action`);\r\n pgridMarker.willInit();\r\n }\r\n\r\n logPerformanceInfo({\r\n name,\r\n virtualized,\r\n gridView,\r\n logNavTiming: isInitialGridDataLoad,\r\n track,\r\n appConfig,\r\n marker: pgridMarker,\r\n parentMarker: pgridMarker.parentMarker,\r\n });\r\n\r\n isInitialGridDataLoad = false;\r\n });\r\n});\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\n\r\nexport class PreferencesSubadapter {\r\n constructor({\r\n preferenceService,\r\n Resource = null,\r\n prefix = '',\r\n serialize = _.identity,\r\n deserialize = _.identity,\r\n }) {\r\n this.preferenceService = preferenceService;\r\n this.prefix = _.isString(prefix) ? () => prefix : prefix;\r\n this.serialize = serialize;\r\n this.deserialize = deserialize;\r\n if (_.some([\r\n this.prefix,\r\n this.serialize,\r\n this.deserialize,\r\n ], _.negate(_.isFunction))) {\r\n throw new Error('Invalid arguments');\r\n }\r\n this.Resource = Resource;\r\n }\r\n\r\n create(attrs) {\r\n const data = this.serialize(attrs);\r\n\r\n return this.preferenceService\r\n .then(preferences => preferences.set(data, null, null))\r\n .then(({ Id }) => _.defaults({ id: Id }, attrs));\r\n }\r\n\r\n find(id) {\r\n return this.preferenceService.then(preferences => preferences.find(id));\r\n }\r\n\r\n findAll(params) {\r\n const prefix = this.prefix(params);\r\n\r\n return this.preferenceService\r\n .then(preferences => preferences.findByPrefix(prefix))\r\n .map(this.deserialize);\r\n }\r\n\r\n update(id, attrs) {\r\n const entity = _.defaults({}, attrs, this.Resource.get(id));\r\n const data = this.serialize(entity);\r\n\r\n return this.preferenceService\r\n .then(preferences => preferences.set(data, id, null))\r\n .thenReturn(entity);\r\n }\r\n\r\n destroy(id) {\r\n return this.preferenceService.then(preferences => preferences.del(id, null));\r\n }\r\n\r\n destroyAll() {\r\n return Promise.reject(new Error('Not implemented'));\r\n }\r\n}\r\n\r\n","import _ from 'underscore';\r\nimport { FilterStorageType, removeQueryByColumnId } from '@bingads-webui/filter-commons';\r\nimport { appendPeriodOverPeriodProperties } from '@bingads-webui-campaign/common-grid-config';\r\nimport { isValidForFeature } from '@bingads-webui/custom-columns-shared-config';\r\n\r\nlet filterService;\r\nlet safeGetString;\r\nlet permissions;\r\n\r\nexport function initialize(config) {\r\n ({ filterService, safeGetString, permissions } = config);\r\n}\r\n\r\nexport const customColumnOperations = {\r\n add: 'add',\r\n edit: 'edit',\r\n remove: 'remove',\r\n};\r\n\r\nexport function updateFilterSchemaForCustomColumns(customColumnData, op) {\r\n const { entitySchema, odataOptions } = filterService;\r\n\r\n if (!entitySchema || !entitySchema.properties || !odataOptions || !odataOptions.fieldMap) {\r\n return;\r\n }\r\n\r\n const {\r\n id, name, columnFormat, expression,\r\n } = customColumnData;\r\n let { properties } = entitySchema;\r\n const { name: schemaName } = entitySchema;\r\n const { fieldMap } = odataOptions;\r\n const customColumnId = `CustomColumn${id}`;\r\n const performanceMetricsCustomColumnId = `PerformanceMetrics/${customColumnId}`;\r\n const popCustomColumnId = `PoP${customColumnId}`;\r\n const popCustomColumnChangeId = `PoP${customColumnId}Change`;\r\n const popCustomColumnChangePercentId = `PoP${customColumnId}ChangePercent`;\r\n const idList = [customColumnId, popCustomColumnId, popCustomColumnChangeId,\r\n popCustomColumnChangePercentId];\r\n\r\n if (op === customColumnOperations.add) {\r\n if (!properties[customColumnId]) {\r\n properties[customColumnId] = {\r\n filterable: true,\r\n format: columnFormat,\r\n id,\r\n isPercentValue: columnFormat === 'Percentage',\r\n name: performanceMetricsCustomColumnId,\r\n nullable: true,\r\n originalProperty: customColumnId,\r\n property: performanceMetricsCustomColumnId,\r\n required: true,\r\n title: name,\r\n type: 'number',\r\n isInvalidProperty: !isValidForFeature({\r\n schemaName,\r\n expression,\r\n permissions,\r\n }),\r\n };\r\n\r\n const tempEntitySchema = { properties: {} };\r\n tempEntitySchema.properties[customColumnId] = { ...properties[customColumnId] };\r\n appendPeriodOverPeriodProperties(tempEntitySchema);\r\n properties = _.defaults(properties, tempEntitySchema.properties);\r\n\r\n _.each(idList, (propertyId) => {\r\n fieldMap[propertyId] = properties[propertyId].property;\r\n });\r\n }\r\n } else if (op === customColumnOperations.edit) {\r\n let tempObject;\r\n\r\n if (properties[customColumnId]) {\r\n tempObject = properties[customColumnId];\r\n tempObject.title = name;\r\n tempObject.format = columnFormat;\r\n tempObject.isPercentValue = columnFormat === 'Percentage';\r\n tempObject.isInvalidProperty = !isValidForFeature({\r\n schemaName,\r\n expression,\r\n permissions,\r\n });\r\n }\r\n\r\n if (properties[popCustomColumnId]) {\r\n tempObject = properties[popCustomColumnId];\r\n tempObject.title = safeGetString('ColumnName_CustomColumn_Compare').replace('{0}', name);\r\n tempObject.format = columnFormat;\r\n tempObject.isPercentValue = columnFormat === 'Percentage';\r\n }\r\n\r\n if (properties[popCustomColumnChangeId]) {\r\n tempObject = properties[popCustomColumnChangeId];\r\n tempObject.title = safeGetString('ColumnName_CustomColumn_Change').replace('{0}', name);\r\n tempObject.format = columnFormat;\r\n tempObject.isPercentValue = columnFormat === 'Percentage';\r\n }\r\n\r\n if (properties[popCustomColumnChangePercentId]) {\r\n tempObject = properties[popCustomColumnChangePercentId];\r\n tempObject.title = safeGetString('ColumnName_CustomColumn_Change_Percentage').replace('{0}', name);\r\n }\r\n } else if (op === customColumnOperations.remove) {\r\n _.each(idList, (propertyId) => {\r\n if (properties[propertyId]) {\r\n delete properties[propertyId];\r\n }\r\n\r\n if (fieldMap[propertyId]) {\r\n delete fieldMap[propertyId];\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction removeAllQueriesInEditableFilter(editableFilter, columnId) {\r\n const changed = removeQueryByColumnId(editableFilter.query, columnId, true);\r\n\r\n if (changed) {\r\n const filterToSet = _.isEmpty(editableFilter.query) ? {} : editableFilter;\r\n\r\n filterService.setEditableFilter(filterToSet);\r\n }\r\n}\r\n\r\nfunction removeAllQueriesInSavedFilter(columnId) {\r\n filterService.getSavedFilters().then((savedFilters) => {\r\n _.each(savedFilters, (filter) => {\r\n const { query, name } = filter;\r\n const changed = removeQueryByColumnId(query, columnId, true);\r\n\r\n if (changed && _.isEmpty(query)) {\r\n filterService.deleteSavedFilter({\r\n name,\r\n }, FilterStorageType.EditableFilter);\r\n filterService.deleteSavedFilter({\r\n name,\r\n }, FilterStorageType.SelectableFilter);\r\n filterService.trigger('remove-saved-filter-name', name);\r\n } else if (changed) {\r\n const updateAppliedFilter = JSON.stringify(filterService.editableFilter.query)\r\n .indexOf(columnId) >= 0;\r\n\r\n filterService.addUpdateSavedFilter(\r\n query,\r\n name,\r\n FilterStorageType.EditableFilter,\r\n updateAppliedFilter\r\n );\r\n }\r\n });\r\n });\r\n}\r\n\r\nexport function cleanUpCustomColumnFilter(columnId) {\r\n const editableFilter = filterService.getEditableFilter();\r\n\r\n if (editableFilter) {\r\n removeAllQueriesInEditableFilter(editableFilter, columnId);\r\n }\r\n\r\n removeAllQueriesInSavedFilter(columnId);\r\n}\r\n","import Backbone from 'backbone';\r\nimport template from './prompt-text-view.pug';\r\n\r\nexport class TextView extends Backbone.View {\r\n initialize({\r\n texts,\r\n customClass = '',\r\n }) {\r\n this.texts = texts;\r\n this.customClass = customClass;\r\n }\r\n\r\n render() {\r\n this.$el.html(template({\r\n texts: this.texts,\r\n customClass: this.customClass,\r\n }));\r\n return this;\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport Backbone from 'backbone';\r\nimport $ from 'jquery';\r\nimport { startsWith } from 'underscore.string';\r\nimport Promise from 'bluebird';\r\nimport {\r\n customColumnGridKeyFromId,\r\n parseIdFromGridKey,\r\n getCustomColumnPreferenceName,\r\n ODATA_PREFIX,\r\n} from '@bingads-webui-universal/custom-column-utils';\r\nimport { Dialog } from '@bingads-webui/dialog';\r\nimport { ColumnChooser } from '@bingads-webui/column-chooser';\r\nimport { ColumnChooserEditablePicker } from '@bingads-webui/column-chooser-editable-picker';\r\nimport { CustomColumn } from '@bingads-webui/projection-grid-custom-column';\r\nimport { initializePop } from '@bingads-webui-campaign/common-grid-config';\r\nimport { isValidForFeature } from '@bingads-webui/custom-columns-shared-config';\r\nimport { notificationApi } from '@bingads-webui-react/notification-center';\r\nimport { buildColumnConversions } from '@bingads-webui-campaign/column-conversions';\r\nimport { normalizeConfig } from './config';\r\nimport { TextView } from './prompt-text-view';\r\nimport {\r\n initialize as initializeUpdateFilterForCustomColumn,\r\n customColumnOperations,\r\n updateFilterSchemaForCustomColumns,\r\n cleanUpCustomColumnFilter,\r\n} from './update-filter-for-custom-column';\r\n\r\nconst dropdownId = 'dropdown-column-chooser';\r\nconst saveListId = 'dropdown-radio-group-saved-columns';\r\n\r\nclass ColumnChooserAgent {\r\n constructor() {\r\n _.extend(this, Backbone.Events);\r\n this.recordRemoveEventName = 'saved-record-removed';\r\n this.recordSaveEventName = 'new-record-saved';\r\n this.recordChangeEventName = 'selected-record-changed';\r\n this.selectColumnsChangedEventName = 'selected-columns-changed';\r\n }\r\n\r\n triggerSelectedColumnsChangedEvent(names) {\r\n this.trigger(this.selectColumnsChangedEventName, names);\r\n }\r\n\r\n triggerSelectedRecordChangedEvent() {\r\n this.trigger(this.recordChangeEventName);\r\n }\r\n\r\n triggerRecordRemovedEvent() {\r\n this.trigger(this.recordRemoveEventName);\r\n }\r\n\r\n triggerRecordSavedEvent() {\r\n this.trigger(this.recordSaveEventName);\r\n }\r\n\r\n onSelectedRecordChanged(callback) {\r\n this.on(this.recordChangeEventName, callback);\r\n }\r\n\r\n onRecordRemoved(callback) {\r\n this.on(this.recordRemoveEventName, callback);\r\n }\r\n\r\n onRecordSaved(callback) {\r\n this.on(this.recordSaveEventName, callback);\r\n }\r\n\r\n onSelectedColumnsChanged(callback) {\r\n this.on(this.selectColumnsChangedEventName, callback);\r\n }\r\n}\r\n\r\nexport const columnChooserPlugin = definePlugin => definePlugin('columnChooser', [\r\n 'config',\r\n 'gridView',\r\n 'toolbar',\r\n], (config, gridView, toolbar) => {\r\n const columnChooserAgent = new ColumnChooserAgent();\r\n let columnChooser = null;\r\n let customColumnPanel = null;\r\n let customColumnService = null;\r\n let filterService = null;\r\n let entitySchemaName = null;\r\n let columnChooserEditablePicker = null;\r\n\r\n const permissions = config.config && _.isFunction(config.config.get) ? config.config.get('Permissions') : {};\r\n const { dynamic = {} } = permissions || {};\r\n const { ColumnConversion: IsColumnConversionEnabled } = dynamic;\r\n\r\n const pluginConfig = normalizeConfig(config);\r\n const {\r\n categories, customColumnConfig, columnProcessorBeforeSetRecord, enableRSAAdCustomizer,\r\n } = pluginConfig;\r\n const isCustomColumnEnabled = customColumnConfig && customColumnConfig.enabled;\r\n const safeGetString = key => (pluginConfig.i18n.getString(key) || key);\r\n const toolbarEditor = pluginConfig.toolbar ||\r\n toolbar.gridToolbarGroup.toolbarWithItem(dropdownId);\r\n const query = {\r\n project: 'CampaignUI',\r\n grid: config.name,\r\n };\r\n let adCustomizerAttributeColumns = [];\r\n let applyColumnConversions;\r\n if (IsColumnConversionEnabled) {\r\n ({ applyColumnConversions } = buildColumnConversions(pluginConfig.columnConversions));\r\n }\r\n\r\n if (isCustomColumnEnabled) {\r\n ({ filterService } = customColumnConfig);\r\n entitySchemaName = filterService.entitySchema.name;\r\n initializePop({ i18n: pluginConfig.i18n });\r\n initializeUpdateFilterForCustomColumn({ filterService, safeGetString, permissions });\r\n }\r\n\r\n function getSelectedColumns() {\r\n return _.map(gridView.get('columns'), _.property('name'));\r\n }\r\n\r\n function updateGridConfig() {\r\n const queryParams = gridView.get('query');\r\n const { entitySet } = queryParams.options;\r\n const action = entitySet.navigation.source;\r\n const existingGridDataParameters = entitySet.navigation.parameters.gridDataParameters || {};\r\n const gridDataParameters = _.defaults({\r\n CustomColumns: undefined,\r\n }, existingGridDataParameters);\r\n const parameters = _.defaults({ gridDataParameters }, entitySet.navigation.parameters);\r\n\r\n return _.defaults({\r\n options: _.defaults({\r\n entitySet: action.$call(parameters),\r\n }, queryParams.options),\r\n }, queryParams);\r\n }\r\n\r\n function setSelectedColumns(names) {\r\n const {\r\n columns,\r\n locked,\r\n patchQuery,\r\n mandatoryProperties,\r\n } = pluginConfig;\r\n const patch = {};\r\n let customColumns;\r\n\r\n if (isCustomColumnEnabled && customColumnService) {\r\n customColumns = customColumnService.getAll();\r\n\r\n _.each(customColumns, (columnInfo) => {\r\n columns[customColumnGridKeyFromId(columnInfo.id)] = new CustomColumn(_.defaults({\r\n i18n: pluginConfig.i18n,\r\n }, columnInfo)).toJSON();\r\n });\r\n }\r\n\r\n if (enableRSAAdCustomizer && permissions.IsRSAAdCustomizerEnabled) {\r\n _.each(adCustomizerAttributeColumns, (columnInfo) => {\r\n if (columnInfo && columnInfo.Id) {\r\n columns[`AdCustomizerAttributes${columnInfo.Id}`] =\r\n new pluginConfig.RSAAdCustomizerAttributeColumn(_.defaults({\r\n gridView,\r\n resource: pluginConfig.resource,\r\n i18n: pluginConfig.i18n,\r\n i18nErrors: pluginConfig.i18nErrors,\r\n gridType: entitySchemaName,\r\n permissions,\r\n }, columnInfo)).toJSON();\r\n }\r\n });\r\n }\r\n\r\n const validNames = _.chain(locked)\r\n .concat(names)\r\n .filter(name => _.has(columns, name))\r\n .uniq()\r\n .value();\r\n\r\n patch.columns = _.map(validNames, name => _.defaults({ name }, columns[name]));\r\n\r\n if (patchQuery && !config.isDataFetchManagerSource) {\r\n let select = _.chain(validNames).reduce((memo, name) => {\r\n const column = columns[name];\r\n const property = column && (column.property || column.name);\r\n const key = (_.isString(property) && property) ||\r\n (_.isObject(property) && property.key);\r\n\r\n if (_.isArray(key)) {\r\n Array.prototype.push.apply(memo, key);\r\n } else if (key) {\r\n memo.push(key);\r\n }\r\n\r\n return memo;\r\n }, []).union(mandatoryProperties).value();\r\n\r\n let patchCustomColumns = {};\r\n\r\n if (isCustomColumnEnabled && !_.isEmpty(customColumns)) {\r\n const selectedCustomColumnNames = _.filter(validNames, name =>\r\n startsWith(name, ODATA_PREFIX));\r\n const selectedCustomColumns = _.filter(customColumns, column =>\r\n _.contains(selectedCustomColumnNames, customColumnGridKeyFromId(column.id)));\r\n\r\n patchCustomColumns = updateGridConfig(selectedCustomColumns);\r\n }\r\n\r\n select = select.concat(config.customerHierarchyExtras || []);\r\n\r\n patch.query = _.defaults(\r\n { select },\r\n patchCustomColumns,\r\n patch.query || {}\r\n );\r\n }\r\n\r\n if (isCustomColumnEnabled && !_.isEmpty(customColumns)) {\r\n gridView.set(patch);\r\n } else {\r\n gridView.patch(patch);\r\n }\r\n\r\n if (config.isDataFetchManagerSource) {\r\n gridView.refresh(true);\r\n }\r\n\r\n gridView.trigger('columnChanged', { columnNames: validNames });\r\n\r\n // This is a workaround for the column alignment issue on IE & Edge\r\n // After redrawing the table with new column set, IE & Edge doesn't relayout\r\n // the table correctly. We need to detach and attach the table element after render.\r\n // we can remove this after Chromium-base Edge become the default version\r\n gridView.once('didRedraw', () => {\r\n const elTable = gridView.$('table, .table').get(-1);\r\n const $table = $(elTable);\r\n const $parent = $(elTable.parentElement);\r\n\r\n if (elTable) {\r\n $table.detach();\r\n $table.appendTo($parent);\r\n }\r\n });\r\n\r\n columnChooserAgent.triggerSelectedColumnsChangedEvent(names);\r\n }\r\n\r\n const dynamicCustomColumnsSetup = resolveSetup =>\r\n Promise.all([\r\n import(/* webpackMode: 'eager' */'@bingads-webui-campaign/custom-column-backbone-wrapper'),\r\n import(/* webpackMode: 'eager' */'@bingads-webui/custom-column-service-wrapper'),\r\n import(/* webpackMode: 'eager' */'@bingads-webui/page-ready'),\r\n ]).spread(({ CustomColumnBackboneWrapper }, { CustomColumnServiceWrapper }, { PageReady }) => {\r\n customColumnService = new CustomColumnServiceWrapper({\r\n name: getCustomColumnPreferenceName(config.name),\r\n CustomColumns: pluginConfig.CustomColumns,\r\n });\r\n\r\n // update preference store\r\n PageReady.afterPageReady().then(() => {\r\n customColumnService.updateCustomColumnPreferenceStore().then(({\r\n removedColumns,\r\n editedColumns,\r\n addedColumns,\r\n }) => {\r\n if (permissions.IsCustomColumnFilterSupported) {\r\n _.each(editedColumns, (editedColumn) => {\r\n updateFilterSchemaForCustomColumns(editedColumn, customColumnOperations.edit);\r\n });\r\n\r\n _.each(addedColumns, (addedColumn) => {\r\n updateFilterSchemaForCustomColumns(addedColumn, customColumnOperations.add);\r\n });\r\n\r\n _.each(removedColumns, ({ id: customColumnId }) => {\r\n const id = customColumnId.replace('CustomColumn', '');\r\n cleanUpCustomColumnFilter(customColumnId);\r\n updateFilterSchemaForCustomColumns({ id }, customColumnOperations.remove);\r\n });\r\n }\r\n }).catch((err) => {\r\n throw new Error(`dynamicCustomColumnsSetup: ${JSON.stringify(err)}}`);\r\n });\r\n });\r\n\r\n const openCustomColumnPanel = options => new Promise((resolvePanel, rejectPanel) => {\r\n const isEdit = _.has(options, 'key');\r\n let id;\r\n let initialName;\r\n let initialDescription;\r\n let initialColumnFormat;\r\n let initialExpression;\r\n\r\n let p$columnDetail;\r\n\r\n if (isEdit) {\r\n id = parseIdFromGridKey(options.key);\r\n p$columnDetail = customColumnService.getCustomColumnDetailFromMT(id)\r\n .then((detail) => {\r\n if (detail && !_.isEmpty(detail) && detail.id === id) {\r\n ({\r\n name: initialName,\r\n description: initialDescription,\r\n format: initialColumnFormat,\r\n expression: initialExpression,\r\n } = detail);\r\n }\r\n return true;\r\n }).catch((data) => {\r\n const { errors } = data;\r\n const error = _.first(errors);\r\n\r\n if (error && error.Code === 'EntityDoesNotExist') {\r\n customColumnService.updateCustomColumnPreferenceStore(true);\r\n notificationApi.showWarning(pluginConfig.i18n.getString('CustomColumn_DoesNotExist'));\r\n columnChooserEditablePicker.removeCustomColumnByKey(options.key);\r\n }\r\n return false;\r\n });\r\n } else {\r\n p$columnDetail = Promise.resolve(true);\r\n }\r\n\r\n p$columnDetail.then((open) => {\r\n if (!open) {\r\n return;\r\n }\r\n\r\n customColumnPanel = new CustomColumnBackboneWrapper({\r\n props: {\r\n i18n: _.defaults({ getString: safeGetString }, pluginConfig.i18n),\r\n id,\r\n initialName,\r\n initialDescription,\r\n initialColumnFormat,\r\n initialExpression,\r\n metricCategories: customColumnConfig.metricCategories,\r\n segmentCategories: customColumnConfig.segmentCategories,\r\n resolvePanel,\r\n customColumnService,\r\n isEdit,\r\n entitySchemaName,\r\n permissions,\r\n afterSave: (formData) => {\r\n try {\r\n if (isEdit && formData.id === undefined) {\r\n customColumnService.updateCustomColumnPreferenceStore(true);\r\n columnChooserEditablePicker.removeCustomColumnByKey(options.key);\r\n\r\n return;\r\n }\r\n\r\n if (permissions.IsCustomColumnFilterSupported) {\r\n updateFilterSchemaForCustomColumns(\r\n formData,\r\n isEdit ? customColumnOperations.edit : customColumnOperations.add\r\n );\r\n }\r\n\r\n if (isEdit) {\r\n const currentColumns = gridView.get('columns');\r\n const isSelectedColumn = _.findIndex(\r\n currentColumns,\r\n column => `PerformanceMetrics/CustomColumn${formData.id}` === column.name\r\n ) >= 0;\r\n\r\n if (isSelectedColumn) {\r\n gridView.refresh(true);\r\n }\r\n }\r\n } catch (e) {\r\n rejectPanel(_.result(formData, 'id', 'MISSING_ID'));\r\n }\r\n },\r\n },\r\n });\r\n\r\n customColumnPanel.render();\r\n });\r\n });\r\n\r\n pluginConfig.categories.push({\r\n name: safeGetString('ColumnChooser_CustomColumnsCategory'),\r\n optionListViewFactory: ({ categoryName }) => {\r\n columnChooserEditablePicker = new ColumnChooserEditablePicker({\r\n i18n: pluginConfig.i18n,\r\n categoryName,\r\n isReadOnlyUser: permissions.IsReadOnlyUser,\r\n options: _.map(customColumnService.getAll(), column => ({\r\n key: customColumnGridKeyFromId(column.id),\r\n name: column.name,\r\n isValid: isValidForFeature({\r\n schemaName: entitySchemaName,\r\n expression: column.expression,\r\n permissions,\r\n }),\r\n })),\r\n p$removeColumn: (columnId) => {\r\n try {\r\n customColumnService.remove(columnId);\r\n\r\n if (permissions.IsCustomColumnFilterSupported) {\r\n const customColumnId = columnId.split('/')[1];\r\n const id = customColumnId.replace('CustomColumn', '');\r\n cleanUpCustomColumnFilter(customColumnId);\r\n updateFilterSchemaForCustomColumns({ id }, customColumnOperations.remove);\r\n const currentColumns = gridView.get('columns');\r\n const filtered = _.chain(currentColumns)\r\n .filter(column => `PerformanceMetrics/CustomColumn${id}` !== column.name)\r\n .map(column => column.name)\r\n .value();\r\n\r\n if (_.size(filtered) < _.size(currentColumns)) {\r\n setSelectedColumns(filtered);\r\n }\r\n }\r\n } catch (e) {\r\n return Promise.reject(columnId);\r\n }\r\n\r\n return Promise.resolve(columnId);\r\n },\r\n p$editColumn: openCustomColumnPanel,\r\n p$createColumn: openCustomColumnPanel,\r\n });\r\n\r\n return columnChooserEditablePicker;\r\n },\r\n });\r\n\r\n resolveSetup();\r\n });\r\n\r\n const setupCustomColumns = () => (isCustomColumnEnabled ?\r\n new Promise(dynamicCustomColumnsSetup) :\r\n Promise.resolve());\r\n\r\n const setupAdCustomizerAttributesColumns =\r\n () => (enableRSAAdCustomizer && permissions.IsRSAAdCustomizerEnabled ?\r\n new Promise((resolve) => {\r\n pluginConfig.AdCustomizerAttribute\r\n .findAll({\r\n query: {\r\n $top: 100,\r\n $orderby: 'Name asc',\r\n },\r\n }).then((returnResult) => {\r\n adCustomizerAttributeColumns = returnResult;\r\n pluginConfig.categories.push({\r\n name: safeGetString('AdCustomizerAttributes'),\r\n options: _.map(returnResult, (item) => {\r\n const {\r\n Name,\r\n Datatype,\r\n Id,\r\n } = item || {};\r\n const dataTypeI18nKey = `RSAAdCustomizer_Attribute_${Datatype}`;\r\n return {\r\n name: `${Name} (${pluginConfig.i18n.getString(dataTypeI18nKey)})`,\r\n key: `AdCustomizerAttributes${Id}`,\r\n };\r\n }),\r\n });\r\n resolve();\r\n });\r\n }) :\r\n Promise.resolve());\r\n\r\n if (isCustomColumnEnabled) {\r\n gridView.on('didReload', () => {\r\n const { dataSource: { rawData } } = gridView;\r\n const customColumnResponseKey = '@ns.customcolumnerrorresponse';\r\n const customColumnErrors = rawData && rawData[customColumnResponseKey] ?\r\n rawData[customColumnResponseKey].CustomColumnErrors : [];\r\n\r\n if (_.isEmpty(customColumnErrors)) {\r\n return;\r\n }\r\n\r\n gridView.trigger('hasInvalidOrDeletedCustomColumns', customColumnErrors, true);\r\n });\r\n\r\n gridView.on('hasInvalidOrDeletedCustomColumns', (customColumnErrors, showFilterBar = false) => {\r\n customColumnService.updateCustomColumnPreferenceStore(true);\r\n\r\n const columnsToExclude = _.chain(customColumnErrors).map((item) => {\r\n if (item.ErrorCode === 'EntityDoesNotExist') {\r\n return { id: item.Id };\r\n }\r\n return null;\r\n }).compact().value();\r\n const columnsToInvalidate = _.chain(customColumnErrors).map((item) => {\r\n if (item.ErrorCode === 'EntityIsUnsupported' || item.ErrorCode === 'InternalError') {\r\n return { id: item.Id };\r\n }\r\n return null;\r\n }).compact().value();\r\n\r\n const currentColumns = gridView.get('columns');\r\n const filtered = _.chain(currentColumns)\r\n .filter(column => _.findIndex(customColumnErrors, excluded => `PerformanceMetrics/CustomColumn${excluded.Id}` === column.name) < 0)\r\n .map(column => column.name)\r\n .value();\r\n\r\n if (_.size(filtered) < _.size(currentColumns)) {\r\n setSelectedColumns(filtered);\r\n }\r\n\r\n filterService.trigger(\r\n 'have-invalid-or-removed-properties',\r\n {\r\n deletedProperties: _.map(columnsToExclude, ({ id }) => `CustomColumn${id}`),\r\n invalidProperties: _.map(columnsToInvalidate, ({ id }) => `CustomColumn${id}`),\r\n showFilterBar,\r\n }\r\n );\r\n });\r\n }\r\n\r\n function getSelection() {\r\n return _.first(pluginConfig.SelectedColumns.filter({ where: query }));\r\n }\r\n\r\n function getSelectedRecord() {\r\n return _.result(getSelection(), 'name', 'Custom');\r\n }\r\n\r\n function setSelectedRecord(name) {\r\n const selection = getSelection();\r\n\r\n if (selection) {\r\n return pluginConfig.SelectedColumns.update(selection.id, { name });\r\n }\r\n\r\n return pluginConfig.SelectedColumns.create(_.defaults({ name }, query));\r\n }\r\n\r\n function refreshMenu() {\r\n toolbarEditor.update({\r\n id: saveListId,\r\n items: _.reduce(pluginConfig.Columns.filter({ where: query }), (memo, { name }) => {\r\n if (name !== 'Custom') {\r\n memo.push({\r\n text: name,\r\n value: name,\r\n });\r\n }\r\n return memo;\r\n }, [{\r\n text: pluginConfig.i18n.getString('ColumnsMenu_Custom'),\r\n value: 'Custom',\r\n locked: true,\r\n }]),\r\n value: getSelectedRecord(),\r\n });\r\n }\r\n\r\n function getRecord(name) {\r\n return _.first(pluginConfig.Columns.filter({\r\n where: _.defaults({ name }, query),\r\n }));\r\n }\r\n\r\n function setRecord(name, _columns) {\r\n const record = getRecord(name);\r\n let columns = _columns;\r\n if (_.isFunction(columnProcessorBeforeSetRecord)) {\r\n columns = columnProcessorBeforeSetRecord(_columns, record && record.columns);\r\n }\r\n\r\n if (permissions.dynamic && permissions.dynamic.AppCampaignNewCampaignGridColumns && record) {\r\n // do not remove column names that are not in the grids available columns. This is to be able to have\r\n // different columns set for different global filter using same preference key\r\n const unavailableSavedColumns = _.difference(record.columns, Object.keys(pluginConfig.columns));\r\n columns = columns.concat(unavailableSavedColumns);\r\n }\r\n\r\n columns = _.unique(columns);\r\n\r\n let p$setRecord;\r\n if (record) {\r\n p$setRecord = pluginConfig.Columns.update(record.id, { columns });\r\n } else {\r\n p$setRecord = pluginConfig.Columns.create(_.defaults({ columns, name }, query));\r\n }\r\n p$setRecord.then(() => {\r\n columnChooserAgent.triggerRecordSavedEvent();\r\n });\r\n return p$setRecord;\r\n }\r\n\r\n function applyRecord(name) {\r\n const promises = [];\r\n const record = getRecord(name);\r\n\r\n if (record) {\r\n if (permissions.IsAvgPositionDeprecationPhase2Enabled &&\r\n (!pluginConfig.isHotelCenterGrid || permissions.IsAvgPositionDeprecationPhase3Enabled)) {\r\n let selectedColumns = record.columns;\r\n const hasAveragePosition = selectedColumns.includes('AveragePosition');\r\n if (hasAveragePosition) {\r\n const hasTopImpressionRate = selectedColumns.includes('TopImpressionRate');\r\n const hasAbsoluteTopImpressionRate = selectedColumns.includes('AbsoluteTopImpressionRate');\r\n selectedColumns = selectedColumns.filter(column => column !== 'AveragePosition');\r\n if (!hasTopImpressionRate) {\r\n selectedColumns.push('TopImpressionRate');\r\n }\r\n if (!hasAbsoluteTopImpressionRate) {\r\n selectedColumns.push('AbsoluteTopImpressionRate');\r\n }\r\n promises.push(setRecord(name, selectedColumns));\r\n }\r\n if (IsColumnConversionEnabled) {\r\n selectedColumns = applyColumnConversions(selectedColumns);\r\n }\r\n setSelectedColumns(selectedColumns);\r\n } else if (IsColumnConversionEnabled) {\r\n const selectedColumns = applyColumnConversions(record.columns);\r\n setSelectedColumns(selectedColumns);\r\n } else {\r\n setSelectedColumns(record.columns);\r\n }\r\n } else {\r\n setSelectedColumns(pluginConfig.selected);\r\n promises.push(setRecord(name, pluginConfig.selected));\r\n }\r\n\r\n if (name !== getSelectedRecord()) {\r\n promises.push(setSelectedRecord(name));\r\n }\r\n\r\n return Promise.all(promises)\r\n .tap(() => columnChooserAgent.triggerSelectedRecordChangedEvent())\r\n .thenReturn();\r\n }\r\n\r\n const legacyQuery = {};\r\n\r\n function legacyDataProcesser() {\r\n const promises = [];\r\n const legacySelected = pluginConfig.LegacySelectedColumns.filter({ where: legacyQuery });\r\n const legacyRecords = pluginConfig.LegacyColumns.filter({ where: legacyQuery });\r\n\r\n // deal with selected columnchooser preference in legacy grid\r\n if (legacySelected.length > 0) {\r\n promises.push(setSelectedRecord(legacySelected[0].name)\r\n .then(getSelectedRecord)\r\n .then(applyRecord)\r\n .then(refreshMenu));\r\n }\r\n\r\n // deal with columnchooser preference in legacy grid\r\n _.each(legacyRecords, (legacyRecord) => {\r\n // this id means the record is from gridName_selected, this is not what we want here.\r\n // this is a hack to fix the issue that legacy grid save custom record as gridName_custom\r\n // which break the naming convention\r\n if (legacyRecord.id === -1) {\r\n return;\r\n }\r\n\r\n const record = getRecord(legacyRecord.name);\r\n const columns = _.map(\r\n legacyRecord.columns,\r\n col => (pluginConfig.nameFromLegacy && pluginConfig.nameFromLegacy[col]) || col\r\n );\r\n\r\n if (record) {\r\n const update = pluginConfig.Columns\r\n .update(record.id, { columns });\r\n\r\n promises.push(update);\r\n } else {\r\n const creation = pluginConfig.Columns\r\n .create(_.defaults({\r\n columns,\r\n name: legacyRecord.name,\r\n }, query));\r\n\r\n promises.push(creation);\r\n }\r\n });\r\n\r\n return Promise.all(promises);\r\n }\r\n\r\n function legacyHandler() {\r\n if (config.legacyGridName && pluginConfig.LegacyGridFlag) {\r\n const legacyGridFlagQuery = {\r\n project: 'CampaignUI',\r\n grid: config.legacyGridName,\r\n };\r\n\r\n _.extend(legacyQuery, {\r\n project: 'CampaignUI',\r\n grid: config.legacyGridName,\r\n });\r\n\r\n pluginConfig.LegacyGridFlag.findAll({ where: legacyGridFlagQuery })\r\n .then((flags) => {\r\n const flag = _.first(flags);\r\n\r\n if (flag && flag.flagInfo && flag.flagInfo.isColumnChooserMigrated) {\r\n return Promise.resolve();\r\n }\r\n\r\n if (flag) {\r\n pluginConfig.LegacyGridFlag.update(\r\n flag.id,\r\n { flagInfo: _.extend({}, flag.flagInfo, { isColumnChooserMigrated: true }) }\r\n );\r\n } else {\r\n pluginConfig.LegacyGridFlag.create(_.defaults({\r\n flagInfo: {\r\n isColumnChooserMigrated: true,\r\n },\r\n }, legacyGridFlagQuery));\r\n }\r\n\r\n return Promise.all([\r\n pluginConfig.LegacyColumns.findAll({ where: legacyQuery }),\r\n pluginConfig.LegacySelectedColumns.findAll({ where: legacyQuery }),\r\n ]).then(legacyDataProcesser);\r\n });\r\n }\r\n\r\n return Promise.resolve();\r\n }\r\n\r\n function removeRecord(name) {\r\n const promises = [];\r\n const record = getRecord(name);\r\n\r\n if (record) {\r\n promises.push(pluginConfig.Columns.destroy(record.id));\r\n if (name === toolbarEditor.get(saveListId).value) {\r\n promises.push(applyRecord('Custom'));\r\n }\r\n } else {\r\n throw new Error(`remove record error, the record with name: ${name} does not exist.`);\r\n }\r\n\r\n return Promise.all(promises).tap(() => {\r\n columnChooserAgent.triggerRecordRemovedEvent();\r\n });\r\n }\r\n\r\n function applyColumns({\r\n selectedKeys,\r\n savedName,\r\n }) {\r\n const name = savedName || 'Custom';\r\n\r\n setSelectedColumns(selectedKeys);\r\n\r\n return Promise.all([\r\n setRecord(name, selectedKeys),\r\n setSelectedRecord(name),\r\n ]).then(refreshMenu);\r\n }\r\n\r\n function attemptRemoveRecord(name) {\r\n const dialog = new Dialog({\r\n backdrop: true,\r\n keyboard: true,\r\n showHeader: false,\r\n }).setContent(new TextView({\r\n texts: [\r\n pluginConfig.i18n.getString('ColumnChooser_PromptBeforeRemove').replace('{0}', name),\r\n ],\r\n customClass: 'delete-column',\r\n }))\r\n .setState({\r\n buttons: [{\r\n text: pluginConfig.i18n.getString('ColumnChooser_ConfirmRemove'),\r\n name: 'save',\r\n class: 'confirm-remove btn-primary',\r\n }, {\r\n text: pluginConfig.i18n.getString('ColumnChooser_ConfirmCancel'),\r\n name: 'cancel',\r\n class: 'cancel-remove',\r\n }],\r\n })\r\n .render();\r\n\r\n dialog.$el.appendTo(document.body);\r\n dialog.show();\r\n\r\n dialog.on('clickedButton', (button) => {\r\n dialog.remove();\r\n if (button === 'save') {\r\n removeRecord(name).then(refreshMenu);\r\n }\r\n });\r\n }\r\n\r\n function destroyColumnChooser() {\r\n if (columnChooser) {\r\n columnChooser.remove();\r\n columnChooser = null;\r\n }\r\n if (customColumnPanel) {\r\n customColumnPanel.remove();\r\n customColumnPanel = null;\r\n }\r\n }\r\n\r\n function createColumnChooser(options) {\r\n destroyColumnChooser();\r\n\r\n const selected = getSelectedColumns();\r\n\r\n columnChooser = new ColumnChooser({\r\n i18n: pluginConfig.i18n,\r\n instrumentation: options.instrumentation,\r\n withColumnsChangeAnnouncement: true,\r\n }).setState({\r\n categories,\r\n selected,\r\n customColumnConfig,\r\n });\r\n\r\n return columnChooser;\r\n }\r\n\r\n function p$canSaveColumns({ savedName }) {\r\n return new Promise((resolve) => {\r\n if (_.find(pluginConfig.Columns.filter({ where: query }), _.matcher({ name: savedName }))) {\r\n const dialog = new Dialog({\r\n backdrop: true,\r\n keyboard: true,\r\n showHeader: false,\r\n }).setContent(new TextView({\r\n texts: [\r\n // eslint-disable-next-line no-restricted-globals\r\n pluginConfig.i18n.getString('ColumnChooser_ColumnNameAlreadyExistsPrompt').replace('{0}', savedName).replace('{{name}}', savedName),\r\n pluginConfig.i18n.getString('ColumnChooser_IfReplaceColumnName'),\r\n ],\r\n }))\r\n .setState({\r\n buttons: [{\r\n text: pluginConfig.i18n.getString('ColumnChooser_ConfirmReplace'),\r\n name: 'replace',\r\n class: 'confirm-replace btn-primary',\r\n }, {\r\n text: pluginConfig.i18n.getString('ColumnChooser_CancelReplace'),\r\n name: 'cancel',\r\n class: 'cancel-replace',\r\n }],\r\n })\r\n .render();\r\n\r\n dialog.$el.appendTo(document.body);\r\n dialog.show();\r\n\r\n dialog.on('clickedButton', (button) => {\r\n resolve(button === 'replace');\r\n dialog.remove();\r\n });\r\n\r\n dialog.on('willClose', () => resolve(false));\r\n } else {\r\n resolve(true);\r\n }\r\n });\r\n }\r\n\r\n function restoreToolbar() {\r\n toolbarEditor.restoreToolbar();\r\n toolbar.gridToolbarGroup.showAllToolbars();\r\n destroyColumnChooser();\r\n\r\n if (pluginConfig.isForVNext) {\r\n toolbarEditor.overrideWith(null);\r\n }\r\n }\r\n\r\n function showColumnChooser(options) {\r\n createColumnChooser(options);\r\n\r\n toolbarEditor.overrideWith(columnChooser);\r\n toolbar.gridToolbarGroup.hideAllToolbars();\r\n\r\n columnChooser.on('hide', (result) => {\r\n if (result) {\r\n p$canSaveColumns(result)\r\n .then((canSave) => {\r\n if (canSave) {\r\n return applyColumns(result)\r\n .then(() => restoreToolbar())\r\n .then(() => gridView.refresh(config.isDataFetchManagerSource))\r\n .catch(_.noop);\r\n }\r\n\r\n return Promise.resolve();\r\n });\r\n } else {\r\n restoreToolbar();\r\n }\r\n });\r\n }\r\n\r\n toolbarEditor.update({\r\n iconLeftGlyphName: pluginConfig.customToolbarIcon || '',\r\n id: dropdownId,\r\n button: {\r\n text: pluginConfig.i18n.getString('ColumnChooser_Entry'),\r\n iconLeft: ['glyphicon', 'toolbar-icon', 'toolbar-icon-left', 'icon-columnchooser-normal'],\r\n iconRight: ['glyphicon', 'toolbar-icon', 'glyphicon-triangle-bottom'],\r\n },\r\n menu: {\r\n items: [{\r\n text: pluginConfig.i18n.getString('ColumnChooser_ModifyColumns'),\r\n onClick: (e, options = {}) => _.defer(() => { showColumnChooser(options); }),\r\n }, {\r\n type: 'dropdown-divider',\r\n }, {\r\n type: 'dropdown-radio-group',\r\n id: saveListId,\r\n title: pluginConfig.i18n.getString('ColumnChooser_ApplySavedColumns'),\r\n items: [],\r\n removeText: pluginConfig.i18n.getString('ColumnChooser_RemoveSavedColumns'),\r\n onSelect: applyRecord,\r\n onRemove: attemptRemoveRecord,\r\n refreshMenu,\r\n }],\r\n },\r\n });\r\n\r\n const promises = [\r\n pluginConfig.Columns.findAll({ where: query }),\r\n pluginConfig.SelectedColumns.findAll({ where: query }),\r\n ];\r\n\r\n if (isCustomColumnEnabled) {\r\n promises.push(pluginConfig.CustomColumns.findAll({\r\n where: {\r\n project: 'CampaignUI',\r\n grid: getCustomColumnPreferenceName(config.name),\r\n },\r\n }));\r\n }\r\n\r\n Promise.all(promises)\r\n .then(setupCustomColumns)\r\n .then(legacyHandler)\r\n .then(getSelectedRecord)\r\n .then(applyRecord)\r\n .then(refreshMenu);\r\n\r\n if (enableRSAAdCustomizer && permissions.IsRSAAdCustomizerEnabled) {\r\n setupAdCustomizerAttributesColumns()\r\n .then(getSelectedRecord)\r\n .then(applyRecord);\r\n }\r\n\r\n return {\r\n remove() {\r\n destroyColumnChooser();\r\n },\r\n setSelectedColumns,\r\n columnChooserAgent,\r\n refreshMenu,\r\n restoreToolbar,\r\n };\r\n});\r\n","import _ from 'underscore';\r\n\r\nexport function normalizeConfig(config) {\r\n const {\r\n columns = config.columns,\r\n customColumnConfig = { enabled: false, debugMode: false },\r\n categories,\r\n selected,\r\n mandatoryProperties = [],\r\n locked = [],\r\n patchQuery = false,\r\n toolbar,\r\n Columns,\r\n SelectedColumns,\r\n LegacyColumns,\r\n LegacySelectedColumns,\r\n CustomColumns,\r\n AdCustomizerAttribute,\r\n resource,\r\n LegacyGridFlag,\r\n nameFromLegacy,\r\n legacyGridName,\r\n i18n,\r\n i18nErrors,\r\n customToolbarIcon,\r\n isForVNext,\r\n isHotelCenterGrid,\r\n columnProcessorBeforeSetRecord,\r\n RSAAdCustomizerAttributeColumn,\r\n enableRSAAdCustomizer,\r\n columnConversions,\r\n } = _.result(config.plugins, 'columnChooser', {});\r\n\r\n return {\r\n columns: _.isArray(columns) ? _.indexBy(columns, 'name') : columns,\r\n customColumnConfig,\r\n selected,\r\n mandatoryProperties,\r\n categories,\r\n locked,\r\n patchQuery,\r\n toolbar,\r\n Columns,\r\n SelectedColumns,\r\n LegacyColumns,\r\n legacyGridName,\r\n LegacySelectedColumns,\r\n LegacyGridFlag,\r\n nameFromLegacy,\r\n CustomColumns,\r\n AdCustomizerAttribute,\r\n resource,\r\n i18n,\r\n i18nErrors,\r\n customToolbarIcon,\r\n isForVNext,\r\n isHotelCenterGrid,\r\n columnProcessorBeforeSetRecord,\r\n RSAAdCustomizerAttributeColumn,\r\n enableRSAAdCustomizer,\r\n columnConversions,\r\n };\r\n}\r\n","import _ from 'underscore';\r\nimport Backbone from 'backbone';\r\nimport kendo from '@bingads-webui/kendo/kendo.core';\r\nimport { dateRangeEquals } from '@bingads-webui-universal/primitive-utilities';\r\n\r\nconst formatDateInQuery = date => kendo.toString(date, 'M/d/yyyy');\r\nconst formatDateInEntitySet = date => kendo.toString(date, 'yyyy-MM-dd');\r\nconst parseDate = dateString => kendo.parseDate(dateString);\r\nconst defaultComparisonColumns = [\r\n 'PeriodPerformanceMetrics',\r\n 'PerformanceMetricsChange',\r\n 'PerformanceMetricsChangePercentage',\r\n 'PhonePeriodPerformanceMetrics',\r\n 'PhonePerformanceMetricsChange',\r\n 'PhonePerformanceMetricsChangePercentage',\r\n];\r\n\r\nfunction changeEntitySet(queryParams, dateRange, edm) {\r\n const { options } = queryParams;\r\n const entitySet = edm.root.identifyEntitySet(options.entitySet.toJSON());\r\n\r\n const action = entitySet.navigation.source;\r\n\r\n entitySet.navigation.parameters.gridDataParameters = _.extend(\r\n {},\r\n entitySet.navigation.parameters.gridDataParameters, {\r\n DateRange: {\r\n StartDate: formatDateInEntitySet(dateRange.start) ||\r\n formatDateInEntitySet(parseDate(dateRange.RangeStartDate)),\r\n EndDate: formatDateInEntitySet(dateRange.end) ||\r\n formatDateInEntitySet(parseDate(dateRange.RangeEndDate)),\r\n },\r\n ComparisonDateRange: dateRange.compared ? {\r\n StartDate: formatDateInEntitySet(dateRange.compared.start),\r\n EndDate: formatDateInEntitySet(dateRange.compared.end),\r\n } : undefined,\r\n }\r\n );\r\n\r\n return _.defaults({\r\n options: _.defaults({\r\n entitySet: action.$call(entitySet.navigation.parameters),\r\n }, options),\r\n }, queryParams);\r\n}\r\n\r\nfunction addDateRangeToQueryParams(queryParams, dateRange) {\r\n let query = _.defaults({\r\n startDate: formatDateInQuery(dateRange.start) ||\r\n formatDateInQuery(parseDate(dateRange.RangeStartDate)),\r\n endDate: formatDateInQuery(dateRange.end) ||\r\n formatDateInQuery(parseDate(dateRange.RangeEndDate)),\r\n }, queryParams.query);\r\n\r\n if (dateRange.compared) {\r\n query = _.defaults({\r\n comparisonStartDate: formatDateInQuery(dateRange.compared.start),\r\n comparisonEndDate: formatDateInQuery(dateRange.compared.end),\r\n }, query);\r\n } else {\r\n query = _.omit(query, 'comparisonStartDate', 'comparisonEndDate');\r\n }\r\n\r\n return _.defaults({\r\n query,\r\n }, queryParams);\r\n}\r\n\r\n\r\nexport const dateFilterPlugin = definePlugin => definePlugin('dateFilter', [\r\n 'config',\r\n 'gridView',\r\n 'dataSource',\r\n], (\r\n config,\r\n gridView,\r\n dataSource\r\n) => {\r\n const events = _.extend({}, Backbone.Events);\r\n const pluginConfig = _.result(config.plugins, 'dateFilter', {});\r\n const {\r\n edm,\r\n state,\r\n addDateChangeListener,\r\n comparisonColumns = defaultComparisonColumns,\r\n p$daterange = () => state.getPromise('$daterange'),\r\n } = pluginConfig;\r\n const originalQuery = dataSource.query;\r\n let currentDateRange;\r\n\r\n // The default date range for newly signed up\r\n // user is all time which is from three years\r\n // ago till now\r\n const date = new Date();\r\n date.setFullYear(date.getFullYear() - 3);\r\n const defaultDateRange = {\r\n compared: null,\r\n start: date,\r\n end: new Date(),\r\n grain: 22,\r\n key: 'allTime',\r\n name: 'AllTime',\r\n };\r\n\r\n p$daterange().then((dateRange) => {\r\n currentDateRange = dateRange || defaultDateRange;\r\n });\r\n\r\n dataSource.query = (params, ...rest) => // eslint-disable-line no-param-reassign\r\n p$daterange().then((dateRange) => {\r\n const dateRangeCopy = dateRange || defaultDateRange;\r\n // UI next does not have addDateChangeListener\r\n // when date change, we will go to this query, and we use this chance to trigger\r\n // date change event for other projections\r\n currentDateRange = dateRangeCopy;\r\n events.trigger('dateChange');\r\n\r\n if (!config.isDataFetchManagerSource) {\r\n let queryParams;\r\n\r\n if (pluginConfig.isOdataActionSource) {\r\n const changeEntitySetFn = pluginConfig.changeEntitySet || changeEntitySet;\r\n queryParams = _.defaults({\r\n select: dateRangeCopy.compared ?\r\n _.union(params.select, comparisonColumns) :\r\n _.difference(params.select, comparisonColumns),\r\n }, changeEntitySetFn(params, dateRangeCopy, edm));\r\n } else {\r\n queryParams = addDateRangeToQueryParams(params, dateRangeCopy);\r\n }\r\n\r\n gridView.set({ queryParams });\r\n\r\n return originalQuery.call(dataSource, queryParams, ...rest);\r\n }\r\n\r\n return originalQuery.call(dataSource, params, ...rest);\r\n });\r\n\r\n\r\n addDateChangeListener((e, newDateRange) => {\r\n if (dateRangeEquals(_.omit(currentDateRange, 'key'), _.omit(newDateRange, 'key'))) {\r\n return;\r\n }\r\n\r\n currentDateRange = newDateRange;\r\n\r\n gridView.refresh(true);\r\n\r\n events.trigger('dateChange');\r\n });\r\n\r\n return {\r\n events,\r\n getCurrentDateRange() {\r\n return currentDateRange;\r\n },\r\n p$getCurrentDateRange() {\r\n return p$daterange().then(dateRange => dateRange || defaultDateRange);\r\n },\r\n };\r\n});\r\n","import _ from 'underscore';\r\n\r\nexport const inlineDownloadGenericPlugin = definePlugin => definePlugin('inlineDownload', [\r\n 'config',\r\n 'gridView',\r\n 'toolbar',\r\n 'segment',\r\n], (config, gridView, toolbar, segment) => {\r\n const {\r\n DownloadView,\r\n button = 'button-download',\r\n schema,\r\n // DEPRECATED: use schema instead\r\n entity = schema ? schema.name : null,\r\n gridId,\r\n cusToolbarItem = {},\r\n disableOnEmpty = true,\r\n disableOnTooMuchData = true,\r\n i18n,\r\n downloadFormats,\r\n segmentationTypes,\r\n isFeedbackEnabled,\r\n\r\n p$daterange,\r\n } = config.plugins.inlineDownload;\r\n\r\n let { isAvailable } = config.plugins.inlineDownload;\r\n let downloadView = null;\r\n const toolbarEditor = config.plugins.inlineDownload.toolbar ||\r\n toolbar.gridToolbarGroup.toolbarWithItem(button);\r\n\r\n function createDownloadView(ReportRule) {\r\n const selectedColumns = gridView.get('columns');\r\n\r\n downloadView = new DownloadView({\r\n selectedColumns,\r\n\r\n downloadFormats,\r\n segmentationTypes: segmentationTypes || segment.getAvailableSegmentationTypes(),\r\n entity,\r\n gridId,\r\n totalRecordCount: gridView.getItemCount(),\r\n validateSegmentType: segment.validateSegmentType,\r\n isFeedbackEnabled,\r\n data: ReportRule,\r\n\r\n isForVNext: true,\r\n p$daterange,\r\n }).render();\r\n\r\n return downloadView;\r\n }\r\n\r\n function showDownloadView(ReportRule) {\r\n if (!downloadView) {\r\n createDownloadView(ReportRule);\r\n }\r\n\r\n toolbarEditor.overrideWith(downloadView);\r\n toolbar.gridToolbarGroup.hideAllToolbars();\r\n\r\n // Use 'once' instead 'on'\r\n // * The 'showToolbar' event should only be handled once, then the view\r\n // is destroyed.\r\n // * The current implementation of DownloadView.clear triggers 'showToolbar',\r\n // which would cause dead loop if we use 'on'\r\n downloadView.once('showToolbar', () => {\r\n toolbarEditor.restoreToolbar();\r\n toolbar.gridToolbarGroup.showAllToolbars();\r\n downloadView = null;\r\n\r\n toolbarEditor.overrideWith(null);\r\n });\r\n }\r\n\r\n toolbarEditor.update(_.defaults(cusToolbarItem, {\r\n id: button,\r\n classes: '',\r\n iconLeft: '',\r\n text: i18n.getString('InlineReportDownload_Download_Button'),\r\n disabled: !isAvailable,\r\n onClick: () => showDownloadView({\r\n SegmentationTypes: (() => {\r\n const segmentationType = segment.getSegmentType();\r\n\r\n return segmentationType ? [segmentationType] : [];\r\n })(),\r\n }),\r\n }));\r\n\r\n /*\r\n * in new ui, we only disable when there is too much data.\r\n * MT doesn't support download call and will throw exception.\r\n * The Check disableOnEmpty is to be compatible with old behavior.\r\n */\r\n if (disableOnEmpty && disableOnTooMuchData) {\r\n let isTooMuchDataInGrid = false;\r\n\r\n gridView.on('didReload', (succeeded, data = {}) => {\r\n if (!succeeded) {\r\n if (_.any(data.errors, err => err.Code === 'TooMuchDataToDownload')) {\r\n isTooMuchDataInGrid = true;\r\n }\r\n }\r\n });\r\n\r\n gridView.on('didUpdate', () => {\r\n if (isTooMuchDataInGrid) {\r\n toolbarEditor.set(button, {\r\n disabled: isTooMuchDataInGrid,\r\n });\r\n }\r\n });\r\n }\r\n\r\n function remove() {\r\n if (downloadView) {\r\n downloadView.remove();\r\n }\r\n }\r\n\r\n return {\r\n remove,\r\n getAvailability() {\r\n return isAvailable;\r\n },\r\n setAvailability(isAvailableNew) {\r\n isAvailable = isAvailableNew;\r\n\r\n toolbarEditor.update({\r\n id: button,\r\n disabled: !isAvailable,\r\n });\r\n },\r\n getDownloadView() {\r\n return downloadView;\r\n },\r\n showDownloadView,\r\n };\r\n});\r\n","import _ from 'underscore';\r\nimport { getGridFilter } from '@bingads-webui-campaign/inline-download-grids-metadata';\r\n\r\nexport const setFilterByReportEmailRule = ({\r\n appConfig,\r\n filterService,\r\n ReportEmailRule,\r\n}) => {\r\n const permissions = (appConfig && appConfig.get('permissions')) || {};\r\n const { dynamic: { ColumnConversion: IsColumnConversionEnabled } = {} } = permissions;\r\n\r\n if (!ReportEmailRule) {\r\n return filterService.p$Initialized;\r\n }\r\n\r\n let filter = null;\r\n\r\n if (ReportEmailRule.Filter) {\r\n filter = JSON.parse(ReportEmailRule.Filter);\r\n } else {\r\n filter = getGridFilter(ReportEmailRule.Entity, ReportEmailRule.Selection);\r\n }\r\n\r\n if (_.isEmpty(filter)) {\r\n filter = null;\r\n }\r\n\r\n const originalPromise = filterService.p$Initialized;\r\n\r\n return originalPromise\r\n .then(() => {\r\n if (filterService.p$Initialized !== originalPromise) {\r\n // refreshSource is called, need to wait for its completion\r\n return filterService.p$Initialized;\r\n }\r\n return null;\r\n })\r\n .then(() => {\r\n filterService.deserialize(\r\n JSON.stringify(filter),\r\n IsColumnConversionEnabled\r\n );\r\n return filterService.p$Initialized;\r\n });\r\n};\r\n","import Promise from 'bluebird';\r\nimport _ from 'underscore';\r\nimport URI from 'urijs';\r\nimport { getGridColumnsProperties } from '@bingads-webui-campaign/inline-download-grids-metadata';\r\nimport { setFilterByReportEmailRule } from './set-filter-by-report-email-rule';\r\nimport { inlineDownloadGenericPlugin } from './generic-plugin';\r\n\r\n/**\r\n * Will be called with the current grid's FilterEntity and should return additional query\r\n * parameters, that would normally be included into an OData grid data request when such filter\r\n * is used in a grid.\r\n * @callback CustomFilterQueryParamsCallback\r\n * @param {FilterEntity} - the filter entity representing the current filter\r\n * @returns {Object} - an object with key/value pairs representing the additional query parameters\r\n */\r\n\r\n/**\r\n * @typedef InlineDownloadConfig\r\n * @type {object}\r\n * @property {string} button - The id of the download button.\r\n * It must match the download button id defined in toolbar plugin.\r\n * @property {boolean} isAvailable - Whether the download feature is enabled\r\n * @property {string[]} [segmentationTypes=segment.getAvailableSegmentationTypes()]\r\n * - supported segmentation types, default to be segmentation types defined in segment plugin\r\n * @property {string} entity\r\n * @property {string} gridId\r\n * @property {I18nModel} i18n - i18n\r\n * @property {SchemaI18n} s$i18n - SchemaI18n to get corresponding localized texts for properties\r\n * When this property exists, it will supersede columns, customGridColumns\r\n * And correspond information needs to be added to\r\n * bingads-webui-campaign/inline-download-grids-metadata.\r\n * @property {Object.} columns -\r\n * DEPRECATED: The override column config.\r\n * add your column-property mapping into @bingads-webui-campaign/inline-download-grids-metadata\r\n * @property {function} customGridColumns - DEPRECATED\r\n * add your column-property mapping into @bingads-webui-campaign/inline-download-grids-metadata\r\n * @property {function} processReportRule - a hook before sending final ReportRule to OData server\r\n * add all custom data specific for your feature using this method\r\n * @property {CustomFilterQueryParamsCallback} [customFilterQueryParams] - The\r\n * callback that returns custom query parameters based on the current filter.\r\n * Note that for additional query parameter that don't depend on the current\r\n * filter it is recommended to inject them using a custom processReportRule.\r\n * See examples below.\r\n * @example Injecting custom query parameters\r\n * ```javascript\r\n * const customQueryParams = \"Test1=1&Test2=2\";\r\n * const processReportRule = ReportRule => {\r\n * ReportRule.Selection = ReportRule.Selection || {};\r\n * ReportRule.Selection.QueryString = ReportRule.Selection.QueryString || '';\r\n * ReportRule.Selection.QueryString = ReportRule.Selection.QueryString ?\r\n * `${ReportRule.Selection.QueryString}&${customQueryParams}` :\r\n * customQueryParams;\r\n * };\r\n *\r\n * const pluginsConfig = {\r\n * inlineDownload: {\r\n * // ...\r\n * processReportRule\r\n * // ...\r\n * }\r\n * };\r\n * ```\r\n * @example Injecting custom query parameters based on filter\r\n * ```javascript\r\n * const customFilterQueryParams = filterEntity => ({ Test1: 1, Test2: 2 });\r\n *\r\n * const pluginsConfig = {\r\n * inlineDownload: {\r\n * // ...\r\n * customFilterQueryParams\r\n * // ...\r\n * }\r\n * };\r\n * ```\r\n */\r\n\r\n/**\r\n * A hook to change default ReportRule created by this plugin\r\n * ReportRule is a sub-class of TaskItem, which creates a task to download files\r\n * @callback ProcessReportRule\r\n * @param {ReportRule} - the default ReportRule created by this plugin\r\n * @returns {ReportRule} - the changed ReportRule with data specific for your feature\r\n */\r\n\r\n/**\r\n * @deprecated\r\n * @typedef InlineDownloadColumns\r\n * @type {InlineDownloadColumnConfig|InlineDownloadColumnConfig[]}\r\n */\r\n\r\n/**\r\n * @deprecated\r\n * @typedef InlineDownloadColumnConfig\r\n * @type {object}\r\n * @property {string} property - The property path in form of 'foo/bar'.\r\n * @property {string} title - The localized column header string.\r\n */\r\n\r\nexport const inlineDownloadCampaignODataPlugin = definePlugin =>\r\n inlineDownloadGenericPlugin((pluginName, dependencies, callback) => {\r\n definePlugin(pluginName, dependencies, (config, gridView, toolbar, segment) => {\r\n const {\r\n DownloadView,\r\n schema,\r\n // TODO: remove these options\r\n columns = {},\r\n customGridColumns = null,\r\n // END TODO\r\n processReportRule,\r\n // this option will override columns, customGridColumns,\r\n // and finally replace them\r\n s$i18n,\r\n customDownloadService,\r\n ReportEmailRule,\r\n // TODO: [zhbliu] refactor to auto generate it then we can remove this param\r\n selection: rawSelection,\r\n // END TODO\r\n customFilterQueryParams = null,\r\n } = config.plugins.inlineDownload;\r\n const { config: appConfig } = config;\r\n const selection = rawSelection || _.result(ReportEmailRule, 'Selection');\r\n const { filterService } = config;\r\n\r\n class CampaignODataDownloadView extends DownloadView {\r\n initialize({\r\n selectedColumns,\r\n\r\n downloadFormats,\r\n segmentationTypes,\r\n entity,\r\n gridId,\r\n totalRecordCount,\r\n validateSegmentType,\r\n isFeedbackEnabled,\r\n data,\r\n\r\n p$daterange,\r\n }) {\r\n let localizedHeaders;\r\n let odataColumnNames;\r\n const currentFilter = filterService.getCombinedFilter();\r\n\r\n if (s$i18n) {\r\n const properties = getGridColumnsProperties(\r\n entity,\r\n _.map(selectedColumns, ({ name }) => name),\r\n selection\r\n );\r\n odataColumnNames = _.map(properties, property => (_.isArray(property) ? property.join('/') : property));\r\n localizedHeaders = _.map(properties, name => s$i18n.property(schema || entity, name));\r\n } else {\r\n const gridColumns = _.isFunction(customGridColumns) ?\r\n customGridColumns(selectedColumns) :\r\n selectedColumns;\r\n\r\n [localizedHeaders, odataColumnNames] = _.map([{\r\n key: 'title',\r\n getDefault(column) {\r\n return _.result(column, 'title', column.name);\r\n },\r\n }, {\r\n key: 'property',\r\n getDefault(column) {\r\n const property = column.property || column.name;\r\n\r\n return _.isString(property) ? property : property.key;\r\n },\r\n }], ({ key, getDefault }) => _.reduce(gridColumns, (memo, column) => {\r\n const { name } = column;\r\n const columnConfig = _.result(columns, name);\r\n const defaultValue = getDefault(column);\r\n\r\n if (_.isArray(columnConfig)) {\r\n _.each(columnConfig, col => memo.push(_.result(col, key, defaultValue)));\r\n } else if (_.isObject(columnConfig)) {\r\n memo.push(_.result(columnConfig, key, defaultValue));\r\n } else {\r\n memo.push(defaultValue);\r\n }\r\n\r\n return memo;\r\n }, []));\r\n }\r\n\r\n const filterString = currentFilter ? encodeURIComponent(currentFilter.odataV4({ ignoreCase: false })) : '';\r\n let filterUrlParam = filterString ? `$filter=${filterString}` : '';\r\n\r\n const filterCustomQueryParams = _.isFunction(customFilterQueryParams) ?\r\n customFilterQueryParams(currentFilter) : {};\r\n const additionalFilterUrlParams = URI.buildQuery(filterCustomQueryParams);\r\n if (additionalFilterUrlParams) {\r\n filterUrlParam = `${(filterUrlParam ? `${filterUrlParam}&` : '')}${additionalFilterUrlParams}`;\r\n }\r\n\r\n super.initialize({\r\n customDownloadService,\r\n downloadFormats,\r\n segmentationTypes,\r\n localizedHeaders,\r\n odataColumnNames,\r\n filterUrlParam,\r\n serializedFilter: filterService.serialize(),\r\n entity,\r\n gridId,\r\n totalRecordCount,\r\n processReportRule,\r\n validateSegmentType,\r\n isFeedbackEnabled,\r\n data,\r\n isForVNext: true,\r\n p$daterange,\r\n });\r\n }\r\n }\r\n\r\n const returns = callback(_.defaults({\r\n plugins: _.defaults({\r\n inlineDownload: _.defaults({\r\n DownloadView: CampaignODataDownloadView,\r\n }, config.plugins.inlineDownload),\r\n }, config.plugins),\r\n }, config), gridView, toolbar, segment);\r\n\r\n function createSimilarReportEmailRule(Rule) {\r\n Promise.all([\r\n setFilterByReportEmailRule({\r\n appConfig,\r\n filterService,\r\n ReportEmailRule: Rule,\r\n }),\r\n // Make sure grid is loaded then open inline download panel\r\n new Promise((resolve) => {\r\n gridView.once('didReload', () => {\r\n resolve();\r\n });\r\n }),\r\n ]).then(() => {\r\n returns.remove();\r\n returns.showDownloadView(Rule);\r\n });\r\n }\r\n\r\n if (ReportEmailRule) {\r\n createSimilarReportEmailRule(ReportEmailRule);\r\n }\r\n\r\n\r\n return _.defaults({\r\n setReportEmailRule(Rule) {\r\n createSimilarReportEmailRule(Rule);\r\n },\r\n }, returns);\r\n });\r\n });\r\n","import _ from 'underscore';\r\n\r\nfunction without(plugin, dependency, buildReplacement) {\r\n return definePlugin => plugin((name, dependencies, callback) => {\r\n const index = _.indexOf(dependencies, dependency);\r\n const newDeps = _.without(dependencies, dependency);\r\n return definePlugin(\r\n name,\r\n newDeps,\r\n (...args) => {\r\n const objDeps = _.object(newDeps, args);\r\n args.splice(index, 0, buildReplacement(objDeps));\r\n return callback(...args);\r\n }\r\n );\r\n });\r\n}\r\n\r\nexport function withoutFilterState(plugin) {\r\n return plugin;\r\n}\r\n\r\nexport function withoutSegment(plugin) {\r\n return without(plugin, 'segment', () => ({\r\n getAvailableSegmentationTypes: () => [],\r\n getSegmentType: () => null,\r\n validateSegmentType: () => true,\r\n }));\r\n}\r\n","import { inlineDownloadCampaignODataPlugin } from './campaign-odata-plugin';\r\nimport { withoutFilterState, withoutSegment } from './without-dependencies';\r\n\r\nexport const inlineDownloadWithoutFilterstatePlugin =\r\n withoutFilterState(inlineDownloadCampaignODataPlugin);\r\n\r\nexport const inlineDownloadWithoutSegmentPlugin =\r\n withoutSegment(inlineDownloadCampaignODataPlugin);\r\n\r\nexport const inlineDownloadWithoutFilterstateAndSegmentPlugin =\r\n withoutFilterState(withoutSegment(inlineDownloadCampaignODataPlugin));\r\n","import $ from 'jquery';\r\nimport _ from 'underscore';\r\nimport { decorate } from '@bingads-webui/dialog';\r\nimport { focusLockInstanceDecorator } from '@bingads-webui/focus-lock-decorator';\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\nimport { LabelsSelectorView, CreateLabelView, create, navigateToManagePage } from '@bingads-webui-campaign/labels';\r\n\r\nfunction getCheckMap(selectionInfo) {\r\n if (selectionInfo && selectionInfo.selectedItems) {\r\n const totalCount = selectionInfo.selectedRowIds.length;\r\n\r\n _.each(selectionInfo.selectedItems, (selectedItem) => {\r\n _.each(selectedItem.Labels, (label) => {\r\n if (typeof JSON.parse(label.Id) !== 'object' && label.Scope) {\r\n // eslint-disable-next-line no-param-reassign\r\n label.Id = JSON.stringify({ Id: label.Id, Scope: label.Scope });\r\n }\r\n });\r\n });\r\n\r\n // first got the ids of labels for each selected items\r\n // then got the count for each id by _.countby(_.flatten)\r\n const labelsCount = _.countBy(_.flatten(_.map(\r\n selectionInfo.selectedItems,\r\n rowItem => _.pluck(rowItem.Labels || [], 'Id')\r\n )));\r\n\r\n // finally map each label id to the different state based on whether its all checked\r\n const result = {};\r\n let isShortCycle = true;\r\n _.each(labelsCount, (count, id) => {\r\n if (count === totalCount) {\r\n result[id] = {\r\n Id: id,\r\n state: LabelsSelectorView.CheckState.checked,\r\n transition: LabelsSelectorView.CheckTransition.indeterminateToCheckedShortCycle,\r\n };\r\n } else {\r\n isShortCycle = false;\r\n result[id] = {\r\n Id: id,\r\n state: LabelsSelectorView.CheckState.indeterminate,\r\n transition: LabelsSelectorView.CheckTransition.indeterminateToCheckedFullCycle,\r\n };\r\n }\r\n });\r\n\r\n return {\r\n checkMap: result,\r\n isShortCycle,\r\n };\r\n }\r\n\r\n return {\r\n checkMap: null,\r\n };\r\n}\r\n\r\nfunction updateAssociation({\r\n grid,\r\n selectionInfo,\r\n LabelAssociationView,\r\n isForVNext,\r\n toolbarEditor,\r\n toolbar,\r\n disableDeselectAll,\r\n isManagementRequest,\r\n gridName,\r\n}) {\r\n return (_action, stats) => {\r\n const associationView = new LabelAssociationView({\r\n stats,\r\n selectionInfo,\r\n grid,\r\n isForVNext,\r\n disableDeselectAll,\r\n isManagementRequest,\r\n gridName,\r\n });\r\n\r\n associationView.updateSelectedEntityCount(selectionInfo.selectedRowCount);\r\n\r\n associationView.render();\r\n\r\n associationView.once('hide', () => {\r\n if (isForVNext) {\r\n toolbarEditor.overrideWith(null);\r\n }\r\n associationView.remove();\r\n\r\n toolbarEditor.restoreToolbar();\r\n toolbar.gridToolbarGroup.showAllToolbars();\r\n });\r\n\r\n if (isForVNext) {\r\n toolbarEditor.overrideWith(associationView);\r\n } else {\r\n const $bulkEditContainer = $('#bulkEditContainer');\r\n $bulkEditContainer.html(associationView.el).show();\r\n }\r\n\r\n // make labels column selected if it is not currently\r\n // fetch list of names this way since query does not\r\n // always get patched with list of selected columns\r\n // did this after update so that grid will show latest labels\r\n grid.gridView.once('didUpdate', () => {\r\n const columns = _.map(grid.gridView.get('columns'), ({ name }) => name);\r\n\r\n if (!_.contains(columns, 'Labels')) {\r\n columns.push('Labels');\r\n grid.pgridPlugins.columnChooser.setSelectedColumns(columns);\r\n }\r\n });\r\n };\r\n}\r\n\r\nexport function onCreate({\r\n grid,\r\n selectionInfo,\r\n i18n,\r\n i18nErrors,\r\n LabelAssociationView,\r\n s$label,\r\n instrumentation,\r\n jsdata,\r\n isForVNext,\r\n toolbarEditor,\r\n toolbar,\r\n disableDeselectAll,\r\n edm,\r\n scope,\r\n customerLevelLabelEnabled,\r\n isManagementRequest,\r\n gridName,\r\n}) {\r\n return () => {\r\n const CreateView = decorate(CreateLabelView, {\r\n title: i18n.getString('create_label_dialog_title'),\r\n position: 'center',\r\n popupFront: '.navbar-fixed-top',\r\n closeButtonAriaLabel: i18n.getString('Close'),\r\n });\r\n const createView = new CreateView({\r\n i18n, s$label, i18nErrors, isForVNext,\r\n }).render();\r\n\r\n createView.on('create', (label) => {\r\n create({\r\n jsdata,\r\n label,\r\n entityType: selectionInfo.entityType,\r\n instrumentation,\r\n edm,\r\n scope,\r\n })\r\n .then((results) => {\r\n const labelId = results.value;\r\n const stats = {\r\n added: {\r\n [`${labelId}`]: LabelsSelectorView.CheckState.checked,\r\n },\r\n };\r\n if (customerLevelLabelEnabled) {\r\n const id = JSON.stringify({ Id: labelId, Scope: selectionInfo.entityType === 'Account' ? 'Customer' : 'Account' });\r\n stats.added = { [id]: { id, state: LabelsSelectorView.CheckState.checked } };\r\n }\r\n updateAssociation({\r\n grid,\r\n selectionInfo,\r\n LabelAssociationView,\r\n isForVNext,\r\n toolbarEditor,\r\n toolbar,\r\n disableDeselectAll,\r\n isManagementRequest,\r\n gridName,\r\n })('apply', stats);\r\n })\r\n .then(() => createView.remove())\r\n .catch((res) => {\r\n // todo: this silently fails if the error is not from the server\r\n createView.setErrors(res.errors);\r\n })\r\n .finally(withUiBlock(createView.$el));\r\n });\r\n\r\n createView.on('cancel', () => createView.remove());\r\n };\r\n}\r\n\r\nexport function createLabelSelectorView({\r\n selectionInfo,\r\n grid,\r\n i18n,\r\n i18nErrors,\r\n router,\r\n LabelAssociationView,\r\n dataContextManager,\r\n cacheService,\r\n jsdata,\r\n s$label,\r\n instrumentation,\r\n isForVNext,\r\n toolbarEditor,\r\n toolbar,\r\n edm,\r\n scope,\r\n disableDeselectAll,\r\n customerLevelLabelEnabled,\r\n isManagementRequest,\r\n gridName,\r\n perfMarker,\r\n useSubMenu,\r\n}) {\r\n const { checkMap, isShortCycle } = getCheckMap(selectionInfo);\r\n\r\n let checkAll;\r\n if (selectionInfo && selectionInfo.allPages) {\r\n checkAll = LabelsSelectorView.CheckState.indeterminate;\r\n } else {\r\n checkAll = null;\r\n }\r\n\r\n const labelSelectorView = new LabelsSelectorView({\r\n checkAll,\r\n checkMap,\r\n i18n,\r\n dataContextManager,\r\n cacheService,\r\n jsdata,\r\n isForVNext,\r\n edm,\r\n scope,\r\n customerLevelLabelEnabled,\r\n isManagementRequest,\r\n gridName,\r\n useSubMenu,\r\n });\r\n\r\n if (isForVNext) {\r\n // AS remove it directly from label not work, remove it here for now\r\n // TODO: after new UI GA, remove this from label view\r\n labelSelectorView.$el.removeClass('dropdown-menu');\r\n\r\n // add this for hover experience\r\n let cycleStatusClass = 'tri-state-selector';\r\n if (isShortCycle) {\r\n cycleStatusClass = 'two-state-selector';\r\n }\r\n\r\n labelSelectorView.$el.addClass(cycleStatusClass);\r\n }\r\n\r\n labelSelectorView.on('apply', updateAssociation({\r\n grid,\r\n selectionInfo,\r\n LabelAssociationView,\r\n isForVNext,\r\n toolbarEditor,\r\n toolbar,\r\n disableDeselectAll,\r\n isManagementRequest,\r\n gridName,\r\n }));\r\n labelSelectorView.on('create', onCreate({\r\n grid,\r\n selectionInfo,\r\n i18n,\r\n i18nErrors,\r\n LabelAssociationView,\r\n s$label,\r\n instrumentation,\r\n jsdata,\r\n isForVNext,\r\n toolbarEditor,\r\n toolbar,\r\n disableDeselectAll,\r\n edm,\r\n scope,\r\n customerLevelLabelEnabled,\r\n isManagementRequest,\r\n gridName,\r\n }));\r\n labelSelectorView.on('manage', () => { navigateToManagePage(router); });\r\n\r\n if (perfMarker) {\r\n labelSelectorView.on('request:data:beginning', () => {\r\n perfMarker.willFetchData();\r\n });\r\n labelSelectorView.on('request:data:finished', () => {\r\n perfMarker.willRender();\r\n });\r\n labelSelectorView.on('load:data', () => {\r\n if (!perfMarker.isDone) {\r\n perfMarker.done();\r\n }\r\n });\r\n }\r\n\r\n if (isForVNext) {\r\n const LabelSelectorViewWithFocusLock = focusLockInstanceDecorator(labelSelectorView, {\r\n focusFirstItemOnMount: true,\r\n }, {\r\n managed: true,\r\n });\r\n\r\n return new LabelSelectorViewWithFocusLock();\r\n }\r\n\r\n return labelSelectorView;\r\n}\r\n\r\n","/**\r\n * @file Label plugin for projection grids.\r\n *\r\n */\r\nimport $ from 'jquery';\r\nimport _ from 'underscore';\r\n\r\nimport { createLabelSelectorView } from './create-label-selector-view';\r\n\r\n/**\r\n * Projection grid labels plugin,\r\n * User need to set these things in config\r\n * filterService: the filterService which can get current filter using getCombinedFilter\r\n * labels: {\r\n * i18n { getString }, localization setting\r\n * i18nErrors { getODataErrors }, localization for odata errors\r\n * LabelAssociationView: the label association view, it's sub class of AssociationView\r\n * router: { navigateToRoute }, specify the routing function\r\n * dataContextManager: { getContext } provide function to get context of request\r\n * cacheService: {cache} provide cache function\r\n * instrumentation - instrumentation that already intilized\r\n * and which should contains the senario of label and activity of createLabel\r\n * jsdata\r\n * s$label: schema for label\r\n * @param { object } definePlugin: function pointer used to define plugin for grid\r\n * @returns {void}\r\n */\r\nexport const labelsPlugin = definePlugin => definePlugin('labels', [\r\n 'config',\r\n 'gridView',\r\n 'toolbar',\r\n 'columnChooser',\r\n 'pagination',\r\n 'crossPageSelectAll',\r\n], (config, gridView, toolbar, columnChooser, pagination, crossPageSelectAll) => {\r\n const {\r\n i18n,\r\n i18nErrors,\r\n LabelAssociationView,\r\n router,\r\n dataContextManager,\r\n cacheService,\r\n instrumentation,\r\n jsdata,\r\n s$label,\r\n scope,\r\n edm,\r\n isForVNext = false,\r\n disableDeselectAll = false,\r\n isManagementRequest = undefined,\r\n perfMarker,\r\n } = _.result(config.plugins, 'labels', {});\r\n const appCfg = config.config || { get: () => ({}) };\r\n const { dataSource, filterService } = config;\r\n\r\n let labelSelectorView = null;\r\n let $dropdownContainer = null;\r\n let labelSelectorPerfMarker = null;\r\n const useSubMenu = true; // Add a flag to indicate the change with this flag useSubMenu should be related\r\n const labelDropdownId = 'dropdown-labels';\r\n const toolbarEditor = config.plugins.labels.toolbar ||\r\n toolbar.gridToolbarGroup.toolbarWithItem(labelDropdownId);\r\n\r\n function getEntityName() {\r\n if (!dataSource) {\r\n return undefined;\r\n }\r\n const entityName = dataSource.entity && dataSource.entity.name;\r\n const resourceName = dataSource.resource && dataSource.resource.name;\r\n return entityName || resourceName;\r\n }\r\n\r\n function getSelectionInfo(entityType) {\r\n const info = {\r\n entityType,\r\n scope,\r\n };\r\n\r\n if (crossPageSelectAll.isAllSelected) {\r\n info.allPages = true;\r\n info.selectedRowIds = null;\r\n info.selectedRowCount = gridView.totalCountRows;\r\n } else {\r\n info.allPages = false;\r\n info.selectedItems = gridView.selectedItems().map(x => _.pick(x, 'Id', 'Labels'));\r\n info.selectedRowIds = info.selectedItems.map(x => x.Id);\r\n info.selectedRowCount = info.selectedRowIds.length;\r\n }\r\n\r\n return info;\r\n }\r\n\r\n function createGridObjectForLegacyPlugins() {\r\n return {\r\n gridView,\r\n pgridPlugins: {\r\n pagination,\r\n filterService,\r\n crossPageSelectAll,\r\n columnChooser,\r\n },\r\n };\r\n }\r\n\r\n function showSelector(oldSelector, selectionInfo) {\r\n if (perfMarker) {\r\n labelSelectorPerfMarker = perfMarker.createChild('Label_Selector_View');\r\n labelSelectorPerfMarker.willInit();\r\n }\r\n\r\n const permissions = appCfg.get('Permissions');\r\n const isAccountLabelsEnabled =\r\n permissions && permissions.IsAccountLabelsEnabled;\r\n if (labelSelectorView) {\r\n labelSelectorView.remove();\r\n }\r\n\r\n labelSelectorView = createLabelSelectorView({\r\n grid: createGridObjectForLegacyPlugins(),\r\n selectionInfo,\r\n i18n,\r\n i18nErrors,\r\n router,\r\n LabelAssociationView,\r\n dataContextManager,\r\n cacheService,\r\n jsdata,\r\n s$label,\r\n instrumentation,\r\n isForVNext,\r\n toolbarEditor,\r\n toolbar,\r\n disableDeselectAll,\r\n edm,\r\n scope,\r\n customerLevelLabelEnabled: isAccountLabelsEnabled,\r\n isManagementRequest,\r\n gridName: config.name,\r\n perfMarker: labelSelectorPerfMarker,\r\n useSubMenu,\r\n });\r\n\r\n // useSubMenu, create a subMenu inside the dropdown with search bar and search results\r\n if (useSubMenu) {\r\n // change the role of the dropdown from menu to group\r\n $dropdownContainer.attr('role', 'group');\r\n }\r\n $dropdownContainer.append(labelSelectorView.el);\r\n\r\n labelSelectorView.render();\r\n }\r\n\r\n function unbindDropdownContainerClick() {\r\n if ($dropdownContainer && _.isFunction($dropdownContainer.off)) {\r\n $dropdownContainer.off('click');\r\n }\r\n }\r\n\r\n function setupLabelMenu() {\r\n unbindDropdownContainerClick();\r\n $dropdownContainer = toolbarEditor.$('#dropdown-labels');\r\n const entityName = getEntityName();\r\n\r\n $dropdownContainer.click(() => {\r\n const selectionInfo = getSelectionInfo(entityName);\r\n\r\n if (selectionInfo.selectedRowCount > 0) {\r\n showSelector(null, selectionInfo, gridView);\r\n }\r\n });\r\n }\r\n\r\n function updateToolbar() {\r\n const permissions = appCfg.get('Permissions');\r\n const isAccountLabelsEnabled =\r\n permissions && permissions.IsAccountLabelsEnabled;\r\n let shouldBeDisabled = !gridView || gridView.selectedItems().length === 0;\r\n if (isForVNext) {\r\n shouldBeDisabled = appCfg.get('Permissions').IsReadOnlyUser || (appCfg.get('CurrentAccountInActive') && scope.values.aid !== undefined);\r\n }\r\n\r\n if (isAccountLabelsEnabled) {\r\n shouldBeDisabled = shouldBeDisabled ||\r\n (!crossPageSelectAll.isAllSelected && gridView.selectedItems() && gridView.selectedItems()\r\n .some(item => item.AccountType === 'ManagerAccount'));\r\n }\r\n\r\n const updateToolbarConfig = {\r\n type: 'dropdown',\r\n id: labelDropdownId,\r\n classes: ['btn-secondary'],\r\n button: {\r\n text: i18n.getString('Grid_Labels'),\r\n disabled: shouldBeDisabled,\r\n },\r\n };\r\n\r\n if (isForVNext) {\r\n updateToolbarConfig.iconLeftGlyphName = 'ba-Label';\r\n\r\n updateToolbarConfig.onClick = (event) => {\r\n // click inside label selector, just return\r\n if ($(event.target).closest('.labels-selector').length > 0) {\r\n return;\r\n }\r\n // put labels inside the ul\r\n $dropdownContainer = $('#dropdown-labels').parent().find('ul.dropdown-menu');\r\n const selectionInfo = getSelectionInfo(getEntityName());\r\n\r\n if (selectionInfo.selectedRowCount > 0) {\r\n showSelector(null, selectionInfo, gridView);\r\n }\r\n };\r\n }\r\n toolbarEditor.update(updateToolbarConfig);\r\n }\r\n\r\n updateToolbar();\r\n\r\n // Don't need to redraw toolbar for vnext\r\n if (!isForVNext) {\r\n if (gridView) {\r\n gridView.on('didUpdate', () => {\r\n updateToolbar();\r\n setupLabelMenu();\r\n });\r\n }\r\n }\r\n\r\n function removeView() {\r\n unbindDropdownContainerClick();\r\n\r\n if (labelSelectorView) {\r\n labelSelectorView.remove();\r\n }\r\n }\r\n\r\n\r\n const permissions = appCfg.get('Permissions');\r\n const isAccountLabelsEnabled =\r\n permissions && permissions.IsAccountLabelsEnabled;\r\n\r\n if (isAccountLabelsEnabled) {\r\n gridView.on('didSelect', () => {\r\n updateToolbar();\r\n });\r\n }\r\n return {\r\n remove: removeView,\r\n };\r\n});\r\n","import _ from 'underscore';\r\nimport { formatMetricValue } from '@bingads-webui-campaign/campaignui-common-columns';\r\n\r\nimport headerTemplate from './header.pug';\r\nimport cellTemplate from './cell.pug';\r\n\r\nconst biPattern = /^(Phone)?PerformanceMetrics\\//;\r\nconst phoneBiPattern = /^PhonePerformanceMetrics\\//;\r\nconst biReplacePattern = /PerformanceMetrics\\//;\r\nconst biSubColPrefix = 'PopSubCol';\r\n\r\nfunction getPoPCols(column, popTitles, i18n) {\r\n const prop = column.property;\r\n let propertyKey = _.isString(prop) ? prop : prop.key;\r\n let parentProperty = null;\r\n let isColumnWithFluc = false;\r\n\r\n // Handle performance metric column with fluctuations\r\n if (prop && prop.key && _.isArray(prop.key)) {\r\n propertyKey = _.find(prop.key, key => biPattern.test(key));\r\n parentProperty = prop;\r\n isColumnWithFluc = true;\r\n }\r\n\r\n const columnWithFlucTemplate = ({ value }) => {\r\n // eslint-disable-next-line max-len\r\n // Hack here: Columns with fluctuation are used in [Clics, Impressions, Spend]. Only Spend's format is decimal. Spend column in performance grid is called TotalEffectiveCost.\r\n const format = column.name === 'Spend' || column.name === 'TotalEffectiveCost' ? 'decimal' : 'integer';\r\n return cellTemplate({ value: formatMetricValue({ i18n, format, metricValue: value }) });\r\n };\r\n\r\n const { subColumns = {}, template: parentTemplate, ...parentColumn } = column;\r\n\r\n const primaryName = `${biSubColPrefix}${column.name}`;\r\n const primary = _.defaults({\r\n name: primaryName,\r\n property: parentProperty || propertyKey,\r\n helpId: null,\r\n title: popTitles.primary,\r\n width: column[`${biSubColPrefix}Width`],\r\n headAttributes: _.defaults(\r\n { 'aria-label': popTitles.primary },\r\n { 'data-column': primaryName },\r\n { style: `width: ${column[`${biSubColPrefix}Width`]}px` },\r\n column.headAttributes || {}\r\n ),\r\n bodyAttributes: {\r\n 'data-column': primaryName,\r\n style: `width: ${column[`${biSubColPrefix}Width`]}px`,\r\n },\r\n template: parentTemplate,\r\n }, subColumns[primaryName], parentColumn);\r\n\r\n const compareName = `Compared${column.name}`;\r\n const compare = _.defaults({\r\n name: compareName,\r\n property: phoneBiPattern.test(propertyKey) ?\r\n propertyKey.replace(phoneBiPattern, 'PhonePeriodPerformanceMetrics/') :\r\n `Period${propertyKey}`,\r\n helpId: null,\r\n width: column.ComparedWidth,\r\n title: popTitles.compared,\r\n sortable: _.defaults({\r\n key: `PoP${propertyKey}`,\r\n }, column.sortable),\r\n headAttributes: _.defaults(\r\n { 'aria-label': popTitles.compared },\r\n { 'data-column': compareName },\r\n { style: `width: ${column.ComparedWidth}px` },\r\n column.headAttributes || {}\r\n ),\r\n bodyAttributes: {\r\n 'data-column': compareName,\r\n style: `width: ${column.ComparedWidth}px`,\r\n },\r\n template: isColumnWithFluc ? columnWithFlucTemplate : parentTemplate,\r\n }, subColumns[compareName], parentColumn);\r\n\r\n let property = propertyKey.replace(biReplacePattern, 'PerformanceMetricsChange/');\r\n const changeTitle = i18n.getString('PoP_Sub_Title_Change');\r\n const changeName = `${column.name}Change`;\r\n const change = _.defaults({\r\n name: changeName,\r\n property,\r\n helpId: 'pop_BA_Reporting_Clarity_POPChange',\r\n title: changeTitle,\r\n width: column.ChangeWidth,\r\n helpAriaLabel: i18n.getString(_TL_('Click to learn more about {{item}}'), { item: changeTitle }),\r\n sortable: _.defaults({\r\n key: `PoP${property}`,\r\n }, column.sortable),\r\n headAttributes: _.defaults(\r\n { 'aria-label': changeTitle },\r\n { 'data-column': changeName },\r\n { style: `width: ${column.ChangeWidth}px` },\r\n column.headAttributes || {}\r\n ),\r\n bodyAttributes: {\r\n 'data-column': changeName,\r\n style: `width: ${column.ChangeWidth}px`,\r\n },\r\n template: isColumnWithFluc ? columnWithFlucTemplate : parentTemplate,\r\n }, subColumns[changeName], parentColumn);\r\n\r\n property = propertyKey.replace(biReplacePattern, 'PerformanceMetricsChangePercentage/');\r\n const changePercentTitle = i18n.getString('PoP_Sub_Title_Change_Percentage');\r\n const changePercentName = `${column.name}ChangePercentage`;\r\n const changePercent = _.defaults({\r\n name: changePercentName,\r\n property,\r\n helpId: 'pop_BA_Reporting_Clarity_POPChangePercent',\r\n title: changePercentTitle,\r\n width: column.PopSubColWidth,\r\n helpAriaLabel: i18n.getString(_TL_('Click to learn more about {{item}}'), { item: changePercentTitle }),\r\n sortable: _.defaults({\r\n key: `PoP${property}`,\r\n }, column.sortable),\r\n headAttributes: _.defaults(\r\n { 'aria-label': changePercentTitle },\r\n { 'data-column': changePercentName },\r\n { style: `width: ${column.ChangePercentageWidth}px` },\r\n column.headAttributes || {}\r\n ),\r\n bodyAttributes: {\r\n 'data-column': changePercentName,\r\n style: `width: ${column.ChangePercentageWidth}px`,\r\n },\r\n template: ({ value }) => {\r\n let formatted;\r\n // Show ∞ instead of NaN.00% if MT returns double.MaxValue or float.MaxValue\r\n if (value > 3.4e+38) {\r\n formatted = '∞';\r\n } else {\r\n formatted = i18n.formatPercent(value / 100, {\r\n maximumFractionDigits: 2,\r\n minimumFractionDigits: 2,\r\n });\r\n }\r\n return cellTemplate({ value: formatted });\r\n },\r\n }, subColumns[changePercentName], parentColumn);\r\n\r\n const columns = [primary, compare, change, changePercent];\r\n\r\n return _.map(columns, col => _.defaults({\r\n html: headerTemplate(col),\r\n }, col));\r\n}\r\n\r\nfunction getPopTitles(dateRange) {\r\n const primary = dateRange.formatedStart === dateRange.formatedEnd\r\n && dateRange.RangeStartDate === dateRange.RangeEndDate ?\r\n dateRange.startDate || dateRange.RangeStartDate :\r\n `${dateRange.formatedStart || dateRange.RangeStartDate} - ${dateRange.formatedEnd || dateRange.RangeEndDate}`;\r\n const compared = dateRange.compared.formattedStart === dateRange.compared.formattedEnd ?\r\n dateRange.compared.formattedStart :\r\n `${dateRange.compared.formattedStart} - ${dateRange.compared.formattedEnd}`;\r\n\r\n return { primary, compared };\r\n}\r\n\r\nfunction updateSubCols(columnsCur, expandedCols, popTitles, i18n) {\r\n return _.map(columnsCur, (column) => {\r\n if (_.contains(expandedCols, column.name)) {\r\n return _.defaults({ columns: getPoPCols(column, popTitles, i18n) }, column);\r\n } else if (biPattern.test(column.property)) {\r\n return _.omit(column, 'columns');\r\n } else if (column.columns && column.columns.length > 0) {\r\n return _.defaults({ columns: updateSubCols(column.columns, expandedCols) }, column);\r\n }\r\n\r\n return column;\r\n });\r\n}\r\n\r\nexport default {\r\n name: 'popColumns',\r\n handler: function popColumns(state, { expandedCols, dateRange, i18n } = {}) {\r\n const isComparing = Boolean(dateRange.compared);\r\n const expanded = isComparing ? expandedCols : [];\r\n const popTitles = isComparing ? getPopTitles(dateRange) : null;\r\n\r\n const columns = updateSubCols(state.columns, expanded, popTitles, i18n);\r\n\r\n return _.defaults({\r\n columns,\r\n popStatus: { isComparing },\r\n }, state);\r\n },\r\n defaults: {\r\n expandedCols: [],\r\n dateRange: {},\r\n },\r\n};\r\n","import _ from 'underscore';\r\nimport popHeaderTemplate from './period-over-period-header.pug';\r\n\r\nconst biPattern = /^(Phone)?PerformanceMetrics\\//;\r\nconst biSubColPattern = /^PopSubCol/;\r\nexport const biSubColPrefix = 'PopSubCol';\r\n\r\nfunction groupHandler(e) {\r\n const name = this.$(e.target).closest('th, .th').attr('data-name');\r\n const popColumnsCur = this.get('popColumns');\r\n const popColumns = _.defaults({\r\n expandedCols: _.contains(popColumnsCur.expandedCols, name) ?\r\n _.without(popColumnsCur.expandedCols, name) :\r\n _.union(popColumnsCur.expandedCols, [name]),\r\n }, popColumnsCur);\r\n\r\n const sortableHeaderCur = this.get('sortableHeader') || {};\r\n let sortableHeader = null;\r\n\r\n if (sortableHeaderCur.name === name) {\r\n sortableHeader = _.defaults({ name: `${biSubColPrefix}${name}` }, sortableHeaderCur);\r\n } else if (sortableHeaderCur.name === `${biSubColPrefix}${name}`) {\r\n sortableHeader = _.defaults({ name }, sortableHeaderCur);\r\n }\r\n\r\n if (sortableHeader) {\r\n this.set({ sortableHeader });\r\n }\r\n\r\n e.stopPropagation();\r\n\r\n this.set({ popColumns });\r\n\r\n // This is a workaround for the column alignment issue on IE\r\n // After redrawing the table with new column set, IE and Edge doesn't relayout\r\n // the table correctly. We need to reattach the table to DOM to force relayout\r\n this.once('didUpdate', () => { // eslint-disable-line no-invalid-this\r\n const elTable = this.$('table').get(-1); // eslint-disable-line no-invalid-this\r\n\r\n if (elTable) {\r\n elTable.parentElement.appendChild(elTable);\r\n }\r\n });\r\n}\r\n\r\nfunction isPoPColumn(column) {\r\n return column &&\r\n !biSubColPattern.test(column.name) &&\r\n column.property &&\r\n biPattern.test(column.property.key);\r\n}\r\n\r\nexport const popHeader = {\r\n name: 'popHeader',\r\n handler: function popHeader(state, { i18n }) {\r\n const patch = {};\r\n\r\n if (state.popStatus.isComparing) {\r\n patch.headRows = _.map(state.headRows, (row) => {\r\n let isPopHeaderRow = false;\r\n const patchRow = {};\r\n\r\n patchRow.cells = _.map(row.cells, (cell) => {\r\n const patchCell = {};\r\n const column = state.columnGroup.columnIndex[cell.name];\r\n\r\n if (isPoPColumn(column)) {\r\n const expanded = column.columns && column.columns.length > 0;\r\n\r\n patchCell.html = popHeaderTemplate({\r\n html: cell.html,\r\n icon: expanded ? 'minus' : 'plus',\r\n ariaLabel:\r\n expanded ? i18n.getString(_TL_('Click to minimize column {{columnName}}'), { columnName: column.title })\r\n : i18n.getString(_TL_('Click to expand column {{columnName}}'), { columnName: column.title }),\r\n });\r\n\r\n if (expanded) {\r\n patchCell.classes = _.chain(cell.classes)\r\n .without('text-left', 'text-right')\r\n .union(['text-center', 'pop-column-header'])\r\n .value();\r\n } else {\r\n patchCell.classes = _.union(cell.classes, ['pop-column-header']);\r\n }\r\n\r\n isPopHeaderRow = true;\r\n } else if (isPoPColumn(_.result(column, 'parent'))) {\r\n patchCell.classes = _.union(cell.classes, ['pop-column-header']);\r\n isPopHeaderRow = true;\r\n }\r\n\r\n return _.defaults(patchCell, cell);\r\n });\r\n\r\n if (isPopHeaderRow) {\r\n patchRow.classes = _.union(row.classes, ['pop-enabled']);\r\n }\r\n\r\n return _.defaults(patchRow, row);\r\n });\r\n\r\n patch.events = _.defaults({\r\n 'click span.pop-toggle-icon': groupHandler,\r\n }, state.events);\r\n }\r\n\r\n return _.defaults(patch, state);\r\n },\r\n};\r\n","import _ from 'underscore';\r\nimport popColumns from './projection/period-over-period-columns';\r\nimport { biSubColPrefix, popHeader } from './projection/period-over-period-header';\r\n\r\nexport const periodOverPeriodPlugin = definePlugin => definePlugin('popColumns', [\r\n 'config',\r\n 'gridView',\r\n 'dateFilter',\r\n], (\r\n config,\r\n gridView,\r\n dateFilter\r\n) => {\r\n const pluginConfig = _.result(config.plugins, 'popColumns', {});\r\n const { i18n } = pluginConfig;\r\n\r\n const sortableHeaderCur = gridView.get('sortableHeader') || {};\r\n\r\n if (sortableHeaderCur.name && sortableHeaderCur.name.indexOf(biSubColPrefix) === 0) {\r\n const sortableHeader = _.defaults({\r\n name: sortableHeaderCur.name.slice(biSubColPrefix.length),\r\n }, sortableHeaderCur);\r\n gridView.set({ sortableHeader });\r\n }\r\n\r\n gridView.set({\r\n popHeader: {\r\n i18n,\r\n },\r\n });\r\n\r\n dateFilter.p$getCurrentDateRange().then((dateRange) => {\r\n gridView.set({\r\n popColumns: {\r\n expandedCols: [],\r\n dateRange,\r\n i18n,\r\n },\r\n });\r\n\r\n gridView.pipeStructureProjections(popColumns);\r\n gridView.pipeContentProjections(popHeader);\r\n });\r\n\r\n dateFilter.events.on('dateChange', () => {\r\n gridView.once('didReload', () => {\r\n const popColumnsConfig = gridView.get('popColumns');\r\n\r\n gridView.set({\r\n popColumns: _.defaults({\r\n dateRange: dateFilter.getCurrentDateRange(),\r\n }, popColumnsConfig),\r\n });\r\n });\r\n });\r\n});\r\n","import _ from 'underscore';\r\nimport { get, set } from '@bingads-webui-universal/primitive-utilities';\r\n\r\nconst biPattern = /^(Phone)?PerformanceMetrics\\//;\r\nconst isBiColumn = (column) => {\r\n let key;\r\n\r\n if (_.isString(column.property)) {\r\n key = column.property;\r\n } else if (column.property) {\r\n ({ key } = column.property);\r\n key = _.isArray(key) && key.length > 0 ? key[0] : key;\r\n }\r\n\r\n return biPattern.test(key);\r\n};\r\n\r\nconst appendSegmentFlag = (property) => {\r\n if (_.isFunction(property)) {\r\n return model => ({\r\n IsSegmentRow: model.IsSegmentRow,\r\n property: {\r\n value: property(model),\r\n },\r\n });\r\n } else if (_.isObject(property) && _.isFunction(property.get)) {\r\n return _.defaults({\r\n get: model => ({\r\n IsSegmentRow: model.IsSegmentRow,\r\n property: {\r\n value: property.get(model),\r\n },\r\n }),\r\n }, property);\r\n } else if (_.isString(property)) {\r\n return {\r\n get: model => ({\r\n IsSegmentRow: model.IsSegmentRow,\r\n property: {\r\n value: get(model, property.replace(/\\//g, '.')),\r\n },\r\n }),\r\n key: property,\r\n };\r\n }\r\n\r\n throw new Error('unknown property type.');\r\n};\r\n\r\nconst segmentConfig = [{\r\n segArray: 'PerformanceMetrics.SegmentedData',\r\n from: 'Key[0].StringValue',\r\n to: 'SegmentValue',\r\n}, {\r\n segArray: 'PerformanceMetrics.SegmentedData',\r\n from: 'Key[0].SegmentationType',\r\n to: 'SegmentationType',\r\n}, {\r\n segArray: 'PerformanceMetrics.SegmentedData',\r\n from: 'Data',\r\n to: 'PerformanceMetrics',\r\n}, {\r\n segArray: 'PeriodPerformanceMetrics.SegmentedData',\r\n from: 'Data',\r\n to: 'PeriodPerformanceMetrics',\r\n}, {\r\n segArray: 'PerformanceMetricsChange.SegmentedData',\r\n from: 'Data',\r\n to: 'PerformanceMetricsChange',\r\n}, {\r\n segArray: 'PerformanceMetricsChangePercentage.SegmentedData',\r\n from: 'Data',\r\n to: 'PerformanceMetricsChangePercentage',\r\n}, {\r\n segArray: 'PhonePerformanceMetrics.SegmentedData',\r\n from: 'Data',\r\n to: 'PhonePerformanceMetrics',\r\n}, {\r\n segArray: 'PhonePeriodPerformanceMetrics.SegmentedData',\r\n from: 'Data',\r\n to: 'PhonePeriodPerformanceMetrics',\r\n}, {\r\n segArray: 'PhonePerformanceMetricsChange.SegmentedData',\r\n from: 'Data',\r\n to: 'PhonePerformanceMetricsChange',\r\n}, {\r\n segArray: 'PhonePerformanceMetricsChangePercentage.SegmentedData',\r\n from: 'Data',\r\n to: 'PhonePerformanceMetricsChangePercentage',\r\n}];\r\n\r\nfunction isAggregateRow(row) {\r\n return !!(_.result(row.item, '$total', false) || _.result(row.item, 'AggregateName', false));\r\n}\r\n\r\nexport default {\r\n name: 'segment',\r\n handler: function segment(state, { expandedAggregate = [] } = {}) {\r\n const columns = _.map(state.columns, (column) => {\r\n if (isBiColumn(column)) {\r\n return column;\r\n }\r\n\r\n return _.defaults({\r\n property: appendSegmentFlag(column.property || column.name),\r\n template: (prop) => {\r\n if (prop.value.IsSegmentRow) {\r\n return ' ';\r\n }\r\n\r\n return _.isFunction(column.template) ? column.template(prop.value.property) : undefined;\r\n },\r\n }, column);\r\n });\r\n\r\n const bodyRows = _.reduce(state.bodyRows.slice(), (memo, row) => {\r\n let result = memo;\r\n const r = _.extend({}, row);\r\n\r\n const segs = _.reduce(segmentConfig, (m, { segArray, from, to }) => {\r\n const toSeg = get(row.item, segArray);\r\n const rowType = _.result(row.item, '$total', {}).type;\r\n const segsInRow = m.slice();\r\n\r\n if (toSeg && toSeg.length > 0) {\r\n if (!isAggregateRow(row) ||\r\n _.contains(expandedAggregate, rowType || row.item.AggregateName)) {\r\n _.each(toSeg, (obj, index) => {\r\n segsInRow[index] = segsInRow[index] || {};\r\n segsInRow[index].classes = segsInRow[index].classes || r.classes || [];\r\n segsInRow[index].item = segsInRow[index].item || {};\r\n set(segsInRow[index].item, to, get(obj, from));\r\n segsInRow[index].item.IsSegmentRow = true;\r\n });\r\n }\r\n\r\n r.item = _.defaults({\r\n HasSegmentRow: true,\r\n }, r.item);\r\n }\r\n\r\n return segsInRow;\r\n }, []);\r\n\r\n result = result.concat(r);\r\n result = result.concat(segs);\r\n return result;\r\n }, []);\r\n\r\n return _.defaults({ bodyRows, columns }, state);\r\n },\r\n defaults: {},\r\n};\r\n","import _ from 'underscore';\r\nimport { localizeSegmentationValue } from '@bingads-webui-campaign/segmentation-utilities';\r\nimport defaultTemplate from './segment-value-cell-default.pug';\r\n\r\nfunction toggleAggregateSeg(e) {\r\n const name = this.$(e.target).closest('tr, .tr').attr('data-aggregate-name'); // eslint-disable-line no-invalid-this\r\n const segmentCur = this.get('segment'); // eslint-disable-line no-invalid-this\r\n const expandedAggregateCur = segmentCur.expandedAggregate;\r\n const expandedAggregate = _.contains(expandedAggregateCur, name) ?\r\n _.without(expandedAggregateCur, name) :\r\n _.union(expandedAggregateCur, [name]);\r\n\r\n this.set({\r\n segment: _.defaults({ expandedAggregate }, segmentCur),\r\n });\r\n}\r\n\r\nfunction isAggregateRow(row) {\r\n return !!(_.result(row.item, '$total', false) || _.result(row.item, 'AggregateName', false));\r\n}\r\n\r\nfunction translateSegRow(columnGroup, r, index, segmentCellStyleConfig, segmentConfig) {\r\n let row = _.extend({}, r);\r\n\r\n if (_.result(row.item, 'IsSegmentRow', false) || isAggregateRow(row)) {\r\n const patch = {};\r\n\r\n patch.cells = _.map(columnGroup.leafColumns, (col, colIndex) => {\r\n if (_.has(segmentCellStyleConfig.cellTemplates, col.name)) {\r\n let newHtml = null;\r\n const template = segmentCellStyleConfig.cellTemplates[col.name] === 'default' ?\r\n defaultTemplate :\r\n segmentCellStyleConfig.cellTemplates[col.name];\r\n\r\n if (isAggregateRow(row)) {\r\n const rowType = _.result(row.item, '$total', {}).type;\r\n const expanded = _.contains(segmentConfig.expandedAggregate, rowType ||\r\n row.item.AggregateName);\r\n\r\n const value = _.result(row.item, '$total', {}).text || row.item.AggregateName;\r\n\r\n newHtml = template({\r\n value,\r\n isAggregate: true,\r\n hasSegment: row.item.HasSegmentRow && !row.item.isTopAggregate,\r\n expanded,\r\n helpId: _.result(row.item, '$total', {}).helpId,\r\n helpAriaLabel: segmentCellStyleConfig.i18n.getString(_TL_('Click to learn more about {{item}}'), { item: value }),\r\n });\r\n } else {\r\n newHtml = template({\r\n value: localizeSegmentationValue({\r\n i18n: segmentCellStyleConfig.i18n,\r\n type: row.item.SegmentationType,\r\n value: row.item.SegmentValue,\r\n }),\r\n });\r\n }\r\n return _.defaults({\r\n html: newHtml,\r\n }, row.cells[colIndex]);\r\n }\r\n\r\n return row.cells[colIndex];\r\n });\r\n\r\n if (_.result(row.item, 'IsSegmentRow', false)) {\r\n row.classes = row.classes.concat('segment-row');\r\n } else {\r\n row = _.defaults({\r\n attributes: _.defaults({\r\n 'data-aggregate-name': _.result(row.item, '$total', {}).type || row.item.AggregateName,\r\n }, row.attributes),\r\n }, row);\r\n }\r\n\r\n return _.defaults(patch, row);\r\n }\r\n\r\n return row;\r\n}\r\n\r\nexport default {\r\n name: 'segmentCellStyle',\r\n handler: function segmentCellStyle(state, segmentCellStyleConfig) {\r\n const { columnGroup } = state;\r\n const segmentConfig = this.get('segment'); // eslint-disable-line no-invalid-this\r\n\r\n const bodyRows = {\r\n length: state.bodyRows.length,\r\n slice: (begin = 0, end = state.bodyRows.length) => state.bodyRows.slice(begin, end)\r\n .map((row, index) => translateSegRow(\r\n columnGroup,\r\n row,\r\n index + begin,\r\n segmentCellStyleConfig,\r\n segmentConfig\r\n )),\r\n };\r\n\r\n const events = _.defaults({\r\n 'click .aggregate-row td .glyphicon-triangle-right, .aggregate-row .td .glyphicon-triangle-right': toggleAggregateSeg,\r\n 'click .aggregate-row td .glyphicon-triangle-bottom, .aggregate-row .td .glyphicon-triangle-bottom': toggleAggregateSeg,\r\n 'click .aggregated-row td .glyphicon-triangle-right, .aggregated-row .td .glyphicon-triangle-right': toggleAggregateSeg,\r\n 'click .aggregated-row td .glyphicon-triangle-bottom, .aggregated-row .td .glyphicon-triangle-bottom': toggleAggregateSeg,\r\n }, state.events);\r\n\r\n return _.defaults({\r\n bodyRows,\r\n events,\r\n }, state);\r\n },\r\n defaults: {},\r\n};\r\n","import Backbone from 'backbone';\r\nimport template from './segment-alert.pug';\r\n\r\nexport default class View extends Backbone.View {\r\n get events() {\r\n return {\r\n 'click input.btn-default': '_ok',\r\n };\r\n }\r\n\r\n _ok() {\r\n this.trigger('ok');\r\n }\r\n\r\n render({\r\n segType,\r\n i18n,\r\n }) {\r\n this.$el.html(template({\r\n i18n,\r\n segmentationType: segType,\r\n }));\r\n\r\n return this;\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { decorate } from '@bingads-webui/dialog';\r\nimport {\r\n getSupportedSegmentationTree,\r\n isSegmentationTypeSupported,\r\n isTimeRangeValid,\r\n localizeSegmentationType,\r\n campaignSegmentationTypeEnum,\r\n} from '@bingads-webui-campaign/segmentation-utilities';\r\nimport { get } from '@bingads-webui-universal/primitive-utilities';\r\nimport segment from './projection/segment';\r\nimport segmentCellStyle from './projection/segment-cell-style';\r\nimport segmentAlert from './segment-alert';\r\n\r\nfunction changeEntitySet(queryParams, segType, edm) {\r\n const { options } = queryParams;\r\n const entitySet = edm.root.identifyEntitySet(options.entitySet.toJSON());\r\n\r\n const action = entitySet.navigation.source;\r\n const gridDataParameters = segType ?\r\n _.defaults({\r\n SegmentationTypes: [segType],\r\n }, entitySet.navigation.parameters.gridDataParameters) :\r\n _.omit(entitySet.navigation.parameters.gridDataParameters, 'SegmentationTypes');\r\n const parameters = _.defaults({ gridDataParameters }, entitySet.navigation.parameters);\r\n\r\n return _.defaults({\r\n options: _.defaults({\r\n entitySet: action.$call(parameters),\r\n }, options),\r\n }, queryParams);\r\n}\r\n\r\nfunction changeQueryParams(queryParams, segType) {\r\n const query = segType ? _.defaults({ SegmentationTypes: segType }, queryParams.query) : _.omit(queryParams.query, 'SegmentationTypes');\r\n\r\n return _.defaults({\r\n query,\r\n }, queryParams);\r\n}\r\n\r\nfunction updateSource(gridView, segType, isOdataActionSource, edm, isDataFetchManagerSource) {\r\n if (isDataFetchManagerSource) {\r\n gridView.refresh(true);\r\n } else {\r\n const type = segType && segType !== 'None' ? segType : null;\r\n const curQuery = gridView.get('query');\r\n const query = isOdataActionSource ?\r\n changeEntitySet(changeQueryParams(curQuery, type), type, edm) :\r\n changeQueryParams(curQuery, type);\r\n\r\n gridView.set({ query });\r\n }\r\n}\r\n\r\nexport const segmentPlugin = definePlugin => definePlugin('segment', [\r\n 'config',\r\n 'gridView',\r\n 'toolbar',\r\n 'dateFilter',\r\n], (config, gridView, toolbar, dateFilter) => {\r\n const menuId = 'dropdown-segment';\r\n const toolbarEditor = toolbar.gridToolbarGroup.toolbarWithItem(menuId);\r\n const pluginConfig = _.result(config.plugins, 'segment', {});\r\n const {\r\n isOdataActionSource,\r\n permissions,\r\n edm,\r\n i18n,\r\n setSegType,\r\n timeRangeValidationEnabled = true,\r\n instrumentation,\r\n getSegType,\r\n } = pluginConfig;\r\n const {\r\n currentScenario,\r\n isDataFetchManagerSource,\r\n } = config;\r\n let { segmentationTypes = campaignSegmentationTypeEnum } = pluginConfig;\r\n\r\n let activity;\r\n if (instrumentation) {\r\n const scenario = instrumentation.default.segmentMenu.create(currentScenario);\r\n\r\n activity = scenario.segmentMenu.create();\r\n }\r\n\r\n function logTrace(msg) {\r\n if (activity) {\r\n activity.trace(msg, 'segment');\r\n }\r\n }\r\n\r\n function validateSegmentType(segType) {\r\n if (timeRangeValidationEnabled &&\r\n !isTimeRangeValid(segType, dateFilter.getCurrentDateRange())) {\r\n const SegmentAlertDialog = decorate(segmentAlert);\r\n let segAlertView = new SegmentAlertDialog({\r\n dialogOptions: {\r\n title: i18n.getString('Segment_Time_Invalid_Alert_Title'),\r\n titleHeadingLevel: 2,\r\n maxWidth: 658,\r\n closeButtonAriaLabel: i18n.getString(_TL_('Close')),\r\n },\r\n segType,\r\n i18n,\r\n }).render();\r\n\r\n segAlertView.center();\r\n\r\n setTimeout(() => {\r\n // The segment menu will get the focus first, delay this behavior to acquire the focus\r\n const dialogConfirmButton = document.querySelector('.segment-alert-ok input');\r\n if (dialogConfirmButton) {\r\n dialogConfirmButton.focus();\r\n }\r\n }, 0);\r\n\r\n segAlertView.bind('ok', () => {\r\n segAlertView.destroy();\r\n segAlertView = null;\r\n\r\n const menuButton = document.querySelector(`#${menuId}`);\r\n if (menuButton) {\r\n menuButton.focus();\r\n }\r\n });\r\n\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n function applySegment(segType) {\r\n return () => {\r\n if (validateSegmentType(segType)) {\r\n logTrace(`apply segment ${segType}`);\r\n const menu = getSegmentMenu(segType); // eslint-disable-line\r\n\r\n toolbarEditor.update(menu);\r\n\r\n setSegType(config.name, segType);\r\n\r\n updateSource(gridView, segType, isOdataActionSource, edm, isDataFetchManagerSource);\r\n } else {\r\n logTrace('failed to segment');\r\n }\r\n };\r\n }\r\n\r\n function getSegmentType() {\r\n if (isDataFetchManagerSource) {\r\n return get(getSegType(config.name), 'segmentationType', 'None');\r\n } else if (pluginConfig.isOdataActionSource) {\r\n return _.chain(gridView.get('queryParams'))\r\n .result('options')\r\n .result('entitySet')\r\n .result('navigation')\r\n .result('parameters')\r\n .result('gridDataParameters')\r\n .result('SegmentationTypes')\r\n .first()\r\n .value() || 'None';\r\n }\r\n\r\n return _.chain(gridView.get('query'))\r\n .result('query')\r\n .result('SegmentationTypes', 'None')\r\n .value();\r\n }\r\n\r\n function setSegmentType(segmentType, overrideSegmentationTypes) {\r\n if (overrideSegmentationTypes) {\r\n segmentationTypes = overrideSegmentationTypes;\r\n }\r\n const setter = applySegment(segmentType);\r\n\r\n setter();\r\n }\r\n\r\n function getAvailableSegmentationTypes() {\r\n return segmentationTypes;\r\n }\r\n\r\n function getSegmentMenu(segType) {\r\n function getMenuItem(seg) {\r\n const itemConfig = {\r\n text: localizeSegmentationType({ i18n, type: seg }),\r\n onClick: applySegment(seg),\r\n classes: [seg],\r\n };\r\n\r\n _.extend(itemConfig, {\r\n iconLeftGlyphName: segType === seg ? 'ba-CheckMark' : '',\r\n });\r\n return itemConfig;\r\n }\r\n\r\n const itemClasses = {\r\n Time: 'segment-time-sub-menu',\r\n Audience: 'segment-audience-type-sub-menu',\r\n Goal: 'segment-goal-type-sub-menu',\r\n };\r\n const segmentMenu = {\r\n iconLeftGlyphName: 'ba-SegmentInsights',\r\n type: 'dropdown',\r\n id: menuId,\r\n button: {\r\n text: i18n.getString('Segment_Dropdown_Title'),\r\n },\r\n ariaLabel: i18n.getString('Segment_Dropdown_Title'),\r\n menu: {\r\n items: _.map(getSupportedSegmentationTree({\r\n permissions,\r\n segmentationTypes,\r\n }), ({ children, name }) => {\r\n if (children) {\r\n const childMenuItems = _.map(children, childItem => getMenuItem(childItem.name));\r\n\r\n const isChild = _.any(children, childItem => childItem.name === segType);\r\n\r\n const menuItemWithChildren = {\r\n type: 'dropdown-submenu',\r\n button: {\r\n text: localizeSegmentationType({ i18n, type: name }),\r\n classes: [itemClasses[name]],\r\n },\r\n menu: {\r\n items: childMenuItems,\r\n },\r\n };\r\n\r\n _.extend(menuItemWithChildren.button, {\r\n iconLeftGlyphName: isChild ? 'ba-CheckMark' : '',\r\n });\r\n\r\n return menuItemWithChildren;\r\n }\r\n\r\n return getMenuItem(name);\r\n }),\r\n },\r\n };\r\n\r\n return segmentMenu;\r\n }\r\n\r\n function resetMenu() {\r\n const menu = getSegmentMenu('None');\r\n\r\n toolbarEditor.update(menu);\r\n }\r\n\r\n const cellTemplates = _.result(pluginConfig, 'cellTemplates', {});\r\n\r\n gridView.pipeStructureProjections(segment);\r\n gridView.pipeContentProjections(segmentCellStyle);\r\n\r\n gridView.set({\r\n segmentCellStyle: {\r\n cellTemplates,\r\n i18n,\r\n },\r\n });\r\n\r\n dateFilter.events.on('dateChange', () => {\r\n const curSegType = getSegmentType();\r\n\r\n if (curSegType && timeRangeValidationEnabled &&\r\n !isTimeRangeValid(curSegType, dateFilter.getCurrentDateRange())) {\r\n setSegType(config.name, 'None');\r\n updateSource(gridView, null, isOdataActionSource, edm, isDataFetchManagerSource);\r\n resetMenu();\r\n }\r\n });\r\n\r\n let segTypeInit = getSegType ?\r\n get(getSegType(config.name), 'segmentationType', 'None') :\r\n _.chain({})\r\n .defaults(config.query)\r\n .defaults(config.dataSource)\r\n .result('query')\r\n .result('SegmentationTypes', 'None')\r\n .value();\r\n\r\n if (!isSegmentationTypeSupported({ permissions, type: segTypeInit })) {\r\n segTypeInit = 'None';\r\n }\r\n\r\n logTrace(`init segment type is ${segTypeInit}`);\r\n updateSource(gridView, segTypeInit, isOdataActionSource, edm, isDataFetchManagerSource);\r\n const menu = getSegmentMenu(segTypeInit);\r\n\r\n toolbarEditor.update(menu);\r\n gridView.model.trigger('change');\r\n\r\n return {\r\n getSegmentType,\r\n setSegmentType,\r\n getAvailableSegmentationTypes,\r\n validateSegmentType,\r\n };\r\n});\r\n\r\n// when grid use the 'aggregatedRows', 'segment' plugin at the same time,\r\n// need use the 'arrgeratedRows' firstly.\r\nsegmentPlugin.softDependencies = ['aggregatedRows'];\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\n\r\n/* Converts the query generated by query builder to the format expected by JSData layer.\r\n Useful for when projection-grid is not used, as that logic is currently inside pgrid.\r\n*/\r\nexport class JsDataQueryConverter {\r\n static convert(queryParams) {\r\n return Promise.resolve({\r\n query: this.translateParams(_.omit(queryParams, 'options')),\r\n options: queryParams.options,\r\n });\r\n }\r\n\r\n static translateOrderBy(orderByParams) {\r\n const orderBy = _\r\n .chain(this.normalizeOrderBy(orderByParams))\r\n .map(([key, direction]) => [key, direction > 0 ? 'ASC' : 'DESC'])\r\n .value();\r\n\r\n return _.isEmpty(orderBy) ? null : orderBy;\r\n }\r\n\r\n static translateParams(params) {\r\n return _\r\n .chain(params)\r\n .omit('skip', 'take', 'filter', 'orderby')\r\n .extend(_.pick(\r\n {\r\n offset: params.skip,\r\n limit: params.take,\r\n where: params.filter,\r\n orderBy: this.translateOrderBy(params.orderby),\r\n },\r\n Boolean\r\n ))\r\n .value();\r\n }\r\n\r\n static normalizeOrderBy(orderBy = []) {\r\n // Below code is taken from pgrid and will be extracted out.\r\n // Ignore eslint errors in here for now as to not diverge it from original.\r\n /* eslint-disable */\r\n return _.reduce(_.isArray(orderBy) ? orderBy : [orderBy], (memo, item) => {\r\n let key = null;\r\n let direction = null;\r\n\r\n if (_.isArray(item)) {\r\n key = item[0];\r\n direction = item[1];\r\n } else if (_.isObject(item)) {\r\n key = item.key;\r\n direction = item.direction;\r\n }\r\n\r\n if (!_.isNumber(direction)) {\r\n throw new Error('Invalid direction option for orderBy');\r\n }\r\n\r\n if (!direction) {\r\n return memo;\r\n }\r\n\r\n if (_.isFunction(key)) {\r\n return memo.concat(this.normalizeOrderBy(key(direction)));\r\n }\r\n\r\n if (_.isString(key)) {\r\n memo.push([key, direction]);\r\n return memo;\r\n }\r\n\r\n throw new Error('Invalid key option for orderBy');\r\n }, []);\r\n /* eslint-enable */\r\n }\r\n}\r\n","import Promise from 'bluebird';\r\nimport _ from 'underscore';\r\nimport { Subject as Observable } from '@bingads-webui-universal/observer-pattern';\r\nimport { cloneDeep } from '@bingads-webui-universal/primitive-utilities';\r\nimport { JsDataQueryConverter } from './utils/js-data-query-generator';\r\n\r\nexport class QueryBuilder extends Observable {\r\n /**\r\n * Creates an instance of QueryBuilder.\r\n * @param {Object} Options - the options to create the data query builder\r\n * @memberof QueryBuilder\r\n */\r\n constructor({\r\n decorators,\r\n initialQuery = {},\r\n builderConfig = {\r\n generateJsDataQuery: false,\r\n featureName: '',\r\n },\r\n logActivity = {\r\n error: _.noop,\r\n },\r\n }) {\r\n super();\r\n\r\n this.decorators = decorators;\r\n this.initialQuery = initialQuery;\r\n this.featureName = builderConfig.featureName;\r\n this.generateJsDataQuery = builderConfig.generateJsDataQuery;\r\n this.lastQuery = null;\r\n this.logActivity = logActivity;\r\n }\r\n\r\n /**\r\n * Called every time new query is generated.\r\n * Triggers event 'queryChanged' if query has changed.\r\n * @private\r\n * @param {Object} newQuery - The query\r\n * @returns {Object} - The query\r\n */\r\n handleNewQuery(newQuery) {\r\n let query = newQuery;\r\n delete query.bodyParameters;\r\n\r\n if (this.generateJsDataQuery) {\r\n query = JsDataQueryConverter.convert(query);\r\n }\r\n\r\n if (!_.isEqual(this.lastQuery, newQuery)) {\r\n this.notify('queryChanged', newQuery);\r\n }\r\n this.lastQuery = query;\r\n\r\n return query;\r\n }\r\n\r\n /**\r\n * Pipes the query through the decorators\r\n * @returns {Object} - the transformed query\r\n */\r\n getQuery() {\r\n const initialQuery = cloneDeep(this.initialQuery);\r\n\r\n return Promise.reduce(\r\n this.decorators,\r\n (dataQuery, decorator) => decorator.run(dataQuery),\r\n initialQuery\r\n )\r\n .then(this.handleNewQuery.bind(this))\r\n .catch((e) => {\r\n this.logActivity.error(`Error while building query for ${this.featureName}: ${e.stack ? e.stack : e}`);\r\n return Promise.reject(e);\r\n });\r\n }\r\n\r\n getDecoratorByName(name) {\r\n return _.findWhere(this.decorators, { name });\r\n }\r\n}\r\n","import Promise from 'bluebird';\r\nimport _ from 'underscore';\r\nimport { verifyDepsExist } from '../utils/deps-check';\r\n\r\nexport class Decorator {\r\n constructor({ name, expectedDeps = [], deps = {} }) {\r\n if (!_.isString(name)) {\r\n throw new Error('Did not receive decorator name!');\r\n }\r\n\r\n this.name = name;\r\n verifyDepsExist(deps, expectedDeps);\r\n }\r\n\r\n getValueAsync() {\r\n return Promise.reject(new Error('Not implemented'));\r\n }\r\n\r\n // eslint-disable-next-line no-unused-vars\r\n buildQuery(queryParams, savedValue) {\r\n throw new Error('Not implemented!');\r\n }\r\n\r\n run(queryParams) {\r\n return this.getValueAsync().then(savedValue => this.buildQuery(queryParams, savedValue));\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\nexport function verifyDepsExist(deps, expectedDeps = []) {\r\n const missing = _.difference(expectedDeps, _.keys(_.pick(deps, Boolean)));\r\n if (missing.length) {\r\n throw new Error(`Expected the following deps to be passed in: ${missing.join(',')}`);\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport {\r\n customColumnGridKeyFromId,\r\n getCustomColumnPreferenceName\r\n} from '@bingads-webui-universal/custom-column-utils';\r\nimport { buildColumnAndSortingConversions } from '@bingads-webui-campaign/column-conversions';\r\n\r\nimport { Decorator } from './decorator';\r\n\r\n/* eslint-disable no-param-reassign */\r\nfunction getSelectQuery(\r\n savedColumnNames,\r\n lockedColumnNames,\r\n columnMap,\r\n IsAvgPositionDeprecationPhase2Enabled\r\n) {\r\n if (IsAvgPositionDeprecationPhase2Enabled) {\r\n const hasAveragePosition = savedColumnNames.includes('AveragePosition');\r\n if (hasAveragePosition) {\r\n const hasTopImpressionRate = savedColumnNames.includes('TopImpressionRate');\r\n const hasAbsoluteTopImpressionRate = savedColumnNames.includes('AbsoluteTopImpressionRate');\r\n savedColumnNames = savedColumnNames.filter(column => column !== 'AveragePosition');\r\n if (!hasTopImpressionRate) {\r\n savedColumnNames.push('TopImpressionRate');\r\n }\r\n if (!hasAbsoluteTopImpressionRate) {\r\n savedColumnNames.push('AbsoluteTopImpressionRate');\r\n }\r\n }\r\n }\r\n\r\n const validNames = _\r\n .chain(lockedColumnNames)\r\n .concat(savedColumnNames)\r\n .filter(name => _.has(columnMap, name))\r\n .uniq()\r\n .value();\r\n\r\n return _.reduce(\r\n validNames,\r\n (selectedCols, name) => {\r\n const key = columnMap[name];\r\n\r\n if (_.isArray(key)) {\r\n Array.prototype.push.apply(selectedCols, key);\r\n } else if (_.isString(key)) {\r\n selectedCols.push(key);\r\n }\r\n return selectedCols;\r\n },\r\n []\r\n );\r\n}\r\n\r\nexport class ColumnChooserDecorator extends Decorator {\r\n /**\r\n * Creates an instance of ColumnChooserDecorator.\r\n * @param {Object} {\r\n * featureName - Name of feature to use for retriving from preference, ex: PerformanceGrid,\r\n * columnsMap: Mapping of column names from preference to MT names,\r\n * defaultColumns: Default list of columns to use if no preference found,\r\n * lockedColumns: List of columns that should always be in query,\r\n * customColumnsEnabled = false: Whether custom column feature is available or not,\r\n * addPoPColumnsOnComparisonEnabled = false: Whether to add PoP columns when comparison is\r\n * enabled or not,\r\n * deps: The legacy dependencies of the decorator:\r\n * deps.state: 'component/state/index' component\r\n * deps.ColumnChooserPreference: from\r\n * 'component/bingads-grid/service/column-chooser-preferences',\r\n * deps.CustomColumnPreference: from\r\n * 'component/bingads-grid/service/custom-column-preferences'\r\n * deps.fetchSortInfo: from 'component/bingads-grid/service/fetch-sortinfo',\r\n * }\r\n * @memberof ColumnChooserDecorator\r\n */\r\n constructor({\r\n featureName,\r\n columnsMap,\r\n defaultColumns,\r\n lockedColumns,\r\n customColumnsEnabled = false,\r\n IsAvgPositionDeprecationPhase2Enabled = false,\r\n IsColumnConversionEnabled = false,\r\n columnConversions,\r\n comparisonPoPColumns = [],\r\n deps,\r\n }) {\r\n super({\r\n name: 'columnChooser',\r\n deps,\r\n expectedDeps: [\r\n 'state',\r\n 'ColumnChooserPreference',\r\n 'CustomColumnPreference',\r\n 'fetchSortInfo',\r\n ],\r\n });\r\n\r\n this.state = deps.state;\r\n this.Columns = deps.ColumnChooserPreference.Columns;\r\n this.SelectedColumns = deps.ColumnChooserPreference.SelectedColumns;\r\n this.CustomColumns = deps.CustomColumnPreference.getCustomColumnPreferenceStore(featureName);\r\n\r\n this.featureName = featureName;\r\n this.columnsMap = columnsMap;\r\n this.defaultColumns = defaultColumns;\r\n this.lockedColumns = lockedColumns;\r\n this.customColumnsEnabled = customColumnsEnabled;\r\n this.IsAvgPositionDeprecationPhase2Enabled = IsAvgPositionDeprecationPhase2Enabled;\r\n this.comparisonPoPColumns = comparisonPoPColumns;\r\n this.fetchSortInfo = deps.fetchSortInfo;\r\n this.IsColumnConversionEnabled = IsColumnConversionEnabled;\r\n if (IsColumnConversionEnabled) {\r\n ({\r\n applyColumnConversions: this.applyColumnConversions,\r\n applySortingInfoConversion: this.applySortingInfoConversion,\r\n } = buildColumnAndSortingConversions(columnConversions));\r\n }\r\n }\r\n\r\n /**\r\n * @param {Object} customColumnsRecord preferences service response\r\n * @returns {Object} map of all custom columns\r\n */\r\n extractCustomColumnsInfo(customColumnsRecord) {\r\n if (!this.customColumnsEnabled) {\r\n return [{}, []];\r\n }\r\n\r\n const allCustomColumns =\r\n customColumnsRecord && _.isFunction(customColumnsRecord.get)\r\n ? customColumnsRecord.get('customColumns')\r\n : _.result(customColumnsRecord, 'customColumns', []);\r\n const customColumnsMap = {};\r\n\r\n _.each(allCustomColumns, (column) => {\r\n const name = customColumnGridKeyFromId(column.id);\r\n\r\n customColumnsMap[name] = name;\r\n });\r\n\r\n return customColumnsMap;\r\n }\r\n\r\n warmCache(preferenceKey) {\r\n const promises = [\r\n this.Columns.findAll({ where: preferenceKey }),\r\n this.SelectedColumns.findAll({ where: preferenceKey }),\r\n ];\r\n\r\n if (this.customColumnsEnabled) {\r\n promises.push(this.CustomColumns.findAll({\r\n where: {\r\n grid: getCustomColumnPreferenceName(preferenceKey.grid),\r\n project: preferenceKey.project,\r\n },\r\n }));\r\n }\r\n\r\n return Promise.all(promises);\r\n }\r\n\r\n getValueAsync() {\r\n const preferenceKey = {\r\n project: 'CampaignUI',\r\n grid: this.featureName,\r\n };\r\n\r\n const columnsPromise = this.warmCache(preferenceKey)\r\n .then(() =>\r\n _.first(this.SelectedColumns.filter({ where: preferenceKey })))\r\n .then((selection) => {\r\n const name = _.result(selection, 'name', 'Custom');\r\n const savedColumns = _.first(this.Columns.filter({\r\n where: _.defaults({ name }, preferenceKey),\r\n }));\r\n const customColumnsRecord =\r\n this.customColumnsEnabled === true\r\n ? _.first(this.CustomColumns.filter({\r\n where: {\r\n grid: getCustomColumnPreferenceName(preferenceKey.grid),\r\n project: preferenceKey.project,\r\n },\r\n }))\r\n : null;\r\n\r\n return { savedColumns, customColumnsRecord };\r\n });\r\n\r\n return Promise.all([\r\n columnsPromise,\r\n this.state.getPromise('$daterange'),\r\n this.fetchSortInfo(this.featureName),\r\n ]).then(([{ savedColumns, customColumnsRecord }, dateRange, sortInfo]) => ({\r\n savedColumns,\r\n customColumnsRecord,\r\n dateRange,\r\n orderbyInfo: sortInfo.orderbyInfo || {},\r\n sortableHeader: sortInfo.sortableHeader,\r\n }));\r\n }\r\n\r\n buildQuery(\r\n queryParams,\r\n {\r\n savedColumns: savedColumnsRecord, customColumnsRecord, dateRange, orderbyInfo, sortableHeader,\r\n }\r\n ) {\r\n let savedColumns = _.result(savedColumnsRecord, 'columns');\r\n\r\n if (this.IsColumnConversionEnabled && savedColumns) {\r\n savedColumns = this.applyColumnConversions(savedColumns);\r\n }\r\n\r\n const selectedColumns = savedColumns || this.defaultColumns;\r\n const customColumnsMap = this.extractCustomColumnsInfo(customColumnsRecord);\r\n\r\n const transformedQueryParams = _.extend({}, queryParams, {\r\n select: getSelectQuery(\r\n selectedColumns,\r\n this.lockedColumns,\r\n _.extend({}, this.columnsMap, customColumnsMap),\r\n this.IsAvgPositionDeprecationPhase2Enabled\r\n ),\r\n });\r\n\r\n if (\r\n !_.isEmpty(this.comparisonPoPColumns) &&\r\n dateRange.compared &&\r\n dateRange.compared.start\r\n ) {\r\n transformedQueryParams.select =\r\n transformedQueryParams.select.concat(this.comparisonPoPColumns);\r\n }\r\n\r\n transformedQueryParams.select = _.uniq(transformedQueryParams.select).sort();\r\n\r\n if (this.IsColumnConversionEnabled) {\r\n const { orderbyInfo: patchedOrderbyInfo } =\r\n this.applySortingInfoConversion({ sortableHeader, orderbyInfo });\r\n if (patchedOrderbyInfo && patchedOrderbyInfo.length > 0) {\r\n transformedQueryParams.orderby = patchedOrderbyInfo;\r\n }\r\n } else if (orderbyInfo && orderbyInfo.length > 0) {\r\n transformedQueryParams.orderby = orderbyInfo;\r\n }\r\n\r\n return transformedQueryParams;\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { Decorator } from './decorator';\r\n\r\nexport class DateFilterDecorator extends Decorator {\r\n /**\r\n * Creates an instance of DateFilterDecorator.\r\n * @param {Object} {\r\n * isOdataActionSource = false,\r\n * deps: The legacy dependencies of the component\r\n * deps.state: 'component/state/index' component\r\n * deps.dateUtil: 'component/humanize/date' component\r\n * }\r\n * @memberof DateFilterDecorator\r\n */\r\n constructor({ isOdataActionSource = false, deps }) {\r\n super({ name: 'dateFilter', deps, expectedDeps: ['state', 'dateUtil'] });\r\n\r\n this.state = deps.state;\r\n this.dateUtil = deps.dateUtil;\r\n\r\n this.isOdataActionSource = isOdataActionSource;\r\n this.currentRange = null;\r\n }\r\n\r\n getValueAsync() {\r\n return this.state.getPromise('$daterange');\r\n }\r\n\r\n formatDateInQuery(date) {\r\n return this.dateUtil.format(date, 'M/d/yyyy');\r\n }\r\n\r\n formatDateInEntitySet(date) {\r\n return this.dateUtil.format(date, 'yyyy-MM-dd');\r\n }\r\n\r\n buildQuery(queryParams, dateRange) {\r\n this.currentRange = { startDate: dateRange.start, endDate: dateRange.end };\r\n if (dateRange.compared) {\r\n _.extend(this.currentRange, {\r\n comparisonStartDate: dateRange.compared.start,\r\n comparisonEndDate: dateRange.compared.end,\r\n });\r\n }\r\n let transformedQueryParams = this.addDateRangeToQueryParams(queryParams);\r\n if (this.isOdataActionSource) {\r\n transformedQueryParams = this.changeEntitySet(transformedQueryParams);\r\n }\r\n return transformedQueryParams;\r\n }\r\n\r\n addDateRangeToQueryParams(queryParams) {\r\n const {\r\n startDate,\r\n endDate,\r\n comparisonStartDate,\r\n comparisonEndDate,\r\n } = this.currentRange;\r\n let query = _.defaults(\r\n {\r\n startDate: this.formatDateInQuery(startDate),\r\n endDate: this.formatDateInQuery(endDate),\r\n },\r\n queryParams.query\r\n );\r\n\r\n if (comparisonStartDate && comparisonEndDate) {\r\n query = _.defaults(\r\n {\r\n comparisonStartDate: this.formatDateInQuery(comparisonStartDate),\r\n comparisonEndDate: this.formatDateInQuery(comparisonEndDate),\r\n },\r\n query\r\n );\r\n } else {\r\n query = _.omit(query, 'comparisonStartDate', 'comparisonEndDate');\r\n }\r\n return _.defaults(\r\n {\r\n query,\r\n },\r\n queryParams\r\n );\r\n }\r\n\r\n changeEntitySet(queryParams) {\r\n const {\r\n startDate,\r\n endDate,\r\n comparisonStartDate,\r\n comparisonEndDate,\r\n } = this.currentRange;\r\n\r\n // eslint-disable-next-line no-param-reassign\r\n queryParams.gridDataParameters = _.omit(_.defaults(\r\n {\r\n DateRange: {\r\n StartDate: this.formatDateInEntitySet(startDate),\r\n EndDate: this.formatDateInEntitySet(endDate),\r\n },\r\n ComparisonDateRange: comparisonStartDate && comparisonEndDate\r\n ? {\r\n StartDate: this.formatDateInEntitySet(comparisonStartDate),\r\n EndDate: this.formatDateInEntitySet(comparisonEndDate),\r\n }\r\n : undefined,\r\n },\r\n queryParams.gridDataParameters\r\n ), _.isUndefined);\r\n\r\n return queryParams;\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { merge } from '@bingads-webui-universal/primitive-utilities';\r\nimport { setFilterByReportEmailRule } from '@bingads-webui-campaign/projection-grid-inline-download';\r\nimport { Decorator } from './decorator';\r\n\r\n// Values that are not currently provided by the Filter Service,\r\n// but are present in the current filter\r\nconst filterOptionsExtensions = {\r\n dateFormat: 'yyyy-MM-ddTHH:mm:ss',\r\n shortDateFormat: 'M/d/yyyy',\r\n};\r\n\r\nexport class FilterDecorator extends Decorator {\r\n /**\r\n * Creates an instance of FilterDecorator.\r\n * @param {any} {\r\n * featureName - Name of feature,\r\n * filterService - Filter Service instance to use\r\n * }\r\n * @memberof FilterDecorator\r\n */\r\n constructor({\r\n featureName,\r\n filterService,\r\n ignoreColumns,\r\n appConfig,\r\n appState,\r\n }) {\r\n super({ name: 'filter' });\r\n\r\n this.featureName = featureName;\r\n this.filterService = filterService;\r\n this.ignoreColumns = ignoreColumns;\r\n this.appConfig = appConfig;\r\n this.appState = appState;\r\n }\r\n\r\n getValueAsync() {\r\n // If navigated from Report page, set filter from ReportEmailRule\r\n if (this.appState && this.appConfig) {\r\n const ReportEmailRule = this.appState.get('$ReportEmailRule');\r\n if (ReportEmailRule) {\r\n return setFilterByReportEmailRule({\r\n appConfig: this.appConfig,\r\n filterService: this.filterService,\r\n ReportEmailRule,\r\n }).then(() => this.filterService.refreshSource())\r\n .then(() => this.filterService.getCombinedFilter());\r\n }\r\n }\r\n\r\n this.filterService.refreshSource();\r\n\r\n return this.filterService.p$Initialized\r\n .then(() => this.filterService.getCombinedFilter());\r\n }\r\n\r\n buildQuery(queryParams, filterQuery) {\r\n const transformedFilterQuery = filterQuery;\r\n\r\n if (!_.isEmpty(this.ignoreColumns) && !_.isEmpty(filterQuery.query)) {\r\n const keys = filterQuery.query ? _.keys(filterQuery.query) : null;\r\n\r\n if (keys) {\r\n _.each(keys, (key) => {\r\n if (_.contains(this.ignoreColumns, key)) {\r\n delete transformedFilterQuery.query[key];\r\n }\r\n });\r\n }\r\n }\r\n\r\n if (_.isEmpty(transformedFilterQuery.query)) {\r\n return queryParams;\r\n }\r\n\r\n const filterOptions = _.extend(\r\n {},\r\n filterOptionsExtensions,\r\n transformedFilterQuery.odataOptions,\r\n {\r\n schema: transformedFilterQuery.schema,\r\n }\r\n );\r\n\r\n return merge({}, queryParams, {\r\n options: { filterOptions },\r\n where: transformedFilterQuery.query,\r\n });\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport { Decorator } from './decorator';\r\n\r\nexport class GridDataParametersDecorator extends Decorator {\r\n /**\r\n * Creates an instance of GridDataParametersDecorator.\r\n * @param {Object} {\r\n * entitySet - The entitySet to query. For grid, usually entity['Default.GridData],\r\n * isOdataActionSource - True if using OData Actions to make the call (POST call) instead of GET\r\n * isCustomerHierachyRequest - True if it is a Customer Hierarchy request\r\n * loadDirectlyLinkedAccounts - In case of a Customer Hierarchy request,\r\n * True if only the directly linked accounts need to be queried\r\n * accountModes - string array ['Expert'] for filtering on Expert mode accounts,\r\n * ['Smart'] for UP Smart accounts, ['Expert','Smart'] for both\r\n * }\r\n * @memberof GridDataParametersDecorator\r\n */\r\n constructor({\r\n entitySet,\r\n isOdataActionSource,\r\n preloadOptions,\r\n isCustomerHierachyRequest = false,\r\n loadDirectlyLinkedAccounts = null,\r\n accountModes = null,\r\n associationType = null,\r\n adExtensionTypes = null,\r\n }) {\r\n super({ name: 'gridDataParameters' });\r\n\r\n this.entitySet = entitySet;\r\n this.isOdataActionSource = isOdataActionSource;\r\n this.isCustomerHierachyRequest = isCustomerHierachyRequest;\r\n this.preloadOptions = preloadOptions;\r\n this.loadDirectlyLinkedAccounts = loadDirectlyLinkedAccounts;\r\n this.accountModes = accountModes;\r\n this.associationType = associationType;\r\n this.adExtensionTypes = adExtensionTypes;\r\n }\r\n\r\n getValueAsync() {\r\n return this.loadDirectlyLinkedAccounts ?\r\n this.loadDirectlyLinkedAccounts() :\r\n Promise.resolve({ loadDirectlyLinkedAccounts: false });\r\n }\r\n\r\n buildQuery(queryParams, { loadDirectlyLinkedAccounts }) {\r\n if (!this.isOdataActionSource) {\r\n return queryParams;\r\n }\r\n const transformedQueryParams = _.extend({}, queryParams);\r\n const params = {\r\n ...(transformedQueryParams.bodyParameters || {}),\r\n gridDataParameters: queryParams.gridDataParameters,\r\n };\r\n\r\n if (this.isCustomerHierachyRequest) {\r\n params.isCustomerHierachyRequest = true;\r\n params.loadDirectlyLinkedAccounts = loadDirectlyLinkedAccounts;\r\n }\r\n\r\n if (this.preloadOptions) {\r\n params.preloadOptions = this.preloadOptions;\r\n }\r\n\r\n if (this.associationType) {\r\n params.associationType = this.associationType;\r\n }\r\n\r\n if (this.adExtensionTypes) {\r\n params.adExtensionTypes = this.adExtensionTypes;\r\n }\r\n\r\n if (this.accountModes) {\r\n params.accountModes = this.accountModes;\r\n }\r\n\r\n transformedQueryParams.options = _.extend({}, queryParams.options || {}, {\r\n entitySet: this.entitySet\r\n .$call(params),\r\n });\r\n\r\n delete transformedQueryParams.gridDataParameters;\r\n transformedQueryParams.bodyParameters = params;\r\n return transformedQueryParams;\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { Decorator } from './decorator';\r\n\r\nconst ALLOWED_PAGE_SIZES = [20, 50, 100, 200];\r\n\r\nexport class PaginationDecorator extends Decorator {\r\n /**\r\n * Creates an instance of PaginationDecorator.\r\n * @param {any} {\r\n * featureName: The name of feature, such as 'PerformanceGrid',\r\n * defaultPageSize: The default page size if none found,\r\n * deps: Legacy deps\r\n * deps.fetchPaginationConfig: from 'component/bingads-grid/service/fetch-pagination',\r\n * }\r\n * @memberof PaginationDecorator\r\n */\r\n constructor({ featureName, defaultPageSize, deps }) {\r\n super({ name: 'pagination', deps, expectedDeps: ['fetchPaginationConfig'] });\r\n\r\n this.fetchPaginationConfig = deps.fetchPaginationConfig;\r\n\r\n this.featureName = featureName;\r\n this.defaultPageSize = defaultPageSize || _.first(ALLOWED_PAGE_SIZES);\r\n }\r\n\r\n getValueAsync() {\r\n return this.fetchPaginationConfig(this.featureName, this.defaultPageSize);\r\n }\r\n\r\n buildQuery(queryParams, { pageSize, pageNumber }) {\r\n if (!_.contains(ALLOWED_PAGE_SIZES, pageSize)) {\r\n /* eslint-disable no-param-reassign */\r\n pageSize = _.first(ALLOWED_PAGE_SIZES);\r\n }\r\n\r\n const transformedQueryParams = _.extend({}, queryParams, {\r\n take: pageSize,\r\n skip: pageNumber * pageSize,\r\n });\r\n\r\n return transformedQueryParams;\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { Decorator } from './decorator';\r\n\r\nexport class SegmentationDecorator extends Decorator {\r\n /**\r\n * Creates an instance of SegmentationDecorator.\r\n * @param {Object} options [{\r\n * featureName: Name of feature, such as \"PerformanceGrid\",\r\n * isOdataActionSource = false,\r\n * deps: Legacy dependencies\r\n * deps.SegmentationPreference: from 'component/bingads-grid/service/segmentation-preferences'\r\n * }={}]\r\n * @memberof SegmentationDecorator\r\n */\r\n constructor({ featureName, isOdataActionSource = false, deps }) {\r\n super({ name: 'segment', deps, expectedDeps: ['SegmentationPreference'] });\r\n\r\n this.getSegType = deps.SegmentationPreference.getSegType;\r\n this.getSegPreference = deps.SegmentationPreference.getSegPreference;\r\n\r\n this.featureName = featureName;\r\n this.isOdataActionSource = isOdataActionSource;\r\n }\r\n\r\n addSegmentToEntity(queryParams, segType) {\r\n /* eslint-disable no-param-reassign */\r\n queryParams.gridDataParameters =\r\n segType && segType !== 'None'\r\n ? _.defaults(\r\n { SegmentationTypes: [segType] },\r\n queryParams.gridDataParameters\r\n )\r\n : _.omit(queryParams.gridDataParameters, 'SegmentationTypes');\r\n\r\n return queryParams;\r\n }\r\n\r\n addSegmentToQuery(queryParams, segType) {\r\n const newQuery =\r\n segType && segType !== 'None'\r\n ? _.defaults({ SegmentationTypes: segType }, queryParams.query)\r\n : _.omit(queryParams.query, 'SegmentationTypes');\r\n\r\n return _.defaults(\r\n {\r\n query: newQuery,\r\n },\r\n queryParams\r\n );\r\n }\r\n\r\n getValueAsync() {\r\n return this.getSegPreference(this.featureName).then(() =>\r\n this.getSegType(this.featureName));\r\n }\r\n\r\n buildQuery(queryParams, segType) {\r\n const segmentationType = segType ? segType.segmentationType : undefined;\r\n\r\n let transformedQueryParams = this.addSegmentToQuery(\r\n queryParams,\r\n segmentationType\r\n );\r\n\r\n if (this.isOdataActionSource) {\r\n transformedQueryParams = this.addSegmentToEntity(\r\n transformedQueryParams,\r\n segmentationType\r\n );\r\n }\r\n return transformedQueryParams;\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { buildSortingConversions } from '@bingads-webui-campaign/column-conversions';\r\nimport { Decorator } from './decorator';\r\n\r\nexport class SortingDecorator extends Decorator {\r\n /**\r\n * Creates an instance of SortingDecorator.\r\n * @param {Object} {\r\n * featureName: Name of feature, such as \"PerformanceGrid\",\r\n * deps: The legacy dependencies of the decorator:\r\n * deps.fetchSortInfo: from 'component/bingads-grid/service/fetch-sortinfo',\r\n * ignoreColumns: columns to ignore for order by when transforming the query params\r\n * @memberof SortingDecorator\r\n */\r\n constructor({\r\n featureName, deps, ignoreColumns,\r\n IsColumnConversionEnabled = false, columnConversions,\r\n }) {\r\n super({ name: 'sorting', deps, expectedDeps: ['fetchSortInfo'] });\r\n\r\n this.featureName = featureName;\r\n this.fetchSortInfo = deps.fetchSortInfo;\r\n this.ignoreColumns = ignoreColumns;\r\n this.IsColumnConversionEnabled = IsColumnConversionEnabled;\r\n if (IsColumnConversionEnabled) {\r\n ({\r\n applySortingInfoConversion: this.applySortingInfoConversion,\r\n } = buildSortingConversions(columnConversions));\r\n }\r\n }\r\n\r\n getValueAsync() {\r\n return this.fetchSortInfo(this.featureName);\r\n }\r\n\r\n buildQuery(queryParams, { orderbyInfo, sortableHeader }) {\r\n const transformedQueryParams = _.extend({}, queryParams);\r\n\r\n if (this.IsColumnConversionEnabled) {\r\n const { orderbyInfo: patchedOrderbyInfo } =\r\n this.applySortingInfoConversion({ sortableHeader, orderbyInfo });\r\n\r\n if (patchedOrderbyInfo && patchedOrderbyInfo.length > 0) {\r\n transformedQueryParams.orderby = this.ignoreColumns ?\r\n _.reject(patchedOrderbyInfo, ({ key }) => _.contains(this.ignoreColumns, key)) :\r\n patchedOrderbyInfo;\r\n }\r\n } else if (orderbyInfo && orderbyInfo.length > 0) {\r\n transformedQueryParams.orderby = this.ignoreColumns ?\r\n _.reject(orderbyInfo, ({ key }) => _.contains(this.ignoreColumns, key)) :\r\n orderbyInfo;\r\n }\r\n return transformedQueryParams;\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport { Decorator } from './decorator';\r\n\r\nexport class ChartDataParametersDecorator extends Decorator {\r\n /**\r\n * Creates an instance of ChartDataParametersDecorator.\r\n * @param {Object} options options\r\n * @param {Object} options.entitySet entitySet\r\n * @param {Object} options.pageContext pageContext\r\n * @param {Object} options.chartDataAdapter chartDataAdapter\r\n * @param {Object} options.inlineChartPreference inlineChartPreference\r\n * @memberof ChartDataParametersDecorator\r\n */\r\n constructor({\r\n entitySet,\r\n pageState,\r\n pageContext,\r\n chartDataAdapter,\r\n inlineChartPreference,\r\n isOdataActionSource,\r\n }) {\r\n super({ name: 'chartDataParameters' });\r\n\r\n this.entitySet = entitySet;\r\n this.pageState = pageState;\r\n this.pageContext = pageContext;\r\n this.chartDataAdapter = chartDataAdapter;\r\n this.inlineChartPreference = inlineChartPreference;\r\n this.isOdataActionSource = isOdataActionSource;\r\n }\r\n\r\n getValueAsync() {\r\n return Promise.all([\r\n this.pageState.getPromise('$daterange'),\r\n this.chartDataAdapter.getPreferencesAndDefaults(\r\n this.inlineChartPreference,\r\n this.pageContext\r\n ),\r\n ]);\r\n }\r\n\r\n buildQuery(queryParams, [dateRange, chartParams]) {\r\n if (!this.isOdataActionSource) {\r\n return queryParams;\r\n }\r\n const transformedQueryParams = _.extend({}, queryParams);\r\n const params = {\r\n ...(transformedQueryParams.bodyParameters || {}),\r\n performanceTimeSeriesParameters:\r\n this.chartDataAdapter.formatPreferenceValue(dateRange, chartParams),\r\n };\r\n\r\n transformedQueryParams.options = _.extend({}, queryParams.options || {}, {\r\n entitySet: this.entitySet\r\n .$call(params),\r\n });\r\n\r\n transformedQueryParams.bodyParameters = params;\r\n return transformedQueryParams;\r\n }\r\n}\r\n","/* istanbul ignore file */\r\nimport { Decorator } from './decorator';\r\n\r\nfunction replaceAtom(atom, oldKey, newKey) {\r\n if (oldKey in atom) {\r\n const newAtom = {\r\n ...atom,\r\n [newKey]: atom[oldKey],\r\n };\r\n delete newAtom[oldKey];\r\n\r\n return newAtom;\r\n }\r\n return atom;\r\n}\r\n\r\nfunction replaceKeyOfQuery(query, oldKey, newKey) {\r\n if (!query) return query;\r\n let finalQuery = { ...query };\r\n if (oldKey in finalQuery) {\r\n finalQuery = replaceAtom(finalQuery, oldKey, newKey);\r\n } else if ('$and' in finalQuery) {\r\n finalQuery.$and.forEach((value, index, array) => {\r\n // eslint-disable-next-line no-param-reassign\r\n array[index] = replaceAtom(value, oldKey, newKey);\r\n });\r\n }\r\n return finalQuery;\r\n}\r\n\r\n/**\r\n * \"data exclusion\" is a special \"SeasonalityAdjustment\" edm\r\n * But when using filter, although we still need to use \"SeasonalityAdjustmentId\" as query option,\r\n * user should see \"data exclusion id eqaul xxx\" rather than \"seasonality adjuemsnt id eqaul xxx\".\r\n * Convert the query option when build query to do this.\r\n */\r\nexport class DataExclusionFilterProcessorDecorator extends Decorator {\r\n constructor({\r\n featureName,\r\n }) {\r\n super({ name: 'data-exclusion-filter-processor' });\r\n\r\n this.featureName = featureName;\r\n }\r\n\r\n getValueAsync() {\r\n // eslint-disable-next-line no-restricted-globals\r\n return Promise.resolve();\r\n }\r\n\r\n buildQuery(queryParams) {\r\n const finalWhere = replaceKeyOfQuery(\r\n queryParams.where,\r\n 'DataExclusionId',\r\n 'SeasonalityAdjustmentId'\r\n );\r\n\r\n return {\r\n ...queryParams,\r\n where: finalWhere,\r\n };\r\n }\r\n}\r\n","import { Decorator } from './decorator';\r\n\r\nexport function replaceTargetRoasOfQuery(query, key) {\r\n if (!query) return query;\r\n const finalQuery = { ...query };\r\n if (key in finalQuery) {\r\n const filterTargetRoas = finalQuery[key];\r\n Object.keys(filterTargetRoas).forEach((qKey) => {\r\n // eslint-disable-next-line no-param-reassign\r\n finalQuery[key][qKey] = parseFloat((filterTargetRoas[qKey] / 100.0).toFixed(4));\r\n });\r\n } else if ('$and' in finalQuery) {\r\n finalQuery.$and.forEach((value, index, array) => {\r\n if (key in value) {\r\n const filterTargetRoas = array[index][key];\r\n Object.keys(filterTargetRoas).forEach((qKey) => {\r\n // eslint-disable-next-line no-param-reassign\r\n array[index][key][qKey] = parseFloat((filterTargetRoas[qKey] / 100.0).toFixed(4));\r\n });\r\n }\r\n });\r\n }\r\n return finalQuery;\r\n}\r\n\r\n\r\nexport class TargetRoasFilterProcessorDecorator extends Decorator {\r\n constructor({\r\n featureName,\r\n }) {\r\n super({ name: 'target-roas-filter-processor' });\r\n\r\n this.featureName = featureName;\r\n }\r\n\r\n getValueAsync() {\r\n // eslint-disable-next-line no-restricted-globals\r\n return Promise.resolve();\r\n }\r\n\r\n buildQuery(queryParams) {\r\n const finalWhere = replaceTargetRoasOfQuery(\r\n queryParams.where,\r\n 'DisplayBiddingStrategyTargetRoas'\r\n );\r\n\r\n return {\r\n ...queryParams,\r\n where: finalWhere,\r\n };\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { QueryBuilder } from './query-builder';\r\n\r\nimport { ColumnChooserDecorator } from './decorators/column-chooser-decorator';\r\nimport { DateFilterDecorator } from './decorators/date-filter-decorator';\r\nimport { FilterDecorator } from './decorators/filter-decorator';\r\nimport { GridDataParametersDecorator } from './decorators/grid-data-parameters-decorator';\r\nimport { PaginationDecorator } from './decorators/pagination-decorator';\r\nimport { SegmentationDecorator } from './decorators/segmentation-decorator';\r\nimport { SortingDecorator } from './decorators/sorting-decorator';\r\nimport { ChartDataParametersDecorator } from './decorators/chart-parameters-decorator';\r\nimport { DataExclusionFilterProcessorDecorator } from './decorators/data-exclusion-filter-processor-decorator';\r\nimport { TargetRoasFilterProcessorDecorator } from './decorators/target-roas-filter-processor-decorator';\r\n\r\nconst decoratorMap = {\r\n columnChooser: ColumnChooserDecorator,\r\n dateFilter: DateFilterDecorator,\r\n segment: SegmentationDecorator,\r\n pagination: PaginationDecorator,\r\n filter: FilterDecorator,\r\n sorting: SortingDecorator,\r\n gridDataParameters: GridDataParametersDecorator,\r\n chartDataParameters: ChartDataParametersDecorator,\r\n dataExclusionFilterProcessor: DataExclusionFilterProcessorDecorator,\r\n targetRoasFilterProcessor: TargetRoasFilterProcessorDecorator,\r\n};\r\n\r\nfunction implementsDecoratorInterface(obj) {\r\n return obj && _.isFunction(obj.run);\r\n}\r\n\r\nfunction hasDecoratorConfiguration(obj) {\r\n return _.isObject(obj) && decoratorMap[obj.name];\r\n}\r\n\r\nfunction getDecoratorInstances(decorators = [], commonConfig = {}) {\r\n return decorators.map((decorator) => {\r\n let decoratorInstance = null;\r\n\r\n if (implementsDecoratorInterface(decorator)) {\r\n decoratorInstance = decorator;\r\n } else if (hasDecoratorConfiguration(decorator)) {\r\n const Decorator = decoratorMap[decorator.name];\r\n\r\n decoratorInstance = new Decorator(_.extend({}, commonConfig, decorator));\r\n } else {\r\n throw new Error(`Decorator ${decorator.name} was not found`);\r\n }\r\n\r\n return decoratorInstance;\r\n });\r\n}\r\n\r\n/**\r\n * Factory method that returns an instance of QueryBuilder\r\n * @param {Object} config - Configuration for the data query builder\r\n * @param {Object} [config.initialQuery] - Optional initial query, if not empty object\r\n * @param {Object} [config.logActivity] - Optional instrumentation activity with method\r\n * error, trace, perf for logging QB metrics\r\n * @param {Object} config.commonConfig - Common configuration values. These will be passed in to\r\n * any decorators included in QB.\r\n * @param {Object} config.commonConfig.featureName - Feature name, used to\r\n * retrieve values from preference\r\n * @param {Array} decorators - Mixed array of decorator configurations for\r\n * decorators included in QB, and custom decorators instances.\r\n * Please note that decorators are run in the same order as in the array,\r\n * so be aware of dependencies.\r\n * For example, GridDataParametersDecorator should go last because it copies the other parameters\r\n * to odata action POST body.\r\n * Sample:\r\n * [\r\n {name: 'segment', // other options},\r\n {name: 'pagination' //other options},\r\n myCustomDecoratorInstance,\r\n ]\r\n * @returns {QueryBuilder} - The constructed data query builder\r\n */\r\nexport class QueryBuilderFactory {\r\n static make({\r\n initialQuery,\r\n logActivity,\r\n commonConfig,\r\n decorators,\r\n }) {\r\n const builderConfig = _.pick(commonConfig, 'generateJsDataQuery', 'featureName');\r\n\r\n const decoratorInstances = getDecoratorInstances(decorators, commonConfig);\r\n\r\n return new QueryBuilder({\r\n decorators: decoratorInstances,\r\n initialQuery,\r\n logActivity,\r\n builderConfig,\r\n });\r\n }\r\n}\r\n","export const levelAtConstant = {\r\n CUSTOMER: 'Customer',\r\n ACCOUNT: 'Account',\r\n CAMPAIGN: 'Campaign',\r\n ADGROUP: 'AdGroup',\r\n KEYWORD: 'Keyword',\r\n};\r\n","import { getSessionStorage } from '@bingads-webui/storage';\r\nimport { getEntityFromScope } from '@bingads-webui/edm-campaign';\r\n\r\nexport const storeSeasonalityAdjustmentName = ({ id, name }) => {\r\n getSessionStorage().set(`SeasonalityAdjustmentNameAndId${id}`, name);\r\n};\r\n\r\nexport const getSeasonalityAdjustmentName = id => getSessionStorage().get(`SeasonalityAdjustmentNameAndId${id}`);\r\n\r\nexport const seasonalityPredicateValueNameGetter = name =>\r\n (name === 'SeasonalityAdjustmentId' || name === 'DataExclusionId'\r\n ? (item) => {\r\n const seasonalityName = getSessionStorage().get(`SeasonalityAdjustmentNameAndId${item}`);\r\n\r\n if (!seasonalityName) {\r\n return item;\r\n }\r\n return seasonalityName;\r\n } : undefined);\r\n\r\n// Data exclusion is a special \"SeasonalityAdjustment\"\r\nconst getSeasonalityAdjustmentLike = ({ id, scope, jsdata }) => {\r\n const { currentAccount } = getEntityFromScope(scope);\r\n return jsdata.SeasonalityAdjustment.find(\r\n id,\r\n {\r\n entitySet: currentAccount.SeasonalityAdjustments,\r\n queryParameters: {\r\n query: {\r\n $select: 'Name',\r\n },\r\n },\r\n }\r\n );\r\n};\r\n\r\nexport const updateSeasonalityNameFromMT = ({\r\n id, scope, i18n, jsdata,\r\n}) => getSeasonalityAdjustmentLike({ id, scope, jsdata }).then((response) => {\r\n storeSeasonalityAdjustmentName({ id, name: response.Name });\r\n}).catch(() => {\r\n storeSeasonalityAdjustmentName({ id, name: i18n.getString(_TL_('(deleted)')) });\r\n});\r\n","/**\r\n * @see [SegmentationType]{@link https://msasg.visualstudio.com/Bing_Ads/_git/AdsAppsMT#path=%2Fprivate%2FCampaign%2FMT%2FSource%2FInterface%2FEntity%2FAggregator2%2FSegmentationType.cs&version=GBmaster&_a=contents}\r\n */\r\nexport const Day = 'Day';\r\nexport const Week = 'Week';\r\nexport const Month = 'Month';\r\nexport const Quarter = 'Quarter';\r\nexport const Year = 'Year';\r\nexport const DayOfTheWeek = 'DayOfTheWeek';\r\nexport const HourOfTheDay = 'HourOfTheDay';\r\nexport const DeviceType = 'DeviceType';\r\nexport const Network = 'Network';\r\nexport const TopVsOther = 'TopVsOther';\r\nexport const DeliveredMatchType = 'DeliveredMatchType';\r\nexport const BiddedMatchType = 'BiddedMatchType';\r\nexport const Medium = 'Medium';\r\nexport const Currency = 'Currency';\r\nexport const DeviceOS = 'DeviceOS';\r\nexport const AdPosition = 'AdPosition';\r\nexport const DomainType = 'DomainType';\r\nexport const GoalType = 'GoalType';\r\nexport const GoalName = 'GoalName';\r\nexport const GoalCategory = 'GoalCategory';\r\nexport const AudienceType = 'AudienceType';\r\nexport const AudienceName = 'AudienceName';\r\nexport const AdScenario = 'AdScenario';\r\n\r\n/**\r\n * @see [Segment]{@link https://msasg.visualstudio.com/Bing_Ads/_git/AdInsights#path=%2Fprivate%2FMTv2%2FInterfaces%2FAuctionInsight%2FAuctionInsightCommon.cs&version=GBmaster&_a=contents}\r\n */\r\nexport const Hour = 'Hour';\r\n// These segmentation types are defined using same name in Campaign OData & Auction Insight\r\n// export const Day = 'Day';\r\n// export const Week = 'Week';\r\n// export const Month = 'Month';\r\n// export const Quarter = 'Quarter';\r\n// export const Year = 'Year';\r\nexport const DayOfWeek = 'DayOfWeek';\r\nexport const Device = 'Device';\r\nexport const HourOfDay = 'HourOfDay';\r\n","import _ from 'underscore';\r\nimport * as segmentationType from './segmentation-type';\r\n\r\nexport const segmentationTypeEnum = _.keys(segmentationType);\r\n\r\nexport const campaignSegmentationTypeEnum = [\r\n segmentationType.Day,\r\n segmentationType.Week,\r\n segmentationType.Month,\r\n segmentationType.Quarter,\r\n segmentationType.Year,\r\n segmentationType.DayOfTheWeek,\r\n // not used yet\r\n // segmentationType.HourOfTheDay\r\n segmentationType.DeviceType,\r\n segmentationType.Network,\r\n segmentationType.TopVsOther,\r\n // not used yet\r\n // segmentationType.DeliveredMatchType\r\n // not used yet\r\n // segmentationType.BiddedMatchType\r\n // not used yet\r\n // segmentationType.Medium\r\n // not used yet\r\n // segmentationType.Currency\r\n // not used yet\r\n // segmentationType.DeviceOS\r\n // not used yet\r\n // segmentationType.AdPosition\r\n // not used yet\r\n // segmentationType.DomainType\r\n segmentationType.GoalName,\r\n segmentationType.GoalType,\r\n segmentationType.GoalCategory,\r\n segmentationType.AudienceName,\r\n segmentationType.AudienceType,\r\n];\r\n\r\n/**\r\n * @see [Segment]{@link https://msasg.visualstudio.com/Bing_Ads/_git/AdInsights#path=%2Fprivate%2FMTv2%2FInterfaces%2FAuctionInsight%2FAuctionInsightCommon.cs&version=GBmaster&_a=contents}\r\n */\r\nexport const adinsightSegmentationTypeEnum = [\r\n // not used yet\r\n // segmentationType.Hour\r\n segmentationType.Day,\r\n segmentationType.Week,\r\n segmentationType.Month,\r\n segmentationType.Quarter,\r\n segmentationType.Year,\r\n segmentationType.DayOfWeek,\r\n segmentationType.Device,\r\n segmentationType.HourOfDay,\r\n];\r\n\r\n/**\r\n * Segmentation Types that have to do with a period of time only\r\n */\r\nexport const timeSegmentationTypeEnum = [\r\n segmentationType.Day,\r\n segmentationType.Week,\r\n segmentationType.Month,\r\n segmentationType.Quarter,\r\n segmentationType.Year,\r\n segmentationType.DayOfTheWeek,\r\n // not used yet\r\n // segmentationType.HourOfTheDay\r\n];\r\n","import { todayNYearsAgo } from '@bingads-webui-universal/primitive-utilities';\r\n\r\nimport * as segmentationType from './segmentation-type';\r\n\r\nconst diffDay = (start, end) => Math.round((end - start) / 86400000);\r\n\r\nexport function isTimeRangeValid(segmentType, {\r\n start = null,\r\n end = null,\r\n compared = {},\r\n} = {}) {\r\n const { start: comparedStart, end: comparedEnd } = compared || {};\r\n // The first date that BI has segmentation data, offset by 1 day to ensure no timezone issues.\r\n const goalSegmentStartDate = new Date('October 26, 2017 00:00:00');\r\n // The first date that BI has segmentation data, offset by 1 day to ensure no timezone issues.\r\n const audienceSegmentStartDate = new Date('January 05, 2018 00:00:00');\r\n\r\n // If time range control didn't initialize successfully, we will just pass data directly to MT\r\n if (!start || !end) {\r\n return true;\r\n }\r\n\r\n let totalRange = diffDay(start, end);\r\n\r\n if (comparedStart && comparedEnd) {\r\n totalRange += diffDay(comparedStart, comparedEnd);\r\n }\r\n\r\n const oneYearAgo = todayNYearsAgo(end, 1);\r\n const threeYearsAgo = todayNYearsAgo(end, 3);\r\n const withinThreeYears = start >= threeYearsAgo;\r\n const moreThanOneYear = oneYearAgo >= start;\r\n\r\n switch (segmentType) {\r\n case segmentationType.Day:\r\n return totalRange < 16;\r\n case segmentationType.Week:\r\n return totalRange >= 7 && totalRange < 16 * 7;\r\n case segmentationType.Month:\r\n return totalRange >= 30 && totalRange < 16 * 30;\r\n case segmentationType.Quarter:\r\n return totalRange > 90 && withinThreeYears;\r\n case segmentationType.Year:\r\n return moreThanOneYear && withinThreeYears;\r\n case segmentationType.HourOfTheDay:\r\n case segmentationType.HourOfDay:\r\n // HourOfDay supports any range in recent 30 days\r\n // based on time zone, it could be 31 days difference\r\n return diffDay(start, new Date()) <= 31;\r\n case segmentationType.GoalName:\r\n case segmentationType.GoalType:\r\n case segmentationType.GoalCategory:\r\n return start >= goalSegmentStartDate;\r\n case segmentationType.AudienceName:\r\n case segmentationType.AudienceType:\r\n return start >= audienceSegmentStartDate;\r\n default:\r\n return true;\r\n }\r\n}\r\n","import * as segmentationType from './segmentation-type';\r\n\r\n// Same structure as we used in @bingads-webui/json-tree-parser\r\nexport const segmentationTree = [{\r\n name: 'None',\r\n}, {\r\n name: 'Time',\r\n children: [{\r\n name: segmentationType.Day,\r\n }, {\r\n name: segmentationType.Week,\r\n }, {\r\n name: segmentationType.Month,\r\n }, {\r\n name: segmentationType.Quarter,\r\n }, {\r\n name: segmentationType.Year,\r\n }, {\r\n name: segmentationType.DayOfTheWeek,\r\n }, {\r\n name: segmentationType.DayOfWeek,\r\n }, {\r\n name: segmentationType.HourOfDay,\r\n permission: 'IsBAACompetitionEnabled',\r\n }],\r\n}, {\r\n name: 'Audience',\r\n permission: 'IsAudienceSegmentationSupported',\r\n children: [{\r\n name: segmentationType.AudienceName,\r\n }, {\r\n name: segmentationType.AudienceType,\r\n }],\r\n}, {\r\n name: 'Goal',\r\n permission: 'IsSegmentationGoalTypeSupported',\r\n children: [{\r\n name: segmentationType.GoalName,\r\n }, {\r\n name: segmentationType.GoalType,\r\n }, {\r\n name: segmentationType.GoalCategory,\r\n }],\r\n}, {\r\n name: segmentationType.DeviceType,\r\n}, {\r\n name: segmentationType.Device,\r\n}, {\r\n name: segmentationType.Network,\r\n}, {\r\n name: segmentationType.TopVsOther,\r\n}, {\r\n name: segmentationType.AdScenario,\r\n permission: 'IsVerticalAdsReportingPhase1Enabled',\r\n}];\r\n","import _ from 'underscore';\r\nimport { get } from '@bingads-webui-universal/primitive-utilities';\r\nimport * as segmentationType from './segmentation-type';\r\n\r\nconst typeWithSameTexts = {\r\n [segmentationType.DayOfWeek]: segmentationType.DayOfTheWeek,\r\n [segmentationType.HourOfDay]: segmentationType.HourOfTheDay,\r\n [segmentationType.Device]: segmentationType.DeviceType,\r\n};\r\n\r\nconst keys = {\r\n None: 'Segment_Dropdown_None',\r\n Time: 'Segment_Dropdown_Time',\r\n [segmentationType.Day]: 'Segment_Dropdown_Day',\r\n [segmentationType.Week]: 'Segment_Dropdown_Week',\r\n [segmentationType.Month]: 'Segment_Dropdown_Month',\r\n [segmentationType.Quarter]: 'Segment_Dropdown_Quarter',\r\n [segmentationType.Year]: 'Segment_Dropdown_Year',\r\n [segmentationType.DayOfTheWeek]: 'Segment_Dropdown_Day_Of_Week',\r\n [segmentationType.HourOfTheDay]: 'Segment_Dropdown_Hour_Of_Day',\r\n Audience: 'Segment_Dropdown_Audience',\r\n [segmentationType.AudienceName]: 'Segment_Dropdown_Audience_Name',\r\n [segmentationType.AudienceType]: 'Segment_Dropdown_Audience_Category',\r\n Goal: 'Segment_Dropdown_Conversions',\r\n [segmentationType.GoalName]: 'Segment_Dropdown_Goal_Name',\r\n [segmentationType.GoalType]: 'Segment_Dropdown_Goal_Type',\r\n [segmentationType.GoalCategory]: 'Segment_Dropdown_Goal_Category',\r\n [segmentationType.DeviceType]: 'Segment_Dropdown_Device_Type',\r\n [segmentationType.Network]: 'Segment_Dropdown_Network',\r\n [segmentationType.TopVsOther]: 'Segment_Dropdown_Top_Other',\r\n [segmentationType.AdScenario]: 'Segment_Dropdown_Ad_Scenario',\r\n};\r\n\r\nconst valueKeys = {\r\n DayOfTheWeek: {\r\n Sunday: 'WeekDay_1',\r\n Monday: 'WeekDay_2',\r\n Tuesday: 'WeekDay_3',\r\n Wednesday: 'WeekDay_4',\r\n Thursday: 'WeekDay_5',\r\n Friday: 'WeekDay_6',\r\n Saturday: 'WeekDay_7',\r\n },\r\n\r\n DeviceType: {\r\n Unknown: 'Segment_Device_Type_Unknown',\r\n Computer: 'Segment_Device_Type_Computer',\r\n PC: 'Segment_Device_Type_Computer',\r\n SmartPhone: 'Segment_Device_Type_Smartphone',\r\n NonsmartPhone: 'Segment_Device_Type_NonSmartphone',\r\n Tablet: 'Segment_Device_Type_Tablet',\r\n ConnectedTV: 'Segment_Device_Type_ConnectedTV',\r\n },\r\n\r\n Network: {\r\n Unknown: 'Segment_Network_Unknown',\r\n BingAndYahooSearch: 'Segment_Network_BingAndYahoo',\r\n MicrosoftSitesAndSelectTraffic: 'Segment_Network_MicrosoftSitesAndSelectTraffic',\r\n SyndicatedSearchPartners: 'Segment_Network_SyndicatedSearch',\r\n AOLSearch: 'Segment_Network_AOL',\r\n InHouse: 'Segment_Network_InHouse',\r\n Content: 'Segment_Network_Content',\r\n Audience: 'Segment_Network_Audience',\r\n CrossNetwork: 'Segment_Network_CrossNetwork',\r\n },\r\n\r\n TopVsOther: {\r\n Unknown: 'Segment_Page_Position_Unknown',\r\n BingAndYahooSearchTop: 'Segment_Page_Position_BingYahooTop',\r\n BingAndYahooSearchOther: 'Segment_Page_Position_BingYahooOther',\r\n SyndicatedSearchPartnersTop: 'Segment_Page_Position_SyndicatedTop',\r\n SyndicatedSearchPartnersOther: 'Segment_Page_Position_SyndicatedOther',\r\n AOLSearchTop: 'Segment_Page_Position_AOL_Top',\r\n AOLSearchOther: 'Segment_Page_Position_AOL_Other',\r\n ContentNetwork: 'Segment_Page_Position_Content',\r\n AudienceNetwork: 'Segment_Page_Position_Audience_Network',\r\n MicrosoftSitesAndSelectTrafficTop: 'Segment_Page_Position_MicrosoftSitesAndSelectTrafficTop',\r\n MicrosoftSitesAndSelectTrafficOther: 'Segment_Page_Position_MicrosoftSitesAndSelectTrafficOther',\r\n CrossNetwork: 'Segment_Page_Position_CrossNetwork',\r\n InHouseTop: 'Segment_Page_Position_InHouseTop',\r\n InHouseOther: 'Segment_Page_Position_InHouseOther',\r\n },\r\n\r\n GoalType: {\r\n DestinationURL: 'UnifiedEventTracking_Goals_DestinationGoal',\r\n Duration: 'UnifiedEventTracking_Goals_DurationGoal',\r\n PageVisit: 'UnifiedEventTracking_Goals_PageViewsPerVisitGoal',\r\n Custom: 'UnifiedEventTracking_Goals_EventGoal',\r\n AppInstall: 'UnifiedEventTracking_Goals_ApplicationInstallGoal',\r\n MultiStage: 'UnifiedEventTracking_Goals_MultiStageGoal',\r\n OfflineConversion: 'UnifiedEventTracking_Goals_OfflineConversionGoal',\r\n InStoreTransaction: 'UnifiedEventTracking_Goals_InStoreTransactionGoal',\r\n HotelBooking: 'UnifiedEventTracking_Goals_HotelBookingGoal',\r\n },\r\n\r\n AudienceType: {\r\n RemarketingList: 'Segment_Audience_RemarketingList',\r\n InMarket: 'Segment_Audience_InMarket',\r\n Custom: 'Segment_Audience_Custom',\r\n SimilarToRemarketingList: 'Segment_Audience_SimilarToRemarketingList',\r\n Product: 'Segment_Audience_Product',\r\n CustomerList: 'Segment_Audience_CustomerList',\r\n CombinedList: 'Segment_Audience_CombinedList',\r\n PredictiveTargeting: 'Segment_Audience_PredictiveTargeting',\r\n ContextualTargeting: 'Segment_Audience_ContextualTargeting',\r\n ImpressionBasedRemarketingList: 'Segment_Audience_ImpressionBasedRemarketingList',\r\n UsersNotInAudienceSegments: 'Segment_Audience_UsersNotInAudienceSegments',\r\n },\r\n\r\n GoalCategory: {\r\n AddToCart: 'Segment_Goal_Category_AddToCart',\r\n BeginCheckout: 'Segment_Goal_Category_BeginCheckout',\r\n BookAppointment: 'Segment_Goal_Category_BookAppointment',\r\n Contact: 'Segment_Goal_Category_Contact',\r\n Download: 'Segment_Goal_Category_Download',\r\n GetDirections: 'Segment_Goal_Category_GetDirections',\r\n InStoreVisit: 'Segment_Goal_Category_InStoreVisit',\r\n Other: 'Segment_Goal_Category_Other',\r\n OutboundClick: 'Segment_Goal_Category_OutboundClick',\r\n PageView: 'Segment_Goal_Category_PageView',\r\n Purchase: 'Segment_Goal_Category_Purchase',\r\n RequestQuote: 'Segment_Goal_Category_RequestQuote',\r\n SignUp: 'Segment_Goal_Category_SignUp',\r\n SubmitLeadForm: 'Segment_Goal_Category_SubmitLeadForm',\r\n Subscribe: 'Segment_Goal_Category_Subscribe',\r\n Unassigned: 'Segment_Goal_Category_Unassigned',\r\n },\r\n\r\n [segmentationType.AdScenario]: {\r\n AutoAd: 'Segment_AdScenario_AutoAd',\r\n CreditCardAd: 'Segment_AdScenario_CreditCardAd',\r\n Other: 'Segment_AdScenario_Other',\r\n TourActivityAd: 'Segment_AdScenario_TourActivityAd',\r\n HealthInsuranceAd: 'Segment_AdScenario_HealthInsuranceAd',\r\n InsuranceServiceAd: 'Segment_AdScenario_InsuranceServiceAd',\r\n CruiseAd: 'Segment_AdScenario_CruiseAd',\r\n RealEstateServiceAd: 'Segment_AdScenario_RealEstateServiceAd',\r\n FinancialAdvisorAd: 'Segment_AdScenario_FinancialAdvisorAd',\r\n TaxServiceAd: 'Segment_AdScenario_TaxServiceAd',\r\n DoctorClinicAd: 'Segment_AdScenario_DoctorClinicAd',\r\n MortgageLenderAd: 'Segment_AdScenario_MortgageLenderAd',\r\n DebitCardAd: 'Segment_AdScenario_DebitCardAd',\r\n HomeServiceAd: 'Segment_AdScenario_HomeServiceAd',\r\n JobListingAd: 'Segment_AdScenario_JobListingAd',\r\n LegalServiceAd: 'Segment_AdScenario_LegalServiceAd',\r\n },\r\n};\r\n\r\n_.each(typeWithSameTexts, (defined, notDefined) => {\r\n keys[notDefined] = keys[defined];\r\n valueKeys[notDefined] = valueKeys[defined];\r\n});\r\n\r\nexport function localizeSegmentationType({\r\n i18n,\r\n type,\r\n}) {\r\n return i18n.getString(keys[type]);\r\n}\r\n\r\nexport function localizeSegmentationValue({\r\n i18n,\r\n type,\r\n value,\r\n}) {\r\n if (_.contains([\r\n segmentationType.HourOfTheDay,\r\n segmentationType.HourOfDay,\r\n ], type)) {\r\n const hour = parseInt(value, 10);\r\n\r\n if (hour === 0) {\r\n return i18n.getString('ImprovedAdScheduling_12AM_Start_Of_Day');\r\n }\r\n\r\n return i18n.getString(`ImprovedAdScheduling_${hour > 12 ? hour - 12 : hour}${hour < 12 ? 'AM' : 'PM'}`);\r\n } else if (_.contains([\r\n segmentationType.AudienceName,\r\n segmentationType.GoalName,\r\n ], type) || _.isNaN(Date.parse(value))) {\r\n const key = get(valueKeys, [type, value]);\r\n\r\n const localized = key ? i18n.getString(key) : value;\r\n\r\n if (type === segmentationType.AudienceName && localized === 'Users not in audience segments') {\r\n return i18n.getString('Segment_Audience_NoUser');\r\n }\r\n\r\n return localized;\r\n } else if (type !== segmentationType.Year) {\r\n const localized = i18n.formatDate(new Date(value), {\r\n timeZone: 'UTC',\r\n skeleton: 'yMd',\r\n });\r\n\r\n if (type === segmentationType.Week) {\r\n return i18n.getString('Segment_Week_Of_Date', { date: localized });\r\n }\r\n\r\n return localized;\r\n }\r\n\r\n return value;\r\n}\r\n","import _ from 'underscore';\r\nimport { segmentationTree } from './segmentation-tree';\r\n\r\nexport function isSegmentationTypeSupported({\r\n type,\r\n permissions = {},\r\n tree = segmentationTree,\r\n}) {\r\n return _.any(tree, ({ permission, children, name }) => {\r\n if (permission && !permissions[permission]) {\r\n return false;\r\n }\r\n\r\n if (children) {\r\n return isSegmentationTypeSupported({\r\n type,\r\n permissions,\r\n tree: children,\r\n });\r\n }\r\n\r\n return name === type;\r\n });\r\n}\r\n","import _ from 'underscore';\r\nimport { segmentationTypeEnum } from './segmentation-type-enum';\r\nimport { segmentationTree } from './segmentation-tree';\r\n\r\n// Return value has structure same as\r\n// 1. we used in @bingads-webui/json-tree-parser\r\n// 2. segmentationTree\r\nexport function getSupportedSegmentationTree({\r\n permissions = {},\r\n segmentationTypes = segmentationTypeEnum,\r\n}) {\r\n const isSupported = type => _.contains(['None', ...segmentationTypes], type);\r\n const hasPermission = permission => !permission || permissions[permission];\r\n\r\n return _.compact(_.map(segmentationTree, ({ permission, children, name }) => {\r\n if (!hasPermission(permission)) {\r\n return null;\r\n }\r\n\r\n if (children) {\r\n const allowed = _.filter(\r\n children,\r\n childItem => isSupported(childItem.name) && hasPermission(childItem.permission)\r\n );\r\n\r\n return _.isEmpty(allowed) ? null : {\r\n name,\r\n children: allowed,\r\n };\r\n }\r\n\r\n if (isSupported(name)) {\r\n return { name };\r\n }\r\n\r\n return null;\r\n }));\r\n}\r\n","import _ from 'underscore';\r\nimport { View } from 'backbone';\r\nimport template from './template.pug';\r\n\r\nexport class StatusPopupView extends View {\r\n events() {\r\n return {\r\n 'click .statuschangelink': this.onClick,\r\n };\r\n }\r\n\r\n /**\r\n * initialize view settings\r\n *\r\n * @param {Object} param - An object containing these default options for view:\r\n * @param {Object} param.statusOptions - status options to be shown in view\r\n * it should be an array of { name, value } objects\r\n * value is the value to be returned to user when status updated\r\n * name is the one to be used to generate text & icon style based, in the format of\r\n * text/title: search by key EntityStatus_$(name)\r\n * iconClass: status$(name)_icon\r\n * textClass: status$(name)\r\n * @param {Object} param.currentStatus - currentStatus, related to the {value} in statusOptions\r\n * @param {Object} param.i18n - the localization settings, by default return the provided key\r\n * @returns {void} void\r\n */\r\n initialize({\r\n statusOptions = [{ name: 'Enabled', value: 'Active' }, { name: 'Paused', value: 'UserPaused' }],\r\n currentStatus,\r\n i18n,\r\n }) {\r\n this.options = {\r\n items: this.getItemsForRender(statusOptions, i18n),\r\n i18n,\r\n currentStatus,\r\n };\r\n super.initialize(this.options);\r\n this.currentStatus = currentStatus;\r\n }\r\n\r\n /**\r\n * initialize status setting for rendering\r\n *\r\n * @param {Array} statusOptions - status options to be shown in view\r\n * it should be an array of { name, value } objects\r\n * value is the value to be returned to user when status updated\r\n * name is the one to be used to generate text & icon style based, in the format of\r\n * text/title: search by key EntityStatus_$(name)\r\n * iconClass: status$(name)_icon\r\n * textClass: status$(name)\r\n * @param {Object} i18n - the localization settings, by default return the provided key\r\n * @returns {Array} items for rendering, which includes\r\n * {text, title, iconClass, textClass, value} got based on name & value of statusOptions\r\n */\r\n getItemsForRender(statusOptions, i18n) {\r\n return _.map((statusOptions), (option) => {\r\n const iconClassPrefix = `status${option.name}`;\r\n\r\n return {\r\n title: i18n.getString(`EntityStatus_${option.name}`),\r\n text: i18n.getString(`EntityStatus_${option.name}`),\r\n iconClass: option.iconClass || `${iconClassPrefix}_icon`,\r\n textClass: iconClassPrefix,\r\n value: option.value || option.name,\r\n ariaLabel: i18n.getString(`EntityStatus_AriaLabel_${option.name}`),\r\n };\r\n });\r\n }\r\n\r\n render() {\r\n this.$el.html(template(this.options));\r\n\r\n return this;\r\n }\r\n\r\n setFocus() {\r\n this.$(`.clickable[data-value=\"${this.currentStatus}\"]`).focus();\r\n }\r\n\r\n onClick(event) {\r\n this.trigger('close', event.currentTarget.dataset.value);\r\n }\r\n}\r\n","import Promise from 'bluebird';\r\nimport { GridCustomizedPopupEditor } from '@bingads-webui-campaign/grid-customized-popup-editor';\r\nimport { StatusPopupView } from './status-popup-view';\r\n\r\n/**\r\n * Renders the popup editor for Status property.\r\n *\r\n * @param {String} currentStatus - current status of the item\r\n * @param {Array} param.statusOptions - status options to be shown in view\r\n * it should be an array of { name, value } objects\r\n * value is the value to be returned to user when status updated\r\n * name is the one to be used to generate text & icon style based, in the format of\r\n * text/title: search by key EntityStatus_$(name)\r\n * iconClass: status$(name)_icon\r\n * textClass: status$(name)\r\n * @param {Object} position - object to indicate the position of the table cell.\r\n * @param {Object} param.i18n - the localization settings, by default return the provided key\r\n * @param {String} param.className - allow custom class name for the container\r\n * @param {Boolean} param.isForVNext -- is being used for vNext grid\r\n * @param {boolean} param.adjustTopPosition - whether to adjust top position,\r\n default true\r\n * @return {Object} A promise that will resolve with the selected data.\r\n */\r\nexport function renderStatusPopupEditor({\r\n currentStatus, statusOptions, position, i18n, className, isForVNext, adjustTopPosition = true,\r\n}) {\r\n const statusPopupView = new StatusPopupView({\r\n currentStatus,\r\n statusOptions,\r\n i18n,\r\n }).render();\r\n\r\n const popupEditor = new GridCustomizedPopupEditor({\r\n editorView: statusPopupView,\r\n cellPosition: position,\r\n className: className || 'status-popupeditor',\r\n renderBelow: true,\r\n adjustTopPosition,\r\n parentContainerSelector: isForVNext ? '.grid-and-disclaim-container' : null,\r\n }).render();\r\n\r\n return new Promise((resolve) => {\r\n popupEditor.on('close', status => resolve(status));\r\n });\r\n}\r\n","import rocketImage from './media/rocket.svg';\r\n\r\nexport const getNewUiWelcomeStyles = () => ({\r\n newUINavigationPreferenceDialog: {\r\n '& .ms-Dialog-header': {\r\n height: 198,\r\n backgroundPositionY: 'bottom',\r\n backgroundImage: `url(\"${rocketImage}\")`,\r\n backgroundRepeat: 'no-repeat',\r\n backgroundColor: '#C7E0F4',\r\n backgroundSize: 'contain',\r\n },\r\n\r\n '& .ms-Dialog-inner': {\r\n padding: 0,\r\n },\r\n\r\n '& .ms-Dialog-button--close': {\r\n color: '#005A9E',\r\n padding: 'unset',\r\n width: 'unset',\r\n height: 'unset',\r\n\r\n '& .ms-Button-flexContainer': {\r\n width: 'unset',\r\n height: 'unset',\r\n\r\n '& .ms-Button-icon': {\r\n margin: 'unset',\r\n },\r\n },\r\n },\r\n\r\n '& .ms-Dialog-button--close:hover, & .ms-Dialog-button--close:active': {\r\n backgroundColor: '#C7E0F4',\r\n },\r\n\r\n '& .ms-Dialog-button, .ms-Dialog-button:hover': {\r\n color: '#0078d4',\r\n backgroundColor: 'transparent',\r\n },\r\n\r\n '& .custom-content-wrapper': {\r\n background: '#0078d4',\r\n color: '#ffffff',\r\n padding: 18,\r\n\r\n '& a': {\r\n color: 'white',\r\n textDecorationLine: 'underline',\r\n },\r\n\r\n '& .hiddenSpan': {\r\n display: 'none',\r\n },\r\n\r\n '& .title': {\r\n fontWeight: 600,\r\n fontSize: '20px',\r\n lineHeight: '27px',\r\n marginBottom: 14,\r\n },\r\n\r\n '& .ms-Dialog-actions': {\r\n background: '#0078d4',\r\n marginTop: '24px 0 0 0',\r\n\r\n '& .ms-Dialog-actionsRight': {\r\n display: 'flex',\r\n textAlign: 'left !important',\r\n margin: 'unset',\r\n\r\n '& .ms-Dialog-action': {\r\n margin: 'unset',\r\n },\r\n\r\n '& .ms-Button--primary': {\r\n border: '1px solid white',\r\n },\r\n\r\n '& .lets-go, & .lets-go:hover, & .lets-go:focus:after': {\r\n border: '1px solid white',\r\n color: '#0078d4',\r\n },\r\n\r\n '& button': {\r\n marginRight: 11,\r\n },\r\n },\r\n },\r\n },\r\n\r\n },\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 (schemaI18n, value) {if (value) {\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = schemaI18n.enum('BidStrategyType', value)) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + (pug.escape(null == (pug_interp = ' ') ? \"\" : pug_interp));\n}}.call(this,\"schemaI18n\" in locals_for_with?locals_for_with.schemaI18n:typeof schemaI18n!==\"undefined\"?schemaI18n:undefined,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n) {pug_html = pug_html + \"\\u003Cdiv class=\\\"budget-info\\\"\\u003E\\u003Ca class=\\\"closeimage pull-right\\\"\\u003E\\u003C\\u002Fa\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Experiment_Edit_Budget')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, item) {var title = item.ExperimentId ? 'Experiment_BudgetEllipsis_Title_Exp_' + item.AssociatedExperiment.Status : 'Experiment_BudgetEllipsis_Title_Base'\nvar split = item.AssociatedExperiment.TrafficSplitPercent\nvar splitBase = split ? (100 - split) : '-'\nvar splitExp = split || '-'\npug_html = pug_html + \"\\u003Cdiv class=\\\"budget-detail\\\"\\u003E\\u003Ca class=\\\"closeimage pull-right\\\" style=\\\"margin-left: 8px\\\"\\u003E\\u003C\\u002Fa\\u003E\" + (null == (pug_interp = i18n.getString(title)) ? \"\" : pug_interp) + \"\\u003Cul style=\\\"list-style: disc inside; margin-bottom: 0;\\\"\\u003E\\u003Cli\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Experiment_BudgetEllipsis_Content_Base').replace('{0}', splitBase)) ? \"\" : pug_interp)) + \"\\u003C\\u002Fli\\u003E\\u003Cli\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Experiment_BudgetEllipsis_Content_Exp').replace('{0}', splitExp)) ? \"\" : pug_interp)) + \"\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"item\" in locals_for_with?locals_for_with.item:typeof item!==\"undefined\"?item:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (model) {if (model) {\npug_html = pug_html + \"\\u003Cdiv\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = model.budgetName) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cdiv\\u003E\\u003Cspan\" + (\" class=\\\"combinedBudgetGridCellValue\\\"\"+pug.attr(\"data-budgetamount\", model.budgetAmount, true, true)+pug.attr(\"data-budgettype\", model.budgetType, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = model.budgetAmount) ? \"\" : pug_interp)) + \"\\u002F\" + (pug.escape(null == (pug_interp = model.budgetTypeText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\nif (model.AssociatedExperiment) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"status_icon gridDetailsImage spritedimagealign experiment-budget-ellipsis\\\" tabindex=\\\"0\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + (pug.escape(null == (pug_interp = ' ') ? \"\" : pug_interp));\n}}.call(this,\"model\" in locals_for_with?locals_for_with.model:typeof model!==\"undefined\"?model:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (BiddingScheme, CampaignType, DisplayBiddingStrategyType, i18n) {if (DisplayBiddingStrategyType) {\nif (CampaignType == 'App') {\nif (BiddingScheme && BiddingScheme.Type && BiddingScheme.Type === 'ManualCpc') {\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BidStrategy_ManualCpc')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BidStrategy_ManualCpi')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\n}\nelse\nif (DisplayBiddingStrategyType == 'InheritFromParent' || DisplayBiddingStrategyType == 'MaxClicks' || DisplayBiddingStrategyType == 'MaxConversions' || DisplayBiddingStrategyType == 'TargetCpa' || DisplayBiddingStrategyType == 'TargetRoas' || DisplayBiddingStrategyType == 'EnhancedCpc' || DisplayBiddingStrategyType === 'MaxConversionValue' || DisplayBiddingStrategyType === 'TargetImpressionShare' || DisplayBiddingStrategyType === 'ManualCpa' || DisplayBiddingStrategyType === 'ManualCpc' || DisplayBiddingStrategyType === 'ManualCpv' || DisplayBiddingStrategyType === 'ManualCpm' || DisplayBiddingStrategyType === 'Commission' || DisplayBiddingStrategyType === 'PercentCpc' || DisplayBiddingStrategyType === 'CostPerSale' || DisplayBiddingStrategyType === 'ViewableCpm' || DisplayBiddingStrategyType === 'Cpcv' || DisplayBiddingStrategyType === 'MaxReach' || DisplayBiddingStrategyType === 'MaxImpressions') {\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BidStrategy_'+DisplayBiddingStrategyType)) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BidStrategy_ManualCpc')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\n}\nelse {\npug_html = pug_html + (pug.escape(null == (pug_interp = ' ') ? \"\" : pug_interp));\n}}.call(this,\"BiddingScheme\" in locals_for_with?locals_for_with.BiddingScheme:typeof BiddingScheme!==\"undefined\"?BiddingScheme:undefined,\"CampaignType\" in locals_for_with?locals_for_with.CampaignType:typeof CampaignType!==\"undefined\"?CampaignType:undefined,\"DisplayBiddingStrategyType\" in locals_for_with?locals_for_with.DisplayBiddingStrategyType:typeof DisplayBiddingStrategyType!==\"undefined\"?DisplayBiddingStrategyType:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (value) {if (value.$total) {\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = value.$total.text) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\nelse\nif (value.name) {\nif (value.baseCampaignName) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"base-campaign-name\\\"\\u003E\" + (pug.escape(null == (pug_interp = value.baseCampaignName) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\n}\nif (value.isForVNext) {\npug_html = pug_html + \"\\u003Ca\" + (pug.attr(\"class\", pug.classes([\"scope-navigator\",value.className], [false,true]), false, true)+pug.attr(\"href\", value.href, true, true)+pug.attr(\"data-campaignid\", value.cmpid, true, true)+pug.attr(\"aria-label\", value.ariaLabel, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = value.name) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Ca\" + (pug.attr(\"href\", value.href, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = value.name) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}\n}\nelse {\npug_html = pug_html + (pug.escape(null == (pug_interp = ' ') ? \"\" : pug_interp));\n}}.call(this,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value: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 (value) {if (value.name) {\npug_html = pug_html + \"\\u003Ca\" + (pug.attr(\"href\", value.href, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = value.name) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}}.call(this,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value: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 (DeliveryStatus, GeoCodeStatus, Id, budgetId, budgetLandscapeClassName, budgetType, containerClassName, enabledBidlandscape, hasBidlandscapeIcon, i18n, inlineOpportunityClassname, isErrorStatus, isForVNext, isWarningStatus, shouldShowPopUpStyleInVnext, shouldShowSensitiveContentWarning, showBudgetLandscape, showEllipsisForExperiment, showInlineOpportunityPopup, showRejectPopup, vNextContainerClassName, videoNeedsToBeConverted, vnextInlineOpportunityClassname, withInlineAppeals) {pug_mixins[\"ellipsis\"] = pug_interp = function(){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"status-image\\\"\\u003E\\u003Cdiv\" + (\" class=\\\"status_icon gridDetailsImage spritedimagealign clickable experiment-delivery-status-override delivery_status_with_reject_reasons\\\"\"+pug.attr(\"title\", i18n.getString('Page_Keywords_DeliveryStatusDetails'), true, true)+pug.attr(\"aria-label\", i18n.getString('Page_Keywords_DeliveryStatusDetails'), true, true)+\" id=\\\"reasonImage#{Id}\\\" tabindex=\\\"0\\\" role=\\\"button\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\nif (isForVNext) {\nif (DeliveryStatus) {\nvar statusTypeClass = isErrorStatus ? 'status-error' : (isWarningStatus ? 'status-warning' : 'status-info')\nvar localizedText = i18n.getString('Label_DeliveryStatus_' + DeliveryStatus)\nif (shouldShowSensitiveContentWarning) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"delivery\\\"\\u003E\\u003Cdiv class=\\\"dashedBottomLine\\\"\\u003E\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"editorial-category-delivery-info\",`${shouldShowPopUpStyleInVnext ? 'trigger-popup' : ''} ${vNextContainerClassName}`], [false,true]), false, true)) + \"\\u003E\";\nif (isErrorStatus) {\npug_html = pug_html + \"\\u003Cspan\" + (\" class=\\\"status-icon iconba iconba-ErrorBadge\\\"\"+pug.attr(\"title\", i18n.getString('DeliveryStatusIcon_Tooltip_Error'), true, true)+pug.attr(\"aria-label\", i18n.getString('DeliveryStatusIcon_Tooltip_Error'), true, true)+\" role=\\\"img\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\nelse\nif ((isWarningStatus || videoNeedsToBeConverted)) {\npug_html = pug_html + \"\\u003Cspan\" + (\" class=\\\"status-icon iconba iconba-Warning\\\"\"+pug.attr(\"title\", i18n.getString('DeliveryStatusIcon_Tooltip_Warning'), true, true)+pug.attr(\"aria-label\", i18n.getString('DeliveryStatusIcon_Tooltip_Warning'), true, true)+\" role=\\\"img\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\nif (showRejectPopup) {\npug_html = pug_html + \"\\u003Cspan\" + (pug.attr(\"class\", pug.classes([\"status-column\",\"clickable\",`${statusTypeClass} delivery_status_with_reject_reasons`], [false,false,true]), false, true)+\" tabindex=\\\"0\\\" role=\\\"button\\\"\") + \"\\u003E\" + (pug.escape(null == (pug_interp = localizedText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\nelse\nif (showBudgetLandscape) {\npug_html = pug_html + \"\\u003Cspan\" + (pug.attr(\"class\", pug.classes([\"status-column\",`${statusTypeClass} delivery_status_with_budget_suggestions`], [false,true]), false, true)+\" tabindex=\\\"0\\\" role=\\\"button\\\"\") + \"\\u003E\" + (pug.escape(null == (pug_interp = localizedText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\" + (\" class=\\\"status-column iconba iconba-Financial\\\"\"+\" tabindex=\\\"0\\\" role=\\\"button\\\"\"+pug.attr(\"aria-label\", i18n.getString('BidLandscape_ClickableIconText'), true, true)) + \"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\nelse\nif (showInlineOpportunityPopup) {\npug_html = pug_html + \"\\u003Cspan\" + (pug.attr(\"class\", pug.classes([\"status-column\",statusTypeClass], [false,true]), false, true)+\" tabindex=\\\"0\\\" role=\\\"button\\\"\") + \"\\u003E\" + (pug.escape(null == (pug_interp = localizedText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\" + (pug.attr(\"class\", pug.classes([\"status-column\",vnextInlineOpportunityClassname], [false,true]), false, true)+\" tabindex=\\\"0\\\" role=\\\"button\\\"\"+pug.attr(\"aria-label\", i18n.getString('InlineOpportunity_Bubble_TooltipText'), true, true)) + \"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan\" + (pug.attr(\"class\", pug.classes([\"status-column\",statusTypeClass], [false,true]), false, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = localizedText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"sensitive-contents-text\\\"\\u003E\\u003Cspan class=\\\"delivery_status_with_reject_reasons_editorial_category\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Label_DeliveryStatus_Sensitive_Content')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"delivery-info\",`${shouldShowPopUpStyleInVnext ? 'trigger-popup' : ''} ${vNextContainerClassName}`], [false,true]), false, true)) + \"\\u003E\";\nif (isErrorStatus) {\npug_html = pug_html + \"\\u003Cspan\" + (\" class=\\\"status-icon iconba iconba-ErrorBadge\\\"\"+pug.attr(\"title\", i18n.getString('DeliveryStatusIcon_Tooltip_Error'), true, true)+pug.attr(\"aria-label\", i18n.getString('DeliveryStatusIcon_Tooltip_Error'), true, true)+\" role=\\\"img\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\nelse\nif (isWarningStatus) {\npug_html = pug_html + \"\\u003Cspan\" + (\" class=\\\"status-icon iconba iconba-Warning\\\"\"+pug.attr(\"title\", i18n.getString('DeliveryStatusIcon_Tooltip_Warning'), true, true)+pug.attr(\"aria-label\", i18n.getString('DeliveryStatusIcon_Tooltip_Warning'), true, true)+\" role=\\\"img\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\nif (showRejectPopup) {\npug_html = pug_html + \"\\u003Cspan\" + (pug.attr(\"class\", pug.classes([\"status-column\",\"clickable\",`${statusTypeClass} delivery_status_with_reject_reasons`], [false,false,true]), false, true)+\" tabindex=\\\"0\\\" role=\\\"button\\\"\") + \"\\u003E\" + (pug.escape(null == (pug_interp = localizedText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\nelse\nif (showBudgetLandscape) {\npug_html = pug_html + \"\\u003Cspan\" + (pug.attr(\"class\", pug.classes([\"status-column\",`${statusTypeClass} delivery_status_with_budget_suggestions`], [false,true]), false, true)+\" tabindex=\\\"0\\\" role=\\\"button\\\"\") + \"\\u003E\" + (pug.escape(null == (pug_interp = localizedText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\" + (\" class=\\\"status-column iconba iconba-Financial\\\"\"+\" tabindex=\\\"0\\\" role=\\\"button\\\"\"+pug.attr(\"aria-label\", i18n.getString('BidLandscape_ClickableIconText'), true, true)) + \"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\nelse\nif (showInlineOpportunityPopup) {\npug_html = pug_html + \"\\u003Cspan\" + (pug.attr(\"class\", pug.classes([\"status-column\",statusTypeClass], [false,true]), false, true)+\" tabindex=\\\"0\\\" role=\\\"button\\\"\") + \"\\u003E\" + (pug.escape(null == (pug_interp = localizedText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\" + (pug.attr(\"class\", pug.classes([\"status-column\",vnextInlineOpportunityClassname], [false,true]), false, true)+\" tabindex=\\\"0\\\" role=\\\"button\\\"\"+pug.attr(\"aria-label\", i18n.getString('InlineOpportunity_Bubble_TooltipText'), true, true)) + \"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan\" + (pug.attr(\"class\", pug.classes([\"status-column\",statusTypeClass], [false,true]), false, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = localizedText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\nif (hasBidlandscapeIcon&&budgetType) {\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"status-column\",\"iconba\",\"iconba-Financial\",\"bidlandscape_icon\",\"spritedimagealign\",\"spritedimage\",\"clickable\",enabledBidlandscape?'enabled':'disabled'], [false,false,false,false,false,false,false,true]), false, true)+\" tabindex=\\\"0\\\" role=\\\"button\\\"\"+pug.attr(\"id\", `campainBidLandscape${budgetId}`, true, true)+pug.attr(\"aria-label\", i18n.getString('Campaign_BidLandscape_Title'), true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}\n}\nelse {\npug_html = pug_html + (pug.escape(null == (pug_interp = ' ') ? \"\" : pug_interp));\n}\n}\nelse {\nif (DeliveryStatus) {\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([containerClassName], [true]), false, true)) + \"\\u003E\\u003Cdiv class=\\\"mark-container\\\"\\u003E\";\nif (isErrorStatus || isWarningStatus) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"status-icon\\\"\\u003E\";\nif (isErrorStatus) {\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"status_error spritedimagealign\\\"\"+pug.attr(\"title\", i18n.getString('DeliveryStatusIcon_Tooltip_Error'), true, true)+pug.attr(\"aria-label\", i18n.getString('DeliveryStatusIcon_Tooltip_Error'), true, true)+\" role=\\\"img\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"status_warning spritedimagealign\\\"\"+pug.attr(\"title\", i18n.getString('DeliveryStatusIcon_Tooltip_Warning'), true, true)+pug.attr(\"aria-label\", i18n.getString('DeliveryStatusIcon_Tooltip_Warning'), true, true)+\" role=\\\"img\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"decorated-element\\\"\\u003E\";\nif (DeliveryStatus === 'GeoCodingIncomplete') {\npug_html = pug_html + \"\\u003Cdiv class=\\\"status-column\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Label_DeliveryStatus_1101_' + GeoCodeStatus)) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"status-column\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Label_DeliveryStatus_' + DeliveryStatus)) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"glyph-container\\\"\\u003E\";\nif (withInlineAppeals) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"status-image\\\"\\u003E\\u003Cdiv\" + (\" class=\\\"status_icon gridDetailsImage spritedimagealign clickable delivery_status_with_inline_appeals\\\"\"+pug.attr(\"data-entityId\", Id, true, true)+\" title=\\\"\\\" id=\\\"reasonImage#{Id}\\\" tabindex=\\\"0\\\" role=\\\"button\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse\nif (showRejectPopup) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"status-image\\\"\\u003E\\u003Cdiv\" + (\" class=\\\"status_icon gridDetailsImage spritedimagealign clickable delivery_status_with_reject_reasons\\\"\"+pug.attr(\"title\", i18n.getString('Page_Keywords_DeliveryStatusDetails'), true, true)+pug.attr(\"aria-label\", i18n.getString('Page_Keywords_DeliveryStatusDetails'), true, true)+\" id=\\\"reasonImage#{Id}\\\" tabindex=\\\"0\\\" role=\\\"button\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse\nif (showBudgetLandscape) {\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([budgetLandscapeClassName], [true]), false, true)+pug.attr(\"data-entityId\", Id, true, true)+\" title=\\\"\\\" id=\\\"BudgetImage#{Id}\\\" tabindex=\\\"0\\\" role=\\\"button\\\"\"+pug.attr(\"aria-label\", i18n.getString('BidLandscape_ClickableIconText'), true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse\nif (showInlineOpportunityPopup) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"inline-opportunity-status\\\"\\u003E\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([inlineOpportunityClassname], [true]), false, true)+pug.attr(\"data-entityId\", Id, true, true)+pug.attr(\"title\", i18n.getString('InlineOpportunity_Bubble_TooltipText'), true, true)+pug.attr(\"aria-label\", i18n.getString('InlineOpportunity_Bubble_TooltipText'), true, true)+\" id=\\\"InlineOpportunity#{Id}\\\" tabindex=\\\"0\\\" role=\\\"button\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse\nif (showEllipsisForExperiment) {\npug_mixins[\"ellipsis\"]();\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + (pug.escape(null == (pug_interp = ' ') ? \"\" : pug_interp));\n}\n}}.call(this,\"DeliveryStatus\" in locals_for_with?locals_for_with.DeliveryStatus:typeof DeliveryStatus!==\"undefined\"?DeliveryStatus:undefined,\"GeoCodeStatus\" in locals_for_with?locals_for_with.GeoCodeStatus:typeof GeoCodeStatus!==\"undefined\"?GeoCodeStatus:undefined,\"Id\" in locals_for_with?locals_for_with.Id:typeof Id!==\"undefined\"?Id:undefined,\"budgetId\" in locals_for_with?locals_for_with.budgetId:typeof budgetId!==\"undefined\"?budgetId:undefined,\"budgetLandscapeClassName\" in locals_for_with?locals_for_with.budgetLandscapeClassName:typeof budgetLandscapeClassName!==\"undefined\"?budgetLandscapeClassName:undefined,\"budgetType\" in locals_for_with?locals_for_with.budgetType:typeof budgetType!==\"undefined\"?budgetType:undefined,\"containerClassName\" in locals_for_with?locals_for_with.containerClassName:typeof containerClassName!==\"undefined\"?containerClassName:undefined,\"enabledBidlandscape\" in locals_for_with?locals_for_with.enabledBidlandscape:typeof enabledBidlandscape!==\"undefined\"?enabledBidlandscape:undefined,\"hasBidlandscapeIcon\" in locals_for_with?locals_for_with.hasBidlandscapeIcon:typeof hasBidlandscapeIcon!==\"undefined\"?hasBidlandscapeIcon:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"inlineOpportunityClassname\" in locals_for_with?locals_for_with.inlineOpportunityClassname:typeof inlineOpportunityClassname!==\"undefined\"?inlineOpportunityClassname:undefined,\"isErrorStatus\" in locals_for_with?locals_for_with.isErrorStatus:typeof isErrorStatus!==\"undefined\"?isErrorStatus:undefined,\"isForVNext\" in locals_for_with?locals_for_with.isForVNext:typeof isForVNext!==\"undefined\"?isForVNext:undefined,\"isWarningStatus\" in locals_for_with?locals_for_with.isWarningStatus:typeof isWarningStatus!==\"undefined\"?isWarningStatus:undefined,\"shouldShowPopUpStyleInVnext\" in locals_for_with?locals_for_with.shouldShowPopUpStyleInVnext:typeof shouldShowPopUpStyleInVnext!==\"undefined\"?shouldShowPopUpStyleInVnext:undefined,\"shouldShowSensitiveContentWarning\" in locals_for_with?locals_for_with.shouldShowSensitiveContentWarning:typeof shouldShowSensitiveContentWarning!==\"undefined\"?shouldShowSensitiveContentWarning:undefined,\"showBudgetLandscape\" in locals_for_with?locals_for_with.showBudgetLandscape:typeof showBudgetLandscape!==\"undefined\"?showBudgetLandscape:undefined,\"showEllipsisForExperiment\" in locals_for_with?locals_for_with.showEllipsisForExperiment:typeof showEllipsisForExperiment!==\"undefined\"?showEllipsisForExperiment:undefined,\"showInlineOpportunityPopup\" in locals_for_with?locals_for_with.showInlineOpportunityPopup:typeof showInlineOpportunityPopup!==\"undefined\"?showInlineOpportunityPopup:undefined,\"showRejectPopup\" in locals_for_with?locals_for_with.showRejectPopup:typeof showRejectPopup!==\"undefined\"?showRejectPopup:undefined,\"vNextContainerClassName\" in locals_for_with?locals_for_with.vNextContainerClassName:typeof vNextContainerClassName!==\"undefined\"?vNextContainerClassName:undefined,\"videoNeedsToBeConverted\" in locals_for_with?locals_for_with.videoNeedsToBeConverted:typeof videoNeedsToBeConverted!==\"undefined\"?videoNeedsToBeConverted:undefined,\"vnextInlineOpportunityClassname\" in locals_for_with?locals_for_with.vnextInlineOpportunityClassname:typeof vnextInlineOpportunityClassname!==\"undefined\"?vnextInlineOpportunityClassname:undefined,\"withInlineAppeals\" in locals_for_with?locals_for_with.withInlineAppeals:typeof withInlineAppeals!==\"undefined\"?withInlineAppeals:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (model) {if (model) {\npug_html = pug_html + \"\\u003Cdiv\\u003E\\u003Cspan\" + (\" class=\\\"combinedBudgetGridCellValue\\\"\"+pug.attr(\"data-budgetamount\", model.budgetAmount, true, true)+pug.attr(\"data-budgettype\", model.budgetType, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = model.budgetAmount) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + (pug.escape(null == (pug_interp = ' ') ? \"\" : pug_interp));\n}}.call(this,\"model\" in locals_for_with?locals_for_with.model:typeof model!==\"undefined\"?model:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (isForVNext, value) {if (value.score > 0) {\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = value.score) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\\u002F10 \";\nif (isForVNext) {\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"iconba iconba-More quality-score-tooltip\\\"\"+pug.attr(\"title\", value.title, true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"status-image status_icon quality-score-detail\\\"\"+pug.attr(\"title\", value.title, true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan\\u003E-\\u003C\\u002Fspan\\u003E\";\n}}.call(this,\"isForVNext\" in locals_for_with?locals_for_with.isForVNext:typeof isForVNext!==\"undefined\"?isForVNext:undefined,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value: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;pug_html = pug_html + \"\\u003Cdiv\\u003E\\u003C\\u002Fdiv\\u003E\";;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 (enableGridFlexLayout, i18n, isForVNext, value) {pug_html = pug_html + \"\\u003Cspan\\u003E\";\nif (value.Status === 'Paused' || value.Status == 'UserPaused' || value.Status == 'BudgetUserPaused') {\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"statuschangetask statusicondisplay statuschangehover clickable\\\"\"+\" tabindex=\\\"0\\\"\"+pug.attr(\"id\", `statusIcon${value.Id}`, true, true)+pug.attr(\"data-rowId\", `${value.Id}`, true, true)+\" data-statusText=\\\"Paused\\\"\"+pug.attr(\"aria-label\", `${i18n.getString('EntityStatus_Paused')}`, true, true)+\" role=\\\"button\\\" aria-haspopup=\\\"true\\\" aria-expanded=\\\"false\\\"\") + \"\\u003E\";\nif (value.isExperiment) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"experiment-paused-icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"statusPaused_icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nif (isForVNext && enableGridFlexLayout) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"iconba iconba-ChevronDown\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n}\nelse\nif (value.Status === 'Draft') {\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"statusicondisplay\\\"\"+pug.attr(\"id\", `statusIcon${value.Id}`, true, true)+pug.attr(\"data-rowId\", `${value.Id}`, true, true)+\" data-statusText=\\\"Draft\\\"\"+pug.attr(\"aria-label\", `${i18n.getString('EntityStatus_Draft')}`, true, true)) + \"\\u003E\";\nif (value.isExperiment) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"experiment-paused-icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"statusDraft_icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n}\nelse\nif (value.Status === 'Expired') {\npug_html = pug_html + \"\\u003Cdiv class=\\\"statushypendisplay\\\"\\u003E\" + (pug.escape(null == (pug_interp = ' - ') ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\n}\nelse\nif (value.Status === 'Deleted') {\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"statuschangetask statusicondisplay statuschangehover clickable\\\"\"+\" tabindex=\\\"0\\\"\"+pug.attr(\"id\", `statusIcon${value.Id}`, true, true)+pug.attr(\"data-rowId\", `${value.Id}`, true, true)+\" data-statusText=\\\"Deleted\\\"\"+pug.attr(\"aria-label\", `${i18n.getString('EntityStatus_Deleted')}`, true, true)+\" role=\\\"button\\\" aria-haspopup=\\\"true\\\" aria-expanded=\\\"false\\\"\") + \"\\u003E\\u003Cdiv class=\\\"statusDeleted_icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (isForVNext && enableGridFlexLayout) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"iconba iconba-ChevronDown\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n}\nelse\nif (value.Status === 'Suspended') {\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"statuschangetask statusicondisplay statuschangehover clickable\\\"\"+\" tabindex=\\\"0\\\"\"+pug.attr(\"id\", `statusIcon${value.Id}`, true, true)+pug.attr(\"data-rowId\", `${value.Id}`, true, true)+\" data-statusText=\\\"Suspended\\\"\"+pug.attr(\"aria-label\", `${i18n.getString('EntityStatus_Suspended')}`, true, true)+\" role=\\\"button\\\" aria-haspopup=\\\"true\\\" aria-expanded=\\\"false\\\"\") + \"\\u003E\\u003Cdiv class=\\\"statusSuspended_icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (isForVNext && enableGridFlexLayout) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"iconba iconba-ChevronDown\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n}\nelse\nif (!value.Status) {\npug_html = pug_html + (pug.escape(null == (pug_interp = ' ') ? \"\" : pug_interp));\n}\nelse\nif (value.Status === 'InProgress') {\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"statuschangetask statusicondisplay clickable\\\"\"+\" tabindex=\\\"0\\\"\"+pug.attr(\"id\", `statusIcon${value.Id}`, true, true)+pug.attr(\"data-rowId\", `${value.Id}`, true, true)+\" data-statusText=\\\"Enabled\\\"\"+pug.attr(\"aria-label\", `${i18n.getString('EntityStatus_Active')}`, true, true)+\" role=\\\"button\\\" aria-haspopup=\\\"true\\\" aria-expanded=\\\"false\\\"\") + \"\\u003E\";\nif (value.isExperiment) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"experiment-active-icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"statusEnabled_icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"statuschangetask statusicondisplay statuschangehover clickable\\\"\"+\" tabindex=\\\"0\\\"\"+pug.attr(\"id\", `statusIcon${value.Id}`, true, true)+pug.attr(\"data-rowId\", `${value.Id}`, true, true)+\" data-statusText=\\\"Enabled\\\"\"+pug.attr(\"aria-label\", `${i18n.getString('EntityStatus_Active')}`, true, true)+\" role=\\\"button\\\" aria-haspopup=\\\"true\\\" aria-expanded=\\\"false\\\"\") + \"\\u003E\";\nif (value.isExperiment) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"experiment-active-icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"statusEnabled_icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nif (isForVNext && enableGridFlexLayout) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"iconba iconba-ChevronDown\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fspan\\u003E\";}.call(this,\"enableGridFlexLayout\" in locals_for_with?locals_for_with.enableGridFlexLayout:typeof enableGridFlexLayout!==\"undefined\"?enableGridFlexLayout:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"isForVNext\" in locals_for_with?locals_for_with.isForVNext:typeof isForVNext!==\"undefined\"?isForVNext:undefined,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value: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;pug_html = pug_html + \"\\u003Cspan class=\\\"grid-cell-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = '-') ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";;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 (schemaI18n, value) {if (value) {\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = schemaI18n.enum('CallTrackingStatus', value)) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + (pug.escape(null == (pug_interp = ' ') ? \"\" : pug_interp));\n}}.call(this,\"schemaI18n\" in locals_for_with?locals_for_with.schemaI18n:typeof schemaI18n!==\"undefined\"?schemaI18n:undefined,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value: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 (value) {if (value) {\nif (value.isBudgetCenterEntryEnabled) {\npug_html = pug_html + \"\\u003Cspan class=\\\"performance-metrics-value\\\"\\u003E\\u003Cspan class=\\\"budget-center-entry\\\" tabindex=\\\"0\\\" role=\\\"button\\\"\\u003E\" + (pug.escape(null == (pug_interp = value.metricValue) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan class=\\\"performance-metrics-value\\\"\\u003E\";\nif (value.hasConversionDeliveryStatus) {\npug_html = pug_html + \"\\u003Cspan class=\\\"status-column status-warning conversion-warning-delivery-status\\\"\\u003E\\u003Cspan class=\\\"status-icon iconba iconba-Warning\\\"\\u003E \\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = value.metricValue) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + (pug.escape(null == (pug_interp = value.metricValue) ? \"\" : pug_interp));\n}\npug_html = pug_html + \"\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003Cspan class=\\\"performance-metrics-fluctuation\\\"\\u003E\";\nif (value.hasFluctuation) {\npug_html = pug_html + \"\\u003Cspan\" + (\" class=\\\"iconba iconba-Insights clickable\\\"\"+\" tabindex=\\\"0\\\" role=\\\"button\\\"\"+pug.attr(\"data-metric-name\", value.metricName, true, true)+pug.attr(\"data-metric-value\", value.metricValue, true, true)+pug.attr(\"data-metric-type\", value.metricType, true, true)) + \"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + (pug.escape(null == (pug_interp = '-') ? \"\" : pug_interp));\n}}.call(this,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (model) {pug_html = pug_html + \"\\u003Cdiv class=\\\"nameTemplate\\\"\\u003E\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([['labels-cell-scope', model.Scope === 'Customer' ? 'labels-cell-mcc' : 'labels-cell-account']], [true]), false, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cspan class=\\\"table__cell--menu-item-style table__cell--ellipsis-overflow\\\"\\u003E\" + (pug.escape(null == (pug_interp = model.Name) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"model\" in locals_for_with?locals_for_with.model:typeof model!==\"undefined\"?model:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, violations) {pug_html = pug_html + \"\\u003Cdiv class=\\\"popup-header\\\" style=\\\"font-size: 20px; padding-bottom: 10px;\\\"\\u003E\\u003Cspan\\u003E\" + (null == (pug_interp = i18n.getString('Label_DeliveryStatus_Sensitive_Content')) ? \"\" : pug_interp) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (\" class=\\\"popup-categories\\\"\"+pug.attr(\"style\", pug.style('max-height: 150px;' + (violations.length > 4 ? 'overflow-y: scroll;' : '')), true, true)) + \"\\u003E\";\n// iterate violations\n;(function(){\n var $$obj = violations;\n if ('number' == typeof $$obj.length) {\n for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) {\n var violation = $$obj[pug_index0];\nvar name = i18n.getString('CategoryFAID_' + violation.name);\nvar requestExceptionLink = violation.link ? `${name}` : `${name}`;\npug_html = pug_html + \"\\u003Cdiv class=\\\"tr\\\"\\u003E\\u003Cspan\" + (\" class=\\\"status-icon iconba iconba-ErrorBadge\\\"\"+pug.attr(\"title\", i18n.getString('DeliveryStatusIcon_Tooltip_Error'), true, true)+pug.attr(\"aria-label\", i18n.getString('DeliveryStatusIcon_Tooltip_Error'), true, true)+\" role=\\\"img\\\" style=\\\"color:red;\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"categories\\\" style=\\\"line-height: 2; font-size: 15px; padding-left: 10px;\\\"\\u003E\" + (null == (pug_interp = requestExceptionLink) ? \"\" : pug_interp) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index0 in $$obj) {\n $$l++;\n var violation = $$obj[pug_index0];\nvar name = i18n.getString('CategoryFAID_' + violation.name);\nvar requestExceptionLink = violation.link ? `${name}` : `${name}`;\npug_html = pug_html + \"\\u003Cdiv class=\\\"tr\\\"\\u003E\\u003Cspan\" + (\" class=\\\"status-icon iconba iconba-ErrorBadge\\\"\"+pug.attr(\"title\", i18n.getString('DeliveryStatusIcon_Tooltip_Error'), true, true)+pug.attr(\"aria-label\", i18n.getString('DeliveryStatusIcon_Tooltip_Error'), true, true)+\" role=\\\"img\\\" style=\\\"color:red;\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"categories\\\" style=\\\"line-height: 2; font-size: 15px; padding-left: 10px;\\\"\\u003E\" + (null == (pug_interp = requestExceptionLink) ? \"\" : pug_interp) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"popup-footer\\\" style=\\\"padding-top: 15px;\\\"\\u003E\\u003Cspan\\u003E\" + (null == (pug_interp = i18n.getString('Label_DeliveryStatus_Sensitive_Content_Explaination')) ? \"\" : pug_interp) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"violations\" in locals_for_with?locals_for_with.violations:typeof violations!==\"undefined\"?violations: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 (countryListLabel, footer, i18n, isCountryListEnabled, isCountryListHidden, isDetectionRejectionTypeEnabled, isDisapproved, reasons, showRequestExceptionLink, title) {pug_html = pug_html + \"\\u003Cdiv class=\\\"new-editorial-popup\\\"\\u003E\\u003Cdiv class=\\\"popup-header\\\"\\u003E\\u003Cspan\\u003E\" + (null == (pug_interp = title) ? \"\" : pug_interp) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"popup-content\\\"\\u003E\";\n// iterate reasons\n;(function(){\n var $$obj = reasons;\n if ('number' == typeof $$obj.length) {\n for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) {\n var rejectionReason = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cdiv class=\\\"editorial-reason\\\"\\u003E\";\nif ((isDisapproved)) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"iconba iconba-ErrorBadge\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"iconba iconba-Warning\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Cspan class=\\\"violation\\\"\\u003E\" + (null == (pug_interp = rejectionReason.violation) ? \"\" : pug_interp) + \"\\u003C\\u002Fspan\\u003E\";\nif ((isDetectionRejectionTypeEnabled)) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"detection-rejection\\\"\\u003E\\u003Cspan class=\\\"detection-label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Editorial_Detection')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"detection-type\\\"\\u003E\" + (pug.escape(null == (pug_interp = rejectionReason.detectionType) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"rejection-label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Editorial_Rejection')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"rejection-type\\\"\\u003E\" + (pug.escape(null == (pug_interp = rejectionReason.rejectionType) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cul\\u003E\";\nif (rejectionReason.locations) {\npug_html = pug_html + \"\\u003Cli\\u003E\\u003Cspan\\u003E\" + (null == (pug_interp = rejectionReason.locations) ? \"\" : pug_interp) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fli\\u003E\";\n}\nif ((!isCountryListHidden)) {\npug_html = pug_html + \"\\u003Cli\\u003E\\u003Cspan\\u003E\" + (null == (pug_interp = rejectionReason.violationCountry) ? \"\" : pug_interp) + \"\\u003C\\u002Fspan\\u003E\";\nif ((isCountryListEnabled && rejectionReason.countries && rejectionReason.countries.length > 1)) {\npug_html = pug_html + \"\\u003Cspan\" + (\" class=\\\"toggle-country-list iconba-ChevronDown icon\\\"\"+\" role=\\\"button\\\" tabindex=\\\"0\\\"\"+pug.attr(\"aria-label\", countryListLabel, true, true)) + \"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cdiv class=\\\"country-list\\\"\\u003E\";\n// iterate rejectionReason.countries\n;(function(){\n var $$obj = rejectionReason.countries;\n if ('number' == typeof $$obj.length) {\n for (var pug_index1 = 0, $$l = $$obj.length; pug_index1 < $$l; pug_index1++) {\n var country = $$obj[pug_index1];\npug_html = pug_html + \"\\u003Cdiv\\u003E\" + (null == (pug_interp = country) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index1 in $$obj) {\n $$l++;\n var country = $$obj[pug_index1];\npug_html = pug_html + \"\\u003Cdiv\\u003E\" + (null == (pug_interp = country) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fli\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Ful\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index0 in $$obj) {\n $$l++;\n var rejectionReason = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cdiv class=\\\"editorial-reason\\\"\\u003E\";\nif ((isDisapproved)) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"iconba iconba-ErrorBadge\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"iconba iconba-Warning\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Cspan class=\\\"violation\\\"\\u003E\" + (null == (pug_interp = rejectionReason.violation) ? \"\" : pug_interp) + \"\\u003C\\u002Fspan\\u003E\";\nif ((isDetectionRejectionTypeEnabled)) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"detection-rejection\\\"\\u003E\\u003Cspan class=\\\"detection-label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Editorial_Detection')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"detection-type\\\"\\u003E\" + (pug.escape(null == (pug_interp = rejectionReason.detectionType) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"rejection-label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Editorial_Rejection')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"rejection-type\\\"\\u003E\" + (pug.escape(null == (pug_interp = rejectionReason.rejectionType) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cul\\u003E\";\nif (rejectionReason.locations) {\npug_html = pug_html + \"\\u003Cli\\u003E\\u003Cspan\\u003E\" + (null == (pug_interp = rejectionReason.locations) ? \"\" : pug_interp) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fli\\u003E\";\n}\nif ((!isCountryListHidden)) {\npug_html = pug_html + \"\\u003Cli\\u003E\\u003Cspan\\u003E\" + (null == (pug_interp = rejectionReason.violationCountry) ? \"\" : pug_interp) + \"\\u003C\\u002Fspan\\u003E\";\nif ((isCountryListEnabled && rejectionReason.countries && rejectionReason.countries.length > 1)) {\npug_html = pug_html + \"\\u003Cspan\" + (\" class=\\\"toggle-country-list iconba-ChevronDown icon\\\"\"+\" role=\\\"button\\\" tabindex=\\\"0\\\"\"+pug.attr(\"aria-label\", countryListLabel, true, true)) + \"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cdiv class=\\\"country-list\\\"\\u003E\";\n// iterate rejectionReason.countries\n;(function(){\n var $$obj = rejectionReason.countries;\n if ('number' == typeof $$obj.length) {\n for (var pug_index2 = 0, $$l = $$obj.length; pug_index2 < $$l; pug_index2++) {\n var country = $$obj[pug_index2];\npug_html = pug_html + \"\\u003Cdiv\\u003E\" + (null == (pug_interp = country) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index2 in $$obj) {\n $$l++;\n var country = $$obj[pug_index2];\npug_html = pug_html + \"\\u003Cdiv\\u003E\" + (null == (pug_interp = country) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fli\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Ful\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003Cdiv class=\\\"popup-footer\\\"\\u003E\";\nif ((showRequestExceptionLink)) {\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (null == (pug_interp = footer.requestExceptionLink) ? \"\" : pug_interp) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (null == (pug_interp = ' | ') ? \"\" : pug_interp) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (null == (pug_interp = footer.requestParentLevelExceptionLink) ? \"\" : pug_interp) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (null == (pug_interp = footer.requestParentLevelExceptionLink ? ' | ' : '') ? \"\" : pug_interp) + \"\\u003C\\u002Fspan\\u003E\\u003Ca class=\\\"HelpTopic\\\" query=\\\"help:app50003\\\" href=\\\"javascript:void(0);\\\"\\u003E\" + (pug.escape(null == (pug_interp = footer.helpText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (null == (pug_interp = footer.contactSupportLink) ? \"\" : pug_interp) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (null == (pug_interp = ' ') ? \"\" : pug_interp) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (null == (pug_interp = footer.requestReviewText) ? \"\" : pug_interp) + \"\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"countryListLabel\" in locals_for_with?locals_for_with.countryListLabel:typeof countryListLabel!==\"undefined\"?countryListLabel:undefined,\"footer\" in locals_for_with?locals_for_with.footer:typeof footer!==\"undefined\"?footer:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"isCountryListEnabled\" in locals_for_with?locals_for_with.isCountryListEnabled:typeof isCountryListEnabled!==\"undefined\"?isCountryListEnabled:undefined,\"isCountryListHidden\" in locals_for_with?locals_for_with.isCountryListHidden:typeof isCountryListHidden!==\"undefined\"?isCountryListHidden:undefined,\"isDetectionRejectionTypeEnabled\" in locals_for_with?locals_for_with.isDetectionRejectionTypeEnabled:typeof isDetectionRejectionTypeEnabled!==\"undefined\"?isDetectionRejectionTypeEnabled:undefined,\"isDisapproved\" in locals_for_with?locals_for_with.isDisapproved:typeof isDisapproved!==\"undefined\"?isDisapproved:undefined,\"reasons\" in locals_for_with?locals_for_with.reasons:typeof reasons!==\"undefined\"?reasons:undefined,\"showRequestExceptionLink\" in locals_for_with?locals_for_with.showRequestExceptionLink:typeof showRequestExceptionLink!==\"undefined\"?showRequestExceptionLink: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 (AssociatedExperiment, actionLink, deliveryStatus, expDateUtils, i18n, percentSymbol, statusForCombinedPopup) {pug_mixins[\"experimentInfo\"] = pug_interp = function(){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cp\\u003E\\u003Cb\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Experiment_Status_Long_' + AssociatedExperiment.Status)) ? \"\" : pug_interp)) + \"\\u003C\\u002Fb\\u003E\\u003C\\u002Fp\\u003E\\u003Cp\\u003E\\u003Cdiv\\u003E\\u003Cb\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Experiment_DeliveryStatus_StartDate')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fb\\u003E\" + (pug.escape(null == (pug_interp = ' ') ? \"\" : pug_interp)) + (pug.escape(null == (pug_interp = expDateUtils.reformatDate(AssociatedExperiment.StartDate)) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv\\u003E\\u003Cb\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Experiment_DeliveryStatus_EndDate')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fb\\u003E\" + (pug.escape(null == (pug_interp = ' ') ? \"\" : pug_interp)) + (pug.escape(null == (pug_interp = expDateUtils.reformatDate(AssociatedExperiment.EndDate)) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fp\\u003E\\u003Cdiv\\u003E\\u003Cb\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Experiment_DeliveryStatus_Split')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fb\\u003E\" + (pug.escape(null == (pug_interp = ' ') ? \"\" : pug_interp)) + (pug.escape(null == (pug_interp = AssociatedExperiment.TrafficSplitPercent) ? \"\" : pug_interp)) + (pug.escape(null == (pug_interp = percentSymbol) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\n};\nif ((deliveryStatus === 'ExperimentInfo')) {\npug_mixins[\"experimentInfo\"]();\n}\nelse\nif ((statusForCombinedPopup.indexOf(deliveryStatus) > -1)) {\npug_html = pug_html + \"\\u003Cp\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Experiment_DeliveryStatus_' + deliveryStatus)) ? \"\" : pug_interp)) + \"\\u003C\\u002Fp\\u003E\\u003Chr\\u003E\";\npug_mixins[\"experimentInfo\"]();\n}\nelse {\npug_html = pug_html + (null == (pug_interp = i18n.getString('Experiment_DeliveryStatus_' + deliveryStatus) || i18n.getString(`Message_DeliveryStatus_${deliveryStatus}`, {actionLink: actionLink})) ? \"\" : pug_interp);\n}}.call(this,\"AssociatedExperiment\" in locals_for_with?locals_for_with.AssociatedExperiment:typeof AssociatedExperiment!==\"undefined\"?AssociatedExperiment:undefined,\"actionLink\" in locals_for_with?locals_for_with.actionLink:typeof actionLink!==\"undefined\"?actionLink:undefined,\"deliveryStatus\" in locals_for_with?locals_for_with.deliveryStatus:typeof deliveryStatus!==\"undefined\"?deliveryStatus:undefined,\"expDateUtils\" in locals_for_with?locals_for_with.expDateUtils:typeof expDateUtils!==\"undefined\"?expDateUtils:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"percentSymbol\" in locals_for_with?locals_for_with.percentSymbol:typeof percentSymbol!==\"undefined\"?percentSymbol:undefined,\"statusForCombinedPopup\" in locals_for_with?locals_for_with.statusForCombinedPopup:typeof statusForCombinedPopup!==\"undefined\"?statusForCombinedPopup:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n) {pug_html = pug_html + \"\\u003Cspan class=\\\"no-reject-reason-found\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('NoRejectionReasonFound')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (deliveryStatus, i18n) {pug_html = pug_html + \"\\u003Cdiv class=\\\"description-text bold margin-zero\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Campaign_BidLandscape_Disabled_Title')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"description-text margin-zero\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Campaign_BidLandscape_Disabled_Desc_'+deliveryStatus)||i18n.getString('Campaign_BidLandscape_Disabled_Desc')+i18n.getString('Label_DeliveryStatus_' + deliveryStatus)) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"deliveryStatus\" in locals_for_with?locals_for_with.deliveryStatus:typeof deliveryStatus!==\"undefined\"?deliveryStatus:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (actionLink, deliveryStatus, i18n, reasonid) {pug_html = pug_html + \"\\u003Ctable\" + (\" class=\\\"reasonDiv\\\"\"+pug.attr(\"id\", reasonid, true, true)) + \"\\u003E\\u003Ctr\\u003E\\u003Ctd class=\\\"reason\\\"\\u003E\\u003Cdiv\\u003E\";\nif (deliveryStatus === '') {\npug_html = pug_html + \"\\u003Cdiv class=\\\"gridPopup-reasonList\\\"\\u003E\" + (null == (pug_interp = i18n.getString('NoRejectionReasonFound')) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"gridPopup-reasonList\\\"\"+pug.attr(\"data-delivery-status\", deliveryStatus, true, true)) + \"\\u003E\" + (null == (pug_interp = i18n.getString(`Message_DeliveryStatus_${deliveryStatus}`, {actionLink: actionLink})) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Ftd\\u003E\\u003C\\u002Ftr\\u003E\\u003C\\u002Ftable\\u003E\";}.call(this,\"actionLink\" in locals_for_with?locals_for_with.actionLink:typeof actionLink!==\"undefined\"?actionLink:undefined,\"deliveryStatus\" in locals_for_with?locals_for_with.deliveryStatus:typeof deliveryStatus!==\"undefined\"?deliveryStatus:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"reasonid\" in locals_for_with?locals_for_with.reasonid:typeof reasonid!==\"undefined\"?reasonid: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;pug_html = pug_html + \"\\u003Cdiv id=\\\"rejectionContainer\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";;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 (customClass, texts) {// iterate texts\n;(function(){\n var $$obj = texts;\n if ('number' == typeof $$obj.length) {\n for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) {\n var text = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cp\" + (pug.attr(\"class\", pug.classes([customClass], [true]), false, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = text) ? \"\" : pug_interp)) + \"\\u003C\\u002Fp\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index0 in $$obj) {\n $$l++;\n var text = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cp\" + (pug.attr(\"class\", pug.classes([customClass], [true]), false, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = text) ? \"\" : pug_interp)) + \"\\u003C\\u002Fp\\u003E\";\n }\n }\n}).call(this);\n}.call(this,\"customClass\" in locals_for_with?locals_for_with.customClass:typeof customClass!==\"undefined\"?customClass:undefined,\"texts\" in locals_for_with?locals_for_with.texts:typeof texts!==\"undefined\"?texts: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 (className, value) {var cls = className || '';\npug_html = pug_html + \"\\u003Cspan\" + (pug.attr(\"class\", pug.classes([\"grid-cell-text\",cls], [false,true]), false, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = value) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";}.call(this,\"className\" in locals_for_with?locals_for_with.className:typeof className!==\"undefined\"?className:undefined,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value: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 (helpAriaLabel, helpId, title) {pug_mixins[\"popupHelp\"] = pug_interp = function(popupId){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", helpAriaLabel, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_html = pug_html + \"\\u003Cspan class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = title) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\nif (helpId) {\npug_html = pug_html + \"\\u003Cspan class=\\\"grid-header-helpId\\\"\\u003E\";\npug_mixins[\"popupHelp\"](helpId);\npug_html = pug_html + \"\\u003C\\u002Fspan\\u003E\";\n}}.call(this,\"helpAriaLabel\" in locals_for_with?locals_for_with.helpAriaLabel:typeof helpAriaLabel!==\"undefined\"?helpAriaLabel:undefined,\"helpId\" in locals_for_with?locals_for_with.helpId:typeof helpId!==\"undefined\"?helpId: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 (ariaLabel, html, icon) {var classIcon = icon === 'plus' ? ['pop-expand', 'iconba', 'iconba-Add'] : ['pop-collapse', 'iconba', 'iconba-Remove'];\npug_html = pug_html + (\"\\u003Cspan\" + (\" class=\\\"pop-toggle-icon clickable\\\"\"+\" tabindex=\\\"0\\\" role=\\\"button\\\"\"+pug.attr(\"aria-label\", ariaLabel, true, true)) + \"\\u003E\\u003Cspan\" + (pug.attr(\"class\", pug.classes([classIcon], [true]), false, true)) + \"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fspan\\u003E\" + (null == (pug_interp = html) ? \"\" : pug_interp));}.call(this,\"ariaLabel\" in locals_for_with?locals_for_with.ariaLabel:typeof ariaLabel!==\"undefined\"?ariaLabel:undefined,\"html\" in locals_for_with?locals_for_with.html:typeof html!==\"undefined\"?html:undefined,\"icon\" in locals_for_with?locals_for_with.icon:typeof icon!==\"undefined\"?icon: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 (expanded, hasSegment, helpAriaLabel, helpId, isAggregate, value) {if (isAggregate) {\nif (hasSegment) {\nif (expanded) {\npug_html = pug_html + \"\\u003Cspan\" + (\" class=\\\"icon-right glyphicon glyphicon-triangle-bottom\\\"\"+\" role=\\\"button\\\" tabindex=\\\"0\\\" aria-expanded=\\\"true\\\"\"+pug.attr(\"aria-label\", value, true, true)) + \"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan\" + (\" class=\\\"icon-right glyphicon glyphicon-triangle-right\\\"\"+\" role=\\\"button\\\" tabindex=\\\"0\\\" aria-expanded=\\\"false\\\"\"+pug.attr(\"aria-label\", value, true, true)) + \"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\n}\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = value) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\nif (helpId) {\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" role=\\\"button\\\" type=\\\"helppopup\\\"\"+pug.attr(\"topic\", helpId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\" aria-haspopup=\\\"true\\\"\"+pug.attr(\"aria-label\", helpAriaLabel, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n}\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"segment-value\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = value) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n}}.call(this,\"expanded\" in locals_for_with?locals_for_with.expanded:typeof expanded!==\"undefined\"?expanded:undefined,\"hasSegment\" in locals_for_with?locals_for_with.hasSegment:typeof hasSegment!==\"undefined\"?hasSegment:undefined,\"helpAriaLabel\" in locals_for_with?locals_for_with.helpAriaLabel:typeof helpAriaLabel!==\"undefined\"?helpAriaLabel:undefined,\"helpId\" in locals_for_with?locals_for_with.helpId:typeof helpId!==\"undefined\"?helpId:undefined,\"isAggregate\" in locals_for_with?locals_for_with.isAggregate:typeof isAggregate!==\"undefined\"?isAggregate:undefined,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, segmentationType) {if ((segmentationType === 'GoalName' || segmentationType === 'GoalType' || segmentationType === 'GoalCategory')) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-group segment-alert-msg\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Segment_Conversion_Invalid_Alert_Message')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Ca\" + (\" class=\\\"HelpTopic\\\"\"+\" query=\\\"help:app51239\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", i18n.getString('Segment_Time_Invalid_Alert_Learn_More_Segment'), true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Segment_Time_Invalid_Alert_Learn_More')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse\nif ((segmentationType === 'AudienceName' || segmentationType === 'AudienceType')) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-group segment-alert-msg\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Segment_Audience_Invalid_Alert_Message')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Ca\" + (\" class=\\\"HelpTopic\\\"\"+\" query=\\\"help:app51239\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", i18n.getString('Segment_Time_Invalid_Alert_Learn_More_Segment'), true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Segment_Time_Invalid_Alert_Learn_More')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-group segment-alert-msg\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Segment_Time_Invalid_Alert_Message')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cul style=\\\"list-style-type: disc; padding-left: 40px\\\"\\u003E\\u003Cli\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Segment_Time_Invalid_Alert_Message_Example_Too_Long')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fli\\u003E\\u003Cli\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Segment_Time_Invalid_Alert_Message_Example_Too_Short')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Segment_Time_Invalid_Alert_Message_Check')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Ca\" + (\" class=\\\"HelpTopic\\\"\"+\" query=\\\"help:app51239\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", i18n.getString('Segment_Time_Invalid_Alert_Learn_More_Segment'), true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Segment_Time_Invalid_Alert_Learn_More')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"save-bar form-group segment-alert-ok\\\"\\u003E\\u003Cinput\" + (\" class=\\\"btn btn-default\\\"\"+\" type=\\\"button\\\" tabindex=\\\"0\\\"\"+pug.attr(\"aria-label\", i18n.getString('Segment_Time_Invalid_Alert_OK'), true, true)+pug.attr(\"value\", i18n.getString('Segment_Time_Invalid_Alert_OK'), true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"segmentationType\" in locals_for_with?locals_for_with.segmentationType:typeof segmentationType!==\"undefined\"?segmentationType: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 (currentStatus, items) {pug_html = pug_html + \"\\u003Cul class=\\\"grid\\\" role=\\\"menu\\\"\\u003E\";\n// iterate items\n;(function(){\n var $$obj = items;\n if ('number' == typeof $$obj.length) {\n for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) {\n var item = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cli class=\\\"statuschangesubtask\\\" role=\\\"presentation\\\"\\u003E\\u003Cspan\" + (\" class=\\\"statuschangelink clickable\\\"\"+pug.attr(\"title\", item.title, true, true)+pug.attr(\"data-value\", item.value, true, true)+\" role=\\\"menuitem\\\" tabindex=\\\"0\\\"\"+pug.attr(\"aria-label\", item.ariaLabel, true, true)) + \"\\u003E\\u003Cspan\" + (pug.attr(\"class\", pug.classes([\"statuschange-icon\",item.iconClass], [false,true]), false, true)) + \"\\u003E\\u003C\\u002Fspan\\u003E\";\nif (currentStatus === item.value) {\npug_html = pug_html + \"\\u003Cstrong\" + (pug.attr(\"class\", pug.classes([item.textClass], [true]), false, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = item.text) ? \"\" : pug_interp)) + \"\\u003C\\u002Fstrong\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan\" + (pug.attr(\"class\", pug.classes([item.textClass], [true]), false, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = item.text) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fli\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index0 in $$obj) {\n $$l++;\n var item = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cli class=\\\"statuschangesubtask\\\" role=\\\"presentation\\\"\\u003E\\u003Cspan\" + (\" class=\\\"statuschangelink clickable\\\"\"+pug.attr(\"title\", item.title, true, true)+pug.attr(\"data-value\", item.value, true, true)+\" role=\\\"menuitem\\\" tabindex=\\\"0\\\"\"+pug.attr(\"aria-label\", item.ariaLabel, true, true)) + \"\\u003E\\u003Cspan\" + (pug.attr(\"class\", pug.classes([\"statuschange-icon\",item.iconClass], [false,true]), false, true)) + \"\\u003E\\u003C\\u002Fspan\\u003E\";\nif (currentStatus === item.value) {\npug_html = pug_html + \"\\u003Cstrong\" + (pug.attr(\"class\", pug.classes([item.textClass], [true]), false, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = item.text) ? \"\" : pug_interp)) + \"\\u003C\\u002Fstrong\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan\" + (pug.attr(\"class\", pug.classes([item.textClass], [true]), false, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = item.text) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fli\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003C\\u002Ful\\u003E\";}.call(this,\"currentStatus\" in locals_for_with?locals_for_with.currentStatus:typeof currentStatus!==\"undefined\"?currentStatus:undefined,\"items\" in locals_for_with?locals_for_with.items:typeof items!==\"undefined\"?items:undefined));;return pug_html;};\nmodule.exports = template;"],"names":["DecoratedODataAdapter","_createClass","_ref","adapter","getTTL","_classCallCheck","this","key","value","definition","query","options","_this","ttl","entitySet","headers","successCallback","path","_","params","result","cacheHit","cachedResult","cacheResult","findAll","getCacheHint","_len","arguments","length","args","Array","_key","res","cacheCreationTime","setCacheHint","apply","then","errors","delResult","cacheStateCallback","actionMap","Campaign","AdGroup","Ad","Keyword","NegativeKeywordList","CampaignCriterion","AdGroupCriterion","resourceMap","CampaignsGrid","AdGroupGrid","AdGrid","KeywordGrid","NegativeKeywordLibraryCampaignAssociationsGrid","CampaignSettingsGrid","AdGroupSettingsGrid","PerformanceTargetsSummaryGrid","SearchTermGrid","DsaTargetGrid","NegativeAdGroupDsaTargetGrid","NegativeCampaignDsaTargetGrid","ContextManagerBridge","cacheManager","contextManager","cacheManagerDirty","contextManagerDirty","subscribe","afterInvalidate","cm","resource","gridIds","updateContext","beforeExecute","_ref2","action","parameters","name","emitter","on","gridId","invalidate","ADDITIONAL_WRITE_ACTIONS","RESOURCE_WHITE_LIST","CampaignCacheManager","_JSDataCacheManager","store","_callSuper","actions","invalidateStrategies","WriteActionInvalidateStrategy","writeActions","CascadeInvalidateStrategy","dependants","partitionStrategies","PartitionStrategy","cache","TimeAwareCache","strategy","LRUReplacementStrategy","limit","condition","enableCacheOnAdapter","contextManagerBridge","_inherits","JSDataCacheManager","CampaignType","None","Default","Shopping","DynamicSearchAds","Audience","Smart","Hotel","PerformanceMax","App","LinkedIn","All","CampaignTypeByEnumValue","CampaignTypeToStringMap","_defineProperty","CampaignTypeByODataValue","StatusWaterfallFilterOptions","AllEnabled","Scope","Customer","Account","PerformanceTarget","getCurrentScope","currentCampaignId","currentAdGroupId","currentAccountId","getCurrentScopeFromService","scope","values","aid","campaignId","adGroupId","SCOPE_TO_KEY","trimScope","supportedScopes","scopeService","siteMapId","history","_scopeService$values","uid","cid","stringify","currentScope","leastSupportedScope","urlQuery","queryToRemove","map","scopeNumber","urijs","removeQuery","toString","trimScopeInternal","location","search","ACCOUNT_MODE","DEFAULT","EXPERT","SMART","UNIFIED_SMART","UNIFIED_EXPERT","PMAX_TEMP_NAME_PREFIX","CampaignTypeEnumValuePrefix","CampaignStatusEnumValuePrefix","AdGroupStatusEnumValuePrefix","addPrefixToEnumValue","prefix","enumValue","concat","getFilteredCampaignTypeFromRawFilter","rawFilter","filteredCampainTypes","$in","getFilteredCampaignTypeFromWaterfallFilter","waterfallFilters","compact","waterfallFilter","filter","WaterfallFilterType","first","getFilteredCampaignStatusFromRawFilter","filteredCampaignStatuses","CampaignStatus","getFilteredAdGroupStatusFromRawFilter","filteredAdGroupStatuses","AdGroupStatus","convertFilteredCampaignTypeToFilter","campaignType","convertFilteredCampaignStatusToFilter","campaignStatus","convertFilteredAdGroupStatusToFilter","adGroupStatus","Environment","PROD","BETAPROD","TIP","SI","BETASI","CI","getEnvironment","domain","match","isProdEnvironment","env","propertyMatch","regex","property","keyPath","isPerformanceMetrics","isPhonePerformanceMetrics","CampaignuiBaseColumn","_ProjectionGridBaseCo","get","colClasses","_superPropGet","config","helpers","mergeClasses","ProjectionGridBaseColumn","FluctuationType","Impression","Click","Spend","Conversion","Max","FluctuationEnumToStringMap","keyList","ColumnNameToFluctuationTypeEnum","Clicks","Impressions","Conversions","FluctuationBaseColumn","_CampaignuiBaseColumn","i18n","helpId","generateHelpId","title","getString","type","sortable","columnSortableProperty","helpAriaLabel","item","PerformanceMetrics","AvailableInsightTypeIds","GoalStatusDetails","_this$config","format","metricValue","hasGoalLimits","goal","GoalDeliveryStatus","metricType","metricName","formatMetricValue","hasFluctuation","hasFluctuations","propertyName","availableInsightTypeIds","IsOverall","$total","hasConversionDeliveryStatus","performanceMetricWithFluctuationTemplate","ColumnClicksWithFluctuation","_FluctuationBaseColum","ColumnImpressionsWithFluctuation","_FluctuationBaseColum2","_ref2$helpId","ColumnSpendWithFluctuation","_FluctuationBaseColum3","_ref3","undefined","fractionDigits","formatDecimal","maximumFractionDigits","minimumFractionDigits","getBaseColumn","_PerformanceMetricBaseColumn","PerformanceMetricBaseColumn","schemaI18n","SchemaI18n","split","localizedTitle","PhonePerformanceMetricBaseColumn","ColumnClicks","_PerformanceMetricBas","ColumnImpressions","_PerformanceMetricBas2","ColumnCTR","_PerformanceMetricBas3","ColumnAverageCPC","_PerformanceMetricBas4","_ref4","_ref4$helpId","ColumnAveragePosition","_PerformanceMetricBas5","_ref5","_ref5$helpId","ColumnAverageCPM","_PerformanceMetricBas6","_ref6","_ref6$helpId","ColumnVideoViews","_PerformanceMetricBas7","_ref7","_ref7$helpId","ColumnViewThroughRate","_PerformanceMetricBas8","_ref8","_ref8$helpId","ColumnAverageCPV","_PerformanceMetricBas9","_ref9","_ref9$helpId","ColumnTotalWatchTimeInMS","_PerformanceMetricBas10","_ref10","_ref10$helpId","ColumnAverageWatchTimePerImpression","_PerformanceMetricBas11","_ref11","_ref11$helpId","ColumnAverageWatchTimePerVideoView","_PerformanceMetricBas12","_ref12","_ref12$helpId","ColumnVideoViewsAt25Percent","_PerformanceMetricBas13","_ref13","_ref13$helpId","ColumnVideoViewsAt50Percent","_PerformanceMetricBas14","_ref14","_ref14$helpId","ColumnVideoViewsAt75Percent","_PerformanceMetricBas15","_ref15","_ref15$helpId","ColumnCompletedVideoViews","_PerformanceMetricBas16","_ref16","_ref16$helpId","ColumnVideoCompletionRate","_PerformanceMetricBas17","_ref17","_ref17$helpId","ColumnSpend","_PerformanceMetricBas18","_ref18","ColumnTotalSpend","_PhonePerformanceMetr","_ref19","ColumnTopImpressionRate","_PerformanceMetricBas19","_ref20","ColumnAbsoluteTopImpressionRate","_PerformanceMetricBas20","_ref21","ColumnCPS","_PerformanceMetricBas21","_ref22","ColumnDownloads","_PerformanceMetricBas22","_ref23","ColumnFirstLaunches","_PerformanceMetricBas23","_ref24","ColumnPurchases","_PerformanceMetricBas24","_ref25","ColumnSubscriptions","_PerformanceMetricBas25","_ref26","ColumnPostClickDownloadRate","_PerformanceMetricBas26","_ref27","ColumnCostPerDownload","_PerformanceMetricBas27","_ref28","ColumnPostClickFirstLaunchRate","_PerformanceMetricBas28","_ref29","ColumnCostPerFirstLaunch","_PerformanceMetricBas29","_ref30","ColumnPostInstallPurchaseRate","_PerformanceMetricBas30","_ref31","ColumnCostPerPurchase","_PerformanceMetricBas31","_ref32","ColumnPostInstallSubscriptionRate","_PerformanceMetricBas32","_ref33","ColumnCostPerSubscription","_PerformanceMetricBas33","_ref34","getPerformanceColumns","_ref35","withFluctuations","IsVideoAdsPerfMetricsEnabled","isCPSEnabled","isAppCampaignNewCampaignGridColumnsEnabled","performanceColumns","perfMetricColumnConvertionDef","targetColumnName","sourceColumnName","sourceSortableProperty","targetSortableProperty","ColumnCPA","_ref$helpId","columnName","columnConversion","ColumnPartialConversionCPA","ColumnConversions","_ref3$helpId","ColumnConversionsCredit","ColumnRevenueOnAdSpend","ColumnAdvertiserReportedRevenue","ColumnConversionRate","ColumnPartialConversionRate","ColumnAllConversionCPA","ColumnAllPartialConversionCPA","ColumnAllConversions","ColumnAllConversionsCredit","ColumnAllConversionRevenueOnAdSpend","ColumnAllConversionAdvertiserReportedRevenue","ColumnAllConversionRate","ColumnAllPartialConversionRate","ColumnViewThroughConversions","ColumnViewThroughConversionsCredit","_ref18$helpId","ColumnViewThroughConversionsRevenue","_ref19$helpId","ColumnViewThroughConversionsCPA","_ref20$helpId","ColumnViewThroughPartialConversionsCPA","_ref21$helpId","ColumnViewThroughConversionsReturnOnAdSpend","_ref22$helpId","ColumnViewThroughConversionsRate","_ref23$helpId","ColumnViewThroughPartialConversionsRate","_ref24$helpId","ColumnConversionsWithFluctuation","_ref25$helpId","permissions","ColumnConversionsCreditWithFluctuation","_ref26$helpId","ColumnSalesCount","_ref27$helpId","ColumnInstalls","ColumnCostPerInstall","ColumnRevenuePerInstall","ColumnAdvertiserReportedRevenueAdjustment","_TL_","ColumnAllConversionAdvertiserReportedRevenueAdjustment","ColumnViewThroughConversionsRevenueAdjustment","ColumnNewCustomerConversions","ColumnNewCustomerRevenue","ColumnNewCustomerConversionRate","_PerformanceMetricBas34","_ref36","ColumnNewCustomerCPA","_PerformanceMetricBas35","_ref37","ColumnNewCustomerRevenueOnAdSpend","_PerformanceMetricBas36","_ref38","getConversionColumns","_ref39","_ref39$withFluctuatio","_ref39$withPartialCon","withPartialConversions","_ref39$isCPSEnabled","_ref39$isInstallColum","isInstallColumnsEnabled","_ref39$isConversionVa","isConversionValueRuleColumnsEnabled","_ref39$isNewCustomerA","isNewCustomerAcquisitionColumnsEnabled","conversionsColumns","conversionsColumnsWithFluctuation","ELIGIBLE","INLINE_OPPORTUNITY","AUTO_BIDDING_LIMITED","enabledStatuses","autoBiddingTargets","maxConversionTargets","getBidLandscapeConfigs","_ref2$permissions","_ref2$value","dynamic","NewBidLandscapeEntryPoints","enabledBidLandscape","hasBidLandscapeIcon","enabledBidLandscapeForLimited","DeliveryStatus","DeliveryStatusDetails","detail","IsBidLandscapeAvailable","getEnabledBidLandscape","whiteList","_toConsumableArray","SimulatorForCPAROAS","IsPmaxBidLandscapeEnabled","getWhiteList","biddingSchemeType","BiddingScheme","inWhiteList","_ref$permissions","_ref$value","IsReadOnlyUser","BidStrategyName","Budget","Id","getHasBidLandscapeIcon","ColumnAuctionWonPercent","ColumnAuctionLostToBudgetPercent","ColumnAuctionLostToRankPercent","ColumnAuctionLostToAdQualityPercent","ColumnAuctionLostToLandingPercent","ColumnAuctionLostToBidPercent","ColumnExactMatchImpressionSharePercent","ColumnTopImpressionSharePercent","ColumnTopImpressionShareLostToBudget","ColumnTopImpressionShareLostToRank","ColumnAbsoluteTopImpressionSharePercent","ColumnAbsoluteTopImpressionShareLostToBudget","ColumnAbsoluteTopImpressionShareLostToRank","ColumnClickSharePercent","ColumnAudienceAuctionWonPercent","Boolean","ColumnAudienceTopISLostToBudgetPercent","ColumnAudienceTopISLostToRankPercent","ColumnRelativeCTR","competitiveColumns","ColumnCallForwarding","callTrackingStatusTemplate","callDetailsColumns","ColumnManualCalls","_PhonePerformanceMetr2","ColumnPhoneImpressions","_PhonePerformanceMetr3","ColumnPTR","BidStrategyTypeColumn","isAllSettingsGrid","bidStrategyTypeTemplate","CampaignColumn","routeTemplate","showExperiment","isForVNext","bodyClasses","_this$scope","customerId","accountId","_item$Campaign","_item$Campaign2","Name","cmpid","baseCampaignName","BaseCampaignName","ariaLabel","campaignName","className","experimentName","href","campaignTemplate","createCustomCampaignColumnClass","_CampaignColumn","CustomCampaignColumn","DeliveryColumn","isCampaign","view","isForCampaignPage","pathname","newHelpIdForMMAInDSA","IsMMAInDSAEnabled","isForAdsPage","isEditorialCategoryEnabled","IsEditorialCategoryEnabled","push","instrumentation","IsGoogleImportVideoAdsEnabled","showBudgetSuggestion","EnableBudgetSuggestion","videoNeedsToBeConverted","shouldRepairGoogleImportVideoAd","IsAppealable","AssociatedExperiment","ExperimentId","EditorialCategories","VideoNeedsToBeConverted","showEllipsisForExperiment","isAutoBiddingLimited","_getBidLandscapeConfi","Promoted","Graduated","Ended","Status","isErrorStatus","isWarningStatus","activity","autobiddingLimitedStatus","create","renderDeliveryStatus","trace","JSON","deliveryStatus","adsActivity","logDeliveryStatus","logAdsDeliveryStatus","adId","showBudgetSuggestionWithDeliveryStatusDetails","showRejectPopup","shouldEditorialCategoriesPopup","getViolationsFromCategoryFAIDMapping","showBudgetLandscape","budgetLandscapeClassName","isCampaignBudgetLandScape","containerClassName","opportunityPopupHandlerClass","inlineOpportunityClassname","withInlineAppeals","showInlineOpportunityPopup","shouldShowPopUpStyleInVnext","vnextContainerClasses","vNextContainerClassName","join","template","vnextInlineOpportunityClassname","hasBidlandscapeIcon","enabledBidlandscape","budgetType","Type","budgetId","shouldShowSensitiveContentWarning","QualityScoreColumn","titleDetail","score","QualityScore","OverallQualityScore","model","qualityScoreTemplate","showQualityScoreDetail","event","qualityScore","qsContainerId","legacyGlobalI18n","KeywordRelevance","LandingPageQuality","LandingPageRelevance","$","clickEvent","controls","qualityscore","DisplayQsFlyout","StatusIconColumn","enableEdit","_ref$statusOptions","statusOptions","_ref$isCampaign","_ref$isForVNext","group","_ref$enableGridFlexLa","enableGridFlexLayout","isResizable","headerTemplate","isExperiment","statusIconTemplate","_this2","position","newPosition","statusEditor","renderStatusPopupEditor","currentStatus","option","iconClass","Enabled","Paused","target","attr","status","updateStatus","Error","BudgetSplitView","_Backbone$View","remove","$el","html","budgetSplitTmpl","Backbone","BudgetNotEditableView","_Backbone$View2","budgetNotEditableTmpl","BudgetColumn","CampaignLifetimeBudget","MaeLifetimeBudgetExclusion","isCampaignLifetimeBudgetEnabled","editable","_item$Budget","delta","resetDelta","numberFormatter","decimalToFixedFormatter","InlineSharedBudgetEditor","InlineBudgetEditor","budgetTemplate","decimal","propertys","hasClass","groupClass","budgetNotEditableView","render","GridCustomizedPopupEditor","editorView","cellPosition","renderBelow","budgetBidCampaignImportNotificationActivity","createScenarioAndActivity","scenarioName","activityName","sharedBudgetEditor","budgetAmount","Amount","budgetName","renderAsPopup","$elToBlock","grid","gridView","importNotificationCallback","newBudget","showBudgetBidCampaignNotifications","campaignItemList","oldBudget","refresh","parentContainerSelector","editor","showBudgetMinRecommend","BCCBudgetImprovementEnabled","currencySymbol","getCurrencySymbol","clientName","perfMarker","campaignTabPerfMarker","update","IsBudgetInlineSuggestionEnabled","enabledStatus","autoBiddingTarget","maxConversionTarget","enabledBidlandscapeForLimited","unpurposedBudgetTemplate","isBudgetCenterEntryEnabled","IsSmartPageStandalone","IsUnifiedSmartMode","IsSmartMode","MonthlyAmount","DailyBudget","fromFloatToString","budgetTypeText","BidStrategyNameColumn","CampaignBidStrategyTypeColumn","_options$helpId","isXandrServing","CampaignSubType","CampaignSettings","DisplayBiddingStrategyType","LifetimeBudgetType","LifetimeBudgetColumn","properties","LifetimeBudgetAmount","LifetimeBudget","getColumnConversions","columnConfigs","chain","object","buildColumnConversions","columnConversionsMetadata","conversionsMap","pairs","_slicedToArray","buildColumnConversionsMap","applyColumnConversions","columnNames","buildSortingConversions","applySortingInfoConversion","savedSortableHeader","sortableHeader","savedOrderbyInfo","orderbyInfo","_objectSpread","isObject","isString","isEmpty","sortableConversionInfo","find","_sortableConversionIn","_sortableConversionIn2","isArray","cloneDeep","each","orderByItem","buildColumnAndSortingConversions","partialConversionPairs","CPA","ConversionRate","AllConversionCPA","AllConversions","AllConversionRate","ViewThroughConversionsCPA","ViewThroughConversionsRate","ViewThroughConversions","RepeatRate","applyPartialConversionColumnName","names","_permission$dynamic","IsPartialConversionsEnabled","PartialConversions","IsColumnConversionEnabled","ColumnConversion","ColumnConversionEnabledFeatures","summary_tab_campaign","summary_tab_keyword","summary_tab_ad_group","summary_tab_ad","AdExtensionsGrid","DimensionsGrid","PerformanceGrid","perfMetricColumnConvertion","getColumnsConversionMap","featureName","biColumnNames","IsViewThroughConversionEnabled","IsViewThroughConversionsRevenueEnabled","_permissions$dynamic","usePartialConversions","rawConversionColumns","generateConversionColumns","pick","Permissions","updateEntitySchemaForSOV","originalSchema","schema","putil","performanceMetrics","performanceMetricsProperties","propsToAdd","propName","sovcolumn","schemaName","schemaNameWhiteList","propNameBlackList","IsAvgPositionDeprecationPhase1Enabled","isFilterable","filterable","union","prop","FeatureName","customColumnPreference","propsToDelete","globalConfig","pilotFlagMapping","AdExtensionAssociation","SearchTerm","summaryTabMapping","excludedFeatures","updateEntitySchemaForRemovedPerformanceMetrics","expression","enableForAudienceSOVFeatures","IsAudienceSOVEnabled","audienceSOVMetrics","columnsToAdd","audienceSOVMetric","initialize","initializeSOV","_ref$featureName","customColumnPref","initializeCustomColumn","alias","legacy","isDeletedProperty","nullable","initializeAveragePosition","initializeAudienceSOV","getFeaturePermissionByPropertyName","toLowerCase","IsEnhancedShoppingCampaignAllowed","IsDynamicSearchAdsV1Enabled","IsAIMCampaignEnabled","IsCampaignMultipleLanguageEnabled","IsAudienceGridNewColumnsSupported","IsExperimentsEnabled","IsAdsByBingEnabled","IsManualCpmEnabled","IsVideoAdsForCampaignEnabled","updateEnumValueSets","entityName","disabledTargets","disabled","enumValueSets","IsSmartCampaignPhase2Enabled","HotelCampaign","PerformanceMaxCampaigns","IsCampaignTargetROASBidStrategyEnabled","IsNewCampaignTargetROASBidStrategyEnabled","IsMaximizeConversionValueEnabled","IsSmartShoppingCampaignEnabled","IsTargetImpressionShareEnabled","IsCostPerSaleEnabled","IsAdsGlobalizationPhase1Enabled","IsAdsGlobalizationPhase2Enabled","IsAdsGlobalizationPhase6Enabled","IsAdsGlobalizationPhase2JapanEnabled","IsAdsGlobalizationPhase9Enabled","IsAdsGlobalizationPhase9VIEnabled","removeEnumArray","schemaCopy","enum","removeEnumValuesFromProperty","updateFilterableForExtraPerformanceMetrics","metricNameArray","isEnabling","enableFilterForPilotedPerformanceMetrics","pilotName","PARTIAL_CONVERSIONS_ENABLED_ENTITIES","updateEntitySchemaForPartialConversions","isPartialConversionsEnbled","isColumnConversionEnabled","enabledEntity","useNewParameters","filterableArray","hasFilterableArray","propertyNameToDisable","propertyNameToEnable","propertyToDisable","propertyToEnable","isDisablePropFilterable","isEnablePropFilterable","difference","updatePerformanceMetricsForPartialConversions","updateEntitySchemaForPilotFeatures","filterExpressions","enableAvgPositionDeprecation","IsCustomColumnFilterSupported","indexOf","summaryTab","customColumnData","CustomColumnServiceWrapper","getCustomColumnPreferenceName","CustomColumns","getCustomColumnPreferenceStore","getAll","customColumn","id","isInvalidProperty","isValidForFeature","filterExpression","SelectedColumn","startsWith","updateEntitySchemaForCustomColumn","$ref","enumType","chooseType","operators","enableAndUpdateFilterForAvailableInsightTypeIds","scopeable","isInPilot","isAccountScope","campaignProperty","isExperimentProperty","enableForExperimentFeature","isAllowedEntity","bidStrategyNameProperty","enableForPortfolioBidStrategyFeature","enableForViewThroughConversionsFeature","enableForConversionValueRuleFeature","updateEntitySchemaForMainGoalSelectionFeature","pilotProperty","updateEntitySchemaForVideoAdsFeature","updateEntitySchemaForAppCampaign","updateEntitySchemaForCPS","updateEntitySchemaForInstallColumns","propertyNameArray","enableFilterForPilotProperties","appendPeriodOverPeriodProperties","entitySchema","popPrefix","biPattern","biReplacePattern","biTitlePrefix","customColumnStr","propObj","test","isCustomColumn","originalProperty","propKey","unlocalized","originalTitle","replace","isPercentValue","minimum","maximum","appendPopProperties","propCopy","addCampaignTypePropertyForFilter","_ref$property","campaignTypeNotSupported","isHotelCampaignEnabled","isPerformanceMaxEnabled","isLinkedInCampaignEnabled","IsRenameHotelToLodgingEnabled","toExtended","enumValueMap","mapEnumValueForFilter","DeliveryStatusToCategoryMap","Eligible","New","AdGroupAudienceAssociationPaused","AdGroupAudienceAssociationExcluded","AdGroupCriterionPaused","AdGroupCriterionExcluded","DSAAutoTargetProcessing","EditorialApprovedLimited","EditorialApprovedLimitedAppealRejected","LowSupply","LowQuality","NegativeKeywordConflicts","PartialNegativeKeywordConflicts","DSAAutoTargetNegativeTargetConflict","DSAAutoTargetBelowFirstPageBid","BidBelowFirstPageBid","BudgetSuggestions","AutoBiddingLimitedByNotEnoughRevenue","AutoBiddingLimitedByNotEnoughConversions","AutoBiddingLimitedInventoryLimit","AutoBiddingLimitedMaxCPCRestriction","AutoBiddingLimitedBudgetRestriction","AutoBiddingLimitedUnAttainableTarget","AutoBiddingPortfolioBidStrategyTrainingStatus","AutoBiddingLearning","CampaignInReview","CPSInsufficientConversions","CPSAttributionBroken","CreditCardExpired","IOExceeded","PaymentInformationMissing","InvalidFinancialStatusOther","CampaignSuspended","CampaignBudgetPaused","DomainLanguageNotSupported","AdGroupExpired","AssetGroupExpired","EditorialRejected","EditorialAppealRejected","CampaignDeleted","StoreIdNotAssociated","ShoppingCampaignStoreNotFound","ShoppingCampaignNoOffersPresent","AdGroupTargetingTooNarrow","CampaignInProgress","CampaignUserPaused","AssetGroupUserPaused","AdGroupUserPaused","AdGroupDraft","AdUserPaused","EditorialPending","AdGroupPrivacyPending","AssociationDeleted","KeywordUserPaused","EditorialUnderAppeal","UrlInvalid","ApplicationNotFound","ApplicationDestinationUrlMismatch","PendingMetadataSync","ProductTargetUserPaused","AdExtensionDeleted","AdExtensionAssociationDeleted","AdNotPresent","AdNotActive","NoEligibleAdGroups","NoEligibleAds","NoEligibleKeywords","DSAAutoTargetUserPaused","DSAAutoTargetNoMatchingLandingPage","CPSNonRetailDomain","AudienceTooNarrow","LinkedInAccountServingHold","LinkedInCompanyPagePaidMediaRequired","updateDeliveryStatusPropertyForFilter","enumSet","deliveryStatusProperty","_getDeliveryStatusCat","groupedItems","enumSetToUse","localized","categoryEnumValuesMap","enumValues","category","mappedValues","categoryName","itemLocalized","items","getDeliveryStatusCategoryForFilter","updateAdExtensionAssociationSourcePropertyForFilter","SourceType","schemaI18nCampaign","cacheService","dataContextManager","jsdata","edm","wrapFilterExpression","secondLogic","buildLabelFilter","operator","wrapFilter","customerLevelLabelEnabled","label","newValue","parse","getLabel","secondaryOperator","lambdaConvertForLabels","logic","url","wrapInnerFilter","index","updateEntitySchemaForLabels","entitySchemaCopy","Labels","operatorDisplayNameMap","containsall","containsany","containsnone","addtionalParams","dataSource","LabelsDataSource","templates","nameTemplate","labelNameTemplate","updateOdataOptionsForLabels","optionsCopy","custom","updateAuctionInsightPropertyForFilter","hasAuctionInsightOption","eq","true","false","BaseSchemaProcessor","initializeDeliveryStatus","initializeLabels","initializePop","initializeAuctionInsight","initializeExperiment","initializeAdsByBing","passedInI18n","isAccountLabelsEnabled","IsAccountLabelsEnabled","odataOptions","val","op","updateOdataOptionsForMultiplied","lambdaConvertForArrayTypes","languageI18n","s$AdGroup","LanaguageDataSource","languages","Language","unshift","IsSimplifiedChineseLanguageEnabledInMultipleLanguage","IsDomesticSimplifiedChineseEnabled","language","getLanguagesItems","_viewFilter","searchFilter","Promise","searchFilterLowerCase","languagesToReturn","lambdaConvertForAvailableInsightTypeIds","baseEntitySchemaForAvailableInsightTypeIds","updateEntitySchemaForAvailableInsightTypeIds","updateOdataOptionsForAvailableInsightTypeIds","contains","updateStatusPropertyForFilter","statusProperty","deleteIndex","splice","CampaignSchemaProcessor","_BaseSchemaProcessor","initializeCampaignLanguages","initializeAvailableInsightTypeIds","newI18n","isFromCampaignGrid","updatedSchema","deliveryStatusEnumSet","idx","slice","AutoBiddingStrategies","LinkedInCampaigns","Languages","selectorOptions","keyMap","Selector_Filter_Placeholder","updateEntitySchemaForCampaignLanguages","SeasonalityAdjustment","DataExclusion","XandrVideoCampaigns","XandrDisplayAdsCampaigns","biddingStrategyType","DisplayBiddingStrategyTargetCpa","DisplayBiddingStrategyTargetRoas","DisplayBiddingStrategyTargetImpressionShare","AppAdsCampaignPhaseOne","DisplayBiddingStrategyManualCpi","UnifiedAppAds","DisplayBiddingStrategyManualCpc","IsPersonalizedOffersEnabled","CampaignCashbackPercent","required","IsPersonalizedOffersV2Enabled","IsPersonalizedOffersV3Enabled","CampaignCashbackMonthlyBudget","CampaignCashbackScope","Coupon","IsOptimizationScoreInCampaignsGridEnabled","OptimizationScore","BudgetAmount","updateOdataOptionsForCampaignLanguages","IsExperiment","filterValues","queryStr","AdGroupSchemaProcessor","CampaignName","_this$Permissions","cpcbid","CpcBid","SearchBid","cpmbid","CpmBid","cpvbid","CpvBid","adgroupLanguageProperty","_this$Permissions2","null","campaignStatusProperty","StartDate","EndDate","AdGroupCashbackPercent","AdGroupCashbackScope","IsDSAMixedModeCampaignEnabled","adGroupTypeProperty","AdGroupType","includes","updateEntitySchemaForTrackingUrlTemplate","TrackingUrlTemplate","lambdaConvertForFinals","contain","formalizedValues","updateEntitySchemaForFinalUrls","FinalUrls","MobileFinalUrls","updateOdataOptionsForFinalUrl","doesnotcontain","updateEntitySchemaForFinalURLSuffix","FinalUrlSuffix","updateEditorialRejectionReasonForFilter","enableEditorialRejectionFilter","editorialRejectionFlagId","EditorialRejectionFlagId","editorialRejectionDate","EditorialRejectionDate","updateEntitySchemaForIsAppealPending","IsAppealPending","KeywordSchemaProcessor","initializeIsAppealPending","AdGroupName","AppealUpheld","adgroupStatusProperty","EditorialStatus","matchTypesToExclude","isPredictiveTargetingEnabled","RSABidStrategyAutoTargeting","isPredictiveMatchingEnabled","PredictiveMatching","MatchType","getParameter","isPinned","pinnedPosition","performanceRating","assetText","updateEntitySchemaForAssetId","updateOdataOptionsForAssetId","modelName","imageProcessors","videoProcessors","AdSchemaProcessor","initializeAssetId","adStrengthProperty","AdStrength","updateAdStrengthPropertyForFilter","adTypeNotSupported","IsUserAppInstallAdsAllowed","IsMultiMediaAdsEnabled","HeadlinesAssetId","localize","_getParameter","updateEntitySchemaForHeadlinesAssetId","DescriptionsAssetId","_getParameter2","updateEntitySchemaForDescriptionsAssetId","hasAdsByBingOption","updateAdsByBingPropertyForFilter","adType","adResourceStatusSchema","AdResourceStatusId","updateAdResourceStatusForFilter","PerformanceMetricsAverageCPM","NegativeKeywordSchemaProcessor","Text","CampaignIsExperiment","AdGroupCriterionSchemaProcessor","CriterionCashback","statusEnum","statusEnumValueMap","ExperimentSchemaProcessor","campaignIsExperimentProperty","AssetLinkSchemaProcessor","updatedEntitySchema","_this$scope$values","adSubType","EditorialStatusEnumMap","showAssetBasedEditorial","AssetBasedEditorialForRSA","AssetBasedEditorialForAIM","UiDisplayStatus","AssetAssetSource","AssociationType","AudienceAssetReport","AssetWithBIDataSchemaProcessor","state","_this$Permissions$dyn","MMAAssetReportAccountLevel","AssetGridForPmaxCampaign","SearchAssetConversionColumn","AssetEditorialStatus","defaults","AssetIsBlocked","PinnedBitmask","ResponsiveSearchAdInstanceSchemaProcessor","IsResponsiveSearchAdCombGridEnabled","BaseCriterionSchemaProcessor","filterProperties","filterList","Criterion","isof","updateOdataOptionsForCriterionType","LevelOfDetails","enmu","updateOdataOptionsForLevel","DayTimeCriterionSchemaProcessor","_BaseCriterionSchemaP","updateOdataOptionsForDayTimeCriterionDay","DeviceCriterionSchemaProcessor","updateOdataOptionsForDeviceCriterionDeviceName","LocationCriterionSchemaProcessor","locationNameOption","CriterionWebpageParameterCriterionName","AudienceCriterionWithBISchemaProcessor","IsProductAudienceForSearchEnabled","IsCustomAudienceAllowed","IsCombinedListAudienceAllowed","IsInMarketAudienceAllowed","IsRemarketingSimilarAudienceAllowed","IsCustomerListAudienceAllowed","propWhitelist","mapObject","EnableImpressionBasedList","AudienceCriterionAudienceId","skipLocalization","audienceTypeProperty","AudienceCriterionAudienceType","AudienceCriterionCashbackAdjustment","ProductSchemaProcessor","MPNProperty","MPN","IsProductsTabV2Enabled","titleProperty","Title","PerformanceMetricsViewThroughConversions","PerformanceMetricsViewThroughConversionsRevenue","PerformanceMetricsViewThroughConversionsCPA","PerformanceMetricsViewThroughConversionsReturnOnAdSpend","PerformanceMetricsViewThroughConversionsRate","PerformanceMetricsQuantityBought","conditionProperty","Condition","channelProperty","Channel","channelExclusivityProperty","ChannelExclusivity","formatFilterValue","channel","channelExclusivity","AudienceSchemaProcessor","IsCustomerHierarchyEnabled","IsNewAudienceEnabled","IsSharedLibraryPhase1Enabled","trackingStatusField","TrackingStatus","any","AudienceTrackingStatus","OwnerName","OwnerNumber","GMBImportSchemaProcessor","CompanyName","SearchTermSchemaProcessor","supportedTypes","duplicatedString","CampaignCampaignType","updatedEnumValueMap","IsSearchTermCloseVariantMatchTypeEnabled","deletingNewEnumItem","DeliveredMatchTypeWithCloseVariant","deletingEnumItem","DeliveredMatchType","getAccountInactiveReasonsContainsQuery","valueArr","getAccountInactiveReasonsDoesNotContainQuery","BaseAccountsSchemaProcessor","_ref$allowBiPattern","allowBiPattern","getAdditionalSchemaProperties","overridenProperties","AccountType","getOverridenSchemaProperties","Object","assign","TSTMasterDataMissingNotification","AccountInactiveReasons","updateEntitySchemaForAccountInactiveReasons","updateOdataOptionsForAccountInactiveReasons","PerformanceSchemaProcessor","_BaseAccountsSchemaPr","InsertionOrderDetailsCurrentInsertionOrderEndDate","InsertionOrderDetailsCurrentInsertionOrderStartDate","SmartPerformanceSchemaProcessor","PerformanceMetricsAverageCPC","PerformanceMetricsTopImpressionRate","PerformanceMetricsAbsoluteTopImpressionRate","PerformanceMetricsAuctionWonPercent","PerformanceMetricsAuctionLostToBudgetPercent","PerformanceMetricsAuctionLostToRankPercent","PerformanceMetricsAudienceAuctionWonPercent","PerformanceMetricsAudienceTopISLostToBudgetPercent","PerformanceMetricsAudienceTopISLostToRankPercent","PerformanceMetricsClickSharePercent","PerformanceMetricsExactMatchImpressionSharePercent","PerformanceMetricsAbsoluteTopImpressionSharePercent","PerformanceMetricsTopImpressionSharePercent","PerformanceMetricsTopISLostToBudgetPercent","PerformanceMetricsTopISLostToRankPercent","PerformanceMetricsAbsoluteTopISLostToBudgetPercent","PerformanceMetricsAbsoluteTopISLostToRankPercent","PerformanceMetricsAllConversions","PerformanceMetricsAllConversionCPA","PerformanceMetricsAllConversionRate","PerformanceMetricsAllConversionAdvertiserReportedRevenue","PerformanceMetricsAllConversionRevenueOnAdSpend","PerformanceMetricsRevenueOnAdSpend","PerformanceMetricsAdvertiserReportedRevenue","ManagementSchemaProcessor","IsChinaMarket","CNMarketExpansion","isChinaMarket","additionalProperties","CBTLifetimeBudget","aivStatusEnumValues","PaymentInstrumentType","in","AccountVerificationStatus","BusinessLegalName","intValue","AccountImportSchemaProcessor","LastImportInfoEntityIdsSpecified","TagSchemaProcessor","isOwnerFilterable","LinkedStoreSchemaProcessor","GoalSchemaProcessor","goalsI18n","IsMainConversionGoal","ViewThroughConversionsCredit","propertyConversion","sourcePropertyType","sourcePropertyName","extend","CampaignTypesDataSource","disableSearch","campaignTypes","typesToReturn","DeviceTypesDataSource","deviceTypes","SeasonalityAdjustmentSchemaProcessor","CampaignTypeFilter","DeviceTypeFilter","DataExclusionSchemaProcessor","_SeasonalityAdjustmen","AdjustmentPercentage","SharedBudgetSchemaProcessor","IsAvgPositionDeprecationPhase2Enabled","propertyList","SharedBudgetCampaignSchemaProcessor","SelAccountLevelListsGridSchemaProcessor","entityNameProperty","EntityName","sharedEntityCustomerIdProperty","SharedEntityCustomerId","SelCustomerLevelAssociationsGridSchemaProcessor","sharedEntityNameProperty","SharedEntityName","listItemCountProperty","ListItemCount","sharedEntityCustomerNameProperty","SharedEntityCustomerName","DeviceTypeLocalizeMap","HotelCenterOverviewSchemaProcessor","_updatedSchema$proper","BidAmount","DeviceType","PartnerHotelId","EnumValue","_updatedSchema$proper2","CTR","AverageCPC","AveragePosition","fieldMap","PortfolioBidStrategySchemaProcessor","AssetGroupSchemaProcessor","SupportCPSForPmax","PmaxAssetLinkSchemaProcessor","UnifiedAdsAssetLinkSchemaProcessor","AppAdsAssetGroupSchemaProcessor","featureToSchemaProcessorMapping","AutomatedRuleKeywordGrid","AutomatedRuleAdgroupGrid","AutomatedRuleAdGrid","AdgroupGrid","AdScheduleGrid","LocationsGrid","ExcludedLocationsGrid","DevicesGrid","campaignNegativeKeywordGrid","adgroupNegativeKeywordGrid","ExperimentsGrid","RSAAssetsGrid","AssetsReportGrid","RSACombinationsGrid","AudienceAssociationGrid","AudienceGrid","ProductGrid","GmbImportV2","SmartPerformanceGrid","ManagementGrid","ImportGrid","UETTagsGrid","LinkedStoreGrid","ConversionGoalsGrid","SharedBudgetSummaryGrid","SharedBudgetEditGrid","AccountLevelListGrid","CustomerLevelEditAccountsGrid","HotelCenterOverviewGridHotelSubAccountGrid","HotelCenterOverviewGridHotelGroupGrid","HotelCenterOverviewGridHotelIdGrid","HotelCenterOverviewGridHotelDeviceTypeGrid","HotelCenterOverviewGridHotelDateGrid","HotelCenterOverviewGridHotelLengthOfStayGrid","HotelCenterOverviewGridHotelUserCountryGrid","HotelCenterOverviewGridHotelSlotTypeGrid","HotelCenterOverviewGridHotelCountryGrid","HotelCenterOverviewGridAdvancedBookingGrid","HotelCenterOverviewGridCheckinDayGrid","HotelCenterOverviewGridDateTypeGrid","HotelCenterOverviewGridSiteTypeGrid","SeasonalityAdjustmentGrid","DataExclusionGrid","AssetGroupGrid","AppAdsAssetGroupGrid","PmaxAssetGrid","UnifiedAdsAssetGrid","getWaterfallFilterStoreVNext","filterKeys","preferenceService","waterfallFilterStorage","WaterfallFilterStorage","getFilters","filters","filterKey","i","$and","filterObj","mergeFilters","getCommonFilterConfig","schemaProcessor","searchbox","selector","_ref$enableCampaignWa","enableCampaignWaterfall","_ref$enableAdGroupWat","enableAdGroupWaterfall","_ref$enableAvgPositio","_ref$allowCampaignSta","allowCampaignStatusWaterfall","_ref$allowCampaignTyp","allowCampaignTypeWaterfall","_ref$enableEditorialR","cachedEntitySchema","_ref$filterExpression","sessionStore","preferenceStoreFactory","_ref$getLegacySaved","getLegacySaved","_ref$updatePilot","updatePilot","_ref$odata","odata","ignoreCase","extraPerformanceColumns","disabledPerformanceColumns","schemaConfigOptions","initializeCommonFilterConfig","disableFilterForExtraPerformanceMetrics","campaignGridFilterStore","adgroupFilterStore","enabled","waterfallFilterTypes","baseConfig","maxSavedFilterLimit","storageFactory","FilterStorageFactory","waterfallFilterStores","waterfallEvent","schemaProcessorCopy","updateEntitySchemaForFeatures","bind","updateOdataOptions","odataOptionsProcessor","isComparingEnabled","window","compared","CustomColumnBackboneWrapper","props","onSave","onCancel","document","body","appendChild","el","ReactDOM","React","CustomColumnFormPanel","DataSourceStore","Store","PopupCallout","_React$PureComponent","close","off","placement","getBoundingClientRect","right","innerWidth","activeElement","_jsx","onMouseLeave","children","Callout","onClose","show","popoverId","closeButton","focusLockContent","shouldUpdatePosition","defaultProps","ENTITY","AD","KEYWORD","CUSTOMIZERFEED","EXTENSION","ASSETGROUP","ASSET","CategoryFAID","CategoryFALink","Adult_General","Alcohol_General","Pharmacy_General","Adult_Porn_Adult_Entertainment","Adult_Illegal_Adult_Content","Political_Politicians","Disallowed_Content_Abortion","Mature_Content","Cryptocurrency","Birth_Control","Dating","Fertility_Treatment","Background_Checks","Payday_Loans","Penny_Stocks","Psychics","Tobacco_Image","Alcohol_Image","Unsubstantiated_Claim_Image","Tobacco_Category","Lingerie_Explicit","Sensitive_Health","Misinformation","Drug_Paraphanelia_Category","Sexual_Health_And_Erotica","Skin_Exposure","Ad_Functionality","Unbranded_Creative","End_Of_Life_Services","Tattoo_And_Piercings","Weapon_Accessories_And_Concealed_Permits","Spam","ENTITYToI18","AssetGroup","Extension","Asset","ENTITYPluralToI18","BLACKLIST","getDateUtils","reformatDate","datetime","substr","formatDate","Date","timeZone","Videos","asset","editorialCategories","editorialCategorie","Categories","flatten","unique","link","showRejectionReasons","_ref2$deliveryStatusD","deliveryStatusDetails","_ref2$actionLinks","actionLinks","entity","_ref2$useCustomTempla","useCustomTemplate","_ref2$isContextualAtt","isContextualAttributeForRecommendation","_ref2$isInlineDiagnos","isInlineDiagnosisForKeyword","getInlineDiagnosisForKeywordComponent","isSmartShoppingCampaignEnabled","getCustomTemplate","percentSymbol","_ref2$containerSelect","containerSelector","_ref2$popoverId","_ref2$afterRender","afterRender","inContextRepairRecommedationType","_ref2$isForAdsPageOnl","isForAdsPageOnly","_ref2$isEditorialCate","append","tableId","popupContentKey","keyVault","hoveringPopup","violations","detailsToShow","reasonCountToShow","Math","min","promises","activities","clickActivity","inContextRepairRecommendation","clickDeliveryStatus","hoverActivity","hoverDeliveryStatus","hoverPopupCalloutDurationActivity","popupManagement","hoverPopupCalloutDuration","bidlandscapeDisabled","bidlandscapeDisalbedTemplate","editorialCategoryTemplate","inActiveReasons","shift","experimentTemplate","expDateUtils","actionLink","deliveryStatusUpdated","mapCampaignSpecificDeliveryStatus","mapDeliveryStatusForMMC","reasonTemplate","reasonid","noReasonFoundTemplate","getLogForInContextRepairRecommedation","mes","CampaignId","AdGroupId","AdId","DeliveryStatusType","hoverPopupDurationStart","popupManager","forceAcquireLock","startSignal","renderPages","pages","page","container","contentView","contents","PagedContent","handlePaginationExternally","setPages","getContentView","once","contentViewReactWrapper","BackboneInstanceWrapper","instance","containerDOM","querySelector","content","releaseLock","stopSignal","newPage","trigger","one","e","newPageContent","newPages","currentPage","eventObject","parent","data","currentConent","resolve","DeliveryStatusPopupFactory","getEventTargetModel","keyOfElement","itemWithKey","IsExperimentsOpenBetaEnabled","getEventTargetEntity","statusForCombinedPopup","EditorialComponent","KeywordParam1","KeywordParam2","KeywordParam3","AdTitleDescription","AdTitle","AdDescription","DisplayUrl","DestinationUrl","LandingURL","SiteDomain","BusinessName","PhoneNumber","AltText","Audio","Video","Flash","CAsset","Image","Destination","Order","OrderItem","Association","Script","getLocationString","commonI18n","locations","pow","getRejectionFooterText","isAppealable","isDisclaimerDisapproved","hideParentLevel","thisEntity","allEntitiesInThisAdGroup","allEntitiesInThisCampaign","allEntitiesInThisAd","requestExceptionForThisEntity","requestExceptionLink","requestExceptionForThisParentEntity","requestParentLevelExceptionLink","helpText","getRejectionStaticLinkFooterText","contactSupportLink","requestReviewText","getEditorialTemplates","reasons","errI18n","locationI18n","ad","keyword","isDetectionRejectionTypeEnabled","logActivity","hideLocation","updatedReasons","isXandrAd","isAssetAppealEnable","AssetBasedEditorialInlineAppeal","isLinkedinAd","isLinkedInCampaign","isPmaxAppealEnable","PmaxAppealEnable","isAdExtensionInlineAppeal","AdExtensionInlineAppeal","showRequestExceptionLink","isCountryListEnabled","EditorialCountryList","signal","reason","reasonCode","ReasonCode","endReason","countries","violation","getEditorialErrorMessage","locationString","Location","violationCountry","LanguageToCountries","pluck","uniq","country","number","tag","endtag","detectionType","DetectionMode","rejectionType","RejectionMode","isDisapproved","editorialTemplate","footer","isCountryListHidden","countryListLabel","isDeliveryStatusDisapproved","registerCountryListEvent","popupView","logContext","$target","$parent","parentsUntil","$icon","removeClass","addClass","toggle","outerHTML","translateOrderBy","orderByParams","orderBy","normalizeOrderBy","JSGridChartDataSource","_GridDataSource$JSDat","chartData","loadingCallback","errorCallback","_options","_resource","omit","offset","skip","take","where","orderby","translateParams","updateChartData","raw","totalCount","GridDataSource","JSData","defaultAfterFindAll","__","attrs","connect","dataSourceConfig","dataQueryBuilder","logger","logActivityMarker","usingCacheManager","useJSGridChartDataSource","customDataSource","afterFindAllPromiseResolve","originalQuery","callCount","queryParams","_ref$queryTransform","queryTransform","onStartQuery","isDFMCall","getQuery","_ref2$afterFindAll","afterFindAll","originalAfterFindAllInParams","_ref3$afterFindAll","originalAfterFindAllInConfig","resources","dfmData","dfmRawData","returnData","finalParams","querySchema","finalSchema","hasQuerySchema","hasFinalSchema","filterOptions","merge","cacheBusterFlag","call","queryBuilder","QueryErrorFactory","tooMuchDataError","originalAfterFindAll","err","Code","EnumPropertyToTypeMapping","AudienceStatus","BidTarget","BidType","CallTrackingStatus","DevicePreference","Medium","EnumPropertyToStringTypeMapping","toLegacyOperator","col","ret","toLegacyColumn","filterSchema","toAlias","toLegacyValue","types","legacyValue","convertEnumValuetoLegacy","convertEnumValuetoLegacyString","toLegacyEnum","fromFilterEntityToLegacyFilter","filterentity","legacyFormats","translateToLegacyFormat","SelectedOperator","Values","legacyFormat","SessionFilterStorage","_ref$filterEntityOpti","filterEntityOptions","resourceId","entryId","getSessionStorageId","definitions","defineResource","storage","destroy","mapFeatureNameToEnum","mapFeatureNameToStatusKey","LegacyQuickFilterStorage","_SessionFilterStorage","newCampaignsGridFilterEnabled","_assertThisInitialized","filterEntity","selectedKey","mapFeatureNameToQuery","catch","DEPRECATED_PROPERTIES","Deserializer","parseIdAsInt","processedSchema","flattenEntitySchema","FilterSchema","expressions","convert","logicalOperator","$or","processedExpressions","deprecatedColumn","mongoPredicate","applyConversions","toMongoPredicate","getFilterProperty","parseFloat","parseInt","taskQueueMixin","classInstance","methodNames","asyncTaskQueue","methodName","originalMethod","obj","isPending","EditableFilterStorage","deserializer","savedFilter","deserialize","PermanentFilterStorage","storageKey","_ref$isAccountLevel","isAccountLevel","getStorageKey","preferenceData","Data","setAtAccountLevel","setAtUserLevel","findByNameAtAccountLevel","findByNameAtUserLevel","del","delAtUserLevel","EditableFilterPermanentStorage","permanentFilterStorage","serializedValue","save","delete","getPreferenceFilter","preference","preferenceQuery","reject","actionName","error","SavedFilterStorage","_ref$maxSavedFilterLi","gridName","project","preferenceInitPromise","exist","RecentFilterPermanentStorage","recentFilterStorages","currentIndex","getAllRecentPromise","saveFilterPromise","pop","newFilter","cleanFilterPromise","clean","QuickFilterStorage","QuickFilterPermanentStorage","WaterfallFilterPermanentStorage","_PermanentFilterStora","set","QuickFilterSessionStorage","storageTypeMapping","quickFilter","editableFilter","editableFilterPermanent","recentFilter","legacyQuickFilter","permanentQuickFilter","permanentWaterfallFilter","sessionQuickFilter","Storage","DateFilter","BudgetCenterMonthFilter","waterfallFilterTypeMapping","waterfallFilterNames","waterfallFilterStorages","filterStorage","getSessionStorage","filterTypes","getFilterInSync","filterType","dateFilterProcessor","dateFilter","start","kendo","formattedStart","end","formattedEnd","RangeStartDate","RangeEndDate","grain","RangeId","waterfallDateFilterProcessor","dateFilterStorage","serverContext","CurrentUser","CultureDateTimeFormat","ShortDatePattern","redirectToLogin","_serverContext$Urls","Urls","SignOutUrl","protocol","host","prodEnvs","isTestEnvironment","envToCheck","PROJECTS","PROD_CLARITY_ID","TEST_CLARITY_ID","_CLARITY_IDS","_TEST_CLARITY_IDS","triggerOmnitureEvent","payload","updatePdlPage","navLevel3","navLevel3Title","_PDL","campaignID","adGroupID","findMismatches","original","expected","force","isNullOrUndefined","checkUserQueryParams","queryString","mismatches","updatedQuery","replaceState","sort","hash","checkQueryParams","CurrentCustomer","CurrentAccount","getPosition","$editor","isRTL","left","adjustTopPosition","cTop","top","cLeft","$cell","x","y","elementFromPoint","scrollTop","closest","elementsFromPoint","elements","node","tagName","toUpperCase","msElementsFromPoint","nodeList","$tdCell","prototype","forEach","getCellFromPoint","width","widthDiff","outerWidth","$table","clientWidth","height","padding","outerHeight","getEditorPositionAsideAnchor","$anchor","_$anchor$offset","anchorTop","anchorLeft","anchorWidth","editorWidth","editorTop","editorLeft","role","editorPositionFactory","_ref$renderBelow","_ref$CultureIsRTL","CultureIsRTL","_ref$noDismiss","noDismiss","_ref$customDismissCon","customDismissCondition","_ref$parentContainerS","_ref$lockRegionAriaLa","lockRegionAriaLabel","_ref$adjustTopPositio","hasCustomParentContainer","dismiss","FocusLockEditorView","focusLockInstanceDecorator","onExit","focusFirstItemOnMount","managed","focusLockEditorView","clickToDismiss","hide","css","fadeIn","setFocus","tabbableNode","getTabbableNodes","is","focus","preventScroll","InjectionContext","_ref$disableDependenc","disableDependencyCheck","registry","punchCards","enableDependencyCheck","card","require","default","dependencies","factory","modules","injectedDeps","missingDeps","sparingDeps","conflictDeps","dep","finally","unusedDeps","globalContext","BINGADS_TEST_BUILD","uncheckedInjectionContext","authorRuleActivities","campaignCreationActivities","scenario","setting","settings","getListeners","campaignListener","pageTrackingId","applicationName","_ref$ariaConfig","ariaConfig","applicationAriaConfig","isOneDSListenerEnabled","currentEnv","getAriaConfig","applicationSystem","systemName","applicationSubSystem","subSystemName","basicFormatter","BasicFormatter","apiFormatter","ApiFormatter","reportingApiFormatter","ReportingApiFormatter","importApiFormatter","ImportApiFormatter","consoleFormatter","ConsoleFormatter","logLevelFilter","LogLevelFilter","apiFilter","ApiFilter","consoleFilter","ConsoleFilter","unloadLogFilter","UnloadLogFilter","localStorageListener","LocalStorageListener","formatters","uniquePageId","init","OneDSListener","tenantToken","token","batchSize","logTableNames","campaignLogTableConfig","defaultLogCategory","AriaListener","flushInterval","registerForTeardown","adInsightListener","adInsightLogFormatter","AdInsightOpportunityLogFormatter","adInsightApiFilter","AdInsightOpportunityApiFilter","tokens","adInsightOppTracking","adInsightLogTableConfig","consoleListener","ConsoleListener","listeners","seleniumLogsSink","InMemorySink","maxSize","inMemoryListener","InMemoryListener","sink","getProcessors","isInDevelopmentMode","userContext","pageContext","Version","PageTrackingId","contextProcessor","ContextProcessor","debugProcessor","DebugProcessor","isDebugMode","perfTimingProcessor","PerfTimingProcessor","landingPageUrl","ExpectedUnhandledPromiseErrors","getPerfLogListeners","perfLogListener","_ref$serverContext","performanceLogsFormatter","PerformanceLogsFormatter","performanceLogsFilter","PerformanceLogsFilter","resourcetiming","getInstrumentation","errorMappers","ajaxStubOptions","_ref$objectsToStub","objectsToStub","processors","instrumentationForPerfTiming","Instrumentation","PerformanceTimingLogger","lcid","filteredObjectsToStub","eventHandler","AjaxEventHandler","shouldAddHeaders","ajaxContext","isInternalUrl","AjaxStub","stubOptions","logUnhandledPromiseRejections","DynamicPermissions","EnableLoggingForUnhandledPromiseRejections","ErrorStub","isExpectedUnhandledPromiseError","errorMessage","promiseError","setStub","Locale","PerfMarkerFactory","vNextInstrumentation","InstrumentationSchema","TOKENS","Local","Aria3","Aria07","AdInsight","ci","allTokens","defaultConfig","include","spToken","getTokensForSmartPage","constants","LOGCATEGORY","ERROR","priority","PERFORMANCE","TRACE","SUBSTRATE","Market","UserRole","ManagedBy","LocaleID","IsInternalUser","Omniture","SessionId","IsAksService","rawLogs","CustomerId","AccountId","userId","UserId","Lcid","sessionId","pageVersion","PageVersion","market","CustomerMarket","userRole","managedBy","CustomerManagedBy","pilots","Pilots","_ref$landingPageUrl","referrer","landingPg","safeParseInteger","defaultValue","parsedNum","Number","round","_Formatter","rawLog","pflags","api","apiString","trim","updateParameter","parentScenarioName","parentScenarioId","message","entryType","Sn","SceID","scenarioId","RID","requestId","Api","Pass","pass","Dur","timeTaken","Ime","isMethodEnter","Hm","httpMethod","Timestamp","timeStamp","getUtcTime","SesID","Url","UID","CID","AID","LCID","Mes","Lc","logCategory","Ll","logLevel","Env","hostname","As","Asub","An","ActID","activityId","Et","getEventType","Loc","Role","MgdBy","PFlags","getPFlagsProps","Iu","impactUser","Ec","entityCount","UserAgent","navigator","userAgent","PgID","PgVer","DbgMode","Formatter","bracketedParamsRegex","RegExp","log","a","createElement","substring","_log$Api$split","_log$Api$split2","appName","tap","removeQueryParameters","removeDotMExtension","convertAbsoluteToRelativePath","removeBracketedParameters","removeApplicationNameFromApi","environment","Action","logApi","logApiClientNameMapper","OverviewOpportunityTile","MCCOverviewOpportunityTile","isClick","isMCC","RequestId","OpportunityId","OpportunityType","OpportunityTypeId","typeId","ClientName","Source","URL","GUID","guid","Position","UserFeedback","input","Context","context","apiChunks","getValidatedApiChunks","operationId","rawChunks","UetTagHelperFormatter","pageNavigationColumns","resourceTimingColumns","columns","isPageNavigationLog","formattedLogs","mkt","dbgMode","pgId","pgVer","_Filter","logMessage","appLogLevel","LOGLEVEL","INFO","Filter","ignoredApis","shouldFilter","isErrorLog","isIgnoreApi","ignoredApi","excludeFromLocalStorage","allowedEnvs","exlcudeResources","resourceName","excludedResource","OdataErrorMapper","errorCodes","ajaxData","errorString","errorCode","CampaignApiErrorMapper","knownUserErrorCodes","jqXHR","urlString","responseText","Errors","UrlErrorMapper","domains","ajaxUrlString","odataErrorCodes","campaignApiErrorCodes","invalidDomains","azureUrls","isAzureEnv","some","getConfig","odataPath","maxRowsBeforeShowOverallTotalsOnTop","getRawConfig","_ref$showSearchRow","showSearchRow","_ref$showAudienceRow","showAudienceRow","_ref$showNativeRow","showNativeRow","_ref$showDeletedRow","showDeletedRow","_ref$showPmaxRow","showPmaxRow","_ref$showLinkedInRow","showLinkedInRow","dataKey","text","ignore","IsNativeAdsAllowed","IsNativeAdsRebrandingEnabled","PerformanceMaxCampaignsPhaseTwoCrossNetwork","getTotalRow","rawData","classes","cookRawConfig","keys","helpIds","cfg","i18nKey","helpIdKey","formatDecimalToInteger","aggregatedRowsPluginBuilder","filterService","customConfig","_ref3$processBuilderC","processBuilderConfig","_ref3$processPluginCo","processPluginConfig","rawConfig","getUIFilters","getCombinedFilter","getDataSourceFilter","combinedFilter","dataSourceFilter","hasOnlyDataSourceFilters","depth","isEmptyFilter","showWaterFallFilterTotal","qFilter","getQuickFilter","aggregatedRowsPlugin","getRows","topConfig","appendToHeader","bottom","cookedConfig","version","pgrid","isInitialGridDataLoad","isPageReadyFulfilled","PageReady","afterPageReady","performanceLogPlugin","definePlugin","_ref3$scrolling","scrolling","_ref3$scrolling2$virt","virtualized","plugins","track","_plugins$performanceL","performanceLog","appConfig","_ref2$logNavTiming","logNavTiming","timeStarted","performance","now","activeTimeBeforeStarted","NaN","logConsoleStamp","isSuccess","timeFetched","activeTimeBeforeFetched","timeRendered","activeTimeBeforeRendered","GridName","IsPageReadyFulfilled","IsVirtualized","TotalRows","countRows","TotalServerSideRows","totalCountRows","TotalVisibleRows","TotalColumns","last","DataFetchStartTime","DataFetchStartActiveTime","DataFetchingTime","DataFetchingActiveTime","GridRenderingTime","GridRenderingActiveTime","PageNavStartTime","timing","navigationStart","PageFetchStartTime","fetchStart","LandingPageUrl","logPerformanceInfo","perfMarkerPlugin","_ref2$scrolling","_ref2$scrolling2$virt","_plugins$perfMarker","marker","gridMarker","pgridMarker","createChild","willInit","isDone","parentMarker","_ref$logNavTiming","willFetchData","willRender","done","PreferencesSubadapter","_ref$Resource","Resource","_ref$prefix","_ref$serialize","serialize","_ref$deserialize","preferences","findByPrefix","thenReturn","safeGetString","TextView","texts","_ref$customClass","customClass","customColumnOperations","updateFilterSchemaForCustomColumns","_filterService","columnFormat","customColumnId","performanceMetricsCustomColumnId","popCustomColumnId","popCustomColumnChangeId","popCustomColumnChangePercentId","idList","tempEntitySchema","propertyId","tempObject","cleanUpCustomColumnFilter","columnId","getEditableFilter","removeQueryByColumnId","filterToSet","setEditableFilter","removeAllQueriesInEditableFilter","getSavedFilters","savedFilters","changed","deleteSavedFilter","FilterStorageType","EditableFilter","SelectableFilter","updateAppliedFilter","addUpdateSavedFilter","removeAllQueriesInSavedFilter","dropdownId","saveListId","ColumnChooserAgent","recordRemoveEventName","recordSaveEventName","recordChangeEventName","selectColumnsChangedEventName","callback","columnChooserPlugin","toolbar","columnChooserAgent","columnChooser","customColumnPanel","customColumnService","entitySchemaName","columnChooserEditablePicker","_ref$dynamic","pluginConfig","_$result","_$result$columns","_$result$customColumn","customColumnConfig","debugMode","categories","selected","_$result$mandatoryPro","mandatoryProperties","_$result$locked","locked","_$result$patchQuery","patchQuery","Columns","SelectedColumns","LegacyColumns","LegacySelectedColumns","AdCustomizerAttribute","LegacyGridFlag","nameFromLegacy","legacyGridName","i18nErrors","customToolbarIcon","isHotelCenterGrid","columnProcessorBeforeSetRecord","RSAAdCustomizerAttributeColumn","enableRSAAdCustomizer","columnConversions","normalizeConfig","isCustomColumnEnabled","toolbarEditor","gridToolbarGroup","toolbarWithItem","adCustomizerAttributeColumns","_buildColumnConversio","setSelectedColumns","customColumns","patch","columnInfo","customColumnGridKeyFromId","CustomColumn","toJSON","IsRSAAdCustomizerEnabled","gridType","validNames","isDataFetchManagerSource","select","reduce","memo","column","patchCustomColumns","selectedCustomColumnNames","ODATA_PREFIX","navigation","source","existingGridDataParameters","gridDataParameters","$call","updateGridConfig","customerHierarchyExtras","elTable","parentElement","detach","appendTo","triggerSelectedColumnsChangedEvent","initializeUpdateFilterForCustomColumn","dynamicCustomColumnsSetup","resolveSetup","spread","updateCustomColumnPreferenceStore","removedColumns","editedColumns","addedColumns","editedColumn","addedColumn","openCustomColumnPanel","resolvePanel","rejectPanel","initialName","initialDescription","initialColumnFormat","initialExpression","p$columnDetail","isEdit","parseIdFromGridKey","getCustomColumnDetailFromMT","description","notificationApi","showWarning","removeCustomColumnByKey","open","metricCategories","segmentCategories","afterSave","formData","currentColumns","optionListViewFactory","ColumnChooserEditablePicker","isReadOnlyUser","isValid","p$removeColumn","filtered","p$editColumn","p$createColumn","getSelection","getSelectedRecord","setSelectedRecord","selection","refreshMenu","getRecord","setRecord","_columns","p$setRecord","record","AppCampaignNewCampaignGridColumns","unavailableSavedColumns","triggerRecordSavedEvent","applyRecord","IsAvgPositionDeprecationPhase3Enabled","selectedColumns","hasTopImpressionRate","hasAbsoluteTopImpressionRate","triggerSelectedRecordChangedEvent","customColumnResponseKey","customColumnErrors","CustomColumnErrors","showFilterBar","columnsToExclude","ErrorCode","columnsToInvalidate","excluded","deletedProperties","invalidProperties","legacyQuery","legacyDataProcesser","legacySelected","legacyRecords","legacyRecord","creation","destroyColumnChooser","createColumnChooser","ColumnChooser","withColumnsChangeAnnouncement","setState","restoreToolbar","showAllToolbars","overrideWith","showColumnChooser","hideAllToolbars","savedName","dialog","Dialog","backdrop","keyboard","showHeader","setContent","buttons","class","button","p$canSaveColumns","canSave","selectedKeys","applyColumns","iconLeftGlyphName","iconLeft","iconRight","menu","onClick","removeText","onSelect","onRemove","triggerRecordRemovedEvent","removeRecord","legacyGridFlagQuery","flags","flag","flagInfo","isColumnChooserMigrated","$top","$orderby","returnResult","Datatype","dataTypeI18nKey","formatDateInQuery","date","formatDateInEntitySet","parseDate","dateString","defaultComparisonColumns","changeEntitySet","dateRange","root","identifyEntitySet","DateRange","ComparisonDateRange","dateFilterPlugin","currentDateRange","events","addDateChangeListener","_pluginConfig$compari","comparisonColumns","_pluginConfig$p$dater","p$daterange","getPromise","setFullYear","getFullYear","defaultDateRange","rest","dateRangeCopy","isOdataActionSource","changeEntitySetFn","startDate","endDate","comparisonStartDate","comparisonEndDate","addDateRangeToQueryParams","newDateRange","dateRangeEquals","getCurrentDateRange","p$getCurrentDateRange","inlineDownloadGenericPlugin","segment","_config$plugins$inlin","inlineDownload","DownloadView","_config$plugins$inlin2","_config$plugins$inlin3","_config$plugins$inlin4","cusToolbarItem","_config$plugins$inlin5","disableOnEmpty","_config$plugins$inlin6","disableOnTooMuchData","downloadFormats","segmentationTypes","isFeedbackEnabled","isAvailable","downloadView","showDownloadView","ReportRule","getAvailableSegmentationTypes","totalRecordCount","getItemCount","validateSegmentType","createDownloadView","SegmentationTypes","segmentationType","getSegmentType","isTooMuchDataInGrid","succeeded","getAvailability","setAvailability","isAvailableNew","getDownloadView","setFilterByReportEmailRule","ReportEmailRule","p$Initialized","getGridFilter","Entity","Selection","originalPromise","inlineDownloadCampaignODataPlugin","pluginName","customGridColumns","processReportRule","s$i18n","customDownloadService","rawSelection","customFilterQueryParams","CampaignODataDownloadView","_DownloadView","localizedHeaders","odataColumnNames","currentFilter","getGridColumnsProperties","gridColumns","_$map","getDefault","columnConfig","_$map2","filterString","encodeURIComponent","odataV4","filterUrlParam","filterCustomQueryParams","additionalFilterUrlParams","URI","serializedFilter","returns","createSimilarReportEmailRule","Rule","setReportEmailRule","withoutSegment","plugin","dependency","buildReplacement","newDeps","objDeps","without","inlineDownloadWithoutFilterstatePlugin","inlineDownloadWithoutSegmentPlugin","inlineDownloadWithoutFilterstateAndSegmentPlugin","updateAssociation","selectionInfo","LabelAssociationView","disableDeselectAll","isManagementRequest","_action","stats","associationView","updateSelectedEntityCount","selectedRowCount","pgridPlugins","createLabelSelectorView","checkAll","router","s$label","useSubMenu","_getCheckMap","selectedItems","selectedRowIds","selectedItem","labelsCount","rowItem","isShortCycle","count","LabelsSelectorView","CheckState","checked","transition","CheckTransition","indeterminateToCheckedShortCycle","indeterminate","indeterminateToCheckedFullCycle","checkMap","getCheckMap","allPages","labelSelectorView","cycleStatusClass","createView","decorate","CreateLabelView","popupFront","closeButtonAriaLabel","entityType","results","labelId","added","setErrors","withUiBlock","onCreate","navigateToManagePage","labelsPlugin","pagination","crossPageSelectAll","_$result$isForVNext","_$result$disableDesel","_$result$isManagement","appCfg","$dropdownContainer","labelSelectorPerfMarker","labelDropdownId","labels","getEntityName","getSelectionInfo","info","isAllSelected","showSelector","oldSelector","unbindDropdownContainerClick","updateToolbar","shouldBeDisabled","updateToolbarConfig","click","setupLabelMenu","phoneBiPattern","biSubColPrefix","getPoPCols","popTitles","propertyKey","parentProperty","isColumnWithFluc","columnWithFlucTemplate","cellTemplate","_column$subColumns","subColumns","parentTemplate","parentColumn","_objectWithoutProperties","_excluded","primaryName","primary","headAttributes","style","bodyAttributes","compareName","compare","ComparedWidth","changeTitle","changeName","change","ChangeWidth","changePercentTitle","changePercentName","PopSubColWidth","ChangePercentageWidth","formatted","formatPercent","updateSubCols","columnsCur","expandedCols","handler","isComparing","expanded","formatedStart","formatedEnd","getPopTitles","popStatus","biSubColPattern","groupHandler","popColumnsCur","popColumns","sortableHeaderCur","stopPropagation","isPoPColumn","popHeader","headRows","row","isPopHeaderRow","patchRow","cells","cell","patchCell","columnGroup","columnIndex","popHeaderTemplate","icon","periodOverPeriodPlugin","pipeStructureProjections","pipeContentProjections","popColumnsConfig","appendSegmentFlag","IsSegmentRow","segmentConfig","segArray","from","to","_ref$expandedAggregat","expandedAggregate","isBiColumn","bodyRows","r","segs","m","toSeg","rowType","segsInRow","isAggregateRow","AggregateName","HasSegmentRow","toggleAggregateSeg","segmentCur","expandedAggregateCur","segmentCellStyleConfig","begin","leafColumns","colIndex","cellTemplates","newHtml","defaultTemplate","isAggregate","hasSegment","isTopAggregate","localizeSegmentationValue","SegmentationType","SegmentValue","attributes","translateSegRow","View","segType","changeQueryParams","updateSource","curQuery","segmentPlugin","menuId","setSegType","_pluginConfig$timeRan","timeRangeValidationEnabled","getSegType","currentScenario","_pluginConfig$segment","campaignSegmentationTypeEnum","segmentMenu","logTrace","msg","isTimeRangeValid","segAlertView","segmentAlert","dialogOptions","titleHeadingLevel","maxWidth","center","setTimeout","dialogConfirmButton","menuButton","applySegment","getSegmentMenu","getMenuItem","seg","itemConfig","localizeSegmentationType","itemClasses","Time","Goal","getSupportedSegmentationTree","childMenuItems","childItem","isChild","menuItemWithChildren","segmentCellStyle","curSegType","resetMenu","segTypeInit","isSegmentationTypeSupported","setSegmentType","segmentType","overrideSegmentationTypes","setter","softDependencies","JsDataQueryConverter","direction","QueryBuilder","_Observable","decorators","_ref$initialQuery","initialQuery","_ref$builderConfig","builderConfig","generateJsDataQuery","_ref$logActivity","lastQuery","newQuery","bodyParameters","notify","dataQuery","decorator","run","handleNewQuery","stack","Observable","Decorator","_ref$expectedDeps","expectedDeps","_ref$deps","deps","missing","verifyDepsExist","savedValue","getValueAsync","buildQuery","getSelectQuery","savedColumnNames","lockedColumnNames","columnMap","selectedCols","ColumnChooserDecorator","_Decorator","columnsMap","defaultColumns","lockedColumns","_ref$customColumnsEna","customColumnsEnabled","_ref$IsAvgPositionDep","_ref$IsColumnConversi","_ref$comparisonPoPCol","comparisonPoPColumns","ColumnChooserPreference","CustomColumnPreference","fetchSortInfo","_buildColumnAndSortin","customColumnsRecord","allCustomColumns","customColumnsMap","preferenceKey","columnsPromise","warmCache","savedColumns","_ref3$","sortInfo","savedColumnsRecord","extractCustomColumnsInfo","transformedQueryParams","patchedOrderbyInfo","DateFilterDecorator","_ref$isOdataActionSou","dateUtil","currentRange","_this$currentRange","_this$currentRange2","filterOptionsExtensions","dateFormat","shortDateFormat","FilterDecorator","ignoreColumns","appState","refreshSource","filterQuery","_this3","transformedFilterQuery","GridDataParametersDecorator","preloadOptions","_ref$isCustomerHierac","isCustomerHierachyRequest","_ref$loadDirectlyLink","loadDirectlyLinkedAccounts","_ref$accountModes","accountModes","_ref$associationType","associationType","_ref$adExtensionTypes","adExtensionTypes","ALLOWED_PAGE_SIZES","PaginationDecorator","defaultPageSize","fetchPaginationConfig","pageSize","pageNumber","SegmentationDecorator","SegmentationPreference","getSegPreference","addSegmentToQuery","addSegmentToEntity","SortingDecorator","_buildSortingConversi","ChartDataParametersDecorator","pageState","chartDataAdapter","inlineChartPreference","getPreferencesAndDefaults","chartParams","performanceTimeSeriesParameters","formatPreferenceValue","replaceAtom","atom","oldKey","newKey","newAtom","decoratorMap","sorting","chartDataParameters","dataExclusionFilterProcessor","DataExclusionFilterProcessorDecorator","finalWhere","finalQuery","array","replaceKeyOfQuery","targetRoasFilterProcessor","TargetRoasFilterProcessorDecorator","filterTargetRoas","qKey","toFixed","replaceTargetRoasOfQuery","getDecoratorInstances","commonConfig","decoratorInstance","hasDecoratorConfiguration","QueryBuilderFactory","decoratorInstances","levelAtConstant","CUSTOMER","ACCOUNT","CAMPAIGN","ADGROUP","storeSeasonalityAdjustmentName","getSeasonalityAdjustmentName","seasonalityPredicateValueNameGetter","seasonalityName","updateSeasonalityNameFromMT","currentAccount","getEntityFromScope","SeasonalityAdjustments","queryParameters","$select","getSeasonalityAdjustmentLike","response","Day","Week","Month","Quarter","Year","DayOfTheWeek","HourOfTheDay","Network","TopVsOther","BiddedMatchType","Currency","DeviceOS","AdPosition","DomainType","GoalType","GoalName","GoalCategory","AudienceType","AudienceName","AdScenario","Hour","DayOfWeek","Device","HourOfDay","segmentationTypeEnum","adinsightSegmentationTypeEnum","timeSegmentationTypeEnum","diffDay","_ref$start","_ref$end","_ref$compared","comparedStart","comparedEnd","goalSegmentStartDate","audienceSegmentStartDate","totalRange","oneYearAgo","todayNYearsAgo","withinThreeYears","moreThanOneYear","segmentationTree","permission","typeWithSameTexts","_keys","valueKeys","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Unknown","Computer","PC","SmartPhone","NonsmartPhone","Tablet","ConnectedTV","BingAndYahooSearch","MicrosoftSitesAndSelectTraffic","SyndicatedSearchPartners","AOLSearch","InHouse","Content","CrossNetwork","BingAndYahooSearchTop","BingAndYahooSearchOther","SyndicatedSearchPartnersTop","SyndicatedSearchPartnersOther","AOLSearchTop","AOLSearchOther","ContentNetwork","AudienceNetwork","MicrosoftSitesAndSelectTrafficTop","MicrosoftSitesAndSelectTrafficOther","InHouseTop","InHouseOther","DestinationURL","Duration","PageVisit","Custom","AppInstall","MultiStage","OfflineConversion","InStoreTransaction","HotelBooking","RemarketingList","InMarket","SimilarToRemarketingList","Product","CustomerList","CombinedList","PredictiveTargeting","ContextualTargeting","ImpressionBasedRemarketingList","UsersNotInAudienceSegments","AddToCart","BeginCheckout","BookAppointment","Contact","Download","GetDirections","InStoreVisit","Other","OutboundClick","PageView","Purchase","RequestQuote","SignUp","SubmitLeadForm","Subscribe","Unassigned","AutoAd","CreditCardAd","TourActivityAd","HealthInsuranceAd","InsuranceServiceAd","CruiseAd","RealEstateServiceAd","FinancialAdvisorAd","TaxServiceAd","DoctorClinicAd","MortgageLenderAd","DebitCardAd","HomeServiceAd","JobListingAd","LegalServiceAd","hour","skeleton","_ref$tree","tree","defined","notDefined","_ref$segmentationType","isSupported","hasPermission","allowed","StatusPopupView","_View","getItemsForRender","iconClassPrefix","textClass","currentTarget","dataset","statusPopupView","popupEditor","getNewUiWelcomeStyles","newUINavigationPreferenceDialog","backgroundPositionY","backgroundImage","rocketImage","backgroundRepeat","backgroundColor","backgroundSize","color","margin","background","textDecorationLine","display","fontWeight","fontSize","lineHeight","marginBottom","marginTop","textAlign","border","marginRight","pug","module","exports","locals","pug_interp","pug_html","locals_for_with","escape","TrafficSplitPercent","splitBase","splitExp","pug_mixins","GeoCodeStatus","block","statusTypeClass","localizedText","$$obj","pug_index0","$$l","rejectionReason","pug_index1","pug_index2","cls","popupId","classIcon"],"sourceRoot":""}