@area8975/ui 0.2.2-dev.39 → 0.2.2-dev.40

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": "@area8975/ui",
3
- "version": "0.2.2-dev.39",
3
+ "version": "0.2.2-dev.40",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^22.0.0",
6
6
  "@angular/core": "^22.0.0",
@@ -3828,10 +3828,29 @@ export interface TableDateRangeFacet {
3828
3828
  min?: IsoDate | null;
3829
3829
  max?: IsoDate | null;
3830
3830
  }
3831
- export type TableFacet = TableOptionsFacet | TableDateRangeFacet;
3831
+ /** Either end is null when it's open. */
3832
+ export interface TableAmountRange {
3833
+ min: number | null;
3834
+ max: number | null;
3835
+ }
3836
+ export interface TableAmountRangePreset {
3837
+ label: string;
3838
+ range: TableAmountRange;
3839
+ }
3840
+ /** Writes `{ min, max }` under `id`, both ends included, with at least one of them set. */
3841
+ export interface TableAmountRangeFacet {
3842
+ id: string;
3843
+ label: string;
3844
+ kind: 'amountRange';
3845
+ presets?: TableAmountRangePreset[];
3846
+ /** Shown before each amount, such as a currency symbol. */
3847
+ prefix?: string;
3848
+ }
3849
+ export type TableFacet = TableOptionsFacet | TableDateRangeFacet | TableAmountRangeFacet;
3832
3850
  export type TableFacetDateRange = DateRange;
3833
3851
  type Filters = Record<string, unknown>;
3834
- type DateMode = 'any' | 'custom' | number;
3852
+ type RangeMode = 'any' | 'custom' | number;
3853
+ type AmountEnd = keyof TableAmountRange;
3835
3854
  export declare class UiTableFiltersComponent {
3836
3855
  private readonly registry;
3837
3856
  readonly facets: import("@angular/core").InputSignal<TableFacet[]>;
@@ -3841,9 +3860,10 @@ export declare class UiTableFiltersComponent {
3841
3860
  /** Below this breakpoint the panel becomes a Filters button and a drawer. */
3842
3861
  readonly collapseBelow: import("@angular/core").InputSignal<"sm" | "md" | "lg" | "xl" | "2xl">;
3843
3862
  protected readonly idPrefix: string;
3844
- protected readonly anyDate: DateMode;
3845
- protected readonly customDate: DateMode;
3846
- private readonly customDates;
3863
+ protected readonly anyRange: RangeMode;
3864
+ protected readonly customRange: RangeMode;
3865
+ private readonly customRanges;
3866
+ private readonly amountDrafts;
3847
3867
  private readonly expanded;
3848
3868
  private readonly linked;
3849
3869
  protected readonly appliedCount: import("@angular/core").Signal<number>;
@@ -3863,11 +3883,18 @@ export declare class UiTableFiltersComponent {
3863
3883
  protected hiddenCount(facet: TableOptionsFacet): number;
3864
3884
  protected toggleExpanded(facet: TableOptionsFacet): void;
3865
3885
  protected range(facet: TableDateRangeFacet): DateRange;
3866
- protected dateMode(facet: TableDateRangeFacet): DateMode;
3867
- protected pickDate(facet: TableDateRangeFacet, mode: DateMode): void;
3886
+ protected dateMode(facet: TableDateRangeFacet): RangeMode;
3887
+ protected pickDate(facet: TableDateRangeFacet, mode: RangeMode): void;
3868
3888
  protected setRange(facet: TableDateRangeFacet, range: DateRange): void;
3889
+ protected amountRange(facet: TableAmountRangeFacet): TableAmountRange | undefined;
3890
+ protected amountMode(facet: TableAmountRangeFacet): RangeMode;
3891
+ protected pickAmount(facet: TableAmountRangeFacet, mode: RangeMode): void;
3892
+ protected amountText(facet: TableAmountRangeFacet, end: AmountEnd): string;
3893
+ protected typeAmount(facet: TableAmountRangeFacet, end: AmountEnd, text: string): void;
3894
+ protected isAmountValid(facet: TableAmountRangeFacet, end: AmountEnd): boolean;
3869
3895
  protected clearAll(): void;
3870
3896
  private setCustom;
3897
+ private forgetAmountDraft;
3871
3898
  private isPastCutoff;
3872
3899
  private isSelected;
3873
3900
  private apply;