@lowdefy/docs-content 0.0.0-experimental-20260710073520
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.
- package/LICENSE +201 -0
- package/README.md +20 -0
- package/content/actions/callapi.md +66 -0
- package/content/actions/callmethod.md +41 -0
- package/content/actions/copytoclipboard.md +32 -0
- package/content/actions/displaymessage.md +53 -0
- package/content/actions/downloadcsv.md +89 -0
- package/content/actions/fetch.md +50 -0
- package/content/actions/geolocationcurrentposition.md +56 -0
- package/content/actions/link.md +104 -0
- package/content/actions/login.md +85 -0
- package/content/actions/logout.md +56 -0
- package/content/actions/pdfmake.md +304 -0
- package/content/actions/request.md +67 -0
- package/content/actions/reset.md +27 -0
- package/content/actions/resetvalidation.md +85 -0
- package/content/actions/scrollto.md +85 -0
- package/content/actions/setdarkmode.md +62 -0
- package/content/actions/setfocus.md +33 -0
- package/content/actions/setglobal.md +63 -0
- package/content/actions/setlocale.md +69 -0
- package/content/actions/setstate.md +70 -0
- package/content/actions/throw.md +72 -0
- package/content/actions/validate.md +87 -0
- package/content/actions/wait.md +24 -0
- package/content/agents/agent-endpoint-tools.md +190 -0
- package/content/agents/agent-mcp-tools.md +124 -0
- package/content/agents/agent-multi-agent.md +136 -0
- package/content/agents/agent-properties.md +174 -0
- package/content/agents/agent-server-hooks.md +336 -0
- package/content/agents/agentchat.md +515 -0
- package/content/agents/agentconversations.md +148 -0
- package/content/concepts/ai-agent-docs.md +190 -0
- package/content/concepts/cli.md +213 -0
- package/content/concepts/connections-and-requests.md +7 -0
- package/content/concepts/custom-html.md +3 -0
- package/content/concepts/custom-styling.md +161 -0
- package/content/concepts/events-and-actions.md +271 -0
- package/content/concepts/hosting-files.md +18 -0
- package/content/concepts/i18n.md +320 -0
- package/content/concepts/keyboard-shortcuts.md +218 -0
- package/content/concepts/layout-overview.md +478 -0
- package/content/concepts/lists.md +144 -0
- package/content/concepts/logger.md +43 -0
- package/content/concepts/lowdefy-schema.md +365 -0
- package/content/concepts/menus.md +144 -0
- package/content/concepts/module-authoring.md +564 -0
- package/content/concepts/modules.md +338 -0
- package/content/concepts/operators.md +45 -0
- package/content/concepts/overview.md +19 -0
- package/content/concepts/references-and-templates.md +207 -0
- package/content/concepts/secrets.md +24 -0
- package/content/concepts/selectors.md +143 -0
- package/content/connections/amazonredshift.md +176 -0
- package/content/connections/anthropic.md +232 -0
- package/content/connections/awss3.md +313 -0
- package/content/connections/azureblobstorage.md +133 -0
- package/content/connections/elasticsearch.md +371 -0
- package/content/connections/google.md +228 -0
- package/content/connections/googlecloudstorage.md +139 -0
- package/content/connections/googlesheet.md +313 -0
- package/content/connections/knex.md +206 -0
- package/content/connections/mariadb.md +177 -0
- package/content/connections/mcp.md +134 -0
- package/content/connections/mongodb.md +739 -0
- package/content/connections/mssql.md +191 -0
- package/content/connections/mysql.md +192 -0
- package/content/connections/openai-connection.md +228 -0
- package/content/connections/postgresql.md +200 -0
- package/content/connections/redis.md +116 -0
- package/content/connections/sendgridmail.md +94 -0
- package/content/connections/smtp.md +149 -0
- package/content/connections/sqlite.md +187 -0
- package/content/connections/stripe.md +115 -0
- package/content/container-blocks/affix.md +413 -0
- package/content/container-blocks/alert.md +937 -0
- package/content/container-blocks/badge.md +1222 -0
- package/content/container-blocks/box.md +1453 -0
- package/content/container-blocks/card.md +1200 -0
- package/content/container-blocks/carousel.md +2247 -0
- package/content/container-blocks/collapse.md +1335 -0
- package/content/container-blocks/configprovider.md +1070 -0
- package/content/container-blocks/confirmmodal.md +1159 -0
- package/content/container-blocks/content.md +597 -0
- package/content/container-blocks/descriptions.md +870 -0
- package/content/container-blocks/drawer.md +1379 -0
- package/content/container-blocks/dropdownmenu.md +643 -0
- package/content/container-blocks/flex.md +1510 -0
- package/content/container-blocks/footer.md +380 -0
- package/content/container-blocks/googlemaps.md +546 -0
- package/content/container-blocks/googlemapsheatmap.md +607 -0
- package/content/container-blocks/googlemapsscript.md +61 -0
- package/content/container-blocks/header.md +302 -0
- package/content/container-blocks/label.md +739 -0
- package/content/container-blocks/layout.md +604 -0
- package/content/container-blocks/masonry.md +1090 -0
- package/content/container-blocks/mobilemenu.md +1244 -0
- package/content/container-blocks/modal.md +1180 -0
- package/content/container-blocks/pageheadermenu.md +614 -0
- package/content/container-blocks/pagesidebarlayout.md +438 -0
- package/content/container-blocks/pagesidermenu.md +651 -0
- package/content/container-blocks/popover.md +1421 -0
- package/content/container-blocks/result.md +972 -0
- package/content/container-blocks/sider.md +1064 -0
- package/content/container-blocks/span.md +747 -0
- package/content/container-blocks/spinner.md +267 -0
- package/content/container-blocks/splitter.md +1735 -0
- package/content/container-blocks/tabs.md +1718 -0
- package/content/container-blocks/tooltip.md +1274 -0
- package/content/container-blocks/watermark.md +515 -0
- package/content/controls/for.md +103 -0
- package/content/controls/if.md +107 -0
- package/content/controls/log.md +50 -0
- package/content/controls/parallel.md +71 -0
- package/content/controls/parallel_for.md +36 -0
- package/content/controls/reject.md +56 -0
- package/content/controls/return.md +66 -0
- package/content/controls/set_state.md +98 -0
- package/content/controls/switch.md +90 -0
- package/content/controls/throw.md +79 -0
- package/content/controls/try.md +88 -0
- package/content/deployment/docker.md +149 -0
- package/content/deployment/node-server.md +27 -0
- package/content/deployment/vercel.md +101 -0
- package/content/display-blocks/aggrid.md +1459 -0
- package/content/display-blocks/anchor.md +336 -0
- package/content/display-blocks/avatar.md +1154 -0
- package/content/display-blocks/breadcrumb.md +517 -0
- package/content/display-blocks/button.md +758 -0
- package/content/display-blocks/calendar.md +156 -0
- package/content/display-blocks/dangeroushtml.md +314 -0
- package/content/display-blocks/dangerousmarkdown.md +423 -0
- package/content/display-blocks/diffgit.md +44 -0
- package/content/display-blocks/difflist.md +225 -0
- package/content/display-blocks/diffsidebyside.md +56 -0
- package/content/display-blocks/difftimeline.md +94 -0
- package/content/display-blocks/divider.md +406 -0
- package/content/display-blocks/download.md +60 -0
- package/content/display-blocks/dropdownbutton.md +661 -0
- package/content/display-blocks/echart.md +418 -0
- package/content/display-blocks/floatbutton.md +545 -0
- package/content/display-blocks/html.md +311 -0
- package/content/display-blocks/icon.md +717 -0
- package/content/display-blocks/img.md +479 -0
- package/content/display-blocks/markdown.md +520 -0
- package/content/display-blocks/markdownwithcode.md +730 -0
- package/content/display-blocks/menu.md +1123 -0
- package/content/display-blocks/message.md +941 -0
- package/content/display-blocks/notification.md +1410 -0
- package/content/display-blocks/paragraph.md +643 -0
- package/content/display-blocks/progress.md +818 -0
- package/content/display-blocks/qrcode.md +519 -0
- package/content/display-blocks/s3download.md +240 -0
- package/content/display-blocks/search.md +360 -0
- package/content/display-blocks/skeleton.md +272 -0
- package/content/display-blocks/skeletonavatar.md +222 -0
- package/content/display-blocks/skeletonbutton.md +245 -0
- package/content/display-blocks/skeletoninput.md +223 -0
- package/content/display-blocks/skeletonparagraph.md +201 -0
- package/content/display-blocks/statistic.md +485 -0
- package/content/display-blocks/steps.md +585 -0
- package/content/display-blocks/tag.md +620 -0
- package/content/display-blocks/title.md +654 -0
- package/content/display-blocks/tour.md +2359 -0
- package/content/input-blocks/autocomplete.md +786 -0
- package/content/input-blocks/buttonselector.md +964 -0
- package/content/input-blocks/checkboxselector.md +765 -0
- package/content/input-blocks/checkboxswitch.md +497 -0
- package/content/input-blocks/colorselector.md +884 -0
- package/content/input-blocks/daterangeselector.md +777 -0
- package/content/input-blocks/dateselector.md +693 -0
- package/content/input-blocks/datetimeselector.md +791 -0
- package/content/input-blocks/inputgallery.md +528 -0
- package/content/input-blocks/monthselector.md +717 -0
- package/content/input-blocks/multipleselector.md +1337 -0
- package/content/input-blocks/numberinput.md +855 -0
- package/content/input-blocks/pagination.md +679 -0
- package/content/input-blocks/paragraphinput.md +1664 -0
- package/content/input-blocks/passwordinput.md +480 -0
- package/content/input-blocks/phonenumberinput.md +688 -0
- package/content/input-blocks/radioselector.md +820 -0
- package/content/input-blocks/ratingslider.md +684 -0
- package/content/input-blocks/s3uploadbutton.md +384 -0
- package/content/input-blocks/s3uploaddragger.md +305 -0
- package/content/input-blocks/s3uploadphoto.md +288 -0
- package/content/input-blocks/segmentedselector.md +782 -0
- package/content/input-blocks/selector.md +1162 -0
- package/content/input-blocks/switch.md +552 -0
- package/content/input-blocks/textarea.md +714 -0
- package/content/input-blocks/textinput.md +639 -0
- package/content/input-blocks/tiptapinput.md +226 -0
- package/content/input-blocks/tiptapmentioninput.md +471 -0
- package/content/input-blocks/titleinput.md +1094 -0
- package/content/input-blocks/treeinput.md +144 -0
- package/content/input-blocks/treemultipleselector.md +162 -0
- package/content/input-blocks/treeselector.md +185 -0
- package/content/input-blocks/upload.md +149 -0
- package/content/input-blocks/uploaddragger.md +85 -0
- package/content/input-blocks/uploadphoto.md +84 -0
- package/content/input-blocks/weekselector.md +630 -0
- package/content/list-blocks/controlledlist.md +498 -0
- package/content/list-blocks/list.md +529 -0
- package/content/list-blocks/listselector.md +301 -0
- package/content/list-blocks/masonrylist.md +230 -0
- package/content/migration/upgrade-guide.md +106 -0
- package/content/migration/v4-to-v5.md +589 -0
- package/content/migration/v5-to-v6.md +36 -0
- package/content/operators/_actions.md +58 -0
- package/content/operators/_and.md +76 -0
- package/content/operators/_api.md +254 -0
- package/content/operators/_app.md +114 -0
- package/content/operators/_args.md +65 -0
- package/content/operators/_array.md +331 -0
- package/content/operators/_base64.md +49 -0
- package/content/operators/_boolean.md +33 -0
- package/content/operators/_build.md +166 -0
- package/content/operators/_change_case.md +357 -0
- package/content/operators/_date.md +415 -0
- package/content/operators/_dayjs.md +128 -0
- package/content/operators/_diff.md +61 -0
- package/content/operators/_divide.md +32 -0
- package/content/operators/_eq.md +52 -0
- package/content/operators/_event.md +86 -0
- package/content/operators/_function.md +52 -0
- package/content/operators/_get.md +92 -0
- package/content/operators/_global.md +86 -0
- package/content/operators/_gt.md +50 -0
- package/content/operators/_gte.md +50 -0
- package/content/operators/_hash.md +112 -0
- package/content/operators/_if.md +30 -0
- package/content/operators/_if_none.md +47 -0
- package/content/operators/_index.md +48 -0
- package/content/operators/_input.md +86 -0
- package/content/operators/_intl.md +135 -0
- package/content/operators/_item.md +166 -0
- package/content/operators/_js.md +113 -0
- package/content/operators/_json.md +120 -0
- package/content/operators/_jsonata.md +152 -0
- package/content/operators/_locale.md +65 -0
- package/content/operators/_location.md +40 -0
- package/content/operators/_log.md +22 -0
- package/content/operators/_lt.md +50 -0
- package/content/operators/_lte.md +50 -0
- package/content/operators/_math.md +407 -0
- package/content/operators/_media.md +83 -0
- package/content/operators/_menu.md +62 -0
- package/content/operators/_module.md +340 -0
- package/content/operators/_mql.md +95 -0
- package/content/operators/_ne.md +62 -0
- package/content/operators/_not.md +33 -0
- package/content/operators/_number.md +159 -0
- package/content/operators/_nunjucks.md +117 -0
- package/content/operators/_object.md +253 -0
- package/content/operators/_operator.md +33 -0
- package/content/operators/_or.md +67 -0
- package/content/operators/_product.md +45 -0
- package/content/operators/_random.md +90 -0
- package/content/operators/_ref.md +80 -0
- package/content/operators/_regex.md +69 -0
- package/content/operators/_request.md +35 -0
- package/content/operators/_request_details.md +29 -0
- package/content/operators/_secret.md +56 -0
- package/content/operators/_state.md +134 -0
- package/content/operators/_step.md +98 -0
- package/content/operators/_string.md +327 -0
- package/content/operators/_subtract.md +24 -0
- package/content/operators/_sum.md +45 -0
- package/content/operators/_switch.md +37 -0
- package/content/operators/_t.md +96 -0
- package/content/operators/_theme.md +65 -0
- package/content/operators/_type.md +78 -0
- package/content/operators/_uri.md +49 -0
- package/content/operators/_url_query.md +92 -0
- package/content/operators/_user.md +154 -0
- package/content/operators/_uuid.md +118 -0
- package/content/operators/_var.md +88 -0
- package/content/operators/_yaml.md +96 -0
- package/content/other/introduction.md +39 -0
- package/content/other/next-auth-providers.md +3 -0
- package/content/other/updatesession.md +26 -0
- package/content/plugins/plugins-actions.md +80 -0
- package/content/plugins/plugins-connections.md +98 -0
- package/content/plugins/plugins-dev.md +138 -0
- package/content/plugins/plugins-introduction.md +29 -0
- package/content/plugins/plugins-operators.md +71 -0
- package/content/testing/e2e-auth.md +108 -0
- package/content/testing/e2e-configuration.md +107 -0
- package/content/testing/e2e-getting-started.md +96 -0
- package/content/testing/e2e-introduction.md +53 -0
- package/content/testing/e2e-mocking.md +155 -0
- package/content/testing/e2e-writing-tests.md +214 -0
- package/content/tutorial/tutorial-actions-operators.md +222 -0
- package/content/tutorial/tutorial-add-blocks.md +86 -0
- package/content/tutorial/tutorial-create-page.md +57 -0
- package/content/tutorial/tutorial-display-data-page.md +181 -0
- package/content/tutorial/tutorial-next-steps.md +53 -0
- package/content/tutorial/tutorial-requests-sql.md +22 -0
- package/content/tutorial/tutorial-start.md +71 -0
- package/content/user-authentication/auth-providers.md +15 -0
- package/content/user-authentication/login-and-logout.md +122 -0
- package/content/user-authentication/users-introduction.md +31 -0
- package/index.json +2281 -0
- package/package.json +34 -0
- package/scripts/extractAgentDocs.js +130 -0
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
# S3Download
|
|
2
|
+
|
|
3
|
+
__Deprecated__ — use the provider-neutral <a href="/Download">Download</a> block with `downloadPolicyRequestId` instead. S3Download remains as an alias so existing apps keep working. Download files from AWS S3. Requires an AwsS3Bucket connection and an AwsS3PresignedGetObject request. The s3GetPolicyRequestId property must reference the request id. If files were uploaded with S3Upload, its fileList value can be mapped directly to this block.
|
|
4
|
+
|
|
5
|
+
> The S3Download block requires an AwsS3Bucket connection and an AwsS3PresignedGetObject request. The examples below show configuration structure but will not download files without a configured connection.
|
|
6
|
+
|
|
7
|
+
```yaml
|
|
8
|
+
- id: basic_download
|
|
9
|
+
type: S3Download
|
|
10
|
+
properties:
|
|
11
|
+
s3GetPolicyRequestId: download_file
|
|
12
|
+
fileList:
|
|
13
|
+
- key: report.pdf
|
|
14
|
+
type: application/pdf
|
|
15
|
+
name: report.pdf
|
|
16
|
+
- key: photo.jpg
|
|
17
|
+
type: image/jpeg
|
|
18
|
+
name: photo.jpg
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
```yaml
|
|
22
|
+
- id: single_file
|
|
23
|
+
type: S3Download
|
|
24
|
+
properties:
|
|
25
|
+
s3GetPolicyRequestId: download_file
|
|
26
|
+
fileList:
|
|
27
|
+
- key: invoice_2026_001.pdf
|
|
28
|
+
type: application/pdf
|
|
29
|
+
name: invoice_2026_001.pdf
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
```yaml
|
|
33
|
+
- id: multi_type
|
|
34
|
+
type: S3Download
|
|
35
|
+
properties:
|
|
36
|
+
s3GetPolicyRequestId: download_file
|
|
37
|
+
fileList:
|
|
38
|
+
- key: documents/contract.pdf
|
|
39
|
+
type: application/pdf
|
|
40
|
+
name: contract.pdf
|
|
41
|
+
- key: images/logo.png
|
|
42
|
+
type: image/png
|
|
43
|
+
name: logo.png
|
|
44
|
+
- key: data/export.csv
|
|
45
|
+
type: text/csv
|
|
46
|
+
name: export.csv
|
|
47
|
+
- key: archives/backup.zip
|
|
48
|
+
type: application/zip
|
|
49
|
+
name: backup.zip
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
```yaml
|
|
53
|
+
- id: styled_download
|
|
54
|
+
type: S3Download
|
|
55
|
+
style:
|
|
56
|
+
.element:
|
|
57
|
+
background: "#f6ffed"
|
|
58
|
+
border: 1px solid
|
|
59
|
+
borderRadius: 8
|
|
60
|
+
padding: 12
|
|
61
|
+
properties:
|
|
62
|
+
s3GetPolicyRequestId: download_file
|
|
63
|
+
fileList:
|
|
64
|
+
- key: report.pdf
|
|
65
|
+
type: application/pdf
|
|
66
|
+
name: Quarterly Report.pdf
|
|
67
|
+
- key: summary.pdf
|
|
68
|
+
type: application/pdf
|
|
69
|
+
name: Executive Summary.pdf
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
```yaml
|
|
73
|
+
- id: themed_download
|
|
74
|
+
type: S3Download
|
|
75
|
+
properties:
|
|
76
|
+
s3GetPolicyRequestId: download_file
|
|
77
|
+
theme:
|
|
78
|
+
actionsColor: "#f5222d"
|
|
79
|
+
controlItemBgHover: "#f9f0ff"
|
|
80
|
+
colorIcon: "#f5222d"
|
|
81
|
+
fontSize: 18
|
|
82
|
+
fileList:
|
|
83
|
+
- key: contracts/nda.pdf
|
|
84
|
+
type: application/pdf
|
|
85
|
+
name: Non-Disclosure Agreement.pdf
|
|
86
|
+
- key: contracts/sla.pdf
|
|
87
|
+
type: application/pdf
|
|
88
|
+
name: Service Level Agreement.pdf
|
|
89
|
+
- key: contracts/msa.pdf
|
|
90
|
+
type: application/pdf
|
|
91
|
+
name: Master Services Agreement.pdf
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Full page config with connection, request, and S3Download block:
|
|
95
|
+
```yaml
|
|
96
|
+
# lowdefy.yaml
|
|
97
|
+
connections:
|
|
98
|
+
- id: project_files
|
|
99
|
+
type: AwsS3Bucket
|
|
100
|
+
properties:
|
|
101
|
+
accessKeyId:
|
|
102
|
+
_secret: FILES_S3_ACCESS_KEY_ID
|
|
103
|
+
secretAccessKey:
|
|
104
|
+
_secret: FILES_S3_SECRET_ACCESS_KEY
|
|
105
|
+
region: us-east-1
|
|
106
|
+
bucket:
|
|
107
|
+
_secret: FILES_S3_BUCKET
|
|
108
|
+
|
|
109
|
+
# page config
|
|
110
|
+
id: document_portal
|
|
111
|
+
type: PageSiderMenu
|
|
112
|
+
blocks:
|
|
113
|
+
- id: documents_card
|
|
114
|
+
type: Card
|
|
115
|
+
properties:
|
|
116
|
+
title: Project Documents
|
|
117
|
+
blocks:
|
|
118
|
+
- id: download_files
|
|
119
|
+
type: S3Download
|
|
120
|
+
properties:
|
|
121
|
+
s3GetPolicyRequestId: download_file
|
|
122
|
+
fileList:
|
|
123
|
+
- key: projects/alpha/proposal.pdf
|
|
124
|
+
type: application/pdf
|
|
125
|
+
name: Project Alpha - Proposal.pdf
|
|
126
|
+
- key: projects/alpha/budget.xlsx
|
|
127
|
+
type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
|
128
|
+
name: Project Alpha - Budget.xlsx
|
|
129
|
+
requests:
|
|
130
|
+
- id: download_file
|
|
131
|
+
type: AwsS3PresignedGetObject
|
|
132
|
+
connectionId: project_files
|
|
133
|
+
payload:
|
|
134
|
+
key:
|
|
135
|
+
_event: file.key
|
|
136
|
+
type:
|
|
137
|
+
_event: file.type
|
|
138
|
+
properties:
|
|
139
|
+
key:
|
|
140
|
+
_payload: key
|
|
141
|
+
responseContentType:
|
|
142
|
+
_payload: type
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Upload and download files on the same page by mapping the S3Upload fileList to S3Download:
|
|
146
|
+
```yaml
|
|
147
|
+
# lowdefy.yaml
|
|
148
|
+
connections:
|
|
149
|
+
- id: attachments
|
|
150
|
+
type: AwsS3Bucket
|
|
151
|
+
properties:
|
|
152
|
+
accessKeyId:
|
|
153
|
+
_secret: FILES_S3_ACCESS_KEY_ID
|
|
154
|
+
secretAccessKey:
|
|
155
|
+
_secret: FILES_S3_SECRET_ACCESS_KEY
|
|
156
|
+
region: us-east-1
|
|
157
|
+
bucket:
|
|
158
|
+
_secret: FILES_S3_BUCKET
|
|
159
|
+
write: true
|
|
160
|
+
|
|
161
|
+
# page config
|
|
162
|
+
id: file_management
|
|
163
|
+
type: PageSiderMenu
|
|
164
|
+
blocks:
|
|
165
|
+
- id: upload_card
|
|
166
|
+
type: Card
|
|
167
|
+
properties:
|
|
168
|
+
title: Upload Files
|
|
169
|
+
blocks:
|
|
170
|
+
- id: upload_files
|
|
171
|
+
type: S3Upload
|
|
172
|
+
properties:
|
|
173
|
+
s3PutPolicyRequestId: upload_policy
|
|
174
|
+
requests:
|
|
175
|
+
- id: upload_policy
|
|
176
|
+
type: AwsS3PresignedPutObject
|
|
177
|
+
connectionId: attachments
|
|
178
|
+
payload:
|
|
179
|
+
filename:
|
|
180
|
+
_event: filename
|
|
181
|
+
properties:
|
|
182
|
+
key:
|
|
183
|
+
_payload: filename
|
|
184
|
+
- id: download_card
|
|
185
|
+
type: Card
|
|
186
|
+
properties:
|
|
187
|
+
title: Download Uploaded Files
|
|
188
|
+
blocks:
|
|
189
|
+
- id: download_files
|
|
190
|
+
type: S3Download
|
|
191
|
+
properties:
|
|
192
|
+
s3GetPolicyRequestId: download_policy
|
|
193
|
+
# Map fileList directly from S3Upload state
|
|
194
|
+
fileList:
|
|
195
|
+
_state: upload_files
|
|
196
|
+
requests:
|
|
197
|
+
- id: download_policy
|
|
198
|
+
type: AwsS3PresignedGetObject
|
|
199
|
+
connectionId: attachments
|
|
200
|
+
payload:
|
|
201
|
+
key:
|
|
202
|
+
_event: file.key
|
|
203
|
+
type:
|
|
204
|
+
_event: file.type
|
|
205
|
+
properties:
|
|
206
|
+
key:
|
|
207
|
+
_payload: key
|
|
208
|
+
responseContentType:
|
|
209
|
+
_payload: type
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
| Property | Type | Default | Description |
|
|
213
|
+
| --- | --- | --- | --- |
|
|
214
|
+
| `fileList` | array | - | List of files to be downloaded. If files were uploaded using an S3Upload block, the fileList value can just be mapped to this field. |
|
|
215
|
+
| `fileList.$.key` | string | - | S3 file key. |
|
|
216
|
+
| `fileList.$.lastModified` | string | - | File last modified date. |
|
|
217
|
+
| `fileList.$.name` | string | - | File name. |
|
|
218
|
+
| `fileList.$.size` | number | - | File size in bytes. |
|
|
219
|
+
| `fileList.$.type` | string | - | File MIME type. |
|
|
220
|
+
| `s3GetPolicyRequestId` | string | - | Id of a request of type AwsS3PresignedGetObject that defines which S3 bucket and file to download. |
|
|
221
|
+
| `showRemoveIcon` | boolean | `false` | Show a remove (×) icon next to each file in the list. Clicking it fires the `onRemove` event; the file is not removed from `fileList` automatically — the action handler is responsible. |
|
|
222
|
+
| `theme` | object | - | Antd design token overrides for this block. See [antd design tokens](https://ant.design/components/upload#design-token). See [Ant Design upload tokens](https://ant.design/components/upload#design-token). |
|
|
223
|
+
| `theme.actionsColor` | string | - | Color of action icons (download, preview, remove). |
|
|
224
|
+
| `theme.pictureCardSize` | number | - | Size of list items in card type (affects both picture-card and picture-circle). |
|
|
225
|
+
| `theme.controlItemBgHover` | string | - | Background color of file item on hover. |
|
|
226
|
+
| `theme.colorIcon` | string | - | Color of file icons. |
|
|
227
|
+
| `theme.fontSize` | number | - | Font size of file name text. |
|
|
228
|
+
| `theme.borderRadiusSM` | number | - | Border radius of file list items. |
|
|
229
|
+
|
|
230
|
+
| Event | Event Data | Description |
|
|
231
|
+
| --- | --- | --- |
|
|
232
|
+
| `onChange` | \- | Triggered when the upload state is changing. |
|
|
233
|
+
| `onRemove` | `{ file }` | Triggered when a file remove icon is clicked. The file is NOT removed automatically — the handler is responsible for updating `fileList` (e.g. via `SetState`). |
|
|
234
|
+
|
|
235
|
+
| Key | Target |
|
|
236
|
+
| --- | --- |
|
|
237
|
+
| `/block` | Outer block wrapper (always available). |
|
|
238
|
+
| `/element` | The S3Download element. |
|
|
239
|
+
|
|
240
|
+
No slots defined.
|
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
# Search
|
|
2
|
+
|
|
3
|
+
A full-text search command palette (Cmd+K / Ctrl+K) with keyboard navigation, result highlighting, and grouped results. Uses [MiniSearch](https://lucaong.github.io/minisearch/) for the search engine and antd Modal for the overlay. Two ways to provide data: pre-built index file via `indexUrl` (generated at build time, best for static content), or runtime `documents` array (indexed client-side, good for dynamic content). See the guide and examples below.
|
|
4
|
+
|
|
5
|
+
## Generating a Search Index
|
|
6
|
+
|
|
7
|
+
The Search block supports two data sources. For most apps, a **pre-built index file** is the best approach — it's generated once at build time and loaded on-demand when the user opens the search modal.
|
|
8
|
+
|
|
9
|
+
### Option 1: Pre-built index file (recommended)
|
|
10
|
+
|
|
11
|
+
Create a JavaScript transformer that runs during `lowdefy build`. It receives all resolved pages, extracts searchable text, builds a [MiniSearch](https://lucaong.github.io/minisearch/) index, and writes it to `public/search-index.json`.
|
|
12
|
+
|
|
13
|
+
**Step 1 — Write the transformer:**
|
|
14
|
+
|
|
15
|
+
```javascript
|
|
16
|
+
// templates/buildSearchIndex.js
|
|
17
|
+
import MiniSearch from 'minisearch';
|
|
18
|
+
import fs from 'fs';
|
|
19
|
+
import path, { dirname } from 'path';
|
|
20
|
+
import { fileURLToPath } from 'url';
|
|
21
|
+
|
|
22
|
+
function buildSearchIndex(pages) {
|
|
23
|
+
// Extract searchable content from each page
|
|
24
|
+
const documents = pages.filter(Boolean).map((page) => ({
|
|
25
|
+
id: page.id,
|
|
26
|
+
pageId: page.id,
|
|
27
|
+
title: page.properties?.title ?? page.id,
|
|
28
|
+
section: 'Docs', // or derive from menus
|
|
29
|
+
description: '', // extract from page content as needed
|
|
30
|
+
}));
|
|
31
|
+
|
|
32
|
+
const miniSearch = new MiniSearch({
|
|
33
|
+
fields: ['title', 'description'],
|
|
34
|
+
storeFields: ['title', 'pageId', 'section'],
|
|
35
|
+
});
|
|
36
|
+
miniSearch.addAll(documents);
|
|
37
|
+
|
|
38
|
+
// The index JSON format the Search block expects
|
|
39
|
+
const index = {
|
|
40
|
+
engine: 'minisearch',
|
|
41
|
+
version: 1,
|
|
42
|
+
options: {
|
|
43
|
+
fields: ['title', 'description'],
|
|
44
|
+
storeFields: ['title', 'pageId', 'section'],
|
|
45
|
+
idField: 'id',
|
|
46
|
+
},
|
|
47
|
+
searchDefaults: {
|
|
48
|
+
boost: { title: 2 },
|
|
49
|
+
fuzzy: 0.2,
|
|
50
|
+
prefix: true,
|
|
51
|
+
},
|
|
52
|
+
resultDefaults: {
|
|
53
|
+
title: 'title',
|
|
54
|
+
description: 'description',
|
|
55
|
+
pageId: 'pageId',
|
|
56
|
+
},
|
|
57
|
+
data: JSON.parse(JSON.stringify(miniSearch)),
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const dir = path.join(dirname(fileURLToPath(import.meta.url)), '../public');
|
|
61
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
62
|
+
fs.writeFileSync(path.join(dir, 'search-index.json'), JSON.stringify(index));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export default buildSearchIndex;
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Step 2 — Wire it into lowdefy.yaml:**
|
|
69
|
+
|
|
70
|
+
```yaml
|
|
71
|
+
# lowdefy.yaml
|
|
72
|
+
pages:
|
|
73
|
+
_ref:
|
|
74
|
+
path: pages.yaml
|
|
75
|
+
transformer: templates/buildSearchIndex.js
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
The transformer runs during every build. The output file (`public/search-index.json`) is served as a static asset and fetched by the Search block when the modal opens.
|
|
79
|
+
|
|
80
|
+
**Step 3 — Add the Search block:**
|
|
81
|
+
|
|
82
|
+
```yaml
|
|
83
|
+
- id: site_search
|
|
84
|
+
type: Search
|
|
85
|
+
properties:
|
|
86
|
+
indexUrl: /search-index.json
|
|
87
|
+
events:
|
|
88
|
+
onSelect:
|
|
89
|
+
- id: navigate
|
|
90
|
+
type: Link
|
|
91
|
+
params:
|
|
92
|
+
pageId:
|
|
93
|
+
_event: pageId
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Option 2: Runtime documents (no build step)
|
|
97
|
+
|
|
98
|
+
For small datasets or dynamic content (e.g., from a request), pass documents directly. The block indexes them client-side:
|
|
99
|
+
|
|
100
|
+
```yaml
|
|
101
|
+
- id: feature_search
|
|
102
|
+
type: Search
|
|
103
|
+
properties:
|
|
104
|
+
documents:
|
|
105
|
+
- id: users
|
|
106
|
+
title: User Management
|
|
107
|
+
body: Create, edit, and deactivate user accounts.
|
|
108
|
+
category: Admin
|
|
109
|
+
- id: billing
|
|
110
|
+
title: Billing
|
|
111
|
+
body: View invoices and update payment methods.
|
|
112
|
+
category: Finance
|
|
113
|
+
fields: [title, body]
|
|
114
|
+
storeFields: [title, category, id]
|
|
115
|
+
searchOptions:
|
|
116
|
+
boost:
|
|
117
|
+
title: 2
|
|
118
|
+
fuzzy: 0.2
|
|
119
|
+
result:
|
|
120
|
+
title: title
|
|
121
|
+
description: body
|
|
122
|
+
category: category
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
You can also load documents from a request and pass them via state:
|
|
126
|
+
|
|
127
|
+
```yaml
|
|
128
|
+
properties:
|
|
129
|
+
documents:
|
|
130
|
+
_state: searchDocuments
|
|
131
|
+
fields: [title, body]
|
|
132
|
+
storeFields: [title, id]
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Index JSON format
|
|
136
|
+
|
|
137
|
+
The `indexUrl` JSON file has this structure:
|
|
138
|
+
|
|
139
|
+
| Key | Type | Description |
|
|
140
|
+
| ---------------- | -------- | -------------------------------------------------------------------------------------------- |
|
|
141
|
+
| `engine` | `string` | Always `"minisearch"` |
|
|
142
|
+
| `version` | `number` | Schema version (currently `1`) |
|
|
143
|
+
| `options` | `object` | MiniSearch constructor options (`fields`, `storeFields`, `idField`) |
|
|
144
|
+
| `searchDefaults` | `object` | Default search options (`boost`, `fuzzy`, `prefix`, `combineWith`) |
|
|
145
|
+
| `resultDefaults` | `object` | Maps index fields to result UI (`title`, `description`, `category`, `pageId`, `url`, `icon`) |
|
|
146
|
+
| `groups` | `array` | Result grouping definitions (`label`, `match`, `icon`) |
|
|
147
|
+
| `data` | `object` | Serialized MiniSearch index (from `JSON.parse(JSON.stringify(miniSearch))`) |
|
|
148
|
+
|
|
149
|
+
See the [MiniSearch API docs](https://lucaong.github.io/minisearch/classes/MiniSearch.MiniSearch.html) for all available field and search options.
|
|
150
|
+
|
|
151
|
+
```yaml
|
|
152
|
+
- id: example_search_prebuilt
|
|
153
|
+
type: Search
|
|
154
|
+
properties:
|
|
155
|
+
indexUrl: /search-index.json
|
|
156
|
+
placeholder: Search pages...
|
|
157
|
+
result:
|
|
158
|
+
title: title
|
|
159
|
+
description: snippet
|
|
160
|
+
category: section
|
|
161
|
+
pageId: pageId
|
|
162
|
+
groups:
|
|
163
|
+
- label: Concepts
|
|
164
|
+
match:
|
|
165
|
+
section: Concepts
|
|
166
|
+
icon: AiOutlineBulb
|
|
167
|
+
- label: Blocks
|
|
168
|
+
match:
|
|
169
|
+
section: Blocks
|
|
170
|
+
icon: AiOutlineLayout
|
|
171
|
+
events:
|
|
172
|
+
onSelect:
|
|
173
|
+
- id: navigate
|
|
174
|
+
type: Link
|
|
175
|
+
params:
|
|
176
|
+
pageId:
|
|
177
|
+
_event: pageId
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
```yaml
|
|
181
|
+
- id: example_search_runtime
|
|
182
|
+
type: Search
|
|
183
|
+
properties:
|
|
184
|
+
documents:
|
|
185
|
+
- id: users
|
|
186
|
+
title: User Management
|
|
187
|
+
body: Create, edit, and deactivate user accounts. Assign roles and permissions.
|
|
188
|
+
category: Admin
|
|
189
|
+
- id: billing
|
|
190
|
+
title: Billing & Invoices
|
|
191
|
+
body: View invoices, update payment methods, and download receipts.
|
|
192
|
+
category: Finance
|
|
193
|
+
- id: reports
|
|
194
|
+
title: Analytics Reports
|
|
195
|
+
body: Dashboard with charts for revenue, signups, and engagement metrics.
|
|
196
|
+
category: Analytics
|
|
197
|
+
- id: settings
|
|
198
|
+
title: App Settings
|
|
199
|
+
body: Configure notifications, theme, language, and integration API keys.
|
|
200
|
+
category: Admin
|
|
201
|
+
- id: api-keys
|
|
202
|
+
title: API Keys
|
|
203
|
+
body: Generate and revoke API keys for third-party integrations.
|
|
204
|
+
category: Admin
|
|
205
|
+
fields:
|
|
206
|
+
- title
|
|
207
|
+
- body
|
|
208
|
+
storeFields:
|
|
209
|
+
- title
|
|
210
|
+
- category
|
|
211
|
+
- id
|
|
212
|
+
searchOptions:
|
|
213
|
+
boost:
|
|
214
|
+
title: 2
|
|
215
|
+
fuzzy: 0.2
|
|
216
|
+
result:
|
|
217
|
+
title: title
|
|
218
|
+
description: body
|
|
219
|
+
category: category
|
|
220
|
+
groups:
|
|
221
|
+
- label: Admin
|
|
222
|
+
match:
|
|
223
|
+
category: Admin
|
|
224
|
+
icon: AiOutlineSetting
|
|
225
|
+
- label: Finance
|
|
226
|
+
match:
|
|
227
|
+
category: Finance
|
|
228
|
+
icon: AiOutlineDollar
|
|
229
|
+
- label: Analytics
|
|
230
|
+
match:
|
|
231
|
+
category: Analytics
|
|
232
|
+
icon: AiOutlineBarChart
|
|
233
|
+
placeholder: Search features...
|
|
234
|
+
label: Find
|
|
235
|
+
shortcut: mod+k
|
|
236
|
+
events:
|
|
237
|
+
onSelect:
|
|
238
|
+
- id: show_result
|
|
239
|
+
type: DisplayMessage
|
|
240
|
+
params:
|
|
241
|
+
content:
|
|
242
|
+
_string.concat:
|
|
243
|
+
- "Selected: "
|
|
244
|
+
- _event: title
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
```yaml
|
|
248
|
+
- id: example_search_custom_shortcut
|
|
249
|
+
type: Search
|
|
250
|
+
properties:
|
|
251
|
+
indexUrl: /search-index.json
|
|
252
|
+
shortcut: mod+j
|
|
253
|
+
label: Quick Find
|
|
254
|
+
placeholder: Quick find...
|
|
255
|
+
events:
|
|
256
|
+
onSelect:
|
|
257
|
+
- id: navigate
|
|
258
|
+
type: Link
|
|
259
|
+
params:
|
|
260
|
+
pageId:
|
|
261
|
+
_event: pageId
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
```yaml
|
|
265
|
+
- id: example_search_analytics
|
|
266
|
+
type: Search
|
|
267
|
+
properties:
|
|
268
|
+
indexUrl: /search-index.json
|
|
269
|
+
events:
|
|
270
|
+
onSearch:
|
|
271
|
+
- id: track_search
|
|
272
|
+
type: DisplayMessage
|
|
273
|
+
params:
|
|
274
|
+
content:
|
|
275
|
+
_string.concat:
|
|
276
|
+
- 'Search: "'
|
|
277
|
+
- _event: value
|
|
278
|
+
- '" ('
|
|
279
|
+
- _event: resultCount
|
|
280
|
+
- " results)"
|
|
281
|
+
onSelect:
|
|
282
|
+
- id: track_click
|
|
283
|
+
type: DisplayMessage
|
|
284
|
+
params:
|
|
285
|
+
content:
|
|
286
|
+
_string.concat:
|
|
287
|
+
- Clicked "
|
|
288
|
+
- _event: title
|
|
289
|
+
- '" for query "'
|
|
290
|
+
- _event: query
|
|
291
|
+
- '"'
|
|
292
|
+
- id: navigate
|
|
293
|
+
type: Link
|
|
294
|
+
params:
|
|
295
|
+
pageId:
|
|
296
|
+
_event: pageId
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
| Property | Type | Default | Description |
|
|
300
|
+
| --- | --- | --- | --- |
|
|
301
|
+
| `indexUrl` | string \| array | - | URL or array of URLs to pre-built search index JSON files. |
|
|
302
|
+
| `documents` | array | - | Array of document objects for client-side indexing. |
|
|
303
|
+
| `fields` | array | - | Fields to index. Required when using documents, optional for indexUrl. |
|
|
304
|
+
| `storeFields` | array | - | Fields to store in the index and return in results. |
|
|
305
|
+
| `searchOptions` | object | - | MiniSearch search options. |
|
|
306
|
+
| `searchOptions.boost` | object | - | Field boost factors for relevance scoring. |
|
|
307
|
+
| `searchOptions.fuzzy` | number | - | Fuzzy matching tolerance as a fraction of term length (0 to 1). |
|
|
308
|
+
| `searchOptions.prefix` | boolean | `true` | Enable prefix matching. |
|
|
309
|
+
| `searchOptions.combineWith` | string | `"OR"` | How to combine search terms. Enum: `OR`, `AND`. |
|
|
310
|
+
| `label` | string | `"Search"` | Trigger button text. |
|
|
311
|
+
| `icon` | string \| object | - | Trigger button icon name or Icon block properties. |
|
|
312
|
+
| `showShortcut` | boolean | `true` | Show keyboard shortcut badge on the trigger button. |
|
|
313
|
+
| `placeholder` | string | `"Search..."` | Search input placeholder text. |
|
|
314
|
+
| `shortcut` | string | `"mod+k"` | Keyboard shortcut to open the modal. Renders a shortcut badge on the trigger button (see showShortcut). Use "mod" for Cmd on Mac, Ctrl elsewhere. |
|
|
315
|
+
| `width` | number | `640` | Modal width in pixels. |
|
|
316
|
+
| `maxResults` | number | `20` | Maximum number of results displayed. |
|
|
317
|
+
| `result` | object | - | Maps index fields to result UI slots. |
|
|
318
|
+
| `result.title` | string | `"title"` | Field name for result title. |
|
|
319
|
+
| `result.description` | string | - | Field name for result description/snippet. |
|
|
320
|
+
| `result.category` | string | - | Field name for result grouping category. |
|
|
321
|
+
| `result.icon` | string | - | Field name for result icon name. |
|
|
322
|
+
| `result.pageId` | string | - | Field name for Lowdefy page navigation. |
|
|
323
|
+
| `result.url` | string | - | Field name for external URL navigation. |
|
|
324
|
+
| `groups` | array | - | Result grouping definitions. |
|
|
325
|
+
| `groups.$.label` | string | - | Group display label. |
|
|
326
|
+
| `groups.$.match` | object | - | Field/value pairs to match results to this group. |
|
|
327
|
+
| `groups.$.icon` | string | - | Icon for the group header. |
|
|
328
|
+
| `noResultsMessage` | string | `"No results found."` | Message shown when no results match. |
|
|
329
|
+
| `highlightMatches` | boolean | `true` | Highlight matched terms in results. |
|
|
330
|
+
| `recentSearches` | boolean | `true` | Show recent searches when input is empty. |
|
|
331
|
+
| `recentSearchesKey` | string | `"search"` | localStorage key prefix for recent searches. |
|
|
332
|
+
| `recentSearchesCount` | number | `5` | Maximum number of recent searches stored. |
|
|
333
|
+
| `theme` | object | - | Antd design token overrides for this block. See [antd design tokens](https://ant.design/components/overview#design-token). |
|
|
334
|
+
|
|
335
|
+
| Event | Event Data | Description |
|
|
336
|
+
| --- | --- | --- |
|
|
337
|
+
| `onSelect` | `{ query, resultCount }` | Trigger actions when a search result is selected. Result item stored fields are spread into the event object. |
|
|
338
|
+
| `onSearch` | `{ value, resultCount }` | Trigger actions when the search query changes. |
|
|
339
|
+
| `onOpen` | \- | Trigger actions when the search modal opens. |
|
|
340
|
+
| `onClose` | \- | Trigger actions when the search modal closes. |
|
|
341
|
+
|
|
342
|
+
| Key | Target |
|
|
343
|
+
| --- | --- |
|
|
344
|
+
| `/block` | Outer block wrapper (always available). |
|
|
345
|
+
| `/element` | The search trigger button and modal root. |
|
|
346
|
+
| `/trigger` | The trigger button. |
|
|
347
|
+
| `/triggerBadge` | The keyboard shortcut badge on the trigger. |
|
|
348
|
+
| `/modal` | The antd Modal container. |
|
|
349
|
+
| `/input` | The search input field. |
|
|
350
|
+
| `/results` | The scrollable results list. |
|
|
351
|
+
| `/group` | A result group container. |
|
|
352
|
+
| `/groupHeading` | A group heading label. |
|
|
353
|
+
| `/item` | A result item row. |
|
|
354
|
+
| `/itemIcon` | The icon in a result item. |
|
|
355
|
+
| `/itemTitle` | The title in a result item. |
|
|
356
|
+
| `/itemDescription` | The description/snippet in a result item. |
|
|
357
|
+
| `/highlight` | Highlighted match text (<mark> elements). |
|
|
358
|
+
| `/empty` | The empty state message. |
|
|
359
|
+
|
|
360
|
+
No slots defined.
|