@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.
Files changed (284) hide show
  1. package/README.md +1 -0
  2. package/content/actions/downloadcsv.md +1 -1
  3. package/content/actions/emailotpsend.md +58 -0
  4. package/content/actions/emailotpverify.md +79 -0
  5. package/content/actions/getlocalstorage.md +43 -0
  6. package/content/actions/link.md +47 -1
  7. package/content/actions/login.md +25 -5
  8. package/content/actions/logout.md +7 -5
  9. package/content/actions/magiclinkverify.md +117 -0
  10. package/content/actions/pdfmake.md +2 -2
  11. package/content/actions/posthogalias.md +29 -0
  12. package/content/actions/posthogcapture.md +49 -0
  13. package/content/actions/posthogcapturepageleave.md +38 -0
  14. package/content/actions/posthogfeatureflag.md +50 -0
  15. package/content/actions/posthoggroup.md +37 -0
  16. package/content/actions/posthogidentify.md +54 -0
  17. package/content/actions/posthoginit.md +96 -0
  18. package/content/actions/posthogoptin.md +29 -0
  19. package/content/actions/posthogoptout.md +29 -0
  20. package/content/actions/posthogpageview.md +37 -0
  21. package/content/actions/posthogreloadfeatureflags.md +47 -0
  22. package/content/actions/posthogreset.md +28 -0
  23. package/content/actions/posthogsetpersonproperties.md +36 -0
  24. package/content/actions/removelocalstorage.md +28 -0
  25. package/content/actions/resetvalidation.md +7 -3
  26. package/content/actions/setdarkmode.md +3 -3
  27. package/content/actions/setglobal.md +2 -0
  28. package/content/actions/setlocale.md +1 -1
  29. package/content/actions/setlocalstorage.md +34 -0
  30. package/content/actions/validate.md +7 -4
  31. package/content/adapter-reference/mongodbauthadapter.md +46 -0
  32. package/content/agents/agent-endpoint-tools.md +24 -0
  33. package/content/agents/agent-properties.md +13 -3
  34. package/content/agents/agent-server-hooks.md +1 -1
  35. package/content/agents/agentchat.md +43 -7
  36. package/content/agents/agentconversations.md +42 -8
  37. package/content/agents/agents-introduction.md +107 -0
  38. package/content/callback-reference/auth0logoutcallback.md +54 -0
  39. package/content/concepts/ai-agent-docs.md +455 -106
  40. package/content/concepts/blocks.md +150 -0
  41. package/content/concepts/connections-and-requests.md +402 -0
  42. package/content/concepts/custom-html.md +42 -0
  43. package/content/concepts/custom-styling.md +50 -5
  44. package/content/concepts/dynamic-page-content.md +309 -0
  45. package/content/concepts/events-and-actions.md +154 -2
  46. package/content/concepts/four-primitives.md +31 -0
  47. package/content/concepts/html-attributes.md +293 -0
  48. package/content/concepts/i18n.md +8 -3
  49. package/content/concepts/keyboard-shortcuts.md +2 -2
  50. package/content/concepts/layout-overview.md +1 -1
  51. package/content/concepts/logger.md +99 -0
  52. package/content/concepts/lowdefy-api.md +1319 -0
  53. package/content/concepts/lowdefy-schema.md +136 -3
  54. package/content/concepts/menus.md +8 -7
  55. package/content/concepts/module-authoring.md +76 -5
  56. package/content/concepts/modules.md +3 -1
  57. package/content/concepts/notifications.md +180 -0
  58. package/content/concepts/operators.md +7 -0
  59. package/content/concepts/page-and-app-state.md +252 -0
  60. package/content/concepts/page-paths.md +209 -0
  61. package/content/concepts/theming.md +582 -0
  62. package/content/connections/aigateway.md +375 -0
  63. package/content/connections/anthropic.md +169 -2
  64. package/content/connections/awss3.md +178 -2
  65. package/content/connections/axioshttp.md +181 -0
  66. package/content/connections/google.md +169 -2
  67. package/content/connections/mongodb.md +1014 -3
  68. package/content/connections/openai-connection.md +169 -2
  69. package/content/connections/sendgridmail.md +2 -0
  70. package/content/connections/smtp.md +3 -1
  71. package/content/connections/treg.md +329 -0
  72. package/content/container-blocks/affix.md +47 -7
  73. package/content/container-blocks/alert.md +76 -24
  74. package/content/container-blocks/badge.md +100 -24
  75. package/content/container-blocks/box.md +9 -9
  76. package/content/container-blocks/card.md +132 -27
  77. package/content/container-blocks/carousel.md +60 -7
  78. package/content/container-blocks/collapse.md +153 -9
  79. package/content/container-blocks/configprovider.md +35 -13
  80. package/content/container-blocks/confirmmodal.md +69 -23
  81. package/content/container-blocks/content.md +62 -98
  82. package/content/container-blocks/descriptions.md +45 -4
  83. package/content/container-blocks/drawer.md +139 -28
  84. package/content/container-blocks/dropdownmenu.md +119 -31
  85. package/content/container-blocks/flex.md +40 -62
  86. package/content/container-blocks/footer.md +15 -11
  87. package/content/container-blocks/googlemapsheatmap.md +1 -1
  88. package/content/container-blocks/googlemapsscript.md +2 -2
  89. package/content/container-blocks/header.md +71 -36
  90. package/content/container-blocks/label.md +34 -7
  91. package/content/container-blocks/layout.md +52 -34
  92. package/content/container-blocks/masonry.md +17 -71
  93. package/content/container-blocks/mobilemenu.md +131 -88
  94. package/content/container-blocks/modal.md +161 -26
  95. package/content/container-blocks/pageheadermenu.md +138 -31
  96. package/content/container-blocks/pagesidebarlayout.md +230 -27
  97. package/content/container-blocks/pagesidermenu.md +153 -43
  98. package/content/container-blocks/popover.md +34 -31
  99. package/content/container-blocks/result.md +32 -21
  100. package/content/container-blocks/sider.md +85 -122
  101. package/content/container-blocks/span.md +7 -7
  102. package/content/container-blocks/spinner.md +3 -3
  103. package/content/container-blocks/splitter.md +150 -68
  104. package/content/container-blocks/tabs.md +64 -12
  105. package/content/container-blocks/tooltip.md +22 -46
  106. package/content/container-blocks/watermark.md +22 -4
  107. package/content/controls/parallel_for.md +21 -2
  108. package/content/controls/reject.md +24 -3
  109. package/content/controls/return.md +17 -1
  110. package/content/controls/throw.md +1 -0
  111. package/content/controls/try.md +4 -2
  112. package/content/controls/while.md +46 -0
  113. package/content/deployment/deployment-environments.md +10 -7
  114. package/content/deployment/docker.md +22 -7
  115. package/content/deployment/node-server.md +4 -0
  116. package/content/deployment/vercel.md +17 -6
  117. package/content/display-blocks/aggrid.md +36 -19
  118. package/content/display-blocks/anchor.md +16 -15
  119. package/content/display-blocks/avatar.md +57 -37
  120. package/content/display-blocks/breadcrumb.md +70 -21
  121. package/content/display-blocks/button.md +93 -19
  122. package/content/display-blocks/calendar.md +12 -0
  123. package/content/display-blocks/clickablehtml.md +239 -0
  124. package/content/display-blocks/dangeroushtml.md +1 -1
  125. package/content/display-blocks/difflist.md +1 -1
  126. package/content/display-blocks/difftimeline.md +1 -1
  127. package/content/display-blocks/divider.md +64 -3
  128. package/content/display-blocks/dropdownbutton.md +81 -30
  129. package/content/display-blocks/echart.md +35 -1
  130. package/content/display-blocks/eventlog.md +363 -0
  131. package/content/display-blocks/floatbutton.md +129 -42
  132. package/content/display-blocks/html.md +61 -1
  133. package/content/display-blocks/icon.md +250 -67
  134. package/content/display-blocks/img.md +2 -2
  135. package/content/display-blocks/menu.md +146 -73
  136. package/content/display-blocks/message.md +38 -124
  137. package/content/display-blocks/notification.md +94 -222
  138. package/content/display-blocks/paragraph.md +59 -9
  139. package/content/display-blocks/pollingtimer.md +263 -0
  140. package/content/display-blocks/progress.md +96 -17
  141. package/content/display-blocks/qrcode.md +19 -4
  142. package/content/display-blocks/s3download.md +1 -1
  143. package/content/display-blocks/search.md +19 -9
  144. package/content/display-blocks/skeletonbutton.md +1 -0
  145. package/content/display-blocks/skeletoninput.md +1 -0
  146. package/content/display-blocks/statistic.md +75 -17
  147. package/content/display-blocks/steps.md +58 -25
  148. package/content/display-blocks/table.md +2527 -0
  149. package/content/display-blocks/tablelight.md +621 -0
  150. package/content/display-blocks/tag.md +102 -17
  151. package/content/display-blocks/title.md +50 -11
  152. package/content/display-blocks/tour.md +33 -23
  153. package/content/input-blocks/autocomplete.md +81 -9
  154. package/content/input-blocks/buttonselector.md +45 -8
  155. package/content/input-blocks/captcha.md +40 -0
  156. package/content/input-blocks/checkboxselector.md +97 -7
  157. package/content/input-blocks/checkboxswitch.md +33 -3
  158. package/content/input-blocks/colorselector.md +63 -14
  159. package/content/input-blocks/daterangeselector.md +165 -45
  160. package/content/input-blocks/dateselector.md +139 -41
  161. package/content/input-blocks/datetimeselector.md +158 -49
  162. package/content/input-blocks/inputgallery.md +3 -3
  163. package/content/input-blocks/intentinput.md +207 -0
  164. package/content/input-blocks/monthselector.md +120 -52
  165. package/content/input-blocks/multipleselector.md +150 -39
  166. package/content/input-blocks/numberinput.md +98 -12
  167. package/content/input-blocks/pagination.md +70 -14
  168. package/content/input-blocks/paragraphinput.md +51 -37
  169. package/content/input-blocks/passwordinput.md +60 -6
  170. package/content/input-blocks/phonenumberinput.md +59 -26
  171. package/content/input-blocks/placesautocomplete.md +319 -0
  172. package/content/input-blocks/radioselector.md +83 -7
  173. package/content/input-blocks/ratingslider.md +57 -26
  174. package/content/input-blocks/s3uploadbutton.md +24 -24
  175. package/content/input-blocks/s3uploaddragger.md +3 -3
  176. package/content/input-blocks/s3uploadphoto.md +5 -5
  177. package/content/input-blocks/segmentedselector.md +72 -32
  178. package/content/input-blocks/selector.md +109 -21
  179. package/content/input-blocks/switch.md +65 -17
  180. package/content/input-blocks/tableinput.md +445 -0
  181. package/content/input-blocks/tagmultipleselector.md +114 -0
  182. package/content/input-blocks/tagselector.md +114 -0
  183. package/content/input-blocks/textarea.md +32 -3
  184. package/content/input-blocks/textinput.md +70 -29
  185. package/content/input-blocks/tiptapinput.md +1 -1
  186. package/content/input-blocks/tiptapmentioninput.md +2 -2
  187. package/content/input-blocks/titleinput.md +39 -12
  188. package/content/input-blocks/treeinput.md +49 -25
  189. package/content/input-blocks/treemultipleselector.md +127 -10
  190. package/content/input-blocks/treeselector.md +97 -9
  191. package/content/input-blocks/upload.md +64 -15
  192. package/content/input-blocks/uploaddragger.md +17 -1
  193. package/content/input-blocks/uploadphoto.md +18 -1
  194. package/content/input-blocks/weekselector.md +120 -55
  195. package/content/learn/introduction.md +27 -0
  196. package/content/learn/quickstart.md +53 -0
  197. package/content/list-blocks/controlledlist.md +24 -15
  198. package/content/list-blocks/list.md +11 -11
  199. package/content/list-blocks/masonrylist.md +7 -34
  200. package/content/migration/auth-upgrade.md +337 -0
  201. package/content/migration/upgrade-guide.md +1 -0
  202. package/content/migration/v3-to-v4.md +417 -0
  203. package/content/migration/v6-to-v7.md +620 -0
  204. package/content/operators/_agent.md +155 -0
  205. package/content/operators/_app.md +2 -1
  206. package/content/operators/_array.md +122 -1
  207. package/content/operators/_build.md +1 -0
  208. package/content/operators/_credential.md +57 -0
  209. package/content/operators/_cron.md +292 -0
  210. package/content/operators/_date.md +2 -0
  211. package/content/operators/_error.md +24 -1
  212. package/content/operators/_get.md +6 -6
  213. package/content/operators/_hmac.md +78 -0
  214. package/content/operators/_js.md +2 -1
  215. package/content/operators/_location.md +1 -1
  216. package/content/operators/_media.md +13 -0
  217. package/content/operators/_module.md +56 -2
  218. package/content/operators/_operator.md +17 -3
  219. package/content/operators/_path_params.md +82 -0
  220. package/content/operators/_ref.md +258 -0
  221. package/content/operators/_request.md +1 -1
  222. package/content/operators/_request_details.md +6 -0
  223. package/content/operators/_type.md +14 -3
  224. package/content/operators/_url_query.md +2 -0
  225. package/content/operators/_user.md +3 -3
  226. package/content/plugins/plugins-actions.md +10 -0
  227. package/content/plugins/plugins-connections.md +25 -0
  228. package/content/plugins/plugins-dev.md +66 -0
  229. package/content/plugins/plugins-icon-sets.md +267 -0
  230. package/content/plugins/plugins-introduction.md +27 -1
  231. package/content/plugins/plugins.md +19 -0
  232. package/content/plugins/posthog.md +359 -0
  233. package/content/provider-reference/auth-js-providers.md +107 -0
  234. package/content/provider-reference/openidconnectprovider.md +44 -0
  235. package/content/recipes/recipes.md +16 -0
  236. package/content/reference/actions-reference.md +31 -0
  237. package/content/reference/blocks-reference.md +35 -0
  238. package/content/reference/cli.md +403 -0
  239. package/content/reference/connections-reference.md +23 -0
  240. package/content/reference/operators-reference.md +47 -0
  241. package/content/reference/reference.md +16 -0
  242. package/content/reference/schema-reference.md +12 -0
  243. package/content/testing/config-tests.md +677 -0
  244. package/content/testing/e2e-configuration.md +31 -1
  245. package/content/testing/e2e-getting-started.md +1 -1
  246. package/content/testing/e2e-introduction.md +1 -1
  247. package/content/testing/e2e-writing-tests.md +12 -1
  248. package/content/testing/explore-pull-request.md +136 -0
  249. package/content/testing/journey-data-sets.md +326 -0
  250. package/content/tutorial/tutorial-actions-operators.md +2 -2
  251. package/content/tutorial/tutorial-add-blocks.md +2 -2
  252. package/content/tutorial/tutorial-create-page.md +48 -2
  253. package/content/tutorial/tutorial-display-data-page.md +3 -3
  254. package/content/tutorial/tutorial-requests-api.md +155 -0
  255. package/content/tutorial/tutorial-requests-sql.md +153 -0
  256. package/content/tutorial/tutorial-start.md +66 -1
  257. package/content/user-authentication/auth-configuration.md +267 -0
  258. package/content/user-authentication/auth-providers.md +24 -0
  259. package/content/user-authentication/auth-steps.md +141 -0
  260. package/content/user-authentication/login-and-logout.md +160 -8
  261. package/content/user-authentication/mcp-oauth.md +424 -0
  262. package/content/user-authentication/organizations.md +246 -0
  263. package/content/user-authentication/protected-pages-apis.md +97 -0
  264. package/content/user-authentication/roles.md +49 -0
  265. package/content/user-authentication/two-factor.md +229 -0
  266. package/content/user-authentication/user-object.md +58 -0
  267. package/content/user-authentication/users-introduction.md +8 -0
  268. package/content/websockets/websocket-publish.md +105 -0
  269. package/content/websockets/websocket-subscriptions.md +136 -0
  270. package/content/websockets/websockets-introduction.md +101 -0
  271. package/hazards.json +44 -0
  272. package/index.json +3691 -14
  273. package/package.json +11 -1
  274. package/scripts/collectImportedFiles.js +80 -0
  275. package/scripts/extractAgentDocs.js +41 -30
  276. package/scripts/hashDocSources.js +38 -0
  277. package/scripts/isRedirectPage.js +26 -0
  278. package/scripts/recordSourceHashes.js +100 -0
  279. package/scripts/resolvePageSections.js +42 -0
  280. package/scripts/sectionKind.js +27 -0
  281. package/content/concepts/cli.md +0 -223
  282. package/content/other/introduction.md +0 -39
  283. package/content/other/next-auth-providers.md +0 -3
  284. /package/content/{other → actions}/updatesession.md +0 -0
@@ -0,0 +1,621 @@
1
+ # TableLight
2
+
3
+ A light table for the odd table on a page: a few columns and tens to hundreds of rows, with typed cells (numbers, dates, tags, people, links and more), sorting by header click, row links, row buttons and menus, conditional formatting and a summary row. It renders the Ant Design Table and adds no dependencies. Its config is a subset of the Table block's, so a table that outgrows it changes `type: TableLight` to `type: Table`.
4
+
5
+ ## When to use TableLight
6
+
7
+ `TableLight` is for the quick table here and there: a list of recent orders on a dashboard, the line items of an invoice, a short list of team members with an Edit button. It renders every row, so keep it to tens or hundreds of rows. In development it logs a console warning above 1,000 rows.
8
+
9
+ It has no value and keeps no state an app can read. For column filters, resizing, grouping, selection, editing, saved views, virtualisation or server-side data, use [`Table`](/Table). TableLight's config is a strict subset of Table's, so switching is a change of `type`. The [Table guide](/Table) compares TableLight, Table, TableInput and AgGrid and shows each kind of table as config. A key only Table supports stops the block with an error such as `Block "TableLight" property "columns.0.filterable" is not supported. Use Table for column filters.` The Table-only keys are `rowSelection`, `toolbar`, `views`, `activeView`, `defaultView`, `persist`, `virtual`, `headerMenu`, `reorderable`, `stickyHeader`, `rowHeight`, `maxHeight`, `rowDrag`, `tree`, `expandable`, `keyboard` and `rowVersionField` on the block; `filterable`, `resizable`, `groupable`, `editable`, `validate`, `required`, `default`, `searchable`, `flex` and `maxWidth` on columns; and `width` and `minWidth` on `defaultColumn`.
10
+
11
+ ## Columns
12
+
13
+ A column is an object, or just its key:
14
+
15
+ ```yaml
16
+ columns:
17
+ - name # key and field "name", title "Name"
18
+ - key: owner_name # title "Owner name"
19
+ field: owner.name
20
+ - key: amount
21
+ type: currency
22
+ cell:
23
+ currency: EUR
24
+ aggregate: sum
25
+ ```
26
+
27
+ - `key` is the column id and `field` the dot path of the value in the row. Each defaults to the other.
28
+ - `title` defaults to the key in sentence case, and supports html. `headerTooltip` adds a tooltip to the header.
29
+ - `type` picks the cell type (below) and `cell` holds that type's options. The option names match the AgGrid `cell` keys, so a column moves over by lifting `cell.type` to `type`.
30
+ - `align` is `start`, `center` or `end`; number, currency and percent columns default to `end`.
31
+ - `width` and `minWidth` are in pixels. `pinned: start` or `pinned: end` keeps a column in view while the table scrolls sideways.
32
+ - Text stays on one line. `wrap: true` wraps it and `ellipsis: 2` clamps it to two lines with the full text on hover. A clamp needs a column `width`.
33
+ - `children` groups columns under a shared header.
34
+ - `hidden: true` declares a column without showing it.
35
+
36
+ ## Cell types
37
+
38
+ | type | shows | options in `cell` |
39
+ | ------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
40
+ | `text` | the value (the default) | |
41
+ | `number`, `currency`, `percent` | formatted with `Intl.NumberFormat` | `format`, `locale`, `currency`, `decimals`, `minDecimals`, `maxDecimals`, `notation`, `useGrouping`, `negative`, `prefix`, `suffix`, `signColor`, `positiveColor`, `negativeColor`, `zeroColor`, `color`, `thresholds` + `colors` |
42
+ | `date`, `datetime` | a dayjs format, or relative time with the date on hover | `format`, `relative` |
43
+ | `boolean` | a label or an icon | `trueLabel`, `falseLabel`, `trueColor`, `falseColor`, `trueIcon`, `falseIcon` |
44
+ | `tag`, `tags`, `status` | tinted tags, or a dot and a label | `colorMap`, `colorFrom`, `default`, `max` (tags) |
45
+ | `avatar`, `people` | initials or an image; `people` overlaps several with a +N count | `nameField`, `srcField`, `idField`, `shape`, `link` (avatar), `max` (people) |
46
+ | `link` | a link that navigates by itself | `pageId`, `href`, `urlQuery`, `pathParams`, `newTab`, `home`, `back`, `input`, `labelField` |
47
+ | `email`, `phone`, `url` | `mailto:`, `tel:` and external links | `label`, `labelField`, `newTab` (url) |
48
+ | `relation` | related records as chips, linked to their page | `labelField`, `pageId`, `href`, `urlQuery`, `pathParams`, `newTab` |
49
+ | `progress`, `rating` | a bar, or stars | `max`, `suffix`, `color`, `thresholds`, `colors`, `showValue`, `nullLabel` (progress) |
50
+ | `image` | a lazy thumbnail | `width`, `height`, `shape`, `alt`, `altField` |
51
+ | `html` | a template or a field holding HTML | `template` |
52
+ | `json` | a one-line preview | |
53
+ | `buttons` | row buttons | `buttons`, `showOn` |
54
+ | `menu` | a row menu | `items`, `icon`, `title`, `placement` |
55
+
56
+ Values in `urlQuery`, `pathParams` and every `...Field` option are paths in the row. For `people` they are paths in each person, and for `relation` paths in the related record, where `urlQuery` defaults to `{ _id: _id }` when neither `urlQuery` nor `pathParams` is set.
57
+
58
+ A `url` value with a scheme other than http or https, such as `javascript:`, shows as text, not as a link.
59
+
60
+ ### Options: labels and colours for enum values
61
+
62
+ `options` gives the labels and colours of `tag`, `tags` and `status` values. It takes a list, or a map from value to a label or `{ label, color, icon }`:
63
+
64
+ ```yaml
65
+ - key: stage
66
+ type: status
67
+ options:
68
+ lead: Lead
69
+ qualified: { label: Qualified, color: processing }
70
+ won: { label: Won, color: success }
71
+ lost: { label: Lost, color: error }
72
+ ```
73
+
74
+ Colours are the antd presets (`blue`, `green`, `gold`, ...), the status names (`success`, `processing`, `warning`, `error`) or any CSS colour. The presets and status names follow the theme and dark mode. An enum column sorts in the order its options are declared. A value without an option, in a column without `options` or colour keys, gets a colour picked from the value, so the same value always has the same colour.
75
+
76
+ ### HTML templates
77
+
78
+ An `html` cell renders a [nunjucks](https://mozilla.github.io/nunjucks/) template with `value` and `row`, compiled once per column:
79
+
80
+ ```yaml
81
+ - key: summary
82
+ type: html
83
+ cell:
84
+ template: '<b>{{ row.title }}</b> {{ value }}'
85
+ ```
86
+
87
+ Values are escaped. Use `| safe` to insert HTML held in a field. The output is sanitised, and `data-event` attributes fire block events as in other HTML.
88
+
89
+ ## Conditional formatting
90
+
91
+ `rules` on a column colour or style cells whose value meets a condition. `rowRules` does the same for rows:
92
+
93
+ ```yaml
94
+ rowRules:
95
+ - when: { key: overdue, op: isTrue }
96
+ className: row-warning
97
+ columns:
98
+ - key: score
99
+ type: number
100
+ rules:
101
+ - when: { op: gte, value: 8 }
102
+ color: success
103
+ - when: { op: lt, value: 5 }
104
+ color: error
105
+ ```
106
+
107
+ A condition is `{ key, op, value }`, or `{ and: [...] }` / `{ or: [...] }` of conditions. In a column rule, a condition without `key` tests the column's own value. Every rule that holds applies, in order.
108
+
109
+ | operators | for |
110
+ | ------------------------------------------------------------------------------------------------------ | ------------------------------ |
111
+ | `eq`, `ne`, `in`, `nin`, `empty`, `notEmpty` | every type |
112
+ | `contains`, `notContains`, `startsWith`, `endsWith` | text, links, tags and statuses |
113
+ | `gt`, `gte`, `lt`, `lte`, `between` (`value: [from, to]`) | numbers |
114
+ | `before`, `after`, `between`, `within` (`value: { last: 7, unit: day }` or `{ next: 1, unit: month }`) | dates; `eq` compares by day |
115
+ | `isTrue`, `isFalse` | booleans |
116
+ | `in` (any of), `nin` (none of), `contains` (has the value) | tags and people |
117
+
118
+ Text comparisons ignore case, and `empty` matches null, a missing value, an empty string and an empty list. To compare with the current user, use the `_user` operator in the value, for example `value: { _user: id }`.
119
+
120
+ `hidden` and `disabled` on buttons and menu items take the same conditions: `hidden: { when: { key: locked, op: isTrue } }`.
121
+
122
+ ## Sorting
123
+
124
+ Clicking a header sorts ascending, then descending, then back to the data order. The column type sets the order: numbers numerically, dates by time, enums by option order and text alphabetically, ignoring case and reading numbers in text as numbers. Empty values always sort last. Set `sortable: false` on a column, or `defaultColumn: { sortable: false }` for the whole table.
125
+
126
+ ## Rows, clicks and links
127
+
128
+ `rowKey` names the field that identifies a row, and defaults to `_id`, then `id`. Rows with neither get a key per row object, which does not survive a refetch.
129
+
130
+ `rowLink` makes every row a link:
131
+
132
+ ```yaml
133
+ rowLink:
134
+ pageId: order
135
+ urlQuery:
136
+ _id: _id
137
+ ```
138
+
139
+ For a page with a [`path`](/page-paths), give its placeholder values in `pathParams`, also as paths in the row: `rowLink: { pageId: ticket, pathParams: { space: space_id, ticket_id: _id } }`. Table links are block properties, so on a public page a link to a protected page with a path cannot be built while the user is logged out (see [`Link`](/Link)).
140
+
141
+ A plain click navigates, and a Cmd/Ctrl or middle click opens a new tab. With `onRowClick` defined as well, a plain click runs `onRowClick` (to open a drawer, say) and only a modified click follows the link.
142
+
143
+ `onRowClick` receives `{ row, rowKey, index }`, where `index` is the row's position in `data`, whatever the sort. `onCellClick` receives `{ row, rowKey, column: { key, field }, value }`. Clicks on buttons, links, menus and `data-event` elements in a cell, and a mouse drag that selects text, trigger neither.
144
+
145
+ A `link` cell navigates by itself. It also fires `onCellLink` with `{ link, row, value }`, so do not add a `Link` action to that event.
146
+
147
+ ## Buttons and menus
148
+
149
+ ```yaml
150
+ - key: actions
151
+ type: buttons
152
+ cell:
153
+ showOn: hover
154
+ buttons:
155
+ - eventName: onEdit
156
+ title: Edit
157
+ icon: edit
158
+ - eventName: onArchive
159
+ title: Archive
160
+ icon: Archive
161
+ hideTitle: true
162
+ - key: more
163
+ type: menu
164
+ cell:
165
+ items:
166
+ - eventName: onDelete
167
+ title: Delete
168
+ danger: true
169
+ ```
170
+
171
+ Each button or menu item fires the block event named by its `eventName`, with `{ row, rowKey, value, button: { eventName, title }, buttonIndex }` or `{ row, rowKey, value, item: { eventName, title }, itemIndex }`. The button keys are the AgGrid buttons cell keys: `title` / `titleField`, `icon` / `iconField`, `hidden` / `hiddenField`, `disabled` / `disabledField`, `type`, `variant`, `color`, `size`, `shape`, `danger`, `ghost`, `hideTitle`, `tooltip` and `iconPlacement`. An icon-only button shows its title as a tooltip.
172
+
173
+ `showOn: hover` hides the buttons until the row is hovered or has focus. Touch screens always show them.
174
+
175
+ ## Summary row, pagination and layout
176
+
177
+ - A column with `aggregate` adds a summary row: `sum`, `avg`, `min`, `max`, `count`, `countDistinct`, `countEmpty`, `countNotEmpty`, `percentEmpty`, `earliest` or `latest`, calculated over every row. `summary: false` hides it.
178
+ - Pages show only when there are more rows than `pageSize` (default 50). `pagination: false` shows every row; `pagination: true` always shows the pager.
179
+ - `height` fixes the body height: rows scroll under a sticky header, and the summary row stays in view.
180
+ - `size` is `compact`, `default` or `comfortable`. `bordered` and `emptyText` (default "No rows") do what they say.
181
+
182
+ ## Loading states
183
+
184
+ TableLight shows loading the way [`Table`](/TableGuide#loading-states) does, so switching `type` looks the same. With no rows yet and `loading` true (the property, or Lowdefy's own while `onMount` actions run) it shows the real header over skeleton rows shaped like the cells, filling `height` (or 600px) and at most a page. With rows, a refetch keeps them on screen, even while `_request` returns null, and a thin progress bar runs under the header. The skeleton shows after 120 ms and stays at least 300 ms, so fast responses never flash it. There is no spinner overlay.
185
+
186
+ ```yaml
187
+ - id: recent_orders
188
+ type: TableLight
189
+ properties:
190
+ loading:
191
+ _request_details: recent_orders.0.loading
192
+ data:
193
+ _request: recent_orders
194
+ columns: [number, customer, total]
195
+ ```
196
+
197
+ A block `skeleton` config replaces the table while the block loads, as for any block.
198
+
199
+ ```yaml
200
+ - id: basic_table
201
+ type: TableLight
202
+ properties:
203
+ columns:
204
+ - name
205
+ - key: email
206
+ type: email
207
+ - key: role
208
+ - key: joined
209
+ type: date
210
+ data:
211
+ - _id: 1
212
+ name: Sarah Johnson
213
+ email: sarah@example.com
214
+ role: Engineer
215
+ joined: 2023-04-12
216
+ - _id: 2
217
+ name: Alex Chen
218
+ email: alex@example.com
219
+ role: Product
220
+ joined: 2022-11-01
221
+ - _id: 3
222
+ name: Maria Garcia
223
+ email: maria@example.com
224
+ role: Design
225
+ joined: 2024-02-20
226
+ ```
227
+
228
+ ```yaml
229
+ - id: orders_table
230
+ type: TableLight
231
+ properties:
232
+ rowLink:
233
+ pageId: order
234
+ urlQuery:
235
+ _id: _id
236
+ columns:
237
+ - key: number
238
+ title: Order
239
+ - key: customer
240
+ type: avatar
241
+ - key: status
242
+ type: tag
243
+ options:
244
+ pending:
245
+ label: Pending
246
+ color: warning
247
+ shipped:
248
+ label: Shipped
249
+ color: processing
250
+ delivered:
251
+ label: Delivered
252
+ color: success
253
+ cancelled:
254
+ label: Cancelled
255
+ color: error
256
+ - key: total
257
+ type: currency
258
+ cell:
259
+ currency: USD
260
+ aggregate: sum
261
+ - key: placed
262
+ type: date
263
+ cell:
264
+ relative: true
265
+ data:
266
+ - _id: o1
267
+ number: ORD-1042
268
+ customer: Sarah Johnson
269
+ status: delivered
270
+ total: 129.97
271
+ placed: 2026-09-20T10:15:00
272
+ - _id: o2
273
+ number: ORD-1043
274
+ customer: Alex Chen
275
+ status: shipped
276
+ total: 54.5
277
+ placed: 2026-09-24T16:40:00
278
+ - _id: o3
279
+ number: ORD-1044
280
+ customer: Maria Garcia
281
+ status: pending
282
+ total: 310
283
+ placed: 2026-09-27T08:05:00
284
+ - _id: o4
285
+ number: ORD-1045
286
+ customer: Jordan Rivera
287
+ status: cancelled
288
+ total: 18.99
289
+ placed: 2026-09-27T12:30:00
290
+ ```
291
+
292
+ ```yaml
293
+ - id: cell_types_table
294
+ type: TableLight
295
+ properties:
296
+ columns:
297
+ - key: company
298
+ type: relation
299
+ cell:
300
+ labelField: name
301
+ - key: owners
302
+ type: people
303
+ - key: stage
304
+ type: status
305
+ options:
306
+ - value: lead
307
+ label: Lead
308
+ color: default
309
+ - value: qualified
310
+ label: Qualified
311
+ color: processing
312
+ - value: won
313
+ label: Won
314
+ color: success
315
+ - key: labels
316
+ type: tags
317
+ cell:
318
+ max: 2
319
+ - key: probability
320
+ type: percent
321
+ - key: health
322
+ type: progress
323
+ - key: rating
324
+ type: rating
325
+ - key: active
326
+ type: boolean
327
+ - key: website
328
+ type: url
329
+ - key: phone
330
+ type: phone
331
+ data:
332
+ - _id: d1
333
+ company:
334
+ _id: c1
335
+ name: Acme Ltd
336
+ owners:
337
+ - name: Ann Lee
338
+ - name: Bob Stone
339
+ - name: Cy Dunn
340
+ - name: Di Park
341
+ stage: won
342
+ labels:
343
+ - enterprise
344
+ - renewal
345
+ - priority
346
+ probability: 0.9
347
+ health: 82
348
+ rating: 4
349
+ active: true
350
+ website: acme.example.com
351
+ phone: +1 555 010 2000
352
+ - _id: d2
353
+ company:
354
+ _id: c2
355
+ name: Globex
356
+ owners:
357
+ - name: Bob Stone
358
+ stage: qualified
359
+ labels:
360
+ - smb
361
+ probability: 0.4
362
+ health: 35
363
+ rating: 3
364
+ active: false
365
+ website: https://globex.example.com
366
+ phone: +1 555 010 3000
367
+ ```
368
+
369
+ ```yaml
370
+ - id: rules_table
371
+ type: TableLight
372
+ properties:
373
+ size: compact
374
+ bordered: true
375
+ rowRules:
376
+ - when:
377
+ key: overdue
378
+ op: isTrue
379
+ style:
380
+ fontStyle: italic
381
+ columns:
382
+ - key: task
383
+ - key: score
384
+ type: number
385
+ rules:
386
+ - when:
387
+ op: gte
388
+ value: 8
389
+ color: success
390
+ - when:
391
+ op: lt
392
+ value: 5
393
+ color: error
394
+ - key: summary
395
+ type: html
396
+ ellipsis: 2
397
+ width: 260
398
+ cell:
399
+ template: "<b>{{ row.task }}</b>: {{ value }}"
400
+ - key: overdue
401
+ type: boolean
402
+ cell:
403
+ trueLabel: Overdue
404
+ falseLabel: On time
405
+ trueColor: error
406
+ data:
407
+ - _id: t1
408
+ task: Onboarding
409
+ score: 9
410
+ summary: Welcome pack sent and first call booked.
411
+ overdue: false
412
+ - _id: t2
413
+ task: Renewal
414
+ score: 4
415
+ summary: Waiting on the signed order form from procurement.
416
+ overdue: true
417
+ - _id: t3
418
+ task: Upsell
419
+ score: 6
420
+ summary: Demo scheduled for next week.
421
+ overdue: false
422
+ ```
423
+
424
+ ```yaml
425
+ - id: actions_table
426
+ type: TableLight
427
+ properties:
428
+ columns:
429
+ - key: name
430
+ - key: email
431
+ type: email
432
+ - key: actions
433
+ type: buttons
434
+ align: end
435
+ cell:
436
+ showOn: hover
437
+ buttons:
438
+ - eventName: onEdit
439
+ title: Edit
440
+ icon: edit
441
+ - eventName: onArchive
442
+ title: Archive
443
+ icon: Archive
444
+ hideTitle: true
445
+ hidden:
446
+ when:
447
+ key: archived
448
+ op: isTrue
449
+ - key: more
450
+ title: ""
451
+ type: menu
452
+ width: 48
453
+ cell:
454
+ items:
455
+ - eventName: onDuplicate
456
+ title: Duplicate
457
+ - eventName: onDelete
458
+ title: Delete
459
+ danger: true
460
+ data:
461
+ - _id: u1
462
+ name: Sarah Johnson
463
+ email: sarah@example.com
464
+ archived: false
465
+ - _id: u2
466
+ name: Alex Chen
467
+ email: alex@example.com
468
+ archived: true
469
+ events:
470
+ onEdit:
471
+ - id: edit_message
472
+ type: DisplayMessage
473
+ params:
474
+ content:
475
+ _string.concat:
476
+ - "Edit "
477
+ - _event: row.name
478
+ ```
479
+
480
+ ```yaml
481
+ - id: grouped_table
482
+ type: TableLight
483
+ properties:
484
+ height: 200
485
+ pagination: false
486
+ columns:
487
+ - key: region
488
+ pinned: start
489
+ width: 140
490
+ - title: Q1
491
+ children:
492
+ - key: jan
493
+ type: currency
494
+ aggregate: sum
495
+ width: 120
496
+ - key: feb
497
+ type: currency
498
+ aggregate: sum
499
+ width: 120
500
+ - key: mar
501
+ type: currency
502
+ aggregate: sum
503
+ width: 120
504
+ - title: Q2
505
+ children:
506
+ - key: apr
507
+ type: currency
508
+ aggregate: sum
509
+ width: 120
510
+ - key: may
511
+ type: currency
512
+ aggregate: sum
513
+ width: 120
514
+ - key: jun
515
+ type: currency
516
+ aggregate: sum
517
+ width: 120
518
+ data:
519
+ - _id: 1
520
+ region: North
521
+ jan: 12000
522
+ feb: 13500
523
+ mar: 14100
524
+ apr: 12900
525
+ may: 15200
526
+ jun: 16000
527
+ - _id: 2
528
+ region: South
529
+ jan: 9800
530
+ feb: 10100
531
+ mar: 9900
532
+ apr: 11200
533
+ may: 11800
534
+ jun: 12500
535
+ - _id: 3
536
+ region: East
537
+ jan: 15300
538
+ feb: 14900
539
+ mar: 16200
540
+ apr: 17100
541
+ may: 16800
542
+ jun: 18200
543
+ - _id: 4
544
+ region: West
545
+ jan: 8700
546
+ feb: 9200
547
+ mar: 9800
548
+ apr: 10400
549
+ may: 10900
550
+ jun: 11300
551
+ - _id: 5
552
+ region: Central
553
+ jan: 11100
554
+ feb: 11600
555
+ mar: 12000
556
+ apr: 12500
557
+ may: 13100
558
+ jun: 13400
559
+ - _id: 6
560
+ region: Islands
561
+ jan: 4300
562
+ feb: 4100
563
+ mar: 4600
564
+ apr: 4900
565
+ may: 5200
566
+ jun: 5600
567
+ ```
568
+
569
+ ```yaml
570
+ - id: empty_table
571
+ type: TableLight
572
+ properties:
573
+ emptyText: No orders yet.
574
+ columns:
575
+ - number
576
+ - key: total
577
+ type: currency
578
+ data: []
579
+ ```
580
+
581
+ | Property | Type | Default | Description |
582
+ | --- | --- | --- | --- |
583
+ | `data` | array \| null | - | The rows to show. |
584
+ | `rowKey` | string | - | The row field that identifies each row. Defaults to `_id`, then `id`. Rows with neither get a key per row object, which does not survive a refetch. |
585
+ | `columns` | array \| null | - | The columns, in order. |
586
+ | `defaultColumn` | object | - | Defaults applied to every column. |
587
+ | `defaultColumn.sortable` | boolean | `true` | Sort by clicking a header. |
588
+ | `defaultColumn.wrap` | boolean | `false` | Wrap long text. |
589
+ | `defaultColumn.ellipsis` | integer | - | Clamp text to this many lines. |
590
+ | `user` | object | - | The user object for `$user` values in `rules`, `rowRules` and button `hidden`/`disabled` conditions, usually `{ _user: true }`. Blocks do not see the session, so conditions read `$user` from this property. |
591
+ | `rowLink` | object | - | Make rows links. A plain click navigates, Cmd/Ctrl or middle click opens a new tab. Values in `urlQuery` and `pathParams` are row paths. |
592
+ | `rowLink.pageId` | string | - | The page to open. |
593
+ | `rowLink.href` | string | - | A URL to open instead of a page. |
594
+ | `rowLink.urlQuery` | object | - | Query parameters; each value is a path in the row, like `{ _id: _id }`. |
595
+ | `rowLink.pathParams` | object | - | Values for the page path's placeholders; each value is a path in the row, like `{ ticket_id: _id }`. |
596
+ | `rowLink.input` | object | - | Input for the page. |
597
+ | `rowLink.newTab` | boolean | - | Always open in a new tab. |
598
+ | `rowRules` | array | - | Conditional row formatting: `[{ when, className, style, color }]`, where `when` conditions name columns by `key`. |
599
+ | `size` | string | `"default"` | Row density. Enum: `compact`, `default`, `comfortable`. |
600
+ | `bordered` | boolean | `false` | Draw borders around cells. |
601
+ | `height` | number \| string | - | A fixed body height; the rows scroll under a sticky header and the summary row stays in view. |
602
+ | `emptyText` | string | - | What to show when there are no rows - supports html. Defaults to "No rows". |
603
+ | `loading` | boolean | `false` | Show the loading state: skeleton rows while there are no rows yet, a progress bar under the header while rows are shown. The rows stay while `data` is null during a refetch. Lowdefy sets loading while onMount actions run. |
604
+ | `pagination` | boolean | - | Pages are shown only when there are more rows than `pageSize`. `false` shows every row on one page; `true` always shows the pager. |
605
+ | `pageSize` | integer | `50` | Rows per page. |
606
+ | `summary` | boolean | `true` | Show the summary row when a column declares an `aggregate`. `false` hides it. |
607
+
608
+ | Event | Event Data | Description |
609
+ | --- | --- | --- |
610
+ | `onRowClick` | `{ row, rowKey, index }` | Trigger actions when a row is clicked. Clicks on buttons, links, menus and `data-event` elements in a cell, and clicks that end a text selection, do not trigger it. With `rowLink`, a plain click runs onRowClick instead of following the link. |
611
+ | `onCellClick` | `{ row, rowKey, column, value }` | Trigger actions when a cell is clicked. Clicks on controls in the cell do not trigger it. |
612
+ | `onCellLink` | `{ link, row, value }` | Triggered when a link, avatar link or relation cell is clicked. The link navigates by itself; this event is for anything else to do. |
613
+ | `onCellButton` | `{ row, rowKey, value, button, buttonIndex }` | Documentation reference - the event fired is the `eventName` of each button in a `buttons` cell. Define any number of named events on the block, such as `onEdit`. |
614
+ | `onCellMenuItem` | `{ row, rowKey, value, item, itemIndex }` | Documentation reference - the event fired is the `eventName` of each item in a `menu` cell. |
615
+
616
+ | Key | Target |
617
+ | --- | --- |
618
+ | `/block` | Outer block wrapper (always available). |
619
+ | `/element` | The TableLight element. |
620
+
621
+ No slots defined.