eru-grid 0.0.43 → 0.0.45
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/fesm2022/eru-grid.mjs +152 -91
- package/fesm2022/eru-grid.mjs.map +1 -1
- package/package.json +1 -1
- package/types/eru-grid.d.ts +41 -2
package/package.json
CHANGED
package/types/eru-grid.d.ts
CHANGED
|
@@ -99,6 +99,9 @@ interface GridFeatures {
|
|
|
99
99
|
boardCardHoverBg?: string;
|
|
100
100
|
boardCardSelectedBg?: string;
|
|
101
101
|
boardCardSelectedOutline?: string;
|
|
102
|
+
boardCountTextColor?: string;
|
|
103
|
+
boardCountBg?: string;
|
|
104
|
+
boardColumnHeader?: boolean;
|
|
102
105
|
boardColumnMinWidth?: number;
|
|
103
106
|
boardColumnMaxWidth?: number;
|
|
104
107
|
boardColumnHeight?: number;
|
|
@@ -357,12 +360,34 @@ interface Field {
|
|
|
357
360
|
* tool_tip per-grid header help text
|
|
358
361
|
* is_hidden hiding a column in one grid should not require
|
|
359
362
|
* hiding the field in the data model
|
|
363
|
+
* searchable whether a picker needs a filter box depends on how
|
|
364
|
+
* many options this grid shows, not on the field
|
|
360
365
|
* dateTimeFormat legacy alias; the model writes `date_format`
|
|
361
366
|
*/
|
|
362
367
|
declare const INHERITED_FIELD_KEYS: readonly string[];
|
|
363
368
|
type DataTypes = 'number' | 'textbox' | 'textarea' | 'currency' | 'date' | 'datetime' | 'duration' | 'time' | 'dropdown_single_select' | 'dropdown_multi_select' | 'location' | 'email' | 'people' | 'checkbox' | 'phone' | 'priority' | 'status' | 'progress' | 'attachment' | 'tag' | 'rating' | 'website';
|
|
364
369
|
/** Resolve a data-model datatype to the canonical DataTypes value. */
|
|
365
370
|
declare function normalizeDatatype(datatype: any): DataTypes;
|
|
371
|
+
/** The three colours a status pill is painted with. */
|
|
372
|
+
interface StatusPillColors {
|
|
373
|
+
background: string;
|
|
374
|
+
border: string;
|
|
375
|
+
text: string;
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* The colours for a status pill, from the single colour the data model gives it.
|
|
379
|
+
*
|
|
380
|
+
* The fill is lightened 90% toward white and the text darkened 30%, with the
|
|
381
|
+
* border left at full saturation. That is what keeps a pale palette entry
|
|
382
|
+
* readable: using the raw colour as text on a tint of itself puts same-hue on
|
|
383
|
+
* same-hue, and the pale half of a palette becomes unreadable.
|
|
384
|
+
*
|
|
385
|
+
* Exported from here — rather than living in the grid's status cell where it
|
|
386
|
+
* started — because eru-studio's status badge and chip list paint the same
|
|
387
|
+
* values, and three copies of this arithmetic is three ways for one field to
|
|
388
|
+
* look different depending on which control renders it.
|
|
389
|
+
*/
|
|
390
|
+
declare function statusPillColors(color: string | null | undefined): StatusPillColors;
|
|
366
391
|
/** Short month names, for the `MMM` token. */
|
|
367
392
|
declare const MONTH_SHORT_NAMES: string[];
|
|
368
393
|
/**
|
|
@@ -1462,6 +1487,8 @@ declare class EruGridComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
1462
1487
|
readonly isSmViewport: _angular_core.WritableSignal<boolean>;
|
|
1463
1488
|
private containerHeight;
|
|
1464
1489
|
private resizeObserver;
|
|
1490
|
+
private boardViewportObserver;
|
|
1491
|
+
private boardViewportsSubscription;
|
|
1465
1492
|
private groupIntersectionObserver;
|
|
1466
1493
|
isColumnReordering: _angular_core.WritableSignal<boolean>;
|
|
1467
1494
|
firstTr: number | null;
|
|
@@ -1592,6 +1619,7 @@ declare class EruGridComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
1592
1619
|
grandTotalStyle: _angular_core.Signal<"bold" | "italic" | "highlighted">;
|
|
1593
1620
|
isSortable: _angular_core.Signal<boolean>;
|
|
1594
1621
|
showSortBar: _angular_core.Signal<boolean>;
|
|
1622
|
+
showBoardColumnHeader: _angular_core.Signal<boolean>;
|
|
1595
1623
|
showGroupBar: _angular_core.Signal<boolean>;
|
|
1596
1624
|
showExcelDownload: _angular_core.Signal<boolean>;
|
|
1597
1625
|
wrapHeaders: _angular_core.Signal<boolean>;
|
|
@@ -1680,6 +1708,7 @@ declare class EruGridComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
1680
1708
|
applyTokens(): void;
|
|
1681
1709
|
ngOnInit(): void;
|
|
1682
1710
|
ngAfterViewInit(): void;
|
|
1711
|
+
private observeBoardViewports;
|
|
1683
1712
|
ngOnDestroy(): void;
|
|
1684
1713
|
set_table_group(data: RowGroup[]): void;
|
|
1685
1714
|
getInitialMinHeightPx(): number;
|
|
@@ -1981,6 +2010,14 @@ declare class EruGridComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
1981
2010
|
isRowExpanded(row: any, index: number): boolean;
|
|
1982
2011
|
toggleRowExpand(row: any, index: number, event?: Event): void;
|
|
1983
2012
|
rowDetailColspan(): number;
|
|
2013
|
+
/**
|
|
2014
|
+
* Height the column's card viewport asks for: exactly the loaded cards.
|
|
2015
|
+
* The column's max-height clamps it (the viewport is a shrinkable flex item),
|
|
2016
|
+
* so a column with fewer cards than the cap ends right after the last card
|
|
2017
|
+
* and a fuller one scrolls. Never zero — an empty group keeps one slot so the
|
|
2018
|
+
* column still reads as a column.
|
|
2019
|
+
*/
|
|
2020
|
+
boardColumnBodyHeight(group: RowGroup): number;
|
|
1984
2021
|
onBoardScrolledIndexChange(firstVisibleIndex: number, group: RowGroup): void;
|
|
1985
2022
|
requestBoardRowsForGroup(group: RowGroup): void;
|
|
1986
2023
|
loadBoardAll(): void;
|
|
@@ -2923,6 +2960,8 @@ declare class TagComponent implements OnInit {
|
|
|
2923
2960
|
name: string;
|
|
2924
2961
|
color: string;
|
|
2925
2962
|
}[]>;
|
|
2963
|
+
/** Show the filter box inside the dropdown. Configurable, as in select and people. */
|
|
2964
|
+
isSearchable: _angular_core.Signal<boolean>;
|
|
2926
2965
|
isAllSelected: _angular_core.Signal<boolean>;
|
|
2927
2966
|
isIndeterminate: _angular_core.Signal<boolean>;
|
|
2928
2967
|
filteredOptions: _angular_core.Signal<{
|
|
@@ -3101,5 +3140,5 @@ declare class ThemeToggleComponent {
|
|
|
3101
3140
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ThemeToggleComponent, "eru-theme-toggle", never, {}, {}, never, never, true, never>;
|
|
3102
3141
|
}
|
|
3103
3142
|
|
|
3104
|
-
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 };
|
|
3105
|
-
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, TextareaValidationResult, TextboxValidationResult, Theme, WebsiteValidationResult };
|
|
3143
|
+
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 };
|
|
3144
|
+
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, TextareaValidationResult, TextboxValidationResult, Theme, WebsiteValidationResult };
|