datocms-plugin-sdk 2.0.1 → 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.
Files changed (40) hide show
  1. package/dist/cjs/manifest.js +376 -303
  2. package/dist/cjs/manifest.js.map +1 -1
  3. package/dist/esm/ctx/base.d.ts +1 -1
  4. package/dist/esm/ctx/commonExtras/field.d.ts +4 -0
  5. package/dist/esm/ctx/commonExtras/itemForm.d.ts +14 -12
  6. package/dist/esm/ctx/commonExtras/sizing.d.ts +1 -0
  7. package/dist/esm/hooks/renderItemFormSidebar.d.ts +1 -1
  8. package/dist/esm/hooks/renderItemFormSidebarPanel.d.ts +1 -1
  9. package/dist/esm/hooks/renderManualFieldExtensionConfigScreen.d.ts +2 -2
  10. package/dist/esm/hooks/renderModal.d.ts +1 -1
  11. package/dist/esm/hooks/renderUploadSidebar.d.ts +1 -1
  12. package/dist/esm/hooks/renderUploadSidebarPanel.d.ts +1 -1
  13. package/dist/esm/manifest.js +376 -303
  14. package/dist/esm/manifest.js.map +1 -1
  15. package/dist/esm/manifestTypes.d.ts +39 -91
  16. package/dist/types/ctx/base.d.ts +1 -1
  17. package/dist/types/ctx/commonExtras/field.d.ts +4 -0
  18. package/dist/types/ctx/commonExtras/itemForm.d.ts +14 -12
  19. package/dist/types/ctx/commonExtras/sizing.d.ts +1 -0
  20. package/dist/types/hooks/renderItemFormSidebar.d.ts +1 -1
  21. package/dist/types/hooks/renderItemFormSidebarPanel.d.ts +1 -1
  22. package/dist/types/hooks/renderManualFieldExtensionConfigScreen.d.ts +2 -2
  23. package/dist/types/hooks/renderModal.d.ts +1 -1
  24. package/dist/types/hooks/renderUploadSidebar.d.ts +1 -1
  25. package/dist/types/hooks/renderUploadSidebarPanel.d.ts +1 -1
  26. package/dist/types/manifestTypes.d.ts +39 -91
  27. package/manifest.json +376 -303
  28. package/package.json +2 -2
  29. package/src/ctx/base.ts +1 -1
  30. package/src/ctx/commonExtras/field.ts +4 -0
  31. package/src/ctx/commonExtras/itemForm.ts +15 -12
  32. package/src/ctx/commonExtras/sizing.ts +1 -0
  33. package/src/hooks/renderItemFormSidebar.ts +1 -1
  34. package/src/hooks/renderItemFormSidebarPanel.ts +1 -1
  35. package/src/hooks/renderManualFieldExtensionConfigScreen.ts +2 -2
  36. package/src/hooks/renderModal.ts +1 -1
  37. package/src/hooks/renderUploadSidebar.ts +1 -1
  38. package/src/hooks/renderUploadSidebarPanel.ts +1 -1
  39. package/src/manifest.ts +533 -401
  40. package/src/manifestTypes.ts +39 -91
@@ -3,7 +3,7 @@ export var manifest = {
3
3
  validateManualFieldExtensionParameters: {
4
4
  name: 'validateManualFieldExtensionParameters',
5
5
  comment: {
6
- comment: 'This function will be called each time the configuration object changes. It\nmust return an object containing possible validation errors',
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
- comment: '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.',
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
- comment: 'Use this function to declare new sidebar to be shown when the user opens\nup an asset in the Media Area',
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
- comment: 'Use this function to declare new sidebar panels to be shown when the user\nopens up an asset in the Media Area',
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
- comment: 'Use this function to declare new navigation sections in the Settings Area\nsidebar',
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
- comment: 'This function will be called when the plugin needs to render a sidebar panel\n(see the `uploadSidebarPanels` function)',
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
- comment: 'The ID of the sidebar panel that needs to be rendered',
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
- comment: 'The arbitrary `parameters` of the panel declared in the\n`uploadSidebarPanels` function',
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
- comment: 'The active asset',
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
- comment: 'This function will be called when the plugin needs to render a sidebar (see\nthe `uploadSidebars` function)',
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
- comment: 'The ID of the sidebar that needs to be rendered',
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
- comment: 'The arbitrary `parameters` of the declared in the `uploadSidebars`\nfunction',
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
- comment: 'The active asset',
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
- comment: 'This function will be called when the plugin needs to render a specific\npage (see the `mainNavigationTabs`, `settingsAreaSidebarItemGroups` and\n`contentAreaSidebarItems` functions)',
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
- comment: 'The ID of the page that needs to be rendered',
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
- comment: 'This function will be called when the plugin requested to open a modal (see\nthe `openModal` function)',
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
- comment: 'The ID of the modal that needs to be rendered',
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
- comment: 'The arbitrary `parameters` of the modal declared in the `openModal`\nfunction',
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
- comment: 'A function to be called by the plugin to close the modal. The `openModal`\ncall will be resolved with the passed return value',
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
- comment: 'The ID of the field extension for which we need to render the parameters\nform',
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
- comment: 'The current value of the parameters (you can change the value with the\n`setParameters` function)',
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
- comment: 'The current validation errors for the parameters (you can set them\nimplementing the `validateManualFieldExtensionParameters` function)',
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
- comment: 'The field entity that is being edited in the form',
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
- comment: 'The model for the field being edited',
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
- comment: 'Sets a new value for the parameters',
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
- comment: 'This function will be called when the plugin needs to render a sidebar panel\n(see the `itemFormSidebarPanels` function)',
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: [
@@ -418,10 +418,14 @@ export var manifest = {
418
418
  type: 'SelfResizingPluginFrameCtx',
419
419
  additionalProperties: [
420
420
  {
421
+ name: 'ItemFormAdditionalProperties',
422
+ comment: {
423
+ markdownText: "These information describe the current state of the form that's being shown\nto the end-user to edit a record.",
424
+ },
421
425
  items: {
422
426
  locale: {
423
427
  comment: {
424
- comment: 'The currently active locale for the record',
428
+ markdownText: 'The currently active locale for the record.',
425
429
  },
426
430
  location: {
427
431
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -431,7 +435,7 @@ export var manifest = {
431
435
  },
432
436
  item: {
433
437
  comment: {
434
- comment: 'If an already persisted record is being edited, returns the full record\nentity',
438
+ markdownText: 'If an already persisted record is being edited, returns the full record\nentity.',
435
439
  },
436
440
  location: {
437
441
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -441,7 +445,7 @@ export var manifest = {
441
445
  },
442
446
  itemType: {
443
447
  comment: {
444
- comment: 'The model for the record being edited',
448
+ markdownText: 'The model for the record being edited.',
445
449
  },
446
450
  location: {
447
451
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -451,7 +455,7 @@ export var manifest = {
451
455
  },
452
456
  formValues: {
453
457
  comment: {
454
- comment: 'The complete internal form state',
458
+ markdownText: 'The complete internal form state.',
455
459
  },
456
460
  location: {
457
461
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -461,7 +465,7 @@ export var manifest = {
461
465
  },
462
466
  itemStatus: {
463
467
  comment: {
464
- comment: 'The current status of the record being edited',
468
+ markdownText: 'The current status of the record being edited.',
465
469
  },
466
470
  location: {
467
471
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -471,7 +475,7 @@ export var manifest = {
471
475
  },
472
476
  isSubmitting: {
473
477
  comment: {
474
- comment: 'Whether the form is currently submitting itself or not',
478
+ markdownText: 'Whether the form is currently submitting itself or not.',
475
479
  },
476
480
  location: {
477
481
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -481,7 +485,7 @@ export var manifest = {
481
485
  },
482
486
  isFormDirty: {
483
487
  comment: {
484
- comment: 'Whether the form has some non-persisted changes or not',
488
+ markdownText: 'Whether the form has some non-persisted changes or not.',
485
489
  },
486
490
  location: {
487
491
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -491,13 +495,13 @@ export var manifest = {
491
495
  },
492
496
  blocksAnalysis: {
493
497
  comment: {
494
- comment: 'Current number of blocks present in form state',
498
+ markdownText: 'Provides information on how many blocks are currently present in the form.',
495
499
  },
496
500
  location: {
497
501
  filePath: 'src/ctx/commonExtras/itemForm.ts',
498
502
  lineNumber: 29,
499
503
  },
500
- type: '{\n usage: {\n /** Total number of blocks present in form state */\n total: number;\n /** Total number of blocks present in non-localized fields */\n nonLocalized: number;\n /** Total number of blocks present in localized fields, per locale */\n perLocale: Record<string, number>;\n };\n /** Maximum number of blocks per item */\n maximumPerItem: number;\n }',
504
+ type: 'BlocksAnalysis',
501
505
  },
502
506
  },
503
507
  },
@@ -505,7 +509,7 @@ export var manifest = {
505
509
  items: {
506
510
  sidebarPaneId: {
507
511
  comment: {
508
- comment: 'The ID of the sidebar panel that needs to be rendered',
512
+ markdownText: 'The ID of the sidebar panel that needs to be rendered.',
509
513
  },
510
514
  location: {
511
515
  filePath: 'src/hooks/renderItemFormSidebarPanel.ts',
@@ -515,7 +519,7 @@ export var manifest = {
515
519
  },
516
520
  parameters: {
517
521
  comment: {
518
- comment: 'The arbitrary `parameters` of the panel declared in the\n`itemFormSidebarPanels` function',
522
+ markdownText: 'The arbitrary `parameters` of the panel declared in the\n`itemFormSidebarPanels` function.',
519
523
  },
520
524
  location: {
521
525
  filePath: 'src/hooks/renderItemFormSidebarPanel.ts',
@@ -528,81 +532,85 @@ export var manifest = {
528
532
  ],
529
533
  additionalMethods: [
530
534
  {
535
+ name: 'ItemFormAdditionalMethods',
536
+ comment: {
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
+ },
531
539
  items: {
532
540
  toggleField: {
533
541
  comment: {
534
- comment: '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.',
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.',
535
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);",
536
544
  },
537
545
  location: {
538
546
  filePath: 'src/ctx/commonExtras/itemForm.ts',
539
- lineNumber: 65,
547
+ lineNumber: 68,
540
548
  },
541
549
  type: '(path: string, show: boolean) => Promise<void>',
542
550
  },
543
551
  disableField: {
544
552
  comment: {
545
- comment: 'Disables/re-enables a specific field in the form',
553
+ markdownText: 'Disables/re-enables a specific field in the form.',
546
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);",
547
555
  },
548
556
  location: {
549
557
  filePath: 'src/ctx/commonExtras/itemForm.ts',
550
- lineNumber: 80,
558
+ lineNumber: 83,
551
559
  },
552
560
  type: '(path: string, disable: boolean) => Promise<void>',
553
561
  },
554
562
  scrollToField: {
555
563
  comment: {
556
- comment: '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.',
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.',
557
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);",
558
566
  },
559
567
  location: {
560
568
  filePath: 'src/ctx/commonExtras/itemForm.ts',
561
- lineNumber: 97,
569
+ lineNumber: 100,
562
570
  },
563
571
  type: '(path: string, locale?: string) => Promise<void>',
564
572
  },
565
573
  setFieldValue: {
566
574
  comment: {
567
- comment: 'Changes a specific path of the `formValues` object',
575
+ markdownText: 'Changes a specific path of the `formValues` object.',
568
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');",
569
577
  },
570
578
  location: {
571
579
  filePath: 'src/ctx/commonExtras/itemForm.ts',
572
- lineNumber: 112,
580
+ lineNumber: 115,
573
581
  },
574
582
  type: '(path: string, value: unknown) => Promise<void>',
575
583
  },
576
584
  formValuesToItem: {
577
585
  comment: {
578
- comment: '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`.',
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`.',
579
587
  example: 'await ctx.formValuesToItem(ctx.formValues, false);',
580
588
  },
581
589
  location: {
582
590
  filePath: 'src/ctx/commonExtras/itemForm.ts',
583
- lineNumber: 129,
591
+ lineNumber: 132,
584
592
  },
585
593
  type: "(\n formValues: Record<string, unknown>,\n skipUnchangedFields?: boolean,\n ) => Promise<Omit<Item, 'id' | 'meta'> | undefined>",
586
594
  },
587
595
  itemToFormValues: {
588
596
  comment: {
589
- comment: 'Takes an Item entity, and converts it into the internal form state',
597
+ markdownText: 'Takes an Item entity, and converts it into the internal form state.',
590
598
  example: 'await ctx.itemToFormValues(ctx.item);',
591
599
  },
592
600
  location: {
593
601
  filePath: 'src/ctx/commonExtras/itemForm.ts',
594
- lineNumber: 142,
602
+ lineNumber: 145,
595
603
  },
596
604
  type: "(\n item: Omit<Item, 'id' | 'meta'>,\n ) => Promise<Record<string, unknown>>",
597
605
  },
598
606
  saveCurrentItem: {
599
607
  comment: {
600
- comment: 'Triggers a submit form for current record',
608
+ markdownText: 'Triggers a submit form for current record.',
601
609
  example: 'await ctx.saveCurrentItem();',
602
610
  },
603
611
  location: {
604
612
  filePath: 'src/ctx/commonExtras/itemForm.ts',
605
- lineNumber: 154,
613
+ lineNumber: 157,
606
614
  },
607
615
  type: '(showToast?: boolean) => Promise<void>',
608
616
  },
@@ -619,7 +627,7 @@ export var manifest = {
619
627
  renderItemFormSidebar: {
620
628
  name: 'renderItemFormSidebar',
621
629
  comment: {
622
- comment: 'This function will be called when the plugin needs to render a sidebar (see\nthe `itemFormSidebars` function)',
630
+ markdownText: 'This function will be called when the plugin needs to render a sidebar (see\nthe `itemFormSidebars` hook).',
623
631
  tag: 'sidebarPanels',
624
632
  },
625
633
  nonCtxArguments: [
@@ -632,10 +640,14 @@ export var manifest = {
632
640
  type: 'ImposedSizePluginFrameCtx',
633
641
  additionalProperties: [
634
642
  {
643
+ name: 'ItemFormAdditionalProperties',
644
+ comment: {
645
+ markdownText: "These information describe the current state of the form that's being shown\nto the end-user to edit a record.",
646
+ },
635
647
  items: {
636
648
  locale: {
637
649
  comment: {
638
- comment: 'The currently active locale for the record',
650
+ markdownText: 'The currently active locale for the record.',
639
651
  },
640
652
  location: {
641
653
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -645,7 +657,7 @@ export var manifest = {
645
657
  },
646
658
  item: {
647
659
  comment: {
648
- comment: 'If an already persisted record is being edited, returns the full record\nentity',
660
+ markdownText: 'If an already persisted record is being edited, returns the full record\nentity.',
649
661
  },
650
662
  location: {
651
663
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -655,7 +667,7 @@ export var manifest = {
655
667
  },
656
668
  itemType: {
657
669
  comment: {
658
- comment: 'The model for the record being edited',
670
+ markdownText: 'The model for the record being edited.',
659
671
  },
660
672
  location: {
661
673
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -665,7 +677,7 @@ export var manifest = {
665
677
  },
666
678
  formValues: {
667
679
  comment: {
668
- comment: 'The complete internal form state',
680
+ markdownText: 'The complete internal form state.',
669
681
  },
670
682
  location: {
671
683
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -675,7 +687,7 @@ export var manifest = {
675
687
  },
676
688
  itemStatus: {
677
689
  comment: {
678
- comment: 'The current status of the record being edited',
690
+ markdownText: 'The current status of the record being edited.',
679
691
  },
680
692
  location: {
681
693
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -685,7 +697,7 @@ export var manifest = {
685
697
  },
686
698
  isSubmitting: {
687
699
  comment: {
688
- comment: 'Whether the form is currently submitting itself or not',
700
+ markdownText: 'Whether the form is currently submitting itself or not.',
689
701
  },
690
702
  location: {
691
703
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -695,7 +707,7 @@ export var manifest = {
695
707
  },
696
708
  isFormDirty: {
697
709
  comment: {
698
- comment: 'Whether the form has some non-persisted changes or not',
710
+ markdownText: 'Whether the form has some non-persisted changes or not.',
699
711
  },
700
712
  location: {
701
713
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -705,13 +717,13 @@ export var manifest = {
705
717
  },
706
718
  blocksAnalysis: {
707
719
  comment: {
708
- comment: 'Current number of blocks present in form state',
720
+ markdownText: 'Provides information on how many blocks are currently present in the form.',
709
721
  },
710
722
  location: {
711
723
  filePath: 'src/ctx/commonExtras/itemForm.ts',
712
724
  lineNumber: 29,
713
725
  },
714
- type: '{\n usage: {\n /** Total number of blocks present in form state */\n total: number;\n /** Total number of blocks present in non-localized fields */\n nonLocalized: number;\n /** Total number of blocks present in localized fields, per locale */\n perLocale: Record<string, number>;\n };\n /** Maximum number of blocks per item */\n maximumPerItem: number;\n }',
726
+ type: 'BlocksAnalysis',
715
727
  },
716
728
  },
717
729
  },
@@ -719,7 +731,7 @@ export var manifest = {
719
731
  items: {
720
732
  sidebarId: {
721
733
  comment: {
722
- comment: 'The ID of the sidebar that needs to be rendered',
734
+ markdownText: 'The ID of the sidebar that needs to be rendered.',
723
735
  },
724
736
  location: {
725
737
  filePath: 'src/hooks/renderItemFormSidebar.ts',
@@ -729,7 +741,7 @@ export var manifest = {
729
741
  },
730
742
  parameters: {
731
743
  comment: {
732
- comment: 'The arbitrary `parameters` of the declared in the `itemFormSidebars`\nfunction',
744
+ markdownText: 'The arbitrary `parameters` of the declared in the `itemFormSidebars`\nfunction.',
733
745
  },
734
746
  location: {
735
747
  filePath: 'src/hooks/renderItemFormSidebar.ts',
@@ -742,81 +754,85 @@ export var manifest = {
742
754
  ],
743
755
  additionalMethods: [
744
756
  {
757
+ name: 'ItemFormAdditionalMethods',
758
+ comment: {
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
+ },
745
761
  items: {
746
762
  toggleField: {
747
763
  comment: {
748
- comment: '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.',
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.',
749
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);",
750
766
  },
751
767
  location: {
752
768
  filePath: 'src/ctx/commonExtras/itemForm.ts',
753
- lineNumber: 65,
769
+ lineNumber: 68,
754
770
  },
755
771
  type: '(path: string, show: boolean) => Promise<void>',
756
772
  },
757
773
  disableField: {
758
774
  comment: {
759
- comment: 'Disables/re-enables a specific field in the form',
775
+ markdownText: 'Disables/re-enables a specific field in the form.',
760
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);",
761
777
  },
762
778
  location: {
763
779
  filePath: 'src/ctx/commonExtras/itemForm.ts',
764
- lineNumber: 80,
780
+ lineNumber: 83,
765
781
  },
766
782
  type: '(path: string, disable: boolean) => Promise<void>',
767
783
  },
768
784
  scrollToField: {
769
785
  comment: {
770
- comment: '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.',
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.',
771
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);",
772
788
  },
773
789
  location: {
774
790
  filePath: 'src/ctx/commonExtras/itemForm.ts',
775
- lineNumber: 97,
791
+ lineNumber: 100,
776
792
  },
777
793
  type: '(path: string, locale?: string) => Promise<void>',
778
794
  },
779
795
  setFieldValue: {
780
796
  comment: {
781
- comment: 'Changes a specific path of the `formValues` object',
797
+ markdownText: 'Changes a specific path of the `formValues` object.',
782
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');",
783
799
  },
784
800
  location: {
785
801
  filePath: 'src/ctx/commonExtras/itemForm.ts',
786
- lineNumber: 112,
802
+ lineNumber: 115,
787
803
  },
788
804
  type: '(path: string, value: unknown) => Promise<void>',
789
805
  },
790
806
  formValuesToItem: {
791
807
  comment: {
792
- comment: '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`.',
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`.',
793
809
  example: 'await ctx.formValuesToItem(ctx.formValues, false);',
794
810
  },
795
811
  location: {
796
812
  filePath: 'src/ctx/commonExtras/itemForm.ts',
797
- lineNumber: 129,
813
+ lineNumber: 132,
798
814
  },
799
815
  type: "(\n formValues: Record<string, unknown>,\n skipUnchangedFields?: boolean,\n ) => Promise<Omit<Item, 'id' | 'meta'> | undefined>",
800
816
  },
801
817
  itemToFormValues: {
802
818
  comment: {
803
- comment: 'Takes an Item entity, and converts it into the internal form state',
819
+ markdownText: 'Takes an Item entity, and converts it into the internal form state.',
804
820
  example: 'await ctx.itemToFormValues(ctx.item);',
805
821
  },
806
822
  location: {
807
823
  filePath: 'src/ctx/commonExtras/itemForm.ts',
808
- lineNumber: 142,
824
+ lineNumber: 145,
809
825
  },
810
826
  type: "(\n item: Omit<Item, 'id' | 'meta'>,\n ) => Promise<Record<string, unknown>>",
811
827
  },
812
828
  saveCurrentItem: {
813
829
  comment: {
814
- comment: 'Triggers a submit form for current record',
830
+ markdownText: 'Triggers a submit form for current record.',
815
831
  example: 'await ctx.saveCurrentItem();',
816
832
  },
817
833
  location: {
818
834
  filePath: 'src/ctx/commonExtras/itemForm.ts',
819
- lineNumber: 154,
835
+ lineNumber: 157,
820
836
  },
821
837
  type: '(showToast?: boolean) => Promise<void>',
822
838
  },
@@ -833,7 +849,7 @@ export var manifest = {
833
849
  renderItemFormOutlet: {
834
850
  name: 'renderItemFormOutlet',
835
851
  comment: {
836
- comment: 'This function will be called when the plugin needs to render an outlet\ndefined by the `itemFormOutlets()` hook.',
852
+ markdownText: 'This function will be called when the plugin needs to render an outlet\ndefined by the `itemFormOutlets()` hook.',
837
853
  tag: 'outlets',
838
854
  },
839
855
  nonCtxArguments: [
@@ -846,10 +862,14 @@ export var manifest = {
846
862
  type: 'SelfResizingPluginFrameCtx',
847
863
  additionalProperties: [
848
864
  {
865
+ name: 'ItemFormAdditionalProperties',
866
+ comment: {
867
+ markdownText: "These information describe the current state of the form that's being shown\nto the end-user to edit a record.",
868
+ },
849
869
  items: {
850
870
  locale: {
851
871
  comment: {
852
- comment: 'The currently active locale for the record',
872
+ markdownText: 'The currently active locale for the record.',
853
873
  },
854
874
  location: {
855
875
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -859,7 +879,7 @@ export var manifest = {
859
879
  },
860
880
  item: {
861
881
  comment: {
862
- comment: 'If an already persisted record is being edited, returns the full record\nentity',
882
+ markdownText: 'If an already persisted record is being edited, returns the full record\nentity.',
863
883
  },
864
884
  location: {
865
885
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -869,7 +889,7 @@ export var manifest = {
869
889
  },
870
890
  itemType: {
871
891
  comment: {
872
- comment: 'The model for the record being edited',
892
+ markdownText: 'The model for the record being edited.',
873
893
  },
874
894
  location: {
875
895
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -879,7 +899,7 @@ export var manifest = {
879
899
  },
880
900
  formValues: {
881
901
  comment: {
882
- comment: 'The complete internal form state',
902
+ markdownText: 'The complete internal form state.',
883
903
  },
884
904
  location: {
885
905
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -889,7 +909,7 @@ export var manifest = {
889
909
  },
890
910
  itemStatus: {
891
911
  comment: {
892
- comment: 'The current status of the record being edited',
912
+ markdownText: 'The current status of the record being edited.',
893
913
  },
894
914
  location: {
895
915
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -899,7 +919,7 @@ export var manifest = {
899
919
  },
900
920
  isSubmitting: {
901
921
  comment: {
902
- comment: 'Whether the form is currently submitting itself or not',
922
+ markdownText: 'Whether the form is currently submitting itself or not.',
903
923
  },
904
924
  location: {
905
925
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -909,7 +929,7 @@ export var manifest = {
909
929
  },
910
930
  isFormDirty: {
911
931
  comment: {
912
- comment: 'Whether the form has some non-persisted changes or not',
932
+ markdownText: 'Whether the form has some non-persisted changes or not.',
913
933
  },
914
934
  location: {
915
935
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -919,13 +939,13 @@ export var manifest = {
919
939
  },
920
940
  blocksAnalysis: {
921
941
  comment: {
922
- comment: 'Current number of blocks present in form state',
942
+ markdownText: 'Provides information on how many blocks are currently present in the form.',
923
943
  },
924
944
  location: {
925
945
  filePath: 'src/ctx/commonExtras/itemForm.ts',
926
946
  lineNumber: 29,
927
947
  },
928
- type: '{\n usage: {\n /** Total number of blocks present in form state */\n total: number;\n /** Total number of blocks present in non-localized fields */\n nonLocalized: number;\n /** Total number of blocks present in localized fields, per locale */\n perLocale: Record<string, number>;\n };\n /** Maximum number of blocks per item */\n maximumPerItem: number;\n }',
948
+ type: 'BlocksAnalysis',
929
949
  },
930
950
  },
931
951
  },
@@ -933,7 +953,7 @@ export var manifest = {
933
953
  items: {
934
954
  itemFormOutletId: {
935
955
  comment: {
936
- comment: 'The ID of the outlet that needs to be rendered',
956
+ markdownText: 'The ID of the outlet that needs to be rendered.',
937
957
  },
938
958
  location: {
939
959
  filePath: 'src/hooks/renderItemFormOutlet.ts',
@@ -946,81 +966,85 @@ export var manifest = {
946
966
  ],
947
967
  additionalMethods: [
948
968
  {
969
+ name: 'ItemFormAdditionalMethods',
970
+ comment: {
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
+ },
949
973
  items: {
950
974
  toggleField: {
951
975
  comment: {
952
- comment: '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.',
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.',
953
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);",
954
978
  },
955
979
  location: {
956
980
  filePath: 'src/ctx/commonExtras/itemForm.ts',
957
- lineNumber: 65,
981
+ lineNumber: 68,
958
982
  },
959
983
  type: '(path: string, show: boolean) => Promise<void>',
960
984
  },
961
985
  disableField: {
962
986
  comment: {
963
- comment: 'Disables/re-enables a specific field in the form',
987
+ markdownText: 'Disables/re-enables a specific field in the form.',
964
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);",
965
989
  },
966
990
  location: {
967
991
  filePath: 'src/ctx/commonExtras/itemForm.ts',
968
- lineNumber: 80,
992
+ lineNumber: 83,
969
993
  },
970
994
  type: '(path: string, disable: boolean) => Promise<void>',
971
995
  },
972
996
  scrollToField: {
973
997
  comment: {
974
- comment: '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.',
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.',
975
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);",
976
1000
  },
977
1001
  location: {
978
1002
  filePath: 'src/ctx/commonExtras/itemForm.ts',
979
- lineNumber: 97,
1003
+ lineNumber: 100,
980
1004
  },
981
1005
  type: '(path: string, locale?: string) => Promise<void>',
982
1006
  },
983
1007
  setFieldValue: {
984
1008
  comment: {
985
- comment: 'Changes a specific path of the `formValues` object',
1009
+ markdownText: 'Changes a specific path of the `formValues` object.',
986
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');",
987
1011
  },
988
1012
  location: {
989
1013
  filePath: 'src/ctx/commonExtras/itemForm.ts',
990
- lineNumber: 112,
1014
+ lineNumber: 115,
991
1015
  },
992
1016
  type: '(path: string, value: unknown) => Promise<void>',
993
1017
  },
994
1018
  formValuesToItem: {
995
1019
  comment: {
996
- comment: '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`.',
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`.',
997
1021
  example: 'await ctx.formValuesToItem(ctx.formValues, false);',
998
1022
  },
999
1023
  location: {
1000
1024
  filePath: 'src/ctx/commonExtras/itemForm.ts',
1001
- lineNumber: 129,
1025
+ lineNumber: 132,
1002
1026
  },
1003
1027
  type: "(\n formValues: Record<string, unknown>,\n skipUnchangedFields?: boolean,\n ) => Promise<Omit<Item, 'id' | 'meta'> | undefined>",
1004
1028
  },
1005
1029
  itemToFormValues: {
1006
1030
  comment: {
1007
- comment: 'Takes an Item entity, and converts it into the internal form state',
1031
+ markdownText: 'Takes an Item entity, and converts it into the internal form state.',
1008
1032
  example: 'await ctx.itemToFormValues(ctx.item);',
1009
1033
  },
1010
1034
  location: {
1011
1035
  filePath: 'src/ctx/commonExtras/itemForm.ts',
1012
- lineNumber: 142,
1036
+ lineNumber: 145,
1013
1037
  },
1014
1038
  type: "(\n item: Omit<Item, 'id' | 'meta'>,\n ) => Promise<Record<string, unknown>>",
1015
1039
  },
1016
1040
  saveCurrentItem: {
1017
1041
  comment: {
1018
- comment: 'Triggers a submit form for current record',
1042
+ markdownText: 'Triggers a submit form for current record.',
1019
1043
  example: 'await ctx.saveCurrentItem();',
1020
1044
  },
1021
1045
  location: {
1022
1046
  filePath: 'src/ctx/commonExtras/itemForm.ts',
1023
- lineNumber: 154,
1047
+ lineNumber: 157,
1024
1048
  },
1025
1049
  type: '(showToast?: boolean) => Promise<void>',
1026
1050
  },
@@ -1037,7 +1061,7 @@ export var manifest = {
1037
1061
  renderItemCollectionOutlet: {
1038
1062
  name: 'renderItemCollectionOutlet',
1039
1063
  comment: {
1040
- comment: 'This function will be called when the plugin needs to render an outlet\ndefined by the `itemFormOutlets()` hook.',
1064
+ markdownText: 'This function will be called when the plugin needs to render an outlet\ndefined by the `itemFormOutlets()` hook.',
1041
1065
  tag: 'outlets',
1042
1066
  },
1043
1067
  nonCtxArguments: [
@@ -1053,7 +1077,7 @@ export var manifest = {
1053
1077
  items: {
1054
1078
  itemCollectionOutletId: {
1055
1079
  comment: {
1056
- comment: 'The ID of the outlet that needs to be rendered',
1080
+ markdownText: 'The ID of the outlet that needs to be rendered.',
1057
1081
  },
1058
1082
  location: {
1059
1083
  filePath: 'src/hooks/renderItemCollectionOutlet.ts',
@@ -1075,7 +1099,7 @@ export var manifest = {
1075
1099
  renderFieldExtension: {
1076
1100
  name: 'renderFieldExtension',
1077
1101
  comment: {
1078
- comment: 'This function will be called when the plugin needs to render a field\nextension (see the `manualFieldExtensions` and `overrideFieldExtensions`\nfunctions)',
1102
+ markdownText: 'This function will be called when the plugin needs to render a field\nextension (see the `manualFieldExtensions` and `overrideFieldExtensions`\nfunctions).',
1079
1103
  tag: 'forcedFieldExtensions',
1080
1104
  },
1081
1105
  nonCtxArguments: [
@@ -1088,10 +1112,14 @@ export var manifest = {
1088
1112
  type: 'SelfResizingPluginFrameCtx',
1089
1113
  additionalProperties: [
1090
1114
  {
1115
+ name: 'ItemFormAdditionalProperties',
1116
+ comment: {
1117
+ markdownText: "These information describe the current state of the form that's being shown\nto the end-user to edit a record.",
1118
+ },
1091
1119
  items: {
1092
1120
  locale: {
1093
1121
  comment: {
1094
- comment: 'The currently active locale for the record',
1122
+ markdownText: 'The currently active locale for the record.',
1095
1123
  },
1096
1124
  location: {
1097
1125
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -1101,7 +1129,7 @@ export var manifest = {
1101
1129
  },
1102
1130
  item: {
1103
1131
  comment: {
1104
- comment: 'If an already persisted record is being edited, returns the full record\nentity',
1132
+ markdownText: 'If an already persisted record is being edited, returns the full record\nentity.',
1105
1133
  },
1106
1134
  location: {
1107
1135
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -1111,7 +1139,7 @@ export var manifest = {
1111
1139
  },
1112
1140
  itemType: {
1113
1141
  comment: {
1114
- comment: 'The model for the record being edited',
1142
+ markdownText: 'The model for the record being edited.',
1115
1143
  },
1116
1144
  location: {
1117
1145
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -1121,7 +1149,7 @@ export var manifest = {
1121
1149
  },
1122
1150
  formValues: {
1123
1151
  comment: {
1124
- comment: 'The complete internal form state',
1152
+ markdownText: 'The complete internal form state.',
1125
1153
  },
1126
1154
  location: {
1127
1155
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -1131,7 +1159,7 @@ export var manifest = {
1131
1159
  },
1132
1160
  itemStatus: {
1133
1161
  comment: {
1134
- comment: 'The current status of the record being edited',
1162
+ markdownText: 'The current status of the record being edited.',
1135
1163
  },
1136
1164
  location: {
1137
1165
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -1141,7 +1169,7 @@ export var manifest = {
1141
1169
  },
1142
1170
  isSubmitting: {
1143
1171
  comment: {
1144
- comment: 'Whether the form is currently submitting itself or not',
1172
+ markdownText: 'Whether the form is currently submitting itself or not.',
1145
1173
  },
1146
1174
  location: {
1147
1175
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -1151,7 +1179,7 @@ export var manifest = {
1151
1179
  },
1152
1180
  isFormDirty: {
1153
1181
  comment: {
1154
- comment: 'Whether the form has some non-persisted changes or not',
1182
+ markdownText: 'Whether the form has some non-persisted changes or not.',
1155
1183
  },
1156
1184
  location: {
1157
1185
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -1161,65 +1189,69 @@ export var manifest = {
1161
1189
  },
1162
1190
  blocksAnalysis: {
1163
1191
  comment: {
1164
- comment: 'Current number of blocks present in form state',
1192
+ markdownText: 'Provides information on how many blocks are currently present in the form.',
1165
1193
  },
1166
1194
  location: {
1167
1195
  filePath: 'src/ctx/commonExtras/itemForm.ts',
1168
1196
  lineNumber: 29,
1169
1197
  },
1170
- type: '{\n usage: {\n /** Total number of blocks present in form state */\n total: number;\n /** Total number of blocks present in non-localized fields */\n nonLocalized: number;\n /** Total number of blocks present in localized fields, per locale */\n perLocale: Record<string, number>;\n };\n /** Maximum number of blocks per item */\n maximumPerItem: number;\n }',
1198
+ type: 'BlocksAnalysis',
1171
1199
  },
1172
1200
  },
1173
1201
  },
1174
1202
  {
1203
+ name: 'FieldAdditionalProperties',
1204
+ comment: {
1205
+ markdownText: 'These information describe the current state of the field where this plugin\nis applied to.',
1206
+ },
1175
1207
  items: {
1176
1208
  disabled: {
1177
1209
  comment: {
1178
- comment: 'Whether the field is currently disabled or not',
1210
+ markdownText: 'Whether the field is currently disabled or not.',
1179
1211
  },
1180
1212
  location: {
1181
1213
  filePath: 'src/ctx/commonExtras/field.ts',
1182
- lineNumber: 8,
1214
+ lineNumber: 12,
1183
1215
  },
1184
1216
  type: 'boolean',
1185
1217
  },
1186
1218
  fieldPath: {
1187
1219
  comment: {
1188
- comment: 'The path in the `formValues` object where to find the current value for the\nfield',
1220
+ markdownText: 'The path in the `formValues` object where to find the current value for the\nfield.',
1189
1221
  },
1190
1222
  location: {
1191
1223
  filePath: 'src/ctx/commonExtras/field.ts',
1192
- lineNumber: 13,
1224
+ lineNumber: 17,
1193
1225
  },
1194
1226
  type: 'string',
1195
1227
  },
1196
1228
  field: {
1197
1229
  comment: {
1198
- comment: 'The field where the field extension is installed to',
1230
+ markdownText: 'The field where the field extension is installed to.',
1199
1231
  },
1200
1232
  location: {
1201
1233
  filePath: 'src/ctx/commonExtras/field.ts',
1202
- lineNumber: 15,
1234
+ lineNumber: 19,
1203
1235
  },
1204
1236
  type: 'Field',
1205
1237
  },
1206
1238
  parentField: {
1207
1239
  comment: {
1208
- comment: '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',
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.',
1209
1241
  },
1210
1242
  location: {
1211
1243
  filePath: 'src/ctx/commonExtras/field.ts',
1212
- lineNumber: 20,
1244
+ lineNumber: 24,
1213
1245
  },
1214
1246
  type: 'Field | undefined',
1215
1247
  },
1216
1248
  block: {
1217
1249
  comment: {
1218
- comment: '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.',
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.',
1219
1251
  },
1220
1252
  location: {
1221
1253
  filePath: 'src/ctx/commonExtras/field.ts',
1222
- lineNumber: 26,
1254
+ lineNumber: 30,
1223
1255
  },
1224
1256
  type: 'undefined | { id: string | undefined; blockModel: ItemType }',
1225
1257
  },
@@ -1229,7 +1261,7 @@ export var manifest = {
1229
1261
  items: {
1230
1262
  fieldExtensionId: {
1231
1263
  comment: {
1232
- comment: 'The ID of the field extension that needs to be rendered',
1264
+ markdownText: 'The ID of the field extension that needs to be rendered.',
1233
1265
  },
1234
1266
  location: {
1235
1267
  filePath: 'src/hooks/renderFieldExtension.ts',
@@ -1239,7 +1271,7 @@ export var manifest = {
1239
1271
  },
1240
1272
  parameters: {
1241
1273
  comment: {
1242
- comment: 'The arbitrary `parameters` of the field extension',
1274
+ markdownText: 'The arbitrary `parameters` of the field extension.',
1243
1275
  },
1244
1276
  location: {
1245
1277
  filePath: 'src/hooks/renderFieldExtension.ts',
@@ -1252,81 +1284,85 @@ export var manifest = {
1252
1284
  ],
1253
1285
  additionalMethods: [
1254
1286
  {
1287
+ name: 'ItemFormAdditionalMethods',
1288
+ comment: {
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
+ },
1255
1291
  items: {
1256
1292
  toggleField: {
1257
1293
  comment: {
1258
- comment: '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.',
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.',
1259
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);",
1260
1296
  },
1261
1297
  location: {
1262
1298
  filePath: 'src/ctx/commonExtras/itemForm.ts',
1263
- lineNumber: 65,
1299
+ lineNumber: 68,
1264
1300
  },
1265
1301
  type: '(path: string, show: boolean) => Promise<void>',
1266
1302
  },
1267
1303
  disableField: {
1268
1304
  comment: {
1269
- comment: 'Disables/re-enables a specific field in the form',
1305
+ markdownText: 'Disables/re-enables a specific field in the form.',
1270
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);",
1271
1307
  },
1272
1308
  location: {
1273
1309
  filePath: 'src/ctx/commonExtras/itemForm.ts',
1274
- lineNumber: 80,
1310
+ lineNumber: 83,
1275
1311
  },
1276
1312
  type: '(path: string, disable: boolean) => Promise<void>',
1277
1313
  },
1278
1314
  scrollToField: {
1279
1315
  comment: {
1280
- comment: '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.',
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.',
1281
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);",
1282
1318
  },
1283
1319
  location: {
1284
1320
  filePath: 'src/ctx/commonExtras/itemForm.ts',
1285
- lineNumber: 97,
1321
+ lineNumber: 100,
1286
1322
  },
1287
1323
  type: '(path: string, locale?: string) => Promise<void>',
1288
1324
  },
1289
1325
  setFieldValue: {
1290
1326
  comment: {
1291
- comment: 'Changes a specific path of the `formValues` object',
1327
+ markdownText: 'Changes a specific path of the `formValues` object.',
1292
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');",
1293
1329
  },
1294
1330
  location: {
1295
1331
  filePath: 'src/ctx/commonExtras/itemForm.ts',
1296
- lineNumber: 112,
1332
+ lineNumber: 115,
1297
1333
  },
1298
1334
  type: '(path: string, value: unknown) => Promise<void>',
1299
1335
  },
1300
1336
  formValuesToItem: {
1301
1337
  comment: {
1302
- comment: '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`.',
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`.',
1303
1339
  example: 'await ctx.formValuesToItem(ctx.formValues, false);',
1304
1340
  },
1305
1341
  location: {
1306
1342
  filePath: 'src/ctx/commonExtras/itemForm.ts',
1307
- lineNumber: 129,
1343
+ lineNumber: 132,
1308
1344
  },
1309
1345
  type: "(\n formValues: Record<string, unknown>,\n skipUnchangedFields?: boolean,\n ) => Promise<Omit<Item, 'id' | 'meta'> | undefined>",
1310
1346
  },
1311
1347
  itemToFormValues: {
1312
1348
  comment: {
1313
- comment: 'Takes an Item entity, and converts it into the internal form state',
1349
+ markdownText: 'Takes an Item entity, and converts it into the internal form state.',
1314
1350
  example: 'await ctx.itemToFormValues(ctx.item);',
1315
1351
  },
1316
1352
  location: {
1317
1353
  filePath: 'src/ctx/commonExtras/itemForm.ts',
1318
- lineNumber: 142,
1354
+ lineNumber: 145,
1319
1355
  },
1320
1356
  type: "(\n item: Omit<Item, 'id' | 'meta'>,\n ) => Promise<Record<string, unknown>>",
1321
1357
  },
1322
1358
  saveCurrentItem: {
1323
1359
  comment: {
1324
- comment: 'Triggers a submit form for current record',
1360
+ markdownText: 'Triggers a submit form for current record.',
1325
1361
  example: 'await ctx.saveCurrentItem();',
1326
1362
  },
1327
1363
  location: {
1328
1364
  filePath: 'src/ctx/commonExtras/itemForm.ts',
1329
- lineNumber: 154,
1365
+ lineNumber: 157,
1330
1366
  },
1331
1367
  type: '(showToast?: boolean) => Promise<void>',
1332
1368
  },
@@ -1343,7 +1379,7 @@ export var manifest = {
1343
1379
  renderConfigScreen: {
1344
1380
  name: 'renderConfigScreen',
1345
1381
  comment: {
1346
- comment: "This function will be called when the plugin needs to render the plugin's\nconfiguration form",
1382
+ markdownText: "This function will be called when the plugin needs to render the plugin's\nconfiguration form.",
1347
1383
  tag: 'configScreen',
1348
1384
  },
1349
1385
  nonCtxArguments: [],
@@ -1361,7 +1397,7 @@ export var manifest = {
1361
1397
  renderAssetSource: {
1362
1398
  name: 'renderAssetSource',
1363
1399
  comment: {
1364
- comment: "This function will be called when the user selects one of the plugin's\nasset sources to upload a new media file.",
1400
+ markdownText: "This function will be called when the user selects one of the plugin's\nasset sources to upload a new media file.",
1365
1401
  tag: 'assetSources',
1366
1402
  },
1367
1403
  nonCtxArguments: [
@@ -1377,7 +1413,7 @@ export var manifest = {
1377
1413
  items: {
1378
1414
  assetSourceId: {
1379
1415
  comment: {
1380
- comment: 'The ID of the assetSource that needs to be rendered',
1416
+ markdownText: 'The ID of the assetSource that needs to be rendered.',
1381
1417
  },
1382
1418
  location: {
1383
1419
  filePath: 'src/hooks/renderAssetSource.ts',
@@ -1393,7 +1429,7 @@ export var manifest = {
1393
1429
  items: {
1394
1430
  select: {
1395
1431
  comment: {
1396
- comment: '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.',
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.',
1397
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});",
1398
1434
  },
1399
1435
  location: {
@@ -1415,7 +1451,7 @@ export var manifest = {
1415
1451
  overrideFieldExtensions: {
1416
1452
  name: 'overrideFieldExtensions',
1417
1453
  comment: {
1418
- comment: 'Use this function to automatically force one or more field extensions to a\nparticular field',
1454
+ markdownText: 'Use this function to automatically force one or more field extensions to a\nparticular field.',
1419
1455
  tag: 'forcedFieldExtensions',
1420
1456
  },
1421
1457
  nonCtxArguments: [
@@ -1450,7 +1486,7 @@ export var manifest = {
1450
1486
  onBoot: {
1451
1487
  name: 'onBoot',
1452
1488
  comment: {
1453
- comment: 'This function will be called once at boot time and can be used to perform\nie. some initial integrity checks on the configuration.',
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.',
1454
1490
  tag: 'boot',
1455
1491
  },
1456
1492
  nonCtxArguments: [],
@@ -1468,7 +1504,7 @@ export var manifest = {
1468
1504
  onBeforeItemsUnpublish: {
1469
1505
  name: 'onBeforeItemsUnpublish',
1470
1506
  comment: {
1471
- comment: 'This function will be called before unpublishing records. You can stop the\naction by returning `false`',
1507
+ markdownText: 'This function will be called before unpublishing records. You can stop the\naction by returning `false`.',
1472
1508
  tag: 'beforeHooks',
1473
1509
  },
1474
1510
  nonCtxArguments: [
@@ -1491,7 +1527,7 @@ export var manifest = {
1491
1527
  onBeforeItemsPublish: {
1492
1528
  name: 'onBeforeItemsPublish',
1493
1529
  comment: {
1494
- comment: 'This function will be called before publishing records. You can stop the\naction by returning `false`',
1530
+ markdownText: 'This function will be called before publishing records. You can stop the\naction by returning `false`.',
1495
1531
  tag: 'beforeHooks',
1496
1532
  },
1497
1533
  nonCtxArguments: [
@@ -1514,7 +1550,7 @@ export var manifest = {
1514
1550
  onBeforeItemsDestroy: {
1515
1551
  name: 'onBeforeItemsDestroy',
1516
1552
  comment: {
1517
- comment: 'This function will be called before destroying records. You can stop the\naction by returning `false`',
1553
+ markdownText: 'This function will be called before destroying records. You can stop the\naction by returning `false`.',
1518
1554
  tag: 'beforeHooks',
1519
1555
  },
1520
1556
  nonCtxArguments: [
@@ -1537,7 +1573,7 @@ export var manifest = {
1537
1573
  onBeforeItemUpsert: {
1538
1574
  name: 'onBeforeItemUpsert',
1539
1575
  comment: {
1540
- comment: 'This function will be called before saving a new version of a record. You\ncan stop the action by returning `false`',
1576
+ markdownText: 'This function will be called before saving a new version of a record. You\ncan stop the action by returning `false`.',
1541
1577
  tag: 'beforeHooks',
1542
1578
  },
1543
1579
  nonCtxArguments: [
@@ -1560,7 +1596,7 @@ export var manifest = {
1560
1596
  manualFieldExtensions: {
1561
1597
  name: 'manualFieldExtensions',
1562
1598
  comment: {
1563
- comment: 'Use this function to declare new field extensions that users will be able\nto install manually in some field',
1599
+ markdownText: 'Use this function to declare new field extensions that users will be able\nto install manually in some field.',
1564
1600
  tag: 'manualFieldExtensions',
1565
1601
  },
1566
1602
  nonCtxArguments: [],
@@ -1578,7 +1614,7 @@ export var manifest = {
1578
1614
  mainNavigationTabs: {
1579
1615
  name: 'mainNavigationTabs',
1580
1616
  comment: {
1581
- comment: 'Use this function to declare new tabs you want to add in the top-bar of the\nUI',
1617
+ markdownText: 'Use this function to declare new tabs you want to add in the top-bar of the\nUI.',
1582
1618
  tag: 'pages',
1583
1619
  },
1584
1620
  nonCtxArguments: [],
@@ -1596,7 +1632,7 @@ export var manifest = {
1596
1632
  itemsDropdownActions: {
1597
1633
  name: 'itemsDropdownActions',
1598
1634
  comment: {
1599
- comment: '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.',
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.',
1600
1636
  tag: 'dropdownActions',
1601
1637
  },
1602
1638
  nonCtxArguments: [
@@ -1631,7 +1667,7 @@ export var manifest = {
1631
1667
  itemFormSidebars: {
1632
1668
  name: 'itemFormSidebars',
1633
1669
  comment: {
1634
- comment: 'Use this function to declare new sidebar to be shown when the user edits\nrecords of a particular model',
1670
+ markdownText: 'Use this function to declare new sidebar to be shown when the user edits\nrecords of a particular model.',
1635
1671
  tag: 'sidebarPanels',
1636
1672
  },
1637
1673
  nonCtxArguments: [
@@ -1654,7 +1690,7 @@ export var manifest = {
1654
1690
  itemFormSidebarPanels: {
1655
1691
  name: 'itemFormSidebarPanels',
1656
1692
  comment: {
1657
- comment: 'Use this function to declare new sidebar panels to be shown when the user\nedits records of a particular model',
1693
+ markdownText: 'Use this function to declare new sidebar panels to be shown when the user\nedits records of a particular model.',
1658
1694
  tag: 'sidebarPanels',
1659
1695
  },
1660
1696
  nonCtxArguments: [
@@ -1677,7 +1713,7 @@ export var manifest = {
1677
1713
  itemFormOutlets: {
1678
1714
  name: 'itemFormOutlets',
1679
1715
  comment: {
1680
- comment: "Use this function to declare custom outlets to be shown at the top of the\nrecord's editing page",
1716
+ markdownText: "Use this function to declare custom outlets to be shown at the top of the\nrecord's editing page.",
1681
1717
  tag: 'outlets',
1682
1718
  },
1683
1719
  nonCtxArguments: [
@@ -1700,7 +1736,7 @@ export var manifest = {
1700
1736
  itemFormDropdownActions: {
1701
1737
  name: 'itemFormDropdownActions',
1702
1738
  comment: {
1703
- comment: '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.',
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.',
1704
1740
  tag: 'dropdownActions',
1705
1741
  },
1706
1742
  nonCtxArguments: [
@@ -1713,10 +1749,14 @@ export var manifest = {
1713
1749
  type: 'Ctx',
1714
1750
  additionalProperties: [
1715
1751
  {
1752
+ name: 'ItemFormAdditionalProperties',
1753
+ comment: {
1754
+ markdownText: "These information describe the current state of the form that's being shown\nto the end-user to edit a record.",
1755
+ },
1716
1756
  items: {
1717
1757
  locale: {
1718
1758
  comment: {
1719
- comment: 'The currently active locale for the record',
1759
+ markdownText: 'The currently active locale for the record.',
1720
1760
  },
1721
1761
  location: {
1722
1762
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -1726,7 +1766,7 @@ export var manifest = {
1726
1766
  },
1727
1767
  item: {
1728
1768
  comment: {
1729
- comment: 'If an already persisted record is being edited, returns the full record\nentity',
1769
+ markdownText: 'If an already persisted record is being edited, returns the full record\nentity.',
1730
1770
  },
1731
1771
  location: {
1732
1772
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -1736,7 +1776,7 @@ export var manifest = {
1736
1776
  },
1737
1777
  itemType: {
1738
1778
  comment: {
1739
- comment: 'The model for the record being edited',
1779
+ markdownText: 'The model for the record being edited.',
1740
1780
  },
1741
1781
  location: {
1742
1782
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -1746,7 +1786,7 @@ export var manifest = {
1746
1786
  },
1747
1787
  formValues: {
1748
1788
  comment: {
1749
- comment: 'The complete internal form state',
1789
+ markdownText: 'The complete internal form state.',
1750
1790
  },
1751
1791
  location: {
1752
1792
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -1756,7 +1796,7 @@ export var manifest = {
1756
1796
  },
1757
1797
  itemStatus: {
1758
1798
  comment: {
1759
- comment: 'The current status of the record being edited',
1799
+ markdownText: 'The current status of the record being edited.',
1760
1800
  },
1761
1801
  location: {
1762
1802
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -1766,7 +1806,7 @@ export var manifest = {
1766
1806
  },
1767
1807
  isSubmitting: {
1768
1808
  comment: {
1769
- comment: 'Whether the form is currently submitting itself or not',
1809
+ markdownText: 'Whether the form is currently submitting itself or not.',
1770
1810
  },
1771
1811
  location: {
1772
1812
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -1776,7 +1816,7 @@ export var manifest = {
1776
1816
  },
1777
1817
  isFormDirty: {
1778
1818
  comment: {
1779
- comment: 'Whether the form has some non-persisted changes or not',
1819
+ markdownText: 'Whether the form has some non-persisted changes or not.',
1780
1820
  },
1781
1821
  location: {
1782
1822
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -1786,13 +1826,13 @@ export var manifest = {
1786
1826
  },
1787
1827
  blocksAnalysis: {
1788
1828
  comment: {
1789
- comment: 'Current number of blocks present in form state',
1829
+ markdownText: 'Provides information on how many blocks are currently present in the form.',
1790
1830
  },
1791
1831
  location: {
1792
1832
  filePath: 'src/ctx/commonExtras/itemForm.ts',
1793
1833
  lineNumber: 29,
1794
1834
  },
1795
- type: '{\n usage: {\n /** Total number of blocks present in form state */\n total: number;\n /** Total number of blocks present in non-localized fields */\n nonLocalized: number;\n /** Total number of blocks present in localized fields, per locale */\n perLocale: Record<string, number>;\n };\n /** Maximum number of blocks per item */\n maximumPerItem: number;\n }',
1835
+ type: 'BlocksAnalysis',
1796
1836
  },
1797
1837
  },
1798
1838
  },
@@ -1808,7 +1848,7 @@ export var manifest = {
1808
1848
  itemCollectionOutlets: {
1809
1849
  name: 'itemCollectionOutlets',
1810
1850
  comment: {
1811
- comment: 'Use this function to declare custom outlets to be shown at the top of a\ncollection of records of a particular model',
1851
+ markdownText: 'Use this function to declare custom outlets to be shown at the top of a\ncollection of records of a particular model.',
1812
1852
  tag: 'outlets',
1813
1853
  },
1814
1854
  nonCtxArguments: [
@@ -1831,7 +1871,7 @@ export var manifest = {
1831
1871
  initialLocationQueryForItemSelector: {
1832
1872
  name: 'initialLocationQueryForItemSelector',
1833
1873
  comment: {
1834
- comment: 'Use this function to customize the initial filters when opening a record\nselector via a "Single link" or "Multiple links" field',
1874
+ markdownText: 'Use this function to customize the initial filters when opening a record\nselector via a "Single link" or "Multiple links" field.',
1835
1875
  tag: 'locationQuery',
1836
1876
  },
1837
1877
  nonCtxArguments: [
@@ -1858,7 +1898,7 @@ export var manifest = {
1858
1898
  fieldDropdownActions: {
1859
1899
  name: 'fieldDropdownActions',
1860
1900
  comment: {
1861
- comment: '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.',
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.',
1862
1902
  tag: 'dropdownActions',
1863
1903
  },
1864
1904
  nonCtxArguments: [
@@ -1871,10 +1911,14 @@ export var manifest = {
1871
1911
  type: 'Ctx',
1872
1912
  additionalProperties: [
1873
1913
  {
1914
+ name: 'ItemFormAdditionalProperties',
1915
+ comment: {
1916
+ markdownText: "These information describe the current state of the form that's being shown\nto the end-user to edit a record.",
1917
+ },
1874
1918
  items: {
1875
1919
  locale: {
1876
1920
  comment: {
1877
- comment: 'The currently active locale for the record',
1921
+ markdownText: 'The currently active locale for the record.',
1878
1922
  },
1879
1923
  location: {
1880
1924
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -1884,7 +1928,7 @@ export var manifest = {
1884
1928
  },
1885
1929
  item: {
1886
1930
  comment: {
1887
- comment: 'If an already persisted record is being edited, returns the full record\nentity',
1931
+ markdownText: 'If an already persisted record is being edited, returns the full record\nentity.',
1888
1932
  },
1889
1933
  location: {
1890
1934
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -1894,7 +1938,7 @@ export var manifest = {
1894
1938
  },
1895
1939
  itemType: {
1896
1940
  comment: {
1897
- comment: 'The model for the record being edited',
1941
+ markdownText: 'The model for the record being edited.',
1898
1942
  },
1899
1943
  location: {
1900
1944
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -1904,7 +1948,7 @@ export var manifest = {
1904
1948
  },
1905
1949
  formValues: {
1906
1950
  comment: {
1907
- comment: 'The complete internal form state',
1951
+ markdownText: 'The complete internal form state.',
1908
1952
  },
1909
1953
  location: {
1910
1954
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -1914,7 +1958,7 @@ export var manifest = {
1914
1958
  },
1915
1959
  itemStatus: {
1916
1960
  comment: {
1917
- comment: 'The current status of the record being edited',
1961
+ markdownText: 'The current status of the record being edited.',
1918
1962
  },
1919
1963
  location: {
1920
1964
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -1924,7 +1968,7 @@ export var manifest = {
1924
1968
  },
1925
1969
  isSubmitting: {
1926
1970
  comment: {
1927
- comment: 'Whether the form is currently submitting itself or not',
1971
+ markdownText: 'Whether the form is currently submitting itself or not.',
1928
1972
  },
1929
1973
  location: {
1930
1974
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -1934,7 +1978,7 @@ export var manifest = {
1934
1978
  },
1935
1979
  isFormDirty: {
1936
1980
  comment: {
1937
- comment: 'Whether the form has some non-persisted changes or not',
1981
+ markdownText: 'Whether the form has some non-persisted changes or not.',
1938
1982
  },
1939
1983
  location: {
1940
1984
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -1944,65 +1988,69 @@ export var manifest = {
1944
1988
  },
1945
1989
  blocksAnalysis: {
1946
1990
  comment: {
1947
- comment: 'Current number of blocks present in form state',
1991
+ markdownText: 'Provides information on how many blocks are currently present in the form.',
1948
1992
  },
1949
1993
  location: {
1950
1994
  filePath: 'src/ctx/commonExtras/itemForm.ts',
1951
1995
  lineNumber: 29,
1952
1996
  },
1953
- type: '{\n usage: {\n /** Total number of blocks present in form state */\n total: number;\n /** Total number of blocks present in non-localized fields */\n nonLocalized: number;\n /** Total number of blocks present in localized fields, per locale */\n perLocale: Record<string, number>;\n };\n /** Maximum number of blocks per item */\n maximumPerItem: number;\n }',
1997
+ type: 'BlocksAnalysis',
1954
1998
  },
1955
1999
  },
1956
2000
  },
1957
2001
  {
2002
+ name: 'FieldAdditionalProperties',
2003
+ comment: {
2004
+ markdownText: 'These information describe the current state of the field where this plugin\nis applied to.',
2005
+ },
1958
2006
  items: {
1959
2007
  disabled: {
1960
2008
  comment: {
1961
- comment: 'Whether the field is currently disabled or not',
2009
+ markdownText: 'Whether the field is currently disabled or not.',
1962
2010
  },
1963
2011
  location: {
1964
2012
  filePath: 'src/ctx/commonExtras/field.ts',
1965
- lineNumber: 8,
2013
+ lineNumber: 12,
1966
2014
  },
1967
2015
  type: 'boolean',
1968
2016
  },
1969
2017
  fieldPath: {
1970
2018
  comment: {
1971
- comment: 'The path in the `formValues` object where to find the current value for the\nfield',
2019
+ markdownText: 'The path in the `formValues` object where to find the current value for the\nfield.',
1972
2020
  },
1973
2021
  location: {
1974
2022
  filePath: 'src/ctx/commonExtras/field.ts',
1975
- lineNumber: 13,
2023
+ lineNumber: 17,
1976
2024
  },
1977
2025
  type: 'string',
1978
2026
  },
1979
2027
  field: {
1980
2028
  comment: {
1981
- comment: 'The field where the field extension is installed to',
2029
+ markdownText: 'The field where the field extension is installed to.',
1982
2030
  },
1983
2031
  location: {
1984
2032
  filePath: 'src/ctx/commonExtras/field.ts',
1985
- lineNumber: 15,
2033
+ lineNumber: 19,
1986
2034
  },
1987
2035
  type: 'Field',
1988
2036
  },
1989
2037
  parentField: {
1990
2038
  comment: {
1991
- comment: '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',
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.',
1992
2040
  },
1993
2041
  location: {
1994
2042
  filePath: 'src/ctx/commonExtras/field.ts',
1995
- lineNumber: 20,
2043
+ lineNumber: 24,
1996
2044
  },
1997
2045
  type: 'Field | undefined',
1998
2046
  },
1999
2047
  block: {
2000
2048
  comment: {
2001
- comment: '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.',
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.',
2002
2050
  },
2003
2051
  location: {
2004
2052
  filePath: 'src/ctx/commonExtras/field.ts',
2005
- lineNumber: 26,
2053
+ lineNumber: 30,
2006
2054
  },
2007
2055
  type: 'undefined | { id: string | undefined; blockModel: ItemType }',
2008
2056
  },
@@ -2020,7 +2068,7 @@ export var manifest = {
2020
2068
  executeUploadsDropdownAction: {
2021
2069
  name: 'executeUploadsDropdownAction',
2022
2070
  comment: {
2023
- comment: 'Use this function to execute a particular dropdown action defined via\nthe `uploadsDropdownActions()` hook.',
2071
+ markdownText: 'Use this function to execute a particular dropdown action defined via\nthe `uploadsDropdownActions()` hook.',
2024
2072
  tag: 'dropdownActions',
2025
2073
  },
2026
2074
  nonCtxArguments: [
@@ -2059,7 +2107,7 @@ export var manifest = {
2059
2107
  executeItemsDropdownAction: {
2060
2108
  name: 'executeItemsDropdownAction',
2061
2109
  comment: {
2062
- comment: 'Use this function to execute a particular dropdown action defined via\nthe `itemsDropdownActions()` hook.',
2110
+ markdownText: 'Use this function to execute a particular dropdown action defined via\nthe `itemsDropdownActions()` hook.',
2063
2111
  tag: 'dropdownActions',
2064
2112
  },
2065
2113
  nonCtxArguments: [
@@ -2098,7 +2146,7 @@ export var manifest = {
2098
2146
  executeItemFormDropdownAction: {
2099
2147
  name: 'executeItemFormDropdownAction',
2100
2148
  comment: {
2101
- comment: 'Use this function to execute a particular dropdown action defined via\nthe `itemFormDropdownActions()` hook.',
2149
+ markdownText: 'Use this function to execute a particular dropdown action defined via\nthe `itemFormDropdownActions()` hook.',
2102
2150
  tag: 'dropdownActions',
2103
2151
  },
2104
2152
  nonCtxArguments: [
@@ -2111,10 +2159,14 @@ export var manifest = {
2111
2159
  type: 'Ctx',
2112
2160
  additionalProperties: [
2113
2161
  {
2162
+ name: 'ItemFormAdditionalProperties',
2163
+ comment: {
2164
+ markdownText: "These information describe the current state of the form that's being shown\nto the end-user to edit a record.",
2165
+ },
2114
2166
  items: {
2115
2167
  locale: {
2116
2168
  comment: {
2117
- comment: 'The currently active locale for the record',
2169
+ markdownText: 'The currently active locale for the record.',
2118
2170
  },
2119
2171
  location: {
2120
2172
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -2124,7 +2176,7 @@ export var manifest = {
2124
2176
  },
2125
2177
  item: {
2126
2178
  comment: {
2127
- comment: 'If an already persisted record is being edited, returns the full record\nentity',
2179
+ markdownText: 'If an already persisted record is being edited, returns the full record\nentity.',
2128
2180
  },
2129
2181
  location: {
2130
2182
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -2134,7 +2186,7 @@ export var manifest = {
2134
2186
  },
2135
2187
  itemType: {
2136
2188
  comment: {
2137
- comment: 'The model for the record being edited',
2189
+ markdownText: 'The model for the record being edited.',
2138
2190
  },
2139
2191
  location: {
2140
2192
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -2144,7 +2196,7 @@ export var manifest = {
2144
2196
  },
2145
2197
  formValues: {
2146
2198
  comment: {
2147
- comment: 'The complete internal form state',
2199
+ markdownText: 'The complete internal form state.',
2148
2200
  },
2149
2201
  location: {
2150
2202
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -2154,7 +2206,7 @@ export var manifest = {
2154
2206
  },
2155
2207
  itemStatus: {
2156
2208
  comment: {
2157
- comment: 'The current status of the record being edited',
2209
+ markdownText: 'The current status of the record being edited.',
2158
2210
  },
2159
2211
  location: {
2160
2212
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -2164,7 +2216,7 @@ export var manifest = {
2164
2216
  },
2165
2217
  isSubmitting: {
2166
2218
  comment: {
2167
- comment: 'Whether the form is currently submitting itself or not',
2219
+ markdownText: 'Whether the form is currently submitting itself or not.',
2168
2220
  },
2169
2221
  location: {
2170
2222
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -2174,7 +2226,7 @@ export var manifest = {
2174
2226
  },
2175
2227
  isFormDirty: {
2176
2228
  comment: {
2177
- comment: 'Whether the form has some non-persisted changes or not',
2229
+ markdownText: 'Whether the form has some non-persisted changes or not.',
2178
2230
  },
2179
2231
  location: {
2180
2232
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -2184,13 +2236,13 @@ export var manifest = {
2184
2236
  },
2185
2237
  blocksAnalysis: {
2186
2238
  comment: {
2187
- comment: 'Current number of blocks present in form state',
2239
+ markdownText: 'Provides information on how many blocks are currently present in the form.',
2188
2240
  },
2189
2241
  location: {
2190
2242
  filePath: 'src/ctx/commonExtras/itemForm.ts',
2191
2243
  lineNumber: 29,
2192
2244
  },
2193
- type: '{\n usage: {\n /** Total number of blocks present in form state */\n total: number;\n /** Total number of blocks present in non-localized fields */\n nonLocalized: number;\n /** Total number of blocks present in localized fields, per locale */\n perLocale: Record<string, number>;\n };\n /** Maximum number of blocks per item */\n maximumPerItem: number;\n }',
2245
+ type: 'BlocksAnalysis',
2194
2246
  },
2195
2247
  },
2196
2248
  },
@@ -2208,81 +2260,85 @@ export var manifest = {
2208
2260
  ],
2209
2261
  additionalMethods: [
2210
2262
  {
2263
+ name: 'ItemFormAdditionalMethods',
2264
+ comment: {
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
+ },
2211
2267
  items: {
2212
2268
  toggleField: {
2213
2269
  comment: {
2214
- comment: '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.',
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.',
2215
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);",
2216
2272
  },
2217
2273
  location: {
2218
2274
  filePath: 'src/ctx/commonExtras/itemForm.ts',
2219
- lineNumber: 65,
2275
+ lineNumber: 68,
2220
2276
  },
2221
2277
  type: '(path: string, show: boolean) => Promise<void>',
2222
2278
  },
2223
2279
  disableField: {
2224
2280
  comment: {
2225
- comment: 'Disables/re-enables a specific field in the form',
2281
+ markdownText: 'Disables/re-enables a specific field in the form.',
2226
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);",
2227
2283
  },
2228
2284
  location: {
2229
2285
  filePath: 'src/ctx/commonExtras/itemForm.ts',
2230
- lineNumber: 80,
2286
+ lineNumber: 83,
2231
2287
  },
2232
2288
  type: '(path: string, disable: boolean) => Promise<void>',
2233
2289
  },
2234
2290
  scrollToField: {
2235
2291
  comment: {
2236
- comment: '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.',
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.',
2237
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);",
2238
2294
  },
2239
2295
  location: {
2240
2296
  filePath: 'src/ctx/commonExtras/itemForm.ts',
2241
- lineNumber: 97,
2297
+ lineNumber: 100,
2242
2298
  },
2243
2299
  type: '(path: string, locale?: string) => Promise<void>',
2244
2300
  },
2245
2301
  setFieldValue: {
2246
2302
  comment: {
2247
- comment: 'Changes a specific path of the `formValues` object',
2303
+ markdownText: 'Changes a specific path of the `formValues` object.',
2248
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');",
2249
2305
  },
2250
2306
  location: {
2251
2307
  filePath: 'src/ctx/commonExtras/itemForm.ts',
2252
- lineNumber: 112,
2308
+ lineNumber: 115,
2253
2309
  },
2254
2310
  type: '(path: string, value: unknown) => Promise<void>',
2255
2311
  },
2256
2312
  formValuesToItem: {
2257
2313
  comment: {
2258
- comment: '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`.',
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`.',
2259
2315
  example: 'await ctx.formValuesToItem(ctx.formValues, false);',
2260
2316
  },
2261
2317
  location: {
2262
2318
  filePath: 'src/ctx/commonExtras/itemForm.ts',
2263
- lineNumber: 129,
2319
+ lineNumber: 132,
2264
2320
  },
2265
2321
  type: "(\n formValues: Record<string, unknown>,\n skipUnchangedFields?: boolean,\n ) => Promise<Omit<Item, 'id' | 'meta'> | undefined>",
2266
2322
  },
2267
2323
  itemToFormValues: {
2268
2324
  comment: {
2269
- comment: 'Takes an Item entity, and converts it into the internal form state',
2325
+ markdownText: 'Takes an Item entity, and converts it into the internal form state.',
2270
2326
  example: 'await ctx.itemToFormValues(ctx.item);',
2271
2327
  },
2272
2328
  location: {
2273
2329
  filePath: 'src/ctx/commonExtras/itemForm.ts',
2274
- lineNumber: 142,
2330
+ lineNumber: 145,
2275
2331
  },
2276
2332
  type: "(\n item: Omit<Item, 'id' | 'meta'>,\n ) => Promise<Record<string, unknown>>",
2277
2333
  },
2278
2334
  saveCurrentItem: {
2279
2335
  comment: {
2280
- comment: 'Triggers a submit form for current record',
2336
+ markdownText: 'Triggers a submit form for current record.',
2281
2337
  example: 'await ctx.saveCurrentItem();',
2282
2338
  },
2283
2339
  location: {
2284
2340
  filePath: 'src/ctx/commonExtras/itemForm.ts',
2285
- lineNumber: 154,
2341
+ lineNumber: 157,
2286
2342
  },
2287
2343
  type: '(showToast?: boolean) => Promise<void>',
2288
2344
  },
@@ -2299,7 +2355,7 @@ export var manifest = {
2299
2355
  executeFieldDropdownAction: {
2300
2356
  name: 'executeFieldDropdownAction',
2301
2357
  comment: {
2302
- comment: 'Use this function to execute a particular dropdown action defined via\nthe `fieldDropdownActions()` hook.',
2358
+ markdownText: 'Use this function to execute a particular dropdown action defined via\nthe `fieldDropdownActions()` hook.',
2303
2359
  tag: 'dropdownActions',
2304
2360
  },
2305
2361
  nonCtxArguments: [
@@ -2312,10 +2368,14 @@ export var manifest = {
2312
2368
  type: 'Ctx',
2313
2369
  additionalProperties: [
2314
2370
  {
2371
+ name: 'ItemFormAdditionalProperties',
2372
+ comment: {
2373
+ markdownText: "These information describe the current state of the form that's being shown\nto the end-user to edit a record.",
2374
+ },
2315
2375
  items: {
2316
2376
  locale: {
2317
2377
  comment: {
2318
- comment: 'The currently active locale for the record',
2378
+ markdownText: 'The currently active locale for the record.',
2319
2379
  },
2320
2380
  location: {
2321
2381
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -2325,7 +2385,7 @@ export var manifest = {
2325
2385
  },
2326
2386
  item: {
2327
2387
  comment: {
2328
- comment: 'If an already persisted record is being edited, returns the full record\nentity',
2388
+ markdownText: 'If an already persisted record is being edited, returns the full record\nentity.',
2329
2389
  },
2330
2390
  location: {
2331
2391
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -2335,7 +2395,7 @@ export var manifest = {
2335
2395
  },
2336
2396
  itemType: {
2337
2397
  comment: {
2338
- comment: 'The model for the record being edited',
2398
+ markdownText: 'The model for the record being edited.',
2339
2399
  },
2340
2400
  location: {
2341
2401
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -2345,7 +2405,7 @@ export var manifest = {
2345
2405
  },
2346
2406
  formValues: {
2347
2407
  comment: {
2348
- comment: 'The complete internal form state',
2408
+ markdownText: 'The complete internal form state.',
2349
2409
  },
2350
2410
  location: {
2351
2411
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -2355,7 +2415,7 @@ export var manifest = {
2355
2415
  },
2356
2416
  itemStatus: {
2357
2417
  comment: {
2358
- comment: 'The current status of the record being edited',
2418
+ markdownText: 'The current status of the record being edited.',
2359
2419
  },
2360
2420
  location: {
2361
2421
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -2365,7 +2425,7 @@ export var manifest = {
2365
2425
  },
2366
2426
  isSubmitting: {
2367
2427
  comment: {
2368
- comment: 'Whether the form is currently submitting itself or not',
2428
+ markdownText: 'Whether the form is currently submitting itself or not.',
2369
2429
  },
2370
2430
  location: {
2371
2431
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -2375,7 +2435,7 @@ export var manifest = {
2375
2435
  },
2376
2436
  isFormDirty: {
2377
2437
  comment: {
2378
- comment: 'Whether the form has some non-persisted changes or not',
2438
+ markdownText: 'Whether the form has some non-persisted changes or not.',
2379
2439
  },
2380
2440
  location: {
2381
2441
  filePath: 'src/ctx/commonExtras/itemForm.ts',
@@ -2385,65 +2445,69 @@ export var manifest = {
2385
2445
  },
2386
2446
  blocksAnalysis: {
2387
2447
  comment: {
2388
- comment: 'Current number of blocks present in form state',
2448
+ markdownText: 'Provides information on how many blocks are currently present in the form.',
2389
2449
  },
2390
2450
  location: {
2391
2451
  filePath: 'src/ctx/commonExtras/itemForm.ts',
2392
2452
  lineNumber: 29,
2393
2453
  },
2394
- type: '{\n usage: {\n /** Total number of blocks present in form state */\n total: number;\n /** Total number of blocks present in non-localized fields */\n nonLocalized: number;\n /** Total number of blocks present in localized fields, per locale */\n perLocale: Record<string, number>;\n };\n /** Maximum number of blocks per item */\n maximumPerItem: number;\n }',
2454
+ type: 'BlocksAnalysis',
2395
2455
  },
2396
2456
  },
2397
2457
  },
2398
2458
  {
2459
+ name: 'FieldAdditionalProperties',
2460
+ comment: {
2461
+ markdownText: 'These information describe the current state of the field where this plugin\nis applied to.',
2462
+ },
2399
2463
  items: {
2400
2464
  disabled: {
2401
2465
  comment: {
2402
- comment: 'Whether the field is currently disabled or not',
2466
+ markdownText: 'Whether the field is currently disabled or not.',
2403
2467
  },
2404
2468
  location: {
2405
2469
  filePath: 'src/ctx/commonExtras/field.ts',
2406
- lineNumber: 8,
2470
+ lineNumber: 12,
2407
2471
  },
2408
2472
  type: 'boolean',
2409
2473
  },
2410
2474
  fieldPath: {
2411
2475
  comment: {
2412
- comment: 'The path in the `formValues` object where to find the current value for the\nfield',
2476
+ markdownText: 'The path in the `formValues` object where to find the current value for the\nfield.',
2413
2477
  },
2414
2478
  location: {
2415
2479
  filePath: 'src/ctx/commonExtras/field.ts',
2416
- lineNumber: 13,
2480
+ lineNumber: 17,
2417
2481
  },
2418
2482
  type: 'string',
2419
2483
  },
2420
2484
  field: {
2421
2485
  comment: {
2422
- comment: 'The field where the field extension is installed to',
2486
+ markdownText: 'The field where the field extension is installed to.',
2423
2487
  },
2424
2488
  location: {
2425
2489
  filePath: 'src/ctx/commonExtras/field.ts',
2426
- lineNumber: 15,
2490
+ lineNumber: 19,
2427
2491
  },
2428
2492
  type: 'Field',
2429
2493
  },
2430
2494
  parentField: {
2431
2495
  comment: {
2432
- comment: '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',
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.',
2433
2497
  },
2434
2498
  location: {
2435
2499
  filePath: 'src/ctx/commonExtras/field.ts',
2436
- lineNumber: 20,
2500
+ lineNumber: 24,
2437
2501
  },
2438
2502
  type: 'Field | undefined',
2439
2503
  },
2440
2504
  block: {
2441
2505
  comment: {
2442
- comment: '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.',
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.',
2443
2507
  },
2444
2508
  location: {
2445
2509
  filePath: 'src/ctx/commonExtras/field.ts',
2446
- lineNumber: 26,
2510
+ lineNumber: 30,
2447
2511
  },
2448
2512
  type: 'undefined | { id: string | undefined; blockModel: ItemType }',
2449
2513
  },
@@ -2463,81 +2527,85 @@ export var manifest = {
2463
2527
  ],
2464
2528
  additionalMethods: [
2465
2529
  {
2530
+ name: 'ItemFormAdditionalMethods',
2531
+ comment: {
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
+ },
2466
2534
  items: {
2467
2535
  toggleField: {
2468
2536
  comment: {
2469
- comment: '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.',
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.',
2470
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);",
2471
2539
  },
2472
2540
  location: {
2473
2541
  filePath: 'src/ctx/commonExtras/itemForm.ts',
2474
- lineNumber: 65,
2542
+ lineNumber: 68,
2475
2543
  },
2476
2544
  type: '(path: string, show: boolean) => Promise<void>',
2477
2545
  },
2478
2546
  disableField: {
2479
2547
  comment: {
2480
- comment: 'Disables/re-enables a specific field in the form',
2548
+ markdownText: 'Disables/re-enables a specific field in the form.',
2481
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);",
2482
2550
  },
2483
2551
  location: {
2484
2552
  filePath: 'src/ctx/commonExtras/itemForm.ts',
2485
- lineNumber: 80,
2553
+ lineNumber: 83,
2486
2554
  },
2487
2555
  type: '(path: string, disable: boolean) => Promise<void>',
2488
2556
  },
2489
2557
  scrollToField: {
2490
2558
  comment: {
2491
- comment: '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.',
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.',
2492
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);",
2493
2561
  },
2494
2562
  location: {
2495
2563
  filePath: 'src/ctx/commonExtras/itemForm.ts',
2496
- lineNumber: 97,
2564
+ lineNumber: 100,
2497
2565
  },
2498
2566
  type: '(path: string, locale?: string) => Promise<void>',
2499
2567
  },
2500
2568
  setFieldValue: {
2501
2569
  comment: {
2502
- comment: 'Changes a specific path of the `formValues` object',
2570
+ markdownText: 'Changes a specific path of the `formValues` object.',
2503
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');",
2504
2572
  },
2505
2573
  location: {
2506
2574
  filePath: 'src/ctx/commonExtras/itemForm.ts',
2507
- lineNumber: 112,
2575
+ lineNumber: 115,
2508
2576
  },
2509
2577
  type: '(path: string, value: unknown) => Promise<void>',
2510
2578
  },
2511
2579
  formValuesToItem: {
2512
2580
  comment: {
2513
- comment: '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`.',
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`.',
2514
2582
  example: 'await ctx.formValuesToItem(ctx.formValues, false);',
2515
2583
  },
2516
2584
  location: {
2517
2585
  filePath: 'src/ctx/commonExtras/itemForm.ts',
2518
- lineNumber: 129,
2586
+ lineNumber: 132,
2519
2587
  },
2520
2588
  type: "(\n formValues: Record<string, unknown>,\n skipUnchangedFields?: boolean,\n ) => Promise<Omit<Item, 'id' | 'meta'> | undefined>",
2521
2589
  },
2522
2590
  itemToFormValues: {
2523
2591
  comment: {
2524
- comment: 'Takes an Item entity, and converts it into the internal form state',
2592
+ markdownText: 'Takes an Item entity, and converts it into the internal form state.',
2525
2593
  example: 'await ctx.itemToFormValues(ctx.item);',
2526
2594
  },
2527
2595
  location: {
2528
2596
  filePath: 'src/ctx/commonExtras/itemForm.ts',
2529
- lineNumber: 142,
2597
+ lineNumber: 145,
2530
2598
  },
2531
2599
  type: "(\n item: Omit<Item, 'id' | 'meta'>,\n ) => Promise<Record<string, unknown>>",
2532
2600
  },
2533
2601
  saveCurrentItem: {
2534
2602
  comment: {
2535
- comment: 'Triggers a submit form for current record',
2603
+ markdownText: 'Triggers a submit form for current record.',
2536
2604
  example: 'await ctx.saveCurrentItem();',
2537
2605
  },
2538
2606
  location: {
2539
2607
  filePath: 'src/ctx/commonExtras/itemForm.ts',
2540
- lineNumber: 154,
2608
+ lineNumber: 157,
2541
2609
  },
2542
2610
  type: '(showToast?: boolean) => Promise<void>',
2543
2611
  },
@@ -2554,7 +2622,7 @@ export var manifest = {
2554
2622
  customMarksForStructuredTextField: {
2555
2623
  name: 'customMarksForStructuredTextField',
2556
2624
  comment: {
2557
- comment: 'Use this function to define a number of custom marks for a specific\nStructured Text field',
2625
+ markdownText: 'Use this function to define a number of custom marks for a specific\nStructured Text field.',
2558
2626
  tag: 'structuredText',
2559
2627
  },
2560
2628
  nonCtxArguments: [
@@ -2589,7 +2657,7 @@ export var manifest = {
2589
2657
  customBlockStylesForStructuredTextField: {
2590
2658
  name: 'customBlockStylesForStructuredTextField',
2591
2659
  comment: {
2592
- comment: 'Use this function to define a number of custom block styles for a specific\nStructured Text field',
2660
+ markdownText: 'Use this function to define a number of custom block styles for a specific\nStructured Text field.',
2593
2661
  tag: 'structuredText',
2594
2662
  },
2595
2663
  nonCtxArguments: [
@@ -2624,7 +2692,7 @@ export var manifest = {
2624
2692
  contentAreaSidebarItems: {
2625
2693
  name: 'contentAreaSidebarItems',
2626
2694
  comment: {
2627
- comment: 'Use this function to declare new items in the content area sidebar',
2695
+ markdownText: 'Use this function to declare new items in the content area sidebar.',
2628
2696
  tag: 'sidebarItems',
2629
2697
  },
2630
2698
  nonCtxArguments: [],
@@ -2642,7 +2710,7 @@ export var manifest = {
2642
2710
  buildItemPresentationInfo: {
2643
2711
  name: 'buildItemPresentationInfo',
2644
2712
  comment: {
2645
- comment: 'Use this function to customize the presentation of a record in records\ncollections and "Single link" or "Multiple links" field',
2713
+ markdownText: 'Use this function to customize the presentation of a record in records\ncollections and "Single link" or "Multiple links" field.',
2646
2714
  tag: 'presentation',
2647
2715
  },
2648
2716
  nonCtxArguments: [
@@ -2665,7 +2733,7 @@ export var manifest = {
2665
2733
  assetSources: {
2666
2734
  name: 'assetSources',
2667
2735
  comment: {
2668
- comment: 'Use this function to declare additional sources to be shown when users want\nto upload new assets',
2736
+ markdownText: 'Use this function to declare additional sources to be shown when users want\nto upload new assets.',
2669
2737
  tag: 'assetSources',
2670
2738
  },
2671
2739
  nonCtxArguments: [],
@@ -2686,12 +2754,12 @@ export var manifest = {
2686
2754
  {
2687
2755
  name: 'PluginProperties',
2688
2756
  comment: {
2689
- comment: "Information about the current plugin. Useful to access the plugin's global\nconfiguration object.",
2757
+ markdownText: "Information about the current plugin. Useful to access the plugin's global\nconfiguration object.",
2690
2758
  },
2691
2759
  items: {
2692
2760
  plugin: {
2693
2761
  comment: {
2694
- comment: 'The current plugin',
2762
+ markdownText: 'The current plugin.',
2695
2763
  },
2696
2764
  location: {
2697
2765
  filePath: 'src/ctx/base.ts',
@@ -2704,12 +2772,12 @@ export var manifest = {
2704
2772
  {
2705
2773
  name: 'AuthenticationProperties',
2706
2774
  comment: {
2707
- comment: 'Information about the current user using the CMS',
2775
+ markdownText: 'Information about the current user using the CMS.',
2708
2776
  },
2709
2777
  items: {
2710
2778
  currentUser: {
2711
2779
  comment: {
2712
- comment: 'The current DatoCMS user. It can either be the owner or one of the\ncollaborators (regular or SSO).',
2780
+ markdownText: 'The current DatoCMS user. It can either be the owner or one of the\ncollaborators (regular or SSO).',
2713
2781
  },
2714
2782
  location: {
2715
2783
  filePath: 'src/ctx/base.ts',
@@ -2719,7 +2787,7 @@ export var manifest = {
2719
2787
  },
2720
2788
  currentRole: {
2721
2789
  comment: {
2722
- comment: 'The role for the current DatoCMS user',
2790
+ markdownText: 'The role for the current DatoCMS user.',
2723
2791
  },
2724
2792
  location: {
2725
2793
  filePath: 'src/ctx/base.ts',
@@ -2729,7 +2797,7 @@ export var manifest = {
2729
2797
  },
2730
2798
  currentUserAccessToken: {
2731
2799
  comment: {
2732
- comment: 'The access token to perform API calls on behalf of the current user. Only\navailable if `currentUserAccessToken` additional permission is granted',
2800
+ markdownText: 'The access token to perform API calls on behalf of the current user. Only\navailable if `currentUserAccessToken` additional permission is granted.',
2733
2801
  },
2734
2802
  location: {
2735
2803
  filePath: 'src/ctx/base.ts',
@@ -2744,7 +2812,7 @@ export var manifest = {
2744
2812
  items: {
2745
2813
  site: {
2746
2814
  comment: {
2747
- comment: 'The current DatoCMS project',
2815
+ markdownText: 'The current DatoCMS project.',
2748
2816
  },
2749
2817
  location: {
2750
2818
  filePath: 'src/ctx/base.ts',
@@ -2754,7 +2822,7 @@ export var manifest = {
2754
2822
  },
2755
2823
  environment: {
2756
2824
  comment: {
2757
- comment: 'The ID of the current environment',
2825
+ markdownText: 'The ID of the current environment.',
2758
2826
  },
2759
2827
  location: {
2760
2828
  filePath: 'src/ctx/base.ts',
@@ -2764,7 +2832,7 @@ export var manifest = {
2764
2832
  },
2765
2833
  owner: {
2766
2834
  comment: {
2767
- comment: 'The account that is the project owner',
2835
+ markdownText: 'The account/organization that is the project owner.',
2768
2836
  },
2769
2837
  location: {
2770
2838
  filePath: 'src/ctx/base.ts',
@@ -2774,7 +2842,8 @@ export var manifest = {
2774
2842
  },
2775
2843
  account: {
2776
2844
  comment: {
2777
- comment: 'The account that is the project owner',
2845
+ markdownText: 'The account that is the project owner.',
2846
+ deprecatedMarkdownText: 'Please use `.owner` instead, as the project owner can also be\nan organization',
2778
2847
  },
2779
2848
  location: {
2780
2849
  filePath: 'src/ctx/base.ts',
@@ -2784,7 +2853,7 @@ export var manifest = {
2784
2853
  },
2785
2854
  ui: {
2786
2855
  comment: {
2787
- comment: 'UI preferences of the current user (right now, only the preferred locale is\navailable)',
2856
+ markdownText: 'UI preferences of the current user (right now, only the preferred locale is\navailable).',
2788
2857
  },
2789
2858
  location: {
2790
2859
  filePath: 'src/ctx/base.ts',
@@ -2794,7 +2863,7 @@ export var manifest = {
2794
2863
  },
2795
2864
  theme: {
2796
2865
  comment: {
2797
- comment: 'An object containing the theme colors for the current DatoCMS project',
2866
+ markdownText: 'An object containing the theme colors for the current DatoCMS project.',
2798
2867
  },
2799
2868
  location: {
2800
2869
  filePath: 'src/ctx/base.ts',
@@ -2807,12 +2876,12 @@ export var manifest = {
2807
2876
  {
2808
2877
  name: 'EntityReposProperties',
2809
2878
  comment: {
2810
- comment: '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
+ 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.',
2811
2880
  },
2812
2881
  items: {
2813
2882
  itemTypes: {
2814
2883
  comment: {
2815
- comment: 'All the models of the current DatoCMS project, indexed by ID',
2884
+ markdownText: 'All the models of the current DatoCMS project, indexed by ID.',
2816
2885
  },
2817
2886
  location: {
2818
2887
  filePath: 'src/ctx/base.ts',
@@ -2822,7 +2891,7 @@ export var manifest = {
2822
2891
  },
2823
2892
  fields: {
2824
2893
  comment: {
2825
- comment: '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
+ 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.',
2826
2895
  },
2827
2896
  location: {
2828
2897
  filePath: 'src/ctx/base.ts',
@@ -2832,7 +2901,7 @@ export var manifest = {
2832
2901
  },
2833
2902
  fieldsets: {
2834
2903
  comment: {
2835
- comment: '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
+ 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.',
2836
2905
  },
2837
2906
  location: {
2838
2907
  filePath: 'src/ctx/base.ts',
@@ -2842,7 +2911,7 @@ export var manifest = {
2842
2911
  },
2843
2912
  users: {
2844
2913
  comment: {
2845
- comment: '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
+ 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.',
2846
2915
  },
2847
2916
  location: {
2848
2917
  filePath: 'src/ctx/base.ts',
@@ -2852,7 +2921,7 @@ export var manifest = {
2852
2921
  },
2853
2922
  ssoUsers: {
2854
2923
  comment: {
2855
- comment: '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
+ 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.',
2856
2925
  },
2857
2926
  location: {
2858
2927
  filePath: 'src/ctx/base.ts',
@@ -2867,12 +2936,12 @@ export var manifest = {
2867
2936
  {
2868
2937
  name: 'LoadDataMethods',
2869
2938
  comment: {
2870
- comment: 'These methods can be used to asyncronously load additional information your\nplugin needs to work',
2939
+ markdownText: 'These methods can be used to asyncronously load additional information your\nplugin needs to work.',
2871
2940
  },
2872
2941
  items: {
2873
2942
  loadItemTypeFields: {
2874
2943
  comment: {
2875
- comment: '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
+ 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.',
2876
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);",
2877
2946
  },
2878
2947
  location: {
@@ -2883,7 +2952,7 @@ export var manifest = {
2883
2952
  },
2884
2953
  loadItemTypeFieldsets: {
2885
2954
  comment: {
2886
- comment: '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
+ 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.',
2887
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);",
2888
2957
  },
2889
2958
  location: {
@@ -2894,7 +2963,7 @@ export var manifest = {
2894
2963
  },
2895
2964
  loadFieldsUsingPlugin: {
2896
2965
  comment: {
2897
- comment: 'Loads all the fields in the project that are currently using the plugin for\none of its manual field extensions.',
2966
+ markdownText: 'Loads all the fields in the project that are currently using the plugin for\none of its manual field extensions.',
2898
2967
  example: "const fields = await ctx.loadFieldsUsingPlugin();\n\nctx.notice(\n `Success! ${fields\n .map((field) => field.attributes.api_key)\n .join(', ')}`,\n);",
2899
2968
  },
2900
2969
  location: {
@@ -2905,7 +2974,7 @@ export var manifest = {
2905
2974
  },
2906
2975
  loadUsers: {
2907
2976
  comment: {
2908
- comment: 'Loads all regular users. Users will be returned and will also be available\nin the the `users` property.',
2977
+ markdownText: 'Loads all regular users. Users will be returned and will also be available\nin the the `users` property.',
2909
2978
  example: "const users = await ctx.loadUsers();\n\nctx.notice(`Success! ${users.map((user) => user.id).join(', ')}`);",
2910
2979
  },
2911
2980
  location: {
@@ -2916,7 +2985,7 @@ export var manifest = {
2916
2985
  },
2917
2986
  loadSsoUsers: {
2918
2987
  comment: {
2919
- comment: 'Loads all SSO users. Users will be returned and will also be available in\nthe the `ssoUsers` property.',
2988
+ markdownText: 'Loads all SSO users. Users will be returned and will also be available in\nthe the `ssoUsers` property.',
2920
2989
  example: "const users = await ctx.loadSsoUsers();\n\nctx.notice(`Success! ${users.map((user) => user.id).join(', ')}`);",
2921
2990
  },
2922
2991
  location: {
@@ -2930,12 +2999,12 @@ export var manifest = {
2930
2999
  {
2931
3000
  name: 'UpdatePluginParametersMethods',
2932
3001
  comment: {
2933
- comment: 'These methods can be used to update both plugin parameters and manual field\nextensions configuration.',
3002
+ markdownText: 'These methods can be used to update both plugin parameters and manual field\nextensions configuration.',
2934
3003
  },
2935
3004
  items: {
2936
3005
  updatePluginParameters: {
2937
3006
  comment: {
2938
- comment: '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
+ 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.',
2939
3008
  example: "await ctx.updatePluginParameters({ debugMode: true });\nawait ctx.notice('Plugin parameters successfully updated!');",
2940
3009
  },
2941
3010
  location: {
@@ -2946,7 +3015,7 @@ export var manifest = {
2946
3015
  },
2947
3016
  updateFieldAppearance: {
2948
3017
  comment: {
2949
- comment: '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
+ 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.',
2950
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}",
2951
3020
  },
2952
3021
  location: {
@@ -2960,12 +3029,12 @@ export var manifest = {
2960
3029
  {
2961
3030
  name: 'ToastMethods',
2962
3031
  comment: {
2963
- comment: 'These methods can be used to show UI-consistent toast notifications to the\nend-user',
3032
+ markdownText: 'These methods can be used to show UI-consistent toast notifications to the\nend-user.',
2964
3033
  },
2965
3034
  items: {
2966
3035
  alert: {
2967
3036
  comment: {
2968
- comment: 'Triggers an "error" toast displaying the selected message',
3037
+ markdownText: 'Triggers an "error" toast displaying the selected message.',
2969
3038
  example: "const message = prompt(\n 'Please insert a message:',\n 'This is an alert message!',\n);\n\nawait ctx.alert(message);",
2970
3039
  },
2971
3040
  location: {
@@ -2976,7 +3045,7 @@ export var manifest = {
2976
3045
  },
2977
3046
  notice: {
2978
3047
  comment: {
2979
- comment: 'Triggers a "success" toast displaying the selected message',
3048
+ markdownText: 'Triggers a "success" toast displaying the selected message.',
2980
3049
  example: "const message = prompt(\n 'Please insert a message:',\n 'This is a notice message!',\n);\n\nawait ctx.notice(message);",
2981
3050
  },
2982
3051
  location: {
@@ -2987,7 +3056,7 @@ export var manifest = {
2987
3056
  },
2988
3057
  customToast: {
2989
3058
  comment: {
2990
- comment: 'Triggers a custom toast displaying the selected message (and optionally a\nCTA)',
3059
+ markdownText: 'Triggers a custom toast displaying the selected message (and optionally a\nCTA).',
2991
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}",
2992
3061
  },
2993
3062
  location: {
@@ -3001,12 +3070,12 @@ export var manifest = {
3001
3070
  {
3002
3071
  name: 'ItemDialogMethods',
3003
3072
  comment: {
3004
- comment: 'These methods let you open the standard DatoCMS dialogs needed to interact\nwith records',
3073
+ markdownText: 'These methods let you open the standard DatoCMS dialogs needed to interact\nwith records.',
3005
3074
  },
3006
3075
  items: {
3007
3076
  createNewItem: {
3008
3077
  comment: {
3009
- comment: '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
+ 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.',
3010
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}",
3011
3080
  },
3012
3081
  location: {
@@ -3017,7 +3086,7 @@ export var manifest = {
3017
3086
  },
3018
3087
  selectItem: {
3019
3088
  comment: {
3020
- comment: '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
+ 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.',
3021
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}",
3022
3091
  },
3023
3092
  location: {
@@ -3028,7 +3097,7 @@ export var manifest = {
3028
3097
  },
3029
3098
  editItem: {
3030
3099
  comment: {
3031
- comment: '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
+ 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.',
3032
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}",
3033
3102
  },
3034
3103
  location: {
@@ -3042,12 +3111,12 @@ export var manifest = {
3042
3111
  {
3043
3112
  name: 'UploadDialogMethods',
3044
3113
  comment: {
3045
- comment: 'These methods let you open the standard DatoCMS dialogs needed to interact\nwith Media Area assets',
3114
+ markdownText: 'These methods let you open the standard DatoCMS dialogs needed to interact\nwith Media Area assets.',
3046
3115
  },
3047
3116
  items: {
3048
3117
  selectUpload: {
3049
3118
  comment: {
3050
- comment: '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
+ 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.',
3051
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}",
3052
3121
  },
3053
3122
  location: {
@@ -3058,7 +3127,7 @@ export var manifest = {
3058
3127
  },
3059
3128
  editUpload: {
3060
3129
  comment: {
3061
- comment: '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
+ 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.',
3062
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}",
3063
3132
  },
3064
3133
  location: {
@@ -3069,7 +3138,7 @@ export var manifest = {
3069
3138
  },
3070
3139
  editUploadMetadata: {
3071
3140
  comment: {
3072
- comment: '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
+ 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.',
3073
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}",
3074
3143
  },
3075
3144
  location: {
@@ -3083,12 +3152,12 @@ export var manifest = {
3083
3152
  {
3084
3153
  name: 'CustomDialogMethods',
3085
3154
  comment: {
3086
- comment: 'These methods can be used to open custom dialogs/confirmation panels',
3155
+ markdownText: 'These methods can be used to open custom dialogs/confirmation panels.',
3087
3156
  },
3088
3157
  items: {
3089
3158
  openModal: {
3090
3159
  comment: {
3091
- comment: 'Opens a custom modal. Returns a promise resolved with what the modal itself\nreturns calling the `resolve()` function',
3160
+ markdownText: 'Opens a custom modal. Returns a promise resolved with what the modal itself\nreturns calling the `resolve()` function.',
3092
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}",
3093
3162
  },
3094
3163
  location: {
@@ -3099,7 +3168,7 @@ export var manifest = {
3099
3168
  },
3100
3169
  openConfirm: {
3101
3170
  comment: {
3102
- comment: 'Opens a UI-consistent confirmation dialog. Returns a promise resolved with\nthe value of the choice made by the user',
3171
+ markdownText: 'Opens a UI-consistent confirmation dialog. Returns a promise resolved with\nthe value of the choice made by the user.',
3103
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}",
3104
3173
  },
3105
3174
  location: {
@@ -3113,12 +3182,12 @@ export var manifest = {
3113
3182
  {
3114
3183
  name: 'NavigateMethods',
3115
3184
  comment: {
3116
- comment: 'These methods can be used to take the user to different pages',
3185
+ markdownText: 'These methods can be used to take the user to different pages.',
3117
3186
  },
3118
3187
  items: {
3119
3188
  navigateTo: {
3120
3189
  comment: {
3121
- comment: 'Moves the user to another URL internal to the backend',
3190
+ markdownText: 'Moves the user to another URL internal to the backend.',
3122
3191
  example: "await ctx.navigateTo('/');",
3123
3192
  },
3124
3193
  location: {
@@ -3132,34 +3201,38 @@ export var manifest = {
3132
3201
  ],
3133
3202
  },
3134
3203
  selfResizingPluginFrameCtxSizingUtilities: {
3204
+ name: 'SizingUtilities',
3205
+ comment: {
3206
+ markdownText: 'A number of methods that you can use to control the size of the plugin frame.',
3207
+ },
3135
3208
  items: {
3136
3209
  startAutoResizer: {
3137
3210
  comment: {
3138
- comment: "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
+ 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.",
3139
3212
  },
3140
3213
  location: {
3141
3214
  filePath: 'src/ctx/commonExtras/sizing.ts',
3142
- lineNumber: 7,
3215
+ lineNumber: 8,
3143
3216
  },
3144
3217
  type: '() => void',
3145
3218
  },
3146
3219
  stopAutoResizer: {
3147
3220
  comment: {
3148
- comment: 'Stops resizing the iframe automatically',
3221
+ markdownText: 'Stops resizing the iframe automatically.',
3149
3222
  },
3150
3223
  location: {
3151
3224
  filePath: 'src/ctx/commonExtras/sizing.ts',
3152
- lineNumber: 10,
3225
+ lineNumber: 11,
3153
3226
  },
3154
3227
  type: '() => void',
3155
3228
  },
3156
3229
  updateHeight: {
3157
3230
  comment: {
3158
- comment: "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
+ 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.",
3159
3232
  },
3160
3233
  location: {
3161
3234
  filePath: 'src/ctx/commonExtras/sizing.ts',
3162
- lineNumber: 17,
3235
+ lineNumber: 18,
3163
3236
  },
3164
3237
  type: '(newHeight?: number) => void',
3165
3238
  },