data-primals-engine 1.4.0 → 1.4.2
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 +856 -797
- package/client/src/AssistantChat.jsx +48 -5
- package/client/src/AssistantChat.scss +0 -1
- package/client/src/ChartConfigModal.jsx +34 -9
- package/client/src/Dashboard.jsx +396 -349
- package/client/src/DashboardChart.jsx +91 -12
- package/client/src/DataTable.jsx +817 -807
- package/client/src/Field.jsx +1784 -1782
- package/client/src/PackGallery.jsx +391 -290
- package/client/src/PackGallery.scss +231 -210
- package/client/src/contexts/UIContext.jsx +5 -2
- package/client/src/translations.js +188 -0
- package/package.json +19 -8
- package/src/config.js +2 -2
- package/src/core.js +21 -3
- package/src/engine.js +2 -1
- package/src/events.js +4 -3
- package/src/gameObject.js +1 -1
- package/src/middlewares/middleware-mongodb.js +3 -1
- package/src/modules/assistant/assistant.js +131 -42
- package/src/modules/auth-google/index.js +51 -0
- package/src/modules/auth-microsoft/index.js +82 -0
- package/src/modules/auth-saml/index.js +90 -0
- package/src/modules/bucket.js +3 -2
- package/src/modules/data/data.backup.js +374 -0
- package/src/modules/data/data.history.js +11 -8
- package/src/modules/data/data.js +190 -4543
- package/src/modules/data/data.operations.js +2790 -0
- package/src/modules/data/data.relations.js +687 -0
- package/src/modules/data/data.routes.js +1785 -1646
- package/src/modules/data/data.scheduling.js +274 -0
- package/src/modules/data/data.validation.js +245 -0
- package/src/modules/data/index.js +29 -1
- package/src/modules/user.js +2 -1
- package/src/modules/workflow.js +3 -2
- package/src/providers.js +110 -1
- package/src/services/stripe.js +3 -2
- package/src/sso.js +194 -0
- package/test/data.integration.test.js +3 -0
- package/test/user.test.js +1 -1
|
@@ -1,210 +1,231 @@
|
|
|
1
|
-
.pack-gallery-container {
|
|
2
|
-
width: 100%;
|
|
3
|
-
max-width: 90vw;
|
|
4
|
-
height: 80vh;
|
|
5
|
-
display: flex;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
|
|
8
|
-
.gallery-header {
|
|
9
|
-
display: flex;
|
|
10
|
-
flex-wrap: wrap;
|
|
11
|
-
gap: 1rem ;
|
|
12
|
-
justify-content: space-between;
|
|
13
|
-
align-items: center;
|
|
14
|
-
padding-bottom: 1rem;
|
|
15
|
-
border-bottom: 1px solid #e0e0e0;
|
|
16
|
-
margin-bottom: 1rem;
|
|
17
|
-
|
|
18
|
-
h1 {
|
|
19
|
-
margin: 0;
|
|
20
|
-
flex: 1; // Permet au titre de prendre l'espace disponible
|
|
21
|
-
min-width: 200px; // Empêche le titre de devenir trop petit
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.header-actions {
|
|
25
|
-
display: flex;
|
|
26
|
-
gap: 1rem;
|
|
27
|
-
align-items: center;
|
|
28
|
-
|
|
29
|
-
.sort-options {
|
|
30
|
-
display: flex;
|
|
31
|
-
gap: 0.5rem;
|
|
32
|
-
align-items: center;
|
|
33
|
-
flex-wrap: wrap; // Pour le responsive
|
|
34
|
-
|
|
35
|
-
.btn.active {
|
|
36
|
-
color: white;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.add-pack-button {
|
|
41
|
-
white-space: nowrap; // Empêche le texte du bouton de se casser
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.pack-list {
|
|
47
|
-
display: grid;
|
|
48
|
-
gap: 1rem;
|
|
49
|
-
padding: 0.5rem;
|
|
50
|
-
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
|
51
|
-
@media only screen and (min-width: 480px) {
|
|
52
|
-
overflow-y: auto;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.pack-card {
|
|
57
|
-
border: 1px solid #ddd;
|
|
58
|
-
border-radius: 8px;
|
|
59
|
-
padding: 1rem;
|
|
60
|
-
cursor: pointer;
|
|
61
|
-
transition: box-shadow 0.2s, transform 0.2s;
|
|
62
|
-
background-color: #fff;
|
|
63
|
-
|
|
64
|
-
&:hover {
|
|
65
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
66
|
-
transform: translateY(-3px);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.pack-card-header {
|
|
70
|
-
display: flex;
|
|
71
|
-
justify-content: space-between;
|
|
72
|
-
align-items: center;
|
|
73
|
-
margin-bottom: 0.5rem;
|
|
74
|
-
h3 {
|
|
75
|
-
margin: 0;
|
|
76
|
-
font-size: 1.2em;
|
|
77
|
-
color: var(--primary-color);
|
|
78
|
-
display: flex;
|
|
79
|
-
align-items: center;
|
|
80
|
-
gap: 0.5rem;
|
|
81
|
-
}
|
|
82
|
-
.pack-stars {
|
|
83
|
-
display: flex;
|
|
84
|
-
align-items: center;
|
|
85
|
-
gap: 0.3rem;
|
|
86
|
-
color: #f0ad4e;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.pack-description {
|
|
91
|
-
font-size: 0.9em;
|
|
92
|
-
color: #666;
|
|
93
|
-
min-height: 50px;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.pack-card-footer {
|
|
97
|
-
margin-top: 1rem;
|
|
98
|
-
padding-top: 0.5rem;
|
|
99
|
-
border-top: 1px solid #eee;
|
|
100
|
-
display: flex;
|
|
101
|
-
justify-content: space-between;
|
|
102
|
-
align-items: center;
|
|
103
|
-
font-size: 0.8em;
|
|
104
|
-
color: #888;
|
|
105
|
-
.pack-author {
|
|
106
|
-
display: flex;
|
|
107
|
-
align-items: center;
|
|
108
|
-
gap: 0.3rem;
|
|
109
|
-
}
|
|
110
|
-
.pack-tags {
|
|
111
|
-
display: flex;
|
|
112
|
-
flex-wrap: wrap;
|
|
113
|
-
gap: 0.5rem;
|
|
114
|
-
.tag {
|
|
115
|
-
background-color: #f0f0f0;
|
|
116
|
-
padding: 2px 6px;
|
|
117
|
-
border-radius: 4px;
|
|
118
|
-
display: flex;
|
|
119
|
-
align-items: center;
|
|
120
|
-
gap: 0.2rem;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.pack-detail {
|
|
127
|
-
display: flex;
|
|
128
|
-
flex-direction: column;
|
|
129
|
-
height: 100%;
|
|
130
|
-
.back-button {
|
|
131
|
-
align-self: flex-start;
|
|
132
|
-
margin-bottom: 1rem;
|
|
133
|
-
}
|
|
134
|
-
.pack-detail-header {
|
|
135
|
-
display: flex;
|
|
136
|
-
justify-content: space-between;
|
|
137
|
-
align-items: center;
|
|
138
|
-
h1 { margin: 0; }
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
1
|
+
.pack-gallery-container {
|
|
2
|
+
width: 100%;
|
|
3
|
+
max-width: 90vw;
|
|
4
|
+
height: 80vh;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
|
|
8
|
+
.gallery-header {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-wrap: wrap;
|
|
11
|
+
gap: 1rem ;
|
|
12
|
+
justify-content: space-between;
|
|
13
|
+
align-items: center;
|
|
14
|
+
padding-bottom: 1rem;
|
|
15
|
+
border-bottom: 1px solid #e0e0e0;
|
|
16
|
+
margin-bottom: 1rem;
|
|
17
|
+
|
|
18
|
+
h1 {
|
|
19
|
+
margin: 0;
|
|
20
|
+
flex: 1; // Permet au titre de prendre l'espace disponible
|
|
21
|
+
min-width: 200px; // Empêche le titre de devenir trop petit
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.header-actions {
|
|
25
|
+
display: flex;
|
|
26
|
+
gap: 1rem;
|
|
27
|
+
align-items: center;
|
|
28
|
+
|
|
29
|
+
.sort-options {
|
|
30
|
+
display: flex;
|
|
31
|
+
gap: 0.5rem;
|
|
32
|
+
align-items: center;
|
|
33
|
+
flex-wrap: wrap; // Pour le responsive
|
|
34
|
+
|
|
35
|
+
.btn.active {
|
|
36
|
+
color: white;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.add-pack-button {
|
|
41
|
+
white-space: nowrap; // Empêche le texte du bouton de se casser
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.pack-list {
|
|
47
|
+
display: grid;
|
|
48
|
+
gap: 1rem;
|
|
49
|
+
padding: 0.5rem;
|
|
50
|
+
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
|
51
|
+
@media only screen and (min-width: 480px) {
|
|
52
|
+
overflow-y: auto;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.pack-card {
|
|
57
|
+
border: 1px solid #ddd;
|
|
58
|
+
border-radius: 8px;
|
|
59
|
+
padding: 1rem;
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
transition: box-shadow 0.2s, transform 0.2s;
|
|
62
|
+
background-color: #fff;
|
|
63
|
+
|
|
64
|
+
&:hover {
|
|
65
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
66
|
+
transform: translateY(-3px);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.pack-card-header {
|
|
70
|
+
display: flex;
|
|
71
|
+
justify-content: space-between;
|
|
72
|
+
align-items: center;
|
|
73
|
+
margin-bottom: 0.5rem;
|
|
74
|
+
h3 {
|
|
75
|
+
margin: 0;
|
|
76
|
+
font-size: 1.2em;
|
|
77
|
+
color: var(--primary-color);
|
|
78
|
+
display: flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
gap: 0.5rem;
|
|
81
|
+
}
|
|
82
|
+
.pack-stars {
|
|
83
|
+
display: flex;
|
|
84
|
+
align-items: center;
|
|
85
|
+
gap: 0.3rem;
|
|
86
|
+
color: #f0ad4e;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.pack-description {
|
|
91
|
+
font-size: 0.9em;
|
|
92
|
+
color: #666;
|
|
93
|
+
min-height: 50px;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.pack-card-footer {
|
|
97
|
+
margin-top: 1rem;
|
|
98
|
+
padding-top: 0.5rem;
|
|
99
|
+
border-top: 1px solid #eee;
|
|
100
|
+
display: flex;
|
|
101
|
+
justify-content: space-between;
|
|
102
|
+
align-items: center;
|
|
103
|
+
font-size: 0.8em;
|
|
104
|
+
color: #888;
|
|
105
|
+
.pack-author {
|
|
106
|
+
display: flex;
|
|
107
|
+
align-items: center;
|
|
108
|
+
gap: 0.3rem;
|
|
109
|
+
}
|
|
110
|
+
.pack-tags {
|
|
111
|
+
display: flex;
|
|
112
|
+
flex-wrap: wrap;
|
|
113
|
+
gap: 0.5rem;
|
|
114
|
+
.tag {
|
|
115
|
+
background-color: #f0f0f0;
|
|
116
|
+
padding: 2px 6px;
|
|
117
|
+
border-radius: 4px;
|
|
118
|
+
display: flex;
|
|
119
|
+
align-items: center;
|
|
120
|
+
gap: 0.2rem;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.pack-detail {
|
|
127
|
+
display: flex;
|
|
128
|
+
flex-direction: column;
|
|
129
|
+
height: 100%;
|
|
130
|
+
.back-button {
|
|
131
|
+
align-self: flex-start;
|
|
132
|
+
margin-bottom: 1rem;
|
|
133
|
+
}
|
|
134
|
+
.pack-detail-header {
|
|
135
|
+
display: flex;
|
|
136
|
+
justify-content: space-between;
|
|
137
|
+
align-items: center;
|
|
138
|
+
h1 { margin: 0; }
|
|
139
|
+
|
|
140
|
+
.pack-detail-actions {
|
|
141
|
+
display: flex;
|
|
142
|
+
align-items: center;
|
|
143
|
+
gap: 1rem;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.owner-actions {
|
|
147
|
+
display: flex;
|
|
148
|
+
align-items: center;
|
|
149
|
+
gap: 1rem; /* Espace entre l'indicateur et la case à cocher */
|
|
150
|
+
padding: 0.25rem 0.75rem;
|
|
151
|
+
border: 1px solid #e0e0e0;
|
|
152
|
+
border-radius: 8px;
|
|
153
|
+
background-color: #fafafa;
|
|
154
|
+
.my-pack-indicator {
|
|
155
|
+
display: flex;
|
|
156
|
+
align-items: center;
|
|
157
|
+
gap: 0.4rem;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
.pack-meta {
|
|
162
|
+
display: flex;
|
|
163
|
+
gap: 1rem;
|
|
164
|
+
color: #777;
|
|
165
|
+
margin: 0.5rem 0 1rem 0;
|
|
166
|
+
span {
|
|
167
|
+
display: flex;
|
|
168
|
+
align-items: center;
|
|
169
|
+
gap: 0.4rem;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
.pack-content {
|
|
173
|
+
flex-grow: 1;
|
|
174
|
+
overflow-y: auto;
|
|
175
|
+
padding-right: 1rem;
|
|
176
|
+
h2 {
|
|
177
|
+
border-bottom: 1px solid #eee;
|
|
178
|
+
padding-bottom: 0.3rem;
|
|
179
|
+
margin-top: 1.5rem;
|
|
180
|
+
}
|
|
181
|
+
.data-preview {
|
|
182
|
+
background-color: #2d2d2d;
|
|
183
|
+
color: #f1f1f1;
|
|
184
|
+
padding: 1rem;
|
|
185
|
+
border-radius: 4px;
|
|
186
|
+
max-height: 300px;
|
|
187
|
+
overflow: auto;
|
|
188
|
+
pre {
|
|
189
|
+
margin: 0;
|
|
190
|
+
font-size: 0.85em;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// À ajouter à la fin de votre fichier CSS
|
|
198
|
+
.manual-install-dialog {
|
|
199
|
+
width: 100%;
|
|
200
|
+
|
|
201
|
+
p {
|
|
202
|
+
margin-top: 0;
|
|
203
|
+
color: #666;
|
|
204
|
+
font-size: 0.9em;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
textarea {
|
|
208
|
+
width: 100%;
|
|
209
|
+
padding: 1rem;
|
|
210
|
+
border: 1px solid #ddd;
|
|
211
|
+
border-radius: 4px;
|
|
212
|
+
font-family: monospace;
|
|
213
|
+
resize: vertical;
|
|
214
|
+
min-height: 300px;
|
|
215
|
+
background-color: #f9f9f9;
|
|
216
|
+
color: #333;
|
|
217
|
+
|
|
218
|
+
&:focus {
|
|
219
|
+
outline: none;
|
|
220
|
+
border-color: var(--primary-color);
|
|
221
|
+
box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.2);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.dialog-actions {
|
|
226
|
+
display: flex;
|
|
227
|
+
justify-content: flex-end;
|
|
228
|
+
gap: 0.5rem;
|
|
229
|
+
margin-top: 1rem;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
@@ -11,6 +11,8 @@ export const UIProvider = ({ children }) => {
|
|
|
11
11
|
const [isTourOpen, setIsTourOpen] = useState(false);
|
|
12
12
|
const [allTourSteps, setAllTourSteps] = useState({});
|
|
13
13
|
|
|
14
|
+
const [chartToAdd, setChartToAdd] = useState(null);
|
|
15
|
+
|
|
14
16
|
const [currentTour, setCurrentTour] = useLocalStorage("spotlight-tour", null);
|
|
15
17
|
// This is the single source of truth for tours that have been launched.
|
|
16
18
|
// It correctly reads from localStorage on initial load and persists any changes.
|
|
@@ -36,14 +38,15 @@ export const UIProvider = ({ children }) => {
|
|
|
36
38
|
launchedTours, setLaunchedTours, addLaunchedTour,
|
|
37
39
|
currentTour, setCurrentTour,
|
|
38
40
|
isTourOpen, setIsTourOpen, setAllTourSteps, allTourSteps,
|
|
39
|
-
tourStepIndex, setTourStepIndex
|
|
41
|
+
tourStepIndex, setTourStepIndex, chartToAdd, setChartToAdd
|
|
40
42
|
}), [isLocked,
|
|
41
43
|
setLocked,
|
|
42
44
|
currentTourSteps, setCurrentTourSteps,
|
|
43
45
|
launchedTours,setLaunchedTours,
|
|
44
46
|
currentTour, setCurrentTour,
|
|
45
47
|
isTourOpen, setIsTourOpen, setAllTourSteps, allTourSteps,
|
|
46
|
-
tourStepIndex, setTourStepIndex, addLaunchedTour
|
|
48
|
+
tourStepIndex, setTourStepIndex, addLaunchedTour,
|
|
49
|
+
chartToAdd, setChartToAdd]);
|
|
47
50
|
|
|
48
51
|
return (
|
|
49
52
|
<UIContext.Provider value={contextValue}>
|