mountain-ui 1.0.36 → 1.0.38

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.
Files changed (48) hide show
  1. package/index.d.ts +5 -5
  2. package/index.js +5 -5
  3. package/package.json +1 -1
  4. package/src/lib/registry/entityRegistry/components/EntityForm.svelte +1 -0
  5. package/src/lib/registry/entityRegistry/registry.svelte.js +17 -0
  6. package/src/lib/registry/fieldTypeRegistry/fieldTypes/Lines/Input.svelte +1 -0
  7. package/src/lib/registry/fieldTypeRegistry/fieldTypes/Link/Input/Input.svelte +17 -1
  8. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeDate/View.svelte +1 -1
  9. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeDatetime/View.svelte +1 -1
  10. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeUpdatedAt/View.svelte +1 -1
  11. package/src/lib/registry/projectRegistry/components/ProjectButton.svelte +14 -0
  12. package/src/lib/registry/projectRegistry/components/ProjectCard.svelte +43 -0
  13. package/src/lib/registry/projectRegistry/components/ProjectDropdown.svelte +117 -0
  14. package/src/lib/registry/projectRegistry/createProject.js +17 -0
  15. package/src/lib/registry/projectRegistry/registry.svelte.js +50 -0
  16. package/src/lib/registry/viewEntriesProfilRegistery/components/CreateViewEntriesProfilDialog.svelte +17 -0
  17. package/src/lib/registry/viewEntriesProfilRegistery/components/ViewEntriesProfilButton.svelte +51 -0
  18. package/src/lib/registry/viewEntriesProfilRegistery/components/ViewEntriesProfilComponent.svelte +32 -0
  19. package/src/lib/registry/viewEntriesProfilRegistery/components/ViewEntriesProfilDropdown.svelte +60 -0
  20. package/src/lib/registry/viewEntriesProfilRegistery/createViewEntriesProfil.js +15 -0
  21. package/src/lib/registry/viewEntriesProfilRegistery/registerDefaultViewEntriesProfils.js +13 -0
  22. package/src/lib/registry/viewEntriesProfilRegistery/registry.svelte.js +48 -0
  23. package/src/lib/registry/{viewTypeRegistry/components/ViewTypeButton.svelte → viewEntriesTypeRegistry/components/ViewEntriesTypeButton.svelte} +5 -4
  24. package/src/lib/registry/{viewTypeRegistry/components/ViewTypeComponent.svelte → viewEntriesTypeRegistry/components/ViewEntriesTypeComponent.svelte} +4 -4
  25. package/src/lib/registry/viewEntriesTypeRegistry/components/ViewEntriesTypeDropdown.svelte +32 -0
  26. package/src/lib/registry/viewEntriesTypeRegistry/components/ViewEntriesTypeIcon.svelte +9 -0
  27. package/src/lib/registry/viewEntriesTypeRegistry/createViewEntriesType.js +17 -0
  28. package/src/lib/registry/viewEntriesTypeRegistry/registerDefaultViewEntriesTypes.js +7 -0
  29. package/src/lib/registry/viewEntriesTypeRegistry/registry.svelte.js +44 -0
  30. package/src/lib/registry/{viewTypeRegistry/viewTypes → viewEntriesTypeRegistry/viewEntriesTypes}/Table/component/StructureTable.svelte +11 -4
  31. package/src/lib/registry/viewEntriesTypeRegistry/viewEntriesTypes/Table/index.js +14 -0
  32. package/src/routes/+layout.svelte +613 -598
  33. package/src/routes/+page.svelte +3 -3
  34. package/src/routes/exemple/+layout.svelte +44 -0
  35. package/src/routes/exemple/+page.svelte +0 -0
  36. package/src/routes/exemple/[project_normalized_name]/+layout.svelte +100 -0
  37. package/src/routes/exemple/[project_normalized_name]/[entity_slug]/+layout.svelte +44 -0
  38. package/src/routes/exemple/[project_normalized_name]/[entity_slug]/+page.svelte +182 -0
  39. package/src/routes/exemple/[project_normalized_name]/[entity_slug]/[entry_id]/+page.svelte +25 -0
  40. package/src/routes/exemple/[project_normalized_name]/[entity_slug]/create/+page.svelte +45 -0
  41. package/src/routes/exemple/[project_normalized_name]/home/+page.svelte +1 -0
  42. package/src/lib/registry/viewTypeRegistry/createViewType.js +0 -17
  43. package/src/lib/registry/viewTypeRegistry/registerDefaultViewTypes.js +0 -7
  44. package/src/lib/registry/viewTypeRegistry/registry.svelte.js +0 -44
  45. package/src/lib/registry/viewTypeRegistry/viewTypes/Table/component/Component copy.svelte +0 -11
  46. package/src/lib/registry/viewTypeRegistry/viewTypes/Table/index.js +0 -14
  47. /package/src/lib/registry/{viewTypeRegistry/viewTypes → viewEntriesTypeRegistry/viewEntriesTypes}/Table/Icon.svelte +0 -0
  48. /package/src/lib/registry/{viewTypeRegistry/viewTypes → viewEntriesTypeRegistry/viewEntriesTypes}/Table/component/Component.svelte +0 -0
@@ -6,7 +6,11 @@
6
6
  import { entityRegistry } from '$lib/registry/entityRegistry/registry.svelte';
7
7
  import { createEntity } from '$lib/registry/entityRegistry/createEntity';
8
8
  import { init, sendRequest } from 'hamzus-ui';
9
- import { registerDefaultViewTypes } from '$lib/registry/viewTypeRegistry/registerDefaultViewTypes';
9
+ import { registerDefaultViewEntriesTypes } from '$lib/registry/viewEntriesTypeRegistry/registerDefaultViewEntriesTypes';
10
+ import { projectRegistry } from '$lib/registry/projectRegistry/registry.svelte';
11
+ import { createProject } from '$lib/registry/projectRegistry/createProject';
12
+ import { page } from '$app/stores';
13
+ import { registerDefaultViewProfil } from '$lib/registry/viewEntriesProfilRegistery/registerDefaultViewEntriesProfils';
10
14
 
11
15
  let { children } = $props();
12
16
 
@@ -22,8 +26,11 @@
22
26
  if (!response || response.statusType === 'error') {
23
27
  // si il est pas encore dans la page de login on redirige
24
28
  const path = '/login';
29
+
30
+ if ($page.url.pathname === path) return
31
+ window.location.href = defaultUnlogged;
32
+
25
33
 
26
- window.location.href = defaultUnlogged;
27
34
  }
28
35
  },
29
36
  replayAfter401: true,
@@ -35,610 +42,618 @@
35
42
  });
36
43
 
37
44
  onMount(async () => {
45
+
38
46
  registerDefaultFieldTypes();
47
+ registerDefaultViewEntriesTypes();
39
48
 
40
- // recuperer les entités
41
- const requestStructures = await sendRequest({
42
- path: '/get-all-entities'
49
+ // récuperer les projets
50
+ const projectStructures = await sendRequest({
51
+ path: '/get-all-projects'
43
52
  });
44
53
 
45
- for (const entity of requestStructures.data) {
46
- entityRegistry.register(createEntity(entity));
54
+ if (!projectStructures || projectStructures.statusType === "error") {
55
+ isMount = true
56
+ return
57
+ }
58
+
59
+ for (const project of projectStructures.data) {
60
+ projectRegistry.register(createProject(project));
47
61
  }
48
62
 
49
- registerDefaultViewTypes();
63
+
64
+
50
65
 
51
66
  // enregistrer des entité
52
- entityRegistry.register(
53
- createEntity({
54
- id: 1,
55
- version: 1,
56
- plural_name: 'clients',
57
- singular_name: 'client',
58
- normalized_name: 'clients',
59
- slug: 'clients',
60
- symbol: 'C',
61
- can_be_edited: true,
62
- can_be_deleted: true,
63
- is_locked: false,
64
- updated_at: null,
65
- created_at: '2026-07-26 16:53:34',
66
- fields: [
67
- {
68
- id: 1,
69
- link_to_field_id: null,
70
- entity_id: 1,
71
- type: 'primary',
72
- width: 70,
73
- name: 'id',
74
- normalized_name: 'id',
75
- is_locked: true,
76
- is_required: false,
77
- is_secret: false,
78
- is_unique: true,
79
- props: []
80
- },
81
- {
82
- id: 2,
83
- link_to_field_id: null,
84
- entity_id: 1,
85
- type: 'text-varchar-default',
86
- width: 160,
87
- name: 'nom',
88
- normalized_name: 'nom',
89
- is_locked: false,
90
- is_required: true,
91
- is_secret: false,
92
- is_unique: true,
93
- props: []
94
- },
95
- {
96
- id: 3,
97
- link_to_field_id: null,
98
- entity_id: 1,
99
- type: 'text-varchar-email',
100
- width: 160,
101
- name: 'email principal',
102
- normalized_name: 'email_principal',
103
- is_locked: false,
104
- is_required: true,
105
- is_secret: false,
106
- is_unique: true,
107
- props: []
108
- },
109
- {
110
- id: 13,
111
- link_to_field_id: null,
112
- entity_id: 1,
113
- type: 'text-varchar-default',
114
- width: 160,
115
- name: 'TVA',
116
- normalized_name: 'tva',
117
- is_locked: false,
118
- is_required: false,
119
- is_secret: false,
120
- is_unique: true,
121
- props: []
122
- },
123
- {
124
- id: 14,
125
- link_to_field_id: null,
126
- entity_id: 1,
127
- type: 'text-varchar-default',
128
- width: 160,
129
- name: 'SIRET / ICE',
130
- normalized_name: 'siret_ice',
131
- is_locked: false,
132
- is_required: false,
133
- is_secret: false,
134
- is_unique: true,
135
- props: []
136
- },
137
- {
138
- id: 4,
139
- link_to_field_id: null,
140
- entity_id: 1,
141
- type: 'list-radio',
142
- width: 160,
143
- name: 'type',
144
- normalized_name: 'type',
145
- is_locked: false,
146
- is_required: true,
147
- is_secret: false,
148
- is_unique: false,
149
- props: {
150
- choices: [
151
- {
152
- value: 'Entreprise',
153
- color: '--blue'
154
- },
155
- {
156
- value: 'Particulier',
157
- color: '--green'
158
- }
159
- ]
160
- }
161
- },
162
- {
163
- id: 16,
164
- link_to_field_id: null,
165
- entity_id: 1,
166
- type: 'list-radio',
167
- width: 160,
168
- name: 'status',
169
- normalized_name: 'status',
170
- is_locked: false,
171
- is_required: true,
172
- is_secret: false,
173
- is_unique: false,
174
- props: {
175
- choices: [
176
- {
177
- value: 'Actif',
178
- color: '--green'
179
- },
180
- {
181
- value: 'Inactif',
182
- color: '--orange'
183
- },
184
- {
185
- value: 'Bloqué',
186
- color: '--red'
187
- },
188
- {
189
- value: 'Archivé',
190
- color: '--yellow'
191
- }
192
- ]
193
- }
194
- },
195
- {
196
- id: 15,
197
- link_to_field_id: null,
198
- entity_id: 1,
199
- type: 'list-radio',
200
- width: 160,
201
- name: "taille de l'entreprise",
202
- normalized_name: 'taille_de_lentreprise',
203
- is_locked: false,
204
- is_required: false,
205
- is_secret: false,
206
- is_unique: false,
207
- props: {
208
- choices: [
209
- {
210
- value: 'Indépendant',
211
- color: '--green'
212
- },
213
- {
214
- value: 'TPE (1-9)',
215
- color: '--blue'
216
- },
217
- {
218
- value: 'PME (10-249)',
219
- color: '--mauve'
220
- },
221
- {
222
- value: 'Grande entreprise (250+)',
223
- color: '--orange'
224
- }
225
- ]
226
- }
227
- },
228
- {
229
- id: 5,
230
- link_to_field_id: null,
231
- entity_id: 1,
232
- type: 'text-varchar-phone',
233
- width: 160,
234
- name: 'téléphone principal',
235
- normalized_name: 'telephone_principal',
236
- is_locked: false,
237
- is_required: false,
238
- is_secret: false,
239
- is_unique: false,
240
- props: []
241
- },
242
- {
243
- id: 6,
244
- link_to_field_id: null,
245
- entity_id: 1,
246
- type: 'text-varchar-url',
247
- width: 160,
248
- name: 'site web',
249
- normalized_name: 'site_web',
250
- is_locked: false,
251
- is_required: false,
252
- is_secret: false,
253
- is_unique: false,
254
- props: []
255
- },
256
- {
257
- id: 18,
258
- link_to_field_id: null,
259
- entity_id: 1,
260
- type: 'text-varchar-default',
261
- width: 160,
262
- name: 'rue',
263
- normalized_name: 'rue',
264
- is_locked: false,
265
- is_required: false,
266
- is_secret: false,
267
- is_unique: false,
268
- props: []
269
- },
270
- {
271
- id: 19,
272
- link_to_field_id: null,
273
- entity_id: 1,
274
- type: 'number-int',
275
- width: 160,
276
- name: 'code postal',
277
- normalized_name: 'code_postal',
278
- is_locked: false,
279
- is_required: false,
280
- is_secret: false,
281
- is_unique: false,
282
- props: []
283
- },
284
- {
285
- id: 8,
286
- link_to_field_id: null,
287
- entity_id: 1,
288
- type: 'text-varchar-default',
289
- width: 160,
290
- name: 'ville',
291
- normalized_name: 'ville',
292
- is_locked: false,
293
- is_required: false,
294
- is_secret: false,
295
- is_unique: false,
296
- props: []
297
- },
298
- {
299
- id: 9,
300
- link_to_field_id: null,
301
- entity_id: 1,
302
- type: 'text-varchar-default',
303
- width: 160,
304
- name: 'pays',
305
- normalized_name: 'pays',
306
- is_locked: false,
307
- is_required: false,
308
- is_secret: false,
309
- is_unique: false,
310
- props: []
311
- },
312
- {
313
- id: 17,
314
- link_to_field_id: null,
315
- entity_id: 1,
316
- type: 'text-textarea',
317
- width: 160,
318
- name: 'notes',
319
- normalized_name: 'notes',
320
- is_locked: false,
321
- is_required: false,
322
- is_secret: false,
323
- is_unique: false,
324
- props: []
325
- },
326
- {
327
- id: 11,
328
- link_to_field_id: null,
329
- entity_id: 1,
330
- type: 'time-updated_at',
331
- width: 160,
332
- name: 'mis à jour le',
333
- normalized_name: 'mis_a_jour_le',
334
- is_locked: false,
335
- is_required: false,
336
- is_secret: false,
337
- is_unique: false,
338
- props: []
339
- },
340
- {
341
- id: 12,
342
- link_to_field_id: null,
343
- entity_id: 1,
344
- type: 'time-created_at',
345
- width: 160,
346
- name: 'Créé le',
347
- normalized_name: 'cree_le',
348
- is_locked: false,
349
- is_required: false,
350
- is_secret: false,
351
- is_unique: false,
352
- props: []
353
- }
354
- ]
355
- })
356
- );
357
- entityRegistry.register(
358
- createEntity({
359
- id: 86,
360
- version: 1,
361
- plural_name: 'produits',
362
- singular_name: 'produit',
363
- normalized_name: 'produits',
364
- slug: 'produits',
365
- symbol: 'C',
366
- can_be_edited: true,
367
- can_be_deleted: true,
368
- is_locked: false,
369
- updated_at: null,
370
- created_at: '2026-07-26 16:53:34',
371
- fields: [
372
- {
373
- id: 371,
374
- link_to_field_id: null,
375
- entity_id: 86,
376
- type: 'primary',
377
- width: 70,
378
- name: 'id',
379
- normalized_name: 'id',
380
- is_locked: true,
381
- is_required: false,
382
- is_secret: false,
383
- is_unique: true,
384
- props: []
385
- },
386
- {
387
- id: 372,
388
- link_to_field_id: null,
389
- entity_id: 86,
390
- type: 'text-varchar-default',
391
- width: 160,
392
- name: 'nom',
393
- normalized_name: 'nom',
394
- is_locked: false,
395
- is_required: true,
396
- is_secret: false,
397
- is_unique: true,
398
- props: []
399
- },
400
- {
401
- id: 373,
402
- link_to_field_id: null,
403
- entity_id: 86,
404
- type: 'number-float-price',
405
- width: 160,
406
- name: 'prix',
407
- normalized_name: 'prix',
408
- is_locked: false,
409
- is_required: true,
410
- is_secret: false,
411
- is_unique: true,
412
- props: []
413
- }
414
- ]
415
- })
416
- );
417
- entityRegistry.register(
418
- createEntity({
419
- id: 2,
420
- version: 1,
421
- plural_name: 'lignes de facture',
422
- singular_name: 'ligne de facture',
423
- normalized_name: 'lignes_de_facture',
424
- slug: 'lignes-de-facture',
425
- symbol: '#',
426
- can_be_edited: true,
427
- can_be_deleted: true,
428
- is_locked: false,
429
- updated_at: null,
430
- created_at: '2026-07-26 16:53:34',
431
- fields: [
432
- {
433
- id: 201,
434
- link_to_field_id: null,
435
- entity_id: 2,
436
- type: 'primary',
437
- width: 70,
438
- name: 'id',
439
- normalized_name: 'id',
440
- is_locked: true,
441
- is_required: false,
442
- is_secret: false,
443
- is_unique: true,
444
- props: []
445
- },
446
- {
447
- id: 209,
448
- link_to_field_id: null,
449
- entity_id: 2,
450
- type: 'link',
451
- width: 160,
452
- name: 'produit',
453
- normalized_name: 'produit',
454
- is_locked: false,
455
- is_required: false,
456
- is_secret: false,
457
- is_unique: false,
458
- props: {
459
- linkId: 86,
460
- multiple: false,
461
- display: '{structure.symbol}{element.id} - {element.nom}, {element.prix}€'
462
- }
463
- },
464
- {
465
- id: 205,
466
- link_to_field_id: null,
467
- entity_id: 2,
468
- type: 'number-int',
469
- width: 160,
470
- name: 'quantité',
471
- normalized_name: 'quantite',
472
- is_locked: false,
473
- is_required: false,
474
- is_secret: false,
475
- is_unique: false,
476
- props: []
477
- },
478
- {
479
- id: 206,
480
- link_to_field_id: null,
481
- entity_id: 2,
482
- type: 'number-int',
483
- width: 160,
484
- name: 'prix',
485
- normalized_name: 'prix',
486
- is_locked: false,
487
- is_required: false,
488
- is_secret: false,
489
- is_unique: false,
490
- props: []
491
- },
492
- {
493
- id: 207,
494
- link_to_field_id: null,
495
- entity_id: 2,
496
- type: 'calculation-column',
497
- width: 160,
498
- name: 'total',
499
- normalized_name: 'total',
500
- is_locked: false,
501
- is_required: false,
502
- is_secret: false,
503
- is_unique: false,
504
- props: {
505
- column1: 373,
506
- operator: '*',
507
- column2: 205
508
- }
509
- },
510
- {
511
- id: 232,
512
- link_to_field_id: null,
513
- entity_id: 2,
514
- type: 'calculation-column',
515
- width: 160,
516
- name: 'total 2',
517
- normalized_name: 'total 2',
518
- is_locked: false,
519
- is_required: false,
520
- is_secret: false,
521
- is_unique: false,
522
- props: {
523
- column1: 206,
524
- operator: '*',
525
- column2: 207
526
- }
527
- }
528
- ]
529
- })
530
- );
531
- entityRegistry.register(
532
- createEntity({
533
- id: 3,
534
- version: 1,
535
- plural_name: 'factures',
536
- singular_name: 'facture',
537
- normalized_name: 'factures',
538
- slug: 'factures',
539
- symbol: '#',
540
- can_be_edited: true,
541
- can_be_deleted: true,
542
- is_locked: false,
543
- updated_at: null,
544
- created_at: '2026-07-26 16:53:34',
545
- fields: [
546
- {
547
- id: 301,
548
- link_to_field_id: null,
549
- entity_id: 3,
550
- type: 'primary',
551
- width: 70,
552
- name: 'id',
553
- normalized_name: 'id',
554
- is_locked: true,
555
- is_required: false,
556
- is_secret: false,
557
- is_unique: true,
558
- props: []
559
- },
560
- {
561
- id: 305,
562
- link_to_field_id: null,
563
- entity_id: 3,
564
- type: 'lines',
565
- width: 160,
566
- name: 'lignes',
567
- normalized_name: 'lignes',
568
- is_locked: false,
569
- is_required: false,
570
- is_secret: false,
571
- is_unique: false,
572
- props: {
573
- linkId: 2,
574
- columns: [
575
- {
576
- columnIndex: 0,
577
- rows: [
578
- {
579
- rowIndex: 0,
580
- type: null,
581
- fieldId: 205
582
- },
583
- {
584
- rowIndex: 0,
585
- type: null,
586
- fieldId: 209
587
- }
588
- ],
589
- name: 'details'
590
- },
591
- {
592
- columnIndex: 1,
593
- rows: [
594
- {
595
- rowIndex: 0,
596
- type: null,
597
- fieldId: 206
598
- }
599
- ],
600
- name: 'qtt'
601
- },
602
- {
603
- columnIndex: 2,
604
- rows: [
605
- {
606
- rowIndex: 0,
607
- type: null,
608
- fieldId: 207
609
- },
610
- {
611
- rowIndex: 0,
612
- type: null,
613
- fieldId: 232
614
- }
615
- ],
616
- name: 'tot'
617
- }
618
- ]
619
- }
620
- },
621
- {
622
- id: 456,
623
- link_to_field_id: null,
624
- entity_id: 2,
625
- type: 'calculation-line',
626
- width: 160,
627
- name: 'total de ligne',
628
- normalized_name: 'total de ligne',
629
- is_locked: false,
630
- is_required: false,
631
- is_secret: false,
632
- is_unique: false,
633
- props: {
634
- fieldId: 305,
635
- operator: '-',
636
- lineFieldId: 207
637
- }
638
- }
639
- ]
640
- })
641
- );
67
+ // entityRegistry.register(
68
+ // createEntity({
69
+ // id: 1,
70
+ // version: 1,
71
+ // plural_name: 'clients',
72
+ // singular_name: 'client',
73
+ // normalized_name: 'clients',
74
+ // slug: 'clients',
75
+ // symbol: 'C',
76
+ // can_be_edited: true,
77
+ // can_be_deleted: true,
78
+ // is_locked: false,
79
+ // updated_at: null,
80
+ // created_at: '2026-07-26 16:53:34',
81
+ // fields: [
82
+ // {
83
+ // id: 1,
84
+ // link_to_field_id: null,
85
+ // entity_id: 1,
86
+ // type: 'primary',
87
+ // width: 70,
88
+ // name: 'id',
89
+ // normalized_name: 'id',
90
+ // is_locked: true,
91
+ // is_required: false,
92
+ // is_secret: false,
93
+ // is_unique: true,
94
+ // props: []
95
+ // },
96
+ // {
97
+ // id: 2,
98
+ // link_to_field_id: null,
99
+ // entity_id: 1,
100
+ // type: 'text-varchar-default',
101
+ // width: 160,
102
+ // name: 'nom',
103
+ // normalized_name: 'nom',
104
+ // is_locked: false,
105
+ // is_required: true,
106
+ // is_secret: false,
107
+ // is_unique: true,
108
+ // props: []
109
+ // },
110
+ // {
111
+ // id: 3,
112
+ // link_to_field_id: null,
113
+ // entity_id: 1,
114
+ // type: 'text-varchar-email',
115
+ // width: 160,
116
+ // name: 'email principal',
117
+ // normalized_name: 'email_principal',
118
+ // is_locked: false,
119
+ // is_required: true,
120
+ // is_secret: false,
121
+ // is_unique: true,
122
+ // props: []
123
+ // },
124
+ // {
125
+ // id: 13,
126
+ // link_to_field_id: null,
127
+ // entity_id: 1,
128
+ // type: 'text-varchar-default',
129
+ // width: 160,
130
+ // name: 'TVA',
131
+ // normalized_name: 'tva',
132
+ // is_locked: false,
133
+ // is_required: false,
134
+ // is_secret: false,
135
+ // is_unique: true,
136
+ // props: []
137
+ // },
138
+ // {
139
+ // id: 14,
140
+ // link_to_field_id: null,
141
+ // entity_id: 1,
142
+ // type: 'text-varchar-default',
143
+ // width: 160,
144
+ // name: 'SIRET / ICE',
145
+ // normalized_name: 'siret_ice',
146
+ // is_locked: false,
147
+ // is_required: false,
148
+ // is_secret: false,
149
+ // is_unique: true,
150
+ // props: []
151
+ // },
152
+ // {
153
+ // id: 4,
154
+ // link_to_field_id: null,
155
+ // entity_id: 1,
156
+ // type: 'list-radio',
157
+ // width: 160,
158
+ // name: 'type',
159
+ // normalized_name: 'type',
160
+ // is_locked: false,
161
+ // is_required: true,
162
+ // is_secret: false,
163
+ // is_unique: false,
164
+ // props: {
165
+ // choices: [
166
+ // {
167
+ // value: 'Entreprise',
168
+ // color: '--blue'
169
+ // },
170
+ // {
171
+ // value: 'Particulier',
172
+ // color: '--green'
173
+ // }
174
+ // ]
175
+ // }
176
+ // },
177
+ // {
178
+ // id: 16,
179
+ // link_to_field_id: null,
180
+ // entity_id: 1,
181
+ // type: 'list-radio',
182
+ // width: 160,
183
+ // name: 'status',
184
+ // normalized_name: 'status',
185
+ // is_locked: false,
186
+ // is_required: true,
187
+ // is_secret: false,
188
+ // is_unique: false,
189
+ // props: {
190
+ // choices: [
191
+ // {
192
+ // value: 'Actif',
193
+ // color: '--green'
194
+ // },
195
+ // {
196
+ // value: 'Inactif',
197
+ // color: '--orange'
198
+ // },
199
+ // {
200
+ // value: 'Bloqué',
201
+ // color: '--red'
202
+ // },
203
+ // {
204
+ // value: 'Archivé',
205
+ // color: '--yellow'
206
+ // }
207
+ // ]
208
+ // }
209
+ // },
210
+ // {
211
+ // id: 15,
212
+ // link_to_field_id: null,
213
+ // entity_id: 1,
214
+ // type: 'list-radio',
215
+ // width: 160,
216
+ // name: "taille de l'entreprise",
217
+ // normalized_name: 'taille_de_lentreprise',
218
+ // is_locked: false,
219
+ // is_required: false,
220
+ // is_secret: false,
221
+ // is_unique: false,
222
+ // props: {
223
+ // choices: [
224
+ // {
225
+ // value: 'Indépendant',
226
+ // color: '--green'
227
+ // },
228
+ // {
229
+ // value: 'TPE (1-9)',
230
+ // color: '--blue'
231
+ // },
232
+ // {
233
+ // value: 'PME (10-249)',
234
+ // color: '--mauve'
235
+ // },
236
+ // {
237
+ // value: 'Grande entreprise (250+)',
238
+ // color: '--orange'
239
+ // }
240
+ // ]
241
+ // }
242
+ // },
243
+ // {
244
+ // id: 5,
245
+ // link_to_field_id: null,
246
+ // entity_id: 1,
247
+ // type: 'text-varchar-phone',
248
+ // width: 160,
249
+ // name: 'téléphone principal',
250
+ // normalized_name: 'telephone_principal',
251
+ // is_locked: false,
252
+ // is_required: false,
253
+ // is_secret: false,
254
+ // is_unique: false,
255
+ // props: []
256
+ // },
257
+ // {
258
+ // id: 6,
259
+ // link_to_field_id: null,
260
+ // entity_id: 1,
261
+ // type: 'text-varchar-url',
262
+ // width: 160,
263
+ // name: 'site web',
264
+ // normalized_name: 'site_web',
265
+ // is_locked: false,
266
+ // is_required: false,
267
+ // is_secret: false,
268
+ // is_unique: false,
269
+ // props: []
270
+ // },
271
+ // {
272
+ // id: 18,
273
+ // link_to_field_id: null,
274
+ // entity_id: 1,
275
+ // type: 'text-varchar-default',
276
+ // width: 160,
277
+ // name: 'rue',
278
+ // normalized_name: 'rue',
279
+ // is_locked: false,
280
+ // is_required: false,
281
+ // is_secret: false,
282
+ // is_unique: false,
283
+ // props: []
284
+ // },
285
+ // {
286
+ // id: 19,
287
+ // link_to_field_id: null,
288
+ // entity_id: 1,
289
+ // type: 'number-int',
290
+ // width: 160,
291
+ // name: 'code postal',
292
+ // normalized_name: 'code_postal',
293
+ // is_locked: false,
294
+ // is_required: false,
295
+ // is_secret: false,
296
+ // is_unique: false,
297
+ // props: []
298
+ // },
299
+ // {
300
+ // id: 8,
301
+ // link_to_field_id: null,
302
+ // entity_id: 1,
303
+ // type: 'text-varchar-default',
304
+ // width: 160,
305
+ // name: 'ville',
306
+ // normalized_name: 'ville',
307
+ // is_locked: false,
308
+ // is_required: false,
309
+ // is_secret: false,
310
+ // is_unique: false,
311
+ // props: []
312
+ // },
313
+ // {
314
+ // id: 9,
315
+ // link_to_field_id: null,
316
+ // entity_id: 1,
317
+ // type: 'text-varchar-default',
318
+ // width: 160,
319
+ // name: 'pays',
320
+ // normalized_name: 'pays',
321
+ // is_locked: false,
322
+ // is_required: false,
323
+ // is_secret: false,
324
+ // is_unique: false,
325
+ // props: []
326
+ // },
327
+ // {
328
+ // id: 17,
329
+ // link_to_field_id: null,
330
+ // entity_id: 1,
331
+ // type: 'text-textarea',
332
+ // width: 160,
333
+ // name: 'notes',
334
+ // normalized_name: 'notes',
335
+ // is_locked: false,
336
+ // is_required: false,
337
+ // is_secret: false,
338
+ // is_unique: false,
339
+ // props: []
340
+ // },
341
+ // {
342
+ // id: 11,
343
+ // link_to_field_id: null,
344
+ // entity_id: 1,
345
+ // type: 'time-updated_at',
346
+ // width: 160,
347
+ // name: 'mis à jour le',
348
+ // normalized_name: 'mis_a_jour_le',
349
+ // is_locked: false,
350
+ // is_required: false,
351
+ // is_secret: false,
352
+ // is_unique: false,
353
+ // props: []
354
+ // },
355
+ // {
356
+ // id: 12,
357
+ // link_to_field_id: null,
358
+ // entity_id: 1,
359
+ // type: 'time-created_at',
360
+ // width: 160,
361
+ // name: 'Créé le',
362
+ // normalized_name: 'cree_le',
363
+ // is_locked: false,
364
+ // is_required: false,
365
+ // is_secret: false,
366
+ // is_unique: false,
367
+ // props: []
368
+ // }
369
+ // ]
370
+ // })
371
+ // );
372
+ // entityRegistry.register(
373
+ // createEntity({
374
+ // id: 86,
375
+ // version: 1,
376
+ // plural_name: 'produits',
377
+ // singular_name: 'produit',
378
+ // normalized_name: 'produits',
379
+ // slug: 'produits',
380
+ // symbol: 'C',
381
+ // can_be_edited: true,
382
+ // can_be_deleted: true,
383
+ // is_locked: false,
384
+ // updated_at: null,
385
+ // created_at: '2026-07-26 16:53:34',
386
+ // fields: [
387
+ // {
388
+ // id: 371,
389
+ // link_to_field_id: null,
390
+ // entity_id: 86,
391
+ // type: 'primary',
392
+ // width: 70,
393
+ // name: 'id',
394
+ // normalized_name: 'id',
395
+ // is_locked: true,
396
+ // is_required: false,
397
+ // is_secret: false,
398
+ // is_unique: true,
399
+ // props: []
400
+ // },
401
+ // {
402
+ // id: 372,
403
+ // link_to_field_id: null,
404
+ // entity_id: 86,
405
+ // type: 'text-varchar-default',
406
+ // width: 160,
407
+ // name: 'nom',
408
+ // normalized_name: 'nom',
409
+ // is_locked: false,
410
+ // is_required: true,
411
+ // is_secret: false,
412
+ // is_unique: true,
413
+ // props: []
414
+ // },
415
+ // {
416
+ // id: 373,
417
+ // link_to_field_id: null,
418
+ // entity_id: 86,
419
+ // type: 'number-float-price',
420
+ // width: 160,
421
+ // name: 'prix',
422
+ // normalized_name: 'prix',
423
+ // is_locked: false,
424
+ // is_required: true,
425
+ // is_secret: false,
426
+ // is_unique: true,
427
+ // props: []
428
+ // }
429
+ // ]
430
+ // })
431
+ // );
432
+ // entityRegistry.register(
433
+ // createEntity({
434
+ // id: 2,
435
+ // version: 1,
436
+ // plural_name: 'lignes de facture',
437
+ // singular_name: 'ligne de facture',
438
+ // normalized_name: 'lignes_de_facture',
439
+ // slug: 'lignes-de-facture',
440
+ // symbol: '#',
441
+ // can_be_edited: true,
442
+ // can_be_deleted: true,
443
+ // is_locked: false,
444
+ // updated_at: null,
445
+ // created_at: '2026-07-26 16:53:34',
446
+ // fields: [
447
+ // {
448
+ // id: 201,
449
+ // link_to_field_id: null,
450
+ // entity_id: 2,
451
+ // type: 'primary',
452
+ // width: 70,
453
+ // name: 'id',
454
+ // normalized_name: 'id',
455
+ // is_locked: true,
456
+ // is_required: false,
457
+ // is_secret: false,
458
+ // is_unique: true,
459
+ // props: []
460
+ // },
461
+ // {
462
+ // id: 209,
463
+ // link_to_field_id: null,
464
+ // entity_id: 2,
465
+ // type: 'link',
466
+ // width: 160,
467
+ // name: 'produit',
468
+ // normalized_name: 'produit',
469
+ // is_locked: false,
470
+ // is_required: false,
471
+ // is_secret: false,
472
+ // is_unique: false,
473
+ // props: {
474
+ // linkId: 86,
475
+ // multiple: false,
476
+ // display: '{structure.symbol}{element.id} - {element.nom}, {element.prix}€'
477
+ // }
478
+ // },
479
+ // {
480
+ // id: 205,
481
+ // link_to_field_id: null,
482
+ // entity_id: 2,
483
+ // type: 'number-int',
484
+ // width: 160,
485
+ // name: 'quantité',
486
+ // normalized_name: 'quantite',
487
+ // is_locked: false,
488
+ // is_required: false,
489
+ // is_secret: false,
490
+ // is_unique: false,
491
+ // props: []
492
+ // },
493
+ // {
494
+ // id: 206,
495
+ // link_to_field_id: null,
496
+ // entity_id: 2,
497
+ // type: 'number-int',
498
+ // width: 160,
499
+ // name: 'prix',
500
+ // normalized_name: 'prix',
501
+ // is_locked: false,
502
+ // is_required: false,
503
+ // is_secret: false,
504
+ // is_unique: false,
505
+ // props: []
506
+ // },
507
+ // {
508
+ // id: 207,
509
+ // link_to_field_id: null,
510
+ // entity_id: 2,
511
+ // type: 'calculation-column',
512
+ // width: 160,
513
+ // name: 'total',
514
+ // normalized_name: 'total',
515
+ // is_locked: false,
516
+ // is_required: false,
517
+ // is_secret: false,
518
+ // is_unique: false,
519
+ // props: {
520
+ // column1: 373,
521
+ // operator: '*',
522
+ // column2: 205
523
+ // }
524
+ // },
525
+ // {
526
+ // id: 232,
527
+ // link_to_field_id: null,
528
+ // entity_id: 2,
529
+ // type: 'calculation-column',
530
+ // width: 160,
531
+ // name: 'total 2',
532
+ // normalized_name: 'total 2',
533
+ // is_locked: false,
534
+ // is_required: false,
535
+ // is_secret: false,
536
+ // is_unique: false,
537
+ // props: {
538
+ // column1: 206,
539
+ // operator: '*',
540
+ // column2: 207
541
+ // }
542
+ // }
543
+ // ]
544
+ // })
545
+ // );
546
+ // entityRegistry.register(
547
+ // createEntity({
548
+ // id: 3,
549
+ // version: 1,
550
+ // plural_name: 'factures',
551
+ // singular_name: 'facture',
552
+ // normalized_name: 'factures',
553
+ // slug: 'factures',
554
+ // symbol: '#',
555
+ // can_be_edited: true,
556
+ // can_be_deleted: true,
557
+ // is_locked: false,
558
+ // updated_at: null,
559
+ // created_at: '2026-07-26 16:53:34',
560
+ // fields: [
561
+ // {
562
+ // id: 301,
563
+ // link_to_field_id: null,
564
+ // entity_id: 3,
565
+ // type: 'primary',
566
+ // width: 70,
567
+ // name: 'id',
568
+ // normalized_name: 'id',
569
+ // is_locked: true,
570
+ // is_required: false,
571
+ // is_secret: false,
572
+ // is_unique: true,
573
+ // props: []
574
+ // },
575
+ // {
576
+ // id: 305,
577
+ // link_to_field_id: null,
578
+ // entity_id: 3,
579
+ // type: 'lines',
580
+ // width: 160,
581
+ // name: 'lignes',
582
+ // normalized_name: 'lignes',
583
+ // is_locked: false,
584
+ // is_required: false,
585
+ // is_secret: false,
586
+ // is_unique: false,
587
+ // props: {
588
+ // linkId: 2,
589
+ // columns: [
590
+ // {
591
+ // columnIndex: 0,
592
+ // rows: [
593
+ // {
594
+ // rowIndex: 0,
595
+ // type: null,
596
+ // fieldId: 205
597
+ // },
598
+ // {
599
+ // rowIndex: 0,
600
+ // type: null,
601
+ // fieldId: 209
602
+ // }
603
+ // ],
604
+ // name: 'details'
605
+ // },
606
+ // {
607
+ // columnIndex: 1,
608
+ // rows: [
609
+ // {
610
+ // rowIndex: 0,
611
+ // type: null,
612
+ // fieldId: 206
613
+ // }
614
+ // ],
615
+ // name: 'qtt'
616
+ // },
617
+ // {
618
+ // columnIndex: 2,
619
+ // rows: [
620
+ // {
621
+ // rowIndex: 0,
622
+ // type: null,
623
+ // fieldId: 207
624
+ // },
625
+ // {
626
+ // rowIndex: 0,
627
+ // type: null,
628
+ // fieldId: 232
629
+ // }
630
+ // ],
631
+ // name: 'tot'
632
+ // }
633
+ // ]
634
+ // }
635
+ // },
636
+ // {
637
+ // id: 456,
638
+ // link_to_field_id: null,
639
+ // entity_id: 2,
640
+ // type: 'calculation-line',
641
+ // width: 160,
642
+ // name: 'total de ligne',
643
+ // normalized_name: 'total de ligne',
644
+ // is_locked: false,
645
+ // is_required: false,
646
+ // is_secret: false,
647
+ // is_unique: false,
648
+ // props: {
649
+ // fieldId: 305,
650
+ // operator: '-',
651
+ // lineFieldId: 207
652
+ // }
653
+ // }
654
+ // ]
655
+ // })
656
+ // );
642
657
 
643
658
  isMount = true;
644
659
  });