@motifx-community/ui 0.1.0-beta.14 → 0.1.0-beta.16

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 (330) hide show
  1. package/CHANGELOG.md +113 -0
  2. package/README.md +2 -2
  3. package/dist/components/diagram/Diagram.d.ts +607 -0
  4. package/dist/components/diagram/DiagramAutoPan.d.ts +17 -0
  5. package/dist/components/diagram/DiagramBends.d.ts +70 -0
  6. package/dist/components/diagram/DiagramDragging.d.ts +66 -0
  7. package/dist/components/diagram/DiagramEdgeView.d.ts +78 -0
  8. package/dist/components/diagram/DiagramGrid.d.ts +13 -0
  9. package/dist/components/diagram/DiagramHistory.d.ts +16 -0
  10. package/dist/components/diagram/DiagramLinks.d.ts +177 -0
  11. package/dist/components/diagram/DiagramMap.d.ts +62 -0
  12. package/dist/components/diagram/DiagramNodeView.d.ts +143 -0
  13. package/dist/components/diagram/DiagramOverview.d.ts +20 -0
  14. package/dist/components/diagram/DiagramPanning.d.ts +34 -0
  15. package/dist/components/diagram/diagram-alignment.d.ts +2 -0
  16. package/dist/components/diagram/diagram-auto-pan-host.d.ts +8 -0
  17. package/dist/components/diagram/diagram-background.d.ts +2 -0
  18. package/dist/components/diagram/diagram-bends-host.d.ts +17 -0
  19. package/dist/components/diagram/diagram-card-kind.d.ts +42 -0
  20. package/dist/components/diagram/diagram-card-node.d.ts +11 -0
  21. package/dist/components/diagram/diagram-center-options.d.ts +6 -0
  22. package/dist/components/diagram/diagram-change.d.ts +11 -0
  23. package/dist/components/diagram/diagram-class-member.d.ts +13 -0
  24. package/dist/components/diagram/diagram-class-node.d.ts +12 -0
  25. package/dist/components/diagram/diagram-column-checked-event-args.d.ts +9 -0
  26. package/dist/components/diagram/diagram-connected-event-args.d.ts +6 -0
  27. package/dist/components/diagram/diagram-connecting-event-args.d.ts +9 -0
  28. package/dist/components/diagram/diagram-connection.d.ts +7 -0
  29. package/dist/components/diagram/diagram-data.d.ts +12 -0
  30. package/dist/components/diagram/diagram-deleted-event-args.d.ts +8 -0
  31. package/dist/components/diagram/diagram-deleting-event-args.d.ts +9 -0
  32. package/dist/components/diagram/diagram-dragging-host.d.ts +47 -0
  33. package/dist/components/diagram/diagram-drawn-node.d.ts +10 -0
  34. package/dist/components/diagram/diagram-edge-end.d.ts +2 -0
  35. package/dist/components/diagram/diagram-edge-path.d.ts +5 -0
  36. package/dist/components/diagram/diagram-edge-reshaped-event-args.d.ts +8 -0
  37. package/dist/components/diagram/diagram-edge-reshaping-event-args.d.ts +6 -0
  38. package/dist/components/diagram/diagram-edge.d.ts +49 -0
  39. package/dist/components/diagram/diagram-edit.d.ts +10 -0
  40. package/dist/components/diagram/diagram-export-options.d.ts +14 -0
  41. package/dist/components/diagram/diagram-export.d.ts +28 -0
  42. package/dist/components/diagram/diagram-fit-options.d.ts +12 -0
  43. package/dist/components/diagram/diagram-history-changed-event-args.d.ts +14 -0
  44. package/dist/components/diagram/diagram-history-step.d.ts +9 -0
  45. package/dist/components/diagram/diagram-kinds.d.ts +9 -0
  46. package/dist/components/diagram/diagram-layered.d.ts +39 -0
  47. package/dist/components/diagram/diagram-layout-direction.d.ts +2 -0
  48. package/dist/components/diagram/diagram-layout-options.d.ts +24 -0
  49. package/dist/components/diagram/diagram-layout-type.d.ts +5 -0
  50. package/dist/components/diagram/diagram-layout.d.ts +33 -0
  51. package/dist/components/diagram/diagram-line-look.d.ts +6 -0
  52. package/dist/components/diagram/diagram-line.d.ts +11 -0
  53. package/dist/components/diagram/diagram-links-host.d.ts +45 -0
  54. package/dist/components/diagram/diagram-links-options.d.ts +7 -0
  55. package/dist/components/diagram/diagram-map-props.d.ts +10 -0
  56. package/dist/components/diagram/diagram-map-target.d.ts +27 -0
  57. package/dist/components/diagram/diagram-marker.d.ts +6 -0
  58. package/dist/components/diagram/diagram-mini-map-options.d.ts +13 -0
  59. package/dist/components/diagram/diagram-mini-map-position.d.ts +2 -0
  60. package/dist/components/diagram/diagram-node-context.d.ts +26 -0
  61. package/dist/components/diagram/diagram-node-host.d.ts +23 -0
  62. package/dist/components/diagram/diagram-node-kind.d.ts +43 -0
  63. package/dist/components/diagram/diagram-node-move.d.ts +11 -0
  64. package/dist/components/diagram/diagram-node-resized-event-args.d.ts +8 -0
  65. package/dist/components/diagram/diagram-node-resizing-event-args.d.ts +6 -0
  66. package/dist/components/diagram/diagram-node-size.d.ts +8 -0
  67. package/dist/components/diagram/diagram-node-status.d.ts +2 -0
  68. package/dist/components/diagram/diagram-node-toggled-event-args.d.ts +7 -0
  69. package/dist/components/diagram/diagram-node.d.ts +56 -0
  70. package/dist/components/diagram/diagram-nodes-moved-event-args.d.ts +6 -0
  71. package/dist/components/diagram/diagram-nodes-moving-event-args.d.ts +6 -0
  72. package/dist/components/diagram/diagram-panning-host.d.ts +19 -0
  73. package/dist/components/diagram/diagram-pasted-event-args.d.ts +7 -0
  74. package/dist/components/diagram/diagram-pasting-event-args.d.ts +11 -0
  75. package/dist/components/diagram/diagram-path-ends.d.ts +11 -0
  76. package/dist/components/diagram/diagram-path-result.d.ts +6 -0
  77. package/dist/components/diagram/diagram-paths.d.ts +35 -0
  78. package/dist/components/diagram/diagram-point.d.ts +5 -0
  79. package/dist/components/diagram/diagram-port-place.d.ts +9 -0
  80. package/dist/components/diagram/diagram-port.d.ts +27 -0
  81. package/dist/components/diagram/diagram-props.d.ts +159 -0
  82. package/dist/components/diagram/diagram-reconnected-event-args.d.ts +10 -0
  83. package/dist/components/diagram/diagram-reconnecting-event-args.d.ts +11 -0
  84. package/dist/components/diagram/diagram-rect.d.ts +7 -0
  85. package/dist/components/diagram/diagram-resize-side.d.ts +2 -0
  86. package/dist/components/diagram/diagram-route.d.ts +10 -0
  87. package/dist/components/diagram/diagram-selection-changed-event-args.d.ts +9 -0
  88. package/dist/components/diagram/diagram-selection.d.ts +5 -0
  89. package/dist/components/diagram/diagram-side.d.ts +2 -0
  90. package/dist/components/diagram/diagram-table-column.d.ts +13 -0
  91. package/dist/components/diagram/diagram-table-node.d.ts +12 -0
  92. package/dist/components/diagram/diagram-tree.d.ts +14 -0
  93. package/dist/components/diagram/diagram-viewport-changed-event-args.d.ts +8 -0
  94. package/dist/components/diagram/diagram-viewport-options.d.ts +5 -0
  95. package/dist/components/diagram/diagram-viewport.d.ts +6 -0
  96. package/dist/components/diagram/index.d.ts +65 -0
  97. package/dist/components/diagram/swallow-next-click.d.ts +5 -0
  98. package/dist/components/expressioneditor/ExpressionEditor.d.ts +111 -0
  99. package/dist/components/expressioneditor/expression-editor-props.d.ts +24 -0
  100. package/dist/components/expressioneditor/index.d.ts +2 -0
  101. package/dist/components/formlayout/FormLayout.d.ts +10 -3
  102. package/dist/components/formlayout/form-editor-type.d.ts +1 -1
  103. package/dist/components/formlayout/form-item.d.ts +4 -1
  104. package/dist/components/formlayout/form-layout-props.d.ts +1 -1
  105. package/dist/components/formlayout/index.d.ts +1 -0
  106. package/dist/components/formlayout/schema-items.d.ts +26 -0
  107. package/dist/components/pivotgrid/model/PivotAxisWindow.d.ts +53 -1
  108. package/dist/components/pivotgrid/model/PivotCellWindow.d.ts +2 -0
  109. package/dist/components/pivotgrid/model/PivotWindows.d.ts +3 -6
  110. package/dist/components/toolbar/Toolbar.d.ts +5 -3
  111. package/dist/core/control.d.ts +2 -0
  112. package/dist/core/keyboard.d.ts +5 -0
  113. package/dist/core/measure/index.d.ts +2 -0
  114. package/dist/core/measure/picture.d.ts +27 -0
  115. package/dist/core/shortcut-options.d.ts +5 -2
  116. package/dist/core/ui-strings.d.ts +191 -0
  117. package/dist/generated/tokens.d.ts +1615 -0
  118. package/dist/index.d.ts +2 -0
  119. package/dist/index.js +11501 -705
  120. package/dist/index.js.map +1 -1
  121. package/dist/locales/en.json +180 -1
  122. package/dist/locales/tr.json +180 -1
  123. package/dist/styles.css +2262 -3
  124. package/dist/tokens/index.d.ts +1615 -0
  125. package/dist/tokens/index.js +1615 -0
  126. package/dist/tokens/index.js.map +1 -1
  127. package/dist/{tr-BGbF9uCs.js → tr-4GNbFdQh.js} +361 -3
  128. package/dist/{tr-BGbF9uCs.js.map → tr-4GNbFdQh.js.map} +1 -1
  129. package/docs/accordion.md +1 -1
  130. package/docs/actionsheet.md +1 -1
  131. package/docs/appbar.md +1 -1
  132. package/docs/appmenu-api.md +1 -1
  133. package/docs/appmenu-programmatic.md +1 -1
  134. package/docs/appmenu-search.md +1 -1
  135. package/docs/appmenu.md +1 -1
  136. package/docs/avatar.md +1 -1
  137. package/docs/badge.md +1 -1
  138. package/docs/bar-gauge-angles.md +1 -1
  139. package/docs/bar-gauge-data.md +1 -1
  140. package/docs/bar-gauge-labels.md +1 -1
  141. package/docs/bar-gauge.md +1 -1
  142. package/docs/barcode.md +1 -1
  143. package/docs/bottomnavigation.md +1 -1
  144. package/docs/bottomsheet.md +1 -1
  145. package/docs/breadcrumb.md +1 -1
  146. package/docs/button.md +1 -1
  147. package/docs/buttongroup.md +1 -1
  148. package/docs/buttons.md +1 -1
  149. package/docs/calendar.md +1 -1
  150. package/docs/card.md +1 -1
  151. package/docs/chart-bars.md +1 -1
  152. package/docs/chart-candles.md +1 -1
  153. package/docs/chart-funnel.md +1 -1
  154. package/docs/chart-heatmap.md +1 -1
  155. package/docs/chart-lines.md +1 -1
  156. package/docs/chart-live.md +1 -1
  157. package/docs/chart-pie.md +1 -1
  158. package/docs/chart-radar.md +1 -1
  159. package/docs/chart-ranges.md +1 -1
  160. package/docs/chart-references.md +1 -1
  161. package/docs/chart-scatter.md +1 -1
  162. package/docs/chart-waterfall.md +1 -1
  163. package/docs/chart-zoom.md +1 -1
  164. package/docs/chart.md +1 -1
  165. package/docs/chat.md +1 -1
  166. package/docs/checkbox.md +1 -1
  167. package/docs/chip.md +1 -1
  168. package/docs/choice.md +1 -1
  169. package/docs/colorbox.md +1 -1
  170. package/docs/combobox.md +1 -1
  171. package/docs/commands.md +1 -1
  172. package/docs/control.md +1 -1
  173. package/docs/data.md +2 -2
  174. package/docs/datagrid-api.md +1 -1
  175. package/docs/datagrid-bands.md +1 -1
  176. package/docs/datagrid-drag-select.md +1 -1
  177. package/docs/datagrid-drag.md +1 -1
  178. package/docs/datagrid-editing.md +1 -1
  179. package/docs/datagrid-filtering.md +1 -1
  180. package/docs/datagrid-forms.md +1 -1
  181. package/docs/datagrid-grouping.md +1 -1
  182. package/docs/datagrid-layout.md +1 -1
  183. package/docs/datagrid-lookups.md +1 -1
  184. package/docs/datagrid-master-detail.md +1 -1
  185. package/docs/datagrid-scrolling.md +1 -1
  186. package/docs/datagrid-selection.md +1 -1
  187. package/docs/datagrid.md +1 -1
  188. package/docs/datalayer-api.md +491 -0
  189. package/docs/datalayer-changes.md +501 -0
  190. package/docs/datalayer-odata.md +998 -0
  191. package/docs/datalayer-pivot.md +850 -0
  192. package/docs/datalayer-queries.md +516 -0
  193. package/docs/datalayer-rest.md +529 -0
  194. package/docs/datalayer-soap.md +576 -0
  195. package/docs/datalayer-source.md +464 -0
  196. package/docs/datalayer.md +264 -0
  197. package/docs/datebox.md +1 -1
  198. package/docs/daterangebox.md +1 -1
  199. package/docs/diagram-api.md +200 -0
  200. package/docs/diagram-commands.md +79 -0
  201. package/docs/diagram-connections.md +157 -0
  202. package/docs/diagram-custom-nodes.md +325 -0
  203. package/docs/diagram-designer.md +816 -0
  204. package/docs/diagram-editing.md +62 -0
  205. package/docs/diagram-flow.md +157 -0
  206. package/docs/diagram-keyboard.md +58 -0
  207. package/docs/diagram-layout.md +354 -0
  208. package/docs/diagram-nodes.md +206 -0
  209. package/docs/diagram-tables.md +212 -0
  210. package/docs/diagram.md +217 -0
  211. package/docs/display.md +1 -1
  212. package/docs/draggable.md +1 -1
  213. package/docs/drawer.md +1 -1
  214. package/docs/dropdown.md +1 -1
  215. package/docs/editors.md +1 -1
  216. package/docs/expressioneditor.md +469 -0
  217. package/docs/expressions.md +431 -0
  218. package/docs/feedback.md +1 -1
  219. package/docs/fileuploader.md +1 -1
  220. package/docs/filterbuilder.md +1 -1
  221. package/docs/formlayout-schema.md +143 -0
  222. package/docs/formlayout.md +16 -4
  223. package/docs/foundations.md +1 -1
  224. package/docs/gallery.md +1 -1
  225. package/docs/gauge-base.md +1 -1
  226. package/docs/gauge-circular.md +1 -1
  227. package/docs/gauge-dashboards.md +1 -1
  228. package/docs/gauge-linear.md +1 -1
  229. package/docs/gauge-markers.md +1 -1
  230. package/docs/gauge-marks.md +1 -1
  231. package/docs/gauge-ranges.md +1 -1
  232. package/docs/gauge-scales.md +1 -1
  233. package/docs/gauge.md +1 -1
  234. package/docs/home.md +1 -1
  235. package/docs/keyboard.md +2 -2
  236. package/docs/language.md +1 -1
  237. package/docs/layout.md +1 -1
  238. package/docs/listbox.md +1 -1
  239. package/docs/loadpanel.md +1 -1
  240. package/docs/lookup.md +1 -1
  241. package/docs/markdown.md +1 -1
  242. package/docs/menus-api.md +1 -1
  243. package/docs/menus-context.md +1 -1
  244. package/docs/menus-customization.md +1 -1
  245. package/docs/menus-merging.md +1 -1
  246. package/docs/menus-programmatic.md +1 -1
  247. package/docs/menus.md +1 -1
  248. package/docs/multiview.md +1 -1
  249. package/docs/navigation.md +1 -1
  250. package/docs/numberbox.md +1 -1
  251. package/docs/otpinput.md +1 -1
  252. package/docs/pagination.md +1 -1
  253. package/docs/pivotgrid-api.md +1 -1
  254. package/docs/pivotgrid-chart.md +1 -1
  255. package/docs/pivotgrid-drilldown.md +1 -1
  256. package/docs/pivotgrid-export.md +1 -1
  257. package/docs/pivotgrid-fields.md +1 -1
  258. package/docs/pivotgrid-keyboard.md +1 -1
  259. package/docs/pivotgrid-layout.md +1 -1
  260. package/docs/pivotgrid-panel.md +1 -1
  261. package/docs/pivotgrid-remote.md +122 -44
  262. package/docs/pivotgrid-sorting.md +3 -3
  263. package/docs/pivotgrid-state.md +1 -1
  264. package/docs/pivotgrid-summaries.md +1 -1
  265. package/docs/pivotgrid.md +1 -1
  266. package/docs/popover.md +1 -1
  267. package/docs/progress.md +1 -1
  268. package/docs/qrcode.md +1 -1
  269. package/docs/radiogroup.md +1 -1
  270. package/docs/rating.md +1 -1
  271. package/docs/resizable.md +1 -1
  272. package/docs/ribbonmenu-api.md +1 -1
  273. package/docs/ribbonmenu-commands.md +1 -1
  274. package/docs/ribbonmenu-customization.md +1 -1
  275. package/docs/ribbonmenu-display.md +1 -1
  276. package/docs/ribbonmenu-layouts.md +1 -1
  277. package/docs/ribbonmenu-programmatic.md +1 -1
  278. package/docs/ribbonmenu.md +1 -1
  279. package/docs/scheduler-agenda.md +1 -1
  280. package/docs/scheduler-big-data.md +1 -1
  281. package/docs/scheduler-editing.md +1 -1
  282. package/docs/scheduler-form.md +1 -1
  283. package/docs/scheduler-icalendar.md +1 -1
  284. package/docs/scheduler-mobile.md +1 -1
  285. package/docs/scheduler-recurrence.md +1 -1
  286. package/docs/scheduler-resources.md +1 -1
  287. package/docs/scheduler-timeline.md +1 -1
  288. package/docs/scheduler.md +1 -1
  289. package/docs/scrollview.md +1 -1
  290. package/docs/shortcuteditor.md +1 -1
  291. package/docs/showcase-flowstudio.md +61 -0
  292. package/docs/showcase-home.md +1 -1
  293. package/docs/showcase-mail.md +1 -1
  294. package/docs/showcase.md +1 -1
  295. package/docs/signature.md +1 -1
  296. package/docs/skeleton.md +1 -1
  297. package/docs/slider.md +1 -1
  298. package/docs/sortable.md +1 -1
  299. package/docs/sparkline.md +1 -1
  300. package/docs/speeddial.md +1 -1
  301. package/docs/splitter.md +1 -1
  302. package/docs/stepper.md +1 -1
  303. package/docs/switch.md +1 -1
  304. package/docs/tabdocs-dock.md +1 -1
  305. package/docs/tabdocs-drag.md +1 -1
  306. package/docs/tabdocs-menus.md +1 -1
  307. package/docs/tabdocs-mobile.md +1 -1
  308. package/docs/tabdocs-tabs.md +1 -1
  309. package/docs/tabdocs-windows.md +1 -1
  310. package/docs/tabdocs-workspace.md +1 -1
  311. package/docs/tabdocs.md +1 -1
  312. package/docs/tabs.md +1 -1
  313. package/docs/tagbox.md +1 -1
  314. package/docs/textarea.md +1 -1
  315. package/docs/textbox.md +1 -1
  316. package/docs/tileview.md +1 -1
  317. package/docs/timeline.md +1 -1
  318. package/docs/toast.md +1 -1
  319. package/docs/tokens.md +324 -1
  320. package/docs/toolbar-api.md +1 -1
  321. package/docs/toolbar-customization.md +1 -1
  322. package/docs/toolbar.md +1 -1
  323. package/docs/tooltip.md +1 -1
  324. package/docs/treeview.md +1 -1
  325. package/docs/validationsummary.md +1 -1
  326. package/docs/window.md +1 -1
  327. package/docs/wizard.md +1 -1
  328. package/llms-full.txt +10142 -462
  329. package/llms.txt +32 -1
  330. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  # PivotGrid: Remote data
2
2
 
3
- > PivotGrid · @motifx-community/ui 0.1.0-beta.14
3
+ > PivotGrid · @motifx-community/ui 0.1.0-beta.16
4
4
 
5
5
  A pivot a server computes is read from it: the members open, or, where the server computes the parts of pivots too, only what the view reaches as it scrolls, so a large result never comes whole.
6
6
 
@@ -10,7 +10,7 @@ With a `dataSource` whose adapter computes pivots (`capabilities.pivot`: OData w
10
10
 
11
11
  ## Read in parts as it scrolls
12
12
 
13
- Where the adapter computes the parts of pivots too (`capabilities.pivotWindow`: OData with `aggregation`, REST with `pivot` unless `window: false`), the pivot reads them by itself as the view reaches them. The first view takes three requests: the first part of each axis, which tells how many members it has, then the values of those parts; a level open by default adds one, read first. Values are read a part at a time too: a scroll within the parts read asks for nothing, and the next part is read half a part before the view reaches it. A long move waits until the scroll stops, so the parts passed over are not read, and lets go of the requests still on their way. A member not read yet shows as an empty line that reads as loading. `partSize` sets the members of a part: 100 rows and 40 columns by default.
13
+ Where the adapter computes the parts of pivots too (`capabilities.pivotWindow`: OData with `aggregation`, REST with `pivot` unless `window: false`), the pivot reads them by itself as the view reaches them. The first view takes three requests: the first part of each axis, which tells how many members it has, then the values of those parts; a level open by default adds one, read first, and one more where its members take more than a part. Values are read a part at a time too: a scroll within the parts read asks for nothing, and the next part is read half a part before the view reaches it. A long move waits until the scroll stops, so the parts passed over are not read, and lets go of the requests still on their way. A member not read yet shows as an empty line that reads as loading. `partSize` sets the members of a part: 100 rows and 40 columns by default.
14
14
 
15
15
  ```tsx
16
16
  import { data } from '@motifx-community/data';
@@ -70,23 +70,54 @@ function under(levels: readonly data.PivotLevel<Order>[], paths: readonly (reado
70
70
  return null;
71
71
  }
72
72
 
73
- /** Every member of a parent, ordered, by what was asked: the next part of the list is taken from them. */
73
+ /** Every member of a parent, ordered, by what was asked: the parts of a long list are taken from it, and counted. */
74
74
  const ordered = new Map<string, data.PivotSliceResult>();
75
+ const LONG = 1000;
76
+
77
+ /** The children of these members, ordered: the lists not kept in one pass over their orders; the long ones are kept. */
78
+ function lists(asked: Omit<data.PivotMembersOptions<Order>, 'slices'>, parents: readonly (readonly unknown[])[]): data.PivotSliceResult[] {
79
+ const { levels, filter, keep, measures, sortBySummary, nonEmpty = false, childCounts = false, descendants = 0 } = asked;
80
+ const same = JSON.stringify([levels, filter, keep, measures, sortBySummary, nonEmpty, childCounts, descendants]);
81
+ const ids = parents.map((parent) => same + JSON.stringify(parent));
82
+ const found = new Map<string, data.PivotSliceResult>();
83
+ const missing = new Map<string, readonly unknown[]>();
84
+ ids.forEach((id, i) => {
85
+ const kept = ordered.get(id);
86
+ if (kept) found.set(id, kept);
87
+ else missing.set(id, parents[i]);
88
+ });
89
+ if (missing.size) {
90
+ const slices = [...missing.values()].map((parent) => ({ parent }));
91
+ const read = data.pivotMembers(under(levels, slices.map((s) => s.parent)) ?? orders, { ...asked, slices }, ctx).slices;
92
+ [...missing.keys()].forEach((id, i) => {
93
+ found.set(id, read[i]);
94
+ if (read[i].total >= LONG) ordered.set(id, read[i]);
95
+ if (ordered.size > 64) ordered.delete(ordered.keys().next().value!);
96
+ });
97
+ }
98
+ return ids.map((id) => found.get(id)!);
99
+ }
75
100
 
76
101
  function members(o: data.PivotMembersOptions<Order>): data.PivotMembersResult {
77
102
  if (o.find?.length) return data.pivotMembers(under(o.levels, o.slices.map((s) => s.parent)) ?? orders, o, ctx);
78
- const { slices, ...asked } = o;
103
+ const all = lists(o, o.slices.map((slice) => slice.parent));
104
+ return {
105
+ slices: o.slices.map(({ parent, skip = 0, take }, i) => ({ parent, total: all[i].total, members: all[i].members.slice(skip, take === undefined ? undefined : skip + take) })),
106
+ };
107
+ }
108
+
109
+ /** How many members stand below each part of the children of members open by default. */
110
+ function blocks(o: data.PivotBlocksOptions<Order>): data.PivotBlocksResult {
111
+ const all = lists({ ...o, descendants: o.depth }, o.parents);
79
112
  return {
80
- slices: slices.map((slice) => {
81
- const id = JSON.stringify([asked, slice.parent]);
82
- let all = ordered.get(id);
83
- if (!all) {
84
- all = data.pivotMembers(under(o.levels, [slice.parent]) ?? orders, { ...asked, slices: [{ parent: slice.parent }] }, ctx).slices[0];
85
- ordered.set(id, all);
86
- if (ordered.size > 64) ordered.delete(ordered.keys().next().value!);
87
- }
88
- const skip = slice.skip ?? 0;
89
- return { parent: slice.parent, total: all.total, members: slice.take === undefined ? all.members.slice(skip) : all.members.slice(skip, skip + slice.take) };
113
+ blocks: o.parents.map((parent, i) => {
114
+ const { total, members } = all[i];
115
+ const size = o.size ?? Math.max(1, total);
116
+ const counts = Array.from({ length: Math.ceil(total / size) }, (_, n) => {
117
+ const part = members.slice(n * size, (n + 1) * size);
118
+ return [part.length, ...Array.from({ length: o.depth }, (_, level) => part.reduce((sum, m) => sum + (m.descendants?.[level] ?? 0), 0))];
119
+ });
120
+ return { parent, total, counts };
90
121
  }),
91
122
  };
92
123
  }
@@ -100,6 +131,8 @@ function answer(body: Record<string, unknown>): unknown {
100
131
  const r = data.pivotCounts(under(o.levels, o.paths) ?? orders, o, ctx);
101
132
  return { counts: o.paths.map((path) => ({ path, count: r.childCount(path) })) };
102
133
  }
134
+ case 'blocks':
135
+ return blocks(body as unknown as data.PivotBlocksOptions<Order>);
103
136
  case 'cells': {
104
137
  const o = body as unknown as data.PivotCellsOptions<Order>;
105
138
  // The orders of one axis's members hold every crossing: those of the axis that has fewer are counted. A running
@@ -125,13 +158,13 @@ self.onmessage = (e: MessageEvent<{ id: number; body: string }>) => {
125
158
  };
126
159
  ```
127
160
 
128
- Above, a million orders stand on a server in a worker that answers the REST adapter as an endpoint would, one request at a time; like a database, it finds the orders of regions and customers by an index and keeps the members it ordered. The note under the pivot counts what it answered: with the regions open, the first view takes four requests; with the customers across, three.
161
+ Above, a million orders stand on a server in a worker that answers the REST adapter as an endpoint would, one request at a time; like a database, it finds the orders of regions and customers by an index and keeps the members it ordered. The note under the pivot counts what it answered: with the regions open, the first view takes four requests; with every customer open as well, 400,000 lines, four; with the customers across, three.
129
162
 
130
163
  The button at the end of the field panel exports the pivot to CSV: it is read whole, a run of rows at a time, the next run read while one is written, and the panel over the table counts the rows ([Export](pivotgrid-export.md#parts)).
131
164
 
132
165
  ## What is read whole
133
166
 
134
- A level open by default (`expanded`, `expandAll`) has its members read whole with the number of their children: the members open must be known to place the others. So does a level ordered in the browser, by `compare` or by the text of parts of dates; a level ordered by a data field is ordered on the server. A member opened one by one under a member read in parts is found by its place among its parent's children. The values read stay through a new order or layout of the same fields; a new query or new fields read them again.
167
+ A level open by default (`expanded`, `expandAll`) with a level below it is placed by counts where the adapter provides them (`capabilities.pivotBlocks`: OData with `aggregation`, REST and SOAP with `pivot: { blocks: true }`): the pivot asks how many members stand below each part of its members, which gives every line its place, and reads the members of a part as the view reaches it. Where the adapter does not provide them, such a level has its members read whole with the number of their children: the members open must be known to place the others. A level ordered by a data field is ordered on the server. An order of the browser's own, by `compare` or by texts (`sortBy: 'text'`), would need every member first: read in parts, the members come in the server's order by their values instead, and development is told so; a pivot read whole keeps those orders. A member opened one by one under a member read in parts is found by its place among its parent's children. The values read stay through a new order or layout of the same fields; a new query or new fields read them again.
135
168
 
136
169
  ## Selecting and copying
137
170
 
@@ -143,7 +176,7 @@ Columns are drawn as rows are: only those in view have cells. Where they are wid
143
176
 
144
177
  ## A server of your own
145
178
 
146
- A REST endpoint answers the parts as the data layer asks for them, a body with `kind` (`members`, `counts` or `cells`); the data layer's README gives each body and answer. Its memory engine computes them over rows a server holds (`pivotMembers`, `pivotCounts`, `pivotCellGroups`), as the worker above does.
179
+ A REST endpoint answers the parts as the data layer asks for them, a body with `kind` (`members`, `counts` or `cells`, and `blocks` with `pivot: { blocks: true }`); [Pivots and loading in parts](datalayer-pivot.md#rest) gives each body and answer. Its memory engine computes them over rows a server holds (`pivotMembers`, `pivotCounts`, `pivotCellGroups`, `pivotBlocks`), as the worker above does.
147
180
 
148
181
  ## Feedback
149
182
 
@@ -160,6 +193,7 @@ import { ordersSource, type Order } from './orders';
160
193
 
161
194
  const PLACES = [
162
195
  { value: 'down', text: 'Customers down' },
196
+ { value: 'open', text: 'Customers open' },
163
197
  { value: 'across', text: 'Customers across' },
164
198
  ];
165
199
 
@@ -178,19 +212,30 @@ export default function Parts() {
178
212
  s.last = Math.round(e.ms);
179
213
  });
180
214
  const amount: PivotGridField<Order> = { field: 'amount', title: 'Amount', type: 'number', area: 'data', summaryType: 'sum', format: { maximumFractionDigits: 0 } };
181
- const fields = (): PivotGridField<Order>[] =>
182
- s.place === 'down'
183
- ? [
184
- { field: 'region', title: 'Region', area: 'row', expanded: true },
185
- { field: 'customer', title: 'Customer', area: 'row' },
186
- { field: 'date', title: 'Date', type: 'date', area: 'column', groupInterval: ['year', 'quarter'] },
187
- amount,
188
- ]
189
- : [
190
- { field: 'date', title: 'Date', type: 'date', area: 'row', groupInterval: ['year', 'quarter'] },
191
- { field: 'customer', title: 'Customer', area: 'column' },
192
- amount,
193
- ];
215
+ const fields = (): PivotGridField<Order>[] => {
216
+ if (s.place === 'down') {
217
+ return [
218
+ { field: 'region', title: 'Region', area: 'row', expanded: true },
219
+ { field: 'customer', title: 'Customer', area: 'row' },
220
+ { field: 'date', title: 'Date', type: 'date', area: 'column', groupInterval: ['year', 'quarter'] },
221
+ amount,
222
+ ];
223
+ }
224
+ // Every customer open with its years below: placed by how many stand below each part, read as the view reaches them.
225
+ if (s.place === 'open') {
226
+ return [
227
+ { field: 'region', title: 'Region', area: 'row', expanded: true },
228
+ { field: 'customer', title: 'Customer', area: 'row', expanded: true },
229
+ { field: 'date', title: 'Year', type: 'date', area: 'row', groupInterval: 'year' },
230
+ amount,
231
+ ];
232
+ }
233
+ return [
234
+ { field: 'date', title: 'Date', type: 'date', area: 'row', groupInterval: ['year', 'quarter'] },
235
+ { field: 'customer', title: 'Customer', area: 'column' },
236
+ amount,
237
+ ];
238
+ };
194
239
 
195
240
  return (
196
241
  <>
@@ -225,7 +270,7 @@ export type Order = { id: number; region: string; customer: string; date: string
225
270
 
226
271
  /** A request the pivot sent: its kind (`whole` for a whole pivot) and how long the server took. */
227
272
  export interface Asked {
228
- kind: 'whole' | 'members' | 'counts' | 'cells';
273
+ kind: 'whole' | 'members' | 'counts' | 'cells' | 'blocks';
229
274
  ms: number;
230
275
  }
231
276
 
@@ -276,7 +321,7 @@ export function ordersSource(asked: (e: Asked) => void): { source: data.DataSour
276
321
  queue.push(job);
277
322
  send();
278
323
  });
279
- const adapter = new data.RestAdapter<Order, number>({ url: '/orders', key: 'id', fields: { date: 'date' }, pivot: { url: '/orders/pivot' }, fetch });
324
+ const adapter = new data.RestAdapter<Order, number>({ url: '/orders', key: 'id', fields: { date: 'date' }, pivot: { url: '/orders/pivot', blocks: true }, fetch });
280
325
  return { source: new data.DataSource<Order, number>({ adapter }), stop: () => worker.terminate() };
281
326
  }
282
327
  ```
@@ -341,23 +386,54 @@ function under(levels: readonly data.PivotLevel<Order>[], paths: readonly (reado
341
386
  return null;
342
387
  }
343
388
 
344
- /** Every member of a parent, ordered, by what was asked: the next part of the list is taken from them. */
389
+ /** Every member of a parent, ordered, by what was asked: the parts of a long list are taken from it, and counted. */
345
390
  const ordered = new Map<string, data.PivotSliceResult>();
391
+ const LONG = 1000;
392
+
393
+ /** The children of these members, ordered: the lists not kept in one pass over their orders; the long ones are kept. */
394
+ function lists(asked: Omit<data.PivotMembersOptions<Order>, 'slices'>, parents: readonly (readonly unknown[])[]): data.PivotSliceResult[] {
395
+ const { levels, filter, keep, measures, sortBySummary, nonEmpty = false, childCounts = false, descendants = 0 } = asked;
396
+ const same = JSON.stringify([levels, filter, keep, measures, sortBySummary, nonEmpty, childCounts, descendants]);
397
+ const ids = parents.map((parent) => same + JSON.stringify(parent));
398
+ const found = new Map<string, data.PivotSliceResult>();
399
+ const missing = new Map<string, readonly unknown[]>();
400
+ ids.forEach((id, i) => {
401
+ const kept = ordered.get(id);
402
+ if (kept) found.set(id, kept);
403
+ else missing.set(id, parents[i]);
404
+ });
405
+ if (missing.size) {
406
+ const slices = [...missing.values()].map((parent) => ({ parent }));
407
+ const read = data.pivotMembers(under(levels, slices.map((s) => s.parent)) ?? orders, { ...asked, slices }, ctx).slices;
408
+ [...missing.keys()].forEach((id, i) => {
409
+ found.set(id, read[i]);
410
+ if (read[i].total >= LONG) ordered.set(id, read[i]);
411
+ if (ordered.size > 64) ordered.delete(ordered.keys().next().value!);
412
+ });
413
+ }
414
+ return ids.map((id) => found.get(id)!);
415
+ }
346
416
 
347
417
  function members(o: data.PivotMembersOptions<Order>): data.PivotMembersResult {
348
418
  if (o.find?.length) return data.pivotMembers(under(o.levels, o.slices.map((s) => s.parent)) ?? orders, o, ctx);
349
- const { slices, ...asked } = o;
419
+ const all = lists(o, o.slices.map((slice) => slice.parent));
420
+ return {
421
+ slices: o.slices.map(({ parent, skip = 0, take }, i) => ({ parent, total: all[i].total, members: all[i].members.slice(skip, take === undefined ? undefined : skip + take) })),
422
+ };
423
+ }
424
+
425
+ /** How many members stand below each part of the children of members open by default. */
426
+ function blocks(o: data.PivotBlocksOptions<Order>): data.PivotBlocksResult {
427
+ const all = lists({ ...o, descendants: o.depth }, o.parents);
350
428
  return {
351
- slices: slices.map((slice) => {
352
- const id = JSON.stringify([asked, slice.parent]);
353
- let all = ordered.get(id);
354
- if (!all) {
355
- all = data.pivotMembers(under(o.levels, [slice.parent]) ?? orders, { ...asked, slices: [{ parent: slice.parent }] }, ctx).slices[0];
356
- ordered.set(id, all);
357
- if (ordered.size > 64) ordered.delete(ordered.keys().next().value!);
358
- }
359
- const skip = slice.skip ?? 0;
360
- return { parent: slice.parent, total: all.total, members: slice.take === undefined ? all.members.slice(skip) : all.members.slice(skip, skip + slice.take) };
429
+ blocks: o.parents.map((parent, i) => {
430
+ const { total, members } = all[i];
431
+ const size = o.size ?? Math.max(1, total);
432
+ const counts = Array.from({ length: Math.ceil(total / size) }, (_, n) => {
433
+ const part = members.slice(n * size, (n + 1) * size);
434
+ return [part.length, ...Array.from({ length: o.depth }, (_, level) => part.reduce((sum, m) => sum + (m.descendants?.[level] ?? 0), 0))];
435
+ });
436
+ return { parent, total, counts };
361
437
  }),
362
438
  };
363
439
  }
@@ -371,6 +447,8 @@ function answer(body: Record<string, unknown>): unknown {
371
447
  const r = data.pivotCounts(under(o.levels, o.paths) ?? orders, o, ctx);
372
448
  return { counts: o.paths.map((path) => ({ path, count: r.childCount(path) })) };
373
449
  }
450
+ case 'blocks':
451
+ return blocks(body as unknown as data.PivotBlocksOptions<Order>);
374
452
  case 'cells': {
375
453
  const o = body as unknown as data.PivotCellsOptions<Order>;
376
454
  // The orders of one axis's members hold every crossing: those of the axis that has fewer are counted. A running
@@ -1,6 +1,6 @@
1
1
  # PivotGrid: Sorting and filtering
2
2
 
3
- > PivotGrid · @motifx-community/ui 0.1.0-beta.14
3
+ > PivotGrid · @motifx-community/ui 0.1.0-beta.16
4
4
 
5
5
  Members stand in the order of their values, their texts, a function of the app's or a data field's totals, and a pivot sums up only the rows its fields keep: given from code, or chosen by the user in a field's header filter.
6
6
 
@@ -43,7 +43,7 @@ export function makeSales(count: number): Sale[] {
43
43
 
44
44
  ## An order of your own
45
45
 
46
- `compare` orders a row or column field's members by their keys with a function of your own, as `Array.sort` takes one: sizes from small to large, the stages of a process, the months of a fiscal year. It comes in place of `sortBy`; `sortOrder: 'desc'` turns it around, `sortBySummaryField` comes before it, and members without a value stay last. It orders the members in the browser, a server's too, and the header filter lists them in its order.
46
+ `compare` orders a row or column field's members by their keys with a function of your own, as `Array.sort` takes one: sizes from small to large, the stages of a process, the months of a fiscal year. It comes in place of `sortBy`; `sortOrder: 'desc'` turns it around, `sortBySummaryField` comes before it, and members without a value stay last. It orders the members in the browser, a server's too, but not where the pivot is [read in parts](pivotgrid-remote.md#whole), and the header filter lists them in its order.
47
47
 
48
48
  ```tsx
49
49
  export type Sale = { id: number; region: string; city: string; product: string; date: string; amount: number; units: number };
@@ -162,7 +162,7 @@ export function makeSales(count: number): Sale[] {
162
162
 
163
163
  ## On a server
164
164
 
165
- With rows in memory, the browser does it all. With an adapter that computes pivots (OData with `aggregation`, REST with `pivot`), the server orders the members by their values (each level's `dir`) and keeps the rows: the values of a field as a filter, the members of a field grouped by an interval as `keep`, and filter expressions with either. The order by text, by `compare` and by a data field's totals is the browser's, over the members the server sent. A header filter asks the server for the members of its field alone. A field read with `value` or a custom summary makes the pivot load the rows and group them in memory, and so does an interval the service cannot compute (OData has no day of the week).
165
+ With rows in memory, the browser does it all. With an adapter that computes pivots (OData with `aggregation`, REST with `pivot`), the server orders the members by their values (each level's `dir`) and keeps the rows: the values of a field as a filter, the members of a field grouped by an interval as `keep`, and filter expressions with either. The order by text, by `compare` and by a data field's totals is the browser's, over the members the server sent; read in parts, the server orders by data fields too, and an order by text or by `compare` is not used. A header filter asks the server for the members of its field alone. A field read with `value` or a custom summary makes the pivot load the rows and group them in memory, and so does an interval the service cannot compute (OData has no day of the week).
166
166
 
167
167
  ## Feedback
168
168
 
@@ -1,6 +1,6 @@
1
1
  # PivotGrid: State and selection
2
2
 
3
- > PivotGrid · @motifx-community/ui 0.1.0-beta.14
3
+ > PivotGrid · @motifx-community/ui 0.1.0-beta.16
4
4
 
5
5
  What the user arranges and opens, kept in the browser or saved and given back from code, and the cells the user selects and copies to a spreadsheet.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # PivotGrid: Summaries and display
2
2
 
3
- > PivotGrid · @motifx-community/ui 0.1.0-beta.14
3
+ > PivotGrid · @motifx-community/ui 0.1.0-beta.16
4
4
 
5
5
  A data field sums up the rows of each cell. It shows that value as it is, or as a share of a total or of its parent, a change from the member before, a running total, or a calculation of your own.
6
6
 
package/docs/pivotgrid.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # PivotGrid
2
2
 
3
- > PivotGrid · @motifx-community/ui 0.1.0-beta.14
3
+ > PivotGrid · @motifx-community/ui 0.1.0-beta.16
4
4
 
5
5
  A pivot table: rows summed up by row fields down the side and column fields across the top, with a value of every data field where they cross and totals for every member. The data layer computes it (`loadPivot`), in the browser for rows in memory or on the server where the adapter can. Members open and close, and the table draws only the rows and columns in view.
6
6
 
package/docs/popover.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Popover
2
2
 
3
- > Feedback · @motifx-community/ui 0.1.0-beta.14
3
+ > Feedback · @motifx-community/ui 0.1.0-beta.16
4
4
 
5
5
  Displays content next to a related element, such as a title, a close button, a form or a card. It opens on click or on hover, follows its target, and points to it with an arrow where the design language includes one.
6
6
 
package/docs/progress.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # ProgressBar and Spinner
2
2
 
3
- > Feedback · @motifx-community/ui 0.1.0-beta.14
3
+ > Feedback · @motifx-community/ui 0.1.0-beta.16
4
4
 
5
5
  ProgressBar shows how far an operation has progressed, as a line or a circle, or indicates activity when the progress is unknown. Spinner shows that the system is busy. It is a rotating ring that can stand alone or cover a panel while it loads, and it can wait for a delay so that quick operations do not cause a flash.
6
6
 
package/docs/qrcode.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # QRCode
2
2
 
3
- > Display · @motifx-community/ui 0.1.0-beta.14
3
+ > Display · @motifx-community/ui 0.1.0-beta.16
4
4
 
5
5
  A QR code, drawn as vectors so that it stays sharp at any size. It has no dependencies, chooses the smallest version that holds the text, and can carry a logo.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # RadioGroup
2
2
 
3
- > Choice · @motifx-community/ui 0.1.0-beta.14
3
+ > Choice · @motifx-community/ui 0.1.0-beta.16
4
4
 
5
5
  A set of mutually exclusive options. Options can come from plain values, custom objects or a live list, and can be arranged vertically, horizontally or in columns. Individual options can be disabled, hidden or given help text. The group is a single Tab stop, and the arrow keys move between options.
6
6
 
package/docs/rating.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Rating
2
2
 
3
- > Editors · @motifx-community/ui 0.1.0-beta.14
3
+ > Editors · @motifx-community/ui 0.1.0-beta.16
4
4
 
5
5
  A row of stars for entering or displaying a score, in whole or half steps. Rating is a field, so the label, help text, rules and `x-model` work the same way as on any other field.
6
6
 
package/docs/resizable.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Resizable
2
2
 
3
- > Navigation · @motifx-community/ui 0.1.0-beta.14
3
+ > Navigation · @motifx-community/ui 0.1.0-beta.16
4
4
 
5
5
  A box that users can resize from its edges and corners with the pointer, or with the arrow keys on the grip in its end corner. It respects minimum and maximum sizes, can stay within an area, and can preserve its aspect ratio.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # RibbonMenu: API reference
2
2
 
3
- > RibbonMenu · @motifx-community/ui 0.1.0-beta.14
3
+ > RibbonMenu · @motifx-community/ui 0.1.0-beta.16
4
4
 
5
5
  Everything `RibbonMenu` takes, offers and reports. Every prop is also a settable property, and a function is followed.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # RibbonMenu: Commands
2
2
 
3
- > RibbonMenu · @motifx-community/ui 0.1.0-beta.14
3
+ > RibbonMenu · @motifx-community/ui 0.1.0-beta.16
4
4
 
5
5
  A group holds commands of three sizes and eight types. Every field of a command is a value or a function the menu follows, so the commands change with the application’s state.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # RibbonMenu: Customization
2
2
 
3
- > RibbonMenu · @motifx-community/ui 0.1.0-beta.14
3
+ > RibbonMenu · @motifx-community/ui 0.1.0-beta.16
4
4
 
5
5
  Users arrange the menu from its context menu: they hide what they never use, move what they use most, and add commands to the quick commands. Everything they change is one plain object, to save and give back.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # RibbonMenu: Showing and keys
2
2
 
3
- > RibbonMenu · @motifx-community/ui 0.1.0-beta.14
3
+ > RibbonMenu · @motifx-community/ui 0.1.0-beta.16
4
4
 
5
5
  The menu can show only its tabs or hide itself to leave the page more room. A button before the tabs opens the app’s main menu, quick commands are at hand from every tab, and key hints let the keyboard reach any command in a few letters.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # RibbonMenu: Layouts and room
2
2
 
3
- > RibbonMenu · @motifx-community/ui 0.1.0-beta.14
3
+ > RibbonMenu · @motifx-community/ui 0.1.0-beta.16
4
4
 
5
5
  The menu has two layouts, and gives way step by step when its room shrinks: commands become smaller, groups fold, and what is left scrolls. Narrow enough, it turns compact.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # RibbonMenu: Programmatic changes
2
2
 
3
- > RibbonMenu · @motifx-community/ui 0.1.0-beta.14
3
+ > RibbonMenu · @motifx-community/ui 0.1.0-beta.16
4
4
 
5
5
  Tabs, groups and commands can be added, removed, moved and changed at any time, by their paths. The menu redraws only what changed: groups and commands that stay keep their buttons, their state and their place.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # RibbonMenu
2
2
 
3
- > RibbonMenu · @motifx-community/ui 0.1.0-beta.14
3
+ > RibbonMenu · @motifx-community/ui 0.1.0-beta.16
4
4
 
5
5
  The commands of an application in tabs, each tab in named groups of large, medium and small commands. It adapts to the room it has, can show only its tabs or hide itself, and lets users arrange it to their liking. The menu holds nothing of its own: the tabs, the groups and the commands are given by the application.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Scheduler: Agenda
2
2
 
3
- > Scheduler · @motifx-community/ui 0.1.0-beta.14
3
+ > Scheduler · @motifx-community/ui 0.1.0-beta.16
4
4
 
5
5
  Displays upcoming days as a list, with each day's appointments in time order. Days without appointments are omitted.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Scheduler: Big data
2
2
 
3
- > Scheduler · @motifx-community/ui 0.1.0-beta.14
3
+ > Scheduler · @motifx-community/ui 0.1.0-beta.16
4
4
 
5
5
  Handles thousands of resources and appointments. The scheduler renders only what is visible, and recalculates the layout only for what has changed.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Scheduler: Editing
2
2
 
3
- > Scheduler · @motifx-community/ui 0.1.0-beta.14
3
+ > Scheduler · @motifx-community/ui 0.1.0-beta.16
4
4
 
5
5
  Users can add, move, resize, copy and delete appointments with the pointer and the keyboard, and you can do the same programmatically. Every change raises its event first, can wait for a server, and is reverted if saving fails.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Scheduler: The appointment form
2
2
 
3
- > Scheduler · @motifx-community/ui 0.1.0-beta.14
3
+ > Scheduler · @motifx-community/ui 0.1.0-beta.16
4
4
 
5
5
  Configure the appointment form without handling events. You can choose its fields and their order, arrange them in groups and tabs, use custom editors, add validation per field, and show or lock fields for specific appointments. You can also replace the form with your own.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Scheduler: iCalendar and print
2
2
 
3
- > Scheduler · @motifx-community/ui 0.1.0-beta.14
3
+ > Scheduler · @motifx-community/ui 0.1.0-beta.16
4
4
 
5
5
  Exports appointments to an iCalendar file (RFC 5545) and imports them back, for use with other calendar applications. The scheduler can also be printed.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Scheduler: Tablet and phone
2
2
 
3
- > Scheduler · @motifx-community/ui 0.1.0-beta.14
3
+ > Scheduler · @motifx-community/ui 0.1.0-beta.16
4
4
 
5
5
  On tablets and phones, the scheduler keeps its appointments, views and date, and changes how it presents them. On a phone, it shows the agenda, a compact toolbar and bottom sheets. Touch gestures can lift and resize appointments, swipe between days, and pinch to zoom.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Scheduler: Recurrence and time zones
2
2
 
3
- > Scheduler · @motifx-community/ui 0.1.0-beta.14
3
+ > Scheduler · @motifx-community/ui 0.1.0-beta.16
4
4
 
5
5
  Recurring appointments based on RFC 5545 rules, with exceptions and individually edited occurrences, a prompt that asks what a change should apply to, a recurrence editor, and time zone support that handles daylight saving time.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Scheduler: Resources and groups
2
2
 
3
- > Scheduler · @motifx-community/ui 0.1.0-beta.14
3
+ > Scheduler · @motifx-community/ui 0.1.0-beta.16
4
4
 
5
5
  Resources such as rooms, people and equipment can color appointments, divide columns into groups (nested or under each date), and define when each resource is available and when time is blocked.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Scheduler: Timeline
2
2
 
3
- > Scheduler · @motifx-community/ui 0.1.0-beta.14
3
+ > Scheduler · @motifx-community/ui 0.1.0-beta.16
4
4
 
5
5
  Displays one row per resource, with time running along the row, for a day, a week, a work week or a month. Appointments at the same time stack within a row, and the row grows to fit them.
6
6
 
package/docs/scheduler.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Scheduler
2
2
 
3
- > Scheduler · @motifx-community/ui 0.1.0-beta.14
3
+ > Scheduler · @motifx-community/ui 0.1.0-beta.16
4
4
 
5
5
  A full-featured calendar for appointments across days and hours. It provides day, week, work week and month views, all-day and multi-day bars, side-by-side display of overlapping appointments, and a "+N more" link when a day is full. Appointments can come from an array or a data source, and every setting can change at runtime.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # ScrollView
2
2
 
3
- > Navigation · @motifx-community/ui 0.1.0-beta.14
3
+ > Navigation · @motifx-community/ui 0.1.0-beta.16
4
4
 
5
5
  A scrollable container with configurable scrollbars, pull-to-refresh, and load-on-scroll near the end of the content. You can scroll it programmatically to a position or an element.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # ShortcutEditor
2
2
 
3
- > Editors · @motifx-community/ui 0.1.0-beta.14
3
+ > Editors · @motifx-community/ui 0.1.0-beta.16
4
4
 
5
5
  A list of the app’s keyboard shortcuts in which the user assigns other keys. It shows the shortcuts of commands, of the app and of the kit’s components, and you can place it anywhere: a settings page, a dialog or a tab.
6
6
 
@@ -0,0 +1,61 @@
1
+ # Showcase: FlowStudio
2
+
3
+ > Get started · @motifx-community/ui 0.1.0-beta.16
4
+
5
+ A studio for workflows, database tables and automations, built with the kit as a standalone MotifJS application: a ribbon whose commands work on the active document, documents with panels docked around them, a solution tree and diagrams. Workflows are checked and run, table diagrams give their SQL, and automations run in the page and give the definition a server runs. What is opened, changed and saved stays in the browser; every workflow, table and automation is made up.
6
+
7
+ [Open FlowStudio](/flowstudio/)
8
+
9
+ ## What it does
10
+
11
+ | Part | What |
12
+ | --- | --- |
13
+ | Solutions | A tree of the workflows, the table diagrams and the automations, with a search box, a context menu (Open, Rename, Duplicate, Delete, New) and the number of problems of each item. A double click or Enter opens an item in a document. |
14
+ | Workflows | Five kinds of step (Start, Task, Decision, Wait, End), added from the Toolbox or the ribbon and joined by connections. The name of a step, who does it and how long it takes, and the labels of the ways out of a decision are edited in Properties; every change is a step that Ctrl+Z undoes. |
15
+ | Table diagrams | Tables with their columns and keys, and relations from a foreign key to the key it names. A box before each column puts it in the query; Properties edits a table, a column, what the column does in the query, and how a relation joins. Filter opens a window to choose the rows the query takes: conditions in groups of and, or and not, on the columns and on the summaries, and parameters given when it runs. |
16
+ | Automations | Eight kinds of step: a timer, the query of a table diagram, an HTTP request, an email, a decision, a variable, a loop and an end. A step’s settings are a form made from its schema; a value from the steps before it is an expression, a text with data in it a template, and the editor offers only what has surely run. Connections are names alone, whose addresses and secrets a server knows. |
17
+ | Validation | The rules of workflows, tables and automations are checked a moment after each change. The Errors panel lists the errors and warnings, the tree and the status bar count them, and a double click or Enter goes to what a problem is about. |
18
+ | Run | Run (F5) goes through a workflow by itself, Step (F10) one step at a time, and Stop (Shift+F5) ends it. A decision asks which way to go; the step the run stands on and those it passed are marked, and every step is written to Output. While it runs, the workflow is read-only. |
19
+ | Automation runs | An automation runs in the page, on its definition alone: the timer starts it at once, a query gives sample rows, an HTTP request its sample answer, and an email is written to Output. Each step shows its status, and Properties what it was last given and what it gave; they stay until the automation changes or Clear takes them away. |
20
+ | SQL | Generate SQL makes the schema of a table diagram (`CREATE TABLE`) and its query (`SELECT` with its joins, `WHERE`, `GROUP BY`, `HAVING` and `ORDER BY`), and their AST: a tree in JSON that a server writes in the SQL of its own database. |
21
+ | Definition | Export definition saves what an automation does as JSON, without its look: the steps and their settings with the expressions as trees, the SQL trees of its queries, the transitions, the variables and the connections by name. Opened again, it gives the same automation. |
22
+ | Files | An item or the whole solution is exported as a FlowStudio file (JSON) and opened again; a diagram is exported as an SVG or a PNG picture. Changes not saved yet are kept as drafts, and Reset demos goes back to the start. |
23
+ | Language and look | The studio follows the language of this site, English or Turkish. The View tab switches the theme, the density and the design language. |
24
+
25
+ ## The ribbon
26
+
27
+ | Feature | In the studio |
28
+ | --- | --- |
29
+ | Commands of the active document | The ribbon works on the document in front, wherever focus is: the commands of the diagram (undo, the clipboard, zoom, layout, alignment) are passed to it, and a command it cannot run now is off. |
30
+ | Contextual tabs | Workflow Tools, Table Tools and Automation Tools appear in the context color with the kind of the active document: the steps and tables to insert, Lines, Arrange, and Run, SQL or Definition. |
31
+ | Galleries and toggles | The shapes of the lines and the design languages are galleries; the panels, the map, the grid, the theme and the density are toggles. |
32
+ | File menu | New, Open, Save and Save all, a page to export from, Reset demos, the keyboard shortcuts and About. |
33
+ | Quick commands and keys | Save, Undo and Redo stand before the tabs. Alt shows the key of each tab and command. |
34
+
35
+ ## How it is built
36
+
37
+ | Part | How |
38
+ | --- | --- |
39
+ | Services | `Solution`, `Workspace`, `Problems`, `Output`, `Runner` and `Look` are singletons of the dependency injection; the panels and the ribbon read them and call them. |
40
+ | Documents | `TabDocumentManager` holds the documents and the docked panels. Its layout is saved when the page closes and restored with the documents it names. |
41
+ | Commands | The studio adds its commands with `commands.add`, held to the studio, with their keys; the diagram commands the ribbon names are passed to the active document. |
42
+ | Diagram | The steps of a workflow are node kinds of the studio, and those of an automation are made from the kit’s card with `cardKind`. A change made in Properties becomes a step of the diagram’s history through `record`, a document that runs is `readOnly` and shows the `status` of its steps, and the boxes of the query are the `checkable` columns of the table kind. |
43
+ | Automations | A kind of step is one object: its ports, the schema of its settings, the type of what it gives. `schemaItems` makes the form, `jsonSchema` checks the settings and `expression` the expressions; the guide [Build your own flow designer](diagram-designer.md) builds a small one from scratch. |
44
+ | Rules, run, SQL and definition | The rules, the runs, the SQL and the definition are plain TypeScript modules with unit tests. The SQL is built as an AST first, and the ANSI SQL is written from it; an automation’s run works on its definition alone. |
45
+ | Components | `RibbonMenu`, `AppMenu`, `TabDocumentManager`, `TreeView`, `Diagram`, `DataGrid`, `FormLayout`, `ExpressionEditor`, `FilterBuilder`, `ListBox`, `TextBox`, `TextArea`, `NumberBox`, `ComboBox`, `DropDown`, `CheckBox`, `ButtonGroup`, `Badge`, `MxForm`, `messageBox`, `confirm`, `ShortcutEditor` and `attachContextMenu`. |
46
+
47
+ ## Keys
48
+
49
+ | Keys | What they do |
50
+ | --- | --- |
51
+ | F5, F10, Shift+F5 | Run, Step and Stop. |
52
+ | Ctrl+S, Ctrl+Shift+S | Save the active document; save all of them. |
53
+ | Ctrl+O | Open a FlowStudio file, or the definition of an automation. |
54
+ | Ctrl+Alt+N | A new workflow. |
55
+ | Ctrl+Alt+W | Close the active document. |
56
+ | Alt | The keys of the ribbon. |
57
+ | The diagram’s keys | The arrows go from node to node, Enter connects, Ctrl and an arrow moves, and Delete, Ctrl+Z, Ctrl+Y, Ctrl+C, Ctrl+V, Ctrl+D and Ctrl+A work on the selection. |
58
+
59
+ ## Feedback
60
+
61
+ Loading issues…