From 985f309cf12507547e960a61ba2a6a7a0dafa72b Mon Sep 17 00:00:00 2001 From: Bernt Andersen Date: Tue, 15 Oct 2024 13:10:53 +0200 Subject: [PATCH] Changes from @folkehelseinstituttet/angular-highcharts/v/4.5.0 (#726) --- projects/fhi-angular-highcharts/CHANGELOG.md | 3 +- .../constants-and-enums/fhi-diagram-types.ts | 48 +++++++++++++++++++ .../fhi-angular-highcharts/src/public-api.ts | 2 + 3 files changed, 52 insertions(+), 1 deletion(-) diff --git a/projects/fhi-angular-highcharts/CHANGELOG.md b/projects/fhi-angular-highcharts/CHANGELOG.md index 84de1e69c..d084c81de 100644 --- a/projects/fhi-angular-highcharts/CHANGELOG.md +++ b/projects/fhi-angular-highcharts/CHANGELOG.md @@ -1,7 +1,8 @@ # Unreleased -> Oct 11, 2024 +> Oct 15, 2024 +* :tada: **Enhancement** Add a custom version of the diagram type class and expose it in the public API Surface * :bug: **Bugfix** Remove deprecated property DiagramTypeIds.map which should have been removed in [(#693)](https://github.com/folkehelseinstituttet/Fhi.Frontend.Demo/pull/693) * :bug: **Bugfix** Fix so that table don't break if flagged data in the data set. [(#702)](https://github.com/folkehelseinstituttet/Fhi.Frontend.Demo/pull/702) diff --git a/projects/fhi-angular-highcharts/src/lib/constants-and-enums/fhi-diagram-types.ts b/projects/fhi-angular-highcharts/src/lib/constants-and-enums/fhi-diagram-types.ts index 17aa087e9..f4bce0cab 100644 --- a/projects/fhi-angular-highcharts/src/lib/constants-and-enums/fhi-diagram-types.ts +++ b/projects/fhi-angular-highcharts/src/lib/constants-and-enums/fhi-diagram-types.ts @@ -128,3 +128,51 @@ export const AllDiagramTypes = [ export const ChartTypes = [line, column, bar, columnStacked, barStacked, pie, columnAndLine]; export const MapTypes = [mapFylker, mapFylker2019, mapFylker2023]; + +// For the public API Surface +export class FhiDiagramTypes { + static bar = { + id: bar.id, + name: bar.name, + }; + static barStacked = { + id: barStacked.id, + name: barStacked.name, + }; + static column = { + id: column.id, + name: column.name, + }; + static columnAndLine = { + id: columnAndLine.id, + name: columnAndLine.name, + }; + static columnStacked = { + id: columnStacked.id, + name: columnStacked.name, + }; + static line = { + id: line.id, + name: line.name, + }; + static mapFylker = { + id: mapFylker.id, + name: mapFylker.name, + }; + static mapFylker2019 = { + id: mapFylker2019.id, + name: mapFylker2019.name, + }; + static mapFylker2023 = { + id: mapFylker2023.id, + name: mapFylker2023.name, + }; + static pie = { + id: pie.id, + name: pie.name, + }; + static table = { + id: table.id, + name: table.name, + }; +} diff --git a/projects/fhi-angular-highcharts/src/public-api.ts b/projects/fhi-angular-highcharts/src/public-api.ts index 86cf13448..1a30c662c 100644 --- a/projects/fhi-angular-highcharts/src/public-api.ts +++ b/projects/fhi-angular-highcharts/src/public-api.ts @@ -9,3 +9,5 @@ export * from './lib/models/fhi-diagram-flag.model'; export * from './lib/models/fhi-diagram-options.model'; export * from './lib/models/fhi-diagram-serie.model'; export * from './lib/models/fhi-diagram-serie-data.model'; + +export { FhiDiagramTypes } from './lib/constants-and-enums/fhi-diagram-types';