qdadm 0.43.0 → 0.45.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.43.0",
3
+ "version": "0.45.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;
@@ -754,7 +754,7 @@ export class EntityManager {
754
754
 
755
755
  try {
756
756
  // Fetch all items from referenced entity
757
- const { items } = await refManager.list({ limit: 1000 })
757
+ const { items } = await refManager.list({ page_size: 1000 })
758
758
 
759
759
  // Build options array
760
760
  const refLabelField = labelField || refManager.labelField || 'label'
@@ -116,7 +116,7 @@ export class EntityRoleGranterAdapter extends RoleGranterAdapter {
116
116
  }
117
117
 
118
118
  try {
119
- const { data: roles } = await manager.list({ limit: 1000 })
119
+ const { items: roles } = await manager.list({ page_size: 1000 })
120
120
 
121
121
  // Build cache
122
122
  const permissions = {}