sanity-plugin-taxonomy-manager 3.4.0 → 4.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/lib/index.d.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  import type {ArrayFieldProps} from 'sanity'
2
2
  import type {FieldDefinition} from 'sanity'
3
- import {JSX as JSX_2} from 'react'
3
+ import {JSX} from 'react'
4
4
  import type {ObjectFieldProps} from 'sanity'
5
5
  import {Plugin as Plugin_2} from 'sanity'
6
6
  import type {Reference} from 'sanity'
7
7
  import type {SanityDocument} from 'sanity'
8
+ import type {useClient} from 'sanity'
8
9
 
9
10
  /**
10
11
  * #### Hierarchy View Input Component
@@ -16,7 +17,7 @@ import type {SanityDocument} from 'sanity'
16
17
  * plugin `schemeFilter` or `branchFilter` options.
17
18
  *
18
19
  */
19
- export declare function ArrayHierarchyInput(props: ArrayFieldProps): JSX_2.Element
20
+ export declare function ArrayHierarchyInput(props: ArrayFieldProps): JSX.Element
20
21
 
21
22
  /**
22
23
  * #### Reference Field Scheme & Branch Filter
@@ -46,7 +47,11 @@ export declare function ArrayHierarchyInput(props: ArrayFieldProps): JSX_2.Eleme
46
47
  */
47
48
  export declare const branchFilter: (
48
49
  options: BranchOptions,
49
- ) => ({getClient}: {getClient: Function}) => Promise<BranchFilterResult>
50
+ ) => ({
51
+ getClient,
52
+ }: {
53
+ getClient: (clientOptions: {apiVersion: string}) => ReturnType<typeof useClient>
54
+ }) => Promise<BranchFilterResult>
50
55
 
51
56
  declare type BranchFilterResult = {
52
57
  filter: string
@@ -96,7 +101,7 @@ declare interface Options {
96
101
  * Hierarchy view must be used in conjunction with the Taxonomy Manager
97
102
  * plugin `schemeFilter` or `branchFilter` options.
98
103
  */
99
- export declare function ReferenceHierarchyInput(props: ObjectFieldProps<Reference>): JSX_2.Element
104
+ export declare function ReferenceHierarchyInput(props: ObjectFieldProps<Reference>): JSX.Element
100
105
 
101
106
  /**
102
107
  * #### Reference Field Scheme Filter
@@ -127,7 +132,11 @@ export declare function ReferenceHierarchyInput(props: ObjectFieldProps<Referenc
127
132
  */
128
133
  export declare const schemeFilter: (
129
134
  options: SchemeOptions,
130
- ) => ({getClient}: {getClient: Function}) => Promise<SchemeFilterResult>
135
+ ) => ({
136
+ getClient,
137
+ }: {
138
+ getClient: (clientOptions: {apiVersion: string}) => ReturnType<typeof useClient>
139
+ }) => Promise<SchemeFilterResult>
131
140
 
132
141
  declare type SchemeFilterResult = {
133
142
  filter: string
@@ -167,7 +176,7 @@ export declare const TreeView: ({
167
176
  branchId,
168
177
  inputComponent,
169
178
  selectConcept,
170
- }: TreeViewProps) => JSX_2.Element
179
+ }: TreeViewProps) => JSX.Element
171
180
 
172
181
  declare interface TreeViewProps {
173
182
  document?: ConceptSchemeDocument
@@ -1,10 +1,11 @@
1
1
  import type {ArrayFieldProps} from 'sanity'
2
2
  import type {FieldDefinition} from 'sanity'
3
- import {JSX as JSX_2} from 'react'
3
+ import {JSX} from 'react'
4
4
  import type {ObjectFieldProps} from 'sanity'
5
5
  import {Plugin as Plugin_2} from 'sanity'
6
6
  import type {Reference} from 'sanity'
7
7
  import type {SanityDocument} from 'sanity'
8
+ import type {useClient} from 'sanity'
8
9
 
9
10
  /**
10
11
  * #### Hierarchy View Input Component
@@ -16,7 +17,7 @@ import type {SanityDocument} from 'sanity'
16
17
  * plugin `schemeFilter` or `branchFilter` options.
17
18
  *
18
19
  */
19
- export declare function ArrayHierarchyInput(props: ArrayFieldProps): JSX_2.Element
20
+ export declare function ArrayHierarchyInput(props: ArrayFieldProps): JSX.Element
20
21
 
21
22
  /**
22
23
  * #### Reference Field Scheme & Branch Filter
@@ -46,7 +47,11 @@ export declare function ArrayHierarchyInput(props: ArrayFieldProps): JSX_2.Eleme
46
47
  */
47
48
  export declare const branchFilter: (
48
49
  options: BranchOptions,
49
- ) => ({getClient}: {getClient: Function}) => Promise<BranchFilterResult>
50
+ ) => ({
51
+ getClient,
52
+ }: {
53
+ getClient: (clientOptions: {apiVersion: string}) => ReturnType<typeof useClient>
54
+ }) => Promise<BranchFilterResult>
50
55
 
51
56
  declare type BranchFilterResult = {
52
57
  filter: string
@@ -96,7 +101,7 @@ declare interface Options {
96
101
  * Hierarchy view must be used in conjunction with the Taxonomy Manager
97
102
  * plugin `schemeFilter` or `branchFilter` options.
98
103
  */
99
- export declare function ReferenceHierarchyInput(props: ObjectFieldProps<Reference>): JSX_2.Element
104
+ export declare function ReferenceHierarchyInput(props: ObjectFieldProps<Reference>): JSX.Element
100
105
 
101
106
  /**
102
107
  * #### Reference Field Scheme Filter
@@ -127,7 +132,11 @@ export declare function ReferenceHierarchyInput(props: ObjectFieldProps<Referenc
127
132
  */
128
133
  export declare const schemeFilter: (
129
134
  options: SchemeOptions,
130
- ) => ({getClient}: {getClient: Function}) => Promise<SchemeFilterResult>
135
+ ) => ({
136
+ getClient,
137
+ }: {
138
+ getClient: (clientOptions: {apiVersion: string}) => ReturnType<typeof useClient>
139
+ }) => Promise<SchemeFilterResult>
131
140
 
132
141
  declare type SchemeFilterResult = {
133
142
  filter: string
@@ -167,7 +176,7 @@ export declare const TreeView: ({
167
176
  branchId,
168
177
  inputComponent,
169
178
  selectConcept,
170
- }: TreeViewProps) => JSX_2.Element
179
+ }: TreeViewProps) => JSX.Element
171
180
 
172
181
  declare interface TreeViewProps {
173
182
  document?: ConceptSchemeDocument