@adminforth/text-complete 2.0.5 → 2.0.7

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
@@ -10,5 +10,5 @@ custom/package.json
10
10
  custom/pnpm-lock.yaml
11
11
  custom/tsconfig.json
12
12
 
13
- sent 31,218 bytes received 115 bytes 62,666.00 bytes/sec
14
- total size is 30,798 speedup is 0.98
13
+ sent 31,371 bytes received 115 bytes 62,972.00 bytes/sec
14
+ total size is 30,945 speedup is 0.98
@@ -70,13 +70,18 @@
70
70
  </template>
71
71
 
72
72
  <script setup lang="ts">
73
- import { ref, onMounted, watch, Ref, computed } from 'vue';
73
+ import { ref, onMounted, watch, Ref, computed, defineAsyncComponent } from 'vue';
74
74
  import { callAdminForthApi } from '@/utils';
75
75
  import { AdminForthColumnCommon } from '@/types/Common';
76
76
  import { Spinner, Tooltip } from '@/afcl';
77
77
  import { IconMagic, IconCheck, IconArrowRightThin } from '@iconify-prerendered/vue-mdi';
78
- import SuggestionInput from 'vue-suggestion-input';
79
- import 'vue-suggestion-input/dist/style.css';
78
+
79
+
80
+ const SuggestionInput = defineAsyncComponent(async () => {
81
+ const { default: SuggestionInput } = await import('vue-suggestion-input');
82
+ await import('vue-suggestion-input/dist/style.css');
83
+ return SuggestionInput;
84
+ });
80
85
 
81
86
  const props = defineProps<{
82
87
  column: AdminForthColumnCommon,
@@ -70,13 +70,18 @@
70
70
  </template>
71
71
 
72
72
  <script setup lang="ts">
73
- import { ref, onMounted, watch, Ref, computed } from 'vue';
73
+ import { ref, onMounted, watch, Ref, computed, defineAsyncComponent } from 'vue';
74
74
  import { callAdminForthApi } from '@/utils';
75
75
  import { AdminForthColumnCommon } from '@/types/Common';
76
76
  import { Spinner, Tooltip } from '@/afcl';
77
77
  import { IconMagic, IconCheck, IconArrowRightThin } from '@iconify-prerendered/vue-mdi';
78
- import SuggestionInput from 'vue-suggestion-input';
79
- import 'vue-suggestion-input/dist/style.css';
78
+
79
+
80
+ const SuggestionInput = defineAsyncComponent(async () => {
81
+ const { default: SuggestionInput } = await import('vue-suggestion-input');
82
+ await import('vue-suggestion-input/dist/style.css');
83
+ return SuggestionInput;
84
+ });
80
85
 
81
86
  const props = defineProps<{
82
87
  column: AdminForthColumnCommon,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/text-complete",
3
- "version": "2.0.5",
3
+ "version": "2.0.7",
4
4
  "description": "Text completion plugin for adminforth",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -54,6 +54,6 @@
54
54
  ]
55
55
  },
56
56
  "peerDependencies": {
57
- "adminforth": "^2.24.0"
57
+ "adminforth": "^2.30.0"
58
58
  }
59
59
  }
package/types.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { CompletionAdapter } from "adminforth";
2
+ import {type PluginsCommonOptions } from "adminforth";
2
3
 
3
- export interface PluginOptions {
4
+ export interface PluginOptions extends PluginsCommonOptions {
4
5
  /**
5
6
  * Field where plugin will auto-complete text. Should be string or text field.
6
7
  */