@lambda-development/erp-core 1.1.10 → 1.2.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.
@@ -0,0 +1,29 @@
1
+ export interface MentionUser {
2
+ name: string;
3
+ full_name: string;
4
+ email: string;
5
+ }
6
+ export type MentionAction = <T>(action: string, args: Record<string, unknown>) => Promise<T>;
7
+ export declare const mentionAction: <T>(action: string, args: unknown) => Promise<T>;
8
+ declare const searchColleagues: (query: string, signal: AbortSignal) => Promise<{
9
+ users: MentionUser[];
10
+ }>;
11
+ /** Explicit user selection; ordinary text and pasted @names never send notifications. */
12
+ export declare function MentionEditor({ value, recipients, onChange, placeholder, className, disabled, searchUsers }: {
13
+ value: string;
14
+ recipients: MentionUser[];
15
+ onChange: (value: string, recipients: MentionUser[]) => void;
16
+ placeholder?: string;
17
+ className?: string;
18
+ disabled?: boolean;
19
+ searchUsers?: typeof searchColleagues;
20
+ }): import("react/jsx-runtime").JSX.Element;
21
+ export declare function MentionInbox({ identity, action, onOpenRecord }?: {
22
+ identity?: {
23
+ name: string;
24
+ role: string;
25
+ };
26
+ action?: MentionAction;
27
+ onOpenRecord?: (url: string) => void;
28
+ }): import("react/jsx-runtime").JSX.Element | null;
29
+ export {};
@@ -987,6 +987,29 @@ declare const _default: {
987
987
  "explain_viewer": "Die App kann ERP-Datensätze und Berichte lesen sowie Beleg-PDFs erstellen. Sie kann keine Geschäftsdaten bearbeiten.",
988
988
  "explain_manager": "Die App kann zusätzlich Belege erstellen, bearbeiten, buchen und stornieren sowie Stammdaten aktualisieren.",
989
989
  "explain_admin": "Die App kann alle verfügbaren ERP-Werkzeuge nutzen, einschliesslich administrativer Aktionen und dem Löschen von Stammdaten."
990
+ },
991
+ "mentions": {
992
+ "title": "Erwähnungen",
993
+ "note": "Interne Notiz",
994
+ "placeholder": "Notiz schreiben… mit @ jemanden erwähnen",
995
+ "colleagues": "Kolleginnen und Kollegen",
996
+ "loading": "Laden…",
997
+ "noUsers": "Keine passenden Personen",
998
+ "hint": "Mit @ eine Person auswählen. Sie wird beim Speichern benachrichtigt.",
999
+ "remove": "Erwähnung von {{name}} entfernen",
1000
+ "close": "Schliessen",
1001
+ "open": "Offen",
1002
+ "unread": "Ungelesen",
1003
+ "done": "Erledigt",
1004
+ "retry": "Erneut versuchen",
1005
+ "empty": "Hier gibt es keine Erwähnungen.",
1006
+ "mentionedYou": "hat dich erwähnt",
1007
+ "reopen": "Wieder öffnen",
1008
+ "markDone": "Erledigt",
1009
+ "markUnread": "Als ungelesen markieren",
1010
+ "markRead": "Als gelesen markieren",
1011
+ "previous": "Zurück",
1012
+ "next": "Weiter"
990
1013
  }
991
1014
  }
992
1015
  ;
@@ -987,6 +987,29 @@ declare const _default: {
987
987
  "explain_viewer": "The app can read ERP records and reports and generate document PDFs. It cannot edit business records.",
988
988
  "explain_manager": "The app can also create, edit, submit and cancel business documents and update master data.",
989
989
  "explain_admin": "The app can use all available ERP tools, including administrative actions and deleting master data."
990
+ },
991
+ "mentions": {
992
+ "title": "Mentions",
993
+ "note": "Internal note",
994
+ "placeholder": "Write a note… use @ to mention a colleague",
995
+ "colleagues": "Colleagues",
996
+ "loading": "Loading…",
997
+ "noUsers": "No matching colleagues",
998
+ "hint": "Type @ and select a colleague to notify them when you save.",
999
+ "remove": "Remove mention of {{name}}",
1000
+ "close": "Close",
1001
+ "open": "Open",
1002
+ "unread": "Unread",
1003
+ "done": "Done",
1004
+ "retry": "Retry",
1005
+ "empty": "No mentions here.",
1006
+ "mentionedYou": "mentioned you",
1007
+ "reopen": "Reopen",
1008
+ "markDone": "Done",
1009
+ "markUnread": "Mark unread",
1010
+ "markRead": "Mark read",
1011
+ "previous": "Previous",
1012
+ "next": "Next"
990
1013
  }
991
1014
  }
992
1015
  ;
@@ -987,6 +987,29 @@ declare const _default: {
987
987
  "explain_viewer": "L’application peut lire les données et rapports ERP et générer des PDF. Elle ne peut pas modifier les données métier.",
988
988
  "explain_manager": "L’application peut aussi créer, modifier, valider et annuler des documents et mettre à jour les données de base.",
989
989
  "explain_admin": "L’application peut utiliser tous les outils ERP disponibles, y compris les actions administratives et la suppression de données de base."
990
+ },
991
+ "mentions": {
992
+ "title": "Mentions",
993
+ "note": "Note interne",
994
+ "placeholder": "Écrire une note… utiliser @ pour mentionner un collègue",
995
+ "colleagues": "Collègues",
996
+ "loading": "Chargement…",
997
+ "noUsers": "Aucun collègue correspondant",
998
+ "hint": "Saisissez @ et sélectionnez une personne. Elle sera avertie à l’enregistrement.",
999
+ "remove": "Retirer la mention de {{name}}",
1000
+ "close": "Fermer",
1001
+ "open": "À traiter",
1002
+ "unread": "Non lues",
1003
+ "done": "Terminées",
1004
+ "retry": "Réessayer",
1005
+ "empty": "Aucune mention ici.",
1006
+ "mentionedYou": "vous a mentionné",
1007
+ "reopen": "Rouvrir",
1008
+ "markDone": "Terminer",
1009
+ "markUnread": "Marquer comme non lue",
1010
+ "markRead": "Marquer comme lue",
1011
+ "previous": "Précédent",
1012
+ "next": "Suivant"
990
1013
  }
991
1014
  }
992
1015
  ;
package/dist/index.d.ts CHANGED
@@ -16,6 +16,8 @@
16
16
  export { bootstrap, createAppQueryClient } from './bootstrap';
17
17
  export type { BootstrapOptions } from './bootstrap';
18
18
  export { AppShell } from './components/layout/app-shell';
19
+ export { MentionEditor, mentionAction } from './components/mentions';
20
+ export type { MentionUser } from './components/mentions';
19
21
  export { buildRoutes, registerRoute } from './routes';
20
22
  export { registerDoctype, getDoctypeConfig, getAllDoctypeConfigs, } from './lib/doctypes';
21
23
  export type { DoctypeConfig, FieldDef, ChildTableDef, ConversionDef, } from './lib/doctypes';