qdadm 0.42.0 → 0.44.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qdadm",
3
- "version": "0.42.0",
3
+ "version": "0.44.0",
4
4
  "description": "Vue 3 framework for admin dashboards with PrimeVue",
5
5
  "author": "quazardous",
6
6
  "license": "MIT",
@@ -299,7 +299,14 @@ export class EntitiesCollector extends Collector {
299
299
  key,
300
300
  entity: config.entity,
301
301
  endpoint: config.endpoint || null
302
- }))
302
+ })),
303
+ // Field references (reference: { entity: 'x' } in field config)
304
+ references: Object.entries(manager.fields || {})
305
+ .filter(([, field]) => field.reference?.entity)
306
+ .map(([fieldName, field]) => ({
307
+ field: fieldName,
308
+ entity: field.reference.entity
309
+ }))
303
310
  }
304
311
  }
305
312
  }
@@ -243,15 +243,18 @@ function getCapabilityLabel(cap) {
243
243
  {{ entity.fields.required.length }} required
244
244
  </span>
245
245
  </div>
246
- <div v-if="entity.relations.parents.length > 0 || entity.relations.children.length > 0" class="entity-row">
246
+ <div v-if="entity.relations.parents.length > 0 || entity.relations.children.length > 0 || entity.relations.references?.length > 0" class="entity-row">
247
247
  <span class="entity-key">Relations:</span>
248
248
  <span class="entity-value">
249
- <span v-for="p in entity.relations.parents" :key="p.key" class="entity-relation">
249
+ <span v-for="p in entity.relations.parents" :key="p.key" class="entity-relation" title="Parent relation">
250
250
  <i class="pi pi-arrow-up" />{{ p.key }}→{{ p.entity }}
251
251
  </span>
252
- <span v-for="c in entity.relations.children" :key="c.key" class="entity-relation">
252
+ <span v-for="c in entity.relations.children" :key="c.key" class="entity-relation" title="Child relation">
253
253
  <i class="pi pi-arrow-down" />{{ c.key }}→{{ c.entity }}
254
254
  </span>
255
+ <span v-for="r in entity.relations.references" :key="r.field" class="entity-relation entity-reference" title="Field reference">
256
+ <i class="pi pi-link" />{{ r.field }}→{{ r.entity }}
257
+ </span>
255
258
  </span>
256
259
  </div>
257
260
  <!-- Operation stats -->
@@ -623,6 +626,10 @@ function getCapabilityLabel(cap) {
623
626
  .entity-relation .pi {
624
627
  font-size: 8px;
625
628
  }
629
+ .entity-reference {
630
+ background: #1e3a5f;
631
+ color: #93c5fd;
632
+ }
626
633
  /* Stats */
627
634
  .entity-stats {
628
635
  margin-top: 8px;
@@ -227,7 +227,10 @@ function hasParams(obj) {
227
227
  v-for="route in routes"
228
228
  :key="route.path"
229
229
  class="route-entry"
230
- :class="{ 'route-current-entry': currentRoute?.name === route.name }"
230
+ :class="{
231
+ 'route-current-entry': currentRoute?.name === route.name,
232
+ 'route-internal': route.name?.startsWith('_')
233
+ }"
231
234
  >
232
235
  <div class="route-entry-header">
233
236
  <span class="route-entry-name">{{ route.name }}</span>
@@ -605,6 +608,14 @@ function hasParams(obj) {
605
608
  padding-left: 6px;
606
609
  }
607
610
 
611
+ .route-internal {
612
+ opacity: 0.6;
613
+ }
614
+
615
+ .route-internal .route-entry-name {
616
+ font-style: italic;
617
+ }
618
+
608
619
  .route-entry-header {
609
620
  display: flex;
610
621
  align-items: center;
@@ -608,6 +608,7 @@ export class Kernel {
608
608
  routes = [
609
609
  {
610
610
  path: '/',
611
+ name: '_shell',
611
612
  component: pages.shell,
612
613
  children: [
613
614
  // Public routes at shell level (login, register, etc.)
@@ -615,6 +616,7 @@ export class Kernel {
615
616
  // Protected area with layout
616
617
  {
617
618
  path: '',
619
+ name: '_layout',
618
620
  component: pages.layout,
619
621
  meta: { requiresAuth: true },
620
622
  children: layoutChildren
@@ -631,6 +633,7 @@ export class Kernel {
631
633
  // Protected area with layout
632
634
  {
633
635
  path: '/',
636
+ name: '_layout',
634
637
  component: pages.layout,
635
638
  meta: { requiresAuth: true },
636
639
  children: layoutChildren