data-primals-engine 1.4.3 → 1.5.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 +913 -867
- package/client/package-lock.json +49 -0
- package/client/package.json +1 -0
- package/client/src/AddWidgetTypeModal.jsx +47 -43
- package/client/src/App.jsx +3 -7
- package/client/src/App.scss +25 -3
- package/client/src/AssistantChat.jsx +363 -323
- package/client/src/AssistantChat.scss +30 -12
- package/client/src/Dashboard.jsx +480 -396
- package/client/src/Dashboard.scss +1 -1
- package/client/src/DashboardHtmlViewItem.jsx +147 -0
- package/client/src/DashboardView.jsx +104 -19
- package/client/src/DataEditor.jsx +12 -5
- package/client/src/DataLayout.jsx +805 -762
- package/client/src/DataLayout.scss +14 -0
- package/client/src/DataTable.jsx +63 -77
- package/client/src/Dialog.scss +1 -1
- package/client/src/Field.jsx +591 -322
- package/client/src/FlexDataRenderer.jsx +2 -0
- package/client/src/FlexTreeUtils.js +1 -1
- package/client/src/FlexViewCard.jsx +44 -0
- package/client/src/HistoryDialog.jsx +47 -14
- package/client/src/HtmlViewBuilderModal.jsx +91 -0
- package/client/src/HtmlViewBuilderModal.scss +18 -0
- package/client/src/HtmlViewCard.jsx +44 -0
- package/client/src/HtmlViewCard.scss +35 -0
- package/client/src/KPIDialog.jsx +11 -1
- package/client/src/KanbanCard.jsx +1 -2
- package/client/src/ModelCreator.jsx +6 -6
- package/client/src/ModelCreatorField.jsx +74 -31
- package/client/src/ModelList.jsx +93 -54
- package/client/src/Notification.jsx +136 -136
- package/client/src/Notification.scss +0 -18
- package/client/src/Pagination.jsx +5 -3
- package/client/src/RelationField.jsx +354 -258
- package/client/src/RelationSelectorWidget.jsx +173 -0
- package/client/src/constants.js +1 -1
- package/client/src/contexts/ModelContext.jsx +10 -1
- package/client/src/contexts/UIContext.jsx +72 -63
- package/client/src/filter.js +262 -212
- package/client/src/hooks/useTutorials.jsx +62 -65
- package/client/src/hooks/useValidation.js +75 -0
- package/client/src/translations.js +26 -24
- package/package.json +3 -1
- package/perf/README.md +147 -0
- package/perf/artillery-hooks.js +37 -0
- package/perf/perf-shot-hardwork.yml +84 -0
- package/perf/perf-shot-search.yml +45 -0
- package/perf/setup.yml +26 -0
- package/server.js +1 -1
- package/src/constants.js +3 -28
- package/src/core.js +15 -1
- package/src/data.js +1 -1
- package/src/defaultModels.js +63 -7
- package/src/email.js +5 -2
- package/src/engine.js +5 -3
- package/src/filter.js +5 -3
- package/src/i18n.js +710 -10
- package/src/modules/assistant/assistant.js +151 -19
- package/src/modules/bucket.js +14 -16
- package/src/modules/data/data.backup.js +11 -8
- package/src/modules/data/data.core.js +118 -92
- package/src/modules/data/data.history.js +531 -492
- package/src/modules/data/data.js +9 -56
- package/src/modules/data/data.operations.js +3282 -2999
- package/src/modules/data/data.relations.js +686 -686
- package/src/modules/data/data.routes.js +118 -24
- package/src/modules/data/data.scheduling.js +2 -1
- package/src/modules/data/data.validation.js +85 -3
- package/src/modules/file.js +247 -236
- package/src/modules/user.js +4 -1
- package/src/modules/workflow.js +9 -10
- package/src/openai.jobs.js +2 -0
- package/src/packs.js +5482 -5461
- package/src/providers.js +22 -7
- package/test/data.integration.test.js +136 -2
- package/test/import_export.integration.test.js +1 -1
package/client/package-lock.json
CHANGED
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"lowlight": "^3.3.0",
|
|
33
33
|
"react": "^18.3.1",
|
|
34
34
|
"react-big-calendar": "^1.15.0",
|
|
35
|
+
"react-color": "^2.19.3",
|
|
35
36
|
"react-dom": "^18.3.1",
|
|
36
37
|
"react-leaflet": "^4.2.1",
|
|
37
38
|
"react-router": "^7.8.1",
|
|
@@ -1277,6 +1278,15 @@
|
|
|
1277
1278
|
"url": "https://github.com/sponsors/nzakas"
|
|
1278
1279
|
}
|
|
1279
1280
|
},
|
|
1281
|
+
"node_modules/@icons/material": {
|
|
1282
|
+
"version": "0.2.4",
|
|
1283
|
+
"resolved": "https://registry.npmjs.org/@icons/material/-/material-0.2.4.tgz",
|
|
1284
|
+
"integrity": "sha512-QPcGmICAPbGLGb6F/yNf/KzKqvFx8z5qx3D1yFqVAjoFmXK35EgyW+cJ57Te3CNsmzblwtzakLGFqHPqrfb4Tw==",
|
|
1285
|
+
"license": "MIT",
|
|
1286
|
+
"peerDependencies": {
|
|
1287
|
+
"react": "*"
|
|
1288
|
+
}
|
|
1289
|
+
},
|
|
1280
1290
|
"node_modules/@jridgewell/gen-mapping": {
|
|
1281
1291
|
"version": "0.3.12",
|
|
1282
1292
|
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.12.tgz",
|
|
@@ -5301,6 +5311,12 @@
|
|
|
5301
5311
|
"remove-accents": "0.5.0"
|
|
5302
5312
|
}
|
|
5303
5313
|
},
|
|
5314
|
+
"node_modules/material-colors": {
|
|
5315
|
+
"version": "1.2.6",
|
|
5316
|
+
"resolved": "https://registry.npmjs.org/material-colors/-/material-colors-1.2.6.tgz",
|
|
5317
|
+
"integrity": "sha512-6qE4B9deFBIa9YSpOc9O0Sgc43zTeVYbgDT5veRKSlB2+ZuHNoVVxA1L/ckMUayV9Ay9y7Z/SZCLcGteW9i7bg==",
|
|
5318
|
+
"license": "ISC"
|
|
5319
|
+
},
|
|
5304
5320
|
"node_modules/math-intrinsics": {
|
|
5305
5321
|
"version": "1.1.0",
|
|
5306
5322
|
"resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
|
|
@@ -6213,6 +6229,24 @@
|
|
|
6213
6229
|
"integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==",
|
|
6214
6230
|
"peer": true
|
|
6215
6231
|
},
|
|
6232
|
+
"node_modules/react-color": {
|
|
6233
|
+
"version": "2.19.3",
|
|
6234
|
+
"resolved": "https://registry.npmjs.org/react-color/-/react-color-2.19.3.tgz",
|
|
6235
|
+
"integrity": "sha512-LEeGE/ZzNLIsFWa1TMe8y5VYqr7bibneWmvJwm1pCn/eNmrabWDh659JSPn9BuaMpEfU83WTOJfnCcjDZwNQTA==",
|
|
6236
|
+
"license": "MIT",
|
|
6237
|
+
"dependencies": {
|
|
6238
|
+
"@icons/material": "^0.2.4",
|
|
6239
|
+
"lodash": "^4.17.15",
|
|
6240
|
+
"lodash-es": "^4.17.15",
|
|
6241
|
+
"material-colors": "^1.2.1",
|
|
6242
|
+
"prop-types": "^15.5.10",
|
|
6243
|
+
"reactcss": "^1.2.0",
|
|
6244
|
+
"tinycolor2": "^1.4.1"
|
|
6245
|
+
},
|
|
6246
|
+
"peerDependencies": {
|
|
6247
|
+
"react": "*"
|
|
6248
|
+
}
|
|
6249
|
+
},
|
|
6216
6250
|
"node_modules/react-cookie": {
|
|
6217
6251
|
"version": "8.0.1",
|
|
6218
6252
|
"resolved": "https://registry.npmjs.org/react-cookie/-/react-cookie-8.0.1.tgz",
|
|
@@ -6489,6 +6523,15 @@
|
|
|
6489
6523
|
"react-dom": ">=16.14.0"
|
|
6490
6524
|
}
|
|
6491
6525
|
},
|
|
6526
|
+
"node_modules/reactcss": {
|
|
6527
|
+
"version": "1.2.3",
|
|
6528
|
+
"resolved": "https://registry.npmjs.org/reactcss/-/reactcss-1.2.3.tgz",
|
|
6529
|
+
"integrity": "sha512-KiwVUcFu1RErkI97ywr8nvx8dNOpT03rbnma0SSalTYjkrPYaEajR4a/MRt6DZ46K6arDRbWMNHF+xH7G7n/8A==",
|
|
6530
|
+
"license": "MIT",
|
|
6531
|
+
"dependencies": {
|
|
6532
|
+
"lodash": "^4.0.1"
|
|
6533
|
+
}
|
|
6534
|
+
},
|
|
6492
6535
|
"node_modules/readdirp": {
|
|
6493
6536
|
"version": "4.1.2",
|
|
6494
6537
|
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz",
|
|
@@ -7672,6 +7715,12 @@
|
|
|
7672
7715
|
"node": ">=16.0.0"
|
|
7673
7716
|
}
|
|
7674
7717
|
},
|
|
7718
|
+
"node_modules/tinycolor2": {
|
|
7719
|
+
"version": "1.6.0",
|
|
7720
|
+
"resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.6.0.tgz",
|
|
7721
|
+
"integrity": "sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==",
|
|
7722
|
+
"license": "MIT"
|
|
7723
|
+
},
|
|
7675
7724
|
"node_modules/tinyglobby": {
|
|
7676
7725
|
"version": "0.2.14",
|
|
7677
7726
|
"resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz",
|
package/client/package.json
CHANGED
|
@@ -1,44 +1,48 @@
|
|
|
1
|
-
// src/components/AddWidgetTypeModal.jsx
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import { useTranslation } from 'react-i18next';
|
|
5
|
-
import { FaChartBar, FaTachometerAlt, FaThLarge } from 'react-icons/fa';
|
|
6
|
-
import './AddWidgetTypeModal.scss';
|
|
7
|
-
import {Dialog} from "./Dialog.jsx"; // Créez ce fichier SCSS
|
|
8
|
-
|
|
9
|
-
const AddWidgetTypeModal = ({ onClose, onSelectType }) => {
|
|
10
|
-
const { t } = useTranslation();
|
|
11
|
-
|
|
12
|
-
return (
|
|
13
|
-
<Dialog className={"add-widget-type-modal-content"} isModal={true} isClosable={true} onClose={onClose} title={t('dashboard.addWidgetTitle', 'Ajouter un élément au tableau de bord')}>
|
|
14
|
-
<>
|
|
15
|
-
<div className="flex widget-type-options">
|
|
16
|
-
<button onClick={() => onSelectType('KPI')} className="widget-type-button">
|
|
17
|
-
<FaTachometerAlt size={40} />
|
|
18
|
-
<span>{t('dashboard.addKPI', 'Ajouter un KPI')}</span>
|
|
19
|
-
</button>
|
|
20
|
-
<button onClick={() => onSelectType('Chart')} className="widget-type-button">
|
|
21
|
-
<FaChartBar size={40} />
|
|
22
|
-
<span>{t('dashboard.addChart', 'Ajouter un Graphique')}</span>
|
|
23
|
-
</button>
|
|
24
|
-
<button disabled={false} onClick={() => onSelectType('FlexView')} className="widget-type-button">
|
|
25
|
-
<FaThLarge size={40} />
|
|
26
|
-
<span>{t('dashboard.addFlexView', 'Ajouter une Vue Flex')}</span>
|
|
27
|
-
</button>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
</
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
1
|
+
// src/components/AddWidgetTypeModal.jsx
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import { useTranslation } from 'react-i18next';
|
|
5
|
+
import { FaChartBar, FaTachometerAlt, FaThLarge, FaFileCode } from 'react-icons/fa';
|
|
6
|
+
import './AddWidgetTypeModal.scss';
|
|
7
|
+
import {Dialog} from "./Dialog.jsx"; // Créez ce fichier SCSS
|
|
8
|
+
|
|
9
|
+
const AddWidgetTypeModal = ({ onClose, onSelectType }) => {
|
|
10
|
+
const { t } = useTranslation();
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<Dialog className={"add-widget-type-modal-content"} isModal={true} isClosable={true} onClose={onClose} title={t('dashboard.addWidgetTitle', 'Ajouter un élément au tableau de bord')}>
|
|
14
|
+
<>
|
|
15
|
+
<div className="flex widget-type-options">
|
|
16
|
+
<button onClick={() => onSelectType('KPI')} className="widget-type-button">
|
|
17
|
+
<FaTachometerAlt size={40} />
|
|
18
|
+
<span>{t('dashboard.addKPI', 'Ajouter un KPI')}</span>
|
|
19
|
+
</button>
|
|
20
|
+
<button onClick={() => onSelectType('Chart')} className="widget-type-button">
|
|
21
|
+
<FaChartBar size={40} />
|
|
22
|
+
<span>{t('dashboard.addChart', 'Ajouter un Graphique')}</span>
|
|
23
|
+
</button>
|
|
24
|
+
<button disabled={false} onClick={() => onSelectType('FlexView')} className="widget-type-button">
|
|
25
|
+
<FaThLarge size={40} />
|
|
26
|
+
<span>{t('dashboard.addFlexView', 'Ajouter une Vue Flex')}</span>
|
|
27
|
+
</button>
|
|
28
|
+
<button onClick={() => onSelectType('HtmlView')} className="widget-type-button">
|
|
29
|
+
<FaFileCode size={40} />
|
|
30
|
+
<span>{t('dashboard.addHtmlView', 'Ajouter une Vue HTML')}</span>
|
|
31
|
+
</button>
|
|
32
|
+
</div>
|
|
33
|
+
<div className={"flex actions center"}>
|
|
34
|
+
<button onClick={onClose} className="btn-close-modal">
|
|
35
|
+
{t('btns.cancel', 'Annuler')}
|
|
36
|
+
</button>
|
|
37
|
+
</div>
|
|
38
|
+
</>
|
|
39
|
+
</Dialog>
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
AddWidgetTypeModal.propTypes = {
|
|
44
|
+
onClose: PropTypes.func.isRequired,
|
|
45
|
+
onSelectType: PropTypes.func.isRequired,
|
|
46
|
+
};
|
|
47
|
+
|
|
44
48
|
export default AddWidgetTypeModal;
|
package/client/src/App.jsx
CHANGED
|
@@ -55,7 +55,7 @@ import { translations as allTranslations} from "../../src/i18n.js";
|
|
|
55
55
|
import {getBrowserRandom, getRandom} from "../../src/core.js";
|
|
56
56
|
import {getUserHash} from "../../src/data.js";
|
|
57
57
|
import {langs, seoTitle} from "./constants.js";
|
|
58
|
-
import {host
|
|
58
|
+
import {host} from "../../src/constants.js";
|
|
59
59
|
import i18next from "i18next";
|
|
60
60
|
import {websiteTranslations} from "./translations.js";
|
|
61
61
|
|
|
@@ -90,9 +90,7 @@ function Layout ({header, routes, body, footer,refreshUI}) {
|
|
|
90
90
|
const lang = (i18n.resolvedLanguage || i18n.language).split(/[-_]/)?.[0];
|
|
91
91
|
const {models= [], setGeneratedModels } = useModelContext();
|
|
92
92
|
const { me, setMe } = useAuthContext();
|
|
93
|
-
|
|
94
|
-
const [assistantConfig, setAssistantConfig] = useState(null);
|
|
95
|
-
|
|
93
|
+
const { assistantConfig, setAssistantConfig} = useUI();
|
|
96
94
|
const promotionalMessages = [
|
|
97
95
|
{ text: t('promo.rotation.6') },
|
|
98
96
|
{ text: t('promo.rotation.1') },
|
|
@@ -312,7 +310,6 @@ function Layout ({header, routes, body, footer,refreshUI}) {
|
|
|
312
310
|
const myInputRef = useRef(null);
|
|
313
311
|
|
|
314
312
|
return <div className={['ar', 'fa'].includes(lang)? 'rtl' : 'ltr'}>
|
|
315
|
-
<NotificationList />
|
|
316
313
|
<><Helmet><title>
|
|
317
314
|
{t('seo.title', seoTitle)}</title></Helmet></>
|
|
318
315
|
<Routes>
|
|
@@ -408,7 +405,6 @@ function Layout ({header, routes, body, footer,refreshUI}) {
|
|
|
408
405
|
<footer className="flex flex-centered">
|
|
409
406
|
{footer}
|
|
410
407
|
</footer>
|
|
411
|
-
{me && <AssistantChat config={assistantConfig} />}
|
|
412
408
|
</div>;
|
|
413
409
|
}
|
|
414
410
|
|
|
@@ -574,7 +570,7 @@ const BaseLayout=()=>{
|
|
|
574
570
|
</div>
|
|
575
571
|
<div className="flex">
|
|
576
572
|
<FaQuestion data-tooltip-id="header" data-tooltip-content="Documentation" onClick={()=> {
|
|
577
|
-
window.open("
|
|
573
|
+
window.open("/en/documentation/", "_blank");
|
|
578
574
|
}} />
|
|
579
575
|
</div>
|
|
580
576
|
</header>} />
|
package/client/src/App.scss
CHANGED
|
@@ -45,6 +45,9 @@ header {
|
|
|
45
45
|
&.flex-start {
|
|
46
46
|
align-items: start;
|
|
47
47
|
}
|
|
48
|
+
&.flex-end {
|
|
49
|
+
justify-content: flex-end;
|
|
50
|
+
}
|
|
48
51
|
&.flex-self-end {
|
|
49
52
|
align-self: end;
|
|
50
53
|
}
|
|
@@ -80,10 +83,9 @@ header {
|
|
|
80
83
|
flex-direction: column;
|
|
81
84
|
}
|
|
82
85
|
gap: 4px;
|
|
83
|
-
@media only screen and (min-width:
|
|
86
|
+
@media only screen and (min-width: 720px){
|
|
84
87
|
gap: 12px;
|
|
85
88
|
}
|
|
86
|
-
|
|
87
89
|
}
|
|
88
90
|
.flex-1 {
|
|
89
91
|
flex: 1;
|
|
@@ -108,6 +110,18 @@ h2 {
|
|
|
108
110
|
border-bottom: 1px solid #969696;
|
|
109
111
|
}
|
|
110
112
|
|
|
113
|
+
.p-1 {
|
|
114
|
+
padding: 4px;
|
|
115
|
+
}
|
|
116
|
+
.p-2 {
|
|
117
|
+
padding: 8px;
|
|
118
|
+
}
|
|
119
|
+
.p-3 {
|
|
120
|
+
padding: 16px;
|
|
121
|
+
}
|
|
122
|
+
.p-4 {
|
|
123
|
+
padding: 32px;
|
|
124
|
+
}
|
|
111
125
|
.prior {
|
|
112
126
|
position: relative;
|
|
113
127
|
text-align: center;
|
|
@@ -1553,4 +1567,12 @@ select[multiple]{
|
|
|
1553
1567
|
}
|
|
1554
1568
|
}
|
|
1555
1569
|
|
|
1556
|
-
|
|
1570
|
+
.gap-2 {
|
|
1571
|
+
gap: 8px;
|
|
1572
|
+
}
|
|
1573
|
+
.gap-3 {
|
|
1574
|
+
gap: 16px;
|
|
1575
|
+
}
|
|
1576
|
+
.gap-4 {
|
|
1577
|
+
gap: 32px;
|
|
1578
|
+
}
|