@lambda-development/erp-core 0.1.0
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/dist/App.d.ts +1 -0
- package/dist/api/client.d.ts +256 -0
- package/dist/assets/report-runtime.worker-DrBTCfV6.js +5 -0
- package/dist/assets/report-runtime.worker-DrBTCfV6.js.map +1 -0
- package/dist/bootstrap.d.ts +16 -0
- package/dist/components/auth/protected-route.d.ts +3 -0
- package/dist/components/chat/chat-provider.d.ts +62 -0
- package/dist/components/document/child-table-editor.d.ts +9 -0
- package/dist/components/document/document-actions.d.ts +14 -0
- package/dist/components/document/link-field.d.ts +9 -0
- package/dist/components/document/status-badge.d.ts +5 -0
- package/dist/components/layout/app-shell.d.ts +1 -0
- package/dist/components/layout/sidebar.d.ts +7 -0
- package/dist/components/ui/badge.d.ts +10 -0
- package/dist/components/ui/button.d.ts +11 -0
- package/dist/components/ui/card.d.ts +10 -0
- package/dist/components/ui/date-range-presets.d.ts +9 -0
- package/dist/components/ui/hint-tooltip.d.ts +3 -0
- package/dist/components/ui/input.d.ts +9 -0
- package/dist/components/ui/language-select.d.ts +8 -0
- package/dist/components/ui/select.d.ts +15 -0
- package/dist/contexts/auth-context.d.ts +19 -0
- package/dist/hooks/use-base-currency.d.ts +7 -0
- package/dist/hooks/use-currencies.d.ts +10 -0
- package/dist/hooks/use-document-list.d.ts +16 -0
- package/dist/hooks/use-document.d.ts +14 -0
- package/dist/hooks/use-report.d.ts +139 -0
- package/dist/hooks/use-url-state.d.ts +23 -0
- package/dist/i18n/index.d.ts +15 -0
- package/dist/i18n/locales/de.json.d.ts +542 -0
- package/dist/i18n/locales/en.json.d.ts +602 -0
- package/dist/i18n/locales/fr.json.d.ts +542 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.js +6583 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/branding.d.ts +28 -0
- package/dist/lib/component-registry.d.ts +4 -0
- package/dist/lib/doctypes.d.ts +56 -0
- package/dist/lib/nav.d.ts +21 -0
- package/dist/lib/utils.d.ts +10 -0
- package/dist/main.d.ts +0 -0
- package/dist/pages/admin/settings.d.ts +1 -0
- package/dist/pages/admin/users.d.ts +1 -0
- package/dist/pages/chat.d.ts +1 -0
- package/dist/pages/dashboard.d.ts +1 -0
- package/dist/pages/demo.d.ts +6 -0
- package/dist/pages/documents/document-form.d.ts +2 -0
- package/dist/pages/documents/document-list.d.ts +1 -0
- package/dist/pages/login.d.ts +1 -0
- package/dist/pages/masters/master-form.d.ts +1 -0
- package/dist/pages/masters/master-list.d.ts +1 -0
- package/dist/pages/opening-balances.d.ts +1 -0
- package/dist/pages/reports/analytics.d.ts +1 -0
- package/dist/pages/reports/ap-aging.d.ts +1 -0
- package/dist/pages/reports/ar-aging.d.ts +1 -0
- package/dist/pages/reports/balance-sheet.d.ts +1 -0
- package/dist/pages/reports/general-ledger.d.ts +1 -0
- package/dist/pages/reports/profit-loss.d.ts +1 -0
- package/dist/pages/reports/stock-balance.d.ts +1 -0
- package/dist/pages/reports/trial-balance.d.ts +1 -0
- package/dist/pages/setup.d.ts +1 -0
- package/dist/pages/tutorial.d.ts +1 -0
- package/dist/routes.d.ts +19 -0
- package/dist/workers/report-runtime.worker.d.ts +1 -0
- package/package.json +61 -0
- package/src/index.css +105 -0
- package/tailwind.preset.ts +70 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
export declare function useTrialBalance(params?: Record<string, string>): {
|
|
2
|
+
data: {
|
|
3
|
+
rows: any[];
|
|
4
|
+
total_debit: number;
|
|
5
|
+
total_credit: number;
|
|
6
|
+
difference: number;
|
|
7
|
+
} | undefined;
|
|
8
|
+
isLoading: boolean;
|
|
9
|
+
error: Error | null;
|
|
10
|
+
refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<{
|
|
11
|
+
rows: any[];
|
|
12
|
+
total_debit: number;
|
|
13
|
+
total_credit: number;
|
|
14
|
+
difference: number;
|
|
15
|
+
}, Error>>;
|
|
16
|
+
};
|
|
17
|
+
export declare function useGeneralLedger(params?: Record<string, string>): {
|
|
18
|
+
data: {
|
|
19
|
+
rows: any[];
|
|
20
|
+
total: number;
|
|
21
|
+
limit: number;
|
|
22
|
+
offset: number;
|
|
23
|
+
opening_balance: number;
|
|
24
|
+
} | undefined;
|
|
25
|
+
isLoading: boolean;
|
|
26
|
+
error: Error | null;
|
|
27
|
+
refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<{
|
|
28
|
+
rows: any[];
|
|
29
|
+
total: number;
|
|
30
|
+
limit: number;
|
|
31
|
+
offset: number;
|
|
32
|
+
opening_balance: number;
|
|
33
|
+
}, Error>>;
|
|
34
|
+
};
|
|
35
|
+
export declare function useStockBalance(params?: Record<string, string>): {
|
|
36
|
+
data: {
|
|
37
|
+
rows: any[];
|
|
38
|
+
} | undefined;
|
|
39
|
+
isLoading: boolean;
|
|
40
|
+
error: Error | null;
|
|
41
|
+
refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<{
|
|
42
|
+
rows: any[];
|
|
43
|
+
}, Error>>;
|
|
44
|
+
};
|
|
45
|
+
export declare function useProfitAndLoss(params?: Record<string, string>): {
|
|
46
|
+
data: any;
|
|
47
|
+
isLoading: boolean;
|
|
48
|
+
error: Error | null;
|
|
49
|
+
refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<any, Error>>;
|
|
50
|
+
};
|
|
51
|
+
export declare function useBalanceSheet(params?: Record<string, string>): {
|
|
52
|
+
data: any;
|
|
53
|
+
isLoading: boolean;
|
|
54
|
+
error: Error | null;
|
|
55
|
+
refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<any, Error>>;
|
|
56
|
+
};
|
|
57
|
+
export declare function useArAging(params?: Record<string, string>): {
|
|
58
|
+
data: any;
|
|
59
|
+
isLoading: boolean;
|
|
60
|
+
error: Error | null;
|
|
61
|
+
refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<any, Error>>;
|
|
62
|
+
};
|
|
63
|
+
export declare function useApAging(params?: Record<string, string>): {
|
|
64
|
+
data: any;
|
|
65
|
+
isLoading: boolean;
|
|
66
|
+
error: Error | null;
|
|
67
|
+
refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<any, Error>>;
|
|
68
|
+
};
|
|
69
|
+
export declare function useAnalyticsMetrics(): {
|
|
70
|
+
data: {
|
|
71
|
+
metrics: Array<{
|
|
72
|
+
metric: string;
|
|
73
|
+
label: string;
|
|
74
|
+
group_by: string[];
|
|
75
|
+
time_based: boolean;
|
|
76
|
+
}>;
|
|
77
|
+
} | undefined;
|
|
78
|
+
isLoading: boolean;
|
|
79
|
+
};
|
|
80
|
+
export declare function useAnalytics(params?: Record<string, string>): {
|
|
81
|
+
data: {
|
|
82
|
+
metric: string;
|
|
83
|
+
metric_label: string;
|
|
84
|
+
group_by: string;
|
|
85
|
+
chart_type: "bar" | "line";
|
|
86
|
+
time_based: boolean;
|
|
87
|
+
from_date: string | null;
|
|
88
|
+
to_date: string | null;
|
|
89
|
+
company: string | null;
|
|
90
|
+
rows: Array<{
|
|
91
|
+
label: string;
|
|
92
|
+
value: number;
|
|
93
|
+
}>;
|
|
94
|
+
total: number;
|
|
95
|
+
} | undefined;
|
|
96
|
+
isLoading: boolean;
|
|
97
|
+
error: Error | null;
|
|
98
|
+
refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<{
|
|
99
|
+
metric: string;
|
|
100
|
+
metric_label: string;
|
|
101
|
+
group_by: string;
|
|
102
|
+
chart_type: "bar" | "line";
|
|
103
|
+
time_based: boolean;
|
|
104
|
+
from_date: string | null;
|
|
105
|
+
to_date: string | null;
|
|
106
|
+
company: string | null;
|
|
107
|
+
rows: Array<{
|
|
108
|
+
label: string;
|
|
109
|
+
value: number;
|
|
110
|
+
}>;
|
|
111
|
+
total: number;
|
|
112
|
+
}, Error>>;
|
|
113
|
+
};
|
|
114
|
+
export declare function useRuntimeDatasets(): {
|
|
115
|
+
data: {
|
|
116
|
+
datasets: Array<{
|
|
117
|
+
dataset: string;
|
|
118
|
+
label: string;
|
|
119
|
+
description: string;
|
|
120
|
+
fields: Record<string, string>;
|
|
121
|
+
filter_fields: string[];
|
|
122
|
+
default_limit: number;
|
|
123
|
+
max_limit: number;
|
|
124
|
+
}>;
|
|
125
|
+
} | undefined;
|
|
126
|
+
isLoading: boolean;
|
|
127
|
+
error: Error | null;
|
|
128
|
+
refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<{
|
|
129
|
+
datasets: Array<{
|
|
130
|
+
dataset: string;
|
|
131
|
+
label: string;
|
|
132
|
+
description: string;
|
|
133
|
+
fields: Record<string, string>;
|
|
134
|
+
filter_fields: string[];
|
|
135
|
+
default_limit: number;
|
|
136
|
+
max_limit: number;
|
|
137
|
+
}>;
|
|
138
|
+
}, Error>>;
|
|
139
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Atomic multi-param updater. Works around a react-router-dom quirk:
|
|
3
|
+
* calling several `useUrlState` setters in the same handler races, because
|
|
4
|
+
* each functional updater reads the same cached `prev` and the last call
|
|
5
|
+
* wins — silently dropping the other updates. Pass all changes in one call
|
|
6
|
+
* so they land in a single navigate.
|
|
7
|
+
*
|
|
8
|
+
* `null`, `undefined`, or empty string remove the param from the URL.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useUrlPatch(): (patch: Record<string, string | number | null | undefined>) => void;
|
|
11
|
+
/**
|
|
12
|
+
* A URL-backed useState for a single query param.
|
|
13
|
+
*
|
|
14
|
+
* - Initial value is read from the URL; falls back to `defaultValue`.
|
|
15
|
+
* - Updates use `{ replace: true }` so filter/pagination tweaks don't pollute
|
|
16
|
+
* browser history — the Back button still takes the user to where they came
|
|
17
|
+
* from, not through each intermediate filter state.
|
|
18
|
+
* - Values equal to `defaultValue` (and empty strings) are stripped from the
|
|
19
|
+
* URL so a freshly-loaded page doesn't carry a bunch of `?status=All&page=1`
|
|
20
|
+
* noise.
|
|
21
|
+
* - Coerces to number when `defaultValue` is a number.
|
|
22
|
+
*/
|
|
23
|
+
export declare function useUrlState<T extends string | number>(key: string, defaultValue: T): [T, (next: T) => void];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as i18n } from 'i18next';
|
|
2
|
+
/** The languages the UI offers. `code` is what we persist + pass to i18next. */
|
|
3
|
+
export declare const SUPPORTED_LANGUAGES: readonly [{
|
|
4
|
+
readonly code: "en";
|
|
5
|
+
readonly label: "English";
|
|
6
|
+
}, {
|
|
7
|
+
readonly code: "de";
|
|
8
|
+
readonly label: "Deutsch";
|
|
9
|
+
}, {
|
|
10
|
+
readonly code: "fr";
|
|
11
|
+
readonly label: "Français";
|
|
12
|
+
}];
|
|
13
|
+
export type LanguageCode = (typeof SUPPORTED_LANGUAGES)[number]["code"];
|
|
14
|
+
export declare function getStoredLanguage(): LanguageCode;
|
|
15
|
+
export default i18n;
|