@3e/sqa-common 6.0.9-1 → 6.0.9-3

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 +53 -20
  2. package/package.json +1 -1
  3. package/sqa_common.js +391 -391
package/index.d.ts CHANGED
@@ -744,26 +744,29 @@ declare module '@3e/sqa-common' {
744
744
  | '1 year'
745
745
 
746
746
  export type Period =
747
- | 'last-7-days'
748
- | 'last-week'
749
- | 'since-beginning'
750
- | 'last-12-months'
751
- | 'year-to-date'
752
- | 'today'
753
- | 'current-month'
754
- | 'last-month'
755
- | 'forecast-4-days'
756
- | 'tomorrow'
757
- | 'last-24-hours'
758
- | 'last-30-days'
759
- | 'last-7x24-hours'
760
- | 'last-3x24-hours'
761
- | 'last-15-minutes'
762
- | 'last-3-days'
763
- | 'last-year'
764
- | 'yesterday'
765
- | 'forecast-10-days'
766
- | 'custom'
747
+ | 'last-15-minutes'
748
+ | 'last-30-minutes'
749
+ | 'last-60-minutes'
750
+ | 'last-120-minutes'
751
+ | 'last-24-hours'
752
+ | 'today'
753
+ | 'yesterday'
754
+ | 'tomorrow'
755
+ | 'last-3-days'
756
+ | 'last-7-days'
757
+ | 'last-7x24-hours'
758
+ | 'last-3x24-hours'
759
+ | 'forecast-4-days'
760
+ | 'forecast-10-days'
761
+ | 'last-week'
762
+ | 'current-month'
763
+ | 'last-month'
764
+ | 'last-30-days'
765
+ | 'year-to-date'
766
+ | 'last-12-months'
767
+ | 'last-year'
768
+ | 'since-beginning'
769
+ | 'custom'
767
770
 
768
771
  export type LevelValue =
769
772
  | 'site-group'
@@ -898,6 +901,34 @@ declare module '@3e/sqa-common' {
898
901
  }
899
902
  }
900
903
 
904
+ /**
905
+ * Since in a table row the data is represented as: `[object-name, indicator1-value, indicator2-value, ...]`
906
+ * while the indicators in the meta are: `[indicator1, indicator2, ...]`
907
+ * In order to access the correct indicator in the meta, be sure to go for the `columnIndex - 1` indicator in the `indicators` array from the meta.
908
+ *
909
+ *
910
+ * For objects, the correct object index is the index of the full row
911
+ */
912
+ export type ObjectsTableRowInfo = {
913
+ indicators: {
914
+ label: string
915
+ indicator_label: string
916
+ reference_label: string
917
+ unit?: string
918
+ unit_key: string
919
+ description: string
920
+ key: string
921
+ default_graphical_representation: string
922
+ level: LevelValue
923
+ }[]
924
+ objects: {
925
+ name: string
926
+ level: LevelValue
927
+ ref: string
928
+ label: string
929
+ }
930
+ }
931
+
901
932
  export type MeasurementsTable = {
902
933
  meta: {
903
934
  rows: MeasurementsRowExtraInfo[]
@@ -945,6 +976,8 @@ declare module '@3e/sqa-common' {
945
976
 
946
977
  export type TableSpec = {
947
978
  display: 'table'
979
+ meta?: {rows: ObjectsTableRowInfo}
980
+ title?: string
948
981
  header: string[]
949
982
  rows: (number | string)[][]
950
983
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3e/sqa-common",
3
- "version": "6.0.9-1",
3
+ "version": "6.0.9-3",
4
4
  "description": "SynaptiQ utilities package",
5
5
  "main": "sqa_common.js",
6
6
  "dependencies": {