@lambda-development/erp-core 0.8.19 → 0.8.21

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,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
  };
@@ -59,6 +59,31 @@ declare const _default: {
59
59
  "endOfThisYear": "Ende dieses Jahres",
60
60
  "endOfLastYear": "Ende des letzten Jahres"
61
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
+ },
62
87
  "language": {
63
88
  "title": "Sprache",
64
89
  "help": "Wählen Sie die Sprache der Oberfläche. Ihre Auswahl wird in diesem Browser gespeichert.",
@@ -59,6 +59,31 @@ declare const _default: {
59
59
  "endOfThisYear": "End of This Year",
60
60
  "endOfLastYear": "End of Last Year"
61
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
+ },
62
87
  "language": {
63
88
  "title": "Language",
64
89
  "help": "Choose the language for the interface. Your choice is saved in this browser.",
@@ -59,6 +59,31 @@ declare const _default: {
59
59
  "endOfThisYear": "Fin de l’année en cours",
60
60
  "endOfLastYear": "Fin de l’année dernière"
61
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
+ },
62
87
  "language": {
63
88
  "title": "Langue",
64
89
  "help": "Choisissez la langue de l'interface. Votre choix est enregistré dans ce navigateur.",