data-primals-engine 1.1.4 → 1.1.6
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/.github/workflows/node.js.yml +3 -1
- package/README.md +9 -1
- package/client/package-lock.json +11580 -11664
- package/client/package.json +1 -2
- package/client/src/App.jsx +13 -8
- package/client/src/ConditionBuilder.scss +24 -0
- package/client/src/ConditionBuilder2.jsx +56 -0
- package/client/src/DataEditor.jsx +4 -2
- package/client/src/DataLayout.jsx +20 -11
- package/client/src/DataTable.jsx +77 -10
- package/client/src/Dialog.scss +1 -0
- package/client/src/Field.jsx +3 -4
- package/client/src/FlexBuilder.jsx +3 -1
- package/client/src/TourSpotlight.jsx +14 -10
- package/client/src/TutorialsMenu.scss +0 -1
- package/client/src/constants.js +1 -1
- package/client/src/contexts/ModelContext.jsx +3 -8
- package/client/src/core/dom.js +26 -0
- package/client/src/filter.js +40 -1
- package/package.json +4 -5
- package/server.js +3 -2
- package/src/constants.js +15 -1
- package/src/core.js +52 -3
- package/src/engine.js +42 -16
- package/src/i18n.js +75 -2
- package/src/migrate.js +2 -3
- package/src/modules/data.js +15 -4
- package/src/modules/mongodb.js +0 -9
- package/src/packs.js +4 -3
- package/src/migrations/20240522143000-content.js +0 -20
package/README.md
CHANGED
|
@@ -58,6 +58,10 @@ MONGO_DB_URL=mongodb://127.0.0.1:27017
|
|
|
58
58
|
| SMTP_PORT | SMTP server port. | 587 |
|
|
59
59
|
| SMTP_USER | Username for SMTP authentication. | user@example.com |
|
|
60
60
|
| SMTP_PASS | Password for SMTP authentication. | password |
|
|
61
|
+
| TLS | Encrypted connection (TLS) mode. Disabled by default | 0/1 false/true |
|
|
62
|
+
| CERT | Path to cert file. | certs/ca.crt |
|
|
63
|
+
| CA_CERT | Path to CA cert file. | certs/cert.pem |
|
|
64
|
+
| CERT_KEY | Path to the key file for your certificate. | certs/key.pem |
|
|
61
65
|
|
|
62
66
|
Start the server:
|
|
63
67
|
```bash
|
|
@@ -107,6 +111,7 @@ Define schemas using JSON:
|
|
|
107
111
|
| array | Stores a list of values. | itemsType: 'enum' // any type except relations |
|
|
108
112
|
| object | Stores a nested JSON object. – | |
|
|
109
113
|
| code | Stores language="*" as string, stores language="json" as arbitrary JSON structure. | language="json" conditionBuilder=true |
|
|
114
|
+
| color | Stores an hexadecimal value of an RGB color | '#FF0000' |
|
|
110
115
|
| model | Stores a model by name | – |
|
|
111
116
|
| modelField | Stores a model field path | – |
|
|
112
117
|
|
|
@@ -234,11 +239,14 @@ curl -X DELETE http://localhost:7633/api/data?_user=demo \
|
|
|
234
239
|
|
|
235
240
|
Make sure you use the code below to initialize the user :
|
|
236
241
|
```javascript
|
|
242
|
+
import express from "express";
|
|
237
243
|
import { Engine } from 'data-primals-engine/engine';
|
|
238
244
|
import { insertData, searchData } from 'data-primals-engine/modules/data';
|
|
239
245
|
|
|
240
246
|
// Ensure the engine is initialized
|
|
241
|
-
|
|
247
|
+
|
|
248
|
+
const app = express();
|
|
249
|
+
const engine = await Engine.Create({ app });
|
|
242
250
|
const currentUser = await engine.userProvider.findUserByUsername('demo');
|
|
243
251
|
if (!currentUser) {
|
|
244
252
|
throw new Error("Could not retrieve the user. Please check credentials or user provider.");
|