eru-grid 0.0.46 → 0.0.47

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.46",
3
+ "version": "0.0.47",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^21.1.2",
6
6
  "@angular/core": "^21.1.2",
@@ -392,6 +392,33 @@ interface StatusPillColors {
392
392
  * look different depending on which control renders it.
393
393
  */
394
394
  declare function statusPillColors(color: string | null | undefined): StatusPillColors;
395
+ /** The colours a tag pill is painted with. */
396
+ interface TagPillColors {
397
+ background: string;
398
+ text: string;
399
+ dot: string;
400
+ }
401
+ /**
402
+ * The colours for a tag pill, from the single colour the data model gives it.
403
+ *
404
+ * A tag is deliberately not a status. Status owns the ringed pill — a tint fill
405
+ * inside a full-saturation border — because a record has exactly one status and
406
+ * it is the state the row is judged by. A tag field holds a list, so the same
407
+ * treatment repeated four times across one cell turns into four competing
408
+ * outlines. Tags instead get a tint fill with no border and a full-saturation
409
+ * dot ahead of the label: quieter than status at a glance, still carrying the
410
+ * palette colour at full strength in the dot so a pale entry stays identifiable.
411
+ *
412
+ * The fill is lightened 88% toward white and the text darkened 35% — slightly
413
+ * more contrast than the status pill, since with no border the fill alone has
414
+ * to describe the pill's edge.
415
+ *
416
+ * Lives here beside `statusPillColors` because eru-grid's tag cell and
417
+ * eru-studio's tag control paint the same values, and two copies of this
418
+ * arithmetic is two ways for one field to look different depending on which
419
+ * control renders it.
420
+ */
421
+ declare function tagPillColors(color: string | null | undefined): TagPillColors;
395
422
  /** Short month names, for the `MMM` token. */
396
423
  declare const MONTH_SHORT_NAMES: string[];
397
424
  /**
@@ -2991,10 +3018,7 @@ declare class TagComponent implements OnInit {
2991
3018
  onDrillableClick(event: Event): void;
2992
3019
  getProperty(property: string): any;
2993
3020
  removeTag(tag: string, event: Event): void;
2994
- getTagColor(tag: string): {
2995
- background: string;
2996
- color: string;
2997
- };
3021
+ getTagColor(tag: string): TagPillColors;
2998
3022
  isTagSelected(tagValue: string): boolean;
2999
3023
  trackByValueAndIndex(index: number, option: {
3000
3024
  value: string;
@@ -3144,5 +3168,5 @@ declare class ThemeToggleComponent {
3144
3168
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<ThemeToggleComponent, "eru-theme-toggle", never, {}, {}, never, never, true, never>;
3145
3169
  }
3146
3170
 
3147
- 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 };
3148
- 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 };
3171
+ 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 };