data-primals-engine 1.5.0 → 1.5.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/README.md +35 -0
- package/client/src/AddWidgetTypeModal.jsx +47 -43
- package/client/src/App.jsx +2 -6
- package/client/src/App.scss +12 -0
- package/client/src/AssistantChat.jsx +363 -323
- package/client/src/AssistantChat.scss +27 -10
- package/client/src/Dashboard.jsx +480 -396
- package/client/src/Dashboard.scss +1 -1
- package/client/src/DashboardHtmlViewItem.jsx +147 -0
- package/client/src/DashboardView.jsx +654 -569
- package/client/src/DataEditor.jsx +10 -3
- package/client/src/DataLayout.jsx +805 -755
- package/client/src/DataLayout.scss +14 -0
- package/client/src/DataTable.jsx +39 -75
- package/client/src/Dialog.scss +1 -1
- package/client/src/Field.jsx +2057 -1825
- package/client/src/FlexViewCard.jsx +44 -0
- package/client/src/HistoryDialog.jsx +47 -14
- package/client/src/HtmlViewBuilderModal.jsx +91 -0
- package/client/src/HtmlViewBuilderModal.scss +18 -0
- package/client/src/HtmlViewCard.jsx +44 -0
- package/client/src/HtmlViewCard.scss +35 -0
- package/client/src/KanbanCard.jsx +1 -2
- package/client/src/ModelCreator.jsx +5 -4
- package/client/src/ModelCreatorField.jsx +51 -4
- package/client/src/ModelList.jsx +92 -53
- package/client/src/Notification.jsx +136 -136
- package/client/src/Notification.scss +0 -18
- package/client/src/Pagination.jsx +5 -3
- package/client/src/RelationField.jsx +354 -258
- package/client/src/RelationSelectorWidget.jsx +173 -0
- package/client/src/contexts/ModelContext.jsx +10 -1
- package/client/src/contexts/UIContext.jsx +72 -63
- package/client/src/filter.js +262 -212
- package/client/src/hooks/useValidation.js +75 -0
- package/client/src/translations.js +24 -24
- package/package.json +2 -1
- package/src/constants.js +1 -1
- package/src/defaultModels.js +1596 -1544
- package/src/i18n.js +710 -10
- package/src/modules/assistant/assistant.js +148 -18
- package/src/modules/bucket.js +2 -1
- package/src/modules/data/data.core.js +118 -92
- package/src/modules/data/data.history.js +531 -492
- package/src/modules/data/data.js +3 -53
- package/src/modules/data/data.operations.js +77 -26
- package/src/modules/data/data.relations.js +686 -686
- package/src/modules/data/data.routes.js +1879 -1821
- package/src/modules/data/data.validation.js +81 -2
- package/src/modules/file.js +247 -238
- package/src/packs.js +5482 -5478
- package/test/data.integration.test.js +1115 -1060
|
@@ -461,8 +461,8 @@ export const websiteTranslations = {
|
|
|
461
461
|
"email.backup.restoreRequest.content": `<p>Vous avez demandé une restauration de sauvegarde. Veuillez choisir une option :</p>
|
|
462
462
|
<p><strong>ATTENTION : Toute restauration écrasera vos données actuelles (modèles et/ou données).</strong></p>
|
|
463
463
|
<ul>
|
|
464
|
-
<li><a href="https://
|
|
465
|
-
<li><a href="https://
|
|
464
|
+
<li><a href="https://{{host}}/backup/restore?token={{modelsToken}}&username={{user}}&type=full">Restauration Complète (Modèles ET Données)</a></li>
|
|
465
|
+
<li><a href="https://{{host}}/backup/restore?token={{modelsToken}}&username={{user}}&type=models">Restaurer UNIQUEMENT les Modèles</a></li>
|
|
466
466
|
</ul>
|
|
467
467
|
<p>Ces liens expireront dans 30 minutes.</p>`,
|
|
468
468
|
"btns.confirm": "Confirmer",
|
|
@@ -1574,8 +1574,8 @@ export const websiteTranslations = {
|
|
|
1574
1574
|
"email.backup.restoreRequest.content": `<p>You have requested a backup restoration. Please choose an option:</p>
|
|
1575
1575
|
<p><strong>WARNING: Any restoration will overwrite your current data (models and/or data).</strong></p>
|
|
1576
1576
|
<ul>
|
|
1577
|
-
<li><a href="https://
|
|
1578
|
-
<li><a href="https://
|
|
1577
|
+
<li><a href="https://{{host}}/backup/restore?token={{fullToken}}&username={{user}}&type=full">Full Restoration (Models AND Data)</a></li>
|
|
1578
|
+
<li><a href="https://{{host}}/backup/restore?token={{modelsToken}}&username={{user}}&type=models">Restore ONLY the Models</a></li>
|
|
1579
1579
|
</ul>
|
|
1580
1580
|
<p>These links will expire in 30 minutes.</p>`,
|
|
1581
1581
|
"btns.confirm": "Confirm",
|
|
@@ -3050,8 +3050,8 @@ export const websiteTranslations = {
|
|
|
3050
3050
|
"email.backup.restoreRequest.content": `<p>Has solicitado una restauración de copia de seguridad. Por favor, elige una opción:</p>
|
|
3051
3051
|
<p><strong>ADVERTENCIA: Cualquier restauración sobrescribirá tus datos actuales (modelos y/o datos).</strong></p>
|
|
3052
3052
|
<ul>
|
|
3053
|
-
<li><a href="https://
|
|
3054
|
-
<li><a href="https://
|
|
3053
|
+
<li><a href="https://{{host}}/backup/restore?token={{fullToken}}&username={{user}}&type=full">Restauración completa (Modelos Y Datos)</a></li>
|
|
3054
|
+
<li><a href="https://{{host}}/backup/restore?token={{modelsToken}}&username={{user}}&type=models">Restaurar SOLO los Modelos</a></li>
|
|
3055
3055
|
</ul>
|
|
3056
3056
|
<p>Estos enlaces expirarán en 30 minutos.</p>`,
|
|
3057
3057
|
"modelimporter.requires": "Requiere:",
|
|
@@ -4532,8 +4532,8 @@ export const websiteTranslations = {
|
|
|
4532
4532
|
"email.backup.restoreRequest.content": `<p>Solicitou a restauração de uma cópia de segurança. Por favor, escolha uma opção:</p>
|
|
4533
4533
|
<p><strong>ATENÇÃO: Qualquer restauração irá substituir os seus dados atuais (modelos e/ou dados).</strong></p>
|
|
4534
4534
|
<ul>
|
|
4535
|
-
<li><a href="https://
|
|
4536
|
-
<li><a href="https://
|
|
4535
|
+
<li><a href="https://{{host}}/backup/restore?token={{fullToken}}&username={{user}}&type=full">Restauração Completa (Modelos E Dados)</a></li>
|
|
4536
|
+
<li><a href="https://{{host}}/backup/restore?token={{modelsToken}}&username={{user}}&type=models">Restaurar APENAS os Modelos</a></li>
|
|
4537
4537
|
</ul>
|
|
4538
4538
|
<p>Estes links expiram em 30 minutos.</p>`,
|
|
4539
4539
|
"modelimporter.requires": "Requer:",
|
|
@@ -5988,8 +5988,8 @@ export const websiteTranslations = {
|
|
|
5988
5988
|
"email.backup.restoreRequest.content": `<p>Sie haben die Wiederherstellung eines Backups angefordert. Bitte wählen Sie eine Option:</p>
|
|
5989
5989
|
<p><strong>ACHTUNG: Jede Wiederherstellung überschreibt Ihre aktuellen Daten (Modelle und/oder Daten).</strong></p>
|
|
5990
5990
|
<ul>
|
|
5991
|
-
<li><a href="https://
|
|
5992
|
-
<li><a href="https://
|
|
5991
|
+
<li><a href="https://{{host}}/backup/restore?token={{fullToken}}&username={{user}}&type=full">Vollständige Wiederherstellung (Modelle UND Daten)</a></li>
|
|
5992
|
+
<li><a href="https://{{host}}/backup/restore?token={{modelsToken}}&username={{user}}&type=models">NUR Modelle wiederherstellen</a></li>
|
|
5993
5993
|
</ul>
|
|
5994
5994
|
<p>Diese Links laufen in 30 Minuten ab.</p>`,
|
|
5995
5995
|
"modelimporter.requires": "Erfordert:",
|
|
@@ -7467,8 +7467,8 @@ export const websiteTranslations = {
|
|
|
7467
7467
|
"email.backup.restoreRequest.content": `<p>Hai richiesto il ripristino di un backup. Scegli un'opzione:</p>
|
|
7468
7468
|
<p><strong>ATTENZIONE: Qualsiasi ripristino sovrascriverà i tuoi dati attuali (modelli e/o dati).</strong></p>
|
|
7469
7469
|
<ul>
|
|
7470
|
-
<li><a href="https://
|
|
7471
|
-
<li><a href="https://
|
|
7470
|
+
<li><a href="https://{{host}}/backup/restore?token={{fullToken}}&username={{user}}&type=full">Ripristino Completo (Modelli E Dati)</a></li>
|
|
7471
|
+
<li><a href="https://{{host}}/backup/restore?token={{modelsToken}}&username={{user}}&type=models">Ripristina SOLO i Modelli</a></li>
|
|
7472
7472
|
</ul>
|
|
7473
7473
|
<p>Questi link scadranno tra 30 minuti.</p>`,
|
|
7474
7474
|
"modelimporter.requires": "Richiede:",
|
|
@@ -8941,8 +8941,8 @@ export const websiteTranslations = {
|
|
|
8941
8941
|
"email.backup.restoreRequest.content": `<p>Požádali jste o obnovení ze zálohy. Vyberte prosím možnost:</p>
|
|
8942
8942
|
<p><strong>VAROVÁNÍ: Jakákoli obnova přepíše vaše aktuální data (modely a/nebo data).</strong></p>
|
|
8943
8943
|
<ul>
|
|
8944
|
-
<li><a href="https://
|
|
8945
|
-
<li><a href="https://
|
|
8944
|
+
<li><a href="https://{{host}}/backup/restore?token={{fullToken}}&username={{user}}&type=full">Kompletní obnova (Modely I Data)</a></li>
|
|
8945
|
+
<li><a href="https://{{host}}/backup/restore?token={{modelsToken}}&username={{user}}&type=models">Obnovit POUZE Modely</a></li>
|
|
8946
8946
|
</ul>
|
|
8947
8947
|
<p>Tyto odkazy expirují za 30 minut.</p>`,
|
|
8948
8948
|
"modelimporter.requires": "Vyžaduje:",
|
|
@@ -10413,8 +10413,8 @@ export const websiteTranslations = {
|
|
|
10413
10413
|
"email.backup.restoreRequest.content": `<p>Вы запросили восстановление из резервной копии. Пожалуйста, выберите вариант:</p>
|
|
10414
10414
|
<p><strong>ВНИМАНИЕ: Любое восстановление перезапишет ваши текущие данные (модели и/или данные).</strong></p>
|
|
10415
10415
|
<ul>
|
|
10416
|
-
<li><a href="https://
|
|
10417
|
-
<li><a href="https://
|
|
10416
|
+
<li><a href="https://{{host}}/backup/restore?token={{fullToken}}&username={{user}}&type=full">Полное восстановление (Модели И Данные)</a></li>
|
|
10417
|
+
<li><a href="https://{{host}}/backup/restore?token={{modelsToken}}&username={{user}}&type=models">Восстановить ТОЛЬКО Модели</a></li>
|
|
10418
10418
|
</ul>
|
|
10419
10419
|
<p>Эти ссылки истекают через 30 минут.</p>`,
|
|
10420
10420
|
"modelimporter.requires": "Требуется:",
|
|
@@ -11904,8 +11904,8 @@ export const websiteTranslations = {
|
|
|
11904
11904
|
"email.backup.restoreRequest.content": `<p>لقد طلبت استعادة نسخة احتياطية. يرجى اختيار خيار:</p>
|
|
11905
11905
|
<p><strong>تحذير: أي عملية استعادة ستستبدل بياناتك الحالية (النماذج و/أو البيانات).</strong></p>
|
|
11906
11906
|
<ul>
|
|
11907
|
-
<li><a href="https://
|
|
11908
|
-
<li><a href="https://
|
|
11907
|
+
<li><a href="https://{{host}}/backup/restore?token={{fullToken}}&username={{user}}&type=full">استعادة كاملة (النماذج والبيانات)</a></li>
|
|
11908
|
+
<li><a href="https://{{host}}/backup/restore?token={{modelsToken}}&username={{user}}&type=models">استعادة النماذج فقط</a></li>
|
|
11909
11909
|
</ul>
|
|
11910
11910
|
<p>ستنتهي صلاحية هذه الروابط بعد 30 دقيقة.</p>`,
|
|
11911
11911
|
"modelimporter.requires": "يتطلب:",
|
|
@@ -13384,8 +13384,8 @@ export const websiteTranslations = {
|
|
|
13384
13384
|
"email.backup.restoreRequest.content": `<p>Du har begärt en återställning från backup. Vänligen välj ett alternativ:</p>
|
|
13385
13385
|
<p><strong>OBS: All återställning kommer att skriva över din nuvarande data (modeller och/eller data).</strong></p>
|
|
13386
13386
|
<ul>
|
|
13387
|
-
<li><a href="https://
|
|
13388
|
-
<li><a href="https://
|
|
13387
|
+
<li><a href="https://{{host}}/backup/restore?token={{fullToken}}&username={{user}}&type=full">Fullständig återställning (Modeller OCH Data)</a></li>
|
|
13388
|
+
<li><a href="https://{{host}}/backup/restore?token={{modelsToken}}&username={{user}}&type=models">Återställ ENDAST Modeller</a></li>
|
|
13389
13389
|
</ul>
|
|
13390
13390
|
<p>Dessa länkar upphör att gälla om 30 minuter.</p>`,
|
|
13391
13391
|
"modelimporter.requires": "Kräver:",
|
|
@@ -14858,8 +14858,8 @@ export const websiteTranslations = {
|
|
|
14858
14858
|
"email.backup.restoreRequest.content": `<p>Έχετε αιτηθεί επαναφορά από αντίγραφο ασφαλείας. Παρακαλώ επιλέξτε μια επιλογή:</p>
|
|
14859
14859
|
<p><strong>ΠΡΟΣΟΧΗ: Οποιαδήποτε επαναφορά θα αντικαταστήσει τα τρέχοντα δεδομένα σας (μοντέλα και/ή δεδομένα).</strong></p>
|
|
14860
14860
|
<ul>
|
|
14861
|
-
<li><a href="https://
|
|
14862
|
-
<li><a href="https://
|
|
14861
|
+
<li><a href="https://{{host}}/backup/restore?token={{fullToken}}&username={{user}}&type=full">Πλήρης Επαναφορά (Μοντέλα ΚΑΙ Δεδομένα)</a></li>
|
|
14862
|
+
<li><a href="https://{{host}}/backup/restore?token={{modelsToken}}&username={{user}}&type=models">Επαναφορά ΜΟΝΟ Μοντέλων</a></li>
|
|
14863
14863
|
</ul>
|
|
14864
14864
|
<p>Οι σύνδεσμοι θα λήξουν σε 30 λεπτά.</p>`,
|
|
14865
14865
|
"modelimporter.requires": "Απαιτείται:",
|
|
@@ -16287,8 +16287,8 @@ export const websiteTranslations = {
|
|
|
16287
16287
|
"email.backup.restoreRequest.content": `<p>درخواست بازیابی نسخه پشتیبان را دادهاید. لطفاً یک گزینه انتخاب کنید:</p>
|
|
16288
16288
|
<p><strong>هشدار: هرگونه بازیابی، دادههای فعلی شما (مدلها و/یا دادهها) را بازنویسی خواهد کرد.</strong></p>
|
|
16289
16289
|
<ul>
|
|
16290
|
-
<li><a href="https://
|
|
16291
|
-
<li><a href="https://
|
|
16290
|
+
<li><a href="https://{{host}}/backup/restore?token={{fullToken}}&username={{user}}&type=full">بازیابی کامل (هم مدلها و هم دادهها)</a></li>
|
|
16291
|
+
<li><a href="https://{{host}}/backup/restore?token={{modelsToken}}&username={{user}}&type=models">فقط بازیابی مدلها</a></li>
|
|
16292
16292
|
</ul>
|
|
16293
16293
|
<p>این لینکها پس از 30 دقیقه منقضی خواهند شد.</p>`,
|
|
16294
16294
|
"btns.confirm": "تأیید",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "data-primals-engine",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.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",
|
|
@@ -78,6 +78,7 @@
|
|
|
78
78
|
"express-mongo-sanitize": "^2.2.0",
|
|
79
79
|
"express-rate-limit": "^8.0.1",
|
|
80
80
|
"express-session": "^1.18.2",
|
|
81
|
+
"handlebars": "^4.7.8",
|
|
81
82
|
"i18next-browser-languagedetector": "^8.2.0",
|
|
82
83
|
"isolated-vm": "^4.7.2",
|
|
83
84
|
"juice": "^11.0.1",
|
package/src/constants.js
CHANGED
|
@@ -256,7 +256,7 @@ export const optionsSanitizer = {
|
|
|
256
256
|
export const metaModels = {};
|
|
257
257
|
metaModels['common'] = { load: ['contact', 'location', 'request'] };
|
|
258
258
|
metaModels['personal'] = { load: ['budget', 'imageGallery'] };
|
|
259
|
-
metaModels['users'] = { load: ['permission', 'role', 'user', 'token'], 'require': ['i18n', 'common'] };
|
|
259
|
+
metaModels['users'] = { load: ['permission', 'role', 'user', 'userPermission', 'token'], 'require': ['i18n', 'common'] };
|
|
260
260
|
metaModels['i18n'] = { load: ['translation','lang']};
|
|
261
261
|
metaModels['website'] = { load: ['webpage', 'content', 'taxonomy', 'contact', 'event', 'resource'], 'require': ['i18n'] };
|
|
262
262
|
metaModels['messaging'] = { load: ['alert','ticket', 'message', 'channel'], 'require': ['i18n'] };
|