@pipe0/react 1.0.15 → 1.0.18
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @pipe0/elements-react
|
|
2
2
|
|
|
3
|
+
## 1.0.18
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 206fb9b: Add surfe to person identity
|
|
8
|
+
- Updated dependencies [206fb9b]
|
|
9
|
+
- @pipe0/base@1.0.18
|
|
10
|
+
|
|
11
|
+
## 1.0.17
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 8385718: Restructure autocomplete
|
|
16
|
+
- Updated dependencies [8385718]
|
|
17
|
+
- @pipe0/base@1.0.17
|
|
18
|
+
|
|
19
|
+
## 1.0.16
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Change autocomplete
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
- @pipe0/base@1.0.16
|
|
26
|
+
|
|
3
27
|
## 1.0.15
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
|
@@ -33,12 +33,12 @@ declare function useSearchCatalogTable(config?: {
|
|
|
33
33
|
removeColumnFilter: (id: "inputFields" | "outputFields" | "tags" | "providers") => void;
|
|
34
34
|
resetFilters: () => void;
|
|
35
35
|
getColumnFilterValue: (id: "inputFields" | "outputFields" | "tags" | "providers") => string;
|
|
36
|
-
sortedOutputFieldEntries: [string, ("companies:profiles:crustdata@1" | "companies:profiles:crustdata@2" | "companies:profiles:crustdata@3" | "companies:profiles:amplemarket@1" | "companies:profiles:amplemarket@2" | "jobs:crustdata@1" | "people:profiles:crustdata@1" | "people:profiles:crustdata@2" | "people:profiles:crustdata@3" | "people:profiles:amplemarket@1" | "people:profiles:amplemarket@2" | "companies:entitysearch:parallel@1" | "people:entitysearch:parallel@1" | "people:eventguests:luma@1" | "people:channelmembers:slack@1" | "events:googlecalendar@1" | "sheet:rows@1" | "bucket:entries@1" | "query:postgres@1" | "query:databricks@1" | "posts:content:crustdata@1" | "posts:x@1" | "people:followers:x@1" | "people:followers:self:x@1" | "contacts:hubspot@1" | "companies:hubspot@1" | "deals:hubspot@1" | "owners:hubspot@1" | "contacts:salesforce@1" | "leads:salesforce@1" | "accounts:salesforce@1" | "opportunities:salesforce@1" | "users:salesforce@1" | "query:salesforce@1" | "people:attio@1" | "companies:attio@1" | "deals:attio@1" | "records:attio@1" | "entries:attio@1" | "query:attio@1" | "users:attio@1")[]][];
|
|
37
|
-
sortedTagEntries: [string, ("companies:profiles:crustdata@1" | "companies:profiles:crustdata@2" | "companies:profiles:crustdata@3" | "companies:profiles:amplemarket@1" | "companies:profiles:amplemarket@2" | "jobs:crustdata@1" | "people:profiles:crustdata@1" | "people:profiles:crustdata@2" | "people:profiles:crustdata@3" | "people:profiles:amplemarket@1" | "people:profiles:amplemarket@2" | "companies:entitysearch:parallel@1" | "people:entitysearch:parallel@1" | "people:eventguests:luma@1" | "people:channelmembers:slack@1" | "events:googlecalendar@1" | "sheet:rows@1" | "bucket:entries@1" | "query:postgres@1" | "query:databricks@1" | "posts:content:crustdata@1" | "posts:x@1" | "people:followers:x@1" | "people:followers:self:x@1" | "contacts:hubspot@1" | "companies:hubspot@1" | "deals:hubspot@1" | "owners:hubspot@1" | "contacts:salesforce@1" | "leads:salesforce@1" | "accounts:salesforce@1" | "opportunities:salesforce@1" | "users:salesforce@1" | "query:salesforce@1" | "people:attio@1" | "companies:attio@1" | "deals:attio@1" | "records:attio@1" | "entries:attio@1" | "query:attio@1" | "users:attio@1")[]][];
|
|
38
|
-
sortedProviderEntries: [string, ("companies:profiles:crustdata@1" | "companies:profiles:crustdata@2" | "companies:profiles:crustdata@3" | "companies:profiles:amplemarket@1" | "companies:profiles:amplemarket@2" | "jobs:crustdata@1" | "people:profiles:crustdata@1" | "people:profiles:crustdata@2" | "people:profiles:crustdata@3" | "people:profiles:amplemarket@1" | "people:profiles:amplemarket@2" | "companies:entitysearch:parallel@1" | "people:entitysearch:parallel@1" | "people:eventguests:luma@1" | "people:channelmembers:slack@1" | "events:googlecalendar@1" | "sheet:rows@1" | "bucket:entries@1" | "query:postgres@1" | "query:databricks@1" | "posts:content:crustdata@1" | "posts:x@1" | "people:followers:x@1" | "people:followers:self:x@1" | "contacts:hubspot@1" | "companies:hubspot@1" | "deals:hubspot@1" | "owners:hubspot@1" | "contacts:salesforce@1" | "leads:salesforce@1" | "accounts:salesforce@1" | "opportunities:salesforce@1" | "users:salesforce@1" | "query:salesforce@1" | "people:attio@1" | "companies:attio@1" | "deals:attio@1" | "records:attio@1" | "entries:attio@1" | "query:attio@1" | "users:attio@1")[]][];
|
|
39
|
-
searchIdsByOutputField: Record<string, ("companies:profiles:crustdata@1" | "companies:profiles:crustdata@2" | "companies:profiles:crustdata@3" | "companies:profiles:amplemarket@1" | "companies:profiles:amplemarket@2" | "jobs:crustdata@1" | "people:profiles:crustdata@1" | "people:profiles:crustdata@2" | "people:profiles:crustdata@3" | "people:profiles:amplemarket@1" | "people:profiles:amplemarket@2" | "companies:entitysearch:parallel@1" | "people:entitysearch:parallel@1" | "people:eventguests:luma@1" | "people:channelmembers:slack@1" | "events:googlecalendar@1" | "sheet:rows@1" | "bucket:entries@1" | "query:postgres@1" | "query:databricks@1" | "posts:content:crustdata@1" | "posts:x@1" | "people:followers:x@1" | "people:followers:self:x@1" | "contacts:hubspot@1" | "companies:hubspot@1" | "deals:hubspot@1" | "owners:hubspot@1" | "contacts:salesforce@1" | "leads:salesforce@1" | "accounts:salesforce@1" | "opportunities:salesforce@1" | "users:salesforce@1" | "query:salesforce@1" | "people:attio@1" | "companies:attio@1" | "deals:attio@1" | "records:attio@1" | "entries:attio@1" | "query:attio@1" | "users:attio@1")[]>;
|
|
40
|
-
searchIdsByProvider: Record<string, ("companies:profiles:crustdata@1" | "companies:profiles:crustdata@2" | "companies:profiles:crustdata@3" | "companies:profiles:amplemarket@1" | "companies:profiles:amplemarket@2" | "jobs:crustdata@1" | "people:profiles:crustdata@1" | "people:profiles:crustdata@2" | "people:profiles:crustdata@3" | "people:profiles:amplemarket@1" | "people:profiles:amplemarket@2" | "companies:entitysearch:parallel@1" | "people:entitysearch:parallel@1" | "people:eventguests:luma@1" | "people:channelmembers:slack@1" | "events:googlecalendar@1" | "sheet:rows@1" | "bucket:entries@1" | "query:postgres@1" | "query:databricks@1" | "posts:content:crustdata@1" | "posts:x@1" | "people:followers:x@1" | "people:followers:self:x@1" | "contacts:hubspot@1" | "companies:hubspot@1" | "deals:hubspot@1" | "owners:hubspot@1" | "contacts:salesforce@1" | "leads:salesforce@1" | "accounts:salesforce@1" | "opportunities:salesforce@1" | "users:salesforce@1" | "query:salesforce@1" | "people:attio@1" | "companies:attio@1" | "deals:attio@1" | "records:attio@1" | "entries:attio@1" | "query:attio@1" | "users:attio@1")[]>;
|
|
41
|
-
searchIdsByTag: Record<string, ("companies:profiles:crustdata@1" | "companies:profiles:crustdata@2" | "companies:profiles:crustdata@3" | "companies:profiles:amplemarket@1" | "companies:profiles:amplemarket@2" | "jobs:crustdata@1" | "people:profiles:crustdata@1" | "people:profiles:crustdata@2" | "people:profiles:crustdata@3" | "people:profiles:amplemarket@1" | "people:profiles:amplemarket@2" | "companies:entitysearch:parallel@1" | "people:entitysearch:parallel@1" | "people:eventguests:luma@1" | "people:channelmembers:slack@1" | "events:googlecalendar@1" | "sheet:rows@1" | "bucket:entries@1" | "query:postgres@1" | "query:databricks@1" | "posts:content:crustdata@1" | "posts:x@1" | "people:followers:x@1" | "people:followers:self:x@1" | "contacts:hubspot@1" | "companies:hubspot@1" | "deals:hubspot@1" | "owners:hubspot@1" | "contacts:salesforce@1" | "leads:salesforce@1" | "accounts:salesforce@1" | "opportunities:salesforce@1" | "users:salesforce@1" | "query:salesforce@1" | "people:attio@1" | "companies:attio@1" | "deals:attio@1" | "records:attio@1" | "entries:attio@1" | "query:attio@1" | "users:attio@1")[]>;
|
|
36
|
+
sortedOutputFieldEntries: [string, ("companies:profiles:crustdata@1" | "companies:profiles:crustdata@2" | "companies:profiles:crustdata@3" | "companies:profiles:amplemarket@1" | "companies:profiles:amplemarket@2" | "jobs:crustdata@1" | "people:profiles:crustdata@1" | "people:profiles:crustdata@2" | "people:profiles:crustdata@3" | "people:profiles:amplemarket@1" | "people:profiles:amplemarket@2" | "companies:entitysearch:parallel@1" | "people:entitysearch:parallel@1" | "research:agent@1" | "people:eventguests:luma@1" | "people:channelmembers:slack@1" | "events:googlecalendar@1" | "sheet:rows@1" | "bucket:entries@1" | "query:postgres@1" | "query:databricks@1" | "posts:content:crustdata@1" | "posts:x@1" | "people:followers:x@1" | "people:followers:self:x@1" | "contacts:hubspot@1" | "companies:hubspot@1" | "deals:hubspot@1" | "owners:hubspot@1" | "contacts:salesforce@1" | "leads:salesforce@1" | "accounts:salesforce@1" | "opportunities:salesforce@1" | "users:salesforce@1" | "query:salesforce@1" | "people:attio@1" | "companies:attio@1" | "deals:attio@1" | "records:attio@1" | "entries:attio@1" | "query:attio@1" | "users:attio@1")[]][];
|
|
37
|
+
sortedTagEntries: [string, ("companies:profiles:crustdata@1" | "companies:profiles:crustdata@2" | "companies:profiles:crustdata@3" | "companies:profiles:amplemarket@1" | "companies:profiles:amplemarket@2" | "jobs:crustdata@1" | "people:profiles:crustdata@1" | "people:profiles:crustdata@2" | "people:profiles:crustdata@3" | "people:profiles:amplemarket@1" | "people:profiles:amplemarket@2" | "companies:entitysearch:parallel@1" | "people:entitysearch:parallel@1" | "research:agent@1" | "people:eventguests:luma@1" | "people:channelmembers:slack@1" | "events:googlecalendar@1" | "sheet:rows@1" | "bucket:entries@1" | "query:postgres@1" | "query:databricks@1" | "posts:content:crustdata@1" | "posts:x@1" | "people:followers:x@1" | "people:followers:self:x@1" | "contacts:hubspot@1" | "companies:hubspot@1" | "deals:hubspot@1" | "owners:hubspot@1" | "contacts:salesforce@1" | "leads:salesforce@1" | "accounts:salesforce@1" | "opportunities:salesforce@1" | "users:salesforce@1" | "query:salesforce@1" | "people:attio@1" | "companies:attio@1" | "deals:attio@1" | "records:attio@1" | "entries:attio@1" | "query:attio@1" | "users:attio@1")[]][];
|
|
38
|
+
sortedProviderEntries: [string, ("companies:profiles:crustdata@1" | "companies:profiles:crustdata@2" | "companies:profiles:crustdata@3" | "companies:profiles:amplemarket@1" | "companies:profiles:amplemarket@2" | "jobs:crustdata@1" | "people:profiles:crustdata@1" | "people:profiles:crustdata@2" | "people:profiles:crustdata@3" | "people:profiles:amplemarket@1" | "people:profiles:amplemarket@2" | "companies:entitysearch:parallel@1" | "people:entitysearch:parallel@1" | "research:agent@1" | "people:eventguests:luma@1" | "people:channelmembers:slack@1" | "events:googlecalendar@1" | "sheet:rows@1" | "bucket:entries@1" | "query:postgres@1" | "query:databricks@1" | "posts:content:crustdata@1" | "posts:x@1" | "people:followers:x@1" | "people:followers:self:x@1" | "contacts:hubspot@1" | "companies:hubspot@1" | "deals:hubspot@1" | "owners:hubspot@1" | "contacts:salesforce@1" | "leads:salesforce@1" | "accounts:salesforce@1" | "opportunities:salesforce@1" | "users:salesforce@1" | "query:salesforce@1" | "people:attio@1" | "companies:attio@1" | "deals:attio@1" | "records:attio@1" | "entries:attio@1" | "query:attio@1" | "users:attio@1")[]][];
|
|
39
|
+
searchIdsByOutputField: Record<string, ("companies:profiles:crustdata@1" | "companies:profiles:crustdata@2" | "companies:profiles:crustdata@3" | "companies:profiles:amplemarket@1" | "companies:profiles:amplemarket@2" | "jobs:crustdata@1" | "people:profiles:crustdata@1" | "people:profiles:crustdata@2" | "people:profiles:crustdata@3" | "people:profiles:amplemarket@1" | "people:profiles:amplemarket@2" | "companies:entitysearch:parallel@1" | "people:entitysearch:parallel@1" | "research:agent@1" | "people:eventguests:luma@1" | "people:channelmembers:slack@1" | "events:googlecalendar@1" | "sheet:rows@1" | "bucket:entries@1" | "query:postgres@1" | "query:databricks@1" | "posts:content:crustdata@1" | "posts:x@1" | "people:followers:x@1" | "people:followers:self:x@1" | "contacts:hubspot@1" | "companies:hubspot@1" | "deals:hubspot@1" | "owners:hubspot@1" | "contacts:salesforce@1" | "leads:salesforce@1" | "accounts:salesforce@1" | "opportunities:salesforce@1" | "users:salesforce@1" | "query:salesforce@1" | "people:attio@1" | "companies:attio@1" | "deals:attio@1" | "records:attio@1" | "entries:attio@1" | "query:attio@1" | "users:attio@1")[]>;
|
|
40
|
+
searchIdsByProvider: Record<string, ("companies:profiles:crustdata@1" | "companies:profiles:crustdata@2" | "companies:profiles:crustdata@3" | "companies:profiles:amplemarket@1" | "companies:profiles:amplemarket@2" | "jobs:crustdata@1" | "people:profiles:crustdata@1" | "people:profiles:crustdata@2" | "people:profiles:crustdata@3" | "people:profiles:amplemarket@1" | "people:profiles:amplemarket@2" | "companies:entitysearch:parallel@1" | "people:entitysearch:parallel@1" | "research:agent@1" | "people:eventguests:luma@1" | "people:channelmembers:slack@1" | "events:googlecalendar@1" | "sheet:rows@1" | "bucket:entries@1" | "query:postgres@1" | "query:databricks@1" | "posts:content:crustdata@1" | "posts:x@1" | "people:followers:x@1" | "people:followers:self:x@1" | "contacts:hubspot@1" | "companies:hubspot@1" | "deals:hubspot@1" | "owners:hubspot@1" | "contacts:salesforce@1" | "leads:salesforce@1" | "accounts:salesforce@1" | "opportunities:salesforce@1" | "users:salesforce@1" | "query:salesforce@1" | "people:attio@1" | "companies:attio@1" | "deals:attio@1" | "records:attio@1" | "entries:attio@1" | "query:attio@1" | "users:attio@1")[]>;
|
|
41
|
+
searchIdsByTag: Record<string, ("companies:profiles:crustdata@1" | "companies:profiles:crustdata@2" | "companies:profiles:crustdata@3" | "companies:profiles:amplemarket@1" | "companies:profiles:amplemarket@2" | "jobs:crustdata@1" | "people:profiles:crustdata@1" | "people:profiles:crustdata@2" | "people:profiles:crustdata@3" | "people:profiles:amplemarket@1" | "people:profiles:amplemarket@2" | "companies:entitysearch:parallel@1" | "people:entitysearch:parallel@1" | "research:agent@1" | "people:eventguests:luma@1" | "people:channelmembers:slack@1" | "events:googlecalendar@1" | "sheet:rows@1" | "bucket:entries@1" | "query:postgres@1" | "query:databricks@1" | "posts:content:crustdata@1" | "posts:x@1" | "people:followers:x@1" | "people:followers:self:x@1" | "contacts:hubspot@1" | "companies:hubspot@1" | "deals:hubspot@1" | "owners:hubspot@1" | "contacts:salesforce@1" | "leads:salesforce@1" | "accounts:salesforce@1" | "opportunities:salesforce@1" | "users:salesforce@1" | "query:salesforce@1" | "people:attio@1" | "companies:attio@1" | "deals:attio@1" | "records:attio@1" | "entries:attio@1" | "query:attio@1" | "users:attio@1")[]>;
|
|
42
42
|
};
|
|
43
43
|
type UseSearchCatalogTableReturn = ReturnType<typeof useSearchCatalogTable>;
|
|
44
44
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-search-catalog-table.d.mts","names":[],"sources":["../../src/hooks/use-search-catalog-table.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"use-search-catalog-table.d.mts","names":[],"sources":["../../src/hooks/use-search-catalog-table.ts"],"mappings":";;;;;;;KA+BY,wBAAA,GAA2B,MAAA,SAAe,QAAA;AAAA,iBAkDtC,qBAAA,CACd,MAAA;EACE,oBAAA,GAAuB,YAAA;EAEvB,MAAA,GAAS,aAAA;EAtDuB;;;;AAkDpC;EAUI,WAAA,GAAc,cAAA;AAAA;;;;cAkI4B,cAAA;WAAuB,cAAA;EAAA;;;;;0BAnDtD,cAAA;;yCAAc,OAAA,CAAA,cAAA;+EApBiC,KAAA;;;;;;;;;;;KA4IlD,2BAAA,GAA8B,UAAA,QAAkB,qBAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { catalogSearchFilter, catalogSearchSort } from "../utils/catalog-helpers.mjs";
|
|
2
2
|
import { useDebounce } from "./use-debounce.mjs";
|
|
3
3
|
import { useCallback, useMemo, useState } from "react";
|
|
4
|
-
import { filterSearchEntries, getDefaultSearchOutputFields, getInitialSearchTableData, getLoweestSearchCreditAmount, getSearchAccessLevel, getSearchSearchTarget, getSearchTableDataAggregates, getStartingCostPerSearchProvider, isEntryAccessible } from "@pipe0/base";
|
|
4
|
+
import { filterSearchEntries, getDefaultSearchOutputFields, getInitialSearchTableData, getLoweestSearchCreditAmount, getSearchAccessLevel, getSearchSearchTarget, getSearchTableDataAggregates, getStartingCostPerSearchProvider, isEntryAccessible, isTokenBilledOperations } from "@pipe0/base";
|
|
5
5
|
import { createColumnHelper, getCoreRowModel, getFilteredRowModel, getSortedRowModel, useReactTable } from "@tanstack/react-table";
|
|
6
6
|
|
|
7
7
|
//#region src/hooks/use-search-catalog-table.ts
|
|
@@ -119,7 +119,7 @@ function useSearchCatalogTable(config = {}) {
|
|
|
119
119
|
providers: [entry.provider],
|
|
120
120
|
startingCostPerProvider: getStartingCostPerSearchProvider(latestEntry.searchId),
|
|
121
121
|
startingCreditAmount: getLoweestSearchCreditAmount(latestEntry),
|
|
122
|
-
costMode: latestEntry.cost.mode ?? "per_page",
|
|
122
|
+
costMode: isTokenBilledOperations(latestEntry.billableOperations ?? {}) ? "usage" : latestEntry.cost.mode ?? "per_page",
|
|
123
123
|
defaultOutputFields: getDefaultSearchOutputFields(latestEntry.searchId),
|
|
124
124
|
docPath: latestEntry.docPath,
|
|
125
125
|
entry,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-search-catalog-table.mjs","names":[],"sources":["../../src/hooks/use-search-catalog-table.ts"],"sourcesContent":["import {\n type CatalogFilter,\n filterSearchEntries,\n getDefaultSearchOutputFields,\n getInitialSearchTableData,\n getLoweestSearchCreditAmount,\n getSearchAccessLevel,\n getSearchSearchTarget,\n getSearchTableDataAggregates,\n getStartingCostPerSearchProvider,\n isEntryAccessible,\n type OrgAccessLevel,\n type SearchCatalogEntry,\n type SearchCatalogTableData,\n type SearchCategory,\n type SearchId,\n} from \"@pipe0/base\";\nimport {\n type ColumnFilter,\n createColumnHelper,\n getCoreRowModel,\n getFilteredRowModel,\n getSortedRowModel,\n useReactTable,\n} from \"@tanstack/react-table\";\nimport { useCallback, useMemo, useState } from \"react\";\nimport type { CostMode, SearchCardData } from \"../types/catalog-adapters.js\";\nimport { catalogSearchFilter, catalogSearchSort } from \"../utils/catalog-helpers.js\";\nimport { useDebounce } from \"./use-debounce.js\";\n\nexport type SearchOutputFieldEntries = Record<string, SearchId[]>;\n\n/** Mirrors the pipe hook: partner-gated searches are hidden below partner. */\nfunction hidePartnerGated<T extends { searchId: SearchId }>(\n rows: T[],\n accessLevel: OrgAccessLevel | undefined,\n): T[] {\n if (accessLevel === undefined || accessLevel === \"partner\") return rows;\n return rows.filter((row) => getSearchAccessLevel(row.searchId) !== \"partner\");\n}\n\nconst columnHelper = createColumnHelper<SearchCatalogTableData>();\n\nconst columns = [\n columnHelper.accessor(\"searchId\", {\n filterFn: \"includesString\",\n enableGlobalFilter: false,\n }),\n columnHelper.accessor(\"description\", {\n enableGlobalFilter: false,\n }),\n columnHelper.accessor(\"label\", {\n filterFn: \"includesString\",\n enableGlobalFilter: false,\n }),\n columnHelper.accessor((row) => getDefaultSearchOutputFields(row.searchId) || [], {\n id: \"outputFields\",\n filterFn: \"arrIncludes\",\n enableGlobalFilter: false,\n }),\n columnHelper.accessor((row) => row.tags || [], {\n id: \"tags\",\n filterFn: \"arrIncludes\",\n enableGlobalFilter: false,\n }),\n columnHelper.accessor((row) => row.provider, {\n id: \"providers\",\n enableGlobalFilter: false,\n }),\n // Hidden relevance column — the ONLY globally-filterable one, so the global\n // filter scores each row exactly once and catalogSearchSort can read the\n // score back from this column's filter meta.\n columnHelper.accessor((row) => getSearchSearchTarget(row), {\n id: \"search\",\n enableGlobalFilter: true,\n enableSorting: true,\n sortingFn: catalogSearchSort,\n }),\n];\n\nexport function useSearchCatalogTable(\n config: {\n initialColumnFilters?: ColumnFilter[];\n /** Optional whitelist/blacklist of searches and providers. Memoize. */\n filter?: CatalogFilter;\n /**\n * The viewing org's access level. Hides partner-gated searches below\n * partner and marks verified-gated cards `locked` below verified. Omit\n * for no gating (docs/playground).\n */\n accessLevel?: OrgAccessLevel;\n } = {},\n) {\n const [category, setCategory] = useState<SearchCategory | null>(null);\n const { initialColumnFilters = [] as ColumnFilter[], filter, accessLevel } = config;\n\n const initialSearchTableData = useMemo(\n () =>\n hidePartnerGated(\n filterSearchEntries(getInitialSearchTableData(category), filter),\n accessLevel,\n ),\n [category, filter, accessLevel],\n );\n\n // Baseline (config.filter applied, but no category / column / global filter).\n // Drives the stable category-button counts so the row doesn't jump.\n const baselineTableData = useMemo(\n () =>\n hidePartnerGated(filterSearchEntries(getInitialSearchTableData(null), filter), accessLevel),\n [filter, accessLevel],\n );\n\n const table = useReactTable({\n columns,\n data: initialSearchTableData,\n getCoreRowModel: getCoreRowModel(),\n getFilteredRowModel: getFilteredRowModel(),\n getSortedRowModel: getSortedRowModel(),\n globalFilterFn: catalogSearchFilter,\n getColumnCanGlobalFilter: (column) => column.columnDef.enableGlobalFilter !== false,\n initialState: {\n columnFilters: initialColumnFilters,\n pagination: {\n pageSize: 10,\n },\n },\n });\n\n const columnFilters = table.getState().columnFilters;\n\n const aggregates = useMemo(\n () => getSearchTableDataAggregates(initialSearchTableData, category),\n [category, initialSearchTableData],\n );\n\n const [globalFilterInput, setGlobalFilterInput, setGlobalFilterImmediately] = useDebounce((v) => {\n if (v === table.getState().globalFilter) return;\n table.setGlobalFilter(v);\n // Relevance order only while a query is active; empty query restores\n // catalog order.\n table.setSorting(v ? [{ id: \"search\", desc: true }] : []);\n if (v) {\n setCategory(null);\n table.setColumnFilters([]);\n }\n });\n\n const addColumnFilter = useCallback(\n (id: \"inputFields\" | \"outputFields\" | \"tags\" | \"providers\", value: string) => {\n setGlobalFilterImmediately(\"\");\n table.setColumnFilters([{ id, value }]);\n },\n [setGlobalFilterImmediately, table],\n );\n\n const resetFilters = useCallback(() => {\n setGlobalFilterImmediately(\"\");\n setCategory(null);\n }, [setGlobalFilterImmediately]);\n\n const removeColumnFilter = useCallback(\n (id: \"inputFields\" | \"outputFields\" | \"tags\" | \"providers\") => {\n table.getColumn(id)?.setFilterValue(null);\n },\n [table],\n );\n\n const handleCategoryChange = useCallback(\n (category: SearchCategory | null) => {\n setCategory(category);\n table.setColumnFilters([]);\n setGlobalFilterImmediately(\"\");\n },\n [table, setGlobalFilterImmediately],\n );\n\n const getColumnFilterValue = useCallback(\n (id: \"inputFields\" | \"outputFields\" | \"tags\" | \"providers\") => {\n const res = columnFilters.find((f) => f.id === id)?.value;\n return res as string;\n },\n [columnFilters],\n );\n\n const rows = table.getRowModel().rows;\n const cards = useMemo<SearchCardData[]>(\n () =>\n rows.map((row) => {\n const entry = row.original;\n const latestEntry = (aggregates.searchEntriesByBaseSearch[entry.baseSearch]?.[0] ??\n entry) as SearchCatalogEntry & { searchId: SearchId };\n const gate = getSearchAccessLevel(latestEntry.searchId);\n const locked =\n accessLevel !== undefined && gate !== undefined && !isEntryAccessible(gate, accessLevel);\n return {\n ...(locked ? { locked, requiredAccessLevel: gate } : {}),\n searchId: latestEntry.searchId,\n baseSearch: entry.baseSearch,\n label: entry.label,\n description: entry.description,\n provider: entry.provider,\n providers: [entry.provider],\n startingCostPerProvider: getStartingCostPerSearchProvider(latestEntry.searchId),\n startingCreditAmount: getLoweestSearchCreditAmount(latestEntry),\n costMode: (latestEntry.cost.mode ?? \"per_page\") as CostMode,\n defaultOutputFields: getDefaultSearchOutputFields(latestEntry.searchId),\n docPath: latestEntry.docPath,\n entry: entry as SearchCatalogTableData,\n latestEntry,\n };\n }),\n [rows, aggregates.searchEntriesByBaseSearch, accessLevel],\n );\n\n const cardsByCategory = useMemo<{ category: SearchCategory; cards: SearchCardData[] }[]>(() => {\n const groups = new Map<SearchCategory, SearchCardData[]>();\n for (const card of cards) {\n const cats = (card.entry.categories ?? []) as SearchCategory[];\n for (const cat of cats) {\n const arr = groups.get(cat);\n if (arr) arr.push(card);\n else groups.set(cat, [card]);\n }\n }\n return Array.from(groups, ([category, group]) => ({\n category,\n cards: group,\n }));\n }, [cards]);\n\n const categoryCounts = useMemo<Partial<Record<SearchCategory, number>>>(() => {\n const counts: Partial<Record<SearchCategory, number>> = {};\n for (const card of cards) {\n const cats = (card.entry.categories ?? []) as SearchCategory[];\n for (const cat of cats) {\n counts[cat] = (counts[cat] ?? 0) + 1;\n }\n }\n return counts;\n }, [cards]);\n\n // Stable counts based on the baseline (no category / column / global filter\n // applied).\n const baselineCardCount = baselineTableData.length;\n const baselineCategoryCounts = useMemo<Partial<Record<SearchCategory, number>>>(() => {\n const counts: Partial<Record<SearchCategory, number>> = {};\n for (const entry of baselineTableData) {\n const cats = (entry.categories ?? []) as SearchCategory[];\n for (const cat of cats) {\n counts[cat] = (counts[cat] ?? 0) + 1;\n }\n }\n return counts;\n }, [baselineTableData]);\n\n return {\n table,\n cards,\n cardsByCategory,\n categoryCounts,\n baselineCardCount,\n baselineCategoryCounts,\n\n category,\n setCategory: handleCategoryChange,\n globalFilterInput,\n setGlobalFilterInput,\n\n addColumnFilter,\n removeColumnFilter,\n resetFilters,\n getColumnFilterValue,\n\n sortedOutputFieldEntries: aggregates.sortedOutputFieldEntries,\n sortedTagEntries: aggregates.sortedTagEntries,\n sortedProviderEntries: aggregates.sortedProviderEntries,\n\n searchIdsByOutputField: aggregates.searchIdsByOutputField,\n searchIdsByProvider: aggregates.searchIdsByProvider,\n searchIdsByTag: aggregates.searchIdsByTag,\n };\n}\n\nexport type UseSearchCatalogTableReturn = ReturnType<typeof useSearchCatalogTable>;\n"],"mappings":";;;;;;;;AAiCA,SAAS,iBACP,MACA,aACK;AACL,KAAI,gBAAgB,UAAa,gBAAgB,UAAW,QAAO;AACnE,QAAO,KAAK,QAAQ,QAAQ,qBAAqB,IAAI,SAAS,KAAK,UAAU;;AAG/E,MAAM,eAAe,oBAA4C;AAEjE,MAAM,UAAU;CACd,aAAa,SAAS,YAAY;EAChC,UAAU;EACV,oBAAoB;EACrB,CAAC;CACF,aAAa,SAAS,eAAe,EACnC,oBAAoB,OACrB,C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WAAW;EAC7B,uBAAuB,WAAW;EAElC,wBAAwB,WAAW;EACnC,qBAAqB,WAAW;EAChC,gBAAgB,WAAW;EAC5B"}
|
|
1
|
+
{"version":3,"file":"use-search-catalog-table.mjs","names":[],"sources":["../../src/hooks/use-search-catalog-table.ts"],"sourcesContent":["import {\n type CatalogFilter,\n filterSearchEntries,\n getDefaultSearchOutputFields,\n getInitialSearchTableData,\n getLoweestSearchCreditAmount,\n getSearchAccessLevel,\n getSearchSearchTarget,\n getSearchTableDataAggregates,\n getStartingCostPerSearchProvider,\n isEntryAccessible,\n isTokenBilledOperations,\n type OrgAccessLevel,\n type SearchCatalogEntry,\n type SearchCatalogTableData,\n type SearchCategory,\n type SearchId,\n} from \"@pipe0/base\";\nimport {\n type ColumnFilter,\n createColumnHelper,\n getCoreRowModel,\n getFilteredRowModel,\n getSortedRowModel,\n useReactTable,\n} from \"@tanstack/react-table\";\nimport { useCallback, useMemo, useState } from \"react\";\nimport type { CostMode, SearchCardData } from \"../types/catalog-adapters.js\";\nimport { catalogSearchFilter, catalogSearchSort } from \"../utils/catalog-helpers.js\";\nimport { useDebounce } from \"./use-debounce.js\";\n\nexport type SearchOutputFieldEntries = Record<string, SearchId[]>;\n\n/** Mirrors the pipe hook: partner-gated searches are hidden below partner. */\nfunction hidePartnerGated<T extends { searchId: SearchId }>(\n rows: T[],\n accessLevel: OrgAccessLevel | undefined,\n): T[] {\n if (accessLevel === undefined || accessLevel === \"partner\") return rows;\n return rows.filter((row) => getSearchAccessLevel(row.searchId) !== \"partner\");\n}\n\nconst columnHelper = createColumnHelper<SearchCatalogTableData>();\n\nconst columns = [\n columnHelper.accessor(\"searchId\", {\n filterFn: \"includesString\",\n enableGlobalFilter: false,\n }),\n columnHelper.accessor(\"description\", {\n enableGlobalFilter: false,\n }),\n columnHelper.accessor(\"label\", {\n filterFn: \"includesString\",\n enableGlobalFilter: false,\n }),\n columnHelper.accessor((row) => getDefaultSearchOutputFields(row.searchId) || [], {\n id: \"outputFields\",\n filterFn: \"arrIncludes\",\n enableGlobalFilter: false,\n }),\n columnHelper.accessor((row) => row.tags || [], {\n id: \"tags\",\n filterFn: \"arrIncludes\",\n enableGlobalFilter: false,\n }),\n columnHelper.accessor((row) => row.provider, {\n id: \"providers\",\n enableGlobalFilter: false,\n }),\n // Hidden relevance column — the ONLY globally-filterable one, so the global\n // filter scores each row exactly once and catalogSearchSort can read the\n // score back from this column's filter meta.\n columnHelper.accessor((row) => getSearchSearchTarget(row), {\n id: \"search\",\n enableGlobalFilter: true,\n enableSorting: true,\n sortingFn: catalogSearchSort,\n }),\n];\n\nexport function useSearchCatalogTable(\n config: {\n initialColumnFilters?: ColumnFilter[];\n /** Optional whitelist/blacklist of searches and providers. Memoize. */\n filter?: CatalogFilter;\n /**\n * The viewing org's access level. Hides partner-gated searches below\n * partner and marks verified-gated cards `locked` below verified. Omit\n * for no gating (docs/playground).\n */\n accessLevel?: OrgAccessLevel;\n } = {},\n) {\n const [category, setCategory] = useState<SearchCategory | null>(null);\n const { initialColumnFilters = [] as ColumnFilter[], filter, accessLevel } = config;\n\n const initialSearchTableData = useMemo(\n () =>\n hidePartnerGated(\n filterSearchEntries(getInitialSearchTableData(category), filter),\n accessLevel,\n ),\n [category, filter, accessLevel],\n );\n\n // Baseline (config.filter applied, but no category / column / global filter).\n // Drives the stable category-button counts so the row doesn't jump.\n const baselineTableData = useMemo(\n () =>\n hidePartnerGated(filterSearchEntries(getInitialSearchTableData(null), filter), accessLevel),\n [filter, accessLevel],\n );\n\n const table = useReactTable({\n columns,\n data: initialSearchTableData,\n getCoreRowModel: getCoreRowModel(),\n getFilteredRowModel: getFilteredRowModel(),\n getSortedRowModel: getSortedRowModel(),\n globalFilterFn: catalogSearchFilter,\n getColumnCanGlobalFilter: (column) => column.columnDef.enableGlobalFilter !== false,\n initialState: {\n columnFilters: initialColumnFilters,\n pagination: {\n pageSize: 10,\n },\n },\n });\n\n const columnFilters = table.getState().columnFilters;\n\n const aggregates = useMemo(\n () => getSearchTableDataAggregates(initialSearchTableData, category),\n [category, initialSearchTableData],\n );\n\n const [globalFilterInput, setGlobalFilterInput, setGlobalFilterImmediately] = useDebounce((v) => {\n if (v === table.getState().globalFilter) return;\n table.setGlobalFilter(v);\n // Relevance order only while a query is active; empty query restores\n // catalog order.\n table.setSorting(v ? [{ id: \"search\", desc: true }] : []);\n if (v) {\n setCategory(null);\n table.setColumnFilters([]);\n }\n });\n\n const addColumnFilter = useCallback(\n (id: \"inputFields\" | \"outputFields\" | \"tags\" | \"providers\", value: string) => {\n setGlobalFilterImmediately(\"\");\n table.setColumnFilters([{ id, value }]);\n },\n [setGlobalFilterImmediately, table],\n );\n\n const resetFilters = useCallback(() => {\n setGlobalFilterImmediately(\"\");\n setCategory(null);\n }, [setGlobalFilterImmediately]);\n\n const removeColumnFilter = useCallback(\n (id: \"inputFields\" | \"outputFields\" | \"tags\" | \"providers\") => {\n table.getColumn(id)?.setFilterValue(null);\n },\n [table],\n );\n\n const handleCategoryChange = useCallback(\n (category: SearchCategory | null) => {\n setCategory(category);\n table.setColumnFilters([]);\n setGlobalFilterImmediately(\"\");\n },\n [table, setGlobalFilterImmediately],\n );\n\n const getColumnFilterValue = useCallback(\n (id: \"inputFields\" | \"outputFields\" | \"tags\" | \"providers\") => {\n const res = columnFilters.find((f) => f.id === id)?.value;\n return res as string;\n },\n [columnFilters],\n );\n\n const rows = table.getRowModel().rows;\n const cards = useMemo<SearchCardData[]>(\n () =>\n rows.map((row) => {\n const entry = row.original;\n const latestEntry = (aggregates.searchEntriesByBaseSearch[entry.baseSearch]?.[0] ??\n entry) as SearchCatalogEntry & { searchId: SearchId };\n const gate = getSearchAccessLevel(latestEntry.searchId);\n const locked =\n accessLevel !== undefined && gate !== undefined && !isEntryAccessible(gate, accessLevel);\n return {\n ...(locked ? { locked, requiredAccessLevel: gate } : {}),\n searchId: latestEntry.searchId,\n baseSearch: entry.baseSearch,\n label: entry.label,\n description: entry.description,\n provider: entry.provider,\n providers: [entry.provider],\n startingCostPerProvider: getStartingCostPerSearchProvider(latestEntry.searchId),\n startingCreditAmount: getLoweestSearchCreditAmount(latestEntry),\n // A usage-metered search bills per operation and carries cost.credits 0,\n // so the flat mode would render it as free. Same branch the pipe and\n // effect hooks already use.\n costMode: isTokenBilledOperations(latestEntry.billableOperations ?? {})\n ? (\"usage\" as CostMode)\n : ((latestEntry.cost.mode ?? \"per_page\") as CostMode),\n defaultOutputFields: getDefaultSearchOutputFields(latestEntry.searchId),\n docPath: latestEntry.docPath,\n entry: entry as SearchCatalogTableData,\n latestEntry,\n };\n }),\n [rows, aggregates.searchEntriesByBaseSearch, accessLevel],\n );\n\n const cardsByCategory = useMemo<{ category: SearchCategory; cards: SearchCardData[] }[]>(() => {\n const groups = new Map<SearchCategory, SearchCardData[]>();\n for (const card of cards) {\n const cats = (card.entry.categories ?? []) as SearchCategory[];\n for (const cat of cats) {\n const arr = groups.get(cat);\n if (arr) arr.push(card);\n else groups.set(cat, [card]);\n }\n }\n return Array.from(groups, ([category, group]) => ({\n category,\n cards: group,\n }));\n }, [cards]);\n\n const categoryCounts = useMemo<Partial<Record<SearchCategory, number>>>(() => {\n const counts: Partial<Record<SearchCategory, number>> = {};\n for (const card of cards) {\n const cats = (card.entry.categories ?? []) as SearchCategory[];\n for (const cat of cats) {\n counts[cat] = (counts[cat] ?? 0) + 1;\n }\n }\n return counts;\n }, [cards]);\n\n // Stable counts based on the baseline (no category / column / global filter\n // applied).\n const baselineCardCount = baselineTableData.length;\n const baselineCategoryCounts = useMemo<Partial<Record<SearchCategory, number>>>(() => {\n const counts: Partial<Record<SearchCategory, number>> = {};\n for (const entry of baselineTableData) {\n const cats = (entry.categories ?? []) as SearchCategory[];\n for (const cat of cats) {\n counts[cat] = (counts[cat] ?? 0) + 1;\n }\n }\n return counts;\n }, [baselineTableData]);\n\n return {\n table,\n cards,\n cardsByCategory,\n categoryCounts,\n baselineCardCount,\n baselineCategoryCounts,\n\n category,\n setCategory: handleCategoryChange,\n globalFilterInput,\n setGlobalFilterInput,\n\n addColumnFilter,\n removeColumnFilter,\n resetFilters,\n getColumnFilterValue,\n\n sortedOutputFieldEntries: aggregates.sortedOutputFieldEntries,\n sortedTagEntries: aggregates.sortedTagEntries,\n sortedProviderEntries: aggregates.sortedProviderEntries,\n\n searchIdsByOutputField: aggregates.searchIdsByOutputField,\n searchIdsByProvider: aggregates.searchIdsByProvider,\n searchIdsByTag: aggregates.searchIdsByTag,\n };\n}\n\nexport type UseSearchCatalogTableReturn = ReturnType<typeof useSearchCatalogTable>;\n"],"mappings":";;;;;;;;AAkCA,SAAS,iBACP,MACA,aACK;AACL,KAAI,gBAAgB,UAAa,gBAAgB,UAAW,QAAO;AACnE,QAAO,KAAK,QAAQ,QAAQ,qBAAqB,IAAI,SAAS,KAAK,UAAU;;AAG/E,MAAM,eAAe,oBAA4C;AAEjE,MAAM,UAAU;CACd,aAAa,SAAS,YAAY;EAChC,UAAU;EACV,oBAAoB;EACrB,CAAC;CACF,aAAa,SAAS,eAAe,EACnC,oBAAoB,OACrB,CAAC;CACF,aAAa,SAAS,SAAS;EAC7B,UAAU;EACV,oBAAoB;EACrB,CAAC;CACF,aAAa,UAAU,QAAQ,6BAA6B,IAAI,SAAS,IAAI,EAAE,EAAE;EAC/E,IAAI;EACJ,UAAU;EACV,oBAAoB;EACrB,CAAC;CACF,aAAa,UAAU,QAAQ,IAAI,QAAQ,EAAE,EAAE;EAC7C,IAAI;EACJ,UAAU;EACV,oBAAoB;EACrB,CAAC;CACF,aAAa,UAAU,QAAQ,IAAI,UAAU;EAC3C,IAAI;EACJ,oBAAoB;EACrB,CAAC;CAIF,aAAa,UAAU,QAAQ,sBAAsB,IAAI,EAAE;EACzD,IAAI;EACJ,oBAAoB;EACpB,eAAe;EACf,WAAW;EACZ,CAAC;CACH;AAED,SAAgB,sBACd,SAUI,EAAE,EACN;CACA,MAAM,CAAC,UAAU,eAAe,SAAgC,KAAK;CACrE,MAAM,EAAE,uBAAuB,EAAE,EAAoB,QAA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,IAAI,KAAK,CAAC,KAAK,CAAC;;;AAGhC,UAAO,MAAM,KAAK,SAAS,CAAC,UAAU,YAAY;IAChD;IACA,OAAO;IACR,EAAE;KACF,CAAC,MAAM,CAAC;EA+BT,gBA7BqB,cAAuD;GAC5E,MAAM,SAAkD,EAAE;AAC1D,QAAK,MAAM,QAAQ,OAAO;IACxB,MAAM,OAAQ,KAAK,MAAM,cAAc,EAAE;AACzC,SAAK,MAAM,OAAO,KAChB,QAAO,QAAQ,OAAO,QAAQ,KAAK;;AAGvC,UAAO;KACN,CAAC,MAAM,CAAC;EAqBT,mBAjBwB,kBAAkB;EAkB1C,wBAjB6B,cAAuD;GACpF,MAAM,SAAkD,EAAE;AAC1D,QAAK,MAAM,SAAS,mBAAmB;IACrC,MAAM,OAAQ,MAAM,cAAc,EAAE;AACpC,SAAK,MAAM,OAAO,KAChB,QAAO,QAAQ,OAAO,QAAQ,KAAK;;AAGvC,UAAO;KACN,CAAC,kBAAkB,CAAC;EAUrB;EACA,aAAa;EACb;EACA;EAEA;EACA;EACA;EACA;EAEA,0BAA0B,WAAW;EACrC,kBAAkB,WAAW;EAC7B,uBAAuB,WAAW;EAElC,wBAAwB,WAAW;EACnC,qBAAqB,WAAW;EAChC,gBAAgB,WAAW;EAC5B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipe0/react",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.18",
|
|
4
4
|
"description": "React component library for building forms and catalogs powered by pipe0 pipes and searches.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "pipe0",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"react-hook-form": "^7.62.0",
|
|
85
85
|
"swr": "^2.4.1",
|
|
86
86
|
"tailwind-merge": "^3.3.1",
|
|
87
|
-
"@pipe0/base": "1.0.
|
|
87
|
+
"@pipe0/base": "1.0.18"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
90
|
"@base-ui/react": "^1.6.0",
|