@sanity/cross-dataset-duplicator 1.4.2 → 1.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 +1 -1
- package/dist/index.d.mts +81 -0
- package/dist/index.d.ts +0 -2
- package/dist/index.js +412 -941
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +654 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +24 -29
- package/dist/index.cjs.mjs +0 -7
- package/dist/index.esm.js +0 -1161
- package/dist/index.esm.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Cross Dataset Duplicator
|
|
2
2
|
|
|
3
|
-
Sanity Studio
|
|
3
|
+
Sanity Studio Tool and Document Action for empowering content editors to migrate Documents and Assets between Sanity Datasets and Projects from inside the Studio.
|
|
4
4
|
|
|
5
5
|
> [!IMPORTANT]
|
|
6
6
|
> You may not need this plugin. It was developed long before Sanity had fully-featured [live preview, visual editing](https://www.sanity.io/docs/visual-editing/introduction-to-visual-editing), [perspectives](https://www.sanity.io/docs/content-lake/perspectives) and [content releases](https://www.sanity.io/docs/user-guides/content-releases) which are more seamless ways to stage and preview content before publishing into production. It is recommended you investigate these features first before using this plugin.
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import {DocumentActionProps} from 'sanity'
|
|
2
|
+
import {ForwardRefExoticComponent} from 'react'
|
|
3
|
+
import {Plugin as Plugin_2} from 'sanity'
|
|
4
|
+
import {RefAttributes} from 'react'
|
|
5
|
+
import {SanityDocument} from 'sanity'
|
|
6
|
+
import {SVGProps} from 'react'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Plugin: Cross Dataset Duplicator
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export declare const crossDatasetDuplicator: Plugin_2<void | Partial<PluginConfig>>
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Component to perform a migration from the Cross Dataset Duplicator plugin
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
export declare function CrossDatasetDuplicatorAction(
|
|
19
|
+
props: CrossDatasetDuplicatorActionProps,
|
|
20
|
+
): JSX.Element
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Cross Dataset Duplicator document action props
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
export declare type CrossDatasetDuplicatorActionProps = {
|
|
27
|
+
docs: SanityDocument[]
|
|
28
|
+
onDuplicated?: () => Promise<void>
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Document action from the Cross Dataset Duplicator plugin
|
|
33
|
+
* @public
|
|
34
|
+
*/
|
|
35
|
+
export declare const DuplicateToAction: {
|
|
36
|
+
(props: DocumentActionProps): {
|
|
37
|
+
disabled: SanityDocument | null
|
|
38
|
+
title: string | null
|
|
39
|
+
label: string
|
|
40
|
+
dialog:
|
|
41
|
+
| false
|
|
42
|
+
| {
|
|
43
|
+
type: string
|
|
44
|
+
title: string
|
|
45
|
+
content: JSX.Element
|
|
46
|
+
onClose: () => void
|
|
47
|
+
}
|
|
48
|
+
| null
|
|
49
|
+
onHandle: () => void
|
|
50
|
+
icon: ForwardRefExoticComponent<
|
|
51
|
+
Omit<SVGProps<SVGSVGElement>, 'ref'> & RefAttributes<SVGSVGElement>
|
|
52
|
+
>
|
|
53
|
+
}
|
|
54
|
+
action: string
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Plugin configuration
|
|
59
|
+
* @public
|
|
60
|
+
*/
|
|
61
|
+
export declare interface PluginConfig {
|
|
62
|
+
apiVersion?: string
|
|
63
|
+
tool?: boolean
|
|
64
|
+
types?: string[]
|
|
65
|
+
filter?: string
|
|
66
|
+
follow?: ('inbound' | 'outbound')[]
|
|
67
|
+
queries?: PreDefinedQuery[]
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
declare type PreDefinedQuery = {
|
|
71
|
+
label: string
|
|
72
|
+
query: string
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Plugin config context hook from the Cross Dataset Duplicator plugin
|
|
77
|
+
* @public
|
|
78
|
+
*/
|
|
79
|
+
export declare function useCrossDatasetDuplicatorConfig(): Required<PluginConfig>
|
|
80
|
+
|
|
81
|
+
export {}
|