PluginProbe
Code Snippets / trunk
Code Snippets vtrunk
4.0.0-beta.2 3.10.2 3.10.1 3.10.0 3.10.0-beta.2 3.10.0-beta.1 4.0.0-beta.1 3.9.6 trunk 2.10.0 2.10.1 2.12.0 2.12.1 2.13.0 2.13.1 2.13.2 2.13.3 2.14.0 2.14.1 2.14.2 2.14.3 2.14.4 2.14.5 2.14.6 3.0.0 All 65 releases
code-snippets / js / types / Insights.ts

Insights.ts in Code Snippets trunk, at js/types/Insights.ts

35 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import type { SnippetScope, SnippetType } from './Snippet'
2
3 export type InsightsChartKey = 'total' | InsightsConfigurableChartKey
4
5 export type InsightsConfigurableChartKey = 'type' | 'activation' | 'conditions' | 'location' | 'tags'
6
7 export type InsightsChartView = 'pie' | 'bar' | 'cloud'
8
9 export type InsightsChartViews = Readonly<{
10 type: 'pie' | 'bar'
11 activation: 'pie' | 'bar'
12 conditions: 'pie' | 'bar'
13 location: 'pie' | 'bar'
14 tags: 'bar' | 'cloud'
15 }>
16
17 export interface InsightsChartEntry {
18 readonly label: string
19 readonly count: number | string
20 readonly url?: string
21 }
22
23 export interface InsightsSummary {
24 readonly active: number | string
25 readonly inactive: number | string
26 readonly typeCounts: Readonly<Record<SnippetType, InsightsChartEntry>>
27 readonly conditionCounts: Readonly<Record<string, InsightsChartEntry>>
28 readonly locationCounts: Readonly<Record<SnippetScope, number>>
29 readonly tagCounts: Readonly<Record<string, InsightsChartEntry>>
30 }
31
32 export interface InsightChartPreferencesSchema {
33 views: InsightsChartViews
34 }
35