blixify-ui-web-mcp 0.1.1

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 (245) hide show
  1. package/README.md +5 -0
  2. package/lib/components/action/button/README.md +75 -0
  3. package/lib/components/action/button/button.stories.tsx +138 -0
  4. package/lib/components/action/buttonGroup/README.md +79 -0
  5. package/lib/components/action/buttonGroup/buttonGroup.stories.tsx +104 -0
  6. package/lib/components/action/iconButton/README.md +39 -0
  7. package/lib/components/action/iconButton/iconButton.stories.tsx +22 -0
  8. package/lib/components/action/radioList/README.md +98 -0
  9. package/lib/components/action/radioList/radioList.stories.tsx +181 -0
  10. package/lib/components/action/slider/README.md +86 -0
  11. package/lib/components/action/slider/slider.stories.tsx +133 -0
  12. package/lib/components/action/textButton/README.md +34 -0
  13. package/lib/components/action/textButton/textButton.stories.tsx +16 -0
  14. package/lib/components/action/toggle/README.md +39 -0
  15. package/lib/components/action/toggle/toggle.stories.tsx +23 -0
  16. package/lib/components/advanced/collapse/README.md +106 -0
  17. package/lib/components/advanced/collapse/collapse.stories.tsx +165 -0
  18. package/lib/components/advanced/infoWindow/README.md +69 -0
  19. package/lib/components/advanced/infoWindow/infoWindow.stories.tsx +112 -0
  20. package/lib/components/advanced/popUp/README.md +95 -0
  21. package/lib/components/advanced/popUp/popUp.stories.tsx +189 -0
  22. package/lib/components/auth/bareSignIn/README.md +78 -0
  23. package/lib/components/auth/bareSignIn/bareSignIn.stories.tsx +141 -0
  24. package/lib/components/auth/bareSignUp/README.md +130 -0
  25. package/lib/components/auth/bareSignUp/bareSignUp.stories.tsx +159 -0
  26. package/lib/components/auth/signIn/README.md +53 -0
  27. package/lib/components/auth/signIn/signIn.stories.tsx +120 -0
  28. package/lib/components/auth/signUp/README.md +136 -0
  29. package/lib/components/auth/signUp/signUp.stories.tsx +193 -0
  30. package/lib/components/chart/README.md +13 -0
  31. package/lib/components/chart/areaChart/README.md +133 -0
  32. package/lib/components/chart/areaChart/areaChart.stories.tsx +199 -0
  33. package/lib/components/chart/barChart/README.md +193 -0
  34. package/lib/components/chart/barChart/barChart.stories.tsx +318 -0
  35. package/lib/components/chart/boxPlotChart/README.md +124 -0
  36. package/lib/components/chart/boxPlotChart/boxPlotChart.stories.tsx +104 -0
  37. package/lib/components/chart/bubbleChart/README.md +166 -0
  38. package/lib/components/chart/bubbleChart/bubbleChart.stories.tsx +144 -0
  39. package/lib/components/chart/card/README.md +107 -0
  40. package/lib/components/chart/card/card.stories.tsx +89 -0
  41. package/lib/components/chart/ganttChart/README.md +142 -0
  42. package/lib/components/chart/ganttChart/ganttChart.stories.tsx +138 -0
  43. package/lib/components/chart/heatmapChart/README.md +125 -0
  44. package/lib/components/chart/heatmapChart/heatmapChart.stories.tsx +106 -0
  45. package/lib/components/chart/lineChart/README.md +140 -0
  46. package/lib/components/chart/lineChart/lineChart.stories.tsx +152 -0
  47. package/lib/components/chart/pieChart/README.md +117 -0
  48. package/lib/components/chart/pieChart/pieChart.stories.tsx +180 -0
  49. package/lib/components/chart/polarAreaChart/README.md +126 -0
  50. package/lib/components/chart/polarAreaChart/polarAreaChart.stories.tsx +106 -0
  51. package/lib/components/chart/radarChart/README.md +57 -0
  52. package/lib/components/chart/radarChart/radarChart.stories.tsx +36 -0
  53. package/lib/components/chart/radialBar/README.md +152 -0
  54. package/lib/components/chart/radialBar/radialChart.stories.tsx +136 -0
  55. package/lib/components/chart/rangeBarChart/README.md +323 -0
  56. package/lib/components/chart/rangeBarChart/rangeBarChart.stories.tsx +208 -0
  57. package/lib/components/chart/statsCard/README.md +97 -0
  58. package/lib/components/chart/statsCard/statsCard.stories.tsx +183 -0
  59. package/lib/components/chart/treemapChart/README.md +142 -0
  60. package/lib/components/chart/treemapChart/treemapChart.stories.tsx +122 -0
  61. package/lib/components/chat/chatAnchor/README.md +113 -0
  62. package/lib/components/chat/chatAnchor/chatAnchor.stories.tsx +156 -0
  63. package/lib/components/chat/chatBase/README.md +223 -0
  64. package/lib/components/chat/chatBase/chatBase.stories.tsx +306 -0
  65. package/lib/components/chat/chatDashboard/README.md +161 -0
  66. package/lib/components/chat/chatDashboard/chatDashboard.stories.tsx +154 -0
  67. package/lib/components/data/dataGraph/README.md +13 -0
  68. package/lib/components/data/dataGraph/dataGraph.stories.tsx +84 -0
  69. package/lib/components/data/dataReference/README.md +62 -0
  70. package/lib/components/data/dataReference/dataReference.stories.tsx +53 -0
  71. package/lib/components/data/dataTemplate/README.md +903 -0
  72. package/lib/components/data/dataTemplate/dataModule.stories.tsx +196 -0
  73. package/lib/components/data/dataTemplate/dataTemplate.stories.tsx +337 -0
  74. package/lib/components/data/dataWrapper/README.md +1077 -0
  75. package/lib/components/data/dataWrapper/dataWrapper.stories.tsx +831 -0
  76. package/lib/components/data/queryForm/README.md +56 -0
  77. package/lib/components/data/queryForm/queryForm.stories.tsx +85 -0
  78. package/lib/components/data/readQuery/README.md +282 -0
  79. package/lib/components/data/readQuery/readQuery.stories.tsx +256 -0
  80. package/lib/components/data/readQueryHoc/README.md +89 -0
  81. package/lib/components/data/readQueryHoc/readQueryHoc.stories.tsx +33 -0
  82. package/lib/components/data/writeQuery/README.md +178 -0
  83. package/lib/components/data/writeQuery/writeQuery.stories.tsx +209 -0
  84. package/lib/components/design/actionSection/README.md +47 -0
  85. package/lib/components/design/actionSection/actionSection.stories.tsx +74 -0
  86. package/lib/components/design/banner/README.md +43 -0
  87. package/lib/components/design/banner/banner.stories.tsx +34 -0
  88. package/lib/components/design/bannerAction/README.md +44 -0
  89. package/lib/components/design/bannerAction/bannerAction.stories.tsx +25 -0
  90. package/lib/components/design/blogSection/README.md +111 -0
  91. package/lib/components/design/blogSection/blogSection.stories.tsx +72 -0
  92. package/lib/components/design/carouselSection/README.md +82 -0
  93. package/lib/components/design/carouselSection/carouselSection.stories.tsx +52 -0
  94. package/lib/components/design/designList/README.md +60 -0
  95. package/lib/components/design/designList/designList.stories.tsx +44 -0
  96. package/lib/components/design/faq/README.md +121 -0
  97. package/lib/components/design/faq/faq.stories.tsx +103 -0
  98. package/lib/components/design/fileGrid/README.md +87 -0
  99. package/lib/components/design/fileGrid/fileGrid.stories.tsx +110 -0
  100. package/lib/components/design/fileViewer/README.md +40 -0
  101. package/lib/components/design/fileViewer/fileViewer.stories.tsx +28 -0
  102. package/lib/components/design/footerSection/README.md +62 -0
  103. package/lib/components/design/footerSection/footerSection.stories.tsx +84 -0
  104. package/lib/components/design/googleReview/README.md +45 -0
  105. package/lib/components/design/googleReview/googleReview.stories.tsx +33 -0
  106. package/lib/components/design/heroSection/README.md +48 -0
  107. package/lib/components/design/heroSection/heroSection.stories.tsx +85 -0
  108. package/lib/components/design/iconList/README.md +60 -0
  109. package/lib/components/design/iconList/iconList.stories.tsx +41 -0
  110. package/lib/components/design/imageGallery/README.md +56 -0
  111. package/lib/components/design/imageGallery/imageGallery.stories.tsx +45 -0
  112. package/lib/components/design/imageZoom/README.md +47 -0
  113. package/lib/components/design/imageZoom/imageZoom.stories.tsx +30 -0
  114. package/lib/components/design/leftContent/README.md +47 -0
  115. package/lib/components/design/leftContent/leftContent.stories.tsx +32 -0
  116. package/lib/components/design/logoCloud/README.md +42 -0
  117. package/lib/components/design/logoCloud/logoCloud.stories.tsx +44 -0
  118. package/lib/components/design/onboarding/README.md +100 -0
  119. package/lib/components/design/onboarding/onboarding.stories.tsx +113 -0
  120. package/lib/components/design/pricing/README.md +112 -0
  121. package/lib/components/design/pricing/pricing.stories.tsx +86 -0
  122. package/lib/components/design/rightContent/README.md +47 -0
  123. package/lib/components/design/rightContent/rightContent.stories.tsx +32 -0
  124. package/lib/components/design/sectionList/README.md +51 -0
  125. package/lib/components/design/sectionList/sectionList.stories.tsx +35 -0
  126. package/lib/components/design/teams/README.md +62 -0
  127. package/lib/components/design/teams/teams.stories.tsx +61 -0
  128. package/lib/components/display/alert/README.md +82 -0
  129. package/lib/components/display/alert/alert.stories.tsx +71 -0
  130. package/lib/components/display/calendar/README.md +113 -0
  131. package/lib/components/display/calendar/calendar.stories.tsx +159 -0
  132. package/lib/components/display/clipboard/README.md +36 -0
  133. package/lib/components/display/clipboard/clipboard.stories.tsx +32 -0
  134. package/lib/components/display/detailList/README.md +61 -0
  135. package/lib/components/display/detailList/detailList.stories.tsx +131 -0
  136. package/lib/components/display/drawer/README.md +74 -0
  137. package/lib/components/display/drawer/drawer.stories.tsx +66 -0
  138. package/lib/components/display/emptyState/README.md +38 -0
  139. package/lib/components/display/emptyState/emptyState.stories.tsx +22 -0
  140. package/lib/components/display/feeds/README.md +80 -0
  141. package/lib/components/display/feeds/feeds.stories.tsx +75 -0
  142. package/lib/components/display/flexTable/README.md +160 -0
  143. package/lib/components/display/flexTable/flexTable.stories.tsx +313 -0
  144. package/lib/components/display/grid/README.md +121 -0
  145. package/lib/components/display/grid/grid.stories.tsx +234 -0
  146. package/lib/components/display/kanban/README.md +78 -0
  147. package/lib/components/display/kanban/kanban.stories.tsx +133 -0
  148. package/lib/components/display/list/README.md +109 -0
  149. package/lib/components/display/list/list.stories.tsx +188 -0
  150. package/lib/components/display/loading/README.md +25 -0
  151. package/lib/components/display/loading/loading.stories.tsx +15 -0
  152. package/lib/components/display/mapView/README.md +99 -0
  153. package/lib/components/display/mapView/mapView.stories.tsx +225 -0
  154. package/lib/components/display/modal/README.md +43 -0
  155. package/lib/components/display/modal/modal.stories.tsx +81 -0
  156. package/lib/components/display/notification/README.md +43 -0
  157. package/lib/components/display/notification/notification.stories.tsx +30 -0
  158. package/lib/components/display/progress/README.md +25 -0
  159. package/lib/components/display/progress/progress.stories.tsx +15 -0
  160. package/lib/components/display/stepper/README.md +96 -0
  161. package/lib/components/display/stepper/stepper.stories.tsx +175 -0
  162. package/lib/components/display/table/README.md +176 -0
  163. package/lib/components/display/table/table.stories.tsx +330 -0
  164. package/lib/components/display/tag/README.md +74 -0
  165. package/lib/components/display/tag/tag.stories.tsx +79 -0
  166. package/lib/components/input/address/README.md +132 -0
  167. package/lib/components/input/address/address.stories.tsx +147 -0
  168. package/lib/components/input/canvas/README.md +131 -0
  169. package/lib/components/input/canvas/canvas.stories.tsx +165 -0
  170. package/lib/components/input/checkbox/README.md +61 -0
  171. package/lib/components/input/checkbox/checkbox.stories.tsx +30 -0
  172. package/lib/components/input/datePicker/README.md +124 -0
  173. package/lib/components/input/datePicker/datePicker.stories.tsx +197 -0
  174. package/lib/components/input/form/README.md +55 -0
  175. package/lib/components/input/form/form.stories.tsx +143 -0
  176. package/lib/components/input/markdown/README.md +146 -0
  177. package/lib/components/input/markdown/markdown.stories.tsx +40 -0
  178. package/lib/components/input/monthYearPicker/README.md +69 -0
  179. package/lib/components/input/monthYearPicker/monthYearPicker.stories.tsx +47 -0
  180. package/lib/components/input/netPromoterScore/README.md +52 -0
  181. package/lib/components/input/netPromoterScore/netPromoterScore.stories.tsx +30 -0
  182. package/lib/components/input/rating/README.md +51 -0
  183. package/lib/components/input/rating/rating.stories.tsx +30 -0
  184. package/lib/components/input/select/README.md +108 -0
  185. package/lib/components/input/select/select.stories.tsx +286 -0
  186. package/lib/components/input/signature/README.md +106 -0
  187. package/lib/components/input/signature/signature.stories.tsx +188 -0
  188. package/lib/components/input/textArea/README.md +55 -0
  189. package/lib/components/input/textArea/textArea.stories.tsx +30 -0
  190. package/lib/components/input/textInput/README.md +81 -0
  191. package/lib/components/input/textInput/textinput.stories.tsx +231 -0
  192. package/lib/components/input/uploadInput/README.md +134 -0
  193. package/lib/components/input/uploadInput/uploadInput.stories.tsx +193 -0
  194. package/lib/components/navigation/bars/README.md +40 -0
  195. package/lib/components/navigation/bars/bars.stories.tsx +85 -0
  196. package/lib/components/navigation/bottomTab/README.md +53 -0
  197. package/lib/components/navigation/bottomTab/bottomTab.stories.tsx +32 -0
  198. package/lib/components/navigation/breadcrumb/README.md +48 -0
  199. package/lib/components/navigation/breadcrumb/breadcrumb.stories.tsx +27 -0
  200. package/lib/components/navigation/header/README.md +149 -0
  201. package/lib/components/navigation/header/header.stories.tsx +107 -0
  202. package/lib/components/navigation/leftNav/README.md +91 -0
  203. package/lib/components/navigation/leftNav/leftNav.stories.tsx +106 -0
  204. package/lib/components/navigation/tabs/README.md +75 -0
  205. package/lib/components/navigation/tabs/tabs.stories.tsx +60 -0
  206. package/lib/components/structure/column/README.md +40 -0
  207. package/lib/components/structure/column/column.stories.tsx +26 -0
  208. package/lib/components/structure/container/README.md +34 -0
  209. package/lib/components/structure/container/container.stories.tsx +19 -0
  210. package/lib/components/structure/link/README.md +55 -0
  211. package/lib/components/structure/link/link.stories.tsx +30 -0
  212. package/lib/components/structure/text/README.md +42 -0
  213. package/lib/components/structure/text/text.stories.tsx +39 -0
  214. package/lib/components/template/authPage/authPage.stories.tsx +68 -0
  215. package/lib/components/template/landingPage/landingPage.stories.tsx +288 -0
  216. package/lib/components/template/productListing/productListing.stories.tsx +297 -0
  217. package/lib/components/template/productOverview/productOverview.stories.tsx +194 -0
  218. package/lib/components/template/shoppingCart/shoppingCart.stories.tsx +252 -0
  219. package/lib/components/template/userHomePage/userHomePage.stories.tsx +605 -0
  220. package/lib/components/template/userRankingDashboard/userRankingDashboard.stories.tsx +481 -0
  221. package/lib/mcp/server.d.ts +2 -0
  222. package/lib/mcp/server.d.ts.map +1 -0
  223. package/lib/mcp/server.js +33 -0
  224. package/lib/mcp/server.js.map +1 -0
  225. package/lib/mcp/tools/getBackendComponent.d.ts +13 -0
  226. package/lib/mcp/tools/getBackendComponent.d.ts.map +1 -0
  227. package/lib/mcp/tools/getBackendComponent.js +119 -0
  228. package/lib/mcp/tools/getBackendComponent.js.map +1 -0
  229. package/lib/mcp/tools/getComponent.d.ts +17 -0
  230. package/lib/mcp/tools/getComponent.d.ts.map +1 -0
  231. package/lib/mcp/tools/getComponent.js +118 -0
  232. package/lib/mcp/tools/getComponent.js.map +1 -0
  233. package/lib/mcp/tools/listComponents.d.ts +13 -0
  234. package/lib/mcp/tools/listComponents.d.ts.map +1 -0
  235. package/lib/mcp/tools/listComponents.js +113 -0
  236. package/lib/mcp/tools/listComponents.js.map +1 -0
  237. package/lib/mcp/tools/listTemplates.d.ts +13 -0
  238. package/lib/mcp/tools/listTemplates.d.ts.map +1 -0
  239. package/lib/mcp/tools/listTemplates.js +68 -0
  240. package/lib/mcp/tools/listTemplates.js.map +1 -0
  241. package/lib/mcp/tools/suggestTemplate.d.ts +17 -0
  242. package/lib/mcp/tools/suggestTemplate.d.ts.map +1 -0
  243. package/lib/mcp/tools/suggestTemplate.js +212 -0
  244. package/lib/mcp/tools/suggestTemplate.js.map +1 -0
  245. package/package.json +23 -0
@@ -0,0 +1,903 @@
1
+ # Data Template
2
+
3
+ <!-- STORY -->
4
+
5
+ <hr>
6
+
7
+ A full-featured data management component that handles list, read, and update views with pagination, filtering, sorting, export, inline editing, and extensible bare/render settings.
8
+
9
+ `DataTemplate` is the right choice when you already have a **Space object** from the Blixify backend. The Space object carries the full schema, sort config, extended tabs, and additional queries — you pass it via the `space` prop and use `parseSpaceToDataStructure` to derive the `model`. This makes `DataTemplate` ideal for building dynamic, schema-driven dashboards where the structure is defined in the database rather than hardcoded in the app.
10
+
11
+ If you don't have a Space object and want to define the schema yourself, use `DataTemplateWrapper` instead — it removes most of the boilerplate and is the recommended starting point for custom integrations.
12
+
13
+ ### Import
14
+
15
+ ```js
16
+ import { DataTemplate } from "blixify-ui-web/data/dataTemplate";
17
+ ```
18
+
19
+ ---
20
+
21
+ ## How It Works
22
+
23
+ `DataTemplate` is driven by a single `type` prop that controls which view is rendered:
24
+
25
+ - `"list"` — renders the table/list/grid/kanban/calendar view with pagination, search, and filters
26
+ - `"read"` — renders the detail view for a single record (identified by `id`)
27
+ - `"update"` — renders the create/edit form (pass `id=""` or `id="new"` for create, or an existing record ID to edit)
28
+
29
+ Navigation between views is entirely controlled by your app. The component calls `organise.handleNavigate(type, selectedId?, viewId?)` whenever the user clicks a row, a breadcrumb, or a create button. You store `type`, `id`, and `viewId` in your own state and pass them back as props — the component re-renders into the new view.
30
+
31
+ ```
32
+ User clicks row → handleNavigate("read", "abc123") → setType("read"), setId("abc123")
33
+ User clicks Edit → handleNavigate("update", "abc123") → setType("update"), setId("abc123")
34
+ User clicks Back → handleNavigate("list") → setType("list"), setId("")
35
+ ```
36
+
37
+ The `model` prop defines the columns/fields. You can build it manually as a `DataStructure[]` array, or derive it from a Space object using the `parseSpaceToDataStructure` utility.
38
+
39
+ `devSettings` tells the component which backend to talk to. You can build it manually or derive it from a Workspace object using the `parseWorkspaceSettings` utility.
40
+
41
+ ---
42
+
43
+ ## Step-by-Step Setup
44
+
45
+ **1. Install peer dependencies**
46
+
47
+ ```bash
48
+ npm install axios @headlessui/react papaparse
49
+ ```
50
+
51
+ **2. Create a ref and state**
52
+
53
+ ```tsx
54
+ const dataTemplateRef = useRef<any>(null);
55
+ const [type, setType] = useState("list");
56
+ const [id, setId] = useState("");
57
+ const [viewId, setViewId] = useState("general");
58
+ ```
59
+
60
+ **3. Define your model**
61
+
62
+ ```tsx
63
+ const model: DataStructure[] = [
64
+ { id: "name", name: "Name", type: "string" },
65
+ {
66
+ id: "status",
67
+ name: "Status",
68
+ type: "list",
69
+ listSelection: ["active", "inactive"],
70
+ },
71
+ { id: "createdAt", name: "Created", type: "date" },
72
+ ];
73
+ ```
74
+
75
+ Or derive it from a Space object fetched from your backend:
76
+
77
+ ```tsx
78
+ import { parseSpaceToDataStructure } from "blixify-ui-web/data/utils";
79
+ const model = parseSpaceToDataStructure(spaceObject);
80
+ ```
81
+
82
+ **4. Configure devSettings**
83
+
84
+ ```tsx
85
+ const devSettings = {
86
+ server: "mongoServer",
87
+ dbEndpoint: "https://api.example.com/api/data",
88
+ dbAPIToken: "your-api-token",
89
+ dbUserToken: "",
90
+ schemaEndpoint: "https://api.example.com/api/schema",
91
+ imageEndpoint: "https://storage.example.com/o/",
92
+ };
93
+ ```
94
+
95
+ Or derive it from a Workspace object:
96
+
97
+ ```tsx
98
+ import { parseWorkspaceSettings } from "blixify-ui-web/data/utils";
99
+ const devSettings = parseWorkspaceSettings(
100
+ { dbEndpoint, imageEndpoint, uploadEndpoint },
101
+ workspaceObject
102
+ );
103
+ ```
104
+
105
+ **5. Wire navigation**
106
+
107
+ ```tsx
108
+ const handleNavigate = (
109
+ nextType: string,
110
+ selectedId?: string,
111
+ nextViewId?: string
112
+ ) => {
113
+ setType(nextType);
114
+ if (selectedId !== undefined) setId(selectedId);
115
+ if (nextViewId) setViewId(nextViewId);
116
+ };
117
+ ```
118
+
119
+ `handleNavigate` is just a callback — you're in full control of what happens inside it. Instead of updating local state you can navigate to a different route entirely:
120
+
121
+ ```tsx
122
+ const handleNavigate = (type: string, selectedId?: string) => {
123
+ if (type === "read" && selectedId) {
124
+ router.push(`/records/${selectedId}`); // React Router / Next.js
125
+ // or: window.location.href = `/records/${selectedId}`;
126
+ } else if (type === "update" && selectedId) {
127
+ router.push(`/records/${selectedId}/edit`);
128
+ } else {
129
+ setType("list");
130
+ setId("");
131
+ }
132
+ };
133
+ ```
134
+
135
+ **6. Render the component**
136
+
137
+ ```tsx
138
+ <DataTemplate
139
+ ref={dataTemplateRef}
140
+ title="Sites"
141
+ description="Manage your sites"
142
+ type={type}
143
+ id={id}
144
+ collectionId="sites"
145
+ model={model}
146
+ localURLEndpoint="https://dashboard.example.com"
147
+ devSettings={devSettings}
148
+ lib={{ axios, Menu, Transition, navigate: null, papaParser: Papa }}
149
+ organise={{ viewId, handleNavigate }}
150
+ />
151
+ ```
152
+
153
+ ---
154
+
155
+ ## Use Case Examples
156
+
157
+ ### Read-only list
158
+
159
+ No `edit` prop — hides all create/update/delete controls. Users can browse and search but cannot modify data.
160
+
161
+ ```tsx
162
+ <DataTemplate
163
+ title="Products"
164
+ description="Browse products"
165
+ type={type}
166
+ id={id}
167
+ collectionId="products"
168
+ model={model}
169
+ localURLEndpoint="https://dashboard.example.com"
170
+ devSettings={devSettings}
171
+ lib={{ axios, Menu, Transition, navigate: null }}
172
+ organise={{ handleNavigate }}
173
+ />
174
+ ```
175
+
176
+ ---
177
+
178
+ ### Full CRUD
179
+
180
+ Enable all editing features. `allEditable` turns on create, update, and delete in one flag.
181
+
182
+ ```tsx
183
+ <DataTemplate
184
+ ref={dataTemplateRef}
185
+ title="Orders"
186
+ description="Manage orders"
187
+ type={type}
188
+ id={id}
189
+ collectionId="orders"
190
+ model={model}
191
+ localURLEndpoint="https://dashboard.example.com"
192
+ devSettings={devSettings}
193
+ lib={{ axios, Menu, Transition, navigate: null, papaParser: Papa }}
194
+ edit={{
195
+ allEditable: true,
196
+ listEditable: true, // inline cell editing in table view
197
+ listAddable: true, // inline row creation in table view
198
+ deleteBtn: true,
199
+ }}
200
+ organise={{ handleNavigate }}
201
+ />
202
+ ```
203
+
204
+ ---
205
+
206
+ ### Calendar view
207
+
208
+ Set `organise.viewId="calendar"` and add an `extendedTabs` entry with `calendarSettings` pointing to your date columns.
209
+
210
+ ```tsx
211
+ <DataTemplate
212
+ title="Events"
213
+ description="Event calendar"
214
+ type={type}
215
+ id={id}
216
+ collectionId="events"
217
+ model={model}
218
+ localURLEndpoint="https://dashboard.example.com"
219
+ devSettings={devSettings}
220
+ lib={{ axios, Menu, Transition, navigate: null }}
221
+ organise={{
222
+ viewId: "calendar",
223
+ extendedTabs: [
224
+ {
225
+ name: "Calendar",
226
+ type: "list",
227
+ viewType: "calendar",
228
+ calendarSettings: {
229
+ title: "name", // column ID for event title
230
+ startDate: "startAt", // column ID for start date
231
+ endDate: "endAt", // column ID for end date
232
+ },
233
+ },
234
+ ],
235
+ handleNavigate,
236
+ }}
237
+ />
238
+ ```
239
+
240
+ ---
241
+
242
+ ### Grid view
243
+
244
+ Set `organise.viewId="grid"` (or add an `extendedTabs` entry with `viewType="grid"`) to render records as image cards. Use `bareSettings.bareListGridComponent` to fully customise each card, or use the built-in grid with `viewImage` pointing to an image column.
245
+
246
+ ```tsx
247
+ <DataTemplate
248
+ title="Products"
249
+ description="Browse products as cards"
250
+ type={type}
251
+ id={id}
252
+ collectionId="products"
253
+ model={model}
254
+ localURLEndpoint="https://dashboard.example.com"
255
+ devSettings={devSettings}
256
+ lib={{ axios, Menu, Transition, navigate: null }}
257
+ organise={{
258
+ viewId: "grid",
259
+ handleNavigate,
260
+ extendedTabs: [
261
+ {
262
+ name: "Grid",
263
+ type: "list",
264
+ viewType: "grid",
265
+ viewImage: "coverImage", // column ID of an image field
266
+ },
267
+ ],
268
+ }}
269
+ bareSettings={{
270
+ // Optional: fully replace the default grid card
271
+ bareListGridComponent: (rowData) => (
272
+ <div className="p-4 rounded-lg border border-gray-200">
273
+ <img
274
+ src={rowData.coverImage}
275
+ className="w-full h-32 object-cover rounded"
276
+ />
277
+ <p className="mt-2 font-medium">{rowData.name}</p>
278
+ <p className="text-sm text-gray-500">{rowData.price}</p>
279
+ </div>
280
+ ),
281
+ // Tags shown on the default grid card
282
+ bareListGridTags: (rowData) => [rowData.category, rowData.status],
283
+ // Ribbon text on the default grid card
284
+ bareListGridRibbonText: (rowData) =>
285
+ rowData.status === "new" ? "New" : "",
286
+ // Fallback when the image column is empty
287
+ bareListGridFallbackImg: () => "/placeholder.png",
288
+ }}
289
+ />
290
+ ```
291
+
292
+ ---
293
+
294
+ ### List view
295
+
296
+ Set `organise.viewId="list"` to render records as a vertical list instead of a table. Useful for content-heavy records where a table layout feels cramped. Use `bareSettings.bareListComponent` to fully replace the list UI with your own renderer.
297
+
298
+ ```tsx
299
+ <DataTemplate
300
+ title="Articles"
301
+ description="Browse articles"
302
+ type={type}
303
+ id={id}
304
+ collectionId="articles"
305
+ model={model}
306
+ localURLEndpoint="https://dashboard.example.com"
307
+ devSettings={devSettings}
308
+ lib={{ axios, Menu, Transition, navigate: null }}
309
+ organise={{
310
+ viewId: "list",
311
+ handleNavigate,
312
+ }}
313
+ bareSettings={{
314
+ // Optional: fully replace the list UI
315
+ bareListComponent: (data, prettierData, loading, pageIndex) => {
316
+ if (loading) return <div>Loading...</div>;
317
+ return (
318
+ <ul className="divide-y divide-gray-200">
319
+ {data.map((item) => (
320
+ <li key={item._id} className="py-4 flex gap-4">
321
+ <div>
322
+ <p className="font-medium">{item.title}</p>
323
+ <p className="text-sm text-gray-500">{item.summary}</p>
324
+ </div>
325
+ </li>
326
+ ))}
327
+ </ul>
328
+ );
329
+ },
330
+ }}
331
+ />
332
+ ```
333
+
334
+ ---
335
+
336
+ ### Kanban view
337
+
338
+ Set `viewType="kanban"` on an `extendedTabs` entry and configure `kanbanSettings` to define which column drives the board columns. `title` is the column ID shown on each card; `groupCluster` maps column names to the list-selection values that belong in that column.
339
+
340
+ ```tsx
341
+ <DataTemplate
342
+ title="Tasks"
343
+ description="Task board"
344
+ type={type}
345
+ id={id}
346
+ collectionId="tasks"
347
+ model={[
348
+ { id: "name", name: "Name", type: "string" },
349
+ { id: "assignee", name: "Assignee", type: "string" },
350
+ {
351
+ id: "status",
352
+ name: "Status",
353
+ type: "list",
354
+ listSelection: ["backlog", "in_progress", "review", "done"],
355
+ },
356
+ ]}
357
+ localURLEndpoint="https://dashboard.example.com"
358
+ devSettings={devSettings}
359
+ lib={{ axios, Menu, Transition, navigate: null }}
360
+ edit={{ allEditable: true }}
361
+ organise={{
362
+ viewId: "kanban",
363
+ handleNavigate,
364
+ extendedTabs: [
365
+ {
366
+ name: "Board",
367
+ type: "list",
368
+ viewType: "kanban",
369
+ kanbanSettings: {
370
+ title: "name", // column ID for card title
371
+ useColumnName: true, // show column name on cards
372
+ // groupCluster maps each board column to one or more list values
373
+ groupCluster: [
374
+ { Backlog: ["backlog"] },
375
+ { "In Progress": ["in_progress"] },
376
+ { Review: ["review"] },
377
+ { Done: ["done"] },
378
+ ],
379
+ },
380
+ },
381
+ ],
382
+ }}
383
+ />
384
+ ```
385
+
386
+ ---
387
+
388
+ ### With search and filter
389
+
390
+ Use `organise.additionalQuery` to add filter controls above the list. Each entry maps to a filter UI control.
391
+
392
+ ```tsx
393
+ <DataTemplate
394
+ title="Leads"
395
+ description="Filter leads by status and owner"
396
+ type={type}
397
+ id={id}
398
+ collectionId="leads"
399
+ model={model}
400
+ localURLEndpoint="https://dashboard.example.com"
401
+ devSettings={devSettings}
402
+ lib={{ axios, Menu, Transition, navigate: null }}
403
+ organise={{
404
+ additionalQuery: [
405
+ {
406
+ type: "list",
407
+ value: "status",
408
+ filterLabel: "Status",
409
+ options: ["new", "contacted", "closed"],
410
+ },
411
+ {
412
+ type: "reference",
413
+ value: "ownerId",
414
+ filterLabel: "Owner",
415
+ spaceId: "users",
416
+ label: "name",
417
+ },
418
+ ],
419
+ handleNavigate,
420
+ }}
421
+ />
422
+ ```
423
+
424
+ ---
425
+
426
+ ### With activity log (comments + audit trail)
427
+
428
+ Enable `edit.activityLog` to show a comments panel and a change-log timeline in the read view.
429
+
430
+ ```tsx
431
+ <DataTemplate
432
+ title="Tickets"
433
+ description="Support tickets"
434
+ type={type}
435
+ id={id}
436
+ collectionId="tickets"
437
+ model={model}
438
+ localURLEndpoint="https://dashboard.example.com"
439
+ devSettings={devSettings}
440
+ lib={{ axios, Menu, Transition, navigate: null }}
441
+ edit={{
442
+ allEditable: true,
443
+ activityLog: {
444
+ enableComments: true,
445
+ commentCollectionId: "tickets-comments",
446
+ enableLogs: true,
447
+ logsCollectionId: "tickets-logs",
448
+ userAPIEndpoint: "https://api.example.com/api/data/users",
449
+ currentUserId: currentUser.id,
450
+ },
451
+ }}
452
+ organise={{ handleNavigate }}
453
+ />
454
+ ```
455
+
456
+ ---
457
+
458
+ ### Export PDF from read view
459
+
460
+ Enable `organise.exportSettings.enableExportReadPDF` to add a PDF export button in the read view toolbar. You can also trigger it programmatically via `ref.handleExportReadPDF()`.
461
+
462
+ ```tsx
463
+ <DataTemplate
464
+ ref={dataTemplateRef}
465
+ title="Reports"
466
+ description="View and export reports"
467
+ type={type}
468
+ id={id}
469
+ collectionId="reports"
470
+ model={model}
471
+ localURLEndpoint="https://dashboard.example.com"
472
+ devSettings={devSettings}
473
+ lib={{ axios, Menu, Transition, navigate: null }}
474
+ organise={{
475
+ handleNavigate,
476
+ exportSettings: {
477
+ // ── Read-view PDF ─────────────────────────────────────────────────────
478
+ enableExportReadPDF: true, // show PDF export button in read view toolbar
479
+ defaultExportPDFName: "report", // default filename (no extension)
480
+ onExportReadPDFBlob: (blob) => uploadPDF(blob), // callback with the generated PDF blob
481
+
482
+ // ── PDF header (first page only) ──────────────────────────────────────
483
+ exportReadPDFHeader: {
484
+ text: {
485
+ value: "Acme Corp — Confidential",
486
+ alignment: "left", // "left" | "center" | "right"
487
+ x: 10, // x position in mm (optional)
488
+ y: 10, // y position in mm (optional)
489
+ },
490
+ image: {
491
+ src: logoUrl, // URL or imported image asset
492
+ width: 40, // width in mm
493
+ height: 15, // height in mm
494
+ alignment: "right", // "left" | "center" | "right"
495
+ x: 160, // x position in mm (optional)
496
+ y: 8, // y position in mm (optional)
497
+ },
498
+ },
499
+
500
+ // ── Page dimensions & capture ─────────────────────────────────────────
501
+ exportReadPDFDimensions: {
502
+ pageSize: "a4", // "a4" | "a3" | "letter" | "legal" | "custom"
503
+ orientation: "p", // "p" portrait | "l" landscape
504
+ // width: 210, // custom page width in mm (pageSize="custom" only)
505
+ // height: 297, // custom page height in mm (pageSize="custom" only)
506
+ useElementDimensions: false, // use element's actual size instead of pageSize
507
+ scale: 2, // html2canvas scale — higher = sharper, larger file
508
+ margin: 10, // page margin in mm
509
+ forceDesktopView: true, // simulate desktop viewport during capture
510
+ captureWidth: 1440, // simulated viewport width in px
511
+ captureHeight: 900, // simulated viewport height in px (omit to auto-expand)
512
+ },
513
+
514
+ // ── List-view export controls ─────────────────────────────────────────
515
+ columnIds: ["name", "status", "createdAt"], // columns to include (omit = all)
516
+ csvHeaderUseName: true, // use column name instead of id as CSV header
517
+ dateFormatString: "DD/MM/YYYY", // date format in exported documents
518
+ sumColumnId: ["amount", "quantity"], // columns to sum in export footer
519
+ sort: { sortId: "createdAt", type: "desc" }, // sort applied to exported data
520
+ excludeDataId: true, // exclude record _id from exports
521
+ excludeReferenceId: true, // exclude reference _id from exports
522
+ excludeSecondaryLabel: false, // exclude reference secondary label
523
+ disableEmail: false, // disable email-export feature
524
+ hideExportCSV: false, // hide Export CSV option
525
+ hideImportCSV: false, // hide Import CSV option
526
+ hideExportExcel: false, // hide Export Excel option
527
+ hideExportPDF: false, // hide list-view PDF export (not read-view)
528
+ hideExportPrint: false, // hide Print option
529
+ hideExportQR: false, // hide Export QR option
530
+ hideExportDraft: false, // hide Filter Draft option
531
+ hideSubItems: false, // hide nested rows in exports
532
+ },
533
+ }}
534
+ />
535
+ ```
536
+
537
+ ---
538
+
539
+ ## Utility Functions
540
+
541
+ ### `parseSpaceToDataStructure(space: Space): DataStructure[]`
542
+
543
+ Converts a Space object (fetched from your backend) into the `model` array that `DataTemplate` expects. It maps all field types and their sub-settings (reference queries, list selections, image upload config, etc.) automatically.
544
+
545
+ ```tsx
546
+ import { parseSpaceToDataStructure } from "blixify-ui-web/data/utils";
547
+
548
+ const space = await fetchSpace(collectionId);
549
+ const model = parseSpaceToDataStructure(space);
550
+ ```
551
+
552
+ ### `parseWorkspaceSettings(defaultEndpoint, workspace?): DevSettings`
553
+
554
+ Builds a `DevSettings` object from a Workspace record. It maps `apiEndpointType` → `server`, `apiEndpoint` → `dbEndpoint`, `assetEndpoint` → `imageEndpoint`, and so on. Pass your fallback endpoints as the first argument; the workspace values override them when present.
555
+
556
+ ```tsx
557
+ import { parseWorkspaceSettings } from "blixify-ui-web/data/utils";
558
+
559
+ const devSettings = parseWorkspaceSettings(
560
+ {
561
+ dbEndpoint: process.env.DB_ENDPOINT,
562
+ imageEndpoint: process.env.IMAGE_ENDPOINT,
563
+ uploadEndpoint: process.env.UPLOAD_ENDPOINT,
564
+ },
565
+ workspaceObject // optional — overrides defaults when provided
566
+ );
567
+ ```
568
+
569
+ ---
570
+
571
+ ### Ref Methods
572
+
573
+ | Method | Description |
574
+ | ---------------------------------- | ----------------------------------------------------------------- |
575
+ | `handleRefresh()` | Re-fetches the current list data |
576
+ | `handleFormSubmit()` | Programmatically submits the update/create form |
577
+ | `handleFormCheck()` | Validates the form without submitting |
578
+ | `handlePopUpModal()` | Opens the create/update modal |
579
+ | `handleDeleteModal()` | Opens the delete confirmation modal |
580
+ | `handleUpdateSelectedData(fields)` | Prefills form fields. `fields` is `{ key: string; value: any }[]` |
581
+ | `handleExportReadPDF()` | Triggers a PDF export of the current read view |
582
+ | `handleUploadOfflineData()` | Uploads any locally cached offline data |
583
+
584
+ ### Required props
585
+
586
+ | Name | Type | Description |
587
+ | ------------------ | ------------------------------ | --------------------------------------------------------- |
588
+ | `title` | `string \| ReactElement` | Title shown in the header |
589
+ | `description` | `string \| ReactElement` | Description shown below the title |
590
+ | `collectionId` | `string` | Database collection / space ID |
591
+ | `type` | `"read" \| "update" \| "list"` | Current view mode |
592
+ | `model` | `DataStructure[]` | Column/field definitions — see DataStructure below |
593
+ | `localURLEndpoint` | `string` | Base URL of the dashboard (used for breadcrumb links) |
594
+ | `devSettings` | `DevSettings` | Server and endpoint configuration — see DevSettings below |
595
+
596
+ ### Optional props
597
+
598
+ | Name | Type | Default | Description |
599
+ | ---------------- | --------------------------------------- | ------- | -------------------------------------------------------------------------------------------------------- |
600
+ | `id` | `string` | `""` | Selected record ID. Pass `"new"` to open a blank create form |
601
+ | `limit` | `number` | `10` | Records per page in list view |
602
+ | `space` | `Space` | — | Full Space object from Blixify Space — enables extended features like tabs, sort, and additional queries |
603
+ | `edit` | `Edit` | — | Controls create/update/delete permissions — see Edit below |
604
+ | `organise` | `Organise` | — | Controls view, sort, filter, tabs, export, and navigation — see Organise below |
605
+ | `bareSettings` | `BareSettings` | — | Injects custom React components and callbacks into list/read/update views — see BareSettings below |
606
+ | `renderSettings` | `RenderSettings` | — | Overrides the entire list UI or loading UI with custom renderers |
607
+ | `roles` | `string[]` | — | Role strings (reserved for future permission checks) |
608
+ | `darkMode` | `boolean` | — | Applies dark colour scheme |
609
+ | `uniqueLabel` | `string` | — | Unique label appended to internal query keys to avoid collisions |
610
+ | `groupId` | `string` | — | Groups list results by this field. Grouped items are returned with a `children` array |
611
+ | `defaultTab` | `any` | — | Pre-selects a tab on mount |
612
+ | `workspaceId` | `string` | — | Workspace ID (used for workspace-scoped operations) |
613
+ | `newTabUrl` | `{ default?: string; addons?: string }` | — | URL config for row links. `default` is the base URL; `addons` is appended after the record id |
614
+ | `lib` | `LibSettings` | — | External library instances — see lib below |
615
+ | `linkProps` | `LinkProps` | — | Refer to Link component documentation |
616
+ | `onComplete` | `(id: string) => void` | — | Called after a create/update operation completes |
617
+ | `onLoadIframe` | `() => void` | — | Called when an iframe tab finishes loading |
618
+
619
+ ### lib
620
+
621
+ | Name | Type | Description |
622
+ | ---------------- | ----- | -------------------------------------------------------------- |
623
+ | `axios` | `any` | Axios instance for HTTP requests |
624
+ | `firebase` | `any` | Firebase app instance (required when `server="firebase"`) |
625
+ | `navigate` | `any` | Router navigate function (e.g. React Router's `useNavigate`) |
626
+ | `navigateNext` | `any` | Secondary navigate function |
627
+ | `Menu` | `any` | Headless UI `Menu` component — required |
628
+ | `Transition` | `any` | Headless UI `Transition` component — required |
629
+ | `papaParser` | `any` | PapaParse instance — required for CSV import/export |
630
+ | `storage` | `any` | Firebase Storage instance (Firebase client mode only) |
631
+ | `ref` | `any` | Firebase `ref` function (Firebase client mode only) |
632
+ | `uploadBytes` | `any` | Firebase `uploadBytes` function (Firebase client mode only) |
633
+ | `getDownloadURL` | `any` | Firebase `getDownloadURL` function (Firebase client mode only) |
634
+
635
+ ### DevSettings
636
+
637
+ | Name | Type | Description |
638
+ | --------------------- | ------------------------------------------------------------- | --------------------------------------------------------- |
639
+ | `server` | `"mongoServer" \| "fbServer" \| "firebase" \| "mondayServer"` | Database server type |
640
+ | `dbEndpoint` | `string` | Database API base URL |
641
+ | `dbAPIToken` | `string` | API token for database requests |
642
+ | `dbUserToken` | `string` | Per-user auth token (pass `""` if not used) |
643
+ | `schemaEndpoint` | `string` | Schema API endpoint URL |
644
+ | `schemaEndpointToken` | `string` | Optional token for schema endpoint |
645
+ | `schemaReference` | `{ [key: string]: DataStructure[] }` | Hardcoded schema reference (bypasses schema endpoint) |
646
+ | `imageEndpoint` | `string` | Asset retrieval base URL |
647
+ | `uploadEndpoint` | `string` | Upload endpoint (required when `imageEndpoint` is custom) |
648
+ | `bucketName` | `string` | Storage bucket name (required for AWS/GCS) |
649
+ | `maxFileSize` | `number` | Global max file size in MB for uploads |
650
+ | `organisationMembers` | `Option[]` | Member list used for `person` / `listPerson` field types |
651
+ | `roleOptions` | `Option[]` | Role list used for `roles` field type |
652
+ | `currentUser` | `{ userEmail: string; userName: string }` | Current user info used for export email and QR features |
653
+ | `importEndpoint` | `string` | Firebase CSV import function URL |
654
+ | `functionEndpoint` | `string` | Firebase export/function URL |
655
+
656
+ ### Edit
657
+
658
+ | Name | Type | Description |
659
+ | ----------------------- | ------------- | -------------------------------------------------------- |
660
+ | `allEditable` | `boolean` | Enables add, update, and delete |
661
+ | `listAddable` | `boolean` | Enables adding rows inline in list view |
662
+ | `listEditable` | `boolean` | Enables inline cell editing in list view |
663
+ | `createBtn` | `boolean` | Shows a create button even when `allEditable` is `false` |
664
+ | `deleteBtn` | `boolean` | Enables delete and batch delete |
665
+ | `disabledUpdate` | `boolean` | Disables update and batch update |
666
+ | `disableBatchUpdate` | `boolean` | Disables batch update only |
667
+ | `enableUpdateDraft` | `boolean` | Enables save-as-draft on the update form |
668
+ | `disabledTabsDeleteBtn` | `boolean` | Disables the delete button inside extended tabs |
669
+ | `activityLog` | `ActivityLog` | See ActivityLog below |
670
+
671
+ ### ActivityLog
672
+
673
+ | Name | Type | Description |
674
+ | --------------------- | --------- | ------------------------------------------------------------------------------------------------- |
675
+ | `enableComments` | `boolean` | Enables create/update/delete comments |
676
+ | `commentCollectionId` | `string` | Collection ID for comments |
677
+ | `commentQuery` | `Query[]` | Additional queries to filter comments |
678
+ | `enableLogs` | `boolean` | Displays create/update/delete logs in list and read views |
679
+ | `logsCollectionId` | `string` | Collection ID for logs |
680
+ | `logQuery` | `Query[]` | Additional queries to filter logs |
681
+ | `userAPIEndpoint` | `string` | URL returning `{ data: { name: string, ...rest } }` — used to resolve user names in comments/logs |
682
+ | `currentUserId` | `string` | Current user's record ID — required when `enableComments` is `true` |
683
+
684
+ ### Organise
685
+
686
+ | Name | Type | Description |
687
+ | ----------------------------- | --------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
688
+ | `sort` | `Sort` | Default sort applied to list queries |
689
+ | `pageIndex` | `number` | Initial page index |
690
+ | `viewId` | `string` | Active view type: `"general"`, `"calendar"`, `"grid"`, `"list"`, `"feeds"`, `"kanban"`, etc. |
691
+ | `idField` | `string` | DataStructure column ID whose value becomes the new record's ID on creation |
692
+ | `extendedTabs` | `ExtendedTabs[]` | Additional tabs rendered alongside the main view — see Extended Tab below |
693
+ | `additionalQuery` | `AdditionalQuery[]` | Filter/search controls rendered above the list — see Additional Query below |
694
+ | `darkMode` | `boolean` | Applies dark colour scheme to the organise bar |
695
+ | `hideSearch` | `boolean` | Hides the search input |
696
+ | `hidePagination` | `boolean` | Hides pagination on Table, List, Grid, and Feeds views |
697
+ | `hideNewTabs` | `boolean` | Hides the new-tab creation button |
698
+ | `splitView` | `boolean` | Renders a split list/detail layout in read mode |
699
+ | `listObjectTableView` | `boolean` | Shows list objects in table view during read and update |
700
+ | `disableMulti` | `boolean` | Disables multi-row selection |
701
+ | `disableSelectFullData` | `{ table?: boolean; list?: boolean }` | Disables "select all pages" for table and/or list views |
702
+ | `disabledOnEnter` | `boolean` | Prevents Enter key from submitting forms |
703
+ | `breadcrumbType` | `"button" \| "hidden"` | `"button"` shows a back button; `"hidden"` hides the breadcrumb entirely |
704
+ | `breadcrumbAttributeId` | `string` | Column ID whose value is used as the breadcrumb label in read view |
705
+ | `tabAlign` | `"top" \| "left" \| "stepper"` | Tab layout direction |
706
+ | `groupRead` | `"groupId"` | Groups and separates read view sections by DataStructure `groupId` |
707
+ | `showCollapsibleTab` | `boolean` | Renders tabs as collapsible sections |
708
+ | `showBaseUpdatedAt` | `boolean` | Shows the `baseUpdatedAt` timestamp in Table, Grid, List, and Kanban views |
709
+ | `showGroupByFeature` | `boolean` | Shows the group-by selector in the toolbar |
710
+ | `showReadFloatingNav` | `boolean` | Shows a floating section navigator in read view |
711
+ | `showExport` | `boolean` | Shows import/export options (default `true`) |
712
+ | `disableEllipsisOnLongWord` | `boolean` | Wraps long text instead of truncating with ellipsis |
713
+ | `fixedPagination` | `boolean` | Fixes the pagination bar to the bottom of the viewport |
714
+ | `filterComponentNewRow` | `boolean` | Renders each filter component on its own row |
715
+ | `addColumnEnabled` | `boolean` | Shows an add-column button in the table header |
716
+ | `advSortEnabled` | `boolean` | Shows advanced sort controls |
717
+ | `advFilterEnabled` | `boolean` | Shows advanced filter controls |
718
+ | `advDragEnabled` | `boolean` | Enables drag-to-reorder columns |
719
+ | `groupBy` | `string` | Column ID to group list results by |
720
+ | `groupIdCollapsible` | `{ [key: string]: boolean }` | Initial collapsed/expanded state per group ID |
721
+ | `sortGroupByAlphabetically` | `boolean` | Sorts group-by values alphabetically |
722
+ | `unionCollections` | `any[]` | Additional collections to union-query alongside the main collection |
723
+ | `moreSettings` | `{ text: string; onClick: () => void }[]` | Extra items appended to the "more" dropdown menu |
724
+ | `exportSettings` | `ExportSettings` | See Export Settings below |
725
+ | `onChangeSort` | `(value: Sort) => void` | Called when the user changes the sort |
726
+ | `onChangeFilter` | `(value: AdditionalQuery[]) => void` | Called when the user changes filters |
727
+ | `onChangeHide` | `(value: DataStructure[]) => void` | Called when the user hides/shows columns |
728
+ | `onChangeDrag` | `(dragId: string, dropId: string, newHeader: TableHeader[]) => void` | Called after a column is reordered |
729
+ | `onChangeTabs` | `(value: ExtendedTabs[]) => void` | Called when tabs are added/removed/reordered |
730
+ | `onChangePagination` | `(page: number) => void` | Called when the page changes |
731
+ | `onAddColumns` | `(model: DataStructure[]) => void` | Called when a new column is added |
732
+ | `handleNavigate` | `(type: string, selectedId?: string, viewId?: string) => void` | Called when the component needs to navigate (e.g. row click → read view) |
733
+ | `handleCustomDownloadFile` | `(url: string, fileName?: string) => void` | Overrides the default file download behaviour |
734
+ | `renderReferenceLabelOptions` | `(spaceId?: string, includeReference?: boolean, type?: string) => Option[]` | Returns column options for reference label selectors |
735
+ | `renderReferenceSpaceOptions` | `() => Option[]` | Returns space options for reference space selectors |
736
+ | `renderGroupByOptions` | `() => Option[]` | Returns custom options for the group-by selector |
737
+
738
+ ### Export Settings
739
+
740
+ | Name | Type | Description |
741
+ | ------------------------- | ---------------------- | -------------------------------------------------------------------------------- |
742
+ | `dateFormatString` | `string` | Date format string for exported documents |
743
+ | `disableEmail` | `boolean` | Disables email functionality for exports |
744
+ | `excludeReferenceId` | `boolean` | Excludes reference `_id` from exported documents |
745
+ | `excludeSecondaryLabel` | `boolean` | Excludes reference secondary label from exported documents |
746
+ | `csvHeaderUseName` | `boolean` | Uses DataStructure `name` instead of `id` for CSV/Excel headers |
747
+ | `excludeDataId` | `boolean` | Excludes record `_id` from exported documents |
748
+ | `columnIds` | `string[]` | DataStructure IDs to include in exports (all columns if omitted) |
749
+ | `defaultExportPDFName` | `string` | Default filename for exported PDFs |
750
+ | `sumColumnId` | `string[]` | Column IDs to sum in exported documents |
751
+ | `generateBy` | `string` | Specifies how the export is generated |
752
+ | `sort` | `Sort` | Sort applied to exported data |
753
+ | `hideSubItems` | `boolean` | Hides sub-items in exported documents |
754
+ | `hideExportCSV` | `boolean` | Hides the Export CSV option |
755
+ | `hideImportCSV` | `boolean` | Hides the Import CSV option |
756
+ | `hideExportExcel` | `boolean` | Hides the Export Excel option |
757
+ | `hideExportPDF` | `boolean` | Hides the Export PDF option |
758
+ | `hideExportPrint` | `boolean` | Hides the Print option |
759
+ | `hideExportQR` | `boolean` | Hides the Export QR option |
760
+ | `hideExportDraft` | `boolean` | Hides the Filter Draft option |
761
+ | `enableExportReadPDF` | `boolean` | Enables PDF export from read view |
762
+ | `exportReadPDFHeader` | `PDFHeaderConfig` | Header config for read-view PDF export — see PDFHeaderConfig below |
763
+ | `exportReadPDFDimensions` | `PDFDimensionsConfig` | Page/capture dimensions for read-view PDF export — see PDFDimensionsConfig below |
764
+ | `onExportReadPDFBlob` | `(blob: Blob) => void` | Callback receiving the PDF blob after export |
765
+
766
+ ### PDFHeaderConfig
767
+
768
+ | Name | Type | Description |
769
+ | ------- | --------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
770
+ | `text` | `{ value: string; x?: number; y?: number; alignment?: "left" \| "center" \| "right" }` | Text shown in the PDF header (first page only). `x`/`y` are positions in mm |
771
+ | `image` | `{ src: string; x?: number; y?: number; width?: number; height?: number; alignment?: "left" \| "center" \| "right" }` | Image shown in the PDF header (first page only). `src` can be a URL or imported image. `width`/`height` are in mm |
772
+
773
+ ### PDFDimensionsConfig
774
+
775
+ | Name | Type | Description |
776
+ | ---------------------- | ------------------------------------------------- | ------------------------------------------------------------------ |
777
+ | `pageSize` | `"a4" \| "a3" \| "letter" \| "legal" \| "custom"` | Page size preset |
778
+ | `orientation` | `"p" \| "l"` | Portrait or landscape |
779
+ | `width` | `number` | Custom page width in mm (when `pageSize="custom"`) |
780
+ | `height` | `number` | Custom page height in mm (when `pageSize="custom"`) |
781
+ | `useElementDimensions` | `boolean` | Uses the element's actual dimensions instead of a page size preset |
782
+ | `scale` | `number` | html2canvas scale factor (higher = better quality, larger file) |
783
+ | `margin` | `number` | Page margin in mm |
784
+ | `forceDesktopView` | `boolean` | Captures as if on a desktop viewport |
785
+ | `captureWidth` | `number` | Simulated desktop capture width in pixels |
786
+ | `captureHeight` | `number` | Simulated desktop capture height in pixels |
787
+
788
+ ### BareSettings
789
+
790
+ Injects custom React components and callbacks into the list, read, and update views.
791
+
792
+ | Name | Type | Description |
793
+ | ---------------------------------------- | ------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
794
+ | `bareReadComponent` | `(data: any) => any` | Custom component rendered in read view |
795
+ | `bareReadComponentPos` | `"top"` | Renders `bareReadComponent` above the default read content |
796
+ | `bareReadComponentHide` | `boolean` | Hides the default read content (shows only `bareReadComponent`) |
797
+ | `bareReadReferenceView` | `(dataId, collectionId, attributeId) => boolean \| void` | Controls whether a reference field opens a view |
798
+ | `bareReadDescription` | `(key: string, value: any) => any` | Custom renderer for read view field values |
799
+ | `bareReadHandleData` | `(data: any) => void` | Called when read view data is loaded |
800
+ | `bareReadListTabs` | `boolean` | Shows list-style tabs in read view |
801
+ | `bareListComponent` | `(data, prettierData, loading, pageIndex) => any` | Fully replaces the list UI with a custom component |
802
+ | `bareListActionBtns` | `(data: any) => ReactElement[]` | Extra icon buttons rendered on each list row |
803
+ | `bareListMultipleSelectAddtionalActions` | `{ text: string; className?: string; onClick: (ids, selectAll, query) => void }[]` | Extra bulk-action buttons shown when rows are selected |
804
+ | `bareListGridComponent` | `(data: any) => any` | Custom card renderer for grid view |
805
+ | `bareListGridColClassName` | `string` | Tailwind class for grid column width |
806
+ | `bareListGridTags` | `(data: any) => string[]` | Returns tag strings shown on grid cards |
807
+ | `bareListGridFallbackImg` | `(data: any) => string \| ReactElement` | Fallback image/element for grid cards without an image |
808
+ | `bareListGridRibbonText` | `(data: any) => string` | Text shown as a ribbon on grid cards |
809
+ | `bareListHandleData` | `(data, prettierData) => void` | Called when list data is loaded |
810
+ | `bareListHandleSelection` | `(selectAll, selectedIds, query?) => void` | Called when row selection changes |
811
+ | `bareListHandleFilter` | `(search, select, date, reference) => void` | Called when any filter changes |
812
+ | `bareListFilterSelected` | `(filterSearchParams, filterSelection, filterReference, filterReferenceDate) => void` | Called with the current filter state whenever it changes |
813
+ | `bareListDescription` | `(key: string, value: any) => any` | Custom renderer for list view field values |
814
+ | `bareListFilterQuery` | `Query[]` | Additional queries always applied to list fetches |
815
+ | `bareListFilterAddComponent` | `ReactElement[]` | Extra filter components rendered in the filter bar |
816
+ | `bareListPipeline` | `PipeLine[]` | Additional pipeline stages appended to list queries |
817
+ | `bareListObjectHandleData` | `(type: "read" \| "update" \| "new", data: any) => void` | Called when a list-object row is opened |
818
+ | `bareUpdatePrefill` | `(data: any) => { key: string; value: any }[]` | Returns prefill values for the update form based on existing data |
819
+ | `bareUpdateComponent` | `(data: any) => any` | Custom component rendered inside the update form |
820
+ | `bareUpdateComponentAbove` | `boolean` | Renders `bareUpdateComponent` above the default form fields |
821
+ | `bareUpdateActionComponent` | `(data: any, formRef?: any) => any` | Custom action buttons rendered in the update form footer |
822
+ | `bareUpdateHandleData` | `(data: any, changedAttributeIds?: string[]) => void` | Called on every form field change with the current data and changed field IDs |
823
+ | `bareUpdateHandlePreComplete` | `(data: any) => Promise<boolean>` | Called before save — return `false` to cancel |
824
+ | `bareUpdateHandleComplete` | `(data: any) => Promise<any>` | Called after save completes |
825
+ | `bareUpdateHandlePostComplete` | `(data: any) => Promise<any>` | Called after post-save operations complete |
826
+ | `bareUpdateColumnType` | `"one" \| "two" \| "four"` | Form column layout: `"one"` = 2-col grid, `"two"` = 4-col grid (default), `"four"` = 4-col grid |
827
+ | `bareUpdateTabComponent` | `(tabIds: string[]) => { tabId: string; icon?: ReactElement; skip?: boolean }[]` | Custom icons/skip flags for form tabs |
828
+ | `bareUpdateActionBottom` | `boolean` | Renders action buttons at the bottom of the form |
829
+ | `bareUpdateTabId` | `(tabId: string) => void` | Called when the active form tab changes |
830
+ | `bareUpdateIndividualComponent` | `(columnId, ref, selectedData, setSelectedData) => ReactElement \| null` | Replaces a specific form field with a custom component |
831
+ | `bareUpdateMobileView` | `boolean` | Renders the update form in mobile-optimised layout |
832
+ | `bareOffline` | `boolean` | Enables offline data caching via IndexedDB |
833
+ | `bareCSVImportEndpoint` | `string` | Custom CSV import endpoint |
834
+ | `bareCSVExportEndpoint` | `string` | Custom CSV export endpoint |
835
+ | `bareHideTableExtraMultipleAction` | `boolean` | Hides the extra multiple-action button in table view |
836
+
837
+ ### Extended Tab
838
+
839
+ | Name | Type | Description |
840
+ | ------------------ | ------------------------------------------------------------------- | ----------------------------------------------------------- |
841
+ | `name` | `string` | Tab label |
842
+ | `type` | `"read" \| "list"` | `"list"` shows all data; `"read"` shows the selected record |
843
+ | `viewType` | `"grid" \| "list" \| "iframe" \| "calendar" \| "feeds" \| "kanban"` | View layout for this tab |
844
+ | `viewImage` | `string` | Column ID of an `image` field to display in grid/list view |
845
+ | `src` | `string` | URL for iframe tabs |
846
+ | `calendarSettings` | `CalendarSettings` | See Calendar Settings below |
847
+ | `feedsSettings` | `FeedsSettings` | See Feeds Settings below |
848
+ | `kanbanSettings` | `KanbanSettings` | See Kanban Settings below |
849
+
850
+ ### Additional Query
851
+
852
+ | Name | Type | Description |
853
+ | -------------------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------- |
854
+ | `type` | `"search" \| "reference" \| "listReference" \| "list" \| "range" \| "person"` | Filter type |
855
+ | `value` | `string` | Column ID to filter on |
856
+ | `defaultValue` | `any` | Initial filter value |
857
+ | `filterLabel` | `string` | Overrides the filter control label |
858
+ | `options` | `string[]` | Option list for `type="list"` |
859
+ | `spaceId` | `string` | Space ID for `type="reference"` |
860
+ | `label` | `string` | Reference label for `type="reference"` |
861
+ | `referenceQuery` | `Query[]` | Additional queries for `type="reference"` |
862
+ | `selectInputCloseOnClickOutside` | `boolean` | Refer to Select component's `closeOnClickOutside` |
863
+
864
+ ### Calendar Settings
865
+
866
+ | Name | Type | Description |
867
+ | ------------------ | -------------------- | ---------------------------------------------------------------- |
868
+ | `title` | `string` | Column ID for event title |
869
+ | `startDate` | `string` | Column ID for event start date |
870
+ | `endDate` | `string` | Column ID for event end date |
871
+ | `defaultStartDate` | `Date` | Default calendar start date |
872
+ | `customView` | `CalendarCustomView` | Custom calendar view config |
873
+ | `groupId` | `string` | Column ID — events with the same value share a background colour |
874
+ | `groupColor` | `Color[]` | Background colours for groups |
875
+ | `customHeader` | `string` | Custom title replacing the default calendar header |
876
+
877
+ ### Feeds Settings
878
+
879
+ | Name | Type | Description |
880
+ | ----------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
881
+ | `title` | `string` | Column ID for feed item title |
882
+ | `content` | `string` | Column ID for feed item content |
883
+ | `desc` | `string` | Column ID for the right-corner element |
884
+ | `icon` | `string` | Heroicon name e.g. `"HeartIcon"` |
885
+ | `iconClass` | `string` | Tailwind class for the icon |
886
+ | `customFeedsData` | `(data, prettierData) => { id, title, content, desc, iconClass, icon }[]` | Fully custom feed data renderer. When provided and non-empty, overrides `title`/`desc` |
887
+
888
+ ### Kanban Settings
889
+
890
+ | Name | Type | Description |
891
+ | --------------- | ----------------------------- | ------------------------------------------------------ |
892
+ | `title` | `string` | Column ID for kanban card title |
893
+ | `groupCluster` | `{ [key: string]: string }[]` | Group cluster config for kanban columns |
894
+ | `useColumnName` | `boolean` | Shows column name instead of column ID on cards |
895
+ | `query` | `Query[]` | Additional queries to filter and organise kanban cards |
896
+
897
+ ### Map Settings
898
+
899
+ | Name | Type | Description |
900
+ | --------- | -------- | ------------------------------------------ |
901
+ | `title` | `string` | Column ID for map marker info window title |
902
+ | `address` | `string` | Column ID for marker coordinates |
903
+ | `group` | `string` | Column ID to group markers by colour |