datocms-plugin-sdk 0.3.7 → 0.3.24-alpha.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.
- package/dist/cjs/connect.js +18 -7
- package/dist/cjs/connect.js.map +1 -1
- package/dist/cjs/guards.js +2 -1
- package/dist/cjs/guards.js.map +1 -1
- package/dist/esm/SiteApiSchema.d.ts +165 -81
- package/dist/esm/connect.d.ts +45 -26
- package/dist/esm/connect.js +19 -8
- package/dist/esm/connect.js.map +1 -1
- package/dist/esm/guards.d.ts +4 -1
- package/dist/esm/guards.js +1 -0
- package/dist/esm/guards.js.map +1 -1
- package/dist/esm/types.d.ts +591 -313
- package/dist/types/SiteApiSchema.d.ts +165 -81
- package/dist/types/connect.d.ts +45 -26
- package/dist/types/guards.d.ts +4 -1
- package/dist/types/types.d.ts +591 -313
- package/package.json +2 -2
- package/types.json +3079 -1488
package/dist/esm/connect.d.ts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { Field, ModelBlock } from './SiteApiSchema';
|
|
2
|
-
import { ContentAreaSidebarItem, FieldExtensionOverride, InitPropertiesAndMethods, ItemFormSidebarPanel, MainNavigationTab, ManualFieldExtension, OnBootPropertiesAndMethods, RenderConfigScreenPropertiesAndMethods, RenderFieldExtensionPropertiesAndMethods, RenderManualFieldExtensionConfigScreenPropertiesAndMethods, RenderModalPropertiesAndMethods, RenderPagePropertiesAndMethods, RenderSidebarPanePropertiesAndMethods, SettingsAreaSidebarItemGroup } from './types';
|
|
2
|
+
import { AssetSource, ContentAreaSidebarItem, FieldExtensionOverride, InitPropertiesAndMethods, ItemFormSidebarPanel, MainNavigationTab, ManualFieldExtension, OnBootPropertiesAndMethods, RenderAssetSourcePropertiesAndMethods, RenderConfigScreenPropertiesAndMethods, RenderFieldExtensionPropertiesAndMethods, RenderManualFieldExtensionConfigScreenPropertiesAndMethods, RenderModalPropertiesAndMethods, RenderPagePropertiesAndMethods, RenderSidebarPanePropertiesAndMethods, SettingsAreaSidebarItemGroup } from './types';
|
|
3
3
|
export declare type SizingUtilities = {
|
|
4
4
|
/**
|
|
5
|
-
* Listens for DOM changes and automatically calls `setHeight` when it detects
|
|
6
|
-
* If you're using `datocms-react-ui` package, the `<Canvas />`
|
|
7
|
-
* care of calling this method for you.
|
|
5
|
+
* Listens for DOM changes and automatically calls `setHeight` when it detects
|
|
6
|
+
* a change. If you're using `datocms-react-ui` package, the `<Canvas />`
|
|
7
|
+
* component already takes care of calling this method for you.
|
|
8
8
|
*/
|
|
9
9
|
startAutoResizer: () => void;
|
|
10
10
|
/** Stops resizing the iframe automatically */
|
|
11
11
|
stopAutoResizer: () => void;
|
|
12
12
|
/**
|
|
13
|
-
* Triggers a change in the size of the iframe. If you don't explicitely pass
|
|
14
|
-
* `newHeight` it will be automatically calculated using the iframe content
|
|
13
|
+
* Triggers a change in the size of the iframe. If you don't explicitely pass
|
|
14
|
+
* a `newHeight` it will be automatically calculated using the iframe content
|
|
15
|
+
* at the moment
|
|
15
16
|
*/
|
|
16
17
|
updateHeight: (newHeight?: number) => void;
|
|
17
18
|
};
|
|
@@ -23,6 +24,7 @@ export declare type FieldIntentCtx = InitPropertiesAndMethods & {
|
|
|
23
24
|
};
|
|
24
25
|
export declare type RenderPageCtx = RenderPagePropertiesAndMethods;
|
|
25
26
|
export declare type RenderModalCtx = RenderModalPropertiesAndMethods & SizingUtilities;
|
|
27
|
+
export declare type RenderAssetSourceCtx = RenderAssetSourcePropertiesAndMethods & SizingUtilities;
|
|
26
28
|
export declare type RenderItemFormSidebarPanelCtx = RenderSidebarPanePropertiesAndMethods & SizingUtilities;
|
|
27
29
|
export declare type RenderFieldExtensionCtx = RenderFieldExtensionPropertiesAndMethods & SizingUtilities;
|
|
28
30
|
export declare type RenderManualFieldExtensionConfigScreenCtx = RenderManualFieldExtensionConfigScreenPropertiesAndMethods & SizingUtilities;
|
|
@@ -30,8 +32,8 @@ export declare type RenderConfigScreenCtx = RenderConfigScreenPropertiesAndMetho
|
|
|
30
32
|
/** The full options you can pass to the `connect` function */
|
|
31
33
|
export declare type FullConnectParameters = {
|
|
32
34
|
/**
|
|
33
|
-
* This function will be called once at boot time and can be used to perform
|
|
34
|
-
* initial integrity checks on the configuration.
|
|
35
|
+
* This function will be called once at boot time and can be used to perform
|
|
36
|
+
* ie. some initial integrity checks on the configuration.
|
|
35
37
|
*
|
|
36
38
|
* @group boot
|
|
37
39
|
*/
|
|
@@ -55,69 +57,86 @@ export declare type FullConnectParameters = {
|
|
|
55
57
|
*/
|
|
56
58
|
contentAreaSidebarItems: (ctx: IntentCtx) => ContentAreaSidebarItem[];
|
|
57
59
|
/**
|
|
58
|
-
* Use this function to declare new field extensions that users will be able
|
|
59
|
-
* manually in some field
|
|
60
|
+
* Use this function to declare new field extensions that users will be able
|
|
61
|
+
* to install manually in some field
|
|
60
62
|
*
|
|
61
63
|
* @group manualFieldExtensions
|
|
62
64
|
*/
|
|
63
65
|
manualFieldExtensions: (ctx: IntentCtx) => ManualFieldExtension[];
|
|
64
66
|
/**
|
|
65
|
-
* Use this function to declare
|
|
66
|
-
*
|
|
67
|
+
* Use this function to declare additional sources to be shown when users want
|
|
68
|
+
* to upload new assets
|
|
69
|
+
*
|
|
70
|
+
* @group assetSources
|
|
71
|
+
*/
|
|
72
|
+
assetSources: (ctx: IntentCtx) => AssetSource[] | void;
|
|
73
|
+
/**
|
|
74
|
+
* Use this function to declare new sidebar panels to be shown when the user
|
|
75
|
+
* edits records of a particular model
|
|
67
76
|
*
|
|
68
77
|
* @group sidebarPanels
|
|
69
78
|
*/
|
|
70
79
|
itemFormSidebarPanels: (itemType: ModelBlock, ctx: IntentCtx) => ItemFormSidebarPanel[];
|
|
71
80
|
/**
|
|
72
|
-
* Use this function to automatically force one or more field extensions to a
|
|
81
|
+
* Use this function to automatically force one or more field extensions to a
|
|
82
|
+
* particular field
|
|
73
83
|
*
|
|
74
84
|
* @group forcedFieldExtensions
|
|
75
85
|
*/
|
|
76
86
|
overrideFieldExtensions: (field: Field, ctx: FieldIntentCtx) => FieldExtensionOverride | void;
|
|
77
87
|
/**
|
|
78
|
-
* This function will be called when the plugin needs to render the plugin's
|
|
88
|
+
* This function will be called when the plugin needs to render the plugin's
|
|
89
|
+
* configuration form
|
|
79
90
|
*
|
|
80
91
|
* @group configScreen
|
|
81
92
|
*/
|
|
82
93
|
renderConfigScreen: (ctx: RenderConfigScreenCtx) => void;
|
|
83
94
|
/**
|
|
84
|
-
* This function will be called when the plugin needs to render a specific
|
|
85
|
-
* `mainNavigationTabs`, `settingsAreaSidebarItemGroups` and
|
|
95
|
+
* This function will be called when the plugin needs to render a specific
|
|
96
|
+
* page (see the `mainNavigationTabs`, `settingsAreaSidebarItemGroups` and
|
|
97
|
+
* `contentAreaSidebarItems` functions)
|
|
86
98
|
*
|
|
87
99
|
* @group pages
|
|
88
100
|
*/
|
|
89
101
|
renderPage: (pageId: string, ctx: RenderPageCtx) => void;
|
|
90
102
|
/**
|
|
91
|
-
* This function will be called when the plugin requested to open a modal (see
|
|
92
|
-
* `openModal` function)
|
|
103
|
+
* This function will be called when the plugin requested to open a modal (see
|
|
104
|
+
* the `openModal` function)
|
|
93
105
|
*
|
|
94
106
|
* @group modals
|
|
95
107
|
*/
|
|
96
108
|
renderModal: (modalId: string, ctx: RenderModalCtx) => void;
|
|
97
109
|
/**
|
|
98
|
-
* This function will be called when the plugin needs to render a sidebar
|
|
99
|
-
* `itemFormSidebarPanels` function)
|
|
110
|
+
* This function will be called when the plugin needs to render a sidebar
|
|
111
|
+
* panel (see the `itemFormSidebarPanels` function)
|
|
100
112
|
*
|
|
101
113
|
* @group sidebarPanels
|
|
102
114
|
*/
|
|
103
115
|
renderItemFormSidebarPanel: (sidebarPaneId: string, ctx: RenderItemFormSidebarPanelCtx) => void;
|
|
104
116
|
/**
|
|
105
|
-
* This function will be called when the
|
|
106
|
-
*
|
|
117
|
+
* This function will be called when the user selects one of the plugin's
|
|
118
|
+
* asset sources to upload a new media file.
|
|
119
|
+
*
|
|
120
|
+
* @group assetSources
|
|
121
|
+
*/
|
|
122
|
+
renderAssetSource: (assetSourceId: string, ctx: RenderAssetSourceCtx) => void;
|
|
123
|
+
/**
|
|
124
|
+
* This function will be called when the plugin needs to render a field
|
|
125
|
+
* extension (see the `manualFieldExtensions` and `overrideFieldExtensions` functions)
|
|
107
126
|
*
|
|
108
127
|
* @group forcedFieldExtensions
|
|
109
128
|
*/
|
|
110
129
|
renderFieldExtension: (fieldExtensionId: string, ctx: RenderFieldExtensionCtx) => void;
|
|
111
130
|
/**
|
|
112
|
-
* This function will be called when the plugin needs to render the
|
|
113
|
-
* for installing a field extension inside a particular field
|
|
131
|
+
* This function will be called when the plugin needs to render the
|
|
132
|
+
* configuration form for installing a field extension inside a particular field
|
|
114
133
|
*
|
|
115
134
|
* @group manualFieldExtensions
|
|
116
135
|
*/
|
|
117
136
|
renderManualFieldExtensionConfigScreen: (fieldExtensionId: string, ctx: RenderManualFieldExtensionConfigScreenCtx) => void;
|
|
118
137
|
/**
|
|
119
|
-
* This function will be called each time the configuration object changes. It
|
|
120
|
-
* return an object containing possible validation errors
|
|
138
|
+
* This function will be called each time the configuration object changes. It
|
|
139
|
+
* must return an object containing possible validation errors
|
|
121
140
|
*
|
|
122
141
|
* @group manualFieldExtensions
|
|
123
142
|
*/
|
package/dist/esm/connect.js
CHANGED
|
@@ -46,7 +46,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
import connectToParent from 'penpal/lib/connectToParent';
|
|
49
|
-
import { isInitParent, isOnBootParent, isRenderConfigScreenParent, isRenderFieldExtensionParent, isRenderManualFieldExtensionConfigScreenParent, isRenderModalParent, isRenderPageParent, isRenderSidebarPaneParent, } from './guards';
|
|
49
|
+
import { isInitParent, isOnBootParent, isRenderAssetSourceParent, isRenderConfigScreenParent, isRenderFieldExtensionParent, isRenderManualFieldExtensionConfigScreenParent, isRenderModalParent, isRenderPageParent, isRenderSidebarPaneParent, } from './guards';
|
|
50
50
|
function toMultifield(fn) {
|
|
51
51
|
return function (fields, ctx) {
|
|
52
52
|
if (!fn) {
|
|
@@ -105,7 +105,7 @@ var buildRenderUtils = function (parent) {
|
|
|
105
105
|
export function connect(configuration) {
|
|
106
106
|
if (configuration === void 0) { configuration = {}; }
|
|
107
107
|
return __awaiter(this, void 0, void 0, function () {
|
|
108
|
-
var mainNavigationTabs, settingsAreaSidebarItemGroups, contentAreaSidebarItems, manualFieldExtensions, itemFormSidebarPanels, listener, penpalConnection, parent, initialSettings, render, render, renderUtils_1, render, renderUtils_2, render, renderUtils_3, render, renderUtils_4, render, renderUtils_5, render;
|
|
108
|
+
var mainNavigationTabs, settingsAreaSidebarItemGroups, contentAreaSidebarItems, manualFieldExtensions, itemFormSidebarPanels, listener, penpalConnection, parent, initialSettings, render, render, renderUtils_1, render, renderUtils_2, render, renderUtils_3, render, renderUtils_4, render, renderUtils_5, render, renderUtils_6, render;
|
|
109
109
|
return __generator(this, function (_a) {
|
|
110
110
|
switch (_a.label) {
|
|
111
111
|
case 0:
|
|
@@ -188,35 +188,46 @@ export function connect(configuration) {
|
|
|
188
188
|
listener = render;
|
|
189
189
|
render(initialSettings);
|
|
190
190
|
}
|
|
191
|
-
if (
|
|
191
|
+
if (isRenderAssetSourceParent(parent, initialSettings)) {
|
|
192
192
|
renderUtils_3 = buildRenderUtils(parent);
|
|
193
|
+
render = function (settings) {
|
|
194
|
+
if (!configuration.renderAssetSource) {
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
configuration.renderAssetSource(settings.assetSourceId, __assign(__assign(__assign({}, parent), settings), renderUtils_3));
|
|
198
|
+
};
|
|
199
|
+
listener = render;
|
|
200
|
+
render(initialSettings);
|
|
201
|
+
}
|
|
202
|
+
if (isRenderSidebarPaneParent(parent, initialSettings)) {
|
|
203
|
+
renderUtils_4 = buildRenderUtils(parent);
|
|
193
204
|
render = function (settings) {
|
|
194
205
|
if (!configuration.renderItemFormSidebarPanel) {
|
|
195
206
|
return;
|
|
196
207
|
}
|
|
197
|
-
configuration.renderItemFormSidebarPanel(settings.sidebarPaneId, __assign(__assign(__assign({}, parent), settings),
|
|
208
|
+
configuration.renderItemFormSidebarPanel(settings.sidebarPaneId, __assign(__assign(__assign({}, parent), settings), renderUtils_4));
|
|
198
209
|
};
|
|
199
210
|
listener = render;
|
|
200
211
|
render(initialSettings);
|
|
201
212
|
}
|
|
202
213
|
if (isRenderFieldExtensionParent(parent, initialSettings)) {
|
|
203
|
-
|
|
214
|
+
renderUtils_5 = buildRenderUtils(parent);
|
|
204
215
|
render = function (settings) {
|
|
205
216
|
if (!configuration.renderFieldExtension) {
|
|
206
217
|
return;
|
|
207
218
|
}
|
|
208
|
-
configuration.renderFieldExtension(settings.fieldExtensionId, __assign(__assign(__assign({}, parent), settings),
|
|
219
|
+
configuration.renderFieldExtension(settings.fieldExtensionId, __assign(__assign(__assign({}, parent), settings), renderUtils_5));
|
|
209
220
|
};
|
|
210
221
|
listener = render;
|
|
211
222
|
render(initialSettings);
|
|
212
223
|
}
|
|
213
224
|
if (isRenderManualFieldExtensionConfigScreenParent(parent, initialSettings)) {
|
|
214
|
-
|
|
225
|
+
renderUtils_6 = buildRenderUtils(parent);
|
|
215
226
|
render = function (settings) {
|
|
216
227
|
if (!configuration.renderManualFieldExtensionConfigScreen) {
|
|
217
228
|
return;
|
|
218
229
|
}
|
|
219
|
-
configuration.renderManualFieldExtensionConfigScreen(settings.fieldExtensionId, __assign(__assign(__assign({}, parent), settings),
|
|
230
|
+
configuration.renderManualFieldExtensionConfigScreen(settings.fieldExtensionId, __assign(__assign(__assign({}, parent), settings), renderUtils_6));
|
|
220
231
|
};
|
|
221
232
|
listener = render;
|
|
222
233
|
render(initialSettings);
|
package/dist/esm/connect.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connect.js","sourceRoot":"","sources":["../../src/connect.ts"],"names":[],"mappings":";;;;;;;;;;;;;;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AAC,CAAC;wBAEF,QAAQ,GAAG,MAAM,CAAC;wBAClB,MAAM,CAAC,eAA2B,CAAC,CAAC;qBACrC;oBAED,IAAI,8CAA8C,CAAC,MAAM,EAAE,eAAe,CAAC,EAAE;wBAKrE,gBAAc,gBAAgB,CAAC,MAAM,CAAC,CAAC;wBAEvC,MAAM,GAAG,UAAC,QAAkB;4BAChC,IAAI,CAAC,aAAa,CAAC,sCAAsC,EAAE;gCACzD,OAAO;6BACR;4BAED,aAAa,CAAC,sCAAsC,CAClD,QAAQ,CAAC,gBAAgB,iCAEpB,MAAM,GACN,QAAQ,GACR,aAAW,EAEjB,CAAC;wBACJ,CAAC,CAAC;wBAEF,QAAQ,GAAG,MAAM,CAAC;wBAClB,MAAM,CAAC,eAA2B,CAAC,CAAC;qBACrC;;;;;CACF"}
|
package/dist/esm/guards.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InitMethods, OnBootMethods, RenderPageMethods, RenderFieldExtensionMethods, RenderConfigScreenMethods, RenderManualFieldExtensionConfigScreenMethods, RenderSidebarPanelMethods, RenderModalMethods } from './types';
|
|
1
|
+
import { InitMethods, OnBootMethods, RenderPageMethods, RenderFieldExtensionMethods, RenderConfigScreenMethods, RenderManualFieldExtensionConfigScreenMethods, RenderSidebarPanelMethods, RenderModalMethods, RenderAssetSourceMethods } from './types';
|
|
2
2
|
export declare type Parent = {
|
|
3
3
|
getSettings: () => Promise<{
|
|
4
4
|
mode: string;
|
|
@@ -28,3 +28,6 @@ export declare const isRenderFieldExtensionParent: (parent: Parent, settings: {
|
|
|
28
28
|
export declare const isRenderManualFieldExtensionConfigScreenParent: (parent: Parent, settings: {
|
|
29
29
|
mode: string;
|
|
30
30
|
}) => parent is RenderManualFieldExtensionConfigScreenMethods;
|
|
31
|
+
export declare const isRenderAssetSourceParent: (parent: Parent, settings: {
|
|
32
|
+
mode: string;
|
|
33
|
+
}) => parent is RenderAssetSourceMethods;
|
package/dist/esm/guards.js
CHANGED
|
@@ -11,4 +11,5 @@ export var isRenderModalParent = buildGuard('renderModal');
|
|
|
11
11
|
export var isRenderSidebarPaneParent = buildGuard('renderItemFormSidebarPanel');
|
|
12
12
|
export var isRenderFieldExtensionParent = buildGuard('renderFieldExtension');
|
|
13
13
|
export var isRenderManualFieldExtensionConfigScreenParent = buildGuard('renderManualFieldExtensionConfigScreen');
|
|
14
|
+
export var isRenderAssetSourceParent = buildGuard('renderAssetSource');
|
|
14
15
|
//# sourceMappingURL=guards.js.map
|
package/dist/esm/guards.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guards.js","sourceRoot":"","sources":["../../src/guards.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"guards.js","sourceRoot":"","sources":["../../src/guards.ts"],"names":[],"mappings":"AAcA,SAAS,UAAU,CAAmB,IAAY;IAChD,OAAO,UAAC,MAAc,EAAE,QAA0B;QAChD,OAAA,QAAQ,CAAC,IAAI,KAAK,IAAI;IAAtB,CAAsB,CAAC;AAC3B,CAAC;AAED,MAAM,CAAC,IAAM,YAAY,GAAG,UAAU,CAAc,MAAM,CAAC,CAAC;AAE5D,MAAM,CAAC,IAAM,cAAc,GAAG,UAAU,CAAgB,QAAQ,CAAC,CAAC;AAElE,MAAM,CAAC,IAAM,kBAAkB,GAAG,UAAU,CAAoB,YAAY,CAAC,CAAC;AAE9E,MAAM,CAAC,IAAM,0BAA0B,GAAG,UAAU,CAClD,oBAAoB,CACrB,CAAC;AAEF,MAAM,CAAC,IAAM,mBAAmB,GAAG,UAAU,CAC3C,aAAa,CACd,CAAC;AAEF,MAAM,CAAC,IAAM,yBAAyB,GAAG,UAAU,CACjD,4BAA4B,CAC7B,CAAC;AAEF,MAAM,CAAC,IAAM,4BAA4B,GAAG,UAAU,CACpD,sBAAsB,CACvB,CAAC;AAEF,MAAM,CAAC,IAAM,8CAA8C,GAAG,UAAU,CACtE,wCAAwC,CACzC,CAAC;AAEF,MAAM,CAAC,IAAM,yBAAyB,GAAG,UAAU,CACjD,mBAAmB,CACpB,CAAC"}
|