sanity-plugin-taxonomy-manager 3.2.0 → 3.2.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.
Files changed (42) hide show
  1. package/lib/index.d.ts +6 -12
  2. package/lib/index.esm.d.mts +6 -12
  3. package/lib/index.esm.esm.js +19 -19
  4. package/lib/index.esm.esm.js.map +1 -1
  5. package/lib/index.esm.mjs +19 -19
  6. package/lib/index.esm.mjs.map +1 -1
  7. package/lib/index.js +13 -13
  8. package/lib/index.js.map +1 -1
  9. package/package.json +1 -1
  10. package/src/components/ChildConcepts.tsx +1 -12
  11. package/src/components/Children.tsx +9 -8
  12. package/src/components/Hierarchy.tsx +3 -4
  13. package/src/components/Orphans.tsx +5 -6
  14. package/src/components/TopConcepts.tsx +5 -6
  15. package/src/components/TreeStructure.tsx +1 -25
  16. package/src/components/TreeView.tsx +5 -6
  17. package/src/components/guides/NewScheme.tsx +1 -2
  18. package/src/components/guides/NoConcepts.tsx +2 -3
  19. package/src/{helpers → components/inputs}/HierarchyInput.tsx +3 -9
  20. package/src/components/inputs/Identifier.tsx +1 -3
  21. package/src/components/inputs/{hierarchy/InputHierarchy.tsx → InputHierarchy.tsx} +11 -14
  22. package/src/components/inputs/RdfUri.tsx +1 -1
  23. package/src/components/inputs/index.ts +2 -0
  24. package/src/components/{ConceptDetailDialogue.tsx → interactions/ConceptDetailDialogue.tsx} +2 -2
  25. package/src/components/{ConceptDetailLink.tsx → interactions/ConceptDetailLink.tsx} +4 -4
  26. package/src/components/{ConceptSelectLink.tsx → interactions/ConceptSelectLink.tsx} +3 -3
  27. package/src/helpers/branchFilter.ts +1 -2
  28. package/src/helpers/index.ts +0 -1
  29. package/src/helpers/schemeFilter.ts +1 -2
  30. package/src/hooks/useAddTitle.tsx +1 -1
  31. package/src/hooks/useCreateConcept.tsx +1 -2
  32. package/src/hooks/useOpenNewConceptPane.tsx +1 -1
  33. package/src/hooks/useRemoveConcept.tsx +1 -2
  34. package/src/index.ts +3 -3
  35. package/src/modules/baseIriField.tsx +4 -5
  36. package/src/queries.ts +6 -8
  37. package/src/skosConcept.tsx +3 -12
  38. package/src/skosConceptScheme.tsx +3 -9
  39. package/src/structure.ts +2 -5
  40. package/src/components/inputs/hierarchy/InputChildren.tsx +0 -99
  41. package/src/components/inputs/hierarchy/InputOrphans.tsx +0 -79
  42. package/src/components/inputs/hierarchy/InputTopConcepts.tsx +0 -80
package/lib/index.d.ts CHANGED
@@ -4,8 +4,7 @@ import {ObjectFieldProps} from 'sanity'
4
4
  import {Plugin as Plugin_2} from 'sanity'
5
5
 
6
6
  /**
7
- * Document Branch Filter
8
- *
7
+ * #### Document Branch Filter
9
8
  * A pluggable Function for Filtering to a Top Concept Branch within a SKOS Concept Scheme
10
9
  * @param schemeId - The unique six character concept identifier for the Concept Scheme to which you wish to filter.
11
10
  * @param branchId - The unique six character concept identifier of a branch. Child concepts will be returned.
@@ -25,8 +24,6 @@ declare type BranchOptions = {
25
24
 
26
25
  /**
27
26
  * Hierarchy View Input Component for Reference Fields
28
- * TODO check for scheme or branch filters — it only works if they're used; alternatively
29
- * provide optional parameters if a custom filter is used?
30
27
  */
31
28
  export declare function HierarchyInput(props: ObjectFieldProps): JSX_2.Element
32
29
 
@@ -37,8 +34,7 @@ declare interface Options {
37
34
  }
38
35
 
39
36
  /**
40
- * Document Scheme Filter
41
- *
37
+ * #### Document Scheme Filter
42
38
  * Pluggable Function for Filtering to a Single SKOS Concept Scheme
43
39
  * @param schemeId - The unique six character concept identifier for the Concept Scheme to which you wish to filter.
44
40
  * @returns A reference type filter for Concepts and Top Concepts in the selected Concept Scheme
@@ -55,8 +51,7 @@ declare type SchemeOptions = {
55
51
  }
56
52
 
57
53
  /**
58
- * Defines a Sanity plugin for managing taxonomies.
59
- *
54
+ * #### Defines a Sanity plugin for managing taxonomies
60
55
  * BaseURI should follow an IANA http/s scheme and should terminate with either a / or #.
61
56
  * @param options - Optional configuration options for the plugin.
62
57
  * @param options.baseUri - The base URI to use for SKOS concepts and concept schemes.
@@ -67,13 +62,12 @@ declare type SchemeOptions = {
67
62
  export declare const taxonomyManager: Plugin_2<Options | undefined>
68
63
 
69
64
  /**
70
- * Tree View Component Wrapper
65
+ * #### Tree View Component Wrapper
71
66
  * This is the view component for the hierarchy tree. It is the
72
67
  * top level of concept scheme views and is passed into Desk
73
68
  * structure to render the primary view for taxonomy documents.
74
- * TODO: Extend SanityDocument type to include display properties.
75
- * What is the type of the document object returned by the Desk
76
- * structure?
69
+ * @param inputComponent - Specifies whether the component is Studio
70
+ * input component, which will hide tree view controls and chrome.
77
71
  */
78
72
  export declare const TreeView: ({
79
73
  document,
@@ -4,8 +4,7 @@ import {ObjectFieldProps} from 'sanity'
4
4
  import {Plugin as Plugin_2} from 'sanity'
5
5
 
6
6
  /**
7
- * Document Branch Filter
8
- *
7
+ * #### Document Branch Filter
9
8
  * A pluggable Function for Filtering to a Top Concept Branch within a SKOS Concept Scheme
10
9
  * @param schemeId - The unique six character concept identifier for the Concept Scheme to which you wish to filter.
11
10
  * @param branchId - The unique six character concept identifier of a branch. Child concepts will be returned.
@@ -25,8 +24,6 @@ declare type BranchOptions = {
25
24
 
26
25
  /**
27
26
  * Hierarchy View Input Component for Reference Fields
28
- * TODO check for scheme or branch filters — it only works if they're used; alternatively
29
- * provide optional parameters if a custom filter is used?
30
27
  */
31
28
  export declare function HierarchyInput(props: ObjectFieldProps): JSX_2.Element
32
29
 
@@ -37,8 +34,7 @@ declare interface Options {
37
34
  }
38
35
 
39
36
  /**
40
- * Document Scheme Filter
41
- *
37
+ * #### Document Scheme Filter
42
38
  * Pluggable Function for Filtering to a Single SKOS Concept Scheme
43
39
  * @param schemeId - The unique six character concept identifier for the Concept Scheme to which you wish to filter.
44
40
  * @returns A reference type filter for Concepts and Top Concepts in the selected Concept Scheme
@@ -55,8 +51,7 @@ declare type SchemeOptions = {
55
51
  }
56
52
 
57
53
  /**
58
- * Defines a Sanity plugin for managing taxonomies.
59
- *
54
+ * #### Defines a Sanity plugin for managing taxonomies
60
55
  * BaseURI should follow an IANA http/s scheme and should terminate with either a / or #.
61
56
  * @param options - Optional configuration options for the plugin.
62
57
  * @param options.baseUri - The base URI to use for SKOS concepts and concept schemes.
@@ -67,13 +62,12 @@ declare type SchemeOptions = {
67
62
  export declare const taxonomyManager: Plugin_2<Options | undefined>
68
63
 
69
64
  /**
70
- * Tree View Component Wrapper
65
+ * #### Tree View Component Wrapper
71
66
  * This is the view component for the hierarchy tree. It is the
72
67
  * top level of concept scheme views and is passed into Desk
73
68
  * structure to render the primary view for taxonomy documents.
74
- * TODO: Extend SanityDocument type to include display properties.
75
- * What is the type of the document object returned by the Desk
76
- * structure?
69
+ * @param inputComponent - Specifies whether the component is Studio
70
+ * input component, which will hide tree view controls and chrome.
77
71
  */
78
72
  export declare const TreeView: ({
79
73
  document,