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.
- package/dist/cjs/manifest.js +376 -303
- package/dist/cjs/manifest.js.map +1 -1
- package/dist/esm/ctx/base.d.ts +1 -1
- package/dist/esm/ctx/commonExtras/field.d.ts +4 -0
- package/dist/esm/ctx/commonExtras/itemForm.d.ts +14 -12
- package/dist/esm/ctx/commonExtras/sizing.d.ts +1 -0
- package/dist/esm/hooks/renderItemFormSidebar.d.ts +1 -1
- package/dist/esm/hooks/renderItemFormSidebarPanel.d.ts +1 -1
- package/dist/esm/hooks/renderManualFieldExtensionConfigScreen.d.ts +2 -2
- package/dist/esm/hooks/renderModal.d.ts +1 -1
- package/dist/esm/hooks/renderUploadSidebar.d.ts +1 -1
- package/dist/esm/hooks/renderUploadSidebarPanel.d.ts +1 -1
- package/dist/esm/manifest.js +376 -303
- package/dist/esm/manifest.js.map +1 -1
- package/dist/esm/manifestTypes.d.ts +39 -91
- package/dist/types/ctx/base.d.ts +1 -1
- package/dist/types/ctx/commonExtras/field.d.ts +4 -0
- package/dist/types/ctx/commonExtras/itemForm.d.ts +14 -12
- package/dist/types/ctx/commonExtras/sizing.d.ts +1 -0
- package/dist/types/hooks/renderItemFormSidebar.d.ts +1 -1
- package/dist/types/hooks/renderItemFormSidebarPanel.d.ts +1 -1
- package/dist/types/hooks/renderManualFieldExtensionConfigScreen.d.ts +2 -2
- package/dist/types/hooks/renderModal.d.ts +1 -1
- package/dist/types/hooks/renderUploadSidebar.d.ts +1 -1
- package/dist/types/hooks/renderUploadSidebarPanel.d.ts +1 -1
- package/dist/types/manifestTypes.d.ts +39 -91
- package/manifest.json +376 -303
- package/package.json +2 -2
- package/src/ctx/base.ts +1 -1
- package/src/ctx/commonExtras/field.ts +4 -0
- package/src/ctx/commonExtras/itemForm.ts +15 -12
- package/src/ctx/commonExtras/sizing.ts +1 -0
- package/src/hooks/renderItemFormSidebar.ts +1 -1
- package/src/hooks/renderItemFormSidebarPanel.ts +1 -1
- package/src/hooks/renderManualFieldExtensionConfigScreen.ts +2 -2
- package/src/hooks/renderModal.ts +1 -1
- package/src/hooks/renderUploadSidebar.ts +1 -1
- package/src/hooks/renderUploadSidebarPanel.ts +1 -1
- package/src/manifest.ts +533 -401
- package/src/manifestTypes.ts +39 -91
package/dist/cjs/manifest.js
CHANGED
|
@@ -6,7 +6,7 @@ exports.manifest = {
|
|
|
6
6
|
validateManualFieldExtensionParameters: {
|
|
7
7
|
name: 'validateManualFieldExtensionParameters',
|
|
8
8
|
comment: {
|
|
9
|
-
|
|
9
|
+
markdownText: 'This function will be called each time the configuration object changes. It\nmust return an object containing possible validation errors.',
|
|
10
10
|
tag: 'manualFieldExtensions',
|
|
11
11
|
},
|
|
12
12
|
nonCtxArguments: [
|
|
@@ -28,7 +28,7 @@ exports.manifest = {
|
|
|
28
28
|
uploadsDropdownActions: {
|
|
29
29
|
name: 'uploadsDropdownActions',
|
|
30
30
|
comment: {
|
|
31
|
-
|
|
31
|
+
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.',
|
|
32
32
|
tag: 'dropdownActions',
|
|
33
33
|
},
|
|
34
34
|
nonCtxArguments: [],
|
|
@@ -46,7 +46,7 @@ exports.manifest = {
|
|
|
46
46
|
uploadSidebars: {
|
|
47
47
|
name: 'uploadSidebars',
|
|
48
48
|
comment: {
|
|
49
|
-
|
|
49
|
+
markdownText: 'Use this function to declare new sidebar to be shown when the user opens\nup an asset in the Media Area.',
|
|
50
50
|
tag: 'sidebarPanels',
|
|
51
51
|
},
|
|
52
52
|
nonCtxArguments: [],
|
|
@@ -64,7 +64,7 @@ exports.manifest = {
|
|
|
64
64
|
uploadSidebarPanels: {
|
|
65
65
|
name: 'uploadSidebarPanels',
|
|
66
66
|
comment: {
|
|
67
|
-
|
|
67
|
+
markdownText: 'Use this function to declare new sidebar panels to be shown when the user\nopens up an asset in the Media Area.',
|
|
68
68
|
tag: 'sidebarPanels',
|
|
69
69
|
},
|
|
70
70
|
nonCtxArguments: [],
|
|
@@ -82,7 +82,7 @@ exports.manifest = {
|
|
|
82
82
|
settingsAreaSidebarItemGroups: {
|
|
83
83
|
name: 'settingsAreaSidebarItemGroups',
|
|
84
84
|
comment: {
|
|
85
|
-
|
|
85
|
+
markdownText: 'Use this function to declare new navigation sections in the Settings Area\nsidebar.',
|
|
86
86
|
tag: 'pages',
|
|
87
87
|
},
|
|
88
88
|
nonCtxArguments: [],
|
|
@@ -100,7 +100,7 @@ exports.manifest = {
|
|
|
100
100
|
renderUploadSidebarPanel: {
|
|
101
101
|
name: 'renderUploadSidebarPanel',
|
|
102
102
|
comment: {
|
|
103
|
-
|
|
103
|
+
markdownText: 'This function will be called when the plugin needs to render a sidebar panel\n(see the `uploadSidebarPanels` hook).',
|
|
104
104
|
tag: 'sidebarPanels',
|
|
105
105
|
},
|
|
106
106
|
nonCtxArguments: [
|
|
@@ -116,7 +116,7 @@ exports.manifest = {
|
|
|
116
116
|
items: {
|
|
117
117
|
sidebarPaneId: {
|
|
118
118
|
comment: {
|
|
119
|
-
|
|
119
|
+
markdownText: 'The ID of the sidebar panel that needs to be rendered.',
|
|
120
120
|
},
|
|
121
121
|
location: {
|
|
122
122
|
filePath: 'src/hooks/renderUploadSidebarPanel.ts',
|
|
@@ -126,7 +126,7 @@ exports.manifest = {
|
|
|
126
126
|
},
|
|
127
127
|
parameters: {
|
|
128
128
|
comment: {
|
|
129
|
-
|
|
129
|
+
markdownText: 'The arbitrary `parameters` of the panel declared in the\n`uploadSidebarPanels` function.',
|
|
130
130
|
},
|
|
131
131
|
location: {
|
|
132
132
|
filePath: 'src/hooks/renderUploadSidebarPanel.ts',
|
|
@@ -136,7 +136,7 @@ exports.manifest = {
|
|
|
136
136
|
},
|
|
137
137
|
upload: {
|
|
138
138
|
comment: {
|
|
139
|
-
|
|
139
|
+
markdownText: 'The active asset.',
|
|
140
140
|
},
|
|
141
141
|
location: {
|
|
142
142
|
filePath: 'src/hooks/renderUploadSidebarPanel.ts',
|
|
@@ -158,7 +158,7 @@ exports.manifest = {
|
|
|
158
158
|
renderUploadSidebar: {
|
|
159
159
|
name: 'renderUploadSidebar',
|
|
160
160
|
comment: {
|
|
161
|
-
|
|
161
|
+
markdownText: 'This function will be called when the plugin needs to render a sidebar (see\nthe `uploadSidebars` hook).',
|
|
162
162
|
tag: 'sidebarPanels',
|
|
163
163
|
},
|
|
164
164
|
nonCtxArguments: [
|
|
@@ -174,7 +174,7 @@ exports.manifest = {
|
|
|
174
174
|
items: {
|
|
175
175
|
sidebarId: {
|
|
176
176
|
comment: {
|
|
177
|
-
|
|
177
|
+
markdownText: 'The ID of the sidebar that needs to be rendered.',
|
|
178
178
|
},
|
|
179
179
|
location: {
|
|
180
180
|
filePath: 'src/hooks/renderUploadSidebar.ts',
|
|
@@ -184,7 +184,7 @@ exports.manifest = {
|
|
|
184
184
|
},
|
|
185
185
|
parameters: {
|
|
186
186
|
comment: {
|
|
187
|
-
|
|
187
|
+
markdownText: 'The arbitrary `parameters` of the declared in the `uploadSidebars`\nfunction.',
|
|
188
188
|
},
|
|
189
189
|
location: {
|
|
190
190
|
filePath: 'src/hooks/renderUploadSidebar.ts',
|
|
@@ -194,7 +194,7 @@ exports.manifest = {
|
|
|
194
194
|
},
|
|
195
195
|
upload: {
|
|
196
196
|
comment: {
|
|
197
|
-
|
|
197
|
+
markdownText: 'The active asset.',
|
|
198
198
|
},
|
|
199
199
|
location: {
|
|
200
200
|
filePath: 'src/hooks/renderUploadSidebar.ts',
|
|
@@ -216,7 +216,7 @@ exports.manifest = {
|
|
|
216
216
|
renderPage: {
|
|
217
217
|
name: 'renderPage',
|
|
218
218
|
comment: {
|
|
219
|
-
|
|
219
|
+
markdownText: 'This function will be called when the plugin needs to render a specific\npage (see the `mainNavigationTabs`, `settingsAreaSidebarItemGroups` and\n`contentAreaSidebarItems` functions).',
|
|
220
220
|
tag: 'pages',
|
|
221
221
|
},
|
|
222
222
|
nonCtxArguments: [
|
|
@@ -232,7 +232,7 @@ exports.manifest = {
|
|
|
232
232
|
items: {
|
|
233
233
|
pageId: {
|
|
234
234
|
comment: {
|
|
235
|
-
|
|
235
|
+
markdownText: 'The ID of the page that needs to be rendered.',
|
|
236
236
|
},
|
|
237
237
|
location: {
|
|
238
238
|
filePath: 'src/hooks/renderPage.ts',
|
|
@@ -254,7 +254,7 @@ exports.manifest = {
|
|
|
254
254
|
renderModal: {
|
|
255
255
|
name: 'renderModal',
|
|
256
256
|
comment: {
|
|
257
|
-
|
|
257
|
+
markdownText: 'This function will be called when the plugin requested to open a modal (see\nthe `openModal` hook).',
|
|
258
258
|
tag: 'modals',
|
|
259
259
|
},
|
|
260
260
|
nonCtxArguments: [
|
|
@@ -270,7 +270,7 @@ exports.manifest = {
|
|
|
270
270
|
items: {
|
|
271
271
|
modalId: {
|
|
272
272
|
comment: {
|
|
273
|
-
|
|
273
|
+
markdownText: 'The ID of the modal that needs to be rendered.',
|
|
274
274
|
},
|
|
275
275
|
location: {
|
|
276
276
|
filePath: 'src/hooks/renderModal.ts',
|
|
@@ -280,7 +280,7 @@ exports.manifest = {
|
|
|
280
280
|
},
|
|
281
281
|
parameters: {
|
|
282
282
|
comment: {
|
|
283
|
-
|
|
283
|
+
markdownText: 'The arbitrary `parameters` of the modal declared in the `openModal`\nfunction.',
|
|
284
284
|
},
|
|
285
285
|
location: {
|
|
286
286
|
filePath: 'src/hooks/renderModal.ts',
|
|
@@ -296,7 +296,7 @@ exports.manifest = {
|
|
|
296
296
|
items: {
|
|
297
297
|
resolve: {
|
|
298
298
|
comment: {
|
|
299
|
-
|
|
299
|
+
markdownText: 'A function to be called by the plugin to close the modal. The `openModal`\ncall will be resolved with the passed return value.',
|
|
300
300
|
example: "const returnValue = prompt(\n 'Please specify the value to return to the caller:',\n 'success',\n);\n\nawait ctx.resolve(returnValue);",
|
|
301
301
|
},
|
|
302
302
|
location: {
|
|
@@ -330,7 +330,7 @@ exports.manifest = {
|
|
|
330
330
|
items: {
|
|
331
331
|
fieldExtensionId: {
|
|
332
332
|
comment: {
|
|
333
|
-
|
|
333
|
+
markdownText: 'The ID of the field extension for which we need to render the parameters\nform.',
|
|
334
334
|
},
|
|
335
335
|
location: {
|
|
336
336
|
filePath: 'src/hooks/renderManualFieldExtensionConfigScreen.ts',
|
|
@@ -340,7 +340,7 @@ exports.manifest = {
|
|
|
340
340
|
},
|
|
341
341
|
parameters: {
|
|
342
342
|
comment: {
|
|
343
|
-
|
|
343
|
+
markdownText: 'The current value of the parameters (you can change the value with the\n`setParameters` hook).',
|
|
344
344
|
},
|
|
345
345
|
location: {
|
|
346
346
|
filePath: 'src/hooks/renderManualFieldExtensionConfigScreen.ts',
|
|
@@ -350,7 +350,7 @@ exports.manifest = {
|
|
|
350
350
|
},
|
|
351
351
|
errors: {
|
|
352
352
|
comment: {
|
|
353
|
-
|
|
353
|
+
markdownText: 'The current validation errors for the parameters (you can set them\nimplementing the `validateManualFieldExtensionParameters` hook).',
|
|
354
354
|
},
|
|
355
355
|
location: {
|
|
356
356
|
filePath: 'src/hooks/renderManualFieldExtensionConfigScreen.ts',
|
|
@@ -360,7 +360,7 @@ exports.manifest = {
|
|
|
360
360
|
},
|
|
361
361
|
pendingField: {
|
|
362
362
|
comment: {
|
|
363
|
-
|
|
363
|
+
markdownText: 'The field entity that is being edited in the form.',
|
|
364
364
|
},
|
|
365
365
|
location: {
|
|
366
366
|
filePath: 'src/hooks/renderManualFieldExtensionConfigScreen.ts',
|
|
@@ -370,7 +370,7 @@ exports.manifest = {
|
|
|
370
370
|
},
|
|
371
371
|
itemType: {
|
|
372
372
|
comment: {
|
|
373
|
-
|
|
373
|
+
markdownText: 'The model for the field being edited.',
|
|
374
374
|
},
|
|
375
375
|
location: {
|
|
376
376
|
filePath: 'src/hooks/renderManualFieldExtensionConfigScreen.ts',
|
|
@@ -386,7 +386,7 @@ exports.manifest = {
|
|
|
386
386
|
items: {
|
|
387
387
|
setParameters: {
|
|
388
388
|
comment: {
|
|
389
|
-
|
|
389
|
+
markdownText: 'Sets a new value for the parameters.',
|
|
390
390
|
example: "await ctx.setParameters({ color: '#ff0000' });",
|
|
391
391
|
},
|
|
392
392
|
location: {
|
|
@@ -408,7 +408,7 @@ exports.manifest = {
|
|
|
408
408
|
renderItemFormSidebarPanel: {
|
|
409
409
|
name: 'renderItemFormSidebarPanel',
|
|
410
410
|
comment: {
|
|
411
|
-
|
|
411
|
+
markdownText: 'This function will be called when the plugin needs to render a sidebar panel\n(see the `itemFormSidebarPanels` hook).',
|
|
412
412
|
tag: 'sidebarPanels',
|
|
413
413
|
},
|
|
414
414
|
nonCtxArguments: [
|
|
@@ -421,10 +421,14 @@ exports.manifest = {
|
|
|
421
421
|
type: 'SelfResizingPluginFrameCtx',
|
|
422
422
|
additionalProperties: [
|
|
423
423
|
{
|
|
424
|
+
name: 'ItemFormAdditionalProperties',
|
|
425
|
+
comment: {
|
|
426
|
+
markdownText: "These information describe the current state of the form that's being shown\nto the end-user to edit a record.",
|
|
427
|
+
},
|
|
424
428
|
items: {
|
|
425
429
|
locale: {
|
|
426
430
|
comment: {
|
|
427
|
-
|
|
431
|
+
markdownText: 'The currently active locale for the record.',
|
|
428
432
|
},
|
|
429
433
|
location: {
|
|
430
434
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -434,7 +438,7 @@ exports.manifest = {
|
|
|
434
438
|
},
|
|
435
439
|
item: {
|
|
436
440
|
comment: {
|
|
437
|
-
|
|
441
|
+
markdownText: 'If an already persisted record is being edited, returns the full record\nentity.',
|
|
438
442
|
},
|
|
439
443
|
location: {
|
|
440
444
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -444,7 +448,7 @@ exports.manifest = {
|
|
|
444
448
|
},
|
|
445
449
|
itemType: {
|
|
446
450
|
comment: {
|
|
447
|
-
|
|
451
|
+
markdownText: 'The model for the record being edited.',
|
|
448
452
|
},
|
|
449
453
|
location: {
|
|
450
454
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -454,7 +458,7 @@ exports.manifest = {
|
|
|
454
458
|
},
|
|
455
459
|
formValues: {
|
|
456
460
|
comment: {
|
|
457
|
-
|
|
461
|
+
markdownText: 'The complete internal form state.',
|
|
458
462
|
},
|
|
459
463
|
location: {
|
|
460
464
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -464,7 +468,7 @@ exports.manifest = {
|
|
|
464
468
|
},
|
|
465
469
|
itemStatus: {
|
|
466
470
|
comment: {
|
|
467
|
-
|
|
471
|
+
markdownText: 'The current status of the record being edited.',
|
|
468
472
|
},
|
|
469
473
|
location: {
|
|
470
474
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -474,7 +478,7 @@ exports.manifest = {
|
|
|
474
478
|
},
|
|
475
479
|
isSubmitting: {
|
|
476
480
|
comment: {
|
|
477
|
-
|
|
481
|
+
markdownText: 'Whether the form is currently submitting itself or not.',
|
|
478
482
|
},
|
|
479
483
|
location: {
|
|
480
484
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -484,7 +488,7 @@ exports.manifest = {
|
|
|
484
488
|
},
|
|
485
489
|
isFormDirty: {
|
|
486
490
|
comment: {
|
|
487
|
-
|
|
491
|
+
markdownText: 'Whether the form has some non-persisted changes or not.',
|
|
488
492
|
},
|
|
489
493
|
location: {
|
|
490
494
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -494,13 +498,13 @@ exports.manifest = {
|
|
|
494
498
|
},
|
|
495
499
|
blocksAnalysis: {
|
|
496
500
|
comment: {
|
|
497
|
-
|
|
501
|
+
markdownText: 'Provides information on how many blocks are currently present in the form.',
|
|
498
502
|
},
|
|
499
503
|
location: {
|
|
500
504
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
501
505
|
lineNumber: 29,
|
|
502
506
|
},
|
|
503
|
-
type: '
|
|
507
|
+
type: 'BlocksAnalysis',
|
|
504
508
|
},
|
|
505
509
|
},
|
|
506
510
|
},
|
|
@@ -508,7 +512,7 @@ exports.manifest = {
|
|
|
508
512
|
items: {
|
|
509
513
|
sidebarPaneId: {
|
|
510
514
|
comment: {
|
|
511
|
-
|
|
515
|
+
markdownText: 'The ID of the sidebar panel that needs to be rendered.',
|
|
512
516
|
},
|
|
513
517
|
location: {
|
|
514
518
|
filePath: 'src/hooks/renderItemFormSidebarPanel.ts',
|
|
@@ -518,7 +522,7 @@ exports.manifest = {
|
|
|
518
522
|
},
|
|
519
523
|
parameters: {
|
|
520
524
|
comment: {
|
|
521
|
-
|
|
525
|
+
markdownText: 'The arbitrary `parameters` of the panel declared in the\n`itemFormSidebarPanels` function.',
|
|
522
526
|
},
|
|
523
527
|
location: {
|
|
524
528
|
filePath: 'src/hooks/renderItemFormSidebarPanel.ts',
|
|
@@ -531,81 +535,85 @@ exports.manifest = {
|
|
|
531
535
|
],
|
|
532
536
|
additionalMethods: [
|
|
533
537
|
{
|
|
538
|
+
name: 'ItemFormAdditionalMethods',
|
|
539
|
+
comment: {
|
|
540
|
+
markdownText: "These methods can be used to interact with the form that's being shown to the\nend-user to edit a record.",
|
|
541
|
+
},
|
|
534
542
|
items: {
|
|
535
543
|
toggleField: {
|
|
536
544
|
comment: {
|
|
537
|
-
|
|
545
|
+
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.',
|
|
538
546
|
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);",
|
|
539
547
|
},
|
|
540
548
|
location: {
|
|
541
549
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
542
|
-
lineNumber:
|
|
550
|
+
lineNumber: 68,
|
|
543
551
|
},
|
|
544
552
|
type: '(path: string, show: boolean) => Promise<void>',
|
|
545
553
|
},
|
|
546
554
|
disableField: {
|
|
547
555
|
comment: {
|
|
548
|
-
|
|
556
|
+
markdownText: 'Disables/re-enables a specific field in the form.',
|
|
549
557
|
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);",
|
|
550
558
|
},
|
|
551
559
|
location: {
|
|
552
560
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
553
|
-
lineNumber:
|
|
561
|
+
lineNumber: 83,
|
|
554
562
|
},
|
|
555
563
|
type: '(path: string, disable: boolean) => Promise<void>',
|
|
556
564
|
},
|
|
557
565
|
scrollToField: {
|
|
558
566
|
comment: {
|
|
559
|
-
|
|
567
|
+
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.',
|
|
560
568
|
example: "const fieldPath = prompt(\n 'Please insert the path of a field in the form',\n ctx.fieldPath,\n);\n\nawait ctx.scrollToField(fieldPath);",
|
|
561
569
|
},
|
|
562
570
|
location: {
|
|
563
571
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
564
|
-
lineNumber:
|
|
572
|
+
lineNumber: 100,
|
|
565
573
|
},
|
|
566
574
|
type: '(path: string, locale?: string) => Promise<void>',
|
|
567
575
|
},
|
|
568
576
|
setFieldValue: {
|
|
569
577
|
comment: {
|
|
570
|
-
|
|
578
|
+
markdownText: 'Changes a specific path of the `formValues` object.',
|
|
571
579
|
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');",
|
|
572
580
|
},
|
|
573
581
|
location: {
|
|
574
582
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
575
|
-
lineNumber:
|
|
583
|
+
lineNumber: 115,
|
|
576
584
|
},
|
|
577
585
|
type: '(path: string, value: unknown) => Promise<void>',
|
|
578
586
|
},
|
|
579
587
|
formValuesToItem: {
|
|
580
588
|
comment: {
|
|
581
|
-
|
|
589
|
+
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`.',
|
|
582
590
|
example: 'await ctx.formValuesToItem(ctx.formValues, false);',
|
|
583
591
|
},
|
|
584
592
|
location: {
|
|
585
593
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
586
|
-
lineNumber:
|
|
594
|
+
lineNumber: 132,
|
|
587
595
|
},
|
|
588
596
|
type: "(\n formValues: Record<string, unknown>,\n skipUnchangedFields?: boolean,\n ) => Promise<Omit<Item, 'id' | 'meta'> | undefined>",
|
|
589
597
|
},
|
|
590
598
|
itemToFormValues: {
|
|
591
599
|
comment: {
|
|
592
|
-
|
|
600
|
+
markdownText: 'Takes an Item entity, and converts it into the internal form state.',
|
|
593
601
|
example: 'await ctx.itemToFormValues(ctx.item);',
|
|
594
602
|
},
|
|
595
603
|
location: {
|
|
596
604
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
597
|
-
lineNumber:
|
|
605
|
+
lineNumber: 145,
|
|
598
606
|
},
|
|
599
607
|
type: "(\n item: Omit<Item, 'id' | 'meta'>,\n ) => Promise<Record<string, unknown>>",
|
|
600
608
|
},
|
|
601
609
|
saveCurrentItem: {
|
|
602
610
|
comment: {
|
|
603
|
-
|
|
611
|
+
markdownText: 'Triggers a submit form for current record.',
|
|
604
612
|
example: 'await ctx.saveCurrentItem();',
|
|
605
613
|
},
|
|
606
614
|
location: {
|
|
607
615
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
608
|
-
lineNumber:
|
|
616
|
+
lineNumber: 157,
|
|
609
617
|
},
|
|
610
618
|
type: '(showToast?: boolean) => Promise<void>',
|
|
611
619
|
},
|
|
@@ -622,7 +630,7 @@ exports.manifest = {
|
|
|
622
630
|
renderItemFormSidebar: {
|
|
623
631
|
name: 'renderItemFormSidebar',
|
|
624
632
|
comment: {
|
|
625
|
-
|
|
633
|
+
markdownText: 'This function will be called when the plugin needs to render a sidebar (see\nthe `itemFormSidebars` hook).',
|
|
626
634
|
tag: 'sidebarPanels',
|
|
627
635
|
},
|
|
628
636
|
nonCtxArguments: [
|
|
@@ -635,10 +643,14 @@ exports.manifest = {
|
|
|
635
643
|
type: 'ImposedSizePluginFrameCtx',
|
|
636
644
|
additionalProperties: [
|
|
637
645
|
{
|
|
646
|
+
name: 'ItemFormAdditionalProperties',
|
|
647
|
+
comment: {
|
|
648
|
+
markdownText: "These information describe the current state of the form that's being shown\nto the end-user to edit a record.",
|
|
649
|
+
},
|
|
638
650
|
items: {
|
|
639
651
|
locale: {
|
|
640
652
|
comment: {
|
|
641
|
-
|
|
653
|
+
markdownText: 'The currently active locale for the record.',
|
|
642
654
|
},
|
|
643
655
|
location: {
|
|
644
656
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -648,7 +660,7 @@ exports.manifest = {
|
|
|
648
660
|
},
|
|
649
661
|
item: {
|
|
650
662
|
comment: {
|
|
651
|
-
|
|
663
|
+
markdownText: 'If an already persisted record is being edited, returns the full record\nentity.',
|
|
652
664
|
},
|
|
653
665
|
location: {
|
|
654
666
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -658,7 +670,7 @@ exports.manifest = {
|
|
|
658
670
|
},
|
|
659
671
|
itemType: {
|
|
660
672
|
comment: {
|
|
661
|
-
|
|
673
|
+
markdownText: 'The model for the record being edited.',
|
|
662
674
|
},
|
|
663
675
|
location: {
|
|
664
676
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -668,7 +680,7 @@ exports.manifest = {
|
|
|
668
680
|
},
|
|
669
681
|
formValues: {
|
|
670
682
|
comment: {
|
|
671
|
-
|
|
683
|
+
markdownText: 'The complete internal form state.',
|
|
672
684
|
},
|
|
673
685
|
location: {
|
|
674
686
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -678,7 +690,7 @@ exports.manifest = {
|
|
|
678
690
|
},
|
|
679
691
|
itemStatus: {
|
|
680
692
|
comment: {
|
|
681
|
-
|
|
693
|
+
markdownText: 'The current status of the record being edited.',
|
|
682
694
|
},
|
|
683
695
|
location: {
|
|
684
696
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -688,7 +700,7 @@ exports.manifest = {
|
|
|
688
700
|
},
|
|
689
701
|
isSubmitting: {
|
|
690
702
|
comment: {
|
|
691
|
-
|
|
703
|
+
markdownText: 'Whether the form is currently submitting itself or not.',
|
|
692
704
|
},
|
|
693
705
|
location: {
|
|
694
706
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -698,7 +710,7 @@ exports.manifest = {
|
|
|
698
710
|
},
|
|
699
711
|
isFormDirty: {
|
|
700
712
|
comment: {
|
|
701
|
-
|
|
713
|
+
markdownText: 'Whether the form has some non-persisted changes or not.',
|
|
702
714
|
},
|
|
703
715
|
location: {
|
|
704
716
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -708,13 +720,13 @@ exports.manifest = {
|
|
|
708
720
|
},
|
|
709
721
|
blocksAnalysis: {
|
|
710
722
|
comment: {
|
|
711
|
-
|
|
723
|
+
markdownText: 'Provides information on how many blocks are currently present in the form.',
|
|
712
724
|
},
|
|
713
725
|
location: {
|
|
714
726
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
715
727
|
lineNumber: 29,
|
|
716
728
|
},
|
|
717
|
-
type: '
|
|
729
|
+
type: 'BlocksAnalysis',
|
|
718
730
|
},
|
|
719
731
|
},
|
|
720
732
|
},
|
|
@@ -722,7 +734,7 @@ exports.manifest = {
|
|
|
722
734
|
items: {
|
|
723
735
|
sidebarId: {
|
|
724
736
|
comment: {
|
|
725
|
-
|
|
737
|
+
markdownText: 'The ID of the sidebar that needs to be rendered.',
|
|
726
738
|
},
|
|
727
739
|
location: {
|
|
728
740
|
filePath: 'src/hooks/renderItemFormSidebar.ts',
|
|
@@ -732,7 +744,7 @@ exports.manifest = {
|
|
|
732
744
|
},
|
|
733
745
|
parameters: {
|
|
734
746
|
comment: {
|
|
735
|
-
|
|
747
|
+
markdownText: 'The arbitrary `parameters` of the declared in the `itemFormSidebars`\nfunction.',
|
|
736
748
|
},
|
|
737
749
|
location: {
|
|
738
750
|
filePath: 'src/hooks/renderItemFormSidebar.ts',
|
|
@@ -745,81 +757,85 @@ exports.manifest = {
|
|
|
745
757
|
],
|
|
746
758
|
additionalMethods: [
|
|
747
759
|
{
|
|
760
|
+
name: 'ItemFormAdditionalMethods',
|
|
761
|
+
comment: {
|
|
762
|
+
markdownText: "These methods can be used to interact with the form that's being shown to the\nend-user to edit a record.",
|
|
763
|
+
},
|
|
748
764
|
items: {
|
|
749
765
|
toggleField: {
|
|
750
766
|
comment: {
|
|
751
|
-
|
|
767
|
+
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.',
|
|
752
768
|
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);",
|
|
753
769
|
},
|
|
754
770
|
location: {
|
|
755
771
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
756
|
-
lineNumber:
|
|
772
|
+
lineNumber: 68,
|
|
757
773
|
},
|
|
758
774
|
type: '(path: string, show: boolean) => Promise<void>',
|
|
759
775
|
},
|
|
760
776
|
disableField: {
|
|
761
777
|
comment: {
|
|
762
|
-
|
|
778
|
+
markdownText: 'Disables/re-enables a specific field in the form.',
|
|
763
779
|
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);",
|
|
764
780
|
},
|
|
765
781
|
location: {
|
|
766
782
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
767
|
-
lineNumber:
|
|
783
|
+
lineNumber: 83,
|
|
768
784
|
},
|
|
769
785
|
type: '(path: string, disable: boolean) => Promise<void>',
|
|
770
786
|
},
|
|
771
787
|
scrollToField: {
|
|
772
788
|
comment: {
|
|
773
|
-
|
|
789
|
+
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.',
|
|
774
790
|
example: "const fieldPath = prompt(\n 'Please insert the path of a field in the form',\n ctx.fieldPath,\n);\n\nawait ctx.scrollToField(fieldPath);",
|
|
775
791
|
},
|
|
776
792
|
location: {
|
|
777
793
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
778
|
-
lineNumber:
|
|
794
|
+
lineNumber: 100,
|
|
779
795
|
},
|
|
780
796
|
type: '(path: string, locale?: string) => Promise<void>',
|
|
781
797
|
},
|
|
782
798
|
setFieldValue: {
|
|
783
799
|
comment: {
|
|
784
|
-
|
|
800
|
+
markdownText: 'Changes a specific path of the `formValues` object.',
|
|
785
801
|
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');",
|
|
786
802
|
},
|
|
787
803
|
location: {
|
|
788
804
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
789
|
-
lineNumber:
|
|
805
|
+
lineNumber: 115,
|
|
790
806
|
},
|
|
791
807
|
type: '(path: string, value: unknown) => Promise<void>',
|
|
792
808
|
},
|
|
793
809
|
formValuesToItem: {
|
|
794
810
|
comment: {
|
|
795
|
-
|
|
811
|
+
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`.',
|
|
796
812
|
example: 'await ctx.formValuesToItem(ctx.formValues, false);',
|
|
797
813
|
},
|
|
798
814
|
location: {
|
|
799
815
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
800
|
-
lineNumber:
|
|
816
|
+
lineNumber: 132,
|
|
801
817
|
},
|
|
802
818
|
type: "(\n formValues: Record<string, unknown>,\n skipUnchangedFields?: boolean,\n ) => Promise<Omit<Item, 'id' | 'meta'> | undefined>",
|
|
803
819
|
},
|
|
804
820
|
itemToFormValues: {
|
|
805
821
|
comment: {
|
|
806
|
-
|
|
822
|
+
markdownText: 'Takes an Item entity, and converts it into the internal form state.',
|
|
807
823
|
example: 'await ctx.itemToFormValues(ctx.item);',
|
|
808
824
|
},
|
|
809
825
|
location: {
|
|
810
826
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
811
|
-
lineNumber:
|
|
827
|
+
lineNumber: 145,
|
|
812
828
|
},
|
|
813
829
|
type: "(\n item: Omit<Item, 'id' | 'meta'>,\n ) => Promise<Record<string, unknown>>",
|
|
814
830
|
},
|
|
815
831
|
saveCurrentItem: {
|
|
816
832
|
comment: {
|
|
817
|
-
|
|
833
|
+
markdownText: 'Triggers a submit form for current record.',
|
|
818
834
|
example: 'await ctx.saveCurrentItem();',
|
|
819
835
|
},
|
|
820
836
|
location: {
|
|
821
837
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
822
|
-
lineNumber:
|
|
838
|
+
lineNumber: 157,
|
|
823
839
|
},
|
|
824
840
|
type: '(showToast?: boolean) => Promise<void>',
|
|
825
841
|
},
|
|
@@ -836,7 +852,7 @@ exports.manifest = {
|
|
|
836
852
|
renderItemFormOutlet: {
|
|
837
853
|
name: 'renderItemFormOutlet',
|
|
838
854
|
comment: {
|
|
839
|
-
|
|
855
|
+
markdownText: 'This function will be called when the plugin needs to render an outlet\ndefined by the `itemFormOutlets()` hook.',
|
|
840
856
|
tag: 'outlets',
|
|
841
857
|
},
|
|
842
858
|
nonCtxArguments: [
|
|
@@ -849,10 +865,14 @@ exports.manifest = {
|
|
|
849
865
|
type: 'SelfResizingPluginFrameCtx',
|
|
850
866
|
additionalProperties: [
|
|
851
867
|
{
|
|
868
|
+
name: 'ItemFormAdditionalProperties',
|
|
869
|
+
comment: {
|
|
870
|
+
markdownText: "These information describe the current state of the form that's being shown\nto the end-user to edit a record.",
|
|
871
|
+
},
|
|
852
872
|
items: {
|
|
853
873
|
locale: {
|
|
854
874
|
comment: {
|
|
855
|
-
|
|
875
|
+
markdownText: 'The currently active locale for the record.',
|
|
856
876
|
},
|
|
857
877
|
location: {
|
|
858
878
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -862,7 +882,7 @@ exports.manifest = {
|
|
|
862
882
|
},
|
|
863
883
|
item: {
|
|
864
884
|
comment: {
|
|
865
|
-
|
|
885
|
+
markdownText: 'If an already persisted record is being edited, returns the full record\nentity.',
|
|
866
886
|
},
|
|
867
887
|
location: {
|
|
868
888
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -872,7 +892,7 @@ exports.manifest = {
|
|
|
872
892
|
},
|
|
873
893
|
itemType: {
|
|
874
894
|
comment: {
|
|
875
|
-
|
|
895
|
+
markdownText: 'The model for the record being edited.',
|
|
876
896
|
},
|
|
877
897
|
location: {
|
|
878
898
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -882,7 +902,7 @@ exports.manifest = {
|
|
|
882
902
|
},
|
|
883
903
|
formValues: {
|
|
884
904
|
comment: {
|
|
885
|
-
|
|
905
|
+
markdownText: 'The complete internal form state.',
|
|
886
906
|
},
|
|
887
907
|
location: {
|
|
888
908
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -892,7 +912,7 @@ exports.manifest = {
|
|
|
892
912
|
},
|
|
893
913
|
itemStatus: {
|
|
894
914
|
comment: {
|
|
895
|
-
|
|
915
|
+
markdownText: 'The current status of the record being edited.',
|
|
896
916
|
},
|
|
897
917
|
location: {
|
|
898
918
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -902,7 +922,7 @@ exports.manifest = {
|
|
|
902
922
|
},
|
|
903
923
|
isSubmitting: {
|
|
904
924
|
comment: {
|
|
905
|
-
|
|
925
|
+
markdownText: 'Whether the form is currently submitting itself or not.',
|
|
906
926
|
},
|
|
907
927
|
location: {
|
|
908
928
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -912,7 +932,7 @@ exports.manifest = {
|
|
|
912
932
|
},
|
|
913
933
|
isFormDirty: {
|
|
914
934
|
comment: {
|
|
915
|
-
|
|
935
|
+
markdownText: 'Whether the form has some non-persisted changes or not.',
|
|
916
936
|
},
|
|
917
937
|
location: {
|
|
918
938
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -922,13 +942,13 @@ exports.manifest = {
|
|
|
922
942
|
},
|
|
923
943
|
blocksAnalysis: {
|
|
924
944
|
comment: {
|
|
925
|
-
|
|
945
|
+
markdownText: 'Provides information on how many blocks are currently present in the form.',
|
|
926
946
|
},
|
|
927
947
|
location: {
|
|
928
948
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
929
949
|
lineNumber: 29,
|
|
930
950
|
},
|
|
931
|
-
type: '
|
|
951
|
+
type: 'BlocksAnalysis',
|
|
932
952
|
},
|
|
933
953
|
},
|
|
934
954
|
},
|
|
@@ -936,7 +956,7 @@ exports.manifest = {
|
|
|
936
956
|
items: {
|
|
937
957
|
itemFormOutletId: {
|
|
938
958
|
comment: {
|
|
939
|
-
|
|
959
|
+
markdownText: 'The ID of the outlet that needs to be rendered.',
|
|
940
960
|
},
|
|
941
961
|
location: {
|
|
942
962
|
filePath: 'src/hooks/renderItemFormOutlet.ts',
|
|
@@ -949,81 +969,85 @@ exports.manifest = {
|
|
|
949
969
|
],
|
|
950
970
|
additionalMethods: [
|
|
951
971
|
{
|
|
972
|
+
name: 'ItemFormAdditionalMethods',
|
|
973
|
+
comment: {
|
|
974
|
+
markdownText: "These methods can be used to interact with the form that's being shown to the\nend-user to edit a record.",
|
|
975
|
+
},
|
|
952
976
|
items: {
|
|
953
977
|
toggleField: {
|
|
954
978
|
comment: {
|
|
955
|
-
|
|
979
|
+
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.',
|
|
956
980
|
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);",
|
|
957
981
|
},
|
|
958
982
|
location: {
|
|
959
983
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
960
|
-
lineNumber:
|
|
984
|
+
lineNumber: 68,
|
|
961
985
|
},
|
|
962
986
|
type: '(path: string, show: boolean) => Promise<void>',
|
|
963
987
|
},
|
|
964
988
|
disableField: {
|
|
965
989
|
comment: {
|
|
966
|
-
|
|
990
|
+
markdownText: 'Disables/re-enables a specific field in the form.',
|
|
967
991
|
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);",
|
|
968
992
|
},
|
|
969
993
|
location: {
|
|
970
994
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
971
|
-
lineNumber:
|
|
995
|
+
lineNumber: 83,
|
|
972
996
|
},
|
|
973
997
|
type: '(path: string, disable: boolean) => Promise<void>',
|
|
974
998
|
},
|
|
975
999
|
scrollToField: {
|
|
976
1000
|
comment: {
|
|
977
|
-
|
|
1001
|
+
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.',
|
|
978
1002
|
example: "const fieldPath = prompt(\n 'Please insert the path of a field in the form',\n ctx.fieldPath,\n);\n\nawait ctx.scrollToField(fieldPath);",
|
|
979
1003
|
},
|
|
980
1004
|
location: {
|
|
981
1005
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
982
|
-
lineNumber:
|
|
1006
|
+
lineNumber: 100,
|
|
983
1007
|
},
|
|
984
1008
|
type: '(path: string, locale?: string) => Promise<void>',
|
|
985
1009
|
},
|
|
986
1010
|
setFieldValue: {
|
|
987
1011
|
comment: {
|
|
988
|
-
|
|
1012
|
+
markdownText: 'Changes a specific path of the `formValues` object.',
|
|
989
1013
|
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');",
|
|
990
1014
|
},
|
|
991
1015
|
location: {
|
|
992
1016
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
993
|
-
lineNumber:
|
|
1017
|
+
lineNumber: 115,
|
|
994
1018
|
},
|
|
995
1019
|
type: '(path: string, value: unknown) => Promise<void>',
|
|
996
1020
|
},
|
|
997
1021
|
formValuesToItem: {
|
|
998
1022
|
comment: {
|
|
999
|
-
|
|
1023
|
+
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`.',
|
|
1000
1024
|
example: 'await ctx.formValuesToItem(ctx.formValues, false);',
|
|
1001
1025
|
},
|
|
1002
1026
|
location: {
|
|
1003
1027
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
1004
|
-
lineNumber:
|
|
1028
|
+
lineNumber: 132,
|
|
1005
1029
|
},
|
|
1006
1030
|
type: "(\n formValues: Record<string, unknown>,\n skipUnchangedFields?: boolean,\n ) => Promise<Omit<Item, 'id' | 'meta'> | undefined>",
|
|
1007
1031
|
},
|
|
1008
1032
|
itemToFormValues: {
|
|
1009
1033
|
comment: {
|
|
1010
|
-
|
|
1034
|
+
markdownText: 'Takes an Item entity, and converts it into the internal form state.',
|
|
1011
1035
|
example: 'await ctx.itemToFormValues(ctx.item);',
|
|
1012
1036
|
},
|
|
1013
1037
|
location: {
|
|
1014
1038
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
1015
|
-
lineNumber:
|
|
1039
|
+
lineNumber: 145,
|
|
1016
1040
|
},
|
|
1017
1041
|
type: "(\n item: Omit<Item, 'id' | 'meta'>,\n ) => Promise<Record<string, unknown>>",
|
|
1018
1042
|
},
|
|
1019
1043
|
saveCurrentItem: {
|
|
1020
1044
|
comment: {
|
|
1021
|
-
|
|
1045
|
+
markdownText: 'Triggers a submit form for current record.',
|
|
1022
1046
|
example: 'await ctx.saveCurrentItem();',
|
|
1023
1047
|
},
|
|
1024
1048
|
location: {
|
|
1025
1049
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
1026
|
-
lineNumber:
|
|
1050
|
+
lineNumber: 157,
|
|
1027
1051
|
},
|
|
1028
1052
|
type: '(showToast?: boolean) => Promise<void>',
|
|
1029
1053
|
},
|
|
@@ -1040,7 +1064,7 @@ exports.manifest = {
|
|
|
1040
1064
|
renderItemCollectionOutlet: {
|
|
1041
1065
|
name: 'renderItemCollectionOutlet',
|
|
1042
1066
|
comment: {
|
|
1043
|
-
|
|
1067
|
+
markdownText: 'This function will be called when the plugin needs to render an outlet\ndefined by the `itemFormOutlets()` hook.',
|
|
1044
1068
|
tag: 'outlets',
|
|
1045
1069
|
},
|
|
1046
1070
|
nonCtxArguments: [
|
|
@@ -1056,7 +1080,7 @@ exports.manifest = {
|
|
|
1056
1080
|
items: {
|
|
1057
1081
|
itemCollectionOutletId: {
|
|
1058
1082
|
comment: {
|
|
1059
|
-
|
|
1083
|
+
markdownText: 'The ID of the outlet that needs to be rendered.',
|
|
1060
1084
|
},
|
|
1061
1085
|
location: {
|
|
1062
1086
|
filePath: 'src/hooks/renderItemCollectionOutlet.ts',
|
|
@@ -1078,7 +1102,7 @@ exports.manifest = {
|
|
|
1078
1102
|
renderFieldExtension: {
|
|
1079
1103
|
name: 'renderFieldExtension',
|
|
1080
1104
|
comment: {
|
|
1081
|
-
|
|
1105
|
+
markdownText: 'This function will be called when the plugin needs to render a field\nextension (see the `manualFieldExtensions` and `overrideFieldExtensions`\nfunctions).',
|
|
1082
1106
|
tag: 'forcedFieldExtensions',
|
|
1083
1107
|
},
|
|
1084
1108
|
nonCtxArguments: [
|
|
@@ -1091,10 +1115,14 @@ exports.manifest = {
|
|
|
1091
1115
|
type: 'SelfResizingPluginFrameCtx',
|
|
1092
1116
|
additionalProperties: [
|
|
1093
1117
|
{
|
|
1118
|
+
name: 'ItemFormAdditionalProperties',
|
|
1119
|
+
comment: {
|
|
1120
|
+
markdownText: "These information describe the current state of the form that's being shown\nto the end-user to edit a record.",
|
|
1121
|
+
},
|
|
1094
1122
|
items: {
|
|
1095
1123
|
locale: {
|
|
1096
1124
|
comment: {
|
|
1097
|
-
|
|
1125
|
+
markdownText: 'The currently active locale for the record.',
|
|
1098
1126
|
},
|
|
1099
1127
|
location: {
|
|
1100
1128
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1104,7 +1132,7 @@ exports.manifest = {
|
|
|
1104
1132
|
},
|
|
1105
1133
|
item: {
|
|
1106
1134
|
comment: {
|
|
1107
|
-
|
|
1135
|
+
markdownText: 'If an already persisted record is being edited, returns the full record\nentity.',
|
|
1108
1136
|
},
|
|
1109
1137
|
location: {
|
|
1110
1138
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1114,7 +1142,7 @@ exports.manifest = {
|
|
|
1114
1142
|
},
|
|
1115
1143
|
itemType: {
|
|
1116
1144
|
comment: {
|
|
1117
|
-
|
|
1145
|
+
markdownText: 'The model for the record being edited.',
|
|
1118
1146
|
},
|
|
1119
1147
|
location: {
|
|
1120
1148
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1124,7 +1152,7 @@ exports.manifest = {
|
|
|
1124
1152
|
},
|
|
1125
1153
|
formValues: {
|
|
1126
1154
|
comment: {
|
|
1127
|
-
|
|
1155
|
+
markdownText: 'The complete internal form state.',
|
|
1128
1156
|
},
|
|
1129
1157
|
location: {
|
|
1130
1158
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1134,7 +1162,7 @@ exports.manifest = {
|
|
|
1134
1162
|
},
|
|
1135
1163
|
itemStatus: {
|
|
1136
1164
|
comment: {
|
|
1137
|
-
|
|
1165
|
+
markdownText: 'The current status of the record being edited.',
|
|
1138
1166
|
},
|
|
1139
1167
|
location: {
|
|
1140
1168
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1144,7 +1172,7 @@ exports.manifest = {
|
|
|
1144
1172
|
},
|
|
1145
1173
|
isSubmitting: {
|
|
1146
1174
|
comment: {
|
|
1147
|
-
|
|
1175
|
+
markdownText: 'Whether the form is currently submitting itself or not.',
|
|
1148
1176
|
},
|
|
1149
1177
|
location: {
|
|
1150
1178
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1154,7 +1182,7 @@ exports.manifest = {
|
|
|
1154
1182
|
},
|
|
1155
1183
|
isFormDirty: {
|
|
1156
1184
|
comment: {
|
|
1157
|
-
|
|
1185
|
+
markdownText: 'Whether the form has some non-persisted changes or not.',
|
|
1158
1186
|
},
|
|
1159
1187
|
location: {
|
|
1160
1188
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1164,65 +1192,69 @@ exports.manifest = {
|
|
|
1164
1192
|
},
|
|
1165
1193
|
blocksAnalysis: {
|
|
1166
1194
|
comment: {
|
|
1167
|
-
|
|
1195
|
+
markdownText: 'Provides information on how many blocks are currently present in the form.',
|
|
1168
1196
|
},
|
|
1169
1197
|
location: {
|
|
1170
1198
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
1171
1199
|
lineNumber: 29,
|
|
1172
1200
|
},
|
|
1173
|
-
type: '
|
|
1201
|
+
type: 'BlocksAnalysis',
|
|
1174
1202
|
},
|
|
1175
1203
|
},
|
|
1176
1204
|
},
|
|
1177
1205
|
{
|
|
1206
|
+
name: 'FieldAdditionalProperties',
|
|
1207
|
+
comment: {
|
|
1208
|
+
markdownText: 'These information describe the current state of the field where this plugin\nis applied to.',
|
|
1209
|
+
},
|
|
1178
1210
|
items: {
|
|
1179
1211
|
disabled: {
|
|
1180
1212
|
comment: {
|
|
1181
|
-
|
|
1213
|
+
markdownText: 'Whether the field is currently disabled or not.',
|
|
1182
1214
|
},
|
|
1183
1215
|
location: {
|
|
1184
1216
|
filePath: 'src/ctx/commonExtras/field.ts',
|
|
1185
|
-
lineNumber:
|
|
1217
|
+
lineNumber: 12,
|
|
1186
1218
|
},
|
|
1187
1219
|
type: 'boolean',
|
|
1188
1220
|
},
|
|
1189
1221
|
fieldPath: {
|
|
1190
1222
|
comment: {
|
|
1191
|
-
|
|
1223
|
+
markdownText: 'The path in the `formValues` object where to find the current value for the\nfield.',
|
|
1192
1224
|
},
|
|
1193
1225
|
location: {
|
|
1194
1226
|
filePath: 'src/ctx/commonExtras/field.ts',
|
|
1195
|
-
lineNumber:
|
|
1227
|
+
lineNumber: 17,
|
|
1196
1228
|
},
|
|
1197
1229
|
type: 'string',
|
|
1198
1230
|
},
|
|
1199
1231
|
field: {
|
|
1200
1232
|
comment: {
|
|
1201
|
-
|
|
1233
|
+
markdownText: 'The field where the field extension is installed to.',
|
|
1202
1234
|
},
|
|
1203
1235
|
location: {
|
|
1204
1236
|
filePath: 'src/ctx/commonExtras/field.ts',
|
|
1205
|
-
lineNumber:
|
|
1237
|
+
lineNumber: 19,
|
|
1206
1238
|
},
|
|
1207
1239
|
type: 'Field',
|
|
1208
1240
|
},
|
|
1209
1241
|
parentField: {
|
|
1210
1242
|
comment: {
|
|
1211
|
-
|
|
1243
|
+
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.',
|
|
1212
1244
|
},
|
|
1213
1245
|
location: {
|
|
1214
1246
|
filePath: 'src/ctx/commonExtras/field.ts',
|
|
1215
|
-
lineNumber:
|
|
1247
|
+
lineNumber: 24,
|
|
1216
1248
|
},
|
|
1217
1249
|
type: 'Field | undefined',
|
|
1218
1250
|
},
|
|
1219
1251
|
block: {
|
|
1220
1252
|
comment: {
|
|
1221
|
-
|
|
1253
|
+
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.',
|
|
1222
1254
|
},
|
|
1223
1255
|
location: {
|
|
1224
1256
|
filePath: 'src/ctx/commonExtras/field.ts',
|
|
1225
|
-
lineNumber:
|
|
1257
|
+
lineNumber: 30,
|
|
1226
1258
|
},
|
|
1227
1259
|
type: 'undefined | { id: string | undefined; blockModel: ItemType }',
|
|
1228
1260
|
},
|
|
@@ -1232,7 +1264,7 @@ exports.manifest = {
|
|
|
1232
1264
|
items: {
|
|
1233
1265
|
fieldExtensionId: {
|
|
1234
1266
|
comment: {
|
|
1235
|
-
|
|
1267
|
+
markdownText: 'The ID of the field extension that needs to be rendered.',
|
|
1236
1268
|
},
|
|
1237
1269
|
location: {
|
|
1238
1270
|
filePath: 'src/hooks/renderFieldExtension.ts',
|
|
@@ -1242,7 +1274,7 @@ exports.manifest = {
|
|
|
1242
1274
|
},
|
|
1243
1275
|
parameters: {
|
|
1244
1276
|
comment: {
|
|
1245
|
-
|
|
1277
|
+
markdownText: 'The arbitrary `parameters` of the field extension.',
|
|
1246
1278
|
},
|
|
1247
1279
|
location: {
|
|
1248
1280
|
filePath: 'src/hooks/renderFieldExtension.ts',
|
|
@@ -1255,81 +1287,85 @@ exports.manifest = {
|
|
|
1255
1287
|
],
|
|
1256
1288
|
additionalMethods: [
|
|
1257
1289
|
{
|
|
1290
|
+
name: 'ItemFormAdditionalMethods',
|
|
1291
|
+
comment: {
|
|
1292
|
+
markdownText: "These methods can be used to interact with the form that's being shown to the\nend-user to edit a record.",
|
|
1293
|
+
},
|
|
1258
1294
|
items: {
|
|
1259
1295
|
toggleField: {
|
|
1260
1296
|
comment: {
|
|
1261
|
-
|
|
1297
|
+
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.',
|
|
1262
1298
|
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);",
|
|
1263
1299
|
},
|
|
1264
1300
|
location: {
|
|
1265
1301
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
1266
|
-
lineNumber:
|
|
1302
|
+
lineNumber: 68,
|
|
1267
1303
|
},
|
|
1268
1304
|
type: '(path: string, show: boolean) => Promise<void>',
|
|
1269
1305
|
},
|
|
1270
1306
|
disableField: {
|
|
1271
1307
|
comment: {
|
|
1272
|
-
|
|
1308
|
+
markdownText: 'Disables/re-enables a specific field in the form.',
|
|
1273
1309
|
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);",
|
|
1274
1310
|
},
|
|
1275
1311
|
location: {
|
|
1276
1312
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
1277
|
-
lineNumber:
|
|
1313
|
+
lineNumber: 83,
|
|
1278
1314
|
},
|
|
1279
1315
|
type: '(path: string, disable: boolean) => Promise<void>',
|
|
1280
1316
|
},
|
|
1281
1317
|
scrollToField: {
|
|
1282
1318
|
comment: {
|
|
1283
|
-
|
|
1319
|
+
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.',
|
|
1284
1320
|
example: "const fieldPath = prompt(\n 'Please insert the path of a field in the form',\n ctx.fieldPath,\n);\n\nawait ctx.scrollToField(fieldPath);",
|
|
1285
1321
|
},
|
|
1286
1322
|
location: {
|
|
1287
1323
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
1288
|
-
lineNumber:
|
|
1324
|
+
lineNumber: 100,
|
|
1289
1325
|
},
|
|
1290
1326
|
type: '(path: string, locale?: string) => Promise<void>',
|
|
1291
1327
|
},
|
|
1292
1328
|
setFieldValue: {
|
|
1293
1329
|
comment: {
|
|
1294
|
-
|
|
1330
|
+
markdownText: 'Changes a specific path of the `formValues` object.',
|
|
1295
1331
|
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');",
|
|
1296
1332
|
},
|
|
1297
1333
|
location: {
|
|
1298
1334
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
1299
|
-
lineNumber:
|
|
1335
|
+
lineNumber: 115,
|
|
1300
1336
|
},
|
|
1301
1337
|
type: '(path: string, value: unknown) => Promise<void>',
|
|
1302
1338
|
},
|
|
1303
1339
|
formValuesToItem: {
|
|
1304
1340
|
comment: {
|
|
1305
|
-
|
|
1341
|
+
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`.',
|
|
1306
1342
|
example: 'await ctx.formValuesToItem(ctx.formValues, false);',
|
|
1307
1343
|
},
|
|
1308
1344
|
location: {
|
|
1309
1345
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
1310
|
-
lineNumber:
|
|
1346
|
+
lineNumber: 132,
|
|
1311
1347
|
},
|
|
1312
1348
|
type: "(\n formValues: Record<string, unknown>,\n skipUnchangedFields?: boolean,\n ) => Promise<Omit<Item, 'id' | 'meta'> | undefined>",
|
|
1313
1349
|
},
|
|
1314
1350
|
itemToFormValues: {
|
|
1315
1351
|
comment: {
|
|
1316
|
-
|
|
1352
|
+
markdownText: 'Takes an Item entity, and converts it into the internal form state.',
|
|
1317
1353
|
example: 'await ctx.itemToFormValues(ctx.item);',
|
|
1318
1354
|
},
|
|
1319
1355
|
location: {
|
|
1320
1356
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
1321
|
-
lineNumber:
|
|
1357
|
+
lineNumber: 145,
|
|
1322
1358
|
},
|
|
1323
1359
|
type: "(\n item: Omit<Item, 'id' | 'meta'>,\n ) => Promise<Record<string, unknown>>",
|
|
1324
1360
|
},
|
|
1325
1361
|
saveCurrentItem: {
|
|
1326
1362
|
comment: {
|
|
1327
|
-
|
|
1363
|
+
markdownText: 'Triggers a submit form for current record.',
|
|
1328
1364
|
example: 'await ctx.saveCurrentItem();',
|
|
1329
1365
|
},
|
|
1330
1366
|
location: {
|
|
1331
1367
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
1332
|
-
lineNumber:
|
|
1368
|
+
lineNumber: 157,
|
|
1333
1369
|
},
|
|
1334
1370
|
type: '(showToast?: boolean) => Promise<void>',
|
|
1335
1371
|
},
|
|
@@ -1346,7 +1382,7 @@ exports.manifest = {
|
|
|
1346
1382
|
renderConfigScreen: {
|
|
1347
1383
|
name: 'renderConfigScreen',
|
|
1348
1384
|
comment: {
|
|
1349
|
-
|
|
1385
|
+
markdownText: "This function will be called when the plugin needs to render the plugin's\nconfiguration form.",
|
|
1350
1386
|
tag: 'configScreen',
|
|
1351
1387
|
},
|
|
1352
1388
|
nonCtxArguments: [],
|
|
@@ -1364,7 +1400,7 @@ exports.manifest = {
|
|
|
1364
1400
|
renderAssetSource: {
|
|
1365
1401
|
name: 'renderAssetSource',
|
|
1366
1402
|
comment: {
|
|
1367
|
-
|
|
1403
|
+
markdownText: "This function will be called when the user selects one of the plugin's\nasset sources to upload a new media file.",
|
|
1368
1404
|
tag: 'assetSources',
|
|
1369
1405
|
},
|
|
1370
1406
|
nonCtxArguments: [
|
|
@@ -1380,7 +1416,7 @@ exports.manifest = {
|
|
|
1380
1416
|
items: {
|
|
1381
1417
|
assetSourceId: {
|
|
1382
1418
|
comment: {
|
|
1383
|
-
|
|
1419
|
+
markdownText: 'The ID of the assetSource that needs to be rendered.',
|
|
1384
1420
|
},
|
|
1385
1421
|
location: {
|
|
1386
1422
|
filePath: 'src/hooks/renderAssetSource.ts',
|
|
@@ -1396,7 +1432,7 @@ exports.manifest = {
|
|
|
1396
1432
|
items: {
|
|
1397
1433
|
select: {
|
|
1398
1434
|
comment: {
|
|
1399
|
-
|
|
1435
|
+
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.',
|
|
1400
1436
|
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});",
|
|
1401
1437
|
},
|
|
1402
1438
|
location: {
|
|
@@ -1418,7 +1454,7 @@ exports.manifest = {
|
|
|
1418
1454
|
overrideFieldExtensions: {
|
|
1419
1455
|
name: 'overrideFieldExtensions',
|
|
1420
1456
|
comment: {
|
|
1421
|
-
|
|
1457
|
+
markdownText: 'Use this function to automatically force one or more field extensions to a\nparticular field.',
|
|
1422
1458
|
tag: 'forcedFieldExtensions',
|
|
1423
1459
|
},
|
|
1424
1460
|
nonCtxArguments: [
|
|
@@ -1453,7 +1489,7 @@ exports.manifest = {
|
|
|
1453
1489
|
onBoot: {
|
|
1454
1490
|
name: 'onBoot',
|
|
1455
1491
|
comment: {
|
|
1456
|
-
|
|
1492
|
+
markdownText: 'This function will be called once at boot time and can be used to perform\nie. some initial integrity checks on the configuration.',
|
|
1457
1493
|
tag: 'boot',
|
|
1458
1494
|
},
|
|
1459
1495
|
nonCtxArguments: [],
|
|
@@ -1471,7 +1507,7 @@ exports.manifest = {
|
|
|
1471
1507
|
onBeforeItemsUnpublish: {
|
|
1472
1508
|
name: 'onBeforeItemsUnpublish',
|
|
1473
1509
|
comment: {
|
|
1474
|
-
|
|
1510
|
+
markdownText: 'This function will be called before unpublishing records. You can stop the\naction by returning `false`.',
|
|
1475
1511
|
tag: 'beforeHooks',
|
|
1476
1512
|
},
|
|
1477
1513
|
nonCtxArguments: [
|
|
@@ -1494,7 +1530,7 @@ exports.manifest = {
|
|
|
1494
1530
|
onBeforeItemsPublish: {
|
|
1495
1531
|
name: 'onBeforeItemsPublish',
|
|
1496
1532
|
comment: {
|
|
1497
|
-
|
|
1533
|
+
markdownText: 'This function will be called before publishing records. You can stop the\naction by returning `false`.',
|
|
1498
1534
|
tag: 'beforeHooks',
|
|
1499
1535
|
},
|
|
1500
1536
|
nonCtxArguments: [
|
|
@@ -1517,7 +1553,7 @@ exports.manifest = {
|
|
|
1517
1553
|
onBeforeItemsDestroy: {
|
|
1518
1554
|
name: 'onBeforeItemsDestroy',
|
|
1519
1555
|
comment: {
|
|
1520
|
-
|
|
1556
|
+
markdownText: 'This function will be called before destroying records. You can stop the\naction by returning `false`.',
|
|
1521
1557
|
tag: 'beforeHooks',
|
|
1522
1558
|
},
|
|
1523
1559
|
nonCtxArguments: [
|
|
@@ -1540,7 +1576,7 @@ exports.manifest = {
|
|
|
1540
1576
|
onBeforeItemUpsert: {
|
|
1541
1577
|
name: 'onBeforeItemUpsert',
|
|
1542
1578
|
comment: {
|
|
1543
|
-
|
|
1579
|
+
markdownText: 'This function will be called before saving a new version of a record. You\ncan stop the action by returning `false`.',
|
|
1544
1580
|
tag: 'beforeHooks',
|
|
1545
1581
|
},
|
|
1546
1582
|
nonCtxArguments: [
|
|
@@ -1563,7 +1599,7 @@ exports.manifest = {
|
|
|
1563
1599
|
manualFieldExtensions: {
|
|
1564
1600
|
name: 'manualFieldExtensions',
|
|
1565
1601
|
comment: {
|
|
1566
|
-
|
|
1602
|
+
markdownText: 'Use this function to declare new field extensions that users will be able\nto install manually in some field.',
|
|
1567
1603
|
tag: 'manualFieldExtensions',
|
|
1568
1604
|
},
|
|
1569
1605
|
nonCtxArguments: [],
|
|
@@ -1581,7 +1617,7 @@ exports.manifest = {
|
|
|
1581
1617
|
mainNavigationTabs: {
|
|
1582
1618
|
name: 'mainNavigationTabs',
|
|
1583
1619
|
comment: {
|
|
1584
|
-
|
|
1620
|
+
markdownText: 'Use this function to declare new tabs you want to add in the top-bar of the\nUI.',
|
|
1585
1621
|
tag: 'pages',
|
|
1586
1622
|
},
|
|
1587
1623
|
nonCtxArguments: [],
|
|
@@ -1599,7 +1635,7 @@ exports.manifest = {
|
|
|
1599
1635
|
itemsDropdownActions: {
|
|
1600
1636
|
name: 'itemsDropdownActions',
|
|
1601
1637
|
comment: {
|
|
1602
|
-
|
|
1638
|
+
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.',
|
|
1603
1639
|
tag: 'dropdownActions',
|
|
1604
1640
|
},
|
|
1605
1641
|
nonCtxArguments: [
|
|
@@ -1634,7 +1670,7 @@ exports.manifest = {
|
|
|
1634
1670
|
itemFormSidebars: {
|
|
1635
1671
|
name: 'itemFormSidebars',
|
|
1636
1672
|
comment: {
|
|
1637
|
-
|
|
1673
|
+
markdownText: 'Use this function to declare new sidebar to be shown when the user edits\nrecords of a particular model.',
|
|
1638
1674
|
tag: 'sidebarPanels',
|
|
1639
1675
|
},
|
|
1640
1676
|
nonCtxArguments: [
|
|
@@ -1657,7 +1693,7 @@ exports.manifest = {
|
|
|
1657
1693
|
itemFormSidebarPanels: {
|
|
1658
1694
|
name: 'itemFormSidebarPanels',
|
|
1659
1695
|
comment: {
|
|
1660
|
-
|
|
1696
|
+
markdownText: 'Use this function to declare new sidebar panels to be shown when the user\nedits records of a particular model.',
|
|
1661
1697
|
tag: 'sidebarPanels',
|
|
1662
1698
|
},
|
|
1663
1699
|
nonCtxArguments: [
|
|
@@ -1680,7 +1716,7 @@ exports.manifest = {
|
|
|
1680
1716
|
itemFormOutlets: {
|
|
1681
1717
|
name: 'itemFormOutlets',
|
|
1682
1718
|
comment: {
|
|
1683
|
-
|
|
1719
|
+
markdownText: "Use this function to declare custom outlets to be shown at the top of the\nrecord's editing page.",
|
|
1684
1720
|
tag: 'outlets',
|
|
1685
1721
|
},
|
|
1686
1722
|
nonCtxArguments: [
|
|
@@ -1703,7 +1739,7 @@ exports.manifest = {
|
|
|
1703
1739
|
itemFormDropdownActions: {
|
|
1704
1740
|
name: 'itemFormDropdownActions',
|
|
1705
1741
|
comment: {
|
|
1706
|
-
|
|
1742
|
+
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.',
|
|
1707
1743
|
tag: 'dropdownActions',
|
|
1708
1744
|
},
|
|
1709
1745
|
nonCtxArguments: [
|
|
@@ -1716,10 +1752,14 @@ exports.manifest = {
|
|
|
1716
1752
|
type: 'Ctx',
|
|
1717
1753
|
additionalProperties: [
|
|
1718
1754
|
{
|
|
1755
|
+
name: 'ItemFormAdditionalProperties',
|
|
1756
|
+
comment: {
|
|
1757
|
+
markdownText: "These information describe the current state of the form that's being shown\nto the end-user to edit a record.",
|
|
1758
|
+
},
|
|
1719
1759
|
items: {
|
|
1720
1760
|
locale: {
|
|
1721
1761
|
comment: {
|
|
1722
|
-
|
|
1762
|
+
markdownText: 'The currently active locale for the record.',
|
|
1723
1763
|
},
|
|
1724
1764
|
location: {
|
|
1725
1765
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1729,7 +1769,7 @@ exports.manifest = {
|
|
|
1729
1769
|
},
|
|
1730
1770
|
item: {
|
|
1731
1771
|
comment: {
|
|
1732
|
-
|
|
1772
|
+
markdownText: 'If an already persisted record is being edited, returns the full record\nentity.',
|
|
1733
1773
|
},
|
|
1734
1774
|
location: {
|
|
1735
1775
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1739,7 +1779,7 @@ exports.manifest = {
|
|
|
1739
1779
|
},
|
|
1740
1780
|
itemType: {
|
|
1741
1781
|
comment: {
|
|
1742
|
-
|
|
1782
|
+
markdownText: 'The model for the record being edited.',
|
|
1743
1783
|
},
|
|
1744
1784
|
location: {
|
|
1745
1785
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1749,7 +1789,7 @@ exports.manifest = {
|
|
|
1749
1789
|
},
|
|
1750
1790
|
formValues: {
|
|
1751
1791
|
comment: {
|
|
1752
|
-
|
|
1792
|
+
markdownText: 'The complete internal form state.',
|
|
1753
1793
|
},
|
|
1754
1794
|
location: {
|
|
1755
1795
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1759,7 +1799,7 @@ exports.manifest = {
|
|
|
1759
1799
|
},
|
|
1760
1800
|
itemStatus: {
|
|
1761
1801
|
comment: {
|
|
1762
|
-
|
|
1802
|
+
markdownText: 'The current status of the record being edited.',
|
|
1763
1803
|
},
|
|
1764
1804
|
location: {
|
|
1765
1805
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1769,7 +1809,7 @@ exports.manifest = {
|
|
|
1769
1809
|
},
|
|
1770
1810
|
isSubmitting: {
|
|
1771
1811
|
comment: {
|
|
1772
|
-
|
|
1812
|
+
markdownText: 'Whether the form is currently submitting itself or not.',
|
|
1773
1813
|
},
|
|
1774
1814
|
location: {
|
|
1775
1815
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1779,7 +1819,7 @@ exports.manifest = {
|
|
|
1779
1819
|
},
|
|
1780
1820
|
isFormDirty: {
|
|
1781
1821
|
comment: {
|
|
1782
|
-
|
|
1822
|
+
markdownText: 'Whether the form has some non-persisted changes or not.',
|
|
1783
1823
|
},
|
|
1784
1824
|
location: {
|
|
1785
1825
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1789,13 +1829,13 @@ exports.manifest = {
|
|
|
1789
1829
|
},
|
|
1790
1830
|
blocksAnalysis: {
|
|
1791
1831
|
comment: {
|
|
1792
|
-
|
|
1832
|
+
markdownText: 'Provides information on how many blocks are currently present in the form.',
|
|
1793
1833
|
},
|
|
1794
1834
|
location: {
|
|
1795
1835
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
1796
1836
|
lineNumber: 29,
|
|
1797
1837
|
},
|
|
1798
|
-
type: '
|
|
1838
|
+
type: 'BlocksAnalysis',
|
|
1799
1839
|
},
|
|
1800
1840
|
},
|
|
1801
1841
|
},
|
|
@@ -1811,7 +1851,7 @@ exports.manifest = {
|
|
|
1811
1851
|
itemCollectionOutlets: {
|
|
1812
1852
|
name: 'itemCollectionOutlets',
|
|
1813
1853
|
comment: {
|
|
1814
|
-
|
|
1854
|
+
markdownText: 'Use this function to declare custom outlets to be shown at the top of a\ncollection of records of a particular model.',
|
|
1815
1855
|
tag: 'outlets',
|
|
1816
1856
|
},
|
|
1817
1857
|
nonCtxArguments: [
|
|
@@ -1834,7 +1874,7 @@ exports.manifest = {
|
|
|
1834
1874
|
initialLocationQueryForItemSelector: {
|
|
1835
1875
|
name: 'initialLocationQueryForItemSelector',
|
|
1836
1876
|
comment: {
|
|
1837
|
-
|
|
1877
|
+
markdownText: 'Use this function to customize the initial filters when opening a record\nselector via a "Single link" or "Multiple links" field.',
|
|
1838
1878
|
tag: 'locationQuery',
|
|
1839
1879
|
},
|
|
1840
1880
|
nonCtxArguments: [
|
|
@@ -1861,7 +1901,7 @@ exports.manifest = {
|
|
|
1861
1901
|
fieldDropdownActions: {
|
|
1862
1902
|
name: 'fieldDropdownActions',
|
|
1863
1903
|
comment: {
|
|
1864
|
-
|
|
1904
|
+
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.',
|
|
1865
1905
|
tag: 'dropdownActions',
|
|
1866
1906
|
},
|
|
1867
1907
|
nonCtxArguments: [
|
|
@@ -1874,10 +1914,14 @@ exports.manifest = {
|
|
|
1874
1914
|
type: 'Ctx',
|
|
1875
1915
|
additionalProperties: [
|
|
1876
1916
|
{
|
|
1917
|
+
name: 'ItemFormAdditionalProperties',
|
|
1918
|
+
comment: {
|
|
1919
|
+
markdownText: "These information describe the current state of the form that's being shown\nto the end-user to edit a record.",
|
|
1920
|
+
},
|
|
1877
1921
|
items: {
|
|
1878
1922
|
locale: {
|
|
1879
1923
|
comment: {
|
|
1880
|
-
|
|
1924
|
+
markdownText: 'The currently active locale for the record.',
|
|
1881
1925
|
},
|
|
1882
1926
|
location: {
|
|
1883
1927
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1887,7 +1931,7 @@ exports.manifest = {
|
|
|
1887
1931
|
},
|
|
1888
1932
|
item: {
|
|
1889
1933
|
comment: {
|
|
1890
|
-
|
|
1934
|
+
markdownText: 'If an already persisted record is being edited, returns the full record\nentity.',
|
|
1891
1935
|
},
|
|
1892
1936
|
location: {
|
|
1893
1937
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1897,7 +1941,7 @@ exports.manifest = {
|
|
|
1897
1941
|
},
|
|
1898
1942
|
itemType: {
|
|
1899
1943
|
comment: {
|
|
1900
|
-
|
|
1944
|
+
markdownText: 'The model for the record being edited.',
|
|
1901
1945
|
},
|
|
1902
1946
|
location: {
|
|
1903
1947
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1907,7 +1951,7 @@ exports.manifest = {
|
|
|
1907
1951
|
},
|
|
1908
1952
|
formValues: {
|
|
1909
1953
|
comment: {
|
|
1910
|
-
|
|
1954
|
+
markdownText: 'The complete internal form state.',
|
|
1911
1955
|
},
|
|
1912
1956
|
location: {
|
|
1913
1957
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1917,7 +1961,7 @@ exports.manifest = {
|
|
|
1917
1961
|
},
|
|
1918
1962
|
itemStatus: {
|
|
1919
1963
|
comment: {
|
|
1920
|
-
|
|
1964
|
+
markdownText: 'The current status of the record being edited.',
|
|
1921
1965
|
},
|
|
1922
1966
|
location: {
|
|
1923
1967
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1927,7 +1971,7 @@ exports.manifest = {
|
|
|
1927
1971
|
},
|
|
1928
1972
|
isSubmitting: {
|
|
1929
1973
|
comment: {
|
|
1930
|
-
|
|
1974
|
+
markdownText: 'Whether the form is currently submitting itself or not.',
|
|
1931
1975
|
},
|
|
1932
1976
|
location: {
|
|
1933
1977
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1937,7 +1981,7 @@ exports.manifest = {
|
|
|
1937
1981
|
},
|
|
1938
1982
|
isFormDirty: {
|
|
1939
1983
|
comment: {
|
|
1940
|
-
|
|
1984
|
+
markdownText: 'Whether the form has some non-persisted changes or not.',
|
|
1941
1985
|
},
|
|
1942
1986
|
location: {
|
|
1943
1987
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -1947,65 +1991,69 @@ exports.manifest = {
|
|
|
1947
1991
|
},
|
|
1948
1992
|
blocksAnalysis: {
|
|
1949
1993
|
comment: {
|
|
1950
|
-
|
|
1994
|
+
markdownText: 'Provides information on how many blocks are currently present in the form.',
|
|
1951
1995
|
},
|
|
1952
1996
|
location: {
|
|
1953
1997
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
1954
1998
|
lineNumber: 29,
|
|
1955
1999
|
},
|
|
1956
|
-
type: '
|
|
2000
|
+
type: 'BlocksAnalysis',
|
|
1957
2001
|
},
|
|
1958
2002
|
},
|
|
1959
2003
|
},
|
|
1960
2004
|
{
|
|
2005
|
+
name: 'FieldAdditionalProperties',
|
|
2006
|
+
comment: {
|
|
2007
|
+
markdownText: 'These information describe the current state of the field where this plugin\nis applied to.',
|
|
2008
|
+
},
|
|
1961
2009
|
items: {
|
|
1962
2010
|
disabled: {
|
|
1963
2011
|
comment: {
|
|
1964
|
-
|
|
2012
|
+
markdownText: 'Whether the field is currently disabled or not.',
|
|
1965
2013
|
},
|
|
1966
2014
|
location: {
|
|
1967
2015
|
filePath: 'src/ctx/commonExtras/field.ts',
|
|
1968
|
-
lineNumber:
|
|
2016
|
+
lineNumber: 12,
|
|
1969
2017
|
},
|
|
1970
2018
|
type: 'boolean',
|
|
1971
2019
|
},
|
|
1972
2020
|
fieldPath: {
|
|
1973
2021
|
comment: {
|
|
1974
|
-
|
|
2022
|
+
markdownText: 'The path in the `formValues` object where to find the current value for the\nfield.',
|
|
1975
2023
|
},
|
|
1976
2024
|
location: {
|
|
1977
2025
|
filePath: 'src/ctx/commonExtras/field.ts',
|
|
1978
|
-
lineNumber:
|
|
2026
|
+
lineNumber: 17,
|
|
1979
2027
|
},
|
|
1980
2028
|
type: 'string',
|
|
1981
2029
|
},
|
|
1982
2030
|
field: {
|
|
1983
2031
|
comment: {
|
|
1984
|
-
|
|
2032
|
+
markdownText: 'The field where the field extension is installed to.',
|
|
1985
2033
|
},
|
|
1986
2034
|
location: {
|
|
1987
2035
|
filePath: 'src/ctx/commonExtras/field.ts',
|
|
1988
|
-
lineNumber:
|
|
2036
|
+
lineNumber: 19,
|
|
1989
2037
|
},
|
|
1990
2038
|
type: 'Field',
|
|
1991
2039
|
},
|
|
1992
2040
|
parentField: {
|
|
1993
2041
|
comment: {
|
|
1994
|
-
|
|
2042
|
+
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.',
|
|
1995
2043
|
},
|
|
1996
2044
|
location: {
|
|
1997
2045
|
filePath: 'src/ctx/commonExtras/field.ts',
|
|
1998
|
-
lineNumber:
|
|
2046
|
+
lineNumber: 24,
|
|
1999
2047
|
},
|
|
2000
2048
|
type: 'Field | undefined',
|
|
2001
2049
|
},
|
|
2002
2050
|
block: {
|
|
2003
2051
|
comment: {
|
|
2004
|
-
|
|
2052
|
+
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.',
|
|
2005
2053
|
},
|
|
2006
2054
|
location: {
|
|
2007
2055
|
filePath: 'src/ctx/commonExtras/field.ts',
|
|
2008
|
-
lineNumber:
|
|
2056
|
+
lineNumber: 30,
|
|
2009
2057
|
},
|
|
2010
2058
|
type: 'undefined | { id: string | undefined; blockModel: ItemType }',
|
|
2011
2059
|
},
|
|
@@ -2023,7 +2071,7 @@ exports.manifest = {
|
|
|
2023
2071
|
executeUploadsDropdownAction: {
|
|
2024
2072
|
name: 'executeUploadsDropdownAction',
|
|
2025
2073
|
comment: {
|
|
2026
|
-
|
|
2074
|
+
markdownText: 'Use this function to execute a particular dropdown action defined via\nthe `uploadsDropdownActions()` hook.',
|
|
2027
2075
|
tag: 'dropdownActions',
|
|
2028
2076
|
},
|
|
2029
2077
|
nonCtxArguments: [
|
|
@@ -2062,7 +2110,7 @@ exports.manifest = {
|
|
|
2062
2110
|
executeItemsDropdownAction: {
|
|
2063
2111
|
name: 'executeItemsDropdownAction',
|
|
2064
2112
|
comment: {
|
|
2065
|
-
|
|
2113
|
+
markdownText: 'Use this function to execute a particular dropdown action defined via\nthe `itemsDropdownActions()` hook.',
|
|
2066
2114
|
tag: 'dropdownActions',
|
|
2067
2115
|
},
|
|
2068
2116
|
nonCtxArguments: [
|
|
@@ -2101,7 +2149,7 @@ exports.manifest = {
|
|
|
2101
2149
|
executeItemFormDropdownAction: {
|
|
2102
2150
|
name: 'executeItemFormDropdownAction',
|
|
2103
2151
|
comment: {
|
|
2104
|
-
|
|
2152
|
+
markdownText: 'Use this function to execute a particular dropdown action defined via\nthe `itemFormDropdownActions()` hook.',
|
|
2105
2153
|
tag: 'dropdownActions',
|
|
2106
2154
|
},
|
|
2107
2155
|
nonCtxArguments: [
|
|
@@ -2114,10 +2162,14 @@ exports.manifest = {
|
|
|
2114
2162
|
type: 'Ctx',
|
|
2115
2163
|
additionalProperties: [
|
|
2116
2164
|
{
|
|
2165
|
+
name: 'ItemFormAdditionalProperties',
|
|
2166
|
+
comment: {
|
|
2167
|
+
markdownText: "These information describe the current state of the form that's being shown\nto the end-user to edit a record.",
|
|
2168
|
+
},
|
|
2117
2169
|
items: {
|
|
2118
2170
|
locale: {
|
|
2119
2171
|
comment: {
|
|
2120
|
-
|
|
2172
|
+
markdownText: 'The currently active locale for the record.',
|
|
2121
2173
|
},
|
|
2122
2174
|
location: {
|
|
2123
2175
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -2127,7 +2179,7 @@ exports.manifest = {
|
|
|
2127
2179
|
},
|
|
2128
2180
|
item: {
|
|
2129
2181
|
comment: {
|
|
2130
|
-
|
|
2182
|
+
markdownText: 'If an already persisted record is being edited, returns the full record\nentity.',
|
|
2131
2183
|
},
|
|
2132
2184
|
location: {
|
|
2133
2185
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -2137,7 +2189,7 @@ exports.manifest = {
|
|
|
2137
2189
|
},
|
|
2138
2190
|
itemType: {
|
|
2139
2191
|
comment: {
|
|
2140
|
-
|
|
2192
|
+
markdownText: 'The model for the record being edited.',
|
|
2141
2193
|
},
|
|
2142
2194
|
location: {
|
|
2143
2195
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -2147,7 +2199,7 @@ exports.manifest = {
|
|
|
2147
2199
|
},
|
|
2148
2200
|
formValues: {
|
|
2149
2201
|
comment: {
|
|
2150
|
-
|
|
2202
|
+
markdownText: 'The complete internal form state.',
|
|
2151
2203
|
},
|
|
2152
2204
|
location: {
|
|
2153
2205
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -2157,7 +2209,7 @@ exports.manifest = {
|
|
|
2157
2209
|
},
|
|
2158
2210
|
itemStatus: {
|
|
2159
2211
|
comment: {
|
|
2160
|
-
|
|
2212
|
+
markdownText: 'The current status of the record being edited.',
|
|
2161
2213
|
},
|
|
2162
2214
|
location: {
|
|
2163
2215
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -2167,7 +2219,7 @@ exports.manifest = {
|
|
|
2167
2219
|
},
|
|
2168
2220
|
isSubmitting: {
|
|
2169
2221
|
comment: {
|
|
2170
|
-
|
|
2222
|
+
markdownText: 'Whether the form is currently submitting itself or not.',
|
|
2171
2223
|
},
|
|
2172
2224
|
location: {
|
|
2173
2225
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -2177,7 +2229,7 @@ exports.manifest = {
|
|
|
2177
2229
|
},
|
|
2178
2230
|
isFormDirty: {
|
|
2179
2231
|
comment: {
|
|
2180
|
-
|
|
2232
|
+
markdownText: 'Whether the form has some non-persisted changes or not.',
|
|
2181
2233
|
},
|
|
2182
2234
|
location: {
|
|
2183
2235
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -2187,13 +2239,13 @@ exports.manifest = {
|
|
|
2187
2239
|
},
|
|
2188
2240
|
blocksAnalysis: {
|
|
2189
2241
|
comment: {
|
|
2190
|
-
|
|
2242
|
+
markdownText: 'Provides information on how many blocks are currently present in the form.',
|
|
2191
2243
|
},
|
|
2192
2244
|
location: {
|
|
2193
2245
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
2194
2246
|
lineNumber: 29,
|
|
2195
2247
|
},
|
|
2196
|
-
type: '
|
|
2248
|
+
type: 'BlocksAnalysis',
|
|
2197
2249
|
},
|
|
2198
2250
|
},
|
|
2199
2251
|
},
|
|
@@ -2211,81 +2263,85 @@ exports.manifest = {
|
|
|
2211
2263
|
],
|
|
2212
2264
|
additionalMethods: [
|
|
2213
2265
|
{
|
|
2266
|
+
name: 'ItemFormAdditionalMethods',
|
|
2267
|
+
comment: {
|
|
2268
|
+
markdownText: "These methods can be used to interact with the form that's being shown to the\nend-user to edit a record.",
|
|
2269
|
+
},
|
|
2214
2270
|
items: {
|
|
2215
2271
|
toggleField: {
|
|
2216
2272
|
comment: {
|
|
2217
|
-
|
|
2273
|
+
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.',
|
|
2218
2274
|
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);",
|
|
2219
2275
|
},
|
|
2220
2276
|
location: {
|
|
2221
2277
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
2222
|
-
lineNumber:
|
|
2278
|
+
lineNumber: 68,
|
|
2223
2279
|
},
|
|
2224
2280
|
type: '(path: string, show: boolean) => Promise<void>',
|
|
2225
2281
|
},
|
|
2226
2282
|
disableField: {
|
|
2227
2283
|
comment: {
|
|
2228
|
-
|
|
2284
|
+
markdownText: 'Disables/re-enables a specific field in the form.',
|
|
2229
2285
|
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);",
|
|
2230
2286
|
},
|
|
2231
2287
|
location: {
|
|
2232
2288
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
2233
|
-
lineNumber:
|
|
2289
|
+
lineNumber: 83,
|
|
2234
2290
|
},
|
|
2235
2291
|
type: '(path: string, disable: boolean) => Promise<void>',
|
|
2236
2292
|
},
|
|
2237
2293
|
scrollToField: {
|
|
2238
2294
|
comment: {
|
|
2239
|
-
|
|
2295
|
+
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.',
|
|
2240
2296
|
example: "const fieldPath = prompt(\n 'Please insert the path of a field in the form',\n ctx.fieldPath,\n);\n\nawait ctx.scrollToField(fieldPath);",
|
|
2241
2297
|
},
|
|
2242
2298
|
location: {
|
|
2243
2299
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
2244
|
-
lineNumber:
|
|
2300
|
+
lineNumber: 100,
|
|
2245
2301
|
},
|
|
2246
2302
|
type: '(path: string, locale?: string) => Promise<void>',
|
|
2247
2303
|
},
|
|
2248
2304
|
setFieldValue: {
|
|
2249
2305
|
comment: {
|
|
2250
|
-
|
|
2306
|
+
markdownText: 'Changes a specific path of the `formValues` object.',
|
|
2251
2307
|
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');",
|
|
2252
2308
|
},
|
|
2253
2309
|
location: {
|
|
2254
2310
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
2255
|
-
lineNumber:
|
|
2311
|
+
lineNumber: 115,
|
|
2256
2312
|
},
|
|
2257
2313
|
type: '(path: string, value: unknown) => Promise<void>',
|
|
2258
2314
|
},
|
|
2259
2315
|
formValuesToItem: {
|
|
2260
2316
|
comment: {
|
|
2261
|
-
|
|
2317
|
+
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`.',
|
|
2262
2318
|
example: 'await ctx.formValuesToItem(ctx.formValues, false);',
|
|
2263
2319
|
},
|
|
2264
2320
|
location: {
|
|
2265
2321
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
2266
|
-
lineNumber:
|
|
2322
|
+
lineNumber: 132,
|
|
2267
2323
|
},
|
|
2268
2324
|
type: "(\n formValues: Record<string, unknown>,\n skipUnchangedFields?: boolean,\n ) => Promise<Omit<Item, 'id' | 'meta'> | undefined>",
|
|
2269
2325
|
},
|
|
2270
2326
|
itemToFormValues: {
|
|
2271
2327
|
comment: {
|
|
2272
|
-
|
|
2328
|
+
markdownText: 'Takes an Item entity, and converts it into the internal form state.',
|
|
2273
2329
|
example: 'await ctx.itemToFormValues(ctx.item);',
|
|
2274
2330
|
},
|
|
2275
2331
|
location: {
|
|
2276
2332
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
2277
|
-
lineNumber:
|
|
2333
|
+
lineNumber: 145,
|
|
2278
2334
|
},
|
|
2279
2335
|
type: "(\n item: Omit<Item, 'id' | 'meta'>,\n ) => Promise<Record<string, unknown>>",
|
|
2280
2336
|
},
|
|
2281
2337
|
saveCurrentItem: {
|
|
2282
2338
|
comment: {
|
|
2283
|
-
|
|
2339
|
+
markdownText: 'Triggers a submit form for current record.',
|
|
2284
2340
|
example: 'await ctx.saveCurrentItem();',
|
|
2285
2341
|
},
|
|
2286
2342
|
location: {
|
|
2287
2343
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
2288
|
-
lineNumber:
|
|
2344
|
+
lineNumber: 157,
|
|
2289
2345
|
},
|
|
2290
2346
|
type: '(showToast?: boolean) => Promise<void>',
|
|
2291
2347
|
},
|
|
@@ -2302,7 +2358,7 @@ exports.manifest = {
|
|
|
2302
2358
|
executeFieldDropdownAction: {
|
|
2303
2359
|
name: 'executeFieldDropdownAction',
|
|
2304
2360
|
comment: {
|
|
2305
|
-
|
|
2361
|
+
markdownText: 'Use this function to execute a particular dropdown action defined via\nthe `fieldDropdownActions()` hook.',
|
|
2306
2362
|
tag: 'dropdownActions',
|
|
2307
2363
|
},
|
|
2308
2364
|
nonCtxArguments: [
|
|
@@ -2315,10 +2371,14 @@ exports.manifest = {
|
|
|
2315
2371
|
type: 'Ctx',
|
|
2316
2372
|
additionalProperties: [
|
|
2317
2373
|
{
|
|
2374
|
+
name: 'ItemFormAdditionalProperties',
|
|
2375
|
+
comment: {
|
|
2376
|
+
markdownText: "These information describe the current state of the form that's being shown\nto the end-user to edit a record.",
|
|
2377
|
+
},
|
|
2318
2378
|
items: {
|
|
2319
2379
|
locale: {
|
|
2320
2380
|
comment: {
|
|
2321
|
-
|
|
2381
|
+
markdownText: 'The currently active locale for the record.',
|
|
2322
2382
|
},
|
|
2323
2383
|
location: {
|
|
2324
2384
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -2328,7 +2388,7 @@ exports.manifest = {
|
|
|
2328
2388
|
},
|
|
2329
2389
|
item: {
|
|
2330
2390
|
comment: {
|
|
2331
|
-
|
|
2391
|
+
markdownText: 'If an already persisted record is being edited, returns the full record\nentity.',
|
|
2332
2392
|
},
|
|
2333
2393
|
location: {
|
|
2334
2394
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -2338,7 +2398,7 @@ exports.manifest = {
|
|
|
2338
2398
|
},
|
|
2339
2399
|
itemType: {
|
|
2340
2400
|
comment: {
|
|
2341
|
-
|
|
2401
|
+
markdownText: 'The model for the record being edited.',
|
|
2342
2402
|
},
|
|
2343
2403
|
location: {
|
|
2344
2404
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -2348,7 +2408,7 @@ exports.manifest = {
|
|
|
2348
2408
|
},
|
|
2349
2409
|
formValues: {
|
|
2350
2410
|
comment: {
|
|
2351
|
-
|
|
2411
|
+
markdownText: 'The complete internal form state.',
|
|
2352
2412
|
},
|
|
2353
2413
|
location: {
|
|
2354
2414
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -2358,7 +2418,7 @@ exports.manifest = {
|
|
|
2358
2418
|
},
|
|
2359
2419
|
itemStatus: {
|
|
2360
2420
|
comment: {
|
|
2361
|
-
|
|
2421
|
+
markdownText: 'The current status of the record being edited.',
|
|
2362
2422
|
},
|
|
2363
2423
|
location: {
|
|
2364
2424
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -2368,7 +2428,7 @@ exports.manifest = {
|
|
|
2368
2428
|
},
|
|
2369
2429
|
isSubmitting: {
|
|
2370
2430
|
comment: {
|
|
2371
|
-
|
|
2431
|
+
markdownText: 'Whether the form is currently submitting itself or not.',
|
|
2372
2432
|
},
|
|
2373
2433
|
location: {
|
|
2374
2434
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -2378,7 +2438,7 @@ exports.manifest = {
|
|
|
2378
2438
|
},
|
|
2379
2439
|
isFormDirty: {
|
|
2380
2440
|
comment: {
|
|
2381
|
-
|
|
2441
|
+
markdownText: 'Whether the form has some non-persisted changes or not.',
|
|
2382
2442
|
},
|
|
2383
2443
|
location: {
|
|
2384
2444
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
@@ -2388,65 +2448,69 @@ exports.manifest = {
|
|
|
2388
2448
|
},
|
|
2389
2449
|
blocksAnalysis: {
|
|
2390
2450
|
comment: {
|
|
2391
|
-
|
|
2451
|
+
markdownText: 'Provides information on how many blocks are currently present in the form.',
|
|
2392
2452
|
},
|
|
2393
2453
|
location: {
|
|
2394
2454
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
2395
2455
|
lineNumber: 29,
|
|
2396
2456
|
},
|
|
2397
|
-
type: '
|
|
2457
|
+
type: 'BlocksAnalysis',
|
|
2398
2458
|
},
|
|
2399
2459
|
},
|
|
2400
2460
|
},
|
|
2401
2461
|
{
|
|
2462
|
+
name: 'FieldAdditionalProperties',
|
|
2463
|
+
comment: {
|
|
2464
|
+
markdownText: 'These information describe the current state of the field where this plugin\nis applied to.',
|
|
2465
|
+
},
|
|
2402
2466
|
items: {
|
|
2403
2467
|
disabled: {
|
|
2404
2468
|
comment: {
|
|
2405
|
-
|
|
2469
|
+
markdownText: 'Whether the field is currently disabled or not.',
|
|
2406
2470
|
},
|
|
2407
2471
|
location: {
|
|
2408
2472
|
filePath: 'src/ctx/commonExtras/field.ts',
|
|
2409
|
-
lineNumber:
|
|
2473
|
+
lineNumber: 12,
|
|
2410
2474
|
},
|
|
2411
2475
|
type: 'boolean',
|
|
2412
2476
|
},
|
|
2413
2477
|
fieldPath: {
|
|
2414
2478
|
comment: {
|
|
2415
|
-
|
|
2479
|
+
markdownText: 'The path in the `formValues` object where to find the current value for the\nfield.',
|
|
2416
2480
|
},
|
|
2417
2481
|
location: {
|
|
2418
2482
|
filePath: 'src/ctx/commonExtras/field.ts',
|
|
2419
|
-
lineNumber:
|
|
2483
|
+
lineNumber: 17,
|
|
2420
2484
|
},
|
|
2421
2485
|
type: 'string',
|
|
2422
2486
|
},
|
|
2423
2487
|
field: {
|
|
2424
2488
|
comment: {
|
|
2425
|
-
|
|
2489
|
+
markdownText: 'The field where the field extension is installed to.',
|
|
2426
2490
|
},
|
|
2427
2491
|
location: {
|
|
2428
2492
|
filePath: 'src/ctx/commonExtras/field.ts',
|
|
2429
|
-
lineNumber:
|
|
2493
|
+
lineNumber: 19,
|
|
2430
2494
|
},
|
|
2431
2495
|
type: 'Field',
|
|
2432
2496
|
},
|
|
2433
2497
|
parentField: {
|
|
2434
2498
|
comment: {
|
|
2435
|
-
|
|
2499
|
+
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.',
|
|
2436
2500
|
},
|
|
2437
2501
|
location: {
|
|
2438
2502
|
filePath: 'src/ctx/commonExtras/field.ts',
|
|
2439
|
-
lineNumber:
|
|
2503
|
+
lineNumber: 24,
|
|
2440
2504
|
},
|
|
2441
2505
|
type: 'Field | undefined',
|
|
2442
2506
|
},
|
|
2443
2507
|
block: {
|
|
2444
2508
|
comment: {
|
|
2445
|
-
|
|
2509
|
+
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.',
|
|
2446
2510
|
},
|
|
2447
2511
|
location: {
|
|
2448
2512
|
filePath: 'src/ctx/commonExtras/field.ts',
|
|
2449
|
-
lineNumber:
|
|
2513
|
+
lineNumber: 30,
|
|
2450
2514
|
},
|
|
2451
2515
|
type: 'undefined | { id: string | undefined; blockModel: ItemType }',
|
|
2452
2516
|
},
|
|
@@ -2466,81 +2530,85 @@ exports.manifest = {
|
|
|
2466
2530
|
],
|
|
2467
2531
|
additionalMethods: [
|
|
2468
2532
|
{
|
|
2533
|
+
name: 'ItemFormAdditionalMethods',
|
|
2534
|
+
comment: {
|
|
2535
|
+
markdownText: "These methods can be used to interact with the form that's being shown to the\nend-user to edit a record.",
|
|
2536
|
+
},
|
|
2469
2537
|
items: {
|
|
2470
2538
|
toggleField: {
|
|
2471
2539
|
comment: {
|
|
2472
|
-
|
|
2540
|
+
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.',
|
|
2473
2541
|
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);",
|
|
2474
2542
|
},
|
|
2475
2543
|
location: {
|
|
2476
2544
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
2477
|
-
lineNumber:
|
|
2545
|
+
lineNumber: 68,
|
|
2478
2546
|
},
|
|
2479
2547
|
type: '(path: string, show: boolean) => Promise<void>',
|
|
2480
2548
|
},
|
|
2481
2549
|
disableField: {
|
|
2482
2550
|
comment: {
|
|
2483
|
-
|
|
2551
|
+
markdownText: 'Disables/re-enables a specific field in the form.',
|
|
2484
2552
|
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);",
|
|
2485
2553
|
},
|
|
2486
2554
|
location: {
|
|
2487
2555
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
2488
|
-
lineNumber:
|
|
2556
|
+
lineNumber: 83,
|
|
2489
2557
|
},
|
|
2490
2558
|
type: '(path: string, disable: boolean) => Promise<void>',
|
|
2491
2559
|
},
|
|
2492
2560
|
scrollToField: {
|
|
2493
2561
|
comment: {
|
|
2494
|
-
|
|
2562
|
+
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.',
|
|
2495
2563
|
example: "const fieldPath = prompt(\n 'Please insert the path of a field in the form',\n ctx.fieldPath,\n);\n\nawait ctx.scrollToField(fieldPath);",
|
|
2496
2564
|
},
|
|
2497
2565
|
location: {
|
|
2498
2566
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
2499
|
-
lineNumber:
|
|
2567
|
+
lineNumber: 100,
|
|
2500
2568
|
},
|
|
2501
2569
|
type: '(path: string, locale?: string) => Promise<void>',
|
|
2502
2570
|
},
|
|
2503
2571
|
setFieldValue: {
|
|
2504
2572
|
comment: {
|
|
2505
|
-
|
|
2573
|
+
markdownText: 'Changes a specific path of the `formValues` object.',
|
|
2506
2574
|
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');",
|
|
2507
2575
|
},
|
|
2508
2576
|
location: {
|
|
2509
2577
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
2510
|
-
lineNumber:
|
|
2578
|
+
lineNumber: 115,
|
|
2511
2579
|
},
|
|
2512
2580
|
type: '(path: string, value: unknown) => Promise<void>',
|
|
2513
2581
|
},
|
|
2514
2582
|
formValuesToItem: {
|
|
2515
2583
|
comment: {
|
|
2516
|
-
|
|
2584
|
+
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`.',
|
|
2517
2585
|
example: 'await ctx.formValuesToItem(ctx.formValues, false);',
|
|
2518
2586
|
},
|
|
2519
2587
|
location: {
|
|
2520
2588
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
2521
|
-
lineNumber:
|
|
2589
|
+
lineNumber: 132,
|
|
2522
2590
|
},
|
|
2523
2591
|
type: "(\n formValues: Record<string, unknown>,\n skipUnchangedFields?: boolean,\n ) => Promise<Omit<Item, 'id' | 'meta'> | undefined>",
|
|
2524
2592
|
},
|
|
2525
2593
|
itemToFormValues: {
|
|
2526
2594
|
comment: {
|
|
2527
|
-
|
|
2595
|
+
markdownText: 'Takes an Item entity, and converts it into the internal form state.',
|
|
2528
2596
|
example: 'await ctx.itemToFormValues(ctx.item);',
|
|
2529
2597
|
},
|
|
2530
2598
|
location: {
|
|
2531
2599
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
2532
|
-
lineNumber:
|
|
2600
|
+
lineNumber: 145,
|
|
2533
2601
|
},
|
|
2534
2602
|
type: "(\n item: Omit<Item, 'id' | 'meta'>,\n ) => Promise<Record<string, unknown>>",
|
|
2535
2603
|
},
|
|
2536
2604
|
saveCurrentItem: {
|
|
2537
2605
|
comment: {
|
|
2538
|
-
|
|
2606
|
+
markdownText: 'Triggers a submit form for current record.',
|
|
2539
2607
|
example: 'await ctx.saveCurrentItem();',
|
|
2540
2608
|
},
|
|
2541
2609
|
location: {
|
|
2542
2610
|
filePath: 'src/ctx/commonExtras/itemForm.ts',
|
|
2543
|
-
lineNumber:
|
|
2611
|
+
lineNumber: 157,
|
|
2544
2612
|
},
|
|
2545
2613
|
type: '(showToast?: boolean) => Promise<void>',
|
|
2546
2614
|
},
|
|
@@ -2557,7 +2625,7 @@ exports.manifest = {
|
|
|
2557
2625
|
customMarksForStructuredTextField: {
|
|
2558
2626
|
name: 'customMarksForStructuredTextField',
|
|
2559
2627
|
comment: {
|
|
2560
|
-
|
|
2628
|
+
markdownText: 'Use this function to define a number of custom marks for a specific\nStructured Text field.',
|
|
2561
2629
|
tag: 'structuredText',
|
|
2562
2630
|
},
|
|
2563
2631
|
nonCtxArguments: [
|
|
@@ -2592,7 +2660,7 @@ exports.manifest = {
|
|
|
2592
2660
|
customBlockStylesForStructuredTextField: {
|
|
2593
2661
|
name: 'customBlockStylesForStructuredTextField',
|
|
2594
2662
|
comment: {
|
|
2595
|
-
|
|
2663
|
+
markdownText: 'Use this function to define a number of custom block styles for a specific\nStructured Text field.',
|
|
2596
2664
|
tag: 'structuredText',
|
|
2597
2665
|
},
|
|
2598
2666
|
nonCtxArguments: [
|
|
@@ -2627,7 +2695,7 @@ exports.manifest = {
|
|
|
2627
2695
|
contentAreaSidebarItems: {
|
|
2628
2696
|
name: 'contentAreaSidebarItems',
|
|
2629
2697
|
comment: {
|
|
2630
|
-
|
|
2698
|
+
markdownText: 'Use this function to declare new items in the content area sidebar.',
|
|
2631
2699
|
tag: 'sidebarItems',
|
|
2632
2700
|
},
|
|
2633
2701
|
nonCtxArguments: [],
|
|
@@ -2645,7 +2713,7 @@ exports.manifest = {
|
|
|
2645
2713
|
buildItemPresentationInfo: {
|
|
2646
2714
|
name: 'buildItemPresentationInfo',
|
|
2647
2715
|
comment: {
|
|
2648
|
-
|
|
2716
|
+
markdownText: 'Use this function to customize the presentation of a record in records\ncollections and "Single link" or "Multiple links" field.',
|
|
2649
2717
|
tag: 'presentation',
|
|
2650
2718
|
},
|
|
2651
2719
|
nonCtxArguments: [
|
|
@@ -2668,7 +2736,7 @@ exports.manifest = {
|
|
|
2668
2736
|
assetSources: {
|
|
2669
2737
|
name: 'assetSources',
|
|
2670
2738
|
comment: {
|
|
2671
|
-
|
|
2739
|
+
markdownText: 'Use this function to declare additional sources to be shown when users want\nto upload new assets.',
|
|
2672
2740
|
tag: 'assetSources',
|
|
2673
2741
|
},
|
|
2674
2742
|
nonCtxArguments: [],
|
|
@@ -2689,12 +2757,12 @@ exports.manifest = {
|
|
|
2689
2757
|
{
|
|
2690
2758
|
name: 'PluginProperties',
|
|
2691
2759
|
comment: {
|
|
2692
|
-
|
|
2760
|
+
markdownText: "Information about the current plugin. Useful to access the plugin's global\nconfiguration object.",
|
|
2693
2761
|
},
|
|
2694
2762
|
items: {
|
|
2695
2763
|
plugin: {
|
|
2696
2764
|
comment: {
|
|
2697
|
-
|
|
2765
|
+
markdownText: 'The current plugin.',
|
|
2698
2766
|
},
|
|
2699
2767
|
location: {
|
|
2700
2768
|
filePath: 'src/ctx/base.ts',
|
|
@@ -2707,12 +2775,12 @@ exports.manifest = {
|
|
|
2707
2775
|
{
|
|
2708
2776
|
name: 'AuthenticationProperties',
|
|
2709
2777
|
comment: {
|
|
2710
|
-
|
|
2778
|
+
markdownText: 'Information about the current user using the CMS.',
|
|
2711
2779
|
},
|
|
2712
2780
|
items: {
|
|
2713
2781
|
currentUser: {
|
|
2714
2782
|
comment: {
|
|
2715
|
-
|
|
2783
|
+
markdownText: 'The current DatoCMS user. It can either be the owner or one of the\ncollaborators (regular or SSO).',
|
|
2716
2784
|
},
|
|
2717
2785
|
location: {
|
|
2718
2786
|
filePath: 'src/ctx/base.ts',
|
|
@@ -2722,7 +2790,7 @@ exports.manifest = {
|
|
|
2722
2790
|
},
|
|
2723
2791
|
currentRole: {
|
|
2724
2792
|
comment: {
|
|
2725
|
-
|
|
2793
|
+
markdownText: 'The role for the current DatoCMS user.',
|
|
2726
2794
|
},
|
|
2727
2795
|
location: {
|
|
2728
2796
|
filePath: 'src/ctx/base.ts',
|
|
@@ -2732,7 +2800,7 @@ exports.manifest = {
|
|
|
2732
2800
|
},
|
|
2733
2801
|
currentUserAccessToken: {
|
|
2734
2802
|
comment: {
|
|
2735
|
-
|
|
2803
|
+
markdownText: 'The access token to perform API calls on behalf of the current user. Only\navailable if `currentUserAccessToken` additional permission is granted.',
|
|
2736
2804
|
},
|
|
2737
2805
|
location: {
|
|
2738
2806
|
filePath: 'src/ctx/base.ts',
|
|
@@ -2747,7 +2815,7 @@ exports.manifest = {
|
|
|
2747
2815
|
items: {
|
|
2748
2816
|
site: {
|
|
2749
2817
|
comment: {
|
|
2750
|
-
|
|
2818
|
+
markdownText: 'The current DatoCMS project.',
|
|
2751
2819
|
},
|
|
2752
2820
|
location: {
|
|
2753
2821
|
filePath: 'src/ctx/base.ts',
|
|
@@ -2757,7 +2825,7 @@ exports.manifest = {
|
|
|
2757
2825
|
},
|
|
2758
2826
|
environment: {
|
|
2759
2827
|
comment: {
|
|
2760
|
-
|
|
2828
|
+
markdownText: 'The ID of the current environment.',
|
|
2761
2829
|
},
|
|
2762
2830
|
location: {
|
|
2763
2831
|
filePath: 'src/ctx/base.ts',
|
|
@@ -2767,7 +2835,7 @@ exports.manifest = {
|
|
|
2767
2835
|
},
|
|
2768
2836
|
owner: {
|
|
2769
2837
|
comment: {
|
|
2770
|
-
|
|
2838
|
+
markdownText: 'The account/organization that is the project owner.',
|
|
2771
2839
|
},
|
|
2772
2840
|
location: {
|
|
2773
2841
|
filePath: 'src/ctx/base.ts',
|
|
@@ -2777,7 +2845,8 @@ exports.manifest = {
|
|
|
2777
2845
|
},
|
|
2778
2846
|
account: {
|
|
2779
2847
|
comment: {
|
|
2780
|
-
|
|
2848
|
+
markdownText: 'The account that is the project owner.',
|
|
2849
|
+
deprecatedMarkdownText: 'Please use `.owner` instead, as the project owner can also be\nan organization',
|
|
2781
2850
|
},
|
|
2782
2851
|
location: {
|
|
2783
2852
|
filePath: 'src/ctx/base.ts',
|
|
@@ -2787,7 +2856,7 @@ exports.manifest = {
|
|
|
2787
2856
|
},
|
|
2788
2857
|
ui: {
|
|
2789
2858
|
comment: {
|
|
2790
|
-
|
|
2859
|
+
markdownText: 'UI preferences of the current user (right now, only the preferred locale is\navailable).',
|
|
2791
2860
|
},
|
|
2792
2861
|
location: {
|
|
2793
2862
|
filePath: 'src/ctx/base.ts',
|
|
@@ -2797,7 +2866,7 @@ exports.manifest = {
|
|
|
2797
2866
|
},
|
|
2798
2867
|
theme: {
|
|
2799
2868
|
comment: {
|
|
2800
|
-
|
|
2869
|
+
markdownText: 'An object containing the theme colors for the current DatoCMS project.',
|
|
2801
2870
|
},
|
|
2802
2871
|
location: {
|
|
2803
2872
|
filePath: 'src/ctx/base.ts',
|
|
@@ -2810,12 +2879,12 @@ exports.manifest = {
|
|
|
2810
2879
|
{
|
|
2811
2880
|
name: 'EntityReposProperties',
|
|
2812
2881
|
comment: {
|
|
2813
|
-
|
|
2882
|
+
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.',
|
|
2814
2883
|
},
|
|
2815
2884
|
items: {
|
|
2816
2885
|
itemTypes: {
|
|
2817
2886
|
comment: {
|
|
2818
|
-
|
|
2887
|
+
markdownText: 'All the models of the current DatoCMS project, indexed by ID.',
|
|
2819
2888
|
},
|
|
2820
2889
|
location: {
|
|
2821
2890
|
filePath: 'src/ctx/base.ts',
|
|
@@ -2825,7 +2894,7 @@ exports.manifest = {
|
|
|
2825
2894
|
},
|
|
2826
2895
|
fields: {
|
|
2827
2896
|
comment: {
|
|
2828
|
-
|
|
2897
|
+
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.',
|
|
2829
2898
|
},
|
|
2830
2899
|
location: {
|
|
2831
2900
|
filePath: 'src/ctx/base.ts',
|
|
@@ -2835,7 +2904,7 @@ exports.manifest = {
|
|
|
2835
2904
|
},
|
|
2836
2905
|
fieldsets: {
|
|
2837
2906
|
comment: {
|
|
2838
|
-
|
|
2907
|
+
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.',
|
|
2839
2908
|
},
|
|
2840
2909
|
location: {
|
|
2841
2910
|
filePath: 'src/ctx/base.ts',
|
|
@@ -2845,7 +2914,7 @@ exports.manifest = {
|
|
|
2845
2914
|
},
|
|
2846
2915
|
users: {
|
|
2847
2916
|
comment: {
|
|
2848
|
-
|
|
2917
|
+
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.',
|
|
2849
2918
|
},
|
|
2850
2919
|
location: {
|
|
2851
2920
|
filePath: 'src/ctx/base.ts',
|
|
@@ -2855,7 +2924,7 @@ exports.manifest = {
|
|
|
2855
2924
|
},
|
|
2856
2925
|
ssoUsers: {
|
|
2857
2926
|
comment: {
|
|
2858
|
-
|
|
2927
|
+
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.',
|
|
2859
2928
|
},
|
|
2860
2929
|
location: {
|
|
2861
2930
|
filePath: 'src/ctx/base.ts',
|
|
@@ -2870,12 +2939,12 @@ exports.manifest = {
|
|
|
2870
2939
|
{
|
|
2871
2940
|
name: 'LoadDataMethods',
|
|
2872
2941
|
comment: {
|
|
2873
|
-
|
|
2942
|
+
markdownText: 'These methods can be used to asyncronously load additional information your\nplugin needs to work.',
|
|
2874
2943
|
},
|
|
2875
2944
|
items: {
|
|
2876
2945
|
loadItemTypeFields: {
|
|
2877
2946
|
comment: {
|
|
2878
|
-
|
|
2947
|
+
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.',
|
|
2879
2948
|
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);",
|
|
2880
2949
|
},
|
|
2881
2950
|
location: {
|
|
@@ -2886,7 +2955,7 @@ exports.manifest = {
|
|
|
2886
2955
|
},
|
|
2887
2956
|
loadItemTypeFieldsets: {
|
|
2888
2957
|
comment: {
|
|
2889
|
-
|
|
2958
|
+
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.',
|
|
2890
2959
|
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);",
|
|
2891
2960
|
},
|
|
2892
2961
|
location: {
|
|
@@ -2897,7 +2966,7 @@ exports.manifest = {
|
|
|
2897
2966
|
},
|
|
2898
2967
|
loadFieldsUsingPlugin: {
|
|
2899
2968
|
comment: {
|
|
2900
|
-
|
|
2969
|
+
markdownText: 'Loads all the fields in the project that are currently using the plugin for\none of its manual field extensions.',
|
|
2901
2970
|
example: "const fields = await ctx.loadFieldsUsingPlugin();\n\nctx.notice(\n `Success! ${fields\n .map((field) => field.attributes.api_key)\n .join(', ')}`,\n);",
|
|
2902
2971
|
},
|
|
2903
2972
|
location: {
|
|
@@ -2908,7 +2977,7 @@ exports.manifest = {
|
|
|
2908
2977
|
},
|
|
2909
2978
|
loadUsers: {
|
|
2910
2979
|
comment: {
|
|
2911
|
-
|
|
2980
|
+
markdownText: 'Loads all regular users. Users will be returned and will also be available\nin the the `users` property.',
|
|
2912
2981
|
example: "const users = await ctx.loadUsers();\n\nctx.notice(`Success! ${users.map((user) => user.id).join(', ')}`);",
|
|
2913
2982
|
},
|
|
2914
2983
|
location: {
|
|
@@ -2919,7 +2988,7 @@ exports.manifest = {
|
|
|
2919
2988
|
},
|
|
2920
2989
|
loadSsoUsers: {
|
|
2921
2990
|
comment: {
|
|
2922
|
-
|
|
2991
|
+
markdownText: 'Loads all SSO users. Users will be returned and will also be available in\nthe the `ssoUsers` property.',
|
|
2923
2992
|
example: "const users = await ctx.loadSsoUsers();\n\nctx.notice(`Success! ${users.map((user) => user.id).join(', ')}`);",
|
|
2924
2993
|
},
|
|
2925
2994
|
location: {
|
|
@@ -2933,12 +3002,12 @@ exports.manifest = {
|
|
|
2933
3002
|
{
|
|
2934
3003
|
name: 'UpdatePluginParametersMethods',
|
|
2935
3004
|
comment: {
|
|
2936
|
-
|
|
3005
|
+
markdownText: 'These methods can be used to update both plugin parameters and manual field\nextensions configuration.',
|
|
2937
3006
|
},
|
|
2938
3007
|
items: {
|
|
2939
3008
|
updatePluginParameters: {
|
|
2940
3009
|
comment: {
|
|
2941
|
-
|
|
3010
|
+
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.',
|
|
2942
3011
|
example: "await ctx.updatePluginParameters({ debugMode: true });\nawait ctx.notice('Plugin parameters successfully updated!');",
|
|
2943
3012
|
},
|
|
2944
3013
|
location: {
|
|
@@ -2949,7 +3018,7 @@ exports.manifest = {
|
|
|
2949
3018
|
},
|
|
2950
3019
|
updateFieldAppearance: {
|
|
2951
3020
|
comment: {
|
|
2952
|
-
|
|
3021
|
+
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.',
|
|
2953
3022
|
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}",
|
|
2954
3023
|
},
|
|
2955
3024
|
location: {
|
|
@@ -2963,12 +3032,12 @@ exports.manifest = {
|
|
|
2963
3032
|
{
|
|
2964
3033
|
name: 'ToastMethods',
|
|
2965
3034
|
comment: {
|
|
2966
|
-
|
|
3035
|
+
markdownText: 'These methods can be used to show UI-consistent toast notifications to the\nend-user.',
|
|
2967
3036
|
},
|
|
2968
3037
|
items: {
|
|
2969
3038
|
alert: {
|
|
2970
3039
|
comment: {
|
|
2971
|
-
|
|
3040
|
+
markdownText: 'Triggers an "error" toast displaying the selected message.',
|
|
2972
3041
|
example: "const message = prompt(\n 'Please insert a message:',\n 'This is an alert message!',\n);\n\nawait ctx.alert(message);",
|
|
2973
3042
|
},
|
|
2974
3043
|
location: {
|
|
@@ -2979,7 +3048,7 @@ exports.manifest = {
|
|
|
2979
3048
|
},
|
|
2980
3049
|
notice: {
|
|
2981
3050
|
comment: {
|
|
2982
|
-
|
|
3051
|
+
markdownText: 'Triggers a "success" toast displaying the selected message.',
|
|
2983
3052
|
example: "const message = prompt(\n 'Please insert a message:',\n 'This is a notice message!',\n);\n\nawait ctx.notice(message);",
|
|
2984
3053
|
},
|
|
2985
3054
|
location: {
|
|
@@ -2990,7 +3059,7 @@ exports.manifest = {
|
|
|
2990
3059
|
},
|
|
2991
3060
|
customToast: {
|
|
2992
3061
|
comment: {
|
|
2993
|
-
|
|
3062
|
+
markdownText: 'Triggers a custom toast displaying the selected message (and optionally a\nCTA).',
|
|
2994
3063
|
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}",
|
|
2995
3064
|
},
|
|
2996
3065
|
location: {
|
|
@@ -3004,12 +3073,12 @@ exports.manifest = {
|
|
|
3004
3073
|
{
|
|
3005
3074
|
name: 'ItemDialogMethods',
|
|
3006
3075
|
comment: {
|
|
3007
|
-
|
|
3076
|
+
markdownText: 'These methods let you open the standard DatoCMS dialogs needed to interact\nwith records.',
|
|
3008
3077
|
},
|
|
3009
3078
|
items: {
|
|
3010
3079
|
createNewItem: {
|
|
3011
3080
|
comment: {
|
|
3012
|
-
|
|
3081
|
+
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.',
|
|
3013
3082
|
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}",
|
|
3014
3083
|
},
|
|
3015
3084
|
location: {
|
|
@@ -3020,7 +3089,7 @@ exports.manifest = {
|
|
|
3020
3089
|
},
|
|
3021
3090
|
selectItem: {
|
|
3022
3091
|
comment: {
|
|
3023
|
-
|
|
3092
|
+
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.',
|
|
3024
3093
|
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}",
|
|
3025
3094
|
},
|
|
3026
3095
|
location: {
|
|
@@ -3031,7 +3100,7 @@ exports.manifest = {
|
|
|
3031
3100
|
},
|
|
3032
3101
|
editItem: {
|
|
3033
3102
|
comment: {
|
|
3034
|
-
|
|
3103
|
+
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.',
|
|
3035
3104
|
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}",
|
|
3036
3105
|
},
|
|
3037
3106
|
location: {
|
|
@@ -3045,12 +3114,12 @@ exports.manifest = {
|
|
|
3045
3114
|
{
|
|
3046
3115
|
name: 'UploadDialogMethods',
|
|
3047
3116
|
comment: {
|
|
3048
|
-
|
|
3117
|
+
markdownText: 'These methods let you open the standard DatoCMS dialogs needed to interact\nwith Media Area assets.',
|
|
3049
3118
|
},
|
|
3050
3119
|
items: {
|
|
3051
3120
|
selectUpload: {
|
|
3052
3121
|
comment: {
|
|
3053
|
-
|
|
3122
|
+
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.',
|
|
3054
3123
|
example: "const item = await ctx.selectUpload({ multiple: false });\n\nif (item) {\n ctx.notice(`Success! ${item.id}`);\n} else {\n ctx.alert('Closed!');\n}",
|
|
3055
3124
|
},
|
|
3056
3125
|
location: {
|
|
@@ -3061,7 +3130,7 @@ exports.manifest = {
|
|
|
3061
3130
|
},
|
|
3062
3131
|
editUpload: {
|
|
3063
3132
|
comment: {
|
|
3064
|
-
|
|
3133
|
+
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.',
|
|
3065
3134
|
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}",
|
|
3066
3135
|
},
|
|
3067
3136
|
location: {
|
|
@@ -3072,7 +3141,7 @@ exports.manifest = {
|
|
|
3072
3141
|
},
|
|
3073
3142
|
editUploadMetadata: {
|
|
3074
3143
|
comment: {
|
|
3075
|
-
|
|
3144
|
+
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.',
|
|
3076
3145
|
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}",
|
|
3077
3146
|
},
|
|
3078
3147
|
location: {
|
|
@@ -3086,12 +3155,12 @@ exports.manifest = {
|
|
|
3086
3155
|
{
|
|
3087
3156
|
name: 'CustomDialogMethods',
|
|
3088
3157
|
comment: {
|
|
3089
|
-
|
|
3158
|
+
markdownText: 'These methods can be used to open custom dialogs/confirmation panels.',
|
|
3090
3159
|
},
|
|
3091
3160
|
items: {
|
|
3092
3161
|
openModal: {
|
|
3093
3162
|
comment: {
|
|
3094
|
-
|
|
3163
|
+
markdownText: 'Opens a custom modal. Returns a promise resolved with what the modal itself\nreturns calling the `resolve()` function.',
|
|
3095
3164
|
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}",
|
|
3096
3165
|
},
|
|
3097
3166
|
location: {
|
|
@@ -3102,7 +3171,7 @@ exports.manifest = {
|
|
|
3102
3171
|
},
|
|
3103
3172
|
openConfirm: {
|
|
3104
3173
|
comment: {
|
|
3105
|
-
|
|
3174
|
+
markdownText: 'Opens a UI-consistent confirmation dialog. Returns a promise resolved with\nthe value of the choice made by the user.',
|
|
3106
3175
|
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}",
|
|
3107
3176
|
},
|
|
3108
3177
|
location: {
|
|
@@ -3116,12 +3185,12 @@ exports.manifest = {
|
|
|
3116
3185
|
{
|
|
3117
3186
|
name: 'NavigateMethods',
|
|
3118
3187
|
comment: {
|
|
3119
|
-
|
|
3188
|
+
markdownText: 'These methods can be used to take the user to different pages.',
|
|
3120
3189
|
},
|
|
3121
3190
|
items: {
|
|
3122
3191
|
navigateTo: {
|
|
3123
3192
|
comment: {
|
|
3124
|
-
|
|
3193
|
+
markdownText: 'Moves the user to another URL internal to the backend.',
|
|
3125
3194
|
example: "await ctx.navigateTo('/');",
|
|
3126
3195
|
},
|
|
3127
3196
|
location: {
|
|
@@ -3135,34 +3204,38 @@ exports.manifest = {
|
|
|
3135
3204
|
],
|
|
3136
3205
|
},
|
|
3137
3206
|
selfResizingPluginFrameCtxSizingUtilities: {
|
|
3207
|
+
name: 'SizingUtilities',
|
|
3208
|
+
comment: {
|
|
3209
|
+
markdownText: 'A number of methods that you can use to control the size of the plugin frame.',
|
|
3210
|
+
},
|
|
3138
3211
|
items: {
|
|
3139
3212
|
startAutoResizer: {
|
|
3140
3213
|
comment: {
|
|
3141
|
-
|
|
3214
|
+
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.",
|
|
3142
3215
|
},
|
|
3143
3216
|
location: {
|
|
3144
3217
|
filePath: 'src/ctx/commonExtras/sizing.ts',
|
|
3145
|
-
lineNumber:
|
|
3218
|
+
lineNumber: 8,
|
|
3146
3219
|
},
|
|
3147
3220
|
type: '() => void',
|
|
3148
3221
|
},
|
|
3149
3222
|
stopAutoResizer: {
|
|
3150
3223
|
comment: {
|
|
3151
|
-
|
|
3224
|
+
markdownText: 'Stops resizing the iframe automatically.',
|
|
3152
3225
|
},
|
|
3153
3226
|
location: {
|
|
3154
3227
|
filePath: 'src/ctx/commonExtras/sizing.ts',
|
|
3155
|
-
lineNumber:
|
|
3228
|
+
lineNumber: 11,
|
|
3156
3229
|
},
|
|
3157
3230
|
type: '() => void',
|
|
3158
3231
|
},
|
|
3159
3232
|
updateHeight: {
|
|
3160
3233
|
comment: {
|
|
3161
|
-
|
|
3234
|
+
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.",
|
|
3162
3235
|
},
|
|
3163
3236
|
location: {
|
|
3164
3237
|
filePath: 'src/ctx/commonExtras/sizing.ts',
|
|
3165
|
-
lineNumber:
|
|
3238
|
+
lineNumber: 18,
|
|
3166
3239
|
},
|
|
3167
3240
|
type: '(newHeight?: number) => void',
|
|
3168
3241
|
},
|