@svgrid/enterprise 3.0.0 → 3.0.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 (235) hide show
  1. package/README.md +95 -95
  2. package/dist/ExpressionEditorHarness.svelte.d.ts +2 -2
  3. package/dist/SvAdvancedFilter.svelte.d.ts +2 -2
  4. package/dist/SvAlertRuleEditor.svelte.d.ts +2 -2
  5. package/dist/SvAlertsManager.svelte.d.ts +3 -3
  6. package/dist/SvAlertsPanel.svelte.d.ts +1 -1
  7. package/dist/SvAuthGate.svelte +115 -115
  8. package/dist/SvAuthGate.svelte.d.ts +1 -1
  9. package/dist/SvBoard.svelte.d.ts +1 -1
  10. package/dist/SvExportMenu.svelte +553 -553
  11. package/dist/SvExportMenu.svelte.d.ts +2 -2
  12. package/dist/SvExpressionEditor.svelte.d.ts +2 -2
  13. package/dist/SvFileInput.svelte +113 -113
  14. package/dist/SvGridAlerts.svelte.d.ts +2 -2
  15. package/dist/SvGridBoard.svelte +2358 -2358
  16. package/dist/SvGridBulkEditDrawer.svelte.d.ts +1 -1
  17. package/dist/SvGridEditPanel.svelte +1157 -1157
  18. package/dist/SvGridEditPanel.svelte.d.ts +3 -3
  19. package/dist/SvGridMasterDetail.svelte +116 -116
  20. package/dist/SvGridMasterDetail.svelte.d.ts +1 -1
  21. package/dist/SvGridScheduler.svelte +5358 -5358
  22. package/dist/SvImportDialog.svelte +1020 -1020
  23. package/dist/SvImportDialog.svelte.d.ts +2 -2
  24. package/dist/SvLookupInput.svelte +180 -180
  25. package/dist/SvLookupInput.svelte.d.ts +1 -1
  26. package/dist/SvPivotDesigner.svelte +1990 -1990
  27. package/dist/SvPivotDesigner.svelte.d.ts +2 -2
  28. package/dist/SvRecordDetail.svelte.d.ts +1 -1
  29. package/dist/SvSchedule.svelte.d.ts +1 -1
  30. package/dist/SvSchemaChart.svelte +234 -234
  31. package/dist/SvSchemaChart.svelte.d.ts +2 -2
  32. package/dist/SvSchemaDashboard.svelte +130 -130
  33. package/dist/SvSchemaDashboard.svelte.d.ts +3 -3
  34. package/dist/advanced-filter/expr-columns-from-grid.d.ts +1 -1
  35. package/dist/advanced-filter-enable.js +3 -3
  36. package/dist/alerts/alert-engine-attach.d.ts +2 -2
  37. package/dist/alerts/alert-engine-attach.js +3 -3
  38. package/dist/alerts/alert-engine.d.ts +1 -1
  39. package/dist/alerts/alert-engine.js +2 -2
  40. package/dist/alerts/alert-formats.d.ts +1 -1
  41. package/dist/alerts/alert-formats.js +1 -1
  42. package/dist/alerts/alert-observer.d.ts +3 -3
  43. package/dist/alerts/alert-observer.js +1 -1
  44. package/dist/alerts/alert-storage.d.ts +1 -1
  45. package/dist/alerts/alert-store.svelte.d.ts +1 -1
  46. package/dist/alerts/alert-types.d.ts +2 -2
  47. package/dist/alerts.js +2 -2
  48. package/dist/board.js +2 -2
  49. package/dist/cdn/svgrid-enterprise.svelte-external.js +1161 -1144
  50. package/dist/designer/assets/GridMenus-B1JtIN21.js +8 -0
  51. package/dist/designer/assets/SvDateRangeInput-C0iCCZ8o.css +1 -0
  52. package/dist/designer/assets/{SvDateRangeInput-CVn-yqrQ.js → SvDateRangeInput-CjO7nn_x.js} +1 -1
  53. package/dist/designer/assets/SvDateTimePicker-ByBD_ov6.js +1 -0
  54. package/dist/designer/assets/SvDateTimePicker-DPv09DIT.css +1 -0
  55. package/dist/designer/assets/SvField-YDLipR6O.css +1 -0
  56. package/dist/designer/assets/{SvField-BsqiA5me.js → SvField-cj1PFNgZ.js} +1 -1
  57. package/dist/designer/assets/{preload-helper-CG0n22O7.js → SvGrid.helpers-BgT-gnCo.js} +1 -1
  58. package/dist/designer/assets/SvGridCellEditor-0W1L2hJ1.js +2 -0
  59. package/dist/designer/assets/SvGridChart-DBOR4xcz.js +2 -0
  60. package/dist/designer/assets/SvGridChart-fkMWeh1J.css +1 -0
  61. package/dist/designer/assets/SvGridChartPanel-symrhNnR.js +11 -0
  62. package/dist/designer/assets/SvGridChartView-BmRxq6mU.js +1 -0
  63. package/dist/designer/assets/SvGridChartView-DUc-1RUf.css +1 -0
  64. package/dist/designer/assets/SvGridDropdown-Bb3HH2Aj.js +1 -0
  65. package/dist/designer/assets/SvGridDropdown-CcidB3rm.css +1 -0
  66. package/dist/designer/assets/SvListBox-1oUF6Iav.js +110 -0
  67. package/dist/designer/assets/SvListBox-BXfyqy4a.css +1 -0
  68. package/dist/designer/assets/cell-formatting-wr5wm7US.js +1 -0
  69. package/dist/designer/assets/chart-DXFganU8.js +1 -0
  70. package/dist/designer/assets/date-format-DGagAqRc.css +1 -0
  71. package/dist/designer/assets/{date-format-4DJvNtG2.js → date-format-onlYDsrY.js} +1 -1
  72. package/dist/designer/assets/export-format-D-eP4b2l.js +6 -0
  73. package/dist/designer/assets/{index-zUBix-JQ.js → index-C_a9Cj8Y.js} +2984 -141
  74. package/dist/designer/assets/index-k2stW6L8.css +1 -0
  75. package/dist/designer/assets/preload-helper-HclGiUj8.js +1 -0
  76. package/dist/designer/assets/src-D9p27OGC.js +58 -0
  77. package/dist/designer/index.html +22 -22
  78. package/dist/export-conditional.d.ts +1 -1
  79. package/dist/export-print.js +19 -19
  80. package/dist/export-xls.d.ts +2 -2
  81. package/dist/export.d.ts +2 -2
  82. package/dist/export.js +7 -7
  83. package/dist/expressions/builder-tree.d.ts +2 -2
  84. package/dist/expressions/builder-tree.js +1 -1
  85. package/dist/expressions/compile.d.ts +1 -1
  86. package/dist/import.js +1 -1
  87. package/dist/index.d.ts +53 -53
  88. package/dist/index.js +50 -50
  89. package/dist/install.d.ts +4 -4
  90. package/dist/install.js +11 -11
  91. package/dist/license.d.ts +3 -2
  92. package/dist/license.js +9 -4
  93. package/dist/node/studio.js +123 -114
  94. package/dist/pivot-chart.d.ts +1 -1
  95. package/dist/pivot-designer.d.ts +1 -1
  96. package/dist/pivot-enable.js +3 -3
  97. package/dist/print.d.ts +1 -1
  98. package/dist/print.js +4 -4
  99. package/dist/scheduler-config.d.ts +5 -5
  100. package/dist/scheduler-freebusy.d.ts +1 -1
  101. package/dist/scheduler-freebusy.js +1 -1
  102. package/dist/scheduler.js +2 -2
  103. package/dist/schema-designer.d.ts +1 -1
  104. package/dist/schema-designer.js +2 -2
  105. package/dist/selection-bar.js +2 -2
  106. package/dist/sources/aggregate.d.ts +1 -1
  107. package/dist/sources/auth-supabase.js +1 -1
  108. package/dist/sources/dashboard.d.ts +2 -2
  109. package/dist/sources/dashboard.js +1 -1
  110. package/dist/sources/index.d.ts +13 -13
  111. package/dist/sources/index.js +13 -13
  112. package/dist/sources/realtime-supabase.js +1 -1
  113. package/dist/sources/relation-lookup.d.ts +1 -1
  114. package/dist/sources/relation-lookup.js +1 -1
  115. package/dist/sources/rest-adapters.d.ts +1 -1
  116. package/dist/sources/rest-adapters.js +1 -1
  117. package/dist/sources/rest.d.ts +2 -2
  118. package/dist/sources/rest.js +3 -3
  119. package/dist/sources/supabase.d.ts +2 -2
  120. package/dist/sources/supabase.js +3 -3
  121. package/dist/sources/with-entity-rules.d.ts +1 -1
  122. package/dist/sources/with-entity-rules.js +1 -1
  123. package/dist/sources/with-relation-labels.d.ts +1 -1
  124. package/dist/studio/emit-project.js +2161 -2127
  125. package/dist/studio/emit-schema.js +369 -369
  126. package/dist/studio/index.d.ts +1 -1
  127. package/dist/studio/index.js +1 -1
  128. package/dist/studio/introspect-db.js +45 -45
  129. package/dist/studio/project.d.ts +10 -0
  130. package/dist/studio/samples/crm.js +6 -6
  131. package/dist/studio/samples/fleet.js +7 -7
  132. package/dist/studio/samples/insurance.js +9 -9
  133. package/dist/studio/samples/inventory.js +12 -12
  134. package/dist/studio/samples/projects.js +5 -5
  135. package/dist/studio/samples/support.js +8 -8
  136. package/dist/studio/scaffold-app.js +104 -104
  137. package/dist/studio/scaffold.js +151 -151
  138. package/dist/studio/ui-components.d.ts +7 -0
  139. package/dist/studio/ui-components.js +35 -0
  140. package/dist/sveltekit/in-memory.d.ts +3 -3
  141. package/dist/sveltekit/in-memory.js +4 -4
  142. package/dist/sveltekit/index.d.ts +6 -6
  143. package/dist/sveltekit/index.js +5 -5
  144. package/dist/sveltekit/query-plan.d.ts +1 -1
  145. package/dist/sveltekit/sql-source.d.ts +4 -4
  146. package/dist/sveltekit/sql-source.js +4 -4
  147. package/dist/sveltekit/sql.d.ts +1 -1
  148. package/dist/sveltekit/transport.d.ts +2 -2
  149. package/dist/sveltekit/transport.js +1 -1
  150. package/dist/upgrade-prompt.js +25 -25
  151. package/package.json +6 -3
  152. package/dist/designer/assets/GridMenus-Cgilexpk.js +0 -8
  153. package/dist/designer/assets/SvDateRangeInput-BV5OXYQ2.css +0 -1
  154. package/dist/designer/assets/SvDateTimePicker-BdioTrJQ.js +0 -1
  155. package/dist/designer/assets/SvDateTimePicker-CY8TK4BT.css +0 -1
  156. package/dist/designer/assets/SvField-BF-9TJSd.css +0 -1
  157. package/dist/designer/assets/SvGridCellEditor-dLY7_kk9.js +0 -2
  158. package/dist/designer/assets/SvGridChart-BEDNTdc5.js +0 -2
  159. package/dist/designer/assets/SvGridChart-Vu4Nvjiv.css +0 -1
  160. package/dist/designer/assets/SvGridChartPanel-x3lzSxuf.js +0 -10
  161. package/dist/designer/assets/SvGridChartView-CAKhPELi.js +0 -1
  162. package/dist/designer/assets/SvGridChartView-DX9HfkBR.css +0 -1
  163. package/dist/designer/assets/SvGridDropdown-CAYG7Y-O.js +0 -1
  164. package/dist/designer/assets/SvGridDropdown-Crwb2P3Q.css +0 -1
  165. package/dist/designer/assets/SvListBox-CVYQcLX9.js +0 -1
  166. package/dist/designer/assets/SvListBox-DgN8kvjt.css +0 -1
  167. package/dist/designer/assets/chart-DHEgt4lN.js +0 -1
  168. package/dist/designer/assets/date-format-Dzy4mTGh.css +0 -1
  169. package/dist/designer/assets/export-format-DwjuTfrQ.js +0 -6
  170. package/dist/designer/assets/index-Cp7fDJ3b.css +0 -1
  171. package/dist/designer/assets/js-scroller.svelte-Bhxqb3-c.js +0 -110
  172. package/dist/designer/assets/src-B7DNcoQK.css +0 -1
  173. package/dist/designer/assets/src-BoYyigAC.js +0 -2896
  174. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/_svelte_metadata.json +0 -1
  175. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/_metadata.json +0 -178
  176. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/attachments-BOv1rBKp.js +0 -3875
  177. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/attachments-BOv1rBKp.js.map +0 -1
  178. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/constants-B9vgIdCd.js +0 -21
  179. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/constants-B9vgIdCd.js.map +0 -1
  180. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/dev-T1qbW_qD.js +0 -1938
  181. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/dev-T1qbW_qD.js.map +0 -1
  182. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/events-Bo11SfVK.js +0 -205
  183. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/events-Bo11SfVK.js.map +0 -1
  184. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/flags-X7D4vfrZ.js +0 -18
  185. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/flags-X7D4vfrZ.js.map +0 -1
  186. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/hydration-oyUje5i1.js +0 -264
  187. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/hydration-oyUje5i1.js.map +0 -1
  188. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/legacy-client-DeSQgSFm.js +0 -697
  189. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/legacy-client-DeSQgSFm.js.map +0 -1
  190. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/package.json +0 -3
  191. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte.js +0 -134
  192. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte.js.map +0 -1
  193. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_animate.js +0 -55
  194. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_animate.js.map +0 -1
  195. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_attachments.js +0 -2
  196. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_compiler.js +0 -46843
  197. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_compiler.js.map +0 -1
  198. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_easing.js +0 -237
  199. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_easing.js.map +0 -1
  200. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_events.js +0 -2
  201. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal.js +0 -4
  202. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal.js.map +0 -1
  203. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_client.js +0 -7
  204. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_disclose-version.js +0 -4
  205. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_disclose-version.js.map +0 -1
  206. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_async.js +0 -5
  207. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_async.js.map +0 -1
  208. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_legacy.js +0 -5
  209. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_legacy.js.map +0 -1
  210. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_tracing.js +0 -5
  211. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_tracing.js.map +0 -1
  212. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_server.js +0 -6
  213. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_legacy.js +0 -83
  214. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_legacy.js.map +0 -1
  215. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_motion.js +0 -559
  216. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_motion.js.map +0 -1
  217. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_reactivity.js +0 -24
  218. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_reactivity.js.map +0 -1
  219. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_reactivity_window.js +0 -122
  220. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_reactivity_window.js.map +0 -1
  221. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_server.js +0 -2
  222. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_store.js +0 -89
  223. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_store.js.map +0 -1
  224. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_transition.js +0 -241
  225. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_transition.js.map +0 -1
  226. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/utils-BbWyXNk1.js +0 -4938
  227. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/utils-BbWyXNk1.js.map +0 -1
  228. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/utils-DI_fC7vt.js +0 -495
  229. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/utils-DI_fC7vt.js.map +0 -1
  230. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/validate-Dyr3lQv9.js +0 -190
  231. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/validate-Dyr3lQv9.js.map +0 -1
  232. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/version-_9FHH-LF.js +0 -8
  233. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/version-_9FHH-LF.js.map +0 -1
  234. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/warnings-CUbSPnyP.js +0 -138
  235. package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/warnings-CUbSPnyP.js.map +0 -1
@@ -123,13 +123,13 @@ export function scaffold(schema, options = {}) {
123
123
  const schemaFile = {
124
124
  path: `src/lib/${route}.schema.ts`,
125
125
  description: 'Entity schema + row type. Re-add any Standard Schema `validate` functions here by hand.',
126
- contents: `import type { EntitySchema } from '@svgrid/enterprise'
127
-
128
- ${managed(`export type ${rowType} = {
129
- ${rowFields}
130
- }
131
-
132
- ${schemaLiteral(schema, constName, rowType)}`)}
126
+ contents: `import type { EntitySchema } from '@svgrid/enterprise'
127
+
128
+ ${managed(`export type ${rowType} = {
129
+ ${rowFields}
130
+ }
131
+
132
+ ${schemaLiteral(schema, constName, rowType)}`)}
133
133
  `,
134
134
  };
135
135
  // 2. The API route: SvelteKit +server.ts using the transport handlers.
@@ -140,53 +140,53 @@ ${schemaLiteral(schema, constName, rowType)}`)}
140
140
  let serverDescription;
141
141
  if (driver) {
142
142
  // Fully-connected route: driver + DATABASE_URL, no manual editing needed.
143
- serverImport = `${driver.imports}
143
+ serverImport = `${driver.imports}
144
144
  import { createKitHandlers, createSqlDataSource } from '@svgrid/enterprise'`;
145
- serverBody = `${driver.setup}
146
-
147
- const source = createSqlDataSource<${rowType}>({
148
- schema: ${constName},
149
- table: ${JSON.stringify(schema.name)},${driver.dialectArg}
150
- execute: async (text, params) => {
151
- ${driver.execBody}
152
- },
153
- })
154
-
145
+ serverBody = `${driver.setup}
146
+
147
+ const source = createSqlDataSource<${rowType}>({
148
+ schema: ${constName},
149
+ table: ${JSON.stringify(schema.name)},${driver.dialectArg}
150
+ execute: async (text, params) => {
151
+ ${driver.execBody}
152
+ },
153
+ })
154
+
155
155
  export const { POST } = createKitHandlers({ schema: ${constName}, source })`;
156
156
  serverDescription = `API route connected to your ${dataSource} database via process.env.DATABASE_URL.`;
157
157
  }
158
158
  else if (dataSource === 'sql') {
159
159
  serverImport = `import { createKitHandlers, createSqlDataSource } from '@svgrid/enterprise'`;
160
- serverBody = `// Wire execute() to your SQL client: run \`text\` with \`params\`, return the rows.
161
- // Works with Drizzle (db.execute), postgres.js, better-sqlite3, mysql2, ...
162
- const source = createSqlDataSource<${rowType}>({
163
- schema: ${constName},
164
- table: ${JSON.stringify(schema.name)},
165
- dialect: { placeholders: '$', ilike: true },
166
- execute: async (text, params) => {
167
- throw new Error('TODO: run the query with your database client and return the rows.')
168
- },
169
- })
170
-
160
+ serverBody = `// Wire execute() to your SQL client: run \`text\` with \`params\`, return the rows.
161
+ // Works with Drizzle (db.execute), postgres.js, better-sqlite3, mysql2, ...
162
+ const source = createSqlDataSource<${rowType}>({
163
+ schema: ${constName},
164
+ table: ${JSON.stringify(schema.name)},
165
+ dialect: { placeholders: '$', ilike: true },
166
+ execute: async (text, params) => {
167
+ throw new Error('TODO: run the query with your database client and return the rows.')
168
+ },
169
+ })
170
+
171
171
  export const { POST } = createKitHandlers({ schema: ${constName}, source })`;
172
172
  serverDescription = 'API route. Fill in execute() with your SQL client (Drizzle / postgres.js / ...).';
173
173
  }
174
174
  else {
175
175
  serverImport = `import { createInMemoryDataSource, createKitHandlers } from '@svgrid/enterprise'`;
176
- serverBody = `// Starts empty and in-memory so the screen runs immediately. Swap this for
177
- // a database-backed source (scaffold with dataSource:"sql" or a dialect) when ready.
178
- const source = createInMemoryDataSource<${rowType}>([], ${constName})
179
-
176
+ serverBody = `// Starts empty and in-memory so the screen runs immediately. Swap this for
177
+ // a database-backed source (scaffold with dataSource:"sql" or a dialect) when ready.
178
+ const source = createInMemoryDataSource<${rowType}>([], ${constName})
179
+
180
180
  export const { POST } = createKitHandlers({ schema: ${constName}, source })`;
181
181
  serverDescription = 'API route using an in-memory source. Scaffold with a dialect for a real database.';
182
182
  }
183
183
  const serverFile = {
184
184
  path: `src/routes${apiRoute}/+server.ts`,
185
185
  description: serverDescription,
186
- contents: `${serverImport}
187
- import { ${constName}, type ${rowType} } from '${schemaImport}'
188
-
189
- ${managed(serverBody)}
186
+ contents: `${serverImport}
187
+ import { ${constName}, type ${rowType} } from '${schemaImport}'
188
+
189
+ ${managed(serverBody)}
190
190
  `,
191
191
  };
192
192
  // Relation (foreign-key) fields become searchable lookups in the edit form.
@@ -198,9 +198,9 @@ ${managed(serverBody)}
198
198
  .map((f) => {
199
199
  const name = `${camel(f.field)}Lookup`;
200
200
  const endpoint = JSON.stringify(`/api/${f.relation.entity}`);
201
- return ` const ${name} = createRelationLookup<Record<string, unknown>>({
202
- source: createKitDataSource({ endpoint: ${endpoint} }),
203
- labelField: ${JSON.stringify(f.relation.labelField)},
201
+ return ` const ${name} = createRelationLookup<Record<string, unknown>>({
202
+ source: createKitDataSource({ endpoint: ${endpoint} }),
203
+ labelField: ${JSON.stringify(f.relation.labelField)},
204
204
  })`;
205
205
  })
206
206
  .join('\n');
@@ -210,121 +210,121 @@ ${managed(serverBody)}
210
210
  const lookupsSection = hasLookups ? `\n\n${lookupDecls}\n${lookupsMap}` : '';
211
211
  // 3. The page: a full data screen - search, server sort + paging,
212
212
  // multi-select delete (optimistic), create/edit, loading/error/empty.
213
- const pageBody = ` const source = createKitDataSource<${rowType}>({ endpoint: '${apiRoute}' })
214
- const columns = schemaToColumns(${constName})${lookupsSection}
215
-
216
- let state = $state<ServerState<${rowType}>>({
217
- rows: [], total: 0, loading: false, saving: false, error: null,
218
- pageIndex: 0, pageSize: 25, pageCount: 1, sortModel: [], filterModel: {},
219
- })
220
- const controller = createServerDataSource<${rowType}>(source, {
221
- pageSize: 25,
222
- optimistic: true,
223
- getRowId: (r) => String(r.${idField}),
224
- onChange: (s) => (state = s),
225
- })
226
- controller.refresh()
227
-
228
- let selected = $state<${rowType}[]>([])
229
- let editing = $state<${rowType} | null | undefined>(undefined) // undefined = closed, null = create
230
-
231
- async function save({ mode, id, values }: { mode: 'create' | 'edit'; id: string | null; values: Partial<${rowType}> }) {
232
- if (mode === 'create') {
233
- await controller.createRow(values)
234
- controller.setPage(state.pageCount - 1) // jump to the new row (appended at the end)
235
- } else if (id) {
236
- await controller.updateRow(id, values)
237
- }
238
- editing = undefined
239
- }
240
-
241
- async function removeSelected() {
242
- for (const row of selected) await controller.deleteRow(String(row.${idField}))
243
- selected = []
213
+ const pageBody = ` const source = createKitDataSource<${rowType}>({ endpoint: '${apiRoute}' })
214
+ const columns = schemaToColumns(${constName})${lookupsSection}
215
+
216
+ let state = $state<ServerState<${rowType}>>({
217
+ rows: [], total: 0, loading: false, saving: false, error: null,
218
+ pageIndex: 0, pageSize: 25, pageCount: 1, sortModel: [], filterModel: {},
219
+ })
220
+ const controller = createServerDataSource<${rowType}>(source, {
221
+ pageSize: 25,
222
+ optimistic: true,
223
+ getRowId: (r) => String(r.${idField}),
224
+ onChange: (s) => (state = s),
225
+ })
226
+ controller.refresh()
227
+
228
+ let selected = $state<${rowType}[]>([])
229
+ let editing = $state<${rowType} | null | undefined>(undefined) // undefined = closed, null = create
230
+
231
+ async function save({ mode, id, values }: { mode: 'create' | 'edit'; id: string | null; values: Partial<${rowType}> }) {
232
+ if (mode === 'create') {
233
+ await controller.createRow(values)
234
+ controller.setPage(state.pageCount - 1) // jump to the new row (appended at the end)
235
+ } else if (id) {
236
+ await controller.updateRow(id, values)
237
+ }
238
+ editing = undefined
239
+ }
240
+
241
+ async function removeSelected() {
242
+ for (const row of selected) await controller.deleteRow(String(row.${idField}))
243
+ selected = []
244
244
  }`;
245
245
  const pageFile = {
246
246
  path: `src/routes/${route}/+page.svelte`,
247
247
  description: 'The data screen: sort, filter, search, paging, multi-select delete, and create/edit - wired to the API route.',
248
- contents: `<script lang="ts">
249
- import { SvGrid, createServerDataSource } from '@svgrid/grid'
250
- import {
251
- SvGridEditPanel,
252
- createKitDataSource,${hasLookups ? '\n createRelationLookup,' : ''}
253
- schemaToColumns,
254
- type ServerState,
255
- } from '@svgrid/enterprise'
256
- import { ${constName}, type ${rowType} } from '${schemaImport}'
257
-
258
- ${managed(pageBody)}
259
- </script>
260
-
261
- <svelte:head><style>
262
- ${themeTokenCss({ preset: options.theme, mode: options.dark ? 'dark' : 'light' }, { layer: 'svgrid-studio' })}
263
- </style></svelte:head>
264
-
265
- <div class="page">
266
- <header class="page__toolbar">
267
- <h2 class="page__title">${label}</h2>
268
- <div class="page__actions">
269
- <button onclick={() => (editing = null)}>New</button>
270
- <button disabled={selected.length === 0} onclick={removeSelected}>
271
- Delete {selected.length > 0 ? '(' + selected.length + ')' : ''}
272
- </button>
273
- </div>
274
- </header>
275
-
276
- {#if state.error}<p class="page__error" role="alert">{state.error}</p>{/if}
277
-
278
- <SvGrid
279
- data={state.rows}
280
- {columns}
281
- loading={state.loading}
282
- loadingOverlay
283
- fitColumns
284
- enableRowSummaries={false}
285
- showRowSelection
286
- enableCellSelection
287
- sortable
288
- externalSort
289
- onSortingChange={(s) => controller.setSort(s)}
290
- filterable
291
- showGlobalFilter
292
- externalFilter
293
- onFiltersChange={(f) =>
294
- controller.setFilter({
295
- global: f.global || undefined,
296
- columns: Object.fromEntries(
297
- f.columns.map((c) => [c.id, { operator: c.operator, value: c.value, valueTo: c.valueTo, selectedValues: c.selectedValues }]),
298
- ),
299
- })}
300
- onRowClick={(e) => (editing = e.row)}
301
- onRowSelectionChange={(_sel, rows) => (selected = rows)}
302
- showPagination
303
- externalPagination
304
- rowCount={state.total}
305
- pageIndex={state.pageIndex}
306
- pageSize={state.pageSize}
307
- onPaginationChange={({ pageIndex, pageSize }) => {
308
- if (pageSize !== state.pageSize) controller.setPageSize(pageSize)
309
- else controller.setPage(pageIndex)
310
- }}
311
- emptyMessage="No ${label} yet"
312
- containerHeight={480}
313
- />
314
-
315
- {#if editing !== undefined}
316
- <SvGridEditPanel schema={${constName}} row={editing} ${hasLookups ? 'lookups={lookups} ' : ''}onSubmit={save} onCancel={() => (editing = undefined)} />
317
- {/if}
318
- </div>
319
-
320
- <style>
321
- .page { display: flex; flex-direction: column; gap: 12px; }
322
- .page__toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
323
- .page__title { margin: 0; font-size: 18px; font-weight: 600; }
324
- .page__actions { display: flex; gap: 8px; }
325
- .page__actions button { padding: 7px 12px; border: 1px solid #ccc; border-radius: 6px; background: #fff; cursor: pointer; }
326
- .page__error { margin: 0; padding: 8px 12px; color: #b3261e; background: #fdecea; border-radius: 6px; }
327
- </style>
248
+ contents: `<script lang="ts">
249
+ import { SvGrid, createServerDataSource } from '@svgrid/grid'
250
+ import {
251
+ SvGridEditPanel,
252
+ createKitDataSource,${hasLookups ? '\n createRelationLookup,' : ''}
253
+ schemaToColumns,
254
+ type ServerState,
255
+ } from '@svgrid/enterprise'
256
+ import { ${constName}, type ${rowType} } from '${schemaImport}'
257
+
258
+ ${managed(pageBody)}
259
+ </script>
260
+
261
+ <svelte:head><style>
262
+ ${themeTokenCss({ preset: options.theme, mode: options.dark ? 'dark' : 'light' }, { layer: 'svgrid-studio' })}
263
+ </style></svelte:head>
264
+
265
+ <div class="page">
266
+ <header class="page__toolbar">
267
+ <h2 class="page__title">${label}</h2>
268
+ <div class="page__actions">
269
+ <button onclick={() => (editing = null)}>New</button>
270
+ <button disabled={selected.length === 0} onclick={removeSelected}>
271
+ Delete {selected.length > 0 ? '(' + selected.length + ')' : ''}
272
+ </button>
273
+ </div>
274
+ </header>
275
+
276
+ {#if state.error}<p class="page__error" role="alert">{state.error}</p>{/if}
277
+
278
+ <SvGrid
279
+ data={state.rows}
280
+ {columns}
281
+ loading={state.loading}
282
+ loadingOverlay
283
+ fitColumns
284
+ enableRowSummaries={false}
285
+ showRowSelection
286
+ enableCellSelection
287
+ sortable
288
+ externalSort
289
+ onSortingChange={(s) => controller.setSort(s)}
290
+ filterable
291
+ showGlobalFilter
292
+ externalFilter
293
+ onFiltersChange={(f) =>
294
+ controller.setFilter({
295
+ global: f.global || undefined,
296
+ columns: Object.fromEntries(
297
+ f.columns.map((c) => [c.id, { operator: c.operator, value: c.value, valueTo: c.valueTo, selectedValues: c.selectedValues }]),
298
+ ),
299
+ })}
300
+ onRowClick={(e) => (editing = e.row)}
301
+ onRowSelectionChange={(_sel, rows) => (selected = rows)}
302
+ showPagination
303
+ externalPagination
304
+ rowCount={state.total}
305
+ pageIndex={state.pageIndex}
306
+ pageSize={state.pageSize}
307
+ onPaginationChange={({ pageIndex, pageSize }) => {
308
+ if (pageSize !== state.pageSize) controller.setPageSize(pageSize)
309
+ else controller.setPage(pageIndex)
310
+ }}
311
+ emptyMessage="No ${label} yet"
312
+ containerHeight={480}
313
+ />
314
+
315
+ {#if editing !== undefined}
316
+ <SvGridEditPanel schema={${constName}} row={editing} ${hasLookups ? 'lookups={lookups} ' : ''}onSubmit={save} onCancel={() => (editing = undefined)} />
317
+ {/if}
318
+ </div>
319
+
320
+ <style>
321
+ .page { display: flex; flex-direction: column; gap: 12px; }
322
+ .page__toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
323
+ .page__title { margin: 0; font-size: 18px; font-weight: 600; }
324
+ .page__actions { display: flex; gap: 8px; }
325
+ .page__actions button { padding: 7px 12px; border: 1px solid #ccc; border-radius: 6px; background: #fff; cursor: pointer; }
326
+ .page__error { margin: 0; padding: 8px 12px; color: #b3261e; background: #fdecea; border-radius: 6px; }
327
+ </style>
328
328
  `,
329
329
  };
330
330
  return { files: [schemaFile, serverFile, pageFile] };
@@ -82,6 +82,13 @@ export declare const GRID_CURATED_PROPS: ReadonlySet<string>;
82
82
  /** The Grid's raw prop surface for the "All properties" panel: every extracted SvGrid
83
83
  * prop the curated controls do NOT already manage. Sorted by group then label. */
84
84
  export declare function gridPropSurface(): UiComponentProp[];
85
+ /** Split the grid's icon catalogue into the picker's display groups, in order,
86
+ * dropping any that came out empty. Takes the names rather than importing them so
87
+ * the studio metadata module stays free of a runtime dependency on the grid. */
88
+ export declare function gridIconGroups<T extends string>(names: readonly T[]): Array<{
89
+ label: string;
90
+ names: T[];
91
+ }>;
85
92
  /** The Grid props settable at runtime through `ctx.grid.<prop> = value` (backed by
86
93
  * `api.setOption`): the full extracted SvGrid surface minus controller-owned /
87
94
  * seed-once props and function/snippet props. Drives the `ctx.grid` type + the code
@@ -637,6 +637,11 @@ export const GRID_CURATED_PROPS = new Set([
637
637
  'pageSize', 'pageSizeOptions', 'paginationPosition', 'rowHeight', 'containerHeight',
638
638
  'columnVirtualization', 'initialColumnPinning', 'conditionalFormats', 'features', 'editable',
639
639
  'enableInlineEditing',
640
+ // The icon picker owns this. The extractor already skips it (a map of snippets is
641
+ // content, not a property), so this is belt and braces - but if snippet handling
642
+ // there ever changes, `icons` must not reappear as a JSON box: the value it would
643
+ // produce is emitted with JSON.stringify and would throw at `{@render}`.
644
+ 'icons',
640
645
  ]);
641
646
  /** The Grid's raw prop surface for the "All properties" panel: every extracted SvGrid
642
647
  * prop the curated controls do NOT already manage. Sorted by group then label. */
@@ -650,6 +655,36 @@ export function gridPropSurface() {
650
655
  .map((p) => ({ ...p }))
651
656
  .sort((a, b) => (order[a.group ?? 'common'] - order[b.group ?? 'common']) || a.label.localeCompare(b.label));
652
657
  }
658
+ // --- Grid icons: how the picker groups the catalogue ------------------------
659
+ // SvGrid names ~50 chrome glyphs and `icons` replaces any subset, which is far too
660
+ // long a list to show flat. Array order is BOTH the matching order (each name takes
661
+ // the first rule that accepts it) and the order the picker shows the groups in, so
662
+ // the header icons people actually reach for - sort, filter, the column menu - come
663
+ // first rather than falling out of a catch-all at the bottom.
664
+ //
665
+ // 'Other' is the catch-all and is expected to stay empty: a glyph added to the
666
+ // catalogue still shows up there rather than vanishing from the picker, but the
667
+ // guardrail test fails so someone gives it a real home.
668
+ const GRID_ICON_GROUP_RULES = [
669
+ { label: 'Header + column menu', match: (n) => ['sort', 'sort-asc', 'sort-desc', 'filter', 'menu', 'chevron-down', 'chevron-right', 'autosize', 'columns', 'reset'].includes(n) },
670
+ { label: 'Filter operators', match: (n) => n.startsWith('op-') },
671
+ { label: 'Pinning', match: (n) => n === 'pin-left' || n === 'pin-right' || n === 'unpin' },
672
+ { label: 'Rows + grouping', match: (n) => ['group', 'group-add', 'row-number', 'pinned-row-top', 'pinned-row-bottom', 'drag-handle', 'breadcrumb-separator'].includes(n) },
673
+ { label: 'Toolbar + overlays', match: (n) => ['search', 'tool-panel', 'chart', 'advanced-filter', 'column-group-caret'].includes(n) },
674
+ { label: 'Pager', match: (n) => n.startsWith('page-') },
675
+ { label: 'Find + move', match: (n) => n.startsWith('find-') || n.startsWith('move-') },
676
+ { label: 'Close + clear', match: (n) => ['x', 'close', 'clear', 'remove'].includes(n) },
677
+ { label: 'Other', match: () => true },
678
+ ];
679
+ /** Split the grid's icon catalogue into the picker's display groups, in order,
680
+ * dropping any that came out empty. Takes the names rather than importing them so
681
+ * the studio metadata module stays free of a runtime dependency on the grid. */
682
+ export function gridIconGroups(names) {
683
+ return GRID_ICON_GROUP_RULES.map((rule, i) => ({
684
+ label: rule.label,
685
+ names: names.filter((n) => GRID_ICON_GROUP_RULES.findIndex((c) => c.match(n)) === i),
686
+ })).filter((g) => g.names.length);
687
+ }
653
688
  // Props NOT offered on `ctx.grid` as runtime-settable options: structural data,
654
689
  // controller-owned plumbing, and seed-once `initial*` props (the grid reads those at
655
690
  // mount, so `setOption` on them is a no-op - excluding them keeps intellisense honest).
@@ -6,9 +6,9 @@
6
6
  * and prototyping a schema before a database exists behind it.
7
7
  */
8
8
  import type { RowData } from '@svgrid/grid';
9
- import { type EntitySchema } from '../schema';
10
- import type { WritableDataSource } from './types';
11
- import { type AggregateSource } from '../sources/aggregate';
9
+ import { type EntitySchema } from '../schema.js';
10
+ import type { WritableDataSource } from './types.js';
11
+ import { type AggregateSource } from '../sources/aggregate.js';
12
12
  export declare function createInMemoryDataSource<TData extends RowData>(initial: ReadonlyArray<TData>, schema: EntitySchema<TData>): WritableDataSource<TData> & AggregateSource & {
13
13
  rows(): ReadonlyArray<TData>;
14
14
  };
@@ -1,7 +1,7 @@
1
- import { resolveIdField } from '../schema';
2
- import { planQuery } from './query-plan';
3
- import { compilePredicate } from '../expressions/compile';
4
- import { aggregateRows } from '../sources/aggregate';
1
+ import { resolveIdField } from '../schema.js';
2
+ import { planQuery } from './query-plan.js';
3
+ import { compilePredicate } from '../expressions/compile.js';
4
+ import { aggregateRows } from '../sources/aggregate.js';
5
5
  function asString(v) {
6
6
  return v == null ? '' : String(v);
7
7
  }
@@ -1,6 +1,6 @@
1
- export { planQuery, coerce, type QueryPlan, type PlanPredicate, type PlanOp, } from './query-plan';
2
- export { createInMemoryDataSource } from './in-memory';
3
- export { createKitDataSource, createKitHandlers, type KitDataSourceOptions, type KitHandlerOptions, type KitScope, type KitHandlers, type KitMessage, } from './transport';
4
- export { planToSql, type SqlDialect, type SqlPlan } from './sql';
5
- export { createSqlDataSource, type SqlExecutor, type SqlDataSourceConfig, } from './sql-source';
6
- export type { WritableDataSource } from './types';
1
+ export { planQuery, coerce, type QueryPlan, type PlanPredicate, type PlanOp, } from './query-plan.js';
2
+ export { createInMemoryDataSource } from './in-memory.js';
3
+ export { createKitDataSource, createKitHandlers, type KitDataSourceOptions, type KitHandlerOptions, type KitScope, type KitHandlers, type KitMessage, } from './transport.js';
4
+ export { planToSql, type SqlDialect, type SqlPlan } from './sql.js';
5
+ export { createSqlDataSource, type SqlExecutor, type SqlDataSourceConfig, } from './sql-source.js';
6
+ export type { WritableDataSource } from './types.js';
@@ -1,5 +1,5 @@
1
- export { planQuery, coerce, } from './query-plan';
2
- export { createInMemoryDataSource } from './in-memory';
3
- export { createKitDataSource, createKitHandlers, } from './transport';
4
- export { planToSql } from './sql';
5
- export { createSqlDataSource, } from './sql-source';
1
+ export { planQuery, coerce, } from './query-plan.js';
2
+ export { createInMemoryDataSource } from './in-memory.js';
3
+ export { createKitDataSource, createKitHandlers, } from './transport.js';
4
+ export { planToSql } from './sql.js';
5
+ export { createSqlDataSource, } from './sql-source.js';
@@ -11,7 +11,7 @@
11
11
  * arbitrary identifiers through to SQL.
12
12
  */
13
13
  import type { GridPredicateExpr, RowData, ServerRequest } from '@svgrid/grid';
14
- import type { EntityFieldType, EntitySchema } from '../schema';
14
+ import type { EntityFieldType, EntitySchema } from '../schema.js';
15
15
  /** Normalized predicate operators (a stable superset of the grid's filter operators). */
16
16
  export type PlanOp = 'eq' | 'contains' | 'startsWith' | 'gt' | 'lt' | 'between' | 'isBlank' | 'in';
17
17
  export type PlanPredicate = {
@@ -22,10 +22,10 @@
22
22
  * })
23
23
  */
24
24
  import type { RowData } from '@svgrid/grid';
25
- import { type EntitySchema } from '../schema';
26
- import { type SqlDialect } from './sql';
27
- import type { WritableDataSource } from './types';
28
- import type { AggregateSource } from '../sources/aggregate';
25
+ import { type EntitySchema } from '../schema.js';
26
+ import { type SqlDialect } from './sql.js';
27
+ import type { WritableDataSource } from './types.js';
28
+ import type { AggregateSource } from '../sources/aggregate.js';
29
29
  /** Run a parameterized query, resolving to the result rows. */
30
30
  export type SqlExecutor = (sql: string, params: unknown[]) => Promise<ReadonlyArray<Record<string, unknown>>>;
31
31
  export type SqlDataSourceConfig<TData extends RowData> = {
@@ -1,7 +1,7 @@
1
- import { resolveIdField } from '../schema';
2
- import { nudgeEnterprise } from '../license';
3
- import { planQuery } from './query-plan';
4
- import { planToSql } from './sql';
1
+ import { resolveIdField } from '../schema.js';
2
+ import { nudgeEnterprise } from '../license.js';
3
+ import { planQuery } from './query-plan.js';
4
+ import { planToSql } from './sql.js';
5
5
  const SQL_AGG = { sum: 'SUM', avg: 'AVG', min: 'MIN', max: 'MAX' };
6
6
  function quoter(dialect) {
7
7
  const q = dialect.quote ?? '"';
@@ -21,7 +21,7 @@
21
21
  * (Or map `plan.where` to Drizzle operators directly - the plan is the seam
22
22
  * either way.)
23
23
  */
24
- import type { QueryPlan } from './query-plan';
24
+ import type { QueryPlan } from './query-plan.js';
25
25
  export type SqlDialect = {
26
26
  /** Identifier quote char. Default `"` (ANSI / Postgres / SQLite). MySQL: `` ` ``. */
27
27
  quote?: string;
@@ -24,8 +24,8 @@
24
24
  * const controller = createServerDataSource(source, { onChange: ... })
25
25
  */
26
26
  import type { RowData, ServerDataSource, ServerRequest } from '@svgrid/grid';
27
- import type { EntitySchema } from '../schema';
28
- import type { WritableDataSource } from './types';
27
+ import type { EntitySchema } from '../schema.js';
28
+ import type { WritableDataSource } from './types.js';
29
29
  /** Wire protocol: the single JSON body shape the client POSTs and the server dispatches on. */
30
30
  export type KitMessage<TData> = {
31
31
  kind: 'query';
@@ -1,4 +1,4 @@
1
- import { validateAll } from '../edit-panel';
1
+ import { validateAll } from '../edit-panel.js';
2
2
  function jsonResponse(data, status = 200) {
3
3
  return new Response(JSON.stringify(data), {
4
4
  status,
@@ -96,34 +96,34 @@ function buildCard(feature, expired = false) {
96
96
  const badge = expired ? 'TRIAL ENDED' : 'PRO';
97
97
  const heading = expired ? 'Your trial has ended' : 'Unlock SvGrid Pro';
98
98
  const body = expired
99
- ? `${featurePhrase} Your evaluation period is over - everything still works,
99
+ ? `${featurePhrase} Your evaluation period is over - everything still works,
100
100
  but this notice stays until a licence key is set.`
101
- : `${featurePhrase} It runs in evaluation with a watermark - start a free trial
101
+ : `${featurePhrase} It runs in evaluation with a watermark - start a free trial
102
102
  to remove it and ship to production.`;
103
103
  const cta = expired ? 'Buy a licence' : 'Start free trial';
104
- card.innerHTML = `
105
- <button type="button" data-act="x" aria-label="Dismiss"
106
- style="position:absolute;top:8px;right:8px;width:24px;height:24px;display:flex;
107
- align-items:center;justify-content:center;background:transparent;border:0;
108
- color:#94a3b8;font-size:18px;line-height:1;cursor:pointer;border-radius:6px;">&times;</button>
109
- <div style="display:flex;align-items:center;gap:8px;margin-bottom:8px;">
110
- <span style="display:inline-block;background:${expired ? '#b45309' : '#4f46e5'};color:#fff;font-size:10px;
111
- font-weight:700;letter-spacing:0.06em;padding:2px 7px;border-radius:999px;">${badge}</span>
112
- <span style="font-weight:700;color:#fff;">${heading}</span>
113
- </div>
114
- <p style="margin:0 0 12px;color:#cbd5e1;">
115
- ${body}
116
- </p>
117
- <div style="display:flex;gap:8px;align-items:center;">
118
- <a data-act="trial" href="${TRIAL_URL}" target="_blank" rel="noopener noreferrer"
119
- style="flex:1;text-align:center;background:#6366f1;color:#fff;font-weight:600;
120
- text-decoration:none;padding:8px 12px;border-radius:8px;">${cta}</a>
121
- <a data-act="pricing" href="${PRICING_URL}" target="_blank" rel="noopener noreferrer"
122
- style="color:#a5b4fc;text-decoration:none;padding:8px 6px;font-weight:600;">Pricing</a>
123
- </div>
124
- <p style="margin:10px 0 0;font-size:11px;color:#64748b;">
125
- Already licensed? Call <code style="color:#94a3b8;">setLicenseKey()</code> at startup to hide this.
126
- </p>
104
+ card.innerHTML = `
105
+ <button type="button" data-act="x" aria-label="Dismiss"
106
+ style="position:absolute;top:8px;right:8px;width:24px;height:24px;display:flex;
107
+ align-items:center;justify-content:center;background:transparent;border:0;
108
+ color:#94a3b8;font-size:18px;line-height:1;cursor:pointer;border-radius:6px;">&times;</button>
109
+ <div style="display:flex;align-items:center;gap:8px;margin-bottom:8px;">
110
+ <span style="display:inline-block;background:${expired ? '#b45309' : '#4f46e5'};color:#fff;font-size:10px;
111
+ font-weight:700;letter-spacing:0.06em;padding:2px 7px;border-radius:999px;">${badge}</span>
112
+ <span style="font-weight:700;color:#fff;">${heading}</span>
113
+ </div>
114
+ <p style="margin:0 0 12px;color:#cbd5e1;">
115
+ ${body}
116
+ </p>
117
+ <div style="display:flex;gap:8px;align-items:center;">
118
+ <a data-act="trial" href="${TRIAL_URL}" target="_blank" rel="noopener noreferrer"
119
+ style="flex:1;text-align:center;background:#6366f1;color:#fff;font-weight:600;
120
+ text-decoration:none;padding:8px 12px;border-radius:8px;">${cta}</a>
121
+ <a data-act="pricing" href="${PRICING_URL}" target="_blank" rel="noopener noreferrer"
122
+ style="color:#a5b4fc;text-decoration:none;padding:8px 6px;font-weight:600;">Pricing</a>
123
+ </div>
124
+ <p style="margin:10px 0 0;font-size:11px;color:#64748b;">
125
+ Already licensed? Call <code style="color:#94a3b8;">setLicenseKey()</code> at startup to hide this.
126
+ </p>
127
127
  `;
128
128
  card.querySelector('[data-act="x"]')?.addEventListener('click', () => close(card));
129
129
  // Clicking through to a trial / pricing also counts as "handled" - close the
package/package.json CHANGED
@@ -4,12 +4,15 @@
4
4
  "type": "commercial",
5
5
  "url": "https://svgrid.com/pricing"
6
6
  },
7
- "version": "3.0.0",
7
+ "version": "3.0.1",
8
8
  "description": "Enterprise feature pack for SvGrid: Excel (xlsx) and PDF export, Excel/CSV/JSON import, pivot tables with a drag-and-drop designer, paginated print, Kanban board and scheduler renderers, no-code alerts and batch editing. CSV, TSV and JSON export are already free in @svgrid/grid. Requires a paid license key.",
9
9
  "license": "SEE LICENSE IN LICENSE",
10
10
  "author": "jQWidgets <sales@jqwidgets.com>",
11
11
  "homepage": "https://svgrid.com/pricing",
12
12
  "type": "module",
13
+ "sideEffects": [
14
+ "**/*.css"
15
+ ],
13
16
  "types": "./dist/index.d.ts",
14
17
  "module": "./dist/index.js",
15
18
  "svelte": "./dist/index.js",
@@ -70,7 +73,7 @@
70
73
  "jszip": "^3.10.0",
71
74
  "pdfmake": "^0.2.0",
72
75
  "svelte": "^5.0.0",
73
- "@svgrid/grid": "^3.0.0"
76
+ "@svgrid/grid": "^3.0.3"
74
77
  },
75
78
  "peerDependenciesMeta": {
76
79
  "jszip": {
@@ -88,7 +91,7 @@
88
91
  "svelte": "^5.55.5",
89
92
  "typescript": "6.0.3",
90
93
  "vite": "^8.2.1",
91
- "@svgrid/grid": "^3.0.0"
94
+ "@svgrid/grid": "^3.0.3"
92
95
  },
93
96
  "repository": {
94
97
  "type": "git",