@chili-publish/studio-sdk 0.123.0 → 0.133.2
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/README.md +1 -1
- 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 +1 -1
- package/lib/src/controllers/ActionController.d.ts +33 -25
- package/lib/src/controllers/ActionController.js +42 -31
- package/lib/src/controllers/ActionController.js.map +1 -1
- package/lib/src/controllers/AnimationController.d.ts +24 -24
- package/lib/src/controllers/AnimationController.js +28 -28
- package/lib/src/controllers/AnimationController.js.map +1 -1
- package/lib/src/controllers/CanvasController.d.ts +3 -2
- package/lib/src/controllers/CanvasController.js +4 -3
- package/lib/src/controllers/CanvasController.js.map +1 -1
- package/lib/src/controllers/CharacterStyleController.d.ts +23 -23
- package/lib/src/controllers/CharacterStyleController.js +26 -26
- package/lib/src/controllers/CharacterStyleController.js.map +1 -1
- package/lib/src/controllers/ColorStyleController.d.ts +22 -22
- package/lib/src/controllers/ColorStyleController.js +27 -27
- package/lib/src/controllers/ColorStyleController.js.map +1 -1
- package/lib/src/controllers/ConfigurationController.d.ts +1 -1
- package/lib/src/controllers/ConfigurationController.js +1 -1
- package/lib/src/controllers/ConnectorController.d.ts +21 -12
- package/lib/src/controllers/ConnectorController.js +28 -19
- package/lib/src/controllers/ConnectorController.js.map +1 -1
- package/lib/src/controllers/DebugController.d.ts +2 -2
- package/lib/src/controllers/DebugController.js +2 -2
- package/lib/src/controllers/DebugController.js.map +1 -1
- package/lib/src/controllers/DocumentController.d.ts +6 -6
- package/lib/src/controllers/DocumentController.js +7 -7
- package/lib/src/controllers/DocumentController.js.map +1 -1
- package/lib/src/controllers/ExperimentController.d.ts +32 -7
- package/lib/src/controllers/ExperimentController.js +42 -9
- package/lib/src/controllers/ExperimentController.js.map +1 -1
- package/lib/src/controllers/FontConnectorController.d.ts +36 -28
- package/lib/src/controllers/FontConnectorController.js +45 -37
- package/lib/src/controllers/FontConnectorController.js.map +1 -1
- package/lib/src/controllers/FontController.d.ts +15 -15
- package/lib/src/controllers/FontController.js +18 -18
- package/lib/src/controllers/FontController.js.map +1 -1
- package/lib/src/controllers/FrameController.d.ts +127 -127
- package/lib/src/controllers/FrameController.js +173 -173
- package/lib/src/controllers/FrameController.js.map +1 -1
- package/lib/src/controllers/LayoutController.d.ts +37 -37
- package/lib/src/controllers/LayoutController.js +48 -48
- package/lib/src/controllers/LayoutController.js.map +1 -1
- package/lib/src/controllers/MediaConnectorController.d.ts +33 -23
- package/lib/src/controllers/MediaConnectorController.js +41 -31
- package/lib/src/controllers/MediaConnectorController.js.map +1 -1
- package/lib/src/controllers/PageController.d.ts +11 -11
- package/lib/src/controllers/PageController.js +16 -16
- package/lib/src/controllers/PageController.js.map +1 -1
- package/lib/src/controllers/ParagraphStyleController.d.ts +20 -20
- package/lib/src/controllers/ParagraphStyleController.js +23 -23
- package/lib/src/controllers/ParagraphStyleController.js.map +1 -1
- package/lib/src/controllers/ShapeController.d.ts +28 -28
- package/lib/src/controllers/ShapeController.js +43 -43
- package/lib/src/controllers/ShapeController.js.map +1 -1
- package/lib/src/controllers/SubscriberController.d.ts +18 -18
- package/lib/src/controllers/SubscriberController.js +24 -24
- package/lib/src/controllers/SubscriberController.js.map +1 -1
- package/lib/src/controllers/TextStyleController.d.ts +7 -7
- package/lib/src/controllers/TextStyleController.js +7 -7
- package/lib/src/controllers/TextStyleController.js.map +1 -1
- package/lib/src/controllers/ToolController.d.ts +10 -10
- package/lib/src/controllers/ToolController.js +9 -9
- package/lib/src/controllers/ToolController.js.map +1 -1
- package/lib/src/controllers/UtilsController.d.ts +10 -4
- package/lib/src/controllers/UtilsController.js +10 -4
- package/lib/src/controllers/UtilsController.js.map +1 -1
- package/lib/src/controllers/VariableController.d.ts +78 -34
- package/lib/src/controllers/VariableController.js +106 -53
- package/lib/src/controllers/VariableController.js.map +1 -1
- package/lib/src/index.d.ts +4 -3
- package/lib/src/index.js +5 -4
- package/lib/src/index.js.map +1 -1
- package/lib/src/interactions/connector.d.ts +4 -3
- package/lib/src/interactions/connector.js +7 -3
- package/lib/src/interactions/connector.js.map +1 -1
- package/lib/src/tests/__mocks__/FrameProperties.d.ts +2 -2
- package/lib/src/tests/__mocks__/FrameProperties.js +2 -2
- package/lib/src/tests/__mocks__/FrameProperties.js.map +1 -1
- package/lib/src/tests/__mocks__/MockImageFrameSource.js +5 -5
- package/lib/src/tests/__mocks__/MockImageFrameSource.js.map +1 -1
- package/lib/src/tests/__mocks__/animations.js +1 -1
- package/lib/src/tests/__mocks__/animations.js.map +1 -1
- package/lib/src/tests/__mocks__/mockDocument.d.ts +1 -1
- package/lib/src/tests/__mocks__/mockDocument.js +1 -1
- package/lib/src/tests/__mocks__/mockDocument.js.map +1 -1
- package/lib/src/tests/controllers/ActionController.test.js +18 -9
- package/lib/src/tests/controllers/ActionController.test.js.map +1 -1
- package/lib/src/tests/controllers/AnimationController.test.js +14 -14
- package/lib/src/tests/controllers/AnimationController.test.js.map +1 -1
- package/lib/src/tests/controllers/CharacterStyleController.test.js +11 -11
- package/lib/src/tests/controllers/CharacterStyleController.test.js.map +1 -1
- package/lib/src/tests/controllers/ColorStyleController.test.js +17 -17
- package/lib/src/tests/controllers/ColorStyleController.test.js.map +1 -1
- package/lib/src/tests/controllers/ConnectorController.test.js +6 -6
- package/lib/src/tests/controllers/ConnectorController.test.js.map +1 -1
- package/lib/src/tests/controllers/DebugController.test.js +1 -1
- package/lib/src/tests/controllers/DebugController.test.js.map +1 -1
- package/lib/src/tests/controllers/DocumentController.test.js +6 -6
- package/lib/src/tests/controllers/DocumentController.test.js.map +1 -1
- package/lib/src/tests/controllers/ExperimentController.test.js +29 -1
- package/lib/src/tests/controllers/ExperimentController.test.js.map +1 -1
- package/lib/src/tests/controllers/FontConnectorController.test.js +11 -11
- package/lib/src/tests/controllers/FontController.test.js +11 -11
- package/lib/src/tests/controllers/FontController.test.js.map +1 -1
- package/lib/src/tests/controllers/FrameController.test.js +113 -113
- package/lib/src/tests/controllers/FrameController.test.js.map +1 -1
- package/lib/src/tests/controllers/LayoutController.test.js +25 -27
- package/lib/src/tests/controllers/LayoutController.test.js.map +1 -1
- package/lib/src/tests/controllers/MediaConnectorController.test.js +1 -1
- package/lib/src/tests/controllers/PageController.test.js +11 -11
- package/lib/src/tests/controllers/PageController.test.js.map +1 -1
- package/lib/src/tests/controllers/ParagraphStyleController.test.js +12 -12
- package/lib/src/tests/controllers/ParagraphStyleController.test.js.map +1 -1
- package/lib/src/tests/controllers/ShapeController.test.js +26 -26
- package/lib/src/tests/controllers/ShapeController.test.js.map +1 -1
- package/lib/src/tests/controllers/SubscriberContoller.test.js +7 -7
- package/lib/src/tests/controllers/SubscriberContoller.test.js.map +1 -1
- package/lib/src/tests/controllers/TextStyleController.test.js +6 -6
- package/lib/src/tests/controllers/TextStyleController.test.js.map +1 -1
- package/lib/src/tests/controllers/ToolController.test.js +9 -9
- package/lib/src/tests/controllers/ToolController.test.js.map +1 -1
- package/lib/src/tests/controllers/UtilsController.test.js +20 -0
- package/lib/src/tests/controllers/UtilsController.test.js.map +1 -1
- package/lib/src/tests/controllers/VariableController.test.js +62 -31
- package/lib/src/tests/controllers/VariableController.test.js.map +1 -1
- package/lib/src/tests/interactions/connector.test.js +14 -0
- package/lib/src/tests/interactions/connector.test.js.map +1 -1
- package/lib/src/tests/utils/getClaculatedValue.test.js +2 -2
- package/lib/src/tests/utils/getClaculatedValue.test.js.map +1 -1
- package/lib/src/types/ActionTypes.d.ts +3 -3
- package/lib/src/types/AnimationTypes.d.ts +3 -3
- package/lib/src/types/CharacterStyleTypes.d.ts +2 -1
- package/lib/src/types/ColorStyleTypes.d.ts +8 -7
- package/lib/src/types/ColorStyleTypes.js +1 -1
- package/lib/src/types/ColorStyleTypes.js.map +1 -1
- package/lib/src/types/CommonTypes.d.ts +7 -5
- package/lib/src/types/ConfigurationTypes.d.ts +3 -0
- package/lib/src/types/ConnectorTypes.d.ts +5 -4
- package/lib/src/types/ConnectorTypes.js.map +1 -1
- package/lib/src/types/DocumentTypes.d.ts +23 -25
- package/lib/src/types/DocumentTypes.js.map +1 -1
- package/lib/src/types/FontConnectorTypes.d.ts +2 -1
- package/lib/src/types/FontConnectorTypes.js.map +1 -1
- package/lib/src/types/FontTypes.d.ts +5 -4
- package/lib/src/types/FrameTypes.d.ts +20 -20
- package/lib/src/types/LayoutTypes.d.ts +14 -14
- package/lib/src/types/LayoutTypes.js.map +1 -1
- package/lib/src/types/MediaConnectorTypes.d.ts +2 -1
- package/lib/src/types/MediaConnectorTypes.js.map +1 -1
- package/lib/src/types/PageTypes.d.ts +3 -3
- package/lib/src/types/ParagraphStyleTypes.d.ts +6 -5
- package/lib/src/types/TextStyleTypes.d.ts +5 -5
- package/lib/src/types/TextStyleTypes.js +1 -1
- package/lib/src/types/TextStyleTypes.js.map +1 -1
- package/lib/src/types/TextTypes.d.ts +4 -0
- package/lib/src/types/TextTypes.js +6 -0
- package/lib/src/types/TextTypes.js.map +1 -0
- package/lib/src/types/VariableTypes.d.ts +12 -11
- package/lib/src/types/VariableTypes.js +3 -2
- package/lib/src/types/VariableTypes.js.map +1 -1
- package/lib/src/utils/enums.d.ts +8 -3
- package/lib/src/utils/enums.js +19 -13
- package/lib/src/utils/enums.js.map +1 -1
- package/lib/src/utils/getCalculatedValue.js +2 -2
- package/package.json +1 -1
|
@@ -46,115 +46,125 @@ export class MediaConnectorController {
|
|
|
46
46
|
/**
|
|
47
47
|
* Query a specific MediaConnector for data using both standardized queryOptions and the dynamic
|
|
48
48
|
* context as parameters. This call returns an array of Media items.
|
|
49
|
-
* @param
|
|
49
|
+
* @param id unique id of the media connector
|
|
50
50
|
* @param queryOptions stringified instance of `QueryOptions`
|
|
51
51
|
* @param context stringified `Map<string, string>` of dynamic options
|
|
52
|
+
* @returns array of Media items
|
|
52
53
|
*/
|
|
53
|
-
this.query = (
|
|
54
|
+
this.query = (id, queryOptions, context) => __awaiter(this, void 0, void 0, function* () {
|
|
54
55
|
const res = yield __classPrivateFieldGet(this, _MediaConnectorController_editorAPI, "f");
|
|
55
56
|
return res
|
|
56
|
-
.mediaConnectorQuery(
|
|
57
|
+
.mediaConnectorQuery(id, JSON.stringify(queryOptions), JSON.stringify(context))
|
|
57
58
|
.then((result) => getEditorResponseData(result));
|
|
58
59
|
});
|
|
59
60
|
/**
|
|
60
61
|
* Returns a single media using a specific MediaConnector.
|
|
61
62
|
*
|
|
62
63
|
* The connector needs to list `detail` as a supported capability.
|
|
63
|
-
* @param
|
|
64
|
+
* @param id unique id of the Media connector
|
|
64
65
|
* @param mediaId unique id of the Media
|
|
66
|
+
* @returns Media item
|
|
65
67
|
*/
|
|
66
|
-
this.detail = (
|
|
68
|
+
this.detail = (id, mediaId) => __awaiter(this, void 0, void 0, function* () {
|
|
67
69
|
const res = yield __classPrivateFieldGet(this, _MediaConnectorController_editorAPI, "f");
|
|
68
|
-
return res.mediaConnectorDetail(
|
|
70
|
+
return res.mediaConnectorDetail(id, mediaId).then((result) => getEditorResponseData(result));
|
|
69
71
|
});
|
|
70
72
|
/**
|
|
71
73
|
* The combination of a `connectorId` and `mediaId` is typically enough for a media connector to
|
|
72
74
|
* perform the download of this asset. The `download` endpoint is capable of relaying this information to the
|
|
73
75
|
* media connector instance running in the editor engine.
|
|
74
|
-
* @param
|
|
75
|
-
* @param mediaId unique
|
|
76
|
+
* @param id unique id of the media connector
|
|
77
|
+
* @param mediaId unique id of the media to download
|
|
76
78
|
* @param downloadType hint to the media connector about desired quality of the downloaded media
|
|
77
79
|
* @param context dynamic map of additional options potentially used by the connector
|
|
80
|
+
* @returns
|
|
78
81
|
*/
|
|
79
|
-
this.download = (
|
|
82
|
+
this.download = (id, mediaId, downloadType, context) => __awaiter(this, void 0, void 0, function* () {
|
|
80
83
|
const res = yield __classPrivateFieldGet(this, _MediaConnectorController_blobAPI, "f");
|
|
81
84
|
return res
|
|
82
|
-
.mediaConnectorDownload(
|
|
85
|
+
.mediaConnectorDownload(id, mediaId, downloadType, JSON.stringify(context))
|
|
83
86
|
.then((result) => { var _a; return (_a = result) !== null && _a !== void 0 ? _a : result; });
|
|
84
87
|
});
|
|
85
88
|
/**
|
|
86
89
|
* Depending on the connector capabilities, this api method allows you to upload new media to the
|
|
87
90
|
* connector's backend.
|
|
88
|
-
* @param
|
|
89
|
-
* @param mediaId unique
|
|
91
|
+
* @param id unique id of the media connector
|
|
92
|
+
* @param mediaId unique id of the media to upload
|
|
90
93
|
* @param blob byte array representation of the media to upload
|
|
94
|
+
* @returns
|
|
91
95
|
*/
|
|
92
|
-
this.upload = (
|
|
96
|
+
this.upload = (id, mediaId, blob) => __awaiter(this, void 0, void 0, function* () {
|
|
93
97
|
const res = yield __classPrivateFieldGet(this, _MediaConnectorController_editorAPI, "f");
|
|
94
98
|
return res
|
|
95
|
-
.mediaConnectorUpload(
|
|
99
|
+
.mediaConnectorUpload(id, mediaId, blob)
|
|
96
100
|
.then((result) => getEditorResponseData(result));
|
|
97
101
|
});
|
|
98
102
|
/**
|
|
99
103
|
* Depending on the connector capabilities, removes media identified by `mediaId` from the connector's backend storage
|
|
100
|
-
* @param
|
|
101
|
-
* @param mediaId unique
|
|
104
|
+
* @param id unique id of the media connector
|
|
105
|
+
* @param mediaId unique id of the media to download
|
|
106
|
+
* @returns
|
|
102
107
|
*/
|
|
103
|
-
this.remove = (
|
|
108
|
+
this.remove = (id, mediaId) => __awaiter(this, void 0, void 0, function* () {
|
|
104
109
|
const res = yield __classPrivateFieldGet(this, _MediaConnectorController_editorAPI, "f");
|
|
105
|
-
return res.mediaConnectorRemove(
|
|
110
|
+
return res.mediaConnectorRemove(id, mediaId).then((result) => getEditorResponseData(result));
|
|
106
111
|
});
|
|
107
112
|
/**
|
|
108
113
|
* Depending on the connector capabilities, copies media identified by `mediaId` to a new media item on the
|
|
109
114
|
* connector's backend
|
|
110
|
-
* @param
|
|
111
|
-
* @param mediaId unique
|
|
115
|
+
* @param id unique id of the media connector
|
|
116
|
+
* @param mediaId unique id of the media to download
|
|
112
117
|
* @param newName name of the copied media on the connector's backend
|
|
118
|
+
* @returns
|
|
113
119
|
*/
|
|
114
|
-
this.copy = (
|
|
120
|
+
this.copy = (id, mediaId, newName) => __awaiter(this, void 0, void 0, function* () {
|
|
115
121
|
const res = yield __classPrivateFieldGet(this, _MediaConnectorController_editorAPI, "f");
|
|
116
122
|
return res
|
|
117
|
-
.mediaConnectorCopy(
|
|
123
|
+
.mediaConnectorCopy(id, mediaId, newName)
|
|
118
124
|
.then((result) => getEditorResponseData(result));
|
|
119
125
|
});
|
|
120
126
|
/**
|
|
121
127
|
* All connectors have a certain set of queryOptions they allow to be passed in the query context. This
|
|
122
128
|
* method allows you to discover what options are available for a given connector. If you want to use any of these
|
|
123
129
|
* options, they need to be passed in the `context` parameter of the `query` api method.
|
|
124
|
-
* @param
|
|
130
|
+
* @param id unique id of the media connector
|
|
131
|
+
* @returns query options
|
|
125
132
|
*/
|
|
126
|
-
this.getQueryOptions = (
|
|
133
|
+
this.getQueryOptions = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
127
134
|
const res = yield __classPrivateFieldGet(this, _MediaConnectorController_editorAPI, "f");
|
|
128
135
|
return res
|
|
129
|
-
.mediaConnectorGetQueryOptions(
|
|
136
|
+
.mediaConnectorGetQueryOptions(id)
|
|
130
137
|
.then((result) => getEditorResponseData(result));
|
|
131
138
|
});
|
|
132
139
|
/**
|
|
133
140
|
* All connectors have a certain set of downloadOptions they allow to be passed in the download context. This
|
|
134
141
|
* method allows you to discover what options are available for a given connector. If you want to use any of these
|
|
135
142
|
* options, they need to be passed in the `context` parameter of the `download` api method.
|
|
136
|
-
* @param
|
|
143
|
+
* @param id unique id of the media connector
|
|
144
|
+
* @returns download options
|
|
137
145
|
*/
|
|
138
|
-
this.getDownloadOptions = (
|
|
146
|
+
this.getDownloadOptions = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
139
147
|
const res = yield __classPrivateFieldGet(this, _MediaConnectorController_editorAPI, "f");
|
|
140
148
|
return res
|
|
141
|
-
.mediaConnectorGetDownloadOptions(
|
|
149
|
+
.mediaConnectorGetDownloadOptions(id)
|
|
142
150
|
.then((result) => getEditorResponseData(result));
|
|
143
151
|
});
|
|
144
152
|
/**
|
|
145
153
|
* This method returns what capabilities the selected connector has. It gives an indication what methods can
|
|
146
154
|
* be used successfully for a certain connector.
|
|
147
|
-
* @param
|
|
155
|
+
* @param id unique id of the media connector
|
|
156
|
+
* @returns connector capabilities
|
|
148
157
|
*/
|
|
149
|
-
this.getCapabilities = (
|
|
158
|
+
this.getCapabilities = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
150
159
|
const res = yield __classPrivateFieldGet(this, _MediaConnectorController_editorAPI, "f");
|
|
151
160
|
return res
|
|
152
|
-
.mediaConnectorGetCapabilities(
|
|
161
|
+
.mediaConnectorGetCapabilities(id)
|
|
153
162
|
.then((result) => getEditorResponseData(result));
|
|
154
163
|
});
|
|
155
164
|
/**
|
|
156
165
|
* This method will parse the deprecatedMediaType to the new media type. This method will be removed once the deprecatedMediaType is out of use
|
|
157
166
|
* @param deprecatedType is 0 or 1
|
|
167
|
+
* @returns connector capabilities
|
|
158
168
|
*/
|
|
159
169
|
this.parseDeprecatedMediaType = (deprecatedType) => {
|
|
160
170
|
if (deprecatedType === DeprecatedMediaType.file)
|
|
@@ -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
|
|
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,OAAiB,EAAE,EAAE;YACpE,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,2CAAW,CAAC;YAClC,OAAO,GAAG;iBACL,mBAAmB,CAAC,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;iBAC9E,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAmB,MAAM,CAAC,CAAC,CAAC;QAC3E,CAAC,CAAA,CAAC;QAEF;;;;;;;WAOG;QACH,WAAM,GAAG,CAAO,EAAM,EAAE,OAAe,EAAE,EAAE;YACvC,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,2CAAW,CAAC;YAClC,OAAO,GAAG,CAAC,oBAAoB,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAQ,MAAM,CAAC,CAAC,CAAC;QACxG,CAAC,CAAA,CAAC;QAEF;;;;;;;;;WASG;QACH,aAAQ,GAAG,CACP,EAAM,EACN,OAAW,EACX,YAA+B,EAC/B,OAAiB,EACE,EAAE;YACrB,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,yCAAS,CAAC;YAChC,OAAO,GAAG;iBACL,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13
13
|
/**
|
|
14
14
|
* This method returns the list of pages
|
|
15
|
-
* @returns
|
|
15
|
+
* @returns list of all pages
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
getAll: () => Promise<import("../types/CommonTypes").EditorResponse<Page[]>>;
|
|
18
18
|
/**
|
|
19
19
|
* This method returns a page by its id
|
|
20
|
-
* @param
|
|
21
|
-
* @returns
|
|
20
|
+
* @param id the id of a specific page
|
|
21
|
+
* @returns page properties
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
getById: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<Page>>;
|
|
24
24
|
/**
|
|
25
25
|
* This method will set the width of the page to a specific value.
|
|
26
26
|
* This only works if the document is a project.
|
|
27
|
-
* @param
|
|
28
|
-
* @param
|
|
27
|
+
* @param id the id of a specific page
|
|
28
|
+
* @param width the string value that will be calculated (f.e. 1+1 will result in 2) The notation is in pixels
|
|
29
29
|
* @returns
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
setWidth: (id: Id, width: string) => Promise<import("../types/CommonTypes").EditorResponse<null> | null>;
|
|
32
32
|
/**
|
|
33
33
|
* This method will set the height of the page to a specific value.
|
|
34
34
|
* This only works if the document is a project.
|
|
35
|
-
* @param
|
|
36
|
-
* @param
|
|
35
|
+
* @param id the id of a specific page
|
|
36
|
+
* @param height the string value that will be calculated (f.e. 1+1 will result in 2). The notation is in pixels
|
|
37
37
|
* @returns
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
setHeight: (id: Id, height: string) => Promise<import("../types/CommonTypes").EditorResponse<null> | null>;
|
|
40
40
|
}
|
|
@@ -36,53 +36,53 @@ export class PageController {
|
|
|
36
36
|
_PageController_editorAPI.set(this, void 0);
|
|
37
37
|
/**
|
|
38
38
|
* This method returns the list of pages
|
|
39
|
-
* @returns
|
|
39
|
+
* @returns list of all pages
|
|
40
40
|
*/
|
|
41
|
-
this.
|
|
41
|
+
this.getAll = () => __awaiter(this, void 0, void 0, function* () {
|
|
42
42
|
const res = yield __classPrivateFieldGet(this, _PageController_editorAPI, "f");
|
|
43
43
|
return res.getPages().then((result) => getEditorResponseData(result));
|
|
44
44
|
});
|
|
45
45
|
/**
|
|
46
46
|
* This method returns a page by its id
|
|
47
|
-
* @param
|
|
48
|
-
* @returns
|
|
47
|
+
* @param id the id of a specific page
|
|
48
|
+
* @returns page properties
|
|
49
49
|
*/
|
|
50
|
-
this.
|
|
50
|
+
this.getById = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
51
51
|
const res = yield __classPrivateFieldGet(this, _PageController_editorAPI, "f");
|
|
52
|
-
return res.getPageById(
|
|
52
|
+
return res.getPageById(id).then((result) => getEditorResponseData(result));
|
|
53
53
|
});
|
|
54
54
|
/**
|
|
55
55
|
* This method will set the width of the page to a specific value.
|
|
56
56
|
* This only works if the document is a project.
|
|
57
|
-
* @param
|
|
58
|
-
* @param
|
|
57
|
+
* @param id the id of a specific page
|
|
58
|
+
* @param width the string value that will be calculated (f.e. 1+1 will result in 2) The notation is in pixels
|
|
59
59
|
* @returns
|
|
60
60
|
*/
|
|
61
|
-
this.
|
|
61
|
+
this.setWidth = (id, width) => __awaiter(this, void 0, void 0, function* () {
|
|
62
62
|
const res = yield __classPrivateFieldGet(this, _PageController_editorAPI, "f");
|
|
63
|
-
const calc = getCalculatedValue(
|
|
63
|
+
const calc = getCalculatedValue(width);
|
|
64
64
|
if (calc === null || calc === Infinity) {
|
|
65
65
|
return null;
|
|
66
66
|
}
|
|
67
67
|
return res
|
|
68
|
-
.setPageWidth(
|
|
68
|
+
.setPageWidth(id, parseFloat(calc.toString()))
|
|
69
69
|
.then((result) => getEditorResponseData(result));
|
|
70
70
|
});
|
|
71
71
|
/**
|
|
72
72
|
* This method will set the height of the page to a specific value.
|
|
73
73
|
* This only works if the document is a project.
|
|
74
|
-
* @param
|
|
75
|
-
* @param
|
|
74
|
+
* @param id the id of a specific page
|
|
75
|
+
* @param height the string value that will be calculated (f.e. 1+1 will result in 2). The notation is in pixels
|
|
76
76
|
* @returns
|
|
77
77
|
*/
|
|
78
|
-
this.
|
|
78
|
+
this.setHeight = (id, height) => __awaiter(this, void 0, void 0, function* () {
|
|
79
79
|
const res = yield __classPrivateFieldGet(this, _PageController_editorAPI, "f");
|
|
80
|
-
const calc = getCalculatedValue(
|
|
80
|
+
const calc = getCalculatedValue(height);
|
|
81
81
|
if (calc === null || calc === Infinity) {
|
|
82
82
|
return null;
|
|
83
83
|
}
|
|
84
84
|
return res
|
|
85
|
-
.setPageHeight(
|
|
85
|
+
.setPageHeight(id, parseFloat(calc.toString()))
|
|
86
86
|
.then((result) => getEditorResponseData(result));
|
|
87
87
|
});
|
|
88
88
|
__classPrivateFieldSet(this, _PageController_editorAPI, editorAPI, "f");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageController.js","sourceRoot":"","sources":["../../../src/controllers/PageController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEjE;;;GAGG;AACH,MAAM,OAAO,cAAc;IAMvB;;OAEG;IACH,YAAY,SAAoB;QARhC;;WAEG;QACH,4CAAsB;QAStB;;;WAGG;QACH,
|
|
1
|
+
{"version":3,"file":"PageController.js","sourceRoot":"","sources":["../../../src/controllers/PageController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEjE;;;GAGG;AACH,MAAM,OAAO,cAAc;IAMvB;;OAEG;IACH,YAAY,SAAoB;QARhC;;WAEG;QACH,4CAAsB;QAStB;;;WAGG;QACH,WAAM,GAAG,GAAS,EAAE;YAChB,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,iCAAW,CAAC;YAClC,OA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C,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;iBAC9C,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QAC/D,CAAC,CAAA,CAAC;QA5DE,uBAAA,IAAI,6BAAc,SAAS,MAAA,CAAC;IAChC,CAAC;CA4DJ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EditorAPI } from '../types/CommonTypes';
|
|
1
|
+
import { EditorAPI, Id } from '../types/CommonTypes';
|
|
2
2
|
import { ParagraphStyle, ParagraphStyleUpdate } from '../types/ParagraphStyleTypes';
|
|
3
3
|
/**
|
|
4
4
|
* The ParagraphStyleController is responsible for all communication regarding paragraph styles.
|
|
@@ -14,49 +14,49 @@ export declare class ParagraphStyleController {
|
|
|
14
14
|
* This method returns the list of paragraph styles
|
|
15
15
|
* @returns
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
getAll: () => Promise<import("../types/CommonTypes").EditorResponse<ParagraphStyle[]>>;
|
|
18
18
|
/**
|
|
19
19
|
* This method returns a paragraph style by id
|
|
20
|
-
* @param
|
|
20
|
+
* @param id the id of a specific paragraph style
|
|
21
21
|
* @returns
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
getById: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<ParagraphStyle>>;
|
|
24
24
|
/**
|
|
25
|
-
* This method
|
|
26
|
-
* @returns the new
|
|
25
|
+
* This method creates a new paragraph style
|
|
26
|
+
* @returns the id of new paragraph style
|
|
27
27
|
*/
|
|
28
|
-
|
|
28
|
+
create: () => Promise<import("../types/CommonTypes").EditorResponse<string>>;
|
|
29
29
|
/**
|
|
30
30
|
* This method duplicates a paragraph style
|
|
31
|
-
* @param
|
|
31
|
+
* @param id the id of a specific paragraph style
|
|
32
32
|
* @returns the new paragraph style id
|
|
33
33
|
*/
|
|
34
|
-
|
|
34
|
+
duplicate: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<string>>;
|
|
35
35
|
/**
|
|
36
36
|
* This method updates a paragraph style
|
|
37
|
-
* @param id
|
|
38
|
-
* @param
|
|
37
|
+
* @param id the id of a specific paragraph style
|
|
38
|
+
* @param properties The new paragraph style properties
|
|
39
39
|
* @returns
|
|
40
40
|
*/
|
|
41
|
-
|
|
41
|
+
update: (id: Id, properties: ParagraphStyleUpdate) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
42
42
|
/**
|
|
43
43
|
* This method renames a paragraph style
|
|
44
|
-
* @param id
|
|
45
|
-
* @param name
|
|
44
|
+
* @param id the id of a specific paragraph style
|
|
45
|
+
* @param name the new name of the paragraph style
|
|
46
46
|
* @returns
|
|
47
47
|
*/
|
|
48
|
-
|
|
48
|
+
rename: (id: Id, name: string) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
49
49
|
/**
|
|
50
50
|
* This method removes a paragraph style
|
|
51
|
-
* @param id
|
|
51
|
+
* @param id the id of a specific paragraph style
|
|
52
52
|
* @returns
|
|
53
53
|
*/
|
|
54
|
-
|
|
54
|
+
remove: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
55
55
|
/**
|
|
56
56
|
* This method changes positions of paragraph styles
|
|
57
|
-
* @param order
|
|
58
|
-
* @param
|
|
57
|
+
* @param order the position of the paragraph styles
|
|
58
|
+
* @param ids the list of paragraph styles ids
|
|
59
59
|
* @returns
|
|
60
60
|
*/
|
|
61
|
-
|
|
61
|
+
move: (order: number, ids: string[]) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
62
62
|
}
|
|
@@ -37,78 +37,78 @@ export class ParagraphStyleController {
|
|
|
37
37
|
* This method returns the list of paragraph styles
|
|
38
38
|
* @returns
|
|
39
39
|
*/
|
|
40
|
-
this.
|
|
40
|
+
this.getAll = () => __awaiter(this, void 0, void 0, function* () {
|
|
41
41
|
const res = yield __classPrivateFieldGet(this, _ParagraphStyleController_editorAPI, "f");
|
|
42
42
|
return res.getParagraphStyles().then((result) => getEditorResponseData(result));
|
|
43
43
|
});
|
|
44
44
|
/**
|
|
45
45
|
* This method returns a paragraph style by id
|
|
46
|
-
* @param
|
|
46
|
+
* @param id the id of a specific paragraph style
|
|
47
47
|
* @returns
|
|
48
48
|
*/
|
|
49
|
-
this.
|
|
49
|
+
this.getById = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
50
50
|
const res = yield __classPrivateFieldGet(this, _ParagraphStyleController_editorAPI, "f");
|
|
51
51
|
return res
|
|
52
|
-
.getParagraphStyleById(
|
|
52
|
+
.getParagraphStyleById(id)
|
|
53
53
|
.then((result) => getEditorResponseData(result));
|
|
54
54
|
});
|
|
55
55
|
/**
|
|
56
|
-
* This method
|
|
57
|
-
* @returns the new
|
|
56
|
+
* This method creates a new paragraph style
|
|
57
|
+
* @returns the id of new paragraph style
|
|
58
58
|
*/
|
|
59
|
-
this.
|
|
59
|
+
this.create = () => __awaiter(this, void 0, void 0, function* () {
|
|
60
60
|
const res = yield __classPrivateFieldGet(this, _ParagraphStyleController_editorAPI, "f");
|
|
61
61
|
return res.createParagraphStyle().then((result) => getEditorResponseData(result));
|
|
62
62
|
});
|
|
63
63
|
/**
|
|
64
64
|
* This method duplicates a paragraph style
|
|
65
|
-
* @param
|
|
65
|
+
* @param id the id of a specific paragraph style
|
|
66
66
|
* @returns the new paragraph style id
|
|
67
67
|
*/
|
|
68
|
-
this.
|
|
68
|
+
this.duplicate = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
69
69
|
const res = yield __classPrivateFieldGet(this, _ParagraphStyleController_editorAPI, "f");
|
|
70
|
-
return res.duplicateParagraphStyle(
|
|
70
|
+
return res.duplicateParagraphStyle(id).then((result) => getEditorResponseData(result));
|
|
71
71
|
});
|
|
72
72
|
/**
|
|
73
73
|
* This method updates a paragraph style
|
|
74
|
-
* @param id
|
|
75
|
-
* @param
|
|
74
|
+
* @param id the id of a specific paragraph style
|
|
75
|
+
* @param properties The new paragraph style properties
|
|
76
76
|
* @returns
|
|
77
77
|
*/
|
|
78
|
-
this.
|
|
78
|
+
this.update = (id, properties) => __awaiter(this, void 0, void 0, function* () {
|
|
79
79
|
const res = yield __classPrivateFieldGet(this, _ParagraphStyleController_editorAPI, "f");
|
|
80
80
|
return res
|
|
81
|
-
.updateParagraphStyle(id, JSON.stringify(
|
|
81
|
+
.updateParagraphStyle(id, JSON.stringify(properties))
|
|
82
82
|
.then((result) => getEditorResponseData(result));
|
|
83
83
|
});
|
|
84
84
|
/**
|
|
85
85
|
* This method renames a paragraph style
|
|
86
|
-
* @param id
|
|
87
|
-
* @param name
|
|
86
|
+
* @param id the id of a specific paragraph style
|
|
87
|
+
* @param name the new name of the paragraph style
|
|
88
88
|
* @returns
|
|
89
89
|
*/
|
|
90
|
-
this.
|
|
90
|
+
this.rename = (id, name) => __awaiter(this, void 0, void 0, function* () {
|
|
91
91
|
const res = yield __classPrivateFieldGet(this, _ParagraphStyleController_editorAPI, "f");
|
|
92
92
|
return res.renameParagraphStyle(id, name).then((result) => getEditorResponseData(result));
|
|
93
93
|
});
|
|
94
94
|
/**
|
|
95
95
|
* This method removes a paragraph style
|
|
96
|
-
* @param id
|
|
96
|
+
* @param id the id of a specific paragraph style
|
|
97
97
|
* @returns
|
|
98
98
|
*/
|
|
99
|
-
this.
|
|
99
|
+
this.remove = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
100
100
|
const res = yield __classPrivateFieldGet(this, _ParagraphStyleController_editorAPI, "f");
|
|
101
101
|
return res.removeParagraphStyle(id).then((result) => getEditorResponseData(result));
|
|
102
102
|
});
|
|
103
103
|
/**
|
|
104
104
|
* This method changes positions of paragraph styles
|
|
105
|
-
* @param order
|
|
106
|
-
* @param
|
|
105
|
+
* @param order the position of the paragraph styles
|
|
106
|
+
* @param ids the list of paragraph styles ids
|
|
107
107
|
* @returns
|
|
108
108
|
*/
|
|
109
|
-
this.
|
|
109
|
+
this.move = (order, ids) => __awaiter(this, void 0, void 0, function* () {
|
|
110
110
|
const res = yield __classPrivateFieldGet(this, _ParagraphStyleController_editorAPI, "f");
|
|
111
|
-
return res.moveParagraphStyles(order,
|
|
111
|
+
return res.moveParagraphStyles(order, ids).then((result) => getEditorResponseData(result));
|
|
112
112
|
});
|
|
113
113
|
__classPrivateFieldSet(this, _ParagraphStyleController_editorAPI, editorAPI, "f");
|
|
114
114
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParagraphStyleController.js","sourceRoot":"","sources":["../../../src/controllers/ParagraphStyleController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpE;;;GAGG;AACH,MAAM,OAAO,wBAAwB;IAMjC;;OAEG;IACH,YAAY,SAAoB;QARhC;;WAEG;QACH,sDAAsB;QAStB;;;WAGG;QACH,
|
|
1
|
+
{"version":3,"file":"ParagraphStyleController.js","sourceRoot":"","sources":["../../../src/controllers/ParagraphStyleController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpE;;;GAGG;AACH,MAAM,OAAO,wBAAwB;IAMjC;;OAEG;IACH,YAAY,SAAoB;QARhC;;WAEG;QACH,sDAAsB;QAStB;;;WAGG;QACH,WAAM,GAAG,GAAS,EAAE;YAChB,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,2CAAW,CAAC;YAClC,OAAO,GAAG,CAAC,kBAAkB,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAmB,MAAM,CAAC,CAAC,CAAC;QACtG,CAAC,CAAA,CAAC;QAEF;;;;WAIG;QACH,YAAO,GAAG,CAAO,EAAM,EAAE,EAAE;YACvB,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,2CAAW,CAAC;YAClC,OAAO,GAAG;iBACL,qBAAqB,CAAC,EAAE,CAAC;iBACzB,IAAI,CAAC,C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,CAAC,CAAA,CAAC;QAEF;;;;WAIG;QACH,WAAM,GAAG,CAAO,EAAM,EAAE,EAAE;YACtB,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,2CAAW,CAAC;YAClC,OAAO,GAAG,CAAC,oBAAoB,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QAC9F,CAAC,CAAA,CAAC;QAEF;;;;;WAKG;QACH,SAAI,GAAG,CAAO,KAAa,EAAE,GAAa,EAAE,EAAE;YAC1C,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,2CAAW,CAAC;YAClC,OAAO,GAAG,CAAC,mBAAmB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QACrG,CAAC,CAAA,CAAC;QAtFE,uBAAA,IAAI,uCAAc,SAAS,MAAA,CAAC;IAChC,CAAC;CAsFJ"}
|
|
@@ -12,93 +12,93 @@ export declare class ShapeController {
|
|
|
12
12
|
constructor(editorAPI: EditorAPI);
|
|
13
13
|
/**
|
|
14
14
|
* This method updates properties of the shape
|
|
15
|
-
* @param
|
|
15
|
+
* @param id the id of the shapeFrame that needs to get updated.
|
|
16
16
|
* @param properties A property to update
|
|
17
17
|
* @returns
|
|
18
18
|
*/
|
|
19
19
|
private setShapeProperties;
|
|
20
20
|
/**
|
|
21
21
|
* This method will set the visibility of the shape fill.
|
|
22
|
-
* @param
|
|
22
|
+
* @param id the id of the shapeFrame that needs to get updated.
|
|
23
23
|
* @param enableFill Whether the shape fill is visible.
|
|
24
24
|
* @returns
|
|
25
25
|
*/
|
|
26
|
-
setEnableFill: (
|
|
26
|
+
setEnableFill: (id: Id, enableFill: boolean) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
27
27
|
/**
|
|
28
28
|
* This method will set the shape fill color of a specified shape frame.
|
|
29
|
-
* @param
|
|
30
|
-
* @param fillColor
|
|
29
|
+
* @param id the id of the shapeFrame that needs to get updated.
|
|
30
|
+
* @param fillColor the new shape fill color that you want to set to the shapeFrame.
|
|
31
31
|
* @returns
|
|
32
32
|
*/
|
|
33
|
-
setFillColor: (
|
|
33
|
+
setFillColor: (id: Id, fillColor: ColorUsage) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
34
34
|
/**
|
|
35
35
|
* This method will set the visibility of the shape stroke.
|
|
36
|
-
* @param
|
|
36
|
+
* @param id the id of the shapeFrame that needs to get updated.
|
|
37
37
|
* @param enableStroke Whether the shape stroke is visible.
|
|
38
38
|
* @returns
|
|
39
39
|
*/
|
|
40
|
-
setEnableStroke: (
|
|
40
|
+
setEnableStroke: (id: Id, enableStroke: boolean) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
41
41
|
/**
|
|
42
42
|
* This method will set the shape stroke color of a specified shape frame.
|
|
43
|
-
* @param
|
|
44
|
-
* @param strokeColor
|
|
43
|
+
* @param id the id of the shapeFrame that needs to get updated.
|
|
44
|
+
* @param strokeColor the new shape stroke color that you want to set to the shapeFrame.
|
|
45
45
|
* @returns
|
|
46
46
|
*/
|
|
47
|
-
setStrokeColor: (
|
|
47
|
+
setStrokeColor: (id: Id, strokeColor: ColorUsage) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
48
48
|
/**
|
|
49
49
|
* This method will set the shape stroke weight of a specified shape frame.
|
|
50
|
-
* @param
|
|
51
|
-
* @param strokeWeight
|
|
50
|
+
* @param id the id of the shapeFrame that needs to get updated.
|
|
51
|
+
* @param strokeWeight the new shape stroke weight that you want to set to the shapeFrame.
|
|
52
52
|
* @returns
|
|
53
53
|
*/
|
|
54
|
-
setStrokeWeight: (
|
|
54
|
+
setStrokeWeight: (id: Id, strokeWeight: number) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
55
55
|
/**
|
|
56
56
|
* This method will set the flag to change the way the rectangle shape corners will be changed: all at once or separately.
|
|
57
|
-
* @param
|
|
58
|
-
* @param allCornersSame
|
|
57
|
+
* @param id the id of the shapeFrame that needs to get updated.
|
|
58
|
+
* @param allCornersSame the new flag that you want to set to the shapeFrame.
|
|
59
59
|
* @returns
|
|
60
60
|
*/
|
|
61
|
-
setFlagAllCornersSame: (
|
|
61
|
+
setFlagAllCornersSame: (id: Id, allCornersSame: boolean) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
62
62
|
/**
|
|
63
63
|
* This method updates radii of the rectangle and polygon shapes
|
|
64
|
-
* @param
|
|
64
|
+
* @param id the id of the shapeFrame that needs to get updated.
|
|
65
65
|
* @param radius A radius object to update a desired corner;
|
|
66
66
|
* @returns
|
|
67
67
|
*/
|
|
68
68
|
private setShapeCorners;
|
|
69
69
|
/**
|
|
70
70
|
* This method will set the radius for all corners of the rectangle and polygon shapes
|
|
71
|
-
* @param
|
|
71
|
+
* @param id the id of the shapeFrame that needs to get updated.
|
|
72
72
|
* @param radius A radius to update all corners at once;
|
|
73
73
|
* @returns
|
|
74
74
|
*/
|
|
75
|
-
setRadiusAll: (
|
|
75
|
+
setRadiusAll: (id: Id, radius: number) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
76
76
|
/**
|
|
77
77
|
* This method will set the radius for the top left corner of the rectangle shape
|
|
78
|
-
* @param
|
|
78
|
+
* @param id the id of the shapeFrame that needs to get updated.
|
|
79
79
|
* @param radius A radius to update the top left corner;
|
|
80
80
|
* @returns
|
|
81
81
|
*/
|
|
82
|
-
setRadiusTopLeft: (
|
|
82
|
+
setRadiusTopLeft: (id: Id, radius: number) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
83
83
|
/**
|
|
84
84
|
* This method will set the radius for the bottom left corner of the rectangle shape
|
|
85
|
-
* @param
|
|
85
|
+
* @param id the id of the shapeFrame that needs to get updated.
|
|
86
86
|
* @param radius A radius to update the bottom left corner;
|
|
87
87
|
* @returns
|
|
88
88
|
*/
|
|
89
|
-
setRadiusBottomLeft: (
|
|
89
|
+
setRadiusBottomLeft: (id: Id, radius: number) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
90
90
|
/**
|
|
91
91
|
* This method will set the radius for the top right corner of the rectangle shape
|
|
92
|
-
* @param
|
|
92
|
+
* @param id the id of the shapeFrame that needs to get updated.
|
|
93
93
|
* @param radius A radius to update the top right corner;
|
|
94
94
|
* @returns
|
|
95
95
|
*/
|
|
96
|
-
setRadiusTopRight: (
|
|
96
|
+
setRadiusTopRight: (id: Id, radius: number) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
97
97
|
/**
|
|
98
98
|
* This method will set the radius for the bottom right corner of the rectangle shape
|
|
99
|
-
* @param
|
|
99
|
+
* @param id the id of the shapeFrame that needs to get updated.
|
|
100
100
|
* @param radius A radius to update the bottom right corner;
|
|
101
101
|
* @returns
|
|
102
102
|
*/
|
|
103
|
-
setRadiusBottomRight: (
|
|
103
|
+
setRadiusBottomRight: (id: Id, radius: number) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
104
104
|
}
|