@datum-cloud/activity-ui 0.1.0 → 0.3.0-dev.e099a6f
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/components/ActivityLayout.d.ts +26 -0
- package/dist/components/ActivityLayout.d.ts.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +214 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +221 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/activity-filters.d.ts +25 -0
- package/dist/lib/activity-filters.d.ts.map +1 -0
- package/dist/lib/activity-share.d.ts +23 -0
- package/dist/lib/activity-share.d.ts.map +1 -0
- package/package.json +18 -14
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ActivityFeedFilters, TimeRange } from '../hooks/useActivityFeed';
|
|
2
|
+
import type { EventsFeedFilters } from '../hooks/useEventsFeed';
|
|
3
|
+
/**
|
|
4
|
+
* Serialize Activity Feed filters to URL search params.
|
|
5
|
+
* Used to sync filter changes back to the URL for deep linking.
|
|
6
|
+
*/
|
|
7
|
+
export declare function serializeActivityFilters(filters: Partial<ActivityFeedFilters>, timeRange: TimeRange, streamingEnabled?: boolean): URLSearchParams;
|
|
8
|
+
/**
|
|
9
|
+
* Serialize Events Feed filters to URL search params.
|
|
10
|
+
* Used to sync filter changes back to the URL for deep linking.
|
|
11
|
+
*/
|
|
12
|
+
export declare function serializeEventFilters(filters: Partial<EventsFeedFilters>, timeRange: TimeRange, streamingEnabled?: boolean): URLSearchParams;
|
|
13
|
+
/**
|
|
14
|
+
* Parse Activity Feed filters from URL query params
|
|
15
|
+
*/
|
|
16
|
+
export declare function parseActivityFilters(searchParams: URLSearchParams): Partial<ActivityFeedFilters>;
|
|
17
|
+
/**
|
|
18
|
+
* Parse Events Feed filters from URL query params
|
|
19
|
+
*/
|
|
20
|
+
export declare function parseEventFilters(searchParams: URLSearchParams): Partial<EventsFeedFilters>;
|
|
21
|
+
/**
|
|
22
|
+
* Parse time range from URL query params
|
|
23
|
+
*/
|
|
24
|
+
export declare function parseTimeRange(searchParams: URLSearchParams): TimeRange | undefined;
|
|
25
|
+
//# sourceMappingURL=activity-filters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activity-filters.d.ts","sourceRoot":"","sources":["../../src/lib/activity-filters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC/E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,OAAO,CAAC,mBAAmB,CAAC,EACrC,SAAS,EAAE,SAAS,EACpB,gBAAgB,GAAE,OAAc,GAC/B,eAAe,CA+CjB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,OAAO,CAAC,iBAAiB,CAAC,EACnC,SAAS,EAAE,SAAS,EACpB,gBAAgB,GAAE,OAAc,GAC/B,eAAe,CAmCjB;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,eAAe,GAAG,OAAO,CAAC,mBAAmB,CAAC,CA8ChG;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC,CA6B3F;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,YAAY,EAAE,eAAe,GAAG,SAAS,GAAG,SAAS,CASnF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { EffectiveTimeRange } from '../types/activity';
|
|
2
|
+
/**
|
|
3
|
+
* Generate a shareable URL for the current activity view.
|
|
4
|
+
*
|
|
5
|
+
* The shareable URL:
|
|
6
|
+
* - Uses absolute timestamps (not relative like "now-1h")
|
|
7
|
+
* - Disables streaming so the view is static
|
|
8
|
+
* - Preserves all current filters
|
|
9
|
+
*
|
|
10
|
+
* This ensures the shared link shows the exact same data regardless of
|
|
11
|
+
* when someone opens it.
|
|
12
|
+
*
|
|
13
|
+
* @param basePath - Current route path (e.g., "/activity/feed")
|
|
14
|
+
* @param effectiveTimeRange - Server-calculated effective time range
|
|
15
|
+
* @param filters - Current filter state
|
|
16
|
+
* @param origin - Window origin for absolute URL (e.g., "https://staff.datum.cloud")
|
|
17
|
+
*/
|
|
18
|
+
export declare function generateShareableUrl(basePath: string, effectiveTimeRange: EffectiveTimeRange, filters: Record<string, string>, origin?: string): string;
|
|
19
|
+
/**
|
|
20
|
+
* Copy text to clipboard and return success status
|
|
21
|
+
*/
|
|
22
|
+
export declare function copyToClipboard(text: string): Promise<boolean>;
|
|
23
|
+
//# sourceMappingURL=activity-share.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activity-share.d.ts","sourceRoot":"","sources":["../../src/lib/activity-share.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAChB,kBAAkB,EAAE,kBAAkB,EACtC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,MAAM,GAAE,MAAoE,GAC3E,MAAM,CAkBR;AAED;;GAEG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAQpE"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datum-cloud/activity-ui",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"packageManager": "pnpm@10.29.3",
|
|
3
|
+
"version": "0.3.0-dev.e099a6f",
|
|
5
4
|
"description": "React components for Kubernetes Activity",
|
|
6
5
|
"main": "dist/index.js",
|
|
7
6
|
"module": "dist/index.esm.js",
|
|
@@ -17,17 +16,6 @@
|
|
|
17
16
|
"files": [
|
|
18
17
|
"dist"
|
|
19
18
|
],
|
|
20
|
-
"scripts": {
|
|
21
|
-
"build": "rollup -c",
|
|
22
|
-
"dev": "rollup -c -w",
|
|
23
|
-
"lint": "eslint src --ext .ts,.tsx",
|
|
24
|
-
"type-check": "tsc --noEmit",
|
|
25
|
-
"test:e2e": "playwright test",
|
|
26
|
-
"test:e2e:ui": "playwright test --ui",
|
|
27
|
-
"test:e2e:headed": "playwright test --headed",
|
|
28
|
-
"test:e2e:integration": "playwright test --config=playwright.integration.config.ts",
|
|
29
|
-
"test:e2e:integration:headed": "playwright test --config=playwright.integration.config.ts --headed"
|
|
30
|
-
},
|
|
31
19
|
"keywords": [
|
|
32
20
|
"react",
|
|
33
21
|
"kubernetes",
|
|
@@ -36,6 +24,11 @@
|
|
|
36
24
|
],
|
|
37
25
|
"author": "Milo APIs",
|
|
38
26
|
"license": "Apache-2.0",
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "https://github.com/datum-cloud/activity",
|
|
30
|
+
"directory": "ui"
|
|
31
|
+
},
|
|
39
32
|
"peerDependencies": {
|
|
40
33
|
"@monaco-editor/react": "^4.6.0",
|
|
41
34
|
"@radix-ui/react-checkbox": "^1.0.0",
|
|
@@ -83,5 +76,16 @@
|
|
|
83
76
|
"lucide-react": "^0.563.0",
|
|
84
77
|
"tailwind-merge": "^3.4.0",
|
|
85
78
|
"tailwindcss-animate": "^1.0.7"
|
|
79
|
+
},
|
|
80
|
+
"scripts": {
|
|
81
|
+
"build": "rollup -c",
|
|
82
|
+
"dev": "rollup -c -w",
|
|
83
|
+
"lint": "eslint src --ext .ts,.tsx",
|
|
84
|
+
"type-check": "tsc --noEmit",
|
|
85
|
+
"test:e2e": "playwright test",
|
|
86
|
+
"test:e2e:ui": "playwright test --ui",
|
|
87
|
+
"test:e2e:headed": "playwright test --headed",
|
|
88
|
+
"test:e2e:integration": "playwright test --config=playwright.integration.config.ts",
|
|
89
|
+
"test:e2e:integration:headed": "playwright test --config=playwright.integration.config.ts --headed"
|
|
86
90
|
}
|
|
87
|
-
}
|
|
91
|
+
}
|