From 813292220fd3f654b00a1a1936ede12a68130676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Musia=C5=82owski?= <105275628+kamil-musialowski@users.noreply.github.com> Date: Fri, 29 Nov 2024 15:20:44 +0100 Subject: [PATCH] Added Morningstar to HC namespace. (#46) * Added Morningstar to HC namespace. * Changed namespace to HighchartsConnectors. * Change old namespace to new one. * Namespace adjustments for new docs. * Added new keyword. --- .eslintrc | 2 +- demos/dashboards-investment-screener/demo.js | 2 +- demos/dashboards-risk-score/demo.js | 2 +- demos/dashboards-rna-news/demo.js | 2 +- demos/stock-ohlcv/demo.js | 4 ++-- demos/stock-securitydetails/demo.js | 4 ++-- demos/stock-timeseries/demo.js | 4 ++-- docs/connectors/morningstar.md | 2 +- docs/connectors/morningstar/goal-analysis.md | 2 +- docs/connectors/morningstar/regulatory-news-announcements.md | 2 +- docs/connectors/morningstar/risk-score.md | 2 +- docs/connectors/morningstar/screeners/investment-screener.md | 2 +- docs/connectors/morningstar/security-details.md | 2 +- docs/connectors/morningstar/time-series/cumulative-return.md | 2 +- docs/connectors/morningstar/time-series/dividend.md | 2 +- docs/connectors/morningstar/time-series/growth.md | 2 +- docs/connectors/morningstar/time-series/ohlcv.md | 2 +- docs/connectors/morningstar/time-series/price.md | 2 +- docs/connectors/morningstar/time-series/time-series.md | 2 +- docs/connectors/morningstar/x-ray.md | 2 +- src/CLI/Library/APIServer.ts | 2 +- webpack.config.ts | 4 ++-- 22 files changed, 26 insertions(+), 26 deletions(-) diff --git a/.eslintrc b/.eslintrc index e57cceb..4c3038c 100644 --- a/.eslintrc +++ b/.eslintrc @@ -9,7 +9,7 @@ "jasmine": true }, "globals": { - "Connectors": true, + "HighchartsConnectors": true, "Dashboards": true, "Highcharts": true }, diff --git a/demos/dashboards-investment-screener/demo.js b/demos/dashboards-investment-screener/demo.js index 777b671..8e4cb4b 100644 --- a/demos/dashboards-investment-screener/demo.js +++ b/demos/dashboards-investment-screener/demo.js @@ -206,7 +206,7 @@ async function getPostmanJSON (htmlInputFile) { for (file of htmlInputFile.files) { try { fileJSON = JSON.parse(await file.text()); - if (Connectors.Morningstar.isPostmanEnvironmentJSON(fileJSON)) { + if (HighchartsConnectors.Morningstar.isPostmanEnvironmentJSON(fileJSON)) { break; } } catch (error) { diff --git a/demos/dashboards-risk-score/demo.js b/demos/dashboards-risk-score/demo.js index 2c057f8..cbecef1 100644 --- a/demos/dashboards-risk-score/demo.js +++ b/demos/dashboards-risk-score/demo.js @@ -231,7 +231,7 @@ async function getPostmanJSON (htmlInputFile) { for (file of htmlInputFile.files) { try { fileJSON = JSON.parse(await file.text()); - if (Connectors.Morningstar.isPostmanEnvironmentJSON(fileJSON)) { + if (HighchartsConnectors.Morningstar.isPostmanEnvironmentJSON(fileJSON)) { break; } } catch (error) { diff --git a/demos/dashboards-rna-news/demo.js b/demos/dashboards-rna-news/demo.js index 3cdcb9f..0c011a5 100644 --- a/demos/dashboards-rna-news/demo.js +++ b/demos/dashboards-rna-news/demo.js @@ -178,7 +178,7 @@ async function getPostmanJSON (htmlInputFile) { for (file of htmlInputFile.files) { try { fileJSON = JSON.parse(await file.text()); - if (Connectors.Morningstar.isPostmanEnvironmentJSON(fileJSON)) { + if (HighchartsConnectors.Morningstar.isPostmanEnvironmentJSON(fileJSON)) { break; } } catch (error) { diff --git a/demos/stock-ohlcv/demo.js b/demos/stock-ohlcv/demo.js index 005bff1..ecf444c 100644 --- a/demos/stock-ohlcv/demo.js +++ b/demos/stock-ohlcv/demo.js @@ -3,7 +3,7 @@ async function displayOHLCV (postmanJSON) { const startDate = new Date(new Date().setDate(endDate.getDate() - 30)); const securityId = 'XIUSA000O2'; - const ohlcvConnector = new Connectors.Morningstar.TimeSeriesConnector({ + const ohlcvConnector = new HighchartsConnectors.Morningstar.TimeSeriesConnector({ postman: { environmentJSON: postmanJSON }, @@ -54,7 +54,7 @@ async function getPostmanJSON (htmlInputFile) { for (file of htmlInputFile.files) { try { fileJSON = JSON.parse(await file.text()); - if (Connectors.Morningstar.isPostmanEnvironmentJSON(fileJSON)) { + if (HighchartsConnectors.Morningstar.isPostmanEnvironmentJSON(fileJSON)) { break; } } catch (error) { diff --git a/demos/stock-securitydetails/demo.js b/demos/stock-securitydetails/demo.js index 3dcf2e4..21d10b3 100644 --- a/demos/stock-securitydetails/demo.js +++ b/demos/stock-securitydetails/demo.js @@ -1,7 +1,7 @@ async function displaySecurityDetails (postmanJSON) { const securityId = 'F0GBR050DD'; - const connector = new Connectors.Morningstar.SecurityDetailsConnector({ + const connector = new HighchartsConnectors.Morningstar.SecurityDetailsConnector({ postman: { environmentJSON: postmanJSON }, @@ -50,7 +50,7 @@ async function getPostmanJSON (htmlInputFile) { for (file of htmlInputFile.files) { try { fileJSON = JSON.parse(await file.text()); - if (Connectors.Morningstar.isPostmanEnvironmentJSON(fileJSON)) { + if (HighchartsConnectors.Morningstar.isPostmanEnvironmentJSON(fileJSON)) { break; } } catch (error) { diff --git a/demos/stock-timeseries/demo.js b/demos/stock-timeseries/demo.js index e4189b0..2916e58 100644 --- a/demos/stock-timeseries/demo.js +++ b/demos/stock-timeseries/demo.js @@ -10,7 +10,7 @@ document.getElementById('postman-json').addEventListener( target.parentNode.style.display = 'none'; - const priceConnector = new Connectors.Morningstar.TimeSeriesConnector({ + const priceConnector = new HighchartsConnectors.Morningstar.TimeSeriesConnector({ postman: { environmentJSON: postmanJSON }, @@ -53,7 +53,7 @@ async function getPostmanJSON (htmlInputFile) { for (file of htmlInputFile.files) { try { fileJSON = JSON.parse(await file.text()); - if (Connectors.Morningstar.isPostmanEnvironmentJSON(fileJSON)) { + if (HighchartsConnectors.Morningstar.isPostmanEnvironmentJSON(fileJSON)) { break; } } catch (error) { diff --git a/docs/connectors/morningstar.md b/docs/connectors/morningstar.md index 9f64e1f..422e090 100644 --- a/docs/connectors/morningstar.md +++ b/docs/connectors/morningstar.md @@ -34,7 +34,7 @@ products and Highcharts Dashboards. You can connect Highcharts core products with Morningstar by using `connectors-morningstar.js` in the `connectors-morningstar` bundle. You have to manually create the connector and -assing the resulting table to your series options. +assign the resulting table to your series options. diff --git a/docs/connectors/morningstar/goal-analysis.md b/docs/connectors/morningstar/goal-analysis.md index a1f472e..da3a358 100644 --- a/docs/connectors/morningstar/goal-analysis.md +++ b/docs/connectors/morningstar/goal-analysis.md @@ -17,7 +17,7 @@ and dashboards. In order to fetch the analysis, you can request for example: ```js -const goalAnalysisConnector = MC.GoalAnalysisConnector({ +const goalAnalysisConnector = new HighchartsConnectors.Morningstar.GoalAnalysisConnector({ postman: { environmentJSON: postmanJSON }, diff --git a/docs/connectors/morningstar/regulatory-news-announcements.md b/docs/connectors/morningstar/regulatory-news-announcements.md index bb1cbb9..ac61e3c 100644 --- a/docs/connectors/morningstar/regulatory-news-announcements.md +++ b/docs/connectors/morningstar/regulatory-news-announcements.md @@ -17,7 +17,7 @@ or `maxStories`. ### RNANews with Morningstar standalone for Highcharts: ```js -const rnaNewsConnector = new Connectors.Morningstar.RNANewsConnector({ +const rnaNewsConnector = new HighchartsConnectors.Morningstar.RNANewsConnector({ postman: { environmentJSON: postmanJSON }, diff --git a/docs/connectors/morningstar/risk-score.md b/docs/connectors/morningstar/risk-score.md index 74898f8..7ae3020 100644 --- a/docs/connectors/morningstar/risk-score.md +++ b/docs/connectors/morningstar/risk-score.md @@ -36,7 +36,7 @@ For more details, see [Morningstar’s RiskScore API]. ### Risk Score with Morningstar standalone for Highcharts: ```js -const riskScoreConnector = new Connectors.Morningstar.RiskScoreConnector({ +const riskScoreConnector = new HighchartsConnectors.Morningstar.RiskScoreConnector({ postman: { environmentJSON: postmanJSON }, diff --git a/docs/connectors/morningstar/screeners/investment-screener.md b/docs/connectors/morningstar/screeners/investment-screener.md index 74e245e..79d7c30 100644 --- a/docs/connectors/morningstar/screeners/investment-screener.md +++ b/docs/connectors/morningstar/screeners/investment-screener.md @@ -26,7 +26,7 @@ This connector is designed to be interacted with using external buttons, that mi Here is an example of how to use the Investment Screener connector: ```js -const screenerConnector = MC.InvestmentScreenerConnector({ +const screenerConnector = new HighchartsConnectors.Morningstar.InvestmentScreenerConnector({ page: 1, pageSize: 20, languageId: 'en-GB', diff --git a/docs/connectors/morningstar/security-details.md b/docs/connectors/morningstar/security-details.md index 99367af..28ce82b 100644 --- a/docs/connectors/morningstar/security-details.md +++ b/docs/connectors/morningstar/security-details.md @@ -23,7 +23,7 @@ For more details, see [Morningstar’s Security Details API]. ### Security Details with Morningstar standalone for Highcharts: ```js -const securityDetailsConnector = new Connectors.Morningstar.SecurityDetailsConnector({ +const securityDetailsConnector = new HighchartsConnectors.Morningstar.SecurityDetailsConnector({ postman: { environmentJSON: postmanJSON }, diff --git a/docs/connectors/morningstar/time-series/cumulative-return.md b/docs/connectors/morningstar/time-series/cumulative-return.md index 110a1e5..30e0d71 100644 --- a/docs/connectors/morningstar/time-series/cumulative-return.md +++ b/docs/connectors/morningstar/time-series/cumulative-return.md @@ -16,7 +16,7 @@ In order to fetch a cumulative return, specify series type `CumulativeReturn` in the Time Series Connector options. ```js -const cumulReturnConnector = new Connectors.Morningstar.TimeSeriesConnector({ +const cumulReturnConnector = new HighchartsConnectors.Morningstar.TimeSeriesConnector({ postman: { environmentJSON: postmanJSON }, diff --git a/docs/connectors/morningstar/time-series/dividend.md b/docs/connectors/morningstar/time-series/dividend.md index 6dd7ce0..7d5eb50 100644 --- a/docs/connectors/morningstar/time-series/dividend.md +++ b/docs/connectors/morningstar/time-series/dividend.md @@ -13,7 +13,7 @@ In order to fetch a dividend time series, specify series type `Dividend` in the Time Series Connector options. ```js -const dividendConnector = new Connectors.Morningstar.TimeSeriesConnector({ +const dividendConnector = new HighchartsConnectors.Morningstar.TimeSeriesConnector({ postman: { environmentJSON: postmanJSON }, diff --git a/docs/connectors/morningstar/time-series/growth.md b/docs/connectors/morningstar/time-series/growth.md index 21c94d7..48f147f 100644 --- a/docs/connectors/morningstar/time-series/growth.md +++ b/docs/connectors/morningstar/time-series/growth.md @@ -15,7 +15,7 @@ In order to fetch time series for growth, specify series type `Growth` in the Time Series Connector options. ```js -const growthConnector = new Connectors.Morningstar.TimeSeriesConnector({ +const growthConnector = new HighchartsConnectors.Morningstar.TimeSeriesConnector({ postman: { environmentJSON: postmanJSON }, diff --git a/docs/connectors/morningstar/time-series/ohlcv.md b/docs/connectors/morningstar/time-series/ohlcv.md index 815009a..c3eee4a 100644 --- a/docs/connectors/morningstar/time-series/ohlcv.md +++ b/docs/connectors/morningstar/time-series/ohlcv.md @@ -12,7 +12,7 @@ `OHLCV` in the Time Series Connector options. ```js - const ohlcvConnector = new Connectors.Morningstar.TimeSeriesConnector({ + const ohlcvConnector = new HighchartsConnectors.Morningstar.TimeSeriesConnector({ postman: { environmentJSON: postmanJSON }, diff --git a/docs/connectors/morningstar/time-series/price.md b/docs/connectors/morningstar/time-series/price.md index 09519ce..9183b26 100644 --- a/docs/connectors/morningstar/time-series/price.md +++ b/docs/connectors/morningstar/time-series/price.md @@ -14,7 +14,7 @@ In order to fetch price time series, specify series type `Price` in the Time Series Connector options. ```js -const priceConnector = new Connectors.Morningstar.TimeSeriesConnector({ +const priceConnector = new HighchartsConnectors.Morningstar.TimeSeriesConnector({ postman: { environmentJSON: postmanJSON }, diff --git a/docs/connectors/morningstar/time-series/time-series.md b/docs/connectors/morningstar/time-series/time-series.md index d92986a..72ad583 100644 --- a/docs/connectors/morningstar/time-series/time-series.md +++ b/docs/connectors/morningstar/time-series/time-series.md @@ -30,7 +30,7 @@ or `currencyId`. ### Time Series with Morningstar standalone for Highcharts: ```js -const dividendConnector = new Connectors.Morningstar.TimeSeriesConnector({ +const dividendConnector = new HighchartsConnectors.Morningstar.TimeSeriesConnector({ postman: { environmentJSON: postmanJSON }, diff --git a/docs/connectors/morningstar/x-ray.md b/docs/connectors/morningstar/x-ray.md index df5b246..9734dfb 100644 --- a/docs/connectors/morningstar/x-ray.md +++ b/docs/connectors/morningstar/x-ray.md @@ -20,7 +20,7 @@ columns might be added to the table. In order to fetch a benchmark, you can request for example: ```js -const xRayConnector = MC.XRayConnector({ +const xRayConnector = new HighchartsConnectors.Morningstar.XRayConnector({ postman: { environmentJSON: postmanJSON }, diff --git a/src/CLI/Library/APIServer.ts b/src/CLI/Library/APIServer.ts index 74a6cc4..858ce7d 100644 --- a/src/CLI/Library/APIServer.ts +++ b/src/CLI/Library/APIServer.ts @@ -155,7 +155,7 @@ async function getContext ( side, platform: 'JS', product: { - namespace: 'Connectors' + namespace: 'HighchartsConnectors' }, productModule: 'connectors-morningstar', productName: 'Highcharts Connectors', diff --git a/webpack.config.ts b/webpack.config.ts index 3b7e5a2..1e76d66 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -95,7 +95,7 @@ const metas: Record = { highcharts: { filename: 'highcharts-morningstar.js', umdNames: { - amd: 'highcharts/highcarts', + amd: 'highcharts/highcharts', commonjs, root: ['Highcharts', 'Morningstar'] } @@ -106,7 +106,7 @@ const metas: Record = { umdNames: { amd: 'highcharts/connectors-morningstar', commonjs, - root: ['Connectors', 'Morningstar'] + root: ['HighchartsConnectors', 'Morningstar'] } } };