ft-webplatform/assets/js/web-platform-etf.js
Martin Donnelly 76920442b1 init
2017-09-28 13:04:16 +01:00

5155 lines
244 KiB
JavaScript

define('configuration/etf-gb/main',['exports', '../common/configure', '../etf/beans', '../etf/components', '../etf/reducers', '../etf/state', '../../components/products/overview/ft-fund-information/lib/etf-gb/fund-information.reducer', '../../components/products/overview/ft-fund-information/lib/etf/fund-information.reducer'], function (exports, _configure, _beans, _components, _reducers, _state, _fundInformation, _fundInformation2) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.configure = configure;
function configure(aurelia) {
var state = (0, _state.getState)();
_reducers.reducers.products.specific.splice(1, _reducers.reducers.products.specific.indexOf(_fundInformation2.fundInformation), _fundInformation.fundInformation);
(0, _configure.commonConfigure)(aurelia, {
reducers: _reducers.reducers,
state: state,
beans: _beans.beans,
components: _components.components,
dataServiceConf: 'etf'
});
}
});
define('configuration/etf/beans',['exports'], function (exports) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var beans = exports.beans = {
component: {
caveats: ['gw.caveats'],
caveatsFund: ['gw.caveats', 'etf.fund-details'],
configuration: ['gw.fund-config'],
findAFund: ['etf.ppss', 'gw.fund-config', 'gw.fund-alert'],
fundAlert: ['gw.fund-alert'],
fundDetails: ['etf.fund-details'],
labels: ['etf.fund-labels'],
labelsMarketing: ['gw.marketing-component-labels', 'gw.json-content-type-labels'],
ppss: ['etf.ppss', 'gw.fund-config', 'gw.fund-alert'],
tax: ['etf.price-tax'],
portfolioCharting: ['etf.portfolio', 'etf.fund-details', 'gw.fund-config'],
portfolioStatisticsAndPositions: ['etf.portfolio', 'etf.fund-details', 'gw.fund-config'],
portfolioGeographicAllocation: ['etf.portfolio', 'etf.fund-details', 'gw.fund-config'],
portfolioHoldings: ['etf.portfolio', 'etf.fund-details', 'gw.fund-config'],
performance: ['etf.performance', 'etf.performance-history', 'gw.fund-config', 'etf.fund-details'],
performanceSimply: ['etf.performance', 'gw.fund-config', 'etf.fund-details'],
pricingDistribution: ['etf.price', 'etf.price-history', 'etf.distribution-history', 'etf.fund-details', 'gw.fund-config'],
backtestedPerformance: ['etf.performance', 'etf.fund-details', 'gw.fund-config'],
backtestedPerformanceHistory: ['etf.performance-history'],
fundInformation: ['etf.overview', 'etf.fund-details', 'etf.price', 'gw.fund-config'],
tradingInformation: ['etf.fund-details'],
fundStaticBar: ['etf.overview', 'etf.fund-details', 'gw.fund-config']
},
bean: {
'etf.distribution-history': {
parameters: new Map([['fundId', 'FundID']])
},
'etf.fund-details': {
parameters: new Map([['fundId', 'FundID']])
},
'etf.fund-labels': {
parameters: new Map([['debug', 'debug']])
},
'etf.overview': {
parameters: new Map([['fundId', 'FundID']])
},
'etf.performance': {
parameters: new Map([['fundId', 'FundID']])
},
'etf.performance-history': {
parameters: new Map([['fundId', 'FundID']])
},
'etf.portfolio': {
parameters: new Map([['fundId', 'FundID']])
},
'etf.price': {
parameters: new Map([['fundId', 'FundID']])
},
'etf.price-history': {
parameters: new Map([['fundId', 'FundID']])
}
}
};
});
define('configuration/etf/components',['exports'], function (exports) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var components = exports.components = ['components/products/overview/ft-fund-information/etf/ft-fund-information', 'components/products/overview/ft-fund-static-bar/ft-fund-static-bar', 'components/products/overview/ft-trading-information/etf/ft-trading-information', 'components/products/performance/ft-backtested-performance-annualised/etf/ft-backtested-performance-annualised', 'components/products/performance/ft-backtested-performance-calendar/etf/ft-backtested-performance-calendar', 'components/products/performance/ft-backtested-performance-cumulative/etf/ft-backtested-performance-cumulative', 'components/products/performance/ft-calendar-year-returns/ft-calendar-year-returns', 'components/products/performance/ft-discrete-returns/ft-discrete-returns', 'components/products/performance/ft-performance-annualised/ft-performance-annualised', 'components/products/performance/ft-performance-cumulative/ft-performance-cumulative', 'components/products/performance/ft-performance-risk-statistics/ft-performance-risk-statistics', 'components/products/portfolio/ft-geographic-allocation/etf/ft-geographic-allocation', 'components/products/portfolio/ft-holdings/etf/ft-holdings', 'components/products/portfolio/ft-market-capitalisation/ft-market-capitalisation', 'components/products/portfolio/ft-portfolio-no-data-message/ft-portfolio-no-data-message', 'components/products/portfolio/ft-portfolio-statistics-and-positions/etf/ft-portfolio-statistics-and-positions', 'components/products/portfolio/ft-sector-allocation/etf/ft-sector-allocation', 'components/products/ppss/ft-find-a-fund/ft-find-a-fund', 'components/products/ppss/ft-find-a-fund-btn/ft-find-a-fund-btn', 'components/products/ppss/ft-ppss-etf/ft-ppss-etf', 'components/products/ppss/ft-ppss-favorite/ft-ppss-favorite', 'components/products/ppss/ft-ppss-fund-filter/ft-ppss-fund-filter', 'components/products/ppss/ft-ppss-fund-name/ft-ppss-fund-name', 'components/products/ppss/ft-ppss-search-box/ft-ppss-search-box', 'components/products/ppss/ft-ppss-tab-header/ft-ppss-tab-header', 'components/products/ppss/ft-ppss-table-toolbar/ft-ppss-table-toolbar', 'components/products/ppss/ft-ppss/ft-ppss', 'components/products/pricing-distribution/ft-dividends-historical/ft-dividends-historical', 'components/products/pricing-distribution/ft-dividends/ft-dividends', 'components/products/pricing-distribution/ft-nav-high-low/ft-nav-high-low', 'components/products/pricing-distribution/ft-price-chart/ft-price-chart', 'components/products/pricing-distribution/ft-price-historical/ft-price-historical', 'components/products/pricing-distribution/ft-pricing-distribution/ft-pricing-distribution', 'components/products/pricing-distribution/ft-share-prices/ft-share-prices', 'components/products/tax/ft-german-tax/etf/ft-german-tax'];
});
define('configuration/etf/main',['exports', '../common/configure', './beans', './components', './reducers', './state'], function (exports, _configure, _beans, _components, _reducers, _state) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.configure = configure;
function configure(aurelia) {
var state = (0, _state.getState)();
(0, _configure.commonConfigure)(aurelia, {
reducers: _reducers.reducers,
state: state,
beans: _beans.beans,
components: _components.components,
dataServiceConf: 'etf'
});
}
});
define('configuration/etf/reducers',['exports', '../../components/products/lib/combine-products-reducers', '../common/marketing-reducers', '../../lib/general.reducer', '../../components/products/lib/reducers/labels/label-loader.reducer', '../../components/products/lib/reducers/fund-details/fund-details.reducer', '../../components/products/lib/reducers/fund-config/config-loader.reducer', '../../components/common/elements/ft-modal/lib/ft-modal.reducer', '../../components/products/common/elements/ft-caveats/lib/caveats.reducer', '../../components/products/lib/reducers/caveats/caveats.reducer', '../../components/products/ppss/ft-ppss/lib/ppss.reducer', '../../components/products/ppss/ft-find-a-fund/lib/find-a-fund.reducer', '../../components/products/performance/ft-performance-cumulative/lib/performance-cumulative.reducer', '../../components/products/performance/ft-performance-annualised/lib/performance-annualised.reducer', '../../components/products/overview/ft-fund-information/lib/etf/fund-information.reducer', '../../components/products/overview/ft-trading-information/etf/lib/etf/trading-information.reducer', '../../components/products/overview/ft-trading-information/etf/lib/ft-trading-information.reducer', '../../components/products/overview/ft-fund-static-bar/lib/gw-etf/fund-static-bar.reducer', '../../components/products/common/elements/ft-fund-alert/lib/gw/fund-alert.reducer', '../../components/products/ppss/ft-ppss/lib/etf/ppss.reducer', '../../components/products/pricing-distribution/ft-pricing-distribution/lib/pricing-distribution.reducer', '../../components/products/pricing-distribution/ft-pricing-distribution/lib/etf/pricing-distribution.reducer', '../../components/products/performance/ft-performance-cumulative/lib/etf/performance-cumulative.reducer', '../../components/products/performance/ft-performance-annualised/lib/etf/performance-annualised.reducer', '../../components/products/performance/ft-calendar-year-returns/lib/calendar-year-returns.reducer', '../../components/products/performance/ft-calendar-year-returns/lib/etf/calendar-year-returns.reducer', '../../components/products/performance/ft-discrete-returns/lib/discrete-returns.reducer', '../../components/products/performance/ft-discrete-returns/lib/etf/discrete-returns.reducer', '../../components/products/performance/ft-backtested-performance-annualised/lib/etf/backtested-performance-annualised.reducer', '../../components/products/performance/ft-backtested-performance-calendar/lib/etf/backtested-performance-calendar.reducer', '../../components/products/performance/ft-backtested-performance-cumulative/lib/etf/backtested-performance-cumulative.reducer', '../../components/products/tax/ft-german-tax/lib/etf/german-tax.reducer', '../../components/products/performance/ft-performance-risk-statistics/lib/gw/performance-risk-statistics.reducer', '../../components/products/portfolio/lib/etf/portfolio-chart.reducer', '../../components/products/portfolio/ft-portfolio-statistics-and-positions/lib/etf/portfolio-statistics-and-positions.reducer', '../../components/products/portfolio/ft-holdings/etf/lib/etf/holdings.reducer', '../../components/products/portfolio/ft-holdings/etf/lib/holdings.reducer', '../../components/products/portfolio/ft-geographic-allocation/etf/lib/etf/geographic-allocation.reducer', '../../components/products/portfolio/ft-portfolio-no-data-message/lib/portfolio-no-data-message.reducer'], function (exports, _combineProductsReducers, _marketingReducers, _general, _labelLoader, _fundDetails, _configLoader, _ftModal, _caveats, _caveats2, _ppss, _findAFund, _performanceCumulative, _performanceAnnualised, _fundInformation, _tradingInformation, _ftTradingInformation, _fundStaticBar, _fundAlert, _ppss2, _pricingDistribution, _pricingDistribution2, _performanceCumulative2, _performanceAnnualised2, _calendarYearReturns, _calendarYearReturns2, _discreteReturns, _discreteReturns2, _backtestedPerformanceAnnualised, _backtestedPerformanceCalendar, _backtestedPerformanceCumulative, _germanTax, _performanceRiskStatistics, _portfolioChart, _portfolioStatisticsAndPositions, _holdings, _holdings2, _geographicAllocation, _portfolioNoDataMessage) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.reducers = undefined;
var reducers = exports.reducers = {
products: (0, _combineProductsReducers.combineProductsReducers)({
general: [_fundDetails.fundDetailsReducer, _labelLoader.labelLoader, _configLoader.configurationLoader, _caveats2.caveatsReducer, _caveats.caveatsReducer, _ftModal.modalReducer, _fundAlert.fundAlert, _ppss.ppss, _ppss2.ppss, _findAFund.findAFund, _pricingDistribution.pricingDistribution, _performanceCumulative.performanceCumulative, _performanceAnnualised.performanceAnnualised, _calendarYearReturns.calendarYearReturns, _discreteReturns.discreteReturns, _holdings2.holdings, _germanTax.germanTax, _geographicAllocation.geographicAllocationReducer, _portfolioChart.portfolioChartReducer],
specific: [_portfolioStatisticsAndPositions.portfolioStatisticsAndPositions, _performanceCumulative2.performanceCumulative, _performanceAnnualised2.performanceAnnualised, _calendarYearReturns2.calendarYearReturns, _discreteReturns2.discreteReturns, _backtestedPerformanceAnnualised.backtestedPerformanceAnnualised, _backtestedPerformanceCalendar.backtestedPerformanceCalendar, _backtestedPerformanceCumulative.backtestedPerformanceCumulative, _portfolioNoDataMessage.portfolioNoDataMessageReducer, _holdings.holdings, _fundInformation.fundInformation, _tradingInformation.tradingInformation, _ftTradingInformation.ftTradingInformation, _pricingDistribution2.pricingDistribution, _performanceRiskStatistics.performanceRiskStatistics, _fundStaticBar.fundStaticBar]
}),
marketing: _marketingReducers.marketingReducers,
general: _general.general
};
});
define('configuration/etf/state',['exports', '../common/configure'], function (exports, _configure) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getState = getState;
function getState() {
var state = (0, _configure.getInitialState)();
state.products.app.ppss.config.showPerformanceTab = false;
state.products.app.ppss.config.showEtfTab = true;
state.products.app.ppss.config.showTer = false;
state.products.app.ppss.config.showOngoingCharges = true;
state.products.app.ppss.config.performanceViewOptions = [];
state.products.app.ppss.currentTable = 'ETF';
state.products.app.ppss.findAFund.searchProperties = [{ name: 'FUND_NAME_FULL', dataKey: 'fundNameFull' }, { name: 'ASSET_CLASS', dataKey: 'assetClass' }, { name: 'CURRENCY', dataKey: 'currency' }, { name: 'DOMICILE', dataKey: 'domicile' }, { name: 'INCOME_USE', dataKey: 'incomeUse' }, { name: 'ISIN', dataKey: 'isin' }];
return state;
}
});
define('components/products/overview/ft-fund-information/etf/ft-fund-information',['exports', 'aurelia-framework', '../../../../../lib/redux-component-base', '../../../lib/map-state-utils', 'lodash/get'], function (exports, _aureliaFramework, _reduxComponentBase, _mapStateUtils, _get) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.FtFundInformation = undefined;
var _get2 = _interopRequireDefault(_get);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function _initDefineProp(target, property, descriptor, context) {
if (!descriptor) return;
Object.defineProperty(target, property, {
enumerable: descriptor.enumerable,
configurable: descriptor.configurable,
writable: descriptor.writable,
value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
});
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _possibleConstructorReturn(self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return call && (typeof call === "object" || typeof call === "function") ? call : self;
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: false,
writable: true,
configurable: true
}
});
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
}
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
var desc = {};
Object['ke' + 'ys'](descriptor).forEach(function (key) {
desc[key] = descriptor[key];
});
desc.enumerable = !!desc.enumerable;
desc.configurable = !!desc.configurable;
if ('value' in desc || desc.initializer) {
desc.writable = true;
}
desc = decorators.slice().reverse().reduce(function (desc, decorator) {
return decorator(target, property, desc) || desc;
}, desc);
if (context && desc.initializer !== void 0) {
desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
desc.initializer = undefined;
}
if (desc.initializer === void 0) {
Object['define' + 'Property'](target, property, desc);
desc = null;
}
return desc;
}
function _initializerWarningHelper(descriptor, context) {
throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
}
var _dec, _class, _desc, _value, _class2, _descriptor;
var FtFundInformation = exports.FtFundInformation = (_dec = (0, _aureliaFramework.inject)('Store', 'Beans', Element), _dec(_class = (_class2 = function (_ReduxComponentBase) {
_inherits(FtFundInformation, _ReduxComponentBase);
function FtFundInformation(store, beans, element) {
_classCallCheck(this, FtFundInformation);
var _this = _possibleConstructorReturn(this, _ReduxComponentBase.call(this, store));
_this.isPopulated = false;
_initDefineProp(_this, 'currentShareClass', _descriptor, _this);
_this.store = store;
_this.fundId = _this.fundId = element.getAttribute('fund-id');
_this.beans = beans.component.fundInformation;
var currentState = _this.store.getState();
_this.currentShareClass = (0, _get2.default)(currentState, 'products.app.currentShareClass', false);
_this.segment = (0, _get2.default)(currentState, 'general.segment');
_this.currentShareClassChanged();
return _this;
}
FtFundInformation.prototype.currentShareClassChanged = function currentShareClassChanged() {
this.dispatch({
type: 'POPULATE_FUND_INFORMATION',
beans: this.beans,
fundId: this.fundId,
segment: this.segment,
shareClassKey: this.currentShareClass
});
};
FtFundInformation.prototype.mapState = function mapState(newState) {
try {
var fundState = (0, _mapStateUtils.getFundState)(newState, this.fundId);
this.currentShareClass = (0, _get2.default)(newState, 'products.app.currentShareClass', false);
this.label = (0, _get2.default)(newState, 'products.label');
if (!fundState || !fundState.fundInformation || !this.label) {
this.isPopulated = false;
return;
}
var vo = fundState.fundInformation;
this.fundInformation = vo.fundInformation;
this.salesCharges = vo.salesCharges;
this.identifiers = vo.identifiers;
this.distributions = vo.distributions;
this.tradingCharacteristics = vo.tradingCharacteristics;
var halfWayPoint = Math.ceil(vo.fundInformation.data.length / 2);
this.fundInformationPart1 = vo.fundInformation.data.slice(0, halfWayPoint);
this.fundInformationPart2 = vo.fundInformation.data.slice(halfWayPoint, vo.fundInformation.data.length);
this.isPopulated = true;
} catch (e) {
this.logger.error(e);
this.isPopulated = false;
}
};
return FtFundInformation;
}(_reduxComponentBase.ReduxComponentBase), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'currentShareClass', [_aureliaFramework.observable], {
enumerable: true,
initializer: null
})), _class2)) || _class);
});
define('components/products/overview/ft-trading-information/etf/ft-trading-information',['exports', 'aurelia-framework', '../../../../../lib/redux-component-base', '../../../lib/map-state-utils', 'lodash/get'], function (exports, _aureliaFramework, _reduxComponentBase, _mapStateUtils, _get) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.FtTradingInformation = undefined;
var _get2 = _interopRequireDefault(_get);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function _initDefineProp(target, property, descriptor, context) {
if (!descriptor) return;
Object.defineProperty(target, property, {
enumerable: descriptor.enumerable,
configurable: descriptor.configurable,
writable: descriptor.writable,
value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
});
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _possibleConstructorReturn(self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return call && (typeof call === "object" || typeof call === "function") ? call : self;
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: false,
writable: true,
configurable: true
}
});
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
}
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
var desc = {};
Object['ke' + 'ys'](descriptor).forEach(function (key) {
desc[key] = descriptor[key];
});
desc.enumerable = !!desc.enumerable;
desc.configurable = !!desc.configurable;
if ('value' in desc || desc.initializer) {
desc.writable = true;
}
desc = decorators.slice().reverse().reduce(function (desc, decorator) {
return decorator(target, property, desc) || desc;
}, desc);
if (context && desc.initializer !== void 0) {
desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
desc.initializer = undefined;
}
if (desc.initializer === void 0) {
Object['define' + 'Property'](target, property, desc);
desc = null;
}
return desc;
}
function _initializerWarningHelper(descriptor, context) {
throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
}
var _dec, _class, _desc, _value, _class2, _descriptor;
var FtTradingInformation = exports.FtTradingInformation = (_dec = (0, _aureliaFramework.inject)('Store', 'Beans', Element), _dec(_class = (_class2 = function (_ReduxComponentBase) {
_inherits(FtTradingInformation, _ReduxComponentBase);
FtTradingInformation.prototype.selectedExchangeChanged = function selectedExchangeChanged() {
this.dispatch({
type: 'TRADING_INFORMATION_EXCHANGE_CHANGE',
fundId: this.fundId,
cid: this.cid,
data: this.selectedExchange
});
};
FtTradingInformation.prototype.changeSort = function changeSort(filterName) {
this.dispatch({
type: 'TRADING_INFORMATION_SORT_CHANGE',
fundId: this.fundId,
cid: this.cid,
data: filterName
});
};
function FtTradingInformation(store, beans, element) {
_classCallCheck(this, FtTradingInformation);
var _this = _possibleConstructorReturn(this, _ReduxComponentBase.call(this, store));
_this.isPopulated = false;
_this.hasData = false;
_this.filteredExchanges = [];
_this.exchangeNames = {};
_this.sortFilters = {};
_initDefineProp(_this, 'selectedExchange', _descriptor, _this);
_this.fundId = element.getAttribute('fund-id');
_this.cid = element.getAttribute('cid');
_this.dispatch({
type: 'POPULATE_TRADING_INFORMATION',
beans: beans.component.tradingInformation,
fundId: _this.fundId,
cid: _this.cid,
data: element.getAttribute('default-exchange') || ''
});
return _this;
}
FtTradingInformation.prototype.mapState = function mapState(newState) {
var fundState = (0, _mapStateUtils.getFundState)(newState, this.fundId);
var filteredExchanges = (0, _get2.default)(fundState, 'tradingInformation.filteredExchanges', false);
var totalExchanges = (0, _get2.default)(fundState, 'tradingInformation.exchanges', false);
this.label = (0, _get2.default)(newState, 'products.label');
if (filteredExchanges && this.label) {
this.filteredExchanges = filteredExchanges;
this.exchangeNames = (0, _get2.default)(fundState, 'tradingInformation.exchangeNames', []);
this.selectedExchange = (0, _get2.default)(fundState, 'tradingInformation.selectedExchange', '');
this.sortFilters = (0, _get2.default)(fundState, 'tradingInformation.sortFilters', {});
this.isPopulated = true;
this.hasData = totalExchanges.length !== 0;
} else {
this.filteredExchanges = [];
this.exchangeNames = {};
this.selectedExchange = '';
this.sortFilters = {};
this.isPopulated = false;
this.hasData = false;
}
};
return FtTradingInformation;
}(_reduxComponentBase.ReduxComponentBase), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'selectedExchange', [_aureliaFramework.bindable], {
enumerable: true,
initializer: function initializer() {
return '';
}
})), _class2)) || _class);
});
define('components/products/performance/ft-backtested-performance-annualised/etf/ft-backtested-performance-annualised',['exports', 'aurelia-framework', '../../../../../lib/redux-component-base', '../../../lib/map-state-utils', 'lodash/get'], function (exports, _aureliaFramework, _reduxComponentBase, _mapStateUtils, _get) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.FtBacktestedPerformanceAnnualised = undefined;
var _get2 = _interopRequireDefault(_get);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _possibleConstructorReturn(self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return call && (typeof call === "object" || typeof call === "function") ? call : self;
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: false,
writable: true,
configurable: true
}
});
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
}
var _dec, _class;
var FtBacktestedPerformanceAnnualised = exports.FtBacktestedPerformanceAnnualised = (_dec = (0, _aureliaFramework.inject)('Store', 'Beans', Element), _dec(_class = function (_ReduxComponentBase) {
_inherits(FtBacktestedPerformanceAnnualised, _ReduxComponentBase);
function FtBacktestedPerformanceAnnualised(store, beans, element) {
_classCallCheck(this, FtBacktestedPerformanceAnnualised);
var _this = _possibleConstructorReturn(this, _ReduxComponentBase.call(this, store));
_this.isPopulated = false;
_this.chartData = [];
_this.chartOptions = {};
_this.fundId = element.getAttribute('fund-id');
_this.performanceBeans = beans.component.backtestedPerformance;
_this.backtestedPerformanceHistory = beans.component.backtestedPerformanceHistory;
_this.populateData(store);
return _this;
}
FtBacktestedPerformanceAnnualised.prototype.populateData = function populateData(store) {
var currentState = store.getState();
var segment = (0, _get2.default)(currentState, 'general.segment');
this.dispatch({
type: 'POPULATE_BACKTESTED_PERFORMANCE_ANNUALISED',
beans: this.performanceBeans,
fundId: this.fundId,
segment: segment
});
};
FtBacktestedPerformanceAnnualised.prototype.checkFundState = function checkFundState(fundState) {
var fundStateCond = true;
if (!this.label || !fundState || !fundState.backtestedPerformanceAnnualised || !this.checkFundStatePC(fundState)) {
fundStateCond = false;
}
return fundStateCond;
};
FtBacktestedPerformanceAnnualised.prototype.checkFundStatePC = function checkFundStatePC(fundState) {
var fundStateCondPF = true;
if ((!fundState.backtestedPerformanceAnnualised.performances || !fundState.backtestedPerformanceAnnualised.performances.tableData) && !fundState.backtestedPerformanceAnnualised.error) {
fundStateCondPF = false;
}
return fundStateCondPF;
};
FtBacktestedPerformanceAnnualised.prototype.mapState = function mapState(newState) {
try {
var fundState = void 0;
this.logger.info('mapState()');
fundState = (0, _mapStateUtils.getFundState)(newState, this.fundId);
this.label = (0, _get2.default)(newState, 'products.label');
if (!this.checkFundState(fundState)) {
this.isPopulated = false;
return;
}
if (fundState.backtestedPerformanceAnnualised.error) {
this.isPopulated = true;
this.hasErrored = true;
return;
}
this.tableHeaders = fundState.backtestedPerformanceAnnualised.tableHeaders;
this.performances = fundState.backtestedPerformanceAnnualised.performances.tableData;
if (fundState.backtestedPerformanceAnnualised.error || fundState.backtestedPerformanceAnnualised.performances.tableData.rows.length === 0) {
this.isPopulated = true;
this.bm1DataTriggered = true;
this.bm2DataTriggered = true;
this.hasErrored = true;
return;
}
this.asOfDate = fundState.backtestedPerformanceAnnualised.performances.tableData.rows[0].asOfDate;
this.chartCategories = [this.label.get('1-yr'), this.label.get('3-yr'), this.label.get('5-yr'), this.label.get('10-yr'), this.label.get('15-yr')];
this.chartItems = fundState.backtestedPerformanceAnnualised.performances.graphData;
var chartItems = this.chartItems;
var chartType = 'column';
var aryChartData = [];
for (var _iterator = Object.keys(chartItems), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var key = _ref;
var thisChartItem = {
data: chartItems[key],
type: chartType
};
aryChartData.push(thisChartItem);
}
this.chartData = aryChartData;
this.isPopulated = true;
} catch (e) {
this.logger.error(e);
this.isPopulated = false;
}
};
return FtBacktestedPerformanceAnnualised;
}(_reduxComponentBase.ReduxComponentBase)) || _class);
});
define('components/products/performance/ft-backtested-performance-calendar/etf/ft-backtested-performance-calendar',['exports', 'aurelia-framework', '../../../../../lib/redux-component-base', '../../../lib/map-state-utils', 'lodash/get'], function (exports, _aureliaFramework, _reduxComponentBase, _mapStateUtils, _get) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.FtBacktestedPerformanceCalendar = undefined;
var _get2 = _interopRequireDefault(_get);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _possibleConstructorReturn(self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return call && (typeof call === "object" || typeof call === "function") ? call : self;
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: false,
writable: true,
configurable: true
}
});
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
}
var _dec, _class;
var FtBacktestedPerformanceCalendar = exports.FtBacktestedPerformanceCalendar = (_dec = (0, _aureliaFramework.inject)('Store', 'Beans', Element), _dec(_class = function (_ReduxComponentBase) {
_inherits(FtBacktestedPerformanceCalendar, _ReduxComponentBase);
function FtBacktestedPerformanceCalendar(store, beans, element) {
_classCallCheck(this, FtBacktestedPerformanceCalendar);
var _this = _possibleConstructorReturn(this, _ReduxComponentBase.call(this, store));
_this.isPopulated = false;
_this.chartData = [];
_this.chartOptions = {};
_this.fundId = element.getAttribute('fund-id');
_this.performanceBeans = beans.component.backtestedPerformance;
_this.backtestedPerformanceHistory = beans.component.backtestedPerformanceHistory;
_this.populateData(store);
return _this;
}
FtBacktestedPerformanceCalendar.prototype.populateData = function populateData(store) {
var currentState = store.getState();
var segment = (0, _get2.default)(currentState, 'general.segment');
this.dispatch({
type: 'POPULATE_BACKTESTED_PERFORMANCE_CALENDAR',
beans: this.performanceBeans,
fundId: this.fundId,
segment: segment
});
};
FtBacktestedPerformanceCalendar.prototype.mapState = function mapState(newState) {
try {
this.logger.info('mapState()');
this.label = (0, _get2.default)(newState, 'products.label');
var fundState = (0, _mapStateUtils.getFundState)(newState, this.fundId);
if (!this.label || !fundState || !fundState.backtestedPerformanceCalendar || !fundState.backtestedPerformanceCalendar.benchMrkList && !fundState.backtestedPerformanceCalendar.error) {
this.isPopulated = false;
return;
}
if (fundState.backtestedPerformanceCalendar.error) {
this.isPopulated = true;
this.bm1DataTriggered = true;
this.hasErrored = true;
return;
}
this.tableHeaders = fundState.backtestedPerformanceCalendar.tableHeaders;
this.performances = fundState.backtestedPerformanceCalendar.performances.tableData;
this.asOfDate = fundState.backtestedPerformanceCalendar.performances.tableData.rows[0].asOfDate;
this.chartCategories = this.tableHeaders;
this.chartItems = fundState.backtestedPerformanceCalendar.performances.graphData;
var chartItems = this.chartItems;
var chartType = 'column';
var aryChartData = [];
for (var _iterator = Object.keys(chartItems), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var key = _ref;
var thisChartItem = {
data: chartItems[key],
type: chartType
};
aryChartData.push(thisChartItem);
}
this.chartData = aryChartData;
this.isPopulated = true;
} catch (e) {
this.logger.error(e);
this.isPopulated = false;
}
};
return FtBacktestedPerformanceCalendar;
}(_reduxComponentBase.ReduxComponentBase)) || _class);
});
define('components/products/performance/ft-backtested-performance-cumulative/etf/ft-backtested-performance-cumulative',['exports', 'aurelia-framework', '../../../../../lib/redux-component-base', '../../../lib/map-state-utils', '../../../../../configuration/il8n/currency', 'lodash/get'], function (exports, _aureliaFramework, _reduxComponentBase, _mapStateUtils, _currency, _get) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.FtBacktestedPerformanceCumulative = undefined;
var _get2 = _interopRequireDefault(_get);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _possibleConstructorReturn(self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return call && (typeof call === "object" || typeof call === "function") ? call : self;
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: false,
writable: true,
configurable: true
}
});
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
}
var _dec, _class;
var FtBacktestedPerformanceCumulative = exports.FtBacktestedPerformanceCumulative = (_dec = (0, _aureliaFramework.inject)('Store', 'Beans', Element), _dec(_class = function (_ReduxComponentBase) {
_inherits(FtBacktestedPerformanceCumulative, _ReduxComponentBase);
function FtBacktestedPerformanceCumulative(store, beans, element) {
_classCallCheck(this, FtBacktestedPerformanceCumulative);
var _this = _possibleConstructorReturn(this, _ReduxComponentBase.call(this, store));
_this.isPopulated = false;
_this.hasErrored = false;
_this.chartData = [];
_this.chartOptions = {};
_this.fundId = element.getAttribute('fund-id');
_this.performanceBeans = beans.component.backtestedPerformance;
_this.backtestedPerformanceHistory = beans.component.backtestedPerformanceHistory;
_this.populateData(store);
return _this;
}
FtBacktestedPerformanceCumulative.prototype.populateData = function populateData(store) {
var currentState = store.getState();
var segment = (0, _get2.default)(currentState, 'general.segment');
this.dispatch({
type: 'POPULATE_BACKTESTED_PERFORMANCE_CUMULATIVE',
beans: this.performanceBeans,
fundId: this.fundId,
segment: segment
});
};
FtBacktestedPerformanceCumulative.prototype.populateBM = function populateBM(fundState, bmrkId) {
var bmNr = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
var bm1State = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
var bm1Data = null;
if (bm1State) bm1Data = bm1State.backtestedPerformanceCumulative.bm1Data;
this.dispatch({
type: 'POPULATE_BACKTESTED_PERFORMANCE_BM' + bmNr + '_CUMULATIVE',
beans: this.backtestedPerformanceHistory,
fundId: bmrkId,
fundData: fundState.backtestedPerformanceCumulative,
bm1Data: bm1Data
});
};
FtBacktestedPerformanceCumulative.prototype.checkFundState = function checkFundState(fundState) {
var fundStateCond = true;
if (!this.label || !fundState || !fundState.backtestedPerformanceCumulative || !this.checkFundStatePC(fundState)) {
fundStateCond = false;
}
return fundStateCond;
};
FtBacktestedPerformanceCumulative.prototype.checkFundStatePC = function checkFundStatePC(fundState) {
var fundStateCondPF = true;
if ((!fundState.backtestedPerformanceCumulative.performances || !fundState.backtestedPerformanceCumulative.baseFundDetails || !fundState.backtestedPerformanceCumulative.performances.tableData) && !fundState.backtestedPerformanceCumulative.error) {
fundStateCondPF = false;
}
return fundStateCondPF;
};
FtBacktestedPerformanceCumulative.prototype.checkBmState = function checkBmState(bmState) {
var bmStateCond = true;
if (!bmState || (!bmState.backtestedPerformanceCumulative || !bmState.backtestedPerformanceCumulative.bmDataRead) && !bmState.backtestedPerformanceCumulative.error) {
bmStateCond = false;
}
return bmStateCond;
};
FtBacktestedPerformanceCumulative.prototype.mapState = function mapState(newState) {
try {
var fundState = (0, _mapStateUtils.getFundState)(newState, this.fundId);
this.label = (0, _get2.default)(newState, 'products.label');
if (!this.checkFundState(fundState)) {
this.isPopulated = false;
return;
}
if (fundState.backtestedPerformanceCumulative.error) {
this.isPopulated = true;
this.hasErrored = true;
return;
}
this.bmrkId = fundState.backtestedPerformanceCumulative.benchMrkList[0].bmrkId.val;
if (!this.bm1DataTriggered) {
this.bm1DataTriggered = true;
this.populateBM(fundState, this.bmrkId);
}
var bm1State = (0, _mapStateUtils.getFundState)(newState, this.bmrkId);
if (!this.checkBmState(bm1State)) {
this.isPopulated = false;
return;
}
if (bm1State.backtestedPerformanceCumulative.error) {
this.isPopulated = true;
this.bm2DataTriggered = true;
this.hasErrored = true;
return;
}
this.bmrk2Id = fundState.backtestedPerformanceCumulative.benchMrkList[1].bmrkId.val;
if (!this.bm2DataTriggered) {
this.bm2DataTriggered = true;
this.populateBM(fundState, this.bmrk2Id, 2, bm1State);
}
var bm2State = (0, _mapStateUtils.getFundState)(newState, this.bmrk2Id);
if (!this.checkBmState(bm2State)) {
this.isPopulated = false;
return;
}
this.performances = bm2State.backtestedPerformanceCumulative.performances.tableData;
this.asOfDate = bm2State.backtestedPerformanceCumulative.performances.tableData.rows[0].asOfDate;
this.fundCurrency = bm2State.backtestedPerformanceCumulative.baseFundDetails.fundBaseCur.val;
this.dates = bm2State.backtestedPerformanceCumulative.dates;
this.chartData = bm2State.backtestedPerformanceCumulative.graphData;
this.graphNames = bm2State.backtestedPerformanceCumulative.graphNames;
var currencySymbol = _currency.symbols.get(this.fundCurrency.toUpperCase());
if (typeof currencySymbol === 'undefined') currencySymbol = '';
this.valPrefix = currencySymbol;
this.isPopulated = true;
} catch (e) {
this.logger.error(e);
this.isPopulated = false;
}
};
return FtBacktestedPerformanceCumulative;
}(_reduxComponentBase.ReduxComponentBase)) || _class);
});
define('components/products/performance/ft-calendar-year-returns/etf/ft-calendar-year-returns',['exports', 'aurelia-framework', '../../../../../lib/redux-component-base', '../../../lib/map-state-utils', 'lodash/get'], function (exports, _aureliaFramework, _reduxComponentBase, _mapStateUtils, _get) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.FtCalendarYearReturns = undefined;
var _get2 = _interopRequireDefault(_get);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _possibleConstructorReturn(self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return call && (typeof call === "object" || typeof call === "function") ? call : self;
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: false,
writable: true,
configurable: true
}
});
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
}
var _dec, _class;
var FtCalendarYearReturns = exports.FtCalendarYearReturns = (_dec = (0, _aureliaFramework.inject)('Store', 'Beans', Element), _dec(_class = function (_ReduxComponentBase) {
_inherits(FtCalendarYearReturns, _ReduxComponentBase);
function FtCalendarYearReturns(store, beans, element) {
_classCallCheck(this, FtCalendarYearReturns);
var _this = _possibleConstructorReturn(this, _ReduxComponentBase.call(this, store));
_this.isPopulated = false;
_this.currentTab = null;
_this.tabs = [{
key: 'MONTH_END',
labelKey: 'month-end',
ariaControl: 'calendar-year-return-monthly-pane',
isActive: false
}, {
key: 'QUARTER_END',
labelKey: 'quarter-end',
ariaControl: 'calendar-year-total-return-quarterly-pane',
isActive: false
}];
_this.fundId = element.getAttribute('fund-id');
_this.calendarYearBeans = beans.component.performanceSimply;
_this.taxYear = element.getAttribute('tax-year');
_this.dispatch({
type: 'POPULATE_CALENDAR_YEAR_RETURNS',
beans: _this.calendarYearBeans,
fundId: _this.fundId,
taxYear: _this.taxYear
});
_this.dispatch({
type: 'CALENDAR_YEAR_RETURNS_CHANGE_TAB',
tab: 'MONTH_END'
});
return _this;
}
FtCalendarYearReturns.prototype.changeTab = function changeTab(key) {
this.dispatch({
type: 'CALENDAR_YEAR_RETURNS_CHANGE_TAB',
tab: key
});
};
FtCalendarYearReturns.prototype.mapState = function mapState(newState) {
var _this2 = this;
try {
this.logger.debug('mapState() - FtCalendarYearReturns');
var fundState = (0, _mapStateUtils.getFundState)(newState, this.fundId);
this.currentTab = (0, _get2.default)(newState, 'products.app.performance.calendarYearReturns.currentTab');
this.label = (0, _get2.default)(newState, 'products.label');
if (!this.currentTab || !this.label || !fundState || !fundState.calendarYearReturns) {
this.isPopulated = false;
return;
}
this.data = fundState.calendarYearReturns.data;
this.tableData = fundState.calendarYearReturns[this.currentTab].calData;
this.dateGroup = fundState.calendarYearReturns[this.currentTab].dateGroup;
this.tableData.years.sort(function (a, b) {
return b - a;
});
this.chartCategories = this.tableData.years;
var chartData = fundState.calendarYearReturns[this.currentTab].chartData;
var chartItems = chartData;
var chartType = 'column';
var aryChartData = [];
for (var _iterator = Object.keys(chartItems), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var key = _ref;
var thisChartItem = {
data: chartItems[key],
type: chartType
};
aryChartData.push(thisChartItem);
}
this.chartData = aryChartData;
this.tabs = this.tabs.map(function (tab) {
tab.value = _this2.label[tab.labelKey];
tab.isActive = tab.key === _this2.currentTab;
return tab;
});
this.isPopulated = true;
} catch (e) {
this.logger.error(e);
this.isPopulated = false;
}
};
return FtCalendarYearReturns;
}(_reduxComponentBase.ReduxComponentBase)) || _class);
});
define('components/products/performance/ft-performance-annualised/etf/ft-performance-annualised',['exports', 'aurelia-framework', '../../../../../lib/redux-component-base', '../../../lib/map-state-utils', 'lodash/get'], function (exports, _aureliaFramework, _reduxComponentBase, _mapStateUtils, _get) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.FtPerformanceAnnualised = undefined;
var _get2 = _interopRequireDefault(_get);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _possibleConstructorReturn(self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return call && (typeof call === "object" || typeof call === "function") ? call : self;
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: false,
writable: true,
configurable: true
}
});
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
}
var _dec, _class;
var FtPerformanceAnnualised = exports.FtPerformanceAnnualised = (_dec = (0, _aureliaFramework.inject)('Store', 'Beans', Element), _dec(_class = function (_ReduxComponentBase) {
_inherits(FtPerformanceAnnualised, _ReduxComponentBase);
function FtPerformanceAnnualised(store, beans, element) {
_classCallCheck(this, FtPerformanceAnnualised);
var _this = _possibleConstructorReturn(this, _ReduxComponentBase.call(this, store));
_this.isPopulated = false;
_this.currentTimePeriodTab = null;
_this.TimePeriodTabs = [{
key: 'MONTH_END',
labelKey: 'month-end',
ariaControl: 'performance-annualised-monthly-pane',
isActive: false
}, {
key: 'QUARTER_END',
labelKey: 'quarter-end',
ariaControl: 'performance-annualised-quarterly-pane',
isActive: false
}];
_this.chartData = [];
_this.chartOptions = {};
_this.fundId = element.getAttribute('fund-id');
_this.performanceBeans = beans.component.performanceSimply;
_this.dispatch({
type: 'POPULATE_PERFORMANCE_ANNUALISED',
beans: _this.performanceBeans,
fundId: _this.fundId,
segment: store.getState().general.segment
});
_this.dispatch({
type: 'PERFORMANCE_ANNUALISED_DEFAULT_STATE',
timePeriodTab: 'MONTH_END'
});
return _this;
}
FtPerformanceAnnualised.prototype.changeTimePeriodTab = function changeTimePeriodTab(key) {
this.logger.info('Disptaching PERFORMANCE_ANNUALISED_CHANGE_TIME_PERIOD_TAB');
this.dispatch({
type: 'PERFORMANCE_ANNUALISED_CHANGE_TIME_PERIOD_TAB',
tab: key
});
};
FtPerformanceAnnualised.prototype.mapState = function mapState(newState) {
var _this2 = this;
try {
var fundState = (0, _mapStateUtils.getFundState)(newState, this.fundId);
this.currentTab = (0, _get2.default)(newState, 'products.app.performance.performanceAnnualised.currentTimePeriodTab');
this.currentTimePeriodTab = (0, _get2.default)(fundState, 'performanceAnnualised[' + this.currentTab + '].label');
this.label = (0, _get2.default)(newState, 'products.label');
if (!this.currentTab || !this.currentTimePeriodTab || !this.label) {
this.isPopulated = false;
return;
}
this.tableHeaders = fundState.performanceAnnualised.tableHeaders;
this.navDate = fundState.performanceAnnualised.navDate;
this.performances = fundState.performanceAnnualised[this.currentTab].performances;
this.chartCategories = [this.label.get('1-yr'), this.label.get('3-yr'), this.label.get('5-yr'), this.label.get('10-yr'), this.label.get('15-yr'), this.label.get('inception')];
this.chartData = this.performances.graphData;
if (this.chartData) {
var chartItems = this.chartData;
var chartType = 'column';
var aryChartData = [];
for (var _iterator = Object.keys(chartItems), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var key = _ref;
var thisChartItem = {
data: chartItems[key],
type: chartType
};
aryChartData.push(thisChartItem);
}
this.chartData = aryChartData;
}
this.TimePeriodTabs = this.TimePeriodTabs.map(function (tab) {
tab.value = _this2.label[tab.labelKey];
tab.isActive = tab.key === _this2.currentTab;
return tab;
});
this.isPopulated = true;
} catch (e) {
this.logger.error(e);
this.isPopulated = false;
}
};
return FtPerformanceAnnualised;
}(_reduxComponentBase.ReduxComponentBase)) || _class);
});
define('components/products/portfolio/ft-geographic-allocation/etf/ft-geographic-allocation',['exports', 'aurelia-framework', '../../common/ft-generic-hierarchical-component-base', 'lodash/get'], function (exports, _aureliaFramework, _ftGenericHierarchicalComponentBase, _get) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.FtGeographicAllocation = undefined;
var _get2 = _interopRequireDefault(_get);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _possibleConstructorReturn(self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return call && (typeof call === "object" || typeof call === "function") ? call : self;
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: false,
writable: true,
configurable: true
}
});
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
}
var _dec, _class;
var FtGeographicAllocation = exports.FtGeographicAllocation = (_dec = (0, _aureliaFramework.inject)('Store', 'Beans', Element), _dec(_class = function (_FtGenericHierarchica) {
_inherits(FtGeographicAllocation, _FtGenericHierarchica);
function FtGeographicAllocation(store, beans, element) {
_classCallCheck(this, FtGeographicAllocation);
var _this = _possibleConstructorReturn(this, _FtGenericHierarchica.call(this, store));
_this.isPopulated = false;
_this.hasRequestBenchMarkData = false;
_this.fundId = element.getAttribute('fund-id');
_this.cid = element.getAttribute('cid');
_this.portfolioBeans = beans.component.portfolioGeographicAllocation;
_this.portfolioBeans.push(_this.cid);
var currentState = store.getState();
_this.dispatch({
type: 'POPULATE_GEOGRAPHIC_ALLOCATION',
beans: _this.portfolioBeans,
fundId: _this.fundId,
cid: _this.cid,
portfolioComponent: 'geographic-allocation',
segment: currentState.general.segment
});
return _this;
}
FtGeographicAllocation.prototype.requestBenchMarkData = function requestBenchMarkData() {
this.dispatch({
type: 'POPULATE_GEOGRAPHIC_ALLOCATION_BMDATA',
beans: this.portfolioBeans,
fundId: this.data.bmrkId,
cid: this.cid
});
};
FtGeographicAllocation.prototype.mapState = function mapState(newState) {
try {
var chartState = (0, _get2.default)(newState, 'products.app.portfolio.geoAllocation[' + this.cid + ']', false);
this.label = (0, _get2.default)(newState, 'products.label');
this.data = chartState;
if (!this.label || !chartState || !chartState.visible) {
this.isPopulated = false;
return;
}
this.chartData = [{
data: chartState.chart,
type: 'bar',
colorByPoint: true
}];
if (chartState.isSuppressed || !chartState.visible) {
this.isPopulated = false;
return;
}
if (chartState.missingBenchmarkData) {
if (!this.hasRequestBenchMarkData) {
this.hasRequestBenchMarkData = true;
this.requestBenchMarkData();
}
this.isPopulated = false;
return;
}
this.isPopulated = true;
} catch (e) {
this.logger.error(e);
this.isPopulated = false;
}
};
return FtGeographicAllocation;
}(_ftGenericHierarchicalComponentBase.FtGenericHierarchicalComponentBase)) || _class);
});
define('components/products/portfolio/ft-holdings/etf/ft-holdings',['exports', 'aurelia-framework', '../../../../../lib/redux-component-base', '../../../../../lib/paging-utils', '../../../../../lib/sort-utils', '../../../lib/map-state-utils', 'lodash/get'], function (exports, _aureliaFramework, _reduxComponentBase, _pagingUtils, _sortUtils, _mapStateUtils, _get) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.FtHoldings = undefined;
var _get2 = _interopRequireDefault(_get);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function _initDefineProp(target, property, descriptor, context) {
if (!descriptor) return;
Object.defineProperty(target, property, {
enumerable: descriptor.enumerable,
configurable: descriptor.configurable,
writable: descriptor.writable,
value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
});
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
var _createClass = function () {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function (Constructor, protoProps, staticProps) {
if (protoProps) defineProperties(Constructor.prototype, protoProps);
if (staticProps) defineProperties(Constructor, staticProps);
return Constructor;
};
}();
function _possibleConstructorReturn(self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return call && (typeof call === "object" || typeof call === "function") ? call : self;
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: false,
writable: true,
configurable: true
}
});
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
}
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
var desc = {};
Object['ke' + 'ys'](descriptor).forEach(function (key) {
desc[key] = descriptor[key];
});
desc.enumerable = !!desc.enumerable;
desc.configurable = !!desc.configurable;
if ('value' in desc || desc.initializer) {
desc.writable = true;
}
desc = decorators.slice().reverse().reduce(function (desc, decorator) {
return decorator(target, property, desc) || desc;
}, desc);
if (context && desc.initializer !== void 0) {
desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
desc.initializer = undefined;
}
if (desc.initializer === void 0) {
Object['define' + 'Property'](target, property, desc);
desc = null;
}
return desc;
}
function _initializerWarningHelper(descriptor, context) {
throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
}
var _dec, _dec2, _class, _desc, _value, _class2, _descriptor, _descriptor2;
var FtHoldings = exports.FtHoldings = (_dec = (0, _aureliaFramework.inject)('Store', 'Beans', Element), _dec2 = (0, _aureliaFramework.computedFrom)('pagingInfo'), _dec(_class = (_class2 = function (_ReduxComponentBase) {
_inherits(FtHoldings, _ReduxComponentBase);
function FtHoldings(store, beans, element) {
_classCallCheck(this, FtHoldings);
var _this = _possibleConstructorReturn(this, _ReduxComponentBase.call(this, store));
_initDefineProp(_this, 'currentPageNumber', _descriptor, _this);
_initDefineProp(_this, 'searchString', _descriptor2, _this);
_this.isPopulated = false;
_this.fundId = element.getAttribute('fund-id');
_this.path = store.getState().general.path;
var currentState = store.getState();
_this.dispatch({
type: 'POPULATE_HOLDINGS_STATE',
beans: beans.component.portfolioHoldings,
fundId: _this.fundId,
portfolioComponent: 'holdings',
segment: currentState.general.segment
});
return _this;
}
FtHoldings.prototype.changeSort = function changeSort(name) {
this.dispatch({
type: 'HOLDINGS_CHANGE_SORT',
columnName: name
});
};
FtHoldings.prototype.goToPage = function goToPage(page) {
this.dispatch({
type: 'HOLDINGS_CHANGE_PAGE',
page: page
});
};
FtHoldings.prototype.currentPageNumberChanged = function currentPageNumberChanged(page) {
this.goToPage(page);
};
FtHoldings.prototype.searchStringChanged = function searchStringChanged(newSearchString) {
this.dispatch({
type: 'HOLDINGS_CHANGE_SEARCH',
searchString: newSearchString
});
};
FtHoldings.prototype.mapState = function mapState(newState) {
try {
this.logger.debug('mapState()');
var fundState = (0, _mapStateUtils.getFundState)(newState, this.fundId);
this.label = (0, _get2.default)(newState, 'products.label');
if (!this.label || !fundState || !fundState.holdings) {
this.isPopulated = false;
return;
}
var holdingsAppState = newState.products.app.holdings;
this.sort = holdingsAppState.sort;
this.searchString = holdingsAppState.search.searchString;
this.holdings = fundState.holdings;
var allHoldings = fundState.holdings.holdingsList.filter(this._createFilterFunction(holdingsAppState.search)).sort(this._createSortFunction(this.sort));
this.pagingInfo = (0, _pagingUtils.getPagingInfo)(allHoldings.length, holdingsAppState.paging.pageSize, holdingsAppState.paging.currentPage);
var currentPage = this.pagingInfo.currentPage;
this.currentPageNumber = currentPage ? currentPage.page : null;
this.paginatedRows = allHoldings.filter(function (holding, index) {
var recordNumber = index + 1;
return currentPage && currentPage.startRecord <= recordNumber && recordNumber <= currentPage.endRecord;
});
this.isPopulated = true;
} catch (e) {
this.logger.error(e);
this.isPopulated = false;
}
};
FtHoldings.prototype._createFilterFunction = function _createFilterFunction(search) {
if (search.searchString) {
var searchString = search.searchString.toLowerCase();
var fields = search.fields;
return function (holding) {
return fields.reduce(function (success, field) {
return success || (0, _get2.default)(holding, field, '').toLowerCase().includes(searchString);
}, false);
};
}
return function (holding) {
return true;
};
};
FtHoldings.prototype._createSortFunction = function _createSortFunction(sort) {
var sortColumn = Array.from(sort.columns.values()).find(function (col) {
return col.direction;
});
this.logger.debug('sortColumn', sortColumn);
var dataKey = sortColumn.dataKey;
var secondaryCompare = sort.secondary ? (0, _sortUtils.createCompare)(sort.secondary.dataKey, sort.secondary.direction, { isNumeric: sort.secondary.isNumeric, isDate: sort.secondary.isDate }) : null;
return (0, _sortUtils.createCompare)(dataKey, sortColumn.direction, { secondaryCompare: secondaryCompare, isNumeric: sortColumn.isNumeric, isDate: sortColumn.isDate });
};
_createClass(FtHoldings, [{
key: 'hasResults',
get: function get() {
return this.pagingInfo.totalRecords > 0;
}
}, {
key: 'downloadUrl',
get: function get() {
return this.path + '?gwbid=gw.portfolio';
}
}]);
return FtHoldings;
}(_reduxComponentBase.ReduxComponentBase), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'currentPageNumber', [_aureliaFramework.observable], {
enumerable: true,
initializer: null
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'searchString', [_aureliaFramework.observable], {
enumerable: true,
initializer: null
}), _applyDecoratedDescriptor(_class2.prototype, 'hasResults', [_dec2], Object.getOwnPropertyDescriptor(_class2.prototype, 'hasResults'), _class2.prototype)), _class2)) || _class);
});
define('components/products/portfolio/ft-portfolio-statistics-and-positions/etf/ft-portfolio-statistics-and-positions',['exports', 'aurelia-framework', '../../../../../lib/redux-component-base', '../../../lib/map-state-utils', 'lodash/get'], function (exports, _aureliaFramework, _reduxComponentBase, _mapStateUtils, _get) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.FtPortfolioStatisticsAndPositions = undefined;
var _get2 = _interopRequireDefault(_get);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _possibleConstructorReturn(self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return call && (typeof call === "object" || typeof call === "function") ? call : self;
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: false,
writable: true,
configurable: true
}
});
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
}
var _dec, _class;
var FtPortfolioStatisticsAndPositions = exports.FtPortfolioStatisticsAndPositions = (_dec = (0, _aureliaFramework.inject)('Store', 'Beans', Element), _dec(_class = function (_ReduxComponentBase) {
_inherits(FtPortfolioStatisticsAndPositions, _ReduxComponentBase);
function FtPortfolioStatisticsAndPositions(store, beans, element) {
_classCallCheck(this, FtPortfolioStatisticsAndPositions);
var _this = _possibleConstructorReturn(this, _ReduxComponentBase.call(this, store));
_this.isPopulated = false;
_this.fundId = element.getAttribute('fund-id');
_this.cid = element.getAttribute('cid');
_this.portfolioBeans = beans.component.portfolioStatisticsAndPositions;
_this.portfolioBeans.push(_this.cid);
var currentState = store.getState();
_this.dispatch({
type: 'POPULATE_PORTFOLIO_STATISTICS_AND_POSITIONS',
beans: _this.portfolioBeans,
fundId: _this.fundId,
cid: _this.cid,
segment: currentState.general.segment
});
return _this;
}
FtPortfolioStatisticsAndPositions.prototype.mapState = function mapState(newState) {
try {
var fundState = (0, _mapStateUtils.getFundState)(newState, this.fundId);
var labels = (0, _get2.default)(newState, 'products.label');
if (!fundState || !fundState.portfolioStatisticsAndPositions || !fundState.portfolioStatisticsAndPositions.isValid || fundState.portfolioStatisticsAndPositions.data.length === 0 || !labels) {
this.isPopulated = false;
return;
}
this.label = labels;
var data = fundState.portfolioStatisticsAndPositions.data;
var midWayPoint = Math.ceil(data.length / 3);
this.dataFirstThird = data.slice(0, midWayPoint);
this.dataSecondThird = data.slice(midWayPoint, midWayPoint * 2);
this.dataLastThird = data.slice(midWayPoint * 2, data.length);
midWayPoint = Math.ceil(data.length / 2);
this.dataFirstHalf = data.slice(0, midWayPoint);
this.dataSecondHalf = data.slice(midWayPoint, data.length);
this.isPopulated = true;
} catch (e) {
this.logger.error(e);
this.isPopulated = false;
}
};
return FtPortfolioStatisticsAndPositions;
}(_reduxComponentBase.ReduxComponentBase)) || _class);
});
define('components/products/portfolio/ft-sector-allocation/etf/ft-sector-allocation',['exports', 'aurelia-framework', '../../../../../lib/redux-component-base', 'lodash/get'], function (exports, _aureliaFramework, _reduxComponentBase, _get) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.FtSectorAllocation = undefined;
var _get2 = _interopRequireDefault(_get);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _possibleConstructorReturn(self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return call && (typeof call === "object" || typeof call === "function") ? call : self;
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: false,
writable: true,
configurable: true
}
});
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
}
var _dec, _class;
var FtSectorAllocation = exports.FtSectorAllocation = (_dec = (0, _aureliaFramework.inject)('Store', 'Beans', Element), _dec(_class = function (_ReduxComponentBase) {
_inherits(FtSectorAllocation, _ReduxComponentBase);
function FtSectorAllocation(store, beans, element) {
_classCallCheck(this, FtSectorAllocation);
var _this = _possibleConstructorReturn(this, _ReduxComponentBase.call(this, store));
_this.isPopulated = false;
_this.hasRequestBenchMarkData = false;
_this.fundId = element.getAttribute('fund-id');
_this.cid = element.getAttribute('cid');
_this.portfolioBeans = beans.component.portfolioCharting.slice(0);
_this.portfolioBeans.push(_this.cid);
var currentState = store.getState();
_this.dispatch({
type: 'POPULATE_PORTFOLIO_CHART',
chartType: 'SECTOR_ALLOCATION',
beans: _this.portfolioBeans,
fundId: _this.fundId,
cid: _this.cid,
portfolioComponent: 'sector-allocation',
segment: currentState.general.segment
});
return _this;
}
FtSectorAllocation.prototype.requestBenchMarkData = function requestBenchMarkData(benchmarkId) {
this.dispatch({
type: 'POPULATE_PORTFOLIO_CHART_BMDATA',
chartType: 'SECTOR_ALLOCATION',
beans: this.portfolioBeans,
fundId: benchmarkId,
cid: this.cid
});
};
FtSectorAllocation.prototype.mapState = function mapState(newState) {
try {
var chartState = (0, _get2.default)(newState, 'products.app.portfolio.chart[' + this.cid + ']', false);
this.label = (0, _get2.default)(newState, 'products.label');
this.data = chartState;
if (!this.label || !chartState || !chartState.visible) {
this.isPopulated = false;
return;
}
if (chartState.missingBenchmarkData) {
if (!this.hasRequestBenchMarkData) {
this.hasRequestBenchMarkData = true;
this.requestBenchMarkData(chartState.bmrkId);
}
this.isPopulated = false;
return;
}
this.chartData = [{
data: chartState.chart,
type: 'bar',
colorByPoint: true
}];
this.isPopulated = true;
} catch (e) {
this.logger.error(e);
this.isPopulated = false;
}
};
return FtSectorAllocation;
}(_reduxComponentBase.ReduxComponentBase)) || _class);
});
define('components/products/portfolio/lib/etf/portfolio-chart.reducer',['exports', 'lodash/set', 'lodash/get', 'lodash/find', '../../util/util', '../../../common/util/utils-config', '../../../common/util/utils-fund-details', '../../../lib/decorators/config-decorator', 'aurelia-framework'], function (exports, _set, _get, _find, _util, _utilsConfig, _utilsFundDetails, _configDecorator, _aureliaFramework) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.CHART_TYPES_ENUM = undefined;
exports.portfolioChartReducer = portfolioChartReducer;
var _set2 = _interopRequireDefault(_set);
var _get2 = _interopRequireDefault(_get);
var _find2 = _interopRequireDefault(_find);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var logger = _aureliaFramework.LogManager.getLogger('portfolio-chart-reducer');
var CHART_TYPES_ENUM = exports.CHART_TYPES_ENUM = {
'MARKET_CAPITAL_ALLOCATION': {
labelId: 'market-capitalisation-heading',
caveatId: 'MarketCapitalisation',
dataKey: 'MARKET_CAPITAL_ALLOCATION',
options: {
sorted: true
}
},
'SECTOR_ALLOCATION': {
labelId: 'sector-allocation-heading',
caveatId: 'SectorAllocation',
dataKey: 'SECTOR_ALLOCATION',
options: {
sorted: true,
tableMappingKeys: {
val: 'val.val',
bmVal: null
}
},
forceChart: true
},
'ASSET_ALLOCATION': {
dataKey: 'ASSET_ALLOCATION',
caveatId: 'AssetAllocation',
options: {
sorted: false
},
forceChart: true
},
'CURRENCY_ALLOCATION': {
dataKey: 'CURRENCY_ALLOCATION',
caveatId: 'CurrencyBreakdown',
options: {
sorted: false
},
forceChart: true
},
'GEOGRAPHIC_BREAKDOWN': {
caveatId: 'GeographicBreakdown',
dataKey: 'COUNTRY_ALLOCATION',
options: {},
forceChart: false
},
'MANAGER_ALLOCATION': {
dataKey: 'MANAGER_ALLOCATION'
},
'COUPON_ALLOCATION': {
dataKey: 'COUPON_ALLOCATION'
},
'QUALITY_ALLOCATION': {
dataKey: 'QUALITY_ALLOCATION'
},
'PRODUCT_AUM': {
dataKey: 'PRODUCT_AUM'
},
'HEDGE_ALLOCATION': {
dataKey: 'HEDGE_ALLOCATION'
},
'SECURITY_EXPOSURE': {
dataKey: 'SECURITY_EXPOSURE'
},
'K2_SECTOR_ALLOCATION': {
dataKey: 'K2_SECTOR_ALLOCATION'
},
'K2_PORTFOLIO_ALLOCATION': {
dataKey: 'K2_PORTFOLIO_ALLOCATION'
},
'ASSET_EXPOSURE': {
dataKey: 'ASSET_EXPOSURE'
},
'ASSET_SECURITY_EXPOSURE': {
dataKey: 'ASSET_SECURITY_EXPOSURE'
}
};
function portfolioChartReducer(state, action) {
var cid = action.cid;
var newState = void 0;
var key = void 0;
var chartObj = void 0;
switch (action.type) {
case 'POPULATE_PORTFOLIO_CHART_SUCCESS':
if (!action.cid) {
logger.error('no cid given');
return state;
}
if (!CHART_TYPES_ENUM[action.chartType]) {
logger.error('invalid chart type given : ' + action.chartType);
return state;
}
var _action$json = action.json,
rawPortfolioFeed = _action$json[0],
rawFundDetails = _action$json[1],
rawConfig = _action$json[2],
rawPageJsonConfig = _action$json[3];
chartObj = chartDataFactory(rawPortfolioFeed, rawFundDetails, rawConfig, rawPageJsonConfig, action);
newState = Object.assign({}, state);
key = !action.subKey ? 'app.portfolio.chart[' + cid + ']' : 'app.portfolio.chart[' + cid + '][' + action.subKey + ']';
(0, _set2.default)(newState, key, chartObj);
return newState;
case 'POPULATE_PORTFOLIO_CHART_BMDATA_SUCCESS':
if (!action.cid) {
logger.error('no cid given');
return state;
}
if (!CHART_TYPES_ENUM[action.chartType]) {
logger.error('invalid chart type given : ' + action.chartType);
return state;
}
key = !action.subKey ? 'app.portfolio.chart[' + cid + ']' : 'app.portfolio.chart[' + cid + '][' + action.subKey + ']';
chartObj = (0, _get2.default)(state, key);
if (!chartObj) {
logger.error('no existing chart data to append benchamrk data to');
return state;
}
var _action$json2 = action.json,
rawBenchmarkPortfolioFeed = _action$json2[0];
chartObj = appendBenchmarkData(chartObj, rawBenchmarkPortfolioFeed, action.chartType);
newState = Object.assign({}, state);
(0, _set2.default)(newState, key, chartObj);
return newState;
default:
return state;
}
}
function chartDataFactory(rawPortfolioFeed, rawFundDetails, rawConfig, rawPageJsonConfig, action) {
var chartType = action.chartType;
var chartTypeConfig = CHART_TYPES_ENUM[chartType];
var fundCategory = _utilsFundDetails.utilsFundDetails.getFundCategory(rawFundDetails);
var config = (0, _configDecorator.configDecorator)(rawConfig, action.segment);
var isSuppressed = _utilsConfig.utilsConfig.isPortfolioComponentSuppressed(config, action.fundId, action.portfolioComponent, fundCategory);
if (isSuppressed) {
return {
visible: false,
isSuppressed: true
};
}
var rawBreakdowns = (0, _get2.default)(rawPortfolioFeed, 'globalProductsValue.portfolioIntlValue.breakdown.brkdwnDet');
var currentBreakdown = (0, _find2.default)(rawBreakdowns, { 'type': chartTypeConfig.dataKey });
if (!currentBreakdown) {
return {
visible: false,
isSuppressedByLackOfData: true
};
}
var suppressionCondition = (0, _get2.default)(chartTypeConfig, 'options.suppressionCondition', null);
if (suppressionCondition && suppressionCondition(decoratedConfig, rawPortfolioFeed, currentBreakdown)) {
return {
visible: false,
isSuppressedByCondition: true
};
}
var decoratedConfig = (0, _configDecorator.configDecorator)(rawConfig, action.segment);
var refreshRateFromConfig = (0, _get2.default)(decoratedConfig, 'portfolio.refreshRate');
var refreshRate = _util.portfolioUtils.convertRefreshFrequencyIntoLabelId(refreshRateFromConfig);
var obj = {
caveatFootnote: chartTypeConfig.caveatId ? chartTypeConfig.caveatId : 'Portfolio',
caveatProximal: chartTypeConfig.caveatId ? chartTypeConfig.caveatId + 'Proximal' : 'PortfolioProximal',
labelId: chartTypeConfig.labelId,
visible: true,
refreshRate: refreshRate
};
var tempBreakdown = _util.portfolioUtils.getEtfSimplifiedBreakdown(currentBreakdown, chartTypeConfig.options);
obj = Object.assign({}, obj, tempBreakdown);
var rawBenchmarks = (0, _get2.default)(rawFundDetails, 'globalProductsValue.fundDetailIntl.benchMrkList');
if (rawBenchmarks !== undefined) {
obj.bmrkId = _util.portfolioUtils.getBenchmarkID(rawBenchmarks);
}
obj.missingBenchmarkData = obj.bmrkId !== undefined;
if (chartTypeConfig.forceChart) {
obj.showChart = true;
obj.spanRow = true;
} else {
var pageJsonConfig = _util.portfolioUtils.parsePageJsonConfig(rawPageJsonConfig);
obj.showChart = pageJsonConfig.showChart;
obj.spanRow = pageJsonConfig.spanRow;
}
return obj;
}
function appendBenchmarkData(chartObj, rawBenchmarkPortfolioFeed, chartType) {
var chartTypeConfig = CHART_TYPES_ENUM[chartType];
var rawBreakdowns = (0, _get2.default)(rawBenchmarkPortfolioFeed, 'globalProductsValue.portfolioIntlValue.breakdown.brkdwnDet');
var appendBreakdown = (0, _find2.default)(rawBreakdowns, { 'type': chartTypeConfig.dataKey });
var appendOpts = {
fieldId: 'bmVal',
nameKey: 'name.val',
fieldKey: 'val.val',
appendNonMatched: true
};
_util.portfolioUtils.appendTableData(chartObj.table, appendBreakdown, appendOpts);
chartObj.missingBenchmarkData = false;
return chartObj;
}
});
define('components/products/tax/ft-german-tax/etf/ft-german-tax',['exports', '../../../../../lib/redux-component-base', 'aurelia-framework', 'lodash/get'], function (exports, _reduxComponentBase, _aureliaFramework, _get) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.FtGermanTax = undefined;
var _get2 = _interopRequireDefault(_get);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function _initDefineProp(target, property, descriptor, context) {
if (!descriptor) return;
Object.defineProperty(target, property, {
enumerable: descriptor.enumerable,
configurable: descriptor.configurable,
writable: descriptor.writable,
value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
});
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _possibleConstructorReturn(self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return call && (typeof call === "object" || typeof call === "function") ? call : self;
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: false,
writable: true,
configurable: true
}
});
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
}
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
var desc = {};
Object['ke' + 'ys'](descriptor).forEach(function (key) {
desc[key] = descriptor[key];
});
desc.enumerable = !!desc.enumerable;
desc.configurable = !!desc.configurable;
if ('value' in desc || desc.initializer) {
desc.writable = true;
}
desc = decorators.slice().reverse().reduce(function (desc, decorator) {
return decorator(target, property, desc) || desc;
}, desc);
if (context && desc.initializer !== void 0) {
desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
desc.initializer = undefined;
}
if (desc.initializer === void 0) {
Object['define' + 'Property'](target, property, desc);
desc = null;
}
return desc;
}
function _initializerWarningHelper(descriptor, context) {
throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
}
var _dec, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3;
var FtGermanTax = exports.FtGermanTax = (_dec = (0, _aureliaFramework.inject)('Store', 'Beans', Element), _dec(_class = (_class2 = function (_ReduxComponentBase) {
_inherits(FtGermanTax, _ReduxComponentBase);
function FtGermanTax(store, beans, element) {
_classCallCheck(this, FtGermanTax);
var _this = _possibleConstructorReturn(this, _ReduxComponentBase.call(this, store));
_initDefineProp(_this, 'isPopulated', _descriptor, _this);
_initDefineProp(_this, 'funds', _descriptor2, _this);
_initDefineProp(_this, 'asOf', _descriptor3, _this);
_this.funds = [];
_this.asOf = '—';
_this.isPopulated = false;
_this.dispatch({
type: 'POPULATE_GERMAN_TAX',
beans: beans.component.tax
});
return _this;
}
FtGermanTax.prototype.mapState = function mapState(newState) {
this.label = (0, _get2.default)(newState, 'products.label');
if (!newState.products.tax || !this.label) {
this.funds = [];
this.asOf = '—';
this.isPopulated = false;
return;
}
this.funds = newState.products.tax.funds;
this.asOf = newState.products.tax.asOf;
this.isPopulated = true;
};
return FtGermanTax;
}(_reduxComponentBase.ReduxComponentBase), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'isPopulated', [_aureliaFramework.observable], {
enumerable: true,
initializer: null
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'funds', [_aureliaFramework.observable], {
enumerable: true,
initializer: null
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'asOf', [_aureliaFramework.observable], {
enumerable: true,
initializer: null
})), _class2)) || _class);
});
define('components/products/overview/ft-fund-information/lib/etf/fund-information.reducer',['exports', 'lodash/get', '../../../../lib/reducer-utils', 'aurelia-framework', '../../../../lib/decorators/config-decorator', '../common/fund-information.reducer', '../../../../common/util/utils-fund-details'], function (exports, _get, _reducerUtils, _aureliaFramework, _configDecorator, _fundInformation, _utilsFundDetails) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.DISTRIBUTION_FIELDS = exports.INFORMATION_FIELDS = exports.SALES_CHARGE_FIELDS = undefined;
exports.fundInformation = fundInformation;
var _get2 = _interopRequireDefault(_get);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var logger = _aureliaFramework.LogManager.getLogger('fund-information');
var SALES_CHARGE_FIELDS = exports.SALES_CHARGE_FIELDS = {
'maximum-sales-charge': {
dataKey: 'fundOverview.fundDet.feeCharges.maxAdmnFee.val',
type: _reducerUtils.FORMAT_TYPES.PERCENTAGE
},
'maintenance-charge': {
dataKey: 'fundOverview.fundDet.feeCharges.mtnceChrge.val',
type: _reducerUtils.FORMAT_TYPES.PERCENTAGE
},
'management-charge': {
dataKey: 'fundOverview.fundDet.feeCharges.mgmtChrge.val',
type: _reducerUtils.FORMAT_TYPES.PERCENTAGE
},
'total-expenses': {
dataKey: 'fundOverview.fundDet.feeCharges.expRatioWthWvr.val',
type: _reducerUtils.FORMAT_TYPES.PERCENTAGE,
addendumData: {
caveatId: {
dataKey: 'TEROverview',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
}
}
},
'ongoing-charges': {
dataKey: 'fundOverview.fundDet.feeCharges.ongoingChrgeRatio.val',
type: _reducerUtils.FORMAT_TYPES.PERCENTAGE,
addendumData: {
caveatId: {
dataKey: 'OngoingChargesOverview',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
}
}
},
'total-annual-charge': {
dataKey: 'fundOverview.fundDet.feeCharges.totAnulChrge.val',
type: _reducerUtils.FORMAT_TYPES.PERCENTAGE
},
'minimum-initial-amount': {
dataKey: 'fundOverview.fundDet.feeCharges.initSalesChrge.val',
type: _reducerUtils.FORMAT_TYPES.CURRENCY
},
'minimum-subsequent-amount': {
dataKey: 'fundOverview.fundDet.feeCharges.XXX.val',
type: _reducerUtils.FORMAT_TYPES.CURRENCY
}
};
var INFORMATION_FIELDS = exports.INFORMATION_FIELDS = {
'fund-inception-date': {
dataKey: 'fundOverview.fundDet.fundIncpDt.val',
type: _reducerUtils.FORMAT_TYPES.STRING
},
'fund-based-currency': {
dataKey: 'fundOverview.fundDet.fundBaseCur.val',
type: _reducerUtils.FORMAT_TYPES.STRING
},
'share-class-inception-date': {
dataKey: 'fundOverview.fundDet.fundIncpDt.val',
type: _reducerUtils.FORMAT_TYPES.STRING
},
'share-class-currency': {
dataKey: 'normalised.currentClass.shClsCur.val',
type: _reducerUtils.FORMAT_TYPES.STRING
},
'asset-class': {
dataKey: 'fundDetails.fundCatgry.val',
type: _reducerUtils.FORMAT_TYPES.STRING
},
'investment-category': {
dataKey: 'fundOverview.fundDet.etfDet.invstmtCat.val',
type: _reducerUtils.FORMAT_TYPES.STRING
},
'region': {
dataKey: 'fundOverview.fundDet.etfDet.region.val',
type: _reducerUtils.FORMAT_TYPES.STRING
},
'total-net-assets': {
dataKey: 'fundOverview.portDet.etfStat.totalNetAsset.val',
type: _reducerUtils.FORMAT_TYPES.CURRENCY,
addendumData: {
asOf: {
dataKey: 'fundOverview.portDet.etfStat.asOfDateTna.val',
type: _reducerUtils.FORMAT_TYPES.STRING
},
caveatId: {
dataKey: 'TotalNetAssetsOverview',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
},
updateFreq: {
dataKey: 'updated-daily',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
}
}
},
'investment-universe': {
dataKey: 'normalised.keyedBenchMrks.INST1.bmrkName.val',
type: _reducerUtils.FORMAT_TYPES.STRING,
addendumData: {
caveatId: {
dataKey: 'PrimaryBenchmarkOverview',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
}
}
},
'underlying-index': {
dataKey: 'normalised.keyedBenchMrks.INST2.bmrkName.val',
type: _reducerUtils.FORMAT_TYPES.STRING,
addendumData: {
caveatId: {
dataKey: 'SecondaryBenchmarkOverview',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
}
}
},
'etf-type': {
dataKey: 'fundOverview.fundDet.fundStat.val',
type: _reducerUtils.FORMAT_TYPES.STRING,
addendumData: {
caveatId: {
dataKey: 'ETFTypeOverview',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
}
}
},
'domicile': {
dataKey: 'fundOverview.fundDet.etfDet.DOMICILE.val',
type: _reducerUtils.FORMAT_TYPES.STRING
},
'ucits': {
dataKey: 'fundOverview.fundDet.etfDet.UCITS.val',
type: _reducerUtils.FORMAT_TYPES.STRING
},
'methodology': {
dataKey: 'fundOverview.fundDet.etfDet.methodology.val',
type: _reducerUtils.FORMAT_TYPES.STRING,
addendumData: {
caveatId: {
dataKey: 'MethodologyOverview',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
}
}
},
'product-structure': {
dataKey: 'fundOverview.fundDet.etfDet.prodStructure.val',
type: _reducerUtils.FORMAT_TYPES.STRING,
addendumData: {
caveatId: {
dataKey: 'ProductStructureOverview',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
}
}
},
'frequency-of-index-reconstitution': {
dataKey: 'fundOverview.fundDet.reBalFreq.val',
type: _reducerUtils.FORMAT_TYPES.STRING
},
'use-of-income': {
dataKey: 'fundOverview.fundDet.useOfIncome.val',
type: _reducerUtils.FORMAT_TYPES.STRING
},
'fiscal-year-end': {
dataKey: 'fundOverview.fundDet.fundMiscDet.fiscYearEndDt.val',
type: _reducerUtils.FORMAT_TYPES.STRING
},
'custodian': {
dataKey: 'fundOverview.fundDet.etfDet.custodian.val',
type: _reducerUtils.FORMAT_TYPES.STRING,
addendumData: {
caveatId: {
dataKey: 'CustodianOverview',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
}
}
},
'administrator': {
dataKey: 'fundOverview.fundDet.etfDet.administrator.val',
type: _reducerUtils.FORMAT_TYPES.STRING,
addendumData: {
caveatId: {
dataKey: 'AdministratorOverview',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
}
}
}
};
var DISTRIBUTION_FIELDS = exports.DISTRIBUTION_FIELDS = {
'distribution-per-unit': {
dataKey: 'priceDetails.dividend.divPerUnit.val',
type: _reducerUtils.FORMAT_TYPES.CURRENCY
},
'distribution-date': {
dataKey: 'priceDetails.dividend.distDt.val',
type: _reducerUtils.FORMAT_TYPES.STRING
},
'dividend-frequency': {
dataKey: 'normalised.currentClass.dvndFreq.val',
type: _reducerUtils.FORMAT_TYPES.STRING
},
'distribution-yield': {
dataKey: 'priceDetails.dvndYld.val',
type: _reducerUtils.FORMAT_TYPES.PERCENTAGE,
addendumData: {
caveatId: {
dataKey: 'DistirbutionYieldOverview',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
},
asOf: {
dataKey: 'priceDetails.dvndYldAsOfDate.val',
type: _reducerUtils.FORMAT_TYPES.STRING
},
updateFreq: {
dataKey: 'updated-monthly',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
}
}
}
};
function fundInformation(state, action) {
switch (action.type) {
case 'POPULATE_FUND_INFORMATION_SUCCESS':
logger.debug('Reducing: POPULATE_FUND_INFORMATION_SUCCESS');
return Object.assign({}, state, {
fundInformation: _infoBuilder(action)
});
default:
return state;
}
}
function _infoBuilder(action) {
var _action$json = action.json,
rawOverview = _action$json[0],
rawFundDetails = _action$json[1],
rawPrice = _action$json[2],
rawConfig = _action$json[3];
var fundOverview = (0, _get2.default)(rawOverview, 'etfFundOverviewValue');
var fundDetails = (0, _get2.default)(rawFundDetails, 'globalProductsValue.fundDetailIntl');
var priceDetails = (0, _get2.default)(rawPrice, 'globalProductsValue.etfPriceDivValue');
var hasDistributions = (0, _get2.default)(fundDetails, 'distributionFlag.val', '').toLocaleUpperCase() === 'Y';
var shareClasses = (0, _get2.default)(fundOverview, 'fundDet.shClsDet');
var fundId = (0, _get2.default)(fundDetails, 'fundId.val');
var normalised = {};
normalised.currentClass = _utilsFundDetails.utilsFundDetails.getCurrentShareClass(action.shareClassKey, shareClasses);
normalised.currentShareClassCode = (0, _get2.default)(normalised.currentClass, 'shCls.val') || (0, _get2.default)(fundDetails, 'shClassCode.val');
normalised.asOf = (0, _get2.default)(fundOverview, 'fundDet.etfDet.expAsOfDt.val', '—');
normalised.salesChargesAsOf = (0, _get2.default)(fundOverview, 'fundDet.feeCharges.asOfDate.val', '—');
normalised.sharesOutstandingAsOf = (0, _get2.default)(fundOverview, 'priceDet.asOfDateForNav.val', '—');
normalised.sharesOutstandingVal = (0, _get2.default)(fundOverview, 'priceDet.navDetailValue.shreOutStndng.val', '—');
normalised.distributionsAsOf = (0, _get2.default)(fundOverview, 'priceDet.dividend.distDt.val', '—');
normalised.distributionsHasData = !!(0, _get2.default)(fundOverview, 'priceDet.dividend.divPerUnit.val', false);
normalised.baseCurrency = _utilsFundDetails.utilsFundDetails.getFundCurrency(fundDetails);
normalised.shareClassCurrency = _utilsFundDetails.utilsFundDetails.getShareClassCurrency(fundDetails, normalised.currentShareClassCode);
normalised.assetClass = _utilsFundDetails.utilsFundDetails.getAssetClass(fundDetails);
normalised.keyedBenchMrks = _utilsFundDetails.utilsFundDetails.benchmarkByKey(fundDetails, fundId, normalised.currentShareClassCode);
var dataRepo = {
fundOverview: fundOverview,
fundDetails: fundDetails,
priceDetails: priceDetails,
normalised: normalised
};
var decoratedConfig = (0, _configDecorator.configDecorator)(rawConfig, action.segment);
var vehicleConfig = (0, _get2.default)(decoratedConfig, 'overview.investmentVehicles.ETF');
var desiredSaleChargeFieldIds = (0, _get2.default)(vehicleConfig, 'salesCharges', []);
var desiredIdentifierFieldIds = (0, _get2.default)(vehicleConfig, 'fundIdentifiers', []);
var desiredInformationFieldIds = (0, _get2.default)(vehicleConfig, 'fundInformationElements', []);
var fields = {
salesChargeFields: (0, _reducerUtils.extractCamelCaseIds)(SALES_CHARGE_FIELDS, desiredSaleChargeFieldIds),
identifierFields: (0, _reducerUtils.extractCamelCaseIds)(_fundInformation.IDENTIFIER_FIELDS, desiredIdentifierFieldIds),
informationFields: (0, _reducerUtils.extractCamelCaseIds)(INFORMATION_FIELDS, desiredInformationFieldIds),
distributionFields: DISTRIBUTION_FIELDS
};
return (0, _fundInformation.buildFundInformation)(hasDistributions, true, dataRepo, fields);
}
});
define('components/products/overview/ft-fund-information/lib/etf-gb/fund-information.reducer',['exports', 'lodash/get', 'aurelia-framework', '../etf/fund-information.reducer', '../common/fund-information.reducer'], function (exports, _get, _aureliaFramework, _fundInformation, _fundInformation2) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.fundInformation = fundInformation;
var _get2 = _interopRequireDefault(_get);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var logger = _aureliaFramework.LogManager.getLogger('fund-information');
function fundInformation(state, action) {
switch (action.type) {
case 'POPULATE_FUND_INFORMATION_SUCCESS':
logger.debug('Reducing: POPULATE_FUND_INFORMATION_SUCCESS for UK');
var newState = (0, _fundInformation.fundInformation)(state, action);
if (newState !== state && newState.fundInformation.distributions) {
var _action$json = action.json,
rawFundDetails = _action$json[1],
rawPrice = _action$json[2];
var ukDistributionYield = (0, _get2.default)(rawPrice, 'globalProductsValue.etfPriceDivValue.dvndYldUK.val');
var assetClass = (0, _get2.default)(rawFundDetails, 'globalProductsValue.fundDetailIntl.etfDet.asstCls.val');
newState = (0, _fundInformation2.updateDistributionYield)(newState, ukDistributionYield, assetClass);
}
return newState;
default:
return state;
}
}
});
define('components/products/overview/ft-trading-information/etf/lib/ft-trading-information.reducer',['exports', 'aurelia-framework', '../../../../../../lib/sort-utils'], function (exports, _aureliaFramework, _sortUtils) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.DEFAULT_SORT_FILTER = undefined;
exports.ftTradingInformation = ftTradingInformation;
exports.getFilteredExchanges = getFilteredExchanges;
var logger = _aureliaFramework.LogManager.getLogger('trading-information');
function ftTradingInformation(state, action) {
var tradingInformation = void 0;
var exchanges = void 0;
var filteredExchanges = void 0;
var selectedExchange = void 0;
var sortFilters = void 0;
var sortColumn = void 0;
switch (action.type) {
case 'TRADING_INFORMATION_EXCHANGE_CHANGE':
exchanges = state.tradingInformation.exchanges;
selectedExchange = action.data;
sortColumn = state.tradingInformation.sortColumn;
filteredExchanges = getFilteredExchanges(exchanges, selectedExchange, sortColumn);
tradingInformation = Object.assign({}, state.tradingInformation, {
filteredExchanges: filteredExchanges,
selectedExchange: selectedExchange
});
return Object.assign({}, state, { tradingInformation: tradingInformation });
case 'TRADING_INFORMATION_SORT_CHANGE':
exchanges = state.tradingInformation.exchanges;
selectedExchange = state.tradingInformation.selectedExchange;
sortFilters = state.tradingInformation.sortFilters;
var sortColumnKey = action.data;
sortFilters = (0, _sortUtils.toggleSortFilters)(sortFilters, sortColumnKey);
sortColumn = sortFilters[sortColumnKey];
filteredExchanges = getFilteredExchanges(exchanges, selectedExchange, sortColumn);
tradingInformation = Object.assign({}, state.tradingInformation, {
filteredExchanges: filteredExchanges,
sortFilters: sortFilters,
sortColumn: sortColumn
});
return Object.assign({}, state, { tradingInformation: tradingInformation });
default:
return state;
}
}
function getFilteredExchanges(exchanges, selectedExchange) {
var sortConfig = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
var validExchanges = exchanges;
var searchNeedle = '';
if (validExchanges.length === 0) {
return exchanges;
}
if (selectedExchange) {
searchNeedle = selectedExchange.trim().toLocaleLowerCase();
validExchanges = exchanges.filter(function (exchange) {
var exchangeName = exchange.name.toLocaleLowerCase();
return exchangeName.indexOf(searchNeedle) !== -1;
});
}
if (validExchanges.length === 0) {
logger.error('ERR: invalid selectedExchange matched no exchanges :' + searchNeedle);
return exchanges;
}
if (sortConfig) {
return validExchanges.sort((0, _sortUtils.createCompare)(sortConfig.dataKey, sortConfig.direction));
}
return validExchanges;
}
var DEFAULT_SORT_FILTER = exports.DEFAULT_SORT_FILTER = {
exchangeName: {
dataKey: 'name',
direction: null,
isNumeric: false
},
ticker: {
dataKey: 'ticker',
direction: null,
isNumeric: false
},
currency: {
dataKey: 'currency',
direction: null,
isNumeric: false
},
bloombergTicker: {
dataKey: 'bloombergTicker',
direction: null,
isNumeric: false
},
ric: {
dataKey: 'ric',
direction: null,
isNumeric: false
},
sedol: {
dataKey: 'sedol',
direction: null,
isNumeric: false
}
};
});
define('components/products/performance/ft-backtested-performance-annualised/lib/etf/backtested-performance-annualised.reducer',['exports', '../../../../common/util/utils', '../../../../lib/decorators/config-decorator', 'lodash/get', 'aurelia-framework'], function (exports, _utils, _configDecorator, _get, _aureliaFramework) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.backtestedPerformanceAnnualised = backtestedPerformanceAnnualised;
var _get2 = _interopRequireDefault(_get);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var logger = _aureliaFramework.LogManager.getLogger('backtested-annualised');
var perfType = 'backtested-annualised';
function backtestedPerformanceAnnualised(state, action) {
var stateOBJ = void 0;
stateOBJ = state;
if (action.type === 'POPULATE_BACKTESTED_PERFORMANCE_ANNUALISED_SUCCESS') {
var _action$json = action.json,
rawPerformance = _action$json[0],
rawFundDetails = _action$json[1],
rawConfig = _action$json[2];
var decoratingConfig = (0, _configDecorator.configDecorator)(rawConfig, action.segment);
var benchmarkOrder = (0, _get2.default)(decoratingConfig, 'performance.investmentVehicles.ETF.benchmarkOrder', []);
var etfBenchmarkOrder = benchmarkOrder;
var benchMrkList = (0, _get2.default)(rawFundDetails, 'globalProductsValue.fundDetailIntl.benchMrkList');
if (rawPerformance === undefined || rawPerformance.globalProductsValue === undefined || rawFundDetails === undefined || etfBenchmarkOrder === undefined) {
return (0, _utils.getErrorObject)(state, perfType);
}
var PI = (0, _get2.default)(rawPerformance, 'globalProductsValue.performanceIntl');
var PB = (0, _get2.default)(PI, 'perfBackTestedDetailsList');
var performances = typeof PB !== 'undefined' ? _performanceBuilder(PB, benchMrkList, etfBenchmarkOrder) : null;
stateOBJ = Object.assign({}, state, {
backtestedPerformanceAnnualised: {
performances: performances,
benchmarkOrder: etfBenchmarkOrder,
benchMrkList: benchMrkList
}
});
}
if (action.type === 'POPULATE_BACKTESTED_PERFORMANCE_BM_ANNUALISED_SUCCESS') {
var _action$json2 = action.json,
performanceGraphBm = _action$json2[0];
stateOBJ = Object.assign({}, state, {
backtestedPerformanceAnnualised: {
fundData: action.fundData,
bm1Data: performanceGraphBm,
bmDataRead: true
}
});
}
return stateOBJ;
}
function _backtestedDataAnnual(theseItems, thisName, asOfDate) {
var backtested = {
name: thisName,
asOfDate: asOfDate,
oneYr: theseItems.oneYrBMC,
threeYr: theseItems.threeYrBMC,
fiveYr: theseItems.fiveYrBMC,
tenYr: theseItems.tenYrBMC
};
return backtested;
}
function _performanceBuilder(performances, benchMrkList) {
var etfBenchmarkOrder = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
var aggPerfs = [];
var graphData = [];
if (etfBenchmarkOrder !== null) {
for (var _iterator = etfBenchmarkOrder, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var benchMrkListCounter = _ref;
var benchMrkId = (0, _utils.getBmIdByLbs)(benchMrkList, benchMrkListCounter);
var bmIndex = (0, _utils.findIndexByBbmkId)(performances, benchMrkId);
try {
var avgAnnual = (0, _get2.default)(performances[bmIndex], 'avgAnnual');
var asOfDate = performances[bmIndex].asOfDate.val;
var thisName = (0, _utils.getBmrkNameById)(benchMrkList, benchMrkId);
var avgAnnualValueFields = ['oneYrBMC', 'threeYrBMC', 'fiveYrBMC', 'tenYrBMC'];
var dataFields = (0, _utils.getDetailItems)(avgAnnualValueFields, avgAnnual);
var backtested = _backtestedDataAnnual(dataFields, thisName, asOfDate);
aggPerfs.push(backtested);
var yearsArray = ['oneYr', 'threeYr', 'fiveYr', 'tenYr'];
var graphPoints = (0, _utils.getChartDataForArrayKeys)(backtested, yearsArray);
graphData.push(graphPoints);
} catch (e) {
logger.info('No Benchmark data');
}
}
}
var calDataObj = {
rows: aggPerfs
};
var dataObj = {
tableData: calDataObj,
graphData: graphData
};
return dataObj;
}
});
define('components/products/performance/ft-backtested-performance-calendar/lib/etf/backtested-performance-calendar.reducer',['exports', '../../../../common/util/utils', '../../../../lib/decorators/config-decorator', 'lodash/get', 'aurelia-framework'], function (exports, _utils, _configDecorator, _get, _aureliaFramework) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.backtestedPerformanceCalendar = backtestedPerformanceCalendar;
var _get2 = _interopRequireDefault(_get);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var logger = _aureliaFramework.LogManager.getLogger('backtested-calendar');
var perfType = 'backtested-calendar';
function backtestedPerformanceCalendar(state, action) {
var stateOBJ = void 0;
stateOBJ = state;
if (action.type === 'POPULATE_BACKTESTED_PERFORMANCE_CALENDAR_SUCCESS') {
var _action$json = action.json,
performance = _action$json[0],
fundDetails = _action$json[1],
rawConfig = _action$json[2];
var decoratingConfig = (0, _configDecorator.configDecorator)(rawConfig, action.segment);
var benchmarkOrder = (0, _get2.default)(decoratingConfig, 'performance.investmentVehicles.ETF.benchmarkOrder', []);
var etfBenchmarkOrder = benchmarkOrder;
var benchMrkList = (0, _get2.default)(fundDetails, 'globalProductsValue.fundDetailIntl.benchMrkList');
var PI = (0, _get2.default)(performance, 'globalProductsValue.performanceIntl');
var PB = (0, _get2.default)(PI, 'perfBackTestedDetailsList');
var tableHeaders = typeof PB !== 'undefined' && PB.length > 0 ? _performanceCalendarHeaders(PB) : null;
var performances = typeof PB !== 'undefined' && PB.length > 0 ? _performanceBuilder(PB, tableHeaders, benchMrkList, etfBenchmarkOrder) : null;
if (!performances) {
stateOBJ = (0, _utils.getErrorObject)(state, perfType);
return stateOBJ;
}
stateOBJ = Object.assign({}, state, {
backtestedPerformanceCalendar: {
tableHeaders: tableHeaders,
performances: performances,
benchmarkOrder: etfBenchmarkOrder,
benchMrkList: benchMrkList
}
});
}
return stateOBJ;
}
function _backtestedDataCalendar(dataFields, thisName, asOfDate) {
if (!dataFields || !thisName || !asOfDate) {
return;
}
var backtested = {
asOfDate: asOfDate,
name: thisName,
oneYr: dataFields.oneYrBMC,
twoYr: dataFields.twoYrBMC,
threeYr: dataFields.threeYrBMC,
fourYr: dataFields.fourYrBMC,
fiveYr: dataFields.fiveYrBMC,
sixYr: dataFields.sixYrBMC,
sevenYr: dataFields.sevenYrBMC,
eightYr: dataFields.eightYrBMC,
nineYr: dataFields.nineYrBMC,
tenYr: dataFields.tenYrBMC
};
return backtested;
}
function _performanceBuilder(performances, tableHeaders, benchMrkList) {
var etfBenchmarkOrder = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
var aggPerfs = [];
var graphData = [];
var yearAry = tableHeaders;
if (etfBenchmarkOrder !== null) {
for (var _iterator = etfBenchmarkOrder, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var benchMrkListCounter = _ref;
var benchMrkId = (0, _utils.getBmIdByLbs)(benchMrkList, benchMrkListCounter);
var bmIndex = (0, _utils.findIndexByBbmkId)(performances, benchMrkId);
try {
var calDetail = (0, _get2.default)(performances[bmIndex], 'calendarDetail');
var asOfDate = performances[bmIndex].asOfDate.val;
var thisName = (0, _utils.getBmrkNameById)(benchMrkList, benchMrkId);
var calDetailValueFields = ['oneYrBMC', 'twoYrBMC', 'threeYrBMC', 'fourYrBMC', 'fiveYrBMC', 'sixYrBMC', 'sevenYrBMC', 'eightYrBMC', 'nineYrBMC', 'tenYrBMC'];
var dataFields = (0, _utils.getDetailItems)(calDetailValueFields, calDetail);
var backtested = _backtestedDataCalendar(dataFields, thisName, asOfDate);
aggPerfs.push(backtested);
var yearsArray = ['oneYr', 'twoYr', 'threeYr', 'fourYr', 'fiveYr', 'sixYr', 'sevenYr', 'eightYr', 'nineYr', 'tenYr'];
var graphPoints = (0, _utils.getChartDataForArrayKeys)(backtested, yearsArray);
graphData.push(graphPoints);
} catch (e) {
logger.info('No Benchmark data');
}
}
}
var calDataObj = {
years: yearAry,
rows: aggPerfs
};
var dataObj = {
tableData: calDataObj,
graphData: graphData
};
return dataObj;
}
function _performanceCalendarHeaders(action) {
if (typeof action === 'undefined') {
return;
}
var thisCalDetail = action[0];
var calHeaderItems = ['perf1Yr', 'perf2Yr', 'perf3Yr', 'perf4Yr', 'perf5Yr', 'perf6Yr', 'perf7Yr', 'perf8Yr', 'perf9Yr', 'perf10Yr'];
return calHeaderItems.map(function (item) {
return thisCalDetail[item].hasOwnProperty('val') ? thisCalDetail[item].val : null;
});
}
});
define('components/products/performance/ft-backtested-performance-cumulative/lib/etf/backtested-performance-cumulative.reducer',['exports', 'lodash/get', '../../../../common/util/utils', 'moment', '../../../../lib/decorators/config-decorator', 'aurelia-framework'], function (exports, _get, _utils, _moment, _configDecorator, _aureliaFramework) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.backtestedPerformanceCumulative = backtestedPerformanceCumulative;
var _get2 = _interopRequireDefault(_get);
var _moment2 = _interopRequireDefault(_moment);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var logger = _aureliaFramework.LogManager.getLogger('backtested-cumulative');
var perfType = 'backtested-cumulative';
function backtestedPerformanceCumulative(state, action) {
var stateOBJ = state;
if (action.type === 'POPULATE_BACKTESTED_PERFORMANCE_CUMULATIVE_SUCCESS') {
var _action$json = action.json,
rawPerformance = _action$json[0],
rawFundDetails = _action$json[1],
rawConfig = _action$json[2];
var decoratingConfig = (0, _configDecorator.configDecorator)(rawConfig, action.segment);
var benchmarkOrder = (0, _get2.default)(decoratingConfig, 'performance.investmentVehicles.ETF.benchmarkOrder', []);
var etfBenchmarkOrder = benchmarkOrder;
if (rawPerformance === undefined || rawPerformance.globalProductsValue === undefined || rawFundDetails === undefined || etfBenchmarkOrder === undefined) {
return (0, _utils.getErrorObject)(state, perfType);
}
var fundDetailsOBJ = (0, _get2.default)(rawFundDetails, 'globalProductsValue.fundDetailIntl');
var benchMrkList = typeof fundDetailsOBJ !== 'undefined' ? fundDetailsOBJ.benchMrkList : null;
var PI = (0, _get2.default)(rawPerformance, 'globalProductsValue.performanceIntl');
var PB = (0, _get2.default)(PI, 'perfBackTestedDetailsList');
var performances = typeof PB !== 'undefined' ? _performanceBuilder(PB, benchMrkList, etfBenchmarkOrder) : null;
if (performances !== null && performances.tableData.rows.length === 0) {
return (0, _utils.getErrorObject)(state, perfType);
}
var baseFundDetails = _getBaseFundDetails(fundDetailsOBJ);
var years = _checkYears(performances);
var dates = _getFirstAndLastDate(performances, years);
stateOBJ = Object.assign({}, state, {
backtestedPerformanceCumulative: {
performances: performances,
baseFundDetails: baseFundDetails,
dates: dates,
benchmarkOrder: etfBenchmarkOrder,
benchMrkList: benchMrkList
}
});
}
if (action.type === 'POPULATE_BACKTESTED_PERFORMANCE_BM_CUMULATIVE_SUCCESS') {
var _action$json2 = action.json,
performanceGraphBm = _action$json2[0];
if (performanceGraphBm === undefined || performanceGraphBm.globalProductsValue === undefined) {
return (0, _utils.getErrorObject)(state, perfType);
}
stateOBJ = Object.assign({}, state, {
backtestedPerformanceCumulative: {
fundData: action.fundData,
bm1Data: performanceGraphBm,
bmDataRead: true
}
});
}
if (action.type === 'POPULATE_BACKTESTED_PERFORMANCE_BM2_CUMULATIVE_SUCCESS') {
var _action$json3 = action.json,
_performanceGraphBm = _action$json3[0];
var performanceGraphBm2 = action.bm1Data;
if (performanceGraphBm2 === undefined || performanceGraphBm2.globalProductsValue === undefined) {
return (0, _utils.getErrorObject)(state, perfType);
}
var _etfBenchmarkOrder = action.fundData.benchmarkOrder;
var _benchMrkList = action.fundData.benchMrkList;
var PG = [];
PG[0] = (0, _get2.default)(_performanceGraphBm, 'globalProductsValue.perfHistoryGraphs');
PG[1] = (0, _get2.default)(performanceGraphBm2, 'globalProductsValue.perfHistoryGraphs');
var performanceGraphs = PG.length > 0 ? _processPerformanceChartData(PG, 3, _etfBenchmarkOrder, _benchMrkList) : null;
var performanceGraphNames = PG.length > 0 ? _getSeriesNames(PG, _etfBenchmarkOrder, _benchMrkList) : null;
stateOBJ = Object.assign({}, state, {
backtestedPerformanceCumulative: {
performances: action.fundData.performances,
graphNames: performanceGraphNames,
graphData: performanceGraphs,
baseFundDetails: action.fundData.baseFundDetails,
dates: action.fundData.dates,
benchmarkOrder: action.fundData.benchmarkOrder,
bmDataRead: true
}
});
}
if (action.type === 'POPULATE_BACKTESTED_PERFORMANCE_CUMULATIVE_ERROR' || action.type === 'POPULATE_BACKTESTED_PERFORMANCE_BM_CUMULATIVE_ERROR' || action.type === 'POPULATE_BACKTESTED_PERFORMANCE_BM2_CUMULATIVE_ERROR') {
return (0, _utils.getErrorObject)(state, perfType);
}
return stateOBJ;
}
function _backtestedDataCumulative(theseItems, thisName, asOfDate, asOfDateStd) {
if (!theseItems || !thisName || !asOfDate) {
return;
}
var backtested = {
name: thisName,
asOfDate: asOfDate,
asOfDateStd: asOfDateStd,
ytd: theseItems.ytdBMC,
oneMth: theseItems.oneMthBMC,
threeMth: theseItems.threeMthBMC,
sixMth: theseItems.sixMthBMC,
oneYr: theseItems.oneYrBMC,
threeYr: theseItems.threeYrBMC,
fiveYr: theseItems.fiveYrBMC,
sevenYr: theseItems.sevenYrBMC,
tenYr: theseItems.tenYrBMC,
SI: theseItems.sinceIncpBMC
};
return backtested;
}
function _performanceBuilder(performances, benchMrkList) {
var etfBenchmarkOrder = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
var aggPerfs = [];
if (etfBenchmarkOrder !== null) {
for (var _iterator = etfBenchmarkOrder, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var benchMrkListCounter = _ref;
var benchMrkId = (0, _utils.getBmIdByLbs)(benchMrkList, benchMrkListCounter);
var bmIndex = (0, _utils.findIndexByBbmkId)(performances, benchMrkId);
try {
var calDetail = (0, _get2.default)(performances[bmIndex], 'cumulativeDetail');
var asOfDate = (0, _get2.default)(performances[bmIndex], 'asOfDate.val');
var asOfDateStd = performances[bmIndex].asOfDateStd.val;
var thisName = (0, _utils.getBmrkNameById)(benchMrkList, benchMrkId);
var calDetailValueFields = ['ytdBMC', 'oneMthBMC', 'threeMthBMC', 'sixMthBMC', 'oneYrBMC', 'threeYrBMC', 'fiveYrBMC', 'sevenYrBMC', 'tenYrBMC', 'sinceIncpBMC'];
var dataFields = (0, _utils.getDetailItems)(calDetailValueFields, calDetail);
var backtested = _backtestedDataCumulative(dataFields, thisName, asOfDate, asOfDateStd);
aggPerfs.push(backtested);
} catch (e) {
logger.info('No Benchmark data');
}
}
}
var calDataObj = {
rows: aggPerfs
};
return {
tableData: calDataObj
};
}
function _checkDataEmpty(data, bmIndex) {
var graphIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 4;
var bmDataObj = [];
for (var i = graphIndex; i >= 0; i--) {
bmDataObj = data[bmIndex].monthlyGraphs[i].bmData;
if (bmDataObj.length > 0) {
return bmDataObj;
}
}
}
function _processPerformanceChartData(data) {
var graphIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 4;
var etfBenchmarkOrder = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
var benchMrkList = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
var graphData = [];
var bmData = void 0;
var bmDataObj = [];
var counter = 0;
if (etfBenchmarkOrder !== null) {
for (var _iterator2 = etfBenchmarkOrder, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
var _ref2;
if (_isArray2) {
if (_i2 >= _iterator2.length) break;
_ref2 = _iterator2[_i2++];
} else {
_i2 = _iterator2.next();
if (_i2.done) break;
_ref2 = _i2.value;
}
var bmCounter = _ref2;
var benchMrkId = (0, _utils.getBmIdByLbs)(benchMrkList, bmCounter);
var bmIndex = (0, _utils.findIndexByBbmkId)(data, benchMrkId, 'bmId.val');
if (Object.keys(data).length > 0 && counter < 2) {
bmDataObj = _checkDataEmpty(data, bmIndex, graphIndex);
bmData = bmDataObj.map(function (detail) {
return [_moment2.default.utc(detail.chartKey.val, 'MM/YY').valueOf(), _get10KChartValue(detail.chartValue.val)];
}).sort(function (a, b) {
return a[0] - b[0];
});
graphData.push(bmData);
}
counter++;
}
}
return graphData;
}
function _get10KChartValue(val) {
return parseFloat(val) * 100;
}
function _getSeriesNames(data, etfBenchmarkOrder, benchMrkList) {
var seriesNames = [];
var bmName = void 0;
var counter = 0;
if (Object.keys(data).length > 0 && etfBenchmarkOrder !== null) {
for (var _iterator3 = etfBenchmarkOrder, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
var _ref3;
if (_isArray3) {
if (_i3 >= _iterator3.length) break;
_ref3 = _iterator3[_i3++];
} else {
_i3 = _iterator3.next();
if (_i3.done) break;
_ref3 = _i3.value;
}
var bmCounter = _ref3;
if (Object.keys(data).length > 0 && counter < 2) {
var benchMrkId = (0, _utils.getBmIdByLbs)(benchMrkList, bmCounter);
var bmIndex = (0, _utils.findIndexByBbmkId)(data, benchMrkId, 'bmId.val');
bmName = data[bmIndex].bmName.val;
seriesNames.push(bmName);
}
counter++;
}
}
return seriesNames;
}
function _getBaseFundDetails(fundDetails) {
if (!fundDetails) {
return;
}
var baseFundDetails = {
fundName: fundDetails.fundName,
fundCatgry: fundDetails.fundCatgry,
fundBaseCur: fundDetails.fundBaseCur
};
return baseFundDetails;
}
function _getFirstAndLastDate(performances) {
var yearsOff = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10;
if (!performances) {
return;
}
var firstDate = void 0;
var lastDate = void 0;
if (typeof performances.tableData.rows !== 'undefined' && performances.tableData.rows.length > 0) {
var asOfDate = (0, _moment2.default)(performances.tableData.rows[0].asOfDateStd, 'YYYY-MM-DD').valueOf();
var asOfDateTenYearsBefore = (0, _moment2.default)(asOfDate).subtract(yearsOff, 'years').add(4, 'day');
var firstDayAsOfDate = (0, _moment2.default)(asOfDateTenYearsBefore).startOf('month').valueOf();
firstDate = (0, _moment2.default)(firstDayAsOfDate).format('LL');
lastDate = (0, _moment2.default)(asOfDate).format('LL');
}
var dates = [firstDate, lastDate];
return dates;
}
function _checkYears(performances) {
var providedYears = 10;
if (performances.tableData.rows[0].tenYr !== null) {
providedYears = 10;
} else if (performances.tableData.rows[0].fiveYr !== null) {
providedYears = 5;
} else if (performances.tableData.rows[0].threeYr !== null) {
providedYears = 3;
} else if (performances.tableData.rows[0].oneYr !== null) {
providedYears = 1;
}
return providedYears;
}
});
define('components/products/performance/ft-calendar-year-returns/lib/etf/calendar-year-returns.reducer',['exports', 'lodash/get', 'lodash/find', 'moment', 'moment-parseformat', 'aurelia-framework', '../calendar-utils', '../../../util/util', '../../../../lib/decorators/config-decorator', '../../../../common/util/utils-fund-details', '../../../../common/util/utils-config'], function (exports, _get, _find, _moment, _momentParseformat, _aureliaFramework, _calendarUtils, _util, _configDecorator, _utilsFundDetails, _utilsConfig) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.calendarYearReturns = calendarYearReturns;
var _get2 = _interopRequireDefault(_get);
var _find2 = _interopRequireDefault(_find);
var _moment2 = _interopRequireDefault(_moment);
var _momentParseformat2 = _interopRequireDefault(_momentParseformat);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var logger = _aureliaFramework.LogManager.getLogger('calendar-year-returns');
function calendarYearReturns(state, action) {
var stateOBJ = void 0;
if (action.type === 'POPULATE_CALENDAR_YEAR_RETURNS_SUCCESS') {
logger.debug('Reducing: POPULATE_CALENDAR_YEAR_RETURNS_SUCCESS', action);
var _action$json = action.json,
rawPerformance = _action$json[0],
rawConfig = _action$json[1],
rawFundDetails = _action$json[2];
var config = (0, _configDecorator.configDecorator)(rawConfig, action.segment);
var useDynamicLabels = !!(0, _get2.default)(config, 'performance.dynamicLabels');
var showYTD = !(0, _get2.default)(config, 'performance.hideYTDForCumulativeAndCalendarYear', true);
var fundDetails = (0, _get2.default)(rawFundDetails, 'globalProductsValue.fundDetailIntl');
var performance = (0, _get2.default)(rawPerformance, 'globalProductsValue.performanceIntl');
var shareClasses = (0, _get2.default)(fundDetails, 'shClsDet');
var currentClass = _utilsFundDetails.utilsFundDetails.getCurrentShareClass(action.shareClassKey, shareClasses);
var shareClassCode = (0, _get2.default)(currentClass, 'shCls.val') || (0, _get2.default)(fundDetails, 'shClassCode.val');
var fundId = (0, _get2.default)(fundDetails, 'fundId.val');
var fundName = (0, _get2.default)(fundDetails, 'fundName.val');
var allShareClassDetails = (0, _get2.default)(rawFundDetails, 'globalProductsValue.fundDetailIntl.shClsDet');
var benchMarks = _utilsFundDetails.utilsFundDetails.benchmarkByKey(fundDetails, fundId, shareClassCode);
var sortedBenchmarkOrder = _util.performanceUtils.getSortedBenchmarkOrder(benchMarks, fundDetails, fundId, shareClassCode, config);
var monthlyData = (0, _get2.default)(performance, 'monthlyPerfDetailsList');
var quarterlyData = (0, _get2.default)(performance, 'quarterlyPerfDetailsList');
var peersRankList = (0, _get2.default)(performance, 'peerRnksList');
var peerRnksListQtly = (0, _get2.default)(performance, 'peerRnksListQtly');
var thisMonthlyCalendar = void 0;
var thisQuarterlyCalendar = void 0;
var monthEnd = void 0;
var quarterEnd = void 0;
logger.debug('shareClassCodeshareClassCode', shareClassCode);
if (typeof monthlyData !== 'undefined') {
thisMonthlyCalendar = _getThisCalendar(monthlyData, peersRankList, shareClassCode, allShareClassDetails, benchMarks, sortedBenchmarkOrder, config, fundId, fundName);
}
if (typeof quarterlyData !== 'undefined') {
thisQuarterlyCalendar = _getThisCalendar(quarterlyData, peerRnksListQtly, shareClassCode, allShareClassDetails, benchMarks, sortedBenchmarkOrder, config, fundId, fundName);
}
if (typeof thisMonthlyCalendar !== 'undefined') {
monthEnd = {
calData: thisMonthlyCalendar.tableData,
chartData: thisMonthlyCalendar.graphData,
dateGroup: 'month-end',
dynamicLabel: thisMonthlyCalendar.dynamicLabel,
hideChart: thisMonthlyCalendar.hideChart,
showData: thisMonthlyCalendar.showData,
fundName: thisMonthlyCalendar.fundName
};
}
if (typeof thisQuarterlyCalendar !== 'undefined') {
quarterEnd = {
calData: thisQuarterlyCalendar.tableData,
chartData: thisQuarterlyCalendar.graphData,
dateGroup: 'quarter-end',
dynamicLabel: thisQuarterlyCalendar.dynamicLabel,
hideChart: thisQuarterlyCalendar.hideChart,
showData: thisQuarterlyCalendar.showData,
fundName: thisQuarterlyCalendar.fundName
};
}
var siteVehicle = _utilsFundDetails.utilsFundDetails.getSiteVehicle(rawFundDetails);
var showFundNumber = !_utilsConfig.utilsConfig.isValueInConfigKey(config, 'performance.hideFundNumber', siteVehicle);
var showCurrency = !_utilsConfig.utilsConfig.isValueInConfigKey(config, 'performance.hideCurrency', siteVehicle);
stateOBJ = Object.assign({}, state, {
calendarYearReturns: {
MONTH_END: monthEnd,
QUARTER_END: quarterEnd,
options: {
showFundNumber: showFundNumber,
showCurrency: showCurrency,
useDynamicLabels: useDynamicLabels,
showYTD: showYTD
}
}
});
} else {
stateOBJ = state;
}
return stateOBJ;
}
function _getThisCalendar(performances, peersRankList, shareClassCode, allShareClassDetails, benchMarks, sortedBenchmarkOrder, config, fundId, fundName) {
var thisPerformanceObj = (0, _find2.default)(performances, { shClsCde: { val: shareClassCode } });
var asOfDate = (0, _get2.default)(thisPerformanceObj, 'asOfDate.val');
var inceptionDate = (0, _get2.default)(thisPerformanceObj, 'fundIncDt.val');
var inceptionDateLoc = (0, _get2.default)(thisPerformanceObj, 'fundIncDtLoc.val');
var perfIncDt = (0, _get2.default)(thisPerformanceObj, 'perfIncDt.val');
var rows = [];
var mdash = '&#8212;';
var showMDash = _util.performanceUtils.mustHidePerformanceData(config, inceptionDate);
var dynamicLabel = _util.performanceUtils.dynamicPerformanceLabels(asOfDate, perfIncDt);
var hideChart = _util.performanceUtils.hideChart(config, fundId, 'hideCalendarYearChartFundList', showMDash, perfIncDt);
var asOfFormat = (0, _momentParseformat2.default)(asOfDate);
var lastYear = (0, _moment2.default)(asOfDate, asOfFormat).get('year');
var calendarYears = _calendarUtils.calendarUtils.calendarYears(lastYear, true);
var yearAry = calendarYears.yearAry;
if (thisPerformanceObj) {
rows.push(_calendarUtils.calendarUtils.getSHTableRow(thisPerformanceObj, showMDash, mdash, allShareClassDetails, fundName));
}
sortedBenchmarkOrder.forEach(function (item) {
var bm = (0, _find2.default)(performances, { bmrkID: { val: (0, _get2.default)(benchMarks, item + '.bmrkId.val') } });
if (bm) {
bm.bmcName.val = (0, _get2.default)(benchMarks, item + '.bmrkName.val');
rows.push(_calendarUtils.calendarUtils.getBMTableRow(bm, false, mdash));
}
});
var chartColumns = calendarYears.chartColumns;
var graphData = _util.performanceUtils.tableDataToChartData(rows, chartColumns);
var showData = true;
if (rows.length === 0) {
showData = false;
}
if (!thisPerformanceObj) {
showData = false;
}
if (thisPerformanceObj && !(0, _get2.default)(thisPerformanceObj, 'cumulativeDetail.sinceIncp.val')) {
showData = false;
}
return {
tableData: {
years: yearAry,
asOfDate: asOfDate,
rows: rows
},
inceptionDate: inceptionDateLoc,
graphData: graphData,
dynamicLabel: dynamicLabel,
hideChart: hideChart,
fundName: fundName,
showData: showData
};
}
});
define('components/products/performance/ft-discrete-returns/lib/etf/discrete-returns.reducer',['exports', 'lodash/get', 'lodash/take', 'lodash/find', '../discrete-returns-utils', '../../../util/util', '../../../../common/util/utils-config', '../../../../lib/decorators/config-decorator', '../../../../common/util/utils-fund-details', 'aurelia-framework'], function (exports, _get, _take, _find, _discreteReturnsUtils, _util, _utilsConfig, _configDecorator, _utilsFundDetails, _aureliaFramework) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.discreteReturns = discreteReturns;
var _get2 = _interopRequireDefault(_get);
var _take2 = _interopRequireDefault(_take);
var _find2 = _interopRequireDefault(_find);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var logger = _aureliaFramework.LogManager.getLogger('discrete-returns');
function discreteReturns(state, action) {
var stateOBJ = void 0;
if (action.type === 'POPULATE_DISCRETE_RETURNS_SUCCESS') {
logger.debug('Reducing: POPULATE_DISCRETE_RETURNS_SUCCESS');
var _action$json = action.json,
rawPerformanceFeed = _action$json[0],
rawConfig = _action$json[1],
rawFundDetails = _action$json[2],
compConfig = _action$json[3];
var config = (0, _configDecorator.configDecorator)(rawConfig, action.segment);
var useDynamicLabels = !!(0, _get2.default)(config, 'performance.dynamicLabels');
var fundVehicle = _utilsFundDetails.utilsFundDetails.getSiteVehicle(rawFundDetails);
var showFundNumber = !_utilsConfig.utilsConfig.isValueInConfigKey(config, 'performance.hideFundNumber', fundVehicle);
var showCurrency = !_utilsConfig.utilsConfig.isValueInConfigKey(config, 'performance.hideCurrency', fundVehicle);
var fundDetails = (0, _get2.default)(rawFundDetails, 'globalProductsValue.fundDetailIntl');
var performance = (0, _get2.default)(rawPerformanceFeed, 'globalProductsValue.performanceIntl');
var shareClasses = (0, _get2.default)(fundDetails, 'shClsDet');
var currentClass = _utilsFundDetails.utilsFundDetails.getCurrentShareClass(action.shareClassKey, shareClasses);
var shareClassCode = (0, _get2.default)(currentClass, 'shCls.val') || (0, _get2.default)(fundDetails, 'shClassCode.val');
var fundId = (0, _get2.default)(fundDetails, 'fundId.val');
var fundName = (0, _get2.default)(fundDetails, 'fundName.val');
var benchMarks = _utilsFundDetails.utilsFundDetails.benchmarkByKey(fundDetails, fundId, shareClassCode);
var sortedBenchmarkOrder = _util.performanceUtils.getSortedBenchmarkOrder(benchMarks, fundDetails, fundId, shareClassCode, config);
var hideDiscreteBMOlderThanMainClass = (0, _get2.default)(compConfig, 'SuppressOldBenchmarkData.0', '') === 'YES';
var monthlyData = (0, _get2.default)(performance, 'monthlyPerfDetailsList');
var quarterlyData = (0, _get2.default)(performance, 'quarterlyPerfDetailsList');
var peersRankList = (0, _get2.default)(performance, 'peerRnksList');
var peerRnksListQtly = (0, _get2.default)(performance, 'peerRnksListQtly');
var allShareClassDetails = (0, _get2.default)(rawFundDetails, 'globalProductsValue.fundDetailIntl.shClsDet');
var thisMonthlyDiscrete = void 0;
var thisQuarterlyDiscrete = void 0;
var monthEnd = void 0;
var quarterEnd = void 0;
if (typeof monthlyData !== 'undefined') {
thisMonthlyDiscrete = _getThisDiscrete(monthlyData, peersRankList, shareClassCode, allShareClassDetails, benchMarks, sortedBenchmarkOrder, config, fundId, fundName, hideDiscreteBMOlderThanMainClass);
}
if (typeof quarterlyData !== 'undefined') {
thisQuarterlyDiscrete = _getThisDiscrete(quarterlyData, peerRnksListQtly, shareClassCode, allShareClassDetails, benchMarks, sortedBenchmarkOrder, config, fundId, fundName, hideDiscreteBMOlderThanMainClass);
}
if (typeof thisMonthlyDiscrete !== 'undefined') {
monthEnd = {
tableData: thisMonthlyDiscrete.tableData,
chartData: thisMonthlyDiscrete.graphData,
fundName: thisMonthlyDiscrete.fundName,
dynamicLabel: thisMonthlyDiscrete.dynamicLabel,
dateGroup: 'month-end',
hideChart: thisMonthlyDiscrete.hideChart,
showData: thisMonthlyDiscrete.showData
};
}
if (typeof thisQuarterlyDiscrete !== 'undefined') {
quarterEnd = {
tableData: thisQuarterlyDiscrete.tableData,
chartData: thisQuarterlyDiscrete.graphData,
dynamicLabel: thisQuarterlyDiscrete.dynamicLabel,
fundName: thisQuarterlyDiscrete.fundName,
dateGroup: 'quarter-end',
hideChart: thisQuarterlyDiscrete.hideChart,
showData: thisQuarterlyDiscrete.showData
};
}
stateOBJ = Object.assign({}, state, {
discreteReturns: {
MONTH_END: monthEnd,
QUARTER_END: quarterEnd,
options: {
showFundNumber: showFundNumber,
showCurrency: showCurrency,
useDynamicLabels: useDynamicLabels
}
}
});
} else {
stateOBJ = state;
}
return stateOBJ;
}
function _getThisDiscrete(performances, peersRankList, shareClassCode, allShareClassDetails, benchMarks, sortedBenchmarkOrder, config, fundId, fundName, hideDiscreteBMOlderThanMainClass) {
var thisPerformanceObj = (0, _find2.default)(performances, { shClsCde: { val: shareClassCode } });
var asOfDate = (0, _get2.default)(thisPerformanceObj, 'asOfDate.val');
var shareClassDetails = (0, _find2.default)(allShareClassDetails, { shCls: { val: shareClassCode } });
var inceptionDate = (0, _get2.default)(shareClassDetails, 'perfIncpDt.val');
var inceptionDateLoc = (0, _get2.default)(shareClassDetails, 'perfIncDtLcl.val');
var perfIncDt = (0, _get2.default)(thisPerformanceObj, 'perfIncDt.val');
var allYears = _discreteReturnsUtils.discreteUtils.countYears(asOfDate, inceptionDate, true);
var yearsSinceStartDate = _discreteReturnsUtils.discreteUtils.countYearsChart(asOfDate, inceptionDate, true);
var mdash = '&#8212;';
var showMDash = _util.performanceUtils.mustHidePerformanceData(config, inceptionDate);
var hideChart = _util.performanceUtils.hideChart(config, fundId, 'hideDiscreteAnnualChartFundList', showMDash, perfIncDt);
var chartColumns = ['oneYr', 'twoYr', 'threeYr', 'fourYr', 'fiveYr'];
var dynamicLabel = _util.performanceUtils.dynamicPerformanceLabels(asOfDate, perfIncDt);
var rows = [];
var hasIAorBm = false;
if (thisPerformanceObj) {
rows.push(_discreteReturnsUtils.discreteUtils.getSHTableRow(thisPerformanceObj, showMDash, mdash, allShareClassDetails, fundName));
}
sortedBenchmarkOrder.forEach(function (item) {
var bm = (0, _find2.default)(performances, { bmrkID: { val: (0, _get2.default)(benchMarks, item + '.bmrkId.val') } });
if (bm) {
bm.bmcName.val = (0, _get2.default)(benchMarks, item + '.bmrkName.val');
rows.push(_discreteReturnsUtils.discreteUtils.getBMTableRow(bm, false, mdash, yearsSinceStartDate.length, hideDiscreteBMOlderThanMainClass));
}
hasIAorBm = true;
});
var chartCols = [];
var graphData = [];
if (!hideChart) {
if (hasIAorBm) {
chartCols = allYears;
} else {
chartCols = yearsSinceStartDate;
}
graphData = _util.performanceUtils.tableDataToChartData(rows, chartColumns);
if (chartCols.length < 5) {
graphData = graphData.map(function (row) {
return (0, _take2.default)(row, chartCols.length);
});
}
}
var showData = true;
if (rows.length === 0) {
showData = false;
}
if (!thisPerformanceObj) {
showData = false;
}
if (thisPerformanceObj && !(0, _get2.default)(thisPerformanceObj, 'discreteDetail.oneYr.val')) {
showData = false;
}
return {
tableData: {
asOfDate: asOfDate,
rows: rows,
years: allYears,
chartCols: chartCols
},
graphData: graphData,
inceptionDate: inceptionDateLoc,
dynamicLabel: dynamicLabel,
hideChart: hideChart,
fundName: fundName,
showData: showData
};
}
});
define('components/products/performance/ft-performance-annualised/lib/etf/performance-annualised.reducer',['exports', 'aurelia-framework', '../../../../lib/decorators/config-decorator', '../../../util/util', '../../../../common/util/utils-fund-details', '../../../../common/util/utils-config', '../performance-annualised-utils', 'lodash/get', 'lodash/find'], function (exports, _aureliaFramework, _configDecorator, _util, _utilsFundDetails, _utilsConfig, _performanceAnnualisedUtils, _get, _find) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.performanceAnnualised = performanceAnnualised;
var _get2 = _interopRequireDefault(_get);
var _find2 = _interopRequireDefault(_find);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var logger = _aureliaFramework.LogManager.getLogger('performance-annualised');
function performanceAnnualised(state, action) {
var stateOBJ = void 0;
stateOBJ = state;
if (action.type === 'POPULATE_PERFORMANCE_ANNUALISED_SUCCESS') {
logger.debug('Reducing: POPULATE_PERFORMANCE_ANNUALISED_SUCCESS', action);
var _action$json = action.json,
rawPerformance = _action$json[0],
rawConfig = _action$json[1],
rawFundDetails = _action$json[2];
var fundDetails = (0, _get2.default)(rawFundDetails, 'globalProductsValue.fundDetailIntl');
var performance = (0, _get2.default)(rawPerformance, 'globalProductsValue.performanceIntl');
var shareClasses = (0, _get2.default)(fundDetails, 'shClsDet');
var fundId = (0, _get2.default)(fundDetails, 'fundId.val');
var fundName = (0, _get2.default)(fundDetails, 'fundName.val');
var currentClass = _utilsFundDetails.utilsFundDetails.getCurrentShareClass(action.shareClassKey, shareClasses);
var shareClassCode = (0, _get2.default)(currentClass, 'shCls.val') || (0, _get2.default)(fundDetails, 'shClassCode.val');
var allShareClassDetails = (0, _get2.default)(rawFundDetails, 'globalProductsValue.fundDetailIntl.shClsDet');
var config = (0, _configDecorator.configDecorator)(rawConfig, action.segment);
var useDynamicLabels = !!(0, _get2.default)(config, 'performance.dynamicLabels');
var fundKey = action.fundId + '-' + shareClassCode;
var benchMarks = _utilsFundDetails.utilsFundDetails.benchmarkByKey(fundDetails, fundId, shareClassCode);
var sortedBenchmarkOrder = _util.performanceUtils.getSortedBenchmarkOrder(benchMarks, fundDetails, fundId, shareClassCode, config);
var monthlyData = (0, _get2.default)(performance, 'monthlyPerfDetailsList');
var quarterlyData = (0, _get2.default)(performance, 'quarterlyPerfDetailsList');
var thisMonthlyTable = void 0;
var thisQuarterlyTable = void 0;
if (typeof monthlyData !== 'undefined') {
thisMonthlyTable = _performanceBuilder(monthlyData, config, shareClassCode, benchMarks, sortedBenchmarkOrder, fundKey, allShareClassDetails, fundId, fundName);
}
if (typeof quarterlyData !== 'undefined') {
thisQuarterlyTable = _performanceBuilder(monthlyData, config, shareClassCode, benchMarks, sortedBenchmarkOrder, fundKey, allShareClassDetails, fundId, fundName);
}
var siteVehicle = _utilsFundDetails.utilsFundDetails.getSiteVehicle(rawFundDetails);
var showFundNumber = !_utilsConfig.utilsConfig.isValueInConfigKey(config, 'performance.hideFundNumber', siteVehicle);
var showCurrency = !_utilsConfig.utilsConfig.isValueInConfigKey(config, 'performance.hideCurrency', siteVehicle);
stateOBJ = Object.assign({}, state, {
performanceAnnualised: {
MONTH_END: {
performances: thisMonthlyTable,
label: 'month-end'
},
QUARTER_END: {
performances: thisQuarterlyTable,
label: 'quarter-end'
},
options: {
showFundNumber: showFundNumber,
showCurrency: showCurrency,
useDynamicLabels: useDynamicLabels
}
}
});
}
return stateOBJ;
}
function _performanceBuilder(performances, config, shareClassCode, benchMarks, sortedBenchmarkOrder, fundKey, allShareClassDetails, fundId, fundName) {
var thisPerformanceObj = (0, _find2.default)(performances, { shClsCde: { val: shareClassCode } });
var asOfDate = (0, _get2.default)(thisPerformanceObj, 'asOfDate.val');
var inceptionDate = (0, _get2.default)(thisPerformanceObj, 'fundIncDt.val');
var perfIncDt = (0, _get2.default)(thisPerformanceObj, 'perfIncDt.val');
var perfIncDtLoc = (0, _get2.default)(thisPerformanceObj, 'perfIncDtLoc.val');
var dynamicLabel = _util.performanceUtils.dynamicPerformanceLabels(asOfDate, perfIncDt);
var mdash = '&#8212;';
var showMDash = _util.performanceUtils.mustHidePerformanceData(config, inceptionDate);
var hideChart = _util.performanceUtils.hideChart(config, fundId, 'hideAverageAnnualChartFundList', showMDash, perfIncDt);
var rows = [];
if (thisPerformanceObj) {
rows.push(_performanceAnnualisedUtils.annualisedUtils.getSHTableRow(thisPerformanceObj, showMDash, mdash, allShareClassDetails, fundName));
}
sortedBenchmarkOrder.forEach(function (item) {
var bm = (0, _find2.default)(performances, { bmrkID: { val: (0, _get2.default)(benchMarks, item + '.bmrkId.val') } });
if (bm) {
bm.bmcName.val = (0, _get2.default)(benchMarks, item + '.bmrkName.val');
rows.push(_performanceAnnualisedUtils.annualisedUtils.getBMTableRow(bm, false, mdash));
}
});
var graphData = void 0;
if (!hideChart) {
if (showMDash || config.performance.hideAverageAnnualChartFundList.includes(fundKey)) {
graphData = null;
} else {
var chartColumns = ['oneY', 'threeY', 'fiveY', 'tenY', 'fiftnY', 'life'];
graphData = _util.performanceUtils.tableDataToChartData(rows, chartColumns);
}
}
var showData = true;
if (rows.length === 0 && allRows.length === 0) {
showData = false;
}
if (!thisPerformanceObj) {
showData = false;
}
if (thisPerformanceObj && !(0, _get2.default)(thisPerformanceObj, 'avgAnnual.sinceIncp.val')) {
showData = false;
}
return {
tableData: {
asOfDate: asOfDate,
rows: rows
},
inceptionDate: perfIncDtLoc,
graphData: graphData,
dynamicLabel: dynamicLabel,
fundName: fundName,
hideChart: hideChart,
showData: showData
};
}
});
define('components/products/performance/ft-performance-cumulative/lib/etf/performance-cumulative.reducer',['exports', 'lodash/get', 'lodash/find', '../../../util/util', '../../../../common/util/utils-fund-details', '../../../../lib/decorators/config-decorator', '../../../../common/util/utils-config', '../performance-cumulative-utils', 'aurelia-framework'], function (exports, _get, _find, _util, _utilsFundDetails, _configDecorator, _utilsConfig, _performanceCumulativeUtils, _aureliaFramework) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.performanceCumulative = performanceCumulative;
var _get2 = _interopRequireDefault(_get);
var _find2 = _interopRequireDefault(_find);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var logger = _aureliaFramework.LogManager.getLogger('performance-cumulative');
function performanceCumulative(state, action, productState) {
var stateOBJ = void 0;
if (action.type === 'POPULATE_PERFORMANCE_CUMULATIVE_SUCCESS') {
logger.debug('Reducing: POPULATE_PERFORMANCE_CUMULATIVE_SUCCESS');
var _action$json = action.json,
rawPerformance = _action$json[0],
performanceGraph = _action$json[1],
rawConfig = _action$json[2],
rawFundDetails = _action$json[3];
var config = (0, _configDecorator.configDecorator)(rawConfig, action.segment);
var useDynamicLabels = !!(0, _get2.default)(config, 'performance.dynamicLabels');
var show1M3M6M = (0, _get2.default)(config, 'performance.showYtd1M3M6M', true);
var showYTD = !(0, _get2.default)(config, 'performance.hideYTDForCumulativeAndCalendarYear', true);
var fundDetails = (0, _get2.default)(rawFundDetails, 'globalProductsValue.fundDetailIntl');
var performance = (0, _get2.default)(rawPerformance, 'globalProductsValue.performanceIntl');
var shareClasses = (0, _get2.default)(fundDetails, 'shClsDet');
var currentClass = _utilsFundDetails.utilsFundDetails.getCurrentShareClass(action.shareClassKey, shareClasses);
var shareClassCode = (0, _get2.default)(currentClass, 'shCls.val') || (0, _get2.default)(fundDetails, 'shClassCode.val');
var fundId = (0, _get2.default)(fundDetails, 'fundId.val');
var fundName = (0, _get2.default)(fundDetails, 'fundName.val');
var allShareClassDetails = (0, _get2.default)(rawFundDetails, 'globalProductsValue.fundDetailIntl.shClsDet');
var benchMarks = _utilsFundDetails.utilsFundDetails.benchmarkByKey(fundDetails, fundId, shareClassCode);
var sortedBenchmarkOrder = _util.performanceUtils.getSortedBenchmarkOrder(benchMarks, fundDetails, fundId, shareClassCode, config);
var monthlyData = (0, _get2.default)(performance, 'monthlyPerfDetailsList');
var quarterlyData = (0, _get2.default)(performance, 'quarterlyPerfDetailsList');
var peersRankList = (0, _get2.default)(performance, 'peerRnksList');
var peerRnksListQtly = (0, _get2.default)(performance, 'peerRnksListQtly');
var thisMonthlyTable = {};
var thisQuarterlyTable = {};
if (typeof monthlyData !== 'undefined') {
thisMonthlyTable = _performanceBuilder(monthlyData, peersRankList, shareClassCode, benchMarks, sortedBenchmarkOrder, config, allShareClassDetails, fundId, fundName);
}
if (typeof quarterlyData !== 'undefined') {
thisQuarterlyTable = _performanceBuilder(quarterlyData, peerRnksListQtly, shareClassCode, benchMarks, sortedBenchmarkOrder, config, allShareClassDetails, fundId, fundName);
}
var siteVehicle = _utilsFundDetails.utilsFundDetails.getSiteVehicle(rawFundDetails);
var showFundNumber = !_utilsConfig.utilsConfig.isValueInConfigKey(config, 'performance.hideFundNumber', siteVehicle);
var showCurrency = !_utilsConfig.utilsConfig.isValueInConfigKey(config, 'performance.hideCurrency', siteVehicle);
stateOBJ = Object.assign({}, state, {
performanceCumulative: {
MONTH_END: {
graphNames: thisMonthlyTable.graphNames,
tableData: thisMonthlyTable.tableData,
inceptionDate: thisMonthlyTable.inceptionDate,
dynamicLabel: thisMonthlyTable.dynamicLabel,
hideChart: thisMonthlyTable.hideChart,
fundName: thisMonthlyTable.fundName,
showData: thisMonthlyTable.showData,
PC_1YR: _performanceCumulativeUtils.cumulativeUtils.processPerformanceChartData(performanceGraph, 0, 'monthlyGraphs', sortedBenchmarkOrder),
PC_3YR: _performanceCumulativeUtils.cumulativeUtils.processPerformanceChartData(performanceGraph, 1, 'monthlyGraphs', sortedBenchmarkOrder),
PC_5YR: _performanceCumulativeUtils.cumulativeUtils.processPerformanceChartData(performanceGraph, 2, 'monthlyGraphs', sortedBenchmarkOrder),
PC_10YR: _performanceCumulativeUtils.cumulativeUtils.processPerformanceChartData(performanceGraph, 3, 'monthlyGraphs', sortedBenchmarkOrder),
PC_15YR: _performanceCumulativeUtils.cumulativeUtils.processPerformanceChartData(performanceGraph, 4, 'monthlyGraphs', sortedBenchmarkOrder),
PC_LIFE: _performanceCumulativeUtils.cumulativeUtils.processPerformanceChartData(performanceGraph, 5, 'monthlyGraphs', sortedBenchmarkOrder)
},
QUARTER_END: {
graphNames: thisQuarterlyTable.graphNames,
tableData: thisQuarterlyTable.tableData,
inceptionDate: thisQuarterlyTable.inceptionDate,
dynamicLabel: thisQuarterlyTable.dynamicLabel,
hideChart: thisQuarterlyTable.hideChart,
fundName: thisQuarterlyTable.fundName,
showData: thisQuarterlyTable.showData,
PC_1YR: _performanceCumulativeUtils.cumulativeUtils.processPerformanceChartData(performanceGraph, 0, 'quarterlyGraphs', sortedBenchmarkOrder),
PC_3YR: _performanceCumulativeUtils.cumulativeUtils.processPerformanceChartData(performanceGraph, 1, 'quarterlyGraphs', sortedBenchmarkOrder),
PC_5YR: _performanceCumulativeUtils.cumulativeUtils.processPerformanceChartData(performanceGraph, 2, 'quarterlyGraphs', sortedBenchmarkOrder),
PC_10YR: _performanceCumulativeUtils.cumulativeUtils.processPerformanceChartData(performanceGraph, 3, 'quarterlyGraphs', sortedBenchmarkOrder),
PC_15YR: _performanceCumulativeUtils.cumulativeUtils.processPerformanceChartData(performanceGraph, 4, 'quarterlyGraphs', sortedBenchmarkOrder),
PC_LIFE: _performanceCumulativeUtils.cumulativeUtils.processPerformanceChartData(performanceGraph, 5, 'quarterlyGraphs', sortedBenchmarkOrder)
},
options: {
showFundNumber: showFundNumber,
showCurrency: showCurrency,
useDynamicLabels: useDynamicLabels,
show1M3M6M: show1M3M6M,
showYTD: showYTD
}
}
});
} else {
stateOBJ = state;
}
return stateOBJ;
}
function _performanceBuilder(performances, peersRankList, shareClassCode, benchMarks, sortedBenchmarkOrder, config, allShareClassDetails, fundId, fundName) {
var thisPerformanceObj = (0, _find2.default)(performances, { shClsCde: { val: shareClassCode } });
var asOfDate = (0, _get2.default)(thisPerformanceObj, 'asOfDate.val');
var inceptionDate = (0, _get2.default)(thisPerformanceObj, 'fundIncDt.val');
var inceptionDateLoc = (0, _get2.default)(thisPerformanceObj, 'fundIncDtLoc.val');
var perfIncDt = (0, _get2.default)(thisPerformanceObj, 'perfIncDt.val');
var dynamicLabel = _util.performanceUtils.dynamicPerformanceLabels(asOfDate, perfIncDt);
var mdash = '&#8212;';
var showMDash = _util.performanceUtils.mustHidePerformanceData(config, inceptionDate);
var rows = [];
var graphNames = [];
var hideChart = _util.performanceUtils.hideChart(config, fundId, 'hideCumulativeChartFundList', showMDash, perfIncDt);
if (thisPerformanceObj) {
logger.debug('thisPerformanceObj', thisPerformanceObj);
var shRow = _performanceCumulativeUtils.cumulativeUtils.getSHTableRow(thisPerformanceObj, showMDash, mdash, allShareClassDetails, fundName);
rows.push(shRow);
graphNames.push(shRow.name);
}
sortedBenchmarkOrder.forEach(function (item) {
var bm = (0, _find2.default)(performances, { bmrkID: { val: (0, _get2.default)(benchMarks, item + '.bmrkId.val') } });
if (bm) {
bm.bmcName.val = (0, _get2.default)(benchMarks, item + '.bmrkName.val');
var bmRow = _performanceCumulativeUtils.cumulativeUtils.getBMTableRow(bm, false, mdash);
rows.push(bmRow);
graphNames.push(bmRow.name);
}
});
var showData = true;
if (rows.length === 0) {
showData = false;
}
if (!thisPerformanceObj) {
showData = false;
}
if (thisPerformanceObj && !(0, _get2.default)(thisPerformanceObj, 'cumulativeDetail.sinceIncp.val')) {
showData = false;
}
return {
tableData: {
asOfDate: asOfDate,
rows: rows
},
inceptionDate: inceptionDateLoc,
dynamicLabel: dynamicLabel,
fundName: fundName,
graphNames: graphNames,
hideChart: hideChart,
showData: showData
};
}
});
define('components/products/portfolio/ft-holdings/etf/lib/holdings.reducer',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.holdings = holdings;
var logger = _aureliaFramework.LogManager.getLogger('holdings');
function holdings(state, action) {
var newState = void 0;
switch (action.type) {
case 'HOLDINGS_CHANGE_SORT':
logger.debug('Reducing: HOLDINGS_CHANGE_SORT', action);
var columns = state.app.holdings.sort.columns;
var newSortColumn = columns.get(action.columnName);
if (newSortColumn) {
switch (newSortColumn.direction) {
case 'ASC':
newSortColumn.direction = 'DESC';
break;
case 'DESC':
newSortColumn.direction = 'ASC';
break;
default:
newSortColumn.direction = newSortColumn.isNumeric ? 'DESC' : 'ASC';
}
columns.forEach(function (value, key) {
if (key !== action.columnName) {
columns.set(key, Object.defineProperty(value, 'direction', { value: null, configurable: true }));
}
});
newState = Object.assign({}, state);
Object.assign(newState.app.holdings.sort, { columns: columns });
return newState;
}
return state;
case 'HOLDINGS_CHANGE_PAGE':
if (Number.isInteger(action.page)) {
newState = Object.assign({}, state);
newState.app.holdings.paging.currentPage = action.page;
return newState;
}
return state;
case 'HOLDINGS_CHANGE_SEARCH':
if (action.searchString !== state.app.holdings.search.searchString) {
newState = Object.assign({}, state);
newState.app.holdings.search.searchString = action.searchString;
newState.app.holdings.paging.currentPage = 1;
return newState;
}
return state;
default:
return state;
}
}
});
define('components/products/portfolio/ft-portfolio-statistics-and-positions/lib/etf/portfolio-statistics-and-positions.reducer',['exports', 'lodash/get', '../../../../common/util/utils-fund-details', '../../../util/util', '../../../../common/util/utils-config', '../../../../lib/decorators/config-decorator', '../../../../lib/reducer-utils', 'aurelia-framework'], function (exports, _get, _utilsFundDetails, _util, _utilsConfig, _configDecorator, _reducerUtils, _aureliaFramework) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.FIELDS = undefined;
exports.portfolioStatisticsAndPositions = portfolioStatisticsAndPositions;
var _get2 = _interopRequireDefault(_get);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var logger = _aureliaFramework.LogManager.getLogger('portfolio-statistics-and-positions');
var STATISTICS_PORTFOLIO_SUPPRESSION_ID = 'statistics';
var FIELDS = exports.FIELDS = {
'total-net-assets': {
dataKey: 'etfStat.totalNetAsset.val',
type: _reducerUtils.FORMAT_TYPES.APPEND_CURRENCY,
addendumData: {
asOf: {
dataKey: 'etfStat.asOfDateTna.val',
type: _reducerUtils.FORMAT_TYPES.STRING
},
caveatId: {
dataKey: 'TotalNetAssetsPortfolio',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
},
updateFreq: {
dataKey: 'updated-daily',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
}
}
},
'number-of-holdings': {
dataKey: 'etfStat.numberOfHoldings.val',
type: _reducerUtils.FORMAT_TYPES.STRING,
addendumData: {
asOf: {
dataKey: 'etfStat.asOfDateNoh.val',
type: _reducerUtils.FORMAT_TYPES.STRING
},
caveatId: {
dataKey: 'NumberOfHoldings',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
},
updateFreq: {
dataKey: 'updated-daily',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
}
}
},
'weighted-avg-market-cap': {
dataKey: 'etfStat.wtAvgMarketCap.val',
type: _reducerUtils.FORMAT_TYPES.APPEND_CURRENCY,
addendumData: {
asOf: {
dataKey: 'etfStat.asOfDateWtAvgMktCap.val',
type: _reducerUtils.FORMAT_TYPES.STRING
},
caveatId: {
dataKey: 'WeightedAverageMarketCap',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
},
updateFreq: {
dataKey: 'updated-daily',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
}
}
},
'number-of-holdings-investment-universe': {
dataKey: 'normalised.keyedBenchMrks.INST1.bmNumberOfHoldings.val',
type: _reducerUtils.FORMAT_TYPES.STRING,
addendumData: {
asOf: {
dataKey: 'etfStat.asOfDateNoh.val',
type: _reducerUtils.FORMAT_TYPES.STRING
},
caveatId: {
dataKey: 'NumberOfHoldingsOfInvestmentUniverse',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
},
updateFreq: {
dataKey: 'updated-daily',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
}
}
},
'pb-ratio': {
dataKey: 'etfStat.pbRatio.val',
type: _reducerUtils.FORMAT_TYPES.STRING,
addendumData: {
asOf: {
dataKey: 'etfStat.asOfDatePbRation.val',
type: _reducerUtils.FORMAT_TYPES.STRING
},
caveatId: {
dataKey: 'PriceToBookRatio',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
},
updateFreq: {
dataKey: 'updated-daily',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
}
}
},
'pb-ratio-investment-universe': {
dataKey: 'normalised.keyedBenchMrks.INST1.pbRatioBm.val',
type: _reducerUtils.FORMAT_TYPES.STRING,
addendumData: {
asOf: {
dataKey: 'etfStat.asOfDatePbRation.val',
type: _reducerUtils.FORMAT_TYPES.STRING
},
caveatId: {
dataKey: 'PriceToBookRatioOfInvestmentUniverse',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
},
updateFreq: {
dataKey: 'updated-daily',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
}
}
},
'pe-ratio-ttm': {
dataKey: 'etfStat.peRatioTtm.val',
type: _reducerUtils.FORMAT_TYPES.STRING,
addendumData: {
asOf: {
dataKey: 'etfStat.asOfDatePeRatioTtm.val',
type: _reducerUtils.FORMAT_TYPES.STRING
},
caveatId: {
dataKey: 'PriceToEarningTrailing',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
},
updateFreq: {
dataKey: 'updated-daily',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
}
}
},
'pe-ratio-ttm-invest-universe': {
dataKey: 'normalised.keyedBenchMrks.INST1.peRatioBm.val',
type: _reducerUtils.FORMAT_TYPES.STRING,
addendumData: {
asOf: {
dataKey: 'etfStat.asOfDatePeRatioTtm.val',
type: _reducerUtils.FORMAT_TYPES.STRING
},
caveatId: {
dataKey: 'PriceToBookRatioOfInvestmentUniverseTrailing',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
},
updateFreq: {
dataKey: 'updated-daily',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
}
}
},
'pe-ratio-ftm': {
dataKey: 'etfStat.peRatioFtm.val',
type: _reducerUtils.FORMAT_TYPES.STRING,
addendumData: {
asOf: {
dataKey: 'etfStat.asOfDatePeRatioFtm.val',
type: _reducerUtils.FORMAT_TYPES.STRING
},
caveatId: {
dataKey: 'PriceToEarningForward',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
},
updateFreq: {
dataKey: 'updated-daily',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
}
}
},
'pe-ratio-ftm-invest-universe': {
dataKey: 'normalised.keyedBenchMrks.INST1.peRatioBmFtm.val',
type: _reducerUtils.FORMAT_TYPES.STRING,
addendumData: {
asOf: {
dataKey: 'etfStat.asOfDatePeRatioFtm.val',
type: _reducerUtils.FORMAT_TYPES.STRING
},
caveatId: {
dataKey: 'PriceToBookRatioOfInvestmentUniverseForward',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
},
updateFreq: {
dataKey: 'updated-daily',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
}
}
},
'return-on-equity': {
dataKey: 'etfStat.returnOnEquity.val',
type: _reducerUtils.FORMAT_TYPES.PERCENTAGE,
addendumData: {
asOf: {
dataKey: 'etfStat.asOfDateRoe.val',
type: _reducerUtils.FORMAT_TYPES.STRING
},
caveatId: {
dataKey: 'ReturnOnEquity',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
},
updateFreq: {
dataKey: 'updated-daily',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
}
}
},
'return-on-equity-invest-universe': {
dataKey: 'normalised.keyedBenchMrks.INST1.returnOnEquityBm.val',
type: _reducerUtils.FORMAT_TYPES.PERCENTAGE,
addendumData: {
asOf: {
dataKey: 'etfStat.asOfDateRoe.val',
type: _reducerUtils.FORMAT_TYPES.STRING
},
caveatId: {
dataKey: 'ReturnOnEquityInvestmentUniverse',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
},
updateFreq: {
dataKey: 'updated-daily',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
}
}
},
'return-on-assets': {
dataKey: 'etfStat.returnOnAssets.val',
type: _reducerUtils.FORMAT_TYPES.PERCENTAGE,
addendumData: {
asOf: {
dataKey: 'etfStat.asOfDateRoa.val',
type: _reducerUtils.FORMAT_TYPES.STRING
},
caveatId: {
dataKey: 'ReturnOnAssets',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
},
updateFreq: {
dataKey: 'updated-daily',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
}
}
},
'return-on-assets-invest-universe': {
dataKey: 'normalised.keyedBenchMrks.INST1.returnOnAssetsBm.val',
type: _reducerUtils.FORMAT_TYPES.PERCENTAGE,
addendumData: {
asOf: {
dataKey: 'etfStat.asOfDateRoa.val',
type: _reducerUtils.FORMAT_TYPES.STRING
},
caveatId: {
dataKey: 'ReturnOnAssetsInvestmentUniverse',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
},
updateFreq: {
dataKey: 'updated-daily',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
}
}
},
'debt-of-assets': {
dataKey: 'etfStat.finacialLeverage.val',
type: _reducerUtils.FORMAT_TYPES.PERCENTAGE,
addendumData: {
asOf: {
dataKey: 'etfStat.asOfDateRoa.val',
type: _reducerUtils.FORMAT_TYPES.STRING
},
caveatId: {
dataKey: 'DebtToAssets',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
},
updateFreq: {
dataKey: 'updated-daily',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
}
}
},
'debt-of-assets-invest-universe': {
dataKey: 'normalised.keyedBenchMrks.INST1.financialLevrageBm.val',
type: _reducerUtils.FORMAT_TYPES.PERCENTAGE,
addendumData: {
asOf: {
dataKey: 'etfStat.asOfDateRoa.val',
type: _reducerUtils.FORMAT_TYPES.STRING
},
caveatId: {
dataKey: 'DebtToAssetsInvestmentUniverse',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
},
updateFreq: {
dataKey: 'updated-daily',
type: _reducerUtils.FORMAT_TYPES.CONSTANT
}
}
}
};
function portfolioStatisticsAndPositions(state, action) {
switch (action.type) {
case 'POPULATE_PORTFOLIO_STATISTICS_AND_POSITIONS_SUCCESS':
logger.debug('Reducing: POPULATE_PORTFOLIO_STATISTICS_AND_POSITIONS_SUCCESS ETF');
var data = _populateStatPositions(action);
return Object.assign({}, state, {
portfolioStatisticsAndPositions: data
});
default:
return state;
}
}
function _populateStatPositions(action) {
var _action$json = action.json,
rawPortfolio = _action$json[0],
rawFundDetails = _action$json[1],
rawConfig = _action$json[2];
var config = (0, _configDecorator.configDecorator)(rawConfig, action.segment);
var fundCategory = _utilsFundDetails.utilsFundDetails.getFundCategory(rawFundDetails);
var isStatsSuppressed = _utilsConfig.utilsConfig.isPortfolioComponentSuppressed(config, action.fundId, STATISTICS_PORTFOLIO_SUPPRESSION_ID, fundCategory);
var etfStat = (0, _get2.default)(rawPortfolio, 'globalProductsValue.portfolioIntlValue.etfStat');
var fundDetails = (0, _get2.default)(rawFundDetails, 'globalProductsValue.fundDetailIntl');
if (!etfStat) {
return {
isValid: false,
isSuppressedByLackOfData: true,
data: []
};
} else if (isStatsSuppressed) {
return {
isValid: false,
isSuppressed: true,
data: []
};
}
var baseCurrency = _utilsFundDetails.utilsFundDetails.getFundCurrency(fundDetails);
var normalised = {};
normalised.keyedBenchMrks = _util.portfolioUtils.benchmarkByKey(rawPortfolio);
var data = (0, _reducerUtils.extractFormattedValues)({
etfStat: etfStat,
fundDetails: fundDetails,
normalised: normalised
}, FIELDS, baseCurrency, true);
return {
isValid: true,
data: data
};
}
});
define('components/products/ppss/ft-ppss/lib/etf/ppss.reducer',['exports', 'aurelia-framework', 'lodash/get', 'lodash/kebabCase', 'moment', '../../../../common/elements/ft-fund-alert/lib/gw/fund-alert.reducer', '../../../../lib/reducer-utils', '../../../../lib/decorators/config-decorator'], function (exports, _aureliaFramework, _get, _kebabCase, _moment, _fundAlert, _reducerUtils, _configDecorator) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ppss = ppss;
var _get2 = _interopRequireDefault(_get);
var _kebabCase2 = _interopRequireDefault(_kebabCase);
var _moment2 = _interopRequireDefault(_moment);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var logger = _aureliaFramework.LogManager.getLogger('ppss');
function ppss(state, action) {
var newState = void 0;
switch (action.type) {
case 'POPULATE_PPSS_STATE_SUCCESS':
logger.debug('Reducing: POPULATE_PPSS_STATE_SUCCESS');
var _action$json = action.json,
ppssData = _action$json[0],
fundConfig = _action$json[1],
alertData = _action$json[2];
var config = (0, _configDecorator.configDecorator)(fundConfig, action.segment);
var fundAlerts = (0, _fundAlert.parseFundAlerts)(alertData);
var chargesColumn = (0, _get2.default)(config, 'ppss.ongoingCharges', 'OCR');
var tabsets = (0, _get2.default)(config, 'tabSets.tabSet', []);
if (!Array.isArray(tabsets)) {
tabsets = [tabsets];
}
tabsets = tabsets.map(function (ts) {
var tabArray = (0, _get2.default)(ts, 'tabs.tab', []);
var docsPage = (0, _get2.default)(ts, 'tabs.tab[' + (tabArray.length - 1) + '].page', '');
var baseLink = '/' + action.segment + '/' + (0, _get2.default)(ts, 'tabs.tab[0].page', '');
var baseDocumentsLink = '/' + action.segment + '/' + docsPage;
if (!action.hideSite) {
baseLink = '/' + action.site + baseLink;
baseDocumentsLink = '/' + action.site + baseDocumentsLink;
}
return {
id: ts.id,
funds: (0, _get2.default)(ts, 'funds', '').split(','),
baseLink: baseLink,
baseDocumentsLink: baseDocumentsLink
};
});
var funds = ppssData.globalProductsValue.fundExplrVal.map(_createFundMapper(config, fundAlerts)).filter(_createFundFilter(config)).map(_createFundLinks(tabsets));
var filterOptions = _createFilterOptions(funds, state.app.ppss.filters);
var navAsOfDateFund = funds.find(function (fund) {
return fund.navAsOfDate;
});
var chargesAsOfDateFund = funds.find(function (fund) {
return fund.terAsOfDate;
});
newState = Object.assign({
fundAlerts: fundAlerts,
ppss: {
funds: funds,
filterOptions: filterOptions,
navAsOfDate: navAsOfDateFund ? navAsOfDateFund.navAsOfDate : '',
chargesAsOfDate: chargesAsOfDateFund ? chargesAsOfDateFund.terAsOfDate : ''
}
}, state);
newState.app.ppss.config.showTer = chargesColumn === 'TER';
newState.app.ppss.config.showOngoingCharges = chargesColumn === 'OCR';
newState.app.ppss.config.showYtdTotalReturnAtNAV = !(0, _get2.default)(config, 'general.hideYtdTotalReturnAtNav', []).includes('ETF');
return newState;
default:
return state;
}
}
function _createFundFilter(config) {
var softLaunchList = config.softLaunchList;
var activeList = config.activeList;
var filters = [];
filters.push(function (fund) {
return activeList.includes(fund.fundId) || softLaunchList.includes(fund.fundId);
});
if (config.general.currencyList.length) {
filters.push(function (fund) {
return config.general.currencyList.includes(fund.currency);
});
}
return function (fund) {
return filters.reduce(function (pass, filter) {
return pass && filter(fund);
}, true);
};
}
function _createFundMapper(config, fundAlerts) {
var softLaunchList = config.softLaunchList;
var activeList = config.activeList;
var mdash = '';
var sixMonthsAgo = (0, _moment2.default)().subtract(6, 'months');
var oneYearAgo = (0, _moment2.default)().subtract(1, 'years');
return function (fund) {
var fundId = (0, _get2.default)(fund, 'fundId', '');
var fundName = (0, _get2.default)(fund, 'fundName.val', '');
var currency = (0, _get2.default)(fund, 'baseCur.val', '-');
var navChange = (0, _get2.default)(fund, 'navc.val', '');
var aum = (0, _get2.default)(fund, 'AUM.val', '');
var inceptionDate = (0, _get2.default)(fund, 'inceptionDtLcl.val', '');
var showMDash = false;
if (config.general.showMDashForUnder1Year) {
showMDash = (0, _moment2.default)(inceptionDate).isAfter(oneYearAgo);
} else if (config.general.showMDashForUnder6Months) {
showMDash = (0, _moment2.default)(inceptionDate).isAfter(sixMonthsAgo);
}
var alerts = fundAlerts.filter(function (alert) {
return alert.fundId === fundId.toString();
});
var fundObj = {
fundId: fundId,
currency: currency,
fundName: fundName,
fundNameFull: fundName,
inceptionDate: inceptionDate,
assetClass: (0, _get2.default)(fund, 'assetCls.val', ''),
nav: (0, _reducerUtils.formatCurrency)((0, _get2.default)(fund, 'nav.val', ''), currency),
navChange: (0, _reducerUtils.formatCurrency)(navChange, currency),
navChangePercent: (0, _get2.default)(fund, 'navChngPct.val', ''),
navChangeDirection: (0, _reducerUtils.navDirection)(navChange),
navAsOfDate: (0, _get2.default)(fund, 'navAsOfDt.val', ''),
domicile: (0, _get2.default)(fund, 'domicile.val', ''),
isActive: activeList.includes(fundId),
isSoftLaunch: softLaunchList.includes(fundId),
fundAlerts: alerts,
isin: (0, _get2.default)(fund, 'ISIN.val', ''),
incomeUse: (0, _get2.default)(fund, 'useOfIncom.val', ''),
ytdTotalReturnAtNav: showMDash ? mdash : (0, _get2.default)(fund, 'ytdRtnAtNAV.val', ''),
aum: (0, _get2.default)(fund, 'aumStd.val', ''),
aumDisplay: (0, _reducerUtils.formatCurrency)(aum, currency),
ter: (0, _get2.default)(fund, 'termPcntg.val', ''),
terAsOfDate: (0, _get2.default)(fund, 'termAsOfDt.val', ''),
terAsOfDateStd: (0, _get2.default)(fund, 'termAsOfDtStd.val', ''),
ongoingCharges: (0, _get2.default)(fund, 'ongoingChrgs.val', '')
};
return fundObj;
};
}
function _createFundLinks(tabsets) {
return function (fund) {
fund.link = tabsets.reduce(function (link, tabset) {
return tabset.id === 'default' || tabset.funds.includes(fund.fundId.toString()) ? tabset.baseLink : link;
}, null);
if (fund.link) fund.link += '/' + fund.fundId + '/' + (0, _kebabCase2.default)(fund.fundName);
fund.documentsLink = tabsets.reduce(function (link, tabset) {
return tabset.id === 'default' || tabset.funds.includes(fund.fundId.toString()) ? tabset.baseDocumentsLink : link;
}, null);
if (fund.documentsLink) fund.documentsLink += '/' + fund.fundId + '/' + (0, _kebabCase2.default)(fund.fundName);
return fund;
};
}
function _createFilterOptions(funds, filters) {
logger.debug('_createFilterOptions', filters);
return {
ASSET_CLASS: (0, _reducerUtils.getUniqOptions)('assetClass')(funds),
CURRENCY: (0, _reducerUtils.getUniqOptions)('currency')(funds)
};
}
});
define('components/products/pricing-distribution/ft-pricing-distribution/lib/etf/pricing-distribution.reducer',['exports', 'lodash/get', 'lodash/has', 'lodash/first', 'lodash/last', '../../../../lib/reducer-utils', '../../../../lib/date-utils', '../../../../../../lib/sort-utils', '../../../../lib/decorators/config-decorator', '../../../../performance/util/util', '../../../../common/util/utils', 'aurelia-framework'], function (exports, _get, _has, _first, _last, _reducerUtils, _dateUtils, _sortUtils, _configDecorator, _util, _utils, _aureliaFramework) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.pricingDistribution = pricingDistribution;
var _get2 = _interopRequireDefault(_get);
var _has2 = _interopRequireDefault(_has);
var _first2 = _interopRequireDefault(_first);
var _last2 = _interopRequireDefault(_last);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var logger = _aureliaFramework.LogManager.getLogger('pricing-distribution');
function pricingDistribution(state, action) {
switch (action.type) {
case 'POPULATE_PRICING_DISTRIBUTION_ERROR':
return Object.assign({}, state, {
pricingDistribution: {
error: true
}
});
case 'POPULATE_PRICING_DISTRIBUTION_SUCCESS':
var _action$json = action.json,
priceDetailsData = _action$json[0],
priceHistoryData = _action$json[1],
distHistoryData = _action$json[2],
fundDetailsData = _action$json[3],
rawConfig = _action$json[4];
logger.debug('Reducing: POPULATE_PRICING_DISTRIBUTION_SUCCESS');
if ((0, _utils.isEmptyDeep)(priceDetailsData) && (0, _utils.isEmptyDeep)(priceHistoryData) && (0, _utils.isEmptyDeep)(distHistoryData) && (0, _utils.isEmptyDeep)(fundDetailsData)) {
return Object.assign({}, state, {
pricingDistribution: {
error: true
}
});
}
var fundId = (0, _get2.default)(priceDetailsData, 'globalProductsValue.etfPriceDivValue.fundID.val', '');
var decoratoredConfig = (0, _configDecorator.configDecorator)(rawConfig, action.segment);
var navHist = priceHistoryData.globalProductsValue.etfPriceDivValue.navHist.find(function (nh) {
return nh.shareClassCurrency.val === nh.baseCurrency.val;
});
var divHist = (0, _get2.default)(distHistoryData, 'globalProductsValue.etfPriceDivValue.divHist', []);
var rawClasses = [priceDetailsData.globalProductsValue.etfPriceDivValue];
var shareClasses = rawClasses.map(_createParseShareClass(fundId, fundDetailsData, decoratoredConfig));
shareClasses.forEach(_createAddNavHistory(navHist));
shareClasses.forEach(_createAddDivHistory(divHist));
var primaryShareClass = shareClasses[0];
return Object.assign({}, state, {
pricingDistribution: {
hasDistributionClasses: shareClasses.some(function (sc) {
return sc.isDistributionClass;
}),
shareClasses: shareClasses,
primaryShareClass: primaryShareClass
}
});
default:
return state;
}
}
function _createAddNavHistory(navHist) {
return function (sc) {
var currency = navHist.shareClassCurrency.val;
sc.navHistory = _parseNavHistory(navHist.navHistory, currency);
sc.navHistory1M = _parseNavHistory(navHist.navHistory1M, currency);
sc.navHistory3M = _parseNavHistory(navHist.navHistory3M, currency);
sc.navHistory6M = _parseNavHistory(navHist.navHistory6M, currency);
sc.navHistoryYTD = _parseNavHistory(navHist.navHistoryYTD, currency);
sc.navHistory1Y = _parseNavHistory(navHist.navHistory1Y, currency);
sc.navHistory3Y = _parseNavHistory(navHist.navHistory3Y, currency);
sc.navHistory5Y = _parseNavHistory(navHist.navHistory5Y, currency);
sc.navHistoryDR = _parseNavHistory(navHist.navHistoryDR, currency);
sc.minDate = (0, _last2.default)(sc.navHistory).navDate;
sc.maxDate = (0, _first2.default)(sc.navHistory).navDate;
if (sc.navHistory.length === 0) {
sc.navHistory = [];
}
};
}
function _createAddDivHistory(divHist) {
return function (sc) {
var historicalShareData = divHist.find(function (o) {
var fundId = (0, _get2.default)(o, 'fundID.val');
var classCode = (0, _get2.default)(o, 'shareClassCode.val');
var currency = (0, _get2.default)(o, 'shareClassCurrency.val');
return sc.shareClassKey === fundId + '-' + classCode && sc.currency === currency;
});
if (historicalShareData) {
sc.dividendHistory = historicalShareData.divHistory.map(function (o) {
return _parseDividend(o, sc.currency);
});
var hashOfYears = {};
sc.dividendHistory.forEach(function (dividend) {
var normalisedDate = dividend.asOfDateStd;
var year = normalisedDate.match(/([0-9]{4})/);
if (year) {
var yearInt = year[1];
if (!hashOfYears[yearInt]) {
hashOfYears[yearInt] = [];
}
hashOfYears[yearInt].push(dividend);
}
});
var descendingOrder = function descendingOrder(a, b) {
return b - a;
};
sc.dividendHistoryByYear = hashOfYears;
sc.dividendYears = Object.keys(hashOfYears).sort(descendingOrder);
}
};
}
function _parseNavHistory(navData, currency) {
if (!navData || navData.length === 0) {
return null;
}
return navData.map(function (navPoint) {
var nav = (0, _get2.default)(navPoint, 'nav.val', '');
var navChange = (0, _get2.default)(navPoint, 'dlyNavChange.val', '');
var navDate = (0, _get2.default)(navPoint, 'navEffectiveDateStd.val', '');
var navDateFormatted = (0, _get2.default)(navPoint, 'navEffectiveDate.val', '');
var navChangePercent = (0, _get2.default)(navPoint, 'dlyNavPcnt.val', '');
return {
navDate: navDate,
navDateFormatted: navDateFormatted,
nav: (0, _reducerUtils.parseNumber)(nav),
navChange: (0, _reducerUtils.parseNumber)(navChange),
navChangePercent: navChangePercent,
navFormatted: (0, _reducerUtils.formatCurrency)(nav, currency, true),
navChangeFormatted: (0, _reducerUtils.formatCurrency)(navChange, currency, true),
navChangePercentFormatted: (0, _reducerUtils.formatPercentage)(navChangePercent, true)
};
}).sort((0, _sortUtils.createCompare)('navDate', 'DESC'));
}
function _parseDividend(dvd, currency) {
if (!(0, _has2.default)(dvd, 'divPerUnit.val')) return null;
return {
asOfDateStd: (0, _get2.default)(dvd, 'asOfDtStd.val', '—'),
asOfDate: (0, _get2.default)(dvd, 'asOfDt.val', '—'),
recordDate: (0, _get2.default)(dvd, 'recordDt.val', '—'),
exDividendDate: (0, _get2.default)(dvd, 'exDivDt.val', '—'),
distributionDate: (0, _get2.default)(dvd, 'distDt.val', '—'),
dividendsPerShare: (0, _reducerUtils.formatCurrency)((0, _get2.default)(dvd, 'divPerUnit.val', ''), currency, true)
};
}
function _parseHighLowNav(highLowValues, currency) {
var populatedHighLowValues = [];
highLowValues.forEach(function (navYear) {
var year = (0, _get2.default)(navYear, 'navYear.val', '');
var highNav = (0, _get2.default)(navYear, 'ytdCurrYrHighNAV.val', null);
var highNavDate = (0, _get2.default)(navYear, 'ytdCurrYrHighDt.val', '');
var lowNav = (0, _get2.default)(navYear, 'ytdCurrYrLowNAV.val', null);
var lowNavDate = (0, _get2.default)(navYear, 'ytdCurrYrLowDt.val', '');
if (highNav !== null && lowNav !== null) {
populatedHighLowValues.push({
year: year,
highNavDate: highNavDate,
lowNavDate: lowNavDate,
highNav: (0, _reducerUtils.formatCurrency)(highNav, currency, true),
lowNav: (0, _reducerUtils.formatCurrency)(lowNav, currency, true)
});
}
});
return populatedHighLowValues;
}
function _createParseShareClass(fundId, fundDetailsData, decoratoredConfig) {
return function (shareClass) {
var classCode = (0, _get2.default)(shareClass, 'shareClassCode.val', '');
var shareClassKey = classCode ? fundId + '-' + classCode : fundId;
var navChange = (0, _get2.default)(shareClass, 'navDetailValue.dlyNavChange.val', '');
var currency = (0, _get2.default)(shareClass, 'shareClassCurrency.val', '');
var asOfDate = (0, _get2.default)(shareClass, 'asOfDateForNav.val', '');
var performanceInceptionStdDate = (0, _get2.default)(fundDetailsData, 'globalProductsValue.fundDetailIntl.shClsDet[0].perfIncpDt.val', null);
var showPerformanceData = !_util.performanceUtils.mustHidePerformanceData(decoratoredConfig, performanceInceptionStdDate);
var isDistributionClass = (0, _get2.default)(fundDetailsData, 'globalProductsValue.fundDetailIntl.distributionFlag.val', '').toLocaleUpperCase() === 'Y';
return {
shareClassKey: shareClassKey,
currency: currency,
primary: true,
dividendHistory: [],
showPerformanceData: showPerformanceData,
isDistributionClass: isDistributionClass,
asOfDate: asOfDate,
asOfDateStd: (0, _dateUtils.formatLocaleDateToStdDate)(asOfDate),
nav: (0, _reducerUtils.formatCurrency)((0, _get2.default)(shareClass, 'navDetailValue.nav.val', ''), currency),
navChange: (0, _reducerUtils.formatCurrency)(navChange, currency),
navChangeDirection: (0, _reducerUtils.navDirection)(navChange),
navChangePercent: (0, _get2.default)(shareClass, 'navDetailValue.dlyNavPcnt.val', ''),
dividend: _parseDividend(shareClass.dividend, currency),
highLowNav: _parseHighLowNav((0, _get2.default)(shareClass, 'highLowValues', []), currency),
shareClassInceptionDate: (0, _get2.default)(fundDetailsData, 'globalProductsValue.fundDetailIntl.fundIncpDt.val', '—'),
performanceInceptionStdDate: performanceInceptionStdDate
};
};
}
});
define('components/products/tax/ft-german-tax/lib/etf/german-tax.reducer',['exports', 'aurelia-framework', 'lodash/get', '../../../../lib/reducer-utils'], function (exports, _aureliaFramework, _get, _reducerUtils) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.germanTax = germanTax;
var _get2 = _interopRequireDefault(_get);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var logger = _aureliaFramework.LogManager.getLogger('german-tax');
function germanTax(state, action) {
switch (action.type) {
case 'POPULATE_GERMAN_TAX_SUCCESS':
var _action$json = action.json,
germanTaxData = _action$json[0];
logger.debug('Reducing: POPULATE_GERMAN_TAX_SUCCESS', germanTaxData);
var rawFundsData = (0, _get2.default)(germanTaxData, 'globalProductsValue.etfListPriceTax') || [];
var asOf = '—';
var funds = rawFundsData.map(function (rawFundData) {
var baseCurrency = (0, _get2.default)(rawFundData, 'fundBaseCurrency.val', '—');
asOf = (0, _get2.default)(rawFundData, 'asOfDate.val', '—');
return {
fundName: (0, _get2.default)(rawFundData, 'fundName.val', '—'),
ticker: (0, _get2.default)(rawFundData, 'ticker.val', '—'),
isin: (0, _get2.default)(rawFundData, 'isin.val', '—'),
baseCurrency: baseCurrency,
nav: (0, _reducerUtils.formatCurrency)((0, _get2.default)(rawFundData, 'gemOfferPriceValue.val'), baseCurrency, true),
interimProfit: (0, _reducerUtils.formatCurrency)((0, _get2.default)(rawFundData, 'interimProfit.val'), baseCurrency, true),
intrmProfitStd: (0, _get2.default)(rawFundData, 'intrmProfitStd.val', '0'),
equityGainEstG: (0, _reducerUtils.formatPercentage)((0, _get2.default)(rawFundData, 'equityGain.val'), true),
equityGainKstG: (0, _reducerUtils.formatPercentage)((0, _get2.default)(rawFundData, 'kstgEquityGain.val'), true),
realEstateProfit: (0, _reducerUtils.formatCurrency)((0, _get2.default)(rawFundData, 'realEstateGain.val'), baseCurrency, true),
addi: (0, _get2.default)(rawFundData, 'accuDeemedDist.val', '—'),
asOf: asOf
};
});
return Object.assign({
tax: {
funds: funds,
asOf: asOf
}
}, state);
default:
return state;
}
}
});
define('components/products/overview/ft-trading-information/etf/lib/etf/trading-information.reducer',['exports', 'lodash/get', '../ft-trading-information.reducer', 'aurelia-framework'], function (exports, _get, _ftTradingInformation, _aureliaFramework) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.tradingInformation = tradingInformation;
var _get2 = _interopRequireDefault(_get);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var logger = _aureliaFramework.LogManager.getLogger('trading-information');
function tradingInformation(state, action) {
switch (action.type) {
case 'POPULATE_TRADING_INFORMATION_SUCCESS':
logger.debug('Reducing: POPULATE_TRADING_INFORMATION_SUCCESS');
var _action$json = action.json,
rawFundDetail = _action$json[0];
var rawExchanges = (0, _get2.default)(rawFundDetail, 'globalProductsValue.fundDetailIntl.exchangeDet', []);
var exchanges = getExchanges(rawExchanges);
var exchangeNames = getExchangeNames(exchanges);
var selectedExchange = action.data;
var filteredExchanges = (0, _ftTradingInformation.getFilteredExchanges)(exchanges, selectedExchange);
return Object.assign({}, state, {
tradingInformation: {
exchanges: exchanges,
exchangeNames: exchangeNames,
selectedExchange: selectedExchange,
filteredExchanges: filteredExchanges,
sortFilters: _ftTradingInformation.DEFAULT_SORT_FILTER,
sortColumn: null
}
});
default:
return state;
}
}
function getExchangeNames(exchanges) {
var exchangeNames = {};
exchanges.forEach(function (exchange) {
exchangeNames[exchange.name] = true;
});
return Object.keys(exchangeNames);
}
function getExchanges(rawExchanges) {
return rawExchanges.map(function (rawExchange) {
return {
name: (0, _get2.default)(rawExchange, 'exchngName.val', '—'),
ticker: (0, _get2.default)(rawExchange, 'ticker.val', '—'),
currency: (0, _get2.default)(rawExchange, 'trdCur.val', '—'),
sedol: (0, _get2.default)(rawExchange, 'sedol.val', '—'),
bloombergTicker: (0, _get2.default)(rawExchange, 'blmbrg.val', '—'),
ric: (0, _get2.default)(rawExchange, 'reuters.val', '—')
};
});
}
});
define('components/products/portfolio/ft-geographic-allocation/etf/lib/etf/geographic-allocation.reducer',['exports', 'lodash/get', 'lodash/set', '../../../../util/util', '../../../../../common/util/utils-fund-details', '../../../../util/hierarchical-utils', '../../../../../common/util/utils-config', '../../../../../lib/decorators/config-decorator', 'aurelia-framework'], function (exports, _get, _set, _util, _utilsFundDetails, _hierarchicalUtils, _utilsConfig, _configDecorator, _aureliaFramework) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.geographicAllocationReducer = geographicAllocationReducer;
var _get2 = _interopRequireDefault(_get);
var _set2 = _interopRequireDefault(_set);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var logger = _aureliaFramework.LogManager.getLogger('quality-breakdown');
function geographicAllocationReducer(state, action) {
var chartObj = void 0;
var newState = void 0;
switch (action.type) {
case 'POPULATE_GEOGRAPHIC_ALLOCATION_SUCCESS':
if (!action.cid) {
logger.error('no cid given');
return state;
}
chartObj = buildInitialState(action, 'COUNTRY_ALLOCATION');
newState = Object.assign({}, state);
(0, _set2.default)(newState, 'app.portfolio.geoAllocation[' + action.cid + ']', chartObj);
return newState;
case 'POPULATE_GEOGRAPHIC_ALLOCATION_BMDATA_SUCCESS':
if (!action.cid) {
logger.error('no cid given');
return state;
}
chartObj = (0, _get2.default)(state, 'app.portfolio.geoAllocation[' + action.cid + ']');
if (!chartObj) {
logger.error('POPULATE_GEOGRAPHIC_ALLOCATION_BMDATA called before POPULATE_GEOGRAPHIC_ALLOCATION');
return state;
}
var _action$json = action.json,
rawPortfolioBenchmark = _action$json[0];
chartObj = (0, _hierarchicalUtils.appendBenchmarkDataToState)(chartObj, rawPortfolioBenchmark, 'COUNTRY_ALLOCATION');
chartObj.missingBenchmarkData = false;
newState = Object.assign({}, state);
(0, _set2.default)(newState, 'app.portfolio.geoAllocation[' + action.cid + ']', chartObj);
return newState;
default:
return state;
}
}
function buildInitialState(action, chartType) {
var _action$json2 = action.json,
rawPortfolio = _action$json2[0],
rawFundDetails = _action$json2[1],
rawConfig = _action$json2[2];
var decoratedConfig = (0, _configDecorator.configDecorator)(rawConfig, action.segment);
var fundCategory = _utilsFundDetails.utilsFundDetails.getFundCategory(rawFundDetails);
var rawBreakdowns = (0, _get2.default)(rawPortfolio, 'globalProductsValue.portfolioIntlValue.breakdown.brkdwnDet');
var rawBenchmarks = (0, _get2.default)(rawFundDetails, 'globalProductsValue.fundDetailIntl.benchMrkList');
var breakdown = _util.portfolioUtils.findObjInArray(rawBreakdowns, chartType);
var geoObj = {};
geoObj.isSuppressed = _utilsConfig.utilsConfig.isPortfolioComponentSuppressed(decoratedConfig, action.fundId, action.portfolioComponent, fundCategory);
geoObj.visible = typeof breakdown !== 'undefined';
if (geoObj.isSuppressed) {
geoObj.visible = false;
}
if (geoObj.visible) {
if (rawBenchmarks !== undefined) {
geoObj.bmrkId = _util.portfolioUtils.getBenchmarkID(rawBenchmarks);
}
geoObj.missingBenchmarkData = geoObj.bmrkId !== undefined;
var tempBreakdown = (0, _hierarchicalUtils.getHierarchicalBreakdown)(breakdown, {
tableMappingKeys: {
val: 'val.val',
bmVal: null
},
filter: false
});
var refreshRateFromConfig = (0, _get2.default)(decoratedConfig, 'portfolio.refreshRate');
geoObj.refreshRate = _util.portfolioUtils.convertRefreshFrequencyIntoLabelId(refreshRateFromConfig);
geoObj.date = tempBreakdown.date;
geoObj.calType = tempBreakdown.calType;
geoObj.table = tempBreakdown.table;
geoObj.chart = tempBreakdown.chart;
geoObj.visible = tempBreakdown.visible;
geoObj.hasNestedChildren = tempBreakdown.hasNestedChildren;
geoObj.tableTwoLevel = tempBreakdown.tableTwoLevel;
geoObj.hasOverflow = tempBreakdown.hasOverflow;
geoObj.showChart = true;
geoObj.spanRow = true;
}
return geoObj;
}
});
define('components/products/portfolio/ft-holdings/etf/lib/etf/holdings.reducer',['exports', 'aurelia-framework', 'lodash/get', '../../../../../common/util/utils-config', '../../../../../common/util/utils-fund-details', '../../../../../lib/decorators/config-decorator', '../../../../util/util'], function (exports, _aureliaFramework, _get, _utilsConfig, _utilsFundDetails, _configDecorator, _util) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.holdings = holdings;
var _get2 = _interopRequireDefault(_get);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var logger = _aureliaFramework.LogManager.getLogger('holdings');
var mdash = '\u2014';
function holdings(state, action) {
switch (action.type) {
case 'POPULATE_HOLDINGS_STATE_SUCCESS':
logger.debug('Reducing: POPULATE_HOLDINGS_SUCCESS', action);
var _action$json = action.json,
portfolioData = _action$json[0],
rawFundDetails = _action$json[1],
rawConfig = _action$json[2];
var decoratedConfig = (0, _configDecorator.configDecorator)(rawConfig, action.segment);
var assetClass = _utilsFundDetails.utilsFundDetails.getFundCategory(rawFundDetails);
var isSuppressed = _utilsConfig.utilsConfig.isPortfolioComponentSuppressed(decoratedConfig, action.fundId, action.portfolioComponent, assetClass);
var holdingsData = (0, _get2.default)(portfolioData, 'globalProductsValue.portfolioIntlValue.etfDailyHoldings');
if (isSuppressed || !holdingsData) {
return state;
}
var holdingsList = holdingsData.map(function (holding) {
return {
ticker: (0, _get2.default)(holding, 'securityTicker.val', mdash),
isin: (0, _get2.default)(holding, 'IsinSecurityNumber.val', mdash),
holdingName: (0, _get2.default)(holding, 'securityName.val', mdash),
sector: (0, _get2.default)(holding, 'sectorName.val', mdash),
weight: (0, _get2.default)(holding, 'pctOfNetAssets.val', mdash),
marketValue: (0, _get2.default)(holding, 'marketValue.val', mdash),
notionalValue: (0, _get2.default)(holding, 'notionalMarketValue.val', mdash)
};
});
var asOfDate = (0, _get2.default)(portfolioData, 'globalProductsValue.portfolioIntlValue.etfDailyHoldings.0.asOfDate.val');
var refreshRateFromConfig = (0, _get2.default)(decoratedConfig, 'portfolio.refreshRate');
var refreshRate = _util.portfolioUtils.convertRefreshFrequencyIntoLabelId(refreshRateFromConfig);
var showNotionalValue = holdingsList.some(function (holding) {
return holding.notionalValue !== mdash;
});
var currencySymbol = _utilsFundDetails.utilsFundDetails.getFundCurrency(rawFundDetails);
return Object.assign({}, state, {
holdings: {
asOfDate: asOfDate,
holdingsList: holdingsList,
showNotionalValue: showNotionalValue,
currencySymbol: currencySymbol,
refreshRate: refreshRate
}
});
default:
return state;
}
}
});
define('text!components/products/performance/ft-backtested-performance-annualised/etf/ft-backtested-performance-annualised.html', ['module'], function(module) { module.exports = "<template> <div if.bind=\"isPopulated\"> <div data-fti-component=\"backtested-performance-annualised\"> <div class=\"error-no-data\" if.bind=\"hasErrored\"> <ft-label label.bind=\"getLabel('no-data-available')\"></ft-label> </div> <div if.bind=\"!hasErrored\" data-fti-module=\"date-toggle\"> <div class=\"row\"> <div class=\"col-sm-6\"> <h3 class=\"header-product\"> <ft-label label.bind=\"getLabel('bt-performance-annual-component-heading')\"></ft-label> <small> <ft-label label.bind=\"getLabel('as-of')\"></ft-label> <ft-label label.bind=\"asOfDate | ftDashIfEmpty\"></ft-label> </small> </h3> <ft-proximal placement=\"PerformanceAnnualizedBacktestedProximal\" position=\"top\"></ft-proximal> </div> </div> <div class=\"row\"> <div class=\"col-sm-12\"> <div class=\"tab-content1\"> <div id=\"backtested-performance-annualised\" role=\"1tabpanel\" class=\"1tab-pane\"> <div class=\"resize-print avoid-page-break-inside\" id=\"performance-annualised-monthly\"> <ft-column-chart series.bind=\"chartData\" categories.bind=\"chartCategories\" suffix.bind=\"'%'\"></ft-column-chart> </div> <div class=\"table-responsive\"> <ft-visual-hint></ft-visual-hint> <table id=\"backtested-performance-annualised-table\" class=\"table table-striped table--border-bottom\"> <thead> <tr class=\"header-sortable row\"> <th class=\"col-sm-4 col-xm-6\"> <ft-label label.bind=\"getLabel('month-end')\"></ft-label> <small> <ft-label label.bind=\"getLabel('as-of')\"></ft-label> <ft-label label.bind=\"asOfDate | ftDashIfEmpty\"></ft-label> </small> </th> <th scope=\"col\" class=\"text-right\"> <ft-label label.bind=\"getLabel('1-yr')\"></ft-label> </th> <th scope=\"col\" class=\"text-right\"> <ft-label label.bind=\"getLabel('3-yr')\"></ft-label> </th> <th scope=\"col\" class=\"text-right\"> <ft-label label.bind=\"getLabel('5-yr')\"></ft-label> </th> <th scope=\"col\" class=\"text-right\"> <ft-label label.bind=\"getLabel('10-yr')\"></ft-label> </th> </tr> </thead> <tbody> <tr repeat.for=\"row of performances.rows\" class=\"row\"> <th scope=\"row\" class=\"col-sm-4 col-xm-6\"> <i class=\"chart-key chart-key-show-sm chart-color-${$index + 1}\"></i> <ft-label label.bind=\"row.name\"></ft-label> (%) </th> <td class=\"text-right\" innerhtml.bind=\"row.oneYr | ftDashIfEmpty\"></td> <td class=\"text-right\" innerhtml.bind=\"row.threeYr | ftDashIfEmpty\"></td> <td class=\"text-right\" innerhtml.bind=\"row.fiveYr | ftDashIfEmpty\"></td> <td class=\"text-right\" innerhtml.bind=\"row.tenYr | ftDashIfEmpty\"></td> </tr> </tbody> </table> </div> </div> </div> <ft-proximal placement=\"PerformanceAnnualizedBacktestedProximal\" position=\"bottom\"></ft-proximal> </div> </div> </div> </div> </div> </template> "; });
define('text!components/products/performance/ft-backtested-performance-calendar/etf/ft-backtested-performance-calendar.html', ['module'], function(module) { module.exports = "<template> <div if.bind=\"isPopulated\"> <div data-fti-component=\"backtested-performance-calendar\"> <div class=\"error-no-data\" if.bind=\"hasErrored\"> <ft-label label.bind=\"getLabel('no-data-available')\"></ft-label> </div> <div if.bind=\"!hasErrored\" data-fti-module=\"date-toggle\"> <div data-fti-module=\"date-toggle\"> <div class=\"row\"> <div class=\"col-sm-6\"> <h3 class=\"header-product\"> <ft-label label.bind=\"getLabel('bt-performance-calendar-component-heading')\"></ft-label> <small> <ft-label label.bind=\"getLabel('as-of')\"></ft-label> <ft-label label.bind=\"asOfDate | ftDashIfEmpty\"></ft-label> </small> </h3> <ft-proximal placement=\"PerformanceCalendarBacktestedProximal\" position=\"top\"></ft-proximal> </div> </div> <div class=\"row\"> <div class=\"col-sm-12\"> <div class=\"tab-content1\"> <div id=\"backtested-performance-calendar\" role=\"1tabpanel\" class=\"1tab-pane\"> <div class=\"resize-print avoid-page-break-inside\" id=\"performance-annualised-monthly\"> <ft-column-chart series.bind=\"chartData\" categories.bind=\"chartCategories\" suffix.bind=\"'%'\"></ft-column-chart> </div> <div class=\"table-responsive\"> <ft-visual-hint></ft-visual-hint> <table id=\"backtested-performance-calendar-table\" class=\"table table-striped table--border-bottom\"> <thead> <tr class=\"header-sortable row\"> <th class=\"col-sm-4 col-xm-6\"> <ft-label label.bind=\"getLabel('month-end')\"></ft-label> <small> <ft-label label.bind=\"getLabel('as-of')\"></ft-label> <ft-label label.bind=\"asOfDate | ftDashIfEmpty\"></ft-label> </small> </th> <th scope=\"col\" class=\"text-right\"> <ft-label label.bind=\"performances.years[0]\"></ft-label> </th> <th scope=\"col\" class=\"text-right\"> <ft-label label.bind=\"performances.years[1]\"></ft-label> </th> <th scope=\"col\" class=\"text-right\"> <ft-label label.bind=\"performances.years[2]\"></ft-label> </th> <th scope=\"col\" class=\"text-right\"> <ft-label label.bind=\"performances.years[3]\"></ft-label> </th> <th scope=\"col\" class=\"text-right\"> <ft-label label.bind=\"performances.years[4]\"></ft-label> </th> <th scope=\"col\" class=\"text-right\"> <ft-label label.bind=\"performances.years[5]\"></ft-label> </th> <th scope=\"col\" class=\"text-right\"> <ft-label label.bind=\"performances.years[6]\"></ft-label> </th> <th scope=\"col\" class=\"text-right\"> <ft-label label.bind=\"performances.years[7]\"></ft-label> </th> <th scope=\"col\" class=\"text-right\"> <ft-label label.bind=\"performances.years[8]\"></ft-label> </th> <th scope=\"col\" class=\"text-right\"> <ft-label label.bind=\"performances.years[9]\"></ft-label> </th> </tr> </thead> <tbody> <tr repeat.for=\"row of performances.rows\" class=\"row\"> <th scope=\"row\" class=\"col-sm-4 col-xm-6\"> <i class=\"chart-key chart-key-show-sm chart-color-${$index + 1}\"></i> <ft-label label.bind=\"row.name\"></ft-label> (%) </th> <td class=\"text-right\" innerhtml.bind=\"row.oneYr | ftDashIfEmpty\"></td> <td class=\"text-right\" innerhtml.bind=\"row.twoYr | ftDashIfEmpty\"></td> <td class=\"text-right\" innerhtml.bind=\"row.threeYr | ftDashIfEmpty\"></td> <td class=\"text-right\" innerhtml.bind=\"row.fourYr | ftDashIfEmpty\"></td> <td class=\"text-right\" innerhtml.bind=\"row.fiveYr | ftDashIfEmpty\"></td> <td class=\"text-right\" innerhtml.bind=\"row.sixYr | ftDashIfEmpty\"></td> <td class=\"text-right\" innerhtml.bind=\"row.sevenYr | ftDashIfEmpty\"></td> <td class=\"text-right\" innerhtml.bind=\"row.eightYr | ftDashIfEmpty\"></td> <td class=\"text-right\" innerhtml.bind=\"row.nineYr | ftDashIfEmpty\"></td> <td class=\"text-right\" innerhtml.bind=\"row.tenYr | ftDashIfEmpty\"></td> </tr> </tbody> </table> </div> </div> </div> <ft-proximal placement=\"PerformanceCalendarBacktestedProximal\" position=\"bottom\"></ft-proximal> </div> </div> </div> </div> </div> </div> </template> "; });
define('text!components/products/performance/ft-backtested-performance-cumulative/etf/ft-backtested-performance-cumulative.html', ['module'], function(module) { module.exports = "<template> <div if.bind=\"isPopulated\"> <div data-fti-component=\"backtested-performance-cumulative\"> <div class=\"error-no-data\" if.bind=\"hasErrored\"> <ft-label label.bind=\"getLabel('no-data-available')\"></ft-label> </div> <div if.bind=\"!hasErrored\" data-fti-module=\"date-toggle\"> <div class=\"row\"> <div class=\"col-sm-6\"> <h3 class=\"header-product\"> <ft-label label.bind=\"getLabel('bt-performance-cumulative-component-heading')\"></ft-label> <small> <ft-label label.bind=\"getLabel('as-of')\"></ft-label> <ft-label label.bind=\"asOfDate | ftDashIfEmpty\"></ft-label> </small> </h3> <ft-proximal placement=\"PerformanceCumulativeBacktestedProximal\" position=\"top\"></ft-proximal> </div> </div> <div class=\"sub-header\">${ getLabel('bt-performance-investment-growth') } ${fundCurrency}</div> <div><span repeat.for=\"date of dates\"><span if.bind=\"$last\"> ${getLabel('to')} </span>${date}</span></div> <div class=\"row\"> <div class=\"col-sm-12\"> <div class=\"tab-content1\"> <div id=\"backtested-performance-cumulative\" role=\"1tabpanel\" class=\"1tab-pane\"> <div class=\"resize-print avoid-page-break-inside\" id=\"performance-cumulative-monthly\"> <ft-performance-cumulative-chart graph-names.bind=\"graphNames\" data.bind=\"chartData\" val-prefix.bind=\"valPrefix\"></ft-performance-cumulative-chart> </div> <div class=\"table-responsive\"> <ft-visual-hint></ft-visual-hint> <table id=\"backtested-performance-cumulative-table\" class=\"table table-striped table--border-bottom\"> <thead> <tr class=\"header-sortable row\"> <th class=\"col-sm-4 col-xm-6\"> <ft-label label.bind=\"getLabel('month-end')\"></ft-label> <small> <ft-label label.bind=\"getLabel('as-of')\"></ft-label> <ft-label label.bind=\"asOfDate | ftDashIfEmpty\"></ft-label> </small> </th> <th scope=\"col\" class=\"text-right\"> <ft-label label.bind=\"getLabel('ytd')\"></ft-label> </th> <th scope=\"col\" class=\"text-right\"> <ft-label label.bind=\"getLabel('1-mth')\"></ft-label> </th> <th scope=\"col\" class=\"text-right\"> <ft-label label.bind=\"getLabel('3-mth')\"></ft-label> </th> <th scope=\"col\" class=\"text-right\"> <ft-label label.bind=\"getLabel('6-mth')\"></ft-label> </th> <th scope=\"col\" class=\"text-right\"> <ft-label label.bind=\"getLabel('1-yr')\"></ft-label> </th> <th scope=\"col\" class=\"text-right\"> <ft-label label.bind=\"getLabel('3-yr')\"></ft-label> </th> <th scope=\"col\" class=\"text-right\"> <ft-label label.bind=\"getLabel('5-yr')\"></ft-label> </th> <th scope=\"col\" class=\"text-right\"> <ft-label label.bind=\"getLabel('10-yr')\"></ft-label> </th> </tr> </thead> <tbody> <tr repeat.for=\"row of performances.rows\" class=\"row\"> <th scope=\"row\" class=\"col-sm-4 col-xm-6\"> <i class=\"chart-key chart-key-show-sm chart-color-${$index + 1}\"></i> <ft-label label.bind=\"row.name\"></ft-label> (%) </th> <td class=\"text-right\" innerhtml.bind=\"row.ytd | ftDashIfEmpty\"></td> <td class=\"text-right\" innerhtml.bind=\"row.oneMth | ftDashIfEmpty\"></td> <td class=\"text-right\" innerhtml.bind=\"row.threeMth | ftDashIfEmpty\"></td> <td class=\"text-right\" innerhtml.bind=\"row.sixMth | ftDashIfEmpty\"></td> <td class=\"text-right\" innerhtml.bind=\"row.oneYr | ftDashIfEmpty\"></td> <td class=\"text-right\" innerhtml.bind=\"row.threeYr | ftDashIfEmpty\"></td> <td class=\"text-right\" innerhtml.bind=\"row.fiveYr | ftDashIfEmpty\"></td> <td class=\"text-right\" innerhtml.bind=\"row.tenYr | ftDashIfEmpty\"></td> </tr> </tbody> </table> </div> </div> </div> </div> </div> <ft-proximal placement=\"PerformanceCumulativeBacktestedProximal\" position=\"bottom\"></ft-proximal> </div> </div> </div> <div if.bind=\"populated\"></div> </template> "; });
define('text!components/products/performance/ft-calendar-year-returns/etf/ft-calendar-year-returns.html', ['module'], function(module) { module.exports = "<template class=\"ft-calendar-year-returns\"> <div if.bind=\"isPopulated\"> <div data-fti-component=\"calendar-year-returns\"> <div class=\"row\"> <div class=\"col-sm-12\"> <h3 class=\"header-product\"> <ft-label label.bind=\"getLabel('performance-calendar-component-heading')\"></ft-label> <small> <ft-label label.bind=\"getLabel('as-of')\"></ft-label> <ft-label label.bind=\"tableData.asOfDate | ftDashIfEmpty\"></ft-label> </small> </h3> <ft-proximal placement=\"PerformanceCalendarProximal\" position=\"top\"></ft-proximal> </div> </div> <div class=\"row\"> <div class=\"col-sm-12\"> <div class=\"pull-left\"> <ul class=\"btn-group nav-tabs-button-group\"> <li repeat.for=\"tab of tabs\" role=\"presentation\" class=\"label-tab\" class.bind=\"tab.isActive ? 'active' : ''\"> <a href=\"javascript:void(0)\" class=\"btn\" aria-controls.bind=\"tab.ariaControl\" data-toggle=\"tab\" click.delegate=\"changeTab(tab.key)\"> <ft-label label.bind=\"getLabel(tab.labelKey)\"></ft-label> </a> </li> </ul> </div> </div> </div> <ft-legal-jump-link read-important=\"${ getLabel('read-important') }\"></ft-legal-jump-link> <ft-proximal placement=\"PerformanceCalendarProximal\" position=\"top\"></ft-proximal> <div class=\"row\"> <div class=\"col-sm-12\"> <div data-fti-module=\"ftichart\" role=\"tabpanel\" class=\"tab-pane\" id=\"calendar-year-returns-monthly\"> <div class=\"resize-print avoid-page-break-inside\" fti-chart-scale=\"0.95\" if.bind=\"data.showBenchmark\"> <ft-column-chart series.bind=\"chartData\" categories.bind=\"chartCategories\" suffix.bind=\"'%'\"></ft-column-chart> </div> <div class=\"table-responsive\" if.bind=\"tableData\"> <ft-visual-hint></ft-visual-hint> <table id=\"calendar-year-returns-table-monthly\" class=\"table table-striped table--border-bottom avoid-page-break-inside\"> <thead> <tr class=\"row\"> <th class=\"col-sm-4 col-xm-6\"> <ft-label label.bind=\"getLabel(dateGroup)\"></ft-label> <small> <ft-label label.bind=\"getLabel('as-of')\"></ft-label> <ft-label label.bind=\"tableData.asOfDate | ftDashIfEmpty\"></ft-label> </small> </th> <th scope=\"col\" class=\"text-right\" data-testfund=\"true\" repeat.for=\"year of tableData.years\"> ${year} </th> </tr> </thead> <tbody> <tr repeat.for=\"row of tableData.rows\" class=\"row\"> <th scope=\"row\" class=\"col-sm-4 col-xm-6\"> <i class=\"chart-key chart-key-show-sm chart-color-${$index + 1}\"></i> <ft-label label.bind=\"row.name\"></ft-label> </th> <td class=\"text-right\" innerhtml.bind=\"row.oneYr | ftDashIfEmpty\"></td> <td class=\"text-right\" innerhtml.bind=\"row.twoYr | ftDashIfEmpty\"></td> <td class=\"text-right\" innerhtml.bind=\"row.threeYr | ftDashIfEmpty\"></td> <td class=\"text-right\" innerhtml.bind=\"row.fourYr | ftDashIfEmpty\"></td> <td class=\"text-right\" innerhtml.bind=\"row.fiveYr | ftDashIfEmpty\"></td> <td class=\"text-right\" innerhtml.bind=\"row.sixYr | ftDashIfEmpty\"></td> <td class=\"text-right\" innerhtml.bind=\"row.sevenYr | ftDashIfEmpty\"></td> <td class=\"text-right\" innerhtml.bind=\"row.eightYr | ftDashIfEmpty\"></td> <td class=\"text-right\" innerhtml.bind=\"row.nineYr | ftDashIfEmpty\"></td> <td class=\"text-right\" innerhtml.bind=\"row.tenYr | ftDashIfEmpty\"></td> </tr> </tbody> </table> </div> </div> <ft-proximal placement=\"PerformanceCalendarProximal\" position=\"bottom\"></ft-proximal> </div> </div> </div> </div> </template> "; });
define('text!components/products/performance/ft-performance-annualised/etf/ft-performance-annualised.html', ['module'], function(module) { module.exports = "<template class=\"ft-performance-annualised\"> <div if.bind=\"isPopulated\"> <div data-fti-component=\"performance-annualised\"> <div data-fti-module=\"date-toggle\"> <div class=\"row\"> <div class=\"col-sm-6\"> <h3 class=\"header-product\"> <ft-label label.bind=\"getLabel('performance-annualised-heading')\"></ft-label> <small> <ft-label label.bind=\"getLabel('as-of')\"></ft-label> <ft-label label.bind=\"performances.tableData.asOfDate | ftDashIfEmpty\"></ft-label> </small> </h3> <ft-proximal placement=\"PerformanceAnnualizedProximal\" position=\"top\"></ft-proximal> </div> </div> <div class=\"row\"> <div class=\"col-sm-12\"> <div class=\"pull-left\"> <ul class=\"btn-group nav-tabs-button-group\"> <li repeat.for=\"tab of TimePeriodTabs\" role=\"presentation\" class=\"label-tab\" class.bind=\"tab.isActive ? 'active' : ''\"> <a href=\"javascript:void(0)\" class=\"btn\" click.delegate=\"changeTimePeriodTab(tab.key)\" innerhtml.bind=\"getLabel(tab.labelKey)\"></a> </li> </ul> </div> </div> </div> </div> <div class=\"row\"> <div class=\"col-sm-12\"> <div class=\"tab-content1\"> <div id=\"performance-annualised-monthly-pane\" role=\"1tabpanel\" class=\"1tab-pane\"> <div if.bind=\"chartData\" class=\"chart resize-print avoid-page-break-inside\" id=\"performance-annualised-monthly\"> <ft-column-chart hide-sm=\"true\" series.bind=\"chartData\" categories.bind=\"chartCategories\" suffix.bind=\"'%'\"></ft-column-chart> </div> <div class=\"table-responsive\"> <ft-visual-hint></ft-visual-hint> <table id=\"performance-annualised-table-monthly\" class=\"table table-striped table--border-bottom\"> <thead> <tr class=\"header-sortable row\"> <th class=\"col-sm-4 col-xm-6\"> <ft-label label.bind=\"getLabel(currentTimePeriodTab)\"></ft-label> <small> <ft-label label.bind=\"getLabel('as-of')\"></ft-label> <ft-label label.bind=\"performances.tableData.asOfDate | ftDashIfEmpty\"></ft-label> </small> </th> <th scope=\"col\" class=\"text-right\"> <ft-label label.bind=\"getLabel('1-yr')\"></ft-label> </th> <th scope=\"col\" class=\"text-right\"> <ft-label label.bind=\"getLabel('3-yr')\"></ft-label> </th> <th scope=\"col\" class=\"text-right\"> <ft-label label.bind=\"getLabel('5-yr')\"></ft-label> </th> <th scope=\"col\" class=\"text-right\"> <ft-label label.bind=\"getLabel('10-yr')\"></ft-label> </th> <th scope=\"col\" class=\"text-right\"> <ft-label label.bind=\"getLabel('life')\"></ft-label> <small> <ft-label label.bind=\"getLabel('inception')\"></ft-label> <ft-label label.bind=\"performances[0].inceptionDate | ftDashIfEmpty\"></ft-label> </small> </th> </tr> </thead> <tbody> <tr repeat.for=\"row of performances.tableData.rows\" class=\"row\"> <th scope=\"row\" class=\"col-xs-6 col-sm-4\"> <i class=\"chart-key chart-key-show-sm chart-color-${$index + 1}\"></i> <ft-label label.bind=\"row.name\"></ft-label> </th> <td class=\"text-right\" innerhtml.bind=\"row.oneYr | ftDashIfEmpty\"></td> <td class=\"text-right\" innerhtml.bind=\"row.threeYr | ftDashIfEmpty\"></td> <td class=\"text-right\" innerhtml.bind=\"row.fiveYr | ftDashIfEmpty\"></td> <td class=\"text-right\" innerhtml.bind=\"row.tenYr | ftDashIfEmpty\"></td> <td class=\"text-right\" innerhtml.bind=\"row.life | ftDashIfEmpty\"></td> </tr> </tbody> </table> </div> </div> </div> <ft-proximal placement=\"PerformanceAnnualizedProximal\" position=\"bottom\"></ft-proximal> </div> </div> </div> </div> </template> "; });
define('text!components/products/overview/ft-fund-information/etf/ft-fund-information.html', ['module'], function(module) { module.exports = "<template> <div if.bind=\"isPopulated\" class=\"row\"> <div class=\"col-sm-6 col-md-8\"> <div class=\"row\"> <div class=\"col-md-12\" if.bind=\"fundInformation.data.length\"> <h3 class=\"header-product\"> <span innerhtml.bind=\"getLabel('fund-information')\"></span> </h3> <ft-proximal placement=\"FundInformationProximal\" position=\"top\"></ft-proximal> </div> <div class=\"col-md-6\" if.bind=\"fundInformation.data.length\"> <table class=\"table table-text fund-information\"> <tbody> <tr repeat.for=\"item of fundInformationPart1\"> <th scope=\"row\" class=\"col-md-6\"> <span innerhtml.bind=\"getLabel(item.id)\"></span> <ft-footnote if.one-time=\"item.isValid && item.caveatId\" placement.one-time=\"item.caveatId.val\"></ft-footnote> <small if.one-time=\"item.asOf && item.isValid\"> <span innerhtml.bind=\"getLabel('as-of')\"></span> <span innerhtml.bind=\"item.asOf.val\"></span> <span if.one-time=\"item.updateFreq\" innerhtml.bind=\"getLabel(item.updateFreq.val)\"></span> </small> </th> <td class=\"text-right\"> <b innerhtml.bind=\"item.val\"></b> </td> </tr> </tbody> </table> </div> <div class=\"col-md-6\" if.bind=\"fundInformation.data.length\"> <table class=\"table table-text fund-information\"> <tbody> <tr repeat.for=\"item of fundInformationPart2\"> <th scope=\"row\" class=\"col-md-6\"> <span innerhtml.bind=\"getLabel(item.id)\"></span> <ft-footnote if.one-time=\"item.isValid && item.caveatId\" placement.one-time=\"item.caveatId.val\"></ft-footnote> <small if.one-time=\"item.asOf && item.isValid\"> <span innerhtml.bind=\"getLabel('as-of')\"></span> <span innerhtml.bind=\"item.asOf.val\"></span> <span if.one-time=\"item.updateFreq\" innerhtml.bind=\"getLabel(item.updateFreq.val)\"></span> </small> </th> <td class=\"text-right\"> <b innerhtml.bind=\"item.val\"></b> </td> </tr> </tbody> </table> </div> <div class=\"col-md-12\"> <ft-proximal placement=\"FundInformationProximal\" position=\"bottom\"></ft-proximal> </div> </div> </div> <div class=\"col-sm-6 col-md-4\"> <template if.bind=\"salesCharges.data.length\"> <h3 class=\"header-product\"> <span innerhtml.bind=\"getLabel('sales-charges')\"></span> <small if.bind=\"salesCharges.hasData\"> <span innerhtml.bind=\"getLabel('as-of')\"></span> <span innerhtml.bind=\"salesCharges.asOf | ftDashIfEmpty\"></span> <span innerhtml.bind=\"getLabel('updated-monthly')\"></span> </small> </h3> <table class=\"table table-text sales-charges\"> <tbody> <tr repeat.for=\"item of salesCharges.data\"> <th scope=\"row\"> <span innerhtml.bind=\"getLabel(item.id)\"></span> <ft-footnote if.one-time=\"item.caveatId\" placement.one-time=\"item.caveatId.val\"></ft-footnote> <small if.one-time=\"item.asOf && item.isValid\"> <span innerhtml.bind=\"getLabel('as-of')\"></span> <span innerhtml.bind=\"item.asOf.val\"></span> <span if.one-time=\"item.updateFreq\" innerhtml.bind=\"getLabel(item.updateFreq.val)\"></span> </small> </th> <td class=\"text-right\"> <b innerhtml.bind=\"item.val\"></b> </td> </tr> </tbody> </table> </template> <template if.bind=\"identifiers.data.length\"> <h3 class=\"header-product\"> <span innerhtml.bind=\"getLabel('identifiers')\"></span> </h3> <table class=\"table table-text\"> <tbody> <tr repeat.for=\"item of identifiers.data\"> <th scope=\"row\"> <span innerhtml.bind=\"getLabel(item.id)\"></span> <ft-footnote if.one-time=\"item.isValid && item.caveatId\" placement.one-time=\"item.caveatId.val\"></ft-footnote> <small if.one-time=\"item.asOf && item.isValid\"> <span innerhtml.bind=\"getLabel('as-of')\"></span> <span innerhtml.bind=\"item.asOf.val\"></span> <span if.one-time=\"item.updateFreq\" innerhtml.bind=\"getLabel(item.updateFreq.val)\"></span> </small> </th> <td class=\"text-right\"> <b innerhtml.bind=\"item.val\"></b> </td> </tr> </tbody> </table> </template> </div> <div class=\"col-sm-6 col-md-4\"> <template if.bind=\"tradingCharacteristics.hasData\"> <h3 class=\"header-product\"> <span innerhtml.bind=\"getLabel('trading-characteristics')\"></span> <small if.one-time=\"tradingCharacteristics.value !== '&#8212;'\"> <span innerhtml.bind=\"getLabel('as-of')\"></span> <span innerhtml.bind=\"tradingCharacteristics.asOf\"></span> <span innerhtml.bind=\"getLabel('updated-daily')\"></span> </small> </h3> <table class=\"table table-text\"> <tbody> <tr> <th scope=\"row\"> <span innerhtml.bind=\"getLabel('shares-outstanding')\"></span> <ft-footnote if.one-time=\"tradingCharacteristics.value\" placement=\"SharesOutstandingOverview\"></ft-footnote> </th> <td class=\"text-right\"> <b innerhtml.bind=\"tradingCharacteristics.value\"></b> </td> </tr> </tbody> </table> </template> <template if.bind=\"distributions.hasData && distributions.data.length\"> <h3 class=\"header-product\"> <span innerhtml.bind=\"getLabel('distributions')\"></span> <ft-footnote placement=\"DividendsOverview\"></ft-footnote> </h3> <table class=\"table table-text dividends\"> <tbody> <tr repeat.for=\"item of distributions.data\"> <th scope=\"row\"> <span innerhtml.bind=\"getLabel(item.id)\"></span> <ft-footnote if.one-time=\"item.isValid && item.caveatId\" placement.one-time=\"item.caveatId.val\"></ft-footnote> <small if.one-time=\"item.asOf && item.isValid\"> <span innerhtml.bind=\"getLabel('as-of')\"></span> <span innerhtml.bind=\"item.asOf.val\"></span> <span if.one-time=\"item.updateFreq\" innerhtml.bind=\"getLabel(item.updateFreq.val)\"></span> </small> </th> <td class=\"text-right\"> <b innerhtml.bind=\"item.val\"></b> </td> </tr> </tbody> </table> </template> </div> </div> </template> "; });
define('text!components/products/overview/ft-trading-information/etf/ft-trading-information.html', ['module'], function(module) { module.exports = "<template> <div if.bind=\"isPopulated && hasData\"> <h2 class=\"header-product\"> <span innerhtml.bind=\"getLabel('trading-information')\"></span> </h2> <ft-proximal placement=\"TradingInformationProximal\" position=\"top\"></ft-proximal> <div class=\"table-responsive\"> <ft-visual-hint></ft-visual-hint> <table class=\"table table-striped\"> <thead> <tr class=\"header-utilities\"> <th colspan=\"6\"> <div class=\"form-inline\"> <div class=\"form-group\"> <span innerhtml.bind=\"getLabel('select-exchange')\"></span> <select value.bind=\"selectedExchange\" class=\"form-control\"> <option model.bind=\"''\" innerhtml.bind=\"getLabel('list-all-exchanges')\"> </option> <option repeat.for=\"exchangeName of exchangeNames\" model.bind=\"exchangeName\" innerhtml.bind=\"exchangeName\"> </option> </select> </div> </div> </th> </tr> <tr class=\"header-sortable\"> <th as-element=\"ft-th-sortable\" sort.bind=\"sortFilters.exchangeName\" click-callback.call=\"changeSort('exchangeName')\" title.one-time=\"getLabel('exchange-name-column')\"></th> <th as-element=\"ft-th-sortable\" sort.bind=\"sortFilters.ticker\" click-callback.call=\"changeSort('ticker')\" title.one-time=\"getLabel('ticker-column')\"></th> <th as-element=\"ft-th-sortable\" sort.bind=\"sortFilters.currency\" click-callback.call=\"changeSort('currency')\" title.one-time=\"getLabel('currency-column')\"></th> <th as-element=\"ft-th-sortable\" sort.bind=\"sortFilters.bloombergTicker\" click-callback.call=\"changeSort('bloombergTicker')\" title.one-time=\"getLabel('bloomberg-ticker-column')\"></th> <th as-element=\"ft-th-sortable\" sort.bind=\"sortFilters.ric\" click-callback.call=\"changeSort('ric')\" title.one-time=\"getLabel('ric-column')\"></th> <th class=\"text-right\" as-element=\"ft-th-sortable\" sort.bind=\"sortFilters.sedol\" click-callback.call=\"changeSort('sedol')\" title.one-time=\"getLabel('sedol-column')\"></th> </tr> </thead> <tbody> <tr repeat.for=\"exchange of filteredExchanges\"> <td innerhtml.one-time=\"exchange.name\"></td> <td innerhtml.one-time=\"exchange.ticker\"></td> <td innerhtml.one-time=\"exchange.currency\"></td> <td innerhtml.one-time=\"exchange.bloombergTicker\"></td> <td innerhtml.one-time=\"exchange.ric\"></td> <td class=\"text-right\" innerhtml.one-time=\"exchange.sedol\"></td> </tr> </tbody> </table> </div> </div> <div> <ft-proximal placement=\"TradingInformationProximal\" position=\"bottom\"></ft-proximal> </div> </template> "; });
define('text!components/products/portfolio/ft-geographic-allocation/etf/ft-geographic-allocation.html', ['module'], function(module) { module.exports = "<template> <div if.bind=\"!isPopulated && data.visible === false\" class=\"portfolio-debug\" innerhtml.bind=\"data | ftJson\" hidden> </div> <div if.bind=\"isPopulated\"> <div class=\"${(data.showChart || data.spanRow) ? 'col-sm-12' : 'col-sm-6'}\"> <div class=\"row\"> <div class=\"col-sm-12 col-xs-12\"> <h3 class=\"header-product\"> <span innerhtml.bind=\"getLabel('geographic-breakdown-heading')\"></span> <ft-footnote placement=\"GeographicAllocation\"></ft-footnote> <small> <span innerhtml.bind=\"getLabel('as-of')\"></span> <span innerhtml.bind=\"data.date | ftDashIfEmpty\"></span> (<span innerhtml.bind=\"data.calType\"></span>) <span if.bind=\"data.refreshRate\" innerhtml.bind=\"getLabel(data.refreshRate)\"></span> </small> </h3> <ft-proximal placement=\"GeographicAllocationProximal\" position=\"top\"></ft-proximal> </div> </div> <div class=\"row\"> <div class=\"col-sm-7\" if.bind=\"data.showChart\"> <ft-bar-chart suffix.bind=\"'%'\" series.bind=\"chartData\"></ft-bar-chart> </div> <div class=\"${data.showChart ? 'col-sm-5' : 'col-sm-12'}\"> <table class=\"table table-text table-legend table-text--expandable\"> <thead> <tr> <td if.bind=\"data.hasNestedChildren\"> <a click.delegate=\"expandAll()\"><span innerhtml.bind=\"getLabel('expand-all')\"></span></a> | <a click.delegate=\"collapseAll()\"><span innerhtml.bind=\"getLabel('collapse-all')\"></span></a> </td> <td if.bind=\"!data.hasNestedChildren\"></td> <th class=\"text-right\" innerhtml.bind=\"getLabel('market-capitalisation-fund')\"></th> <th class=\"text-right\" innerhtml.bind=\"getLabel('investment-universe')\"></th> </tr> </thead> <tbody repeat.for=\"row of data.tableTwoLevel\"> <tr if.bind=\"(!row.inOverflow || isShowingMore) && (row.isParentNode || row.isExpanded)\"> <th if.bind=\"row.isParentNode && row.hasChildren\" scope=\"row\" click.delegate=\"toggleRowExpansion(row)\" scope=\"row\" class=\"table-text__header\"> <a href=\"javascript:void(0)\" class=\"table-text__toggle ${row.isExpanded ? 'table-text__toggle--expanded' : ''}\"> <span class=\"table-text__header-wrapper\"> <span class=\"table-text__icon-wrapper\"> <i class=\"chart-key ${row.graphColour}\"></i> </span> <span class=\"table-text__header-text\">${row.name}</span> </span> </a> </th> <th if.bind=\"row.isParentNode && !row.hasChildren\" scope=\"row\" class=\"table-text__header\"> <span class=\"table-text__header-wrapper\"> <span class=\"table-text__icon-wrapper table-text__icon-wrapper--no-children\"> <i class=\"chart-key ${row.graphColour}\"></i> </span> <span class=\"table-text__header-text\">${row.name}</span> </span> </th> <td if.bind=\"row.isParentNode\"> <b innerhtml.bind=\"row.val | ftFormatPercentage\"></b> </td> <td if.bind=\"row.isParentNode\" class=\"col-xs-4\"> <b innerhtml.bind=\"row.bmVal | ftFormatPercentage\"></b> </td> <th if.bind=\"!row.isParentNode\" class=\"table-text__header--no-key\"> <span class=\"table-text__header-wrapper\"> <span class=\"table-text__header-text table-text__header-nested\"> ${row.name} </span> </span> </th> <td if.bind=\"!row.isParentNode\"> <b innerhtml.bind=\"row.val | ftFormatPercentage\"></b> </td> <td if.bind=\"!row.isParentNode\"> <b innerhtml.bind=\"row.bmVal | ftFormatPercentage\"></b> </td> </tr> </tbody> </table> <p if.bind=\"data.hasOverflow\"> <a click.delegate=\"toggleShowMore()\"> <span if.bind=\"!isShowingMore\" innerhtml.bind=\"getLabel('view-more')\"></span> <span if.bind=\"isShowingMore\" innerhtml.bind=\"getLabel('view-less')\"></span> </a> </p> </div> </div> <ft-proximal placement=\"GeographicAllocationProximal\" position=\"bottom\"></ft-proximal> </div> </div> </template> "; });
define('text!components/products/portfolio/ft-holdings/etf/ft-holdings.html', ['module'], function(module) { module.exports = "<template> <div if.bind=\"!isPopulated && data.visible === false\" class=\"portfolio-debug\" innerhtml.bind=\"'loaded-not-no-data' | ftJson\" hidden> </div> <div if.bind=\"isPopulated\"> <div class=\"row\"> <div class=\"col-sm-6 col-xs-12\"> <h3 class=\"header-product container\"> <ft-label innerhtml.one-time=\"getLabel('holdings')\"></ft-label> <small> <ft-label innerhtml.one-time=\"getLabel('as-of')\"></ft-label> <ft-label innerhtml.one-time=\"holdings.asOfDate\"></ft-label> <span if.bind=\"data.refreshRate\" innerhtml.bind=\"getLabel(holdings.refreshRate)\"></span> </small> </h3> </div> <ft-proximal placement=\"HoldingsProximal\" position=\"top\"></ft-proximal> <p class=\"col-sm-6 col-xs-12\"> <a class=\"btn btn-secondary pull-right\" href.bind=\"downloadUrl & oneTime\" target=\"_blank\" download=\"\"> <i class=\"ft-icon ft-icon-download\"></i> <ft-label innerhtml.one-time=\"getLabel('download-all-holdings')\"></ft-label> (<span innerhtml.one-time=\"getLabel('xls-file-extension')\"></span>) </a> </p> </div> <div class=\"table-responsive\" if.bind=\"!hasResults\"> <table class=\"table table-striped responsive\"> <thead> <tr class=\"header-utilities\"> <th colspan=\"7\"> <div class=\"input-group hidden-print\"> <input type=\"text\" class=\"form-control filter-inbox\" placeholder.one-time=\"getLabel('search-fields')\" title.one-time=\"getLabel('search-fields')\" value.bind=\"searchString & debounce:500\"> <span class=\"input-group-addon bg-primary\"> <span class=\"ft-icon ft-icon-search\"></span> </span> </div> </th> </tr> <tr class=\"header-sortable\"> <th scope=\"col\" class=\"\" as-element=\"ft-th-sortable\" title.one-time=\"getLabel('ticker')\" sort.bind=\"sort.columns.get('TICKER')\" click-callback.call=\"changeSort('TICKER')\"></th> <th scope=\"col\" class=\"\" as-element=\"ft-th-sortable\" title.one-time=\"getLabel('isin')\" sort.bind=\"sort.columns.get('ISIN')\" click-callback.call=\"changeSort('ISIN')\"></th> <th scope=\"col\" class=\"\" as-element=\"ft-th-sortable\" title.one-time=\"getLabel('security-name')\" sort.bind=\"sort.columns.get('HOLDING_NAME')\" click-callback.call=\"changeSort('HOLDING_NAME')\" footnote-placement=\"Holdings\"></th> <th scope=\"col\" class=\"\" as-element=\"ft-th-sortable\" title.one-time=\"getLabel('sector')\" sort.bind=\"sort.columns.get('SECTOR')\" click-callback.call=\"changeSort('SECTOR')\" footnote-placement=\"Sector\"></th> <th scope=\"col\" class=\"text-right\" as-element=\"ft-th-sortable\" title.one-time=\"getLabel('weight')\" sort.bind=\"sort.columns.get('WEIGHT')\" click-callback.call=\"changeSort('WEIGHT')\" footnote-placement=\"Weight\"></th> <th scope=\"col\" class=\"text-right\" as-element=\"ft-th-sortable\" title.one-time=\"getLabel('market-value')\" sort.bind=\"sort.columns.get('MARKET_VALUE')\" click-callback.call=\"changeSort('MARKET_VALUE')\" footnote-placement=\"MarketValue\"></th> <th scope=\"col\" class=\"text-right\" if.one-time=\"holdings.showNotionalValue\" as-element=\"ft-th-sortable\" title.one-time=\"getLabel('notional-value')\" sort.bind=\"sort.columns.get('NOTIONAL_VALUE')\" click-callback.call=\"changeSort('NOTIONAL_VALUE')\" footnote-placement=\"NotionalValue\"></th> </tr> </thead> <tbody> <tr> <td colspan=\"7\"> <p innerhtml.bind=\"getLabel('no-results-message')\"></p> </td> </tr> </tbody> </table> </div> <div class=\"table-responsive table-responsive__no-bottom-margin\" if.bind=\"hasResults\"> <ft-visual-hint></ft-visual-hint> <table class=\"table table-striped responsive\"> <thead> <tr class=\"header-utilities\"> <th colspan=\"7\"> <div class=\"input-group hidden-print\"> <input type=\"text\" class=\"form-control filter-inbox\" placeholder.one-time=\"getLabel('search-fields')\" title.one-time=\"getLabel('search-fields')\" value.bind=\"searchString & debounce:500\"> <span class=\"input-group-addon bg-primary\"> <span class=\"ft-icon ft-icon-search\"></span> </span> </div> </th> </tr> <tr class=\"header-sortable\"> <th scope=\"col\" class=\"\" as-element=\"ft-th-sortable\" title.one-time=\"getLabel('ticker')\" sort.bind=\"sort.columns.get('TICKER')\" click-callback.call=\"changeSort('TICKER')\"></th> <th scope=\"col\" class=\"\" as-element=\"ft-th-sortable\" title.one-time=\"getLabel('isin')\" sort.bind=\"sort.columns.get('ISIN')\" click-callback.call=\"changeSort('ISIN')\"></th> <th scope=\"col\" class=\"\" as-element=\"ft-th-sortable\" title.one-time=\"getLabel('security-name')\" sort.bind=\"sort.columns.get('HOLDING_NAME')\" click-callback.call=\"changeSort('HOLDING_NAME')\" footnote-placement=\"Holdings\"></th> <th scope=\"col\" class=\"\" as-element=\"ft-th-sortable\" title.one-time=\"getLabel('sector')\" sort.bind=\"sort.columns.get('SECTOR')\" click-callback.call=\"changeSort('SECTOR')\" footnote-placement=\"Sector\"></th> <th scope=\"col\" class=\"text-right\" as-element=\"ft-th-sortable\" title.one-time=\"getLabel('weight')\" sort.bind=\"sort.columns.get('WEIGHT')\" click-callback.call=\"changeSort('WEIGHT')\" footnote-placement=\"Weight\"></th> <th scope=\"col\" class=\"text-right\" as-element=\"ft-th-sortable\" title.one-time=\"getLabel('market-value')\" sort.bind=\"sort.columns.get('MARKET_VALUE')\" click-callback.call=\"changeSort('MARKET_VALUE')\" footnote-placement=\"MarketValue\"></th> <th scope=\"col\" class=\"text-right\" if.one-time=\"holdings.showNotionalValue\" as-element=\"ft-th-sortable\" title.one-time=\"getLabel('notional-value')\" sort.bind=\"sort.columns.get('NOTIONAL_VALUE')\" click-callback.call=\"changeSort('NOTIONAL_VALUE')\" footnote-placement=\"NotionalValue\"></th> </tr> </thead> <tbody> <tr repeat.for=\"row of paginatedRows\"> <td innerhtml.bind=\"row.ticker\"></td> <td innerhtml.bind=\"row.isin\"></td> <td innerhtml.bind=\"row.holdingName\"></td> <td innerhtml.bind=\"row.sector\"></td> <td innerhtml.bind=\"row.weight | ftFormatPercentage\" class=\"text-right\"></td> <td innerhtml.bind=\"row.marketValue | ftFormatCurrency: holdings.currencySymbol\" class=\"text-right\"></td> <td if.bind=\"holdings.showNotionalValue\" class=\"text-right\"> <span innerhtml.bind=\"row.notionalValue\"></span> </td> </tr> </tbody> </table> </div> <ft-pagination if.bind=\"hasResults\" label.bind=\"label\" paging-info.bind=\"pagingInfo & debounce:0\" go-to-page.call=\"goToPage(page)\"></ft-pagination> <ft-proximal placement=\"HoldingsProximal\" position=\"bottom\"></ft-proximal> </div> </template> "; });
define('text!components/products/portfolio/ft-portfolio-statistics-and-positions/etf/ft-portfolio-statistics-and-positions.html', ['module'], function(module) { module.exports = "<template> <div if.bind=\"isPopulated\"> <div class=\"row\"> <div class=\"col-xs-12\"> <h3 class=\"header-product\"> <ft-label label.bind=\"getLabel('portfolio-statistics-heading')\"></ft-label> </h3> <ft-proximal placement=\"StatisticsProximal\" position=\"top\"></ft-proximal> </div> </div> <div class=\"row hidden-lg portfolio-stats\"> <div class=\"col-md-6\"> <table class=\"table table-text table-no-bottom-margin\"> <tbody> <tr repeat.for=\"item of dataFirstHalf\"> <th scope=\"row\"> <span innerhtml.bind=\"getLabel(item.id)\"></span> <ft-footnote if.one-time=\"item.isValid && item.caveatId\" placement.one-time=\"item.caveatId.val\"></ft-footnote> <small if.one-time=\"item.asOf && item.isValid\"> <span innerhtml.bind=\"getLabel('as-of')\"></span> <span innerhtml.bind=\"item.asOf.val\"></span> <span innerhtml.bind=\"getLabel(item.updateFreq.val)\"></span> </small> </th> <td class=\"text-right\"> <b innerhtml.bind=\"item.val\"></b> </td> </tr> </tbody> </table> </div> <div class=\"col-md-6\"> <table class=\"table table-text\"> <tbody> <tr repeat.for=\"item of dataSecondHalf\"> <th scope=\"row\"> <span innerhtml.bind=\"getLabel(item.id)\"></span> <ft-footnote if.one-time=\"item.isValid && item.caveatId\" placement.one-time=\"item.caveatId.val\"></ft-footnote> <small if.one-time=\"item.asOf && item.isValid\"> <span innerhtml.bind=\"getLabel('as-of')\"></span> <span innerhtml.bind=\"item.asOf.val\"></span> <span innerhtml.bind=\"getLabel(item.updateFreq.val)\"></span> </small> </th> <td class=\"text-right\"> <b innerhtml.bind=\"item.val\"></b> </td> </tr> </tbody> </table> </div> </div> <div class=\"row hidden-xs hidden-md hidden-sm\"> <div class=\"col-lg-4\"> <table class=\"table table-text\"> <tbody> <tr repeat.for=\"item of dataFirstThird\"> <th scope=\"row\"> <span innerhtml.bind=\"getLabel(item.id)\"></span> <ft-footnote if.one-time=\"item.isValid && item.caveatId\" placement.one-time=\"item.caveatId.val\"></ft-footnote> <small if.one-time=\"item.asOf && item.isValid\"> <span innerhtml.bind=\"getLabel('as-of')\"></span> <span innerhtml.bind=\"item.asOf.val\"></span> <span innerhtml.bind=\"getLabel(item.updateFreq.val)\"></span> </small> </th> <td class=\"text-right\"> <b innerhtml.bind=\"item.val\"></b> </td> </tr> </tbody> </table> </div> <div class=\"col-lg-4\"> <table class=\"table table-text\"> <tbody> <tr repeat.for=\"item of dataSecondThird\"> <th scope=\"row\"> <span innerhtml.bind=\"getLabel(item.id)\"></span> <ft-footnote if.one-time=\"item.isValid && item.caveatId\" placement.one-time=\"item.caveatId.val\"></ft-footnote> <small if.one-time=\"item.asOf && item.isValid\"> <span innerhtml.bind=\"getLabel('as-of')\"></span> <span innerhtml.bind=\"item.asOf.val\"></span> <span innerhtml.bind=\"getLabel(item.updateFreq.val)\"></span> </small> </th> <td class=\"text-right\"> <b innerhtml.bind=\"item.val\"></b> </td> </tr> </tbody> </table> </div> <div class=\"col-lg-4\"> <table class=\"table table-text\"> <tbody> <tr repeat.for=\"item of dataLastThird\"> <th scope=\"row\"> <span innerhtml.bind=\"getLabel(item.id)\"></span> <ft-footnote if.one-time=\"item.isValid && item.caveatId\" placement.one-time=\"item.caveatId.val\"></ft-footnote> <small if.one-time=\"item.asOf && item.isValid\"> <span innerhtml.bind=\"getLabel('as-of')\"></span> <span innerhtml.bind=\"item.asOf.val\"></span> <span innerhtml.bind=\"getLabel(item.updateFreq.val)\"></span> </small> </th> <td class=\"text-right\"> <b innerhtml.bind=\"item.val\"></b> </td> </tr> </tbody> </table> </div> </div> <ft-proximal placement=\"StatisticsProximal\" position=\"bottom\"></ft-proximal> </div> </template> "; });
define('text!components/products/portfolio/ft-sector-allocation/etf/ft-sector-allocation.html', ['module'], function(module) { module.exports = "<template> <div if.bind=\"!isPopulated && data.visible === false\" class=\"portfolio-debug\" innerhtml.bind=\"data | ftJson\" hidden> </div> <div if.bind=\"isPopulated\"> <div class=\"${(data.showChart || data.spanRow) ? 'col-sm-12' : 'col-sm-6'}\"> <div class=\"row\"> <div class=\"col-sm-12 col-xs-12\"> <h3 class=\"header-product\"> <span innerhtml.bind=\"getLabel(data.labelId)\"></span> <ft-footnote placement.bind=\"data.caveatFootnote\"></ft-footnote> <small> <span innerhtml.bind=\"getLabel('as-of')\"></span> <span innerhtml.bind=\"data.date | ftDashIfEmpty\"></span> (<span innerhtml.bind=\"data.calType\"></span>) <span if.bind=\"data.refreshRate\" innerhtml.bind=\"getLabel(data.refreshRate)\"></span> </small> </h3> <ft-proximal placement.bind=\"data.caveatProximal\" position=\"top\"></ft-proximal> </div> </div> <div class=\"row\"> <div class=\"col-sm-7\" if.bind=\"data.showChart\"> <ft-bar-chart suffix.bind=\"'%'\" series.bind=\"chartData\"></ft-bar-chart> </div> <div class=\"${data.showChart ? 'col-sm-5' : 'col-sm-12'}\"> <table class=\"table table-text table-legend\"> <thead> <tr> <th>&nbsp;</th> <th class=\"text-right\" innerhtml.bind=\"getLabel('market-capitalisation-fund')\"></th> <th class=\"text-right\" innerhtml.bind=\"getLabel('investment-universe')\"></th> </tr> </thead> <tbody> <tr repeat.for=\"row of data.table\"> <th scope=\"row\"> <span class=\"table-text__header-wrapper\"> <span if.bind=\"data.showChart\" class=\"table-text__icon-wrapper\"> <i class=\"chart-key ${row.graphColour}\"></i> </span> <span class=\"table-text__header-text\"> ${ row.name } </span> </span> </th> <td> <b> <span innerhtml.bind=\"row.val | ftFormatPercentage\"></span> </b> </td> <td> <b> <span innerhtml.bind=\"row.bmVal | ftFormatPercentage\"></span> </b> </td> </tr> </tbody> </table> </div> </div> <ft-proximal placement.bind=\"data.caveatProximal\" position=\"bottom\"></ft-proximal> </div> </div> </template> "; });
define('text!components/products/tax/ft-german-tax/etf/ft-german-tax.html', ['module'], function(module) { module.exports = "<template> <div if.bind=\"isPopulated\"> <small> <ft-label label.bind=\"getLabel('as-of')\"></ft-label> <ft-label label.bind=\"asOf\"></ft-label> <ft-label label.bind=\"getLabel('updated-daily')\"></ft-label> </small> <table class=\"table table-striped\"> <thead> <tr> <th innerhtml.one-time=\"getLabel('fund-name')\"></th> <th innerhtml.one-time=\"getLabel('isin')\"></th> <th innerhtml.one-time=\"getLabel('fund-base-currency')\"></th> <th innerhtml.one-time=\"getLabel('nav')\"></th> <th innerhtml.one-time=\"getLabel('interim-profit')\"></th> <th innerhtml.one-time=\"getLabel('equity-gain')\"></th> <th innerhtml.one-time=\"getLabel('kstg-equity-gain')\"></th> <th innerhtml.one-time=\"getLabel('real-estate-gain')\"></th> <th innerhtml.one-time=\"getLabel('accumulated-deemed-dist')\"></th> </tr> </thead> <tbody> <tr repeat.for=\"fund of funds\"> <td innerhtml.one-time=\"fund.fundName\"></td> <td innerhtml.one-time=\"fund.isin|ftReplaceDashWith:getLabel('no-information')\"></td> <td> <span innerhtml.one-time=\"fund.baseCurrency|ftReplaceDashWith:getLabel('no-information')\"></span> </td> <td innerhtml.one-time=\"fund.nav|ftReplaceDashWith:getLabel('no-information')\"></td> <td> <span innerhtml.one-time=\"fund.interimProfit|ftReplaceDashWith:getLabel('no-information')\"></span> <ft-footnote if.bind=\"fund.intrmProfitStd && fund.intrmProfitStd>0\" placement=\"InterimProfitPositive\"></ft-footnote> <ft-footnote if.bind=\"fund.intrmProfitStd && fund.intrmProfitStd<0\" placement=\"InterimProfitNegative\"></ft-footnote> </td> <td innerhtml.one-time=\"fund.equityGainEstG|ftReplaceDashWith:getLabel('no-information')\"></td> <td innerhtml.one-time=\"fund.equityGainKstG|ftReplaceDashWith:getLabel('no-information')\"></td> <td innerhtml.one-time=\"fund.realEstateProfit|ftReplaceDashWith:getLabel('no-information')\"></td> <td innerhtml.one-time=\"fund.addi|ftReplaceDashWith:getLabel('no-information')\"></td> </tr> </tbody> </table> </div> </template> "; });
//# sourceMappingURL=web-platform-etf.js.map