data-primals-engine 1.3.4 → 1.4.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.
@@ -63,7 +63,7 @@ export function ModelList({ onModelSelect, onCreateModel, onImportModel, onEditM
63
63
  return fetch('/api/demo/initialize', {
64
64
  method: 'POST',
65
65
  headers: { "Content-Type": "application/json"},
66
- body: JSON.stringify({profile: profile}),
66
+ body: JSON.stringify({profile: profile, packs: profiles[profile].packs}),
67
67
  });
68
68
  });
69
69
 
@@ -190,7 +190,7 @@ export function ModelList({ onModelSelect, onCreateModel, onImportModel, onEditM
190
190
  key={'modelist' + model.name} onClick={() => generatedModels.some(g => g.name === model.name) ? onEditModel(model) : onModelSelect(model)}>
191
191
  <div className="flex flex-center flex-fw">
192
192
  <div
193
- className="flex flex-1 break-word">
193
+ className="flex flex-1 flex-no-wrap break-word">
194
194
  <div className={"icon"}>{IconComponent ? IconComponent : <></>}</div>
195
195
  <div>{t(`model_${model.name}`, model.name)} {generatedModels.some(f => f.name === model.name) ? '(tmp)' : (mods.some(f => f.mod === model.name) ? `(${mods.find(f => f.mod === model.name).count})` : '')}</div></div>
196
196
  <div className="btns">
@@ -51,10 +51,22 @@ export const MONGO_OPERATORS = {
51
51
  };
52
52
 
53
53
  export const profiles = {
54
- 'personal': ['contact', 'location', 'imageGallery', 'budget', 'currency', 'taxonomy'], // budget,
55
- 'developer': ['alert','endpoint','request','webpage', 'content', 'taxonomy', 'resource', 'translation', 'contact', 'location', 'channel', 'lang', 'token', 'message', 'ticket', 'user', 'permission', 'role'],
56
- 'company': ['alert','request','location', 'order', 'currency', 'product', 'cart', 'cartItem', 'invoice', 'message', 'user', 'role', 'permission', 'token','translation', 'lang', 'webpage', 'content', 'taxonomy', 'contact', 'resource', 'accountingExercise', 'accountingLineItem', 'accountingEntry', 'employee', 'kpi', 'dashboard'],
57
- 'engineer': ['alert','endpoint','request','dashboard', 'kpi', 'user', 'role', 'token', 'permission', 'workflow', 'workflowRun', 'workflowStep', "channel", "message", 'workflowAction', 'workflowTrigger']
54
+ 'personal': {
55
+ "packs": [],
56
+ "models": ['contact', 'location', 'imageGallery', 'budget', 'currency', 'taxonomy']
57
+ }, // budget,
58
+ 'developer': {
59
+ "packs": ["Multilingual starter pack", "Website Starter Pack"],
60
+ "models": ['alert','endpoint','request','webpage', 'content', 'taxonomy', 'resource', 'translation', 'contact', 'location', 'channel', 'lang', 'token', 'message', 'ticket', 'user', 'permission', 'role']
61
+ },
62
+ 'company': {
63
+ "packs": ["E-commerce Starter Kit"],
64
+ "models": ['alert','request','location', 'order', 'currency', 'product', 'cart', 'cartItem', 'invoice', 'message', 'user', 'role', 'permission', 'token','translation', 'lang', 'webpage', 'content', 'taxonomy', 'contact', 'resource', 'accountingExercise', 'accountingLineItem', 'accountingEntry', 'employee', 'kpi', 'dashboard']
65
+ },
66
+ 'engineer': {
67
+ "packs": ["AI Content Generation - Starter Pack"],
68
+ "models":['alert','endpoint','request','dashboard', 'kpi', 'user', 'role', 'token', 'permission', 'workflow', 'workflowRun', 'workflowStep', "channel", "message", 'workflowAction', 'workflowTrigger']
69
+ }
58
70
  }
59
71
 
60
72
  export const OPERAND_TYPES = {
@@ -2,6 +2,26 @@
2
2
  export const websiteTranslations = {
3
3
  fr: {
4
4
  translation: {
5
+ "modelcreator.gauge.hint": "Affiche le champ numérique sous forme de jauge visuelle. Nécessite de définir une valeur minimale et maximale.",
6
+ "modelcreator.percent.hint": "En mode jauge, affiche la valeur sous forme de pourcentage (calculé à partir du min/max) au lieu de la valeur brute.",
7
+
8
+ "duration.unit.days": "jours",
9
+ "duration.unit.hours": "heures",
10
+ "duration.unit.minutes": "minutes",
11
+ "duration.unit.seconds": "secondes",
12
+ "duration.day": "{{count}} jour",
13
+ "duration.day_plural": "{{count}} jours",
14
+ "duration.hour": "{{count}}h",
15
+ "duration.hour_plural": "{{count}}h",
16
+ "duration.minute": "{{count}}min",
17
+ "duration.minute_plural": "{{count}}min",
18
+ "duration.second": "{{count}}s",
19
+ "duration.second_plural": "{{count}}s",
20
+ "views.table": "Tableau",
21
+ "views.kanban": "Kanban",
22
+ "views.calendar": "Calendrier",
23
+ "modelcreator.delay": "Délai ?",
24
+ "modelcreator.delay.hint": "Cette donnée représente un délai en millisecondes.",
5
25
  "modelcreator.icon": "Icône",
6
26
  "modelcreator.field.icon": "Icône (FontAwesome) associée au modèle",
7
27
  "modelcreator.field.history": "Permet d'afficher et de superviser les modifications effectuées sur vos données. Consomme de l'espace.'",
@@ -492,7 +512,7 @@ export const websiteTranslations = {
492
512
  "cgu.p.9": "Nous nous réservons le droit de résilier votre accès à notre service à tout moment, avec ou sans motif, et sans préavis. Vous pouvez également résilier votre compte à tout moment en suivant les instructions disponibles sur le Site.",
493
513
  "cgu.h1.10": "10. Loi Applicable",
494
514
  "cgu.p.10": "Ces CGU sont régies par les lois en vigueur en France. Tout litige découlant de ou en relation avec ces CGU sera soumis à la juridiction exclusive des tribunaux compétents de ce pays.",
495
- "seo.title": "Besoin d'une solution API puissante et sécurisée, sans vous ruiner ? Découvrez data.primals.net !",
515
+ "seo.title": "Vos données en ligne - data.primals.net",
496
516
  "modelcreator.field.maxlength.ph": "0: pas de limite, X: nombre de caractères max",
497
517
  "modelcreator.field.unit.ph": "€, cm, kg...",
498
518
  "modelcreator.field.step.ph": "Précision (1, 0.1...)",
@@ -570,6 +590,25 @@ export const websiteTranslations = {
570
590
  },
571
591
  en: {
572
592
  translation: {
593
+ "modelcreator.gauge.hint": "Displays the numeric field as a visual gauge. Requires a minimum and maximum value to be set.",
594
+ "modelcreator.percent.hint": "In gauge mode, displays the value as a percentage (calculated from the min/max) instead of the raw value.",
595
+ "duration.unit.days": "days",
596
+ "duration.unit.hours": "hours",
597
+ "duration.unit.minutes": "minutes",
598
+ "duration.unit.seconds": "seconds",
599
+ "duration.day": "{{count}} day",
600
+ "duration.day_plural": "{{count}} days",
601
+ "duration.hour": "{{count}}h",
602
+ "duration.hour_plural": "{{count}}h",
603
+ "duration.minute": "{{count}}m",
604
+ "duration.minute_plural": "{{count}}m",
605
+ "duration.second": "{{count}}s",
606
+ "duration.second_plural": "{{count}}s",
607
+ "views.table": "Table",
608
+ "views.kanban": "Kanban",
609
+ "views.calendar": "Calendar",
610
+ "modelcreator.delay": "Delay?",
611
+ "modelcreator.delay.hint": "This data represents a delay in seconds.",
573
612
  "modelcreator.icon": "Icon",
574
613
  "modelcreator.field.icon": "Icon (FontAwesome) associated with the model",
575
614
  "modelcreator.field.history": "Allows you to view and monitor changes made to your data. Consumes space.",
@@ -1592,8 +1631,8 @@ export const websiteTranslations = {
1592
1631
  "cgu.h1.9": "9. Termination",
1593
1632
  "cgu.p.9": "We reserve the right to terminate your access to our service at any time, with or without cause, and without notice. You may also terminate your account at any time by following the instructions available on the Site.",
1594
1633
  "cgu.h1.10": "10. Applicable Law",
1595
- "cgu.p.10": "These TOU are governed by the laws in force in France. Any dispute arising out of or in connection with these TOU will be submitted to the exclusive jurisdiction of the competent courts of that country.",
1596
- "seo.title": "Need a powerful and secure API solution without breaking the bank? Check out data.primals.net!",
1634
+ "cgu.p.10": "TYhese TOU are governed by the laws in force in France. Any dispute arising out of or in connection with these TOU will be submitted to the exclusive jurisdiction of the competent courts of that country.",
1635
+ "seo.title": "Your data comes to life - data.primals.net!",
1597
1636
  "modelcreator.field.maxlength.ph": "0: unlimited, X: maximum number of characters",
1598
1637
  "modelcreator.field.unit.ph": "€, cm, kg...",
1599
1638
  "modelcreator.field.step.ph": "Precision (1, 0.1...)",
@@ -2012,6 +2051,26 @@ export const websiteTranslations = {
2012
2051
  },
2013
2052
  es: {
2014
2053
  translation: {
2054
+ "modelcreator.gauge.hint": "Muestra el campo numérico como un indicador visual. Requiere que se establezcan un valor mínimo y máximo.",
2055
+ "modelcreator.percent.hint": "En modo indicador, muestra el valor como un porcentaje (calculado a partir del mínimo/máximo) en lugar del valor bruto.",
2056
+ "duration.unit.days": "días",
2057
+ "duration.unit.hours": "horas",
2058
+ "duration.unit.minutes": "minutos",
2059
+ "duration.unit.seconds": "segundos",
2060
+ "duration.day": "{{count}} día",
2061
+ "duration.day_plural": "{{count}} días",
2062
+ "duration.hour": "{{count}}h",
2063
+ "duration.hour_plural": "{{count}}h",
2064
+ "duration.minute": "{{count}}min",
2065
+ "duration.minute_plural": "{{count}}min",
2066
+ "duration.second": "{{count}}s",
2067
+ "duration.second_plural": "{{count}}s",
2068
+ "views.table": "Tabla",
2069
+ "views.kanban": "Kanban",
2070
+ "views.calendar": "Calendario",
2071
+ "modelcreator.delay": "¿Retraso?",
2072
+ "modelcreator.delay.hint": "Este dato representa un retraso en segundos.",
2073
+
2015
2074
  "modelcreator.icon": "Icono",
2016
2075
  "modelcreator.field.icon": "Icono (FontAwesome) asociado al modelo",
2017
2076
  "modelcreator.field.history": "Permite ver y supervisar los cambios realizados en los datos. Consume espacio.",
@@ -3456,6 +3515,26 @@ export const websiteTranslations = {
3456
3515
  },
3457
3516
  pt: {
3458
3517
  translation: {
3518
+ "modelcreator.gauge.hint": "Exibe o campo numérico como um indicador visual. Requer a definição de um valor mínimo e máximo.",
3519
+ "modelcreator.percent.hint": "No modo de indicador, exibe o valor como uma porcentagem (calculada a partir do mínimo/máximo) em vez do valor bruto.",
3520
+ "duration.unit.days": "dias",
3521
+ "duration.unit.hours": "horas",
3522
+ "duration.unit.minutes": "minutos",
3523
+ "duration.unit.seconds": "segundos",
3524
+ "duration.day": "{{count}} dia",
3525
+ "duration.day_plural": "{{count}} dias",
3526
+ "duration.hour": "{{count}}h",
3527
+ "duration.hour_plural": "{{count}}h",
3528
+ "duration.minute": "{{count}}min",
3529
+ "duration.minute_plural": "{{count}}min",
3530
+ "duration.second": "{{count}}s",
3531
+ "duration.second_plural": "{{count}}s",
3532
+ "views.table": "Tabela",
3533
+ "views.kanban": "Kanban",
3534
+ "views.calendar": "Calendário",
3535
+ "modelcreator.delay": "Atraso?",
3536
+ "modelcreator.delay.hint": "Este dado representa um atraso em segundos.",
3537
+
3459
3538
  "modelcreator.icon": "Ícone",
3460
3539
  "modelcreator.field.icon": "Ícone (FontAwesome) associado ao modelo",
3461
3540
  "modelcreator.field.history": "Permite visualizar e monitorar as alterações feitas nos seus dados. Consome espaço.",
@@ -4895,6 +4974,25 @@ export const websiteTranslations = {
4895
4974
  },
4896
4975
  de: {
4897
4976
  translation: {
4977
+ "modelcreator.gauge.hint": "Zeigt das numerische Feld als visuelle Anzeige an. Erfordert die Festlegung eines Mindest- und Höchstwerts.",
4978
+ "modelcreator.percent.hint": "Im Anzeigemodus wird der Wert als Prozentsatz (berechnet aus Min./Max.) anstelle des Rohwerts angezeigt.",
4979
+ "duration.unit.days": "Tage",
4980
+ "duration.unit.hours": "Stunden",
4981
+ "duration.unit.minutes": "Minuten",
4982
+ "duration.unit.seconds": "Sekunden",
4983
+ "duration.day": "{{count}} Tag",
4984
+ "duration.day_plural": "{{count}} Tage",
4985
+ "duration.hour": "{{count}}h",
4986
+ "duration.hour_plural": "{{count}}h",
4987
+ "duration.minute": "{{count}}min",
4988
+ "duration.minute_plural": "{{count}}min",
4989
+ "duration.second": "{{count}}s",
4990
+ "duration.second_plural": "{{count}}s",
4991
+ "views.table": "Tabelle",
4992
+ "views.kanban": "Kanban",
4993
+ "views.calendar": "Kalender",
4994
+ "modelcreator.delay": "Verzögerung?",
4995
+ "modelcreator.delay.hint": "Dieser Wert stellt eine Verzögerung in sekunden dar.",
4898
4996
  "modelcreator.icon": "Symbol",
4899
4997
  "modelcreator.field.icon": "Mit dem Modell verknüpftes Symbol (FontAwesome)",
4900
4998
  "modelcreator.field.history": "Ermöglicht Ihnen, Änderungen an Ihren Daten anzuzeigen und zu überwachen. Verbraucht Speicherplatz.",
@@ -6320,6 +6418,26 @@ export const websiteTranslations = {
6320
6418
  },
6321
6419
  it: {
6322
6420
  translation: {
6421
+ "modelcreator.gauge.hint": "Visualizza il campo numerico come indicatore visivo. Richiede l'impostazione di un valore minimo e massimo.",
6422
+ "modelcreator.percent.hint": "In modalità indicatore, visualizza il valore come percentuale (calcolata dal minimo/massimo) anziché come valore grezzo.",
6423
+ "duration.unit.days": "giorni",
6424
+ "duration.unit.hours": "ore",
6425
+ "duration.unit.minutes": "minuti",
6426
+ "duration.unit.seconds": "secondi",
6427
+ "duration.day": "{{count}} giorno",
6428
+ "duration.day_plural": "{{count}} giorni",
6429
+ "duration.hour": "{{count}}h",
6430
+ "duration.hour_plural": "{{count}}h",
6431
+ "duration.minute": "{{count}}min",
6432
+ "duration.minute_plural": "{{count}}min",
6433
+ "duration.second": "{{count}}s",
6434
+ "duration.second_plural": "{{count}}s",
6435
+ "views.table": "Tabella",
6436
+ "views.kanban": "Kanban",
6437
+ "views.calendar": "Calendario",
6438
+ "modelcreator.delay": "Ritardo?",
6439
+ "modelcreator.delay.hint": "Questo dato rappresenta un ritardo in secondi.",
6440
+
6323
6441
  "modelcreator.icon": "Icona",
6324
6442
  "modelcreator.field.icon": "Icona (FontAwesome) associata al modello",
6325
6443
  "modelcreator.field.history": "Consente di visualizzare e monitorare le modifiche apportate ai dati. Occupa spazio.",
@@ -7757,6 +7875,26 @@ export const websiteTranslations = {
7757
7875
  },
7758
7876
  cs: {
7759
7877
  translation: {
7878
+ "modelcreator.gauge.hint": "Zobrazuje číselné pole jako vizuální měřidlo. Vyžaduje nastavení minimální a maximální hodnoty.",
7879
+ "modelcreator.percent.hint": "V režimu měřidla zobrazuje hodnotu v procentech (vypočtených z min./max.) namísto nezpracované hodnoty.",
7880
+ "duration.unit.days": "dny",
7881
+ "duration.unit.hours": "hodiny",
7882
+ "duration.unit.minutes": "minuty",
7883
+ "duration.unit.seconds": "sekundy",
7884
+ "duration.day": "{{count}} den",
7885
+ "duration.day_plural": "{{count}} dny", // Pour 2,3,4 et pluriel général
7886
+ "duration.hour": "{{count}}h",
7887
+ "duration.hour_plural": "{{count}}h",
7888
+ "duration.minute": "{{count}}min",
7889
+ "duration.minute_plural": "{{count}}min",
7890
+ "duration.second": "{{count}}s",
7891
+ "duration.second_plural": "{{count}}s",
7892
+ "views.table": "Tabulka",
7893
+ "views.kanban": "Kanban",
7894
+ "views.calendar": "Kalendář",
7895
+ "modelcreator.delay": "Zpoždění?",
7896
+ "modelcreator.delay.hint": "Tato data představují zpoždění v sekundách.",
7897
+
7760
7898
  "modelcreator.icon": "Ikona",
7761
7899
  "modelcreator.field.icon": "Ikona (FontAwesome) přidružená k modelu",
7762
7900
  "modelcreator.field.history": "Umožňuje zobrazit a sledovat změny provedené ve vašich datech. Spotřebovává místo.",
@@ -9188,6 +9326,26 @@ export const websiteTranslations = {
9188
9326
  },
9189
9327
  ru: {
9190
9328
  translation: {
9329
+ "modelcreator.gauge.hint": "Отображает числовое поле в виде визуальной шкалы. Требуется задать минимальное и максимальное значения.",
9330
+ "modelcreator.percent.hint": "В режиме шкалы отображает значение в процентах (рассчитанных на основе минимального и максимального значений), а не в исходном виде.",
9331
+ "duration.unit.days": "дней",
9332
+ "duration.unit.hours": "часов",
9333
+ "duration.unit.minutes": "минут",
9334
+ "duration.unit.seconds": "секунд",
9335
+ "duration.day": "{{count}} день",
9336
+ "duration.day_plural": "{{count}} дня", // Pour les comptes comme 2,3,4
9337
+ "duration.hour": "{{count}}ч",
9338
+ "duration.hour_plural": "{{count}}ч",
9339
+ "duration.minute": "{{count}}мин",
9340
+ "duration.minute_plural": "{{count}}мин",
9341
+ "duration.second": "{{count}}с",
9342
+ "duration.second_plural": "{{count}}с",
9343
+ "views.table": "Таблица",
9344
+ "views.kanban": "Канбан",
9345
+ "views.calendar": "Календарь",
9346
+ "modelcreator.delay": "Задержка?",
9347
+ "modelcreator.delay.hint": "Эти данные представляют задержку в секундах.",
9348
+
9191
9349
  "modelcreator.icon": "Значок",
9192
9350
  "modelcreator.field.icon": "Значок (FontAwesome), связанный с моделью",
9193
9351
  "modelcreator.field.history": "Позволяет просматривать и отслеживать изменения, внесённые в ваши данные. Занимает место.",
@@ -10631,6 +10789,26 @@ export const websiteTranslations = {
10631
10789
  },
10632
10790
  ar: {
10633
10791
  translation: {
10792
+ "modelcreator.gauge.hint": "يعرض الحقل الرقمي كمقياس مرئي. يتطلب تحديد الحد الأدنى والحد الأقصى للقيمة.",
10793
+ "modelcreator.percent.hint": "في وضع المقياس، يعرض القيمة كنسبة مئوية (محسوبة من الحد الأدنى/الأقصى) بدلاً من القيمة الخام.",
10794
+ "duration.unit.days": "أيام",
10795
+ "duration.unit.hours": "ساعات",
10796
+ "duration.unit.minutes": "دقائق",
10797
+ "duration.unit.seconds": "ثواني",
10798
+ "duration.day": "{{count}} يوم",
10799
+ "duration.day_plural": "{{count}} يوم",
10800
+ "duration.hour": "{{count}}س",
10801
+ "duration.hour_plural": "{{count}}س",
10802
+ "duration.minute": "{{count}}د",
10803
+ "duration.minute_plural": "{{count}}د",
10804
+ "duration.second": "{{count}}ث",
10805
+ "duration.second_plural": "{{count}}ث",
10806
+ "views.table": "جدول",
10807
+ "views.kanban": "كانبان",
10808
+ "views.calendar": "تقويم",
10809
+ "modelcreator.delay": "تأخير؟",
10810
+ "modelcreator.delay.hint": "تمثل هذه البيانات تأخيرًا بالثواني.",
10811
+
10634
10812
  "modelcreator.icon": "أيقونة",
10635
10813
  "modelcreator.field.icon": "الأيقونة (FontAwesome) المرتبطة بالنموذج",
10636
10814
  "modelcreator.field.history": "يسمح لك بعرض ومراقبة التغييرات التي أجريتها على بياناتك. يستهلك مساحة.",
@@ -12089,6 +12267,26 @@ export const websiteTranslations = {
12089
12267
  },
12090
12268
  sv: {
12091
12269
  translation: {
12270
+ "modelcreator.gauge.hint": "Visar det numeriska fältet som en visuell mätare. Kräver att ett minimum- och maxvärde ställs in.",
12271
+ "modelcreator.percent.hint": "I mätläge visas värdet som en procentandel (beräknat från min/max) istället för det råa värdet.",
12272
+ "duration.unit.days": "dagar",
12273
+ "duration.unit.hours": "timmar",
12274
+ "duration.unit.minutes": "minuter",
12275
+ "duration.unit.seconds": "sekunder",
12276
+ "duration.day": "{{count}} dag",
12277
+ "duration.day_plural": "{{count}} dagar",
12278
+ "duration.hour": "{{count}}h",
12279
+ "duration.hour_plural": "{{count}}h",
12280
+ "duration.minute": "{{count}}min",
12281
+ "duration.minute_plural": "{{count}}min",
12282
+ "duration.second": "{{count}}s",
12283
+ "duration.second_plural": "{{count}}s",
12284
+ "views.table": "Tabell",
12285
+ "views.kanban": "Kanban",
12286
+ "views.calendar": "Kalender",
12287
+ "modelcreator.delay": "Fördröjning?",
12288
+ "modelcreator.delay.hint": "Denna data representerar en fördröjning i sekunder.",
12289
+
12092
12290
  "modelcreator.icon": "Ikon",
12093
12291
  "modelcreator.field.icon": "Ikon (FontAwesome) associerad med modellen",
12094
12292
  "modelcreator.field.history": "Låter dig visa och övervaka ändringar som gjorts i dina data. Tar plats.",
@@ -13520,6 +13718,26 @@ export const websiteTranslations = {
13520
13718
  },
13521
13719
  el: {
13522
13720
  translation: {
13721
+ "modelcreator.gauge.hint": "Εμφανίζει το αριθμητικό πεδίο ως οπτικό μετρητή. Απαιτείται να οριστεί μια ελάχιστη και μια μέγιστη τιμή.",
13722
+ "modelcreator.percent.hint": "Στη λειτουργία μετρητή, εμφανίζει την τιμή ως ποσοστό (υπολογιζόμενο από την ελάχιστη/μέγιστη τιμή) αντί για την ακατέργαστη τιμή.",
13723
+ "duration.unit.days": "ημέρες",
13724
+ "duration.unit.hours": "ώρες",
13725
+ "duration.unit.minutes": "λεπτά",
13726
+ "duration.unit.seconds": "δευτερόλεπτα",
13727
+ "duration.day": "{{count}} ημέρα",
13728
+ "duration.day_plural": "{{count}} ημέρες",
13729
+ "duration.hour": "{{count}}ώ",
13730
+ "duration.hour_plural": "{{count}}ώ",
13731
+ "duration.minute": "{{count}}λ",
13732
+ "duration.minute_plural": "{{count}}λ",
13733
+ "duration.second": "{{count}}δ",
13734
+ "duration.second_plural": "{{count}}δ",
13735
+ "views.table": "Πίνακας",
13736
+ "views.kanban": "Kanban",
13737
+ "views.calendar": "Ημερολόγιο",
13738
+ "modelcreator.delay": "Καθυστέρηση;",
13739
+ "modelcreator.delay.hint": "Αυτά τα δεδομένα αντιπροσωπεύουν μια καθυστέρηση σε δευτερόλεπτα.",
13740
+
13523
13741
  "modelcreator.icon": "Εικονίδιο",
13524
13742
  "modelcreator.field.icon": "Εικονίδιο (FontAwesome) που σχετίζεται με το μοντέλο",
13525
13743
  "modelcreator.field.history": "Σας επιτρέπει να βλέπετε και να παρακολουθείτε τις αλλαγές που έγιναν στα δεδομένα σας. Καταλαμβάνει χώρο.",
@@ -14960,6 +15178,26 @@ export const websiteTranslations = {
14960
15178
  },
14961
15179
  fa: {
14962
15180
  "translation": {
15181
+ "modelcreator.gauge.hint": "فیلد عددی را به عنوان یک معیار بصری نمایش می‌دهد. نیاز به تنظیم حداقل و حداکثر مقدار دارد.",
15182
+ "modelcreator.percent.hint": "در حالت معیار، مقدار را به صورت درصد (محاسبه شده از حداقل/حداکثر) به جای مقدار خام نمایش می‌دهد.",
15183
+ "duration.unit.days": "روز",
15184
+ "duration.unit.hours": "ساعت",
15185
+ "duration.unit.minutes": "دقیقه",
15186
+ "duration.unit.seconds": "ثانیه",
15187
+ "duration.day": "{{count}} روز",
15188
+ "duration.day_plural": "{{count}} روز",
15189
+ "duration.hour": "{{count}}س",
15190
+ "duration.hour_plural": "{{count}}س",
15191
+ "duration.minute": "{{count}}د",
15192
+ "duration.minute_plural": "{{count}}د",
15193
+ "duration.second": "{{count}}ث",
15194
+ "duration.second_plural": "{{count}}ث",
15195
+ "views.table": "جدول",
15196
+ "views.kanban": "کانبان",
15197
+ "views.calendar": "تقویم",
15198
+ "modelcreator.delay": "تأخیر؟",
15199
+ "modelcreator.delay.hint": "این داده نشان‌دهنده‌ی تأخیر بر حسب ثانیه است.",
15200
+
14963
15201
  "modelcreator.icon": "آیکون",
14964
15202
  "modelcreator.field.icon": "آیکون (FontAwesome) مرتبط با مدل",
14965
15203
  "modelcreator.field.history": "به شما امکان می‌دهد تغییرات ایجاد شده در داده‌های خود را مشاهده و نظارت کنید. فضا مصرف می‌کند.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "data-primals-engine",
3
- "version": "1.3.4",
3
+ "version": "1.4.0",
4
4
  "description": "data-primals-engine is a package responsible from handling large amount of data using MongoDB in a practical and performant way. It can also get workflow models working (for automation), and fully supports internationalisation. It also has integrated AI assistant.",
5
5
  "main": "src/engine.js",
6
6
  "type": "module",
@@ -52,7 +52,8 @@
52
52
  "peerDependencies": {
53
53
  "express": "^5.1.0",
54
54
  "react": "18.3.1",
55
- "react-query": ">=3.0.0"
55
+ "react-query": ">=3.0.0",
56
+ "react-i18next": "^15.6.1"
56
57
  },
57
58
  "dependencies": {
58
59
  "@langchain/anthropic": "^0.3.26",
@@ -88,7 +89,6 @@
88
89
  "process": "^0.11.10",
89
90
  "prop-types": "^15.8.1",
90
91
  "randomcolor": "^0.6.2",
91
- "react-i18next": "^15.6.1",
92
92
  "react-markdown": "^10.1.0",
93
93
  "read-excel-file": "^5.8.8",
94
94
  "request-ip": "^3.3.0",
package/src/core.js CHANGED
@@ -9,6 +9,15 @@ export function escapeRegex(string) {
9
9
  return string.replace(/[/\-\\^$*+?.()|[\]{}]/g, '\\$&');
10
10
  }
11
11
 
12
+ export const sequential = async (tasks) => {
13
+ const res = [];
14
+ for (const task of tasks) {
15
+ const r = await task();
16
+ res.push(r);
17
+ }
18
+ return res;
19
+ };
20
+
12
21
  export function isValidRegex(s) {
13
22
  try {
14
23
  const m = s.match(/^([/~@;%#'])(.*?)\1([gimsuy]*)$/);
@@ -180,18 +180,25 @@ export const defaultModels = {
180
180
  cronMask: [false, true, true, true, true, true],
181
181
  hint: "À quelle fréquence vérifier si la condition est remplie."
182
182
  },
183
+ { name: "isActive", type: "boolean", default: true },
183
184
  {
184
- name: "notificationChannel",
185
- type: "enum",
186
- items: ["in_app", "email"],
187
- default: "in_app"
185
+ name: "sendEmail",
186
+ type: "boolean",
187
+ default: false,
188
+ hint: "Cochez pour envoyer également une notification par e-mail."
188
189
  },
189
- { name: "isActive", type: "boolean", default: true },
190
190
  {
191
191
  name: "lastNotifiedAt",
192
192
  type: "datetime",
193
193
  required: false, // Important: ce champ est géré par le système
194
194
  hint: "Timestamp de la dernière notification envoyée pour cette alerte."
195
+ },
196
+ {
197
+ name: "message",
198
+ type: "richtext_t",
199
+ required: false,
200
+ hint: "Message personnalisé pour l'e-mail. Si vide, un message par défaut sera utilisé. Vous pouvez utiliser les variables {count}, {alert.name}....",
201
+ condition: { $eq: ["$sendEmail", true] }
195
202
  }
196
203
  ]
197
204
  },
@@ -1082,11 +1089,12 @@ export const defaultModels = {
1082
1089
  hint: "Structure JSON décrivant l'organisation des KPIs. Exemple : { \"type\": \"columns\", \"columns\": [ [\"kpi_id_1\"], [\"kpi_id_2\", \"kpi_id_3\"] ] }."
1083
1090
  },
1084
1091
  {
1085
- name: 'settings', // Paramètres spécifiques à ce tableau de bord
1086
- type: 'code', // Utilisation du type 'code' pour stocker des paramètres JSON
1087
- language: 'json',
1088
- default: { "defaultTimeRange": "last_7_days", "refreshInterval": null }, // Paramètres par défaut (plage de temps, pas de rafraîchissement auto)
1089
- hint: "Paramètres JSON pour le tableau de bord, comme la plage de temps par défaut ('defaultTimeRange') ou l'intervalle de rafraîchissement en secondes ('refreshInterval')."
1092
+ name: 'refreshInterval',
1093
+ type: 'number',
1094
+ delay: true, // Sera interprété par le front-end comme un champ de durée
1095
+ unit: 's',
1096
+ min: 0,
1097
+ hint: "Intervalle de rafraîchissement automatique en secondes. Laisser vide ou à 0 pour désactiver."
1090
1098
  },
1091
1099
  {
1092
1100
  name: 'isDefault', // Indicateur pour le tableau de bord par défaut
package/src/email.js CHANGED
@@ -47,7 +47,7 @@ const createTransporter = (smtpConfig) => {
47
47
  export const sendEmail = async (email = "", data, smtpConfig = null, lang, tpl = null) => {
48
48
  const contactEmail = smtpConfig ? (smtpConfig.from || emailDefaultConfig.from) :"Our company <noreply@ourdomain.tld>";
49
49
  const emails = Array.isArray(email) ? email : [email];
50
- if (emails.length === 0) return;
50
+ if (emails.length === 0) return false;
51
51
 
52
52
  // Choisir le transporteur à utiliser
53
53
  const transporter = smtpConfig ? createTransporter(smtpConfig||emailDefaultConfig) : defaultTransporter;
@@ -76,6 +76,7 @@ export const sendEmail = async (email = "", data, smtpConfig = null, lang, tpl =
76
76
  try {
77
77
  await Promise.all(sendPromises);
78
78
  console.log(`Email(s) sent successfully to : ${emails.join(', ')}`);
79
+ return true;
79
80
  } catch (error) {
80
81
  console.error("Error when sending to one ore more emails :", error);
81
82
  // Vous pouvez relancer l'erreur si vous voulez que l'appelant la gère