@3e/sqa-common 6.16.0-9 → 6.17.0-10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.d.ts +24 -45
  2. package/package.json +4 -1
  3. package/sqa_common.js +1337 -1324
package/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import * as Highcharts from 'highcharts'
2
+
1
3
  /**
2
4
  * Type declarations for the @3e/sqa-common module
3
5
  */
@@ -946,58 +948,28 @@ declare module '@3e/sqa-common' {
946
948
  }
947
949
 
948
950
  export type HighChartsSpec = {
949
- series: []
950
- time: {timezone: string}
951
- legend: {enabled: boolean}
952
- title: boolean
953
- chart: {_SQ_: {type: ViewType}; zoomType: string; animation: boolean}
954
- yAxis: []
955
- credits: {enabled: boolean}
956
951
  display: 'highcharts'
957
- $schema: 'https://highcharts/7.2'
958
- xAxis: {
959
- type: string
960
- min: number
961
- max: number
962
- tickInterval: null //TODO: better types
963
- }
964
- tooltip: {
965
- borderRadius: number
966
- borderColor: string
967
- formatter: () => string
968
- borderWidth: number
969
- valueDecimals: number
970
- style: {
971
- fontFamily: string
972
- fontSize: string
973
- lineHeight: string
952
+ chart: {_SQ_: {type: ViewType}; zoomType: string; animation: boolean}
953
+ } & Highcharts.Options
954
+
955
+ export type TableSpec = {
956
+ display: 'table'
957
+ meta?: {
958
+ type: 'time_table'
959
+ rows: TimeTableMetaRowInfo
960
+ } | {
961
+ type: 'object_table'
962
+ rows: ObjectsTableMetaRowInfo
974
963
  }
975
- useHTML: boolean
976
- split: boolean
977
- shared: boolean
978
- shadow: {color: string; offsetY: number; opacity: number; width: number}
979
- backgroundColor: string
980
- enabled: boolean
981
- }
964
+ title?: string
965
+ header: string[]
966
+ rows: (number | string)[][]
982
967
  }
983
968
 
984
- export type TableSpec = {
985
- display: 'table'
986
- meta?: {
987
- type: 'time_table'
988
- rows: TimeTableMetaRowInfo
989
- } | {
990
- type: 'object_table'
991
- rows: ObjectsTableMetaRowInfo
992
- }
993
- title?: string
994
- header: string[]
995
- rows: (number | string)[][]
996
- }
997
-
998
969
  export type MessageSpec = {
999
970
  display: 'message'
1000
971
  label: string
972
+ value: string
1001
973
  }
1002
974
  export type KPI = {
1003
975
  kpi: string
@@ -1023,6 +995,7 @@ declare module '@3e/sqa-common' {
1023
995
  clock_or_calendar_mode: string
1024
996
  granularity: Granularity
1025
997
  }
998
+ error?: boolean
1026
999
  options: VisualisationOptions
1027
1000
  info: {title: string; type: ViewType; color_scheme: ColorSchemeValue}
1028
1001
  values: {}
@@ -1723,6 +1696,12 @@ declare module '@3e/sqa-common' {
1723
1696
  * @param sqid - The SQID of the object
1724
1697
  */
1725
1698
  refFromLDTypeAndSQID(ldType: string, sqid: string): string | null
1699
+
1700
+ /**
1701
+ * Returns the refresh period for the view in milliseconds, or null if the view should not be refreshed
1702
+ * @param view - the view for which to receive the refresh period
1703
+ */
1704
+ refreshPeriod(view: SQView): number | null
1726
1705
  }
1727
1706
 
1728
1707
  export const sqa: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3e/sqa-common",
3
- "version": "6.16.0-9",
3
+ "version": "6.17.0-10",
4
4
  "description": "SynaptiQ utilities package",
5
5
  "main": "sqa_common.js",
6
6
  "dependencies": {
@@ -8,6 +8,9 @@
8
8
  "@js-joda/timezone": "^2.5.0",
9
9
  "decimal.js-light": "2.5.1"
10
10
  },
11
+ "peerDependencies": {
12
+ "highcharts": "^11.1.0"
13
+ },
11
14
  "scripts": {
12
15
  "test": "echo \"Error: no test specified\" && exit 1"
13
16
  },