@har-analyzer/components 0.0.20 → 0.0.21

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 (65) hide show
  1. package/dist/chunks/collapsible-key-value-list.js +41 -10
  2. package/dist/chunks/collapsible-section.js +1 -1
  3. package/dist/chunks/common.js +10 -0
  4. package/dist/chunks/content-type.js +15 -21
  5. package/dist/chunks/har-entry-response-status.js +14 -0
  6. package/dist/chunks/har.js +47 -20
  7. package/dist/chunks/horizontal-padding.js +8 -0
  8. package/dist/chunks/index.js +589 -891
  9. package/dist/chunks/index2.js +271 -49
  10. package/dist/chunks/list-har-entries.js +30 -0
  11. package/dist/chunks/request-headers.js +34 -0
  12. package/dist/chunks/request-payload.js +25 -0
  13. package/dist/chunks/response-headers.js +19 -0
  14. package/dist/chunks/response-payload.js +10 -0
  15. package/dist/components/collapsible-key-value-list.d.ts +7 -2
  16. package/dist/components/collapsible-section.d.ts +2 -1
  17. package/dist/components/enhanced-board/i18n.d.ts +26 -0
  18. package/dist/components/enhanced-board/index.d.ts +15 -0
  19. package/dist/components/{enhanced-table.d.ts → enhanced-table/index.d.ts} +9 -15
  20. package/dist/components/enhanced-table/preferences.d.ts +13 -0
  21. package/dist/components/har-entry-response-status.d.ts +4 -0
  22. package/dist/components/space-between.d.ts +2 -0
  23. package/dist/features/har-analyzer/components/app-layout.d.ts +3 -2
  24. package/dist/features/har-analyzer/components/top-navigation.d.ts +3 -2
  25. package/dist/features/har-analyzer/index.d.ts +2 -1
  26. package/dist/features/har-entries-viewer/components/har-entries-viewer-action-stripe/har-entry-header-picker.d.ts +6 -0
  27. package/dist/features/har-entries-viewer/components/har-entries-viewer-action-stripe/index.d.ts +8 -0
  28. package/dist/features/har-entries-viewer/components/har-entries-viewer-provider.d.ts +2 -0
  29. package/dist/features/har-entries-viewer/components/view-har-entry-header.d.ts +7 -0
  30. package/dist/features/har-entries-viewer/context/preferences.d.ts +2 -0
  31. package/dist/features/har-entries-viewer/index.d.ts +1 -1
  32. package/dist/features/list-har-entries/components/list-har-entries-provider.d.ts +2 -0
  33. package/dist/features/list-har-entries/components/list-har-entries-table-header/index.d.ts +6 -0
  34. package/dist/features/list-har-entries/components/list-har-entries-table.d.ts +8 -0
  35. package/dist/features/list-har-entries/components/list-har-entries.d.ts +5 -0
  36. package/dist/features/list-har-entries/context/preferences.d.ts +1 -3
  37. package/dist/features/list-har-entries/hooks/filter-har-entries.d.ts +2 -0
  38. package/dist/features/list-har-entries/index.d.ts +8 -4
  39. package/dist/features/view-har-entry/components/request-headers.d.ts +4 -0
  40. package/dist/features/view-har-entry/components/request-payload.d.ts +6 -0
  41. package/dist/features/view-har-entry/components/response-headers.d.ts +4 -0
  42. package/dist/features/view-har-entry/components/response-payload.d.ts +6 -0
  43. package/dist/features/view-har-entry/index.d.ts +1 -1
  44. package/dist/har-analyzer.js +16 -15
  45. package/dist/har-entries-viewer.js +271 -630
  46. package/dist/index.d.ts +1 -1
  47. package/dist/index.js +25 -17
  48. package/dist/list-har-entries.js +6 -3
  49. package/dist/utils/array.d.ts +7 -0
  50. package/dist/utils/har.d.ts +12 -1
  51. package/dist/view-har-entry.js +58 -6
  52. package/package.json +2 -2
  53. package/dist/assets/har-entries-viewer.css +0 -1
  54. package/dist/chunks/headers-viewer.js +0 -32
  55. package/dist/chunks/payload-viewer.js +0 -15
  56. package/dist/chunks/response-viewer.js +0 -10
  57. package/dist/components/r2-layout/fgl.d.ts +0 -10
  58. package/dist/components/r2-layout/index.d.ts +0 -22
  59. package/dist/features/list-har-entries/components/har-entries-table.d.ts +0 -8
  60. package/dist/features/view-har-entry/components/headers-viewer.d.ts +0 -6
  61. package/dist/features/view-har-entry/components/payload-viewer.d.ts +0 -6
  62. package/dist/features/view-har-entry/components/response-viewer.d.ts +0 -6
  63. /package/dist/features/{list-har-entries/components → har-entries-viewer/components/har-entries-viewer-action-stripe}/compare-mode-switcher.d.ts +0 -0
  64. /package/dist/features/list-har-entries/components/{content-type-filter.d.ts → list-har-entries-table-header/content-type-filter.d.ts} +0 -0
  65. /package/dist/features/list-har-entries/components/{errors-filter.d.ts → list-har-entries-table-header/errors-filter.d.ts} +0 -0
@@ -0,0 +1,7 @@
1
+ import { HAREntry } from '../../../utils/har';
2
+ interface ViewHAREntryHeaderProps {
3
+ harEntries: HAREntry[];
4
+ harEntry: HAREntry;
5
+ }
6
+ export default function ViewHAREntryHeader(props: ViewHAREntryHeaderProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare const useCompareModePreference: () => import('../../../context/user-preferences/provider').UserPreferencesContextValue<boolean>, CompareModeProvider: ({ children }: import('react').PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const useHAREntryHeadersPreference: () => import('../../../context/user-preferences/provider').UserPreferencesContextValue<string[]>, HAREntryHeadersProvider: ({ children }: import('react').PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
@@ -3,5 +3,5 @@ interface HAREntriesViewerProps {
3
3
  harEntries: HAREntry[];
4
4
  tableTitle?: string;
5
5
  }
6
- export default function HAREntriesViewer(props: HAREntriesViewerProps): import("react/jsx-runtime").JSX.Element;
6
+ export default function HAREntriesViewerWithProvider(props: HAREntriesViewerProps): import("react/jsx-runtime").JSX.Element;
7
7
  export {};
@@ -0,0 +1,2 @@
1
+ import { PropsWithChildren } from 'react';
2
+ export default function ListHAREntriesProvider({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { HAREntry } from '../../../../utils/har';
2
+ export interface ListHAREntriesTableHeaderProps {
3
+ harEntries: HAREntry[];
4
+ title?: string;
5
+ }
6
+ export default function ListHAREntriesTableHeader(props: ListHAREntriesTableHeaderProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { HAREntry } from '../../../utils/har';
2
+ export interface ListHAREntriesTableProps {
3
+ harEntries: HAREntry[];
4
+ selectedHAREntries: HAREntry[];
5
+ onSelectionChange: (selectedHAREntries: HAREntry[]) => void;
6
+ enableMultiSelect?: boolean;
7
+ }
8
+ export default function ListHAREntriesTable({ harEntries, selectedHAREntries, onSelectionChange, enableMultiSelect, }: ListHAREntriesTableProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { ListHAREntriesTableProps } from './list-har-entries-table';
2
+ import { ListHAREntriesTableHeaderProps } from './list-har-entries-table-header';
3
+ export interface ListHAREntriesProps extends ListHAREntriesTableProps, ListHAREntriesTableHeaderProps {
4
+ }
5
+ export default function ListHAREntries(props: ListHAREntriesProps): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,3 @@
1
- import { EnhancedTablePreferences } from '../../../components/enhanced-table';
2
- export declare const useTablePreferences: () => import('../../../context/user-preferences/provider').UserPreferencesContextValue<EnhancedTablePreferences>, TablePreferencesProvider: ({ children }: import('react').PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
3
- export declare const useCompareModePreference: () => import('../../../context/user-preferences/provider').UserPreferencesContextValue<boolean>, CompareModeProvider: ({ children }: import('react').PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
1
+ export declare const useTablePreferences: () => import('../../../context/user-preferences/provider').UserPreferencesContextValue<import('../../../components/enhanced-table/preferences').EnhancedTablePreferences>, TablePreferencesProvider: ({ children }: import('react').PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
4
2
  export declare const useErrorsFilterPreference: () => import('../../../context/user-preferences/provider').UserPreferencesContextValue<boolean>, ErrorsFilterProvider: ({ children }: import('react').PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
5
3
  export declare const useContentTypeFiltersPreference: () => import('../../../context/user-preferences/provider').UserPreferencesContextValue<("JSON" | "XML" | "JS" | "CSS" | "HTML" | "Doc" | "Img" | "Font" | "Media" | "Other")[]>, ContentTypeFiltersProvider: ({ children }: import('react').PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { HAREntry } from '../../../utils/har';
2
+ export declare function useFilteredHAREntries(harEntries: HAREntry[]): HAREntry[];
@@ -1,4 +1,8 @@
1
- import { HAREntriesTableProps } from './components/har-entries-table';
2
- export interface ListHAREntriesProps extends HAREntriesTableProps {
3
- }
4
- export default function ListHAREntries(props: ListHAREntriesProps): import("react/jsx-runtime").JSX.Element;
1
+ export { default as ListHAREntries } from './components/list-har-entries';
2
+ export type * from './components/list-har-entries';
3
+ export { default as ListHAREntriesProvider } from './components/list-har-entries-provider';
4
+ export type * from './components/list-har-entries-provider';
5
+ export { default as ListHAREntriesTable } from './components/list-har-entries-table';
6
+ export type * from './components/list-har-entries-table';
7
+ export { default as ListHAREntriesTableHeader } from './components/list-har-entries-table-header';
8
+ export type * from './components/list-har-entries-table-header';
@@ -0,0 +1,4 @@
1
+ import { HAREntry } from '../../../utils/har';
2
+ export default function RequestHeaders({ harEntry }: {
3
+ harEntry: HAREntry;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { HAREntry } from '../../../utils/har';
2
+ interface RequestPayloadProps {
3
+ harEntry: HAREntry;
4
+ }
5
+ export default function RequestPayload({ harEntry }: RequestPayloadProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,4 @@
1
+ import { HAREntry } from '../../../utils/har';
2
+ export default function ResponseHeaders({ harEntry }: {
3
+ harEntry: HAREntry;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { HAREntry } from '../../../utils/har';
2
+ interface ResponsePayloadProps {
3
+ harEntry: HAREntry;
4
+ }
5
+ export default function ResponsePayload({ harEntry }: ResponsePayloadProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -1,5 +1,5 @@
1
1
  import { HAREntry } from '../../utils/har';
2
- export declare const DEFAULT_SELECTED_TAB_ID = "headers";
2
+ export declare const DEFAULT_SELECTED_TAB_ID = "request-headers";
3
3
  export interface ViewHAREntryProps {
4
4
  harEntry: HAREntry;
5
5
  initialSelectedTabId?: string;
@@ -1,17 +1,18 @@
1
1
  import { jsx as e, jsxs as n, Fragment as h } from "react/jsx-runtime";
2
- import { useEffect as P, useState as s } from "react";
2
+ import { useEffect as H, useState as s } from "react";
3
3
  import { V as m } from "./chunks/vertical-gap.js";
4
4
  import E from "./har-entries-viewer.js";
5
5
  import F from "./har-file-uploader.js";
6
6
  import R from "@cloudscape-design/components/app-layout";
7
- import { c as p, H as T } from "./chunks/index.js";
7
+ import { c as p } from "./chunks/index2.js";
8
8
  import a from "@cloudscape-design/components/box";
9
9
  import c from "@cloudscape-design/components/button";
10
- import U from "@cloudscape-design/components/modal";
10
+ import T from "@cloudscape-design/components/modal";
11
11
  import f from "@cloudscape-design/components/toggle";
12
- import { Mode as l, applyMode as b } from "@cloudscape-design/global-styles";
13
- import y from "@cloudscape-design/components/header";
14
- import { borderWidthAlert as N, colorBorderDividerDefault as W } from "@cloudscape-design/design-tokens";
12
+ import { Mode as l, applyMode as U } from "@cloudscape-design/global-styles";
13
+ import W from "@cloudscape-design/components/header";
14
+ import { borderWidthAlert as b, colorBorderDividerDefault as y } from "@cloudscape-design/design-tokens";
15
+ import { H as N } from "./chunks/index.js";
15
16
  const u = "har-analyzer", {
16
17
  useUserPreferences: A,
17
18
  Provider: x
@@ -27,9 +28,9 @@ function S() {
27
28
  }
28
29
  function V() {
29
30
  const [r, o] = D();
30
- return P(() => {
31
+ return H(() => {
31
32
  const t = r ? l.Dark : l.Light;
32
- b(t);
33
+ U(t);
33
34
  }, [r]), /* @__PURE__ */ e(f, { onChange: ({ detail: t }) => {
34
35
  o(t.checked);
35
36
  }, checked: r, children: "Use dark theme" });
@@ -43,7 +44,7 @@ function z() {
43
44
  return /* @__PURE__ */ n(h, { children: [
44
45
  /* @__PURE__ */ e(c, { iconName: "settings", variant: "icon", onClick: t }),
45
46
  /* @__PURE__ */ n(
46
- U,
47
+ T,
47
48
  {
48
49
  visible: r,
49
50
  onDismiss: i,
@@ -75,12 +76,12 @@ function B({
75
76
  top: 0,
76
77
  zIndex: 1002,
77
78
  padding: "0.5rem 1rem",
78
- borderBlockEnd: `${N} solid ${W}`,
79
+ borderBlockEnd: `${b} solid ${y}`,
79
80
  backdropFilter: d,
80
81
  WebkitBackdropFilter: d
81
82
  // for Safari
82
83
  },
83
- children: /* @__PURE__ */ e(y, { actions: t, children: /* @__PURE__ */ n(T, { children: [
84
+ children: /* @__PURE__ */ e(W, { actions: t, children: /* @__PURE__ */ n(N, { children: [
84
85
  r,
85
86
  o
86
87
  ] }) })
@@ -114,7 +115,7 @@ function I({
114
115
  )
115
116
  ] });
116
117
  }
117
- function re({ logo: r, appName: o = "HAR Analyzer" }) {
118
+ function te({ logo: r, appName: o = "HAR Analyzer" }) {
118
119
  const [t, i] = s(), [C, g] = s([]);
119
120
  return /* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(
120
121
  I,
@@ -122,8 +123,8 @@ function re({ logo: r, appName: o = "HAR Analyzer" }) {
122
123
  logo: r,
123
124
  appName: o,
124
125
  content: /* @__PURE__ */ n(m, { children: [
125
- /* @__PURE__ */ e(F, { onChange: ({ harEntries: v, harFileName: H }) => {
126
- g(v), i(H);
126
+ /* @__PURE__ */ e(F, { onChange: ({ harEntries: v, harFileName: P }) => {
127
+ g(v), i(P);
127
128
  } }),
128
129
  /* @__PURE__ */ e(
129
130
  E,
@@ -137,5 +138,5 @@ function re({ logo: r, appName: o = "HAR Analyzer" }) {
137
138
  ) });
138
139
  }
139
140
  export {
140
- re as default
141
+ te as default
141
142
  };