mirror of
https://gitlab.silvrtree.co.uk/martind2000/ft.git
synced 2025-01-25 18:56:16 +00:00
1 line
1.3 MiB
1 line
1.3 MiB
{"version":3,"sources":["environment.js","lib/component-base.js","lib/currency.js","lib/data-service.js","lib/general.reducer.js","lib/paging-utils.js","lib/redux-component-base.js","lib/rest-api.js","lib/sort-utils.js","lib/test-utils.js","components/common/index.js","configuration/common/configure.js","configuration/common/http.js","configuration/common/middleware.js","configuration/etf/beans.js","configuration/etf/components.js","configuration/etf/main.js","configuration/etf/reducers.js","configuration/etf/state.js","configuration/en-us-retail/beans.js","configuration/en-us-retail/components.js","configuration/en-us-retail/main.js","configuration/gw/beans.js","configuration/gw/components.js","configuration/gw/main.js","configuration/gw/reducers.js","configuration/gw/state.js","components/common/attributes/share-class-link-listener.js","components/common/elements/ft-bar-chart.js","components/common/elements/ft-chart.js","components/common/elements/ft-column-chart.js","components/common/elements/ft-info-modal.js","components/common/elements/ft-pie-chart.js","components/common/value-converters/ft-filter.js","components/common/value-converters/ft-length.js","components/common/value-converters/ft-sort.js","components/common/value-converters/ft-type-ahead-filter.js","components/marketing/common/index.js","components/marketing/lib/combine-marketing-reducers.js","components/products/common/index.js","components/products/lib/caveats-reducer.js","components/products/lib/combine-products-reducers.js","components/products/lib/config-loader.reducer.js","components/products/lib/label-loader.reducer.js","components/products/lib/labels-utils.js","components/products/lib/map-state-utils.js","components/products/lib/product-configuration-reducer.js","components/products/lib/reducer-utils.js","components/products/lib/top-level-product-component-base.js","components/products/ppss/ft-ppss-table-base.js","components/products/ppss/ft-ppss-table-row-base.js","components/common/elements/ft-carousel/ft-carousel-navigation.js","components/common/elements/ft-carousel/ft-carousel.js","components/common/elements/ft-date-dropdown/ft-date-dropdown.js","components/common/elements/ft-datepicker/ft-datepicker.js","components/common/elements/ft-historical-modal/ft-historical-modal.js","components/common/elements/ft-label/ft-label.js","components/common/elements/ft-label-loader/ft-label-loader.js","components/common/elements/ft-modal/ft-modal.js","components/common/elements/ft-owl-tabbed/ft-owl-tabbed.js","components/common/elements/ft-modal-inline/ft-modal-inline.js","components/common/elements/ft-owl-carousel/ft-owl-carousel.js","components/common/elements/ft-prefix-or-dash/ft-prefix-or-dash.js","components/common/elements/ft-spinner/ft-spinner.js","components/common/elements/ft-th-sortable/ft-th-sortable.js","components/common/elements/ft-share-class-filter/ft-share-class-filter.js","components/marketing/common/value-converters/ft-format-grid-cell.js","components/marketing/grids/ft-grid-filter/ft-grid-filter.js","components/marketing/grids/ft-grid-filter-dropdown/ft-grid-filter-dropdown.js","components/marketing/grids/ft-grid-filter-form/ft-grid-filter-form.js","components/marketing/layouts/ft-choose-subscription/ft-choose-subscription-step1.js","components/marketing/layouts/ft-choose-subscription/ft-choose-subscription-step2.js","components/marketing/layouts/ft-choose-subscription/ft-choose-subscription-step3.js","components/marketing/layouts/ft-choose-subscription/ft-choose-subscription.js","components/marketing/layouts/ft-sticky-tabs/ft-sticky-tabs-content.js","components/marketing/layouts/ft-sticky-tabs/ft-sticky-tabs-label.js","components/marketing/layouts/ft-sticky-tabs/ft-sticky-tabs.js","components/marketing/lists/ft-document-lister/ft-document-lister-cell.js","components/marketing/lists/ft-document-lister/ft-document-lister-dynamic-link.js","components/marketing/lists/ft-document-lister/ft-document-lister-group-row.js","components/marketing/lists/ft-document-lister/ft-document-lister-group.js","components/marketing/lists/ft-document-lister/ft-document-lister-link.js","components/marketing/lists/ft-document-lister/ft-document-lister-mobilelink.js","components/marketing/lists/ft-document-lister/ft-document-lister.js","components/marketing/lists/ft-report-archive-a/ft-report-archive-a.js","components/marketing/lists/ft-report-archive-b/ft-report-archive-b.js","components/marketing/lists/ft-report-archive-c/ft-report-archive-c.js","components/marketing/lists/ft-report-archive-d/ft-report-archive-d.js","components/marketing/video/ft-video-switch/ft-video-switch.js","components/products/common/utilities/show-element.js","components/products/common/utilities/utils.js","components/products/common/value-converters/ft-dash-if-empty.js","components/products/common/value-converters/ft-format-currency.js","components/products/common/value-converters/ft-format-percent.js","components/products/common/value-converters/ft-normalize-space.js","components/products/common/value-converters/ft-range-with-percent.js","components/products/common/value-converters/ft-with-dollar-or-dash.js","components/products/common/value-converters/ft-with-percent-or-dash.js","components/products/distributions/ft-distributions/ft-distribution-rate-at-breakpoint.js","components/products/distributions/ft-distributions/ft-distributions.js","components/products/distributions/ft-distributions/ft-rates-and-yields.js","components/products/distributions/ft-distributions/ft-yield-rows.js","components/products/distributions/ft-distributions-ytd/ft-distributions-ytd.js","components/products/historical/ft-historical-average-annual-total-returns/ft-historical-average-annual-total-returns.js","components/products/historical/ft-historical-cumulative-total-returns/ft-historical-cumulative-total-returns.js","components/products/overview/ft-fund-information/ft-fund-information.js","components/products/overview/ft-fund-mmfr-stable-nav-header/ft-fund-mmfr-stable-nav-header.js","components/products/overview/ft-fund-price-header/ft-fund-price-header.js","components/products/overview/ft-fund-static-bar/ft-fund-static-bar.js","components/products/overview/ft-fund-trading-characteristics/ft-fund-trading-characteristics.js","components/products/overview/ft-fund-nav-header/ft-fund-nav-header.js","components/products/performance/ft-after-tax-average-annual-returns/ft-after-tax-average-annual-returns.js","components/products/performance/ft-average-annual-total-returns/ft-average-annual-total-returns.js","components/products/performance/ft-calendar-year-returns/ft-calendar-year-returns.js","components/products/performance/ft-discrete-returns/ft-discrete-returns.js","components/products/performance/ft-expenses-volatility-benchmarks/ft-expenses-volatility-benchmarks.js","components/products/performance/ft-performance-annualised/ft-performance-annualised.js","components/products/performance/ft-performance-cumulative/ft-performance-cumulative-chart.js","components/products/performance/ft-performance-cumulative/ft-performance-cumulative.js","components/products/portfolio/ft-asset-class-exposure/ft-asset-class-exposure.js","components/products/portfolio/ft-asset-mix/ft-asset-mix.js","components/products/portfolio/ft-category-fund-list/ft-category-fund-list.js","components/products/portfolio/ft-commodities-sector-breakdown/ft-commodities-sector-breakdown.js","components/products/portfolio/ft-credit-quality-exposure/ft-credit-quality-exposure.js","components/products/portfolio/ft-coupon-rate-breakdown/ft-coupon-rate-breakdown.js","components/products/portfolio/ft-currency-distribution/ft-currency-distribution.js","components/products/portfolio/ft-fixed-income-sector-breakdown/ft-fixed-income-sector-breakdown.js","components/products/portfolio/ft-geographic-allocation/ft-geographic-allocation-row.js","components/products/portfolio/ft-geographic-allocation/ft-geographic-allocation.js","components/products/portfolio/ft-geographic-breakdown/ft-geographic-breakdown.js","components/products/portfolio/ft-geographic-exposure/ft-geographic-exposure.js","components/products/portfolio/ft-holdings/ft-holdings.fixture.js","components/products/portfolio/ft-holdings/ft-holdings.js","components/products/portfolio/ft-manager-roster/ft-manager-allocation-contents.js","components/products/portfolio/ft-manager-roster/ft-manager-name-or-modal.js","components/products/portfolio/ft-manager-roster/ft-manager-roster-contents.js","components/products/portfolio/ft-manager-roster/ft-manager-roster.js","components/products/portfolio/ft-market-capitalisation/ft-market-capitalisation.js","components/products/portfolio/ft-maturity-breakdown/ft-maturity-breakdown.js","components/products/portfolio/ft-portfolio-statistics-and-positions/ft-portfolio-statistics-and-positions.js","components/products/portfolio/ft-quality-breakdown/ft-quality-breakdown-table.js","components/products/portfolio/ft-quality-breakdown/ft-quality-breakdown.js","components/products/portfolio/ft-sector-allocation/ft-sector-allocation.js","components/products/portfolio/ft-sector-breakdown/ft-sector-breakdown.js","components/products/portfolio/ft-sector-exposure/ft-sector-exposure.js","components/products/portfolio/ft-statistics-and-positions/ft-statistics-and-positions.js","components/products/portfolio/ft-strategy-breakdown/ft-strategy-breakdown.js","components/products/portfolio/ft-top-exposures/ft-top-exposures-display.js","components/products/portfolio/ft-top-exposures/ft-top-exposures.js","components/products/portfolio/ft-top-ten-holdings/ft-top-ten-holdings.js","components/products/portfolio/util/util.js","components/products/ppss/ft-find-a-fund/ft-find-a-fund.js","components/products/ppss/ft-ppss/ft-ppss.js","components/products/ppss/ft-ppss-etf/ft-ppss-etf-row.js","components/products/ppss/ft-ppss-etf/ft-ppss-etf.js","components/products/ppss/ft-ppss-favorite/ft-ppss-favorite.js","components/products/ppss/ft-ppss-fund-filter/ft-ppss-dropdown.js","components/products/ppss/ft-ppss-fund-filter/ft-ppss-fund-filter.js","components/products/ppss/ft-ppss-fund-identifiers/ft-ppss-fund-identifiers-row.js","components/products/ppss/ft-ppss-fund-identifiers/ft-ppss-fund-identifiers.js","components/products/ppss/ft-ppss-fund-name/ft-ppss-fund-name.js","components/products/ppss/ft-ppss-performance/ft-ppss-performance-row.js","components/products/ppss/ft-ppss-performance/ft-ppss-performance.js","components/products/ppss/ft-ppss-ratings/ft-ppss-ratings.js","components/products/ppss/ft-ppss-search-box/ft-ppss-search-box.js","components/products/ppss/ft-ppss-tab-header/ft-ppss-tab-header.js","components/products/ppss/ft-ppss-table-toolbar/ft-ppss-table-toolbar.js","components/products/ppss/ft-ppss-yield/ft-ppss-yield-row.js","components/products/ppss/ft-ppss-yield/ft-ppss-yield.js","components/products/pricing/ft-daily-prices-and-breakpoints/ft-daily-prices-and-breakpoints.js","components/products/pricing/ft-pricing-at-nav/ft-pricing-at-nav-chart.js","components/products/pricing/ft-pricing-at-nav/ft-pricing-at-nav.js","components/products/pricing-distribution/ft-dividends/ft-dividends.js","components/products/pricing-distribution/ft-dividends-historical/ft-dividends-historical.js","components/products/pricing-distribution/ft-nav-high-low/ft-nav-high-low.js","components/products/pricing-distribution/ft-price-chart/ft-price-chart.js","components/products/pricing-distribution/ft-pricing-distribution/ft-pricing-distribution.fixture.js","components/products/pricing-distribution/ft-pricing-distribution/ft-pricing-distribution.js","components/products/pricing-distribution/ft-share-prices/ft-share-prices.js","components/products/tax/ft-additional-tax-information/ft-additional-tax-information.js","components/products/tax/ft-tax-information/ft-tax-information.js","components/common/elements/ft-date-dropdown/lib/date-dropdown.reducer.js","components/common/elements/ft-modal/lib/ft-modal.reducer.js","components/common/elements/ft-modal-inline/lib/ft-modal-inline.reducer.js","components/common/elements/ft-share-class-filter/lib/share-class-filter.reducer.js","components/marketing/common/elements/ft-gateway/ft-gateway.js","components/marketing/common/elements/ft-multi-select-bar/ft-multi-select-bar.js","components/marketing/common/elements/ft-responsive-table-flow/ft-responsive-table-flow-document.js","components/marketing/common/elements/ft-responsive-table-flow/ft-responsive-table-flow.js","components/marketing/common/elements/ft-type-ahead-search/ft-type-ahead-search.js","components/marketing/grids/ft-grid-filter/lib/grid-filter.reducer.js","components/marketing/grids/ft-grid-filter-form/lib/grid-filter-form.reducer.js","components/products/common/elements/ft-caveats/ft-caveats.js","components/products/common/elements/ft-footnote/ft-footnote.js","components/products/common/elements/ft-labels/ft-labels.js","components/products/common/elements/ft-proximal/ft-proximal.js","components/products/historical/ft-historical-average-annual-total-returns/lib/historical-average-annual-total-returns.reducer.js","components/products/historical/ft-historical-cumulative-total-returns/lib/historical-cumulative-total-returns.reducer.js","components/products/performance/ft-after-tax-average-annual-returns/lib/after-tax-average-annual-returns.reducer.js","components/products/performance/ft-average-annual-total-returns/lib/average-annual-total-returns.reducer.js","components/products/performance/ft-backtested-performance-annualised/etf/ft-backtested-performance-annualised.js","components/products/performance/ft-backtested-performance-calendar/etf/ft-backtested-performance-calendar.js","components/products/performance/ft-backtested-performance-cumulative/etf/ft-backtested-performance-cumulative.js","components/products/performance/ft-calendar-year-returns/en-us-retail/ft-calendar-year-returns.js","components/products/performance/ft-calendar-year-returns/etf/ft-calendar-year-returns.js","components/products/performance/ft-calendar-year-returns/lib/calendar-year-returns.reducer.js","components/products/performance/ft-discrete-returns/lib/discrete-returns.reducer.js","components/products/performance/ft-performance-annualised/etf/ft-performance-annualised.js","components/products/performance/ft-performance-annualised/lib/performance-annualised.reducer.js","components/products/performance/ft-performance-cumulative/en-us-retail/ft-performance-cumulative.js","components/products/performance/ft-performance-cumulative/etf/ft-performance-cumulative-chart.js","components/products/performance/ft-performance-cumulative/etf/ft-performance-cumulative.js","components/products/performance/ft-performance-cumulative/lib/performance-cumulative.reducer.js","components/products/portfolio/config-loader/lib/config-loader.reducer.js","components/products/portfolio/ft-geographic-breakdown/en-us-retail/ft-geographic-breakdown.js","components/products/portfolio/ft-holdings/lib/holdings.reducer.js","components/products/portfolio/ft-portfolio-statistics-and-positions/en-us-retail/ft-portfolio-statistics-and-positions.js","components/products/portfolio/ft-statistics-and-positions/lib/statistics-and-positions.config.js","components/products/portfolio/ft-statistics-and-positions/lib/statistics-and-positions.js","components/products/portfolio/ft-statistics-and-positions/lib/statistics-and-positions.not.js","components/products/ppss/ft-find-a-fund/lib/find-a-fund.reducer.js","components/products/ppss/ft-ppss/lib/ppss.reducer.js","components/products/ppss/ft-ppss-performance/en-us-retail/ft-ppss-performance-row.js","components/products/ppss/ft-ppss-performance/en-us-retail/ft-ppss-performance.js","components/products/pricing/ft-pricing-at-nav/lib/pricing-at-nav.js","components/products/pricing-distribution/ft-pricing-distribution/lib/pricing-distribution.reducer.js","components/products/tax/ft-tax-information/lib/tax-information.js","components/products/tax/ft-tax-information/lib/tax-labels-reducer.js","components/marketing/lists/ft-document-lister/lib/gw/ft-document-lister.reducer.js","components/marketing/lists/ft-report-archive-a/lib/en-us-retail/report-archive-a.reducer.js","components/marketing/lists/ft-report-archive-a/lib/gw/report-archive-a.reducer.js","components/marketing/lists/ft-report-archive-b/lib/gw/report-archive-b.reducer.js","components/marketing/lists/ft-report-archive-b/lib/en-us-retail/report-archive-b.reducer.js","components/marketing/lists/ft-report-archive-c/lib/intl/report-archive-c.reducer.js","components/marketing/lists/ft-report-archive-d/lib/intl/report-archive-d.reducer.js","components/marketing/video/ft-video-switch/lib/gw/ft-video-switch.reducer.js","components/products/distributions/ft-distributions/lib/en-us-retail/caveats.reducer.js","components/products/distributions/ft-distributions/lib/en-us-retail/distribution-rate-at-breakpoint.reducer.js","components/products/distributions/ft-distributions/lib/en-us-retail/distribution-rate.reducer.js","components/products/distributions/ft-distributions/lib/en-us-retail/distributions-combine.reducers.js","components/products/distributions/ft-distributions/lib/en-us-retail/distributions-configuration.reducer.js","components/products/distributions/ft-distributions/lib/en-us-retail/distributions-first.reducer.js","components/products/distributions/ft-distributions/lib/en-us-retail/distributions-labels.reducer.js","components/products/distributions/ft-distributions/lib/en-us-retail/distributions-ytd.reducer.js","components/products/distributions/ft-distributions/lib/en-us-retail/seven-days-yield.reducer.js","components/products/distributions/ft-distributions/lib/en-us-retail/tax-equivalent-distribution-rate-nav-pop.reducer.js","components/products/distributions/ft-distributions/lib/en-us-retail/tax-equivalent-distribution-rate.reducer.js","components/products/distributions/ft-distributions/lib/en-us-retail/tax-equivalent-yield-state-city.reducer.js","components/products/distributions/ft-distributions/lib/en-us-retail/tax-equivalent-yield.reducer.js","components/products/distributions/ft-distributions/lib/en-us-retail/thirty-days-yield.reducer.js","components/products/distributions/ft-distributions/lib/en-us-retail/util.js","components/products/historical/ft-historical-average-annual-total-returns/lib/en-us-retail/historical-average-annual-total-returns.reducer.js","components/products/historical/ft-historical-cumulative-total-returns/lib/en-us-retail/historical-cumulative-total-returns.reducer.js","components/products/overview/ft-fund-information/lib/etf/fund-information.reducer.js","components/products/overview/ft-fund-information/lib/gw/fund-information.reducer.js","components/products/overview/ft-fund-static-bar/lib/en-us-retail/fund-static-bar.reducer.js","components/products/overview/ft-fund-trading-characteristics/lib/etf/fund-trading-characteristics.reducer.js","components/products/performance/ft-after-tax-average-annual-returns/lib/en-us-retail/after-tax-average-annual-returns.reducer.js","components/products/performance/ft-average-annual-total-returns/lib/en-us-retail/average-annual-total-returns.config.js","components/products/performance/ft-average-annual-total-returns/lib/en-us-retail/average-annual-total-returns.reducer.js","components/products/performance/ft-backtested-performance-annualised/lib/etf/backtested-performance-annualised.reducer.js","components/products/performance/ft-backtested-performance-calendar/lib/etf/backtested-performance-calendar.reducer.js","components/products/performance/ft-backtested-performance-cumulative/lib/etf/backtested-performance-cumulative.reducer.js","C:/dev/web-platform/src/components/products/performance/ft-calendar-year-returns/lib/en-us-retail/calendar-year-returns-labels.reducer.js","components/products/performance/ft-calendar-year-returns/lib/en-us-retail/calendar-year-returns.reducer.js","components/products/performance/ft-calendar-year-returns/lib/etf/calendar-year-returns.reducer.js","components/products/performance/ft-calendar-year-returns/lib/gw/calendar-year-returns.reducer.js","components/products/performance/ft-discrete-returns/lib/gw/discrete-returns.reducer.js","components/products/performance/ft-expenses-volatility-benchmarks/lib/en-us-retail/expenses-volatility-benchmarks.reducer.js","components/products/performance/ft-performance-annualised/lib/etf/performance-annualised.reducer.js","components/products/performance/ft-performance-annualised/lib/gw/performance-annualised.reducer.js","components/products/performance/ft-performance-cumulative/lib/en-us-retail/performance-cumulative.reducer.js","components/products/performance/ft-performance-cumulative/lib/etf/performance-cumulative.reducer.js","components/products/performance/ft-performance-cumulative/lib/gw/performance-cumulative.reducer.js","components/products/portfolio/ft-asset-class-exposure/lib/en-us-retail/asset-class-exposure.config.js","components/products/portfolio/ft-asset-class-exposure/lib/en-us-retail/asset-class-exposure.reducer.js","components/products/portfolio/ft-asset-mix/lib/en-us-retail/asset-mix.js","components/products/portfolio/ft-commodities-sector-breakdown/lib/en-us-retail/commodities-sector-breakdown.config.js","components/products/portfolio/ft-commodities-sector-breakdown/lib/en-us-retail/commodities-sector-breakdown.reducer.js","components/products/portfolio/ft-credit-quality-exposure/lib/en-us-retail/credit-quality-exposure.reducer.js","components/products/portfolio/ft-coupon-rate-breakdown/lib/en-us-retail/coupon-rate-breakdown-labels.reducer.js","components/products/portfolio/ft-coupon-rate-breakdown/lib/en-us-retail/coupon-rate-breakdown.reducer.js","components/products/portfolio/ft-currency-distribution/lib/en-us-retail/currency-distribution.config.js","components/products/portfolio/ft-currency-distribution/lib/en-us-retail/currency-distribution.reducer.js","components/products/portfolio/ft-fixed-income-sector-breakdown/lib/en-us-retail/fixed-income-sector-breakdown.config.js","components/products/portfolio/ft-fixed-income-sector-breakdown/lib/en-us-retail/fixed-income-sector-breakdown.reducer.js","components/products/portfolio/ft-geographic-allocation/lib/etf/geographic-allocation.reducer.js","components/products/portfolio/ft-geographic-breakdown/lib/en-us-retail/geographic-breakdown.reducer.js","components/products/portfolio/ft-geographic-breakdown/lib/gw/geographic-breakdown.reducer.js","components/products/portfolio/ft-geographic-exposure/lib/en-us-retail/geographic-exposure.js","components/products/portfolio/ft-holdings/lib/etf/holdings.reducer.js","components/products/portfolio/ft-manager-roster/lib/en-us-retail/manager-roster.reducer.js","components/products/portfolio/ft-market-capitalisation/lib/etf/market-capitalisation.reducer.js","components/products/portfolio/ft-market-capitalisation/lib/gw/market-capitalisation.reducer.js","components/products/portfolio/ft-maturity-breakdown/lib/en-us-retail/maturity-breakdown-labels.reducer.js","components/products/portfolio/ft-maturity-breakdown/lib/en-us-retail/maturity-breakdown.reducer.js","components/products/portfolio/ft-portfolio-statistics-and-positions/lib/en-us-retail/portfolio-statistics-and-positions.reducer.js","components/products/portfolio/ft-portfolio-statistics-and-positions/lib/gw/portfolio-statistics-and-positions.reducer.js","components/products/portfolio/ft-quality-breakdown/lib/en-us-retail/quality-breakdown.js","components/products/portfolio/ft-sector-allocation/lib/etf/sector-allocation.reducer.js","components/products/portfolio/ft-sector-breakdown/lib/en-us-retail/sector-breakdown.js","components/products/portfolio/ft-sector-exposure/lib/en-us-retail/sector-exposure.reducer.js","components/products/portfolio/ft-strategy-breakdown/lib/en-us-retail/strategy-breakdown-labels.reducer.js","components/products/portfolio/ft-strategy-breakdown/lib/en-us-retail/strategy-breakdown.reducer.js","components/products/portfolio/ft-top-exposures/lib/en-us-retail/top-exposures-labels.reducer.js","components/products/portfolio/ft-top-exposures/lib/en-us-retail/top-exposures.reducer.js","components/products/portfolio/ft-top-ten-holdings/lib/en-us-retail/top-ten-holdings.reducer.js","components/products/ppss/ft-find-a-fund/lib/en-us-retail/find-a-fund.reducer.js","components/products/ppss/ft-ppss/lib/en-us-retail/ppss.reducer.js","components/products/ppss/ft-ppss/lib/etf/ppss.reducer.js","components/products/ppss/ft-ppss/lib/gw/ppss.reducer.js","components/products/pricing/ft-daily-prices-and-breakpoints/lib/en-us-retail/daily-prices-and-breakpoints.js","components/products/pricing/ft-pricing-at-nav/lib/en-us-retail/pricing-at-nav-labels.js","components/products/pricing/ft-pricing-at-nav/lib/en-us-retail/pricing-at-nav.js","components/products/pricing-distribution/ft-pricing-distribution/lib/etf/pricing-distribution.reducer.js","components/products/pricing-distribution/ft-pricing-distribution/lib/gw/pricing-distribution.reducer.js","components/products/tax/ft-additional-tax-information/lib/en-us-retail/additional-tax-information.js","components/marketing/common/elements/ft-multi-select-bar/lib/gw/ft-multi-select-bar.reducer.js","components/marketing/common/elements/ft-type-ahead-search/lib/gw/ft-type-ahead-search.reducer.js"],"names":["debug","testing","cssRoot","ComponentBase","logger","getLogger","constructor","name","getLabel","labelId","label","undefined","error","get","currencyConfigs","Map","symbol","decimalPlaces","PAGE_JSON_CLASS","DataService","http","beansConfiguration","restApi","_cache","_preloaded","_postProcessor","_preloadFromPage","getBean","bean","url","bid","cid","getRestUrl","getBeanFromUrl","Promise","resolve","fetch","credentials","then","_checkStatus","json","_postProcess","data","getBeans","beans","all","map","response","status","Error","statusText","pageJsonNodes","document","getElementsByClassName","i","length","JSON","parse","innerHTML","params","beanId","getRestUrlFromPageJson","general","state","action","type","getPagingInfo","totalRecords","pageSize","pageNumber","hasRecords","totalPages","Math","ceil","pages","Array","from","notUsed","index","_pageDetails","firstPage","previousPage","nextPage","lastPage","currentPage","firstRecord","lastRecord","page","startRecord","endRecord","min","ReduxComponentBase","store","dispatch","mapState","subscribe","newState","getState","populateData","products","app","currentFundId","fundId","RestApi","beanConfig","site","segment","getUrlBase","parameters","amp","forEach","paramName","varName","FundID","value","key","createCompare","dataKey","direction","options","dir","isNumeric","_createNumericCompare","secondaryCompare","isDate","_createDateCompare","dateFormat","_createStringCompare","a","b","aParsed","bParsed","parseFloat","replace","isNaN","dashes","aVal","bVal","result","localeCompare","includes","format","valueOf","simulateInputChange","wait","getJSONFixture","element","dispatchEvent","createCustomEvent","bubbles","setTimeout","delay","filename","async","responseJSON","configure","config","globalResources","commonConfigure","getInitialState","warnings","wForgottenReturn","aurelia","use","components","siteConfig","getElementById","getAttribute","developmentLogging","defaultBindingLanguage","defaultResources","eventAggregator","feature","plugin","dataService","reducers","container","registerInstance","component","labels","portfolioConfiguration","start","enhance","_getSegment","_parseUrlQuery","window","location","search","path","pathname","user","loggedIn","actor","actorPub","currentShareClass","distributions","visibleElementLevel","visibleElementLevelCaveats","holdings","paging","fields","searchString","sort","columns","modal","ppss","showPerformanceTab","showEtfTab","showFundIdentifiersTab","showYieldTab","showRatingsTab","showPerformanceToggle","showSalesChargeToggle","showExpensesAndSalesInfo","showFavorites","showPeriodEnd","showMorningStarColumn","showTer","showOngoingCharges","performanceViewOptions","labelKey","fundIdentifiers","allFundIdentifiers","allDropdowns","selected","currentTable","display","performanceView","includeSalesCharges","periodEnd","filters","dropdowns","baseDataKey","secondary","performance","averageAnnualTotalReturns","currentTab","afterTaxAverageAnnualReturns","performanceCumulative","pricingDistribution","showHighLowOnDate","dateRangeOptions","selectedDateRange","datePickerFormat","funds","marketing","grid","defaults","cardsPerPage","numVisibleCards","showViewToggle","currentView","grids","queryString","hash","hashes","slice","split","decodeURIComponent","sKey","defaultSegment","cookie","RegExp","encodeURIComponent","httpLogger","x","withInterceptor","request","message","method","requestError","responseError","getMiddleware","middleware","beanMiddleware","push","reduxLogger","crashReporter","next","Object","assign","catch","e","err","portfolio","geographicAllocation","performanceSimply","portfolioHoldings","portfolioMarketCapitalisation","portfolioSectorAllocation","backtestedPerformance","fundInformation","fundOverview","specific","assetMix","couponRateBreakdown","dailyPricesAndBreakpoints","geographicExposure","geographicBreakdown","pricingAtNav","portfolioStatisticsAndPositions","assetClassExposure","currencyDistribution","commoditiesBreakdown","creditQualityExposure","fixedIncomeSectorBreakdown","historicalPerformance","managerRoster","maturityBreakdown","qualityBreakdown","sectorExposure","strategyBreakdown","sectorBreakdown","tax","topTenHoldings","topExposures","overview","reportArchiveA","reportArchiveB","usProductReducers","usMarketingReducers","initialState","favorites","keywords","searchKeys","set","portfolioBreakdown","portfolioGeographicalBreakdown","shareClassLinkListenerCustomAttribute","Element","queryStringToJSON","href","param","stringify","currentPath","currentQueryObject","storeFundId","storeShareClass","newFundId","newShareClass","newHref","FtBarChart","dataChanged","updateChart","suffix","prefix","_self","chart","colorByPoint","colors","tooltip","formatter","point","series","color","Highcharts","numberFormat","y","xAxis","enabled","yAxis","title","useHTML","legend","align","verticalAlign","layout","symbolRadius","itemHoverStyle","cursor","plotOptions","events","legendItemClick","dataLabels","inside","style","fontWeight","textTransform","opacity","textOutline","FtChart","newChartOnUpdate","defaultOptions","credits","exporting","text","attached","newOpts","mergeOptions","_getSeriesAsArray","$","attrchange","trackValues","callback","newSeriesArr","destroy","update","s","setData","shift","remove","addSeries","optionsChanged","seriesChanged","FtColumnChart","categories","ytitle","ytitleEnabled","animation","duration","easing","FtInfoModal","show","contents","FtPieChart","pie","allowPointSelect","size","innerSize","FtFilterValueConverter","toView","items","filter","item","FtLengthValueConverter","FtSortValueConverter","desc","sorted","FtTypeAheadFilterValueConverter","toLowerCase","isin","wkn","combineMarketingReducers","marketingReducers","reduce","prev","reducer","caveatsReducer","elementLevel","caveats","elementLevelCaveats","val","secName","section","eleName","order","v","combineProductsReducers","productsReducers","productSpecificData","configurationLoader","rawConfig","getETFConfig","labelLoader","rawLabel","keys","getLabels","extractLabels","lSource","newLabels","allFlag","indexOf","toString","stateLabels","hasOwnProperty","getFundState","productConfiguration","POPULATE_DISTRIBUTIONS_CONFIGURATION_INDEX","_populate","configuration","provider","navDirection","navChangeClass","getUniqOptions","formatCusip","formatCurrency","formatDateToDay","parsed","property","fund","cusip","substring","currency","useDash","stripped","currencyConfig","round","toFixed","match","TopLevelProductComponentBase","_update","subState","selectState","FtPpssTableBase","changeSort","columnName","find","groupedFunds","investmentVehicle","isMoneyFund","moneyFunds","otherFunds","FtPpssTableRowBase","FtCarouselNavigation","carousel","leftLinkText","rightLinkText","image","linkTextAfter","slide","linkTextBefore","getSlidesTitle","carouselTitlesArr","carouselTitles","getNextSlideNumber","currentSlideTitle","slideNr","carouselTitle","getNextSlide","slideNR","nrOfSlides","nextSlideNR","parseInt","getPrevSlide","prevSlideNR","FtCarousel","numberOfSlides","carouselNode","id","bind","relatedTarget","nextSlide","prevSlide","slides","imageL","imageR","FtDateDropdown","startDateChanged","startDate","endDate","endYear","startYear","yearAry","monthsMap","availableMonths","makeYear","obj","year","availableYears","yearChange","clicked","submitType","selectedYr","month","selectedMnth","info","populated","FtDatepicker","dp","datepicker","on","target","detached","off","opts","FtHistoricalModal","FtLabel","labelChanged","FtLabelLoader","fundState","FtModal","langLabels","externalModalLabels","externalopen","link","content","footer","ok","open","footerModal","FtOwlTabbed","owlTabbedNode","owlTabbed","removeActiveFromOWL","owlTabbedOBJ","activeLI","removeClass","removeActiveFromRole","presentationTab","tabDirectionMove","activeTab","activeTabName","activeTabNR","tabOperator","directTabName","owlCarousel","loop","margin","responsiveClass","navElement","navText","itemElement","touchDrag","mouseDrag","responsive","dots","nav","onInitialized","onResized","trigger","tabLinks","owlDotsNav","click","prevTab","nextTab","activatedTab","activatedTabLink","FtModalInline","setLabels","transitioning","fromState","marketingLabels","modalInlineLabels","openModal","ftModal","FtOwlCarousel","owlCarouselNode","FtPrefixOrDash","prefixed","valChanged","FtSpinner","FtThSortable","FtShareClassFilter","changeFund","newID","newClass","shareClass","html","append","currentURL","trimmedURL","newURL","history","pushState","FtFormatGridCellValueConverter","urlKey","endsWith","FtGridFilter","cards","gridFilter","cardElements","cardsNode","querySelectorAll","cardData","_parseCard","card","parentNode","removeChild","configNode","getElementsByTagName","configData","textContent","idx","c","classes","className","cls","join","trim","defaultOrder","attributes","att","nodeName","linkAttribute","linkAtt","nodeValue","loadMore","_createFilterFunction","_createSortFunction","showLoadMoreBtn","activeDropdowns","d","toUpperCase","yearDropdowns","dropdownResult","dropdown","yearDropdownResult","parsedDate","diff","sortColumn","col","showGridView","FtGridFilterDropdown","selectedChanged","newValue","oldValue","FtGridFilterForm","changeView","view","FtChooseSubscriptionStep1","docsList1Selected","docsList2Selected","openModal1","modal1","openModal2","modal2","countSelected","docsList1","isSelected","docsList2","FtChooseSubscriptionStep2","FtChooseSubscriptionStep3","FtChooseSubscription","step","clear","step1vm","isChecked","formData","email","subscribe1","subscribe2","back","submit","body","subscriptions","concat","FtStickyTabsContent","tab","isAttached","registerContent","FtStickyTabsLabel","registerLabel","go","goTo","FtStickyTabs","doRegisterContent","doRegisterLabel","doGoTo","offset","addEventListener","doScrollChecks","xstest","offsetHeight","tabBar","tabBarContainer","getBoundingClientRect","top","classList","add","height","bottom","active","removerEventListener","documentElement","currentOffset","scrollTop","FtDocumentListerCell","bindingEngine","passOnSelected","cell","onSelected","registerItem","dropdownItems","registerCellItem","ddLeft","ddTop","registerCell","toggleDropdown","left","ddButton","ddWidth","offsetWidth","FtDocumentListerDynamicLink","onSelect","stopImmediatePropagation","FtDocumentListerGroupRow","row","registerRowItem","registerRow","FtDocumentListerGroup","group","rows","registerGroupRow","code","registerGroup","FtDocumentListerLink","distribution","FtDocumentListerMobileLink","FtDocumentLister","links","filterFromParams","setFilters","registerMobileItem","groups","groupsCount","groupsCountVisible","registerDropdown","toggleSelectMultiple","selectMultiple","filterSelected","saveView","cols","showColRetailFactsheet","showColKIID","showColSID","showColProspectus","showColAnnualReport","showColSemiAnnualReport","showColFundHolds","showColAdvisorFactsheet","showColManagerCommentary","colsList","urlWithParems","filterName","filterShareClass","filterVehicle","filterDistribution","filterCurrency","callSubscribe","callEmailSelected","callDownload","resetFilters","filterFund","showReset","fundCategory","random","validCurrencyLinks","validShareClassLinks","validDistributionLinks","checkRows","showSelectMultiple","showSaveView","showSubscribe","showEmailSelected","showDownload","mobileLinks","getParameterByName","columnsToShow","columnsToShowArray","ftDocumentListerLabels","ready","regex","results","exec","FtReportArchiveA","loading","dataSourcePath","onSelectDocument","doSelectDocument","onSelectFund","doSelectFund","reportArchiveALabels","typeAheadData","reportsArchiveTypeAhead","fundID","fundName","load","flatMap","documents","onChoose","FtReportArchiveB","reportArchiveBLabels","reportsArchiveYears","selectedYear","doYearChange","FtReportArchiveC","extension","FtReportArchiveD","FtVideoSwitch","videoData","languages","currentLanguage","dropdownOpen","transcriptUrl","ftVideoSwitch","changeLanguage","language","currentVideo","videoElements","videosNode","_parseVideo","video","vid","out","showLanguageDropdown","showElement","fundConfigData","elementID","fundCat","suppressElementsByFund","Number","suppressElementsByCategory","countObj","objectReduce","getCaveats","obiectToCount","objVal","obiectToReduce","reduction","tableDataLenght","obiectReduced","CVO","elementLevelTab","elementLevelVal","elementLevelCaveatsTab","elementLevelTabVal","elementLevelCaveatsVal","tempLevelCaveatsTab","iterator","FtDashIfEmptyValueConverter","String","FtFormatCurrencyValueConverter","FtFormatPercentValueConverter","FtNormalizeSpaceValueConverter","FtRangeWithPercentValueConverter","FtWithDollarOrDashValueConverter","tempVal","FtWithPercentOrDashValueConverter","FtDistributionRateAtBreakpoint","FtDistributions","lgColWidth","colWidth","proximity","displayDistributionRateAtBreakpoint","dividendDistributionTypeLabel","dividendDistributionSchedule","capitalGainsDistributionSchedule","ratesYieldsData","rateAtBreakpointData","FtRatesAndYields","shouldDisplay","ratesAndYieldsHeading","isAllowedInConfig","categoryBlockedByUser","fundBlockedByUser","FtYieldRows","_displayMoreThanOneRow","displayMoreThanOneRow","date","displayEmpty","FtDistributionsYtd","historicalDataUrl","displayDistributionsTable","ytdDetail","displayDistributionsTableForMoneyFunds","displayNoDistributions","FtHistoricalAverageAnnualTotalReturns","taxYear","performanceHistory","chartCategories","chartItems","chartData","chartType","aryChartData","thisChartItem","FtHistoricalCumulativeTotalReturns","historicalCumulativeTotalReturns","FtFundInformation","portfolioBeans","FtFundMmfrStableNavHeader","FtFundPriceHeader","FtFundStaticBar","fundStaticBar","FtFundTradingCharacteristics","fundOverviewBeans","FtFundNavHeader","FtAfterTaxAverageAnnualReturns","tabs","ariaControl","isActive","afterTaxBeans","changeTab","getChartColorStyle","componentHeading","readImportant","dataTab","chartDataME","MonthlyGraph","chartDataQE","QuarterlyGraph","FtAverageAnnualTotalReturns","performanceBeans","FtCalendarYearReturns","calendarYearBeans","calendarYearReturns","tableData","calData","dateGroup","years","FtDiscreteReturns","discreteBeans","discreteReturns","calDataRev","chartDataRev","FtExpensesVolatilityBenchmarks","FtPerformanceAnnualised","currentChunkyMonthyTab","chunkyMonthyTabs","chartOptions","chunky_tab","changeChunkyMonthyTab","performanceAnnualised","tableHeaders","navDate","performances","graphData","FtPerformanceCumulativeChart","perfCumChartOptions","fillOpacity","marker","seriesNameChanged","navDecimalChanged","prefixChanged","graphNames","chartSerieses","chartIndex","thisSeries","thisObj","pointFormat","valueDecimals","navDecimal","valuePrefix","FtPerformanceCumulative","currentYearGroupTab","yearGroupTabs","chartYear","year_tab","changeYearGroupTab","FtAssetClassExposure","FtAssetMix","FtCategoryFundList","signaler","assetClass","_findFund","signal","wanted","rObj","fundLegalName","FtCommoditiesSectorBreakdown","commoditiesSectorBreakdown","FtCreditQualityExposure","FtCouponRateBreakdown","FtCurrencyDistribution","FtFixedIncomeSectorBreakdown","FtGeographicAllocationRow","toggleExpanded","subItems","visible","range","FtGeographicAllocation","currentState","portfolioComponent","expandAll","table","collapseAll","FtGeographicBreakdown","showChart","spanRow","FtGeographicExposure","series1","series2","FtHoldings","goToPage","currentPageNumberChanged","searchStringChanged","newSearchString","holdingsAppState","holdingsAsOfDate","asOfDate","downloadLink","showNotionalValue","allHoldings","holdingsList","pagingInfo","currentPageNumber","holding","recordNumber","success","field","values","FtManagerAllocationContents","FtManagerNameOrModal","FtManagerRosterContents","FtManagerRoster","groupedData","FtMarketCapitalisation","marketCapitalisation","FtMaturityBreakdown","FtPortfolioStatisticsAndPositions","FtQualityBreakdownTable","total","alt","FtQualityBreakdown","FtSectorAllocation","sectorAllocation","FtSectorBreakdown","FtSectorExposure","sectors","expandAllSector","collapseAllSector","toggleSector","sector","totals","FtStatisticsAndPositions","portfolioStatPos","FtStrategyBreakdown","FtTopExposuresDisplay","FtTopExposures","dataLong","dataShort","showLong","showShort","dataLongChart","dataShortChart","FtTopTenHoldings","exports","portfolioUtils","getExtractFormattedValues","valueMap","keepUnavailableValues","validData","isValid","getSubSetData","list","workObj","subObj","splitObject","workVal","workLabel","getSectorBreakdownNegatives","lstDtls","negative","getSectorBreakdownTotalizer","subTotal","getIntlSectorBreakdownTotalizer","findObjInArray","_array","findHoldingObj","buildSingleSeriesSectorBreakdownChartData","chartSrc","tempObj","getSectorBreakdownProximity","rawPortfolio","impLegalInfo","displayLegalInfo","getProximity","getHolding","source","rawHoldings","findGrade","detail","getGrades","objArray","empty","srcObj","newObj","getSimplifiedBreakdown","doChart","wantRange","o","buildBreakDownTable","etfMode","valStd","buildAllocationChart","wantRank","rank","buildBreakdownChart","sortBreakdown","getSimplifiedBreakdownV2","breakdown","minAmount","workLstDtls","compObj","calType","getIntlSimplifiedBreakdown","getEtfSimplifiedBreakdown","etfOptions","rawLabels","getConfig","showTemp","spanTemp","hyphenCase","str","hyphenRegex","processAllocationData","workArray","hypName","rollupLevel","hypRange","subItem","type2Obj","rankInt","typeZeroObj","buildAllocationComponent","breakddown","hasChildren","splitSuppressionSets","rawSet","fieldsToSplit","fixConfigSets","rawActor","splitable","workingSuppressionSet","haveSuppressionSets","isArray","suppressionSets","suppressionSet","configBlock","portfolioConfig","configSection","checkSuppression","suppressed","actorId","actorSet","portfolioComponents","assetClasses","FtFindAFund","FtPpss","productPageUrl","ppssBeans","ppssAppState","morningstarAsOfDate","fundCategoryAsOfDate","distRateNavAsOfDate","standardYieldAsOfDate","standardYieldAsOfDateMoneyFund","ytdAsOfDate","navAsOfDate","navAsOfDateMonth","navAsOfDateQuarter","_createFilterConfig","filterOptions","performanceDataSets","performanceDataSet","_calcDataKey","selectedVal","fundVal","searchKey","FtPpssEtfRow","FtPpssEtf","FtPpssFavorite","FtPpssDropdown","optionMatcher","allOption","option","FtPpssFundFilter","FtPpssFundIdentifiersRow","FtPpssFundIdentifiers","FtPpssFundName","expanded","FtPpssPerformanceRow","avgAnn1YearReturnMonthly","avgAnn1YearReturnQuarterly","calendarYear1yrReturnMonthly","calendarYear1yrReturnQuarterly","cumulativeRetYtdMonthly","cumulativeRetYtdQuarterly","discreteAnnual1yrMonthly","discreteAnnual1yrQuarterly","avgAnn3YearReturnMonthly","avgAnn3YearReturnQuarterly","calendarYear2yrReturnMonthly","calendarYear2yrReturnQuarterly","cumulativeRet1yrMonthly","cumulativeRet1yrQuarterly","discreteAnnual2yrMonthly","discreteAnnual2yrQuarterly","avgAnn5YearReturnMonthly","avgAnn5YearReturnQuarterly","calendarYear3yrReturnMonthly","calendarYear3yrReturnQuarterly","cumulativeRet3yrMonthly","cumulativeRet3yrQuarterly","discreteAnnual3yrMonthly","discreteAnnual3yrQuarterly","avgAnn10YearReturnMonthly","avgAnn10YearReturnQuarterly","calendarYear4yrReturnMonthly","calendarYear4yrReturnQuarterly","cumulativeRet5yrMonthly","cumulativeRet5yrQuarterly","discreteAnnual4yrMonthly","discreteAnnual4yrQuarterly","calendarYear5yrReturnMonthly","calendarYear5yrReturnQuarterly","cumulativeRet10yrMonthly","cumulativeRet10yrQuarterly","discreteAnnual5yrMonthly","discreteAnnual5yrQuarterly","calendarYear6yrReturnMonthly","calendarYear6yrReturnQuarterly","avgAnnSinceIncReturnMonthly","avgAnnSinceIncReturnQuarterly","cumulativeRetIncMonthly","cumulativeRetIncQuarterly","FtPpssPerformance","isAvailableDataset","dataset","findIndex","ds","startsWith","changePeriodEnd","srcElement","FtPpssRatings","FtPpssSearchBox","FtPpssTabHeader","getPerformanceViewClass","performanceViewChanged","includeSalesChargesChanged","cumulativeSelected","discreteSelected","count","FtPpssTableToolbar","FtPpssYieldRow","isValidYieldData","distRateAtPop","distRateAtNav","secYieldWoWvr","secYield","current7DayYieldWoWvr","current7DayYield","effective7DayYieldWoWvr","effective7DayYield","FtPpssYield","hasOnlyMoneyFunds","FtDailyPricesAndBreakpoints","has50Break","parseBrkptString","prices","FtPricingAtNavChart","pricingDefaultOptions","seriesName","FtPricingAtNav","FtDividends","dividendShareClasses","some","sc","FtDividendsHistorical","accordionOpen","uniqueId","componentCount","toggleAccordion","dividendHistory","dividendYears","dividendHistoryByYear","historicalDividends","pdData","dividends","downloadParams","query","FtNavHighLow","FtPriceChart","getOptionClass","opt","disabled","changeDateRange","pdDataChanged","fromDate","toDate","fromDateChanged","_customDateRange","toDateChanged","currencySymbol","tickInterval","minorTickInterval","opposite","shared","navHistory","nh","valueSuffix","navChangePercent","FtPricingDistribution","_getCurrentShareClass","shareClasses","dividend","dividendAsOfDate","_getNavHistory","navHist","newOpt","allHistory","isBetween","datePickerFromOpts","minDate","maxDate","datePickerToOpts","navHistory1M","navHistory3M","navHistory6M","navHistory1Y","navHistory3Y","navHistory5Y","shareClassKey","primaryShareClass","FtSharePrices","navChangeDirection","FtAdditionalTaxInformation","taxBeans","additionalTaxInformation","FtTaxInformation","onChangeTaxYear","newTaxYear","taxInformation","dateDropdownReducer","historical","selectedMonth","modalReducer","labelData","beanLabelData","close","header","modalInlineReducer","beanData","editSelectedDocumentsText","emailSelectedDocumentsText","downloadSelectedDocumentsText","fromNameText","removeRecipientText","recipientNameText","recipientEmailText","addRecipientText","messageLabel","yourDocumentsSentText","backLabel","continueLabel","sendLink","shareClassFilterReducer","FtGateway","httpClient","validForm","username","password","css","gateway","form","event","showModalEvent","autoLaunch","showModal","updateValues","autoSubmit","selectedSegment","preventDefault","updateModal","submitForm","clearErrorFlags","validateForm","validCredentials","loginRequired","authorizeUrl","headers","usernameEmptyError","passwordEmptyError","loginError","bValid","termsRequired","termsAgreed","termsAgreedError","setSegment","resetValues","tabChanged","selectedSegmentLabel","attr","FtMultiSelectBar","openModel","marketingInlineLabels","modalTitle","stage","newEmail","toEmails","ftMultiSelectBar","addEmail","removeEmail","splice","toggle","send","hasError","from_error","download","closeModal","FtResponsiveTableFlowDocument","FtResponsiveTable","FtTypeAheadSearch","showTypeAhead","ftTypeAheadSearch","focus","select","loadMoreLink","displayLabel","gridLabel","listLabel","newConfig","gridFilters","gridColumns","optionsInData","configOpt","dataOpt","currentFilter","totalCards","newSortColumn","gridFilterForm","FtCaveats","FtFootnote","htmlElement","footnotes","visibleElementLevelChanged","k","_isVisible","htmlEl","FtLabels","FtProximal","visibleProximity","cssClass","sectionChanged","updateVisibleProximity","proximityChanged","caveat","historicalAverageAnnualTotalReturns","FtBacktestedPerformanceAnnualised","FtBacktestedPerformanceCalendar","FtBacktestedPerformanceCumulative","bmCalYearDetHeader","fundAnnualReturnsVO","tableDataReduced","fundAnnualReturnsVORevSorted","category","hypotheticals","defineProperty","configurable","isInteger","statisticsAndPositionsConfig","default","statisticsAndPositions","statPositionsData","_populateStatPositions","_portfolioStatsCaveatsBuilder","_portfolioStatsCaveatsLabels","_showLabelsIfEmpty","_getRawStat","_getStat","rStr","wantedVal","_buildStatistics","Option","_processStatistics","rawData","stats","footnote","check","showExtra","showPercent","extra","millions","showNetAssets","returnData","stat","Value","showLabel","_populatePortfolioPositions","idList","returnArray","statTypes","fundCategoryAlternative","fundCategoryMoneyFunds","rawFundOverview","rawFundInfo","fundInfo","overviewPath","rawStats","fundShareClass","showLabelsIfEmpty","displayStatus","displayHistoricalDataLink","displayPositionsNotAvail","TNBP","TNCP","TNEP","TNI","TNP","rawStatistics1","rawStatistics2","statistics1","statistics2","pfPosAsOf","showPositions","positions","caveatSecName","describe","it","oldState","expect","toBe","done","stuff","toBeTruthy","toBeFalsy","afterAll","findAFund","keywordsFilter","ytdTotalReturnAtNav","avgAnn1YearReturnMonthlySc","avgAnn1YearReturnQuarterlySc","avgAnn3YearReturnMonthlySc","avgAnn3YearReturnQuarterlySc","avgAnn5YearReturnMonthlySc","avgAnn5YearReturnQuarterlySc","avgAnn10YearReturnMonthlySc","avgAnn10YearReturnQuarterlySc","avgAnnSinceIncReturnMonthlySc","avgAnnSinceIncReturnQuarterlySc","rangeOpts","selectedDateRangeName","taxData","taxYears","_taxInformationData","_taxCaveatsBuilder","fundTaxInfo","usefulstuffProvider","taxYearDatum","fundType","dailyAccrualFlag","federalId","currentMonth","taxYearYears","firstColumnLabel","distroDet","displayYearEndMessage","currentDisplayYear","secNames","yearEndMessage","firstColumnFootnote","yearTotals","tolDistTotal","ordDvdndTotal","longTrmCapGainsTotal","taxExmpIncmTotal","nonTaxRtnCptlTotal","qlfdDvdndIncmTotal","taxCaveats","taxLabels","_taxLabelsBuilder","taxInformationLabels","ftDocumentLister","otherLabel","noresults","fundtitle","otherColumns","rowCols","column","doc","searchFundKeyword","onOffToggle","onState","offState","reportArchiveBData","reportArchiveC","reportArchiveD","transcriptLabel","brightcoveVideoDirectLink","brightcoveVideoEmbedCode","brightcoveVideoFacebookAlt","brightcoveVideoLinkedinAlt","brightcoveVideoModalCloseAlt","brightcoveVideoPlayAlt","brightcoveVideoShareLink","brightcoveVideoTwitterAlt","cvts","Set","pageLevel","productsVO","caveatvo","fundOverviewVO","t","cvt","distributionRateAtBreakpoint","isPartial","breakpointData","distributionVO","distBrkPtVO","brkPtDate","isShowPricingScheduleLessThan50k","pricingSchedule","isShowPricingScheduleAt100k","rateAt50K","rateAt100K","rateAt250K","rateAt500K","rateAt1000K","rateAtNav","distributionRate","distributionsInfo","distInfoVO","distNav","distType","distPop","atNav","atPop","caveatSection","caveatElement","showAsOf","updateSchedule","distributionsCombineReducers","distributionDataReducers","global","distributionsFirst","distributionsConfig","dvndDistSchd","dividendDistributionType","dvndDistType","fndCategory","userConfig","_setUserConfiguration","pricingStructure","isTaxFree","inceptionDate","isClosed","chargesPath","salesCharges","thirtyDaysStandardYieldAvailable","di","wSalesEqualswoSales","_getDividendDistributionTypeLabel","cptgnDistSchd","tooOldData","_tooOldData","thirtyDayStandardizedDataTimeframe","displayNavPop","hideDistributionForCategory","hideDistributionForFund","displayMonthlyDiv","displayQuarterlyDiv","displaySemiAnnuallyDiv","displayAnnuallyDiv","numberOfDays","distInfo","yieldDateStr","yieldDate","Date","dateXDaysAgo","setDate","getDate","distributionsLabels","distributionsYtd","hasYtdDetail","dtl","flag","isEstimate","distAmt","distTypeKey","cellClass","recdDt","alt2","exDt","monthName","monthNumber","distTypeSort","pyblDt","reInvstAmt","reInvstDt","mnths","mnth","m","details","textA","textB","displayMonthHeader","sevenDaysYield","wWaiver","woWaiver","wWaiverEff","woWaiverEff","value2","taxEquivalentDistributionRateNavPop","_displayValue","taxEquivalentDistributionRate","taxEquivalentYieldStateCity","taxEquivalentYield","thirtyDaysYield","showAsOfForDistributionRate","displayValue","ignore30days","ignoreTooOldData","historicalModalData","_getHistoricalAATRData","_averageAnnualTotalReturnsLabels","performanceHistorical","PVO","performanceDetails","_performanceDetailsBuilder","bmkDME","theseLabels","averageAnnualTotalReturnsMonthEnd","averageAnnualTotalReturnsBmkMonthEnd","_getBenchmarkReturnDetailsObj","showBenchmark","asofDateME","asofDateBMME","now","fundInfoPath","fundInceptionDate","configFile","blendedBmCountMonthEnd","_countHybrids","benchmarkCountMonthEnd","showOnlyblendedBmMonthEndChart","showMonthEndBM","tempChart","_buildGraph","suppressFundWithSalesCharge","additionalFundRows","_buildFundTable","showTheseBenchmarks","additionalBenchmarkRows","_buildBenchmarkRows","chartDates","asofDate","asofDateBM","chartName","averageAnnualTotalReturnsBmk","showOnlyblendedBmChart","blendedBmCount","benchMarkOrder","hideRow","thisBenchmark","shownRows","benchmarks","hybrids","benchmark","hybridFlag","aatr","fundTableType","fundTable","oneYear","threeYears","fiveYears","tenYears","sinceInception","showBenchmarks","benchMarks","thisGraph","fundWO","rtnWOSCOneYear","rtnWOSCThreeYears","rtnWOSCFiveYears","rtnWOSCTenYears","rtnWOSCSinceInception","benchmarkNumber","benchMarkName","oneYrRtn","threeYrRtn","fiveYrRtn","tenYrRtn","deets","where","deetsAry","deet","metaDeet","colourCode","thisDetail","shinyNewObj","newPerformanceDetails","performanceDetail","newPDType","fundPerfRtnDetlsVO","performanceLabels","historicalCTRData","_getHistoricalCTRData","_historicalCTRLabels","cumulativeTotalReturnsMonthEnd","cumulativeTotalReturnsBmkMonthEnd","suppressors","fundDates","cumulativeTotalReturns","ytd","bmks","ytdRtn","cumulativeLabels","_infoBuilder","_extractDividendInfo","fundDetailIntl","rawPricesDetails","dividendMap","shClsDetArray","firstShClsDet","pricesDetails","_extractSalesCharges","salesMap","_extractFundInformation","subSetList","shareClassList","rawFundDetail","rawPriceInfo","tableID","expAsOfDt","baseCurrency","salesAsOf","dividendAsOf","dividendValues","distributionYieldAsOf","distributionYield","labelsArray","etfLabels","getEtfLabels","wantedOverRide","additionalLabels","splitData","_getFundStaticBarData","_getLabels","_getOverviewProximity","finder","matchMaker","getOverviewHeaderLeftClass","rVal","getHeaderTemplatePicker","getlegalBalanceClass","getOverviewPricingSettings","headerTemplate","headerLabel","rawFundConfig","pricingAvailable","priceObj","nvc","fundStaticBarSettings","leftWidth","ytdWidth","overviewHeaderLeftClass","legalBalanceContainer","overviewPricingSettings","navHeader","pricenav","pricenavfourdeci","nvcBool","navdate","fundTradingCharacteristics","sharesOutstanding","_getAfterTaxData","_getAfterTaxReturnLabels","_getPerformanceDetails","MONTHLY","_getPerformanceDetailsME","QUARTERLY","_getPerformanceDetailsQE","MonthlyTab","_tabData","QuarterlyTab","_getchartData","_getAfterTaxAverageAnnualReturns","performanceDetailsME","performanceDetailsRec","performanceDetailsQE","period","periodTab","ATAATR_BSS_WOSC","ATAATR_BSS_WSC","ATAATR_ASS_WOSC","ATAATR_ASS_WSC","periodRec","rtnWSCOneYear","rtnWSCThreeYears","rtnWSCFiveYears","rtnWSCTenYears","fundWOBS","fundWOAS","fundWOVal","fundNWOVal","averageAnnualTotalReturnsConfig","averageAnnualTotalReturnsMEData","_averageAnnualTotalReturnsMEData","averageAnnualTotalReturnsQEData","_averageAnnualTotalReturnsQEData","MONTH_END","QUARTER_END","bmkDQE","averageAnnualTotalReturnsQuarterEnd","averageAnnualTotalReturnsBmkQuarterEnd","asofDateQE","asofDateBMQE","blendedBmCountQuarterEnd","benchmarkCountQuarterEnd","showOnlyblendedBmQuarterEndChart","showQuarterEndBM","backtestedPerformanceAnnualised","PI","PB","_performanceBuilder","_performanceAnnualisedLabels","aggPerfs","theseItems","thisAvgAnnual","avgAnnual","thisName","avgAnnualItems","backtested","oneYr","oneYrBMC","threeYr","threeYrBMC","fiveYr","fiveYrBMC","tenYr","tenYrBMC","SI","sinceIncpBMC","thesePoints","calDataObj","dataObj","backtestedPerformanceCalendar","_performanceCalendarHeaders","_performanceCalendarLabels","thisCalDetail","calDetailItems","twoYr","twoYrBMC","fourYr","fourYrBMC","sixYr","sixYrBMC","sevenYr","sevenYrBMC","eightYr","eightYrBMC","nineYr","nineYrBMC","calHeaderItems","backtestedPerformanceCumulative","_performanceCumulativeLabels","ytdBMC","oneMth","oneMthBMC","threeMth","threeMthBMC","sixMth","sixMthBMC","_tableDataReduce","_getCalendarReturnData","_getCalendarReturnLabels","_getCalendarYearILI","_getProximityies","bmCalYearDet","_getCalendarYearBmCalYearDet","bmCalDetSorted","_sortBenchMarkDet","bmCalDetRevSorted","_getFundAnnualReturnsVO","fundAnnualReturnsVOSorted","_sortFundAnnualReturnsVO","_concatTableData","tableDataForChart","_getClaendarYearCaveats","_getRTN","rtnParam","tempTab","rtnArray","tableDataVal","rtnVal","calYear","tmpRTN","bmCalDet","rtnWOSC","rtnWSC","yearCounter","benchmarkTab","bmCalDetTmp","currentYear","bmCalDetCurrent","bmCalDetVal","counter","_getCalendarYearPerformance","bmTemp","bmTempVal","bmTempRec","var1","bmCalDetRec","fundAnnualReturnsVORev","fundAnnualReturnsVOCounted","fundAnnualReturnsVOVal","fundAnnualReturnsVORec","rtnDate","tableDataSize","tableDataIterator","benchmarkVal","shareClassCode","monthlyData","quarterlyData","peersRankList","thisMonthlyCalendar","thisQuarterlyCalendar","monthEnd","quarterEnd","_getThisCalendar","thisCalendarObj","thisShClsCode","shareClassName","shareCurrency","benchmarkName","IASectorName","aggSCName","aggBMName","aggIAName","fundCalendarDetails","shareClassDetailItems","benchmarkDetailItems","IASecDetailItems","SCDI","BMDI","IASec","asOfFormat","lastYear","shareClassTable","NineYr","benchMarkTable","IASecTable","tenYrIASec","nineYrIASec","eightYrIASec","sevenYrIASec","sixYrIASec","fiveYrIASec","fourYrIASec","threeYrIASec","twoYrIASec","oneYrIASec","aggTable","thisPoint","thisMonthlyCalendarRev","thisQuarterlyCalendarRev","rev","thisIASecObj","thisList","benchmarkCurrency","yearAryRev","lastYearCount","calYrRet10YrSecAvg","calYrRet9YrSecAvg","calYrRet8YrSecAvg","calYrRet7YrSecAvg","calYrRet6YrSecAvg","calYrRet5YrSecAvg","calYrRet4YrSecAvg","calYrRet3YrSecAvg","calYrRet2YrSecAvg","calYrRet1YrSecAvg","calDataObjrev","_getDiscreteReturnData","_getDiscreteReturnLabels","thisMonthlyDiscrete","thisQuarterlyDiscrete","thisMonthlyDiscreteRev","thisQuarterlyDiscreteRev","_getThisDiscrete","thisDiscreteObj","fundDiscreteDetails","expensesVolatilityBenchmarks","expensesVolatilityBenchmarksData","_expensesVolatilityBenchmarksData","evb","EVBLabels","performancePath","portfolioStats","configFilePerformancePath","benchmarkPath","vmBenchmarkPath","evbLabels","_evbLabelsBuilder","expensesHeading","_expensesHeadingBuilder","portStats","_portfolioStatsBuilder","cdsc","CFPPFID","displayNetExpenseRatio","suppressMaxInitialSales","_suppressorCheck","suppressCDSC","displayCappedRatio","_displayCappedRatio","displayBeta","displayAlpha","displaySharpe","displayCorrelation","displayRSquared","displayStandardDeviation","_benchmarkMaker","volatilityFrequency","_volatilityFrequency","newBenchmarks","haystack","needle","patt","test","checkThis","suppressor","newPortfolioStats","portfolioStat","newPSType","thisMonthlyTable","thisQuarterlyTable","thisPerformanceObj","fundAnnualisedDetails","oneY","threeY","fiveY","tenY","life","sinceIncp","thisVal","performanceCumulativeMEData","_performanceCumulativeMEData","performanceCumulativeQEData","_performanceCumulativeQEData","_hypotheticalsBuilder","PC_MONTH_END","PC_QUARTER_END","showHypoChart","cusipValue","resultsChart","pathedChart","chartOrNot","stat10kHypoValue","stat10kHypoDate","cumulativeTotalReturnsQuarterEnd","cumulativeTotalReturnsBmkQuarterEnd","supressFundWithSalesCharge","performanceGraph","PG","graphAName","graphBName","_getTableHeaders","fundCumulativeDetails","lbl","oneM","sixM","fundTableItems","PC_1YR","_processPerformanceChartData","PC_3YR","PC_5YR","PC_10YR","PC_15YR","PC_LIFE","graphIndex","chunk","fundData","globalProductsValue","perfHistoryGraphs","chartKey","chartValue","bmData","one","three","five","ten","fifteen","fiftnYr","fiftnYrBMC","assetClassExposureConfig","_getAssetClassExposureLabels","_getAssetClassExposureData","_getAssetClassExposureCaveats","_buildAssetClassExposureChartData","assetClassExposureDate","colSpan","assetMixData","_labelsBuilder","_caveatsBuilder","commoditiesSectorBreakdownConfig","_getCommoditiesSectorBreakdownData","commoditesSectorBreakdownDate","commoditesSectorBreakdownTotal","hasNegativeValue","showChartAlternative","_getCreditQualityExposureData","_buildCreditQualityExposureChartData","creditQualityExposureDate","investmentGrade","belowInvestmentGrade","notRated","refunded","cashAndCashEquv","hideRows","workChartData","investmentGradeTotal","belowInvestmentGradeTotal","notRatedTotal","refundedTotal","cashAndCashEquvTotal","creditQualityExposureTotal","couponRateBreakdownLabels","currencyDistributionConfig","_getCurrencyDistributionData","rawSigCur","rawCurDisBdn","useableHolding","currencyDistributionDate","fixedIncomeSectorBreakdownConfig","_getFixedIncomeSectorBreakdownData","fixedIncomeSectorBreakdownDate","fixedIncomeSectorBreakdownTotal","_dataBuilder","suppressOpts","useSuppression","rawBreakdowns","tempBreakdown","mdash","holdingsData","holdingsLabels","portfolioIntlValue","etfDailyHoldings","_createHoldingMapper","notionalValue","labelObj","enumerable","ticker","holdingName","weight","marketValue","managerRosterInfo","managers","_newDataBuilder","grouped","indexed","managerInfo","Manager","managerImgSrc","managerDescription","groupInfo","maturityBreakdownLabels","lstDtlsSorted","_showLabelsIfEmptyV2","_getTNPDate","wantedDate","_buildStatisticsV2","_processStatisticsV2","tnpDate","rawUsefulStuff","useful","date30DaysAgo","fundIncpDt","getTime","priceToEarnWgtAvg","priceToBValWgtAvg","priceToCFlowWgtAvg","maturityWgtAvg","durationOADWgtAvg","yldToMatrtyWgtAvg","avgCrdQltyRating","nbrOfIssuers","nbrOfHoldings","statistics","showIssuers","showHoldings","showSection","showStatistics","dataMode","findName","CRD_QLTY_BDN","BND_QLTY_BDN","groupTotals","val2","mapped","name2","strategyBreakdownLabels","topExposuresLabels","labelsLong","heading","subheading","labelsShort","ppssData","ppssLabels","fundConfig","minRating","ratings","minimumMorningstar","suppressedRatingFunds","supressRatings","isDataTooOld","maxSecYieldDate","isBefore","maxMorningstarRatingDate","ppsList","_removeLiquidated","_fixSalesCharges","_createFundMapper","_createFilterOptions","distRateNAVDt","ytdTotRtnNAVDt","avgAnlTotRtnDtME","avgAnlTotRtnDtQE","distConfig","fundNumber","mStarRatingOverall","noRating","minRatingTooLow","showRatingInfo","prntFundCategory","_isValidYieldData","_isAllowedInConfig","fundObj","fundShortName","fundNameOrder","instrId","region","fundObjective","isSoftClosure","isHardClosure","mStarCategory","grossExpenseRatio","netExpenseRatio","maxIntialSalesCharge","navChange","navChng","inception_dt","yTDTotalReturnAtNAV","distRateAtNAV","distRateAtPOP","secYieldDate","secYieldWoWvrDate","curr7DayYield","eff7DayYield","curr7DayYieldWoWvr","curr7DayYieldDate","curr7DayYieldWoWvrDate","eff7DayYieldWoWvr","eff7DayYieldDate","eff7DayYieldWoWvrDate","mStarRating3Yr","_format","mStarRating5Yr","mStarRating10Yr","rating3YearsUniv","rating5YearsUniv","rating10YearsUniv","avgAnnSinIncReturnSc","avgAnnSinceIncReturn","avgAnnSinIncReturnScQtr","avgAnnSinceIncReturnQtr","avgAnn1YearReturnSc","avgAnn1YearReturn","avgAnn1YearReturnScQtr","avgAnn1YearReturnQtr","avgAnn3YearReturnSc","avgAnn3YearReturn","avgAnn3YearReturnScQtr","avgAnn3YearReturnQtr","avgAnn5YearReturnSc","avgAnn5YearReturn","avgAnn5YearReturnScQtr","avgAnn5YearReturnQtr","avgAnn10YearReturnSc","avgAnn10YearReturn","avgAnn10YearReturnScQtr","avgAnn10YearReturnQtr","ASSET_CLASS","FUND_CATEGORY","REGION","MORNINGSTAR_RATING","SHARE_CLASS","divdSchedule","fundExplrVal","domicile","incomeUse","aum","ter","ongoingCharges","factsheetLink","CURRENCY","ppssConfig","ppssComponentConfig","segmentConfig","tabsets","tabSets","tabSet","ts","baseLink","softLaunchList","activeList","ppsListIntl","_createFundFilter","_createFundLinks","selectedDropdowns","idObj","dd","perfView","defaultPerformance","allIdentifiers","selectedIdentifiers","currencyList","pass","isSoftLaunch","tabset","sixMonthsAgo","subtract","oneYearAgo","shareClassInceptionDate","showMDash","showMDashForUnder1Year","isAfter","showMDashForUnder6Months","legalName","shareClassFeeStructure","shrclsCodeFeeStruct","fundClassifcationByRegional","invstmntVechleStd","navList","dlyNavChange","navEffectiveDate","reportingStatus","reuters","bloomberg","sedol","vln","mexid","rfi","apri","arsn","fundCode","frontEnd","lowLoad","dsc","dbCode","INVESTMENT_VEHICLE","_priceLabelsBuilder","_pricesBuilder","_priceCaveatsBuilder","priceInformationLabels","priceInformation","sphv","price","sph","splv","spl","nvcv","popv","pop","navv","spldate","sphdate","bkptDet","priceCaveats","pricingAtNavLabels","fundPrice","chartNinetyDays","chartYtd","chartOneYear","chartFiveYear","chartTenYear","pricingVO","NINTY_DAYS","_processChartData","YTD","ONE_YEAR","FIVE_YEAR","TEN_YEAR","priceDetVO","navDet","navdt","priceHistoryData","distHistoryData","pdLabels","rawClasses","etfPriceDivValue","_createParseShareClass","shareClassCurrency","_parseNavHistory","navHistoryDR","rawHistoricalClasses","_appendHistoricalData","navData","n","navFormatted","classCode","primary","_parseDividend","highLowNav","hl","highNav","highNavDate","lowNav","lowNavDate","historicalShareData","divHistory","hashOfYears","normalisedDate","yearInt","descendingOrder","dvd","recordDate","exDividendDate","distributionDate","dividendsPerShare","prceDistbIntl","shClsPriceDet","_getPrimaryClass","_getAsOfDate","dividendClasses","additionalTaxData","_additionalTaxInformationData","taxPath","totalInDist","totalFundInJurisdiction","_displayYearEndMessage","taxDetails","_taxDetailsBuilder","DGOB","_valueOrMessage","AMNT","DRDE","FTCI","_ftciProcessor","foreignTax","jurdNodes","_jurdNodeBuilder","node","naMessage","qualifier","newTaxDetails","taxDet","taxVO","taxDetail","_chunk","big","chunkSize","chunked","fundJurdVO","totalJurdNodes","numberOfColumns","numberInColumns","newJurdNodes","jurdNodeColNumber","jurdNodeIndex","jurdNode","newJurdNode","selectedPdfLabels","editLabel","emailSelectedLabel","classLabel","emptyResults","searchInput"],"mappings":";;;;;;oBAAe;AACbA,WAAO,IADM;AAEbC,aAAS,IAFI;AAGbC,aAAS;AAHI;;;;;;;;;;;;;;;;MCKFC,wBAAAA;AAEX,6BAAc;AAAA;;AAEZ,WAAKC,MAAL,GAAc,6BAAWC,SAAX,CAAqB,KAAKC,WAAL,CAAiBC,IAAtC,CAAd;AACD;;4BAMDC,6BAASC,SAAS;AAChB,UAAI,KAAKC,KAAL,KAAeC,SAAnB,EAA8B;AAC5B,aAAKP,MAAL,CAAYQ,KAAZ,CAAkB,qBAAlB;AACA,qBAAWH,OAAX;AACD;AACD,UAAI,KAAKC,KAAL,CAAWG,GAAf,EAAoB;AAClB,YAAMH,QAAQ,KAAKA,KAAL,CAAWG,GAAX,CAAeJ,OAAf,CAAd;AACA,eAAOC,UAAUC,SAAV,GAAsBD,KAAtB,SAAkCD,OAAlC,MAAP;AACD;;AAED,oBAAYA,OAAZ;AACD;;;;;;;;;;;AC3BI,MAAMK,4CAAkB,IAAIC,GAAJ,CAAQ,CACrC,CAAC,KAAD,EAAQ,EAACC,QAAQ,GAAT,EAAcC,eAAe,CAA7B,EAAR,CADqC,EAErC,CAAC,KAAD,EAAQ,EAACD,QAAQ,GAAT,EAAcC,eAAe,CAA7B,EAAR,CAFqC,EAGrC,CAAC,KAAD,EAAQ,EAACD,QAAQ,GAAT,EAAcC,eAAe,CAA7B,EAAR,CAHqC,EAIrC,CAAC,KAAD,EAAQ,EAACD,QAAQ,GAAT,EAAcC,eAAe,CAA7B,EAAR,CAJqC,CAAR,CAAxB;;;;;;;;;;;;;;;;;;ACQP,MAAMC,kBAAkB,WAAxB,KAQaC,sBAAAA,sBADZ,8DAAmB,OAAnB,EAA4B,MAA5B;AAcC,yBAAYC,IAAZ,EAAkBC,kBAAl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AAmBD","file":"web-platform-app.js","sourcesContent":["export default {\n debug: true,\n testing: true,\n cssRoot: 'http://pattern-library.corp.frk.com'\n // cssRoot: 'http://localhost:3000'\n};\n","/**\n * Created by bstjohn on 10/12/2016.\n */\nimport {LogManager} from 'aurelia-framework';\n\nexport class ComponentBase {\n\n constructor() {\n //this.store = store; // don't think we need or should have direct access to the store\n this.logger = LogManager.getLogger(this.constructor.name);\n }\n\n /**\n * @param {string} labelId\n * @returns {string}\n */\n getLabel(labelId) {\n if (this.label === undefined) {\n this.logger.error('No label data found');\n return `[${labelId}]`;\n }\n if (this.label.get) {\n const label = this.label.get(labelId);\n return label !== undefined ? label : `[${labelId}]`;\n }\n //return this.label.hasOwnProperty(labelId) ? this.label[labelId] : `[${labelId}]`;\n return `[!${labelId}]`;\n }\n}\n","export const currencyConfigs = new Map([\n ['USD', {symbol: '$', decimalPlaces: 2}],\n ['GBP', {symbol: '£', decimalPlaces: 2}],\n ['EUR', {symbol: '€', decimalPlaces: 2}],\n ['JPY', {symbol: '¥', decimalPlaces: 0}]\n]);\n","/**\n * Created by bstjohn on 26/10/2016.\n *\n * Singleton class to control ajax requests back to server\n */\nimport {LogManager, inject} from 'aurelia-framework';\nimport {HttpClient} from 'aurelia-fetch-client';\n\nconst PAGE_JSON_CLASS = 'page-json'; // css class to identify embedded json script tags in the page\n\n/**\n * DataService to load json data.\n * ALL Json should be loaded through this service which will control caching etc.\n * @author Ben St Johnston\n */\n@inject(HttpClient, 'Beans', 'REST')\nexport class DataService {\n\n /**\n * memory cache for beans already loaded on this page.\n * @type {{}}\n * @private\n */\n _cache = {};\n\n _preloaded = false;\n\n _postProcessor = null;\n\n constructor(http, beansConfiguration, restApi) {\n this.http = http;\n this.beansConfiguration = beansConfiguration;\n this.restApi = restApi;\n this.logger = LogManager.getLogger('DataService');\n this._preloadFromPage();\n }\n\n /**\n * Get the json for a bean\n * @param bean\n * @param optionalUrl - override standard rest url\n * @returns {Promise.<*>}\n */\n getBean(bean) {\n let url;\n if (bean.bid !== bean.cid) {\n url = this.restApi.getRestUrl(bean);\n } else {\n url = bean.bid;\n }\n return this.getBeanFromUrl(bean, url);\n }\n getBeanFromUrl(bean, url) {\n // console.group('getBeanFromUrl');\n if (this._cache[url] !== undefined) {\n if (this._cache[url] instanceof Promise) {\n this.logger.debug('requested previously but not yet available: ' + url);\n return this._cache[url];\n }\n this.logger.debug('Loaded from cache: ' + url);\n return Promise.resolve(this._cache[url]);\n }\n this.logger.debug('Loading via http: ' + url);\n return this._cache[url] = this.http.fetch(url,\n {\n credentials: 'same-origin'\n })\n .then(this._checkStatus)\n .then(json => json.json())\n .then(data => {\n this.logger.debug('Loaded via http: ' + url);\n let json = this._postProcess(data);\n this._cache[url] = json;\n return json;\n }); // TODO error handling - need to reject promise\n }\n\n /**\n * get the json for a list of beans\n * @param beans\n * @returns {Promise.<Array<*>>}\n */\n getBeans(beans) {\n return Promise.all( beans.map(this.getBean, this) );\n }\n\n _checkStatus(response) {\n if (response.status >= 200 && response.status < 300) {\n return response;\n }\n let error = new Error(response.statusText);\n error.response = response;\n throw error;\n }\n\n /**\n * Post process the bean after loading.\n * Placeholder to allow decoration of the beans.\n * This is just the default implementation.\n * @param bean\n * @returns {*}\n * @private\n */\n _postProcess(bean) {\n if (this._postProcessor !== null) {\n return this._postProcessor(bean);\n }\n return bean;\n }\n\n\n /**\n * preload json embedded in the page\n * @private\n */\n _preloadFromPage() {\n this.logger.debug('Loading json from page');\n // preload any beans embedded on the page - see PageJson TeamSite component\n let pageJsonNodes = document.getElementsByClassName(PAGE_JSON_CLASS);\n for (let i = 0; i < pageJsonNodes.length; i++) {\n let beans = JSON.parse(pageJsonNodes[i].innerHTML);\n let params = beans.params;\n delete beans.params; // this is an extra property that we do not want to process.\n\n for (let beanId in beans) {\n let url = this.restApi.getRestUrlFromPageJson(beanId, beans[beanId], params);\n this._cache[url] = this._postProcess(beans[beanId]);\n this.logger.debug('Loaded from page: ' + url);\n }\n }\n this._preloaded = true; // only run once\n }\n}\n","/**\r\n * Top level general reducer\r\n * Use to store data that isn't product or marketing specific\r\n * Currently there are no actions it listens to. Instead data is set in initial state.\r\n */\r\n// import {LogManager} from 'aurelia-framework';\r\n// const logger = LogManager.getLogger('pricing-distribution');\r\n\r\nexport function general(state = {}, action) {\r\n switch (action.type) {\r\n// case 'SOME_ACTION':\r\n// logger.debug('Reducing: SOME_ACTION');\r\n\r\n// return Object.assign({}, state, {\r\n// something: action.data\r\n// });\r\n default:\r\n return state;\r\n }\r\n}\r\n","/**\n * @param {number} totalRecords\n * @param {number} pageSize\n * @param {number} pageNumber\n * @returns {Object}\n */\nexport function getPagingInfo(totalRecords, pageSize = 10, pageNumber = 1) {\n let hasRecords = totalRecords > 0;\n let totalPages = Math.ceil(totalRecords / pageSize);\n let pages = Array.from(new Array(totalPages));\n pages = pages.map((notUsed, index) => _pageDetails(totalRecords, pageSize, index + 1));\n return {\n firstPage: hasRecords && pageNumber > 1 ? 1 : null,\n previousPage: hasRecords && pageNumber > 1 ? pageNumber - 1 : null,\n nextPage: hasRecords && pageNumber < totalPages ? pageNumber + 1 : null,\n lastPage: hasRecords && pageNumber < totalPages ? totalPages : null,\n currentPage: hasRecords ? _pageDetails(totalRecords, pageSize, pageNumber) : null,\n totalPages,\n pages,\n firstRecord: hasRecords ? 1 : 0,\n lastRecord: totalRecords,\n totalRecords\n };\n}\n\n/**\n * @param {number} totalRecords\n * @param {number} pageSize\n * @param {number} page\n * @returns {Object}\n * @private\n */\nfunction _pageDetails(totalRecords, pageSize, page) {\n return {\n page,\n startRecord: 1 + (page * pageSize) - pageSize,\n endRecord: Math.min(totalRecords, page * pageSize)\n };\n}\n","\nimport {ComponentBase} from './component-base';\n\nexport class ReduxComponentBase extends ComponentBase {\n\n constructor(store) {\n super();\n this.dispatch = store.dispatch;\n\n if (typeof this.mapState === 'function') {\n store.subscribe(() => {\n let newState = store.getState();\n if (this.populateData && newState.products.app.currentFundId && (this.fundId !== newState.products.app.currentFundId)) {\n this.fundId = newState.products.app.currentFundId;\n this.populateData();\n } else {\n this.mapState(newState);\n }\n });\n }\n }\n}\n","/**\n * Created by bstjohn on 31/12/2016.\n */\n/**\n * Created by bstjohn on 26/12/2016.\n */\nimport {LogManager} from 'aurelia-framework';\n\nexport class RestApi {\n\n constructor(beanConfig, site, segment) {\n this.beanConfig = beanConfig;\n this.site = site;\n this.segment = segment;\n this.logger = LogManager.getLogger('rest-api');\n this.logger.debug('restApi initiated');\n }\n\n /**\n * Generate the REST URI to get data for a particular bean\n * Beans requiring a fund id become:\n * /<actor>/<fundId>/<bid>\n * Otherwise just:\n * /<actor>/<bid>\n *\n * Additional parameters just get added as query parameters\n */\n getRestUrl(bean) {\n let url = this.getUrlBase();\n // for each parameter defined in beanConfig, map to parameter name in beanConfig and parameter value set in bean\n // this.logger.error('bean.fundId ', bean.bid, this.beanConfig.bean);\n if (this.beanConfig.bean[bean.bid]) {\n let parameters = this.beanConfig.bean[bean.bid].parameters;\n\n if (parameters) {\n if (parameters.get('fundId')) {\n if (bean.fundId === undefined) {\n throw new Error('fundId must be defined on bean');\n }\n url += bean.fundId + '/';\n }\n url += bean.bid;\n let amp = '?';\n parameters.forEach((paramName, varName) => {\n if (bean[varName] !== undefined) {\n if (varName !== 'fundId') {\n url += amp + paramName + '=' + bean[varName];\n amp = '&';\n }\n } else {\n this.logger.error('undefined parameter value for bean: no param found called: ' + varName + ' for bean: ' + bean.bid);\n }\n });\n }\n } else {\n url += bean.bid;\n }\n return url;\n }\n\n /**\n * generate the REST URI from a page json bean to store in the cache\n */\n getRestUrlFromPageJson(bid, params) {\n let url = this.getUrlBase();\n // for each parameter defined in beanConfig, map to parameter name in beanConfig and parameter value set in json params attribute\n if (this.beanConfig.bean[bid]) {\n let parameters = this.beanConfig.bean[bid].parameters;\n\n if (parameters && params) {\n if (parameters.get('fundId')) {\n if (params.FundID !== undefined) {\n url += params.FundID + '/';\n } else {\n this.logger.error('no FundID parameter set in page json');\n }\n }\n url += bid;\n let amp = '?';\n parameters.forEach((value, key) => {\n if (params[value] !== undefined) {\n if (value !== 'FundID') {\n url += amp + value + '=' + params[value];\n amp = '&';\n }\n } else {\n this.logger.error('undefined parameter value for page json bean: no param found called: ' + key + ' for bean: ' + bid);\n }\n });\n }\n } else {\n url = bid;\n }\n return url;\n }\n\n getUrlBase() {\n return '/' + this.site + '/' + this.segment + '/data/';\n }\n}\n","import get from 'lodash/get';\nimport moment from 'moment';\n\nexport function createCompare(dataKey, direction, options = {}) {\n let dir = direction === 'DESC' ? -1 : 1;\n if (options.isNumeric) return _createNumericCompare(dataKey, dir, options.secondaryCompare);\n if (options.isDate) return _createDateCompare(dataKey, dir, options.dateFormat, options.secondaryCompare);\n return _createStringCompare(dataKey, dir, options.secondaryCompare);\n}\n\nfunction _createNumericCompare(dataKey, dir, secondaryCompare) {\n return (a, b) => {\n let aParsed = get(a, dataKey);\n let bParsed = get(b, dataKey);\n aParsed = aParsed && typeof aParsed !== 'number' ? parseFloat(aParsed.replace(/[^\\d.-]+/g, '')) : aParsed;\n bParsed = bParsed && typeof bParsed !== 'number' ? parseFloat(bParsed.replace(/[^\\d.-]+/g, '')) : bParsed;\n if ((isNaN(aParsed) && isNaN(bParsed)) || aParsed === bParsed) return secondaryCompare ? secondaryCompare(a, b) : 0;\n if (isNaN(aParsed)) return 1; // non-numbers always last\n if (isNaN(bParsed)) return -1; // non-numbers always last\n return (aParsed - bParsed) * dir;\n };\n}\n\nfunction _createStringCompare(dataKey, dir, secondaryCompare) {\n const dashes = ['\\u2014', '—', '-'];\n return (a, b) => {\n let aVal = get(a, dataKey);\n let bVal = get(b, dataKey);\n let result = aVal.localeCompare(bVal) * dir;\n if (result === 0 && secondaryCompare) return secondaryCompare(a, b);\n if (dashes.includes(aVal)) return 1; // dashes always last\n if (dashes.includes(bVal)) return -1; // dashes always last\n return result;\n };\n}\n\nfunction _createDateCompare(dataKey, dir, format, secondaryCompare) {\n return (a, b) => {\n let aParsed = moment(get(a, dataKey), format).valueOf();\n let bParsed = moment(get(b, dataKey), format).valueOf();\n if ((isNaN(aParsed) && isNaN(bParsed)) || aParsed === bParsed) return secondaryCompare ? secondaryCompare(a, b) : 0;\n if (isNaN(aParsed)) return 1; // non-numbers (dates) always last\n if (isNaN(bParsed)) return -1; // non-numbers (dates) always last\n return (aParsed - bParsed) * dir;\n };\n}\n","import {DOM} from 'aurelia-pal';\nimport {ajax} from 'jquery';\n\n/**\n * @param {HTMLElement} element\n * @param {string} value\n * @returns {Promise}\n */\nexport function simulateInputChange(element, value) {\n element.value = value;\n element.dispatchEvent(DOM.createCustomEvent('change', { bubbles: true }));\n return new Promise(setTimeout);\n}\n\n/**\n * @param {number} delay\n * @returns {function(): Promise}\n */\nexport function wait(delay = 10) {\n return () => new Promise(resolve => {\n setTimeout(resolve, delay);\n });\n}\n\n/**\n * synchronously load JSON fixture file\n * @parameter {string} filename eg /components/products/pricing-distribution/ft-pricing-distribution/lib/gw/mock-new-state-out.fixture.json\n * @returns {Object}\n */\nexport function getJSONFixture(filename) {\n let result = ajax({\n url: '/base/src' + filename,\n async: false\n });\n return result.responseJSON;\n}\n\n","export function configure(config) {\n config.globalResources([\n './attributes/share-class-link-listener',\n './elements/ft-bar-chart',\n './elements/ft-chart',\n './elements/ft-column-chart',\n './elements/ft-credit-quality-exposure-table.html',\n './elements/ft-date-dropdown/ft-date-dropdown',\n './elements/ft-datepicker/ft-datepicker',\n './elements/ft-info-modal',\n './elements/ft-label/ft-label',\n './elements/ft-legal-jump-link.html',\n './elements/ft-modal/ft-modal',\n './elements/ft-modal-inline/ft-modal-inline',\n './elements/ft-share-class-filter/ft-share-class-filter',\n './elements/ft-pie-chart',\n './elements/ft-prefix-or-dash/ft-prefix-or-dash',\n './elements/ft-th-sortable/ft-th-sortable',\n './elements/ft-carousel/ft-carousel',\n './elements/ft-owl-carousel/ft-owl-carousel',\n './elements/ft-owl-tabbed/ft-owl-tabbed',\n './elements/ft-spinner/ft-spinner',\n './value-converters/ft-filter',\n './value-converters/ft-length',\n './value-converters/ft-type-ahead-filter',\n './value-converters/ft-sort'\n ]);\n}\n","import environment from '../../environment';\nimport {http} from './http';\nimport {createStore, applyMiddleware, combineReducers} from 'redux';\nimport {RestApi} from '../../lib/rest-api';\nimport {DataService} from '../../lib/data-service';\nimport {getMiddleware} from './middleware';\nimport get from 'lodash/get';\n\n\n/**\n * Configuration common for all sites/pages\n */\n// keys for local storage\n// const REDUX_STORE_KEY = 'reduxStore';\n\n//Configure Bluebird Promises.\n//Note: You may want to use environment-specific configuration.\nPromise.config({\n warnings: {\n wForgottenReturn: false\n }\n});\n\n/**\n * Common configuration for all sites\n * @param aurelia\n * @param config - site specific configuration\n */\nexport function commonConfigure(aurelia, config) {\n aurelia.use.globalResources(config.components);\n\n let siteConfig = document.getElementById('site-config');\n let site = siteConfig ? siteConfig.getAttribute('site') : '';\n let segment = get(config, 'state.general.params.segment', 'investor');\n\n // allow turning on debug in prod by adding additional request parameters\n let debug = config.state.general.params.debug;\n if ( debug === 'componentdata' || debug === 'web-platform' ) {\n environment.debug = true;\n }\n if (environment.debug) {\n aurelia.use.developmentLogging();\n }\n\n aurelia.use\n .defaultBindingLanguage()\n .defaultResources()\n .eventAggregator()\n .feature('components/common')\n .feature('components/products/common')\n .feature('components/marketing/common');\n\n if (environment.testing) {\n aurelia.use.plugin('aurelia-testing');\n aurelia.use.feature('components/test');\n }\n\n let restApi = new RestApi(config.beans, site, segment);\n let dataService = new DataService(http, config.beans, restApi);\n let store = createStore(combineReducers(config.reducers), config.state, applyMiddleware(...getMiddleware(dataService)));\n\n // add singletons to dependency injection container\n aurelia.container.registerInstance('Store', store);\n aurelia.container.registerInstance('REST', restApi);\n aurelia.container.registerInstance('Beans', config.beans);\n aurelia.container.registerInstance(DataService, dataService);\n\n store.dispatch({\n type: 'LOAD_LABELS',\n beans: config.beans.component.labels\n });\n\n store.dispatch({\n type: 'LOAD_PORTFOLIO_CONFIGURATION',\n beans: config.beans.component.portfolioConfiguration\n });\n\n aurelia.start().then(() => aurelia.enhance());\n}\n\nexport function getInitialState() {\n let state = {\n general: {\n segment: _getSegment(),\n params: _parseUrlQuery(window.location.search),\n path: window.location.pathname,\n user: { // quick fix to test templates with login states. final solution TBD\n loggedIn: false,\n actor: 'FA',\n actorPub: 'FA'\n }\n },\n products: {\n app: {\n currentFundId: 0,\n currentShareClass: '',\n distributions: {\n visibleElementLevel: new Map(),\n visibleElementLevelCaveats: new Map()\n },\n holdings: {\n paging: {\n currentPage: 1,\n pageSize: 20\n },\n search: {\n fields: ['ticker', 'isin', 'holdingName', 'sector'],\n searchString: ''\n },\n sort: {\n columns: new Map([\n // TODO: define all possible sortable columns here\n ['TICKER', {dataKey: 'ticker', direction: null, isNumeric: false}],\n ['ISIN', {dataKey: 'isin', direction: null, isNumeric: false}],\n ['HOLDING_NAME', {dataKey: 'holdingName', direction: null, isNumeric: false}],\n ['SECTOR', {dataKey: 'sector', direction: null, isNumeric: false}],\n ['WEIGHT', {dataKey: 'weight', direction: 'DESC', isNumeric: true}],\n ['MARKET_VALUE', {dataKey: 'marketValue', direction: null, isNumeric: true}],\n ['NOTIONAL_VALUE', {dataKey: 'notionalValue', direction: null, isNumeric: true}]\n ])\n }\n },\n modal: {},\n ppss: {\n config: { // these are set once at site configuration, and don't change value at runtime\n showPerformanceTab: true,\n showEtfTab: false,\n showFundIdentifiersTab: false,\n showYieldTab: false,\n showRatingsTab: false,\n showPerformanceToggle: true,\n showSalesChargeToggle: false,\n showExpensesAndSalesInfo: false,\n showFavorites: false,\n showPeriodEnd: false,\n showMorningStarColumn: false,\n showTer: true,\n showOngoingCharges: false,\n performanceViewOptions: [\n {name: 'AVG_ANNUAL_MONTHLY', labelKey: 'avg-annual'},\n {name: 'CALENDAR_YEAR_QUARTERLY', labelKey: 'calendar-year'},\n {name: 'CUMULATIVE_MONTHLY', labelKey: 'cumulative'},\n {name: 'DISCRETE_QUARTERLY', labelKey: 'discrete-annual'}\n ],\n fundIdentifiers: [],\n allFundIdentifiers: [\n {name: 'FUND_NUMBER', dataKey: 'fundId', labelKey: 'fund-number'},\n {name: 'ISIN', dataKey: 'isin', labelKey: 'isin'},\n {name: 'CUSIP', dataKey: 'cusip', labelKey: 'cusip'},\n {name: 'REUTERS', dataKey: 'reuters', labelKey: 'reuters'},\n {name: 'BLOOMBERG', dataKey: 'bloomberg', labelKey: 'bloomberg'},\n {name: 'WKN', dataKey: 'wkn', labelKey: 'wkn'},\n {name: 'SEDOL', dataKey: 'sedol', labelKey: 'sedol'},\n {name: 'VLN', dataKey: 'vln', labelKey: 'vln'},\n {name: 'MEXID', dataKey: 'mexid', labelKey: 'mexid'},\n {name: 'RFI', dataKey: 'rfi', labelKey: 'rfi'},\n {name: 'APRI', dataKey: 'apri', labelKey: 'apri'},\n {name: 'ARSN', dataKey: 'arsn', labelKey: 'arsn'},\n {name: 'FUND_CODE', dataKey: 'fundCode', labelKey: 'fund-code'},\n {name: 'FRONT_END', dataKey: 'frontEnd', labelKey: 'front-end'},\n {name: 'LOW_LOAD', dataKey: 'lowLoad', labelKey: 'low-load'},\n {name: 'DSC', dataKey: 'dsc', labelKey: 'dsc'},\n {name: 'DB_CODE', dataKey: 'dbCode', labelKey: 'db-code'}\n ],\n allDropdowns: [{\n name: 'ASSET_CLASS',\n labelKey: 'assetclass',\n dataKey: 'assetClass',\n selected: {value: 'ALL', label: 'All'}\n }, {\n name: 'CURRENCY',\n labelKey: 'currency',\n dataKey: 'currency',\n selected: {value: 'ALL', label: 'All'}\n }, {\n name: 'DISTRIBUTION',\n labelKey: 'distribution',\n dataKey: 'distribution',\n selected: {value: 'ALL', label: 'All'}\n }, {\n name: 'FUND_CATEGORY',\n labelKey: 'fundcategory',\n dataKey: 'fundObjective',\n selected: {value: 'ALL', label: 'All'}\n }, {\n name: 'INVESTMENT_VEHICLE',\n labelKey: 'investment-vehicle',\n dataKey: 'investmentVehicle',\n selected: {value: 'ALL', label: 'All'}\n }, {\n name: 'MORNINGSTAR_RATING',\n labelKey: 'morningstar-rating',\n dataKey: 'mStarRatingOverall',\n selected: {value: 'ALL', label: 'All'}\n }, {\n name: 'REPORTING_STATUS',\n labelKey: 'reporting-status',\n dataKey: 'reportingStatus',\n selected: {value: 'ALL', label: 'All'}\n }, {\n name: 'SHARE_CLASS',\n labelKey: 'shareclass',\n dataKey: 'shareClassFeeStructure',\n selected: {value: 'A', label: 'A'}\n }]\n },\n currentTable: 'PERFORMANCE', // PERFORMANCE|YIELD|RATINGS,\n display: { // default values. will be changed at runtime\n performanceView: 'CUMULATIVE_MONTHLY',\n includeSalesCharges: false, //default will be determined by actor\n periodEnd: 'QUARTER_END' // QUARTER_END/MONTH_END default will be determined by actor\n },\n filters: {\n dropdowns: []\n },\n sort: {\n columns: new Map([\n // TODO: define all possible sortable columns here\n ['FUND_NUMBER', {dataKey: 'fundId', direction: null, isNumeric: true}],\n ['FUND_NAME', {dataKey: 'fundNameOrder', direction: 'ASC', isNumeric: false}],\n ['ASSET_CLASS', {dataKey: 'assetClass', direction: null, isNumeric: false}],\n ['NAV', {dataKey: 'nav', direction: null, isNumeric: true}],\n ['NAV_CHANGE', {dataKey: 'navChange', direction: null, isNumeric: true}],\n ['CURRENCY', {dataKey: 'currency', direction: null, isNumeric: false}],\n ['MSTAR_OVERALL', {dataKey: 'mStarRatingOverall', direction: null, isNumeric: true}],\n ['INCOME_USE', {dataKey: 'incomeUse', direction: null, isNumeric: false}],\n ['DOMICILE', {dataKey: 'domicile', direction: null, isNumeric: false}],\n ['INCEPTION_DATE', {dataKey: 'inceptionDate', direction: null, isDate: true}],\n ['YTD_TOTAL_RETURN_AT_NAV', {dataKey: 'ytdTotalReturnAtNav', direction: null, isNumeric: true}],\n ['AUM', {dataKey: 'aum', direction: null, isNumeric: true}],\n ['TER', {dataKey: 'ter', direction: null, isNumeric: true}],\n ['ONGOING_CHARGES', {dataKey: 'ongoingCharges', direction: null, isNumeric: true}],\n ['AVG_ANNUAL_1YR', {baseDataKey: 'avgAnn1YearReturn', direction: null, isNumeric: true}],\n ['AVG_ANNUAL_3YR', {baseDataKey: 'avgAnn3YearReturn', direction: null, isNumeric: true}],\n ['AVG_ANNUAL_5YR', {baseDataKey: 'avgAnn5YearReturn', direction: null, isNumeric: true}],\n ['AVG_ANNUAL_10YR', {baseDataKey: 'avgAnn10YearReturn', direction: null, isNumeric: true}],\n ['AVG_ANNUAL_INC', {baseDataKey: 'avgAnnSinceIncReturn', direction: null, isNumeric: true}],\n ['CALENDAR_YEAR_1YR', {baseDataKey: 'calendarYear1yrReturn', direction: null, isNumeric: true}],\n ['CALENDAR_YEAR_2YR', {baseDataKey: 'calendarYear2yrReturn', direction: null, isNumeric: true}],\n ['CALENDAR_YEAR_3YR', {baseDataKey: 'calendarYear3yrReturn', direction: null, isNumeric: true}],\n ['CALENDAR_YEAR_4YR', {baseDataKey: 'calendarYear4yrReturn', direction: null, isNumeric: true}],\n ['CALENDAR_YEAR_5YR', {baseDataKey: 'calendarYear5yrReturn', direction: null, isNumeric: true}],\n ['CALENDAR_YEAR_6YR', {baseDataKey: 'calendarYear6yrReturn', direction: null, isNumeric: true}],\n ['CUMULATIVE_YTD', {baseDataKey: 'cumulativeRetYtd', direction: null, isNumeric: true}],\n ['CUMULATIVE_1YR', {baseDataKey: 'cumulativeRet1yr', direction: null, isNumeric: true}],\n ['CUMULATIVE_3YR', {baseDataKey: 'cumulativeRet3yr', direction: null, isNumeric: true}],\n ['CUMULATIVE_5YR', {baseDataKey: 'cumulativeRet5yr', direction: null, isNumeric: true}],\n ['CUMULATIVE_10YR', {baseDataKey: 'cumulativeRet10yr', direction: null, isNumeric: true}],\n ['CUMULATIVE_INC', {baseDataKey: 'cumulativeRetInc', direction: null, isNumeric: true}],\n ['DISCRETE_1YR', {baseDataKey: 'discreteAnnual1yr', direction: null, isNumeric: true}],\n ['DISCRETE_2YR', {baseDataKey: 'discreteAnnual2yr', direction: null, isNumeric: true}],\n ['DISCRETE_3YR', {baseDataKey: 'discreteAnnual3yr', direction: null, isNumeric: true}],\n ['DISCRETE_4YR', {baseDataKey: 'discreteAnnual4yr', direction: null, isNumeric: true}],\n ['DISCRETE_5YR', {baseDataKey: 'discreteAnnual5yr', direction: null, isNumeric: true}],\n\n ['ISIN', {dataKey: 'isin', direction: null, isNumeric: false}],\n ['CUSIP', {dataKey: 'cusip', direction: null, isNumeric: false}],\n ['REUTERS', {dataKey: 'reuters', direction: null, isNumeric: false}]\n ]),\n // secondary sort for when primary sort values match\n secondary: {\n dataKey: 'fundNameOrder',\n direction: 'ASC',\n isNumeric: false\n }\n }\n },\n performance: {\n averageAnnualTotalReturns: {\n currentTab: 'MONTH_END'\n },\n afterTaxAverageAnnualReturns: {\n currentTab: 'MONTHLY'\n },\n performanceCumulative: {\n currentTab: 'PC_1YR'\n }\n },\n pricingDistribution: {\n showHighLowOnDate: true,\n paging: {\n currentPage: 1,\n pageSize: 10\n },\n dateRangeOptions: [\n {\n name: 'ONE_MONTH',\n labelKey: '1-month'\n }, {\n name: 'THREE_MONTHS',\n labelKey: '3-months'\n }, {\n name: 'SIX_MONTHS',\n labelKey: '6-months'\n }, {\n name: 'ONE_YEAR',\n labelKey: '1-year'\n }, {\n name: 'THREE_YEARS',\n labelKey: '3-years'\n }, {\n name: 'FIVE_YEARS',\n labelKey: '5-years'\n }, {\n name: 'SINCE_INCEPTION',\n labelKey: 'since-inception'\n }\n ],\n selectedDateRange: 'THREE_MONTHS',\n datePickerFormat: 'yy-mm-dd' // NB: format is specific to jQuery UI: http://api.jqueryui.com/datepicker/#utility-formatDate\n }\n },\n funds: {}\n },\n marketing: {\n app: {\n grid: {\n defaults: {\n cardsPerPage: 4,\n numVisibleCards: 0,\n filters: [],\n showViewToggle: true,\n currentView: 'GRID',\n columns: []\n },\n grids: {}\n }\n }\n }\n };\n // see if we can load state from local storage\n // if (typeof(Storage) !== \"undefined\") {\n // state = JSON.parse(localStorage.getItem(REDUX_STORE_KEY)) || state;\n // }\n // add query parameters\n // state.params = _parseUrlQuery(window.location.search);\n return state;\n}\n\nfunction _parseUrlQuery(queryString) {\n let params = {};\n let hash;\n\n if (queryString) {\n let hashes = queryString.slice(1).split('&');\n for (let i = 0; i < hashes.length; i++) {\n hash = hashes[i].split('=');\n params[decodeURIComponent(hash[0]).replace(/\\+/g, ' ')] = decodeURIComponent(hash[1]).replace(/\\+/g, ' ');\n }\n }\n return params;\n}\n\nfunction _getSegment() {\n const sKey = 'segment';\n const defaultSegment = 'investor';\n let segment = decodeURIComponent(document.cookie.replace(new RegExp('(?:(?:^|.*;)\\\\s*' + encodeURIComponent(sKey).replace(/[\\-\\.\\+\\*]/g, '\\\\$&') + '\\\\s*\\\\=\\\\s*([^;]*).*$)|^.*$'), '$1')) || defaultSegment;\n return segment;\n}\n","/**\r\n * Created by bstjohn on 16/12/2016.\r\n */\r\nimport {HttpClient} from 'aurelia-fetch-client';\r\nimport {LogManager} from 'aurelia-framework';\r\n\r\nexport let http = new HttpClient();\r\nlet httpLogger = LogManager.getLogger('Http');\r\n\r\nhttp.configure(x => {\r\n x.withInterceptor({\r\n request(message) {\r\n httpLogger.debug(`Requesting ${message.method} ${message.url}`);\r\n return message;\r\n },\r\n\r\n requestError(error) {\r\n httpLogger.error(`Request error ${error.method} ${error.url}`);\r\n throw error;\r\n },\r\n\r\n response(message) {\r\n httpLogger.debug(`Received ${message.status} ${message.url}`);\r\n return message;\r\n },\r\n\r\n responseError(error) {\r\n httpLogger.error(`Receive error ${error.status} ${error.url}`);\r\n throw error;\r\n }\r\n });\r\n});\r\n","import environment from '../../environment';\nimport {LogManager} from 'aurelia-framework';\n\n/**\n * get the array of middleware to add to the redux store\n * @param dataService\n * @returns {[*]}\n */\nexport function getMiddleware(dataService) {\n let middleware = [beanMiddleware(dataService)];\n if (environment.debug) {\n let logger = LogManager.getLogger('redux');\n middleware.push(reduxLogger(logger), crashReporter(logger));\n }\n // if (typeof(Storage) !== \"undefined\") {\n // middleware.push(localStorageMiddleware);\n // }\n return middleware;\n}\n\n// middleware to send requests for beans through the data service\nconst beanMiddleware = dataService => store => next => action => {\n // Pass all actions through by default\n next(action);\n // if its a bean loader it will have an array of bean ids in the beans property\n if (action.beans !== undefined) {\n dataService.getBeans(action.beans.map(bean => Object.assign({bid: bean}, action))) // copy the other attributes from action into each bean at this will contain the parameters\n .then(json => {\n store.dispatch(Object.assign({}, action, {\n type: action.type + '_SUCCESS',\n json: json,\n beans: undefined\n }));\n return true;\n })\n .catch(e => store.dispatch({\n type: action.type + '_ERROR',\n error: e\n }));\n } else {\n // let logger = LogManager.getLogger('redux');\n // logger.debug('no bean, no go', action);\n }\n};\n\n// redux middleware for debugging\nconst reduxLogger = logger => store => next => action => {\n logger.debug('dispatching ' + action.type, action);\n let result = next(action);\n logger.debug('next state', store.getState());\n return result;\n};\n\nconst crashReporter = logger => store => next => action => {\n try {\n return next(action);\n } catch (err) {\n logger.error('Caught an exception!', err);\n throw err;\n }\n};\n\n// redux middleware to store state in local storage\n/*const localStorageMiddleware = store => next => action => {\n let result = next(action);\n localStorage.setItem(REDUX_STORE_KEY, JSON.stringify(store.getState()));\n return result;\n};*/\n","/**\n * bean configuration for FT.com\n */\nexport const beans = {\n // list of beans for each component\n component: {\n labels: [\n 'etf.labels'\n ],\n ppss: [\n 'etf.ppss',\n 'gw.fund-config'\n ],\n portfolioConfiguration: [\n 'gw.fund-config'\n ],\n portfolio: [\n 'etf.portfolio'\n ],\n geographicAllocation: [\n 'etf.portfolio', 'etf.geographic-allocation-labels', 'gw.fund-config'\n ],\n performance: [\n 'etf.performance',\n 'etf.performance-labels',\n 'gw.performance-graph',\n 'gw.fund-config'\n ],\n performanceSimply: [\n 'etf.performance',\n 'etf.performance-labels',\n 'gw.fund-config'\n ],\n portfolioHoldings: [\n 'etf.portfolio',\n 'etf.portfolio-holdings-labels'\n ],\n portfolioMarketCapitalisation: ['etf.portfolio', 'etf.market-capitalisation-labels', 'gw.fund-config'],\n portfolioSectorAllocation: ['etf.portfolio', 'etf.sector-allocation-labels', 'gw.fund-config'],\n pricingDistribution: [\n 'etf.price',\n 'etf.price-history',\n 'etf.distribution-history'\n ],\n backtestedPerformance: [\n 'etf.performance',\n 'etf.performance-labels'\n ],\n fundInformation: [\n 'etf.fund-details',\n 'etf.price'\n ],\n fundOverview: [\n 'etf.fund-overview-value', 'etf.labels'\n ]\n },\n // parameter map to set in request - key is attribute in action and value is url request key (Map rather than Object as order matters).\n // KEEP in alphabetical order!\n bean: {\n 'etf.distribution-history': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'etf.fund-details': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'etf.fund-overview-value': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'etf.performance': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'etf.portfolio': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'etf.price': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'etf.price-history': {\n parameters: new Map([['fundId', 'FundID']])\n }\n }\n};\n","/**\r\n * Generic component configuration for ETF sites\r\n */\r\nexport const components = [\r\n 'components/products/portfolio/ft-geographic-allocation/ft-geographic-allocation',\r\n 'components/products/portfolio/ft-geographic-allocation/ft-geographic-allocation-row',\r\n 'components/products/portfolio/ft-holdings/ft-holdings',\r\n 'components/products/portfolio/ft-market-capitalisation/ft-market-capitalisation',\r\n 'components/products/portfolio/ft-sector-allocation/ft-sector-allocation',\r\n 'components/products/ppss/ft-find-a-fund/ft-find-a-fund',\r\n 'components/products/ppss/ft-ppss-etf/ft-ppss-etf',\r\n 'components/products/ppss/ft-ppss-etf/ft-ppss-etf-row',\r\n 'components/products/ppss/ft-ppss-favorite/ft-ppss-favorite',\r\n 'components/products/ppss/ft-ppss-fund-filter/ft-ppss-dropdown',\r\n 'components/products/ppss/ft-ppss-fund-filter/ft-ppss-fund-filter',\r\n 'components/products/ppss/ft-ppss-fund-name/ft-ppss-fund-name',\r\n 'components/products/ppss/ft-ppss-search-box/ft-ppss-search-box',\r\n 'components/products/ppss/ft-ppss-tab-header/ft-ppss-tab-header',\r\n 'components/products/ppss/ft-ppss-table-toolbar/ft-ppss-table-toolbar',\r\n 'components/products/ppss/ft-ppss/ft-ppss',\r\n 'components/products/performance/ft-performance-cumulative/etf/ft-performance-cumulative',\r\n 'components/products/performance/ft-performance-cumulative/etf/ft-performance-cumulative-chart',\r\n 'components/products/performance/ft-performance-annualised/etf/ft-performance-annualised',\r\n 'components/products/performance/ft-calendar-year-returns/etf/ft-calendar-year-returns',\r\n 'components/products/performance/ft-discrete-returns/ft-discrete-returns',\r\n 'components/products/performance/ft-backtested-performance-annualised/etf/ft-backtested-performance-annualised',\r\n 'components/products/performance/ft-backtested-performance-calendar/etf/ft-backtested-performance-calendar',\r\n 'components/products/performance/ft-backtested-performance-cumulative/etf/ft-backtested-performance-cumulative',\r\n 'components/products/pricing-distribution/ft-dividends/ft-dividends',\r\n 'components/products/pricing-distribution/ft-dividends-historical/ft-dividends-historical',\r\n 'components/products/pricing-distribution/ft-nav-high-low/ft-nav-high-low',\r\n 'components/products/pricing-distribution/ft-price-chart/ft-price-chart',\r\n 'components/products/pricing-distribution/ft-pricing-distribution/ft-pricing-distribution',\r\n 'components/products/pricing-distribution/ft-share-prices/ft-share-prices',\r\n 'components/products/overview/ft-fund-information/ft-fund-information',\n 'components/products/overview/ft-fund-trading-characteristics/ft-fund-trading-characteristics',\n 'components/marketing/layouts/ft-choose-subscription/ft-choose-subscription',\n 'components/marketing/layouts/ft-choose-subscription/ft-choose-subscription-step1',\r\n 'components/marketing/layouts/ft-choose-subscription/ft-choose-subscription-step2',\r\n 'components/marketing/layouts/ft-choose-subscription/ft-choose-subscription-step3'\r\n];\r\n","import {commonConfigure} from '../common/configure';\r\n\r\n// etf beans\r\nimport {beans} from './beans';\r\n// etf components\r\nimport {components} from './components';\r\n// etf reducers\r\nimport {reducers} from './reducers';\r\n// etf initial state\r\nimport {getState} from './state';\r\n\r\n/**\r\n * Configuration for etf\r\n * @param aurelia\r\n */\r\n\r\nexport function configure(aurelia) {\r\n // get initial state of redux store\r\n let state = getState();\r\n\r\n commonConfigure(aurelia, {\r\n reducers,\r\n state,\r\n beans,\r\n components\r\n });\r\n}\r\n","\r\nimport {combineProductsReducers} from '../../components/products/lib/combine-products-reducers';\r\nimport {combineMarketingReducers} from '../../components/marketing/lib/combine-marketing-reducers';\r\n\r\n// reducers\r\nimport {general as generalReducer} from '../../lib/general.reducer';\r\nimport {labelLoader} from '../../components/products/lib/label-loader.reducer';\r\nimport {configurationLoader} from '../../components/products/lib/config-loader.reducer';\r\nimport {modalReducer} from '../../components/common/elements/ft-modal/lib/ft-modal.reducer';\r\nimport {caveatsReducer} from '../../components/products/lib/caveats-reducer';\r\nimport {ppss} from '../../components/products/ppss/ft-ppss/lib/ppss.reducer';\r\nimport {geographicAllocation} from '../../components/products/portfolio/ft-geographic-allocation/lib/etf/geographic-allocation.reducer';\r\nimport {holdings} from '../../components/products/portfolio/ft-holdings/lib/holdings.reducer';\r\nimport {performanceCumulative as performanceCumulativeTabs} from '../../components/products/performance/ft-performance-cumulative/lib/performance-cumulative.reducer';\r\nimport {performanceAnnualised as performanceAnnualisedTabs} from '../../components/products/performance/ft-performance-annualised/lib/performance-annualised.reducer';\r\nimport {fundInformation} from '../../components/products/overview/ft-fund-information/lib/etf/fund-information.reducer';\r\nimport {shareClassFilterReducer} from '../../components/common/elements/ft-share-class-filter/lib/share-class-filter.reducer';\r\n\r\n// etf reducers\r\nimport {marketCapitalisation} from '../../components/products/portfolio/ft-market-capitalisation/lib/etf/market-capitalisation.reducer';\r\nimport {sectorAllocation} from '../../components/products/portfolio/ft-sector-allocation/lib/etf/sector-allocation.reducer';\r\nimport {holdings as holdingsData} from '../../components/products/portfolio/ft-holdings/lib/etf/holdings.reducer';\r\nimport {ppss as ppssData} from '../../components/products/ppss/ft-ppss/lib/etf/ppss.reducer';\r\nimport {pricingDistribution as pricingDistributionApp} from '../../components/products/pricing-distribution/ft-pricing-distribution/lib/pricing-distribution.reducer';\r\nimport {pricingDistribution as pricingDistributionData} from '../../components/products/pricing-distribution/ft-pricing-distribution/lib/etf/pricing-distribution.reducer';\r\nimport {performanceCumulative as performanceCumulativeData} from '../../components/products/performance/ft-performance-cumulative/lib/etf/performance-cumulative.reducer';\r\nimport {performanceAnnualised as performanceAnnualisedData} from '../../components/products/performance/ft-performance-annualised/lib/etf/performance-annualised.reducer';\r\nimport {calendarYearReturns as calendarYearTabs} from '../../components/products/performance/ft-calendar-year-returns/lib/calendar-year-returns.reducer';\r\nimport {calendarYearReturns} from '../../components/products/performance/ft-calendar-year-returns/lib/etf/calendar-year-returns.reducer';\r\nimport {discreteReturns as discreteTabs} from '../../components/products/performance/ft-discrete-returns/lib/discrete-returns.reducer';\r\nimport {discreteReturns} from '../../components/products/performance/ft-discrete-returns/lib/gw/discrete-returns.reducer';\r\nimport {backtestedPerformanceAnnualised} from '../../components/products/performance/ft-backtested-performance-annualised/lib/etf/backtested-performance-annualised.reducer';\r\nimport {backtestedPerformanceCalendar} from '../../components/products/performance/ft-backtested-performance-calendar/lib/etf/backtested-performance-calendar.reducer';\r\nimport {fundTradingCharacteristics} from '../../components/products/overview/ft-fund-trading-characteristics/lib/etf/fund-trading-characteristics.reducer';\n\r\nexport const reducers = {\r\n products: combineProductsReducers({\r\n general: [ // for all funds\r\n labelLoader,\r\n configurationLoader,\r\n caveatsReducer,\r\n modalReducer,\r\n ppss,\r\n ppssData,\r\n pricingDistributionApp,\r\n performanceCumulativeTabs,\r\n performanceAnnualisedTabs,\r\n calendarYearTabs,\r\n discreteTabs,\r\n holdings,\r\n shareClassFilterReducer\r\n ],\r\n specific: [ // fund specific\r\n geographicAllocation,\r\n performanceCumulativeData,\r\n performanceAnnualisedData,\r\n calendarYearReturns,\r\n discreteReturns,\r\n backtestedPerformanceAnnualised,\r\n backtestedPerformanceCalendar,\r\n marketCapitalisation,\r\n sectorAllocation,\r\n holdingsData,\r\n fundInformation,\r\n fundTradingCharacteristics,\n pricingDistributionData\r\n ]\r\n }),\r\n marketing: combineMarketingReducers([]),\r\n general: generalReducer\r\n};\r\n","import {getInitialState} from '../common/configure';\r\n\r\nexport function getState() {\r\n let state = getInitialState();\r\n\r\n // define default ETF options\r\n state.products.app.ppss.config.showPerformanceTab = false;\r\n state.products.app.ppss.config.showEtfTab = true;\r\n state.products.app.ppss.config.showTer = false;\r\n state.products.app.ppss.config.showOngoingCharges = true;\r\n state.products.app.ppss.config.performanceViewOptions = [];\r\n state.products.app.ppss.currentTable = 'ETF';\r\n\r\n // define etf filters available (day 2 functionality)\r\n\r\n return state;\r\n}\r\n","/**\n * Created by bstjohn on 16/12/2016.\n */\n/**\n * bean configuration for FT.com\n */\nexport const beans = {\n // list of beans for each component\n component: {\n assetMix: ['us.portfolio', 'us.asset-mix-labels'],\n couponRateBreakdown: [\n 'us.portfolio',\n 'us.coupon-rate-breakdown-labels'\n ],\n dailyPricesAndBreakpoints: ['us.fund-price', 'us.daily-prices-and-breakpoints-labels', 'us.fund-overview'],\n distributions: ['us.distributions-labels', 'us.distribution', 'us.fund-config-data', 'us.fund-overview', 'usefulstuff-provider'],\n geographicExposure: [\n 'us.portfolio',\n 'us.geographic-exposure-labels',\n 'us.fund-config-data',\n 'us.fund-info'\n ],\n geographicBreakdown: ['us.portfolio', 'us.geographic-breakdown-labels'],\n ppss: [\n 'us.ppss',\n 'us.ppss-labels-json',\n 'us.fund-config-data-json'\n ],\n pricingAtNav: [\n 'us.fund-price',\n 'us.pricing-at-nav-labels',\n 'us.fund-overview',\n 'us.fund-price-graph&pricingKey=NINTY_DAYS',\n 'us.fund-price-graph&pricingKey=YTD',\n 'us.fund-price-graph&pricingKey=ONE_YEAR',\n 'us.fund-price-graph&pricingKey=FIVE_YEAR',\n 'us.fund-price-graph&pricingKey=TEN_YEAR'\n ],\n portfolioStatisticsAndPositions: ['us.portfolio', 'us.fund-overview', 'us.fund-config-data', 'us.fund-info', 'us.portfolio-statistics-and-positions-labels'],\n assetClassExposure: ['us.portfolio', 'us.asset-class-exposure-labels'],\n currencyDistribution: ['us.portfolio', 'us.currency-breakdown-labels'],\n commoditiesBreakdown: ['us.portfolio', 'us.commodities-breakdown-labels'],\n creditQualityExposure: ['us.portfolio', 'us.credit-quality-exposure-labels'],\n fixedIncomeSectorBreakdown: ['us.portfolio', 'us.fixed-income-sector-breakdown-labels'],\n historicalPerformance: [\n 'us.fund-info',\n 'us.performance-historical',\n 'us.performance-history',\n 'us.history-caveats',\n 'us.fund-config-data',\n 'us.historical-average-annual-total-returns-labels',\n 'us.historical-cumulative-total-returns-labels',\n 'us.historical-after-tax-average-annual-total-returns-labels',\n 'usefulstuff-provider'\n ],\n managerRoster: [\n 'us.portfolio',\n 'us.manager-roster-labels',\n 'us.fund-config-data',\n 'us.fund-info',\n 'us.manager-roster'\n ],\n maturityBreakdown: [\n 'us.portfolio',\n 'us.maturity-breakdown-labels'\n ],\n performanceSimply: [\n 'us.performance',\n 'us.performance-labels'\n ],\n performance: [\n 'us.performance',\n 'us.expenses-volatility-and-benchmarks-details',\n 'us.fund-config-data',\n 'us.fund-overview',\n 'us.expenses-volatility-and-benchmarks-labels',\n 'us.performance-labels',\n 'us.cumulative-total-returns-labels',\n 'us.fund-info'\n ],\n qualityBreakdown: ['us.portfolio', 'us.quality-breakdown-labels'],\n sectorExposure: [\n 'us.portfolio',\n 'us.sector-exposure-labels',\n 'us.fund-config-data',\n 'us.fund-info'\n ],\n strategyBreakdown: ['us.portfolio', 'us.fund-info', 'us.strategy-breakdown-labels'],\n sectorBreakdown: ['us.portfolio', 'us.sector-breakdown-labels'],\n tax: ['us.tax', 'us.fund-tax-info', 'us.tax-caveats', 'us.tax-information-labels', 'us.fund-config-data', 'usefulstuff-provider'],\n topTenHoldings: ['us.portfolio', 'us.top-ten-holdings-labels'],\n topExposures: [\n 'us.portfolio',\n 'us.fund-info',\n 'us.fund-config-data',\n 'us.top-exposures-labels'\n ],\n overview: [\n 'us.fund-overview', 'us.fund-config-data', 'us.overview-labels', 'usefulstuff-provider'\n ],\n reportArchiveA: [\n 'us.report-archive-a'\n ],\n reportArchiveB: [\n 'us.report-archive-b'\n ]\n /*overview: [\n 'us.fund-overview', 'us.distribution', 'us.fund-info', 'us.fund-documents-service', 'us.fund-config-data', 'usefulstuff-provider'\n ]*/\n },\n // parameter map to set in request - key is attribute in action and value is url request key (Map rather than Object as order matters).\n // KEEP in alphabetical order!\n bean: {\n 'us.distribution': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'us.fund-info': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'us.fund-overview': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'us.fund-price': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'us.fund-tax-info': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'us.performance': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'us.performance-labels': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'us.portfolio': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'us.tax': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'us.tax-caveats': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'us.manager-roster': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'us.performance-historical': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'us.performance-history': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'us.history-caveats': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'us.historical-average-annual-total-returns-labels': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'us.historical-cumulative-total-returns-labels': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'us.historical-after-tax-average-annual-total-returns-labels': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'us.report-archive-a': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'us.report-archive-b': {\n parameters: new Map([['fundId', 'FundID']])\n }\n }\n\n};\n","/**\n * Component configuration for FT.com site\n */\nexport const components = [\n 'components/marketing/lists/ft-document-lister/ft-document-lister',\n 'components/marketing/lists/ft-document-lister/ft-document-lister-group',\n 'components/marketing/lists/ft-document-lister/ft-document-lister-group-row',\n 'components/marketing/lists/ft-document-lister/ft-document-lister-link',\n 'components/marketing/lists/ft-document-lister/ft-document-lister-dynamic-link',\n 'components/marketing/lists/ft-document-lister/ft-document-lister-mobilelink',\n // 'components/marketing/lists/ft-document-lister/ft-document-lister-dropdown',\n 'components/marketing/lists/ft-document-lister/ft-document-lister-cell',\n 'components/marketing/lists/ft-report-archive-a/ft-report-archive-a',\n 'components/marketing/lists/ft-report-archive-b/ft-report-archive-b',\n 'components/marketing/layouts/ft-choose-subscription/ft-choose-subscription.js',\n 'components/products/distributions/ft-distributions-ytd/ft-distributions-ytd',\n 'components/products/distributions/ft-distributions/ft-distribution-rate-at-breakpoint',\n 'components/products/distributions/ft-distributions/ft-distributions',\n 'components/products/distributions/ft-distributions/ft-rates-and-yields',\n 'components/products/distributions/ft-distributions/ft-yield-rows',\n 'components/products/historical/ft-historical-average-annual-total-returns/ft-historical-average-annual-total-returns',\n 'components/products/historical/ft-historical-cumulative-total-returns/ft-historical-cumulative-total-returns',\n 'components/products/overview/ft-fund-mmfr-stable-nav-header/ft-fund-mmfr-stable-nav-header',\n 'components/products/overview/ft-fund-nav-header/ft-fund-nav-header',\n 'components/products/overview/ft-fund-price-header/ft-fund-price-header',\n 'components/products/overview/ft-fund-static-bar/ft-fund-static-bar',\n 'components/products/performance/ft-after-tax-average-annual-returns/ft-after-tax-average-annual-returns',\n 'components/products/performance/ft-average-annual-total-returns/ft-average-annual-total-returns',\n 'components/products/performance/ft-calendar-year-returns/en-us-retail/ft-calendar-year-returns',\n 'components/products/performance/ft-expenses-volatility-benchmarks/ft-expenses-volatility-benchmarks',\n 'components/products/performance/ft-performance-cumulative/en-us-retail/ft-performance-cumulative',\n 'components/products/portfolio/ft-asset-class-exposure/ft-asset-class-exposure',\n 'components/products/portfolio/ft-asset-mix/ft-asset-mix',\n 'components/products/portfolio/ft-category-fund-list/ft-category-fund-list',\n 'components/products/portfolio/ft-commodities-sector-breakdown/ft-commodities-sector-breakdown',\n 'components/products/portfolio/ft-coupon-rate-breakdown/ft-coupon-rate-breakdown',\n 'components/products/portfolio/ft-credit-quality-exposure/ft-credit-quality-exposure',\n 'components/products/portfolio/ft-currency-distribution/ft-currency-distribution',\n 'components/products/portfolio/ft-fixed-income-sector-breakdown/ft-fixed-income-sector-breakdown',\n 'components/products/portfolio/ft-geographic-breakdown/en-us-retail/ft-geographic-breakdown',\n 'components/products/portfolio/ft-geographic-exposure/ft-geographic-exposure',\n 'components/products/portfolio/ft-manager-roster/ft-manager-allocation-contents',\n 'components/products/portfolio/ft-manager-roster/ft-manager-name-or-modal',\n 'components/products/portfolio/ft-manager-roster/ft-manager-roster',\n 'components/products/portfolio/ft-manager-roster/ft-manager-roster-contents',\n 'components/products/portfolio/ft-maturity-breakdown/ft-maturity-breakdown',\n 'components/products/portfolio/ft-portfolio-statistics-and-positions/en-us-retail/ft-portfolio-statistics-and-positions',\n 'components/products/portfolio/ft-quality-breakdown/ft-quality-breakdown',\n 'components/products/portfolio/ft-quality-breakdown/ft-quality-breakdown-table',\n 'components/products/portfolio/ft-sector-breakdown/ft-sector-breakdown',\n 'components/products/portfolio/ft-sector-exposure/ft-sector-exposure',\n 'components/products/portfolio/ft-strategy-breakdown/ft-strategy-breakdown',\n 'components/products/portfolio/ft-top-exposures/ft-top-exposures',\n 'components/products/portfolio/ft-top-exposures/ft-top-exposures-display',\n 'components/products/portfolio/ft-top-ten-holdings/ft-top-ten-holdings',\n 'components/products/ppss/ft-find-a-fund/ft-find-a-fund',\n 'components/products/ppss/ft-ppss-favorite/ft-ppss-favorite',\n 'components/products/ppss/ft-ppss-fund-filter/ft-ppss-dropdown',\n 'components/products/ppss/ft-ppss-fund-filter/ft-ppss-fund-filter',\n 'components/products/ppss/ft-ppss-fund-name/ft-ppss-fund-name',\n 'components/products/ppss/ft-ppss-performance/en-us-retail/ft-ppss-performance',\n 'components/products/ppss/ft-ppss-performance/en-us-retail/ft-ppss-performance-row',\n 'components/products/ppss/ft-ppss-ratings/ft-ppss-ratings',\n 'components/products/ppss/ft-ppss-ratings/ft-ppss-ratings-row.html',\n 'components/products/ppss/ft-ppss-search-box/ft-ppss-search-box',\n 'components/products/ppss/ft-ppss-tab-header/ft-ppss-tab-header',\n 'components/products/ppss/ft-ppss-table-toolbar/ft-ppss-table-toolbar',\n 'components/products/ppss/ft-ppss-yield/ft-ppss-yield',\n 'components/products/ppss/ft-ppss-yield/ft-ppss-yield-row',\n 'components/products/ppss/ft-ppss/ft-ppss',\n 'components/products/pricing/ft-daily-prices-and-breakpoints/ft-daily-prices-and-breakpoints',\n 'components/products/pricing/ft-pricing-at-nav/ft-pricing-at-nav',\n 'components/products/pricing/ft-pricing-at-nav/ft-pricing-at-nav-chart',\n 'components/products/tax/ft-tax-information/ft-tax-information',\n 'components/products/tax/ft-additional-tax-information/ft-additional-tax-information'\n\n];\n","import {commonConfigure, getInitialState} from '../common/configure';\nimport {combineProductsReducers} from '../../components/products/lib/combine-products-reducers';\nimport {combineMarketingReducers} from '../../components/marketing/lib/combine-marketing-reducers';\n\n// en-us-retail beans\nimport {beans} from './beans';\n// en-us-retail components\nimport {components} from './components';\n\n// reducers\nimport {general as generalReducer} from '../../lib/general.reducer';\nimport {modalReducer} from '../../components/common/elements/ft-modal/lib/ft-modal.reducer';\nimport {productConfiguration} from '../../components/products/lib/product-configuration-reducer';\nimport {pricingAtNav} from '../../components/products/pricing/ft-pricing-at-nav/lib/pricing-at-nav';\nimport {averageAnnualTotalReturns} from '../../components/products/performance/ft-average-annual-total-returns/lib/average-annual-total-returns.reducer';\nimport {dateDropdownReducer} from '../../components/common/elements/ft-date-dropdown/lib/date-dropdown.reducer';\nimport {shareClassFilter} from '../../components/common/elements/ft-share-class-filter/lib/share-class-filter.reducer';\nimport {calendarYearReturns} from '../../components/products/performance/ft-calendar-year-returns/lib/en-us-retail/calendar-year-returns.reducer';\nimport {afterTaxAverageAnnualReturns} from '../../components/products/performance/ft-after-tax-average-annual-returns/lib/en-us-retail/after-tax-average-annual-returns.reducer';\nimport {afterTaxAverageAnnualReturns as afterTaxAverageAnnualReturnsTab} from '../../components/products/performance/ft-after-tax-average-annual-returns/lib/after-tax-average-annual-returns.reducer';\n// en-us-retail reducers\nimport {additionalTaxInformation} from '../../components/products/tax/ft-additional-tax-information/lib/en-us-retail/additional-tax-information';\nimport {averageAnnualTotalReturns as averageAnnualTotalReturnsUS} from '../../components/products/performance/ft-average-annual-total-returns/lib/en-us-retail/average-annual-total-returns.reducer';\nimport {assetMix} from '../../components/products/portfolio/ft-asset-mix/lib/en-us-retail/asset-mix';\nimport {caveatsReducer} from '../../components/products/lib/caveats-reducer';\nimport {dailyPricesAndBreakpoints} from '../../components/products/pricing/ft-daily-prices-and-breakpoints/lib/en-us-retail/daily-prices-and-breakpoints';\nimport {distributionsCombineReducers} from '../../components/products/distributions/ft-distributions/lib/en-us-retail/distributions-combine.reducers';\nimport {distributionsLabels} from '../../components/products/distributions/ft-distributions/lib/en-us-retail/distributions-labels.reducer';\nimport {expensesVolatilityBenchmarks} from '../../components/products/performance/ft-expenses-volatility-benchmarks/lib/en-us-retail/expenses-volatility-benchmarks.reducer';\nimport {geographicBreakdown} from '../../components/products/portfolio/ft-geographic-breakdown/lib/en-us-retail/geographic-breakdown.reducer';\nimport {couponRateBreakdown} from '../../components/products/portfolio/ft-coupon-rate-breakdown/lib/en-us-retail/coupon-rate-breakdown.reducer';\nimport {couponRateBreakdownLabels} from '../../components/products/portfolio/ft-coupon-rate-breakdown/lib/en-us-retail/coupon-rate-breakdown-labels.reducer';\nimport {geographicExposure} from '../../components/products/portfolio/ft-geographic-exposure/lib/en-us-retail/geographic-exposure';\nimport {historicalAverageAnnualTotalReturns} from '../../components/products/historical/ft-historical-average-annual-total-returns/lib/en-us-retail/historical-average-annual-total-returns.reducer';\nimport {historicalCumulativeTotalReturns} from '../../components/products/historical/ft-historical-cumulative-total-returns/lib/en-us-retail/historical-cumulative-total-returns.reducer';\nimport {managerRoster} from '../../components/products/portfolio/ft-manager-roster/lib/en-us-retail/manager-roster.reducer';\nimport {maturityBreakdown} from '../../components/products/portfolio/ft-maturity-breakdown/lib/en-us-retail/maturity-breakdown.reducer';\nimport {maturityBreakdownLabels} from '../../components/products/portfolio/ft-maturity-breakdown/lib/en-us-retail/maturity-breakdown-labels.reducer';\nimport {performanceCumulative} from '../../components/products/performance/ft-performance-cumulative/lib/en-us-retail/performance-cumulative.reducer';\nimport {performanceCumulative as performanceCumulativeUS} from '../../components/products/performance/ft-performance-cumulative/lib/en-us-retail/performance-cumulative.reducer';\nimport {ppss} from '../../components/products/ppss/ft-ppss/lib/ppss.reducer';\nimport {ppss as ppssUS} from '../../components/products/ppss/ft-ppss/lib/en-us-retail/ppss.reducer';\nimport {pricingAtNav as pricingAtNavUS} from '../../components/products/pricing/ft-pricing-at-nav/lib/en-us-retail/pricing-at-nav';\nimport {pricingAtNavLabels} from '../../components/products/pricing/ft-pricing-at-nav/lib/en-us-retail/pricing-at-nav-labels';\nimport {qualityBreakdown} from '../../components/products/portfolio/ft-quality-breakdown/lib/en-us-retail/quality-breakdown';\nimport {topTenHoldings} from '../../components/products/portfolio/ft-top-ten-holdings/lib/en-us-retail/top-ten-holdings.reducer';\nimport {portfolioStatisticsAndPositions} from '../../components/products/portfolio/ft-portfolio-statistics-and-positions/lib/en-us-retail/portfolio-statistics-and-positions.reducer';\nimport {assetClassExposure} from '../../components/products/portfolio/ft-asset-class-exposure/lib/en-us-retail/asset-class-exposure.reducer';\nimport {sectorExposure} from '../../components/products/portfolio/ft-sector-exposure/lib/en-us-retail/sector-exposure.reducer';\nimport {sectorBreakdown} from '../../components/products/portfolio/ft-sector-breakdown/lib/en-us-retail/sector-breakdown';\nimport {strategyBreakdown} from '../../components/products/portfolio/ft-strategy-breakdown/lib/en-us-retail/strategy-breakdown.reducer';\nimport {strategyBreakdownLabels} from '../../components/products/portfolio/ft-strategy-breakdown/lib/en-us-retail/strategy-breakdown-labels.reducer';\nimport {taxInformation} from '../../components/products/tax/ft-tax-information/lib/tax-information';\nimport {taxLabels} from '../../components/products/tax/ft-tax-information/lib/tax-labels-reducer';\nimport {currencyDistribution} from '../../components/products/portfolio/ft-currency-distribution/lib/en-us-retail/currency-distribution.reducer';\nimport {creditQualityExposure} from '../../components/products/portfolio/ft-credit-quality-exposure/lib/en-us-retail/credit-quality-exposure.reducer';\nimport {topExposures} from '../../components/products/portfolio/ft-top-exposures/lib/en-us-retail/top-exposures.reducer';\nimport {topExposuresLabels} from '../../components/products/portfolio/ft-top-exposures/lib/en-us-retail/top-exposures-labels.reducer';\nimport {fixedIncomeSectorBreakdown} from '../../components/products/portfolio/ft-fixed-income-sector-breakdown/lib/en-us-retail/fixed-income-sector-breakdown.reducer';\nimport {commoditiesSectorBreakdown} from '../../components/products/portfolio/ft-commodities-sector-breakdown/lib/en-us-retail/commodities-sector-breakdown.reducer';\nimport {fundStaticBar} from '../../components/products/overview/ft-fund-static-bar/lib/en-us-retail/fund-static-bar.reducer';\nimport {reportArchiveA} from '../../components/marketing/lists/ft-report-archive-a/lib/en-us-retail/report-archive-a.reducer';\nimport {reportArchiveB} from '../../components/marketing/lists/ft-report-archive-b/lib/en-us-retail/report-archive-b.reducer';\n/**\n * Configuration for en-us-retail\n * @param aurelia\n */\n\nexport function configure(aurelia) {\n let usProductReducers = {\n general: [ // for all funds\n afterTaxAverageAnnualReturnsTab,\n averageAnnualTotalReturns,\n caveatsReducer,\n couponRateBreakdownLabels,\n distributionsLabels,\n maturityBreakdownLabels,\n modalReducer,\n dateDropdownReducer,\n performanceCumulative,\n ppss,\n ppssUS,\n pricingAtNav,\n pricingAtNavLabels,\n productConfiguration,\n strategyBreakdownLabels,\n taxLabels,\n topExposuresLabels\n ],\n specific: [ // fund specific\n additionalTaxInformation,\n afterTaxAverageAnnualReturns,\n assetClassExposure,\n assetMix,\n averageAnnualTotalReturnsUS,\n calendarYearReturns,\n commoditiesSectorBreakdown,\n couponRateBreakdown,\n creditQualityExposure,\n currencyDistribution,\n dailyPricesAndBreakpoints,\n distributionsCombineReducers,\n expensesVolatilityBenchmarks,\n fixedIncomeSectorBreakdown,\n fundStaticBar,\n geographicBreakdown,\n geographicExposure,\n historicalAverageAnnualTotalReturns,\n historicalCumulativeTotalReturns,\n managerRoster,\n maturityBreakdown,\n performanceCumulativeUS,\n portfolioStatisticsAndPositions,\n pricingAtNavUS,\n qualityBreakdown,\n sectorBreakdown,\n sectorExposure,\n shareClassFilter,\n strategyBreakdown,\n taxInformation,\n topExposures,\n topTenHoldings\n ]\n };\n let usMarketingReducers = [\n reportArchiveA,\n reportArchiveB\n ];\n // update initial state of redux store\n // TODO do we still need this?\n let initialState = getInitialState();\n if (! initialState.products) {\n initialState.products = {};\n }\n if (! initialState.products.funds) {\n initialState.products.funds = {};\n }\n\n // define US ppss options\n initialState.products.app.ppss.config.showYieldTab = true;\n initialState.products.app.ppss.config.showRatingsTab = true;\n initialState.products.app.ppss.config.showPerformanceToggle = false;\n initialState.products.app.ppss.config.showSalesChargeToggle = true;\n initialState.products.app.ppss.config.showExpensesAndSalesInfo = true;\n initialState.products.app.ppss.config.showFavorites = true;\n initialState.products.app.ppss.config.showPeriodEnd = true;\n initialState.products.app.ppss.config.performanceViewOptions = [\n {name: 'AVG_ANNUAL', labelKey: 'avg-annual'}\n ];\n initialState.products.app.ppss.display.performanceView = 'AVG_ANNUAL_QUARTERLY';\n // define ppss filters available\n initialState.products.app.ppss.filters = {\n favorites: true, // {myFavoritesOnly: true},\n dropdowns: [{\n name: 'ASSET_CLASS',\n labelKey: 'assetclass',\n dataKey: 'assetClass',\n selected: {value: 'Equity', label: 'Equity'}\n }, {\n name: 'FUND_CATEGORY',\n labelKey: 'fundcategory',\n dataKey: 'fundObjective',\n selected: {value: 'ALL', label: 'All'}\n }, {\n name: 'REGION',\n labelKey: 'region',\n dataKey: 'region',\n selected: {value: 'ALL', label: 'All'}\n }, {\n name: 'MORNINGSTAR_RATING',\n labelKey: 'morningstar-rating',\n dataKey: 'mStarRatingOverall',\n selected: {value: [3, 4, 5], label: '3 +'}\n }, {\n name: 'SHARE_CLASS',\n labelKey: 'shareclass',\n dataKey: 'shareClass',\n selected: {value: ['C', 'C1'], label: 'C & C1'}\n }],\n keywords: {\n searchKeys: ['symbol', 'fundShortName', 'fundId', 'fundLegalName'],\n searchString: ''\n }\n };\n initialState.products.app.ppss.sort.columns.set('YTD_TOTAL_RETURN_AT_NAV', {\n dataKey: 'ytdTotalReturnAtNav',\n direction: null,\n isNumeric: true\n });\n // yield columns\n initialState.products.app.ppss.sort.columns.set('DISTRIBUTION_RATE', {\n baseDataKey: 'distRateAt',\n direction: null,\n isNumeric: true\n });\n initialState.products.app.ppss.sort.columns.set('SEC_YIELD', {\n dataKey: 'secYield',\n direction: null,\n isNumeric: true\n });\n // ratings columns\n initialState.products.app.ppss.sort.columns.set('MSTAR_CATEGORY', {\n dataKey: 'mStarCategory',\n direction: null,\n isNumeric: false\n });\n initialState.products.app.ppss.sort.columns.set('MSTAR_OVERALL', {\n dataKey: 'mStarRatingOverall',\n direction: null,\n isNumeric: true\n });\n initialState.products.app.ppss.sort.columns.set('MSTAR_RATING_3_YEAR', {\n dataKey: 'mStarRating3Yr',\n direction: null,\n isNumeric: true\n });\n initialState.products.app.ppss.sort.columns.set('MSTAR_RATING_5_YEAR', {\n dataKey: 'mStarRating5Yr',\n direction: null,\n isNumeric: true\n });\n initialState.products.app.ppss.sort.columns.set('MSTAR_RATING_10_YEAR', {\n dataKey: 'mStarRating10Yr',\n direction: null,\n isNumeric: true\n });\n initialState.products.app.ppss.sort.columns.set('RATING_3_YEAR_UNIV', {\n dataKey: 'rating3YearsUniv',\n direction: null,\n isNumeric: true\n });\n initialState.products.app.ppss.sort.columns.set('RATING_5_YEAR_UNIV', {\n dataKey: 'rating5YearsUniv',\n direction: null,\n isNumeric: true\n });\n initialState.products.app.ppss.sort.columns.set('RATING_10_YEAR_UNIV', {\n dataKey: 'rating10YearsUniv',\n direction: null,\n isNumeric: true\n });\n\n commonConfigure(aurelia, {\n site: 'en-us-gw',\n reducers: {\n products: combineProductsReducers(usProductReducers),\n marketing: combineMarketingReducers(usMarketingReducers),\n general: generalReducer\n },\n state: initialState,\n beans: beans,\n components: components\n });\n}\n","/**\n * Created by bstjohn on 16/12/2016.\n */\n/**\n * bean configuration for FT.com\n */\nexport const beans = {\n // list of beans for each component\n component: {\n labels: [\n 'gw.marketing-component-labels'\n ],\n ppss: [\n 'gw.ppss',\n 'gw.ppss-labels',\n 'gw.fund-config'\n ],\n portfolioBreakdown: ['gw.portfolio', 'gw.funddetail', 'gw.portfolio-breakdown-labels', 'usefulstuff-provider'],\n portfolioGeographicalBreakdown: ['gw.portfolio', 'gw.geographic-breakdown-labels'],\n portfolioMarketCapitalisation: ['gw.portfolio', 'gw.market-capitalisation-labels'],\n portfolioStatisticsAndPositions: ['gw.portfolio', 'gw.funddetail', 'gw.portfolio-statistics-and-positions-labels', 'usefulstuff-provider'],\n performance: [\n 'gw.performance',\n 'gw.performance-labels',\n 'gw.performance-history',\n 'gw.fund-config'\n ],\n performanceSimply: [\n 'gw.performance',\n 'gw.performance-labels',\n 'gw.fund-config'\n ],\n pricingDistribution: [\n 'gw.price-distribution',\n 'gw.price-distribution-labels'\n ],\n fundInformation: [\n 'gw.funddetail', 'gw.labels'\n ]\n },\n // parameter map to set in request - key is attribute in action and value is url request key (Map rather than Object as order matters).\n // KEEP in alphabetical order!\n bean: {\n 'gw.price-distribution': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'gw.performance': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'gw.performance-history': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'gw.funddetail': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'gw.portfolio': {\n parameters: new Map([['fundId', 'FundID']])\n }\n /*'us.distribution': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'us.fund-info': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'us.fund-overview': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'us.fund-price': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'us.fund-tax-info': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'us.performance': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'us.performance-labels': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'us.portfolio': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'us.tax': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'us.tax-caveats': {\n parameters: new Map([['fundId', 'FundID']])\n },\n 'us.manager-roster': {\n parameters: new Map([['fundId', 'FundID']])\n }*/\n }\n};\n","/**\n * Created by bstjohn on 16/12/2016.\n */\n/**\n * Component configuration for FT.com site\n */\nexport const components = [\n 'components/marketing/grids/ft-grid-filter-dropdown/ft-grid-filter-dropdown',\n 'components/marketing/grids/ft-grid-filter-form/ft-grid-filter-form',\n 'components/marketing/grids/ft-grid-filter/ft-grid-filter',\n 'components/marketing/lists/ft-document-lister/ft-document-lister',\n 'components/marketing/lists/ft-document-lister/ft-document-lister-cell',\n 'components/marketing/lists/ft-document-lister/ft-document-lister-dynamic-link',\n 'components/marketing/lists/ft-document-lister/ft-document-lister-group',\n 'components/marketing/lists/ft-document-lister/ft-document-lister-group-row',\n 'components/marketing/lists/ft-document-lister/ft-document-lister-link',\n 'components/marketing/lists/ft-document-lister/ft-document-lister-mobilelink',\n 'components/marketing/lists/ft-document-lister/ft-document-lister-cell',\n 'components/marketing/lists/ft-report-archive-a/ft-report-archive-a',\n 'components/marketing/lists/ft-report-archive-b/ft-report-archive-b',\n 'components/marketing/lists/ft-report-archive-c/ft-report-archive-c',\n 'components/marketing/lists/ft-report-archive-d/ft-report-archive-d',\n 'components/marketing/layouts/ft-sticky-tabs/ft-sticky-tabs',\n 'components/marketing/layouts/ft-sticky-tabs/ft-sticky-tabs-content',\n 'components/marketing/layouts/ft-sticky-tabs/ft-sticky-tabs-label',\n 'components/marketing/layouts/ft-choose-subscription/ft-choose-subscription',\n 'components/marketing/layouts/ft-choose-subscription/ft-choose-subscription-step1',\n 'components/marketing/layouts/ft-choose-subscription/ft-choose-subscription-step2',\n 'components/marketing/layouts/ft-choose-subscription/ft-choose-subscription-step3',\n 'components/marketing/video/ft-video-switch/ft-video-switch',\n 'components/products/performance/ft-calendar-year-returns/ft-calendar-year-returns',\n 'components/products/performance/ft-performance-cumulative/ft-performance-cumulative',\n 'components/products/performance/ft-performance-cumulative/ft-performance-cumulative-chart',\n 'components/products/performance/ft-performance-annualised/ft-performance-annualised',\n 'components/products/performance/ft-discrete-returns/ft-discrete-returns',\n 'components/products/portfolio/ft-geographic-breakdown/ft-geographic-breakdown',\n 'components/products/portfolio/ft-market-capitalisation/ft-market-capitalisation',\n 'components/products/portfolio/ft-portfolio-statistics-and-positions/ft-portfolio-statistics-and-positions',\n 'components/products/ppss/ft-find-a-fund/ft-find-a-fund',\n 'components/products/ppss/ft-ppss-favorite/ft-ppss-favorite',\n 'components/products/ppss/ft-ppss-fund-filter/ft-ppss-dropdown',\n 'components/products/ppss/ft-ppss-fund-filter/ft-ppss-fund-filter',\n 'components/products/ppss/ft-ppss-fund-identifiers/ft-ppss-fund-identifiers',\n 'components/products/ppss/ft-ppss-fund-identifiers/ft-ppss-fund-identifiers-row',\n 'components/products/ppss/ft-ppss-fund-name/ft-ppss-fund-name',\n 'components/products/ppss/ft-ppss-performance/ft-ppss-performance',\n 'components/products/ppss/ft-ppss-performance/ft-ppss-performance-row',\n 'components/products/ppss/ft-ppss-search-box/ft-ppss-search-box',\n 'components/products/ppss/ft-ppss-tab-header/ft-ppss-tab-header',\n 'components/products/ppss/ft-ppss-table-toolbar/ft-ppss-table-toolbar',\n 'components/products/ppss/ft-ppss/ft-ppss',\n 'components/products/pricing-distribution/ft-dividends/ft-dividends',\n 'components/products/pricing-distribution/ft-dividends-historical/ft-dividends-historical',\n 'components/products/pricing-distribution/ft-nav-high-low/ft-nav-high-low',\n 'components/products/pricing-distribution/ft-pricing-distribution/ft-pricing-distribution',\n 'components/products/pricing-distribution/ft-share-prices/ft-share-prices',\n 'components/products/overview/ft-fund-information/ft-fund-information'\n];\n","import {commonConfigure} from '../common/configure';\n\n// gw beans\nimport {beans} from './beans';\n// gw components\nimport {components} from './components';\n// gw reducers\nimport {reducers} from './reducers';\n// gw initial state\nimport {getState} from './state';\n\n/**\n * generic configuration for gw\n * @param aurelia\n */\n\nexport function configure(aurelia) {\n // get initial state of redux store\n let state = getState();\n\n commonConfigure(aurelia, {\n reducers,\n state,\n beans,\n components\n });\n}\n","\r\nimport {combineProductsReducers} from '../../components/products/lib/combine-products-reducers';\r\nimport {combineMarketingReducers} from '../../components/marketing/lib/combine-marketing-reducers';\r\n\r\n// reducers\r\nimport {general as generalReducer} from '../../lib/general.reducer';\r\nimport {labelLoader} from '../../components/products/lib/label-loader.reducer';\r\nimport {modalReducer} from '../../components/common/elements/ft-modal/lib/ft-modal.reducer';\r\nimport {modalInlineReducer} from '../../components/common/elements/ft-modal-inline/lib/ft-modal-inline.reducer';\r\nimport {gridFilter} from '../../components/marketing/grids/ft-grid-filter/lib/grid-filter.reducer';\r\nimport {gridFilterForm} from '../../components/marketing/grids/ft-grid-filter-form/lib/grid-filter-form.reducer';\r\nimport {productConfiguration} from '../../components/products/lib/product-configuration-reducer';\r\nimport {caveatsReducer} from '../../components/products/lib/caveats-reducer';\r\nimport {ppss} from '../../components/products/ppss/ft-ppss/lib/ppss.reducer';\r\n// gw reducers\r\nimport {ppss as ppssGW} from '../../components/products/ppss/ft-ppss/lib/gw/ppss.reducer';\r\nimport {pricingDistribution as pricingDistributionGW} from '../../components/products/pricing-distribution/ft-pricing-distribution/lib/gw/pricing-distribution.reducer';\r\nimport {performanceCumulative as performanceCumulativeTabs} from '../../components/products/performance/ft-performance-cumulative/lib/performance-cumulative.reducer';\r\nimport {performanceCumulative as performanceCumulativeGW} from '../../components/products/performance/ft-performance-cumulative/lib/gw/performance-cumulative.reducer';\r\nimport {performanceAnnualised as performanceAnnualisedTabs} from '../../components/products/performance/ft-performance-annualised/lib/performance-annualised.reducer';\r\nimport {performanceAnnualised as performanceAnnualisedGW} from '../../components/products/performance/ft-performance-annualised/lib/gw/performance-annualised.reducer';\r\nimport {calendarYearReturns as calendarYearTabs} from '../../components/products/performance/ft-calendar-year-returns/lib/calendar-year-returns.reducer';\r\nimport {calendarYearReturns as calendarYearReturnsGW} from '../../components/products/performance/ft-calendar-year-returns/lib/gw/calendar-year-returns.reducer';\r\nimport {fundInformation} from '../../components/products/overview/ft-fund-information/lib/gw/fund-information.reducer';\r\nimport {discreteReturns as discreteTabs} from '../../components/products/performance/ft-discrete-returns/lib/discrete-returns.reducer';\r\nimport {discreteReturns} from '../../components/products/performance/ft-discrete-returns/lib/gw/discrete-returns.reducer';\r\n\r\n// ** Portfolio components\r\nimport {portfolioStatisticsAndPositions as portfolioStatisticsAndPositionsGW} from '../../components/products/portfolio/ft-portfolio-statistics-and-positions/lib/gw/portfolio-statistics-and-positions.reducer';\r\nimport {geographicBreakdown} from '../../components/products/portfolio/ft-geographic-breakdown/lib/gw/geographic-breakdown.reducer';\r\nimport {marketCapitalisation} from '../../components/products/portfolio/ft-market-capitalisation/lib/gw/market-capitalisation.reducer';\r\n\r\n// **\r\nimport {reportArchiveA} from '../../components/marketing/lists/ft-report-archive-a/lib/gw/report-archive-a.reducer';\r\nimport {reportArchiveB} from '../../components/marketing/lists/ft-report-archive-b/lib/gw/report-archive-b.reducer';\r\nimport {ftVideoSwitch} from '../../components/marketing/video/ft-video-switch/lib/gw/ft-video-switch.reducer';\r\nimport {ftDocumentLister} from '../../components/marketing/lists/ft-document-lister/lib/gw/ft-document-lister.reducer';\r\nimport {ftTypeAheadSearch} from '../../components/marketing/common/elements/ft-type-ahead-search/lib/gw/ft-type-ahead-search.reducer';\r\nimport {ftMultiSelectBar} from '../../components/marketing/common/elements/ft-multi-select-bar/lib/gw/ft-multi-select-bar.reducer';\r\n\r\nexport const reducers = {\r\n products: combineProductsReducers({\r\n general: [ // for all funds\r\n labelLoader,\r\n caveatsReducer,\r\n modalReducer,\r\n modalInlineReducer,\r\n ppss,\r\n ppssGW,\r\n productConfiguration,\r\n performanceCumulativeTabs,\r\n performanceAnnualisedTabs,\r\n calendarYearTabs,\r\n discreteTabs\r\n ],\r\n specific: [ // fund specific\r\n geographicBreakdown,\r\n portfolioStatisticsAndPositionsGW,\r\n marketCapitalisation,\r\n performanceCumulativeGW,\r\n performanceAnnualisedGW,\r\n calendarYearReturnsGW,\r\n fundInformation,\r\n discreteReturns,\r\n pricingDistributionGW\r\n ]\r\n }),\r\n marketing: combineMarketingReducers([\r\n gridFilter,\r\n gridFilterForm,\r\n reportArchiveA,\r\n reportArchiveB,\r\n ftVideoSwitch,\r\n ftDocumentLister,\r\n ftTypeAheadSearch,\r\n ftMultiSelectBar\r\n ]),\r\n general: generalReducer\r\n};\r\n","import {getInitialState} from '../common/configure';\r\n\r\nexport function getState() {\r\n let state = getInitialState();\r\n\r\n // define UK ppss options\r\n state.products.app.ppss.config.showFundIdentifiersTab = true;\r\n\r\n // define ppss filters available\r\n state.products.app.ppss.filters = {\r\n favorites: false,\r\n dropdowns: [],\r\n keywords: {\r\n searchKeys: ['fundShortName', 'fundId', 'fundLegalName'],\r\n searchString: ''\r\n }\r\n };\r\n\r\n return state;\r\n}\r\n","import {inject/*, LogManager*/} from 'aurelia-framework';\n// const logger = LogManager.getLogger('performance-annualised');\n\n@inject('Store', Element)\nexport class shareClassLinkListenerCustomAttribute {\n constructor(store, element) {\n this.element = element;\n store.subscribe(() => this.mapState(store.getState()));\n }\n\n queryStringToJSON(href) {\n let params = href.slice(1).split('&');\n let result = {};\n\n for (let param of params) {\n param = param.split('=');\n result[param[0]] = decodeURIComponent(param[1] || '');\n }\n\n return JSON.parse(JSON.stringify(result));\n }\n\n mapState(newState) {\n try {\n let currentPath = this.element.pathname;\n let currentQueryObject = this.queryStringToJSON(this.element.search);\n\n let storeFundId = newState.products.app.currentFundId;\n let storeShareClass = newState.products.app.currentShareClass;\n\n let newFundId;\n let newShareClass;\n\n if (storeFundId !== 0) {\n newFundId = (storeFundId === currentQueryObject['FundID']) ? currentQueryObject['FundID'] : storeFundId;\n } else {\n newFundId = currentQueryObject['FundID'];\n }\n\n if (storeShareClass !== '') {\n newShareClass = (storeShareClass === currentQueryObject['ShareClass']) ? currentQueryObject['ShareClass'] : storeShareClass;\n } else {\n newShareClass = currentQueryObject['ShareClass'];\n }\n\n let newHref = currentPath + '?' + 'FundID=' + newFundId + '&ShareClass=' + newShareClass;\n this.element.href = newHref;\n } catch (e) {\n //logger.error(e);\n }\n }\n\n}\n","import {bindable, useView, computedFrom} from 'aurelia-framework';\nimport {FtChart} from './ft-chart';\n\n@useView('./ft-chart.html')\nexport class FtBarChart extends FtChart {\n // @bindable options;\n\n @bindable data = [];\n @bindable suffix = '';\n @bindable prefix = '';\n @bindable type = '';\n\n @computedFrom('data', 'suffix', 'prefix', 'type')\n get series() {\n return this.data;\n }\n get options() {\n let suffix = this.suffix;\n let prefix = this.prefix;\n let type = this.type;\n let _self = this;\n\n return {\n chart: {\n colorByPoint: true,\n type: type\n },\n colors: [\n '#005598', '#4e9d2d', '#00a0dc', '#333333', '#ed7700',\n '#8a1811', '#163758', '#81bb00', '#5fc0eb', '#767676',\n '#f7bb00', '#cb0000', '#bad583', '#a5d7f5', '#a7a7a7',\n '#f5db8b', '#d3e3b0', '#DBEFFB', '#c9c9c9', '#e8e8e8'\n ],\n tooltip: {\n formatter: function() {\n if (_self.data.length > 1) {\n return `${this.point.name}<br /><span style=\"font-size:14px;color:${this.point.series.color}\">${this.point.series.name}</span>${prefix}${Highcharts.numberFormat(this.point.y, 2)}${suffix}`;\n }\n return `${this.point.name}<br />${prefix}${Highcharts.numberFormat(this.point.y, 2)}${suffix}`;\n }\n },\n xAxis: {\n type: 'category',\n labels: {\n enabled: (this.data.length > 1)\n }\n },\n yAxis: {\n title: {\n enabled: false\n },\n labels: {\n useHTML: true,\n formatter: function() {\n return `${prefix}${Highcharts.numberFormat(this.value, 1)}${suffix}`;\n }\n }\n },\n legend: {\n enabled: (this.data.length > 1),\n align: 'left',\n verticalAlign: 'top',\n layout: 'horizontal',\n x: 0,\n symbolRadius: 0,\n itemHoverStyle: {\n cursor: 'default'\n }\n },\n plotOptions: {\n series: {\n events: {\n legendItemClick: function() {\n return false;\n }\n },\n dataLabels: {\n enabled: !(this.data.length > 1),\n align: 'left',\n inside: true,\n formatter: function() {\n return this.point.name;\n },\n style: {\n color: '#000',\n fontWeight: 'normal',\n textTransform: 'uppercase',\n opacity: '1',\n textOutline: false\n }\n }\n }\n }\n };\n }\n\n dataChanged() {\n this.updateChart();\n }\n\n}\n","import {\n bindable,\n inject\n} from 'aurelia-framework';\nimport merge from 'lodash/merge';\nimport isArray from 'lodash/isArray';\nimport isObjectLike from 'lodash/isObjectLike';\n// import {LogManager} from 'aurelia-framework';\n// const logger = LogManager.getLogger( 'ft-chart' );\n\n@inject( Element )\nexport class FtChart {\n @bindable options;\n @bindable series = [];\n\n chart;\n newChartOnUpdate = false; // determines which update animation method to use - depends on data which method looks best\n\n defaultOptions = {\n credits: {\n enabled: false\n },\n exporting: {\n enabled: false\n },\n legend: {\n enabled: false\n },\n title: {\n text: ''\n }\n };\n\n constructor( element ) {\n this.element = element;\n }\n\n attached() {\n let newOpts = this.mergeOptions();\n newOpts.series = this._getSeriesAsArray();\n this.chart = Highcharts.chart( this.element, newOpts );\n\n $( '.tab-pane' ).attrchange( {\n trackValues: true,\n callback: e => {\n // logger.debug( this.chart );\n this.updateChart();\n // this.chart.reflow();\n return;\n }\n } );\n }\n\n mergeOptions() {\n // this can be overriden in sub-classes\n let newOpts = merge( {}, this.defaultOptions, this.options );\n return newOpts;\n }\n\n updateChart() {\n if ( this.chart ) {\n /*\n Update Options.\n Do this before updating the series, so it doesn't block the animation\n */\n let newOpts = this.mergeOptions();\n let newSeriesArr = this._getSeriesAsArray();\n\n if ( this.newChartOnUpdate ) {\n // this animation update method destroys the old one and draws a new chart from scratch\n if ( this.chart ) {\n newOpts.series = newSeriesArr;\n this.chart.destroy();\n this.chart = Highcharts.chart( this.element, newOpts );\n }\n } else {\n /*\n Merge in new series.\n Rather than delete data, and start again, update existing series data, so that chart re-animates\n */\n this.chart.update( newOpts );\n if ( this.chart && this.chart.series ) {\n this.chart.series.forEach( s => {\n if ( newSeriesArr.length ) {\n s.setData( newSeriesArr.shift().data );\n } else {\n s.remove();\n }\n } );\n if ( newSeriesArr.length ) {\n newSeriesArr.forEach( s => {\n this.chart.addSeries( s );\n } );\n }\n }\n }\n }\n }\n\n optionsChanged() {\n this.updateChart();\n }\n\n seriesChanged() {\n this.updateChart();\n }\n\n // accomodate single series i.e. {} in addition to []\n _getSeriesAsArray() {\n if ( isArray( this.series ) ) {\n return this.series.slice(); // take a copy of series, so we're safe to make changes\n } else if ( isObjectLike( this.series ) ) {\n return [ Object.assign( {}, this.series ) ];\n }\n return;\n }\n}\n","import {\n bindable,\n useView,\n computedFrom\n} from 'aurelia-framework';\nimport {FtChart} from './ft-chart';\n// import {LogManager} from 'aurelia-framework';\n// const logger = LogManager.getLogger('ft-chart');\n\n@useView( './ft-chart.html' )\nexport class FtColumnChart extends FtChart {\n // @bindable options;\n\n @bindable data = [];\n @bindable suffix = '';\n @bindable prefix = '';\n @bindable type = '';\n @bindable categories = '';\n @bindable ytitle = '';\n\n @computedFrom( 'data', 'suffix', 'prefix', 'type', 'categories', 'ytitle' )\n get series() {\n return this.data;\n }\n newChartOnUpdate = true;\n get options() {\n let suffix = this.suffix;\n let prefix = this.prefix;\n let type = this.type;\n let categories = this.categories;\n let ytitle = this.ytitle;\n let ytitleEnabled = ( ytitle !== '' ) ? true : false;\n let _self = this;\n\n return {\n chart: {\n colorByPoint: true,\n type: type\n // width: $('.tab-pane.active').width()\n },\n colors: [\n '#005598', '#4e9d2d', '#00a0dc', '#333333', '#ed7700',\n '#8a1811', '#163758', '#81bb00', '#5fc0eb', '#767676',\n '#f7bb00', '#cb0000', '#bad583', '#a5d7f5', '#a7a7a7',\n '#f5db8b', '#d3e3b0', '#DBEFFB', '#c9c9c9', '#e8e8e8'\n ],\n tooltip: {\n formatter: function() {\n if ( _self.data.length > 1 ) {\n return `${this.point.name}<br />${prefix}${Highcharts.numberFormat(this.point.y, 2)}${suffix}`;\n }\n return `${this.point.name}<br />${prefix}${Highcharts.numberFormat(this.point.y, 2)}${suffix}`;\n }\n },\n xAxis: {\n categories: categories\n },\n yAxis: {\n title: {\n enabled: ytitleEnabled,\n text: ytitle\n },\n labels: {\n useHTML: true,\n formatter: function() {\n return `${prefix}${Highcharts.numberFormat(this.value, 1)}${suffix}`;\n }\n }\n },\n legend: {\n enabled: false,\n align: 'left',\n verticalAlign: 'top',\n layout: 'horizontal',\n x: 0,\n symbolRadius: 0,\n itemHoverStyle: {\n cursor: 'default'\n }\n },\n plotOptions: {\n series: {\n events: {\n legendItemClick: function() {\n return false;\n }\n },\n animation: {\n duration: 2000,\n easing: 'easeIn'\n },\n dataLabels: {\n enabled: false\n }\n }\n }\n };\n }\n\n dataChanged() {\n this.updateChart();\n }\n}\n","/**\n * Created by bstjohn on 26/10/2016.\n */\nimport {bindable, inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../lib/redux-component-base';\n\n@inject('Store', Element)\nexport class FtInfoModal extends ReduxComponentBase {\n @bindable modalId;\n @bindable content;\n @bindable srText;\n @bindable close;\n\n constructor(store) {\n super(store);\n }\n\n show = (contents) => {\n this.dispatch({\n type: 'OPEN_MODAL',\n contents\n });\n };\n\n attached() {\n // TODO: add jQuery to the build at some point, or find a non-jQuery solution i.e. direct DOM manipulation\n //jQuery(this.modal).infoModal();\n }\n}\n","import {bindable, useView, computedFrom} from 'aurelia-framework';\r\nimport {FtChart} from './ft-chart';\r\n\r\n@useView('./ft-chart.html')\r\nexport class FtPieChart extends FtChart {\r\n // @bindable options;\r\n\r\n @bindable data = [];\r\n @bindable suffix = '';\r\n @bindable prefix = '';\r\n\r\n\r\n @computedFrom('data', 'seriesName', 'navDecimal', 'prefix')\r\n get series() {\r\n // this.data.forEach((series) => {\r\n // series.data.forEach((val, index) => {\r\n // if (val.y === 0) {\r\n // delete series.data[index];\r\n // }\r\n // });\r\n // });\r\n return this.data;\r\n }\r\n get options() {\r\n let suffix = this.suffix;\r\n let prefix = this.prefix;\r\n\r\n return {\r\n colors: [\r\n '#005598', '#4e9d2d', '#00a0dc', '#333333', '#ed7700',\r\n '#8a1811', '#163758', '#81bb00', '#5fc0eb', '#767676',\r\n '#f7bb00', '#cb0000', '#bad583', '#a5d7f5', '#a7a7a7',\r\n '#f5db8b', '#d3e3b0', '#DBEFFB', '#c9c9c9', '#e8e8e8'\r\n ],\r\n tooltip: {\r\n formatter: function() {\r\n return `${this.point.name}<br />${prefix}${Highcharts.numberFormat(this.point.y, 2)}${suffix}`;\r\n }\r\n },\r\n plotOptions: {\r\n pie: {\r\n allowPointSelect: true,\r\n dataLabels: {\r\n enabled: false\r\n },\r\n size: 304,\r\n innerSize: '50%'\r\n }\r\n }\r\n };\r\n }\r\n\r\n dataChanged() {\r\n this.updateChart();\r\n }\r\n\r\n}\r\n","// import { LogManager } from 'aurelia-framework';\r\n// const logger = LogManager.getLogger('doc-lister-link');\r\n\r\nexport class FtFilterValueConverter {\r\n toView(items, key, value) {\r\n if (key === '' || key === undefined) return items;\r\n if (value === '' || value === undefined) return items;\r\n return items.filter((item) => {\r\n return item[key] === value;\r\n });\r\n // return items.filter((item) => item[key].includes(value));\r\n }\r\n}\r\n","// import { LogManager } from 'aurelia-framework';\r\n// const logger = LogManager.getLogger('doc-lister-link');\r\n\r\nexport class FtLengthValueConverter {\r\n toView(value) {\r\n return value.length;\r\n }\r\n}\r\n","// import { LogManager } from 'aurelia-framework';\n// const logger = LogManager.getLogger('doc-lister-link');\nimport sortBy from 'lodash/sortBy';\n\nexport class FtSortValueConverter {\n toView(items, key, desc) {\n if (key === '' || key === undefined) return items;\n let sorted = sortBy(items, [key]);\n // if (desc) {\n // sorted.reverse();\n // }\n return sorted;\n }\n}\n","export class FtTypeAheadFilterValueConverter {\r\n toView(items, search) {\r\n if (search === '' || search === undefined) return items;\r\n return items.filter((item) => {\r\n return (\r\n item.label.toLowerCase().includes(search.toLowerCase())\r\n ||\r\n item.isin.toLowerCase().includes(search.toLowerCase())\r\n ||\r\n item.wkn.toLowerCase().includes(search.toLowerCase())\r\n );\r\n });\r\n }\r\n}\r\n","export function configure(config) {\n config.globalResources([\n './elements/ft-gateway/ft-gateway',\n './elements/ft-responsive-table-flow/ft-responsive-table-flow',\n './elements/ft-responsive-table-flow/ft-responsive-table-flow-document',\n './elements/ft-multi-select-bar/ft-multi-select-bar',\n './elements/ft-type-ahead-search/ft-type-ahead-search',\n './value-converters/ft-format-grid-cell'\n ]);\n}\n","/**\r\n * Combine marketing reducers into a single reducer\r\n * Object passed in should have the following structure:\r\n * [array of reducers not specific to a fund]\r\n *\r\n * Each reducer is passed the modified state from the reducers that have run previously.\r\n *\r\n * @param marketingReducers\r\n * @returns {Function}\r\n */\r\nexport function combineMarketingReducers(marketingReducers) {\r\n return function(state = {}, action) {\r\n // first run the generic reducers (ie not fund specific)\r\n // these are run left to right passing the modified state on to the next in line.\r\n let newState = marketingReducers.reduce((prev, reducer) => {\r\n return reducer(prev, action);\r\n }, state);\r\n\r\n return newState;\r\n };\r\n}\r\n","export function configure(config) {\n config.globalResources([\n './value-converters/ft-dash-if-empty',\n './value-converters/ft-format-currency',\n './value-converters/ft-format-percent',\n './value-converters/ft-normalize-space',\n './value-converters/ft-with-percent-or-dash',\n './value-converters/ft-range-with-percent',\n './value-converters/ft-with-dollar-or-dash',\n './elements/ft-footnote/ft-footnote',\n './elements/ft-proximal/ft-proximal',\n './elements/ft-labels/ft-labels',\n './elements/ft-caveats/ft-caveats'\n ]);\n}\n","\r\nimport {LogManager} from 'aurelia-framework';\r\nimport cloneDeep from 'lodash/cloneDeep';\r\n\r\nconst logger = LogManager.getLogger('caveats-reducer');\r\n\r\nexport function caveatsReducer(state = {}, action) {\r\n switch (action.type) {\r\n // TODO: refactor caveats reducers - most of this shuold be app state\r\n case 'REGISTER_FOOTNOTES':\r\n logger.debug('Reducing: REGISTER_FOOTNOTES', action.page);\r\n if (!action.page) {\r\n return state;\r\n }\r\n\r\n let newState = cloneDeep(state);\r\n\r\n let visibleElementLevel = newState.app[action.page].visibleElementLevel;\r\n let visibleElementLevelCaveats = newState.app[action.page].visibleElementLevelCaveats;\r\n let elementLevel = newState.funds[action.fundId][action.page].caveats.elementLevel;\r\n let elementLevelCaveats = newState.funds[action.fundId][action.page].caveats.elementLevelCaveats;\r\n elementLevel.forEach((val, key) => {\r\n if (val.secName === action.section && val.eleName === action.element) {\r\n visibleElementLevel.set(key, val);\r\n visibleElementLevelCaveats.set(key, elementLevelCaveats.get(key));\r\n }\r\n });\r\n\r\n let order = 1;\r\n visibleElementLevel.forEach((v) => {\r\n v.order = order++;\r\n });\r\n\r\n /*let visibleCaveats;\r\n let elc;\r\n let el;\r\n\r\n if (newState.distributions) {\r\n visibleCaveats = newState.distributions.caveats.visibleElementLevelCaveats;\r\n elc = newState.distributions.caveats.elementLevelCaveats;\r\n el = newState.distributions.caveats.elementLevel;\r\n }\r\n if (newState.dailyPricesAndBreakpoints) {\r\n visibleCaveats = newState.dailyPricesAndBreakpoints.caveats.visibleElementLevelCaveats;\r\n elc = newState.dailyPricesAndBreakpoints.caveats.elementLevelCaveats;\r\n el = newState.dailyPricesAndBreakpoints.caveats.elementLevel;\r\n }\r\n\r\n if (visibleCaveats) {\r\n action.footnotes.forEach(fn => {\r\n visibleCaveats.set(fn.id, elc.get(fn.id));\r\n });\r\n\r\n let order = 1;\r\n visibleCaveats.forEach((text, id) => {\r\n let cvt = el.get(id);\r\n cvt.order = order;\r\n el.set(id, cvt);\r\n order++;\r\n });\r\n }*/\r\n\r\n return newState;\r\n case 'UNREGISTER_FOOTNOTES':\r\n logger.debug('Reducing: UNREGISTER_FOOTNOTES', action);\r\n return state;\r\n default:\r\n return state;\r\n }\r\n}\r\n","/**\r\n * Created by bstjohn on 13/12/2016.\r\n */\r\n/**\r\n * Combine products reducers into a single reducer\r\n * Object passed in should have the following structure:\r\n * {\r\n * general: [array of reducers not specific to a fund],\r\n * specific: [array of reducers specific to a fund]\r\n * }\r\n *\r\n * The specific reducers are only called for actions with a fundId attribute.\r\n * Each reducer is passed the modified state from the reducers that have run previously.\r\n *\r\n * @param productsReducers\r\n * @returns {Function}\r\n */\r\nexport function combineProductsReducers(productsReducers) {\r\n return function(state = {}, action) {\r\n // first run the generic reducers (ie not fund specific)\r\n // these are run left to right passing the modified state on to the next in line.\r\n let newState = productsReducers.general.reduce((prev, reducer) => {\r\n return reducer(prev, action);\r\n }, state);\r\n\r\n let fundId = action.fundId;\r\n if (fundId) {\r\n // now run the fund specific reducers\r\n // we pass in the newState as an extra parameter to allow access to generic fund info\r\n let productSpecificData = productsReducers.specific.reduce((prev, reducer) => {\r\n return reducer(prev, action, newState);\r\n }, newState.funds[fundId]);\r\n\r\n let funds = Object.assign({}, newState.funds, {[fundId]: productSpecificData});\r\n\r\n newState = Object.assign({}, newState, {funds});\r\n }\r\n return newState;\r\n };\r\n}\r\n","import {LogManager} from 'aurelia-framework';\n// import get from 'lodash/get';\nconst logger = LogManager.getLogger('label-loader');\nimport {portfolioUtils} from '../portfolio/util/util';\n\nexport function configurationLoader(state, action) {\n switch (action.type) {\n case 'LOAD_PORTFOLIO_CONFIGURATION_SUCCESS':\n logger.debug('Reducing: LOAD_PORTFOLIO_CONFIGURATION');\n const [rawConfig] = action.json;\n const config = portfolioUtils.getETFConfig(rawConfig);\n return Object.assign({}, state, {\n config\n });\n default:\n return state;\n }\n}\n","/**\n * Created by mdonnel on 15/05/2017.\n */\nimport {LogManager} from 'aurelia-framework';\nconst logger = LogManager.getLogger('label-loader');\n\nexport function labelLoader(state, action) {\n switch (action.type) {\n case 'LOAD_LABELS_SUCCESS':\n logger.debug('Reducing: LOAD_LABELS');\n const [rawLabel] = action.json;\n const label = new Map();\n\n Object.keys(rawLabel).forEach(key => {\n label.set(key, rawLabel[key]);\n });\n\n return Object.assign({}, state, {\n label\n });\n default:\n return state;\n }\n}\n\n\n","/**\n * Created by mdonnel on 16/05/2017.\n */\n\nfunction extractLabels(lSource, selected = []) {\n const newLabels = {};\n const allFlag = (selected.length === 0);\n if (allFlag) {\n return lSource;\n }\n // if we have passed an array of ids then return those instead\n for (const item of selected) {\n if (Object.keys(lSource).indexOf(item) !== -1) {\n newLabels[`${item.toString()}`] = lSource[item];\n }\n }\n return newLabels;\n}\n\n\nexport function getLabels(state, selected = []) {\n const stateLabels = (state.hasOwnProperty('products')) ? state.products.label : state.label;\n return extractLabels(stateLabels, selected);\n}\n","\r\nexport function getFundState(state, fundId) {\r\n return state.products.funds[fundId];\r\n}\r\n","/**\r\n * Created by bstjohn on 20/12/2016.\r\n */\r\n/**\r\n * Generic product configuration that applies across components\r\n */\r\n\r\nimport {LogManager} from 'aurelia-framework';\r\n\r\nconst logger = LogManager.getLogger('productConfiguration');\r\nconst POPULATE_DISTRIBUTIONS_CONFIGURATION_INDEX = 2; // index in json array set in configuration\r\n\r\nexport function productConfiguration(state, action) {\r\n switch (action.type) {\r\n case 'POPULATE_DISTRIBUTIONS_STATE_SUCCESS':\r\n logger.debug('Reducing: POPULATE_DISTRIBUTIONS_STATE_SUCCESS');\r\n return Object.assign({}, state, _populate(action.json[POPULATE_DISTRIBUTIONS_CONFIGURATION_INDEX]));\r\n default: return state;\r\n }\r\n\r\n function _populate(configuration) {\r\n return {\r\n configuration: configuration.provider.config\r\n };\r\n }\r\n}\r\n","import {currencyConfigs} from '../../../lib/currency';\nimport uniq from 'lodash/uniq';\n\nexport function navDirection(val) {\n let parsed = val ? val.replace(/[^\\d.-]+/g, '') : '';\n parsed = parseFloat(parsed);\n if (isNaN(parsed)) return '';\n if (parsed > 0) return 'GAIN';\n if (parsed < 0) return 'LOSS';\n return 'STATIC';\n}\n\nexport function navChangeClass(direction) {\n switch (direction) {\n case 'GAIN':\n return 'gain';\n case 'LOSS':\n return 'loss';\n case 'STATIC':\n return 'static';\n default:\n return '';\n }\n}\n\n// this function creates a function that will return an array of unique values of a property wqhen applied to an Array of objects\n// see the tests for an example\nexport function getUniqOptions(property) {\n return (funds) => {\n return uniq(funds.map(fund => fund[property])).sort().map(fund => ({value: fund, label: fund}));\n };\n}\n\n// This function takes a CUSIP in the form 'G3658U329' and returns it in the format 'G36 58U 329'\nexport function formatCusip(cusip) {\n return (cusip.length === 9) ? `${cusip.substring(0, 3)} ${cusip.substring(3, 6)} ${cusip.substring(6)}` : cusip;\n}\n\n/**\n * @param {string} val\n * @param {string} currency\n * @param {boolean} [useDash]\n * @returns {string}\n */\nexport function formatCurrency(val = '', currency, useDash = false) {\n let stripped = val.replace(/[^\\d.-]+/g, '');\n let parsed = parseFloat(stripped);\n let currencyConfig = currencyConfigs.get(currency);\n if (!currencyConfig) {\n currencyConfig = '';\n }\n if (isNaN(parsed)) {\n return useDash ? '—' : '-';\n }\n if (stripped.indexOf('.') !== -1) {\n if (currencyConfig.decimalPlaces === 0) {\n stripped = Math.round(stripped).toString();\n } else {\n stripped = stripped * 1;\n stripped = stripped.toFixed(currencyConfig.decimalPlaces).toString();\n }\n }\n if (parsed === 0) {\n return currencyConfig.symbol + stripped.replace('-', '');\n }\n if (parsed < 0) {\n return '-' + currencyConfig.symbol + stripped.replace('-', '');\n }\n return currencyConfig.symbol + stripped;\n}\n\n/**\n * clean up different date formats and convert to common DD/MM/YYYY\n * @param {string} val date in format DD/MM/YYYY or YYYY-MM-DD\n * @returns {string} val format DD/MM/YYYY\n */\nexport function formatDateToDay(val) {\n if (!val) {\n return val;\n }\n let match = val.match(/^([0-9]{2})[-\\/]([0-9]{2})[-\\/]([0-9]{4})/);\n if (match) {\n return match[1] + '/' + match[2] + '/' + match[3];\n }\n match = val.match(/^([0-9]{4})[-\\/]([0-9]{2})[-\\/]([0-9]{2})/);\n if (match) {\n return match[3] + '/' + match[2] + '/' + match[1];\n }\n return val;\n}\n","/**\r\n * Created by bstjohn on 12/12/2016.\r\n */\r\nimport {ComponentBase} from '../../../lib/component-base';\r\n\r\n// TODO: This class deprecated in favour of ReduxComponentBase\r\n\r\n/**\r\n * Abstract Base class for top level product components\r\n */\r\nexport class TopLevelProductComponentBase extends ComponentBase {\r\n constructor(store) {\r\n super(store);\r\n this.dispatch = store.dispatch;\r\n if (typeof this.update === 'function') {\r\n store.subscribe(() => this._update(store.getState()));\r\n }\r\n }\r\n\r\n _update(state) { // TODO: should param be called 'state' when already a this.state property?\r\n let subState = (this.fundId) ? state.products.funds[this.fundId] : state.products;\r\n let newState = (typeof this.selectState === 'function')\r\n ? this.selectState(subState)\r\n : subState;\r\n\r\n /*if (this.state !== newState) {\r\n this.state = newState;\r\n this.update();\r\n }*/\r\n // temporarily taken this out of the IF as the comparison is two references to the same object\r\n this.state = newState;\r\n this.update();\r\n }\r\n}\r\n","import {inject, bindable, computedFrom} from 'aurelia-framework';\r\nimport {ReduxComponentBase} from '../../../lib/redux-component-base';\r\nimport get from 'lodash/get';\r\nimport groupBy from 'lodash/groupBy';\r\n\r\n@inject('Store', 'Beans', Element)\r\nexport class FtPpssTableBase extends ReduxComponentBase {\r\n @bindable user;\r\n @bindable label;\r\n @bindable config;\r\n @bindable funds;\r\n @bindable filters;\r\n @bindable sort;\r\n\r\n changeSort(name) {\r\n this.dispatch({\r\n type: 'PPSS_CHANGE_SORT',\r\n columnName: name\r\n });\r\n }\r\n\r\n get shareClassDisplayed() {\r\n if (!this.filters.dropdowns.length) return '';\r\n let selected = this.filters.dropdowns.find(filter => filter.name === 'SHARE_CLASS').selected.label;\r\n return selected && this.label && this.label['shareclass-displayed']\r\n ? this.getLabel('shareclass-displayed').replace('<span data-view=\"share-class-displayed\">All</span>', selected)\r\n : '';\r\n }\r\n\r\n @computedFrom('funds')\r\n get fundsByVehicle() {\r\n let groupedFunds = groupBy(this.funds, fund => fund.investmentVehicle); // this creates an object of funds grouped by investment vehicle\r\n return new Map(Object.keys(groupedFunds).sort().map(key => [key, groupedFunds[key]])); // turn this into a Map, so easier to use with Aurelia\r\n }\r\n\r\n @computedFrom('filters', 'label')\r\n get noResultsMessage() {\r\n return get(this, 'filters.favorites.myFavoritesOnly', false) ? get(this.label, 'search.no-favorite', '') : get(this.label, 'search.no-result', '');\r\n }\r\n\r\n @computedFrom('funds')\r\n get showNoResultsMessage() {\r\n return this.funds && this.funds.length === 0;\r\n }\r\n\r\n @computedFrom('funds')\r\n get otherFunds() {\r\n return this.funds.filter(fund => !fund.isMoneyFund);\r\n }\r\n\r\n @computedFrom('funds')\r\n get moneyFunds() {\r\n return this.funds.filter(fund => fund.isMoneyFund);\r\n }\r\n\r\n @computedFrom('moneyFunds')\r\n get showMoneyFundheader() {\r\n return this.moneyFunds\r\n && this.moneyFunds.length\r\n && this.otherFunds\r\n && this.otherFunds.length;\r\n }\r\n\r\n @computedFrom('config')\r\n get searchAreaColspan() {\r\n return this.config.showFavorites ? 4 : 3;\r\n }\r\n}\r\n","import {ComponentBase} from '../../../lib/component-base';\r\n\r\nexport class FtPpssTableRowBase extends ComponentBase {\r\n navChangeClass(direction) {\r\n switch (direction) {\r\n case 'GAIN':\r\n return 'gain';\r\n case 'LOSS':\r\n return 'loss';\r\n case 'STATIC':\r\n return 'static';\r\n default:\r\n return '';\r\n }\r\n }\r\n}\r\n","import {bindable, inject} from 'aurelia-framework';\nimport {FtCarousel} from './ft-carousel';\nimport environment from '../../../../environment';\n//import {LogManager} from 'aurelia-framework';\n//const logger = LogManager.getLogger('ft-carousel');\n\n@inject(FtCarousel)\nexport class FtCarouselNavigation {\n @bindable direction;\n @bindable linkText;\n leftLinkText;\n rightLinkText;\n image;\n\n constructor(carousel) {\n this.carousel = carousel;\n //logger.debug(carousel);\n this.leftLinkText = carousel.leftLinkText;\n this.rightLinkText = carousel.rightLinkText;\n }\n\n attached() {\n if (this.direction === 'left') {\n this.image = `${environment.cssRoot}/assets/img/carousel-navb-l.png`;\n this.linkTextAfter = this.leftLinkText;\n this.slide = 'prev';\n } else {\n this.image = `${environment.cssRoot}/assets/img/carousel-navb-r.png`;\n this.linkTextBefore = this.rightLinkText;\n this.slide = 'next';\n }\n }\n}\n","import {bindable} from 'aurelia-framework';\nimport environment from '../../../../environment';\n//import {LogManager} from 'aurelia-framework';\n//const logger = LogManager.getLogger('ft-carousel');\n\nlet index = 0;\n\n/**\n * Returns array with slides titles\n * @param {Object} carousel\n * @returns {Array}\n */\nfunction getSlidesTitle(carousel) {\n let carouselTitlesArr = [];\n let carouselTitles = carousel.find('.item');\n for (let i = 0; i < carouselTitles.length; i++) {\n carouselTitlesArr.push(carouselTitles[i].getAttribute('slide-title'));\n }\n return carouselTitlesArr;\n}\n\n/**\n * Returns current slide position in array returned by getSlidesTitle\n * @param {Array} carouselTitlesArr\n * @param {String} currentSlideTitle\n * @returns {Number}\n */\nfunction getNextSlideNumber(carouselTitlesArr, currentSlideTitle) {\n let slideNr = 0;\n for (let carouselTitle of carouselTitlesArr) {\n if (carouselTitle === currentSlideTitle) {\n return slideNr;\n }\n slideNr++;\n }\n}\n\n/**\n * Returns Next Slide Title\n * @param {Array} carouselTitlesArr\n * @param {int} slideNR\n * @returns {Array}\n */\nfunction getNextSlide(carouselTitlesArr, slideNR) {\n let nrOfSlides = carouselTitlesArr.length;\n let nextSlideNR = parseInt(slideNR, 10) + 1;\n if (nextSlideNR > nrOfSlides - 1) nextSlideNR = 0;\n return carouselTitlesArr[nextSlideNR];\n}\n\n/**\n * Returns Previous Slide Title\n * @param {Array} carouselTitlesArr\n * @param {int} slideNR\n * @returns {Array}\n */\nfunction getPrevSlide(carouselTitlesArr, slideNR) {\n let nrOfSlides = carouselTitlesArr.length;\n let prevSlideNR = parseInt(slideNR, 10) - 1;\n if (prevSlideNR < 0) prevSlideNR = nrOfSlides - 1;\n return carouselTitlesArr[prevSlideNR];\n}\n\nexport class FtCarousel {\n @bindable leftLinkText;\n @bindable rightLinkText;\n currentSlideTitle = '';\n numberOfSlides = 0;\n\n attached() {\n this.carouselNode.id = `carousel-${++index}`;\n let carousel = $(this.carouselNode);\n let carouselTitles = getSlidesTitle(carousel);\n //logger.debug(carouselTitles);\n carousel.bind('slid.bs.carousel', (e) => {\n let currentSlideTitle = e.relatedTarget.getAttribute('slide-title');\n let slideNR = getNextSlideNumber(carouselTitles, currentSlideTitle);\n let nextSlide = getNextSlide(carouselTitles, slideNR);\n let prevSlide = getPrevSlide(carouselTitles, slideNR);\n this.currentSlideTitle = currentSlideTitle;\n this.leftLinkText = prevSlide;\n this.rightLinkText = nextSlide;\n //logger.debug('Previous Slide: ' + prevSlide + '; Next Slide: ' + nextSlide);\n });\n let slides = carousel.find('.item');\n let currentSlideTitle = slides[0].getAttribute('slide-title');\n let slideNR = getNextSlideNumber(carouselTitles, currentSlideTitle);\n let nextSlide = getNextSlide(carouselTitles, slideNR);\n let prevSlide = getPrevSlide(carouselTitles, slideNR);\n this.numberOfSlides = slides.length;\n this.currentSlideTitle = currentSlideTitle;\n this.leftLinkText = prevSlide;\n this.rightLinkText = nextSlide;\n this.imageL = `${environment.cssRoot}/assets/img/carousel-navb-l.png`;\n this.imageR = `${environment.cssRoot}/assets/img/carousel-navb-r.png`;\n //logger.debug('currentSlideTitle: ' + this.currentSlideTitle);\n //logger.debug('Previous Slide: ' + prevSlide + '; Next Slide: ' + nextSlide);\n carousel.carousel();\n }\n}\n","import {bindable, inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport moment from 'moment';\n// import parseFormat from 'moment-parseformat';\n// import {get} from 'lodash/get';\n\n@inject('Store', 'Beans', Element)\nexport class FtDateDropdown extends ReduxComponentBase {\n @bindable startDate;\n @bindable endDate;\n @bindable dateFormat;\n @bindable submitType;\n @bindable availableMonths;\n @bindable availableYears;\n @bindable selectedYr;\n @bindable selectedMnth;\n\n constructor(store, beans, element) {\n super(store);\n this.element = element;\n }\n\n startDateChanged() {\n const startDate = this.startDate;\n const endDate = this.endDate;\n const dateFormat = this.dateFormat;\n\n let endYear = moment(endDate).get('year').toString();\n // let endMonth = moment(endDate).get('month').toString();\n\n if (startDate) {\n let startYear = moment(startDate).get('year').toString();\n // let startMonth = moment(startDate).get('month').toString();\n\n let yearAry = [];\n // Months are zero-based to work with Moment.js\n // TODO: make this translatable\n const monthsMap = [\n { key: 0, value: 'Jan'},\n { key: 1, value: 'Feb'},\n { key: 3, value: 'Apr'},\n { key: 4, value: 'May'},\n { key: 5, value: 'Jun'},\n { key: 6, value: 'Jul'},\n { key: 7, value: 'Aug'},\n { key: 8, value: 'Sep'},\n { key: 9, value: 'Oct'},\n { key: 10, value: 'Nov'},\n { key: 11, value: 'Dec'}\n ];\n\n this.availableMonths = monthsMap;\n\n switch (dateFormat) {\n case 'Y':\n case 'M-Y':\n let makeYear = startYear;\n do {\n let obj = {\n year: makeYear.toString()\n };\n yearAry.push(obj);\n makeYear++;\n } while (makeYear <= endYear);\n this.availableYears = yearAry;\n break;\n default:\n break;\n }\n }\n }\n\n yearChange(clicked) {\n if ((this.submitType !== 'buttons') || (clicked === 'button')) {\n this.dispatch({\n type: 'SET_HISTORICAL_DATE',\n year: this.selectedYr,\n month: this.selectedMnth\n });\n }\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.logger.debug('mapState()');\n if (!newState.app) {\n this.logger.info('meh', endDate);\n this.selectedMnth = moment(endDate).get('month');\n this.selectedYr = moment(endDate).get('year');\n }\n //let fundState = getFundState(newState, this.fundId);\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","import 'jquery-ui';\nimport {bindable, inject, LogManager} from 'aurelia-framework';\n\n@inject(Element)\nexport class FtDatepicker {\n @bindable value;\n @bindable options = {};\n dp;\n\n constructor(element) {\n this.element = element;\n this.logger = LogManager.getLogger(this.constructor.name);\n }\n\n attached() {\n this.dp = $(this.element).find('input').datepicker(this.options).on('change', e => {\n this.value = e.target.value;\n });\n }\n\n detached() {\n this.dp.datepicker('destroy').off('change');\n }\n\n optionsChanged(opts) {\n if (this.dp) {\n this.dp.datepicker('option', opts);\n }\n }\n\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\n//import {getFundState} from '../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtHistoricalModal extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_CHANGE_ME_STATE',\n // beans: beans..., // beans set in configuration for site e.g. configuration/en-us-retail/beans.js\n fundId: this.fundId\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.logger.debug('mapState()');\n //let fundState = getFundState(newState, this.fundId);\n // set component properties from state as appropriate\n //this.label = newState.products.distributions.label;\n //this.proximity = fundState.distributions.caveats.proximity;\n\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","/**\r\n * Created by bstjohn on 18/01/2017.\r\n */\r\nimport {bindable, inject} from 'aurelia-framework';\r\n\r\n@inject(Element)\r\nexport class FtLabel {\r\n @bindable label;\r\n\r\n constructor(element) {\r\n this.element = element;\r\n }\r\n\r\n labelChanged() {\r\n this.element.innerHTML = this.label;\r\n }\r\n}\r\n","/**\n * Created by mdonnel on 15/05/2017.\n */\nimport {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\n\n@inject('Store', 'Beans', Element)\nexport class FtLabelLoader extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans) {\n // add logging and integration with the data store\n super(store);\n this.beans = beans.component.fundInformation;\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_LABEL_LOADER',\n beans: this.beans\n });\n }\n\n mapState(newState) {\n try {\n this.logger.debug('mapState()');\n this.labels = fundState.labels;\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","/**\n * Created by bstjohn on 26/10/2016.\n */\nimport {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\n\nimport {LogManager} from 'aurelia-framework';\nconst logger = LogManager.getLogger('modal');\n\n@inject('Store')\nexport class FtModal extends ReduxComponentBase {\n\n constructor(store, element) {\n super(store);\n this.langLabels = store.getState().products.app.externalModalLabels;\n logger.debug('store.getState()', this.langLabels);\n }\n\n attached() {\n\n // this.dispatch({\n // type: 'POPULATE_REPORT_ARCHIVE_B',\n // beans: [url],\n // fundId: this.fundId,\n // cid: url\n // });\n // this.transitioning = false;\n // this.elemModal = document.getElementById('footerModal');\n }\n\n externalopen(link) {\n this.dispatch({\n type: 'OPEN_MODAL',\n title: this.langLabels.title,\n contents: this.langLabels.content,\n footer: `<a href=\"${link}\" class=\"btn btn-primary\">${this.langLabels.ok}</a>`\n });\n }\n\n // closeModal() {\n // if (!this.transitioning) {\n // this.dispatch({\n // type: 'CLOSE_MODAL'\n // });\n // if (this.modal.okFunction) {\n // this.modal.okFunction();\n // }\n // }\n // }\n //\n // noClose(e) {\n // e.stopPropagation();\n // }\n\n mapState(newState) {\n // try {\n // this.modal = newState.products.app.modal;\n // if (newState.products.app.modal.open) {\n // this.transitioning = true;\n // document.body.classList.add('modal-open');\n // document.body.classList.add('no-blur');\n // this.elemModal.style.display = 'block';\n // this.elemBd.style.display = 'block';\n // setTimeout(() => {\n // this.elemModal.classList.add('in');\n // this.elemBd.classList.add('in');\n // setTimeout(() => {\n // this.transitioning = false;\n // }, 300);\n // }, 1);\n // } else {\n // this.transitioning = true;\n // document.body.classList.remove('modal-open');\n // this.elemModal.classList.remove('in');\n // this.elemBd.classList.remove('in');\n // setTimeout(() => {\n // this.transitioning = false;\n // this.elemModal.style.display = '';\n // this.elemBd.style.display = 'none';\n // }, 300);\n // }\n // } catch (e) {\n // //\n // }\n if (newState.products.app.modal.open) {\n this.modal = newState.products.app.modal;\n $(this.footerModal).modal();\n }\n }\n}\n","/*\n * To change this license header, choose License Headers in Project Properties.\n * To change this template file, choose Tools | Templates\n * and open the template in the editor.\n */\n//import {LogManager} from 'aurelia-framework';\n//const logger = LogManager.getLogger('ft-owl-tabbed');\n\nlet index = 0;\n\nexport class FtOwlTabbed {\n attached() {\n this.owlTabbedNode.id = `carousel-announcements-tabbed-${++index}`;\n let owlTabbed = $(this.owlTabbedNode);\n\n/**\n * Removes active class from OWL obiect\n * @param {Object} owlTabbedOBJ\n * @returns {undefined}\n */\n function removeActiveFromOWL(owlTabbedOBJ) {\n let activeLI = owlTabbed.find('li.owl-item.active');\n activeLI.removeClass('active');\n }\n\n/**\n * Removes active class from unused tabs\n * @param {Object} owlTabbedOBJ\n * @returns {undefined}\n */\n function removeActiveFromRole(owlTabbedOBJ) {\n let presentationTab = owlTabbed.find('li.owl-item').find('[role=\"presentation\"]');\n presentationTab.removeClass('active');\n }\n\n/**\n * Returns previous or next tab name\n * @param {Object} owlTabbedOBJ\n * @param {string} direction (prev|next)\n * @returns {Object}\n */\n function tabDirectionMove(owlTabbedOBJ, direction) {\n let activeTab = owlTabbedOBJ.find('.owl-tab.active');\n let activeTabName = activeTab.find('a')[0].getAttribute('aria-controls');\n let activeTabNR = activeTabName.substring(activeTabName.length - 1);\n let tabOperator = 1;\n if (direction === 'prev') tabOperator = -1;\n let directTabName = activeTabName.substring(0, activeTabName.length - 1) + (parseInt(activeTabNR, 10) + parseInt(tabOperator, 10));\n //logger.debug(directTabName);\n return owlTabbedOBJ.find('[aria-controls=\"' + directTabName + '\"]');\n }\n\n/**\n * OWL initialization\n */\n owlTabbed.owlCarousel({\n loop: false,\n margin: 0,\n responsiveClass: true,\n navElement: 'i class=\"tabbed ft-icon ft-icon-right-carrot\"',\n navText: ['', ''],\n itemElement: 'li',\n touchDrag: false,\n mouseDrag: false,\n responsive: {\n 0: {\n items: 1,\n dots: true,\n nav: false\n },\n 768: {\n items: 2,\n dots: false,\n nav: true\n },\n 992: {\n items: 4,\n dots: false,\n nav: true\n },\n 1200: {\n items: 4,\n dots: false,\n nav: true\n }\n },\n onInitialized: function() {\n removeActiveFromOWL(owlTabbed);\n $('.ft-owl-tabbed').removeClass('hidden');\n },\n onResized: function() {\n removeActiveFromOWL(owlTabbed);\n owlTabbed.trigger('to.owl.carousel', 0);\n owlTabbed.find('[aria-controls=\"tabs-content-1\"]').trigger('click');\n }\n });\n\n let next = owlTabbed.find('.owl-next');\n let prev = owlTabbed.find('.owl-prev');\n let tabLinks = owlTabbed.find('li.owl-item').find('[role=\"presentation\"]').find('a');\n let owlDotsNav = owlTabbed.find('.owl-dots');\n tabLinks.click(function() {\n removeActiveFromRole(owlTabbed);\n });\n prev.click(function() {\n removeActiveFromOWL(owlTabbed);\n let prevTab = tabDirectionMove(owlTabbed, 'prev');\n prevTab.trigger('click');\n });\n next.click(function() {\n removeActiveFromOWL(owlTabbed);\n let nextTab = tabDirectionMove(owlTabbed, 'next');\n nextTab.trigger('click');\n });\n owlDotsNav.click(function() {\n let activatedTab = owlTabbed.find('.owl-item.active');\n let activatedTabLink = activatedTab.find('a');\n activatedTabLink.trigger('click');\n });\n }\n}\n","/**\n * Created by bstjohn on 26/10/2016.\n */\n// import {inject} from 'aurelia-framework';\nimport {inject, bindable} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\n// import {LogManager} from 'aurelia-framework';\n// const logger = LogManager.getLogger('inline modal');\n\n@inject('Store')\nexport class FtModalInline extends ReduxComponentBase {\n @bindable close;\n @bindable title;\n @bindable marketingLabels;\n\n constructor(store) {\n super(store);\n this.setLabels(store.getState());\n }\n\n attached() {\n this.transitioning = false;\n }\n\n setLabels(fromState) {\n try {\n this.marketingLabels = fromState.products.app.modalInlineLabels;\n } catch (e) {\n //logger.error(e);\n }\n }\n\n mapState(newState) {\n this.setLabels(newState);\n }\n\n // noClose(e) {\n // e.stopPropagation();\n // }\n\n openModal() {\n // this.transitioning = true;\n // // document.body.classList.add('modal-open');\n // this.ftModal.style.display = 'block';\n // this.modalBackdrop.style.display = 'block';\n // setTimeout(() => {\n // this.ftModal.classList.add('in');\n // this.modalBackdrop.classList.add('in');\n // setTimeout(() => {\n // this.transitioning = false;\n // }, 300);\n // }, 1);\n\n\n $(this.ftModal).modal('show');\n }\n //\n //\n // closeModal() {\n // this.transitioning = true;\n // document.body.classList.remove('modal-open');\n // this.ftModal.classList.remove('in');\n // this.modalBackdrop.classList.remove('in');\n // setTimeout(() => {\n // this.transitioning = false;\n // this.ftModal.style.display = '';\n // this.modalBackdrop.style.display = 'none';\n // }, 300);\n // }\n}\n","/*\n * To change this license header, choose License Headers in Project Properties.\n * To change this template file, choose Tools | Templates\n * and open the template in the editor.\n */\n// import {LogManager} from 'aurelia-framework';\n//const logger = LogManager.getLogger('ft-owl-carousel');\n\nlet index = 0;\n\nexport class FtOwlCarousel {\n attached() {\n this.owlCarouselNode.id = `carousel-announcements-${++index}`;\n let owlCarousel = $(this.owlCarouselNode);\n //logger.debug('owlCarousel: ' + owlCarousel);\n owlCarousel.owlCarousel({\n loop: false,\n margin: 0,\n responsiveClass: true,\n navElement: 'i class=\"ft-icon ft-icon-right-carrot\"',\n navText: '',\n responsive: {\n 0: {\n items: 1,\n dots: true,\n nav: false\n },\n 768: {\n items: 2,\n dots: false,\n nav: true\n },\n 992: {\n items: 3,\n dots: false,\n nav: true\n },\n 1200: {\n items: 4,\n dots: false,\n nav: true\n }\n },\n onInitialized: function() {\n $('.ft-owl-carousel').removeClass('hidden');\n }\n });\n }\n}\n","/**\n * Created by mdonnel on 15/03/2017.\n */\nimport {bindable, inject} from 'aurelia-framework';\n\n@inject(Element)\nexport class FtPrefixOrDash {\n @bindable prefix;\n @bindable val;\n\n constructor(element) {\n this.element = element;\n }\n\n prefixed() {\n if (this.val) {\n return (isNaN(this.val)) ? this.val : (this.prefix + this.val);\n }\n return '—';\n }\n valChanged() {\n this.element.innerHTML = this.prefixed();\n }\n}\n","// import {bindable, inject} from 'aurelia-framework';\r\n\r\n// @inject(Element)\r\nexport class FtSpinner {\r\n // @bindable label;\r\n //\r\n // constructor(element) {\r\n // this.element = element;\r\n // }\r\n //\r\n // labelChanged() {\r\n // this.element.innerHTML = this.label;\r\n // }\r\n}\r\n","\r\nimport {bindable} from 'aurelia-framework';\r\nimport {ComponentBase} from '../../../../lib/component-base';\r\n\r\nexport class FtThSortable extends ComponentBase {\r\n @bindable title;\r\n @bindable sort;\r\n @bindable clickCallback;\r\n\r\n // TODO: this is using dirty checking - not sure if there's a more efficient way\r\n get currentSortClass() {\r\n return this.sort && this.sort.direction ? 'current-sort' : '';\r\n }\r\n\r\n // TODO: this is using dirty checking - not sure if there's a more efficient way\r\n get sortDirectionClass() {\r\n return this.sort && this.sort.direction === 'ASC' ? 'dropup' : '';\r\n }\r\n\r\n // TODO: this is using dirty checking - not sure if there's a more efficient way\r\n get ariaSortDirection() {\r\n let direction = this.sort ? this.sort.direction : null;\r\n switch (direction) {\r\n case 'ASC':\r\n return 'ascending';\r\n case 'DESC':\r\n return 'descending';\r\n default:\r\n return 'none';\r\n }\r\n }\r\n}\r\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\n\n@inject('Store', Element)\nexport class FtShareClassFilter extends ReduxComponentBase {\n\n constructor(store, element) {\n super(store);\n this.element = element;\n this.currentQueryObject = this.queryStringToJSON(window.location.search);\n }\n\n changeFund(newID, newClass) {\n this.dispatch({\n type: 'CHANGE_SHARE_CLASS',\n fundId: parseInt(newID, 10),\n shareClass: newClass\n });\n }\n\n queryStringToJSON(href) {\n let params = href.slice(1).split('&');\n let result = {};\n\n for (let param of params) {\n param = param.split('=');\n result[param[0]] = decodeURIComponent(param[1] || '');\n }\n\n return JSON.parse(JSON.stringify(result));\n }\n\n mapState(newState) {\n try {\n let newFundId = newState.products.app.currentFundId;\n let newShareClass = newState.products.app.currentShareClass;\n\n if (this.currentQueryObject['FundID'] !== newFundId || this.currentQueryObject['ShareClass'] !== newShareClass) {\n if (newFundId !== 0 && newShareClass !== '') {\n $('#share-class').html('Share Class ' + newShareClass).append('<span></span>');\n let currentURL = window.location.href;\n let trimmedURL = currentURL.split('?')[0];\n let newURL = trimmedURL + '?' + 'FundID=' + newFundId + '&ShareClass=' + newShareClass;\n window.history.pushState(null, null, newURL);\n }\n }\n\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n\n","\n/**\n * TODO: Return value ....\n *\n * <p innerhtml.bind=\"myVal | ftFormatGridCell:myKey\"></p>\n */\nimport get from 'lodash/get';\n\nexport class FtFormatGridCellValueConverter {\n toView(data, dataKey) {\n let val = get(data, dataKey);\n\n // look for url attribute - this indicates a link\n let urlKey = dataKey.endsWith('.value') ? dataKey.replace(/\\.value$/i, '.url') : '';\n let url = get(data, urlKey);\n\n // look for | (pipes). this indicates multiple values, so split with <br /> tags\n if (typeof val === 'string') val = val.replace(/\\|/gi, '<br />');\n\n // if no value, just display a em-dash\n if (!val) val = '—';\n if (url) val = `<a href=\"${url}\">${val}</a>`; // if url, render as a link\n return val;\n }\n}\n","import {computedFrom, bindable, inject, BindingEngine} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {createCompare} from '../../../../lib/sort-utils';\nimport camelCase from 'lodash/camelCase';\nimport get from 'lodash/get';\nimport moment from 'moment';\n\nimport {LogManager} from 'aurelia-framework';\nconst logger = LogManager.getLogger('grid-filter');\n\n@inject('Store', 'Beans', Element)\n@inject(BindingEngine)\nexport class FtGridFilter extends ReduxComponentBase {\n @bindable marketingLabels;\n populated = false;\n cardsNode;\n configNode;\n cards = [];\n\n constructor(store, beans, element) {\n super(store);\n this.cid = element.getAttribute('cid') || 'cid';\n\n // No need to dispatch as marketing labels should already be available, through config\n this.marketingLabels = store.getState().marketing.gridFilter;\n }\n\n attached() {\n // this.cid = '123';\n let cardElements = Array.from(this.cardsNode.querySelectorAll('[data-fti-component=\"card\"]'));\n logger.debug('cardElements', cardElements);\n let cardData = cardElements.map(this._parseCard);\n cardElements.forEach(card => card.parentNode.removeChild(card));\n let config = this.configNode.getElementsByTagName('script')[0];\n\n let configData = JSON.parse(config.textContent);\n this.dispatch({\n type: 'POPULATE_GRID_FILTER',\n data: {cardData, configData},\n cid: this.cid\n });\n }\n\n _parseCard(card, idx) {\n let c = {\n classes: card.className.split(' ').filter(cls => cls !== 'hidden').join(' '), // remove 'hidden' class if exists\n content: card.innerHTML.trim(),\n data: {},\n defaultOrder: idx\n };\n let attributes = Array.from(card.attributes);\n attributes\n .filter(att => !['class', 'data-fti-component'].includes(att.nodeName)) // ignore 'class' and 'data-fti-component' attributes\n .filter(att => !att.nodeName.endsWith('-url')) // ignore attributes ending with '-url'\n .forEach(att => {\n let linkAttribute = attributes.find(linkAtt => linkAtt.nodeName === `${att.nodeName}-url`);\n if (linkAttribute) {\n c.data[camelCase(att.nodeName)] = {value: att.nodeValue, url: linkAttribute.nodeValue};\n } else {\n c.data[camelCase(att.nodeName)] = att.nodeValue;\n }\n });\n return c;\n }\n\n loadMore() {\n this.dispatch({\n type: 'GRID_LOAD_MORE',\n cid: this.cid\n });\n }\n\n changeSort(name) {\n this.dispatch({\n type: 'GRID_CHANGE_SORT',\n columnName: name,\n cid: this.cid\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n // this.logger.debug('grid filter mapState()');\n // this.logger.debug('newState.marketing.app.grid', newState.marketing.app.grid);\n // set component properties from state as appropriate\n\n let grid = newState.marketing.app.grid.grids[this.cid];\n // this.logger.debug('gridgridgridgrid', grid);\n\n let numVisibleCards = grid.numVisibleCards;\n this.filters = grid.filters;\n this.columns = grid.columns;\n this.showViewToggle = grid.showViewToggle;\n this.currentView = grid.currentView;\n\n let cards = grid.cards\n .filter(this._createFilterFunction(this.filters))\n .sort(this._createSortFunction(this.columns));\n this.showLoadMoreBtn = cards.length > numVisibleCards;\n this.cards = cards.slice(0, numVisibleCards);\n\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.logger.debug('grid filter mapState() error:::', e);\n this.populated = false;\n }\n }\n\n @computedFrom('currentView')\n get showGridView() {\n return this.currentView === 'GRID';\n }\n\n @computedFrom('currentView')\n get showTableView() {\n return this.currentView === 'TABLE';\n }\n\n @computedFrom('currentView')\n get wrapperClass() {\n return this.showGridView ? 'row' : 'panel';\n }\n\n // this creates a function to be passed into Array.filter()\n _createFilterFunction(filters) {\n // only filter on dropdowns with a value\n let activeDropdowns = filters\n .filter(d => d.selected\n && d.type === 'DROPDOWN'\n && d.selected.toString().toUpperCase() !== 'ALL');\n let yearDropdowns = filters\n .filter(d => d.selected\n && d.type === 'YEAR_DROPDOWN'\n && d.selected.toString().toUpperCase() !== 'ALL');\n\n return card => {\n // filter dropdowns\n let dropdownResult = activeDropdowns.reduce((result, dropdown) => {\n // break early if previous filter failed\n return result && get(card.data, dropdown.dataKey).split('|').includes(dropdown.selected);\n }, true);\n\n let yearDropdownResult = yearDropdowns.reduce((result, dropdown) => {\n let parsedDate = moment(get(card.data, dropdown.dataKey), dropdown.dateFormat);\n if (dropdown.selected === '12_MONTHS') {\n return result && moment().diff(parsedDate, 'years') < 1; // diff between date and now is less than 1 year\n }\n return result && parsedDate.year() === dropdown.selected;\n }, true);\n\n // ALL passed\n return dropdownResult && yearDropdownResult;\n };\n }\n\n // this creates a function to be passed into Array.filter()\n _createSortFunction(columns) {\n let sortColumn = columns.find(col => col.direction);\n return sortColumn ? createCompare(`data.${sortColumn.dataKey}`, sortColumn.direction, sortColumn) : (a, b) => a.defaultOrder - b.defaultOrder;\n }\n}\n","import {bindable, inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {LogManager} from 'aurelia-framework';\nconst logger = LogManager.getLogger('grid-filter');\n@inject('Store', 'Beans', Element)\nexport class FtGridFilterDropdown extends ReduxComponentBase {\n @bindable filter;\n @bindable selected;\n @bindable cid;\n\n selectedChanged(newValue, oldValue) {\n logger.debug('zzzzzzzzzzzzzzzzzz', newValue, oldValue);\n if (newValue && this.cid) {\n this.dispatch({\n type: 'GRID_CHANGE_DROPDOWN',\n name: this.filter.name,\n newValue: newValue,\n cid: this.cid\n });\n }\n }\n}\n","import {bindable, computedFrom, inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\n\n@inject('Store', 'Beans', Element)\nexport class FtGridFilterForm extends ReduxComponentBase {\n @bindable filters;\n @bindable showViewToggle;\n @bindable currentView;\n @bindable cid;\n @bindable marketingLabels;\n\n constructor(store) {\n super(store);\n this.marketingLabels = store.getState().marketing.gridFilter;\n }\n\n changeView(view) {\n if (view !== this.currentView) {\n this.dispatch({\n type: 'GRID_CHANGE_VIEW',\n view,\n cid: this.cid\n });\n }\n }\n\n @computedFrom('currentView')\n get gridViewClass() {\n return this.currentView === 'GRID' ? 'color: rgb(178, 178, 178)' : 'color: rgb(0, 85, 152)';\n }\n\n @computedFrom('currentView')\n get tableViewClass() {\n return this.currentView === 'TABLE' ? 'color: rgb(178, 178, 178)' : 'color: rgb(0, 85, 152)';\n }\n}\n","/**\n * Created by bstjohn on 18/01/2017.\n */\nimport {bindable} from 'aurelia-framework';\n// import { includes } from 'lodash';\nimport { LogManager } from 'aurelia-framework';\nconst logger = LogManager.getLogger('step1');\n\nexport class FtChooseSubscriptionStep1 {\n @bindable docsList1;\n @bindable docsList2;\n @bindable formData;\n\n constructor() {\n this.selected = [];\n this.docsList1Selected = 0;\n this.docsList2Selected = 0;\n }\n\n attached() {\n logger.debug(this);\n }\n\n openModal1() {\n this.modal1.openModal();\n }\n\n openModal2() {\n this.modal2.openModal();\n }\n\n countSelected() {\n // event.stopImmediatePropagation();\n\n this.docsList1Selected = this.docsList1.filter((e) => e.isSelected).length;\n this.docsList2Selected = this.docsList2.filter((e) => e.isSelected).length;\n // event.preventDefault();\n // event.stopPropagation();\n // return;\n // e.preventDefault();\n // e.stopPropagation();\n logger.debug('event');\n // item.isSelected = !item.isSelected;\n }\n\n}\n","/**\n * Created by bstjohn on 18/01/2017.\n */\nimport {bindable} from 'aurelia-framework';\n// import { includes } from 'lodash';\n// import { LogManager } from 'aurelia-framework';\n// const logger = LogManager.getLogger('doc-lister');\n\nexport class FtChooseSubscriptionStep2 {\n // @bindable registerContent;\n @bindable formData;\n\n constructor() {\n }\n\n attached() {\n }\n\n}\n","/**\n * Created by bstjohn on 18/01/2017.\n */\n// import {bindable} from 'aurelia-framework';\n// import { includes } from 'lodash';\n// import { LogManager } from 'aurelia-framework';\n// const logger = LogManager.getLogger('doc-lister');\n\nexport class FtChooseSubscriptionStep3 {\n // @bindable registerContent;\n // @bindable tab;\n\n constructor() {\n }\n\n attached() {\n }\n\n}\n","/**\n * Created by bstjohn on 18/01/2017.\n */\n// import {bindable} from 'aurelia-framework';\n// import { includes } from 'lodash';\nimport { LogManager, inject } from 'aurelia-framework';\nimport {HttpClient} from 'aurelia-fetch-client';\nconst logger = LogManager.getLogger('doc-lister');\n\n@inject(HttpClient)\n\nexport class FtChooseSubscription {\n // @bindable registerContent;\n // @bindable tab;\n\n constructor(http) {\n this.http = http;\n this.step = 1;\n }\n\n attached() {\n this.clear();\n }\n\n clear() {\n this.step1vm.docsList1Selected = 0;\n this.step1vm.docsList2Selected = 0;\n this.docsList1 = [\n {\n name: 'Franklin Diversifies Growth Fund 1',\n isChecked: false\n },\n {\n name: 'Franklin Diversifies Growth Fund 2',\n isChecked: false\n },\n {\n name: 'Franklin Diversifies Growth Fund 3',\n isChecked: false\n },\n {\n name: 'Franklin Diversifies Growth Fund 4',\n isChecked: false\n }\n ];\n\n this.docsList2 = [\n {\n name: 'Franklin Diversifies Growth Fund Annual Report 1',\n isSelected: false\n },\n {\n name: 'Franklin Diversifies Growth Fund Annual Report 2',\n isSelected: false\n },\n {\n name: 'Franklin Diversifies Growth Fund Annual Report 3',\n isSelected: false\n },\n {\n name: 'Franklin Diversifies Growth Fund Annual Report 4',\n isSelected: false\n }\n ];\n\n this.formData = {\n title: 'Mr',\n name: '',\n email: '',\n subscribe1: false,\n subscribe2: false\n };\n }\n\n next() {\n this.step++;\n }\n\n back() {\n this.step--;\n }\n\n submit() {\n this.http.fetch('http://jsonplaceholder.typicode.com/posts', {\n method: 'post',\n body: JSON.stringify({\n subscriptions: this.docsList1.concat(this.docsList2).filter((e) => e.isSelected),\n title: this.formData.title,\n name: this.formData.name,\n email: this.formData.email,\n subscribe1: this.formData.subscribe1,\n subscribe2: this.formData.subscribe2\n })\n })\n .then(response => response.json())\n .then(data => {\n logger.debug(data);\n this.step++;\n });\n }\n\n}\n","/**\n * Created by bstjohn on 18/01/2017.\n */\nimport {bindable} from 'aurelia-framework';\n// import { includes } from 'lodash';\n// import { LogManager } from 'aurelia-framework';\n// const logger = LogManager.getLogger('doc-lister');\n\nexport class FtStickyTabsContent {\n @bindable registerContent;\n @bindable tab;\n\n constructor() {\n }\n\n attached() {\n this.content = {\n tab: this.tab,\n element: this.element\n };\n // only register cells if this is the first time the cell is being attached (attached gets called each time if.bind is changed in main tempalte)\n if (!this.isAttached) {\n if (typeof this.registerContent === 'function') {\n this.registerContent(this.content);\n }\n }\n this.isAttached = true;\n }\n\n}\n","/**\n * Created by bstjohn on 18/01/2017.\n */\nimport {bindable} from 'aurelia-framework';\n// import { includes } from 'lodash';\n// import { LogManager } from 'aurelia-framework';\n// const logger = LogManager.getLogger('doc-lister');\n\nexport class FtStickyTabsLabel {\n @bindable registerLabel;\n @bindable tab;\n @bindable title;\n @bindable goTo;\n\n constructor() {\n }\n\n attached() {\n this.label = {\n tab: this.tab,\n title: this.title\n };\n // only register cells if this is the first time the cell is being attached (attached gets called each time if.bind is changed in main tempalte)\n if (!this.isAttached) {\n if (typeof this.registerLabel === 'function') {\n this.registerLabel(this.label);\n }\n }\n this.isAttached = true;\n }\n\n go() {\n if (typeof this.goTo === 'function') {\n this.goTo(this.label);\n }\n }\n\n\n}\n","/**\n * Created by bstjohn on 18/01/2017.\n */\n// import {bindable, inject} from 'aurelia-framework';\nimport find from 'lodash/find';\n// import { LogManager } from 'aurelia-framework';\n// const logger = LogManager.getLogger('doc-lister');\n\nexport class FtStickyTabs {\n // @bindable label;\n // @bindable filterName;\n\n constructor() {\n this.contents = [];\n this.labels = [];\n this.registerContent = this.doRegisterContent.bind(this);\n this.registerLabel = this.doRegisterLabel.bind(this);\n this.goTo = this.doGoTo.bind(this);\n this.offset = 50;\n }\n\n attached() {\n document.addEventListener('scroll', () => {\n this.doScrollChecks();\n }, false);\n\n // this.doScrollChecks();\n }\n\n doScrollChecks() {\n // bootsrap hack to check breakpoint mode\n if (this.xstest.offsetHeight === 0) {\n this.offset = this.tabBar.offsetHeight + 15;\n\n if (this.tabBarContainer.getBoundingClientRect().top <= 0) {\n this.tabBarContainer.classList.add('sticky');\n this.tabBarContainer.style.height = `${this.tabBar.offsetHeight + 15}px`;\n } else {\n this.tabBarContainer.classList.remove('sticky');\n this.tabBarContainer.style.height = 'auto';\n }\n\n this.contents.forEach((content) => {\n let top = content.element.getBoundingClientRect().top;\n let bottom = content.element.getBoundingClientRect().bottom;\n let label = find(this.labels, { tab: content.tab});\n label.active = content.active = ((top < this.offset) && (bottom > this.offset));\n });\n\n this.active = find(this.labels, 'active');\n } else {\n this.tabBarContainer.classList.remove('sticky');\n this.tabBarContainer.style.height = 'auto';\n }\n }\n\n detached() {\n document.removerEventListener('scroll', false);\n }\n\n doRegisterContent(content) {\n this.contents.push(content);\n this.doScrollChecks();\n }\n doRegisterLabel(content) {\n this.labels.push(content);\n }\n\n doGoTo(item) {\n const body = document.body; // For Chrome, Safari and Opera\n const html = document.documentElement; // Firefox and IE places the overflow at the html level, unless else is specified. Therefore, we use the documentElement property for these two browsers\n\n const currentOffset = this[item.tab].getBoundingClientRect().top - this.tabBar.offsetHeight - 10;\n body.scrollTop += currentOffset;\n html.scrollTop += currentOffset;\n }\n\n}\n","/**\n * Created by bstjohn on 18/01/2017.\n */\nimport {bindable, inject, BindingEngine} from 'aurelia-framework';\n// import { LogManager } from 'aurelia-framework';\n// const logger = LogManager.getLogger('doc-lister-link');\n@inject(Element)\n@inject(BindingEngine)\nexport class FtDocumentListerCell {\n // @bindable group;\n @bindable registerCell;\n @bindable registerCellItem;\n @bindable selectMultiple;\n @bindable onSelected;\n\n constructor(element, bindingEngine) {\n this.cell = {\n show: true,\n items: []\n };\n\n this.ddLeft = 0;\n this.ddTop = 0;\n this.selected = 0;\n }\n\n\n passOnSelected = (e) => {\n this.selected = this.cell.items.filter((i, key) => {\n return ((key !== 0) && i.show && i.selected);\n }).length;\n if (typeof this.onSelected === 'function') {\n this.onSelected();\n }\n }\n\n registerItem = (item) => {\n this.cell.items.push(item);\n this.cell.dropdownItems = this.cell.items.length;\n if (typeof this.registerCellItem === 'function') {\n this.registerCellItem(item);\n }\n }\n\n attached() {\n // only register cells if this is the first time the cell is being attached (attached gets called each time if.bind is changed in main tempalte)\n if (!this.isAttached) {\n if (typeof this.registerCell === 'function') {\n this.registerCell(this.cell);\n }\n }\n this.isAttached = true;\n }\n\n toggleDropdown() {\n // this.ddLeft = this.ddButton.getBoundingClientRect().left;\n this.ddLeft = this.dropdown.getBoundingClientRect().left - 6; // NOTE: 6 is for padding and border width to make docs aligned\n this.ddTop = this.ddButton.getBoundingClientRect().bottom;\n this.ddWidth = this.ddButton.offsetWidth;\n }\n\n}\n","/**\n * Created by bstjohn on 18/01/2017.\n */\nimport {bindable, inject} from 'aurelia-framework';\n// import {LogManager} from 'aurelia-framework';\n// const logger = LogManager.getLogger('doc-list');\n\n@inject(Element)\nexport class FtDocumentListerDynamicLink {\n @bindable link;\n @bindable selectMultiple;\n @bindable onSelected;\n\n constructor(element) {\n }\n\n attached() {\n }\n\n onSelect = (e) => {\n e.stopImmediatePropagation();\n this.link.selected = !this.link.selected;\n if (typeof this.onSelected === 'function') {\n this.onSelected();\n }\n }\n\n}\n","/**\n * Created by bstjohn on 18/01/2017.\n */\nimport {bindable, inject} from 'aurelia-framework';\n// import { LogManager } from 'aurelia-framework';\n// const logger = LogManager.getLogger('doc-lister-link');\n\n@inject(Element)\nexport class FtDocumentListerGroupRow {\n // @bindable row;\n // @bindable label;\n @bindable label;\n @bindable registerRow;\n @bindable registerRowItem;\n @bindable fundIdentifiers;\n\n constructor(element) {\n this.row = {\n show: true,\n label: '',\n items: [],\n fundIdentifiers: ''\n };\n }\n\n registerItem = (item) => {\n this.row.items.push(item);\n\n // add values for filters to the row\n // if (item.shareClass) {\n // this.row.shareClasses.push(item.shareClass);\n // }\n // if (item.currency) {\n // this.row.currencies.push(item.currency);\n // }\n // if (item.distribution) {\n // this.row.distributions.push(item.distribution);\n // }\n\n // also pass item through to parent to register there too\n if (typeof this.registerRowItem === 'function') {\n this.registerRowItem(item);\n }\n }\n\n attached() {\n this.row.label = this.label;\n this.row.fundIdentifiers = this.fundIdentifiers;\n if (typeof this.registerRow === 'function') {\n this.registerRow(this.row);\n }\n }\n\n\n}\n","/**\n * Created by bstjohn on 18/01/2017.\n */\nimport {bindable, inject} from 'aurelia-framework';\n// import { LogManager } from 'aurelia-framework';\n// const logger = LogManager.getLogger('doc-lister-link');\n\n@inject(Element)\nexport class FtDocumentListerGroup {\n // @bindable group;\n @bindable label;\n @bindable code;\n @bindable registerGroup;\n @bindable registerGroupRow;\n\n constructor(element) {\n this.group = {\n show: true,\n rows: []\n };\n }\n\n registerRow = (row) => {\n this.group.rows.push(row);\n\n // also pass item through to parent to register there too\n if (typeof this.registerGroupRow === 'function') {\n this.registerGroupRow(row);\n }\n }\n\n attached() {\n // this.group = {\n // show: true,\n // label: this.label\n // };\n this.group.label = this.label;\n this.group.code = this.code;\n if (typeof this.registerGroup === 'function') {\n this.registerGroup(this.group);\n }\n }\n\n\n}\n","/**\n * Created by bstjohn on 18/01/2017.\n */\nimport {bindable, inject} from 'aurelia-framework';\n// import {LogManager} from 'aurelia-framework';\n// const logger = LogManager.getLogger('doc-list');\n\n\n@inject(Element)\nexport class FtDocumentListerLink {\n // @bindable link;\n @bindable selectMultiple;\n @bindable fundCategory;\n @bindable shareClass;\n @bindable currency;\n @bindable distribution;\n @bindable type;\n @bindable label;\n @bindable size;\n @bindable url;\n @bindable onSelected;\n @bindable registerItem;\n\n constructor(element) {\n }\n\n attached() {\n this.link = {\n show: true,\n selected: false,\n shareClass: this.shareClass,\n currency: this.currency,\n distribution: this.distribution,\n url: this.url,\n label: this.label\n };\n\n if (!this.isAttached) {\n if (typeof this.registerItem === 'function') {\n this.registerItem(this.link);\n }\n }\n this.isAttached = true;\n }\n\n onSelect = (e) => {\n e.stopImmediatePropagation();\n this.link.selected = !this.link.selected;\n // logger.debug(this.link);\n if (typeof this.onSelected === 'function') {\n this.onSelected();\n }\n }\n\n\n}\n","/**\n * Created by bstjohn on 18/01/2017.\n */\nimport {bindable, inject} from 'aurelia-framework';\n// import { LogManager } from 'aurelia-framework';\n// const logger = LogManager.getLogger('doc-lister-link');\n\n@inject(Element)\nexport class FtDocumentListerMobileLink {\n @bindable selectMultiple;\n @bindable shareClass;\n @bindable currency;\n @bindable distribution;\n @bindable type;\n @bindable label;\n @bindable size;\n @bindable onSelected;\n @bindable registerItem;\n\n constructor(element) {\n }\n\n attached() {\n this.link = {\n show: true,\n shareClass: this.shareClass,\n currency: this.currency,\n distribution: this.distribution,\n label: this.label\n };\n if (typeof this.registerItem === 'function') {\n this.registerItem(this.link);\n }\n }\n\n\n}\n","/**\n * Created by bstjohn on 18/01/2017.\n */\nimport {bindable, inject, BindingEngine} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport includes from 'lodash/includes';\n// import { LogManager } from 'aurelia-framework';\n// const logger = LogManager.getLogger('doc-lister');\n@inject('Store', Element)\n@inject(BindingEngine)\nexport class FtDocumentLister extends ReduxComponentBase {\n @bindable label;\n @bindable marketingLabels;\n\n constructor(store, element) {\n super(store);\n\n this.activeTab = 'filters';\n\n // display option to select multiple\n this.showSelectMultiple = true;\n // boolean for actually selecting multiple\n this.selectMultiple = false;\n\n this.showSaveView = true;\n this.showSubscribe = true;\n this.showEmailSelected = true;\n this.showDownload = true;\n\n this.selected = [];\n this.links = [];\n this.groups = [];\n this.rows = [];\n this.mobileLinks = [];\n this.dropdowns = [];\n\n this.resetFilters();\n this.filterFromParams = false;\n this.filterName = this.getParameterByName('name');\n this.filterVehicle = this.getParameterByName('vehicle');\n this.filterShareClass = this.getParameterByName('shareClass');\n this.filterDistribution = this.getParameterByName('distribution');\n this.filterCurrency = this.getParameterByName('currency');\n\n let columnsToShow = this.getParameterByName('cols');\n if (columnsToShow) {\n this.showColRetailFactsheet = false;\n this.showColKIID = false;\n this.showColSID = false;\n this.showColProspectus = false;\n this.showColAnnualReport = false;\n this.showColSemiAnnualReport = false;\n this.showColFundHolds = false;\n this.showColAdvisorFactsheet = false;\n this.showColManagerCommentary = false;\n let columnsToShowArray = columnsToShow.split(',');\n columnsToShowArray.forEach((col) => {\n this[col] = true;\n });\n }\n\n // No need to dispatch as marketing labels should already be available, through config\n this.marketingLabels = store.getState().marketing.ftDocumentListerLabels;\n }\n\n mapState(newState) {\n try {\n this.marketingLabels = newState.marketing.ftDocumentListerLabels;\n } catch (e) {\n //logger.error(e);\n }\n }\n\n attached() {\n this.ready = true;\n }\n\n getParameterByName(name, url) {\n if (!url) url = window.location.href;\n name = name.replace(/[\\[\\]]/g, '\\\\$&');\n let regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)');\n let results = regex.exec(url);\n if (!results) return null;\n if (!results[2]) return '';\n this.filterFromParams = true;\n return decodeURIComponent(results[2].replace(/\\+/g, ' '));\n }\n\n\n registerItem = (link) => {\n this.links.push(link);\n\n // NOTE this would be better if it only ran when item registered, but we don't know which is last item...\n if (this.filterFromParams) {\n this.setFilters();\n }\n }\n\n registerMobileItem = (link) => {\n this.links.push(link);\n }\n\n registerRow = (row) => {\n this.rows.push(row);\n }\n registerGroup = (group) => {\n this.groups.push(group);\n this.groupsCount = this.groups.length;\n this.groupsCountVisible = this.groups.length;\n }\n\n registerDropdown = (cell) => {\n cell.marketingLabels = this.marketingLabels;\n this.dropdowns.push(cell);\n }\n\n toggleSelectMultiple = () => {\n this.selectMultiple = !this.selectMultiple;\n }\n\n filterSelected = () => {\n this.selected = this.links.filter((link) => {\n return (link.selected && link.show);\n });\n }\n\n saveView = () => {\n // logger.debug('save view');\n let url = window.location.href.split('?')[0];\n\n let cols = [];\n if (this.showColRetailFactsheet) { cols.push('showColRetailFactsheet'); }\n if (this.showColKIID) { cols.push('showColKIID'); }\n if (this.showColSID) { cols.push('showColSID'); }\n if (this.showColProspectus) { cols.push('showColProspectus'); }\n if (this.showColAnnualReport) { cols.push('showColAnnualReport'); }\n if (this.showColSemiAnnualReport) { cols.push('showColSemiAnnualReport'); }\n if (this.showColFundHolds) { cols.push('showColFundHolds'); }\n if (this.showColAdvisorFactsheet) { cols.push('showColAdvisorFactsheet'); }\n if (this.showColManagerCommentary) { cols.push('showColManagerCommentary'); }\n\n let colsList = cols.join(',');\n\n let urlWithParems = `${url}?cols=${colsList}&name=${this.filterName}&shareClass=${this.filterShareClass}&vehicle=${this.filterVehicle}&distribution=${this.filterDistribution}&currency=${this.filterCurrency}`;\n\n this.dispatch({\n type: 'OPEN_MODAL',\n title: 'Save View',\n contents: `\n <p>Simply copy and paste the URL shown here to share or save your view. This URL contains all your filter and column preferences and your results.</p>\n <p><input class=\"form-control\" value=\"${urlWithParems}\"/></p>`\n });\n }\n\n onSelected = () => {\n this.filterSelected();\n }\n\n callSubscribe = () => {\n this.filterSelected();\n }\n\n callEmailSelected = () => {\n this.filterSelected();\n }\n\n callDownload = () => {\n this.filterSelected();\n }\n\n resetFilters = () => {\n this.filterName = '';\n this.filterFund = '';\n this.filterVehicle = '';\n this.filterShareClass = '';\n this.filterCurrency = '';\n this.filterDistribution = '';\n\n this.showColRetailFactsheet = true;\n this.showColKIID = true;\n this.showColSID = true;\n this.showColProspectus = true;\n this.showColAnnualReport = true;\n this.showColSemiAnnualReport = true;\n this.showColFundHolds = true;\n this.showColAdvisorFactsheet = true;\n this.showColManagerCommentary = true;\n\n this.setFilters();\n this.showReset = false;\n }\n\n setFilters = () => {\n this.showReset = true;\n // logger.debug(this.links);\n // logger.debug('links', this.links);\n // logger.debug('rows', this.rows);\n // logger.debug('groups', this.groups);\n // logger.debug('dropdowns', this.dropdowns);\n\n // links\n this.links.forEach((link) => {\n link.show = true;\n if (\n (this.filterShareClass && link.shareClass && (this.filterShareClass !== link.shareClass)) ||\n (this.filterCurrency && link.currency && (this.filterCurrency !== link.currency)) ||\n (this.filterFund && link.fundCategory && (this.filterFund !== link.fundCategory)) ||\n (this.filterDistribution && link.distribution && (this.filterDistribution !== link.distribution))\n ) {\n link.show = false;\n }\n });\n\n // cells\n this.dropdowns.forEach((cell) => {\n cell.dropdownItems = cell.items.filter((item) => {\n return item.show === true;\n }).length;\n // work around to trigger filter to notice change and refresh\n cell.random = Math.random();\n });\n\n\n // ROWS\n this.rows.forEach((row) => {\n let validCurrencyLinks = row.items.filter((item) => { return (item.show && item.currency); }).length;\n let validShareClassLinks = row.items.filter((item) => { return (item.show && item.shareClass); }).length;\n let validDistributionLinks = row.items.filter((item) => { return (item.show && item.distribution); }).length;\n\n row.show = (!(((validCurrencyLinks === 0) && (validShareClassLinks === 0) && (validDistributionLinks === 0))));\n\n if (this.filterName && !includes(row.fundIdentifiers.toLowerCase(), this.filterName.toLowerCase())) {\n row.show = false;\n }\n });\n\n // GROUPS\n this.groups.forEach((group) => {\n group.show = true;\n if (\n (this.filterVehicle && (this.filterVehicle !== group.code))\n ) {\n group.show = false;\n }\n\n if (group.rows.filter((row) => {\n return row.show === true;\n }).length === 0) {\n group.show = false;\n }\n });\n\n // if (this.groups) {\n this.groupsCountVisible = this.groups.filter((group) => { return group.show === true; }).length;\n // }\n // this.groupsCount = this.groups.length;\n // logger.debug('xxxxxxx checking', this.groupsCount, this.groups.length);\n }\n\n checkRows = () => {\n return (this.activeTab === 'filters' ? 'hidden' : '');\n }\n\n}\n","import {bindable, inject, BindingEngine} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\n// import {getFundState} from '../../../products/lib/map-state-utils';\nimport chain from 'lodash/chain';\n\n@inject('Store', 'Beans', Element)\n@inject(BindingEngine)\nexport class FtReportArchiveA extends ReduxComponentBase {\n @bindable marketingLabels;\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.results = false;\n this.loading = false;\n this.dataSourcePath = element.getAttribute('data-source-path');\n\n this.onSelectDocument = this.doSelectDocument.bind(this);\n this.onSelectFund = this.doSelectFund.bind(this);\n\n // No need to dispatch as marketing labels should already be available, through config\n this.marketingLabels = store.getState().marketing.reportArchiveALabels;\n }\n\n attached() {\n this.typeAheadData = reportsArchiveTypeAhead;\n }\n\n doSelectFund(item) {\n this.fundId = item.fundID;\n this.shareClass = item.shareClass;\n this.fundName = item.label;\n this.results = false;\n this.loading = true;\n\n // fake a minor delay so that we can show a loader and give impression of a change...\n setTimeout(() => { this.load(); }, 300);\n // this.load();\n }\n\n doSelectDocument() {\n this.selected = chain(this.data.rows)\n .flatMap('cols')\n .filter(i => i.documents)\n .flatMap('documents')\n .filter(i => i.selected)\n .value();\n }\n\n mapState(newState) {\n try {\n this.data = newState.marketing.reportArchiveA;\n this.marketingLabels = newState.marketing.reportArchiveALabels;\n if (newState.marketing.reportArchiveA) {\n this.results = true;\n this.loading = false;\n }\n } catch (e) {\n // state not populated yet\n this.logger.debug('e()', e);\n this.results = false;\n this.loading = false;\n }\n }\n\n load() {\n let url = `${this.dataSourcePath}&FundID=${this.fundId}&ShareClass=${this.shareClass}&FundName=${this.fundName}`;\n\n // adding CID so middlewear matches these values, and doesn't prepent local folder to url\n this.dispatch({\n type: 'POPULATE_REPORT_ARCHIVE_A',\n beans: [url],\n fundId: this.fundId,\n cid: url\n });\n }\n\n onChoose(item) {\n this.message = item;\n }\n}\n","import {bindable, inject, BindingEngine} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport chain from 'lodash/chain';\n// import {getFundState} from '../../../products/lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\n@inject(BindingEngine)\nexport class FtReportArchiveB extends ReduxComponentBase {\n @bindable marketingLabels;\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.results = false;\n this.loading = false;\n this.dataSourcePath = element.getAttribute('data-source-path');\n\n this.onSelectDocument = this.doSelectDocument.bind(this);\n this.onSelectFund = this.doSelectFund.bind(this);\n\n // No need to dispatch as marketing labels should already be available, through config\n this.marketingLabels = store.getState().marketing.reportArchiveBLabels;\n }\n\n attached() {\n this.typeAheadData = reportsArchiveTypeAhead;\n this.reportsArchiveYears = reportsArchiveYears;\n this.selectedYear = this.reportsArchiveYears[0];\n }\n\n doSelectFund(item) {\n this.fundId = item.fundID;\n this.shareClass = item.shareClass;\n this.fundName = item.label;\n this.results = false;\n this.loading = true;\n\n // fake a minor delay so that we can show a loader and give impression of a change...\n setTimeout(() => { this.load(); }, 300);\n // setTimeout(this.load, 300);\n }\n\n //.filter(i => i.documents)\n\n doSelectDocument() {\n this.selected = chain(this.data.rows)\n .flatMap('cols')\n .filter(i => i.documents)\n .flatMap('documents')\n .filter(i => i.selected)\n .value();\n }\n\n doYearChange() {\n this.results = false;\n this.loading = true;\n setTimeout(() => { this.load(); }, 300);\n }\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.data = newState.marketing.reportArchiveB;\n this.marketingLabels = newState.marketing.reportArchiveBLabels;\n // this.logger.debug('map state ok', newState);\n this.results = true;\n this.loading = false;\n } catch (e) {\n // state not populated yet\n // this.logger.debug('map state error', e);\n this.results = false;\n this.loading = false;\n }\n }\n\n load() {\n let url = `${this.dataSourcePath}&FundID=${this.fundId}&year=${this.selectedYear}&ShareClass=${this.shareClass}`;\n\n // adding CID so middlewear matches these values, and doesn't prepent local folder to url\n this.dispatch({\n type: 'POPULATE_REPORT_ARCHIVE_B',\n beans: [url],\n fundId: this.fundId,\n cid: url\n });\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport chain from 'lodash/chain';\n// import {getFundState} from '../../../products/lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtReportArchiveC extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.results = false;\n this.loading = false;\n this.dataSourcePath = element.getAttribute('data-source-path');\n this.onSelectDocument = this.doSelectDocument.bind(this);\n }\n\n attached() {\n this.reportsArchiveYears = reportsArchiveYears;\n this.selectedYear = this.reportsArchiveYears[0];\n this.load();\n }\n\n doYearChange() {\n this.results = false;\n this.loading = true;\n this.data = [];\n setTimeout(() => { this.load(); }, 300);\n }\n\n doSelectDocument() {\n this.selected = chain(this.data.rows)\n .flatMap('cols')\n .filter(i => i.documents)\n .flatMap('documents')\n .filter(i => i.selected)\n .value();\n }\n\n load() {\n this.loading = false;\n this.results = true;\n\n this.data = {\n title: `Rücknahmepreise / Zwischengewinne ${this.selectedYear}`,\n cols: ['Monat / 2009', 'Rücknahmepreise', 'Zwischengewinne', 'Aktiengewinne'],\n rows: [\n {\n label: 'xxxx',\n cols: [\n {\n documents: [\n {\n title: 'doc.title',\n url: 'xxxx',\n size: '10kb',\n extension: 'pdf'\n }\n ]\n },\n {\n documents: [\n {\n title: 'doc.title',\n url: 'xxxx',\n size: '10kb',\n extension: 'pdf'\n }\n ]\n },\n {\n documents: [\n {\n title: 'doc.title',\n url: 'xxxx',\n size: '10kb',\n extension: 'pdf'\n },\n {\n title: 'doc.title',\n url: 'xxxx',\n size: '10kb',\n extension: 'pdf'\n },\n {\n title: 'doc.title',\n url: 'xxxx',\n size: '10kb',\n extension: 'pdf'\n }\n ]\n }\n ]\n },\n {\n label: 'yyyy',\n cols: [\n {\n documents: [\n {\n title: 'doc.title',\n url: 'xxxx',\n size: '10kb',\n extension: 'pdf'\n }\n ]\n },\n {\n documents: [\n {\n title: 'doc.title',\n url: 'xxxx',\n size: '10kb',\n extension: 'pdf'\n }\n ]\n },\n {\n documents: [\n {\n title: 'doc.title',\n url: 'xxxx',\n size: '10kb',\n extension: 'pdf'\n }\n ]\n }\n ]\n }\n ]\n };\n this.results = true;\n\n // this.populated = false;\n // let url = `${this.dataSourcePath}&FundID=${this.fundId}&year=${this.selectedYear}&ShareClass=all`;\n //\n // // adding CID so middlewear matches these values, and doesn't prepent local folder to url\n // this.dispatch({\n // type: 'POPULATE_REPORT_ARCHIVE_C',\n // beans: [url],\n // fundId: this.fundId,\n // cid: url\n // });\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\n// import {getFundState} from '../../../products/lib/map-state-utils';\nimport chain from 'lodash/chain';\n\n@inject('Store', 'Beans', Element)\nexport class FtReportArchiveD extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.dataSourcePath = element.getAttribute('data-source-path');\n this.onSelectDocument = this.doSelectDocument.bind(this);\n }\n\n attached() {\n this.data = {\n groups: [\n {\n title: 'Ausschüttungen 2007',\n cols: ['Monat / 2009', 'Rücknahmepreise', 'Zwischengewinne', 'Aktiengewinne'],\n rows: [\n {\n label: 'xxxx',\n cols: [\n {\n documents: [\n {\n title: 'doc.title',\n url: 'xxxx',\n size: '10kb',\n extension: 'pdf'\n }\n ]\n },\n {\n documents: [\n {\n title: 'doc.title',\n url: 'xxxx',\n size: '10kb',\n extension: 'pdf'\n }\n ]\n },\n {\n documents: [\n {\n title: 'doc.title',\n url: 'xxxx',\n size: '10kb',\n extension: 'pdf'\n },\n {\n title: 'doc.title',\n url: 'xxxx',\n size: '10kb',\n extension: 'pdf'\n },\n {\n title: 'doc.title',\n url: 'xxxx',\n size: '10kb',\n extension: 'pdf'\n }\n ]\n }\n ]\n },\n {\n label: 'yyyy',\n cols: [\n {\n documents: [\n {\n title: 'doc.title',\n url: 'xxxx',\n size: '10kb',\n extension: 'pdf'\n }\n ]\n },\n {\n documents: [\n {\n title: 'doc.title',\n url: 'xxxx',\n size: '10kb',\n extension: 'pdf'\n }\n ]\n },\n {\n documents: [\n {\n title: 'doc.title',\n url: 'xxxx',\n size: '10kb',\n extension: 'pdf'\n }\n ]\n }\n ]\n }\n ]\n },\n {\n title: 'Ausschüttungen 2006',\n cols: ['Monat / 2009', 'Rücknahmepreise', 'Zwischengewinne'],\n rows: [\n {\n label: 'xxxx',\n cols: [\n {\n documents: [\n {\n title: 'doc.title',\n url: 'xxxx',\n size: '10kb',\n extension: 'pdf'\n }\n ]\n },\n {\n documents: [\n {\n title: 'doc.title',\n url: 'xxxx',\n size: '10kb',\n extension: 'pdf'\n },\n {\n title: 'doc.title',\n url: 'xxxx',\n size: '10kb',\n extension: 'pdf'\n },\n {\n title: 'doc.title',\n url: 'xxxx',\n size: '10kb',\n extension: 'pdf'\n }\n ]\n }\n ]\n },\n {\n label: 'yyyy',\n cols: [\n {\n documents: [\n {\n title: 'doc.title',\n url: 'xxxx',\n size: '10kb',\n extension: 'pdf'\n }\n ]\n },\n {\n documents: [\n {\n title: 'doc.title',\n url: 'xxxx',\n size: '10kb',\n extension: 'pdf'\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n };\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n // try {\n // this.data = newState.marketing.reportArchiveC;\n // this.results = true;\n // } catch (e) {\n // // state not populated yet\n // this.logger.debug('e()', e);\n // this.results = false;\n // }\n }\n\n doSelectDocument() {\n this.selected = chain(this.data.groups)\n .flatMap('rows')\n .flatMap('cols')\n .filter(i => i.documents)\n .flatMap('documents')\n .filter(i => i.selected)\n .value();\n }\n}\n","import {computedFrom, bindable, inject, BindingEngine} from 'aurelia-framework';\nimport uniq from 'lodash/uniq';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\n\n//import {LogManager} from 'aurelia-framework';\n//const logger = LogManager.getLogger('ft-video-switch');\n\n@inject('Store', 'Beans', Element)\n@inject(BindingEngine)\nexport class FtVideoSwitch extends ReduxComponentBase {\n @bindable marketingLabels;\n populated = false;\n videoData = [];\n languages = [];\n currentVideo;\n currentLanguage = '';\n dropdownOpen = false;\n transcriptUrl;\n\n constructor(store, beans, element) {\n super(store);\n this.transcriptUrl = element.getAttribute('transcript-url');\n\n // No need to dispatch as marketing labels should already be available, through config\n this.marketingLabels = store.getState().marketing.ftVideoSwitch;\n }\n\n @computedFrom('languages', 'populated')\n get showLanguageDropdown() {\n return this.languages.length > 1;\n }\n\n @computedFrom('languages', 'populated')\n get showControls() {\n return this.showLanguageDropdown || this.transcriptUrl;\n }\n\n @computedFrom('dropdownOpen', 'populated')\n get dropdownClass() {\n return this.dropdownOpen ? 'open' : '';\n }\n\n toggleDropdown() {\n this.dropdownOpen = !this.dropdownOpen;\n }\n\n changeLanguage(language) {\n this.currentVideo = this.videoData.find(v => v.language === language);\n this.currentLanguage = this.currentVideo.language;\n this.dropdownOpen = false;\n }\n\n attached() {\n let videoElements = Array.from(this.videosNode.querySelectorAll('[data-fti-component=\"video\"]'));\n this.videoData = videoElements.map(this._parseVideo);\n videoElements.forEach(video => video.parentNode.removeChild(video));\n this.languages = uniq(this.videoData.map(v => v.language)).sort();\n if (this.videoData.length) {\n this.currentVideo = this.videoData[0];\n this.currentLanguage = this.currentVideo.language;\n }\n this.populated = true;\n }\n\n _parseVideo(vid) {\n let out = {};\n out.language = vid.getAttribute('language');\n out.content = vid.innerHTML.trim();\n return out;\n }\n}\n","import get from 'lodash/get';\nimport some from 'lodash/some';\nimport isArray from 'lodash/isArray';\n\nexport function showElement(fundConfigData, elementID, fundID, fundCat) {\n let show = true;\n\n let suppressElementsByFund = get(fundConfigData, 'provider.config.portfolio.suppressByFund');\n if (suppressElementsByFund &&\n some(suppressElementsByFund, obj => {\n let items = obj.fundID;\n return some(!isArray(items) ? [items] : items, { val: Number(fundID) });\n }) &&\n some(suppressElementsByFund, obj => {\n let items = obj.elementID;\n return some(!isArray(items) ? [items] : items, { val: elementID });\n })\n ) {\n show = false;\n }\n\n let suppressElementsByCategory = get(fundConfigData, 'provider.config.portfolio.suppressByCategory');\n if (suppressElementsByCategory &&\n some(suppressElementsByCategory, obj => {\n let items = obj.fundCat;\n return some(!isArray(items) ? [items] : items, { val: fundCat });\n }) &&\n some(suppressElementsByCategory, obj => {\n let items = obj.elementID;\n return some(!isArray(items) ? [items] : items, { val: elementID });\n })\n ) {\n show = false;\n }\n\n return show;\n}\n","/*\n * Shared utils functions which can be used on different components\n */\nimport get from 'lodash/get';\n/**\n * Returns object length\n * @param {Obiect} obiectToCount\n * @returns {Number}\n */\nexport function countObj(obiectToCount) {\n let i = [];\n for (let objVal of obiectToCount) {\n i.push(objVal);\n }\n return i.length;\n}\n/**\n * Reduces Object of X first elements\n * @param {Object} obiectToReduce\n * @param {int} reduction\n * @returns {undefined|Array|objectReduce.obiectReduced}\n */\nexport function objectReduce(obiectToReduce, reduction) {\n if (!obiectToReduce || !reduction) {\n return;\n }\n let tableDataLenght = countObj(obiectToReduce);\n let obiectReduced = [];\n for (let i = reduction; i < tableDataLenght; i++) {\n obiectReduced.push(obiectToReduce[i]);\n }\n return obiectReduced;\n}\n/**\n * Returns Caveats array for calendar year\n * @param {Obiect} CVO\n * @param {String} secName\n * @returns {Array|_getCaveats.elementLevelCaveatsTab|undefined}\n */\nexport function getCaveats(CVO, secName) {\n if (!CVO || !secName) {\n return;\n }\n let elementLevel = get(CVO, 'elementLevel.caveat');\n let elementLevelCaveats = get(CVO, 'elementLevelCaveats.caveat');\n let elementLevelTab = [];\n for (let elementLevelVal of elementLevel) {\n if (elementLevelVal.secName === secName) {\n elementLevelTab.push(elementLevelVal);\n }\n }\n let elementLevelCaveatsTab = [];\n let i = 1;\n for (let elementLevelTabVal of elementLevelTab) {\n for (let elementLevelCaveatsVal of elementLevelCaveats) {\n if (elementLevelCaveatsVal.id === elementLevelTabVal.id) {\n let tempLevelCaveatsTab = {\n eleName: elementLevelTabVal.eleName,\n secName: elementLevelTabVal.secName,\n id: elementLevelCaveatsVal.id,\n text: elementLevelCaveatsVal.text,\n iterator: i\n };\n elementLevelCaveatsTab.push(tempLevelCaveatsTab);\n }\n }\n i++;\n }\n\n return elementLevelCaveatsTab;\n}\n","\r\n/**\r\n * Return a dash if value is null, undefined or empty string.\r\n * Note that if it returns a dash you need to bind the innerHTML to the value\r\n * to avoid html escaping. e.g. instead of:\r\n *\r\n * <p>${ myVal | ftDashIfEmpty }</p>\r\n *\r\n * do:\r\n *\r\n * <p innerHTML.bind=\"myVal | ftDashIfEmpty\"></p>\r\n */\r\nexport class FtDashIfEmptyValueConverter {\r\n toView(val) {\r\n return (val || (val === 0)) ? String(val) : '—';\r\n }\r\n}\r\n","import {formatCurrency} from '../../lib/reducer-utils';\n/**\n * Return value followed by currency symbol if numeric, otherwise return dash.\n *\n * <p innerhtml.bind=\"value | ftFormatCurrency : currency\"></p>\n * <p innerhtml.bind=\"'42.00' | ftFormatCurrency : 'GBP'\"></p>\n */\nexport class FtFormatCurrencyValueConverter {\n toView(val, currency) {\n return formatCurrency(val, currency, true);\n }\n}\n","\r\n/**\r\n * Return value followed by percent symbol if numeric, otherwise return val.\r\n *\r\n * <p innerhtml.bind=\"myVal | ftFormatPercent\"></p>\r\n */\r\nexport class FtFormatPercentValueConverter {\r\n toView(val) {\r\n let parsed = parseFloat(val);\r\n if (isNaN(parsed)) {\r\n return val;\r\n }\r\n return `${parsed}%`;\r\n }\r\n}\r\n","\r\n/**\r\n * Takes a string, and returns it with white space trimmed from left and right,\r\n * and internal sequences of whitespace reduced to one:\r\n * <p>${ myVal | ftNormalizeSpace }</p>\r\n *\r\n * do:\r\n *\r\n * <p innerHTML.bind=\"myVal | ftNormalizeSpace\"></p>\r\n */\r\nexport class FtNormalizeSpaceValueConverter {\r\n toView(val) {\r\n return (val && typeof val === 'string') ? val.replace(/^\\s+/, '').replace(/\\s+$/, '').replace(/\\s+/g, ' ') : val;\r\n }\r\n}\r\n","export class FtRangeWithPercentValueConverter {\n toView(val) {\n return val.replace(/%/g, '<sup>%</sup>');\n }\n}\n","/**\n * Created by bstjohn on 29/10/2016.\n */\n\n/**\n * Add a percent sign to numbers or show a dash if it isn't a number.\n * Note that if it returns a dash you need to bind the innerHTML to the value\n * to avoid html escaping. e.g. instead of:\n *\n * SHOW\n * <p>${ myVal | ftWithDollarOrDash }</p>\n * <p>${ myVal | ftWithDollarOrDash:true }</p>\n *\n * HIDE\n * <p>${ myVal | ftWithDollarOrDash:false }</p>\n *\n * NA\n * <p>${ myVal | ftWithDollarOrDash:'P' }</p>\n *\n * do:\n *\n * SHOW\n * <p innerHTML.bind=\"myVal | ftWithDollarOrDash\"></p>\n * <p innerHTML.bind=\"myVal | ftWithDollarOrDash:true\"></p>\n *\n * HIDE\n * <p innerHTML.bind=\"myVal | ftWithDollarOrDash:false\"></p>\n *\n * NA\n * <p innerHTML.bind=\"myVal | ftWithDollarOrDash:'P'\"></p>\n **/\nexport class FtWithDollarOrDashValueConverter {\n toView(val, display = true) {\n let tempVal;\n if (!display) return '';\n if (val) {\n if (display === 'P') {\n tempVal = 'NA';\n } else {\n tempVal = (isNaN(val)) ? val : ('$' + val);\n }\n } else {\n tempVal = '—';\n }\n return tempVal;\n }\n}\n","/**\n * Created by bstjohn on 29/10/2016.\n */\n\n/**\n * Add a percent sign to numbers or show a dash if it isn't a number.\n * Note that if it returns a dash you need to bind the innerHTML to the value\n * to avoid html escaping. e.g. instead of:\n *\n * SHOW\n * <p>${ myVal | ftWithPercentOrDash }</p>\n * <p>${ myVal | ftWithPercentOrDash:true }</p>\n *\n * HIDE\n * <p>${ myVal | ftWithPercentOrDash:false }</p>\n *\n * do:\n *\n * SHOW\n * <p innerHTML.bind=\"myVal | ftWithPercentOrDash\"></p>\n * <p innerHTML.bind=\"myVal | ftWithPercentOrDash:true\"></p>\n *\n * HIDE\n * <p innerHTML.bind=\"myVal | ftWithPercentOrDash:false\"></p>\n */\nexport class FtWithPercentOrDashValueConverter {\n toView(val, display = true) {\n if (!display) return '';\n if (val || val === 0) {\n return isNaN(parseFloat(val)) ? val : val + '%';\n }\n return '—';\n }\n}\n","/**\n * Created by bstjohn on 26/10/2016.\n */\nimport {bindable} from 'aurelia-framework';\nimport {ComponentBase} from '../../../../lib/component-base';\n\nexport class FtDistributionRateAtBreakpoint extends ComponentBase {\n @bindable label = {};\n @bindable data = {};\n @bindable proximity;\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtDistributions extends ReduxComponentBase {\n\n lgColWidth = 'col-lg-8';\n colWidth = '';\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_DISTRIBUTIONS_STATE',\n beans: beans.component.distributions, // from configuration\n fundId: this.fundId\n });\n }\n\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.logger.debug('mapState()', JSON.parse(JSON.stringify(newState)));\n let fundState = getFundState(newState, this.fundId);\n //this.label = newState.products.distributions.label;\n this.label = newState.products.label;\n this.proximity = fundState.distributions.caveats.proximity;\n this.lgColWidth = (fundState.distributions.data.displayDistributionRateAtBreakpoint) ? 'col-lg-8' : 'col-lg-12';\n this.colWidth = (fundState.distributions.data.displayDistributionRateAtBreakpoint) ? '' : 'col-lg-4';\n this.dividendDistributionTypeLabel = fundState.distributions.data.dividendDistributionTypeLabel;\n this.dividendDistributionSchedule = fundState.distributions.data.dividendDistributionSchedule;\n this.capitalGainsDistributionSchedule = fundState.distributions.data.capitalGainsDistributionSchedule;\n this.ratesYieldsData = fundState.distributions.data;\n this.ratesYieldsData.proximity = this.proximity;\n this.rateAtBreakpointData = fundState.distributions.data;\n this.logger.debug('mapState() rateAtBreakpointData', this.rateAtBreakpointData, newState);\n if (newState.products.app) {\n this.visibleElementLevel = newState.products.app.distributions.visibleElementLevel;\n }\n\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.logger.debug('mapState() error', e, newState);\n this.populated = false;\n }\n }\n}\n","/**\n * Created by bstjohn on 26/10/2016.\n */\nimport {bindable, observable} from 'aurelia-framework';\nimport {ComponentBase} from '../../../../lib/component-base';\n\nexport class FtRatesAndYields extends ComponentBase {\n label = {};\n\n @bindable @observable data;\n @bindable label;\n shouldDisplay = false;\n colWidth = '';\n ratesAndYieldsHeading = '';\n\n dataChanged() {\n this.update();\n }\n\n // update derived state\n update() {\n this.logger.debug('updating');\n if (this.data) {\n this.shouldDisplay = (this.data.isAllowedInConfig &&\n !this.data.categoryBlockedByUser &&\n !this.data.fundBlockedByUser);\n this.colWidth = (this.data.displayDistributionRateAtBreakpoint) ? '' : 'col-lg-4';\n this.ratesAndYieldsHeading = (this.data.fundCategory === 'Money Funds') ? this.label['yields'] : this.label['rates-and-yields'];\n }\n }\n\n}\n","/**\r\n * Created by bstjohn on 11/12/2016.\r\n */\r\nimport {bindable, observable} from 'aurelia-framework';\r\n\r\nexport class FtYieldRows {\r\n @bindable label = {};\r\n rows = [];\r\n @bindable @observable data;\r\n\r\n dataChanged() {\r\n if (this.data) {\r\n this.rows = this.data.rows;\r\n this._displayMoreThanOneRow();\r\n }\r\n }\r\n\r\n _displayMoreThanOneRow() {\r\n this.displayMoreThanOneRow =\r\n this.rows.length > 1 &&\r\n this.rows[0].date === this.rows[1].date &&\r\n ((!isNaN(this.rows[0].value)) || this.data.displayEmpty === true) &&\r\n !isNaN(this.rows[1].value);\r\n }\r\n}\r\n","\nimport {inject, observable} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtDistributionsYtd extends ReduxComponentBase {\n populated = false;\n @observable elementLevel;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.historicalDataUrl = element.getAttribute('historical-data-url');\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_DISTRIBUTIONS_STATE',\n beans: beans.component.distributions, // beans shared with distributions\n fundId: this.fundId\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.logger.debug('mapState()');\n let fundState = getFundState(newState, this.fundId);\n this.label = newState.products.label;\n this.proximity = fundState.distributions.caveats.proximity;\n this.displayDistributionsTable = fundState.distributions.data.displayDistributionsTable;\n this.ytdDetail = fundState.distributions.data.ytdDetail;\n this.displayDistributionsTableForMoneyFunds = fundState.distributions.data.displayDistributionsTableForMoneyFunds;\n this.displayNoDistributions = fundState.distributions.data.displayNoDistributions;\n if (newState.products.app) {\n this.visibleElementLevel = newState.products.app.distributions.visibleElementLevel;\n }\n\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtHistoricalAverageAnnualTotalReturns extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n\n this.fundId = element.getAttribute('fund-id');\n this.historicalPerformance = beans.component.historicalPerformance;\n // this.taxYear = element.getAttribute('tax-year');\n this.taxYear = 2016;\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_HISTORICAL_AATR_MODAL',\n beans: this.historicalPerformance,\n fundId: this.fundId,\n taxYear: this.taxYear\n });\n }\n\n /* onChangeHistoricYear(month, year) {\n let newTaxYear = key.srcElement.value;\n let newTaxMonth\n this.dispatch({\n type: 'POPULATE_HISTORICAL_AATR_MODAL',\n beans: this.historicalPerformance,\n fundId: this.fundId,\n taxYear: newTaxYear,\n taxMonth: newTaxMonth\n });\n } */\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.logger.debug('mapState()');\n let fundState = getFundState(newState, this.fundId);\n // set component properties from state as appropriate\n\n this.label = newState.products.label;\n this.data = fundState.performanceHistory.data;\n\n this.chartCategories = [\n this.label['1-yr'],\n this.label['3-yr'],\n this.label['5-yr'],\n this.label['10-yr'],\n this.label['life']\n ];\n\n let chartItems = this.data.chartData;\n let chartType = this.data.chartType;\n let aryChartData = [];\n\n for (let key of Object.keys(chartItems)) {\n let thisChartItem = {\n data: chartItems[key],\n type: chartType\n };\n aryChartData.push(thisChartItem);\n }\n\n this.chartData = aryChartData;\n\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtHistoricalCumulativeTotalReturns extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.historicalPerformance = beans.component.historicalPerformance;\n // this.taxYear = element.getAttribute('tax-year');\n this.taxYear = 2016;\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_HISTORICAL_CUMULATIVE_TOTAL_RETURNS',\n beans: this.historicalPerformance,\n fundId: this.fundId,\n taxYear: this.taxYear\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.logger.debug('mapState()');\n let fundState = getFundState(newState, this.fundId);\n\n this.label = newState.products.label;\n this.data = fundState.historicalCumulativeTotalReturns.data;\n\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\n// import {getLabels} from '../../lib/labels-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtFundInformation extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.cid = element.getAttribute('cid');\n this.portfolioBeans = beans.component.fundInformation;\n this.portfolioBeans.push(this.cid);\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_FUND_INFORMATION',\n beans: this.portfolioBeans,\n fundId: this.fundId,\n cid: this.cid\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n /*try {\n if (!this.label) {\n this.label = getLabels(newState, ['FUND_CATEGORY']);\n // this.label = getLabels(newState);\n }\n } catch (e) {\n //\n }*/\n try {\n this.logger.debug('mapState()');\n let fundState = getFundState(newState, this.fundId);\n //this.label = Object.assign({}, this.label, fundState.fundInformation.label);\n this.label = newState.products.label;\n this.data = fundState.fundInformation.data;\n this.caveats = fundState.fundInformation.caveats;\n\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","import {bindable, inject, containerless} from 'aurelia-framework';\n\n@inject(Element)\n// @autoinject\n@containerless\nexport class FtFundMmfrStableNavHeader {\n @bindable data;\n @bindable labels;\n\n constructor(element) {\n this.element = element;\n }\n\n attached() {\n\n }\n\n}\n","import {bindable, inject} from 'aurelia-framework';\n\n@inject(Element)\nexport class FtFundPriceHeader {\n @bindable data;\n @bindable labels;\n/*\n @bindable label;\n @bindable groupedData;\n @bindable caveats;\n @bindable date;\n*/\n\n constructor(element) {\n this.element = element;\n }\n\n attached() {\n\n }\n\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtFundStaticBar extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n // this.cid = element.getAttribute('cid');\n this.portfolioBeans = beans.component.overview;\n // this.portfolioBeans.push(this.cid);\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_FUND_STATIC_BAR',\n // beans: beans..., // beans set in configuration for site e.g. configuration/en-us-retail/beans.js\n beans: this.portfolioBeans,\n fundId: this.fundId/*,\n cid: this.cid*/\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.logger.debug('mapState()');\n this.logger.debug('this.fundId', this.fundId);\n let fundState = getFundState(newState, this.fundId);\n\n this.label = newState.products.label;\n this.data = fundState.fundStaticBar.data;\n this.proximity = fundState.fundStaticBar.proximity;\n\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.logger.error(e);\n this.populated = false;\n }\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtFundTradingCharacteristics extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.cid = element.getAttribute('cid');\n this.fundOverviewBeans = beans.component.fundOverview;\n this.logger.info('beany', this.fundOverviewBeans);\n\n this.fundOverviewBeans.push(this.cid);\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_FUND_TRADING_CHARACTERISTICS',\n beans: this.fundOverviewBeans,\n fundId: this.fundId,\n cid: this.cid\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.logger.debug('mapState()');\n let fundState = getFundState(newState, this.fundId);\n this.label = newState.products.label;\n this.data = fundState.fundInformation.data;\n this.caveats = fundState.fundInformation.caveats;\n\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","import {bindable, inject, containerless} from 'aurelia-framework';\n// import {customElementUtil} from '../../lib/custom-element-util';\n\n@inject(Element)\n// @autoinject\n@containerless\nexport class FtFundNavHeader {\n @bindable data;\n @bindable labels;\n\n constructor(element) {\n this.element = element;\n }\n\n attached() {\n // console.log('this A', this);\n // this.element = customElementUtil(this.element);\n // console.log('this B', this);\n }\n\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtAfterTaxAverageAnnualReturns extends ReduxComponentBase {\n populated = false;\n currentTab = null;\n tabs = [\n {\n key: 'MONTHLY',\n labelKey: 'month-end',\n ariaControl: 'after-tax-average-annual-total-returns-monthly',\n isActive: false\n },\n {\n key: 'QUARTERLY',\n labelKey: 'quarter-end',\n ariaControl: 'after-tax-average-annual-total-returns-quarterly',\n isActive: false\n }\n ];\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.afterTaxBeans = beans.component.performanceSimply;\n this.taxYear = element.getAttribute('tax-year');\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_AFTER_TAX',\n beans: this.afterTaxBeans, // beans set in configuration for site e.g. configuration/en-us-retail/beans.js\n fundId: this.fundId,\n taxYear: this.taxYear\n });\n // select default chart tab\n this.dispatch({\n type: 'AFTER_TAX_CHANGE_TAB',\n tab: 'MONTHLY'\n });\n }\n changeTab(key) {\n this.dispatch({\n type: 'AFTER_TAX_CHANGE_TAB',\n tab: key\n });\n }\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.logger.debug('mapState() - After Tax');\n this.getChartColorStyle = 'chart-color';\n let fundState = getFundState(newState, this.fundId);\n // set component properties from state as appropriate\n this.data = fundState.afterTaxAverageAnnualReturns.data;\n this.label = newState.products.label;\n this.componentHeading = this.label['component-heading'];\n this.readImportant = this.label['read-important'];\n// this.asOfDate = fundState.afterTaxAverageAnnualReturns.MONTHLY.asOfDate.alt;\n// this.MONTHLY = fundState.afterTaxAverageAnnualReturns.MONTHLY;\n this.caveats = fundState.afterTaxAverageAnnualReturns.caveats;\n this.currentTab = newState.products.app.performance.afterTaxAverageAnnualReturns.currentTab;\n this.dataTab = fundState.afterTaxAverageAnnualReturns[this.currentTab];\n\n let chartCategories = [this.label['1-yr'], this.label['3-yr'], this.label['5-yr'], this.label['10-yr']];\n this.chartCategories = chartCategories;\n let chartDataME = fundState.afterTaxAverageAnnualReturns.MonthlyGraph;\n let chartDataQE = fundState.afterTaxAverageAnnualReturns.QuarterlyGraph;\n let chartData = chartDataME;\n if (this.currentTab === 'QUARTERLY') chartData = chartDataQE;\n let chartItems = chartData;\n let chartType = 'column';\n let aryChartData = [];\n for (let key of Object.keys(chartItems)) {\n let thisChartItem = {\n data: chartItems[key],\n type: chartType\n };\n aryChartData.push(thisChartItem);\n }\n\n this.chartData = aryChartData;\n\n this.tabs = this.tabs.map(tab => {\n tab.value = this.label[tab.labelKey];\n tab.isActive = (tab.key === this.currentTab);\n return tab;\n });\n\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtAverageAnnualTotalReturns extends ReduxComponentBase {\n populated = false;\n currentTab = null;\n tabs = [\n {\n key: 'MONTH_END',\n labelKey: 'month-end',\n ariaControl: 'average-annual-total-return-monthly-pane',\n isActive: false\n },\n {\n key: 'QUARTER_END',\n labelKey: 'quarter-end',\n ariaControl: 'average-annual-total-return-quarterly-pane',\n isActive: false\n }\n ];\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.performanceBeans = beans.component.performanceSimply;\n // this.taxYear = element.getAttribute('tax-year');\n this.taxYear = 2016;\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_AVERAGE_ANNUAL_TOTAL_RETURNS',\n beans: this.performanceBeans, // beans set in configuration for site e.g. configuration/en-us-retail/beans.js\n fundId: this.fundId,\n taxYear: this.taxYear\n });\n\n // select default chart tab\n this.dispatch({\n type: 'AVERAGE_ANNUAL_TOTAL_RETURNS_CHANGE_TAB',\n tab: 'MONTH_END'\n });\n }\n\n changeTab(key) {\n this.dispatch({\n type: 'AVERAGE_ANNUAL_TOTAL_RETURNS_CHANGE_TAB',\n tab: key\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.logger.debug('mapState()');\n\n let fundState = getFundState(newState, this.fundId);\n this.currentTab = newState.products.app.performance.averageAnnualTotalReturns.currentTab;\n this.label = newState.products.label;\n this.caveats = fundState.averageAnnualTotalReturns.caveats;\n this.data = fundState.averageAnnualTotalReturns[this.currentTab];\n\n this.chartCategories = [\n this.label['1-yr'],\n this.label['3-yr'],\n this.label['5-yr'],\n this.label['10-yr'],\n this.label['life']\n ];\n\n let chartItems = this.data.chartData;\n let chartType = this.data.chartType;\n let aryChartData = [];\n\n for (let key of Object.keys(chartItems)) {\n let thisChartItem = {\n data: chartItems[key],\n type: chartType\n };\n aryChartData.push(thisChartItem);\n }\n\n this.chartData = aryChartData;\n\n this.tabs = this.tabs.map(tab => {\n tab.value = this.label[tab.labelKey];\n tab.isActive = (tab.key === this.currentTab);\n return tab;\n });\n\n //this.proximity = fundState.averageAnnualTotalReturns.caveats.proximity;\n\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\n\n// import {LogManager} from 'aurelia-framework';\n// const logger = LogManager.getLogger('ft-calendar-year');\n\n@inject('Store', 'Beans', Element)\nexport class FtCalendarYearReturns extends ReduxComponentBase {\n populated = false;\n currentTab = null;\n tabs = [\n {\n key: 'MONTH_END',\n labelKey: 'month-end',\n ariaControl: 'calendar-year-return-monthly-pane',\n isActive: false\n },\n {\n key: 'QUARTER_END',\n labelKey: 'quarter-end',\n ariaControl: 'calendar-year-total-return-quarterly-pane',\n isActive: false\n }\n ];\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.calendarYearBeans = beans.component.performanceSimply;\n this.taxYear = element.getAttribute('tax-year');\n // this.taxYear = 2016;\n\n // Caveats - fake\n // let caveatsArray = ['2', '5', '1', '4', '3'];\n // this.caveats = caveatsArray.sort();\n // logger.info('Caveats: ' + caveatsArray);\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_CALENDAR_YEAR_RETURNS',\n beans: this.calendarYearBeans, // beans set in configuration for site e.g. configuration/en-us-retail/beans.js\n fundId: this.fundId,\n taxYear: this.taxYear\n });\n\n // select default chart tab\n this.dispatch({\n type: 'CALENDAR_YEAR_RETURNS_CHANGE_TAB',\n tab: 'MONTH_END'\n });\n }\n changeTab(key) {\n this.dispatch({\n type: 'CALENDAR_YEAR_RETURNS_CHANGE_TAB',\n tab: key\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.logger.debug('mapState() - FtCalendarYearReturns');\n this.getChartColorStyle = 'chart-color';\n let fundState = getFundState(newState, this.fundId);\n\n this.currentTab = newState.products.app.performance.calendarYearReturns.currentTab;\n\n this.data = fundState.calendarYearReturns.data;\n // this.label = fundState.calendarYearReturns.label;\n this.label = newState.products.label;\n this.componentHeading = this.label['component-heading'];\n this.readImportant = this.label['read-important'];\n /*this.proximity = fundState.calendarYearReturns.proximity; */\n this.tableData = fundState.calendarYearReturns[this.currentTab].calData;\n this.dateGroup = fundState.calendarYearReturns[this.currentTab].dateGroup;\n /* this.caveats = fundState.calendarYearReturns.caveats; */\n\n this.chartCategories = this.tableData.years;\n\n let chartData = fundState.calendarYearReturns[this.currentTab].chartData;\n let chartItems = chartData;\n let chartType = 'column';\n let aryChartData = [];\n for (let key of Object.keys(chartItems)) {\n let thisChartItem = {\n data: chartItems[key],\n type: chartType\n };\n aryChartData.push(thisChartItem);\n }\n\n this.chartData = aryChartData;\n\n this.tabs = this.tabs.map(tab => {\n tab.value = this.label[tab.labelKey];\n tab.isActive = (tab.key === this.currentTab);\n return tab;\n });\n\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\n\n// import {LogManager} from 'aurelia-framework';\n// const logger = LogManager.getLogger('ft-discrete');\n\n@inject('Store', 'Beans', Element)\nexport class FtDiscreteReturns extends ReduxComponentBase {\n populated = false;\n currentTab = null;\n tabs = [\n {\n key: 'MONTH_END',\n labelKey: 'month-end',\n ariaControl: 'discrete-return-monthly-pane',\n isActive: false\n },\n {\n key: 'QUARTER_END',\n labelKey: 'quarter-end',\n ariaControl: 'discrete-total-return-quarterly-pane',\n isActive: false\n }\n ];\n\n /**\n * Object constructor\n * @param {object} store\n * @param {object} beans\n * @param {object} element\n */\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.discreteBeans = beans.component.performanceSimply;\n this.taxYear = element.getAttribute('tax-year');\n // this.taxYear = 2016;\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_DISCRETE_RETURNS',\n beans: this.discreteBeans, // beans set in configuration for site e.g. configuration/etf/beans.js\n fundId: this.fundId,\n taxYear: this.taxYear\n });\n\n // select default chart tab\n this.dispatch({\n type: 'DISCRETE_RETURNS_CHANGE_TAB',\n tab: 'MONTH_END'\n });\n }\n changeTab(key) {\n this.dispatch({\n type: 'DISCRETE_RETURNS_CHANGE_TAB',\n tab: key\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.logger.debug('mapState() - FtDiscreteReturns');\n this.getChartColorStyle = 'chart-color';\n let fundState = getFundState(newState, this.fundId);\n\n this.currentTab = newState.products.app.performance.discreteReturns.currentTab;\n\n this.data = fundState.discreteReturns.data;\n // this.label = fundState.discreteReturns.label;\n this.label = newState.products.label;\n this.componentHeading = this.label['component-heading'];\n this.readImportant = this.label['read-important'];\n /*this.proximity = fundState.discreteReturns.proximity; */\n this.tableData = fundState.discreteReturns[this.currentTab].calDataRev;\n this.dateGroup = fundState.discreteReturns[this.currentTab].dateGroup;\n /* this.caveats = fundState.discreteReturns.caveats; */\n\n this.chartCategories = this.tableData.years;\n\n let chartData = fundState.discreteReturns[this.currentTab].chartDataRev;\n let chartItems = chartData;\n let chartType = 'column';\n let aryChartData = [];\n for (let key of Object.keys(chartItems)) {\n let thisChartItem = {\n data: chartItems[key],\n type: chartType\n };\n aryChartData.push(thisChartItem);\n }\n\n this.chartData = aryChartData;\n\n this.tabs = this.tabs.map(tab => {\n tab.value = this.label[tab.labelKey];\n tab.isActive = (tab.key === this.currentTab);\n return tab;\n });\n\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {TopLevelProductComponentBase} from '../../lib/top-level-product-component-base';\n\n@inject('Store', 'Beans', Element)\nexport class FtExpensesVolatilityBenchmarks extends TopLevelProductComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n // this.fundId = element.getAttribute('fund-id');\n this.fundId = 817;\n this.performanceBeans = beans.component.performanceSimply;\n // this.taxYear = element.getAttribute('tax-year');\n this.taxYear = 2016;\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'EXPENSES_VOLATILITY_BENCHMARKS_POPULATION',\n beans: this.performanceBeans, // beans set in configuration for site e.g. configuration/en-us-retail/beans.js\n fundId: this.fundId,\n taxYear: this.taxYear\n });\n }\n\n /**\n * Identify the section of the state for this fund that apply to this component.\n * @param newState\n * @returns {*}\n */\n selectState(newState) {\n return newState; // replace with bit of state this component is interested in e.g. (newState && newState.distributions) ? newState.distributions : undefined;\n }\n\n /**\n * Called when the state changes.\n */\n update() {\n try {\n this.logger.debug('updating');\n // this.label = this.state.label;\n this.label = newState.products.label;\n\n // set up derived data\n if (this.state.data !== undefined) {\n this.populated = true;\n }\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtPerformanceAnnualised extends ReduxComponentBase {\n populated = false;\n currentChunkyMonthyTab = null;\n\n chunkyMonthyTabs = [\n {\n key: 'MONTH_END',\n labelKey: 'month-end',\n ariaControl: 'performance-annualised-monthly-pane',\n isActive: false\n },\n {\n key: 'QUARTER_END',\n labelKey: 'quarter-end',\n ariaControl: 'performance-annualised-quarterly-pane',\n isActive: false\n }\n ];\n\n chartData = [];\n chartOptions = {};\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.performanceBeans = beans.component.performance;\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_PERFORMANCE_ANNUALISED',\n beans: this.performanceBeans, // beans set in configuration for site e.g. configuration/en-us-retail/beans.js\n fundId: this.fundId\n });\n\n // select default chart tab\n this.dispatch({\n type: 'PERFORMANCE_ANNUALISED_DEFAULT_STATE',\n chunky_tab: 'MONTH_END'\n });\n }\n\n changeChunkyMonthyTab(key) {\n this.logger.info('Disptaching PERFORMANCE_ANNUALISED_CHANGE_CHUNKY_MONTHY_TAB');\n this.dispatch({\n type: 'PERFORMANCE_ANNUALISED_CHANGE_CHUNKY_MONTHY_TAB',\n tab: key\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.logger.info('mapState()');\n let fundState = getFundState(newState, this.fundId);\n this.currentChunkyMonthyTab = newState.products.app.performance.performanceAnnualised.currentChunkyMonthyTab;\n //this.fundClassName = fundState.performanceCumulative.fundClassName;\n // this.label = fundState.performanceAnnualised.label;\n this.label = newState.products.label;\n this.tableHeaders = fundState.performanceAnnualised.tableHeaders;\n this.navDate = fundState.performanceAnnualised.navDate;\n this.performances = fundState.performanceAnnualised[this.currentChunkyMonthyTab].performances;\n\n this.chartCategories = this.tableHeaders;\n\n this.chartData = this.performances.graphData;\n\n let chartItems = this.chartData;\n let chartType = 'column';\n let aryChartData = [];\n for (let key of Object.keys(chartItems)) {\n let thisChartItem = {\n data: chartItems[key],\n type: chartType\n };\n aryChartData.push(thisChartItem);\n }\n\n this.chartData = aryChartData;\n\n this.chunkyMonthyTabs = this.chunkyMonthyTabs.map(tab => {\n tab.value = this.label[tab.labelKey];\n tab.isActive = (tab.key === this.currentChunkyMonthyTab);\n return tab;\n });\n\n //this.proximity = fundState.distributions.caveats.proximity;\n\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","\nimport {bindable, useView, computedFrom, LogManager} from 'aurelia-framework';\nimport {FtChart} from '../../../common/elements/ft-chart';\nimport merge from 'lodash/merge';\n\nconst logger = LogManager.getLogger('performance-cumulative-chart');\n\n@useView('../../../common/elements/ft-chart.html')\nexport class FtPerformanceCumulativeChart extends FtChart {\n @bindable options;\n\n @bindable data = [];\n @bindable seriesName = 'NAV';\n @bindable navDecimal = 2;\n @bindable prefix = '$';\n @bindable graphNames = [];\n\n @computedFrom('data', 'seriesName', 'navDecimal', 'prefix', 'graphNames')\n get series() {\n let graphNames = this.graphNames;\n let chartSerieses = [];\n let chartIndex = 0;\n for (let thisSeries of this.data) {\n let thisObj = {\n id: chartIndex,\n name: graphNames[chartIndex],\n type: 'area',\n data: thisSeries,\n tooltip: {\n pointFormat: '{series.name}: <b>{point.y}</b><br/>',\n valueDecimals: this.navDecimal,\n valuePrefix: this.prefix\n }\n };\n chartIndex++;\n chartSerieses.push(thisObj);\n }\n return chartSerieses;\n }\n\n newChartOnUpdate = true;\n\n perfCumChartOptions = {\n xAxis: {\n type: 'datetime'\n },\n yAxis: {\n labels: {\n format: this.prefix + '{value:.2f}'\n },\n title: ''\n },\n legend: {\n enabled: true,\n layout: 'horizontal',\n verticalAlign: 'top'\n },\n plotOptions: {\n series: {\n fillOpacity: 0,\n marker: {\n enabled: false\n }\n }\n }\n };\n\n mergeOptions() {\n let newOpts = merge({}, this.defaultOptions, this.perfCumChartOptions, this.options);\n newOpts.yAxis.labels.format = this.prefix + '{value:.2f}';\n logger.info('newOpts', newOpts);\n return newOpts;\n }\n\n dataChanged() {\n this.updateChart();\n }\n\n seriesNameChanged() {\n this.updateChart();\n }\n\n navDecimalChanged() {\n this.updateChart();\n }\n\n prefixChanged() {\n this.updateChart();\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtPerformanceCumulative extends ReduxComponentBase {\n populated = false;\n currentYearGroupTab = null;\n currentChunkyMonthyTab = null;\n\n yearGroupTabs = [\n {\n key: 'PC_1YR',\n chartYear: '1',\n labelKey: 'btn-1-yr',\n isActive: false\n },\n {\n key: 'PC_3YR',\n chartYear: '3',\n labelKey: 'btn-3-yr',\n isActive: false\n },\n {\n key: 'PC_5YR',\n chartYear: '5',\n labelKey: 'btn-5-yr',\n isActive: false\n },\n {\n key: 'PC_10YR',\n chartYear: '10',\n labelKey: 'btn-10-yr',\n isActive: false\n },\n {\n key: 'PC_15YR',\n chartYear: '15',\n labelKey: 'btn-15-yr',\n isActive: false\n },\n {\n key: 'PC_LIFE',\n chartYear: 'si',\n labelKey: 'life',\n isActive: false\n }\n ];\n\n chunkyMonthyTabs = [\n {\n key: 'MONTH_END',\n labelKey: 'month-end',\n ariaControl: 'cumulative-return-monthly-pane',\n isActive: false\n },\n {\n key: 'QUARTER_END',\n labelKey: 'quarter-end',\n ariaControl: 'cumulative-return-quarterly-pane',\n isActive: false\n }\n ];\n\n chartData = [];\n chartOptions = {};\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.performanceBeans = beans.component.performance;\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_PERFORMANCE_CUMULATIVE',\n beans: this.performanceBeans, // beans set in configuration for site e.g. configuration/en-us-retail/beans.js\n fundId: this.fundId\n });\n\n // select default chart tab\n this.dispatch({\n type: 'PERFORMANCE_CUMULATIVE_DEFAULT_STATE',\n chunky_tab: 'MONTH_END',\n year_tab: 'PC_1YR'\n });\n }\n\n changeChunkyMonthyTab(key) {\n this.logger.debug('Disptaching PERFORMANCE_CUMULATIVE_CHANGE_CHUNKY_MONTHY_TAB');\n this.dispatch({\n type: 'PERFORMANCE_CUMULATIVE_CHANGE_CHUNKY_MONTHY_TAB',\n tab: key\n });\n }\n\n changeYearGroupTab(key) {\n this.logger.debug('Disptaching PERFORMANCE_CUMULATIVE_CHANGE_YEAR_GROUP_TAB');\n this.dispatch({\n type: 'PERFORMANCE_CUMULATIVE_CHANGE_YEAR_GROUP_TAB',\n tab: key\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.logger.info('mapState()');\n let fundState = getFundState(newState, this.fundId);\n this.currentYearGroupTab = newState.products.app.performance.performanceCumulative.currentYearGroupTab;\n this.currentChunkyMonthyTab = newState.products.app.performance.performanceCumulative.currentChunkyMonthyTab;\n //this.fundClassName = fundState.performanceCumulative.fundClassName;\n // this.label = fundState.performanceCumulative.label;\n this.label = newState.products.label;\n this.navDate = fundState.performanceCumulative.navDate;\n this.chartData = fundState.performanceCumulative[this.currentChunkyMonthyTab][this.currentYearGroupTab];\n this.performances = fundState.performanceCumulative[this.currentChunkyMonthyTab].performances;\n this.graphNames = fundState.performanceCumulative.graphNames;\n\n this.yearGroupTabs = this.yearGroupTabs.map(tab => {\n tab.value = this.label[tab.labelKey];\n tab.isActive = (tab.key === this.currentYearGroupTab);\n return tab;\n });\n\n this.chunkyMonthyTabs = this.chunkyMonthyTabs.map(tab => {\n tab.value = this.label[tab.labelKey];\n tab.isActive = (tab.key === this.currentChunkyMonthyTab);\n return tab;\n });\n\n //this.proximity = fundState.distributions.caveats.proximity;\n\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n //this.logger.error('errorer', e);\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtAssetClassExposure extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.cid = element.getAttribute('cid');\n this.portfolioBeans = beans.component.assetClassExposure;\n this.portfolioBeans.push(this.cid);\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_ASSET_CLASS_EXPOSURE',\n beans: this.portfolioBeans,\n fundId: this.fundId,\n cid: this.cid\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.logger.debug('mapState()');\n let fundState = getFundState(newState, this.fundId);\n this.label = newState.products.label;\n this.data = fundState.assetClassExposure.data;\n this.proximity = fundState.assetClassExposure.proximity;\n\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtAssetMix extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.cid = element.getAttribute('cid');\n this.portfolioBeans = beans.component.assetMix;\n this.portfolioBeans.push(this.cid);\n\n this.dispatch({\n type: 'POPULATE_ASSET_MIX',\n beans: this.portfolioBeans,\n fundId: this.fundId,\n cid: this.cid\n });\n }\n\n mapState(newState) {\n try {\n let fundState = getFundState(newState, this.fundId);\n this.label = newState.products.label;\n this.caveats = fundState.assetMix.caveats;\n this.data = fundState.assetMix.data;\n\n this.chartData = [{\n type: 'pie',\n data: fundState.assetMix.data.series\n }];\n\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {BindingSignaler} from 'aurelia-templating-resources';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport findIndex from 'lodash/findIndex';\n\n@inject('Store', 'Beans', Element, BindingSignaler)\nexport class FtCategoryFundList extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element, signaler) {\n // add logging and integration with the data store\n super(store);\n this.signaler = signaler;\n\n this.assetClass = element.getAttribute('category');\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_PPSS_STATE',\n beans: beans.component.ppss // beans set in configuration for site e.g. configuration/en-us-retail/beans.js\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.logger.debug('mapState()', newState);\n// this.label = newState.products.ppss.label;\n this.funds = this._findFund(newState.products.ppss.funds, this.assetClass);\n\n // if we get to here without erroring, data has been populated successfully\n this.signaler.signal('ppss-map-state');\n this.populated = true;\n this.logger.debug('mapState() done');\n } catch (e) {\n // state not populated yet\n this.populated = false;\n this.logger.debug('mapState() error', e, this.populated);\n }\n }\n\n _findFund(funds, wanted) {\n let rObj = [];\n for (let fund of funds) {\n if (fund.assetClass === wanted) {\n let index = findIndex( rObj, {'fundLegalName': fund.fundLegalName});\n if (index === -1) {\n rObj.push(fund);\n }\n }\n }\n return rObj;\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtCommoditiesSectorBreakdown extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.cid = element.getAttribute('cid');\n this.portfolioBeans = beans.component.commoditiesBreakdown;\n this.portfolioBeans.push(this.cid);\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_COMMODITIES_SECTOR_BREAKDOWN',\n // beans: beans..., // beans set in configuration for site e.g. configuration/en-us-retail/beans.js\n beans: this.portfolioBeans,\n fundId: this.fundId,\n cid: this.cid\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.logger.debug('mapState()');\n let fundState = getFundState(newState, this.fundId);\n this.data = fundState.commoditiesSectorBreakdown.data;\n this.label = newState.products.label;\n this.proximity = fundState.commoditiesSectorBreakdown.proximity;\n // set component properties from state as appropriate\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtCreditQualityExposure extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.cid = element.getAttribute('cid');\n this.portfolioBeans = beans.component.creditQualityExposure;\n this.portfolioBeans.push(this.cid);\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_CREDIT_QUALITY_EXPOSURE',\n // beans: beans..., // beans set in configuration for site e.g. configuration/en-us-retail/beans.js\n beans: this.portfolioBeans,\n fundId: this.fundId,\n cid: this.cid\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.logger.debug('mapState()');\n let fundState = getFundState(newState, this.fundId);\n this.data = fundState.creditQualityExposure.data;\n this.label = newState.products.label;\n this.proximity = fundState.creditQualityExposure.proximity;\n // set component properties from state as appropriate\n //this.label = newState.products.distributions.label;\n //this.proximity = fundState.distributions.caveats.proximity;\n\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtCouponRateBreakdown extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.cid = element.getAttribute('cid');\n this.portfolioBeans = beans.component.couponRateBreakdown;\n this.portfolioBeans.push(this.cid);\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_COUPON_RATE_BREAKDOWN_STATE',\n beans: this.portfolioBeans,\n fundId: this.fundId,\n cid: this.cid\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n let fundState = getFundState(newState, this.fundId);\n this.label = newState.products.label;\n this.data = fundState.couponRateBreakdown.data;\n this.caveats = fundState.couponRateBreakdown.caveats;\n\n this.chartData = [{\n type: 'pie',\n data: fundState.couponRateBreakdown.data.series\n }];\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtCurrencyDistribution extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.cid = element.getAttribute('cid');\n this.portfolioBeans = beans.component.currencyDistribution;\n this.portfolioBeans.push(this.cid);\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_CURRENCY_DISTRIBUTION',\n // beans: beans..., // beans set in configuration for site e.g. configuration/en-us-retail/beans.js\n beans: this.portfolioBeans,\n fundId: this.fundId,\n cid: this.cid\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.logger.debug('mapState()');\n let fundState = getFundState(newState, this.fundId);\n this.data = fundState.currencyDistribution.data;\n this.label = newState.products.label;\n this.proximity = fundState.currencyDistribution.proximity;\n // set component properties from state as appropriate\n //this.label = newState.products.distributions.label;\n //this.proximity = fundState.distributions.caveats.proximity;\n\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","import {inject} from 'aurelia-framework';\n\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtFixedIncomeSectorBreakdown extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element, eventAggregator) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.cid = element.getAttribute('cid');\n this.portfolioBeans = beans.component.fixedIncomeSectorBreakdown;\n this.portfolioBeans.push(this.cid);\n\n this.dispatch({\n type: 'POPULATE_FIXED_INCOME_SECTOR_BREAKDOWN',\n // beans: beans..., // beans set in configuration for site e.g. configuration/en-us-retail/beans.js\n beans: this.portfolioBeans,\n fundId: this.fundId,\n cid: this.cid\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n let fundState = getFundState(newState, this.fundId);\n this.data = fundState.fixedIncomeSectorBreakdown.data;\n this.label = newState.products.label;\n this.proximity = fundState.fixedIncomeSectorBreakdown.proximity;\n // set component properties from state as appropriate\n\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","/**\n * Created by mdonnel on 25/04/2017.\n */\nimport {bindable, containerless, computedFrom} from 'aurelia-framework';\n\n@containerless\nexport class FtGeographicAllocationRow {\n @bindable data;\n @bindable index;\n @bindable showChart;\n\n constructor(element) {\n this.element = element;\n }\n\n attached() {\n }\n\n toggleExpanded() {\n if ( this.data.subItems !== undefined) {\n this.data.visible = !this.data.visible;\n }\n }\n\n @computedFrom('data.visible')\n get getChevron() {\n return this.data.visible ? 'glyphicon-chevron-down' : 'glyphicon-chevron-right';\n }\n\n @computedFrom('data.visible')\n get getVisible() {\n return this.data.visible ? '' : 'hidden';\n }\n\n get showChevron() {\n return this.data.subItems !== undefined;\n }\n\n get getDisplayLabel() {\n return this.data.range || this.data.name;\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtGeographicAllocation extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n const currentState = store.getState();\n this.fundId = element.getAttribute('fund-id');\n this.cid = element.getAttribute('cid');\n this.portfolioComponent = 'geographic-allocation';\n this.assetClass = 'Equity';\n this.portfolioBeans = beans.component.geographicAllocation;\n this.portfolioBeans.push(this.cid);\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_GEOGRAPHIC_ALLOCATION',\n beans: this.portfolioBeans,\n fundId: this.fundId,\n cid: this.cid,\n portfolioComponent: this.portfolioComponent,\n assetClass: this.assetClass,\n actor: currentState.general.segment,\n config: currentState.products.config\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n let fundState = getFundState(newState, this.fundId);\n\n this.label = newState.products.label || {};\n this.data = fundState.geographicAllocation.data;\n this.caveats = fundState.geographicAllocation.caveats;\n this.chartData = [{\n data: fundState.geographicAllocation.data.chart,\n type: 'bar',\n colorByPoint: true\n }];\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n\n expandAll() {\n for (let item of this.data.table) {\n item.visible = true;\n }\n }\n\n collapseAll() {\n for (let item of this.data.table) {\n item.visible = false;\n }\n }\n\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtGeographicBreakdown extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.cid = element.getAttribute('cid');\n this.portfolioBeans = beans.component.portfolioGeographicalBreakdown;\n this.portfolioBeans.push(this.cid);\n this.showChart = (element.getAttribute('show-chart') === 'true');\n this.spanRow = (element.getAttribute('span-row') === 'true');\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_GEOGRAPHIC_BREAKDOWN',\n beans: this.portfolioBeans,\n fundId: this.fundId,\n cid: this.cid\n });\n }\n\n\n mapState(newState) {\n try {\n let fundState = getFundState(newState, this.fundId);\n\n this.label = newState.products.label;\n this.data = fundState.geographicBreakdown.data;\n this.caveats = fundState.geographicBreakdown.caveats;\n\n this.chartData = [{\n data: fundState.geographicBreakdown.data.series,\n type: 'bar',\n colorByPoint: true\n }];\n\n this.populated = true;\n } catch (e) {\n // state not populated yet\n // this.logger.debug('mapState() error', e);\n this.populated = false;\n }\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {getFundState} from '../../lib/map-state-utils';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\n\n@inject('Store', 'Beans', Element)\nexport class FtGeographicExposure extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.cid = element.getAttribute('cid');\n this.portfolioBeans = beans.component.geographicExposure;\n this.portfolioBeans.push(this.cid);\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_GEOGRAPHIC_EXPOSURE',\n beans: this.portfolioBeans,\n fundId: this.fundId,\n cid: this.cid\n });\n }\n\n mapState(newState) {\n try {\n let fundState = getFundState(newState, this.fundId);\n\n this.label = newState.products.label;\n this.data = fundState.geographicExposure.data;\n this.caveats = fundState.geographicExposure.caveats;\n\n this.chartData = [\n {\n name: this.label['gross-exposure-coloum'],\n data: fundState.geographicExposure.data.series1,\n type: 'bar'\n },\n {\n name: this.label['net-exposure-coloum'],\n data: fundState.geographicExposure.data.series2,\n type: 'bar'\n }\n ];\n\n // this.showChart = true;\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n\n\n}\n","export default {\r\n 'holdings': {\r\n 'asOfDate': '28.02.2017',\r\n 'downloadLink': 'http://www.franklintempleton.co.uk/content-common/portfolio-holdings/en_GB/local-GB/4802_holdings.pdf',\r\n 'holdingsList': [\r\n {\r\n 'holdingName': '—',\r\n 'isin': 'JP3117700009',\r\n 'marketValue': '6\\'193,86',\r\n 'notionalValue': '—',\r\n 'sector': 'FINANCIALS',\r\n 'ticker': '7167',\r\n 'weight': '0,06'\r\n },\r\n {\r\n 'holdingName': '—',\r\n 'isin': 'HK0000179108',\r\n 'marketValue': '7\\'860,92',\r\n 'notionalValue': '—',\r\n 'sector': 'UTILITIES',\r\n 'ticker': '2638',\r\n 'weight': '0,08'\r\n },\r\n {\r\n 'holdingName': '—',\r\n 'isin': 'AU000000VCX7',\r\n 'marketValue': '22\\'353,08',\r\n 'notionalValue': '—',\r\n 'sector': 'REAL ESTATE',\r\n 'ticker': 'VCX',\r\n 'weight': '0,23'\r\n },\r\n {\r\n 'holdingName': '—',\r\n 'isin': 'GB00BY9D0Y18',\r\n 'marketValue': '19\\'534,53',\r\n 'notionalValue': '—',\r\n 'sector': 'FINANCIALS',\r\n 'ticker': 'DLG',\r\n 'weight': '0,20'\r\n },\r\n {\r\n 'holdingName': '—',\r\n 'isin': 'JP3946750001',\r\n 'marketValue': '7\\'550,61',\r\n 'notionalValue': '—',\r\n 'sector': 'FINANCIALS',\r\n 'ticker': '7182',\r\n 'weight': '0,08'\r\n },\r\n {\r\n 'holdingName': '—',\r\n 'isin': 'DE0006062144',\r\n 'marketValue': '15\\'858,98',\r\n 'notionalValue': '—',\r\n 'sector': 'MATERIALS',\r\n 'ticker': '1COV',\r\n 'weight': '0,16'\r\n }\r\n ],\r\n 'label': {\r\n 'as-of': 'As of',\r\n 'holdings': 'Holdings'\r\n },\r\n 'showNotionalValue': false\r\n }\r\n};\r\n","import {computedFrom, inject, observable} from 'aurelia-framework';\nimport get from 'lodash/get';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {getPagingInfo} from '../../../../lib/paging-utils';\nimport {createCompare} from '../../../../lib/sort-utils';\nimport {getFundState} from '../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtHoldings extends ReduxComponentBase {\n @observable currentPageNumber;\n @observable searchString;\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_HOLDINGS_STATE',\n beans: beans.component.portfolioHoldings, // beans set in configuration for site e.g. configuration/en-us-retail/beans.js\n fundId: this.fundId\n });\n }\n\n changeSort(name) {\n this.dispatch({\n type: 'HOLDINGS_CHANGE_SORT',\n columnName: name\n });\n }\n\n goToPage(page) {\n this.dispatch({\n type: 'HOLDINGS_CHANGE_PAGE',\n page\n });\n }\n\n currentPageNumberChanged(page) {\n this.goToPage(page);\n }\n\n searchStringChanged(newSearchString) {\n this.dispatch({\n type: 'HOLDINGS_CHANGE_SEARCH',\n searchString: newSearchString\n });\n }\n\n @computedFrom('pagingInfo')\n get hasResults() {\n return this.pagingInfo.totalRecords > 0;\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.logger.debug('mapState()');\n let fundState = getFundState(newState, this.fundId);\n\n // app state\n let holdingsAppState = newState.products.app.holdings;\n this.sort = holdingsAppState.sort;\n this.searchString = holdingsAppState.search.searchString;\n\n // set component properties from state as appropriate\n this.label = newState.products.label || {};\n // this.proximity = fundState.portfolio.caveats.proximity;\n this.holdingsAsOfDate = fundState.holdings.asOfDate;\n this.downloadLink = fundState.holdings.downloadLink;\n this.showNotionalValue = fundState.holdings.showNotionalValue;\n\n let allHoldings = fundState.holdings.holdingsList\n .filter(this._createFilterFunction(holdingsAppState.search))\n .sort(this._createSortFunction(this.sort));\n\n this.pagingInfo = getPagingInfo(allHoldings.length, holdingsAppState.paging.pageSize, holdingsAppState.paging.currentPage);\n\n let currentPage = this.pagingInfo.currentPage;\n this.currentPageNumber = currentPage ? currentPage.page : null;\n this.holdings = allHoldings.filter((holding, index) => {\n let recordNumber = index + 1;\n return currentPage\n && (currentPage.startRecord <= recordNumber)\n && (recordNumber <= currentPage.endRecord);\n });\n\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n // state not populated yet\n // this.logger.debug('mapState error:::', e);\n this.populated = false;\n }\n }\n\n // this creates a function to be passed into Array.filter()\n _createFilterFunction(search) {\n if (search.searchString) {\n let searchString = search.searchString.toLowerCase();\n let fields = search.fields;\n return holding => fields.reduce((success, field) => {\n return success || get(holding, field, '').toLowerCase().includes(searchString);\n }, false);\n }\n return holding => true; // show all holdings if empty search string\n }\n\n // this creates a function to be passed into Array.sort()\n _createSortFunction(sort) {\n let sortColumn = Array.from(sort.columns.values()).find(col => col.direction);\n this.logger.debug('sortColumn', sortColumn);\n let dataKey = sortColumn.dataKey;\n let secondaryCompare = sort.secondary ? createCompare(sort.secondary.dataKey, sort.secondary.direction, {isNumeric: sort.secondary.isNumeric, isDate: sort.secondary.isDate}) : null;\n return createCompare(dataKey, sortColumn.direction, {secondaryCompare, isNumeric: sortColumn.isNumeric, isDate: sortColumn.isDate});\n }\n}\n","import {bindable, inject} from 'aurelia-framework';\r\n\r\n@inject(Element)\r\nexport class FtManagerAllocationContents {\r\n @bindable label;\r\n @bindable groupedData;\r\n @bindable caveats;\r\n @bindable date;\r\n\r\n constructor(element) {\r\n this.element = element;\r\n }\r\n\r\n attached() {\r\n\r\n }\r\n\r\n}\r\n","import {bindable, inject} from 'aurelia-framework';\r\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\r\n\r\n@inject('Store', Element)\r\nexport class FtManagerNameOrModal extends ReduxComponentBase {\r\n @bindable item;\r\n @bindable parentIndex;\r\n @bindable close;\r\n\r\n constructor(store, element) {\r\n super(store);\r\n this.element = element;\r\n }\r\n\r\n show = (title, contents, image) => {\r\n this.dispatch({\r\n type: 'OPEN_MODAL',\r\n title,\r\n contents,\r\n image\r\n });\r\n };\r\n\r\n attached() {\r\n\r\n }\r\n\r\n}\r\n","import {bindable, inject} from 'aurelia-framework';\r\n\r\n@inject(Element)\r\nexport class FtManagerRosterContents {\r\n @bindable label;\r\n @bindable groupedData;\r\n @bindable caveats;\r\n @bindable date;\r\n\r\n constructor(element) {\r\n this.element = element;\r\n }\r\n\r\n attached() {\r\n\r\n }\r\n\r\n}\r\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtManagerRoster extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.cid = element.getAttribute('cid');\n this.portfolioBeans = beans.component.managerRoster;\n this.portfolioBeans.push(this.cid);\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_MANAGER_ROSTER',\n beans: this.portfolioBeans,\n fundId: this.fundId,\n cid: this.cid\n // fundCat: this.fundCat,\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n let fundState = getFundState(newState, this.fundId);\n this.visible = fundState.managerRoster.data.visible;\n this.label = newState.products.label;\n this.caveats = fundState.managerRoster.caveats;\n this.showElement = fundState.managerRoster.showElement;\n this.date = fundState.managerRoster.data.date;\n\n if (this.showElement) {\n // TODO this may need different formatting?\n this.groupedData = fundState.managerRoster.data.groupedData;\n } else {\n this.groupedData = fundState.managerRoster.data.groupedData;\n }\n\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtMarketCapitalisation extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n const currentState = store.getState();\n // get the configuration from the store and pass it into the component here\n this.fundId = element.getAttribute('fund-id');\n this.cid = element.getAttribute('cid');\n this.portfolioComponent = 'market-capitalisation';\n this.assetClass = 'Equity';\n this.portfolioBeans = beans.component.portfolioMarketCapitalisation;\n this.portfolioBeans.push(this.cid);\n\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_MARKET_CAPITALISATION',\n beans: this.portfolioBeans,\n fundId: this.fundId,\n cid: this.cid,\n portfolioComponent: this.portfolioComponent,\n assetClass: this.assetClass,\n actor: currentState.general.segment,\n config: currentState.products.config\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n // console.log('newState', newState);\n try {\n let fundState = getFundState(newState, this.fundId);\n // this.label = fundState.marketCapitalisation.label;\n this.label = newState.products.label || {};\n this.data = fundState.marketCapitalisation.data;\n this.caveats = fundState.marketCapitalisation.caveats;\n\n this.chartData = [{\n data: fundState.marketCapitalisation.data.chart,\n type: 'bar',\n colorByPoint: true\n }];\n\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtMaturityBreakdown extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.cid = element.getAttribute('cid');\n this.portfolioBeans = beans.component.maturityBreakdown;\n this.portfolioBeans.push(this.cid);\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_MATURITY_BREAKDOWN',\n beans: beans.component.maturityBreakdown,\n fundId: this.fundId,\n cid: this.cid\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n // this.logger.debug('mapState()');\n let fundState = getFundState(newState, this.fundId);\n this.label = newState.products.label;\n this.data = fundState.maturityBreakdown.data;\n this.caveats = fundState.maturityBreakdown.caveats;\n\n this.chartData = [{\n type: 'pie',\n data: fundState.maturityBreakdown.data.series\n }];\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","// international\nimport {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtPortfolioStatisticsAndPositions extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.cid = element.getAttribute('cid');\n this.portfolioBeans = beans.component.portfolioStatisticsAndPositions;\n this.portfolioBeans.push(this.cid);\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_PORTFOLIO_STATISTICS_AND_POSITIONS',\n beans: this.portfolioBeans,\n fundId: this.fundId,\n cid: this.cid\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.logger.debug('mapState()');\n let fundState = getFundState(newState, this.fundId);\n\n this.label = newState.products.label;\n this.caveats = fundState.portfolioStatisticsAndPositions.caveats;\n this.data = fundState.portfolioStatisticsAndPositions.data;\n\n // portfolioStatisticsAndPositions\n // set component properties from state as appropriate\n //this.label = newState.products.distributions.label;\n //this.proximity = fundState.distributions.caveats.proximity;\n\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","import {bindable, inject} from 'aurelia-framework';\n\n@inject(Element)\nexport class FtQualityBreakdownTable {\n @bindable data;\n @bindable label;\n @bindable color;\n\n constructor(element) {\n this.element = element;\n }\n\n attached() {\n this.total = this.data.reduce((a, b) => { return a + Number(b.val.alt); }, 0).toFixed(2);\n }\n\n}\n","import {inject} from 'aurelia-framework';\nimport {getFundState} from '../../lib/map-state-utils';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\n\n@inject('Store', 'Beans', Element)\nexport class FtQualityBreakdown extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.cid = element.getAttribute('cid');\n this.spanRow = (element.getAttribute('span-row') === 'true') ? true : false;\n this.portfolioBeans = beans.component.qualityBreakdown;\n this.portfolioBeans.push(this.cid);\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_QUALITY_BREAKDOWN',\n beans: this.portfolioBeans,\n fundId: this.fundId,\n cid: this.cid\n });\n }\n\n\n mapState(newState) {\n try {\n let fundState = getFundState(newState, this.fundId);\n\n this.label = newState.products.label;\n this.caveats = fundState.qualityBreakdown.caveats;\n this.data = fundState.qualityBreakdown.data;\n this.proximity = fundState.qualityBreakdown.caveats.proximity;\n\n this.chartData = [{\n type: 'pie',\n data: fundState.qualityBreakdown.data.series\n }];\n\n\n this.populated = true;\n } catch (e) {\n // state not populated yet\n // this.logger.debug('mapState() error', e);\n this.populated = false;\n }\n }\n\n\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtSectorAllocation extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n const currentState = store.getState();\n this.fundId = element.getAttribute('fund-id');\n this.cid = element.getAttribute('cid');\n this.portfolioComponent = 'sector-allocation';\n this.assetClass = 'Equity';\n this.portfolioBeans = beans.component.portfolioSectorAllocation;\n this.portfolioBeans.push(this.cid);\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_SECTOR_ALLOCATION',\n beans: this.portfolioBeans,\n fundId: this.fundId,\n cid: this.cid,\n portfolioComponent: this.portfolioComponent,\n assetClass: this.assetClass,\n actor: currentState.general.segment,\n config: currentState.products.config\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n let fundState = getFundState(newState, this.fundId);\n\n this.label = newState.products.label;\n this.data = fundState.sectorAllocation.data;\n this.caveats = fundState.sectorAllocation.caveats;\n this.chartData = [{\n data: fundState.sectorAllocation.data.chart,\n type: 'bar',\n colorByPoint: true\n }];\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","import {inject} from 'aurelia-framework';\n// import {TopLevelProductComponentBase} from '../../lib/top-level-product-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\n\n@inject('Store', 'Beans', Element)\nexport class FtSectorBreakdown extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.cid = element.getAttribute('cid');\n this.portfolioBeans = beans.component.sectorBreakdown;\n this.portfolioBeans.push(this.cid);\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_SECTOR_BREAKDOWN',\n beans: this.portfolioBeans,\n fundId: this.fundId,\n cid: this.cid\n });\n }\n\n\n mapState(newState) {\n try {\n let fundState = getFundState(newState, this.fundId);\n\n this.label = newState.products.label;\n this.caveats = fundState.sectorBreakdown.caveats;\n this.data = fundState.sectorBreakdown.data;\n\n this.chartData = [{\n type: 'pie',\n data: fundState.sectorBreakdown.data.series\n }];\n\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtSectorExposure extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.fundCat = element.getAttribute('fund-cat');\n this.spanRow = (element.getAttribute('span-row') === 'true') ? true : false;\n this.showChart = (element.getAttribute('show-chart') === 'true') ? true : false;\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_SECTOR_EXPOSURE',\n beans: beans.component.sectorExposure,\n fundId: this.fundId,\n sectors: this.groupedData\n });\n }\n\n expandAllSector() {\n this.dispatch({\n type: 'EXPAND_ALL_SECTORS',\n fundId: this.fundId,\n beans: []\n });\n }\n\n collapseAllSector() {\n this.dispatch({\n type: 'COLLAPSE_ALL_SECTORS',\n fundId: this.fundId,\n beans: [],\n sectors: this.groupedData\n });\n }\n\n toggleSector(key) {\n this.dispatch({\n type: 'TOGGLE_SECTOR',\n fundId: this.fundId,\n beans: [],\n sector: key\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n let fundState = getFundState(newState, this.fundId);\n\n this.label = newState.products.label;\n this.caveats = fundState.sectorExposure.caveats;\n this.showElement = fundState.sectorExposure.showElement;\n this.date = fundState.sectorExposure.data.date;\n\n if (this.showElement) {\n this.table = fundState.sectorExposure.data.table;\n this.chartData = [\n {\n data: fundState.sectorExposure.data.series,\n type: 'bar',\n colorByPoint: true\n }\n ];\n } else {\n this.groupedData = fundState.sectorExposure.data.groupedData;\n this.totals = fundState.sectorExposure.data.totals;\n }\n\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {TopLevelProductComponentBase} from '../../lib/top-level-product-component-base';\n\n@inject('Store', 'Beans', Element)\nexport class FtStatisticsAndPositions extends TopLevelProductComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.portfolioBeans = beans.component.portfolio;\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_PORTFOLIO_STATPOSITIONS_INFORMATION',\n beans: this.portfolioBeans,\n fundId: this.fundId\n });\n }\n\n /**\n * Identify the section of the state for this fund that apply to this component.\n * @param newState\n * @returns {*}\n */\n selectState(newState) {\n return newState && newState.portfolioStatPos ? Object.assign({}, newState.portfolioStatPos) : null;\n }\n\n /**\n * Called when the state changes.\n */\n update() {\n try {\n this.logger.debug('updating');\n this.label = newState.products.label;\n\n // set up derived data\n if (this.state.data !== undefined) {\n this.populated = true;\n }\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtStrategyBreakdown extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.cid = element.getAttribute('cid');\n this.portfolioBeans = beans.component.strategyBreakdown;\n this.portfolioBeans.push(this.cid);\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_STRATEGY_BREAKDOWN',\n beans: this.portfolioBeans,\n fundId: this.fundId,\n cid: this.cid\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n let fundState = getFundState(newState, this.fundId);\n\n this.label = newState.products.label;\n this.data = fundState.strategyBreakdown.data;\n this.caveats = fundState.strategyBreakdown.caveats;\n\n this.chartData = [{\n type: 'pie',\n data: fundState.strategyBreakdown.data.series\n }];\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","import {bindable, inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\n\n@inject('Store', Element)\nexport class FtTopExposuresDisplay extends ReduxComponentBase {\n @bindable data;\n @bindable chart;\n @bindable label;\n @bindable proximity;\n @bindable footnote;\n @bindable caveats;\n\n constructor(store) {\n super(store);\n }\n\n\n attached() {\n this.activeTab = 1;\n }\n\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtTopExposures extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.cid = element.getAttribute('cid');\n this.portfolioBeans = beans.component.topExposures;\n this.portfolioBeans.push(this.cid);\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_TOP_EXPOSURES',\n beans: this.portfolioBeans,\n fundId: this.fundId,\n fundCat: this.fundCat,\n cid: this.cid\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n let fundState = getFundState(newState, this.fundId);\n this.label = newState.products.label;\n this.dataLong = fundState.topExposures.dataLong;\n this.dataShort = fundState.topExposures.dataShort;\n this.showLong = fundState.topExposures.showLong;\n this.showShort = fundState.topExposures.showShort;\n this.caveats = fundState.topExposures.caveats;\n this.visible = fundState.topExposures.visible;\n\n this.dataLongChart = [{\n type: 'bar',\n data: fundState.topExposures.dataLong.series,\n color: '#a6d7f7'\n }];\n this.dataShortChart = [{\n type: 'bar',\n data: fundState.topExposures.dataShort.series,\n color: '#a6d7f7'\n }];\n\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtTopTenHoldings extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.cid = element.getAttribute('cid');\n this.portfolioBeans = beans.component.topTenHoldings;\n this.portfolioBeans.push(this.cid);\n\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_TOP_TEN_HOLDINGS',\n beans: beans.component.topTenHoldings,\n fundId: this.fundId,\n cid: this.cid\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.logger.debug('mapState()');\n let fundState = getFundState(newState, this.fundId);\n\n this.label = newState.products.label;\n this.data = fundState.topTenHoldings.data;\n this.caveats = fundState.topTenHoldings.caveats;\n\n this.chartData = [\n {\n data: fundState.topTenHoldings.data.series,\n type: 'bar',\n color: '#a6d7f7'\n }\n ];\n\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","import {createCompare} from '../../../../lib/sort-utils';\nimport findIndex from 'lodash/findIndex';\nimport get from 'lodash/get';\nimport split from 'lodash/split';\nimport sumBy from 'lodash/sumBy';\nimport isFinite from 'lodash/isFinite';\nimport {formatCurrency} from '../../lib/reducer-utils';\n\nimport {LogManager} from 'aurelia-framework';\n\nconst logger = LogManager.getLogger('portfolio-utils');\n\n// TODO: look into moving into parent lib folder\n\nexports.portfolioUtils = {\n /**\n * @param {Object} data\n * @param {Object} valueMap list of data keys to get {'label': {'dataKey':'a.b.c', 'type': 'currency'}}\n * @param {string} currency eg USD\n * @param {boolean} keepUnavailableValues eg if true unavailable value will be replaced with mdash\n * @returns {Object[]} id/val object\n */\n getExtractFormattedValues: function(data, valueMap, currency, keepUnavailableValues = false) {\n let validData = [];\n for (let labelKey in valueMap) {\n let config = valueMap[labelKey];\n let value = get(data, config.dataKey);\n let isValid = false;\n switch (config.type) {\n case 'currency':\n if (isFinite(value * 1)) {\n isValid = true;\n value = formatCurrency(value, currency);\n }\n break;\n case 'percentage':\n if (isFinite(value * 1)) {\n isValid = true;\n value += '%';\n }\n break;\n default:\n isValid = true;\n }\n if (isValid) {\n validData.push({\n id: labelKey,\n val: value\n });\n } else if (keepUnavailableValues) {\n validData.push({\n id: labelKey,\n val: '—'\n });\n }\n }\n return validData;\n },\n\n /**\n * @param {Object} data\n * @param {string[]} list dot limited list of var in lodash/get format\n * @returns {{}}\n */\n getSubSetData: function(data, list) {\n const workObj = {};\n for (const item of list) {\n const name = item.split('.');\n const subObj = get(data, item);\n workObj[name[name.length - 1]] = subObj || {};\n }\n return workObj;\n },\n\n /**\n * @param {Object} obj keyed etf data objects\n * @returns {{data: Array, label: {}}}\n */\n splitObject: function(obj) {\n const workObj = {data: [], label: {}};\n // step through the objects\n for (const item of Object.keys(obj) ) {\n // try and retrieve a value for the item\n const workVal = get(obj, `${item}.val`) || '';\n const workLabel = get(obj, `${item}.lbl`);\n workObj.data.push({id: item, val: workVal});\n // however, if there is a label, add it to the labels.\n if (typeof workLabel !== 'undefined') {\n workObj.label[item] = workLabel;\n }\n }\n return workObj;\n },\n\n /**\n * @param {Object} lstDtls keyed etf data objects\n * @returns {boolean}\n */\n getSectorBreakdownNegatives: function(lstDtls) {\n let negative = false;\n if (typeof lstDtls !== 'undefined') {\n for (const item of lstDtls) {\n if (Number(get(item, 'val.val')) < 0) {\n negative = true;\n }\n }\n }\n return negative;\n },\n /**\n * @param {Object} lstDtls keyed etf data objects\n * @returns {number} rounded to 2 decimal points (val.alt totalled)\n */\n getSectorBreakdownTotalizer: function(lstDtls) {\n let subTotal = 0;\n if (typeof lstDtls !== 'undefined') {\n subTotal = sumBy(lstDtls, ( item ) =>{\n return (Number(item.val.alt) );\n });\n }\n return Math.round(subTotal * 1e2) / 1e2;\n },\n\n /**\n * @param {Object} lstDtls keyed etf data objects\n * @returns {number} rounded to 2 decimal points (val.val totalled)\n */\n getIntlSectorBreakdownTotalizer: function(lstDtls) {\n let subTotal = 0;\n if (typeof lstDtls !== 'undefined') {\n subTotal = sumBy(lstDtls, ( item ) =>{\n return ( Number(item.val.val) );\n });\n }\n return Math.round(subTotal * 1e2) / 1e2;\n },\n /**\n * TODO: duplicate of findHoldingObj\n * @param {Object[]} _array\n * @param {string} wanted\n * @returns {Object}\n */\n findObjInArray: function(_array, wanted) {\n const index = findIndex( _array, {'type': wanted});\n let rObj;\n if (index !== -1) {\n rObj = Object.assign({}, _array[index]);\n }\n return rObj;\n },\n /**\n * TODO: duplicate of findObjInArray\n * @param {Object[]} holdings\n * @param {string} wanted\n * @returns {Object}\n */\n findHoldingObj: function(holdings, wanted) {\n return this.findObjInArray(holdings, wanted);\n },\n buildSingleSeriesSectorBreakdownChartData: function(chartSrc, sorted = true) {\n const tempObj = {series1: [], table: {items: []}};\n\n if (typeof chartSrc !== 'undefined') {\n tempObj.series1 = chartSrc.map((item) => {\n return {name: item.name, y: Number(item.val.alt)};\n });\n tempObj.table.items = chartSrc.map((item) => {\n return {'name': item.name, 'val': Number(item.val.alt)};\n });\n }\n\n // sort arrays before returning\n\n if (sorted) {\n tempObj.series1.sort((a, b) => {\n if (a.y < b.y) {\n return 1;\n }\n return a.y > b.y ? -1 : 0;\n });\n\n tempObj.table.items.sort((a, b) => {\n if (a.val < b.val) {\n return 1;\n }\n return a.val > b.val ? -1 : 0;\n });\n }\n\n return tempObj;\n },\n getSectorBreakdownProximity: function(action) {\n const [rawPortfolio ] = action.json;\n\n const caveats = Object.assign({}, get(rawPortfolio, 'productsVO.caveatvo'));\n // Move the array up one level from .text into impLegalInfo\n if (caveats.hasOwnProperty('impLegalInfo')) {\n caveats.impLegalInfo = caveats.impLegalInfo.text.slice();\n caveats.displayLegalInfo = (caveats.impLegalInfo.length > 0);\n }\n return caveats;\n },\n getProximity: function(rawPortfolio) {\n const caveats = Object.assign({}, get(rawPortfolio, 'productsVO.caveatvo'));\n // Move the array up one level from .text into impLegalInfo\n if (caveats.hasOwnProperty('impLegalInfo')) {\n caveats.impLegalInfo = caveats.impLegalInfo.text.slice();\n caveats.displayLegalInfo = (caveats.impLegalInfo.length > 0);\n }\n return caveats;\n },\n getHolding: function( source, holding) {\n const rawHoldings = get(source, 'productsVO.portfolioVO.holdings');\n return this.findHoldingObj(rawHoldings, holding);\n },\n /**\n * @param {Object[]} detail\n * @param {string} wanted\n * @returns {Object}\n */\n findGrade: function(detail, wanted) {\n const index = findIndex( detail, {'name': wanted});\n let rObj;\n if (index !== -1) {\n rObj = Object.assign({}, detail[index]);\n }\n return rObj;\n },\n /**\n * @param {Object[]} detail\n * @param {string[]} wanted\n * @param {boolean} alt\n * @returns {Object}\n */\n getGrades: function(lstDtls, wanted, alt = false) {\n const objArray = [];\n let total = 0.0;\n let empty;\n for (const item of wanted) {\n const srcObj = this.findGrade(lstDtls, item);\n if (typeof srcObj !== 'undefined') {\n const newObj = {\n name: get(srcObj, 'name'),\n val: Number(get(srcObj, (alt ? 'val.alt' : 'val.val')))\n };\n\n total = total + Number(newObj.val);\n objArray.push(newObj);\n }\n }\n empty = (objArray.length === 0);\n // total.toFixed(2) returns an unwanted string so using this other method.\n return {total: (Math.round(total * 1e2) / 1e2), items: objArray, empty: empty};\n },\n /**\n *\n * @param holdings\n * @param doChart\n * @param wantRange\n * @returns {{}}\n */\n getSimplifiedBreakdown: function(holdings, doChart = true, wantRange = false) {\n const obj = {};\n const lstDtls = get(holdings, 'lstDtls');\n if (typeof lstDtls !== 'undefined') {\n obj.total = this.getSectorBreakdownTotalizer(lstDtls);\n obj.series = lstDtls.map((o) => {\n return {\n name: o.name,\n y: Number(o.val.alt)\n };\n });\n\n if (doChart) {\n obj.chart = lstDtls.map((o) => {\n const workObj = {\n name: o.name,\n val: o.val.alt\n };\n if (wantRange) {\n workObj.range = get(o, 'range.alt');\n }\n return workObj;\n });\n } else {\n obj.chart = {};\n }\n }\n\n obj.date = get(holdings, 'date.alt');\n\n return obj;\n },\n /**\n * Process Breakdown data and generate a chart\n * @param {Object[]} data\n * @param {boolean} wantRange - Switch to use range values\n * @param etfMode\n * @returns {Object[]}\n */\n\n buildBreakDownTable: function(data, wantRange, etfMode = false) {\n return data.map(( o) => {\n const workObj = {\n name: o.name.val,\n val: (etfMode ? o.valStd.val : o.val.val)\n };\n if (wantRange) {\n workObj.range = get(o, 'range.val');\n }\n return workObj;\n });\n },\n /**\n * Process Breakdown data and generate a chart\n * @param {Object[]} data\n * @param {boolean} wantRank - Switch to use range values\n * @returns {Object[]}\n */\n\n buildAllocationChart: function(data, wantRank) {\n return data.map(( o) => {\n const workObj = {\n name: o.range || o.name,\n y: Number(o.valStd)\n };\n if (wantRank) {\n workObj.rank = get(o, 'rank');\n }\n return workObj;\n });\n },\n /**\n * Process Breakdown data and generate a table\n * @param {Object[]} data\n * @param etfMode\n * @returns {Object[]}\n */\n\n buildBreakdownChart: function(data, etfMode = false) {\n return data.map(( o) => {\n return {\n name: o.name.val,\n y: Number(etfMode ? o.valStd.val : o.val.val) };\n });\n },\n /**\n *\n * Sorts Breakdown data\n * @param {Object[]} data\n * @returns {Object[]}\n */\n sortBreakdown: function( data) {\n return data.sort(createCompare('rank.val', 'ASC', {isNumeric: true}));\n },\n /**\n * Process portfolio breakdown data, built charts and table.\n * @param {Object} breakdown - The portfolio breakdown object\n * @param {Object} options - Function options\n * @param {boolean} options.doChart - Create chart data switch\n * @param {boolean} options.wantRange - Switch to display range values\n * @param {boolean} options.filter - Switch to filter out values < options.minAmount\n * @param {number} options.minAmount - Value for filter\n * @param {boolean} options.sorted - Switch to force sorting by rank\n * @returns {Object}\n */\n getSimplifiedBreakdownV2: function(breakdown, options = {}) {\n const doChart = options.hasOwnProperty('doChart') ? options.doChart : true;\n const wantRange = options.wantRange || false;\n const filter = options.hasOwnProperty('filter') ? options.filter : true;\n const minAmount = options.minAmount || 0.01;\n const sorted = options.hasOwnProperty('sorted') ? options.sorted : true;\n const etfMode = options.etfMode || false;\n\n\n const obj = {visible: false};\n const lstDtls = get(breakdown, 'brkDwnLst.lstDtls');\n if (typeof lstDtls !== 'undefined') {\n let workLstDtls;\n // filter out items less than minAmount ( defaults to 0.01 )\n workLstDtls = filter ? lstDtls.filter((compObj) => {\n const val = get(compObj, 'valStd.val') || get(compObj, 'val.val') || 0;\n return (val < -minAmount) || (val > minAmount);\n }) : Object.assign({}, lstDtls);\n\n // sort by rank\n if (sorted) {\n workLstDtls = this.sortBreakdown(workLstDtls);\n }\n obj.total = this.getIntlSectorBreakdownTotalizer(workLstDtls);\n\n // build table\n obj.series = this.buildBreakDownTable(workLstDtls, wantRange, etfMode);\n obj.visible = (obj.series.length > 0);\n\n //build chart\n obj.chart = doChart ? this.buildBreakdownChart(workLstDtls, etfMode) : [];\n }\n\n obj.date = get(breakdown, 'asOfDate.val');\n obj.calType = get(breakdown, 'calType.val');\n\n return obj;\n },\n /**\n * Process portfolio breakdown data, built charts and table.\n * @param {Object} breakdown - The portfolio breakdown object\n * @param {Object} options - Function options\n * @param {boolean} options.doChart - Create chart data switch\n * @param {boolean} options.wantRange - Switch to display range values\n * @param {boolean} options.filter - Switch to filter out values < options.minAmount\n * @param {number} options.minAmount - Value for filter\n * @param {boolean} options.sorted - Switch to force sorting by rank\n * @returns {Object}\n */\n getIntlSimplifiedBreakdown: function(breakdown, options = {}) {\n return this.getSimplifiedBreakdownV2(breakdown, options);\n },\n /**\n * Process portfolio breakdown data, built charts and table.\n * @param {Object} breakdown - The portfolio breakdown object\n * @param {Object} options - Function options\n * @param {boolean} options.doChart - Create chart data switch\n * @param {boolean} options.wantRange - Switch to display range values\n * @param {boolean} options.filter - Switch to filter out values < options.minAmount\n * @param {number} options.minAmount - Value for filter\n * @param {boolean} options.sorted - Switch to force sorting by rank\n * @returns {Object}\n */\n getEtfSimplifiedBreakdown: function(breakdown, options = {}) {\n const etfOptions = Object.assign({}, options, {etfMode: true});\n return this.getSimplifiedBreakdownV2(breakdown, etfOptions);\n },\n getLabels: function(rawLabels) {\n const newLabels = {};\n const lSource = get(rawLabels, 'provider.labels.label');\n\n if (typeof lSource !== 'undefined') {\n for (const item of lSource) {\n const key = get(item, 'key');\n newLabels[`${key.toString()}`] = get(item, 'value');\n }\n }\n\n return newLabels;\n },\n getConfig: function(rawConfig) {\n const obj = {showChart: false, spanRow: false};\n const showTemp = get(rawConfig, 'showChart');\n const spanTemp = get(rawConfig, 'spanRow');\n\n if (showTemp instanceof Array) {\n obj.showChart = (showTemp[0].toLowerCase() === 'yes');\n }\n\n if (spanTemp instanceof Array) {\n obj.spanRow = (spanTemp[0].toLowerCase() === 'yes');\n }\n return obj;\n },\n hyphenCase: function(str) {\n if (typeof str === 'undefined') {\n return '';\n }\n const hyphenRegex = /[\\s\\/.&]+/g;\n return str.replace(hyphenRegex, '-').toLowerCase();\n },\n /**\n * Convert flat data into a multi level structure\n * Used for COUNTRY_ALLOCATION\n * @param {Object} data\n * @returns {Array}\n */\n processAllocationData: function(data) {\n const workObj = {};\n let workArray;\n\n for (const item of data) {\n const hypName = this.hyphenCase(item.name.val);\n switch (item.rollupLevel.val) {\n case '1':\n const range = get(item, 'range.val');\n if (typeof range === 'undefined') {\n logger.error('Missing range value!');\n }\n const hypRange = this.hyphenCase(range);\n // this is a sub item\n const subItem = {name: item.name.val, val: item.val.val, rank: item.rank.val, valStd: Number(item.valStd.val) };\n if (Object.keys(workObj).indexOf(hypRange) !== -1) {\n // Add the subitem to the region\n workObj[hypRange].subItems.push(subItem);\n } else {\n // The region doesn't exist, so create it and add the subitem\n workObj[hypRange] = {range: item.range.val, subItems: [subItem], visible: false, val: null, valStd: null, rank: null, name: hypRange};\n }\n break;\n case '2':\n const type2Obj = { val: item.val.val, valStd: item.valStd.val, rank: item.rank.val, rankInt: Number(item.rank.val)};\n workObj[hypName] = Object.assign({}, workObj[hypName], type2Obj);\n break;\n default:\n // Value out of range\n const typeZeroObj = { name: item.name.val, val: item.val.val, valStd: item.valStd.val, rank: item.rank.val, rankInt: Number(item.rank.val)};\n workObj[hypName] = Object.assign({}, workObj[hypName], typeZeroObj);\n\n }\n }\n\n // convert the working object to an array\n workArray = Object.keys(workObj).map((key) => workObj[key]);\n\n // Now we can sort the array by predetermined rank.\n workArray = workArray.sort((a, b) => {\n if (a.rankInt < b.rankInt) {\n return -1;\n }\n return a.rankInt > b.rankInt ? 1 : 0;\n });\n\n return workArray;\n },\n buildAllocationComponent: function(breakddown, options = {}) {\n const doChart = options.hasOwnProperty('doChart') ? options.doChart : true;\n const obj = {visible: false};\n\n const lstDtls = get(breakddown, 'brkDwnLst.lstDtls');\n if (typeof lstDtls !== 'undefined') {\n // prepare the data.\n obj.table = this.processAllocationData(lstDtls);\n obj.chart = doChart ? this.buildAllocationChart(obj.table) : {};\n obj.visible = (obj.table.length > 0);\n\n let hasChildren = false;\n\n obj.table.forEach(key => {\n if (key.subItems !== undefined) {\n hasChildren = true;\n }\n });\n\n obj.hasChildren = hasChildren;\n }\n\n obj.date = get(breakddown, 'asOfDate.val');\n obj.calType = get(breakddown, 'calName.val');\n\n return obj;\n },\n /**\n * Split up suppression set data, simpler to work with.\n * @param rawSet\n * @returns {*}\n */\n splitSuppressionSets: function(rawSet) {\n const set = Object.assign({}, rawSet);\n const fieldsToSplit = ['funds', 'assetClasses', 'portfolioComponents'];\n\n for (const id of fieldsToSplit) {\n set[id] = split(set[id], ',');\n }\n return set;\n },\n /**\n * Fix suppression sets, make them easier to deal with\n * @param rawActor\n * @returns {*}\n */\n fixConfigSets: function(rawActor) {\n const actor = Object.assign({}, rawActor);\n const splitable = ['issuersList', 'showDefensiveRisk', 'showGrowthRisk', 'showOpportunisticRisk', 'showStableRisk'];\n let workingSuppressionSet = get(actor, 'suppressionSets.suppressionSet');\n if (typeof workingSuppressionSet !== 'undefined' && typeof workingSuppressionSet !== 'string') {\n actor.haveSuppressionSets = true;\n if (!Array.isArray(workingSuppressionSet)) {\n // make it easy and convert to an array\n workingSuppressionSet = [workingSuppressionSet];\n }\n for (let item in workingSuppressionSet) {\n if (workingSuppressionSet.hasOwnProperty(item)) {\n workingSuppressionSet[item] = this.splitSuppressionSets(workingSuppressionSet[item]);\n }\n }\n actor.suppressionSets.suppressionSet = workingSuppressionSet;\n } else {\n actor.haveSuppressionSets = false;\n }\n\n // fix other settings..\n // turn other settings into arrays\n for (let obj in actor) {\n if (actor.hasOwnProperty(obj) && splitable.indexOf(obj) !== -1) {\n actor[obj] = split(actor[obj], ',');\n }\n }\n return actor;\n },\n getETFConfig: function(rawConfig) {\n const configBlock = get(rawConfig, 'provider.config');\n let portfolioConfig = {};\n if (typeof configBlock !== 'undefined') {\n // extract actor sets\n for (let item of Object.keys(configBlock)) {\n let configSection = get(configBlock[item], 'portfolio');\n portfolioConfig[item] = this.fixConfigSets(configSection);\n }\n }\n\n return portfolioConfig;\n },\n checkSuppression: function(config, params = {}) {\n let actor = params.actor || null;\n let fundId = params.fundId || null;\n let portfolioComponent = params.portfolioComponent || null;\n let assetClass = params.assetClass || null;\n let suppressed = false;\n if (!actor || (!fundId && !portfolioComponent && !assetClass)) {\n // we need an actor id / fundid / portfolioComponent to work\n return suppressed;\n }\n\n if (!Array.isArray(actor)) {\n // convert actor into an array...\n // we do this so we can search for 'all' and additional actor types.\n // just incase we search for 'all' or something else on it's own.\n // This prefers an array though.\n actor = [actor];\n }\n\n for (let actorId of actor) {\n const actorSet = get(config, actorId);\n if (actorSet.haveSuppressionSets) {\n let suppressionSets = get(actorSet, 'suppressionSets.suppressionSet');\n for (let obj of suppressionSets) {\n if ((obj.funds.indexOf(fundId) !== -1) && (obj.portfolioComponents.indexOf(portfolioComponent) !== -1) && (obj.assetClasses.indexOf(assetClass) !== -1)) {\n suppressed = true;\n }\n }\n }\n }\n return suppressed;\n }\n\n};\n\n// Exposed for pages that require just Proximity and Labels\nexports.getProximity = (rawPortfolio) => exports.portfolioUtils.getProximity(rawPortfolio);\n\nexports.getLabels = (rawLabels) => exports.portfolioUtils.getLabels(rawLabels);\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\n\n@inject('Store', 'Beans', Element)\nexport class FtFindAFund extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_FIND_A_FUND_STATE'\n // beans: beans... // beans set in configuration for site e.g. configuration/en-us-retail/beans.js\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.logger.debug('mapState()');\n // set component properties from state as appropriate\n this.label = newState.products.ppss.label;\n //this.proximity = fundState.distributions.caveats.proximity;\n\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","import {inject, computedFrom} from 'aurelia-framework';\nimport {BindingSignaler} from 'aurelia-templating-resources';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {createCompare} from '../../../../lib/sort-utils';\nimport get from 'lodash/get';\n\n@inject('Store', 'Beans', Element, BindingSignaler)\nexport class FtPpss extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element, signaler) {\n // add logging and integration with the data store\n super(store);\n this.signaler = signaler;\n this.cid = element.getAttribute('cid');\n this.productPageUrl = element.getAttribute('product-page-url');\n if (this.productPageUrl === null) {\n this.productPageUrl = '';\n }\n\n let ppssBeans = beans.component.ppss;\n if (this.cid) {\n ppssBeans.push(this.cid);\n }\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_PPSS_STATE',\n segment: store.getState().general.segment,\n params: store.getState().general.params,\n beans: ppssBeans, // beans set in configuration for site e.g. configuration/en-us-retail/beans.js\n cid: this.cid\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.logger.debug('mapState()', newState);\n // set component properties from state as appropriate\n\n // app state\n let ppssAppState = newState.products.app.ppss;\n this.user = newState.general.user;\n this.currentTable = ppssAppState.currentTable;\n this.display = ppssAppState.display;\n this.sort = ppssAppState.sort;\n this.config = ppssAppState.config;\n this.performanceView = ppssAppState.display.performanceView;\n\n // data state\n // TODO: this is temporary code while labels in flux! Delete the else statement when ready\n if (newState.products.label) {\n this.label = newState.products.label;\n } else {\n this.label = newState.products.ppss.label;\n }\n this.proximity = newState.products.ppss.caveats.proximity;\n this.morningstarAsOfDate = newState.products.ppss.morningstarAsOfDate;\n this.fundCategoryAsOfDate = newState.products.ppss.fundCategoryAsOfDate;\n this.distRateNavAsOfDate = newState.products.ppss.distRateNavAsOfDate;\n this.standardYieldAsOfDate = newState.products.ppss.standardYieldAsOfDate;\n this.standardYieldAsOfDateMoneyFund = newState.products.ppss.standardYieldAsOfDateMoneyFund;\n this.ytdAsOfDate = newState.products.ppss.ytdAsOfDate;\n this.navAsOfDate = newState.products.ppss.navAsOfDate;\n this.navAsOfDateMonth = newState.products.ppss.navAsOfDateMonth;\n this.navAsOfDateQuarter = newState.products.ppss.navAsOfDateQuarter;\n\n // create filters object\n this.filters = this._createFilterConfig(ppssAppState.filters, newState.products.ppss.filterOptions);\n\n // get funds, then filter and sort\n this.funds = newState.products.ppss.funds\n .filter(this._createFilterFunction(this.filters))\n .sort(this._createSortFunction(this.sort, this.display));\n\n // get details of which columns to display for performance data\n if (ppssAppState.performanceDataSets) {\n this.performanceDataSet = ppssAppState.performanceDataSets.get(ppssAppState.display.performanceView);\n }\n\n // if we get to here without erroring, data has been populated successfully\n this.signaler.signal('ppss-map-state');\n this.populated = true;\n this.logger.debug('mapState() done');\n } catch (e) {\n // state not populated yet\n this.populated = false;\n this.logger.debug('mapState() error', e, this.populated);\n }\n }\n\n @computedFrom('currentTable')\n get showPerformanceTab() {\n return this.currentTable === 'PERFORMANCE';\n }\n\n @computedFrom('currentTable')\n get showFundIdentifiersTab() {\n return this.currentTable === 'FUND_IDENTIFIERS';\n }\n\n @computedFrom('currentTable')\n get showEtfTab() {\n return this.currentTable === 'ETF';\n }\n\n @computedFrom('currentTable')\n get showYieldTab() {\n return this.currentTable === 'YIELD';\n }\n\n @computedFrom('currentTable')\n get showRatingsTab() {\n return this.currentTable === 'RATINGS';\n }\n\n @computedFrom('showPerformanceTab')\n get getPerformanceClass() {\n return this.showPerformanceTab ? 'active' : '';\n }\n\n @computedFrom('showFundIdentifiersTab')\n get getFundIdentifiersClass() {\n return this.showFundIdentifiersTab ? 'active' : '';\n }\n\n @computedFrom('showEtfTab')\n get getEtfClass() {\n return this.showEtfTab ? 'active' : '';\n }\n\n @computedFrom('showYieldTab')\n get getYieldClass() {\n return this.showYieldTab ? 'active' : '';\n }\n\n @computedFrom('showRatingsTab')\n get getRatingsClass() {\n return this.showRatingsTab ? 'active' : '';\n }\n\n _createFilterConfig(filters, filterOptions) {\n let dropdowns = filters.dropdowns.map(filter => {\n if (filterOptions[filter.name]) {\n filter.options = filterOptions[filter.name];\n }\n return filter;\n });\n return Object.assign(filters, {dropdowns});\n }\n\n // this creates a function to be passed into Array.sort()\n _createSortFunction(sort, display) {\n let sortColumn = Array.from(sort.columns.values()).find(col => col.direction);\n this.logger.debug('sortColumn', sortColumn);\n let dataKey = sortColumn.baseDataKey ? this._calcDataKey(sortColumn.baseDataKey, display) : sortColumn.dataKey;\n let secondaryCompare = sort.secondary ? createCompare(sort.secondary.dataKey, sort.secondary.direction, {isNumeric: sort.secondary.isNumeric, isDate: sort.secondary.isDate}) : null;\n return createCompare(dataKey, sortColumn.direction, {secondaryCompare, isNumeric: sortColumn.isNumeric, isDate: sortColumn.isDate});\n }\n\n // work out the data key for sorting based on other display parameters\n _calcDataKey(baseDataKey, display) {\n let dataKey = baseDataKey;\n // hacky way to append correct suffix when column can display different values\n switch (baseDataKey) {\n case 'distRateAt':\n dataKey += display.includeSalesCharges ? 'Pop' : 'Nav';\n break;\n default:\n // NB: order is deliberate, so 'MonthlySc' suffix is possible\n if (display.periodEnd === 'MONTH_END') dataKey += 'Monthly';\n if (display.periodEnd === 'QUARTER_END') dataKey += 'Quarterly';\n if (display.includeSalesCharges) dataKey += 'Sc';\n }\n this.logger.debug('dataKey', dataKey);\n return dataKey;\n }\n\n // this creates a function to be passed into Array.filter()\n _createFilterFunction(filters) {\n // only filter on dropdowns with a value (this could be an array of values)\n let activeDropdowns = filters.dropdowns\n .filter(d => d.selected.value\n && ((Array.isArray(d.selected.value) && d.selected.value.length)\n || d.selected.value.toString().toUpperCase() !== 'ALL'));\n let searchString = get(filters, 'keywords.searchString', '').toUpperCase();\n\n return fund => {\n // TODO: filter favorites\n\n // filter dropdowns\n if (!activeDropdowns.reduce((result, dropdown) => {\n // break early if previous filter failed\n if (!result) return false;\n\n let selectedVal = dropdown.selected.value;\n if (dropdown.dataKey) {\n let fundVal = fund[dropdown.dataKey];\n if (Array.isArray(selectedVal)) {\n return selectedVal.indexOf(fundVal) >= 0;\n }\n return fundVal === selectedVal;\n }\n\n return true;\n }, true)) {\n return false;\n }\n\n // filter keywords\n if (searchString) {\n return filters.keywords.searchKeys.reduce((result, searchKey) => {\n if (result) return true; // exit early if keyword already found\n return fund[searchKey].toString().toUpperCase().indexOf(searchString) >= 0;\n }, false);\n }\n\n // ALL passed\n return true;\n };\n }\n}\n","import {bindable} from 'aurelia-framework';\r\nimport {FtPpssTableRowBase} from '../ft-ppss-table-row-base';\r\n\r\nexport class FtPpssEtfRow extends FtPpssTableRowBase {\r\n @bindable fund;\r\n @bindable label;\r\n @bindable config;\r\n @bindable productPageUrl;\r\n}\r\n","import {bindable} from 'aurelia-framework';\nimport {FtPpssTableBase} from '../ft-ppss-table-base';\n\nexport class FtPpssEtf extends FtPpssTableBase {\n @bindable label;\n @bindable config;\n @bindable funds;\n @bindable sort;\n @bindable navAsOfDate;\n @bindable productPageUrl;\n @bindable filters;\n}\n","import {inject, bindable} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\n\n@inject('Store', 'Beans', Element)\nexport class FtPpssFavorite extends ReduxComponentBase {\n @bindable fund;\n @bindable user;\n}\n","import {bindable, inject} from 'aurelia-framework';\r\nimport isEqual from 'lodash/isEqual';\r\nimport get from 'lodash/get';\r\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\r\n\r\n@inject('Store', 'Beans', Element)\r\nexport class FtPpssDropdown extends ReduxComponentBase {\r\n @bindable filter;\r\n @bindable label;\r\n @bindable selected;\r\n allOption;\r\n\r\n labelChanged() {\r\n this.allOption = {label: this.getLabel('all'), value: 'ALL'};\r\n }\r\n\r\n selectedChanged(option) {\r\n if (option) {\r\n this.dispatch({\r\n type: 'PPSS_CHANGE_DROPDOWN',\r\n name: this.filter.name,\r\n newValue: option\r\n });\r\n }\r\n }\r\n\r\n optionMatcher = (a, b) => {\r\n return isEqual(get(a, 'value'), get(b, 'value'));\r\n };\r\n}\r\n","import {computedFrom, inject, bindable} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\n\n@inject('Store', 'Beans', Element)\nexport class FtPpssFundFilter extends ReduxComponentBase {\n @bindable filters;\n @bindable label;\n\n @computedFrom('filters')\n get showFilterForm() {\n return this.filters.dropdowns.length;\n }\n}\n","import {bindable} from 'aurelia-framework';\r\nimport {FtPpssTableRowBase} from '../ft-ppss-table-row-base';\r\n\r\nexport class FtPpssFundIdentifiersRow extends FtPpssTableRowBase {\r\n @bindable fund;\r\n @bindable label;\r\n @bindable config;\r\n @bindable fundIdentifiers;\r\n @bindable productPageUrl;\r\n}\r\n","import {bindable, inject, computedFrom} from 'aurelia-framework';\nimport {FtPpssTableBase} from '../ft-ppss-table-base';\n\n@inject('Store', 'Beans', Element)\nexport class FtPpssFundIdentifiers extends FtPpssTableBase {\n @bindable user;\n @bindable label;\n @bindable config;\n @bindable funds;\n @bindable filters;\n @bindable sort;\n @bindable fundIdentifiers;\n @bindable productPageUrl;\n\n @computedFrom('funds', 'label')\n get resultsNumberMessage() {\n return this.funds && this.label && this.label.get('performance-nb-fund-displayed')\n ? this.getLabel('performance-nb-fund-displayed').replace('<span data-view=\"x-funds-performance\">0</span>', this.funds.length)\n : '';\n }\n}\n","import {bindable, computedFrom} from 'aurelia-framework';\nimport {ComponentBase} from '../../../../lib/component-base';\n\nexport class FtPpssFundName extends ComponentBase {\n @bindable tab;\n @bindable fund;\n @bindable label;\n @bindable config;\n @bindable productPageUrl;\n expanded = false;\n\n @computedFrom('fund', 'productPageUrl')\n get productLink() {\n return `${this.productPageUrl}overview?FundID=${this.fund.fundId}`;\n }\n\n @computedFrom('fund', 'tab')\n get collapseId() {\n return `collapse-${this.fund.fundId}-${this.tab}`;\n }\n\n toggleExpanded() {\n this.expanded = !this.expanded;\n }\n}\n","import {bindable, computedFrom} from 'aurelia-framework';\r\nimport {FtPpssTableRowBase} from '../ft-ppss-table-row-base';\r\n\r\nexport class FtPpssPerformanceRow extends FtPpssTableRowBase {\r\n @bindable fund;\r\n @bindable label;\r\n @bindable config;\r\n @bindable productPageUrl;\r\n @bindable performanceView;\r\n\r\n @computedFrom('performanceView', 'fund')\r\n get col1() {\r\n switch (this.performanceView) {\r\n case 'AVG_ANNUAL_MONTHLY':\r\n return this.fund.avgAnn1YearReturnMonthly;\r\n case 'AVG_ANNUAL_QUARTERLY':\r\n return this.fund.avgAnn1YearReturnQuarterly;\r\n case 'CALENDAR_YEAR_MONTHLY':\r\n return this.fund.calendarYear1yrReturnMonthly;\r\n case 'CALENDAR_YEAR_QUARTERLY':\r\n return this.fund.calendarYear1yrReturnQuarterly;\r\n case 'CUMULATIVE_MONTHLY':\r\n return this.fund.cumulativeRetYtdMonthly;\r\n case 'CUMULATIVE_QUARTERLY':\r\n return this.fund.cumulativeRetYtdQuarterly;\r\n case 'DISCRETE_MONTHLY':\r\n return this.fund.discreteAnnual1yrMonthly;\r\n case 'DISCRETE_QUARTERLY':\r\n return this.fund.discreteAnnual1yrQuarterly;\r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n @computedFrom('performanceView', 'fund')\r\n get col2() {\r\n switch (this.performanceView) {\r\n case 'AVG_ANNUAL_MONTHLY':\r\n return this.fund.avgAnn3YearReturnMonthly;\r\n case 'AVG_ANNUAL_QUARTERLY':\r\n return this.fund.avgAnn3YearReturnQuarterly;\r\n case 'CALENDAR_YEAR_MONTHLY':\r\n return this.fund.calendarYear2yrReturnMonthly;\r\n case 'CALENDAR_YEAR_QUARTERLY':\r\n return this.fund.calendarYear2yrReturnQuarterly;\r\n case 'CUMULATIVE_MONTHLY':\r\n return this.fund.cumulativeRet1yrMonthly;\r\n case 'CUMULATIVE_QUARTERLY':\r\n return this.fund.cumulativeRet1yrQuarterly;\r\n case 'DISCRETE_MONTHLY':\r\n return this.fund.discreteAnnual2yrMonthly;\r\n case 'DISCRETE_QUARTERLY':\r\n return this.fund.discreteAnnual2yrQuarterly;\r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n @computedFrom('performanceView', 'fund')\r\n get col3() {\r\n switch (this.performanceView) {\r\n case 'AVG_ANNUAL_MONTHLY':\r\n return this.fund.avgAnn5YearReturnMonthly;\r\n case 'AVG_ANNUAL_QUARTERLY':\r\n return this.fund.avgAnn5YearReturnQuarterly;\r\n case 'CALENDAR_YEAR_MONTHLY':\r\n return this.fund.calendarYear3yrReturnMonthly;\r\n case 'CALENDAR_YEAR_QUARTERLY':\r\n return this.fund.calendarYear3yrReturnQuarterly;\r\n case 'CUMULATIVE_MONTHLY':\r\n return this.fund.cumulativeRet3yrMonthly;\r\n case 'CUMULATIVE_QUARTERLY':\r\n return this.fund.cumulativeRet3yrQuarterly;\r\n case 'DISCRETE_MONTHLY':\r\n return this.fund.discreteAnnual3yrMonthly;\r\n case 'DISCRETE_QUARTERLY':\r\n return this.fund.discreteAnnual3yrQuarterly;\r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n @computedFrom('performanceView', 'fund')\r\n get col4() {\r\n switch (this.performanceView) {\r\n case 'AVG_ANNUAL_MONTHLY':\r\n return this.fund.avgAnn10YearReturnMonthly;\r\n case 'AVG_ANNUAL_QUARTERLY':\r\n return this.fund.avgAnn10YearReturnQuarterly;\r\n case 'CALENDAR_YEAR_MONTHLY':\r\n return this.fund.calendarYear4yrReturnMonthly;\r\n case 'CALENDAR_YEAR_QUARTERLY':\r\n return this.fund.calendarYear4yrReturnQuarterly;\r\n case 'CUMULATIVE_MONTHLY':\r\n return this.fund.cumulativeRet5yrMonthly;\r\n case 'CUMULATIVE_QUARTERLY':\r\n return this.fund.cumulativeRet5yrQuarterly;\r\n case 'DISCRETE_MONTHLY':\r\n return this.fund.discreteAnnual4yrMonthly;\r\n case 'DISCRETE_QUARTERLY':\r\n return this.fund.discreteAnnual4yrQuarterly;\r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n @computedFrom('performanceView', 'fund')\r\n get col5() {\r\n switch (this.performanceView) {\r\n case 'CALENDAR_YEAR_MONTHLY':\r\n return this.fund.calendarYear5yrReturnMonthly;\r\n case 'CALENDAR_YEAR_QUARTERLY':\r\n return this.fund.calendarYear5yrReturnQuarterly;\r\n case 'CUMULATIVE_MONTHLY':\r\n return this.fund.cumulativeRet10yrMonthly;\r\n case 'CUMULATIVE_QUARTERLY':\r\n return this.fund.cumulativeRet10yrQuarterly;\r\n case 'DISCRETE_MONTHLY':\r\n return this.fund.discreteAnnual5yrMonthly;\r\n case 'DISCRETE_QUARTERLY':\r\n return this.fund.discreteAnnual5yrQuarterly;\r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n @computedFrom('performanceView', 'fund')\r\n get col6() {\r\n switch (this.performanceView) {\r\n case 'CALENDAR_YEAR_MONTHLY':\r\n return this.fund.calendarYear6yrReturnMonthly;\r\n case 'CALENDAR_YEAR_QUARTERLY':\r\n return this.fund.calendarYear6yrReturnQuarterly;\r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n @computedFrom('performanceView', 'fund')\r\n get colInception() {\r\n switch (this.performanceView) {\r\n case 'AVG_ANNUAL_MONTHLY':\r\n return this.fund.avgAnnSinceIncReturnMonthly;\r\n case 'AVG_ANNUAL_QUARTERLY':\r\n return this.fund.avgAnnSinceIncReturnQuarterly;\r\n case 'CUMULATIVE_MONTHLY':\r\n return this.fund.cumulativeRetIncMonthly;\r\n case 'CUMULATIVE_QUARTERLY':\r\n return this.fund.cumulativeRetIncQuarterly;\r\n default:\r\n return '';\r\n }\r\n }\r\n}\r\n","import {FtPpssTableBase} from '../ft-ppss-table-base';\nimport {bindable, computedFrom} from 'aurelia-framework';\n\nexport class FtPpssPerformance extends FtPpssTableBase {\n @bindable user;\n @bindable label;\n @bindable config;\n @bindable filters;\n @bindable sort;\n @bindable funds;\n @bindable periodEnd;\n @bindable productPageUrl;\n @bindable performanceView;\n\n isAvailableDataset(dataset) {\n return this.config.performanceViewOptions.findIndex(ds => ds.name.startsWith(dataset)) >= 0;\n }\n\n changePeriodEnd(key) {\n let periodEnd = key.srcElement.value;\n this.dispatch({\n type: 'PPSS_CHANGE_PERIOD_END',\n periodEnd\n });\n }\n\n @computedFrom('performanceView')\n get showAvgAnnualDataset() {\n return this.performanceView.startsWith('AVG_ANNUAL');\n }\n\n @computedFrom('performanceView')\n get showCalendarYearDataset() {\n return this.performanceView.startsWith('CALENDAR_YEAR');\n }\n\n @computedFrom('performanceView')\n get showCumulativeDataset() {\n return this.performanceView.startsWith('CUMULATIVE');\n }\n\n @computedFrom('performanceView')\n get showDiscreteDataset() {\n return this.performanceView.startsWith('DISCRETE');\n }\n\n @computedFrom('funds', 'label')\n get resultsNumberMessage() {\n return this.funds && this.label && this.label.get('performance-nb-fund-displayed')\n ? this.getLabel('performance-nb-fund-displayed').replace('<span data-view=\"x-funds-performance\">0</span>', this.funds.length)\n : '';\n }\n\n @computedFrom('config')\n get searchAreaColspan() {\n return this.config.showFavorites ? 4 : 3;\n }\n}\n","import {FtPpssTableBase} from '../ft-ppss-table-base';\nimport {bindable, computedFrom} from 'aurelia-framework';\n\nexport class FtPpssRatings extends FtPpssTableBase {\n @bindable user;\n @bindable label;\n @bindable config;\n @bindable funds;\n @bindable filters;\n @bindable sort;\n @bindable morningstarAsOfDate;\n @bindable fundCategoryAsOfDate;\n @bindable productPageUrl;\n\n @computedFrom('funds', 'label')\n get resultsNumberMessage() {\n return this.funds && this.label && this.label.get('ratings-nb-fund-displayed')\n ? this.getLabel('ratings-nb-fund-displayed').replace('<span data-view=\"x-funds-ratings\">0</span>', this.funds.length)\n : '';\n }\n\n @computedFrom('config')\n get moneyFundHeaderColspan() {\n return this.config.showFavorites ? 12 : 11;\n }\n}\n","import {inject, bindable} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\n\n@inject('Store', 'Beans', Element)\nexport class FtPpssSearchBox extends ReduxComponentBase {\n @bindable label;\n @bindable searchString;\n\n searchStringChanged(newSearchString) {\n this.dispatch({\n type: 'PPSS_CHANGE_KEYWORDS',\n newSearchString\n });\n }\n}\n","import {inject, bindable, computedFrom} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport countBy from 'lodash/countBy';\n\n@inject('Store', 'Beans', Element)\nexport class FtPpssTabHeader extends ReduxComponentBase {\n @bindable label;\n @bindable config;\n @bindable currentTable;\n @bindable performanceView;\n @bindable includeSalesCharges;\n\n @computedFrom('config')\n get showPerformanceToggle() {\n return this.config.performanceViewOptions.length > 1; // show performance view radios if 2 (or more) options\n }\n\n @computedFrom('currentTable')\n get getPerformanceClass() {\n return this.currentTable === 'PERFORMANCE' ? 'active' : 'hidden-print';\n }\n\n @computedFrom('currentTable')\n get getFundIdentifiersClass() {\n return this.currentTable === 'FUND_IDENTIFIERS' ? 'active' : 'hidden-print';\n }\n\n @computedFrom('currentTable')\n get getEtfClass() {\n return this.currentTable === 'ETF' ? 'active' : 'hidden-print';\n }\n\n @computedFrom('currentTable')\n get getYieldClass() {\n return this.currentTable === 'YIELD' ? 'active' : 'hidden-print';\n }\n\n @computedFrom('currentTable')\n get getRatingsClass() {\n return this.currentTable === 'RATINGS' ? 'active' : 'hidden-print';\n }\n\n @computedFrom('cumulativeSelected')\n get cumulativeClass() {\n return this.cumulativeSelected ? 'active' : '';\n }\n\n @computedFrom('performanceView')\n get cumulativeSelected() {\n return this.performanceView === 'CUMULATIVE_MONTHLY';\n }\n\n @computedFrom('discreteSelected')\n get discreteClass() {\n return this.discreteSelected ? 'active' : '';\n }\n\n @computedFrom('performanceView')\n get discreteSelected() {\n return this.performanceView === 'DISCRETE_QUARTERLY';\n }\n\n @computedFrom('config')\n get showTabs() {\n let count = countBy([\n this.config.showPerformanceTab,\n this.config.showEtfTab,\n this.config.showFundIdentifiersTab,\n this.config.showYieldTab,\n this.config.showRatingsTab\n ], s => s ? 'visible' : 'hidden');\n return count.visible > 1; // only show tabs if at least 2\n }\n\n getPerformanceViewClass(view) {\n return this.performanceView.replace(/(_QUARTERLY|_MONTHLY)$/, '') === view.replace(/(_QUARTERLY|_MONTHLY)$/, '') ? 'active' : '';\n }\n\n changeTab(key) {\n this.dispatch({\n type: 'PPSS_CHANGE_TAB',\n tab: key\n });\n }\n\n performanceViewChanged(view) {\n this.dispatch({\n type: 'PPSS_CHANGE_PERFORMANCE_VIEW',\n data: view\n });\n }\n\n includeSalesChargesChanged(val) {\n this.dispatch({\n type: 'PPSS_CHANGE_SALES_CHARGES',\n data: val\n });\n }\n}\n","import {inject, bindable, computedFrom} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\n\n@inject('Store', 'Beans', Element)\nexport class FtPpssTableToolbar extends ReduxComponentBase {\n @bindable user;\n @bindable label;\n\n @computedFrom('user')\n get showAddFavourite() {\n return this.user && this.user.loggedIn;\n }\n\n @computedFrom('user')\n get showCompare() {\n return this.user && this.user.loggedIn && (this.user.actor === 'FA');\n }\n}\n","import {bindable, computedFrom} from 'aurelia-framework';\r\n\r\nexport class FtPpssYieldRow {\r\n @bindable fund;\r\n @bindable label;\r\n @bindable config;\r\n @bindable productPageUrl;\r\n @bindable includeSalesCharges;\r\n\r\n @computedFrom('fund', 'includeSalesCharges')\r\n get distributionRate() {\r\n if (!this.fund.isValidYieldData) return '-';\r\n if (!this.fund.isAllowedInConfig) return 'N/A'; // TODO: need label\r\n if (this.includeSalesCharges && this.fund.distRateAtPop) return this.fund.distRateAtPop;\r\n if (!this.includeSalesCharges && this.fund.distRateAtNav) return this.fund.distRateAtNav;\r\n return '';\r\n }\r\n\r\n @computedFrom('fund')\r\n get showSecYieldWoWvr() {\r\n return this.fund.isValidYieldData\r\n && this.fund.isAllowedInConfig\r\n && this.fund.secYieldWoWvr;\r\n }\r\n\r\n @computedFrom('fund')\r\n get standardizedYield30Day() {\r\n if (!this.fund.isValidYieldData) return '-';\r\n if (!this.fund.isAllowedInConfig) return 'N/A'; // TODO: need label\r\n if (this.fund.secYield) return this.fund.secYield;\r\n return '';\r\n }\r\n\r\n @computedFrom('fund')\r\n get showCurrent7DayYieldWoWvr() {\r\n return this.fund.isValidYieldData\r\n && this.fund.isAllowedInConfig\r\n && this.fund.current7DayYieldWoWvr;\r\n }\r\n\r\n @computedFrom('fund')\r\n get current7DayYield() {\r\n if (!this.fund.isValidYieldData) return '-';\r\n if (!this.fund.isAllowedInConfig) return 'N/A'; // TODO: need label\r\n if (this.fund.current7DayYield) return this.fund.current7DayYield;\r\n return '';\r\n }\r\n\r\n @computedFrom('fund')\r\n get showEffective7DayYieldWoWvr() {\r\n return this.fund.isValidYieldData\r\n && this.fund.isAllowedInConfig\r\n && this.fund.effective7DayYieldWoWvr;\r\n }\r\n\r\n @computedFrom('fund')\r\n get effective7DayYield() {\r\n if (!this.fund.isValidYieldData) return '-';\r\n if (!this.fund.isAllowedInConfig) return 'N/A'; // TODO: need label\r\n if (this.fund.effective7DayYield) return this.fund.effective7DayYield;\r\n return '';\r\n }\r\n}\r\n","import {FtPpssTableBase} from '../ft-ppss-table-base';\nimport {bindable, computedFrom} from 'aurelia-framework';\n\nexport class FtPpssYield extends FtPpssTableBase {\n @bindable user;\n @bindable label;\n @bindable config;\n @bindable filters;\n @bindable funds;\n @bindable sort;\n @bindable productPageUrl;\n @bindable distRateNavAsOfDate;\n @bindable standardYieldAsOfDate;\n @bindable standardYieldAsOfDateMoneyFund;\n @bindable includeSalesCharges;\n\n @computedFrom('funds', 'label')\n get resultsNumberMessage() {\n return this.funds && this.label && this.label.get('yield-nb-fund-displayed')\n ? this.getLabel('yield-nb-fund-displayed').replace('<span data-view=\"x-funds-yield-and-price\">0</span>', this.funds.length)\n : '';\n }\n\n @computedFrom('moneyFunds', 'otherFunds')\n get hasOnlyMoneyFunds() {\n return this.moneyFunds\n && this.otherFunds\n && this.moneyFunds.length\n && (this.otherFunds.length < 1);\n }\n\n @computedFrom('hasOnlyMoneyFunds', 'includeSalesCharges', 'label')\n get distributionRateColumnTitle() {\n if (this.hasOnlyMoneyFunds) {\n return this.getLabel('7-day-current-yield');\n }\n if (this.includeSalesCharges) {\n return `${this.getLabel('distribution-rate')} ${this.getLabel('pop')}`;\n }\n return `${this.getLabel('distribution-rate')} ${this.getLabel('nav')}`;\n }\n\n @computedFrom('hasOnlyMoneyFunds', 'label')\n get secYieldColumnTitle() {\n if (this.hasOnlyMoneyFunds) {\n return this.getLabel('7-day-effective-yield');\n }\n return this.getLabel('30-days-stand-yield');\n }\n\n @computedFrom('config')\n get moneyFundHeaderColspan() {\n return this.config.showFavorites ? 10 : 9;\n }\n}\n","import {inject} from 'aurelia-framework';\n// import {TopLevelProductComponentBase} from '../../lib/top-level-product-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\n\n@inject('Store', 'Beans', Element)\nexport class FtDailyPricesAndBreakpoints extends ReduxComponentBase\n {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.historicalDataUrl = element.getAttribute('historical-data-url');\n\n // This is a top level component so we need to initiate the population\n\n this.dispatch({\n type: 'POPULATE_PRICING_AND_BREAKPOINTS',\n beans: beans.component.dailyPricesAndBreakpoints, // from configuration, // beans set in configuration for site e.g. configuration/en-us-retail/beans.js\n fundId: this.fundId\n });\n\n this.has50Break = false;\n\n this.parseBrkptString = (val) => {\n this.logger.debug('val', val);\n let parsed;\n switch (val) {\n case '49999.99':\n parsed = this.label['less-than-50k'];\n this.has50Break = true;\n break;\n case '99999.99':\n if (this.has50Break) {\n parsed = this.label['less-than-100k'];\n } else {\n parsed = this.label['less-than-100k'];\n }\n break;\n case '249999.99':\n parsed = this.label['100k-to-less-than-250k'];\n break;\n case '499999.99':\n parsed = this.label['250k-to-less-than-500k'];\n break;\n case '999999.99':\n parsed = this.label['500k-to-less-than-1000k'];\n break;\n default:\n }\n return parsed;\n };\n }\n\n mapState(newState) {\n try {\n let fundState = getFundState(newState, this.fundId);\n\n this.label = newState.products.label || {};\n this.caveats = fundState.dailyPricesAndBreakpoints.caveats;\n this.data = fundState.dailyPricesAndBreakpoints.data;\n this.prices = fundState.dailyPricesAndBreakpoints.prices;\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.logger.debug('mapState() error', e);\n this.populated = false;\n }\n }\n\n}\n","\r\nimport {bindable, useView, computedFrom} from 'aurelia-framework';\r\nimport {FtChart} from '../../../common/elements/ft-chart';\r\nimport merge from 'lodash/merge';\r\n\r\n@useView('../../../common/elements/ft-chart.html')\r\nexport class FtPricingAtNavChart extends FtChart {\r\n @bindable options;\r\n\r\n @bindable data = [];\r\n @bindable seriesName = 'NAV';\r\n @bindable navDecimal = 2;\r\n @bindable prefix = '$';\r\n\r\n @computedFrom('data', 'seriesName', 'navDecimal', 'prefix')\r\n get series() {\r\n return {\r\n id: 0,\r\n name: this.seriesName,\r\n type: 'area',\r\n data: this.data,\r\n tooltip: {\r\n pointFormat: '{series.name}: <b>{point.y}</b><br/>',\r\n valueDecimals: this.navDecimal,\r\n valuePrefix: this.prefix\r\n }\r\n };\r\n }\r\n\r\n newChartOnUpdate = true;\r\n pricingDefaultOptions = {\r\n xAxis: {\r\n type: 'datetime'\r\n },\r\n yAxis: {\r\n labels: {\r\n format: this.prefix + '{value:.2f}'\r\n },\r\n title: ''\r\n },\r\n plotOptions: {\r\n series: {\r\n fillOpacity: 0,\r\n marker: {\r\n enabled: false\r\n }\r\n }\r\n }\r\n };\r\n\r\n mergeOptions() {\r\n let newOpts = merge({}, this.defaultOptions, this.pricingDefaultOptions, this.options);\r\n newOpts.yAxis.labels.format = this.prefix + '{value:.2f}';\r\n return newOpts;\r\n }\r\n\r\n dataChanged() {\r\n this.updateChart();\r\n }\r\n\r\n seriesNameChanged() {\r\n this.updateChart();\r\n }\r\n\r\n navDecimalChanged() {\r\n this.updateChart();\r\n }\r\n\r\n prefixChanged() {\r\n this.updateChart();\r\n }\r\n}\r\n","import {inject} from 'aurelia-framework';\n//import {TopLevelProductComponentBase} from '../../lib/top-level-product-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\n\n@inject('Store', 'Beans', Element)\nexport class FtPricingAtNav extends ReduxComponentBase {\n populated = false;\n currentTab = null;\n tabs = [\n {\n key: 'NINTY_DAYS',\n labelKey: 'ninty-days',\n isActive: false\n },\n {\n key: 'YTD',\n labelKey: 'ytd',\n isActive: false\n },\n {\n key: 'ONE_YEAR',\n labelKey: 'one-year',\n isActive: false\n },\n {\n key: 'FIVE_YEAR',\n labelKey: 'five-years',\n isActive: false\n },\n {\n key: 'TEN_YEAR',\n labelKey: 'ten-years',\n isActive: false\n }\n ];\n\n chartData = [];\n chartOptions = {};\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_PRICING_AT_NAV_STATE',\n beans: beans.component.pricingAtNav, // from configuration, // beans set in configuration for site e.g. configuration/en-us-retail/beans.js\n fundId: this.fundId\n });\n\n // select default chart tab\n this.dispatch({\n type: 'PRICING_AT_NAV_CHANGE_TAB',\n tab: 'ONE_YEAR'\n });\n }\n\n changeTab(key) {\n this.dispatch({\n type: 'PRICING_AT_NAV_CHANGE_TAB',\n tab: key\n });\n }\n\n /**\n * Identify the section of the state for this fund that apply to this component.\n * @param newState\n * @returns {*}\n */\n /*selectState(newState) {\n return (newState && newState.pricingAtNav) ? newState.pricingAtNav : undefined;\n }*/\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n let fundState = getFundState(newState, this.fundId);\n this.label = newState.products.label || {};\n this.currentTab = newState.products.app.pricingAtNav.currentTab;\n\n this.navDate = fundState.pricingAtNav.navDate;\n this.chartData = fundState.pricingAtNav[this.currentTab];\n\n this.tabs = this.tabs.map(tab => {\n tab.value = this.getLabel(tab.labelKey);\n tab.isActive = (tab.key === this.currentTab);\n return tab;\n });\n\n // set up derived data\n if (fundState.pricingAtNav.navDate !== undefined) {\n this.populated = true;\n }\n } catch (e) {\n // state not populated yet\n this.logger.debug('mapState() error', e);\n this.populated = false;\n }\n }\n}\n","import {bindable, computedFrom} from 'aurelia-framework';\nimport {ComponentBase} from '../../../../lib/component-base';\n\nexport class FtDividends extends ComponentBase {\n @bindable dividendShareClasses = [];\n @bindable label;\n @bindable dividendAsOfDate;\n\n @computedFrom('dividendShareClasses')\n get showDividends() {\n return this.dividendShareClasses && this.dividendShareClasses.length;\n }\n\n @computedFrom('dividendShareClasses')\n get showShareClassColumn() {\n return this.dividendShareClasses.some(sc => sc.className);\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {ComponentBase} from '../../../../lib/component-base';\nimport {bindable, computedFrom} from 'aurelia-framework';\nimport {getPagingInfo} from '../../../../lib/paging-utils';\n\n@inject('Store')\nexport class FtDividendsHistorical extends ComponentBase {\n\n constructor(store) {\n super();\n\n this.params = store.getState().general.params;\n this.path = store.getState().general.path;\n this.selectedYear = null;\n this.currentPageNumber = 1;\n\n this.uniqueId = 'dividend-historical-' + FtDividendsHistorical.componentCount++;\n }\n\n /**\n * @type {Object}\n */\n @bindable shareClass;\n\n /**\n * @type {Object}\n */\n @bindable label;\n\n /**\n * @type {Object}\n */\n @bindable pdData;\n\n /**\n * @type {number}\n */\n static componentCount = 0;\n\n /**\n * @type {Object}\n */\n params;\n\n /**\n * @type {string}\n */\n path;\n\n /**\n * @type {string}\n */\n uniqueId;\n\n /**\n * @type {boolean}\n */\n accordionOpen = false;\n\n /**\n * @type {Number}\n */\n selectedYear;\n\n /**\n * @type {Number}\n */\n currentPageNumber;\n\n toggleAccordion() {\n this.accordionOpen = !this.accordionOpen;\n }\n\n goToPage(page) {\n this.currentPageNumber = page;\n }\n\n @computedFrom('shareClass')\n get isPopulated() {\n return this.shareClass && (this.shareClass.dividendHistory.length !== 0);\n }\n\n /**\n * @returns {Object[]}\n */\n @computedFrom('shareClass', 'selectedYear')\n get historicalDividends() {\n if (!this.shareClass.dividendYears || this.shareClass.dividendYears.length === 0) {\n return [];\n }\n if (!this.selectedYear) {\n this.selectedYear = this.shareClass.dividendYears[0];\n }\n if (this.selectedYear === 'since-inception') {\n return this.shareClass.dividendHistory;\n }\n return this.shareClass.dividendHistoryByYear[this.selectedYear] ? this.shareClass.dividendHistoryByYear[this.selectedYear] : [];\n }\n\n\n @computedFrom('historicalDividends', 'pdData', 'currentPageNumber')\n get pagingInfo() {\n return getPagingInfo(this.historicalDividends.length, this.pdData.paging.pageSize, this.currentPageNumber);\n }\n\n /**\n * @returns {Object[]}\n */\n @computedFrom('historicalDividends', 'pagingInfo')\n get paginatedHistoricalDividends() {\n let dividends = [];\n if (this.pagingInfo.totalPages !== 0) {\n for (let index = this.pagingInfo.currentPage.startRecord; index <= this.pagingInfo.currentPage.endRecord; index++) {\n dividends.push(this.historicalDividends[index - 1]);\n }\n }\n return dividends;\n }\n\n /**\n * @returns {Object}\n */\n @computedFrom('historicalDividends')\n get firstHistoricalDividend() {\n return (this.historicalDividends.length !== 0) ? this.historicalDividends[0] : null;\n }\n\n /**\n * @returns {Object}\n */\n @computedFrom('historicalDividends')\n get lastHistoricalDividend() {\n return (this.historicalDividends.length !== 0) ? this.historicalDividends[this.historicalDividends.length - 1] : null;\n }\n\n /**\n * @returns {Object}\n */\n @computedFrom('historicalDividends', 'pagingInfo')\n get firstPaginatedDividend() {\n return (this.pagingInfo.totalPages !== 0) ? this.historicalDividends[this.pagingInfo.currentPage.startRecord] : null;\n }\n\n /**\n * @returns {Object}\n */\n @computedFrom('historicalDividends', 'pagingInfo')\n get lastPaginatedDividend() {\n return (this.pagingInfo.totalPages !== 0) ? this.historicalDividends[this.pagingInfo.currentPage.endRecord - 1] : null;\n }\n\n @computedFrom('selectedYear')\n get downloadUrl() {\n let downloadParams = Object.assign({}, this.params);\n downloadParams.year = this.selectedYear;\n let query = [];\n for (let key in downloadParams) {\n if (downloadParams.hasOwnProperty(key)) {\n let value = downloadParams[key];\n query.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));\n }\n }\n return this.path + '?' + query.join('&');\n }\n}\n","import {bindable, computedFrom} from 'aurelia-framework';\nimport {ComponentBase} from '../../../../lib/component-base';\nexport class FtNavHighLow extends ComponentBase {\n @bindable label;\n @bindable config;\n @bindable shareClass;\n\n @computedFrom('shareClass')\n get navAsOfDate() {\n return this.shareClass.asOfDate;\n }\n}\n","import {bindable, computedFrom, inject, observable} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {currencyConfigs} from '../../../../lib/currency';\nimport moment from 'moment';\n\n@inject('Store', 'Beans', Element)\nexport class FtPriceChart extends ReduxComponentBase {\n @bindable label = {};\n @bindable pdData;\n @bindable shareClass;\n @bindable datePickerFromOpts = {};\n @bindable datePickerToOpts = {};\n @bindable navHistory = [];\n @bindable dateRangeOptions;\n @observable fromDate;\n @observable toDate;\n selectedDateRange = '';\n\n @computedFrom('shareClass')\n get currencySymbol() {\n return currencyConfigs.get(this.shareClass.currency).symbol;\n }\n\n @computedFrom('currencySymbol')\n get chartOptions() {\n return {\n xAxis: {\n type: 'datetime'\n },\n yAxis: [{ // Primary yAxis (NAV)\n labels: {\n format: this.currencySymbol + '{value}'\n },\n title: {\n text: null\n }\n }, { // Secondary yAxis (NAV%)\n labels: {\n format: '{value}%'\n },\n title: {\n text: null\n },\n tickInterval: 1,\n minorTickInterval: 'auto',\n opposite: true\n }],\n legend: {\n enabled: true,\n verticalAlign: 'top'\n },\n tooltip: {\n shared: true\n }\n };\n }\n\n @computedFrom('navHistory', 'currencySymbol')\n get chartSeries() {\n return [{\n name: this.getLabel('nav'),\n min: 0,\n tooltip: {\n valuePrefix: this.currencySymbol\n },\n data: this.navHistory.map(nh => [moment(nh.navDate).valueOf(), Number.parseFloat(nh.nav)])\n }, {\n name: this.getLabel('nav-change-percent'),\n yAxis: 1,\n tooltip: {\n valueSuffix: '%'\n },\n data: this.navHistory.map(nh => [moment(nh.navDate).valueOf(), Number.parseFloat(nh.navChangePercent)])\n }];\n }\n\n getOptionClass(opt) {\n let classes = [];\n if (opt.name === this.selectedDateRange) classes.push('active');\n if (opt.disabled) classes.push('disabled');\n return classes.join(' ');\n }\n\n changeDateRange(opt) {\n this.dispatch({\n type: 'PRICING_DISTRIBUTION_UPDATE_RANGE',\n data: opt\n });\n return true; //Important! allows event to propagate\n }\n\n pdDataChanged(pdData) {\n this.fromDate = pdData.fromDate;\n this.toDate = pdData.toDate;\n this.selectedDateRange = pdData.selectedDateRange;\n }\n\n fromDateChanged(fromDate) {\n if (fromDate !== this.pdData.fromDate) {\n this._customDateRange();\n }\n }\n\n toDateChanged(toDate) {\n if (toDate !== this.pdData.toDate) {\n this._customDateRange();\n }\n }\n\n _customDateRange() {\n this.dispatch({\n type: 'PRICING_DISTRIBUTION_CUSTOM_DATES',\n data: {\n fromDate: this.fromDate,\n toDate: this.toDate\n }\n });\n }\n}\n","export default {\r\n 'pricingDistribution': {\r\n 'dividendAsOfDate': '13/04/2017',\r\n 'label': {\r\n 'as-of': 'As of',\r\n 'currency': 'Currency',\r\n 'distribution-date': 'Distribution Date',\r\n 'dividends': 'Dividends',\r\n 'dividends-per-share': 'Dividends per Share',\r\n 'ex-dividend-date': 'Ex-Dividend Date',\r\n 'record-date': 'Record Date',\r\n 'share-class': 'Share Class'\r\n },\r\n 'primaryShareClass': {\r\n 'className': 'W (acc) GBP',\r\n 'currency': 'GBP',\r\n 'dividend': null,\r\n 'primary': true\r\n },\r\n 'shareClasses': [\r\n {\r\n 'className': 'A (acc) EUR',\r\n 'currency': 'EUR',\r\n 'dividend': null,\r\n 'primary': false\r\n },\r\n {\r\n 'className': 'A (acc) EUR-H1',\r\n 'currency': 'EUR',\r\n 'dividend': null,\r\n 'primary': false\r\n },\r\n {\r\n 'className': 'A (acc) USD',\r\n 'currency': 'USD',\r\n 'dividend': null,\r\n 'primary': false\r\n },\r\n {\r\n 'className': 'A (Ydis) GBP',\r\n 'currency': 'GBP',\r\n 'dividend': {\r\n 'distributionDate': '',\r\n 'dividendsPerShare': '£0.364',\r\n 'exDividendDate': '01/07/2016',\r\n 'recordDate': '30/06/2016'\r\n },\r\n 'primary': false\r\n },\r\n {\r\n 'className': 'A (Ydis) USD',\r\n 'currency': 'USD',\r\n 'dividend': {\r\n 'distributionDate': '',\r\n 'dividendsPerShare': '$0.286',\r\n 'exDividendDate': '01/07/2016',\r\n 'recordDate': '30/06/2016'\r\n },\r\n 'primary': false\r\n },\r\n {\r\n 'className': 'I (acc) EUR',\r\n 'currency': 'EUR',\r\n 'dividend': null,\r\n 'primary': false\r\n },\r\n {\r\n 'className': 'I (acc) USD',\r\n 'currency': 'USD',\r\n 'dividend': null,\r\n 'primary': false\r\n },\r\n {\r\n 'className': 'I (Ydis) GBP',\r\n 'currency': 'GBP',\r\n 'dividend': {\r\n 'distributionDate': '',\r\n 'dividendsPerShare': '£0.608',\r\n 'exDividendDate': '01/07/2016',\r\n 'recordDate': '30/06/2016'\r\n },\r\n 'primary': false\r\n },\r\n {\r\n 'className': 'W (acc) EUR',\r\n 'currency': 'EUR',\r\n 'dividend': null,\r\n 'primary': false\r\n },\r\n {\r\n 'className': 'W (acc) GBP',\r\n 'currency': 'GBP',\r\n 'dividend': null,\r\n 'primary': true\r\n },\r\n {\r\n 'className': 'W (acc) USD',\r\n 'currency': 'USD',\r\n 'dividend': null,\r\n 'primary': false\r\n },\r\n {\r\n 'className': 'Z (acc) GBP',\r\n 'currency': 'GBP',\r\n 'dividend': null,\r\n 'primary': false\r\n },\r\n {\r\n 'className': 'Z (Ydis) EUR-H1',\r\n 'currency': 'EUR',\r\n 'dividend': {\r\n 'distributionDate': '',\r\n 'dividendsPerShare': '€0.229',\r\n 'exDividendDate': '01/07/2016',\r\n 'recordDate': '30/06/2016'\r\n },\r\n 'primary': false\r\n }\r\n ]\r\n }\r\n};\r\n","import {inject} from 'aurelia-framework';\nimport moment from 'moment';\nimport {ReduxComponentBase} from '../../../../lib/redux-component-base';\nimport {getFundState} from '../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtPricingDistribution extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_PRICING_DISTRIBUTION',\n beans: beans.component.pricingDistribution, // beans set in configuration for site e.g. configuration/en-us-retail/beans.js\n fundId: this.fundId\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.logger.debug('mapState()', newState);\n let fundState = getFundState(newState, this.fundId);\n // set component properties from state as appropriate\n this.currentShareClass = this._getCurrentShareClass(fundState.pricingDistribution, newState.general.params);\n this.dividendShareClasses = fundState.pricingDistribution.shareClasses.filter(sc => sc.dividend);\n // this.label = fundState.pricingDistribution.label;\n this.label = newState.products.label;\n this.dividendAsOfDate = fundState.pricingDistribution.dividendAsOfDate;\n this.pdData = newState.products.app.pricingDistribution;\n\n this.navHistory = this._getNavHistory(this.currentShareClass, this.pdData.selectedDateRange);\n this.dateRangeOptions = this.pdData.dateRangeOptions.map(opt => {\n let navHist = this._getNavHistory(this.currentShareClass, opt.name);\n let newOpt = Object.assign({}, opt);\n newOpt.disabled = !navHist;\n if (navHist) {\n newOpt.fromDate = navHist[0].navDate;\n newOpt.toDate = navHist[navHist.length - 1].navDate;\n }\n return newOpt;\n });\n\n if (this.navHistory) {\n if (!this.pdData.fromDate || !this.pdData.toDate) { // this is only likely to happen on start up\n this.pdData.fromDate = this.navHistory[0].navDate;\n this.pdData.toDate = this.navHistory[this.navHistory.length - 1].navDate;\n }\n } else if (this.pdData.selectedDateRange === 'CUSTOM_RANGE') {\n let allHistory = this._getNavHistory(this.currentShareClass, 'SINCE_INCEPTION');\n this.navHistory = allHistory.filter(nav => moment(nav.navDate).isBetween(this.pdData.fromDate, this.pdData.toDate, null, '[]'));\n }\n this.datePickerFromOpts = {\n dateFormat: newState.products.app.pricingDistribution.datePickerFormat,\n minDate: this.currentShareClass.minDate,\n maxDate: this.pdData.toDate\n };\n this.datePickerToOpts = {\n dateFormat: newState.products.app.pricingDistribution.datePickerFormat,\n minDate: this.pdData.fromDate,\n maxDate: this.currentShareClass.maxDate\n };\n\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n this.logger.debug('mapState() error:::', e);\n }\n }\n\n _getNavHistory(shareClass, selectedDateRange) {\n switch (selectedDateRange) {\n case 'ONE_MONTH':\n return shareClass.navHistory1M;\n case 'THREE_MONTHS':\n return shareClass.navHistory3M;\n case 'SIX_MONTHS':\n return shareClass.navHistory6M;\n case 'ONE_YEAR':\n return shareClass.navHistory1Y;\n case 'THREE_YEARS':\n return shareClass.navHistory3Y;\n case 'FIVE_YEARS':\n return shareClass.navHistory5Y;\n case 'SINCE_INCEPTION':\n return shareClass.navHistory;\n default:\n return null;\n }\n }\n\n _getCurrentShareClass(pricingDistribution, params) {\n let currentShareClass;\n if (params && params.shareClassKey) {\n currentShareClass = pricingDistribution.shareClasses.find(sc => sc.shareClassKey === params.shareClassKey);\n }\n if (!currentShareClass) {\n currentShareClass = pricingDistribution.primaryShareClass;\n }\n return currentShareClass;\n }\n}\n","import {bindable, computedFrom} from 'aurelia-framework';\nimport {ComponentBase} from '../../../../lib/component-base';\nimport {navChangeClass } from '../../lib/reducer-utils';\n\nexport class FtSharePrices extends ComponentBase {\n @bindable label;\n @bindable shareClass;\n\n @computedFrom('shareClass')\n get navChangeClass() {\n return navChangeClass(this.shareClass.navChangeDirection);\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {TopLevelProductComponentBase} from '../../lib/top-level-product-component-base';\n\n@inject('Store', 'Beans', Element)\nexport class FtAdditionalTaxInformation extends TopLevelProductComponentBase {\n lgColWidth = 'col-lg-8';\n colWidth = '';\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n // this.taxYear = element.getAttribute('tax-year');\n this.taxYear = 2016;\n this.taxBeans = beans.component.tax;\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_ADDITIONAL_TAX_INFO',\n beans: this.taxBeans,\n fundId: this.fundId,\n taxYear: this.taxYear\n });\n }\n /**\n * Identify the section of the state for this fund that apply to this component.\n * @param newState\n * @returns {*}\n */\n selectState(newState) {\n // taking a copy of newState.distributions, as a reference won't trigger updates\n return newState && newState.additionalTaxInformation ? Object.assign({}, newState.additionalTaxInformation) : null;\n }\n\n /**\n * Called when the state changes.\n */\n update() {\n try {\n this.logger.debug('updating');\n this.label = this.state.label;\n\n // set up derived data\n if (this.state.data !== undefined) {\n this.lgColWidth = (this.state.data.additionalTaxInformation) ? 'col-lg-8' : 'col-lg-12';\n this.colWidth = (this.state.data.additionalTaxInformation) ? '' : 'col-lg-4';\n this.populated = true;\n }\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {TopLevelProductComponentBase} from '../../lib/top-level-product-component-base';\n\n@inject('Store', 'Beans', Element)\nexport class FtTaxInformation extends TopLevelProductComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.taxYear = element.getAttribute('tax-year');\n this.taxBeans = beans.component.tax;\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_TAX_INFORMATION',\n beans: this.taxBeans,\n fundId: this.fundId,\n taxYear: this.taxYear\n });\n }\n\n onChangeTaxYear(key) {\n let newTaxYear = key.srcElement.value;\n this.dispatch({\n type: 'POPULATE_TAX_INFORMATION',\n beans: this.taxBeans,\n fundId: this.fundId,\n taxYear: newTaxYear\n });\n }\n /**\n * Identify the section of the state for this fund that apply to this component.\n * @param newState\n * @returns {*}\n */\n selectState(newState) {\n //return newState; // replace with bit of state this component is interested in e.g. (newState && newState.distributions) ? newState.distributions : undefined;\n return newState && newState.taxInformation ? Object.assign({}, newState.taxInformation) : null;\n }\n\n /**\n * Called when the state changes.\n */\n update() {\n this.logger.debug('updating');\n try {\n this.label = this.state.label;\n\n // set up derived data\n if (this.state.data !== undefined) {\n this.populated = true;\n }\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","/**\n * Created by jslade on 27/03/2017.\n */\nimport {LogManager} from 'aurelia-framework';\n\nconst logger = LogManager.getLogger('performance-cumulative');\n\nexport function dateDropdownReducer(state, action) {\n switch (action.type) {\n case 'SET_HISTORICAL_DATE':\n logger.debug('Reducing: SET_HISTORICAL_DATE', action);\n let newState = Object.assign({}, state);\n if (!newState.app) newState.app = {};\n if (!newState.app.historical) newState.app.historical = {};\n if (!newState.app.historical.performance) newState.app.historical.performance = {};\n Object.assign(newState.app.historical.performance, {selectedYear: action.year});\n Object.assign(newState.app.historical.performance, {selectedMonth: action.month});\n return newState;\n default:\n return state;\n }\n}\n","import get from 'lodash/get';\nimport merge from 'lodash/merge';\n /* Reducer for assetClassExposure\n * Takes json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\n// import {LogManager} from 'aurelia-framework';\n// const logger = LogManager.getLogger('modal');\n\nexport function modalReducer(state, action) {\n switch (action.type) {\n case 'LOAD_LABELS_SUCCESS':\n let [labelData] = action.json;\n let beanLabelData = get(labelData, 'labels');\n let ok = get(beanLabelData, 'ok-label');\n let title = get(beanLabelData, 'external-link-title');\n let content = get(beanLabelData, 'external-link-content');\n\n return merge({}, state, {\n app: {\n externalModalLabels: {\n title,\n content,\n ok\n }\n }\n });\n case 'OPEN_MODAL':\n return merge({}, state, {\n app: {\n modal: {\n open: true,\n title: action.title || false,\n contents: action.contents || false,\n close: action.close || 'close',\n header: action.header || false,\n footer: action.footer || false,\n image: action.image || false\n }\n }\n });\n case 'CLOSE_MODAL':\n\n return merge({}, state, {\n app: {\n modal: {\n open: false\n }\n }\n });\n default:\n return state;\n }\n}\n","/**\n * App State Reducer for modalInlineReducer\n * Takes application state data and creates model for components\n * rmclaughlin 25/05/17\n */\n\nimport get from 'lodash/get';\nimport merge from 'lodash/merge';\n//import {LogManager} from 'aurelia-framework';\n//const logger = LogManager.getLogger('ft-multi-select-bar');\n\nexport function modalInlineReducer(state, action) {\n switch (action.type) {\n case 'LOAD_LABELS_SUCCESS':\n let [data] = action.json;\n let beanData = get(data, 'labels');\n\n let editSelectedDocumentsText = get(beanData, 'edit-selected-documents-text');\n let emailSelectedDocumentsText = get(beanData, 'email-selected-documents-text');\n let downloadSelectedDocumentsText = get(beanData, 'download-selected-documents-text');\n let fromNameText = get(beanData, 'from-name-text');\n let removeRecipientText = get(beanData, 'remove-recipient-text');\n let recipientNameText = get(beanData, 'recipient-name-text');\n let recipientEmailText = get(beanData, 'recipient-email-text');\n let addRecipientText = get(beanData, 'add-recipient-text');\n let messageLabel = get(beanData, 'message-label');\n let yourDocumentsSentText = get(beanData, 'your-documents-sent-text');\n let backLabel = get(beanData, 'back-label');\n let continueLabel = get(beanData, 'continue-label');\n let sendLink = get(beanData, 'send-link');\n let downloadLink = get(beanData, 'download-link');\n\n return merge({}, state, {\n app: {\n modalInlineLabels: {\n editSelectedDocumentsText: editSelectedDocumentsText,\n emailSelectedDocumentsText: emailSelectedDocumentsText,\n downloadSelectedDocumentsText: downloadSelectedDocumentsText,\n fromNameText: fromNameText,\n removeRecipientText: removeRecipientText,\n recipientNameText: recipientNameText,\n recipientEmailText: recipientEmailText,\n addRecipientText: addRecipientText,\n messageLabel: messageLabel,\n yourDocumentsSentText: yourDocumentsSentText,\n backLabel: backLabel,\n continueLabel: continueLabel,\n sendLink: sendLink,\n downloadLink: downloadLink\n }\n }\n });\n default:\n return state;\n }\n}\n\n","\nexport function shareClassFilterReducer(state, action) {\n switch (action.type) {\n case 'CHANGE_SHARE_CLASS':\n let newState = Object.assign({}, state);\n Object.assign(newState.app, { currentFundId: action.fundId});\n Object.assign(newState.app, { currentShareClass: action.shareClass});\n return newState;\n default:\n return state;\n }\n}\n","/**\r\n * ft-gateway.js\r\n * Created by lmcmill on 05/04/2017.\r\n */\r\nimport { bindable, LogManager, inject } from 'aurelia-framework';\r\nimport { HttpClient } from 'aurelia-fetch-client';\r\n\r\nconst logger = LogManager.getLogger('ft-gateway');\r\n\r\n@inject(HttpClient, Element)\r\nexport class FtGateway {\r\n\r\n // Routes\r\n @bindable autoLaunch;\r\n @bindable autoSubmit;\r\n // Inputs\r\n @bindable username;\r\n @bindable password;\r\n @bindable authorizeUrl;\r\n @bindable selectedSegment;\r\n @bindable selectedSegmentLabel;\r\n @bindable termsAgreed;\r\n @bindable loginRequired;\r\n @bindable termsRequired;\r\n @bindable validForm;\r\n // Error flags\r\n @bindable usernameEmptyError;\r\n @bindable passwordEmptyError;\r\n @bindable termsAgreedError;\r\n @bindable loginError;\r\n\r\n constructor(httpClient, element) {\r\n this.httpClient = httpClient;\r\n this.element = element;\r\n // Boolean values\r\n this.validForm = true;\r\n // Login Credentials\r\n this.username = '';\r\n this.password = '';\r\n }\r\n\r\n /**\r\n * Called when attached to the DOM.\r\n */\r\n attached() {\r\n logger.debug('ft-gateway attached');\r\n\r\n // JQuery selector to fix late load\r\n $('[data-fti-module=\"role-selector\"], .selector-role, [data-fti-component=\"role-selector\"]').css('pointer-events', 'auto');\r\n\r\n // JQuery objects\r\n let gateway = $(this.gateway);\r\n this.form = $(this.gateway).find('form');\r\n\r\n // Handle Show modal Event\r\n gateway.on('show.bs.modal', (event) => this.showModalEvent(event));\r\n // check for auto-launch (JQuery Listener)\r\n if (this.autoLaunch) {\r\n this.showModal();\r\n }\r\n }\r\n\r\n /**\r\n * Show the Bootstrap Modal\r\n */\r\n showModal() {\r\n logger.debug('show Bootstrap Modal');\r\n let gateway = $(this.gateway);\r\n gateway.find('.modal').modal('toggle');\r\n }\r\n\r\n /**\r\n * Handles Bootstraps show.bs.modal event\r\n * @param {*} event\r\n */\r\n showModalEvent(event) {\r\n logger.debug('show Modal Event fired');\r\n // Read data attributes from the anchor that launched the modal else go with default values\r\n if (event.relatedTarget) {\r\n let element = $(event.relatedTarget);\r\n this.updateValues(element);\r\n }\r\n if (this.autoSubmit) {\r\n // Do not launch modal - instead submit the form\r\n this.form.find('input[name=\"selectedSegment\"]').val(this.selectedSegment);\r\n this.form.submit();\r\n event.preventDefault();\r\n } else {\r\n this.updateModal(this.selectedSegment);\r\n }\r\n }\r\n\r\n\r\n /**\r\n * Update bootstrap modal/tabs programmatically\r\n */\r\n updateModal(segment) {\r\n logger.debug('updateModal called: ' + segment);\r\n $(this.gateway).find('.nav-tabs-top-gateway a[href=\"#' + segment + '\"]').click();\r\n }\r\n\r\n /**\r\n * Called when the continue button is clicked.\r\n */\r\n submitForm() {\r\n logger.debug('submit form called');\r\n this.clearErrorFlags();\r\n this.validForm = this.validateForm();\r\n let validCredentials = true;\r\n\r\n if (this.validForm) {\r\n if (this.loginRequired) {\r\n // Post data to authorize page\r\n this.httpClient.fetch(this.authorizeUrl, {\r\n method: 'POST',\r\n body: 'selectedSegment=' + this.selectedSegment + '&username=' + this.username + '&password=' + this.password,\r\n headers: { 'Content-Type': 'application/x-www-form-urlencoded' }\r\n }).then(response => response.json())\r\n .then(data => {\r\n validCredentials = data.success;\r\n if (validCredentials) {\r\n this.form.submit();\r\n } else {\r\n // show incorrect credentials msg\r\n logger.debug('auth failed');\r\n this.usernameEmptyError = true;\r\n this.passwordEmptyError = true;\r\n this.loginError = true;\r\n }\r\n });\r\n } else {\r\n logger.debug(this.form);\r\n this.form.submit();\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Validate the mandatory fields and display errors where appropriate\r\n */\r\n validateForm() {\r\n logger.debug('validateForm called');\r\n let bValid = true;\r\n if (this.loginRequired) {\r\n // show error on missing fields\r\n if (this.username === '') {\r\n bValid = false;\r\n this.usernameEmptyError = true;\r\n }\r\n if (this.password === '') {\r\n bValid = false;\r\n this.passwordEmptyError = true;\r\n }\r\n if (this.termsRequired) {\r\n if (!this.termsAgreed) {\r\n bValid = false;\r\n this.termsAgreedError = true;\r\n }\r\n }\r\n } else {\r\n if (this.termsRequired) {\r\n if (!this.termsAgreed) {\r\n bValid = false; this.termsAgreedError = true;\r\n }\r\n }\r\n }\r\n return bValid;\r\n }\r\n\r\n /**\r\n * Simply sets the segment and submits the form\r\n */\r\n setSegment(id) {\r\n this.resetValues();\r\n this.selectedSegment = id;\r\n this.form.find('input[name=\"selectedSegment\"]').val(id);\r\n this.submitForm();\r\n }\r\n\r\n /**\r\n * Called when a tab is changed\r\n * @param {*} id\r\n */\r\n tabChanged(label, id, loginRequired, termsRequired) {\r\n logger.debug('tabChanged called');\r\n this.resetValues();\r\n this.selectedSegmentLabel = label;\r\n this.selectedSegment = id;\r\n this.loginRequired = loginRequired;\r\n this.termsRequired = termsRequired;\r\n }\r\n\r\n /**\r\n * Update this component variables.\r\n * @param {*} element\r\n */\r\n updateValues(element) {\r\n logger.debug('updateValues called');\r\n // Assign the attributes to our binded variables\r\n this.autoSubmit = element.attr('data-auto-submit');\r\n this.selectedSegment = element.attr('data-selected-segment');\r\n this.selectedSegmentLabel = element.attr('data-segment-label');\r\n this.termsRequired = element.attr('data-terms-required');\r\n this.loginRequired = element.attr('data-login-required');\r\n\r\n logger.debug('this.selectedSegment = ' + this.selectedSegment);\r\n logger.debug('this.loginRequired = ' + this.loginRequired);\r\n logger.debug('this.termsAgreed = ' + this.termsAgreed);\r\n logger.debug('this.termsRequired = ' + this.termsRequired);\r\n }\r\n\r\n\r\n /**\r\n * Reset the form values\r\n */\r\n resetValues() {\r\n logger.debug('resetValues called');\r\n // Control Values - These define the behaviour for each segment\r\n this.loginRequired = false;\r\n this.termsRequired = false;\r\n // Form Values\r\n this.username = '';\r\n this.password = '';\r\n this.selectedSegment = '';\r\n this.termsAgreed = false;\r\n this.usernameEmptyError = false;\r\n this.passwordEmptyError = false;\r\n this.termsAgreedError = false;\r\n }\r\n\r\n\r\n /**\r\n * Clear error flags before validation\r\n */\r\n clearErrorFlags() {\r\n logger.debug('clearErrorFlags called');\r\n this.usernameEmptyError = false;\r\n this.passwordEmptyError = false;\r\n this.termsAgreedError = false;\r\n this.loginError = false;\r\n }\r\n\r\n}\r\n","/**\n * Created by bstjohn on 18/01/2017.\n */\nimport {bindable, inject, BindingEngine} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../../lib/redux-component-base';\n\nimport {LogManager} from 'aurelia-framework';\nconst logger = LogManager.getLogger('archive 3');\n// import {FtTypeAheadSearch} from '../ft-type-ahead-search/ft-type-ahead-search';\n@inject('Store', Element)\n@inject(BindingEngine)\nexport class FtMultiSelectBar extends ReduxComponentBase {\n @bindable multiselect;\n @bindable selected;\n @bindable selectedLength;\n @bindable onSelected;\n @bindable marketingLabels;\n\n constructor(store, element) {\n super(store);\n this.newEmail = {\n name: '',\n email: ''\n };\n\n this.form = {\n toEmails: [this.newEmail]\n };\n // No need to dispatch as marketing labels should already be available, through config\n this.marketingLabels = store.getState().marketing.ftMultiSelectBar;\n }\n\n mapState(newState) {\n try {\n this.marketingLabels = newState.marketing.ftMultiSelectBar;\n } catch (e) {\n //logger.error(e);\n }\n }\n\n attached() {\n }\n\n addEmail() {\n this.form.toEmails.push(this.newEmail);\n }\n removeEmail(i) {\n logger.debug(i);\n this.form.toEmails.splice(i, 1);\n }\n\n toggle(document) {\n if (document.selected) {\n document.selected = false;\n } else {\n document.selected = true;\n }\n if (typeof this.onSelected === 'function') {\n this.onSelected();\n }\n }\n\n openModel = (type) => {\n this.marketingInlineLabels = this.modal.marketingLabels;\n this.modal.openModal();\n this.type = type;\n if (type === 'edit') { this.modalTitle = this.marketingInlineLabels.editSelectedDocumentsText; this.stage = 'edit'; }\n if (type === 'email') { this.modalTitle = this.marketingInlineLabels.emailSelectedDocumentsText; this.stage = 'edit'; }\n if (type === 'download') { this.modalTitle = this.marketingInlineLabels.downloadSelectedDocumentsText; this.stage = 'edit'; }\n }\n\n send() {\n let hasError = false;\n\n if (!this.form.from) {\n this.form.from_error = 'From name is required';\n hasError = true;\n }\n\n if (!hasError) {\n this.form.documents = this.selected;\n this.stage = 'send';\n }\n }\n\n download() {\n logger.debug(this.selected);\n this.modal.closeModal();\n }\n}\n","/**\n * Created by bstjohn on 18/01/2017.\n */\nimport {bindable, inject} from 'aurelia-framework';\n// import { LogManager } from 'aurelia-framework';\n// const logger = LogManager.getLogger('doc-lister');\n\n@inject(Element)\nexport class FtResponsiveTableFlowDocument {\n @bindable document;\n\n constructor() {\n }\n\n attached() {\n }\n\n}\n","/**\n * Created by bstjohn on 18/01/2017.\n */\nimport {bindable, inject} from 'aurelia-framework';\n// import { LogManager } from 'aurelia-framework';\n// const logger = LogManager.getLogger('doc-lister');\n\n@inject(Element)\nexport class FtResponsiveTable {\n @bindable data;\n @bindable multiselect;\n @bindable onSelected;\n\n constructor() {\n }\n\n attached() {\n }\n\n toggle(document) {\n if (document.selected) {\n document.selected = false;\n } else {\n document.selected = true;\n }\n if (typeof this.onSelected === 'function') {\n this.onSelected();\n }\n }\n}\n","/**\n * Created by bstjohn on 18/01/2017.\n */\nimport {bindable, inject, BindingEngine} from 'aurelia-framework';\nimport { LogManager } from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../../lib/redux-component-base';\nconst logger = LogManager.getLogger('type-ahead');\n\n@inject('Store', 'Beans', Element)\n@inject(BindingEngine)\nexport class FtTypeAheadSearch extends ReduxComponentBase {\n @bindable marketingLabels\n @bindable data;\n @bindable onSelected;\n\n constructor(store, beans, element) {\n super(store);\n this.element = element;\n this.showTypeAhead = false;\n\n // No need to dispatch as marketing labels should already be available, through config\n this.marketingLabels = store.getState().marketing.ftTypeAheadSearch;\n }\n\n attached() {\n }\n\n focus() {\n this.showTypeAhead = true;\n logger.debug('showTypeAhead');\n }\n select(item) {\n this.showTypeAhead = false;\n this.query = item.label;\n this.selected = item;\n\n if (typeof this.onSelected === 'function') {\n this.onSelected(item);\n }\n }\n\n}\n","/**\n * App State Reducer for gridFilter\n * Takes application state data and creates model for components\n */\nimport flatten from 'lodash/flatten';\nimport get from 'lodash/get';\nimport has from 'lodash/has';\nimport intersectionWith from 'lodash/intersectionWith';\nimport isEqual from 'lodash/isEqual';\nimport merge from 'lodash/merge';\nimport uniqBy from 'lodash/uniqBy';\nimport clone from 'lodash/clone';\nimport moment from 'moment';\n// import {LogManager} from 'aurelia-framework';\n// const logger = LogManager.getLogger('grid-filter');\n\nexport function gridFilter(state = {}, action) {\n let newState;\n switch (action.type) {\n case 'LOAD_LABELS_SUCCESS':\n let [labelData] = action.json;\n let beanLabelData = get(labelData, 'labels');\n\n let loadMoreLink = get(beanLabelData, 'load-more-link');\n let displayLabel = get(beanLabelData, 'display-label');\n let gridLabel = get(beanLabelData, 'grid-label');\n let listLabel = get(beanLabelData, 'list-label');\n\n return Object.assign({}, state, {\n gridFilter: {\n loadMoreLink: loadMoreLink,\n displayLabel: displayLabel,\n gridLabel: gridLabel,\n listLabel: listLabel\n }\n });\n case 'POPULATE_GRID_FILTER':\n newState = Object.assign({}, state);\n let cid = action.cid;\n newState.app.grid.grids[cid] = Object.assign({}, newState.app.grid.defaults);\n\n //augment config data\n let newConfig = action.data.configData;\n\n\n if (newConfig.cardsPerPage && typeof newConfig.cardsPerPage === 'number') {\n newState.app.grid.grids[cid].cardsPerPage = newConfig.cardsPerPage;\n }\n if (newConfig.currentView) {\n newState.app.grid.grids[cid].currentView = newConfig.currentView === 'TABLE' ? 'TABLE' : 'GRID';\n }\n if (typeof newConfig.showViewToggle === 'boolean') {\n newState.app.grid.grids[cid].showViewToggle = newConfig.showViewToggle;\n }\n\n let gridFilters = clone(newState.app.grid.grids[cid].filters);\n let gridColumns = clone(newState.app.grid.grids[cid].columns);\n\n newState.app.grid.grids[cid].filters = merge(gridFilters, newConfig.filters);\n newState.app.grid.grids[cid].columns = merge(gridColumns, newConfig.columns);\n\n // add cards\n let cards = action.data.cardData;\n Object.assign(newState.app.grid.grids[cid], {cards});\n newState.app.grid.grids[cid].numVisibleCards = Math.min(cards.length, newState.app.grid.grids[cid].cardsPerPage);\n\n // add dropdown options (already has the default ALL option)\n newState.app.grid.grids[cid].filters.forEach(filter => {\n // get options present in card data\n let optionsInData = [];\n if (filter.type === 'DROPDOWN') {\n optionsInData = cards.filter(card => has(card, `data.${filter.dataKey}`)).map(card => get(card, `data.${filter.dataKey}`).split('|')); // these are the options that actually exist on the cards\n optionsInData = flatten(optionsInData);\n // remove config options that don't have corresponding data on the cards\n filter.options = intersectionWith(filter.options, optionsInData, (configOpt, dataOpt) => {\n if (['ALL', '12_MONTHS'].includes(configOpt.value.toUpperCase())) return true;\n return configOpt.value === dataOpt;\n });\n }\n\n if (filter.type === 'YEAR_DROPDOWN') {\n optionsInData = cards\n .map(card => {\n return moment(get(card, `data.${filter.dataKey}`), filter.dateFormat).year();\n })\n .sort((a, b) => b - a)\n .map(year => ({label: year, value: year}));\n filter.options = uniqBy(filter.options.concat(optionsInData), 'value');\n }\n });\n return newState;\n case 'GRID_CHANGE_DROPDOWN':\n let currentFilter = state.app.grid.grids[action.cid].filters.find(d => d.name === action.name);\n if (currentFilter && !isEqual(currentFilter.selected, action.newValue)) {\n newState = Object.assign({}, state);\n newState.app.grid.grids[action.cid].filters.find(d => d.name === action.name).selected = action.newValue;\n return newState;\n }\n return state;\n case 'GRID_CHANGE_VIEW':\n let currentView = state.app.grid.grids[action.cid].currentView;\n if (currentView !== action.view) {\n newState = Object.assign({}, state);\n newState.app.grid.grids[action.cid].currentView = action.view;\n return newState;\n }\n return state;\n case 'GRID_LOAD_MORE':\n let numVisibleCards = state.app.grid.grids[action.cid].numVisibleCards;\n let totalCards = state.app.grid.grids[action.cid].cards.length;\n if (numVisibleCards < totalCards) {\n let cardsPerPage = state.app.grid.grids[action.cid].cardsPerPage;\n newState = Object.assign({}, state);\n newState.app.grid.grids[action.cid].numVisibleCards = Math.min(totalCards, (numVisibleCards + cardsPerPage));\n return newState;\n }\n return state;\n case 'GRID_CHANGE_SORT':\n let columns = state.app.grid.grids[action.cid].columns;\n let newSortColumn = columns.find(col => action.columnName === col.name);\n if (newSortColumn) {\n switch (newSortColumn.direction) {\n case 'ASC':\n newSortColumn.direction = 'DESC';\n break;\n case 'DESC':\n newSortColumn.direction = 'ASC';\n break;\n default:\n newSortColumn.direction = newSortColumn.isNumeric ? 'DESC' : 'ASC';\n }\n columns.forEach(col => {\n if (col.name !== action.columnName) {\n col.direction = null;\n }\n });\n newState = Object.assign({}, state);\n Object.assign(newState.app.grid.grids[action.cid], {columns});\n return newState;\n }\n return state;\n default:\n return state;\n }\n}\n","/**\n * App State Reducer for gridFilter\n * Takes application state data and creates model for components\n */\nimport get from 'lodash/get';\n// import {LogManager} from 'aurelia-framework';\n// const logger = LogManager.getLogger('grid-filter');\n\nexport function gridFilterForm(state = {}, action) {\n switch (action.type) {\n case 'LOAD_LABELS_SUCCESS':\n let [labelData] = action.json;\n let beanLabelData = get(labelData, 'labels');\n\n let displayLabel = get(beanLabelData, 'display-label');\n let gridLabel = get(beanLabelData, 'grid-label');\n let listLabel = get(beanLabelData, 'list-label');\n\n return Object.assign({}, state, {\n gridFilterForm: {\n displayLabel: displayLabel,\n gridLabel: gridLabel,\n listLabel: listLabel\n }\n });\n default:\n return state;\n }\n}\n","import {inject, bindable} from 'aurelia-framework';\n//import {TopLevelProductComponentBase} from '../../lib/top-level-product-component-base';\nimport {ReduxComponentBase} from '../../../../../lib/redux-component-base';\nimport {getFundState} from '../../../lib/map-state-utils';\n\n@inject('Store', Element)\nexport class FtCaveats extends ReduxComponentBase {\n @bindable page;\n populated = false;\n\n constructor(store, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n }\n\n mapState(newState) {\n try {\n this.logger.debug('mapState');\n let fundState = getFundState(newState, this.fundId);\n\n this.impLegalInfo = fundState[this.page].caveats.impLegalInfo;\n this.displayLegalInfo = fundState[this.page].caveats.displayLegalInfo;\n this.elementLevelCaveats = newState.products.app[this.page].visibleElementLevelCaveats;\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","/**\n * Created by bstjohn on 02/11/2016.\n */\nimport {bindable, LogManager, inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../../lib/redux-component-base';\nconst logger = LogManager.getLogger('ft-footnote');\n\n@inject('Store', Element)\nexport class FtFootnote extends ReduxComponentBase {\n @bindable section;\n @bindable element;\n @bindable visibleElementLevel;\n @bindable page;\n @bindable fundId;\n\n footnotes = [];\n\n constructor(store, htmlElement) {\n // add logging and integration with the data store\n super(store);\n this.htmlElement = htmlElement;\n }\n\n /**\n * Called when state changes.\n */\n visibleElementLevelChanged() {\n try {\n this.footnotes = [];\n this.visibleElementLevel.forEach((v, k) => {\n if (v.secName === this.section && v.eleName === this.element) {\n this.footnotes.push({id: k, eleName: v.eleName, secName: v.secName, order: v.order});\n }\n });\n } catch (e) {\n // no footnotes in the state\n this.footnotes = [];\n }\n }\n\n attached() {\n if (this._isVisible(this.htmlElement)) {// TODO: the isVisible check should also be applied when browser size changes\n this.dispatch({\n type: 'REGISTER_FOOTNOTES',\n section: this.section,\n element: this.element,\n page: this.page,\n fundId: this.fundId\n });\n }\n }\n\n _isVisible(htmlEl) {\n return (htmlEl.offsetWidth > 0) || (htmlEl.offsetHeight > 0);\n }\n\n detached() {\n logger.debug('Footnote detached', this.footnotes);\n }\n}\n","/**\n * Created by mdonnel on 15/05/2017.\n */\n\nimport {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../../lib/redux-component-base';\n\n@inject('Store', 'Beans', Element)\nexport class FtLabels extends ReduxComponentBase {\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.beans = beans.component.labels;\n this.dispatch({\n type: 'LOAD_LABELS',\n beans: this.beans\n });\n }\n}\n","/**\n * Created by bstjohn on 01/11/2016.\n */\nimport {bindable, observable} from 'aurelia-framework';\n\nexport class FtProximal {\n @bindable section;\n @bindable @observable proximity;\n visibleProximity = [];\n\n cssClass = 'text-grey';\n\n sectionChanged() {\n this.updateVisibleProximity();\n }\n proximityChanged() {\n this.updateVisibleProximity();\n }\n\n updateVisibleProximity() {\n try {\n this.visibleProximity = this.proximity.filter(caveat => caveat.secName === this.section);\n } catch (e) {\n // no proximal caveats defined\n this.visibleProximity = [];\n }\n }\n}\n","/**\n * App State Reducer for historicalAverageAnnualTotalReturns\n * Takes application state data and creates model for components\n */\nimport {LogManager} from 'aurelia-framework';\n\nconst logger = LogManager.getLogger('historical-average-annual-total-returns');\n\nexport function historicalAverageAnnualTotalReturns(state, action) {\n switch (action.type) {\n case 'SOME_ACTION':\n logger.debug('Reducing: SOME_ACTION');\n\n return Object.assign({}, state, {\n historicalAverageAnnualTotalReturns: action.data\n });\n default:\n return state;\n }\n}\n","/**\n * App State Reducer for historicalCumulativeTotalReturns\n * Takes application state data and creates model for components\n */\nimport {LogManager} from 'aurelia-framework';\n\nconst logger = LogManager.getLogger('historical-cumulative-total-returns');\n\nexport function historicalCumulativeTotalReturns(state, action) {\n switch (action.type) {\n case 'SOME_ACTION':\n logger.debug('Reducing: SOME_ACTION');\n\n return Object.assign({}, state, {\n historicalCumulativeTotalReturns: action.data\n });\n default:\n return state;\n }\n}\n","/**\n * App State Reducer for afterTaxAverageAnnualReturns\n * Takes application state data and creates model for components\n */\nimport {LogManager} from 'aurelia-framework';\n\nconst logger = LogManager.getLogger('after-tax-average-annual-returns');\n\nexport function afterTaxAverageAnnualReturns(state, action) {\n switch (action.type) {\n case 'AFTER_TAX_CHANGE_TAB':\n logger.debug('Reducing: AFTER_TAX_CHANGE_TAB');\n let newState = Object.assign({}, state);\n if (!newState.app) newState.app = {};\n if (!newState.app.performance) newState.app.performance = {};\n if (!newState.app.performance.afterTaxAverageAnnualReturns) newState.app.performance.afterTaxAverageAnnualReturns = {};\n Object.assign(newState.app.performance.afterTaxAverageAnnualReturns, {currentTab: action.tab});\n return newState;\n default:\n return state;\n }\n}\n","/**\n * Reducer for averageAnnualTotalReturns\n * Takes json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\n\nconst logger = LogManager.getLogger('averageAnnualTotalReturns');\n\nexport function averageAnnualTotalReturns(state, action, products) {\n switch (action.type) {\n case 'AVERAGE_ANNUAL_TOTAL_RETURNS_CHANGE_TAB':\n logger.debug('Reducing: AVERAGE_ANNUAL_TOTAL_RETURNS_CHANGE_TAB');\n let newState = Object.assign({}, state);\n if (!newState.app) newState.app = {};\n if (!newState.app.performance) newState.app.performance = {};\n if (!newState.app.performance.averageAnnualTotalReturns) newState.app.performance.averageAnnualTotalReturns = {};\n Object.assign(newState.app.performance.averageAnnualTotalReturns, {currentTab: action.tab});\n return newState;\n default:\n return state;\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../../lib/redux-component-base';\nimport {getFundState} from '../../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtBacktestedPerformanceAnnualised extends ReduxComponentBase {\n populated = false;\n chartData = [];\n chartOptions = {};\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.performanceBeans = beans.component.backtestedPerformance;\n this.populateData();\n }\n\n populateData() {\n this.dispatch({\n type: 'POPULATE_BACKTESTED_PERFORMANCE_ANNUALISED',\n beans: this.performanceBeans, // beans set in configuration for site e.g. configuration/en-us-retail/beans.js\n fundId: this.fundId\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.logger.info('mapState()');\n let fundState = getFundState(newState, this.fundId);\n //this.fundClassName = fundState.performanceCumulative.fundClassName;\n this.label = newState.products.label;\n this.tableHeaders = fundState.backtestedPerformance.tableHeaders;\n this.navDate = fundState.backtestedPerformance.navDate;\n this.performances = fundState.backtestedPerformance.performances.tableData;\n this.asOfDate = fundState.backtestedPerformance.performances.tableData.rows[0].asOfDate;\n\n this.chartCategories = this.tableHeaders;\n this.chartItems = fundState.backtestedPerformance.performances.graphData;\n\n let chartItems = this.chartItems;\n let chartType = 'column';\n let aryChartData = [];\n for (let key of Object.keys(chartItems)) {\n let thisChartItem = {\n data: chartItems[key],\n type: chartType\n };\n aryChartData.push(thisChartItem);\n }\n this.chartData = aryChartData;\n //this.proximity = fundState.distributions.caveats.proximity;\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n //this.logger.error('errorer', e);\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../../lib/redux-component-base';\nimport {getFundState} from '../../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtBacktestedPerformanceCalendar extends ReduxComponentBase {\n populated = false;\n chartData = [];\n chartOptions = {};\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.performanceBeans = beans.component.backtestedPerformance;\n this.populateData();\n }\n\n populateData() {\n this.dispatch({\n type: 'POPULATE_BACKTESTED_PERFORMANCE_CALENDAR',\n beans: this.performanceBeans, // beans set in configuration for site e.g. configuration/en-us-retail/beans.js\n fundId: this.fundId\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.logger.info('mapState()');\n let fundState = getFundState(newState, this.fundId);\n //this.fundClassName = fundState.performanceCumulative.fundClassName;\n this.label = newState.products.label;\n this.tableHeaders = fundState.backtestedPerformance.tableHeaders;\n this.navDate = fundState.backtestedPerformance.navDate;\n this.performances = fundState.backtestedPerformance.performances.tableData;\n this.asOfDate = fundState.backtestedPerformance.performances.tableData.rows[0].asOfDate;\n\n this.chartCategories = this.tableHeaders;\n this.chartItems = fundState.backtestedPerformance.performances.graphData;\n\n let chartItems = this.chartItems;\n let chartType = 'column';\n let aryChartData = [];\n for (let key of Object.keys(chartItems)) {\n let thisChartItem = {\n data: chartItems[key],\n type: chartType\n };\n aryChartData.push(thisChartItem);\n }\n this.chartData = aryChartData;\n //this.proximity = fundState.distributions.caveats.proximity;\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n //this.logger.error('errorer', e);\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../../lib/redux-component-base';\nimport {getFundState} from '../../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtBacktestedPerformanceCumulative extends ReduxComponentBase {\n populated = false;\n chartData = [];\n chartOptions = {};\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.performanceBeans = beans.component.backtestedPerformance;\n this.populateData();\n }\n\n populateData() {\n this.dispatch({\n type: 'POPULATE_BACKTESTED_PERFORMANCE_CUMULATIVE',\n beans: this.performanceBeans, // beans set in configuration for site e.g. configuration/en-us-retail/beans.js\n fundId: this.fundId\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.logger.info('mapState()');\n let fundState = getFundState(newState, this.fundId);\n //this.fundClassName = fundState.performanceCumulative.fundClassName;\n // this.label = fundState.backtestedPerformance.label;\n this.label = newState.products.label;\n // this.tableHeaders = fundState.backtestedPerformance.tableHeaders;\n this.navDate = fundState.backtestedPerformance.navDate;\n this.performances = fundState.backtestedPerformance.performances.tableData;\n this.asOfDate = fundState.backtestedPerformance.performances.tableData.rows[0].asOfDate;\n\n /*this.chartCategories = this.tableHeaders;\n this.chartItems = fundState.backtestedPerformance.performances.graphData;\n\n let chartItems = this.chartItems;\n let chartType = 'column';\n let aryChartData = [];\n for (let key of Object.keys(chartItems)) {\n let thisChartItem = {\n data: chartItems[key],\n type: chartType\n };\n aryChartData.push(thisChartItem);\n }\n this.chartData = aryChartData;\n */ //this.proximity = fundState.distributions.caveats.proximity;\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n //this.logger.error('errorer', e);\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","import {inject, LogManager} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../../lib/redux-component-base';\nimport {getFundState} from '../../../lib/map-state-utils';\nconst logger = LogManager.getLogger('ft-calendar-year');\n\n@inject('Store', 'Beans', Element)\nexport class FtCalendarYearReturns extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.calendarYearBeans = beans.component.performanceSimply;\n this.taxYear = element.getAttribute('tax-year');\n // this.taxYear = 2016;\n\n // Caveats - fake\n // let caveatsArray = ['2', '5', '1', '4', '3'];\n // this.caveats = caveatsArray.sort();\n // logger.info('Caveats: ' + caveatsArray);\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_CALENDAR_YEAR_RETURNS',\n beans: this.calendarYearBeans, // beans set in configuration for site e.g. configuration/en-us-retail/beans.js\n fundId: this.fundId,\n taxYear: this.taxYear\n });\n }\n\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.logger.debug('mapState() - FtCalendarYearReturns');\n this.getChartColorStyle = 'chart-color';\n let fundState = getFundState(newState, this.fundId);\n this.data = fundState.calendarYearReturns.data;\n // this.label = fundState.calendarYearReturns.label;\n this.label = newState.products.label;\n this.componentHeading = this.label['component-heading'];\n this.readImportant = this.label['read-important'];\n this.proximity = fundState.calendarYearReturns.proximity;\n this.bmCalYearDetHeader = fundState.calendarYearReturns.bmCalYearDetHeader;\n this.fundAnnualReturnsVO = fundState.calendarYearReturns.fundAnnualReturnsVO;\n this.tableData = fundState.calendarYearReturns.tableDataReduced;\n this.caveats = fundState.calendarYearReturns.caveats;\n\n let chartCategories = [];\n let fundAnnualReturnsVORevSorted = fundState.calendarYearReturns.fundAnnualReturnsVORevSorted;\n for (let category of fundAnnualReturnsVORevSorted) {\n chartCategories.push(category.year);\n }\n logger.debug('chartCategories: ' + chartCategories);\n this.chartCategories = chartCategories;\n\n let chartData = fundState.calendarYearReturns.chartData;\n let chartItems = chartData;\n let chartType = 'column';\n let aryChartData = [];\n for (let key of Object.keys(chartItems)) {\n let thisChartItem = {\n data: chartItems[key],\n type: chartType\n };\n aryChartData.push(thisChartItem);\n }\n\n this.chartData = aryChartData;\n\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../../lib/redux-component-base';\nimport {getFundState} from '../../../lib/map-state-utils';\n\n// import {LogManager} from 'aurelia-framework';\n// const logger = LogManager.getLogger('ft-calendar-year');\n\n@inject('Store', 'Beans', Element)\nexport class FtCalendarYearReturns extends ReduxComponentBase {\n populated = false;\n currentTab = null;\n tabs = [\n {\n key: 'MONTH_END',\n labelKey: 'month-end',\n ariaControl: 'calendar-year-return-monthly-pane',\n isActive: false\n },\n {\n key: 'QUARTER_END',\n labelKey: 'quarter-end',\n ariaControl: 'calendar-year-total-return-quarterly-pane',\n isActive: false\n }\n ];\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.calendarYearBeans = beans.component.performanceSimply;\n this.taxYear = element.getAttribute('tax-year');\n // this.taxYear = 2016;\n\n // Caveats - fake\n // let caveatsArray = ['2', '5', '1', '4', '3'];\n // this.caveats = caveatsArray.sort();\n // logger.info('Caveats: ' + caveatsArray);\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_CALENDAR_YEAR_RETURNS',\n beans: this.calendarYearBeans, // beans set in configuration for site e.g. configuration/en-us-retail/beans.js\n fundId: this.fundId,\n taxYear: this.taxYear\n });\n\n // select default chart tab\n this.dispatch({\n type: 'CALENDAR_YEAR_RETURNS_CHANGE_TAB',\n tab: 'MONTH_END'\n });\n }\n changeTab(key) {\n this.dispatch({\n type: 'CALENDAR_YEAR_RETURNS_CHANGE_TAB',\n tab: key\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.logger.debug('mapState() - FtCalendarYearReturns');\n this.getChartColorStyle = 'chart-color';\n let fundState = getFundState(newState, this.fundId);\n\n this.currentTab = newState.products.app.performance.calendarYearReturns.currentTab;\n\n this.data = fundState.calendarYearReturns.data;\n // this.label = fundState.calendarYearReturns.label;\n this.label = newState.products.label;\n this.componentHeading = this.label['component-heading'];\n this.readImportant = this.label['read-important'];\n /*this.proximity = fundState.calendarYearReturns.proximity; */\n this.tableData = fundState.calendarYearReturns[this.currentTab].calData;\n this.dateGroup = fundState.calendarYearReturns[this.currentTab].dateGroup;\n /* this.caveats = fundState.calendarYearReturns.caveats; */\n\n this.chartCategories = this.tableData.years;\n\n let chartData = fundState.calendarYearReturns[this.currentTab].chartData;\n let chartItems = chartData;\n let chartType = 'column';\n let aryChartData = [];\n for (let key of Object.keys(chartItems)) {\n let thisChartItem = {\n data: chartItems[key],\n type: chartType\n };\n aryChartData.push(thisChartItem);\n }\n\n this.chartData = aryChartData;\n\n this.tabs = this.tabs.map(tab => {\n tab.value = this.label[tab.labelKey];\n tab.isActive = (tab.key === this.currentTab);\n return tab;\n });\n\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.logger.error(e);\n this.populated = false;\n }\n }\n}\n","/**\n * Reducer for averageAnnualTotalReturns\n * Takes json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\n\nconst logger = LogManager.getLogger('calendarYearReturns');\n\nexport function calendarYearReturns(state, action, products) {\n switch (action.type) {\n case 'CALENDAR_YEAR_RETURNS_CHANGE_TAB':\n logger.debug('Reducing: CALENDAR_YEAR_RETURNS_CHANGE_TAB');\n let newState = Object.assign({}, state);\n if (typeof get(newState, 'app.performance.calendarYearReturns') === 'undefined') {\n newState.app.performance.calendarYearReturns = {};\n }\n Object.assign(newState.app.performance.calendarYearReturns, {currentTab: action.tab});\n return newState;\n default:\n return state;\n }\n}\n","/**\n * Reducer for averageAnnualTotalReturns\n * Takes json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\n\nconst logger = LogManager.getLogger('discreteReturns');\n\nexport function discreteReturns(state, action, products) {\n switch (action.type) {\n case 'DISCRETE_RETURNS_CHANGE_TAB':\n logger.debug('Reducing: DISCRETE_RETURNS_CHANGE_TAB');\n let newState = Object.assign({}, state);\n if (!newState.app) newState.app = {};\n if (!newState.app.performance) newState.app.performance = {};\n if (!newState.app.performance.discreteReturns) newState.app.performance.discreteReturns = {};\n Object.assign(newState.app.performance.discreteReturns, {currentTab: action.tab});\n return newState;\n default:\n return state;\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../../lib/redux-component-base';\nimport {getFundState} from '../../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtPerformanceAnnualised extends ReduxComponentBase {\n populated = false;\n currentChunkyMonthyTab = null;\n\n chunkyMonthyTabs = [\n {\n key: 'MONTH_END',\n labelKey: 'month-end',\n ariaControl: 'performance-annualised-monthly-pane',\n isActive: false\n },\n {\n key: 'QUARTER_END',\n labelKey: 'quarter-end',\n ariaControl: 'performance-annualised-quarterly-pane',\n isActive: false\n }\n ];\n\n chartData = [];\n chartOptions = {};\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.performanceBeans = beans.component.performanceSimply;\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_PERFORMANCE_ANNUALISED',\n beans: this.performanceBeans, // beans set in configuration for site e.g. configuration/en-us-retail/beans.js\n fundId: this.fundId\n });\n\n // select default chart tab\n this.dispatch({\n type: 'PERFORMANCE_ANNUALISED_DEFAULT_STATE',\n chunky_tab: 'MONTH_END'\n });\n }\n\n changeChunkyMonthyTab(key) {\n this.logger.info('Disptaching PERFORMANCE_ANNUALISED_CHANGE_CHUNKY_MONTHY_TAB');\n this.dispatch({\n type: 'PERFORMANCE_ANNUALISED_CHANGE_CHUNKY_MONTHY_TAB',\n tab: key\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.logger.info('mapState()');\n let fundState = getFundState(newState, this.fundId);\n this.currentChunkyMonthyTab = newState.products.app.performance.performanceAnnualised.currentChunkyMonthyTab;\n //this.fundClassName = fundState.performanceCumulative.fundClassName;\n this.label = fundState.performanceAnnualised.label;\n this.tableHeaders = fundState.performanceAnnualised.tableHeaders;\n this.navDate = fundState.performanceAnnualised.navDate;\n this.performances = fundState.performanceAnnualised[this.currentChunkyMonthyTab].performances;\n\n this.chartCategories = this.tableHeaders;\n\n this.chartData = this.performances.graphData;\n\n let chartItems = this.chartData;\n let chartType = 'column';\n let aryChartData = [];\n for (let key of Object.keys(chartItems)) {\n let thisChartItem = {\n data: chartItems[key],\n type: chartType\n };\n aryChartData.push(thisChartItem);\n }\n\n this.chartData = aryChartData;\n\n this.chunkyMonthyTabs = this.chunkyMonthyTabs.map(tab => {\n tab.value = this.label[tab.labelKey];\n tab.isActive = (tab.key === this.currentChunkyMonthyTab);\n return tab;\n });\n\n //this.proximity = fundState.distributions.caveats.proximity;\n\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","/**\n * App State Reducer for performanceAnnualised\n * Takes application state data and creates model for components\n */\nimport {LogManager} from 'aurelia-framework';\n\nconst logger = LogManager.getLogger('performance-annualised');\n\nexport function performanceAnnualised(state, action, products) {\n let newState;\n switch (action.type) {\n case 'PERFORMANCE_ANNUALISED_CHANGE_YEAR_GROUP_TAB':\n logger.info('Reducing: PERFORMANCE_ANNUALISED_CHANGE_YEAR_GROUP_TAB');\n newState = Object.assign({}, state);\n if (!newState.app) newState.app = {};\n if (!newState.app.performance) newState.app.performance = {};\n if (!newState.app.performance.performanceAnnualised) newState.app.performance.performanceAnnualised = {};\n Object.assign(newState.app.performance.performanceAnnualised, {currentYearGroupTab: action.tab});\n return newState;\n case 'PERFORMANCE_ANNUALISED_CHANGE_CHUNKY_MONTHY_TAB':\n logger.info('Reducing: PERFORMANCE_ANNUALISED_CHANGE_CHUNKY_MONTHY_TAB');\n newState = Object.assign({}, state);\n if (!newState.app) newState.app = {};\n if (!newState.app.performance) newState.app.performance = {};\n if (!newState.app.performance.performanceAnnualised) newState.app.performance.performanceAnnualised = {};\n Object.assign(newState.app.performance.performanceAnnualised, {currentChunkyMonthyTab: action.tab});\n return newState;\n case 'PERFORMANCE_ANNUALISED_DEFAULT_STATE':\n logger.info('Reducing: PERFORMANCE_ANNUALISED_DEFAULT_STATE');\n newState = Object.assign({}, state);\n if (!newState.app) newState.app = {};\n if (!newState.app.performance) newState.app.performance = {};\n if (!newState.app.performance.performanceAnnualised) newState.app.performance.performanceAnnualised = {};\n Object.assign(newState.app.performance.performanceAnnualised, {\n currentChunkyMonthyTab: action.chunky_tab\n });\n return newState;\n default:\n return state;\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../../lib/redux-component-base';\nimport {getFundState} from '../../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtPerformanceCumulative extends ReduxComponentBase {\n populated = false;\n currentTab = null;\n tabs = [\n {\n key: 'PC_MONTH_END',\n labelKey: 'month-end',\n ariaControl: 'performance-cumulative-monthly-pane',\n isActive: false\n },\n {\n key: 'PC_QUARTER_END',\n labelKey: 'quarter-end',\n ariaControl: 'performance-cumulative-quarterly-pane',\n isActive: false\n }\n ];\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.performanceBeans = beans.component.performanceSimply;\n // this.taxYear = element.getAttribute('tax-year');\n this.taxYear = 2016;\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_PERFORMANCE_CUMULATIVE',\n beans: this.performanceBeans, // beans set in configuration for site e.g. configuration/en-us-retail/beans.js\n fundId: this.fundId,\n taxYear: this.taxYear\n });\n\n // select default chart tab\n this.dispatch({\n type: 'PERFORMANCE_CUMULATIVE_CHANGE_TAB',\n tab: 'PC_MONTH_END'\n });\n }\n\n changeTab(key) {\n this.dispatch({\n type: 'PERFORMANCE_CUMULATIVE_CHANGE_TAB',\n tab: key\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.logger.debug('mapState()');\n let fundState = getFundState(newState, this.fundId);\n this.currentTab = newState.products.app.performance.performanceCumulative.currentTab;\n this.label = fundState.performanceCumulative.label;\n this.caveats = fundState.performanceCumulative.caveats;\n this.data = fundState.performanceCumulative[this.currentTab];\n this.hypotheticals = fundState.performanceCumulative.hypotheticals;\n\n this.tabs = this.tabs.map(tab => {\n tab.value = this.label[tab.labelKey];\n tab.isActive = (tab.key === this.currentTab);\n return tab;\n });\n\n //this.proximity = fundState.distributions.caveats.proximity;\n\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","\nimport {bindable, useView, computedFrom, LogManager} from 'aurelia-framework';\nimport {FtChart} from '../../../../common/elements/ft-chart';\nimport merge from 'lodash/merge';\n\nconst logger = LogManager.getLogger('performance-cumulative-chart');\n\n@useView('../../../../common/elements/ft-chart.html')\nexport class FtPerformanceCumulativeChart extends FtChart {\n @bindable options;\n\n @bindable data = [];\n @bindable seriesName = 'NAV';\n @bindable navDecimal = 2;\n @bindable prefix = '$';\n @bindable graphNames = [];\n\n @computedFrom('data', 'seriesName', 'navDecimal', 'prefix', 'graphNames')\n get series() {\n let graphNames = this.graphNames;\n let chartSerieses = [];\n let chartIndex = 0;\n for (let thisSeries of this.data) {\n let thisObj = {\n id: chartIndex,\n name: graphNames[chartIndex],\n type: 'area',\n data: thisSeries,\n tooltip: {\n pointFormat: '{series.name}: <b>{point.y}</b><br/>',\n valueDecimals: this.navDecimal,\n valuePrefix: this.prefix\n }\n };\n chartIndex++;\n chartSerieses.push(thisObj);\n }\n return chartSerieses;\n }\n\n newChartOnUpdate = true;\n\n perfCumChartOptions = {\n xAxis: {\n type: 'datetime'\n },\n yAxis: {\n labels: {\n format: this.prefix + '{value:.2f}'\n },\n title: ''\n },\n legend: {\n enabled: true,\n layout: 'horizontal',\n verticalAlign: 'top'\n },\n plotOptions: {\n series: {\n fillOpacity: 0,\n marker: {\n enabled: false\n }\n }\n }\n };\n\n mergeOptions() {\n let newOpts = merge({}, this.defaultOptions, this.perfCumChartOptions, this.options);\n newOpts.yAxis.labels.format = this.prefix + '{value:.2f}';\n logger.info('newOpts', newOpts);\n return newOpts;\n }\n\n dataChanged() {\n this.updateChart();\n }\n\n seriesNameChanged() {\n this.updateChart();\n }\n\n navDecimalChanged() {\n this.updateChart();\n }\n\n prefixChanged() {\n this.updateChart();\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../../lib/redux-component-base';\nimport {getFundState} from '../../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtPerformanceCumulative extends ReduxComponentBase {\n populated = false;\n currentYearGroupTab = null;\n currentChunkyMonthyTab = null;\n\n yearGroupTabs = [\n {\n key: 'PC_1YR',\n chartYear: '1',\n labelKey: 'btn-1-yr',\n isActive: false\n },\n {\n key: 'PC_3YR',\n chartYear: '3',\n labelKey: 'btn-3-yr',\n isActive: false\n },\n {\n key: 'PC_5YR',\n chartYear: '5',\n labelKey: 'btn-5-yr',\n isActive: false\n },\n {\n key: 'PC_10YR',\n chartYear: '10',\n labelKey: 'btn-10-yr',\n isActive: false\n },\n {\n key: 'PC_15YR',\n chartYear: '15',\n labelKey: 'btn-15-yr',\n isActive: false\n },\n {\n key: 'PC_LIFE',\n chartYear: 'si',\n labelKey: 'life',\n isActive: false\n }\n ];\n\n chunkyMonthyTabs = [\n {\n key: 'MONTH_END',\n labelKey: 'month-end',\n ariaControl: 'cumulative-return-monthly-pane',\n isActive: false\n },\n {\n key: 'QUARTER_END',\n labelKey: 'quarter-end',\n ariaControl: 'cumulative-return-quarterly-pane',\n isActive: false\n }\n ];\n\n chartData = [];\n chartOptions = {};\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.performanceBeans = beans.component.performanceSimply;\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_PERFORMANCE_CUMULATIVE',\n beans: this.performanceBeans, // beans set in configuration for site e.g. configuration/en-us-retail/beans.js\n fundId: this.fundId\n });\n\n // select default chart tab\n this.dispatch({\n type: 'PERFORMANCE_CUMULATIVE_DEFAULT_STATE',\n chunky_tab: 'MONTH_END',\n year_tab: 'PC_1YR'\n });\n }\n\n changeChunkyMonthyTab(key) {\n this.logger.info('Disptaching PERFORMANCE_CUMULATIVE_CHANGE_CHUNKY_MONTHY_TAB');\n this.dispatch({\n type: 'PERFORMANCE_CUMULATIVE_CHANGE_CHUNKY_MONTHY_TAB',\n tab: key\n });\n }\n\n changeYearGroupTab(key) {\n this.logger.info('Disptaching PERFORMANCE_CUMULATIVE_CHANGE_YEAR_GROUP_TAB');\n this.dispatch({\n type: 'PERFORMANCE_CUMULATIVE_CHANGE_YEAR_GROUP_TAB',\n tab: key\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.logger.info('mapState()');\n let fundState = getFundState(newState, this.fundId);\n this.currentYearGroupTab = newState.products.app.performance.performanceCumulative.currentYearGroupTab;\n this.currentChunkyMonthyTab = newState.products.app.performance.performanceCumulative.currentChunkyMonthyTab;\n //this.fundClassName = fundState.performanceCumulative.fundClassName;\n // this.label = fundState.performanceCumulative.label;\n this.label = newState.products.label;\n this.tableHeaders = fundState.performanceCumulative.tableHeaders;\n this.navDate = fundState.performanceCumulative.navDate;\n this.chartData = fundState.performanceCumulative[this.currentChunkyMonthyTab][this.currentYearGroupTab];\n this.performances = fundState.performanceCumulative[this.currentChunkyMonthyTab].performances;\n //this.graphNames = fundState.performanceCumulative.graphNames;\n\n /*this.yearGroupTabs = this.yearGroupTabs.map(tab => {\n tab.value = this.label[tab.labelKey];\n tab.isActive = (tab.key === this.currentYearGroupTab);\n return tab;\n }); */\n\n this.chunkyMonthyTabs = this.chunkyMonthyTabs.map(tab => {\n tab.value = this.label[tab.labelKey];\n tab.isActive = (tab.key === this.currentChunkyMonthyTab);\n return tab;\n });\n\n //this.proximity = fundState.distributions.caveats.proximity;\n\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n //this.logger.error('errorer', e);\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","/**\n * App State Reducer for performanceCumulative\n * Takes application state data and creates model for components\n */\nimport {LogManager} from 'aurelia-framework';\n\nconst logger = LogManager.getLogger('performance-cumulative');\n\nexport function performanceCumulative(state, action, products) {\n let newState;\n switch (action.type) {\n case 'PERFORMANCE_CUMULATIVE_CHANGE_YEAR_GROUP_TAB':\n logger.info('Reducing: PERFORMANCE_CUMULATIVE_CHANGE_YEAR_GROUP_TAB');\n newState = Object.assign({}, state);\n if (!newState.app) newState.app = {};\n if (!newState.app.performance) newState.app.performance = {};\n if (!newState.app.performance.performanceCumulative) newState.app.performance.performanceCumulative = {};\n Object.assign(newState.app.performance.performanceCumulative, {currentYearGroupTab: action.tab});\n return newState;\n case 'PERFORMANCE_CUMULATIVE_CHANGE_CHUNKY_MONTHY_TAB':\n logger.info('Reducing: PERFORMANCE_CUMULATIVE_CHANGE_CHUNKY_MONTHY_TAB');\n newState = Object.assign({}, state);\n if (!newState.app) newState.app = {};\n if (!newState.app.performance) newState.app.performance = {};\n if (!newState.app.performance.performanceCumulative) newState.app.performance.performanceCumulative = {};\n Object.assign(newState.app.performance.performanceCumulative, {currentChunkyMonthyTab: action.tab});\n return newState;\n case 'PERFORMANCE_CUMULATIVE_DEFAULT_STATE':\n logger.info('Reducing: PERFORMANCE_CUMULATIVE_DEFAULT_STATE');\n newState = Object.assign({}, state);\n if (!newState.app) newState.app = {};\n if (!newState.app.performance) newState.app.performance = {};\n if (!newState.app.performance.performanceCumulative) newState.app.performance.performanceCumulative = {};\n Object.assign(newState.app.performance.performanceCumulative, {\n currentChunkyMonthyTab: action.chunky_tab,\n currentYearGroupTab: action.year_tab\n });\n return newState;\n default:\n return state;\n }\n}\n","import {LogManager} from 'aurelia-framework';\n// import get from 'lodash/get';\nconst logger = LogManager.getLogger('label-loader');\nimport {portfolioUtils} from '../../util/util';\n\nexport function configurationLoader(state, action) {\n switch (action.type) {\n case 'LOAD_PORTFOLIO_CONFIGURATION_SUCCESS':\n logger.debug('Reducing: LOAD_PORTFOLIO_CONFIGURATION');\n const [rawConfig] = action.json;\n const config = portfolioUtils.getETFConfig(rawConfig);\n return Object.assign({}, state, {\n config\n });\n default:\n return state;\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../../lib/redux-component-base';\nimport {getFundState} from '../../../lib/map-state-utils';\n\n\n@inject('Store', 'Beans', Element)\nexport class FtGeographicBreakdown extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.cid = element.getAttribute('cid');\n this.portfolioBeans = beans.component.geographicBreakdown;\n this.portfolioBeans.push(this.cid);\n this.showChart = (element.getAttribute('show-chart') === 'true') ? true : false;\n this.spanRow = (element.getAttribute('span-row') === 'true') ? true : false;\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_GEOGRAPHIC_BREAKDOWN',\n beans: this.portfolioBeans,\n fundId: this.fundId,\n cid: this.cid\n });\n }\n\n\n mapState(newState) {\n try {\n let fundState = getFundState(newState, this.fundId);\n\n this.label = fundState.geographicBreakdown.label;\n this.data = fundState.geographicBreakdown.data;\n this.caveats = fundState.geographicBreakdown.caveats;\n\n this.chartData = [{\n type: 'pie',\n data: fundState.geographicBreakdown.data.series\n }];\n\n this.populated = true;\n } catch (e) {\n // state not populated yet\n // this.logger.debug('mapState() error', e);\n this.populated = false;\n }\n }\n}\n","/**\n * App State Reducer for holdings\n * Takes application state data and creates model for components\n */\nimport {LogManager} from 'aurelia-framework';\n\nconst logger = LogManager.getLogger('holdings');\n\nexport function holdings(state, action) {\n let newState;\n switch (action.type) {\n case 'HOLDINGS_CHANGE_SORT':\n logger.debug('Reducing: HOLDINGS_CHANGE_SORT', action);\n let columns = state.app.holdings.sort.columns;\n let newSortColumn = columns.get(action.columnName);\n if (newSortColumn) {\n switch (newSortColumn.direction) {\n case 'ASC':\n newSortColumn.direction = 'DESC';\n break;\n case 'DESC':\n newSortColumn.direction = 'ASC';\n break;\n default:\n newSortColumn.direction = newSortColumn.isNumeric ? 'DESC' : 'ASC';\n }\n columns.forEach(function(value, key) {\n if (key !== action.columnName) {\n columns.set(key, Object.defineProperty(value, 'direction', {value: null, configurable: true}));\n }\n });\n newState = Object.assign({}, state);\n Object.assign(newState.app.holdings.sort, {columns});\n return newState;\n }\n return state;\n case 'HOLDINGS_CHANGE_PAGE':\n if (Number.isInteger(action.page)) {\n newState = Object.assign({}, state);\n newState.app.holdings.paging.currentPage = action.page;\n return newState;\n }\n return state;\n case 'HOLDINGS_CHANGE_SEARCH':\n if (action.searchString !== state.app.holdings.search.searchString) {\n newState = Object.assign({}, state);\n newState.app.holdings.search.searchString = action.searchString;\n // reset paging to first page\n newState.app.holdings.paging.currentPage = 1;\n return newState;\n }\n return state;\n default:\n return state;\n }\n}\n","import {inject} from 'aurelia-framework';\nimport {ReduxComponentBase} from '../../../../../lib/redux-component-base';\nimport {getFundState} from '../../../lib/map-state-utils';\n\n@inject('Store', 'Beans', Element)\nexport class FtPortfolioStatisticsAndPositions extends ReduxComponentBase {\n populated = false;\n\n constructor(store, beans, element) {\n // add logging and integration with the data store\n super(store);\n this.fundId = element.getAttribute('fund-id');\n this.cid = element.getAttribute('cid');\n this.portfolioBeans = beans.component.portfolioStatisticsAndPositions;\n this.portfolioBeans.push(this.cid);\n\n // This is a top level component so we need to initiate the population\n this.dispatch({\n type: 'POPULATE_PORTFOLIO_STATISTICS_AND_POSITIONS',\n beans: this.portfolioBeans,\n fundId: this.fundId,\n cid: this.cid\n });\n }\n\n /**\n * Called when the state changes.\n */\n mapState(newState) {\n try {\n this.logger.debug('mapState()');\n let fundState = getFundState(newState, this.fundId);\n\n this.label = fundState.portfolioStatisticsAndPositions.label;\n this.caveats = fundState.portfolioStatisticsAndPositions.caveats;\n this.data = fundState.portfolioStatisticsAndPositions.data;\n\n // portfolioStatisticsAndPositions\n // set component properties from state as appropriate\n //this.label = newState.products.distributions.label;\n //this.proximity = fundState.distributions.caveats.proximity;\n\n // if we get to here without erroring, data has been populated successfully\n this.populated = true;\n } catch (e) {\n // state not populated yet\n this.populated = false;\n }\n }\n}\n","/**\n * Created by mdonnel on 26/01/2017.\n */\nconst statisticsAndPositionsConfig = {\n 'Data': {\n 'Datum': {\n 'statisticsCol1': {\n '-ID': 'statisticsCol1',\n '-Name': 'statisticsCol1',\n '-Label': 'Statistics (Column 1)',\n '-Type': 'SelectMultiple',\n '-Changed': 'true',\n 'Option': [\n {\n 'Display': 'Avg Coupon', 'Value': 'AVG_COUPON'\n }, {\n 'Display': 'Avg Duration', 'Value': 'AVG_DURATION'\n }, {\n 'Display': 'Avg Maturity', 'Value': 'AVG_MATURITY'\n }, {\n 'Display': 'Gross Exposure', 'Value': 'GROSS_EXPOSURE'\n }, {\n 'Display': 'Long Exposure', 'Value': 'LONG_EXPOSURE'\n }, {\n '-Selected': 'true', '-Order': '1', 'Display': 'Net Assets Fund', 'Value': 'NET_ASSETS_FUND'\n }, {\n '-Selected': 'true', '-Order': '2', 'Display': 'Net Assets Share Class', 'Value': 'NET_ASSETS_SC'\n }, {\n 'Display': 'Net Exposure', 'Value': 'NET_EXPOSURE'\n }, {\n 'Display': 'P/B Ratio', 'Value': 'PBRATIO'\n }, {\n 'Display': 'P/E Ratio', 'Value': 'PERATIO'\n }, {\n 'Display': 'Short Exposure', 'Value': 'SHORT_EXPOSURE'\n }, {\n 'Display': 'Turn Over Rate', 'Value': 'TURN_OVER_RATE'\n }, {\n '-Selected': 'true', '-Order': '3', 'Display': 'Daily Liquid Assets', 'Value': 'DAILY_LIQUID_ASSETS'\n }, {\n '-Selected': 'true', '-Order': '4', 'Display': 'Weekly Liquid Assets', 'Value': 'WEEKLY_LIQUID_ASSETS'\n }\n ]\n },\n 'statisticsCol2': {\n '-ID': 'statisticsCol2',\n '-Name': 'statisticsCol2',\n '-Label': 'Statistics (Column 2)',\n '-Type': 'SelectMultiple',\n '-Changed': 'true',\n 'Option': [\n {\n '-Selected': 'true', '-Order': '1', 'Display': 'Avg Coupon', 'Value': 'AVG_COUPON'\n }, {\n '-Selected': 'true', '-Order': '2', 'Display': 'Avg Duration', 'Value': 'AVG_DURATION'\n }, {\n '-Selected': 'true', '-Order': '3', 'Display': 'Avg Maturity', 'Value': 'AVG_MATURITY'\n }, {\n '-Selected': 'true', '-Order': '4', 'Display': 'Gross Exposure', 'Value': 'GROSS_EXPOSURE'\n }, {\n '-Selected': 'true', '-Order': '5', 'Display': 'Long Exposure', 'Value': 'LONG_EXPOSURE'\n }, {\n 'Display': 'Net Assets Fund', 'Value': 'NET_ASSETS_FUND'\n }, {\n 'Display': 'Net Assets Share Class', 'Value': 'NET_ASSETS_SC'\n }, {\n '-Selected': 'true', '-Order': '6', 'Display': 'Net Exposure', 'Value': 'NET_EXPOSURE'\n }, {\n '-Selected': 'true', '-Order': '7', 'Display': 'P/B Ratio', 'Value': 'PBRATIO'\n }, {\n '-Selected': 'true', '-Order': '8', 'Display': 'P/E Ratio', 'Value': 'PERATIO'\n }, {\n '-Selected': 'true', '-Order': '9', 'Display': 'Short Exposure', 'Value': 'SHORT_EXPOSURE'\n }, {\n 'Display': 'Turn Over Rate', 'Value': 'TURN_OVER_RATE'\n }\n ]\n },\n 'showLabelsIfEmpty': {\n '-ID': 'showLabelsIfEmpty',\n '-Name': 'Show labels when there is no associated value (i.e., label + mdash)',\n '-Type': 'CheckboxGroup',\n 'Option': [\n {\n '-Selected': 'true', 'Display': 'Avg Coupon', 'Value': 'AVG_COUPON'\n }, {\n '-Selected': 'true', 'Display': 'Avg Duration', 'Value': 'AVG_DURATION'\n }, {\n '-Selected': 'true', 'Display': 'Avg Maturity', 'Value': 'AVG_MATURITY'\n }, {\n '-Selected': 'true', 'Display': 'Gross Exposure', 'Value': 'GROSS_EXPOSURE'\n }, {\n '-Selected': 'true', 'Display': 'Long Exposure', 'Value': 'LONG_EXPOSURE'\n }, {\n '-Selected': 'true', 'Display': 'Net Assets Fund', 'Value': 'NET_ASSETS_FUND'\n }, {\n '-Selected': 'true', 'Display': 'Net Assets Share Class', 'Value': 'NET_ASSETS_SC'\n }, {\n '-Selected': 'true', 'Display': 'Net Exposure', 'Value': 'NET_EXPOSURE'\n }, {\n '-Selected': 'true', 'Display': 'P/B Ratio', 'Value': 'PBRATIO'\n }, {\n '-Selected': 'true', 'Display': 'P/E Ratio', 'Value': 'PERATIO'\n }, {\n '-Selected': 'true', 'Display': 'Short Exposure', 'Value': 'SHORT_EXPOSURE'\n }, {\n '-Selected': 'true', 'Display': 'Turn Over Rate', 'Value': 'TURN_OVER_RATE'\n }\n ]\n }, 'positions': {\n '-ID': 'positions',\n '-Name': 'positions',\n '-Label': 'Positions',\n '-Type': 'SelectMultiple',\n '-Changed': 'true',\n 'Option': [\n {\n '-Selected': 'true', '-Order': '1', 'Display': 'Number of Bond Positions', 'Value': 'TNBP'\n }, {\n '-Selected': 'true', '-Order': '2', 'Display': 'Number of Convertible Positions', 'Value': 'TNCP'\n }, {\n '-Selected': 'true', '-Order': '3', 'Display': 'Number of Equity Positions', 'Value': 'TNEP'\n }, {\n '-Selected': 'true', '-Order': '4', 'Display': 'Number of Issuers', 'Value': 'TNI'\n }, {\n '-Selected': 'true', '-Order': '5', 'Display': 'Total Positions', 'Value': 'TNP'\n }\n ]\n }, 'detailedHoldingsPageUrl': {\n '-ID': 'detailedHoldingsPageUrl',\n '-Type': 'PageLink',\n '-Name': 'detailedHoldingsPageUrl',\n '-Label': \"Enter/Select 'Detailed Holdings Page' Link\",\n '-Changed': 'true',\n '#cdata-section': '$PAGE_LINK[advisor/products/resources/portfolio-holdings]'\n }, 'portfolioHoldingsPdfUrl': {\n '-ID': 'portfolioHoldingsPdfUrl',\n '-Type': 'File',\n '-Name': 'portfolioHoldingsPdfUrl',\n '-Label': \"Enter/Select 'Portfolio Holdings PDF' Link\"\n }, 'historicalDataPageUrl': {\n '-ID': 'historicalDataPageUrl',\n '-Type': 'PageLink',\n '-Name': 'historicalDataPageUrl',\n '-Label': \"Enter/Select 'Historical Data Page' Link\",\n '-Changed': 'true',\n '#cdata-section': '$PAGE_LINK[advisor/products/mutual-funds/historical/historical-portfolio-daily-liq-asset]'\n }\n }, 'External': {\n 'Parameters': {\n 'Datum': {\n 'BeanID': {\n '-ID': 'BeanID',\n '-Name': 'BeanID',\n '-Label': 'Select Component Type',\n '-Type': 'String',\n '-Exposed': 'false',\n '#text': 'us.portfolio-statistics-and-positions'\n }, 'FundID': {\n '-ID': 'FundID', '-Name': 'FundID', '-Label': 'Fund Number', '-Type': 'String', '-Exposed': 'false'\n }, 'dataServiceActor': {\n '-ID': 'dataServiceActor', '-Name': 'dataServiceActor', '-Type': 'String', '-Exposed': 'false'\n }, 'userRole': {\n '-ID': 'userRole', '-Name': 'userRole', '-Type': 'String', '-Exposed': 'false'\n }, 'debug': {\n '-ID': 'debug', '-Name': 'debug', '-Type': 'String', '-Exposed': 'false'\n }\n }\n }, 'Object': {\n '-Scope': 'application', '#text': 'com.frk.livesite.core.external.SingletonProviderExternal'\n }, 'Method': 'execute'\n }\n }\n};\nexport {statisticsAndPositionsConfig as default};\n","/**\n * Reducer for statisticsAndPositions\n * Takes json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\n//import statisticsAndPositionsConfig from 'components/products/portfolio/ft-statistics-and-positions/lib/statistics-and-positions.config';\nimport statisticsAndPositionsConfig from './statistics-and-positions.config';\nimport get from 'lodash/get';\nimport findIndex from 'lodash/findIndex';\n\nconst logger = LogManager.getLogger('statistics-and-positions');\n\nexport function statisticsAndPositions(state, action, products) {\n switch (action.type) {\n case 'POPULATE_PORTFOLIO_STATPOSITIONS_INFORMATION_SUCCESS':\n logger.debug('Reducing: POPULATE_PORTFOLIO_STATPOSITIONS_INFORMATION_SUCCESS');\n\n let statPositionsData = _populateStatPositions(action);\n let caveats = _portfolioStatsCaveatsBuilder(action);\n let labels = _portfolioStatsCaveatsLabels(action);\n\n return Object.assign({}, state, {\n portfolioStatPos: {\n data: statPositionsData,\n label: labels,\n caveats: caveats\n }\n });\n default:\n return state;\n }\n}\n\nfunction _showLabelsIfEmpty(json, id) {\n let index = findIndex( json, {'Value': id} );\n let rObj = false;\n if (index !== -1) {\n rObj = get(json[index], '-Selected');\n }\n return rObj;\n}\n\nfunction _getRawStat(json, id) {\n let index = findIndex( json, {'type': id} );\n let rObj;\n if (index !== -1) {\n rObj = json[index];\n }\n return rObj;\n}\n\nfunction _getStat(json, id, field) {\n const obj = _getRawStat(json, id);\n let rStr = '';\n let wantedVal = get(obj, 'val.'.concat(field));\n if (wantedVal !== undefined) {\n rStr = typeof wantedVal === 'object' ? '' : wantedVal;\n }\n return rStr;\n}\n\nfunction _buildStatistics(data) {\n let workObj = [];\n // Only add selected objects.\n for (let item of data.Option) {\n if (get(item, '-Selected') === 'true') {\n workObj.push(item);\n }\n }\n return workObj;\n}\n/**\n * Replaces the log in the template statistics-element\n * @param rawData\n * @param labelData\n * @param stats\n * @returns {Array}\n * @private\n */\nfunction _processStatistics(rawData, labelData, stats) {\n const table = {\n 'AVG_COUPON': {\n label: 'average-coupon-rate',\n footnote: 'Average Coupon Rate',\n check: 'alt',\n showExtra: false,\n showPercent: true\n },\n 'AVG_DURATION': {\n label: 'average-duration',\n footnote: 'Average Duration',\n check: 'alt',\n showExtra: false\n },\n 'AVG_MATURITY': {\n label: 'average-weighted-maturity',\n footnote: 'Average Weighted Maturity',\n check: 'val',\n showExtra: false\n },\n 'GROSS_EXPOSURE': {\n label: 'gross-exposure',\n footnote: 'Gross Exposure',\n check: 'alt',\n extra: 'exposure-total-gross',\n showExtra: true,\n showPercent: true\n },\n 'LONG_EXPOSURE': {\n label: 'long-exposure',\n footnote: 'Long Exposure',\n check: 'alt',\n extra: 'exposure-total-long',\n showExtra: true,\n showPercent: true\n },\n 'NET_ASSETS_FUND': {\n label: 'total-fund-assets',\n check: 'alt',\n millions: true,\n showExtra: false\n },\n 'NET_ASSETS_SC': {\n label: 'net-assets',\n footnote: 'Long Exposure',\n check: 'alt',\n millions: true,\n showExtra: false,\n showNetAssets: true\n },\n 'NET_EXPOSURE': {\n label: 'net-exposure',\n footnote: 'Net Exposure',\n check: 'alt',\n extra: 'exposure-total-net',\n showExtra: true,\n showPercent: true\n },\n 'PBRATIO': {\n label: 'PB-ratio',\n footnote: 'P/B ratio',\n check: 'alt',\n showExtra: false\n },\n 'PERATIO': {\n label: 'PE-ratio',\n footnote: 'P/E ratio',\n check: 'alt',\n showExtra: false\n },\n 'SHORT_EXPOSURE': {\n label: 'short-exposure',\n footnote: 'Short Exposure',\n check: 'alt',\n extra: 'exposure-total-short',\n showExtra: true,\n showPercent: true\n },\n 'TURN_OVER_RATE': {\n label: 'portfolio-turnover-rate',\n check: 'alt',\n showExtra: false\n },\n 'DAILY_LIQUID_ASSETS': {\n label: 'daily-liquid-asset',\n footnote: 'Daily Liquid Assets',\n check: 'alt',\n showExtra: false,\n showPercent: true\n },\n 'WEEKLY_LIQUID_ASSETS': {\n label: 'weekly-liquid-asset',\n footnote: 'Weekly Liquid Assets',\n check: 'alt',\n showExtra: false,\n showPercent: true\n }\n\n };\n\n let returnData = [];\n // Build up the table of usable display data.\n for (let item of rawData) {\n let stat = _getRawStat( stats, item.Value);\n let showLabel = _showLabelsIfEmpty(labelData, item.Value);\n\n // TODO md\n // This if also should have an OR.. but at the moment the showElement functionality is AWOL\n // or ( $showLabelsIfEmpty/Option[not(@Selected = 'true')]/Value[. = $statTypeAvgCoupon]\n // and frk:showElement($portfolio/stats[type = $statTypeAvgCoupon]/val/@alt)))\"\n\n if (typeof get(stat, 'val.val') !== 'undefined' && showLabel) {\n let workObj = Object.assign({}, table[item.Value]);\n workObj.val = get(stat, 'val.'.concat(workObj.check));\n workObj.date = get(stat, 'date.alt');\n returnData.push(workObj);\n }\n }\n\n return returnData;\n}\n\nfunction _populatePortfolioPositions( srcObj, idList) {\n const labels = {\n 'TNBP': 'bonds',\n 'TNCP': 'convertibles',\n 'TNEP': 'equity',\n 'TNI': 'issuers',\n 'TNP': 'total-positions'\n };\n let returnArray = [];\n for (let id of idList) {\n let workObj = Object.assign({}, _getRawStat(srcObj, id));\n workObj.show = (get(workObj, 'val.val') !== undefined);\n workObj.label = get(labels, id);\n returnArray.push(workObj);\n }\n\n return returnArray;\n}\n\n\nfunction _populateStatPositions(action) {\n // ['us.portfolio', 'us.fund-overview', 'us.fund-config-data', 'us.fund-info', 'usefulstuff-provider']\n const statTypes = {\n fundCategoryAlternative: 'Alternative',\n fundCategoryMoneyFunds: 'Money Funds'\n };\n\n let [ rawPortfolio, rawFundOverview, , rawFundInfo ] = action.json;\n const portfolio = get(rawPortfolio, 'productsVO.portfolioVO');\n const fundInfo = get(rawFundInfo, 'productsVO.fundinfo');\n const overviewPath = get(rawFundOverview, 'fundOverviewVO');\n let rawStats = get(portfolio, 'stats');\n\n const fundID = get(fundInfo, 'fundNumber.val');\n const fundCat = get(fundInfo, 'fndCategory.val');\n const fundShareClass = get(fundInfo, 'shareClass.val');\n const showLabelsIfEmpty = get(statisticsAndPositionsConfig, 'Data.Datum.showLabelsIfEmpty.Option');\n const displayStatus = get(overviewPath, 'fundInfo.displayStatus.val');\n\n const displayHistoricalDataLink = (fundCat === statTypes.fundCategoryMoneyFunds);\n const displayPositionsNotAvail = !(fundCat === statTypes.fundCategoryAlternative);\n\n const TNBP = _getStat(rawStats, 'TNBP', 'val');\n const TNCP = _getStat(rawStats, 'TNCP', 'val');\n const TNEP = _getStat(rawStats, 'TNEP', 'val');\n const TNI = _getStat(rawStats, 'TNI', 'val');\n const TNP = _getStat(rawStats, 'TNP', 'val');\n\n const rawStatistics1 = _buildStatistics(get(statisticsAndPositionsConfig, 'Data.Datum.statisticsCol1'));\n const rawStatistics2 = _buildStatistics(get(statisticsAndPositionsConfig, 'Data.Datum.statisticsCol2'));\n\n const statistics1 = _processStatistics(rawStatistics1, showLabelsIfEmpty, rawStats);\n const statistics2 = _processStatistics(rawStatistics2, showLabelsIfEmpty, rawStats);\n\n // Portfolio Positions As-Of\n // !(TNBP === '' && TNCP === '' && TNEP === '' && TNI === '' && TNP === '');\n const pfPosAsOf = ![TNBP, TNCP, TNEP, TNI, TNP].reduce((a, b) => { return a && (b === '');}, false);\n\n const showPositions = [TNBP, TNCP, TNEP, TNI, TNP].reduce((a, b) => { return a && (b === '');}, false);\n const positions = _populatePortfolioPositions(rawStats, ['TNBP', 'TNCP', 'TNEP', 'TNI', 'TNP']);\n\n let obj = {\n caveatSecName: 'Portfolio',\n displayStatus: displayStatus,\n fundCat: fundCat,\n fundID: fundID,\n fundShareClass: fundShareClass,\n displayHistoricalDataLink: displayHistoricalDataLink,\n displayPositionsNotAvail: displayPositionsNotAvail,\n pfPosAsOf: pfPosAsOf,\n positions: positions,\n showPositions: showPositions,\n statistics1: statistics1,\n statistics2: statistics2\n };\n\n return obj;\n}\n\nfunction _portfolioStatsCaveatsBuilder(action) {\n let [rawPortfolio, ,,, , , ] = action.json;\n\n let caveats = Object.assign({}, get(rawPortfolio, 'productsVO.caveatvo'));\n // Move the array up one level from .text into impLegalInfo\n if (caveats.hasOwnProperty('impLegalInfo')) {\n caveats.impLegalInfo = caveats.impLegalInfo.text.slice();\n caveats.displayLegalInfo = (caveats.impLegalInfo.length > 0);\n }\n return caveats;\n}\n\nfunction _portfolioStatsCaveatsLabels(action) {\n let [ , , , , rawLabels ] = action.json;\n return get(rawLabels, 'portfolio-statistics-and-positions-labels');\n}\n","import {statisticsAndPositions} from './statistics-and-positions';\n\ndescribe('statisticsAndPositions', () => {\n it('should return unchanged state if action does not apply', done => {\n let action = {\n type: 'ANOTHER_ACTION'\n };\n let oldState = {};\n let newState = statisticsAndPositions(oldState, action, {});\n expect(newState).toBe(oldState);\n done();\n });\n\n it('should gracefully handle no data', done => {\n let action = {\n type: 'POPULATE_PORTFOLIO_STATPOSITIONS_INFORMATION_SUCCESS',\n 'json': [ {}, {}],\n fundId: '1234'\n };\n let newState = statisticsAndPositions({}, action, {});\n expect(newState.portfolioStatPos.data.caveatSecName).toBe('Portfolio');\n done();\n });\n\n it('should return some stuff', done => {\n let action = {\n type: 'POPULATE_PORTFOLIO_STATPOSITIONS_INFORMATION_SUCCESS',\n data: {\n stuff: 'some stuff'\n },\n 'json': [{}, {}, {}, {}]\n };\n let newState = statisticsAndPositions({}, action, {});\n expect(newState.portfolioStatPos.data.pfPosAsOf).toBeTruthy();\n done();\n });\n\n it('should generate statistics', done => {\n let action = {\n type: 'POPULATE_PORTFOLIO_STATPOSITIONS_INFORMATION_SUCCESS',\n data: {\n stuff: 'some stuff'\n },\n 'json': [{\n 'productsVO': {\n 'portfolioVO': {\n 'stats': [\n {\n 'date': {\n 'alt': '12/31/2016',\n 'val': '2016-12-31'\n },\n 'type': 'NET_ASSETS_FUND',\n 'val': {\n 'alt': '1,092.3',\n 'val': '1092.2676'\n }\n },\n {\n 'date': {\n 'alt': '12/31/2016',\n 'val': '2016-12-31'\n },\n 'type': 'NET_EXPOSURE',\n 'val': {\n 'alt': '55.05',\n 'val': '55.05'\n }\n }\n ]\n }\n }\n }, {}, {}, {}]\n };\n let newState = statisticsAndPositions({}, action, {});\n expect(newState.portfolioStatPos.data.statistics1[0].label).toBe('total-fund-assets');\n expect(newState.portfolioStatPos.data.statistics2[0].label).toBe('net-exposure');\n done();\n });\n\n it('should cover _getStat', done => {\n let action = {\n type: 'POPULATE_PORTFOLIO_STATPOSITIONS_INFORMATION_SUCCESS',\n data: {\n stuff: 'some stuff'\n },\n 'json': [{\n 'productsVO': {\n 'portfolioVO': {\n 'stats': [\n {\n 'date': {\n 'alt': '12/31/2016',\n 'val': '2016-12-31'\n },\n 'type': 'TNBP',\n 'val': {\n 'alt': '1,092.3',\n 'val': '1092.2676'\n }\n },\n {\n 'date': {},\n 'type': 'TNCP',\n 'val': {}\n }\n ]\n }\n }\n }, {}, {}, {}]\n };\n let newState = statisticsAndPositions({}, action, {});\n expect(newState.portfolioStatPos.data.positions[0].label).toBe('bonds');\n expect(newState.portfolioStatPos.data.positions[0].type).toBe('TNBP');\n\n done();\n });\n\n it('should be invisible', done => {\n let action = {\n type: 'POPULATE_PORTFOLIO_STATPOSITIONS_INFORMATION_SUCCESS',\n 'json': [ {}, {}],\n fundId: '1234'\n };\n let newState = statisticsAndPositions({}, action, {});\n expect(newState.portfolioStatPos.data.visible).toBeFalsy();\n done();\n });\n\n afterAll(done => {\n setTimeout(() => done(), 3000);\n });\n});\n","/**\n * App State Reducer for findAFund\n * Takes application state data and creates model for components\n */\nimport {LogManager} from 'aurelia-framework';\n\nconst logger = LogManager.getLogger('find-a-fund');\n\nexport function findAFund(state, action) {\n switch (action.type) {\n case 'SOME_ACTION':\n logger.debug('Reducing: SOME_ACTION');\n\n return Object.assign({}, state, {\n findAFund: action.data\n });\n default:\n return state;\n }\n}\n","/**\n * App State Reducer for ppss\n * Takes application state data and creates model for components\n */\nimport {LogManager} from 'aurelia-framework';\nimport isEqual from 'lodash/isEqual';\n\nconst logger = LogManager.getLogger('ppss');\n\nexport function ppss(state, action) {\n let newState;\n switch (action.type) {\n case 'PPSS_CHANGE_TAB':\n //logger.debug('Reducing: PPSS_CHANGE_TAB');\n newState = Object.assign({}, state);\n Object.assign(newState.app.ppss, {currentTable: action.tab});\n return newState;\n case 'PPSS_CHANGE_PERFORMANCE_VIEW':\n newState = Object.assign({}, state);\n let periodEnd = state.app.ppss.display.periodEnd;\n // change period end if the new performance view ends with _MONTHLY or _QUARTERLY\n if (action.data.endsWith('_MONTHLY')) periodEnd = 'MONTH_END';\n if (action.data.endsWith('_QUARTERLY')) periodEnd = 'QUARTER_END';\n Object.assign(newState.app.ppss.display, {performanceView: action.data, periodEnd});\n return newState;\n case 'PPSS_CHANGE_PERIOD_END':\n // logger.debug('Reducing: PPSS_CHANGE_PERIOD_END', action, state.app.ppss.display.performanceView);\n newState = Object.assign({}, state);\n let performanceView = state.app.ppss.display.performanceView;\n if (action.periodEnd === 'MONTH_END') performanceView = performanceView.replace(/(_QUARTERLY|_MONTHLY)$/, '_MONTHLY');\n if (action.periodEnd === 'QUARTER_END') performanceView = performanceView.replace(/(_QUARTERLY|_MONTHLY)$/, '_QUARTERLY');\n Object.assign(newState.app.ppss.display, {performanceView, periodEnd: action.periodEnd});\n return newState;\n case 'PPSS_CHANGE_SALES_CHARGES':\n //logger.debug('Reducing: PPSS_CHANGE_SALES_CHARGES');\n newState = Object.assign({}, state);\n Object.assign(newState.app.ppss.display, {includeSalesCharges: action.data});\n return newState;\n case 'PPSS_CHANGE_DROPDOWN':\n logger.debug('Reducing: PPSS_CHANGE_DROPDOWN', action);\n let currentFilter = state.app.ppss.filters.dropdowns.find(d => d.name === action.name);\n if (currentFilter && !isEqual(currentFilter.selected.value, action.newValue.value)) {\n newState = Object.assign({}, state);\n Object.assign(newState.app.ppss.filters.dropdowns.find(d => d.name === action.name).selected, action.newValue);\n return newState;\n }\n return state;\n case 'PPSS_CHANGE_KEYWORDS':\n //logger.debug('Reducing: PPSS_CHANGE_KEYWORDS');\n let keywordsFilter = state.app.ppss.filters.keywords;\n if (keywordsFilter && keywordsFilter.searchString !== action.newSearchString) {\n newState = Object.assign({}, state);\n Object.assign(newState.app.ppss.filters.keywords, {searchString: action.newSearchString});\n return newState;\n }\n return state;\n case 'PPSS_CHANGE_SORT':\n logger.debug('Reducing: PPSS_CHANGE_SORT'. action);\n let columns = state.app.ppss.sort.columns;\n let newSortColumn = columns.get(action.columnName);\n if (newSortColumn) {\n switch (newSortColumn.direction) {\n case 'ASC':\n newSortColumn.direction = 'DESC';\n break;\n case 'DESC':\n newSortColumn.direction = 'ASC';\n break;\n default:\n newSortColumn.direction = newSortColumn.isNumeric ? 'DESC' : 'ASC';\n }\n columns.forEach(function(value, key) {\n if (key !== action.columnName) {\n columns.set(key, Object.defineProperty(value, 'direction', {value: null, configurable: true}));\n }\n });\n newState = Object.assign({}, state);\n Object.assign(newState.app.ppss.sort, {columns});\n return newState;\n }\n return state;\n default:\n return state;\n }\n}\n","import {FtPpssPerformanceRow as FtPpssPerformanceRowBase} from '../ft-ppss-performance-row';\r\nimport {bindable, computedFrom} from 'aurelia-framework';\r\n\r\nexport class FtPpssPerformanceRow extends FtPpssPerformanceRowBase {\r\n @bindable fund;\r\n @bindable label;\r\n @bindable config;\r\n @bindable productPageUrl;\r\n @bindable includeSalesCharges;\r\n @bindable periodEnd;\r\n\r\n @computedFrom('avgAnnSinceIncReturn', 'fund')\r\n get ytdTotalReturnAtNav() {\r\n if (this.avgAnnSinceIncReturnMonthly) {\r\n return this.fund.ytdTotalReturnAtNav;\r\n }\r\n return '';\r\n }\r\n\r\n @computedFrom('includeSalesCharges', 'periodEnd', 'fund')\r\n get avgAnn1YearReturn() {\r\n switch (this.periodEnd) {\r\n case 'MONTH_END':\r\n return this.includeSalesCharges ? this.fund.avgAnn1YearReturnMonthlySc : this.fund.avgAnn1YearReturnMonthly;\r\n case 'QUARTER_END':\r\n return this.includeSalesCharges ? this.fund.avgAnn1YearReturnQuarterlySc : this.fund.avgAnn1YearReturnQuarterly;\r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n @computedFrom('includeSalesCharges', 'periodEnd', 'fund')\r\n get avgAnn3YearReturn() {\r\n switch (this.periodEnd) {\r\n case 'MONTH_END':\r\n return this.includeSalesCharges ? this.fund.avgAnn3YearReturnMonthlySc : this.fund.avgAnn3YearReturnMonthly;\r\n case 'QUARTER_END':\r\n return this.includeSalesCharges ? this.fund.avgAnn3YearReturnQuarterlySc : this.fund.avgAnn3YearReturnQuarterly;\r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n @computedFrom('includeSalesCharges', 'periodEnd', 'fund')\r\n get avgAnn5YearReturn() {\r\n switch (this.periodEnd) {\r\n case 'MONTH_END':\r\n return this.includeSalesCharges ? this.fund.avgAnn5YearReturnMonthlySc : this.fund.avgAnn5YearReturnMonthly;\r\n case 'QUARTER_END':\r\n return this.includeSalesCharges ? this.fund.avgAnn5YearReturnQuarterlySc : this.fund.avgAnn5YearReturnQuarterly;\r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n @computedFrom('includeSalesCharges', 'periodEnd', 'fund')\r\n get avgAnn10YearReturn() {\r\n switch (this.periodEnd) {\r\n case 'MONTH_END':\r\n return this.includeSalesCharges ? this.fund.avgAnn10YearReturnMonthlySc : this.fund.avgAnn10YearReturnMonthly;\r\n case 'QUARTER_END':\r\n return this.includeSalesCharges ? this.fund.avgAnn10YearReturnQuarterlySc : this.fund.avgAnn10YearReturnQuarterly;\r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n @computedFrom('includeSalesCharges', 'periodEnd', 'fund')\r\n get avgAnnSinceIncReturn() {\r\n switch (this.periodEnd) {\r\n case 'MONTH_END':\r\n return this.includeSalesCharges ? this.fund.avgAnnSinceIncReturnMonthlySc : this.fund.avgAnnSinceIncReturnMonthly;\r\n case 'QUARTER_END':\r\n return this.includeSalesCharges ? this.fund.avgAnnSinceIncReturnQuarterlySc : this.fund.avgAnnSinceIncReturnQuarterly;\r\n default:\r\n return '';\r\n }\r\n }\r\n}\r\n","import {FtPpssPerformance as FtPpssPerformanceBase} from '../ft-ppss-performance';\r\nimport {bindable, computedFrom} from 'aurelia-framework';\r\n\r\nexport class FtPpssPerformance extends FtPpssPerformanceBase {\r\n @bindable funds;\r\n @bindable label;\r\n @bindable config;\r\n @bindable filters;\r\n @bindable sort;\r\n @bindable user;\r\n @bindable productPageUrl;\r\n @bindable includeSalesCharges;\r\n @bindable periodEnd;\r\n @bindable navAsOfDateMonth;\r\n @bindable navAsOfDateQuarter;\r\n @bindable ytdAsOfDate;\r\n\r\n @computedFrom('includeSalesCharges')\r\n get popOrNav() {\r\n return this.includeSalesCharges\r\n ? this.getLabel('pop')\r\n : this.getLabel('nav');\r\n }\r\n\r\n @computedFrom('periodEnd', 'navAsOfDateMonth', 'navAsOfDateQuarter')\r\n get navAsOfDate() {\r\n switch (this.periodEnd) {\r\n case 'MONTH_END':\r\n return this.navAsOfDateMonth;\r\n case 'QUARTER_END':\r\n return this.navAsOfDateQuarter;\r\n default:\r\n return;\r\n }\r\n }\r\n\r\n @computedFrom('showFavorites')\r\n get moneyFundHeaderColspan() {\r\n return this.showFavorites ? 11 : 10;\r\n }\r\n}\r\n","/**\n * Reducer for pricingAtNav\n * Takes json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\n\nconst logger = LogManager.getLogger('pricing-at-nav');\n\nexport function pricingAtNav(state, action, products) {\n switch (action.type) {\n case 'PRICING_AT_NAV_CHANGE_TAB':\n logger.debug('Reducing: PRICING_AT_NAV_CHANGE_TAB');\n let newState = Object.assign({}, state);\n if (!newState.app) newState.app = {};\n if (!newState.app.pricingAtNav) newState.app.pricingAtNav = {};\n Object.assign(newState.app.pricingAtNav, {currentTab: action.tab});\n return newState;\n default:\n return state;\n }\n}\n","/**\n * App State Reducer for pricingDistribution\n * Takes application state data and creates model for components\n */\nimport {LogManager} from 'aurelia-framework';\n\nconst logger = LogManager.getLogger('pricing-distribution');\n\nexport function pricingDistribution(state, action) {\n let newState;\n switch (action.type) {\n case 'PRICING_DISTRIBUTION_UPDATE_RANGE':\n logger.debug('Reducing: PRICING_DISTRIBUTION_UPDATE_RANGE', action, state);\n const rangeOpts = state.app.pricingDistribution.dateRangeOptions;\n const selectedDateRangeName = action.data.name;\n if (rangeOpts.find(opt => opt.name === selectedDateRangeName)) {\n newState = Object.assign({}, state);\n newState.app.pricingDistribution = Object.assign({}, newState.app.pricingDistribution, {\n selectedDateRange: selectedDateRangeName,\n fromDate: action.data.fromDate,\n toDate: action.data.toDate\n });\n return newState;\n }\n return state;\n case 'PRICING_DISTRIBUTION_CUSTOM_DATES':\n logger.debug('Reducing: PRICING_DISTRIBUTION_CUSTOM_DATES', action, state);\n newState = Object.assign({}, state);\n newState.app.pricingDistribution = Object.assign({}, newState.app.pricingDistribution, {\n selectedDateRange: 'CUSTOM_RANGE',\n fromDate: action.data.fromDate,\n toDate: action.data.toDate\n });\n return newState;\n default:\n return state;\n }\n}\n","/**\n * Reducer for taxInformation\n * Takes json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\nimport findIndex from 'lodash/findIndex';\n\nconst logger = LogManager.getLogger('tax-information');\n\nexport function taxInformation(state, action, products) {\n switch (action.type) {\n case 'POPULATE_TAX_INFORMATION_SUCCESS':\n logger.debug('Reducing: POPULATE_TAX_INFORMATION_SUCCESS');\n\n let taxData = (typeof state.taxYears === 'undefined' || typeof state.taxYears[action.taxYear] === 'undefined' ) ? _taxInformationData(action) : state.taxYears[action.taxYear];\n let caveats = _taxCaveatsBuilder(action);\n\n if (typeof state.taxYears === 'undefined' ) {\n // Create the taxYears\n state.taxYears = {};\n }\n\n if (typeof state.taxYears === 'undefined' || typeof state.taxYears[action.taxYear] === 'undefined' ) {\n // add this year to the array of taxYears\n state.taxYears[action.taxYear] = taxData;\n }\n\n return Object.assign({}, state, {\n taxInformation: {\n data: taxData,\n label: get(products, 'taxInformation.label'),\n caveats: caveats\n }\n });\n default:\n return state;\n }\n}\n\nfunction _taxInformationData(action) {\n let [tax, fundTaxInfo, , , fundConfigData, usefulstuffProvider ] = action.json;\n let taxYearDatum = action.taxYear.toString();\n let fundId = action.fundId;\n\n let fundType = get(fundTaxInfo, 'fundOverviewVO.fundInfo.fndCategory.val');\n let dailyAccrualFlag = get(fundTaxInfo, 'fundOverviewVO.fundInfo.dailyAccrualFlag.val');\n let federalId = get(fundTaxInfo, 'fundOverviewVO.fundInfo.federalId.val');\n let currentMonth = get(usefulstuffProvider, 'provider.Useful.taxYear.currentMonth');\n let taxYearYears = get(usefulstuffProvider, 'provider.Useful.taxYear.year');\n let firstColumnLabel = (dailyAccrualFlag === 'Y');\n let distroDet = get(tax, 'productsVO.taxVO.distroDet');\n let displayYearEndMessage = get(fundConfigData, 'provider.config.global.taxInfoPage.displayYearEndMessage');\n let currentDisplayYear = get(usefulstuffProvider, 'provider.Useful.taxYear.year');\n let taxYear = (taxYearDatum !== '') ? taxYearDatum : currentDisplayYear.toString();\n let secNames = get(usefulstuffProvider, 'provider.Useful.taxYear.FootnoteSecName.secName');\n let caveatSecName;\n\n let index = findIndex( secNames, {'year': parseInt(taxYear, 10)} );\n if (index !== -1) {\n caveatSecName = secNames[index].content;\n } else {\n caveatSecName = secNames[0].content;\n }\n\n let yearEndMessage = false;\n if ((parseInt(currentMonth, 10) < 2) && (parseInt(taxYear, 10) === currentDisplayYear) && (displayYearEndMessage === 'Y')) {\n yearEndMessage = true;\n } else if ((displayYearEndMessage === 'Y') && (parseInt(taxYear, 10) === currentDisplayYear) ) {\n yearEndMessage = true;\n }\n\n let firstColumnFootnote = (firstColumnLabel) ? 'Pay Date' : 'Record Date';\n let yearTotals = {};\n yearTotals.tolDistTotal = get(tax, 'productsVO.taxVO.tolDistTotal.alt');\n yearTotals.ordDvdndTotal = get(tax, 'productsVO.taxVO.ordDvdndTotal.alt');\n yearTotals.longTrmCapGainsTotal = get(tax, 'productsVO.taxVO.longTrmCapGainsTotal.alt');\n yearTotals.taxExmpIncmTotal = get(tax, 'productsVO.taxVO.taxExmpIncmTotal.alt');\n yearTotals.nonTaxRtnCptlTotal = get(tax, 'productsVO.taxVO.nonTaxRtnCptlTotal.alt');\n yearTotals.qlfdDvdndIncmTotal = get(tax, 'productsVO.taxVO.qlfdDvdndIncmTotal.alt');\n\n return {\n taxYear: taxYear,\n fundId: fundId,\n fundType: fundType,\n dailyAccrualFlag: dailyAccrualFlag,\n federalId: federalId,\n currentMonth: currentMonth,\n taxYearYears: taxYearYears,\n yearEndMessage: yearEndMessage,\n distroDet: distroDet,\n firstColumnLabel: firstColumnLabel,\n caveatSecName: caveatSecName,\n firstColumnFootnote: firstColumnFootnote,\n yearTotals: yearTotals\n };\n}\n\nfunction _taxCaveatsBuilder(action) {\n let [, , taxCaveats, , , ] = action.json;\n\n let caveats = Object.assign({}, get(taxCaveats, 'productsVO.caveatvo'));\n // Move the array up one level from .text into impLegalInfo\n if (caveats.hasOwnProperty('impLegalInfo')) {\n caveats.impLegalInfo = caveats.impLegalInfo.text.slice();\n caveats.displayLegalInfo = (caveats.impLegalInfo.length > 0);\n }\n return caveats;\n}\n","/**\n * Created by mdonnel on 17/01/2017.\n */\n\nimport {LogManager} from 'aurelia-framework';\n\nconst logger = LogManager.getLogger('tax-labels-reducer');\n\nexport function taxLabels(state, action) {\n switch (action.type) {\n case 'POPULATE_TAX_INFORMATION_SUCCESS':\n logger.debug('Reducing: POPULATE_TAX_INFORMATION_SUCCESS');\n return Object.assign({}, state, _taxLabelsBuilder());\n default: return state;\n }\n\n function _taxLabelsBuilder() {\n const [, , , taxInformationLabels,, ] = action.json;\n let newLabels = {};\n if (taxInformationLabels.hasOwnProperty('provider')) {\n for (let label of taxInformationLabels.provider.labels.label) {\n newLabels[label.key] = label.value;\n }\n }\n // return newLabels;\n return {\n taxInformation: {\n label: newLabels\n }\n };\n }\n}\n","import get from 'lodash/get';\n/**\n * Data Reducer for documentLister\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\n// import {LogManager} from 'aurelia-framework';\n// const logger = LogManager.getLogger('document-lister');\n\nexport function ftDocumentLister(state, action) {\n switch (action.type) {\n case 'LOAD_LABELS_SUCCESS':\n let [labelData] = action.json;\n let beanLabelData = get(labelData, 'labels');\n\n let otherLabel = get(beanLabelData, 'other-label');\n\n return Object.assign({}, state, {\n ftDocumentListerLabels: {\n otherLabel: otherLabel\n }\n });\n default:\n return state;\n }\n}\n","import get from 'lodash/get';\nimport map from 'lodash/map';\nimport isArray from 'lodash/isArray';\nimport first from 'lodash/first';\nimport takeRight from 'lodash/takeRight';\n/**\n * Data Reducer for reportArchiveA\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\n// import {LogManager} from 'aurelia-framework';\n// const logger = LogManager.getLogger('report-archive-a');\n\nexport function reportArchiveA(state, action) {\n switch (action.type) {\n case 'POPULATE_REPORT_ARCHIVE_A_SUCCESS':\n let [data] = action.json;\n\n let beanData = get(data, 'config.providers.provider[reports-data]');\n // logger.debug('data:', beanData);\n\n let cols = get(beanData, 'documents.header.column');\n let rows = get(beanData, 'documents.row');\n let noresults = get(beanData, 'message');\n let footnote = get(beanData, 'caveat.footnote');\n let fundtitle = get(beanData, 'fundtitle');\n\n\n // convert to array if just single object\n if (rows) {\n rows = (isArray(rows) ? rows : [rows]);\n rows = map(rows, (row) => {\n let columns = get(row, 'column');\n let label = first(columns).label;\n let otherColumns = takeRight(columns, columns.length - 1);\n let rowCols = map(otherColumns, (col) => {\n let column = {};\n if (typeof col.document === 'string') {\n column.noresults = col.document;\n } else {\n let documents = (isArray(col.document) ? col.document : [col.document]);\n column.documents = map(documents, (doc) => {\n return {\n url: doc.path,\n title: doc.title,\n size: doc.size,\n extension: doc.extension\n };\n });\n }\n return column;\n });\n return {\n label,\n cols: rowCols\n };\n });\n } else {\n rows = [];\n }\n\n return Object.assign({}, state, {\n reportArchiveA: {\n title: fundtitle,\n noresults,\n footnote,\n cols,\n rows\n }\n });\n default:\n return state;\n }\n}\n","import get from 'lodash/get';\nimport map from 'lodash/map';\nimport isArray from 'lodash/isArray';\nimport first from 'lodash/first';\nimport takeRight from 'lodash/takeRight';\n/**\n * Data Reducer for reportArchiveA\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\n// import {LogManager} from 'aurelia-framework';\n// const logger = LogManager.getLogger('report-archive-a');\n\nexport function reportArchiveA(state, action) {\n switch (action.type) {\n case 'LOAD_LABELS_SUCCESS':\n let [labelData] = action.json;\n let beanLabelData = get(labelData, 'labels');\n\n let searchFundKeyword = get(beanLabelData, 'search-fund-keyword');\n let onOffToggle = get(beanLabelData, 'on-off-toggle');\n let onState = get(beanLabelData, 'on-state');\n let offState = get(beanLabelData, 'off-state');\n\n return Object.assign({}, state, {\n reportArchiveALabels: {\n searchFundKeyword: searchFundKeyword,\n onOffToggle: onOffToggle,\n onState: onState,\n offState: offState\n }\n });\n case 'POPULATE_REPORT_ARCHIVE_A_SUCCESS':\n let [data] = action.json;\n\n let beanData = get(data, 'config.providers.provider[reports-data]');\n // logger.debug('data:', beanData);\n\n let cols = get(beanData, 'documents.header.column');\n let rows = get(beanData, 'documents.row');\n let noresults = get(beanData, 'message');\n let footnote = get(beanData, 'caveat.footnote');\n let fundtitle = get(beanData, 'fundtitle');\n\n // convert to array if just single object\n if (rows) {\n rows = (isArray(rows) ? rows : [rows]);\n rows = map(rows, (row) => {\n let columns = get(row, 'column');\n let label = first(columns).label;\n let otherColumns = takeRight(columns, columns.length - 1);\n let rowCols = map(otherColumns, (col) => {\n let column = {};\n if (typeof col.document === 'string') {\n column.noresults = col.document;\n } else {\n let documents = (isArray(col.document) ? col.document : [col.document]);\n column.documents = map(documents, (doc) => {\n return {\n url: doc.path,\n title: doc.title,\n size: doc.size,\n extension: doc.extension\n };\n });\n }\n return column;\n });\n return {\n label,\n cols: rowCols\n };\n });\n } else {\n rows = [];\n }\n\n return Object.assign({}, state, {\n reportArchiveA: {\n title: fundtitle,\n noresults,\n footnote,\n cols,\n rows\n }\n });\n default:\n return state;\n }\n}\n","import get from 'lodash/get';\nimport map from 'lodash/map';\nimport isArray from 'lodash/isArray';\nimport first from 'lodash/first';\nimport takeRight from 'lodash/takeRight';\n/**\n * Data Reducer for reportArchiveA\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\n// import {LogManager} from 'aurelia-framework';\n// const logger = LogManager.getLogger('report-archive-b');\n\nexport function reportArchiveB(state, action) {\n switch (action.type) {\n case 'LOAD_LABELS_SUCCESS':\n let [labelData] = action.json;\n let beanLabelData = get(labelData, 'labels');\n\n let searchFundKeyword = get(beanLabelData, 'search-fund-keyword');\n let onOffToggle = get(beanLabelData, 'on-off-toggle');\n let onState = get(beanLabelData, 'on-state');\n let offState = get(beanLabelData, 'off-state');\n\n return Object.assign({}, state, {\n reportArchiveBLabels: {\n searchFundKeyword: searchFundKeyword,\n onOffToggle: onOffToggle,\n onState: onState,\n offState: offState\n }\n });\n case 'POPULATE_REPORT_ARCHIVE_B_SUCCESS':\n let [data] = action.json;\n let reportArchiveBData = {};\n\n let beanData = get(data, 'config.providers.provider[archive-data]');\n\n let cols = get(beanData, 'documents.header.column');\n if (cols) {\n reportArchiveBData.cols = cols;\n }\n let footnote = get(beanData, 'caveat.footnote');\n if (cols) {\n reportArchiveBData.footnote = footnote;\n }\n let rows = get(beanData, 'documents.row');\n\n\n // convert to array if just single object\n if (rows) {\n rows = (isArray(rows) ? rows : [rows]);\n // rows = [rows[0], rows[0], rows[0], rows[0]];\n\n rows = map(rows, (row) => {\n // logger.debug('xxxxxxxxxxxxxxxx', row);\n let columns = get(row, 'column');\n let label = first(columns).label;\n // let label = Math.random().toString(36).replace(/[^a-z]+/g, '');\n let otherColumns = takeRight(columns, columns.length - 1);\n\n let rowCols = map(otherColumns, (col) => {\n let column = {};\n if (col.document) {\n column.documents = map((isArray(col.document) ? col.document : [col.document]), (doc) => {\n let document = {\n title: get(doc, 'title'),\n size: get(doc, 'size'),\n extension: get(doc, 'extension')\n };\n if (doc.path) {\n document.url = `/downloadsServlet?docid=${doc.path}`;\n }\n return document;\n });\n }\n if (typeof col.message === 'string') {\n column.noresults = col.message;\n }\n return column;\n });\n return {\n label,\n cols: rowCols\n };\n });\n reportArchiveBData.rows = rows;\n }\n return Object.assign({}, state, { reportArchiveB: reportArchiveBData });\n default:\n return state;\n }\n}\n","import get from 'lodash/get';\nimport map from 'lodash/map';\nimport isArray from 'lodash/isArray';\nimport first from 'lodash/first';\nimport takeRight from 'lodash/takeRight';\n/**\n * Data Reducer for reportArchiveA\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\n// import {LogManager} from 'aurelia-framework';\n// const logger = LogManager.getLogger('report-archive-b');\n\nexport function reportArchiveB(state, action) {\n switch (action.type) {\n case 'POPULATE_REPORT_ARCHIVE_B_SUCCESS':\n let [data] = action.json;\n let reportArchiveBData = {};\n\n let beanData = get(data, 'config.providers.provider[archive-data]');\n\n let cols = get(beanData, 'documents.header.column');\n if (cols) {\n reportArchiveBData.cols = cols;\n }\n let footnote = get(beanData, 'caveat.footnote');\n if (cols) {\n reportArchiveBData.footnote = footnote;\n }\n let rows = get(beanData, 'documents.row');\n\n\n // convert to array if just single object\n if (rows) {\n rows = (isArray(rows) ? rows : [rows]);\n // rows = [rows[0], rows[0], rows[0], rows[0]];\n\n rows = map(rows, (row) => {\n let columns = get(row, 'column');\n let label = first(columns).label;\n // let label = Math.random().toString(36).replace(/[^a-z]+/g, '');\n let otherColumns = takeRight(columns, columns.length - 1);\n\n let rowCols = map(otherColumns, (col) => {\n let column = {};\n if (typeof col.document === 'string') {\n column.noresults = col.document;\n } else {\n column.documents = map((isArray(col.document) ? col.document : [col.document]), (doc) => {\n let document = {\n title: doc.title,\n size: doc.size,\n extension: doc.extension\n };\n if (doc.path) {\n document.url = `/downloadsServlet?docid=${doc.path}`;\n }\n return document;\n });\n }\n return column;\n });\n return {\n label,\n cols: rowCols\n };\n });\n reportArchiveBData.rows = rows;\n }\n return Object.assign({}, state, { reportArchiveB: reportArchiveBData });\n default:\n return state;\n }\n}\n","// import {get, map, isArray, first, takeRight} from 'lodash';\n/**\n * Data Reducer for reportArchiveA\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\n// import {LogManager} from 'aurelia-framework';\n// const logger = LogManager.getLogger('report-archive-b');\n\nexport function reportArchiveC(state, action) {\n // switch (action.type) {\n // case 'POPULATE_REPORT_ARCHIVE_C_SUCCESS':\n // let [data] = action.json;\n // let reportArchiveCData = {};\n //\n // let beanData = get(data, 'config.providers.provider[archive-data]');\n //\n // let cols = get(beanData, 'documents.header.column');\n // if (cols) {\n // reportArchiveCData.cols = cols;\n // }\n // let footnote = get(beanData, 'caveat.footnote');\n // if (cols) {\n // reportArchiveCData.footnote = footnote;\n // }\n // let rows = get(beanData, 'documents.row');\n //\n //\n // // convert to array if just single object\n // if (rows) {\n // rows = (isArray(rows) ? rows : [rows]);\n // // rows = [rows[0], rows[0], rows[0], rows[0]];\n //\n // rows = map(rows, (row) => {\n // let columns = get(row, 'column');\n // let label = first(columns).label;\n // // let label = Math.random().toString(36).replace(/[^a-z]+/g, '');\n // let otherColumns = takeRight(columns, columns.length - 1);\n //\n // let rowCols = map(otherColumns, (col) => {\n // let column = {};\n // if (typeof col.document === 'string') {\n // column.noresults = col.document;\n // } else {\n // column.documents = map((isArray(col.document) ? col.document : [col.document]), (doc) => {\n // let document = {\n // title: doc.title,\n // size: doc.size,\n // extension: doc.extension\n // };\n // if (doc.path) {\n // document.url = `/downloadsServlet?docid=${doc.path}`;\n // }\n // return document;\n // });\n // }\n // return column;\n // });\n // return {\n // label,\n // cols: rowCols\n // };\n // });\n // reportArchiveCData.rows = rows;\n // }\n // return Object.assign({}, state, { reportArchiveC: reportArchiveCData });\n // default:\n // return state;\n // }\n}\n","// import {get, map, isArray, first, takeRight} from 'lodash';\n/**\n * Data Reducer for reportArchiveA\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\n// import {LogManager} from 'aurelia-framework';\n// const logger = LogManager.getLogger('report-archive-b');\n\nexport function reportArchiveD(state, action) {\n // switch (action.type) {\n // case 'POPULATE_REPORT_ARCHIVE_C_SUCCESS':\n // let [data] = action.json;\n // let reportArchiveCData = {};\n //\n // let beanData = get(data, 'config.providers.provider[archive-data]');\n //\n // let cols = get(beanData, 'documents.header.column');\n // if (cols) {\n // reportArchiveCData.cols = cols;\n // }\n // let footnote = get(beanData, 'caveat.footnote');\n // if (cols) {\n // reportArchiveCData.footnote = footnote;\n // }\n // let rows = get(beanData, 'documents.row');\n //\n //\n // // convert to array if just single object\n // if (rows) {\n // rows = (isArray(rows) ? rows : [rows]);\n // // rows = [rows[0], rows[0], rows[0], rows[0]];\n //\n // rows = map(rows, (row) => {\n // let columns = get(row, 'column');\n // let label = first(columns).label;\n // // let label = Math.random().toString(36).replace(/[^a-z]+/g, '');\n // let otherColumns = takeRight(columns, columns.length - 1);\n //\n // let rowCols = map(otherColumns, (col) => {\n // let column = {};\n // if (typeof col.document === 'string') {\n // column.noresults = col.document;\n // } else {\n // column.documents = map((isArray(col.document) ? col.document : [col.document]), (doc) => {\n // let document = {\n // title: doc.title,\n // size: doc.size,\n // extension: doc.extension\n // };\n // if (doc.path) {\n // document.url = `/downloadsServlet?docid=${doc.path}`;\n // }\n // return document;\n // });\n // }\n // return column;\n // });\n // return {\n // label,\n // cols: rowCols\n // };\n // });\n // reportArchiveCData.rows = rows;\n // }\n // return Object.assign({}, state, { reportArchiveC: reportArchiveCData });\n // default:\n // return state;\n // }\n}\n","/**\r\n * App State Reducer for ftVideoSwitch\r\n * Takes application state data and creates model for components\r\n * rmclaughlin 25/05/17\r\n */\r\n\r\nimport get from 'lodash/get';\r\n//import {LogManager} from 'aurelia-framework';\r\n//const logger = LogManager.getLogger('ft-video-switch');\r\n\r\nexport function ftVideoSwitch(state, action) {\r\n switch (action.type) {\r\n case 'LOAD_LABELS_SUCCESS':\r\n let [data] = action.json;\r\n let beanData = get(data, 'labels');\r\n\r\n let transcriptLabel = get(beanData, 'transcript-label');\r\n let brightcoveVideoDirectLink = get(beanData, 'brightcove-video-direct-link');\r\n let brightcoveVideoEmbedCode = get(beanData, 'brightcove-video-embed-code');\r\n let brightcoveVideoFacebookAlt = get(beanData, 'brightcove-video-facebook-alt');\r\n let brightcoveVideoLinkedinAlt = get(beanData, 'brightcove-video-linkedin-alt');\r\n let brightcoveVideoModalCloseAlt = get(beanData, 'brightcove-video-modal-close-alt');\r\n let brightcoveVideoPlayAlt = get(beanData, 'brightcove-video-play-alt');\r\n let brightcoveVideoShareLink = get(beanData, 'brightcove-video-share-link');\r\n let brightcoveVideoTwitterAlt = get(beanData, 'brightcove-video-twitter-alt');\r\n\r\n return Object.assign({}, state, {\r\n ftVideoSwitch: {\r\n transcriptLabel: transcriptLabel,\r\n brightcoveVideoDirectLink: brightcoveVideoDirectLink,\r\n brightcoveVideoEmbedCode: brightcoveVideoEmbedCode,\r\n brightcoveVideoFacebookAlt: brightcoveVideoFacebookAlt,\r\n brightcoveVideoLinkedinAlt: brightcoveVideoLinkedinAlt,\r\n brightcoveVideoModalCloseAlt: brightcoveVideoModalCloseAlt,\r\n brightcoveVideoPlayAlt: brightcoveVideoPlayAlt,\r\n brightcoveVideoShareLink: brightcoveVideoShareLink,\r\n brightcoveVideoTwitterAlt: brightcoveVideoTwitterAlt\r\n }\r\n });\r\n default:\r\n return state;\r\n }\r\n}\r\n\r\n","/**\r\n* Created by bstjohn on 20/12/2016.\r\n*/\r\n/**\r\n* TODO: refactor caveats reducers - visibleElementLevelCaveats belongs in application state\r\n*/\r\nimport {LogManager} from 'aurelia-framework';\r\n\r\nconst logger = LogManager.getLogger('distributions-caveats-reducer');\r\n\r\nexport function caveats(state, action) {\r\n let newState;\r\n switch (action.type) {\r\n case 'POPULATE_DISTRIBUTIONS_STATE_SUCCESS':\r\n logger.debug('Reducing: POPULATE_DISTRIBUTIONS_STATE_SUCCESS', state);\r\n if (state.distributions && state.distributions.caveats) {\r\n return state;\r\n }\r\n let cvts = {\r\n impLegalInfo: new Set(),\r\n proximity: [],\r\n pageLevel: [],\r\n elementLevel: new Map(),\r\n elementLevelCaveats: new Map()\r\n };\r\n\r\n let [, distributions, , fundOverview] = action.json;\r\n _populate(cvts, distributions.productsVO.caveatvo);\r\n _populate(cvts, fundOverview.fundOverviewVO.caveatvo);\r\n\r\n newState = Object.assign({}, state, cvts);\r\n return newState;\r\n default:\r\n return state;\r\n }\r\n\r\n //TODO: factor this function out into reusable ibrary function\r\n function _populate(cvts, data) {\r\n // TODO: is all of this data fund specific or should some of it be general?\r\n data.impLegalInfo.text.forEach(t => (cvts.impLegalInfo.add(t)));\r\n cvts.displayLegalInfo = (cvts.impLegalInfo.size > 0);\r\n cvts.proximity = cvts.proximity.concat(data.proximity);\r\n cvts.pageLevel = cvts.pageLevel.concat(data.pageLevel); // so far, we have only seen this as an empty array\r\n data.elementLevel.caveat.forEach(cvt => {\r\n cvts.elementLevel.set(cvt.id, {eleName: cvt.eleName, secName: cvt.secName});\r\n });\r\n data.elementLevelCaveats.caveat.forEach(cvt => {\r\n cvts.elementLevelCaveats.set(cvt.id, cvt.text);\r\n });\r\n }\r\n}\r\n","/**\r\n * Created by bstjohn on 20/12/2016.\r\n */\r\nimport {LogManager} from 'aurelia-framework';\r\nimport {displayValue} from './util';\r\n\r\nconst logger = LogManager.getLogger('distributions-rate-at-breakpoint-reducer');\r\n\r\nexport function distributionRateAtBreakpoint(state, action, products) {\r\n if (\r\n !state.categoryBlockedByUser && !state.isPartial && !state.fundBlockedByUser &&\r\n state.isAllowedInConfig &&\r\n (state.shareClass === 'A' || state.shareClass === 'A1') &&\r\n state.fundCategory !== 'Money Funds'\r\n ) {\r\n logger.debug('populating distribution rate at breakpoint data for fund: ' + action.fundId);\r\n let [, distributions, , ] = action.json;\r\n let breakpointData = distributions.productsVO.distributionVO.distBrkPtVO;\r\n let label = products.distributions.label;\r\n return {\r\n displayDistributionRateAtBreakpoint: true,\r\n date: breakpointData.brkPtDate.alt,\r\n isShowPricingScheduleLessThan50k: (state.pricingSchedule === 'E'),\r\n isShowPricingScheduleAt100k: (state.pricingSchedule === 'L' || state.pricingSchedule === 'I'),\r\n rateAt50K: displayValue(breakpointData.rateAt50K.alt, state, label),\r\n rateAt100K: displayValue(breakpointData.rateAt100K.alt, state, label),\r\n rateAt250K: displayValue(breakpointData.rateAt250K.alt, state, label),\r\n rateAt500K: displayValue(breakpointData.rateAt500K.alt, state, label),\r\n rateAt1000K: displayValue(breakpointData.rateAt1000K.alt, state, label),\r\n rateAtNav: displayValue(breakpointData.rateAtNav.alt, state, label)\r\n };\r\n }\r\n return {};\r\n}\r\n","/**\r\n * Created by bstjohn on 20/12/2016.\r\n */\r\nimport {LogManager} from 'aurelia-framework';\r\nimport {showAsOfForDistributionRate, displayValue} from './util';\r\n\r\nconst logger = LogManager.getLogger('distributions-rate-reducer');\r\n\r\nexport function distributionRate(state, action, products) {\r\n let shareClass = state.shareClass;\r\n if (\r\n state.fundCategory !== 'Money Funds' &&\r\n shareClass !== 'A' &&\r\n shareClass !== 'A1'\r\n ) {\r\n logger.debug('populating distribution-rate data for fund: ' + action.fundId);\r\n let [, distributions, , ] = action.json;\r\n let label = products.distributions.label;\r\n let distributionsInfo = distributions.productsVO.distributionVO.distInfoVO;\r\n let distNav = distributionsInfo.find(distType => distType.type === 'DIST_RT_NAV');\r\n let distPop = distributionsInfo.find(distType => distType.type === 'DIST_RT_POP');\r\n let atNav = distNav.val.alt;\r\n let atPop = (!distPop.val.alt &&\r\n shareClass !== 'A' &&\r\n shareClass !== 'A1' &&\r\n shareClass !== 'C') ? distNav.val.alt : distPop.val.alt;\r\n\r\n return {\r\n distributionRate: {\r\n title: 'distribution-rate',\r\n caveatSection: 'Fund Overview',\r\n caveatElement: 'Distribution Rate at NAV',\r\n showAsOf: showAsOfForDistributionRate(state, atPop),\r\n updateSchedule: 'updated-daily',\r\n displayEmpty: true,\r\n\r\n rows: [{\r\n label: 'with-sales-charge',\r\n value: displayValue(atPop, state, label),\r\n date: (distPop.date) ? distPop.date.alt : distNav.date.alt\r\n }, {\r\n label: 'at-nav',\r\n value: displayValue(atNav, state, label),\r\n date: distNav.date.alt\r\n }]\r\n }\r\n };\r\n }\r\n return {};\r\n}\r\n","/**\r\n* Created by bstjohn on 20/12/2016.\r\n*/\r\n\r\nimport {LogManager} from 'aurelia-framework';\r\n\r\nconst logger = LogManager.getLogger('distributions-combine-reducers');\r\n\r\nimport {distributionsFirst} from './distributions-first.reducer';\r\nimport {caveats} from './caveats.reducer';\r\nimport {distributionsYtd} from './distributions-ytd.reducer';\r\nimport {distributionRate} from './distribution-rate.reducer';\r\nimport {taxEquivalentDistributionRate} from './tax-equivalent-distribution-rate.reducer';\r\nimport {taxEquivalentDistributionRateNavPop} from './tax-equivalent-distribution-rate-nav-pop.reducer';\r\nimport {thirtyDaysYield} from './thirty-days-yield.reducer';\r\nimport {sevenDaysYield} from './seven-days-yield.reducer';\r\nimport {taxEquivalentYield} from './tax-equivalent-yield.reducer';\r\nimport {taxEquivalentYieldStateCity} from './tax-equivalent-yield-state-city.reducer';\r\n\r\nimport {distributionRateAtBreakpoint} from './distribution-rate-at-breakpoint.reducer';\r\nconst distributionDataReducers = [\r\n distributionsFirst,\r\n\r\n distributionRate,\r\n taxEquivalentDistributionRate,\r\n taxEquivalentDistributionRateNavPop,\r\n thirtyDaysYield,\r\n sevenDaysYield,\r\n taxEquivalentYield,\r\n taxEquivalentYieldStateCity,\r\n\r\n distributionRateAtBreakpoint,\r\n distributionsYtd\r\n];\r\n\r\nexport function distributionsCombineReducers(state = {}, action, products) {\r\n switch (action.type) {\r\n case 'POPULATE_DISTRIBUTIONS_STATE_SUCCESS':\r\n if (state.distributions !== undefined) {\r\n return state; // already populated\r\n }\r\n logger.debug('Reducing: POPULATE_DISTRIBUTIONS_STATE_SUCCESS');\r\n let data = distributionDataReducers.reduce((prev, reducer) => {\r\n return Object.assign(prev, reducer(prev, action, products));\r\n }, {});\r\n\r\n return Object.assign({}, state, {\r\n distributions: {\r\n data: data,\r\n label: products.distributions.label,\r\n caveats: caveats(state, action, products)\r\n }\r\n });\r\n default:\r\n return state;\r\n }\r\n}\r\n","/**\r\n* Created by bstjohn on 20/12/2016.\r\n*/\r\n/**\r\n* Created by bstjohn on 20/12/2016.\r\n*/\r\n/**\r\n* Distributions configuration\r\n*/\r\n\r\nimport {LogManager} from 'aurelia-framework';\r\n\r\nconst logger = LogManager.getLogger('distributions-configuration');\r\nconst POPULATE_DISTRIBUTIONS_CONFIGURATION_INDEX = 2; // index in json array set in configuration\r\n\r\nexport function productConfiguration(state, action) {\r\n switch (action.type) {\r\n case 'POPULATE_DISTRIBUTIONS_STATE_SUCCESS':\r\n logger.debug('Reducing: POPULATE_DISTRIBUTIONS_STATE_SUCCESS');\r\n return Object.assign({}, state, _populate(action.json[POPULATE_DISTRIBUTIONS_CONFIGURATION_INDEX]));\r\n default: return state;\r\n }\r\n\r\n function _populate(configuration) {\r\n let config = config.provider.config.global.distributions;\r\n\r\n return {\r\n configuration: {\r\n }\r\n };\r\n }\r\n}\r\n","/**\n * Created by bstjohn on 04/11/2016.\n */\n/**\n * Model for the distributions page on the en-us-retail site\n */\nimport {LogManager} from 'aurelia-framework';\n\nconst logger = LogManager.getLogger('distributions-reducer');\n\nexport function distributionsFirst(state, action, products) {\n logger.debug('populating core distributions data for fund: ' + action.fundId);\n let [, distributions, , overview] = action.json;\n let distributionsConfig = products.configuration.global.distributions;\n const fundInfo = overview.fundOverviewVO.fundInfo;\n let label = products.distributions.label;\n\n let dividendDistributionSchedule = distributions.productsVO.distributionVO.dvndDistSchd.val;\n let dividendDistributionType = distributions.productsVO.distributionVO.dvndDistType.val;\n let fundCategory = fundInfo.fndCategory.val;\n let userConfig = _setUserConfiguration(distributionsConfig, fundCategory, dividendDistributionSchedule);\n let displayStatus = fundInfo.displayStatus.val;\n let shareClass = fundInfo.shareClass.val;\n let pricingSchedule = fundInfo.pricingStructure.val;\n let isTaxFree = (fundCategory === 'Tax Free Income');\n\n return {\n fundId: action.fundId,\n isAllowedInConfig: userConfig.isAllowedInConfig,\n categoryBlockedByUser: userConfig.categoryBlockedByUser,\n fundBlockedByUser: userConfig.fundBlockedByUser,\n displayStatus: displayStatus,\n fundCategory: fundCategory,\n shareClass: shareClass,\n pricingSchedule: pricingSchedule,\n inceptionDate: fundInfo.inceptionDate.val,\n isClosed: (displayStatus === 'H' || displayStatus === 'S'),\n isPartial: (displayStatus === 'P'),\n isTaxFree: isTaxFree,\n chargesPath: distributionsConfig.salesCharges,\n dividendDistributionSchedule: dividendDistributionSchedule,\n // date10YearsAgo: usefulStuff.date10YearsAgo,\n thirtyDaysStandardYieldAvailable: overview.fundOverviewVO.distribution.distInfoVO.find(di => di.type === 'THIRTYDY_YIELD_W' && di.val) !== undefined,\n wSalesEqualswoSales: (shareClass === 'R' || shareClass === 'R6' || shareClass === 'Advisor' || shareClass === 'Z'),\n dividendDistributionTypeLabel: _getDividendDistributionTypeLabel(distributions, label),\n capitalGainsDistributionSchedule: distributions.productsVO.distributionVO.cptgnDistSchd.val.replace(', ', '<br />'),\n\n dividendDistributionType: dividendDistributionType,\n tooOldData: _tooOldData(distributions.productsVO.distributionVO.distInfoVO,\n products.configuration.global.distributions.thirtyDayStandardizedDataTimeframe),\n displayNavPop: (\n distributionsConfig.displayNavPop !== undefined &&\n distributionsConfig.displayNavPop.find(fund => fund.val === action.fundId)\n )\n };\n}\n\nfunction _setUserConfiguration(distributionsConfig, fundCategory, dividendDistributionSchedule) {\n let userConfig = {\n isAllowedInConfig: false,\n categoryBlockedByUser: false,\n fundBlockedByUser: false\n };\n\n if (distributionsConfig.hideDistributionForCategory !== undefined) {\n userConfig.categoryBlockedByUser = (distributionsConfig.hideDistributionForCategory.fundCat.val === fundCategory);\n userConfig.fundBlockedByUser = (distributionsConfig.hideDistributionForFund.fundID.val === fundCategory);\n }\n\n if (distributionsConfig.displayMonthlyDiv === 'Y' && dividendDistributionSchedule === 'Monthly') {\n userConfig.isAllowedInConfig = true;\n } else if (distributionsConfig.displayQuarterlyDiv === 'Y' && dividendDistributionSchedule === 'Quarterly') {\n userConfig.isAllowedInConfig = true;\n } else if (distributionsConfig.displaySemiAnnuallyDiv === 'Y' && dividendDistributionSchedule === 'Semiannually') {\n userConfig.isAllowedInConfig = true;\n } else if (distributionsConfig.displayAnnuallyDiv === 'Y' && dividendDistributionSchedule === 'Annually') {\n userConfig.isAllowedInConfig = true;\n }\n return userConfig;\n}\n\nfunction _getDividendDistributionTypeLabel(distributions, label) {\n if (distributions.productsVO.distributionVO.dvndDistType.val === 'Y') {\n return label['daily-accrual'];\n }\n return label['ex-dividend'];\n}\n\n/**\n * Determine if data is too old.\n * @param distributionsInfo\n * @param numberOfDays\n * @private\n */\nfunction _tooOldData(distributionsInfo, numberOfDays) {\n let distInfo = distributionsInfo.find(distType => distType.type === 'THIRTYDY_YIELD_W');\n if (distInfo && distInfo.date !== '') {\n let yieldDateStr = distInfo.date.val;\n let yieldDate = new Date(Number(yieldDateStr.substring(0, 4)), Number(yieldDateStr.substring(5, 7)) - 1, Number(yieldDateStr.substring(8, 10)));\n let dateXDaysAgo = new Date();\n dateXDaysAgo.setDate(dateXDaysAgo.getDate() - numberOfDays);\n if (yieldDate < dateXDaysAgo) {\n return true;\n }\n }\n return false;\n}\n","/**\r\n* Created by bstjohn on 20/12/2016.\r\n*/\r\nimport {LogManager} from 'aurelia-framework';\r\n\r\nconst logger = LogManager.getLogger('distributions-labels-reducer');\r\n\r\nexport function distributionsLabels(state, action) {\r\n switch (action.type) {\r\n case 'POPULATE_DISTRIBUTIONS_STATE_SUCCESS':\r\n logger.debug('Reducing: POPULATE_DISTRIBUTIONS_STATE_SUCCESS');\r\n return Object.assign({}, state, _populate(action.json));\r\n default: return state;\r\n }\r\n\r\n function _populate(json) {\r\n let [labels, , , ] = json;\r\n return {\r\n distributions: {\r\n label: labels.labels\r\n }\r\n };\r\n }\r\n}\r\n","/**\r\n * Created by bstjohn on 20/12/2016.\r\n */\r\nimport {LogManager} from 'aurelia-framework';\r\n\r\nconst logger = LogManager.getLogger('distributions-ytd-reducer');\r\n\r\nexport function distributionsYtd(state, action, products) {\r\n logger.debug('populating distributions YTD data for fund: ' + action.fundId);\r\n let [, distributions, , ] = action.json;\r\n let hasYtdDetail = (distributions.productsVO.ytdDetail && (distributions.productsVO.ytdDetail.length > 0));\r\n let ytdDetail = hasYtdDetail\r\n ? distributions.productsVO.ytdDetail\r\n .filter(dtl => dtl.flag.val !== 'E')// TODO: condition should also check if distTypeKey is on a suppression list in config or (flag !== 'F' OR position === 1)\r\n .map(dtl => {\r\n let isEstimate = dtl.distAmt.val.indexOf('-') > -1;\r\n let distTypeKey = dtl.distType.val;\r\n if (isEstimate) distTypeKey += '-estimate';\r\n let flag = dtl.flag.val;\r\n let cellClass = isEstimate ? 'text-danger text-right' : 'text-right';\r\n let recdDt = state.dividendDistributionType === 'Y' ? 'Daily' : dtl.recdDt.alt2;\r\n let exDt = state.dividendDistributionType === 'Y' ? 'Daily' : dtl.exDt.alt2;\r\n let distAmt = flag === 'F' ? label['tbd'] : dtl.distAmt.val;\r\n return {\r\n monthName: dtl.month.alt,\r\n monthNumber: dtl.month.alt2,\r\n distTypeSort: dtl.distType.alt,\r\n pyblDt: dtl.pyblDt.alt2,\r\n reInvstAmt: dtl.reInvstAmt.alt,\r\n reInvstDt: dtl.reInvstDt.alt2,\r\n flag,\r\n cellClass,\r\n distTypeKey,\r\n recdDt,\r\n exDt,\r\n distAmt\r\n };\r\n })\r\n .sort((a, b) => a.monthNumber - b.monthNumber)\r\n .reduce((mnths, detail) => {\r\n let mnth = mnths.find(m => m && m.monthName === detail.monthName);\r\n if (mnth) {\r\n mnth.details.push(detail);\r\n mnth.details.sort((a, b) => {\r\n let textA = a.distTypeSort;\r\n let textB = b.distTypeSort;\r\n if (textA < textB) {\r\n return -1;\r\n }\r\n return (textA > textB) ? 1 : 0;\r\n });\r\n } else {\r\n mnths.push({\r\n monthName: detail.monthName,\r\n displayMonthHeader: (detail.flag !== 'E'),\r\n details: [detail]\r\n });\r\n }\r\n return mnths;\r\n }, [])\r\n : null;\r\n\r\n return {\r\n displayDistributionsTable: (hasYtdDetail && state.fundCategory !== 'Money Funds'),\r\n displayDistributionsTableForMoneyFunds: (hasYtdDetail && state.fundCategory === 'Money Funds'),\r\n displayNoDistributions: !hasYtdDetail,\r\n ytdDetail: ytdDetail\r\n };\r\n}\r\n","/**\r\n * Created by bstjohn on 20/12/2016.\r\n */\r\nimport {LogManager} from 'aurelia-framework';\r\nimport {showAsOfForDistributionRate, displayValue} from './util';\r\n\r\nconst logger = LogManager.getLogger('seven-days-yield-reducer');\r\n\r\nexport function sevenDaysYield(state, action, products) {\r\n if (\r\n state.fundCategory === 'Money Funds'\r\n ) {\r\n logger.debug('populating seven days yield data for fund: ' + action.fundId);\r\n let [, distributions, , ] = action.json;\r\n let label = products.distributions.label;\r\n let distributionsInfo = distributions.productsVO.distributionVO.distInfoVO;\r\n\r\n let wWaiver = distributionsInfo.find(distType => distType.type === 'SEVN_DAY_CURR_YLD_W');\r\n let woWaiver = distributionsInfo.find(distType => distType.type === 'SEVN_DAY_CURR_YLD_WO');\r\n let wWaiverEff = distributionsInfo.find(distType => distType.type === 'SEVN_DAY_EFF_YLD_W');\r\n let woWaiverEff = distributionsInfo.find(distType => distType.type === 'SEVN_DAY_EFF_YLD_WO');\r\n\r\n // TODO: need to handle additional footnotes and different layout.\r\n return {\r\n sevenDaysYield: {\r\n title: 'seven-day-yield',\r\n caveatSection: 'Fund Overview',\r\n caveatElement: '7-day Yield',\r\n showAsOf: showAsOfForDistributionRate(state, wWaiver, true, true),\r\n updateSchedule: 'updated-daily',\r\n\r\n rows: [{\r\n label: 'w-waiver',\r\n value: displayValue(wWaiver.val.val, state, label, true, true),\r\n value2: displayValue(wWaiverEff.val.val, state, label, true, true),\r\n date: wWaiver.date.alt\r\n }, {\r\n label: 'wo-waiver',\r\n value: displayValue(woWaiver.val.val, state, label, true, true),\r\n value2: displayValue(woWaiverEff.val.val, state, label, true, true),\r\n date: woWaiver.date.alt\r\n }]\r\n }\r\n };\r\n }\r\n return {};\r\n}\r\n","/**\r\n * Created by bstjohn on 20/12/2016.\r\n */\r\nimport {LogManager} from 'aurelia-framework';\r\nimport {showAsOfForDistributionRate, displayValue} from './util';\r\n\r\nconst logger = LogManager.getLogger('tax-equivalent-distributions-rate-nav-pop-reducer');\r\n\r\nexport function taxEquivalentDistributionRateNavPop(state, action, products) {\r\n if (state.isTaxFree && state.displayNavPop) {\r\n logger.debug('populating tax equivalent distribution rate (nav pop) data for fund: ' + action.fundId);\r\n let [, distributions, , ] = action.json;\r\n let label = products.distributions.label;\r\n let distributionsInfo = distributions.productsVO.distributionVO.distInfoVO;\r\n let wWaiver = distributionsInfo.find(distType => distType.type === 'TXEQUV_DISTRT_STATE');\r\n let woWaiver = distributionsInfo.find(distType => distType.type === 'TXEQUV_DISTRT_CITY');\r\n\r\n return {\r\n taxEquivalentDistributionRateNavPop: {\r\n title: 'taxable-equiv-distr-rate',\r\n caveatSection: 'Distribution Information',\r\n caveatElement: 'Taxable Equivalent Yield',\r\n showAsOf: showAsOfForDistributionRate(state.data, wWaiver),\r\n updateSchedule: 'updated-daily',\r\n\r\n rows: [{\r\n label: 'new-york-state-residents',\r\n value: displayValue(wWaiver.val.val, state, label),\r\n date: wWaiver.date.alt\r\n }, {\r\n label: 'new-york-city-residents',\r\n value: _displayValue(woWaiver.val.val, state, label),\r\n date: woWaiver.date.alt\r\n }]\r\n }\r\n };\r\n }\r\n return {};\r\n}\r\n","/**\r\n * Created by bstjohn on 20/12/2016.\r\n */\r\nimport {LogManager} from 'aurelia-framework';\r\nimport {showAsOfForDistributionRate, displayValue} from './util';\r\n\r\nconst logger = LogManager.getLogger('tax-equivalent-distributions-rate-reducer');\r\n\r\nexport function taxEquivalentDistributionRate(state, action, products) {\r\n if (state.isTaxFree && ! state.displayNavPop) {\r\n logger.debug('populating tax equivalent distribution rate data for fund: ' + action.fundId);\r\n let [, distributions, , ] = action.json;\r\n let label = products.distributions.label;\r\n let distributionsInfo = distributions.productsVO.distributionVO.distInfoVO;\r\n let wWaiver = distributionsInfo.find(distType => distType.type === 'TXEQUV_DIST_RATE');\r\n return {\r\n taxEquivalentDistributionRate: {\r\n title: 'taxable-equiv-distr-rate',\r\n caveatSection: 'Distribution Information',\r\n caveatElement: 'Taxable Equivalent Distribution Rate',\r\n showAsOf: showAsOfForDistributionRate(state, wWaiver),\r\n updateSchedule: 'updated-daily',\r\n\r\n rows: [{\r\n label: 'taxable-equiv-distr-rate',\r\n value: displayValue(wWaiver.val.val, state, label),\r\n date: wWaiver.date.alt\r\n }]\r\n }\r\n };\r\n }\r\n return {};\r\n}\r\n","/**\r\n * Created by bstjohn on 20/12/2016.\r\n */\r\nimport {LogManager} from 'aurelia-framework';\r\nimport {showAsOfForDistributionRate, displayValue} from './util';\r\n\r\nconst logger = LogManager.getLogger('tax-equivalent-yield-state-city-reducer');\r\n\r\nexport function taxEquivalentYieldStateCity(state, action, products) {\r\n if (state.isTaxFree && state.displayNavPop) {\r\n logger.debug('populating tax equivalent yield state city data for fund: ' + action.fundId);\r\n let [, distributions, , ] = action.json;\r\n let label = products.distributions.label;\r\n let distributionsInfo = distributions.productsVO.distributionVO.distInfoVO;\r\n\r\n let wWaiver = distributionsInfo.find(distType => distType.type === 'TAX_EQUV_YLD_STATE');\r\n let woWaiver = distributionsInfo.find(distType => distType.type === 'TAX_EQUV_YLD_CITY');\r\n return {\r\n taxEquivalentYieldStateCity: {\r\n title: 'taxable-equiv-yield',\r\n caveatSection: 'Distribution Information',\r\n caveatElement: 'Taxable Equivalent Yield',\r\n showAsOf: showAsOfForDistributionRate(state, wWaiver),\r\n updateSchedule: 'updated-monthly',\r\n\r\n rows: [{\r\n label: 'new-york-state-residents',\r\n value: displayValue(wWaiver.val.val, state, label),\r\n date: wWaiver.date.alt\r\n }, {\r\n label: 'new-york-city-residents',\r\n value: displayValue(woWaiver.val.val, state, label),\r\n date: woWaiver.date.alt\r\n }]\r\n }\r\n };\r\n }\r\n return {};\r\n}\r\n","/**\r\n * Created by bstjohn on 20/12/2016.\r\n */\r\nimport {LogManager} from 'aurelia-framework';\r\nimport {showAsOfForDistributionRate, displayValue} from './util';\r\n\r\nconst logger = LogManager.getLogger('tax-equivalent-yield-reducer');\r\n\r\nexport function taxEquivalentYield(state, action, products) {\r\n if ((state.isTaxFree || action.fundId === '125') && ! state.displayNavPop) {\r\n logger.debug('populating tax equivalent yield data for fund: ' + action.fundId);\r\n let [, distributions, , ] = action.json;\r\n let label = products.distributions.label;\r\n let distributionsInfo = distributions.productsVO.distributionVO.distInfoVO;\r\n\r\n let wWaiver = distributionsInfo.find(distType => distType.type === 'TAX_EQUV_YLD_W');\r\n let woWaiver = distributionsInfo.find(distType => distType.type === 'TAX_EQUV_YLD_WO');\r\n\r\n return {\r\n taxEquivalentYield: {\r\n title: 'taxable-equiv-yield',\r\n caveatSection: 'Distribution Information',\r\n caveatElement: 'Taxable Equivalent Yield',\r\n showAsOf: showAsOfForDistributionRate(state.data, wWaiver),\r\n updateSchedule: 'updated-monthly',\r\n\r\n rows: [{\r\n label: 'w-waiver',\r\n value: displayValue(wWaiver.val.val, state, label),\r\n date: wWaiver.date.alt\r\n }, {\r\n label: 'wo-waiver',\r\n value: displayValue(woWaiver.val.val, state, label),\r\n date: woWaiver.date.alt\r\n }]\r\n }\r\n };\r\n }\r\n return {};\r\n}\r\n","/**\r\n * Created by bstjohn on 20/12/2016.\r\n */\r\nimport {LogManager} from 'aurelia-framework';\r\nimport {showAsOfForDistributionRate, displayValue} from './util';\r\n\r\nconst logger = LogManager.getLogger('thirty-days-yield-reducer');\r\n\r\nexport function thirtyDaysYield(state, action, products) {\r\n if (\r\n state.fundCategory !== 'Money Funds' &&\r\n state.fundCategory !== 'Variable Annuity'\r\n ) {\r\n logger.debug('populating thirty days yield data for fund: ' + action.fundId);\r\n let [, distributions, , ] = action.json;\r\n let label = products.distributions.label;\r\n let distributionsInfo = distributions.productsVO.distributionVO.distInfoVO;\r\n\r\n let wWaiver = distributionsInfo.find(distType => distType.type === 'THIRTYDY_YIELD_W');\r\n let woWaiver = distributionsInfo.find(distType => distType.type === 'THIRTYDY_YIELD_WO');\r\n return {\r\n thirtyDaysYield: {\r\n title: 'thirty-day-std-yield',\r\n caveatSection: 'Fund Overview',\r\n caveatElement: '30-day Standardized Yield',\r\n showAsOf: showAsOfForDistributionRate(state, wWaiver),\r\n updateSchedule: 'updated-monthly',\r\n\r\n rows: [{\r\n label: 'w-waiver',\r\n value: displayValue(wWaiver.val.val, state, label),\r\n date: wWaiver.date.alt\r\n }, {\r\n label: 'wo-waiver',\r\n value: displayValue(woWaiver.val.val, state, label),\r\n date: woWaiver.date.alt\r\n }]\r\n }\r\n };\r\n }\r\n return {};\r\n}\r\n","/**\r\n * Created by bstjohn on 20/12/2016.\r\n */\r\n\r\n// for rates and yields distribution-rate\r\nexport function showAsOfForDistributionRate(state, value, ignore30days = false) {\r\n return (\r\n state.displayStatus !== 'P' &&\r\n ! Number.isNaN(value) &&\r\n ! state.tooOldData &&\r\n // (wWaiverValue !== '' || displayEmpty) &&\r\n (state.thirtyDaysStandardYieldAvailable || ignore30days)\r\n );\r\n}\r\n\r\nexport function displayValue(value, state, label, ignore30days = false, ignoreTooOldData = false) {\r\n if (!state.isAllowedInConfig || state.categoryBlockedByUser || state.fundBlockedByUser || state.displayStatus === 'P') {\r\n return label['na'];\r\n } else if ((state.tooOldData && ! ignoreTooOldData) || ( ! state.thirtyDaysStandardYieldAvailable && ! ignore30days)) {\r\n return label['mdash'];\r\n } else if (state.displayStatus !== 'P') {\r\n return value;\r\n }\r\n return '';\r\n}\r\n","/**\n * Data Reducer for historicalAverageAnnualTotalReturns\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\n\nconst logger = LogManager.getLogger('historical-average-annual-total-returns');\n\nexport function historicalAverageAnnualTotalReturns(state, action) {\n switch (action.type) {\n case 'POPULATE_HISTORICAL_AATR_MODAL_SUCCESS':\n logger.debug('Reducing: REDUCING_POPULATE_HISTORICAL_AATR_MODAL');\n\n let historicalModalData = _getHistoricalAATRData(action);\n\n return Object.assign({}, state, {\n performanceHistory: {\n data: historicalModalData,\n label: _averageAnnualTotalReturnsLabels(action)\n }\n });\n default:\n return state;\n }\n}\n\nfunction _getHistoricalAATRData(action) {\n /* 'us.fund-info', 'us.performance-historical', 'us.performance-history', 'us.history-caveats', 'us.fund-config-data', 'us.historical-average-annual-total-returns-labels', 'us.historical-cumulative-total-returns-labels', 'us.historical-after-tax-average-annual-total-returns-labels', 'usefulstuff-provider' */\n /* OLD - 'us.performance', 'us.expenses-volatility-and-benchmarks-details', 'us.fund-config-data', 'us.fund-overview', 'us.expenses-volatility-and-benchmarks-labels', 'us.performance-labels' */\n //let [performance, , configData, fundOverview, , ] = action.json;\n\n let [fundInfo, performanceHistorical, , , configData, , , , ] = action.json;\n\n const PVO = get(performanceHistorical, 'productsVO.performanceVO');\n const performanceDetails = _performanceDetailsBuilder(get(PVO, 'performanceDetails'));\n const bmkDME = get(PVO, 'bmkDetailsME');\n const theseLabels = _averageAnnualTotalReturnsLabels(action);\n\n const averageAnnualTotalReturnsMonthEnd = get(performanceDetails, 'AATR_ME.details');\n const averageAnnualTotalReturnsBmkMonthEnd = _getBenchmarkReturnDetailsObj(bmkDME, 'fundBmcRtnDetlsVO', 'AATR_BM_ME');\n const showBenchmark = true;\n\n //let fundID = get(PVO, 'fundNumber');\n let asofDateME = get(performanceDetails, 'AATR_ME.date');\n let asofDateBMME = (typeof bmkDME === 'object') ? get(bmkDME[0], 'asOfDate.alt') : Date.now();\n let fundInfoPath = get(fundInfo, 'productsVO.fundinfo');\n let fundInceptionDate = get(fundInfoPath, 'inceptionDate.alt');\n //let fundCat = fundInfoPath.fndCategory.val;\n let fundShareClass = get(fundInfoPath, 'shareClass.val');\n let configFile = get(configData, 'provider.config');\n //let salesChargeUsingWithOutSalesCharge = get(configFile, 'performance.performance.displaySalesChargeUsingWithOutSalesCharge');\n let blendedBmCountMonthEnd = _countHybrids(bmkDME);\n let benchmarkCountMonthEnd = (typeof bmkDME === 'object') ? bmkDME.length : 0;\n let showOnlyblendedBmMonthEndChart = (((benchmarkCountMonthEnd > 1) && (blendedBmCountMonthEnd > 0)) || (blendedBmCountMonthEnd > 0));\n //let showMonthEndBM = (asofDateME === asofDateBMME);\n\n let showMonthEndBM = true;\n\n let tempChart = _buildGraph(averageAnnualTotalReturnsMonthEnd, theseLabels, showBenchmark, averageAnnualTotalReturnsBmkMonthEnd);\n let suppressFundWithSalesCharge = ((get(configFile), 'performance.performance.supressFundWithSalesCharge') === 'Y');\n let additionalFundRows = _buildFundTable(suppressFundWithSalesCharge, averageAnnualTotalReturnsMonthEnd, fundShareClass, averageAnnualTotalReturnsBmkMonthEnd, showMonthEndBM);\n let showTheseBenchmarks = ((typeof averageAnnualTotalReturnsBmkMonthEnd !== 'undefined') && (showMonthEndBM === true));\n\n let additionalBenchmarkRows = _buildBenchmarkRows(showTheseBenchmarks, averageAnnualTotalReturnsBmkMonthEnd, showOnlyblendedBmMonthEndChart, blendedBmCountMonthEnd);\n\n let startDate = get(PVO, 'perfStartDate.val');\n let endDate = get(performanceDetails, 'AATR_ME.date');\n\n let chartDates = {\n asofDate: asofDateME,\n asofDateBM: asofDateBMME\n };\n\n let obj = {\n chartDates: chartDates,\n chartData: tempChart,\n chartName: 'month-end',\n chartType: 'column',\n showBenchmark: showBenchmark,\n fundInceptionDate: fundInceptionDate,\n averageAnnualTotalReturns: averageAnnualTotalReturnsMonthEnd,\n additionalFundRows: additionalFundRows,\n additionalBenchmarkRows: additionalBenchmarkRows,\n fundInfoPath: fundInfoPath,\n startDate: startDate,\n endDate: endDate\n };\n\n return obj;\n}\n\nfunction _buildBenchmarkRows(showTheseBenchmarks, averageAnnualTotalReturnsBmk, showOnlyblendedBmChart, blendedBmCount) {\n if (!showTheseBenchmarks) return false;\n\n averageAnnualTotalReturnsBmk.sort(function(a, b) {\n return a.benchMarkOrder - b.benchMarkOrder;\n });\n\n let hideRow;\n for (let thisBenchmark of averageAnnualTotalReturnsBmk) {\n if (showOnlyblendedBmChart === true) {\n if (((blendedBmCount > 1) && (thisBenchmark.benchMarkOrder > 4)) || ((blendedBmCount > 0) && (thisBenchmark.benchMarkOrder > 3))) {\n hideRow = true;\n }\n hideRow = false;\n } else hideRow = thisBenchmark.benchMarkOrder <= 2;\n thisBenchmark.hideRow = hideRow;\n }\n\n let shownRows = [];\n\n for (let thisBenchmark of averageAnnualTotalReturnsBmk) {\n if (thisBenchmark.hideRow === false) {\n shownRows.push(thisBenchmark);\n }\n }\n\n return shownRows;\n}\n\nfunction _countHybrids(benchmarks) {\n if (!benchmarks) return;\n let hybrids = 0;\n for (let benchmark of benchmarks) {\n (benchmark.hybridFlag === 'Y') ? hybrids++ : '';\n }\n return hybrids;\n}\n\nfunction _buildFundTable(suppressFundWithSalesCharge, aatr, fundShareClass) {\n if ((suppressFundWithSalesCharge) || (!aatr)) return false;\n\n let fundTableType;\n if ((fundShareClass === 'Advisor') || (fundShareClass === 'R') || (fundShareClass === 'R6') || (fundShareClass === 'Z')) {\n fundTableType = 'rtnWOSC';\n } else {\n fundTableType = 'rtnWSC';\n }\n let fundTable = {\n oneYear: aatr[fundTableType + 'OneYear'].alt,\n threeYears: aatr[fundTableType + 'ThreeYears'].alt,\n fiveYears: aatr[fundTableType + 'FiveYears'].alt,\n tenYears: aatr[fundTableType + 'TenYears'].alt,\n sinceInception: aatr[fundTableType + 'SinceInception'].alt\n };\n return fundTable;\n}\n\nfunction _buildGraph(chartData, theseLabels, showBenchmarks, benchMarks) {\n let thisGraph = { fundWO: [] };\n if (typeof chartData !== 'undefined') {\n thisGraph.fundWO.push({name: theseLabels['fund-without-sales-charge'], y: Number(chartData.rtnWOSCOneYear.alt)});\n thisGraph.fundWO.push({name: theseLabels['fund-without-sales-charge'], y: Number(chartData.rtnWOSCThreeYears.alt)});\n thisGraph.fundWO.push({name: theseLabels['fund-without-sales-charge'], y: Number(chartData.rtnWOSCFiveYears.alt)});\n thisGraph.fundWO.push({name: theseLabels['fund-without-sales-charge'], y: Number(chartData.rtnWOSCTenYears.alt)});\n thisGraph.fundWO.push({name: theseLabels['fund-without-sales-charge'], y: Number(chartData.rtnWOSCSinceInception.alt)});\n }\n if (showBenchmarks && (typeof benchMarks !== 'undefined')) {\n let i = 1;\n for (let benchmark of benchMarks) {\n let benchmarkNumber = 'benchmark' + i;\n thisGraph[benchmarkNumber] = [];\n thisGraph[benchmarkNumber].push({name: benchmark.benchMarkName, y: Number(benchmark.oneYrRtn)});\n thisGraph[benchmarkNumber].push({name: benchmark.benchMarkName, y: Number(benchmark.threeYrRtn)});\n thisGraph[benchmarkNumber].push({name: benchmark.benchMarkName, y: Number(benchmark.fiveYrRtn)});\n thisGraph[benchmarkNumber].push({name: benchmark.benchMarkName, y: Number(benchmark.tenYrRtn)});\n thisGraph[benchmarkNumber].push({name: benchmark.benchMarkName, y: Number(benchmark.sinceInception)});\n i++;\n }\n }\n\n return thisGraph;\n}\n\nfunction _getBenchmarkReturnDetailsObj(deets, where, wanted) {\n if (!deets) return;\n let deetsAry = [];\n for (let deet of deets) {\n let newObj = {};\n let metaDeet = {\n benchMarkName: deet.benchMarkName.val,\n benchMarkOrder: parseInt(deet.benchMarkOrder.val, 10) + 2,\n colourCode: parseInt(deet.benchMarkOrder.val, 10) + 1,\n hybridFlag: deet.hybridFlag,\n hideRow: ''\n };\n for (let thisDetail of deet[where]) {\n if (thisDetail.type === wanted) {\n let shinyNewObj = {\n oneYrRtn: thisDetail.oneYrRtn.alt,\n threeYrRtn: thisDetail.threeYrRtn.alt,\n fiveYrRtn: thisDetail.fiveYrRtn.alt,\n tenYrRtn: thisDetail.tenYrRtn.alt,\n sinceInception: thisDetail.sinceInception.alt\n };\n newObj = Object.assign(metaDeet, shinyNewObj);\n deetsAry.push(newObj);\n }\n }\n }\n return deetsAry;\n}\n\nfunction _performanceDetailsBuilder(performanceDetails) {\n let newPerformanceDetails = {};\n if (performanceDetails) {\n for (let performanceDetail of performanceDetails) {\n let newPDType = performanceDetail.type;\n newPerformanceDetails[newPDType] = {\n date: performanceDetail.asOfDate.alt,\n details: performanceDetail.fundPerfRtnDetlsVO\n };\n }\n }\n return newPerformanceDetails;\n}\n\nfunction _averageAnnualTotalReturnsLabels(action) {\n /* 'us.fund-info', 'us.performance-historical', 'us.performance-history', 'us.history-caveats', 'us.fund-config-data', 'us.historical-average-annual-total-returns-labels', 'us.historical-cumulative-total-returns-labels', 'us.historical-after-tax-average-annual-total-returns-labels', 'usefulstuff-provider' */\n let [ , , , , , performanceLabels, , ] = action.json;\n\n let newLabels = {};\n\n let lSource = get(performanceLabels, 'provider.labels.label');\n\n if (typeof lSource !== 'undefined') {\n for (let item of lSource) {\n let key = get(item, 'key');\n let val = get(item, 'value');\n newLabels[`${key.toString()}`] = val;\n }\n }\n return newLabels;\n}\n\n","/**\n * Data Reducer for historicalCumulativeTotalReturns\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\n\nconst logger = LogManager.getLogger('historical-cumulative-total-returns');\n\nexport function historicalCumulativeTotalReturns(state, action) {\n switch (action.type) {\n case 'POPULATE_HISTORICAL_CUMULATIVE_TOTAL_RETURNS_SUCCESS':\n logger.debug('Reducing: POPULATE_HISTORICAL_CUMULATIVE_TOTAL_RETURNS');\n\n let historicalCTRData = _getHistoricalCTRData(action);\n\n return Object.assign({}, state, {\n historicalCumulativeTotalReturns: {\n data: historicalCTRData,\n label: _historicalCTRLabels(action)\n }\n });\n default:\n return state;\n }\n}\n\nfunction _getHistoricalCTRData(action) {\n /* OLD 'us.performance', 'us.expenses-volatility-and-benchmarks-details', 'us.fund-config-data', 'us.fund-overview', 'us.expenses-volatility-and-benchmarks-labels', 'us.performance-labels', 'us.cumulative-total-returns-labels', 'us.fund-info' */\n /* 'us.fund-info', 'us.performance-historical', 'us.performance-history', 'us.history-caveats', 'us.fund-config-data', 'us.historical-average-annual-total-returns-labels', 'us.historical-cumulative-total-returns-labels', 'us.historical-after-tax-average-annual-total-returns-labels', 'usefulstuff-provider' */\n let [fundInfo, performance, , , configData, , , , ] = action.json;\n\n const PVO = get(performance, 'productsVO.performanceVO');\n let performanceDetails = _performanceDetailsBuilder(get(PVO, 'performanceDetails'));\n\n const bmkDME = get(PVO, 'bmkDetailsME');\n\n const cumulativeTotalReturnsMonthEnd = get(performanceDetails, 'CTR_ME.details');\n const cumulativeTotalReturnsBmkMonthEnd = _getBenchmarkReturnDetailsObj(bmkDME, 'fundBmcRtnDetlsVO', 'CTR_BM_ME');\n // const showBenchmark = true;\n // let fundID = get(PVO, 'fundNumber');\n const asofDateME = get(performanceDetails, 'CTR_ME.date');\n const asofDateBMME = (typeof cumulativeTotalReturnsBmkMonthEnd === 'object') ? get(cumulativeTotalReturnsBmkMonthEnd[0], 'asOfDate') : Date.now();\n\n const fundInfoPath = get(fundInfo, 'productsVO.fundinfo');\n const fundShareClass = get(fundInfoPath, 'shareClass.val');\n\n const configFile = get(configData, 'provider.config');\n\n const blendedBmCountMonthEnd = _countHybrids(bmkDME);\n const benchmarkCountMonthEnd = (typeof bmkDME === 'object') ? bmkDME.length : 0;\n\n const showOnlyblendedBmMonthEndChart = (((benchmarkCountMonthEnd > 1) && blendedBmCountMonthEnd > 0) || blendedBmCountMonthEnd > 0);\n //const showMonthEndBM = (asofDateME === asofDateBMME);\n\n const showMonthEndBM = true;\n\n const suppressors = get(configFile, 'peformance.performance');\n const suppressFundWithSalesCharge = (get(suppressors, 'supressFundWithSalesCharge') === 'Y');\n\n let additionalFundRows = _buildFundTable(suppressFundWithSalesCharge, cumulativeTotalReturnsMonthEnd, fundShareClass, cumulativeTotalReturnsBmkMonthEnd, showMonthEndBM);\n let showTheseBenchmarks = ((typeof cumulativeTotalReturnsBmkMonthEnd !== 'undefined') && (showMonthEndBM === true));\n let additionalBenchmarkRows = _buildBenchmarkRows(showTheseBenchmarks, cumulativeTotalReturnsBmkMonthEnd, showOnlyblendedBmMonthEndChart, blendedBmCountMonthEnd);\n\n // const caveatvo = \"/Properties/Data/Result/providers/provider/productsVO/caveatvo\";\n let fundDates = {\n asofDate: asofDateME,\n asofDateBM: asofDateBMME\n };\n\n let obj = {\n fundDates: fundDates,\n cumulativeTotalReturns: cumulativeTotalReturnsMonthEnd,\n additionalFundRows: additionalFundRows,\n additionalBenchmarkRows: additionalBenchmarkRows,\n fundInfoPath: fundInfoPath\n };\n\n return obj;\n}\n\nfunction _buildFundTable(suppressFundWithSalesCharge, cumulativeTotalReturns, fundShareClass) {\n if ((suppressFundWithSalesCharge) || (!cumulativeTotalReturns)) return false;\n\n let fundTableType;\n if ((fundShareClass === 'Advisor') || (fundShareClass === 'R') || (fundShareClass === 'R6') || (fundShareClass === 'Z')) {\n fundTableType = 'rtnWOSC';\n } else {\n fundTableType = 'rtnWSC';\n }\n\n let fundTable = {\n ytd: cumulativeTotalReturns[fundTableType + 'YTD'].alt,\n oneYear: cumulativeTotalReturns[fundTableType + 'OneYear'].alt,\n threeYears: cumulativeTotalReturns[fundTableType + 'ThreeYears'].alt,\n fiveYears: cumulativeTotalReturns[fundTableType + 'FiveYears'].alt,\n tenYears: cumulativeTotalReturns[fundTableType + 'TenYears'].alt,\n sinceInception: cumulativeTotalReturns[fundTableType + 'SinceInception'].alt\n };\n return fundTable;\n}\n\nfunction _buildBenchmarkRows(showTheseBenchmarks, bmks, showOnlyblendedBmChart, blendedBmCount) {\n if (!showTheseBenchmarks) return false;\n\n bmks.sort(function(a, b) {\n return a.benchMarkOrder - b.benchMarkOrder;\n });\n\n let hideRow;\n for (let thisBenchmark of bmks) {\n if (showOnlyblendedBmChart === true) {\n if (((blendedBmCount > 1) && (thisBenchmark.benchMarkOrder > 4)) || ((blendedBmCount > 0) && (thisBenchmark.benchMarkOrder > 3))) {\n hideRow = true;\n }\n hideRow = false;\n } else hideRow = thisBenchmark.benchMarkOrder <= 2;\n thisBenchmark.hideRow = hideRow;\n }\n\n let shownRows = [];\n\n for (let thisBenchmark of bmks) {\n if (thisBenchmark.hideRow === false) {\n shownRows.push(thisBenchmark);\n }\n }\n\n return shownRows;\n}\n\nfunction _countHybrids(benchmarks) {\n if (!benchmarks) return;\n let hybrids = 0;\n for (let benchmark of benchmarks) {\n (benchmark.hybridFlag === 'Y') ? hybrids++ : '';\n }\n return hybrids;\n}\n\nfunction _getBenchmarkReturnDetailsObj(deets, where, wanted) {\n if (!deets) return;\n let deetsAry = [];\n for (let deet of deets) {\n let newObj = {};\n let metaDeet = {\n asOfDate: deet.asOfDate.alt,\n benchMarkName: deet.benchMarkName.val,\n benchMarkOrder: parseInt(deet.benchMarkOrder.val, 10) + 2,\n colourCode: parseInt(deet.benchMarkOrder.val, 10) + 1,\n hybridFlag: deet.hybridFlag,\n hideRow: ''\n };\n for (let thisDetail of deet[where]) {\n if (thisDetail.type === wanted) {\n let shinyNewObj = {\n ytdRtn: thisDetail.ytdRtn.alt,\n oneYrRtn: thisDetail.oneYrRtn.alt,\n threeYrRtn: thisDetail.threeYrRtn.alt,\n fiveYrRtn: thisDetail.fiveYrRtn.alt,\n tenYrRtn: thisDetail.tenYrRtn.alt,\n sinceInception: thisDetail.sinceInception.alt\n };\n newObj = Object.assign(metaDeet, shinyNewObj);\n deetsAry.push(newObj);\n }\n }\n }\n return deetsAry;\n}\n\nfunction _performanceDetailsBuilder(performanceDetails) {\n let newPerformanceDetails = {};\n if (performanceDetails) {\n for (let performanceDetail of performanceDetails) {\n let newPDType = performanceDetail.type;\n newPerformanceDetails[newPDType] = {\n date: performanceDetail.asOfDate.alt,\n details: performanceDetail.fundPerfRtnDetlsVO\n };\n }\n }\n return newPerformanceDetails;\n}\n\n\nfunction _historicalCTRLabels(action) {\n /* 'us.fund-info', 'us.performance-historical', 'us.performance-history', 'us.history-caveats', 'us.fund-config-data', 'us.historical-average-annual-total-returns-labels', 'us.historical-cumulative-total-returns-labels', 'us.historical-after-tax-average-annual-total-returns-labels', 'usefulstuff-provider' */\n let [ , , , , , , cumulativeLabels, , ] = action.json;\n\n let newLabels = {};\n\n let lSource = get(cumulativeLabels, 'provider.labels.label');\n\n if (typeof lSource !== 'undefined') {\n for (let item of lSource) {\n let key = get(item, 'key');\n let val = get(item, 'value');\n newLabels[`${key.toString()}`] = val;\n }\n }\n return newLabels;\n}\n","/**\n * Data Reducer for fundInformation\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport get from 'lodash/get';\nimport {portfolioUtils} from '../../../../portfolio/util/util';\n\nimport {LogManager} from 'aurelia-framework';\n\nconst logger = LogManager.getLogger('fund-information');\n\nexport function fundInformation(state, action) {\n switch (action.type) {\n case 'POPULATE_FUND_INFORMATION_SUCCESS':\n logger.debug('Reducing: POPULATE_FUND_INFORMATION_SUCCESS');\n\n const data = _infoBuilder(action);\n\n return Object.assign({}, state, {\n fundInformation: {\n data: data.data\n }\n });\n default:\n return state;\n }\n}\n\n/**\n * @param {Object} fundDetailIntl\n * @param {Object} rawPricesDetails\n * @param {string} currency eg USD\n * @return {Object}\n * @private\n */\nfunction _extractDividendInfo(fundDetailIntl, rawPricesDetails, currency) {\n let dividendMap = {\n 'distribution-per-unit': {\n dataKey: 'pricesDetails.globalProductsValue.etfPriceDivValue.dividend.divPerUnit.val',\n type: 'currency'\n },\n 'distribution-date': {\n dataKey: 'pricesDetails.globalProductsValue.etfPriceDivValue.dividend.distDt.val',\n type: 'string'\n },\n 'dividend-frequency': {\n dataKey: 'firstShClsDet.dvndFreq.val',\n type: 'string'\n }\n };\n const shClsDetArray = get(fundDetailIntl, 'shClsDet');\n return portfolioUtils.getExtractFormattedValues({\n firstShClsDet: shClsDetArray[0],\n pricesDetails: rawPricesDetails\n }, dividendMap, currency, true);\n}\n\n/**\n * @param {Object} fundDetailIntl\n * @param {string} currency eg USD\n * @return {Object}\n * @private\n */\nfunction _extractSalesCharges(fundDetailIntl, currency) {\n // Harder to understand acronyms\n // \"expRatioWthWvr\" == Total Expenses Ratio with Waver\n let salesMap = {\n 'total-expenses-ratio': {\n dataKey: 'feeCharges.expRatioWthWvr.val',\n type: 'percentage'\n },\n 'ongoing-charges-ratio': {\n dataKey: 'feeCharges.ongoingChrgeRatio.val',\n type: 'percentage'\n }\n };\n return portfolioUtils.getExtractFormattedValues(fundDetailIntl, salesMap, currency, true);\n}\n\n/**\n * @param {Object} fundDetailIntl\n * @return {Object}\n * @private\n */\nfunction _extractFundInformation(fundDetailIntl) {\n const shClsDetArray = get(fundDetailIntl, 'shClsDet');\n const subSetList = [\n 'fundIncpDt',\n 'etfDet.region',\n 'fundMiscDet.GBIsaStat',\n 'fundBaseCur',\n 'dontexist'\n ];\n\n const shareClassList = [\n 'shClIncDtLcl',\n 'shClsCur'\n ];\n // get the subdata and merge them together.\n const tempObj = Object.assign({},\n portfolioUtils.getSubSetData( fundDetailIntl, subSetList),\n portfolioUtils.getSubSetData( shClsDetArray[0], shareClassList));\n return portfolioUtils.splitObject(tempObj);\n}\n\nfunction _infoBuilder(action) {\n const [rawFundDetail, rawPriceInfo, rawConfig] = action.json;\n const config = portfolioUtils.getConfig(rawConfig);\n\n const fundDetailIntl = get(rawFundDetail, 'globalProductsValue.fundDetailIntl');\n\n const visible = (typeof fundDetailIntl !== 'undefined');\n const obj = {\n caveatSecName: 'Overview',\n tableID: 'fund-information',\n visible: visible\n };\n\n if (visible) {\n const expAsOfDt = get(fundDetailIntl, 'etfDet.expAsOfDt.val');\n const baseCurrency = get(fundDetailIntl, 'fundBaseCur.val');\n obj.data = {\n caveatSecName: 'Overview',\n expAsOfDt,\n visible,\n values: _extractFundInformation(fundDetailIntl).data,\n salesAsOf: get(fundDetailIntl, 'feeCharges.asOfDate.val'),\n salesCharges: _extractSalesCharges(fundDetailIntl, baseCurrency),\n dividendAsOf: get(rawPriceInfo, 'globalProductsValue.etfPriceDivValue.dividend.asOfDt.val'),\n dividendValues: _extractDividendInfo(fundDetailIntl, rawPriceInfo, baseCurrency),\n distributionYieldAsOf: get(rawPriceInfo, 'globalProductsValue.etfPriceDivValue.dvndYldAsOfDate.val'),\n distributionYield: get(rawPriceInfo, 'globalProductsValue.etfPriceDivValue.dvndYld.val')\n };\n obj.spanRow = config.spanRow;\n }\n\n return obj;\n}\n","/**\n * Data Reducer for fundInformation\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport get from 'lodash/get';\nimport {portfolioUtils} from '../../../../portfolio/util/util';\n\nimport {LogManager} from 'aurelia-framework';\n\nconst logger = LogManager.getLogger('fund-information');\n\n/**\n * @param {Object} state\n * @param action\n * @returns {Object}\n */\nexport function fundInformation(state, action) {\n switch (action.type) {\n case 'POPULATE_FUND_INFORMATION_SUCCESS':\n logger.debug('Reducing: POPULATE_FUND_INFORMATION_SUCCESS');\n const [, labelsArray] = action.json;\n\n const data = _infoBuilder(action);\n const etfLabels = Object.assign({}, getEtfLabels(labelsArray, ['AS_OF_DATE']), data.label);\n //const etfLabels = Object.assign({}, getEtfLabels(labelsArray), data.label);\n\n return Object.assign({}, state, {\n fundInformation: {\n data: data.data,\n label: etfLabels\n }\n });\n default:\n return state;\n }\n}\n\n// TODO: code duplicated 4-5 times should be refactored into one place\n// non override version in label-loader.reducer.js\nfunction getEtfLabels(rawLabels, wantedOverRide = []) {\n const newLabels = {};\n const lSource = get(rawLabels, 'globalProductsValue.etfProductLabelsValue.labelList');\n const allFlag = (wantedOverRide.length === 0);\n if (typeof lSource !== 'undefined') {\n for (const item of lSource) {\n const key = get(item, 'field.val');\n if (wantedOverRide.indexOf(key) !== -1 || allFlag) {\n newLabels[`${key.toString()}`] = get(item, 'value.val');\n }\n }\n }\n\n return newLabels;\n}\n\n/**\n * @param {Object} fundDetailIntl\n * @param {string} currency eg USD\n * @return {Object}\n * @private\n */\nfunction _extractSalesCharges(fundDetailIntl, currency) {\n // Harder to understand acronyms\n // \"perfFee\" == Performance Fee\n // \"MER\" == Management Expense Ratio\n // \"expRatioWthWvr\" == Total Expenses Ratio with Waver\n let salesMap = {\n 'maintenance-charge': {\n dataKey: 'feeCharges.mgmtChrge.val',\n type: 'percentage'\n },\n 'management-charge': {\n dataKey: 'feeCharges.mgmtChrge.val',\n type: 'percentage'\n },\n 'total-expenses-ratio': {\n dataKey: 'feeCharges.expRatioWthWvr.val',\n type: 'percentage'\n },\n 'ongoing-charges-ratio': {\n dataKey: 'feeCharges.ongoingChrgeRatio.val',\n type: 'percentage'\n },\n 'total-annual-charge': {\n dataKey: 'feeCharges.totAnulChrge.val',\n type: 'percentage'\n },\n 'minimum-initial-amount': {\n dataKey: 'feeCharges.initSalesChrge.val',\n type: 'percentage'\n },\n 'max-sales-charge': {\n dataKey: 'feeCharges.maxAdmnFee.val',\n type: 'currency'\n },\n 'minimum-subsequent-amount': {\n dataKey: 'CAN\\'T FIND',\n type: 'currency'\n }\n };\n return portfolioUtils.getExtractFormattedValues(fundDetailIntl, salesMap, currency);\n}\n\nfunction _infoBuilder(action) {\n const [rawFundDetail, rawConfig] = action.json;\n const config = portfolioUtils.getConfig(rawConfig);\n\n const fundDetailIntl = get(rawFundDetail, 'globalProductsValue.fundDetailIntl');\n\n const visible = (typeof fundDetailIntl !== 'undefined');\n const obj = {\n caveatSecName: 'Overview', tableID: 'fund-information', visible: visible\n };\n\n if (visible) {\n const additionalLabels = {\n 'as-of': 'As of'\n };\n\n const subSetList = [\n 'fundIncpDt',\n 'etfDet.region',\n 'fundMiscDet.GBIsaStat',\n 'fundBaseCur',\n 'dontexist'\n ];\n\n const shareClassList = [\n 'shClIncDtLcl',\n 'shClsCur'\n ];\n\n /*\n\n ☠ Missing labels ☠\n\n AS_OF_DATE: \"As of\"\n fundIncpDt: \"Launch Date\"\n region: \"\"\n GBIsaStat: \"ISA Status\"\n fundBaseCur: \"Base Currency\"\n dontexist: \"\"\n shClIncDtLcl: \"Inception Date\"\n shClsCur: \"Currency\"\n as-of: \"As of\"\n\n\n */\n\n const expAsOfDt = get(fundDetailIntl, 'etfDet.expAsOfDt.val');\n\n const shClsDetArray = get(fundDetailIntl, 'shClsDet');\n\n // get the subdata and merge them together.\n const tempObj = Object.assign({},\n portfolioUtils.getSubSetData( fundDetailIntl, subSetList),\n portfolioUtils.getSubSetData( shClsDetArray[0], shareClassList));\n\n const splitData = portfolioUtils.splitObject(tempObj);\n\n const labels = Object.assign({}, splitData.label, additionalLabels);\n const baseCurrency = get(fundDetailIntl, 'fundBaseCur.val');\n obj.data = {\n caveatSecName: 'Overview',\n expAsOfDt,\n visible,\n values: splitData.data,\n salesAsOf: get(fundDetailIntl, 'feeCharges.asOfDate.val'),\n salesCharges: _extractSalesCharges(fundDetailIntl, baseCurrency),\n dividendAsOf: null, // NOT IMPLEMENTED YET\n dividendValues: [], // NOT IMPLEMENTED YET\n distributionYieldAsOf: null, // NOT IMPLEMENTED YET\n distributionYield: null // NOT IMPLEMENTED YET\n };\n obj.label = labels;\n obj.spanRow = config.spanRow;\n }\n\n return obj;\n}\n","/**\n * Data Reducer for fundStaticBar\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\nimport findIndex from 'lodash/findIndex';\nimport {portfolioUtils} from '../../../../portfolio/util/util';\nconst logger = LogManager.getLogger('fund-static-bar');\n\nexport function fundStaticBar(state, action) {\n switch (action.type) {\n case 'POPULATE_FUND_STATIC_BAR_SUCCESS':\n logger.debug('Reducing: POPULATE_FUND_STATIC_BAR_SUCCESS');\n\n let data = _getFundStaticBarData(action);\n let labels = _getLabels(action);\n let proximity = _getOverviewProximity(action);\n\n return Object.assign({}, state, {\n fundStaticBar: {\n label: labels,\n data: data,\n proximity: proximity\n }\n });\n default:\n return state;\n }\n}\n\nfunction _getLabels(action) {\n let [ , , rawLabels ] = action.json;\n return portfolioUtils.getLabels(rawLabels);\n}\n\nfunction _getOverviewProximity(action) {\n logger.info(action);\n let [ rawFundOverview ] = action.json;\n\n let caveats = Object.assign({}, get(rawFundOverview, 'fundOverviewVO.caveatvo'));\n // Move the array up one level from .text into impLegalInfo\n if (caveats.hasOwnProperty('impLegalInfo')) {\n caveats.impLegalInfo = caveats.impLegalInfo.text.slice();\n caveats.displayLegalInfo = (caveats.impLegalInfo.length > 0);\n }\n return caveats;\n}\n\n/*\nfunction _getIsAllowedInConfig( configFileDistributions, dvndDistSchd) {\n let isAllowedInConfig = false;\n let dvndDistSchdVal = get(dvndDistSchd, 'val');\n\n if (get(configFileDistributions, 'displayMonthlyDiv') === 'Y' && dvndDistSchdVal === 'Monthly') {\n isAllowedInConfig = true;\n }\n\n if (get(configFileDistributions, 'displayQuarterlyDiv') === 'Y' && dvndDistSchdVal === 'Quarterly') {\n isAllowedInConfig = true;\n }\n\n if (get(configFileDistributions, 'displaySemiAnnuallyDiv') === 'Y' && dvndDistSchdVal === 'Semiannually') {\n isAllowedInConfig = true;\n }\n\n if (get(configFileDistributions, 'displayAnnuallyDiv') === 'Y' && dvndDistSchdVal === 'Annually') {\n isAllowedInConfig = true;\n }\n\n if (dvndDistSchdVal === '-') {\n isAllowedInConfig = true;\n }\n\n return (isAllowedInConfig ? 'Y' : 'N');\n}\n*/\n/*\n\nfunction _getDisplayDistributionRateAtBreakpoint(params) {\n let rval = '';\n if (!params.categoryBlockedByUser) {\n if (params.displayStatus !== 'P') {\n if (!params.fundBlockedByUser) {\n if (params.isAllowedInConfig === 'Y') {\n if (params.shareClass === 'A' || params.shareClass === 'A1') {\n if (fundCat !== 'Money Funds') {\n rval = true;\n }\n }\n }\n }\n }\n }\n\n return rval;\n}\n*/\n\nfunction finder(detail, match, wanted) {\n let matchMaker = {};\n matchMaker[match] = wanted;\n logger.debug(matchMaker);\n let index = findIndex( detail, matchMaker);\n let rObj;\n if (index !== -1) {\n rObj = Object.assign({}, detail[index]);\n }\n return rObj;\n}\n\n/*\nfunction matcher(matchArray, matchAgainst) {\n let found = matchArray.indexOf(matchAgainst);\n return (found !== -1);\n}\n*/\n\nfunction getOverviewHeaderLeftClass(fundCat) {\n let rVal = 'col-print-4 col-sm-4 col-lg-12';\n\n if (fundCat === 'Variable Annuity') {\n rVal = 'col-print-4 col-sm-4 col-lg-12';\n } else if (fundCat === 'Money Funds') {\n rVal = 'col-print-3 col-sm-4 col-lg-12';\n }\n\n return rVal;\n}\n\nfunction getHeaderTemplatePicker(fundCat) {\n let rVal = 'price-header';\n\n if (fundCat === 'Variable Annuity') {\n rVal = 'price-header-vip';\n } else if (fundCat === 'Money Funds') {\n rVal = 'price-header-money';\n }\n\n return rVal;\n}\n\n\nfunction getlegalBalanceClass(fundCat) {\n let rVal = 'col-print-8 col-sm-12 col-lg-12';\n\n if (fundCat === 'Variable Annuity') {\n rVal = 'col-print-8 col-sm-12 col-lg-12';\n } else if (fundCat === 'Money Funds') {\n rVal = 'col-print-9 col-sm-12 col-lg-12';\n }\n\n return rVal;\n}\n\nfunction getOverviewPricingSettings(params ) {\n let rObj = {headerTemplate: params.headerTemplate};\n\n if (params.fundCat === 'Variable Annuity') {\n // rVal = 'price-header-vip';\n let stats = get(params.overviewPath, 'portfolio.stats');\n let ytd = finder(stats, 'type', 'YTD_TOT_RETURN');\n rObj.headerLabel = 'total-returns';\n rObj.asOfDate = get(ytd, 'date.alt');\n } else if (params.fundCat === 'Money Funds') {\n // rVal = 'price-header-money';\n rObj.headerLabel = 'price-money';\n rObj.asOfDate = get(params.overviewPath, 'price.navdate.alt');\n rObj.displayStatus = get(params, 'displayStatus');\n } else {\n rObj.headerLabel = 'price';\n rObj.asOfDate = get(params.overviewPath, 'price.navdate.alt');\n }\n\n\n return rObj;\n}\n\nfunction _getFundStaticBarData(action ) {\n // replicating the variables from iws-international\\iw-mount\\international\\main\\admin\\resources\\WORKAREA\\ALL\\iwov-resources\\xsl\\gw\\components\\products\\us\\fund-overview\\utils-overview.xsl\n\n let [ rawFundOverview, rawFundConfig, , /* rawUsefulstuff*/ ] = action.json;\n\n // const usefulstuff = get(rawUsefulstuff, 'provider.Useful');\n const overviewPath = get(rawFundOverview, 'fundOverviewVO');\n // const distributionsPath = get(overviewPath, 'distribution');\n // const distributionsPathDistrVO = get(rawDistribution, 'productsVO.distributionVO');\n // const distributionsPathDistrVO = distributionsPath;\n\n // const performancePath = get(overviewPath, 'perf');\n\n // const fundInfoPath = get(rawFundInfo, 'fundInfo');\n const fundInfoPath = get(overviewPath, 'fundInfo');\n\n const configFile = get(rawFundConfig, 'provider.config');\n // let toggleSetting = 'OFF';\n\n // const configFileDistributions = get(configFile, 'global.distributions');\n const displayStatus = get(fundInfoPath, 'displayStatus.val' );\n const fundCat = get(fundInfoPath, 'fndCategory.val' );\n // const shareClass = get(fundInfoPath, 'shareClass.val' );\n const fundID = get(fundInfoPath, 'fundNumber.val' );\n\n // const fundBlockedByUser = '';\n // const categoryBlockedByUser = '';\n /*\n TODO: Some sort of get by end value?\n\n fundBlockedByUser =\n categoryBlockedByUser =\n <xsl:variable name=\"fundBlockedByUser\" select=\"$configFileDistributions/hideDistributionForFund/fundID/val=$fundID\"/>\n <xsl:variable name=\"categoryBlockedByUser\" select=\"$configFileDistributions/hideDistributionForCategory/fundCat/val=$fundCat\"/>\n */\n\n // const numberOfDays = get(configFileDistributions, 'thirtyDayStandardizedDataTimeframe');\n // const dvndDistSchd = get(distributionsPath, 'dvndDistSchd.val');\n // const chargesPath = get(configFile, 'global.salesCharges');\n\n // let THIRTYDY_YIELD_W = finder(get(distributionsPath, 'distInfoVO'), 'type', 'THIRTYDY_YIELD_W');\n // let AATR_QE = finder(get(performancePath, 'performanceDetails'), 'type', 'AATR_QE');\n // let fundPerfRtnDetlsVO = get(AATR_QE, 'fundPerfRtnDetlsVO');\n\n // const pricingSchedule = get(overviewPath, 'fundInfo.pricingStructure.val');\n // const isAllowedInConfig = _getIsAllowedInConfig(configFileDistributions, dvndDistSchd);\n\n // const caveatvo = get(overviewPath, 'caveatvo');\n // const footnotes = get(caveatvo, 'elementLevel');\n // const date10yearsAgo = get(usefulstuff, 'DateTenYearsAgo' );\n // const inceptionDate = get(fundInfoPath, 'inceptionDate.alt');\n\n // const isClosed = (displayStatus === 'H' || displayStatus === 'S') ? 'Y' : '';\n const isPartial = (displayStatus === 'P') ? 'Y' : '';\n // const isTaxFree = (fundCat === 'Tax Free Income') ? 'Y' : '';\n\n // const displayDistributionRateAtBreakpoint = _getDisplayDistributionRateAtBreakpoint({categoryBlockedByUser, displayStatus, fundBlockedByUser, isAllowedInConfig, shareClass, fundCat });\n\n // const thirtyDayStdYieldAvailable = (THIRTYDY_YIELD_W.val && THIRTYDY_YIELD_W.val !== '') ? 'Y' : 'N';\n\n // const wSalesEqualswoSales = matcher(['R', 'R6', 'Advisor', 'Z'], shareClass) ? 'Y' : 'N';\n\n // const oneyearretOFF = get(fundPerfRtnDetlsVO, 'rtnWOSCOneYear.alt');\n // const oneyearretON = ( wSalesEqualswoSales === 'Y') ? get(fundPerfRtnDetlsVO, 'rtnWOSCOneYear.alt') : get(fundPerfRtnDetlsVO, 'rtnWSCOneYear.alt');\n // const oneyearret = (toggleSetting === 'ON' && !(fundCat === 'Variable Annuity')) ? oneyearretON : oneyearretOFF;\n\n // const fiveyearretOFF = get(fundPerfRtnDetlsVO, 'rtnWOSCFiveYears.alt');\n // const fiveyearretON = ( wSalesEqualswoSales === 'Y') ? get(fundPerfRtnDetlsVO, 'rtnWOSCFiveYears.alt') : get(fundPerfRtnDetlsVO, 'rtnWSCFiveYears.alt');\n // const fiveyearret = (toggleSetting === 'ON' && !(fundCat === 'Variable Annuity')) ? fiveyearretON : fiveyearretOFF;\n\n // const lifearretOFF = get(fundPerfRtnDetlsVO, 'rtnWOSCSinceInception.alt');\n // const lifearretON = ( wSalesEqualswoSales === 'Y') ? get(fundPerfRtnDetlsVO, 'rtnWOSCSinceInception.alt') : get(fundPerfRtnDetlsVO, 'rtnWSCSinceInception.alt');\n // const lifearret = (toggleSetting === 'ON' && !(fundCat === 'Variable Annuity')) ? lifearretON : lifearretOFF;\n\n // const tenyearretOFF = get(fundPerfRtnDetlsVO, 'rtnWOSCTenYears.alt');\n // const tenyearretON = ( wSalesEqualswoSales === 'Y') ? get(fundPerfRtnDetlsVO, 'rtnWOSCTenYears.alt') : get(fundPerfRtnDetlsVO, 'rtnWSCTenYears.alt');\n // const tenyearret = (toggleSetting === 'ON' && !(fundCat === 'Variable Annuity')) ? tenyearretON : tenyearretOFF;\n\n const pricingAvailable = (get(configFile, 'global.supressPricing.fundcat.val') !== fundCat) ? 'Y' : 'N';\n\n const visible = true;\n\n let priceObj = get(overviewPath, 'price');\n let nvc = get(priceObj, 'nvc');\n logger.debug('nvc', nvc);\n\n let fundStaticBarSettings = {\n leftWidth: (pricingAvailable === 'Y') ? 'col-lg-6' : 'col-lg-3',\n ytdWidth: (pricingAvailable === 'Y') ? 'year-to-date col-print-5 col-sm-6 col-lg-4' : 'year-to-date col-sm-12 col-lg-12',\n overviewHeaderLeftClass: getOverviewHeaderLeftClass(fundCat),\n headerTemplate: getHeaderTemplatePicker(fundCat),\n legalBalanceContainer: getlegalBalanceClass(fundCat)\n };\n\n let overviewPricingSettings = {\n overviewPath,\n fundCat,\n displayStatus,\n headerTemplate: fundStaticBarSettings.headerTemplate\n };\n\n let navHeader = {\n displayStatus,\n prefix: '$',\n nvc: parseFloat(get(nvc, 'val')),\n pricenav: get(nvc, 'alt'),\n pricenavfourdeci: get(nvc, 'alt2'),\n isPartial,\n nvcBool: (typeof get(nvc, 'val')) !== 'undefined',\n nav: get(priceObj, 'nav.alt2'),\n navdate: get(priceObj, 'navdate.alt')\n };\n\n fundStaticBarSettings.overviewPricingSettings = getOverviewPricingSettings(overviewPricingSettings);\n\n /*let bigObjs = {\n caveatvo,\n chargesPath,\n configFile,\n configFileDistributions,\n distributionsPath,\n fundInfoPath,\n overviewPath,\n performancePath\n };\n\n let alsoAvailable = {\n date10yearsAgo,\n displayDistributionRateAtBreakpoint,\n displayStatus,\n dvndDistSchd,\n fiveyearret,\n fiveyearretOFF,\n fiveyearretON,\n footnotes,\n inceptionDate,\n isAllowedInConfig,\n isClosed,\n isPartial,\n isTaxFree,\n lifearret,\n lifearretOFF,\n lifearretON,\n numberOfDays,\n oneyearret,\n oneyearretOFF,\n oneyearretON,\n pricingAvailable,\n pricingSchedule,\n shareClass,\n tenyearret,\n tenyearretOFF,\n tenyearretON,\n thirtyDayStdYieldAvailable,\n wSalesEqualswoSales\n };*/\n\n let obj = {\n fundStaticBarSettings,\n fundCat,\n caveatSecName: 'Fund Overview',\n navHeader,\n visible: visible,\n fundID\n };\n\n return obj;\n}\n","/**\n * Data Reducer for fundTradingCharacteristics\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport get from 'lodash/get';\nimport {portfolioUtils} from '../../../../portfolio/util/util';\nimport {LogManager} from 'aurelia-framework';\nconst logger = LogManager.getLogger('fund-trading-characteristics');\n\nexport function fundTradingCharacteristics(state, action) {\n switch (action.type) {\n case 'POPULATE_FUND_TRADING_CHARACTERISTICS_SUCCESS':\n logger.debug('Reducing: POPULATE_FUND_TRADING_CHARACTERISTICS_SUCCESS');\n const [, labelsArray] = action.json;\n const data = _infoBuilder(action);\n const etfLabels = Object.assign({}, getEtfLabels(labelsArray, ['AS_OF_DATE']), data.label);\n //const etfLabels = Object.assign({}, getEtfLabels(labelsArray), data.label);\n\n return Object.assign({}, state, {\n fundInformation: {\n data: data.data,\n label: etfLabels\n }\n });\n default:\n return state;\n }\n}\n\n// TODO: code duplicated 4-5 times should be refactored into one place\n// non override version in label-loader.reducer.js\nfunction getEtfLabels(rawLabels, wantedOverRide = []) {\n const newLabels = {};\n const lSource = get(rawLabels, 'globalProductsValue.etfProductLabelsValue.labelList');\n const allFlag = (wantedOverRide.length === 0);\n if (typeof lSource !== 'undefined') {\n for (const item of lSource) {\n const key = get(item, 'field.val');\n if (wantedOverRide.indexOf(key) !== -1 || allFlag) {\n newLabels[`${key.toString()}`] = get(item, 'value.val');\n }\n }\n }\n\n return newLabels;\n}\n\nfunction _infoBuilder(action) {\n const [rawFundDetail, rawConfig] = action.json;\n const config = portfolioUtils.getConfig(rawConfig);\n\n const fundDetailIntl = get(rawFundDetail, 'etfFundOverviewValue');\n\n const visible = (typeof fundDetailIntl !== 'undefined');\n const obj = {\n caveatSecName: 'Overview', tableID: 'fund-overview', visible: visible\n };\n\n if (visible) {\n const additionalLabels = {\n 'asOfDateForNav': 'As of',\n 'TRADING_CHARACTERISTICS': 'TRADING CHARACTERISTICS',\n 'SHARES_OUTSTANDING': 'Shares Outstanding',\n 'DISTRIBUTIONS': 'DISTRIBUTIONS',\n 'dvndFreq': 'Frequency',\n 'incmDistPbleDt': 'Last Paid Date',\n 'incmDistAmt': 'Last Paid Amount',\n 'dvndYld': 'Distributions Yield'\n };\n\n const subSetList = [\n 'fundDet.shClsDet[0].dvndFreq',\n 'priceDet.dividend.incmDistAmt',\n 'priceDet.dividend.incmDistPbleDt',\n 'priceDet.dividend.dvndYld'\n ];\n\n const expAsOfDt = get(fundDetailIntl, 'priceDet.asOfDateForNav.val');\n const sharesOutstanding = get(fundDetailIntl, 'priceDet.navDetailValue.shreOutStndng');\n\n // get the subdata and merge them together.\n const tempObj = Object.assign({},\n portfolioUtils.getSubSetData( fundDetailIntl, subSetList)\n );\n\n const splitData = portfolioUtils.splitObject(tempObj);\n\n const labels = Object.assign({}, splitData.label, additionalLabels);\n\n obj.data = {\n caveatSecName: 'Overview',\n visible,\n expAsOfDt,\n sharesOutstanding,\n values: splitData.data\n };\n obj.label = labels;\n obj.spanRow = config.spanRow;\n }\n\n return obj;\n}\n","/**\n * Data Reducer for afterTaxAverageAnnualReturns\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\nimport {getCaveats} from '../../../../common/utilities/utils';\n\nconst logger = LogManager.getLogger('after-tax-average-annual-returns');\n\nexport function afterTaxAverageAnnualReturns(state, action) {\n switch (action.type) {\n case 'POPULATE_AFTER_TAX_SUCCESS':\n logger.debug('Reducing: POPULATE_AFTER_TAX_SUCCESS');\n\n let data = _getAfterTaxData(action);\n let labels = _getAfterTaxReturnLabels(action);\n let performanceDetails = _getPerformanceDetails(action);\n let MONTHLY = _getPerformanceDetailsME(performanceDetails);\n let QUARTERLY = _getPerformanceDetailsQE(performanceDetails);\n let MonthlyTab = _tabData(MONTHLY);\n let QuarterlyTab = _tabData(QUARTERLY);\n let MonthlyGraph = _getchartData(MonthlyTab);\n let QuarterlyGraph = _getchartData(QuarterlyTab);\n let CVO = _getAfterTaxAverageAnnualReturns(action);\n let caveats = getCaveats(CVO, data.secName);\n\n return Object.assign({}, state, {\n afterTaxAverageAnnualReturns: {\n data: data,\n label: labels,\n MONTHLY: MonthlyTab,\n QUARTERLY: QuarterlyTab,\n MonthlyGraph: MonthlyGraph,\n QuarterlyGraph: QuarterlyGraph,\n caveats: caveats\n }\n });\n default:\n return state;\n }\n}\n/**\n * Returns Data object\n * @param {any} action\n * @returns Object\n */\nfunction _getAfterTaxData(action) {\n /*'us.performance', 'us.performance-labels'*/\n const fundID = action.fundId;\n // let [performance] = action.json;\n let obj = {\n caveatSecName: 'Proximal - Performance - After.Tax.Av.An.Tot.Ret. - Top',\n secName: 'Performance - After-Tax Average Annual Total Returns Tab',\n fundID: fundID\n };\n\n return obj;\n}\n/**\n * Returns Labels for page\n * @param {Object} action\n * @returns Object\n */\nfunction _getAfterTaxReturnLabels(action) {\n let [, performanceLabels] = action.json;\n let labels = get(performanceLabels, 'after-tax-average-annual-total-returns-labels');\n return labels;\n}\n/**\n * Returns performanceDetails Object\n * @param {Object} action\n * @returns {desc.value|default.result|undefined}\n */\nfunction _getPerformanceDetails(action) {\n let [performance] = action.json;\n let performanceDetails = get(performance, 'productsVO.performanceVO.performanceDetails');\n return performanceDetails;\n}\n/**\n * Returns Monthlt data\n * @param {Object} performanceDetails\n * @returns {desc.value|default.result|undefined}\n */\nfunction _getPerformanceDetailsME(performanceDetails) {\n if (!performanceDetails) return;\n let performanceDetailsME = [];\n for (let performanceDetailsRec of performanceDetails) {\n if (performanceDetailsRec.type === 'ATAATR_BSS_ME' || performanceDetailsRec.type === 'ATAATR_ASS_ME') {\n performanceDetailsME.push(performanceDetailsRec);\n }\n }\n return performanceDetailsME;\n}\n/**\n * Returns Quarterly data\n * @param {Obiect} performanceDetails\n * @returns {desc.value|default.result|undefined}\n */\nfunction _getPerformanceDetailsQE(performanceDetails) {\n if (!performanceDetails) return;\n let performanceDetailsQE = [];\n for (let performanceDetailsRec of performanceDetails) {\n if (performanceDetailsRec.type === 'ATAATR_BSS_QE' || performanceDetailsRec.type === 'ATAATR_ASS_QE') {\n performanceDetailsQE.push(performanceDetailsRec);\n }\n }\n return performanceDetailsQE;\n}\n/**\n * Returns data for table\n * @param {Object} period\n * @returns {undefined}\n */\nfunction _tabData(period) {\n if (!period) return;\n let periodTab = {asOfDate: period[0].asOfDate, ATAATR_BSS_WOSC: [], ATAATR_BSS_WSC: [], ATAATR_ASS_WOSC: [], ATAATR_ASS_WSC: []};\n for (let periodRec of period) {\n if (periodRec.type === 'ATAATR_BSS_ME' || periodRec.type === 'ATAATR_BSS_QE') {\n periodTab.ATAATR_BSS_WOSC = [\n periodRec.fundPerfRtnDetlsVO.rtnWOSCOneYear,\n periodRec.fundPerfRtnDetlsVO.rtnWOSCThreeYears,\n periodRec.fundPerfRtnDetlsVO.rtnWOSCFiveYears,\n periodRec.fundPerfRtnDetlsVO.rtnWOSCTenYears\n ];\n }\n if (periodRec.type === 'ATAATR_BSS_ME' || periodRec.type === 'ATAATR_BSS_QE') {\n periodTab.ATAATR_BSS_WSC = [\n periodRec.fundPerfRtnDetlsVO.rtnWSCOneYear,\n periodRec.fundPerfRtnDetlsVO.rtnWSCThreeYears,\n periodRec.fundPerfRtnDetlsVO.rtnWSCFiveYears,\n periodRec.fundPerfRtnDetlsVO.rtnWSCTenYears\n ];\n }\n if (periodRec.type === 'ATAATR_ASS_ME' || periodRec.type === 'ATAATR_ASS_QE') {\n periodTab.ATAATR_ASS_WOSC = [\n periodRec.fundPerfRtnDetlsVO.rtnWOSCOneYear,\n periodRec.fundPerfRtnDetlsVO.rtnWOSCThreeYears,\n periodRec.fundPerfRtnDetlsVO.rtnWOSCFiveYears,\n periodRec.fundPerfRtnDetlsVO.rtnWOSCTenYears\n ];\n }\n if (periodRec.type === 'ATAATR_ASS_ME' || periodRec.type === 'ATAATR_ASS_QE') {\n periodTab.ATAATR_ASS_WSC = [\n periodRec.fundPerfRtnDetlsVO.rtnWSCOneYear,\n periodRec.fundPerfRtnDetlsVO.rtnWSCThreeYears,\n periodRec.fundPerfRtnDetlsVO.rtnWSCFiveYears,\n periodRec.fundPerfRtnDetlsVO.rtnWSCTenYears\n ];\n }\n }\n return periodTab;\n}\n/**\n * Returns data for Chart\n * @param {Object} tableData\n * @returns {_getchartData.thisGraph}\n */\nfunction _getchartData(tableData) {\n if (!tableData) return;\n let thisGraph = { fundWOBS: [], fundWOAS: [] };\n if (typeof tableData !== 'undefined') {\n for (let fundWOVal of tableData.ATAATR_BSS_WOSC) {\n let fundNWOVal = fundWOVal.val;\n thisGraph.fundWOBS.push({\n name: 'Before Shares Sold',\n y: Number((fundNWOVal === null) ? 0 : fundNWOVal)\n });\n }\n for (let fundWOVal of tableData.ATAATR_ASS_WOSC) {\n let fundNWOVal = fundWOVal.val;\n thisGraph.fundWOAS.push({\n name: 'After Shares Sold',\n y: Number((fundNWOVal === null) ? 0 : fundNWOVal)\n });\n }\n }\n\n return thisGraph;\n}\n/**\n * Returns CaveatVO object\n * @param {any} action\n * @returns Object\n */\nfunction _getAfterTaxAverageAnnualReturns(action) {\n let [performance] = action.json;\n let CVO = get(performance, 'productsVO.caveatvo');\n return CVO;\n}\n","const averageAnnualTotalReturnsConfig = {\n 'Data': {\n 'Datum': {\n '-ID': 'showBenchmark',\n '-Name': 'showBenchmark',\n '-Label': 'Show Benchmark',\n '-Type': 'RadioGroup',\n 'Option': [\n {\n '-Selected': 'true',\n 'Display': 'Yes',\n 'Value': 'yes'\n },\n {\n 'Display': 'No',\n 'Value': 'no'\n }\n ]\n }\n }\n};\nexport {averageAnnualTotalReturnsConfig as default};\n","/**\n * Data Reducer for averageAnnualTotalReturns\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\n//import {averageAnnualTotalReturnsConfig} from './average-annual-total-returns.config';\nimport get from 'lodash/get';\n\nconst logger = LogManager.getLogger('average-annual-total-returns');\n\nexport function averageAnnualTotalReturns(state, action) {\n switch (action.type) {\n case 'POPULATE_AVERAGE_ANNUAL_TOTAL_RETURNS_SUCCESS':\n logger.debug('Reducing: POPULATE_AVERAGE_ANNUAL_TOTAL_RETURNS_SUCCESS');\n\n let averageAnnualTotalReturnsMEData = _averageAnnualTotalReturnsMEData(action);\n let averageAnnualTotalReturnsQEData = _averageAnnualTotalReturnsQEData(action);\n let labels = _averageAnnualTotalReturnsLabels(action);\n\n return Object.assign({}, state, {\n averageAnnualTotalReturns: {\n label: labels,\n MONTH_END: averageAnnualTotalReturnsMEData,\n QUARTER_END: averageAnnualTotalReturnsQEData\n }\n });\n default:\n return state;\n }\n}\n\nfunction _averageAnnualTotalReturnsMEData(action) {\n /* 'us.performance', 'us.expenses-volatility-and-benchmarks-details', 'us.fund-config-data', 'us.fund-overview', 'us.expenses-volatility-and-benchmarks-labels', 'us.performance-labels' */\n let [performance, , configData, fundOverview, , ] = action.json;\n\n const PVO = get(performance, 'productsVO.performanceVO');\n const performanceDetails = _performanceDetailsBuilder(get(PVO, 'performanceDetails'));\n const bmkDME = get(PVO, 'bmkDetailsME');\n const theseLabels = _averageAnnualTotalReturnsLabels(action);\n\n const averageAnnualTotalReturnsMonthEnd = get(performanceDetails, 'AATR_ME.details');\n const averageAnnualTotalReturnsBmkMonthEnd = _getBenchmarkReturnDetailsObj(bmkDME, 'fundBmcRtnDetlsVO', 'AATR_BM_ME');\n const showBenchmark = true;\n\n //let fundID = get(PVO, 'fundNumber');\n let asofDateME = get(performanceDetails, 'AATR_ME.date');\n let asofDateBMME = (typeof bmkDME === 'object') ? get(bmkDME[0], 'asOfDate.alt') : Date.now();\n let fundInfoPath = get(fundOverview, 'fundOverviewVO.fundInfo');\n let fundInceptionDate = get(fundInfoPath, 'inceptionDate.alt');\n //let fundCat = fundInfoPath.fndCategory.val;\n let fundShareClass = get(fundInfoPath, 'shareClass.val');\n let configFile = get(configData, 'provider.config');\n //let salesChargeUsingWithOutSalesCharge = get(configFile, 'performance.performance.displaySalesChargeUsingWithOutSalesCharge');\n let blendedBmCountMonthEnd = _countHybrids(bmkDME);\n let benchmarkCountMonthEnd = (typeof bmkDME === 'object') ? bmkDME.length : 0;\n let showOnlyblendedBmMonthEndChart = (((benchmarkCountMonthEnd > 1) && (blendedBmCountMonthEnd > 0)) || (blendedBmCountMonthEnd > 0));\n let showMonthEndBM = (asofDateME === asofDateBMME);\n\n let tempChart = _buildGraph(averageAnnualTotalReturnsMonthEnd, theseLabels, showBenchmark, averageAnnualTotalReturnsBmkMonthEnd);\n let suppressFundWithSalesCharge = ((get(configFile), 'performance.performance.supressFundWithSalesCharge') === 'Y');\n let additionalFundRows = _buildFundTable(suppressFundWithSalesCharge, averageAnnualTotalReturnsMonthEnd, fundShareClass, averageAnnualTotalReturnsBmkMonthEnd, showMonthEndBM);\n let showTheseBenchmarks = ((typeof averageAnnualTotalReturnsBmkMonthEnd !== 'undefined') && (showMonthEndBM === true));\n\n let additionalBenchmarkRows = _buildBenchmarkRows(showTheseBenchmarks, averageAnnualTotalReturnsBmkMonthEnd, showOnlyblendedBmMonthEndChart, blendedBmCountMonthEnd);\n\n let chartDates = {\n asofDate: asofDateME,\n asofDateBM: asofDateBMME\n };\n\n let obj = {\n chartDates: chartDates,\n chartData: tempChart,\n chartName: 'month-end',\n chartType: 'column',\n showBenchmark: showBenchmark,\n fundInceptionDate: fundInceptionDate,\n averageAnnualTotalReturns: averageAnnualTotalReturnsMonthEnd,\n additionalFundRows: additionalFundRows,\n additionalBenchmarkRows: additionalBenchmarkRows\n };\n\n return obj;\n}\n\nfunction _averageAnnualTotalReturnsQEData(action) {\n // 'us.performance', 'us.expenses-volatility-and-benchmarks-details', 'us.fund-config-data', 'us.fund-overview', 'us.expenses-volatility-and-benchmarks-labels', 'us.performance-labels'\n let [performance, , configData, fundOverview, , ] = action.json;\n\n const PVO = get(performance, 'productsVO.performanceVO');\n const performanceDetails = _performanceDetailsBuilder(get(PVO, 'performanceDetails'));\n\n const bmkDQE = get(PVO, 'bmkDetailsQE');\n const theseLabels = _averageAnnualTotalReturnsLabels(action);\n\n const averageAnnualTotalReturnsQuarterEnd = get(performanceDetails, 'AATR_QE.details');\n const averageAnnualTotalReturnsBmkQuarterEnd = _getBenchmarkReturnDetailsObj(bmkDQE, 'fundBmcRtnDetlsVO', 'AATR_BM_QE');\n const showBenchmark = true;\n // let fundID = get(PVO, 'fundNumber');\n let asofDateQE = get(performanceDetails, 'AATR_QE.date');\n let asofDateBMQE = (typeof bmkDQE === 'object') ? get(bmkDQE[0], 'asOfDate.alt') : Date.now();\n let fundInfoPath = get(fundOverview, 'fundOverviewVO.fundInfo');\n let fundInceptionDate = get(fundInfoPath, 'inceptionDate.alt');\n // let fundCat = fundInfoPath.fndCategory.val;\n let fundShareClass = get(fundInfoPath, 'shareClass.val');\n let configFile = get(configData, 'provider.config');\n //let salesChargeUsingWithOutSalesCharge = get(configFile, 'performance.performance.displaySalesChargeUsingWithOutSalesCharge');\n let blendedBmCountQuarterEnd = _countHybrids(bmkDQE);\n let benchmarkCountQuarterEnd = (typeof bmkDQE === 'object') ? bmkDQE.length : 0;\n let showOnlyblendedBmQuarterEndChart = (((benchmarkCountQuarterEnd > 1) && (blendedBmCountQuarterEnd > 0)) || (blendedBmCountQuarterEnd > 0));\n let showQuarterEndBM = (asofDateQE === asofDateBMQE);\n\n let tempChart = _buildGraph(averageAnnualTotalReturnsQuarterEnd, theseLabels, showBenchmark, averageAnnualTotalReturnsBmkQuarterEnd);\n let suppressFundWithSalesCharge = ((get(configFile), 'performance.performancesupressFundWithSalesCharge') === 'Y');\n let additionalFundRows = _buildFundTable(suppressFundWithSalesCharge, averageAnnualTotalReturnsQuarterEnd, fundShareClass, averageAnnualTotalReturnsBmkQuarterEnd, showQuarterEndBM);\n let showTheseBenchmarks = ((typeof averageAnnualTotalReturnsBmkQuarterEnd !== 'undefined') && (showQuarterEndBM === true));\n\n let additionalBenchmarkRows = _buildBenchmarkRows(showTheseBenchmarks, averageAnnualTotalReturnsBmkQuarterEnd, showOnlyblendedBmQuarterEndChart, blendedBmCountQuarterEnd);\n\n let chartDates = {\n asofDate: asofDateQE,\n asofDateBM: asofDateBMQE\n };\n\n let obj = {\n chartDates: chartDates,\n chartData: tempChart,\n chartName: 'quarter-end',\n chartType: 'column',\n showBenchmark: showBenchmark,\n fundInceptionDate: fundInceptionDate,\n averageAnnualTotalReturns: averageAnnualTotalReturnsQuarterEnd,\n additionalFundRows: additionalFundRows,\n additionalBenchmarkRows: additionalBenchmarkRows\n };\n\n return obj;\n}\n\nfunction _buildBenchmarkRows(showTheseBenchmarks, averageAnnualTotalReturnsBmk, showOnlyblendedBmChart, blendedBmCount) {\n if (!showTheseBenchmarks) return false;\n\n averageAnnualTotalReturnsBmk.sort(function(a, b) {\n return a.benchMarkOrder - b.benchMarkOrder;\n });\n\n let hideRow;\n for (let thisBenchmark of averageAnnualTotalReturnsBmk) {\n if (showOnlyblendedBmChart === true) {\n if (((blendedBmCount > 1) && (thisBenchmark.benchMarkOrder > 4)) || ((blendedBmCount > 0) && (thisBenchmark.benchMarkOrder > 3))) {\n hideRow = true;\n }\n hideRow = false;\n } else hideRow = thisBenchmark.benchMarkOrder <= 2;\n thisBenchmark.hideRow = hideRow;\n }\n\n let shownRows = [];\n\n for (let thisBenchmark of averageAnnualTotalReturnsBmk) {\n if (thisBenchmark.hideRow === false) {\n shownRows.push(thisBenchmark);\n }\n }\n\n return shownRows;\n}\n\nfunction _countHybrids(benchmarks) {\n if (!benchmarks) return;\n let hybrids = 0;\n for (let benchmark of benchmarks) {\n (benchmark.hybridFlag === 'Y') ? hybrids++ : '';\n }\n return hybrids;\n}\n\nfunction _buildFundTable(suppressFundWithSalesCharge, aatr, fundShareClass) {\n if ((suppressFundWithSalesCharge) || (!aatr)) return false;\n\n let fundTableType;\n if ((fundShareClass === 'Advisor') || (fundShareClass === 'R') || (fundShareClass === 'R6') === (fundShareClass === 'Z')) {\n fundTableType = 'rtnWOSC';\n } else {\n fundTableType = 'rtnWSC';\n }\n let fundTable = {\n oneYear: aatr[fundTableType + 'OneYear'].alt,\n threeYears: aatr[fundTableType + 'ThreeYears'].alt,\n fiveYears: aatr[fundTableType + 'FiveYears'].alt,\n tenYears: aatr[fundTableType + 'TenYears'].alt,\n sinceInception: aatr[fundTableType + 'SinceInception'].alt\n };\n return fundTable;\n}\n\nfunction _buildGraph(chartData, theseLabels, showBenchmarks, benchMarks) {\n let thisGraph = { fundWO: [] };\n if (typeof chartData !== 'undefined') {\n thisGraph.fundWO.push({name: theseLabels['fund-without-sales-charge'], y: Number(chartData.rtnWOSCOneYear.alt)});\n thisGraph.fundWO.push({name: theseLabels['fund-without-sales-charge'], y: Number(chartData.rtnWOSCThreeYears.alt)});\n thisGraph.fundWO.push({name: theseLabels['fund-without-sales-charge'], y: Number(chartData.rtnWOSCFiveYears.alt)});\n thisGraph.fundWO.push({name: theseLabels['fund-without-sales-charge'], y: Number(chartData.rtnWOSCTenYears.alt)});\n thisGraph.fundWO.push({name: theseLabels['fund-without-sales-charge'], y: Number(chartData.rtnWOSCSinceInception.alt)});\n }\n if (showBenchmarks && (typeof benchMarks !== 'undefined')) {\n let i = 1;\n for (let benchmark of benchMarks) {\n let benchmarkNumber = 'benchmark' + i;\n thisGraph[benchmarkNumber] = [];\n thisGraph[benchmarkNumber].push({name: benchmark.benchMarkName, y: Number(benchmark.oneYrRtn)});\n thisGraph[benchmarkNumber].push({name: benchmark.benchMarkName, y: Number(benchmark.threeYrRtn)});\n thisGraph[benchmarkNumber].push({name: benchmark.benchMarkName, y: Number(benchmark.fiveYrRtn)});\n thisGraph[benchmarkNumber].push({name: benchmark.benchMarkName, y: Number(benchmark.tenYrRtn)});\n thisGraph[benchmarkNumber].push({name: benchmark.benchMarkName, y: Number(benchmark.sinceInception)});\n i++;\n }\n }\n\n return thisGraph;\n}\n\nfunction _getBenchmarkReturnDetailsObj(deets, where, wanted) {\n if (!deets) return;\n let deetsAry = [];\n for (let deet of deets) {\n let newObj = {};\n let metaDeet = {\n benchMarkName: deet.benchMarkName.val,\n benchMarkOrder: parseInt(deet.benchMarkOrder.val, 10) + 2,\n colourCode: parseInt(deet.benchMarkOrder.val, 10) + 1,\n hybridFlag: deet.hybridFlag,\n hideRow: ''\n };\n for (let thisDetail of deet[where]) {\n if (thisDetail.type === wanted) {\n let shinyNewObj = {\n oneYrRtn: thisDetail.oneYrRtn.alt,\n threeYrRtn: thisDetail.threeYrRtn.alt,\n fiveYrRtn: thisDetail.fiveYrRtn.alt,\n tenYrRtn: thisDetail.tenYrRtn.alt,\n sinceInception: thisDetail.sinceInception.alt\n };\n newObj = Object.assign(metaDeet, shinyNewObj);\n deetsAry.push(newObj);\n }\n }\n }\n return deetsAry;\n}\n\nfunction _performanceDetailsBuilder(performanceDetails) {\n let newPerformanceDetails = {};\n if (performanceDetails) {\n for (let performanceDetail of performanceDetails) {\n let newPDType = performanceDetail.type;\n newPerformanceDetails[newPDType] = {\n date: performanceDetail.asOfDate.alt,\n details: performanceDetail.fundPerfRtnDetlsVO\n };\n }\n }\n return newPerformanceDetails;\n}\n\nfunction _averageAnnualTotalReturnsLabels(action) {\n let [ , , , , , performanceLabels] = action.json;\n return get(performanceLabels, 'average-annual-total-returns-labels');\n}\n","/**\n * Data Reducer for performanceAnnualised\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\n\nconst logger = LogManager.getLogger('performance-annualised');\n\nexport function backtestedPerformanceAnnualised(state, action) {\n switch (action.type) {\n case 'POPULATE_BACKTESTED_PERFORMANCE_ANNUALISED_SUCCESS':\n logger.debug('Reducing: POPULATE_BACKTESTED_PERFORMANCE_ANNUALISED_SUCCESS');\n\n let [performance] = action.json;\n\n let PI = get(performance, 'globalProductsValue.performanceIntl');\n let PB = get(PI, 'perfBackTestedDetailsList');\n let tableHeaders = ['1 YEAR', '3 YEARS', '5 YEARS', '10 YEARS', '15 YEARS'];\n\n let performances = _performanceBuilder(PB, tableHeaders);\n\n let labels = _performanceAnnualisedLabels(action);\n\n return Object.assign({}, state, {\n backtestedPerformance: {\n label: labels,\n tableHeaders: tableHeaders,\n performances: performances\n }\n });\n default:\n return state;\n }\n}\n\nfunction _performanceBuilder(performances, tableHeaders) {\n let aggPerfs = [];\n let graphData = [];\n let yearAry = tableHeaders;\n\n for (let thisObj of performances) {\n let theseItems = {};\n let thisAvgAnnual = thisObj.avgAnnual;\n let asOfDate = get(thisObj, 'asOfDateStd.val');\n let thisName = get(thisObj, 'calcName.lbl');\n\n let avgAnnualItems = ['oneYrBMC', 'threeYrBMC', 'fiveYrBMC', 'tenYrBMC', 'sinceIncpBMC'];\n\n avgAnnualItems.forEach(item => (theseItems[item] = ((thisAvgAnnual[item].hasOwnProperty('val') === true) ? parseFloat(thisAvgAnnual[item].val) : null)));\n\n let backtested = {\n name: thisName,\n asOfDate: asOfDate,\n oneYr: theseItems.oneYrBMC,\n threeYr: theseItems.threeYrBMC,\n fiveYr: theseItems.fiveYrBMC,\n tenYr: theseItems.tenYrBMC,\n SI: theseItems.sinceIncpBMC\n };\n\n aggPerfs.push(backtested);\n\n let thesePoints = [\n { name: backtested.name, y: backtested.oneYr },\n { name: backtested.name, y: backtested.threeYr },\n { name: backtested.name, y: backtested.fiveYr },\n { name: backtested.name, y: backtested.tenYr },\n { name: backtested.name, y: backtested.SI }\n ];\n\n graphData.push(thesePoints);\n }\n\n let calDataObj = {\n years: yearAry,\n rows: aggPerfs\n };\n\n let dataObj = {\n tableData: calDataObj,\n graphData: graphData\n };\n\n return dataObj;\n}\nfunction _performanceAnnualisedLabels(action) {\n let [ , performanceLabels ] = action.json;\n return get(performanceLabels, 'performance-annualised-labels');\n}\n","/**\n * Data Reducer for performanceAnnualised\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\n\nconst logger = LogManager.getLogger('performance-annualised');\n\nexport function backtestedPerformanceCalendar(state, action) {\n switch (action.type) {\n case 'POPULATE_BACKTESTED_PERFORMANCE_CALENDAR_SUCCESS':\n logger.debug('Reducing: POPULATE_BACKTESTED_PERFORMANCE_CALENDAR_SUCCESS');\n\n let [performance] = action.json;\n\n let PI = get(performance, 'globalProductsValue.performanceIntl');\n let PB = get(PI, 'perfBackTestedDetailsList');\n\n let tableHeaders = _performanceCalendarHeaders(PB);\n let performances = (typeof PB !== 'undefined') ? _performanceBuilder(PB, tableHeaders) : null;\n let labels = _performanceCalendarLabels(action);\n\n return Object.assign({}, state, {\n backtestedPerformance: {\n label: labels,\n tableHeaders: tableHeaders,\n performances: performances\n }\n });\n default:\n return state;\n }\n}\n\nfunction _performanceBuilder(performances, tableHeaders) {\n let aggPerfs = [];\n let graphData = [];\n let yearAry = tableHeaders;\n\n for (let thisObj of performances) {\n let theseItems = {};\n let thisCalDetail = get(thisObj, 'calendarDetail');\n let asOfDate = get(thisObj, 'asOfDateStd.val');\n let thisName = get(thisObj, 'calcName.lbl');\n\n let calDetailItems = ['oneYrBMC', 'twoYrBMC', 'threeYrBMC', 'fourYrBMC', 'fiveYrBMC', 'sixYrBMC', 'sevenYrBMC', 'eightYrBMC', 'nineYrBMC', 'tenYrBMC'];\n\n calDetailItems.forEach(item => (theseItems[item] = ((thisCalDetail[item].hasOwnProperty('val') === true) ? parseFloat(thisCalDetail[item].val) : null)));\n\n let backtested = {\n name: thisName,\n asOfDate: asOfDate,\n oneYr: theseItems.oneYrBMC,\n twoYr: theseItems.twoYrBMC,\n threeYr: theseItems.threeYrBMC,\n fourYr: theseItems.fourYrBMC,\n fiveYr: theseItems.fiveYrBMC,\n sixYr: theseItems.sixYrBMC,\n sevenYr: theseItems.sevenYrBMC,\n eightYr: theseItems.eightYrBMC,\n nineYr: theseItems.nineYrBMC,\n tenYr: theseItems.tenYrBMC\n };\n\n aggPerfs.push(backtested);\n\n let thesePoints = [\n { name: backtested.name, y: backtested.oneYr },\n { name: backtested.name, y: backtested.twoYr },\n { name: backtested.name, y: backtested.threeYr },\n { name: backtested.name, y: backtested.fourYr },\n { name: backtested.name, y: backtested.fiveYr },\n { name: backtested.name, y: backtested.sixYr },\n { name: backtested.name, y: backtested.sevenYr },\n { name: backtested.name, y: backtested.eightYr },\n { name: backtested.name, y: backtested.nineYr },\n { name: backtested.name, y: backtested.tenYr }\n ];\n\n graphData.push(thesePoints);\n }\n\n let calDataObj = {\n years: yearAry,\n rows: aggPerfs\n };\n\n return {\n tableData: calDataObj,\n graphData: graphData\n };\n}\n\nfunction _performanceCalendarLabels(action) {\n let [ , performanceLabels ] = action.json;\n return get(performanceLabels, 'calendar-year-returns-labels');\n}\n\nfunction _performanceCalendarHeaders(action) {\n if (typeof action === 'undefined') {\n return;\n }\n let thisCalDetail = action[0];\n let calHeaderItems = ['perf1Yr', 'perf2Yr', 'perf3Yr', 'perf4Yr', 'perf5Yr', 'perf6Yr', 'perf7Yr', 'perf8Yr', 'perf9Yr', 'perf10Yr'];\n return calHeaderItems.map(item => thisCalDetail[item].hasOwnProperty('val') ? thisCalDetail[item].val : null);\n}\n","/**\n * Data Reducer for performanceAnnualised\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\n\nconst logger = LogManager.getLogger('performance-annualised');\n\nexport function backtestedPerformanceCumulative(state, action) {\n switch (action.type) {\n case 'POPULATE_BACKTESTED_PERFORMANCE_CUMULATIVE_SUCCESS':\n logger.debug('Reducing: POPULATE_BACKTESTED_PERFORMANCE_CUMULATIVE_SUCCESS');\n\n let [performance] = action.json;\n\n let PI = get(performance, 'globalProductsValue.performanceIntl');\n let PB = get(PI, 'perfBackTestedDetailsList');\n\n let performances = (typeof PB !== 'undefined') ? _performanceBuilder(PB) : null;\n let labels = _performanceCumulativeLabels(action);\n\n return Object.assign({}, state, {\n backtestedPerformance: {\n label: labels,\n performances: performances\n }\n });\n default:\n return state;\n }\n}\n\nfunction _performanceBuilder(performances) {\n let aggPerfs = [];\n /*let graphData = [];\n let yearAry = tableHeaders;*/\n\n for (let thisObj of performances) {\n let theseItems = {};\n let thisCalDetail = get(thisObj, 'cumulativeDetail');\n let asOfDate = get(thisObj, 'asOfDateStd.val');\n let thisName = get(thisObj, 'calcName.lbl');\n\n let calDetailItems = ['ytdBMC', 'oneMthBMC', 'threeMthBMC', 'sixMthBMC', 'oneYrBMC', 'threeYrBMC', 'fiveYrBMC', 'sevenYrBMC', 'tenYrBMC', 'sinceIncpBMC'];\n\n calDetailItems.forEach(item => (theseItems[item] = ((thisCalDetail[item].hasOwnProperty('val') === true) ? parseFloat(thisCalDetail[item].val) : null)));\n\n let backtested = {\n name: thisName,\n asOfDate: asOfDate,\n ytd: theseItems.ytdBMC,\n oneMth: theseItems.oneMthBMC,\n threeMth: theseItems.threeMthBMC,\n sixMth: theseItems.sixMthBMC,\n oneYr: theseItems.oneYrBMC,\n threeYr: theseItems.threeYrBMC,\n fiveYr: theseItems.fiveYrBMC,\n sevenYr: theseItems.sevenYrBMC,\n tenYr: theseItems.tenYrBMC,\n SI: theseItems.sinceIncpBMC\n };\n\n aggPerfs.push(backtested);\n\n /*let thesePoints = [\n { name: backtested.name, y: backtested.oneYr },\n { name: backtested.name, y: backtested.twoYr },\n { name: backtested.name, y: backtested.threeYr },\n { name: backtested.name, y: backtested.fourYr },\n { name: backtested.name, y: backtested.fiveYr },\n { name: backtested.name, y: backtested.sixYr },\n { name: backtested.name, y: backtested.sevenYr },\n { name: backtested.name, y: backtested.eightYr },\n { name: backtested.name, y: backtested.nineYr },\n { name: backtested.name, y: backtested.tenYr }\n ];\n\n graphData.push(thesePoints);*/\n }\n\n let calDataObj = {\n // years: tableHeaders,\n rows: aggPerfs\n };\n\n return {\n tableData: calDataObj/*,\n graphData: graphData*/\n };\n}\n\nfunction _performanceCumulativeLabels(action) {\n let [ , performanceLabels ] = action.json;\n return get(performanceLabels, 'performance-cumulative-labels');\n}\n\n",null,"/**\n * Data Reducer for calendarYearReturns\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\nimport {countObj} from '../../../../common/utilities/utils';\nimport {objectReduce} from '../../../../common/utilities/utils';\nimport {getCaveats} from '../../../../common/utilities/utils';\nlet _tableDataReduce = objectReduce;\n\nconst logger = LogManager.getLogger('calendar-year-returns');\n/**\n * Populates objects to component\n * @param {type} state\n * @param {type} action\n * @returns {Object}\n */\nexport function calendarYearReturns(state, action) {\n switch (action.type) {\n case 'POPULATE_CALENDAR_YEAR_RETURNS_SUCCESS':\n logger.debug('Reducing: POPULATE_CALENDAR_YEAR_RETURNS_SUCCESS');\n\n let data = _getCalendarReturnData(action);\n let labels = _getCalendarReturnLabels(action);\n let impLegalInfo = _getCalendarYearILI(action);\n let proximity = _getProximityies(action);\n let bmCalYearDet = _getCalendarYearBmCalYearDet(action);\n let bmCalDetSorted = _sortBenchMarkDet(bmCalYearDet);\n let bmCalDetRevSorted = _sortBenchMarkDet(bmCalYearDet, 'asc');\n let bmCalYearDetHeader = bmCalDetSorted;\n let fundAnnualReturnsVO = _getFundAnnualReturnsVO(action);\n let fundAnnualReturnsVOSorted = _sortFundAnnualReturnsVO(fundAnnualReturnsVO);\n let fundAnnualReturnsVORevSorted = _sortFundAnnualReturnsVO(fundAnnualReturnsVO, 'asc');\n let tableData = _concatTableData(fundAnnualReturnsVOSorted, bmCalDetSorted, labels);\n let tableDataForChart = _concatTableData(fundAnnualReturnsVORevSorted, bmCalDetRevSorted, labels);\n let tableDataReduced = _tableDataReduce(tableData, 2);\n let chartData = _getchartData(tableDataForChart);\n let CVO = _getClaendarYearCaveats(action);\n let caveats = getCaveats(CVO, data.secName);\n\n return Object.assign({}, state, {\n calendarYearReturns: {\n data: data,\n label: labels,\n impLegalInfo: impLegalInfo,\n proximity: proximity,\n bmCalYearDetHeader: bmCalYearDetHeader,\n fundAnnualReturnsVO: fundAnnualReturnsVOSorted,\n fundAnnualReturnsVORevSorted: fundAnnualReturnsVORevSorted,\n tableDataReduced: tableDataReduced,\n chartData: chartData,\n caveats: caveats\n }\n });\n default:\n return state;\n }\n}\n/**\n * Returns Data object\n * @param {any} action\n * @returns Object\n */\nfunction _getCalendarReturnData(action) {\n /*'us.performance', 'us.performance-labels'*/\n const fundID = action.fundId;\n // let [performance] = action.json;\n let obj = {\n caveatSecName: 'Proximal - Performance - Cal.Yr.Ret. - Top',\n secName: 'Performance - Calendar Year Returns Tab',\n fundID: fundID,\n showBenchmark: true\n };\n\n return obj;\n}\n/**\n * Get data for RTN\n * @param {Obiect} fundAnnualReturnsVOSorted\n * @param {String} rtnParam\n * @param {String} label\n * @param {int} order\n * @param {int} colourCode\n * @returns {_getRTN.tmpRTN}\n */\nfunction _getRTN(fundAnnualReturnsVOSorted, rtnParam, label, order, colourCode = undefined) {\n if (!fundAnnualReturnsVOSorted || !rtnParam) {\n return;\n }\n let tempTab = [];\n let rtnArray = [];\n for (let tableDataVal of fundAnnualReturnsVOSorted) {\n let rtnVal = tableDataVal[rtnParam];\n tempTab = {\n calYear: tableDataVal.year,\n val: rtnVal\n };\n rtnArray.push(tempTab);\n }\n if (label === null) {label = rtnParam;}\n if (order === null) {order = 0;}\n let tmpRTN = {\n benchMarkName: label,\n benchMarkOrder: order,\n bmCalDet: rtnArray,\n colourCode: colourCode\n };\n return tmpRTN;\n}\n/**\n * Returns Concat tables of fundAnnualReturnsVOSorted and bmCalDetSorted for data presentation\n * @param {Object} fundAnnualReturnsVOSorted\n * @param {Object} bmCalDetSorted\n * @param {Object} label\n * @returns {undefined|Array|_concatTableData.tableData}\n */\nfunction _concatTableData(fundAnnualReturnsVOSorted, bmCalDetSorted, label) {\n if (!fundAnnualReturnsVOSorted || !bmCalDetSorted || !label) {\n return;\n }\n let tableData = [];\n let rtnWOSC = [];\n let rtnWSC = [];\n rtnWOSC = _getRTN(fundAnnualReturnsVOSorted, 'rtnWOSC', label['fund-without-sales-charge'], 1, 1);\n tableData.push(rtnWOSC);\n rtnWSC = _getRTN(fundAnnualReturnsVOSorted, 'rtnWSC', label['fund-with-sales-charge'], 2);\n tableData.push(rtnWSC);\n let yearCounter = countObj(fundAnnualReturnsVOSorted);\n for (let tableDataVal of bmCalDetSorted) {\n let benchmarkTab = [];\n let bmCalDetTmp = [];\n for (let i = 0; i < yearCounter; i++) {\n let currentYear = fundAnnualReturnsVOSorted[i].year;\n let bmCalDetCurrent = undefined;\n for (let bmCalDetVal of tableDataVal.bmCalDet) {\n if (bmCalDetVal.calYear === currentYear) bmCalDetCurrent = bmCalDetVal;\n }\n if (bmCalDetCurrent === undefined) {\n bmCalDetCurrent = {\n calYear: currentYear,\n val: [{\n val: undefined\n }]\n };\n }\n bmCalDetTmp.push(bmCalDetCurrent);\n }\n benchmarkTab = {\n benchMarkName: tableDataVal.benchMarkName,\n benchMarkOrder: tableDataVal.benchMarkOrder,\n bmCalDet: bmCalDetTmp,\n colourCode: tableDataVal.colourCode,\n counter: tableDataVal.counter\n };\n tableData.push(benchmarkTab);\n }\n return tableData;\n}\n/**\n * Returns CaveatVO object\n * @param {any} action\n * @returns Object\n */\nfunction _getClaendarYearCaveats(action) {\n let [performance] = action.json;\n let CVO = get(performance, 'productsVO.caveatvo');\n return CVO;\n}\n/**\n * Returns PerformanceVO obiect\n * @param {any} action\n * @returns PVO Object\n */\nfunction _getCalendarYearPerformance(action) {\n let [performance] = action.json;\n let PVO = get(performance, 'productsVO.performanceVO');\n return PVO;\n}\n/**\n * Returns bmCalYearDet additional banchemarks\n * @param {any} action\n * @returns Object\n */\nfunction _getCalendarYearBmCalYearDet(action) {\n const PVO = _getCalendarYearPerformance(action);\n let bmCalYearDet = get(PVO, 'bmCalYearDet');\n return bmCalYearDet;\n}\n/**\n * Return sorted bmCalDetSorted by date in revert order\n * @param {Object} bmCalYearDet\n * @param {String} sort (asc|desc)\n * @returns {undefined|Array}\n */\nfunction _sortBenchMarkDet(bmCalYearDet, sort = 'desc') {\n if (!bmCalYearDet) {\n return;\n }\n let bmCalDet = [];\n let i = 0;\n for (let bmCalDetVal of bmCalYearDet) {\n let bmTemp = [];\n let bmCalDetSorted = [];\n for (let bmTempVal of bmCalDetVal.bmCalDet) {\n let bmTempRec = bmTempVal;\n bmTemp.push(bmTempRec);\n }\n bmCalDetSorted = bmTemp.sort(function(a, b) {\n let var1 = null;\n if (sort === 'desc') {\n var1 = a.calYear <= b.calYear;\n } else {\n var1 = a.calYear >= b.calYear;\n }\n return var1;\n });\n let bmCalDetRec = {\n benchMarkName: bmCalDetVal.benchMarkName.val,\n benchMarkOrder: parseInt(bmCalDetVal.benchMarkOrder.val, 10) + 2,\n colourCode: parseInt(bmCalDetVal.benchMarkOrder.val, 10) + 1,\n bmCalDet: bmCalDetSorted,\n counter: i\n };\n i++;\n bmCalDet.push(bmCalDetRec);\n }\n return bmCalDet;\n}\n/**\n * Returns fundAnnualReturnsVO object\n * @param {any} action\n * @returns Object\n */\nfunction _getFundAnnualReturnsVO(action) {\n const PVO = _getCalendarYearPerformance(action);\n let fundAnnualReturnsVO = get(PVO, 'fundAnnualReturnsVO');\n return fundAnnualReturnsVO;\n}\n/**\n * Returns fundAnnualReturnsVO sorted by date\n * @param {type} fundAnnualReturnsVO\n * @param {String} sort (asc|desc)\n * @returns {undefined|Array|_sortFundAnnualReturnsVO.fundAnnualReturnsVOCounted}\n */\nfunction _sortFundAnnualReturnsVO(fundAnnualReturnsVO, sort = 'desc') {\n if (!fundAnnualReturnsVO) {\n return;\n }\n let fundAnnualReturnsVORev = [];\n let fundAnnualReturnsVOSorted = [];\n let fundAnnualReturnsVOCounted = [];\n let i = 0;\n for (let fundAnnualReturnsVOVal of fundAnnualReturnsVO) {\n let fundAnnualReturnsVORec = {\n year: fundAnnualReturnsVOVal.rtnDate.val.substring(0, 4),\n rtnDate: fundAnnualReturnsVOVal.rtnDate.val,\n rtnWOSC: fundAnnualReturnsVOVal.rtnWOSC,\n rtnWSC: fundAnnualReturnsVOVal.rtnWSC\n };\n fundAnnualReturnsVORev.push(fundAnnualReturnsVORec);\n }\n fundAnnualReturnsVOSorted = fundAnnualReturnsVORev.sort(function(a, b) {\n let var1 = null;\n if (sort === 'desc') {\n var1 = a.year <= b.year;\n } else {\n var1 = a.year >= b.year;\n }\n return var1;\n });\n for (let fundAnnualReturnsVOVal of fundAnnualReturnsVOSorted) {\n let fundAnnualReturnsVORec = {\n year: fundAnnualReturnsVOVal.year,\n rtnDate: fundAnnualReturnsVOVal.rtnDate,\n rtnWOSC: fundAnnualReturnsVOVal.rtnWOSC,\n rtnWSC: fundAnnualReturnsVOVal.rtnWSC,\n count: i\n };\n fundAnnualReturnsVOCounted.push(fundAnnualReturnsVORec);\n i++;\n }\n fundAnnualReturnsVOSorted = fundAnnualReturnsVOCounted;\n return fundAnnualReturnsVOSorted;\n}\n/**\n * Returns Important Legal Information object\n * @param {any} action\n * @returns Object\n */\nfunction _getCalendarYearILI(action) {\n const CVO = _getClaendarYearCaveats(action);\n let impLegalInfo = get(CVO, 'impLegalInfo.text');\n return impLegalInfo;\n}\n/**\n * Return Proximity object\n * @param {any} action\n * @returns Object\n */\nfunction _getProximityies(action) {\n const CVO = _getClaendarYearCaveats(action);\n let proximity = get(CVO, 'proximity');\n return proximity;\n}\n/**\n * Returns Labels for page\n * @param {any} action\n * @returns Object\n */\nfunction _getCalendarReturnLabels(action) {\n let [, performanceLabels] = action.json;\n let labels = get(performanceLabels, 'calendar-year-returns-labels');\n return labels;\n}\n/**\n * Get data for chart from tableData\n * @param {type} tableData\n * @returns {_getchartData.thisGraph}\n */\nfunction _getchartData(tableData) {\n let thisGraph = { fundWO: [] };\n if (typeof tableData !== 'undefined') {\n for (let fundWOVal of tableData[0].bmCalDet) {\n let fundNWOVal = fundWOVal.val.val;\n thisGraph.fundWO.push({\n name: tableData[0].benchMarkName,\n y: Number((fundNWOVal === null) ? 0 : fundNWOVal)\n });\n }\n let i = 1;\n let tableDataSize = countObj(tableData);\n let tableDataIterator = 2;\n for (tableDataIterator; tableDataIterator < tableDataSize; tableDataIterator++) {\n let benchmarkNumber = 'benchmark' + i;\n thisGraph[benchmarkNumber] = [];\n for (let benchmark of tableData[tableDataIterator].bmCalDet) {\n let benchmarkVal = benchmark.val.val;\n thisGraph[benchmarkNumber].push({\n name: tableData[tableDataIterator].benchMarkName,\n y: Number((benchmarkVal === null) ? 0 : benchmarkVal)\n });\n }\n i++;\n }\n }\n\n return thisGraph;\n}\n","/**\n * Data Reducer for calendarYearReturns\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\nimport moment from 'moment';\nimport parseFormat from 'moment-parseformat';\n\nconst logger = LogManager.getLogger('calendar-year-returns');\n/**\n * Populates objects to component\n * @param {type} state\n * @param {type} action\n * @returns {Object}\n */\nexport function calendarYearReturns(state, action) {\n switch (action.type) {\n case 'POPULATE_CALENDAR_YEAR_RETURNS_SUCCESS':\n logger.debug('Reducing: POPULATE_CALENDAR_YEAR_RETURNS_SUCCESS');\n\n let [ performance ] = action.json;\n\n let data = _getCalendarReturnData(action);\n let labels = _getCalendarReturnLabels(action);\n // TODO: remove calls to functions as unneccesary, use bean data when available\n //let impLegalInfo = _getCalendarYearILI(action);\n //let proximity = _getProximityies(action);\n //let CVO = _getClaendarYearCaveats(action);\n //let caveats = getCaveats(CVO, data.secName);\n\n // TODO: build top-level filter for shareClassCode\n let shareClassCode = 'E';\n\n let PI = get(performance, 'globalProductsValue.performanceIntl');\n\n let monthlyData = get(PI, 'monthlyPerfDetailsList');\n let quarterlyData = get(PI, 'quarterlyPerfDetailsList');\n let peersRankList = get(PI, 'peerRnksList');\n\n let thisMonthlyCalendar;\n let thisQuarterlyCalendar;\n let monthEnd;\n let quarterEnd;\n\n if (typeof monthlyData !== 'undefined') {\n thisMonthlyCalendar = _getThisCalendar(monthlyData, peersRankList, shareClassCode);\n }\n\n if (typeof quarterlyData !== 'undefined') {\n thisQuarterlyCalendar = _getThisCalendar(quarterlyData, peersRankList, shareClassCode);\n }\n\n if (typeof thisMonthlyCalendar !== 'undefined') {\n monthEnd = {\n calData: thisMonthlyCalendar.tableData,\n chartData: thisMonthlyCalendar.graphData,\n dateGroup: 'month-end'\n };\n }\n\n if (typeof thisQuarterlyCalendar !== 'undefined') {\n quarterEnd = {\n calData: thisQuarterlyCalendar.tableData,\n chartData: thisQuarterlyCalendar.graphData,\n dateGroup: 'quarter-end'\n };\n }\n\n return Object.assign({}, state, {\n calendarYearReturns: {\n data: data,\n label: labels,\n /* impLegalInfo: impLegalInfo,\n proximity: proximity,\n caveats: caveats */\n MONTH_END: monthEnd,\n QUARTER_END: quarterEnd\n }\n });\n default:\n return state;\n }\n}\n\nfunction _getThisCalendar(obj, peersRankList, shareClassCode) {\n let thisCalendarObj;\n\n for (let thisObj of obj) {\n let thisShClsCode = get(thisObj, 'shClsCde.val');\n\n if (thisShClsCode === shareClassCode) {\n thisCalendarObj = thisObj;\n }\n }\n\n let asOfDate = get(thisCalendarObj, 'asOfDate.val');\n //let inceptionDate = get(thisCalendarObj, 'fundIncDtLoc.val');\n let shareClassName = get(thisCalendarObj, 'shClsName.val');\n let shareCurrency = get(thisCalendarObj, 'shClsCurr.val');\n let benchmarkName = get(thisCalendarObj, 'bmcName.val');\n // let benchmarkCurrency = get(thisCalendarObj, 'bmcCurrency.val');\n // TODO: Placeholder\n let IASectorName = get(thisCalendarObj, 'IASecName.val');\n\n let aggSCName = shareClassName + ' ' + shareCurrency + ' (%)';\n let aggBMName = benchmarkName + ' (%)';\n let aggIAName = IASectorName + ' (%)';\n\n let fundCalendarDetails = get(thisCalendarObj, 'calendarDetail');\n\n let shareClassDetailItems = ['tenYr', 'NineYr', 'eightYr', 'sevenYr', 'sixYr', 'fiveYr', 'fourYr', 'threeYr', 'twoYr', 'oneYr'];\n let benchmarkDetailItems = ['tenYrBMC', 'nineYrBMC', 'eightYrBMC', 'sevenYrBMC', 'sixYrBMC', 'fiveYrBMC', 'fourYrBMC', 'threeYrBMC', 'twoYrBMC', 'oneYrBMC'];\n let IASecDetailItems = ['tenYrIASec', 'nineYrIASec', 'eightYrIASec', 'sevenYrIASec', 'sixYrIASec', 'fiveYrIASec', 'fourYrIASec', 'threeYrIASec', 'twoYrIASec', 'oneYrIASec'];\n\n let SCDI = {};\n let BMDI = {};\n let IASec = {};\n\n shareClassDetailItems.forEach(item => (SCDI[item] = fundCalendarDetails[item].val));\n benchmarkDetailItems.forEach(item => (BMDI[item] = fundCalendarDetails[item].val));\n IASecDetailItems.forEach(item => (IASec[item] = fundCalendarDetails[item].val));\n\n let asOfFormat = parseFormat(asOfDate);\n let lastYear = moment(asOfDate, asOfFormat).get('year');\n let startYear = lastYear - 9;\n let yearAry = [];\n\n while (startYear <= lastYear) {\n yearAry.push(startYear);\n startYear++;\n }\n\n let shareClassTable = {\n name: aggSCName,\n tenYr: SCDI.tenYr,\n nineYr: SCDI.NineYr,\n eightYr: SCDI.eightYr,\n sevenYr: SCDI.sevenYr,\n sixYr: SCDI.sixYr,\n fiveYr: SCDI.fiveYr,\n fourYr: SCDI.fourYr,\n threeYr: SCDI.threeYr,\n twoYr: SCDI.twoYr,\n oneYr: SCDI.oneYr\n };\n\n let benchMarkTable = {\n name: aggBMName,\n tenYr: BMDI.tenYrBMC,\n nineYr: BMDI.nineYrBMC,\n eightYr: BMDI.eightYrBMC,\n sevenYr: BMDI.sevenYrBMC,\n sixYr: BMDI.sixYrBMC,\n fiveYr: BMDI.fiveYrBMC,\n fourYr: BMDI.fourYrBMC,\n threeYr: BMDI.threeYrBMC,\n twoYr: BMDI.twoYrBMC,\n oneYr: BMDI.oneYrBMC\n };\n\n let IASecTable;\n if (Object.keys(IASec).length > 0) {\n IASecTable = {\n name: aggIAName,\n tenYr: IASec.tenYrIASec,\n nineYr: IASec.nineYrIASec,\n eightYr: IASec.eightYrIASec,\n sevenYr: IASec.sevenYrIASec,\n sixYr: IASec.sixYrIASec,\n fiveYr: IASec.fiveYrIASec,\n fourYr: IASec.fourYrIASec,\n threeYr: IASec.threeYrIASec,\n twoYr: IASec.twoYrIASec,\n oneYr: IASec.oneYrIASec\n };\n }\n\n let aggTable;\n\n if (Object.keys(IASec).length > 0) {\n aggTable = [ shareClassTable, benchMarkTable, IASecTable ];\n } else {\n aggTable = [ shareClassTable, benchMarkTable ];\n }\n\n\n let graphData = [];\n\n graphData.push([]);\n shareClassDetailItems.forEach(function(item) {\n let thisPoint = {\n name: aggSCName,\n y: parseFloat(fundCalendarDetails[item].val)\n };\n graphData[0].push(thisPoint);\n });\n\n graphData.push([]);\n benchmarkDetailItems.forEach(function(item) {\n let thisPoint = {\n name: aggBMName,\n y: parseFloat(fundCalendarDetails[item].val)\n };\n graphData[1].push(thisPoint);\n });\n\n if (IASecTable !== undefined) {\n graphData.push([]);\n IASecDetailItems.forEach(function(item) {\n let thisPoint = {\n name: aggIAName,\n y: parseFloat(fundCalendarDetails[item].val)\n };\n graphData[2].push(thisPoint);\n });\n }\n\n let calDataObj = {\n asOfDate: asOfDate,\n years: yearAry,\n rows: aggTable\n };\n\n let dataObj = {\n tableData: calDataObj,\n graphData: graphData\n };\n\n return dataObj;\n}\n\n/**\n * Returns Data object\n * @param {any} action\n * @returns Object\n */\nfunction _getCalendarReturnData(action) {\n /*'us.performance', 'us.performance-labels'*/\n const fundID = action.fundId;\n // let [performance] = action.json;\n let obj = {\n caveatSecName: 'Proximal - Performance - Cal.Yr.Ret. - Top',\n secName: 'Performance - Calendar Year Returns Tab',\n fundID: fundID,\n showBenchmark: true\n };\n\n return obj;\n}\n\n/**\n * Returns Labels for page\n * @param {any} action\n * @returns Object\n */\nfunction _getCalendarReturnLabels(action) {\n let [, performanceLabels] = action.json;\n let labels = get(performanceLabels, 'calendar-year-returns-labels');\n return labels;\n}\n","/**\n * Data Reducer for calendarYearReturns\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\nimport moment from 'moment';\nimport parseFormat from 'moment-parseformat';\n\nconst logger = LogManager.getLogger('calendar-year-returns');\n/**\n * Populates objects to component\n * @param {type} state\n * @param {type} action\n * @returns {Object}\n */\nexport function calendarYearReturns(state, action) {\n switch (action.type) {\n case 'POPULATE_CALENDAR_YEAR_RETURNS_SUCCESS':\n logger.debug('Reducing: POPULATE_CALENDAR_YEAR_RETURNS_SUCCESS');\n\n let [ performance ] = action.json;\n\n let data = _getCalendarReturnData(action);\n let labels = _getCalendarReturnLabels(action);\n // TODO: remove calls to functions as unneccesary, use bean data when available\n //let impLegalInfo = _getCalendarYearILI(action);\n //let proximity = _getProximityies(action);\n //let CVO = _getClaendarYearCaveats(action);\n //let caveats = getCaveats(CVO, data.secName);\n\n // TODO: build top-level filter for shareClassCode\n let shareClassCode = 'E';\n\n let PI = get(performance, 'globalProductsValue.performanceIntl');\n\n let monthlyData = get(PI, 'monthlyPerfDetailsList');\n let quarterlyData = get(PI, 'quarterlyPerfDetailsList');\n let peersRankList = get(PI, 'peerRnksList');\n\n let thisMonthlyCalendar;\n let thisQuarterlyCalendar;\n let thisMonthlyCalendarRev;\n let thisQuarterlyCalendarRev;\n let monthEnd;\n let quarterEnd;\n\n if (typeof monthlyData !== 'undefined') {\n thisMonthlyCalendar = _getThisCalendar(monthlyData, peersRankList, shareClassCode);\n thisMonthlyCalendarRev = _getThisCalendar(monthlyData, peersRankList, shareClassCode, true);\n }\n\n if (typeof quarterlyData !== 'undefined') {\n thisQuarterlyCalendar = _getThisCalendar(quarterlyData, peersRankList, shareClassCode);\n thisQuarterlyCalendarRev = _getThisCalendar(quarterlyData, peersRankList, shareClassCode, true);\n }\n// TODO - optimize Data and RevData obiects\n if (typeof thisMonthlyCalendar !== 'undefined') {\n monthEnd = {\n calData: thisMonthlyCalendar.tableData,\n calDataRev: thisMonthlyCalendarRev.tableData,\n chartData: thisMonthlyCalendar.graphData,\n chartDataRev: thisMonthlyCalendarRev.graphData,\n dateGroup: 'month-end'\n };\n }\n\n if (typeof thisQuarterlyCalendar !== 'undefined') {\n quarterEnd = {\n calData: thisQuarterlyCalendar.tableData,\n calDataRev: thisQuarterlyCalendarRev.tableData,\n chartData: thisQuarterlyCalendar.graphData,\n chartDataRev: thisQuarterlyCalendarRev.graphData,\n dateGroup: 'quarter-end'\n };\n }\n\n return Object.assign({}, state, {\n calendarYearReturns: {\n data: data,\n label: labels,\n /* impLegalInfo: impLegalInfo,\n proximity: proximity,\n caveats: caveats */\n MONTH_END: monthEnd,\n QUARTER_END: quarterEnd\n }\n });\n default:\n return state;\n }\n}\n/**\n * Returns object with data for chart and table\n * @param {object} obj\n * @param {object} peersRankList\n * @param {object} shareClassCode\n * @param {boolean} rev\n * @returns {dataObj}\n */\nfunction _getThisCalendar(obj, peersRankList, shareClassCode, rev = false) {\n let thisCalendarObj;\n let thisIASecObj;\n\n for (let thisObj of obj) {\n let thisShClsCode = get(thisObj, 'shClsCde.val');\n\n if (thisShClsCode === shareClassCode) {\n thisCalendarObj = thisObj;\n }\n }\n\n for (let thisList of peersRankList) {\n let thisShClsCode = get(thisList, 'shClsCde.val');\n\n if (thisShClsCode === shareClassCode) {\n thisIASecObj = thisList;\n }\n }\n\n let asOfDate = get(thisCalendarObj, 'asOfDate.val');\n //let inceptionDate = get(thisCalendarObj, 'fundIncDtLoc.val');\n let shareClassName = get(thisCalendarObj, 'shClsName.val');\n let shareCurrency = get(thisCalendarObj, 'shClsCurr.val');\n let benchmarkName = get(thisCalendarObj, 'bmcName.val');\n let benchmarkCurrency = get(thisCalendarObj, 'bmcCurrency.val');\n // TODO: Placeholder\n let IASectorName = get(thisIASecObj, 'category.val');\n\n let aggSCName = shareClassName + ' ' + shareCurrency + ' (%)';\n let aggBMName = benchmarkName + ' (%)';\n let aggIAName = IASectorName + ' (%)';\n\n let fundCalendarDetails = get(thisCalendarObj, 'calendarDetail');\n\n let shareClassDetailItems = [];\n if (rev === true) {\n shareClassDetailItems = ['oneYr', 'twoYr', 'threeYr', 'fourYr', 'fiveYr', 'sixYr', 'sevenYr', 'eightYr', 'NineYr', 'tenYr'];\n } else {\n shareClassDetailItems = ['tenYr', 'NineYr', 'eightYr', 'sevenYr', 'sixYr', 'fiveYr', 'fourYr', 'threeYr', 'twoYr', 'oneYr'];\n }\n let benchmarkDetailItems = [];\n if (rev === true) {\n benchmarkDetailItems = ['oneYrBMC', 'twoYrBMC', 'threeYrBMC', 'fourYrBMC', 'fiveYrBMC', 'sixYrBMC', 'sevenYrBMC', 'eightYrBMC', 'nineYrBMC', 'tenYrBMC'];\n } else {\n benchmarkDetailItems = ['tenYrBMC', 'nineYrBMC', 'eightYrBMC', 'sevenYrBMC', 'sixYrBMC', 'fiveYrBMC', 'fourYrBMC', 'threeYrBMC', 'twoYrBMC', 'oneYrBMC'];\n }\n let IASecDetailItems = ['calYrRet10YrSecAvg', 'calYrRet9YrSecAvg', 'calYrRet8YrSecAvg', 'calYrRet7YrSecAvg', 'calYrRet6YrSecAvg', 'calYrRet5YrSecAvg', 'calYrRet4YrSecAvg', 'calYrRet3YrSecAvg', 'calYrRet2YrSecAvg', 'calYrRet1YrSecAvg'];\n\n let SCDI = {};\n let BMDI = {};\n let IASec = {};\n\n shareClassDetailItems.forEach(item => (SCDI[item] = fundCalendarDetails[item].val));\n benchmarkDetailItems.forEach(item => (BMDI[item] = fundCalendarDetails[item].val));\n if (thisIASecObj) {\n IASecDetailItems.forEach(item => (IASec[item] = thisIASecObj[item].val));\n }\n\n let asOfFormat = parseFormat(asOfDate);\n let lastYear = moment(asOfDate, asOfFormat).get('year');\n let startYear = lastYear - 9;\n let yearAry = [];\n let yearAryRev = [];\n\n while (startYear <= lastYear) {\n yearAry.push(startYear);\n startYear++;\n }\n let lastYearCount = lastYear;\n startYear = lastYear - 9;\n while (startYear <= lastYearCount) {\n yearAryRev.push(lastYearCount);\n lastYearCount--;\n }\n\n let shareClassTable = {\n name: aggSCName,\n currency: shareCurrency,\n tenYr: SCDI.tenYr,\n nineYr: SCDI.NineYr,\n eightYr: SCDI.eightYr,\n sevenYr: SCDI.sevenYr,\n sixYr: SCDI.sixYr,\n fiveYr: SCDI.fiveYr,\n fourYr: SCDI.fourYr,\n threeYr: SCDI.threeYr,\n twoYr: SCDI.twoYr,\n oneYr: SCDI.oneYr\n };\n\n let benchMarkTable = {\n name: aggBMName,\n currency: benchmarkCurrency,\n tenYr: BMDI.tenYrBMC,\n nineYr: BMDI.nineYrBMC,\n eightYr: BMDI.eightYrBMC,\n sevenYr: BMDI.sevenYrBMC,\n sixYr: BMDI.sixYrBMC,\n fiveYr: BMDI.fiveYrBMC,\n fourYr: BMDI.fourYrBMC,\n threeYr: BMDI.threeYrBMC,\n twoYr: BMDI.twoYrBMC,\n oneYr: BMDI.oneYrBMC\n };\n\n let IASecTable;\n if (Object.keys(IASec).length > 0) {\n IASecTable = {\n name: aggIAName,\n tenYr: IASec.calYrRet10YrSecAvg,\n nineYr: IASec.calYrRet9YrSecAvg,\n eightYr: IASec.calYrRet8YrSecAvg,\n sevenYr: IASec.calYrRet7YrSecAvg,\n sixYr: IASec.calYrRet6YrSecAvg,\n fiveYr: IASec.calYrRet5YrSecAvg,\n fourYr: IASec.calYrRet4YrSecAvg,\n threeYr: IASec.calYrRet3YrSecAvg,\n twoYr: IASec.calYrRet2YrSecAvg,\n oneYr: IASec.calYrRet1YrSecAvg\n };\n }\n\n let aggTable;\n if (Object.keys(IASec).length > 0) {\n aggTable = [ shareClassTable, benchMarkTable, IASecTable ];\n } else {\n aggTable = [ shareClassTable, benchMarkTable ];\n }\n\n let graphData = [];\n\n graphData.push([]);\n shareClassDetailItems.forEach(function(item) {\n let thisPoint = {\n name: aggSCName,\n y: parseFloat(fundCalendarDetails[item].val)\n };\n graphData[0].push(thisPoint);\n });\n\n graphData.push([]);\n benchmarkDetailItems.forEach(function(item) {\n let thisPoint = {\n name: aggBMName,\n y: parseFloat(fundCalendarDetails[item].val)\n };\n graphData[1].push(thisPoint);\n });\n\n if (IASecTable !== undefined) {\n graphData.push([]);\n IASecDetailItems.forEach(function(item) {\n let thisPoint = {\n name: aggIAName,\n y: parseFloat(thisIASecObj [item].val)\n };\n graphData[2].push(thisPoint);\n });\n }\n\n let calDataObj = {\n asOfDate: asOfDate,\n years: yearAry,\n rows: aggTable\n };\n\n let calDataObjrev = {\n asOfDate: asOfDate,\n years: yearAryRev,\n rows: aggTable\n };\n\n let dataObj = {};\n if (rev === true) {\n dataObj = {\n tableData: calDataObjrev,\n graphData: graphData\n };\n } else {\n dataObj = {\n tableData: calDataObj,\n graphData: graphData\n };\n }\n return dataObj;\n}\n\n/**\n * Returns Data object\n * @param {any} action\n * @returns Object\n */\nfunction _getCalendarReturnData(action) {\n /*'us.performance', 'us.performance-labels'*/\n const fundID = action.fundId;\n // let [performance] = action.json;\n let obj = {\n caveatSecName: 'Proximal - Performance - Cal.Yr.Ret. - Top',\n secName: 'Performance - Calendar Year Returns Tab',\n fundID: fundID,\n showBenchmark: true\n };\n\n return obj;\n}\n\n/**\n * Returns Labels for page\n * @param {any} action\n * @returns Object\n */\nfunction _getCalendarReturnLabels(action) {\n let [, performanceLabels] = action.json;\n let labels = get(performanceLabels, 'calendar-year-returns-labels');\n return labels;\n}\n","/**\n * Data Reducer for discreteReturns\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\nimport moment from 'moment';\nimport parseFormat from 'moment-parseformat';\n\nconst logger = LogManager.getLogger('discrete-returns');\n/**\n * Populates objects to component\n * @param {any} state\n * @param {any} action\n * @returns {object}\n */\nexport function discreteReturns(state, action) {\n switch (action.type) {\n case 'POPULATE_DISCRETE_RETURNS_SUCCESS':\n logger.debug('Reducing: POPULATE_DISCRETE_RETURNS_SUCCESS');\n\n let [ performance ] = action.json;\n\n let data = _getDiscreteReturnData(action);\n let labels = _getDiscreteReturnLabels(action);\n // TODO: remove calls to functions as unneccesary, use bean data when available\n //let impLegalInfo = _getDiscreteYearILI(action);\n //let proximity = _getProximityies(action);\n //let CVO = _getClaendarYearCaveats(action);\n //let caveats = getCaveats(CVO, data.secName);\n\n // TODO: build top-level filter for shareClassCode\n let shareClassCode = 'E';\n\n let PI = get(performance, 'globalProductsValue.performanceIntl');\n\n let monthlyData = get(PI, 'monthlyPerfDetailsList');\n let quarterlyData = get(PI, 'quarterlyPerfDetailsList');\n let peersRankList = get(PI, 'peerRnksList');\n\n let thisMonthlyDiscrete;\n let thisQuarterlyDiscrete;\n let thisMonthlyDiscreteRev;\n let thisQuarterlyDiscreteRev;\n let monthEnd;\n let quarterEnd;\n\n if (typeof monthlyData !== 'undefined') {\n thisMonthlyDiscrete = _getThisDiscrete(monthlyData, peersRankList, shareClassCode);\n thisMonthlyDiscreteRev = _getThisDiscrete(monthlyData, peersRankList, shareClassCode, true);\n }\n\n if (typeof quarterlyData !== 'undefined') {\n thisQuarterlyDiscrete = _getThisDiscrete(quarterlyData, peersRankList, shareClassCode);\n thisQuarterlyDiscreteRev = _getThisDiscrete(quarterlyData, peersRankList, shareClassCode, true);\n }\n// TODO - optimize Data and RevData obiects\n if (typeof thisMonthlyDiscrete !== 'undefined') {\n monthEnd = {\n calData: thisMonthlyDiscrete.tableData,\n calDataRev: thisMonthlyDiscreteRev.tableData,\n chartData: thisMonthlyDiscrete.graphData,\n chartDataRev: thisMonthlyDiscreteRev.graphData,\n dateGroup: 'month-end'\n };\n }\n\n if (typeof thisQuarterlyDiscrete !== 'undefined') {\n quarterEnd = {\n calData: thisQuarterlyDiscrete.tableData,\n calDataRev: thisQuarterlyDiscreteRev.tableData,\n chartData: thisQuarterlyDiscrete.graphData,\n chartDataRev: thisQuarterlyDiscreteRev.graphData,\n dateGroup: 'quarter-end'\n };\n }\n\n return Object.assign({}, state, {\n discreteReturns: {\n data: data,\n label: labels,\n /* impLegalInfo: impLegalInfo,\n proximity: proximity,\n caveats: caveats */\n MONTH_END: monthEnd,\n QUARTER_END: quarterEnd\n }\n });\n default:\n return state;\n }\n}\n/**\n * Returns object with data for chart and table\n * @param {object} obj\n * @param {object} peersRankList\n * @param {object} shareClassCode\n * @param {boolean} rev\n * @returns {object} dataObj\n */\nfunction _getThisDiscrete(obj, peersRankList, shareClassCode, rev = false) {\n let thisDiscreteObj;\n let thisIASecObj;\n\n for (let thisObj of obj) {\n let thisShClsCode = get(thisObj, 'shClsCde.val');\n\n if (thisShClsCode === shareClassCode) {\n thisDiscreteObj = thisObj;\n }\n }\n\n for (let thisList of peersRankList) {\n let thisShClsCode = get(thisList, 'shClsCde.val');\n\n if (thisShClsCode === shareClassCode) {\n thisIASecObj = thisList;\n }\n }\n\n let asOfDate = get(thisDiscreteObj, 'asOfDate.val');\n let inceptionDate = get(thisDiscreteObj, 'fundIncDtLoc.val');\n let shareClassName = get(thisDiscreteObj, 'shClsName.val');\n let shareCurrency = get(thisDiscreteObj, 'shClsCurr.val');\n let benchmarkName = get(thisDiscreteObj, 'bmcName.val');\n let benchmarkCurrency = get(thisDiscreteObj, 'bmcCurrency.val');\n // TODO: Placeholder\n let IASectorName = get(thisIASecObj, 'category.val');\n\n let aggSCName = shareClassName + ' (%)';\n let aggBMName = benchmarkName + ' (%)';\n let aggIAName = IASectorName + ' (%)';\n\n let fundDiscreteDetails = get(thisDiscreteObj, 'discreteDetail');\n\n let shareClassDetailItems = [];\n if (rev === true) {\n //shareClassDetailItems = ['oneYr', 'twoYr', 'threeYr', 'fourYr', 'fiveYr'];\n shareClassDetailItems = ['oneYr', 'twoYr', 'threeYr', 'fiveYr', 'sevenYr'];\n } else {\n //shareClassDetailItems = ['tenYr', 'NineYr', 'eightYr', 'sevenYr', 'sixYr'];\n shareClassDetailItems = ['sevenYr', 'fiveYr', 'threeYr', 'twoYr', 'oneYr'];\n }\n let benchmarkDetailItems = [];\n if (rev === true) {\n //benchmarkDetailItems = ['oneYrBMC', 'twoYrBMC', 'threeYrBMC', 'fourYrBMC', 'fiveYrBMC'];\n benchmarkDetailItems = ['oneYrBMC', 'twoYrBMC', 'threeYrBMC', 'fiveYrBMC', 'sevenYrBMC'];\n } else {\n //benchmarkDetailItems = ['tenYrBMC', 'nineYrBMC', 'eightYrBMC', 'sevenYrBMC', 'sixYrBMC'];\n benchmarkDetailItems = ['sevenYrBMC', 'fiveYrBMC', 'threeYrBMC', 'twoYrBMC', 'oneYrBMC'];\n }\n let IASecDetailItems = ['calYrRet10YrSecAvg', 'calYrRet9YrSecAvg', 'calYrRet8YrSecAvg', 'calYrRet7YrSecAvg'];\n\n let SCDI = {};\n let BMDI = {};\n let IASec = {};\n\n shareClassDetailItems.forEach(item => (SCDI[item] = fundDiscreteDetails[item].val));\n benchmarkDetailItems.forEach(item => (BMDI[item] = fundDiscreteDetails[item].val));\n if (thisIASecObj) {\n IASecDetailItems.forEach(item => (IASec[item] = thisIASecObj[item].val));\n }\n\n let asOfFormat = parseFormat(asOfDate);\n let lastYear = moment(asOfDate, asOfFormat).get('year');\n let startYear = lastYear - 4;\n let yearAry = [];\n let yearAryRev = [];\n\n while (startYear <= lastYear) {\n yearAry.push(startYear);\n startYear++;\n }\n let lastYearCount = lastYear;\n startYear = lastYear - 4;\n while (startYear <= lastYearCount) {\n yearAryRev.push(lastYearCount);\n lastYearCount--;\n }\n\n let shareClassTable = {\n name: aggSCName,\n inceptionDate: inceptionDate,\n currency: shareCurrency,\n tenYr: SCDI.tenYr,\n nineYr: SCDI.NineYr,\n eightYr: SCDI.eightYr,\n sevenYr: SCDI.sevenYr,\n sixYr: SCDI.sixYr,\n fiveYr: SCDI.fiveYr,\n fourYr: SCDI.fourYr,\n threeYr: SCDI.threeYr,\n twoYr: SCDI.twoYr,\n oneYr: SCDI.oneYr\n };\n\n let benchMarkTable = {\n name: aggBMName,\n currency: benchmarkCurrency,\n tenYr: BMDI.tenYrBMC,\n nineYr: BMDI.nineYrBMC,\n eightYr: BMDI.eightYrBMC,\n sevenYr: BMDI.sevenYrBMC,\n sixYr: BMDI.sixYrBMC,\n fiveYr: BMDI.fiveYrBMC,\n fourYr: BMDI.fourYrBMC,\n threeYr: BMDI.threeYrBMC,\n twoYr: BMDI.twoYrBMC,\n oneYr: BMDI.oneYrBMC\n };\n\n let IASecTable;\n if (Object.keys(IASec).length > 0) {\n IASecTable = {\n name: aggIAName,\n tenYr: IASec.calYrRet10YrSecAvg,\n nineYr: IASec.calYrRet9YrSecAvg,\n eightYr: IASec.calYrRet8YrSecAvg,\n sevenYr: IASec.calYrRet7YrSecAvg,\n sixYr: IASec.calYrRet6YrSecAvg,\n fiveYr: IASec.calYrRet5YrSecAvg,\n fourYr: IASec.calYrRet4YrSecAvg,\n threeYr: IASec.calYrRet3YrSecAvg,\n twoYr: IASec.calYrRet2YrSecAvg,\n oneYr: IASec.calYrRet1YrSecAvg\n };\n }\n\n let aggTable;\n if (Object.keys(IASec).length > 0) {\n aggTable = [ shareClassTable, benchMarkTable, IASecTable ];\n } else {\n aggTable = [ shareClassTable, benchMarkTable ];\n }\n\n let graphData = [];\n\n graphData.push([]);\n shareClassDetailItems.forEach(function(item) {\n let thisPoint = {\n name: aggSCName,\n y: parseFloat(fundDiscreteDetails[item].val)\n };\n graphData[0].push(thisPoint);\n });\n\n graphData.push([]);\n benchmarkDetailItems.forEach(function(item) {\n let thisPoint = {\n name: aggBMName,\n y: parseFloat(fundDiscreteDetails[item].val)\n };\n graphData[1].push(thisPoint);\n });\n\n if (IASecTable !== undefined) {\n graphData.push([]);\n IASecDetailItems.forEach(function(item) {\n let thisPoint = {\n name: aggIAName,\n y: parseFloat(thisIASecObj [item].val)\n };\n graphData[2].push(thisPoint);\n });\n }\n\n let calDataObj = {\n asOfDate: asOfDate,\n years: yearAry,\n rows: aggTable\n };\n\n let calDataObjrev = {\n asOfDate: asOfDate,\n years: yearAryRev,\n rows: aggTable\n };\n\n let dataObj = {};\n if (rev === true) {\n dataObj = {\n tableData: calDataObjrev,\n graphData: graphData\n };\n } else {\n dataObj = {\n tableData: calDataObj,\n graphData: graphData\n };\n }\n // logger.debug(dataObj);\n return dataObj;\n}\n\n/**\n * Returns Data object\n * @param {any} action\n * @returns Object\n */\nfunction _getDiscreteReturnData(action) {\n /*'us.performance', 'us.performance-labels'*/\n const fundID = action.fundId;\n // let [performance] = action.json;\n let obj = {\n caveatSecName: 'Proximal - Performance - Cal.Yr.Ret. - Top',\n secName: 'Performance - Discrete Year Returns Tab',\n fundID: fundID,\n showBenchmark: true\n };\n\n return obj;\n}\n\n/**\n * Returns Labels for page\n * @param {any} action\n * @returns Object\n */\nfunction _getDiscreteReturnLabels(action) {\n let [, performanceLabels] = action.json;\n let labels = get(performanceLabels, 'discrete-returns-labels');\n return labels;\n}\n","/**\n * Reducer for expensesVolatilityBenchmarks\n * Takes json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport get from 'lodash/get';\n\nexport function expensesVolatilityBenchmarks(state, action, products) {\n switch (action.type) {\n case 'EXPENSES_VOLATILITY_BENCHMARKS_POPULATION_SUCCESS':\n\n let expensesVolatilityBenchmarksData = _expensesVolatilityBenchmarksData(action, products);\n\n return Object.assign({}, state, {\n evb: {\n data: expensesVolatilityBenchmarksData,\n label: get(products, 'evb.label')\n }\n });\n default:\n return state;\n }\n}\n\nfunction _expensesVolatilityBenchmarksData(action, products) {\n /* 'us.performance', 'us.expenses-volatility-and-benchmarks-details', 'us.fund-config-data', 'us.fund-overview', 'us.expenses-volatility-and-benchmarks-labels', 'us.performance-labels', 'us.cumulative-total-returns-labels', 'us.fund-info' */\n let [ performance, , configData, fundOverview, EVBLabels, , , ] = action.json;\n\n let performancePath = get(fundOverview, 'fundOverviewVO');\n let portfolioStats = get(performancePath, 'portfolio.stats');\n //let caveatvo = get(performancePath, 'caveatvo.elementLevel');\n let configFile = get(configData, 'provider.config');\n let chargesPath = get(configFile, 'global.salesCharges');\n let configFilePerformancePath = get(configFile, 'performance.performance');\n let fundID = get(performancePath, 'fundInfo.fundNumber.val');\n let fundCategory = get(performancePath, 'fundInfo.fndCategory');\n let benchmarkPath = get(performance, 'productsVO.performanceVO.bmkDetailsME');\n //let displayStatus = get(performancePath, 'fundInfo.displayStatus');\n let vmBenchmarkPath = get(performancePath, 'perf.volatilityMeasures');\n\n let evbLabels = _evbLabelsBuilder(EVBLabels);\n\n let expensesHeading = _expensesHeadingBuilder(fundCategory, evbLabels);\n let portStats = _portfolioStatsBuilder(portfolioStats);\n let cdsc = get(performancePath, 'fundInfo.cdsc.alt');\n let CFPPFID = get(configFilePerformancePath, 'fundIdentifier');\n\n let displayNetExpenseRatio = (get(portStats, 'GROSS_XPNSE_RATIO.date') === get(portStats, 'NET_XPNSE_RATIO.date'));\n let suppressMaxInitialSales = _suppressorCheck(get(configFile, 'global'), 'supressMaxInitialSales', fundCategory);\n let suppressCDSC = _suppressorCheck(get(configFile, 'global'), 'supressCdsc', fundCategory);\n let displayCappedRatio = _displayCappedRatio(get(chargesPath, 'displayCappedRatio.fundIdentifier'), fundID);\n let displayBeta = (get(configFilePerformancePath, 'displayBeta') === 'Y');\n let displayAlpha = (get(configFilePerformancePath, 'displayAlpha') === 'Y');\n let displaySharpe = (get(configFilePerformancePath, 'displaySharpRatio') === 'Y');\n let displayCorrelation = (get(configFilePerformancePath, 'displayCorrelation.fundIdentifier') === fundID);\n let displayRSquared = (get(configFilePerformancePath, 'displayRsquared') === 'Y');\n let displayStandardDeviation = (get(configFilePerformancePath, 'displayStandardDeviation') === 'Y');\n let isMoneyFund = (get(fundCategory) === 'Money Funds');\n let benchmarks = _benchmarkMaker(benchmarkPath);\n\n let volatilityFrequency = _volatilityFrequency(fundID, CFPPFID, evbLabels);\n\n return {\n evbLabels,\n expensesHeading,\n portStats,\n cdsc,\n vmBenchmarkPath,\n volatilityFrequency,\n displayNetExpenseRatio,\n displayCappedRatio,\n suppressMaxInitialSales,\n suppressCDSC,\n displayBeta,\n displayAlpha,\n displaySharpe,\n displayCorrelation,\n displayRSquared,\n displayStandardDeviation,\n isMoneyFund,\n benchmarks\n };\n}\n\nfunction _benchmarkMaker(benchmarks) {\n let newBenchmarks = [];\n if (benchmarks) {\n for (let benchmark of benchmarks) {\n let thisBenchmark = {\n name: benchmark.benchMarkName.val,\n footnote: (benchmark.hybridFlag === 'Y') ? 'Blended Benchmark' : 'Benchmark Name'\n };\n newBenchmarks.push(thisBenchmark);\n }\n }\n return newBenchmarks;\n}\n\nfunction _displayCappedRatio(haystack, needle) {\n let patt = new RegExp(needle);\n return (patt.test(haystack));\n}\n\nfunction _suppressorCheck(checkThis, suppressor, fundCategory) {\n if ((checkThis) && (checkThis.hasOwnProperty(suppressor))) {\n return (checkThis[suppressor].fundCat.val === fundCategory);\n }\n return false;\n}\n\nfunction _volatilityFrequency(fundID, CFPPFID, evbLabels) {\n let patt = new RegExp(fundID);\n if (patt.test(CFPPFID) === true) {\n return evbLabels['updated-monthly-1yr'];\n }\n return evbLabels['updated-monthly-3yr'];\n}\n\nfunction _portfolioStatsBuilder(portfolioStats) {\n let newPortfolioStats = {};\n if (portfolioStats) {\n for (let portfolioStat of portfolioStats) {\n let newPSType = portfolioStat.type;\n newPortfolioStats[newPSType] = {\n date: portfolioStat.date.alt,\n value: portfolioStat.val.alt\n };\n }\n }\n return newPortfolioStats;\n}\n\nfunction _evbLabelsBuilder(EVBLabels) {\n let newLabels = {};\n if ((EVBLabels) && (EVBLabels.hasOwnProperty('provider'))) {\n for (let label of EVBLabels.provider.labels.label) {\n newLabels[label.key] = label.value;\n }\n }\n return newLabels;\n}\n\nfunction _expensesHeadingBuilder(fundCat, evbLabels) {\n if ((fundCat !== 'Money Funds') || (fundCat !== 'Variable Annuity')) {\n return evbLabels['expenses-heading'];\n } else if (fundCat === 'Variable Annuity') {\n return evbLabels['vip-expenses-heading'];\n }\n return evbLabels['money-expenses-heading'];\n}\n","/**\n * Data Reducer for performanceAnnualised\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\n\nconst logger = LogManager.getLogger('performance-annualised');\n\nexport function performanceAnnualised(state, action) {\n switch (action.type) {\n case 'POPULATE_PERFORMANCE_ANNUALISED_SUCCESS':\n logger.debug('Reducing: POPULATE_PERFORMANCE_ANNUALISED_SUCCESSy');\n\n let [performance] = action.json;\n\n // TODO: build top-level filter for shareClassCode\n let shareClassCode = 'E';\n\n let PI = get(performance, 'globalProductsValue.performanceIntl');\n\n let monthlyData = get(PI, 'monthlyPerfDetailsList');\n let quarterlyData = get(PI, 'quarterlyPerfDetailsList');\n\n let thisMonthlyTable;\n let thisQuarterlyTable;\n\n if (typeof monthlyData !== 'undefined') {\n thisMonthlyTable = _performanceBuilder(monthlyData, shareClassCode);\n }\n\n if (typeof quarterlyData !== 'undefined') {\n thisQuarterlyTable = _performanceBuilder(quarterlyData, shareClassCode);\n }\n\n let tableHeaders = ['1 YEAR', '3 YEARS', '5 YEARS', '10 YEARS', 'SINCE INCEPTION'];\n\n let labels = _performanceAnnualisedLabels(action);\n\n return Object.assign({}, state, {\n performanceAnnualised: {\n label: labels,\n tableHeaders: tableHeaders,\n MONTH_END: {\n performances: thisMonthlyTable\n },\n QUARTER_END: {\n performances: thisQuarterlyTable\n }\n }\n });\n default:\n return state;\n }\n}\n\n\nfunction _performanceBuilder(performances, shareClassCode) {\n let thisPerformanceObj;\n\n for (let thisObj of performances) {\n let thisShClsCode = get(thisObj, 'shClsCde.val');\n\n if (thisShClsCode === shareClassCode) {\n thisPerformanceObj = thisObj;\n }\n }\n\n let asOfDate = get(thisPerformanceObj, 'asOfDate.val');\n let inceptionDate = get(thisPerformanceObj, 'fundIncDtLoc.val');\n let shareClassName = get(thisPerformanceObj, 'calcName.lbl');\n let shareCurrency = get(thisPerformanceObj, 'currency.val');\n let benchmarkName = get(thisPerformanceObj, 'bmcName.lbl');\n let benchmarkCurrency = get(thisPerformanceObj, 'bmcCurrency.val');\n\n let aggSCName = shareClassName + ' ' + shareCurrency + ' (%)';\n let aggBMName = benchmarkName + ' ' + benchmarkCurrency + ' (%)';\n\n let fundAnnualisedDetails = get(thisPerformanceObj, 'avgAnnual');\n\n let shareClassDetailItems = ['oneYr', 'threeYr', 'fiveYr', 'tenYr', 'sinceIncp'];\n let benchmarkDetailItems = ['oneYrBMC', 'threeYrBMC', 'fiveYrBMC', 'tenYrBMC', 'sinceIncpBMC'];\n\n let SCDI = {};\n let BMDI = {};\n\n shareClassDetailItems.forEach(item => (SCDI[item] = ((fundAnnualisedDetails[item].hasOwnProperty('val') === true) ? fundAnnualisedDetails[item].val : null)));\n benchmarkDetailItems.forEach(item => (BMDI[item] = ((fundAnnualisedDetails[item].hasOwnProperty('val') === true) ? fundAnnualisedDetails[item].val : null)));\n\n let shareClassTable = {\n name: aggSCName,\n asOfDate: asOfDate,\n inceptionDate: inceptionDate,\n currency: shareCurrency,\n oneY: SCDI.oneYr,\n threeY: SCDI.threeYr,\n fiveY: SCDI.fiveYr,\n tenY: SCDI.tenYr,\n life: SCDI.sinceIncp\n };\n\n let benchMarkTable = {\n name: aggBMName,\n asOfDate: asOfDate,\n inceptionDate: inceptionDate,\n currency: ' - ',\n oneY: BMDI.oneYrBMC,\n threeY: BMDI.threeYrBMC,\n fiveY: BMDI.fiveYrBMC,\n tenY: BMDI.tenYrBMC,\n life: BMDI.sinceIncpBMC\n };\n\n let aggTable = [ shareClassTable, benchMarkTable ];\n\n let graphData = [];\n let yearAry = ['1 YEAR', '3 YEARS', '5 YEARS', '10 YEARS', 'SINCE INCEPTION'];\n\n graphData.push([]);\n shareClassDetailItems.forEach(function(item) {\n let thisVal = (fundAnnualisedDetails[item].hasOwnProperty('val') === true) ? fundAnnualisedDetails[item].val : 0;\n let thisPoint = {\n name: aggSCName,\n y: parseFloat(thisVal)\n };\n graphData[0].push(thisPoint);\n });\n\n graphData.push([]);\n benchmarkDetailItems.forEach(function(item) {\n let thisVal = (fundAnnualisedDetails[item].hasOwnProperty('val') === true) ? fundAnnualisedDetails[item].val : 0;\n let thisPoint = {\n name: aggBMName,\n y: parseFloat(thisVal)\n };\n graphData[1].push(thisPoint);\n });\n\n let calDataObj = {\n asOfDate: asOfDate,\n years: yearAry,\n rows: aggTable\n };\n\n let dataObj = {\n tableData: calDataObj,\n graphData: graphData\n };\n\n return dataObj;\n}\n\n\nfunction _performanceAnnualisedLabels(action) {\n let [ , performanceLabels ] = action.json;\n return get(performanceLabels, 'performance-annualised-labels');\n}\n","/**\n * Data Reducer for performanceAnnualised\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\n\nconst logger = LogManager.getLogger('performance-annualised');\n\nexport function performanceAnnualised(state, action) {\n switch (action.type) {\n case 'POPULATE_PERFORMANCE_ANNUALISED_SUCCESS':\n logger.debug('Reducing: POPULATE_PERFORMANCE_ANNUALISED_SUCCESSy');\n\n let [performance] = action.json;\n\n // TODO: build top-level filter for shareClassCode\n let shareClassCode = 'E';\n\n let PI = get(performance, 'globalProductsValue.performanceIntl');\n\n let monthlyData = get(PI, 'monthlyPerfDetailsList');\n let quarterlyData = get(PI, 'quarterlyPerfDetailsList');\n\n let thisMonthlyTable;\n let thisQuarterlyTable;\n\n if (typeof monthlyData !== 'undefined') {\n thisMonthlyTable = _performanceBuilder(monthlyData, shareClassCode);\n }\n\n if (typeof quarterlyData !== 'undefined') {\n thisQuarterlyTable = _performanceBuilder(quarterlyData, shareClassCode);\n }\n\n let tableHeaders = ['1 YEAR', '3 YEARS', '5 YEARS', '10 YEARS', 'SINCE INCEPTION'];\n\n let labels = _performanceAnnualisedLabels(action);\n\n return Object.assign({}, state, {\n performanceAnnualised: {\n label: labels,\n tableHeaders: tableHeaders,\n MONTH_END: {\n performances: thisMonthlyTable\n },\n QUARTER_END: {\n performances: thisQuarterlyTable\n }\n }\n });\n default:\n return state;\n }\n}\n\n\nfunction _performanceBuilder(performances, shareClassCode) {\n let thisPerformanceObj;\n\n for (let thisObj of performances) {\n let thisShClsCode = get(thisObj, 'shClsCde.val');\n\n if (thisShClsCode === shareClassCode) {\n thisPerformanceObj = thisObj;\n }\n }\n\n let asOfDate = get(thisPerformanceObj, 'asOfDate.val');\n let inceptionDate = get(thisPerformanceObj, 'fundIncDtLoc.val');\n let shareClassName = get(thisPerformanceObj, 'calcName.lbl');\n let shareCurrency = get(thisPerformanceObj, 'currency.val');\n let benchmarkName = get(thisPerformanceObj, 'bmcName.lbl');\n let benchmarkCurrency = get(thisPerformanceObj, 'bmcCurrency.val');\n\n let aggSCName = shareClassName + ' ' + shareCurrency + ' (%)';\n let aggBMName = benchmarkName + ' ' + benchmarkCurrency + ' (%)';\n\n let fundAnnualisedDetails = get(thisPerformanceObj, 'avgAnnual');\n\n let shareClassDetailItems = ['oneYr', 'threeYr', 'fiveYr', 'tenYr', 'sinceIncp'];\n let benchmarkDetailItems = ['oneYrBMC', 'threeYrBMC', 'fiveYrBMC', 'tenYrBMC', 'sinceIncpBMC'];\n\n let SCDI = {};\n let BMDI = {};\n\n shareClassDetailItems.forEach(item => (SCDI[item] = ((fundAnnualisedDetails[item].hasOwnProperty('val') === true) ? fundAnnualisedDetails[item].val : null)));\n benchmarkDetailItems.forEach(item => (BMDI[item] = ((fundAnnualisedDetails[item].hasOwnProperty('val') === true) ? fundAnnualisedDetails[item].val : null)));\n\n let shareClassTable = {\n name: aggSCName,\n asOfDate: asOfDate,\n inceptionDate: inceptionDate,\n currency: shareCurrency,\n oneY: SCDI.oneYr,\n threeY: SCDI.threeYr,\n fiveY: SCDI.fiveYr,\n tenY: SCDI.tenYr,\n life: SCDI.sinceIncp\n };\n\n let benchMarkTable = {\n name: aggBMName,\n asOfDate: asOfDate,\n inceptionDate: inceptionDate,\n currency: ' - ',\n oneY: BMDI.oneYrBMC,\n threeY: BMDI.threeYrBMC,\n fiveY: BMDI.fiveYrBMC,\n tenY: BMDI.tenYrBMC,\n life: BMDI.sinceIncpBMC\n };\n\n let aggTable = [ shareClassTable, benchMarkTable ];\n\n let graphData = [];\n let yearAry = ['1 YEAR', '3 YEARS', '5 YEARS', '10 YEARS', 'SINCE INCEPTION'];\n\n graphData.push([]);\n shareClassDetailItems.forEach(function(item) {\n let thisVal = (fundAnnualisedDetails[item].hasOwnProperty('val') === true) ? fundAnnualisedDetails[item].val : 0;\n let thisPoint = {\n name: aggSCName,\n y: parseFloat(thisVal)\n };\n graphData[0].push(thisPoint);\n });\n\n graphData.push([]);\n benchmarkDetailItems.forEach(function(item) {\n let thisVal = (fundAnnualisedDetails[item].hasOwnProperty('val') === true) ? fundAnnualisedDetails[item].val : 0;\n let thisPoint = {\n name: aggBMName,\n y: parseFloat(thisVal)\n };\n graphData[1].push(thisPoint);\n });\n\n let calDataObj = {\n asOfDate: asOfDate,\n years: yearAry,\n rows: aggTable\n };\n\n let dataObj = {\n tableData: calDataObj,\n graphData: graphData\n };\n\n return dataObj;\n}\n\n\nfunction _performanceAnnualisedLabels(action) {\n let [ , performanceLabels ] = action.json;\n return get(performanceLabels, 'performance-annualised-labels');\n}\n","/**\n * Data Reducer for performanceCumulative\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\n\nconst logger = LogManager.getLogger('performance-cumulative');\n\nexport function performanceCumulative(state, action) {\n switch (action.type) {\n case 'POPULATE_PERFORMANCE_CUMULATIVE_SUCCESS':\n logger.debug('Reducing: POPULATE_PERFORMANCE_CUMULATIVE_SUCCESS');\n\n let performanceCumulativeMEData = _performanceCumulativeMEData(action);\n let performanceCumulativeQEData = _performanceCumulativeQEData(action);\n let labels = _performanceCumulativeLabels(action);\n let hypotheticals = _hypotheticalsBuilder(action);\n\n return Object.assign({}, state, {\n performanceCumulative: {\n label: labels,\n PC_MONTH_END: performanceCumulativeMEData,\n PC_QUARTER_END: performanceCumulativeQEData,\n hypotheticals: hypotheticals\n }\n });\n default:\n return state;\n }\n}\n\nfunction _hypotheticalsBuilder(action) {\n let [ performance, , configData, , , , , fundInfo ] = action.json;\n\n const PVO = get(performance, 'productsVO.performanceVO');\n const configFile = get(configData, 'provider.config');\n const fundInfoPath = get(fundInfo, 'productsVO.fundinfo');\n\n const showHypoChart = (get(configFile, 'global.supressHypoChart') !== 'Y');\n const cusipValue = get(fundInfoPath, 'cusip.val');\n const resultsChart = get(configFile, 'global.resultsChart');\n const pathedChart = (typeof resultsChart !== 'undefined') ? 'https://www.franklintempleton.com' + resultsChart.replace('{CUSIP}', cusipValue) : resultsChart;\n const fundCat = get(fundInfoPath, 'fndCategory.val');\n let chartOrNot = ((fundCat !== 'Variable Annuity') && (typeof resultsChart !== 'undefined')) ? pathedChart : false;\n\n const stat10kHypoValue = get(PVO, 'stat10kHypo.val');\n const stat10kHypoDate = get(PVO, 'stat10kHypoDate.alt');\n\n const actor = 'FA';\n\n let obj = {\n showHypoChart: showHypoChart,\n cusipValue: cusipValue,\n resultsChart: resultsChart,\n chartOrNot: chartOrNot,\n fundCat: fundCat,\n stat10kHypoValue: stat10kHypoValue,\n stat10kHypoDate: stat10kHypoDate,\n actor: actor\n };\n\n return obj;\n}\n\nfunction _performanceCumulativeQEData(action) {\n /* 'us.performance', 'us.expenses-volatility-and-benchmarks-details', 'us.fund-config-data', 'us.fund-overview', 'us.expenses-volatility-and-benchmarks-labels', 'us.performance-labels', 'us.cumulative-total-returns-labels', 'us.fund-info' */\n let [ performance, , configData, , , , , fundInfo ] = action.json;\n\n const PVO = get(performance, 'productsVO.performanceVO');\n\n let performanceDetails = _performanceDetailsBuilder(get(PVO, 'performanceDetails'));\n\n const bmkDQE = get(PVO, 'bmkDetailsQE');\n\n const cumulativeTotalReturnsQuarterEnd = get(performanceDetails, 'CTR_QE.details');\n const cumulativeTotalReturnsBmkQuarterEnd = _getBenchmarkReturnDetailsObj(bmkDQE, 'fundBmcRtnDetlsVO', 'CTR_BM_QE');\n // let fundID = get(PVO, 'fundNumber');\n const asofDateQE = get(performanceDetails, 'CTR_QE.date');\n const asofDateBMQE = (typeof cumulativeTotalReturnsBmkQuarterEnd === 'object') ? get(cumulativeTotalReturnsBmkQuarterEnd[0], 'asOfDate') : Date.now();\n\n const fundInfoPath = get(fundInfo, 'productsVO.fundinfo');\n const fundShareClass = get(fundInfoPath, 'shareClass.val');\n\n const configFile = get(configData, 'provider.config');\n\n const blendedBmCountQuarterEnd = _countHybrids(bmkDQE);\n const benchmarkCountQuarterEnd = (typeof bmkDQE === 'object') ? bmkDQE.length : 0;\n\n const showQuarterEndBM = (asofDateQE === asofDateBMQE);\n const showOnlyblendedBmQuarterEndChart = (((benchmarkCountQuarterEnd > 1) && blendedBmCountQuarterEnd > 0) || blendedBmCountQuarterEnd > 0);\n\n const suppressors = get(configFile, 'peformance.performance');\n\n const supressFundWithSalesCharge = (get(suppressors, 'supressFundWithSalesCharge') === 'Y');\n let additionalFundRows = _buildFundTable(supressFundWithSalesCharge, cumulativeTotalReturnsQuarterEnd, fundShareClass, cumulativeTotalReturnsBmkQuarterEnd, showQuarterEndBM);\n let showTheseBenchmarks = ((typeof cumulativeTotalReturnsBmkQuarterEnd !== 'undefined') && (showQuarterEndBM === true));\n\n let additionalBenchmarkRows = _buildBenchmarkRows(showTheseBenchmarks, cumulativeTotalReturnsBmkQuarterEnd, showOnlyblendedBmQuarterEndChart, blendedBmCountQuarterEnd);\n\n // const caveatvo = \"/Properties/Data/Result/providers/provider/productsVO/caveatvo\";\n let fundDates = {\n asofDate: asofDateQE,\n asofDateBM: asofDateBMQE\n };\n\n let obj = {\n fundDates: fundDates,\n cumulativeTotalReturns: cumulativeTotalReturnsQuarterEnd,\n additionalFundRows: additionalFundRows,\n additionalBenchmarkRows: additionalBenchmarkRows\n };\n\n return obj;\n}\n\nfunction _performanceCumulativeMEData(action) {\n /* 'us.performance', 'us.expenses-volatility-and-benchmarks-details', 'us.fund-config-data', 'us.fund-overview', 'us.expenses-volatility-and-benchmarks-labels', 'us.performance-labels', 'us.cumulative-total-returns-labels', 'us.fund-info' */\n let [ performance, , configData, , , , , fundInfo ] = action.json;\n\n const PVO = get(performance, 'productsVO.performanceVO');\n let performanceDetails = _performanceDetailsBuilder(get(PVO, 'performanceDetails'));\n\n const bmkDME = get(PVO, 'bmkDetailsME');\n\n const cumulativeTotalReturnsMonthEnd = get(performanceDetails, 'CTR_ME.details');\n const cumulativeTotalReturnsBmkMonthEnd = _getBenchmarkReturnDetailsObj(bmkDME, 'fundBmcRtnDetlsVO', 'CTR_BM_ME');\n // const showBenchmark = true;\n // let fundID = get(PVO, 'fundNumber');\n const asofDateME = get(performanceDetails, 'CTR_ME.date');\n const asofDateBMME = (typeof cumulativeTotalReturnsBmkMonthEnd === 'object') ? get(cumulativeTotalReturnsBmkMonthEnd[0], 'asOfDate') : Date.now();\n\n const fundInfoPath = get(fundInfo, 'productsVO.fundinfo');\n const fundShareClass = get(fundInfoPath, 'shareClass.val');\n\n const configFile = get(configData, 'provider.config');\n\n const blendedBmCountMonthEnd = _countHybrids(bmkDME);\n const benchmarkCountMonthEnd = (typeof bmkDME === 'object') ? bmkDME.length : 0;\n\n const showOnlyblendedBmMonthEndChart = (((benchmarkCountMonthEnd > 1) && blendedBmCountMonthEnd > 0) || blendedBmCountMonthEnd > 0);\n const showMonthEndBM = (asofDateME === asofDateBMME);\n\n const suppressors = get(configFile, 'peformance.performance');\n const suppressFundWithSalesCharge = (get(suppressors, 'supressFundWithSalesCharge') === 'Y');\n\n let additionalFundRows = _buildFundTable(suppressFundWithSalesCharge, cumulativeTotalReturnsMonthEnd, fundShareClass, cumulativeTotalReturnsBmkMonthEnd, showMonthEndBM);\n let showTheseBenchmarks = ((typeof cumulativeTotalReturnsBmkMonthEnd !== 'undefined') && (showMonthEndBM === true));\n let additionalBenchmarkRows = _buildBenchmarkRows(showTheseBenchmarks, cumulativeTotalReturnsBmkMonthEnd, showOnlyblendedBmMonthEndChart, blendedBmCountMonthEnd);\n\n // const caveatvo = \"/Properties/Data/Result/providers/provider/productsVO/caveatvo\";\n let fundDates = {\n asofDate: asofDateME,\n asofDateBM: asofDateBMME\n };\n\n let obj = {\n fundDates: fundDates,\n cumulativeTotalReturns: cumulativeTotalReturnsMonthEnd,\n additionalFundRows: additionalFundRows,\n additionalBenchmarkRows: additionalBenchmarkRows\n };\n\n return obj;\n}\n\nfunction _buildFundTable(suppressFundWithSalesCharge, cumulativeTotalReturns, fundShareClass) {\n if ((suppressFundWithSalesCharge) || (!cumulativeTotalReturns)) return false;\n\n let fundTableType;\n if ((fundShareClass === 'Advisor') || (fundShareClass === 'R') || (fundShareClass === 'R6') === (fundShareClass === 'Z')) {\n fundTableType = 'rtnWOSC';\n } else {\n fundTableType = 'rtnWSC';\n }\n let fundTable = {\n ytd: cumulativeTotalReturns[fundTableType + 'YTD'].alt,\n oneYear: cumulativeTotalReturns[fundTableType + 'OneYear'].alt,\n threeYears: cumulativeTotalReturns[fundTableType + 'ThreeYears'].alt,\n fiveYears: cumulativeTotalReturns[fundTableType + 'FiveYears'].alt,\n tenYears: cumulativeTotalReturns[fundTableType + 'TenYears'].alt,\n sinceInception: cumulativeTotalReturns[fundTableType + 'SinceInception'].alt\n };\n return fundTable;\n}\n\nfunction _buildBenchmarkRows(showTheseBenchmarks, bmks, showOnlyblendedBmChart, blendedBmCount) {\n if (!showTheseBenchmarks) return false;\n\n bmks.sort(function(a, b) {\n return a.benchMarkOrder - b.benchMarkOrder;\n });\n\n let hideRow;\n for (let thisBenchmark of bmks) {\n if (showOnlyblendedBmChart === true) {\n if (((blendedBmCount > 1) && (thisBenchmark.benchMarkOrder > 4)) || ((blendedBmCount > 0) && (thisBenchmark.benchMarkOrder > 3))) {\n hideRow = true;\n }\n hideRow = false;\n } else hideRow = thisBenchmark.benchMarkOrder <= 2;\n thisBenchmark.hideRow = hideRow;\n }\n\n let shownRows = [];\n\n for (let thisBenchmark of bmks) {\n if (thisBenchmark.hideRow === false) {\n shownRows.push(thisBenchmark);\n }\n }\n\n return shownRows;\n}\n\nfunction _countHybrids(benchmarks) {\n if (!benchmarks) return;\n let hybrids = 0;\n for (let benchmark of benchmarks) {\n (benchmark.hybridFlag === 'Y') ? hybrids++ : '';\n }\n return hybrids;\n}\n\nfunction _getBenchmarkReturnDetailsObj(deets, where, wanted) {\n if (!deets) return;\n let deetsAry = [];\n for (let deet of deets) {\n let newObj = {};\n let metaDeet = {\n asOfDate: deet.asOfDate.alt,\n benchMarkName: deet.benchMarkName.val,\n benchMarkOrder: parseInt(deet.benchMarkOrder.val, 10) + 2,\n colourCode: parseInt(deet.benchMarkOrder.val, 10) + 1,\n hybridFlag: deet.hybridFlag,\n hideRow: ''\n };\n for (let thisDetail of deet[where]) {\n if (thisDetail.type === wanted) {\n let shinyNewObj = {\n ytdRtn: thisDetail.ytdRtn.alt,\n oneYrRtn: thisDetail.oneYrRtn.alt,\n threeYrRtn: thisDetail.threeYrRtn.alt,\n fiveYrRtn: thisDetail.fiveYrRtn.alt,\n tenYrRtn: thisDetail.tenYrRtn.alt,\n sinceInception: thisDetail.sinceInception.alt\n };\n newObj = Object.assign(metaDeet, shinyNewObj);\n deetsAry.push(newObj);\n }\n }\n }\n return deetsAry;\n}\n\nfunction _performanceDetailsBuilder(performanceDetails) {\n let newPerformanceDetails = {};\n if (performanceDetails) {\n for (let performanceDetail of performanceDetails) {\n let newPDType = performanceDetail.type;\n newPerformanceDetails[newPDType] = {\n date: performanceDetail.asOfDate.alt,\n details: performanceDetail.fundPerfRtnDetlsVO\n };\n }\n }\n return newPerformanceDetails;\n}\n\nfunction _performanceCumulativeLabels(action) {\n let [ , , , , , performanceLabels] = action.json;\n return get(performanceLabels, 'performance-cumulative-labels');\n}\n","/**\n * Data Reducer for performanceCumulative\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\n\nconst logger = LogManager.getLogger('performance-cumulative');\n\nexport function performanceCumulative(state, action) {\n switch (action.type) {\n case 'POPULATE_PERFORMANCE_CUMULATIVE_SUCCESS':\n logger.debug('Reducing: POPULATE_PERFORMANCE_CUMULATIVE_SUCCESSY');\n\n let [performance, , performanceGraph] = action.json;\n\n // TODO: build top-level filter for shareClassCode\n let shareClassCode = 'E';\n\n let PI = get(performance, 'globalProductsValue.performanceIntl');\n let PG = get(performanceGraph, 'globalProductsValue.perfHistoryGraphs');\n\n let monthlyData = get(PI, 'monthlyPerfDetailsList');\n let quarterlyData = get(PI, 'quarterlyPerfDetailsList');\n\n let graphAName = get(PG, 'shareClassName.val');\n let graphBName = get(PG, 'bmName.val');\n\n let graphNames;\n\n if ((typeof graphAName !== 'undefined') && (typeof graphBName !== 'undefined')) {\n graphNames = [ graphAName, graphBName];\n }\n\n let thisMonthlyTable;\n let thisQuarterlyTable;\n\n if (typeof monthlyData !== 'undefined') {\n thisMonthlyTable = _performanceBuilder(monthlyData, shareClassCode);\n }\n\n if (typeof quarterlyData !== 'undefined') {\n thisQuarterlyTable = _performanceBuilder(quarterlyData, shareClassCode);\n }\n\n let tableHeaders = _getTableHeaders(monthlyData, shareClassCode);\n\n let labels = _performanceCumulativeLabels(action);\n\n return Object.assign({}, state, {\n performanceCumulative: {\n label: labels,\n tableHeaders: tableHeaders,\n graphNames: graphNames,\n MONTH_END: {\n performances: thisMonthlyTable/*,\n PC_1YR: _processPerformanceChartData(performanceGraph, 0, 'monthlyGraphs'),\n PC_3YR: _processPerformanceChartData(performanceGraph, 1, 'monthlyGraphs'),\n PC_5YR: _processPerformanceChartData(performanceGraph, 2, 'monthlyGraphs'),\n PC_10YR: _processPerformanceChartData(performanceGraph, 3, 'monthlyGraphs'),\n PC_15YR: _processPerformanceChartData(performanceGraph, 4, 'monthlyGraphs'),\n PC_LIFE: _processPerformanceChartData(performanceGraph, 5, 'monthlyGraphs') */\n },\n QUARTER_END: {\n performances: thisQuarterlyTable/*,\n PC_1YR: _processPerformanceChartData(performanceGraph, 0, 'quarterlyGraphs'),\n PC_3YR: _processPerformanceChartData(performanceGraph, 1, 'quarterlyGraphs'),\n PC_5YR: _processPerformanceChartData(performanceGraph, 2, 'quarterlyGraphs'),\n PC_10YR: _processPerformanceChartData(performanceGraph, 3, 'quarterlyGraphs'),\n PC_15YR: _processPerformanceChartData(performanceGraph, 4, 'quarterlyGraphs'),\n PC_LIFE: _processPerformanceChartData(performanceGraph, 5, 'quarterlyGraphs') */\n }\n }\n });\n default:\n return state;\n }\n}\n\n/*function _processPerformanceChartData(data, graphIndex, chunk) {\n if (Object.keys(data).length > 0) {\n let fundData = data.globalProductsValue.perfHistoryGraphs[chunk][graphIndex].fundData.map(detail => [moment(detail.chartKey.val, 'MM/YY').valueOf(), Number.parseFloat(detail.chartValue.val)])\n .sort((a, b) => a[0] - b[0]);\n\n let bmData = data.globalProductsValue.perfHistoryGraphs[chunk][graphIndex].bmData.map(detail => [moment(detail.chartKey.val, 'MM/YY').valueOf(), Number.parseFloat(detail.chartValue.val)])\n .sort((a, b) => a[0] - b[0]);\n\n return [ fundData, bmData ];\n }\n}*/\n\nfunction _performanceBuilder(performances, shareClassCode) {\n let thisPerformanceObj;\n\n for (let thisObj of performances) {\n let thisShClsCode = get(thisObj, 'shClsCde.val');\n\n if (thisShClsCode === shareClassCode) {\n thisPerformanceObj = thisObj;\n }\n }\n\n let asOfDate = get(thisPerformanceObj, 'asOfDate.val');\n let inceptionDate = get(thisPerformanceObj, 'fundIncDtLoc.val');\n let shareClassName = get(thisPerformanceObj, 'calcName.lbl');\n let shareCurrency = get(thisPerformanceObj, 'currency.val');\n let benchmarkName = get(thisPerformanceObj, 'bmcName.lbl');\n let benchmarkCurrency = get(thisPerformanceObj, 'bmcCurrency.val');\n\n let aggSCName = shareClassName + ' ' + shareCurrency + ' (%)';\n let aggBMName = benchmarkName + ' ' + benchmarkCurrency + ' (%)';\n\n let fundCumulativeDetails = get(thisPerformanceObj, 'cumulativeDetail');\n\n let shareClassDetailItems = ['ytd', 'oneMth', 'threeMth', 'sixMth', 'oneYr', 'threeYr', 'fiveYr', 'tenYr', 'sinceIncp'];\n let benchmarkDetailItems = ['ytdBMC', 'oneMthBMC', 'threeMthBMC', 'sixMthBMC', 'oneYrBMC', 'threeYrBMC', 'fiveYrBMC', 'tenYrBMC', 'sinceIncpBMC'];\n\n let SCDI = {};\n let BMDI = {};\n let tableHeaders = {};\n\n shareClassDetailItems.forEach(item => (SCDI[item] = ((fundCumulativeDetails[item].hasOwnProperty('val') === true) ? fundCumulativeDetails[item].val : null)));\n benchmarkDetailItems.forEach(item => (BMDI[item] = ((fundCumulativeDetails[item].hasOwnProperty('val') === true) ? fundCumulativeDetails[item].val : null)));\n shareClassDetailItems.forEach(item => (tableHeaders[item] = ((fundCumulativeDetails[item].hasOwnProperty('lbl') === true) ? fundCumulativeDetails[item].lbl : null)));\n\n let shareClassTable = {\n name: aggSCName,\n asOfDate: asOfDate,\n inceptionDate: inceptionDate,\n currency: shareCurrency,\n ytd: SCDI.ytd,\n oneM: SCDI.oneMth,\n sixM: SCDI.sixMth,\n oneY: SCDI.oneYr,\n threeY: SCDI.threeYr,\n fiveY: SCDI.fiveYr,\n tenY: SCDI.tenYr,\n life: SCDI.sinceIncp\n };\n\n let benchMarkTable = {\n name: aggBMName,\n asOfDate: asOfDate,\n inceptionDate: inceptionDate,\n currency: ' - ',\n ytd: BMDI.ytdBMC,\n oneM: BMDI.oneMthBMC,\n sixM: BMDI.sixMthBMC,\n oneY: BMDI.oneYrBMC,\n threeY: BMDI.threeYrBMC,\n fiveY: BMDI.fiveYrBMC,\n tenY: BMDI.tenYrBMC,\n life: BMDI.sinceIncpBMC\n };\n\n let aggTable = [ shareClassTable, benchMarkTable ];\n\n return aggTable;\n}\n\nfunction _getTableHeaders(performances, shareClassCode) {\n let thisPerformanceObj;\n\n for (let thisObj of performances) {\n let thisShClsCode = get(thisObj, 'shClsCde.val');\n\n if (thisShClsCode === shareClassCode) {\n thisPerformanceObj = thisObj;\n }\n }\n\n let fundCumulativeDetails = get(thisPerformanceObj, 'cumulativeDetail');\n\n let fundTableItems = ['ytd', 'oneMth', 'threeMth', 'sixMth', 'oneYr', 'threeYr', 'fiveYr', 'tenYr', 'sinceIncp'];\n\n let tableHeaders = {};\n\n fundTableItems.forEach(item => (tableHeaders[item] = ((fundCumulativeDetails[item].hasOwnProperty('lbl') === true) ? fundCumulativeDetails[item].lbl : '-')));\n\n return tableHeaders;\n}\n\nfunction _performanceCumulativeLabels(action) {\n let [ , performanceLabels ] = action.json;\n return get(performanceLabels, 'performance-cumulative-labels');\n}\n","/**\n * Data Reducer for performanceCumulative\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\nimport moment from 'moment';\n\nconst logger = LogManager.getLogger('performance-cumulative');\n\nexport function performanceCumulative(state, action) {\n switch (action.type) {\n case 'POPULATE_PERFORMANCE_CUMULATIVE_SUCCESS':\n logger.debug('Reducing: POPULATE_PERFORMANCE_CUMULATIVE_SUCCESSY');\n\n let [performance, , performanceGraph] = action.json;\n\n // TODO: build top-level filter for shareClassCode\n let shareClassCode = 'E';\n\n let PI = get(performance, 'globalProductsValue.performanceIntl');\n let PG = get(performanceGraph, 'globalProductsValue.perfHistoryGraphs');\n\n let monthlyData = get(PI, 'monthlyPerfDetailsList');\n let quarterlyData = get(PI, 'quarterlyPerfDetailsList');\n\n let graphAName = get(PG, 'shareClassName.val');\n let graphBName = get(PG, 'bmName.val');\n\n // TODO: labels for charts\n let graphNames = ['labelAName', 'labelBName'];\n\n if ((typeof graphAName !== 'undefined') && (typeof graphBName !== 'undefined')) {\n graphNames = [ graphAName, graphBName];\n }\n\n let thisMonthlyTable;\n let thisQuarterlyTable;\n\n if (typeof monthlyData !== 'undefined') {\n thisMonthlyTable = _performanceBuilder(monthlyData, shareClassCode);\n }\n\n if (typeof quarterlyData !== 'undefined') {\n thisQuarterlyTable = _performanceBuilder(quarterlyData, shareClassCode);\n }\n\n let labels = _performanceCumulativeLabels(action);\n\n return Object.assign({}, state, {\n performanceCumulative: {\n label: labels,\n graphNames: graphNames,\n MONTH_END: {\n performances: thisMonthlyTable,\n // PC_1YR: _processPerformanceChartData(performanceGraph, 0, 'monthlyGraphs'),\n // PC_3YR: _processPerformanceChartData(performanceGraph, 1, 'monthlyGraphs'),\n // PC_5YR: _processPerformanceChartData(performanceGraph, 2, 'monthlyGraphs'),\n // PC_10YR: _processPerformanceChartData(performanceGraph, 3, 'monthlyGraphs'),\n // PC_15YR: _processPerformanceChartData(performanceGraph, 4, 'monthlyGraphs'),\n // PC_LIFE: _processPerformanceChartData(performanceGraph, 5, 'monthlyGraphs')\n PC_1YR: _processPerformanceChartData(performanceGraph, 0),\n PC_3YR: _processPerformanceChartData(performanceGraph, 1),\n PC_5YR: _processPerformanceChartData(performanceGraph, 2),\n PC_10YR: _processPerformanceChartData(performanceGraph, 3),\n PC_15YR: _processPerformanceChartData(performanceGraph, 4),\n PC_LIFE: _processPerformanceChartData(performanceGraph, 5)\n },\n QUARTER_END: {\n performances: thisQuarterlyTable,\n // PC_1YR: _processPerformanceChartData(performanceGraph, 0, 'quarterlyGraphs'),\n // PC_3YR: _processPerformanceChartData(performanceGraph, 1, 'quarterlyGraphs'),\n // PC_5YR: _processPerformanceChartData(performanceGraph, 2, 'quarterlyGraphs'),\n // PC_10YR: _processPerformanceChartData(performanceGraph, 3, 'quarterlyGraphs'),\n // PC_15YR: _processPerformanceChartData(performanceGraph, 4, 'quarterlyGraphs'),\n // PC_LIFE: _processPerformanceChartData(performanceGraph, 5, 'quarterlyGraphs')\n PC_1YR: _processPerformanceChartData(performanceGraph, 0),\n PC_3YR: _processPerformanceChartData(performanceGraph, 1),\n PC_5YR: _processPerformanceChartData(performanceGraph, 2),\n PC_10YR: _processPerformanceChartData(performanceGraph, 3),\n PC_15YR: _processPerformanceChartData(performanceGraph, 4),\n PC_LIFE: _processPerformanceChartData(performanceGraph, 5)\n }\n }\n });\n default:\n return state;\n }\n}\n\nfunction _processPerformanceChartData(data, graphIndex, chunk = 'graphs') {\n if (Object.keys(data).length > 0) {\n try {\n // let fundData = data.globalProductsValue.perfHistoryGraphs[chunk][graphIndex].fundData.map(detail => [moment(detail.chartKey.val, 'MM/YY').valueOf(), Number.parseFloat(detail.chartValue.val)]).sort((a, b) => a[0] - b[0]);\n let fundData = data.globalProductsValue.perfHistoryGraphs[chunk][graphIndex].fundData.map(detail => [moment(detail.chartKey, 'MM/YY').valueOf(), Number.parseFloat(detail.chartValue)]).sort((a, b) => a[0] - b[0]);\n\n // let bmData = data.globalProductsValue.perfHistoryGraphs[chunk][graphIndex].bmData.map(detail => [moment(detail.chartKey.val, 'MM/YY').valueOf(), Number.parseFloat(detail.chartValue.val)]).sort((a, b) => a[0] - b[0]);\n let bmData = data.globalProductsValue.perfHistoryGraphs[chunk][graphIndex].bmData.map(detail => [moment(detail.chartKey, 'MM/YY').valueOf(), Number.parseFloat(detail.chartValue)]).sort((a, b) => a[0] - b[0]);\n\n return [fundData, bmData];\n } catch (e) {\n logger.debug( e );\n }\n }\n}\n\nfunction _performanceBuilder(performances, shareClassCode) {\n let thisPerformanceObj;\n\n for (let thisObj of performances) {\n let thisShClsCode = get(thisObj, 'shClsCde.val');\n\n if (thisShClsCode === shareClassCode) {\n thisPerformanceObj = thisObj;\n }\n }\n\n let asOfDate = get(thisPerformanceObj, 'asOfDate.val');\n let inceptionDate = get(thisPerformanceObj, 'fundIncDtLoc.val');\n let shareClassName = get(thisPerformanceObj, 'shClsName.val');\n let shareCurrency = get(thisPerformanceObj, 'shClsCurr.val');\n let benchmarkName = get(thisPerformanceObj, 'bmcName.val');\n // let benchmarkCurrency = get(thisPerformanceObj, 'bmcCurrency.val');\n\n let aggSCName = shareClassName + ' ' + shareCurrency + ' (%)';\n let aggBMName = benchmarkName + ' (%)';\n\n let fundCumulativeDetails = get(thisPerformanceObj, 'cumulativeDetail');\n\n let shareClassDetailItems = ['ytd', 'oneYr', 'threeYr', 'fiveYr', 'tenYr', 'fiftnYr', 'sinceIncp'];\n let benchmarkDetailItems = ['ytdBMC', 'oneYrBMC', 'threeYrBMC', 'fiveYrBMC', 'tenYrBMC', 'fiftnYrBMC', 'sinceIncpBMC'];\n\n let SCDI = {};\n let BMDI = {};\n\n shareClassDetailItems.forEach(item => (SCDI[item] = fundCumulativeDetails[item].val));\n benchmarkDetailItems.forEach(item => (BMDI[item] = fundCumulativeDetails[item].val));\n\n let shareClassTable = {\n name: aggSCName,\n asOfDate: asOfDate,\n inceptionDate: inceptionDate,\n currency: shareCurrency,\n ytd: SCDI.ytd,\n one: SCDI.oneYr,\n three: SCDI.threeYr,\n five: SCDI.fiveYr,\n ten: SCDI.tenYr,\n fifteen: SCDI.fiftnYr,\n life: SCDI.sinceIncp\n };\n\n let benchMarkTable = {\n name: aggBMName,\n asOfDate: asOfDate,\n inceptionDate: inceptionDate,\n currency: ' - ',\n ytd: BMDI.ytdBMC,\n one: BMDI.oneYrBMC,\n three: BMDI.threeYrBMC,\n five: BMDI.fiveYrBMC,\n ten: BMDI.tenYrBMC,\n fifteen: BMDI.fiftnYrBMC,\n life: BMDI.sinceIncpBMC\n };\n\n let aggTable = [ shareClassTable, benchMarkTable ];\n\n return aggTable;\n}\n\nfunction _performanceCumulativeLabels(action) {\n let [ , performanceLabels ] = action.json;\n return get(performanceLabels, 'performance-cumulative-labels');\n}\n","const assetClassExposureConfig = {\n 'Data': {\n 'Datum': {\n 'spanRow': {\n '-ID': 'spanRow',\n '-Name': 'spanRow',\n '-Label': \"Span Row? ('no' will set the component to 50% width)\",\n '-Type': 'RadioGroup',\n 'Option': [\n {\n '-Selected': 'true', 'Display': 'Yes', 'Value': 'yes'\n }, {\n 'Display': 'No', 'Value': 'no'\n }\n ]\n }, 'showChart': {\n '-ID': 'showChart', '-Name': 'showChart', '-Label': 'Show Chart', '-Type': 'RadioGroup', 'Option': [\n {\n '-Selected': 'true', 'Display': 'Yes', 'Value': 'yes'\n }, {\n 'Display': 'No', 'Value': 'no'\n }\n ]\n }\n }\n }\n};\nexport {assetClassExposureConfig as default};\n","/**\n * Reducer for assetClassExposure\n * Takes json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\n\nimport get from 'lodash/get';\nimport {portfolioUtils} from '../../../util/util';\n\nconst logger = LogManager.getLogger('asset-class-exposure');\n\nexport function assetClassExposure(state, action, products) {\n switch (action.type) {\n case 'POPULATE_ASSET_CLASS_EXPOSURE_SUCCESS':\n logger.debug('Reducing: POPULATE_ASSET_CLASS_EXPOSURE_SUCCESS');\n\n let labels = _getAssetClassExposureLabels(action);\n let data = _getAssetClassExposureData(action);\n let caveats = _getAssetClassExposureCaveats(action);\n\n return Object.assign({}, state, {\n assetClassExposure: {\n label: labels,\n data: data,\n caveats: caveats\n }\n });\n default:\n return state;\n }\n}\n\nfunction _buildAssetClassExposureChartData(chartSrc) {\n let tempObj = {series1: [], series2: [], table: []};\n\n if (typeof chartSrc !== 'undefined') {\n for (let item of chartSrc) {\n tempObj.series1.push({name: item.name, y: Number(item.val.alt)});\n tempObj.series2.push({name: item.name, y: Number(item.range.alt)});\n tempObj.table.push({'name': item.name, 'series1': item.val.alt, 'series2': item.range.alt});\n }\n }\n\n return tempObj;\n}\n\nfunction _getAssetClassExposureData(action) {\n let [ rawPortfolio, rawLabels, rawConfig] = action.json;\n const config = portfolioUtils.getConfig(rawConfig);\n const labels = portfolioUtils.getLabels(rawLabels);\n\n const holding = portfolioUtils.getHolding(rawPortfolio, 'ASSET_CLASS_EXPOSURE');\n const visible = (typeof holding !== 'undefined');\n\n let obj = {\n caveatSecName: 'Portfolio', tableID: 'asset-class-exposure-data', visible: visible\n };\n\n\n if (visible) {\n let lstDtls = get(holding, 'lstDtls');\n\n let tempChart = _buildAssetClassExposureChartData(lstDtls);\n\n obj.fundID = action.fundId;\n obj.assetClassExposureDate = get(holding, 'date.alt');\n\n // New config details\n obj.showChart = config.showChart;\n obj.spanRow = config.spanRow;\n\n // If chart hidden span the full width\n obj.colSpan = obj.showChart ? 'col-sm-5' : 'col-sm-12';\n\n obj.chartData = [\n {\n // colorByPoint: true,\n name: get(labels, 'gross-exposure-coloum'),\n data: tempChart.series1,\n type: 'bar'\n },\n {\n // colorByPoint: true,\n name: get(labels, 'net-exposure-coloum'),\n data: tempChart.series2,\n type: 'bar'\n }\n ];\n obj.table = tempChart.table;\n }\n\n return obj;\n}\n\nfunction _getAssetClassExposureLabels(action) {\n let [ , rawLabels ] = action.json;\n return portfolioUtils.getLabels(rawLabels);\n}\n\nfunction _getAssetClassExposureCaveats(action) {\n let [rawPortfolio ] = action.json;\n return portfolioUtils.getProximity(rawPortfolio);\n}\n","/**\n * Reducer for assetMix\n * Takes json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\nimport {portfolioUtils} from '../../../util/util';\nconst logger = LogManager.getLogger('asset-mix');\n\nexport function assetMix(state, action, products) {\n switch (action.type) {\n case 'POPULATE_ASSET_MIX_SUCCESS':\n logger.debug('Reducing: POPULATE_ASSET_MIX_SUCCESS', action);\n\n let [portfolio, labelsArray] = action.json;\n\n let assetMixData = _infoBuilder(action);\n let labels = _labelsBuilder(labelsArray);\n let caveats = _caveatsBuilder(portfolio);\n\n return Object.assign({}, state, {\n assetMix: {\n data: assetMixData,\n label: labels,\n caveats: caveats\n }\n });\n default:\n return state;\n }\n}\n\n\n/* extract all labels */\nfunction _labelsBuilder(labelsArray) {\n return portfolioUtils.getLabels(labelsArray);\n}\n\n\nfunction _caveatsBuilder(bean) {\n let caveats = {\n };\n\n caveats.proximity = get(bean, 'productsVO.caveatvo.proximity');\n //\n // // caveats.proximity = caveats.proximity.concat(bean.productsVO.caveatvo.proximity);\n //\n // bean.productsVO.caveatvo.elementLevel.caveat.forEach(cvt => {\n // caveats.elementLevel.set(cvt.id, {eleName: cvt.eleName, secName: cvt.secName});\n // });\n //\n // bean.productsVO.caveatvo.elementLevelCaveats.caveat.forEach(cvt => {\n // caveats.elementLevelCaveats.set(cvt.id, cvt.text);\n // });\n //\n // bean.productsVO.caveatvo.impLegalInfo.text.forEach(t => (caveats.impLegalInfo.add(t)));\n // caveats.displayLegalInfo = (caveats.impLegalInfo.size > 0);\n\n return caveats;\n}\n\n\nfunction _infoBuilder(action) {\n let [portfolio, , rawConfig] = action.json;\n logger.debug(rawConfig);\n const config = portfolioUtils.getConfig(rawConfig);\n const holding = portfolioUtils.getHolding(portfolio, 'ASSET_MIX');\n const visible = (typeof holding !== 'undefined');\n let obj = {\n caveatSecName: 'Portfolio', tableID: 'asset-mix-data', visible: visible\n };\n\n if (visible) {\n let lstDtls = get(holding, 'lstDtls');\n obj.total = portfolioUtils.getSectorBreakdownTotalizer(lstDtls);\n\n obj.series = lstDtls.map((o) => {\n return {\n name: o.name,\n y: Number(o.val.alt)\n };\n });\n\n obj.date = get(holding, 'date.alt');\n obj.chart = lstDtls;\n // New config details\n obj.showChart = config.showChart;\n obj.spanRow = config.spanRow;\n }\n\n return obj;\n}\n","/**\n * Created by mdonnel on 08/02/2017.\n */\nconst commoditiesSectorBreakdownConfig = {\n 'Data': {\n 'Datum': {\n 'spanRow': {\n '-ID': 'spanRow',\n '-Name': 'spanRow',\n '-Label': \"Span Row? ('no' will set the component to 50% width)\",\n '-Type': 'RadioGroup',\n 'Option': [\n {\n '-Selected': 'true',\n 'Display': 'Yes',\n 'Value': 'yes'\n },\n {\n 'Display': 'No',\n 'Value': 'no'\n }\n ]\n },\n 'showChart': {\n '-ID': 'showChart',\n '-Name': 'showChart',\n '-Label': 'Show Chart',\n '-Type': 'RadioGroup',\n 'Option': [\n {\n '-Selected': 'true',\n 'Display': 'Yes',\n 'Value': 'yes'\n },\n {\n 'Display': 'No',\n 'Value': 'no'\n }\n ]\n }\n }\n }\n};\nexport {commoditiesSectorBreakdownConfig as default};\n","/**\n * Data Reducer for commoditiesSectorBreakdown\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\nimport {portfolioUtils} from '../../../util/util';\nconst logger = LogManager.getLogger('commodities-sector-breakdown');\n\nexport function commoditiesSectorBreakdown(state, action) {\n switch (action.type) {\n case 'POPULATE_COMMODITIES_SECTOR_BREAKDOWN_SUCCESS':\n logger.debug('Reducing: POPULATE_COMMODITIES_SECTOR_BREAKDOWN_SUCCESS');\n\n let data = _getCommoditiesSectorBreakdownData(action);\n let labels = _getLabels(action);\n let proximity = portfolioUtils.getSectorBreakdownProximity(action);\n return Object.assign({}, state, {\n commoditiesSectorBreakdown: {\n label: labels,\n data: data,\n proximity: proximity\n }\n });\n default:\n return state;\n }\n}\nfunction _getLabels(action) {\n let [ , rawLabels ] = action.json;\n return portfolioUtils.getLabels(rawLabels);\n}\n\nfunction _getCommoditiesSectorBreakdownData(action) {\n let [ rawPortfolio, rawLabels, rawConfig ] = action.json;\n const config = portfolioUtils.getConfig(rawConfig);\n const labels = get(rawLabels, 'commodities-sector-breakdown');\n const holdings = portfolioUtils.getHolding(rawPortfolio, 'COMM_SEC_BDN');\n const visible = (typeof holdings !== 'undefined');\n let obj = {\n caveatSecName: 'Portfolio', tableID: 'commodities-sector-breakdown-data', visible: visible\n };\n\n if (visible) {\n let lstDtls = get(holdings, 'lstDtls');\n let tempChart = portfolioUtils.buildSingleSeriesSectorBreakdownChartData(lstDtls);\n\n obj.commoditesSectorBreakdownDate = get(holdings, 'date.alt');\n obj.commoditesSectorBreakdownTotal = portfolioUtils.getSectorBreakdownTotalizer(lstDtls);\n obj.hasNegativeValue = portfolioUtils.getSectorBreakdownNegatives(lstDtls);\n obj.showChartAlternative = !(obj.commoditesSectorBreakdownTotal === 100.0) || obj.hasNegativeValue;\n obj.table = tempChart.table;\n obj.showChart = config.showChart;\n obj.spanRow = config.spanRow;\n obj.colSpan = obj.showChart ? 'col-sm-5' : 'col-sm-12';\n obj.chartData = [\n {\n name: get(labels, 'label'), data: tempChart.series1, type: 'pie', colorByPoint: true\n }\n ];\n }\n\n return obj;\n}\n","/**\n * Data Reducer for creditQualityExposure\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\nimport {portfolioUtils} from '../../../util/util';\nconst logger = LogManager.getLogger('credit-quality-exposure');\n\nexport function creditQualityExposure(state, action) {\n switch (action.type) {\n case 'POPULATE_CREDIT_QUALITY_EXPOSURE_SUCCESS':\n logger.debug('Reducing: POPULATE_CREDIT_QUALITY_EXPOSURE_SUCCESS');\n\n let data = _getCreditQualityExposureData(action);\n let labels = _getLabels(action);\n let proximity = portfolioUtils.getSectorBreakdownProximity(action);\n\n return Object.assign({}, state, {\n creditQualityExposure: {\n label: labels,\n data: data,\n proximity: proximity\n }\n });\n default:\n return state;\n }\n}\n\nfunction _getLabels(action) {\n let [ , rawLabels ] = action.json;\n return portfolioUtils.getLabels(rawLabels);\n}\n\nfunction _buildCreditQualityExposureChartData(chartSrc, labels) {\n let tempObj = {series1: []};\n\n if (typeof chartSrc !== 'undefined') {\n for (let item of chartSrc) {\n if (!item.empty) {\n tempObj.series1.push({name: get(labels, item.title), y: Number(item.total)});\n }\n }\n }\n\n return tempObj;\n}\n\nfunction _getCreditQualityExposureData(action) {\n let [ rawPortfolio, rawLabels, rawConfig ] = action.json;\n const config = portfolioUtils.getConfig(rawConfig);\n const rawHoldings = get(rawPortfolio, 'productsVO.portfolioVO.holdings');\n const labels = portfolioUtils.getLabels(rawLabels);\n const holdings = portfolioUtils.findHoldingObj(rawHoldings, 'CRD_QLTY_EXPO');\n const lstDtls = get(holdings, 'lstDtls');\n const visible = (typeof holdings !== 'undefined');\n const creditQualityExposureDate = get(holdings, 'date.alt');\n\n let investmentGrade = portfolioUtils.getGrades(lstDtls, ['AAA', 'AA', 'A', 'BBB', 'SP-1']);\n let belowInvestmentGrade = portfolioUtils.getGrades(lstDtls, ['BB', 'B', 'CCC', 'CC', 'C', 'D']);\n let notRated = portfolioUtils.getGrades(lstDtls, ['Not Rated', 'N/A']);\n let refunded = portfolioUtils.getGrades(lstDtls, ['RF']);\n let cashAndCashEquv = portfolioUtils.getGrades(lstDtls, ['Cash & Cash Equivalents', 'Cash & Cash Equivalents'], true);\n\n investmentGrade.label = get(labels, 'investment-grade');\n investmentGrade.title = 'investment-grade';\n investmentGrade.index = 1;\n\n belowInvestmentGrade.label = get(labels, 'below-investment-grade');\n belowInvestmentGrade.title = 'below-investment-grade';\n belowInvestmentGrade.index = 2;\n\n notRated.label = get(labels, 'not-rated');\n notRated.title = 'not-rated';\n notRated.index = 3;\n\n\n refunded.label = get(labels, 'refunded');\n refunded.title = 'refunded';\n refunded.index = 4;\n\n cashAndCashEquv.label = get(labels, 'cash-and-cash-equv');\n cashAndCashEquv.title = 'cash-and-cash-equv';\n cashAndCashEquv.index = (refunded.empty ? 4 : 5);\n cashAndCashEquv.hideRows = true;\n\n const workChartData = _buildCreditQualityExposureChartData([investmentGrade, belowInvestmentGrade, notRated, refunded, cashAndCashEquv], labels);\n\n let chartData = [\n {\n name: get(labels, 'gross-exposure-coloum'),\n data: workChartData.series1,\n type: 'bar',\n colorByPoint: true\n }\n ];\n\n const investmentGradeTotal = investmentGrade.total;\n const belowInvestmentGradeTotal = belowInvestmentGrade.total;\n const notRatedTotal = notRated.total;\n const refundedTotal = refunded.total;\n const cashAndCashEquvTotal = cashAndCashEquv.total;\n\n const creditQualityExposureTotal = [investmentGradeTotal, belowInvestmentGradeTotal, notRatedTotal, refundedTotal, cashAndCashEquvTotal].reduce((a, b) => a + b, 0);\n\n const showChart = config.showChart;\n const colSpan = showChart ? 'col-sm-4' : 'col-sm-12';\n return {\n caveatSecName: 'Portfolio',\n visible: visible,\n showChart: showChart,\n colSpan: colSpan,\n creditQualityExposureDate: creditQualityExposureDate,\n labels: labels,\n investmentGrade: investmentGrade,\n belowInvestmentGrade: belowInvestmentGrade,\n notRated: notRated,\n refunded: refunded,\n cashAndCashEquv: cashAndCashEquv,\n creditQualityExposureTotal: creditQualityExposureTotal,\n chartData: chartData\n };\n}\n","/**\n * Data Reducer for couponRateBreakdown\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\n// import {LogManager} from 'aurelia-framework';\n// const logger = LogManager.getLogger('coupon-rate-breakdown');\nimport mapValues from 'lodash/mapValues';\nimport keyBy from 'lodash/keyBy';\nimport get from 'lodash/get';\n\nexport function couponRateBreakdownLabels(state, action) {\n switch (action.type) {\n case 'POPULATE_COUPON_RATE_BREAKDOWN_STATE_SUCCESS':\n\n let [, labelsArray] = action.json;\n\n let labels = _labelsBuilder(labelsArray);\n\n return Object.assign({}, state, {\n couponRateBreakdown: {\n label: labels\n }\n });\n default:\n return state;\n }\n}\n\nfunction _labelsBuilder(labelsArray) {\n return mapValues(keyBy(get(labelsArray, 'provider.labels.label'), 'key'), 'value');\n}\n","/**\n * Data Reducer for couponRateBreakdown\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport get from 'lodash/get';\nimport sortBy from 'lodash/sortBy';\nimport {portfolioUtils} from '../../../util/util';\n// import {LogManager} from 'aurelia-framework';\n// const logger = LogManager.getLogger('coupon-rate-breakdown');\n\nexport function couponRateBreakdown(state, action) {\n switch (action.type) {\n case 'POPULATE_COUPON_RATE_BREAKDOWN_STATE_SUCCESS':\n\n let [portfolio] = action.json;\n\n let data = _infoBuilder(action);\n let caveats = _caveatsBuilder(portfolio);\n\n return Object.assign({}, state, {\n couponRateBreakdown: {\n data: data,\n caveats: caveats\n }\n });\n default:\n return state;\n }\n}\n\nfunction _infoBuilder(action) {\n let [portfolio, , rawConfig] = action.json;\n const config = portfolioUtils.getConfig(rawConfig);\n const holdings = portfolioUtils.getHolding(portfolio, 'CPN_RATE_BDN');\n const visible = (typeof holdings !== 'undefined');\n\n let obj = {\n visible: visible, caveatSecName: 'Portfolio', tableID: 'coupon-rate-breakdown-data'\n };\n\n // New config details\n obj.showChart = config.showChart;\n obj.spanRow = config.spanRow;\n\n if (visible) {\n obj = Object.assign({}, obj, portfolioUtils.getSimplifiedBreakdown(holdings, false));\n }\n\n obj.series = sortBy(obj.series, (o) => {\n return Number(o.name.split('-')[0]);\n });\n\n return obj;\n}\n\nfunction _caveatsBuilder(portfolio) {\n let caveats = {};\n caveats.proximity = get(portfolio, 'productsVO.caveatvo.proximity');\n return caveats;\n}\n","/**\n * Created by mdonnel on 02/02/2017.\n */\nconst currencyDistributionConfig = {\n 'Data': {\n 'Datum': {\n 'spanRow': {\n '-ID': 'spanRow',\n '-Name': 'spanRow',\n '-Label': \"Span Row? ('no' will set the component to 50% width)\",\n '-Type': 'RadioGroup',\n 'Option': [\n {\n '-Selected': 'true',\n 'Display': 'Yes',\n 'Value': 'yes'\n },\n {\n 'Display': 'No',\n 'Value': 'no'\n }\n ]\n },\n 'showChart': {\n '-ID': 'showChart',\n '-Name': 'showChart',\n '-Label': 'Show Chart',\n '-Type': 'RadioGroup',\n 'Option': [\n {\n '-Selected': 'true',\n 'Display': 'Yes',\n 'Value': 'yes'\n },\n {\n 'Display': 'No',\n 'Value': 'no'\n }\n ]\n }\n }\n }\n};\nexport {currencyDistributionConfig as default};\n","/**\n * Data Reducer for currencyDistribution\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\nimport {portfolioUtils} from '../../../util/util';\n\nconst logger = LogManager.getLogger('currency-distribution');\n\nexport function currencyDistribution(state, action) {\n switch (action.type) {\n case 'POPULATE_CURRENCY_DISTRIBUTION_SUCCESS':\n logger.debug('Reducing: POPULATE_CURRENCY_DISTRIBUTION_SUCCESS');\n\n let data = _getCurrencyDistributionData(action);\n let labels = _getLabels(action);\n let proximity = portfolioUtils.getSectorBreakdownProximity(action);\n\n return Object.assign({}, state, {\n currencyDistribution: {\n label: labels,\n data: data,\n proximity: proximity\n }\n });\n default:\n return state;\n }\n}\n\nfunction _getLabels(action) {\n let [ , rawLabels ] = action.json;\n return portfolioUtils.getLabels(rawLabels);\n}\n\nfunction _getCurrencyDistributionData(action) {\n let [ rawPortfolio, rawLabels, rawConfig ] = action.json;\n const config = portfolioUtils.getConfig(rawConfig);\n const labels = get(rawLabels, 'currency-distribution');\n const rawSigCur = portfolioUtils.getHolding(rawPortfolio, 'SIG_CUR');\n const rawCurDisBdn = portfolioUtils.getHolding(rawPortfolio, 'CUR_DIST_BDN');\n\n const useableHolding = (typeof rawCurDisBdn === 'undefined' ? rawSigCur : rawCurDisBdn);\n const visible = (typeof useableHolding !== 'undefined');\n\n let obj = {\n caveatSecName: 'Portfolio',\n visible: visible\n };\n // New config details\n obj.showChart = config.showChart;\n obj.spanRow = config.spanRow;\n\n if (visible) {\n let lstDtls = get(useableHolding, 'lstDtls');\n let tempChart = portfolioUtils.buildSingleSeriesSectorBreakdownChartData(lstDtls);\n\n obj.fundID = action.fundId;\n obj.table = tempChart.table;\n obj.currencyDistributionDate = get(useableHolding, 'date.alt');\n obj.colSpan = obj.showChart ? 'col-sm-4' : 'col-sm-12';\n obj.chartData = [\n {\n name: get(labels, 'gross-exposure-coloum'), data: tempChart.series1, type: 'bar', colorByPoint: true\n }\n ];\n }\n\n\n return obj;\n}\n","/**\n * Created by mdonnel on 08/02/2017.\n */\nconst fixedIncomeSectorBreakdownConfig = {\n 'Data': {\n 'Datum': {\n 'spanRow': {\n '-ID': 'spanRow',\n '-Name': 'spanRow',\n '-Label': \"Span Row? ('no' will set the component to 50% width)\",\n '-Type': 'RadioGroup',\n 'Option': [\n {\n '-Selected': 'true',\n 'Display': 'Yes',\n 'Value': 'yes'\n },\n {\n 'Display': 'No',\n 'Value': 'no'\n }\n ]\n },\n 'showChart': {\n '-ID': 'showChart',\n '-Name': 'showChart',\n '-Label': 'Show Chart',\n '-Type': 'RadioGroup',\n 'Option': [\n {\n '-Selected': 'true',\n 'Display': 'Yes',\n 'Value': 'yes'\n },\n {\n 'Display': 'No',\n 'Value': 'no'\n }\n ]\n }\n }\n }\n};\nexport {fixedIncomeSectorBreakdownConfig as default};\n","/**\n * Data Reducer for fixedIncomeSectorBreakdown\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\n\nimport {portfolioUtils} from '../../../util/util';\nconst logger = LogManager.getLogger('fixed-income-sector-breakdown');\n\nexport function fixedIncomeSectorBreakdown(state, action) {\n switch (action.type) {\n case 'POPULATE_FIXED_INCOME_SECTOR_BREAKDOWN_SUCCESS':\n logger.debug('Reducing: POPULATE_FIXED_INCOME_SECTOR_BREAKDOWN_SUCCESS');\n\n let data = _getFixedIncomeSectorBreakdownData(action);\n let labels = data.visible ? _getLabels(action) : {};\n let proximity = data.visible ? portfolioUtils.getSectorBreakdownProximity(action) : {};\n\n return Object.assign({}, state, {\n fixedIncomeSectorBreakdown: {\n label: labels,\n data: data,\n proximity: proximity\n }\n });\n default:\n return state;\n }\n}\nfunction _getLabels(action) {\n let [ , rawLabels ] = action.json;\n return portfolioUtils.getLabels(rawLabels);\n}\n\nfunction _getFixedIncomeSectorBreakdownData(action) {\n let [ rawPortfolio, , rawConfig] = action.json;\n const config = portfolioUtils.getConfig(rawConfig);\n const labels = _getLabels(action);\n const holdings = portfolioUtils.getHolding(rawPortfolio, 'FXD_INC_BDN');\n const visible = (typeof holdings !== 'undefined');\n\n let obj = {\n visible: visible, caveatSecName: 'Portfolio', tableID: 'fixed-income-sector-breakdown-data'\n };\n\n if (visible) {\n let lstDtls = get(holdings, 'lstDtls');\n let tempChart = portfolioUtils.buildSingleSeriesSectorBreakdownChartData(lstDtls);\n\n obj.fixedIncomeSectorBreakdownDate = get(holdings, 'date.alt');\n obj.fixedIncomeSectorBreakdownTotal = portfolioUtils.getSectorBreakdownTotalizer(lstDtls);\n obj.hasNegativeValue = portfolioUtils.getSectorBreakdownNegatives(lstDtls);\n obj.showChartAlternative = !(obj.fixedIncomeSectorBreakdownTotal === 100.0) || obj.hasNegativeValue;\n obj.table = tempChart.table;\n // New config details\n obj.showChart = config.showChart;\n obj.spanRow = config.spanRow;\n obj.colSpan = obj.showChart ? 'col-sm-5' : 'col-sm-12';\n obj.chartData = [\n {\n name: get(labels, 'gross-exposure-coloum'), data: tempChart.series1, type: 'bar', colorByPoint: true\n }\n ];\n }\n\n return obj;\n}\n","/**\n * Data Reducer for geographicAllocation\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport get from 'lodash/get';\nimport {portfolioUtils} from '../../../util/util';\n\nexport function geographicAllocation(state, action) {\n switch (action.type) {\n case 'POPULATE_GEOGRAPHIC_ALLOCATION_SUCCESS':\n // let [portfolio, labelsArray] = action.json;\n let [, labelsArray] = action.json;\n\n let labels = _labelsBuilder(labelsArray);\n let data = _dataBuilder(action);\n let caveats = {};\n //let caveats = _caveatsBuilder(portfolio);\n\n return Object.assign({}, state, {\n geographicAllocation: {\n label: labels,\n data: data,\n caveats: caveats\n }\n });\n default:\n return state;\n }\n}\n\n/**\n * Get the Labels\n * @param labelsArray\n * @returns {*}\n * @private\n */\nfunction _labelsBuilder(labelsArray) {\n return portfolioUtils.getLabels(labelsArray);\n}\n\nfunction _dataBuilder(action) {\n let [rawPortfolio] = action.json;\n const config = action.config;\n const suppressOpts = {\n actor: ['all', action.actor],\n fundId: action.fundId,\n portfolioComponent: action.portfolioComponent,\n assetClass: action.assetClass\n };\n const useSuppression = portfolioUtils.checkSuppression(config, suppressOpts );\n\n const rawBreakdowns = get(rawPortfolio, 'globalProductsValue.portfolioIntlValue.breakdown.brkdwnDet');\n const breakdown = portfolioUtils.findObjInArray(rawBreakdowns, 'COUNTRY_ALLOCATION');\n let visible = (typeof breakdown !== 'undefined');\n if (useSuppression) {\n // if this component is suppressed, then prevent it from continuing any further work.\n visible = false;\n }\n\n let obj = {\n caveatSecName: 'Portfolio', tableID: 'geographic-allocation-data', visible: visible\n };\n\n if (visible) {\n let tempBreakdown = portfolioUtils.buildAllocationComponent(breakdown);\n\n obj = Object.assign({}, obj, tempBreakdown);\n\n // obj.showChart = config.showChart;\n // obj.spanRow = config.spanRow;\n obj.showChart = true;\n obj.spanRow = true;\n }\n return obj;\n}\n","/**\n * Data Reducer for geographicBreakdown\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\n// import {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\nimport {portfolioUtils} from '../../../util/util';\n// const logger = LogManager.getLogger('geographic-breakdown');\n\nexport function geographicBreakdown(state, action) {\n switch (action.type) {\n case 'POPULATE_GEOGRAPHIC_BREAKDOWN_SUCCESS':\n\n let [portfolio, labelsArray] = action.json;\n\n let labels = _labelsBuilder(labelsArray);\n let data = _infoBuilder(action);\n let caveats = _caveatsBuilder(portfolio);\n\n\n return Object.assign({}, state, {\n geographicBreakdown: {\n label: labels,\n data: data,\n caveats: caveats\n }\n });\n default:\n return state;\n }\n}\n\n\nfunction _labelsBuilder(labelsArray) {\n return portfolioUtils.getLabels(labelsArray);\n}\n\nfunction _infoBuilder(action) {\n let [portfolio, , rawConfig] = action.json;\n const config = portfolioUtils.getConfig(rawConfig);\n const holding = portfolioUtils.getHolding(portfolio, 'GEO_BDN');\n const visible = (typeof holding !== 'undefined');\n let obj = {\n caveatSecName: 'Portfolio', tableID: 'geographic-breakdown-data', visible: visible\n };\n\n if (visible) {\n let lstDtls = get(holding, 'lstDtls');\n\n obj.total = portfolioUtils.getSectorBreakdownTotalizer(lstDtls);\n obj.series = lstDtls.map((o) => {\n return {\n name: o.name,\n y: Number(o.val.alt)\n };\n });\n\n obj.date = get(holding, 'date.alt');\n obj.chart = lstDtls;\n // New config details\n obj.showChart = config.showChart;\n obj.spanRow = config.spanRow;\n }\n\n return obj;\n}\n\nfunction _caveatsBuilder(portfolio) {\n let caveats = {};\n\n caveats.proximity = get(portfolio, 'productsVO.caveatvo.proximity');\n\n return caveats;\n}\n","/**\n * Data Reducer for geographicBreakdown\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\n// import {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\nimport {portfolioUtils} from '../../../util/util';\n// const logger = LogManager.getLogger('geographic-breakdown');\n\nexport function geographicBreakdown(state, action) {\n switch (action.type) {\n case 'POPULATE_GEOGRAPHIC_BREAKDOWN_SUCCESS':\n\n let [portfolio, labelsArray] = action.json;\n\n let labels = _labelsBuilder(labelsArray);\n let data = _dataBuilder(action);\n let caveats = _caveatsBuilder(portfolio);\n\n return Object.assign({}, state, {\n geographicBreakdown: {\n label: labels,\n data: data,\n caveats: caveats\n }\n });\n default:\n return state;\n }\n}\n/**\n * Get the Labels\n * @param labelsArray\n * @returns {*}\n * @private\n */\nfunction _labelsBuilder(labelsArray) {\n return portfolioUtils.getLabels(labelsArray);\n}\n/**\n * Build and reduce the data\n * @param action\n * @returns {Object}\n * @private\n */\nfunction _dataBuilder(action) {\n let [rawPortfolio, rawConfig] = action.json;\n const config = portfolioUtils.getConfig(rawConfig);\n const rawBreakdowns = get(rawPortfolio, 'globalProductsValue.portfolioIntlValue.breakdown.brkdwnDet');\n const breakdown = portfolioUtils.findObjInArray(rawBreakdowns, 'COUNTRY_ALLOCATION');\n const visible = (typeof breakdown !== 'undefined');\n let obj = {\n caveatSecName: 'Portfolio', tableID: 'geographic-breakdown-data', visible: visible\n };\n\n if (visible) {\n let tempBreakdown = portfolioUtils.getIntlSimplifiedBreakdown(breakdown);\n\n obj = Object.assign({}, obj, tempBreakdown);\n\n obj.showChart = config.showChart;\n obj.spanRow = config.spanRow;\n }\n return obj;\n}\n/**\n * Retrieve the Caveats\n * @param portfolio\n * @returns {{}}\n * @private\n */\nfunction _caveatsBuilder(portfolio) {\n let caveats = {};\n\n caveats.proximity = get(portfolio, 'productsVO.caveatvo.proximity');\n\n return caveats;\n}\n","/**\n * Reducer for geographicExposure\n * Takes json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\nimport {portfolioUtils} from '../../../util/util';\nconst logger = LogManager.getLogger('geographic-exposure');\n\nexport function geographicExposure(state, action, products) {\n switch (action.type) {\n case 'POPULATE_GEOGRAPHIC_EXPOSURE_SUCCESS':\n logger.debug('Reducing: POPULATE_GEOGRAPHIC_EXPOSURE_SUCCESS', action);\n\n let [portfolio, labelsArray] = action.json;\n\n let labels = _labelsBuilder(labelsArray);\n let data = _infoBuilder(action);\n let caveats = _caveatsBuilder(portfolio);\n\n return Object.assign({}, state, {\n geographicExposure: {\n label: labels,\n data: data,\n caveats: caveats\n }\n });\n default:\n return state;\n }\n}\n\n\nfunction _labelsBuilder(labelsArray) {\n //return mapValues(keyBy(get(labelsArray, 'provider.labels.label'), 'key'), 'value');\n return portfolioUtils.getLabels(labelsArray);\n}\n\n\nfunction _caveatsBuilder(portfolio) {\n let caveats = {};\n caveats.proximity = get(portfolio, 'productsVO.caveatvo.proximity');\n return caveats;\n}\n\nfunction _infoBuilder(action) {\n let [portfolio,,,, rawConfig] = action.json;\n logger.debug(action.json);\n const config = portfolioUtils.getConfig(rawConfig);\n const holding = portfolioUtils.getHolding(portfolio, 'GEOGRAPHIC_EXPOSURE');\n const visible = (typeof holding !== 'undefined');\n\n let obj = {\n caveatSecName: 'Portfolio', tableID: 'geographic-exposure-data', visible: visible\n };\n\n // New config details\n obj.showChart = config.showChart;\n obj.spanRow = config.spanRow;\n\n if (visible) {\n let lstDtls = get(holding, 'lstDtls');\n obj.total = portfolioUtils.getSectorBreakdownTotalizer(lstDtls);\n obj.series1 = lstDtls.map((o) => {\n return {\n name: o.name,\n y: Number(o.val.alt)\n };\n });\n obj.series2 = lstDtls.map((o) => {\n return {\n name: o.name,\n y: Number(o.range.alt)\n };\n });\n\n obj.date = get(holding, 'date.alt');\n\n obj.chart = lstDtls;\n }\n\n return obj;\n}\n","/**\n * Data Reducer for holdings\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\n\nconst logger = LogManager.getLogger('holdings');\nconst mdash = '\\u2014';\n\nexport function holdings(state, action) {\n switch (action.type) {\n case 'POPULATE_HOLDINGS_STATE_SUCCESS':\n logger.debug('Reducing: POPULATE_HOLDINGS_SUCCESS', action);\n let [holdingsData, holdingsLabels] = action.json;\n\n let holdingsList = holdingsData.globalProductsValue.portfolioIntlValue.etfDailyHoldings\n .map(_createHoldingMapper());\n\n let asOfDate = get(holdingsData, 'globalProductsValue.portfolioIntlValue.etfDailyHoldings.0.asOfDate.val');\n\n //TODO: get this url from somewhere!\n let downloadLink = 'http://www.franklintempleton.co.uk/content-common/portfolio-holdings/en_GB/local-GB/4802_holdings.pdf';\n\n let showNotionalValue = holdingsList.some(holding => holding.notionalValue !== mdash);\n\n let labelObj = holdingsLabels.provider.labels.label.reduce((obj, label) => Object.defineProperty(obj, label.key, {value: label.value, configurable: true, enumerable: true}), {});\n return Object.assign({}, state, {\n holdings: {\n asOfDate,\n downloadLink,\n label: labelObj,\n holdingsList,\n showNotionalValue\n }\n });\n default:\n return state;\n }\n}\n\nfunction _createHoldingMapper() {\n return holding => {\n return {\n ticker: get(holding, 'securityTicker.val', mdash),\n isin: get(holding, 'IsinSecurityNumber.val', mdash),\n holdingName: get(holding, 'holdingName.val', mdash),\n sector: get(holding, 'sectorName.val', mdash),\n weight: get(holding, 'pctOfNetAssets.val', mdash),\n marketValue: get(holding, 'marketValue.val', mdash),\n notionalValue: get(holding, 'notionalMarketValue.val', mdash)\n };\n };\n}\n","/**\n * Data Reducer for managerRoster\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport mapValues from 'lodash/mapValues';\nimport keyBy from 'lodash/keyBy';\nimport get from 'lodash/get';\nimport find from 'lodash/find';\nimport groupBy from 'lodash/groupBy';\nimport toArray from 'lodash/toArray';\nimport map from 'lodash/map';\nimport {showElement} from '../../../../common/utilities/show-element';\nimport {portfolioUtils} from '../../../util/util';\n\n/*\nimport {LogManager} from 'aurelia-framework';\nconst logger = LogManager.getLogger('manager-roster');\n*/\n\nexport function managerRoster(state, action) {\n switch (action.type) {\n case 'POPULATE_MANAGER_ROSTER_SUCCESS':\n let [portfolio, labelsArray, fundConfigData, fundInfo, managerRosterInfo, rawConfig] = action.json;\n\n let fundID = action.fundId;\n let fundCat = get(fundInfo, 'productsVO.fundinfo.fndCategory.val');\n let managers = get(managerRosterInfo, 'provider.MANAGERS.MANAGER');\n\n let label = _labelsBuilder(labelsArray);\n let show = showElement(fundConfigData, 'MGR_ROSTER', fundID, fundCat);\n\n let data = _newDataBuilder(portfolio, managers);\n let caveats = _caveatsBuilder(portfolio);\n\n const config = portfolioUtils.getConfig(rawConfig);\n data = Object.assign({}, data, config);\n\n return Object.assign({}, state, {\n managerRoster: {\n label,\n showElement: show,\n data,\n caveats\n }\n });\n\n default:\n return state;\n }\n}\n\nfunction _labelsBuilder(labelsArray) {\n return mapValues(keyBy(get(labelsArray, 'provider.labels.label'), 'key'), 'value');\n}\n\nfunction _caveatsBuilder(portfolio) {\n let caveats = {};\n caveats.proximity = get(portfolio, 'productsVO.caveatvo.proximity');\n return caveats;\n}\n\nfunction _newDataBuilder(portfolio, managers) {\n const holding = portfolioUtils.getHolding(portfolio, 'MGR_ROSTER');\n const visible = (typeof holding !== 'undefined');\n let obj = {\n caveatSecName: 'Portfolio', tableID: 'manager-roster', visible: visible\n };\n\n if (visible) {\n let lstDtls = get(holding, 'lstDtls');\n\n let date = get(holding, 'date.alt');\n let grouped = groupBy(lstDtls, 'name');\n let indexed = toArray(grouped);\n let groupedData = indexed.map((o) => {\n let items = map(o.filter((i) => { return (i.val.val); }), (i) => {\n let name = i.val.val;\n let managerInfo = find(managers, { Manager: name});\n return {\n name,\n val: Number(i.range.alt),\n managerImgSrc: get(managerInfo, 'Image_Path'), //managerInfo.Image_Path,\n managerDescription: get(managerInfo, 'Description-Long_TRANSLATION')\n };\n });\n let groupInfo = o.filter((i) => { return (!i.val.val); });\n return {\n name: (groupInfo.length > 0) ? groupInfo[0].name : '',\n total: (groupInfo.length > 0) ? Number(groupInfo[0].range.alt) : '',\n items\n };\n });\n obj.date = date;\n obj.groupedData = groupedData;\n }\n return obj;\n}\n","/**\n * Data Reducer for marketCapitalisation\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport get from 'lodash/get';\nimport {portfolioUtils} from '../../../util/util';\n\nimport {LogManager} from 'aurelia-framework';\n\nconst logger = LogManager.getLogger('market-capitalisation');\n\n//export function marketCapitalisation(state, action, es) {\nexport function marketCapitalisation(state, action) {\n switch (action.type) {\n case 'POPULATE_MARKET_CAPITALISATION_SUCCESS':\n const [portfolio] = action.json;\n const data = _infoBuilder(action);\n const caveats = _caveatsBuilder(portfolio);\n logger.debug('Reducing: POPULATE_MARKET_CAPITALISATION');\n\n return Object.assign({}, state, {\n marketCapitalisation: {\n data: data,\n caveats: caveats\n }\n });\n default:\n return state;\n }\n}\n\nfunction _caveatsBuilder(portfolio) {\n const caveats = {};\n\n caveats.proximity = get(portfolio, 'productsVO.caveatvo.proximity');\n\n return caveats;\n}\n\nfunction _infoBuilder(action) {\n const [rawPortfolio] = action.json;\n // Get and handle component configuration\n const config = action.config;\n const suppressOpts = {\n actor: ['all', action.actor],\n fundId: action.fundId,\n portfolioComponent: action.portfolioComponent,\n assetClass: action.assetClass\n };\n const useSuppression = portfolioUtils.checkSuppression(config, suppressOpts );\n\n const rawBreakdowns = get(rawPortfolio, 'globalProductsValue.portfolioIntlValue.breakdown.brkdwnDet');\n const breakdown = portfolioUtils.findObjInArray(rawBreakdowns, 'MARKET_CAPITAL_ALLOCATION');\n let visible = (typeof breakdown !== 'undefined');\n if (useSuppression) {\n // if this component is suppressed, then prevent it from continuing any further work.\n visible = false;\n }\n let obj = {\n caveatSecName: 'Portfolio', tableID: 'market-capitalisation-data', visible: visible\n };\n\n if (visible) {\n const tempBreakdown = portfolioUtils.getEtfSimplifiedBreakdown(breakdown, {'sorted': true, 'doChart': true});\n\n obj = Object.assign({}, obj, tempBreakdown);\n\n // obj.showChart = config.showChart;\n // obj.spanRow = config.spanRow;\n obj.showChart = true;\n obj.spanRow = true;\n }\n return obj;\n}\n","/**\n * Data Reducer for marketCapitalisation\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport get from 'lodash/get';\nimport {portfolioUtils} from '../../../util/util';\n\nimport {LogManager} from 'aurelia-framework';\n\nconst logger = LogManager.getLogger('market-capitalisation');\n\nexport function marketCapitalisation(state, action) {\n switch (action.type) {\n case 'POPULATE_MARKET_CAPITALISATION_SUCCESS':\n let [portfolio, labelsArray] = action.json;\n\n let labels = portfolioUtils.getLabels(labelsArray);\n let data = _infoBuilder(action);\n let caveats = _caveatsBuilder(portfolio);\n logger.debug('Reducing: POPULATE_MARKET_CAPITALISATION');\n\n return Object.assign({}, state, {\n marketCapitalisation: {\n label: labels,\n data: data,\n caveats: caveats\n }\n });\n default:\n return state;\n }\n}\n\nfunction _caveatsBuilder(portfolio) {\n let caveats = {};\n\n caveats.proximity = get(portfolio, 'productsVO.caveatvo.proximity');\n\n return caveats;\n}\n\nfunction _infoBuilder(action) {\n let [rawPortfolio] = action.json;\n // const config = portfolioUtils.getConfig(rawConfig);\n const rawBreakdowns = get(rawPortfolio, 'globalProductsValue.portfolioIntlValue.breakdown.brkdwnDet');\n const breakdown = portfolioUtils.findObjInArray(rawBreakdowns, 'MARKET_CAPITAL_ALLOCATION');\n const visible = (typeof breakdown !== 'undefined');\n let obj = {\n caveatSecName: 'Portfolio', tableID: 'market-capitalisation-data', visible: visible\n };\n\n if (visible) {\n let tempBreakdown = portfolioUtils.getIntlSimplifiedBreakdown(breakdown, {'sorted': false});\n\n obj = Object.assign({}, obj, tempBreakdown);\n\n obj.showChart = true;\n obj.spanRow = true;\n }\n return obj;\n}\n","import mapValues from 'lodash/mapValues';\nimport keyBy from 'lodash/keyBy';\nimport get from 'lodash/get';\n\n\nexport function maturityBreakdownLabels(state, action) {\n switch (action.type) {\n case 'POPULATE_MATURITY_BREAKDOWN_SUCCESS':\n\n let [, labelsArray] = action.json;\n\n let labels = _labelsBuilder(labelsArray);\n\n return Object.assign({}, state, {\n maturityBreakdown: {\n label: labels\n }\n });\n default:\n return state;\n }\n}\n\nfunction _labelsBuilder(labelsArray) {\n return mapValues(keyBy(get(labelsArray, 'provider.labels.label'), 'key'), 'value');\n}\n","import get from 'lodash/get';\nimport sumBy from 'lodash/sumBy';\nimport filter from 'lodash/filter';\nimport {portfolioUtils} from '../../../util/util';\n\n// const logger = LogManager.getLogger('strategy-breakdown');\n\nexport function maturityBreakdown(state, action) {\n switch (action.type) {\n case 'POPULATE_MATURITY_BREAKDOWN_SUCCESS':\n\n let [portfolio] = action.json;\n\n let data = _infoBuilder(action);\n let caveats = _caveatsBuilder(portfolio);\n\n return Object.assign({}, state, {\n maturityBreakdown: {\n data: data,\n caveats: caveats\n }\n });\n default:\n return state;\n }\n}\n\nfunction _infoBuilder(action) {\n let [portfolio, , rawConfig] = action.json;\n const config = portfolioUtils.getConfig(rawConfig);\n const holding = portfolioUtils.getHolding(portfolio, 'MAT_BDN');\n //let holding = find(get(portfolio, 'productsVO.portfolioVO.holdings'), (h) => { return (h.type === 'MAT_BDN'); });\n\n const visible = (typeof holding !== 'undefined');\n let obj = {\n caveatSecName: 'Portfolio', tableID: 'fixed-income-sector-breakdown-data', visible: visible\n };\n\n // New config details\n obj.showChart = config.showChart;\n obj.spanRow = config.spanRow;\n\n if (visible) {\n let lstDtls = get(holding, 'lstDtls');\n\n obj.total = sumBy(lstDtls, (o) => { return (o.val.alt * 100); } ) / 100;\n let lstDtlsSorted = filter(lstDtls, (o) => { return o.name !== 'Other'; }).concat(filter(lstDtls, (o) => { return o.name === 'Other'; }));\n\n obj.series = lstDtlsSorted.map((o) => {\n return {\n name: o.name,\n y: Number(o.val.alt)\n };\n });\n\n obj.chart = lstDtlsSorted.map((o) => {\n return {\n name: o.name,\n val: o.val.alt,\n range: o.range.alt\n };\n });\n\n obj.date = get(holding, 'date.alt');\n }\n\n\n/*\n return {\n total,\n series,\n chart,\n date\n };\n*/\n return obj;\n}\n\nfunction _caveatsBuilder(portfolio) {\n let caveats = {};\n\n caveats.proximity = get(portfolio, 'productsVO.caveatvo.proximity');\n\n return caveats;\n}\n","/**\n * Data Reducer for portfolioStatisticsAndPositions\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\nimport findIndex from 'lodash/findIndex';\nimport {portfolioUtils} from '../../../util/util';\n\nconst logger = LogManager.getLogger('portfolio-statistics-and-positions');\n\nexport function portfolioStatisticsAndPositions(state, action, products) {\n switch (action.type) {\n case 'POPULATE_PORTFOLIO_STATISTICS_AND_POSITIONS_SUCCESS':\n logger.debug('Reducing: POPULATE_PORTFOLIO_STATISTICS_AND_POSITIONS_SUCCESS');\n\n let statPositionsData = _populateStatPositions(action);\n let caveats = _portfolioStatsCaveatsBuilder(action);\n let labels = _portfolioStatsCaveatsLabels(action);\n\n return Object.assign({}, state, {\n portfolioStatisticsAndPositions: {\n data: statPositionsData,\n label: labels,\n caveats: caveats\n }\n });\n default:\n return state;\n }\n}\n\nfunction _showLabelsIfEmptyV2(json, id) {\n let index = json.indexOf(id);\n\n // if (index !== -1) {\n // Old method the object had a selected attribute which was true or false. This worked with the following.\n // rObj = get(json[index], '-Selected');\n // Now with the change of data, we will assume that if the entry exists, then it is true.\n // MD\n\n // }\n return (index !== -1);\n}\n\n\nfunction _getRawStat(json, id) {\n let index = findIndex( json, {'type': id} );\n let rObj;\n if (index !== -1) {\n rObj = json[index];\n }\n return rObj;\n}\n\nfunction _getStat(json, id, field) {\n const obj = _getRawStat(json, id);\n let rStr = '';\n let wantedVal = get(obj, 'val.'.concat(field));\n if (wantedVal !== undefined) {\n rStr = typeof wantedVal === 'object' ? '' : wantedVal;\n }\n return rStr;\n}\nfunction _getTNPDate(json) {\n const obj = _getRawStat(json, 'TNP');\n let rStr = '';\n let wantedDate = get(obj, 'date.alt');\n if (wantedDate !== undefined) {\n rStr = typeof wantedDate === 'object' ? '' : wantedDate;\n }\n return rStr;\n}\n\nfunction _buildStatisticsV2(data) {\n let workObj = [];\n // Only add selected objects.\n if (typeof data !== 'undefined') {\n for (let item of data) {\n workObj.push(item);\n }\n }\n return workObj;\n}\n\n/**\n * Replaces the log in the template statistics-element\n * @param rawData\n * @param labelData\n * @param stats\n * @returns {Array}\n * @private\n */\n\nfunction _processStatisticsV2(rawData, labelData, stats) {\n const table = {\n 'AVG_COUPON': {\n label: 'average-coupon-rate',\n footnote: 'Average Coupon Rate',\n check: 'alt',\n showExtra: false,\n showPercent: true\n },\n 'AVG_DURATION': {\n label: 'average-duration',\n footnote: 'Average Duration',\n check: 'alt',\n showExtra: false\n },\n 'AVG_MATURITY': {\n label: 'average-weighted-maturity',\n footnote: 'Average Weighted Maturity',\n check: 'val',\n showExtra: false\n },\n 'GROSS_EXPOSURE': {\n label: 'gross-exposure',\n footnote: 'Gross Exposure',\n check: 'alt',\n extra: 'exposure-total-gross',\n showExtra: true,\n showPercent: true\n },\n 'LONG_EXPOSURE': {\n label: 'long-exposure',\n footnote: 'Long Exposure',\n check: 'alt',\n extra: 'exposure-total-long',\n showExtra: true,\n showPercent: true\n },\n 'NET_ASSETS_FUND': {\n label: 'total-fund-assets',\n check: 'alt',\n millions: true,\n showExtra: false\n },\n 'NET_ASSETS_SC': {\n label: 'net-assets',\n footnote: 'Long Exposure',\n check: 'alt',\n millions: true,\n showExtra: false,\n showNetAssets: true\n },\n 'NET_EXPOSURE': {\n label: 'net-exposure',\n footnote: 'Net Exposure',\n check: 'alt',\n extra: 'exposure-total-net',\n showExtra: true,\n showPercent: true\n },\n 'PBRATIO': {\n label: 'PB-ratio',\n footnote: 'P/B ratio',\n check: 'alt',\n showExtra: false\n },\n 'PERATIO': {\n label: 'PE-ratio',\n footnote: 'P/E ratio',\n check: 'alt',\n showExtra: false\n },\n 'SHORT_EXPOSURE': {\n label: 'short-exposure',\n footnote: 'Short Exposure',\n check: 'alt',\n extra: 'exposure-total-short',\n showExtra: true,\n showPercent: true\n },\n 'TURN_OVER_RATE': {\n label: 'portfolio-turnover-rate',\n check: 'alt',\n showExtra: false\n },\n 'DAILY_LIQUID_ASSETS': {\n label: 'daily-liquid-asset',\n footnote: 'Daily Liquid Assets',\n check: 'alt',\n showExtra: false,\n showPercent: true\n },\n 'WEEKLY_LIQUID_ASSETS': {\n label: 'weekly-liquid-asset',\n footnote: 'Weekly Liquid Assets',\n check: 'alt',\n showExtra: false,\n showPercent: true\n }\n\n };\n\n let returnData = [];\n // Build up the table of usable display data.\n for (let item of rawData) {\n let stat = _getRawStat( stats, item);\n let showLabel = _showLabelsIfEmptyV2(labelData, item);\n\n // TODO md\n // This if also should have an OR.. but at the moment the showElement functionality is AWOL\n // or ( $showLabelsIfEmpty/Option[not(@Selected = 'true')]/Value[. = $statTypeAvgCoupon]\n // and frk:showElement($portfolio/stats[type = $statTypeAvgCoupon]/val/@alt)))\"\n\n // logger.info('item:', item);\n // logger.info('stat:', stat);\n if (typeof stat !== 'undefined') {\n if (typeof get(stat, 'val.val') !== 'undefined' && showLabel) {\n let workObj = Object.assign({}, table[item]);\n workObj.val = get(stat, 'val.'.concat(workObj.check));\n workObj.date = get(stat, 'date.alt');\n returnData.push(workObj);\n // logger.info('workObj:', workObj);\n }\n }\n }\n\n return returnData;\n}\n\nfunction _populatePortfolioPositions( srcObj, idList) {\n const labels = {\n 'TNBP': 'bonds',\n 'TNCP': 'convertibles',\n 'TNEP': 'equity',\n 'TNI': 'issuers',\n 'TNP': 'total-positions'\n };\n let returnArray = [];\n for (let id of idList) {\n let workObj = Object.assign({}, _getRawStat(srcObj, id));\n workObj.show = (get(workObj, 'val.val') !== undefined);\n workObj.label = get(labels, id);\n returnArray.push(workObj);\n }\n\n return returnArray;\n}\n\n\nfunction _populateStatPositions(action) {\n // ['us.portfolio', 'us.fund-overview', 'us.fund-config-data', 'us.fund-info', 'usefulstuff-provider']\n const statTypes = {\n fundCategoryAlternative: 'Alternative',\n fundCategoryMoneyFunds: 'Money Funds'\n };\n let [ rawPortfolio, rawFundOverview, , rawFundInfo, , rawConfig ] = action.json;\n\n const portfolio = get(rawPortfolio, 'productsVO.portfolioVO');\n const fundInfo = get(rawFundInfo, 'productsVO.fundinfo');\n const overviewPath = get(rawFundOverview, 'fundOverviewVO');\n let rawStats = get(portfolio, 'stats');\n\n const fundID = get(fundInfo, 'fundNumber.val');\n const fundCat = get(fundInfo, 'fndCategory.val');\n const fundShareClass = get(fundInfo, 'shareClass.val');\n const showLabelsIfEmpty = get(rawConfig, 'showLabelsIfEmpty');\n const displayStatus = get(overviewPath, 'fundInfo.displayStatus.val');\n\n const displayHistoricalDataLink = (fundCat === statTypes.fundCategoryMoneyFunds);\n const displayPositionsNotAvail = !(fundCat === statTypes.fundCategoryAlternative);\n\n const TNBP = _getStat(rawStats, 'TNBP', 'val');\n const TNCP = _getStat(rawStats, 'TNCP', 'val');\n const TNEP = _getStat(rawStats, 'TNEP', 'val');\n const TNI = _getStat(rawStats, 'TNI', 'val');\n const TNP = _getStat(rawStats, 'TNP', 'val');\n\n const tnpDate = _getTNPDate(rawStats);\n\n const rawStatistics1 = _buildStatisticsV2(get(rawConfig, 'statisticsCol1'));\n const rawStatistics2 = _buildStatisticsV2(get(rawConfig, 'statisticsCol2'));\n\n const statistics1 = _processStatisticsV2(rawStatistics1, showLabelsIfEmpty, rawStats);\n const statistics2 = _processStatisticsV2(rawStatistics2, showLabelsIfEmpty, rawStats);\n\n // Portfolio Positions As-Of\n // !(TNBP === '' && TNCP === '' && TNEP === '' && TNI === '' && TNP === '');\n const pfPosAsOf = ![TNBP, TNCP, TNEP, TNI, TNP].reduce((a, b) => { return a && (b === '');}, false);\n\n const showPositions = [TNBP, TNCP, TNEP, TNI, TNP].reduce((a, b) => { return a && (b === '');}, false);\n const positions = _populatePortfolioPositions(rawStats, ['TNBP', 'TNCP', 'TNEP', 'TNI', 'TNP']);\n\n let obj = {\n caveatSecName: 'Portfolio',\n displayStatus: displayStatus,\n fundCat: fundCat,\n fundID: fundID,\n fundShareClass: fundShareClass,\n displayHistoricalDataLink: displayHistoricalDataLink,\n displayPositionsNotAvail: displayPositionsNotAvail,\n pfPosAsOf: pfPosAsOf,\n positions: positions,\n showPositions: showPositions,\n statistics1: statistics1,\n statistics2: statistics2,\n tnpDate: tnpDate,\n visible: true\n };\n return obj;\n}\n\nfunction _portfolioStatsCaveatsBuilder(action) {\n let [rawPortfolio] = action.json;\n return portfolioUtils.getProximity(rawPortfolio);\n}\n\nfunction _portfolioStatsCaveatsLabels(action) {\n let [ , , , , rawLabels ] = action.json;\n return portfolioUtils.getLabels(rawLabels);\n}\n","/**\n * Data Reducer for portfolioStatisticsAndPositions\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\nimport {getProximity, getLabels} from '../../../util/util';\nconst logger = LogManager.getLogger('portfolio-statistics-and-positions');\n\nexport function portfolioStatisticsAndPositions(state, action, products) {\n switch (action.type) {\n case 'POPULATE_PORTFOLIO_STATISTICS_AND_POSITIONS_SUCCESS':\n logger.debug('Reducing: POPULATE_PORTFOLIO_STATISTICS_AND_POSITIONS_SUCCESS');\n\n let statPositionsData = _populateStatPositions(action);\n let caveats = _portfolioStatsCaveatsBuilder(action);\n let labels = _portfolioStatsCaveatsLabels(action);\n\n return Object.assign({}, state, {\n portfolioStatisticsAndPositions: {\n data: statPositionsData,\n label: labels,\n caveats: caveats\n }\n });\n default:\n return state;\n }\n}\n\nfunction _populateStatPositions(action) {\n // ['us.portfolio', 'us.fund-overview', 'us.fund-config-data', 'us.fund-info', 'usefulstuff-provider']\n let [ rawPortfolio, rawFundDetail, , rawUsefulStuff] = action.json;\n const portfolio = get(rawPortfolio, 'globalProductsValue.portfolioIntlValue'); // portfolio.json - globalProductsValue.portfolioIntlValue\n const fundInfo = get(rawFundDetail, 'globalProductsValue.fundDetailIntl'); // funddetail.json - globalProductsValue.fundDetailIntl\n const useful = get(rawUsefulStuff, 'provider.Useful');\n // const overviewPath = get(rawFundOverview, 'fundOverviewVO');\n const stats = get(portfolio, 'stats'); // same\n\n const fundID = get(fundInfo, 'fundId.val'); // fundId.val\n const fundCat = get(fundInfo, 'fundCatgry.val'); // fundCatgry.val\n\n const date30DaysAgo = new Date(get(useful, 'Date30DaysAgo'));\n const fundIncpDt = new Date(get(fundInfo, 'fundIncpDt.val'));\n\n let visible = fundIncpDt.getTime() < date30DaysAgo.getTime();\n\n let priceToEarnWgtAvg = get(stats, 'priceToEarnWgtAvg.val'); // Price to Earnings (12 Month Trailing)\n let priceToBValWgtAvg = get(stats, 'priceToBValWgtAvg.val'); // Price to Book Value\n let priceToCFlowWgtAvg = get(stats, 'priceToCFlowWgtAvg.val'); // Price to Cash Flow val\n\n let maturityWgtAvg = get(stats, 'maturityWgtAvg.val'); // Weighted Average Maturity\n let durationOADWgtAvg = get(stats, 'durationOADWgtAvg.val'); // Average Dura\n let yldToMatrtyWgtAvg = get(stats, 'yldToMatrtyWgtAvg.val'); // Yield to Maturity\n let avgCrdQltyRating = get(stats, 'avgCrdQltyRating.val'); // Average Credit Quality\n // let priceToCFlowWgtAvg = getStat(stats, 'priceToCFlowWgtAvg'); // Blended Yield\n\n let nbrOfIssuers = get(stats, 'nbrOfIssuers.val');\n let nbrOfHoldings = get(stats, 'nbrOfHoldings.val');\n\n let asOfDate = get(stats, 'asOfDate.val');\n\n let statistics = [];\n\n if (visible) {\n let tempObj = {\n avgCrdQltyRating,\n durationOADWgtAvg,\n maturityWgtAvg,\n priceToBValWgtAvg,\n priceToCFlowWgtAvg,\n priceToEarnWgtAvg,\n yldToMatrtyWgtAvg\n };\n\n for (let item in tempObj) {\n if (tempObj.hasOwnProperty(item) && typeof tempObj[item] !== 'undefined' ) {\n statistics.push({label: item, val: tempObj[item]});\n }\n }\n\n visible = (statistics.length > 0);\n }\n\n let showIssuers = (typeof nbrOfIssuers !== 'undefined');\n let showHoldings = (typeof nbrOfHoldings !== 'undefined');\n let showSection = showIssuers || showHoldings;\n let showStatistics = (statistics.length !== 0);\n\n let obj = {\n asOfDate,\n caveatSecName: 'Portfolio',\n dataMode: 'intl',\n fundCat: fundCat,\n fundID: fundID,\n nbrOfHoldings,\n nbrOfIssuers,\n showHoldings,\n showIssuers,\n showSection,\n showStatistics,\n statistics,\n visible\n };\n return obj;\n}\n\nfunction _portfolioStatsCaveatsBuilder(action) {\n let [rawPortfolio] = action.json;\n return getProximity(rawPortfolio);\n}\n\nfunction _portfolioStatsCaveatsLabels(action) {\n let [ , , rawLabels ] = action.json;\n return getLabels(rawLabels);\n}\n","/**\n * Reducer for qualityBreakdown\n * Takes json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\nimport find from 'lodash/find';\nimport sumBy from 'lodash/sumBy';\nimport {portfolioUtils} from '../../../util/util';\nconst logger = LogManager.getLogger('quality-breakdown');\n\nexport function qualityBreakdown(state, action, products) {\n switch (action.type) {\n case 'POPULATE_QUALITY_BREAKDOWN_SUCCESS':\n logger.debug('Reducing: POPULATE_QUALITY_BREAKDOWN_SUCCESS', action);\n\n let [, labels] = action.json;\n\n return Object.assign({}, state, {\n qualityBreakdown: {\n label: _labelsBuilder(labels),\n data: _infoBuilder(action),\n caveats: _caveatsBuilder(action)\n }\n });\n default:\n return state;\n }\n}\n\nfunction findName(labels, key) {\n let label;\n try {\n let o = find(labels, {key: key});\n label = o.value;\n } catch (e) {\n label = key;\n }\n return label;\n}\n\nfunction _labelsBuilder(labelsArray) {\n return portfolioUtils.getLabels(labelsArray);\n}\n\n\nfunction _caveatsBuilder(action) {\n let [bean] = action.json;\n\n let caveats = {\n };\n\n caveats.proximity = get(bean, 'productsVO.caveatvo.proximity');\n\n return caveats;\n}\n\n\nfunction _infoBuilder(action) {\n let [rawPortfolio, labelsArray, rawConfig] = action.json;\n const config = portfolioUtils.getConfig(rawConfig);\n const CRD_QLTY_BDN = portfolioUtils.getHolding(rawPortfolio, 'CRD_QLTY_BDN');\n const BND_QLTY_BDN = portfolioUtils.getHolding(rawPortfolio, 'BND_QLTY_BDN');\n\n const dataset = (typeof CRD_QLTY_BDN === 'undefined' ? BND_QLTY_BDN : CRD_QLTY_BDN);\n const visible = (typeof dataset !== 'undefined');\n\n let obj = {\n caveatSecName: 'Portfolio',\n visible: visible\n };\n\n if (visible) {\n let lstDtls = get(dataset, 'lstDtls');\n\n obj.date = get(dataset, 'date.alt');\n\n obj.investmentGrade = portfolioUtils.getGrades(lstDtls, ['AAA', 'AA', 'A', 'BBB', 'SP-1']);\n obj.belowInvestmentGrade = portfolioUtils.getGrades(lstDtls, ['BB', 'B', 'CCC', 'CC', 'C', 'D']);\n obj.notRated = portfolioUtils.getGrades(lstDtls, ['Not Rated', 'N/A']);\n obj.refunded = portfolioUtils.getGrades(lstDtls, ['RF']);\n\n obj.series = [\n {\n name: findName(labelsArray.provider.labels.label, 'investment-grade'),\n y: obj.investmentGrade.total\n },\n {\n name: findName(labelsArray.provider.labels.label, 'below-investment-grade'),\n y: obj.belowInvestmentGrade.total\n },\n {\n name: findName(labelsArray.provider.labels.label, 'not-rated'),\n y: obj.notRated.total\n },\n {\n name: findName(labelsArray.provider.labels.label, 'refunded'),\n y: obj.refunded.total\n }\n ];\n\n\n obj.total = Math.round(sumBy(obj.series, ( o ) =>{ return (o.y * 1e2); })) / 1e2;\n // New config details\n obj.showChart = config.showChart;\n obj.spanRow = config.spanRow;\n }\n return obj;\n}\n","/**\n * Data Reducer for sectorAllocation\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport get from 'lodash/get';\nimport {portfolioUtils} from '../../../util/util';\n\nimport {LogManager} from 'aurelia-framework';\n\nconst logger = LogManager.getLogger('sector-allocation');\n\nexport function sectorAllocation(state, action) {\n switch (action.type) {\n case 'POPULATE_SECTOR_ALLOCATION_SUCCESS':\n let [portfolio, labelsArray] = action.json;\n\n let labels = portfolioUtils.getLabels(labelsArray);\n let data = _infoBuilder(action);\n let caveats = _caveatsBuilder(portfolio);\n logger.debug('Reducing: POPULATE_SECTOR_ALLOCATION');\n\n return Object.assign({}, state, {\n sectorAllocation: {\n label: labels,\n data: data,\n caveats: caveats\n }\n });\n default:\n return state;\n }\n}\n\nfunction _caveatsBuilder(portfolio) {\n let caveats = {};\n\n caveats.proximity = get(portfolio, 'productsVO.caveatvo.proximity');\n\n return caveats;\n}\n\nfunction _infoBuilder(action) {\n let [rawPortfolio] = action.json;\n const config = action.config;\n const suppressOpts = {\n actor: ['all', action.actor],\n fundId: action.fundId,\n portfolioComponent: action.portfolioComponent,\n assetClass: action.assetClass\n };\n const useSuppression = portfolioUtils.checkSuppression(config, suppressOpts );\n const rawBreakdowns = get(rawPortfolio, 'globalProductsValue.portfolioIntlValue.breakdown.brkdwnDet');\n const breakdown = portfolioUtils.findObjInArray(rawBreakdowns, 'SECTOR_ALLOCATION');\n let visible = (typeof breakdown !== 'undefined');\n if (useSuppression) {\n // if this component is suppressed, then prevent it from continuing any further work.\n visible = false;\n }\n\n let obj = {\n caveatSecName: 'Portfolio', tableID: 'sector-allocation-data', visible: visible\n };\n\n if (visible) {\n let tempBreakdown = portfolioUtils.getEtfSimplifiedBreakdown(breakdown, {'sorted': true});\n\n obj = Object.assign({}, obj, tempBreakdown);\n\n // obj.showChart = config.showChart;\n // obj.spanRow = config.spanRow;\n obj.showChart = true;\n obj.spanRow = true;\n }\n return obj;\n}\n","/**\n * Reducer for sectorBreakdown\n * Takes json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\nimport {portfolioUtils} from '../../../util/util';\nconst logger = LogManager.getLogger('sector-breakdown');\n\nexport function sectorBreakdown(state, action, products) {\n switch (action.type) {\n case 'POPULATE_SECTOR_BREAKDOWN_SUCCESS':\n logger.debug('Reducing: POPULATE_SECTOR_BREAKDOWN_SUCCESS', action);\n\n let [portfolio, labelsArray] = action.json;\n\n let labels = _labelsBuilder(labelsArray);\n let caveats = _caveatsBuilder(portfolio);\n let data = _infoBuilder(action);\n\n return Object.assign({}, state, {\n sectorBreakdown: {\n label: labels,\n data: data,\n caveats: caveats\n }\n });\n default:\n return state;\n }\n}\n\n\n/* extract all labels */\nfunction _labelsBuilder(labelsArray) {\n return portfolioUtils.getLabels(labelsArray);\n}\n\n\nfunction _caveatsBuilder(portfolio) {\n let caveats = {};\n\n caveats.proximity = get(portfolio, 'productsVO.caveatvo.proximity');\n\n return caveats;\n}\n\nfunction _infoBuilder(action) {\n let [rawPortfolio, , rawConfig] = action.json;\n const config = portfolioUtils.getConfig(rawConfig);\n const holdings = portfolioUtils.getHolding(rawPortfolio, 'INDT_BDN');\n const visible = (typeof holdings !== 'undefined');\n\n let obj = {\n visible: visible, caveatSecName: 'Portfolio', tableID: 'sector-breakdown-data'\n };\n\n if (visible) {\n obj = Object.assign({}, obj, portfolioUtils.getSimplifiedBreakdown(holdings));\n }\n // New config details\n obj.showChart = config.showChart;\n obj.spanRow = config.spanRow;\n return obj;\n}\n\n","/**\n * Data Reducer for sectorExposure\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport mapValues from 'lodash/mapValues';\nimport keyBy from 'lodash/keyBy';\nimport get from 'lodash/get';\nimport groupBy from 'lodash/groupBy';\nimport toArray from 'lodash/toArray';\nimport map from 'lodash/map';\nimport {showElement} from '../../../../common/utilities/show-element';\nimport {portfolioUtils} from '../../../util/util';\n/*\nimport {LogManager} from 'aurelia-framework';\nconst logger = LogManager.getLogger('sector-exposure');\n*/\n\nexport function sectorExposure(state, action) {\n let newState;\n switch (action.type) {\n case 'POPULATE_SECTOR_EXPOSURE_SUCCESS':\n let [portfolio, labelsArray, fundConfigData, fundInfo] = action.json;\n let fundID = action.fundId;\n let fundCat = get(fundInfo, 'productsVO.fundinfo.fndCategory.val');\n\n let data;\n\n let show = showElement(fundConfigData, 'SECTOR_EXPOSURE', fundID, fundCat);\n\n if (show) {\n data = _dataBuilder(portfolio);\n } else {\n data = _newDataBuilder(portfolio);\n }\n\n let label = _labelsBuilder(labelsArray);\n let caveats = _caveatsBuilder(portfolio);\n\n return Object.assign({}, state, {\n sectorExposure: {\n label,\n data,\n caveats,\n showElement: show\n }\n });\n case 'EXPAND_ALL_SECTORS_SUCCESS':\n newState = Object.assign({}, state);\n map(get(newState, 'sectorExposure.data.groupedData'), (o) => {\n o.show = true;\n });\n return newState;\n case 'COLLAPSE_ALL_SECTORS_SUCCESS':\n newState = Object.assign({}, state);\n map(get(newState, 'sectorExposure.data.groupedData'), (o) => {\n o.show = false;\n });\n return newState;\n case 'TOGGLE_SECTOR_SUCCESS':\n newState = Object.assign({}, state);\n map(get(newState, 'sectorExposure.data.groupedData'), (o, index) => {\n if (index === action.sector) {\n o.show = !o.show;\n }\n });\n return newState;\n default:\n return state;\n }\n}\n\nfunction _labelsBuilder(labelsArray) {\n return mapValues(keyBy(get(labelsArray, 'provider.labels.label'), 'key'), 'value');\n}\n\n\nfunction _caveatsBuilder(portfolio) {\n let caveats = {};\n caveats.proximity = get(portfolio, 'productsVO.caveatvo.proximity');\n return caveats;\n}\n\n\nfunction _dataBuilder(portfolio) {\n const holding = portfolioUtils.getHolding(portfolio, 'SEC_EXPO');\n const visible = (typeof holding !== 'undefined');\n\n let obj = {\n caveatSecName: 'Portfolio', tableID: 'sector-exposure', visible: visible\n };\n\n if (visible) {\n let lstDtls = get(holding, 'lstDtls');\n\n obj.total = portfolioUtils.getSectorBreakdownTotalizer(lstDtls);\n\n obj.series = map(lstDtls, (o) => {\n return {\n name: o.name,\n y: Number(o.val.alt)\n };\n });\n\n obj.table = map(lstDtls, (o) => {\n return {\n name: o.name,\n value: Number(o.val.alt)\n };\n });\n\n obj.date = get(holding, 'date.alt');\n }\n\n return obj;\n}\n\nfunction _newDataBuilder(portfolio) {\n const holding = portfolioUtils.getHolding(portfolio, 'SEC_EXPO');\n const visible = (typeof holding !== 'undefined');\n\n let obj = {\n caveatSecName: 'Portfolio', tableID: 'sector-exposure', visible: visible\n };\n\n if (visible) {\n let lstDtls = get(holding, 'lstDtls');\n\n let grouped = groupBy(lstDtls, 'name');\n let indexed = toArray(grouped);\n let groupTotals = {\n val: 0,\n val2: 0,\n range: 0\n };\n let mapped = indexed.map((o) => {\n let totals = map(o.filter((i) => { return (i.name2 === 'Totals'); }), (i) => {\n return {\n val: i.val.alt,\n val2: i.val2.alt,\n range: i.range.alt\n };\n });\n map(o.filter((i) => { return (i.name2 === 'Totals'); }), (i) => {\n groupTotals.val += Number(i.val.alt) * 1000;\n groupTotals.val2 += Number(i.val2.alt) * 1000;\n groupTotals.range += Number(i.range.alt) * 1000;\n });\n let items = map(o.filter((i) => { return (i.name2 !== 'Totals'); }), (i) => {\n return {\n name: i.name2,\n val: Number(i.val.alt),\n val2: Number(i.val2.alt),\n range: Number(i.range.alt)\n };\n });\n return {\n name: o[0].name,\n items,\n totals,\n show: false\n };\n });\n\n groupTotals.val = groupTotals.val / 1000;\n groupTotals.val2 = groupTotals.val2 / 1000;\n groupTotals.range = groupTotals.range / 1000;\n\n obj.groupedData = mapped;\n obj.totals = groupTotals;\n obj.date = get(holding, 'date.alt');\n }\n\n return obj;\n}\n","/**\n * Data Reducer for couponRateBreakdown\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\n// import {LogManager} from 'aurelia-framework';\n// const logger = LogManager.getLogger('coupon-rate-breakdown');\nimport mapValues from 'lodash/mapValues';\nimport keyBy from 'lodash/keyBy';\nimport get from 'lodash/get';\n\nexport function strategyBreakdownLabels(state, action) {\n switch (action.type) {\n case 'POPULATE_STRATEGY_BREAKDOWN_SUCCESS':\n\n let [,, labelsArray] = action.json;\n\n let labels = _labelsBuilder(labelsArray);\n\n return Object.assign({}, state, {\n strategyBreakdown: {\n label: labels\n }\n });\n default:\n return state;\n }\n}\n\nfunction _labelsBuilder(labelsArray) {\n return mapValues(keyBy(get(labelsArray, 'provider.labels.label'), 'key'), 'value');\n}\n","/**\n * Data Reducer for strategyBreakdown\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\n // import {LogManager} from 'aurelia-framework';\n import get from 'lodash/get';\n import {portfolioUtils} from '../../../util/util';\n // const logger = LogManager.getLogger('strategy-breakdown');\n\n export function strategyBreakdown(state, action) {\n switch (action.type) {\n case 'POPULATE_STRATEGY_BREAKDOWN_SUCCESS':\n\n let [portfolio] = action.json;\n\n let data = _infoBuilder(action);\n let caveats = _caveatsBuilder(portfolio);\n\n return Object.assign({}, state, {\n strategyBreakdown: {\n data: data,\n caveats: caveats\n }\n });\n default:\n return state;\n }\n }\n\n function _infoBuilder(action) {\n let [portfolio, , , rawConfig] = action.json;\n const config = portfolioUtils.getConfig(rawConfig);\n const holdings = portfolioUtils.getHolding(portfolio, 'STR_BDN');\n const visible = (typeof holdings !== 'undefined');\n\n let obj = {\n visible: visible, caveatSecName: 'Portfolio', tableID: 'strategy-breakdown-data'\n };\n\n // New config details\n obj.showChart = config.showChart;\n obj.spanRow = config.spanRow;\n\n if (visible) {\n obj = Object.assign({}, obj, portfolioUtils.getSimplifiedBreakdown(holdings, true, true));\n }\n\n return obj;\n }\n\n function _caveatsBuilder(portfolio) {\n let caveats = {};\n\n caveats.proximity = get(portfolio, 'productsVO.caveatvo.proximity');\n\n return caveats;\n }\n","/**\n * Data Reducer for couponRateBreakdown\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\n/*\nimport {LogManager} from 'aurelia-framework';\nconst logger = LogManager.getLogger('coupon-rate-breakdown');\n*/\nimport mapValues from 'lodash/mapValues';\nimport keyBy from 'lodash/keyBy';\nimport get from 'lodash/get';\n\nexport function topExposuresLabels(state, action) {\n switch (action.type) {\n case 'POPULATE_TOP_EXPOSURES_SUCCESS':\n\n let [,,, labelsArray] = action.json;\n\n let labels = _labelsBuilder(labelsArray);\n\n let labelsLong = {\n heading: labels['component-heading-long-exposures'],\n subheading: labels['component-subheading-long-exposures'],\n table: labels.table,\n chart: labels.chart,\n 'as-of': labels['as-of']\n };\n\n let labelsShort = {\n heading: labels['component-heading-short-exposures'],\n subheading: labels['component-subheading-short-exposures'],\n table: labels.table,\n chart: labels.chart,\n 'as-of': labels['as-of']\n };\n\n return Object.assign({}, state, {\n topExposures: {\n label: {\n labelsLong,\n labelsShort\n }\n }\n });\n default:\n return state;\n }\n}\n\nfunction _labelsBuilder(labelsArray) {\n return mapValues(keyBy(get(labelsArray, 'provider.labels.label'), 'key'), 'value');\n}\n","/**\n * Data Reducer for topExposures\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport get from 'lodash/get';\nimport sumBy from 'lodash/sumBy';\nimport {showElement} from '../../../../common/utilities/show-element';\n/*\nimport {LogManager} from 'aurelia-framework';\nconst logger = LogManager.getLogger('top-exposures');\n*/\nimport {portfolioUtils} from '../../../util/util';\nexport function topExposures(state, action) {\n switch (action.type) {\n case 'POPULATE_TOP_EXPOSURES_SUCCESS':\n\n let [portfolio, fundInfo, fundConfigData, , rawConfig] = action.json;\n let fundID = action.fundId;\n let fundCat = get(fundInfo, 'productsVO.fundinfo.fndCategory.val');\n\n let dataLong = _infoBuilder(portfolio, 'TOP_LONG_EXPOSURES');\n let dataShort = _infoBuilder(portfolio, 'TOP_SHORT_EXPOSURES');\n let caveats = _caveatsBuilder(portfolio);\n\n let showLong = showElement(fundConfigData, 'TOP_LONG_EXPOSURE', fundID, fundCat);\n let showShort = showElement(fundConfigData, 'TOP_SHORT_EXPOSURE', fundID, fundCat);\n\n let visible = dataLong.visible || dataShort.visible;\n\n const config = portfolioUtils.getConfig(rawConfig);\n\n dataLong = Object.assign({}, dataLong, config);\n dataShort = Object.assign({}, dataShort, config);\n\n return Object.assign({}, state, {\n topExposures: {\n dataLong,\n dataShort,\n caveats,\n showLong,\n showShort,\n visible,\n config\n }\n });\n default:\n return state;\n }\n}\n\nfunction _infoBuilder(rawPortfolio, type) {\n const holdings = portfolioUtils.getHolding(rawPortfolio, type);\n const visible = (typeof holdings !== 'undefined');\n let obj = {\n caveatSecName: 'Portfolio', tableID: 'top-exposures-data', visible: visible\n };\n\n if (visible) {\n let lstDtls = get(holdings, 'lstDtls');\n obj.date = get(holdings, 'date.alt');\n obj.total = sumBy(lstDtls, (o) => { return (o.val.alt * 100); } ) / 100;\n\n obj.series = lstDtls.map((o) => {\n return {\n name: o.name,\n y: Number(o.val.alt)\n };\n });\n\n obj.chart = lstDtls.map((o) => {\n return {\n name: o.name,\n val: o.val.alt\n };\n });\n }\n\n return obj;\n}\n\nfunction _caveatsBuilder(portfolio) {\n let caveats = {};\n caveats.proximity = get(portfolio, 'productsVO.caveatvo.proximity');\n return caveats;\n}\n","/**\n * Data Reducer for topTenHoldings\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\nimport {portfolioUtils} from '../../../util/util';\nconst logger = LogManager.getLogger('top-ten-holdings');\n\nexport function topTenHoldings(state, action) {\n switch (action.type) {\n case 'POPULATE_TOP_TEN_HOLDINGS_SUCCESS':\n logger.debug('Reducing: POPULATE_TOP_TEN_HOLDINGS_SUCCESS');\n\n\n // 'us.portfolio', 'us.top-ten-holdings-labels'\n let [portfolio, labels] = action.json;\n\n return Object.assign({}, state, {\n topTenHoldings: {\n label: _labelsBuilder(labels),\n data: _infoBuilder(action),\n caveats: _caveatsBuilder(portfolio)\n }\n });\n default:\n return state;\n }\n}\n\nfunction _labelsBuilder(labelsArray) {\n return portfolioUtils.getLabels(labelsArray);\n}\n\nfunction _infoBuilder(action) {\n let [portfolio, , rawConfig] = action.json;\n const config = portfolioUtils.getConfig(rawConfig);\n const holding = portfolioUtils.getHolding(portfolio, 'TOP_10_HOLD');\n const visible = (typeof holding !== 'undefined');\n\n let obj = {\n caveatSecName: 'Portfolio', tableID: 'top-ten-holdings-data', visible: visible\n };\n// New config details\n obj.showChart = config.showChart;\n obj.spanRow = config.spanRow;\n\n if (visible) {\n let lstDtls = get(holding, 'lstDtls');\n\n obj.total = portfolioUtils.getSectorBreakdownTotalizer(lstDtls);\n\n obj.series = lstDtls.map((o) => {\n return {\n name: o.name,\n y: Number(o.val.alt)\n };\n });\n\n obj.date = get(holding, 'date.alt');\n obj.chart = lstDtls;\n }\n\n return obj;\n}\n\n\nfunction _caveatsBuilder(bean) {\n let caveats = {\n };\n\n caveats.proximity = get(bean, 'productsVO.caveatvo.proximity');\n // caveats.impLegalInfo = get(bean, 'productsVO.caveatvo.impLegalInfo.text');\n // caveats.displayLegalInfo = (caveats.impLegalInfo.length > 0);\n return caveats;\n}\n","/**\n * Data Reducer for findAFund\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\n\nconst logger = LogManager.getLogger('find-a-fund');\n\nexport function findAFund(state, action) {\n switch (action.type) {\n case 'POPULATE_FIND_A_FUND_STATE_SUCCESS':\n logger.debug('Reducing: POPULATE_FIND_A_FUND_STATE_SUCCESS');\n\n return Object.assign({}, state, {\n findAFund: action.data\n });\n default:\n return state;\n }\n}\n","/**\n * Data Reducer for ppss\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport moment from 'moment';\nimport get from 'lodash/get';\nimport {formatCurrency, getUniqOptions, navDirection} from '../../../../lib/reducer-utils';\n\nconst logger = LogManager.getLogger('ppss');\n\nexport function ppss(state, action) {\n let newState;\n switch (action.type) {\n case 'POPULATE_PPSS_STATE_SUCCESS':\n logger.debug('Reducing: POPULATE_PPSS_STATE_SUCCESS');\n let cvts = {\n impLegalInfo: new Set(),\n proximity: [],\n pageLevel: [],\n elementLevel: new Map(),\n elementLevelCaveats: new Map()\n };\n\n let [ppssData, ppssLabels, fundConfig] = action.json;\n _populate(cvts, ppssData.productsVO.caveatvo);\n\n let minRating = fundConfig.config.global.ratings.minimumMorningstar || 0;\n let distributionsConfig = fundConfig.config.global.distributions;\n let suppressedRatingFunds = fundConfig.config.global.ratings.supressRatings.fundID.map(fund => parseInt(fund.val, 10)) || [];\n let isDataTooOld = moment(ppssData.productsVO.maxSecYieldDate.val)\n .add(distributionsConfig.thirtyDayStandardizedDataTimeframe, 'days')\n .isBefore(moment());\n let maxMorningstarRatingDate = ppssData.productsVO.maxMorningstarRatingDate.alt;\n let funds = ppssData.productsVO.ppsList\n .filter(_removeLiquidated) // this really should be done server-side\n .map(_fixSalesCharges) // this really should be done server-side\n .map(_createFundMapper(minRating, suppressedRatingFunds, distributionsConfig, isDataTooOld));\n\n let labelObj = ppssLabels.labels.label.reduce((obj, label) => Object.defineProperty(obj, label.key, {value: label.value, configurable: true, enumerable: true}), {});\n\n let filterOptions = _createFilterOptions(funds, state.app.ppss.filters);\n\n newState = Object.assign({\n ppss: {\n caveats: cvts,\n label: labelObj,\n funds,\n filterOptions,\n morningstarAsOfDate: maxMorningstarRatingDate,\n fundCategoryAsOfDate: maxMorningstarRatingDate,\n distRateNavAsOfDate: 'As of ' + ppssData.productsVO.distRateNAVDt.alt,\n standardYieldAsOfDate: 'As of ' + ppssData.productsVO.maxSecYieldDate.alt,\n standardYieldAsOfDateMoneyFund: 'As of ' + ppssData.productsVO.distRateNAVDt.alt,\n ytdAsOfDate: ppssData.productsVO.ytdTotRtnNAVDt.alt,\n navAsOfDateMonth: ppssData.productsVO.avgAnlTotRtnDtME.alt,\n navAsOfDateQuarter: ppssData.productsVO.avgAnlTotRtnDtQE.alt\n }\n }, state);\n return newState;\n default:\n return state;\n }\n}\n\nfunction _createFundMapper(minRating, suppressedRatingFunds, distConfig, isDataTooOld) {\n return (fund) => {\n let fundId = parseInt(fund.fundNumber.val, 10);\n let mStarRatingOverall = parseInt(fund.mStarRatingOverall.val, 10);\n let noRating = isNaN(mStarRatingOverall);\n let minRatingTooLow = !noRating && ((mStarRatingOverall < minRating) || suppressedRatingFunds.includes(fundId));\n let showRatingInfo = (!noRating && !minRatingTooLow);\n let isMoneyFund = (fund.prntFundCategory.val === 'Money Funds');\n let isValidYieldData = _isValidYieldData(fund, isMoneyFund, isDataTooOld);\n let isAllowedInConfig = _isAllowedInConfig(fund, distConfig);\n let fundObj = {\n fundId,\n fundLegalName: fund.fundLegalName.val,\n fundShortName: fund.fundShortName.val,\n fundNameOrder: fund.fundLegalName.val + fund.shareClass.val,\n assetClass: fund.assetClass.val,\n shareClass: fund.shareClass.val,\n instrId: fund.instrId.alt,\n symbol: fund.symbol.val,\n region: fund.region.val,\n fundCategory: fund.prntFundCategory.val,\n fundObjective: fund.fundObjective.val,\n isMoneyFund,\n isSoftClosure: (fund.displayStatus.val === 'S'),\n isHardClosure: (fund.displayStatus.val === 'H'),\n isValidYieldData,\n isAllowedInConfig,\n mStarRatingOverall,\n mStarCategory: fund.mStarCategory.val,\n grossExpenseRatio: fund.grossExpenseRatio.alt,\n netExpenseRatio: fund.netExpenseRatio.alt,\n maxIntialSalesCharge: fund.maxIntialSalesCharge.alt,\n cdsc: fund.cdsc.alt,\n noRating,\n minRatingTooLow,\n showRatingInfo,\n nav: (isMoneyFund ? formatCurrency(fund.nav.alt2, 'USD') : formatCurrency(fund.nav.alt, 'USD')),\n navChange: (isMoneyFund ? formatCurrency(fund.navChng.alt2, 'USD') : formatCurrency(fund.navChng.alt, 'USD')),\n navChangeDirection: navDirection(fund.navChng.val),\n inceptionDate: fund.inception_dt.alt,\n ytdTotalReturnAtNav: fund.yTDTotalReturnAtNAV.alt,\n\n avgAnn1YearReturnMonthly: get(fund, 'avgAnn1YearReturn.alt', '-'),\n avgAnn3YearReturnMonthly: get(fund, 'avgAnn3YearReturn.alt', '-'),\n avgAnn5YearReturnMonthly: get(fund, 'avgAnn5YearReturn.alt', '-'),\n avgAnn10YearReturnMonthly: get(fund, 'avgAnn10YearReturn.alt', '-'),\n avgAnnSinceIncReturnMonthly: get(fund, 'avgAnnSinceIncReturn.alt', '-'),\n\n avgAnn1YearReturnQuarterly: get(fund, 'avgAnn1YearReturnQtr.alt', '-'),\n avgAnn3YearReturnQuarterly: get(fund, 'avgAnn3YearReturnQtr.alt', '-'),\n avgAnn5YearReturnQuarterly: get(fund, 'avgAnn5YearReturnQtr.alt', '-'),\n avgAnn10YearReturnQuarterly: get(fund, 'avgAnn10YearReturnQtr.alt', '-'),\n avgAnnSinceIncReturnQuarterly: get(fund, 'avgAnnSinceIncReturnQtr.alt', '-'),\n\n avgAnn1YearReturnMonthlySc: get(fund, 'avgAnn1YearReturnSc.alt', '-'),\n avgAnn3YearReturnMonthlySc: get(fund, 'avgAnn3YearReturnSc.alt', '-'),\n avgAnn5YearReturnMonthlySc: get(fund, 'avgAnn5YearReturnSc.alt', '-'),\n avgAnn10YearReturnMonthlySc: get(fund, 'avgAnn10YearReturnSc.alt', '-'),\n avgAnnSinceIncReturnMonthlySc: get(fund, 'avgAnnSinIncReturnSc.alt', '-'),\n\n avgAnn1YearReturnQuarterlySc: get(fund, 'avgAnn1YearReturnScQtr.alt', '-'),\n avgAnn3YearReturnQuarterlySc: get(fund, 'avgAnn3YearReturnScQtr.alt', '-'),\n avgAnn5YearReturnQuarterlySc: get(fund, 'avgAnn5YearReturnScQtr.alt', '-'),\n avgAnn10YearReturnQuarterlySc: get(fund, 'avgAnn10YearReturnScQtr.alt', '-'),\n avgAnnSinceIncReturnQuarterlySc: get(fund, 'avgAnnSinIncReturnScQtr.alt', '-')\n };\n if (isValidYieldData && isAllowedInConfig) {\n if (!isMoneyFund) {\n fundObj.distRateAtNav = fund.distRateAtNAV.alt;\n fundObj.distRateAtPop = fund.distRateAtPOP.alt;\n fundObj.secYield = fund.secYield.alt;\n if (fund.secYieldWoWvr\n && fund.secYieldWoWvr.alt\n && fund.secYieldDate.alt === fund.secYieldWoWvrDate.alt) { // check if sec yield date is the same for w waiver and w/o waiver\n fundObj.secYieldWoWvr = fund.secYieldWoWvr.alt;\n }\n }\n if (isMoneyFund) {\n fundObj.current7DayYield = fund.curr7DayYield.alt;\n fundObj.effective7DayYield = fund.eff7DayYield.alt;\n if (fund.curr7DayYieldWoWvr\n && fund.curr7DayYieldWoWvr.alt\n && fund.curr7DayYieldDate.alt === fund.curr7DayYieldWoWvrDate.alt) { // check if curr7DayYield date is the same for w waiver and w/o waiver\n fundObj.current7DayYieldWoWvr = fund.curr7DayYieldWoWvr.alt;\n }\n if (fund.eff7DayYieldWoWvr\n && fund.eff7DayYieldWoWvr.alt\n && fund.eff7DayYieldDate.alt === fund.eff7DayYieldWoWvrDate.alt) { // check if eff7DayYield date is the same for w waiver and w/o waiver\n fundObj.effective7DayYieldWoWvr = fund.eff7DayYieldWoWvr.alt;\n }\n }\n }\n if (showRatingInfo) {\n fundObj.mStarRating3Yr = _format(fund.mStarRating3Yr.val);\n fundObj.mStarRating5Yr = _format(fund.mStarRating5Yr.val);\n fundObj.mStarRating10Yr = _format(fund.mStarRating10Yr.val);\n fundObj.rating3YearsUniv = _format(fund.rating3YearsUniv.val);\n fundObj.rating5YearsUniv = _format(fund.rating5YearsUniv.val);\n fundObj.rating10YearsUniv = _format(fund.rating10YearsUniv.val);\n }\n return fundObj;\n };\n}\n\nfunction _removeLiquidated(fund) {\n return ['Y', 'S', 'H'].indexOf(fund.displayStatus.val) >= 0;\n}\n\nfunction _fixSalesCharges(fund) {\n // copied from ppss-br-rules.js\n // NB: this doesn't feel right, as it doesn't check if data exists already\n if (['ADVISOR', 'Z', 'R', 'R6'].indexOf(fund.shareClass.val.toUpperCase()) >= 0\n || fund.prntFundCategory.val === 'Money Funds') {\n fund.avgAnnSinIncReturnSc.alt = fund.avgAnnSinceIncReturn.alt;\n fund.avgAnnSinIncReturnScQtr.alt = fund.avgAnnSinceIncReturnQtr.alt;\n fund.avgAnn1YearReturnSc.alt = fund.avgAnn1YearReturn.alt;\n fund.avgAnn1YearReturnScQtr.alt = fund.avgAnn1YearReturnQtr.alt;\n fund.avgAnn3YearReturnSc.alt = fund.avgAnn3YearReturn.alt;\n fund.avgAnn3YearReturnScQtr.alt = fund.avgAnn3YearReturnQtr.alt;\n fund.avgAnn5YearReturnSc.alt = fund.avgAnn5YearReturn.alt;\n fund.avgAnn5YearReturnScQtr.alt = fund.avgAnn5YearReturnQtr.alt;\n fund.avgAnn10YearReturnSc.alt = fund.avgAnn10YearReturn.alt;\n fund.avgAnn10YearReturnScQtr.alt = fund.avgAnn10YearReturnQtr.alt;\n fund.avgAnnSinIncReturnSc.alt = fund.avgAnnSinceIncReturn.alt;\n fund.avgAnnSinIncReturnScQtr.alt = fund.avgAnnSinceIncReturnQtr.alt;\n if (fund.distRateAtPOP && fund.distRateAtNAV) {\n fund.distRateAtPOP.alt = fund.distRateAtNAV.alt;\n }\n }\n return fund;\n}\n\nfunction _createFilterOptions(funds, filters) {\n logger.debug('_createFilterOptions', filters);\n return {\n ASSET_CLASS: getUniqOptions('assetClass')(funds),\n FUND_CATEGORY: getUniqOptions('fundObjective')(funds),\n REGION: getUniqOptions('region')(funds),\n MORNINGSTAR_RATING: [\n {value: [1, 2, 3, 4, 5], label: '1 +'},\n {value: [2, 3, 4, 5], label: '2 +'},\n {value: [3, 4, 5], label: '3 +'},\n {value: [4, 5], label: '4 +'},\n {value: 5, label: '5'}\n ],\n SHARE_CLASS: [\n {value: ['A', 'A1'], label: 'A & A1'},\n {value: ['C', 'C1'], label: 'C & C1'},\n {value: 'R', label: 'R'},\n {value: 'R6', label: 'R6'},\n {value: ['Advisor', 'Z'], label: 'Advisor/Z'}\n ]\n };\n}\n\nfunction _isValidYieldData(fund, isMoneyFund, isDataTooOld) {\n if (isDataTooOld) return false;\n\n //if no standardized yield, can't display distribution\n if (!isMoneyFund) {\n if (!fund.secYield\n || !fund.secYield.alt\n || fund.secYield.alt === ''\n || fund.secYield.alt === '-') {\n return false;\n }\n }\n if (isMoneyFund) {\n // if no valid w/o waiver and w waiver is 0.00, not valid\n if ((!fund.curr7DayYieldWoWvr\n || !fund.curr7DayYieldWoWvr.alt\n || fund.curr7DayYieldWoWvr.alt === ''\n || fund.curr7DayYieldWoWvr.alt === '-')\n && fund.curr7DayYield.alt === '0.00') {\n return false;\n }\n if ((!fund.eff7DayYieldWoWvr\n || !fund.eff7DayYieldWoWvr.alt\n || fund.eff7DayYieldWoWvr.alt === ''\n || fund.eff7DayYieldWoWvr.alt === '-')\n && fund.eff7DayYield.alt === '0.00') {\n return false;\n }\n }\n return true;\n}\n\nfunction _isAllowedInConfig(fund, distConfig) {\n if (fund.divdSchedule && fund.divdSchedule.val) {\n switch (fund.divdSchedule.val.toUpperCase()) {\n case 'MONTHLY':\n return distConfig.displayMonthlyDiv === 'Y';\n case 'SEMIANNUALLY':\n return distConfig.displaySemiAnnuallyDiv === 'Y';\n case 'SEMI-ANNUAL':\n return distConfig.displaySemiAnnuallyDiv === 'Y';\n case 'ANNUALLY':\n return distConfig.displayAnnuallyDiv === 'Y';\n case 'QUARTERLY':\n return distConfig.displayQuarterlyDiv === 'Y';\n default:\n return false;\n }\n }\n return false;\n}\n\nfunction _format(val) {\n let parsed = parseInt(val, 10);\n if (isNaN(parsed)) return '-';\n return parsed;\n}\n\n//TODO: factor this function out into reusable library function\nfunction _populate(cvts, data) {\n data.impLegalInfo.text.forEach(t => (cvts.impLegalInfo.add(t)));\n cvts.displayLegalInfo = (cvts.impLegalInfo.size > 0);\n cvts.proximity = cvts.proximity.concat(data.proximity);\n cvts.pageLevel = cvts.pageLevel.concat(data.pageLevel.text); // so far, we have only seen this as an empty array\n data.elementLevel.caveat.forEach(cvt => {\n cvts.elementLevel.set(cvt.id, {eleName: cvt.eleName, secName: cvt.secName});\n });\n data.elementLevelCaveats.caveat.forEach(cvt => {\n cvts.elementLevelCaveats.set(cvt.id, cvt.text);\n });\n}\n","/**\n * Data Reducer for ppss\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\nimport {getUniqOptions, formatCurrency, navDirection} from '../../../../lib/reducer-utils';\n\nconst logger = LogManager.getLogger('ppss');\n\nexport function ppss(state, action) {\n let newState;\n switch (action.type) {\n case 'POPULATE_PPSS_STATE_SUCCESS':\n logger.debug('Reducing: POPULATE_PPSS_STATE_SUCCESS');\n let cvts = {\n impLegalInfo: new Set(),\n proximity: [],\n pageLevel: [],\n elementLevel: new Map(),\n elementLevelCaveats: new Map()\n };\n\n let [ppssData] = action.json; //fundConfig\n let funds = ppssData.globalProductsValue.fundExplrVal\n .map(_createFundMapper());\n\n let filterOptions = _createFilterOptions(funds, state.app.ppss.filters);\n\n newState = Object.assign({\n ppss: {\n caveats: cvts,\n funds,\n filterOptions,\n navAsOfDate: get(ppssData, 'globalProductsValue.fundExplrVal[0].navAsOfDt.val', '')\n }\n }, state);\n return newState;\n default:\n return state;\n }\n}\n\nfunction _createFundMapper() {\n return (fund) => {\n let fundId = parseInt(fund.fundId, 10);\n let fundName = get(fund, 'fundName.val', '');\n let currency = get(fund, 'baseCur.val', '-');\n let navChange = get(fund, 'navc.val', '');\n let fundObj = {\n fundId,\n currency,\n fundName,\n // fundLegalName: get(fund, 'fundName.val', ''),\n // fundShortName: get(fund, 'fundName.val', ''),\n fundNameOrder: fundName, // used for sorting\n inceptionDate: get(fund, 'inceptionDtLcl.val', ''),\n assetClass: get(fund, 'assetCls.val', ''),\n nav: formatCurrency(get(fund, 'nav.val', ''), currency),\n navChange: formatCurrency(navChange, currency),\n navChangePercent: get(fund, '', 'x.xx') + '%', // TODO: not sure what default should be\n navChangeDirection: navDirection(navChange),\n domicile: get(fund, 'domicile.val', ''),\n\n isin: get(fund, '', ''),\n incomeUse: get(fund, 'useOfIncom.val', ''),\n ytdTotalReturnAtNav: formatCurrency(get(fund, 'ytdRtnAtNAV.val', ''), currency),\n aum: get(fund, '', ''),\n ter: get(fund, '', ''), //TODO: is this the same as grossExpenseRatio or netExpenseRatio?\n ongoingCharges: get(fund, '', ''),\n factsheetLink: get(fund, '', '')\n };\n return fundObj;\n };\n}\n\nfunction _createFilterOptions(funds, filters) {\n logger.debug('_createFilterOptions', filters);\n return {\n ASSET_CLASS: getUniqOptions('assetClass')(funds),\n CURRENCY: getUniqOptions('currency')(funds)\n };\n}\n","/**\n * Data Reducer for ppss\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\nimport moment from 'moment';\nimport {formatCurrency, formatCusip, getUniqOptions, navDirection} from '../../../../lib/reducer-utils';\n\nconst logger = LogManager.getLogger('ppss');\n\nexport function ppss(state, action) {\n let newState;\n switch (action.type) {\n case 'POPULATE_PPSS_STATE_SUCCESS':\n logger.debug('Reducing: POPULATE_PPSS_STATE_SUCCESS', action);\n let cvts = {\n impLegalInfo: new Set(),\n proximity: [],\n pageLevel: [],\n elementLevel: new Map(),\n elementLevelCaveats: new Map()\n };\n\n let [ppssData, ppssLabels, ppssConfig, ppssComponentConfig] = action.json;\n logger.debug('PPSS GB Data', ppssData, ppssConfig, ppssComponentConfig);\n\n let segment = action.segment;\n let segmentConfig = get(ppssConfig, `provider.config.${segment}.ppss`, {});\n\n let tabsets = ppssConfig.provider.config.all.tabSets.tabSet;\n if (!Array.isArray(tabsets)) {\n tabsets = [tabsets];\n }\n tabsets = tabsets.map(ts => ({\n id: ts.id,\n funds: get(ts, 'funds', '').split(','),\n baseLink: get(ts, 'tabs.tab.0.page', '')\n }));\n\n let softLaunchList = get(ppssConfig, 'provider.config.all.softLaunchList', '').split(',');\n let activeList = get(ppssConfig, 'provider.config.all.activeList', '').split(',');\n let maxMorningstarRatingDate = get(ppssData, '.productsVO.maxMorningstarRatingDate.alt', '');\n\n let funds = ppssData.globalProductsValue.ppsListIntl\n .map(_createFundMapper(activeList, softLaunchList, segmentConfig))\n .filter(_createFundFilter(activeList, softLaunchList, segmentConfig))\n .map(_createFundLinks(tabsets));\n\n let labelObj = ppssLabels.provider.labels.label.reduce((obj, label) => Object.defineProperty(obj, label.key, {value: label.value, configurable: true, enumerable: true}), {});\n\n\n // filters\n let allDropdowns = state.app.ppss.config.allDropdowns;\n let selectedDropdowns = ppssComponentConfig['Filters_Primary'];\n selectedDropdowns = selectedDropdowns.map(id => allDropdowns.find(idObj => id === idObj.name));\n\n let filters = state.app.ppss.filters;\n filters.dropdowns = selectedDropdowns;\n filters.dropdowns.forEach(dd => {\n if (action.params[dd.name]) {\n dd.selected = {value: action.params[dd.name], label: action.params[dd.name]};\n }\n });\n let filterOptions = _createFilterOptions(funds);\n\n // performance view and period end\n let performanceViewOptions = [];\n // if (segmentConfig.showAverageAnnual) performanceViewOptions.push({name: 'AVG_ANNUAL_MONTHLY', labelKey: 'avg-annual'});\n // if (segmentConfig.showCalendarYear) performanceViewOptions.push({name: 'CALENDAR_YEAR_QUARTERLY', labelKey: 'calendar-year'});\n // if (segmentConfig.showCumulative) performanceViewOptions.push({name: 'CUMULATIVE_MONTHLY', labelKey: 'cumulative'});\n // if (segmentConfig.showDiscreteAnnual) performanceViewOptions.push({name: 'DISCRETE_QUARTERLY', labelKey: 'discrete-annual'});\n if (ppssComponentConfig['Annualised_Data_Refresh_Rate'].length) {\n performanceViewOptions.push({\n name: `AVG_ANNUAL_${ppssComponentConfig['Annualised_Data_Refresh_Rate'][0].trim()}`,\n labelKey: 'avg-annual'\n });\n }\n if (ppssComponentConfig['Calendar_Year_Data_Refresh_Rate'].length) {\n performanceViewOptions.push({\n name: `CALENDAR_YEAR_${ppssComponentConfig['Calendar_Year_Data_Refresh_Rate'][0].trim()}`,\n labelKey: 'calendar-year'\n });\n }\n if (ppssComponentConfig['Cumulative_Data_Refresh_Rate'].length) {\n performanceViewOptions.push({\n name: `CUMULATIVE_${ppssComponentConfig['Cumulative_Data_Refresh_Rate'][0].trim()}`,\n labelKey: 'cumulative'\n });\n }\n if (ppssComponentConfig['Discrete_Data_Refresh_Rate'].length) {\n performanceViewOptions.push({\n name: `DISCRETE_${ppssComponentConfig['Discrete_Data_Refresh_Rate'][0].trim()}`,\n labelKey: 'discrete-annual'\n });\n }\n\n // show monthly/quarterly if any performance option has 2 refresh rates\n let showPeriodEnd = ['Annualised_Data_Refresh_Rate', 'Calendar_Year_Data_Refresh_Rate', 'Cumulative_Data_Refresh_Rate', 'Discrete_Data_Refresh_Rate']\n .some(perfView => ppssComponentConfig[perfView].length === 2);\n\n // TODO: need to add options in here\n let performanceView;\n switch (segmentConfig.defaultPerformance) {\n case 'CALENDAR_YEAR':\n performanceView = 'CALENDAR_YEAR_QUARTERLY';\n break;\n default:\n performanceView = 'AVG_ANNUAL_MONTHLY';\n }\n\n // fund identifiers\n let allIdentifiers = state.app.ppss.config.allFundIdentifiers;\n let selectedIdentifiers = ppssComponentConfig['Fund_Identifiers'];\n selectedIdentifiers = selectedIdentifiers.map(id => allIdentifiers.find(idObj => id === idObj.name));\n\n newState = Object.assign({\n ppss: {\n caveats: cvts,\n label: labelObj,\n funds,\n filterOptions,\n morningstarAsOfDate: maxMorningstarRatingDate,\n fundCategoryAsOfDate: maxMorningstarRatingDate,\n distRateNavAsOfDate: 'As of ' + get(ppssData, 'productsVO.distRateNAVDt.alt'),\n standardYieldAsOfDate: 'As of ' + get(ppssData, 'productsVO.maxSecYieldDate.alt'),\n standardYieldAsOfDateMoneyFund: 'As of ' + get(ppssData, 'productsVO.distRateNAVDt.alt'),\n ytdAsOfDate: get(ppssData, 'globalProductsValue.ppsListIntl[0].navAsOfDate.val', ''),\n navAsOfDateMonth: get(ppssData, 'globalProductsValue.ppsListIntl[0].monthlyVal.perfAsOfDt.val', ''),\n navAsOfDateQuarter: get(ppssData, 'globalProductsValue.ppsListIntl[0].qtrlyVal.perfAsOfDt.val', '')\n }\n }, state);\n newState.app.ppss.config.performanceViewOptions = performanceViewOptions;\n newState.app.ppss.config.fundIdentifiers = selectedIdentifiers;\n newState.app.ppss.config.showPeriodEnd = showPeriodEnd;\n newState.app.ppss.display.performanceView = performanceView;\n newState.app.ppss.filters = filters;\n return newState;\n default:\n return state;\n }\n}\n\nfunction _createFundFilter(activeList, softLaunchList, config) {\n let filters = [];\n filters.push(fund => activeList.includes(fund.shareClassKey) || softLaunchList.includes(fund.shareClassKey));\n if (config.currencyList) {\n filters.push(fund => config.currencyList.split(',').includes(fund.currency));\n }\n if (config.shareClassList) {\n logger.debug('shareClassList:::', config.shareClassList.split(','));\n filters.push(fund => config.shareClassList.split(',').includes(fund.shareClassCode));\n }\n return (fund) => {\n return filters.reduce((pass, filter) => pass && filter(fund), true);\n };\n}\n\nfunction _createFundLinks(tabsets) {\n return (fund) => {\n if (!fund.isActive || fund.isSoftLaunch) {\n fund.link = null;\n } else {\n fund.link = tabsets.reduce((link, tabset) => {\n return tabset.id === 'default' || tabset.funds.includes(fund.fundId.toString()) ? tabset.baseLink : link;\n }, null);\n }\n if (fund.link) fund.link += `?FundID=${fund.fundId}&shareClass=${fund.shareClassCode}`;\n return fund;\n };\n}\n\nfunction _createFundMapper(activeList, softLaunchList, segmentConfig) {\n const mdash = '—';\n const sixMonthsAgo = moment().subtract(6, 'months');\n const oneYearAgo = moment().subtract(1, 'years');\n return (fund) => {\n let fundId = parseInt(fund.fundInfo.fundNumber.val, 10);\n let currency = get(fund, 'curCode.val', mdash);\n let nav = get(fund, 'navList.nav.val', mdash);\n let navChange = get(fund, 'navList.dlyNavChange.val', mdash);\n let mStarRatingOverall = parseInt(get(fund, 'msRatingOverAll.val', ''), 10);\n let shareClassCode = get(fund, 'fundInfo.shareClassCode.val', '');\n let shareClassKey = shareClassCode ? `${fundId}-${shareClassCode}` : fundId;\n let shareClassInceptionDate = fund.fundInfo.shareClassInceptionDate.val;\n let showMDash = false;\n if (segmentConfig.showMDashForUnder1Year) {\n showMDash = moment(shareClassInceptionDate).isAfter(oneYearAgo);\n } else if (segmentConfig.showMDashForUnder6Months) {\n showMDash = moment(shareClassInceptionDate).isAfter(sixMonthsAgo);\n }\n let fundObj = {\n fundId,\n currency,\n shareClassCode,\n shareClassKey,\n fundLegalName: fund.fundInfo.legalName.val,\n fundShortName: fund.fundInfo.fundShortName.val,\n fundNameOrder: fund.fundInfo.legalName.val + fund.fundInfo.shareClass.val,\n inceptionDate: fund.fundInfo.inceptionDate.val,\n shareClassInceptionDate,\n assetClass: fund.fundInfo.fndCategory.val,\n shareClass: fund.fundInfo.shareClass.val,\n shareClassFeeStructure: fund.fundInfo.shrclsCodeFeeStruct.val,\n fundObjective: fund.fundInfo.fundClassifcationByRegional.val,\n investmentVehicle: fund.invstmntVechleStd.val,\n isActive: activeList.includes(shareClassKey),\n isSoftLaunch: softLaunchList.includes(shareClassKey),\n isSoftClosure: false, // (fund.displayStatus.val === 'S'),\n isHardClosure: false, // (fund.displayStatus.val === 'H'),\n mStarRatingOverall,\n nav: formatCurrency(nav, currency),\n navChange: formatCurrency(navChange, currency),\n navChangeDirection: navDirection(fund.navList.dlyNavChange.val),\n navAsOfDate: fund.navList.navEffectiveDate.val,\n\n distribution: get(fund, '', ''),\n reportingStatus: get(fund, '', ''),\n\n isin: get(fund, '', ''),\n cusip: formatCusip(get(fund, 'fundInfo.cusip.val', '')),\n reuters: get(fund, '', ''),\n bloomberg: get(fund, '', ''),\n wkn: get(fund, '', ''),\n sedol: get(fund, '', ''),\n vln: get(fund, '', ''),\n mexid: get(fund, '', ''),\n rfi: get(fund, '', ''), // Polish LAM\n apri: get(fund, '', ''), // Australia\n arsn: get(fund, '', ''), // Australia\n fundCode: get(fund, '', ''), // Canada\n frontEnd: get(fund, '', ''), // Canada\n lowLoad: get(fund, '', ''), // Canada\n dsc: get(fund, '', ''), // Canada\n dbCode: get(fund, '', ''), // Brazil\n\n avgAnn1YearReturnMonthly: showMDash ? mdash : get(fund, 'monthlyVal.avgAnnlRtn.ret1Yr.val', mdash),\n avgAnn3YearReturnMonthly: showMDash ? mdash : get(fund, 'monthlyVal.avgAnnlRtn.ret3Yr.val', mdash),\n avgAnn5YearReturnMonthly: showMDash ? mdash : get(fund, 'monthlyVal.avgAnnlRtn.ret5Yr.val', mdash),\n avgAnn10YearReturnMonthly: showMDash ? mdash : get(fund, 'monthlyVal.avgAnnlRtn.ret10Yr.val', mdash),\n avgAnnSinceIncReturnMonthly: showMDash ? mdash : get(fund, 'monthlyVal.avgAnnlRtn.avgAnnualYrRetActInc.val', mdash),\n\n avgAnn1YearReturnQuarterly: showMDash ? mdash : get(fund, 'qtrlyVal.avgAnnlRtn.ret1Yr.val', mdash),\n avgAnn3YearReturnQuarterly: showMDash ? mdash : get(fund, 'qtrlyVal.avgAnnlRtn.ret3Yr.val', mdash),\n avgAnn5YearReturnQuarterly: showMDash ? mdash : get(fund, 'qtrlyVal.avgAnnlRtn.ret5Yr.val', mdash),\n avgAnn10YearReturnQuarterly: showMDash ? mdash : get(fund, 'qtrlyVal.avgAnnlRtn.ret10Yr.val', mdash),\n avgAnnSinceIncReturnQuarterly: showMDash ? mdash : get(fund, 'qtrlyVal.avgAnnlRtn.avgAnnualYrRetActInc.val', mdash),\n\n calendarYear1yrReturnMonthly: showMDash ? mdash : get(fund, 'monthlyVal.calYrRt.ret1Yr.val', mdash),\n calendarYear2yrReturnMonthly: showMDash ? mdash : get(fund, 'monthlyVal.calYrRt.ret2Yr.val', mdash),\n calendarYear3yrReturnMonthly: showMDash ? mdash : get(fund, 'monthlyVal.calYrRt.ret3Yr.val', mdash),\n calendarYear4yrReturnMonthly: showMDash ? mdash : get(fund, 'monthlyVal.calYrRt.ret4Yr.val', mdash),\n calendarYear5yrReturnMonthly: showMDash ? mdash : get(fund, 'monthlyVal.calYrRt.ret5Yr.val', mdash),\n calendarYear6yrReturnMonthly: showMDash ? mdash : get(fund, 'monthlyVal.calYrRt.ret6Yr.val', mdash),\n\n calendarYear1yrReturnQuarterly: showMDash ? mdash : get(fund, 'qtrlyVal.calYrRt.ret1Yr.val', mdash),\n calendarYear2yrReturnQuarterly: showMDash ? mdash : get(fund, 'qtrlyVal.calYrRt.ret2Yr.val', mdash),\n calendarYear3yrReturnQuarterly: showMDash ? mdash : get(fund, 'qtrlyVal.calYrRt.ret3Yr.val', mdash),\n calendarYear4yrReturnQuarterly: showMDash ? mdash : get(fund, 'qtrlyVal.calYrRt.ret4Yr.val', mdash),\n calendarYear5yrReturnQuarterly: showMDash ? mdash : get(fund, 'qtrlyVal.calYrRt.ret5Yr.val', mdash),\n calendarYear6yrReturnQuarterly: showMDash ? mdash : get(fund, 'qtrlyVal.calYrRt.ret6Yr.val', mdash),\n\n cumulativeRetYtdMonthly: showMDash ? mdash : get(fund, 'monthlyVal.cumulativeRet.cumulativeRetYtd.val', mdash),\n cumulativeRet1yrMonthly: showMDash ? mdash : get(fund, 'monthlyVal.cumulativeRet.ret1Yr.val', mdash),\n cumulativeRet3yrMonthly: showMDash ? mdash : get(fund, 'monthlyVal.cumulativeRet.ret3Yr.val', mdash),\n cumulativeRet5yrMonthly: showMDash ? mdash : get(fund, 'monthlyVal.cumulativeRet.ret5Yr.val', mdash),\n cumulativeRet10yrMonthly: showMDash ? mdash : get(fund, 'monthlyVal.cumulativeRet.ret10Yr.val', mdash),\n cumulativeRetIncMonthly: showMDash ? mdash : get(fund, 'monthlyVal.cumulativeRet.cumulativeRetActInc.val', mdash),\n\n cumulativeRetYtdQuarterly: showMDash ? mdash : get(fund, 'qtrlyVal.cumulativeRet.cumulativeRetYtd.val', mdash),\n cumulativeRet1yrQuarterly: showMDash ? mdash : get(fund, 'qtrlyVal.cumulativeRet.ret1Yr.val', mdash),\n cumulativeRet3yrQuarterly: showMDash ? mdash : get(fund, 'qtrlyVal.cumulativeRet.ret3Yr.val', mdash),\n cumulativeRet5yrQuarterly: showMDash ? mdash : get(fund, 'qtrlyVal.cumulativeRet.ret5Yr.val', mdash),\n cumulativeRet10yrQuarterly: showMDash ? mdash : get(fund, 'qtrlyVal.cumulativeRet.ret10Yr.val', mdash),\n cumulativeRetIncQuarterly: showMDash ? mdash : get(fund, 'qtrlyVal.cumulativeRet.cumulativeRetActInc.val', mdash),\n\n discreteAnnual1yrMonthly: showMDash ? mdash : get(fund, 'monthlyVal.discrAnnualRoll.ret1Yr.val', mdash),\n discreteAnnual2yrMonthly: showMDash ? mdash : get(fund, 'monthlyVal.discrAnnualRoll.ret2Yr.val', mdash),\n discreteAnnual3yrMonthly: showMDash ? mdash : get(fund, 'monthlyVal.discrAnnualRoll.ret3Yr.val', mdash),\n discreteAnnual4yrMonthly: showMDash ? mdash : get(fund, 'monthlyVal.discrAnnualRoll.ret4Yr.val', mdash),\n discreteAnnual5yrMonthly: showMDash ? mdash : get(fund, 'monthlyVal.discrAnnualRoll.ret5Yr.val', mdash),\n\n discreteAnnual1yrQuarterly: showMDash ? mdash : get(fund, 'qtrlyVal.discrAnnualRoll.ret1Yr.val', mdash),\n discreteAnnual2yrQuarterly: showMDash ? mdash : get(fund, 'qtrlyVal.discrAnnualRoll.ret2Yr.val', mdash),\n discreteAnnual3yrQuarterly: showMDash ? mdash : get(fund, 'qtrlyVal.discrAnnualRoll.ret3Yr.val', mdash),\n discreteAnnual4yrQuarterly: showMDash ? mdash : get(fund, 'qtrlyVal.discrAnnualRoll.ret4Yr.val', mdash),\n discreteAnnual5yrQuarterly: showMDash ? mdash : get(fund, 'qtrlyVal.discrAnnualRoll.ret5Yr.val', mdash)\n };\n return fundObj;\n };\n}\n\nfunction _createFilterOptions(funds) {\n return {\n ASSET_CLASS: getUniqOptions('assetClass')(funds),\n FUND_CATEGORY: getUniqOptions('fundObjective')(funds),\n MORNINGSTAR_RATING: [{\n value: [3, 4, 5],\n label: '3 +'\n }, {\n value: [4, 5],\n label: '4 +'\n }, {\n value: 5,\n label: '5'\n }],\n CURRENCY: getUniqOptions('currency')(funds),\n SHARE_CLASS: getUniqOptions('shareClassFeeStructure')(funds),\n INVESTMENT_VEHICLE: getUniqOptions('investmentVehicle')(funds)\n };\n}\n","/**\n * Reducer for dailyPricesAndBreakpoints\n * Takes json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\n\nconst logger = LogManager.getLogger('daily-prices-and-breakpoints');\n\nexport function dailyPricesAndBreakpoints(state, action, products) {\n // logger.debug('in dailyPricesAndBreakpoints Reducer with action: ', action.type);\n\n switch (action.type) {\n case 'POPULATE_PRICING_AND_BREAKPOINTS_SUCCESS':\n\n let labels = _priceLabelsBuilder(action);\n let prices = _pricesBuilder(action);\n let caveats = _priceCaveatsBuilder(action);\n let data = _infoBuilder(action);\n\n // logger.debug('action.json', action.json);\n\n return Object.assign({}, state, {\n\n dailyPricesAndBreakpoints: {\n label: labels,\n data: data,\n prices: prices,\n caveats: caveats\n }\n });\n default:\n return state;\n }\n}\n\n/* extract all labels */\nfunction _priceLabelsBuilder(action) {\n let [, priceInformationLabels,, ] = action.json;\n let newLabels = {};\n for (let label of priceInformationLabels.provider.labels.label) {\n newLabels[label.key] = label.value;\n }\n return newLabels;\n}\n\n/* extract required prices */\n\nfunction _pricesBuilder(action) {\n let [,, priceInformation] = action.json;\n\n // parsed values depending on fndCategory;\n let sphv = (priceInformation.fundOverviewVO.fundInfo.fndCategory === 'Money Funds') ? priceInformation.fundOverviewVO.price.sph.alt2 : priceInformation.fundOverviewVO.price.sph.alt;\n let splv = (priceInformation.fundOverviewVO.fundInfo.fndCategory === 'Money Funds') ? priceInformation.fundOverviewVO.price.spl.alt2 : priceInformation.fundOverviewVO.price.spl.alt;\n let nvcv = (priceInformation.fundOverviewVO.fundInfo.fndCategory === 'Money Funds') ? priceInformation.fundOverviewVO.price.nvc.alt2 : priceInformation.fundOverviewVO.price.nvc.alt;\n let popv = (priceInformation.fundOverviewVO.fundInfo.fndCategory === 'Money Funds') ? priceInformation.fundOverviewVO.price.pop.alt2 : priceInformation.fundOverviewVO.price.pop.alt;\n let navv = (priceInformation.fundOverviewVO.fundInfo.fndCategory === 'Money Funds') ? priceInformation.fundOverviewVO.price.nav.alt2 : priceInformation.fundOverviewVO.price.nav.alt;\n\n return {\n nav: priceInformation.fundOverviewVO.price.nav,\n navv,\n pop: priceInformation.fundOverviewVO.price.pop,\n popv,\n nvc: priceInformation.fundOverviewVO.price.nvc,\n nvcv,\n sph: priceInformation.fundOverviewVO.price.sph,\n sphv,\n spl: priceInformation.fundOverviewVO.price.spl,\n splv,\n navdate: priceInformation.fundOverviewVO.price.navdate,\n spldate: priceInformation.fundOverviewVO.price.spldate,\n sphdate: priceInformation.fundOverviewVO.price.sphdate,\n bkptDet: priceInformation.fundOverviewVO.price.bkptDet\n };\n}\n\n/* extract fund info prices */\n\nfunction _infoBuilder(action) {\n let [,, info] = action.json;\n return {\n fundCategory: info.fundOverviewVO.fundInfo.fndCategory,\n fundId: action.fundId\n };\n}\n\n\nfunction _priceCaveatsBuilder(action) {\n let [priceCaveats, , , ] = action.json;\n\n let caveats = {\n impLegalInfo: new Set(),\n proximity: [],\n pageLevel: [],\n elementLevel: new Map(),\n elementLevelCaveats: new Map(),\n visibleElementLevelCaveats: new Map()\n };\n\n caveats.proximity = caveats.proximity.concat(priceCaveats.productsVO.caveatvo.proximity);\n\n priceCaveats.productsVO.caveatvo.elementLevel.caveat.forEach(cvt => {\n caveats.elementLevel.set(cvt.id, {eleName: cvt.eleName, secName: cvt.secName});\n });\n\n priceCaveats.productsVO.caveatvo.elementLevelCaveats.caveat.forEach(cvt => {\n caveats.elementLevelCaveats.set(cvt.id, cvt.text);\n });\n\n logger.debug('action.json', action.json);\n logger.debug('caveats.proximity', caveats.proximity);\n\n priceCaveats.productsVO.caveatvo.impLegalInfo.text.forEach(t => (caveats.impLegalInfo.add(t)));\n caveats.displayLegalInfo = (caveats.impLegalInfo.size > 0);\n\n return caveats;\n}\n","/**\r\n * Reducer for pricingAtNav\r\n * Takes json data and creates model for components\r\n * after applying business and presentation logic and data mapping\r\n */\r\nimport {LogManager} from 'aurelia-framework';\r\n\r\nconst logger = LogManager.getLogger('pricing-at-nav-labels');\r\n\r\nexport function pricingAtNavLabels(state, action, products) {\r\n switch (action.type) {\r\n case 'POPULATE_PRICING_AT_NAV_STATE_SUCCESS':\r\n logger.debug('Reducing: POPULATE_PRICING_AT_NAV_STATE_SUCCESS');\r\n return Object.assign({}, state, _populate(action.json));\r\n default: return state;\r\n }\r\n\r\n function _populate(json) {\r\n let [, labels, , , , , , ] = json;\r\n let labelObj = {};\r\n labels.provider.labels.label.forEach(label => {\r\n labelObj[label.key] = label.value;\r\n });\r\n return {\r\n pricingAtNav: {\r\n label: labelObj\r\n }\r\n };\r\n }\r\n}\r\n","/**\r\n * Reducer for pricingAtNav\r\n * Takes json data and creates model for components\r\n * after applying business and presentation logic and data mapping\r\n */\r\nimport {LogManager} from 'aurelia-framework';\r\nimport moment from 'moment';\r\n\r\nconst logger = LogManager.getLogger('pricing-at-nav-us');\r\n\r\nexport function pricingAtNav(state, action, products) {\r\n switch (action.type) {\r\n case 'POPULATE_PRICING_AT_NAV_STATE_SUCCESS':\r\n logger.debug('Reducing: POPULATE_PRICING_AT_NAV_STATE_SUCCESS');\r\n let [fundPrice, , , chartNinetyDays, chartYtd, chartOneYear, chartFiveYear, chartTenYear] = action.json;\r\n\r\n return Object.assign({}, state, {\r\n pricingAtNav: {\r\n navDate: fundPrice.productsVO.pricingVO.navdate.alt,\r\n label: products.pricingAtNav.label, // reference to general pricingAtNav labels\r\n NINTY_DAYS: _processChartData(chartNinetyDays),\r\n YTD: _processChartData(chartYtd),\r\n ONE_YEAR: _processChartData(chartOneYear),\r\n FIVE_YEAR: _processChartData(chartFiveYear),\r\n TEN_YEAR: _processChartData(chartTenYear)\r\n }\r\n });\r\n default:\r\n return state;\r\n }\r\n}\r\n\r\nfunction _processChartData(data) {\r\n return data.productsVO.priceDetVO[0].navDet.map(detail => [moment(detail.navdt).valueOf(), Number.parseFloat(detail.nav)])\r\n .sort((a, b) => a[0] - b[0]);\r\n}\r\n","/**\n * Data Reducer for pricingDistribution\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\nimport {formatDateToDay, formatCurrency, navDirection} from '../../../../lib/reducer-utils';\nimport {createCompare} from '../../../../../../lib/sort-utils';\n\nconst logger = LogManager.getLogger('pricing-distribution');\n\nexport function pricingDistribution(state, action) {\n switch (action.type) {\n case 'POPULATE_PRICING_DISTRIBUTION_SUCCESS':\n let [pdData, priceHistoryData, distHistoryData, pdLabels] = action.json;\n logger.debug('Reducing: POPULATE_PRICING_DISTRIBUTION_SUCCESS', pdData, priceHistoryData, distHistoryData, pdLabels);\n let fundId = get(pdData, 'globalProductsValue.etfPriceDivValue.fundID.val', '');\n\n // NB: although ETFs only have one class, we return this in an array to be compatible with multi-class Intl funds\n let rawClasses = [pdData.globalProductsValue.etfPriceDivValue];\n // let labels = pdLabels.labels.label.reduce((obj, label) => Object.defineProperty(obj, label.key, {value: label.value, configurable: true, enumerable: true}), {});\n let shareClasses = rawClasses.map(_createParseShareClass(fundId));\n\n // just put navHistory directly on the single share class for now\n let navHist = priceHistoryData.globalProductsValue.etfPriceDivValue.navHist.find(nh => nh.shareClassCurrency.val === nh.baseCurrency.val); // use base currency version\n let currency = navHist.shareClassCurrency.val;\n shareClasses[0].navHistory = _parseNavHistory(navHist.navHistory, currency);\n shareClasses[0].navHistory1M = _parseNavHistory(navHist.navHistory1M, currency);\n shareClasses[0].navHistory3M = _parseNavHistory(navHist.navHistory3M, currency);\n shareClasses[0].navHistory6M = _parseNavHistory(navHist.navHistory6M, currency);\n shareClasses[0].navHistory1Y = _parseNavHistory(navHist.navHistory1Y, currency);\n shareClasses[0].navHistory3Y = _parseNavHistory(navHist.navHistory3Y, currency);\n shareClasses[0].navHistory5Y = _parseNavHistory(navHist.navHistory5Y, currency);\n shareClasses[0].navHistoryDR = _parseNavHistory(navHist.navHistoryDR, currency);\n shareClasses[0].minDate = shareClasses[0].navHistory[0].navDate;\n shareClasses[0].maxDate = shareClasses[0].navHistory[shareClasses[0].navHistory.length - 1].navDate;\n\n let rawHistoricalClasses = get(distHistoryData, 'globalProductsValue.etfPriceDivValue.divHist', []);\n _appendHistoricalData(shareClasses, rawHistoricalClasses);\n\n let primaryShareClass = shareClasses[0]; // default only share class to primary\n\n return Object.assign({}, state, {\n pricingDistribution: {\n dividendAsOfDate: primaryShareClass.dividend.asOfDate,\n // label: labels, //TODO: labels should be in their own general reducer\n primaryShareClass,\n shareClasses\n }\n });\n default:\n return state;\n }\n}\n\nfunction _parseNavHistory(navData, currency) {\n if (!navData || navData.length === 0) {\n return null;\n }\n return navData.map(n => ({\n nav: get(n, 'nav.val', ''),\n navFormatted: formatCurrency(get(n, 'nav.val', ''), currency),\n navChangePercent: get(n, 'dlyNavPcnt.val', ''),\n navDate: get(n, 'navEffectiveDate.val', '')\n }))\n .sort(createCompare('navDate', 'ASC', {isDate: true, dateFormat: 'YYYY-MM-DD'}));\n}\n\nfunction _createParseShareClass(fundId) {\n return sc => {\n let classCode = get(sc, 'shareClassCode.val', '');\n let shareClassKey = classCode ? `${fundId}-${classCode}` : fundId;\n let navChange = get(sc, 'navDetailValue.dlyNavChange.val', '');\n let currency = get(sc, 'shareClassCurrency.val', '');\n return {\n // className: get(sc, 'shClsNm.val', ''),\n shareClassKey,\n primary: true,\n currency,\n nav: formatCurrency(get(sc, 'navDetailValue.nav.val', ''), currency),\n navChange: formatCurrency(navChange, currency),\n navChangeDirection: navDirection(navChange),\n navChangePercent: get(sc, 'navDetailValue.dlyNavPcnt.val', ''),\n asOfDate: get(sc, 'asOfDateForNav.val', ''),\n dividend: _parseDividend(sc.dividend, currency),\n dividendHistory: [],\n highLowNav: get(sc, 'highLowValues', []).map(hl => ({\n year: get(hl, 'navYear.val', ''),\n highNav: formatCurrency(get(hl, 'ytdCurrYrHighNAV.val', ''), currency),\n highNavDate: get(hl, 'ytdCurrYrHighDt.val', ''),\n lowNav: formatCurrency(get(hl, 'ytdCurrYrLowNAV.val', ''), currency),\n lowNavDate: get(hl, 'ytdCurrYrLowDt.val', '')\n }))\n };\n };\n}\n\n/**\n * @param {Object[]} shareClasses\n * @param {Object[]} rawHistoricalClasses\n * @private\n */\nfunction _appendHistoricalData(shareClasses, rawHistoricalClasses) {\n shareClasses.forEach(shareClass => {\n let historicalShareData = rawHistoricalClasses.find(o => {\n let fundId = get(o, 'fundID.val');\n let classCode = get(o, 'shareClassCode.val');\n let currency = get(o, 'shareClassCurrency.val');\n return shareClass.shareClassKey === `${fundId}-${classCode}`\n && shareClass.currency === currency;\n });\n if (historicalShareData) {\n shareClass.dividendHistory = historicalShareData.divHistory.map((o) => {\n return _parseDividend(o, shareClass.currency);\n });\n\n let hashOfYears = {};\n shareClass.dividendHistory.forEach((dividend, index) => {\n let normalisedDate = formatDateToDay(dividend.asOfDate);\n let year = normalisedDate.match(/([0-9]{4})$/);\n if (year) {\n let yearInt = year[1];\n if (!hashOfYears[yearInt]) {\n hashOfYears[yearInt] = [];\n }\n hashOfYears[yearInt].push(dividend);\n }\n });\n\n let descendingOrder = function(a, b) {\n return b - a;\n };\n\n shareClass.dividendHistoryByYear = hashOfYears;\n shareClass.dividendYears = Object.keys(hashOfYears).sort(descendingOrder);\n }\n });\n}\n\n/**\n * @param {Object} dvd\n * @param {string} currency eg USD\n * @returns {Object}\n * @private\n */\nfunction _parseDividend(dvd, currency) {\n if (!dvd) return null;\n return {\n asOfDate: get(dvd, 'asOfDt.val', ''),\n recordDate: get(dvd, 'recordDt.val', ''),\n exDividendDate: get(dvd, 'exDivDt.val', ''),\n distributionDate: get(dvd, 'distDt.val', ''),\n dividendsPerShare: formatCurrency(get(dvd, 'divPerUnit.val', ''), currency)\n };\n}\n","/**\n * Data Reducer for pricingDistribution\n * Takes site specific json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\nimport {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\nimport {formatCurrency, formatDateToDay, navDirection} from '../../../../lib/reducer-utils';\n\nconst logger = LogManager.getLogger('pricing-distribution');\n\nexport function pricingDistribution(state, action) {\n switch (action.type) {\n case 'POPULATE_PRICING_DISTRIBUTION_SUCCESS':\n logger.debug('Reducing: POPULATE_PRICING_DISTRIBUTION_SUCCESS', action);\n let [pdData, pdLabels] = action.json;\n let fundId = pdData.globalProductsValue.prceDistbIntl.fundID;\n let rawClasses = pdData.globalProductsValue.prceDistbIntl.shClsPriceDet;\n let labels = pdLabels.labels.label.reduce((obj, label) => Object.defineProperty(obj, label.key, {value: label.value, configurable: true, enumerable: true}), {});\n let shareClasses = rawClasses.map(_createParseShareClass(fundId)).sort((a, b) => a.className.localeCompare(b.className));\n let primaryShareClass = _getPrimaryClass(fundId, rawClasses);\n\n return Object.assign({}, state, {\n pricingDistribution: {\n dividendAsOfDate: _getAsOfDate(rawClasses),\n label: labels, //TODO: labels should be in their own general reducer\n primaryShareClass,\n shareClasses\n }\n });\n default:\n return state;\n }\n}\n\nfunction _getAsOfDate(classes) {\n let dividendClasses = classes.filter(sc => sc.navDet.dividend);\n if (dividendClasses.length) {\n return get(dividendClasses[0], 'navDet.asOfDate.val');\n }\n return '';\n}\n\nfunction _createParseShareClass(fundId) {\n return sc => {\n let classCode = get(sc, 'shClsCD.val', '');\n let shareClassKey = classCode ? `${fundId}-${classCode}` : fundId;\n let navChange = get(sc, 'navDet.dlyNavChange.val', '');\n let currency = get(sc, 'shClsCur.val', '');\n return {\n className: get(sc, 'shClsNm.val', ''),\n shareClassKey,\n primary: get(sc, 'prmryShCls.val', '').toUpperCase() === 'YES',\n currency: currency,\n nav: get(sc, 'navDet.nav.val', ''),\n navChange,\n navChangeDirection: navDirection(navChange),\n asOfDate: get(sc, 'navDet.asOfDate.val', ''),\n dividend: _parseDividend(sc.navDet.dividend, currency),\n dividendHistory: [], // TODO: no data service available, implement when available\n dividendHistoryByYear: {}, // TODO: no data service available, implement when available\n dividendYears: [], // TODO: no data service available, implement when available\n highLowNav: get(sc, 'highLowNav', []).map(hl => ({\n year: get(hl, 'year.val', ''),\n highNav: get(hl, 'highNav.val', ''),\n lowNav: get(hl, 'lowNav.val', '')\n }))\n };\n };\n}\n\n/**\n * @param {Object} dvd\n * @param {string} currency eg USD\n * @returns {Object}\n * @private\n */\nfunction _parseDividend(dvd, currency) {\n if (!dvd) return null;\n return {\n asOfDate: formatDateToDay(get(dvd, 'asOfDt.val', '')),\n recordDate: formatDateToDay(get(dvd, 'recordDt.val', '')),\n exDividendDate: formatDateToDay(get(dvd, 'exDivDt.val', '')),\n distributionDate: get(dvd, '', ''), // TODO: need data!\n dividendsPerShare: formatCurrency(get(dvd, 'divPerUnit.val', ''), currency)\n };\n}\n\nfunction _getPrimaryClass(fundId, classes) {\n let primary = classes.find(cls => get(cls, 'prmryShCls.val', '').toUpperCase() === 'YES');\n return primary ? _createParseShareClass(fundId)(primary) : null;\n}\n"," /**\n * Reducer for additionalTaxInformation\n * Takes json data and creates model for components\n * after applying business and presentation logic and data mapping\n */\n//import {LogManager} from 'aurelia-framework';\nimport get from 'lodash/get';\n//import chunk from 'lodash/chunk';\n\n//const logger = LogManager.getLogger('additional-tax-information');\n\nexport function additionalTaxInformation(state, action, products) {\n switch (action.type) {\n case 'POPULATE_ADDITIONAL_TAX_INFO_SUCCESS':\n\n let additionalTaxData = _additionalTaxInformationData(action, products);\n\n return Object.assign({}, state, {\n additionalTaxInformation: {\n data: additionalTaxData,\n label: products.taxInformation.label\n }\n });\n default:\n return state;\n }\n}\n\nfunction _additionalTaxInformationData(action, products) {\n // tax: ['us.tax', 'us.fund-tax-info', 'us.tax-caveats', 'us.tax-information-labels', 'us.fund-config-data', 'usefulstuff-provider']\n let [tax, , , , configData, usefulstuffProvider] = action.json;\n\n let taxPath = get(tax, 'productsVO.taxVO');\n let taxYearDatum = taxPath.taxYear;\n let currentMonth = get(usefulstuffProvider, 'provider.Useful.taxYear.currentMonth');\n let displayYearEndMessage = get(configData, 'provider.config.global.taxInfoPage.displayYearEndMessage');\n let currentDisplayYear = get(usefulstuffProvider, 'provider.Useful.taxYear.year[0]');\n let totalInDist = ((taxPath.totalFundInJurisdiction) && (taxPath.totalFundInJurisdiction.hasOwnProperty('alt'))) ? taxPath.totalFundInJurisdiction.alt : '';\n let yearEndMessage = _displayYearEndMessage(currentMonth, taxYearDatum, currentDisplayYear, displayYearEndMessage);\n let taxDetails = _taxDetailsBuilder(action);\n let labels = get(products, 'taxInformation.label');\n let DGOB = _valueOrMessage(get(taxDetails, 'DGOB'), yearEndMessage, labels, 'not-applicable-message');\n let AMNT = _valueOrMessage(taxDetails.AMNT, yearEndMessage, labels, 'not-applicable-message');\n let DRDE = _valueOrMessage(taxDetails.DRDE, yearEndMessage, labels, 'not-applicable-message');\n let FTCI = _ftciProcessor(taxPath.foreignTax, labels, 'not-applicable-message');\n let jurdNodes = _jurdNodeBuilder(action);\n\n return {\n yearEndMessage,\n taxYearDatum,\n currentMonth,\n totalInDist,\n jurdNodes,\n DGOB,\n AMNT,\n DRDE,\n FTCI\n };\n}\n\nfunction _ftciProcessor(node, labels, naMessage) {\n if (node) {\n return '<a href=\"' + node + '\">PDF</a>';\n }\n return labels[naMessage];\n}\n\nfunction _valueOrMessage(node, qualifier, labels, naMessage) {\n if (node && (qualifier === false)) {\n return node + '%';\n }\n return labels[naMessage];\n}\n\nfunction _displayYearEndMessage(currentMonth, taxYearDatum, currentDisplayYear, displayYearEndMessage) {\n if (((currentMonth < 2) && (taxYearDatum === currentDisplayYear) && (displayYearEndMessage === 'Y')) || ((displayYearEndMessage === 'Y' && (taxYearDatum === currentDisplayYear)))) {\n return true;\n }\n return false;\n}\n\nfunction _taxDetailsBuilder(action) {\n let [ tax, , , , , ] = action.json;\n let newTaxDetails = {};\n let taxDet = get(tax, 'productsVO.taxVO.taxDet');\n if (!taxDet) {\n return true;\n }\n for (let taxDetail of tax.productsVO.taxVO.taxDet) {\n newTaxDetails[taxDetail.type.val] = taxDetail.value.alt;\n }\n return newTaxDetails;\n}\n\nfunction _chunk(big, chunkSize) {\n let chunked = [];\n for (let i = 0; i < big.length; i += chunkSize) {\n chunked.push(big.slice(i, i + chunkSize));\n }\n return chunked;\n}\n\nfunction _jurdNodeBuilder(action) {\n let [ tax, , , , , ] = action.json;\n let jurdNodes = tax.productsVO.taxVO.fundJurdVO;\n\n if (!jurdNodes) {\n return false;\n }\n\n let totalJurdNodes = jurdNodes.length;\n let numberOfColumns;\n\n if (totalJurdNodes > 20) {\n numberOfColumns = 3;\n } else if (totalJurdNodes > 10) {\n numberOfColumns = 2;\n } else {\n numberOfColumns = 1;\n }\n\n let numberInColumns = Math.ceil(totalJurdNodes / numberOfColumns);\n\n let newJurdNodes = [];\n let jurdNodeColNumber = 0;\n let jurdNodeIndex = 0;\n\n for (let jurdNode of jurdNodes) {\n let newJurdNode = {};\n newJurdNode.name = jurdNode.name.val;\n newJurdNode.value = jurdNode.value.alt;\n newJurdNodes.push(newJurdNode);\n jurdNodeIndex++;\n if (jurdNodeIndex % numberInColumns === 0) {\n jurdNodeColNumber++;\n }\n }\n\n let chunked = _chunk(newJurdNodes, numberInColumns);\n\n return chunked;\n}\n\n","/**\n * App State Reducer for ftMultiSelectBar\n * Takes application state data and creates model for components\n * rmclaughlin 25/05/17\n */\n\nimport get from 'lodash/get';\n//import {LogManager} from 'aurelia-framework';\n//const logger = LogManager.getLogger('ft-multi-select-bar');\n\nexport function ftMultiSelectBar(state, action) {\n switch (action.type) {\n case 'LOAD_LABELS_SUCCESS':\n let [data] = action.json;\n let beanData = get(data, 'labels');\n\n let onOffToggle = get(beanData, 'on-off-toggle');\n let selectedPdfLabels = get(beanData, 'selected-pdf-labels');\n let editLabel = get(beanData, 'edit-label');\n let emailSelectedLabel = get(beanData, 'email-selected-label');\n let downloadLink = get(beanData, 'download-link');\n let onState = get(beanData, 'on-state');\n let offState = get(beanData, 'off-state');\n\n return Object.assign({}, state, {\n ftMultiSelectBar: {\n onOffToggle: onOffToggle,\n selectedPdfLabels: selectedPdfLabels,\n editLabel: editLabel,\n emailSelectedLabel: emailSelectedLabel,\n onState: onState,\n offState: offState,\n downloadLink: downloadLink\n }\n });\n default:\n return state;\n }\n}\n\n","/**\n * App State Reducer for ftTypeAheadSearch\n * Takes application state data and creates model for components\n * rmclaughlin 25/05/17\n */\n\nimport get from 'lodash/get';\n//import {LogManager} from 'aurelia-framework';\n//const logger = LogManager.getLogger('ft-type-ahead-search');\n\nexport function ftTypeAheadSearch(state, action) {\n switch (action.type) {\n case 'LOAD_LABELS_SUCCESS':\n let [data] = action.json;\n let beanData = get(data, 'labels');\n\n let classLabel = get(beanData, 'class-label');\n let emptyResults = get(beanData, 'empty-results');\n let searchInput = get(beanData, 'search-input');\n\n return Object.assign({}, state, {\n ftTypeAheadSearch: {\n classLabel: classLabel,\n searchInput: searchInput,\n emptyResults: emptyResults\n }\n });\n default:\n return state;\n }\n}\n\n"],"sourceRoot":"../.."} |