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.
@@ -1,7 +1,7 @@
1
1
  .model-creator {
2
2
  flex: 1;
3
3
  width: 100%;
4
- max-width: 720px;
4
+ max-width: 1024px;
5
5
  form {
6
6
  padding: 0;
7
7
  @media only screen and (min-width: 480px){
@@ -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.0",
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",
@@ -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';