@lambda-development/erp-core 0.8.18 → 0.8.20

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.
@@ -84,6 +84,7 @@ export declare const api: {
84
84
  total: number;
85
85
  limit: number;
86
86
  offset: number;
87
+ text_fields: string[];
87
88
  }>;
88
89
  getDocument: (doctype: string, name: string) => Promise<any>;
89
90
  adjacentDocument: (doctype: string, name: string, params?: Record<string, string | number | undefined>) => Promise<{
@@ -116,9 +117,13 @@ export declare const api: {
116
117
  total: number;
117
118
  limit: number;
118
119
  offset: number;
120
+ text_fields: string[];
119
121
  }>;
120
122
  searchMasters: (type: string, q: string) => Promise<any[]>;
121
- masterFilterValues: (type: string, field: string) => Promise<{
123
+ masterFilterValues: (type: string, field: string, q?: string, limit?: number) => Promise<{
124
+ values: any[];
125
+ }>;
126
+ documentFilterValues: (doctype: string, field: string, q?: string, limit?: number) => Promise<{
122
127
  values: any[];
123
128
  }>;
124
129
  searchDocuments: (doctype: string, q: string) => Promise<any[]>;
@@ -0,0 +1,8 @@
1
+ interface ReportPeriodProps {
2
+ from?: string;
3
+ to?: string;
4
+ asOf?: string;
5
+ }
6
+ /** Displays the applied URL-backed period, not unsubmitted filter input. */
7
+ export declare function ReportPeriod({ from, to, asOf }: ReportPeriodProps): import("react/jsx-runtime").JSX.Element | null;
8
+ export {};
@@ -0,0 +1,28 @@
1
+ export interface SmartSearchOption {
2
+ value: string;
3
+ label: string;
4
+ }
5
+ export interface SmartSearchField {
6
+ name: string;
7
+ label: string;
8
+ type?: string;
9
+ options?: SmartSearchOption[];
10
+ /** The backend schema confirms that this column supports __contains. */
11
+ contains?: boolean;
12
+ /** Low-cardinality fields may suggest values before the user types a prefix. */
13
+ suggestOnEmpty?: boolean;
14
+ }
15
+ interface SmartListSearchProps {
16
+ scope: string;
17
+ value: string;
18
+ onChange: (value: string) => void;
19
+ fields: SmartSearchField[];
20
+ filters: Record<string, string>;
21
+ onFiltersChange: (updates: Record<string, string | null>) => void;
22
+ onSubmit: (search: string, updates: Record<string, string | null>) => void;
23
+ loadValues: (field: string, prefix: string) => Promise<Array<string | number>>;
24
+ hiddenChipFields?: string[];
25
+ className?: string;
26
+ }
27
+ export declare function SmartListSearch({ scope, value, onChange, fields, filters, onFiltersChange, onSubmit, loadValues, hiddenChipFields, className, }: SmartListSearchProps): import("react/jsx-runtime").JSX.Element;
28
+ export {};
@@ -4,6 +4,7 @@ export declare function useDocumentList(doctype: string, filters?: Record<string
4
4
  total: number;
5
5
  limit: number;
6
6
  offset: number;
7
+ text_fields: string[];
7
8
  } | undefined;
8
9
  isLoading: boolean;
9
10
  error: Error | null;
@@ -12,5 +13,6 @@ export declare function useDocumentList(doctype: string, filters?: Record<string
12
13
  total: number;
13
14
  limit: number;
14
15
  offset: number;
16
+ text_fields: string[];
15
17
  }, Error>>;
16
18
  };
@@ -44,6 +44,46 @@ declare const _default: {
44
44
  "totals": "Summen",
45
45
  "errorOccurred": "Ein Fehler ist aufgetreten"
46
46
  },
47
+ "datePresets": {
48
+ "today": "Heute",
49
+ "thisWeek": "Diese Woche",
50
+ "thisMonth": "Dieser Monat",
51
+ "thisQuarter": "Dieses Quartal",
52
+ "thisYear": "Dieses Jahr",
53
+ "lastMonth": "Letzter Monat",
54
+ "lastQuarter": "Letztes Quartal",
55
+ "lastYear": "Letztes Jahr",
56
+ "endOfThisMonth": "Ende dieses Monats",
57
+ "endOfLastMonth": "Ende des letzten Monats",
58
+ "endOfThisQuarter": "Ende dieses Quartals",
59
+ "endOfThisYear": "Ende dieses Jahres",
60
+ "endOfLastYear": "Ende des letzten Jahres"
61
+ },
62
+ "smartSearch": {
63
+ "placeholder": "Suchen oder Feld:Wert eingeben…",
64
+ "search": "Suchen",
65
+ "addFilter": "+ Filter",
66
+ "availableFields": "Verfügbare Felder",
67
+ "fieldHelp": "Feld auswählen oder den technischen Namen mit Doppelpunkt eingeben.",
68
+ "field": "Feld",
69
+ "valueFor": "Wert für {{label}}",
70
+ "allFields": "Alle Felder",
71
+ "typeForValues": "Tippen, um Werte in diesem Feld zu finden.",
72
+ "noValues": "Keine passenden Werte gefunden.",
73
+ "noFields": "Keine passenden Felder gefunden.",
74
+ "useValue": "„{{value}}“ verwenden",
75
+ "removeFilter": "Filter {{label}} entfernen",
76
+ "types": {
77
+ "text": "Text",
78
+ "textarea": "Langtext",
79
+ "select": "Auswahl",
80
+ "link": "Verknüpfter Eintrag",
81
+ "date": "Datum",
82
+ "datetime": "Datum und Uhrzeit",
83
+ "number": "Zahl",
84
+ "currency": "Betrag"
85
+ }
86
+ },
47
87
  "language": {
48
88
  "title": "Sprache",
49
89
  "help": "Wählen Sie die Sprache der Oberfläche. Ihre Auswahl wird in diesem Browser gespeichert.",
@@ -347,6 +387,10 @@ declare const _default: {
347
387
  "Closed": "Geschlossen"
348
388
  },
349
389
  "reports": {
390
+ "periodRange": "Berichtszeitraum: {{from}} – {{to}}",
391
+ "periodFrom": "Berichtszeitraum ab {{from}}",
392
+ "periodThrough": "Berichtszeitraum bis {{to}}",
393
+ "asOfDate": "Stichtag: {{date}}",
350
394
  "balanced": "AUSGEGLICHEN",
351
395
  "imbalanced": "NICHT AUSGEGLICHEN",
352
396
  "income": "Erträge",
@@ -44,6 +44,46 @@ declare const _default: {
44
44
  "totals": "Totals",
45
45
  "errorOccurred": "An error occurred"
46
46
  },
47
+ "datePresets": {
48
+ "today": "Today",
49
+ "thisWeek": "This Week",
50
+ "thisMonth": "This Month",
51
+ "thisQuarter": "This Quarter",
52
+ "thisYear": "This Year",
53
+ "lastMonth": "Last Month",
54
+ "lastQuarter": "Last Quarter",
55
+ "lastYear": "Last Year",
56
+ "endOfThisMonth": "End of This Month",
57
+ "endOfLastMonth": "End of Last Month",
58
+ "endOfThisQuarter": "End of This Quarter",
59
+ "endOfThisYear": "End of This Year",
60
+ "endOfLastYear": "End of Last Year"
61
+ },
62
+ "smartSearch": {
63
+ "placeholder": "Search or enter field:value…",
64
+ "search": "Search",
65
+ "addFilter": "+ Filter",
66
+ "availableFields": "Available fields",
67
+ "fieldHelp": "Choose a field or type its technical name followed by a colon.",
68
+ "field": "Field",
69
+ "valueFor": "Value for {{label}}",
70
+ "allFields": "All fields",
71
+ "typeForValues": "Start typing to find values in this field.",
72
+ "noValues": "No matching values found.",
73
+ "noFields": "No matching fields found.",
74
+ "useValue": "Use “{{value}}”",
75
+ "removeFilter": "Remove {{label}} filter",
76
+ "types": {
77
+ "text": "Text",
78
+ "textarea": "Long text",
79
+ "select": "Selection",
80
+ "link": "Linked record",
81
+ "date": "Date",
82
+ "datetime": "Date and time",
83
+ "number": "Number",
84
+ "currency": "Amount"
85
+ }
86
+ },
47
87
  "language": {
48
88
  "title": "Language",
49
89
  "help": "Choose the language for the interface. Your choice is saved in this browser.",
@@ -347,6 +387,10 @@ declare const _default: {
347
387
  "Closed": "Closed"
348
388
  },
349
389
  "reports": {
390
+ "periodRange": "Reporting period: {{from}} – {{to}}",
391
+ "periodFrom": "Reporting period from {{from}}",
392
+ "periodThrough": "Reporting period through {{to}}",
393
+ "asOfDate": "As of: {{date}}",
350
394
  "balanced": "BALANCED",
351
395
  "imbalanced": "IMBALANCED",
352
396
  "income": "Income",
@@ -44,6 +44,46 @@ declare const _default: {
44
44
  "totals": "Totaux",
45
45
  "errorOccurred": "Une erreur s'est produite"
46
46
  },
47
+ "datePresets": {
48
+ "today": "Aujourd’hui",
49
+ "thisWeek": "Cette semaine",
50
+ "thisMonth": "Ce mois-ci",
51
+ "thisQuarter": "Ce trimestre",
52
+ "thisYear": "Cette année",
53
+ "lastMonth": "Mois dernier",
54
+ "lastQuarter": "Trimestre dernier",
55
+ "lastYear": "Année dernière",
56
+ "endOfThisMonth": "Fin du mois en cours",
57
+ "endOfLastMonth": "Fin du mois dernier",
58
+ "endOfThisQuarter": "Fin du trimestre en cours",
59
+ "endOfThisYear": "Fin de l’année en cours",
60
+ "endOfLastYear": "Fin de l’année dernière"
61
+ },
62
+ "smartSearch": {
63
+ "placeholder": "Rechercher ou saisir champ:valeur…",
64
+ "search": "Rechercher",
65
+ "addFilter": "+ Filtre",
66
+ "availableFields": "Champs disponibles",
67
+ "fieldHelp": "Choisissez un champ ou saisissez son nom technique suivi de deux-points.",
68
+ "field": "Champ",
69
+ "valueFor": "Valeur pour {{label}}",
70
+ "allFields": "Tous les champs",
71
+ "typeForValues": "Commencez à saisir pour rechercher des valeurs dans ce champ.",
72
+ "noValues": "Aucune valeur correspondante.",
73
+ "noFields": "Aucun champ correspondant.",
74
+ "useValue": "Utiliser « {{value}} »",
75
+ "removeFilter": "Supprimer le filtre {{label}}",
76
+ "types": {
77
+ "text": "Texte",
78
+ "textarea": "Texte long",
79
+ "select": "Sélection",
80
+ "link": "Enregistrement lié",
81
+ "date": "Date",
82
+ "datetime": "Date et heure",
83
+ "number": "Nombre",
84
+ "currency": "Montant"
85
+ }
86
+ },
47
87
  "language": {
48
88
  "title": "Langue",
49
89
  "help": "Choisissez la langue de l'interface. Votre choix est enregistré dans ce navigateur.",
@@ -347,6 +387,10 @@ declare const _default: {
347
387
  "Closed": "Clôturé"
348
388
  },
349
389
  "reports": {
390
+ "periodRange": "Période du rapport : {{from}} – {{to}}",
391
+ "periodFrom": "Période du rapport à partir du {{from}}",
392
+ "periodThrough": "Période du rapport jusqu’au {{to}}",
393
+ "asOfDate": "Date de référence : {{date}}",
350
394
  "balanced": "ÉQUILIBRÉ",
351
395
  "imbalanced": "DÉSÉQUILIBRÉ",
352
396
  "income": "Produits",
package/dist/index.d.ts CHANGED
@@ -32,7 +32,7 @@ export type { ListContext } from './lib/doc-list-context';
32
32
  export { configureBranding, getBranding } from './lib/branding';
33
33
  export type { Branding } from './lib/branding';
34
34
  export { usePageTitle } from './lib/use-page-title';
35
- export { setDateLocale, formatDate } from './lib/utils';
35
+ export { setDateLocale, formatDate, formatLocalDate } from './lib/utils';
36
36
  export { api, request, ApiError, configureApiBase } from './api/client';
37
37
  export { AuthProvider, useAuth } from './contexts/auth-context';
38
38
  export type { User } from './contexts/auth-context';