@chili-publish/studio-sdk 0.147.0 → 0.157.4
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/_bundles/main.js +1 -1
- package/_bundles/main.js.map +1 -1
- package/_bundles/report.html +2 -2
- package/lib/editor-engine.json +1 -1
- package/lib/package.json +4 -3
- package/lib/src/controllers/ActionController.d.ts +10 -0
- package/lib/src/controllers/ActionController.js +13 -0
- package/lib/src/controllers/ActionController.js.map +1 -1
- package/lib/src/controllers/ConnectorController.d.ts +27 -6
- package/lib/src/controllers/ConnectorController.js +34 -4
- package/lib/src/controllers/ConnectorController.js.map +1 -1
- package/lib/src/controllers/FontConnectorController.d.ts +49 -43
- package/lib/src/controllers/FontConnectorController.js +65 -53
- package/lib/src/controllers/FontConnectorController.js.map +1 -1
- package/lib/src/controllers/FontController.d.ts +68 -23
- package/lib/src/controllers/FontController.js +98 -28
- package/lib/src/controllers/FontController.js.map +1 -1
- package/lib/src/controllers/MediaConnectorController.d.ts +19 -23
- package/lib/src/controllers/MediaConnectorController.js +26 -31
- package/lib/src/controllers/MediaConnectorController.js.map +1 -1
- package/lib/src/controllers/SubscriberController.d.ts +2 -2
- package/lib/src/controllers/SubscriberController.js +3 -3
- package/lib/src/controllers/SubscriberController.js.map +1 -1
- package/lib/src/controllers/UndoManagerController.d.ts +36 -3
- package/lib/src/controllers/UndoManagerController.js +65 -3
- package/lib/src/controllers/UndoManagerController.js.map +1 -1
- package/lib/src/controllers/VariableController.d.ts +15 -5
- package/lib/src/controllers/VariableController.js +18 -6
- package/lib/src/controllers/VariableController.js.map +1 -1
- package/lib/src/index.d.ts +1 -1
- package/lib/src/index.js.map +1 -1
- package/lib/src/interactions/connector.d.ts +1 -1
- package/lib/src/interactions/connector.js +1 -1
- package/lib/src/interactions/connector.js.map +1 -1
- package/lib/src/sdk.js +5 -5
- package/lib/src/sdk.js.map +1 -1
- package/lib/src/tests/__mocks__/config.js +1 -1
- package/lib/src/tests/__mocks__/config.js.map +1 -1
- package/lib/src/tests/controllers/ActionController.test.js +7 -0
- package/lib/src/tests/controllers/ActionController.test.js.map +1 -1
- package/lib/src/tests/controllers/ConnectorController.test.js +28 -7
- package/lib/src/tests/controllers/ConnectorController.test.js.map +1 -1
- package/lib/src/tests/controllers/FontConnectorController.test.js +25 -25
- package/lib/src/tests/controllers/FontConnectorController.test.js.map +1 -1
- package/lib/src/tests/controllers/FontController.test.js +103 -45
- package/lib/src/tests/controllers/FontController.test.js.map +1 -1
- package/lib/src/tests/controllers/MediaConnectorController.test.js +14 -21
- package/lib/src/tests/controllers/MediaConnectorController.test.js.map +1 -1
- package/lib/src/tests/controllers/SubscriberContoller.test.js +5 -5
- package/lib/src/tests/controllers/SubscriberContoller.test.js.map +1 -1
- package/lib/src/tests/controllers/UndoManagerController.test.js +36 -2
- package/lib/src/tests/controllers/UndoManagerController.test.js.map +1 -1
- package/lib/src/tests/controllers/VariableController.test.js +35 -6
- package/lib/src/tests/controllers/VariableController.test.js.map +1 -1
- package/lib/src/types/CommonTypes.d.ts +14 -7
- package/lib/src/types/CommonTypes.js +5 -1
- package/lib/src/types/CommonTypes.js.map +1 -1
- package/lib/src/types/ConnectorTypes.d.ts +24 -20
- package/lib/src/types/ConnectorTypes.js +22 -8
- package/lib/src/types/ConnectorTypes.js.map +1 -1
- package/lib/src/types/FontConnectorTypes.d.ts +11 -15
- package/lib/src/types/FontConnectorTypes.js +5 -5
- package/lib/src/types/FontConnectorTypes.js.map +1 -1
- package/lib/src/types/FontTypes.d.ts +19 -10
- package/lib/src/types/MediaConnectorTypes.d.ts +4 -5
- package/lib/src/types/MediaConnectorTypes.js +1 -0
- package/lib/src/types/MediaConnectorTypes.js.map +1 -1
- package/lib/src/utils/EditorResponseData.d.ts +1 -1
- package/lib/src/utils/EditorResponseData.js +19 -4
- package/lib/src/utils/EditorResponseData.js.map +1 -1
- package/package.json +5 -4
- package/LICENSE +0 -21
- package/README.md +0 -89
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EditorAPI, Id } from '../types/CommonTypes';
|
|
2
|
-
import {
|
|
2
|
+
import { AddDocumentFontFamily, AddDocumentFontStyle, DocumentFontFamily, DocumentFontStyle } from '../types/FontTypes';
|
|
3
3
|
/**
|
|
4
4
|
* The FontController is responsible for all communication regarding font styles.
|
|
5
5
|
* Methods inside this controller can be called by `window.SDK.font.{method-name}`
|
|
@@ -11,40 +11,85 @@ export declare class FontController {
|
|
|
11
11
|
*/
|
|
12
12
|
constructor(editorAPI: EditorAPI);
|
|
13
13
|
/**
|
|
14
|
-
* This method
|
|
15
|
-
* @
|
|
14
|
+
* This method adds a font family
|
|
15
|
+
* @param connectorId unique id of the font connector
|
|
16
|
+
* @param fontFamily the font family object
|
|
17
|
+
* @returns id generated on the engine side `CONNECTOR_ID::FONT_FAMILY_ID`
|
|
16
18
|
*/
|
|
17
|
-
|
|
19
|
+
addFontFamily: (connectorId: Id, fontFamily: AddDocumentFontFamily) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
18
20
|
/**
|
|
19
|
-
* This method
|
|
20
|
-
* @param id the id of a specific font
|
|
21
|
-
* @returns
|
|
21
|
+
* This method removes a font family
|
|
22
|
+
* @param id the id of a specific font family
|
|
23
|
+
* @returns
|
|
24
|
+
*/
|
|
25
|
+
removeFontFamily: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
26
|
+
/**
|
|
27
|
+
* This method adds a font style
|
|
28
|
+
* @param connectorId unique id of the font connector
|
|
29
|
+
* @param fontStyle the font object
|
|
30
|
+
* @returns id generated on the engine side `CONNECTOR_ID::FONT_FAMILY_ID::FONT_STYLE_ID`
|
|
31
|
+
*/
|
|
32
|
+
addFontStyle: (connectorId: Id, fontStyle: AddDocumentFontStyle) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
33
|
+
/**
|
|
34
|
+
* This method removes a font style
|
|
35
|
+
* @param id the id of a specific font style
|
|
36
|
+
* @returns
|
|
37
|
+
*/
|
|
38
|
+
removeFontStyle: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
39
|
+
/**
|
|
40
|
+
* This method returns the list of font families
|
|
41
|
+
* @returns DocumentFontFamily[]
|
|
42
|
+
*/
|
|
43
|
+
getFontFamilies: () => Promise<import("../types/CommonTypes").EditorResponse<DocumentFontFamily[]>>;
|
|
44
|
+
/**
|
|
45
|
+
* This method returns the list of font styles for a specific family
|
|
46
|
+
* @param id the id of a specific font style
|
|
47
|
+
* @returns DocumentFontStyle[]
|
|
22
48
|
*/
|
|
23
|
-
|
|
49
|
+
getFontStyles: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<DocumentFontStyle[]>>;
|
|
50
|
+
/**
|
|
51
|
+
* This method returns a font family by id
|
|
52
|
+
* @param id the id of a specific font family
|
|
53
|
+
* @returns DocumentFontFamily properties
|
|
54
|
+
*/
|
|
55
|
+
getFontFamilyById: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<DocumentFontFamily>>;
|
|
56
|
+
/**
|
|
57
|
+
* This method returns a font style by id
|
|
58
|
+
* @param id the id of a specific font style
|
|
59
|
+
* @returns DocumentFontStyle properties
|
|
60
|
+
*/
|
|
61
|
+
getFontStyleById: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<DocumentFontStyle>>;
|
|
24
62
|
/**
|
|
25
63
|
* This method returns the default font.
|
|
26
64
|
* Be aware that the default font will not change during the entire lifetime of the SDK session.
|
|
27
65
|
* It is not necessary to call this more than once in an integration, this value can be safely stored during the lifetime of this SDK session.
|
|
28
|
-
* @returns
|
|
66
|
+
* @returns a default DocumentFontStyle
|
|
29
67
|
*/
|
|
30
|
-
|
|
68
|
+
getDefaultFontStyle: () => Promise<import("../types/CommonTypes").EditorResponse<DocumentFontStyle>>;
|
|
31
69
|
/**
|
|
32
|
-
* This method
|
|
33
|
-
*
|
|
34
|
-
*
|
|
70
|
+
* This method returns the default font family.
|
|
71
|
+
* Be aware that the default font family will not change during the entire lifetime of the SDK session.
|
|
72
|
+
* It is not necessary to call this more than once in an integration, this value can be safely stored during the lifetime of this SDK session.
|
|
73
|
+
* @returns a default DocumentFontFamily
|
|
35
74
|
*/
|
|
36
|
-
|
|
75
|
+
getDefaultFontFamily: () => Promise<import("../types/CommonTypes").EditorResponse<DocumentFontFamily>>;
|
|
37
76
|
/**
|
|
38
|
-
*
|
|
39
|
-
* @param id
|
|
40
|
-
* @
|
|
41
|
-
* @returns
|
|
77
|
+
* Check if the font family is used anywhere in the document
|
|
78
|
+
* @param id the id of the font family to check
|
|
79
|
+
* @returns boolean
|
|
42
80
|
*/
|
|
43
|
-
|
|
81
|
+
isFontFamilyUsed: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<boolean>>;
|
|
44
82
|
/**
|
|
45
|
-
* Check if the font is used anywhere in the document
|
|
46
|
-
* @param id the id of the font to check
|
|
47
|
-
* @returns
|
|
83
|
+
* Check if the font style is used anywhere in the document
|
|
84
|
+
* @param id the id of the font style to check
|
|
85
|
+
* @returns boolean
|
|
86
|
+
*/
|
|
87
|
+
isFontStyleUsed: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<boolean>>;
|
|
88
|
+
/**
|
|
89
|
+
* This method changes positions of font families
|
|
90
|
+
* @param order the position of the font family
|
|
91
|
+
* @param ids the list of font family IDs
|
|
92
|
+
* @returns
|
|
48
93
|
*/
|
|
49
|
-
|
|
94
|
+
moveFontFamilies: (order: number, ids: string[]) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
50
95
|
}
|
|
@@ -34,59 +34,129 @@ export class FontController {
|
|
|
34
34
|
*/
|
|
35
35
|
_FontController_editorAPI.set(this, void 0);
|
|
36
36
|
/**
|
|
37
|
-
* This method
|
|
38
|
-
* @
|
|
37
|
+
* This method adds a font family
|
|
38
|
+
* @param connectorId unique id of the font connector
|
|
39
|
+
* @param fontFamily the font family object
|
|
40
|
+
* @returns id generated on the engine side `CONNECTOR_ID::FONT_FAMILY_ID`
|
|
39
41
|
*/
|
|
40
|
-
this.
|
|
42
|
+
this.addFontFamily = (connectorId, fontFamily) => __awaiter(this, void 0, void 0, function* () {
|
|
41
43
|
const res = yield __classPrivateFieldGet(this, _FontController_editorAPI, "f");
|
|
42
|
-
return res
|
|
44
|
+
return res
|
|
45
|
+
.addFontFamily(connectorId, JSON.stringify(fontFamily))
|
|
46
|
+
.then((result) => getEditorResponseData(result));
|
|
43
47
|
});
|
|
44
48
|
/**
|
|
45
|
-
* This method
|
|
46
|
-
* @param id the id of a specific font
|
|
47
|
-
* @returns
|
|
49
|
+
* This method removes a font family
|
|
50
|
+
* @param id the id of a specific font family
|
|
51
|
+
* @returns
|
|
52
|
+
*/
|
|
53
|
+
this.removeFontFamily = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
const res = yield __classPrivateFieldGet(this, _FontController_editorAPI, "f");
|
|
55
|
+
return res.removeFontFamily(id).then((result) => getEditorResponseData(result));
|
|
56
|
+
});
|
|
57
|
+
/**
|
|
58
|
+
* This method adds a font style
|
|
59
|
+
* @param connectorId unique id of the font connector
|
|
60
|
+
* @param fontStyle the font object
|
|
61
|
+
* @returns id generated on the engine side `CONNECTOR_ID::FONT_FAMILY_ID::FONT_STYLE_ID`
|
|
62
|
+
*/
|
|
63
|
+
this.addFontStyle = (connectorId, fontStyle) => __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
const res = yield __classPrivateFieldGet(this, _FontController_editorAPI, "f");
|
|
65
|
+
return res
|
|
66
|
+
.addFontStyle(connectorId, JSON.stringify(fontStyle))
|
|
67
|
+
.then((result) => getEditorResponseData(result));
|
|
68
|
+
});
|
|
69
|
+
/**
|
|
70
|
+
* This method removes a font style
|
|
71
|
+
* @param id the id of a specific font style
|
|
72
|
+
* @returns
|
|
73
|
+
*/
|
|
74
|
+
this.removeFontStyle = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
75
|
+
const res = yield __classPrivateFieldGet(this, _FontController_editorAPI, "f");
|
|
76
|
+
return res.removeFontStyle(id).then((result) => getEditorResponseData(result));
|
|
77
|
+
});
|
|
78
|
+
/**
|
|
79
|
+
* This method returns the list of font families
|
|
80
|
+
* @returns DocumentFontFamily[]
|
|
81
|
+
*/
|
|
82
|
+
this.getFontFamilies = () => __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
const res = yield __classPrivateFieldGet(this, _FontController_editorAPI, "f");
|
|
84
|
+
return res.getFontFamilies().then((result) => getEditorResponseData(result));
|
|
85
|
+
});
|
|
86
|
+
/**
|
|
87
|
+
* This method returns the list of font styles for a specific family
|
|
88
|
+
* @param id the id of a specific font style
|
|
89
|
+
* @returns DocumentFontStyle[]
|
|
90
|
+
*/
|
|
91
|
+
this.getFontStyles = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
92
|
+
const res = yield __classPrivateFieldGet(this, _FontController_editorAPI, "f");
|
|
93
|
+
return res.getFontStyles(id).then((result) => getEditorResponseData(result));
|
|
94
|
+
});
|
|
95
|
+
/**
|
|
96
|
+
* This method returns a font family by id
|
|
97
|
+
* @param id the id of a specific font family
|
|
98
|
+
* @returns DocumentFontFamily properties
|
|
99
|
+
*/
|
|
100
|
+
this.getFontFamilyById = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
101
|
+
const res = yield __classPrivateFieldGet(this, _FontController_editorAPI, "f");
|
|
102
|
+
return res.getFontFamilyById(id).then((result) => getEditorResponseData(result));
|
|
103
|
+
});
|
|
104
|
+
/**
|
|
105
|
+
* This method returns a font style by id
|
|
106
|
+
* @param id the id of a specific font style
|
|
107
|
+
* @returns DocumentFontStyle properties
|
|
48
108
|
*/
|
|
49
|
-
this.
|
|
109
|
+
this.getFontStyleById = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
50
110
|
const res = yield __classPrivateFieldGet(this, _FontController_editorAPI, "f");
|
|
51
|
-
return res.
|
|
111
|
+
return res.getFontStyleById(id).then((result) => getEditorResponseData(result));
|
|
52
112
|
});
|
|
53
113
|
/**
|
|
54
114
|
* This method returns the default font.
|
|
55
115
|
* Be aware that the default font will not change during the entire lifetime of the SDK session.
|
|
56
116
|
* It is not necessary to call this more than once in an integration, this value can be safely stored during the lifetime of this SDK session.
|
|
57
|
-
* @returns
|
|
117
|
+
* @returns a default DocumentFontStyle
|
|
58
118
|
*/
|
|
59
|
-
this.
|
|
119
|
+
this.getDefaultFontStyle = () => __awaiter(this, void 0, void 0, function* () {
|
|
60
120
|
const res = yield __classPrivateFieldGet(this, _FontController_editorAPI, "f");
|
|
61
|
-
return res.
|
|
121
|
+
return res.getDefaultFontStyle().then((result) => getEditorResponseData(result));
|
|
62
122
|
});
|
|
63
123
|
/**
|
|
64
|
-
* This method
|
|
65
|
-
*
|
|
66
|
-
*
|
|
124
|
+
* This method returns the default font family.
|
|
125
|
+
* Be aware that the default font family will not change during the entire lifetime of the SDK session.
|
|
126
|
+
* It is not necessary to call this more than once in an integration, this value can be safely stored during the lifetime of this SDK session.
|
|
127
|
+
* @returns a default DocumentFontFamily
|
|
67
128
|
*/
|
|
68
|
-
this.
|
|
129
|
+
this.getDefaultFontFamily = () => __awaiter(this, void 0, void 0, function* () {
|
|
69
130
|
const res = yield __classPrivateFieldGet(this, _FontController_editorAPI, "f");
|
|
70
|
-
return res.
|
|
131
|
+
return res.getDefaultFontFamily().then((result) => getEditorResponseData(result));
|
|
71
132
|
});
|
|
72
133
|
/**
|
|
73
|
-
*
|
|
74
|
-
* @param id
|
|
75
|
-
* @
|
|
76
|
-
|
|
134
|
+
* Check if the font family is used anywhere in the document
|
|
135
|
+
* @param id the id of the font family to check
|
|
136
|
+
* @returns boolean
|
|
137
|
+
*/
|
|
138
|
+
this.isFontFamilyUsed = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
139
|
+
const res = yield __classPrivateFieldGet(this, _FontController_editorAPI, "f");
|
|
140
|
+
return res.isFontFamilyUsed(id).then((result) => getEditorResponseData(result));
|
|
141
|
+
});
|
|
142
|
+
/**
|
|
143
|
+
* Check if the font style is used anywhere in the document
|
|
144
|
+
* @param id the id of the font style to check
|
|
145
|
+
* @returns boolean
|
|
77
146
|
*/
|
|
78
|
-
this.
|
|
147
|
+
this.isFontStyleUsed = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
79
148
|
const res = yield __classPrivateFieldGet(this, _FontController_editorAPI, "f");
|
|
80
|
-
return res.
|
|
149
|
+
return res.isFontStyleUsed(id).then((result) => getEditorResponseData(result));
|
|
81
150
|
});
|
|
82
151
|
/**
|
|
83
|
-
*
|
|
84
|
-
* @param
|
|
85
|
-
* @
|
|
152
|
+
* This method changes positions of font families
|
|
153
|
+
* @param order the position of the font family
|
|
154
|
+
* @param ids the list of font family IDs
|
|
155
|
+
* @returns
|
|
86
156
|
*/
|
|
87
|
-
this.
|
|
157
|
+
this.moveFontFamilies = (order, ids) => __awaiter(this, void 0, void 0, function* () {
|
|
88
158
|
const res = yield __classPrivateFieldGet(this, _FontController_editorAPI, "f");
|
|
89
|
-
return res.
|
|
159
|
+
return res.moveFontFamilies(order, ids).then((result) => getEditorResponseData(result));
|
|
90
160
|
});
|
|
91
161
|
__classPrivateFieldSet(this, _FontController_editorAPI, editorAPI, "f");
|
|
92
162
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FontController.js","sourceRoot":"","sources":["../../../src/controllers/FontController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpE;;;GAGG;AACH,MAAM,OAAO,cAAc;IAMvB;;OAEG;IACH,YAAY,SAAoB;QARhC;;WAEG;QACH,4CAAsB;QAStB
|
|
1
|
+
{"version":3,"file":"FontController.js","sourceRoot":"","sources":["../../../src/controllers/FontController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpE;;;GAGG;AACH,MAAM,OAAO,cAAc;IAMvB;;OAEG;IACH,YAAY,SAAoB;QARhC;;WAEG;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AAI,6BAAc,SAAS,MAAA,CAAC;IAChC,CAAC;CA4IJ"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ConnectorConfigOptions, EditorAPI, EditorResponse, Id, MetaData } from '../types/CommonTypes';
|
|
2
2
|
import { DeprecatedMediaType, ConnectorCapabilities, MediaType, QueryOptions, QueryPage } from '../types/ConnectorTypes';
|
|
3
|
-
import { Media, MediaDownloadType } from '../types/MediaConnectorTypes';
|
|
3
|
+
import { Media, MediaDetail, MediaDownloadType } from '../types/MediaConnectorTypes';
|
|
4
4
|
/**
|
|
5
5
|
* The MediaConnectorController is responsible for all communication regarding media connectors.
|
|
6
6
|
* Methods inside this controller can be called by `window.SDK.mediaConnector.{method-name}`
|
|
@@ -24,19 +24,20 @@ export declare class MediaConnectorController {
|
|
|
24
24
|
* context as parameters. This call returns an array of Media items.
|
|
25
25
|
* @param id unique id of the media connector
|
|
26
26
|
* @param queryOptions stringified instance of `QueryOptions`
|
|
27
|
-
* @param context
|
|
27
|
+
* @param context context that will be available in the connector script.
|
|
28
28
|
* @returns array of Media items
|
|
29
29
|
*/
|
|
30
|
-
query: (id: Id, queryOptions: QueryOptions, context
|
|
30
|
+
query: (id: Id, queryOptions: QueryOptions, context?: MetaData) => Promise<EditorResponse<QueryPage<Media>>>;
|
|
31
31
|
/**
|
|
32
32
|
* Returns a single media using a specific MediaConnector.
|
|
33
33
|
*
|
|
34
34
|
* The connector needs to list `detail` as a supported capability.
|
|
35
35
|
* @param id unique id of the Media connector
|
|
36
36
|
* @param mediaId unique id of the Media
|
|
37
|
+
* @param context context that will be available in the connector script.
|
|
37
38
|
* @returns Media item
|
|
38
39
|
*/
|
|
39
|
-
detail: (id: Id, mediaId: string) => Promise<EditorResponse<
|
|
40
|
+
detail: (id: Id, mediaId: string, context?: MetaData) => Promise<EditorResponse<MediaDetail>>;
|
|
40
41
|
/**
|
|
41
42
|
* The combination of a `connectorId` and `mediaId` is typically enough for a media connector to
|
|
42
43
|
* perform the download of this asset. The `download` endpoint is capable of relaying this information to the
|
|
@@ -44,51 +45,46 @@ export declare class MediaConnectorController {
|
|
|
44
45
|
* @param id unique id of the media connector
|
|
45
46
|
* @param mediaId unique id of the media to download
|
|
46
47
|
* @param downloadType hint to the media connector about desired quality of the downloaded media
|
|
47
|
-
* @param context
|
|
48
|
+
* @param context context that will be available in the connector script.
|
|
48
49
|
* @returns
|
|
49
50
|
*/
|
|
50
|
-
download: (id: Id, mediaId: Id, downloadType: MediaDownloadType, context
|
|
51
|
+
download: (id: Id, mediaId: Id, downloadType: MediaDownloadType, context?: MetaData) => Promise<Uint8Array>;
|
|
51
52
|
/**
|
|
52
53
|
* Depending on the connector capabilities, this api method allows you to upload new media to the
|
|
53
54
|
* connector's backend.
|
|
54
55
|
* @param id unique id of the media connector
|
|
55
56
|
* @param mediaId unique id of the media to upload
|
|
56
57
|
* @param blob byte array representation of the media to upload
|
|
58
|
+
* @param context context that will be available in the connector script.
|
|
57
59
|
* @returns
|
|
58
60
|
*/
|
|
59
|
-
upload: (id: Id, mediaId: Id, blob: Uint8Array) => Promise<EditorResponse<null>>;
|
|
61
|
+
upload: (id: Id, mediaId: Id, blob: Uint8Array, context?: MetaData) => Promise<EditorResponse<null>>;
|
|
60
62
|
/**
|
|
61
63
|
* Depending on the connector capabilities, removes media identified by `mediaId` from the connector's backend storage
|
|
62
64
|
* @param id unique id of the media connector
|
|
63
65
|
* @param mediaId unique id of the media to download
|
|
66
|
+
* @param context context that will be available in the connector script.
|
|
64
67
|
* @returns
|
|
65
68
|
*/
|
|
66
|
-
remove: (id: Id, mediaId: Id) => Promise<EditorResponse<null>>;
|
|
69
|
+
remove: (id: Id, mediaId: Id, context?: MetaData) => Promise<EditorResponse<null>>;
|
|
67
70
|
/**
|
|
68
71
|
* Depending on the connector capabilities, copies media identified by `mediaId` to a new media item on the
|
|
69
72
|
* connector's backend
|
|
70
73
|
* @param id unique id of the media connector
|
|
71
74
|
* @param mediaId unique id of the media to download
|
|
72
75
|
* @param newName name of the copied media on the connector's backend
|
|
76
|
+
* @param context context that will be available in the connector script.
|
|
73
77
|
* @returns
|
|
74
78
|
*/
|
|
75
|
-
copy: (id: Id, mediaId: Id, newName: string) => Promise<EditorResponse<null>>;
|
|
79
|
+
copy: (id: Id, mediaId: Id, newName: string, context?: MetaData) => Promise<EditorResponse<null>>;
|
|
76
80
|
/**
|
|
77
|
-
* All connectors have a certain set of
|
|
78
|
-
* method allows you to discover
|
|
79
|
-
*
|
|
81
|
+
* All connectors have a certain set of mappings they allow to be passed into the connector methods their context. This
|
|
82
|
+
* method allows you to discover which mappings are available for a given connector. If you want to use any of these
|
|
83
|
+
* mappings, they will be available in the `context` parameter of any connector method.
|
|
80
84
|
* @param id unique id of the media connector
|
|
81
|
-
* @returns
|
|
85
|
+
* @returns connector mappings
|
|
82
86
|
*/
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* All connectors have a certain set of downloadOptions they allow to be passed in the download context. This
|
|
86
|
-
* method allows you to discover what options are available for a given connector. If you want to use any of these
|
|
87
|
-
* options, they need to be passed in the `context` parameter of the `download` api method.
|
|
88
|
-
* @param id unique id of the media connector
|
|
89
|
-
* @returns download options
|
|
90
|
-
*/
|
|
91
|
-
getDownloadOptions: (id: Id) => Promise<EditorResponse<ConnectorOptions>>;
|
|
87
|
+
getConfigurationOptions: (id: Id) => Promise<EditorResponse<ConnectorConfigOptions>>;
|
|
92
88
|
/**
|
|
93
89
|
* This method returns what capabilities the selected connector has. It gives an indication what methods can
|
|
94
90
|
* be used successfully for a certain connector.
|
|
@@ -48,10 +48,10 @@ export class MediaConnectorController {
|
|
|
48
48
|
* context as parameters. This call returns an array of Media items.
|
|
49
49
|
* @param id unique id of the media connector
|
|
50
50
|
* @param queryOptions stringified instance of `QueryOptions`
|
|
51
|
-
* @param context
|
|
51
|
+
* @param context context that will be available in the connector script.
|
|
52
52
|
* @returns array of Media items
|
|
53
53
|
*/
|
|
54
|
-
this.query = (id, queryOptions, context) => __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
this.query = (id, queryOptions, context = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
55
55
|
const res = yield __classPrivateFieldGet(this, _MediaConnectorController_editorAPI, "f");
|
|
56
56
|
return res
|
|
57
57
|
.mediaConnectorQuery(id, JSON.stringify(queryOptions), JSON.stringify(context))
|
|
@@ -63,11 +63,14 @@ export class MediaConnectorController {
|
|
|
63
63
|
* The connector needs to list `detail` as a supported capability.
|
|
64
64
|
* @param id unique id of the Media connector
|
|
65
65
|
* @param mediaId unique id of the Media
|
|
66
|
+
* @param context context that will be available in the connector script.
|
|
66
67
|
* @returns Media item
|
|
67
68
|
*/
|
|
68
|
-
this.detail = (id, mediaId) => __awaiter(this, void 0, void 0, function* () {
|
|
69
|
+
this.detail = (id, mediaId, context = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
69
70
|
const res = yield __classPrivateFieldGet(this, _MediaConnectorController_editorAPI, "f");
|
|
70
|
-
return res
|
|
71
|
+
return res
|
|
72
|
+
.mediaConnectorDetail(id, mediaId, JSON.stringify(context))
|
|
73
|
+
.then((result) => getEditorResponseData(result));
|
|
71
74
|
});
|
|
72
75
|
/**
|
|
73
76
|
* The combination of a `connectorId` and `mediaId` is typically enough for a media connector to
|
|
@@ -76,10 +79,10 @@ export class MediaConnectorController {
|
|
|
76
79
|
* @param id unique id of the media connector
|
|
77
80
|
* @param mediaId unique id of the media to download
|
|
78
81
|
* @param downloadType hint to the media connector about desired quality of the downloaded media
|
|
79
|
-
* @param context
|
|
82
|
+
* @param context context that will be available in the connector script.
|
|
80
83
|
* @returns
|
|
81
84
|
*/
|
|
82
|
-
this.download = (id, mediaId, downloadType, context) => __awaiter(this, void 0, void 0, function* () {
|
|
85
|
+
this.download = (id, mediaId, downloadType, context = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
83
86
|
const res = yield __classPrivateFieldGet(this, _MediaConnectorController_blobAPI, "f");
|
|
84
87
|
return res
|
|
85
88
|
.mediaConnectorDownload(id, mediaId, downloadType, JSON.stringify(context))
|
|
@@ -91,23 +94,27 @@ export class MediaConnectorController {
|
|
|
91
94
|
* @param id unique id of the media connector
|
|
92
95
|
* @param mediaId unique id of the media to upload
|
|
93
96
|
* @param blob byte array representation of the media to upload
|
|
97
|
+
* @param context context that will be available in the connector script.
|
|
94
98
|
* @returns
|
|
95
99
|
*/
|
|
96
|
-
this.upload = (id, mediaId, blob) => __awaiter(this, void 0, void 0, function* () {
|
|
100
|
+
this.upload = (id, mediaId, blob, context = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
97
101
|
const res = yield __classPrivateFieldGet(this, _MediaConnectorController_editorAPI, "f");
|
|
98
102
|
return res
|
|
99
|
-
.mediaConnectorUpload(id, mediaId, blob)
|
|
103
|
+
.mediaConnectorUpload(id, mediaId, blob, JSON.stringify(context))
|
|
100
104
|
.then((result) => getEditorResponseData(result));
|
|
101
105
|
});
|
|
102
106
|
/**
|
|
103
107
|
* Depending on the connector capabilities, removes media identified by `mediaId` from the connector's backend storage
|
|
104
108
|
* @param id unique id of the media connector
|
|
105
109
|
* @param mediaId unique id of the media to download
|
|
110
|
+
* @param context context that will be available in the connector script.
|
|
106
111
|
* @returns
|
|
107
112
|
*/
|
|
108
|
-
this.remove = (id, mediaId) => __awaiter(this, void 0, void 0, function* () {
|
|
113
|
+
this.remove = (id, mediaId, context = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
109
114
|
const res = yield __classPrivateFieldGet(this, _MediaConnectorController_editorAPI, "f");
|
|
110
|
-
return res
|
|
115
|
+
return res
|
|
116
|
+
.mediaConnectorRemove(id, mediaId, JSON.stringify(context))
|
|
117
|
+
.then((result) => getEditorResponseData(result));
|
|
111
118
|
});
|
|
112
119
|
/**
|
|
113
120
|
* Depending on the connector capabilities, copies media identified by `mediaId` to a new media item on the
|
|
@@ -115,38 +122,26 @@ export class MediaConnectorController {
|
|
|
115
122
|
* @param id unique id of the media connector
|
|
116
123
|
* @param mediaId unique id of the media to download
|
|
117
124
|
* @param newName name of the copied media on the connector's backend
|
|
125
|
+
* @param context context that will be available in the connector script.
|
|
118
126
|
* @returns
|
|
119
127
|
*/
|
|
120
|
-
this.copy = (id, mediaId, newName) => __awaiter(this, void 0, void 0, function* () {
|
|
121
|
-
const res = yield __classPrivateFieldGet(this, _MediaConnectorController_editorAPI, "f");
|
|
122
|
-
return res
|
|
123
|
-
.mediaConnectorCopy(id, mediaId, newName)
|
|
124
|
-
.then((result) => getEditorResponseData(result));
|
|
125
|
-
});
|
|
126
|
-
/**
|
|
127
|
-
* All connectors have a certain set of queryOptions they allow to be passed in the query context. This
|
|
128
|
-
* method allows you to discover what options are available for a given connector. If you want to use any of these
|
|
129
|
-
* options, they need to be passed in the `context` parameter of the `query` api method.
|
|
130
|
-
* @param id unique id of the media connector
|
|
131
|
-
* @returns query options
|
|
132
|
-
*/
|
|
133
|
-
this.getQueryOptions = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
128
|
+
this.copy = (id, mediaId, newName, context = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
134
129
|
const res = yield __classPrivateFieldGet(this, _MediaConnectorController_editorAPI, "f");
|
|
135
130
|
return res
|
|
136
|
-
.
|
|
131
|
+
.mediaConnectorCopy(id, mediaId, newName, JSON.stringify(context))
|
|
137
132
|
.then((result) => getEditorResponseData(result));
|
|
138
133
|
});
|
|
139
134
|
/**
|
|
140
|
-
* All connectors have a certain set of
|
|
141
|
-
* method allows you to discover
|
|
142
|
-
*
|
|
135
|
+
* All connectors have a certain set of mappings they allow to be passed into the connector methods their context. This
|
|
136
|
+
* method allows you to discover which mappings are available for a given connector. If you want to use any of these
|
|
137
|
+
* mappings, they will be available in the `context` parameter of any connector method.
|
|
143
138
|
* @param id unique id of the media connector
|
|
144
|
-
* @returns
|
|
139
|
+
* @returns connector mappings
|
|
145
140
|
*/
|
|
146
|
-
this.
|
|
141
|
+
this.getConfigurationOptions = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
147
142
|
const res = yield __classPrivateFieldGet(this, _MediaConnectorController_editorAPI, "f");
|
|
148
143
|
return res
|
|
149
|
-
.
|
|
144
|
+
.mediaConnectorGetConfigurationOptions(id)
|
|
150
145
|
.then((result) => getEditorResponseData(result));
|
|
151
146
|
});
|
|
152
147
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MediaConnectorController.js","sourceRoot":"","sources":["../../../src/controllers/MediaConnectorController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EACH,mBAAmB,EAEnB,SAAS,GAGZ,MAAM,yBAAyB,CAAC;AAIjC;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,wBAAwB;IAOjC;;OAEG;IACH,YAAY,SAAoB;QAThC;;WAEG;QACH,sDAAsB;QACtB,oDAAuB;QAUvB;;;;;;;WAOG;QACH,UAAK,GAAG,CAAO,EAAM,EAAE,YAA0B,EAAE,
|
|
1
|
+
{"version":3,"file":"MediaConnectorController.js","sourceRoot":"","sources":["../../../src/controllers/MediaConnectorController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EACH,mBAAmB,EAEnB,SAAS,GAGZ,MAAM,yBAAyB,CAAC;AAIjC;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,wBAAwB;IAOjC;;OAEG;IACH,YAAY,SAAoB;QAThC;;WAEG;QACH,sDAAsB;QACtB,oDAAuB;QAUvB;;;;;;;WAOG;QACH,UAAK,GAAG,CAAO,EAAM,EAAE,YAA0B,EAAE,UAAoB,EAAE,EAAE,EAAE;YACzE,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,2CAAW,CAAC;YAClC,OAAO,GAAG;iBACL,mBAAmB,CAAC,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,EA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BAAA,IAAI,2CAAW,CAAC;YAClC,OAAO,GAAG;iBACL,6BAA6B,CAAC,EAAE,CAAC;iBACjC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAwB,MAAM,CAAC,CAAC,CAAC;QAChF,CAAC,CAAA,CAAC;QAEF;;;;WAIG;QACH,6BAAwB,GAAG,CAAC,cAAmC,EAAE,EAAE;YAC/D,IAAI,cAAc,KAAK,mBAAmB,CAAC,IAAI;gBAAE,OAAO,SAAS,CAAC,IAAI,CAAC;YACvE,IAAI,cAAc,KAAK,mBAAmB,CAAC,UAAU;gBAAE,OAAO,SAAS,CAAC,UAAU,CAAC;QACvF,CAAC,CAAC;QA1IE,uBAAA,IAAI,uCAAc,SAAS,MAAA,CAAC;QAC5B,uBAAA,IAAI,qCAAY,SAAuC,MAAA,CAAC;IAC5D,CAAC;CAyIJ"}
|
|
@@ -96,9 +96,9 @@ export declare class SubscriberController {
|
|
|
96
96
|
onCharacterStylesChanged: (characterStyles: string) => void;
|
|
97
97
|
/**
|
|
98
98
|
* Listener on fonts, if this changes, this listener will get triggered with the updates
|
|
99
|
-
* @param fonts Stringified object of
|
|
99
|
+
* @param fonts Stringified object of font families
|
|
100
100
|
*/
|
|
101
|
-
|
|
101
|
+
onFontFamiliesChanged: (fonts: string) => void;
|
|
102
102
|
/**
|
|
103
103
|
* Listener on selected layout id, this listener will get triggered when a different layout is selected.
|
|
104
104
|
* @param id the currently selected layout id
|
|
@@ -142,10 +142,10 @@ export class SubscriberController {
|
|
|
142
142
|
};
|
|
143
143
|
/**
|
|
144
144
|
* Listener on fonts, if this changes, this listener will get triggered with the updates
|
|
145
|
-
* @param fonts Stringified object of
|
|
145
|
+
* @param fonts Stringified object of font families
|
|
146
146
|
*/
|
|
147
|
-
this.
|
|
148
|
-
const callBack = this.config.
|
|
147
|
+
this.onFontFamiliesChanged = (fonts) => {
|
|
148
|
+
const callBack = this.config.onFontFamiliesChanged;
|
|
149
149
|
callBack && callBack(JSON.parse(fonts));
|
|
150
150
|
};
|
|
151
151
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubscriberController.js","sourceRoot":"","sources":["../../../src/controllers/SubscriberController.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,OAAO,oBAAoB;IAM7B;;OAEG;IACH,YAAY,MAAkB;QAI9B;;;WAGG;QACH,qBAAgB,GAAG,CAAC,OAAe,EAAE,EAAE;YACnC,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC;YAC9C,QAAQ,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC9C,CAAC,CAAC;QAEF;;;WAGG;QACH,uBAAkB,GAAG,CAAC,SAAiB,EAAE,EAAE;YACvC,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,wBAAwB,CAAC;YACtD,QAAQ,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;QAChD,CAAC,CAAC;QAEF;;;WAGG;QACH,+BAA0B,GAAG,CAAC,sBAA8B,EAAE,EAAE;YAC5D,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,yBAAyB,CAAC;YACvD,QAAQ,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC,CAAC;QAC7D,CAAC,CAAC;QAEF;;;WAGG;QACH,sCAAiC,GAAG,CAAC,gBAAwB,EAAE,EAAE;YAC7D,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,iCAAiC,CAAC;YAC/D,QAAQ,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC;QACvD,CAAC,CAAC;QAEF;;;WAGG;QACH,iCAA4B,GAAG,CAAC,WAAmB,EAAE,EAAE;YACnD,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAA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