sanity-plugin-taxonomy-manager 4.5.0 → 4.6.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/lib/index.d.ts +17 -6
- package/lib/index.esm.d.mts +17 -6
- package/lib/index.esm.esm.js +167 -167
- package/lib/index.esm.esm.js.map +1 -1
- package/lib/index.esm.mjs +167 -167
- package/lib/index.esm.mjs.map +1 -1
- package/lib/index.js +167 -167
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/inputs/Identifier.tsx +25 -9
- package/src/config.ts +16 -0
- package/src/helpers/createId.ts +20 -0
- package/src/hooks/useCreateConcept.tsx +8 -3
- package/src/index.ts +19 -16
- package/src/skosConcept.tsx +13 -7
- package/src/skosConceptScheme.tsx +12 -8
- package/src/types.tsx +13 -1
package/lib/index.d.ts
CHANGED
|
@@ -107,6 +107,12 @@ declare interface Options {
|
|
|
107
107
|
baseUri?: string
|
|
108
108
|
customConceptFields?: FieldDefinition[]
|
|
109
109
|
customSchemeFields?: FieldDefinition[]
|
|
110
|
+
ident?: {
|
|
111
|
+
pattern?: string
|
|
112
|
+
length?: number
|
|
113
|
+
prefix?: string
|
|
114
|
+
regenUi?: boolean
|
|
115
|
+
}
|
|
110
116
|
}
|
|
111
117
|
|
|
112
118
|
/**
|
|
@@ -181,12 +187,17 @@ declare type SchemeOptions = {
|
|
|
181
187
|
}
|
|
182
188
|
|
|
183
189
|
/**
|
|
184
|
-
* ####
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
* @param
|
|
188
|
-
* @param
|
|
189
|
-
* @param
|
|
190
|
+
* #### Sanity Taxonomy Manager
|
|
191
|
+
* Defines a Sanity plugin for managing SKOS compliant taxonomies in Sanity Studio.
|
|
192
|
+
* #### Options
|
|
193
|
+
* @param baseUri - The base URI to use for SKOS concepts and concept schemes. BaseURI should follow an IANA http/s scheme and should terminate with either a / or #.
|
|
194
|
+
* @param customConceptFields - An array of additional fields to add to the skosConcept type.
|
|
195
|
+
* @param customSchemeFields - An array of additional fields to add to the skosConceptScheme type.
|
|
196
|
+
* #### Identifier Configuration
|
|
197
|
+
* @param ident.pattern - The character set to use for identifiers (default: '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz').
|
|
198
|
+
* @param ident.length - The length of the generated identifier (default: 6).
|
|
199
|
+
* @param ident.prefix - A prefix to prepend to generated identifiers, for example to use Wikidata style IDs like "Q27521" (default: '').
|
|
200
|
+
* @param ident.regenUi - Whether to display the "Create Unique Identifier" button in the UI by default.
|
|
190
201
|
* @returns A Sanity plugin object.
|
|
191
202
|
*/
|
|
192
203
|
export declare const taxonomyManager: Plugin_2<Options | undefined>
|
package/lib/index.esm.d.mts
CHANGED
|
@@ -107,6 +107,12 @@ declare interface Options {
|
|
|
107
107
|
baseUri?: string
|
|
108
108
|
customConceptFields?: FieldDefinition[]
|
|
109
109
|
customSchemeFields?: FieldDefinition[]
|
|
110
|
+
ident?: {
|
|
111
|
+
pattern?: string
|
|
112
|
+
length?: number
|
|
113
|
+
prefix?: string
|
|
114
|
+
regenUi?: boolean
|
|
115
|
+
}
|
|
110
116
|
}
|
|
111
117
|
|
|
112
118
|
/**
|
|
@@ -181,12 +187,17 @@ declare type SchemeOptions = {
|
|
|
181
187
|
}
|
|
182
188
|
|
|
183
189
|
/**
|
|
184
|
-
* ####
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
* @param
|
|
188
|
-
* @param
|
|
189
|
-
* @param
|
|
190
|
+
* #### Sanity Taxonomy Manager
|
|
191
|
+
* Defines a Sanity plugin for managing SKOS compliant taxonomies in Sanity Studio.
|
|
192
|
+
* #### Options
|
|
193
|
+
* @param baseUri - The base URI to use for SKOS concepts and concept schemes. BaseURI should follow an IANA http/s scheme and should terminate with either a / or #.
|
|
194
|
+
* @param customConceptFields - An array of additional fields to add to the skosConcept type.
|
|
195
|
+
* @param customSchemeFields - An array of additional fields to add to the skosConceptScheme type.
|
|
196
|
+
* #### Identifier Configuration
|
|
197
|
+
* @param ident.pattern - The character set to use for identifiers (default: '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz').
|
|
198
|
+
* @param ident.length - The length of the generated identifier (default: 6).
|
|
199
|
+
* @param ident.prefix - A prefix to prepend to generated identifiers, for example to use Wikidata style IDs like "Q27521" (default: '').
|
|
200
|
+
* @param ident.regenUi - Whether to display the "Create Unique Identifier" button in the UI by default.
|
|
190
201
|
* @returns A Sanity plugin object.
|
|
191
202
|
*/
|
|
192
203
|
export declare const taxonomyManager: Plugin_2<Options | undefined>
|