eru-grid 0.0.47 → 0.0.49

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eru-grid",
3
- "version": "0.0.47",
3
+ "version": "0.0.49",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^21.1.2",
6
6
  "@angular/core": "^21.1.2",
@@ -45,7 +45,6 @@ interface GridFeatures {
45
45
  columnReorderable: boolean;
46
46
  cellSelection: boolean;
47
47
  rowSelection: boolean;
48
- exportable: boolean;
49
48
  filtering: boolean;
50
49
  showColumnLines?: boolean;
51
50
  showRowLines?: boolean;
@@ -156,6 +155,17 @@ interface ExcelDownloadPayload {
156
155
  }];
157
156
  };
158
157
  }>;
158
+ pivot_config?: Record<string, ExcelPivotConfig>;
159
+ }
160
+ interface ExcelPivotConfig {
161
+ rows: string[];
162
+ columns: string[];
163
+ aggregations: {
164
+ aggregation_function: string;
165
+ field_name: string;
166
+ }[];
167
+ show_columns_totals: boolean;
168
+ show_rows_totals: boolean;
159
169
  }
160
170
  /**
161
171
  * Descriptor enqueued by the grid when the excel-download icon is clicked.
@@ -284,6 +294,7 @@ interface Field {
284
294
  enableDrilldown?: boolean;
285
295
  open_status?: any[];
286
296
  close_status?: any[];
297
+ status_view?: 'pill' | 'dot';
287
298
  color_ranges?: {
288
299
  from?: number | null;
289
300
  to?: number | null;
@@ -1174,6 +1185,14 @@ declare class EruGridStore {
1174
1185
  setCellValueChange(change: CellValueChange): void;
1175
1186
  setGroups(groups: RowGroup[]): void;
1176
1187
  toggleGroupExpansion(groupId: string): void;
1188
+ /**
1189
+ * Merge server-computed subtotals into the groups already on screen, keyed by
1190
+ * group id. Needed because the totals can arrive after the group list: the
1191
+ * columns a grid aggregates are not always known when the group call goes
1192
+ * out, so a later pass fills them in. Everything else about a group — its
1193
+ * loaded rows, counts, expansion state — is left alone.
1194
+ */
1195
+ setGroupSubtotals(subtotals: Record<string, Record<string, number>>): void;
1177
1196
  updateGroupLoadingState(groupId: string, isLoading: boolean): void;
1178
1197
  updateGroupAfterLoading(groupId: string, loadedCount: number, fullyExhausted?: boolean): void;
1179
1198
  setRows(rows: Row[]): void;
@@ -1617,6 +1636,25 @@ declare class EruGridComponent implements OnInit, AfterViewInit, OnDestroy {
1617
1636
  */
1618
1637
  onExcelDownloadClick(event: Event): void;
1619
1638
  private buildExcelDownloadPayload;
1639
+ /**
1640
+ * The columns the `columns` block of the excel-download payload describes.
1641
+ * Always the grid's own source columns — the same set table mode sends — even
1642
+ * in pivot mode, where displayColumns() would hand back the generated
1643
+ * cross-tab leaves (`<dimension value>|<measure>`, `_count_column_grand_total_*`)
1644
+ * that mean nothing to the server. The pivot layout travels separately, in
1645
+ * `pivot_config`.
1646
+ */
1647
+ private excelDownloadColumns;
1648
+ /**
1649
+ * The pivot half of the excel-download payload — the cross-tab layout the
1650
+ * server rebuilds in the sheet. Null outside pivot mode, so the payload keeps
1651
+ * the exact shape table/board mode has always sent.
1652
+ *
1653
+ * Dimensions and measures are emitted as their display labels (the same
1654
+ * header_label the `columns` block carries) rather than field names, because
1655
+ * that is what the sheet's own header row reads.
1656
+ */
1657
+ private buildExcelPivotConfig;
1620
1658
  /** Whether a board card is the active (last-clicked) one. Compared by row
1621
1659
  * reference so it works for entity and query data alike. */
1622
1660
  isBoardCardActive(row: Row): boolean;
@@ -1643,6 +1681,12 @@ declare class EruGridComponent implements OnInit, AfterViewInit, OnDestroy {
1643
1681
  isResizable: _angular_core.Signal<boolean>;
1644
1682
  isEditable: _angular_core.Signal<boolean>;
1645
1683
  gridHeight: _angular_core.Signal<number>;
1684
+ /**
1685
+ * gridHeight for viewport maths. 0 means "size to content" — it removes the
1686
+ * CSS cap and floor, but the table/pivot viewport sizing still needs a number
1687
+ * to work against, so it falls back to the same default an unset height uses.
1688
+ */
1689
+ private layoutGridHeight;
1646
1690
  showColumnLines: _angular_core.Signal<boolean>;
1647
1691
  showRowLines: _angular_core.Signal<boolean>;
1648
1692
  maxDepth: _angular_core.Signal<number>;
@@ -1663,7 +1707,10 @@ declare class EruGridComponent implements OnInit, AfterViewInit, OnDestroy {
1663
1707
  grandTotalPositionColumn: _angular_core.Signal<"before" | "after">;
1664
1708
  enableColumnGrandTotal: _angular_core.Signal<boolean>;
1665
1709
  enableColumnSubtotals: _angular_core.Signal<boolean>;
1710
+ enableRowSubtotals: _angular_core.Signal<boolean>;
1711
+ enableGrandTotal: _angular_core.Signal<boolean>;
1666
1712
  subtotalPositionColumn: _angular_core.Signal<"before" | "after">;
1713
+ subtotalPosition: _angular_core.Signal<"before" | "after">;
1667
1714
  subtotalLabel: _angular_core.Signal<string>;
1668
1715
  /**
1669
1716
  * Check if a group has subtotal data
@@ -2929,6 +2976,12 @@ declare class StatusComponent implements OnInit {
2929
2976
  text: string;
2930
2977
  color: string;
2931
2978
  }>;
2979
+ /**
2980
+ * How the read-only cell paints the status: the labelled pill, or a colour dot
2981
+ * that carries the label in its tooltip. Anything the column does not set
2982
+ * reads as the pill, so existing grids are untouched.
2983
+ */
2984
+ statusView: _angular_core.Signal<"pill" | "dot">;
2932
2985
  constructor();
2933
2986
  ngOnInit(): void;
2934
2987
  onActivate(): void;
@@ -3169,4 +3222,4 @@ declare class ThemeToggleComponent {
3169
3222
  }
3170
3223
 
3171
3224
  export { AttachmentComponent, CheckboxComponent, ColumnConstraintsService, CurrencyComponent, CustomVirtualScrollStrategy, DATA_TYPES, DATETIME_FORMATS, DATE_FORMATS, DateComponent, DatetimeComponent, DurationComponent, EmailComponent, EruGridComponent, EruGridService, EruGridStore, INHERITED_FIELD_KEYS, LocationComponent, MATERIAL_MODULES, MATERIAL_PROVIDERS, MONTH_SHORT_NAMES, NumberComponent, PRESET_CONFIG_DEFAULTS, PRESET_MANAGED_FIELDS, PeopleComponent, PhoneComponent, PriorityComponent, ProgressComponent, RatingComponent, SelectComponent, StatusComponent, TagComponent, TextareaComponent, TextboxComponent, ThemeService, ThemeToggleComponent, WebsiteComponent, evaluateRowCondition, formatDateWithPattern, matchColorRange, normalizeDatatype, normalizeDateFormat, normalizeDateTimeFormat, parseDateWithPattern, resolveRowValue, statusPillColors, tagPillColors };
3172
- export type { ActionClick, AggregationFunction, AttachmentConfig, BoardCardContext, CellValueChange, ColorRangeBand, ColumnReorder, ColumnResize, ColumnWidthConstraints, CurrencyValidationResult, DataTypes, Drilldown, DurationValue, DynamicDataRequest, EmailValidationResult, ExcelDownloadPayload, ExcelDownloadRequest, Field, GridAction, GridConfiguration, GridFeatures, GridMode, GridPreset, GridStyles, GridTokens, GroupItem$1 as GroupItem, LocationConfig, LocationValidationResult, NumberValidationResult, PeopleOption, PersonCardContext, PivotColumnGroupState, PivotColumnHeader, PivotColumnKind, PivotConfiguration, PivotHeaderStructure, PivotMetadata, PivotResult, PivotRow, PivotRowKind, RatingConfig, Row, RowDataRequest, RowDataResponse, RowGrandTotal, RowGroup, ServerValidationNotice, StatusPillColors, TagPillColors, TextareaValidationResult, TextboxValidationResult, Theme, WebsiteValidationResult };
3225
+ export type { ActionClick, AggregationFunction, AttachmentConfig, BoardCardContext, CellValueChange, ColorRangeBand, ColumnReorder, ColumnResize, ColumnWidthConstraints, CurrencyValidationResult, DataTypes, Drilldown, DurationValue, DynamicDataRequest, EmailValidationResult, ExcelDownloadPayload, ExcelDownloadRequest, ExcelPivotConfig, Field, GridAction, GridConfiguration, GridFeatures, GridMode, GridPreset, GridStyles, GridTokens, GroupItem$1 as GroupItem, LocationConfig, LocationValidationResult, NumberValidationResult, PeopleOption, PersonCardContext, PivotColumnGroupState, PivotColumnHeader, PivotColumnKind, PivotConfiguration, PivotHeaderStructure, PivotMetadata, PivotResult, PivotRow, PivotRowKind, RatingConfig, Row, RowDataRequest, RowDataResponse, RowGrandTotal, RowGroup, ServerValidationNotice, StatusPillColors, TagPillColors, TextareaValidationResult, TextboxValidationResult, Theme, WebsiteValidationResult };