@lowdefy/docs-content 6.1.0 → 7.1.0
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/README.md +1 -0
- package/content/actions/downloadcsv.md +1 -1
- package/content/actions/emailotpsend.md +58 -0
- package/content/actions/emailotpverify.md +79 -0
- package/content/actions/getlocalstorage.md +43 -0
- package/content/actions/link.md +47 -1
- package/content/actions/login.md +25 -5
- package/content/actions/logout.md +7 -5
- package/content/actions/magiclinkverify.md +117 -0
- package/content/actions/pdfmake.md +2 -2
- package/content/actions/posthogalias.md +29 -0
- package/content/actions/posthogcapture.md +49 -0
- package/content/actions/posthogcapturepageleave.md +38 -0
- package/content/actions/posthogfeatureflag.md +50 -0
- package/content/actions/posthoggroup.md +37 -0
- package/content/actions/posthogidentify.md +54 -0
- package/content/actions/posthoginit.md +96 -0
- package/content/actions/posthogoptin.md +29 -0
- package/content/actions/posthogoptout.md +29 -0
- package/content/actions/posthogpageview.md +37 -0
- package/content/actions/posthogreloadfeatureflags.md +47 -0
- package/content/actions/posthogreset.md +28 -0
- package/content/actions/posthogsetpersonproperties.md +36 -0
- package/content/actions/removelocalstorage.md +28 -0
- package/content/actions/resetvalidation.md +7 -3
- package/content/actions/setdarkmode.md +3 -3
- package/content/actions/setglobal.md +2 -0
- package/content/actions/setlocale.md +1 -1
- package/content/actions/setlocalstorage.md +34 -0
- package/content/actions/validate.md +7 -4
- package/content/adapter-reference/mongodbauthadapter.md +46 -0
- package/content/agents/agent-endpoint-tools.md +24 -0
- package/content/agents/agent-properties.md +13 -3
- package/content/agents/agent-server-hooks.md +1 -1
- package/content/agents/agentchat.md +43 -7
- package/content/agents/agentconversations.md +42 -8
- package/content/agents/agents-introduction.md +107 -0
- package/content/callback-reference/auth0logoutcallback.md +54 -0
- package/content/concepts/ai-agent-docs.md +455 -106
- package/content/concepts/blocks.md +150 -0
- package/content/concepts/connections-and-requests.md +402 -0
- package/content/concepts/custom-html.md +42 -0
- package/content/concepts/custom-styling.md +50 -5
- package/content/concepts/dynamic-page-content.md +309 -0
- package/content/concepts/events-and-actions.md +154 -2
- package/content/concepts/four-primitives.md +31 -0
- package/content/concepts/html-attributes.md +293 -0
- package/content/concepts/i18n.md +8 -3
- package/content/concepts/keyboard-shortcuts.md +2 -2
- package/content/concepts/layout-overview.md +1 -1
- package/content/concepts/logger.md +99 -0
- package/content/concepts/lowdefy-api.md +1319 -0
- package/content/concepts/lowdefy-schema.md +136 -3
- package/content/concepts/menus.md +8 -7
- package/content/concepts/module-authoring.md +76 -5
- package/content/concepts/modules.md +3 -1
- package/content/concepts/notifications.md +180 -0
- package/content/concepts/operators.md +7 -0
- package/content/concepts/page-and-app-state.md +252 -0
- package/content/concepts/page-paths.md +209 -0
- package/content/concepts/theming.md +582 -0
- package/content/connections/aigateway.md +375 -0
- package/content/connections/anthropic.md +169 -2
- package/content/connections/awss3.md +178 -2
- package/content/connections/axioshttp.md +181 -0
- package/content/connections/google.md +169 -2
- package/content/connections/mongodb.md +1014 -3
- package/content/connections/openai-connection.md +169 -2
- package/content/connections/sendgridmail.md +2 -0
- package/content/connections/smtp.md +3 -1
- package/content/connections/treg.md +329 -0
- package/content/container-blocks/affix.md +47 -7
- package/content/container-blocks/alert.md +76 -24
- package/content/container-blocks/badge.md +100 -24
- package/content/container-blocks/box.md +9 -9
- package/content/container-blocks/card.md +132 -27
- package/content/container-blocks/carousel.md +60 -7
- package/content/container-blocks/collapse.md +153 -9
- package/content/container-blocks/configprovider.md +35 -13
- package/content/container-blocks/confirmmodal.md +69 -23
- package/content/container-blocks/content.md +62 -98
- package/content/container-blocks/descriptions.md +45 -4
- package/content/container-blocks/drawer.md +139 -28
- package/content/container-blocks/dropdownmenu.md +119 -31
- package/content/container-blocks/flex.md +40 -62
- package/content/container-blocks/footer.md +15 -11
- package/content/container-blocks/googlemapsheatmap.md +1 -1
- package/content/container-blocks/googlemapsscript.md +2 -2
- package/content/container-blocks/header.md +71 -36
- package/content/container-blocks/label.md +34 -7
- package/content/container-blocks/layout.md +52 -34
- package/content/container-blocks/masonry.md +17 -71
- package/content/container-blocks/mobilemenu.md +131 -88
- package/content/container-blocks/modal.md +161 -26
- package/content/container-blocks/pageheadermenu.md +138 -31
- package/content/container-blocks/pagesidebarlayout.md +230 -27
- package/content/container-blocks/pagesidermenu.md +153 -43
- package/content/container-blocks/popover.md +34 -31
- package/content/container-blocks/result.md +32 -21
- package/content/container-blocks/sider.md +85 -122
- package/content/container-blocks/span.md +7 -7
- package/content/container-blocks/spinner.md +3 -3
- package/content/container-blocks/splitter.md +150 -68
- package/content/container-blocks/tabs.md +64 -12
- package/content/container-blocks/tooltip.md +22 -46
- package/content/container-blocks/watermark.md +22 -4
- package/content/controls/parallel_for.md +21 -2
- package/content/controls/reject.md +24 -3
- package/content/controls/return.md +17 -1
- package/content/controls/throw.md +1 -0
- package/content/controls/try.md +4 -2
- package/content/controls/while.md +46 -0
- package/content/deployment/deployment-environments.md +10 -7
- package/content/deployment/docker.md +22 -7
- package/content/deployment/node-server.md +4 -0
- package/content/deployment/vercel.md +17 -6
- package/content/display-blocks/aggrid.md +36 -19
- package/content/display-blocks/anchor.md +16 -15
- package/content/display-blocks/avatar.md +57 -37
- package/content/display-blocks/breadcrumb.md +70 -21
- package/content/display-blocks/button.md +93 -19
- package/content/display-blocks/calendar.md +12 -0
- package/content/display-blocks/clickablehtml.md +239 -0
- package/content/display-blocks/dangeroushtml.md +1 -1
- package/content/display-blocks/difflist.md +1 -1
- package/content/display-blocks/difftimeline.md +1 -1
- package/content/display-blocks/divider.md +64 -3
- package/content/display-blocks/dropdownbutton.md +81 -30
- package/content/display-blocks/echart.md +35 -1
- package/content/display-blocks/eventlog.md +363 -0
- package/content/display-blocks/floatbutton.md +129 -42
- package/content/display-blocks/html.md +61 -1
- package/content/display-blocks/icon.md +250 -67
- package/content/display-blocks/img.md +2 -2
- package/content/display-blocks/menu.md +146 -73
- package/content/display-blocks/message.md +38 -124
- package/content/display-blocks/notification.md +94 -222
- package/content/display-blocks/paragraph.md +59 -9
- package/content/display-blocks/pollingtimer.md +263 -0
- package/content/display-blocks/progress.md +96 -17
- package/content/display-blocks/qrcode.md +19 -4
- package/content/display-blocks/s3download.md +1 -1
- package/content/display-blocks/search.md +19 -9
- package/content/display-blocks/skeletonbutton.md +1 -0
- package/content/display-blocks/skeletoninput.md +1 -0
- package/content/display-blocks/statistic.md +75 -17
- package/content/display-blocks/steps.md +58 -25
- package/content/display-blocks/table.md +2527 -0
- package/content/display-blocks/tablelight.md +621 -0
- package/content/display-blocks/tag.md +102 -17
- package/content/display-blocks/title.md +50 -11
- package/content/display-blocks/tour.md +33 -23
- package/content/input-blocks/autocomplete.md +81 -9
- package/content/input-blocks/buttonselector.md +45 -8
- package/content/input-blocks/captcha.md +40 -0
- package/content/input-blocks/checkboxselector.md +97 -7
- package/content/input-blocks/checkboxswitch.md +33 -3
- package/content/input-blocks/colorselector.md +63 -14
- package/content/input-blocks/daterangeselector.md +165 -45
- package/content/input-blocks/dateselector.md +139 -41
- package/content/input-blocks/datetimeselector.md +158 -49
- package/content/input-blocks/inputgallery.md +3 -3
- package/content/input-blocks/intentinput.md +207 -0
- package/content/input-blocks/monthselector.md +120 -52
- package/content/input-blocks/multipleselector.md +150 -39
- package/content/input-blocks/numberinput.md +98 -12
- package/content/input-blocks/pagination.md +70 -14
- package/content/input-blocks/paragraphinput.md +51 -37
- package/content/input-blocks/passwordinput.md +60 -6
- package/content/input-blocks/phonenumberinput.md +59 -26
- package/content/input-blocks/placesautocomplete.md +319 -0
- package/content/input-blocks/radioselector.md +83 -7
- package/content/input-blocks/ratingslider.md +57 -26
- package/content/input-blocks/s3uploadbutton.md +24 -24
- package/content/input-blocks/s3uploaddragger.md +3 -3
- package/content/input-blocks/s3uploadphoto.md +5 -5
- package/content/input-blocks/segmentedselector.md +72 -32
- package/content/input-blocks/selector.md +109 -21
- package/content/input-blocks/switch.md +65 -17
- package/content/input-blocks/tableinput.md +445 -0
- package/content/input-blocks/tagmultipleselector.md +114 -0
- package/content/input-blocks/tagselector.md +114 -0
- package/content/input-blocks/textarea.md +32 -3
- package/content/input-blocks/textinput.md +70 -29
- package/content/input-blocks/tiptapinput.md +1 -1
- package/content/input-blocks/tiptapmentioninput.md +2 -2
- package/content/input-blocks/titleinput.md +39 -12
- package/content/input-blocks/treeinput.md +49 -25
- package/content/input-blocks/treemultipleselector.md +127 -10
- package/content/input-blocks/treeselector.md +97 -9
- package/content/input-blocks/upload.md +64 -15
- package/content/input-blocks/uploaddragger.md +17 -1
- package/content/input-blocks/uploadphoto.md +18 -1
- package/content/input-blocks/weekselector.md +120 -55
- package/content/learn/introduction.md +27 -0
- package/content/learn/quickstart.md +53 -0
- package/content/list-blocks/controlledlist.md +24 -15
- package/content/list-blocks/list.md +11 -11
- package/content/list-blocks/masonrylist.md +7 -34
- package/content/migration/auth-upgrade.md +337 -0
- package/content/migration/upgrade-guide.md +1 -0
- package/content/migration/v3-to-v4.md +417 -0
- package/content/migration/v6-to-v7.md +620 -0
- package/content/operators/_agent.md +155 -0
- package/content/operators/_app.md +2 -1
- package/content/operators/_array.md +122 -1
- package/content/operators/_build.md +1 -0
- package/content/operators/_credential.md +57 -0
- package/content/operators/_cron.md +292 -0
- package/content/operators/_date.md +2 -0
- package/content/operators/_error.md +24 -1
- package/content/operators/_get.md +6 -6
- package/content/operators/_hmac.md +78 -0
- package/content/operators/_js.md +2 -1
- package/content/operators/_location.md +1 -1
- package/content/operators/_media.md +13 -0
- package/content/operators/_module.md +56 -2
- package/content/operators/_operator.md +17 -3
- package/content/operators/_path_params.md +82 -0
- package/content/operators/_ref.md +258 -0
- package/content/operators/_request.md +1 -1
- package/content/operators/_request_details.md +6 -0
- package/content/operators/_type.md +14 -3
- package/content/operators/_url_query.md +2 -0
- package/content/operators/_user.md +3 -3
- package/content/plugins/plugins-actions.md +10 -0
- package/content/plugins/plugins-connections.md +25 -0
- package/content/plugins/plugins-dev.md +66 -0
- package/content/plugins/plugins-icon-sets.md +267 -0
- package/content/plugins/plugins-introduction.md +27 -1
- package/content/plugins/plugins.md +19 -0
- package/content/plugins/posthog.md +359 -0
- package/content/provider-reference/auth-js-providers.md +107 -0
- package/content/provider-reference/openidconnectprovider.md +44 -0
- package/content/recipes/recipes.md +16 -0
- package/content/reference/actions-reference.md +31 -0
- package/content/reference/blocks-reference.md +35 -0
- package/content/reference/cli.md +403 -0
- package/content/reference/connections-reference.md +23 -0
- package/content/reference/operators-reference.md +47 -0
- package/content/reference/reference.md +16 -0
- package/content/reference/schema-reference.md +12 -0
- package/content/testing/config-tests.md +677 -0
- package/content/testing/e2e-configuration.md +31 -1
- package/content/testing/e2e-getting-started.md +1 -1
- package/content/testing/e2e-introduction.md +1 -1
- package/content/testing/e2e-writing-tests.md +12 -1
- package/content/testing/explore-pull-request.md +136 -0
- package/content/testing/journey-data-sets.md +326 -0
- package/content/tutorial/tutorial-actions-operators.md +2 -2
- package/content/tutorial/tutorial-add-blocks.md +2 -2
- package/content/tutorial/tutorial-create-page.md +48 -2
- package/content/tutorial/tutorial-display-data-page.md +3 -3
- package/content/tutorial/tutorial-requests-api.md +155 -0
- package/content/tutorial/tutorial-requests-sql.md +153 -0
- package/content/tutorial/tutorial-start.md +66 -1
- package/content/user-authentication/auth-configuration.md +267 -0
- package/content/user-authentication/auth-providers.md +24 -0
- package/content/user-authentication/auth-steps.md +141 -0
- package/content/user-authentication/login-and-logout.md +160 -8
- package/content/user-authentication/mcp-oauth.md +424 -0
- package/content/user-authentication/organizations.md +246 -0
- package/content/user-authentication/protected-pages-apis.md +97 -0
- package/content/user-authentication/roles.md +49 -0
- package/content/user-authentication/two-factor.md +229 -0
- package/content/user-authentication/user-object.md +58 -0
- package/content/user-authentication/users-introduction.md +8 -0
- package/content/websockets/websocket-publish.md +105 -0
- package/content/websockets/websocket-subscriptions.md +136 -0
- package/content/websockets/websockets-introduction.md +101 -0
- package/hazards.json +44 -0
- package/index.json +3691 -14
- package/package.json +11 -1
- package/scripts/collectImportedFiles.js +80 -0
- package/scripts/extractAgentDocs.js +41 -30
- package/scripts/hashDocSources.js +38 -0
- package/scripts/isRedirectPage.js +26 -0
- package/scripts/recordSourceHashes.js +100 -0
- package/scripts/resolvePageSections.js +42 -0
- package/scripts/sectionKind.js +27 -0
- package/content/concepts/cli.md +0 -223
- package/content/other/introduction.md +0 -39
- package/content/other/next-auth-providers.md +0 -3
- /package/content/{other → actions}/updatesession.md +0 -0
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
This guide explains how the Lowdefy upgrade system works — independent of any specific version.
|
|
4
4
|
|
|
5
5
|
For version-specific migration details, see:
|
|
6
|
+
- [Version 6 to Version 7](/v6-to-v7)
|
|
6
7
|
- [Version 5 to Version 6](/v5-to-v6)
|
|
7
8
|
- [Version 4 to Version 5](/v4-to-v5)
|
|
8
9
|
- [Version 3 to Version 4](/v3-to-v4)
|
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
# Version 3 to Version 4
|
|
2
|
+
|
|
3
|
+
## Payload on Requests
|
|
4
|
+
|
|
5
|
+
In version 3, the `state`, `global`, `input`, `urlQuery` and `event` data objects were sent with the request. This allowed the use of the [`_state`](/_state), [`_global`](/_global), [`_input`](/_input), [`_url_query`](/_url_query) and [`_event`](/_event) operators inside requests and connections. If the state became too large, this would result in a payload size exceeded error on request calls.
|
|
6
|
+
|
|
7
|
+
In version 4, these operators can no longer be used in requests, and request payloads are introduced. Payloads can be used to specify the data that should be sent with the request. The data specified in the payload can be accessed using the `_payload` operator. Operators are evaluated in the payload before it is sent, so operators such as [`_state`](/_state) and [`_global`](_global) can be used in the payload.
|
|
8
|
+
|
|
9
|
+
If only the [`_state`](/_state) operator was used, the entire state object can be set as the payload:
|
|
10
|
+
|
|
11
|
+
###### Version 3:
|
|
12
|
+
|
|
13
|
+
```yaml
|
|
14
|
+
id: api_call
|
|
15
|
+
type: AxiosHttp
|
|
16
|
+
connectionId: my_api
|
|
17
|
+
properties:
|
|
18
|
+
url: /products/new
|
|
19
|
+
method: post
|
|
20
|
+
data:
|
|
21
|
+
name:
|
|
22
|
+
_state: name
|
|
23
|
+
product_category:
|
|
24
|
+
_state: name
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
###### Version 4:
|
|
28
|
+
|
|
29
|
+
```yaml
|
|
30
|
+
id: api_call
|
|
31
|
+
type: AxiosHttp
|
|
32
|
+
connectionId: my_api
|
|
33
|
+
payload:
|
|
34
|
+
_state: true
|
|
35
|
+
properties:
|
|
36
|
+
url: /products/new
|
|
37
|
+
method: post
|
|
38
|
+
data:
|
|
39
|
+
name:
|
|
40
|
+
_payload: name
|
|
41
|
+
product_category:
|
|
42
|
+
_payload: product_category
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The payload can also be created more explicitly using more than one operator type:
|
|
46
|
+
|
|
47
|
+
###### Version 3:
|
|
48
|
+
|
|
49
|
+
```yaml
|
|
50
|
+
id: api_call
|
|
51
|
+
type: AxiosHttp
|
|
52
|
+
connectionId: my_api
|
|
53
|
+
properties:
|
|
54
|
+
url: /products/update
|
|
55
|
+
method: post
|
|
56
|
+
data:
|
|
57
|
+
id:
|
|
58
|
+
_url_query: id
|
|
59
|
+
name:
|
|
60
|
+
_state: name
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
###### Version 4:
|
|
64
|
+
|
|
65
|
+
```yaml
|
|
66
|
+
id: api_call
|
|
67
|
+
type: AxiosHttp
|
|
68
|
+
connectionId: my_api
|
|
69
|
+
payload:
|
|
70
|
+
id:
|
|
71
|
+
_url_query: id
|
|
72
|
+
name:
|
|
73
|
+
_state: name
|
|
74
|
+
properties:
|
|
75
|
+
url: /products/new
|
|
76
|
+
method: post
|
|
77
|
+
data:
|
|
78
|
+
id:
|
|
79
|
+
_payload: id
|
|
80
|
+
name:
|
|
81
|
+
_payload: name
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
The `user` data object is still available in requests, and the [`_user`](/_user) operator should be used in the request properties not in they payload as malicious users can modify the data sent in payload.
|
|
85
|
+
|
|
86
|
+
###### Don't do:
|
|
87
|
+
|
|
88
|
+
```yaml
|
|
89
|
+
id: api_call
|
|
90
|
+
type: AxiosHttp
|
|
91
|
+
connectionId: my_api
|
|
92
|
+
payload:
|
|
93
|
+
# ...
|
|
94
|
+
created_by:
|
|
95
|
+
_user: id
|
|
96
|
+
properties:
|
|
97
|
+
url: /products/new
|
|
98
|
+
method: post
|
|
99
|
+
data:
|
|
100
|
+
# ...
|
|
101
|
+
created_by:
|
|
102
|
+
_payload: created_by
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
###### Do:
|
|
106
|
+
|
|
107
|
+
```yaml
|
|
108
|
+
id: api_call
|
|
109
|
+
type: AxiosHttp
|
|
110
|
+
connectionId: my_api
|
|
111
|
+
payload:
|
|
112
|
+
# ...
|
|
113
|
+
properties:
|
|
114
|
+
url: /products/new
|
|
115
|
+
method: post
|
|
116
|
+
data:
|
|
117
|
+
# ...
|
|
118
|
+
created_by:
|
|
119
|
+
_user: id
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
> If you see a warning message like `Operator type "_state" was used but is not defined.`, you are using the `_state` operator in a request's properties and should move it to payload.
|
|
123
|
+
|
|
124
|
+
## Icons
|
|
125
|
+
|
|
126
|
+
The Ant Design icons used in version 3 have been replaced by [React Icons](https://react-icons.github.io/react-icons/), which has a much larger library of icons to choose from, including the Ant Design icons. To use a React Icon, set the `icon` or `icon.name` property to the React Icon name.
|
|
127
|
+
|
|
128
|
+
To convert existing Ant Design icons to React Icons, the icon names should be changed to the new format:
|
|
129
|
+
|
|
130
|
+
###### Version 3:
|
|
131
|
+
|
|
132
|
+
```yaml
|
|
133
|
+
id: save_button
|
|
134
|
+
type: Button
|
|
135
|
+
properties:
|
|
136
|
+
icon: SaveOutlined
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
###### Version 4:
|
|
140
|
+
|
|
141
|
+
```yaml
|
|
142
|
+
# Using the same Ant Design icon
|
|
143
|
+
id: save_button
|
|
144
|
+
type: Button
|
|
145
|
+
properties:
|
|
146
|
+
icon: AiOutlineSave
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
```yaml
|
|
150
|
+
# Using the Font Awesome icon
|
|
151
|
+
id: save_button
|
|
152
|
+
type: Button
|
|
153
|
+
properties:
|
|
154
|
+
icon: FaRegSave
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## Renames and Minor changes
|
|
158
|
+
|
|
159
|
+
The `Message` action has been renamed to [`DisplayMessage`](/DisplayMessage). Change the type name of `Message` actions to [`DisplayMessage`](/DisplayMessage).
|
|
160
|
+
|
|
161
|
+
The `onEnter` and `onEnterAsync` events have been removed as their functionality is duplicated by the `onMount` and `onMountAsync` events. Rename all `onEnter` and `onEnterAsync` events to `onMount` and `onMountAsync` respectively.
|
|
162
|
+
|
|
163
|
+
Duplicate action ids in the same action chain were allowed in version 3, but are not allowed in version 4. If you get a build error about duplicate action ids, give the actions unique ids.
|
|
164
|
+
|
|
165
|
+
The `Notification` action has been removed. Switch to the [`DisplayMessage`](/DisplayMessage) action, or use a [`Notification`](/Notification) block and the `CallMethod` action to open the notification.
|
|
166
|
+
|
|
167
|
+
The 404 page is now always a public page.
|
|
168
|
+
|
|
169
|
+
The [`Anchor`](/Anchor) block properties schema has changed. The `href` property has been removed and it now takes the same props as the [`Link`](/Link) action.
|
|
170
|
+
|
|
171
|
+
The [`_yaml.parse`](/_yaml) operator now takes an object with a `on` property or an array where the first argument is the string to parse, instead of just a string, to allow it to take additional options.
|
|
172
|
+
|
|
173
|
+
The `ChromeColorSelector`, `CircleColorSelector`, `CompactColorSelector`, `GithubColorSelector`, `SliderColorSelector`, `SwatchesColorSelector`, and `TwitterColorSelector` have been replaced by the [`ColorSelector`](/ColorSelector) block.
|
|
174
|
+
|
|
175
|
+
The `color` properties in blocks like [`MobileMenu`](/MobileMenu), [`PageHeaderMenu`](/PageHeaderMenu), [`PageSiderMenu`](/PageSiderMenu) have been removed. Use Ant Design theme less variables instead.
|
|
176
|
+
|
|
177
|
+
The [`_var`](/_var) operator `name` param has been renamed to `key` to be more consistent with other getter operators.
|
|
178
|
+
|
|
179
|
+
The `_format` operator has been replaced with the [`_intl`](/_intl) and [`_moment`](/_moment) operator, with some minor schema changes. Note: `_moment` was renamed to [`_dayjs`](/_dayjs) in v5.
|
|
180
|
+
|
|
181
|
+
The format of dates in the output of the [`_json.stringify`](/_json) and [`_yaml.stringify`](/_yaml) operators, as well as in URL query parameters has changed from `_date: {iso_date_string}` to `~d: {iso_date_string}`.
|
|
182
|
+
|
|
183
|
+
## Block Loading States
|
|
184
|
+
|
|
185
|
+
The page loading states in version 4 have been improved. In general apps should load a lot faster. Blocks will now be a lot less likely to show a loading state and rather render as normal, and render their children. Input blocks will be disabled while in a loading state. This contributes to users seeing useful content sooner, and to less layout shifts once the app finishes loading.
|
|
186
|
+
|
|
187
|
+
In version 3, blocks had a `loading` property to specify the loading skeleton that should be used while the block is in a loading state. This functionality has been replaced by the `skeleton` property. The `loading` property is now used to control the loading state of the block. The block will be in a loading state if an `onInit` or `onMount` event is busy, if a parent block is loading or if the `loading` property evaluates to true. See more about loading [here](/blocks).
|
|
188
|
+
|
|
189
|
+
The convert from version 3 to version 4, replace the `loading` property on blocks with the `skeleton` property.
|
|
190
|
+
|
|
191
|
+
###### Version 3:
|
|
192
|
+
|
|
193
|
+
```yaml
|
|
194
|
+
id: paragraph_one
|
|
195
|
+
type: Markdown
|
|
196
|
+
loading:
|
|
197
|
+
type: SkeletonParagraph
|
|
198
|
+
properties:
|
|
199
|
+
lines: 5
|
|
200
|
+
properties:
|
|
201
|
+
content:
|
|
202
|
+
_request: get_text.body_text
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
###### Version 4:
|
|
206
|
+
|
|
207
|
+
```yaml
|
|
208
|
+
id: paragraph_one
|
|
209
|
+
type: Markdown
|
|
210
|
+
skeleton:
|
|
211
|
+
type: SkeletonParagraph
|
|
212
|
+
properties:
|
|
213
|
+
lines: 5
|
|
214
|
+
properties:
|
|
215
|
+
content:
|
|
216
|
+
_request: get_text.body_text
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
```yaml
|
|
220
|
+
# Keep the block in loading while the request is loading
|
|
221
|
+
id: paragraph_one
|
|
222
|
+
type: Markdown
|
|
223
|
+
loading:
|
|
224
|
+
_eq:
|
|
225
|
+
- _request: get_text
|
|
226
|
+
- null
|
|
227
|
+
skeleton:
|
|
228
|
+
type: SkeletonParagraph
|
|
229
|
+
properties:
|
|
230
|
+
lines: 5
|
|
231
|
+
properties:
|
|
232
|
+
content:
|
|
233
|
+
_request: get_text.body_text
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
## Static files
|
|
237
|
+
|
|
238
|
+
Static files placed in the `public` folder of your project were always served from the public url path - for example `https://example.com/public/filename.jpeg`. These files are now served from the root path of your app. The example above will now be served from `https://example.com/filename.jpeg`. This allows you to serve files like `robots.txt` and `sitemap.xml` from the root path. Change all references in your config to the new paths.
|
|
239
|
+
|
|
240
|
+
If you still want to serve assets under the `/public` path, you can add an addition `public` folder inside the existing `public` folder:
|
|
241
|
+
|
|
242
|
+
```txt
|
|
243
|
+
.
|
|
244
|
+
├─ public
|
|
245
|
+
│ └─ public
|
|
246
|
+
│ └─ my-logo.jpeg
|
|
247
|
+
└─ lowdefy.yaml
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
## Authentication Changes
|
|
251
|
+
|
|
252
|
+
In version 4, authentication has been reworked to use [NextAuth.js](https://next-auth.js.org), which offers a lot more flexibility and additional features - read more [here](/users-introduction).
|
|
253
|
+
|
|
254
|
+
To migrate a version 3 OpenID Connect provider, at least the following needs to be done:
|
|
255
|
+
- The `config.auth` property has moved to the `auth` root level property.
|
|
256
|
+
- The `config.auth.openId` properties have been removed, replace them with configuration for your provider:
|
|
257
|
+
```yaml
|
|
258
|
+
auth:
|
|
259
|
+
providers:
|
|
260
|
+
- id: auth0
|
|
261
|
+
type: Auth0Provider
|
|
262
|
+
properties:
|
|
263
|
+
clientId:
|
|
264
|
+
_secret: AUTH0_CLIENT_ID
|
|
265
|
+
clientSecret:
|
|
266
|
+
_secret: AUTH0_CLIENT_SECRET
|
|
267
|
+
issuer:
|
|
268
|
+
_secret: AUTH0_ISSUER
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
- The `NEXTAUTH_SECRET` environment variable needs to be set to a secure secret value (replacing `LOWDEFY_SECRET_JWT_SECRET`).
|
|
272
|
+
- The callback URLs configured with the provider change from `{{ protocol }}{{ host }}/auth/openid-callback` to `{{ protocol }}{{ host }}/api/auth/callback/{{ providerId }}`.
|
|
273
|
+
- The `Login` and `Logout` action params have changed between V3 and V4.
|
|
274
|
+
|
|
275
|
+
## Custom Blocks, Actions and Operators
|
|
276
|
+
|
|
277
|
+
Custom blocks, the `JsAction` action and the `_js` operator have been replaced by the new Lowdefy plugin system which is an easier, more powerful and standardized way to extend actions, blocks, connections, operators and the authentication system with custom JavaScript. See the [plugin documentation](/plugins-introduction) for more information on how to use and develop plugins.
|
|
278
|
+
|
|
279
|
+
The [AgGrid](https://github.com/lowdefy/blocks-aggrid) custom blocks have been added as default Lowdefy blocks, so these blocks can now be used without any additional configuration.
|
|
280
|
+
|
|
281
|
+
## Context has been removed
|
|
282
|
+
|
|
283
|
+
In version 3, the first block on a page needed to be a `context` category block. This was because in version 3 you could have multiple context blocks on the same page, each with it's own separate state.
|
|
284
|
+
|
|
285
|
+
This feature was found to be unnecessary, created additional complexity and was difficult to understand, so it was removed.
|
|
286
|
+
|
|
287
|
+
The `Context` type block was removed, as it was a `Box` block that also created a context. The `Context` block can be replaced by a `Box`.
|
|
288
|
+
|
|
289
|
+
If the `Context` block is no longer necessary it can also be removed:
|
|
290
|
+
|
|
291
|
+
###### Version 3:
|
|
292
|
+
|
|
293
|
+
```yaml
|
|
294
|
+
id: '404'
|
|
295
|
+
type: Context
|
|
296
|
+
style:
|
|
297
|
+
minHeight: 100vh
|
|
298
|
+
blocks:
|
|
299
|
+
- id: 404_result
|
|
300
|
+
type: Result
|
|
301
|
+
properties:
|
|
302
|
+
status: 404
|
|
303
|
+
title: '404'
|
|
304
|
+
subTitle: Sorry, the page you are visiting does not exist.
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
###### Version 4:
|
|
308
|
+
|
|
309
|
+
```yaml
|
|
310
|
+
id: '404'
|
|
311
|
+
type: Result
|
|
312
|
+
style:
|
|
313
|
+
minHeight: 100vh
|
|
314
|
+
properties:
|
|
315
|
+
status: 404
|
|
316
|
+
title: '404'
|
|
317
|
+
subTitle: Sorry, the page you are visiting does not exist.
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
## Other removed blocks
|
|
321
|
+
|
|
322
|
+
In version 4 the `PageHCF`, `PageHCSF`, `PageHSCF`, and `PageSHCF` blocks have been removed. Instead you can now use the `Layout`, `Header`, `Content`, `Sider` and `Footer` blocks. See more about this [here](https://4x.ant.design/components/layout/).
|
|
323
|
+
|
|
324
|
+
###### Layout, Header-Content-Footer example:
|
|
325
|
+
|
|
326
|
+
```yaml
|
|
327
|
+
id: layout
|
|
328
|
+
type: Layout
|
|
329
|
+
style:
|
|
330
|
+
textAlign: center
|
|
331
|
+
blocks:
|
|
332
|
+
- id: header
|
|
333
|
+
type: Header
|
|
334
|
+
blocks:
|
|
335
|
+
- id: Title
|
|
336
|
+
type: Title
|
|
337
|
+
properties:
|
|
338
|
+
content: Header
|
|
339
|
+
style:
|
|
340
|
+
backgroundColor: red
|
|
341
|
+
- id: content
|
|
342
|
+
type: Content
|
|
343
|
+
blocks:
|
|
344
|
+
- id: Title
|
|
345
|
+
type: Title
|
|
346
|
+
style:
|
|
347
|
+
backgroundColor: green
|
|
348
|
+
properties:
|
|
349
|
+
content: Content
|
|
350
|
+
- id: footer
|
|
351
|
+
type: Footer
|
|
352
|
+
blocks:
|
|
353
|
+
- id: Title
|
|
354
|
+
type: Title
|
|
355
|
+
style:
|
|
356
|
+
backgroundColor: blue
|
|
357
|
+
properties:
|
|
358
|
+
content: Footer
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
## Server Configuration
|
|
362
|
+
|
|
363
|
+
The `LOWDEFY_SERVER_BASE_PATH` environment variable configuration option has been removed. To configure a base path, use the `config.basePath` configuration option.
|
|
364
|
+
|
|
365
|
+
``yaml
|
|
366
|
+
lowdefy: 7.0.0
|
|
367
|
+
|
|
368
|
+
config:
|
|
369
|
+
basePath: /foo
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
The `_build.env` operator can be used to set the base path using an environment variable:
|
|
373
|
+
```yaml
|
|
374
|
+
lowdefy: 7.0.0
|
|
375
|
+
|
|
376
|
+
config:
|
|
377
|
+
basePath:
|
|
378
|
+
_build.env: LOWDEFY_BASE_PATH
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
The `LOWDEFY_SERVER_PUBLIC_DIRECTORY` and `LOWDEFY_SERVER_BUILD_DIRECTORY` are no longer supported because configuration is bundled with the server at build time.
|
|
382
|
+
|
|
383
|
+
The `LOWDEFY_SERVER_PORT` environment variable has been replaced by the `PORT` environment variable.
|
|
384
|
+
|
|
385
|
+
## _change_case
|
|
386
|
+
|
|
387
|
+
The options splitRegex and stripRegex are no longer supported in v4 and the following have been renamed:
|
|
388
|
+
- paramCase to kebabCase
|
|
389
|
+
- headerCase to trainCase
|
|
390
|
+
|
|
391
|
+
###### Version 3:
|
|
392
|
+
|
|
393
|
+
```yaml
|
|
394
|
+
_change_case.paramCase:
|
|
395
|
+
on: example string
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
###### Version 4:
|
|
399
|
+
|
|
400
|
+
```yaml
|
|
401
|
+
_change_case.kebabCase:
|
|
402
|
+
on: example string
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
###### Version 3:
|
|
406
|
+
|
|
407
|
+
```yaml
|
|
408
|
+
_change_case.headerCase:
|
|
409
|
+
on: example string
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
###### Version 4:
|
|
413
|
+
|
|
414
|
+
```yaml
|
|
415
|
+
_change_case.trainCase:
|
|
416
|
+
on: example string
|
|
417
|
+
```
|