@ai-matrx/records 0.93.4 → 0.93.5

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 (34) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/{client-icpxhaRE.d.cts → client-CEX4WdvX.d.cts} +1 -1
  3. package/dist/{client-DM3dRewB.d.ts → client-DQWdJeFM.d.ts} +1 -1
  4. package/dist/core/index.d.cts +4 -4
  5. package/dist/core/index.d.ts +4 -4
  6. package/dist/data/index.d.cts +2 -2
  7. package/dist/data/index.d.ts +2 -2
  8. package/dist/{declareTable-MN4WuhWK.d.ts → declareTable-Bkh3C1Ao.d.ts} +2 -2
  9. package/dist/{declareTable-BtpsSJCr.d.cts → declareTable-DeQ9_TMb.d.cts} +2 -2
  10. package/dist/first-page/index.cjs +20 -6
  11. package/dist/first-page/index.cjs.map +1 -1
  12. package/dist/first-page/index.d.cts +5 -1
  13. package/dist/first-page/index.d.ts +5 -1
  14. package/dist/first-page/index.js +20 -6
  15. package/dist/first-page/index.js.map +1 -1
  16. package/dist/index.d.cts +2 -2
  17. package/dist/index.d.ts +2 -2
  18. package/dist/questions/index.d.cts +2 -2
  19. package/dist/questions/index.d.ts +2 -2
  20. package/dist/react/index.d.cts +32 -1
  21. package/dist/react/index.d.ts +32 -1
  22. package/dist/setup/index.d.cts +2 -2
  23. package/dist/setup/index.d.ts +2 -2
  24. package/dist/{table-kind-C5ZLyOxE.d.cts → table-kind-CMXvN5Kb.d.cts} +32 -1
  25. package/dist/{table-kind-BGokuDJj.d.ts → table-kind-CjTL6PyT.d.ts} +32 -1
  26. package/dist/typed-table/index.d.cts +3 -3
  27. package/dist/typed-table/index.d.ts +3 -3
  28. package/dist/views/index.cjs +32 -7
  29. package/dist/views/index.cjs.map +1 -1
  30. package/dist/views/index.d.cts +14 -6
  31. package/dist/views/index.d.ts +14 -6
  32. package/dist/views/index.js +32 -7
  33. package/dist/views/index.js.map +1 -1
  34. package/package.json +4 -4
@@ -1054,7 +1054,7 @@ interface ViewPresentationCodec<P> {
1054
1054
  }
1055
1055
 
1056
1056
  /** The ways one saved view can be looked at (SCR-6; the timeline, lane VIEWS-AND-FIELDS TL). */
1057
- declare const VIEW_LAYOUTS: readonly ["grid", "kanban", "calendar", "gallery", "timeline", "list"];
1057
+ declare const VIEW_LAYOUTS: readonly ["grid", "kanban", "calendar", "gallery", "timeline", "list", "chart"];
1058
1058
  type ViewLayout = (typeof VIEW_LAYOUTS)[number];
1059
1059
  /** One sort clause. The Field's key and a direction; nothing else is a sort. */
1060
1060
  interface ViewSort {
@@ -1080,6 +1080,10 @@ interface SavedViewSpec<P = ViewPresentationDocument> {
1080
1080
  * reading is a fact about the records.
1081
1081
  */
1082
1082
  measure?: string | null;
1083
+ /** Chart: how it draws, `bar`, `line` or `donut` (`chart_kind`). */
1084
+ chartKind?: string | null;
1085
+ /** Chart: what it measures per group, `count`, `sum` or `avg` (`chart_measure`). */
1086
+ chartMeasure?: string | null;
1083
1087
  /**
1084
1088
  * Kanban: the Field whose values cut the board into SWIMLANES across the columns — a
1085
1089
  * dispatcher's board by Status, one lane per Technician (S1-PRIME VIEW-KEYS). Never the
@@ -1054,7 +1054,7 @@ interface ViewPresentationCodec<P> {
1054
1054
  }
1055
1055
 
1056
1056
  /** The ways one saved view can be looked at (SCR-6; the timeline, lane VIEWS-AND-FIELDS TL). */
1057
- declare const VIEW_LAYOUTS: readonly ["grid", "kanban", "calendar", "gallery", "timeline", "list"];
1057
+ declare const VIEW_LAYOUTS: readonly ["grid", "kanban", "calendar", "gallery", "timeline", "list", "chart"];
1058
1058
  type ViewLayout = (typeof VIEW_LAYOUTS)[number];
1059
1059
  /** One sort clause. The Field's key and a direction; nothing else is a sort. */
1060
1060
  interface ViewSort {
@@ -1080,6 +1080,10 @@ interface SavedViewSpec<P = ViewPresentationDocument> {
1080
1080
  * reading is a fact about the records.
1081
1081
  */
1082
1082
  measure?: string | null;
1083
+ /** Chart: how it draws, `bar`, `line` or `donut` (`chart_kind`). */
1084
+ chartKind?: string | null;
1085
+ /** Chart: what it measures per group, `count`, `sum` or `avg` (`chart_measure`). */
1086
+ chartMeasure?: string | null;
1083
1087
  /**
1084
1088
  * Kanban: the Field whose values cut the board into SWIMLANES across the columns — a
1085
1089
  * dispatcher's board by Status, one lane per Technician (S1-PRIME VIEW-KEYS). Never the
@@ -185,17 +185,20 @@ function plainCodec() {
185
185
  return plainPresentation;
186
186
  }
187
187
  var STORE_KEEPS_TIMELINE = true;
188
- var ALL = ["grid", "kanban", "calendar", "gallery", ...STORE_KEEPS_TIMELINE ? ["timeline"] : [], "list"];
188
+ var ALL = ["grid", "kanban", "calendar", "gallery", ...STORE_KEEPS_TIMELINE ? ["timeline"] : [], "list", "chart"];
189
189
  var HIDES = ["grid", "gallery", "kanban", "calendar", ...STORE_KEEPS_TIMELINE ? ["timeline"] : [], "list"];
190
190
  var GRIDS = ["grid"];
191
+ var BOARD = ["kanban"];
191
192
  var VIEW_KEYS = [
192
193
  { path: "layout", shape: "kind", layouts: ALL, writer: "caller" },
193
194
  { path: "filters", shape: "filter", layouts: ALL, writer: "caller" },
194
195
  { path: "where", shape: "rule", layouts: ALL, writer: "caller" },
195
- { path: "group_field", shape: "field", layouts: ["kanban", ...STORE_KEEPS_TIMELINE ? ["timeline"] : []], writer: "caller" },
196
+ { path: "group_field", shape: "field", layouts: ["kanban", ...STORE_KEEPS_TIMELINE ? ["timeline"] : [], "chart"], writer: "caller" },
196
197
  { path: "swimlane_field", shape: "field:lane", layouts: ["kanban"], writer: "caller" },
197
198
  { path: "collapsed_columns", shape: "values", layouts: ["kanban"], writer: "caller" },
198
- { path: "measure", shape: "field:number", layouts: ["kanban"], writer: "caller" },
199
+ { path: "measure", shape: "field:number", layouts: ["kanban", "chart"], writer: "caller" },
200
+ { path: "chart_kind", shape: "chart_kind", layouts: ["chart"], writer: "caller" },
201
+ { path: "chart_measure", shape: "chart_measure", layouts: ["chart"], writer: "caller" },
199
202
  { path: "date_field", shape: "field:date", layouts: ["calendar"], writer: "caller" },
200
203
  ...STORE_KEEPS_TIMELINE ? [
201
204
  { path: "start_field", shape: "field:date", layouts: ["timeline"], writer: "caller" },
@@ -216,6 +219,12 @@ var VIEW_KEYS = [
216
219
  { path: "presentation.cardHidden", shape: "fields", layouts: ["kanban", "calendar", ...STORE_KEEPS_TIMELINE ? ["timeline"] : [], "list", "gallery"], writer: "caller" },
217
220
  { path: "presentation.columnOrder", shape: "fields", layouts: GRIDS, writer: "caller" },
218
221
  { path: "presentation.gallerySize", shape: "gallery_size", layouts: ["gallery"], writer: "caller" },
222
+ { path: "presentation.boardSize", shape: "gallery_size", layouts: BOARD, writer: "caller" },
223
+ { path: "presentation.boardPreview", shape: "field", layouts: BOARD, writer: "caller" },
224
+ { path: "presentation.boardHideEmpty", shape: "boolean", layouts: BOARD, writer: "caller" },
225
+ { path: "presentation.boardColorColumns", shape: "boolean", layouts: BOARD, writer: "caller" },
226
+ { path: "presentation.boardCounts", shape: "boolean", layouts: BOARD, writer: "caller" },
227
+ { path: "presentation.boardLanesShut", shape: "values", layouts: BOARD, writer: "caller" },
219
228
  { path: "presentation.wrap", shape: "boolean", layouts: GRIDS, writer: "caller" },
220
229
  { path: "presentation.wrapColumns", shape: "fields", layouts: GRIDS, writer: "caller" },
221
230
  { path: "presentation.fit", shape: "fit", layouts: GRIDS, writer: "caller" },
@@ -228,7 +237,7 @@ var VIEW_KEYS = [
228
237
  { path: "order", shape: "server", layouts: GRIDS, writer: "server" },
229
238
  { path: "moved_from", shape: "server", layouts: ALL, writer: "server" }
230
239
  ];
231
- var STORE_KEPT_LAYOUTS = ["grid", "kanban", "calendar", "gallery", ...STORE_KEEPS_TIMELINE ? ["timeline"] : [], "list"];
240
+ var STORE_KEPT_LAYOUTS = ["grid", "kanban", "calendar", "gallery", ...STORE_KEEPS_TIMELINE ? ["timeline"] : [], "list", "chart"];
232
241
  var KINDS = STORE_KEPT_LAYOUTS;
233
242
  function viewSettings(definition, rowFilters, codec = plainCodec()) {
234
243
  const data = definition ?? {};
@@ -247,6 +256,8 @@ function viewSettings(definition, rowFilters, codec = plainCodec()) {
247
256
  swimlaneField: text("swimlane_field"),
248
257
  collapsedColumns: Array.isArray(data["collapsed_columns"]) ? data["collapsed_columns"].filter((v) => ["string", "number", "boolean"].includes(typeof v)).map(String) : [],
249
258
  measure: text("measure"),
259
+ chartKind: text("chart_kind"),
260
+ chartMeasure: text("chart_measure"),
250
261
  dateField: text("date_field"),
251
262
  startField: text("start_field"),
252
263
  endField: text("end_field"),
@@ -283,14 +294,15 @@ function parseSorts(raw) {
283
294
  function plainCodec2() {
284
295
  return plainPresentation;
285
296
  }
286
- var VIEW_LAYOUTS = ["grid", "kanban", "calendar", "gallery", "timeline", "list"];
297
+ var VIEW_LAYOUTS = ["grid", "kanban", "calendar", "gallery", "timeline", "list", "chart"];
287
298
  var LAYOUT_LABEL = {
288
299
  grid: "Grid",
289
300
  kanban: "Kanban",
290
301
  calendar: "Calendar",
291
302
  gallery: "Gallery",
292
303
  timeline: "Timeline",
293
- list: "List"
304
+ list: "List",
305
+ chart: "Chart"
294
306
  };
295
307
  function viewOrderOf(definition) {
296
308
  const raw = definition?.["order"];
@@ -318,6 +330,8 @@ function viewFromRow(row, codec = plainCodec2()) {
318
330
  swimlaneField: k.swimlaneField,
319
331
  collapsedColumns: k.collapsedColumns,
320
332
  measure: k.measure,
333
+ chartKind: k.chartKind,
334
+ chartMeasure: k.chartMeasure,
321
335
  dateField: k.dateField,
322
336
  startField: k.startField,
323
337
  endField: k.endField,