@adminforth/many2many 1.3.2 → 2.0.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/build.log CHANGED
@@ -8,5 +8,5 @@ custom/ManyToManyInput.vue
8
8
  custom/ManyToManyShow.vue
9
9
  custom/tsconfig.json
10
10
 
11
- sent 4,979 bytes received 77 bytes 10,112.00 bytes/sec
12
- total size is 4,701 speedup is 0.93
11
+ sent 5,413 bytes received 77 bytes 10,980.00 bytes/sec
12
+ total size is 5,131 speedup is 0.93
@@ -99,7 +99,6 @@ async function loadForeignOptions(search = '', offset = 0) {
99
99
  }
100
100
 
101
101
  function scrollNearEnd() {
102
- console.log('scrollNearEnd');
103
102
  if ( lastSearch.value !== currentSearch.value ) {
104
103
  loadOffset.value = 0;
105
104
  } else {
@@ -1,13 +1,25 @@
1
1
  <template>
2
- <template v-for="value in values" :key="value.value">
3
- <Link :to="`/resource/${props.meta.linkedResourceId}/show/${value.value}`" class="badge bg-primary me-1 mr-3">{{ value.label }}</Link>
4
- </template>
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 { Link } from '@/afcl'
22
+ import { RouterLink } from 'vue-router';
11
23
 
12
24
 
13
25
  const props = defineProps<{
@@ -99,7 +99,6 @@ async function loadForeignOptions(search = '', offset = 0) {
99
99
  }
100
100
 
101
101
  function scrollNearEnd() {
102
- console.log('scrollNearEnd');
103
102
  if ( lastSearch.value !== currentSearch.value ) {
104
103
  loadOffset.value = 0;
105
104
  } else {
@@ -1,13 +1,25 @@
1
1
  <template>
2
- <template v-for="value in values" :key="value.value">
3
- <Link :to="`/resource/${props.meta.linkedResourceId}/show/${value.value}`" class="badge bg-primary me-1 mr-3">{{ value.label }}</Link>
4
- </template>
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 { Link } from '@/afcl'
22
+ import { RouterLink } from 'vue-router';
11
23
 
12
24
 
13
25
  const props = defineProps<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/many2many",
3
- "version": "1.3.2",
3
+ "version": "2.0.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -16,9 +16,9 @@
16
16
  "build": "tsc && rsync -av --exclude 'node_modules' custom dist/"
17
17
  },
18
18
  "keywords": [],
19
- "author": "",
19
+ "author": "DevForth (https://devforth.io)",
20
20
  "license": "MIT",
21
- "description": "",
21
+ "description": "AdminForth plugin for managing many-to-many relations between resources.",
22
22
  "release": {
23
23
  "plugins": [
24
24
  "@semantic-release/commit-analyzer",
@@ -55,6 +55,6 @@
55
55
  "typescript": "^5.7.3"
56
56
  },
57
57
  "peerDependencies": {
58
- "adminforth": "^3.8.2"
58
+ "adminforth": "^4.4.0"
59
59
  }
60
60
  }