data-primals-engine 1.0.11 → 1.1.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.
- package/client/README.md +8 -0
- package/client/index.html +31 -0
- package/client/index.js +25 -0
- package/client/package-lock.json +11664 -0
- package/client/package.json +70 -0
- package/client/public/demo/26899917-d1ba-4df4-bb33-48d09a8778da.jpg +0 -0
- package/client/public/demo/4b9894c7-12cd-466d-8fd3-a2757b09ec96.jpg +0 -0
- package/client/public/demo/7ed369ac-a1a2-4b45-b0cd-4fd5bcf5a75a.jpg +0 -0
- package/client/public/doc/API.postman_collection.json +214 -0
- package/client/public/github.svg +1 -0
- package/client/public/profilCompany.jpg +0 -0
- package/client/public/profilDeveloper.jpg +0 -0
- package/client/public/profilEngineer.jpg +0 -0
- package/client/public/profilPersonal.jpg +0 -0
- package/client/public/profils .psd +0 -0
- package/client/public/react.svg +9 -0
- package/client/src/APIInfo.jsx +328 -0
- package/client/src/AddWidgetTypeModal.jsx +44 -0
- package/client/src/AddWidgetTypeModal.scss +87 -0
- package/client/src/App.css +42 -0
- package/client/src/App.jsx +586 -0
- package/client/src/App.scss +1466 -0
- package/client/src/AssistantChat.jsx +280 -0
- package/client/src/AssistantChat.scss +229 -0
- package/client/src/Button.jsx +12 -0
- package/client/src/Button.scss +197 -0
- package/client/src/CalculationBuilder.jsx +338 -0
- package/client/src/CalculationStepRow.jsx +199 -0
- package/client/src/CalendarConfigModal.jsx +49 -0
- package/client/src/ChartConfigModal.jsx +402 -0
- package/client/src/ConditionBuilder.jsx +622 -0
- package/client/src/ConditionBuilder.scss +672 -0
- package/client/src/ConditionBuilder2.jsx +757 -0
- package/client/src/ContentView.jsx +274 -0
- package/client/src/CronBuilder.jsx +126 -0
- package/client/src/CronBuilder.scss +128 -0
- package/client/src/CronPartBuilder.jsx +150 -0
- package/client/src/Dashboard.jsx +210 -0
- package/client/src/Dashboard.scss +445 -0
- package/client/src/DashboardChart.jsx +362 -0
- package/client/src/DashboardFlexViewItem.jsx +129 -0
- package/client/src/DashboardView.jsx +554 -0
- package/client/src/DataChart.jsx +349 -0
- package/client/src/DataEditor.jsx +556 -0
- package/client/src/DataLayout.jsx +709 -0
- package/client/src/DataTable.jsx +996 -0
- package/client/src/DataTable.scss +73 -0
- package/client/src/Dialog.jsx +90 -0
- package/client/src/Dialog.scss +117 -0
- package/client/src/DisplayFlexNodeRenderer.jsx +115 -0
- package/client/src/DocumentationPageLayout.jsx +93 -0
- package/client/src/DocumentationPageLayout.scss +262 -0
- package/client/src/Draggable.jsx +222 -0
- package/client/src/Draggable.scss +49 -0
- package/client/src/ExportDialog.jsx +172 -0
- package/client/src/Field.jsx +1558 -0
- package/client/src/FlexBuilder.jsx +269 -0
- package/client/src/FlexBuilder.scss +226 -0
- package/client/src/FlexBuilderControls.jsx +170 -0
- package/client/src/FlexBuilderModal.jsx +75 -0
- package/client/src/FlexBuilderModal.scss +109 -0
- package/client/src/FlexBuilderPreview.jsx +48 -0
- package/client/src/FlexBuilderUtils.js +84 -0
- package/client/src/FlexDataRenderer.jsx +170 -0
- package/client/src/FlexDataRenderer.scss +80 -0
- package/client/src/FlexNode.jsx +290 -0
- package/client/src/FlexTreeUtils.js +129 -0
- package/client/src/HiddenableCell.jsx +46 -0
- package/client/src/HiddenableCell.scss +36 -0
- package/client/src/KPIDialog.jsx +39 -0
- package/client/src/KPIWidget.jsx +139 -0
- package/client/src/KanbanCard.jsx +92 -0
- package/client/src/KanbanColumn.jsx +29 -0
- package/client/src/KanbanConfigModal.jsx +115 -0
- package/client/src/KanbanView.jsx +113 -0
- package/client/src/KanbanView.scss +107 -0
- package/client/src/MessageRotator.jsx +77 -0
- package/client/src/MessageRotator.scss +14 -0
- package/client/src/ModelCreator.jsx +640 -0
- package/client/src/ModelCreator.scss +154 -0
- package/client/src/ModelCreatorField.jsx +810 -0
- package/client/src/ModelImporter.jsx +120 -0
- package/client/src/ModelList.jsx +205 -0
- package/client/src/Notification.jsx +137 -0
- package/client/src/Notification.scss +126 -0
- package/client/src/NotificationProvider.jsx +73 -0
- package/client/src/PackGallery.jsx +211 -0
- package/client/src/PackGallery.scss +156 -0
- package/client/src/Pagination.jsx +141 -0
- package/client/src/RTE.jsx +415 -0
- package/client/src/RTETrans.jsx +103 -0
- package/client/src/RelationField.jsx +247 -0
- package/client/src/RelationValue.jsx +230 -0
- package/client/src/RestoreConfirmationModal.jsx +183 -0
- package/client/src/RestoreDialog.jsx +134 -0
- package/client/src/RestoreDialog.scss +67 -0
- package/client/src/RichTextEditorModal.jsx +34 -0
- package/client/src/RichTextEditorModal.scss +54 -0
- package/client/src/TourSpotlight.jsx +234 -0
- package/client/src/TourSpotlight.scss +100 -0
- package/client/src/TutorialsMenu.jsx +83 -0
- package/client/src/TutorialsMenu.scss +217 -0
- package/client/src/TutorialsRewardModal.jsx +65 -0
- package/client/src/Utils.jsx +78 -0
- package/client/src/ViewSwitcher.jsx +54 -0
- package/client/src/ViewSwitcher.scss +74 -0
- package/client/src/Webpage.jsx +69 -0
- package/client/src/_variables.scss +21 -0
- package/client/src/assets/react.svg +1 -0
- package/client/src/constants.js +68 -0
- package/client/src/contexts/AuthContext.jsx +28 -0
- package/client/src/contexts/ModelContext.jsx +328 -0
- package/client/src/contexts/UIContext.jsx +52 -0
- package/client/src/core/data.js +35 -0
- package/client/src/entry-client.jsx +15 -0
- package/client/src/entry-server.jsx +13 -0
- package/client/src/filter.js +222 -0
- package/client/src/hooks/data.js +101 -0
- package/client/src/hooks/useDebounce.js +20 -0
- package/client/src/hooks/useDragAndDrop.js +59 -0
- package/client/src/hooks/useLocalStorage.js +100 -0
- package/client/src/hooks/useMount.js +42 -0
- package/client/src/hooks/useTutorials.jsx +227 -0
- package/client/src/hooks/useWindowSize.js +24 -0
- package/client/src/i18n.js +47 -0
- package/client/src/index.css +90 -0
- package/client/src/index.js +10 -0
- package/client/src/main.jsx +11 -0
- package/client/src/translations.js +15940 -0
- package/client/src/tutorials.js +112 -0
- package/client/vite.config.js +30 -0
- package/eslint.config.js +50 -0
- package/package.json +48 -27
- package/server.js +9 -0
- package/src/constants.js +12 -23
- package/src/core.js +9 -8
- package/src/data.js +81 -80
- package/src/defaultModels.js +114 -115
- package/src/email.js +8 -9
- package/src/engine.js +5 -5
- package/src/events.js +1 -2
- package/src/i18n.js +212 -211
- package/src/middlewares/middleware-mongodb.js +94 -93
- package/src/migrate.js +24 -24
- package/src/modules/assistant.js +55 -55
- package/src/modules/bucket.js +10 -9
- package/src/modules/data.js +387 -357
- package/src/modules/file.js +3 -6
- package/src/modules/mongodb.js +6 -7
- package/src/modules/user.js +24 -47
- package/src/modules/workflow.js +68 -67
- package/src/openai.jobs.js +2 -2
- package/src/packs.js +30 -31
- package/src/providers.js +101 -3
- package/src/setenv.js +1 -1
- package/src/user.js +0 -17
- package/src/workers/crypto-worker.js +21 -20
- package/src/workers/import-export-worker.js +18 -18
- package/test/data.backup.integration.test.js +7 -12
- package/test/data.integration.test.js +27 -25
- package/test/globalSetup.js +2 -2
- package/test/import_export.integration.test.js +6 -6
- package/test/model.integration.test.js +21 -22
- package/test/workflow.integration.test.js +2 -5
- package/test/workflow.robustness.test.js +6 -13
- package/vitest.config.js +2 -2
package/src/email.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { translations } from "data-primals-engine/i18n";
|
|
2
1
|
import process from "node:process";
|
|
3
2
|
import nodemailer from "nodemailer";
|
|
4
3
|
import juice from "juice";
|
|
@@ -12,8 +11,8 @@ const defaultTransporter = nodemailer.createTransport({
|
|
|
12
11
|
secure: false,
|
|
13
12
|
auth: {
|
|
14
13
|
user: process.env.MAIL_USER,
|
|
15
|
-
pass: process.env.MAIL_PASS
|
|
16
|
-
}
|
|
14
|
+
pass: process.env.MAIL_PASS
|
|
15
|
+
}
|
|
17
16
|
});
|
|
18
17
|
|
|
19
18
|
/**
|
|
@@ -31,8 +30,8 @@ const createTransporter = (smtpConfig) => {
|
|
|
31
30
|
secure: smtpConfig.secure === true, // Par défaut à false si non défini
|
|
32
31
|
auth: {
|
|
33
32
|
user: smtpConfig.user,
|
|
34
|
-
pass: smtpConfig.pass
|
|
35
|
-
}
|
|
33
|
+
pass: smtpConfig.pass
|
|
34
|
+
}
|
|
36
35
|
});
|
|
37
36
|
};
|
|
38
37
|
|
|
@@ -67,7 +66,7 @@ export const sendEmail = async (email = "", data, smtpConfig = null, lang, tpl =
|
|
|
67
66
|
from: contactEmail,
|
|
68
67
|
to: e,
|
|
69
68
|
subject: data.title,
|
|
70
|
-
html
|
|
69
|
+
html
|
|
71
70
|
};
|
|
72
71
|
return transporter.sendMail(mailOptions);
|
|
73
72
|
});
|
|
@@ -108,8 +107,8 @@ export const ebutton = (content = "", attrs = {}, style = {}) => {
|
|
|
108
107
|
estyle(style) +
|
|
109
108
|
'">' +
|
|
110
109
|
content +
|
|
111
|
-
"</a>"
|
|
112
|
-
)
|
|
110
|
+
"</a>"
|
|
111
|
+
)
|
|
113
112
|
);
|
|
114
113
|
};
|
|
115
114
|
|
|
@@ -138,7 +137,7 @@ export const erow = (content = "", style = {}) => {
|
|
|
138
137
|
estyle(style) +
|
|
139
138
|
'" valign="top">' +
|
|
140
139
|
c +
|
|
141
|
-
"</td>"
|
|
140
|
+
"</td>"
|
|
142
141
|
)
|
|
143
142
|
.join("") +
|
|
144
143
|
"</tr>"
|
package/src/engine.js
CHANGED
|
@@ -45,7 +45,7 @@ export const Engine = {
|
|
|
45
45
|
app.use(formidableMiddleware({
|
|
46
46
|
encoding: 'utf-8',
|
|
47
47
|
uploadDir: process.cwd()+'/uploads/tmp',
|
|
48
|
-
multiples: true
|
|
48
|
+
multiples: true // req.files to be arrays of files
|
|
49
49
|
}));
|
|
50
50
|
app.use(cookieParser(process.env.COOKIES_SECRET || cookiesSecret));
|
|
51
51
|
app.use(requestIp.mw())
|
|
@@ -95,7 +95,7 @@ export const Engine = {
|
|
|
95
95
|
return await importModule('./modules/' + module + ".js");
|
|
96
96
|
}
|
|
97
97
|
} catch (e){
|
|
98
|
-
console.log('ERROR at loading module '+ module + ' in /modules dir.'
|
|
98
|
+
console.log('ERROR at loading module '+ module + ' in /modules dir.', e.stack);
|
|
99
99
|
}
|
|
100
100
|
})).then(async e => {
|
|
101
101
|
engine._modules = e;
|
|
@@ -103,7 +103,7 @@ export const Engine = {
|
|
|
103
103
|
});
|
|
104
104
|
let server;
|
|
105
105
|
engine.start = async (port, cb) =>{
|
|
106
|
-
|
|
106
|
+
// Use connect method to connect to the server
|
|
107
107
|
|
|
108
108
|
// Start http server
|
|
109
109
|
server = http.createServer(app);
|
|
@@ -153,14 +153,14 @@ export const Engine = {
|
|
|
153
153
|
dbModels.push({...model, _id: r.insertedId });
|
|
154
154
|
logger.info('Model inserted (' + model.name + ')');
|
|
155
155
|
}else
|
|
156
|
-
|
|
156
|
+
logger.info('Model loaded (' + model.name + ')');
|
|
157
157
|
}
|
|
158
158
|
logger.info("All models loaded.");
|
|
159
159
|
}
|
|
160
160
|
engine.resetModels = async () => {
|
|
161
161
|
await deleteModels();
|
|
162
162
|
};
|
|
163
|
-
|
|
163
|
+
return engine;
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
|