@har-analyzer/components 0.0.15 → 0.0.17

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.
Files changed (59) hide show
  1. package/README.md +59 -28
  2. package/dist/chunks/collapsible-key-value-list.js +24 -0
  3. package/dist/chunks/collapsible-section.js +22 -0
  4. package/dist/chunks/content-viewer.js +3056 -0
  5. package/dist/chunks/context.js +5 -0
  6. package/dist/chunks/headers-viewer.js +32 -0
  7. package/dist/chunks/index.js +2265 -174
  8. package/dist/chunks/index2.js +49 -0
  9. package/dist/chunks/payload-viewer.js +15 -0
  10. package/dist/chunks/provider.js +11 -0
  11. package/dist/chunks/response-viewer.js +10 -0
  12. package/dist/chunks/vertical-gap.js +1 -1
  13. package/dist/components/collapsible-section.d.ts +2 -1
  14. package/dist/components/enhanced-board/constants/i18n.d.ts +11 -6
  15. package/dist/components/enhanced-board/index.d.ts +7 -9
  16. package/dist/components/enhanced-table.d.ts +14 -2
  17. package/dist/components/horizontal-padding.d.ts +2 -0
  18. package/dist/components/inline-copy-to-clipboard.d.ts +6 -0
  19. package/dist/components/lazy-load.d.ts +2 -0
  20. package/dist/context/user-preferences/index.d.ts +6 -0
  21. package/dist/context/user-preferences/provider.d.ts +9 -0
  22. package/dist/context/user-preferences-store/context.d.ts +5 -0
  23. package/dist/context/user-preferences-store/hooks.d.ts +1 -0
  24. package/dist/context/user-preferences-store/provider.d.ts +5 -0
  25. package/dist/features/har-analyzer/components/app-layout.d.ts +7 -0
  26. package/dist/features/har-analyzer/components/preferences/index.d.ts +1 -0
  27. package/dist/features/har-analyzer/components/top-navigation.d.ts +8 -0
  28. package/dist/features/har-analyzer/context/preferences.d.ts +2 -0
  29. package/dist/features/har-analyzer-preferences-store/index.d.ts +2 -0
  30. package/dist/features/har-entries-viewer/index.d.ts +1 -1
  31. package/dist/features/list-har-entries/components/compare-mode-switcher.d.ts +1 -0
  32. package/dist/features/list-har-entries/components/content-type-filter.d.ts +1 -0
  33. package/dist/features/list-har-entries/components/errors-filter.d.ts +1 -0
  34. package/dist/features/list-har-entries/components/har-entries-table.d.ts +8 -0
  35. package/dist/features/list-har-entries/context/preferences.d.ts +5 -0
  36. package/dist/features/list-har-entries/index.d.ts +3 -7
  37. package/dist/har-analyzer-preferences-store.js +4 -0
  38. package/dist/har-analyzer.js +94 -81
  39. package/dist/har-entries-viewer.js +167 -7
  40. package/dist/index.d.ts +7 -2
  41. package/dist/index.js +12 -13
  42. package/dist/list-har-entries.js +3 -2126
  43. package/dist/utils/har.d.ts +1 -1
  44. package/dist/view-har-entry.js +5 -3128
  45. package/package.json +1 -1
  46. package/dist/chunks/json.js +0 -10
  47. package/dist/components/enhanced-top-navigation.d.ts +0 -7
  48. package/dist/components/simple-app-layout.d.ts +0 -6
  49. package/dist/components/simple-app-preferences/index.d.ts +0 -1
  50. package/dist/features/har-analyzer-preferences/index.d.ts +0 -7
  51. package/dist/features/har-entries-viewer/components/har-entries-filters/components/content-type-filter.d.ts +0 -7
  52. package/dist/features/har-entries-viewer/components/har-entries-filters/components/errors-filter.d.ts +0 -6
  53. package/dist/features/har-entries-viewer/components/har-entries-filters/index.d.ts +0 -1
  54. package/dist/features/har-entries-viewer/hooks/preferences.d.ts +0 -2
  55. package/dist/har-analyzer-preferences.js +0 -25
  56. package/dist/hooks/app-preferences.d.ts +0 -2
  57. package/dist/hooks/table-preferences.d.ts +0 -12
  58. /package/dist/{components/simple-app-preferences → features/har-analyzer/components/preferences/components}/content-width-switcher.d.ts +0 -0
  59. /package/dist/{components/simple-app-preferences → features/har-analyzer/components/preferences/components}/theme-switcher.d.ts +0 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@har-analyzer/components",
3
3
  "type": "module",
4
- "version": "0.0.15",
4
+ "version": "0.0.17",
5
5
  "description": "Reusable React components for HAR Analyzer",
6
6
  "author": "Allan Joshua",
7
7
  "license": "MIT",
@@ -1,10 +0,0 @@
1
- function o(e) {
2
- try {
3
- return [JSON.parse(e), void 0];
4
- } catch (r) {
5
- return console.warn("Failed to parse JSON string:", e, "Error:", r), [void 0, r];
6
- }
7
- }
8
- export {
9
- o as s
10
- };
@@ -1,7 +0,0 @@
1
- export declare const ENHANCED_TOP_NAVIGATION_ID = "top-navigation";
2
- export interface EnhancedTopNavigationProps {
3
- logo?: React.ReactNode;
4
- appName: string;
5
- utilities?: React.ReactNode;
6
- }
7
- export default function EnhancedTopNavigation({ logo, appName, utilities, }: EnhancedTopNavigationProps): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +0,0 @@
1
- export interface SimpleAppLayoutProps {
2
- logo?: React.ReactNode;
3
- appName: string;
4
- content: React.ReactNode;
5
- }
6
- export default function SimpleAppLayout({ logo, appName, content, }: SimpleAppLayoutProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export default function SimpleAppPreferences(): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +0,0 @@
1
- import { PropsWithChildren } from 'react';
2
- type UsePreferenceStore = (key: string) => readonly [string | undefined, (preference: string) => void];
3
- export default function HARAnalyzerPreferencesProvider({ usePreferenceStore, children }: PropsWithChildren<{
4
- usePreferenceStore: UsePreferenceStore;
5
- }>): import("react/jsx-runtime").JSX.Element;
6
- export declare function useHARAnalyzerPreferences<T>(preferenceKey: string, defaultValue: T): readonly [T, (newPreference: T) => void];
7
- export {};
@@ -1,7 +0,0 @@
1
- import { ContentTypeGroup } from '../../../../../utils/content-type';
2
- interface ContentTypeFilterProps {
3
- contentTypeFilters: ContentTypeGroup[];
4
- onChange: (contentTypeFilters: ContentTypeGroup[]) => void;
5
- }
6
- export default function ContentTypeFilter({ contentTypeFilters, onChange }: ContentTypeFilterProps): import("react/jsx-runtime").JSX.Element;
7
- export {};
@@ -1,6 +0,0 @@
1
- interface ErrorsFilterProps {
2
- shouldFilterErrors: boolean;
3
- onChange: (shouldFilterErrors: boolean) => void;
4
- }
5
- export default function ErrorsFilter({ shouldFilterErrors, onChange }: ErrorsFilterProps): import("react/jsx-runtime").JSX.Element;
6
- export {};
@@ -1 +0,0 @@
1
- export default function HAREntriesFilters(): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- export declare function useErrorsFilterPreference(): readonly [boolean, (newPreference: boolean) => void];
2
- export declare function useContentTypeFiltersPreference(): readonly [("JSON" | "XML" | "JS" | "CSS" | "HTML" | "Doc" | "Img" | "Font" | "Media" | "Other")[], (newPreference: ("JSON" | "XML" | "JS" | "CSS" | "HTML" | "Doc" | "Img" | "Font" | "Media" | "Other")[]) => void];
@@ -1,25 +0,0 @@
1
- import { jsx as c } from "react/jsx-runtime";
2
- import { createContext as i, use as a, useMemo as u } from "react";
3
- import { s as P } from "./chunks/json.js";
4
- const o = i(void 0);
5
- function z({ usePreferenceStore: e, children: r }) {
6
- return /* @__PURE__ */ c(o, { value: e, children: r });
7
- }
8
- function y(e, r) {
9
- const s = a(o);
10
- if (!s)
11
- throw new Error("useHARAnalyzerPreferences must be used within a HARAnalyzerPreferencesProvider");
12
- const [n, f] = s(e);
13
- return [u(() => {
14
- if (!n)
15
- return;
16
- const [t] = P(n);
17
- return t;
18
- }, [n]) ?? r, (t) => {
19
- f(JSON.stringify(t));
20
- }];
21
- }
22
- export {
23
- z as default,
24
- y as useHARAnalyzerPreferences
25
- };
@@ -1,2 +0,0 @@
1
- export declare function useAppContentWidthPreference(): readonly [boolean, (newPreference: boolean) => void];
2
- export declare function useThemePreference(): readonly [boolean, (newPreference: boolean) => void];
@@ -1,12 +0,0 @@
1
- import { CollectionPreferencesProps } from '@cloudscape-design/components/collection-preferences';
2
- export declare function useTablePreferences(tableId: string, defaultPreferences: CollectionPreferencesProps.Preferences): readonly [CollectionPreferencesProps.Preferences<any>, (newPreference: CollectionPreferencesProps.Preferences<any>) => void];
3
- export declare function useTablePreferredColumnWidths(tableId: string, defaultWidths?: {
4
- id: string;
5
- width?: number;
6
- }[]): readonly [{
7
- id: string;
8
- width?: number;
9
- }[], (newPreference: {
10
- id: string;
11
- width?: number;
12
- }[]) => void];