@directus/composables 11.1.11 → 11.2.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/dist/index.d.ts CHANGED
@@ -24,10 +24,11 @@ declare function useCustomSelection(currentValue: Ref<string | null>, items: Ref
24
24
  type OtherValue = {
25
25
  key: string;
26
26
  value: string;
27
+ focus?: boolean;
27
28
  };
28
29
  type UsableCustomSelectionMultiple = {
29
30
  otherValues: Ref<OtherValue[]>;
30
- addOtherValue: (value?: string) => void;
31
+ addOtherValue: (value?: string, focus?: boolean) => void;
31
32
  setOtherValue: (key: string, newValue: string | null) => void;
32
33
  };
33
34
  declare function useCustomSelectionMultiple(currentValues: Ref<string[] | null>, items: Ref<any[]>, emit: (event: string[] | null) => void): UsableCustomSelectionMultiple;
@@ -157,4 +158,4 @@ declare function useApi(): AxiosInstance;
157
158
  declare function useSdk<Schema extends object = any>(): DirectusClient<Schema> & RestClient<Schema>;
158
159
  declare function useExtensions(): RefRecord<AppExtensionConfigs>;
159
160
 
160
- export { type ComputedQuery, type GroupableInstance, type GroupableOptions, type ManualSortData, type UsableCollection, type UsableCustomSelection, type UsableGroupable, type UsableItems, sizeProps, useApi, useCollection, useCustomSelection, useCustomSelectionMultiple, useElementSize, useExtensions, useFilterFields, useGroupable, useGroupableParent, useItems, useLayout, useSdk, useSizeClass, useStores, useSync };
161
+ export { type ComputedQuery, type GroupableInstance, type GroupableOptions, type ManualSortData, type OtherValue, type UsableCollection, type UsableCustomSelection, type UsableGroupable, type UsableItems, sizeProps, useApi, useCollection, useCustomSelection, useCustomSelectionMultiple, useElementSize, useExtensions, useFilterFields, useGroupable, useGroupableParent, useItems, useLayout, useSdk, useSizeClass, useStores, useSync };
package/dist/index.js CHANGED
@@ -118,12 +118,13 @@ function useCustomSelectionMultiple(currentValues, items, emit) {
118
118
  { immediate: true }
119
119
  );
120
120
  return { otherValues, addOtherValue, setOtherValue };
121
- function addOtherValue(value = "") {
121
+ function addOtherValue(value = "", focus = false) {
122
122
  otherValues.value = [
123
123
  ...otherValues.value,
124
124
  {
125
125
  key: nanoid(),
126
- value
126
+ value,
127
+ focus
127
128
  }
128
129
  ];
129
130
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@directus/composables",
3
- "version": "11.1.11",
3
+ "version": "11.2.0",
4
4
  "description": "Shared Vue composables for Directus use",
5
5
  "homepage": "https://directus.io",
6
6
  "repository": {
@@ -26,7 +26,7 @@
26
26
  "lodash-es": "4.17.21",
27
27
  "nanoid": "5.1.2",
28
28
  "@directus/constants": "13.0.1",
29
- "@directus/utils": "13.0.6"
29
+ "@directus/utils": "13.0.7"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@directus/tsconfig": "3.0.0",
@@ -37,9 +37,9 @@
37
37
  "typescript": "5.8.2",
38
38
  "vitest": "2.1.9",
39
39
  "vue": "3.5.13",
40
- "@directus/extensions": "3.0.6",
41
- "@directus/types": "13.1.2",
42
- "@directus/sdk": "19.1.0"
40
+ "@directus/extensions": "3.0.7",
41
+ "@directus/sdk": "20.0.0",
42
+ "@directus/types": "13.2.0"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "vue": "^3.4"