@3e/sqa-common 6.23.0-4 → 6.23.0-5

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 +63 -62
  2. package/package.json +1 -1
  3. package/sqa_common.js +871 -871
package/index.d.ts CHANGED
@@ -59,8 +59,8 @@ declare module '@3e/sqa-common' {
59
59
  * @param getToken - function with no arguments that returns the JWT token
60
60
  */
61
61
  wrapRefresh(
62
- apiFn: ApiFn,
63
- getToken: TokenThunk,
62
+ apiFn: ApiFn,
63
+ getToken: TokenThunk,
64
64
  ): {apiFn: ApiFn; resetFn: () => void}
65
65
 
66
66
  /**
@@ -132,8 +132,8 @@ declare module '@3e/sqa-common' {
132
132
  * @param options - creation options
133
133
  */
134
134
  getVisualization(
135
- view: SQView,
136
- options: VisualisationOptions,
135
+ view: SQView,
136
+ options: VisualisationOptions,
137
137
  ): Promise<Visualization>
138
138
 
139
139
  /**
@@ -144,8 +144,8 @@ declare module '@3e/sqa-common' {
144
144
  * @returns a function to cancel the operation
145
145
  */
146
146
  populateVisualization(
147
- visualization: Visualization,
148
- callback: (visualization: Visualization) => void,
147
+ visualization: Visualization,
148
+ callback: (visualization: Visualization) => void,
149
149
  ): () => void
150
150
 
151
151
  /**
@@ -166,12 +166,9 @@ declare module '@3e/sqa-common' {
166
166
  populateVisualization(
167
167
  visualization: Visualization,
168
168
  callback: (visualization: Visualization) => void,
169
- cancelPromise: Promise<{"cancelled?": boolean}>
169
+ cancelPromise: Promise<{'cancelled?': boolean}>,
170
170
  ): Promise<Visualization>
171
171
 
172
-
173
-
174
-
175
172
  /**
176
173
  * Creates a table for measurements, for a single selected object
177
174
  *
@@ -183,14 +180,14 @@ declare module '@3e/sqa-common' {
183
180
  * @returns a function to cancel the operation
184
181
  */
185
182
  getMeasurements(
186
- object: string,
187
- granularity:
188
- | 'raw'
189
- | 'scaled'
190
- | 'normalised'
191
- | {start: number; end: number},
192
- period: Period,
193
- callback: (result: MeasurementsTable) => void,
183
+ object: string,
184
+ granularity:
185
+ | 'raw'
186
+ | 'scaled'
187
+ | 'normalised'
188
+ | {start: number; end: number},
189
+ period: Period,
190
+ callback: (result: MeasurementsTable) => void,
194
191
  ): () => void
195
192
 
196
193
  /**
@@ -207,10 +204,10 @@ declare module '@3e/sqa-common' {
207
204
  * @returns a function to cancel the operation
208
205
  */
209
206
  getLatestMeasurements(
210
- object: string,
211
- granularity: 'raw' | 'scaled' | 'normalised',
212
- period: Period | null,
213
- callback: (result: MeasurementsTable) => void,
207
+ object: string,
208
+ granularity: 'raw' | 'scaled' | 'normalised',
209
+ period: Period | null,
210
+ callback: (result: MeasurementsTable) => void,
214
211
  ): () => void
215
212
 
216
213
  /**
@@ -249,17 +246,17 @@ declare module '@3e/sqa-common' {
249
246
  * @param view
250
247
  */
251
248
  getObjectParameters(view: SQView):
252
- | [
253
- {
254
- id: string
255
- label: string
256
- ldType: ShortLDTypeValue
257
- level: ShortLDTypeValue
258
- container: string | null
259
- value: string
260
- },
261
- ]
262
- | []
249
+ | [
250
+ {
251
+ id: string
252
+ label: string
253
+ ldType: ShortLDTypeValue
254
+ level: ShortLDTypeValue
255
+ container: string | null
256
+ value: string
257
+ },
258
+ ]
259
+ | []
263
260
 
264
261
  /**
265
262
  * Sets the object parameter with the given id. Used to set the dynamic object of the view
@@ -311,12 +308,12 @@ declare module '@3e/sqa-common' {
311
308
  getColorSettings(viewType: ViewType): ColorSettings[]
312
309
 
313
310
  getColorSettingsCssStyle(colorSetting: ColorSettings):
314
- | {
315
- backgroundColor: string
316
- }
317
- | {
318
- backgroundImage: string
319
- }
311
+ | {
312
+ backgroundColor: string
313
+ }
314
+ | {
315
+ backgroundImage: string
316
+ }
320
317
 
321
318
  /**
322
319
  * Sets the colorscheme of a view
@@ -350,8 +347,8 @@ declare module '@3e/sqa-common' {
350
347
  * @param selectedContainerLdType
351
348
  */
352
349
  getContainers(
353
- selectedLevel: LevelValue,
354
- selectedContainerLdType?: string,
350
+ selectedLevel: LevelValue,
351
+ selectedContainerLdType?: string,
355
352
  ): Promise<Container[]>
356
353
 
357
354
  /**
@@ -360,11 +357,11 @@ declare module '@3e/sqa-common' {
360
357
  * @param specification
361
358
  */
362
359
  getTemplates(
363
- view: SQView,
364
- specification: {
365
- selectedLevel: LevelValue
366
- selectedContainer?: ContainerValue
367
- },
360
+ view: SQView,
361
+ specification: {
362
+ selectedLevel: LevelValue
363
+ selectedContainer?: ContainerValue
364
+ },
368
365
  ): Promise<Template[]>
369
366
 
370
367
  /**
@@ -375,9 +372,9 @@ declare module '@3e/sqa-common' {
375
372
  * @param unitScaling
376
373
  */
377
374
  setUnitScaling(
378
- view: SQView,
379
- unitKey: string,
380
- unitScaling: {min?: number; max?: number},
375
+ view: SQView,
376
+ unitKey: string,
377
+ unitScaling: {min?: number; max?: number},
381
378
  ): SQView
382
379
 
383
380
  /**
@@ -386,8 +383,8 @@ declare module '@3e/sqa-common' {
386
383
  * @param unitKey - the
387
384
  */
388
385
  getUnitScaling(
389
- view: SQView,
390
- unitKey: string,
386
+ view: SQView,
387
+ unitKey: string,
391
388
  ): {
392
389
  min: number
393
390
  max: number
@@ -461,17 +458,17 @@ declare module '@3e/sqa-common' {
461
458
  * @param options
462
459
  */
463
460
  addEnumDataset(
464
- view: SQView,
465
- objects: string[],
466
- indicators: [string],
467
- options: DatasetOptions,
461
+ view: SQView,
462
+ objects: string[],
463
+ indicators: [string],
464
+ options: DatasetOptions,
468
465
  ): SQView
469
466
 
470
467
  addTemplateDataset(
471
- view: SQView,
472
- spec: DatasetTemplateSpec,
473
- indicators: [string],
474
- opts: DatasetOptions,
468
+ view: SQView,
469
+ spec: DatasetTemplateSpec,
470
+ indicators: [string],
471
+ opts: DatasetOptions,
475
472
  ): SQView
476
473
 
477
474
  /**
@@ -532,8 +529,8 @@ declare module '@3e/sqa-common' {
532
529
  * request inside a `try-catch` block
533
530
  */
534
531
  createSaveDataJob(
535
- visualization: Visualization,
536
- filename: string,
532
+ visualization: Visualization,
533
+ filename: string,
537
534
  ): Promise<string>
538
535
 
539
536
  /**
@@ -575,7 +572,11 @@ declare module '@3e/sqa-common' {
575
572
  *
576
573
  * @param view - The view to be computed
577
574
  */
578
- getNumberOfDataPoints(view: SQView): Promise<number>
575
+ getNumberOfDataPoints(view: SQView): Promise<{
576
+ intervals: number
577
+ dataPoints: number
578
+ datasets: number
579
+ }>
579
580
 
580
581
  /**
581
582
  * Convert a Ref Category to a Logical Device Type.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3e/sqa-common",
3
- "version": "6.23.0-4",
3
+ "version": "6.23.0-5",
4
4
  "description": "SynaptiQ utilities package",
5
5
  "main": "sqa_common.js",
6
6
  "dependencies": {