@adminforth/many2many 1.3.3 → 2.0.1
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/build.log +2 -2
- package/custom/ManyToManyInput.vue +0 -1
- package/custom/ManyToManyShow.vue +16 -4
- package/dist/custom/ManyToManyInput.vue +0 -1
- package/dist/custom/ManyToManyShow.vue +16 -4
- package/dist/index.js +1 -0
- package/index.ts +1 -0
- package/package.json +3 -3
package/build.log
CHANGED
|
@@ -8,5 +8,5 @@ custom/ManyToManyInput.vue
|
|
|
8
8
|
custom/ManyToManyShow.vue
|
|
9
9
|
custom/tsconfig.json
|
|
10
10
|
|
|
11
|
-
sent
|
|
12
|
-
total size is
|
|
11
|
+
sent 5,409 bytes received 77 bytes 10,972.00 bytes/sec
|
|
12
|
+
total size is 5,131 speedup is 0.94
|
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
<!-- linked records are chips, like the foreign key arrays of core -->
|
|
3
|
+
<span class="af-many2many-show flex flex-wrap">
|
|
4
|
+
<span
|
|
5
|
+
v-for="value in values"
|
|
6
|
+
:key="value.value"
|
|
7
|
+
class="inline-flex items-center rounded-full m-0.5 h-5 px-2 text-xs font-medium bg-lightButtonGroupActiveBackground text-lightButtonGroupActiveText dark:bg-darkButtonGroupActiveBackground dark:text-darkButtonGroupActiveText"
|
|
8
|
+
>
|
|
9
|
+
<RouterLink
|
|
10
|
+
:to="`/resource/${props.meta.linkedResourceId}/show/${value.value}`"
|
|
11
|
+
class="font-medium whitespace-nowrap hover:underline"
|
|
12
|
+
>
|
|
13
|
+
{{ value.label }}
|
|
14
|
+
</RouterLink>
|
|
15
|
+
</span>
|
|
16
|
+
</span>
|
|
5
17
|
</template>
|
|
6
18
|
|
|
7
19
|
<script lang="ts" setup>
|
|
8
20
|
import { onMounted, ref } from 'vue';
|
|
9
21
|
import { callAdminForthApi } from '@/utils';
|
|
10
|
-
import {
|
|
22
|
+
import { RouterLink } from 'vue-router';
|
|
11
23
|
|
|
12
24
|
|
|
13
25
|
const props = defineProps<{
|
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
<!-- linked records are chips, like the foreign key arrays of core -->
|
|
3
|
+
<span class="af-many2many-show flex flex-wrap">
|
|
4
|
+
<span
|
|
5
|
+
v-for="value in values"
|
|
6
|
+
:key="value.value"
|
|
7
|
+
class="inline-flex items-center rounded-full m-0.5 h-5 px-2 text-xs font-medium bg-lightButtonGroupActiveBackground text-lightButtonGroupActiveText dark:bg-darkButtonGroupActiveBackground dark:text-darkButtonGroupActiveText"
|
|
8
|
+
>
|
|
9
|
+
<RouterLink
|
|
10
|
+
:to="`/resource/${props.meta.linkedResourceId}/show/${value.value}`"
|
|
11
|
+
class="font-medium whitespace-nowrap hover:underline"
|
|
12
|
+
>
|
|
13
|
+
{{ value.label }}
|
|
14
|
+
</RouterLink>
|
|
15
|
+
</span>
|
|
16
|
+
</span>
|
|
5
17
|
</template>
|
|
6
18
|
|
|
7
19
|
<script lang="ts" setup>
|
|
8
20
|
import { onMounted, ref } from 'vue';
|
|
9
21
|
import { callAdminForthApi } from '@/utils';
|
|
10
|
-
import {
|
|
22
|
+
import { RouterLink } from 'vue-router';
|
|
11
23
|
|
|
12
24
|
|
|
13
25
|
const props = defineProps<{
|
package/dist/index.js
CHANGED
|
@@ -198,6 +198,7 @@ export default class ManyToManyPlugin extends AdminForthPlugin {
|
|
|
198
198
|
server.endpoint({
|
|
199
199
|
method: 'POST',
|
|
200
200
|
path: `/plugin/${this.pluginInstanceId}/get-junctionResource-records`,
|
|
201
|
+
agent: { hiddenFromAgents: true },
|
|
201
202
|
request_schema: getJunctionRecordsBodySchema,
|
|
202
203
|
handler: (_a) => __awaiter(this, [_a], void 0, function* ({ body, response }) {
|
|
203
204
|
const data = body;
|
package/index.ts
CHANGED
|
@@ -200,6 +200,7 @@ export default class ManyToManyPlugin extends AdminForthPlugin {
|
|
|
200
200
|
server.endpoint({
|
|
201
201
|
method: 'POST',
|
|
202
202
|
path: `/plugin/${this.pluginInstanceId}/get-junctionResource-records`,
|
|
203
|
+
agent: { hiddenFromAgents: true },
|
|
203
204
|
request_schema: getJunctionRecordsBodySchema,
|
|
204
205
|
handler: async ({ body, response }) => {
|
|
205
206
|
const data = body as z.infer<typeof getJunctionRecordsBodySchema>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adminforth/many2many",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/node": "latest",
|
|
52
|
-
"adminforth": "^
|
|
52
|
+
"adminforth": "^4.7.3",
|
|
53
53
|
"semantic-release": "^24.2.1",
|
|
54
54
|
"semantic-release-slack-bot": "^4.0.2",
|
|
55
55
|
"typescript": "^5.7.3"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"adminforth": "^
|
|
58
|
+
"adminforth": "^4.4.0"
|
|
59
59
|
}
|
|
60
60
|
}
|