@sanity/cross-dataset-duplicator 1.5.0 → 2.0.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/dist/index.d.ts +42 -61
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +720 -492
- package/dist/index.js.map +1 -1
- package/package.json +38 -77
- package/dist/index.d.mts +0 -81
- package/dist/index.mjs +0 -654
- package/dist/index.mjs.map +0 -1
- package/sanity.json +0 -8
- package/src/actions/DuplicateToAction.tsx +0 -34
- package/src/components/CrossDatasetDuplicator.tsx +0 -93
- package/src/components/CrossDatasetDuplicatorAction.tsx +0 -13
- package/src/components/CrossDatasetDuplicatorTool.tsx +0 -17
- package/src/components/Duplicator.tsx +0 -568
- package/src/components/DuplicatorQuery.tsx +0 -144
- package/src/components/DuplicatorWrapper.tsx +0 -67
- package/src/components/Feedback.tsx +0 -18
- package/src/components/ResetSecret.tsx +0 -30
- package/src/components/SelectButtons.tsx +0 -84
- package/src/components/StatusBadge.tsx +0 -111
- package/src/context/ConfigProvider.tsx +0 -30
- package/src/helpers/constants.ts +0 -12
- package/src/helpers/getDocumentsInArray.ts +0 -86
- package/src/helpers/index.ts +0 -19
- package/src/index.ts +0 -5
- package/src/plugin.tsx +0 -31
- package/src/tool/index.ts +0 -14
- package/src/types/index.ts +0 -27
- package/v2-incompatible.js +0 -11
package/dist/index.d.ts
CHANGED
|
@@ -1,81 +1,62 @@
|
|
|
1
|
-
import {DocumentActionProps} from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import {SVGProps} from 'react'
|
|
7
|
-
|
|
1
|
+
import { DocumentActionProps, SanityDocument } from "sanity";
|
|
2
|
+
type PreDefinedQuery = {
|
|
3
|
+
label: string;
|
|
4
|
+
query: string;
|
|
5
|
+
};
|
|
8
6
|
/**
|
|
9
|
-
* Plugin
|
|
7
|
+
* Plugin configuration
|
|
10
8
|
* @public
|
|
11
9
|
*/
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
interface PluginConfig {
|
|
11
|
+
apiVersion?: string;
|
|
12
|
+
tool?: boolean;
|
|
13
|
+
types?: string[];
|
|
14
|
+
filter?: string;
|
|
15
|
+
follow?: ('inbound' | 'outbound')[];
|
|
16
|
+
queries?: PreDefinedQuery[];
|
|
17
|
+
}
|
|
14
18
|
/**
|
|
15
|
-
*
|
|
19
|
+
* Cross Dataset Duplicator document action props
|
|
16
20
|
* @public
|
|
17
21
|
*/
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
)
|
|
21
|
-
|
|
22
|
+
type CrossDatasetDuplicatorActionProps = {
|
|
23
|
+
docs: SanityDocument[];
|
|
24
|
+
onDuplicated?: () => Promise<void>;
|
|
25
|
+
};
|
|
22
26
|
/**
|
|
23
|
-
* Cross Dataset Duplicator
|
|
27
|
+
* Plugin: Cross Dataset Duplicator
|
|
24
28
|
* @public
|
|
25
29
|
*/
|
|
26
|
-
|
|
27
|
-
docs: SanityDocument[]
|
|
28
|
-
onDuplicated?: () => Promise<void>
|
|
29
|
-
}
|
|
30
|
-
|
|
30
|
+
declare const crossDatasetDuplicator: import("sanity").Plugin<void | Partial<PluginConfig>>;
|
|
31
31
|
/**
|
|
32
32
|
* Document action from the Cross Dataset Duplicator plugin
|
|
33
33
|
* @public
|
|
34
34
|
*/
|
|
35
|
-
|
|
35
|
+
declare const DuplicateToAction: {
|
|
36
36
|
(props: DocumentActionProps): {
|
|
37
|
-
disabled:
|
|
38
|
-
title: string | null
|
|
39
|
-
label: string
|
|
40
|
-
dialog:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
Omit<SVGProps<SVGSVGElement>, 'ref'> & RefAttributes<SVGSVGElement>
|
|
52
|
-
>
|
|
53
|
-
}
|
|
54
|
-
action: string
|
|
55
|
-
}
|
|
56
|
-
|
|
37
|
+
disabled: boolean;
|
|
38
|
+
title: string | null;
|
|
39
|
+
label: string;
|
|
40
|
+
dialog: false | {
|
|
41
|
+
type: string;
|
|
42
|
+
title: string;
|
|
43
|
+
content: import("react").JSX.Element;
|
|
44
|
+
onClose: () => void;
|
|
45
|
+
} | null;
|
|
46
|
+
onHandle: () => void;
|
|
47
|
+
icon: import("react").ForwardRefExoticComponent<Omit<import("react").SVGProps<SVGSVGElement>, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
48
|
+
};
|
|
49
|
+
action: string;
|
|
50
|
+
};
|
|
57
51
|
/**
|
|
58
|
-
* Plugin
|
|
52
|
+
* Plugin config context hook from the Cross Dataset Duplicator plugin
|
|
59
53
|
* @public
|
|
60
54
|
*/
|
|
61
|
-
|
|
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
|
-
|
|
55
|
+
declare function useCrossDatasetDuplicatorConfig(): Required<PluginConfig>;
|
|
75
56
|
/**
|
|
76
|
-
*
|
|
57
|
+
* Component to perform a migration from the Cross Dataset Duplicator plugin
|
|
77
58
|
* @public
|
|
78
59
|
*/
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
60
|
+
declare function CrossDatasetDuplicatorAction(props: CrossDatasetDuplicatorActionProps): import("react").JSX.Element;
|
|
61
|
+
export { CrossDatasetDuplicatorAction, CrossDatasetDuplicatorActionProps, DuplicateToAction, PluginConfig, crossDatasetDuplicator, useCrossDatasetDuplicatorConfig };
|
|
62
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/types/index.ts","../src/plugin.tsx","../src/actions/DuplicateToAction.tsx","../src/context/ConfigProvider.tsx","../src/components/CrossDatasetDuplicatorAction.tsx"],"mappings":";KAEK,eAAA;EACH,KAAA;EACA,KAAK;AAAA;;AAAA;AAMP;;UAAiB,YAAA;EACf,UAAA;EACA,IAAA;EACA,KAAA;EACA,MAAA;EACA,MAAA;EACA,OAAA,GAAU,eAAe;AAAA;;;AAAA;AAO3B;KAAY,iCAAA;EACV,IAAA,EAAM,cAAA;EACN,YAAA,SAAqB,OAAO;AAAA;;AAzBY;;;cCY7B,sBAAA,mBAAsB,MAAA,QAAA,OAAA,CAAA,YAAA;;ADZO;;;cEU7B,iBAAA;EAAA,QAA4B,mBAAA;;;;;;;;;;;;;;;;AFNlC;AAMP;;iBGIgB,+BAAA,IAA+B,QAAA,CAAA,YAAA;;AHdL;;;iBIO1B,4BAAA,CAA6B,KAAA,EAAO,iCAAiC,mBAAA,GAAA,CAAA,OAAA"}
|