@3e/sqa-common 6.16.0-9 → 6.17.0-11
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.
- package/index.d.ts +109 -59
- package/package.json +4 -1
- 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
|
*/
|
|
@@ -731,17 +733,22 @@ declare module '@3e/sqa-common' {
|
|
|
731
733
|
| 'kpis'
|
|
732
734
|
|
|
733
735
|
export type Granularity =
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
736
|
+
| '1-days'
|
|
737
|
+
| '1-hours'
|
|
738
|
+
| '1-minutes'
|
|
739
|
+
| '1-months'
|
|
740
|
+
| '1-weeks'
|
|
741
|
+
| '1-years'
|
|
742
|
+
| '10-minutes'
|
|
743
|
+
| '15-minutes'
|
|
744
|
+
| '3-months'
|
|
745
|
+
| '30-minutes'
|
|
746
|
+
| '5-minutes'
|
|
747
|
+
| 'change'
|
|
748
|
+
| 'normalized'
|
|
749
|
+
| 'raw'
|
|
750
|
+
| 'scaled'
|
|
751
|
+
| 'statelog'
|
|
745
752
|
|
|
746
753
|
export type Period =
|
|
747
754
|
| 'last-15-minutes'
|
|
@@ -768,6 +775,72 @@ declare module '@3e/sqa-common' {
|
|
|
768
775
|
| 'since-beginning'
|
|
769
776
|
| 'custom'
|
|
770
777
|
|
|
778
|
+
export type ShortLDTypeValue =
|
|
779
|
+
| 'ac-input'
|
|
780
|
+
| 'ac-node'
|
|
781
|
+
| 'ac-phase'
|
|
782
|
+
| 'account'
|
|
783
|
+
| 'battery'
|
|
784
|
+
| 'bearing'
|
|
785
|
+
| 'blade'
|
|
786
|
+
| 'connection'
|
|
787
|
+
| 'dc-input'
|
|
788
|
+
| 'dc-node'
|
|
789
|
+
| 'generator'
|
|
790
|
+
| 'inverter'
|
|
791
|
+
| 'inverter-device'
|
|
792
|
+
| 'logger'
|
|
793
|
+
| 'module-group'
|
|
794
|
+
| 'mppt'
|
|
795
|
+
| 'nacelle'
|
|
796
|
+
| 'portfolio'
|
|
797
|
+
| 'power-unit'
|
|
798
|
+
| 'rotor'
|
|
799
|
+
| 'sensor'
|
|
800
|
+
| 'site'
|
|
801
|
+
| 'site-group'
|
|
802
|
+
| 'spv'
|
|
803
|
+
| 'strings'
|
|
804
|
+
| 'tower'
|
|
805
|
+
| 'tracker'
|
|
806
|
+
| 'transmission'
|
|
807
|
+
| 'turbine'
|
|
808
|
+
| 'yaw'
|
|
809
|
+
|
|
810
|
+
export type LongLDTypeValue =
|
|
811
|
+
| 'sq/ld_type/ac_input'
|
|
812
|
+
| 'sq/ld_type/ac_node'
|
|
813
|
+
| 'sq/ld_type/ac_phase'
|
|
814
|
+
| 'sq/ld_type/account'
|
|
815
|
+
| 'sq/ld_type/battery'
|
|
816
|
+
| 'sq/ld_type/bearing'
|
|
817
|
+
| 'sq/ld_type/blade'
|
|
818
|
+
| 'sq/ld_type/connection'
|
|
819
|
+
| 'sq/ld_type/dc_input'
|
|
820
|
+
| 'sq/ld_type/dc_node'
|
|
821
|
+
| 'sq/ld_type/generator'
|
|
822
|
+
| 'sq/ld_type/inverter'
|
|
823
|
+
| 'sq/ld_type/inverter_device'
|
|
824
|
+
| 'sq/ld_type/logger'
|
|
825
|
+
| 'sq/ld_type/module_group'
|
|
826
|
+
| 'sq/ld_type/mppt'
|
|
827
|
+
| 'sq/ld_type/nacelle'
|
|
828
|
+
| 'sq/ld_type/portfolio'
|
|
829
|
+
| 'sq/ld_type/power_unit'
|
|
830
|
+
| 'sq/ld_type/rotor'
|
|
831
|
+
| 'sq/ld_type/sensor'
|
|
832
|
+
| 'sq/ld_type/site'
|
|
833
|
+
| 'sq/ld_type/site_group'
|
|
834
|
+
| 'sq/ld_type/spv'
|
|
835
|
+
| 'sq/ld_type/strings'
|
|
836
|
+
| 'sq/ld_type/tower'
|
|
837
|
+
| 'sq/ld_type/tracker'
|
|
838
|
+
| 'sq/ld_type/transmission'
|
|
839
|
+
| 'sq/ld_type/turbine'
|
|
840
|
+
| 'sq/ld_type/yaw'
|
|
841
|
+
|
|
842
|
+
export type LdTypeValue = ShortLDTypeValue | LongLDTypeValue
|
|
843
|
+
|
|
771
844
|
export type LevelValue =
|
|
772
845
|
| 'site-group'
|
|
773
846
|
| 'site'
|
|
@@ -946,58 +1019,28 @@ declare module '@3e/sqa-common' {
|
|
|
946
1019
|
}
|
|
947
1020
|
|
|
948
1021
|
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
1022
|
display: 'highcharts'
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
borderWidth: number
|
|
969
|
-
valueDecimals: number
|
|
970
|
-
style: {
|
|
971
|
-
fontFamily: string
|
|
972
|
-
fontSize: string
|
|
973
|
-
lineHeight: string
|
|
1023
|
+
chart: {_SQ_: {type: ViewType}; zoomType: string; animation: boolean}
|
|
1024
|
+
} & Highcharts.Options
|
|
1025
|
+
|
|
1026
|
+
export type TableSpec = {
|
|
1027
|
+
display: 'table'
|
|
1028
|
+
meta?: {
|
|
1029
|
+
type: 'time_table'
|
|
1030
|
+
rows: TimeTableMetaRowInfo
|
|
1031
|
+
} | {
|
|
1032
|
+
type: 'object_table'
|
|
1033
|
+
rows: ObjectsTableMetaRowInfo
|
|
974
1034
|
}
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
shadow: {color: string; offsetY: number; opacity: number; width: number}
|
|
979
|
-
backgroundColor: string
|
|
980
|
-
enabled: boolean
|
|
981
|
-
}
|
|
1035
|
+
title?: string
|
|
1036
|
+
header: string[]
|
|
1037
|
+
rows: (number | string)[][]
|
|
982
1038
|
}
|
|
983
1039
|
|
|
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
1040
|
export type MessageSpec = {
|
|
999
1041
|
display: 'message'
|
|
1000
1042
|
label: string
|
|
1043
|
+
value: string
|
|
1001
1044
|
}
|
|
1002
1045
|
export type KPI = {
|
|
1003
1046
|
kpi: string
|
|
@@ -1023,6 +1066,7 @@ declare module '@3e/sqa-common' {
|
|
|
1023
1066
|
clock_or_calendar_mode: string
|
|
1024
1067
|
granularity: Granularity
|
|
1025
1068
|
}
|
|
1069
|
+
error?: boolean
|
|
1026
1070
|
options: VisualisationOptions
|
|
1027
1071
|
info: {title: string; type: ViewType; color_scheme: ColorSchemeValue}
|
|
1028
1072
|
values: {}
|
|
@@ -1672,7 +1716,7 @@ declare module '@3e/sqa-common' {
|
|
|
1672
1716
|
/**
|
|
1673
1717
|
* Generate a new password for the user
|
|
1674
1718
|
*
|
|
1675
|
-
* Password will
|
|
1719
|
+
* The Password will:
|
|
1676
1720
|
* - be between 12 and 100 characters
|
|
1677
1721
|
* - contain at least one lower-case character
|
|
1678
1722
|
* - contain at least one upper-case character
|
|
@@ -1710,7 +1754,7 @@ declare module '@3e/sqa-common' {
|
|
|
1710
1754
|
* @param ldType - The Logical Device Type to convert. Accepts both short
|
|
1711
1755
|
* form (e.g. 'inverter') or full SQID (e.g. '/sq/ld_type/inverter')
|
|
1712
1756
|
*/
|
|
1713
|
-
convertLDTypeToRefCategory(ldType:
|
|
1757
|
+
convertLDTypeToRefCategory(ldType: LdTypeValue): string | null
|
|
1714
1758
|
|
|
1715
1759
|
/**
|
|
1716
1760
|
* Make a Ref from an LD Type and a SQID
|
|
@@ -1722,7 +1766,13 @@ declare module '@3e/sqa-common' {
|
|
|
1722
1766
|
* form (e.g. 'inverter') or full SQID (e.g. '/sq/ld_type/inverter')
|
|
1723
1767
|
* @param sqid - The SQID of the object
|
|
1724
1768
|
*/
|
|
1725
|
-
refFromLDTypeAndSQID(ldType:
|
|
1769
|
+
refFromLDTypeAndSQID(ldType: LdTypeValue, sqid: string): string | null
|
|
1770
|
+
|
|
1771
|
+
/**
|
|
1772
|
+
* Returns the refresh period for the view in milliseconds, or null if the view should not be refreshed
|
|
1773
|
+
* @param view - the view for which to receive the refresh period
|
|
1774
|
+
*/
|
|
1775
|
+
refreshPeriod(view: SQView): number | null
|
|
1726
1776
|
}
|
|
1727
1777
|
|
|
1728
1778
|
export const sqa: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@3e/sqa-common",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.17.0-11",
|
|
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
|
},
|