@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
package/README.md
CHANGED
|
@@ -60,7 +60,7 @@ function App() {
|
|
|
60
60
|
return (
|
|
61
61
|
<I18nProvider locale="en" messages={[enMessages]}>
|
|
62
62
|
<HARAnalyzerPreferencesProvider usePreferenceStore={useWebStorage}>
|
|
63
|
-
<HAREntriesViewer harEntries={yourHarEntriesArray} />
|
|
63
|
+
<HAREntriesViewer tableId="my-report-table" harEntries={yourHarEntriesArray} />
|
|
64
64
|
</HARAnalyzerPreferencesProvider>
|
|
65
65
|
</I18nProvider>
|
|
66
66
|
);
|
|
@@ -78,9 +78,8 @@ import {
|
|
|
78
78
|
HARAnalyzerPreferencesProvider,
|
|
79
79
|
HAREntriesViewer,
|
|
80
80
|
HARFileUploader,
|
|
81
|
-
ViewHAREntry,
|
|
82
81
|
ListHAREntries,
|
|
83
|
-
|
|
82
|
+
ViewHAREntry,
|
|
84
83
|
} from '@har-analyzer/components';
|
|
85
84
|
```
|
|
86
85
|
|
|
@@ -90,9 +89,8 @@ import HARAnalyzer from '@har-analyzer/components/har-analyzer';
|
|
|
90
89
|
import HARAnalyzerPreferencesProvider from '@har-analyzer/components/har-analyzer-preferences';
|
|
91
90
|
import HAREntriesViewer from '@har-analyzer/components/har-entries-viewer';
|
|
92
91
|
import HARFileUploader from '@har-analyzer/components/har-file-uploader';
|
|
93
|
-
import ViewHAREntry from '@har-analyzer/components/view-har-entry';
|
|
94
92
|
import ListHAREntries from '@har-analyzer/components/list-har-entries';
|
|
95
|
-
import
|
|
93
|
+
import ViewHAREntry from '@har-analyzer/components/view-har-entry';
|
|
96
94
|
```
|
|
97
95
|
|
|
98
96
|
## Components
|
|
@@ -125,7 +123,7 @@ import HAREntriesViewer from '@har-analyzer/components/har-entries-viewer';
|
|
|
125
123
|
|
|
126
124
|
function App() {
|
|
127
125
|
return (
|
|
128
|
-
<HAREntriesViewer harEntries={yourHarEntriesArray} />
|
|
126
|
+
<HAREntriesViewer tableId="har-viewer-table" harEntries={yourHarEntriesArray} />
|
|
129
127
|
);
|
|
130
128
|
}
|
|
131
129
|
```
|
|
@@ -134,8 +132,9 @@ function App() {
|
|
|
134
132
|
|
|
135
133
|
| Name | Type | Required | Description |
|
|
136
134
|
|---------------|-------------------------------|----------|--------------------------------------------------|
|
|
137
|
-
| title | string | no | Title of the table displaying the HAR entries |
|
|
138
135
|
| harEntries | HAREntry[] | Yes | An array of HAR entries. |
|
|
136
|
+
| tableId | string | Yes | Unique identifier for the table component. |
|
|
137
|
+
| tableTitle | string | No | Title of the table displaying the HAR entries. |
|
|
139
138
|
|
|
140
139
|
---
|
|
141
140
|
|
|
@@ -149,8 +148,10 @@ import ListHAREntries from '@har-analyzer/components/list-har-entries';
|
|
|
149
148
|
function App() {
|
|
150
149
|
return (
|
|
151
150
|
<ListHAREntries
|
|
151
|
+
id="my-table"
|
|
152
152
|
harEntries={yourHarEntriesArray}
|
|
153
|
-
|
|
153
|
+
selectedHAREntries={[]}
|
|
154
|
+
onSelectionChange={(entries) => console.log('Selected:', entries)}
|
|
154
155
|
/>
|
|
155
156
|
);
|
|
156
157
|
}
|
|
@@ -158,10 +159,13 @@ function App() {
|
|
|
158
159
|
|
|
159
160
|
**Props:**
|
|
160
161
|
|
|
161
|
-
| Name
|
|
162
|
-
|
|
163
|
-
|
|
|
164
|
-
|
|
|
162
|
+
| Name | Type | Required | Description |
|
|
163
|
+
|---------------------|-------------------------------------------|----------|------------------------------------------|
|
|
164
|
+
| id | string | Yes | Unique identifier for the list. |
|
|
165
|
+
| title | string | No | Optional title for the list. |
|
|
166
|
+
| harEntries | HAREntry[] | Yes | The entries to display in the table. |
|
|
167
|
+
| selectedHAREntries | HAREntry[] | Yes | Entries to remain selected in the table. |
|
|
168
|
+
| onSelectionChange | (selectedHAREntries: HAREntry[]) => void | Yes | Callback when entries are selected. |
|
|
165
169
|
|
|
166
170
|
---
|
|
167
171
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import n from "@cloudscape-design/components/box";
|
|
3
|
+
import p from "@cloudscape-design/components/column-layout";
|
|
4
|
+
import { C as a } from "./collapsible-section.js";
|
|
5
|
+
import s from "@cloudscape-design/components/copy-to-clipboard";
|
|
6
|
+
function u(t) {
|
|
7
|
+
const { textToCopy: e, textToDisplay: r } = t;
|
|
8
|
+
return /* @__PURE__ */ o(
|
|
9
|
+
s,
|
|
10
|
+
{
|
|
11
|
+
variant: "inline",
|
|
12
|
+
textToCopy: e,
|
|
13
|
+
textToDisplay: r,
|
|
14
|
+
copyErrorText: "Failed to copy",
|
|
15
|
+
copySuccessText: "Copied!"
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
function x({ title: t, items: e = [] }) {
|
|
20
|
+
return /* @__PURE__ */ o(a, { title: t, children: /* @__PURE__ */ o(p, { borders: "horizontal", columns: 2, disableGutters: !0, children: e.reduce((r, { name: l, value: i }) => (r.push(/* @__PURE__ */ o(n, { variant: "awsui-key-label", children: l })), r.push(i ? /* @__PURE__ */ o(u, { textToCopy: i }) : /* @__PURE__ */ o(n, { variant: "span", children: "-" })), r), []) }) });
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
x as C
|
|
24
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import a from "@cloudscape-design/components/expandable-section";
|
|
3
|
+
import { H as n } from "./index2.js";
|
|
4
|
+
function p({
|
|
5
|
+
title: t,
|
|
6
|
+
children: o,
|
|
7
|
+
variant: r = "default"
|
|
8
|
+
}) {
|
|
9
|
+
return /* @__PURE__ */ e(
|
|
10
|
+
a,
|
|
11
|
+
{
|
|
12
|
+
variant: r,
|
|
13
|
+
headerText: t,
|
|
14
|
+
defaultExpanded: !0,
|
|
15
|
+
disableContentPaddings: !0,
|
|
16
|
+
children: /* @__PURE__ */ e(n, { children: o })
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
p as C
|
|
22
|
+
};
|