data-primals-engine 1.1.4 → 1.1.5
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 +5 -1
- package/client/package-lock.json +11580 -11664
- package/client/package.json +1 -2
- package/client/src/App.jsx +9 -4
- package/client/src/ConditionBuilder.scss +24 -0
- package/client/src/ConditionBuilder2.jsx +56 -0
- package/client/src/DataEditor.jsx +1 -1
- package/client/src/DataLayout.jsx +20 -11
- package/client/src/DataTable.jsx +77 -10
- package/client/src/Dialog.scss +1 -0
- 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 +2 -0
- package/src/engine.js +18 -13
- package/src/i18n.js +75 -2
- package/src/modules/data.js +13 -2
- package/src/packs.js +4 -3
package/README.md
CHANGED
|
@@ -107,6 +107,7 @@ Define schemas using JSON:
|
|
|
107
107
|
| array | Stores a list of values. | itemsType: 'enum' // any type except relations |
|
|
108
108
|
| object | Stores a nested JSON object. – | |
|
|
109
109
|
| code | Stores language="*" as string, stores language="json" as arbitrary JSON structure. | language="json" conditionBuilder=true |
|
|
110
|
+
| color | Stores an hexadecimal value of an RGB color | '#FF0000' |
|
|
110
111
|
| model | Stores a model by name | – |
|
|
111
112
|
| modelField | Stores a model field path | – |
|
|
112
113
|
|
|
@@ -234,11 +235,14 @@ curl -X DELETE http://localhost:7633/api/data?_user=demo \
|
|
|
234
235
|
|
|
235
236
|
Make sure you use the code below to initialize the user :
|
|
236
237
|
```javascript
|
|
238
|
+
import express from "express";
|
|
237
239
|
import { Engine } from 'data-primals-engine/engine';
|
|
238
240
|
import { insertData, searchData } from 'data-primals-engine/modules/data';
|
|
239
241
|
|
|
240
242
|
// Ensure the engine is initialized
|
|
241
|
-
|
|
243
|
+
|
|
244
|
+
const app = express();
|
|
245
|
+
const engine = await Engine.Create({ app });
|
|
242
246
|
const currentUser = await engine.userProvider.findUserByUsername('demo');
|
|
243
247
|
if (!currentUser) {
|
|
244
248
|
throw new Error("Could not retrieve the user. Please check credentials or user provider.");
|