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

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 +32 -8
  2. package/package.json +1 -1
  3. package/sqa_common.js +1389 -1377
package/index.d.ts CHANGED
@@ -909,7 +909,7 @@ declare module '@3e/sqa-common' {
909
909
  *
910
910
  * For objects, the correct object index is the index of the full row
911
911
  */
912
- export type ObjectsTableRowInfo = {
912
+ export type ObjectsTableMetaRowInfo = {
913
913
  indicators: {
914
914
  label: string
915
915
  indicator_label: string
@@ -929,6 +929,13 @@ declare module '@3e/sqa-common' {
929
929
  }
930
930
  }
931
931
 
932
+ export type TimeTableMetaRowInfo = {
933
+ [key: string]: {
934
+ indicator: Indicator
935
+ object: Object
936
+ }
937
+ }
938
+
932
939
  export type MeasurementsTable = {
933
940
  meta: {
934
941
  rows: MeasurementsRowExtraInfo[]
@@ -974,13 +981,19 @@ declare module '@3e/sqa-common' {
974
981
  }
975
982
  }
976
983
 
977
- export type TableSpec = {
978
- display: 'table'
979
- meta?: {rows: ObjectsTableRowInfo}
980
- title?: string
981
- header: string[]
982
- rows: (number | string)[][]
983
- }
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
+ }
984
997
 
985
998
  export type MessageSpec = {
986
999
  display: 'message'
@@ -1648,6 +1661,17 @@ declare module '@3e/sqa-common' {
1648
1661
  *
1649
1662
  */
1650
1663
  generatePassword(): string
1664
+
1665
+ /**
1666
+ * Compute the total number of data-points for a view.
1667
+ * Used to determine if a view is too large to be rendered
1668
+ * and should be saved as a CSV instead
1669
+ *
1670
+ * ** Returns a promise **
1671
+ *
1672
+ * @param view - The view to be computed
1673
+ */
1674
+ getNumberOfDataPoints(view: SQView): Promise<number>
1651
1675
  }
1652
1676
 
1653
1677
  export const sqa: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3e/sqa-common",
3
- "version": "6.0.9-8",
3
+ "version": "6.0.10-1",
4
4
  "description": "SynaptiQ utilities package",
5
5
  "main": "sqa_common.js",
6
6
  "dependencies": {