adminforth 1.1.10 → 1.1.11
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -114,7 +114,7 @@ const loading = ref(true);
|
|
|
114
114
|
const page = ref(1);
|
|
115
115
|
const sort = ref([]);
|
|
116
116
|
const checkboxes = ref([]);
|
|
117
|
-
const pageSize = computed(() =>
|
|
117
|
+
const pageSize = computed(() => listResource.value?.options?.pageSize || 10);
|
|
118
118
|
|
|
119
119
|
const rows = ref(null);
|
|
120
120
|
const totalRows = ref(0);
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { AdminForthResource, AdminForthResourcePages, AdminForthClass, GenericHttpServer } from "../../types/AdminForthConfig.js";
|
|
2
2
|
import AdminForthPlugin from "../base.js";
|
|
3
|
+
import { PluginOptions } from "./types.js";
|
|
3
4
|
|
|
4
|
-
type PluginOptions = {
|
|
5
|
-
foreignResourceId: string;
|
|
6
|
-
listPageSize?: number;
|
|
7
|
-
modifyTableResourceConfig?: (resourceConfig: AdminForthResource) => void;
|
|
8
|
-
}
|
|
9
5
|
|
|
10
6
|
export default class ForeignInlineListPlugin extends AdminForthPlugin {
|
|
11
7
|
foreignResource: AdminForthResource;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
|
|
2
|
+
import { AdminForthResource } from '../../types/AdminForthConfig.js';
|
|
3
|
+
|
|
4
|
+
export type PluginOptions = {
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Id of the resource to be displayed in the inline list.
|
|
8
|
+
*
|
|
9
|
+
* Resource mandatory should have one columns which defined {@link AdminForthResourceColumn.foreignResource} which
|
|
10
|
+
* should be equal to the resourceId of the resource where plugin is used.
|
|
11
|
+
*/
|
|
12
|
+
foreignResourceId: string;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Function to modify the resource config of the table.
|
|
16
|
+
* Can be used to define list of columns visible in the inline list.
|
|
17
|
+
* Or modify listPageSize
|
|
18
|
+
*
|
|
19
|
+
* @param resourceConfig - Resource config of the table.
|
|
20
|
+
*/
|
|
21
|
+
modifyTableResourceConfig?: (resourceConfig: AdminForthResource) => void;
|
|
22
|
+
}
|