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AET,CACEoE,KAAM,mBACNpE,MAAO,oBAET,CACEoE,KAAM,qBACNpE,MAAO,sBAET,CACEoE,KAAM,yBACNpE,MAAO,0BAET,CACEoE,KAAM,iCACNpE,MAAO,kCAET,CACEoE,KAAM,mCACNpE,MAAO,oCAET,CACEoE,KAAM,8BACNpE,MAAO,+BAET,CACEoE,KAAM,mCACNpE,MAAO,oCAET,CACEoE,KAAM,aACNpE,MAAO,eAILqwE,EAA6B,CACjC,CACEjsE,KAAM,wBACNpE,MAAO,yBAET,CACEoE,KAAM,wBACNpE,MAAO,yBAET,CACEoE,KAAM,wBACNpE,MAAO,yBAET,CACEoE,KAAM,wBACNpE,MAAO,yBAET,CACEoE,KAAM,+BACNpE,MAAO,iCAIEq0B,EAAS,CACpBi8C,SAAU,CACR,CACElsE,KAAM,uBACNpE,MAAO,uBACPuwE,QAAS,CAAC,EACVjrD,SAAU,CACR,CACElhB,KAAM,aACNpE,MAAO,cAET,CACEoE,KAAM,kBACNpE,MAAO,mBAET,CACEoE,KAAM,qBACNpE,MAAO,wBAIb,CACEoE,KAAM,2BACNpE,MAAO,2BACPuwE,QAAS,CAAC,EACVjrD,SAAU,CACR,CACElhB,KAAM,uBACNpE,MAAO,wBAET,CACEoE,KAAM,sBACNpE,MAAO,uBAET,CACEoE,KAAM,sBACNpE,MAAO,yBAIb,CACEoE,KAAM,YACNpE,MAAO,YACPuwE,QAAS,CAAC,EACVjrD,SAAU,CACR,CACElhB,KAAM,oBACNpE,MAAO,qBAET,CACEoE,KAAM,wBACNpE,MAAO,yBAET,CACEoE,KAAM,yBACNpE,MAAO,4BAIb,CACEoE,KAAM,aACNpE,MAAO,aACPuwE,QAAS,CAAC,EACVjrD,SAAU,CACR,CACElhB,KAAM,mBACNpE,MAAO,sBAIb,CACEoE,KAAM,eACNpE,MAAO,eACPuwE,QAAS,CAAC,EACVjrD,SAAU,CACR,CACElhB,KAAM,eACNpE,MAAO,kBAIb,CACEoE,KAAM,6BACNpE,MAAO,6BACPuw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CACPuwE,QAAS,CAAC,EACVjrD,SAAU,CACR,CACElhB,KAAM,+BACNpE,MAAO,gCAET,CACEoE,KAAM,kCACNpE,MAAO,qCAIb,CACEoE,KAAM,oBACNpE,MAAO,oBACPuwE,QAAS,CAAC,EACVjrD,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,6BACPuwE,QAAS,CAAC,EACVjrD,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,sBACPuwE,QAAS,CAAC,EACVjrD,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,yBACPuwE,QAAS,CAAC,EACVjrD,SAAU,CACR,CACElhB,KAAM,gCACNpE,MAAO,mCAIb,CACEoE,KAAM,wBACNpE,MAAO,wBACPuwE,QAAS,CAAC,EACVjrD,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,oBACPuwE,QAAS,CAAC,EACVjrD,SAAU,CACR,CACElhB,KAAM,wBACNpE,MAAO,2BAIb,CACEoE,KAAM,QACNpE,MAAO,QACPuwE,QAAS,CAAC,EACVjrD,SAAU,CACR,CACElhB,KAAM,cACNpE,MAAO,iBAIb,CACEoE,KAAM,sBACNpE,MAAO,sBACPuwE,QAAS,CAAC,EACVjrD,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,sBACPuwE,QAAS,CAAC,EACVjrD,SAAU,CACR,CACElhB,KAAM,QACNpE,MAAO,SAET,CACEoE,KAAM,QACNpE,MAAO,SAET,CACEoE,KAAM,SACNpE,MAAO,UAET,CACEoE,KAAM,QACNpE,MAAO,WAIb,CACEoE,KAAM,oBACNpE,MAAO,oBACPuwE,QAAS,CAAC,EACVjrD,SAAU,CACR,CACElhB,KAAM,uBACNpE,MAAO,wBAET,CACEoE,KAAM,4BACNpE,MAAO,+BAIb,CACEoE,KAAM,oBACNpE,MAAO,oBACPuwE,QAAS,C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AAM,mBACNpE,MAAO,oBAET,CACEoE,KAAM,kBACNpE,MAAO,mBAET,CACEoE,KAAM,kBACNpE,MAAO,qBAIb,CACEoE,KAAM,cACNpE,MAAO,cACPuwE,QAAS,CAAC,EACVjrD,SAAU,CACR,CACElhB,KAAM,WACNpE,MAAO,cAIb,CACEoE,KAAM,cACNpE,MAAO,cACPuwE,QAAS,CAAC,EACVjrD,SAAU,CACR,CACElhB,KAAM,kBACNpE,MAAO,qBAIb,CACEoE,KAAM,qBACNpE,MAAO,qBACPuwE,QAAS,CAAC,EACVjrD,SAAU,CACR,CACElhB,KAAM,wBACNpE,MAAO,2BAIb,CACEoE,KAAM,eACNpE,MAAO,eACPuwE,QAAS,CAAC,EACVjrD,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,wBACPuwE,QAAS,CAAC,EACVjrD,SAAU,CACR,CACElhB,KAAM,wBACNpE,MAAO,yBAET,CACEoE,KAAM,WACNpE,MAAO,cAIb,CACEoE,KAAM,wBACNpE,MAAO,wBACPuwE,QAAS,CAAC,EACVjrD,SAAU,CACR,CACElhB,KAAM,wBACNpE,MAAO,yBAET,CACEoE,KAAM,WACNpE,MAAO,cAIb,CACEoE,KAAM,uBACNpE,MAAO,uBACPuwE,QAAS,CAAC,EACVjrD,SAAU,CACR,CACElhB,KAAM,uBACNpE,MAAO,wB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9lB,KAErD,GAAIl+D,KAAK4jF,oBAAoB/oD,QAAQ6oD,IAAc,EACjD,OAAO,CAEX,CAAE,MAAOnxB,GACP,CAIJ,OAAO,CACT,IAAC,CAnCgC,GCEtB0xB,EAAc,WAQzB,OAAAtkF,EAAAA,EAAAA,IAJA,SAAAskF,EAAYC,IAASnkF,EAAAA,EAAAA,GAAA,KAAAkkF,GACnBjkF,KAAKkkF,QAAUA,GAAW,EAC5B,GAEA,EAAAjkF,IAAA,QAAAC,MAKA,SAAMsjF,GACJ,IAAMW,EAAgBX,EAASx9C,IAE/B,OAAOplC,IAAAA,SAAWujF,IAChBvjF,IAAAA,IAAMZ,KAAKkkF,SAAS,SAAA53E,GAAM,OAAI63E,EAAc1Y,cAAc5wC,QAAQvuB,EAAOm/D,gBAAkB,CAAC,GAChG,IAAC,CAlBwB,GCJrBjD,EAAW,CAEf,2BACA,gCACA,uBACA,4BAEA,wBACA,6BACA,oBACA,yBAEA,+BAGK,SAASC,EAAkBC,GAChC,OAAyC,IAAlCF,EAAS3tC,QAAQ6tC,EAC1B,CCjBA,IAAM0b,EAAkB,CACtB,0BACA,mBACA,2CACA,iCACA,0BACA,oDACA,iCACA,gCACA,gCACA,4BACA,uCACA,iBACA,mBACA,uCACA,mBACA,cACA,qCACA,6BACA,2CACA,gBACA,iBACA,2BACA,0CACA,qBACA,wBACA,kCACA,sCACA,sBACA,2BACA,mBACA,yBACA,yBACA,wBACA,sBACA,wBACA,cACA,8CACA,uDACA,8BACA,+BACA,8BACA,kCACA,gCACA,4DACA,0CACA,2BACA,2BACA,kBACA,kBACA,qBACA,4BACA,4BACA,4CACA,0EACA,6DACA,2DACA,mEACA,wDACA,2DACA,gEACA,gDACA,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,SAAH5kF,GAAA,IAAM89E,EAAQ99E,EAAR89E,SAAkB,OAAmD,IAAnD99E,EAAR0oE,SAAwBpxC,cAAc2D,QAAQ,UAC9E0pD,EAAUE,MAAK,SAAAz+C,GAAG,OAAI03C,EAASxmD,cAAc2D,QAAQmL,IAAQ,CAAC,GAAE,EAMzD,SAAS0+C,IACd,MAAO,CACLC,WANyBp7E,EAMDo9C,OAAOp9C,SAL1Bi7E,EAAWj7E,GAAY,cAAgB,kBADzC,IAAsBA,CAQ7B,C,2GCTMq7E,EAAsC,GAEtCC,EAAe,SAACt2E,EAAMqN,GAAW,IAAAhc,EAAAyB,UAAAC,OAAA,QAAAuP,IAAAxP,UAAA,GAAAA,UAAA,GAOnC,CAA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AK,QAASo7F,EAAIz/B,QAAQ,CAAC,oBAAoBl3E,EAAKmb,WAAY,EAAC,GAAM,KAAQ,GAAO,GAAS,WAE5b67F,EADI/7F,IAAkBjb,EAAK9O,MAChB8lH,EAAW,UAAkBL,EAAIp7F,KAAK,QAASo7F,EAAIz/B,QAAQ,CAACl3E,EAAKi1G,WAAY,EAAC,KAAQ,GAAO,GAAS,IAAY0B,EAAIO,OAAO,OAASH,EAAa/2G,EAAK22E,MAAQ,GAAKogC,GAAe,YAGpLC,EAAW,QAAgBL,EAAIp7F,KAAK,QAASo7F,EAAIz/B,QAAQ,CAACl3E,EAAKi1G,WAAY,EAAC,KAAQ,GAAO,GAAS,IAAY0B,EAAIO,OAAO,OAASH,EAAa/2G,EAAK22E,MAAQ,GAAKogC,GAAe,UAE7LC,GAAsB,cAClB,CACF,CACD,EAAEpoD,KAAK59D,MAERgmH,GAAsB,OAAuB,EAAEpoD,KAAK59D,KAAK,kBAAmBimH,EAAgBA,EAAgBh8F,cAAqC,qBAAhBA,cAA4BA,mBAAcpZ,EAAU,UAAWo1G,EAAgBA,EAAgBvhF,MAAqB,qBAARA,MAAoBA,WAAM7zB,GAAoBm1G,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 { CampaignLifetimeBudget: IsCampaignLifetimeBudgetEnabled } = dynamic || {};\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_CampaignGrids_SharedBudget',\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_CampaignGrids_SharedBudget',\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 if (this.Permissions && this.Permissions.dynamic && this.Permissions.dynamic.CampaignLifetimeBudget) {\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","IsCampaignLifetimeBudgetEnabled","CampaignLifetimeBudget","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":""}