data-primals-engine 1.3.4 → 1.4.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.
@@ -12,61 +12,62 @@
12
12
  "preview": "vite preview"
13
13
  },
14
14
  "peerDependencies": {
15
- "@tiptap/react": "^2.11.5",
15
+ "@tiptap/react": "^2.26.1",
16
16
  "react-chartjs-2": "^5.3.0",
17
17
  "react-code-blocks": "^0.1.6",
18
- "react-cookie": "^8.0.0",
18
+ "react-cookie": "^8.0.1",
19
19
  "react-ga": "^3.3.1",
20
20
  "react-helmet": "^6.1.0",
21
- "react-icons": "^5.0.1",
22
- "react-international-phone": "^4.5.0",
21
+ "react-icons": "^5.5.0",
22
+ "react-international-phone": "^4.6.0",
23
23
  "react-query": "^3.39.3",
24
- "react-router-dom": "^7.1.5",
24
+ "react-router-dom": "^7.8.1",
25
25
  "react-syntax-highlighter": "^15.6.1",
26
- "react-tooltip": "^5.28.1"
26
+ "react-tooltip": "^5.29.1"
27
27
  },
28
28
  "dependencies": {
29
- "@babel/runtime": "^7.24.7",
29
+ "@babel/runtime": "^7.28.3",
30
30
  "@codeium/react-code-editor": "^1.0.12",
31
- "@codemirror/lang-javascript": "^6.2.3",
32
- "@tiptap/extension-code": "^2.12.0",
33
- "@tiptap/extension-code-block": "^2.12.0",
34
- "@tiptap/extension-code-block-lowlight": "^2.12.0",
35
- "@tiptap/extension-color": "^2.11.5",
36
- "@tiptap/extension-hard-break": "^2.12.0",
31
+ "@codemirror/lang-javascript": "^6.2.4",
32
+ "@tiptap/extension-code": "^2.26.1",
33
+ "@tiptap/extension-code-block": "^2.26.1",
34
+ "@tiptap/extension-code-block-lowlight": "^2.26.1",
35
+ "@tiptap/extension-color": "^2.26.1",
36
+ "@tiptap/extension-hard-break": "^2.26.1",
37
37
  "@tiptap/extension-image": "^2.12.0",
38
- "@tiptap/extension-link": "^2.12.0",
39
- "@tiptap/extension-list-item": "^2.11.5",
40
- "@tiptap/extension-text-style": "^2.11.5",
41
- "@tiptap/pm": "^2.11.5",
42
- "@tiptap/starter-kit": "^2.11.5",
43
- "@uiw/react-codemirror": "^4.23.10",
44
- "chart.js": "^4.4.9",
38
+ "@tiptap/extension-link": "^2.26.1",
39
+ "@tiptap/extension-list-item": "^2.26.1",
40
+ "@tiptap/extension-text-style": "^2.26.1",
41
+ "@tiptap/pm": "^2.26.1",
42
+ "@tiptap/starter-kit": "^2.26.1",
43
+ "@uiw/react-codemirror": "^4.25.1",
44
+ "chart.js": "^4.5.0",
45
45
  "chartjs-adapter-date-fns": "^3.0.0",
46
46
  "classnames": "^2.5.1",
47
47
  "date-fns": "^4.1.0",
48
48
  "express-rate-limit": "^7.5.1",
49
+ "i18next": "^25.4.0",
49
50
  "lowlight": "^3.3.0",
50
- "react": "18.3.1",
51
- "react-big-calendar": "1.15.0",
52
- "react-dom": "18.3.1",
53
- "react-router": "^7.2.0",
54
- "react-switch": "^6.1.0",
51
+ "react": "^18.3.1",
52
+ "react-big-calendar": "^1.15.0",
53
+ "react-dom": "^18.3.1",
54
+ "react-router": "^7.8.1",
55
+ "react-switch": "^7.1.0",
55
56
  "uniqid": "^5.4.0",
56
- "yet-another-react-lightbox": "^3.22.0"
57
+ "yet-another-react-lightbox": "^3.25.0"
57
58
  },
58
59
  "devDependencies": {
59
- "@eslint/js": "^9.17.0",
60
- "@types/react": "18.3.1",
61
- "@types/react-dom": "18.3.1",
62
- "@vitejs/plugin-react": "^4.3.4",
63
- "eslint": "^9.17.0",
64
- "eslint-plugin-react": "^7.37.2",
65
- "eslint-plugin-react-hooks": "^5.0.0",
66
- "eslint-plugin-react-refresh": "^0.4.16",
67
- "globals": "^15.14.0",
60
+ "@eslint/js": "^9.33.0",
61
+ "@types/react": "^18.3.1",
62
+ "@types/react-dom": "^18.3.1",
63
+ "@vitejs/plugin-react": "^4.7.0",
64
+ "eslint": "^9.33.0",
65
+ "eslint-plugin-react": "^7.37.5",
66
+ "eslint-plugin-react-hooks": "^5.2.0",
67
+ "eslint-plugin-react-refresh": "^0.4.20",
68
+ "globals": "^15.15.0",
68
69
  "process": "^0.11.10",
69
- "sass-embedded": "^1.83.4",
70
- "vite": "^6.1.1"
70
+ "sass-embedded": "^1.90.0",
71
+ "vite": "^6.3.5"
71
72
  }
72
73
  }
@@ -4,7 +4,6 @@ import "yet-another-react-lightbox/plugins/captions.css";
4
4
  import "yet-another-react-lightbox/styles.css";
5
5
  import "./App.scss";
6
6
  import {QueryClient, QueryClientProvider, useMutation, useQuery} from "react-query";
7
-
8
7
  import {
9
8
  BrowserRouter,
10
9
  Outlet,
@@ -85,7 +84,7 @@ function TopBar({header}) {
85
84
  return <>{header}</>;
86
85
  }
87
86
 
88
- function Layout ({header, routes, body, footer}) {
87
+ function Layout ({header, routes, body, footer,refreshUI}) {
89
88
  const [cookies, setCookie, removeCookie] = useCookies(['username']);
90
89
  const { i18n, t } = useTranslation();
91
90
  const lang = (i18n.resolvedLanguage || i18n.language).split(/[-_]/)?.[0];
@@ -189,8 +188,6 @@ function Layout ({header, routes, body, footer}) {
189
188
  }
190
189
 
191
190
 
192
- const [refreshReducer, refreshUI]= useReducer((n) => n+1, 0,() => 0);
193
-
194
191
  const nav = useNavigate();
195
192
 
196
193
  const [red, triggerSignin] = useReducer((d) => d+1, 0, () => 0);
@@ -392,12 +389,12 @@ function Layout ({header, routes, body, footer}) {
392
389
 
393
390
  <Route path="/user/:user/dashboards/:hash?" element={<>
394
391
  {menu}
395
- {me && <DashboardsPage />}
392
+ {<DashboardsPage />}
396
393
  </>} />
397
394
 
398
395
  <Route path={"/user/:user/*"} element={<>
399
396
  {menu}
400
- <UserPage notifs={[]} onAuthenticated={onAuthenticated} triggerSignin={triggerSignin}/>
397
+ <UserPage notifs={[]} refreshUI={refreshUI} onAuthenticated={onAuthenticated} triggerSignin={triggerSignin}/>
401
398
  {!me && (<></>)}
402
399
  </>}/>
403
400
  <Route path={"/:lang/*"} element={<>
@@ -415,7 +412,7 @@ function Layout ({header, routes, body, footer}) {
415
412
  </div>;
416
413
  }
417
414
 
418
- function UserPage({notifs,triggerSignin, onAuthenticated}) {
415
+ function UserPage({notifs,triggerSignin,refreshUI, onAuthenticated}) {
419
416
  const {me} = useAuthContext()
420
417
  const [cookies, setCookie, removeCookie] = useCookies(['username']);
421
418
  const params = useParams();
@@ -515,7 +512,7 @@ function UserPage({notifs,triggerSignin, onAuthenticated}) {
515
512
  }, [isDemo, shouldStartTour]);
516
513
 
517
514
  return <>{/^demo[0-9]{1,2}$/.test(me?.username) && notifs}
518
- {params.user === id && <DataLayout/>}
515
+ {params.user === id && <DataLayout refreshUI={refreshUI}/>}
519
516
  {params.user !== id &&
520
517
  <p>Veuillez vous authentifier avec cet utilisateur &quot;{params.user}&quot; pour accéder à vos
521
518
  données</p>}</>;
@@ -532,6 +529,8 @@ const BaseLayout=()=>{
532
529
  const { me, setMe } = useAuthContext();
533
530
  const [translations, setTranslations] = useState([]);
534
531
 
532
+ const [refreshReducer, refreshUI]= useReducer((n) => n+1, 0,() => 0);
533
+
535
534
  useEffect(() => {
536
535
  if (Array.isArray(translations)) {
537
536
  var trs= {};
@@ -565,7 +564,7 @@ const BaseLayout=()=>{
565
564
  changeLanguage(lang);
566
565
  }, [lang]);
567
566
 
568
- return <Layout header={<header className={"flex"}>
567
+ return <Layout refreshUI={refreshUI} header={<header className={"flex"}>
569
568
  <Tooltip id={"header"}/>
570
569
  <h1 className="flex-1">{seoTitle}</h1>
571
570
  <div className="center">
@@ -590,7 +589,7 @@ function App() {
590
589
  <BrowserRouter>
591
590
  <UIProvider>
592
591
  <NotificationProvider>
593
- <BaseLayout></BaseLayout>x
592
+ <BaseLayout></BaseLayout>
594
593
  </NotificationProvider>
595
594
  </UIProvider>
596
595
  </BrowserRouter>
@@ -245,6 +245,7 @@ form, .form {
245
245
  border-radius: 5px;
246
246
  box-sizing: border-box;
247
247
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
248
+ font-family: "Nunito Sans", sans-serif;
248
249
  &:focus, &:-webkit-autofill {
249
250
  border-color: $secondary-color;
250
251
  background-color: #eaeaea !important;
@@ -268,6 +269,11 @@ form, .form {
268
269
  max-width: 150px;
269
270
  }
270
271
 
272
+ input[type*=date] {
273
+ padding: 4px 8px;
274
+ font-size: 80%;
275
+ }
276
+
271
277
  .btn {
272
278
  background-color: $primary-color;
273
279
  color: white;
@@ -1296,7 +1302,7 @@ select[multiple]{
1296
1302
 
1297
1303
  .model-creator {
1298
1304
  .field-checkbox {
1299
- padding: 8px;
1305
+ padding: 2px;
1300
1306
  display: flex;
1301
1307
  gap: 8px;
1302
1308
  align-items: flex-start;