aa-geuthur-react 0.0.0-stage → 1.0.1
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/LICENSE +674 -0
- package/README.md +234 -2
- package/dist/Api/Api.d.ts +9 -0
- package/dist/Api/basePaths.d.ts +34 -0
- package/dist/Api/calls.d.ts +10 -0
- package/dist/Api/index.d.ts +5 -0
- package/dist/Api/query.d.ts +6 -0
- package/dist/Api/types.d.ts +45 -0
- package/dist/Components/Base/BaseHeader.d.ts +7 -0
- package/dist/Components/Base/BaseModal/BaseModal.d.ts +11 -0
- package/dist/Components/Base/BaseModal/BaseModalProps.d.ts +101 -0
- package/dist/Components/Base/BaseModal/BaseModalQuery.d.ts +10 -0
- package/dist/Components/Base/BaseModal/index.d.ts +3 -0
- package/dist/Components/Base/BaseModal/useModalState.d.ts +7 -0
- package/dist/Components/Base/BaseTable/BaseTable.d.ts +63 -0
- package/dist/Components/Base/BaseTable/BaseTableFilter.d.ts +25 -0
- package/dist/Components/Base/BaseTable/BaseTableForm.d.ts +6 -0
- package/dist/Components/Base/BaseTable/BaseTableHeader.d.ts +8 -0
- package/dist/Components/Base/BaseTable/BaseTablePages.d.ts +11 -0
- package/dist/Components/Base/BaseTable/BaseTableToolbar.d.ts +6 -0
- package/dist/Components/Base/BaseTable/index.d.ts +8 -0
- package/dist/Components/Base/BaseTable/tableFeatures.d.ts +89 -0
- package/dist/Components/Base/BaseTable/tableHelper.d.ts +8 -0
- package/dist/Components/Base/Loader/ErrorBoundary.d.ts +9 -0
- package/dist/Components/Base/Loader/ErrorLoader.d.ts +11 -0
- package/dist/Components/Base/Loader/FetchingLoader.d.ts +10 -0
- package/dist/Components/Base/Loader/index.d.ts +4 -0
- package/dist/Components/Base/index.d.ts +11 -0
- package/dist/Hooks/index.d.ts +3 -0
- package/dist/Hooks/useCooldown.d.ts +16 -0
- package/dist/Hooks/useFeedback.d.ts +13 -0
- package/dist/Hooks/useUserData.d.ts +4 -0
- package/dist/Menu/AuthLeftMenu.d.ts +4 -0
- package/dist/Menu/AuthLeftMenuAsync.d.ts +3 -0
- package/dist/Menu/AuthRightMenu.d.ts +4 -0
- package/dist/Menu/AuthRightMenuAsync.d.ts +3 -0
- package/dist/Menu/BaseMenu.d.ts +26 -0
- package/dist/Menu/Hooks/index.d.ts +1 -0
- package/dist/Menu/Hooks/useMenu.d.ts +2 -0
- package/dist/Menu/index.d.ts +6 -0
- package/dist/Pages/404.d.ts +1 -0
- package/dist/Pages/Base.d.ts +13 -0
- package/dist/Pages/index.d.ts +3 -0
- package/dist/Provider.d.ts +13 -0
- package/dist/Utils/bootsTrap.d.ts +14 -0
- package/dist/Utils/eveOnline.d.ts +66 -0
- package/dist/Utils/format.d.ts +44 -0
- package/dist/Utils/general.d.ts +27 -0
- package/dist/Utils/index.d.ts +4 -0
- package/dist/aa-geuthur-react.css +2 -0
- package/dist/i18n.d.ts +4 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +1183 -0
- package/dist/index.js.map +1 -0
- package/eslint-rules/import-headings.js +167 -0
- package/i18n/de/aa-geuthur-react.json +34 -0
- package/i18n/en/aa-geuthur-react.json +34 -0
- package/i18n/es/aa-geuthur-react.json +35 -0
- package/i18n/fr-FR/aa-geuthur-react.json +35 -0
- package/i18n/it-IT/aa-geuthur-react.json +35 -0
- package/i18n/ja/aa-geuthur-react.json +33 -0
- package/i18n/ko-KR/aa-geuthur-react.json +33 -0
- package/i18n/nl-NL/aa-geuthur-react.json +34 -0
- package/i18n/pl-PL/aa-geuthur-react.json +36 -0
- package/i18n/ru/aa-geuthur-react.json +36 -0
- package/i18n/uk/aa-geuthur-react.json +36 -0
- package/i18n/zh-Hans/aa-geuthur-react.json +33 -0
- package/package.json +106 -4
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { ColumnDef, RowData } from '@tanstack/react-table';
|
|
2
|
+
export declare const baseTableFeatures: {
|
|
3
|
+
columnFilteringFeature: import('@tanstack/table-core').TableFeature;
|
|
4
|
+
columnFacetingFeature: import('@tanstack/table-core').TableFeature;
|
|
5
|
+
columnSizingFeature: import('@tanstack/table-core').TableFeature;
|
|
6
|
+
columnVisibilityFeature: import('@tanstack/table-core').TableFeature;
|
|
7
|
+
rowSortingFeature: import('@tanstack/table-core').TableFeature;
|
|
8
|
+
rowPaginationFeature: import('@tanstack/table-core').TableFeature;
|
|
9
|
+
rowSelectionFeature: import('@tanstack/table-core').TableFeature;
|
|
10
|
+
filteredRowModel: (table: import('@tanstack/table-core').Table<any, any>) => () => import('@tanstack/table-core').RowModel<any, any>;
|
|
11
|
+
sortedRowModel: (table: import('@tanstack/table-core').Table<any, any>) => () => import('@tanstack/table-core').RowModel<any, any>;
|
|
12
|
+
paginatedRowModel: (table: import('@tanstack/table-core').Table<any, any>) => () => import('@tanstack/table-core').RowModel<any, any>;
|
|
13
|
+
facetedRowModel: (table: import('@tanstack/table-core').Table<any, any>, columnId: string) => () => import('@tanstack/table-core').RowModel<any, any>;
|
|
14
|
+
facetedUniqueValues: (table: import('@tanstack/table-core').Table<import('@tanstack/table-core').TableFeatures, any>, columnId: string) => () => Map<any, number>;
|
|
15
|
+
facetedMinMaxValues: (table: import('@tanstack/table-core').Table<import('@tanstack/table-core').TableFeatures, any>, columnId: string) => () => undefined | [number, number];
|
|
16
|
+
filterFns: {
|
|
17
|
+
arrIncludes: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
18
|
+
arrIncludesAll: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
19
|
+
arrHas: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
20
|
+
arrIncludesSome: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
21
|
+
between: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
22
|
+
betweenInclusive: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
23
|
+
empty: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
24
|
+
endsWith: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
25
|
+
equals: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
26
|
+
equalsString: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
27
|
+
equalsStringSensitive: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
28
|
+
inDateRange: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
29
|
+
inNumberRange: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
30
|
+
includesString: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
31
|
+
includesStringSensitive: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
32
|
+
notEmpty: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
33
|
+
startsWith: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
34
|
+
weakEquals: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
35
|
+
};
|
|
36
|
+
sortFns: {
|
|
37
|
+
alphanumeric: import('@tanstack/table-core').CreatedSortFn<any, any>;
|
|
38
|
+
alphanumericCaseSensitive: import('@tanstack/table-core').CreatedSortFn<any, any>;
|
|
39
|
+
basic: import('@tanstack/table-core').CreatedSortFn<any, any>;
|
|
40
|
+
datetime: import('@tanstack/table-core').CreatedSortFn<any, any>;
|
|
41
|
+
text: import('@tanstack/table-core').CreatedSortFn<any, any>;
|
|
42
|
+
textCaseSensitive: import('@tanstack/table-core').CreatedSortFn<any, any>;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
export type BaseTableFeatures = typeof baseTableFeatures;
|
|
46
|
+
export type BaseColumnDef<TData extends RowData, TValue = any> = ColumnDef<BaseTableFeatures, TData, TValue>;
|
|
47
|
+
export declare const createBaseColumnHelper: <TData extends RowData>() => import('@tanstack/table-core').ColumnHelper<{
|
|
48
|
+
columnFilteringFeature: import('@tanstack/table-core').TableFeature;
|
|
49
|
+
columnFacetingFeature: import('@tanstack/table-core').TableFeature;
|
|
50
|
+
columnSizingFeature: import('@tanstack/table-core').TableFeature;
|
|
51
|
+
columnVisibilityFeature: import('@tanstack/table-core').TableFeature;
|
|
52
|
+
rowSortingFeature: import('@tanstack/table-core').TableFeature;
|
|
53
|
+
rowPaginationFeature: import('@tanstack/table-core').TableFeature;
|
|
54
|
+
rowSelectionFeature: import('@tanstack/table-core').TableFeature;
|
|
55
|
+
filteredRowModel: (table: import('@tanstack/table-core').Table<any, any>) => () => import('@tanstack/table-core').RowModel<any, any>;
|
|
56
|
+
sortedRowModel: (table: import('@tanstack/table-core').Table<any, any>) => () => import('@tanstack/table-core').RowModel<any, any>;
|
|
57
|
+
paginatedRowModel: (table: import('@tanstack/table-core').Table<any, any>) => () => import('@tanstack/table-core').RowModel<any, any>;
|
|
58
|
+
facetedRowModel: (table: import('@tanstack/table-core').Table<any, any>, columnId: string) => () => import('@tanstack/table-core').RowModel<any, any>;
|
|
59
|
+
facetedUniqueValues: (table: import('@tanstack/table-core').Table<import('@tanstack/table-core').TableFeatures, any>, columnId: string) => () => Map<any, number>;
|
|
60
|
+
facetedMinMaxValues: (table: import('@tanstack/table-core').Table<import('@tanstack/table-core').TableFeatures, any>, columnId: string) => () => undefined | [number, number];
|
|
61
|
+
filterFns: {
|
|
62
|
+
arrIncludes: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
63
|
+
arrIncludesAll: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
64
|
+
arrHas: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
65
|
+
arrIncludesSome: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
66
|
+
between: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
67
|
+
betweenInclusive: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
68
|
+
empty: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
69
|
+
endsWith: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
70
|
+
equals: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
71
|
+
equalsString: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
72
|
+
equalsStringSensitive: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
73
|
+
inDateRange: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
74
|
+
inNumberRange: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
75
|
+
includesString: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
76
|
+
includesStringSensitive: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
77
|
+
notEmpty: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
78
|
+
startsWith: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
79
|
+
weakEquals: import('@tanstack/table-core').CreatedFilterFn<any, any>;
|
|
80
|
+
};
|
|
81
|
+
sortFns: {
|
|
82
|
+
alphanumeric: import('@tanstack/table-core').CreatedSortFn<any, any>;
|
|
83
|
+
alphanumericCaseSensitive: import('@tanstack/table-core').CreatedSortFn<any, any>;
|
|
84
|
+
basic: import('@tanstack/table-core').CreatedSortFn<any, any>;
|
|
85
|
+
datetime: import('@tanstack/table-core').CreatedSortFn<any, any>;
|
|
86
|
+
text: import('@tanstack/table-core').CreatedSortFn<any, any>;
|
|
87
|
+
textCaseSensitive: import('@tanstack/table-core').CreatedSortFn<any, any>;
|
|
88
|
+
};
|
|
89
|
+
}, TData>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RowData, Table as ReactTable } from '@tanstack/react-table';
|
|
2
|
+
import { BaseTableFeatures } from './tableFeatures';
|
|
3
|
+
/**
|
|
4
|
+
* Helper function for exporting table data to CSV
|
|
5
|
+
* @param table The React Table instance containing the data
|
|
6
|
+
* @param exportFileName Optional file name for the exported CSV
|
|
7
|
+
*/
|
|
8
|
+
export declare const exportToCSV: <TData extends RowData>(table: ReactTable<BaseTableFeatures, TData>, exportFileName?: string) => void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentType, ReactNode } from 'react';
|
|
2
|
+
export interface ErrorBoundaryProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
/** Extra classes for the `<pre>` with the component stack. */
|
|
5
|
+
traceClassName?: string;
|
|
6
|
+
}
|
|
7
|
+
/** Catches render errors of its children and shows the error with the component stack. */
|
|
8
|
+
declare const TranslatedErrorBoundary: ComponentType<ErrorBoundaryProps>;
|
|
9
|
+
export default TranslatedErrorBoundary;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface ErrorLoaderProps {
|
|
2
|
+
message?: string;
|
|
3
|
+
title?: string;
|
|
4
|
+
/** Extra classes for the wrapper. */
|
|
5
|
+
className?: string;
|
|
6
|
+
/** Extra classes for the warning icon. */
|
|
7
|
+
iconClassName?: string;
|
|
8
|
+
}
|
|
9
|
+
/** Centered warning icon with an optional title and message, e.g. for 404 and error pages. */
|
|
10
|
+
export declare const ErrorLoader: ({ message, title, className, iconClassName }?: ErrorLoaderProps) => import('react').JSX.Element;
|
|
11
|
+
export default ErrorLoader;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface FetchingLoaderProps {
|
|
2
|
+
message?: string;
|
|
3
|
+
/** Extra classes for the wrapper. */
|
|
4
|
+
className?: string;
|
|
5
|
+
/** Extra classes for the spinner, e.g. `spinner-border-sm`. */
|
|
6
|
+
spinnerClassName?: string;
|
|
7
|
+
}
|
|
8
|
+
/** Centered Bootstrap spinner with an optional message. */
|
|
9
|
+
export declare const FetchingLoader: ({ message, className, spinnerClassName }?: FetchingLoaderProps) => import('react').JSX.Element;
|
|
10
|
+
export default FetchingLoader;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './BaseTable';
|
|
2
|
+
export * from './BaseTable/tableFeatures';
|
|
3
|
+
export * from './BaseTable/tableHelper';
|
|
4
|
+
export { BaseToolbar } from './BaseTable/BaseTableToolbar';
|
|
5
|
+
export type { TableToolbarProps } from './BaseTable/BaseTableToolbar';
|
|
6
|
+
export * from './BaseModal';
|
|
7
|
+
export * from './BaseModal/BaseModalQuery';
|
|
8
|
+
export * from './BaseModal/useModalState';
|
|
9
|
+
export * from './Loader';
|
|
10
|
+
export { default as BaseSectionHeader } from './BaseHeader';
|
|
11
|
+
export type { BaseSectionHeaderProps } from './BaseHeader';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Counts a single cooldown down to zero, one second at a time.
|
|
3
|
+
* @returns The remaining seconds and a function to start the cooldown
|
|
4
|
+
*/
|
|
5
|
+
export declare function useCooldown(): {
|
|
6
|
+
seconds: number;
|
|
7
|
+
start: (duration: number) => void;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Counts one cooldown per owner id down to zero, one second at a time.
|
|
11
|
+
* @returns The remaining seconds by owner id and a function to start a cooldown
|
|
12
|
+
*/
|
|
13
|
+
export declare function useOwnerCooldowns(): {
|
|
14
|
+
cooldowns: Record<number, number>;
|
|
15
|
+
start: (ownerId: number, duration: number) => void;
|
|
16
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface FeedbackMessage {
|
|
2
|
+
variant: "success" | "danger";
|
|
3
|
+
text: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Holds a feedback message (success or error) that clears itself after a timeout.
|
|
7
|
+
* @param timeoutMs How long the message stays visible (defaults to 5000 ms)
|
|
8
|
+
*/
|
|
9
|
+
export declare function useFeedback(timeoutMs?: number): {
|
|
10
|
+
feedback: FeedbackMessage;
|
|
11
|
+
showFeedback: (variant: FeedbackMessage["variant"], text: string) => void;
|
|
12
|
+
clearFeedback: () => void;
|
|
13
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { MenuLink } from '../Api/types';
|
|
2
|
+
export type MenuLinkItem = MenuLink;
|
|
3
|
+
export interface MenuCategory {
|
|
4
|
+
name: string;
|
|
5
|
+
link?: string;
|
|
6
|
+
links?: MenuLinkItem[];
|
|
7
|
+
}
|
|
8
|
+
export interface MenuProps {
|
|
9
|
+
isLoading: boolean;
|
|
10
|
+
data: Array<MenuCategory | MenuLinkItem>;
|
|
11
|
+
error: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface ToPath {
|
|
14
|
+
toPath: (link: string) => string;
|
|
15
|
+
}
|
|
16
|
+
/** Builds the route of a menu link below the app prefix: `characters/` becomes `/<project>/characters/`. */
|
|
17
|
+
export declare const toProjectPath: (projectName: string, link: string) => string;
|
|
18
|
+
/** Highlights the administration link in red with a shield icon. */
|
|
19
|
+
export declare const AdministrationMenuItem: ({ link, toPath }: {
|
|
20
|
+
link: MenuLinkItem;
|
|
21
|
+
} & ToPath) => import('react').JSX.Element;
|
|
22
|
+
export declare const MenuItem: ({ link, toPath }: {
|
|
23
|
+
link: MenuLinkItem;
|
|
24
|
+
} & ToPath) => import('react').JSX.Element;
|
|
25
|
+
/** Renders every entry with a link as `MenuItem`; categories without a link are skipped. */
|
|
26
|
+
export declare const MenuList: ({ data }: MenuProps) => import('react').JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useMenu';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ErrorPage(): import('react').JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface AuthBaseProps {
|
|
3
|
+
/** Extra classes for the `aa-react container` wrapper. */
|
|
4
|
+
className?: string;
|
|
5
|
+
/** Content instead of the router `Outlet`. */
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Layout of an app page in Alliance Auth: renders the menus into the navigation bar and the
|
|
10
|
+
* routed page inside the `aa-react container` wrapper (640px to 1280px wide) with an error boundary.
|
|
11
|
+
*/
|
|
12
|
+
declare const AuthBase: ({ className, children }: AuthBaseProps) => import('react').JSX.Element;
|
|
13
|
+
export default AuthBase;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface AaReactConfig {
|
|
3
|
+
/** URL prefix of the app, e.g. `example` for `/example/api/menu/`. */
|
|
4
|
+
projectName: string;
|
|
5
|
+
/** Name of the app package, e.g. `aa-example`; used for element ids. */
|
|
6
|
+
appName: string;
|
|
7
|
+
}
|
|
8
|
+
/** Provides the app names to the menus, hooks and pages of this package. Wrap the routing with it. */
|
|
9
|
+
export declare function AaReactProvider({ projectName, appName, children }: AaReactConfig & {
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
}): import('react').JSX.Element;
|
|
12
|
+
/** Reads the app names given to `AaReactProvider`. Throws outside of the provider. */
|
|
13
|
+
export declare function useAaReact(): AaReactConfig;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ComponentProps, ReactElement } from 'react';
|
|
2
|
+
import { OverlayTrigger } from 'react-bootstrap';
|
|
3
|
+
/**
|
|
4
|
+
* Tooltip notification component
|
|
5
|
+
* @param message The message to display inside the tooltip
|
|
6
|
+
* @returns A React element representing the tooltip container
|
|
7
|
+
*/
|
|
8
|
+
export declare function toolTipContainer(message: string): ReactElement;
|
|
9
|
+
/**
|
|
10
|
+
* Helper function for rendering tooltips
|
|
11
|
+
* @param message The message to display inside the tooltip
|
|
12
|
+
* @param children The React element that triggers the tooltip
|
|
13
|
+
*/
|
|
14
|
+
export declare function renderTooltip(message: string, children: ComponentProps<typeof OverlayTrigger>["children"]): import('react').JSX.Element;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the URL for the image of a given ship type.
|
|
3
|
+
* @param shipTypeId The ID of the ship type
|
|
4
|
+
* @returns URL of the ship image
|
|
5
|
+
*/
|
|
6
|
+
export declare function shipImageUrl(shipTypeId: number, size?: number): string;
|
|
7
|
+
/**
|
|
8
|
+
* Returns the URL for the image of a given character.
|
|
9
|
+
* @param characterId The ID of the character
|
|
10
|
+
* @param size The size of the portrait in pixels (defaults to 512)
|
|
11
|
+
* @returns URL of the character image
|
|
12
|
+
*/
|
|
13
|
+
export declare function characterImageUrl(characterId: number, size?: number): string;
|
|
14
|
+
/**
|
|
15
|
+
* Returns the URL for the image of a given corporation.
|
|
16
|
+
* @param corporationId The ID of the corporation
|
|
17
|
+
* @param size The size of the logo in pixels (defaults to 128)
|
|
18
|
+
* @returns URL of the corporation logo
|
|
19
|
+
*/
|
|
20
|
+
export declare function corporationImageUrl(corporationId: number, size?: number): string;
|
|
21
|
+
/**
|
|
22
|
+
* Returns the URL for the image of a given alliance.
|
|
23
|
+
* @param allianceId The ID of the alliance
|
|
24
|
+
* @param size The size of the logo in pixels (defaults to 128)
|
|
25
|
+
* @returns URL of the alliance logo
|
|
26
|
+
*/
|
|
27
|
+
export declare function allianceImageUrl(allianceId: number, size?: number): string;
|
|
28
|
+
/**
|
|
29
|
+
* Returns the URL for the image of a given item type.
|
|
30
|
+
* @param typeId The ID of the item type
|
|
31
|
+
* @param size The size of the icon in pixels (defaults to 32)
|
|
32
|
+
* @returns URL of the item image
|
|
33
|
+
*/
|
|
34
|
+
export declare function itemImageUrl(typeId: number, size?: number): string;
|
|
35
|
+
/**
|
|
36
|
+
* Returns the appropriate CSS classes for a given security status.
|
|
37
|
+
* @param sec The security status of the solar system
|
|
38
|
+
* @returns CSS classes for text color, background color, and border color
|
|
39
|
+
*/
|
|
40
|
+
export declare const getSecColor: (sec: number) => "aa-badge-hisec" | "aa-badge-lowsec" | "aa-badge-nullsec";
|
|
41
|
+
/**
|
|
42
|
+
* Formats a Date object into EVE Online time string (HH:MM:SS EVE)
|
|
43
|
+
* @param date The date to format (defaults to current date and time)
|
|
44
|
+
* @returns Formatted EVE Online time string
|
|
45
|
+
*/
|
|
46
|
+
export declare const formatEveTime: (date?: Date) => string;
|
|
47
|
+
/**
|
|
48
|
+
* Generates a link to a specific killmail on zKillboard.
|
|
49
|
+
* @param id The ID of the killmail
|
|
50
|
+
* @param name The display name for the link
|
|
51
|
+
* @returns A JSX element containing the link with a tooltip
|
|
52
|
+
*/
|
|
53
|
+
export declare function zKillboardLink({ id, name, size, className, externalLink }: {
|
|
54
|
+
id: number;
|
|
55
|
+
name: string;
|
|
56
|
+
size?: number;
|
|
57
|
+
className?: string;
|
|
58
|
+
externalLink?: boolean;
|
|
59
|
+
}): import('react').JSX.Element;
|
|
60
|
+
/**
|
|
61
|
+
* Generates a finished Portrait for a character react component.
|
|
62
|
+
* @param characterId The ID of the character
|
|
63
|
+
* @param size The size of the image in pixels (defaults to 32)
|
|
64
|
+
* @returns A React node containing the character portrait image
|
|
65
|
+
*/
|
|
66
|
+
export declare function renderCharacterPortrait(characterId: number, size?: number): React.ReactNode;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Formats a date string with Intl.DateTimeFormat
|
|
3
|
+
* @param value The date string to format (optional)
|
|
4
|
+
* @param options Optional Intl.DateTimeFormatOptions for customizing the output
|
|
5
|
+
* @returns A formatted date string or "N/A" if the value is not provided
|
|
6
|
+
*/
|
|
7
|
+
export declare function formatDate(value?: string | null, options?: Intl.DateTimeFormatOptions): string;
|
|
8
|
+
/**
|
|
9
|
+
* Formats a date relative to now (e.g. "in 15 Minuten", "vor 2 Stunden", "gestern")
|
|
10
|
+
* using the native browser API Intl.RelativeTimeFormat.
|
|
11
|
+
*
|
|
12
|
+
* @param value The date string, timestamp or Date object to format
|
|
13
|
+
* @returns Formatted relative time or "N/A" if value is missing/invalid
|
|
14
|
+
*/
|
|
15
|
+
export declare function formatRelativeTime(value?: string | Date | null): string;
|
|
16
|
+
/**
|
|
17
|
+
* Formats an ETA date: returns doneLabel (e.g. "Done") if the date has passed,
|
|
18
|
+
* otherwise formats the relative time until that date (e.g. "in 15 Minuten").
|
|
19
|
+
*
|
|
20
|
+
* @param value The date string, timestamp or Date object
|
|
21
|
+
* @param doneLabel The label to return when the ETA has already passed (default: "Done")
|
|
22
|
+
* @returns Formatted ETA string or "N/A" if value is missing/invalid
|
|
23
|
+
*/
|
|
24
|
+
export declare function formatEta(value?: string | Date | null, doneLabel?: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* Helper function for locale aware number formatting
|
|
27
|
+
* @param value The number to format
|
|
28
|
+
* @param locale Optional locale string (defaults to the current i18n language)
|
|
29
|
+
* @param options Optional Intl.NumberFormatOptions for custom formatting
|
|
30
|
+
*/
|
|
31
|
+
export declare function formatNumber(value: number, locale?: string, options?: Intl.NumberFormatOptions): string;
|
|
32
|
+
/**
|
|
33
|
+
* Formats a number compactly with K, M or B suffix (e.g. 2.50B, 12.4M, 5.2K)
|
|
34
|
+
* @param value The number to format
|
|
35
|
+
* @param unit Optional unit suffix (defaults to none)
|
|
36
|
+
* @param locale Optional locale string (defaults to the current i18n language)
|
|
37
|
+
* @param options Optional Intl.NumberFormatOptions used for values below 1000
|
|
38
|
+
*/
|
|
39
|
+
export declare function formatCompactNumber(value: number, unit?: string, locale?: string, options?: Intl.NumberFormatOptions): string;
|
|
40
|
+
/**
|
|
41
|
+
* Formats an ISK amount rounded to whole ISK (e.g. "1,234,567 ISK")
|
|
42
|
+
* @param value The ISK amount
|
|
43
|
+
*/
|
|
44
|
+
export declare function formatIsk(value: number): string;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* render a Link with given URL and text optional children
|
|
3
|
+
* @param url The URL to link to
|
|
4
|
+
* @param text The text to display for the link
|
|
5
|
+
* @param children Optional React children to include inside the link
|
|
6
|
+
* @param external Whether the link should open in a new tab (external link)
|
|
7
|
+
* @returns A JSX element representing the link
|
|
8
|
+
*/
|
|
9
|
+
export declare const renderLink: ({ url, text, children, external, className }: {
|
|
10
|
+
url: string;
|
|
11
|
+
text: string;
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
external?: boolean;
|
|
14
|
+
className?: string;
|
|
15
|
+
}) => import('react').JSX.Element;
|
|
16
|
+
/**
|
|
17
|
+
* render a ship image with a fallback to the icon if the render image fails
|
|
18
|
+
* @param shipId The ID of the ship
|
|
19
|
+
* @param shipName The name of the ship
|
|
20
|
+
* @returns A JSX element representing the ship image
|
|
21
|
+
*/
|
|
22
|
+
export declare const renderShipImage: (shipId: number, shipName: string, className?: string) => import('react').JSX.Element;
|
|
23
|
+
/**
|
|
24
|
+
* Helper function for rendering pre-rendered HTML safely in React components
|
|
25
|
+
* @param value The HTML string to render
|
|
26
|
+
*/
|
|
27
|
+
export declare function renderHtml(value: string): import('react').JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.aa-react.container{min-width:640px;max-width:1280px;margin:0 auto}@keyframes aa-shake{0%,to{transform:translate(0)}20%{transform:translate(-6px)}40%{transform:translate(6px)}60%{transform:translate(-4px)}80%{transform:translate(4px)}}.aa-shake{animation:.32s ease-in-out infinite aa-shake}.aa-menu-badge-pulse{animation:1.8s cubic-bezier(.4,0,.6,1) infinite aa-menu-badge-ping;position:relative;box-shadow:0 0 #ef4444b3}@keyframes aa-menu-badge-ping{0%,to{box-shadow:0 0 #ef4444bf}50%{box-shadow:0 0 0 5px #ef444400}}.aa-nav-danger{font-weight:600;transition:all .2s ease-in-out;color:#ef4444!important}.aa-nav-danger:hover{text-shadow:0 0 8px #ef444466;color:#f87171!important}.aa-nav-danger.active{border-bottom:2px solid #ef4444;color:#ff4545!important}.aa-tooltip-container{z-index:9999;color:#34d399;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);pointer-events:none;background-color:#1e222ef2;border:1px solid #10b9814d;border-radius:1rem;align-items:center;padding:.375rem .75rem;font-family:Mono Tech,monospace;font-size:.75rem;font-weight:600;display:inline-flex;box-shadow:0 0 25px #0009}.aa-tooltip-container span{white-space:nowrap}.aa-tooltip.tooltip{z-index:9999!important;position:fixed!important}.aa-table-shell{border:2px solid var(--aa-border-light);border-radius:var(--aa-border-radius);background-color:var(--aa-color-body);box-shadow:var(--aa-shadow);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);overflow:hidden}.aa-table-scroll{overflow-x:auto}:is(.aa-table-shell:has(.dropdown-menu.show),.aa-table-shell-light:has(.dropdown-menu.show),.aa-table-scroll:has(.dropdown-menu.show)){overflow:visible}.aa-table{border-collapse:collapse;color:var(--aa-text-tertiary);font-family:var(--font-mono);font-size:var(--aa-font-size)}.aa-table-head{border-bottom:1px solid var(--aa-border-light);background-color:var(--aa-color-body-dark);color:var(--aa-text-secondary);font-family:var(--font-hud);letter-spacing:.05em;text-transform:uppercase;font-size:11px}.aa-table-foot{border-top:2px solid var(--aa-border-light);background-color:var(--aa-color-body-dark);font-weight:700}.aa-table-heading-cell,.aa-table-cell{padding:12px 16px}.aa-table-sortable{cursor:pointer;transition:color .15s}.aa-table-sortable:hover{color:var(--aa-text-emerald-light)}.aa-table-sort-icon{width:12px;height:12px;color:var(--aa-text-muted);transition:color .15s}.aa-table-sortable:hover .aa-table-sort-icon:not(.aa-table-sort-icon-active){color:var(--aa-text-secondary)}.aa-table-sort-icon-active{width:14px;height:14px;color:var(--aa-text-emerald-light)}.aa-table-filter-row{border-top:1px solid var(--aa-border-light);background-color:color-mix(in srgb, var(--aa-color-body-dark) 85%, var(--aa-color-body))}.aa-table-filter-cell{font-family:var(--font-mono);font-size:var(--aa-font-size);letter-spacing:normal;text-transform:none;font-weight:400}.aa-table-body tr{border-bottom:1px solid var(--aa-color-grey-light);transition:background-color .15s}.aa-table-row-hover:hover{background-color:color-mix(in srgb, var(--aa-color-grey-light) 55%, transparent)}.aa-table-message{color:var(--aa-text-secondary);font-family:var(--font-mono)}.aa-table-footer{border-top:1px solid var(--aa-panel-border,var(--aa-border-light));background-color:var(--aa-table-footer-bg,var(--aa-color-body-dark));color:var(--aa-text-secondary);font-family:var(--font-mono);font-size:var(--aa-font-size)}.aa-table-select.form-select{border-color:var(--aa-border-light);background-color:var(--aa-color-body);color:var(--aa-text-primary);font-family:var(--font-mono);font-size:var(--aa-font-size);cursor:pointer;padding:4px 32px 4px 8px}.aa-table-select.form-select:focus{border-color:var(--aa-color-emerald);box-shadow:none}.aa-table-page-button.btn{border:1px solid var(--aa-border-light);background-color:var(--aa-color-body);color:var(--aa-text-tertiary);border-radius:4px;padding:6px;transition:background-color .15s,color .15s}.aa-table-page-button.btn:hover:not(:disabled){background-color:var(--aa-color-grey-light);color:var(--aa-text-primary)}.aa-table-page-button.btn:disabled{opacity:.4}.aa-table-page-icon{width:14px;height:14px;display:block}.aa-table-page-number{color:var(--aa-text-tertiary);font-size:11px}.aa-table-shell-light,.aa-table-shell.aa-table-light{border:1px solid var(--aa-border-light);border-radius:var(--aa-border-radius);background-color:var(--aa-color-grey-light);box-shadow:var(--aa-shadow);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);overflow:hidden}.aa-table-shell-light .aa-table,.aa-table.aa-table-light{color:var(--aa-text-primary)}.aa-table-shell-light .aa-table-head,.aa-table-shell.aa-table-light .aa-table-head,.aa-table-light .aa-table-head{border-bottom:1px solid var(--aa-border-light);background-color:var(--aa-color-body-dark);color:var(--aa-text-secondary)}.aa-table-shell-light .aa-table-body tr,.aa-table-shell.aa-table-light .aa-table-body tr,.aa-table-light .aa-table-body tr{border-bottom:1px solid color-mix(in srgb, var(--aa-color-body) 70%, transparent)}.aa-table-shell-light .aa-table-row-hover:hover,.aa-table-shell.aa-table-light .aa-table-row-hover:hover,.aa-table-light .aa-table-row-hover:hover{background-color:color-mix(in srgb, var(--aa-color-white) 5%, var(--aa-color-grey-light))}.aa-table-shell-light .aa-table-footer,.aa-table-shell.aa-table-light .aa-table-footer,.aa-table-light .aa-table-footer{border-top:1px solid var(--aa-border-light);background-color:var(--aa-color-body-dark);color:var(--aa-text-secondary)}.aa-table-shell-light .aa-table-select.form-select,.aa-table-shell.aa-table-light .aa-table-select.form-select,.aa-table-light .aa-table-select.form-select{border-color:var(--aa-border-light);background-color:var(--aa-color-body);color:var(--aa-text-primary)}.aa-table-shell-light .aa-table-select.form-select:focus,.aa-table-shell.aa-table-light .aa-table-select.form-select:focus,.aa-table-light .aa-table-select.form-select:focus{border-color:var(--aa-color-emerald)}.aa-table-shell-light .aa-table-page-button.btn,.aa-table-shell.aa-table-light .aa-table-page-button.btn,.aa-table-light .aa-table-page-button.btn{border:1px solid var(--aa-border-light);background-color:var(--aa-color-body);color:var(--aa-text-tertiary)}.aa-table-shell-light .aa-table-page-button.btn:hover:not(:disabled),.aa-table-shell.aa-table-light .aa-table-page-button.btn:hover:not(:disabled),.aa-table-light .aa-table-page-button.btn:hover:not(:disabled){background-color:var(--aa-color-grey-light);color:var(--aa-text-primary)}.aa-table-filter-input.form-control{font-family:var(--font-mono);color:var(--aa-text-primary);background-color:var(--aa-color-body);border:1px solid var(--aa-border-light);border-radius:4px;outline:none;padding:4px 24px 4px 8px;font-size:11px;line-height:1.4;transition:border-color .15s,box-shadow .15s}.aa-table-filter-input.form-control::placeholder{color:var(--aa-text-muted)}.aa-table-filter-input.form-control:focus{border-color:var(--aa-color-emerald);box-shadow:0 0 0 1px var(--aa-color-emerald);background-color:var(--aa-color-body);color:var(--aa-text-primary)}.aa-table-filter-input.form-control[readonly]{cursor:pointer}.aa-table-filter-clear{width:14px;height:14px;color:var(--aa-text-muted);border-radius:3px;transition:color .15s,background-color .15s}.aa-table-filter-clear:hover{color:var(--aa-text-primary);background-color:var(--aa-color-grey-light)}.aa-table-filter-dropdown.dropdown-menu{background-color:var(--aa-color-body);max-height:250px;color:var(--aa-text-primary);border:1px solid var(--aa-border-light);box-shadow:var(--aa-shadow);font-family:var(--font-mono);z-index:1050;border-radius:6px;padding:4px;font-size:11px}.aa-table-filter-dropdown .dropdown-item{color:var(--aa-text-secondary);cursor:pointer;border-radius:4px;padding:4px 8px;font-size:11px;transition:background-color .1s,color .1s}.aa-table-filter-dropdown .dropdown-item:hover,.aa-table-filter-dropdown .dropdown-item:focus{background-color:var(--aa-color-grey-light);color:var(--aa-text-primary)}.aa-table-filter-dropdown .dropdown-item.active,.aa-table-filter-dropdown .dropdown-item:active{background-color:var(--aa-color-emerald);color:var(--aa-color-body-dark)}.aa-table-filter-popover.popover{--bs-popover-bg:var(--aa-color-body);--bs-popover-border-color:var(--aa-border-light);--bs-popover-body-color:var(--aa-text-primary);background-color:var(--aa-color-body);border:1px solid var(--aa-border-light);box-shadow:var(--aa-shadow);font-family:var(--font-mono);z-index:1050;border-radius:6px;font-size:11px}
|
|
2
|
+
/*$vite$:1*/
|
package/dist/i18n.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** i18next namespace of every text in this package. The apps load it from `i18n/<lng>/aa-geuthur-react.json`. */
|
|
2
|
+
export declare const I18N_NAMESPACE = "aa-geuthur-react";
|
|
3
|
+
/** Namespace of the app that is tried after the package namespace, e.g. for menu link names. */
|
|
4
|
+
export declare const I18N_FALLBACK_NAMESPACE = "translation";
|