@flamingo-stack/openframe-frontend-core 0.0.588-2006.5556.1 → 0.0.588-snapshot.20260903225518

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.
@@ -4,6 +4,19 @@ export interface DataTableFilterOption {
4
4
  id: string;
5
5
  label: string;
6
6
  value: string | number | boolean;
7
+ /**
8
+ * How many rows this option would match, rendered right-aligned beside the
9
+ * label by `FiltersDropdown`. Optional: a list whose options come from a
10
+ * plain enum rather than a server facet has no honest number to show, and
11
+ * `undefined` draws nothing at all — which is the correct answer there.
12
+ *
13
+ * A facet is expected to be SELF-EXCLUDING (computed with every active
14
+ * filter EXCEPT its own field), so the number reads "how many rows if you
15
+ * pick this" and stays put as the user ticks options in the same dropdown.
16
+ * A count narrowed by its own filter collapses every unpicked option to 0
17
+ * the moment one is picked — do not feed one in.
18
+ */
19
+ count?: number;
7
20
  }
8
21
  declare module '@tanstack/react-table' {
9
22
  interface ColumnMeta<TData extends RowData, TValue> {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/data-table/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAErD,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;AAE5D,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CAClC;AAED,OAAO,QAAQ,uBAAuB,CAAC;IACrC,UAAU,UAAU,CAAC,KAAK,SAAS,OAAO,EAAE,MAAM;QAChD,+DAA+D;QAC/D,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,mDAAmD;QACnD,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;QACpC,uDAAuD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AAE,OAAO,CAAC;QAC3B;;;;;;;;;WASG;QACH,MAAM,CAAC,EAAE;YACP,OAAO,EAAE,qBAAqB,EAAE,CAAC;YACjC,SAAS,CAAC,EAAE,cAAc,GAAG,YAAY,GAAG,QAAQ,CAAC;YACrD,4EAA4E;YAC5E,OAAO,CAAC,EAAE,OAAO,CAAC;SACnB,CAAC;QACF;;;;WAIG;QACH,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,0DAA0D;QAC1D,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,4DAA4D;QAC5D,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flamingo-stack/openframe-frontend-core",
3
- "version": "0.0.588-2006.5556.1",
3
+ "version": "0.0.588-snapshot.20260903225518",
4
4
  "description": "Shared design system and components for all Flamingo platforms",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -6,7 +6,7 @@ Extends TanStack Table's `ColumnMeta` interface with Flamingo-specific column co
6
6
  ### Types & Interfaces
7
7
 
8
8
  - **`TailwindBreakpoint`** — Union type of supported responsive breakpoints: `'md' | 'lg' | 'xl' | '2xl'`
9
- - **`DataTableFilterOption`** — Shape for individual filter dropdown options, containing `id`, `label`, and `value` fields
9
+ - **`DataTableFilterOption`** — Shape for individual filter dropdown options, containing `id`, `label`, `value` and an optional `count` (rows the option would match, rendered beside the label; expects a self-excluding facet)
10
10
 
11
11
  ### `ColumnMeta` Module Augmentation
12
12
 
@@ -6,6 +6,19 @@ export interface DataTableFilterOption {
6
6
  id: string;
7
7
  label: string;
8
8
  value: string | number | boolean;
9
+ /**
10
+ * How many rows this option would match, rendered right-aligned beside the
11
+ * label by `FiltersDropdown`. Optional: a list whose options come from a
12
+ * plain enum rather than a server facet has no honest number to show, and
13
+ * `undefined` draws nothing at all — which is the correct answer there.
14
+ *
15
+ * A facet is expected to be SELF-EXCLUDING (computed with every active
16
+ * filter EXCEPT its own field), so the number reads "how many rows if you
17
+ * pick this" and stays put as the user ticks options in the same dropdown.
18
+ * A count narrowed by its own filter collapses every unpicked option to 0
19
+ * the moment one is picked — do not feed one in.
20
+ */
21
+ count?: number;
9
22
  }
10
23
 
11
24
  declare module '@tanstack/react-table' {