datocms-plugin-sdk 2.0.2 → 2.0.4
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/cjs/hooks/renderItemCollectionOutlet.js.map +1 -1
- package/dist/cjs/manifest.js +266 -255
- package/dist/cjs/manifest.js.map +1 -1
- package/dist/esm/ctx/base.d.ts +1 -1
- package/dist/esm/hooks/renderItemCollectionOutlet.d.ts +6 -1
- package/dist/esm/hooks/renderItemCollectionOutlet.js.map +1 -1
- package/dist/esm/hooks/renderItemFormSidebar.d.ts +1 -1
- package/dist/esm/hooks/renderItemFormSidebarPanel.d.ts +1 -1
- package/dist/esm/hooks/renderManualFieldExtensionConfigScreen.d.ts +2 -2
- package/dist/esm/hooks/renderModal.d.ts +1 -1
- package/dist/esm/hooks/renderUploadSidebar.d.ts +1 -1
- package/dist/esm/hooks/renderUploadSidebarPanel.d.ts +1 -1
- package/dist/esm/manifest.js +266 -255
- package/dist/esm/manifest.js.map +1 -1
- package/dist/esm/manifestTypes.d.ts +39 -91
- package/dist/types/ctx/base.d.ts +1 -1
- package/dist/types/hooks/renderItemCollectionOutlet.d.ts +6 -1
- package/dist/types/hooks/renderItemFormSidebar.d.ts +1 -1
- package/dist/types/hooks/renderItemFormSidebarPanel.d.ts +1 -1
- package/dist/types/hooks/renderManualFieldExtensionConfigScreen.d.ts +2 -2
- package/dist/types/hooks/renderModal.d.ts +1 -1
- package/dist/types/hooks/renderUploadSidebar.d.ts +1 -1
- package/dist/types/hooks/renderUploadSidebarPanel.d.ts +1 -1
- package/dist/types/manifestTypes.d.ts +39 -91
- package/manifest.json +266 -255
- package/package.json +2 -2
- package/src/ctx/base.ts +1 -1
- package/src/hooks/renderItemCollectionOutlet.ts +6 -1
- package/src/hooks/renderItemFormSidebar.ts +1 -1
- package/src/hooks/renderItemFormSidebarPanel.ts +1 -1
- package/src/hooks/renderManualFieldExtensionConfigScreen.ts +2 -2
- package/src/hooks/renderModal.ts +1 -1
- package/src/hooks/renderUploadSidebar.ts +1 -1
- package/src/hooks/renderUploadSidebarPanel.ts +1 -1
- package/src/manifest.ts +422 -377
- package/src/manifestTypes.ts +39 -91
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "datocms-plugin-sdk",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "DatoCMS Plugin SDK",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"datocms",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"glob": "^11.0.0",
|
|
46
46
|
"typescript": "^5.6.2"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "c08f8ec853327a4d0910217284d9406febd42b3e"
|
|
49
49
|
}
|
package/src/ctx/base.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import type { SchemaTypes } from '@datocms/cma-client';
|
|
1
2
|
import { SelfResizingPluginFrameCtx } from '../ctx/pluginFrame';
|
|
2
3
|
import { containedRenderModeBootstrapper } from '../utils';
|
|
3
4
|
|
|
5
|
+
type ItemType = SchemaTypes.ItemType;
|
|
6
|
+
|
|
4
7
|
export type RenderItemCollectionOutletHook = {
|
|
5
8
|
/**
|
|
6
9
|
* This function will be called when the plugin needs to render an outlet
|
|
7
|
-
* defined by the `
|
|
10
|
+
* defined by the `itemCollectionOutlets()` hook.
|
|
8
11
|
*
|
|
9
12
|
* @tag outlets
|
|
10
13
|
*/
|
|
@@ -19,6 +22,8 @@ export type RenderItemCollectionOutletCtx = SelfResizingPluginFrameCtx<
|
|
|
19
22
|
{
|
|
20
23
|
/** The ID of the outlet that needs to be rendered */
|
|
21
24
|
itemCollectionOutletId: string;
|
|
25
|
+
/** The model for which the outlet is being rendered */
|
|
26
|
+
itemType: ItemType;
|
|
22
27
|
}
|
|
23
28
|
>;
|
|
24
29
|
|
|
@@ -8,7 +8,7 @@ import { fullScreenRenderModeBootstrapper } from '../utils';
|
|
|
8
8
|
export type RenderItemFormSidebarHook = {
|
|
9
9
|
/**
|
|
10
10
|
* This function will be called when the plugin needs to render a sidebar (see
|
|
11
|
-
* the `itemFormSidebars`
|
|
11
|
+
* the `itemFormSidebars` hook)
|
|
12
12
|
*
|
|
13
13
|
* @tag sidebarPanels
|
|
14
14
|
*/
|
|
@@ -8,7 +8,7 @@ import { containedRenderModeBootstrapper } from '../utils';
|
|
|
8
8
|
export type RenderItemFormSidebarPanelHook = {
|
|
9
9
|
/**
|
|
10
10
|
* This function will be called when the plugin needs to render a sidebar panel
|
|
11
|
-
* (see the `itemFormSidebarPanels`
|
|
11
|
+
* (see the `itemFormSidebarPanels` hook)
|
|
12
12
|
*
|
|
13
13
|
* @tag sidebarPanels
|
|
14
14
|
*/
|
|
@@ -23,12 +23,12 @@ export type RenderManualFieldExtensionConfigScreenCtx =
|
|
|
23
23
|
fieldExtensionId: string;
|
|
24
24
|
/**
|
|
25
25
|
* The current value of the parameters (you can change the value with the
|
|
26
|
-
* `setParameters`
|
|
26
|
+
* `setParameters` hook)
|
|
27
27
|
*/
|
|
28
28
|
parameters: Record<string, unknown>;
|
|
29
29
|
/**
|
|
30
30
|
* The current validation errors for the parameters (you can set them
|
|
31
|
-
* implementing the `validateManualFieldExtensionParameters`
|
|
31
|
+
* implementing the `validateManualFieldExtensionParameters` hook)
|
|
32
32
|
*/
|
|
33
33
|
errors: Record<string, unknown>;
|
|
34
34
|
|
package/src/hooks/renderModal.ts
CHANGED
|
@@ -7,7 +7,7 @@ type Upload = SchemaTypes.Upload;
|
|
|
7
7
|
export type RenderUploadSidebarPanelHook = {
|
|
8
8
|
/**
|
|
9
9
|
* This function will be called when the plugin needs to render a sidebar panel
|
|
10
|
-
* (see the `uploadSidebarPanels`
|
|
10
|
+
* (see the `uploadSidebarPanels` hook)
|
|
11
11
|
*
|
|
12
12
|
* @tag sidebarPanels
|
|
13
13
|
*/
|