sanity-plugin-taxonomy-manager 4.4.2 → 4.5.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/README.md CHANGED
@@ -115,7 +115,7 @@ export default defineConfig({
115
115
 
116
116
  ## Contributing
117
117
 
118
- See something that could be improved (or a bug that should be fixed)? Please feel free to pitch in.
118
+ See something that could be improved (or a bug that should be fixed)? Please feel free to pitch in.
119
119
 
120
120
  - This plugin uses [@sanity/plugin-kit](https://github.com/sanity-io/plugin-kit)
121
121
  with default configuration for build & watch scripts.
package/lib/index.d.ts CHANGED
@@ -28,6 +28,8 @@ export declare function ArrayHierarchyInput(props: ArrayFieldProps): JSX.Element
28
28
  * a branch. Child concepts will be returned.
29
29
  * @param {boolean} [expanded] - Set to `true` to display open hierarchy trees for
30
30
  * input components. Input component trees load closed by default.
31
+ * @param {boolean} [browseOnly] - Set to `true` to hide the default Sanity search
32
+ * input and display only the "Browse Taxonomy Tree" button for selecting terms.
31
33
  * @returns A reference type filter for the child concepts of the designated branch in the selected Concept Scheme
32
34
  * @example
33
35
  * ```ts
@@ -43,8 +45,9 @@ export declare function ArrayHierarchyInput(props: ArrayFieldProps): JSX.Element
43
45
  * options: {
44
46
  * filter: branchFilter({
45
47
  * schemeId: 'a1b2c3',
46
- * branchId: 'd4e5f6'
48
+ * branchId: 'd4e5f6',
47
49
  * expanded: true, // optional; defaults to false (closed tree)
50
+ * browseOnly: true, // optional; hides search input
48
51
  * }),
49
52
  * disableNew: true,
50
53
  * },
@@ -69,12 +72,14 @@ declare type BranchFilterResult = {
69
72
  concepts: string[]
70
73
  }
71
74
  expanded?: boolean
75
+ browseOnly?: boolean
72
76
  }
73
77
 
74
78
  declare type BranchOptions = {
75
79
  schemeId: string
76
80
  branchId: string
77
81
  expanded?: boolean
82
+ browseOnly?: boolean
78
83
  }
79
84
 
80
85
  declare interface ConceptSchemeDocument extends SanityDocument {
@@ -122,6 +127,8 @@ export declare function ReferenceHierarchyInput(props: ObjectFieldProps<Referenc
122
127
  * the Concept Scheme to which you wish to filter.
123
128
  * @param {boolean} [expanded] - Set to `true` to display open hierarchy trees for
124
129
  * input components. Input component trees load closed by default.
130
+ * @param {boolean} [browseOnly] - Set to `true` to hide the default Sanity search
131
+ * input and display only the "Browse Taxonomy Tree" button for selecting terms.
125
132
  * @returns A reference type filter for Concepts and Top Concepts in
126
133
  * the selected Concept Scheme test
127
134
  * @example
@@ -139,6 +146,7 @@ export declare function ReferenceHierarchyInput(props: ObjectFieldProps<Referenc
139
146
  * filter: schemeFilter({
140
147
  * schemeId: 'a1b2c3',
141
148
  * expanded: true, // optional; defaults to false (closed tree)
149
+ * browseOnly: true, // optional; hides search input
142
150
  * }),
143
151
  * disableNew: true,
144
152
  * },
@@ -163,11 +171,13 @@ declare type SchemeFilterResult = {
163
171
  topConcepts: string[]
164
172
  }
165
173
  expanded?: boolean
174
+ browseOnly?: boolean
166
175
  }
167
176
 
168
177
  declare type SchemeOptions = {
169
178
  schemeId: string
170
179
  expanded?: boolean
180
+ browseOnly?: boolean
171
181
  }
172
182
 
173
183
  /**
@@ -28,6 +28,8 @@ export declare function ArrayHierarchyInput(props: ArrayFieldProps): JSX.Element
28
28
  * a branch. Child concepts will be returned.
29
29
  * @param {boolean} [expanded] - Set to `true` to display open hierarchy trees for
30
30
  * input components. Input component trees load closed by default.
31
+ * @param {boolean} [browseOnly] - Set to `true` to hide the default Sanity search
32
+ * input and display only the "Browse Taxonomy Tree" button for selecting terms.
31
33
  * @returns A reference type filter for the child concepts of the designated branch in the selected Concept Scheme
32
34
  * @example
33
35
  * ```ts
@@ -43,8 +45,9 @@ export declare function ArrayHierarchyInput(props: ArrayFieldProps): JSX.Element
43
45
  * options: {
44
46
  * filter: branchFilter({
45
47
  * schemeId: 'a1b2c3',
46
- * branchId: 'd4e5f6'
48
+ * branchId: 'd4e5f6',
47
49
  * expanded: true, // optional; defaults to false (closed tree)
50
+ * browseOnly: true, // optional; hides search input
48
51
  * }),
49
52
  * disableNew: true,
50
53
  * },
@@ -69,12 +72,14 @@ declare type BranchFilterResult = {
69
72
  concepts: string[]
70
73
  }
71
74
  expanded?: boolean
75
+ browseOnly?: boolean
72
76
  }
73
77
 
74
78
  declare type BranchOptions = {
75
79
  schemeId: string
76
80
  branchId: string
77
81
  expanded?: boolean
82
+ browseOnly?: boolean
78
83
  }
79
84
 
80
85
  declare interface ConceptSchemeDocument extends SanityDocument {
@@ -122,6 +127,8 @@ export declare function ReferenceHierarchyInput(props: ObjectFieldProps<Referenc
122
127
  * the Concept Scheme to which you wish to filter.
123
128
  * @param {boolean} [expanded] - Set to `true` to display open hierarchy trees for
124
129
  * input components. Input component trees load closed by default.
130
+ * @param {boolean} [browseOnly] - Set to `true` to hide the default Sanity search
131
+ * input and display only the "Browse Taxonomy Tree" button for selecting terms.
125
132
  * @returns A reference type filter for Concepts and Top Concepts in
126
133
  * the selected Concept Scheme test
127
134
  * @example
@@ -139,6 +146,7 @@ export declare function ReferenceHierarchyInput(props: ObjectFieldProps<Referenc
139
146
  * filter: schemeFilter({
140
147
  * schemeId: 'a1b2c3',
141
148
  * expanded: true, // optional; defaults to false (closed tree)
149
+ * browseOnly: true, // optional; hides search input
142
150
  * }),
143
151
  * disableNew: true,
144
152
  * },
@@ -163,11 +171,13 @@ declare type SchemeFilterResult = {
163
171
  topConcepts: string[]
164
172
  }
165
173
  expanded?: boolean
174
+ browseOnly?: boolean
166
175
  }
167
176
 
168
177
  declare type SchemeOptions = {
169
178
  schemeId: string
170
179
  expanded?: boolean
180
+ browseOnly?: boolean
171
181
  }
172
182
 
173
183
  /**