@quazardous/qdadm 2.2.2 → 2.3.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
|
@@ -80,6 +80,14 @@ defineProps({
|
|
|
80
80
|
sortOrder: {
|
|
81
81
|
type: Number as PropType<1 | -1>,
|
|
82
82
|
default: 1
|
|
83
|
+
},
|
|
84
|
+
/**
|
|
85
|
+
* Extra props forwarded verbatim to the PrimeVue DataTable (#1217) —
|
|
86
|
+
* e.g. { nullSortOrder: -1 } to sort null values last.
|
|
87
|
+
*/
|
|
88
|
+
tableProps: {
|
|
89
|
+
type: Object as PropType<Record<string, unknown>>,
|
|
90
|
+
default: () => ({})
|
|
83
91
|
}
|
|
84
92
|
})
|
|
85
93
|
|
|
@@ -110,6 +118,7 @@ function onSort(event: DataTableSortEvent): void {
|
|
|
110
118
|
:sortOrder="sortOrder"
|
|
111
119
|
:stripedRows="stripedRows"
|
|
112
120
|
:removableSort="removableSort"
|
|
121
|
+
v-bind="tableProps"
|
|
113
122
|
@update:selection="onSelectionChange"
|
|
114
123
|
@sort="onSort"
|
|
115
124
|
class="default-table"
|
|
@@ -86,6 +86,12 @@ const props = defineProps({
|
|
|
86
86
|
|
|
87
87
|
// Table data
|
|
88
88
|
items: { type: Array as PropType<unknown[]>, required: true },
|
|
89
|
+
/**
|
|
90
|
+
* Extra props forwarded verbatim to the underlying PrimeVue DataTable
|
|
91
|
+
* (#1217) — e.g. { nullSortOrder: -1 } to sort null values last. Bound
|
|
92
|
+
* last, so they can override the defaults ListPage sets.
|
|
93
|
+
*/
|
|
94
|
+
tableProps: { type: Object as PropType<Record<string, unknown>>, default: () => ({}) },
|
|
89
95
|
loading: { type: Boolean, default: false },
|
|
90
96
|
dataKey: { type: String, default: 'id' },
|
|
91
97
|
|
|
@@ -441,6 +447,7 @@ function getFilterClass(filter: FilterConfig): Record<string, boolean> {
|
|
|
441
447
|
:class="{ 'datatable-row-clickable': hasRowTapAction }"
|
|
442
448
|
stripedRows
|
|
443
449
|
removableSort
|
|
450
|
+
v-bind="tableProps"
|
|
444
451
|
>
|
|
445
452
|
<!-- Columns from slot -->
|
|
446
453
|
<slot name="columns" ></slot>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TestManager - Auto-generated EntityManager
|
|
3
|
+
*
|
|
4
|
+
* Generated by qdadm/gen/generateManagers
|
|
5
|
+
* DO NOT EDIT MANUALLY - Changes will be overwritten
|
|
6
|
+
*
|
|
7
|
+
* Entity: test
|
|
8
|
+
* Endpoint: /test
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { EntityManager } from '@quazardous/qdadm'
|
|
12
|
+
import type { EntityRecord } from '@quazardous/qdadm'
|
|
13
|
+
import { ApiStorage } from '@quazardous/qdadm'
|
|
14
|
+
|
|
15
|
+
export interface TestEntity extends EntityRecord {
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Schema definition for test
|
|
20
|
+
*/
|
|
21
|
+
export const testSchema = {
|
|
22
|
+
name: "test",
|
|
23
|
+
endpoint: "/test",
|
|
24
|
+
fields: {}
|
|
25
|
+
} as const
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Storage options for test
|
|
29
|
+
*/
|
|
30
|
+
const storageOptions = {
|
|
31
|
+
endpoint: "/test"
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* TestManager instance
|
|
36
|
+
*
|
|
37
|
+
* Provides CRUD operations for test entity.
|
|
38
|
+
*/
|
|
39
|
+
export const testManager = new EntityManager<TestEntity>({
|
|
40
|
+
...{
|
|
41
|
+
name: "test",
|
|
42
|
+
idField: "id",
|
|
43
|
+
fields: {}
|
|
44
|
+
},
|
|
45
|
+
storage: new ApiStorage<TestEntity>(storageOptions)
|
|
46
|
+
})
|