@har-analyzer/components 0.0.14 → 0.0.16
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/README.md +16 -12
- package/dist/chunks/collapsible-key-value-list.js +24 -0
- package/dist/chunks/collapsible-section.js +22 -0
- package/dist/chunks/content-viewer.js +3050 -0
- package/dist/chunks/headers-viewer.js +32 -0
- package/dist/chunks/index.js +2196 -172
- package/dist/chunks/index2.js +49 -0
- package/dist/chunks/payload-viewer.js +15 -0
- package/dist/chunks/response-viewer.js +10 -0
- package/dist/chunks/vertical-gap.js +1 -1
- package/dist/components/collapsible-section.d.ts +2 -1
- package/dist/components/enhanced-board/constants/i18n.d.ts +11 -6
- package/dist/components/enhanced-board/index.d.ts +7 -9
- package/dist/components/enhanced-table.d.ts +5 -1
- package/dist/components/horizontal-padding.d.ts +2 -0
- package/dist/components/inline-copy-to-clipboard.d.ts +6 -0
- package/dist/components/lazy-load.d.ts +2 -0
- package/dist/features/har-entries-viewer/index.d.ts +2 -1
- package/dist/features/list-har-entries/components/compare-mode-switcher.d.ts +6 -0
- package/dist/features/{har-entries-viewer/components/har-entries-filters → list-har-entries}/components/content-type-filter.d.ts +1 -1
- package/dist/features/list-har-entries/index.d.ts +5 -3
- package/dist/har-analyzer.js +72 -65
- package/dist/har-entries-viewer.js +166 -7
- package/dist/hooks/compare-mode-preference.d.ts +1 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +14 -15
- package/dist/list-har-entries.js +7 -2126
- package/dist/view-har-entry.js +5 -3128
- package/package.json +1 -1
- package/dist/features/har-entries-viewer/components/har-entries-filters/index.d.ts +0 -1
- /package/dist/features/{har-entries-viewer/components/har-entries-filters → list-har-entries}/components/errors-filter.d.ts +0 -0
- /package/dist/features/{har-entries-viewer → list-har-entries}/hooks/preferences.d.ts +0 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import r from "@cloudscape-design/components/tabs";
|
|
3
|
+
import { Suspense as s, lazy as t, useMemo as a } from "react";
|
|
4
|
+
import l from "@cloudscape-design/components/box";
|
|
5
|
+
import d from "@cloudscape-design/components/spinner";
|
|
6
|
+
function c({ children: n }) {
|
|
7
|
+
return /* @__PURE__ */ e(l, { padding: { horizontal: "m" }, children: n });
|
|
8
|
+
}
|
|
9
|
+
function m({ children: n }) {
|
|
10
|
+
return /* @__PURE__ */ e(s, { fallback: /* @__PURE__ */ e(d, { size: "large" }), children: n });
|
|
11
|
+
}
|
|
12
|
+
const p = t(() => import("./headers-viewer.js")), f = t(() => import("./payload-viewer.js")), u = t(() => import("./response-viewer.js")), b = t(() => import("./content-viewer.js"));
|
|
13
|
+
function o({ children: n }) {
|
|
14
|
+
return /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(c, { children: n }) });
|
|
15
|
+
}
|
|
16
|
+
function z({ harEntry: n }) {
|
|
17
|
+
const i = a(() => JSON.stringify(n), [n]);
|
|
18
|
+
return /* @__PURE__ */ e(
|
|
19
|
+
r,
|
|
20
|
+
{
|
|
21
|
+
tabs: [
|
|
22
|
+
{
|
|
23
|
+
label: "Headers",
|
|
24
|
+
id: "headers",
|
|
25
|
+
content: /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(p, { harEntry: n }) })
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
label: "Payload",
|
|
29
|
+
id: "payload",
|
|
30
|
+
content: /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(f, { harEntry: n }) })
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
label: "Response",
|
|
34
|
+
id: "response",
|
|
35
|
+
content: /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(u, { harEntry: n }) })
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
label: "HAR Entry",
|
|
39
|
+
id: "har-entry",
|
|
40
|
+
content: /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(b, { content: i, mimeType: "json" }) })
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
export {
|
|
47
|
+
c as H,
|
|
48
|
+
z as V
|
|
49
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { C as s } from "./collapsible-key-value-list.js";
|
|
3
|
+
import { C as a } from "./collapsible-section.js";
|
|
4
|
+
import { V as m } from "./vertical-gap.js";
|
|
5
|
+
import l from "./content-viewer.js";
|
|
6
|
+
function d({ harEntry: e }) {
|
|
7
|
+
const o = e.request.postData?.text ?? "", r = e.request.postData?.mimeType;
|
|
8
|
+
return /* @__PURE__ */ i(m, { children: [
|
|
9
|
+
/* @__PURE__ */ t(s, { title: "Query Parameters", items: e.request.queryString }),
|
|
10
|
+
/* @__PURE__ */ t(a, { title: "Request Payload", children: /* @__PURE__ */ t(l, { content: o, mimeType: r }) })
|
|
11
|
+
] });
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
d as default
|
|
15
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { C as i } from "./collapsible-section.js";
|
|
3
|
+
import c from "./content-viewer.js";
|
|
4
|
+
function l({ harEntry: e }) {
|
|
5
|
+
const o = e.response.content.text ?? "", t = e.response.content.encoding, s = e.response.content.mimeType;
|
|
6
|
+
return /* @__PURE__ */ n(i, { title: "Response", children: /* @__PURE__ */ n(c, { content: o, encoding: t, mimeType: s }) });
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
l as default
|
|
10
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import o from "@cloudscape-design/components/space-between";
|
|
3
3
|
function a({ children: e, ...r }) {
|
|
4
|
-
return /* @__PURE__ */ t(o, { size: "
|
|
4
|
+
return /* @__PURE__ */ t(o, { size: "l", ...r, children: e });
|
|
5
5
|
}
|
|
6
6
|
export {
|
|
7
7
|
a as V
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
type CollapsibleSectionProps = React.PropsWithChildren<{
|
|
2
2
|
title: string;
|
|
3
|
+
variant?: 'default' | 'container' | 'footer';
|
|
3
4
|
}>;
|
|
4
|
-
export default function CollapsibleSection({ title, children }: CollapsibleSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export default function CollapsibleSection({ title, children, variant, }: CollapsibleSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
export {};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { BoardProps } from '@cloudscape-design/board-components';
|
|
2
|
-
|
|
2
|
+
interface EnhancedBoardItemData {
|
|
3
|
+
componentKey: string;
|
|
4
|
+
instanceId: string;
|
|
5
|
+
}
|
|
6
|
+
export type EnhancedBoardDefinition = BoardProps.Item<EnhancedBoardItemData>;
|
|
3
7
|
export type EnhancedBoardDefinitions = ReadonlyArray<EnhancedBoardDefinition>;
|
|
4
8
|
export declare const boardItemI18nStrings: {
|
|
5
9
|
dragHandleAriaLabel: string;
|
|
@@ -9,13 +13,14 @@ export declare const boardItemI18nStrings: {
|
|
|
9
13
|
};
|
|
10
14
|
export declare const boardI18nStrings: {
|
|
11
15
|
liveAnnouncementDndStarted: (operationType: BoardProps.DndOperationType) => "Resizing" | "Dragging";
|
|
12
|
-
liveAnnouncementDndItemReordered: (operation: BoardProps.DndReorderState<
|
|
13
|
-
liveAnnouncementDndItemResized: (operation: BoardProps.DndResizeState<
|
|
14
|
-
liveAnnouncementDndItemInserted: (operation: BoardProps.DndInsertState<
|
|
16
|
+
liveAnnouncementDndItemReordered: (operation: BoardProps.DndReorderState<EnhancedBoardItemData>) => string;
|
|
17
|
+
liveAnnouncementDndItemResized: (operation: BoardProps.DndResizeState<EnhancedBoardItemData>) => string;
|
|
18
|
+
liveAnnouncementDndItemInserted: (operation: BoardProps.DndInsertState<EnhancedBoardItemData>) => string;
|
|
15
19
|
liveAnnouncementDndCommitted: (operationType: BoardProps.DndOperationType) => string;
|
|
16
20
|
liveAnnouncementDndDiscarded: (operationType: BoardProps.DndOperationType) => string;
|
|
17
|
-
liveAnnouncementItemRemoved: (op: BoardProps.ItemRemovedState<
|
|
21
|
+
liveAnnouncementItemRemoved: (op: BoardProps.ItemRemovedState<EnhancedBoardItemData>) => string;
|
|
18
22
|
navigationAriaLabel: string;
|
|
19
23
|
navigationAriaDescription: string;
|
|
20
|
-
navigationItemAriaLabel: (item: BoardProps.Item<
|
|
24
|
+
navigationItemAriaLabel: (item: BoardProps.Item<EnhancedBoardItemData> | null) => string;
|
|
21
25
|
};
|
|
26
|
+
export {};
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { EnhancedBoardDefinition, EnhancedBoardDefinitions } from './constants/i18n';
|
|
2
|
+
interface ComponentDefinition {
|
|
3
|
+
content: React.ReactNode;
|
|
4
|
+
onRemove?: () => void;
|
|
5
|
+
}
|
|
3
6
|
export interface EnhancedBoardProps {
|
|
4
|
-
components: Record<string,
|
|
5
|
-
title: string;
|
|
6
|
-
content: React.ReactNode;
|
|
7
|
-
counter?: string;
|
|
8
|
-
actions?: HeaderProps['actions'];
|
|
9
|
-
canRemove?: boolean;
|
|
10
|
-
}>;
|
|
7
|
+
components: Record<string, ComponentDefinition | ((instanceId: EnhancedBoardDefinition['data']['instanceId']) => ComponentDefinition)>;
|
|
11
8
|
definitions: EnhancedBoardDefinitions;
|
|
12
9
|
onDefinitionsChange: (definitions: EnhancedBoardDefinitions) => void;
|
|
13
10
|
empty?: React.ReactNode;
|
|
14
11
|
}
|
|
15
12
|
export default function EnhancedBoard(props: EnhancedBoardProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -41,7 +41,11 @@ interface EnhancedTableProps<TItem> {
|
|
|
41
41
|
columnsDefinition: EnhancedTableColumnsDefinition<TItem>;
|
|
42
42
|
empty?: React.ReactNode;
|
|
43
43
|
selectionType?: 'single' | 'multi';
|
|
44
|
+
isEntireRowSelectable?: boolean;
|
|
45
|
+
selectedItems?: TItem[];
|
|
44
46
|
onSelectionChange?: (selectedItems: TItem[]) => void;
|
|
47
|
+
contentDensity?: 'compact' | 'comfortable';
|
|
48
|
+
header?: React.ReactNode;
|
|
45
49
|
}
|
|
46
|
-
export default function EnhancedTable<TItem>({ id, items: originalItems, getRowId, columnsDefinition: enhancedColumnDefinitions, empty, selectionType, onSelectionChange, }: EnhancedTableProps<TItem>): import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
export default function EnhancedTable<TItem>({ id, items: originalItems, getRowId, columnsDefinition: enhancedColumnDefinitions, empty, selectionType, isEntireRowSelectable, selectedItems, onSelectionChange, contentDensity, header, }: EnhancedTableProps<TItem>): import("react/jsx-runtime").JSX.Element;
|
|
47
51
|
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { HAREntry } from '../../utils/har';
|
|
2
2
|
interface HAREntriesViewerProps {
|
|
3
|
-
title?: string;
|
|
4
3
|
harEntries: HAREntry[];
|
|
4
|
+
tableId: string;
|
|
5
|
+
tableTitle?: string;
|
|
5
6
|
}
|
|
6
7
|
export default function HAREntriesViewer(props: HAREntriesViewerProps): import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ContentTypeGroup } from '
|
|
1
|
+
import { ContentTypeGroup } from '../../../utils/content-type';
|
|
2
2
|
interface ContentTypeFilterProps {
|
|
3
3
|
contentTypeFilters: ContentTypeGroup[];
|
|
4
4
|
onChange: (contentTypeFilters: ContentTypeGroup[]) => void;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { HAREntry } from '../../utils/har';
|
|
2
2
|
interface ListHAREntriesProps {
|
|
3
|
-
id
|
|
3
|
+
id: string;
|
|
4
|
+
title?: string;
|
|
4
5
|
harEntries: HAREntry[];
|
|
5
|
-
|
|
6
|
+
selectedHAREntries: HAREntry[];
|
|
7
|
+
onSelectionChange: (selectedHAREntries: HAREntry[]) => void;
|
|
6
8
|
}
|
|
7
|
-
export default function ListHAREntries({ id, harEntries,
|
|
9
|
+
export default function ListHAREntries({ id, title, harEntries, selectedHAREntries, onSelectionChange, }: ListHAREntriesProps): import("react/jsx-runtime").JSX.Element;
|
|
8
10
|
export {};
|
package/dist/har-analyzer.js
CHANGED
|
@@ -1,124 +1,131 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { useEffect as
|
|
3
|
-
import
|
|
4
|
-
import { useHARAnalyzerPreferences as
|
|
5
|
-
import
|
|
6
|
-
import { borderWidthAlert as
|
|
7
|
-
import {
|
|
1
|
+
import { jsx as e, jsxs as o, Fragment as m } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect as b, useState as a } from "react";
|
|
3
|
+
import F from "@cloudscape-design/components/app-layout";
|
|
4
|
+
import { useHARAnalyzerPreferences as h } from "./har-analyzer-preferences.js";
|
|
5
|
+
import y from "@cloudscape-design/components/header";
|
|
6
|
+
import { borderWidthAlert as E, colorBorderDividerDefault as N } from "@cloudscape-design/design-tokens";
|
|
7
|
+
import { H as R } from "./chunks/index.js";
|
|
8
8
|
import s from "@cloudscape-design/components/box";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { V as
|
|
12
|
-
import
|
|
13
|
-
import { Mode as
|
|
14
|
-
import
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
import l from "@cloudscape-design/components/button";
|
|
10
|
+
import T from "@cloudscape-design/components/modal";
|
|
11
|
+
import { V as p } from "./chunks/vertical-gap.js";
|
|
12
|
+
import u from "@cloudscape-design/components/toggle";
|
|
13
|
+
import { Mode as c, applyMode as v } from "@cloudscape-design/global-styles";
|
|
14
|
+
import D from "./har-entries-viewer.js";
|
|
15
|
+
import W from "./har-file-uploader.js";
|
|
16
|
+
function f() {
|
|
17
|
+
return h("isFullContentWidth", !0);
|
|
17
18
|
}
|
|
18
19
|
function S() {
|
|
19
|
-
return
|
|
20
|
+
return h("isDarkTheme", !1);
|
|
20
21
|
}
|
|
21
|
-
const
|
|
22
|
-
function
|
|
22
|
+
const A = "top-navigation", d = "blur(16px)";
|
|
23
|
+
function x({
|
|
23
24
|
logo: r,
|
|
24
|
-
appName:
|
|
25
|
+
appName: i,
|
|
25
26
|
utilities: t
|
|
26
27
|
}) {
|
|
27
28
|
return /* @__PURE__ */ e(
|
|
28
29
|
"nav",
|
|
29
30
|
{
|
|
30
|
-
id:
|
|
31
|
+
id: A,
|
|
31
32
|
style: {
|
|
32
33
|
position: "sticky",
|
|
33
34
|
top: 0,
|
|
34
35
|
zIndex: 1002,
|
|
35
36
|
padding: "0.5rem 1rem",
|
|
36
|
-
borderBlockEnd: `${
|
|
37
|
+
borderBlockEnd: `${E} solid ${N}`,
|
|
37
38
|
backdropFilter: d,
|
|
38
39
|
WebkitBackdropFilter: d
|
|
39
40
|
// for Safari
|
|
40
41
|
},
|
|
41
|
-
children: /* @__PURE__ */ e(
|
|
42
|
+
children: /* @__PURE__ */ e(y, { actions: t, children: /* @__PURE__ */ o(R, { children: [
|
|
42
43
|
r,
|
|
43
|
-
|
|
44
|
+
i
|
|
44
45
|
] }) })
|
|
45
46
|
}
|
|
46
47
|
);
|
|
47
48
|
}
|
|
48
|
-
function
|
|
49
|
-
const [r,
|
|
50
|
-
return /* @__PURE__ */ e(
|
|
51
|
-
|
|
49
|
+
function I() {
|
|
50
|
+
const [r, i] = f();
|
|
51
|
+
return /* @__PURE__ */ e(u, { onChange: ({ detail: t }) => {
|
|
52
|
+
i(t.checked);
|
|
52
53
|
}, checked: r, children: "Use entire screen width" });
|
|
53
54
|
}
|
|
54
|
-
function
|
|
55
|
-
const [r,
|
|
56
|
-
return
|
|
57
|
-
const t = r ?
|
|
58
|
-
|
|
59
|
-
}, [r]), /* @__PURE__ */ e(
|
|
60
|
-
|
|
55
|
+
function M() {
|
|
56
|
+
const [r, i] = S();
|
|
57
|
+
return b(() => {
|
|
58
|
+
const t = r ? c.Dark : c.Light;
|
|
59
|
+
v(t);
|
|
60
|
+
}, [r]), /* @__PURE__ */ e(u, { onChange: ({ detail: t }) => {
|
|
61
|
+
i(t.checked);
|
|
61
62
|
}, checked: r, children: "Use dark theme" });
|
|
62
63
|
}
|
|
63
|
-
function
|
|
64
|
-
const [r,
|
|
65
|
-
|
|
66
|
-
},
|
|
67
|
-
|
|
64
|
+
function U() {
|
|
65
|
+
const [r, i] = a(!1), t = () => {
|
|
66
|
+
i(!0);
|
|
67
|
+
}, n = () => {
|
|
68
|
+
i(!1);
|
|
68
69
|
};
|
|
69
|
-
return /* @__PURE__ */
|
|
70
|
-
/* @__PURE__ */ e(
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
|
|
70
|
+
return /* @__PURE__ */ o(m, { children: [
|
|
71
|
+
/* @__PURE__ */ e(l, { iconName: "settings", variant: "icon", onClick: t }),
|
|
72
|
+
/* @__PURE__ */ o(
|
|
73
|
+
T,
|
|
73
74
|
{
|
|
74
75
|
visible: r,
|
|
75
|
-
onDismiss:
|
|
76
|
+
onDismiss: n,
|
|
76
77
|
header: "Manage your preferences",
|
|
77
|
-
footer: /* @__PURE__ */ e(s, { float: "right", children: /* @__PURE__ */ e(
|
|
78
|
+
footer: /* @__PURE__ */ e(s, { float: "right", children: /* @__PURE__ */ e(l, { variant: "primary", onClick: n, children: "Ok" }) }),
|
|
78
79
|
children: [
|
|
79
80
|
/* @__PURE__ */ e(s, { margin: { top: "m" } }),
|
|
80
|
-
/* @__PURE__ */
|
|
81
|
-
/* @__PURE__ */ e(
|
|
82
|
-
/* @__PURE__ */ e(
|
|
81
|
+
/* @__PURE__ */ o(p, { size: "m", children: [
|
|
82
|
+
/* @__PURE__ */ e(M, {}),
|
|
83
|
+
/* @__PURE__ */ e(I, {})
|
|
83
84
|
] })
|
|
84
85
|
]
|
|
85
86
|
}
|
|
86
87
|
)
|
|
87
88
|
] });
|
|
88
89
|
}
|
|
89
|
-
function
|
|
90
|
+
function V({
|
|
90
91
|
logo: r,
|
|
91
|
-
appName:
|
|
92
|
+
appName: i,
|
|
92
93
|
content: t
|
|
93
94
|
}) {
|
|
94
|
-
const [
|
|
95
|
-
return /* @__PURE__ */
|
|
96
|
-
/* @__PURE__ */ e(
|
|
95
|
+
const [n] = f();
|
|
96
|
+
return /* @__PURE__ */ o(m, { children: [
|
|
97
|
+
/* @__PURE__ */ e(x, { logo: r, appName: i, utilities: /* @__PURE__ */ e(U, {}) }),
|
|
97
98
|
/* @__PURE__ */ e(
|
|
98
|
-
|
|
99
|
+
F,
|
|
99
100
|
{
|
|
100
|
-
headerSelector: `#${
|
|
101
|
+
headerSelector: `#${A}`,
|
|
101
102
|
navigationHide: !0,
|
|
102
103
|
toolsHide: !0,
|
|
103
|
-
maxContentWidth:
|
|
104
|
+
maxContentWidth: n ? Number.MAX_VALUE : void 0,
|
|
104
105
|
content: t
|
|
105
106
|
}
|
|
106
107
|
)
|
|
107
108
|
] });
|
|
108
109
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
const [t, o] = a(m), [H, g] = a([]);
|
|
110
|
+
function Z({ logo: r, appName: i = "HAR Analyzer" }) {
|
|
111
|
+
const [t, n] = a(), [k, g] = a([]);
|
|
112
112
|
return /* @__PURE__ */ e(
|
|
113
|
-
|
|
113
|
+
V,
|
|
114
114
|
{
|
|
115
115
|
logo: r,
|
|
116
|
-
appName:
|
|
117
|
-
content: /* @__PURE__ */
|
|
118
|
-
/* @__PURE__ */ e(
|
|
119
|
-
g(
|
|
116
|
+
appName: i,
|
|
117
|
+
content: /* @__PURE__ */ o(p, { children: [
|
|
118
|
+
/* @__PURE__ */ e(W, { onChange: ({ harEntries: H, harFileName: C }) => {
|
|
119
|
+
g(H), n(C);
|
|
120
120
|
} }),
|
|
121
|
-
/* @__PURE__ */ e(
|
|
121
|
+
/* @__PURE__ */ e(
|
|
122
|
+
D,
|
|
123
|
+
{
|
|
124
|
+
tableId: "har-entries-table",
|
|
125
|
+
tableTitle: t,
|
|
126
|
+
harEntries: k
|
|
127
|
+
}
|
|
128
|
+
)
|
|
122
129
|
] })
|
|
123
130
|
}
|
|
124
131
|
);
|
|
@@ -1,9 +1,168 @@
|
|
|
1
|
-
import "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import
|
|
4
|
-
import "
|
|
5
|
-
import "
|
|
6
|
-
import "./chunks/
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { useState as S, useEffect as T, useCallback as _ } from "react";
|
|
3
|
+
import z from "@cloudscape-design/board-components/board";
|
|
4
|
+
import N from "@cloudscape-design/board-components/board-item";
|
|
5
|
+
import B from "@cloudscape-design/components/button";
|
|
6
|
+
import { V as L, H as O } from "./chunks/index2.js";
|
|
7
|
+
import { L as k } from "./chunks/index.js";
|
|
8
|
+
import { d as g } from "./chunks/har.js";
|
|
9
|
+
const P = {
|
|
10
|
+
dragHandleAriaLabel: "Drag handle",
|
|
11
|
+
dragHandleAriaDescription: "Use Space or Enter to activate drag, arrow keys to move, Space or Enter to submit, or Escape to discard. Be sure to temporarily disable any screen reader navigation feature that may interfere with the functionality of the arrow keys.",
|
|
12
|
+
resizeHandleAriaLabel: "Resize handle",
|
|
13
|
+
resizeHandleAriaDescription: "Use Space or Enter to activate resize, arrow keys to move, Space or Enter to submit, or Escape to discard. Be sure to temporarily disable any screen reader navigation feature that may interfere with the functionality of the arrow keys."
|
|
14
|
+
};
|
|
15
|
+
function I(n, e, i) {
|
|
16
|
+
const m = e.length > 0 ? `Conflicts with ${e.map((a) => a.id).join(", ")}.` : "", l = i.length > 0 ? `Disturbed ${i.length} items.` : "";
|
|
17
|
+
return [n, m, l].filter(Boolean).join(" ");
|
|
18
|
+
}
|
|
19
|
+
const M = {
|
|
20
|
+
liveAnnouncementDndStarted: (n) => n === "resize" ? "Resizing" : "Dragging",
|
|
21
|
+
liveAnnouncementDndItemReordered: (n) => {
|
|
22
|
+
const e = `column ${n.placement.x + 1}`, i = `row ${n.placement.y + 1}`;
|
|
23
|
+
return I(
|
|
24
|
+
`Item moved to ${n.direction === "horizontal" ? e : i}.`,
|
|
25
|
+
n.conflicts,
|
|
26
|
+
n.disturbed
|
|
27
|
+
);
|
|
28
|
+
},
|
|
29
|
+
liveAnnouncementDndItemResized: (n) => {
|
|
30
|
+
const e = n.isMinimalColumnsReached ? " (minimal)" : "", i = n.isMinimalRowsReached ? " (minimal)" : "", m = n.direction === "horizontal" ? `columns ${n.placement.width}${e}` : `rows ${n.placement.height}${i}`;
|
|
31
|
+
return I(`Item resized to ${m}.`, n.conflicts, n.disturbed);
|
|
32
|
+
},
|
|
33
|
+
liveAnnouncementDndItemInserted: (n) => {
|
|
34
|
+
const e = `column ${n.placement.x + 1}`, i = `row ${n.placement.y + 1}`;
|
|
35
|
+
return I(`Item inserted to ${e}, ${i}.`, n.conflicts, n.disturbed);
|
|
36
|
+
},
|
|
37
|
+
liveAnnouncementDndCommitted: (n) => `${n} committed`,
|
|
38
|
+
liveAnnouncementDndDiscarded: (n) => `${n} discarded`,
|
|
39
|
+
liveAnnouncementItemRemoved: (n) => I(`Removed item ${n.item.id}.`, [], n.disturbed),
|
|
40
|
+
navigationAriaLabel: "Board navigation",
|
|
41
|
+
navigationAriaDescription: "Click on non-empty item to move focus over",
|
|
42
|
+
navigationItemAriaLabel: (n) => n ? n.id : "Empty"
|
|
43
|
+
};
|
|
44
|
+
function V(n) {
|
|
45
|
+
const {
|
|
46
|
+
components: e,
|
|
47
|
+
definitions: i,
|
|
48
|
+
onDefinitionsChange: m,
|
|
49
|
+
empty: l
|
|
50
|
+
} = n;
|
|
51
|
+
return /* @__PURE__ */ d(
|
|
52
|
+
z,
|
|
53
|
+
{
|
|
54
|
+
i18nStrings: M,
|
|
55
|
+
items: i,
|
|
56
|
+
renderItem: ({ data: a }) => {
|
|
57
|
+
const { componentKey: A, instanceId: f } = a;
|
|
58
|
+
let h, u;
|
|
59
|
+
const o = e[A];
|
|
60
|
+
if (typeof o == "function") {
|
|
61
|
+
const t = o(f);
|
|
62
|
+
h = t.content, u = t.onRemove;
|
|
63
|
+
} else
|
|
64
|
+
h = o?.content, u = o?.onRemove;
|
|
65
|
+
return /* @__PURE__ */ d(
|
|
66
|
+
N,
|
|
67
|
+
{
|
|
68
|
+
disableContentPaddings: !0,
|
|
69
|
+
i18nStrings: P,
|
|
70
|
+
settings: u && /* @__PURE__ */ d(B, { variant: "icon", iconName: "close", onClick: u }),
|
|
71
|
+
children: h
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
},
|
|
75
|
+
onItemsChange: ({ detail: { items: a } }) => {
|
|
76
|
+
m(a);
|
|
77
|
+
},
|
|
78
|
+
empty: l
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
const v = {
|
|
83
|
+
rowSpan: 4,
|
|
84
|
+
columnSpan: 12
|
|
85
|
+
}, p = "har-entries-viewer", R = "view-har-entry", x = [
|
|
86
|
+
{
|
|
87
|
+
...v,
|
|
88
|
+
id: p,
|
|
89
|
+
data: {
|
|
90
|
+
componentKey: p,
|
|
91
|
+
instanceId: p
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
];
|
|
95
|
+
function Q(n) {
|
|
96
|
+
const {
|
|
97
|
+
harEntries: e,
|
|
98
|
+
tableId: i,
|
|
99
|
+
tableTitle: m
|
|
100
|
+
} = n, [l, a] = S([]), [A, f] = S(x);
|
|
101
|
+
T(() => {
|
|
102
|
+
const o = new Set(e.map(g));
|
|
103
|
+
a((t) => {
|
|
104
|
+
if (!t.length)
|
|
105
|
+
return t;
|
|
106
|
+
const r = t.filter(
|
|
107
|
+
(c) => o.has(g(c))
|
|
108
|
+
);
|
|
109
|
+
return r.length !== t.length ? r : t;
|
|
110
|
+
});
|
|
111
|
+
}, [e]);
|
|
112
|
+
const h = _((o) => {
|
|
113
|
+
a(o);
|
|
114
|
+
const t = o.map(g), r = new Set(t);
|
|
115
|
+
f((c) => {
|
|
116
|
+
const E = c.filter(({ data: { instanceId: s } }) => r.has(s) || s === p), D = new Set(E.map(({ data: { instanceId: s } }) => s)), y = t.filter((s) => !D.has(s));
|
|
117
|
+
if (!y.length)
|
|
118
|
+
return E;
|
|
119
|
+
const w = c.at(-1), b = w?.rowSpan ?? v.rowSpan, $ = w?.columnSpan ?? v.columnSpan, C = y.map((s) => ({
|
|
120
|
+
rowSpan: b,
|
|
121
|
+
columnSpan: $,
|
|
122
|
+
data: {
|
|
123
|
+
componentKey: R,
|
|
124
|
+
instanceId: s
|
|
125
|
+
}
|
|
126
|
+
}));
|
|
127
|
+
return [...E, ...C].map((s, H) => ({
|
|
128
|
+
...s,
|
|
129
|
+
id: String(H)
|
|
130
|
+
}));
|
|
131
|
+
});
|
|
132
|
+
}, []), u = {
|
|
133
|
+
[p]: {
|
|
134
|
+
content: /* @__PURE__ */ d(O, { children: /* @__PURE__ */ d(
|
|
135
|
+
k,
|
|
136
|
+
{
|
|
137
|
+
id: i,
|
|
138
|
+
title: m,
|
|
139
|
+
harEntries: e,
|
|
140
|
+
selectedHAREntries: l,
|
|
141
|
+
onSelectionChange: h
|
|
142
|
+
}
|
|
143
|
+
) })
|
|
144
|
+
},
|
|
145
|
+
[R]: (o) => {
|
|
146
|
+
const t = l.find((r) => g(r) === o);
|
|
147
|
+
return {
|
|
148
|
+
content: t ? /* @__PURE__ */ d(L, { harEntry: t }) : void 0,
|
|
149
|
+
onRemove: () => {
|
|
150
|
+
f((r) => r.filter((c) => c.data.instanceId !== o)), a(
|
|
151
|
+
(r) => r.filter((c) => g(c) !== o)
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
return /* @__PURE__ */ d(
|
|
158
|
+
V,
|
|
159
|
+
{
|
|
160
|
+
components: u,
|
|
161
|
+
definitions: A,
|
|
162
|
+
onDefinitionsChange: f
|
|
163
|
+
}
|
|
164
|
+
);
|
|
165
|
+
}
|
|
7
166
|
export {
|
|
8
|
-
|
|
167
|
+
Q as default
|
|
9
168
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useCompareModePreference(): readonly [boolean, (newPreference: boolean) => void];
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export { default as HARAnalyzer } from './features/har-analyzer';
|
|
2
2
|
export { default as HARAnalyzerPreferencesProvider } from './features/har-analyzer-preferences';
|
|
3
3
|
export { default as HAREntriesViewer } from './features/har-entries-viewer';
|
|
4
|
-
export { default as useHAREntriesFilters } from './features/har-entries-viewer/components/har-entries-filters';
|
|
5
4
|
export { default as HARFileUploader } from './features/har-file-uploader';
|
|
6
5
|
export { default as ListHAREntries } from './features/list-har-entries';
|
|
7
6
|
export { default as ViewHAREntry } from './features/view-har-entry';
|
package/dist/index.js
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import { default as t } from "./har-analyzer.js";
|
|
2
|
-
import { default as
|
|
3
|
-
import {
|
|
4
|
-
import { default as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { g as
|
|
2
|
+
import { default as o } from "./har-analyzer-preferences.js";
|
|
3
|
+
import { default as n } from "./har-entries-viewer.js";
|
|
4
|
+
import { default as f } from "./har-file-uploader.js";
|
|
5
|
+
import { L as R } from "./chunks/index.js";
|
|
6
|
+
import { V as H } from "./chunks/index2.js";
|
|
7
|
+
import { g as l, a as m, b as E, d as x, c as g, i as y } from "./chunks/har.js";
|
|
8
8
|
export {
|
|
9
9
|
t as HARAnalyzer,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
o as HARAnalyzerPreferencesProvider,
|
|
11
|
+
n as HAREntriesViewer,
|
|
12
|
+
f as HARFileUploader,
|
|
13
13
|
R as ListHAREntries,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
H as ViewHAREntry,
|
|
15
|
+
l as getHARContentFromFile,
|
|
16
|
+
m as getHAREntriesFilteredByContentType,
|
|
17
|
+
E as getHAREntriesWithErrorResponse,
|
|
18
18
|
x as getHAREntryId,
|
|
19
19
|
g as getUniqueHeaderNames,
|
|
20
|
-
y as isErrorResponse
|
|
21
|
-
n as useHAREntriesFilters
|
|
20
|
+
y as isErrorResponse
|
|
22
21
|
};
|