data-primals-engine 1.6.0 → 1.6.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 +21 -7
- package/client/src/DataTable.jsx +1 -1
- package/client/src/ModelCreator.jsx +683 -686
- package/client/src/ModelCreator.scss +1 -1
- package/client/src/ModelImporter.jsx +3 -0
- package/package.json +1 -1
- package/src/defaultModels.js +7 -0
- package/src/index.js +1 -0
- package/src/modules/data/data.operations.js +3484 -3401
- package/src/modules/user.js +14 -9
- package/test/data.integration.test.js +75 -0
- package/test/user.test.js +106 -1
|
@@ -94,6 +94,9 @@ const ModelImporterItem = ({ model, onUnselect, onSelect, selected }) => {
|
|
|
94
94
|
useEffect(() => {
|
|
95
95
|
setSelected(selected);
|
|
96
96
|
}, [selected]);
|
|
97
|
+
|
|
98
|
+
if( !model )
|
|
99
|
+
return;
|
|
97
100
|
const deps = [...new Set((model.fields || []).filter(f=> f.type === 'relation' && f.relation !== model?.name).map(f=> t(`model_${f.relation}`, f.relation)))];
|
|
98
101
|
return <div className={`model-importer-item ${selected ? 'active' : ''}`} onClick={() => {
|
|
99
102
|
setSelected(!selected);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "data-primals-engine",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.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",
|
package/src/defaultModels.js
CHANGED
|
@@ -84,6 +84,13 @@ export const defaultModels = {
|
|
|
84
84
|
"required": false,
|
|
85
85
|
"index": true,
|
|
86
86
|
"hint": "Si défini, l'exception (l'octroi ou la révocation) est temporaire."
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "env",
|
|
90
|
+
"type": "relation",
|
|
91
|
+
"relation": "env",
|
|
92
|
+
"required": false,
|
|
93
|
+
"hint": "Si défini, la permission ne s'applique qu'à cet environnement. Sinon, elle est globale."
|
|
87
94
|
}
|
|
88
95
|
]
|
|
89
96
|
},
|
package/src/index.js
CHANGED
|
@@ -7,6 +7,7 @@ export { Config } from './config.js';
|
|
|
7
7
|
export { event_on, event_trigger, event_off } from './core.js';
|
|
8
8
|
export { Event } from './events.js';
|
|
9
9
|
|
|
10
|
+
export { hasPermission, middlewareAuthenticator, getEnv, getSmtpConfig } from "./modules/user.js"
|
|
10
11
|
export { sendSseToUser } from './modules/data/data.routes.js';
|
|
11
12
|
|
|
12
13
|
export { UserProvider } from './providers.js';
|