@graphenedata/cli 0.0.3 → 0.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 (69) hide show
  1. package/cli.ts +7 -43
  2. package/dist/cli/cli.js +509 -277
  3. package/dist/docs/graphene.md +924 -63
  4. package/dist/ui/component-utilities/echarts.js +3 -1
  5. package/dist/ui/component-utilities/themeStores.ts +35 -7
  6. package/dist/ui/components/AreaChart.svelte +2 -1
  7. package/dist/ui/components/BarChart.svelte +2 -1
  8. package/dist/ui/components/BigValue.svelte +1 -1
  9. package/dist/ui/components/Chart.svelte +10 -1
  10. package/dist/ui/components/ECharts.svelte +2 -0
  11. package/dist/ui/components/LineChart.svelte +2 -1
  12. package/dist/ui/components/PieChart.svelte +1 -1
  13. package/dist/ui/components/QueryLoad.svelte +5 -6
  14. package/dist/ui/components/TableRow.svelte +1 -1
  15. package/dist/ui/components/_Table.svelte +2 -0
  16. package/dist/ui/internal/queryEngine.ts +16 -13
  17. package/dist/ui/internal/telemetry.ts +5 -3
  18. package/dist/ui/web.js +26 -11
  19. package/package.json +2 -1
  20. package/dist/docs/data_apps/components/charts/annotations.md +0 -673
  21. package/dist/docs/data_apps/components/charts/area-chart.md +0 -202
  22. package/dist/docs/data_apps/components/charts/bar-chart.md +0 -317
  23. package/dist/docs/data_apps/components/charts/box-plot.md +0 -190
  24. package/dist/docs/data_apps/components/charts/bubble-chart.md +0 -151
  25. package/dist/docs/data_apps/components/charts/calendar-heatmap.md +0 -112
  26. package/dist/docs/data_apps/components/charts/custom-echarts.md +0 -308
  27. package/dist/docs/data_apps/components/charts/echarts-options.md +0 -217
  28. package/dist/docs/data_apps/components/charts/funnel-chart.md +0 -106
  29. package/dist/docs/data_apps/components/charts/heatmap.md +0 -180
  30. package/dist/docs/data_apps/components/charts/histogram.md +0 -107
  31. package/dist/docs/data_apps/components/charts/line-chart.md +0 -265
  32. package/dist/docs/data_apps/components/charts/mixed-type-charts.md +0 -240
  33. package/dist/docs/data_apps/components/charts/sankey-diagram.md +0 -301
  34. package/dist/docs/data_apps/components/charts/scatter-plot.md +0 -134
  35. package/dist/docs/data_apps/components/charts/sparkline.md +0 -68
  36. package/dist/docs/data_apps/components/data/big-value.md +0 -153
  37. package/dist/docs/data_apps/components/data/delta.md +0 -89
  38. package/dist/docs/data_apps/components/data/table.md +0 -470
  39. package/dist/docs/data_apps/components/data/value.md +0 -97
  40. package/dist/docs/data_apps/components/inputs/button-group.md +0 -154
  41. package/dist/docs/data_apps/components/inputs/checkbox.md +0 -52
  42. package/dist/docs/data_apps/components/inputs/date-input.md +0 -131
  43. package/dist/docs/data_apps/components/inputs/date-range.md +0 -124
  44. package/dist/docs/data_apps/components/inputs/dimension-grid.md +0 -67
  45. package/dist/docs/data_apps/components/inputs/dropdown.md +0 -199
  46. package/dist/docs/data_apps/components/inputs/index.md +0 -3
  47. package/dist/docs/data_apps/components/inputs/slider.md +0 -126
  48. package/dist/docs/data_apps/components/inputs/text-input.md +0 -86
  49. package/dist/docs/data_apps/components/maps/area-map.md +0 -397
  50. package/dist/docs/data_apps/components/maps/base-map.md +0 -269
  51. package/dist/docs/data_apps/components/maps/bubble-map.md +0 -361
  52. package/dist/docs/data_apps/components/maps/point-map.md +0 -326
  53. package/dist/docs/data_apps/components/maps/us-map.md +0 -167
  54. package/dist/docs/data_apps/components/ui/accordion.md +0 -116
  55. package/dist/docs/data_apps/components/ui/alert.md +0 -37
  56. package/dist/docs/data_apps/components/ui/big-link.md +0 -19
  57. package/dist/docs/data_apps/components/ui/details.md +0 -58
  58. package/dist/docs/data_apps/components/ui/download-data.md +0 -41
  59. package/dist/docs/data_apps/components/ui/embed.md +0 -47
  60. package/dist/docs/data_apps/components/ui/grid.md +0 -45
  61. package/dist/docs/data_apps/components/ui/image.md +0 -61
  62. package/dist/docs/data_apps/components/ui/info.md +0 -47
  63. package/dist/docs/data_apps/components/ui/last-refreshed.md +0 -28
  64. package/dist/docs/data_apps/components/ui/link-button.md +0 -20
  65. package/dist/docs/data_apps/components/ui/link.md +0 -40
  66. package/dist/docs/data_apps/components/ui/modal.md +0 -57
  67. package/dist/docs/data_apps/components/ui/note.md +0 -32
  68. package/dist/docs/data_apps/components/ui/print-format-components.md +0 -85
  69. package/dist/docs/data_apps/components/ui/tabs.md +0 -122
@@ -1,68 +0,0 @@
1
- ---
2
- title: Sparkline
3
- description: Display a compact visual representation of a single metric over time.
4
- ---
5
-
6
- Use sparklines to display a compact visual representation of a single metric over time or a continuous range.
7
-
8
-
9
- **Example:**
10
-
11
- ```markdown
12
- <Sparkline
13
- data="sales_by_date"
14
- dateCol=date
15
- valueCol=sales
16
- />
17
- ```
18
-
19
- ## Examples
20
-
21
- ### Connected Sparkline
22
-
23
- ```html
24
- <Sparkline data="sales_by_date" dateCol=date valueCol=sales type=bar valueFmt=eur dateFmt=mmm connectGroup=mysparkline/>
25
- <Sparkline data="sales_by_date" dateCol=date valueCol=sales type=area color=maroon valueFmt=eur dateFmt=mmm connectGroup=mysparkline/>
26
- <Sparkline data="sales_by_date" dateCol=date valueCol=sales type=line color=purple valueFmt=eur dateFmt=mmm connectGroup=mysparkline/>
27
- ```
28
-
29
- ## Options
30
-
31
- ### Data
32
-
33
- | Name | Description | Required | Options | Default |
34
- |------|-------------|----------|---------|---------|
35
- | data | Query name, wrapped in curly braces | true | query name | - |
36
- | dateCol | Categorical column to use for the x-axis | true | column name | - |
37
- | valueCol | Numeric column to use for the y-axis | true | column name | - |
38
- | type | Chart type for sparkline | false | ['line', 'area', 'bar'] | "line" |
39
- | emptySet | Sets behaviour for empty datasets. Can throw an error, a warning, or allow empty. When set to 'error', empty datasets will block builds in `build:strict`. Note this only applies to initial page load - empty datasets caused by input component changes (dropdowns, etc.) are allowed. | false | ['error', 'warn', 'pass'] | "error" |
40
- | emptyMessage | Text to display when an empty dataset is received - only applies when `emptySet` is 'warn' or 'pass', or when the empty dataset is a result of an input component change (dropdowns, etc.). | false | string | "No records" |
41
-
42
- ### Formatting & Styling
43
-
44
- | Name | Description | Required | Options | Default |
45
- |------|-------------|----------|---------|---------|
46
- | color | Color to use for the visualization. For area sparklines, choose the color for the line and the area color will be automatically appplied in a lighter shade. | false | CSS name \| hexademical \| RGB \| HSL | - |
47
- | valueFmt | Format to use for value column ([see available formats](/core-concepts/formatting)) | false | Excel-style format \| built-in format name \| custom format name | - |
48
- | dateFmt | Format to use for date column ([see available formats](/core-concepts/formatting)) | false | Excel-style format \| built-in format name \| custom format name | - |
49
-
50
- ### Axes
51
-
52
- | Name | Description | Required | Options | Default |
53
- |------|-------------|----------|---------|---------|
54
- | yScale | Whether to truncate the y-axis to enhance visibility | false | ['true', 'false'] | "false" |
55
-
56
- ### Sizing
57
-
58
- | Name | Description | Required | Options | Default |
59
- |------|-------------|----------|---------|---------|
60
- | height | Height of sparkline in pixels | false | number | 15 |
61
- | width | Width of sparkline in pixels | false | number | 50 |
62
-
63
- ### Interactivity
64
-
65
- | Name | Description | Required | Options | Default |
66
- |------|-------------|----------|---------|---------|
67
- | interactive | Turn on or off tooltip behaviour on hover. If off, chart will be a staticly rendered SVG (better for page performance). If on, you will be able to see dates/values when hovering over the sparkline | false | ['true', 'false'] | "true" |
68
- | connectGroup | Group name to connect this sparkline to other charts for synchronized tooltip hovering. Charts with the same `connectGroup` name will become connected | false | string | - |
@@ -1,153 +0,0 @@
1
- ---
2
- title: Big Value
3
- description: Display a large value standalone, and optionally include a comparison and a sparkline.
4
- ---
5
-
6
- Use big values to display a large value standalone, and optionally include a comparison and a sparkline.
7
-
8
- ## Example
9
-
10
- ```markdown
11
- <BigValue
12
- data="orders_with_comparisons"
13
- value=num_orders
14
- sparkline=month
15
- comparison=order_growth
16
- comparisonFmt=pct1
17
- comparisonTitle="vs. Last Month"
18
- />
19
- ```
20
-
21
- ## Examples
22
-
23
- ### Default
24
-
25
- ```markdown
26
- <BigValue
27
- data="orders_with_comparisons"
28
- value=num_orders
29
- />
30
- ```
31
-
32
- ### Comparisons
33
-
34
- ```markdown
35
- <BigValue
36
- data="orders_with_comparisons"
37
- value=num_orders
38
- comparison=order_growth
39
- comparisonFmt=pct1
40
- comparisonTitle="MoM"
41
- />
42
- ```
43
-
44
- ### Multiple cards
45
-
46
- Multiple cards will align themselves into a row.
47
-
48
- ```markdown
49
- <BigValue
50
- data="orders_with_comparisons"
51
- value=sales
52
- fmt=usd0
53
- comparison=sales_growth
54
- comparisonFmt=pct1
55
- comparisonTitle="MoM"
56
- />
57
- <BigValue
58
- data="orders_with_comparisons"
59
- value=num_orders
60
- title="Orders"
61
- comparison=order_growth
62
- comparisonFmt=pct1
63
- comparisonTitle="MoM"
64
- />
65
- <BigValue
66
- data="orders_with_comparisons"
67
- value=aov
68
- title="Average Order Value"
69
- fmt=usd2
70
- comparison=aov_growth
71
- comparisonFmt=pct1
72
- comparisonTitle="MoM"
73
- />
74
- ```
75
-
76
- ### Linking to other pages
77
-
78
- The link property makes the Value component clickable, allowing navigation to other pages.
79
-
80
- ```html
81
- <BigValue
82
- data="orders_with_comparisons"
83
- value=num_orders
84
- sparkline=month
85
- comparison=order_growth
86
- comparisonFmt=pct1
87
- comparisonTitle="vs. Last Month"
88
- link='/components/data/big-value'
89
- />
90
- ```
91
-
92
- ### Non-Delta Comparisons
93
-
94
- ```html
95
- <BigValue
96
- data="orders_with_comparisons"
97
- value=num_orders
98
- comparison=prev_month_orders
99
- comparisonTitle="Last Month"
100
- comparisonDelta=false
101
- />
102
- ```
103
-
104
- ### Sparkline
105
-
106
- ```html
107
- <BigValue
108
- data="orders_with_comparisons"
109
- value=sales
110
- sparkline=month
111
- />
112
- ```
113
-
114
- ## Options
115
-
116
- ### Data
117
-
118
- | Name | Description | Required | Options | Default |
119
- |------|-------------|----------|---------|---------|
120
- | data | Query name, wrapped in curly braces | true | query name | - |
121
- | value | Column to pull the main value from. | true | column name | - |
122
- | title | Title of the card. | false | string | Title of the value column. |
123
- | minWidth | Overrides min-width of component | false | % or px value | "18%" |
124
- | maxWidth | Adds a max-width to the component | false | % or px value | - |
125
- | fmt | Sets format for the value ([see available formats](/core-concepts/formatting)) | false | Excel-style format \| built-in format \| custom format | - |
126
- | emptySet | Sets behaviour for empty datasets. Can throw an error, a warning, or allow empty. When set to 'error', empty datasets will block builds in `build:strict`. Note this only applies to initial page load - empty datasets caused by input component changes (dropdowns, etc.) are allowed. | false | ['error', 'warn', 'pass'] | "error" |
127
- | emptyMessage | Text to display when an empty dataset is received - only applies when `emptySet` is 'warn' or 'pass', or when the empty dataset is a result of an input component change (dropdowns, etc.). | false | string | "No records" |
128
- | link | Used to navigate to other pages. Can be a full external link like `https://google.com` or an internal link like `/sales/performance` | false | - | - |
129
-
130
- ### Comparison Options
131
-
132
- | Name | Description | Required | Options | Default |
133
- |------|-------------|----------|---------|---------|
134
- | comparison | Column to pull the comparison value from. | false | column name | - |
135
- | comparisonTitle | Text to the right of the comparison. | false | string | Title of the comparison column. |
136
- | comparisonDelta | Whether to display delta symbol and color | false | ['true', 'false'] | true |
137
- | downIsGood | If present, negative comparison values appear in green, and positive values appear in red. | false | ['true', 'false'] | false |
138
- | neutralMin | Sets the bottom of the range for 'neutral' values - neutral values appear in grey rather than red or green | false | number | 0 |
139
- | neutralMax | Sets the top of the range for 'neutral' values - neutral values appear in grey rather than red or green | false | number | 0 |
140
- | comparisonFmt | Sets format for the comparison ([see available formats](/core-concepts/formatting)) | false | Excel-style format \| built-in format \| custom format | - |
141
-
142
- ### Sparkline
143
-
144
- | Name | Description | Required | Options | Default |
145
- |------|-------------|----------|---------|---------|
146
- | sparkline | Column to pull the date from to create the sparkline. | false | column name | - |
147
- | sparklineType | Chart type for sparkline | false | ['line', 'area', 'bar'] | "line" |
148
- | sparklineValueFmt | Formatting for tooltip values | false | format code | same as fmt if supplied |
149
- | sparklineDateFmt | Formatting for tooltip dates | false | format code | "YYYY-MM-DD" |
150
- | sparklineColor | Color of visualization | false | CSS name \| hexademical \| RGB \| HSL | - |
151
- | sparklineYScale | Whether to truncate the y-axis of the chart to enhance visibility | false | ['true', 'false'] | false |
152
- | connectGroup | Group name to connect this sparkline to other charts for synchronized tooltip hovering. Charts with the same `connectGroup` name will become connected | false | string | - |
153
- | description | Adds an info icon with description tooltip on hover | false | string | - |
@@ -1,89 +0,0 @@
1
- ---
2
- title: Delta
3
- description: Display an inline indicator that shows how a value has changed.
4
- ---
5
-
6
- Use a Delta component to display an inline indicator that shows how a value has changed.
7
-
8
-
9
- ```markdown
10
- This value is <Delta data="growth" column=positive fmt="+0.0%;-0.0%;0.0%" /> since last month.
11
- ```
12
-
13
- ## Examples
14
-
15
- ### Value Types
16
-
17
- #### Positive
18
-
19
- ```markdown
20
- <Delta data="growth" column=positive fmt=pct1 />
21
- ```
22
-
23
- #### Negative
24
-
25
- ```markdown
26
- <Delta data="growth" column=negative fmt=pct1 />
27
- ```
28
-
29
- #### Neutral*
30
- *Values are not defined as neutral until you define a range using the `neutralMin` and `neutralMax` props
31
-
32
- ```markdown
33
- <Delta data="growth" column=neutral fmt=pct1 neutralMin=-0.02 neutralMax=0.02 />
34
- ```
35
-
36
- ### Chips
37
-
38
- #### Positive
39
-
40
- ```markdown
41
- <Delta data="growth" column=growth fmt=pct1 chip=true />
42
- ```
43
-
44
- #### Negative
45
-
46
- ```markdown
47
- <Delta data="growth" column=negative fmt=pct1 chip=true/>
48
- ```
49
-
50
- #### Neutral*
51
- *Values are not defined as neutral until you define a range using the `neutralMin` and `neutralMax` props
52
-
53
- ```markdown
54
- <Delta data="growth" column=neutral fmt=pct1 chip=true neutralMin=-0.02 neutralMax=0.02 />
55
- ```
56
-
57
- ### Symbol Position
58
-
59
- #### Symbol on Left
60
-
61
- ```html
62
- <Delta data="growth" column=positive fmt=pct1 symbolPosition=left/>
63
- ```
64
-
65
- #### Symbol on Left in Chip
66
-
67
- ```html
68
- <Delta data="growth" column=positive fmt=pct1 chip=true symbolPosition=left/>
69
- ```
70
-
71
- ## Options
72
-
73
- | Name | Description | Required | Options | Default |
74
- |------|-------------|----------|---------|---------|
75
- | data | Query name, wrapped in curly braces | true | query name | - |
76
- | column | Column to pull values from | false | column name | First column |
77
- | row | Row number to display. 0 is the first row. | false | number | "0" |
78
- | value | Pass a specific value to the component (e.g., value=100). Overridden by the data/column props. | false | number | - |
79
- | fmt | Format to use for the value ([see available formats](/core-concepts/formatting)) | false | Excel-style format \| built-in format \| custom format | - |
80
- | downIsGood | If true, negative comparison values appear in green, and positive values appear in red. | false | ['true', 'false'] | "false" |
81
- | showSymbol | Whether to show the up/down delta arrow symbol | false | ['true', 'false'] | "true" |
82
- | showValue | Whether to show the value. Set this to false to show only the delta arrow indicator. | false | ['true', 'false'] | "true" |
83
- | text | Text to display after the delta symbol and value | false | string | - |
84
- | neutralMin | Start of the range for 'neutral' values, which appear in grey font with a dash instead of an up/down arrow. By default, neutral is not applied to any values. | false | number | "0" |
85
- | neutralMax | End of the range for 'neutral' values, which appear in grey font with a dash instead of an up/down arrow. By default, neutral is not applied to any values. | false | number | "0" |
86
- | chip | Whether to display the delta as a 'chip', with a background color and border. | false | ['true', 'false'] | "false" |
87
- | symbolPosition | Whether to display the delta symbol to the left or right of the value | false | ['left', 'right'] | "right" |
88
- | emptySet | Sets behaviour for empty datasets. Can throw an error, a warning, or allow empty. When set to 'error', empty datasets will block builds in `build:strict`. Note this only applies to initial page load - empty datasets caused by input component changes (dropdowns, etc.) are allowed. | false | ['error', 'warn', 'pass'] | "error" |
89
- | emptyMessage | Text to display when an empty dataset is received - only applies when `emptySet` is 'warn' or 'pass', or when the empty dataset is a result of an input component change (dropdowns, etc.). | false | string | "No records" |