data-primals-engine 1.6.5 → 1.7.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/README.md +160 -113
- package/client/index.js +3 -0
- package/client/package-lock.json +7562 -8824
- package/client/package.json +6 -2
- package/client/src/AssistantChat.jsx +369 -362
- package/client/src/DataEditor.jsx +383 -383
- package/client/src/DataLayout.jsx +54 -20
- package/client/src/ModelList.jsx +280 -280
- package/client/src/ViewSwitcher.scss +0 -31
- package/client/src/constants.js +81 -100
- package/client/src/contexts/CommandContext.jsx +274 -259
- package/client/vite.config.js +30 -30
- package/doc/AI-assistance.md +93 -0
- package/doc/Advanced-workflows.md +90 -0
- package/doc/Event-system.md +79 -0
- package/doc/Packs-gallery.md +73 -0
- package/package.json +15 -7
- package/src/constants.js +1 -1
- package/src/defaultModels.js +1 -1
- package/src/engine.js +342 -335
- package/src/migrate.js +1 -1
- package/src/modules/assistant/assistant.js +30 -20
- package/src/modules/data/data.backup.js +4 -4
- package/src/modules/data/data.js +6 -6
- package/src/modules/data/data.operations.js +79 -64
- package/src/modules/data/data.relations.js +2 -1
- package/src/modules/data/data.scheduling.js +1 -1
- package/src/modules/mongodb.js +16 -8
- package/src/modules/user.js +0 -1
- package/src/packs.js +5697 -5697
- package/src/profiles.js +19 -0
- package/swagger-en.yml +3390 -3385
- package/swagger-fr.yml +3385 -3380
- package/test/assistant.test.js +2 -2
- package/test/data.backup.integration.test.js +3 -1
- package/test/data.history.integration.test.js +0 -1
package/client/src/constants.js
CHANGED
|
@@ -1,100 +1,81 @@
|
|
|
1
|
-
import {host} from "../../src/constants.js";
|
|
2
|
-
|
|
3
|
-
export const seoTitle = 'Self Data Hosting';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
// Dans ConditionBuilder.jsx ou un fichier de constantes partagé
|
|
7
|
-
export const mongoOperators = [
|
|
8
|
-
{ value: '$eq', label: '==', inputType: 'text' }, // Égal (pour string, number, boolean...)
|
|
9
|
-
{ value: '$ne', label: '!=', inputType: 'text' }, // Différent
|
|
10
|
-
{ value: '$gt', label: '>', inputType: 'number' }, // Supérieur (nombre, date)
|
|
11
|
-
{ value: '$gte', label: '>=', inputType: 'number' }, // Supérieur ou égal à
|
|
12
|
-
{ value: '$lt', label: '<', inputType: 'number' }, // Inférieur à
|
|
13
|
-
{ value: '$lte', label: '<=', inputType: 'number' }, // Inférieur ou égal à
|
|
14
|
-
{ value: '$regex', label: 'contient (regex)', inputType: 'text' }, // Correspondance Regex (pour string)
|
|
15
|
-
{ value: '$in', label: 'est dans (liste)', inputType: 'csv' }, // Dans un tableau (valeurs séparées par des virgules)
|
|
16
|
-
{ value: '$nin', label: "n'est pas dans (liste)", inputType: 'csv' }, // Pas dans un tableau
|
|
17
|
-
{ value: '$exists', label: 'existe', inputType: 'boolean' } // Le champ existe (true/false)
|
|
18
|
-
// { value: '$not', label: 'NON (condition)', inputType: 'condition' }, // Pourrait encapsuler une autre condition
|
|
19
|
-
// Ajoutez d'autres opérateurs MongoDB pertinents si besoin ($size, $type, $elemMatch...)
|
|
20
|
-
];
|
|
21
|
-
|
|
22
|
-
export const MONGO_OPERATORS = {
|
|
23
|
-
ADD: { mongo: '$add', label: '+', type: 'numeric', multi: true },
|
|
24
|
-
SUBTRACT: { mongo: '$subtract', label: '-', type: 'numeric', multi: false },
|
|
25
|
-
MULTIPLY: { mongo: '$multiply', label: '*', type: 'numeric', multi: true },
|
|
26
|
-
DIVIDE: { mongo: '$divide', label: '/', type: 'numeric', multi: false },
|
|
27
|
-
MODULO: { mongo: '$mod', label: '%', type: 'numeric', multi: false },
|
|
28
|
-
POW: { mongo: '$pow', label: 'pow', type: 'numeric', multi: false },
|
|
29
|
-
SQRT: { mongo: '$sqrt', label: '√', type: 'numeric', multi: false, unary: true },
|
|
30
|
-
ABS: { mongo: '$abs', label: 'abs', type: 'numeric', multi: false, unary: true },
|
|
31
|
-
CEIL: { mongo: '$ceil', label: 'ceil', type: 'numeric', multi: false, unary: true },
|
|
32
|
-
FLOOR: { mongo: '$floor', label: 'floor', type: 'numeric', multi: false, unary: true },
|
|
33
|
-
COS: { mongo: '$cos', label: 'cos', type: 'numeric', multi: false, unary: true },
|
|
34
|
-
ACOS: { mongo: '$acos', label: 'acos', type: 'numeric', multi: false, unary: true },
|
|
35
|
-
SIN: { mongo: '$sin', label: 'sin', type: 'numeric', multi: false, unary: true },
|
|
36
|
-
ASIN: { mongo: '$asin', label: 'asin', type: 'numeric', multi: false, unary: true },
|
|
37
|
-
TAN: { mongo: '$tan', label: 'tan', type: 'numeric', multi: false, unary: true },
|
|
38
|
-
ATAN: { mongo: '$atan', label: 'atan', type: 'numeric', multi: false, unary: true },
|
|
39
|
-
LN: { mongo: '$ln', label: 'ln', type: 'numeric', multi: false, unary: true },
|
|
40
|
-
LOG: { mongo: '$log10', label: 'log', type: 'numeric', multi: false, unary: true },
|
|
41
|
-
|
|
42
|
-
CONCAT: { mongo: '$concat', label: 'concat', type: 'string', multi: true },
|
|
43
|
-
|
|
44
|
-
YEAR: { mongo: '$year', label: 'year', type: 'date', unary: true },
|
|
45
|
-
MONTH: { mongo: '$month', label: 'month', type: 'date', unary: true },
|
|
46
|
-
WEEK: { mongo: '$week', label: 'week', type: 'date', unary: true },
|
|
47
|
-
DAY_OF_MONTH: { mongo: '$dayOfMonth', label: 'day', type: 'date', unary: true },
|
|
48
|
-
HOUR: { mongo: '$hour', label: 'hour', type: 'date', unary: true },
|
|
49
|
-
MINUTE: { mongo: '$minute', label: 'min', type: 'date', unary: true },
|
|
50
|
-
SECOND: { mongo: '$second', label: 'sec', type: 'date', unary: true }
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export const
|
|
54
|
-
'
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
export const langs = {
|
|
86
|
-
fr: "Français",
|
|
87
|
-
en: "English",
|
|
88
|
-
ar: "عربي",
|
|
89
|
-
fa: "فارسی",
|
|
90
|
-
it: "Italiano",
|
|
91
|
-
es: "Español",
|
|
92
|
-
el: "Ελληνικά",
|
|
93
|
-
de: "Deutsch",
|
|
94
|
-
cs: "Čeština",
|
|
95
|
-
sv: "Svenska",
|
|
96
|
-
pt: "Português",
|
|
97
|
-
ja: "日本語",
|
|
98
|
-
zh: "简体中文",
|
|
99
|
-
ru: "Русский"
|
|
100
|
-
};
|
|
1
|
+
import {host} from "../../src/constants.js";
|
|
2
|
+
|
|
3
|
+
export const seoTitle = 'Self Data Hosting';
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
// Dans ConditionBuilder.jsx ou un fichier de constantes partagé
|
|
7
|
+
export const mongoOperators = [
|
|
8
|
+
{ value: '$eq', label: '==', inputType: 'text' }, // Égal (pour string, number, boolean...)
|
|
9
|
+
{ value: '$ne', label: '!=', inputType: 'text' }, // Différent
|
|
10
|
+
{ value: '$gt', label: '>', inputType: 'number' }, // Supérieur (nombre, date)
|
|
11
|
+
{ value: '$gte', label: '>=', inputType: 'number' }, // Supérieur ou égal à
|
|
12
|
+
{ value: '$lt', label: '<', inputType: 'number' }, // Inférieur à
|
|
13
|
+
{ value: '$lte', label: '<=', inputType: 'number' }, // Inférieur ou égal à
|
|
14
|
+
{ value: '$regex', label: 'contient (regex)', inputType: 'text' }, // Correspondance Regex (pour string)
|
|
15
|
+
{ value: '$in', label: 'est dans (liste)', inputType: 'csv' }, // Dans un tableau (valeurs séparées par des virgules)
|
|
16
|
+
{ value: '$nin', label: "n'est pas dans (liste)", inputType: 'csv' }, // Pas dans un tableau
|
|
17
|
+
{ value: '$exists', label: 'existe', inputType: 'boolean' } // Le champ existe (true/false)
|
|
18
|
+
// { value: '$not', label: 'NON (condition)', inputType: 'condition' }, // Pourrait encapsuler une autre condition
|
|
19
|
+
// Ajoutez d'autres opérateurs MongoDB pertinents si besoin ($size, $type, $elemMatch...)
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
export const MONGO_OPERATORS = {
|
|
23
|
+
ADD: { mongo: '$add', label: '+', type: 'numeric', multi: true },
|
|
24
|
+
SUBTRACT: { mongo: '$subtract', label: '-', type: 'numeric', multi: false },
|
|
25
|
+
MULTIPLY: { mongo: '$multiply', label: '*', type: 'numeric', multi: true },
|
|
26
|
+
DIVIDE: { mongo: '$divide', label: '/', type: 'numeric', multi: false },
|
|
27
|
+
MODULO: { mongo: '$mod', label: '%', type: 'numeric', multi: false },
|
|
28
|
+
POW: { mongo: '$pow', label: 'pow', type: 'numeric', multi: false },
|
|
29
|
+
SQRT: { mongo: '$sqrt', label: '√', type: 'numeric', multi: false, unary: true },
|
|
30
|
+
ABS: { mongo: '$abs', label: 'abs', type: 'numeric', multi: false, unary: true },
|
|
31
|
+
CEIL: { mongo: '$ceil', label: 'ceil', type: 'numeric', multi: false, unary: true },
|
|
32
|
+
FLOOR: { mongo: '$floor', label: 'floor', type: 'numeric', multi: false, unary: true },
|
|
33
|
+
COS: { mongo: '$cos', label: 'cos', type: 'numeric', multi: false, unary: true },
|
|
34
|
+
ACOS: { mongo: '$acos', label: 'acos', type: 'numeric', multi: false, unary: true },
|
|
35
|
+
SIN: { mongo: '$sin', label: 'sin', type: 'numeric', multi: false, unary: true },
|
|
36
|
+
ASIN: { mongo: '$asin', label: 'asin', type: 'numeric', multi: false, unary: true },
|
|
37
|
+
TAN: { mongo: '$tan', label: 'tan', type: 'numeric', multi: false, unary: true },
|
|
38
|
+
ATAN: { mongo: '$atan', label: 'atan', type: 'numeric', multi: false, unary: true },
|
|
39
|
+
LN: { mongo: '$ln', label: 'ln', type: 'numeric', multi: false, unary: true },
|
|
40
|
+
LOG: { mongo: '$log10', label: 'log', type: 'numeric', multi: false, unary: true },
|
|
41
|
+
|
|
42
|
+
CONCAT: { mongo: '$concat', label: 'concat', type: 'string', multi: true },
|
|
43
|
+
|
|
44
|
+
YEAR: { mongo: '$year', label: 'year', type: 'date', unary: true },
|
|
45
|
+
MONTH: { mongo: '$month', label: 'month', type: 'date', unary: true },
|
|
46
|
+
WEEK: { mongo: '$week', label: 'week', type: 'date', unary: true },
|
|
47
|
+
DAY_OF_MONTH: { mongo: '$dayOfMonth', label: 'day', type: 'date', unary: true },
|
|
48
|
+
HOUR: { mongo: '$hour', label: 'hour', type: 'date', unary: true },
|
|
49
|
+
MINUTE: { mongo: '$minute', label: 'min', type: 'date', unary: true },
|
|
50
|
+
SECOND: { mongo: '$second', label: 'sec', type: 'date', unary: true }
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export const OPERAND_TYPES = {
|
|
54
|
+
FIELD: 'field',
|
|
55
|
+
CONSTANT: 'constant',
|
|
56
|
+
PREVIOUS_STEP: 'previousStep'
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
export const getHost = () => {
|
|
61
|
+
return import.meta.env.HOST || host || 'localhost';
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
export const langs = {
|
|
67
|
+
fr: "Français",
|
|
68
|
+
en: "English",
|
|
69
|
+
ar: "عربي",
|
|
70
|
+
fa: "فارسی",
|
|
71
|
+
it: "Italiano",
|
|
72
|
+
es: "Español",
|
|
73
|
+
el: "Ελληνικά",
|
|
74
|
+
de: "Deutsch",
|
|
75
|
+
cs: "Čeština",
|
|
76
|
+
sv: "Svenska",
|
|
77
|
+
pt: "Português",
|
|
78
|
+
ja: "日本語",
|
|
79
|
+
zh: "简体中文",
|
|
80
|
+
ru: "Русский"
|
|
81
|
+
};
|