{
- // Headers may contain values that change in response to user input, so we create our anchors as just the position on the page.
- header.id = encodeURIComponent(i + 1);
- });
+ headers = Array.from(document.querySelectorAll('h1.markdown, h2.markdown, h3.markdown'));
}
function observeDocumentChanges() {
@@ -38,12 +34,8 @@
On this page
- {#each headers as header, i}
-
{/each}
@@ -54,10 +46,6 @@
@apply block text-gray-600 text-xs transition-all duration-200 py-1;
}
- /* a.h1.first {
- @apply mt-0;
- } */
-
a:hover {
@apply underline;
}
@@ -66,6 +54,10 @@
@apply pl-0 text-gray-500;
}
+ a.h3 {
+ @apply pl-4 text-gray-500;
+ }
+
a.h1 {
@apply mt-3 font-semibold block bg-white shadow shadow-white;
}
diff --git a/packages/ui/core-components/src/lib/unsorted/viz/table/TableRow.svelte b/packages/ui/core-components/src/lib/unsorted/viz/table/TableRow.svelte
index f2723f2b53..4b5056543d 100644
--- a/packages/ui/core-components/src/lib/unsorted/viz/table/TableRow.svelte
+++ b/packages/ui/core-components/src/lib/unsorted/viz/table/TableRow.svelte
@@ -161,6 +161,8 @@
neutralMax={column.neutralMax}
chip={column.chip}
/>
+ {:else if column.contentType === 'html' && row[column.id] !== undefined}
+ {@html row[column.id]}
{:else}
{formatValue(
row[column.id],
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 57dd3fac2e..b468ac8bad 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -694,6 +694,12 @@ importers:
prismjs:
specifier: ^1.29.0
version: 1.29.0
+ rehype-autolink-headings:
+ specifier: 5.1.0
+ version: 5.1.0
+ rehype-slug:
+ specifier: 4.0.1
+ version: 4.0.1
remark-parse:
specifier: 8.0.2
version: 8.0.2
@@ -15492,10 +15498,18 @@ packages:
web-namespaces: 1.1.4
dev: false
+ /hast-util-has-property@1.0.4:
+ resolution: {integrity: sha512-ghHup2voGfgFoHMGnaLHOjbYFACKrRh9KFttdCzMCbFoBMJXiNi2+XTrPP8+q6cDJM/RSqlCfVWrjp1H201rZg==}
+ dev: false
+
/hast-util-has-property@2.0.1:
resolution: {integrity: sha512-X2+RwZIMTMKpXUzlotatPzWj8bspCymtXH3cfG3iQKV+wPF53Vgaqxi/eLqGck0wKq1kS9nvoB1wchbCPEL8sg==}
dev: false
+ /hast-util-heading-rank@1.0.1:
+ resolution: {integrity: sha512-P6Hq7RCky9syMevlrN90QWpqWDXCxwIVOfQR2rK6P4GpY4bqjKEuCzoWSRORZ7vz+VgRpLnXimh+mkwvVFjbyQ==}
+ dev: false
+
/hast-util-heading-rank@3.0.0:
resolution: {integrity: sha512-EJKb8oMUXVHcWZTDepnr+WNbfnXKFNf9duMesmr4S8SXTJBJ9M4Yok08pu9vxdJwdlGRhVumk9mEhkEvKGifwA==}
dependencies:
@@ -15561,6 +15575,10 @@ packages:
zwitch: 1.0.5
dev: false
+ /hast-util-to-string@1.0.4:
+ resolution: {integrity: sha512-eK0MxRX47AV2eZ+Lyr18DCpQgodvaS3fAQO2+b9Two9F5HEoRPhiUMNzoXArMJfZi2yieFzUBMRl3HNJ3Jus3w==}
+ dev: false
+
/hast-util-to-string@2.0.0:
resolution: {integrity: sha512-02AQ3vLhuH3FisaMM+i/9sm4OXGSq1UhOOCpTLLQtHdL3tZt7qil69r8M8iDkZYyC0HCFylcYoP+8IO7ddta1A==}
dependencies:
@@ -21046,6 +21064,15 @@ packages:
dependencies:
jsesc: 0.5.0
+ /rehype-autolink-headings@5.1.0:
+ resolution: {integrity: sha512-ujU4/ALnWLJQubobQaMdC0h9nkzi7HlW9SOuCxZOkkJqhc/TrQ1cigIjMFQ2Tfc/es0KiFopKvwCUGw7Gw+mFw==}
+ dependencies:
+ extend: 3.0.2
+ hast-util-has-property: 1.0.4
+ hast-util-heading-rank: 1.0.1
+ unist-util-visit: 2.0.3
+ dev: false
+
/rehype-external-links@3.0.0:
resolution: {integrity: sha512-yp+e5N9V3C6bwBeAC4n796kc86M4gJCdlVhiMTxIrJG5UHDMh+PJANf9heqORJbt1nrCbDwIlAZKjANIaVBbvw==}
dependencies:
@@ -21075,6 +21102,16 @@ packages:
parse5: 6.0.1
dev: false
+ /rehype-slug@4.0.1:
+ resolution: {integrity: sha512-KIlJALf9WfHFF21icwTd2yI2IP+RQRweaxH9ChVGQwRYy36+hiomG4ZSe0yQRyCt+D/vE39LbAcOI/h4O4GPhA==}
+ dependencies:
+ github-slugger: 1.5.0
+ hast-util-has-property: 1.0.4
+ hast-util-heading-rank: 1.0.1
+ hast-util-to-string: 1.0.4
+ unist-util-visit: 2.0.3
+ dev: false
+
/rehype-slug@6.0.0:
resolution: {integrity: sha512-lWyvf/jwu+oS5+hL5eClVd3hNdmwM1kAC0BUvEGD19pajQMIzcNUd/k9GsfQ+FfECvX+JE+e9/btsKH0EjJT6A==}
dependencies:
diff --git a/sites/docs/docs/components/dropdown.md b/sites/docs/docs/components/dropdown.md
index 3139625f4b..4af5984580 100644
--- a/sites/docs/docs/components/dropdown.md
+++ b/sites/docs/docs/components/dropdown.md
@@ -123,6 +123,23 @@ where column_name like '${inputs.name_of_dropdown.value}'
```
````
+### Multiple defaultValues
+
+````markdown
+
+
+```sql filtered_query
+select *
+from source_name.table
+where column_name like '${inputs.name_of_dropdown.value}'
+```
+````
+
## Dropdown
### Options
@@ -150,24 +167,38 @@ where column_name like '${inputs.name_of_dropdown.value}'
- |
- value |
+ value |
Column name from the query containing values to pick from |
No |
column name |
- |
-
+
defaultValue |
- Value to use when the dropdown is first loaded. Must be one of the options in the dropdown. |
+ Value(s) to use when the dropdown is first loaded. Must be options in the values of the dropdown. Note: for multiple values, the array must be formatted as `defaultValue={[]}`, not `defaultValue=[]` |
No |
- |
First value in dropdown |
+
+
+ noDefault |
+ Stops any default from being selected. Overrides any set `defaultValue`. |
+ No |
+ true | false |
+ false |
+
+
+ disableSelectAll |
+ Removes the `Select all` button. Recommended for large datasets. |
+ No |
+ true | false |
+ false |
multiple |
Enables multi-select which returns a list |
No |
- boolean |
+ true | false |
false |
@@ -198,6 +229,13 @@ where column_name like '${inputs.name_of_dropdown.value}'
SQL where clause |
- |
+
+ hideDuringPrint |
+ Hide the component when the report is printed |
+ No |
+ true | false |
+ true |
+
## DropdownOption
diff --git a/sites/example-project/src/app.css b/sites/example-project/src/app.css
index 88e19df552..c541f829a1 100644
--- a/sites/example-project/src/app.css
+++ b/sites/example-project/src/app.css
@@ -172,7 +172,7 @@
}
code.markdown {
- @apply font-mono text-gray-800 text-sm bg-gray-50 border rounded px-1 select-all py-0.5;
+ @apply font-mono text-gray-800 text-[0.875em] bg-gray-50 border rounded px-1 select-all py-0.5;
}
form code {
@@ -186,6 +186,18 @@
blockquote.markdown * {
@apply text-gray-500;
}
+ /* Ensure size and color are maintained for bold, italic, strikethrough */
+ strong.markdown {
+ @apply text-[1em] text-inherit;
+ }
+
+ em.markdown {
+ @apply text-[1em] text-inherit;
+ }
+
+ del.markdown {
+ @apply text-[1em] text-inherit;
+ }
table.markdown {
@apply min-w-full border-collapse text-center mx-auto my-5;
diff --git a/sites/example-project/src/pages/text-and-metrics/markdown/+page.md b/sites/example-project/src/pages/text-and-metrics/markdown/+page.md
index 27d8bfb65f..010ccf8c47 100644
--- a/sites/example-project/src/pages/text-and-metrics/markdown/+page.md
+++ b/sites/example-project/src/pages/text-and-metrics/markdown/+page.md
@@ -15,6 +15,14 @@ title: Markdown
###### Heading Level 6
+# ~~Heading Level 1 with Strikethrough~~
+
+# Heading Level 1 with _Italics_
+
+# Heading Level 1 with **Bold**
+
+# Heading Level 1 with `code`
+
# Link Headers
# [Link h1](/)
@@ -67,7 +75,7 @@ _Italic_
~~Strikethrough~~
Textsuperscript
Textsubscript
-Underline
+# This is Underline and **Bold**
## Highlighting
@@ -140,7 +148,7 @@ Link to [Google](https://google.com)
| Column One | Column Two | Column Three |
| :--------: | :--------: | :----------: |
-| A | B | C |
+| A `with code` | B | C |
| 1 | 2 | 3 |
| D | E | F |
| 4 | 5 | 6 |
diff --git a/sites/test-env/pages/dropdown.md b/sites/test-env/pages/dropdown.md
index 230a622671..ab6517b8e3 100644
--- a/sites/test-env/pages/dropdown.md
+++ b/sites/test-env/pages/dropdown.md
@@ -47,7 +47,7 @@ select * from orders limit 1000
select * from orders where id in ${inputs.multiple_selected_order_ids.value}
```
-
+
Orders of {inputs.multiple_selected_order_ids.label}
@@ -71,7 +71,7 @@ Orders of {inputs.multiple_selected_order_ids.label}
## Small Demo
-
+
```selected_items