@ai-matrx/records-ui 0.95.15 → 0.95.17

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.
package/dist/index.d.cts CHANGED
@@ -214,6 +214,8 @@ type GridGrouping = {
214
214
  order?: GroupOrder;
215
215
  /** The sections this view keeps shut, by the primitive's own group key. */
216
216
  collapsed?: string[];
217
+ /** The grouped column drawn as a column too. Absent = it steps aside (the headers name its value). */
218
+ showColumn?: boolean;
217
219
  /**
218
220
  * SUB-GROUPS (lane S1-PRIME VIEW-KEYS; ui-bench LISTS "sub-grouping"): up to two more levels
219
221
  * inside each section, by Field key. At most three levels in all — the store refuses a fourth
package/dist/index.d.ts CHANGED
@@ -214,6 +214,8 @@ type GridGrouping = {
214
214
  order?: GroupOrder;
215
215
  /** The sections this view keeps shut, by the primitive's own group key. */
216
216
  collapsed?: string[];
217
+ /** The grouped column drawn as a column too. Absent = it steps aside (the headers name its value). */
218
+ showColumn?: boolean;
217
219
  /**
218
220
  * SUB-GROUPS (lane S1-PRIME VIEW-KEYS; ui-bench LISTS "sub-grouping"): up to two more levels
219
221
  * inside each section, by Field key. At most three levels in all — the store refuses a fourth
package/dist/index.js CHANGED
@@ -3262,6 +3262,7 @@ function parseGrouping(raw) {
3262
3262
  const collapsed = raw["collapsed"].filter((k) => typeof k === "string");
3263
3263
  if (collapsed.length > 0) out.collapsed = collapsed;
3264
3264
  }
3265
+ if (raw["showColumn"] === true) out.showColumn = true;
3265
3266
  if (Array.isArray(raw["then"])) {
3266
3267
  const then = [];
3267
3268
  for (const level of raw["then"]) {
@@ -20192,6 +20193,7 @@ function GridBody({
20192
20193
  ...facts ? { groupFacts: facts } : {},
20193
20194
  ...!rowsGrouped && view?.order ? { order: view.order } : {},
20194
20195
  ...view?.collapsed ? { collapsed: view.collapsed } : {},
20196
+ ...view?.showColumn ? { showColumn: true } : {},
20195
20197
  ...onPresentationChange ? {
20196
20198
  onColumnIdChange: (columnId) => {
20197
20199
  if (columnId === null) {
@@ -20212,6 +20214,12 @@ function GridBody({
20212
20214
  const current = presentation.grouping;
20213
20215
  if (!current) return;
20214
20216
  writeLook({ ...presentation, grouping: { ...current, collapsed } });
20217
+ },
20218
+ onShowColumnChange: (show) => {
20219
+ const current = presentation.grouping;
20220
+ if (!current) return;
20221
+ const { showColumn: _was, ...rest } = current;
20222
+ writeLook({ ...presentation, grouping: show ? { ...rest, showColumn: true } : rest });
20215
20223
  }
20216
20224
  } : {}
20217
20225
  };