@pipe0/react-sdk 0.0.72 → 0.0.74
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/dist/hooks/usePipeCatalogTable.d.ts +12 -10
- package/dist/hooks/usePipeCatalogTable.d.ts.map +1 -1
- package/dist/hooks/usePipeCatalogTable.js +27 -21
- package/dist/hooks/useSearchCatalogTable.d.ts +8 -6
- package/dist/hooks/useSearchCatalogTable.d.ts.map +1 -1
- package/dist/hooks/useSearchCatalogTable.js +20 -11
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/utils/helpers.d.ts +2 -0
- package/dist/utils/helpers.d.ts.map +1 -1
- package/dist/utils/helpers.js +10 -0
- package/package.json +3 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type PipeCategory, type PipeEntryWithLatestVersion, type PipeId } from "@pipe0/ops";
|
|
2
2
|
import { type ColumnFilter } from "@tanstack/react-table";
|
|
3
3
|
export type InputFieldEntries = Record<string, PipeId[]>;
|
|
4
4
|
export type OutputFieldEntries = Record<string, PipeId[]>;
|
|
@@ -7,20 +7,20 @@ export declare function usePipeCatalogTable(config?: {
|
|
|
7
7
|
}): {
|
|
8
8
|
table: import("@tanstack/react-table").Table<PipeEntryWithLatestVersion>;
|
|
9
9
|
sidebar: {
|
|
10
|
-
sortedInputFieldEntries: [string, ("prompt:run@1" | "company:newssummary:website@1" | "company:techstack:builtwith@1" | "company:websiteurl:email@1" | "company:funding:leadmagic@1" | "people:workemail:waterfall@1" | "people:email:iswork@1" | "people:name:split@1" | "people:name:join@1" | "people:validate:email:zerobounce@1" | "people:email:validate:zerobounce@2" | "people:mobilenumber:workemail:waterfall@1" | "company:overview@1" | "company:overview@2" | "json:extract@1" | "email:write@1" | "message:write@1" | "email:send:resend@1" | "email:send:gmail@1" | "message:send:slack@1" | "template:fill@1" | "contact:create:resend@1" | "people:match:role:waterfall@1" | "company:identity@2" | "people:phone:profile:waterfall@1" | "people:personalemail:profile:waterfall@1" | "people:profile:waterfall@1" | "people:profileurl:email:waterfall@1" | "people:profileurl:name@1" | "people:email:validate:zerobounce@1" | "people:email:validate:millionverifier@1" | "people:phone:workemail:waterfall@1" | "fields:merge@1" | "website:scrape:firecrawl@1" | "website:scrapelist:firecrawl@1" | "website:extract:firecrawl@1" | "website:maplinks:firecrawl@1" | "sheet:append@1" | "sheet:expandappend@1" | "company:lookalikes:companyenrich@1" | "company:match:logodev@1" | "company:identity@1" | "people:professionalprofile:waterfall@1" | "people:professionalprofileurl:name@1" | "people:professionalprofileurl:email:waterfall@1" | "people:mobilenumber:professionalprofile:waterfall@1")[]][];
|
|
11
|
-
sortedOutputFieldEntries: [string, ("prompt:run@1" | "company:newssummary:website@1" | "company:techstack:builtwith@1" | "company:websiteurl:email@1" | "company:funding:leadmagic@1" | "people:workemail:waterfall@1" | "people:email:iswork@1" | "people:name:split@1" | "people:name:join@1" | "people:validate:email:zerobounce@1" | "people:email:validate:zerobounce@2" | "people:mobilenumber:workemail:waterfall@1" | "company:overview@1" | "company:overview@2" | "json:extract@1" | "email:write@1" | "message:write@1" | "email:send:resend@1" | "email:send:gmail@1" | "message:send:slack@1" | "template:fill@1" | "contact:create:resend@1" | "people:match:role:waterfall@1" | "company:identity@2" | "people:phone:profile:waterfall@1" | "people:personalemail:profile:waterfall@1" | "people:profile:waterfall@1" | "people:profileurl:email:waterfall@1" | "people:profileurl:name@1" | "people:email:validate:zerobounce@1" | "people:email:validate:millionverifier@1" | "people:phone:workemail:waterfall@1" | "fields:merge@1" | "website:scrape:firecrawl@1" | "website:scrapelist:firecrawl@1" | "website:extract:firecrawl@1" | "website:maplinks:firecrawl@1" | "sheet:append@1" | "sheet:expandappend@1" | "company:lookalikes:companyenrich@1" | "company:match:logodev@1" | "company:identity@1" | "people:professionalprofile:waterfall@1" | "people:professionalprofileurl:name@1" | "people:professionalprofileurl:email:waterfall@1" | "people:mobilenumber:professionalprofile:waterfall@1")[]][];
|
|
12
|
-
sortedTagEntries: [string, ("prompt:run@1" | "company:newssummary:website@1" | "company:techstack:builtwith@1" | "company:websiteurl:email@1" | "company:funding:leadmagic@1" | "people:workemail:waterfall@1" | "people:email:iswork@1" | "people:name:split@1" | "people:name:join@1" | "people:validate:email:zerobounce@1" | "people:email:validate:zerobounce@2" | "people:mobilenumber:workemail:waterfall@1" | "company:overview@1" | "company:overview@2" | "json:extract@1" | "email:write@1" | "message:write@1" | "email:send:resend@1" | "email:send:gmail@1" | "message:send:slack@1" | "template:fill@1" | "contact:create:resend@1" | "people:match:role:waterfall@1" | "company:identity@2" | "people:phone:profile:waterfall@1" | "people:personalemail:profile:waterfall@1" | "people:profile:waterfall@1" | "people:profileurl:email:waterfall@1" | "people:profileurl:name@1" | "people:email:validate:zerobounce@1" | "people:email:validate:millionverifier@1" | "people:phone:workemail:waterfall@1" | "fields:merge@1" | "website:scrape:firecrawl@1" | "website:scrapelist:firecrawl@1" | "website:extract:firecrawl@1" | "website:maplinks:firecrawl@1" | "sheet:append@1" | "sheet:expandappend@1" | "company:lookalikes:companyenrich@1" | "company:match:logodev@1" | "company:identity@1" | "people:professionalprofile:waterfall@1" | "people:professionalprofileurl:name@1" | "people:professionalprofileurl:email:waterfall@1" | "people:mobilenumber:professionalprofile:waterfall@1")[]][];
|
|
13
|
-
sortedProviderEntries: [string, ("prompt:run@1" | "company:newssummary:website@1" | "company:techstack:builtwith@1" | "company:websiteurl:email@1" | "company:funding:leadmagic@1" | "people:workemail:waterfall@1" | "people:email:iswork@1" | "people:name:split@1" | "people:name:join@1" | "people:validate:email:zerobounce@1" | "people:email:validate:zerobounce@2" | "people:mobilenumber:workemail:waterfall@1" | "company:overview@1" | "company:overview@2" | "json:extract@1" | "email:write@1" | "message:write@1" | "email:send:resend@1" | "email:send:gmail@1" | "message:send:slack@1" | "template:fill@1" | "contact:create:resend@1" | "people:match:role:waterfall@1" | "company:identity@2" | "people:phone:profile:waterfall@1" | "people:personalemail:profile:waterfall@1" | "people:profile:waterfall@1" | "people:profileurl:email:waterfall@1" | "people:profileurl:name@1" | "people:email:validate:zerobounce@1" | "people:email:validate:millionverifier@1" | "people:phone:workemail:waterfall@1" | "fields:merge@1" | "website:scrape:firecrawl@1" | "website:scrapelist:firecrawl@1" | "website:extract:firecrawl@1" | "website:maplinks:firecrawl@1" | "sheet:append@1" | "sheet:expandappend@1" | "company:lookalikes:companyenrich@1" | "company:match:logodev@1" | "company:identity@1" | "people:professionalprofile:waterfall@1" | "people:professionalprofileurl:name@1" | "people:professionalprofileurl:email:waterfall@1" | "people:mobilenumber:professionalprofile:waterfall@1")[]][];
|
|
14
|
-
pipeIdsByInputField: Record<string, ("prompt:run@1" | "company:newssummary:website@1" | "company:techstack:builtwith@1" | "company:websiteurl:email@1" | "company:funding:leadmagic@1" | "people:workemail:waterfall@1" | "people:email:iswork@1" | "people:name:split@1" | "people:name:join@1" | "people:validate:email:zerobounce@1" | "people:email:validate:zerobounce@2" | "people:mobilenumber:workemail:waterfall@1" | "company:overview@1" | "company:overview@2" | "json:extract@1" | "email:write@1" | "message:write@1" | "email:send:resend@1" | "email:send:gmail@1" | "message:send:slack@1" | "template:fill@1" | "contact:create:resend@1" | "people:match:role:waterfall@1" | "company:identity@2" | "people:phone:profile:waterfall@1" | "people:personalemail:profile:waterfall@1" | "people:profile:waterfall@1" | "people:profileurl:email:waterfall@1" | "people:profileurl:name@1" | "people:email:validate:zerobounce@1" | "people:email:validate:millionverifier@1" | "people:phone:workemail:waterfall@1" | "fields:merge@1" | "website:scrape:firecrawl@1" | "website:scrapelist:firecrawl@1" | "website:extract:firecrawl@1" | "website:maplinks:firecrawl@1" | "sheet:append@1" | "sheet:expandappend@1" | "company:lookalikes:companyenrich@1" | "company:match:logodev@1" | "company:identity@1" | "people:professionalprofile:waterfall@1" | "people:professionalprofileurl:name@1" | "people:professionalprofileurl:email:waterfall@1" | "people:mobilenumber:professionalprofile:waterfall@1")[]>;
|
|
15
|
-
pipeIdsByOutputField: Record<string, ("prompt:run@1" | "company:newssummary:website@1" | "company:techstack:builtwith@1" | "company:websiteurl:email@1" | "company:funding:leadmagic@1" | "people:workemail:waterfall@1" | "people:email:iswork@1" | "people:name:split@1" | "people:name:join@1" | "people:validate:email:zerobounce@1" | "people:email:validate:zerobounce@2" | "people:mobilenumber:workemail:waterfall@1" | "company:overview@1" | "company:overview@2" | "json:extract@1" | "email:write@1" | "message:write@1" | "email:send:resend@1" | "email:send:gmail@1" | "message:send:slack@1" | "template:fill@1" | "contact:create:resend@1" | "people:match:role:waterfall@1" | "company:identity@2" | "people:phone:profile:waterfall@1" | "people:personalemail:profile:waterfall@1" | "people:profile:waterfall@1" | "people:profileurl:email:waterfall@1" | "people:profileurl:name@1" | "people:email:validate:zerobounce@1" | "people:email:validate:millionverifier@1" | "people:phone:workemail:waterfall@1" | "fields:merge@1" | "website:scrape:firecrawl@1" | "website:scrapelist:firecrawl@1" | "website:extract:firecrawl@1" | "website:maplinks:firecrawl@1" | "sheet:append@1" | "sheet:expandappend@1" | "company:lookalikes:companyenrich@1" | "company:match:logodev@1" | "company:identity@1" | "people:professionalprofile:waterfall@1" | "people:professionalprofileurl:name@1" | "people:professionalprofileurl:email:waterfall@1" | "people:mobilenumber:professionalprofile:waterfall@1")[]>;
|
|
16
|
-
pipeIdsByProvider: Record<string, ("prompt:run@1" | "company:newssummary:website@1" | "company:techstack:builtwith@1" | "company:websiteurl:email@1" | "company:funding:leadmagic@1" | "people:workemail:waterfall@1" | "people:email:iswork@1" | "people:name:split@1" | "people:name:join@1" | "people:validate:email:zerobounce@1" | "people:email:validate:zerobounce@2" | "people:mobilenumber:workemail:waterfall@1" | "company:overview@1" | "company:overview@2" | "json:extract@1" | "email:write@1" | "message:write@1" | "email:send:resend@1" | "email:send:gmail@1" | "message:send:slack@1" | "template:fill@1" | "contact:create:resend@1" | "people:match:role:waterfall@1" | "company:identity@2" | "people:phone:profile:waterfall@1" | "people:personalemail:profile:waterfall@1" | "people:profile:waterfall@1" | "people:profileurl:email:waterfall@1" | "people:profileurl:name@1" | "people:email:validate:zerobounce@1" | "people:email:validate:millionverifier@1" | "people:phone:workemail:waterfall@1" | "fields:merge@1" | "website:scrape:firecrawl@1" | "website:scrapelist:firecrawl@1" | "website:extract:firecrawl@1" | "website:maplinks:firecrawl@1" | "sheet:append@1" | "sheet:expandappend@1" | "company:lookalikes:companyenrich@1" | "company:match:logodev@1" | "company:identity@1" | "people:professionalprofile:waterfall@1" | "people:professionalprofileurl:name@1" | "people:professionalprofileurl:email:waterfall@1" | "people:mobilenumber:professionalprofile:waterfall@1")[]>;
|
|
17
|
-
pipeIdsByTag: Record<string, ("prompt:run@1" | "company:newssummary:website@1" | "company:techstack:builtwith@1" | "company:websiteurl:email@1" | "company:funding:leadmagic@1" | "people:workemail:waterfall@1" | "people:email:iswork@1" | "people:name:split@1" | "people:name:join@1" | "people:validate:email:zerobounce@1" | "people:email:validate:zerobounce@2" | "people:mobilenumber:workemail:waterfall@1" | "company:overview@1" | "company:overview@2" | "json:extract@1" | "email:write@1" | "message:write@1" | "email:send:resend@1" | "email:send:gmail@1" | "message:send:slack@1" | "template:fill@1" | "contact:create:resend@1" | "people:match:role:waterfall@1" | "company:identity@2" | "people:phone:profile:waterfall@1" | "people:personalemail:profile:waterfall@1" | "people:profile:waterfall@1" | "people:profileurl:email:waterfall@1" | "people:profileurl:name@1" | "people:email:validate:zerobounce@1" | "people:email:validate:millionverifier@1" | "people:phone:workemail:waterfall@1" | "fields:merge@1" | "website:scrape:firecrawl@1" | "website:scrapelist:firecrawl@1" | "website:extract:firecrawl@1" | "website:maplinks:firecrawl@1" | "sheet:append@1" | "sheet:expandappend@1" | "company:lookalikes:companyenrich@1" | "company:match:logodev@1" | "company:identity@1" | "people:professionalprofile:waterfall@1" | "people:professionalprofileurl:name@1" | "people:professionalprofileurl:email:waterfall@1" | "people:mobilenumber:professionalprofile:waterfall@1")[]>;
|
|
10
|
+
sortedInputFieldEntries: [string, ("prompt:run@1" | "company:newssummary:website@1" | "company:techstack:builtwith@1" | "company:websiteurl:email@1" | "company:funding:leadmagic@1" | "people:workemail:waterfall@1" | "people:email:iswork@1" | "people:name:split@1" | "people:name:join@1" | "people:validate:email:zerobounce@1" | "people:email:validate:zerobounce@2" | "people:mobilenumber:workemail:waterfall@1" | "company:overview@1" | "company:overview@2" | "json:extract@1" | "email:write@1" | "message:write@1" | "email:send:resend@1" | "email:send:gmail@1" | "message:send:slack@1" | "template:fill@1" | "contact:create:resend@1" | "people:match:role:waterfall@1" | "company:identity@2" | "people:phone:profile:waterfall@1" | "people:personalemail:profile:waterfall@1" | "people:profile:waterfall@1" | "people:profileurl:email:waterfall@1" | "people:profileurl:name@1" | "people:email:validate:zerobounce@1" | "people:email:validate:millionverifier@1" | "people:phone:workemail:waterfall@1" | "fields:merge@1" | "website:scrape:firecrawl@1" | "website:scrapelist:firecrawl@1" | "website:extract:firecrawl@1" | "website:maplinks:firecrawl@1" | "sheet:append@1" | "sheet:expandappend@1" | "company:lookalikes:companyenrich@1" | "company:match:logodev@1" | "people:posts:crustdata@1" | "company:identity@1" | "people:professionalprofile:waterfall@1" | "people:professionalprofileurl:name@1" | "people:professionalprofileurl:email:waterfall@1" | "people:mobilenumber:professionalprofile:waterfall@1")[]][];
|
|
11
|
+
sortedOutputFieldEntries: [string, ("prompt:run@1" | "company:newssummary:website@1" | "company:techstack:builtwith@1" | "company:websiteurl:email@1" | "company:funding:leadmagic@1" | "people:workemail:waterfall@1" | "people:email:iswork@1" | "people:name:split@1" | "people:name:join@1" | "people:validate:email:zerobounce@1" | "people:email:validate:zerobounce@2" | "people:mobilenumber:workemail:waterfall@1" | "company:overview@1" | "company:overview@2" | "json:extract@1" | "email:write@1" | "message:write@1" | "email:send:resend@1" | "email:send:gmail@1" | "message:send:slack@1" | "template:fill@1" | "contact:create:resend@1" | "people:match:role:waterfall@1" | "company:identity@2" | "people:phone:profile:waterfall@1" | "people:personalemail:profile:waterfall@1" | "people:profile:waterfall@1" | "people:profileurl:email:waterfall@1" | "people:profileurl:name@1" | "people:email:validate:zerobounce@1" | "people:email:validate:millionverifier@1" | "people:phone:workemail:waterfall@1" | "fields:merge@1" | "website:scrape:firecrawl@1" | "website:scrapelist:firecrawl@1" | "website:extract:firecrawl@1" | "website:maplinks:firecrawl@1" | "sheet:append@1" | "sheet:expandappend@1" | "company:lookalikes:companyenrich@1" | "company:match:logodev@1" | "people:posts:crustdata@1" | "company:identity@1" | "people:professionalprofile:waterfall@1" | "people:professionalprofileurl:name@1" | "people:professionalprofileurl:email:waterfall@1" | "people:mobilenumber:professionalprofile:waterfall@1")[]][];
|
|
12
|
+
sortedTagEntries: [string, ("prompt:run@1" | "company:newssummary:website@1" | "company:techstack:builtwith@1" | "company:websiteurl:email@1" | "company:funding:leadmagic@1" | "people:workemail:waterfall@1" | "people:email:iswork@1" | "people:name:split@1" | "people:name:join@1" | "people:validate:email:zerobounce@1" | "people:email:validate:zerobounce@2" | "people:mobilenumber:workemail:waterfall@1" | "company:overview@1" | "company:overview@2" | "json:extract@1" | "email:write@1" | "message:write@1" | "email:send:resend@1" | "email:send:gmail@1" | "message:send:slack@1" | "template:fill@1" | "contact:create:resend@1" | "people:match:role:waterfall@1" | "company:identity@2" | "people:phone:profile:waterfall@1" | "people:personalemail:profile:waterfall@1" | "people:profile:waterfall@1" | "people:profileurl:email:waterfall@1" | "people:profileurl:name@1" | "people:email:validate:zerobounce@1" | "people:email:validate:millionverifier@1" | "people:phone:workemail:waterfall@1" | "fields:merge@1" | "website:scrape:firecrawl@1" | "website:scrapelist:firecrawl@1" | "website:extract:firecrawl@1" | "website:maplinks:firecrawl@1" | "sheet:append@1" | "sheet:expandappend@1" | "company:lookalikes:companyenrich@1" | "company:match:logodev@1" | "people:posts:crustdata@1" | "company:identity@1" | "people:professionalprofile:waterfall@1" | "people:professionalprofileurl:name@1" | "people:professionalprofileurl:email:waterfall@1" | "people:mobilenumber:professionalprofile:waterfall@1")[]][];
|
|
13
|
+
sortedProviderEntries: [string, ("prompt:run@1" | "company:newssummary:website@1" | "company:techstack:builtwith@1" | "company:websiteurl:email@1" | "company:funding:leadmagic@1" | "people:workemail:waterfall@1" | "people:email:iswork@1" | "people:name:split@1" | "people:name:join@1" | "people:validate:email:zerobounce@1" | "people:email:validate:zerobounce@2" | "people:mobilenumber:workemail:waterfall@1" | "company:overview@1" | "company:overview@2" | "json:extract@1" | "email:write@1" | "message:write@1" | "email:send:resend@1" | "email:send:gmail@1" | "message:send:slack@1" | "template:fill@1" | "contact:create:resend@1" | "people:match:role:waterfall@1" | "company:identity@2" | "people:phone:profile:waterfall@1" | "people:personalemail:profile:waterfall@1" | "people:profile:waterfall@1" | "people:profileurl:email:waterfall@1" | "people:profileurl:name@1" | "people:email:validate:zerobounce@1" | "people:email:validate:millionverifier@1" | "people:phone:workemail:waterfall@1" | "fields:merge@1" | "website:scrape:firecrawl@1" | "website:scrapelist:firecrawl@1" | "website:extract:firecrawl@1" | "website:maplinks:firecrawl@1" | "sheet:append@1" | "sheet:expandappend@1" | "company:lookalikes:companyenrich@1" | "company:match:logodev@1" | "people:posts:crustdata@1" | "company:identity@1" | "people:professionalprofile:waterfall@1" | "people:professionalprofileurl:name@1" | "people:professionalprofileurl:email:waterfall@1" | "people:mobilenumber:professionalprofile:waterfall@1")[]][];
|
|
14
|
+
pipeIdsByInputField: Record<string, ("prompt:run@1" | "company:newssummary:website@1" | "company:techstack:builtwith@1" | "company:websiteurl:email@1" | "company:funding:leadmagic@1" | "people:workemail:waterfall@1" | "people:email:iswork@1" | "people:name:split@1" | "people:name:join@1" | "people:validate:email:zerobounce@1" | "people:email:validate:zerobounce@2" | "people:mobilenumber:workemail:waterfall@1" | "company:overview@1" | "company:overview@2" | "json:extract@1" | "email:write@1" | "message:write@1" | "email:send:resend@1" | "email:send:gmail@1" | "message:send:slack@1" | "template:fill@1" | "contact:create:resend@1" | "people:match:role:waterfall@1" | "company:identity@2" | "people:phone:profile:waterfall@1" | "people:personalemail:profile:waterfall@1" | "people:profile:waterfall@1" | "people:profileurl:email:waterfall@1" | "people:profileurl:name@1" | "people:email:validate:zerobounce@1" | "people:email:validate:millionverifier@1" | "people:phone:workemail:waterfall@1" | "fields:merge@1" | "website:scrape:firecrawl@1" | "website:scrapelist:firecrawl@1" | "website:extract:firecrawl@1" | "website:maplinks:firecrawl@1" | "sheet:append@1" | "sheet:expandappend@1" | "company:lookalikes:companyenrich@1" | "company:match:logodev@1" | "people:posts:crustdata@1" | "company:identity@1" | "people:professionalprofile:waterfall@1" | "people:professionalprofileurl:name@1" | "people:professionalprofileurl:email:waterfall@1" | "people:mobilenumber:professionalprofile:waterfall@1")[]>;
|
|
15
|
+
pipeIdsByOutputField: Record<string, ("prompt:run@1" | "company:newssummary:website@1" | "company:techstack:builtwith@1" | "company:websiteurl:email@1" | "company:funding:leadmagic@1" | "people:workemail:waterfall@1" | "people:email:iswork@1" | "people:name:split@1" | "people:name:join@1" | "people:validate:email:zerobounce@1" | "people:email:validate:zerobounce@2" | "people:mobilenumber:workemail:waterfall@1" | "company:overview@1" | "company:overview@2" | "json:extract@1" | "email:write@1" | "message:write@1" | "email:send:resend@1" | "email:send:gmail@1" | "message:send:slack@1" | "template:fill@1" | "contact:create:resend@1" | "people:match:role:waterfall@1" | "company:identity@2" | "people:phone:profile:waterfall@1" | "people:personalemail:profile:waterfall@1" | "people:profile:waterfall@1" | "people:profileurl:email:waterfall@1" | "people:profileurl:name@1" | "people:email:validate:zerobounce@1" | "people:email:validate:millionverifier@1" | "people:phone:workemail:waterfall@1" | "fields:merge@1" | "website:scrape:firecrawl@1" | "website:scrapelist:firecrawl@1" | "website:extract:firecrawl@1" | "website:maplinks:firecrawl@1" | "sheet:append@1" | "sheet:expandappend@1" | "company:lookalikes:companyenrich@1" | "company:match:logodev@1" | "people:posts:crustdata@1" | "company:identity@1" | "people:professionalprofile:waterfall@1" | "people:professionalprofileurl:name@1" | "people:professionalprofileurl:email:waterfall@1" | "people:mobilenumber:professionalprofile:waterfall@1")[]>;
|
|
16
|
+
pipeIdsByProvider: Record<string, ("prompt:run@1" | "company:newssummary:website@1" | "company:techstack:builtwith@1" | "company:websiteurl:email@1" | "company:funding:leadmagic@1" | "people:workemail:waterfall@1" | "people:email:iswork@1" | "people:name:split@1" | "people:name:join@1" | "people:validate:email:zerobounce@1" | "people:email:validate:zerobounce@2" | "people:mobilenumber:workemail:waterfall@1" | "company:overview@1" | "company:overview@2" | "json:extract@1" | "email:write@1" | "message:write@1" | "email:send:resend@1" | "email:send:gmail@1" | "message:send:slack@1" | "template:fill@1" | "contact:create:resend@1" | "people:match:role:waterfall@1" | "company:identity@2" | "people:phone:profile:waterfall@1" | "people:personalemail:profile:waterfall@1" | "people:profile:waterfall@1" | "people:profileurl:email:waterfall@1" | "people:profileurl:name@1" | "people:email:validate:zerobounce@1" | "people:email:validate:millionverifier@1" | "people:phone:workemail:waterfall@1" | "fields:merge@1" | "website:scrape:firecrawl@1" | "website:scrapelist:firecrawl@1" | "website:extract:firecrawl@1" | "website:maplinks:firecrawl@1" | "sheet:append@1" | "sheet:expandappend@1" | "company:lookalikes:companyenrich@1" | "company:match:logodev@1" | "people:posts:crustdata@1" | "company:identity@1" | "people:professionalprofile:waterfall@1" | "people:professionalprofileurl:name@1" | "people:professionalprofileurl:email:waterfall@1" | "people:mobilenumber:professionalprofile:waterfall@1")[]>;
|
|
17
|
+
pipeIdsByTag: Record<string, ("prompt:run@1" | "company:newssummary:website@1" | "company:techstack:builtwith@1" | "company:websiteurl:email@1" | "company:funding:leadmagic@1" | "people:workemail:waterfall@1" | "people:email:iswork@1" | "people:name:split@1" | "people:name:join@1" | "people:validate:email:zerobounce@1" | "people:email:validate:zerobounce@2" | "people:mobilenumber:workemail:waterfall@1" | "company:overview@1" | "company:overview@2" | "json:extract@1" | "email:write@1" | "message:write@1" | "email:send:resend@1" | "email:send:gmail@1" | "message:send:slack@1" | "template:fill@1" | "contact:create:resend@1" | "people:match:role:waterfall@1" | "company:identity@2" | "people:phone:profile:waterfall@1" | "people:personalemail:profile:waterfall@1" | "people:profile:waterfall@1" | "people:profileurl:email:waterfall@1" | "people:profileurl:name@1" | "people:email:validate:zerobounce@1" | "people:email:validate:millionverifier@1" | "people:phone:workemail:waterfall@1" | "fields:merge@1" | "website:scrape:firecrawl@1" | "website:scrapelist:firecrawl@1" | "website:extract:firecrawl@1" | "website:maplinks:firecrawl@1" | "sheet:append@1" | "sheet:expandappend@1" | "company:lookalikes:companyenrich@1" | "company:match:logodev@1" | "people:posts:crustdata@1" | "company:identity@1" | "people:professionalprofile:waterfall@1" | "people:professionalprofileurl:name@1" | "people:professionalprofileurl:email:waterfall@1" | "people:mobilenumber:professionalprofile:waterfall@1")[]>;
|
|
18
18
|
expandedSidebarSections: string[];
|
|
19
19
|
setExpandedSidebarSections: import("react").Dispatch<import("react").SetStateAction<string[]>>;
|
|
20
20
|
removeColumnFilter: (id: "inputFields" | "outputFields" | "tags" | "providers") => void;
|
|
21
21
|
addColumnFilter: (id: "inputFields" | "outputFields" | "tags" | "providers", value: string) => void;
|
|
22
22
|
};
|
|
23
|
-
pipeEntriesByBasePipe: Record<string, (import("@pipe0/ops").PipeCatalogEntry<"prompt:run@1" | "company:newssummary:website@1" | "company:techstack:builtwith@1" | "company:websiteurl:email@1" | "company:funding:leadmagic@1" | "people:workemail:waterfall@1" | "people:email:iswork@1" | "people:name:split@1" | "people:name:join@1" | "people:validate:email:zerobounce@1" | "people:email:validate:zerobounce@2" | "people:mobilenumber:workemail:waterfall@1" | "company:overview@1" | "company:overview@2" | "json:extract@1" | "email:write@1" | "message:write@1" | "email:send:resend@1" | "email:send:gmail@1" | "message:send:slack@1" | "template:fill@1" | "contact:create:resend@1" | "people:match:role:waterfall@1" | "company:identity@2" | "people:phone:profile:waterfall@1" | "people:personalemail:profile:waterfall@1" | "people:profile:waterfall@1" | "people:profileurl:email:waterfall@1" | "people:profileurl:name@1" | "people:email:validate:zerobounce@1" | "people:email:validate:millionverifier@1" | "people:phone:workemail:waterfall@1" | "fields:merge@1" | "website:scrape:firecrawl@1" | "website:scrapelist:firecrawl@1" | "website:extract:firecrawl@1" | "website:maplinks:firecrawl@1" | "sheet:append@1" | "sheet:expandappend@1" | "company:lookalikes:companyenrich@1" | "company:match:logodev@1" | "company:identity@1" | "people:professionalprofile:waterfall@1" | "people:professionalprofileurl:name@1" | "people:professionalprofileurl:email:waterfall@1" | "people:mobilenumber:professionalprofile:waterfall@1"> & {
|
|
23
|
+
pipeEntriesByBasePipe: Record<string, (import("@pipe0/ops").PipeCatalogEntry<"prompt:run@1" | "company:newssummary:website@1" | "company:techstack:builtwith@1" | "company:websiteurl:email@1" | "company:funding:leadmagic@1" | "people:workemail:waterfall@1" | "people:email:iswork@1" | "people:name:split@1" | "people:name:join@1" | "people:validate:email:zerobounce@1" | "people:email:validate:zerobounce@2" | "people:mobilenumber:workemail:waterfall@1" | "company:overview@1" | "company:overview@2" | "json:extract@1" | "email:write@1" | "message:write@1" | "email:send:resend@1" | "email:send:gmail@1" | "message:send:slack@1" | "template:fill@1" | "contact:create:resend@1" | "people:match:role:waterfall@1" | "company:identity@2" | "people:phone:profile:waterfall@1" | "people:personalemail:profile:waterfall@1" | "people:profile:waterfall@1" | "people:profileurl:email:waterfall@1" | "people:profileurl:name@1" | "people:email:validate:zerobounce@1" | "people:email:validate:millionverifier@1" | "people:phone:workemail:waterfall@1" | "fields:merge@1" | "website:scrape:firecrawl@1" | "website:scrapelist:firecrawl@1" | "website:extract:firecrawl@1" | "website:maplinks:firecrawl@1" | "sheet:append@1" | "sheet:expandappend@1" | "company:lookalikes:companyenrich@1" | "company:match:logodev@1" | "people:posts:crustdata@1" | "company:identity@1" | "people:professionalprofile:waterfall@1" | "people:professionalprofileurl:name@1" | "people:professionalprofileurl:email:waterfall@1" | "people:mobilenumber:professionalprofile:waterfall@1"> & {
|
|
24
24
|
pipeId: PipeId;
|
|
25
25
|
})[]>;
|
|
26
26
|
filterByField: (id: "inputFields" | "outputFields", fieldName: string) => void;
|
|
@@ -31,5 +31,7 @@ export declare function usePipeCatalogTable(config?: {
|
|
|
31
31
|
category: PipeCategory | null;
|
|
32
32
|
setCategory: (category: PipeCategory | null) => void;
|
|
33
33
|
showFeaturedPipes: boolean;
|
|
34
|
+
getColumnFilterValue: (id: "inputFields" | "outputFields" | "tags" | "providers") => string;
|
|
34
35
|
};
|
|
36
|
+
export type UsePipeCatalogTableReturn = ReturnType<typeof usePipeCatalogTable>;
|
|
35
37
|
//# sourceMappingURL=usePipeCatalogTable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePipeCatalogTable.d.ts","sourceRoot":"","sources":["../../src/hooks/usePipeCatalogTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,0BAA0B,EAC/B,KAAK,
|
|
1
|
+
{"version":3,"file":"usePipeCatalogTable.d.ts","sourceRoot":"","sources":["../../src/hooks/usePipeCatalogTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,YAAY,EACjB,KAAK,0BAA0B,EAC/B,KAAK,MAAM,EACZ,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,KAAK,YAAY,EAMlB,MAAM,uBAAuB,CAAC;AA4C/B,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;AACzD,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;AA0C1D,wBAAgB,mBAAmB,CACjC,MAAM,GAAE;IACN,oBAAoB,CAAC,EAAE,YAAY,EAAE,CAAC;CAClC;;;;;;;;;;;;;iCAwGC,aAAa,GAAG,cAAc,GAAG,MAAM,GAAG,WAAW;8BAxBpD,aAAa,GAAG,cAAc,GAAG,MAAM,GAAG,WAAW,SAClD,MAAM;;;;;wBAgDV,aAAa,GAAG,cAAc,aAAa,MAAM;;;0BAjBhD,aAAa,GAAG,cAAc,GAAG,MAAM,GAAG,WAAW,SAClD,MAAM;;;4BAvBJ,YAAY,GAAG,IAAI;;+BA+BzB,aAAa,GAAG,cAAc,GAAG,MAAM,GAAG,WAAW,KAE1C,MAAM;EAkDzB;AAED,MAAM,MAAM,yBAAyB,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getDefaultOutputFields, getDefaultPipeProviders, getInitialTableData, getTableDataAggregates, } from "@pipe0/ops";
|
|
2
|
-
import { createColumnHelper, getCoreRowModel, getFilteredRowModel,
|
|
2
|
+
import { createColumnHelper, getCoreRowModel, getFilteredRowModel, useReactTable, } from "@tanstack/react-table";
|
|
3
3
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
4
|
+
import { fuzzyFilter } from "../utils/helpers.js";
|
|
4
5
|
const globalFilterFn = (row, columnId, filterValue) => {
|
|
5
6
|
const value = row.getValue(columnId);
|
|
6
7
|
if (Array.isArray(value)) {
|
|
@@ -31,15 +32,23 @@ const columns = [
|
|
|
31
32
|
filterFn: "includesString",
|
|
32
33
|
enableGlobalFilter: true,
|
|
33
34
|
}),
|
|
35
|
+
columnHelper.accessor("label", {
|
|
36
|
+
filterFn: "fuzzy",
|
|
37
|
+
enableGlobalFilter: true,
|
|
38
|
+
}),
|
|
39
|
+
columnHelper.accessor("description", {
|
|
40
|
+
filterFn: "fuzzy",
|
|
41
|
+
enableGlobalFilter: true,
|
|
42
|
+
}),
|
|
34
43
|
columnHelper.accessor((row) => row.defaultInputGroups.flatMap((g) => Object.keys(g.fields)) || [], {
|
|
35
44
|
id: "inputFields",
|
|
36
45
|
filterFn: "arrIncludes",
|
|
37
|
-
enableGlobalFilter:
|
|
46
|
+
enableGlobalFilter: false,
|
|
38
47
|
}),
|
|
39
48
|
columnHelper.accessor((row) => getDefaultOutputFields(row) || [], {
|
|
40
49
|
id: "outputFields",
|
|
41
50
|
filterFn: "arrIncludes",
|
|
42
|
-
enableGlobalFilter:
|
|
51
|
+
enableGlobalFilter: false,
|
|
43
52
|
}),
|
|
44
53
|
columnHelper.accessor((row) => row.tags || [], {
|
|
45
54
|
id: "tags",
|
|
@@ -51,11 +60,6 @@ const columns = [
|
|
|
51
60
|
filterFn: "arrIncludes",
|
|
52
61
|
enableGlobalFilter: true,
|
|
53
62
|
}),
|
|
54
|
-
// columnHelper.accessor((row) => row.categories || [], {
|
|
55
|
-
// id: "categories",
|
|
56
|
-
// filterFn: "arrIncludes",
|
|
57
|
-
// enableGlobalFilter: true,
|
|
58
|
-
// }),
|
|
59
63
|
];
|
|
60
64
|
export function usePipeCatalogTable(config = {}) {
|
|
61
65
|
const [category, setCategory] = useState(null);
|
|
@@ -65,9 +69,11 @@ export function usePipeCatalogTable(config = {}) {
|
|
|
65
69
|
columns,
|
|
66
70
|
data: initialTableData,
|
|
67
71
|
getCoreRowModel: getCoreRowModel(),
|
|
68
|
-
getPaginationRowModel: getPaginationRowModel(),
|
|
69
72
|
getFilteredRowModel: getFilteredRowModel(),
|
|
70
|
-
globalFilterFn:
|
|
73
|
+
globalFilterFn: fuzzyFilter,
|
|
74
|
+
filterFns: {
|
|
75
|
+
fuzzy: fuzzyFilter,
|
|
76
|
+
},
|
|
71
77
|
getColumnCanGlobalFilter: (column) => column.columnDef.enableGlobalFilter !== false,
|
|
72
78
|
initialState: {
|
|
73
79
|
columnFilters: initialColumnFilters,
|
|
@@ -109,11 +115,8 @@ export function usePipeCatalogTable(config = {}) {
|
|
|
109
115
|
});
|
|
110
116
|
const addColumnFilter = useCallback((id, value) => {
|
|
111
117
|
setGlobalFilterImmediately("");
|
|
112
|
-
table.setColumnFilters([
|
|
113
|
-
|
|
114
|
-
{ id, value },
|
|
115
|
-
]);
|
|
116
|
-
}, [category, setGlobalFilterImmediately, table]);
|
|
118
|
+
table.setColumnFilters([{ id, value }]);
|
|
119
|
+
}, [setGlobalFilterImmediately, table]);
|
|
117
120
|
const handleCategoryChange = useCallback((category) => {
|
|
118
121
|
setCategory(category);
|
|
119
122
|
table.setColumnFilters([]);
|
|
@@ -121,21 +124,23 @@ export function usePipeCatalogTable(config = {}) {
|
|
|
121
124
|
}, [table, setGlobalFilterImmediately]);
|
|
122
125
|
const resetColumnFilters = useCallback(() => {
|
|
123
126
|
setGlobalFilterImmediately("");
|
|
124
|
-
|
|
125
|
-
}, [setGlobalFilterImmediately
|
|
127
|
+
setCategory(null);
|
|
128
|
+
}, [setGlobalFilterImmediately]);
|
|
126
129
|
const removeColumnFilter = useCallback((id) => {
|
|
127
130
|
table.getColumn(id)?.setFilterValue(null);
|
|
128
131
|
}, [table]);
|
|
129
132
|
const isFilterChecked = useCallback((id, value) => {
|
|
130
133
|
return columnFilters.some((f) => f.id === id && f.value === value);
|
|
131
134
|
}, [columnFilters]);
|
|
135
|
+
const getColumnFilterValue = useCallback((id) => {
|
|
136
|
+
const res = columnFilters.find((f) => f.id === id)?.value;
|
|
137
|
+
return res;
|
|
138
|
+
}, [columnFilters]);
|
|
132
139
|
const filterByField = useCallback((id, fieldName) => {
|
|
133
140
|
setExpandedSidebarSections([id]);
|
|
134
141
|
setGlobalFilterImmediately("");
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
{ id, value: fieldName },
|
|
138
|
-
]);
|
|
142
|
+
setCategory(null);
|
|
143
|
+
table.setColumnFilters([{ id, value: fieldName }]);
|
|
139
144
|
}, [table, setExpandedSidebarSections, setGlobalFilterImmediately]);
|
|
140
145
|
const tableState = table.getState();
|
|
141
146
|
const showFeaturedPipes = !globalFilterInput &&
|
|
@@ -167,5 +172,6 @@ export function usePipeCatalogTable(config = {}) {
|
|
|
167
172
|
category,
|
|
168
173
|
setCategory: handleCategoryChange,
|
|
169
174
|
showFeaturedPipes,
|
|
175
|
+
getColumnFilterValue,
|
|
170
176
|
};
|
|
171
177
|
}
|
|
@@ -6,12 +6,12 @@ export declare function useSearchCatalogTable(config?: {
|
|
|
6
6
|
}): {
|
|
7
7
|
table: import("@tanstack/react-table").Table<SearchCatalogTableData>;
|
|
8
8
|
sidebar: {
|
|
9
|
-
sortedOutputFieldEntries: [string, ("people:profiles:icypeas@1" | "companies:profiles:icypeas@1" | "people:profiles:clado@1" | "people:profiles:clado@2" | "people:employees:leadmagic@1" | "companies:profiles:exa@1" | "people:profiles:exa@1")[]][];
|
|
10
|
-
sortedTagEntries: [string, ("people:profiles:icypeas@1" | "companies:profiles:icypeas@1" | "people:profiles:clado@1" | "people:profiles:clado@2" | "people:employees:leadmagic@1" | "companies:profiles:exa@1" | "people:profiles:exa@1")[]][];
|
|
11
|
-
sortedProviderEntries: [string, ("people:profiles:icypeas@1" | "companies:profiles:icypeas@1" | "people:profiles:clado@1" | "people:profiles:clado@2" | "people:employees:leadmagic@1" | "companies:profiles:exa@1" | "people:profiles:exa@1")[]][];
|
|
12
|
-
searchIdsByOutputField: Record<string, ("people:profiles:icypeas@1" | "companies:profiles:icypeas@1" | "people:profiles:clado@1" | "people:profiles:clado@2" | "people:employees:leadmagic@1" | "companies:profiles:exa@1" | "people:profiles:exa@1")[]>;
|
|
13
|
-
searchIdsByProvider: Record<string, ("people:profiles:icypeas@1" | "companies:profiles:icypeas@1" | "people:profiles:clado@1" | "people:profiles:clado@2" | "people:employees:leadmagic@1" | "companies:profiles:exa@1" | "people:profiles:exa@1")[]>;
|
|
14
|
-
searchIdsByTag: Record<string, ("people:profiles:icypeas@1" | "companies:profiles:icypeas@1" | "people:profiles:clado@1" | "people:profiles:clado@2" | "people:employees:leadmagic@1" | "companies:profiles:exa@1" | "people:profiles:exa@1")[]>;
|
|
9
|
+
sortedOutputFieldEntries: [string, ("people:profiles:icypeas@1" | "companies:profiles:icypeas@1" | "people:profiles:clado@1" | "people:profiles:clado@2" | "people:employees:leadmagic@1" | "companies:profiles:exa@1" | "people:profiles:exa@1" | "companies:profiles:crustdata@1" | "people:profiles:crustdata@1")[]][];
|
|
10
|
+
sortedTagEntries: [string, ("people:profiles:icypeas@1" | "companies:profiles:icypeas@1" | "people:profiles:clado@1" | "people:profiles:clado@2" | "people:employees:leadmagic@1" | "companies:profiles:exa@1" | "people:profiles:exa@1" | "companies:profiles:crustdata@1" | "people:profiles:crustdata@1")[]][];
|
|
11
|
+
sortedProviderEntries: [string, ("people:profiles:icypeas@1" | "companies:profiles:icypeas@1" | "people:profiles:clado@1" | "people:profiles:clado@2" | "people:employees:leadmagic@1" | "companies:profiles:exa@1" | "people:profiles:exa@1" | "companies:profiles:crustdata@1" | "people:profiles:crustdata@1")[]][];
|
|
12
|
+
searchIdsByOutputField: Record<string, ("people:profiles:icypeas@1" | "companies:profiles:icypeas@1" | "people:profiles:clado@1" | "people:profiles:clado@2" | "people:employees:leadmagic@1" | "companies:profiles:exa@1" | "people:profiles:exa@1" | "companies:profiles:crustdata@1" | "people:profiles:crustdata@1")[]>;
|
|
13
|
+
searchIdsByProvider: Record<string, ("people:profiles:icypeas@1" | "companies:profiles:icypeas@1" | "people:profiles:clado@1" | "people:profiles:clado@2" | "people:employees:leadmagic@1" | "companies:profiles:exa@1" | "people:profiles:exa@1" | "companies:profiles:crustdata@1" | "people:profiles:crustdata@1")[]>;
|
|
14
|
+
searchIdsByTag: Record<string, ("people:profiles:icypeas@1" | "companies:profiles:icypeas@1" | "people:profiles:clado@1" | "people:profiles:clado@2" | "people:employees:leadmagic@1" | "companies:profiles:exa@1" | "people:profiles:exa@1" | "companies:profiles:crustdata@1" | "people:profiles:crustdata@1")[]>;
|
|
15
15
|
expandedSidebarSections: string[];
|
|
16
16
|
setExpandedSidebarSections: import("react").Dispatch<import("react").SetStateAction<string[]>>;
|
|
17
17
|
removeColumnFilter: (id: "inputFields" | "outputFields" | "tags" | "providers") => void;
|
|
@@ -26,5 +26,7 @@ export declare function useSearchCatalogTable(config?: {
|
|
|
26
26
|
category: SearchCategory | null;
|
|
27
27
|
setCategory: (category: SearchCategory | null) => void;
|
|
28
28
|
showFeaturedSearches: boolean;
|
|
29
|
+
getColumnFilterValue: (id: "outputFields" | "tags" | "providers") => string;
|
|
29
30
|
};
|
|
31
|
+
export type UseSearchCatalogTableReturn = ReturnType<typeof useSearchCatalogTable>;
|
|
30
32
|
//# sourceMappingURL=useSearchCatalogTable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSearchCatalogTable.d.ts","sourceRoot":"","sources":["../../src/hooks/useSearchCatalogTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACnB,KAAK,QAAQ,EACd,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,KAAK,YAAY,
|
|
1
|
+
{"version":3,"file":"useSearchCatalogTable.d.ts","sourceRoot":"","sources":["../../src/hooks/useSearchCatalogTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACnB,KAAK,QAAQ,EACd,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,KAAK,YAAY,EAKlB,MAAM,uBAAuB,CAAC;AA8B/B,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;AAoClE,wBAAgB,qBAAqB,CACnC,MAAM,GAAE;IACN,oBAAoB,CAAC,EAAE,YAAY,EAAE,CAAC;CAClC;;;;;;;;;;;iCA2EA,aAAa,GAAG,cAAc,GAAG,MAAM,GAAG,WAAW;8BAhBrD,aAAa,GAAG,cAAc,GAAG,MAAM,GAAG,WAAW,SAClD,MAAM;;;wBA4BT,aAAa,GAAG,cAAc,aACvB,MAAM;;;0BARb,aAAa,GAAG,cAAc,GAAG,MAAM,GAAG,WAAW,SAClD,MAAM;;;4BA0BF,cAAc,GAAG,IAAI;;+BAS3B,cAAc,GAAG,MAAM,GAAG,WAAW,KAE1B,MAAM;EA8BzB;AAED,MAAM,MAAM,2BAA2B,GAAG,UAAU,CAClD,OAAO,qBAAqB,CAC7B,CAAC"}
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { getDefaultSearchOutputFields, getInitialSearchTableData, getSearchTableDataAggregates, } from "@pipe0/ops";
|
|
2
|
-
import { createColumnHelper, getCoreRowModel, getFilteredRowModel,
|
|
2
|
+
import { createColumnHelper, getCoreRowModel, getFilteredRowModel, useReactTable, } from "@tanstack/react-table";
|
|
3
3
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
4
|
-
|
|
5
|
-
const value = row.getValue(columnId);
|
|
6
|
-
if (Array.isArray(value)) {
|
|
7
|
-
return value.some((item) => String(item).toLowerCase().includes(filterValue.toLowerCase()));
|
|
8
|
-
}
|
|
9
|
-
return String(value).toLowerCase().includes(filterValue.toLowerCase());
|
|
10
|
-
};
|
|
4
|
+
import { fuzzyFilter } from "../utils/helpers.js";
|
|
11
5
|
function useDebounce(cb, config = {}) {
|
|
12
6
|
const { initialValue = "", timeout = 400 } = config;
|
|
13
7
|
const [value, setValue] = useState(initialValue);
|
|
@@ -31,10 +25,18 @@ const columns = [
|
|
|
31
25
|
filterFn: "includesString",
|
|
32
26
|
enableGlobalFilter: true,
|
|
33
27
|
}),
|
|
28
|
+
columnHelper.accessor("description", {
|
|
29
|
+
filterFn: "fuzzy",
|
|
30
|
+
enableGlobalFilter: true,
|
|
31
|
+
}),
|
|
32
|
+
columnHelper.accessor("label", {
|
|
33
|
+
filterFn: "includesString",
|
|
34
|
+
enableGlobalFilter: true,
|
|
35
|
+
}),
|
|
34
36
|
columnHelper.accessor((row) => getDefaultSearchOutputFields(row.searchId) || [], {
|
|
35
37
|
id: "outputFields",
|
|
36
38
|
filterFn: "arrIncludes",
|
|
37
|
-
enableGlobalFilter:
|
|
39
|
+
enableGlobalFilter: false,
|
|
38
40
|
}),
|
|
39
41
|
columnHelper.accessor((row) => row.tags || [], {
|
|
40
42
|
id: "tags",
|
|
@@ -54,9 +56,11 @@ export function useSearchCatalogTable(config = {}) {
|
|
|
54
56
|
columns,
|
|
55
57
|
data: initialSearchTableData,
|
|
56
58
|
getCoreRowModel: getCoreRowModel(),
|
|
57
|
-
getPaginationRowModel: getPaginationRowModel(),
|
|
58
59
|
getFilteredRowModel: getFilteredRowModel(),
|
|
59
|
-
globalFilterFn:
|
|
60
|
+
globalFilterFn: fuzzyFilter,
|
|
61
|
+
filterFns: {
|
|
62
|
+
fuzzy: fuzzyFilter,
|
|
63
|
+
},
|
|
60
64
|
getColumnCanGlobalFilter: (column) => column.columnDef.enableGlobalFilter !== false,
|
|
61
65
|
initialState: {
|
|
62
66
|
columnFilters: initialColumnFilters,
|
|
@@ -114,6 +118,10 @@ export function useSearchCatalogTable(config = {}) {
|
|
|
114
118
|
table.setColumnFilters([]);
|
|
115
119
|
setGlobalFilterImmediately("");
|
|
116
120
|
}, [table, setGlobalFilterImmediately]);
|
|
121
|
+
const getColumnFilterValue = useCallback((id) => {
|
|
122
|
+
const res = columnFilters.find((f) => f.id === id)?.value;
|
|
123
|
+
return res;
|
|
124
|
+
}, [columnFilters]);
|
|
117
125
|
return {
|
|
118
126
|
table,
|
|
119
127
|
sidebar: {
|
|
@@ -137,5 +145,6 @@ export function useSearchCatalogTable(config = {}) {
|
|
|
137
145
|
category,
|
|
138
146
|
setCategory: handleCategoryChange,
|
|
139
147
|
showFeaturedSearches,
|
|
148
|
+
getColumnFilterValue,
|
|
140
149
|
};
|
|
141
150
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { usePipeCatalogTable, type InputFieldEntries, type OutputFieldEntries, } from "./hooks/usePipeCatalogTable.js";
|
|
2
|
-
export { useSearchCatalogTable, type SearchOutputFieldEntries, } from "./hooks/useSearchCatalogTable.js";
|
|
1
|
+
export { usePipeCatalogTable, type InputFieldEntries, type OutputFieldEntries, type UsePipeCatalogTableReturn, } from "./hooks/usePipeCatalogTable.js";
|
|
2
|
+
export { useSearchCatalogTable, type SearchOutputFieldEntries, type UseSearchCatalogTableReturn, } from "./hooks/useSearchCatalogTable.js";
|
|
3
3
|
export * from "./utils/helpers.js";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,GAC/B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,qBAAqB,EACrB,KAAK,wBAAwB,EAC7B,KAAK,2BAA2B,GACjC,MAAM,kCAAkC,CAAC;AAC1C,cAAc,oBAAoB,CAAC"}
|
package/dist/utils/helpers.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { RecordFieldType, RecordFieldStatus } from "@pipe0/ops";
|
|
2
|
+
import { type FilterFn } from "@tanstack/react-table";
|
|
2
3
|
export declare function getFieldTypeIcon(fieldType: RecordFieldType): import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
3
4
|
export declare function getFieldStatusIcon(fieldStatus: RecordFieldStatus): import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
5
|
+
export declare const fuzzyFilter: FilterFn<any>;
|
|
4
6
|
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/utils/helpers.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/utils/helpers.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAiBrE,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAoBtD,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,eAAe,6IAE1D;AAED,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,iBAAiB,6IAEhE;AAED,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,GAAG,CASrC,CAAC"}
|
package/dist/utils/helpers.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { BookDashed, Bookmark, Braces, CheckCheck, Hash, HelpCircle, Loader, Pause, ToggleRight, TriangleDashed, Type, X, } from "lucide-react";
|
|
2
|
+
import { rankItem } from "@tanstack/match-sorter-utils";
|
|
3
|
+
import {} from "@tanstack/react-table";
|
|
2
4
|
const fieldStatusIconMap = {
|
|
3
5
|
completed: CheckCheck,
|
|
4
6
|
failed: X,
|
|
@@ -21,3 +23,11 @@ export function getFieldTypeIcon(fieldType) {
|
|
|
21
23
|
export function getFieldStatusIcon(fieldStatus) {
|
|
22
24
|
return fieldStatusIconMap[fieldStatus];
|
|
23
25
|
}
|
|
26
|
+
export const fuzzyFilter = (row, columnId, value, addMeta) => {
|
|
27
|
+
// Rank the item
|
|
28
|
+
const itemRank = rankItem(row.getValue(columnId), value);
|
|
29
|
+
// Store the itemRank info
|
|
30
|
+
addMeta({ itemRank });
|
|
31
|
+
// Return if the item should be filtered in/out
|
|
32
|
+
return itemRank.passed;
|
|
33
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipe0/react-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.74",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "React utils to work with pipe0",
|
|
6
6
|
"keywords": [
|
|
@@ -30,11 +30,12 @@
|
|
|
30
30
|
"author": "",
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"dependencies": {
|
|
33
|
+
"@tanstack/match-sorter-utils": "^8.19.4",
|
|
33
34
|
"@tanstack/react-table": "^8.21.3",
|
|
34
35
|
"lucide-react": "^0.475.0",
|
|
35
36
|
"react": "^19.0.0",
|
|
36
37
|
"react-dom": "^19.0.0",
|
|
37
|
-
"@pipe0/ops": "0.0.
|
|
38
|
+
"@pipe0/ops": "0.0.5"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
40
41
|
"@types/node": "^22.18.10",
|