data-primals-engine 1.2.6 → 1.3.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.
- package/CHANGELOG.md +440 -0
- package/README.md +782 -712
- package/client/src/App.jsx +13 -20
- package/client/src/App.scss +4 -0
- package/client/src/AssistantChat.jsx +5 -4
- package/client/src/DataEditor.jsx +1 -1
- package/client/src/DataLayout.jsx +2 -2
- package/client/src/DataTable.jsx +66 -5
- package/client/src/ExportDialog.jsx +2 -2
- package/client/src/Field.jsx +5 -4
- package/client/src/HistoryDialog.jsx +96 -0
- package/client/src/HistoryDialog.scss +73 -0
- package/client/src/KanbanCard.jsx +4 -2
- package/client/src/KanbanConfigModal.jsx +5 -7
- package/client/src/ModelCreator.jsx +36 -15
- package/client/src/ModelCreatorField.jsx +14 -15
- package/client/src/PackGallery.jsx +89 -9
- package/client/src/PackGallery.scss +58 -4
- package/client/src/RTETrans.jsx +11 -0
- package/client/src/RelationValue.jsx +3 -4
- package/client/src/constants.js +1 -1
- package/client/src/core/data.js +2 -1
- package/client/src/hooks/useTutorials.jsx +1 -1
- package/client/src/translations.js +217 -0
- package/package.json +9 -2
- package/server.js +4 -4
- package/src/HistoryDialog.jsx +86 -0
- package/src/HistoryDialog.scss +77 -0
- package/src/constants.js +6 -0
- package/src/defaultModels.js +23 -10
- package/src/email.js +1 -1
- package/src/engine.js +6 -6
- package/src/events.js +15 -5
- package/src/gameObject.js +0 -29
- package/src/i18n.js +1 -1
- package/src/modules/{assistant.js → assistant/assistant.js} +42 -27
- package/src/modules/assistant/constants.js +16 -0
- package/src/modules/data/data.history.js +304 -0
- package/src/modules/data/data.js +306 -238
- package/src/modules/data/data.routes.js +33 -7
- package/src/modules/mongodb.js +17 -1
- package/src/modules/user.js +21 -4
- package/src/modules/workflow.js +133 -48
- package/src/packs.js +1016 -9
- package/src/services/index.js +11 -0
- package/src/services/stripe.js +195 -0
- package/src/workers/crypto-worker.js +3 -3
- package/test/data.backup.integration.test.js +5 -0
- package/test/data.history.integration.test.js +193 -0
- package/test/data.integration.test.js +144 -41
- package/test/events.test.js +27 -27
- package/test/globalTeardown.js +1 -0
- package/test/model.integration.test.js +5 -0
- package/test/workflow.actions.integration.test.js +4 -2
- package/test/workflow.integration.test.js +3 -1
- package/test/workflow.robustness.test.js +2 -0
|
@@ -2,6 +2,25 @@
|
|
|
2
2
|
export const websiteTranslations = {
|
|
3
3
|
fr: {
|
|
4
4
|
translation: {
|
|
5
|
+
"modelcreator.field.history": "Permet d'afficher et de superviser les modifications effectuées sur vos données. Consomme de l'espace.'",
|
|
6
|
+
"history": "Historique",
|
|
7
|
+
//
|
|
8
|
+
"history.op.delete": "Suppression",
|
|
9
|
+
"history.datePrefix": "On",
|
|
10
|
+
"history.byUser": "by",
|
|
11
|
+
"history.version": "Version:",
|
|
12
|
+
"history.error": "Impossible de charger l'historique.",
|
|
13
|
+
"history.title": "Historique de l'enregistrement",
|
|
14
|
+
"history.loading": "Chargement de l'historique",
|
|
15
|
+
"history.noHistory": "Aucun historique trouvé pour cet enregistrement",
|
|
16
|
+
|
|
17
|
+
"field_endpoint_isPublic": "Accès public",
|
|
18
|
+
"field_endpoint_isPublic_hint": "Si coché, ce point d'accès sera accessible sans authentification. Le script s'exécutera avec les droits du propriétaire du point d'accès.",
|
|
19
|
+
|
|
20
|
+
"packs.manualInstall": "Importer",
|
|
21
|
+
"packs.manualInstall.title": "Installation manuelle de pack",
|
|
22
|
+
"packs.manualInstall.instructions": "Collez ici le JSON de configuration du pack que vous souhaitez installer.",
|
|
23
|
+
"packs.manualInstall.placeholder": "{\"name\": \"Mon Pack\", \"description\": \"...\", \"models\": [...], \"data\": [...]}",
|
|
5
24
|
|
|
6
25
|
"api.data.relationFilterFailed": "La valeur {{value}} pour le champ {{field}} ne respecte pas le filtre de relation défini.",
|
|
7
26
|
|
|
@@ -535,6 +554,24 @@ export const websiteTranslations = {
|
|
|
535
554
|
},
|
|
536
555
|
en: {
|
|
537
556
|
translation: {
|
|
557
|
+
"modelcreator.field.history": "Allows you to view and monitor changes made to your data. Consumes space.",
|
|
558
|
+
"history": "History",
|
|
559
|
+
"history.op.create": "Creation",
|
|
560
|
+
"history.op.update": "Update",
|
|
561
|
+
"history.op.delete": "Deletion",
|
|
562
|
+
"history.datePrefix": "On",
|
|
563
|
+
"history.byUser": "by",
|
|
564
|
+
"history.version": "Version:",
|
|
565
|
+
"history.error": "Unable to load history.",
|
|
566
|
+
"history.title": "Record History",
|
|
567
|
+
"history.loading": "Loading History",
|
|
568
|
+
"history.noHistory": "No history found for this record",
|
|
569
|
+
|
|
570
|
+
"packs.manualInstall": "Import",
|
|
571
|
+
"packs.manualInstall.title": "Manual Pack Installation",
|
|
572
|
+
"packs.manualInstall.instructions": "Paste the configuration JSON of the pack you want to install here.",
|
|
573
|
+
"packs.manualInstall.placeholder": "{\"name\": \"My Pack\", \"description\": \"...\", \"models\": [...], \"data\": [...]}",
|
|
574
|
+
|
|
538
575
|
"dataimporter.excelPreview": "Excel Data Preview",
|
|
539
576
|
"dataimporter.previewNote": "Note: This is a preview of the first few rows. Empty cells are displayed as \"(empty)\".",
|
|
540
577
|
"dataimporter.nullValue": "(empty)",
|
|
@@ -1944,6 +1981,25 @@ export const websiteTranslations = {
|
|
|
1944
1981
|
},
|
|
1945
1982
|
es: {
|
|
1946
1983
|
translation: {
|
|
1984
|
+
"modelcreator.field.history": "Permite ver y supervisar los cambios realizados en los datos. Consume espacio.",
|
|
1985
|
+
"history": "Historial",
|
|
1986
|
+
|
|
1987
|
+
"history.op.create": "Creación",
|
|
1988
|
+
"history.op.update": "Actualización",
|
|
1989
|
+
"history.op.delete": "Eliminación",
|
|
1990
|
+
"history.datePrefix": "Activado",
|
|
1991
|
+
"history.byUser": "por",
|
|
1992
|
+
"history.version": "Versión:",
|
|
1993
|
+
"history.error": "No se puede cargar el historial",
|
|
1994
|
+
"history.title": "Historial del registro",
|
|
1995
|
+
"history.loading": "Cargando historial",
|
|
1996
|
+
"history.noHistory": "No se encontró historial para este registro",
|
|
1997
|
+
|
|
1998
|
+
"packs.manualInstall": "Importar",
|
|
1999
|
+
"packs.manualInstall.title": "Instalación manual del paquete",
|
|
2000
|
+
"packs.manualInstall.instructions": "Pegue aquí el JSON de configuración del paquete que desea instalar.",
|
|
2001
|
+
"packs.manualInstall.placeholder": "{\"name\": \"Mi paquete\", \"description\": \"...\", \"models\": [...], \"data\": [...]}",
|
|
2002
|
+
|
|
1947
2003
|
"dataimporter.excelPreview": "Vista previa de datos de Excel",
|
|
1948
2004
|
"dataimporter.previewNote": "Nota: Esta es una vista previa de las primeras filas. Las celdas vacías se muestran como \"(vacío)\".",
|
|
1949
2005
|
"dataimporter.nullValue": "(vacío)",
|
|
@@ -3357,6 +3413,24 @@ export const websiteTranslations = {
|
|
|
3357
3413
|
},
|
|
3358
3414
|
pt: {
|
|
3359
3415
|
translation: {
|
|
3416
|
+
"modelcreator.field.history": "Permite visualizar e monitorar as alterações feitas nos seus dados. Consome espaço.",
|
|
3417
|
+
"history": "Histórico",
|
|
3418
|
+
"history.op.create": "Criação",
|
|
3419
|
+
"history.op.update": "Atualização",
|
|
3420
|
+
"history.op.delete": "Exclusão",
|
|
3421
|
+
"history.datePrefix": "Ativado",
|
|
3422
|
+
"history.byUser": "por",
|
|
3423
|
+
"history.version": "Versão:",
|
|
3424
|
+
"history.error": "Não foi possível carregar o histórico.",
|
|
3425
|
+
"history.title": "Histórico do Registro",
|
|
3426
|
+
"history.loading": "Carregando Histórico",
|
|
3427
|
+
"history.noHistory": "Nenhum histórico encontrado para este registro",
|
|
3428
|
+
|
|
3429
|
+
"packs.manualInstall": "Importar",
|
|
3430
|
+
"packs.manualInstall.title": "Instalação manual do pacote",
|
|
3431
|
+
"packs.manualInstall.instructions": "Cole o JSON de configuração do pacote que você deseja instalar aqui.",
|
|
3432
|
+
"packs.manualInstall.placeholder": "{\"name\": \"Meu pacote\", \"description\": \"...\", \"models\": [...], \"data\": [...]}",
|
|
3433
|
+
|
|
3360
3434
|
"dataimporter.excelPreview": "Visualização de Dados do Excel",
|
|
3361
3435
|
"dataimporter.previewNote": "Observação: Esta é uma visualização das primeiras linhas. Células vazias são exibidas como \"(vazio)\".",
|
|
3362
3436
|
"dataimporter.nullValue": "(vazio)",
|
|
@@ -4765,6 +4839,24 @@ export const websiteTranslations = {
|
|
|
4765
4839
|
},
|
|
4766
4840
|
de: {
|
|
4767
4841
|
translation: {
|
|
4842
|
+
"modelcreator.field.history": "Ermöglicht Ihnen, Änderungen an Ihren Daten anzuzeigen und zu überwachen. Verbraucht Speicherplatz.",
|
|
4843
|
+
"history": "Verlauf",
|
|
4844
|
+
"history.op.create": "Erstellung",
|
|
4845
|
+
"history.op.update": "Aktualisieren",
|
|
4846
|
+
"history.op.delete": "Löschen",
|
|
4847
|
+
"history.datePrefix": "Am",
|
|
4848
|
+
"history.byUser": "von",
|
|
4849
|
+
"history.version": "Version:",
|
|
4850
|
+
"history.error": "Verlauf konnte nicht geladen werden.",
|
|
4851
|
+
"history.title": "Datensatzverlauf",
|
|
4852
|
+
"history.loading": "Verlauf wird geladen",
|
|
4853
|
+
"history.noHistory": "Kein Verlauf für diesen Datensatz gefunden",
|
|
4854
|
+
|
|
4855
|
+
"packs.manualInstall": "Importieren",
|
|
4856
|
+
"packs.manualInstall.title": "Manuelle Paketinstallation",
|
|
4857
|
+
"packs.manualInstall.instructions": "Fügen Sie hier die JSON-Konfiguration des zu installierenden Pakets ein.",
|
|
4858
|
+
"packs.manualInstall.placeholder": "{\"name\": \"Mein Paket\", \"description\": \"...\", \"models\": [...], \"data\": [...]}",
|
|
4859
|
+
|
|
4768
4860
|
"dataimporter.excelPreview": "Excel-Datenvorschau",
|
|
4769
4861
|
"dataimporter.previewNote": "Hinweis: Dies ist eine Vorschau der ersten Zeilen. Leere Zellen werden als \"(leer)\" angezeigt.",
|
|
4770
4862
|
"dataimporter.nullValue": "(leer)",
|
|
@@ -6157,6 +6249,24 @@ export const websiteTranslations = {
|
|
|
6157
6249
|
},
|
|
6158
6250
|
it: {
|
|
6159
6251
|
translation: {
|
|
6252
|
+
"modelcreator.field.history": "Consente di visualizzare e monitorare le modifiche apportate ai dati. Occupa spazio.",
|
|
6253
|
+
"history": "Cronologia",
|
|
6254
|
+
"history.op.create": "Creazione",
|
|
6255
|
+
"history.op.update": "Aggiorna",
|
|
6256
|
+
"history.op.delete": "Eliminazione",
|
|
6257
|
+
"history.datePrefix": "Attivo",
|
|
6258
|
+
"history.byUser": "di",
|
|
6259
|
+
"history.version": "Versione:",
|
|
6260
|
+
"history.error": "Impossibile caricare la cronologia.",
|
|
6261
|
+
"history.title": "Cronologia record",
|
|
6262
|
+
"history.loading": "Caricamento cronologia",
|
|
6263
|
+
"history.noHistory": "Nessuna cronologia trovata per questo record",
|
|
6264
|
+
|
|
6265
|
+
"packs.manualInstall": "Importa",
|
|
6266
|
+
"packs.manualInstall.title": "Installazione manuale del pacchetto",
|
|
6267
|
+
"packs.manualInstall.instructions": "Incolla qui il file JSON di configurazione del pacchetto che desideri installare.",
|
|
6268
|
+
"packs.manualInstall.placeholder": "{\"name\": \"My Pack\", \"description\": \"...\", \"models\": [...], \"data\": [...]}",
|
|
6269
|
+
|
|
6160
6270
|
"dataimporter.excelPreview": "Anteprima dati Excel",
|
|
6161
6271
|
"dataimporter.previewNote": "Nota: questa è un'anteprima delle prime righe. Le celle vuote vengono visualizzate come \"(vuoto)\".",
|
|
6162
6272
|
"dataimporter.nullValue": "(vuoto)",
|
|
@@ -7562,6 +7672,24 @@ export const websiteTranslations = {
|
|
|
7562
7672
|
},
|
|
7563
7673
|
cs: {
|
|
7564
7674
|
translation: {
|
|
7675
|
+
"modelcreator.field.history": "Umožňuje zobrazit a sledovat změny provedené ve vašich datech. Spotřebovává místo.",
|
|
7676
|
+
"history": "Historie",
|
|
7677
|
+
"history.op.create": "Vytvoření",
|
|
7678
|
+
"history.op.update": "Aktualizace",
|
|
7679
|
+
"history.op.delete": "Smazání",
|
|
7680
|
+
"history.datePrefix": "Zapnuto",
|
|
7681
|
+
"history.byUser": "od",
|
|
7682
|
+
"history.version": "Verze:",
|
|
7683
|
+
"history.error": "Nelze načíst historii.",
|
|
7684
|
+
"history.title": "Historie záznamu",
|
|
7685
|
+
"history.loading": "Načítání historie",
|
|
7686
|
+
"history.noHistory": "Pro tento záznam nebyla nalezena žádná historie",
|
|
7687
|
+
|
|
7688
|
+
"packs.manualInstall": "Importovat",
|
|
7689
|
+
"packs.manualInstall.title": "Ruční instalace balíčku",
|
|
7690
|
+
"packs.manualInstall.instructions": "Sem vložte konfigurační JSON balíčku, který chcete nainstalovat.",
|
|
7691
|
+
"packs.manualInstall.placeholder": "{\"name\": \"Můj balíček\", \"description\": \"...\", \"models\": [...], \"data\": [...]}",
|
|
7692
|
+
|
|
7565
7693
|
"dataimporter.excelPreview": "Náhled dat v Excelu",
|
|
7566
7694
|
"dataimporter.previewNote": "Poznámka: Toto je náhled prvních několika řádků. Prázdné buňky se zobrazují jako \"(prázdné)\".",
|
|
7567
7695
|
"dataimporter.nullValue": "(prázdné)",
|
|
@@ -8962,6 +9090,24 @@ export const websiteTranslations = {
|
|
|
8962
9090
|
},
|
|
8963
9091
|
ru: {
|
|
8964
9092
|
translation: {
|
|
9093
|
+
"modelcreator.field.history": "Позволяет просматривать и отслеживать изменения, внесённые в ваши данные. Занимает место.",
|
|
9094
|
+
"history": "История",
|
|
9095
|
+
"history.op.create": "Создание",
|
|
9096
|
+
"history.op.update": "Обновление",
|
|
9097
|
+
"history.op.delete": "Удаление",
|
|
9098
|
+
"history.datePrefix": "Вкл",
|
|
9099
|
+
"history.byUser": "Автор",
|
|
9100
|
+
"history.version": "Версия:",
|
|
9101
|
+
"history.error": "Не удалось загрузить историю",
|
|
9102
|
+
"history.title": "История записи",
|
|
9103
|
+
"history.loading": "Загрузка истории",
|
|
9104
|
+
"history.noHistory": "История для этой записи не найдена",
|
|
9105
|
+
|
|
9106
|
+
"packs.manualInstall": "Импорт",
|
|
9107
|
+
"packs.manualInstall.title": "Ручная установка пакета",
|
|
9108
|
+
"packs.manualInstall.instructions": "Вставьте сюда JSON-файл конфигурации пакета, который вы хотите установить.",
|
|
9109
|
+
"packs.manualInstall.placeholder": "{\"name\": \"My Pack\", \"description\": \"...\", \"models\": [...], \"data\": [...]}",
|
|
9110
|
+
|
|
8965
9111
|
"dataimporter.excelPreview": "Предварительный просмотр данных Excel",
|
|
8966
9112
|
"dataimporter.previewNote": "Примечание: Это предварительный просмотр первых нескольких строк. Пустые ячейки отображаются как \"(пусто)\".",
|
|
8967
9113
|
"dataimporter.nullValue": "(пусто)",
|
|
@@ -10372,6 +10518,23 @@ export const websiteTranslations = {
|
|
|
10372
10518
|
},
|
|
10373
10519
|
ar: {
|
|
10374
10520
|
translation: {
|
|
10521
|
+
"modelcreator.field.history": "يسمح لك بعرض ومراقبة التغييرات التي أجريتها على بياناتك. يستهلك مساحة.",
|
|
10522
|
+
"history": "السجل",
|
|
10523
|
+
"history.op.create": "إنشاء",
|
|
10524
|
+
"history.op.update": "تحديث",
|
|
10525
|
+
"history.op.delete": "حذف",
|
|
10526
|
+
"history.datePrefix": "تشغيل",
|
|
10527
|
+
"history.byUser": "بواسطة",
|
|
10528
|
+
"history.version": "الإصدار:",
|
|
10529
|
+
"history.error": "تعذر تحميل السجل",
|
|
10530
|
+
"history.title": "سجل السجل",
|
|
10531
|
+
"history.loading": "جارٍ تحميل السجل",
|
|
10532
|
+
"history.noHistory": "لم يتم العثور على سجل لهذا السجل",
|
|
10533
|
+
|
|
10534
|
+
"packs.manualInstall": "استيراد",
|
|
10535
|
+
"packs.manualInstall.title": "تثبيت الحزمة يدويًا",
|
|
10536
|
+
"packs.manualInstall.instructions": "الصق ملف JSON الخاص بتكوين الحزمة التي تريد تثبيتها هنا",
|
|
10537
|
+
"packs.manualInstall.placeholder": "{\"name\": \"My Pack\", \"description\": \"...\", \"models\": [...], \"data\": [...]}",
|
|
10375
10538
|
"dataimporter.excelPreview": "معاينة بيانات إكسل",
|
|
10376
10539
|
"dataimporter.previewNote": "ملاحظة: هذه معاينة للصفوف القليلة الأولى. تُعرض الخلايا الفارغة كـ \"(فارغة)\".",
|
|
10377
10540
|
"dataimporter.nullValue": "(فارغة)",
|
|
@@ -11799,6 +11962,24 @@ export const websiteTranslations = {
|
|
|
11799
11962
|
},
|
|
11800
11963
|
sv: {
|
|
11801
11964
|
translation: {
|
|
11965
|
+
"modelcreator.field.history": "Låter dig visa och övervaka ändringar som gjorts i dina data. Tar plats.",
|
|
11966
|
+
"history": "Historik",
|
|
11967
|
+
"history.op.create": "Skapande",
|
|
11968
|
+
"history.op.update": "Uppdatering",
|
|
11969
|
+
"history.op.delete": "Bortning",
|
|
11970
|
+
"history.datePrefix": "På",
|
|
11971
|
+
"history.byUser": "av",
|
|
11972
|
+
"history.version": "Version:",
|
|
11973
|
+
"history.error": "Det gick inte att läsa in historiken.",
|
|
11974
|
+
"history.title": "Posthistorik",
|
|
11975
|
+
"history.loading": "Laddar in historik",
|
|
11976
|
+
"history.noHistory": "Ingen historik hittades för den här posten",
|
|
11977
|
+
|
|
11978
|
+
"packs.manualInstall": "Importera",
|
|
11979
|
+
"packs.manualInstall.title": "Manuell paketinstallation",
|
|
11980
|
+
"packs.manualInstall.instructions": "Klistra in konfigurations-JSON-filen för paketet du vill installera här.",
|
|
11981
|
+
"packs.manualInstall.placeholder": "{\"namn\": \"Mitt paket\", \"beskrivning\": \"...\", \"modeller\": [...], \"data\": [...]}",
|
|
11982
|
+
|
|
11802
11983
|
"dataimporter.excelPreview": "Förhandsgranskning av Excel-data",
|
|
11803
11984
|
"dataimporter.previewNote": "Obs! Detta är en förhandsgranskning av de första raderna. Tomma celler visas som \"(tomma)\"",
|
|
11804
11985
|
"dataimporter.nullValue": "(tomma)",
|
|
@@ -13199,6 +13380,24 @@ export const websiteTranslations = {
|
|
|
13199
13380
|
},
|
|
13200
13381
|
el: {
|
|
13201
13382
|
translation: {
|
|
13383
|
+
"modelcreator.field.history": "Σας επιτρέπει να βλέπετε και να παρακολουθείτε τις αλλαγές που έγιναν στα δεδομένα σας. Καταλαμβάνει χώρο.",
|
|
13384
|
+
"history": "Ιστορικό",
|
|
13385
|
+
"history.op.create": "Δημιουργία",
|
|
13386
|
+
"history.op.update": "Ενημέρωση",
|
|
13387
|
+
"history.op.delete": "Διαγραφή",
|
|
13388
|
+
"history.datePrefix": "Ενεργοποίηση",
|
|
13389
|
+
"history.byUser": "από",
|
|
13390
|
+
"history.version": "Έκδοση:",
|
|
13391
|
+
"history.error": "Δεν είναι δυνατή η φόρτωση του ιστορικού.",
|
|
13392
|
+
"history.title": "Ιστορικό Εγγραφών",
|
|
13393
|
+
"history.loading": "Φόρτωση Ιστορικού",
|
|
13394
|
+
"history.noHistory": "Δεν βρέθηκε ιστορικό για αυτήν την εγγραφή",
|
|
13395
|
+
|
|
13396
|
+
"packs.manualInstall": "Εισαγωγή",
|
|
13397
|
+
"packs.manualInstall.title": "Χειροκίνητη εγκατάσταση πακέτου",
|
|
13398
|
+
"packs.manualInstall.instructions": "Επικολλήστε εδώ το JSON διαμόρφωσης του πακέτου που θέλετε να εγκαταστήσετε.",
|
|
13399
|
+
"packs.manualInstall.placeholder": "{\"name\": \"Το πακέτο μου\", \"περιγραφή\": \"...\", \"μοντέλα\": [...], \"δεδομένα\": [...]}",
|
|
13400
|
+
|
|
13202
13401
|
"dataimporter.excelPreview": "Προεπισκόπηση δεδομένων Excel",
|
|
13203
13402
|
"dataimporter.previewNote": "Σημείωση: Αυτή είναι μια προεπισκόπηση των πρώτων γραμμών. Τα κενά κελιά εμφανίζονται ως \"(κενό)\".",
|
|
13204
13403
|
"dataimporter.nullValue": "(κενό)",
|
|
@@ -14607,6 +14806,24 @@ export const websiteTranslations = {
|
|
|
14607
14806
|
},
|
|
14608
14807
|
fa: {
|
|
14609
14808
|
"translation": {
|
|
14809
|
+
"modelcreator.field.history": "به شما امکان میدهد تغییرات ایجاد شده در دادههای خود را مشاهده و نظارت کنید. فضا مصرف میکند.",
|
|
14810
|
+
"history": "تاریخچه",
|
|
14811
|
+
"history.op.create": "ایجاد",
|
|
14812
|
+
"history.op.update": "بهروزرسانی",
|
|
14813
|
+
"history.op.delete": "حذف",
|
|
14814
|
+
"history.datePrefix": "روشن",
|
|
14815
|
+
"history.byUser": "توسط",
|
|
14816
|
+
"history.version": "نسخه:",
|
|
14817
|
+
"history.error": "بارگیری تاریخچه امکانپذیر نیست.",
|
|
14818
|
+
"history.title": "تاریخچه رکورد",
|
|
14819
|
+
"history.loading": "بارگیری تاریخچه",
|
|
14820
|
+
"history.noHistory": "هیچ تاریخچهای برای این رکورد یافت نشد",
|
|
14821
|
+
|
|
14822
|
+
"packs.manualInstall": "وارد کردن",
|
|
14823
|
+
"packs.manualInstall.title": "نصب دستی بسته",
|
|
14824
|
+
"packs.manualInstall.instructions": "فایل JSON پیکربندی بستهای که میخواهید نصب کنید را اینجا جایگذاری کنید.",
|
|
14825
|
+
"packs.manualInstall.placeholder": "{\"name\": \"بسته من\", \"description\": \"...\", \"models\": [...], \"data\": [...]}",
|
|
14826
|
+
|
|
14610
14827
|
"dataimporter.excelPreview": "پیشنمایش دادههای اکسل",
|
|
14611
14828
|
"dataimporter.previewNote": "توجه: این پیشنمایشی از چند ردیف اول است. سلولهای خالی به صورت \"(empty)\" نمایش داده میشوند.",
|
|
14612
14829
|
"dataimporter.nullValue": "(empty)",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "data-primals-engine",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
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",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"lint": "eslint .",
|
|
17
17
|
"format": "prettier --write .",
|
|
18
18
|
"clean": "rm -rf node_modules package-lock.json",
|
|
19
|
-
"test": "cross-env MONGO_DB_URL=\"mongodb://localhost:27017\" PORT=7635 vitest --no-file-parallelism",
|
|
19
|
+
"test": "cross-env MONGO_DB_URL=\"mongodb://localhost:27017\" PORT=7635 vitest --no-file-parallelism --no-watch",
|
|
20
20
|
"audit": "npm audit --audit-level=high",
|
|
21
21
|
"migrate:create": "node src/migrate.js create",
|
|
22
22
|
"migrate:up": "node src/migrate.js up",
|
|
@@ -33,6 +33,11 @@
|
|
|
33
33
|
"brace-expansion": "2.0.2",
|
|
34
34
|
"prismjs": "1.30.0"
|
|
35
35
|
},
|
|
36
|
+
"overrides": {
|
|
37
|
+
"refractor": {
|
|
38
|
+
"prismjs": "1.30.0"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
36
41
|
"repository": {
|
|
37
42
|
"type": "git",
|
|
38
43
|
"url": "https://github.com/anonympins/data-primals-engine.git"
|
|
@@ -50,6 +55,7 @@
|
|
|
50
55
|
"react-query": ">=3.0.0"
|
|
51
56
|
},
|
|
52
57
|
"dependencies": {
|
|
58
|
+
"@langchain/anthropic": "^0.3.26",
|
|
53
59
|
"@langchain/core": "^0.3.66",
|
|
54
60
|
"@langchain/deepseek": "^0.1.0",
|
|
55
61
|
"@langchain/google-genai": "^0.2.16",
|
|
@@ -88,6 +94,7 @@
|
|
|
88
94
|
"request-ip": "^3.3.0",
|
|
89
95
|
"sanitize-html": "^2.17.0",
|
|
90
96
|
"sirv": "^3.0.1",
|
|
97
|
+
"stripe": "^18.4.0",
|
|
91
98
|
"swagger-ui-express": "^5.0.1",
|
|
92
99
|
"tar": "^7.4.3",
|
|
93
100
|
"uniqid": "^5.4.0",
|
package/server.js
CHANGED
|
@@ -7,6 +7,7 @@ import process from "node:process";
|
|
|
7
7
|
import {Config, Engine, BenchmarkTool, GameObject, Logger} from "./src/index.js";
|
|
8
8
|
import sirv from "sirv";
|
|
9
9
|
import express from "express";
|
|
10
|
+
import {port} from "./src/constants.js";
|
|
10
11
|
|
|
11
12
|
Config.Set("modules", ["mongodb", "data", "file", "bucket", "workflow","user", "assistant", "swagger"])
|
|
12
13
|
Config.Set("middlewares", []);
|
|
@@ -27,10 +28,9 @@ if (process.argv.length === 3) {
|
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
|
|
30
|
-
const
|
|
31
|
-
engine.start(
|
|
31
|
+
const realPort = process.env.PORT || port;
|
|
32
|
+
engine.start(realPort, async (r) => {
|
|
32
33
|
const logger = engine.getComponent(Logger);
|
|
33
|
-
console.log("Server started on port " +
|
|
34
|
+
console.log("Server started on port " + realPort);
|
|
34
35
|
timer.stop();
|
|
35
|
-
|
|
36
36
|
});
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
|
+
import { Dialog } from "../Dialog.jsx";
|
|
3
|
+
import { api } from "../utils/api.js"; // Assurez-vous que le chemin vers votre utilitaire api est correct
|
|
4
|
+
import { FaHistory } from "react-icons/fa";
|
|
5
|
+
import "./HistoryDialog.scss";
|
|
6
|
+
|
|
7
|
+
// Sous-composant pour afficher une seule entrée de l'historique
|
|
8
|
+
const HistoryEntry = ({ entry }) => {
|
|
9
|
+
// _id: id du doc d'historique, _v: version, _op: type d'opération, _rid: id de l'enregistrement original
|
|
10
|
+
const { _id, _v, _op, _updatedAt, _user, _rid, ...data } = entry;
|
|
11
|
+
const operationDetails = {
|
|
12
|
+
'i': { label: 'Création', className: 'op-insert' },
|
|
13
|
+
'u': { label: 'Mise à jour', className: 'op-update' },
|
|
14
|
+
'd': { label: 'Suppression', className: 'op-delete' },
|
|
15
|
+
};
|
|
16
|
+
const opInfo = operationDetails[_op] || { label: _op, className: '' };
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<div className="history-entry">
|
|
20
|
+
<div className="history-entry-header">
|
|
21
|
+
<span className={`op-badge ${opInfo.className}`}>{opInfo.label}</span>
|
|
22
|
+
<span className="history-date">Le {new Date(_updatedAt).toLocaleString()}</span>
|
|
23
|
+
{_user && <span className="history-user">par <strong>{_user}</strong></span>}
|
|
24
|
+
<span className="history-version">Version: {_v}</span>
|
|
25
|
+
</div>
|
|
26
|
+
<div className="history-entry-data">
|
|
27
|
+
<pre>{JSON.stringify(data, null, 2)}</pre>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const HistoryDialog = ({ modelName, recordId, onClose }) => {
|
|
34
|
+
const [history, setHistory] = useState([]);
|
|
35
|
+
const [loading, setLoading] = useState(true);
|
|
36
|
+
const [error, setError] = useState(null);
|
|
37
|
+
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
if (!modelName || !recordId) return;
|
|
40
|
+
|
|
41
|
+
const fetchHistory = async () => {
|
|
42
|
+
setLoading(true);
|
|
43
|
+
setError(null);
|
|
44
|
+
try {
|
|
45
|
+
// J'assume que l'endpoint de l'API pour l'historique est structuré ainsi
|
|
46
|
+
const response = await api.get(`/data/history/${modelName}/${recordId}`);
|
|
47
|
+
if (response.success) {
|
|
48
|
+
// L'API devrait retourner l'historique trié du plus récent au plus ancien
|
|
49
|
+
setHistory(response.data);
|
|
50
|
+
} else {
|
|
51
|
+
setError(response.error || "Échec de la récupération de l'historique.");
|
|
52
|
+
}
|
|
53
|
+
} catch (err) {
|
|
54
|
+
setError("Une erreur est survenue lors de la récupération de l'historique.");
|
|
55
|
+
console.error(err);
|
|
56
|
+
} finally {
|
|
57
|
+
setLoading(false);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
fetchHistory();
|
|
62
|
+
}, [modelName, recordId]);
|
|
63
|
+
|
|
64
|
+
return (
|
|
65
|
+
<Dialog
|
|
66
|
+
title={<><FaHistory style={{ marginRight: '8px' }} /> Historique de l'enregistrement</>}
|
|
67
|
+
onClose={onClose}
|
|
68
|
+
isClosable={true}
|
|
69
|
+
className="history-dialog"
|
|
70
|
+
>
|
|
71
|
+
<div className="history-dialog-content">
|
|
72
|
+
{loading && <div>Chargement de l'historique...</div>}
|
|
73
|
+
{error && <div className="error-message">{error}</div>}
|
|
74
|
+
{!loading && !error && (
|
|
75
|
+
<div className="history-list">
|
|
76
|
+
{history.length > 0 ? (
|
|
77
|
+
history.map(entry => <HistoryEntry key={entry._id} entry={entry} />)
|
|
78
|
+
) : (
|
|
79
|
+
<div>Aucun historique trouvé pour cet enregistrement.</div>
|
|
80
|
+
)}
|
|
81
|
+
</div>
|
|
82
|
+
)}
|
|
83
|
+
</div>
|
|
84
|
+
</Dialog>
|
|
85
|
+
);
|
|
86
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
.history-dialog {
|
|
2
|
+
width: 80vw;
|
|
3
|
+
max-width: 900px;
|
|
4
|
+
height: 70vh;
|
|
5
|
+
|
|
6
|
+
.dialog-content {
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
height: 100%;
|
|
10
|
+
padding: 0; // Le padding sera sur le content wrapper
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.history-dialog-content {
|
|
15
|
+
flex-grow: 1;
|
|
16
|
+
overflow-y: auto;
|
|
17
|
+
padding: 1rem;
|
|
18
|
+
background-color: #f4f4f4;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.history-list {
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
gap: 1rem;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.history-entry {
|
|
28
|
+
border: 1px solid #ddd;
|
|
29
|
+
border-radius: 4px;
|
|
30
|
+
background-color: #fff;
|
|
31
|
+
box-shadow: 0 1px 3px rgba(0,0,0,0.05);
|
|
32
|
+
|
|
33
|
+
.history-entry-header {
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
gap: 1rem;
|
|
37
|
+
padding: 0.5rem 1rem;
|
|
38
|
+
background-color: #f9f9f9;
|
|
39
|
+
border-bottom: 1px solid #eee;
|
|
40
|
+
font-size: 0.9em;
|
|
41
|
+
color: #333;
|
|
42
|
+
|
|
43
|
+
.op-badge {
|
|
44
|
+
padding: 0.2rem 0.6rem;
|
|
45
|
+
border-radius: 12px;
|
|
46
|
+
color: white;
|
|
47
|
+
font-weight: bold;
|
|
48
|
+
font-size: 0.8em;
|
|
49
|
+
text-transform: uppercase;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.op-insert { background-color: #28a745; } // green
|
|
53
|
+
.op-update { background-color: #007bff; } // blue
|
|
54
|
+
.op-delete { background-color: #dc3545; } // red
|
|
55
|
+
|
|
56
|
+
.history-version {
|
|
57
|
+
margin-left: auto;
|
|
58
|
+
font-weight: bold;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.history-entry-data {
|
|
63
|
+
padding: 1rem;
|
|
64
|
+
|
|
65
|
+
pre {
|
|
66
|
+
white-space: pre-wrap;
|
|
67
|
+
word-wrap: break-word;
|
|
68
|
+
background-color: #2d2d2d;
|
|
69
|
+
color: #f8f8f2;
|
|
70
|
+
padding: 1rem;
|
|
71
|
+
border-radius: 4px;
|
|
72
|
+
margin: 0;
|
|
73
|
+
font-family: 'Courier New', Courier, monospace;
|
|
74
|
+
font-size: 0.85em;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
package/src/constants.js
CHANGED
|
@@ -24,6 +24,8 @@ export const dbName = "engine";
|
|
|
24
24
|
*/
|
|
25
25
|
export const host = 'localhost'; // or myhost.tld
|
|
26
26
|
|
|
27
|
+
export const port = 7633;
|
|
28
|
+
|
|
27
29
|
/**
|
|
28
30
|
* Cookie secret key (if COOKIES_SECRET is set, it will override this variable)
|
|
29
31
|
* @type {string}
|
|
@@ -301,3 +303,7 @@ metaModels['erp'] = { load: [ 'accountingExercise', 'accountingLineItem', 'accou
|
|
|
301
303
|
export const allowedFields = ['locked', 'hiddenable', 'anonymized', 'condition', 'color', 'index', 'type', 'required', 'hint', 'default', 'validate', 'unique', 'name', 'placeholder', 'asMain'];
|
|
302
304
|
|
|
303
305
|
|
|
306
|
+
|
|
307
|
+
export const getHost = () => {
|
|
308
|
+
return process.env.HOST || host || 'localhost';
|
|
309
|
+
}
|
package/src/defaultModels.js
CHANGED
|
@@ -420,6 +420,7 @@ export const defaultModels = {
|
|
|
420
420
|
{ "name": "products", "type": "relation", "relation": "cartItem", "required": true, multiple: true },
|
|
421
421
|
{ "name": "customer", "type": "relation", relation: 'user' }, // Relation vers le modèle 'user'
|
|
422
422
|
{ "name": "totalAmount", "type": "number", "required": true },
|
|
423
|
+
{ "name": "paymentIntentId", "type": "string", "hint": "Stripe Payment Intent ID for this order." },
|
|
423
424
|
{ "name": "currency", "type": "relation", "relation": "currency" },
|
|
424
425
|
{ "name": "paymentMethod", "type": "string" },
|
|
425
426
|
{ "name": "shippingAddress", "type": "relation", "relation": "location" },
|
|
@@ -506,6 +507,7 @@ export const defaultModels = {
|
|
|
506
507
|
name: "return",
|
|
507
508
|
"description": "",
|
|
508
509
|
fields: [
|
|
510
|
+
{ "name": "order", "type": "relation", "relation": "order", "required": true },
|
|
509
511
|
{ "name": "user", "type": "relation", relation: "user" },
|
|
510
512
|
{ "name": "reason", "type": "string", maxlength: 2048, required: true },
|
|
511
513
|
{ "name": "channel", "type": "relation", relation: 'channel' },
|
|
@@ -897,7 +899,7 @@ export const defaultModels = {
|
|
|
897
899
|
name: 'type',
|
|
898
900
|
type: 'enum',
|
|
899
901
|
required: true,
|
|
900
|
-
items: ['UpdateData', 'CreateData', 'DeleteData', 'ExecuteScript', '
|
|
902
|
+
items: ['UpdateData', 'CreateData', 'DeleteData', 'ExecuteScript', 'HttpRequest', 'SendEmail', 'Wait', 'GenerateAIContent', 'ExecuteServiceFunction'],
|
|
901
903
|
hint: "The type of operation to perform."
|
|
902
904
|
},
|
|
903
905
|
// For UpdateData / CreateData / DeleteData
|
|
@@ -923,14 +925,11 @@ export const defaultModels = {
|
|
|
923
925
|
// For CreateData
|
|
924
926
|
{ name: 'dataToCreate', condition: {$eq: ["$type", "CreateData"]}, type: 'code', language: 'json', default: {}, hint: "Object template for the new document to create" },
|
|
925
927
|
|
|
926
|
-
// For
|
|
927
|
-
{ name: '
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
{ name: '
|
|
931
|
-
{ name: 'method', condition: {$eq: ["$type", "CallWebhook"]}, type: 'enum', items: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE'], default: 'POST', hint: "HTTP method." },
|
|
932
|
-
{ name: 'headers', condition: {$eq: ["$type", "CallWebhook"]}, type: 'code', language: 'json',default: {}, hint: "HTTP headers as key-value pairs." },
|
|
933
|
-
{ name: 'body', condition: {$eq: ["$type", "CallWebhook"]}, type: 'code', language: 'json',default: {}, hint: "Request body, can include variables." },
|
|
928
|
+
// For HttpRequest
|
|
929
|
+
{ name: 'url', condition: {$eq: ["$type", "HttpRequest"]}, type: 'string', hint: "The URL to call." },
|
|
930
|
+
{ name: 'method', condition: {$eq: ["$type", "HttpRequest"]}, type: 'enum', items: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE'], default: 'POST', hint: "HTTP method." },
|
|
931
|
+
{ name: 'headers', condition: {$eq: ["$type", "HttpRequest"]}, type: 'code', language: 'json',default: {}, hint: "HTTP headers as key-value pairs." },
|
|
932
|
+
{ name: 'body', condition: {$eq: ["$type", "HttpRequest"]}, type: 'code', language: 'json',default: {}, hint: "Request body, can include variables." },
|
|
934
933
|
|
|
935
934
|
// For SendEmail
|
|
936
935
|
{
|
|
@@ -977,7 +976,15 @@ export const defaultModels = {
|
|
|
977
976
|
condition: { $eq: ["$type", "GenerateAIContent"] },
|
|
978
977
|
type: 'richtext', // richtext est bien pour les longs prompts
|
|
979
978
|
hint: "Le modèle de prompt. Utilise des variables comme {triggerData.field} ou {context.variable}."
|
|
980
|
-
}
|
|
979
|
+
},
|
|
980
|
+
|
|
981
|
+
// For ExecuteScript
|
|
982
|
+
{ name: 'script', condition: {$eq: ["$type", "ExecuteScript"]}, type: 'code', language: 'javascript', hint: "The script to execute." },
|
|
983
|
+
|
|
984
|
+
// For ExecuteServiceFunction
|
|
985
|
+
{ name: 'serviceName', condition: {$eq: ["$type", "ExecuteServiceFunction"]}, type: 'string', hint: "The name of the registered service to call (e.g., 'stripe')." },
|
|
986
|
+
{ name: 'functionName', condition: {$eq: ["$type", "ExecuteServiceFunction"]}, type: 'string', hint: "The name of the function to execute within the service." },
|
|
987
|
+
{ name: 'args', condition: {$eq: ["$type", "ExecuteServiceFunction"]}, type: 'code', language: 'json', default: [], hint: "An array of arguments to pass to the function. Can include variables." }
|
|
981
988
|
|
|
982
989
|
]
|
|
983
990
|
},
|
|
@@ -1447,6 +1454,12 @@ export const defaultModels = {
|
|
|
1447
1454
|
default: "POST",
|
|
1448
1455
|
hint: "The HTTP method required to call this endpoint."
|
|
1449
1456
|
},
|
|
1457
|
+
{
|
|
1458
|
+
name: 'isPublic',
|
|
1459
|
+
type: 'boolean',
|
|
1460
|
+
default: false,
|
|
1461
|
+
hint: "Si coché, ce point d'accès sera accessible sans authentification."
|
|
1462
|
+
},
|
|
1450
1463
|
{
|
|
1451
1464
|
name: "code",
|
|
1452
1465
|
type: "code",
|
package/src/email.js
CHANGED
|
@@ -54,7 +54,7 @@ export const sendEmail = async (email = "", data, smtpConfig = null, lang, tpl =
|
|
|
54
54
|
|
|
55
55
|
Event.Listen("OnEmailTemplate", (data, lang) => data.content, "event", "system");
|
|
56
56
|
|
|
57
|
-
if (tpl === null) tpl = Event.Trigger("OnEmailTemplate", "event", "system", data, lang);
|
|
57
|
+
if (tpl === null) tpl = await Event.Trigger("OnEmailTemplate", "event", "system", data, lang);
|
|
58
58
|
let html = tpl;
|
|
59
59
|
try {
|
|
60
60
|
html = juice(tpl);
|