@pipe0/react-sdk 0.0.4 → 0.0.5
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePipeCatalogTable.d.ts","sourceRoot":"","sources":["../../src/hooks/usePipeCatalogTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,oBAAoB,EACzB,KAAK,YAAY,EACjB,KAAK,MAAM,EACZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,KAAK,YAAY,EAMlB,MAAM,uBAAuB,CAAC;AAG/B,wBAAgB,WAAW,CACzB,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,OAAO,EAC1B,MAAM,GAAE;IAAE,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAO,2FAQjB,MAAM,WAc9C;AAED,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;AA0B1D,wBAAgB,mBAAmB,CACjC,MAAM,GAAE;IACN,oBAAoB,CAAC,EAAE,YAAY,EAAE,CAAC;CAClC;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"usePipeCatalogTable.d.ts","sourceRoot":"","sources":["../../src/hooks/usePipeCatalogTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,oBAAoB,EACzB,KAAK,YAAY,EACjB,KAAK,MAAM,EACZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,KAAK,YAAY,EAMlB,MAAM,uBAAuB,CAAC;AAG/B,wBAAgB,WAAW,CACzB,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,OAAO,EAC1B,MAAM,GAAE;IAAE,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAO,2FAQjB,MAAM,WAc9C;AAED,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;AA0B1D,wBAAgB,mBAAmB,CACjC,MAAM,GAAE;IACN,oBAAoB,CAAC,EAAE,YAAY,EAAE,CAAC;CAClC;;;;;;;;;;;;;iCAkFA,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;;;4BA1CgB,YAAY,GAAG,IAAI;;EA0FnD"}
|
|
@@ -38,9 +38,7 @@ const columns = [
|
|
|
38
38
|
}),
|
|
39
39
|
];
|
|
40
40
|
export function usePipeCatalogTable(config = {}) {
|
|
41
|
-
const { initialColumnFilters: initialColumnFilters = [
|
|
42
|
-
{ id: "category", value: "enrichment" },
|
|
43
|
-
], } = config;
|
|
41
|
+
const { initialColumnFilters: initialColumnFilters = [] } = config;
|
|
44
42
|
const initialTableData = useMemo(() => getInitialTableData(), []);
|
|
45
43
|
const table = useReactTable({
|
|
46
44
|
columns,
|
|
@@ -104,6 +102,9 @@ export function usePipeCatalogTable(config = {}) {
|
|
|
104
102
|
{ id, value: fieldName },
|
|
105
103
|
]);
|
|
106
104
|
};
|
|
105
|
+
const showFeaturedPipes = !globalFilterInput &&
|
|
106
|
+
category === null &&
|
|
107
|
+
table.getState().columnFilters.every((e) => e.id === "categories");
|
|
107
108
|
return {
|
|
108
109
|
table,
|
|
109
110
|
sidebar: {
|
|
@@ -128,5 +129,6 @@ export function usePipeCatalogTable(config = {}) {
|
|
|
128
129
|
resetColumnFilters,
|
|
129
130
|
category,
|
|
130
131
|
setCategory,
|
|
132
|
+
showFeaturedPipes,
|
|
131
133
|
};
|
|
132
134
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipe0/react-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "React utils to work with pipe0",
|
|
6
6
|
"keywords": [
|
|
@@ -22,25 +22,26 @@
|
|
|
22
22
|
".": "./dist/index.js"
|
|
23
23
|
},
|
|
24
24
|
"private": false,
|
|
25
|
+
"scripts": {
|
|
26
|
+
"lint": "eslint . --max-warnings 0",
|
|
27
|
+
"check-types": "tsc --noEmit",
|
|
28
|
+
"dev": " tsc --watch",
|
|
29
|
+
"build": "rm -rf ./dist && tsc",
|
|
30
|
+
"prepublishOnly": "pnpm run build"
|
|
31
|
+
},
|
|
25
32
|
"author": "",
|
|
26
33
|
"license": "MIT",
|
|
27
34
|
"dependencies": {
|
|
28
|
-
"
|
|
29
|
-
"react
|
|
30
|
-
"
|
|
31
|
-
"@
|
|
35
|
+
"@pipe0/client-sdk": "workspace:*",
|
|
36
|
+
"react": "catalog:",
|
|
37
|
+
"react-dom": "catalog:",
|
|
38
|
+
"@tanstack/react-table": "catalog:"
|
|
32
39
|
},
|
|
33
40
|
"devDependencies": {
|
|
34
|
-
"@
|
|
41
|
+
"@pipe0/eslint-config": "workspace:*",
|
|
42
|
+
"@types/react": "catalog:",
|
|
35
43
|
"@types/node": "^22.13.2",
|
|
36
|
-
"eslint": "
|
|
37
|
-
"@types/react-dom": "
|
|
38
|
-
"@pipe0/eslint-config": "0.0.0"
|
|
39
|
-
},
|
|
40
|
-
"scripts": {
|
|
41
|
-
"lint": "eslint . --max-warnings 0",
|
|
42
|
-
"check-types": "tsc --noEmit",
|
|
43
|
-
"dev": " tsc --watch",
|
|
44
|
-
"build": "rm -rf ./dist && tsc"
|
|
44
|
+
"eslint": "catalog:",
|
|
45
|
+
"@types/react-dom": "catalog:"
|
|
45
46
|
}
|
|
46
|
-
}
|
|
47
|
+
}
|