@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
|
@@ -35,78 +35,89 @@ export class ActionController {
|
|
|
35
35
|
_ActionController_editorAPI.set(this, void 0);
|
|
36
36
|
/**
|
|
37
37
|
* This method returns the list of all actions.
|
|
38
|
-
* @returns
|
|
38
|
+
* @returns list of all actions
|
|
39
39
|
*/
|
|
40
|
-
this.
|
|
40
|
+
this.getAll = () => __awaiter(this, void 0, void 0, function* () {
|
|
41
41
|
const res = yield __classPrivateFieldGet(this, _ActionController_editorAPI, "f");
|
|
42
42
|
return res.getActions().then((result) => getEditorResponseData(result));
|
|
43
43
|
});
|
|
44
44
|
/**
|
|
45
|
-
* This method returns an action by id
|
|
46
|
-
* @param
|
|
47
|
-
* @returns
|
|
45
|
+
* This method returns an action by the id
|
|
46
|
+
* @param id the id of a specific action
|
|
47
|
+
* @returns action details
|
|
48
48
|
*/
|
|
49
|
-
this.
|
|
49
|
+
this.getById = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
50
50
|
const res = yield __classPrivateFieldGet(this, _ActionController_editorAPI, "f");
|
|
51
|
-
return res.getActionById(
|
|
51
|
+
return res.getActionById(id).then((result) => getEditorResponseData(result));
|
|
52
52
|
});
|
|
53
53
|
/**
|
|
54
54
|
* This method creates a new action.
|
|
55
|
-
* @returns
|
|
55
|
+
* @returns the id of the newly created action.
|
|
56
56
|
*/
|
|
57
|
-
this.
|
|
57
|
+
this.create = () => __awaiter(this, void 0, void 0, function* () {
|
|
58
58
|
const res = yield __classPrivateFieldGet(this, _ActionController_editorAPI, "f");
|
|
59
59
|
return res.createAction().then((result) => getEditorResponseData(result));
|
|
60
60
|
});
|
|
61
61
|
/**
|
|
62
|
-
* This method duplicates an existing action
|
|
63
|
-
* @
|
|
62
|
+
* This method duplicates an existing action by the id
|
|
63
|
+
* @param id the id of a specific action
|
|
64
|
+
* @returns the id of the duplicated action.
|
|
64
65
|
*/
|
|
65
|
-
this.
|
|
66
|
+
this.duplicate = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
66
67
|
const res = yield __classPrivateFieldGet(this, _ActionController_editorAPI, "f");
|
|
67
|
-
return res.duplicateAction(
|
|
68
|
+
return res.duplicateAction(id).then((result) => getEditorResponseData(result));
|
|
68
69
|
});
|
|
69
70
|
/**
|
|
70
|
-
* This method removes the action
|
|
71
|
-
* @param
|
|
71
|
+
* This method removes the action by the id
|
|
72
|
+
* @param id the id of a specific action
|
|
72
73
|
* @returns
|
|
73
74
|
*/
|
|
74
|
-
this.
|
|
75
|
+
this.remove = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
75
76
|
const res = yield __classPrivateFieldGet(this, _ActionController_editorAPI, "f");
|
|
76
|
-
return res.removeAction(
|
|
77
|
+
return res.removeAction(id).then((result) => getEditorResponseData(result));
|
|
77
78
|
});
|
|
78
79
|
/**
|
|
79
|
-
* This method renames an action
|
|
80
|
-
* @param
|
|
81
|
-
* @param name
|
|
80
|
+
* This method renames an action by the id and provided name
|
|
81
|
+
* @param id the id of a specific action
|
|
82
|
+
* @param name the new unique name for the action
|
|
82
83
|
* @returns
|
|
83
84
|
*/
|
|
84
|
-
this.
|
|
85
|
+
this.rename = (id, name) => __awaiter(this, void 0, void 0, function* () {
|
|
85
86
|
const res = yield __classPrivateFieldGet(this, _ActionController_editorAPI, "f");
|
|
86
|
-
return res.renameAction(
|
|
87
|
+
return res.renameAction(id, name).then((result) => getEditorResponseData(result));
|
|
87
88
|
});
|
|
88
89
|
/**
|
|
89
|
-
* This method updates the script the action uses
|
|
90
|
-
* @param
|
|
91
|
-
* @param
|
|
90
|
+
* This method updates the script the action uses by the id and provided script
|
|
91
|
+
* @param id the id of a specific action
|
|
92
|
+
* @param actionScript the JavaScript based action script
|
|
92
93
|
* @returns
|
|
93
94
|
*/
|
|
94
|
-
this.
|
|
95
|
+
this.updateScript = (id, actionScript) => __awaiter(this, void 0, void 0, function* () {
|
|
95
96
|
const res = yield __classPrivateFieldGet(this, _ActionController_editorAPI, "f");
|
|
96
|
-
return res.updateActionScript(
|
|
97
|
+
return res.updateActionScript(id, actionScript).then((result) => getEditorResponseData(result));
|
|
97
98
|
});
|
|
98
99
|
/**
|
|
99
100
|
* This method updates the triggers on which the action will react.
|
|
100
|
-
* @param
|
|
101
|
-
* @param triggers
|
|
101
|
+
* @param id the id of a specific action
|
|
102
|
+
* @param triggers the triggers this action should react on.
|
|
102
103
|
* @returns
|
|
103
104
|
*/
|
|
104
|
-
this.
|
|
105
|
+
this.updateTriggers = (id, triggers) => __awaiter(this, void 0, void 0, function* () {
|
|
105
106
|
const res = yield __classPrivateFieldGet(this, _ActionController_editorAPI, "f");
|
|
106
107
|
return res
|
|
107
|
-
.updateActionTriggers(
|
|
108
|
+
.updateActionTriggers(id, JSON.stringify(triggers))
|
|
108
109
|
.then((result) => getEditorResponseData(result));
|
|
109
110
|
});
|
|
111
|
+
/**
|
|
112
|
+
* This method changes positions of actions
|
|
113
|
+
* @param order the position of actions
|
|
114
|
+
* @param ids the list of action IDs
|
|
115
|
+
* @returns
|
|
116
|
+
*/
|
|
117
|
+
this.move = (order, ids) => __awaiter(this, void 0, void 0, function* () {
|
|
118
|
+
const res = yield __classPrivateFieldGet(this, _ActionController_editorAPI, "f");
|
|
119
|
+
return res.moveActions(order, ids).then((result) => getEditorResponseData(result));
|
|
120
|
+
});
|
|
110
121
|
__classPrivateFieldSet(this, _ActionController_editorAPI, editorAPI, "f");
|
|
111
122
|
}
|
|
112
123
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionController.js","sourceRoot":"","sources":["../../../src/controllers/ActionController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpE;;;GAGG;AACH,MAAM,OAAO,gBAAgB;IAMzB;;OAEG;IACH,YAAY,SAAoB;QARhC;;WAEG;QACH,8CAAsB;QAStB;;;WAGG;QACH,
|
|
1
|
+
{"version":3,"file":"ActionController.js","sourceRoot":"","sources":["../../../src/controllers/ActionController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpE;;;GAGG;AACH,MAAM,OAAO,gBAAgB;IAMzB;;OAEG;IACH,YAAY,SAAoB;QARhC;;WAEG;QACH,8CAAsB;QAStB;;;WAGG;QACH,WAAM,GAAG,GAAS,EAAE;YAChB,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,mCAAW,CAAC;YAClC,OAAO,GAAG,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,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59 +12,59 @@ export declare class AnimationController {
|
|
|
12
12
|
constructor(children: EditorAPI);
|
|
13
13
|
/**
|
|
14
14
|
* This method returns all animations on current layout
|
|
15
|
-
* @returns
|
|
15
|
+
* @returns list of all animation on current layout
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
getAllOnSelectedLayout: () => Promise<import("../types/CommonTypes").EditorResponse<FrameAnimationPropertiesType[]>>;
|
|
18
18
|
/**
|
|
19
|
-
* This method returns an animation for a given frame and layout
|
|
20
|
-
* @param
|
|
21
|
-
* @param layoutId
|
|
22
|
-
* @returns
|
|
19
|
+
* This method returns an animation for a given frame and layout IDs
|
|
20
|
+
* @param id the id of a specific frame
|
|
21
|
+
* @param layoutId the id of a specific layout
|
|
22
|
+
* @returns animation properties for a given frame and layout
|
|
23
23
|
*/
|
|
24
|
-
|
|
24
|
+
getByFrameId: (id: Id, layoutId?: Id) => Promise<import("../types/CommonTypes").EditorResponse<FrameAnimationPropertiesType>>;
|
|
25
25
|
/**
|
|
26
|
-
* This method returns the animations for a given layout
|
|
27
|
-
* @param
|
|
28
|
-
* @returns
|
|
26
|
+
* This method returns the animations for a given layout id
|
|
27
|
+
* @param id the id of a specific layout
|
|
28
|
+
* @returns animation properties for a given layout
|
|
29
29
|
*/
|
|
30
|
-
|
|
30
|
+
getByLayoutId: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<FrameAnimationPropertiesType>>;
|
|
31
31
|
/**
|
|
32
32
|
* This method sets the animation state for a certain Frame
|
|
33
|
-
* @param animation
|
|
34
|
-
* @returns
|
|
33
|
+
* @param animation animation properties
|
|
34
|
+
* @returns updated animation properties
|
|
35
35
|
*/
|
|
36
36
|
setFrameAnimation: (animation: FrameAnimationPropertiesType) => Promise<import("../types/CommonTypes").EditorResponse<FrameAnimationPropertiesType>>;
|
|
37
37
|
/**
|
|
38
38
|
* This method triggers the animation to play
|
|
39
39
|
* @returns
|
|
40
40
|
*/
|
|
41
|
-
|
|
41
|
+
play: () => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
42
42
|
/**
|
|
43
43
|
* This method triggers the animation to pause
|
|
44
44
|
* @returns
|
|
45
45
|
*/
|
|
46
|
-
|
|
46
|
+
pause: () => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
47
47
|
/**
|
|
48
|
-
* This method sets the animation time to a certain time, expressed in
|
|
49
|
-
* @param timeInMS
|
|
48
|
+
* This method sets the animation time to a certain time, expressed in milliseconds
|
|
49
|
+
* @param timeInMS the time expressed in milliseconds
|
|
50
50
|
* @returns
|
|
51
51
|
*/
|
|
52
|
-
setScrubberPosition: (timeInMS: number) => Promise<import("../types/CommonTypes").EditorResponse<
|
|
52
|
+
setScrubberPosition: (timeInMS: number) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
53
53
|
/**
|
|
54
|
-
* This method sets the total and maximum duration of the animation
|
|
55
|
-
* @param timeInMS
|
|
54
|
+
* This method sets the total and maximum duration of the animation, expressed in milliseconds
|
|
55
|
+
* @param timeInMS the time expressed in milliseconds
|
|
56
56
|
* @returns
|
|
57
57
|
*/
|
|
58
|
-
|
|
58
|
+
setDuration: (timeInMS: number) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
59
59
|
/**
|
|
60
60
|
* This method resets the animation to its initial state
|
|
61
|
-
* @param
|
|
61
|
+
* @param id the id of a certain frame
|
|
62
62
|
* @returns
|
|
63
63
|
*/
|
|
64
|
-
resetFrameAnimation: (
|
|
64
|
+
resetFrameAnimation: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
65
65
|
/**
|
|
66
66
|
* This method resets the layout's animations and animation duration to its initial state
|
|
67
67
|
* @returns
|
|
68
68
|
*/
|
|
69
|
-
|
|
69
|
+
reset: () => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
70
70
|
}
|
|
@@ -35,41 +35,41 @@ export class AnimationController {
|
|
|
35
35
|
_AnimationController_editorAPI.set(this, void 0);
|
|
36
36
|
/**
|
|
37
37
|
* This method returns all animations on current layout
|
|
38
|
-
* @returns
|
|
38
|
+
* @returns list of all animation on current layout
|
|
39
39
|
*/
|
|
40
|
-
this.
|
|
40
|
+
this.getAllOnSelectedLayout = () => __awaiter(this, void 0, void 0, function* () {
|
|
41
41
|
const res = yield __classPrivateFieldGet(this, _AnimationController_editorAPI, "f");
|
|
42
42
|
return res
|
|
43
43
|
.getAnimationsOnSelectedLayout()
|
|
44
44
|
.then((result) => getEditorResponseData(result));
|
|
45
45
|
});
|
|
46
46
|
/**
|
|
47
|
-
* This method returns an animation for a given frame and layout
|
|
48
|
-
* @param
|
|
49
|
-
* @param layoutId
|
|
50
|
-
* @returns
|
|
47
|
+
* This method returns an animation for a given frame and layout IDs
|
|
48
|
+
* @param id the id of a specific frame
|
|
49
|
+
* @param layoutId the id of a specific layout
|
|
50
|
+
* @returns animation properties for a given frame and layout
|
|
51
51
|
*/
|
|
52
|
-
this.
|
|
52
|
+
this.getByFrameId = (id, layoutId) => __awaiter(this, void 0, void 0, function* () {
|
|
53
53
|
const res = yield __classPrivateFieldGet(this, _AnimationController_editorAPI, "f");
|
|
54
54
|
return res
|
|
55
|
-
.getAnimationByFrameId(
|
|
55
|
+
.getAnimationByFrameId(id, layoutId)
|
|
56
56
|
.then((result) => getEditorResponseData(result));
|
|
57
57
|
});
|
|
58
58
|
/**
|
|
59
|
-
* This method returns the animations for a given layout
|
|
60
|
-
* @param
|
|
61
|
-
* @returns
|
|
59
|
+
* This method returns the animations for a given layout id
|
|
60
|
+
* @param id the id of a specific layout
|
|
61
|
+
* @returns animation properties for a given layout
|
|
62
62
|
*/
|
|
63
|
-
this.
|
|
63
|
+
this.getByLayoutId = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
64
64
|
const res = yield __classPrivateFieldGet(this, _AnimationController_editorAPI, "f");
|
|
65
65
|
return res
|
|
66
|
-
.getAnimationsByLayoutId(
|
|
66
|
+
.getAnimationsByLayoutId(id)
|
|
67
67
|
.then((result) => getEditorResponseData(result));
|
|
68
68
|
});
|
|
69
69
|
/**
|
|
70
70
|
* This method sets the animation state for a certain Frame
|
|
71
|
-
* @param animation
|
|
72
|
-
* @returns
|
|
71
|
+
* @param animation animation properties
|
|
72
|
+
* @returns updated animation properties
|
|
73
73
|
*/
|
|
74
74
|
this.setFrameAnimation = (animation) => __awaiter(this, void 0, void 0, function* () {
|
|
75
75
|
const res = yield __classPrivateFieldGet(this, _AnimationController_editorAPI, "f");
|
|
@@ -81,7 +81,7 @@ export class AnimationController {
|
|
|
81
81
|
* This method triggers the animation to play
|
|
82
82
|
* @returns
|
|
83
83
|
*/
|
|
84
|
-
this.
|
|
84
|
+
this.play = () => __awaiter(this, void 0, void 0, function* () {
|
|
85
85
|
const res = yield __classPrivateFieldGet(this, _AnimationController_editorAPI, "f");
|
|
86
86
|
return res.playAnimation().then((result) => getEditorResponseData(result));
|
|
87
87
|
});
|
|
@@ -89,44 +89,44 @@ export class AnimationController {
|
|
|
89
89
|
* This method triggers the animation to pause
|
|
90
90
|
* @returns
|
|
91
91
|
*/
|
|
92
|
-
this.
|
|
92
|
+
this.pause = () => __awaiter(this, void 0, void 0, function* () {
|
|
93
93
|
const res = yield __classPrivateFieldGet(this, _AnimationController_editorAPI, "f");
|
|
94
94
|
return res.pauseAnimation().then((result) => getEditorResponseData(result));
|
|
95
95
|
});
|
|
96
96
|
/**
|
|
97
|
-
* This method sets the animation time to a certain time, expressed in
|
|
98
|
-
* @param timeInMS
|
|
97
|
+
* This method sets the animation time to a certain time, expressed in milliseconds
|
|
98
|
+
* @param timeInMS the time expressed in milliseconds
|
|
99
99
|
* @returns
|
|
100
100
|
*/
|
|
101
101
|
this.setScrubberPosition = (timeInMS) => __awaiter(this, void 0, void 0, function* () {
|
|
102
102
|
const res = yield __classPrivateFieldGet(this, _AnimationController_editorAPI, "f");
|
|
103
|
-
return res.setScrubberPosition(timeInMS);
|
|
103
|
+
return res.setScrubberPosition(timeInMS).then((result) => getEditorResponseData(result));
|
|
104
104
|
});
|
|
105
105
|
/**
|
|
106
|
-
* This method sets the total and maximum duration of the animation
|
|
107
|
-
* @param timeInMS
|
|
106
|
+
* This method sets the total and maximum duration of the animation, expressed in milliseconds
|
|
107
|
+
* @param timeInMS the time expressed in milliseconds
|
|
108
108
|
* @returns
|
|
109
109
|
*/
|
|
110
|
-
this.
|
|
110
|
+
this.setDuration = (timeInMS) => __awaiter(this, void 0, void 0, function* () {
|
|
111
111
|
const res = yield __classPrivateFieldGet(this, _AnimationController_editorAPI, "f");
|
|
112
112
|
return res.setAnimationDuration(timeInMS).then((result) => getEditorResponseData(result));
|
|
113
113
|
});
|
|
114
114
|
/**
|
|
115
115
|
* This method resets the animation to its initial state
|
|
116
|
-
* @param
|
|
116
|
+
* @param id the id of a certain frame
|
|
117
117
|
* @returns
|
|
118
118
|
*/
|
|
119
|
-
this.resetFrameAnimation = (
|
|
119
|
+
this.resetFrameAnimation = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
120
120
|
const res = yield __classPrivateFieldGet(this, _AnimationController_editorAPI, "f");
|
|
121
|
-
return res.resetFrameAnimation(
|
|
121
|
+
return res.resetFrameAnimation(id).then((result) => getEditorResponseData(result));
|
|
122
122
|
});
|
|
123
123
|
/**
|
|
124
124
|
* This method resets the layout's animations and animation duration to its initial state
|
|
125
125
|
* @returns
|
|
126
126
|
*/
|
|
127
|
-
this.
|
|
127
|
+
this.reset = () => __awaiter(this, void 0, void 0, function* () {
|
|
128
128
|
const res = yield __classPrivateFieldGet(this, _AnimationController_editorAPI, "f");
|
|
129
|
-
return res.resetAnimation();
|
|
129
|
+
return res.resetAnimation().then((result) => getEditorResponseData(result));
|
|
130
130
|
});
|
|
131
131
|
__classPrivateFieldSet(this, _AnimationController_editorAPI, children, "f");
|
|
132
132
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnimationController.js","sourceRoot":"","sources":["../../../src/controllers/AnimationController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpE;;;GAGG;AACH,MAAM,OAAO,mBAAmB;IAM5B;;OAEG;IACH,YAAY,QAAmB;QAR/B;;WAEG;QACH,iDAAsB;QAStB;;;WAGG;QACH,
|
|
1
|
+
{"version":3,"file":"AnimationController.js","sourceRoot":"","sources":["../../../src/controllers/AnimationController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpE;;;GAGG;AACH,MAAM,OAAO,mBAAmB;IAM5B;;OAEG;IACH,YAAY,QAAmB;QAR/B;;WAEG;QACH,iDAAsB;QAStB;;;WAGG;QACH,2BAAsB,GAAG,GAAS,EAAE;YAChC,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,sCAAW,CAAC;YAClC,OAAO,GAAG;iBACL,6BAA6B,EAAE;iBAC/B,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAiC,MAAM,CAAC,CAAC,CAAC;QACzF,CAAC,CAAA,CAAC;QAEF;;;;;WAKG;QACH,iBAAY,GAAG,CAAO,EAAM,EAAE,QAAa,EAAE,EAAE;YAC3C,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,sCAAW,CAAC;YAClC,OAAO,GAAG;iBACL,qBAAqB,CAAS,EAAE,EAAE,QAAQ,CAAC;iBAC3C,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAA+B,MAAM,CAAC,CAAC,CAAC;QACvF,CAAC,CAAA,CAAC;QAEF;;;;WAIG;QACH,kBAAa,GAAG,CAAO,EAAM,EAAE,EAAE;YAC7B,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,sCAAW,CAAC;YAClC,OAAO,GAAG;iBACL,uBAAuB,CAAC,EAAE,CAAC;iBAC3B,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAA+B,MAAM,CAAC,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ACrC,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,sCAAW,CAAC;YAClC,OAAO,GAAG,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QACpG,CAAC,CAAA,CAAC;QAEF;;;;WAIG;QACH,wBAAmB,GAAG,CAAO,EAAM,EAAE,EAAE;YACnC,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,sCAAW,CAAC;YAClC,OAAO,GAAG,CAAC,mBAAmB,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QAC7F,CAAC,CAAA,CAAC;QAEF;;;WAGG;QACH,UAAK,GAAG,GAAS,EAAE;YACf,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,sCAAW,CAAC;YAClC,OAAO,GAAG,CAAC,cAAc,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QACtF,CAAC,CAAA,CAAC;QA5GE,uBAAA,IAAI,kCAAc,QAAQ,MAAA,CAAC;IAC/B,CAAC;CA4GJ"}
|
|
@@ -13,14 +13,14 @@ export declare class CanvasController {
|
|
|
13
13
|
* This method fits the page to the given rectangle or the viewport available
|
|
14
14
|
* Optional parameters `left`, `top`, `width` and `height` are needed to define the rectangle to fit the page to
|
|
15
15
|
* If any or all of them aren't provided the page will fit the whole viewport available
|
|
16
|
-
* @param
|
|
16
|
+
* @param id the id of a specific page
|
|
17
17
|
* @param left
|
|
18
18
|
* @param top
|
|
19
19
|
* @param width
|
|
20
20
|
* @param height
|
|
21
21
|
* @returns
|
|
22
22
|
*/
|
|
23
|
-
zoomToPage: (
|
|
23
|
+
zoomToPage: (id?: Id | null, left?: number | null, top?: number | null, width?: number | null, height?: number | null) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
24
24
|
/**
|
|
25
25
|
* This method gets the scale factor of the canvas
|
|
26
26
|
* @returns scale factor in percents
|
|
@@ -29,6 +29,7 @@ export declare class CanvasController {
|
|
|
29
29
|
/**
|
|
30
30
|
* This method sets the scale factor to the canvas and re-centers the page
|
|
31
31
|
* @param scaleFactor scale factor in percents
|
|
32
|
+
* @returns
|
|
32
33
|
*/
|
|
33
34
|
setZoomPercentage: (scaleFactor: number) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
34
35
|
}
|
|
@@ -37,16 +37,16 @@ export class CanvasController {
|
|
|
37
37
|
* This method fits the page to the given rectangle or the viewport available
|
|
38
38
|
* Optional parameters `left`, `top`, `width` and `height` are needed to define the rectangle to fit the page to
|
|
39
39
|
* If any or all of them aren't provided the page will fit the whole viewport available
|
|
40
|
-
* @param
|
|
40
|
+
* @param id the id of a specific page
|
|
41
41
|
* @param left
|
|
42
42
|
* @param top
|
|
43
43
|
* @param width
|
|
44
44
|
* @param height
|
|
45
45
|
* @returns
|
|
46
46
|
*/
|
|
47
|
-
this.zoomToPage = (
|
|
47
|
+
this.zoomToPage = (id, left, top, width, height) => __awaiter(this, void 0, void 0, function* () {
|
|
48
48
|
const res = yield __classPrivateFieldGet(this, _CanvasController_editorAPI, "f");
|
|
49
|
-
return res.zoomToPage(
|
|
49
|
+
return res.zoomToPage(id, left, top, width, height).then((result) => getEditorResponseData(result));
|
|
50
50
|
});
|
|
51
51
|
/**
|
|
52
52
|
* This method gets the scale factor of the canvas
|
|
@@ -59,6 +59,7 @@ export class CanvasController {
|
|
|
59
59
|
/**
|
|
60
60
|
* This method sets the scale factor to the canvas and re-centers the page
|
|
61
61
|
* @param scaleFactor scale factor in percents
|
|
62
|
+
* @returns
|
|
62
63
|
*/
|
|
63
64
|
this.setZoomPercentage = (scaleFactor) => __awaiter(this, void 0, void 0, function* () {
|
|
64
65
|
const res = yield __classPrivateFieldGet(this, _CanvasController_editorAPI, "f");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CanvasController.js","sourceRoot":"","sources":["../../../src/controllers/CanvasController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpE;;;GAGG;AACH,MAAM,OAAO,gBAAgB;IAMzB;;OAEG;IACH,YAAY,SAAoB;QARhC;;WAEG;QACH,8CAAsB;QAStB;;;;;;;;;;WAUG;QACH,eAAU,GAAG,CACT,
|
|
1
|
+
{"version":3,"file":"CanvasController.js","sourceRoot":"","sources":["../../../src/controllers/CanvasController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpE;;;GAGG;AACH,MAAM,OAAO,gBAAgB;IAMzB;;OAEG;IACH,YAAY,SAAoB;QARhC;;WAEG;QACH,8CAAsB;QAStB;;;;;;;;;;WAUG;QACH,eAAU,GAAG,CACT,EAAc,EACd,IAAoB,EACpB,GAAmB,EACnB,KAAqB,EACrB,MAAsB,EACxB,EAAE;YACA,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,mCAAW,CAAC;YAClC,OAAO,GAAG,CAAC,UAAU,CAAC,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QAC9G,CAAC,CAAA,CAAC;QAEF;;;WAGG;QACH,sBAAiB,GAAG,GAAS,EAAE;YAC3B,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,mCAAW,CAAC;YAClC,OAAO,GAAG,CAAC,iBAAiB,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAS,MAAM,CAAC,CAAC,CAAC;QAC3F,CAAC,CAAA,CAAC;QAEF;;;;WAIG;QACH,sBAAiB,GAAG,CAAO,WAAmB,EAAE,EAAE;YAC9C,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,mCAAW,CAAC;YAClC,OAAO,GAAG,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QACpG,CAAC,CAAA,CAAC;QA1CE,uBAAA,IAAI,+BAAc,SAAS,MAAA,CAAC;IAChC,CAAC;CA0CJ"}
|
|
@@ -12,44 +12,44 @@ export declare class CharacterStyleController {
|
|
|
12
12
|
constructor(editorAPI: EditorAPI);
|
|
13
13
|
/**
|
|
14
14
|
* This method returns the list of character styles
|
|
15
|
-
* @returns
|
|
15
|
+
* @returns list of all character styles
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
getAll: () => Promise<import("../types/CommonTypes").EditorResponse<CharacterStyle[]>>;
|
|
18
18
|
/**
|
|
19
|
-
* This method returns a character style by id
|
|
20
|
-
* @param characterStyleId
|
|
21
|
-
* @returns
|
|
19
|
+
* This method returns a character style by the id
|
|
20
|
+
* @param characterStyleId the id of a specific character style
|
|
21
|
+
* @returns character style for given id
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
getById: (characterStyleId: Id) => Promise<import("../types/CommonTypes").EditorResponse<CharacterStyle>>;
|
|
24
24
|
/**
|
|
25
25
|
* This method creates a new character style
|
|
26
|
-
* @returns the new
|
|
26
|
+
* @returns the id of new character style
|
|
27
27
|
*/
|
|
28
|
-
|
|
28
|
+
create: () => Promise<import("../types/CommonTypes").EditorResponse<string>>;
|
|
29
29
|
/**
|
|
30
|
-
* This method updates a character style
|
|
31
|
-
* @param
|
|
32
|
-
* @param characterStyle
|
|
30
|
+
* This method updates a character style by the id and provided properties
|
|
31
|
+
* @param characterStyleId the id of a specific character style
|
|
32
|
+
* @param characterStyle the new character style properties
|
|
33
33
|
* @returns
|
|
34
34
|
*/
|
|
35
|
-
|
|
35
|
+
update: (characterStyleId: Id, characterStyle: CharacterStyleUpdate) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
36
36
|
/**
|
|
37
|
-
* This method removes a character style
|
|
38
|
-
* @param
|
|
37
|
+
* This method removes a character style by the id
|
|
38
|
+
* @param characterStyleId the id of a specific character style
|
|
39
39
|
* @returns
|
|
40
40
|
*/
|
|
41
|
-
|
|
41
|
+
remove: (characterStyleId: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
42
42
|
/**
|
|
43
|
-
* This method duplicates a character style
|
|
44
|
-
* @param characterStyleId
|
|
45
|
-
* @returns
|
|
43
|
+
* This method duplicates a character style by the id
|
|
44
|
+
* @param characterStyleId the id of a specific character style
|
|
45
|
+
* @returns id of the duplicated character style
|
|
46
46
|
*/
|
|
47
|
-
|
|
47
|
+
duplicate: (characterStyleId: Id) => Promise<import("../types/CommonTypes").EditorResponse<string>>;
|
|
48
48
|
/**
|
|
49
|
-
* This method renames a character style
|
|
50
|
-
* @param
|
|
51
|
-
* @param
|
|
49
|
+
* This method renames a character style by the id
|
|
50
|
+
* @param characterStyleId the id of a specific character style
|
|
51
|
+
* @param characterStyleName the new name of the character style
|
|
52
52
|
* @returns
|
|
53
53
|
*/
|
|
54
|
-
|
|
54
|
+
rename: (characterStyleId: Id, characterStyleName: string) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
55
55
|
}
|
|
@@ -35,18 +35,18 @@ export class CharacterStyleController {
|
|
|
35
35
|
_CharacterStyleController_editorAPI.set(this, void 0);
|
|
36
36
|
/**
|
|
37
37
|
* This method returns the list of character styles
|
|
38
|
-
* @returns
|
|
38
|
+
* @returns list of all character styles
|
|
39
39
|
*/
|
|
40
|
-
this.
|
|
40
|
+
this.getAll = () => __awaiter(this, void 0, void 0, function* () {
|
|
41
41
|
const res = yield __classPrivateFieldGet(this, _CharacterStyleController_editorAPI, "f");
|
|
42
42
|
return res.getCharacterStyles().then((result) => getEditorResponseData(result));
|
|
43
43
|
});
|
|
44
44
|
/**
|
|
45
|
-
* This method returns a character style by id
|
|
46
|
-
* @param characterStyleId
|
|
47
|
-
* @returns
|
|
45
|
+
* This method returns a character style by the id
|
|
46
|
+
* @param characterStyleId the id of a specific character style
|
|
47
|
+
* @returns character style for given id
|
|
48
48
|
*/
|
|
49
|
-
this.
|
|
49
|
+
this.getById = (characterStyleId) => __awaiter(this, void 0, void 0, function* () {
|
|
50
50
|
const res = yield __classPrivateFieldGet(this, _CharacterStyleController_editorAPI, "f");
|
|
51
51
|
return res
|
|
52
52
|
.getCharacterStyleById(characterStyleId)
|
|
@@ -54,51 +54,51 @@ export class CharacterStyleController {
|
|
|
54
54
|
});
|
|
55
55
|
/**
|
|
56
56
|
* This method creates a new character style
|
|
57
|
-
* @returns the new
|
|
57
|
+
* @returns the id of new character style
|
|
58
58
|
*/
|
|
59
|
-
this.
|
|
59
|
+
this.create = () => __awaiter(this, void 0, void 0, function* () {
|
|
60
60
|
const res = yield __classPrivateFieldGet(this, _CharacterStyleController_editorAPI, "f");
|
|
61
61
|
return res.createCharacterStyle().then((result) => getEditorResponseData(result));
|
|
62
62
|
});
|
|
63
63
|
/**
|
|
64
|
-
* This method updates a character style
|
|
65
|
-
* @param
|
|
66
|
-
* @param characterStyle
|
|
64
|
+
* This method updates a character style by the id and provided properties
|
|
65
|
+
* @param characterStyleId the id of a specific character style
|
|
66
|
+
* @param characterStyle the new character style properties
|
|
67
67
|
* @returns
|
|
68
68
|
*/
|
|
69
|
-
this.
|
|
69
|
+
this.update = (characterStyleId, characterStyle) => __awaiter(this, void 0, void 0, function* () {
|
|
70
70
|
const res = yield __classPrivateFieldGet(this, _CharacterStyleController_editorAPI, "f");
|
|
71
71
|
return res
|
|
72
|
-
.updateCharacterStyle(
|
|
72
|
+
.updateCharacterStyle(characterStyleId, JSON.stringify(characterStyle))
|
|
73
73
|
.then((result) => getEditorResponseData(result));
|
|
74
74
|
});
|
|
75
75
|
/**
|
|
76
|
-
* This method removes a character style
|
|
77
|
-
* @param
|
|
76
|
+
* This method removes a character style by the id
|
|
77
|
+
* @param characterStyleId the id of a specific character style
|
|
78
78
|
* @returns
|
|
79
79
|
*/
|
|
80
|
-
this.
|
|
80
|
+
this.remove = (characterStyleId) => __awaiter(this, void 0, void 0, function* () {
|
|
81
81
|
const res = yield __classPrivateFieldGet(this, _CharacterStyleController_editorAPI, "f");
|
|
82
|
-
return res.removeCharacterStyle(
|
|
82
|
+
return res.removeCharacterStyle(characterStyleId).then((result) => getEditorResponseData(result));
|
|
83
83
|
});
|
|
84
84
|
/**
|
|
85
|
-
* This method duplicates a character style
|
|
86
|
-
* @param characterStyleId
|
|
87
|
-
* @returns
|
|
85
|
+
* This method duplicates a character style by the id
|
|
86
|
+
* @param characterStyleId the id of a specific character style
|
|
87
|
+
* @returns id of the duplicated character style
|
|
88
88
|
*/
|
|
89
|
-
this.
|
|
89
|
+
this.duplicate = (characterStyleId) => __awaiter(this, void 0, void 0, function* () {
|
|
90
90
|
const res = yield __classPrivateFieldGet(this, _CharacterStyleController_editorAPI, "f");
|
|
91
91
|
return res.duplicateCharacterStyle(characterStyleId).then((result) => getEditorResponseData(result));
|
|
92
92
|
});
|
|
93
93
|
/**
|
|
94
|
-
* This method renames a character style
|
|
95
|
-
* @param
|
|
96
|
-
* @param
|
|
94
|
+
* This method renames a character style by the id
|
|
95
|
+
* @param characterStyleId the id of a specific character style
|
|
96
|
+
* @param characterStyleName the new name of the character style
|
|
97
97
|
* @returns
|
|
98
98
|
*/
|
|
99
|
-
this.
|
|
99
|
+
this.rename = (characterStyleId, characterStyleName) => __awaiter(this, void 0, void 0, function* () {
|
|
100
100
|
const res = yield __classPrivateFieldGet(this, _CharacterStyleController_editorAPI, "f");
|
|
101
|
-
return res.renameCharacterStyle(
|
|
101
|
+
return res.renameCharacterStyle(characterStyleId, characterStyleName).then((result) => getEditorResponseData(result));
|
|
102
102
|
});
|
|
103
103
|
__classPrivateFieldSet(this, _CharacterStyleController_editorAPI, editorAPI, "f");
|
|
104
104
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CharacterStyleController.js","sourceRoot":"","sources":["../../../src/controllers/CharacterStyleController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAGpE;;;GAGG;AACH,MAAM,OAAO,wBAAwB;IAMjC;;OAEG;IACH,YAAY,SAAoB;QARhC;;WAEG;QACH,sDAAsB;QAStB;;;WAGG;QACH,
|
|
1
|
+
{"version":3,"file":"CharacterStyleController.js","sourceRoot":"","sources":["../../../src/controllers/CharacterStyleController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAGpE;;;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,gBAAoB,EAAE,EAAE;YACrC,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,2CAAW,CAAC;YAClC,OAAO,GAAG;iBACL,qBAAqB,CAAC,gBAAgB,CAAC;iBACvC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAiB,MAAM,CAAC,CAAC,CAAC;QACzE,CAAC,CAAA,CAAC;QAEF;;;WAGG;QACH,WAAM,GAAG,GAAS,EAAE;YAChB,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,2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