lucid-extension-sdk 0.0.163 → 0.0.165
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/commandtypes.d.ts
CHANGED
|
@@ -75,6 +75,7 @@ export declare const enum CommandName {
|
|
|
75
75
|
HookSelection = "hs",
|
|
76
76
|
HookTextEdit = "hte",
|
|
77
77
|
ImportCards = "ic",
|
|
78
|
+
ImportPage = "imp",
|
|
78
79
|
KillExtension = "k",
|
|
79
80
|
ListBlocks = "lb",
|
|
80
81
|
ListCollectionFields = "lcf",
|
|
@@ -357,6 +358,10 @@ export declare type CommandArgs = {
|
|
|
357
358
|
query: ImportCardsQuery;
|
|
358
359
|
result: ImportCardsResult;
|
|
359
360
|
};
|
|
361
|
+
[CommandName.ImportPage]: {
|
|
362
|
+
query: ImportPageQuery;
|
|
363
|
+
result: ImportPageResult;
|
|
364
|
+
};
|
|
360
365
|
[CommandName.ListBlocks]: {
|
|
361
366
|
query: ListChildrenQuery;
|
|
362
367
|
result: ListChildrenResult;
|
|
@@ -1001,6 +1006,14 @@ export declare type HookTextEditResult = undefined;
|
|
|
1001
1006
|
export declare type ImportCardsQuery = string;
|
|
1002
1007
|
/** Resolves when the import dialog is closed */
|
|
1003
1008
|
export declare type ImportCardsResult = Promise<void>;
|
|
1009
|
+
export declare type ImportPageQuery = {
|
|
1010
|
+
/** The ID of the document or template to import */
|
|
1011
|
+
'id': string;
|
|
1012
|
+
/** Page numbers of specified document or template to import (zero-indexed) */
|
|
1013
|
+
'n': number[];
|
|
1014
|
+
};
|
|
1015
|
+
/** Resolves when the import succeeds or fails */
|
|
1016
|
+
export declare type ImportPageResult = Promise<void>;
|
|
1004
1017
|
export declare type KillExtensionQuery = void;
|
|
1005
1018
|
export declare type KillExtensionResult = undefined;
|
|
1006
1019
|
export declare type ListChildrenQuery = {
|
package/commandtypes.js
CHANGED
|
@@ -57,6 +57,7 @@ exports.commandTitles = new Map([
|
|
|
57
57
|
["hs" /* CommandName.HookSelection */, 'HookSelection'],
|
|
58
58
|
["hte" /* CommandName.HookTextEdit */, 'HookTextEdit'],
|
|
59
59
|
["ic" /* CommandName.ImportCards */, 'ImportCards'],
|
|
60
|
+
["imp" /* CommandName.ImportPage */, 'ImportPage'],
|
|
60
61
|
["k" /* CommandName.KillExtension */, 'KillExtension'],
|
|
61
62
|
["lb" /* CommandName.ListBlocks */, 'ListBlocks'],
|
|
62
63
|
["lcf" /* CommandName.ListCollectionFields */, 'ListCollectionFields'],
|
|
@@ -19,6 +19,14 @@ export declare class LinkUnfurlBlockProxy extends BlockProxy {
|
|
|
19
19
|
* the block.
|
|
20
20
|
*/
|
|
21
21
|
getProviderName(): string;
|
|
22
|
+
/**
|
|
23
|
+
* Gets the URL the user will be redirected to when the user clicks the "Pop Out" action on the block.
|
|
24
|
+
*/
|
|
25
|
+
getUrl(): string | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Sets the URL the user will be redirected to when the user clicks the "Pop Out" action on the block.
|
|
28
|
+
*/
|
|
29
|
+
setUrl(url: string): void;
|
|
22
30
|
/**
|
|
23
31
|
* Sets the URL to be loaded in an iframe when the user clicks the "Expand" action on the block.
|
|
24
32
|
*/
|
|
@@ -35,6 +43,14 @@ export declare class LinkUnfurlBlockProxy extends BlockProxy {
|
|
|
35
43
|
* Sets additional thumbnails on the block
|
|
36
44
|
*/
|
|
37
45
|
setThumbnailUrls(thumbnails: string[]): void;
|
|
46
|
+
/**
|
|
47
|
+
* Gets the url for the favicon on the block
|
|
48
|
+
*/
|
|
49
|
+
getFaviconUrl(): string;
|
|
50
|
+
/**
|
|
51
|
+
* Sets the favicon on the block
|
|
52
|
+
*/
|
|
53
|
+
setFaviconUrl(faviconUrl: string): void;
|
|
38
54
|
/**
|
|
39
55
|
* @ignore
|
|
40
56
|
* Initiates the PDF upload for this block. The result includes an uploadUrl which you can use to upload the PDF.
|
|
@@ -27,6 +27,18 @@ class LinkUnfurlBlockProxy extends blockproxy_1.BlockProxy {
|
|
|
27
27
|
getProviderName() {
|
|
28
28
|
return this.textAreas.get('t_LinkUnfurlProviderName');
|
|
29
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Gets the URL the user will be redirected to when the user clicks the "Pop Out" action on the block.
|
|
32
|
+
*/
|
|
33
|
+
getUrl() {
|
|
34
|
+
return this.properties.get('LinkUnfurlUrl');
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Sets the URL the user will be redirected to when the user clicks the "Pop Out" action on the block.
|
|
38
|
+
*/
|
|
39
|
+
setUrl(url) {
|
|
40
|
+
this.properties.set('LinkUnfurlUrl', url);
|
|
41
|
+
}
|
|
30
42
|
/**
|
|
31
43
|
* Sets the URL to be loaded in an iframe when the user clicks the "Expand" action on the block.
|
|
32
44
|
*/
|
|
@@ -54,6 +66,18 @@ class LinkUnfurlBlockProxy extends blockproxy_1.BlockProxy {
|
|
|
54
66
|
setThumbnailUrls(thumbnails) {
|
|
55
67
|
this.properties.set('LinkUnfurlThumbnailUrls', thumbnails);
|
|
56
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* Gets the url for the favicon on the block
|
|
71
|
+
*/
|
|
72
|
+
getFaviconUrl() {
|
|
73
|
+
return this.properties.get('LinkUnfurlFaviconUrl');
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Sets the favicon on the block
|
|
77
|
+
*/
|
|
78
|
+
setFaviconUrl(faviconUrl) {
|
|
79
|
+
this.properties.set('LinkUnfurlFaviconUrl', faviconUrl);
|
|
80
|
+
}
|
|
57
81
|
/**
|
|
58
82
|
* @ignore
|
|
59
83
|
* Initiates the PDF upload for this block. The result includes an uploadUrl which you can use to upload the PDF.
|
package/editorclient.d.ts
CHANGED
|
@@ -221,6 +221,18 @@ export declare class EditorClient {
|
|
|
221
221
|
* @returns a promise that resolves when the block classes can be used to create new blocks on the document
|
|
222
222
|
*/
|
|
223
223
|
loadBlockClasses(classNames: string[]): Promise<undefined>;
|
|
224
|
+
/**
|
|
225
|
+
* Import one or pages of the specified document or template into the current document
|
|
226
|
+
* as new pages.
|
|
227
|
+
* NOTE: The indices of the pages to import will change if the pages are rearranged
|
|
228
|
+
* on the source document or template.
|
|
229
|
+
*
|
|
230
|
+
* @param documentId The ID of the document or template to import
|
|
231
|
+
* @param pageNums An array of zero-indexed page indices to import from the document or template
|
|
232
|
+
* @returns a promise that resolves to void when the pages have been imported or the
|
|
233
|
+
* the import failed
|
|
234
|
+
*/
|
|
235
|
+
importPage(documentId: string, pageNums: number[]): Promise<void>;
|
|
224
236
|
/**
|
|
225
237
|
* Load the requested shape library's content, and if it was found, return a block definition ready to be
|
|
226
238
|
* created.
|
package/editorclient.js
CHANGED
|
@@ -373,6 +373,20 @@ class EditorClient {
|
|
|
373
373
|
loadBlockClasses(classNames) {
|
|
374
374
|
return this.sendCommand("lbc" /* CommandName.LoadBlockClasses */, classNames);
|
|
375
375
|
}
|
|
376
|
+
/**
|
|
377
|
+
* Import one or pages of the specified document or template into the current document
|
|
378
|
+
* as new pages.
|
|
379
|
+
* NOTE: The indices of the pages to import will change if the pages are rearranged
|
|
380
|
+
* on the source document or template.
|
|
381
|
+
*
|
|
382
|
+
* @param documentId The ID of the document or template to import
|
|
383
|
+
* @param pageNums An array of zero-indexed page indices to import from the document or template
|
|
384
|
+
* @returns a promise that resolves to void when the pages have been imported or the
|
|
385
|
+
* the import failed
|
|
386
|
+
*/
|
|
387
|
+
async importPage(documentId, pageNums) {
|
|
388
|
+
return await this.sendCommand("imp" /* CommandName.ImportPage */, { 'id': documentId, 'n': pageNums });
|
|
389
|
+
}
|
|
376
390
|
/**
|
|
377
391
|
* Load the requested shape library's content, and if it was found, return a block definition ready to be
|
|
378
392
|
* created.
|