datocms-plugin-sdk 2.0.2 → 2.0.3
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/manifest.js +254 -253
- package/dist/cjs/manifest.js.map +1 -1
- package/dist/esm/ctx/base.d.ts +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 +254 -253
- 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/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 +254 -253
- package/package.json +2 -2
- package/src/ctx/base.ts +1 -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 +408 -374
- package/src/manifestTypes.ts +39 -91
package/dist/esm/manifest.js
CHANGED
|
@@ -3,7 +3,7 @@ export var manifest = {
|
|
|
3
3
|
validateManualFieldExtensionParameters: {
|
|
4
4
|
name: 'validateManualFieldExtensionParameters',
|
|
5
5
|
comment: {
|
|
6
|
-
|
|
6
|
+
markdownText: 'This function will be called each time the configuration object changes. It\nmust return an object containing possible validation errors.',
|
|
7
7
|
tag: 'manualFieldExtensions',
|
|
8
8
|
},
|
|
9
9
|
nonCtxArguments: [
|
|
@@ -25,7 +25,7 @@ export var manifest = {
|
|
|
25
25
|
uploadsDropdownActions: {
|
|
26
26
|
name: 'uploadsDropdownActions',
|
|
27
27
|
comment: {
|
|
28
|
-
|
|
28
|
+
markdownText: 'This function lets you set up custom actions (or groups of actions) that\nshow up when the user:\n\n* selects multiple assets in the Media Area for batch operations, or\n* opens up a specific asset from the Media Area.\n\nThe `executeUploadsDropdownAction()` hook will be triggered once the user\nclicks on one of the defined actions.',
|
|
29
29
|
tag: 'dropdownActions',
|
|
30
30
|
},
|
|
31
31
|
nonCtxArguments: [],
|
|
@@ -43,7 +43,7 @@ export var manifest = {
|
|
|
43
43
|
uploadSidebars: {
|
|
44
44
|
name: 'uploadSidebars',
|
|
45
45
|
comment: {
|
|
46
|
-
|
|
46
|
+
markdownText: 'Use this function to declare new sidebar to be shown when the user opens\nup an asset in the Media Area.',
|
|
47
47
|
tag: 'sidebarPanels',
|
|
48
48
|
},
|
|
49
49
|
nonCtxArguments: [],
|
|
@@ -61,7 +61,7 @@ export var manifest = {
|
|
|
61
61
|
uploadSidebarPanels: {
|
|
62
62
|
name: 'uploadSidebarPanels',
|
|
63
63
|
comment: {
|
|
64
|
-
|
|
64
|
+
markdownText: 'Use this function to declare new sidebar panels to be shown when the user\nopens up an asset in the Media Area.',
|
|
65
65
|
tag: 'sidebarPanels',
|
|
66
66
|
},
|
|
67
67
|
nonCtxArguments: [],
|
|
@@ -79,7 +79,7 @@ export var manifest = {
|
|
|
79
79
|
settingsAreaSidebarItemGroups: {
|
|
80
80
|
name: 'settingsAreaSidebarItemGroups',
|
|
81
81
|
comment: {
|
|
82
|
-
|
|
82
|
+
markdownText: 'Use this function to declare new navigation sections in the Settings Area\nsidebar.',
|
|
83
83
|
tag: 'pages',
|
|
84
84
|
},
|
|
85
85
|
nonCtxArguments: [],
|
|
@@ -97,7 +97,7 @@ export var manifest = {
|
|
|
97
97
|
renderUploadSidebarPanel: {
|
|
98
98
|
name: 'renderUploadSidebarPanel',
|
|
99
99
|
comment: {
|
|
100
|
-
|
|
100
|
+
markdownText: 'This function will be called when the plugin needs to render a sidebar panel\n(see the `uploadSidebarPanels` hook).',
|
|
101
101
|
tag: 'sidebarPanels',
|
|
102
102
|
},
|
|
103
103
|
nonCtxArguments: [
|
|
@@ -113,7 +113,7 @@ export var manifest = {
|
|
|
113
113
|
items: {
|
|
114
114
|
sidebarPaneId: {
|
|
115
115
|
comment: {
|
|
116
|
-
|
|
116
|
+
markdownText: 'The ID of the sidebar panel that needs to be rendered.',
|
|
117
117
|
},
|
|
118
118
|
location: {
|
|
119
119
|
filePath: 'src/hooks/renderUploadSidebarPanel.ts',
|
|
@@ -123,7 +123,7 @@ export var manifest = {
|
|
|
123
123
|
},
|
|
124
124
|
parameters: {
|
|
125
125
|
comment: {
|
|
126
|
-
|
|
126
|
+
markdownText: 'The arbitrary `parameters` of the panel declared in the\n`uploadSidebarPanels` function.',
|
|
127
127
|
},
|
|
128
128
|
location: {
|
|
129
129
|
filePath: 'src/hooks/renderUploadSidebarPanel.ts',
|
|
@@ -133,7 +133,7 @@ export var manifest = {
|
|
|
133
133
|
},
|
|
134
134
|
upload: {
|
|
135
135
|
comment: {
|
|
136
|
-
|
|
136
|
+
markdownText: 'The active asset.',
|
|
137
137
|
},
|
|
138
138
|
location: {
|
|
139
139
|
filePath: 'src/hooks/renderUploadSidebarPanel.ts',
|
|
@@ -155,7 +155,7 @@ export var manifest = {
|
|
|
155
155
|
renderUploadSidebar: {
|
|
156
156
|
name: 'renderUploadSidebar',
|
|
157
157
|
comment: {
|
|
158
|
-
|
|
158
|
+
markdownText: 'This function will be called when the plugin needs to render a sidebar (see\nthe `uploadSidebars` hook).',
|
|
159
159
|
tag: 'sidebarPanels',
|
|
160
160
|
},
|
|
161
161
|
nonCtxArguments: [
|
|
@@ -171,7 +171,7 @@ export var manifest = {
|
|
|
171
171
|
items: {
|
|
172
172
|
sidebarId: {
|
|
173
173
|
comment: {
|
|
174
|
-
|
|
174
|
+
markdownText: 'The ID of the sidebar that needs to be rendered.',
|
|
175
175
|
},
|
|
176
176
|
location: {
|
|
177
177
|
filePath: 'src/hooks/renderUploadSidebar.ts',
|
|
@@ -181,7 +181,7 @@ export var manifest = {
|
|
|
181
181
|
},
|
|
182
182
|
parameters: {
|
|
183
183
|
comment: {
|
|
184
|
-
|
|
184
|
+
markdownText: 'The arbitrary `parameters` of the declared in the `uploadSidebars`\nfunction.',
|
|
185
185
|
},
|
|
186
186
|
location: {
|
|
187
187
|
filePath: 'src/hooks/renderUploadSidebar.ts',
|
|
@@ -191,7 +191,7 @@ export var manifest = {
|
|
|
191
191
|
},
|
|
192
192
|
upload: {
|
|
193
193
|
comment: {
|
|
194
|
-
|
|
194
|
+
markdownText: 'The active asset.',
|
|
195
195
|
},
|
|
196
196
|
location: {
|
|
197
197
|
filePath: 'src/hooks/renderUploadSidebar.ts',
|
|
@@ -213,7 +213,7 @@ export var manifest = {
|
|
|
213
213
|
renderPage: {
|
|
214
214
|
name: 'renderPage',
|
|
215
215
|
comment: {
|
|
216
|
-
|
|
216
|
+
markdownText: 'This function will be called when the plugin needs to render a specific\npage (see the `mainNavigationTabs`, `settingsAreaSidebarItemGroups` and\n`contentAreaSidebarItems` functions).',
|
|
217
217
|
tag: 'pages',
|
|
218
218
|
},
|
|
219
219
|
nonCtxArguments: [
|
|
@@ -229,7 +229,7 @@ export var manifest = {
|
|
|
229
229
|
items: {
|
|
230
230
|
pageId: {
|
|
231
231
|
comment: {
|
|
232
|
-
|
|
232
|
+
markdownText: 'The ID of the page that needs to be rendered.',
|
|
233
233
|
},
|
|
234
234
|
location: {
|
|
235
235
|
filePath: 'src/hooks/renderPage.ts',
|
|
@@ -251,7 +251,7 @@ export var manifest = {
|
|
|
251
251
|
renderModal: {
|
|
252
252
|
name: 'renderModal',
|
|
253
253
|
comment: {
|
|
254
|
-
|
|
254
|
+
markdownText: 'This function will be called when the plugin requested to open a modal (see\nthe `openModal` hook).',
|
|
255
255
|
tag: 'modals',
|
|
256
256
|
},
|
|
257
257
|
nonCtxArguments: [
|
|
@@ -267,7 +267,7 @@ export var manifest = {
|
|
|
267
267
|
items: {
|
|
268
268
|
modalId: {
|
|
269
269
|
comment: {
|
|
270
|
-
|
|
270
|
+
markdownText: 'The ID of the modal that needs to be rendered.',
|
|
271
271
|
},
|
|
272
272
|
location: {
|
|
273
273
|
filePath: 'src/hooks/renderModal.ts',
|
|
@@ -277,7 +277,7 @@ export var manifest = {
|
|
|
277
277
|
},
|
|
278
278
|
parameters: {
|
|
279
279
|
comment: {
|
|
280
|
-
|
|
280
|
+
markdownText: 'The arbitrary `parameters` of the modal declared in the `openModal`\nfunction.',
|
|
281
281
|
},
|
|
282
282
|
location: {
|
|
283
283
|
filePath: 'src/hooks/renderModal.ts',
|
|
@@ -293,7 +293,7 @@ export var manifest = {
|
|
|
293
293
|
items: {
|
|
294
294
|
resolve: {
|
|
295
295
|
comment: {
|
|
296
|
-
|
|
296
|
+
markdownText: 'A function to be called by the plugin to close the modal. The `openModal`\ncall will be resolved with the passed return value.',
|
|
297
297
|
example: "const returnValue = prompt(\n 'Please specify the value to return to the caller:',\n 'success',\n);\n\nawait ctx.resolve(returnValue);",
|
|
298
298
|
},
|
|
299
299
|
location: {
|
|
@@ -327,7 +327,7 @@ export var manifest = {
|
|
|
327
327
|
items: {
|
|
328
328
|
fieldExtensionId: {
|
|
329
329
|
comment: {
|
|
330
|
-
|
|
330
|
+
markdownText: 'The ID of the field extension for which we need to render the parameters\nform.',
|
|
331
331
|
},
|
|
332
332
|
location: {
|
|
333
333
|
filePath: 'src/hooks/renderManualFieldExtensionConfigScreen.ts',
|
|
@@ -337,7 +337,7 @@ export var manifest = {
|
|
|
337
337
|
},
|
|
338
338
|
parameters: {
|
|
339
339
|
comment: {
|
|
340
|
-
|
|
340
|
+
markdownText: 'The current value of the parameters (you can change the value with the\n`setParameters` hook).',
|
|
341
341
|
},
|
|
342
342
|
location: {
|
|
343
343
|
filePath: 'src/hooks/renderManualFieldExtensionConfigScreen.ts',
|
|
@@ -347,7 +347,7 @@ export var manifest = {
|
|
|
347
347
|
},
|
|
348
348
|
errors: {
|
|
349
349
|
comment: {
|
|
350
|
-
|
|
350
|
+
markdownText: 'The current validation errors for the parameters (you can set them\nimplementing the `validateManualFieldExtensionParameters` hook).',
|
|
351
351
|
},
|
|
352
352
|
location: {
|
|
353
353
|
filePath: 'src/hooks/renderManualFieldExtensionConfigScreen.ts',
|
|
@@ -357,7 +357,7 @@ export var manifest = {
|
|
|
357
357
|
},
|
|
358
358
|
pendingField: {
|
|
359
359
|
comment: {
|
|
360
|
-
|
|
360
|
+
markdownText: 'The field entity that is being edited in the form.',
|
|
361
361
|
},
|
|
362
362
|
location: {
|
|
363
363
|
filePath: 'src/hooks/renderManualFieldExtensionConfigScreen.ts',
|
|
@@ -367,7 +367,7 @@ export var manifest = {
|
|
|
367
367
|
},
|
|
368
368
|
itemType: {
|
|
369
369
|
comment: {
|
|
370
|
-
|
|
370
|
+
markdownText: 'The model for the field being edited.',
|
|
371
371
|
},
|
|
372
372
|
location: {
|
|
373
373
|
filePath: 'src/hooks/renderManualFieldExtensionConfigScreen.ts',
|
|
@@ -383,7 +383,7 @@ export var manifest = {
|
|
|
383
383
|
items: {
|
|
384
384
|
setParameters: {
|
|
385
385
|
comment: {
|
|
386
|
-
|
|
386
|
+
markdownText: 'Sets a new value for the parameters.',
|
|
387
387
|
example: "await ctx.setParameters({ color: '#ff0000' });",
|
|
388
388
|
},
|
|
389
389
|
location: {
|
|
@@ -405,7 +405,7 @@ export var manifest = {
|
|
|
405
405
|
renderItemFormSidebarPanel: {
|
|
406
406
|
name: 'renderItemFormSidebarPanel',
|
|
407
407
|
comment: {
|
|
408
|
-
|
|
408
|
+
markdownText: 'This function will be called when the plugin needs to render a sidebar panel\n(see the `itemFormSidebarPanels` hook).',
|
|
409
409
|
tag: 'sidebarPanels',
|
|
410
410
|
},
|
|
411
411
|
nonCtxArguments: [
|
|
@@ -420,12 +420,12 @@ export var manifest = {
|
|
|
420
420
|
{
|
|
421
421
|
name: 'ItemFormAdditionalProperties',
|
|
422
422
|
comment: {
|
|
423
|
-
|
|
423
|
+
markdownText: "These information describe the current state of the form that's being shown\nto the end-user to edit a record.",
|
|
424
424
|
},
|
|
425
425
|
items: {
|
|
426
426
|
locale: {
|
|
427
427
|
comment: {
|
|
428
|
-
|
|
428
|
+
markdownText: 'The currently active locale for the record.',
|
|
429
429
|
},
|
|
430
430
|
location: {
|
|
431
431
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -435,7 +435,7 @@ export var manifest = {
|
|
|
435
435
|
},
|
|
436
436
|
item: {
|
|
437
437
|
comment: {
|
|
438
|
-
|
|
438
|
+
markdownText: 'If an already persisted record is being edited, returns the full record\nentity.',
|
|
439
439
|
},
|
|
440
440
|
location: {
|
|
441
441
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -445,7 +445,7 @@ export var manifest = {
|
|
|
445
445
|
},
|
|
446
446
|
itemType: {
|
|
447
447
|
comment: {
|
|
448
|
-
|
|
448
|
+
markdownText: 'The model for the record being edited.',
|
|
449
449
|
},
|
|
450
450
|
location: {
|
|
451
451
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -455,7 +455,7 @@ export var manifest = {
|
|
|
455
455
|
},
|
|
456
456
|
formValues: {
|
|
457
457
|
comment: {
|
|
458
|
-
|
|
458
|
+
markdownText: 'The complete internal form state.',
|
|
459
459
|
},
|
|
460
460
|
location: {
|
|
461
461
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -465,7 +465,7 @@ export var manifest = {
|
|
|
465
465
|
},
|
|
466
466
|
itemStatus: {
|
|
467
467
|
comment: {
|
|
468
|
-
|
|
468
|
+
markdownText: 'The current status of the record being edited.',
|
|
469
469
|
},
|
|
470
470
|
location: {
|
|
471
471
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -475,7 +475,7 @@ export var manifest = {
|
|
|
475
475
|
},
|
|
476
476
|
isSubmitting: {
|
|
477
477
|
comment: {
|
|
478
|
-
|
|
478
|
+
markdownText: 'Whether the form is currently submitting itself or not.',
|
|
479
479
|
},
|
|
480
480
|
location: {
|
|
481
481
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -485,7 +485,7 @@ export var manifest = {
|
|
|
485
485
|
},
|
|
486
486
|
isFormDirty: {
|
|
487
487
|
comment: {
|
|
488
|
-
|
|
488
|
+
markdownText: 'Whether the form has some non-persisted changes or not.',
|
|
489
489
|
},
|
|
490
490
|
location: {
|
|
491
491
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -495,7 +495,7 @@ export var manifest = {
|
|
|
495
495
|
},
|
|
496
496
|
blocksAnalysis: {
|
|
497
497
|
comment: {
|
|
498
|
-
|
|
498
|
+
markdownText: 'Provides information on how many blocks are currently present in the form.',
|
|
499
499
|
},
|
|
500
500
|
location: {
|
|
501
501
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -509,7 +509,7 @@ export var manifest = {
|
|
|
509
509
|
items: {
|
|
510
510
|
sidebarPaneId: {
|
|
511
511
|
comment: {
|
|
512
|
-
|
|
512
|
+
markdownText: 'The ID of the sidebar panel that needs to be rendered.',
|
|
513
513
|
},
|
|
514
514
|
location: {
|
|
515
515
|
filePath: 'src/hooks/renderItemFormSidebarPanel.ts',
|
|
@@ -519,7 +519,7 @@ export var manifest = {
|
|
|
519
519
|
},
|
|
520
520
|
parameters: {
|
|
521
521
|
comment: {
|
|
522
|
-
|
|
522
|
+
markdownText: 'The arbitrary `parameters` of the panel declared in the\n`itemFormSidebarPanels` function.',
|
|
523
523
|
},
|
|
524
524
|
location: {
|
|
525
525
|
filePath: 'src/hooks/renderItemFormSidebarPanel.ts',
|
|
@@ -534,12 +534,12 @@ export var manifest = {
|
|
|
534
534
|
{
|
|
535
535
|
name: 'ItemFormAdditionalMethods',
|
|
536
536
|
comment: {
|
|
537
|
-
|
|
537
|
+
markdownText: "These methods can be used to interact with the form that's being shown to the\nend-user to edit a record.",
|
|
538
538
|
},
|
|
539
539
|
items: {
|
|
540
540
|
toggleField: {
|
|
541
541
|
comment: {
|
|
542
|
-
|
|
542
|
+
markdownText: 'Hides/shows a specific field in the form. Please be aware that when a field\nis hidden, the field editor for that field will be removed from the DOM\nitself, including any associated plugins. When it is shown again, its\nplugins will be reinitialized.',
|
|
543
543
|
example: "const fieldPath = prompt(\n 'Please insert the path of a field in the form',\n ctx.fieldPath,\n);\n\nawait ctx.toggleField(fieldPath, true);",
|
|
544
544
|
},
|
|
545
545
|
location: {
|
|
@@ -550,7 +550,7 @@ export var manifest = {
|
|
|
550
550
|
},
|
|
551
551
|
disableField: {
|
|
552
552
|
comment: {
|
|
553
|
-
|
|
553
|
+
markdownText: 'Disables/re-enables a specific field in the form.',
|
|
554
554
|
example: "const fieldPath = prompt(\n 'Please insert the path of a field in the form',\n ctx.fieldPath,\n);\n\nawait ctx.disableField(fieldPath, true);",
|
|
555
555
|
},
|
|
556
556
|
location: {
|
|
@@ -561,7 +561,7 @@ export var manifest = {
|
|
|
561
561
|
},
|
|
562
562
|
scrollToField: {
|
|
563
563
|
comment: {
|
|
564
|
-
|
|
564
|
+
markdownText: 'Smoothly navigates to a specific field in the form. If the field is\nlocalized it will switch language tab and then navigate to the chosen\nfield.',
|
|
565
565
|
example: "const fieldPath = prompt(\n 'Please insert the path of a field in the form',\n ctx.fieldPath,\n);\n\nawait ctx.scrollToField(fieldPath);",
|
|
566
566
|
},
|
|
567
567
|
location: {
|
|
@@ -572,7 +572,7 @@ export var manifest = {
|
|
|
572
572
|
},
|
|
573
573
|
setFieldValue: {
|
|
574
574
|
comment: {
|
|
575
|
-
|
|
575
|
+
markdownText: 'Changes a specific path of the `formValues` object.',
|
|
576
576
|
example: "const fieldPath = prompt(\n 'Please insert the path of a field in the form',\n ctx.fieldPath,\n);\n\nawait ctx.setFieldValue(fieldPath, 'new value');",
|
|
577
577
|
},
|
|
578
578
|
location: {
|
|
@@ -583,7 +583,7 @@ export var manifest = {
|
|
|
583
583
|
},
|
|
584
584
|
formValuesToItem: {
|
|
585
585
|
comment: {
|
|
586
|
-
|
|
586
|
+
markdownText: 'Takes the internal form state, and transforms it into an Item entity\ncompatible with DatoCMS API.\n\nWhen `skipUnchangedFields`, only the fields that changed value will be\nserialized.\n\nIf the required nested blocks are still not loaded, this method will return\n`undefined`.',
|
|
587
587
|
example: 'await ctx.formValuesToItem(ctx.formValues, false);',
|
|
588
588
|
},
|
|
589
589
|
location: {
|
|
@@ -594,7 +594,7 @@ export var manifest = {
|
|
|
594
594
|
},
|
|
595
595
|
itemToFormValues: {
|
|
596
596
|
comment: {
|
|
597
|
-
|
|
597
|
+
markdownText: 'Takes an Item entity, and converts it into the internal form state.',
|
|
598
598
|
example: 'await ctx.itemToFormValues(ctx.item);',
|
|
599
599
|
},
|
|
600
600
|
location: {
|
|
@@ -605,7 +605,7 @@ export var manifest = {
|
|
|
605
605
|
},
|
|
606
606
|
saveCurrentItem: {
|
|
607
607
|
comment: {
|
|
608
|
-
|
|
608
|
+
markdownText: 'Triggers a submit form for current record.',
|
|
609
609
|
example: 'await ctx.saveCurrentItem();',
|
|
610
610
|
},
|
|
611
611
|
location: {
|
|
@@ -627,7 +627,7 @@ export var manifest = {
|
|
|
627
627
|
renderItemFormSidebar: {
|
|
628
628
|
name: 'renderItemFormSidebar',
|
|
629
629
|
comment: {
|
|
630
|
-
|
|
630
|
+
markdownText: 'This function will be called when the plugin needs to render a sidebar (see\nthe `itemFormSidebars` hook).',
|
|
631
631
|
tag: 'sidebarPanels',
|
|
632
632
|
},
|
|
633
633
|
nonCtxArguments: [
|
|
@@ -642,12 +642,12 @@ export var manifest = {
|
|
|
642
642
|
{
|
|
643
643
|
name: 'ItemFormAdditionalProperties',
|
|
644
644
|
comment: {
|
|
645
|
-
|
|
645
|
+
markdownText: "These information describe the current state of the form that's being shown\nto the end-user to edit a record.",
|
|
646
646
|
},
|
|
647
647
|
items: {
|
|
648
648
|
locale: {
|
|
649
649
|
comment: {
|
|
650
|
-
|
|
650
|
+
markdownText: 'The currently active locale for the record.',
|
|
651
651
|
},
|
|
652
652
|
location: {
|
|
653
653
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -657,7 +657,7 @@ export var manifest = {
|
|
|
657
657
|
},
|
|
658
658
|
item: {
|
|
659
659
|
comment: {
|
|
660
|
-
|
|
660
|
+
markdownText: 'If an already persisted record is being edited, returns the full record\nentity.',
|
|
661
661
|
},
|
|
662
662
|
location: {
|
|
663
663
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -667,7 +667,7 @@ export var manifest = {
|
|
|
667
667
|
},
|
|
668
668
|
itemType: {
|
|
669
669
|
comment: {
|
|
670
|
-
|
|
670
|
+
markdownText: 'The model for the record being edited.',
|
|
671
671
|
},
|
|
672
672
|
location: {
|
|
673
673
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -677,7 +677,7 @@ export var manifest = {
|
|
|
677
677
|
},
|
|
678
678
|
formValues: {
|
|
679
679
|
comment: {
|
|
680
|
-
|
|
680
|
+
markdownText: 'The complete internal form state.',
|
|
681
681
|
},
|
|
682
682
|
location: {
|
|
683
683
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -687,7 +687,7 @@ export var manifest = {
|
|
|
687
687
|
},
|
|
688
688
|
itemStatus: {
|
|
689
689
|
comment: {
|
|
690
|
-
|
|
690
|
+
markdownText: 'The current status of the record being edited.',
|
|
691
691
|
},
|
|
692
692
|
location: {
|
|
693
693
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -697,7 +697,7 @@ export var manifest = {
|
|
|
697
697
|
},
|
|
698
698
|
isSubmitting: {
|
|
699
699
|
comment: {
|
|
700
|
-
|
|
700
|
+
markdownText: 'Whether the form is currently submitting itself or not.',
|
|
701
701
|
},
|
|
702
702
|
location: {
|
|
703
703
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -707,7 +707,7 @@ export var manifest = {
|
|
|
707
707
|
},
|
|
708
708
|
isFormDirty: {
|
|
709
709
|
comment: {
|
|
710
|
-
|
|
710
|
+
markdownText: 'Whether the form has some non-persisted changes or not.',
|
|
711
711
|
},
|
|
712
712
|
location: {
|
|
713
713
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -717,7 +717,7 @@ export var manifest = {
|
|
|
717
717
|
},
|
|
718
718
|
blocksAnalysis: {
|
|
719
719
|
comment: {
|
|
720
|
-
|
|
720
|
+
markdownText: 'Provides information on how many blocks are currently present in the form.',
|
|
721
721
|
},
|
|
722
722
|
location: {
|
|
723
723
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -731,7 +731,7 @@ export var manifest = {
|
|
|
731
731
|
items: {
|
|
732
732
|
sidebarId: {
|
|
733
733
|
comment: {
|
|
734
|
-
|
|
734
|
+
markdownText: 'The ID of the sidebar that needs to be rendered.',
|
|
735
735
|
},
|
|
736
736
|
location: {
|
|
737
737
|
filePath: 'src/hooks/renderItemFormSidebar.ts',
|
|
@@ -741,7 +741,7 @@ export var manifest = {
|
|
|
741
741
|
},
|
|
742
742
|
parameters: {
|
|
743
743
|
comment: {
|
|
744
|
-
|
|
744
|
+
markdownText: 'The arbitrary `parameters` of the declared in the `itemFormSidebars`\nfunction.',
|
|
745
745
|
},
|
|
746
746
|
location: {
|
|
747
747
|
filePath: 'src/hooks/renderItemFormSidebar.ts',
|
|
@@ -756,12 +756,12 @@ export var manifest = {
|
|
|
756
756
|
{
|
|
757
757
|
name: 'ItemFormAdditionalMethods',
|
|
758
758
|
comment: {
|
|
759
|
-
|
|
759
|
+
markdownText: "These methods can be used to interact with the form that's being shown to the\nend-user to edit a record.",
|
|
760
760
|
},
|
|
761
761
|
items: {
|
|
762
762
|
toggleField: {
|
|
763
763
|
comment: {
|
|
764
|
-
|
|
764
|
+
markdownText: 'Hides/shows a specific field in the form. Please be aware that when a field\nis hidden, the field editor for that field will be removed from the DOM\nitself, including any associated plugins. When it is shown again, its\nplugins will be reinitialized.',
|
|
765
765
|
example: "const fieldPath = prompt(\n 'Please insert the path of a field in the form',\n ctx.fieldPath,\n);\n\nawait ctx.toggleField(fieldPath, true);",
|
|
766
766
|
},
|
|
767
767
|
location: {
|
|
@@ -772,7 +772,7 @@ export var manifest = {
|
|
|
772
772
|
},
|
|
773
773
|
disableField: {
|
|
774
774
|
comment: {
|
|
775
|
-
|
|
775
|
+
markdownText: 'Disables/re-enables a specific field in the form.',
|
|
776
776
|
example: "const fieldPath = prompt(\n 'Please insert the path of a field in the form',\n ctx.fieldPath,\n);\n\nawait ctx.disableField(fieldPath, true);",
|
|
777
777
|
},
|
|
778
778
|
location: {
|
|
@@ -783,7 +783,7 @@ export var manifest = {
|
|
|
783
783
|
},
|
|
784
784
|
scrollToField: {
|
|
785
785
|
comment: {
|
|
786
|
-
|
|
786
|
+
markdownText: 'Smoothly navigates to a specific field in the form. If the field is\nlocalized it will switch language tab and then navigate to the chosen\nfield.',
|
|
787
787
|
example: "const fieldPath = prompt(\n 'Please insert the path of a field in the form',\n ctx.fieldPath,\n);\n\nawait ctx.scrollToField(fieldPath);",
|
|
788
788
|
},
|
|
789
789
|
location: {
|
|
@@ -794,7 +794,7 @@ export var manifest = {
|
|
|
794
794
|
},
|
|
795
795
|
setFieldValue: {
|
|
796
796
|
comment: {
|
|
797
|
-
|
|
797
|
+
markdownText: 'Changes a specific path of the `formValues` object.',
|
|
798
798
|
example: "const fieldPath = prompt(\n 'Please insert the path of a field in the form',\n ctx.fieldPath,\n);\n\nawait ctx.setFieldValue(fieldPath, 'new value');",
|
|
799
799
|
},
|
|
800
800
|
location: {
|
|
@@ -805,7 +805,7 @@ export var manifest = {
|
|
|
805
805
|
},
|
|
806
806
|
formValuesToItem: {
|
|
807
807
|
comment: {
|
|
808
|
-
|
|
808
|
+
markdownText: 'Takes the internal form state, and transforms it into an Item entity\ncompatible with DatoCMS API.\n\nWhen `skipUnchangedFields`, only the fields that changed value will be\nserialized.\n\nIf the required nested blocks are still not loaded, this method will return\n`undefined`.',
|
|
809
809
|
example: 'await ctx.formValuesToItem(ctx.formValues, false);',
|
|
810
810
|
},
|
|
811
811
|
location: {
|
|
@@ -816,7 +816,7 @@ export var manifest = {
|
|
|
816
816
|
},
|
|
817
817
|
itemToFormValues: {
|
|
818
818
|
comment: {
|
|
819
|
-
|
|
819
|
+
markdownText: 'Takes an Item entity, and converts it into the internal form state.',
|
|
820
820
|
example: 'await ctx.itemToFormValues(ctx.item);',
|
|
821
821
|
},
|
|
822
822
|
location: {
|
|
@@ -827,7 +827,7 @@ export var manifest = {
|
|
|
827
827
|
},
|
|
828
828
|
saveCurrentItem: {
|
|
829
829
|
comment: {
|
|
830
|
-
|
|
830
|
+
markdownText: 'Triggers a submit form for current record.',
|
|
831
831
|
example: 'await ctx.saveCurrentItem();',
|
|
832
832
|
},
|
|
833
833
|
location: {
|
|
@@ -849,7 +849,7 @@ export var manifest = {
|
|
|
849
849
|
renderItemFormOutlet: {
|
|
850
850
|
name: 'renderItemFormOutlet',
|
|
851
851
|
comment: {
|
|
852
|
-
|
|
852
|
+
markdownText: 'This function will be called when the plugin needs to render an outlet\ndefined by the `itemFormOutlets()` hook.',
|
|
853
853
|
tag: 'outlets',
|
|
854
854
|
},
|
|
855
855
|
nonCtxArguments: [
|
|
@@ -864,12 +864,12 @@ export var manifest = {
|
|
|
864
864
|
{
|
|
865
865
|
name: 'ItemFormAdditionalProperties',
|
|
866
866
|
comment: {
|
|
867
|
-
|
|
867
|
+
markdownText: "These information describe the current state of the form that's being shown\nto the end-user to edit a record.",
|
|
868
868
|
},
|
|
869
869
|
items: {
|
|
870
870
|
locale: {
|
|
871
871
|
comment: {
|
|
872
|
-
|
|
872
|
+
markdownText: 'The currently active locale for the record.',
|
|
873
873
|
},
|
|
874
874
|
location: {
|
|
875
875
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -879,7 +879,7 @@ export var manifest = {
|
|
|
879
879
|
},
|
|
880
880
|
item: {
|
|
881
881
|
comment: {
|
|
882
|
-
|
|
882
|
+
markdownText: 'If an already persisted record is being edited, returns the full record\nentity.',
|
|
883
883
|
},
|
|
884
884
|
location: {
|
|
885
885
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -889,7 +889,7 @@ export var manifest = {
|
|
|
889
889
|
},
|
|
890
890
|
itemType: {
|
|
891
891
|
comment: {
|
|
892
|
-
|
|
892
|
+
markdownText: 'The model for the record being edited.',
|
|
893
893
|
},
|
|
894
894
|
location: {
|
|
895
895
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -899,7 +899,7 @@ export var manifest = {
|
|
|
899
899
|
},
|
|
900
900
|
formValues: {
|
|
901
901
|
comment: {
|
|
902
|
-
|
|
902
|
+
markdownText: 'The complete internal form state.',
|
|
903
903
|
},
|
|
904
904
|
location: {
|
|
905
905
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -909,7 +909,7 @@ export var manifest = {
|
|
|
909
909
|
},
|
|
910
910
|
itemStatus: {
|
|
911
911
|
comment: {
|
|
912
|
-
|
|
912
|
+
markdownText: 'The current status of the record being edited.',
|
|
913
913
|
},
|
|
914
914
|
location: {
|
|
915
915
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -919,7 +919,7 @@ export var manifest = {
|
|
|
919
919
|
},
|
|
920
920
|
isSubmitting: {
|
|
921
921
|
comment: {
|
|
922
|
-
|
|
922
|
+
markdownText: 'Whether the form is currently submitting itself or not.',
|
|
923
923
|
},
|
|
924
924
|
location: {
|
|
925
925
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -929,7 +929,7 @@ export var manifest = {
|
|
|
929
929
|
},
|
|
930
930
|
isFormDirty: {
|
|
931
931
|
comment: {
|
|
932
|
-
|
|
932
|
+
markdownText: 'Whether the form has some non-persisted changes or not.',
|
|
933
933
|
},
|
|
934
934
|
location: {
|
|
935
935
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -939,7 +939,7 @@ export var manifest = {
|
|
|
939
939
|
},
|
|
940
940
|
blocksAnalysis: {
|
|
941
941
|
comment: {
|
|
942
|
-
|
|
942
|
+
markdownText: 'Provides information on how many blocks are currently present in the form.',
|
|
943
943
|
},
|
|
944
944
|
location: {
|
|
945
945
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -953,7 +953,7 @@ export var manifest = {
|
|
|
953
953
|
items: {
|
|
954
954
|
itemFormOutletId: {
|
|
955
955
|
comment: {
|
|
956
|
-
|
|
956
|
+
markdownText: 'The ID of the outlet that needs to be rendered.',
|
|
957
957
|
},
|
|
958
958
|
location: {
|
|
959
959
|
filePath: 'src/hooks/renderItemFormOutlet.ts',
|
|
@@ -968,12 +968,12 @@ export var manifest = {
|
|
|
968
968
|
{
|
|
969
969
|
name: 'ItemFormAdditionalMethods',
|
|
970
970
|
comment: {
|
|
971
|
-
|
|
971
|
+
markdownText: "These methods can be used to interact with the form that's being shown to the\nend-user to edit a record.",
|
|
972
972
|
},
|
|
973
973
|
items: {
|
|
974
974
|
toggleField: {
|
|
975
975
|
comment: {
|
|
976
|
-
|
|
976
|
+
markdownText: 'Hides/shows a specific field in the form. Please be aware that when a field\nis hidden, the field editor for that field will be removed from the DOM\nitself, including any associated plugins. When it is shown again, its\nplugins will be reinitialized.',
|
|
977
977
|
example: "const fieldPath = prompt(\n 'Please insert the path of a field in the form',\n ctx.fieldPath,\n);\n\nawait ctx.toggleField(fieldPath, true);",
|
|
978
978
|
},
|
|
979
979
|
location: {
|
|
@@ -984,7 +984,7 @@ export var manifest = {
|
|
|
984
984
|
},
|
|
985
985
|
disableField: {
|
|
986
986
|
comment: {
|
|
987
|
-
|
|
987
|
+
markdownText: 'Disables/re-enables a specific field in the form.',
|
|
988
988
|
example: "const fieldPath = prompt(\n 'Please insert the path of a field in the form',\n ctx.fieldPath,\n);\n\nawait ctx.disableField(fieldPath, true);",
|
|
989
989
|
},
|
|
990
990
|
location: {
|
|
@@ -995,7 +995,7 @@ export var manifest = {
|
|
|
995
995
|
},
|
|
996
996
|
scrollToField: {
|
|
997
997
|
comment: {
|
|
998
|
-
|
|
998
|
+
markdownText: 'Smoothly navigates to a specific field in the form. If the field is\nlocalized it will switch language tab and then navigate to the chosen\nfield.',
|
|
999
999
|
example: "const fieldPath = prompt(\n 'Please insert the path of a field in the form',\n ctx.fieldPath,\n);\n\nawait ctx.scrollToField(fieldPath);",
|
|
1000
1000
|
},
|
|
1001
1001
|
location: {
|
|
@@ -1006,7 +1006,7 @@ export var manifest = {
|
|
|
1006
1006
|
},
|
|
1007
1007
|
setFieldValue: {
|
|
1008
1008
|
comment: {
|
|
1009
|
-
|
|
1009
|
+
markdownText: 'Changes a specific path of the `formValues` object.',
|
|
1010
1010
|
example: "const fieldPath = prompt(\n 'Please insert the path of a field in the form',\n ctx.fieldPath,\n);\n\nawait ctx.setFieldValue(fieldPath, 'new value');",
|
|
1011
1011
|
},
|
|
1012
1012
|
location: {
|
|
@@ -1017,7 +1017,7 @@ export var manifest = {
|
|
|
1017
1017
|
},
|
|
1018
1018
|
formValuesToItem: {
|
|
1019
1019
|
comment: {
|
|
1020
|
-
|
|
1020
|
+
markdownText: 'Takes the internal form state, and transforms it into an Item entity\ncompatible with DatoCMS API.\n\nWhen `skipUnchangedFields`, only the fields that changed value will be\nserialized.\n\nIf the required nested blocks are still not loaded, this method will return\n`undefined`.',
|
|
1021
1021
|
example: 'await ctx.formValuesToItem(ctx.formValues, false);',
|
|
1022
1022
|
},
|
|
1023
1023
|
location: {
|
|
@@ -1028,7 +1028,7 @@ export var manifest = {
|
|
|
1028
1028
|
},
|
|
1029
1029
|
itemToFormValues: {
|
|
1030
1030
|
comment: {
|
|
1031
|
-
|
|
1031
|
+
markdownText: 'Takes an Item entity, and converts it into the internal form state.',
|
|
1032
1032
|
example: 'await ctx.itemToFormValues(ctx.item);',
|
|
1033
1033
|
},
|
|
1034
1034
|
location: {
|
|
@@ -1039,7 +1039,7 @@ export var manifest = {
|
|
|
1039
1039
|
},
|
|
1040
1040
|
saveCurrentItem: {
|
|
1041
1041
|
comment: {
|
|
1042
|
-
|
|
1042
|
+
markdownText: 'Triggers a submit form for current record.',
|
|
1043
1043
|
example: 'await ctx.saveCurrentItem();',
|
|
1044
1044
|
},
|
|
1045
1045
|
location: {
|
|
@@ -1061,7 +1061,7 @@ export var manifest = {
|
|
|
1061
1061
|
renderItemCollectionOutlet: {
|
|
1062
1062
|
name: 'renderItemCollectionOutlet',
|
|
1063
1063
|
comment: {
|
|
1064
|
-
|
|
1064
|
+
markdownText: 'This function will be called when the plugin needs to render an outlet\ndefined by the `itemFormOutlets()` hook.',
|
|
1065
1065
|
tag: 'outlets',
|
|
1066
1066
|
},
|
|
1067
1067
|
nonCtxArguments: [
|
|
@@ -1077,7 +1077,7 @@ export var manifest = {
|
|
|
1077
1077
|
items: {
|
|
1078
1078
|
itemCollectionOutletId: {
|
|
1079
1079
|
comment: {
|
|
1080
|
-
|
|
1080
|
+
markdownText: 'The ID of the outlet that needs to be rendered.',
|
|
1081
1081
|
},
|
|
1082
1082
|
location: {
|
|
1083
1083
|
filePath: 'src/hooks/renderItemCollectionOutlet.ts',
|
|
@@ -1099,7 +1099,7 @@ export var manifest = {
|
|
|
1099
1099
|
renderFieldExtension: {
|
|
1100
1100
|
name: 'renderFieldExtension',
|
|
1101
1101
|
comment: {
|
|
1102
|
-
|
|
1102
|
+
markdownText: 'This function will be called when the plugin needs to render a field\nextension (see the `manualFieldExtensions` and `overrideFieldExtensions`\nfunctions).',
|
|
1103
1103
|
tag: 'forcedFieldExtensions',
|
|
1104
1104
|
},
|
|
1105
1105
|
nonCtxArguments: [
|
|
@@ -1114,12 +1114,12 @@ export var manifest = {
|
|
|
1114
1114
|
{
|
|
1115
1115
|
name: 'ItemFormAdditionalProperties',
|
|
1116
1116
|
comment: {
|
|
1117
|
-
|
|
1117
|
+
markdownText: "These information describe the current state of the form that's being shown\nto the end-user to edit a record.",
|
|
1118
1118
|
},
|
|
1119
1119
|
items: {
|
|
1120
1120
|
locale: {
|
|
1121
1121
|
comment: {
|
|
1122
|
-
|
|
1122
|
+
markdownText: 'The currently active locale for the record.',
|
|
1123
1123
|
},
|
|
1124
1124
|
location: {
|
|
1125
1125
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1129,7 +1129,7 @@ export var manifest = {
|
|
|
1129
1129
|
},
|
|
1130
1130
|
item: {
|
|
1131
1131
|
comment: {
|
|
1132
|
-
|
|
1132
|
+
markdownText: 'If an already persisted record is being edited, returns the full record\nentity.',
|
|
1133
1133
|
},
|
|
1134
1134
|
location: {
|
|
1135
1135
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1139,7 +1139,7 @@ export var manifest = {
|
|
|
1139
1139
|
},
|
|
1140
1140
|
itemType: {
|
|
1141
1141
|
comment: {
|
|
1142
|
-
|
|
1142
|
+
markdownText: 'The model for the record being edited.',
|
|
1143
1143
|
},
|
|
1144
1144
|
location: {
|
|
1145
1145
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1149,7 +1149,7 @@ export var manifest = {
|
|
|
1149
1149
|
},
|
|
1150
1150
|
formValues: {
|
|
1151
1151
|
comment: {
|
|
1152
|
-
|
|
1152
|
+
markdownText: 'The complete internal form state.',
|
|
1153
1153
|
},
|
|
1154
1154
|
location: {
|
|
1155
1155
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1159,7 +1159,7 @@ export var manifest = {
|
|
|
1159
1159
|
},
|
|
1160
1160
|
itemStatus: {
|
|
1161
1161
|
comment: {
|
|
1162
|
-
|
|
1162
|
+
markdownText: 'The current status of the record being edited.',
|
|
1163
1163
|
},
|
|
1164
1164
|
location: {
|
|
1165
1165
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1169,7 +1169,7 @@ export var manifest = {
|
|
|
1169
1169
|
},
|
|
1170
1170
|
isSubmitting: {
|
|
1171
1171
|
comment: {
|
|
1172
|
-
|
|
1172
|
+
markdownText: 'Whether the form is currently submitting itself or not.',
|
|
1173
1173
|
},
|
|
1174
1174
|
location: {
|
|
1175
1175
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1179,7 +1179,7 @@ export var manifest = {
|
|
|
1179
1179
|
},
|
|
1180
1180
|
isFormDirty: {
|
|
1181
1181
|
comment: {
|
|
1182
|
-
|
|
1182
|
+
markdownText: 'Whether the form has some non-persisted changes or not.',
|
|
1183
1183
|
},
|
|
1184
1184
|
location: {
|
|
1185
1185
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1189,7 +1189,7 @@ export var manifest = {
|
|
|
1189
1189
|
},
|
|
1190
1190
|
blocksAnalysis: {
|
|
1191
1191
|
comment: {
|
|
1192
|
-
|
|
1192
|
+
markdownText: 'Provides information on how many blocks are currently present in the form.',
|
|
1193
1193
|
},
|
|
1194
1194
|
location: {
|
|
1195
1195
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1202,12 +1202,12 @@ export var manifest = {
|
|
|
1202
1202
|
{
|
|
1203
1203
|
name: 'FieldAdditionalProperties',
|
|
1204
1204
|
comment: {
|
|
1205
|
-
|
|
1205
|
+
markdownText: 'These information describe the current state of the field where this plugin\nis applied to.',
|
|
1206
1206
|
},
|
|
1207
1207
|
items: {
|
|
1208
1208
|
disabled: {
|
|
1209
1209
|
comment: {
|
|
1210
|
-
|
|
1210
|
+
markdownText: 'Whether the field is currently disabled or not.',
|
|
1211
1211
|
},
|
|
1212
1212
|
location: {
|
|
1213
1213
|
filePath: 'src/ctx/commonExtras/field.ts',
|
|
@@ -1217,7 +1217,7 @@ export var manifest = {
|
|
|
1217
1217
|
},
|
|
1218
1218
|
fieldPath: {
|
|
1219
1219
|
comment: {
|
|
1220
|
-
|
|
1220
|
+
markdownText: 'The path in the `formValues` object where to find the current value for the\nfield.',
|
|
1221
1221
|
},
|
|
1222
1222
|
location: {
|
|
1223
1223
|
filePath: 'src/ctx/commonExtras/field.ts',
|
|
@@ -1227,7 +1227,7 @@ export var manifest = {
|
|
|
1227
1227
|
},
|
|
1228
1228
|
field: {
|
|
1229
1229
|
comment: {
|
|
1230
|
-
|
|
1230
|
+
markdownText: 'The field where the field extension is installed to.',
|
|
1231
1231
|
},
|
|
1232
1232
|
location: {
|
|
1233
1233
|
filePath: 'src/ctx/commonExtras/field.ts',
|
|
@@ -1237,7 +1237,7 @@ export var manifest = {
|
|
|
1237
1237
|
},
|
|
1238
1238
|
parentField: {
|
|
1239
1239
|
comment: {
|
|
1240
|
-
|
|
1240
|
+
markdownText: 'If the field extension is installed in a field of a block, returns the top\nlevel Modular Content/Structured Text field containing the block itself.',
|
|
1241
1241
|
},
|
|
1242
1242
|
location: {
|
|
1243
1243
|
filePath: 'src/ctx/commonExtras/field.ts',
|
|
@@ -1247,7 +1247,7 @@ export var manifest = {
|
|
|
1247
1247
|
},
|
|
1248
1248
|
block: {
|
|
1249
1249
|
comment: {
|
|
1250
|
-
|
|
1250
|
+
markdownText: 'If the field extension is installed in a field of a block, returns the ID\nof the block — or `undefined` if the block is still not persisted — and the\nblock model.',
|
|
1251
1251
|
},
|
|
1252
1252
|
location: {
|
|
1253
1253
|
filePath: 'src/ctx/commonExtras/field.ts',
|
|
@@ -1261,7 +1261,7 @@ export var manifest = {
|
|
|
1261
1261
|
items: {
|
|
1262
1262
|
fieldExtensionId: {
|
|
1263
1263
|
comment: {
|
|
1264
|
-
|
|
1264
|
+
markdownText: 'The ID of the field extension that needs to be rendered.',
|
|
1265
1265
|
},
|
|
1266
1266
|
location: {
|
|
1267
1267
|
filePath: 'src/hooks/renderFieldExtension.ts',
|
|
@@ -1271,7 +1271,7 @@ export var manifest = {
|
|
|
1271
1271
|
},
|
|
1272
1272
|
parameters: {
|
|
1273
1273
|
comment: {
|
|
1274
|
-
|
|
1274
|
+
markdownText: 'The arbitrary `parameters` of the field extension.',
|
|
1275
1275
|
},
|
|
1276
1276
|
location: {
|
|
1277
1277
|
filePath: 'src/hooks/renderFieldExtension.ts',
|
|
@@ -1286,12 +1286,12 @@ export var manifest = {
|
|
|
1286
1286
|
{
|
|
1287
1287
|
name: 'ItemFormAdditionalMethods',
|
|
1288
1288
|
comment: {
|
|
1289
|
-
|
|
1289
|
+
markdownText: "These methods can be used to interact with the form that's being shown to the\nend-user to edit a record.",
|
|
1290
1290
|
},
|
|
1291
1291
|
items: {
|
|
1292
1292
|
toggleField: {
|
|
1293
1293
|
comment: {
|
|
1294
|
-
|
|
1294
|
+
markdownText: 'Hides/shows a specific field in the form. Please be aware that when a field\nis hidden, the field editor for that field will be removed from the DOM\nitself, including any associated plugins. When it is shown again, its\nplugins will be reinitialized.',
|
|
1295
1295
|
example: "const fieldPath = prompt(\n 'Please insert the path of a field in the form',\n ctx.fieldPath,\n);\n\nawait ctx.toggleField(fieldPath, true);",
|
|
1296
1296
|
},
|
|
1297
1297
|
location: {
|
|
@@ -1302,7 +1302,7 @@ export var manifest = {
|
|
|
1302
1302
|
},
|
|
1303
1303
|
disableField: {
|
|
1304
1304
|
comment: {
|
|
1305
|
-
|
|
1305
|
+
markdownText: 'Disables/re-enables a specific field in the form.',
|
|
1306
1306
|
example: "const fieldPath = prompt(\n 'Please insert the path of a field in the form',\n ctx.fieldPath,\n);\n\nawait ctx.disableField(fieldPath, true);",
|
|
1307
1307
|
},
|
|
1308
1308
|
location: {
|
|
@@ -1313,7 +1313,7 @@ export var manifest = {
|
|
|
1313
1313
|
},
|
|
1314
1314
|
scrollToField: {
|
|
1315
1315
|
comment: {
|
|
1316
|
-
|
|
1316
|
+
markdownText: 'Smoothly navigates to a specific field in the form. If the field is\nlocalized it will switch language tab and then navigate to the chosen\nfield.',
|
|
1317
1317
|
example: "const fieldPath = prompt(\n 'Please insert the path of a field in the form',\n ctx.fieldPath,\n);\n\nawait ctx.scrollToField(fieldPath);",
|
|
1318
1318
|
},
|
|
1319
1319
|
location: {
|
|
@@ -1324,7 +1324,7 @@ export var manifest = {
|
|
|
1324
1324
|
},
|
|
1325
1325
|
setFieldValue: {
|
|
1326
1326
|
comment: {
|
|
1327
|
-
|
|
1327
|
+
markdownText: 'Changes a specific path of the `formValues` object.',
|
|
1328
1328
|
example: "const fieldPath = prompt(\n 'Please insert the path of a field in the form',\n ctx.fieldPath,\n);\n\nawait ctx.setFieldValue(fieldPath, 'new value');",
|
|
1329
1329
|
},
|
|
1330
1330
|
location: {
|
|
@@ -1335,7 +1335,7 @@ export var manifest = {
|
|
|
1335
1335
|
},
|
|
1336
1336
|
formValuesToItem: {
|
|
1337
1337
|
comment: {
|
|
1338
|
-
|
|
1338
|
+
markdownText: 'Takes the internal form state, and transforms it into an Item entity\ncompatible with DatoCMS API.\n\nWhen `skipUnchangedFields`, only the fields that changed value will be\nserialized.\n\nIf the required nested blocks are still not loaded, this method will return\n`undefined`.',
|
|
1339
1339
|
example: 'await ctx.formValuesToItem(ctx.formValues, false);',
|
|
1340
1340
|
},
|
|
1341
1341
|
location: {
|
|
@@ -1346,7 +1346,7 @@ export var manifest = {
|
|
|
1346
1346
|
},
|
|
1347
1347
|
itemToFormValues: {
|
|
1348
1348
|
comment: {
|
|
1349
|
-
|
|
1349
|
+
markdownText: 'Takes an Item entity, and converts it into the internal form state.',
|
|
1350
1350
|
example: 'await ctx.itemToFormValues(ctx.item);',
|
|
1351
1351
|
},
|
|
1352
1352
|
location: {
|
|
@@ -1357,7 +1357,7 @@ export var manifest = {
|
|
|
1357
1357
|
},
|
|
1358
1358
|
saveCurrentItem: {
|
|
1359
1359
|
comment: {
|
|
1360
|
-
|
|
1360
|
+
markdownText: 'Triggers a submit form for current record.',
|
|
1361
1361
|
example: 'await ctx.saveCurrentItem();',
|
|
1362
1362
|
},
|
|
1363
1363
|
location: {
|
|
@@ -1379,7 +1379,7 @@ export var manifest = {
|
|
|
1379
1379
|
renderConfigScreen: {
|
|
1380
1380
|
name: 'renderConfigScreen',
|
|
1381
1381
|
comment: {
|
|
1382
|
-
|
|
1382
|
+
markdownText: "This function will be called when the plugin needs to render the plugin's\nconfiguration form.",
|
|
1383
1383
|
tag: 'configScreen',
|
|
1384
1384
|
},
|
|
1385
1385
|
nonCtxArguments: [],
|
|
@@ -1397,7 +1397,7 @@ export var manifest = {
|
|
|
1397
1397
|
renderAssetSource: {
|
|
1398
1398
|
name: 'renderAssetSource',
|
|
1399
1399
|
comment: {
|
|
1400
|
-
|
|
1400
|
+
markdownText: "This function will be called when the user selects one of the plugin's\nasset sources to upload a new media file.",
|
|
1401
1401
|
tag: 'assetSources',
|
|
1402
1402
|
},
|
|
1403
1403
|
nonCtxArguments: [
|
|
@@ -1413,7 +1413,7 @@ export var manifest = {
|
|
|
1413
1413
|
items: {
|
|
1414
1414
|
assetSourceId: {
|
|
1415
1415
|
comment: {
|
|
1416
|
-
|
|
1416
|
+
markdownText: 'The ID of the assetSource that needs to be rendered.',
|
|
1417
1417
|
},
|
|
1418
1418
|
location: {
|
|
1419
1419
|
filePath: 'src/hooks/renderAssetSource.ts',
|
|
@@ -1429,7 +1429,7 @@ export var manifest = {
|
|
|
1429
1429
|
items: {
|
|
1430
1430
|
select: {
|
|
1431
1431
|
comment: {
|
|
1432
|
-
|
|
1432
|
+
markdownText: 'Function to be called when the user selects the asset: it will trigger the\ncreation of a new `Upload` that will be added in the Media Area.',
|
|
1433
1433
|
example: "await ctx.select({\n resource: {\n url: 'https://images.unsplash.com/photo-1416339306562-f3d12fefd36f',\n filename: 'man-drinking-coffee.jpg',\n },\n copyright: 'Royalty free (Unsplash)',\n author: 'Jeff Sheldon',\n notes: 'A man drinking a coffee',\n tags: ['man', 'coffee'],\n});",
|
|
1434
1434
|
},
|
|
1435
1435
|
location: {
|
|
@@ -1451,7 +1451,7 @@ export var manifest = {
|
|
|
1451
1451
|
overrideFieldExtensions: {
|
|
1452
1452
|
name: 'overrideFieldExtensions',
|
|
1453
1453
|
comment: {
|
|
1454
|
-
|
|
1454
|
+
markdownText: 'Use this function to automatically force one or more field extensions to a\nparticular field.',
|
|
1455
1455
|
tag: 'forcedFieldExtensions',
|
|
1456
1456
|
},
|
|
1457
1457
|
nonCtxArguments: [
|
|
@@ -1486,7 +1486,7 @@ export var manifest = {
|
|
|
1486
1486
|
onBoot: {
|
|
1487
1487
|
name: 'onBoot',
|
|
1488
1488
|
comment: {
|
|
1489
|
-
|
|
1489
|
+
markdownText: 'This function will be called once at boot time and can be used to perform\nie. some initial integrity checks on the configuration.',
|
|
1490
1490
|
tag: 'boot',
|
|
1491
1491
|
},
|
|
1492
1492
|
nonCtxArguments: [],
|
|
@@ -1504,7 +1504,7 @@ export var manifest = {
|
|
|
1504
1504
|
onBeforeItemsUnpublish: {
|
|
1505
1505
|
name: 'onBeforeItemsUnpublish',
|
|
1506
1506
|
comment: {
|
|
1507
|
-
|
|
1507
|
+
markdownText: 'This function will be called before unpublishing records. You can stop the\naction by returning `false`.',
|
|
1508
1508
|
tag: 'beforeHooks',
|
|
1509
1509
|
},
|
|
1510
1510
|
nonCtxArguments: [
|
|
@@ -1527,7 +1527,7 @@ export var manifest = {
|
|
|
1527
1527
|
onBeforeItemsPublish: {
|
|
1528
1528
|
name: 'onBeforeItemsPublish',
|
|
1529
1529
|
comment: {
|
|
1530
|
-
|
|
1530
|
+
markdownText: 'This function will be called before publishing records. You can stop the\naction by returning `false`.',
|
|
1531
1531
|
tag: 'beforeHooks',
|
|
1532
1532
|
},
|
|
1533
1533
|
nonCtxArguments: [
|
|
@@ -1550,7 +1550,7 @@ export var manifest = {
|
|
|
1550
1550
|
onBeforeItemsDestroy: {
|
|
1551
1551
|
name: 'onBeforeItemsDestroy',
|
|
1552
1552
|
comment: {
|
|
1553
|
-
|
|
1553
|
+
markdownText: 'This function will be called before destroying records. You can stop the\naction by returning `false`.',
|
|
1554
1554
|
tag: 'beforeHooks',
|
|
1555
1555
|
},
|
|
1556
1556
|
nonCtxArguments: [
|
|
@@ -1573,7 +1573,7 @@ export var manifest = {
|
|
|
1573
1573
|
onBeforeItemUpsert: {
|
|
1574
1574
|
name: 'onBeforeItemUpsert',
|
|
1575
1575
|
comment: {
|
|
1576
|
-
|
|
1576
|
+
markdownText: 'This function will be called before saving a new version of a record. You\ncan stop the action by returning `false`.',
|
|
1577
1577
|
tag: 'beforeHooks',
|
|
1578
1578
|
},
|
|
1579
1579
|
nonCtxArguments: [
|
|
@@ -1596,7 +1596,7 @@ export var manifest = {
|
|
|
1596
1596
|
manualFieldExtensions: {
|
|
1597
1597
|
name: 'manualFieldExtensions',
|
|
1598
1598
|
comment: {
|
|
1599
|
-
|
|
1599
|
+
markdownText: 'Use this function to declare new field extensions that users will be able\nto install manually in some field.',
|
|
1600
1600
|
tag: 'manualFieldExtensions',
|
|
1601
1601
|
},
|
|
1602
1602
|
nonCtxArguments: [],
|
|
@@ -1614,7 +1614,7 @@ export var manifest = {
|
|
|
1614
1614
|
mainNavigationTabs: {
|
|
1615
1615
|
name: 'mainNavigationTabs',
|
|
1616
1616
|
comment: {
|
|
1617
|
-
|
|
1617
|
+
markdownText: 'Use this function to declare new tabs you want to add in the top-bar of the\nUI.',
|
|
1618
1618
|
tag: 'pages',
|
|
1619
1619
|
},
|
|
1620
1620
|
nonCtxArguments: [],
|
|
@@ -1632,7 +1632,7 @@ export var manifest = {
|
|
|
1632
1632
|
itemsDropdownActions: {
|
|
1633
1633
|
name: 'itemsDropdownActions',
|
|
1634
1634
|
comment: {
|
|
1635
|
-
|
|
1635
|
+
markdownText: 'This function lets you set up custom actions (or groups of actions) that\nshow up when the user:\n\n* selects multiple records in the collection view for batch operations, or\n* starts editing a specific record.\n\nThe `executeItemsDropdownAction()` hook will be triggered once the user\nclicks on one of the defined actions.',
|
|
1636
1636
|
tag: 'dropdownActions',
|
|
1637
1637
|
},
|
|
1638
1638
|
nonCtxArguments: [
|
|
@@ -1667,7 +1667,7 @@ export var manifest = {
|
|
|
1667
1667
|
itemFormSidebars: {
|
|
1668
1668
|
name: 'itemFormSidebars',
|
|
1669
1669
|
comment: {
|
|
1670
|
-
|
|
1670
|
+
markdownText: 'Use this function to declare new sidebar to be shown when the user edits\nrecords of a particular model.',
|
|
1671
1671
|
tag: 'sidebarPanels',
|
|
1672
1672
|
},
|
|
1673
1673
|
nonCtxArguments: [
|
|
@@ -1690,7 +1690,7 @@ export var manifest = {
|
|
|
1690
1690
|
itemFormSidebarPanels: {
|
|
1691
1691
|
name: 'itemFormSidebarPanels',
|
|
1692
1692
|
comment: {
|
|
1693
|
-
|
|
1693
|
+
markdownText: 'Use this function to declare new sidebar panels to be shown when the user\nedits records of a particular model.',
|
|
1694
1694
|
tag: 'sidebarPanels',
|
|
1695
1695
|
},
|
|
1696
1696
|
nonCtxArguments: [
|
|
@@ -1713,7 +1713,7 @@ export var manifest = {
|
|
|
1713
1713
|
itemFormOutlets: {
|
|
1714
1714
|
name: 'itemFormOutlets',
|
|
1715
1715
|
comment: {
|
|
1716
|
-
|
|
1716
|
+
markdownText: "Use this function to declare custom outlets to be shown at the top of the\nrecord's editing page.",
|
|
1717
1717
|
tag: 'outlets',
|
|
1718
1718
|
},
|
|
1719
1719
|
nonCtxArguments: [
|
|
@@ -1736,7 +1736,7 @@ export var manifest = {
|
|
|
1736
1736
|
itemFormDropdownActions: {
|
|
1737
1737
|
name: 'itemFormDropdownActions',
|
|
1738
1738
|
comment: {
|
|
1739
|
-
|
|
1739
|
+
markdownText: 'Use this function to define custom actions (or groups of actions) to be\ndisplayed at when editing a particular record.\n\nThe `executeItemFormDropdownAction()` hook will be triggered once the user\nclicks on one of the defined actions.',
|
|
1740
1740
|
tag: 'dropdownActions',
|
|
1741
1741
|
},
|
|
1742
1742
|
nonCtxArguments: [
|
|
@@ -1751,12 +1751,12 @@ export var manifest = {
|
|
|
1751
1751
|
{
|
|
1752
1752
|
name: 'ItemFormAdditionalProperties',
|
|
1753
1753
|
comment: {
|
|
1754
|
-
|
|
1754
|
+
markdownText: "These information describe the current state of the form that's being shown\nto the end-user to edit a record.",
|
|
1755
1755
|
},
|
|
1756
1756
|
items: {
|
|
1757
1757
|
locale: {
|
|
1758
1758
|
comment: {
|
|
1759
|
-
|
|
1759
|
+
markdownText: 'The currently active locale for the record.',
|
|
1760
1760
|
},
|
|
1761
1761
|
location: {
|
|
1762
1762
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1766,7 +1766,7 @@ export var manifest = {
|
|
|
1766
1766
|
},
|
|
1767
1767
|
item: {
|
|
1768
1768
|
comment: {
|
|
1769
|
-
|
|
1769
|
+
markdownText: 'If an already persisted record is being edited, returns the full record\nentity.',
|
|
1770
1770
|
},
|
|
1771
1771
|
location: {
|
|
1772
1772
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1776,7 +1776,7 @@ export var manifest = {
|
|
|
1776
1776
|
},
|
|
1777
1777
|
itemType: {
|
|
1778
1778
|
comment: {
|
|
1779
|
-
|
|
1779
|
+
markdownText: 'The model for the record being edited.',
|
|
1780
1780
|
},
|
|
1781
1781
|
location: {
|
|
1782
1782
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1786,7 +1786,7 @@ export var manifest = {
|
|
|
1786
1786
|
},
|
|
1787
1787
|
formValues: {
|
|
1788
1788
|
comment: {
|
|
1789
|
-
|
|
1789
|
+
markdownText: 'The complete internal form state.',
|
|
1790
1790
|
},
|
|
1791
1791
|
location: {
|
|
1792
1792
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1796,7 +1796,7 @@ export var manifest = {
|
|
|
1796
1796
|
},
|
|
1797
1797
|
itemStatus: {
|
|
1798
1798
|
comment: {
|
|
1799
|
-
|
|
1799
|
+
markdownText: 'The current status of the record being edited.',
|
|
1800
1800
|
},
|
|
1801
1801
|
location: {
|
|
1802
1802
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1806,7 +1806,7 @@ export var manifest = {
|
|
|
1806
1806
|
},
|
|
1807
1807
|
isSubmitting: {
|
|
1808
1808
|
comment: {
|
|
1809
|
-
|
|
1809
|
+
markdownText: 'Whether the form is currently submitting itself or not.',
|
|
1810
1810
|
},
|
|
1811
1811
|
location: {
|
|
1812
1812
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1816,7 +1816,7 @@ export var manifest = {
|
|
|
1816
1816
|
},
|
|
1817
1817
|
isFormDirty: {
|
|
1818
1818
|
comment: {
|
|
1819
|
-
|
|
1819
|
+
markdownText: 'Whether the form has some non-persisted changes or not.',
|
|
1820
1820
|
},
|
|
1821
1821
|
location: {
|
|
1822
1822
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1826,7 +1826,7 @@ export var manifest = {
|
|
|
1826
1826
|
},
|
|
1827
1827
|
blocksAnalysis: {
|
|
1828
1828
|
comment: {
|
|
1829
|
-
|
|
1829
|
+
markdownText: 'Provides information on how many blocks are currently present in the form.',
|
|
1830
1830
|
},
|
|
1831
1831
|
location: {
|
|
1832
1832
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1848,7 +1848,7 @@ export var manifest = {
|
|
|
1848
1848
|
itemCollectionOutlets: {
|
|
1849
1849
|
name: 'itemCollectionOutlets',
|
|
1850
1850
|
comment: {
|
|
1851
|
-
|
|
1851
|
+
markdownText: 'Use this function to declare custom outlets to be shown at the top of a\ncollection of records of a particular model.',
|
|
1852
1852
|
tag: 'outlets',
|
|
1853
1853
|
},
|
|
1854
1854
|
nonCtxArguments: [
|
|
@@ -1871,7 +1871,7 @@ export var manifest = {
|
|
|
1871
1871
|
initialLocationQueryForItemSelector: {
|
|
1872
1872
|
name: 'initialLocationQueryForItemSelector',
|
|
1873
1873
|
comment: {
|
|
1874
|
-
|
|
1874
|
+
markdownText: 'Use this function to customize the initial filters when opening a record\nselector via a "Single link" or "Multiple links" field.',
|
|
1875
1875
|
tag: 'locationQuery',
|
|
1876
1876
|
},
|
|
1877
1877
|
nonCtxArguments: [
|
|
@@ -1898,7 +1898,7 @@ export var manifest = {
|
|
|
1898
1898
|
fieldDropdownActions: {
|
|
1899
1899
|
name: 'fieldDropdownActions',
|
|
1900
1900
|
comment: {
|
|
1901
|
-
|
|
1901
|
+
markdownText: 'Use this function to define custom actions (or groups of actions) to be\ndisplayed at the individual field level in the record editing form.\n\nThe `executeFieldDropdownAction()` hook will be triggered once the user\nclicks on one of the defined actions.',
|
|
1902
1902
|
tag: 'dropdownActions',
|
|
1903
1903
|
},
|
|
1904
1904
|
nonCtxArguments: [
|
|
@@ -1913,12 +1913,12 @@ export var manifest = {
|
|
|
1913
1913
|
{
|
|
1914
1914
|
name: 'ItemFormAdditionalProperties',
|
|
1915
1915
|
comment: {
|
|
1916
|
-
|
|
1916
|
+
markdownText: "These information describe the current state of the form that's being shown\nto the end-user to edit a record.",
|
|
1917
1917
|
},
|
|
1918
1918
|
items: {
|
|
1919
1919
|
locale: {
|
|
1920
1920
|
comment: {
|
|
1921
|
-
|
|
1921
|
+
markdownText: 'The currently active locale for the record.',
|
|
1922
1922
|
},
|
|
1923
1923
|
location: {
|
|
1924
1924
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1928,7 +1928,7 @@ export var manifest = {
|
|
|
1928
1928
|
},
|
|
1929
1929
|
item: {
|
|
1930
1930
|
comment: {
|
|
1931
|
-
|
|
1931
|
+
markdownText: 'If an already persisted record is being edited, returns the full record\nentity.',
|
|
1932
1932
|
},
|
|
1933
1933
|
location: {
|
|
1934
1934
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1938,7 +1938,7 @@ export var manifest = {
|
|
|
1938
1938
|
},
|
|
1939
1939
|
itemType: {
|
|
1940
1940
|
comment: {
|
|
1941
|
-
|
|
1941
|
+
markdownText: 'The model for the record being edited.',
|
|
1942
1942
|
},
|
|
1943
1943
|
location: {
|
|
1944
1944
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1948,7 +1948,7 @@ export var manifest = {
|
|
|
1948
1948
|
},
|
|
1949
1949
|
formValues: {
|
|
1950
1950
|
comment: {
|
|
1951
|
-
|
|
1951
|
+
markdownText: 'The complete internal form state.',
|
|
1952
1952
|
},
|
|
1953
1953
|
location: {
|
|
1954
1954
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1958,7 +1958,7 @@ export var manifest = {
|
|
|
1958
1958
|
},
|
|
1959
1959
|
itemStatus: {
|
|
1960
1960
|
comment: {
|
|
1961
|
-
|
|
1961
|
+
markdownText: 'The current status of the record being edited.',
|
|
1962
1962
|
},
|
|
1963
1963
|
location: {
|
|
1964
1964
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1968,7 +1968,7 @@ export var manifest = {
|
|
|
1968
1968
|
},
|
|
1969
1969
|
isSubmitting: {
|
|
1970
1970
|
comment: {
|
|
1971
|
-
|
|
1971
|
+
markdownText: 'Whether the form is currently submitting itself or not.',
|
|
1972
1972
|
},
|
|
1973
1973
|
location: {
|
|
1974
1974
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1978,7 +1978,7 @@ export var manifest = {
|
|
|
1978
1978
|
},
|
|
1979
1979
|
isFormDirty: {
|
|
1980
1980
|
comment: {
|
|
1981
|
-
|
|
1981
|
+
markdownText: 'Whether the form has some non-persisted changes or not.',
|
|
1982
1982
|
},
|
|
1983
1983
|
location: {
|
|
1984
1984
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1988,7 +1988,7 @@ export var manifest = {
|
|
|
1988
1988
|
},
|
|
1989
1989
|
blocksAnalysis: {
|
|
1990
1990
|
comment: {
|
|
1991
|
-
|
|
1991
|
+
markdownText: 'Provides information on how many blocks are currently present in the form.',
|
|
1992
1992
|
},
|
|
1993
1993
|
location: {
|
|
1994
1994
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -2001,12 +2001,12 @@ export var manifest = {
|
|
|
2001
2001
|
{
|
|
2002
2002
|
name: 'FieldAdditionalProperties',
|
|
2003
2003
|
comment: {
|
|
2004
|
-
|
|
2004
|
+
markdownText: 'These information describe the current state of the field where this plugin\nis applied to.',
|
|
2005
2005
|
},
|
|
2006
2006
|
items: {
|
|
2007
2007
|
disabled: {
|
|
2008
2008
|
comment: {
|
|
2009
|
-
|
|
2009
|
+
markdownText: 'Whether the field is currently disabled or not.',
|
|
2010
2010
|
},
|
|
2011
2011
|
location: {
|
|
2012
2012
|
filePath: 'src/ctx/commonExtras/field.ts',
|
|
@@ -2016,7 +2016,7 @@ export var manifest = {
|
|
|
2016
2016
|
},
|
|
2017
2017
|
fieldPath: {
|
|
2018
2018
|
comment: {
|
|
2019
|
-
|
|
2019
|
+
markdownText: 'The path in the `formValues` object where to find the current value for the\nfield.',
|
|
2020
2020
|
},
|
|
2021
2021
|
location: {
|
|
2022
2022
|
filePath: 'src/ctx/commonExtras/field.ts',
|
|
@@ -2026,7 +2026,7 @@ export var manifest = {
|
|
|
2026
2026
|
},
|
|
2027
2027
|
field: {
|
|
2028
2028
|
comment: {
|
|
2029
|
-
|
|
2029
|
+
markdownText: 'The field where the field extension is installed to.',
|
|
2030
2030
|
},
|
|
2031
2031
|
location: {
|
|
2032
2032
|
filePath: 'src/ctx/commonExtras/field.ts',
|
|
@@ -2036,7 +2036,7 @@ export var manifest = {
|
|
|
2036
2036
|
},
|
|
2037
2037
|
parentField: {
|
|
2038
2038
|
comment: {
|
|
2039
|
-
|
|
2039
|
+
markdownText: 'If the field extension is installed in a field of a block, returns the top\nlevel Modular Content/Structured Text field containing the block itself.',
|
|
2040
2040
|
},
|
|
2041
2041
|
location: {
|
|
2042
2042
|
filePath: 'src/ctx/commonExtras/field.ts',
|
|
@@ -2046,7 +2046,7 @@ export var manifest = {
|
|
|
2046
2046
|
},
|
|
2047
2047
|
block: {
|
|
2048
2048
|
comment: {
|
|
2049
|
-
|
|
2049
|
+
markdownText: 'If the field extension is installed in a field of a block, returns the ID\nof the block — or `undefined` if the block is still not persisted — and the\nblock model.',
|
|
2050
2050
|
},
|
|
2051
2051
|
location: {
|
|
2052
2052
|
filePath: 'src/ctx/commonExtras/field.ts',
|
|
@@ -2068,7 +2068,7 @@ export var manifest = {
|
|
|
2068
2068
|
executeUploadsDropdownAction: {
|
|
2069
2069
|
name: 'executeUploadsDropdownAction',
|
|
2070
2070
|
comment: {
|
|
2071
|
-
|
|
2071
|
+
markdownText: 'Use this function to execute a particular dropdown action defined via\nthe `uploadsDropdownActions()` hook.',
|
|
2072
2072
|
tag: 'dropdownActions',
|
|
2073
2073
|
},
|
|
2074
2074
|
nonCtxArguments: [
|
|
@@ -2107,7 +2107,7 @@ export var manifest = {
|
|
|
2107
2107
|
executeItemsDropdownAction: {
|
|
2108
2108
|
name: 'executeItemsDropdownAction',
|
|
2109
2109
|
comment: {
|
|
2110
|
-
|
|
2110
|
+
markdownText: 'Use this function to execute a particular dropdown action defined via\nthe `itemsDropdownActions()` hook.',
|
|
2111
2111
|
tag: 'dropdownActions',
|
|
2112
2112
|
},
|
|
2113
2113
|
nonCtxArguments: [
|
|
@@ -2146,7 +2146,7 @@ export var manifest = {
|
|
|
2146
2146
|
executeItemFormDropdownAction: {
|
|
2147
2147
|
name: 'executeItemFormDropdownAction',
|
|
2148
2148
|
comment: {
|
|
2149
|
-
|
|
2149
|
+
markdownText: 'Use this function to execute a particular dropdown action defined via\nthe `itemFormDropdownActions()` hook.',
|
|
2150
2150
|
tag: 'dropdownActions',
|
|
2151
2151
|
},
|
|
2152
2152
|
nonCtxArguments: [
|
|
@@ -2161,12 +2161,12 @@ export var manifest = {
|
|
|
2161
2161
|
{
|
|
2162
2162
|
name: 'ItemFormAdditionalProperties',
|
|
2163
2163
|
comment: {
|
|
2164
|
-
|
|
2164
|
+
markdownText: "These information describe the current state of the form that's being shown\nto the end-user to edit a record.",
|
|
2165
2165
|
},
|
|
2166
2166
|
items: {
|
|
2167
2167
|
locale: {
|
|
2168
2168
|
comment: {
|
|
2169
|
-
|
|
2169
|
+
markdownText: 'The currently active locale for the record.',
|
|
2170
2170
|
},
|
|
2171
2171
|
location: {
|
|
2172
2172
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -2176,7 +2176,7 @@ export var manifest = {
|
|
|
2176
2176
|
},
|
|
2177
2177
|
item: {
|
|
2178
2178
|
comment: {
|
|
2179
|
-
|
|
2179
|
+
markdownText: 'If an already persisted record is being edited, returns the full record\nentity.',
|
|
2180
2180
|
},
|
|
2181
2181
|
location: {
|
|
2182
2182
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -2186,7 +2186,7 @@ export var manifest = {
|
|
|
2186
2186
|
},
|
|
2187
2187
|
itemType: {
|
|
2188
2188
|
comment: {
|
|
2189
|
-
|
|
2189
|
+
markdownText: 'The model for the record being edited.',
|
|
2190
2190
|
},
|
|
2191
2191
|
location: {
|
|
2192
2192
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -2196,7 +2196,7 @@ export var manifest = {
|
|
|
2196
2196
|
},
|
|
2197
2197
|
formValues: {
|
|
2198
2198
|
comment: {
|
|
2199
|
-
|
|
2199
|
+
markdownText: 'The complete internal form state.',
|
|
2200
2200
|
},
|
|
2201
2201
|
location: {
|
|
2202
2202
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -2206,7 +2206,7 @@ export var manifest = {
|
|
|
2206
2206
|
},
|
|
2207
2207
|
itemStatus: {
|
|
2208
2208
|
comment: {
|
|
2209
|
-
|
|
2209
|
+
markdownText: 'The current status of the record being edited.',
|
|
2210
2210
|
},
|
|
2211
2211
|
location: {
|
|
2212
2212
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -2216,7 +2216,7 @@ export var manifest = {
|
|
|
2216
2216
|
},
|
|
2217
2217
|
isSubmitting: {
|
|
2218
2218
|
comment: {
|
|
2219
|
-
|
|
2219
|
+
markdownText: 'Whether the form is currently submitting itself or not.',
|
|
2220
2220
|
},
|
|
2221
2221
|
location: {
|
|
2222
2222
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -2226,7 +2226,7 @@ export var manifest = {
|
|
|
2226
2226
|
},
|
|
2227
2227
|
isFormDirty: {
|
|
2228
2228
|
comment: {
|
|
2229
|
-
|
|
2229
|
+
markdownText: 'Whether the form has some non-persisted changes or not.',
|
|
2230
2230
|
},
|
|
2231
2231
|
location: {
|
|
2232
2232
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -2236,7 +2236,7 @@ export var manifest = {
|
|
|
2236
2236
|
},
|
|
2237
2237
|
blocksAnalysis: {
|
|
2238
2238
|
comment: {
|
|
2239
|
-
|
|
2239
|
+
markdownText: 'Provides information on how many blocks are currently present in the form.',
|
|
2240
2240
|
},
|
|
2241
2241
|
location: {
|
|
2242
2242
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -2262,12 +2262,12 @@ export var manifest = {
|
|
|
2262
2262
|
{
|
|
2263
2263
|
name: 'ItemFormAdditionalMethods',
|
|
2264
2264
|
comment: {
|
|
2265
|
-
|
|
2265
|
+
markdownText: "These methods can be used to interact with the form that's being shown to the\nend-user to edit a record.",
|
|
2266
2266
|
},
|
|
2267
2267
|
items: {
|
|
2268
2268
|
toggleField: {
|
|
2269
2269
|
comment: {
|
|
2270
|
-
|
|
2270
|
+
markdownText: 'Hides/shows a specific field in the form. Please be aware that when a field\nis hidden, the field editor for that field will be removed from the DOM\nitself, including any associated plugins. When it is shown again, its\nplugins will be reinitialized.',
|
|
2271
2271
|
example: "const fieldPath = prompt(\n 'Please insert the path of a field in the form',\n ctx.fieldPath,\n);\n\nawait ctx.toggleField(fieldPath, true);",
|
|
2272
2272
|
},
|
|
2273
2273
|
location: {
|
|
@@ -2278,7 +2278,7 @@ export var manifest = {
|
|
|
2278
2278
|
},
|
|
2279
2279
|
disableField: {
|
|
2280
2280
|
comment: {
|
|
2281
|
-
|
|
2281
|
+
markdownText: 'Disables/re-enables a specific field in the form.',
|
|
2282
2282
|
example: "const fieldPath = prompt(\n 'Please insert the path of a field in the form',\n ctx.fieldPath,\n);\n\nawait ctx.disableField(fieldPath, true);",
|
|
2283
2283
|
},
|
|
2284
2284
|
location: {
|
|
@@ -2289,7 +2289,7 @@ export var manifest = {
|
|
|
2289
2289
|
},
|
|
2290
2290
|
scrollToField: {
|
|
2291
2291
|
comment: {
|
|
2292
|
-
|
|
2292
|
+
markdownText: 'Smoothly navigates to a specific field in the form. If the field is\nlocalized it will switch language tab and then navigate to the chosen\nfield.',
|
|
2293
2293
|
example: "const fieldPath = prompt(\n 'Please insert the path of a field in the form',\n ctx.fieldPath,\n);\n\nawait ctx.scrollToField(fieldPath);",
|
|
2294
2294
|
},
|
|
2295
2295
|
location: {
|
|
@@ -2300,7 +2300,7 @@ export var manifest = {
|
|
|
2300
2300
|
},
|
|
2301
2301
|
setFieldValue: {
|
|
2302
2302
|
comment: {
|
|
2303
|
-
|
|
2303
|
+
markdownText: 'Changes a specific path of the `formValues` object.',
|
|
2304
2304
|
example: "const fieldPath = prompt(\n 'Please insert the path of a field in the form',\n ctx.fieldPath,\n);\n\nawait ctx.setFieldValue(fieldPath, 'new value');",
|
|
2305
2305
|
},
|
|
2306
2306
|
location: {
|
|
@@ -2311,7 +2311,7 @@ export var manifest = {
|
|
|
2311
2311
|
},
|
|
2312
2312
|
formValuesToItem: {
|
|
2313
2313
|
comment: {
|
|
2314
|
-
|
|
2314
|
+
markdownText: 'Takes the internal form state, and transforms it into an Item entity\ncompatible with DatoCMS API.\n\nWhen `skipUnchangedFields`, only the fields that changed value will be\nserialized.\n\nIf the required nested blocks are still not loaded, this method will return\n`undefined`.',
|
|
2315
2315
|
example: 'await ctx.formValuesToItem(ctx.formValues, false);',
|
|
2316
2316
|
},
|
|
2317
2317
|
location: {
|
|
@@ -2322,7 +2322,7 @@ export var manifest = {
|
|
|
2322
2322
|
},
|
|
2323
2323
|
itemToFormValues: {
|
|
2324
2324
|
comment: {
|
|
2325
|
-
|
|
2325
|
+
markdownText: 'Takes an Item entity, and converts it into the internal form state.',
|
|
2326
2326
|
example: 'await ctx.itemToFormValues(ctx.item);',
|
|
2327
2327
|
},
|
|
2328
2328
|
location: {
|
|
@@ -2333,7 +2333,7 @@ export var manifest = {
|
|
|
2333
2333
|
},
|
|
2334
2334
|
saveCurrentItem: {
|
|
2335
2335
|
comment: {
|
|
2336
|
-
|
|
2336
|
+
markdownText: 'Triggers a submit form for current record.',
|
|
2337
2337
|
example: 'await ctx.saveCurrentItem();',
|
|
2338
2338
|
},
|
|
2339
2339
|
location: {
|
|
@@ -2355,7 +2355,7 @@ export var manifest = {
|
|
|
2355
2355
|
executeFieldDropdownAction: {
|
|
2356
2356
|
name: 'executeFieldDropdownAction',
|
|
2357
2357
|
comment: {
|
|
2358
|
-
|
|
2358
|
+
markdownText: 'Use this function to execute a particular dropdown action defined via\nthe `fieldDropdownActions()` hook.',
|
|
2359
2359
|
tag: 'dropdownActions',
|
|
2360
2360
|
},
|
|
2361
2361
|
nonCtxArguments: [
|
|
@@ -2370,12 +2370,12 @@ export var manifest = {
|
|
|
2370
2370
|
{
|
|
2371
2371
|
name: 'ItemFormAdditionalProperties',
|
|
2372
2372
|
comment: {
|
|
2373
|
-
|
|
2373
|
+
markdownText: "These information describe the current state of the form that's being shown\nto the end-user to edit a record.",
|
|
2374
2374
|
},
|
|
2375
2375
|
items: {
|
|
2376
2376
|
locale: {
|
|
2377
2377
|
comment: {
|
|
2378
|
-
|
|
2378
|
+
markdownText: 'The currently active locale for the record.',
|
|
2379
2379
|
},
|
|
2380
2380
|
location: {
|
|
2381
2381
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -2385,7 +2385,7 @@ export var manifest = {
|
|
|
2385
2385
|
},
|
|
2386
2386
|
item: {
|
|
2387
2387
|
comment: {
|
|
2388
|
-
|
|
2388
|
+
markdownText: 'If an already persisted record is being edited, returns the full record\nentity.',
|
|
2389
2389
|
},
|
|
2390
2390
|
location: {
|
|
2391
2391
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -2395,7 +2395,7 @@ export var manifest = {
|
|
|
2395
2395
|
},
|
|
2396
2396
|
itemType: {
|
|
2397
2397
|
comment: {
|
|
2398
|
-
|
|
2398
|
+
markdownText: 'The model for the record being edited.',
|
|
2399
2399
|
},
|
|
2400
2400
|
location: {
|
|
2401
2401
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -2405,7 +2405,7 @@ export var manifest = {
|
|
|
2405
2405
|
},
|
|
2406
2406
|
formValues: {
|
|
2407
2407
|
comment: {
|
|
2408
|
-
|
|
2408
|
+
markdownText: 'The complete internal form state.',
|
|
2409
2409
|
},
|
|
2410
2410
|
location: {
|
|
2411
2411
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -2415,7 +2415,7 @@ export var manifest = {
|
|
|
2415
2415
|
},
|
|
2416
2416
|
itemStatus: {
|
|
2417
2417
|
comment: {
|
|
2418
|
-
|
|
2418
|
+
markdownText: 'The current status of the record being edited.',
|
|
2419
2419
|
},
|
|
2420
2420
|
location: {
|
|
2421
2421
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -2425,7 +2425,7 @@ export var manifest = {
|
|
|
2425
2425
|
},
|
|
2426
2426
|
isSubmitting: {
|
|
2427
2427
|
comment: {
|
|
2428
|
-
|
|
2428
|
+
markdownText: 'Whether the form is currently submitting itself or not.',
|
|
2429
2429
|
},
|
|
2430
2430
|
location: {
|
|
2431
2431
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -2435,7 +2435,7 @@ export var manifest = {
|
|
|
2435
2435
|
},
|
|
2436
2436
|
isFormDirty: {
|
|
2437
2437
|
comment: {
|
|
2438
|
-
|
|
2438
|
+
markdownText: 'Whether the form has some non-persisted changes or not.',
|
|
2439
2439
|
},
|
|
2440
2440
|
location: {
|
|
2441
2441
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -2445,7 +2445,7 @@ export var manifest = {
|
|
|
2445
2445
|
},
|
|
2446
2446
|
blocksAnalysis: {
|
|
2447
2447
|
comment: {
|
|
2448
|
-
|
|
2448
|
+
markdownText: 'Provides information on how many blocks are currently present in the form.',
|
|
2449
2449
|
},
|
|
2450
2450
|
location: {
|
|
2451
2451
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -2458,12 +2458,12 @@ export var manifest = {
|
|
|
2458
2458
|
{
|
|
2459
2459
|
name: 'FieldAdditionalProperties',
|
|
2460
2460
|
comment: {
|
|
2461
|
-
|
|
2461
|
+
markdownText: 'These information describe the current state of the field where this plugin\nis applied to.',
|
|
2462
2462
|
},
|
|
2463
2463
|
items: {
|
|
2464
2464
|
disabled: {
|
|
2465
2465
|
comment: {
|
|
2466
|
-
|
|
2466
|
+
markdownText: 'Whether the field is currently disabled or not.',
|
|
2467
2467
|
},
|
|
2468
2468
|
location: {
|
|
2469
2469
|
filePath: 'src/ctx/commonExtras/field.ts',
|
|
@@ -2473,7 +2473,7 @@ export var manifest = {
|
|
|
2473
2473
|
},
|
|
2474
2474
|
fieldPath: {
|
|
2475
2475
|
comment: {
|
|
2476
|
-
|
|
2476
|
+
markdownText: 'The path in the `formValues` object where to find the current value for the\nfield.',
|
|
2477
2477
|
},
|
|
2478
2478
|
location: {
|
|
2479
2479
|
filePath: 'src/ctx/commonExtras/field.ts',
|
|
@@ -2483,7 +2483,7 @@ export var manifest = {
|
|
|
2483
2483
|
},
|
|
2484
2484
|
field: {
|
|
2485
2485
|
comment: {
|
|
2486
|
-
|
|
2486
|
+
markdownText: 'The field where the field extension is installed to.',
|
|
2487
2487
|
},
|
|
2488
2488
|
location: {
|
|
2489
2489
|
filePath: 'src/ctx/commonExtras/field.ts',
|
|
@@ -2493,7 +2493,7 @@ export var manifest = {
|
|
|
2493
2493
|
},
|
|
2494
2494
|
parentField: {
|
|
2495
2495
|
comment: {
|
|
2496
|
-
|
|
2496
|
+
markdownText: 'If the field extension is installed in a field of a block, returns the top\nlevel Modular Content/Structured Text field containing the block itself.',
|
|
2497
2497
|
},
|
|
2498
2498
|
location: {
|
|
2499
2499
|
filePath: 'src/ctx/commonExtras/field.ts',
|
|
@@ -2503,7 +2503,7 @@ export var manifest = {
|
|
|
2503
2503
|
},
|
|
2504
2504
|
block: {
|
|
2505
2505
|
comment: {
|
|
2506
|
-
|
|
2506
|
+
markdownText: 'If the field extension is installed in a field of a block, returns the ID\nof the block — or `undefined` if the block is still not persisted — and the\nblock model.',
|
|
2507
2507
|
},
|
|
2508
2508
|
location: {
|
|
2509
2509
|
filePath: 'src/ctx/commonExtras/field.ts',
|
|
@@ -2529,12 +2529,12 @@ export var manifest = {
|
|
|
2529
2529
|
{
|
|
2530
2530
|
name: 'ItemFormAdditionalMethods',
|
|
2531
2531
|
comment: {
|
|
2532
|
-
|
|
2532
|
+
markdownText: "These methods can be used to interact with the form that's being shown to the\nend-user to edit a record.",
|
|
2533
2533
|
},
|
|
2534
2534
|
items: {
|
|
2535
2535
|
toggleField: {
|
|
2536
2536
|
comment: {
|
|
2537
|
-
|
|
2537
|
+
markdownText: 'Hides/shows a specific field in the form. Please be aware that when a field\nis hidden, the field editor for that field will be removed from the DOM\nitself, including any associated plugins. When it is shown again, its\nplugins will be reinitialized.',
|
|
2538
2538
|
example: "const fieldPath = prompt(\n 'Please insert the path of a field in the form',\n ctx.fieldPath,\n);\n\nawait ctx.toggleField(fieldPath, true);",
|
|
2539
2539
|
},
|
|
2540
2540
|
location: {
|
|
@@ -2545,7 +2545,7 @@ export var manifest = {
|
|
|
2545
2545
|
},
|
|
2546
2546
|
disableField: {
|
|
2547
2547
|
comment: {
|
|
2548
|
-
|
|
2548
|
+
markdownText: 'Disables/re-enables a specific field in the form.',
|
|
2549
2549
|
example: "const fieldPath = prompt(\n 'Please insert the path of a field in the form',\n ctx.fieldPath,\n);\n\nawait ctx.disableField(fieldPath, true);",
|
|
2550
2550
|
},
|
|
2551
2551
|
location: {
|
|
@@ -2556,7 +2556,7 @@ export var manifest = {
|
|
|
2556
2556
|
},
|
|
2557
2557
|
scrollToField: {
|
|
2558
2558
|
comment: {
|
|
2559
|
-
|
|
2559
|
+
markdownText: 'Smoothly navigates to a specific field in the form. If the field is\nlocalized it will switch language tab and then navigate to the chosen\nfield.',
|
|
2560
2560
|
example: "const fieldPath = prompt(\n 'Please insert the path of a field in the form',\n ctx.fieldPath,\n);\n\nawait ctx.scrollToField(fieldPath);",
|
|
2561
2561
|
},
|
|
2562
2562
|
location: {
|
|
@@ -2567,7 +2567,7 @@ export var manifest = {
|
|
|
2567
2567
|
},
|
|
2568
2568
|
setFieldValue: {
|
|
2569
2569
|
comment: {
|
|
2570
|
-
|
|
2570
|
+
markdownText: 'Changes a specific path of the `formValues` object.',
|
|
2571
2571
|
example: "const fieldPath = prompt(\n 'Please insert the path of a field in the form',\n ctx.fieldPath,\n);\n\nawait ctx.setFieldValue(fieldPath, 'new value');",
|
|
2572
2572
|
},
|
|
2573
2573
|
location: {
|
|
@@ -2578,7 +2578,7 @@ export var manifest = {
|
|
|
2578
2578
|
},
|
|
2579
2579
|
formValuesToItem: {
|
|
2580
2580
|
comment: {
|
|
2581
|
-
|
|
2581
|
+
markdownText: 'Takes the internal form state, and transforms it into an Item entity\ncompatible with DatoCMS API.\n\nWhen `skipUnchangedFields`, only the fields that changed value will be\nserialized.\n\nIf the required nested blocks are still not loaded, this method will return\n`undefined`.',
|
|
2582
2582
|
example: 'await ctx.formValuesToItem(ctx.formValues, false);',
|
|
2583
2583
|
},
|
|
2584
2584
|
location: {
|
|
@@ -2589,7 +2589,7 @@ export var manifest = {
|
|
|
2589
2589
|
},
|
|
2590
2590
|
itemToFormValues: {
|
|
2591
2591
|
comment: {
|
|
2592
|
-
|
|
2592
|
+
markdownText: 'Takes an Item entity, and converts it into the internal form state.',
|
|
2593
2593
|
example: 'await ctx.itemToFormValues(ctx.item);',
|
|
2594
2594
|
},
|
|
2595
2595
|
location: {
|
|
@@ -2600,7 +2600,7 @@ export var manifest = {
|
|
|
2600
2600
|
},
|
|
2601
2601
|
saveCurrentItem: {
|
|
2602
2602
|
comment: {
|
|
2603
|
-
|
|
2603
|
+
markdownText: 'Triggers a submit form for current record.',
|
|
2604
2604
|
example: 'await ctx.saveCurrentItem();',
|
|
2605
2605
|
},
|
|
2606
2606
|
location: {
|
|
@@ -2622,7 +2622,7 @@ export var manifest = {
|
|
|
2622
2622
|
customMarksForStructuredTextField: {
|
|
2623
2623
|
name: 'customMarksForStructuredTextField',
|
|
2624
2624
|
comment: {
|
|
2625
|
-
|
|
2625
|
+
markdownText: 'Use this function to define a number of custom marks for a specific\nStructured Text field.',
|
|
2626
2626
|
tag: 'structuredText',
|
|
2627
2627
|
},
|
|
2628
2628
|
nonCtxArguments: [
|
|
@@ -2657,7 +2657,7 @@ export var manifest = {
|
|
|
2657
2657
|
customBlockStylesForStructuredTextField: {
|
|
2658
2658
|
name: 'customBlockStylesForStructuredTextField',
|
|
2659
2659
|
comment: {
|
|
2660
|
-
|
|
2660
|
+
markdownText: 'Use this function to define a number of custom block styles for a specific\nStructured Text field.',
|
|
2661
2661
|
tag: 'structuredText',
|
|
2662
2662
|
},
|
|
2663
2663
|
nonCtxArguments: [
|
|
@@ -2692,7 +2692,7 @@ export var manifest = {
|
|
|
2692
2692
|
contentAreaSidebarItems: {
|
|
2693
2693
|
name: 'contentAreaSidebarItems',
|
|
2694
2694
|
comment: {
|
|
2695
|
-
|
|
2695
|
+
markdownText: 'Use this function to declare new items in the content area sidebar.',
|
|
2696
2696
|
tag: 'sidebarItems',
|
|
2697
2697
|
},
|
|
2698
2698
|
nonCtxArguments: [],
|
|
@@ -2710,7 +2710,7 @@ export var manifest = {
|
|
|
2710
2710
|
buildItemPresentationInfo: {
|
|
2711
2711
|
name: 'buildItemPresentationInfo',
|
|
2712
2712
|
comment: {
|
|
2713
|
-
|
|
2713
|
+
markdownText: 'Use this function to customize the presentation of a record in records\ncollections and "Single link" or "Multiple links" field.',
|
|
2714
2714
|
tag: 'presentation',
|
|
2715
2715
|
},
|
|
2716
2716
|
nonCtxArguments: [
|
|
@@ -2733,7 +2733,7 @@ export var manifest = {
|
|
|
2733
2733
|
assetSources: {
|
|
2734
2734
|
name: 'assetSources',
|
|
2735
2735
|
comment: {
|
|
2736
|
-
|
|
2736
|
+
markdownText: 'Use this function to declare additional sources to be shown when users want\nto upload new assets.',
|
|
2737
2737
|
tag: 'assetSources',
|
|
2738
2738
|
},
|
|
2739
2739
|
nonCtxArguments: [],
|
|
@@ -2754,12 +2754,12 @@ export var manifest = {
|
|
|
2754
2754
|
{
|
|
2755
2755
|
name: 'PluginProperties',
|
|
2756
2756
|
comment: {
|
|
2757
|
-
|
|
2757
|
+
markdownText: "Information about the current plugin. Useful to access the plugin's global\nconfiguration object.",
|
|
2758
2758
|
},
|
|
2759
2759
|
items: {
|
|
2760
2760
|
plugin: {
|
|
2761
2761
|
comment: {
|
|
2762
|
-
|
|
2762
|
+
markdownText: 'The current plugin.',
|
|
2763
2763
|
},
|
|
2764
2764
|
location: {
|
|
2765
2765
|
filePath: 'src/ctx/base.ts',
|
|
@@ -2772,12 +2772,12 @@ export var manifest = {
|
|
|
2772
2772
|
{
|
|
2773
2773
|
name: 'AuthenticationProperties',
|
|
2774
2774
|
comment: {
|
|
2775
|
-
|
|
2775
|
+
markdownText: 'Information about the current user using the CMS.',
|
|
2776
2776
|
},
|
|
2777
2777
|
items: {
|
|
2778
2778
|
currentUser: {
|
|
2779
2779
|
comment: {
|
|
2780
|
-
|
|
2780
|
+
markdownText: 'The current DatoCMS user. It can either be the owner or one of the\ncollaborators (regular or SSO).',
|
|
2781
2781
|
},
|
|
2782
2782
|
location: {
|
|
2783
2783
|
filePath: 'src/ctx/base.ts',
|
|
@@ -2787,7 +2787,7 @@ export var manifest = {
|
|
|
2787
2787
|
},
|
|
2788
2788
|
currentRole: {
|
|
2789
2789
|
comment: {
|
|
2790
|
-
|
|
2790
|
+
markdownText: 'The role for the current DatoCMS user.',
|
|
2791
2791
|
},
|
|
2792
2792
|
location: {
|
|
2793
2793
|
filePath: 'src/ctx/base.ts',
|
|
@@ -2797,7 +2797,7 @@ export var manifest = {
|
|
|
2797
2797
|
},
|
|
2798
2798
|
currentUserAccessToken: {
|
|
2799
2799
|
comment: {
|
|
2800
|
-
|
|
2800
|
+
markdownText: 'The access token to perform API calls on behalf of the current user. Only\navailable if `currentUserAccessToken` additional permission is granted.',
|
|
2801
2801
|
},
|
|
2802
2802
|
location: {
|
|
2803
2803
|
filePath: 'src/ctx/base.ts',
|
|
@@ -2812,7 +2812,7 @@ export var manifest = {
|
|
|
2812
2812
|
items: {
|
|
2813
2813
|
site: {
|
|
2814
2814
|
comment: {
|
|
2815
|
-
|
|
2815
|
+
markdownText: 'The current DatoCMS project.',
|
|
2816
2816
|
},
|
|
2817
2817
|
location: {
|
|
2818
2818
|
filePath: 'src/ctx/base.ts',
|
|
@@ -2822,7 +2822,7 @@ export var manifest = {
|
|
|
2822
2822
|
},
|
|
2823
2823
|
environment: {
|
|
2824
2824
|
comment: {
|
|
2825
|
-
|
|
2825
|
+
markdownText: 'The ID of the current environment.',
|
|
2826
2826
|
},
|
|
2827
2827
|
location: {
|
|
2828
2828
|
filePath: 'src/ctx/base.ts',
|
|
@@ -2832,7 +2832,7 @@ export var manifest = {
|
|
|
2832
2832
|
},
|
|
2833
2833
|
owner: {
|
|
2834
2834
|
comment: {
|
|
2835
|
-
|
|
2835
|
+
markdownText: 'The account/organization that is the project owner.',
|
|
2836
2836
|
},
|
|
2837
2837
|
location: {
|
|
2838
2838
|
filePath: 'src/ctx/base.ts',
|
|
@@ -2842,7 +2842,8 @@ export var manifest = {
|
|
|
2842
2842
|
},
|
|
2843
2843
|
account: {
|
|
2844
2844
|
comment: {
|
|
2845
|
-
|
|
2845
|
+
markdownText: 'The account that is the project owner.',
|
|
2846
|
+
deprecatedMarkdownText: 'Please use `.owner` instead, as the project owner can also be\nan organization',
|
|
2846
2847
|
},
|
|
2847
2848
|
location: {
|
|
2848
2849
|
filePath: 'src/ctx/base.ts',
|
|
@@ -2852,7 +2853,7 @@ export var manifest = {
|
|
|
2852
2853
|
},
|
|
2853
2854
|
ui: {
|
|
2854
2855
|
comment: {
|
|
2855
|
-
|
|
2856
|
+
markdownText: 'UI preferences of the current user (right now, only the preferred locale is\navailable).',
|
|
2856
2857
|
},
|
|
2857
2858
|
location: {
|
|
2858
2859
|
filePath: 'src/ctx/base.ts',
|
|
@@ -2862,7 +2863,7 @@ export var manifest = {
|
|
|
2862
2863
|
},
|
|
2863
2864
|
theme: {
|
|
2864
2865
|
comment: {
|
|
2865
|
-
|
|
2866
|
+
markdownText: 'An object containing the theme colors for the current DatoCMS project.',
|
|
2866
2867
|
},
|
|
2867
2868
|
location: {
|
|
2868
2869
|
filePath: 'src/ctx/base.ts',
|
|
@@ -2875,12 +2876,12 @@ export var manifest = {
|
|
|
2875
2876
|
{
|
|
2876
2877
|
name: 'EntityReposProperties',
|
|
2877
2878
|
comment: {
|
|
2878
|
-
|
|
2879
|
+
markdownText: 'These properties provide access to "entity repos", that is, the collection of\nresources of a particular type that have been loaded by the CMS up to this\nmoment. The entity repos are objects, indexed by the ID of the entity itself.',
|
|
2879
2880
|
},
|
|
2880
2881
|
items: {
|
|
2881
2882
|
itemTypes: {
|
|
2882
2883
|
comment: {
|
|
2883
|
-
|
|
2884
|
+
markdownText: 'All the models of the current DatoCMS project, indexed by ID.',
|
|
2884
2885
|
},
|
|
2885
2886
|
location: {
|
|
2886
2887
|
filePath: 'src/ctx/base.ts',
|
|
@@ -2890,7 +2891,7 @@ export var manifest = {
|
|
|
2890
2891
|
},
|
|
2891
2892
|
fields: {
|
|
2892
2893
|
comment: {
|
|
2893
|
-
|
|
2894
|
+
markdownText: 'All the fields currently loaded for the current DatoCMS project, indexed by\nID. If some fields you need are not present, use the `loadItemTypeFields`\nfunction to load them.',
|
|
2894
2895
|
},
|
|
2895
2896
|
location: {
|
|
2896
2897
|
filePath: 'src/ctx/base.ts',
|
|
@@ -2900,7 +2901,7 @@ export var manifest = {
|
|
|
2900
2901
|
},
|
|
2901
2902
|
fieldsets: {
|
|
2902
2903
|
comment: {
|
|
2903
|
-
|
|
2904
|
+
markdownText: 'All the fieldsets currently loaded for the current DatoCMS project, indexed\nby ID. If some fields you need are not present, use the\n`loadItemTypeFieldsets` function to load them.',
|
|
2904
2905
|
},
|
|
2905
2906
|
location: {
|
|
2906
2907
|
filePath: 'src/ctx/base.ts',
|
|
@@ -2910,7 +2911,7 @@ export var manifest = {
|
|
|
2910
2911
|
},
|
|
2911
2912
|
users: {
|
|
2912
2913
|
comment: {
|
|
2913
|
-
|
|
2914
|
+
markdownText: 'All the regular users currently loaded for the current DatoCMS project,\nindexed by ID. It will always contain the current user. If some users you\nneed are not present, use the `loadUsers` function to load them.',
|
|
2914
2915
|
},
|
|
2915
2916
|
location: {
|
|
2916
2917
|
filePath: 'src/ctx/base.ts',
|
|
@@ -2920,7 +2921,7 @@ export var manifest = {
|
|
|
2920
2921
|
},
|
|
2921
2922
|
ssoUsers: {
|
|
2922
2923
|
comment: {
|
|
2923
|
-
|
|
2924
|
+
markdownText: 'All the SSO users currently loaded for the current DatoCMS project, indexed\nby ID. It will always contain the current user. If some users you need are\nnot present, use the `loadSsoUsers` function to load them.',
|
|
2924
2925
|
},
|
|
2925
2926
|
location: {
|
|
2926
2927
|
filePath: 'src/ctx/base.ts',
|
|
@@ -2935,12 +2936,12 @@ export var manifest = {
|
|
|
2935
2936
|
{
|
|
2936
2937
|
name: 'LoadDataMethods',
|
|
2937
2938
|
comment: {
|
|
2938
|
-
|
|
2939
|
+
markdownText: 'These methods can be used to asyncronously load additional information your\nplugin needs to work.',
|
|
2939
2940
|
},
|
|
2940
2941
|
items: {
|
|
2941
2942
|
loadItemTypeFields: {
|
|
2942
2943
|
comment: {
|
|
2943
|
-
|
|
2944
|
+
markdownText: 'Loads all the fields for a specific model (or block). Fields will be\nreturned and will also be available in the the `fields` property.',
|
|
2944
2945
|
example: "const itemTypeId = prompt('Please insert a model ID:');\n\nconst fields = await ctx.loadItemTypeFields(itemTypeId);\n\nctx.notice(\n `Success! ${fields\n .map((field) => field.attributes.api_key)\n .join(', ')}`,\n);",
|
|
2945
2946
|
},
|
|
2946
2947
|
location: {
|
|
@@ -2951,7 +2952,7 @@ export var manifest = {
|
|
|
2951
2952
|
},
|
|
2952
2953
|
loadItemTypeFieldsets: {
|
|
2953
2954
|
comment: {
|
|
2954
|
-
|
|
2955
|
+
markdownText: 'Loads all the fieldsets for a specific model (or block). Fieldsets will be\nreturned and will also be available in the the `fieldsets` property.',
|
|
2955
2956
|
example: "const itemTypeId = prompt('Please insert a model ID:');\n\nconst fieldsets = await ctx.loadItemTypeFieldsets(itemTypeId);\n\nctx.notice(\n `Success! ${fieldsets\n .map((fieldset) => fieldset.attributes.title)\n .join(', ')}`,\n);",
|
|
2956
2957
|
},
|
|
2957
2958
|
location: {
|
|
@@ -2962,7 +2963,7 @@ export var manifest = {
|
|
|
2962
2963
|
},
|
|
2963
2964
|
loadFieldsUsingPlugin: {
|
|
2964
2965
|
comment: {
|
|
2965
|
-
|
|
2966
|
+
markdownText: 'Loads all the fields in the project that are currently using the plugin for\none of its manual field extensions.',
|
|
2966
2967
|
example: "const fields = await ctx.loadFieldsUsingPlugin();\n\nctx.notice(\n `Success! ${fields\n .map((field) => field.attributes.api_key)\n .join(', ')}`,\n);",
|
|
2967
2968
|
},
|
|
2968
2969
|
location: {
|
|
@@ -2973,7 +2974,7 @@ export var manifest = {
|
|
|
2973
2974
|
},
|
|
2974
2975
|
loadUsers: {
|
|
2975
2976
|
comment: {
|
|
2976
|
-
|
|
2977
|
+
markdownText: 'Loads all regular users. Users will be returned and will also be available\nin the the `users` property.',
|
|
2977
2978
|
example: "const users = await ctx.loadUsers();\n\nctx.notice(`Success! ${users.map((user) => user.id).join(', ')}`);",
|
|
2978
2979
|
},
|
|
2979
2980
|
location: {
|
|
@@ -2984,7 +2985,7 @@ export var manifest = {
|
|
|
2984
2985
|
},
|
|
2985
2986
|
loadSsoUsers: {
|
|
2986
2987
|
comment: {
|
|
2987
|
-
|
|
2988
|
+
markdownText: 'Loads all SSO users. Users will be returned and will also be available in\nthe the `ssoUsers` property.',
|
|
2988
2989
|
example: "const users = await ctx.loadSsoUsers();\n\nctx.notice(`Success! ${users.map((user) => user.id).join(', ')}`);",
|
|
2989
2990
|
},
|
|
2990
2991
|
location: {
|
|
@@ -2998,12 +2999,12 @@ export var manifest = {
|
|
|
2998
2999
|
{
|
|
2999
3000
|
name: 'UpdatePluginParametersMethods',
|
|
3000
3001
|
comment: {
|
|
3001
|
-
|
|
3002
|
+
markdownText: 'These methods can be used to update both plugin parameters and manual field\nextensions configuration.',
|
|
3002
3003
|
},
|
|
3003
3004
|
items: {
|
|
3004
3005
|
updatePluginParameters: {
|
|
3005
3006
|
comment: {
|
|
3006
|
-
|
|
3007
|
+
markdownText: 'Updates the plugin parameters.\n\nAlways check `ctx.currentRole.meta.final_permissions.can_edit_schema`\nbefore calling this, as the user might not have the permission to perform\nthe operation.',
|
|
3007
3008
|
example: "await ctx.updatePluginParameters({ debugMode: true });\nawait ctx.notice('Plugin parameters successfully updated!');",
|
|
3008
3009
|
},
|
|
3009
3010
|
location: {
|
|
@@ -3014,7 +3015,7 @@ export var manifest = {
|
|
|
3014
3015
|
},
|
|
3015
3016
|
updateFieldAppearance: {
|
|
3016
3017
|
comment: {
|
|
3017
|
-
|
|
3018
|
+
markdownText: 'Performs changes in the appearance of a field. You can install/remove a\nmanual field extension, or tweak their parameters. If multiple changes are\npassed, they will be applied sequencially.\n\nAlways check `ctx.currentRole.meta.final_permissions.can_edit_schema`\nbefore calling this, as the user might not have the permission to perform\nthe operation.',
|
|
3018
3019
|
example: "const fields = await ctx.loadFieldsUsingPlugin();\n\nif (fields.length === 0) {\n ctx.alert('No field is using this plugin as a manual extension!');\n return;\n}\n\nfor (const field of fields) {\n const { appearance } = field.attributes;\n const operations = [];\n\n if (appearance.editor === ctx.plugin.id) {\n operations.push({\n operation: 'updateEditor',\n newParameters: {\n ...appearance.parameters,\n foo: 'bar',\n },\n });\n }\n\n appearance.addons.forEach((addon, i) => {\n if (addon.id !== ctx.plugin.id) {\n return;\n }\n\n operations.push({\n operation: 'updateAddon',\n index: i,\n newParameters: { ...addon.parameters, foo: 'bar' },\n });\n });\n\n await ctx.updateFieldAppearance(field.id, operations);\n ctx.notice(`Successfully edited field ${field.attributes.api_key}`);\n}",
|
|
3019
3020
|
},
|
|
3020
3021
|
location: {
|
|
@@ -3028,12 +3029,12 @@ export var manifest = {
|
|
|
3028
3029
|
{
|
|
3029
3030
|
name: 'ToastMethods',
|
|
3030
3031
|
comment: {
|
|
3031
|
-
|
|
3032
|
+
markdownText: 'These methods can be used to show UI-consistent toast notifications to the\nend-user.',
|
|
3032
3033
|
},
|
|
3033
3034
|
items: {
|
|
3034
3035
|
alert: {
|
|
3035
3036
|
comment: {
|
|
3036
|
-
|
|
3037
|
+
markdownText: 'Triggers an "error" toast displaying the selected message.',
|
|
3037
3038
|
example: "const message = prompt(\n 'Please insert a message:',\n 'This is an alert message!',\n);\n\nawait ctx.alert(message);",
|
|
3038
3039
|
},
|
|
3039
3040
|
location: {
|
|
@@ -3044,7 +3045,7 @@ export var manifest = {
|
|
|
3044
3045
|
},
|
|
3045
3046
|
notice: {
|
|
3046
3047
|
comment: {
|
|
3047
|
-
|
|
3048
|
+
markdownText: 'Triggers a "success" toast displaying the selected message.',
|
|
3048
3049
|
example: "const message = prompt(\n 'Please insert a message:',\n 'This is a notice message!',\n);\n\nawait ctx.notice(message);",
|
|
3049
3050
|
},
|
|
3050
3051
|
location: {
|
|
@@ -3055,7 +3056,7 @@ export var manifest = {
|
|
|
3055
3056
|
},
|
|
3056
3057
|
customToast: {
|
|
3057
3058
|
comment: {
|
|
3058
|
-
|
|
3059
|
+
markdownText: 'Triggers a custom toast displaying the selected message (and optionally a\nCTA).',
|
|
3059
3060
|
example: "const result = await ctx.customToast({\n type: 'warning',\n message: 'Just a sample warning notification!',\n dismissOnPageChange: true,\n dismissAfterTimeout: 5000,\n cta: {\n label: 'Execute call-to-action',\n value: 'cta',\n },\n});\n\nif (result === 'cta') {\n ctx.notice(`Clicked CTA!`);\n}",
|
|
3060
3061
|
},
|
|
3061
3062
|
location: {
|
|
@@ -3069,12 +3070,12 @@ export var manifest = {
|
|
|
3069
3070
|
{
|
|
3070
3071
|
name: 'ItemDialogMethods',
|
|
3071
3072
|
comment: {
|
|
3072
|
-
|
|
3073
|
+
markdownText: 'These methods let you open the standard DatoCMS dialogs needed to interact\nwith records.',
|
|
3073
3074
|
},
|
|
3074
3075
|
items: {
|
|
3075
3076
|
createNewItem: {
|
|
3076
3077
|
comment: {
|
|
3077
|
-
|
|
3078
|
+
markdownText: 'Opens a dialog for creating a new record. It returns a promise resolved\nwith the newly created record or `null` if the user closes the dialog\nwithout creating anything.',
|
|
3078
3079
|
example: "const itemTypeId = prompt('Please insert a model ID:');\n\nconst item = await ctx.createNewItem(itemTypeId);\n\nif (item) {\n ctx.notice(`Success! ${item.id}`);\n} else {\n ctx.alert('Closed!');\n}",
|
|
3079
3080
|
},
|
|
3080
3081
|
location: {
|
|
@@ -3085,7 +3086,7 @@ export var manifest = {
|
|
|
3085
3086
|
},
|
|
3086
3087
|
selectItem: {
|
|
3087
3088
|
comment: {
|
|
3088
|
-
|
|
3089
|
+
markdownText: 'Opens a dialog for selecting one (or multiple) record(s) from a list of\nexisting records of type `itemTypeId`. It returns a promise resolved with\nthe selected record(s), or `null` if the user closes the dialog without\nchoosing any record.',
|
|
3089
3090
|
example: "const itemTypeId = prompt('Please insert a model ID:');\n\nconst items = await ctx.selectItem(itemTypeId, { multiple: true });\n\nif (items) {\n ctx.notice(`Success! ${items.map((i) => i.id).join(', ')}`);\n} else {\n ctx.alert('Closed!');\n}",
|
|
3090
3091
|
},
|
|
3091
3092
|
location: {
|
|
@@ -3096,7 +3097,7 @@ export var manifest = {
|
|
|
3096
3097
|
},
|
|
3097
3098
|
editItem: {
|
|
3098
3099
|
comment: {
|
|
3099
|
-
|
|
3100
|
+
markdownText: 'Opens a dialog for editing an existing record. It returns a promise\nresolved with the edited record, or `null` if the user closes the dialog\nwithout persisting any change.',
|
|
3100
3101
|
example: "const itemId = prompt('Please insert a record ID:');\n\nconst item = await ctx.editItem(itemId);\n\nif (item) {\n ctx.notice(`Success! ${item.id}`);\n} else {\n ctx.alert('Closed!');\n}",
|
|
3101
3102
|
},
|
|
3102
3103
|
location: {
|
|
@@ -3110,12 +3111,12 @@ export var manifest = {
|
|
|
3110
3111
|
{
|
|
3111
3112
|
name: 'UploadDialogMethods',
|
|
3112
3113
|
comment: {
|
|
3113
|
-
|
|
3114
|
+
markdownText: 'These methods let you open the standard DatoCMS dialogs needed to interact\nwith Media Area assets.',
|
|
3114
3115
|
},
|
|
3115
3116
|
items: {
|
|
3116
3117
|
selectUpload: {
|
|
3117
3118
|
comment: {
|
|
3118
|
-
|
|
3119
|
+
markdownText: 'Opens a dialog for selecting one (or multiple) existing asset(s). It\nreturns a promise resolved with the selected asset(s), or `null` if the\nuser closes the dialog without selecting any upload.',
|
|
3119
3120
|
example: "const item = await ctx.selectUpload({ multiple: false });\n\nif (item) {\n ctx.notice(`Success! ${item.id}`);\n} else {\n ctx.alert('Closed!');\n}",
|
|
3120
3121
|
},
|
|
3121
3122
|
location: {
|
|
@@ -3126,7 +3127,7 @@ export var manifest = {
|
|
|
3126
3127
|
},
|
|
3127
3128
|
editUpload: {
|
|
3128
3129
|
comment: {
|
|
3129
|
-
|
|
3130
|
+
markdownText: 'Opens a dialog for editing a Media Area asset. It returns a promise\nresolved with:\n\n- The updated asset, if the user persists some changes to the asset itself\n- `null`, if the user closes the dialog without persisting any change\n- An asset structure with an additional `deleted` property set to true, if\n the user deletes the asset.',
|
|
3130
3131
|
example: "const uploadId = prompt('Please insert an asset ID:');\n\nconst item = await ctx.editUpload(uploadId);\n\nif (item) {\n ctx.notice(`Success! ${item.id}`);\n} else {\n ctx.alert('Closed!');\n}",
|
|
3131
3132
|
},
|
|
3132
3133
|
location: {
|
|
@@ -3137,7 +3138,7 @@ export var manifest = {
|
|
|
3137
3138
|
},
|
|
3138
3139
|
editUploadMetadata: {
|
|
3139
3140
|
comment: {
|
|
3140
|
-
|
|
3141
|
+
markdownText: 'Opens a dialog for editing a "single asset" field structure. It returns a\npromise resolved with the updated structure, or `null` if the user closes\nthe dialog without persisting any change.',
|
|
3141
3142
|
example: "const uploadId = prompt('Please insert an asset ID:');\n\nconst result = await ctx.editUploadMetadata({\n upload_id: uploadId,\n alt: null,\n title: null,\n custom_data: {},\n focal_point: null,\n});\n\nif (result) {\n ctx.notice(`Success! ${JSON.stringify(result)}`);\n} else {\n ctx.alert('Closed!');\n}",
|
|
3142
3143
|
},
|
|
3143
3144
|
location: {
|
|
@@ -3151,12 +3152,12 @@ export var manifest = {
|
|
|
3151
3152
|
{
|
|
3152
3153
|
name: 'CustomDialogMethods',
|
|
3153
3154
|
comment: {
|
|
3154
|
-
|
|
3155
|
+
markdownText: 'These methods can be used to open custom dialogs/confirmation panels.',
|
|
3155
3156
|
},
|
|
3156
3157
|
items: {
|
|
3157
3158
|
openModal: {
|
|
3158
3159
|
comment: {
|
|
3159
|
-
|
|
3160
|
+
markdownText: 'Opens a custom modal. Returns a promise resolved with what the modal itself\nreturns calling the `resolve()` function.',
|
|
3160
3161
|
example: "const result = await ctx.openModal({\n id: 'regular',\n title: 'Custom title!',\n width: 'l',\n parameters: { foo: 'bar' },\n});\n\nif (result) {\n ctx.notice(`Success! ${JSON.stringify(result)}`);\n} else {\n ctx.alert('Closed!');\n}",
|
|
3161
3162
|
},
|
|
3162
3163
|
location: {
|
|
@@ -3167,7 +3168,7 @@ export var manifest = {
|
|
|
3167
3168
|
},
|
|
3168
3169
|
openConfirm: {
|
|
3169
3170
|
comment: {
|
|
3170
|
-
|
|
3171
|
+
markdownText: 'Opens a UI-consistent confirmation dialog. Returns a promise resolved with\nthe value of the choice made by the user.',
|
|
3171
3172
|
example: "const result = await ctx.openConfirm({\n title: 'Custom title',\n content:\n 'Lorem Ipsum is simply dummy text of the printing and typesetting industry',\n choices: [\n {\n label: 'Positive',\n value: 'positive',\n intent: 'positive',\n },\n {\n label: 'Negative',\n value: 'negative',\n intent: 'negative',\n },\n ],\n cancel: {\n label: 'Cancel',\n value: false,\n },\n});\n\nif (result) {\n ctx.notice(`Success! ${result}`);\n} else {\n ctx.alert('Cancelled!');\n}",
|
|
3172
3173
|
},
|
|
3173
3174
|
location: {
|
|
@@ -3181,12 +3182,12 @@ export var manifest = {
|
|
|
3181
3182
|
{
|
|
3182
3183
|
name: 'NavigateMethods',
|
|
3183
3184
|
comment: {
|
|
3184
|
-
|
|
3185
|
+
markdownText: 'These methods can be used to take the user to different pages.',
|
|
3185
3186
|
},
|
|
3186
3187
|
items: {
|
|
3187
3188
|
navigateTo: {
|
|
3188
3189
|
comment: {
|
|
3189
|
-
|
|
3190
|
+
markdownText: 'Moves the user to another URL internal to the backend.',
|
|
3190
3191
|
example: "await ctx.navigateTo('/');",
|
|
3191
3192
|
},
|
|
3192
3193
|
location: {
|
|
@@ -3202,12 +3203,12 @@ export var manifest = {
|
|
|
3202
3203
|
selfResizingPluginFrameCtxSizingUtilities: {
|
|
3203
3204
|
name: 'SizingUtilities',
|
|
3204
3205
|
comment: {
|
|
3205
|
-
|
|
3206
|
+
markdownText: 'A number of methods that you can use to control the size of the plugin frame.',
|
|
3206
3207
|
},
|
|
3207
3208
|
items: {
|
|
3208
3209
|
startAutoResizer: {
|
|
3209
3210
|
comment: {
|
|
3210
|
-
|
|
3211
|
+
markdownText: "Listens for DOM changes and automatically calls `setHeight` when it detects\na change. If you're using `datocms-react-ui` package, the `<Canvas />`\ncomponent already takes care of calling this method for you.",
|
|
3211
3212
|
},
|
|
3212
3213
|
location: {
|
|
3213
3214
|
filePath: 'src/ctx/commonExtras/sizing.ts',
|
|
@@ -3217,7 +3218,7 @@ export var manifest = {
|
|
|
3217
3218
|
},
|
|
3218
3219
|
stopAutoResizer: {
|
|
3219
3220
|
comment: {
|
|
3220
|
-
|
|
3221
|
+
markdownText: 'Stops resizing the iframe automatically.',
|
|
3221
3222
|
},
|
|
3222
3223
|
location: {
|
|
3223
3224
|
filePath: 'src/ctx/commonExtras/sizing.ts',
|
|
@@ -3227,7 +3228,7 @@ export var manifest = {
|
|
|
3227
3228
|
},
|
|
3228
3229
|
updateHeight: {
|
|
3229
3230
|
comment: {
|
|
3230
|
-
|
|
3231
|
+
markdownText: "Triggers a change in the size of the iframe. If you don't explicitely pass\na `newHeight` it will be automatically calculated using the iframe content\nat the moment.",
|
|
3231
3232
|
},
|
|
3232
3233
|
location: {
|
|
3233
3234
|
filePath: 'src/ctx/commonExtras/sizing.ts',
|