@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.
- package/README.md +59 -28
- package/dist/chunks/collapsible-key-value-list.js +24 -0
- package/dist/chunks/collapsible-section.js +22 -0
- package/dist/chunks/content-viewer.js +3056 -0
- package/dist/chunks/context.js +5 -0
- package/dist/chunks/headers-viewer.js +32 -0
- package/dist/chunks/index.js +2265 -174
- package/dist/chunks/index2.js +49 -0
- package/dist/chunks/payload-viewer.js +15 -0
- package/dist/chunks/provider.js +11 -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 +14 -2
- 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/context/user-preferences/index.d.ts +6 -0
- package/dist/context/user-preferences/provider.d.ts +9 -0
- package/dist/context/user-preferences-store/context.d.ts +5 -0
- package/dist/context/user-preferences-store/hooks.d.ts +1 -0
- package/dist/context/user-preferences-store/provider.d.ts +5 -0
- package/dist/features/har-analyzer/components/app-layout.d.ts +7 -0
- package/dist/features/har-analyzer/components/preferences/index.d.ts +1 -0
- package/dist/features/har-analyzer/components/top-navigation.d.ts +8 -0
- package/dist/features/har-analyzer/context/preferences.d.ts +2 -0
- package/dist/features/har-analyzer-preferences-store/index.d.ts +2 -0
- package/dist/features/har-entries-viewer/index.d.ts +1 -1
- package/dist/features/list-har-entries/components/compare-mode-switcher.d.ts +1 -0
- package/dist/features/list-har-entries/components/content-type-filter.d.ts +1 -0
- package/dist/features/list-har-entries/components/errors-filter.d.ts +1 -0
- package/dist/features/list-har-entries/components/har-entries-table.d.ts +8 -0
- package/dist/features/list-har-entries/context/preferences.d.ts +5 -0
- package/dist/features/list-har-entries/index.d.ts +3 -7
- package/dist/har-analyzer-preferences-store.js +4 -0
- package/dist/har-analyzer.js +94 -81
- package/dist/har-entries-viewer.js +167 -7
- package/dist/index.d.ts +7 -2
- package/dist/index.js +12 -13
- package/dist/list-har-entries.js +3 -2126
- package/dist/utils/har.d.ts +1 -1
- package/dist/view-har-entry.js +5 -3128
- package/package.json +1 -1
- package/dist/chunks/json.js +0 -10
- package/dist/components/enhanced-top-navigation.d.ts +0 -7
- package/dist/components/simple-app-layout.d.ts +0 -6
- package/dist/components/simple-app-preferences/index.d.ts +0 -1
- package/dist/features/har-analyzer-preferences/index.d.ts +0 -7
- package/dist/features/har-entries-viewer/components/har-entries-filters/components/content-type-filter.d.ts +0 -7
- package/dist/features/har-entries-viewer/components/har-entries-filters/components/errors-filter.d.ts +0 -6
- package/dist/features/har-entries-viewer/components/har-entries-filters/index.d.ts +0 -1
- package/dist/features/har-entries-viewer/hooks/preferences.d.ts +0 -2
- package/dist/har-analyzer-preferences.js +0 -25
- package/dist/hooks/app-preferences.d.ts +0 -2
- package/dist/hooks/table-preferences.d.ts +0 -12
- /package/dist/{components/simple-app-preferences → features/har-analyzer/components/preferences/components}/content-width-switcher.d.ts +0 -0
- /package/dist/{components/simple-app-preferences → features/har-analyzer/components/preferences/components}/theme-switcher.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' | 'inline';
|
|
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 {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CollectionPreferencesProps } from '@cloudscape-design/components/collection-preferences';
|
|
1
2
|
interface BaseColumnDefinition {
|
|
2
3
|
header: string;
|
|
3
4
|
width?: number;
|
|
@@ -34,14 +35,25 @@ interface ListColumnDefinition<TItem> {
|
|
|
34
35
|
}
|
|
35
36
|
type EnhancedColumnDefinition<TItem> = BaseColumnDefinition & (DefaultColumnDefinition<TItem> | NumericColumnDefinition<TItem> | DateColumnDefinition<TItem> | ListColumnDefinition<TItem>);
|
|
36
37
|
export type EnhancedTableColumnsDefinition<TItem> = Record<string, EnhancedColumnDefinition<TItem>>;
|
|
38
|
+
export interface EnhancedTablePreferences {
|
|
39
|
+
collectionPreferences: CollectionPreferencesProps.Preferences | undefined;
|
|
40
|
+
preferredColumnWidths: {
|
|
41
|
+
id: string;
|
|
42
|
+
width?: number;
|
|
43
|
+
}[];
|
|
44
|
+
}
|
|
37
45
|
interface EnhancedTableProps<TItem> {
|
|
38
|
-
id: string;
|
|
39
46
|
items: TItem[];
|
|
40
47
|
getRowId: (item: TItem) => string;
|
|
41
48
|
columnsDefinition: EnhancedTableColumnsDefinition<TItem>;
|
|
49
|
+
useTablePreferences: () => [EnhancedTablePreferences, (preferences: EnhancedTablePreferences) => void];
|
|
42
50
|
empty?: React.ReactNode;
|
|
43
51
|
selectionType?: 'single' | 'multi';
|
|
52
|
+
isEntireRowSelectable?: boolean;
|
|
53
|
+
selectedItems?: TItem[];
|
|
44
54
|
onSelectionChange?: (selectedItems: TItem[]) => void;
|
|
55
|
+
contentDensity?: 'compact' | 'comfortable';
|
|
56
|
+
header?: React.ReactNode;
|
|
45
57
|
}
|
|
46
|
-
export default function EnhancedTable<TItem>({
|
|
58
|
+
export default function EnhancedTable<TItem>({ items: originalItems, getRowId, columnsDefinition: enhancedColumnDefinitions, useTablePreferences, empty, selectionType, isEntireRowSelectable, selectedItems, onSelectionChange, contentDensity, header, }: EnhancedTableProps<TItem>): import("react/jsx-runtime").JSX.Element;
|
|
47
59
|
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { UserPreferencesContextValue } from './provider';
|
|
3
|
+
export declare function createUserPreferencesContext<T>(preferenceKey: string, defaultPreferenceValue: T): {
|
|
4
|
+
useUserPreferences: () => UserPreferencesContextValue<T>;
|
|
5
|
+
Provider: ({ children }: PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Context, PropsWithChildren } from 'react';
|
|
2
|
+
export type UserPreferencesContextValue<T> = [T, (preference: T) => void];
|
|
3
|
+
interface UserPreferencesProviderProps<T> {
|
|
4
|
+
context: Context<UserPreferencesContextValue<T>>;
|
|
5
|
+
preferenceKey: string;
|
|
6
|
+
defaultPreferenceValue: T;
|
|
7
|
+
}
|
|
8
|
+
export declare function UserPreferencesProvider<T>(props: PropsWithChildren<UserPreferencesProviderProps<T>>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export interface UserPreferencesStore {
|
|
2
|
+
getPreference: (key: string) => Promise<string | undefined>;
|
|
3
|
+
setPreference: (key: string, value: string) => Promise<void>;
|
|
4
|
+
}
|
|
5
|
+
export declare const UserPreferencesStoreContext: import('react').Context<UserPreferencesStore | undefined>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useUserPreferencesStore(): import('./context').UserPreferencesStore | undefined;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { UserPreferencesStore } from './context';
|
|
3
|
+
export declare function UserPreferencesStoreProvider({ userPreferencesStore, children, }: PropsWithChildren<{
|
|
4
|
+
userPreferencesStore: UserPreferencesStore;
|
|
5
|
+
}>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function AppPreferences(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const TOP_NAVIGATION_ID = "top-navigation";
|
|
2
|
+
interface TopNavigationProps {
|
|
3
|
+
logo?: React.ReactNode;
|
|
4
|
+
appName: string;
|
|
5
|
+
utilities?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export default function TopNavigation({ logo, appName, utilities, }: TopNavigationProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const useAppContentWidthPreference: () => import('../../../context/user-preferences/provider').UserPreferencesContextValue<boolean>, AppContentWidthProvider: ({ children }: import('react').PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const useThemePreference: () => import('../../../context/user-preferences/provider').UserPreferencesContextValue<boolean>, ThemeProvider: ({ children }: import('react').PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HAREntry } from '../../utils/har';
|
|
2
2
|
interface HAREntriesViewerProps {
|
|
3
|
-
title?: string;
|
|
4
3
|
harEntries: HAREntry[];
|
|
4
|
+
tableTitle?: string;
|
|
5
5
|
}
|
|
6
6
|
export default function HAREntriesViewer(props: HAREntriesViewerProps): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function CompareModeSwitcher(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ContentTypeFilter(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ErrorsFilter(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HAREntry } from '../../../utils/har';
|
|
2
|
+
export interface HAREntriesTableProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
harEntries: HAREntry[];
|
|
5
|
+
selectedHAREntries: HAREntry[];
|
|
6
|
+
onSelectionChange: (selectedHAREntries: HAREntry[]) => void;
|
|
7
|
+
}
|
|
8
|
+
export default function HAREntriesTable({ title, harEntries, selectedHAREntries, onSelectionChange, }: HAREntriesTableProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
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;
|
|
4
|
+
export declare const useErrorsFilterPreference: () => import('../../../context/user-preferences/provider').UserPreferencesContextValue<boolean>, ErrorsFilterProvider: ({ children }: import('react').PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
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;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
interface ListHAREntriesProps {
|
|
3
|
-
id?: string;
|
|
4
|
-
harEntries: HAREntry[];
|
|
5
|
-
onChange: (selectedHAREntries: HAREntry[]) => void;
|
|
1
|
+
import { HAREntriesTableProps } from './components/har-entries-table';
|
|
2
|
+
export interface ListHAREntriesProps extends HAREntriesTableProps {
|
|
6
3
|
}
|
|
7
|
-
export default function ListHAREntries(
|
|
8
|
-
export {};
|
|
4
|
+
export default function ListHAREntries(props: ListHAREntriesProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/har-analyzer.js
CHANGED
|
@@ -1,27 +1,69 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { useEffect as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
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";
|
|
3
|
+
import { V as m } from "./chunks/vertical-gap.js";
|
|
4
|
+
import E from "./har-entries-viewer.js";
|
|
5
|
+
import F from "./har-file-uploader.js";
|
|
6
|
+
import R from "@cloudscape-design/components/app-layout";
|
|
7
|
+
import { c as p, H as T } from "./chunks/index.js";
|
|
8
|
+
import a from "@cloudscape-design/components/box";
|
|
9
9
|
import c from "@cloudscape-design/components/button";
|
|
10
|
-
import
|
|
11
|
-
import { V as u } from "./chunks/vertical-gap.js";
|
|
10
|
+
import U from "@cloudscape-design/components/modal";
|
|
12
11
|
import f from "@cloudscape-design/components/toggle";
|
|
13
|
-
import { Mode as l, applyMode as
|
|
14
|
-
import
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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";
|
|
15
|
+
const u = "har-analyzer", {
|
|
16
|
+
useUserPreferences: A,
|
|
17
|
+
Provider: x
|
|
18
|
+
} = p(`${u}.isFullContentWidth`, !1), {
|
|
19
|
+
useUserPreferences: D,
|
|
20
|
+
Provider: M
|
|
21
|
+
} = p(`${u}.isDarkTheme`, !1);
|
|
18
22
|
function S() {
|
|
19
|
-
|
|
23
|
+
const [r, o] = A();
|
|
24
|
+
return /* @__PURE__ */ e(f, { onChange: ({ detail: t }) => {
|
|
25
|
+
o(t.checked);
|
|
26
|
+
}, checked: r, children: "Use entire screen width" });
|
|
27
|
+
}
|
|
28
|
+
function V() {
|
|
29
|
+
const [r, o] = D();
|
|
30
|
+
return P(() => {
|
|
31
|
+
const t = r ? l.Dark : l.Light;
|
|
32
|
+
b(t);
|
|
33
|
+
}, [r]), /* @__PURE__ */ e(f, { onChange: ({ detail: t }) => {
|
|
34
|
+
o(t.checked);
|
|
35
|
+
}, checked: r, children: "Use dark theme" });
|
|
36
|
+
}
|
|
37
|
+
function z() {
|
|
38
|
+
const [r, o] = s(!1), t = () => {
|
|
39
|
+
o(!0);
|
|
40
|
+
}, i = () => {
|
|
41
|
+
o(!1);
|
|
42
|
+
};
|
|
43
|
+
return /* @__PURE__ */ n(h, { children: [
|
|
44
|
+
/* @__PURE__ */ e(c, { iconName: "settings", variant: "icon", onClick: t }),
|
|
45
|
+
/* @__PURE__ */ n(
|
|
46
|
+
U,
|
|
47
|
+
{
|
|
48
|
+
visible: r,
|
|
49
|
+
onDismiss: i,
|
|
50
|
+
header: "Manage your preferences",
|
|
51
|
+
footer: /* @__PURE__ */ e(a, { float: "right", children: /* @__PURE__ */ e(c, { variant: "primary", onClick: i, children: "Ok" }) }),
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ e(a, { margin: { top: "m" } }),
|
|
54
|
+
/* @__PURE__ */ n(m, { size: "m", children: [
|
|
55
|
+
/* @__PURE__ */ e(V, {}),
|
|
56
|
+
/* @__PURE__ */ e(S, {})
|
|
57
|
+
] })
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
] });
|
|
20
62
|
}
|
|
21
63
|
const k = "top-navigation", d = "blur(16px)";
|
|
22
|
-
function
|
|
64
|
+
function B({
|
|
23
65
|
logo: r,
|
|
24
|
-
appName:
|
|
66
|
+
appName: o,
|
|
25
67
|
utilities: t
|
|
26
68
|
}) {
|
|
27
69
|
return /* @__PURE__ */ e(
|
|
@@ -33,96 +75,67 @@ function U({
|
|
|
33
75
|
top: 0,
|
|
34
76
|
zIndex: 1002,
|
|
35
77
|
padding: "0.5rem 1rem",
|
|
36
|
-
borderBlockEnd: `${
|
|
78
|
+
borderBlockEnd: `${N} solid ${W}`,
|
|
37
79
|
backdropFilter: d,
|
|
38
80
|
WebkitBackdropFilter: d
|
|
39
81
|
// for Safari
|
|
40
82
|
},
|
|
41
|
-
children: /* @__PURE__ */ e(
|
|
83
|
+
children: /* @__PURE__ */ e(y, { actions: t, children: /* @__PURE__ */ n(T, { children: [
|
|
42
84
|
r,
|
|
43
|
-
|
|
85
|
+
o
|
|
44
86
|
] }) })
|
|
45
87
|
}
|
|
46
88
|
);
|
|
47
89
|
}
|
|
48
|
-
function
|
|
49
|
-
const [r, n] = A();
|
|
50
|
-
return /* @__PURE__ */ e(f, { onChange: ({ detail: t }) => {
|
|
51
|
-
n(t.checked);
|
|
52
|
-
}, checked: r, children: "Use entire screen width" });
|
|
53
|
-
}
|
|
54
|
-
function x() {
|
|
55
|
-
const [r, n] = S();
|
|
56
|
-
return F(() => {
|
|
57
|
-
const t = r ? l.Dark : l.Light;
|
|
58
|
-
W(t);
|
|
59
|
-
}, [r]), /* @__PURE__ */ e(f, { onChange: ({ detail: t }) => {
|
|
60
|
-
n(t.checked);
|
|
61
|
-
}, checked: r, children: "Use dark theme" });
|
|
62
|
-
}
|
|
63
|
-
function I() {
|
|
64
|
-
const [r, n] = a(!1), t = () => {
|
|
65
|
-
n(!0);
|
|
66
|
-
}, o = () => {
|
|
67
|
-
n(!1);
|
|
68
|
-
};
|
|
69
|
-
return /* @__PURE__ */ i(h, { children: [
|
|
70
|
-
/* @__PURE__ */ e(c, { iconName: "settings", variant: "icon", onClick: t }),
|
|
71
|
-
/* @__PURE__ */ i(
|
|
72
|
-
v,
|
|
73
|
-
{
|
|
74
|
-
visible: r,
|
|
75
|
-
onDismiss: o,
|
|
76
|
-
header: "Manage your preferences",
|
|
77
|
-
footer: /* @__PURE__ */ e(s, { float: "right", children: /* @__PURE__ */ e(c, { variant: "primary", onClick: o, children: "Ok" }) }),
|
|
78
|
-
children: [
|
|
79
|
-
/* @__PURE__ */ e(s, { margin: { top: "m" } }),
|
|
80
|
-
/* @__PURE__ */ i(u, { size: "m", children: [
|
|
81
|
-
/* @__PURE__ */ e(x, {}),
|
|
82
|
-
/* @__PURE__ */ e(_, {})
|
|
83
|
-
] })
|
|
84
|
-
]
|
|
85
|
-
}
|
|
86
|
-
)
|
|
87
|
-
] });
|
|
88
|
-
}
|
|
89
|
-
function L({
|
|
90
|
+
function I({
|
|
90
91
|
logo: r,
|
|
91
|
-
appName:
|
|
92
|
+
appName: o,
|
|
92
93
|
content: t
|
|
93
94
|
}) {
|
|
94
|
-
const [
|
|
95
|
-
return /* @__PURE__ */
|
|
96
|
-
/* @__PURE__ */ e(U, { logo: r, appName: n, utilities: /* @__PURE__ */ e(I, {}) }),
|
|
95
|
+
const [i] = A();
|
|
96
|
+
return /* @__PURE__ */ n(h, { children: [
|
|
97
97
|
/* @__PURE__ */ e(
|
|
98
|
-
|
|
98
|
+
B,
|
|
99
|
+
{
|
|
100
|
+
logo: r,
|
|
101
|
+
appName: o,
|
|
102
|
+
utilities: /* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(z, {}) })
|
|
103
|
+
}
|
|
104
|
+
),
|
|
105
|
+
/* @__PURE__ */ e(
|
|
106
|
+
R,
|
|
99
107
|
{
|
|
100
108
|
headerSelector: `#${k}`,
|
|
101
109
|
navigationHide: !0,
|
|
102
110
|
toolsHide: !0,
|
|
103
|
-
maxContentWidth:
|
|
111
|
+
maxContentWidth: i ? Number.MAX_VALUE : void 0,
|
|
104
112
|
content: t
|
|
105
113
|
}
|
|
106
114
|
)
|
|
107
115
|
] });
|
|
108
116
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
L,
|
|
117
|
+
function re({ logo: r, appName: o = "HAR Analyzer" }) {
|
|
118
|
+
const [t, i] = s(), [C, g] = s([]);
|
|
119
|
+
return /* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(
|
|
120
|
+
I,
|
|
114
121
|
{
|
|
115
122
|
logo: r,
|
|
116
|
-
appName:
|
|
117
|
-
content: /* @__PURE__ */
|
|
118
|
-
/* @__PURE__ */ e(
|
|
119
|
-
g(
|
|
123
|
+
appName: o,
|
|
124
|
+
content: /* @__PURE__ */ n(m, { children: [
|
|
125
|
+
/* @__PURE__ */ e(F, { onChange: ({ harEntries: v, harFileName: H }) => {
|
|
126
|
+
g(v), i(H);
|
|
120
127
|
} }),
|
|
121
|
-
/* @__PURE__ */ e(
|
|
128
|
+
/* @__PURE__ */ e(
|
|
129
|
+
E,
|
|
130
|
+
{
|
|
131
|
+
tableTitle: t,
|
|
132
|
+
harEntries: C
|
|
133
|
+
}
|
|
134
|
+
)
|
|
122
135
|
] })
|
|
123
136
|
}
|
|
124
|
-
);
|
|
137
|
+
) });
|
|
125
138
|
}
|
|
126
139
|
export {
|
|
127
|
-
|
|
140
|
+
re as default
|
|
128
141
|
};
|